var Au = (function (t) {
    return (t.H265 = "h265"), (t.H264 = "h264"), t;
  })(Au || {}),
  Roe = (function (t) {
    return (t.SoftFirst = "soft-first"), (t.H264First = "h264-first"), t;
  })(Roe || {}),
  Aoe = (function (t) {
    return (t.Software = "software"), (t.Hardware = "hardware"), t;
  })(Aoe || {}),
  Pc =
    typeof globalThis < "u"
      ? globalThis
      : typeof window < "u"
      ? window
      : typeof global < "u"
      ? global
      : typeof self < "u"
      ? self
      : {};
function xr(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default")
    ? t.default
    : t;
}
var IG = function (t) {
    return t && t.Math == Math && t;
  },
  yl =
    IG(typeof globalThis == "object" && globalThis) ||
    IG(typeof window == "object" && window) ||
    IG(typeof self == "object" && self) ||
    IG(typeof Pc == "object" && Pc) ||
    (function () {
      return this;
    })() ||
    Pc ||
    Function("return this")(),
  So = function (t) {
    try {
      return !!t();
    } catch {
      return !0;
    }
  },
  bst = So,
  xL = !bst(function () {
    var t = function () {}.bind();
    return typeof t != "function" || t.hasOwnProperty("prototype");
  }),
  _st = xL,
  H4e = Function.prototype,
  Cpe = H4e.apply,
  $pe = H4e.call,
  uR =
    (typeof Reflect == "object" && Reflect.apply) ||
    (_st
      ? $pe.bind(Cpe)
      : function () {
          return $pe.apply(Cpe, arguments);
        }),
  X4e = xL,
  V4e = Function.prototype,
  jq = V4e.call,
  Tst = X4e && V4e.bind.bind(jq, jq),
  Bo = X4e
    ? Tst
    : function (t) {
        return function () {
          return jq.apply(t, arguments);
        };
      },
  z4e = Bo,
  Est = z4e({}.toString),
  Sst = z4e("".slice),
  ub = function (t) {
    return Sst(Est(t), 8, -1);
  },
  Rst = ub,
  Ast = Bo,
  ux = function (t) {
    if (Rst(t) === "Function") return Ast(t);
  },
  Wq = typeof document == "object" && document.all,
  wst = Wq === void 0 && Wq !== void 0,
  j4e = { all: Wq, IS_HTMLDDA: wst },
  W4e = j4e,
  kst = W4e.all,
  vl = W4e.IS_HTMLDDA
    ? function (t) {
        return typeof t == "function" || t === kst;
      }
    : function (t) {
        return typeof t == "function";
      },
  cb = {},
  Ist = So,
  wu = !Ist(function () {
    return (
      Object.defineProperty({}, 1, {
        get: function () {
          return 7;
        },
      })[1] != 7
    );
  }),
  Dst = xL,
  DG = Function.prototype.call,
  ts = Dst
    ? DG.bind(DG)
    : function () {
        return DG.apply(DG, arguments);
      },
  LL = {},
  K4e = {}.propertyIsEnumerable,
  Z4e = Object.getOwnPropertyDescriptor,
  Pst = Z4e && !K4e.call({ 1: 2 }, 1);
LL.f = Pst
  ? function (t) {
      var e = Z4e(this, t);
      return !!e && e.enumerable;
    }
  : K4e;
var L_,
  sF,
  mE = function (t, e) {
    return {
      enumerable: !(1 & t),
      configurable: !(2 & t),
      writable: !(4 & t),
      value: e,
    };
  },
  Mst = Bo,
  Cst = So,
  $st = ub,
  C7 = Object,
  xst = Mst("".split),
  x9 = Cst(function () {
    return !C7("z").propertyIsEnumerable(0);
  })
    ? function (t) {
        return $st(t) == "String" ? xst(t, "") : C7(t);
      }
    : C7,
  cR = function (t) {
    return t == null;
  },
  Lst = cR,
  Ost = TypeError,
  yE = function (t) {
    if (Lst(t)) throw Ost("Can't call method on " + t);
    return t;
  },
  Gst = x9,
  Nst = yE,
  pm = function (t) {
    return Gst(Nst(t));
  },
  xpe = vl,
  Y4e = j4e,
  Fst = Y4e.all,
  Bl = Y4e.IS_HTMLDDA
    ? function (t) {
        return typeof t == "object" ? t !== null : xpe(t) || t === Fst;
      }
    : function (t) {
        return typeof t == "object" ? t !== null : xpe(t);
      },
  za = {},
  $7 = za,
  x7 = yl,
  Ust = vl,
  Lpe = function (t) {
    return Ust(t) ? t : void 0;
  },
  $c = function (t, e) {
    return arguments.length < 2
      ? Lpe($7[t]) || Lpe(x7[t])
      : ($7[t] && $7[t][e]) || (x7[t] && x7[t][e]);
  },
  Bst = Bo,
  Es = Bst({}.isPrototypeOf),
  vE = (typeof navigator < "u" && String(navigator.userAgent)) || "",
  Q4e = yl,
  L7 = vE,
  Ope = Q4e.process,
  Gpe = Q4e.Deno,
  Npe = (Ope && Ope.versions) || (Gpe && Gpe.version),
  Fpe = Npe && Npe.v8;
Fpe && (sF = (L_ = Fpe.split("."))[0] > 0 && L_[0] < 4 ? 1 : +(L_[0] + L_[1])),
  !sF &&
    L7 &&
    (!(L_ = L7.match(/Edge\/(\d+)/)) || L_[1] >= 74) &&
    (L_ = L7.match(/Chrome\/(\d+)/)) &&
    (sF = +L_[1]);
var NS = sF,
  Upe = NS,
  Hst = So,
  Xst = yl,
  Vst = Xst.String,
  _D =
    !!Object.getOwnPropertySymbols &&
    !Hst(function () {
      var t = Symbol();
      return (
        !Vst(t) ||
        !(Object(t) instanceof Symbol) ||
        (!Symbol.sham && Upe && Upe < 41)
      );
    }),
  zst = _D,
  J4e = zst && !Symbol.sham && typeof Symbol.iterator == "symbol",
  jst = $c,
  Wst = vl,
  Kst = Es,
  Zst = J4e,
  Yst = Object,
  OL = Zst
    ? function (t) {
        return typeof t == "symbol";
      }
    : function (t) {
        var e = jst("Symbol");
        return Wst(e) && Kst(e.prototype, Yst(t));
      },
  Qst = String,
  bE = function (t) {
    try {
      return Qst(t);
    } catch {
      return "Object";
    }
  },
  Jst = vl,
  qst = bE,
  elt = TypeError,
  ku = function (t) {
    if (Jst(t)) return t;
    throw elt(qst(t) + " is not a function");
  },
  tlt = ku,
  nlt = cR,
  woe = function (t, e) {
    var n = t[e];
    return nlt(n) ? void 0 : tlt(n);
  },
  O7 = ts,
  G7 = vl,
  N7 = Bl,
  rlt = TypeError,
  ilt = function (t, e) {
    var n, r;
    if (
      (e === "string" && G7((n = t.toString)) && !N7((r = O7(n, t)))) ||
      (G7((n = t.valueOf)) && !N7((r = O7(n, t)))) ||
      (e !== "string" && G7((n = t.toString)) && !N7((r = O7(n, t))))
    )
      return r;
    throw rlt("Can't convert object to primitive value");
  },
  q4e = { exports: {} },
  eNe = !0,
  Bpe = yl,
  alt = Object.defineProperty,
  olt = function (t, e) {
    try {
      alt(Bpe, t, { value: e, configurable: !0, writable: !0 });
    } catch {
      Bpe[t] = e;
    }
    return e;
  },
  slt = yl,
  llt = olt,
  Hpe = "__core-js_shared__",
  ult = slt[Hpe] || llt(Hpe, {}),
  koe = ult,
  Xpe = koe;
(q4e.exports = function (t, e) {
  return Xpe[t] || (Xpe[t] = e !== void 0 ? e : {});
})("versions", []).push({
  version: "3.30.2",
  mode: "pure",
  copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)",
  license: "https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",
  source: "https://github.com/zloirock/core-js",
});
var TD = q4e.exports,
  clt = yE,
  dlt = Object,
  Ff = function (t) {
    return dlt(clt(t));
  },
  hlt = Bo,
  flt = Ff,
  plt = hlt({}.hasOwnProperty),
  kl =
    Object.hasOwn ||
    function (t, e) {
      return plt(flt(t), e);
    },
  glt = Bo,
  mlt = 0,
  ylt = Math.random(),
  vlt = glt((1).toString),
  L9 = function (t) {
    return "Symbol(" + (t === void 0 ? "" : t) + ")_" + vlt(++mlt + ylt, 36);
  },
  blt = yl,
  _lt = TD,
  Vpe = kl,
  Tlt = L9,
  Elt = _D,
  Slt = J4e,
  lk = blt.Symbol,
  F7 = _lt("wks"),
  Rlt = Slt ? lk.for || lk : (lk && lk.withoutSetter) || Tlt,
  nl = function (t) {
    return (
      Vpe(F7, t) || (F7[t] = Elt && Vpe(lk, t) ? lk[t] : Rlt("Symbol." + t)),
      F7[t]
    );
  },
  Alt = ts,
  zpe = Bl,
  jpe = OL,
  wlt = woe,
  klt = ilt,
  Ilt = nl,
  Dlt = TypeError,
  Plt = Ilt("toPrimitive"),
  Mlt = function (t, e) {
    if (!zpe(t) || jpe(t)) return t;
    var n,
      r = wlt(t, Plt);
    if (r) {
      if (
        (e === void 0 && (e = "default"), (n = Alt(r, t, e)), !zpe(n) || jpe(n))
      )
        return n;
      throw Dlt("Can't convert object to primitive value");
    }
    return e === void 0 && (e = "number"), klt(t, e);
  },
  Clt = Mlt,
  $lt = OL,
  O9 = function (t) {
    var e = Clt(t, "string");
    return $lt(e) ? e : e + "";
  },
  xlt = yl,
  Wpe = Bl,
  Kq = xlt.document,
  Llt = Wpe(Kq) && Wpe(Kq.createElement),
  Ioe = function (t) {
    return Llt ? Kq.createElement(t) : {};
  },
  Olt = wu,
  Glt = So,
  Nlt = Ioe,
  tNe =
    !Olt &&
    !Glt(function () {
      return (
        Object.defineProperty(Nlt("div"), "a", {
          get: function () {
            return 7;
          },
        }).a != 7
      );
    }),
  Flt = wu,
  Ult = ts,
  Blt = LL,
  Hlt = mE,
  Xlt = pm,
  Vlt = O9,
  zlt = kl,
  jlt = tNe,
  Kpe = Object.getOwnPropertyDescriptor;
cb.f = Flt
  ? Kpe
  : function (t, e) {
      if (((t = Xlt(t)), (e = Vlt(e)), jlt))
        try {
          return Kpe(t, e);
        } catch {}
      if (zlt(t, e)) return Hlt(!Ult(Blt.f, t, e), t[e]);
    };
var Wlt = So,
  Klt = vl,
  Zlt = /#|\.prototype\./,
  GL = function (t, e) {
    var n = Qlt[Ylt(t)];
    return n == qlt || (n != Jlt && (Klt(e) ? Wlt(e) : !!e));
  },
  Ylt = (GL.normalize = function (t) {
    return String(t).replace(Zlt, ".").toLowerCase();
  }),
  Qlt = (GL.data = {}),
  Jlt = (GL.NATIVE = "N"),
  qlt = (GL.POLYFILL = "P"),
  nNe = GL,
  eut = ku,
  tut = xL,
  nut = ux(ux.bind),
  Iu = function (t, e) {
    return (
      eut(t),
      e === void 0
        ? t
        : tut
        ? nut(t, e)
        : function () {
            return t.apply(e, arguments);
          }
    );
  },
  Zp = {},
  rut = wu,
  iut = So,
  rNe =
    rut &&
    iut(function () {
      return (
        Object.defineProperty(function () {}, "prototype", {
          value: 42,
          writable: !1,
        }).prototype != 42
      );
    }),
  aut = Bl,
  out = String,
  sut = TypeError,
  xc = function (t) {
    if (aut(t)) return t;
    throw sut(out(t) + " is not an object");
  },
  lut = wu,
  uut = tNe,
  cut = rNe,
  PG = xc,
  Zpe = O9,
  dut = TypeError,
  U7 = Object.defineProperty,
  hut = Object.getOwnPropertyDescriptor,
  B7 = "enumerable",
  H7 = "configurable",
  X7 = "writable";
Zp.f = lut
  ? cut
    ? function (t, e, n) {
        if (
          (PG(t),
          (e = Zpe(e)),
          PG(n),
          typeof t == "function" &&
            e === "prototype" &&
            "value" in n &&
            X7 in n &&
            !n[X7])
        ) {
          var r = hut(t, e);
          r &&
            r[X7] &&
            ((t[e] = n.value),
            (n = {
              configurable: H7 in n ? n[H7] : r[H7],
              enumerable: B7 in n ? n[B7] : r[B7],
              writable: !1,
            }));
        }
        return U7(t, e, n);
      }
    : U7
  : function (t, e, n) {
      if ((PG(t), (e = Zpe(e)), PG(n), uut))
        try {
          return U7(t, e, n);
        } catch {}
      if ("get" in n || "set" in n) throw dut("Accessors not supported");
      return "value" in n && (t[e] = n.value), t;
    };
var fut = wu,
  put = Zp,
  gut = mE,
  db = fut
    ? function (t, e, n) {
        return put.f(t, e, gut(1, n));
      }
    : function (t, e, n) {
        return (t[e] = n), t;
      },
  MG = yl,
  mut = uR,
  yut = ux,
  vut = vl,
  but = cb.f,
  _ut = nNe,
  _A = za,
  Tut = Iu,
  TA = db,
  Ype = kl,
  Eut = function (t) {
    var e = function (n, r, i) {
      if (this instanceof e) {
        switch (arguments.length) {
          case 0:
            return new t();
          case 1:
            return new t(n);
          case 2:
            return new t(n, r);
        }
        return new t(n, r, i);
      }
      return mut(t, this, arguments);
    };
    return (e.prototype = t.prototype), e;
  },
  ur = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f = t.target,
      p = t.global,
      g = t.stat,
      y = t.proto,
      v = p ? MG : g ? MG[f] : (MG[f] || {}).prototype,
      b = p ? _A : _A[f] || TA(_A, f, {})[f],
      w = b.prototype;
    for (o in e)
      (r =
        !(n = _ut(p ? o : f + (g ? "." : "#") + o, t.forced)) &&
        v &&
        Ype(v, o)),
        (u = b[o]),
        r && (c = t.dontCallGetSet ? (h = but(v, o)) && h.value : v[o]),
        (l = r && c ? c : e[o]),
        (r && typeof u == typeof l) ||
          ((d =
            t.bind && r
              ? Tut(l, MG)
              : t.wrap && r
              ? Eut(l)
              : y && vut(l)
              ? yut(l)
              : l),
          (t.sham || (l && l.sham) || (u && u.sham)) && TA(d, "sham", !0),
          TA(b, o, d),
          y &&
            (Ype(_A, (i = f + "Prototype")) || TA(_A, i, {}),
            TA(_A[i], o, l),
            t.real && w && (n || !w[o]) && TA(w, o, l)));
  },
  Sut = ub,
  dR =
    Array.isArray ||
    function (t) {
      return Sut(t) == "Array";
    },
  Rut = Math.ceil,
  Aut = Math.floor,
  iNe =
    Math.trunc ||
    function (t) {
      var e = +t;
      return (e > 0 ? Aut : Rut)(e);
    },
  wut = iNe,
  hR = function (t) {
    var e = +t;
    return e != e || e === 0 ? 0 : wut(e);
  },
  kut = hR,
  Iut = Math.min,
  Doe = function (t) {
    return t > 0 ? Iut(kut(t), 9007199254740991) : 0;
  },
  Dut = Doe,
  Yp = function (t) {
    return Dut(t.length);
  },
  Put = TypeError,
  Mut = 9007199254740991,
  Poe = function (t) {
    if (t > Mut) throw Put("Maximum allowed index exceeded");
    return t;
  },
  Cut = O9,
  $ut = Zp,
  xut = mE,
  fR = function (t, e, n) {
    var r = Cut(e);
    r in t ? $ut.f(t, r, xut(0, n)) : (t[r] = n);
  },
  Lut = nl,
  Out = Lut("toStringTag"),
  aNe = {};
aNe[Out] = "z";
var Moe = String(aNe) === "[object z]",
  Gut = Moe,
  Nut = vl,
  lF = ub,
  Fut = nl,
  Uut = Fut("toStringTag"),
  But = Object,
  Hut =
    lF(
      (function () {
        return arguments;
      })()
    ) == "Arguments",
  Xut = function (t, e) {
    try {
      return t[e];
    } catch {}
  },
  L0 = Gut
    ? lF
    : function (t) {
        var e, n, r;
        return t === void 0
          ? "Undefined"
          : t === null
          ? "Null"
          : typeof (n = Xut((e = But(t)), Uut)) == "string"
          ? n
          : Hut
          ? lF(e)
          : (r = lF(e)) == "Object" && Nut(e.callee)
          ? "Arguments"
          : r;
      },
  Vut = Bo,
  zut = vl,
  Zq = koe,
  jut = Vut(Function.toString);
zut(Zq.inspectSource) ||
  (Zq.inspectSource = function (t) {
    return jut(t);
  });
var oNe = Zq.inspectSource,
  Wut = Bo,
  Kut = So,
  sNe = vl,
  Zut = L0,
  Yut = $c,
  Qut = oNe,
  lNe = function () {},
  Jut = [],
  uNe = Yut("Reflect", "construct"),
  Coe = /^\s*(?:class|function)\b/,
  qut = Wut(Coe.exec),
  ect = !Coe.exec(lNe),
  jP = function (t) {
    if (!sNe(t)) return !1;
    try {
      return uNe(lNe, Jut, t), !0;
    } catch {
      return !1;
    }
  },
  cNe = function (t) {
    if (!sNe(t)) return !1;
    switch (Zut(t)) {
      case "AsyncFunction":
      case "GeneratorFunction":
      case "AsyncGeneratorFunction":
        return !1;
    }
    try {
      return ect || !!qut(Coe, Qut(t));
    } catch {
      return !0;
    }
  };
cNe.sham = !0;
var G9 =
    !uNe ||
    Kut(function () {
      var t;
      return (
        jP(jP.call) ||
        !jP(Object) ||
        !jP(function () {
          t = !0;
        }) ||
        t
      );
    })
      ? cNe
      : jP,
  Qpe = dR,
  tct = G9,
  nct = Bl,
  rct = nl,
  ict = rct("species"),
  Jpe = Array,
  act = function (t) {
    var e;
    return (
      Qpe(t) &&
        ((e = t.constructor),
        ((tct(e) && (e === Jpe || Qpe(e.prototype))) ||
          (nct(e) && (e = e[ict]) === null)) &&
          (e = void 0)),
      e === void 0 ? Jpe : e
    );
  },
  oct = act,
  $oe = function (t, e) {
    return new (oct(t))(e === 0 ? 0 : e);
  },
  sct = So,
  lct = nl,
  uct = NS,
  cct = lct("species"),
  NL = function (t) {
    return (
      uct >= 51 ||
      !sct(function () {
        var e = [];
        return (
          ((e.constructor = {})[cct] = function () {
            return { foo: 1 };
          }),
          e[t](Boolean).foo !== 1
        );
      })
    );
  },
  dct = ur,
  hct = So,
  fct = dR,
  pct = Bl,
  gct = Ff,
  mct = Yp,
  qpe = Poe,
  ege = fR,
  yct = $oe,
  vct = NL,
  bct = nl,
  _ct = NS,
  dNe = bct("isConcatSpreadable"),
  Tct =
    _ct >= 51 ||
    !hct(function () {
      var t = [];
      return (t[dNe] = !1), t.concat()[0] !== t;
    }),
  Ect = function (t) {
    if (!pct(t)) return !1;
    var e = t[dNe];
    return e !== void 0 ? !!e : fct(t);
  },
  Sct = !Tct || !vct("concat");
dct(
  { target: "Array", proto: !0, arity: 1, forced: Sct },
  {
    concat: function (t) {
      var e,
        n,
        r,
        i,
        o,
        l = gct(this),
        u = yct(l, 0),
        c = 0;
      for (e = -1, r = arguments.length; e < r; e++)
        if (Ect((o = e === -1 ? l : arguments[e])))
          for (i = mct(o), qpe(c + i), n = 0; n < i; n++, c++)
            n in o && ege(u, c, o[n]);
        else qpe(c + 1), ege(u, c++, o);
      return (u.length = c), u;
    },
  }
);
var Rct = L0,
  Act = String,
  td = function (t) {
    if (Rct(t) === "Symbol")
      throw TypeError("Cannot convert a Symbol value to a string");
    return Act(t);
  },
  N9 = {},
  wct = hR,
  kct = Math.max,
  Ict = Math.min,
  FL = function (t, e) {
    var n = wct(t);
    return n < 0 ? kct(n + e, 0) : Ict(n, e);
  },
  Dct = pm,
  Pct = FL,
  Mct = Yp,
  tge = function (t) {
    return function (e, n, r) {
      var i,
        o = Dct(e),
        l = Mct(o),
        u = Pct(r, l);
      if (t && n != n) {
        for (; l > u; ) if ((i = o[u++]) != i) return !0;
      } else
        for (; l > u; u++) if ((t || u in o) && o[u] === n) return t || u || 0;
      return !t && -1;
    };
  },
  xoe = { includes: tge(!0), indexOf: tge(!1) },
  UL = {},
  Cct = Bo,
  V7 = kl,
  $ct = pm,
  xct = xoe.indexOf,
  Lct = UL,
  nge = Cct([].push),
  hNe = function (t, e) {
    var n,
      r = $ct(t),
      i = 0,
      o = [];
    for (n in r) !V7(Lct, n) && V7(r, n) && nge(o, n);
    for (; e.length > i; ) V7(r, (n = e[i++])) && (~xct(o, n) || nge(o, n));
    return o;
  },
  Loe = [
    "constructor",
    "hasOwnProperty",
    "isPrototypeOf",
    "propertyIsEnumerable",
    "toLocaleString",
    "toString",
    "valueOf",
  ],
  Oct = hNe,
  Gct = Loe,
  BL =
    Object.keys ||
    function (t) {
      return Oct(t, Gct);
    },
  Nct = wu,
  Fct = rNe,
  Uct = Zp,
  Bct = xc,
  Hct = pm,
  Xct = BL;
N9.f =
  Nct && !Fct
    ? Object.defineProperties
    : function (t, e) {
        Bct(t);
        for (var n, r = Hct(e), i = Xct(e), o = i.length, l = 0; o > l; )
          Uct.f(t, (n = i[l++]), r[n]);
        return t;
      };
var CG,
  Vct = $c,
  fNe = Vct("document", "documentElement"),
  zct = TD,
  jct = L9,
  rge = zct("keys"),
  F9 = function (t) {
    return rge[t] || (rge[t] = jct(t));
  },
  Wct = xc,
  Kct = N9,
  ige = Loe,
  Zct = UL,
  Yct = fNe,
  Qct = Ioe,
  Jct = F9,
  age = ">",
  oge = "<",
  Yq = "prototype",
  Qq = "script",
  pNe = Jct("IE_PROTO"),
  z7 = function () {},
  gNe = function (t) {
    return oge + Qq + age + t + oge + "/" + Qq + age;
  },
  sge = function (t) {
    t.write(gNe("")), t.close();
    var e = t.parentWindow.Object;
    return (t = null), e;
  },
  qct = function () {
    var t,
      e = Qct("iframe"),
      n = "java" + Qq + ":";
    return (
      (e.style.display = "none"),
      Yct.appendChild(e),
      (e.src = String(n)),
      (t = e.contentWindow.document).open(),
      t.write(gNe("document.F=Object")),
      t.close(),
      t.F
    );
  },
  uF = function () {
    try {
      CG = new ActiveXObject("htmlfile");
    } catch {}
    uF =
      typeof document < "u"
        ? document.domain && CG
          ? sge(CG)
          : qct()
        : sge(CG);
    for (var t = ige.length; t--; ) delete uF[Yq][ige[t]];
    return uF();
  };
Zct[pNe] = !0;
var _E =
    Object.create ||
    function (t, e) {
      var n;
      return (
        t !== null
          ? ((z7[Yq] = Wct(t)), (n = new z7()), (z7[Yq] = null), (n[pNe] = t))
          : (n = uF()),
        e === void 0 ? n : Kct.f(n, e)
      );
    },
  HL = {},
  edt = hNe,
  tdt = Loe,
  ndt = tdt.concat("length", "prototype");
HL.f =
  Object.getOwnPropertyNames ||
  function (t) {
    return edt(t, ndt);
  };
var U9 = {},
  lge = FL,
  rdt = Yp,
  idt = fR,
  adt = Array,
  odt = Math.max,
  Ooe = function (t, e, n) {
    for (
      var r = rdt(t),
        i = lge(e, r),
        o = lge(n === void 0 ? r : n, r),
        l = adt(odt(o - i, 0)),
        u = 0;
      i < o;
      i++, u++
    )
      idt(l, u, t[i]);
    return (l.length = u), l;
  },
  sdt = ub,
  ldt = pm,
  mNe = HL.f,
  udt = Ooe,
  yNe =
    typeof window == "object" && window && Object.getOwnPropertyNames
      ? Object.getOwnPropertyNames(window)
      : [],
  cdt = function (t) {
    try {
      return mNe(t);
    } catch {
      return udt(yNe);
    }
  };
U9.f = function (t) {
  return yNe && sdt(t) == "Window" ? cdt(t) : mNe(ldt(t));
};
var XL = {};
XL.f = Object.getOwnPropertySymbols;
var ddt = db,
  TE = function (t, e, n, r) {
    return r && r.enumerable ? (t[e] = n) : ddt(t, e, n), t;
  },
  hdt = Zp,
  VL = function (t, e, n) {
    return hdt.f(t, e, n);
  },
  pR = {},
  fdt = nl;
pR.f = fdt;
var F6,
  cx,
  U6,
  uge = za,
  pdt = kl,
  gdt = pR,
  mdt = Zp.f,
  Du = function (t) {
    var e = uge.Symbol || (uge.Symbol = {});
    pdt(e, t) || mdt(e, t, { value: gdt.f(t) });
  },
  ydt = ts,
  vdt = $c,
  bdt = nl,
  _dt = TE,
  vNe = function () {
    var t = vdt("Symbol"),
      e = t && t.prototype,
      n = e && e.valueOf,
      r = bdt("toPrimitive");
    e &&
      !e[r] &&
      _dt(
        e,
        r,
        function (i) {
          return ydt(n, this);
        },
        { arity: 1 }
      );
  },
  Tdt = Moe,
  Edt = L0,
  Sdt = Tdt
    ? {}.toString
    : function () {
        return "[object " + Edt(this) + "]";
      },
  Rdt = Moe,
  Adt = Zp.f,
  wdt = db,
  kdt = kl,
  Idt = Sdt,
  Ddt = nl,
  cge = Ddt("toStringTag"),
  hb = function (t, e, n, r) {
    if (t) {
      var i = n ? t : t.prototype;
      kdt(i, cge) || Adt(i, cge, { configurable: !0, value: e }),
        r && !Rdt && wdt(i, "toString", Idt);
    }
  },
  Pdt = yl,
  Mdt = vl,
  dge = Pdt.WeakMap,
  Cdt = Mdt(dge) && /native code/.test(String(dge)),
  $dt = Cdt,
  bNe = yl,
  xdt = Bl,
  Ldt = db,
  j7 = kl,
  W7 = koe,
  Odt = F9,
  Gdt = UL,
  hge = "Object already initialized",
  Jq = bNe.TypeError,
  Ndt = bNe.WeakMap,
  Fdt = function (t) {
    return U6(t) ? cx(t) : F6(t, {});
  },
  Udt = function (t) {
    return function (e) {
      var n;
      if (!xdt(e) || (n = cx(e)).type !== t)
        throw Jq("Incompatible receiver, " + t + " required");
      return n;
    };
  };
if ($dt || W7.state) {
  var fy = W7.state || (W7.state = new Ndt());
  (fy.get = fy.get),
    (fy.has = fy.has),
    (fy.set = fy.set),
    (F6 = function (t, e) {
      if (fy.has(t)) throw Jq(hge);
      return (e.facade = t), fy.set(t, e), e;
    }),
    (cx = function (t) {
      return fy.get(t) || {};
    }),
    (U6 = function (t) {
      return fy.has(t);
    });
} else {
  var EA = Odt("state");
  (Gdt[EA] = !0),
    (F6 = function (t, e) {
      if (j7(t, EA)) throw Jq(hge);
      return (e.facade = t), Ldt(t, EA, e), e;
    }),
    (cx = function (t) {
      return j7(t, EA) ? t[EA] : {};
    }),
    (U6 = function (t) {
      return j7(t, EA);
    });
}
var EE = { set: F6, get: cx, has: U6, enforce: Fdt, getterFor: Udt },
  Bdt = Iu,
  Hdt = Bo,
  Xdt = x9,
  Vdt = Ff,
  zdt = Yp,
  jdt = $oe,
  fge = Hdt([].push),
  O_ = function (t) {
    var e = t == 1,
      n = t == 2,
      r = t == 3,
      i = t == 4,
      o = t == 6,
      l = t == 7,
      u = t == 5 || o;
    return function (c, d, h, f) {
      for (
        var p,
          g,
          y = Vdt(c),
          v = Xdt(y),
          b = Bdt(d, h),
          w = zdt(v),
          k = 0,
          D = f || jdt,
          $ = e ? D(c, w) : n || l ? D(c, 0) : void 0;
        w > k;
        k++
      )
        if ((u || k in v) && ((g = b((p = v[k]), k, y)), t))
          if (e) $[k] = g;
          else if (g)
            switch (t) {
              case 3:
                return !0;
              case 5:
                return p;
              case 6:
                return k;
              case 2:
                fge($, p);
            }
          else
            switch (t) {
              case 4:
                return !1;
              case 7:
                fge($, p);
            }
      return o ? -1 : r || i ? i : $;
    };
  },
  gR = {
    forEach: O_(0),
    map: O_(1),
    filter: O_(2),
    some: O_(3),
    every: O_(4),
    find: O_(5),
    findIndex: O_(6),
    filterReject: O_(7),
  },
  $G = ur,
  Goe = yl,
  Noe = ts,
  Wdt = Bo,
  jk = wu,
  SA = _D,
  Kdt = So,
  Zc = kl,
  Zdt = Es,
  qq = xc,
  B9 = pm,
  Foe = O9,
  Ydt = td,
  eee = mE,
  dx = _E,
  _Ne = BL,
  Qdt = HL,
  TNe = U9,
  Jdt = XL,
  ENe = cb,
  SNe = Zp,
  qdt = N9,
  RNe = LL,
  pge = TE,
  eht = VL,
  Uoe = TD,
  tht = F9,
  ANe = UL,
  gge = L9,
  nht = nl,
  rht = pR,
  iht = Du,
  aht = vNe,
  oht = hb,
  wNe = EE,
  H9 = gR.forEach,
  yf = tht("hidden"),
  B6 = "Symbol",
  hx = "prototype",
  sht = wNe.set,
  mge = wNe.getterFor(B6),
  A0 = Object[hx],
  uk = Goe.Symbol,
  cF = uk && uk[hx],
  lht = Goe.TypeError,
  K7 = Goe.QObject,
  kNe = ENe.f,
  tS = SNe.f,
  INe = TNe.f,
  uht = RNe.f,
  DNe = Wdt([].push),
  j1 = Uoe("symbols"),
  zL = Uoe("op-symbols"),
  cht = Uoe("wks"),
  Z7 = !K7 || !K7[hx] || !K7[hx].findChild,
  tee =
    jk &&
    Kdt(function () {
      return (
        dx(
          tS({}, "a", {
            get: function () {
              return tS(this, "a", { value: 7 }).a;
            },
          })
        ).a != 7
      );
    })
      ? function (t, e, n) {
          var r = kNe(A0, e);
          r && delete A0[e], tS(t, e, n), r && t !== A0 && tS(A0, e, r);
        }
      : tS,
  Y7 = function (t, e) {
    var n = (j1[t] = dx(cF));
    return (
      sht(n, { type: B6, tag: t, description: e }), jk || (n.description = e), n
    );
  },
  H6 = function (t, e, n) {
    t === A0 && H6(zL, e, n), qq(t);
    var r = Foe(e);
    return (
      qq(n),
      Zc(j1, r)
        ? (n.enumerable
            ? (Zc(t, yf) && t[yf][r] && (t[yf][r] = !1),
              (n = dx(n, { enumerable: eee(0, !1) })))
            : (Zc(t, yf) || tS(t, yf, eee(1, {})), (t[yf][r] = !0)),
          tee(t, r, n))
        : tS(t, r, n)
    );
  },
  nee = function (t, e) {
    qq(t);
    var n = B9(e),
      r = _Ne(n).concat(MNe(n));
    return (
      H9(r, function (i) {
        (jk && !Noe(PNe, n, i)) || H6(t, i, n[i]);
      }),
      t
    );
  },
  dht = function (t, e) {
    return e === void 0 ? dx(t) : nee(dx(t), e);
  },
  PNe = function (t) {
    var e = Foe(t),
      n = Noe(uht, this, e);
    return (
      !(this === A0 && Zc(j1, e) && !Zc(zL, e)) &&
      (!(n || !Zc(this, e) || !Zc(j1, e) || (Zc(this, yf) && this[yf][e])) || n)
    );
  },
  yge = function (t, e) {
    var n = B9(t),
      r = Foe(e);
    if (n !== A0 || !Zc(j1, r) || Zc(zL, r)) {
      var i = kNe(n, r);
      return (
        !i || !Zc(j1, r) || (Zc(n, yf) && n[yf][r]) || (i.enumerable = !0), i
      );
    }
  },
  vge = function (t) {
    var e = INe(B9(t)),
      n = [];
    return (
      H9(e, function (r) {
        Zc(j1, r) || Zc(ANe, r) || DNe(n, r);
      }),
      n
    );
  },
  MNe = function (t) {
    var e = t === A0,
      n = INe(e ? zL : B9(t)),
      r = [];
    return (
      H9(n, function (i) {
        !Zc(j1, i) || (e && !Zc(A0, i)) || DNe(r, j1[i]);
      }),
      r
    );
  };
SA ||
  (pge(
    (cF = (uk = function () {
      if (Zdt(cF, this)) throw lht("Symbol is not a constructor");
      var t =
          arguments.length && arguments[0] !== void 0
            ? Ydt(arguments[0])
            : void 0,
        e = gge(t),
        n = function (r) {
          this === A0 && Noe(n, zL, r),
            Zc(this, yf) && Zc(this[yf], e) && (this[yf][e] = !1),
            tee(this, e, eee(1, r));
        };
      return jk && Z7 && tee(A0, e, { configurable: !0, set: n }), Y7(e, t);
    })[hx]),
    "toString",
    function () {
      return mge(this).tag;
    }
  ),
  pge(uk, "withoutSetter", function (t) {
    return Y7(gge(t), t);
  }),
  (RNe.f = PNe),
  (SNe.f = H6),
  (qdt.f = nee),
  (ENe.f = yge),
  (Qdt.f = TNe.f = vge),
  (Jdt.f = MNe),
  (rht.f = function (t) {
    return Y7(nht(t), t);
  }),
  jk &&
    eht(cF, "description", {
      configurable: !0,
      get: function () {
        return mge(this).description;
      },
    })),
  $G(
    { global: !0, constructor: !0, wrap: !0, forced: !SA, sham: !SA },
    { Symbol: uk }
  ),
  H9(_Ne(cht), function (t) {
    iht(t);
  }),
  $G(
    { target: B6, stat: !0, forced: !SA },
    {
      useSetter: function () {
        Z7 = !0;
      },
      useSimple: function () {
        Z7 = !1;
      },
    }
  ),
  $G(
    { target: "Object", stat: !0, forced: !SA, sham: !jk },
    {
      create: dht,
      defineProperty: H6,
      defineProperties: nee,
      getOwnPropertyDescriptor: yge,
    }
  ),
  $G({ target: "Object", stat: !0, forced: !SA }, { getOwnPropertyNames: vge }),
  aht(),
  oht(uk, B6),
  (ANe[yf] = !0);
var hht = _D,
  CNe = hht && !!Symbol.for && !!Symbol.keyFor,
  fht = ur,
  pht = $c,
  ght = kl,
  mht = td,
  $Ne = TD,
  yht = CNe,
  Q7 = $Ne("string-to-symbol-registry"),
  vht = $Ne("symbol-to-string-registry");
fht(
  { target: "Symbol", stat: !0, forced: !yht },
  {
    for: function (t) {
      var e = mht(t);
      if (ght(Q7, e)) return Q7[e];
      var n = pht("Symbol")(e);
      return (Q7[e] = n), (vht[n] = e), n;
    },
  }
);
var bht = ur,
  _ht = kl,
  Tht = OL,
  Eht = bE,
  Sht = TD,
  Rht = CNe,
  bge = Sht("symbol-to-string-registry");
bht(
  { target: "Symbol", stat: !0, forced: !Rht },
  {
    keyFor: function (t) {
      if (!Tht(t)) throw TypeError(Eht(t) + " is not a symbol");
      if (_ht(bge, t)) return bge[t];
    },
  }
);
var Aht = Bo,
  jL = Aht([].slice),
  wht = Bo,
  _ge = dR,
  kht = vl,
  Tge = ub,
  Iht = td,
  Ege = wht([].push),
  Dht = function (t) {
    if (kht(t)) return t;
    if (_ge(t)) {
      for (var e = t.length, n = [], r = 0; r < e; r++) {
        var i = t[r];
        typeof i == "string"
          ? Ege(n, i)
          : (typeof i != "number" &&
              Tge(i) != "Number" &&
              Tge(i) != "String") ||
            Ege(n, Iht(i));
      }
      var o = n.length,
        l = !0;
      return function (u, c) {
        if (l) return (l = !1), c;
        if (_ge(this)) return c;
        for (var d = 0; d < o; d++) if (n[d] === u) return c;
      };
    }
  },
  Pht = ur,
  xNe = $c,
  LNe = uR,
  Mht = ts,
  WL = Bo,
  ONe = So,
  Sge = vl,
  Rge = OL,
  GNe = jL,
  Cht = Dht,
  $ht = _D,
  xht = String,
  GT = xNe("JSON", "stringify"),
  xG = WL(/./.exec),
  Age = WL("".charAt),
  Lht = WL("".charCodeAt),
  Oht = WL("".replace),
  Ght = WL((1).toString),
  Nht = /[\uD800-\uDFFF]/g,
  wge = /^[\uD800-\uDBFF]$/,
  kge = /^[\uDC00-\uDFFF]$/,
  Ige =
    !$ht ||
    ONe(function () {
      var t = xNe("Symbol")();
      return (
        GT([t]) != "[null]" || GT({ a: t }) != "{}" || GT(Object(t)) != "{}"
      );
    }),
  Dge = ONe(function () {
    return (
      GT("\uDF06\uD834") !== '"\\udf06\\ud834"' || GT("\uDEAD") !== '"\\udead"'
    );
  }),
  Fht = function (t, e) {
    var n = GNe(arguments),
      r = Cht(e);
    if (Sge(r) || (t !== void 0 && !Rge(t)))
      return (
        (n[1] = function (i, o) {
          if ((Sge(r) && (o = Mht(r, this, xht(i), o)), !Rge(o))) return o;
        }),
        LNe(GT, null, n)
      );
  },
  Uht = function (t, e, n) {
    var r = Age(n, e - 1),
      i = Age(n, e + 1);
    return (xG(wge, t) && !xG(kge, i)) || (xG(kge, t) && !xG(wge, r))
      ? "\\u" + Ght(Lht(t, 0), 16)
      : t;
  };
GT &&
  Pht(
    { target: "JSON", stat: !0, arity: 3, forced: Ige || Dge },
    {
      stringify: function (t, e, n) {
        var r = GNe(arguments),
          i = LNe(Ige ? Fht : GT, null, r);
        return Dge && typeof i == "string" ? Oht(i, Nht, Uht) : i;
      },
    }
  );
var Bht = ur,
  Hht = _D,
  Xht = So,
  NNe = XL,
  Vht = Ff,
  zht =
    !Hht ||
    Xht(function () {
      NNe.f(1);
    });
Bht(
  { target: "Object", stat: !0, forced: zht },
  {
    getOwnPropertySymbols: function (t) {
      var e = NNe.f;
      return e ? e(Vht(t)) : [];
    },
  }
);
var jht = Du;
jht("asyncIterator");
var Wht = Du;
Wht("hasInstance");
var Kht = Du;
Kht("isConcatSpreadable");
var Zht = Du;
Zht("iterator");
var Yht = Du;
Yht("match");
var Qht = Du;
Qht("matchAll");
var Jht = Du;
Jht("replace");
var qht = Du;
qht("search");
var eft = Du;
eft("species");
var tft = Du;
tft("split");
var nft = Du,
  rft = vNe;
nft("toPrimitive"), rft();
var ift = $c,
  aft = Du,
  oft = hb;
aft("toStringTag"), oft(ift("Symbol"), "Symbol");
var sft = Du;
sft("unscopables");
var lft = yl,
  uft = hb;
uft(lft.JSON, "JSON", !0);
var wS,
  Pge,
  Mge,
  cft = za,
  dft = cft.Symbol,
  mR = {},
  ree = wu,
  hft = kl,
  FNe = Function.prototype,
  fft = ree && Object.getOwnPropertyDescriptor,
  Boe = hft(FNe, "name"),
  pft = Boe && function () {}.name === "something",
  gft = Boe && (!ree || (ree && fft(FNe, "name").configurable)),
  UNe = { EXISTS: Boe, PROPER: pft, CONFIGURABLE: gft },
  mft = So,
  BNe = !mft(function () {
    function t() {}
    return (
      (t.prototype.constructor = null),
      Object.getPrototypeOf(new t()) !== t.prototype
    );
  }),
  yft = kl,
  vft = vl,
  bft = Ff,
  _ft = F9,
  Tft = BNe,
  Cge = _ft("IE_PROTO"),
  iee = Object,
  Eft = iee.prototype,
  KL = Tft
    ? iee.getPrototypeOf
    : function (t) {
        var e = bft(t);
        if (yft(e, Cge)) return e[Cge];
        var n = e.constructor;
        return vft(n) && e instanceof n
          ? n.prototype
          : e instanceof iee
          ? Eft
          : null;
      },
  Sft = So,
  Rft = vl,
  Aft = Bl,
  wft = _E,
  $ge = KL,
  kft = TE,
  Ift = nl,
  aee = Ift("iterator"),
  HNe = !1;
[].keys &&
  ("next" in (Mge = [].keys())
    ? (Pge = $ge($ge(Mge))) !== Object.prototype && (wS = Pge)
    : (HNe = !0));
var Dft =
  !Aft(wS) ||
  Sft(function () {
    var t = {};
    return wS[aee].call(t) !== t;
  });
Rft((wS = Dft ? {} : wft(wS))[aee]) ||
  kft(wS, aee, function () {
    return this;
  });
var XNe = { IteratorPrototype: wS, BUGGY_SAFARI_ITERATORS: HNe },
  Pft = XNe.IteratorPrototype,
  Mft = _E,
  Cft = mE,
  $ft = hb,
  xft = mR,
  Lft = function () {
    return this;
  },
  VNe = function (t, e, n, r) {
    var i = e + " Iterator";
    return (
      (t.prototype = Mft(Pft, { next: Cft(+!r, n) })),
      $ft(t, i, !1, !0),
      (xft[i] = Lft),
      t
    );
  },
  Oft = Bo,
  Gft = ku,
  Nft = function (t, e, n) {
    try {
      return Oft(Gft(Object.getOwnPropertyDescriptor(t, e)[n]));
    } catch {}
  },
  Fft = vl,
  Uft = String,
  Bft = TypeError,
  Hft = function (t) {
    if (typeof t == "object" || Fft(t)) return t;
    throw Bft("Can't set " + Uft(t) + " as a prototype");
  },
  Xft = Nft,
  Vft = xc,
  zft = Hft,
  zNe =
    Object.setPrototypeOf ||
    ("__proto__" in {}
      ? (function () {
          var t,
            e = !1,
            n = {};
          try {
            (t = Xft(Object.prototype, "__proto__", "set"))(n, []),
              (e = n instanceof Array);
          } catch {}
          return function (r, i) {
            return Vft(r), zft(i), e ? t(r, i) : (r.__proto__ = i), r;
          };
        })()
      : void 0),
  jft = ur,
  Wft = ts,
  Kft = UNe,
  Zft = VNe,
  Yft = KL,
  Qft = hb,
  xge = TE,
  Jft = nl,
  Lge = mR,
  qft = XNe,
  ept = Kft.PROPER,
  LG = qft.BUGGY_SAFARI_ITERATORS,
  J7 = Jft("iterator"),
  Oge = "keys",
  OG = "values",
  Gge = "entries",
  tpt = function () {
    return this;
  },
  Hoe = function (t, e, n, r, i, o, l) {
    Zft(n, e, r);
    var u,
      c,
      d,
      h = function (w) {
        if (w === i && v) return v;
        if (!LG && w in g) return g[w];
        switch (w) {
          case Oge:
          case OG:
          case Gge:
            return function () {
              return new n(this, w);
            };
        }
        return function () {
          return new n(this);
        };
      },
      f = e + " Iterator",
      p = !1,
      g = t.prototype,
      y = g[J7] || g["@@iterator"] || (i && g[i]),
      v = (!LG && y) || h(i),
      b = (e == "Array" && g.entries) || y;
    if (
      (b &&
        (u = Yft(b.call(new t()))) !== Object.prototype &&
        u.next &&
        (Qft(u, f, !0, !0), (Lge[f] = tpt)),
      ept &&
        i == OG &&
        y &&
        y.name !== OG &&
        ((p = !0),
        (v = function () {
          return Wft(y, this);
        })),
      i)
    )
      if (((c = { values: h(OG), keys: o ? v : h(Oge), entries: h(Gge) }), l))
        for (d in c) (LG || p || !(d in g)) && xge(g, d, c[d]);
      else jft({ target: e, proto: !0, forced: LG || p }, c);
    return l && g[J7] !== v && xge(g, J7, v, { name: i }), (Lge[e] = v), c;
  },
  Xoe = function (t, e) {
    return { value: t, done: e };
  },
  npt = pm,
  Nge = mR,
  jNe = EE;
Zp.f;
var rpt = Hoe,
  Fge = Xoe,
  WNe = "Array Iterator",
  ipt = jNe.set,
  apt = jNe.getterFor(WNe);
rpt(
  Array,
  "Array",
  function (t, e) {
    ipt(this, { type: WNe, target: npt(t), index: 0, kind: e });
  },
  function () {
    var t = apt(this),
      e = t.target,
      n = t.kind,
      r = t.index++;
    return !e || r >= e.length
      ? ((t.target = void 0), Fge(void 0, !0))
      : Fge(n == "keys" ? r : n == "values" ? e[r] : [r, e[r]], !1);
  },
  "values"
),
  (Nge.Arguments = Nge.Array);
var opt = {
    CSSRuleList: 0,
    CSSStyleDeclaration: 0,
    CSSValueList: 0,
    ClientRectList: 0,
    DOMRectList: 0,
    DOMStringList: 0,
    DOMTokenList: 1,
    DataTransferItemList: 0,
    FileList: 0,
    HTMLAllCollection: 0,
    HTMLCollection: 0,
    HTMLFormElement: 0,
    HTMLSelectElement: 0,
    MediaList: 0,
    MimeTypeArray: 0,
    NamedNodeMap: 0,
    NodeList: 1,
    PaintRequestList: 0,
    Plugin: 0,
    PluginArray: 0,
    SVGLengthList: 0,
    SVGNumberList: 0,
    SVGPathSegList: 0,
    SVGPointList: 0,
    SVGStringList: 0,
    SVGTransformList: 0,
    SourceBufferList: 0,
    StyleSheetList: 0,
    TextTrackCueList: 0,
    TextTrackList: 0,
    TouchList: 0,
  },
  spt = opt,
  lpt = yl,
  upt = L0,
  cpt = db,
  Uge = mR,
  dpt = nl,
  Bge = dpt("toStringTag");
for (var q7 in spt) {
  var Hge = lpt[q7],
    eX = Hge && Hge.prototype;
  eX && upt(eX) !== Bge && cpt(eX, Bge, q7), (Uge[q7] = Uge.Array);
}
var hpt = dft,
  fpt = hpt,
  ppt = Du;
ppt("dispose");
var gpt = fpt,
  mpt = gpt,
  ypt = Du;
ypt("asyncDispose");
var vpt = ur,
  bpt = $c,
  _pt = Bo,
  KNe = bpt("Symbol"),
  Tpt = KNe.keyFor,
  Ept = _pt(KNe.prototype.valueOf);
vpt(
  { target: "Symbol", stat: !0 },
  {
    isRegistered: function (t) {
      try {
        return Tpt(Ept(t)) !== void 0;
      } catch {
        return !1;
      }
    },
  }
);
for (
  var Spt = ur,
    Rpt = TD,
    Xge = $c,
    Apt = Bo,
    wpt = OL,
    kpt = nl,
    GG = Xge("Symbol"),
    Vge = GG.isWellKnown,
    ZNe = Xge("Object", "getOwnPropertyNames"),
    Ipt = Apt(GG.prototype.valueOf),
    zge = Rpt("wks"),
    tX = 0,
    jge = ZNe(GG),
    Dpt = jge.length;
  tX < Dpt;
  tX++
)
  try {
    var Wge = jge[tX];
    wpt(GG[Wge]) && kpt(Wge);
  } catch {}
Spt(
  { target: "Symbol", stat: !0, forced: !0 },
  {
    isWellKnown: function (t) {
      if (Vge && Vge(t)) return !0;
      try {
        for (var e = Ipt(t), n = 0, r = ZNe(zge), i = r.length; n < i; n++)
          if (zge[r[n]] == e) return !0;
      } catch {}
      return !1;
    },
  }
);
var Ppt = Du;
Ppt("matcher");
var Mpt = Du;
Mpt("metadataKey");
var Cpt = Du;
Cpt("observable");
var $pt = Du;
$pt("metadata");
var xpt = Du;
xpt("patternMatch");
var Lpt = Du;
Lpt("replaceAll");
var Opt = mpt,
  Gpt = Opt,
  YNe = Gpt,
  G1 = xr(YNe),
  Voe = Bo,
  Npt = hR,
  Fpt = td,
  Upt = yE,
  Bpt = Voe("".charAt),
  Kge = Voe("".charCodeAt),
  Hpt = Voe("".slice),
  Zge = function (t) {
    return function (e, n) {
      var r,
        i,
        o = Fpt(Upt(e)),
        l = Npt(n),
        u = o.length;
      return l < 0 || l >= u
        ? t
          ? ""
          : void 0
        : (r = Kge(o, l)) < 55296 ||
          r > 56319 ||
          l + 1 === u ||
          (i = Kge(o, l + 1)) < 56320 ||
          i > 57343
        ? t
          ? Bpt(o, l)
          : r
        : t
        ? Hpt(o, l, l + 2)
        : i - 56320 + ((r - 55296) << 10) + 65536;
    };
  },
  QNe = { codeAt: Zge(!1), charAt: Zge(!0) },
  Xpt = QNe.charAt,
  Vpt = td,
  JNe = EE,
  zpt = Hoe,
  Yge = Xoe,
  qNe = "String Iterator",
  jpt = JNe.set,
  Wpt = JNe.getterFor(qNe);
zpt(
  String,
  "String",
  function (t) {
    jpt(this, { type: qNe, string: Vpt(t), index: 0 });
  },
  function () {
    var t,
      e = Wpt(this),
      n = e.string,
      r = e.index;
    return r >= n.length
      ? Yge(void 0, !0)
      : ((t = Xpt(n, r)), (e.index += t.length), Yge(t, !1));
  }
);
var Kpt = pR,
  Zpt = Kpt.f("iterator"),
  Ypt = Zpt,
  Qpt = Ypt,
  Jpt = Qpt,
  qpt = Jpt,
  egt = qpt,
  tgt = egt,
  eFe = tgt,
  ngt = xr(eFe);
function ti(t) {
  return (ti =
    typeof G1 == "function" && typeof ngt == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof G1 == "function" &&
            e.constructor === G1 &&
            e !== G1.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
var tFe = { exports: {} },
  rgt = ur,
  igt = wu,
  Qge = Zp.f;
rgt(
  {
    target: "Object",
    stat: !0,
    forced: Object.defineProperty !== Qge,
    sham: !igt,
  },
  { defineProperty: Qge }
);
var agt = za,
  nFe = agt.Object,
  ogt = (tFe.exports = function (t, e, n) {
    return nFe.defineProperty(t, e, n);
  });
nFe.defineProperty.sham && (ogt.sham = !0);
var sgt = tFe.exports,
  lgt = sgt,
  ugt = lgt,
  cgt = ugt,
  dgt = cgt,
  hgt = dgt,
  fgt = hgt,
  rFe = fgt,
  FS = xr(rFe),
  pgt = ur,
  ggt = wu,
  mgt = _E;
pgt({ target: "Object", stat: !0, sham: !ggt }, { create: mgt });
var ygt = za,
  vgt = ygt.Object,
  bgt = function (t, e) {
    return vgt.create(t, e);
  },
  _gt = bgt,
  Tgt = _gt,
  Egt = Tgt,
  Sgt = Egt,
  Rgt = Sgt,
  Agt = Rgt,
  wgt = Agt,
  LC = xr(wgt),
  kgt = ur,
  Igt = So,
  Dgt = Ff,
  iFe = KL,
  Pgt = BNe,
  Mgt = Igt(function () {
    iFe(1);
  });
kgt(
  { target: "Object", stat: !0, forced: Mgt, sham: !Pgt },
  {
    getPrototypeOf: function (t) {
      return iFe(Dgt(t));
    },
  }
);
var Cgt = za,
  $gt = Cgt.Object.getPrototypeOf,
  xgt = $gt,
  Lgt = xgt,
  Ogt = Lgt,
  Ggt = Ogt,
  Ngt = Ggt,
  Fgt = Ngt,
  aFe = Fgt,
  OC = xr(aFe),
  Ugt = So,
  ZL = function (t, e) {
    var n = [][t];
    return (
      !!n &&
      Ugt(function () {
        n.call(
          null,
          e ||
            function () {
              return 1;
            },
          1
        );
      })
    );
  },
  Bgt = gR.forEach,
  Hgt = ZL,
  Xgt = Hgt("forEach"),
  Jge = Xgt
    ? [].forEach
    : function (t) {
        return Bgt(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
  Vgt = ur;
Vgt(
  { target: "Array", proto: !0, forced: [].forEach != Jge },
  { forEach: Jge }
);
var zgt = za,
  Il = function (t) {
    return zgt[t + "Prototype"];
  },
  jgt = Il,
  Wgt = jgt("Array").forEach,
  Kgt = Wgt,
  Zgt = Kgt,
  Ygt = L0,
  Qgt = kl,
  Jgt = Es,
  qgt = Zgt,
  nX = Array.prototype,
  emt = { DOMTokenList: !0, NodeList: !0 },
  tmt = function (t) {
    var e = t.forEach;
    return t === nX || (Jgt(nX, t) && e === nX.forEach) || Qgt(emt, Ygt(t))
      ? qgt
      : e;
  },
  nmt = tmt,
  rmt = nmt,
  imt = rmt,
  amt = imt,
  omt = amt,
  GC = xr(omt),
  smt = wu,
  lmt = dR,
  umt = TypeError,
  cmt = Object.getOwnPropertyDescriptor,
  dmt =
    smt &&
    !(function () {
      if (this !== void 0) return !0;
      try {
        Object.defineProperty([], "length", { writable: !1 }).length = 1;
      } catch (t) {
        return t instanceof TypeError;
      }
    })(),
  oFe = dmt
    ? function (t, e) {
        if (lmt(t) && !cmt(t, "length").writable)
          throw umt("Cannot set read only .length");
        return (t.length = e);
      }
    : function (t, e) {
        return (t.length = e);
      },
  hmt = ur,
  fmt = Ff,
  pmt = Yp,
  gmt = oFe,
  mmt = Poe,
  ymt = So,
  vmt = ymt(function () {
    return [].push.call({ length: 4294967296 }, 1) !== 4294967297;
  }),
  bmt = function () {
    try {
      Object.defineProperty([], "length", { writable: !1 }).push();
    } catch (t) {
      return t instanceof TypeError;
    }
  },
  _mt = vmt || !bmt();
hmt(
  { target: "Array", proto: !0, arity: 1, forced: _mt },
  {
    push: function (t) {
      var e = fmt(this),
        n = pmt(e),
        r = arguments.length;
      mmt(n + r);
      for (var i = 0; i < r; i++) (e[n] = arguments[i]), n++;
      return gmt(e, n), n;
    },
  }
);
var Tmt = Il,
  Emt = Tmt("Array").push,
  Smt = Es,
  Rmt = Emt,
  rX = Array.prototype,
  Amt = function (t) {
    var e = t.push;
    return t === rX || (Smt(rX, t) && e === rX.push) ? Rmt : e;
  },
  wmt = Amt,
  kmt = wmt,
  Imt = kmt,
  Dmt = Imt,
  Pmt = Dmt,
  Mmt = Pmt,
  Cmt = Mmt,
  fx = xr(Cmt),
  $mt = ur,
  xmt = zNe;
$mt({ target: "Object", stat: !0 }, { setPrototypeOf: xmt });
var Lmt = za,
  Omt = Lmt.Object.setPrototypeOf,
  Gmt = Omt,
  Nmt = Gmt,
  Fmt = Nmt,
  Umt = Fmt,
  Bmt = Umt,
  Hmt = Bmt,
  sFe = Hmt,
  px = xr(sFe),
  Xmt = $c,
  Vmt = Bo,
  zmt = HL,
  jmt = XL,
  Wmt = xc,
  Kmt = Vmt([].concat),
  lFe =
    Xmt("Reflect", "ownKeys") ||
    function (t) {
      var e = zmt.f(Wmt(t)),
        n = jmt.f;
      return n ? Kmt(e, n(t)) : e;
    },
  qge = kl,
  Zmt = lFe,
  Ymt = cb,
  Qmt = Zp,
  Jmt = function (t, e, n) {
    for (var r = Zmt(e), i = Qmt.f, o = Ymt.f, l = 0; l < r.length; l++) {
      var u = r[l];
      qge(t, u) || (n && qge(n, u)) || i(t, u, o(e, u));
    }
  },
  qmt = Bl,
  e0t = db,
  t0t = function (t, e) {
    qmt(e) && "cause" in e && e0t(t, "cause", e.cause);
  },
  n0t = Bo,
  uFe = Error,
  r0t = n0t("".replace),
  i0t = String(uFe("zxcasd").stack),
  cFe = /\n\s*at [^:]*:[^\n]*/,
  a0t = cFe.test(i0t),
  o0t = function (t, e) {
    if (a0t && typeof t == "string" && !uFe.prepareStackTrace)
      for (; e--; ) t = r0t(t, cFe, "");
    return t;
  },
  s0t = So,
  l0t = mE,
  u0t = !s0t(function () {
    var t = Error("a");
    return (
      !("stack" in t) ||
      (Object.defineProperty(t, "stack", l0t(1, 7)), t.stack !== 7)
    );
  }),
  c0t = db,
  d0t = o0t,
  h0t = u0t,
  eme = Error.captureStackTrace,
  f0t = function (t, e, n, r) {
    h0t && (eme ? eme(t, e) : c0t(t, "stack", d0t(n, r)));
  },
  p0t = nl,
  g0t = mR,
  m0t = p0t("iterator"),
  y0t = Array.prototype,
  dFe = function (t) {
    return t !== void 0 && (g0t.Array === t || y0t[m0t] === t);
  },
  v0t = L0,
  tme = woe,
  b0t = cR,
  _0t = mR,
  T0t = nl,
  E0t = T0t("iterator"),
  YL = function (t) {
    if (!b0t(t)) return tme(t, E0t) || tme(t, "@@iterator") || _0t[v0t(t)];
  },
  S0t = ts,
  R0t = ku,
  A0t = xc,
  w0t = bE,
  k0t = YL,
  I0t = TypeError,
  zoe = function (t, e) {
    var n = arguments.length < 2 ? k0t(t) : e;
    if (R0t(n)) return A0t(S0t(n, t));
    throw I0t(w0t(t) + " is not iterable");
  },
  D0t = ts,
  nme = xc,
  P0t = woe,
  X9 = function (t, e, n) {
    var r, i;
    nme(t);
    try {
      if (!(r = P0t(t, "return"))) {
        if (e === "throw") throw n;
        return n;
      }
      r = D0t(r, t);
    } catch (o) {
      (i = !0), (r = o);
    }
    if (e === "throw") throw n;
    if (i) throw r;
    return nme(r), n;
  },
  M0t = Iu,
  C0t = ts,
  $0t = xc,
  x0t = bE,
  L0t = dFe,
  O0t = Yp,
  rme = Es,
  G0t = zoe,
  N0t = YL,
  ime = X9,
  F0t = TypeError,
  dF = function (t, e) {
    (this.stopped = t), (this.result = e);
  },
  ame = dF.prototype,
  gm = function (t, e, n) {
    var r,
      i,
      o,
      l,
      u,
      c,
      d,
      h = n && n.that,
      f = !(!n || !n.AS_ENTRIES),
      p = !(!n || !n.IS_RECORD),
      g = !(!n || !n.IS_ITERATOR),
      y = !(!n || !n.INTERRUPTED),
      v = M0t(e, h),
      b = function (k) {
        return r && ime(r, "normal", k), new dF(!0, k);
      },
      w = function (k) {
        return f
          ? ($0t(k), y ? v(k[0], k[1], b) : v(k[0], k[1]))
          : y
          ? v(k, b)
          : v(k);
      };
    if (p) r = t.iterator;
    else if (g) r = t;
    else {
      if (!(i = N0t(t))) throw F0t(x0t(t) + " is not iterable");
      if (L0t(i)) {
        for (o = 0, l = O0t(t); l > o; o++)
          if ((u = w(t[o])) && rme(ame, u)) return u;
        return new dF(!1);
      }
      r = G0t(t, i);
    }
    for (c = p ? t.next : r.next; !(d = C0t(c, r)).done; ) {
      try {
        u = w(d.value);
      } catch (k) {
        ime(r, "throw", k);
      }
      if (typeof u == "object" && u && rme(ame, u)) return u;
    }
    return new dF(!1);
  },
  U0t = td,
  B0t = function (t, e) {
    return t === void 0 ? (arguments.length < 2 ? "" : e) : U0t(t);
  },
  H0t = ur,
  X0t = Es,
  V0t = KL,
  X6 = zNe,
  z0t = Jmt,
  hFe = _E,
  iX = db,
  aX = mE,
  j0t = t0t,
  W0t = f0t,
  K0t = gm,
  Z0t = B0t,
  Y0t = nl,
  Q0t = Y0t("toStringTag"),
  V6 = Error,
  J0t = [].push,
  DI = function (t, e) {
    var n,
      r = X0t(oX, this);
    X6
      ? (n = X6(V6(), r ? V0t(this) : oX))
      : ((n = r ? this : hFe(oX)), iX(n, Q0t, "Error")),
      e !== void 0 && iX(n, "message", Z0t(e)),
      W0t(n, DI, n.stack, 1),
      arguments.length > 2 && j0t(n, arguments[2]);
    var i = [];
    return K0t(t, J0t, { that: i }), iX(n, "errors", i), n;
  };
X6 ? X6(DI, V6) : z0t(DI, V6, { name: !0 });
var oX = (DI.prototype = hFe(V6.prototype, {
  constructor: aX(1, DI),
  message: aX(1, ""),
  name: aX(1, "AggregateError"),
}));
H0t({ global: !0, constructor: !0, arity: 2 }, { AggregateError: DI });
var gx,
  RA,
  ome,
  sX,
  q0t = ub,
  QL = typeof process < "u" && q0t(process) == "process",
  eyt = $c,
  tyt = VL,
  nyt = nl,
  ryt = wu,
  sme = nyt("species"),
  fFe = function (t) {
    var e = eyt(t);
    ryt &&
      e &&
      !e[sme] &&
      tyt(e, sme, {
        configurable: !0,
        get: function () {
          return this;
        },
      });
  },
  iyt = Es,
  ayt = TypeError,
  JL = function (t, e) {
    if (iyt(e, t)) return t;
    throw ayt("Incorrect invocation");
  },
  oyt = G9,
  syt = bE,
  lyt = TypeError,
  joe = function (t) {
    if (oyt(t)) return t;
    throw lyt(syt(t) + " is not a constructor");
  },
  lme = xc,
  uyt = joe,
  cyt = cR,
  dyt = nl,
  hyt = dyt("species"),
  pFe = function (t, e) {
    var n,
      r = lme(t).constructor;
    return r === void 0 || cyt((n = lme(r)[hyt])) ? e : uyt(n);
  },
  fyt = TypeError,
  V9 = function (t, e) {
    if (t < e) throw fyt("Not enough arguments");
    return t;
  },
  pyt = vE,
  gFe = /(?:ipad|iphone|ipod).*applewebkit/i.test(pyt),
  Fp = yl,
  gyt = uR,
  myt = Iu,
  ume = vl,
  yyt = kl,
  mFe = So,
  cme = fNe,
  vyt = jL,
  dme = Ioe,
  byt = V9,
  _yt = gFe,
  Tyt = QL,
  oee = Fp.setImmediate,
  see = Fp.clearImmediate,
  Eyt = Fp.process,
  lX = Fp.Dispatch,
  Syt = Fp.Function,
  hme = Fp.MessageChannel,
  Ryt = Fp.String,
  uX = 0,
  NC = {},
  fme = "onreadystatechange";
mFe(function () {
  gx = Fp.location;
});
var Woe = function (t) {
    if (yyt(NC, t)) {
      var e = NC[t];
      delete NC[t], e();
    }
  },
  cX = function (t) {
    return function () {
      Woe(t);
    };
  },
  pme = function (t) {
    Woe(t.data);
  },
  gme = function (t) {
    Fp.postMessage(Ryt(t), gx.protocol + "//" + gx.host);
  };
(oee && see) ||
  ((oee = function (t) {
    byt(arguments.length, 1);
    var e = ume(t) ? t : Syt(t),
      n = vyt(arguments, 1);
    return (
      (NC[++uX] = function () {
        gyt(e, void 0, n);
      }),
      RA(uX),
      uX
    );
  }),
  (see = function (t) {
    delete NC[t];
  }),
  Tyt
    ? (RA = function (t) {
        Eyt.nextTick(cX(t));
      })
    : lX && lX.now
    ? (RA = function (t) {
        lX.now(cX(t));
      })
    : hme && !_yt
    ? ((sX = (ome = new hme()).port2),
      (ome.port1.onmessage = pme),
      (RA = myt(sX.postMessage, sX)))
    : Fp.addEventListener &&
      ume(Fp.postMessage) &&
      !Fp.importScripts &&
      gx &&
      gx.protocol !== "file:" &&
      !mFe(gme)
    ? ((RA = gme), Fp.addEventListener("message", pme, !1))
    : (RA =
        fme in dme("script")
          ? function (t) {
              cme.appendChild(dme("script"))[fme] = function () {
                cme.removeChild(this), Woe(t);
              };
            }
          : function (t) {
              setTimeout(cX(t), 0);
            }));
var yFe = { set: oee, clear: see },
  vFe = function () {
    (this.head = null), (this.tail = null);
  };
vFe.prototype = {
  add: function (t) {
    var e = { item: t, next: null },
      n = this.tail;
    n ? (n.next = e) : (this.head = e), (this.tail = e);
  },
  get: function () {
    var t = this.head;
    if (t) return (this.head = t.next) === null && (this.tail = null), t.item;
  },
};
var AA,
  dX,
  hX,
  fX,
  mme,
  bFe = vFe,
  Ayt = vE,
  wyt = /ipad|iphone|ipod/i.test(Ayt) && typeof Pebble < "u",
  kyt = vE,
  Iyt = /web0s(?!.*chrome)/i.test(kyt),
  US = yl,
  yme = Iu,
  Dyt = cb.f,
  pX = yFe.set,
  Pyt = bFe,
  Myt = gFe,
  Cyt = wyt,
  $yt = Iyt,
  gX = QL,
  vme = US.MutationObserver || US.WebKitMutationObserver,
  bme = US.document,
  _me = US.process,
  NG = US.Promise,
  Tme = Dyt(US, "queueMicrotask"),
  lee = Tme && Tme.value;
if (!lee) {
  var FG = new Pyt(),
    UG = function () {
      var t, e;
      for (gX && (t = _me.domain) && t.exit(); (e = FG.get()); )
        try {
          e();
        } catch (n) {
          throw (FG.head && AA(), n);
        }
      t && t.enter();
    };
  Myt || gX || $yt || !vme || !bme
    ? !Cyt && NG && NG.resolve
      ? (((fX = NG.resolve(void 0)).constructor = NG),
        (mme = yme(fX.then, fX)),
        (AA = function () {
          mme(UG);
        }))
      : gX
      ? (AA = function () {
          _me.nextTick(UG);
        })
      : ((pX = yme(pX, US)),
        (AA = function () {
          pX(UG);
        }))
    : ((dX = !0),
      (hX = bme.createTextNode("")),
      new vme(UG).observe(hX, { characterData: !0 }),
      (AA = function () {
        hX.data = dX = !dX;
      })),
    (lee = function (t) {
      FG.head || AA(), FG.add(t);
    });
}
var xyt = lee,
  Lyt = function (t, e) {
    try {
      arguments.length == 1 ? console.error(t) : console.error(t, e);
    } catch {}
  },
  ED = function (t) {
    try {
      return { error: !1, value: t() };
    } catch (e) {
      return { error: !0, value: e };
    }
  },
  Oyt = yl,
  BS = Oyt.Promise,
  _Fe = typeof Deno == "object" && Deno && typeof Deno.version == "object",
  Gyt = _Fe,
  Nyt = QL,
  Fyt =
    !Gyt && !Nyt && typeof window == "object" && typeof document == "object",
  Uyt = yl,
  FC = BS,
  Byt = vl,
  Hyt = nNe,
  Xyt = oNe,
  Vyt = nl,
  zyt = Fyt,
  jyt = _Fe,
  mX = NS,
  Eme = FC && FC.prototype,
  Wyt = Vyt("species"),
  TFe = !1,
  EFe = Byt(Uyt.PromiseRejectionEvent),
  Kyt = Hyt("Promise", function () {
    var t = Xyt(FC),
      e = t !== String(FC);
    if ((!e && mX === 66) || !Eme.catch || !Eme.finally) return !0;
    if (!mX || mX < 51 || !/native code/.test(t)) {
      var n = new FC(function (i) {
          i(1);
        }),
        r = function (i) {
          i(
            function () {},
            function () {}
          );
        };
      if (
        (((n.constructor = {})[Wyt] = r),
        !(TFe = n.then(function () {}) instanceof r))
      )
        return !0;
    }
    return !e && (zyt || jyt) && !EFe;
  }),
  qL = { CONSTRUCTOR: Kyt, REJECTION_EVENT: EFe, SUBCLASSING: TFe },
  fb = {},
  Sme = ku,
  Zyt = TypeError,
  Yyt = function (t) {
    var e, n;
    (this.promise = new t(function (r, i) {
      if (e !== void 0 || n !== void 0) throw Zyt("Bad Promise constructor");
      (e = r), (n = i);
    })),
      (this.resolve = Sme(e)),
      (this.reject = Sme(n));
  };
fb.f = function (t) {
  return new Yyt(t);
};
var Qyt = ur,
  z6 = QL,
  eE = yl,
  e5 = ts,
  Jyt = TE,
  qyt = hb,
  evt = fFe,
  tvt = ku,
  uee = vl,
  nvt = Bl,
  rvt = JL,
  ivt = pFe,
  SFe = yFe.set,
  Koe = xyt,
  avt = Lyt,
  ovt = ED,
  svt = bFe,
  RFe = EE,
  cee = BS,
  AFe = qL,
  wFe = fb,
  hF = "Promise",
  Rme = AFe.CONSTRUCTOR,
  lvt = AFe.REJECTION_EVENT,
  yX,
  Ame,
  uvt,
  vX = RFe.getterFor(hF),
  cvt = RFe.set,
  dvt = cee && cee.prototype,
  WP = cee,
  bX = dvt,
  kFe = eE.TypeError,
  dee = eE.document,
  Zoe = eE.process,
  hee = wFe.f,
  hvt = hee,
  fvt = !!(dee && dee.createEvent && eE.dispatchEvent),
  IFe = "unhandledrejection",
  pvt = "rejectionhandled",
  wme = 0,
  DFe = 1,
  gvt = 2,
  Yoe = 1,
  PFe = 2,
  MFe = function (t) {
    var e;
    return !(!nvt(t) || !uee((e = t.then))) && e;
  },
  CFe = function (t, e) {
    var n,
      r,
      i,
      o = e.value,
      l = e.state == DFe,
      u = l ? t.ok : t.fail,
      c = t.resolve,
      d = t.reject,
      h = t.domain;
    try {
      u
        ? (l || (e.rejection === PFe && yvt(e), (e.rejection = Yoe)),
          u === !0
            ? (n = o)
            : (h && h.enter(), (n = u(o)), h && (h.exit(), (i = !0))),
          n === t.promise
            ? d(kFe("Promise-chain cycle"))
            : (r = MFe(n))
            ? e5(r, n, c, d)
            : c(n))
        : d(o);
    } catch (f) {
      h && !i && h.exit(), d(f);
    }
  },
  $Fe = function (t, e) {
    t.notified ||
      ((t.notified = !0),
      Koe(function () {
        for (var n, r = t.reactions; (n = r.get()); ) CFe(n, t);
        (t.notified = !1), e && !t.rejection && mvt(t);
      }));
  },
  xFe = function (t, e, n) {
    var r, i;
    fvt
      ? (((r = dee.createEvent("Event")).promise = e),
        (r.reason = n),
        r.initEvent(t, !1, !0),
        eE.dispatchEvent(r))
      : (r = { promise: e, reason: n }),
      !lvt && (i = eE["on" + t])
        ? i(r)
        : t === IFe && avt("Unhandled promise rejection", n);
  },
  mvt = function (t) {
    e5(SFe, eE, function () {
      var e,
        n = t.facade,
        r = t.value;
      if (
        kme(t) &&
        ((e = ovt(function () {
          z6 ? Zoe.emit("unhandledRejection", r, n) : xFe(IFe, n, r);
        })),
        (t.rejection = z6 || kme(t) ? PFe : Yoe),
        e.error)
      )
        throw e.value;
    });
  },
  kme = function (t) {
    return t.rejection !== Yoe && !t.parent;
  },
  yvt = function (t) {
    e5(SFe, eE, function () {
      var e = t.facade;
      z6 ? Zoe.emit("rejectionHandled", e) : xFe(pvt, e, t.value);
    });
  },
  ck = function (t, e, n) {
    return function (r) {
      t(e, r, n);
    };
  },
  Wk = function (t, e, n) {
    t.done ||
      ((t.done = !0), n && (t = n), (t.value = e), (t.state = gvt), $Fe(t, !0));
  },
  fee = function (t, e, n) {
    if (!t.done) {
      (t.done = !0), n && (t = n);
      try {
        if (t.facade === e) throw kFe("Promise can't be resolved itself");
        var r = MFe(e);
        r
          ? Koe(function () {
              var i = { done: !1 };
              try {
                e5(r, e, ck(fee, i, t), ck(Wk, i, t));
              } catch (o) {
                Wk(i, o, t);
              }
            })
          : ((t.value = e), (t.state = DFe), $Fe(t, !1));
      } catch (i) {
        Wk({ done: !1 }, i, t);
      }
    }
  };
Rme &&
  ((bX = (WP = function (t) {
    rvt(this, bX), tvt(t), e5(yX, this);
    var e = vX(this);
    try {
      t(ck(fee, e), ck(Wk, e));
    } catch (n) {
      Wk(e, n);
    }
  }).prototype),
  ((yX = function (t) {
    cvt(this, {
      type: hF,
      done: !1,
      notified: !1,
      parent: !1,
      reactions: new svt(),
      rejection: !1,
      state: wme,
      value: void 0,
    });
  }).prototype = Jyt(bX, "then", function (t, e) {
    var n = vX(this),
      r = hee(ivt(this, WP));
    return (
      (n.parent = !0),
      (r.ok = !uee(t) || t),
      (r.fail = uee(e) && e),
      (r.domain = z6 ? Zoe.domain : void 0),
      n.state == wme
        ? n.reactions.add(r)
        : Koe(function () {
            CFe(r, n);
          }),
      r.promise
    );
  })),
  (Ame = function () {
    var t = new yX(),
      e = vX(t);
    (this.promise = t), (this.resolve = ck(fee, e)), (this.reject = ck(Wk, e));
  }),
  (wFe.f = hee =
    function (t) {
      return t === WP || t === uvt ? new Ame(t) : hvt(t);
    })),
  Qyt({ global: !0, constructor: !0, wrap: !0, forced: Rme }, { Promise: WP }),
  qyt(WP, hF, !1, !0),
  evt(hF);
var vvt = nl,
  LFe = vvt("iterator"),
  OFe = !1;
try {
  var bvt = 0,
    Ime = {
      next: function () {
        return { done: !!bvt++ };
      },
      return: function () {
        OFe = !0;
      },
    };
  (Ime[LFe] = function () {
    return this;
  }),
    Array.from(Ime, function () {
      throw 2;
    });
} catch {}
var GFe = function (t, e) {
    if (!e && !OFe) return !1;
    var n = !1;
    try {
      var r = {};
      (r[LFe] = function () {
        return {
          next: function () {
            return { done: (n = !0) };
          },
        };
      }),
        t(r);
    } catch {}
    return n;
  },
  _vt = BS,
  Tvt = GFe,
  Evt = qL.CONSTRUCTOR,
  z9 =
    Evt ||
    !Tvt(function (t) {
      _vt.all(t).then(void 0, function () {});
    }),
  Svt = ur,
  Rvt = ts,
  Avt = ku,
  wvt = fb,
  kvt = ED,
  Ivt = gm,
  Dvt = z9;
Svt(
  { target: "Promise", stat: !0, forced: Dvt },
  {
    all: function (t) {
      var e = this,
        n = wvt.f(e),
        r = n.resolve,
        i = n.reject,
        o = kvt(function () {
          var l = Avt(e.resolve),
            u = [],
            c = 0,
            d = 1;
          Ivt(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              Rvt(l, e, h).then(function (g) {
                p || ((p = !0), (u[f] = g), --d || r(u));
              }, i);
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var Pvt = ur,
  Mvt = qL.CONSTRUCTOR;
BS && BS.prototype,
  Pvt(
    { target: "Promise", proto: !0, forced: Mvt, real: !0 },
    {
      catch: function (t) {
        return this.then(void 0, t);
      },
    }
  );
var Cvt = ur,
  $vt = ts,
  xvt = ku,
  Lvt = fb,
  Ovt = ED,
  Gvt = gm,
  Nvt = z9;
Cvt(
  { target: "Promise", stat: !0, forced: Nvt },
  {
    race: function (t) {
      var e = this,
        n = Lvt.f(e),
        r = n.reject,
        i = Ovt(function () {
          var o = xvt(e.resolve);
          Gvt(t, function (l) {
            $vt(o, e, l).then(n.resolve, r);
          });
        });
      return i.error && r(i.value), n.promise;
    },
  }
);
var Fvt = ur,
  Uvt = ts,
  Bvt = fb,
  Hvt = qL.CONSTRUCTOR;
Fvt(
  { target: "Promise", stat: !0, forced: Hvt },
  {
    reject: function (t) {
      var e = Bvt.f(this);
      return Uvt(e.reject, void 0, t), e.promise;
    },
  }
);
var Xvt = xc,
  Vvt = Bl,
  zvt = fb,
  NFe = function (t, e) {
    if ((Xvt(t), Vvt(e) && e.constructor === t)) return e;
    var n = zvt.f(t);
    return (0, n.resolve)(e), n.promise;
  },
  jvt = ur,
  Wvt = $c,
  Kvt = eNe,
  Zvt = BS,
  Yvt = qL.CONSTRUCTOR,
  Qvt = NFe,
  Jvt = Wvt("Promise"),
  qvt = !Yvt;
jvt(
  { target: "Promise", stat: !0, forced: Kvt },
  {
    resolve: function (t) {
      return Qvt(qvt && this === Jvt ? Zvt : this, t);
    },
  }
);
var e1t = ur,
  t1t = ts,
  n1t = ku,
  r1t = fb,
  i1t = ED,
  a1t = gm,
  o1t = z9;
e1t(
  { target: "Promise", stat: !0, forced: o1t },
  {
    allSettled: function (t) {
      var e = this,
        n = r1t.f(e),
        r = n.resolve,
        i = n.reject,
        o = i1t(function () {
          var l = n1t(e.resolve),
            u = [],
            c = 0,
            d = 1;
          a1t(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              t1t(l, e, h).then(
                function (g) {
                  p ||
                    ((p = !0),
                    (u[f] = { status: "fulfilled", value: g }),
                    --d || r(u));
                },
                function (g) {
                  p ||
                    ((p = !0),
                    (u[f] = { status: "rejected", reason: g }),
                    --d || r(u));
                }
              );
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var s1t = ur,
  l1t = ts,
  u1t = ku,
  c1t = $c,
  d1t = fb,
  h1t = ED,
  f1t = gm,
  p1t = z9,
  Dme = "No one promise resolved";
s1t(
  { target: "Promise", stat: !0, forced: p1t },
  {
    any: function (t) {
      var e = this,
        n = c1t("AggregateError"),
        r = d1t.f(e),
        i = r.resolve,
        o = r.reject,
        l = h1t(function () {
          var u = u1t(e.resolve),
            c = [],
            d = 0,
            h = 1,
            f = !1;
          f1t(t, function (p) {
            var g = d++,
              y = !1;
            h++,
              l1t(u, e, p).then(
                function (v) {
                  y || f || ((f = !0), i(v));
                },
                function (v) {
                  y || f || ((y = !0), (c[g] = v), --h || o(new n(c, Dme)));
                }
              );
          }),
            --h || o(new n(c, Dme));
        });
      return l.error && o(l.value), r.promise;
    },
  }
);
var g1t = ur,
  pee = BS,
  m1t = So,
  y1t = $c,
  v1t = vl,
  b1t = pFe,
  Pme = NFe,
  _1t = pee && pee.prototype,
  T1t =
    !!pee &&
    m1t(function () {
      _1t.finally.call({ then: function () {} }, function () {});
    });
g1t(
  { target: "Promise", proto: !0, real: !0, forced: T1t },
  {
    finally: function (t) {
      var e = b1t(this, y1t("Promise")),
        n = v1t(t);
      return this.then(
        n
          ? function (r) {
              return Pme(e, t()).then(function () {
                return r;
              });
            }
          : t,
        n
          ? function (r) {
              return Pme(e, t()).then(function () {
                throw r;
              });
            }
          : t
      );
    },
  }
);
var E1t = za,
  S1t = E1t.Promise,
  R1t = S1t,
  A1t = R1t,
  w1t = A1t,
  k1t = w1t,
  I1t = ur,
  D1t = fb,
  P1t = ED;
I1t(
  { target: "Promise", stat: !0, forced: !0 },
  {
    try: function (t) {
      var e = D1t.f(this),
        n = P1t(t);
      return (n.error ? e.reject : e.resolve)(n.value), e.promise;
    },
  }
);
var M1t = k1t,
  C1t = M1t,
  FFe = C1t,
  Qoe = xr(FFe),
  $1t = ur,
  x1t = Bo,
  L1t = dR,
  O1t = x1t([].reverse),
  Mme = [1, 2];
$1t(
  { target: "Array", proto: !0, forced: String(Mme) === String(Mme.reverse()) },
  {
    reverse: function () {
      return L1t(this) && (this.length = this.length), O1t(this);
    },
  }
);
var G1t = Il,
  N1t = G1t("Array").reverse,
  F1t = Es,
  U1t = N1t,
  _X = Array.prototype,
  B1t = function (t) {
    var e = t.reverse;
    return t === _X || (F1t(_X, t) && e === _X.reverse) ? U1t : e;
  },
  H1t = B1t,
  X1t = H1t,
  V1t = X1t,
  z1t = V1t,
  j1t = z1t,
  W1t = j1t,
  UFe = W1t,
  K1t = xr(UFe),
  Z1t = ur,
  Cme = dR,
  Y1t = G9,
  Q1t = Bl,
  $me = FL,
  J1t = Yp,
  q1t = pm,
  ebt = fR,
  tbt = nl,
  nbt = NL,
  rbt = jL,
  ibt = nbt("slice"),
  abt = tbt("species"),
  TX = Array,
  obt = Math.max;
Z1t(
  { target: "Array", proto: !0, forced: !ibt },
  {
    slice: function (t, e) {
      var n,
        r,
        i,
        o = q1t(this),
        l = J1t(o),
        u = $me(t, l),
        c = $me(e === void 0 ? l : e, l);
      if (
        Cme(o) &&
        ((n = o.constructor),
        ((Y1t(n) && (n === TX || Cme(n.prototype))) ||
          (Q1t(n) && (n = n[abt]) === null)) &&
          (n = void 0),
        n === TX || n === void 0)
      )
        return rbt(o, u, c);
      for (
        r = new (n === void 0 ? TX : n)(obt(c - u, 0)), i = 0;
        u < c;
        u++, i++
      )
        u in o && ebt(r, i, o[u]);
      return (r.length = i), r;
    },
  }
);
var sbt = Il,
  lbt = sbt("Array").slice,
  ubt = Es,
  cbt = lbt,
  EX = Array.prototype,
  dbt = function (t) {
    var e = t.slice;
    return t === EX || (ubt(EX, t) && e === EX.slice) ? cbt : e;
  },
  hbt = dbt,
  fbt = hbt,
  pbt = fbt,
  gbt = pbt,
  mbt = gbt,
  ybt = mbt,
  BFe = ybt,
  HFe = xr(BFe);
function or() {
  or = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      FS ||
      function (H, E, S) {
        H[E] = S.value;
      },
    i = typeof G1 == "function" ? G1 : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(H, E, S) {
    return (
      FS(H, E, { value: S, enumerable: !0, configurable: !0, writable: !0 }),
      H[E]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (E, S, L) {
      return (E[S] = L);
    };
  }
  function d(H, E, S, L) {
    var W = E && E.prototype instanceof p ? E : p,
      F = LC(W.prototype),
      oe = new O(L || []);
    return r(F, "_invoke", { value: $(H, S, oe) }), F;
  }
  function h(H, E, S) {
    try {
      return { type: "normal", arg: H.call(E, S) };
    } catch (L) {
      return { type: "throw", arg: L };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = OC && OC(OC(X([])));
  b && b !== e && n.call(b, o) && (v = b);
  var w = (y.prototype = p.prototype = LC(v));
  function k(H) {
    var E;
    GC((E = ["next", "throw", "return"])).call(E, function (S) {
      c(H, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function D(H, E) {
    function S(W, F, oe, De) {
      var Xe = h(H[W], H, F);
      if (Xe.type !== "throw") {
        var ze = Xe.arg,
          ht = ze.value;
        return ht && ti(ht) == "object" && n.call(ht, "__await")
          ? E.resolve(ht.__await).then(
              function (gt) {
                S("next", gt, oe, De);
              },
              function (gt) {
                S("throw", gt, oe, De);
              }
            )
          : E.resolve(ht).then(
              function (gt) {
                (ze.value = gt), oe(ze);
              },
              function (gt) {
                return S("throw", gt, oe, De);
              }
            );
      }
      De(Xe.arg);
    }
    var L;
    r(this, "_invoke", {
      value: function (W, F) {
        function oe() {
          return new E(function (De, Xe) {
            S(W, F, De, Xe);
          });
        }
        return (L = L ? L.then(oe, oe) : oe());
      },
    });
  }
  function $(H, E, S) {
    var L = "suspendedStart";
    return function (W, F) {
      if (L === "executing") throw new Error("Generator is already running");
      if (L === "completed") {
        if (W === "throw") throw F;
        return { value: void 0, done: !0 };
      }
      for (S.method = W, S.arg = F; ; ) {
        var oe = S.delegate;
        if (oe) {
          var De = N(oe, S);
          if (De) {
            if (De === f) continue;
            return De;
          }
        }
        if (S.method === "next") S.sent = S._sent = S.arg;
        else if (S.method === "throw") {
          if (L === "suspendedStart") throw ((L = "completed"), S.arg);
          S.dispatchException(S.arg);
        } else S.method === "return" && S.abrupt("return", S.arg);
        L = "executing";
        var Xe = h(H, E, S);
        if (Xe.type === "normal") {
          if (((L = S.done ? "completed" : "suspendedYield"), Xe.arg === f))
            continue;
          return { value: Xe.arg, done: S.done };
        }
        Xe.type === "throw" &&
          ((L = "completed"), (S.method = "throw"), (S.arg = Xe.arg));
      }
    };
  }
  function N(H, E) {
    var S = E.method,
      L = H.iterator[S];
    if (L === void 0)
      return (
        (E.delegate = null),
        (S === "throw" &&
          H.iterator.return &&
          ((E.method = "return"),
          (E.arg = void 0),
          N(H, E),
          E.method === "throw")) ||
          (S !== "return" &&
            ((E.method = "throw"),
            (E.arg = new TypeError(
              "The iterator does not provide a '" + S + "' method"
            )))),
        f
      );
    var W = h(L, H.iterator, E.arg);
    if (W.type === "throw")
      return (E.method = "throw"), (E.arg = W.arg), (E.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((E[H.resultName] = F.value),
          (E.next = H.nextLoc),
          E.method !== "return" && ((E.method = "next"), (E.arg = void 0)),
          (E.delegate = null),
          f)
        : F
      : ((E.method = "throw"),
        (E.arg = new TypeError("iterator result is not an object")),
        (E.delegate = null),
        f);
  }
  function P(H) {
    var E,
      S = { tryLoc: H[0] };
    1 in H && (S.catchLoc = H[1]),
      2 in H && ((S.finallyLoc = H[2]), (S.afterLoc = H[3])),
      fx((E = this.tryEntries)).call(E, S);
  }
  function I(H) {
    var E = H.completion || {};
    (E.type = "normal"), delete E.arg, (H.completion = E);
  }
  function O(H) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      GC(H).call(H, P, this),
      this.reset(!0);
  }
  function X(H) {
    if (H) {
      var E = H[o];
      if (E) return E.call(H);
      if (typeof H.next == "function") return H;
      if (!isNaN(H.length)) {
        var S = -1,
          L = function W() {
            for (; ++S < H.length; )
              if (n.call(H, S)) return (W.value = H[S]), (W.done = !1), W;
            return (W.value = void 0), (W.done = !0), W;
          };
        return (L.next = L);
      }
    }
    return { next: G };
  }
  function G() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(w, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (H) {
      var E = typeof H == "function" && H.constructor;
      return (
        !!E && (E === g || (E.displayName || E.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (H) {
      return (
        px ? px(H, y) : ((H.__proto__ = y), c(H, u, "GeneratorFunction")),
        (H.prototype = LC(w)),
        H
      );
    }),
    (t.awrap = function (H) {
      return { __await: H };
    }),
    k(D.prototype),
    c(D.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = D),
    (t.async = function (H, E, S, L, W) {
      W === void 0 && (W = Qoe);
      var F = new D(d(H, E, S, L), W);
      return t.isGeneratorFunction(E)
        ? F
        : F.next().then(function (oe) {
            return oe.done ? oe.value : F.next();
          });
    }),
    k(w),
    c(w, u, "Generator"),
    c(w, o, function () {
      return this;
    }),
    c(w, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (H) {
      var E = Object(H),
        S = [];
      for (var L in E) fx(S).call(S, L);
      return (
        K1t(S).call(S),
        function W() {
          for (; S.length; ) {
            var F = S.pop();
            if (F in E) return (W.value = F), (W.done = !1), W;
          }
          return (W.done = !0), W;
        }
      );
    }),
    (t.values = X),
    (O.prototype = {
      constructor: O,
      reset: function (H) {
        var E;
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          GC((E = this.tryEntries)).call(E, I),
          !H)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+HFe(S).call(S, 1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var H = this.tryEntries[0].completion;
        if (H.type === "throw") throw H.arg;
        return this.rval;
      },
      dispatchException: function (H) {
        if (this.done) throw H;
        var E = this;
        function S(Xe, ze) {
          return (
            (F.type = "throw"),
            (F.arg = H),
            (E.next = Xe),
            ze && ((E.method = "next"), (E.arg = void 0)),
            !!ze
          );
        }
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L],
            F = W.completion;
          if (W.tryLoc === "root") return S("end");
          if (W.tryLoc <= this.prev) {
            var oe = n.call(W, "catchLoc"),
              De = n.call(W, "finallyLoc");
            if (oe && De) {
              if (this.prev < W.catchLoc) return S(W.catchLoc, !0);
              if (this.prev < W.finallyLoc) return S(W.finallyLoc);
            } else if (oe) {
              if (this.prev < W.catchLoc) return S(W.catchLoc, !0);
            } else {
              if (!De)
                throw new Error("try statement without catch or finally");
              if (this.prev < W.finallyLoc) return S(W.finallyLoc);
            }
          }
        }
      },
      abrupt: function (H, E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (
            L.tryLoc <= this.prev &&
            n.call(L, "finallyLoc") &&
            this.prev < L.finallyLoc
          ) {
            var W = L;
            break;
          }
        }
        W &&
          (H === "break" || H === "continue") &&
          W.tryLoc <= E &&
          E <= W.finallyLoc &&
          (W = null);
        var F = W ? W.completion : {};
        return (
          (F.type = H),
          (F.arg = E),
          W
            ? ((this.method = "next"), (this.next = W.finallyLoc), f)
            : this.complete(F)
        );
      },
      complete: function (H, E) {
        if (H.type === "throw") throw H.arg;
        return (
          H.type === "break" || H.type === "continue"
            ? (this.next = H.arg)
            : H.type === "return"
            ? ((this.rval = this.arg = H.arg),
              (this.method = "return"),
              (this.next = "end"))
            : H.type === "normal" && E && (this.next = E),
          f
        );
      },
      finish: function (H) {
        for (var E = this.tryEntries.length - 1; E >= 0; --E) {
          var S = this.tryEntries[E];
          if (S.finallyLoc === H)
            return this.complete(S.completion, S.afterLoc), I(S), f;
        }
      },
      catch: function (H) {
        for (var E = this.tryEntries.length - 1; E >= 0; --E) {
          var S = this.tryEntries[E];
          if (S.tryLoc === H) {
            var L = S.completion;
            if (L.type === "throw") {
              var W = L.arg;
              I(S);
            }
            return W;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (H, E, S) {
        return (
          (this.delegate = { iterator: X(H), resultName: E, nextLoc: S }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function xme(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Qoe.resolve(c).then(r, i);
}
function Gi(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Qoe(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        xme(o, r, i, l, u, "next", c);
      }
      function u(c) {
        xme(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
var vbt = ur,
  bbt = dR;
vbt({ target: "Array", stat: !0 }, { isArray: bbt });
var _bt = za,
  Tbt = _bt.Array.isArray,
  Ebt = Tbt,
  Sbt = Ebt,
  Rbt = Sbt,
  Abt = Rbt,
  wbt = Abt,
  kbt = wbt,
  Ibt = kbt,
  Joe = xr(Ibt);
function gee(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function Dbt(t) {
  if (Joe(t)) return gee(t);
}
var Pbt = YL,
  Mbt = Pbt,
  Cbt = Mbt,
  $bt = Cbt,
  xbt = $bt,
  Lbt = xbt,
  Obt = Lbt,
  Gbt = Obt,
  XFe = Gbt,
  qoe = xr(XFe),
  Nbt = xc,
  Fbt = X9,
  Ubt = function (t, e, n, r) {
    try {
      return r ? e(Nbt(n)[0], n[1]) : e(n);
    } catch (i) {
      Fbt(t, "throw", i);
    }
  },
  Bbt = Iu,
  Hbt = ts,
  Xbt = Ff,
  Vbt = Ubt,
  zbt = dFe,
  jbt = G9,
  Wbt = Yp,
  Lme = fR,
  Kbt = zoe,
  Zbt = YL,
  Ome = Array,
  VFe = function (t) {
    var e = Xbt(t),
      n = jbt(this),
      r = arguments.length,
      i = r > 1 ? arguments[1] : void 0,
      o = i !== void 0;
    o && (i = Bbt(i, r > 2 ? arguments[2] : void 0));
    var l,
      u,
      c,
      d,
      h,
      f,
      p = Zbt(e),
      g = 0;
    if (!p || (this === Ome && zbt(p)))
      for (l = Wbt(e), u = n ? new this(l) : Ome(l); l > g; g++)
        (f = o ? i(e[g], g) : e[g]), Lme(u, g, f);
    else
      for (
        h = (d = Kbt(e, p)).next, u = n ? new this() : [];
        !(c = Hbt(h, d)).done;
        g++
      )
        (f = o ? Vbt(d, i, [c.value, g], !0) : c.value), Lme(u, g, f);
    return (u.length = g), u;
  },
  Ybt = ur,
  Qbt = VFe,
  Jbt = GFe,
  qbt = !Jbt(function (t) {
    Array.from(t);
  });
Ybt({ target: "Array", stat: !0, forced: qbt }, { from: Qbt });
var e_t = za,
  t_t = e_t.Array.from,
  n_t = t_t,
  r_t = n_t,
  i_t = r_t,
  a_t = i_t,
  o_t = a_t,
  s_t = o_t,
  zFe = s_t,
  jFe = xr(zFe);
function l_t(t) {
  if ((G1 !== void 0 && qoe(t) != null) || t["@@iterator"] != null)
    return jFe(t);
}
function ese(t, e) {
  var n;
  if (t) {
    if (typeof t == "string") return gee(t, e);
    var r = HFe((n = Object.prototype.toString.call(t))).call(n, 8, -1);
    return (
      r === "Object" && t.constructor && (r = t.constructor.name),
      r === "Map" || r === "Set"
        ? jFe(t)
        : r === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)
        ? gee(t, e)
        : void 0
    );
  }
}
function u_t() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Cf(t) {
  return Dbt(t) || l_t(t) || ese(t) || u_t();
}
function Wn(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
var c_t = pR,
  d_t = c_t.f("toPrimitive"),
  h_t = d_t,
  f_t = h_t,
  p_t = f_t,
  g_t = p_t,
  m_t = g_t,
  y_t = m_t,
  WFe = y_t,
  v_t = xr(WFe);
function b_t(t, e) {
  if (ti(t) !== "object" || t === null) return t;
  var n = t[v_t];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (ti(r) !== "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function KFe(t) {
  var e = b_t(t, "string");
  return ti(e) === "symbol" ? e : String(e);
}
function Gme(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      FS(t, KFe(r.key), r);
  }
}
function Kn(t, e, n) {
  return (
    e && Gme(t.prototype, e),
    n && Gme(t, n),
    FS(t, "prototype", { writable: !1 }),
    t
  );
}
function bn(t, e, n) {
  return (
    (e = KFe(e)) in t
      ? FS(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 })
      : (t[e] = n),
    t
  );
}
var __t = za,
  T_t = __t.Object.getOwnPropertySymbols,
  E_t = T_t,
  S_t = E_t,
  R_t = S_t,
  A_t = R_t,
  w_t = A_t,
  k_t = w_t,
  ZFe = k_t,
  j6 = xr(ZFe),
  I_t = ur,
  D_t = ux,
  P_t = xoe.indexOf,
  M_t = ZL,
  mee = D_t([].indexOf),
  YFe = !!mee && 1 / mee([1], 1, -0) < 0,
  C_t = YFe || !M_t("indexOf");
I_t(
  { target: "Array", proto: !0, forced: C_t },
  {
    indexOf: function (t) {
      var e = arguments.length > 1 ? arguments[1] : void 0;
      return YFe ? mee(this, t, e) || 0 : P_t(this, t, e);
    },
  }
);
var $_t = Il,
  x_t = $_t("Array").indexOf,
  L_t = Es,
  O_t = x_t,
  SX = Array.prototype,
  G_t = function (t) {
    var e = t.indexOf;
    return t === SX || (L_t(SX, t) && e === SX.indexOf) ? O_t : e;
  },
  N_t = G_t,
  F_t = N_t,
  U_t = F_t,
  B_t = U_t,
  H_t = B_t,
  X_t = H_t,
  QFe = X_t,
  tse = xr(QFe),
  V_t = ur,
  z_t = Ff,
  JFe = BL,
  j_t = So,
  W_t = j_t(function () {
    JFe(1);
  });
V_t(
  { target: "Object", stat: !0, forced: W_t },
  {
    keys: function (t) {
      return JFe(z_t(t));
    },
  }
);
var K_t = za,
  Z_t = K_t.Object.keys,
  Y_t = Z_t,
  Q_t = Y_t,
  J_t = Q_t,
  q_t = J_t,
  eTt = q_t,
  tTt = eTt,
  qFe = tTt,
  e6e = xr(qFe);
function nTt(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = e6e(t);
  for (r = 0; r < o.length; r++)
    (n = o[r]), tse(e).call(e, n) >= 0 || (i[n] = t[n]);
  return i;
}
function nse(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = nTt(t, e);
  if (j6) {
    var o = j6(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        tse(e).call(e, n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
var rTt = ur,
  iTt = gR.filter,
  aTt = NL,
  oTt = aTt("filter");
rTt(
  { target: "Array", proto: !0, forced: !oTt },
  {
    filter: function (t) {
      return iTt(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var sTt = Il,
  lTt = sTt("Array").filter,
  uTt = Es,
  cTt = lTt,
  RX = Array.prototype,
  dTt = function (t) {
    var e = t.filter;
    return t === RX || (uTt(RX, t) && e === RX.filter) ? cTt : e;
  },
  hTt = dTt,
  fTt = hTt,
  pTt = fTt,
  gTt = pTt,
  mTt = gTt,
  yTt = mTt,
  t6e = yTt,
  vTt = xr(t6e),
  n6e = { exports: {} },
  bTt = ur,
  _Tt = So,
  TTt = pm,
  r6e = cb.f,
  i6e = wu,
  ETt =
    !i6e ||
    _Tt(function () {
      r6e(1);
    });
bTt(
  { target: "Object", stat: !0, forced: ETt, sham: !i6e },
  {
    getOwnPropertyDescriptor: function (t, e) {
      return r6e(TTt(t), e);
    },
  }
);
var STt = za,
  a6e = STt.Object,
  RTt = (n6e.exports = function (t, e) {
    return a6e.getOwnPropertyDescriptor(t, e);
  });
a6e.getOwnPropertyDescriptor.sham && (RTt.sham = !0);
var ATt = n6e.exports,
  wTt = ATt,
  kTt = wTt,
  ITt = kTt,
  DTt = ITt,
  PTt = DTt,
  MTt = PTt,
  o6e = MTt,
  rse = xr(o6e),
  CTt = ur,
  $Tt = wu,
  xTt = lFe,
  LTt = pm,
  OTt = cb,
  GTt = fR;
CTt(
  { target: "Object", stat: !0, sham: !$Tt },
  {
    getOwnPropertyDescriptors: function (t) {
      for (
        var e, n, r = LTt(t), i = OTt.f, o = xTt(r), l = {}, u = 0;
        o.length > u;

      )
        (n = i(r, (e = o[u++]))) !== void 0 && GTt(l, e, n);
      return l;
    },
  }
);
var NTt = za,
  FTt = NTt.Object.getOwnPropertyDescriptors,
  UTt = FTt,
  BTt = UTt,
  HTt = BTt,
  XTt = HTt,
  VTt = XTt,
  zTt = VTt,
  s6e = zTt,
  Nme = xr(s6e),
  l6e = { exports: {} },
  jTt = ur,
  WTt = wu,
  Fme = N9.f;
jTt(
  {
    target: "Object",
    stat: !0,
    forced: Object.defineProperties !== Fme,
    sham: !WTt,
  },
  { defineProperties: Fme }
);
var KTt = za,
  u6e = KTt.Object,
  ZTt = (l6e.exports = function (t, e) {
    return u6e.defineProperties(t, e);
  });
u6e.defineProperties.sham && (ZTt.sham = !0);
var YTt = l6e.exports,
  QTt = YTt,
  JTt = QTt,
  qTt = JTt,
  eEt = qTt,
  tEt = eEt,
  nEt = tEt,
  c6e = nEt,
  rEt = xr(c6e);
function Ume(t, e) {
  var n = e6e(t);
  if (j6) {
    var r = j6(t);
    e &&
      (r = vTt(r).call(r, function (i) {
        return rse(t, i).enumerable;
      })),
      fx(n).apply(n, r);
  }
  return n;
}
function $n(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n,
      r,
      i = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? GC((n = Ume(Object(i), !0))).call(n, function (o) {
          bn(t, o, i[o]);
        })
      : Nme
      ? rEt(t, Nme(i))
      : GC((r = Ume(Object(i)))).call(r, function (o) {
          FS(t, o, rse(i, o));
        });
  }
  return t;
}
var iEt = Il,
  aEt = iEt("Array").concat,
  oEt = Es,
  sEt = aEt,
  AX = Array.prototype,
  lEt = function (t) {
    var e = t.concat;
    return t === AX || (oEt(AX, t) && e === AX.concat) ? sEt : e;
  },
  uEt = lEt,
  cEt = uEt,
  dEt = cEt,
  hEt = dEt,
  fEt = hEt,
  pEt = fEt,
  gEt = pEt,
  mEt = gEt,
  Ce = xr(mEt),
  yEt = ur,
  vEt = gR.find,
  Bme = "find",
  Hme = !0;
Bme in [] &&
  Array(1)[Bme](function () {
    Hme = !1;
  }),
  yEt(
    { target: "Array", proto: !0, forced: Hme },
    {
      find: function (t) {
        return vEt(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
    }
  );
var bEt = Il,
  _Et = bEt("Array").find,
  TEt = Es,
  EEt = _Et,
  wX = Array.prototype,
  SEt = function (t) {
    var e = t.find;
    return t === wX || (TEt(wX, t) && e === wX.find) ? EEt : e;
  },
  REt = SEt,
  AEt = REt,
  wEt = AEt,
  kEt = wEt,
  IEt = kEt,
  DEt = IEt,
  PEt = DEt,
  MEt = PEt,
  ji = xr(MEt),
  d6e = { exports: {} },
  CEt = So,
  $Et = CEt(function () {
    if (typeof ArrayBuffer == "function") {
      var t = new ArrayBuffer(8);
      Object.isExtensible(t) && Object.defineProperty(t, "a", { value: 8 });
    }
  }),
  xEt = So,
  LEt = Bl,
  OEt = ub,
  Xme = $Et,
  fF = Object.isExtensible,
  GEt = xEt(function () {
    fF(1);
  }),
  h6e =
    GEt || Xme
      ? function (t) {
          return (
            !!LEt(t) && (!Xme || OEt(t) != "ArrayBuffer") && (!fF || fF(t))
          );
        }
      : fF,
  NEt = So,
  ise = !NEt(function () {
    return Object.isExtensible(Object.preventExtensions({}));
  }),
  FEt = ur,
  UEt = Bo,
  BEt = UL,
  HEt = Bl,
  ase = kl,
  XEt = Zp.f,
  Vme = HL,
  VEt = U9,
  ose = h6e,
  zEt = L9,
  jEt = ise,
  f6e = !1,
  W1 = zEt("meta"),
  WEt = 0,
  sse = function (t) {
    XEt(t, W1, { value: { objectID: "O" + WEt++, weakData: {} } });
  },
  KEt = function (t, e) {
    if (!HEt(t))
      return typeof t == "symbol" ? t : (typeof t == "string" ? "S" : "P") + t;
    if (!ase(t, W1)) {
      if (!ose(t)) return "F";
      if (!e) return "E";
      sse(t);
    }
    return t[W1].objectID;
  },
  ZEt = function (t, e) {
    if (!ase(t, W1)) {
      if (!ose(t)) return !0;
      if (!e) return !1;
      sse(t);
    }
    return t[W1].weakData;
  },
  YEt = function (t) {
    return jEt && f6e && ose(t) && !ase(t, W1) && sse(t), t;
  },
  QEt = function () {
    (JEt.enable = function () {}), (f6e = !0);
    var t = Vme.f,
      e = UEt([].splice),
      n = {};
    (n[W1] = 1),
      t(n).length &&
        ((Vme.f = function (r) {
          for (var i = t(r), o = 0, l = i.length; o < l; o++)
            if (i[o] === W1) {
              e(i, o, 1);
              break;
            }
          return i;
        }),
        FEt(
          { target: "Object", stat: !0, forced: !0 },
          { getOwnPropertyNames: VEt.f }
        ));
  },
  JEt = (d6e.exports = {
    enable: QEt,
    fastKey: KEt,
    getWeakData: ZEt,
    onFreeze: YEt,
  });
BEt[W1] = !0;
var j9 = d6e.exports,
  qEt = ur,
  e2t = yl,
  t2t = j9,
  n2t = So,
  r2t = db,
  i2t = gm,
  a2t = JL,
  o2t = vl,
  s2t = Bl,
  l2t = hb,
  u2t = Zp.f,
  c2t = gR.forEach,
  d2t = wu,
  p6e = EE,
  h2t = p6e.set,
  f2t = p6e.getterFor,
  g6e = function (t, e, n) {
    var r,
      i = t.indexOf("Map") !== -1,
      o = t.indexOf("Weak") !== -1,
      l = i ? "set" : "add",
      u = e2t[t],
      c = u && u.prototype,
      d = {};
    if (
      d2t &&
      o2t(u) &&
      (o ||
        (c.forEach &&
          !n2t(function () {
            new u().entries().next();
          })))
    ) {
      var h = (r = e(function (p, g) {
          h2t(a2t(p, h), { type: t, collection: new u() }),
            g != null && i2t(g, p[l], { that: p, AS_ENTRIES: i });
        })).prototype,
        f = f2t(t);
      c2t(
        [
          "add",
          "clear",
          "delete",
          "forEach",
          "get",
          "has",
          "set",
          "keys",
          "values",
          "entries",
        ],
        function (p) {
          var g = p == "add" || p == "set";
          !(p in c) ||
            (o && p == "clear") ||
            r2t(h, p, function (y, v) {
              var b = f(this).collection;
              if (!g && o && !s2t(y)) return p == "get" && void 0;
              var w = b[p](y === 0 ? 0 : y, v);
              return g ? this : w;
            });
        }
      ),
        o ||
          u2t(h, "size", {
            configurable: !0,
            get: function () {
              return f(this).collection.size;
            },
          });
    } else (r = n.getConstructor(e, t, i, l)), t2t.enable();
    return (
      l2t(r, t, !1, !0),
      (d[t] = r),
      qEt({ global: !0, forced: !0 }, d),
      o || n.setStrong(r, t, i),
      r
    );
  },
  p2t = TE,
  m6e = function (t, e, n) {
    for (var r in e) n && n.unsafe && t[r] ? (t[r] = e[r]) : p2t(t, r, e[r], n);
    return t;
  },
  g2t = _E,
  m2t = VL,
  zme = m6e,
  y2t = Iu,
  v2t = JL,
  b2t = cR,
  _2t = gm,
  T2t = Hoe,
  jme = Xoe,
  E2t = fFe,
  KP = wu,
  Wme = j9.fastKey,
  y6e = EE,
  Kme = y6e.set,
  kX = y6e.getterFor,
  v6e = {
    getConstructor: function (t, e, n, r) {
      var i = t(function (d, h) {
          v2t(d, o),
            Kme(d, {
              type: e,
              index: g2t(null),
              first: void 0,
              last: void 0,
              size: 0,
            }),
            KP || (d.size = 0),
            b2t(h) || _2t(h, d[r], { that: d, AS_ENTRIES: n });
        }),
        o = i.prototype,
        l = kX(e),
        u = function (d, h, f) {
          var p,
            g,
            y = l(d),
            v = c(d, h);
          return (
            v
              ? (v.value = f)
              : ((y.last = v =
                  {
                    index: (g = Wme(h, !0)),
                    key: h,
                    value: f,
                    previous: (p = y.last),
                    next: void 0,
                    removed: !1,
                  }),
                y.first || (y.first = v),
                p && (p.next = v),
                KP ? y.size++ : d.size++,
                g !== "F" && (y.index[g] = v)),
            d
          );
        },
        c = function (d, h) {
          var f,
            p = l(d),
            g = Wme(h);
          if (g !== "F") return p.index[g];
          for (f = p.first; f; f = f.next) if (f.key == h) return f;
        };
      return (
        zme(o, {
          clear: function () {
            for (var d = l(this), h = d.index, f = d.first; f; )
              (f.removed = !0),
                f.previous && (f.previous = f.previous.next = void 0),
                delete h[f.index],
                (f = f.next);
            (d.first = d.last = void 0), KP ? (d.size = 0) : (this.size = 0);
          },
          delete: function (d) {
            var h = this,
              f = l(h),
              p = c(h, d);
            if (p) {
              var g = p.next,
                y = p.previous;
              delete f.index[p.index],
                (p.removed = !0),
                y && (y.next = g),
                g && (g.previous = y),
                f.first == p && (f.first = g),
                f.last == p && (f.last = y),
                KP ? f.size-- : h.size--;
            }
            return !!p;
          },
          forEach: function (d) {
            for (
              var h,
                f = l(this),
                p = y2t(d, arguments.length > 1 ? arguments[1] : void 0);
              (h = h ? h.next : f.first);

            )
              for (p(h.value, h.key, this); h && h.removed; ) h = h.previous;
          },
          has: function (d) {
            return !!c(this, d);
          },
        }),
        zme(
          o,
          n
            ? {
                get: function (d) {
                  var h = c(this, d);
                  return h && h.value;
                },
                set: function (d, h) {
                  return u(this, d === 0 ? 0 : d, h);
                },
              }
            : {
                add: function (d) {
                  return u(this, (d = d === 0 ? 0 : d), d);
                },
              }
        ),
        KP &&
          m2t(o, "size", {
            configurable: !0,
            get: function () {
              return l(this).size;
            },
          }),
        i
      );
    },
    setStrong: function (t, e, n) {
      var r = e + " Iterator",
        i = kX(e),
        o = kX(r);
      T2t(
        t,
        e,
        function (l, u) {
          Kme(this, { type: r, target: l, state: i(l), kind: u, last: void 0 });
        },
        function () {
          for (var l = o(this), u = l.kind, c = l.last; c && c.removed; )
            c = c.previous;
          return l.target && (l.last = c = c ? c.next : l.state.first)
            ? jme(
                u == "keys"
                  ? c.key
                  : u == "values"
                  ? c.value
                  : [c.key, c.value],
                !1
              )
            : ((l.target = void 0), jme(void 0, !0));
        },
        n ? "entries" : "values",
        !n,
        !0
      ),
        E2t(e);
    },
  },
  S2t = g6e,
  R2t = v6e;
S2t(
  "Map",
  function (t) {
    return function () {
      return t(this, arguments.length ? arguments[0] : void 0);
    };
  },
  R2t
);
var A2t = za,
  w2t = A2t.Map,
  k2t = w2t,
  I2t = k2t,
  D2t = I2t,
  P2t = D2t,
  M2t = Iu,
  C2t = ts,
  $2t = ku,
  x2t = joe,
  L2t = cR,
  Zme = gm,
  Yme = [].push,
  b6e = function (t) {
    var e,
      n,
      r,
      i,
      o = arguments.length,
      l = o > 1 ? arguments[1] : void 0;
    return (
      x2t(this),
      (e = l !== void 0) && $2t(l),
      L2t(t)
        ? new this()
        : ((n = []),
          e
            ? ((r = 0),
              (i = M2t(l, o > 2 ? arguments[2] : void 0)),
              Zme(t, function (u) {
                C2t(Yme, n, i(u, r++));
              }))
            : Zme(t, Yme, { that: n }),
          new this(n))
    );
  },
  O2t = ur,
  G2t = b6e;
O2t({ target: "Map", stat: !0, forced: !0 }, { from: G2t });
var N2t = jL,
  _6e = function () {
    return new this(N2t(arguments));
  },
  F2t = ur,
  U2t = _6e;
F2t({ target: "Map", stat: !0, forced: !0 }, { of: U2t });
var B2t = bE,
  Uf = function (t) {
    if (
      typeof t == "object" &&
      "size" in t &&
      "has" in t &&
      "get" in t &&
      "set" in t &&
      "delete" in t &&
      "entries" in t
    )
      return t;
    throw TypeError(B2t(t) + " is not a map");
  },
  T6e = function (t, e) {
    return e == 1
      ? function (n, r) {
          return n[t](r);
        }
      : function (n, r, i) {
          return n[t](r, i);
        };
  },
  H2t = $c,
  BG = T6e,
  Qme = H2t("Map"),
  pb = {
    Map: Qme,
    set: BG("set", 2),
    get: BG("get", 1),
    has: BG("has", 1),
    remove: BG("delete", 1),
    proto: Qme.prototype,
  },
  X2t = ur,
  V2t = Uf,
  z2t = pb.remove;
X2t(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    deleteAll: function () {
      for (
        var t, e = V2t(this), n = !0, r = 0, i = arguments.length;
        r < i;
        r++
      )
        (t = z2t(e, arguments[r])), (n = n && t);
      return !!n;
    },
  }
);
var j2t = ur,
  W2t = Uf,
  lse = pb,
  K2t = lse.get,
  Z2t = lse.has,
  Jme = lse.set;
j2t(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    emplace: function (t, e) {
      var n,
        r,
        i = W2t(this);
      return Z2t(i, t)
        ? ((n = K2t(i, t)),
          "update" in e && ((n = e.update(n, t, i)), Jme(i, t, n)),
          n)
        : ((r = e.insert(t, i)), Jme(i, t, r), r);
    },
  }
);
var Y2t = ts,
  SE = function (t, e, n) {
    for (var r, i, o = n || t.next; !(r = Y2t(o, t)).done; )
      if ((i = e(r.value)) !== void 0) return i;
  },
  Q2t = SE,
  Tv = function (t, e, n) {
    return n
      ? Q2t(t.entries(), function (r) {
          return e(r[1], r[0]);
        })
      : t.forEach(e);
  },
  J2t = ur,
  q2t = Iu,
  eSt = Uf,
  tSt = Tv;
J2t(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    every: function (t) {
      var e = eSt(this),
        n = q2t(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        tSt(
          e,
          function (r, i) {
            if (!n(r, i, e)) return !1;
          },
          !0
        ) !== !1
      );
    },
  }
);
var nSt = ur,
  rSt = Iu,
  iSt = Uf,
  E6e = pb,
  aSt = Tv,
  oSt = E6e.Map,
  sSt = E6e.set;
nSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    filter: function (t) {
      var e = iSt(this),
        n = rSt(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new oSt();
      return (
        aSt(e, function (i, o) {
          n(i, o, e) && sSt(r, o, i);
        }),
        r
      );
    },
  }
);
var lSt = ur,
  uSt = Iu,
  cSt = Uf,
  dSt = Tv;
lSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    find: function (t) {
      var e = cSt(this),
        n = uSt(t, arguments.length > 1 ? arguments[1] : void 0),
        r = dSt(
          e,
          function (i, o) {
            if (n(i, o, e)) return { value: i };
          },
          !0
        );
      return r && r.value;
    },
  }
);
var hSt = ur,
  fSt = Iu,
  pSt = Uf,
  gSt = Tv;
hSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    findKey: function (t) {
      var e = pSt(this),
        n = fSt(t, arguments.length > 1 ? arguments[1] : void 0),
        r = gSt(
          e,
          function (i, o) {
            if (n(i, o, e)) return { key: o };
          },
          !0
        );
      return r && r.key;
    },
  }
);
var mSt = ur,
  IX = ts,
  ySt = Bo,
  vSt = vl,
  HG = ku,
  bSt = gm,
  _St = pb.Map,
  TSt = ySt([].push);
mSt(
  { target: "Map", stat: !0, forced: !0 },
  {
    groupBy: function (t, e) {
      var n = new (vSt(this) ? this : _St)();
      HG(e);
      var r = HG(n.has),
        i = HG(n.get),
        o = HG(n.set);
      return (
        bSt(t, function (l) {
          var u = e(l);
          IX(r, n, u) ? TSt(IX(i, n, u), l) : IX(o, n, u, [l]);
        }),
        n
      );
    },
  }
);
var ESt = function (t, e) {
    return t === e || (t != t && e != e);
  },
  SSt = ur,
  RSt = ESt,
  ASt = Uf,
  wSt = Tv;
SSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    includes: function (t) {
      return (
        wSt(
          ASt(this),
          function (e) {
            if (RSt(e, t)) return !0;
          },
          !0
        ) === !0
      );
    },
  }
);
var kSt = ur,
  ISt = ts,
  DSt = gm,
  PSt = vl,
  qme = ku,
  MSt = pb.Map;
kSt(
  { target: "Map", stat: !0, forced: !0 },
  {
    keyBy: function (t, e) {
      var n = new (PSt(this) ? this : MSt)();
      qme(e);
      var r = qme(n.set);
      return (
        DSt(t, function (i) {
          ISt(r, n, e(i), i);
        }),
        n
      );
    },
  }
);
var CSt = ur,
  $St = Uf,
  xSt = Tv;
CSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    keyOf: function (t) {
      var e = xSt(
        $St(this),
        function (n, r) {
          if (n === t) return { key: r };
        },
        !0
      );
      return e && e.key;
    },
  }
);
var LSt = ur,
  OSt = Iu,
  GSt = Uf,
  S6e = pb,
  NSt = Tv,
  FSt = S6e.Map,
  USt = S6e.set;
LSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    mapKeys: function (t) {
      var e = GSt(this),
        n = OSt(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new FSt();
      return (
        NSt(e, function (i, o) {
          USt(r, n(i, o, e), i);
        }),
        r
      );
    },
  }
);
var BSt = ur,
  HSt = Iu,
  XSt = Uf,
  R6e = pb,
  VSt = Tv,
  zSt = R6e.Map,
  jSt = R6e.set;
BSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    mapValues: function (t) {
      var e = XSt(this),
        n = HSt(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new zSt();
      return (
        VSt(e, function (i, o) {
          jSt(r, o, n(i, o, e));
        }),
        r
      );
    },
  }
);
var WSt = ur,
  KSt = Uf,
  ZSt = gm,
  YSt = pb.set;
WSt(
  { target: "Map", proto: !0, real: !0, arity: 1, forced: !0 },
  {
    merge: function (t) {
      for (var e = KSt(this), n = arguments.length, r = 0; r < n; )
        ZSt(
          arguments[r++],
          function (i, o) {
            YSt(e, i, o);
          },
          { AS_ENTRIES: !0 }
        );
      return e;
    },
  }
);
var QSt = ur,
  JSt = ku,
  qSt = Uf,
  eRt = Tv,
  tRt = TypeError;
QSt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    reduce: function (t) {
      var e = qSt(this),
        n = arguments.length < 2,
        r = n ? void 0 : arguments[1];
      if (
        (JSt(t),
        eRt(e, function (i, o) {
          n ? ((n = !1), (r = i)) : (r = t(r, i, o, e));
        }),
        n)
      )
        throw tRt("Reduce of empty map with no initial value");
      return r;
    },
  }
);
var nRt = ur,
  rRt = Iu,
  iRt = Uf,
  aRt = Tv;
nRt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    some: function (t) {
      var e = iRt(this),
        n = rRt(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        aRt(
          e,
          function (r, i) {
            if (n(r, i, e)) return !0;
          },
          !0
        ) === !0
      );
    },
  }
);
var oRt = ur,
  e0e = ku,
  sRt = Uf,
  use = pb,
  lRt = TypeError,
  uRt = use.get,
  cRt = use.has,
  dRt = use.set;
oRt(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    update: function (t, e) {
      var n = sRt(this),
        r = arguments.length;
      e0e(e);
      var i = cRt(n, t);
      if (!i && r < 3) throw lRt("Updating absent value");
      var o = i ? uRt(n, t) : e0e(r > 2 ? arguments[2] : void 0)(t, n);
      return dRt(n, t, e(o, t, n)), n;
    },
  }
);
var XG = ts,
  DX = ku,
  VG = vl,
  hRt = xc,
  fRt = TypeError,
  A6e = function (t, e) {
    var n,
      r = hRt(this),
      i = DX(r.get),
      o = DX(r.has),
      l = DX(r.set),
      u = arguments.length > 2 ? arguments[2] : void 0;
    if (!VG(e) && !VG(u)) throw fRt("At least one callback required");
    return (
      XG(o, r, t)
        ? ((n = XG(i, r, t)), VG(e) && ((n = e(n)), XG(l, r, t, n)))
        : VG(u) && ((n = u()), XG(l, r, t, n)),
      n
    );
  },
  pRt = ur,
  gRt = A6e;
pRt({ target: "Map", proto: !0, real: !0, forced: !0 }, { upsert: gRt });
var mRt = ur,
  yRt = A6e;
mRt(
  { target: "Map", proto: !0, real: !0, name: "upsert", forced: !0 },
  { updateOrInsert: yRt }
);
var vRt = P2t,
  bRt = vRt,
  w6e = bRt,
  t0e = xr(w6e),
  _Rt = w6e,
  Lf = xr(_Rt),
  TRt = ur,
  ERt = gR.map,
  SRt = NL,
  RRt = SRt("map");
TRt(
  { target: "Array", proto: !0, forced: !RRt },
  {
    map: function (t) {
      return ERt(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var ARt = Il,
  wRt = ARt("Array").map,
  kRt = Es,
  IRt = wRt,
  PX = Array.prototype,
  DRt = function (t) {
    var e = t.map;
    return t === PX || (kRt(PX, t) && e === PX.map) ? IRt : e;
  },
  PRt = DRt,
  MRt = PRt,
  CRt = MRt,
  $Rt = CRt,
  xRt = $Rt,
  LRt = xRt,
  ORt = LRt,
  GRt = ORt,
  On = xr(GRt),
  NRt = FFe,
  Ar = xr(NRt),
  FRt = QFe,
  qt = xr(FRt),
  URt = qFe,
  Dn = xr(URt),
  BRt = BFe,
  jn = xr(BRt),
  n0e = bE,
  HRt = TypeError,
  k6e = function (t, e) {
    if (!delete t[e])
      throw HRt("Cannot delete property " + n0e(e) + " of " + n0e(t));
  },
  XRt = ur,
  VRt = Ff,
  zRt = FL,
  jRt = hR,
  WRt = Yp,
  KRt = oFe,
  ZRt = Poe,
  YRt = $oe,
  QRt = fR,
  MX = k6e,
  JRt = NL,
  qRt = JRt("splice"),
  eAt = Math.max,
  tAt = Math.min;
XRt(
  { target: "Array", proto: !0, forced: !qRt },
  {
    splice: function (t, e) {
      var n,
        r,
        i,
        o,
        l,
        u,
        c = VRt(this),
        d = WRt(c),
        h = zRt(t, d),
        f = arguments.length;
      for (
        f === 0
          ? (n = r = 0)
          : f === 1
          ? ((n = 0), (r = d - h))
          : ((n = f - 2), (r = tAt(eAt(jRt(e), 0), d - h))),
          ZRt(d + n - r),
          i = YRt(c, r),
          o = 0;
        o < r;
        o++
      )
        (l = h + o) in c && QRt(i, o, c[l]);
      if (((i.length = r), n < r)) {
        for (o = h; o < d - r; o++)
          (u = o + n), (l = o + r) in c ? (c[u] = c[l]) : MX(c, u);
        for (o = d; o > d - r + n; o--) MX(c, o - 1);
      } else if (n > r)
        for (o = d - r; o > h; o--)
          (u = o + n - 1), (l = o + r - 1) in c ? (c[u] = c[l]) : MX(c, u);
      for (o = 0; o < n; o++) c[o + h] = arguments[o + 2];
      return KRt(c, d - r + n), i;
    },
  }
);
var nAt = Il,
  rAt = nAt("Array").splice,
  iAt = Es,
  aAt = rAt,
  CX = Array.prototype,
  oAt = function (t) {
    var e = t.splice;
    return t === CX || (iAt(CX, t) && e === CX.splice) ? aAt : e;
  },
  sAt = oAt,
  lAt = sAt,
  uAt = lAt,
  cAt = uAt,
  dAt = cAt,
  hAt = dAt,
  fAt = hAt,
  pAt = fAt,
  tl = xr(pAt),
  gAt = ur;
gAt(
  { target: "Number", stat: !0 },
  {
    isNaN: function (t) {
      return t != t;
    },
  }
);
var mAt = za,
  yAt = mAt.Number.isNaN,
  vAt = yAt,
  bAt = vAt,
  _At = bAt,
  TAt = _At,
  EAt = TAt,
  SAt = EAt,
  RAt = SAt,
  AAt = RAt,
  PI = xr(AAt),
  W9 = `	
\v\f\r                　\u2028\u2029\uFEFF`,
  wAt = Bo,
  kAt = yE,
  IAt = td,
  yee = W9,
  r0e = wAt("".replace),
  DAt = RegExp("^[" + yee + "]+"),
  PAt = RegExp("(^|[^" + yee + "])[" + yee + "]+$"),
  $X = function (t) {
    return function (e) {
      var n = IAt(kAt(e));
      return (
        1 & t && (n = r0e(n, DAt, "")), 2 & t && (n = r0e(n, PAt, "$1")), n
      );
    };
  },
  cse = { start: $X(1), end: $X(2), trim: $X(3) },
  I6e = yl,
  MAt = So,
  CAt = Bo,
  $At = td,
  xAt = cse.trim,
  i0e = W9,
  UC = I6e.parseInt,
  a0e = I6e.Symbol,
  o0e = a0e && a0e.iterator,
  D6e = /^[+-]?0x/i,
  LAt = CAt(D6e.exec),
  OAt =
    UC(i0e + "08") !== 8 ||
    UC(i0e + "0x16") !== 22 ||
    (o0e &&
      !MAt(function () {
        UC(Object(o0e));
      })),
  vee = OAt
    ? function (t, e) {
        var n = xAt($At(t));
        return UC(n, e >>> 0 || (LAt(D6e, n) ? 16 : 10));
      }
    : UC,
  GAt = ur;
GAt({ global: !0, forced: parseInt != vee }, { parseInt: vee });
var NAt = za,
  FAt = NAt.parseInt,
  UAt = FAt,
  BAt = UAt,
  HAt = BAt,
  XAt = HAt,
  VAt = XAt,
  zAt = VAt,
  jAt = zAt,
  WAt = jAt,
  _i = xr(WAt),
  KAt = Il,
  ZAt = KAt("Array").keys,
  YAt = ZAt,
  QAt = YAt,
  JAt = L0,
  qAt = kl,
  ewt = Es,
  twt = QAt,
  xX = Array.prototype,
  nwt = { DOMTokenList: !0, NodeList: !0 },
  rwt = function (t) {
    var e = t.keys;
    return t === xX || (ewt(xX, t) && e === xX.keys) || qAt(nwt, JAt(t))
      ? twt
      : e;
  },
  iwt = rwt,
  awt = iwt,
  owt = awt,
  swt = owt,
  lwt = swt,
  uwt = lwt,
  hv = xr(uwt),
  cwt = t6e,
  _r = xr(cwt),
  s0e = wu,
  dwt = Bo,
  hwt = ts,
  fwt = So,
  LX = BL,
  pwt = XL,
  gwt = LL,
  mwt = Ff,
  ywt = x9,
  wA = Object.assign,
  l0e = Object.defineProperty,
  vwt = dwt([].concat),
  P6e =
    !wA ||
    fwt(function () {
      if (
        s0e &&
        wA(
          { b: 1 },
          wA(
            l0e({}, "a", {
              enumerable: !0,
              get: function () {
                l0e(this, "b", { value: 3, enumerable: !1 });
              },
            }),
            { b: 2 }
          )
        ).b !== 1
      )
        return !0;
      var t = {},
        e = {},
        n = Symbol(),
        r = "abcdefghijklmnopqrst";
      return (
        (t[n] = 7),
        r.split("").forEach(function (i) {
          e[i] = i;
        }),
        wA({}, t)[n] != 7 || LX(wA({}, e)).join("") != r
      );
    })
      ? function (t, e) {
          for (
            var n = mwt(t), r = arguments.length, i = 1, o = pwt.f, l = gwt.f;
            r > i;

          )
            for (
              var u,
                c = ywt(arguments[i++]),
                d = o ? vwt(LX(c), o(c)) : LX(c),
                h = d.length,
                f = 0;
              h > f;

            )
              (u = d[f++]), (s0e && !hwt(l, c, u)) || (n[u] = c[u]);
          return n;
        }
      : wA,
  bwt = ur,
  u0e = P6e;
bwt(
  { target: "Object", stat: !0, arity: 2, forced: Object.assign !== u0e },
  { assign: u0e }
);
var _wt = za,
  Twt = _wt.Object.assign,
  Ewt = Twt,
  Swt = Ewt,
  Rwt = Swt,
  Awt = Rwt,
  wwt = Awt,
  kwt = wwt,
  Iwt = kwt,
  Dwt = Iwt,
  Ci = xr(Dwt),
  Pwt = ZFe,
  Mc = xr(Pwt),
  Mwt = o6e,
  ih = xr(Mwt),
  Cwt = s6e,
  tE = xr(Cwt),
  $wt = c6e,
  SD = xr($wt),
  xwt = rFe,
  ea = xr(xwt),
  Lwt = YNe,
  lu = xr(Lwt),
  Owt = eFe,
  K9 = xr(Owt),
  Gwt = sFe,
  W6 = xr(Gwt),
  Nwt = aFe,
  MI = xr(Nwt),
  M6e = Bo,
  Fwt = ku,
  Uwt = Bl,
  Bwt = kl,
  c0e = jL,
  Hwt = xL,
  C6e = Function,
  Xwt = M6e([].concat),
  Vwt = M6e([].join),
  OX = {},
  zwt = function (t, e, n) {
    if (!Bwt(OX, e)) {
      for (var r = [], i = 0; i < e; i++) r[i] = "a[" + i + "]";
      OX[e] = C6e("C,a", "return new C(" + Vwt(r, ",") + ")");
    }
    return OX[e](t, n);
  },
  $6e = Hwt
    ? C6e.bind
    : function (t) {
        var e = Fwt(this),
          n = e.prototype,
          r = c0e(arguments, 1),
          i = function () {
            var o = Xwt(r, c0e(arguments));
            return this instanceof i ? zwt(e, o.length, o) : e.apply(t, o);
          };
        return Uwt(n) && (i.prototype = n), i;
      },
  jwt = ur,
  Wwt = $c,
  GX = uR,
  Kwt = $6e,
  d0e = joe,
  Zwt = xc,
  h0e = Bl,
  Ywt = _E,
  x6e = So,
  dse = Wwt("Reflect", "construct"),
  Qwt = Object.prototype,
  Jwt = [].push,
  L6e = x6e(function () {
    function t() {}
    return !(dse(function () {}, [], t) instanceof t);
  }),
  O6e = !x6e(function () {
    dse(function () {});
  }),
  f0e = L6e || O6e;
jwt(
  { target: "Reflect", stat: !0, forced: f0e, sham: f0e },
  {
    construct: function (t, e) {
      d0e(t), Zwt(e);
      var n = arguments.length < 3 ? t : d0e(arguments[2]);
      if (O6e && !L6e) return dse(t, e, n);
      if (t == n) {
        switch (e.length) {
          case 0:
            return new t();
          case 1:
            return new t(e[0]);
          case 2:
            return new t(e[0], e[1]);
          case 3:
            return new t(e[0], e[1], e[2]);
          case 4:
            return new t(e[0], e[1], e[2], e[3]);
        }
        var r = [null];
        return GX(Jwt, r, e), new (GX(Kwt, t, r))();
      }
      var i = n.prototype,
        o = Ywt(h0e(i) ? i : Qwt),
        l = GX(t, o, e);
      return h0e(l) ? l : o;
    },
  }
);
var qwt = za,
  ekt = qwt.Reflect.construct,
  tkt = ekt,
  nkt = tkt,
  rkt = nkt,
  ikt = rkt,
  akt = ikt,
  okt = akt,
  G6e = okt,
  BC = xr(G6e),
  skt = G6e,
  pF = xr(skt),
  p0e = kl,
  lkt = function (t) {
    return t !== void 0 && (p0e(t, "value") || p0e(t, "writable"));
  },
  ukt = ur,
  ckt = ts,
  dkt = Bl,
  hkt = xc,
  fkt = lkt,
  pkt = cb,
  gkt = KL;
function N6e(t, e) {
  var n,
    r,
    i = arguments.length < 3 ? t : arguments[2];
  return hkt(t) === i
    ? t[e]
    : (n = pkt.f(t, e))
    ? fkt(n)
      ? n.value
      : n.get === void 0
      ? void 0
      : ckt(n.get, i)
    : dkt((r = gkt(t)))
    ? N6e(r, e, i)
    : void 0;
}
ukt({ target: "Reflect", stat: !0 }, { get: N6e });
var mkt = za,
  ykt = mkt.Reflect.get,
  vkt = ykt,
  bkt = vkt,
  _kt = bkt,
  Tkt = _kt,
  Ekt = Tkt,
  Skt = Ekt,
  F6e = Skt,
  g0e = xr(F6e),
  Rkt = F6e,
  m0e = xr(Rkt),
  Akt = XFe,
  hse = xr(Akt),
  wkt = zFe,
  RE = xr(wkt),
  kkt = WFe,
  U6e = xr(kkt);
function y0e(t, e) {
  var n = Dn(t);
  if (Mc) {
    var r = Mc(t);
    e &&
      (r = _r(r).call(r, function (i) {
        return ih(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function hS(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? y0e(Object(n), !0).forEach(function (r) {
          Va(t, r, n[r]);
        })
      : tE
      ? SD(t, tE(n))
      : y0e(Object(n)).forEach(function (r) {
          ea(t, r, ih(n, r));
        });
  }
  return t;
}
function sm(t) {
  return (sm =
    typeof lu == "function" && typeof K9 == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof lu == "function" &&
            e.constructor === lu &&
            e !== lu.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function Hs(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function v0e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      ea(t, H6e(r.key), r);
  }
}
function Xs(t, e, n) {
  return (
    e && v0e(t.prototype, e),
    n && v0e(t, n),
    ea(t, "prototype", { writable: !1 }),
    t
  );
}
function Va(t, e, n) {
  return (
    (e = H6e(e)) in t
      ? ea(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 })
      : (t[e] = n),
    t
  );
}
function ju(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    ea(t, "prototype", { writable: !1 }),
    e && B6e(t, e);
}
function el(t) {
  return (el = W6
    ? MI.bind()
    : function (e) {
        return e.__proto__ || MI(e);
      })(t);
}
function B6e(t, e) {
  return (B6e = W6
    ? W6.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function Ikt() {
  if (typeof Reflect > "u" || !pF || pF.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(pF(Boolean, [], function () {})), !0;
  } catch {
    return !1;
  }
}
function Oi(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function fse(t, e) {
  if (e && (ti(e) === "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return Oi(t);
}
function Wu(t) {
  var e = Ikt();
  return function () {
    var n,
      r = el(t);
    if (e) {
      var i = el(this).constructor;
      n = pF(r, arguments, i);
    } else n = r.apply(this, arguments);
    return fse(this, n);
  };
}
function Dkt(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = el(t)) !== null; );
  return t;
}
function Al() {
  return (
    (Al =
      typeof Reflect < "u" && m0e
        ? m0e.bind()
        : function (t, e, n) {
            var r = Dkt(t, e);
            if (r) {
              var i = ih(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    Al.apply(this, arguments)
  );
}
function H1(t) {
  return Pkt(t) || Mkt(t) || Ckt(t) || $kt();
}
function Pkt(t) {
  if (Array.isArray(t)) return bee(t);
}
function Mkt(t) {
  if ((lu !== void 0 && hse(t) != null) || t["@@iterator"] != null)
    return RE(t);
}
function Ckt(t, e) {
  var n;
  if (t) {
    if (typeof t == "string") return bee(t, e);
    var r = jn((n = Object.prototype.toString.call(t))).call(n, 8, -1);
    return (
      r === "Object" && t.constructor && (r = t.constructor.name),
      r === "Map" || r === "Set"
        ? RE(t)
        : r === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)
        ? bee(t, e)
        : void 0
    );
  }
}
function bee(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function $kt() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function xkt(t, e) {
  if (ti(t) !== "object" || t === null) return t;
  var n = t[U6e];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (ti(r) !== "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function H6e(t) {
  var e = xkt(t, "string");
  return ti(e) === "symbol" ? e : String(e);
}
var X6e = { exports: {} };
(function (t) {
  var e = Object.prototype.hasOwnProperty,
    n = "~";
  function r() {}
  function i(c, d, h) {
    (this.fn = c), (this.context = d), (this.once = h || !1);
  }
  function o(c, d, h, f, p) {
    if (typeof h != "function")
      throw new TypeError("The listener must be a function");
    var g = new i(h, f || c, p),
      y = n ? n + d : d;
    return (
      c._events[y]
        ? c._events[y].fn
          ? (c._events[y] = [c._events[y], g])
          : c._events[y].push(g)
        : ((c._events[y] = g), c._eventsCount++),
      c
    );
  }
  function l(c, d) {
    --c._eventsCount == 0 ? (c._events = new r()) : delete c._events[d];
  }
  function u() {
    (this._events = new r()), (this._eventsCount = 0);
  }
  Object.create &&
    ((r.prototype = Object.create(null)), new r().__proto__ || (n = !1)),
    (u.prototype.eventNames = function () {
      var c,
        d,
        h = [];
      if (this._eventsCount === 0) return h;
      for (d in (c = this._events))
        e.call(c, d) && h.push(n ? jn(d).call(d, 1) : d);
      return Mc ? Ce(h).call(h, Mc(c)) : h;
    }),
    (u.prototype.listeners = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      if (!h) return [];
      if (h.fn) return [h.fn];
      for (var f = 0, p = h.length, g = new Array(p); f < p; f++)
        g[f] = h[f].fn;
      return g;
    }),
    (u.prototype.listenerCount = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      return h ? (h.fn ? 1 : h.length) : 0;
    }),
    (u.prototype.emit = function (c, d, h, f, p, g) {
      var y = n ? n + c : c;
      if (!this._events[y]) return !1;
      var v,
        b,
        w = this._events[y],
        k = arguments.length;
      if (w.fn) {
        switch ((w.once && this.removeListener(c, w.fn, void 0, !0), k)) {
          case 1:
            return w.fn.call(w.context), !0;
          case 2:
            return w.fn.call(w.context, d), !0;
          case 3:
            return w.fn.call(w.context, d, h), !0;
          case 4:
            return w.fn.call(w.context, d, h, f), !0;
          case 5:
            return w.fn.call(w.context, d, h, f, p), !0;
          case 6:
            return w.fn.call(w.context, d, h, f, p, g), !0;
        }
        for (b = 1, v = new Array(k - 1); b < k; b++) v[b - 1] = arguments[b];
        w.fn.apply(w.context, v);
      } else {
        var D,
          $ = w.length;
        for (b = 0; b < $; b++)
          switch (
            (w[b].once && this.removeListener(c, w[b].fn, void 0, !0), k)
          ) {
            case 1:
              w[b].fn.call(w[b].context);
              break;
            case 2:
              w[b].fn.call(w[b].context, d);
              break;
            case 3:
              w[b].fn.call(w[b].context, d, h);
              break;
            case 4:
              w[b].fn.call(w[b].context, d, h, f);
              break;
            default:
              if (!v)
                for (D = 1, v = new Array(k - 1); D < k; D++)
                  v[D - 1] = arguments[D];
              w[b].fn.apply(w[b].context, v);
          }
      }
      return !0;
    }),
    (u.prototype.on = function (c, d, h) {
      return o(this, c, d, h, !1);
    }),
    (u.prototype.once = function (c, d, h) {
      return o(this, c, d, h, !0);
    }),
    (u.prototype.removeListener = function (c, d, h, f) {
      var p = n ? n + c : c;
      if (!this._events[p]) return this;
      if (!d) return l(this, p), this;
      var g = this._events[p];
      if (g.fn)
        g.fn !== d || (f && !g.once) || (h && g.context !== h) || l(this, p);
      else {
        for (var y = 0, v = [], b = g.length; y < b; y++)
          (g[y].fn !== d || (f && !g[y].once) || (h && g[y].context !== h)) &&
            v.push(g[y]);
        v.length ? (this._events[p] = v.length === 1 ? v[0] : v) : l(this, p);
      }
      return this;
    }),
    (u.prototype.removeAllListeners = function (c) {
      var d;
      return (
        c
          ? ((d = n ? n + c : c), this._events[d] && l(this, d))
          : ((this._events = new r()), (this._eventsCount = 0)),
        this
      );
    }),
    (u.prototype.off = u.prototype.removeListener),
    (u.prototype.addListener = u.prototype.on),
    (u.prefixed = n),
    (u.EventEmitter = u),
    (t.exports = u);
})(X6e);
var V6e = X6e.exports,
  z6e = xr(V6e),
  Lkt = hR,
  Okt = td,
  Gkt = yE,
  Nkt = RangeError,
  j6e = function (t) {
    var e = Okt(Gkt(this)),
      n = "",
      r = Lkt(t);
    if (r < 0 || r == 1 / 0) throw Nkt("Wrong number of repetitions");
    for (; r > 0; (r >>>= 1) && (e += e)) 1 & r && (n += e);
    return n;
  },
  W6e = Bo,
  Fkt = Doe,
  b0e = td,
  Ukt = j6e,
  Bkt = yE,
  Hkt = W6e(Ukt),
  Xkt = W6e("".slice),
  Vkt = Math.ceil,
  _0e = function (t) {
    return function (e, n, r) {
      var i,
        o,
        l = b0e(Bkt(e)),
        u = Fkt(n),
        c = l.length,
        d = r === void 0 ? " " : b0e(r);
      return u <= c || d == ""
        ? l
        : ((o = Hkt(d, Vkt((i = u - c) / d.length))).length > i &&
            (o = Xkt(o, 0, i)),
          t ? l + o : o + l);
    };
  },
  zkt = { start: _0e(!1), end: _0e(!0) },
  jkt = vE,
  Wkt = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(
    jkt
  ),
  Kkt = ur,
  Zkt = zkt.start,
  Ykt = Wkt;
Kkt(
  { target: "String", proto: !0, forced: Ykt },
  {
    padStart: function (t) {
      return Zkt(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Qkt = Il,
  Jkt = Qkt("String").padStart,
  qkt = Es,
  eIt = Jkt,
  NX = String.prototype,
  tIt = function (t) {
    var e = t.padStart;
    return typeof t == "string" || t === NX || (qkt(NX, t) && e === NX.padStart)
      ? eIt
      : e;
  },
  nIt = tIt,
  rIt = nIt,
  iIt = rIt,
  aIt = iIt,
  oIt = aIt,
  sIt = oIt,
  lIt = sIt,
  uIt = lIt,
  FX = xr(uIt),
  K6e = yl,
  cIt = So,
  dIt = Bo,
  hIt = td,
  fIt = cse.trim,
  pIt = W9,
  gIt = dIt("".charAt),
  K6 = K6e.parseFloat,
  T0e = K6e.Symbol,
  E0e = T0e && T0e.iterator,
  mIt =
    1 / K6(pIt + "-0") != -1 / 0 ||
    (E0e &&
      !cIt(function () {
        K6(Object(E0e));
      })),
  _ee = mIt
    ? function (t) {
        var e = fIt(hIt(t)),
          n = K6(e);
        return n === 0 && gIt(e, 0) == "-" ? -0 : n;
      }
    : K6,
  yIt = ur;
yIt({ global: !0, forced: parseFloat != _ee }, { parseFloat: _ee });
var vIt = za,
  bIt = vIt.parseFloat,
  _It = bIt,
  TIt = _It,
  EIt = TIt,
  SIt = EIt,
  RIt = SIt,
  AIt = RIt,
  wIt = AIt,
  kIt = wIt,
  wl = xr(kIt),
  IIt = UNe.PROPER,
  DIt = So,
  S0e = W9,
  R0e = "​᠎",
  PIt = function (t) {
    return DIt(function () {
      return !!S0e[t]() || R0e[t]() !== R0e || (IIt && S0e[t].name !== t);
    });
  },
  MIt = ur,
  CIt = cse.trim,
  $It = PIt;
MIt(
  { target: "String", proto: !0, forced: $It("trim") },
  {
    trim: function () {
      return CIt(this);
    },
  }
);
var xIt = Il,
  LIt = xIt("String").trim,
  OIt = Es,
  GIt = LIt,
  UX = String.prototype,
  NIt = function (t) {
    var e = t.trim;
    return typeof t == "string" || t === UX || (OIt(UX, t) && e === UX.trim)
      ? GIt
      : e;
  },
  FIt = NIt,
  UIt = FIt,
  BIt = UIt,
  HIt = BIt,
  XIt = HIt,
  VIt = XIt,
  zIt = VIt,
  jIt = zIt,
  es = xr(jIt),
  A0e = Ooe,
  WIt = Math.floor,
  Tee = function (t, e) {
    var n = t.length,
      r = WIt(n / 2);
    return n < 8
      ? KIt(t, e)
      : ZIt(t, Tee(A0e(t, 0, r), e), Tee(A0e(t, r), e), e);
  },
  KIt = function (t, e) {
    for (var n, r, i = t.length, o = 1; o < i; ) {
      for (r = o, n = t[o]; r && e(t[r - 1], n) > 0; ) t[r] = t[--r];
      r !== o++ && (t[r] = n);
    }
    return t;
  },
  ZIt = function (t, e, n, r) {
    for (var i = e.length, o = n.length, l = 0, u = 0; l < i || u < o; )
      t[l + u] =
        l < i && u < o
          ? r(e[l], n[u]) <= 0
            ? e[l++]
            : n[u++]
          : l < i
          ? e[l++]
          : n[u++];
    return t;
  },
  Z6e = Tee,
  YIt = vE,
  w0e = YIt.match(/firefox\/(\d+)/i),
  QIt = !!w0e && +w0e[1],
  JIt = vE,
  qIt = /MSIE|Trident/.test(JIt),
  eDt = vE,
  k0e = eDt.match(/AppleWebKit\/(\d+)\./),
  tDt = !!k0e && +k0e[1],
  nDt = ur,
  Y6e = Bo,
  rDt = ku,
  iDt = Ff,
  I0e = Yp,
  aDt = k6e,
  D0e = td,
  pse = So,
  oDt = Z6e,
  sDt = ZL,
  P0e = QIt,
  lDt = qIt,
  M0e = NS,
  C0e = tDt,
  kT = [],
  $0e = Y6e(kT.sort),
  uDt = Y6e(kT.push),
  cDt = pse(function () {
    kT.sort(void 0);
  }),
  dDt = pse(function () {
    kT.sort(null);
  }),
  hDt = sDt("sort"),
  Q6e = !pse(function () {
    if (M0e) return M0e < 70;
    if (!(P0e && P0e > 3)) {
      if (lDt) return !0;
      if (C0e) return C0e < 603;
      var t,
        e,
        n,
        r,
        i = "";
      for (t = 65; t < 76; t++) {
        switch (((e = String.fromCharCode(t)), t)) {
          case 66:
          case 69:
          case 70:
          case 72:
            n = 3;
            break;
          case 68:
          case 71:
            n = 4;
            break;
          default:
            n = 2;
        }
        for (r = 0; r < 47; r++) kT.push({ k: e + r, v: n });
      }
      for (
        kT.sort(function (o, l) {
          return l.v - o.v;
        }),
          r = 0;
        r < kT.length;
        r++
      )
        (e = kT[r].k.charAt(0)), i.charAt(i.length - 1) !== e && (i += e);
      return i !== "DGBEFHACIJK";
    }
  }),
  fDt = cDt || !dDt || !hDt || !Q6e,
  pDt = function (t) {
    return function (e, n) {
      return n === void 0
        ? -1
        : e === void 0
        ? 1
        : t !== void 0
        ? +t(e, n) || 0
        : D0e(e) > D0e(n)
        ? 1
        : -1;
    };
  };
nDt(
  { target: "Array", proto: !0, forced: fDt },
  {
    sort: function (t) {
      t !== void 0 && rDt(t);
      var e = iDt(this);
      if (Q6e) return t === void 0 ? $0e(e) : $0e(e, t);
      var n,
        r,
        i = [],
        o = I0e(e);
      for (r = 0; r < o; r++) r in e && uDt(i, e[r]);
      for (oDt(i, pDt(t)), n = I0e(i), r = 0; r < n; ) e[r] = i[r++];
      for (; r < o; ) aDt(e, r++);
      return e;
    },
  }
);
var x0e,
  gDt = Il,
  mDt = gDt("Array").sort,
  yDt = Es,
  vDt = mDt,
  BX = Array.prototype,
  bDt = function (t) {
    var e = t.sort;
    return t === BX || (yDt(BX, t) && e === BX.sort) ? vDt : e;
  },
  _Dt = bDt,
  TDt = _Dt,
  EDt = TDt,
  SDt = EDt,
  RDt = SDt,
  ADt = RDt,
  wDt = ADt,
  kDt = wDt,
  mm = xr(kDt),
  IDt =
    typeof window < "u" &&
    window.location &&
    qt((x0e = window.location.href)).call(x0e, "xgplayerdebugger=1") > -1,
  HX = {
    info: "color: #525252; background-color: #90ee90;",
    error: "color: #525252; background-color: red;",
    warn: "color: #525252; background-color: yellow; ",
  },
  XX = "%c[xgplayer]",
  Gl = {
    config: { debug: IDt ? 3 : 0 },
    logInfo: function (t) {
      for (
        var e, n, r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1;
        o < r;
        o++
      )
        i[o - 1] = arguments[o];
      this.config.debug >= 3 &&
        (n = console).log.apply(n, Ce((e = [XX, HX.info, t])).call(e, i));
    },
    logWarn: function (t) {
      for (
        var e, n, r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1;
        o < r;
        o++
      )
        i[o - 1] = arguments[o];
      this.config.debug >= 1 &&
        (n = console).warn.apply(n, Ce((e = [XX, HX.warn, t])).call(e, i));
    },
    logError: function (t) {
      var e, n;
      if (!(this.config.debug < 1)) {
        for (
          var r = this.config.debug >= 2 ? "trace" : "error",
            i = arguments.length,
            o = new Array(i > 1 ? i - 1 : 0),
            l = 1;
          l < i;
          l++
        )
          o[l - 1] = arguments[l];
        (n = console)[r].apply(n, Ce((e = [XX, HX.error, t])).call(e, o));
      }
    },
  };
function DDt(t) {
  (t.logInfo = Gl.logInfo.bind(t)),
    (t.logWarn = Gl.logWarn.bind(t)),
    (t.logError = Gl.logError.bind(t));
}
var PDt = (function () {
    function t(e) {
      Hs(this, t), (this.bufferedList = e);
    }
    return (
      Xs(t, [
        {
          key: "start",
          value: function (e) {
            return this.bufferedList[e].start;
          },
        },
        {
          key: "end",
          value: function (e) {
            return this.bufferedList[e].end;
          },
        },
        {
          key: "length",
          get: function () {
            return this.bufferedList.length;
          },
        },
      ]),
      t
    );
  })(),
  Pt = {};
function MDt(t, e) {
  for (var n = 0, r = e.length; n < r; n++)
    if (qt(t).call(t, e[n]) > -1) return !0;
  return !1;
}
function J6e(t) {
  var e = sm(t);
  return t !== null && (e === "object" || e === "function");
}
function CDt(t, e, n) {
  var r,
    i,
    o,
    l,
    u,
    c,
    d = 0,
    h = !1,
    f = !1,
    p = !0,
    g = !e && e !== 0 && typeof window.requestAnimationFrame == "function";
  if (typeof t != "function") throw new TypeError("Expected a function");
  function y($) {
    var N = r,
      P = i;
    return (r = i = void 0), (d = $), (l = t.apply(P, N));
  }
  function v($, N) {
    return g
      ? (window.cancelAnimationFrame(u), window.requestAnimationFrame($))
      : setTimeout($, N);
  }
  function b($) {
    var N = $ - c;
    return c === void 0 || N >= e || N < 0 || (f && $ - d >= o);
  }
  function w() {
    var $ = Date.now();
    if (b($)) return k($);
    u = v(
      w,
      (function (N) {
        var P = N - d,
          I = e - (N - c);
        return f ? Math.min(I, o - P) : I;
      })($)
    );
  }
  function k($) {
    return (u = void 0), p && r ? y($) : ((r = i = void 0), l);
  }
  function D() {
    for (
      var $ = Date.now(),
        N = b($),
        P = arguments.length,
        I = new Array(P),
        O = 0;
      O < P;
      O++
    )
      I[O] = arguments[O];
    if (((r = I), (i = this), (c = $), N)) {
      if (u === void 0)
        return (function (X) {
          return (d = X), (u = v(w, e)), h ? y(X) : l;
        })(c);
      if (f) return (u = v(w, e)), y(c);
    }
    return u === void 0 && (u = v(w, e)), l;
  }
  return (
    (e = +e || 0),
    J6e(n) &&
      ((h = !!n.leading),
      (o = (f = "maxWait" in n) ? Math.max(+n.maxWait || 0, e) : o),
      (p = "trailing" in n ? !!n.trailing : p)),
    (D.cancel = function () {
      u !== void 0 &&
        (function ($) {
          if (g) return window.cancelAnimationFrame($);
          clearTimeout($);
        })(u),
        (d = 0),
        (r = c = i = u = void 0);
    }),
    (D.flush = function () {
      return u === void 0 ? l : k(Date.now());
    }),
    (D.pending = function () {
      return u !== void 0;
    }),
    D
  );
}
function $Dt(t, e, n) {
  var r = !0,
    i = !0;
  if (typeof t != "function") throw new TypeError("Expected a function");
  return (
    J6e(n) &&
      ((r = "leading" in n ? !!n.leading : r),
      (i = "trailing" in n ? !!n.trailing : i)),
    CDt(t, e, { leading: r, trailing: i, maxWait: e })
  );
}
function q6e() {
  var t = (
    document.documentElement.getAttribute("lang") ||
    navigator.language ||
    "zh-cn"
  ).toLocaleLowerCase();
  return t === "zh-cn" && (t = "zh"), t;
}
function xDt(t, e, n) {
  if (t) {
    var r = t.getAttribute(n);
    return !(!r || r !== e || (t.tagName !== "VIDEO" && t.tagName !== "AUDIO"));
  }
}
(Pt.createDom = function () {
  var t =
      arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "div",
    e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
    n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
    r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "",
    i = document.createElement(t);
  return (
    (i.className = r),
    (i.innerHTML = e),
    Dn(n).forEach(function (o) {
      var l = o,
        u = n[o];
      t === "video" || t === "audio" || t === "live-video"
        ? u && i.setAttribute(l, u)
        : i.setAttribute(l, u);
    }),
    i
  );
}),
  (Pt.createDomFromHtml = function (t) {
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
      n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
    try {
      var r = document.createElement("div");
      r.innerHTML = t;
      var i = r.children;
      return (
        (r = null),
        i.length > 0
          ? ((i = i[0]),
            n && Pt.addClass(i, n),
            e &&
              Dn(e).forEach(function (o) {
                i.setAttribute(o, e[o]);
              }),
            i)
          : null
      );
    } catch (o) {
      return Gl.logError("util.createDomFromHtml", o), null;
    }
  }),
  (Pt.hasClass = function (t, e) {
    if (!t || !e) return !1;
    try {
      return Array.prototype.some.call(t.classList, function (r) {
        return r === e;
      });
    } catch {
      var n =
        t.className && sm(t.className) === "object"
          ? t.getAttribute("class")
          : t.className;
      return n && !!n.match(new RegExp("(\\s|^)" + e + "(\\s|$)"));
    }
  }),
  (Pt.addClass = function (t, e) {
    if (t && e)
      try {
        e.replace(/(^\s+|\s+$)/g, "")
          .split(/\s+/g)
          .forEach(function (n) {
            n && t.classList.add(n);
          });
      } catch {
        Pt.hasClass(t, e) ||
          (t.className && sm(t.className) === "object"
            ? t.setAttribute("class", t.getAttribute("class") + " " + e)
            : (t.className += " " + e));
      }
  }),
  (Pt.removeClass = function (t, e) {
    if (t && e)
      try {
        e.replace(/(^\s+|\s+$)/g, "")
          .split(/\s+/g)
          .forEach(function (n) {
            n && t.classList.remove(n);
          });
      } catch {
        Pt.hasClass(t, e) &&
          e.split(/\s+/g).forEach(function (r) {
            var i = new RegExp("(\\s|^)" + r + "(\\s|$)");
            t.className && sm(t.className) === "object"
              ? t.setAttribute("class", t.getAttribute("class").replace(i, " "))
              : (t.className = t.className.replace(i, " "));
          });
      }
  }),
  (Pt.toggleClass = function (t, e) {
    t &&
      e.split(/\s+/g).forEach(function (n) {
        Pt.hasClass(t, n) ? Pt.removeClass(t, n) : Pt.addClass(t, n);
      });
  }),
  (Pt.classNames = function () {
    for (
      var t = arguments,
        e = [],
        n = function (i) {
          if (Pt.typeOf(t[i]) === "String") e.push(t[i]);
          else if (Pt.typeOf(t[i]) === "Object") {
            var o;
            On((o = Dn(t[i]))).call(o, function (l) {
              t[i][l] && e.push(l);
            });
          }
        },
        r = 0;
      r < arguments.length;
      r++
    )
      n(r);
    return e.join(" ");
  }),
  (Pt.findDom = function () {
    var t,
      e =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : document,
      n = arguments.length > 1 ? arguments[1] : void 0;
    try {
      t = e.querySelector(n);
    } catch (r) {
      Gl.logError("util.findDom", r),
        qt(n).call(n, "#") === 0 && (t = e.getElementById(jn(n).call(n, 1)));
    }
    return t;
  }),
  (Pt.getCss = function (t, e) {
    return t.currentStyle
      ? t.currentStyle[e]
      : document.defaultView.getComputedStyle(t, !1)[e];
  }),
  (Pt.padStart = function (t, e, n) {
    for (
      var r = String(n),
        i = e >> 0,
        o = Math.ceil(i / r.length),
        l = [],
        u = String(t);
      o--;

    )
      l.push(r);
    return l.join("").substring(0, i - u.length) + u;
  }),
  (Pt.format = function (t) {
    if (window.isNaN(t)) return "";
    t = Math.round(t);
    var e = FX(Pt).call(Pt, Math.floor(t / 3600), 2, 0),
      n = FX(Pt).call(Pt, Math.floor((t - 3600 * e) / 60), 2, 0),
      r = FX(Pt).call(Pt, Math.floor(t - 3600 * e - 60 * n), 2, 0);
    return (e === "00" ? [n, r] : [e, n, r]).join(":");
  }),
  (Pt.event = function (t) {
    if (t.touches) {
      var e = t.touches[0] || t.changedTouches[0];
      (t.clientX = e.clientX || 0),
        (t.clientY = e.clientY || 0),
        (t.offsetX = e.pageX - e.target.offsetLeft),
        (t.offsetY = e.pageY - e.target.offsetTop);
    }
    t._target = t.target || t.srcElement;
  }),
  (Pt.typeOf = function (t) {
    return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0];
  }),
  (Pt.deepCopy = function (t, e) {
    if (Pt.typeOf(e) === "Object" && Pt.typeOf(t) === "Object")
      return (
        Dn(e).forEach(function (n) {
          if (Pt.typeOf(e[n]) !== "Object" || e[n] instanceof Node)
            if (Pt.typeOf(e[n]) === "Array") {
              var r;
              t[n] =
                Pt.typeOf(t[n]) === "Array"
                  ? Ce((r = t[n])).call(r, e[n])
                  : e[n];
            } else t[n] = e[n];
          else
            t[n] === void 0 || t[n] === void 0
              ? (t[n] = e[n])
              : Pt.deepCopy(t[n], e[n]);
        }),
        t
      );
  }),
  (Pt.deepMerge = function (t, e) {
    var n;
    return (
      On((n = Dn(e))).call(n, function (r) {
        var i;
        Pt.typeOf(e[r]) === "Array" && Pt.typeOf(t[r]) === "Array"
          ? Pt.typeOf(t[r]) === "Array" && (i = t[r]).push.apply(i, H1(e[r]))
          : Pt.typeOf(t[r]) !== Pt.typeOf(e[r]) ||
            t[r] === null ||
            Pt.typeOf(t[r]) !== "Object" ||
            e[r] instanceof window.Node
          ? e[r] !== null && (t[r] = e[r])
          : Pt.deepMerge(t[r], e[r]);
      }),
      t
    );
  }),
  (Pt.getBgImage = function (t) {
    var e = (t.currentStyle || window.getComputedStyle(t, null))
      .backgroundImage;
    if (!e || e === "none") return "";
    var n = document.createElement("a");
    return (n.href = e.replace(/url\("|"\)/g, "")), n.href;
  }),
  (Pt.copyDom = function (t) {
    if (t && t.nodeType === 1) {
      var e = document.createElement(t.tagName);
      return (
        Array.prototype.forEach.call(t.attributes, function (n) {
          e.setAttribute(n.name, n.value);
        }),
        t.innerHTML && (e.innerHTML = t.innerHTML),
        e
      );
    }
    return "";
  }),
  (Pt.setInterval = function (t, e, n, r) {
    t._interval[e] || (t._interval[e] = window.setInterval(n.bind(t), r));
  }),
  (Pt.clearInterval = function (t, e) {
    clearInterval(t._interval[e]), (t._interval[e] = null);
  }),
  (Pt.setTimeout = function (t, e, n) {
    t._timers || (t._timers = []);
    var r = setTimeout(function () {
      e(), Pt.clearTimeout(t, r);
    }, n);
    return t._timers.push(r), r;
  }),
  (Pt.clearTimeout = function (t, e) {
    var n = t._timers;
    if (Pt.typeOf(n) === "Array") {
      for (var r = 0; r < n.length; r++)
        if (n[r] === e) {
          tl(n).call(n, r, 1), clearTimeout(e);
          break;
        }
    } else clearTimeout(e);
  }),
  (Pt.clearAllTimers = function (t) {
    var e = t._timers;
    Pt.typeOf(e) === "Array" &&
      (On(e).call(e, function (n) {
        clearTimeout(n);
      }),
      (t._timerIds = []));
  }),
  (Pt.createImgBtn = function (t, e, n, r) {
    var i,
      o,
      l,
      u,
      c,
      d,
      h,
      f,
      p,
      g,
      y,
      v = Pt.createDom("xg-".concat(t), "", {}, "xgplayer-".concat(t, "-img"));
    return (
      (v.style.backgroundImage = 'url("'.concat(e, '")')),
      n &&
        r &&
        (["px", "rem", "em", "pt", "dp", "vw", "vh", "vm", "%"].every(function (
          b
        ) {
          var w, k;
          return (
            !(qt(n).call(n, b) > -1 && qt(r).call(r, b) > -1) ||
            ((d = wl(es((w = jn(n).call(n, 0, qt(n).call(n, b)))).call(w))),
            (h = wl(es((k = jn(r).call(r, 0, qt(r).call(r, b)))).call(k))),
            (f = b),
            !1)
          );
        }),
        (v.style.width = Ce((i = "".concat(d))).call(i, f)),
        (v.style.height = Ce((o = "".concat(h))).call(o, f)),
        (v.style.backgroundSize = Ce(
          (l = Ce((u = Ce((c = "".concat(d))).call(c, f, " "))).call(u, h))
        ).call(l, f)),
        (v.style.margin =
          t === "start"
            ? Ce(
                (p = Ce(
                  (g = Ce((y = "-".concat(h / 2))).call(y, f, " auto auto -"))
                ).call(g, d / 2))
              ).call(p, f)
            : "auto 5px auto 5px")),
      v
    );
  }),
  (Pt.Hex2RGBA = function (t, e) {
    var n,
      r = [];
    if (/^\#[0-9A-F]{3}$/i.test(t)) {
      var i = "#";
      t.replace(/[0-9A-F]/gi, function (o) {
        i += o + o;
      }),
        (t = i);
    }
    return /^#[0-9A-F]{6}$/i.test(t)
      ? (t.replace(/[0-9A-F]{2}/gi, function (o) {
          r.push(_i(o, 16));
        }),
        Ce((n = "rgba(".concat(r.join(","), ", "))).call(n, e, ")"))
      : "rgba(255, 255, 255, 0.1)";
  }),
  (Pt.getFullScreenEl = function () {
    return (
      document.fullscreenElement ||
      document.webkitFullscreenElement ||
      document.mozFullScreenElement ||
      document.msFullscreenElement
    );
  }),
  (Pt.checkIsFunction = function (t) {
    return t && typeof t == "function";
  }),
  (Pt.checkIsObject = function (t) {
    return t !== null && sm(t) === "object";
  }),
  (Pt.hide = function (t) {
    t.style.display = "none";
  }),
  (Pt.show = function (t, e) {
    t.style.display = e || "block";
  }),
  (Pt.isUndefined = function (t) {
    if (t == null) return !0;
  }),
  (Pt.isNotNull = function (t) {
    return t != null;
  }),
  (Pt.setStyleFromCsstext = function (t, e) {
    if (e)
      if (Pt.typeOf(e) === "String") {
        var n = e.replace(/\s+/g, "").split(";");
        On(n).call(n, function (i) {
          if (i) {
            var o = i.split(":");
            o.length > 1 && (t.style[o[0]] = o[1]);
          }
        });
      } else {
        var r;
        On((r = Dn(e))).call(r, function (i) {
          t.style[i] = e[i];
        });
      }
  }),
  (Pt.filterStyleFromText = function (t) {
    var e,
      n =
        arguments.length > 1 && arguments[1] !== void 0
          ? arguments[1]
          : [
              "width",
              "height",
              "top",
              "left",
              "bottom",
              "right",
              "position",
              "z-index",
              "padding",
              "margin",
              "transform",
            ],
      r = t.style.cssText;
    if (!r) return {};
    var i = r.replace(/\s+/g, "").split(";"),
      o = {},
      l = {};
    return (
      On(i).call(i, function (u) {
        if (u) {
          var c = u.split(":");
          c.length > 1 && (MDt(c[0], n) ? (o[c[0]] = c[1]) : (l[c[0]] = c[1]));
        }
      }),
      t.setAttribute("style", ""),
      On((e = Dn(l))).call(e, function (u) {
        t.style[u] = l[u];
      }),
      o
    );
  }),
  (Pt.getStyleFromCsstext = function (t) {
    var e = t.style.cssText;
    if (!e) return {};
    var n = e.replace(/\s+/g, "").split(";"),
      r = {};
    return (
      On(n).call(n, function (i) {
        if (i) {
          var o = i.split(":");
          o.length > 1 && (r[o[0]] = o[1]);
        }
      }),
      r
    );
  }),
  (Pt.preloadImg = function (t) {
    var e =
        arguments.length > 1 && arguments[1] !== void 0
          ? arguments[1]
          : function () {},
      n =
        arguments.length > 2 && arguments[2] !== void 0
          ? arguments[2]
          : function () {};
    if (t) {
      var r = new window.Image();
      (r.onload = function (i) {
        (r = null), e && e(i);
      }),
        (r.onerror = function (i) {
          (r = null), n && n(i);
        }),
        (r.src = t);
    }
  }),
  (Pt.stopPropagation = function (t) {
    t && t.stopPropagation();
  }),
  (Pt.scrollTop = function () {
    return (
      window.pageYOffset ||
      document.documentElement.scrollTop ||
      document.body.scrollTop ||
      0
    );
  }),
  (Pt.scrollLeft = function () {
    return (
      window.pageXOffset ||
      document.documentElement.scrollLeft ||
      document.body.scrollLeft ||
      0
    );
  }),
  (Pt.checkTouchSupport = function () {
    return "ontouchstart" in window;
  }),
  (Pt.getBuffered2 = function (t) {
    for (
      var e =
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.5,
        n = [],
        r = 0;
      r < t.length;
      r++
    )
      n.push({ start: t.start(r) < 0.5 ? 0 : t.start(r), end: t.end(r) });
    mm(n).call(n, function (c, d) {
      var h = c.start - d.start;
      return h || d.end - c.end;
    });
    var i = [];
    if (e)
      for (var o = 0; o < n.length; o++) {
        var l = i.length;
        if (l) {
          var u = i[l - 1].end;
          n[o].start - u < e
            ? n[o].end > u && (i[l - 1].end = n[o].end)
            : i.push(n[o]);
        } else i.push(n[o]);
      }
    else i = n;
    return new PDt(i);
  }),
  (Pt.getEventPos = function (t) {
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
    return (
      t.touches && t.touches.length > 0 && (t = t.touches[0]),
      {
        x: t.x / e,
        y: t.y / e,
        clientX: t.clientX / e,
        clientY: t.clientY / e,
        offsetX: t.offsetX / e,
        offsetY: t.offsetY / e,
        pageX: t.pageX / e,
        pageY: t.pageY / e,
      }
    );
  }),
  (Pt.requestAnimationFrame = function (t) {
    var e =
      window.requestAnimationFrame ||
      window.webkitRequestAnimationFrame ||
      window.mozRequestAnimationFrame ||
      window.oRequestAnimationFrame ||
      window.msRequestAnimationFrame;
    if (e) return e(t);
  }),
  (Pt.getHostFromUrl = function (t) {
    if (Pt.typeOf(t) !== "String") return "";
    var e = t.split("/"),
      n = "";
    return e.length > 3 && e[2] && (n = e[2]), n;
  }),
  (Pt.cancelAnimationFrame = function (t) {
    var e =
      window.cancelAnimationFrame ||
      window.mozCancelAnimationFrame ||
      window.cancelRequestAnimationFrame;
    e && e(t);
  }),
  (Pt.isMSE = function (t) {
    return (
      t.media && (t = t.media),
      !!(t && t instanceof HTMLMediaElement) &&
        (/^blob/.test(t.currentSrc) || /^blob/.test(t.src))
    );
  }),
  (Pt.isBlob = function (t) {
    return typeof t == "string" && /^blob/.test(t);
  }),
  (Pt.generateSessionId = function () {
    var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0,
      e = new Date().getTime();
    try {
      t = _i(t);
    } catch {
      t = 0;
    }
    return (
      (e += t),
      window.performance &&
        typeof window.performance.now == "function" &&
        (e += _i(window.performance.now())),
      "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (n) {
        var r = (e + 16 * Math.random()) % 16 | 0;
        return (
          (e = Math.floor(e / 16)), (n === "x" ? r : (3 & r) | 8).toString(16)
        );
      })
    );
  }),
  (Pt.createEvent = function (t) {
    var e;
    return (
      typeof window.Event == "function"
        ? (e = new Event(t))
        : (e = document.createEvent("Event")).initEvent(t, !0, !0),
      e
    );
  }),
  (Pt.adjustTimeByDuration = function (t, e, n) {
    return e && t && (t > e || (n && t < e)) ? e : t;
  }),
  (Pt.createPositionBar = function (t, e) {
    var n = Pt.createDom("xg-bar", "", { "data-index": -1 }, t);
    return e.appendChild(n), n;
  }),
  (Pt.getTransformStyle = function () {
    var t,
      e =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : { x: 0, y: 0, scale: 1, rotate: 0 },
      n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
      r = {
        scale: "".concat(e.scale || 1),
        translate: Ce((t = "".concat(e.x || 0, "%, "))).call(t, e.y || 0, "%"),
        rotate: "".concat(e.rotate || 0, "deg"),
      };
    return (
      Dn(r).forEach(function (i) {
        var o,
          l = new RegExp("".concat(i, "\\([^\\(]+\\)"), "g"),
          u = Ce((o = "".concat(i, "("))).call(o, r[i], ")");
        l.test(n)
          ? ((l.lastIndex = -1), (n = n.replace(l, u)))
          : (n += "".concat(u, " "));
      }),
      n
    );
  }),
  (Pt.convertDeg = function (t) {
    return Math.abs(t) <= 1 ? 360 * t : t % 360;
  }),
  (Pt.getIndexByTime = function (t, e) {
    var n = e.length,
      r = -1;
    if (n < 1) return r;
    if (t <= e[0].end || n < 2) r = 0;
    else if (t > e[n - 1].end) r = n - 1;
    else
      for (var i = 1; i < n; i++)
        if (t > e[i - 1].end && t <= e[i].end) {
          r = i;
          break;
        }
    return r;
  }),
  (Pt.getOffsetCurrentTime = function (t, e) {
    var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1,
      r = -1;
    if ((r = n >= 0 && n < e.length ? n : Pt.getIndexByTime(t, e)) < 0)
      return -1;
    var i = e.length,
      o = e[r],
      l = o.start,
      u = o.end,
      c = o.cTime,
      d = o.offset;
    return t < l ? c : t >= l && t <= u ? t - d : t > u && r >= i - 1 ? u : -1;
  }),
  (Pt.getCurrentTimeByOffset = function (t, e) {
    var n = -1;
    if (!e || e.length < 0) return t;
    for (var r = 0; r < e.length; r++)
      if (t <= e[r].duration) {
        n = r;
        break;
      }
    if (n !== -1) {
      var i = e[n].start;
      return n - 1 < 0 ? i + t : i + (t - e[n - 1].duration);
    }
    return t;
  });
var L0e = { android: /(Android)\s([\d.]+)/, ios: /(Version)\/([\d.]+)/ },
  O0e = [
    "avc1.42E01E, mp4a.40.2",
    "avc1.58A01E, mp4a.40.2",
    "avc1.4D401E, mp4a.40.2",
    "avc1.64001E, mp4a.40.2",
    "avc1.42E01E",
    "mp4v.20.8",
    "mp4v.20.8, mp4a.40.2",
    "mp4v.20.240, mp4a.40.2",
  ],
  Na = {
    get device() {
      return Na.os.isPc ? "pc" : "mobile";
    },
    get browser() {
      var t, e;
      if (typeof navigator > "u") return "";
      var n = navigator.userAgent.toLowerCase(),
        r = {
          ie: /rv:([\d.]+)\) like gecko/,
          firefox: /firefox\/([\d.]+)/,
          chrome: /chrome\/([\d.]+)/,
          opera: /opera.([\d.]+)/,
          safari: /version\/([\d.]+).*safari/,
        };
      return Ce((t = [])).call(
        t,
        _r((e = Dn(r))).call(e, function (i) {
          return r[i].test(n);
        })
      )[0];
    },
    get os() {
      if (typeof navigator > "u") return {};
      var t = navigator.userAgent,
        e = /(?:Windows Phone)/.test(t),
        n = /(?:SymbianOS)/.test(t) || e,
        r = /(?:Android)/.test(t),
        i = /(?:Firefox)/.test(t),
        o =
          /(?:iPad|PlayBook)/.test(t) ||
          (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1),
        l = o || (r && !/(?:Mobile)/.test(t)) || (i && /(?:Tablet)/.test(t)),
        u = /(?:iPhone)/.test(t) && !l;
      return {
        isTablet: l,
        isPhone: u,
        isIpad: o,
        isIos: u || o,
        isAndroid: r,
        isPc: !(u || r || n || l),
        isSymbian: n,
        isWindowsPhone: e,
        isFireFox: i,
      };
    },
    get osVersion() {
      if (typeof navigator > "u") return 0;
      var t = navigator.userAgent,
        e = "",
        n = (e = /(?:iPhone)|(?:iPad|PlayBook)/.test(t) ? L0e.ios : L0e.android)
          ? e.exec(t)
          : [];
      if (n && n.length >= 3) {
        var r = n[2].split(".");
        return r.length > 0 ? _i(r[0]) : 0;
      }
      return 0;
    },
    get isWeixin() {
      return typeof navigator > "u"
        ? !1
        : !!/(micromessenger)\/([\d.]+)/.exec(
            navigator.userAgent.toLocaleLowerCase()
          );
    },
    isSupportMP4: function () {
      var t = { isSupport: !1, mime: "" };
      if (typeof document > "u") return t;
      if (this.supportResult) return this.supportResult;
      var e = document.createElement("video");
      return (
        typeof e.canPlayType == "function" &&
          On(O0e).call(O0e, function (n) {
            e.canPlayType('video/mp4; codecs="'.concat(n, '"')) ===
              "probably" && ((t.isSupport = !0), (t.mime += "||".concat(n)));
          }),
        (this.supportResult = t),
        (e = null),
        t
      );
    },
    isMSESupport: function () {
      var t =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
      if (typeof MediaSource > "u" || !MediaSource) return !1;
      try {
        return MediaSource.isTypeSupported(t);
      } catch (e) {
        return this._logger.error(t, e), !1;
      }
    },
    isHevcSupported: function () {
      return (
        !(typeof MediaSource > "u" || !MediaSource.isTypeSupported) &&
        (MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))
      );
    },
    probeConfigSupported: function (t) {
      var e = { supported: !1, smooth: !1, powerEfficient: !1 };
      if (!t || typeof navigator > "u") return Ar.resolve(e);
      if (
        navigator.mediaCapabilities &&
        navigator.mediaCapabilities.decodingInfo
      )
        return navigator.mediaCapabilities.decodingInfo(t);
      var n = t.video || {},
        r = t.audio || {};
      try {
        var i = MediaSource.isTypeSupported(n.contentType),
          o = MediaSource.isTypeSupported(r.contentType);
        return Ar.resolve({
          supported: i && o,
          smooth: !1,
          powerEfficient: !1,
        });
      } catch {
        return Ar.resolve(e);
      }
    },
  },
  Eee = "3.0.21-rc.21",
  G0e = {
    1: "media",
    2: "media",
    3: "media",
    4: "media",
    5: "media",
    6: "media",
  },
  N0e = { 1: 5101, 2: 5102, 3: 5103, 4: 5104, 5: 5105, 6: 5106 },
  See = Xs(function t(e) {
    var n =
      arguments.length > 1 && arguments[1] !== void 0
        ? arguments[1]
        : {
            errorType: "",
            errorCode: 0,
            errorMessage: "",
            originError: "",
            ext: {},
            mediaError: null,
          };
    Hs(this, t);
    var r = e && e.i18n ? e.i18n.ERROR_TYPES : null;
    if (e.media) {
      var i,
        o = n.mediaError ? n.mediaError : e.media.error || {},
        l = e.duration,
        u = e.currentTime,
        c = e.ended,
        d = e.src,
        h = e.currentSrc,
        f = e.media,
        p = f.readyState,
        g = f.networkState,
        y = n.errorCode || o.code;
      N0e[y] && (y = N0e[y]);
      var v = {
        playerVersion: Eee,
        currentTime: u,
        duration: l,
        ended: c,
        readyState: p,
        networkState: g,
        src: d || h,
        errorType: n.errorType,
        errorCode: y,
        message: n.errorMessage || o.message,
        mediaError: o,
        originError: n.originError ? n.originError.stack : "",
        host: Pt.getHostFromUrl(d || h),
      };
      return (
        n.ext &&
          On((i = Dn(n.ext))).call(i, function (D) {
            v[D] = n.ext[D];
          }),
        v
      );
    }
    if (arguments.length > 1) {
      for (
        var b = { playerVersion: Eee, domain: document.domain },
          w = [
            "errorType",
            "currentTime",
            "duration",
            "networkState",
            "readyState",
            "src",
            "currentSrc",
            "ended",
            "errd",
            "errorCode",
            "mediaError",
          ],
          k = 0;
        k < arguments.length;
        k++
      )
        b[w[k]] = arguments[k];
      return (b.ex = r ? (r[arguments[0]] || {}).msg : ""), b;
    }
  }),
  C0 = "play",
  LDt = "playing",
  gse = "ended",
  Z9 = "pause",
  Kk = "error",
  ODt = "seeking",
  gF = "seeked",
  HC = "timeupdate",
  eUe = "waiting",
  lm = "canplay",
  GDt = "canplaythrough",
  mse = "durationchange",
  Z6 = "volumechange",
  Y6 = "loadeddata",
  NDt = "loadedmetadata",
  FDt = "ratechange",
  UDt = "progress",
  BDt = "loadstart",
  tUe = "emptied",
  HDt = "stalled",
  XDt = "suspend",
  VDt = "abort",
  zDt = "bufferedChange",
  yse = "focus",
  nUe = "blur",
  vse = "ready",
  rUe = "urlNull",
  NT = "autoplay_started",
  CI = "autoplay_was_prevented",
  Y9 = "complete",
  iUe = "replay",
  aUe = "destroy",
  bse = "urlchange",
  oUe = "download_speed_change",
  sUe = "leaveplayer",
  lUe = "enterplayer",
  uUe = "loading",
  m0 = "fullscreen_change",
  Q6 = "cssFullscreen_change",
  mx = "mini_state_change",
  _se = "definition_change",
  cUe = "before_definition_change",
  J6 = "after_definition_change",
  jDt = "SEI_PARSED",
  dUe = "retry",
  Tse = "video_resize",
  q6 = "pip_change",
  WDt = "rotate",
  KDt = "screenShot",
  hUe = "playnext",
  fUe = "shortcut",
  ZDt = "xglog",
  eU = "user_action",
  Ese = "reset",
  pUe = "source_error",
  gUe = "source_success",
  YDt = "switch_subtitle",
  Ree = [
    "play",
    "playing",
    "ended",
    "pause",
    "error",
    "seeking",
    "seeked",
    "timeupdate",
    "waiting",
    "canplay",
    "canplaythrough",
    "durationchange",
    "volumechange",
    "loadeddata",
    "loadedmetadata",
    "ratechange",
    "progress",
    "loadstart",
    "emptied",
    "stalled",
    "suspend",
    "abort",
    "lowdecode",
  ],
  QDt = {
    STATS_INFO: "stats_info",
    STATS_DOWNLOAD: "stats_download",
    STATS_RESET: "stats_reset",
  },
  JDt = "fps_stuck",
  qDt = Object.freeze({
    __proto__: null,
    ABORT: VDt,
    AFTER_DEFINITION_CHANGE: J6,
    AUTOPLAY_PREVENTED: CI,
    AUTOPLAY_STARTED: NT,
    BEFORE_DEFINITION_CHANGE: cUe,
    BUFFER_CHANGE: zDt,
    CANPLAY: lm,
    CANPLAY_THROUGH: GDt,
    COMPLETE: Y9,
    CSS_FULLSCREEN_CHANGE: Q6,
    DEFINITION_CHANGE: _se,
    DESTROY: aUe,
    DOWNLOAD_SPEED_CHANGE: oUe,
    DURATION_CHANGE: mse,
    EMPTIED: tUe,
    ENDED: gse,
    ENTER_PLAYER: lUe,
    ERROR: Kk,
    FPS_STUCK: JDt,
    FULLSCREEN_CHANGE: m0,
    LEAVE_PLAYER: sUe,
    LOADED_DATA: Y6,
    LOADED_METADATA: NDt,
    LOADING: uUe,
    LOAD_START: BDt,
    MINI_STATE_CHANGE: mx,
    PAUSE: Z9,
    PIP_CHANGE: q6,
    PLAY: C0,
    PLAYER_BLUR: nUe,
    PLAYER_FOCUS: yse,
    PLAYING: LDt,
    PLAYNEXT: hUe,
    PROGRESS: UDt,
    RATE_CHANGE: FDt,
    READY: vse,
    REPLAY: iUe,
    RESET: Ese,
    RETRY: dUe,
    ROTATE: WDt,
    SCREEN_SHOT: KDt,
    SEEKED: gF,
    SEEKING: ODt,
    SEI_PARSED: jDt,
    SHORTCUT: fUe,
    SOURCE_ERROR: pUe,
    SOURCE_SUCCESS: gUe,
    STALLED: HDt,
    STATS_EVENTS: QDt,
    SUSPEND: XDt,
    SWITCH_SUBTITLE: YDt,
    TIME_UPDATE: HC,
    URL_CHANGE: bse,
    URL_NULL: rUe,
    USER_ACTION: eU,
    VIDEO_EVENTS: Ree,
    VIDEO_RESIZE: Tse,
    VOLUME_CHANGE: Z6,
    WAITING: eUe,
    XGLOG: ZDt,
  });
function VX(t, e) {
  this &&
    this.emit &&
    (t === "error" ? this.errorHandler(t, e.error) : this.emit(t, e));
}
function ePt(t, e) {
  return function (n, r) {
    var i = {
      player: e,
      eventName: t,
      originalEvent: n,
      detail: n.detail || {},
      timeStamp: n.timeStamp,
      currentTime: e.currentTime,
      duration: e.duration,
      paused: e.paused,
      ended: e.ended,
      isInternalOp: !!e._internalOp[n.type],
      muted: e.muted,
      volume: e.volume,
      host: Pt.getHostFromUrl(e.currentSrc),
      vtype: e.vtype,
    };
    if (
      (e.removeInnerOP(n.type),
      t === "timeupdate" && (e._currentTime = e.media && e.media.currentTime),
      t === "ratechange")
    ) {
      var o = e.media ? e.media.playbackRate : 0;
      if (o && e._rate === o) return;
      e._rate = e.media && e.media.playbackRate;
    }
    if (
      (t === "durationchange" && (e._duration = e.media.duration),
      t === "volumechange" &&
        ((i.isMutedChange = e._lastMuted !== e.muted),
        (e._lastMuted = e.muted)),
      t === "error" && (i.error = r || e.video.error),
      e.mediaEventMiddleware[t])
    ) {
      var l = VX.bind(e, t, i);
      try {
        e.mediaEventMiddleware[t].call(e, i, l);
      } catch (u) {
        throw (VX.call(e, t, i), u);
      }
    } else VX.call(e, t, i);
  };
}
var tPt = (function (t) {
    ju(n, z6e);
    var e = Wu(n);
    function n(r) {
      var i;
      Hs(this, n),
        ((i = e.call(this, r))._hasStart = !1),
        (i._currentTime = 0),
        (i._duration = 0),
        (i._internalOp = {}),
        (i._lastMuted = !1),
        (i.vtype = "MP4"),
        (i._rate = -1),
        (i.mediaConfig = Ci(
          {},
          {
            controls: !1,
            autoplay: r.autoplay,
            playsinline: r.playsinline,
            "x5-playsinline": r.playsinline,
            "webkit-playsinline": r.playsinline,
            "x5-video-player-fullscreen":
              r["x5-video-player-fullscreen"] || r.x5VideoPlayerFullscreen,
            "x5-video-orientation":
              r["x5-video-orientation"] || r.x5VideoOrientation,
            airplay: r.airplay,
            "webkit-airplay": r.airplay,
            tabindex: 0 | r.tabindex,
            mediaType: r.mediaType || "video",
            "data-index": -1,
          },
          r.videoConfig,
          r.videoAttributes
        ));
      var o = r["x5-video-player-type"] || r.x5VideoPlayerType;
      return (
        Na.isWeixin &&
          Na.os.isAndroid &&
          o &&
          ((i.mediaConfig["x5-video-player-type"] = o),
          delete i.mediaConfig.playsinline,
          delete i.mediaConfig["webkit-playsinline"],
          delete i.mediaConfig["x5-playsinline"]),
        r.loop && (i.mediaConfig.loop = "loop"),
        r.autoplayMuted &&
          !Object.prototype.hasOwnProperty.call(i.mediaConfig, "muted") &&
          (i.mediaConfig.muted = !0),
        (i.media =
          r.mediaEl instanceof HTMLMediaElement
            ? r.mediaEl
            : typeof r.mediaEl == "function"
            ? r.mediaEl(i.mediaConfig)
            : Pt.createDom(i.mediaConfig.mediaType, "", i.mediaConfig, "")),
        r.defaultPlaybackRate &&
          (i.media.defaultPlaybackRate = i.media.playbackRate =
            r.defaultPlaybackRate),
        Pt.typeOf(r.volume) === "Number" && (i.volume = r.volume),
        r.autoplayMuted && ((i.media.muted = !0), (i._lastMuted = !0)),
        r.autoplay && (i.media.autoplay = !0),
        r.playsinline && (i.media.playsinline = !0),
        (i._interval = {}),
        (i.mediaEventMiddleware = {}),
        i.attachVideoEvents(),
        i
      );
    }
    return (
      Xs(n, [
        {
          key: "setEventsMiddleware",
          value: function (r) {
            var i,
              o = this;
            On((i = Dn(r))).call(i, function (l) {
              o.mediaEventMiddleware[l] = r[l];
            });
          },
        },
        {
          key: "removeEventsMiddleware",
          value: function (r) {
            var i,
              o = this;
            On((i = Dn(r))).call(i, function (l) {
              delete o.mediaEventMiddleware[l];
            });
          },
        },
        {
          key: "attachVideoEvents",
          value: function () {
            var r = this,
              i =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : this.media;
            this._evHandlers ||
              (this._evHandlers = On(Ree).call(Ree, function (o) {
                var l,
                  u = Ce((l = "on".concat(o.charAt(0).toUpperCase()))).call(
                    l,
                    jn(o).call(o, 1)
                  );
                return (
                  typeof r[u] == "function" && r.on(o, r[u]),
                  Va({}, o, ePt(o, r))
                );
              })),
              this._evHandlers.forEach(function (o) {
                var l = Dn(o)[0];
                i.addEventListener(l, o[l], !1);
              });
          },
        },
        {
          key: "detachVideoEvents",
          value: function () {
            var r = this,
              i =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : this.media;
            this._evHandlers.forEach(function (o) {
              var l = Dn(o)[0];
              i.removeEventListener(l, o[l], !1);
            }),
              this._evHandlers.forEach(function (o) {
                var l,
                  u = Dn(o)[0],
                  c = Ce((l = "on".concat(u.charAt(0).toUpperCase()))).call(
                    l,
                    jn(u).call(u, 1)
                  );
                typeof r[c] == "function" && r.off(u, r[c]);
              }),
              (this._evHandlers = null);
          },
        },
        {
          key: "_attachSourceEvents",
          value: function (r, i) {
            var o = this;
            r.removeAttribute("src"),
              r.load(),
              i.forEach(function (h, f) {
                o.media.appendChild(
                  Pt.createDom("source", "", {
                    src: "".concat(h.src),
                    type: "".concat(h.type || ""),
                    "data-index": f + 1,
                  })
                );
              });
            var l = r.children;
            if (l) {
              (this._videoSourceCount = l.length),
                (this._videoSourceIndex = l.length),
                (this._vLoadeddata = function (h) {
                  o.emit(gUe, {
                    src: h.target.currentSrc,
                    host: Pt.getHostFromUrl(h.target.currentSrc),
                  });
                });
              for (var u = null, c = 0; c < this._evHandlers.length; c++)
                if (Dn(this._evHandlers[c])[0] === "error") {
                  u = this._evHandlers[c];
                  break;
                }
              !this._sourceError &&
                (this._sourceError = function (h) {
                  var f = _i(h.target.getAttribute("data-index"), 10);
                  if (
                    (o._videoSourceIndex--,
                    o._videoSourceIndex === 0 || f >= o._videoSourceCount)
                  ) {
                    var p = { code: 4, message: "sources_load_error" };
                    u ? u.error(h, p) : o.errorHandler("error", p);
                  }
                  var g = G0e[4];
                  o.emit(
                    pUe,
                    new See(o, {
                      errorType: g,
                      errorCode: 4,
                      errorMessage: "sources_load_error",
                      mediaError: { code: 4, message: "sources_load_error" },
                      src: h.target.src,
                    })
                  );
                });
              for (var d = 0; d < l.length; d++)
                l[d].addEventListener("error", this._sourceError);
              r.addEventListener("loadeddata", this._vLoadeddata);
            }
          },
        },
        {
          key: "_detachSourceEvents",
          value: function (r) {
            var i = r.children;
            if (i && i.length !== 0 && this._sourceError) {
              for (var o = 0; o < i.length; o++)
                i[o].removeEventListener("error", this._sourceError);
              for (; i.length > 0; ) r.removeChild(i[0]);
              this._vLoadeddata &&
                r.removeEventListener("loadeddata", this._vLoadeddata);
            }
          },
        },
        {
          key: "errorHandler",
          value: function (r) {
            var i =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : null;
            if (this.media && (this.media.error || i)) {
              var o = this.media.error || i,
                l = o.code ? G0e[o.code] : "other";
              o.message,
                this.media.currentSrc ||
                  this.media.srcObject ||
                  (o = { code: 6, message: "empty_src" }),
                this.emit(
                  r,
                  new See(this, {
                    errorType: l,
                    errorCode: o.code,
                    errorMessage: o.message || "",
                    mediaError: o,
                  })
                );
            }
          },
        },
        {
          key: "destroy",
          value: function () {
            for (var r in (this.media &&
              (this.media.pause &&
                (this.media.pause(), (this.media.muted = !0)),
              this.media.removeAttribute("src"),
              this.media.load()),
            (this._currentTime = 0),
            (this._duration = 0),
            (this.mediaConfig = null),
            this._interval))
              Object.prototype.hasOwnProperty.call(this._interval, r) &&
                (clearInterval(this._interval[r]), (this._interval[r] = null));
            this.detachVideoEvents(),
              (this.media = null),
              (this.mediaEventMiddleware = {}),
              this.removeAllListeners();
          },
        },
        {
          key: "video",
          get: function () {
            return this.media;
          },
          set: function (r) {
            this.media = r;
          },
        },
        {
          key: "play",
          value: function () {
            return this.media ? this.media.play() : null;
          },
        },
        {
          key: "pause",
          value: function () {
            this.media && this.media.pause();
          },
        },
        {
          key: "load",
          value: function () {
            this.media && this.media.load();
          },
        },
        {
          key: "canPlayType",
          value: function (r) {
            return !!this.media && this.media.canPlayType(r);
          },
        },
        {
          key: "getBufferedRange",
          value: function (r) {
            var i = [0, 0];
            if (!this.media) return i;
            r || (r = this.media.buffered);
            var o = this.media.currentTime;
            if (r)
              for (
                var l = 0, u = r.length;
                l < u &&
                ((i[0] = r.start(l)),
                (i[1] = r.end(l)),
                !(i[0] <= o && o <= i[1]));
                l++
              );
            return i[0] - o <= 0 && o - i[1] <= 0 ? i : [0, 0];
          },
        },
        {
          key: "autoplay",
          get: function () {
            return !!this.media && this.media.autoplay;
          },
          set: function (r) {
            this.media && (this.media.autoplay = r);
          },
        },
        {
          key: "buffered",
          get: function () {
            return this.media ? this.media.buffered : null;
          },
        },
        {
          key: "buffered2",
          get: function () {
            return this.media && this.media.buffered
              ? Pt.getBuffered2(this.media.buffered)
              : null;
          },
        },
        {
          key: "bufferedPoint",
          get: function () {
            var r = { start: 0, end: 0 };
            if (!this.media) return r;
            var i = this.media.buffered;
            if (!i || i.length === 0) return r;
            for (var o = 0; o < i.length; o++)
              if (
                (i.start(o) <= this.currentTime || i.start(o) < 0.1) &&
                i.end(o) >= this.currentTime
              )
                return { start: i.start(o), end: i.end(o) };
            return r;
          },
        },
        {
          key: "crossOrigin",
          get: function () {
            return this.media ? this.media.crossOrigin : "";
          },
          set: function (r) {
            this.media && (this.media.crossOrigin = r);
          },
        },
        {
          key: "currentSrc",
          get: function () {
            return this.media ? this.media.currentSrc : "";
          },
          set: function (r) {
            this.media && (this.media.currentSrc = r);
          },
        },
        {
          key: "currentTime",
          get: function () {
            return this.media
              ? this.media.currentTime !== void 0
                ? this.media.currentTime
                : this._currentTime
              : 0;
          },
          set: function (r) {
            this.media && (this.media.currentTime = r);
          },
        },
        {
          key: "defaultMuted",
          get: function () {
            return !!this.media && this.media.defaultMuted;
          },
          set: function (r) {
            this.media && (this.media.defaultMuted = r);
          },
        },
        {
          key: "duration",
          get: function () {
            return this._duration;
          },
        },
        {
          key: "ended",
          get: function () {
            return !!this.media && this.media.ended;
          },
        },
        {
          key: "error",
          get: function () {
            return this.media.error;
          },
        },
        {
          key: "errorNote",
          get: function () {
            return this.media.error
              ? [
                  "MEDIA_ERR_ABORTED",
                  "MEDIA_ERR_NETWORK",
                  "MEDIA_ERR_DECODE",
                  "MEDIA_ERR_SRC_NOT_SUPPORTED",
                ][this.media.error.code - 1]
              : "";
          },
        },
        {
          key: "loop",
          get: function () {
            return !!this.media && this.media.loop;
          },
          set: function (r) {
            this.media && (this.media.loop = r);
          },
        },
        {
          key: "muted",
          get: function () {
            return !!this.media && this.media.muted;
          },
          set: function (r) {
            this.media &&
              this.media.muted !== r &&
              ((this._lastMuted = this.media.muted), (this.media.muted = r));
          },
        },
        {
          key: "networkState",
          get: function () {
            return this.media.networkState;
          },
        },
        {
          key: "paused",
          get: function () {
            return !this.media || this.media.paused;
          },
        },
        {
          key: "playbackRate",
          get: function () {
            return this.media ? this.media.playbackRate : 0;
          },
          set: function (r) {
            this.media &&
              r !== 1 / 0 &&
              ((this.media.defaultPlaybackRate = r),
              (this.media.playbackRate = r));
          },
        },
        {
          key: "played",
          get: function () {
            return this.media ? this.media.played : null;
          },
        },
        {
          key: "preload",
          get: function () {
            return !!this.media && this.media.preload;
          },
          set: function (r) {
            this.media && (this.media.preload = r);
          },
        },
        {
          key: "readyState",
          get: function () {
            return this.media.readyState;
          },
        },
        {
          key: "seekable",
          get: function () {
            return !!this.media && this.media.seekable;
          },
        },
        {
          key: "seeking",
          get: function () {
            return !!this.media && this.media.seeking;
          },
        },
        {
          key: "src",
          get: function () {
            return this.media ? this.media.src : "";
          },
          set: function (r) {
            this.media &&
              (this.emit(bse, r),
              this.emit(eUe),
              (this._currentTime = 0),
              (this._duration = 0),
              Pt.isMSE(this.media)
                ? this.onWaiting()
                : (this._detachSourceEvents(this.media),
                  Pt.typeOf(r) === "Array"
                    ? this._attachSourceEvents(this.media, r)
                    : r
                    ? (this.media.src = r)
                    : this.media.removeAttribute("src"),
                  this.load()));
          },
        },
        {
          key: "volume",
          get: function () {
            return this.media ? this.media.volume : 0;
          },
          set: function (r) {
            r !== 1 / 0 && this.media && (this.media.volume = r);
          },
        },
        {
          key: "aspectRatio",
          get: function () {
            return this.media
              ? this.media.videoWidth / this.media.videoHeight
              : 0;
          },
        },
        {
          key: "addInnerOP",
          value: function (r) {
            this._internalOp[r] = !0;
          },
        },
        {
          key: "removeInnerOP",
          value: function (r) {
            delete this._internalOp[r];
          },
        },
        {
          key: "emit",
          value: function (r, i) {
            for (
              var o,
                l,
                u = arguments.length,
                c = new Array(u > 2 ? u - 2 : 0),
                d = 2;
              d < u;
              d++
            )
              c[d - 2] = arguments[d];
            (l = Al(el(n.prototype), "emit", this)).call.apply(
              l,
              Ce((o = [this, r, i])).call(o, c)
            );
          },
        },
        {
          key: "on",
          value: function (r, i) {
            for (
              var o,
                l,
                u = arguments.length,
                c = new Array(u > 2 ? u - 2 : 0),
                d = 2;
              d < u;
              d++
            )
              c[d - 2] = arguments[d];
            (l = Al(el(n.prototype), "on", this)).call.apply(
              l,
              Ce((o = [this, r, i])).call(o, c)
            );
          },
        },
        {
          key: "once",
          value: function (r, i) {
            for (
              var o,
                l,
                u = arguments.length,
                c = new Array(u > 2 ? u - 2 : 0),
                d = 2;
              d < u;
              d++
            )
              c[d - 2] = arguments[d];
            (l = Al(el(n.prototype), "once", this)).call.apply(
              l,
              Ce((o = [this, r, i])).call(o, c)
            );
          },
        },
        {
          key: "off",
          value: function (r, i) {
            for (
              var o,
                l,
                u = arguments.length,
                c = new Array(u > 2 ? u - 2 : 0),
                d = 2;
              d < u;
              d++
            )
              c[d - 2] = arguments[d];
            (l = Al(el(n.prototype), "off", this)).call.apply(
              l,
              Ce((o = [this, r, i])).call(o, c)
            );
          },
        },
        {
          key: "offAll",
          value: function () {
            Al(el(n.prototype), "removeAllListeners", this).call(this);
          },
        },
      ]),
      n
    );
  })(),
  nPt = (function () {
    function t() {
      var e =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : {
              name: "xgplayer",
              version: 1,
              db: null,
              ojstore: { name: "xg-m4a", keypath: "vid" },
            };
      Hs(this, t),
        (this.indexedDB = window.indexedDB || window.webkitindexedDB),
        (this.IDBKeyRange = window.IDBKeyRange || window.webkitIDBKeyRange),
        (this.myDB = e);
    }
    return (
      Xs(t, [
        {
          key: "openDB",
          value: function (e) {
            var n = this,
              r = this,
              i = this.myDB.version || 1,
              o = r.indexedDB.open(r.myDB.name, i);
            (o.onerror = function (l) {}),
              (o.onsuccess = function (l) {
                (n.myDB.db = l.target.result), e.call(r);
              }),
              (o.onupgradeneeded = function (l) {
                var u = l.target.result;
                l.target.transaction,
                  u.objectStoreNames.contains(r.myDB.ojstore.name) ||
                    u.createObjectStore(r.myDB.ojstore.name, {
                      keyPath: r.myDB.ojstore.keypath,
                    });
              });
          },
        },
        {
          key: "deletedb",
          value: function () {
            this.indexedDB.deleteDatabase(this.myDB.name);
          },
        },
        {
          key: "closeDB",
          value: function () {
            this.myDB.db.close();
          },
        },
        {
          key: "addData",
          value: function (e, n) {
            for (
              var r,
                i = this.myDB.db.transaction(e, "readwrite").objectStore(e),
                o = 0;
              o < n.length;
              o++
            )
              ((r = i.add(n[o])).onerror = function () {}),
                (r.onsuccess = function () {});
          },
        },
        {
          key: "putData",
          value: function (e, n) {
            for (
              var r,
                i = this.myDB.db.transaction(e, "readwrite").objectStore(e),
                o = 0;
              o < n.length;
              o++
            )
              ((r = i.put(n[o])).onerror = function () {}),
                (r.onsuccess = function () {});
          },
        },
        {
          key: "getDataByKey",
          value: function (e, n, r) {
            var i = this,
              o = this.myDB.db
                .transaction(e, "readwrite")
                .objectStore(e)
                .get(n);
            (o.onerror = function () {
              r.call(i, null);
            }),
              (o.onsuccess = function (l) {
                var u = l.target.result;
                r.call(i, u);
              });
          },
        },
        {
          key: "deleteData",
          value: function (e, n) {
            this.myDB.db.transaction(e, "readwrite").objectStore(e).delete(n);
          },
        },
        {
          key: "clearData",
          value: function (e) {
            this.myDB.db.transaction(e, "readwrite").objectStore(e).clear();
          },
        },
      ]),
      t
    );
  })(),
  F0e = [
    "fullscreenchange",
    "webkitfullscreenchange",
    "mozfullscreenchange",
    "MSFullscreenChange",
  ],
  U0e = [
    "requestFullscreen",
    "webkitRequestFullscreen",
    "mozRequestFullScreen",
    "msRequestFullscreen",
  ],
  B0e = [
    "exitFullscreen",
    "webkitExitFullscreen",
    "mozCancelFullScreen",
    "msExitFullscreen",
  ],
  pT = "data-xgplayerid";
function zG(t, e, n) {
  for (
    var r, i = arguments.length, o = new Array(i > 3 ? i - 3 : 0), l = 3;
    l < i;
    l++
  )
    o[l - 3] = arguments[l];
  var u,
    c = e.call.apply(e, Ce((r = [t])).call(r, o));
  n &&
    typeof n == "function" &&
    (c && c.then
      ? c.then(function () {
          for (var d, h = arguments.length, f = new Array(h), p = 0; p < h; p++)
            f[p] = arguments[p];
          n.call.apply(n, Ce((d = [t])).call(d, f));
        })
      : n.call.apply(n, Ce((u = [t])).call(u, o)));
}
function tU(t, e) {
  var n =
    arguments.length > 2 && arguments[2] !== void 0
      ? arguments[2]
      : { pre: null, next: null };
  return (
    this.__hooks || (this.__hooks = {}),
    !this.__hooks[t] && (this.__hooks[t] = null),
    function () {
      var r,
        i = arguments,
        o = this;
      if (n.pre)
        try {
          var l, u;
          (u = n.pre).call.apply(
            u,
            Ce((l = [this])).call(l, jn(Array.prototype).call(arguments))
          );
        } catch (v) {
          var c, d;
          throw (
            ((v.message = Ce(
              (c = Ce((d = "[pluginName: ".concat(this.pluginName, ":"))).call(
                d,
                t,
                ":pre error] >> "
              ))
            ).call(c, v.message)),
            v)
          );
        }
      if (this.__hooks && this.__hooks[t])
        try {
          var h,
            f = qy(this, t, e);
          if (f)
            f.then
              ? f
                  .then(function (v) {
                    var b;
                    v !== !1 &&
                      zG.apply(void 0, Ce((b = [o, e, n.next])).call(b, H1(i)));
                  })
                  .catch(function (v) {
                    throw v;
                  })
              : zG.apply(
                  void 0,
                  Ce((h = [this, e, n.next])).call(
                    h,
                    jn(Array.prototype).call(arguments)
                  )
                );
          else if (f === void 0) {
            var p;
            zG.apply(
              void 0,
              Ce((p = [this, e, n.next])).call(
                p,
                jn(Array.prototype).call(arguments)
              )
            );
          }
        } catch (v) {
          var g, y;
          throw (
            ((v.message = Ce(
              (g = Ce((y = "[pluginName: ".concat(this.pluginName, ":"))).call(
                y,
                t,
                "] >> "
              ))
            ).call(g, v.message)),
            v)
          );
        }
      else
        zG.apply(
          void 0,
          Ce((r = [this, e, n.next])).call(
            r,
            jn(Array.prototype).call(arguments)
          )
        );
    }.bind(this)
  );
}
function mUe(t, e) {
  var n = this.__hooks;
  if (!n || !Array.isArray(n[t])) return -1;
  for (var r = n[t], i = 0; i < r.length; i++) if (r[i] === e) return i;
  return -1;
}
function nU(t, e) {
  var n = this.__hooks;
  if (n)
    return n.hasOwnProperty(t)
      ? (Array.isArray(n[t]) || (n[t] = []),
        mUe.call(this, t, e) === -1 && n[t].push(e),
        !0)
      : (console.warn("has no supported hook which name [".concat(t, "]")), !1);
}
function rU(t, e) {
  var n = this.__hooks;
  if (n)
    if (Array.isArray(n[t])) {
      var r = n[t],
        i = mUe.call(this, t, e);
      i !== -1 && tl(r).call(r, i, 1);
    } else n[t] && (n[t] = null);
}
function H0e(t) {
  if (this.plugins && this.plugins[t.toLowerCase()]) {
    for (
      var e = this.plugins[t.toLowerCase()],
        n = arguments.length,
        r = new Array(n > 1 ? n - 1 : 0),
        i = 1;
      i < n;
      i++
    )
      r[i - 1] = arguments[i];
    return e.useHooks && e.useHooks.apply(e, r);
  }
}
function X0e(t) {
  if (this.plugins && this.plugins[t.toLowerCase()]) {
    var e = this.plugins[t.toLowerCase()];
    if (e) {
      for (
        var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
        i < n;
        i++
      )
        r[i - 1] = arguments[i];
      return e.removeHooks && e.removeHooks.apply(e, r);
    }
  }
}
function yUe(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  (t.__hooks = {}),
    e &&
      On(e).call(e, function (n) {
        t.__hooks[n] = null;
      }),
    ea(t, "hooks", {
      get: function () {
        var n;
        return (
          t.__hooks &&
          On((n = Dn(t.__hooks))).call(n, function (r) {
            if (t.__hooks[r]) return r;
          })
        );
      },
    });
}
function vUe(t) {
  t.__hooks = null;
}
function qy(t, e, n) {
  for (
    var r = arguments.length, i = new Array(r > 3 ? r - 3 : 0), o = 3;
    o < r;
    o++
  )
    i[o - 3] = arguments[o];
  if (t.__hooks && Array.isArray(t.__hooks[e])) {
    var l,
      u = t.__hooks[e],
      c = -1;
    return function h(f, p, g) {
      for (
        var y, v, b = arguments.length, w = new Array(b > 3 ? b - 3 : 0), k = 3;
        k < b;
        k++
      )
        w[k - 3] = arguments[k];
      if ((c++, u.length === 0 || c === u.length))
        return g.call.apply(g, Ce((v = [f, f])).call(v, w));
      var D,
        $ = u[c],
        N = $.call.apply($, Ce((y = [f, f])).call(y, w));
      return N && N.then
        ? N.then(function (P) {
            var I;
            return P === !1
              ? null
              : h.apply(void 0, Ce((I = [f, p, g])).call(I, w));
          }).catch(function (P) {
            console.warn("[runHooks]".concat(p, " reject"), P.message);
          })
        : N !== !1
        ? h.apply(void 0, Ce((D = [f, p, g])).call(D, w))
        : void 0;
    }.apply(void 0, Ce((l = [t, e, n])).call(l, i));
  }
  var d;
  return n.call.apply(n, Ce((d = [t, t])).call(d, i));
}
function zX(t, e) {
  var n;
  Gl.logError(
    Ce(
      (n = "[".concat(
        t,
        "] event or callback cant be undefined or null when call "
      ))
    ).call(n, e)
  );
}
var $I = (function () {
    function t(e) {
      Hs(this, t),
        Pt.checkIsFunction(this.beforeCreate) && this.beforeCreate(e),
        yUe(this),
        (this.__args = e),
        (this.__events = {}),
        (this.__onceEvents = {}),
        (this.config = e.config || {}),
        (this.player = null),
        (this.playerConfig = {}),
        (this.pluginName = ""),
        this.__init(e);
    }
    return (
      Xs(
        t,
        [
          { key: "beforeCreate", value: function (e) {} },
          { key: "afterCreate", value: function () {} },
          { key: "beforePlayerInit", value: function () {} },
          { key: "onPluginsReady", value: function () {} },
          { key: "afterPlayerInit", value: function () {} },
          { key: "destroy", value: function () {} },
          {
            key: "__init",
            value: function (e) {
              (this.player = e.player),
                (this.playerConfig = e.player && e.player.config),
                (this.pluginName = e.pluginName
                  ? e.pluginName.toLowerCase()
                  : this.constructor.pluginName.toLowerCase()),
                (this.logger = e.player && e.player.logger);
            },
          },
          {
            key: "updateLang",
            value: function (e) {
              e || (e = this.lang);
            },
          },
          {
            key: "lang",
            get: function () {
              return this.player.lang;
            },
          },
          {
            key: "i18n",
            get: function () {
              return this.player.i18n;
            },
          },
          {
            key: "i18nKeys",
            get: function () {
              return this.player.i18nKeys;
            },
          },
          {
            key: "domEventType",
            get: function () {
              var e = Pt.checkTouchSupport() ? "touch" : "mouse";
              return (
                !this.playerConfig ||
                  (this.playerConfig.domEventType !== "touch" &&
                    this.playerConfig.domEventType !== "mouse") ||
                  (e = this.playerConfig.domEventType),
                e
              );
            },
          },
          {
            key: "on",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? ((this.__events[e] = n), this.player.on(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      (r.__events[i] = n), r.player.on(i, n);
                    })
                : zX(this.pluginName, "plugin.on(event, callback)");
            },
          },
          {
            key: "once",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? ((this.__onceEvents[e] = n), this.player.once(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      (r.__onceEvents[i] = n), r.player.once(e, n);
                    })
                : zX(this.pluginName, "plugin.once(event, callback)");
            },
          },
          {
            key: "off",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? (delete this.__events[e], this.player.off(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      delete r.__events[e], r.player.off(i, n);
                    })
                : zX(this.pluginName, "plugin.off(event, callback)");
            },
          },
          {
            key: "offAll",
            value: function () {
              var e = this;
              ["__events", "__onceEvents"].forEach(function (n) {
                Dn(e[n]).forEach(function (r) {
                  e[n][r] && e.off(r, e[n][r]), r && delete e[n][r];
                });
              }),
                (this.__events = {}),
                (this.__onceEvents = {});
            },
          },
          {
            key: "emit",
            value: function (e) {
              var n, r;
              if (this.player) {
                for (
                  var i = arguments.length,
                    o = new Array(i > 1 ? i - 1 : 0),
                    l = 1;
                  l < i;
                  l++
                )
                  o[l - 1] = arguments[l];
                (r = this.player).emit.apply(r, Ce((n = [e])).call(n, o));
              }
            },
          },
          {
            key: "emitUserAction",
            value: function (e, n) {
              var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : {};
              if (this.player) {
                var i = hS(hS({}, r), {}, { pluginName: this.pluginName });
                this.player.emitUserAction(e, n, i);
              }
            },
          },
          {
            key: "hook",
            value: function (e, n) {
              var r;
              return tU.call.apply(
                tU,
                Ce((r = [this])).call(r, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "useHooks",
            value: function (e, n) {
              for (
                var r,
                  i = arguments.length,
                  o = new Array(i > 2 ? i - 2 : 0),
                  l = 2;
                l < i;
                l++
              )
                o[l - 2] = arguments[l];
              return nU.call.apply(
                nU,
                Ce((r = [this])).call(r, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "removeHooks",
            value: function (e, n) {
              for (
                var r,
                  i = arguments.length,
                  o = new Array(i > 2 ? i - 2 : 0),
                  l = 2;
                l < i;
                l++
              )
                o[l - 2] = arguments[l];
              return rU.call.apply(
                rU,
                Ce((r = [this])).call(r, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "registerPlugin",
            value: function (e) {
              var n =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                r =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : "";
              if (this.player)
                return (
                  r && (n.pluginName = r),
                  this.player.registerPlugin({ plugin: e, options: n })
                );
            },
          },
          {
            key: "getPlugin",
            value: function (e) {
              return this.player ? this.player.getPlugin(e) : null;
            },
          },
          {
            key: "__destroy",
            value: function () {
              var e,
                n = this,
                r = this.player,
                i = this.pluginName;
              this.offAll(),
                Pt.clearAllTimers(this),
                Pt.checkIsFunction(this.destroy) && this.destroy(),
                On(
                  (e = [
                    "player",
                    "playerConfig",
                    "pluginName",
                    "logger",
                    "__args",
                    "__hooks",
                  ])
                ).call(e, function (o) {
                  n[o] = null;
                }),
                r.unRegisterPlugin(i),
                vUe(this);
            },
          },
        ],
        [
          {
            key: "defineGetterOrSetter",
            value: function (e, n) {
              for (var r in n)
                Object.prototype.hasOwnProperty.call(n, r) && ea(e, r, n[r]);
            },
          },
          {
            key: "defineMethod",
            value: function (e, n) {
              for (var r in n)
                Object.prototype.hasOwnProperty.call(n, r) &&
                  typeof n[r] == "function" &&
                  ea(e, r, { configurable: !0, value: n[r] });
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {};
            },
          },
          {
            key: "pluginName",
            get: function () {
              return "pluginName";
            },
          },
        ]
      ),
      t
    );
  })(),
  rPt = 9;
if (typeof Element < "u" && !Element.prototype.matches) {
  var kA = Element.prototype;
  kA.matches =
    kA.matchesSelector ||
    kA.mozMatchesSelector ||
    kA.msMatchesSelector ||
    kA.oMatchesSelector ||
    kA.webkitMatchesSelector;
}
function iPt(t, e) {
  for (; t && t.nodeType !== rPt; ) {
    if (typeof t.matches == "function" && t.matches(e)) return t;
    t = t.parentNode;
  }
}
var aPt = iPt,
  oPt = aPt;
function jX(t, e, n, r, i) {
  var o = lPt.apply(this, arguments);
  return (
    t.addEventListener(n, o, i),
    {
      destroy: function () {
        t.removeEventListener(n, o, i);
      },
    }
  );
}
function sPt(t, e, n, r, i) {
  return typeof t.addEventListener == "function"
    ? jX.apply(null, arguments)
    : typeof n == "function"
    ? jX.bind(null, document).apply(null, arguments)
    : (typeof t == "string" && (t = document.querySelectorAll(t)),
      On(Array.prototype).call(t, function (o) {
        return jX(o, e, n, r, i);
      }));
}
function lPt(t, e, n, r) {
  return function (i) {
    (i.delegateTarget = oPt(i.target, e)), i.delegateTarget && r.call(t, i);
  };
}
var uPt = sPt,
  V0e = xr(uPt),
  cPt = { CONTROLS: "controls", ROOT: "root" },
  Lh = {
    ROOT: "root",
    ROOT_LEFT: "rootLeft",
    ROOT_RIGHT: "rootRight",
    ROOT_TOP: "rootTop",
    CONTROLS_LEFT: "controlsLeft",
    CONTROLS_RIGTH: "controlsRight",
    CONTROLS_RIGHT: "controlsRight",
    CONTROLS_CENTER: "controlsCenter",
    CONTROLS: "controls",
  },
  z0e = { ICON_DISABLE: "xg-icon-disable", ICON_HIDE: "xg-icon-hide" };
function WX(t) {
  return !!t && qt(t) && /^(?:http|data:|\/)/.test(t);
}
function dPt(t, e) {
  var n;
  return sm(t) === "object" && t.class && typeof t.class == "string"
    ? Ce((n = "".concat(e, " "))).call(n, t.class)
    : e;
}
function hPt(t, e) {
  var n;
  return (
    sm(t) === "object" &&
      t.attr &&
      sm(t.attr) === "object" &&
      On((n = Dn(t.attr))).call(n, function (r) {
        e[r] = t.attr[r];
      }),
    e
  );
}
function j0e(t, e) {
  var n,
    r,
    i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "",
    o = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {},
    l = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "",
    u = null;
  if (t instanceof window.Element)
    return (
      Pt.addClass(t, i),
      On((r = Dn(o))).call(r, function (h) {
        t.setAttribute(h, o[h]);
      }),
      t
    );
  if (WX(t) || WX(t.url))
    return (
      (o.src = WX(t) ? t : t.url || ""),
      (u = Pt.createDom(t.tag || "img", "", o, "xg-img ".concat(i)))
    );
  if (typeof t == "function")
    try {
      var c, d;
      return (u = t()) instanceof window.Element
        ? (Pt.addClass(u, i),
          On((c = Dn(o))).call(c, function (h) {
            u.setAttribute(h, o[h]);
          }),
          u)
        : (Gl.logWarn(
            Ce(
              (d = "warn>>icons.".concat(e, " in config of plugin named ["))
            ).call(d, l, "] is a function mast return an Element Object")
          ),
          null);
    } catch (h) {
      return Gl.logError("Plugin named [".concat(l, "]:createIcon"), h), null;
    }
  return typeof t == "string"
    ? Pt.createDomFromHtml(t, o, i)
    : (Gl.logWarn(
        Ce((n = "warn>>icons.".concat(e, " in config of plugin named ["))).call(
          n,
          l,
          "] is invalid"
        )
      ),
      null);
}
function fPt(t, e) {
  var n,
    r = e.config.icons || e.playerConfig.icons;
  On((n = Dn(t))).call(n, function (i) {
    var o = t[i],
      l = o && o.class ? o.class : "",
      u = o && o.attr ? o.attr : {},
      c = null;
    r &&
      r[i] &&
      ((l = dPt(r[i], l)),
      (u = hPt(r[i], u)),
      (c = j0e(r[i], i, l, u, e.pluginName))),
      !c && o && (c = j0e(o.icon ? o.icon : o, u, l, {}, e.pluginName)),
      (e.icons[i] = c);
  });
}
function pPt(t, e) {
  var n;
  On((n = Dn(t))).call(n, function (r) {
    ea(e.langText, r, {
      get: function () {
        var i = e.lang,
          o = e.i18n;
        return o[r] ? o[r] : (t[r] && t[r][i]) || "";
      },
    });
  });
}
var ml = (function (t) {
    ju(n, $I);
    var e = Wu(n);
    function n() {
      var r,
        i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      return Hs(this, n), ((r = e.call(this, i)).__delegates = []), r;
    }
    return (
      Xs(
        n,
        [
          {
            key: "__init",
            value: function (r) {
              if ((Al(el(n.prototype), "__init", this).call(this, r), r.root)) {
                var i = r.root,
                  o = null;
                (this.icons = {}),
                  (this.root = null),
                  (this.parent = null),
                  fPt(this.registerIcons() || {}, this),
                  (this.langText = {}),
                  pPt(this.registerLanguageTexts() || {}, this);
                var l = "";
                try {
                  l = this.render();
                } catch (h) {
                  var u;
                  throw (
                    (Gl.logError(
                      "Plugin:".concat(this.pluginName, ":render"),
                      h
                    ),
                    new Error(
                      Ce(
                        (u = "Plugin:".concat(this.pluginName, ":render:"))
                      ).call(u, h.message)
                    ))
                  );
                }
                if (l)
                  (o = n.insert(l, i, r.index)).setAttribute(
                    "data-index",
                    r.index
                  );
                else {
                  if (!r.tag) return;
                  (o = Pt.createDom(r.tag, "", r.attr, r.name)).setAttribute(
                    "data-index",
                    r.index
                  ),
                    i.appendChild(o);
                }
                (this.root = o), (this.parent = i);
                var c = this.config.attr || {},
                  d = this.config.style || {};
                this.setAttr(c),
                  this.setStyle(d),
                  this.config.index &&
                    this.root.setAttribute("data-index", this.config.index),
                  this.__registerChildren();
              }
            },
          },
          {
            key: "__registerChildren",
            value: function () {
              var r = this;
              if (this.root) {
                this._children = [];
                var i,
                  o = this.children();
                o &&
                  sm(o) === "object" &&
                  Dn(o).length > 0 &&
                  On((i = Dn(o))).call(i, function (l) {
                    var u,
                      c,
                      d = l,
                      h = o[d],
                      f = { root: r.root };
                    typeof h == "function"
                      ? ((u = r.config[d] || {}), (c = h))
                      : sm(h) === "object" &&
                        typeof h.plugin == "function" &&
                        ((u = h.options
                          ? Pt.deepCopy(r.config[d] || {}, h.options)
                          : r.config[d] || {}),
                        (c = h.plugin)),
                      (f.config = u),
                      u.index !== void 0 && (f.index = u.index),
                      u.root && (f.root = u.root),
                      r.registerPlugin(c, f, d);
                  });
              }
            },
          },
          {
            key: "updateLang",
            value: function (r) {
              r || (r = this.lang);
              var i = this.root,
                o = this.i18n,
                l = this.langText;
              i &&
                (function u(c, d) {
                  for (var h = 0; h < c.children.length; h++)
                    c.children[h].children.length > 0
                      ? u(c.children[h], d)
                      : d(c.children[h]);
                })(i, function (u) {
                  var c = u.getAttribute && u.getAttribute("lang-key");
                  if (c) {
                    var d = o[c.toUpperCase()] || l[c];
                    d && (u.innerHTML = typeof d == "function" ? d(r) : d);
                  }
                });
            },
          },
          {
            key: "lang",
            get: function () {
              return this.player.lang;
            },
          },
          {
            key: "changeLangTextKey",
            value: function (r) {
              var i =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : "",
                o = this.i18n || {},
                l = this.langText;
              r.setAttribute && r.setAttribute("lang-key", i);
              var u = o[i] || l[i] || "";
              u && (r.innerHTML = u);
            },
          },
          {
            key: "plugins",
            value: function () {
              return this._children;
            },
          },
          {
            key: "disable",
            value: function () {
              (this.config.disable = !0),
                Pt.addClass(
                  ji(this).call(this, ".xgplayer-icon"),
                  z0e.ICON_DISABLE
                );
            },
          },
          {
            key: "enable",
            value: function () {
              (this.config.disable = !1),
                Pt.removeClass(
                  ji(this).call(this, ".xgplayer-icon"),
                  z0e.ICON_DISABLE
                );
            },
          },
          {
            key: "children",
            value: function () {
              return {};
            },
          },
          {
            key: "registerPlugin",
            value: function (r) {
              var i =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                o =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : "";
              i.root = i.root || this.root;
              var l = Al(el(n.prototype), "registerPlugin", this).call(
                this,
                r,
                i,
                o
              );
              return this._children.push(l), l;
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return {};
            },
          },
          {
            key: "registerLanguageTexts",
            value: function () {
              return {};
            },
          },
          {
            key: "find",
            value: function (r) {
              if (this.root) return this.root.querySelector(r);
            },
          },
          {
            key: "bind",
            value: function (r, i, o) {
              var l = this;
              if (arguments.length < 3 && typeof i == "function")
                Array.isArray(r)
                  ? r.forEach(function (d) {
                      l.bindEL(d, i);
                    })
                  : this.bindEL(r, i);
              else {
                var u,
                  c = n.delegate.call(this, this.root, r, i, o);
                this.__delegates = Ce((u = this.__delegates)).call(u, c);
              }
            },
          },
          {
            key: "unbind",
            value: function (r, i) {
              var o = this;
              if (arguments.length < 3 && typeof i == "function")
                Array.isArray(r)
                  ? r.forEach(function (h) {
                      o.unbindEL(h, i);
                    })
                  : this.unbindEL(r, i);
              else
                for (
                  var l, u = Ce((l = "".concat(r, "_"))).call(l, i), c = 0;
                  c < this.__delegates.length;
                  c++
                )
                  if (this.__delegates[c].key === u) {
                    var d;
                    this.__delegates[c].destroy(),
                      tl((d = this.__delegates)).call(d, c, 1);
                    break;
                  }
            },
          },
          {
            key: "setStyle",
            value: function (r, i) {
              var o,
                l = this;
              if (this.root)
                return Pt.typeOf(r) === "String"
                  ? (this.root.style[r] = i)
                  : void (
                      Pt.typeOf(r) === "Object" &&
                      On((o = Dn(r))).call(o, function (u) {
                        l.root.style[u] = r[u];
                      })
                    );
            },
          },
          {
            key: "setAttr",
            value: function (r, i) {
              var o,
                l = this;
              if (this.root)
                return Pt.typeOf(r) === "String"
                  ? this.root.setAttribute(r, i)
                  : void (
                      Pt.typeOf(r) === "Object" &&
                      On((o = Dn(r))).call(o, function (u) {
                        l.root.setAttribute(u, r[u]);
                      })
                    );
            },
          },
          {
            key: "setHtml",
            value: function (r, i) {
              this.root &&
                ((this.root.innerHTML = r), typeof i == "function" && i());
            },
          },
          {
            key: "bindEL",
            value: function (r, i) {
              var o =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
              this.root &&
                "on".concat(r) in this.root &&
                typeof i == "function" &&
                this.root.addEventListener(r, i, o);
            },
          },
          {
            key: "unbindEL",
            value: function (r, i) {
              var o =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
              this.root &&
                "on".concat(r) in this.root &&
                typeof i == "function" &&
                this.root.removeEventListener(r, i, o);
            },
          },
          {
            key: "show",
            value: function (r) {
              if (this.root)
                return (
                  (this.root.style.display = r !== void 0 ? r : "block"),
                  window
                    .getComputedStyle(this.root, null)
                    .getPropertyValue("display") === "none"
                    ? (this.root.style.display = "block")
                    : void 0
                );
            },
          },
          {
            key: "hide",
            value: function () {
              this.root && (this.root.style.display = "none");
            },
          },
          {
            key: "appendChild",
            value: function (r, i) {
              if (!this.root) return null;
              if (
                arguments.length < 2 &&
                arguments[0] instanceof window.Element
              )
                return this.root.appendChild(arguments[0]);
              if (!(i && i instanceof window.Element)) return null;
              try {
                return typeof r == "string"
                  ? ji(this).call(this, r).appendChild(i)
                  : r.appendChild(i);
              } catch (o) {
                return Gl.logError("Plugin:appendChild", o), null;
              }
            },
          },
          {
            key: "render",
            value: function () {
              return "";
            },
          },
          { key: "destroy", value: function () {} },
          {
            key: "__destroy",
            value: function () {
              var r,
                i,
                o,
                l = this,
                u = this.player;
              On((r = this.__delegates)).call(r, function (c) {
                c.destroy();
              }),
                (this.__delegates = []),
                this._children instanceof Array &&
                  (On((o = this._children)).call(o, function (c) {
                    u.unRegisterPlugin(c.pluginName);
                  }),
                  (this._children = null)),
                this.root &&
                  (this.root.hasOwnProperty("remove")
                    ? this.root.remove()
                    : this.root.parentNode &&
                      this.root.parentNode.removeChild(this.root)),
                Al(el(n.prototype), "__destroy", this).call(this),
                (this.icons = {}),
                On((i = ["root", "parent"])).call(i, function (c) {
                  l[c] = null;
                });
            },
          },
        ],
        [
          {
            key: "insert",
            value: function (r, i) {
              var o =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : 0,
                l = i.children.length,
                u = Number(o),
                c = r instanceof window.Node;
              if (l) {
                for (var d = 0, h = null, f = ""; d < l; d++) {
                  h = i.children[d];
                  var p = Number(h.getAttribute("data-index"));
                  if (p >= u) {
                    f = "beforebegin";
                    break;
                  }
                  p < u && (f = "afterend");
                }
                return (
                  c
                    ? f === "afterend"
                      ? i.appendChild(r)
                      : i.insertBefore(r, h)
                    : h.insertAdjacentHTML(f, r),
                  f === "afterend"
                    ? i.children[i.children.length - 1]
                    : i.children[d]
                );
              }
              return (
                c ? i.appendChild(r) : i.insertAdjacentHTML("beforeend", r),
                i.children[i.children.length - 1]
              );
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {};
            },
          },
          {
            key: "delegate",
            value: function (r, i, o, l) {
              var u =
                  arguments.length > 4 &&
                  arguments[4] !== void 0 &&
                  arguments[4],
                c = [];
              if (r instanceof window.Node && typeof l == "function")
                if (Array.isArray(o))
                  o.forEach(function (f) {
                    var p,
                      g = V0e(r, i, f, l, u);
                    (g.key = Ce((p = "".concat(i, "_"))).call(p, f)), c.push(g);
                  });
                else {
                  var d,
                    h = V0e(r, i, o, l, u);
                  (h.key = Ce((d = "".concat(i, "_"))).call(d, o)), c.push(h);
                }
              return c;
            },
          },
          {
            key: "ROOT_TYPES",
            get: function () {
              return cPt;
            },
          },
          {
            key: "POSITIONS",
            get: function () {
              return Lh;
            },
          },
        ]
      ),
      n
    );
  })(),
  gPt = (function () {
    function t() {
      var e = this;
      if (
        (Hs(this, t),
        Va(this, "__trigger", function (n) {
          var r = new Date().getTime();
          e.timeStamp = r;
          for (var i = 0; i < n.length; i++) e.__runHandler(n[i].target);
        }),
        (this.__handlers = []),
        (this.timeStamp = 0),
        (this.observer = null),
        window.ResizeObserver)
      )
        try {
          (this.observer = new window.ResizeObserver(
            $Dt(this.__trigger, 100, { trailing: !0 })
          )),
            (this.timeStamp = new Date().getTime());
        } catch (n) {
          console.error(n);
        }
    }
    return (
      Xs(t, [
        {
          key: "addObserver",
          value: function (e, n) {
            if (this.observer) {
              this.observer.observe(e);
              for (
                var r = e.getAttribute(pT), i = this.__handlers, o = -1, l = 0;
                l < i.length;
                l++
              )
                i[l] && e === i[l].target && (o = l);
              o > -1
                ? (this.__handlers[o].handler = n)
                : this.__handlers.push({ target: e, handler: n, playerId: r });
            }
          },
        },
        {
          key: "unObserver",
          value: function (e) {
            var n,
              r,
              i = -1;
            On((n = this.__handlers)).call(n, function (l, u) {
              e === l.target && (i = u);
            });
            try {
              var o;
              (o = this.observer) === null || o === void 0 || o.unobserve(e);
            } catch {}
            i > -1 && tl((r = this.__handlers)).call(r, i, 1);
          },
        },
        {
          key: "destroyObserver",
          value: function () {
            var e;
            (e = this.observer) === null || e === void 0 || e.disconnect(),
              (this.observer = null),
              (this.__handlers = null);
          },
        },
        {
          key: "__runHandler",
          value: function (e) {
            for (var n = this.__handlers, r = 0; r < n.length; r++)
              if (n[r] && e === n[r].target) {
                try {
                  n[r].handler(e);
                } catch (i) {
                  console.error(i);
                }
                return !0;
              }
            return !1;
          },
        },
      ]),
      t
    );
  })(),
  qM = null;
function mPt(t, e) {
  return qM || (qM = new gPt()), qM.addObserver(t, e), qM;
}
function yPt(t, e) {
  var n;
  (n = qM) === null || n === void 0 || n.unObserver(t, e);
}
var Hd = {
    pluginGroup: {},
    init: function (t) {
      var e = t._pluginInfoId;
      e || ((e = new Date().getTime()), (t._pluginInfoId = e)),
        !t.config.closeResizeObserver &&
          mPt(t.root, function () {
            t.resize();
          }),
        (this.pluginGroup[e] = {
          _originalOptions: t.config || {},
          _plugins: {},
        });
    },
    formatPluginInfo: function (t, e) {
      var n = null,
        r = null;
      return (
        t.plugin && typeof t.plugin == "function"
          ? ((n = t.plugin), (r = t.options))
          : ((n = t), (r = {})),
        e && (r.config = e || {}),
        { PLUFGIN: n, options: r }
      );
    },
    checkPluginIfExits: function (t, e) {
      for (var n = 0; n < e.length; n++)
        if (t.toLowerCase() === e[n].pluginName.toLowerCase()) return !0;
      return !1;
    },
    getRootByConfig: function (t, e) {
      for (var n = Dn(e), r = null, i = 0; i < n.length; i++)
        if (t.toLowerCase() === n[i].toLowerCase()) {
          r = e[n[i]];
          break;
        }
      return Pt.typeOf(r) === "Object"
        ? { root: r.root, position: r.position }
        : {};
    },
    lazyRegister: function (t, e) {
      var n = this,
        r = e.timeout || 1500;
      return Ar.race([
        e.loader().then(function (i) {
          var o;
          (o = i && i.__esModule ? i.default : i), n.register(t, o, i.options);
        }),
        new Ar(function (i, o) {
          setTimeout(function () {
            o(new Error("timeout"));
          }, r);
        }),
      ]);
    },
    register: function (t, e) {
      var n =
        arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      if (t && e && typeof e == "function" && e.prototype !== void 0) {
        var r = t._pluginInfoId;
        if (r && this.pluginGroup[r]) {
          this.pluginGroup[r]._plugins || (this.pluginGroup[r]._plugins = {});
          var i = this.pluginGroup[r]._plugins,
            o = this.pluginGroup[r]._originalOptions;
          n.player = t;
          var l = n.pluginName || e.pluginName;
          if (!l) throw new Error("The property pluginName is necessary");
          if (
            !e.isSupported ||
            e.isSupported(t.config.mediaType, t.config.codecType)
          ) {
            n.config || (n.config = {});
            for (var u = Dn(o), c = 0; c < u.length; c++)
              if (l.toLowerCase() === u[c].toLowerCase()) {
                var d = o[u[c]];
                Pt.typeOf(d) === "Object"
                  ? (n.config = Ci({}, n.config, o[u[c]]))
                  : Pt.typeOf(d) === "Boolean" && (n.config.disable = !d);
                break;
              }
            e.defaultConfig &&
              Dn(e.defaultConfig).forEach(function (f) {
                n.config[f] === void 0 && (n.config[f] = e.defaultConfig[f]);
              }),
              n.root
                ? typeof n.root == "string" && (n.root = t[n.root])
                : (n.root = t.root),
              (n.index = n.config.index || 0);
            try {
              i[l.toLowerCase()] &&
                (this.unRegister(r, l.toLowerCase()),
                console.warn(
                  "the is one plugin with same pluginName [".concat(
                    l,
                    "] exist, destroy the old instance"
                  )
                ));
              var h = new e(n);
              return (
                (i[l.toLowerCase()] = h),
                (i[l.toLowerCase()].func = e),
                h && typeof h.afterCreate == "function" && h.afterCreate(),
                h
              );
            } catch (f) {
              throw (console.error(f), f);
            }
          } else console.warn("not supported plugin [".concat(l, "]"));
        }
      }
    },
    unRegister: function (t, e) {
      t._pluginInfoId && (t = t._pluginInfoId), (e = e.toLowerCase());
      try {
        var n = this.pluginGroup[t]._plugins[e];
        n &&
          (n.pluginName && n.__destroy(),
          delete this.pluginGroup[t]._plugins[e]);
      } catch (i) {
        var r;
        console.error(
          Ce((r = "[unRegister:".concat(e, "] cgid:["))).call(r, t, "] error"),
          i
        );
      }
    },
    deletePlugin: function (t, e) {
      var n = t._pluginInfoId;
      n &&
        this.pluginGroup[n] &&
        this.pluginGroup[n]._plugins &&
        delete this.pluginGroup[n]._plugins[e];
    },
    getPlugins: function (t) {
      var e = t._pluginInfoId;
      return e && this.pluginGroup[e] ? this.pluginGroup[e]._plugins : {};
    },
    findPlugin: function (t, e) {
      var n = t._pluginInfoId;
      if (!n || !this.pluginGroup[n]) return null;
      var r = e.toLowerCase();
      return this.pluginGroup[n]._plugins[r];
    },
    beforeInit: function (t) {
      var e = this;
      function n(r) {
        return r && r.then
          ? r
          : new Ar(function (i) {
              i();
            });
      }
      return new Ar(function (r) {
        if (e.pluginGroup)
          return (
            t._loadingPlugins && t._loadingPlugins.length
              ? Ar.all(t._loadingPlugins)
              : Ar.resolve()
          ).then(function () {
            var i,
              o = t._pluginInfoId;
            if (e.pluginGroup[o]) {
              var l = e.pluginGroup[o]._plugins,
                u = [];
              Dn(l).forEach(function (c) {
                if (l[c] && l[c].beforePlayerInit)
                  try {
                    var d = l[c].beforePlayerInit();
                    u.push(n(d));
                  } catch (h) {
                    throw (u.push(n(null)), h);
                  }
              }),
                Ar.all(Ce((i = [])).call(i, u))
                  .then(function () {
                    r();
                  })
                  .catch(function (c) {
                    console.error(c), r();
                  });
            } else r();
          });
      });
    },
    afterInit: function (t) {
      var e = t._pluginInfoId;
      if (e && this.pluginGroup[e]) {
        var n = this.pluginGroup[e]._plugins;
        Dn(n).forEach(function (r) {
          n[r] && n[r].afterPlayerInit && n[r].afterPlayerInit();
        });
      }
    },
    setLang: function (t, e) {
      var n = e._pluginInfoId;
      if (n && this.pluginGroup[n]) {
        var r = this.pluginGroup[n]._plugins;
        Dn(r).forEach(function (i) {
          if (r[i].updateLang) r[i].updateLang(t);
          else
            try {
              r[i].lang = t;
            } catch {
              console.warn("".concat(i, " setLang"));
            }
        });
      }
    },
    reRender: function (t) {
      var e = this,
        n = t._pluginInfoId;
      if (n && this.pluginGroup[n]) {
        var r = [],
          i = this.pluginGroup[n]._plugins;
        Dn(i).forEach(function (o) {
          o !== "controls" &&
            i[o] &&
            (r.push({ plugin: i[o].func, options: i[o].__args }),
            e.unRegister(n, o));
        }),
          r.forEach(function (o) {
            e.register(t, o.plugin, o.options);
          });
      }
    },
    onPluginsReady: function (t) {
      var e = t._pluginInfoId;
      if (e && this.pluginGroup[e]) {
        var n = this.pluginGroup[e]._plugins || {};
        Dn(n).forEach(function (r) {
          n[r].onPluginsReady &&
            typeof n[r].onPluginsReady == "function" &&
            n[r].onPluginsReady();
        });
      }
    },
    destroy: function (t) {
      var e = t._pluginInfoId;
      if (this.pluginGroup[e]) {
        yPt(t.root);
        for (
          var n = this.pluginGroup[e]._plugins, r = 0, i = Dn(n);
          r < i.length;
          r++
        ) {
          var o = i[r];
          this.unRegister(e, o);
        }
        delete this.pluginGroup[e], delete t._pluginInfoId;
      }
    },
  },
  qr = {
    DEFAULT: "xgplayer",
    DEFAULT_SKIN: "xgplayer-skin-default",
    ENTER: "xgplayer-is-enter",
    PAUSED: "xgplayer-pause",
    PLAYING: "xgplayer-playing",
    ENDED: "xgplayer-ended",
    CANPLAY: "xgplayer-canplay",
    LOADING: "xgplayer-isloading",
    ERROR: "xgplayer-is-error",
    REPLAY: "xgplayer-replay",
    NO_START: "xgplayer-nostart",
    ACTIVE: "xgplayer-active",
    INACTIVE: "xgplayer-inactive",
    FULLSCREEN: "xgplayer-is-fullscreen",
    CSS_FULLSCREEN: "xgplayer-is-cssfullscreen",
    ROTATE_FULLSCREEN: "xgplayer-rotate-fullscreen",
    PARENT_ROTATE_FULLSCREEN: "xgplayer-rotate-parent",
    PARENT_FULLSCREEN: "xgplayer-fullscreen-parent",
    INNER_FULLSCREEN: "xgplayer-fullscreen-inner",
    NO_CONTROLS: "no-controls",
    FLEX_CONTROLS: "flex-controls",
    CONTROLS_FOLLOW: "controls-follow",
    CONTROLS_AUTOHIDE: "controls-autohide",
    TOP_BAR_AUTOHIDE: "top-bar-autohide",
    NOT_ALLOW_AUTOPLAY: "not-allow-autoplay",
    SEEKING: "seeking",
    PC: "xgplayer-pc",
    MOBILE: "xgplayer-mobile",
    MINI: "xgplayer-mini",
  };
function W0e() {
  return {
    id: "",
    el: null,
    url: "",
    domEventType: "default",
    nullUrlStart: !1,
    width: 600,
    height: 337.5,
    fluid: !1,
    fitVideoSize: "fixed",
    videoFillMode: "auto",
    volume: 0.6,
    autoplay: !1,
    autoplayMuted: !1,
    loop: !1,
    isLive: !1,
    zoom: 1,
    videoInit: !0,
    poster: "",
    isMobileSimulateMode: !1,
    defaultPlaybackRate: 1,
    execBeforePluginsCall: null,
    allowSeekAfterEnded: !0,
    enableContextmenu: !0,
    closeVideoClick: !1,
    closeVideoDblclick: !1,
    closePlayerBlur: !1,
    closeDelayBlur: !1,
    leavePlayerTime: 3e3,
    closePlayVideoFocus: !1,
    closePauseVideoFocus: !1,
    closeFocusVideoFocus: !0,
    closeControlsBlur: !0,
    topBarAutoHide: !0,
    videoAttributes: {},
    startTime: 0,
    seekedStatus: "play",
    miniprogress: !1,
    disableSwipeHandler: function () {},
    enableSwipeHandler: function () {},
    preProcessUrl: null,
    ignores: [],
    whitelist: [],
    inactive: 3e3,
    lang: q6e(),
    controls: !0,
    marginControls: !1,
    fullscreenTarget: null,
    screenShot: !1,
    rotate: !1,
    pip: !1,
    download: !1,
    mini: !1,
    cssFullscreen: !0,
    keyShortcut: !0,
    presets: [],
    plugins: [],
    playbackRate: 1,
    definition: { list: [] },
    playsinline: !0,
    customDuration: 0,
    timeOffset: 0,
    icons: {},
    i18n: [],
    tabindex: 0,
    thumbnail: null,
    videoConfig: {},
    isHideTips: !1,
    minWaitDelay: 200,
    commonStyle: {
      progressColor: "",
      playedColor: "",
      cachedColor: "",
      sliderBtnStyle: {},
      volumeColor: "",
    },
  };
}
var vPt = function (t, e) {
    var n,
      r,
      i,
      o =
        e.preset && e.options
          ? new e.preset(e.options, t.config)
          : new e({}, t.config),
      l = o.plugins,
      u = l === void 0 ? [] : l,
      c = o.ignores,
      d = c === void 0 ? [] : c,
      h = o.icons,
      f = h === void 0 ? {} : h,
      p = o.i18n,
      g = p === void 0 ? [] : p;
    t.config.plugins || (t.config.plugins = []),
      t.config.ignores || (t.config.ignores = []),
      (r = t.config.plugins).push.apply(r, H1(u)),
      (i = t.config.ignores).push.apply(i, H1(d)),
      On((n = Dn(f))).call(n, function (v) {
        t.config.icons[v] || (t.config.icons[v] = f[v]);
      });
    var y = t.config.i18n || [];
    g.push.apply(g, H1(y)), (t.config.i18n = g);
  },
  bPt = (function (t) {
    ju(n, ml);
    var e = Wu(n);
    function n() {
      var r, i;
      Hs(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        Va(
          Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "onMouseEnter",
          function (c) {
            var d = Oi(i),
              h = d.player;
            d.playerConfig.closeControlsBlur && h.focus({ autoHide: !1 });
          }
        ),
        Va(Oi(i), "onMouseLeave", function (c) {
          Oi(i).player.focus();
        }),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "beforeCreate",
            value: function (r) {
              r.config.mode ||
                Na.device !== "mobile" ||
                (r.config.mode = "flex"),
                r.player.config.marginControls && (r.config.autoHide = !1);
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r,
                i = this,
                o = this.config,
                l = o.disable,
                u = o.height,
                c = o.mode;
              if (!l) {
                c === "flex" && this.player.addClass(qr.FLEX_CONTROLS);
                var d = { height: "".concat(u, "px") };
                On((r = Dn(d))).call(r, function (f) {
                  i.root.style[f] = d[f];
                }),
                  (this.left = ji(this).call(this, "xg-left-grid")),
                  (this.center = ji(this).call(this, "xg-center-grid")),
                  (this.right = ji(this).call(this, "xg-right-grid")),
                  (this.innerRoot = ji(this).call(this, "xg-inner-controls")),
                  this.on(mx, function (f) {
                    f
                      ? Pt.addClass(i.root, "mini-controls")
                      : Pt.removeClass(i.root, "mini-controls");
                  });
                var h = this.playerConfig.isMobileSimulateMode;
                Na.device !== "mobile" &&
                  h !== "mobile" &&
                  (this.bind("mouseenter", this.onMouseEnter),
                  this.bind("mouseleave", this.onMouseLeave));
              }
            },
          },
          {
            key: "focus",
            value: function () {
              this.player.focus({ autoHide: !1 });
            },
          },
          {
            key: "focusAwhile",
            value: function () {
              this.player.focus({ autoHide: !0 });
            },
          },
          {
            key: "blur",
            value: function () {
              this.player.blur({ ignorePaused: !0 });
            },
          },
          {
            key: "recoverAutoHide",
            value: function () {
              this.config.autoHide &&
                Pt.addClass(this.root, qr.CONTROLS_AUTOHIDE);
            },
          },
          {
            key: "pauseAutoHide",
            value: function () {
              Pt.removeClass(this.root, qr.CONTROLS_AUTOHIDE);
            },
          },
          {
            key: "show",
            value: function (r) {
              (this.root.style.display = ""), this.player.focus();
            },
          },
          {
            key: "hide",
            value: function () {
              this.root.style.display = "none";
            },
          },
          {
            key: "mode",
            get: function () {
              return this.config.mode;
            },
          },
          {
            key: "registerPlugin",
            value: function (r) {
              var i =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                o = arguments.length > 2 ? arguments[2] : void 0;
              if (this.root) {
                var l = r.defaultConfig || {};
                if (!i.root) {
                  switch (
                    i.position
                      ? i.position
                      : i.config && i.config.position
                      ? i.config.position
                      : l.position
                  ) {
                    case Lh.CONTROLS_LEFT:
                      i.root = this.left;
                      break;
                    case Lh.CONTROLS_RIGHT:
                      i.root = this.right;
                      break;
                    case Lh.CONTROLS_CENTER:
                      i.root = this.center;
                      break;
                    case Lh.CONTROLS:
                      i.root = this.root;
                      break;
                    default:
                      i.root = this.left;
                  }
                  return Al(el(n.prototype), "registerPlugin", this).call(
                    this,
                    r,
                    i,
                    o
                  );
                }
              }
            },
          },
          {
            key: "destroy",
            value: function () {
              Na.device !== "mobile" &&
                (this.unbind("mouseenter", this.onMouseEnter),
                this.unbind("mouseleave", this.onMouseLeave)),
                (this.left = null),
                (this.center = null),
                (this.right = null),
                (this.innerRoot = null);
            },
          },
          {
            key: "render",
            value: function () {
              var r = this.config,
                i = r.mode,
                o = r.autoHide,
                l = r.initShow;
              if (!r.disable) {
                var u = Pt.classNames(
                  { "xgplayer-controls": !0 },
                  { "flex-controls": i === "flex" },
                  { "bottom-controls": i === "bottom" },
                  Va({}, qr.CONTROLS_AUTOHIDE, o),
                  { "xgplayer-controls-initshow": l || !o }
                );
                return '<xg-controls class="'.concat(
                  u,
                  `" unselectable="on">
    <xg-inner-controls class="xg-inner-controls xg-pos">
      <xg-left-grid class="xg-left-grid">
      </xg-left-grid>
      <xg-center-grid class="xg-center-grid"></xg-center-grid>
      <xg-right-grid class="xg-right-grid">
      </xg-right-grid>
    </xg-inner-controls>
    </xg-controls>`
                );
              }
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "controls";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { disable: !1, autoHide: !0, mode: "", initShow: !1 };
            },
          },
        ]
      ),
      n
    );
  })(),
  bUe = {
    LANG: "en",
    TEXT: {
      ERROR_TYPES: {
        network: { code: 1, msg: "video download error" },
        mse: { code: 2, msg: "stream append error" },
        parse: { code: 3, msg: "parsing error" },
        format: { code: 4, msg: "wrong format" },
        decoder: { code: 5, msg: "decoding error" },
        runtime: { code: 6, msg: "grammatical errors" },
        timeout: { code: 7, msg: "play timeout" },
        other: { code: 8, msg: "other errors" },
      },
      HAVE_NOTHING: "There is no information on whether audio/video is ready",
      HAVE_METADATA: "Audio/video metadata is ready ",
      HAVE_CURRENT_DATA:
        "Data about the current play location is available, but there is not enough data to play the next frame/millisecond",
      HAVE_FUTURE_DATA: "Current and at least one frame of data is available",
      HAVE_ENOUGH_DATA: "The available data is sufficient to start playing",
      NETWORK_EMPTY: "Audio/video has not been initialized",
      NETWORK_IDLE:
        "Audio/video is active and has been selected for resources, but no network is used",
      NETWORK_LOADING: "The browser is downloading the data",
      NETWORK_NO_SOURCE: "No audio/video source was found",
      MEDIA_ERR_ABORTED: "The fetch process is aborted by the user",
      MEDIA_ERR_NETWORK: "An error occurred while downloading",
      MEDIA_ERR_DECODE: "An error occurred while decoding",
      MEDIA_ERR_SRC_NOT_SUPPORTED: "Audio/video is not supported",
      REPLAY: "Replay",
      ERROR: "Network is offline",
      PLAY_TIPS: "Play",
      PAUSE_TIPS: "Pause",
      PLAYNEXT_TIPS: "Play next",
      DOWNLOAD_TIPS: "Download",
      ROTATE_TIPS: "Rotate",
      RELOAD_TIPS: "Reload",
      FULLSCREEN_TIPS: "Fullscreen",
      EXITFULLSCREEN_TIPS: "Exit fullscreen",
      CSSFULLSCREEN_TIPS: "Cssfullscreen",
      EXITCSSFULLSCREEN_TIPS: "Exit cssfullscreen",
      TEXTTRACK: "Caption",
      PIP: "PIP",
      SCREENSHOT: "Screenshot",
      LIVE: "LIVE",
      OFF: "Off",
      OPEN: "Open",
      MINI_DRAG: "Click and hold to drag",
      MINISCREEN: "Miniscreen",
      REFRESH_TIPS: "Please Try",
      REFRESH: "Refresh",
      FORWARD: "forward",
      LIVE_TIP: "Live",
    },
  },
  Mp = { lang: {}, langKeys: [], textKeys: [] };
function yx(t, e) {
  return (
    Dn(e).forEach(function (n) {
      var r,
        i = Pt.typeOf(e[n]),
        o = Pt.typeOf(t[n]);
      i === "Array"
        ? (o !== "Array" && (t[n] = []), (r = t[n]).push.apply(r, H1(e[n])))
        : i === "Object"
        ? (o !== "Object" && (t[n] = {}), yx(t[n], e[n]))
        : (t[n] = e[n]);
    }),
    t
  );
}
function _Ue() {
  var t;
  On((t = Dn(Mp.lang.en))).call(t, function (e) {
    Mp.textKeys[e] = e;
  });
}
function _Pt(t, e) {
  var n = [];
  if ((e || (e = Mp), e.lang)) {
    var r;
    Pt.typeOf(t) !== "Array"
      ? (n = On((r = Dn(t))).call(r, function (o) {
          return { LANG: o === "zh" ? "zh-cn" : o, TEXT: t[o] };
        }))
      : (n = t);
    var i = e.lang;
    On(n).call(n, function (o) {
      o.LANG === "zh" && (o.LANG = "zh-cn"),
        i[o.LANG] ? yx(i[o.LANG] || {}, o.TEXT || {}) : Sse(o, e);
    }),
      _Ue();
  }
}
function Sse(t, e) {
  var n = t.LANG;
  if ((e || (e = Mp), e.lang)) {
    var r = t.TEXT || {};
    n === "zh" && (n = "zh-cn"),
      e.lang[n] ? yx(e.lang[n], r) : (e.langKeys.push(n), (e.lang[n] = r)),
      _Ue();
  }
}
function TPt(t) {
  var e,
    n = { lang: {}, langKeys: [], textKeys: {}, pId: t };
  return (
    yx(n.lang, Mp.lang),
    (e = n.langKeys).push.apply(e, H1(Mp.langKeys)),
    yx(n.textKeys, Mp.textKeys),
    n
  );
}
Sse(bUe);
var P1 = {
    get textKeys() {
      return Mp.textKeys;
    },
    get langKeys() {
      return Mp.langKeys;
    },
    get lang() {
      var t,
        e = {};
      return (
        On((t = Mp.langKeys)).call(t, function (n) {
          e[n] = Mp.lang[n];
        }),
        Mp.lang["zh-cn"] && (e.zh = Mp.lang["zh-cn"] || {}),
        e
      );
    },
    extend: _Pt,
    use: Sse,
    init: TPt,
  },
  ds = {
    INITIAL: 1,
    READY: 2,
    ATTACHING: 3,
    ATTACHED: 4,
    NOTALLOW: 5,
    RUNNING: 6,
    ENDED: 7,
    DESTROYED: 8,
  },
  K0e = [
    "ERROR",
    "INITIAL",
    "READY",
    "ATTACHING",
    "ATTACHED",
    "NOTALLOW",
    "RUNNING",
    "ENDED",
    "DESTROYED",
  ],
  df = {},
  KX = null,
  EPt = (function (t) {
    ju(n, V6e.EventEmitter);
    var e = Wu(n);
    function n() {
      return Hs(this, n), e.apply(this, arguments);
    }
    return (
      Xs(
        n,
        [
          {
            key: "add",
            value: function (r) {
              r &&
                ((df[r.playerId] = r),
                Dn(df).length === 1 && this.setActive(r.playerId, !0));
            },
          },
          {
            key: "remove",
            value: function (r) {
              r && (r.isUserActive, delete df[r.playerId]);
            },
          },
          {
            key: "_iterate",
            value: function (r) {
              var i =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
              for (var o in df)
                if (Object.prototype.hasOwnProperty.call(df, o)) {
                  var l = df[o];
                  if (i) {
                    if (r(l)) break;
                  } else r(l);
                }
            },
          },
          {
            key: "forEach",
            value: function (r) {
              this._iterate(r);
            },
          },
          {
            key: "find",
            value: function (r) {
              var i = null;
              return (
                this._iterate(function (o) {
                  var l = r(o);
                  return l && (i = o), l;
                }, !0),
                i
              );
            },
          },
          {
            key: "findAll",
            value: function (r) {
              var i = [];
              return (
                this._iterate(function (o) {
                  r(o) && i.push(o);
                }),
                i
              );
            },
          },
          {
            key: "setActive",
            value: function (r) {
              var i =
                !(arguments.length > 1 && arguments[1] !== void 0) ||
                arguments[1];
              if (df[r])
                return (
                  i
                    ? this.forEach(function (o) {
                        r === o.playerId
                          ? ((o.isUserActive = !0), (o.isInstNext = !1))
                          : (o.isUserActive = !1);
                      })
                    : (df[r].isUserActive = i),
                  r
                );
            },
          },
          {
            key: "getActiveId",
            value: function () {
              for (var r = Dn(df), i = 0; i < r.length; i++) {
                var o = df[r[i]];
                if (o && o.isUserActive) return r[i];
              }
              return null;
            },
          },
          {
            key: "setNext",
            value: function (r) {
              var i =
                !(arguments.length > 1 && arguments[1] !== void 0) ||
                arguments[1];
              if (df[r])
                return (
                  i
                    ? this.forEach(function (o) {
                        r === o.playerId
                          ? ((o.isUserActive = !1), (o.isInstNext = !0))
                          : (o.isInstNext = !1);
                      })
                    : (df[r].isInstNext = i),
                  r
                );
            },
          },
        ],
        [
          {
            key: "getInstance",
            value: function () {
              return KX || (KX = new n()), KX;
            },
          },
        ]
      ),
      n
    );
  })();
function SPt(t) {
  for (var e = Dn(df), n = 0; n < e.length; n++) {
    var r = df[e[n]];
    if (r.root === t) return r;
  }
  return null;
}
var RPt = ["play", "pause", "replay", "retry"],
  Z0e = 0,
  Y0e = 0,
  G_ = null,
  mF = (function (t) {
    ju(n, tPt);
    var e = Wu(n);
    function n(r) {
      var i;
      Hs(this, n);
      var o = Pt.deepMerge(W0e(), r);
      Va(Oi((i = e.call(this, o))), "canPlayFunc", function () {
        if (i.config) {
          var y = i.config,
            v = y.autoplay,
            b = y.defaultPlaybackRate;
          Gl.logInfo("player", "canPlayFunc, startTime", i.__startTime),
            i._seekToStartTime(),
            (i.playbackRate = b),
            (v || i._useAutoplay) && i.mediaPlay(),
            i.off(lm, i.canPlayFunc),
            i.removeClass(qr.ENTER);
        }
      }),
        Va(Oi(i), "onFullscreenChange", function (y, v) {
          var b = function () {
              Pt.setTimeout(
                Oi(i),
                function () {
                  i.resize();
                },
                100
              );
            },
            w = Pt.getFullScreenEl();
          i._fullActionFrom
            ? (i._fullActionFrom = "")
            : i.emit(eU, {
                eventType: "system",
                action: "switch_fullscreen",
                pluginName: "player",
                currentTime: i.currentTime,
                duration: i.duration,
                props: [{ prop: "fullscreen", from: !0, to: !1 }],
              });
          var k = xDt(w, i.playerId, pT);
          if (v || (w && (w === i._fullscreenEl || k)))
            b(),
              !i.config.closeFocusVideoFocus && i.media.focus(),
              (i.fullscreen = !0),
              i.changeFullStyle(i.root, w, qr.FULLSCREEN),
              i.emit(m0, !0, i._fullScreenOffset),
              i.cssfullscreen && i.exitCssFullscreen();
          else if (i.fullscreen) {
            b();
            var D = Oi(i),
              $ = D._fullScreenOffset;
            if (
              (D.config.needFullscreenScroll
                ? (window.scrollTo($.left, $.top),
                  Pt.setTimeout(
                    Oi(i),
                    function () {
                      (i.fullscreen = !1), (i._fullScreenOffset = null);
                    },
                    100
                  ))
                : (!i.config.closeFocusVideoFocus && i.media.focus(),
                  (i.fullscreen = !1),
                  (i._fullScreenOffset = null)),
              i.cssfullscreen)
            )
              i.removeClass(qr.FULLSCREEN);
            else {
              var N = i._fullscreenEl;
              N ||
                (!i.root.contains(y.target) && y.target !== i.root) ||
                (N = y.target),
                i.recoverFullStyle(i.root, N, qr.FULLSCREEN);
            }
            (i._fullscreenEl = null), i.emit(m0, !1);
          }
        }),
        Va(Oi(i), "_onWebkitbeginfullscreen", function (y) {
          (i._fullscreenEl = i.media), i.onFullscreenChange(y, !0);
        }),
        Va(Oi(i), "_onWebkitendfullscreen", function (y) {
          i.onFullscreenChange(y, !1);
        }),
        yUe(Oi(i), RPt),
        (i.config = o),
        (i._pluginInfoId = Pt.generateSessionId()),
        DDt(Oi(i));
      var l = i.constructor.defaultPreset;
      if (i.config.presets.length) {
        var u,
          c = qt((u = i.config.presets)).call(u, "default");
        c >= 0 && l && (i.config.presets[c] = l);
      } else l && i.config.presets.push(l);
      if (
        ((i.userTimer = null),
        (i.waitTimer = null),
        (i.handleSource = !0),
        (i._state = ds.INITIAL),
        (i.isAd = !1),
        (i.isError = !1),
        (i._hasStart = !1),
        (i.isSeeking = !1),
        (i.isCanplay = !1),
        (i._useAutoplay = !1),
        (i.__startTime = -1),
        (i.rotateDeg = 0),
        (i.isActive = !1),
        (i.fullscreen = !1),
        (i.cssfullscreen = !1),
        (i.isRotateFullscreen = !1),
        (i._fullscreenEl = null),
        (i.timeSegments = []),
        (i._cssfullscreenEl = null),
        (i.curDefinition = null),
        (i._orgCss = ""),
        (i._fullScreenOffset = null),
        (i._videoHeight = 0),
        (i._videoWidth = 0),
        (i.videoPos = {
          pi: 1,
          scale: 0,
          rotate: -1,
          x: 0,
          y: 0,
          h: -1,
          w: -1,
          vy: 0,
          vx: 0,
        }),
        (i.sizeInfo = { width: 0, height: 0, left: 0, top: 0 }),
        (i._accPlayed = { t: 0, acc: 0, loopAcc: 0 }),
        (i._offsetInfo = { currentTime: -1, duration: 0 }),
        (i.innerContainer = null),
        (i.controls = null),
        (i.topBar = null),
        (i.root = null),
        (i.__i18n = P1.init(i._pluginInfoId)),
        Na.os.isAndroid &&
          Na.osVersion > 0 &&
          Na.osVersion < 6 &&
          (i.config.autoplay = !1),
        (i.database = new nPt()),
        (i.isUserActive = !1),
        (i._onceSeekCanplay = null),
        (i._isPauseBeforeSeek = 0),
        (i.innerStates = { isActiveLocked: !1 }),
        (i.instManager = G_),
        !i._initDOM())
      )
        return (
          console.error(
            new Error(
              "can't find the dom which id is ".concat(
                i.config.id,
                " or this.config.el does not exist"
              )
            )
          ),
          fse(i)
        );
      var d = i.config,
        h = d.definition,
        f = h === void 0 ? {} : h;
      if (!d.url && f.list && f.list.length > 0) {
        var p,
          g = ji((p = f.list)).call(p, function (y) {
            return y.definition && y.definition === f.defaultDefinition;
          });
        g || ((f.defaultDefinition = f.list[0].definition), (g = f.list[0])),
          (i.config.url = g.url),
          (i.curDefinition = g);
      }
      return (
        i._bindEvents(),
        i._registerPresets(),
        i._registerPlugins(),
        Hd.onPluginsReady(Oi(i)),
        i.getInitDefinition(),
        i.setState(ds.READY),
        Pt.setTimeout(
          Oi(i),
          function () {
            i.emit(vse);
          },
          0
        ),
        i.onReady && i.onReady(),
        (i.config.videoInit || i.config.autoplay) &&
          (!i.hasStart || i.state < ds.ATTACHED) &&
          i.start(),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "_initDOM",
            value: function () {
              var r,
                i,
                o,
                l,
                u = this;
              if (
                ((this.root = this.config.id
                  ? document.getElementById(this.config.id)
                  : null),
                !this.root)
              ) {
                var c = this.config.el;
                if (!c || c.nodeType !== 1)
                  return (
                    this.emit(
                      Kk,
                      new See("use", this.config.vid, {
                        line: 32,
                        handle: "Constructor",
                        msg: "container id can't be empty",
                      })
                    ),
                    console.error(
                      "this.confg.id or this.config.el can't be empty"
                    ),
                    !1
                  );
                this.root = c;
              }
              var d = SPt(this.root);
              if (
                (d &&
                  (Gl.logWarn(
                    "The is an Player instance already exists in this.root, destroy it and reinitialize"
                  ),
                  d.destroy()),
                this.root.setAttribute(pT, this.playerId),
                this.media.setAttribute(pT, this.playerId),
                (l = G_) === null || l === void 0 || l.add(this),
                Hd.init(this),
                this._initBaseDoms(),
                this.config.controls)
              ) {
                var h = this.config.controls.root || null,
                  f = Hd.register(this, bPt, { root: h });
                this.controls = f;
              }
              var p =
                this.config.isMobileSimulateMode === "mobile"
                  ? "mobile"
                  : Na.device;
              if (
                (this.addClass(
                  Ce(
                    (r = Ce(
                      (i = Ce((o = "".concat(qr.DEFAULT, " "))).call(
                        o,
                        qr.INACTIVE,
                        " xgplayer-"
                      ))
                    ).call(i, p, " "))
                  ).call(r, this.config.controls ? "" : qr.NO_CONTROLS)
                ),
                this.config.autoplay
                  ? this.addClass(qr.ENTER)
                  : this.addClass(qr.NO_START),
                this.config.fluid)
              ) {
                var g = this.config,
                  y = g.width,
                  v = g.height;
                (typeof y == "number" && typeof v == "number") ||
                  ((y = 600), (v = 337.5));
                var b = {
                  width: "100%",
                  height: "0",
                  "max-width": "100%",
                  "padding-top": "".concat((100 * v) / y, "%"),
                };
                Dn(b).forEach(function (P) {
                  u.root.style[P] = b[P];
                });
              } else
                ["width", "height"].forEach(function (P) {
                  u.config[P] &&
                    (typeof u.config[P] != "number"
                      ? (u.root.style[P] = u.config[P])
                      : (u.root.style[P] = "".concat(u.config[P], "px")));
                });
              var w = this.root.getBoundingClientRect(),
                k = w.width,
                D = w.height,
                $ = w.left,
                N = w.top;
              return (
                (this.sizeInfo.width = k),
                (this.sizeInfo.height = D),
                (this.sizeInfo.left = $),
                (this.sizeInfo.top = N),
                !0
              );
            },
          },
          {
            key: "_initBaseDoms",
            value: function () {
              (this.topBar = null),
                (this.leftBar = null),
                (this.rightBar = null),
                this.config.marginControls &&
                  ((this.innerContainer = Pt.createDom(
                    "xg-video-container",
                    "",
                    { "data-index": -1 },
                    "xg-video-container"
                  )),
                  this.root.appendChild(this.innerContainer));
            },
          },
          {
            key: "_bindEvents",
            value: function () {
              var r = this;
              ["focus", "blur"].forEach(function (i) {
                r.on(i, r["on" + i.charAt(0).toUpperCase() + jn(i).call(i, 1)]);
              }),
                F0e.forEach(function (i) {
                  document &&
                    document.addEventListener(i, r.onFullscreenChange);
                }),
                Na.os.isIos &&
                  (this.media.addEventListener(
                    "webkitbeginfullscreen",
                    this._onWebkitbeginfullscreen
                  ),
                  this.media.addEventListener(
                    "webkitendfullscreen",
                    this._onWebkitendfullscreen
                  )),
                this.once(Y6, this.resize),
                (this.playFunc = function () {
                  r.config.closeFocusVideoFocus || r.media.focus();
                }),
                this.once(C0, this.playFunc);
            },
          },
          {
            key: "_unbindEvents",
            value: function () {
              var r = this;
              this.root.removeEventListener("mousemove", this.mousemoveFunc),
                F0e.forEach(function (i) {
                  document.removeEventListener(i, r.onFullscreenChange);
                }),
                this.playFunc && this.off(C0, this.playFunc),
                this.off(lm, this.canPlayFunc),
                this.media.removeEventListener(
                  "webkitbeginfullscreen",
                  this._onWebkitbeginfullscreen
                ),
                this.media.removeEventListener(
                  "webkitendfullscreen",
                  this._onWebkitendfullscreen
                );
            },
          },
          {
            key: "_clearUserTimer",
            value: function () {
              this.userTimer &&
                (Pt.clearTimeout(this, this.userTimer),
                (this.userTimer = null));
            },
          },
          {
            key: "_startInit",
            value: function (r) {
              var i = this;
              if (
                this.media &&
                ((r &&
                  r !== "" &&
                  (Pt.typeOf(r) !== "Array" || r.length !== 0)) ||
                  ((r = ""),
                  this.emit(rUe),
                  Gl.logWarn(
                    "config.url is null, please get url and run player._startInit(url)"
                  ),
                  !this.config.nullUrlStart))
              ) {
                this.handleSource &&
                  (this._detachSourceEvents(this.media),
                  Pt.typeOf(r) === "Array" && r.length > 0
                    ? this._attachSourceEvents(this.media, r)
                    : this.media.src && this.media.src === r
                    ? r || this.media.removeAttribute("src")
                    : (this.media.src = r)),
                  Pt.typeOf(this.config.volume) === "Number" &&
                    (this.volume = this.config.volume);
                var o = this.innerContainer ? this.innerContainer : this.root;
                this.media instanceof window.Element &&
                  !o.contains(this.media) &&
                  o.insertBefore(this.media, o.firstChild);
                var l = this.media.readyState;
                Gl.logInfo("_startInit readyState", l),
                  this.config.autoplay &&
                    (!Pt.isMSE(this.media) && this.load(),
                    (Na.os.isIpad || Na.os.isPhone) && this.mediaPlay());
                var u = this.config.startTime;
                (this.__startTime = u > 0 ? u : -1),
                  (this.config.startTime = 0),
                  l >= 2 && this.duration > 0
                    ? this.canPlayFunc()
                    : this.on(lm, this.canPlayFunc),
                  (!this.hasStart || this.state < ds.ATTACHED) &&
                    Hd.afterInit(this),
                  (this.hasStart = !0),
                  this.setState(ds.ATTACHED),
                  Pt.setTimeout(
                    this,
                    function () {
                      i.emit(Y9);
                    },
                    0
                  );
              }
            },
          },
          {
            key: "_registerPlugins",
            value: function () {
              var r = this,
                i =
                  !(arguments.length > 0 && arguments[0] !== void 0) ||
                  arguments[0];
              this._loadingPlugins = [];
              var o = this.config.ignores || [],
                l = this.config.plugins || [],
                u = this.config.i18n || [];
              i && P1.extend(u, this.__i18n);
              var c = o.join("||").toLowerCase().split("||"),
                d = this.plugins;
              l.forEach(function (h) {
                try {
                  var f = h.plugin ? h.plugin.pluginName : h.pluginName;
                  if (f && qt(c).call(c, f.toLowerCase()) > -1) return null;
                  if (!i && d[f.toLowerCase()]) return;
                  if (h.lazy && h.loader) {
                    var p = Hd.lazyRegister(r, h);
                    return void (
                      h.forceBeforeInit &&
                      (p
                        .then(function () {
                          var g, y;
                          tl((g = r._loadingPlugins)).call(
                            g,
                            qt((y = r._loadingPlugins)).call(y, p),
                            1
                          );
                        })
                        .catch(function (g) {
                          var y, v;
                          Gl.logError("_registerPlugins:loadingPlugin", g),
                            tl((y = r._loadingPlugins)).call(
                              y,
                              qt((v = r._loadingPlugins)).call(v, p),
                              1
                            );
                        }),
                      r._loadingPlugins.push(p))
                    );
                  }
                  return r.registerPlugin(h);
                } catch (g) {
                  Gl.logError("_registerPlugins:", g);
                }
              });
            },
          },
          {
            key: "_registerPresets",
            value: function () {
              var r = this;
              this.config.presets.forEach(function (i) {
                vPt(r, i);
              });
            },
          },
          {
            key: "_getRootByPosition",
            value: function (r) {
              var i = null;
              switch (r) {
                case Lh.ROOT_RIGHT:
                  this.rightBar ||
                    (this.rightBar = Pt.createPositionBar(
                      "xg-right-bar",
                      this.root
                    )),
                    (i = this.rightBar);
                  break;
                case Lh.ROOT_LEFT:
                  this.leftBar ||
                    (this.leftBar = Pt.createPositionBar(
                      "xg-left-bar",
                      this.root
                    )),
                    (i = this.leftBar);
                  break;
                case Lh.ROOT_TOP:
                  this.topBar ||
                    ((this.topBar = Pt.createPositionBar(
                      "xg-top-bar",
                      this.root
                    )),
                    this.config.topBarAutoHide &&
                      Pt.addClass(this.topBar, qr.TOP_BAR_AUTOHIDE)),
                    (i = this.topBar);
                  break;
                default:
                  i = this.innerContainer || this.root;
              }
              return i;
            },
          },
          {
            key: "registerPlugin",
            value: function (r, i) {
              var o = Hd.formatPluginInfo(r, i),
                l = o.PLUFGIN,
                u = o.options,
                c = this.config.plugins;
              !Hd.checkPluginIfExits(l.pluginName, c) && c.push(l);
              var d = Hd.getRootByConfig(l.pluginName, this.config);
              d.root && (u.root = d.root),
                d.position && (u.position = d.position);
              var h,
                f = u.position
                  ? u.position
                  : (u.config && u.config.position) ||
                    (l.defaultConfig && l.defaultConfig.position);
              return !u.root &&
                typeof f == "string" &&
                qt(f).call(f, "controls") > -1
                ? (h = this.controls) === null || h === void 0
                  ? void 0
                  : h.registerPlugin(l, u, l.pluginName)
                : (u.root || (u.root = this._getRootByPosition(f)),
                  Hd.register(this, l, u));
            },
          },
          {
            key: "deregister",
            value: function (r) {
              typeof r == "string"
                ? Hd.unRegister(this, r)
                : r instanceof $I && Hd.unRegister(this, r.pluginName);
            },
          },
          {
            key: "unRegisterPlugin",
            value: function (r) {
              var i =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
              this.deregister(r), i && this.removePluginFromConfig(r);
            },
          },
          {
            key: "removePluginFromConfig",
            value: function (r) {
              var i;
              if (
                (typeof r == "string"
                  ? (i = r)
                  : r instanceof $I && (i = r.pluginName),
                i)
              ) {
                for (var o = this.config.plugins.length - 1; o > -1; o--)
                  if (
                    this.config.plugins[o].pluginName.toLowerCase() ===
                    i.toLowerCase()
                  ) {
                    var l;
                    tl((l = this.config.plugins)).call(l, o, 1);
                    break;
                  }
              }
            },
          },
          {
            key: "plugins",
            get: function () {
              return Hd.getPlugins(this);
            },
          },
          {
            key: "getPlugin",
            value: function (r) {
              var i = Hd.findPlugin(this, r);
              return i && i.pluginName ? i : null;
            },
          },
          {
            key: "addClass",
            value: function (r) {
              this.root &&
                (Pt.hasClass(this.root, r) || Pt.addClass(this.root, r));
            },
          },
          {
            key: "removeClass",
            value: function (r) {
              this.root && Pt.removeClass(this.root, r);
            },
          },
          {
            key: "hasClass",
            value: function (r) {
              if (this.root) return Pt.hasClass(this.root, r);
            },
          },
          {
            key: "setAttribute",
            value: function (r, i) {
              this.root && this.root.setAttribute(r, i);
            },
          },
          {
            key: "removeAttribute",
            value: function (r, i) {
              this.root && this.root.removeAttribute(r, i);
            },
          },
          {
            key: "start",
            value: function (r) {
              var i = this;
              if (!(this.state > ds.ATTACHING))
                return (
                  r || this.config.url || this.getInitDefinition(),
                  (this.hasStart = !0),
                  this.setState(ds.ATTACHING),
                  this._registerPlugins(!1),
                  Hd.beforeInit(this)
                    .then(function () {
                      if (i.config) {
                        r || (r = i.url || i.config.url);
                        var o = i.preProcessUrl(r);
                        return i._startInit(o.url);
                      }
                    })
                    .catch(function (o) {
                      throw (
                        ((o.fileName = "player"),
                        (o.lineNumber = "236"),
                        Gl.logError("start:beforeInit:", o),
                        o)
                      );
                    })
                );
            },
          },
          {
            key: "switchURL",
            value: function (r, i) {
              var o = this,
                l = r;
              Pt.typeOf(r) === "Object" && (l = r.url),
                (l = this.preProcessUrl(l).url);
              var u = this.currentTime;
              this.__startTime = u;
              var c = this.paused && !this.isError;
              return (
                (this.src = l),
                new Ar(function (d, h) {
                  var f = function (g) {
                      o.off("timeupdate", p), o.off("canplay", p), h(g);
                    },
                    p = function () {
                      o._seekToStartTime(),
                        c && o.pause(),
                        o.off("error", f),
                        d(!0);
                    };
                  o.once("error", f),
                    l
                      ? (Na.os.isAndroid
                          ? o.once("timeupdate", p)
                          : o.once("canplay", p),
                        o.play())
                      : o.errorHandler("error", {
                          code: 6,
                          message: "empty_src",
                        });
                })
              );
            },
          },
          {
            key: "videoPlay",
            value: function () {
              this.mediaPlay();
            },
          },
          {
            key: "mediaPlay",
            value: function () {
              var r = this;
              if (!this.hasStart && this.state < ds.ATTACHED)
                return (
                  this.removeClass(qr.NO_START),
                  this.addClass(qr.ENTER),
                  this.start(),
                  void (this._useAutoplay = !0)
                );
              this.state < ds.RUNNING &&
                (this.removeClass(qr.NO_START),
                !this.isCanplay && this.addClass(qr.ENTER));
              var i = Al(el(n.prototype), "play", this).call(this);
              return (
                i !== void 0 && i && i.then
                  ? i
                      .then(function () {
                        r.removeClass(qr.NOT_ALLOW_AUTOPLAY),
                          r.addClass(qr.PLAYING),
                          r.state < ds.RUNNING &&
                            (Gl.logInfo(">>>>playPromise.then"),
                            r.setState(ds.RUNNING),
                            r.emit(NT));
                      })
                      .catch(function (o) {
                        if (
                          (Gl.logWarn(">>>>playPromise.catch", o.name),
                          r.media && r.media.error)
                        )
                          return r.onError(), void r.removeClass(qr.ENTER);
                        o.name === "NotAllowedError" &&
                          (r._errorTimer = Pt.setTimeout(
                            r,
                            function () {
                              (r._errorTimer = null),
                                r.emit(CI),
                                r.addClass(qr.NOT_ALLOW_AUTOPLAY),
                                r.removeClass(qr.ENTER),
                                r.pause(),
                                r.setState(ds.NOTALLOW);
                            },
                            0
                          ));
                      })
                  : (Gl.logWarn("video.play not return promise"),
                    this.state < ds.RUNNING &&
                      (this.setState(ds.RUNNING),
                      this.removeClass(qr.NOT_ALLOW_AUTOPLAY),
                      this.removeClass(qr.NO_START),
                      this.removeClass(qr.ENTER),
                      this.addClass(qr.PLAYING),
                      this.emit(NT))),
                i
              );
            },
          },
          {
            key: "mediaPause",
            value: function () {
              Al(el(n.prototype), "pause", this).call(this);
            },
          },
          {
            key: "videoPause",
            value: function () {
              Al(el(n.prototype), "pause", this).call(this);
            },
          },
          {
            key: "play",
            value: function () {
              var r = this;
              return (
                this.removeClass(qr.PAUSED),
                qy(this, "play", function () {
                  return r.mediaPlay();
                })
              );
            },
          },
          {
            key: "pause",
            value: function () {
              var r = this;
              qy(this, "pause", function () {
                Al(el(n.prototype), "pause", r).call(r);
              });
            },
          },
          {
            key: "seek",
            value: function (r, i) {
              var o = this;
              if (this.media && !PI(Number(r)) && this.hasStart) {
                var l = this.config,
                  u = l.isSeekedPlay,
                  c = l.seekedStatus,
                  d = i || (u ? "play" : c);
                (r = r < 0 ? 0 : r > this.duration ? _i(this.duration, 10) : r),
                  !this._isPauseBeforeSeek &&
                    (this._isPauseBeforeSeek = this.paused ? 2 : 1),
                  this._onceSeekCanplay && this.off(gF, this._onceSeekCanplay),
                  (this._onceSeekCanplay = function () {
                    switch ((o.removeClass(qr.ENTER), (o.isSeeking = !1), d)) {
                      case "play":
                        o.play();
                        break;
                      case "pause":
                        o.pause();
                        break;
                      default:
                        o._isPauseBeforeSeek > 1 || o.paused
                          ? o.pause()
                          : o.play();
                    }
                    (o._isPauseBeforeSeek = 0), (o._onceSeekCanplay = null);
                  }),
                  this.once(gF, this._onceSeekCanplay),
                  this.state < ds.RUNNING
                    ? (this.removeClass(qr.NO_START),
                      (this.currentTime = r),
                      this.play())
                    : (this.currentTime = r);
              }
            },
          },
          {
            key: "getInitDefinition",
            value: function () {
              var r,
                i = this,
                o = this.config,
                l = o.definition;
              !o.url &&
                l &&
                l.list &&
                l.list.length > 0 &&
                l.defaultDefinition &&
                On((r = l.list)).call(r, function (u) {
                  u.definition === l.defaultDefinition &&
                    ((i.config.url = u.url), (i.curDefinition = u));
                });
            },
          },
          {
            key: "changeDefinition",
            value: function (r, i) {
              var o = this,
                l = this.config.definition;
              if (
                (Array.isArray(l == null ? void 0 : l.list) &&
                  l.list.forEach(function (c) {
                    (r == null ? void 0 : r.definition) === c.definition &&
                      (o.curDefinition = c);
                  }),
                r != null &&
                  r.bitrate &&
                  typeof r.bitrate != "number" &&
                  (r.bitrate = _i(r.bitrate, 10) || 0),
                this.emit(_se, { from: i, to: r }),
                this.hasStart)
              ) {
                var u = this.switchURL(
                  r.url,
                  hS(
                    {
                      seamless:
                        l.seamless !== !1 &&
                        typeof MediaSource < "u" &&
                        typeof MediaSource.isTypeSupported == "function",
                    },
                    r
                  )
                );
                u && u.then
                  ? u.then(function () {
                      o.emit(J6, { from: i, to: r });
                    })
                  : this.emit(J6, { from: i, to: r });
              } else this.config.url = r.url;
            },
          },
          {
            key: "reload",
            value: function () {
              this.load(),
                (this.reloadFunc = function () {
                  this.play();
                }),
                this.once(Y6, this.reloadFunc);
            },
          },
          {
            key: "resetState",
            value: function () {
              var r = this,
                i = [
                  qr.NOT_ALLOW_AUTOPLAY,
                  qr.PLAYING,
                  qr.NO_START,
                  qr.PAUSED,
                  qr.REPLAY,
                  qr.ENTER,
                  qr.ENDED,
                  qr.ERROR,
                  qr.LOADING,
                ];
              (this.hasStart = !1),
                (this.isError = !1),
                (this._useAutoplay = !1),
                this.mediaPause(),
                (this._accPlayed.acc = 0),
                (this._accPlayed.t = 0),
                (this._accPlayed.loopAcc = 0),
                i.forEach(function (o) {
                  r.removeClass(o);
                }),
                this.addClass(qr.NO_START),
                this.emit(Ese);
            },
          },
          {
            key: "reset",
            value: function () {
              var r = this,
                i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : [],
                o = arguments.length > 1 ? arguments[1] : void 0;
              if (
                (this.resetState(),
                this.plugins &&
                  (On(i).call(i, function (c) {
                    r.deregister(c);
                  }),
                  o))
              ) {
                var l,
                  u = W0e();
                hv((l = Dn(this.config))).call(l, function (c) {
                  r.config[c] === "undefined" ||
                    (c !== "plugins" &&
                      c !== "presets" &&
                      c !== "el" &&
                      c !== "id") ||
                    (r.config[c] = u[c]);
                });
              }
            },
          },
          {
            key: "destroy",
            value: function () {
              var r,
                i,
                o = this,
                l = this.innerContainer,
                u = this.root,
                c = this.media;
              if (u && c) {
                if (
                  ((this.hasStart = !1),
                  (this._useAutoplay = !1),
                  u.removeAttribute(pT),
                  c.removeAttribute(pT),
                  this.updateAcc("destroy"),
                  this._unbindEvents(),
                  this._detachSourceEvents(this.media),
                  Pt.clearAllTimers(this),
                  this.emit(aUe),
                  (i = G_) === null || i === void 0 || i.remove(this),
                  Hd.destroy(this),
                  vUe(this),
                  Al(el(n.prototype), "destroy", this).call(this),
                  this.fullscreen &&
                    this._fullscreenEl === this.root &&
                    this.exitFullscreen(),
                  l)
                )
                  for (var d = l.children, h = 0; h < d.length; h++)
                    l.removeChild(d[h]);
                !l &&
                  c instanceof window.Node &&
                  u.contains(c) &&
                  !this.config.remainMediaAfterDestroy &&
                  u.removeChild(c),
                  On(
                    (r = ["topBar", "leftBar", "rightBar", "innerContainer"])
                  ).call(r, function (p) {
                    o[p] && u.removeChild(o[p]), (o[p] = null);
                  });
                var f = u.className.split(" ");
                f.length > 0
                  ? (u.className = _r(f)
                      .call(f, function (p) {
                        return qt(p).call(p, "xgplayer") < 0;
                      })
                      .join(" "))
                  : (u.className = ""),
                  this.removeAttribute("data-xgfill"),
                  [
                    "isSeeking",
                    "isCanplay",
                    "isActive",
                    "cssfullscreen",
                    "fullscreen",
                  ].forEach(function (p) {
                    o[p] = !1;
                  });
              }
            },
          },
          {
            key: "replay",
            value: function () {
              var r = this;
              this.removeClass(qr.ENDED),
                (this.currentTime = 0),
                (this.isSeeking = !1),
                qy(this, "replay", function () {
                  r.once(gF, function () {
                    var i = r.mediaPlay();
                    i &&
                      i.catch &&
                      i.catch(function (o) {
                        console.log(o);
                      });
                  }),
                    r.emit(iUe),
                    r.onPlay();
                });
            },
          },
          {
            key: "retry",
            value: function () {
              var r = this;
              this.removeClass(qr.ERROR),
                this.addClass(qr.LOADING),
                qy(this, "retry", function () {
                  var i = r.currentTime,
                    o = r.config.url,
                    l = Pt.isMSE(r.media) ? { url: o } : r.preProcessUrl(o);
                  (r.src = l.url),
                    !r.config.isLive && (r.currentTime = i),
                    r.once(lm, function () {
                      r.mediaPlay();
                    });
                });
            },
          },
          {
            key: "changeFullStyle",
            value: function (r, i, o, l) {
              r &&
                (l || (l = qr.PARENT_FULLSCREEN),
                this._orgCss || (this._orgCss = Pt.filterStyleFromText(r)),
                Pt.addClass(r, o),
                i &&
                  i !== r &&
                  !this._orgPCss &&
                  ((this._orgPCss = Pt.filterStyleFromText(i)),
                  Pt.addClass(i, l),
                  i.setAttribute(pT, this.playerId)));
            },
          },
          {
            key: "recoverFullStyle",
            value: function (r, i, o, l) {
              l || (l = qr.PARENT_FULLSCREEN),
                this._orgCss &&
                  (Pt.setStyleFromCsstext(r, this._orgCss),
                  (this._orgCss = "")),
                Pt.removeClass(r, o),
                i &&
                  i !== r &&
                  this._orgPCss &&
                  (Pt.setStyleFromCsstext(i, this._orgPCss),
                  (this._orgPCss = ""),
                  Pt.removeClass(i, l),
                  i.removeAttribute(pT));
            },
          },
          {
            key: "getFullscreen",
            value: function () {
              var r =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : this.config.fullscreenTarget,
                i = this.root,
                o = this.media;
              if (
                ((r !== "video" && r !== "media") || (r = this[r]),
                r || (r = i),
                (this._fullScreenOffset = {
                  top: Pt.scrollTop(),
                  left: Pt.scrollLeft(),
                }),
                (this._fullscreenEl = r),
                (this._fullActionFrom = "get"),
                Pt.getFullScreenEl() === this._fullscreenEl)
              )
                return this.onFullscreenChange(), Ar.resolve();
              try {
                for (var l = 0; l < U0e.length; l++) {
                  var u = U0e[l];
                  if (r[u]) {
                    var c =
                      u === "webkitRequestFullscreen"
                        ? r.webkitRequestFullscreen(
                            window.Element.ALLOW_KEYBOARD_INPUT
                          )
                        : r[u]();
                    return c && c.then ? c : Ar.resolve();
                  }
                }
                return o.fullscreenEnabled || o.webkitSupportsFullscreen
                  ? (o.webkitEnterFullscreen(), Ar.resolve())
                  : Ar.reject(new Error("call getFullscreen fail"));
              } catch {
                return Ar.reject(new Error("call getFullscreen fail"));
              }
            },
          },
          {
            key: "exitFullscreen",
            value: function (r) {
              if (
                (this.isRotateFullscreen && this.exitRotateFullscreen(),
                this._fullscreenEl || Pt.getFullScreenEl())
              ) {
                this.root;
                var i = this.media;
                this._fullActionFrom = "exit";
                try {
                  for (var o = 0; o < B0e.length; o++) {
                    var l = B0e[o];
                    if (document[l]) {
                      var u = document[l]();
                      return u && u.then ? u : Ar.resolve();
                    }
                  }
                  return i && i.webkitSupportsFullscreen
                    ? (i.webkitExitFullScreen(), Ar.resolve())
                    : Ar.reject(new Error("call exitFullscreen fail"));
                } catch {
                  return Ar.reject(new Error("call exitFullscreen fail"));
                }
              }
            },
          },
          {
            key: "getCssFullscreen",
            value: function () {
              var r,
                i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : this.config.fullscreenTarget;
              this.isRotateFullscreen
                ? this.exitRotateFullscreen()
                : this.fullscreen && this.exitFullscreen();
              var o = i
                ? Ce((r = "".concat(qr.INNER_FULLSCREEN, " "))).call(
                    r,
                    qr.CSS_FULLSCREEN
                  )
                : qr.CSS_FULLSCREEN;
              this.changeFullStyle(this.root, i, o);
              var l = this.config.fullscreen,
                u = l === void 0 ? {} : l;
              (u.useCssFullscreen === !0 ||
                (typeof u.useCssFullscreen == "function" &&
                  u.useCssFullscreen())) &&
                ((this.fullscreen = !0), this.emit(m0, !0)),
                (this._cssfullscreenEl = i),
                (this.cssfullscreen = !0),
                this.emit(Q6, !0);
            },
          },
          {
            key: "exitCssFullscreen",
            value: function () {
              var r,
                i = this._cssfullscreenEl
                  ? Ce((r = "".concat(qr.INNER_FULLSCREEN, " "))).call(
                      r,
                      qr.CSS_FULLSCREEN
                    )
                  : qr.CSS_FULLSCREEN;
              if (this.fullscreen) {
                var o = this.config.fullscreen,
                  l = o === void 0 ? {} : o;
                l.useCssFullscreen === !0 ||
                (typeof l.useCssFullscreen == "function" &&
                  l.useCssFullscreen())
                  ? (this.recoverFullStyle(this.root, this._cssfullscreenEl, i),
                    (this.fullscreen = !1),
                    this.emit(m0, !1))
                  : this.removeClass(i);
              } else this.recoverFullStyle(this.root, this._cssfullscreenEl, i);
              (this._cssfullscreenEl = null),
                (this.cssfullscreen = !1),
                this.emit(Q6, !1);
            },
          },
          {
            key: "getRotateFullscreen",
            value: function () {
              var r,
                i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : this.config.fullscreenTarget;
              this.cssfullscreen && this.exitCssFullscreen(i);
              var o = i
                ? Ce((r = "".concat(qr.INNER_FULLSCREEN, " "))).call(
                    r,
                    qr.ROTATE_FULLSCREEN
                  )
                : qr.ROTATE_FULLSCREEN;
              (this._fullscreenEl = i || this.root),
                this.changeFullStyle(
                  this.root,
                  i,
                  o,
                  qr.PARENT_ROTATE_FULLSCREEN
                ),
                (this.isRotateFullscreen = !0),
                (this.fullscreen = !0),
                this.setRotateDeg(90),
                (this._rootStyle = this.root.getAttribute("style")),
                (this.root.style.width = "".concat(window.innerHeight, "px")),
                this.emit(m0, !0);
            },
          },
          {
            key: "exitRotateFullscreen",
            value: function (r) {
              var i,
                o =
                  this._fullscreenEl !== this.root
                    ? Ce((i = "".concat(qr.INNER_FULLSCREEN, " "))).call(
                        i,
                        qr.ROTATE_FULLSCREEN
                      )
                    : qr.ROTATE_FULLSCREEN;
              this.recoverFullStyle(
                this.root,
                this._fullscreenEl,
                o,
                qr.PARENT_ROTATE_FULLSCREEN
              ),
                (this.isRotateFullscreen = !1),
                (this.fullscreen = !1),
                this.setRotateDeg(0),
                this.emit(m0, !1),
                this._rootStyle &&
                  ((this.root.style.style = this._rootStyle),
                  (this._rootStyle = !1));
            },
          },
          {
            key: "setRotateDeg",
            value: function (r) {
              window.orientation === 90 || window.orientation === -90
                ? (this.rotateDeg = 0)
                : (this.rotateDeg = r);
            },
          },
          {
            key: "focus",
            value: function () {
              var r =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : {
                      autoHide: !this.config.closeDelayBlur,
                      delay: this.config.inactive,
                    };
              this.isActive
                ? this.onFocus(r)
                : this.emit(
                    yse,
                    hS({ paused: this.paused, ended: this.ended }, r)
                  );
            },
          },
          {
            key: "blur",
            value: function () {
              var r =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : { ignorePaused: !1 };
              this.isActive
                ? (this._clearUserTimer(),
                  this.emit(
                    nUe,
                    hS({ paused: this.paused, ended: this.ended }, r)
                  ))
                : this.onBlur(r);
            },
          },
          {
            key: "onFocus",
            value: function () {
              var r = this,
                i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : { autoHide: !0, delay: 3e3 },
                o = this.innerStates;
              if (
                ((this.isActive = !0),
                this.removeClass(qr.INACTIVE),
                this._clearUserTimer(),
                i.isLock !== void 0 && (o.isActiveLocked = i.isLock),
                i.autoHide === !1 || i.isLock === !0 || o.isActiveLocked)
              )
                this._clearUserTimer();
              else {
                var l = i && i.delay ? i.delay : this.config.inactive;
                this.userTimer = Pt.setTimeout(
                  this,
                  function () {
                    (r.userTimer = null), r.blur();
                  },
                  l
                );
              }
            },
          },
          {
            key: "onBlur",
            value: function () {
              var r = (
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : {}
                ).ignorePaused,
                i = r !== void 0 && r;
              if (!this.innerStates.isActiveLocked) {
                var o = this.config.closePauseVideoFocus;
                (this.isActive = !1),
                  (i || o || (!this.paused && !this.ended)) &&
                    this.addClass(qr.INACTIVE);
              }
            },
          },
          {
            key: "onEmptied",
            value: function () {
              this.updateAcc("emptied");
            },
          },
          {
            key: "onCanplay",
            value: function () {
              this.removeClass(qr.ENTER),
                this.removeClass(qr.ERROR),
                this.removeClass(qr.LOADING),
                (this.isCanplay = !0),
                this.waitTimer && Pt.clearTimeout(this, this.waitTimer);
            },
          },
          {
            key: "onLoadeddata",
            value: function () {
              var r = this;
              (this.isError = !1),
                (this.isSeeking = !1),
                this.__startTime > 0 &&
                  (this.duration > 0
                    ? this._seekToStartTime()
                    : this.once(mse, function () {
                        r._seekToStartTime();
                      }));
            },
          },
          {
            key: "onLoadstart",
            value: function () {
              this.removeClass(qr.ERROR), (this.isCanplay = !1);
            },
          },
          {
            key: "onPlay",
            value: function () {
              this.state === ds.ENDED && this.setState(ds.RUNNING),
                this.removeClass(qr.PAUSED),
                this.ended && this.removeClass(qr.ENDED),
                !this.config.closePlayVideoFocus && this.focus();
            },
          },
          {
            key: "onPause",
            value: function () {
              this.addClass(qr.PAUSED),
                this.updateAcc("pause"),
                this.config.closePauseVideoFocus ||
                  (this._clearUserTimer(), this.focus());
            },
          },
          {
            key: "onEnded",
            value: function () {
              this.updateAcc("ended"),
                this.addClass(qr.ENDED),
                this.setState(ds.ENDED);
            },
          },
          {
            key: "onError",
            value: function () {
              (this.isError = !0),
                this.updateAcc("error"),
                this.removeClass(qr.NOT_ALLOW_AUTOPLAY),
                this.removeClass(qr.NO_START),
                this.removeClass(qr.ENTER),
                this.removeClass(qr.LOADING),
                this.addClass(qr.ERROR);
            },
          },
          {
            key: "onSeeking",
            value: function () {
              this.isSeeking || this.updateAcc("seeking"),
                (this.isSeeking = !0),
                this.addClass(qr.SEEKING);
            },
          },
          {
            key: "onSeeked",
            value: function () {
              (this.isSeeking = !1),
                this.waitTimer && Pt.clearTimeout(this, this.waitTimer),
                this.removeClass(qr.LOADING),
                this.removeClass(qr.SEEKING);
            },
          },
          {
            key: "onWaiting",
            value: function () {
              var r = this;
              this.waitTimer && Pt.clearTimeout(this, this.waitTimer),
                this.updateAcc("waiting"),
                (this.waitTimer = Pt.setTimeout(
                  this,
                  function () {
                    r.addClass(qr.LOADING),
                      r.emit(uUe),
                      Pt.clearTimeout(r, r.waitTimer),
                      (r.waitTimer = null);
                  },
                  this.config.minWaitDelay
                ));
            },
          },
          {
            key: "onPlaying",
            value: function () {
              var r = this;
              (this.isError = !1),
                [
                  qr.NO_START,
                  qr.PAUSED,
                  qr.ENDED,
                  qr.ERROR,
                  qr.REPLAY,
                  qr.LOADING,
                ].forEach(function (i) {
                  r.removeClass(i);
                }),
                this._accPlayed.t ||
                  this.paused ||
                  this.ended ||
                  (this._accPlayed.t = new Date().getTime());
            },
          },
          {
            key: "onTimeupdate",
            value: function () {
              !this._videoHeight && this.media.videoHeight && this.resize(),
                (this.waitTimer || this.hasClass(qr.LOADING)) &&
                  this.media.readyState > 2 &&
                  (this.removeClass(qr.LOADING),
                  Pt.clearTimeout(this, this.waitTimer),
                  (this.waitTimer = null)),
                !this.paused &&
                  this.state === ds.NOTALLOW &&
                  this.duration &&
                  (this.setState(ds.RUNNING), this.emit(NT)),
                this._accPlayed.t ||
                  this.paused ||
                  this.ended ||
                  (this._accPlayed.t = new Date().getTime());
            },
          },
          {
            key: "onVolumechange",
            value: function () {
              Pt.typeOf(this.config.volume) === "Number" &&
                (this.config.volume = this.volume);
            },
          },
          {
            key: "onRatechange",
            value: function () {
              this.config.defaultPlaybackRate = this.playbackRate;
            },
          },
          {
            key: "emitUserAction",
            value: function (r, i, o) {
              if (this.media && i && r) {
                var l = Pt.typeOf(r) === "String" ? r : r.type || "";
                o.props &&
                  Pt.typeOf(o.props) !== "Array" &&
                  (o.props = [o.props]),
                  this.emit(
                    eU,
                    hS(
                      {
                        eventType: l,
                        action: i,
                        currentTime: this.currentTime,
                        duration: this.duration,
                        ended: this.ended,
                        event: r,
                      },
                      o
                    )
                  );
              }
            },
          },
          {
            key: "updateAcc",
            value: function (r) {
              if (this._accPlayed.t) {
                var i = new Date().getTime() - this._accPlayed.t;
                (this._accPlayed.acc += i),
                  (this._accPlayed.t = 0),
                  (r === "ended" || this.ended) &&
                    (this._accPlayed.loopAcc = this._accPlayed.acc);
              }
            },
          },
          {
            key: "checkBuffer",
            value: function (r) {
              var i =
                  (arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : { startDiff: 0, endDiff: 0 }) || {},
                o = i.startDiff,
                l = o === void 0 ? 0 : o,
                u = i.endDiff,
                c = u === void 0 ? 0 : u,
                d = this.media.buffered;
              if (!d || d.length === 0 || !this.duration) return !0;
              for (
                var h = r || this.media.currentTime || 0.2, f = d.length, p = 0;
                p < f;
                p++
              )
                if (d.start(p) + l <= h && d.end(p) - c > h) return !0;
              return !1;
            },
          },
          {
            key: "resizePosition",
            value: function () {
              var r,
                i = this,
                o = this.videoPos,
                l = o.vy,
                u = o.vx,
                c = o.h,
                d = o.w,
                h = this.videoPos.rotate;
              if (!(h < 0 && c < 0 && d < 0)) {
                var f = this.videoPos._pi;
                if (
                  (!f &&
                    this.media.videoHeight &&
                    (f =
                      (this.media.videoWidth / this.media.videoHeight) * 100),
                  f)
                ) {
                  this.videoPos.pi = f;
                  var p = { rotate: (h = h < 0 ? 0 : h) },
                    g = 0,
                    y = 0,
                    v = 1,
                    b = Math.abs(h / 90),
                    w = this.root,
                    k = this.innerContainer,
                    D = w.offsetWidth,
                    $ = k ? k.offsetHeight : w.offsetHeight,
                    N = {},
                    P = $,
                    I = D;
                  if (b % 2 == 0)
                    (v = c > 0 ? 100 / c : d > 0 ? 100 / d : 1),
                      (p.scale = v),
                      (g = l > 0 ? (100 - c) / 2 - l : 0),
                      (p.y = b === 2 ? 0 - g : g),
                      (y = u > 0 ? (100 - d) / 2 - u : 0),
                      (p.x = b === 2 ? 0 - y : y),
                      (N.width = "".concat(I, "px")),
                      (N.height = "".concat(P, "px")),
                      (N.maxWidth = ""),
                      (N.maxHeight = "");
                  else if (b % 2 == 1) {
                    P = D;
                    var O = $ - D;
                    (y = (-O / 2 / (I = $)) * 100),
                      (p.x = b === 3 ? y + l / 2 : y - l / 2),
                      (g = (O / 2 / P) * 100),
                      (p.y = b === 3 ? g + u / 2 : g - u / 2),
                      (p.scale = v),
                      (N.width = "".concat(I, "px")),
                      (N.maxWidth = "".concat(I, "px")),
                      (N.height = "".concat(P, "px")),
                      (N.maxHeight = "".concat(P, "px"));
                  }
                  var X = Pt.getTransformStyle(
                    p,
                    this.media.style.transform ||
                      this.media.style.webkitTransform
                  );
                  (N.transform = X),
                    (N.webkitTransform = X),
                    On((r = Dn(N))).call(r, function (G) {
                      i.media.style[G] = N[G];
                    });
                }
              }
            },
          },
          {
            key: "position",
            value: function () {
              var r =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : { h: 0, y: 0, x: 0, w: 0 };
              if (this.media && r && r.h) {
                var i = this.videoPos;
                (i.h = 100 * r.h || 0),
                  (i.w = 100 * r.w || 0),
                  (i.vx = 100 * r.x || 0),
                  (i.vy = 100 * r.y || 0),
                  this.resizePosition();
              }
            },
          },
          {
            key: "setConfig",
            value: function (r) {
              var i,
                o = this;
              r &&
                On((i = Dn(r))).call(i, function (l) {
                  if (l !== "plugins") {
                    o.config[l] = r[l];
                    var u = o.plugins[l.toLowerCase()];
                    u &&
                      Pt.typeOf(u.setConfig) === "Function" &&
                      u.setConfig(r[l]);
                  }
                });
            },
          },
          {
            key: "playNext",
            value: function (r) {
              var i = this;
              this.resetState(),
                this.setConfig(r),
                (this._currentTime = 0),
                (this._duration = 0),
                qy(this, "playnext", function () {
                  i.start(), i.emit(hUe, r);
                });
            },
          },
          {
            key: "resize",
            value: function () {
              var r = this;
              if (this.media) {
                var i = this.root.getBoundingClientRect();
                (this.sizeInfo.width = i.width),
                  (this.sizeInfo.height = i.height),
                  (this.sizeInfo.left = i.left),
                  (this.sizeInfo.top = i.top);
                var o = this.media,
                  l = o.videoWidth,
                  u = o.videoHeight,
                  c = this.config,
                  d = c.fitVideoSize,
                  h = c.videoFillMode;
                if (
                  ((h !== "fill" && h !== "cover" && h !== "contain") ||
                    this.setAttribute("data-xgfill", h),
                  u && l)
                ) {
                  (this._videoHeight = u), (this._videoWidth = l);
                  var f =
                      this.controls && this.innerContainer
                        ? this.controls.root.getBoundingClientRect().height
                        : 0,
                    p = i.width,
                    g = i.height - f,
                    y = _i((l / u) * 1e3, 10),
                    v = _i((p / g) * 1e3, 10),
                    b = p,
                    w = g,
                    k = {};
                  (d === "auto" && v > y) || d === "fixWidth"
                    ? ((w = (p / y) * 1e3),
                      this.config.fluid
                        ? (k.paddingTop = "".concat((100 * w) / b, "%"))
                        : (k.height = "".concat(w + f, "px")))
                    : ((d === "auto" && v < y) || d === "fixHeight") &&
                      ((b = (y * g) / 1e3), (k.width = "".concat(b, "px"))),
                    this.fullscreen ||
                      this.cssfullscreen ||
                      Dn(k).forEach(function ($) {
                        r.root.style[$] = k[$];
                      }),
                    ((h === "fillHeight" && v < y) ||
                      (h === "fillWidth" && v > y)) &&
                      this.setAttribute("data-xgfill", "cover");
                  var D = {
                    videoScale: y,
                    vWidth: b,
                    vHeight: w,
                    cWidth: b,
                    cHeight: w + f,
                  };
                  this.resizePosition(), this.emit(Tse, D);
                }
              }
            },
          },
          {
            key: "updateObjectPosition",
            value: function () {
              var r,
                i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : 0,
                o =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : 0;
              this.media.updateObjectPosition
                ? this.media.updateObjectPosition(i, o)
                : (this.media.style.objectPosition = Ce(
                    (r = "".concat(100 * i, "% "))
                  ).call(r, 100 * o, "%"));
            },
          },
          {
            key: "setState",
            value: function (r) {
              var i;
              Gl.logInfo(
                "setState",
                Ce((i = "state from:".concat(K0e[this.state], " to:"))).call(
                  i,
                  K0e[r]
                )
              ),
                (this._state = r);
            },
          },
          {
            key: "preProcessUrl",
            value: function (r, i) {
              var o = this.config,
                l = o.preProcessUrl,
                u = o.preProcessUrlOptions,
                c = Ci({}, u, i);
              return Pt.isBlob(r) || typeof l != "function"
                ? { url: r }
                : l(r, c);
            },
          },
          {
            key: "_seekToStartTime",
            value: function () {
              this.__startTime > 0 &&
                this.duration > 0 &&
                ((this.currentTime =
                  this.__startTime > this.duration
                    ? this.duration
                    : this.__startTime),
                (this.__startTime = -1));
            },
          },
          {
            key: "state",
            get: function () {
              return this._state;
            },
          },
          {
            key: "isFullscreen",
            get: function () {
              return this.fullscreen;
            },
          },
          {
            key: "isCssfullScreen",
            get: function () {
              return this.cssfullscreen;
            },
          },
          {
            key: "hasStart",
            get: function () {
              return this._hasStart;
            },
            set: function (r) {
              typeof r == "boolean" &&
                ((this._hasStart = r),
                r === !1 && this.setState(ds.READY),
                this.emit("hasstart"));
            },
          },
          {
            key: "isPlaying",
            get: function () {
              return this._state === ds.RUNNING || this._state === ds.ENDED;
            },
            set: function (r) {
              r
                ? this.setState(ds.RUNNING)
                : this._state >= ds.RUNNING && this.setState(ds.ATTACHED);
            },
          },
          {
            key: "definitionList",
            get: function () {
              return (
                (this.config &&
                  this.config.definition &&
                  this.config.definition.list) ||
                []
              );
            },
            set: function (r) {
              var i = this,
                o = this.config.definition,
                l = null,
                u = null;
              (o.list = r),
                this.emit("resourceReady", r),
                r.forEach(function (c) {
                  var d;
                  ((d = i.curDefinition) === null || d === void 0
                    ? void 0
                    : d.definition) === c.definition && (l = c),
                    o.defaultDefinition === c.definition && (u = c);
                }),
                !u && r.length > 0 && (u = r[0]),
                l ? this.changeDefinition(l) : u && this.changeDefinition(u);
            },
          },
          {
            key: "videoFrameInfo",
            get: function () {
              var r = {
                total: 0,
                dropped: 0,
                corrupted: 0,
                droppedRate: 0,
                droppedDuration: 0,
              };
              if (!this.media || !this.media.getVideoPlaybackQuality) return r;
              var i = this.media.getVideoPlaybackQuality();
              return (
                (r.dropped = i.droppedVideoFrames || 0),
                (r.total = i.totalVideoFrames || 0),
                (r.corrupted = i.corruptedVideoFrames || 0),
                r.total > 0 &&
                  ((r.droppedRate = (r.dropped / r.total) * 100),
                  (r.droppedDuration = _i(
                    (this.cumulateTime / r.total) * r.dropped,
                    0
                  ))),
                r
              );
            },
          },
          {
            key: "lang",
            get: function () {
              return this.config.lang;
            },
            set: function (r) {
              var i, o;
              _r((i = P1.langKeys)).call(i, function (l) {
                return l === r;
              }).length !== 0 || r === "zh"
                ? ((this.config.lang = r), Hd.setLang(r, this))
                : console.error(
                    Ce(
                      (o =
                        "Sorry, set lang fail, because the language [".concat(
                          r,
                          "] is not supported now, list of all supported languages is ["
                        ))
                    ).call(o, P1.langKeys.join(), "] ")
                  );
            },
          },
          {
            key: "i18n",
            get: function () {
              var r = this.config.lang;
              return (
                r === "zh" && (r = "zh-cn"),
                this.__i18n.lang[r] || this.__i18n.lang.en
              );
            },
          },
          {
            key: "i18nKeys",
            get: function () {
              return this.__i18n.textKeys || {};
            },
          },
          {
            key: "version",
            get: function () {
              return Eee;
            },
          },
          {
            key: "playerId",
            get: function () {
              return this._pluginInfoId;
            },
          },
          {
            key: "url",
            get: function () {
              return this.__url || this.config.url;
            },
            set: function (r) {
              this.__url = r;
            },
          },
          {
            key: "poster",
            get: function () {
              return this.plugins.poster
                ? this.plugins.poster.config.poster
                : this.config.poster;
            },
            set: function (r) {
              this.plugins.poster && this.plugins.poster.update(r);
            },
          },
          {
            key: "readyState",
            get: function () {
              return Al(el(n.prototype), "readyState", this);
            },
          },
          {
            key: "error",
            get: function () {
              var r = Al(el(n.prototype), "error", this);
              return this.i18n[r] || r;
            },
          },
          {
            key: "networkState",
            get: function () {
              return Al(el(n.prototype), "networkState", this);
            },
          },
          {
            key: "fullscreenChanging",
            get: function () {
              return this._fullScreenOffset !== null;
            },
          },
          {
            key: "cumulateTime",
            get: function () {
              var r = this._accPlayed,
                i = r.acc,
                o = r.t;
              return o ? new Date().getTime() - o + i : i;
            },
          },
          {
            key: "zoom",
            get: function () {
              return this.config.zoom;
            },
            set: function (r) {
              this.config.zoom = r;
            },
          },
          {
            key: "videoRotateDeg",
            get: function () {
              return this.videoPos.rotate;
            },
            set: function (r) {
              (r = Pt.convertDeg(r)) % 90 == 0 &&
                r !== this.videoPos.rotate &&
                ((this.videoPos.rotate = r), this.resizePosition());
            },
          },
          {
            key: "avgSpeed",
            get: function () {
              return Y0e;
            },
            set: function (r) {
              Y0e = r;
            },
          },
          {
            key: "realTimeSpeed",
            get: function () {
              return Z0e;
            },
            set: function (r) {
              Z0e = r;
            },
          },
          {
            key: "offsetCurrentTime",
            get: function () {
              return this._offsetInfo.currentTime || 0;
            },
            set: function (r) {
              this._offsetInfo.currentTime = r;
            },
          },
          {
            key: "offsetDuration",
            get: function () {
              return this._offsetInfo.duration || 0;
            },
            set: function (r) {
              this._offsetInfo.duration = r || 0;
            },
          },
          {
            key: "hook",
            value: function (r, i) {
              var o;
              return tU.call.apply(
                tU,
                Ce((o = [this])).call(o, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "useHooks",
            value: function (r, i) {
              var o;
              return nU.call.apply(
                nU,
                Ce((o = [this])).call(o, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "removeHooks",
            value: function (r, i) {
              var o;
              return rU.call.apply(
                rU,
                Ce((o = [this])).call(o, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "usePluginHooks",
            value: function (r, i, o) {
              for (
                var l,
                  u = arguments.length,
                  c = new Array(u > 3 ? u - 3 : 0),
                  d = 3;
                d < u;
                d++
              )
                c[d - 3] = arguments[d];
              return H0e.call.apply(
                H0e,
                Ce((l = [this])).call(l, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "removePluginHooks",
            value: function (r, i, o) {
              for (
                var l,
                  u = arguments.length,
                  c = new Array(u > 3 ? u - 3 : 0),
                  d = 3;
                d < u;
                d++
              )
                c[d - 3] = arguments[d];
              return X0e.call.apply(
                X0e,
                Ce((l = [this])).call(l, jn(Array.prototype).call(arguments))
              );
            },
          },
          {
            key: "setUserActive",
            value: function (r, i) {
              var o;
              typeof i == "boolean" &&
                i !== this.muted &&
                (this.addInnerOP("volumechange"),
                Pt.typeOf(i) === Boolean && (this.muted = i)),
                (o = G_) === null ||
                  o === void 0 ||
                  o.setActive(this.playerId, r);
            },
          },
        ],
        [
          {
            key: "debugger",
            get: function () {
              return Gl.config.debug;
            },
            set: function (r) {
              Gl.config.debug = r;
            },
          },
          {
            key: "instManager",
            get: function () {
              return G_;
            },
            set: function (r) {
              G_ = r;
            },
          },
          {
            key: "getCurrentUserActivePlayerId",
            value: function () {
              var r;
              return (r = G_) === null || r === void 0
                ? void 0
                : r.getActiveId();
            },
          },
          {
            key: "setCurrentUserActive",
            value: function (r, i) {
              var o;
              (o = G_) === null || o === void 0 || o.setActive(r, i);
            },
          },
          {
            key: "isHevcSupported",
            value: function () {
              return Na.isHevcSupported();
            },
          },
          {
            key: "probeConfigSupported",
            value: function (r) {
              return Na.probeConfigSupported(r);
            },
          },
          {
            key: "install",
            value: function (r, i) {
              n.plugins || (n.plugins = {}), n.plugins[r] || (n.plugins[r] = i);
            },
          },
          {
            key: "use",
            value: function (r, i) {
              n.plugins || (n.plugins = {}), (n.plugins[r] = i);
            },
          },
        ]
      ),
      n
    );
  })();
Va(mF, "defaultPreset", null),
  Va(mF, "XgVideoProxy", null),
  (mF.instManager = EPt.getInstance());
function os(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
var APt = ur,
  Q0e = $6e;
APt(
  { target: "Function", proto: !0, forced: Function.bind !== Q0e },
  { bind: Q0e }
);
var _u,
  a1,
  wPt = Il,
  kPt = wPt("Function").bind,
  IPt = Es,
  DPt = kPt,
  ZX = Function.prototype,
  PPt = function (t) {
    var e = t.bind;
    return t === ZX || (IPt(ZX, t) && e === ZX.bind) ? DPt : e;
  },
  MPt = PPt,
  CPt = MPt,
  $Pt = CPt,
  xPt = $Pt,
  LPt = xPt,
  OPt = LPt,
  GPt = OPt,
  vx = xr(GPt);
function Q9(t, e) {
  var n;
  return (Q9 = px
    ? vx((n = px)).call(n)
    : function (r, i) {
        return (r.__proto__ = i), r;
      })(t, e);
}
function so(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = LC(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    FS(t, "prototype", { writable: !1 }),
    e && Q9(t, e);
}
function po(t) {
  var e;
  return (po = px
    ? vx((e = OC)).call(e)
    : function (n) {
        return n.__proto__ || OC(n);
      })(t);
}
function TUe() {
  if (typeof Reflect > "u" || !BC || BC.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(BC(Boolean, [], function () {})), !0;
  } catch {
    return !1;
  }
}
function NPt(t, e) {
  if (e && (ti(e) === "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return os(t);
}
function lo(t) {
  var e = TUe();
  return function () {
    var n,
      r = po(t);
    if (e) {
      var i = po(this).constructor;
      n = BC(r, arguments, i);
    } else n = r.apply(this, arguments);
    return NPt(this, n);
  };
}
function FPt(t) {
  var e;
  return tse((e = Function.toString.call(t))).call(e, "[native code]") !== -1;
}
function yF(t, e, n) {
  var r;
  return (
    TUe()
      ? (yF = vx((r = BC)).call(r))
      : (yF = function (i, o, l) {
          var u = [null];
          fx(u).apply(u, o);
          var c = new (vx(Function).apply(i, u))();
          return l && Q9(c, l.prototype), c;
        }),
    yF.apply(null, arguments)
  );
}
function xI(t) {
  var e = typeof t0e == "function" ? new t0e() : void 0;
  return (
    (xI = function (n) {
      if (n === null || !FPt(n)) return n;
      if (typeof n != "function")
        throw new TypeError(
          "Super expression must either be null or a function"
        );
      if (e !== void 0) {
        if (e.has(n)) return e.get(n);
        e.set(n, r);
      }
      function r() {
        return yF(n, arguments, po(this).constructor);
      }
      return (
        (r.prototype = LC(n.prototype, {
          constructor: {
            value: r,
            enumerable: !1,
            writable: !0,
            configurable: !0,
          },
        })),
        Q9(r, n)
      );
    }),
    xI(t)
  );
}
var vF = (function (t) {
    return (t.Fatal = "Fatal"), (t.Error = "Error"), (t.Warn = "Warn"), t;
  })(vF || {}),
  Rse = (function (t) {
    return (
      (t[(t.MANIFEST_HLS_ERROR = 1100)] = "MANIFEST_HLS_ERROR"),
      (t[(t.MANIFEST_DASH_ERROR = 1200)] = "MANIFEST_DASH_ERROR"),
      (t[(t.NETWORK = 2100)] = "NETWORK"),
      (t[(t.NETWORK_TIMEOUT = 2101)] = "NETWORK_TIMEOUT"),
      (t[(t.NETWORK_FORBIDDEN = 2103)] = "NETWORK_FORBIDDEN"),
      (t[(t.NETWORK_NOTFOUND = 2104)] = "NETWORK_NOTFOUND"),
      (t[(t.NETWORK_RANGE_NOT_SATISFIABLE = 2116)] =
        "NETWORK_RANGE_NOT_SATISFIABLE"),
      (t[(t.DEMUX_FLV_ERROR = 3100)] = "DEMUX_FLV_ERROR"),
      (t[(t.DEMUX_HLS_ERROR = 3200)] = "DEMUX_HLS_ERROR"),
      (t[(t.DEMUX_MP4_ERROR = 3300)] = "DEMUX_MP4_ERROR"),
      (t[(t.DEMUX_FMP4_ERROR = 3400)] = "DEMUX_FMP4_ERROR"),
      (t[(t.DEMUX_SIDX_ERROR = 3410)] = "DEMUX_SIDX_ERROR"),
      (t[(t.REMUX_FMP4_ERROR = 4100)] = "REMUX_FMP4_ERROR"),
      (t[(t.REMUX_MP4_ERROR = 4200)] = "REMUX_MP4_ERROR"),
      (t[(t.MEDIA_ERR_ABORTED = 5101)] = "MEDIA_ERR_ABORTED"),
      (t[(t.MEDIA_ERR_NETWORK = 5102)] = "MEDIA_ERR_NETWORK"),
      (t[(t.MEDIA_ERR_DECODE = 5103)] = "MEDIA_ERR_DECODE"),
      (t[(t.MEDIA_ERR_SRC_NOT_SUPPORTED = 5104)] =
        "MEDIA_ERR_SRC_NOT_SUPPORTED"),
      (t[(t.MEDIA_ERR_CODEC_NOT_SUPPORTED = 5105)] =
        "MEDIA_ERR_CODEC_NOT_SUPPORTED"),
      (t[(t.MEDIA_ERR_URL_EMPTY = 5106)] = "MEDIA_ERR_URL_EMPTY"),
      (t[(t.MEDIA_MSE_ADD_SB = 5200)] = "MEDIA_MSE_ADD_SB"),
      (t[(t.MEDIA_MSE_APPEND_BUFFER = 5201)] = "MEDIA_MSE_APPEND_BUFFER"),
      (t[(t.MEDIA_MSE_OTHER = 5202)] = "MEDIA_MSE_OTHER"),
      (t[(t.MEDIA_MSE_FULL = 5203)] = "MEDIA_MSE_FULL"),
      (t[(t.MEDIA_MSE_HIJACK = 5204)] = "MEDIA_MSE_HIJACK"),
      (t[(t.MEDIA_EME_HIJACK = 5301)] = "MEDIA_EME_HIJACK"),
      (t[(t.DRM_LICENSE = 7100)] = "DRM_LICENSE"),
      (t[(t.DRM_UNSUPPORTED = 7101)] = "DRM_UNSUPPORTED"),
      (t[(t.DRM_NO_MEDIA_KEY = 7103)] = "DRM_NO_MEDIA_KEY"),
      (t[(t.DRM_NO_KEY_SESSION = 7104)] = "DRM_NO_KEY_SESSION"),
      (t[(t.DRM_GENERATE_QUEST_FAIL = 7105)] = "DRM_GENERATE_QUEST_FAIL"),
      (t[(t.DRM_LACK_SERVER_CERTIFICATE_PATH = 7106)] =
        "DRM_LACK_SERVER_CERTIFICATE_PATH"),
      (t[(t.DRM_LACK_SERVER_PROCESS_SPC_PATH = 7107)] =
        "DRM_LACK_SERVER_PROCESS_SPC_PATH"),
      (t[(t.DRM_LICENSE_FAIL = 7108)] = "DRM_LICENSE_FAIL"),
      (t[(t.DRM_KEY_ERROR = 7109)] = "DRM_KEY_ERROR"),
      (t[(t.DRM_CERT_FAIL = 7110)] = "DRM_CERT_FAIL"),
      (t[(t.DRM_CUSTOM_LICENSE = 7200)] = "DRM_CUSTOM_LICENSE"),
      (t[(t.OTHER = 8e3)] = "OTHER"),
      (t[(t.RUNTIME_NO_CANPLAY_ERROR = 9001)] = "RUNTIME_NO_CANPLAY_ERROR"),
      (t[(t.RUNTIME_BUFFERBREAK_ERROR = 9002)] = "RUNTIME_BUFFERBREAK_ERROR"),
      (t[(t.RUNTIME_WAITING_TIMEOUT_ERROR = 9003)] =
        "RUNTIME_WAITING_TIMEOUT_ERROR"),
      (t[(t.MODULE_LOAD_ERROR = 110)] = "MODULE_LOAD_ERROR"),
      (t.UNKNOWN = "UNKNOWN"),
      t
    );
  })(Rse || {}),
  Ase =
    (bn((_u = {}), 2100, { messageTextKey: "NETWORK", level: "Error" }),
    bn(_u, 2101, { messageTextKey: "NETWORK_TIMEOUT", level: "Error" }),
    bn(_u, 2103, { messageTextKey: "NETWORK_FORBIDDEN", level: "Error" }),
    bn(_u, 2104, { messageTextKey: "NETWORK_NOTFOUND", level: "Error" }),
    bn(_u, 5101, { messageTextKey: "MEDIA_ERR_ABORTED", level: "Error" }),
    bn(_u, 5102, { messageTextKey: "MEDIA_ERR_NETWORK", level: "Error" }),
    bn(_u, 5103, { messageTextKey: "MEDIA_ERR_DECODE", level: "Error" }),
    bn(_u, 5104, {
      messageTextKey: "MEDIA_ERR_SRC_NOT_SUPPORTED",
      level: "Error",
    }),
    bn(_u, 5105, {
      messageTextKey: "MEDIA_ERR_CODEC_NOT_SUPPORTED",
      level: "Error",
    }),
    bn(_u, 5106, { messageTextKey: "MEDIA_ERR_URL_EMPTY", level: "Error" }),
    bn(_u, 110, { messageTextKey: "MODULE_LOAD_ERROR", level: "Fatal" }),
    bn(_u, 7100, { messageTextKey: "DRM_LICENSE", level: "Fatal" }),
    bn(_u, 7101, { messageTextKey: "DRM_UNSUPPORTED", level: "Fatal" }),
    bn(_u, 7103, { messageTextKey: "DRM_NO_MEDIA_KEY", level: "Fatal" }),
    bn(_u, 7104, { messageTextKey: "DRM_NO_KEY_SESSION", level: "Fatal" }),
    bn(_u, 7105, { messageTextKey: "DRM_GENERATE_QUEST_FAIL", level: "Fatal" }),
    bn(_u, 7106, {
      messageTextKey: "DRM_LACK_SERVER_CERTIFICATE_PATH",
      level: "Fatal",
    }),
    bn(_u, 7107, {
      messageTextKey: "DRM_LACK_SERVER_PROCESS_SPC_PATH",
      level: "Fatal",
    }),
    bn(_u, 7108, { messageTextKey: "DRM_LICENSE_FAIL", level: "Fatal" }),
    bn(_u, 7109, { messageTextKey: "DRM_KEY_ERROR", level: "Fatal" }),
    bn(_u, 7110, { messageTextKey: "DRM_CERT_FAIL", level: "Fatal" }),
    _u),
  UPt =
    (bn((a1 = {}), "manifest", { messageTextKey: "MANIFEST", level: "Error" }),
    bn(a1, "network", { messageTextKey: "NETWORK", level: "Error" }),
    bn(a1, "demux", { messageTextKey: "DEMUX", level: "Error" }),
    bn(a1, "remux", { messageTextKey: "REMUX", level: "Error" }),
    bn(a1, "media", { messageTextKey: "MEDIA", level: "Error" }),
    bn(a1, "drm", { messageTextKey: "DRM", level: "Error" }),
    bn(a1, "other", { messageTextKey: "OTHER", level: "Error" }),
    bn(a1, "runtime", { messageTextKey: "RUNTIME", level: "Error" }),
    a1),
  J9 = (function (t) {
    so(n, xI(Error));
    var e = lo(n);
    function n(r, i) {
      var o, l, u, c, d, h, f;
      Wn(this, n);
      var p = typeof r == "string" ? { message: r } : r,
        g =
          (o =
            (l =
              (u =
                i == null
                  ? void 0
                  : i.getText(p == null ? void 0 : p.messageTextKey)) !==
                null && u !== void 0
                ? u
                : p == null
                ? void 0
                : p.message) !== null && l !== void 0
              ? l
              : p == null || (c = p.error) === null || c === void 0
              ? void 0
              : c.message) !== null && o !== void 0
            ? o
            : i == null
            ? void 0
            : i.getText("UNKNOWN");
      return (
        bn(os((f = e.call(this, g))), "errorCode", void 0),
        bn(os(f), "level", void 0),
        bn(os(f), "ext", void 0),
        (f.errorCode =
          (d = p == null ? void 0 : p.errorCode) !== null && d !== void 0
            ? d
            : "UNKNOWN"),
        (f.level =
          (h = p == null ? void 0 : p.level) !== null && h !== void 0
            ? h
            : "Error"),
        (f.ext = p == null ? void 0 : p.ext),
        f
      );
    }
    return Kn(n);
  })();
function BPt(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
    n = arguments.length > 2 ? arguments[2] : void 0;
  return new J9($n($n({ errorCode: t }, Ase[t]), e), n);
}
function Aee(t, e) {
  var n,
    r,
    i = Ase[t.errorCode] || UPt[t.errorType],
    o = t.errorCode;
  return new J9(
    {
      messageTextKey: i == null ? void 0 : i.messageTextKey,
      message:
        (n = t == null ? void 0 : t.message) !== null && n !== void 0 ? n : o,
      errorCode: o,
      level:
        (r = i == null ? void 0 : i.level) !== null && r !== void 0
          ? r
          : "Error",
      ext: t,
    },
    e
  );
}
var HPt = (function (t) {
  ju(n, ml);
  var e = Wu(n);
  function n() {
    return Hs(this, n), e.apply(this, arguments);
  }
  return (
    Xs(
      n,
      [
        {
          key: "isEndedShow",
          get: function () {
            return this.config.isEndedShow;
          },
          set: function (r) {
            this.config.isEndedShow = r;
          },
        },
        {
          key: "hide",
          value: function () {
            Pt.addClass(this.root, "hide");
          },
        },
        {
          key: "show",
          value: function (r) {
            Pt.removeClass(this.root, "hide");
          },
        },
        {
          key: "beforeCreate",
          value: function (r) {
            typeof r.player.config.poster == "string" &&
              (r.config.poster = r.player.config.poster);
          },
        },
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            this.on(gse, function () {
              r.isEndedShow && Pt.removeClass(r.root, "hide");
            }),
              this.config.hideCanplay
                ? (this.once(HC, function () {
                    r.onTimeUpdate();
                  }),
                  this.on(bse, function () {
                    Pt.removeClass(r.root, "hide"),
                      Pt.addClass(r.root, "xg-showplay"),
                      r.once(HC, function () {
                        r.onTimeUpdate();
                      });
                  }))
                : this.on(C0, function () {
                    Pt.addClass(r.root, "hide");
                  });
          },
        },
        {
          key: "setConfig",
          value: function (r) {
            var i = this;
            Dn(r).forEach(function (l) {
              i.config[l] = r[l];
            });
            var o = this.config.poster;
            this.update(o);
          },
        },
        {
          key: "onTimeUpdate",
          value: function () {
            var r = this;
            this.player.currentTime
              ? Pt.removeClass(this.root, "xg-showplay")
              : this.once(HC, function () {
                  r.onTimeUpdate();
                });
          },
        },
        {
          key: "update",
          value: function (r) {
            r &&
              ((this.config.poster = r),
              (this.root.style.backgroundImage = "url(".concat(r, ")")));
          },
        },
        {
          key: "getBgSize",
          value: function (r) {
            var i = "";
            switch (r) {
              case "cover":
                i = "cover";
                break;
              case "contain":
                i = "contain";
                break;
              case "fixHeight":
                i = "auto 100%";
                break;
              default:
                i = "";
            }
            return i ? "background-size: ".concat(i, ";") : "";
          },
        },
        {
          key: "render",
          value: function () {
            var r,
              i,
              o = this.config,
              l = o.poster,
              u = o.hideCanplay,
              c = o.fillMode,
              d = o.notHidden,
              h = this.getBgSize(c),
              f = l
                ? Ce((r = "background-image:url(".concat(l, ");"))).call(r, h)
                : h;
            return Ce(
              (i = '<xg-poster class="xgplayer-poster '.concat(
                d ? "xg-not-hidden" : u ? "xg-showplay" : "",
                '" style="'
              ))
            ).call(
              i,
              f,
              `">
    </xg-poster>`
            );
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "poster";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return {
              isEndedShow: !0,
              hideCanplay: !1,
              notHidden: !1,
              poster: "",
              fillMode: "fixWidth",
            };
          },
        },
      ]
    ),
    n
  );
})();
function wse() {
  return new DOMParser().parseFromString(
    `<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function kse() {
  return new DOMParser().parseFromString(
    `<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var Ny = {};
function XPt(t, e) {
  var n =
    arguments.length > 2 && arguments[2] !== void 0
      ? arguments[2]
      : { start: null, end: null };
  return (
    Ny[t] && window.clearTimeout(Ny[t].id),
    (Ny[t] = {}),
    n.start && n.start(),
    (Ny[t].id = window.setTimeout(function () {
      n.end && n.end(), window.clearTimeout(Ny[t].id), delete Ny[t];
    }, e)),
    Ny[t].id
  );
}
function J0e(t) {
  var e;
  t
    ? window.clearTimeout(t)
    : On((e = Dn(Ny))).call(e, function (n) {
        window.clearTimeout(Ny[n].id), delete Ny[n];
      });
}
var VPt = (function (t) {
    ju(n, ml);
    var e = Wu(n);
    function n(r) {
      var i;
      return (
        Hs(this, n),
        Va(Oi((i = e.call(this, r))), "onPlayerReset", function () {
          i.autoPlayStart = !1;
          var o = i.config.mode === "auto" ? "auto-hide" : "hide";
          i.setAttr("data-state", "play"), Pt.removeClass(i.root, o), i.show();
        }),
        Va(Oi(i), "onAutoplayStart", function () {
          if (!i.autoPlayStart) {
            var o = i.config.mode === "auto" ? "auto-hide" : "hide";
            Pt.addClass(i.root, o), (i.autoPlayStart = !0), i.toggleTo("play");
          }
        }),
        (i.autoPlayStart = !1),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "afterCreate",
            value: function () {
              var r = this.playerConfig;
              this.initIcons(),
                this.listenEvents(),
                this.bindClickEvents(),
                r.autoplay || this.show();
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this,
                i = this.player,
                o = this.playerConfig;
              this.once(vse, function () {
                o &&
                  (o.lang && o.lang === "en"
                    ? Pt.addClass(i.root, "lang-is-en")
                    : o.lang === "jp" && Pt.addClass(i.root, "lang-is-jp"));
              }),
                this.on(NT, this.onAutoplayStart),
                this.on(CI, function () {
                  var l = r.config.mode === "auto" ? "auto-hide" : "hide";
                  r.setAttr("data-state", "play"),
                    Pt.removeClass(r.root, l),
                    r.show();
                }),
                this.on(C0, function () {
                  r.toggleTo("play");
                }),
                this.on(Z9, function () {
                  r.toggleTo("pause");
                }),
                this.on(Ese, function () {
                  r.onPlayerReset();
                });
            },
          },
          {
            key: "bindClickEvents",
            value: function () {
              var r = this;
              (this.clickHandler = this.hook(
                "startClick",
                this.switchPausePlay,
                {
                  pre: function (i) {
                    i.cancelable && i.preventDefault(), i.stopPropagation();
                    var o = r.player.paused;
                    r.emitUserAction(i, "switch_play_pause", {
                      props: "paused",
                      from: o,
                      to: !o,
                    });
                  },
                }
              )),
                this.bind(["click", "touchend"], this.clickHandler);
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return {
                startPlay: { icon: wse, class: "xg-icon-play" },
                startPause: { icon: kse, class: "xg-icon-pause" },
              };
            },
          },
          {
            key: "initIcons",
            value: function () {
              var r = this.icons;
              this.appendChild("xg-start-inner", r.startPlay),
                this.appendChild("xg-start-inner", r.startPause);
            },
          },
          {
            key: "hide",
            value: function () {
              Pt.addClass(this.root, "hide");
            },
          },
          {
            key: "show",
            value: function (r) {
              Pt.removeClass(this.root, "hide");
            },
          },
          {
            key: "focusHide",
            value: function () {
              Pt.addClass(this.root, "focus-hide");
            },
          },
          {
            key: "recover",
            value: function () {
              Pt.removeClass(this.root, "focus-hide");
            },
          },
          {
            key: "switchStatus",
            value: function (r) {
              r
                ? this.setAttr(
                    "data-state",
                    this.player.paused ? "pause" : "play"
                  )
                : this.setAttr(
                    "data-state",
                    this.player.paused ? "play" : "pause"
                  );
            },
          },
          {
            key: "animate",
            value: function (r) {
              var i = this;
              this._animateId = XPt("pauseplay", 400, {
                start: function () {
                  Pt.addClass(i.root, "interact"), i.show(), i.switchStatus(!0);
                },
                end: function () {
                  Pt.removeClass(i.root, "interact"),
                    !r && i.hide(),
                    (i._animateId = null);
                },
              });
            },
          },
          {
            key: "endAnimate",
            value: function () {
              Pt.removeClass(this.root, "interact"),
                J0e(this._animateId),
                (this._animateId = null);
            },
          },
          {
            key: "switchPausePlay",
            value: function (r) {
              var i = this.player;
              r.cancelable && r.preventDefault(),
                r.stopPropagation(),
                i.state < ds.READY ||
                  (this.player.paused || i.state !== ds.RUNNING
                    ? i.play()
                    : i.pause());
            },
          },
          {
            key: "onPlayPause",
            value: function (r) {
              this.toggleTo(r);
            },
          },
          {
            key: "toggleTo",
            value: function (r) {
              var i = this.config,
                o = this.player;
              if (o && !(o.state < ds.RUNNING) && this.autoPlayStart) {
                if (i.mode === "show")
                  return this.switchStatus(), void this.show();
                if (i.mode !== "auto") {
                  if (
                    (i.isShowPause && o.paused && !o.ended) ||
                    (i.isShowEnd && o.ended)
                  )
                    return (
                      this.switchStatus(), this.show(), void this.endAnimate()
                    );
                  if (i.disableAnimate)
                    return this.switchStatus(), void this.hide();
                  if (r === "play")
                    this.autoPlayStart ? this.animate() : this.hide();
                  else {
                    if (!this.autoPlayStart || o.ended) return;
                    this.animate();
                  }
                } else this.switchStatus();
              }
            },
          },
          {
            key: "destroy",
            value: function () {
              this.unbind(["click", "touchend"], this.clickHandler),
                J0e(this._animateId);
            },
          },
          {
            key: "render",
            value: function () {
              var r = this.playerConfig.autoplay
                ? this.config.mode === "auto"
                  ? "auto-hide"
                  : "hide"
                : "";
              return `
    <xg-start class="xgplayer-start `.concat(
                r,
                `">
    <xg-start-inner></xg-start-inner>
    </xg-start>`
              );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "start";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                isShowPause: !1,
                isShowEnd: !1,
                disableAnimate: !1,
                mode: "hide",
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  zPt = (function (t) {
    ju(n, ml);
    var e = Wu(n);
    function n() {
      return Hs(this, n), e.apply(this, arguments);
    }
    return (
      Xs(
        n,
        [
          {
            key: "render",
            value: function () {
              var r = this.config.innerHtml,
                i = Pt.createDom("xg-enter", "", {}, "xgplayer-enter");
              if (r && r instanceof window.HTMLElement) i.appendChild(r);
              else if (r && typeof r == "string") i.innerHTML = r;
              else {
                for (var o = "", l = 1; l <= 12; l++)
                  o += '<div class="xgplayer-enter-bar'.concat(l, '"></div>');
                i.innerHTML = '<div class="xgplayer-enter-spinner">'.concat(
                  o,
                  "</div>"
                );
              }
              return i;
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "enter";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { innerHtml: "", logo: "" };
            },
          },
        ]
      ),
      n
    );
  })();
function q9(t, e, n) {
  try {
    var r, i;
    return Ce(
      (r = Ce(
        (i = ' <div class="xg-tips '.concat(n ? "hide" : " ", '" lang-key="'))
      ).call(
        i,
        t.i18nKeys[e],
        `">
    `
      ))
    ).call(
      r,
      t.i18n[e],
      `
    </div>`
    );
  } catch {
    return '<div class="xg-tips hide"></div>';
  }
}
var q0e = (function (t) {
  ju(n, ml);
  var e = Wu(n);
  function n() {
    return Hs(this, n), e.apply(this, arguments);
  }
  return (
    Xs(
      n,
      [
        {
          key: "afterCreate",
          value: function () {
            (this.getMini = this.getMini.bind(this)),
              (this.exitMini = this.exitMini.bind(this)),
              this.bind("click", this.getMini);
          },
        },
        {
          key: "getMini",
          value: function () {
            this.config.onClick && this.config.onClick();
          },
        },
        {
          key: "exitMini",
          value: function () {
            this.config.onClick && this.config.onClick();
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unbind(["click", "touchend"], this.getMini);
          },
        },
        {
          key: "render",
          value: function () {
            var r,
              i = "MINISCREEN";
            return Ce(
              (r = `
      <xg-icon class="xgplayer-miniicon">
      <div class="xgplayer-icon btn-text"><span class="icon-text" lang-key="`.concat(
                this.i18nKeys[i],
                '">'
              ))
            ).call(
              r,
              this.i18n[i],
              `</span></div>
      </xg-icon>`
            );
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "miniscreenIcon";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return { position: Lh.CONTROLS_RIGHT, index: 10 };
          },
        },
      ]
    ),
    n
  );
})();
function eye(t) {
  var e = wl(t);
  return qt(t).call(t, "%") === -1 && !PI(e) && e;
}
var Ise = [
    "paddingLeft",
    "paddingRight",
    "paddingTop",
    "paddingBottom",
    "marginLeft",
    "marginRight",
    "marginTop",
    "marginBottom",
    "borderLeftWidth",
    "borderRightWidth",
    "borderTopWidth",
    "borderBottomWidth",
  ],
  EUe = Ise.length;
function jPt() {
  for (
    var t = {
        width: 0,
        height: 0,
        innerWidth: 0,
        innerHeight: 0,
        outerWidth: 0,
        outerHeight: 0,
      },
      e = 0;
    e < EUe;
    e++
  )
    t[Ise[e]] = 0;
  return t;
}
function WPt(t) {
  return window.getComputedStyle(t);
}
function tye(t) {
  if (
    (typeof t == "string" && (t = document.querySelector(t)),
    t && sm(t) === "object" && t.nodeType)
  ) {
    var e = WPt(t);
    if (e.display === "none") return jPt();
    var n = {};
    (n.width = t.offsetWidth), (n.height = t.offsetHeight);
    for (
      var r = (n.isBorderBox = e.boxSizing === "border-box"), i = 0;
      i < EUe;
      i++
    ) {
      var o = Ise[i],
        l = e[o],
        u = wl(l);
      n[o] = PI(u) ? 0 : u;
    }
    var c = n.paddingLeft + n.paddingRight,
      d = n.paddingTop + n.paddingBottom,
      h = n.marginLeft + n.marginRight,
      f = n.marginTop + n.marginBottom,
      p = n.borderLeftWidth + n.borderRightWidth,
      g = n.borderTopWidth + n.borderBottomWidth,
      y = r,
      v = eye(e.width);
    v !== !1 && (n.width = v + (y ? 0 : c + p));
    var b = eye(e.height);
    return (
      b !== !1 && (n.height = b + (y ? 0 : d + g)),
      (n.innerWidth = n.width - (c + p)),
      (n.innerHeight = n.height - (d + g)),
      (n.outerWidth = n.width + h),
      (n.outerHeight = n.height + f),
      n
    );
  }
}
function YX(t, e) {
  for (var n = 0; n < t.length; n++) {
    var r = t[n];
    if (r.identifier === e) return r;
  }
}
var QX = { START: "dragStart", MOVE: "dragMove", ENDED: "dragEnded" },
  nye = {
    mousedown: ["mousemove", "mouseup"],
    touchstart: ["touchmove", "touchend", "touchcancel"],
    pointerdown: ["pointermove", "pointerup", "pointercancel"],
  },
  KPt = (function (t) {
    ju(n, z6e);
    var e = Wu(n);
    function n(r) {
      var i,
        o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
      return (
        Hs(this, n),
        ((i = e.call(this)).isEnabled = !0),
        (i.isDragging = !1),
        (i.isDown = !1),
        (i.position = {}),
        (i.downPoint = {}),
        (i.dragPoint = { x: 0, y: 0 }),
        (i.startPos = { x: 0, y: 0 }),
        (i._root = r instanceof Element ? r : document.querySelector(r)),
        (i._handlerDom =
          o.handle instanceof Element
            ? o.handle
            : document.querySelector(o.handle)),
        i._root && i._handlerDom ? (i._bindStartEvent(), i) : fse(i)
      );
    }
    return (
      Xs(n, [
        {
          key: "_bindStartEvent",
          value: function () {
            var r,
              i = this;
            "ontouchstart" in window
              ? (this._startKey = "touchstart")
              : (this._startKey = "mousedown"),
              (this["on".concat(this._startKey)] =
                this["on".concat(this._startKey)].bind(this)),
              this._handlerDom.addEventListener(
                this._startKey,
                this["on".concat(this._startKey)]
              ),
              On((r = nye[this._startKey])).call(r, function (o) {
                i["on".concat(o)] = i["on".concat(o)].bind(i);
              });
          },
        },
        {
          key: "_unbindStartEvent",
          value: function () {
            this._handlerDom.removeEventListener(
              this._startKey,
              this["on".concat(this._startKey)]
            );
          },
        },
        {
          key: "_bindPostStartEvents",
          value: function (r) {
            var i = this;
            if (r) {
              var o = nye[this._startKey];
              On(o).call(o, function (l) {
                window.addEventListener(l, i["on".concat(l)]);
              }),
                (this._boundPointerEvents = o);
            }
          },
        },
        {
          key: "_unbindPostStartEvents",
          value: function () {
            var r,
              i = this;
            this._boundPointerEvents &&
              (On((r = this._boundPointerEvents)).call(r, function (o) {
                window.removeEventListener(o, i["on".concat(o)]);
              }),
              delete this._boundPointerEvents);
          },
        },
        {
          key: "enable",
          value: function () {
            this.isEnabled = !0;
          },
        },
        {
          key: "disable",
          value: function () {
            (this.isEnabled = !1), this.isDragging && this.onUp();
          },
        },
        {
          key: "onDocUp",
          value: function (r) {
            this.onUp();
          },
        },
        {
          key: "animate",
          value: function () {
            var r = this;
            this.isDragging &&
              (this.positionDrag(),
              window.requestAnimationFrame(function () {
                r.animate();
              }));
          },
        },
        {
          key: "positionDrag",
          value: function () {
            var r,
              i = Ce(
                (r = "translate3d(".concat(this.dragPoint.x, "px, "))
              ).call(r, this.dragPoint.y, "px, 0)");
            (this._root.style.transform = i),
              (this._root.style.webKitTransform = i);
          },
        },
        {
          key: "setLeftTop",
          value: function () {
            (this._root.style.left = this.position.x + "px"),
              (this._root.style.top = this.position.y + "px");
          },
        },
        {
          key: "onmousedown",
          value: function (r) {
            this.dragStart(r, r);
          },
        },
        {
          key: "onmousemove",
          value: function (r) {
            this.dragMove(r, r);
          },
        },
        {
          key: "onmouseup",
          value: function (r) {
            this.dragEnd(r, r);
          },
        },
        {
          key: "ontouchstart",
          value: function (r) {
            var i = r.changedTouches[0];
            this.dragStart(r, i),
              (this.touchIdentifier =
                i.pointerId !== void 0 ? i.pointerId : i.identifier),
              r.preventDefault();
          },
        },
        {
          key: "ontouchmove",
          value: function (r) {
            var i = YX(r.changedTouches, this.touchIdentifier);
            i && this.dragMove(r, i);
          },
        },
        {
          key: "ontouchend",
          value: function (r) {
            var i = YX(r.changedTouches, this.touchIdentifier);
            i && this.dragEnd(r, i), r.preventDefault();
          },
        },
        {
          key: "ontouchcancel",
          value: function (r) {
            var i = YX(r.changedTouches, this.touchIdentifier);
            i && this.dragCancel(r, i);
          },
        },
        {
          key: "dragStart",
          value: function (r, i) {
            if (this._root && !this.isDown && this.isEnabled) {
              (this.downPoint = i),
                (this.dragPoint.x = 0),
                (this.dragPoint.y = 0),
                this._getPosition();
              var o = tye(this._root);
              (this.startPos.x = this.position.x),
                (this.startPos.y = this.position.y),
                (this.startPos.maxY = window.innerHeight - o.height),
                (this.startPos.maxX = window.innerWidth - o.width),
                this.setLeftTop(),
                (this.isDown = !0),
                this._bindPostStartEvents(r);
            }
          },
        },
        {
          key: "dragRealStart",
          value: function (r, i) {
            (this.isDragging = !0),
              this.animate(),
              this.emit(QX.START, this.startPos);
          },
        },
        {
          key: "dragEnd",
          value: function (r, i) {
            this._root &&
              (this._unbindPostStartEvents(),
              this.isDragging &&
                ((this._root.style.transform = ""),
                this.setLeftTop(),
                this.emit(QX.ENDED)),
              this.presetInfo());
          },
        },
        {
          key: "_dragPointerMove",
          value: function (r, i) {
            var o = {
              x: i.pageX - this.downPoint.pageX,
              y: i.pageY - this.downPoint.pageY,
            };
            return (
              !this.isDragging &&
                this.hasDragStarted(o) &&
                this.dragRealStart(r, i),
              o
            );
          },
        },
        {
          key: "dragMove",
          value: function (r, i) {
            if (((r = r || window.event), this.isDown)) {
              var o = this.startPos,
                l = o.x,
                u = o.y,
                c = this._dragPointerMove(r, i),
                d = c.x,
                h = c.y;
              (d = this.checkContain("x", d, l)),
                (h = this.checkContain("y", h, u)),
                (this.position.x = l + d),
                (this.position.y = u + h),
                (this.dragPoint.x = d),
                (this.dragPoint.y = h),
                this.emit(QX.MOVE, this.position);
            }
          },
        },
        {
          key: "dragCancel",
          value: function (r, i) {
            this.dragEnd(r, i);
          },
        },
        {
          key: "presetInfo",
          value: function () {
            (this.isDragging = !1),
              (this.startPos = { x: 0, y: 0 }),
              (this.dragPoint = { x: 0, y: 0 }),
              (this.isDown = !1);
          },
        },
        {
          key: "destroy",
          value: function () {
            this._unbindStartEvent(),
              this._unbindPostStartEvents(),
              this.isDragging && this.dragEnd(),
              this.removeAllListeners(),
              (this._handlerDom = null);
          },
        },
        {
          key: "hasDragStarted",
          value: function (r) {
            return Math.abs(r.x) > 3 || Math.abs(r.y) > 3;
          },
        },
        {
          key: "checkContain",
          value: function (r, i, o) {
            return i + o < 0
              ? 0 - o
              : r === "x" && i + o > this.startPos.maxX
              ? this.startPos.maxX - o
              : r === "y" && i + o > this.startPos.maxY
              ? this.startPos.maxY - o
              : i;
          },
        },
        {
          key: "_getPosition",
          value: function () {
            var r = window.getComputedStyle(this._root),
              i = this._getPositionCoord(r.left, "width"),
              o = this._getPositionCoord(r.top, "height");
            (this.position.x = PI(i) ? 0 : i),
              (this.position.y = PI(o) ? 0 : o),
              this._addTransformPosition(r);
          },
        },
        {
          key: "_addTransformPosition",
          value: function (r) {
            var i = r.transform;
            if (qt(i).call(i, "matrix") === 0) {
              var o = i.split(","),
                l = qt(i).call(i, "matrix3d") === 0 ? 12 : 4,
                u = _i(o[l], 10),
                c = _i(o[l + 1], 10);
              (this.position.x += u), (this.position.y += c);
            }
          },
        },
        {
          key: "_getPositionCoord",
          value: function (r, i) {
            if (qt(r).call(r, "%") !== -1) {
              var o = tye(this._root.parentNode);
              return o ? (wl(r) / 100) * o[i] : 0;
            }
            return _i(r, 10);
          },
        },
      ]),
      n
    );
  })(),
  ZPt = (function (t) {
    ju(n, ml);
    var e = Wu(n);
    function n(r) {
      var i;
      Hs(this, n),
        Va(Oi((i = e.call(this, r))), "onCancelClick", function (l) {
          i.exitMini(), (i.isClose = !0);
        }),
        Va(Oi(i), "onCenterClick", function (l) {
          var u = Oi(i).player;
          u.paused ? u.play() : u.pause();
        }),
        Va(Oi(i), "onScroll", function (l) {
          if (
            !(
              (!window.scrollY && window.scrollY !== 0) ||
              Math.abs(window.scrollY - i.pos.scrollY) < 50
            )
          ) {
            var u = _i(Pt.getCss(i.player.root, "height"));
            (u += i.config.scrollTop),
              (i.pos.scrollY = window.scrollY),
              window.scrollY > u + 5
                ? !i.isMini && !i.isClose && i.getMini()
                : window.scrollY <= u &&
                  (i.isMini && i.exitMini(), (i.isClose = !1));
          }
        }),
        (i.isMini = !1),
        (i.isClose = !1);
      var o = Oi(i).config;
      return (
        (i.pos = {
          left: o.left < 0 ? window.innerWidth - o.width - 20 : o.left,
          top: o.top < 0 ? window.innerHeight - o.height - 20 : o.top,
          height: i.config.height,
          width: i.config.width,
          scrollY: window.scrollY || 0,
        }),
        (i.lastStyle = null),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "beforeCreate",
            value: function (r) {
              typeof r.player.config.mini == "boolean" &&
                (r.config.isShowIcon = r.player.config.mini);
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r = this;
              this.initIcons(),
                this.on(Z9, function () {
                  r.setAttr("data-state", "pause");
                }),
                this.on(C0, function () {
                  r.setAttr("data-state", "play");
                });
            },
          },
          {
            key: "onPluginsReady",
            value: function () {
              var r = this,
                i = this.player;
              if (!this.config.disable) {
                if (this.config.isShowIcon) {
                  var o = {
                    config: {
                      onClick: function () {
                        r.getMini();
                      },
                    },
                  };
                  i.controls.registerPlugin(q0e, o, q0e.pluginName);
                }
                var l = Pt.checkTouchSupport() ? "touchend" : "click";
                this.bind(".mini-cancel-btn", l, this.onCancelClick),
                  this.bind(".play-icon", l, this.onCenterClick),
                  this.config.disableDrag ||
                    (this._draggabilly = new KPt(this.player.root, {
                      handle: this.root,
                    })),
                  this.config.isScrollSwitch &&
                    window.addEventListener("scroll", this.onScroll);
              }
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return {
                play: { icon: wse, class: "xg-icon-play" },
                pause: { icon: kse, class: "xg-icon-pause" },
              };
            },
          },
          {
            key: "initIcons",
            value: function () {
              var r = this.icons;
              this.appendChild(".play-icon", r.play),
                this.appendChild(".play-icon", r.pause);
            },
          },
          {
            key: "getMini",
            value: function () {
              var r,
                i = this;
              if (!this.isMini) {
                var o = this.player,
                  l = this.playerConfig,
                  u = this.config.target || this.player.root;
                (this.lastStyle = {}),
                  Pt.addClass(o.root, "xgplayer-mini"),
                  On((r = ["width", "height", "top", "left"])).call(
                    r,
                    function (c) {
                      (i.lastStyle[c] = u.style[c]),
                        (u.style[c] = "".concat(i.pos[c], "px"));
                    }
                  ),
                  l.fluid && (u.style["padding-top"] = ""),
                  this.emit(mx, !0),
                  (o.isMini = this.isMini = !0);
              }
            },
          },
          {
            key: "exitMini",
            value: function () {
              var r = this;
              if (!this.isMini) return !1;
              var i,
                o = this.player,
                l = this.playerConfig,
                u = this.config.target || this.player.root;
              Pt.removeClass(o.root, "xgplayer-mini"),
                this.lastStyle &&
                  On((i = Dn(this.lastStyle))).call(i, function (c) {
                    u.style[c] = r.lastStyle[c];
                  }),
                (this.lastStyle = null),
                l.fluid &&
                  ((o.root.style.width = "100%"),
                  (o.root.style.height = "0"),
                  (o.root.style["padding-top"] = "".concat(
                    (100 * l.height) / l.width,
                    "%"
                  ))),
                this.emit(mx, !1),
                (this.isMini = o.isMini = !1);
            },
          },
          {
            key: "destroy",
            value: function () {
              window.removeEventListener("scroll", this.onScroll);
              var r = Pt.checkTouchSupport() ? "touchend" : "click";
              this.unbind(".mini-cancel-btn", r, this.onCancelClick),
                this.unbind(".play-icon", r, this.onCenterClick),
                this._draggabilly && this._draggabilly.destroy(),
                (this._draggabilly = null),
                this.exitMini();
            },
          },
          {
            key: "render",
            value: function () {
              if (!this.config.disable)
                return `
      <xg-mini-layer class="xg-mini-layer">
      <xg-mini-header class="xgplayer-mini-header">
      `.concat(
                  q9(this, "MINI_DRAG", this.playerConfig.isHideTips),
                  `
      </xg-mini-header>
      <div class="mini-cancel-btn">
        <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
          <path fill="#fff" fill-rule="evenodd" d="M3.99 3.49a1 1 0 0 1 1.414 0L10 8.085l4.596-4.595a1 1 0 1 1 1.414 1.414L11.414 9.5l4.596 4.596a1 1 0 0 1 .084 1.32l-.084.094a1 1 0 0 1-1.414 0L10 10.914 5.404 15.51a1 1 0 0 1-1.414-1.414L8.585 9.5 3.99 4.904a1 1 0 0 1-.084-1.32z"></path>
        </svg>
      </div>
      <div class="play-icon">
      </div>
      </xg-mini-layer>`
                );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "miniscreen";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                index: 10,
                disable: !1,
                width: 320,
                height: 180,
                left: -1,
                top: -1,
                isShowIcon: !1,
                isScrollSwitch: !1,
                scrollTop: 0,
                disableDrag: !1,
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  jG = {
    mouseenter: "onMouseEnter",
    mouseleave: "onMouseLeave",
    mousemove: "onMouseMove",
  },
  WG = ["videoClick", "videoDbClick"],
  YPt = (function (t) {
    ju(n, $I);
    var e = Wu(n);
    function n() {
      var r, i;
      Hs(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        Va(
          Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "onMouseMove",
          function (c) {
            var d = Oi(i),
              h = d.player,
              f = d.playerConfig;
            h.isActive ||
              (h.focus({ autoHide: !f.closeDelayBlur }),
              !f.closeFocusVideoFocus && h.media.focus());
          }
        ),
        Va(Oi(i), "onMouseEnter", function (c) {
          var d = Oi(i),
            h = d.playerConfig,
            f = d.player;
          !h.closeFocusVideoFocus && f.media.focus(),
            h.closeDelayBlur ? f.focus({ autoHide: !1 }) : f.focus(),
            i.emit(lUe);
        }),
        Va(Oi(i), "onMouseLeave", function (c) {
          var d = i.playerConfig,
            h = d.closePlayerBlur,
            f = d.leavePlayerTime,
            p = d.closeDelayBlur;
          h ||
            p ||
            (f
              ? i.player.focus({ autoHide: !0, delay: f })
              : i.player.blur({ ignorePaused: !0 })),
            i.emit(sUe);
        }),
        Va(Oi(i), "onVideoClick", function (c) {
          var d = Oi(i),
            h = d.player,
            f = d.playerConfig;
          (c.target && f.closeVideoClick) ||
            (c.target !== h.root &&
              c.target !== h.media &&
              c.target !== h.innerContainer &&
              c.target !== h.media.__canvas) ||
            (c.preventDefault(),
            f.closeVideoStopPropagation || c.stopPropagation(),
            i._clickCount++,
            i.clickTimer && (clearTimeout(i.clickTimer), (i.clickTimer = null)),
            (i.clickTimer = setTimeout(function () {
              i._clickCount &&
                (i._clickCount--,
                qy(
                  Oi(i),
                  WG[0],
                  function (p, g) {
                    i.switchPlayPause(g.e);
                  },
                  { e: c, paused: h.paused }
                ),
                clearTimeout(i.clickTimer),
                (i.clickTimer = null));
            }, 300)));
        }),
        Va(Oi(i), "onVideoDblClick", function (c) {
          var d = Oi(i),
            h = d.player,
            f = d.playerConfig;
          f.closeVideoDblclick ||
            !c.target ||
            (c.target !== h.media && c.target !== h.media.__canvas) ||
            (!f.closeVideoClick && i._clickCount < 2
              ? (i._clickCount = 0)
              : ((i._clickCount = 0),
                i.clickTimer &&
                  (clearTimeout(i.clickTimer), (i.clickTimer = null)),
                c.preventDefault(),
                c.stopPropagation(),
                qy(
                  Oi(i),
                  WG[1],
                  function (p, g) {
                    i.emitUserAction(g.e, "switch_fullscreen", {
                      props: "fullscreen",
                      from: h.fullscreen,
                      to: !h.fullscreen,
                    }),
                      h.fullscreen ? h.exitFullscreen() : h.getFullscreen();
                  },
                  { e: c, fullscreen: h.fullscreen }
                )));
        }),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "afterCreate",
            value: function () {
              var r = this;
              (this._clickCount = 0),
                On(WG).call(WG, function (i) {
                  r.__hooks[i] = null;
                }),
                this.playerConfig.isMobileSimulateMode === "mobile" ||
                  (Na.device === "mobile" && !Na.os.isIpad) ||
                  this.initEvents();
            },
          },
          {
            key: "initEvents",
            value: function () {
              var r,
                i = this,
                o = this.player,
                l = o.media,
                u = o.root,
                c = this.playerConfig.enableContextmenu;
              u && u.addEventListener("click", this.onVideoClick, !1),
                u && u.addEventListener("dblclick", this.onVideoDblClick, !1),
                On((r = Dn(jG))).call(r, function (d) {
                  u.addEventListener(d, i[jG[d]], !1);
                }),
                !c &&
                  l &&
                  l.addEventListener("contextmenu", this.onContextmenu, !1);
            },
          },
          {
            key: "switchPlayPause",
            value: function (r) {
              var i = this.player;
              this.emitUserAction(r, "switch_play_pause", {
                props: "paused",
                from: i.paused,
                to: !i.paused,
              }),
                i.ended
                  ? i.duration !== 1 / 0 && i.duration > 0 && i.replay()
                  : i.paused
                  ? i.play()
                  : i.pause();
            },
          },
          {
            key: "onContextmenu",
            value: function (r) {
              (r = r || window.event).preventDefault && r.preventDefault(),
                r.stopPropagation
                  ? r.stopPropagation()
                  : ((r.returnValue = !1), (r.cancelBubble = !0));
            },
          },
          {
            key: "destroy",
            value: function () {
              var r,
                i = this,
                o = this.player,
                l = o.video,
                u = o.root;
              this.clickTimer && clearTimeout(this.clickTimer),
                u.removeEventListener("click", this.onVideoClick, !1),
                u.removeEventListener("dblclick", this.onVideoDblClick, !1),
                l.removeEventListener("contextmenu", this.onContextmenu, !1),
                On((r = Dn(jG))).call(r, function (c) {
                  u.removeEventListener(c, i[jG[c]], !1);
                });
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "pc";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {};
            },
          },
        ]
      ),
      n
    );
  })(),
  N_ = {
    PRESS: "press",
    PRESS_END: "pressend",
    DOUBlE_CLICK: "doubleclick",
    CLICK: "click",
    TOUCH_MOVE: "touchmove",
    TOUCH_START: "touchstart",
    TOUCH_END: "touchend",
  },
  QPt = {
    start: "touchstart",
    end: "touchend",
    move: "touchmove",
    cancel: "touchcancel",
  },
  JPt = {
    start: "mousedown",
    end: "mouseup",
    move: "mousemove",
    cancel: "mouseleave",
  };
function rye(t) {
  return t && t.length > 0 ? t[t.length - 1] : null;
}
function qPt() {
  return {
    pressDelay: 600,
    dbClickDelay: 200,
    disablePress: !1,
    disableDbClick: !1,
    miniStep: 2,
    needPreventDefault: !0,
  };
}
var eMt = (function () {
  function t(e) {
    var n,
      r = this,
      i =
        arguments.length > 1 && arguments[1] !== void 0
          ? arguments[1]
          : { eventType: "touch" };
    Hs(this, t),
      Va(this, "onTouchStart", function (o) {
        var l = r._pos,
          u = r.root,
          c = rye(o.touches);
        (l.x = c ? _i(c.pageX, 10) : o.pageX),
          (l.y = c ? _i(c.pageX, 10) : o.pageX),
          (l.start = !0),
          r.__setPress(o),
          u.addEventListener(r.events.end, r.onTouchEnd),
          u.addEventListener(r.events.cancel, r.onTouchCancel),
          u.addEventListener(r.events.move, r.onTouchMove),
          r.trigger(N_.TOUCH_START, o);
      }),
      Va(this, "onTouchCancel", function (o) {
        r.onTouchEnd(o);
      }),
      Va(this, "onTouchEnd", function (o) {
        var l = r._pos,
          u = r.root;
        r.__clearPress(),
          u.removeEventListener(r.events.cancel, r.onTouchCancel),
          u.removeEventListener(r.events.end, r.onTouchEnd),
          u.removeEventListener(r.events.move, r.onTouchMove),
          (o.moving = l.moving),
          (o.press = l.press),
          l.press && r.trigger(N_.PRESS_END, o),
          r.trigger(N_.TOUCH_END, o),
          !l.press && !l.moving && r.__setDb(o),
          (l.press = !1),
          (l.start = !1),
          (l.moving = !1);
      }),
      Va(this, "onTouchMove", function (o) {
        var l = r._pos,
          u = r.config,
          c = rye(o.touches),
          d = c ? _i(c.pageX, 10) : o.pageX,
          h = c ? _i(c.pageY, 10) : o.pageX,
          f = d - l.x,
          p = h - l.y;
        (Math.abs(p) < u.miniStep && Math.abs(f) < u.miniStep) ||
          (r.__clearPress(),
          l.press && r.trigger(N_.PRESS_END, o),
          (l.press = !1),
          (l.moving = !0),
          r.trigger(N_.TOUCH_MOVE, o));
      }),
      (this._pos = { moving: !1, start: !1, x: 0, y: 0 }),
      (this.config = qPt()),
      On((n = Dn(i))).call(n, function (o) {
        r.config[o] = i[o];
      }),
      (this.root = e),
      (this.events = i.eventType === "mouse" ? JPt : QPt),
      (this.pressIntrvalId = null),
      (this.dbIntrvalId = null),
      (this.__handlers = {}),
      this._initEvent();
  }
  return (
    Xs(t, [
      {
        key: "_initEvent",
        value: function () {
          this.root.addEventListener(this.events.start, this.onTouchStart);
        },
      },
      {
        key: "__setPress",
        value: function (e) {
          var n = this,
            r = this.config;
          this.pressIntrvalId && this.__clearPress(),
            (this.pressIntrvalId = setTimeout(function () {
              n.trigger(N_.PRESS, e), (n._pos.press = !0), n.__clearPress();
            }, r.pressDelay));
        },
      },
      {
        key: "__clearPress",
        value: function () {
          window.clearTimeout(this.pressIntrvalId),
            (this.pressIntrvalId = null);
        },
      },
      {
        key: "__setDb",
        value: function (e) {
          var n = this,
            r = this.config;
          if (this.dbIntrvalId)
            return this.__clearDb(), void this.trigger(N_.DOUBlE_CLICK, e);
          this.dbIntrvalId = setTimeout(function () {
            n.__clearDb(),
              n._pos.start ||
                n._pos.press ||
                n._pos.moving ||
                n.trigger(N_.CLICK, e);
          }, r.dbClickDelay);
        },
      },
      {
        key: "__clearDb",
        value: function () {
          clearTimeout(this.dbIntrvalId), (this.dbIntrvalId = null);
        },
      },
      {
        key: "on",
        value: function (e, n) {
          this.__handlers[e] || (this.__handlers[e] = []),
            this.__handlers[e].push(n);
        },
      },
      {
        key: "off",
        value: function (e, n) {
          if (this.__handlers[e]) {
            for (
              var r, i = this.__handlers[e], o = -1, l = 0;
              l < i.length;
              l++
            )
              if (i[l] === n) {
                o = l;
                break;
              }
            o >= 0 && tl((r = this.__handlers[e])).call(r, o, 1);
          }
        },
      },
      {
        key: "trigger",
        value: function (e, n) {
          var r;
          this.__handlers[e] &&
            On((r = this.__handlers[e])).call(r, function (i) {
              try {
                i(n);
              } catch (o) {
                console.error("trigger>>:".concat(e), o);
              }
            });
        },
      },
      {
        key: "destroy",
        value: function () {
          var e = this,
            n = {
              touchend: "onTouchEnd",
              touchmove: "onTouchMove",
              touchstart: "onTouchStart",
            };
          Dn(n).forEach(function (r) {
            e.root.removeEventListener(r, e[n[r]]);
          });
        },
      },
    ]),
    t
  );
})();
function tMt() {
  return new DOMParser().parseFromString(
    `<svg width="20" height="9" viewBox="0 0 8 9" fill="none" xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
  <path opacity="0.54"
    d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z"
    fill="white" />
  <path transform="translate(5 0)" d="M7.5 3.63397C8.16667 4.01887 8.16667 4.98113 7.5 5.36603L1.5 8.83013C0.833334 9.21503 0 8.7339 0 7.9641L0 1.0359C0 0.266098 0.833333 -0.215027 1.5 0.169873L7.5 3.63397Z" fill="white"/>
</svg>`,
    "image/svg+xml"
  ).firstChild;
}
var IA = {
    AUTO: "auto",
    SEEKING: "seeking",
    PLAYBACK: "playbackrate",
    LIGHT: "",
  },
  KG = ["videoClick", "videoDbClick"],
  nMt = (function (t) {
    ju(n, ml);
    var e = Wu(n);
    function n(r) {
      var i;
      return (
        Hs(this, n),
        Va(Oi((i = e.call(this, r))), "onTouchStart", function (o) {
          var l = Oi(i),
            u = l.player,
            c = l.config,
            d = l.pos,
            h = l.playerConfig,
            f = i.getTouche(o);
          if (f && !c.disableGesture && i.duration > 0 && !u.ended) {
            (d.isStart = !0),
              i.timer && clearTimeout(i.timer),
              Pt.checkIsFunction(h.disableSwipeHandler) &&
                h.disableSwipeHandler(),
              (ji(i).call(i, ".xg-dur").innerHTML = Pt.format(i.duration));
            var p = i.root.getBoundingClientRect();
            u.rotateDeg === 90
              ? ((d.top = p.left),
                (d.left = p.top),
                (d.width = p.height),
                (d.height = p.width))
              : ((d.top = p.top),
                (d.left = p.left),
                (d.width = p.width),
                (d.height = p.height));
            var g = _i(f.pageX - d.left, 10),
              y = _i(f.pageY - d.top, 10);
            (d.x = u.rotateDeg === 90 ? y : g),
              (d.y = u.rotateDeg === 90 ? g : y),
              (d.scopeL = c.scopeL * d.width),
              (d.scopeR = (1 - c.scopeR) * d.width),
              (d.scopeM1 = (d.width * (1 - c.scopeM)) / 2),
              (d.scopeM2 = d.width - d.scopeM1);
          }
        }),
        Va(Oi(i), "onTouchMove", function (o) {
          var l = i.getTouche(o),
            u = Oi(i),
            c = u.pos,
            d = u.config,
            h = u.player;
          if (l && !d.disableGesture && i.duration && c.isStart) {
            var f = d.miniMoveStep,
              p = d.hideControlsActive,
              g = _i(l.pageX - c.left, 10),
              y = _i(l.pageY - c.top, 10),
              v = h.rotateDeg === 90 ? y : g,
              b = h.rotateDeg === 90 ? g : y;
            if (Math.abs(v - c.x) > f || Math.abs(b - c.y) > f) {
              var w = v - c.x,
                k = b - c.y,
                D = c.scope;
              if (
                (D === -1 &&
                  ((D = i.checkScope(v, b, w, k, c)) === 0 &&
                    (p ? h.blur() : h.focus({ autoHide: !1 }),
                    !c.time &&
                      (c.time =
                        _i(1e3 * h.currentTime, 10) + 1e3 * i.timeOffset)),
                  (c.scope = D)),
                D === -1 || (D > 0 && !d.gestureY) || (D === 0 && !d.gestureX))
              )
                return;
              i.executeMove(w, k, D, c.width, c.height), (c.x = v), (c.y = b);
            }
          }
        }),
        Va(Oi(i), "onTouchEnd", function (o) {
          var l = Oi(i),
            u = l.player,
            c = l.pos,
            d = l.playerConfig;
          if (
            (setTimeout(function () {
              u.getPlugin("progress") &&
                u.getPlugin("progress").resetSeekState();
            }, 10),
            c.isStart)
          ) {
            c.scope > -1 && o.cancelable && o.preventDefault();
            var h = i.config,
              f = h.disableGesture,
              p = h.gestureX;
            !f && p ? i.endLastMove(c.scope) : (c.time = 0),
              (c.scope = -1),
              i.resetPos(),
              Pt.checkIsFunction(d.enableSwipeHandler) &&
                d.enableSwipeHandler(),
              i.changeAction(IA.AUTO);
          }
        }),
        Va(Oi(i), "onRootTouchMove", function (o) {
          !i.config.disableGesture &&
            i.config.gestureX &&
            i.checkIsRootTarget(o) &&
            (o.stopPropagation(),
            i.pos.isStart ? i.onTouchMove(o) : i.onTouchStart(o));
        }),
        Va(Oi(i), "onRootTouchEnd", function (o) {
          i.pos.scope > -1 && i.onTouchEnd(o);
        }),
        (i.pos = {
          isStart: !1,
          x: 0,
          y: 0,
          time: 0,
          volume: 0,
          rate: 1,
          light: 0,
          width: 0,
          height: 0,
          scopeL: 0,
          scopeR: 0,
          scopeM1: 0,
          scopeM2: 0,
          scope: -1,
        }),
        (i.timer = null),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "duration",
            get: function () {
              return this.playerConfig.customDuration || this.player.duration;
            },
          },
          {
            key: "timeOffset",
            get: function () {
              return this.playerConfig.timeOffset || 0;
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return { seekTipIcon: { icon: tMt, class: "xg-seek-pre" } };
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r,
                i = this;
              On(KG).call(KG, function (p) {
                i.__hooks[p] = null;
              });
              var o = this.playerConfig,
                l = this.config,
                u = this.player;
              o.closeVideoDblclick === !0 && (l.closedbClick = !0),
                this.resetPos(),
                Pt.isUndefined(o.disableGesture) ||
                  (l.disableGesture = !!o.disableGesture),
                this.appendChild(".xg-seek-icon", this.icons.seekTipIcon),
                (this.xgMask = Pt.createDom("xg-mask", "", {}, "xgmask")),
                u.root.appendChild(this.xgMask),
                this.initCustomStyle(),
                this.registerThumbnail();
              var c = this.domEventType === "mouse" ? "mouse" : "touch";
              (this.touch = new eMt(this.root, {
                eventType: c,
                needPreventDefault: !this.config.disableGesture,
              })),
                this.root.addEventListener("contextmenu", function (p) {
                  p.preventDefault();
                }),
                u.root.addEventListener("touchmove", this.onRootTouchMove, !0),
                u.root.addEventListener("touchend", this.onRootTouchEnd, !0),
                u.root.addEventListener("touchcancel", this.onRootTouchEnd, !0);
              var d = this.player.controls;
              d &&
                d.center &&
                (d.center.addEventListener(
                  "touchmove",
                  this.onRootTouchMove,
                  !0
                ),
                d.center.addEventListener("touchend", this.onRootTouchEnd, !0),
                d.center.addEventListener(
                  "touchcancel",
                  this.onRootTouchEnd,
                  !0
                )),
                this.on(mse, function () {
                  var p = i.player,
                    g = i.config;
                  p.duration > 0 &&
                    1e3 * p.duration < g.moveDuration &&
                    (g.moveDuration = 1e3 * p.duration);
                }),
                this.on([lm, gse], function () {
                  var p = i.pos,
                    g = p.time;
                  !p.isStart && g > 0 && (i.pos.time = 0);
                });
              var h = {
                touchstart: "onTouchStart",
                touchmove: "onTouchMove",
                touchend: "onTouchEnd",
                press: "onPress",
                pressend: "onPressEnd",
                click: "onClick",
                doubleclick: "onDbClick",
              };
              if (
                (On((r = Dn(h))).call(r, function (p) {
                  i.touch.on(p, function (g) {
                    i[h[p]](g);
                  });
                }),
                !l.disableActive)
              ) {
                var f = u.plugins.progress;
                f &&
                  (f.addCallBack("dragmove", function (p) {
                    i.activeSeekNote(p.currentTime, p.forward);
                  }),
                  ["dragend", "click"].forEach(function (p) {
                    f.addCallBack(p, function () {
                      i.changeAction(IA.AUTO);
                    });
                  }));
              }
            },
          },
          {
            key: "registerThumbnail",
            value: function () {
              var r = this.player.plugins.thumbnail;
              if (r && r.usable) {
                this.thumbnail = r.createThumbnail(null, "mobile-thumbnail");
                var i = ji(this).call(this, ".time-preview");
                i.insertBefore(this.thumbnail, i.children[0]);
              }
            },
          },
          {
            key: "initCustomStyle",
            value: function () {
              var r = (this.playerConfig || {}).commonStyle,
                i = r.playedColor,
                o = r.progressColor,
                l = r.timePreviewStyle,
                u = r.curTimeColor,
                c = r.durationColor;
              if (
                (i &&
                  (ji(this).call(this, ".xg-curbar").style.backgroundColor = i),
                o && (ji(this).call(this, ".xg-bar").style.backgroundColor = o),
                l)
              ) {
                var d = ji(this).call(this, ".time-preview");
                Dn(l).forEach(function (p) {
                  d.style[p] = l[p];
                });
              }
              var h = u || i,
                f = c;
              h && (ji(this).call(this, ".xg-cur").style.color = h),
                f && (ji(this).call(this, ".xg-dur").style.color = f),
                this.config.disableTimeProgress &&
                  Pt.addClass(ji(this).call(this, ".xg-timebar"), "hide");
            },
          },
          {
            key: "resetPos",
            value: function () {
              var r,
                i = this;
              this.pos
                ? ((this.pos.isStart = !1),
                  (this.pos.scope = -1),
                  On(
                    (r = [
                      "x",
                      "y",
                      "width",
                      "height",
                      "scopeL",
                      "scopeR",
                      "scopeM1",
                      "scopeM2",
                    ])
                  ).call(r, function (o) {
                    i.pos[o] = 0;
                  }))
                : (this.pos = {
                    isStart: !1,
                    x: 0,
                    y: 0,
                    volume: 0,
                    rate: 1,
                    light: 0,
                    width: 0,
                    height: 0,
                    scopeL: 0,
                    scopeR: 0,
                    scopeM1: 0,
                    scopeM2: 0,
                    scope: -1,
                    time: 0,
                  });
            },
          },
          {
            key: "changeAction",
            value: function (r) {
              var i = this.player;
              this.root.setAttribute("data-xg-action", r);
              var o = i.plugins.start;
              o && o.recover();
            },
          },
          {
            key: "getTouche",
            value: function (r) {
              this.player.rotateDeg;
              var i =
                r.touches && r.touches.length > 0
                  ? r.touches[r.touches.length - 1]
                  : r;
              return { pageX: i.pageX, pageY: i.pageY };
            },
          },
          {
            key: "checkScope",
            value: function (r, i, o, l, u) {
              var c = u.width,
                d = -1;
              if (r < 0 || r > c) return d;
              var h = Math.abs(l === 0 ? o : o / l);
              return (
                Math.abs(o) > 0 && h >= 1.73 && r > u.scopeM1 && r < u.scopeM2
                  ? (d = 0)
                  : (Math.abs(o) === 0 || h <= 0.57) &&
                    (d = r < u.scopeL ? 1 : r > u.scopeR ? 2 : 3),
                d
              );
            },
          },
          {
            key: "executeMove",
            value: function (r, i, o, l, u) {
              switch (o) {
                case 0:
                  this.updateTime((r / l) * this.config.scopeM);
                  break;
                case 1:
                  this.updateBrightness(i / u);
                  break;
                case 2:
                  Na.os.isIos || this.updateVolume(i / u);
              }
            },
          },
          {
            key: "endLastMove",
            value: function (r) {
              var i = this,
                o = this.pos,
                l = this.player,
                u = this.config,
                c = (o.time - this.timeOffset) / 1e3;
              r === 0 &&
                (l.seek(Number(c).toFixed(1)),
                u.hideControlsEnd ? l.blur() : l.focus(),
                (this.timer = setTimeout(function () {
                  i.pos.time = 0;
                }, 500))),
                this.changeAction(IA.AUTO);
            },
          },
          {
            key: "checkIsRootTarget",
            value: function (r) {
              var i = this.player.plugins || {};
              return (
                (!i.progress || !i.progress.root.contains(r.target)) &&
                ((i.start && i.start.root.contains(r.target)) ||
                  (i.controls && i.controls.root.contains(r.target)))
              );
            },
          },
          {
            key: "sendUseAction",
            value: function (r) {
              var i = this.player.paused;
              this.emitUserAction(r, "switch_play_pause", {
                prop: "paused",
                from: i,
                to: !i,
              });
            },
          },
          {
            key: "clickHandler",
            value: function (r) {
              var i = this.player,
                o = this.config,
                l = this.playerConfig;
              i.state < ds.RUNNING
                ? l.closeVideoClick ||
                  (this.sendUseAction(Pt.createEvent("click")), i.play())
                : !o.closedbClick || l.closeVideoClick
                ? i.isActive
                  ? i.blur()
                  : i.focus()
                : l.closeVideoClick ||
                  ((i.isActive || o.focusVideoClick) &&
                    (this.sendUseAction(Pt.createEvent("click")),
                    this.switchPlayPause()),
                  i.focus());
            },
          },
          {
            key: "dbClickHandler",
            value: function (r) {
              var i = this.config,
                o = this.player;
              !i.closedbClick &&
                o.state >= ds.RUNNING &&
                (this.sendUseAction(Pt.createEvent("dblclick")),
                this.switchPlayPause());
            },
          },
          {
            key: "onClick",
            value: function (r) {
              var i = this,
                o = this.player;
              qy(
                this,
                KG[0],
                function (l, u) {
                  i.clickHandler(u.e);
                },
                { e: r, paused: o.paused }
              );
            },
          },
          {
            key: "onDbClick",
            value: function (r) {
              var i = this,
                o = this.player;
              qy(
                this,
                KG[1],
                function (l, u) {
                  i.dbClickHandler(u.e);
                },
                { e: r, paused: o.paused }
              );
            },
          },
          {
            key: "onPress",
            value: function (r) {
              var i = this.pos,
                o = this.config,
                l = this.player;
              o.disablePress ||
                ((i.rate = this.player.playbackRate),
                this.emitUserAction("press", "change_rate", {
                  prop: "playbackRate",
                  from: l.playbackRate,
                  to: o.pressRate,
                }),
                (l.playbackRate = o.pressRate),
                this.changeAction(IA.PLAYBACK));
            },
          },
          {
            key: "onPressEnd",
            value: function (r) {
              var i = this.pos,
                o = this.config,
                l = this.player;
              o.disablePress ||
                (this.emitUserAction("pressend", "change_rate", {
                  prop: "playbackRate",
                  from: l.playbackRate,
                  to: i.rate,
                }),
                (l.playbackRate = i.rate),
                (i.rate = 1),
                this.changeAction(IA.AUTO));
            },
          },
          {
            key: "updateTime",
            value: function (r) {
              var i = this.player,
                o = this.config,
                l = this.player.duration;
              r = Number(r.toFixed(4));
              var u = _i(r * o.moveDuration, 10) + this.timeOffset;
              (u =
                (u += this.pos.time) < 0 ? 0 : u > 1e3 * l ? 1e3 * l - 200 : u),
                i.getPlugin("time") && i.getPlugin("time").updateTime(u / 1e3),
                i.getPlugin("progress") &&
                  i
                    .getPlugin("progress")
                    .updatePercent(u / 1e3 / this.duration, !0),
                this.activeSeekNote(u / 1e3, r > 0),
                o.isTouchingSeek &&
                  i.seek(Number((u - this.timeOffset) / 1e3).toFixed(1)),
                (this.pos.time = u);
            },
          },
          {
            key: "updateVolume",
            value: function (r) {
              this.player.rotateDeg && (r = -r);
              var i = this.player,
                o = this.pos;
              if (
                ((r = _i(100 * r, 10)),
                (o.volume += r),
                !(Math.abs(o.volume) < 10))
              ) {
                var l = _i(10 * i.volume, 10) - _i(o.volume / 10, 10);
                (l = l > 10 ? 10 : l < 1 ? 0 : l),
                  (i.volume = l / 10),
                  (o.volume = 0);
              }
            },
          },
          {
            key: "updateBrightness",
            value: function (r) {
              var i = this.pos,
                o = this.config,
                l = this.xgMask;
              if (o.darkness) {
                this.player.rotateDeg && (r = -r);
                var u = i.light + 0.8 * r;
                (u = u > o.maxDarkness ? o.maxDarkness : u < 0 ? 0 : u),
                  l && (l.style.backgroundColor = "rgba(0,0,0,".concat(u, ")")),
                  (i.light = u);
              }
            },
          },
          {
            key: "activeSeekNote",
            value: function (r) {
              var i =
                  !(arguments.length > 1 && arguments[1] !== void 0) ||
                  arguments[1],
                o = this.player,
                l = this.config,
                u = !(this.duration !== 1 / 0 && this.duration > 0);
              if (r && typeof r == "number" && !u && !l.disableActive) {
                r < 0 ? (r = 0) : r > o.duration && (r = o.duration - 0.2),
                  this.changeAction(IA.SEEKING);
                var c = o.plugins.start;
                c && c.focusHide(),
                  (ji(this).call(this, ".xg-dur").innerHTML = Pt.format(
                    this.duration
                  )),
                  (ji(this).call(this, ".xg-cur").innerHTML = Pt.format(r)),
                  (ji(this).call(this, ".xg-curbar").style.width = "".concat(
                    (r / this.duration) * 100,
                    "%"
                  )),
                  i
                    ? Pt.removeClass(
                        ji(this).call(this, ".xg-seek-show"),
                        "xg-back"
                      )
                    : Pt.addClass(
                        ji(this).call(this, ".xg-seek-show"),
                        "xg-back"
                      ),
                  this.updateThumbnails(r);
              }
            },
          },
          {
            key: "updateThumbnails",
            value: function (r) {
              var i = this.player.plugins.thumbnail;
              i &&
                i.usable &&
                this.thumbnail &&
                i.update(this.thumbnail, r, 160, 90);
            },
          },
          {
            key: "switchPlayPause",
            value: function () {
              var r = this.player;
              if (r.state < ds.ATTACHED) return !1;
              r.ended || (r.paused ? r.play() : r.pause());
            },
          },
          {
            key: "disableGesture",
            value: function () {
              this.config.disableGesture = !0;
            },
          },
          {
            key: "enableGesture",
            value: function () {
              this.config.disableGesture = !1;
            },
          },
          {
            key: "destroy",
            value: function () {
              var r = this.player;
              this.timer && clearTimeout(this.timer),
                (this.thumbnail = null),
                r.root.removeChild(this.xgMask),
                (this.xgMask = null),
                this.touch && this.touch.destroy(),
                (this.touch = null),
                r.root.removeEventListener(
                  "touchmove",
                  this.onRootTouchMove,
                  !0
                ),
                r.root.removeEventListener("touchend", this.onRootTouchEnd, !0),
                r.root.removeEventListener(
                  "touchcancel",
                  this.onRootTouchEnd,
                  !0
                );
              var i = this.player.controls;
              i &&
                i.center &&
                (i.center.removeEventListener(
                  "touchmove",
                  this.onRootTouchMove,
                  !0
                ),
                i.center.removeEventListener(
                  "touchend",
                  this.onRootTouchEnd,
                  !0
                ),
                i.center.removeEventListener(
                  "touchcancel",
                  this.onRootTouchEnd,
                  !0
                ));
            },
          },
          {
            key: "render",
            value: function () {
              var r,
                i,
                o,
                l =
                  this.config.gradient !== "normal"
                    ? "gradient ".concat(this.config.gradient)
                    : "gradient";
              return Ce(
                (r = Ce(
                  (i = Ce(
                    (o = `
     <xg-trigger class="trigger">
     <div class="`.concat(
                      l,
                      `"></div>
        <div class="time-preview">
            <div class="xg-seek-show `
                    ))
                  ).call(
                    o,
                    this.config.disableSeekIcon ? " hide-seek-icon" : "",
                    `">
              <i class="xg-seek-icon"></i>
              <span class="xg-cur">00:00</span>
              <span class="xg-separator">/</span>
              <span class="xg-dur">00:00</span>
            </div>
              <div class="xg-bar xg-timebar">
                <div class="xg-curbar"></div>
              </div>
        </div>
        <div class="xg-playbackrate xg-top-note">
            <span><i>`
                  ))
                ).call(i, this.config.pressRate, "X</i>"))
              ).call(
                r,
                this.i18n.FORWARD,
                `</span>
        </div>
     </xg-trigger>
    `
              );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "mobile";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                index: 0,
                disableGesture: !1,
                gestureX: !0,
                gestureY: !0,
                gradient: "normal",
                isTouchingSeek: !1,
                miniMoveStep: 5,
                miniYPer: 5,
                scopeL: 0.25,
                scopeR: 0.25,
                scopeM: 0.9,
                pressRate: 2,
                darkness: !0,
                maxDarkness: 0.8,
                disableActive: !1,
                disableTimeProgress: !1,
                hideControlsActive: !1,
                hideControlsEnd: !1,
                moveDuration: 36e4,
                closedbClick: !1,
                disablePress: !0,
                disableSeekIcon: !1,
                focusVideoClick: !1,
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  rMt = ur,
  iMt = j6e;
rMt({ target: "String", proto: !0 }, { repeat: iMt });
var aMt = Il,
  oMt = aMt("String").repeat,
  sMt = Es,
  lMt = oMt,
  JX = String.prototype,
  uMt = function (t) {
    var e = t.repeat;
    return typeof t == "string" || t === JX || (sMt(JX, t) && e === JX.repeat)
      ? lMt
      : e;
  },
  cMt = uMt,
  dMt = cMt,
  hMt = dMt,
  fMt = hMt,
  pMt = fMt,
  gMt = pMt,
  mMt = gMt,
  yMt = mMt,
  ZP = xr(yMt);
function vMt(t) {
  t.preventDefault(), (t.returnValue = !1);
}
function iye(t) {
  var e = t.tagName;
  return !(e !== "INPUT" && e !== "TEXTAREA" && !t.isContentEditable);
}
var bMt = (function (t) {
  ju(n, $I);
  var e = Wu(n);
  function n() {
    var r, i;
    Hs(this, n);
    for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
      l[u] = arguments[u];
    return (
      Va(
        Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
        "onBodyKeyDown",
        function (c) {
          if (i.player) {
            var d = c || window.event,
              h = d.keyCode,
              f = Oi(i),
              p = f._keyState,
              g = f.player,
              y = i.config,
              v = y.disable,
              b = y.disableBodyTrigger,
              w = y.isIgnoreUserActive;
            v ||
            b ||
            (!g.isUserActive && !w) ||
            iye(d.target) ||
            !i.checkIsVisible() ||
            d.metaKey ||
            d.altKey ||
            d.ctrlKey
              ? (p.isBodyKeyDown = !1)
              : (ZP(c) ||
                  p.isKeyDown ||
                  ((d.target === document.body ||
                    (i.config.isGlobalTrigger && !iye(d.target))) &&
                    i.checkCode(h, !0) &&
                    (p.isBodyKeyDown = !0),
                  document.addEventListener("keyup", i.onBodyKeyUp)),
                p.isBodyKeyDown && i.handleKeyDown(d));
          }
        }
      ),
      Va(Oi(i), "onBodyKeyUp", function (c) {
        i.player &&
          (document.removeEventListener("keyup", i.onBodyKeyUp),
          i.handleKeyUp(c));
      }),
      Va(Oi(i), "onKeydown", function (c) {
        if (i.player) {
          var d = c || window.event,
            h = Oi(i)._keyState;
          if (!ZP(d)) {
            if (
              i.config.disable ||
              i.config.disableRootTrigger ||
              d.metaKey ||
              d.altKey ||
              d.ctrlKey
            )
              return;
            !d ||
              (d.keyCode !== 37 && !i.checkCode(d.keyCode)) ||
              (d.target !== i.player.root &&
                d.target !== i.player.video &&
                d.target !== i.player.controls.el) ||
              (h.isKeyDown = !0),
              i.player.root.addEventListener("keyup", i.onKeyup);
          }
          h.isKeyDown && i.handleKeyDown(d);
        }
      }),
      Va(Oi(i), "onKeyup", function (c) {
        i.player &&
          (i.player.root.removeEventListener("keyup", i.onKeyup),
          i.handleKeyUp(c));
      }),
      i
    );
  }
  return (
    Xs(
      n,
      [
        {
          key: "mergekeyCodeMap",
          value: function () {
            var r,
              i = this,
              o = this.config.keyCodeMap;
            o &&
              On((r = Dn(o))).call(r, function (l) {
                var u;
                i.keyCodeMap[l]
                  ? On(
                      (u = [
                        "keyCode",
                        "action",
                        "disable",
                        "pressAction",
                        "disablePress",
                        "isBodyTarget",
                      ])
                    ).call(u, function (c) {
                      o[l][c] && (i.keyCodeMap[l][c] = o[l][c]);
                    })
                  : (i.keyCodeMap[l] = o[l]);
              });
          },
        },
        {
          key: "afterCreate",
          value: function () {
            this.config.disable = !this.playerConfig.keyShortcut;
            var r =
              typeof this.config.seekStep == "function"
                ? this.config.seekStep(this.player)
                : this.config.seekStep;
            r && typeof r == "number" && (this.seekStep = r),
              (this.keyCodeMap = {
                space: {
                  keyCode: 32,
                  action: "playPause",
                  disable: !1,
                  disablePress: !1,
                  noBodyTarget: !1,
                },
                up: {
                  keyCode: 38,
                  action: "upVolume",
                  disable: !1,
                  disablePress: !1,
                  noBodyTarget: !0,
                },
                down: {
                  keyCode: 40,
                  action: "downVolume",
                  disable: !1,
                  disablePress: !1,
                  noBodyTarget: !0,
                },
                left: {
                  keyCode: 37,
                  action: "seekBack",
                  disablePress: !1,
                  disable: !1,
                },
                right: {
                  keyCode: 39,
                  action: "seek",
                  pressAction: "changePlaybackRate",
                  disablePress: !1,
                  disable: !1,
                },
                esc: {
                  keyCode: 27,
                  action: "exitFullscreen",
                  disablePress: !0,
                  disable: !1,
                },
              }),
              this.mergekeyCodeMap(),
              (this._keyState = {
                isKeyDown: !1,
                isBodyKeyDown: !1,
                isPress: !1,
                tt: 0,
                playbackRate: 0,
              }),
              this.player.root.addEventListener("keydown", this.onKeydown),
              document.addEventListener("keydown", this.onBodyKeyDown);
          },
        },
        {
          key: "setConfig",
          value: function (r) {
            var i = this;
            Dn(r).forEach(function (o) {
              i.config[o] = r[o];
            });
          },
        },
        {
          key: "checkIsVisible",
          value: function () {
            if (!this.config.checkVisible) return !0;
            var r = this.player.root.getBoundingClientRect(),
              i = r.height,
              o = r.top,
              l = r.bottom,
              u = window.innerHeight;
            return !((o < 0 && o < 0 - 0.9 * i) || (l > 0 && l - u > 0.9 * i));
          },
        },
        {
          key: "checkCode",
          value: function (r, i) {
            var o,
              l = this,
              u = !1;
            return (
              On((o = Dn(this.keyCodeMap))).call(o, function (c) {
                l.keyCodeMap[c] &&
                  r === l.keyCodeMap[c].keyCode &&
                  !l.keyCodeMap[c].disable &&
                  (u = !i || (i && !l.keyCodeMap[c].noBodyTarget));
              }),
              u
            );
          },
        },
        {
          key: "downVolume",
          value: function (r) {
            var i = this.player;
            if (!(i.volume <= 0)) {
              var o = wl((i.volume - 0.1).toFixed(1)),
                l = { volume: { from: i.volume, to: o } };
              this.emitUserAction(r, "change_volume", { props: l }),
                (i.volume = o >= 0 ? o : 0);
            }
          },
        },
        {
          key: "upVolume",
          value: function (r) {
            var i = this.player;
            if (!(i.volume >= 1)) {
              var o = wl((i.volume + 0.1).toFixed(1)),
                l = { volume: { from: i.volume, to: o } };
              this.emitUserAction(r, "change_volume", { props: l }),
                (i.volume = o <= 1 ? o : 1);
            }
          },
        },
        {
          key: "seek",
          value: function (r) {
            var i = this.player,
              o = i.currentTime,
              l = i.offsetCurrentTime,
              u = i.duration,
              c = i.offsetDuration,
              d = i.timeSegments,
              h = l > -1 ? l : o,
              f = c || u,
              p =
                ZP(r) && this.seekStep >= 4
                  ? _i(this.seekStep / 2, 10)
                  : this.seekStep;
            h + p <= f ? (h += p) : (h = f);
            var g = Pt.getCurrentTimeByOffset(h, d),
              y = { currentTime: { from: o, to: g } };
            this.emitUserAction(r, "seek", { props: y }),
              (this.player.currentTime = g);
          },
        },
        {
          key: "seekBack",
          value: function (r) {
            var i = this.player,
              o = i.currentTime,
              l = i.offsetCurrentTime,
              u = i.timeSegments,
              c =
                (l > -1 ? l : o) -
                (ZP(r) ? _i(this.seekStep / 2, 10) : this.seekStep);
            c < 0 && (c = 0);
            var d = {
              currentTime: {
                from: o,
                to: (c = Pt.getCurrentTimeByOffset(c, u)),
              },
            };
            this.emitUserAction(r, "seek", { props: d }),
              (this.player.currentTime = c);
          },
        },
        {
          key: "changePlaybackRate",
          value: function (r) {
            var i = this._keyState,
              o = this.config,
              l = this.player;
            i.playbackRate === 0 &&
              ((i.playbackRate = l.playbackRate),
              (l.playbackRate = o.playbackRate));
          },
        },
        {
          key: "playPause",
          value: function (r) {
            var i = this.player;
            i &&
              (this.emitUserAction(r, "switch_play_pause"),
              i.paused ? i.play() : i.pause());
          },
        },
        {
          key: "exitFullscreen",
          value: function (r) {
            var i = this.player,
              o = i.fullscreen,
              l = i.cssfullscreen;
            o &&
              (this.emitUserAction("keyup", "switch_fullscreen", {
                prop: "fullscreen",
                from: o,
                to: !o,
              }),
              i.exitFullscreen()),
              l &&
                (this.emitUserAction("keyup", "switch_css_fullscreen", {
                  prop: "cssfullscreen",
                  from: l,
                  to: !l,
                }),
                i.exitCssFullscreen());
          },
        },
        {
          key: "handleKeyDown",
          value: function (r) {
            var i = this._keyState;
            if (ZP(r)) {
              i.isPress = !0;
              var o = Date.now();
              if (o - i.tt < 200) return;
              i.tt = o;
            }
            this.handleKeyCode(r.keyCode, r, i.isPress);
          },
        },
        {
          key: "handleKeyUp",
          value: function (r) {
            var i = this._keyState;
            i.playbackRate > 0 &&
              ((this.player.playbackRate = i.playbackRate),
              (i.playbackRate = 0)),
              (i.isKeyDown = !1),
              (i.isPress = !1),
              (i.tt = 0);
          },
        },
        {
          key: "handleKeyCode",
          value: function (r, i, o) {
            for (var l = Dn(this.keyCodeMap), u = 0; u < l.length; u++) {
              var c = this.keyCodeMap[l[u]],
                d = c.action,
                h = c.keyCode,
                f = c.disable,
                p = c.pressAction,
                g = c.disablePress;
              if (h === r) {
                if (!(f || (o && g))) {
                  var y = (o && p) || d;
                  typeof y == "function"
                    ? d(i, this.player, o)
                    : typeof y == "string" &&
                      typeof this[y] == "function" &&
                      this[y](i, this.player, o),
                    this.emit(
                      fUe,
                      hS(
                        { key: l[u], target: i.target, isPress: o },
                        this.keyCodeMap[l[u]]
                      )
                    );
                }
                vMt(i), i.stopPropagation();
                break;
              }
            }
          },
        },
        {
          key: "destroy",
          value: function () {
            this.player.root.removeEventListener("keydown", this.onKeydown),
              document.removeEventListener("keydown", this.onBodyKeyDown),
              this.player.root.removeEventListener("keyup", this.onKeyup),
              document.removeEventListener("keyup", this.onBodyKeyUp);
          },
        },
        {
          key: "disable",
          value: function () {
            this.config.disable = !0;
          },
        },
        {
          key: "enable",
          value: function () {
            this.config.disable = !1;
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "keyboard";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return {
              seekStep: 10,
              checkVisible: !1,
              disableBodyTrigger: !1,
              disableRootTrigger: !1,
              isGlobalTrigger: !0,
              keyCodeMap: {},
              disable: !1,
              playbackRate: 2,
              isIgnoreUserActive: !0,
            };
          },
        },
      ]
    ),
    n
  );
})();
function _Mt() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="-5 -5 110 110">
  <path d="M100,50A50,50,0,1,1,50,0" stroke-width="5" stroke="#ddd" stroke-dasharray="236" fill="none"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var TMt = (function (t) {
    ju(n, ml);
    var e = Wu(n);
    function n() {
      return Hs(this, n), e.apply(this, arguments);
    }
    return (
      Xs(
        n,
        [
          {
            key: "registerIcons",
            value: function () {
              return { loadingIcon: _Mt };
            },
          },
          {
            key: "afterCreate",
            value: function () {
              this.appendChild("xg-loading-inner", this.icons.loadingIcon);
            },
          },
          {
            key: "render",
            value: function () {
              return `
    <xg-loading class="xgplayer-loading">
      <xg-loading-inner></xg-loading-inner>
    </xg-loading>`;
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "loading";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { position: Lh.ROOT };
            },
          },
        ]
      ),
      n
    );
  })(),
  EMt = ur,
  SMt = gR.findIndex,
  aye = "findIndex",
  oye = !0;
aye in [] &&
  Array(1)[aye](function () {
    oye = !1;
  }),
  EMt(
    { target: "Array", proto: !0, forced: oye },
    {
      findIndex: function (t) {
        return SMt(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
    }
  );
var RMt = Il,
  AMt = RMt("Array").findIndex,
  wMt = Es,
  kMt = AMt,
  qX = Array.prototype,
  IMt = function (t) {
    var e = t.findIndex;
    return t === qX || (wMt(qX, t) && e === qX.findIndex) ? kMt : e;
  },
  DMt = IMt,
  PMt = DMt,
  MMt = PMt,
  CMt = MMt,
  $Mt = CMt,
  xMt = $Mt,
  LMt = xMt,
  OMt = LMt,
  iU = xr(OMt),
  Dse = (function (t) {
    ju(n, ml);
    var e = Wu(n);
    function n() {
      var r, i;
      Hs(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        Va(
          Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "_onMouseenter",
          function (c) {
            i.emit("icon_mouseenter", { pluginName: i.pluginName });
          }
        ),
        Va(Oi(i), "_onMouseLeave", function (c) {
          i.emit("icon_mouseleave", { pluginName: i.pluginName });
        }),
        i
      );
    }
    return (
      Xs(n, [
        {
          key: "afterCreate",
          value: function () {
            this.bind("mouseenter", this._onMouseenter),
              this.bind("mouseleave", this._onMouseLeave),
              this.config.disable && this.disable();
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unbind("mouseenter", this._onMouseenter),
              this.unbind("mouseleave", this._onMouseLeave);
          },
        },
      ]),
      n
    );
  })(),
  GMt = (function (t) {
    ju(n, Dse);
    var e = Wu(n);
    function n() {
      var r, i;
      Hs(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        Va(
          Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "btnClick",
          function (c) {
            c.preventDefault(), c.stopPropagation();
            var d = Oi(i).player;
            return (
              i.emitUserAction(c, "switch_play_pause", {
                prop: "paused",
                from: d.paused,
                to: !d.paused,
              }),
              d.ended
                ? d.replay()
                : d.paused
                ? (d.play(), i.animate(!1))
                : (d.pause(), i.animate(!0)),
              !1
            );
          }
        ),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "afterCreate",
            value: function () {
              Al(el(n.prototype), "afterCreate", this).call(this),
                this.config.disable ||
                  (this.initIcons(),
                  this.bind(["touchend", "click"], this.btnClick),
                  this.listenEvents(),
                  this.animate(!0));
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this,
                i = this.player;
              this.on([C0, Z9, Kk, tUe], function () {
                r.animate(i.paused);
              });
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return {
                play: { icon: wse, class: "xg-icon-play" },
                pause: { icon: kse, class: "xg-icon-pause" },
              };
            },
          },
          {
            key: "initIcons",
            value: function () {
              var r = this.icons;
              this.appendChild(".xgplayer-icon", r.play),
                this.appendChild(".xgplayer-icon", r.pause);
            },
          },
          {
            key: "animate",
            value: function (r) {
              if (this.player) {
                var i = this.i18nKeys,
                  o = ji(this).call(this, ".xg-tips");
                r
                  ? (this.setAttr("data-state", "pause"),
                    o && this.changeLangTextKey(o, i.PLAY_TIPS))
                  : (this.setAttr("data-state", "play"),
                    o && this.changeLangTextKey(o, i.PAUSE_TIPS));
              }
            },
          },
          {
            key: "destroy",
            value: function () {
              Al(el(n.prototype), "destroy", this).call(this),
                this.unbind(["touchend", "click"], this.btnClick);
            },
          },
          {
            key: "render",
            value: function () {
              if (!this.config.disable)
                return `<xg-icon class="xgplayer-play">
    <div class="xgplayer-icon">
    </div>
    `.concat(
                  q9(this, "PLAY_TIPS", this.playerConfig.isHideTips),
                  `
    </xg-icon>`
                );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "play";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { position: Lh.CONTROLS_LEFT, index: 0, disable: !1 };
            },
          },
        ]
      ),
      n
    );
  })();
function NMt() {
  return new DOMParser().parseFromString(
    `<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>
    </g>
</svg>`,
    "image/svg+xml"
  ).firstChild;
}
var FMt = (function (t) {
  ju(n, ml);
  var e = Wu(n);
  function n() {
    return Hs(this, n), e.apply(this, arguments);
  }
  return (
    Xs(
      n,
      [
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            this.initIcons(),
              (this.onClick = function (i) {
                i.preventDefault(), i.stopPropagation(), r.config.onClick(i);
              }),
              this.bind(["click", "touchend"], this.onClick);
          },
        },
        {
          key: "registerIcons",
          value: function () {
            return { screenBack: { icon: NMt, class: "xg-fullscreen-back" } };
          },
        },
        {
          key: "initIcons",
          value: function () {
            var r = this.icons;
            this.appendChild(this.root, r.screenBack);
          },
        },
        {
          key: "show",
          value: function () {
            Pt.addClass(this.root, "show");
          },
        },
        {
          key: "hide",
          value: function () {
            Pt.removeClass(this.root, "show");
          },
        },
        {
          key: "render",
          value: function () {
            return `<xg-icon class="xgplayer-back">
    </xg-icon>`;
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "topbackicon";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return { position: Lh.ROOT_TOP, index: 0 };
          },
        },
      ]
    ),
    n
  );
})();
function UMt() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function BMt() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var HMt = (function (t) {
  ju(n, Dse);
  var e = Wu(n);
  function n() {
    var r, i;
    Hs(this, n);
    for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
      l[u] = arguments[u];
    return (
      Va(
        Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
        "_onOrientationChange",
        function (c) {
          i.player.fullscreen &&
            i.config.rotateFullscreen &&
            (window.orientation === 90 || window.orientation === -90
              ? i.player.setRotateDeg(0)
              : i.player.setRotateDeg(90));
        }
      ),
      i
    );
  }
  return (
    Xs(
      n,
      [
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            Al(el(n.prototype), "afterCreate", this).call(this);
            var i = this.config,
              o = this.playerConfig;
            if (!i.disable) {
              i.target &&
                (this.playerConfig.fullscreenTarget = this.config.target);
              var l = Pt.getFullScreenEl();
              o.fullscreenTarget === l &&
                this.player.getFullscreen().catch(function (u) {}),
                this.initIcons(),
                (this.handleFullscreen = this.hook(
                  "fullscreenChange",
                  this.toggleFullScreen,
                  {
                    pre: function (u) {
                      var c = r.player.fullscreen;
                      r.emitUserAction(u, "switch_fullscreen", {
                        prop: "fullscreen",
                        from: c,
                        to: !c,
                      });
                    },
                  }
                )),
                this.bind(
                  ".xgplayer-fullscreen",
                  ["touchend", "click"],
                  this.handleFullscreen
                ),
                this.on(m0, function (u) {
                  var c = ji(r).call(r, ".xg-tips");
                  c &&
                    r.changeLangTextKey(
                      c,
                      u
                        ? r.i18nKeys.EXITFULLSCREEN_TIPS
                        : r.i18nKeys.FULLSCREEN_TIPS
                    ),
                    r.animate(u);
                }),
                this.config.needBackIcon &&
                  (this.topBackIcon = this.player.registerPlugin({
                    plugin: FMt,
                    options: {
                      config: {
                        onClick: function (u) {
                          r.handleFullscreen(u);
                        },
                      },
                    },
                  })),
                Na.device === "mobile" &&
                  window.addEventListener(
                    "orientationchange",
                    this._onOrientationChange
                  );
            }
          },
        },
        {
          key: "registerIcons",
          value: function () {
            return {
              fullscreen: { icon: UMt, class: "xg-get-fullscreen" },
              exitFullscreen: { icon: BMt, class: "xg-exit-fullscreen" },
            };
          },
        },
        {
          key: "destroy",
          value: function () {
            Al(el(n.prototype), "destroy", this).call(this),
              this.unbind(
                ".xgplayer-icon",
                Na.device === "mobile" ? "touchend" : "click",
                this.handleFullscreen
              ),
              Na.device === "mobile" &&
                window.removeEventListener(
                  "orientationchange",
                  this._onOrientationChange
                );
          },
        },
        {
          key: "initIcons",
          value: function () {
            var r = this.icons;
            this.appendChild(".xgplayer-icon", r.fullscreen),
              this.appendChild(".xgplayer-icon", r.exitFullscreen);
          },
        },
        {
          key: "toggleFullScreen",
          value: function (r) {
            r instanceof Event && (r.preventDefault(), r.stopPropagation());
            var i = this.player,
              o = this.config;
            o.useCssFullscreen === !0 ||
            (typeof o.useCssFullscreen == "function" && o.useCssFullscreen())
              ? (i.fullscreen ? i.exitCssFullscreen() : i.getCssFullscreen(),
                this.animate(i.fullscreen))
              : o.rotateFullscreen
              ? (i.fullscreen
                  ? i.exitRotateFullscreen()
                  : i.getRotateFullscreen(),
                this.animate(i.fullscreen))
              : o.switchCallback && typeof o.switchCallback == "function"
              ? o.switchCallback(i.fullscreen)
              : i.fullscreen
              ? (i.exitFullscreen(),
                o.useScreenOrientation && this.unlockScreen())
              : (i.getFullscreen().catch(function (l) {}),
                o.useScreenOrientation &&
                  i.aspectRatio > 1 &&
                  this.lockScreen(o.lockOrientationType));
          },
        },
        {
          key: "animate",
          value: function (r) {
            r
              ? this.setAttr("data-state", "full")
              : this.setAttr("data-state", "normal"),
              this.topBackIcon &&
                (r
                  ? (this.topBackIcon.show(), this.hide())
                  : (this.topBackIcon.hide(), this.show()));
          },
        },
        {
          key: "render",
          value: function () {
            if (!this.config.disable)
              return `<xg-icon class="xgplayer-fullscreen">
    <div class="xgplayer-icon">
    </div>
    `.concat(
                q9(this, "FULLSCREEN_TIPS", this.playerConfig.isHideTips),
                `
    </xg-icon>`
              );
          },
        },
        {
          key: "lockScreen",
          value: function (r) {
            try {
              screen.orientation.lock(r).catch(function (i) {});
            } catch {}
          },
        },
        {
          key: "unlockScreen",
          value: function () {
            try {
              screen.orientation.unlock().catch(function (r) {});
            } catch {}
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "fullscreen";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return {
              position: Lh.CONTROLS_RIGHT,
              index: 0,
              useCssFullscreen: !1,
              rotateFullscreen: !1,
              useScreenOrientation: !1,
              lockOrientationType: "landscape",
              switchCallback: null,
              target: null,
              disable: !1,
              needBackIcon: !1,
            };
          },
        },
      ]
    ),
    n
  );
})();
function XMt() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function VMt() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function zMt() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var jMt = (function (t) {
  ju(n, ml);
  var e = Wu(n);
  function n() {
    var r, i;
    Hs(this, n);
    for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
      l[u] = arguments[u];
    return (
      Va(
        Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
        "onBarMousedown",
        function (c) {
          var d = Oi(i).player,
            h = ji(i).call(i, ".xgplayer-bar");
          Pt.event(c);
          var f = h.getBoundingClientRect(),
            p = Pt.getEventPos(c, d.zoom),
            g = f.height - (p.clientY - f.top);
          if (((p.h = g), (p.barH = f.height), (i.pos = p), !(g < -2)))
            return (
              i.updateVolumePos(g, c),
              document.addEventListener("mouseup", i.onBarMouseUp),
              (i._d.isStart = !0),
              !1
            );
        }
      ),
      Va(Oi(i), "onBarMouseMove", function (c) {
        var d = Oi(i)._d;
        if (d.isStart) {
          var h = Oi(i),
            f = h.pos,
            p = h.player;
          c.preventDefault(), c.stopPropagation(), Pt.event(c);
          var g = Pt.getEventPos(c, p.zoom);
          d.isMoving = !0;
          var y = f.h - g.clientY + f.clientY;
          y > f.barH || i.updateVolumePos(y, c);
        }
      }),
      Va(Oi(i), "onBarMouseUp", function (c) {
        Pt.event(c), document.removeEventListener("mouseup", i.onBarMouseUp);
        var d = Oi(i)._d;
        (d.isStart = !1), (d.isMoving = !1);
      }),
      Va(Oi(i), "onMouseenter", function (c) {
        (i._d.isActive = !0),
          i.focus(),
          i.emit("icon_mouseenter", { pluginName: i.pluginName });
      }),
      Va(Oi(i), "onMouseleave", function (c) {
        (i._d.isActive = !1),
          i.unFocus(100, !1, c),
          i.emit("icon_mouseleave", { pluginName: i.pluginName });
      }),
      Va(Oi(i), "onVolumeChange", function (c) {
        if (i.player) {
          var d = i.player,
            h = d.muted,
            f = d.volume;
          i._d.isMoving ||
            ((ji(i).call(i, ".xgplayer-drag").style.height =
              h || f === 0 ? "4px" : "".concat(100 * f, "%")),
            i.config.showValueLabel && i.updateVolumeValue()),
            i.animate(h, f);
        }
      }),
      i
    );
  }
  return (
    Xs(
      n,
      [
        {
          key: "registerIcons",
          value: function () {
            return {
              volumeSmall: { icon: VMt, class: "xg-volume-small" },
              volumeLarge: { icon: XMt, class: "xg-volume" },
              volumeMuted: { icon: zMt, class: "xg-volume-mute" },
            };
          },
        },
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            if (
              ((this._timerId = null),
              (this._d = { isStart: !1, isMoving: !1, isActive: !1 }),
              !this.config.disable)
            ) {
              this.initIcons();
              var i = this.playerConfig,
                o = i.commonStyle,
                l = i.volume;
              o.volumeColor &&
                (ji(this).call(this, ".xgplayer-drag").style.backgroundColor =
                  o.volumeColor),
                (this.changeMutedHandler = this.hook(
                  "mutedChange",
                  function (u) {
                    r.changeMuted(u);
                  },
                  {
                    pre: function (u) {
                      u.preventDefault(), u.stopPropagation();
                    },
                  }
                )),
                (this._onMouseenterHandler = this.hook(
                  "mouseenter",
                  this.onMouseenter
                )),
                (this._onMouseleaveHandler = this.hook(
                  "mouseleave",
                  this.onMouseleave
                )),
                Na.device !== "mobile" &&
                  this.playerConfig.isMobileSimulateMode !== "mobile" &&
                  (this.bind("mouseenter", this._onMouseenterHandler),
                  this.bind(["blur", "mouseleave"], this._onMouseleaveHandler),
                  this.bind(
                    ".xgplayer-slider",
                    "mousedown",
                    this.onBarMousedown
                  ),
                  this.bind(
                    ".xgplayer-slider",
                    "mousemove",
                    this.onBarMouseMove
                  ),
                  this.bind(".xgplayer-slider", "mouseup", this.onBarMouseUp)),
                this.bind(
                  ".xgplayer-icon",
                  ["touchend", "click"],
                  this.changeMutedHandler
                ),
                this.on(Z6, this.onVolumeChange),
                this.once(Y6, this.onVolumeChange),
                Pt.typeOf(l) !== "Number" &&
                  (this.player.volume = this.config.default),
                this.onVolumeChange();
            }
          },
        },
        {
          key: "updateVolumePos",
          value: function (r, i) {
            var o = this.player,
              l = ji(this).call(this, ".xgplayer-drag"),
              u = ji(this).call(this, ".xgplayer-bar");
            if (u && l) {
              var c = _i((r / u.getBoundingClientRect().height) * 1e3, 10);
              l.style.height = "".concat(r, "px");
              var d = Math.max(Math.min(c / 1e3, 1), 0),
                h = { volume: { from: o.volume, to: d } };
              o.muted && (h.muted = { from: !0, to: !1 }),
                this.emitUserAction(i, "change_volume", {
                  muted: o.muted,
                  volume: o.volume,
                  props: h,
                }),
                (o.volume = Math.max(Math.min(c / 1e3, 1), 0)),
                o.muted && (o.muted = !1),
                this.config.showValueLabel && this.updateVolumeValue();
            }
          },
        },
        {
          key: "updateVolumeValue",
          value: function () {
            var r = this.player,
              i = r.volume,
              o = r.muted,
              l = ji(this).call(this, ".xgplayer-value-label"),
              u = Math.max(Math.min(i, 1), 0);
            l.innerText = o ? 0 : Math.round(100 * u);
          },
        },
        {
          key: "focus",
          value: function () {
            this.player.focus({ autoHide: !1 }),
              this._timerId &&
                (Pt.clearTimeout(this, this._timerId), (this._timerId = null)),
              Pt.addClass(this.root, "slide-show");
          },
        },
        {
          key: "unFocus",
          value: function () {
            var r = this,
              i =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 100,
              o =
                !(arguments.length > 1 && arguments[1] !== void 0) ||
                arguments[1],
              l = arguments.length > 2 ? arguments[2] : void 0,
              u = this._d,
              c = this.player;
            u.isActive ||
              (this._timerId &&
                (Pt.clearTimeout(this, this._timerId), (this._timerId = null)),
              (this._timerId = Pt.setTimeout(
                this,
                function () {
                  u.isActive ||
                    (o ? c.blur() : c.focus(),
                    Pt.removeClass(r.root, "slide-show"),
                    u.isStart && r.onBarMouseUp(l)),
                    (r._timerId = null);
                },
                i
              )));
          },
        },
        {
          key: "changeMuted",
          value: function (r) {
            r && r.stopPropagation();
            var i = this.player;
            this._d.isStart && this.onBarMouseUp(r),
              this.emitUserAction(r, "change_muted", {
                muted: i.muted,
                volume: i.volume,
                props: { muted: { from: i.muted, to: !i.muted } },
              }),
              i.volume > 0 && (i.muted = !i.muted),
              i.volume < 0.01 && (i.volume = this.config.miniVolume);
          },
        },
        {
          key: "animate",
          value: function (r, i) {
            r || i === 0
              ? this.setAttr("data-state", "mute")
              : i < 0.5 && this.icons.volumeSmall
              ? this.setAttr("data-state", "small")
              : this.setAttr("data-state", "normal");
          },
        },
        {
          key: "initIcons",
          value: function () {
            var r = this.icons;
            this.appendChild(".xgplayer-icon", r.volumeSmall),
              this.appendChild(".xgplayer-icon", r.volumeLarge),
              this.appendChild(".xgplayer-icon", r.volumeMuted);
          },
        },
        {
          key: "destroy",
          value: function () {
            this._timerId &&
              (Pt.clearTimeout(this, this._timerId), (this._timerId = null)),
              this.unbind("mouseenter", this.onMouseenter),
              this.unbind(["blur", "mouseleave"], this.onMouseleave),
              this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown),
              this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove),
              this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp),
              document.removeEventListener("mouseup", this.onBarMouseUp),
              this.unbind(
                ".xgplayer-icon",
                Na.device === "mobile" ? "touchend" : "click",
                this.changeMutedHandler
              );
          },
        },
        {
          key: "render",
          value: function () {
            var r;
            if (!this.config.disable) {
              var i = this.config.default || this.player.volume,
                o = this.config.showValueLabel;
              return Ce(
                (r = `
    <xg-icon class="xgplayer-volume" data-state="normal">
      <div class="xgplayer-icon">
      </div>
      <xg-slider class="xgplayer-slider">
        `.concat(
                  o
                    ? '<div class="xgplayer-value-label">'.concat(
                        100 * i,
                        "</div>"
                      )
                    : "",
                  `
        <div class="xgplayer-bar">
          <xg-drag class="xgplayer-drag" style="height: `
                ))
              ).call(
                r,
                100 * i,
                `%"></xg-drag>
        </div>
      </xg-slider>
    </xg-icon>`
              );
            }
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "volume";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return {
              position: Lh.CONTROLS_RIGHT,
              index: 1,
              disable: !1,
              showValueLabel: !1,
              default: 0.6,
              miniVolume: 0.2,
            };
          },
        },
      ]
    ),
    n
  );
})();
function WMt() {
  return new DOMParser().parseFromString(
    `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path fill-rule="evenodd" clip-rule="evenodd"
    d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"
    fill="white" />
</svg>`,
    "image/svg+xml"
  ).firstChild;
}
function KMt() {
  return new DOMParser().parseFromString(
    `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  <path fill-rule="evenodd" clip-rule="evenodd"
    d="M16.5 4.3H3.5C3.38954 4.3 3.3 4.38954 3.3 4.5V15.5C3.3 15.6105 3.38954 15.7 3.5 15.7H8.50005L8.50006 17.5H3.5C2.39543 17.5 1.5 16.6046 1.5 15.5V4.5C1.5 3.39543 2.39543 2.5 3.5 2.5H16.5C17.6046 2.5 18.5 3.39543 18.5 4.5V8.5H16.7V4.5C16.7 4.38954 16.6105 4.3 16.5 4.3ZM12 11.5C11.4477 11.5 11 11.9477 11 12.5L11 16.5C11 17.0523 11.4478 17.5 12 17.5H17.5C18.0523 17.5 18.5 17.0523 18.5 16.5L18.5 12.5C18.5 11.9477 18.0523 11.5 17.5 11.5H12Z"
    fill="white" />
  <path fill-rule="evenodd" clip-rule="evenodd"
    d="M9.4998 7.7C9.77595 7.7 9.9998 7.47614 9.9998 7.2V6.5C9.9998 6.22386 9.77595 6 9.4998 6H5.5402L5.52754 6.00016H5.5C5.22386 6.00016 5 6.22401 5 6.50016V10.4598C5 10.7359 5.22386 10.9598 5.5 10.9598H6.2C6.47614 10.9598 6.7 10.7359 6.7 10.4598V8.83005L8.76983 10.9386C8.96327 11.1357 9.27984 11.1386 9.47691 10.9451L9.97645 10.4548C10.1735 10.2613 10.1764 9.94476 9.983 9.7477L7.97289 7.7H9.4998Z"
    fill="white" />
</svg>`,
    "image/svg+xml"
  ).firstChild;
}
var DA = {
    PIP: "picture-in-picture",
    INLINE: "inline",
    FULLSCREEN: "fullscreen",
  },
  ZMt = (function (t) {
    ju(n, Dse);
    var e = Wu(n);
    function n() {
      var r, i;
      Hs(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        Va(
          Oi((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "switchPIP",
          function (c) {
            if (!i.isPIPAvailable()) return !1;
            c.stopPropagation && c.stopPropagation(),
              i.isPip
                ? (i.exitPIP(),
                  i.emitUserAction(c, "change_pip", {
                    props: "pip",
                    from: !0,
                    to: !1,
                  }),
                  i.setAttr("data-state", "normal"))
                : i.player.media.readyState === 4 &&
                  (i.requestPIP(),
                  i.emitUserAction(c, "change_pip", {
                    props: "pip",
                    from: !1,
                    to: !0,
                  }),
                  i.setAttr("data-state", "pip"));
          }
        ),
        i
      );
    }
    return (
      Xs(
        n,
        [
          {
            key: "beforeCreate",
            value: function (r) {
              typeof r.player.config.pip == "boolean" &&
                (r.config.showIcon = r.player.config.pip);
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r = this;
              this.isPIPAvailable() &&
                (Al(el(n.prototype), "afterCreate", this).call(this),
                (this.pMode = DA.INLINE),
                this.initPipEvents(),
                this.config.showIcon && this.initIcons(),
                this.once(Y9, function () {
                  r.config.showIcon &&
                    (Pt.removeClass(
                      ji(r).call(r, ".xgplayer-icon"),
                      "xg-icon-disable"
                    ),
                    r.bind("click", r.switchPIP));
                }));
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return {
                pipIcon: { icon: WMt, class: "xg-get-pip" },
                pipIconExit: { icon: KMt, class: "xg-exit-pip" },
              };
            },
          },
          {
            key: "initIcons",
            value: function () {
              var r = this.icons;
              this.appendChild(".xgplayer-icon", r.pipIcon),
                this.appendChild(".xgplayer-icon", r.pipIconExit);
            },
          },
          {
            key: "initPipEvents",
            value: function () {
              var r = this,
                i = this.player;
              (this.leavePIPCallback = function () {
                var o = i.paused;
                Pt.setTimeout(
                  r,
                  function () {
                    !o && i.mediaPlay();
                  },
                  0
                ),
                  !o && i.mediaPlay(),
                  r.setAttr("data-state", "normal"),
                  (r.pipWindow = null),
                  i.emit(q6, !1);
              }),
                (this.enterPIPCallback = function (o) {
                  i.emit(q6, !0),
                    o != null &&
                      o.pictureInPictureWindow &&
                      (r.pipWindow = o.pictureInPictureWindow),
                    r.setAttr("data-state", "pip");
                }),
                (this.onWebkitpresentationmodechanged = function (o) {
                  var l = i.media.webkitPresentationMode;
                  r.pMode === DA.FULLSCREEN &&
                    l !== DA.FULLSCREEN &&
                    i.onFullscreenChange(null, !1),
                    (r.pMode = l),
                    l === DA.PIP
                      ? r.enterPIPCallback(o)
                      : l === DA.INLINE && r.leavePIPCallback(o);
                }),
                i.media &&
                  (i.media.addEventListener(
                    "enterpictureinpicture",
                    this.enterPIPCallback
                  ),
                  i.media.addEventListener(
                    "leavepictureinpicture",
                    this.leavePIPCallback
                  ),
                  n.checkWebkitSetPresentationMode(i.media) &&
                    i.media.addEventListener(
                      "webkitpresentationmodechanged",
                      this.onWebkitpresentationmodechanged
                    ));
            },
          },
          {
            key: "copyStyleIntoPiPWindow",
            value: function (r) {
              var i,
                o,
                l = _r(
                  (i = On((o = H1(document.styleSheets))).call(o, function (c) {
                    try {
                      var d;
                      return On((d = H1(c.cssRules)))
                        .call(d, function (f) {
                          return f.cssText;
                        })
                        .join("");
                    } catch {
                      var h = document.createElement("link");
                      (h.rel = "stylesheet"),
                        (h.type = c.type),
                        (h.media = c.media),
                        (h.href = c.href),
                        r.document.head.appendChild(h);
                    }
                    return "";
                  }))
                ).call(i, Boolean).join(`
`),
                u = document.createElement("style");
              (u.textContent = l), r.document.head.appendChild(u);
            },
          },
          {
            key: "requestPIP",
            value: function () {
              var r = this,
                i = this.player,
                o = this.playerConfig,
                l = this.config;
              if (this.isPIPAvailable() && !this.isPip)
                try {
                  var u = o.poster;
                  if (
                    (u &&
                      (i.media.poster =
                        Pt.typeOf(u) === "String" ? u : u.poster),
                    l.preferDocument && this.isDocPIPAvailable())
                  ) {
                    var c = {};
                    if (l.width && l.height)
                      (c.width = l.width), (c.height = l.height);
                    else {
                      var d = i.root.getBoundingClientRect();
                      (c.width = d.width), (c.height = d.height);
                    }
                    documentPictureInPicture
                      .requestWindow(c)
                      .then(function (h) {
                        var f = l.docPiPNode,
                          p = l.docPiPStyle;
                        r.enterPIPCallback();
                        var g = f || i.root,
                          y = g.parentElement,
                          v = g.previousSibling,
                          b = g.nextSibling;
                        r.copyStyleIntoPiPWindow(h);
                        var w = document.createElement("style");
                        if ((w.append("body{padding:0; margin:0;}"), p)) {
                          var k = "";
                          typeof p == "string"
                            ? (k = p)
                            : typeof p == "function" && (k = p.call(l)),
                            k && w.append(k);
                        } else
                          g === i.root &&
                            w.append(`
              .xgplayer{width: 100%!important; height: 100%!important;}
            `);
                        h.document.head.append(w),
                          h.document.body.append(g),
                          h.addEventListener(
                            "pagehide",
                            function (D) {
                              y &&
                                (b
                                  ? y.insertBefore(g, b)
                                  : v
                                  ? y.insertBefore(g, v.nextSibling)
                                  : y.appendChild(g)),
                                r.leavePIPCallback();
                            },
                            { once: !0 }
                          );
                      });
                  } else
                    n.checkWebkitSetPresentationMode(i.media)
                      ? i.media.webkitSetPresentationMode("picture-in-picture")
                      : i.media.requestPictureInPicture();
                  return !0;
                } catch (h) {
                  return console.error("requestPiP", h), !1;
                }
            },
          },
          {
            key: "exitPIP",
            value: function () {
              var r = this.player;
              try {
                var i;
                return (
                  this.isPIPAvailable() &&
                    this.isPip &&
                    (this.isDocPIPAvailable() &&
                    (i = documentPictureInPicture) !== null &&
                    i !== void 0 &&
                    i.window
                      ? documentPictureInPicture.window.close()
                      : n.checkWebkitSetPresentationMode(r.media)
                      ? r.media.webkitSetPresentationMode("inline")
                      : document.exitPictureInPicture()),
                  !0
                );
              } catch (o) {
                return console.error("exitPIP", o), !1;
              }
            },
          },
          {
            key: "isPip",
            get: function () {
              var r,
                i = this.player;
              return (
                !(
                  !this.isDocPIPAvailable() ||
                  (r = documentPictureInPicture) === null ||
                  r === void 0 ||
                  !r.window
                ) ||
                (document.pictureInPictureElement &&
                  document.pictureInPictureElement === i.media) ||
                i.media.webkitPresentationMode === DA.PIP
              );
            },
          },
          {
            key: "isPIPAvailable",
            value: function () {
              var r = this.player.media;
              return (
                (Pt.typeOf(document.pictureInPictureEnabled) === "Boolean" &&
                  document.pictureInPictureEnabled &&
                  ((Pt.typeOf(r.disablePictureInPicture) === "Boolean" &&
                    !r.disablePictureInPicture) ||
                    (r.webkitSupportsPresentationMode &&
                      Pt.typeOf(r.webkitSetPresentationMode) ===
                        "Function"))) ||
                this.isDocPIPAvailable()
              );
            },
          },
          {
            key: "isDocPIPAvailable",
            value: function () {
              return (
                "documentPictureInPicture" in window &&
                /^(https|file)/.test(location.protocol)
              );
            },
          },
          {
            key: "destroy",
            value: function () {
              Al(el(n.prototype), "destroy", this).call(this);
              var r = this.player;
              r.media.removeEventListener(
                "enterpictureinpicture",
                this.enterPIPCallback
              ),
                r.media.removeEventListener(
                  "leavepictureinpicture",
                  this.leavePIPCallback
                ),
                n.checkWebkitSetPresentationMode(r.media) &&
                  r.media.removeEventListener(
                    "webkitpresentationmodechanged",
                    this.onWebkitpresentationmodechanged
                  ),
                this.exitPIP(),
                this.unbind("click", this.btnClick);
            },
          },
          {
            key: "render",
            value: function () {
              if (this.config.showIcon && this.isPIPAvailable())
                return `<xg-icon class="xgplayer-pip">
      <div class="xgplayer-icon xg-icon-disable">
      </div>
      `.concat(
                  q9(this, "PIP", this.playerConfig.isHideTips),
                  `
    </xg-icon>`
                );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "pip";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                position: Lh.CONTROLS_RIGHT,
                index: 6,
                showIcon: !1,
                preferDocument: !1,
                width: void 0,
                height: void 0,
                docPiPNode: void 0,
                docPiPStyle: void 0,
              };
            },
          },
          {
            key: "checkWebkitSetPresentationMode",
            value: function (r) {
              return typeof r.webkitSetPresentationMode == "function";
            },
          },
        ]
      ),
      n
    );
  })(),
  YMt = So,
  QMt = nl,
  JMt = wu,
  sye = eNe,
  qMt = QMt("iterator"),
  Pse = !YMt(function () {
    var t = new URL("b?a=1&b=2&c=3", "http://a"),
      e = t.searchParams,
      n = "";
    return (
      (t.pathname = "c%20d"),
      e.forEach(function (r, i) {
        e.delete("b"), (n += i + r);
      }),
      (sye && !t.toJSON) ||
        (!e.size && (sye || !JMt)) ||
        !e.sort ||
        t.href !== "http://a/c%20d?a=1&c=3" ||
        e.get("c") !== "3" ||
        String(new URLSearchParams("?a=1")) !== "a=1" ||
        !e[qMt] ||
        new URL("https://a@b").username !== "a" ||
        new URLSearchParams(new URLSearchParams("a=b")).get("a") !== "b" ||
        new URL("http://тест").host !== "xn--e1aybc" ||
        new URL("http://a#б").hash !== "#%D0%B1" ||
        n !== "a1c3" ||
        new URL("http://x", void 0).host !== "x"
    );
  }),
  yR = Bo,
  eV = 2147483647,
  XC = 36,
  SUe = 1,
  wee = 26,
  eCt = 38,
  tCt = 700,
  nCt = 72,
  rCt = 128,
  iCt = "-",
  aCt = /[^\0-\u007E]/,
  RUe = /[.\u3002\uFF0E\uFF61]/g,
  lye = "Overflow: input needs wider integers to process",
  tV = XC - SUe,
  uye = RangeError,
  oCt = yR(RUe.exec),
  dk = Math.floor,
  nV = String.fromCharCode,
  cye = yR("".charCodeAt),
  AUe = yR([].join),
  IT = yR([].push),
  sCt = yR("".replace),
  lCt = yR("".split),
  uCt = yR("".toLowerCase),
  cCt = function (t) {
    for (var e = [], n = 0, r = t.length; n < r; ) {
      var i = cye(t, n++);
      if (i >= 55296 && i <= 56319 && n < r) {
        var o = cye(t, n++);
        (64512 & o) == 56320
          ? IT(e, ((1023 & i) << 10) + (1023 & o) + 65536)
          : (IT(e, i), n--);
      } else IT(e, i);
    }
    return e;
  },
  dye = function (t) {
    return t + 22 + 75 * (t < 26);
  },
  dCt = function (t, e, n) {
    var r = 0;
    for (t = n ? dk(t / tCt) : t >> 1, t += dk(t / e); t > (tV * wee) >> 1; )
      (t = dk(t / tV)), (r += XC);
    return dk(r + ((tV + 1) * t) / (t + eCt));
  },
  hCt = function (t) {
    var e,
      n,
      r = [],
      i = (t = cCt(t)).length,
      o = rCt,
      l = 0,
      u = nCt;
    for (e = 0; e < t.length; e++) (n = t[e]) < 128 && IT(r, nV(n));
    var c = r.length,
      d = c;
    for (c && IT(r, iCt); d < i; ) {
      var h = eV;
      for (e = 0; e < t.length; e++) (n = t[e]) >= o && n < h && (h = n);
      var f = d + 1;
      if (h - o > dk((eV - l) / f)) throw uye(lye);
      for (l += (h - o) * f, o = h, e = 0; e < t.length; e++) {
        if ((n = t[e]) < o && ++l > eV) throw uye(lye);
        if (n == o) {
          for (var p = l, g = XC; ; ) {
            var y = g <= u ? SUe : g >= u + wee ? wee : g - u;
            if (p < y) break;
            var v = p - y,
              b = XC - y;
            IT(r, nV(dye(y + (v % b)))), (p = dk(v / b)), (g += XC);
          }
          IT(r, nV(dye(p))), (u = dCt(l, f, d == c)), (l = 0), d++;
        }
      }
      l++, o++;
    }
    return AUe(r, "");
  },
  fCt = function (t) {
    var e,
      n,
      r = [],
      i = lCt(sCt(uCt(t), RUe, "."), ".");
    for (e = 0; e < i.length; e++)
      (n = i[e]), IT(r, oCt(aCt, n) ? "xn--" + hCt(n) : n);
    return AUe(r, ".");
  },
  rV = ur,
  LI = yl,
  ZG = ts,
  fv = Bo,
  hk = wu,
  hye = Pse,
  fye = TE,
  pCt = VL,
  gCt = m6e,
  mCt = hb,
  yCt = VNe,
  Mse = EE,
  wUe = JL,
  iV = vl,
  vCt = kl,
  bCt = Iu,
  _Ct = L0,
  TCt = xc,
  kUe = Bl,
  Ap = td,
  ECt = _E,
  pye = mE,
  kee = zoe,
  SCt = YL,
  PA = V9,
  RCt = nl,
  ACt = Z6e,
  wCt = RCt("iterator"),
  bx = "URLSearchParams",
  IUe = bx + "Iterator",
  DUe = Mse.set,
  Bg = Mse.getterFor(bx),
  kCt = Mse.getterFor(IUe),
  ICt = Object.getOwnPropertyDescriptor,
  Cse = function (t) {
    if (!hk) return LI[t];
    var e = ICt(LI, t);
    return e && e.value;
  },
  gye = Cse("fetch"),
  aU = Cse("Request"),
  VC = Cse("Headers"),
  aV = aU && aU.prototype,
  mye = VC && VC.prototype,
  DCt = LI.RegExp,
  PCt = LI.TypeError,
  PUe = LI.decodeURIComponent,
  MCt = LI.encodeURIComponent,
  CCt = fv("".charAt),
  yye = fv([].join),
  fS = fv([].push),
  Iee = fv("".replace),
  $Ct = fv([].shift),
  vye = fv([].splice),
  bye = fv("".split),
  xCt = fv("".slice),
  LCt = /\+/g,
  _ye = Array(4),
  OCt = function (t) {
    return (
      _ye[t - 1] || (_ye[t - 1] = DCt("((?:%[\\da-f]{2}){" + t + "})", "gi"))
    );
  },
  GCt = function (t) {
    try {
      return PUe(t);
    } catch {
      return t;
    }
  },
  Tye = function (t) {
    var e = Iee(t, LCt, " "),
      n = 4;
    try {
      return PUe(e);
    } catch {
      for (; n; ) e = Iee(e, OCt(n--), GCt);
      return e;
    }
  },
  NCt = /[!'()~]|%20/g,
  FCt = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
  },
  UCt = function (t) {
    return FCt[t];
  },
  Eye = function (t) {
    return Iee(MCt(t), NCt, UCt);
  },
  oV = yCt(
    function (t, e) {
      DUe(this, { type: IUe, iterator: kee(Bg(t).entries), kind: e });
    },
    "Iterator",
    function () {
      var t = kCt(this),
        e = t.kind,
        n = t.iterator.next(),
        r = n.value;
      return (
        n.done ||
          (n.value =
            e === "keys" ? r.key : e === "values" ? r.value : [r.key, r.value]),
        n
      );
    },
    !0
  ),
  MUe = function (t) {
    (this.entries = []),
      (this.url = null),
      t !== void 0 &&
        (kUe(t)
          ? this.parseObject(t)
          : this.parseQuery(
              typeof t == "string" ? (CCt(t, 0) === "?" ? xCt(t, 1) : t) : Ap(t)
            ));
  };
MUe.prototype = {
  type: bx,
  bindURL: function (t) {
    (this.url = t), this.update();
  },
  parseObject: function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = SCt(t);
    if (c)
      for (n = (e = kee(t, c)).next; !(r = ZG(n, e)).done; ) {
        if (
          ((o = (i = kee(TCt(r.value))).next),
          (l = ZG(o, i)).done || (u = ZG(o, i)).done || !ZG(o, i).done)
        )
          throw PCt("Expected sequence with length 2");
        fS(this.entries, { key: Ap(l.value), value: Ap(u.value) });
      }
    else
      for (var d in t)
        vCt(t, d) && fS(this.entries, { key: d, value: Ap(t[d]) });
  },
  parseQuery: function (t) {
    if (t)
      for (var e, n, r = bye(t, "&"), i = 0; i < r.length; )
        (e = r[i++]).length &&
          ((n = bye(e, "=")),
          fS(this.entries, { key: Tye($Ct(n)), value: Tye(yye(n, "=")) }));
  },
  serialize: function () {
    for (var t, e = this.entries, n = [], r = 0; r < e.length; )
      (t = e[r++]), fS(n, Eye(t.key) + "=" + Eye(t.value));
    return yye(n, "&");
  },
  update: function () {
    (this.entries.length = 0), this.parseQuery(this.url.query);
  },
  updateURL: function () {
    this.url && this.url.update();
  },
};
var oU = function () {
    wUe(this, jw);
    var t = DUe(this, new MUe(arguments.length > 0 ? arguments[0] : void 0));
    hk || (this.length = t.entries.length);
  },
  jw = oU.prototype;
if (
  (gCt(
    jw,
    {
      append: function (t, e) {
        PA(arguments.length, 2);
        var n = Bg(this);
        fS(n.entries, { key: Ap(t), value: Ap(e) }),
          hk || this.length++,
          n.updateURL();
      },
      delete: function (t) {
        PA(arguments.length, 1);
        for (var e = Bg(this), n = e.entries, r = Ap(t), i = 0; i < n.length; )
          n[i].key === r ? vye(n, i, 1) : i++;
        hk || (this.length = n.length), e.updateURL();
      },
      get: function (t) {
        PA(arguments.length, 1);
        for (var e = Bg(this).entries, n = Ap(t), r = 0; r < e.length; r++)
          if (e[r].key === n) return e[r].value;
        return null;
      },
      getAll: function (t) {
        PA(arguments.length, 1);
        for (
          var e = Bg(this).entries, n = Ap(t), r = [], i = 0;
          i < e.length;
          i++
        )
          e[i].key === n && fS(r, e[i].value);
        return r;
      },
      has: function (t) {
        PA(arguments.length, 1);
        for (var e = Bg(this).entries, n = Ap(t), r = 0; r < e.length; )
          if (e[r++].key === n) return !0;
        return !1;
      },
      set: function (t, e) {
        PA(arguments.length, 1);
        for (
          var n,
            r = Bg(this),
            i = r.entries,
            o = !1,
            l = Ap(t),
            u = Ap(e),
            c = 0;
          c < i.length;
          c++
        )
          (n = i[c]).key === l &&
            (o ? vye(i, c--, 1) : ((o = !0), (n.value = u)));
        o || fS(i, { key: l, value: u }),
          hk || (this.length = i.length),
          r.updateURL();
      },
      sort: function () {
        var t = Bg(this);
        ACt(t.entries, function (e, n) {
          return e.key > n.key ? 1 : -1;
        }),
          t.updateURL();
      },
      forEach: function (t) {
        for (
          var e,
            n = Bg(this).entries,
            r = bCt(t, arguments.length > 1 ? arguments[1] : void 0),
            i = 0;
          i < n.length;

        )
          r((e = n[i++]).value, e.key, this);
      },
      keys: function () {
        return new oV(this, "keys");
      },
      values: function () {
        return new oV(this, "values");
      },
      entries: function () {
        return new oV(this, "entries");
      },
    },
    { enumerable: !0 }
  ),
  fye(jw, wCt, jw.entries, { name: "entries" }),
  fye(
    jw,
    "toString",
    function () {
      return Bg(this).serialize();
    },
    { enumerable: !0 }
  ),
  hk &&
    pCt(jw, "size", {
      get: function () {
        return Bg(this).entries.length;
      },
      configurable: !0,
      enumerable: !0,
    }),
  mCt(oU, bx),
  rV({ global: !0, constructor: !0, forced: !hye }, { URLSearchParams: oU }),
  !hye && iV(VC))
) {
  var BCt = fv(mye.has),
    HCt = fv(mye.set),
    Sye = function (t) {
      if (kUe(t)) {
        var e,
          n = t.body;
        if (_Ct(n) === bx)
          return (
            (e = t.headers ? new VC(t.headers) : new VC()),
            BCt(e, "content-type") ||
              HCt(
                e,
                "content-type",
                "application/x-www-form-urlencoded;charset=UTF-8"
              ),
            ECt(t, { body: pye(0, Ap(n)), headers: pye(0, e) })
          );
      }
      return t;
    };
  if (
    (iV(gye) &&
      rV(
        { global: !0, enumerable: !0, dontCallGetSet: !0, forced: !0 },
        {
          fetch: function (t) {
            return gye(t, arguments.length > 1 ? Sye(arguments[1]) : {});
          },
        }
      ),
    iV(aU))
  ) {
    var sV = function (t) {
      return (
        wUe(this, aV), new aU(t, arguments.length > 1 ? Sye(arguments[1]) : {})
      );
    };
    (aV.constructor = sV),
      (sV.prototype = aV),
      rV(
        { global: !0, constructor: !0, dontCallGetSet: !0, forced: !0 },
        { Request: sV }
      );
  }
}
var Rg,
  XCt = { URLSearchParams: oU, getState: Bg },
  VCt = ur,
  $se = wu,
  zCt = Pse,
  xse = yl,
  Rye = Iu,
  ym = Bo,
  YG = TE,
  Ag = VL,
  jCt = JL,
  Dee = kl,
  Lse = P6e,
  MA = VFe,
  Qm = Ooe,
  WCt = QNe.codeAt,
  KCt = fCt,
  f1 = td,
  ZCt = hb,
  YCt = V9,
  CUe = XCt,
  $Ue = EE,
  QCt = $Ue.set,
  sU = $Ue.getterFor("URL"),
  JCt = CUe.URLSearchParams,
  qCt = CUe.getState,
  YP = xse.URL,
  Pee = xse.TypeError,
  lU = xse.parseInt,
  e$t = Math.floor,
  Aye = Math.pow,
  Qg = ym("".charAt),
  _0 = ym(/./.exec),
  eC = ym([].join),
  t$t = ym((1).toString),
  n$t = ym([].pop),
  Ww = ym([].push),
  lV = ym("".replace),
  r$t = ym([].shift),
  i$t = ym("".split),
  zC = ym("".slice),
  uU = ym("".toLowerCase),
  a$t = ym([].unshift),
  o$t = "Invalid authority",
  uV = "Invalid scheme",
  E2 = "Invalid host",
  wye = "Invalid port",
  xUe = /[a-z]/i,
  s$t = /[\d+-.a-z]/i,
  Mee = /\d/,
  l$t = /^0x/i,
  u$t = /^[0-7]+$/,
  c$t = /^\d+$/,
  LUe = /^[\da-f]+$/i,
  d$t = /[\0\t\n\r #%/:<>?@[\\\]^|]/,
  h$t = /[\0\t\n\r #/:<>?@[\\\]^|]/,
  f$t = /^[\u0000-\u0020]+/,
  p$t = /(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,
  g$t = /[\t\n\r]/g,
  m$t = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = i$t(t, ".");
    if ((c.length && c[c.length - 1] == "" && c.length--, (e = c.length) > 4))
      return t;
    for (n = [], r = 0; r < e; r++) {
      if ((i = c[r]) == "") return t;
      if (
        ((o = 10),
        i.length > 1 &&
          Qg(i, 0) == "0" &&
          ((o = _0(l$t, i) ? 16 : 8), (i = zC(i, o == 8 ? 1 : 2))),
        i === "")
      )
        l = 0;
      else {
        if (!_0(o == 10 ? c$t : o == 8 ? u$t : LUe, i)) return t;
        l = lU(i, o);
      }
      Ww(n, l);
    }
    for (r = 0; r < e; r++)
      if (((l = n[r]), r == e - 1)) {
        if (l >= Aye(256, 5 - e)) return null;
      } else if (l > 255) return null;
    for (u = n$t(n), r = 0; r < n.length; r++) u += n[r] * Aye(256, 3 - r);
    return u;
  },
  y$t = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = [0, 0, 0, 0, 0, 0, 0, 0],
      d = 0,
      h = null,
      f = 0,
      p = function () {
        return Qg(t, f);
      };
    if (p() == ":") {
      if (Qg(t, 1) != ":") return;
      (f += 2), (h = ++d);
    }
    for (; p(); ) {
      if (d == 8) return;
      if (p() != ":") {
        for (e = n = 0; n < 4 && _0(LUe, p()); )
          (e = 16 * e + lU(p(), 16)), f++, n++;
        if (p() == ".") {
          if (n == 0 || ((f -= n), d > 6)) return;
          for (r = 0; p(); ) {
            if (((i = null), r > 0)) {
              if (!(p() == "." && r < 4)) return;
              f++;
            }
            if (!_0(Mee, p())) return;
            for (; _0(Mee, p()); ) {
              if (((o = lU(p(), 10)), i === null)) i = o;
              else {
                if (i == 0) return;
                i = 10 * i + o;
              }
              if (i > 255) return;
              f++;
            }
            (c[d] = 256 * c[d] + i), (++r != 2 && r != 4) || d++;
          }
          if (r != 4) return;
          break;
        }
        if (p() == ":") {
          if ((f++, !p())) return;
        } else if (p()) return;
        c[d++] = e;
      } else {
        if (h !== null) return;
        f++, (h = ++d);
      }
    }
    if (h !== null)
      for (l = d - h, d = 7; d != 0 && l > 0; )
        (u = c[d]), (c[d--] = c[h + l - 1]), (c[h + --l] = u);
    else if (d != 8) return;
    return c;
  },
  v$t = function (t) {
    for (var e = null, n = 1, r = null, i = 0, o = 0; o < 8; o++)
      t[o] !== 0
        ? (i > n && ((e = r), (n = i)), (r = null), (i = 0))
        : (r === null && (r = o), ++i);
    return i > n && ((e = r), (n = i)), e;
  },
  QP = function (t) {
    var e, n, r, i;
    if (typeof t == "number") {
      for (e = [], n = 0; n < 4; n++) a$t(e, t % 256), (t = e$t(t / 256));
      return eC(e, ".");
    }
    if (typeof t == "object") {
      for (e = "", r = v$t(t), n = 0; n < 8; n++)
        (i && t[n] === 0) ||
          (i && (i = !1),
          r === n
            ? ((e += n ? ":" : "::"), (i = !0))
            : ((e += t$t(t[n], 16)), n < 7 && (e += ":")));
      return "[" + e + "]";
    }
    return t;
  },
  bF = {},
  OUe = Lse({}, bF, { " ": 1, '"': 1, "<": 1, ">": 1, "`": 1 }),
  GUe = Lse({}, OUe, { "#": 1, "?": 1, "{": 1, "}": 1 }),
  cV = Lse({}, GUe, {
    "/": 1,
    ":": 1,
    ";": 1,
    "=": 1,
    "@": 1,
    "[": 1,
    "\\": 1,
    "]": 1,
    "^": 1,
    "|": 1,
  }),
  F_ = function (t, e) {
    var n = WCt(t, 0);
    return n > 32 && n < 127 && !Dee(e, t) ? t : encodeURIComponent(t);
  },
  QG = { ftp: 21, file: null, http: 80, https: 443, ws: 80, wss: 443 },
  tC = function (t, e) {
    var n;
    return (
      t.length == 2 &&
      _0(xUe, Qg(t, 0)) &&
      ((n = Qg(t, 1)) == ":" || (!e && n == "|"))
    );
  },
  kye = function (t) {
    var e;
    return (
      t.length > 1 &&
      tC(zC(t, 0, 2)) &&
      (t.length == 2 ||
        (e = Qg(t, 2)) === "/" ||
        e === "\\" ||
        e === "?" ||
        e === "#")
    );
  },
  b$t = function (t) {
    return t === "." || uU(t) === "%2e";
  },
  _$t = function (t) {
    return (
      (t = uU(t)) === ".." || t === "%2e." || t === ".%2e" || t === "%2e%2e"
    );
  },
  dV = {},
  Iye = {},
  hV = {},
  Dye = {},
  Pye = {},
  fV = {},
  Mye = {},
  Cye = {},
  JG = {},
  qG = {},
  pV = {},
  gV = {},
  mV = {},
  yV = {},
  $ye = {},
  vV = {},
  CA = {},
  py = {},
  xye = {},
  S2 = {},
  o1 = {},
  Ose = function (t, e, n) {
    var r,
      i,
      o,
      l = f1(t);
    if (e) {
      if ((i = this.parse(l))) throw Pee(i);
      this.searchParams = null;
    } else {
      if ((n !== void 0 && (r = new Ose(n, !0)), (i = this.parse(l, null, r))))
        throw Pee(i);
      (o = qCt(new JCt())).bindURL(this), (this.searchParams = o);
    }
  };
Ose.prototype = {
  type: "URL",
  parse: function (t, e, n) {
    var r,
      i,
      o,
      l,
      u = this,
      c = e || dV,
      d = 0,
      h = "",
      f = !1,
      p = !1,
      g = !1;
    for (
      t = f1(t),
        e ||
          ((u.scheme = ""),
          (u.username = ""),
          (u.password = ""),
          (u.host = null),
          (u.port = null),
          (u.path = []),
          (u.query = null),
          (u.fragment = null),
          (u.cannotBeABaseURL = !1),
          (t = lV(t, f$t, "")),
          (t = lV(t, p$t, "$1"))),
        t = lV(t, g$t, ""),
        r = MA(t);
      d <= r.length;

    ) {
      switch (((i = r[d]), c)) {
        case dV:
          if (!i || !_0(xUe, i)) {
            if (e) return uV;
            c = hV;
            continue;
          }
          (h += uU(i)), (c = Iye);
          break;
        case Iye:
          if (i && (_0(s$t, i) || i == "+" || i == "-" || i == ".")) h += uU(i);
          else {
            if (i != ":") {
              if (e) return uV;
              (h = ""), (c = hV), (d = 0);
              continue;
            }
            if (
              e &&
              (u.isSpecial() != Dee(QG, h) ||
                (h == "file" && (u.includesCredentials() || u.port !== null)) ||
                (u.scheme == "file" && !u.host))
            )
              return;
            if (((u.scheme = h), e))
              return void (
                u.isSpecial() &&
                QG[u.scheme] == u.port &&
                (u.port = null)
              );
            (h = ""),
              u.scheme == "file"
                ? (c = yV)
                : u.isSpecial() && n && n.scheme == u.scheme
                ? (c = Dye)
                : u.isSpecial()
                ? (c = Cye)
                : r[d + 1] == "/"
                ? ((c = Pye), d++)
                : ((u.cannotBeABaseURL = !0), Ww(u.path, ""), (c = xye));
          }
          break;
        case hV:
          if (!n || (n.cannotBeABaseURL && i != "#")) return uV;
          if (n.cannotBeABaseURL && i == "#") {
            (u.scheme = n.scheme),
              (u.path = Qm(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (u.cannotBeABaseURL = !0),
              (c = o1);
            break;
          }
          c = n.scheme == "file" ? yV : fV;
          continue;
        case Dye:
          if (i != "/" || r[d + 1] != "/") {
            c = fV;
            continue;
          }
          (c = JG), d++;
          break;
        case Pye:
          if (i == "/") {
            c = qG;
            break;
          }
          c = py;
          continue;
        case fV:
          if (((u.scheme = n.scheme), i == Rg))
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = Qm(n.path)),
              (u.query = n.query);
          else if (i == "/" || (i == "\\" && u.isSpecial())) c = Mye;
          else if (i == "?")
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = Qm(n.path)),
              (u.query = ""),
              (c = S2);
          else {
            if (i != "#") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (u.path = Qm(n.path)),
                u.path.length--,
                (c = py);
              continue;
            }
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = Qm(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (c = o1);
          }
          break;
        case Mye:
          if (!u.isSpecial() || (i != "/" && i != "\\")) {
            if (i != "/") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (c = py);
              continue;
            }
            c = qG;
          } else c = JG;
          break;
        case Cye:
          if (((c = JG), i != "/" || Qg(h, d + 1) != "/")) continue;
          d++;
          break;
        case JG:
          if (i != "/" && i != "\\") {
            c = qG;
            continue;
          }
          break;
        case qG:
          if (i == "@") {
            f && (h = "%40" + h), (f = !0), (o = MA(h));
            for (var y = 0; y < o.length; y++) {
              var v = o[y];
              if (v != ":" || g) {
                var b = F_(v, cV);
                g ? (u.password += b) : (u.username += b);
              } else g = !0;
            }
            h = "";
          } else if (
            i == Rg ||
            i == "/" ||
            i == "?" ||
            i == "#" ||
            (i == "\\" && u.isSpecial())
          ) {
            if (f && h == "") return o$t;
            (d -= MA(h).length + 1), (h = ""), (c = pV);
          } else h += i;
          break;
        case pV:
        case gV:
          if (e && u.scheme == "file") {
            c = vV;
            continue;
          }
          if (i != ":" || p) {
            if (
              i == Rg ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial())
            ) {
              if (u.isSpecial() && h == "") return E2;
              if (e && h == "" && (u.includesCredentials() || u.port !== null))
                return;
              if ((l = u.parseHost(h))) return l;
              if (((h = ""), (c = CA), e)) return;
              continue;
            }
            i == "[" ? (p = !0) : i == "]" && (p = !1), (h += i);
          } else {
            if (h == "") return E2;
            if ((l = u.parseHost(h))) return l;
            if (((h = ""), (c = mV), e == gV)) return;
          }
          break;
        case mV:
          if (!_0(Mee, i)) {
            if (
              i == Rg ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial()) ||
              e
            ) {
              if (h != "") {
                var w = lU(h, 10);
                if (w > 65535) return wye;
                (u.port = u.isSpecial() && w === QG[u.scheme] ? null : w),
                  (h = "");
              }
              if (e) return;
              c = CA;
              continue;
            }
            return wye;
          }
          h += i;
          break;
        case yV:
          if (((u.scheme = "file"), i == "/" || i == "\\")) c = $ye;
          else {
            if (!n || n.scheme != "file") {
              c = py;
              continue;
            }
            if (i == Rg)
              (u.host = n.host), (u.path = Qm(n.path)), (u.query = n.query);
            else if (i == "?")
              (u.host = n.host),
                (u.path = Qm(n.path)),
                (u.query = ""),
                (c = S2);
            else {
              if (i != "#") {
                kye(eC(Qm(r, d), "")) ||
                  ((u.host = n.host), (u.path = Qm(n.path)), u.shortenPath()),
                  (c = py);
                continue;
              }
              (u.host = n.host),
                (u.path = Qm(n.path)),
                (u.query = n.query),
                (u.fragment = ""),
                (c = o1);
            }
          }
          break;
        case $ye:
          if (i == "/" || i == "\\") {
            c = vV;
            break;
          }
          n &&
            n.scheme == "file" &&
            !kye(eC(Qm(r, d), "")) &&
            (tC(n.path[0], !0) ? Ww(u.path, n.path[0]) : (u.host = n.host)),
            (c = py);
          continue;
        case vV:
          if (i == Rg || i == "/" || i == "\\" || i == "?" || i == "#") {
            if (!e && tC(h)) c = py;
            else if (h == "") {
              if (((u.host = ""), e)) return;
              c = CA;
            } else {
              if ((l = u.parseHost(h))) return l;
              if ((u.host == "localhost" && (u.host = ""), e)) return;
              (h = ""), (c = CA);
            }
            continue;
          }
          h += i;
          break;
        case CA:
          if (u.isSpecial()) {
            if (((c = py), i != "/" && i != "\\")) continue;
          } else if (e || i != "?")
            if (e || i != "#") {
              if (i != Rg && ((c = py), i != "/")) continue;
            } else (u.fragment = ""), (c = o1);
          else (u.query = ""), (c = S2);
          break;
        case py:
          if (
            i == Rg ||
            i == "/" ||
            (i == "\\" && u.isSpecial()) ||
            (!e && (i == "?" || i == "#"))
          ) {
            if (
              (_$t(h)
                ? (u.shortenPath(),
                  i == "/" || (i == "\\" && u.isSpecial()) || Ww(u.path, ""))
                : b$t(h)
                ? i == "/" || (i == "\\" && u.isSpecial()) || Ww(u.path, "")
                : (u.scheme == "file" &&
                    !u.path.length &&
                    tC(h) &&
                    (u.host && (u.host = ""), (h = Qg(h, 0) + ":")),
                  Ww(u.path, h)),
              (h = ""),
              u.scheme == "file" && (i == Rg || i == "?" || i == "#"))
            )
              for (; u.path.length > 1 && u.path[0] === ""; ) r$t(u.path);
            i == "?"
              ? ((u.query = ""), (c = S2))
              : i == "#" && ((u.fragment = ""), (c = o1));
          } else h += F_(i, GUe);
          break;
        case xye:
          i == "?"
            ? ((u.query = ""), (c = S2))
            : i == "#"
            ? ((u.fragment = ""), (c = o1))
            : i != Rg && (u.path[0] += F_(i, bF));
          break;
        case S2:
          e || i != "#"
            ? i != Rg &&
              (i == "'" && u.isSpecial()
                ? (u.query += "%27")
                : (u.query += i == "#" ? "%23" : F_(i, bF)))
            : ((u.fragment = ""), (c = o1));
          break;
        case o1:
          i != Rg && (u.fragment += F_(i, OUe));
      }
      d++;
    }
  },
  parseHost: function (t) {
    var e, n, r;
    if (Qg(t, 0) == "[") {
      if (Qg(t, t.length - 1) != "]" || !(e = y$t(zC(t, 1, -1)))) return E2;
      this.host = e;
    } else if (this.isSpecial()) {
      if (((t = KCt(t)), _0(d$t, t) || (e = m$t(t)) === null)) return E2;
      this.host = e;
    } else {
      if (_0(h$t, t)) return E2;
      for (e = "", n = MA(t), r = 0; r < n.length; r++) e += F_(n[r], bF);
      this.host = e;
    }
  },
  cannotHaveUsernamePasswordPort: function () {
    return !this.host || this.cannotBeABaseURL || this.scheme == "file";
  },
  includesCredentials: function () {
    return this.username != "" || this.password != "";
  },
  isSpecial: function () {
    return Dee(QG, this.scheme);
  },
  shortenPath: function () {
    var t = this.path,
      e = t.length;
    !e || (this.scheme == "file" && e == 1 && tC(t[0], !0)) || t.length--;
  },
  serialize: function () {
    var t = this,
      e = t.scheme,
      n = t.username,
      r = t.password,
      i = t.host,
      o = t.port,
      l = t.path,
      u = t.query,
      c = t.fragment,
      d = e + ":";
    return (
      i !== null
        ? ((d += "//"),
          t.includesCredentials() && (d += n + (r ? ":" + r : "") + "@"),
          (d += QP(i)),
          o !== null && (d += ":" + o))
        : e == "file" && (d += "//"),
      (d += t.cannotBeABaseURL ? l[0] : l.length ? "/" + eC(l, "/") : ""),
      u !== null && (d += "?" + u),
      c !== null && (d += "#" + c),
      d
    );
  },
  setHref: function (t) {
    var e = this.parse(t);
    if (e) throw Pee(e);
    this.searchParams.update();
  },
  getOrigin: function () {
    var t = this.scheme,
      e = this.port;
    if (t == "blob")
      try {
        return new OI(t.path[0]).origin;
      } catch {
        return "null";
      }
    return t != "file" && this.isSpecial()
      ? t + "://" + QP(this.host) + (e !== null ? ":" + e : "")
      : "null";
  },
  getProtocol: function () {
    return this.scheme + ":";
  },
  setProtocol: function (t) {
    this.parse(f1(t) + ":", dV);
  },
  getUsername: function () {
    return this.username;
  },
  setUsername: function (t) {
    var e = MA(f1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.username = "";
      for (var n = 0; n < e.length; n++) this.username += F_(e[n], cV);
    }
  },
  getPassword: function () {
    return this.password;
  },
  setPassword: function (t) {
    var e = MA(f1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.password = "";
      for (var n = 0; n < e.length; n++) this.password += F_(e[n], cV);
    }
  },
  getHost: function () {
    var t = this.host,
      e = this.port;
    return t === null ? "" : e === null ? QP(t) : QP(t) + ":" + e;
  },
  setHost: function (t) {
    this.cannotBeABaseURL || this.parse(t, pV);
  },
  getHostname: function () {
    var t = this.host;
    return t === null ? "" : QP(t);
  },
  setHostname: function (t) {
    this.cannotBeABaseURL || this.parse(t, gV);
  },
  getPort: function () {
    var t = this.port;
    return t === null ? "" : f1(t);
  },
  setPort: function (t) {
    this.cannotHaveUsernamePasswordPort() ||
      ((t = f1(t)) == "" ? (this.port = null) : this.parse(t, mV));
  },
  getPathname: function () {
    var t = this.path;
    return this.cannotBeABaseURL ? t[0] : t.length ? "/" + eC(t, "/") : "";
  },
  setPathname: function (t) {
    this.cannotBeABaseURL || ((this.path = []), this.parse(t, CA));
  },
  getSearch: function () {
    var t = this.query;
    return t ? "?" + t : "";
  },
  setSearch: function (t) {
    (t = f1(t)) == ""
      ? (this.query = null)
      : (Qg(t, 0) == "?" && (t = zC(t, 1)),
        (this.query = ""),
        this.parse(t, S2)),
      this.searchParams.update();
  },
  getSearchParams: function () {
    return this.searchParams.facade;
  },
  getHash: function () {
    var t = this.fragment;
    return t ? "#" + t : "";
  },
  setHash: function (t) {
    (t = f1(t)) != ""
      ? (Qg(t, 0) == "#" && (t = zC(t, 1)),
        (this.fragment = ""),
        this.parse(t, o1))
      : (this.fragment = null);
  },
  update: function () {
    this.query = this.searchParams.serialize() || null;
  },
};
var OI = function (t) {
    var e = jCt(this, Eh),
      n = YCt(arguments.length, 1) > 1 ? arguments[1] : void 0,
      r = QCt(e, new Ose(t, !1, n));
    $se ||
      ((e.href = r.serialize()),
      (e.origin = r.getOrigin()),
      (e.protocol = r.getProtocol()),
      (e.username = r.getUsername()),
      (e.password = r.getPassword()),
      (e.host = r.getHost()),
      (e.hostname = r.getHostname()),
      (e.port = r.getPort()),
      (e.pathname = r.getPathname()),
      (e.search = r.getSearch()),
      (e.searchParams = r.getSearchParams()),
      (e.hash = r.getHash()));
  },
  Eh = OI.prototype,
  wg = function (t, e) {
    return {
      get: function () {
        return sU(this)[t]();
      },
      set:
        e &&
        function (n) {
          return sU(this)[e](n);
        },
      configurable: !0,
      enumerable: !0,
    };
  };
if (
  ($se &&
    (Ag(Eh, "href", wg("serialize", "setHref")),
    Ag(Eh, "origin", wg("getOrigin")),
    Ag(Eh, "protocol", wg("getProtocol", "setProtocol")),
    Ag(Eh, "username", wg("getUsername", "setUsername")),
    Ag(Eh, "password", wg("getPassword", "setPassword")),
    Ag(Eh, "host", wg("getHost", "setHost")),
    Ag(Eh, "hostname", wg("getHostname", "setHostname")),
    Ag(Eh, "port", wg("getPort", "setPort")),
    Ag(Eh, "pathname", wg("getPathname", "setPathname")),
    Ag(Eh, "search", wg("getSearch", "setSearch")),
    Ag(Eh, "searchParams", wg("getSearchParams")),
    Ag(Eh, "hash", wg("getHash", "setHash"))),
  YG(
    Eh,
    "toJSON",
    function () {
      return sU(this).serialize();
    },
    { enumerable: !0 }
  ),
  YG(
    Eh,
    "toString",
    function () {
      return sU(this).serialize();
    },
    { enumerable: !0 }
  ),
  YP)
) {
  var Lye = YP.createObjectURL,
    Oye = YP.revokeObjectURL;
  Lye && YG(OI, "createObjectURL", Rye(Lye, YP)),
    Oye && YG(OI, "revokeObjectURL", Rye(Oye, YP));
}
ZCt(OI, "URL"),
  VCt({ global: !0, constructor: !0, forced: !zCt, sham: !$se }, { URL: OI });
var T$t = ur,
  E$t = $c,
  S$t = So,
  R$t = V9,
  Gye = td,
  A$t = Pse,
  NUe = E$t("URL"),
  w$t =
    A$t &&
    S$t(function () {
      NUe.canParse();
    });
T$t(
  { target: "URL", stat: !0, forced: !w$t },
  {
    canParse: function (t) {
      var e = R$t(arguments.length, 1),
        n = Gye(t),
        r = e < 2 || arguments[1] === void 0 ? void 0 : Gye(arguments[1]);
      try {
        return !!new NUe(n, r);
      } catch {
        return !1;
      }
    },
  }
);
var k$t = za,
  I$t = k$t.URL,
  D$t = I$t,
  P$t = D$t,
  M$t = P$t,
  C$t = M$t,
  $$t = C$t,
  x$t = $$t,
  L$t = x$t,
  O$t = L$t,
  Bs = xr(O$t),
  G$t = (function () {
    function t(e) {
      Hs(this, t),
        (this.config = e.config),
        (this.parent = e.root),
        (this.root = Pt.createDom(
          "ul",
          "",
          {},
          "xg-options-list xg-list-slide-scroll ".concat(this.config.className)
        )),
        e.root.appendChild(this.root);
      var n = this.config.maxHeight;
      n && this.setStyle({ maxHeight: n }),
        (this.onItemClick = this.onItemClick.bind(this)),
        this.renderItemList();
      var r = this.config.domEventType === "touch" ? "touchend" : "click";
      this._delegates = ml.delegate.call(
        this,
        this.root,
        "li",
        r,
        this.onItemClick
      );
    }
    return (
      Xs(t, [
        {
          key: "renderItemList",
          value: function (e) {
            var n,
              r = this,
              i = this.config,
              o = this.root;
            e ? (i.data = e) : (e = i.data),
              i.style &&
                On((n = Dn(i.style))).call(n, function (l) {
                  o.style[l] = i[l];
                }),
              e.length > 0 && (this.attrKeys = Dn(e[0])),
              (this.root.innerHTML = ""),
              On(e).call(e, function (l, u) {
                var c = l.selected ? "option-item selected" : "option-item";
                (l["data-index"] = u),
                  r.root.appendChild(
                    Pt.createDom(
                      "li",
                      "<span>".concat(l.showText, "</span>"),
                      l,
                      c
                    )
                  );
              });
          },
        },
        {
          key: "onItemClick",
          value: function (e) {
            e.delegateTarget || (e.delegateTarget = e.target);
            var n = e.delegateTarget;
            if (n && Pt.hasClass(n, "selected")) return !1;
            var r =
                typeof this.config.onItemClick == "function"
                  ? this.config.onItemClick
                  : null,
              i = this.root.querySelector(".selected");
            Pt.addClass(n, "selected"),
              i && Pt.removeClass(i, "selected"),
              r(e, {
                from: i ? this.getAttrObj(i, this.attrKeys) : null,
                to: this.getAttrObj(n, this.attrKeys),
              });
          },
        },
        {
          key: "getAttrObj",
          value: function (e, n) {
            if (!e || !n) return {};
            var r = {};
            On(n).call(n, function (o) {
              r[o] = e.getAttribute(o);
            });
            var i = e.getAttribute("data-index");
            return i && (r.index = Number(i)), r;
          },
        },
        {
          key: "show",
          value: function () {
            Pt.removeClass(this.root, "hide"), Pt.addClass(this.root, "active");
          },
        },
        {
          key: "hide",
          value: function () {
            Pt.removeClass(this.root, "active"), Pt.addClass(this.root, "hide");
          },
        },
        {
          key: "setStyle",
          value: function (e) {
            var n = this;
            Dn(e).forEach(function (r) {
              n.root.style[r] = e[r];
            });
          },
        },
        {
          key: "destroy",
          value: function () {
            var e;
            this._delegates &&
              (On((e = this._delegates)).call(e, function (n) {
                n.destroy && n.destroy();
              }),
              (this._delegates = null)),
              (this.root.innerHTML = null),
              this.parent.removeChild(this.root),
              (this.root = null);
          },
        },
      ]),
      t
    );
  })(),
  N$t = {
    LANG: "zh-cn",
    TEXT: {
      ERROR_TYPES: {
        network: { code: 1, msg: "视频下载错误" },
        mse: { code: 2, msg: "流追加错误" },
        parse: { code: 3, msg: "解析错误" },
        format: { code: 4, msg: "格式错误" },
        decoder: { code: 5, msg: "解码错误" },
        runtime: { code: 6, msg: "语法错误" },
        timeout: { code: 7, msg: "播放超时" },
        other: { code: 8, msg: "其他错误" },
      },
      HAVE_NOTHING: "没有关于音频/视频是否就绪的信息",
      HAVE_METADATA: "音频/视频的元数据已就绪",
      HAVE_CURRENT_DATA:
        "关于当前播放位置的数据是可用的，但没有足够的数据来播放下一帧/毫秒",
      HAVE_FUTURE_DATA: "当前及至少下一帧的数据是可用的",
      HAVE_ENOUGH_DATA: "可用数据足以开始播放",
      NETWORK_EMPTY: "音频/视频尚未初始化",
      NETWORK_IDLE: "音频/视频是活动的且已选取资源，但并未使用网络",
      NETWORK_LOADING: "浏览器正在下载数据",
      NETWORK_NO_SOURCE: "未找到音频/视频来源",
      MEDIA_ERR_ABORTED: "取回过程被用户中止",
      MEDIA_ERR_NETWORK: "网络错误",
      MEDIA_ERR_DECODE: "解码错误",
      MEDIA_ERR_SRC_NOT_SUPPORTED: "不支持的音频/视频格式",
      REPLAY: "重播",
      ERROR: "网络连接似乎出现了问题",
      PLAY_TIPS: "播放",
      PAUSE_TIPS: "暂停",
      PLAYNEXT_TIPS: "下一集",
      DOWNLOAD_TIPS: "下载",
      ROTATE_TIPS: "旋转",
      RELOAD_TIPS: "重新载入",
      FULLSCREEN_TIPS: "进入全屏",
      EXITFULLSCREEN_TIPS: "退出全屏",
      CSSFULLSCREEN_TIPS: "进入样式全屏",
      EXITCSSFULLSCREEN_TIPS: "退出样式全屏",
      TEXTTRACK: "字幕",
      PIP: "画中画",
      SCREENSHOT: "截图",
      LIVE: "正在直播",
      OFF: "关闭",
      OPEN: "开启",
      MINI_DRAG: "点击按住可拖动视频",
      MINISCREEN: "小屏幕",
      REFRESH_TIPS: "请试试",
      REFRESH: "刷新",
      FORWARD: "快进中",
      LIVE_TIP: "直播",
    },
  },
  Cee = za,
  F$t = uR;
Cee.JSON || (Cee.JSON = { stringify: JSON.stringify });
var U$t = function (t, e, n) {
    return F$t(Cee.JSON.stringify, null, arguments);
  },
  B$t = U$t,
  H$t = B$t,
  X$t = H$t,
  V$t = X$t,
  z$t = V$t,
  j$t = z$t,
  W$t = j$t,
  K$t = W$t,
  lr = xr(K$t),
  Z$t = pR,
  Y$t = Z$t.f("toStringTag"),
  Q$t = Y$t,
  J$t = Q$t,
  q$t = J$t,
  ext = q$t,
  txt = ext,
  nxt = txt,
  rxt = nxt,
  ixt = rxt,
  Nye = xr(ixt),
  axt = Bl,
  oxt = ub,
  sxt = nl,
  lxt = sxt("match"),
  uxt = function (t) {
    var e;
    return axt(t) && ((e = t[lxt]) !== void 0 ? !!e : oxt(t) == "RegExp");
  },
  cxt = uxt,
  dxt = TypeError,
  FUe = function (t) {
    if (cxt(t)) throw dxt("The method doesn't accept regular expressions");
    return t;
  },
  hxt = nl,
  fxt = hxt("match"),
  UUe = function (t) {
    var e = /./;
    try {
      "/./"[t](e);
    } catch {
      try {
        return (e[fxt] = !1), "/./"[t](e);
      } catch {}
    }
    return !1;
  },
  pxt = ur,
  BUe = ux;
cb.f;
var gxt = Doe,
  Fye = td,
  mxt = FUe,
  yxt = yE,
  vxt = UUe,
  Uye = BUe("".startsWith),
  bxt = BUe("".slice),
  _xt = Math.min,
  Txt = vxt("startsWith");
pxt(
  { target: "String", proto: !0, forced: !Txt },
  {
    startsWith: function (t) {
      var e = Fye(yxt(this));
      mxt(t);
      var n = gxt(_xt(arguments.length > 1 ? arguments[1] : void 0, e.length)),
        r = Fye(t);
      return Uye ? Uye(e, r, n) : bxt(e, n, n + r.length) === r;
    },
  }
);
var Ext = Il,
  Sxt = Ext("String").startsWith,
  Rxt = Es,
  Axt = Sxt,
  bV = String.prototype,
  wxt = function (t) {
    var e = t.startsWith;
    return typeof t == "string" ||
      t === bV ||
      (Rxt(bV, t) && e === bV.startsWith)
      ? Axt
      : e;
  },
  kxt = wxt,
  Ixt = kxt,
  Dxt = Ixt,
  Pxt = Dxt,
  Mxt = Pxt,
  Cxt = Mxt,
  $xt = Cxt,
  xxt = $xt,
  pv = xr(xxt),
  Lxt = Bl,
  Oxt = Math.floor,
  HUe =
    Number.isInteger ||
    function (t) {
      return !Lxt(t) && isFinite(t) && Oxt(t) === t;
    },
  Gxt = ur,
  Nxt = HUe;
Gxt({ target: "Number", stat: !0 }, { isInteger: Nxt });
var Fxt = za,
  Uxt = Fxt.Number.isInteger,
  Bxt = Uxt,
  Hxt = Bxt,
  Xxt = Hxt,
  Vxt = Xxt,
  zxt = Vxt,
  jxt = zxt,
  Wxt = jxt,
  Kxt = Wxt,
  Zxt = xr(Kxt),
  Yxt = ur,
  Qxt = xoe.includes,
  Jxt = So,
  qxt = Jxt(function () {
    return !Array(1).includes();
  });
Yxt(
  { target: "Array", proto: !0, forced: qxt },
  {
    includes: function (t) {
      return Qxt(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var eLt = Il,
  tLt = eLt("Array").includes,
  nLt = ur,
  rLt = Bo,
  iLt = FUe,
  aLt = yE,
  Bye = td,
  oLt = UUe,
  sLt = rLt("".indexOf);
nLt(
  { target: "String", proto: !0, forced: !oLt("includes") },
  {
    includes: function (t) {
      return !!~sLt(
        Bye(aLt(this)),
        Bye(iLt(t)),
        arguments.length > 1 ? arguments[1] : void 0
      );
    },
  }
);
var lLt = Il,
  uLt = lLt("String").includes,
  Hye = Es,
  cLt = tLt,
  dLt = uLt,
  _V = Array.prototype,
  TV = String.prototype,
  hLt = function (t) {
    var e = t.includes;
    return t === _V || (Hye(_V, t) && e === _V.includes)
      ? cLt
      : typeof t == "string" || t === TV || (Hye(TV, t) && e === TV.includes)
      ? dLt
      : e;
  },
  fLt = hLt,
  pLt = fLt,
  gLt = pLt,
  mLt = gLt,
  yLt = mLt,
  vLt = yLt,
  bLt = vLt,
  _Lt = bLt,
  $a = xr(_Lt),
  TLt = Ff,
  Xye = FL,
  ELt = Yp,
  SLt = function (t) {
    for (
      var e = TLt(this),
        n = ELt(e),
        r = arguments.length,
        i = Xye(r > 1 ? arguments[1] : void 0, n),
        o = r > 2 ? arguments[2] : void 0,
        l = o === void 0 ? n : Xye(o, n);
      l > i;

    )
      e[i++] = t;
    return e;
  },
  RLt = ur,
  ALt = SLt;
RLt({ target: "Array", proto: !0 }, { fill: ALt });
var Vc,
  wLt = Il,
  kLt = wLt("Array").fill,
  ILt = Es,
  DLt = kLt,
  EV = Array.prototype,
  PLt = function (t) {
    var e = t.fill;
    return t === EV || (ILt(EV, t) && e === EV.fill) ? DLt : e;
  },
  MLt = PLt,
  CLt = MLt,
  $Lt = CLt,
  xLt = $Lt,
  LLt = xLt,
  OLt = LLt,
  GLt = OLt,
  NLt = GLt,
  $ee = xr(NLt),
  dl = {
    SEI: "sei",
    PLAYER_CREATE_FINISH: "playerCreateFinish",
    FALLBACK_ERROR: "fallbackError",
    FALLBACK: "fallback",
    AUTOPLAY_STARTED: "autoplayStarted",
    AUTOPLAY_PREVENTED: "autoplayWasPrevented",
    DOWNLOAD_SPEED_CHANGE: "downloadSpeedChange",
    FULLSCREEN_CHANGE: "fullscreenChange",
    CSS_FULLSCREEN_CHANGE: "cssFullscreenChange",
    MINI_STATE_CHANGE: "miniStateChange",
    DEFINITION_CHANGE: "definitionChange",
    BEFORE_DEFINITION_CHANGE: "beforeDefinitionChange",
    AFTER_DEFINITION_CHANGE: "afterDefinitionChange",
    VIDEO_RESIZE: "videoResize",
    PIP_CHANGE: "pipChange",
    USER_ACTION: "userAction",
    AUTOPLAY_UNMUTE: "autoplayUnmute",
    LONG_WAITING: "longWaiting",
    DEFINITION_FALLBACK: "definitionFallback",
    AUTOPLAY_FAIL: "autoplayFail",
    AUTOPLAY_SUCCESS: "autoplaySuccess",
    ERROR_REFRESH_CLICK: "errorRefreshClick",
    SOURCE_CHANGE: "sourceChange",
    ABR_SWITCH_START: "abrSwitchStart",
    ABR_SWITCH_SUCCESS: "abrSwitchSuccess",
    ABR_SWITCH_FAILED: "abrSwitchFailed",
    AD_FIRST_QUARTILE: "ad_first_quartile",
    AD_MIDPOINT: "ad_midpoint",
    AD_THIRD_QUARTILE: "ad_third_quartile",
    AD_CLICK: "ad_click",
    AD_IMPRESSION: "ad_impression",
    AD_RESUME: "ad_resume",
    AD_START: "ad_start",
    AD_PLAY: "ad_play",
    AD_PAUSE: "ad_pause",
    AD_TIME_UPDATE: "ad_time_update",
    AD_SKIPPED: "ad_skipped",
    AD_ERROR: "ad_error",
    AD_COMPLETE: "ad_complete",
    AD_ALL_COMPLETED: "ad_all_completed",
    RTM_NETWORK: "rtmNetwork",
  },
  cc = $n($n({}, qDt), dl),
  FLt =
    (bn((Vc = {}), dl.SEI, {
      event: "core_event",
      shouldCallback: function (t) {
        return (t == null ? void 0 : t.eventName) === "core.sei";
      },
    }),
    bn(Vc, dl.RTM_NETWORK, {
      event: "core_event",
      shouldCallback: function (t) {
        return (t == null ? void 0 : t.eventName) === "core.rtcnetwork";
      },
    }),
    bn(Vc, dl.AUTOPLAY_STARTED, { event: NT }),
    bn(Vc, dl.AUTOPLAY_PREVENTED, { event: CI }),
    bn(Vc, dl.FULLSCREEN_CHANGE, { event: m0 }),
    bn(Vc, dl.CSS_FULLSCREEN_CHANGE, { event: Q6 }),
    bn(Vc, dl.MINI_STATE_CHANGE, { event: mx }),
    bn(Vc, dl.DEFINITION_CHANGE, { event: _se }),
    bn(Vc, dl.BEFORE_DEFINITION_CHANGE, { event: cUe }),
    bn(Vc, dl.AFTER_DEFINITION_CHANGE, { event: J6 }),
    bn(Vc, dl.VIDEO_RESIZE, { event: Tse }),
    bn(Vc, dl.PIP_CHANGE, { event: q6 }),
    bn(Vc, dl.USER_ACTION, { event: eU }),
    bn(Vc, dl.DOWNLOAD_SPEED_CHANGE, { event: oUe }),
    bn(Vc, dl.ABR_SWITCH_START, { event: "switch_definition_start" }),
    bn(Vc, dl.ABR_SWITCH_SUCCESS, { event: "switch_definition_success" }),
    bn(Vc, dl.ABR_SWITCH_FAILED, { event: "switch_definition_fail" }),
    Vc);
function ULt(t, e) {
  var n = FLt[t];
  return n
    ? {
        xgEventName: n.event,
        xgCallback: e
          ? n.shouldCallback
            ? function () {
                for (
                  var r, i, o = arguments.length, l = new Array(o), u = 0;
                  u < o;
                  u++
                )
                  l[u] = arguments[u];
                (r = n.shouldCallback) !== null &&
                  r !== void 0 &&
                  r.call.apply(r, Ce((i = [n])).call(i, l)) &&
                  (e == null || e.apply(void 0, l));
              }
            : e
          : void 0,
      }
    : { xgEventName: t, xgCallback: e };
}
var BLt = /["'&<>]/;
function Vye(t) {
  var e,
    n = "" + t,
    r = BLt.exec(n);
  if (!r) return n;
  var i,
    o = "",
    l = 0;
  for (i = r.index; i < n.length; i++) {
    switch (n.charCodeAt(i)) {
      case 34:
        e = "&quot;";
        break;
      case 38:
        e = "&amp;";
        break;
      case 39:
        e = "&#x27;";
        break;
      case 60:
        e = "&lt;";
        break;
      case 62:
        e = "&gt;";
        break;
      default:
        continue;
    }
    l !== i && (o += n.substring(l, i)), (l = i + 1), (o += e);
  }
  return l !== i ? o + n.substring(l, i) : o;
}
function HLt(t) {
  if (Joe(t)) return t;
}
function XLt(t, e) {
  var n = t == null ? null : (G1 !== void 0 && qoe(t)) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o,
      l,
      u = [],
      c = !0,
      d = !1;
    try {
      if (((o = (n = n.call(t)).next), e === 0)) {
        if (Object(n) !== n) return;
        c = !1;
      } else
        for (
          ;
          !(c = (r = o.call(n)).done) &&
          (fx(u).call(u, r.value), u.length !== e);
          c = !0
        );
    } catch (h) {
      (d = !0), (i = h);
    } finally {
      try {
        if (!c && n.return != null && ((l = n.return()), Object(l) !== l))
          return;
      } finally {
        if (d) throw i;
      }
    }
    return u;
  }
}
function VLt() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function hs(t, e) {
  return HLt(t) || XLt(t, e) || ese(t, e) || VLt();
}
var zLt = wu,
  XUe = Bo,
  jLt = BL,
  WLt = pm,
  KLt = LL.f,
  ZLt = XUe(KLt),
  YLt = XUe([].push),
  zye = function (t) {
    return function (e) {
      for (var n, r = WLt(e), i = jLt(r), o = i.length, l = 0, u = []; o > l; )
        (n = i[l++]), (zLt && !ZLt(r, n)) || YLt(u, t ? [n, r[n]] : r[n]);
      return u;
    };
  },
  VUe = { entries: zye(!0), values: zye(!1) },
  QLt = ur,
  JLt = VUe.entries;
QLt(
  { target: "Object", stat: !0 },
  {
    entries: function (t) {
      return JLt(t);
    },
  }
);
var qLt = za,
  e5t = qLt.Object.entries,
  t5t = e5t,
  n5t = t5t,
  r5t = n5t,
  i5t = r5t,
  a5t = i5t,
  o5t = a5t,
  s5t = o5t,
  l5t = s5t,
  N1 = xr(l5t);
function u5t(t) {
  var e = {};
  return (
    N1(t ?? {}).forEach(function (n) {
      var r = hs(n, 2),
        i = r[0],
        o = r[1];
      typeof o == "string"
        ? console.warn("icons.".concat(i, " has been removed"))
        : (e[i] = o);
    }),
    e
  );
}
var c5t = ku,
  d5t = Ff,
  h5t = x9,
  f5t = Yp,
  p5t = TypeError,
  jye = function (t) {
    return function (e, n, r, i) {
      c5t(n);
      var o = d5t(e),
        l = h5t(o),
        u = f5t(o),
        c = t ? u - 1 : 0,
        d = t ? -1 : 1;
      if (r < 2)
        for (;;) {
          if (c in l) {
            (i = l[c]), (c += d);
            break;
          }
          if (((c += d), t ? c < 0 : u <= c))
            throw p5t("Reduce of empty array with no initial value");
        }
      for (; t ? c >= 0 : u > c; c += d) c in l && (i = n(i, l[c], c, o));
      return i;
    };
  },
  g5t = { left: jye(!1), right: jye(!0) },
  m5t = ur,
  y5t = g5t.left,
  v5t = ZL,
  b5t = QL,
  _5t = !b5t && NS > 79 && NS < 83,
  T5t = _5t || !v5t("reduce");
m5t(
  { target: "Array", proto: !0, forced: T5t },
  {
    reduce: function (t) {
      var e = arguments.length;
      return y5t(this, t, e, e > 1 ? arguments[1] : void 0);
    },
  }
);
var E5t = Il,
  S5t = E5t("Array").reduce,
  R5t = Es,
  A5t = S5t,
  SV = Array.prototype,
  w5t = function (t) {
    var e = t.reduce;
    return t === SV || (R5t(SV, t) && e === SV.reduce) ? A5t : e;
  },
  k5t = w5t,
  I5t = k5t,
  D5t = I5t,
  P5t = D5t,
  M5t = P5t,
  C5t = M5t,
  $5t = C5t,
  x5t = $5t,
  ga = xr(x5t);
function L5t() {
  for (
    var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [],
      e = { url: t[0], next: null },
      n = e,
      r = 1;
    r < t.length;
    r++
  ) {
    var i = r === t.length - 1 ? e : null,
      o = { url: t[r], next: i };
    (n.next = o), (n = o);
  }
  return e;
}
var Wye = (function () {
    function t(e) {
      var n;
      Wn(this, t),
        bn(this, "definition", void 0),
        bn(this, "source", void 0),
        bn(this, "text", void 0),
        bn(this, "fallbackUrl", void 0),
        bn(this, "urls", void 0),
        bn(this, "_currentUrlRef", void 0);
      var r = e.url,
        i = e.definition,
        o = e.text,
        l = e.source,
        u = e.fallbackUrls;
      (this.definition = i),
        (this.text = o),
        (this.source = l),
        (this.urls = Ce((n = [r])).call(n, Cf(u ?? []))),
        (this.fallbackUrl = L5t(this.urls)),
        (this._currentUrlRef = this.fallbackUrl);
    }
    return (
      Kn(t, [
        {
          key: "url",
          get: function () {
            return this._currentUrlRef.url;
          },
          set: function (e) {
            this._currentUrlRef.url = e;
          },
        },
        {
          key: "next",
          value: function () {
            var e = this._currentUrlRef.next;
            /* istanbul ignore next -- @preserve */ return (
              e && (this._currentUrlRef = e), this._currentUrlRef
            );
          },
        },
      ]),
      t
    );
  })(),
  zUe = (function () {
    function t(e, n, r) {
      var i = this;
      Wn(this, t),
        bn(this, "name", void 0),
        bn(this, "text", void 0),
        bn(this, "definitions", void 0),
        (this.definitions = On(e).call(e, function (o) {
          return new Wye(Ci({}, o, { source: i }));
        })),
        (this.name = n),
        (this.text = r);
    }
    return (
      Kn(
        t,
        [
          {
            key: "defaultDefinition",
            get: function () {
              return this.definitions[0];
            },
          },
          {
            key: "add",
            value: function (e) {
              this.definitions.push(e);
            },
          },
        ],
        [
          {
            key: "normalize",
            value: function (e) {
              if (e === void 0) throw new Error('"input" cannot be undefined');
              var n = void 0,
                r = void 0,
                i = void 0;
              if (
                (typeof e == "string"
                  ? (n = e)
                  : Array.isArray(e)
                  ? (i = e)
                  : ((n = e.url), (r = e.fallbackUrls), (i = e.sources)),
                typeof n == "string")
              )
                return t.normalizeUrl(n, r);
              if (Array.isArray(i)) {
                if (i.length === 0)
                  throw new Error('"sources" cannot be an empty array');
                return On(i).call(i, function (o) {
                  var l;
                  return new t(
                    On((l = o.definitions)).call(l, function (u) {
                      return typeof u == "string"
                        ? { url: u, definition: "unknown" }
                        : u;
                    }),
                    o.name,
                    o.text
                  );
                });
              }
              return [];
            },
          },
          {
            key: "normalizeUrl",
            value: function (e, n) {
              var r = new t([], "unknown");
              return (
                r.add(
                  new Wye({
                    definition: "unknown",
                    url: e,
                    source: r,
                    fallbackUrls: n,
                  })
                ),
                [r]
              );
            },
          },
        ]
      ),
      t
    );
  })(),
  O5t = (function () {
    function t(e) {
      var n, r, i, o;
      Wn(this, t),
        bn(this, "defaultSource", void 0),
        bn(this, "defaultDefinition", void 0),
        bn(this, "maxFallbackRound", void 0),
        bn(this, "_currentDefinition", void 0),
        bn(this, "_sources", void 0),
        bn(this, "_fallbackCount", 0);
      var l = e.url,
        u = e.defaultDefinition,
        c = e.defaultSource,
        d = e.sources,
        h = e.maxFallbackRound;
      (this.defaultDefinition = u),
        (this.defaultSource = c),
        (this.maxFallbackRound = h ?? 1),
        (this._sources = d);
      var f = l
        ? ji(this).call(this, l)
        : (n = ji((r = this.sources)).call(r, function (p) {
            return c === void 0 || p.name === c;
          })) === null || n === void 0
        ? void 0
        : ji((i = n.definitions)).call(i, function (p) {
            return u === void 0 || p.definition === u;
          });
      this._currentDefinition =
        f ??
        ((o = this._sources) === null ||
        o === void 0 ||
        (o = o[0]) === null ||
        o === void 0 ||
        (o = o.definitions) === null ||
        o === void 0
          ? void 0
          : o[0]);
    }
    return (
      Kn(t, [
        {
          key: "sources",
          get: function () {
            return this._sources;
          },
        },
        {
          key: "definition",
          get: function () {
            return this._currentDefinition;
          },
        },
        {
          key: "source",
          get: function () {
            var e;
            return (e = this.definition) === null || e === void 0
              ? void 0
              : e.source;
          },
        },
        {
          key: "url",
          get: function () {
            var e;
            return (e = this.definition) === null || e === void 0
              ? void 0
              : e.url;
          },
          set: function (e) {
            this.definition && (this.definition.url = e);
          },
        },
        {
          key: "find",
          value: function (e, n) {
            var r,
              i,
              o,
              l,
              u,
              c = this;
            if (typeof e == "string")
              return ji(
                (l = ga((u = this.sources)).call(
                  u,
                  function (f, p) {
                    return Ce(f).call(f, p.definitions);
                  },
                  []
                ))
              ).call(l, function (f) {
                return f.url === e;
              });
            var d = ji((r = this.sources)).call(r, function (f) {
                var p, g;
                return (
                  f.name ===
                  ((p = e == null ? void 0 : e.source) !== null && p !== void 0
                    ? p
                    : (g = c.source) === null || g === void 0
                    ? void 0
                    : g.name)
                );
              }),
              h =
                d == null
                  ? void 0
                  : ji((i = d.definitions)).call(i, function (f) {
                      var p, g;
                      return (
                        f.definition ===
                        ((p = e == null ? void 0 : e.definition) !== null &&
                        p !== void 0
                          ? p
                          : (g = c.definition) === null || g === void 0
                          ? void 0
                          : g.definition)
                      );
                    });
            return (
              h ||
              (n != null &&
              n.fallbackToFirstDefinition &&
              d != null &&
              (o = d.definitions) !== null &&
              o !== void 0 &&
              o.length
                ? d == null
                  ? void 0
                  : d.definitions[0]
                : void 0)
            );
          },
        },
        {
          key: "fallback",
          value: function () {
            var e;
            if (
              (this._fallbackCount++,
              !(
                this._fallbackCount >=
                this.maxFallbackRound * this.definition.urls.length
              ))
            ) {
              var n =
                (e = this._currentDefinition) === null || e === void 0
                  ? void 0
                  : e.next();
              return n == null ? void 0 : n.url;
            }
            this.resetFallback();
          },
        },
        {
          key: "switch",
          value: function (e) {
            return (this._currentDefinition = e), this.resetFallback(), e;
          },
        },
        {
          key: "updateSources",
          value: function (e, n) {
            var r, i, o, l, u;
            return (
              (this._sources = zUe.normalize(e)),
              (this._currentDefinition =
                (r = ji(this).call(
                  this,
                  n ?? {
                    source:
                      (i = this.defaultSource) !== null && i !== void 0
                        ? i
                        : (o = this._currentDefinition) === null || o === void 0
                        ? void 0
                        : o.source.name,
                    definition:
                      (l = this.defaultDefinition) !== null && l !== void 0
                        ? l
                        : (u = this._currentDefinition) === null || u === void 0
                        ? void 0
                        : u.definition,
                  }
                )) !== null && r !== void 0
                  ? r
                  : this._sources[0].definitions[0]),
              this.resetFallback(),
              this
            );
          },
        },
        {
          key: "resetFallback",
          value: function () {
            this._fallbackCount = 0;
          },
        },
      ]),
      t
    );
  })();
function G5t(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = po(t)) !== null; );
  return t;
}
function Eo() {
  var t;
  return (
    typeof Reflect < "u" && g0e
      ? (Eo = vx((t = g0e)).call(t))
      : (Eo = function (e, n, r) {
          var i = G5t(e, n);
          if (i) {
            var o = rse(i, n);
            return o.get ? o.get.call(arguments.length < 3 ? e : r) : o.value;
          }
        }),
    Eo.apply(this, arguments)
  );
}
function N5t() {
  return new DOMParser().parseFromString(
    `<svg width="150" height="162" viewBox="0 0 150 162" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M127.718 112.831H6.13675C4.19663 112.831 2.25651 108.974 2.90322 104.475C3.54993 99.9761 8.07687 99.9761 13.8972 99.9761C11.9571 97.4052 9.37028 88.4069 15.8373 81.3369C22.3044 74.2668 25.5379 74.2668 34.5918 75.5526C33.9451 63.9837 47.526 34.4178 77.2744 35.0605C107.023 35.7032 116.077 54.3421 119.957 63.3404C129.011 62.6976 147.765 66.554 149.706 87.1214C151.258 103.575 135.694 111.117 127.718 112.831Z" fill="#F1F4F8"/>
<path d="M44.9346 91.6022L43.6782 99.8032" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>
<path d="M47.3545 125.695L48.6109 117.494" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>
<path d="M31.5347 97.7378L38.7295 101.869" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>
<path d="M60.7544 119.559L53.5595 115.428" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>
<path d="M69.6755 44.5318L138.35 26.0209C139.115 25.8148 139.804 26.5367 139.563 27.2909L121.081 85.1146C120.982 85.4243 120.739 85.6665 120.429 85.7641L52.0645 107.28C51.2996 107.521 50.5766 106.809 50.8062 106.04L68.9776 45.2111C69.0768 44.879 69.3409 44.622 69.6755 44.5318Z" fill="#D0D6E0" stroke="#D0D6E0" stroke-width="4" stroke-linecap="round"/>
<path d="M83.1285 52.7415C91.6454 54.3438 107.322 62.0019 101.894 79.8155" stroke="white" stroke-width="3" stroke-linecap="round"/>
<path d="M84.138 62.3385C88.3894 63.1384 96.2148 66.9611 93.5053 75.8531" stroke="white" stroke-width="3" stroke-linecap="round"/>
<ellipse cx="83.6417" cy="71.98" rx="3.08443" ry="3.07025" transform="rotate(12.6375 83.6417 71.98)" fill="white"/>
<path d="M43.4699 110.358C39.5425 109.114 30.6316 108.203 26.4077 114.511C21.1278 122.397 36.5031 152.755 2.11053 160.141" stroke="#D0D6E0" stroke-width="2" stroke-linecap="round"/>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var F5t = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n() {
      var r, i;
      Wn(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        bn(
          os((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "_error",
          void 0
        ),
        i
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "_errorTip",
            get: function () {
              var r,
                i,
                o,
                l = this.player.config.i18nManager,
                u =
                  (r = this._error) === null || r === void 0
                    ? void 0
                    : r.errorCode;
              return this.config.errorTipsText
                ? l.normalize(this.config.errorTipsText)
                : Ce((i = "".concat(u ? "[".concat(u, "] ") : ""))).call(
                    i,
                    (o = this._error) === null || o === void 0
                      ? void 0
                      : o.message
                  );
            },
          },
          {
            key: "afterCreate",
            value: function () {
              (this._handleRefresh = this._handleRefresh.bind(this)),
                (this._focus = this._focus.bind(this)),
                this._initEvents(),
                this._initIcons(),
                Na.device === "mobile" && this.bind("touchend", this._focus),
                this.bind(
                  ".veplayer-error-refresh",
                  "click",
                  this._handleRefresh
                );
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return { error: { icon: N5t, class: "veplayer-error-svg" } };
            },
          },
          {
            key: "updateLang",
            value: function () {
              this.config.showRefresh && this._renderRefresh(),
                this._renderExtraTips();
            },
          },
          {
            key: "showError",
            value: function (r) {
              (this._error = r instanceof J9 ? r : Aee(r)),
                this.config.showErrorTip && this._renderText(this._errorTip),
                this._renderExtraTips(),
                Eo(po(n.prototype), "show", this).call(this);
            },
          },
          {
            key: "hideError",
            value: function () {
              Eo(po(n.prototype), "hide", this).call(this);
            },
          },
          {
            key: "destroy",
            value: function () {
              Na.device === "mobile" && this.unbind("touchend", this._focus),
                this.unbind(
                  ".veplayer-error-refresh",
                  "click",
                  this._handleRefresh
                ),
                this.off(cc.FALLBACK_ERROR, this.showError.bind(this)),
                this.off(lm, this.hideError.bind(this));
            },
          },
          {
            key: "render",
            value: function () {
              var r,
                i = this.player.config.i18nManager;
              return Ce(
                (r = `<veplayer-error class="veplayer-error">
      <div class="veplayer-error-cover">
        `.concat(
                  this.config.showErrorImg
                    ? '<div class="veplayer-error-img"></div>'
                    : "",
                  `
        <div class="veplayer-error-tips"></div>
        `
                ))
              ).call(
                r,
                this.config.showRefresh
                  ? '<div class="veplayer-error-refresh">'.concat(
                      i.getText("ERROR_REFRESH"),
                      "</div>"
                    )
                  : "",
                `
        <div class="veplayer-error-extra"></div>
      </div>
    </veplayer-error>`
              );
            },
          },
          {
            key: "_focus",
            value: function () {
              this.player.focus({ autoHide: !0 });
            },
          },
          {
            key: "_initIcons",
            value: function () {
              this.config.showErrorImg &&
                this.appendChild(".veplayer-error-img", this.icons.error);
            },
          },
          {
            key: "_initEvents",
            value: function () {
              this.on(cc.FALLBACK_ERROR, this.showError.bind(this)),
                this.on(lm, this.hideError.bind(this)),
                this.on(C0, this.hideError.bind(this)),
                this.on(dUe, this.hideError.bind(this));
            },
          },
          {
            key: "_renderText",
            value: function (r) {
              var i = ji(this).call(this, ".veplayer-error-tips");
              i && (i.innerText = r);
            },
          },
          {
            key: "_renderExtraTips",
            value: function () {
              var r,
                i = this,
                o = ji(this).call(this, ".veplayer-error-extra");
              o && (o.innerHTML = "");
              var l = this.player.config.i18nManager;
              (r = this.config.extraTips) === null ||
                r === void 0 ||
                r.forEach(function (u) {
                  if (u) {
                    var c,
                      d = Pt.createDom(
                        "div",
                        Ce((c = "".concat(l.normalize(u.label), ": "))).call(
                          c,
                          l.normalize(u.value)
                        ),
                        void 0,
                        "veplayer-error-detail-info"
                      );
                    i.appendChild(".veplayer-error-extra", d);
                  }
                });
            },
          },
          {
            key: "_handleRefresh",
            value: function () {
              var r, i;
              (r = this.player) === null ||
                r === void 0 ||
                r.emit(cc.ERROR_REFRESH_CLICK),
                (i = this.player) === null ||
                  i === void 0 ||
                  (i = i.config) === null ||
                  i === void 0 ||
                  (i = i.veplayer) === null ||
                  i === void 0 ||
                  i.retry(),
                this.hideError();
            },
          },
          {
            key: "_renderRefresh",
            value: function () {
              var r,
                i = this.player.config.i18nManager,
                o = ji(this).call(this, ".veplayer-error-refresh");
              o &&
                (o.innerHTML =
                  (r = i.getText("ERROR_REFRESH")) !== null && r !== void 0
                    ? r
                    : "");
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "error";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                showErrorImg: !0,
                showErrorTip: !0,
                showRefresh: !0,
                errorTipsText: "",
                extraTips: [],
                position: ml.POSITIONS.ROOT,
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  U5t = 2e3,
  B5t = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n() {
      var r, i;
      Wn(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        bn(
          os((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "_toastNumber",
          0
        ),
        bn(os(i), "_toastMap", {}),
        i
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "toast",
            value: function (r, i) {
              var o = this,
                l = i || {},
                u = l.duration,
                c = u === void 0 ? U5t : u,
                d = l.closable,
                h = d !== void 0 && d,
                f = this._toastNumber + 1;
              this._toastNumber = f;
              var p = this._renderToast(r, h, f);
              return (
                this.root.appendChild(p),
                (this._toastMap[f] = p),
                setTimeout(function () {
                  o.remove(f);
                }, c),
                f
              );
            },
          },
          {
            key: "remove",
            value: function (r) {
              var i = this._toastMap[r];
              i &&
                (this.root.contains(i) && this.root.removeChild(i),
                delete this._toastMap[r]);
            },
          },
          {
            key: "render",
            value: function () {
              return '<veplayer-toast class="veplayer-toast"></veplayer-toast>';
            },
          },
          {
            key: "_renderToast",
            value: function (r, i, o) {
              var l = this,
                u = Pt.createDom("div", "", void 0, "veplayer-toast-container"),
                c = Pt.checkIsObject(r)
                  ? r
                  : Pt.createDom("div", r, void 0, "veplayer-toast-txt");
              if ((u.appendChild(c), i)) {
                var d = Pt.createDom(
                  "span",
                  "×",
                  void 0,
                  "veplayer-toast-close"
                );
                d.addEventListener("click", function () {
                  l.remove(o);
                }),
                  u.appendChild(d);
              }
              return u;
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "toast";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { index: 5 };
            },
          },
        ]
      ),
      n
    );
  })();
function H5t() {
  return new DOMParser().parseFromString(
    `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.7123 1C11.85 1 11.1173 1.55472 10.8516 2.32675L4.94973 2.32675C3.16413 2.32675 1.71662 3.77427 1.71662 5.55987C1.71662 7.34547 3.16413 8.79298 4.94973 8.79298L11.0483 8.79298L11.1134 8.79418C11.9936 8.82748 12.697 9.55166 12.697 10.44C12.697 11.3497 11.9596 12.0871 11.05 12.0871H5.01323C4.67882 11.4781 4.03143 11.0654 3.28763 11.0654C2.20111 11.0654 1.32031 11.9462 1.32031 13.0327C1.32031 14.1192 2.20111 15 3.28763 15C4.14992 15 4.88264 14.4452 5.14834 13.6732H11.05C12.8356 13.6732 14.2831 12.2256 14.2831 10.44C14.2831 8.65444 12.8356 7.20693 11.05 7.20693L4.94973 7.20693C4.04009 7.20693 3.30267 6.46951 3.30267 5.55987C3.30267 4.65022 4.04009 3.91281 4.94973 3.91281L10.9866 3.91281C11.321 4.52183 11.9685 4.93464 12.7123 4.93464C13.7988 4.93464 14.6796 4.05384 14.6796 2.96732C14.6796 1.8808 13.7988 1 12.7123 1ZM12.7123 2.18954C12.2827 2.18954 11.9345 2.53777 11.9345 2.96732C11.9345 3.39688 12.2827 3.7451 12.7123 3.7451C13.1418 3.7451 13.4901 3.39688 13.4901 2.96732C13.4901 2.53777 13.1418 2.18954 12.7123 2.18954ZM2.50986 13.0327C2.50986 12.6031 2.85808 12.2549 3.28763 12.2549C3.71719 12.2549 4.06541 12.6031 4.06541 13.0327C4.06541 13.4622 3.71719 13.8105 3.28763 13.8105C2.85808 13.8105 2.50986 13.4622 2.50986 13.0327Z" fill="#FFFFFF"/>
</svg>`,
    "image/svg+xml"
  ).firstChild;
}
var Kye = (function () {
    function t(e) {
      Wn(this, t),
        bn(this, "_root", void 0),
        bn(this, "_config", void 0),
        bn(this, "_parent", void 0),
        bn(this, "_listDom", void 0),
        bn(this, "_container", void 0),
        bn(this, "_titleDom", void 0),
        bn(this, "_player", void 0),
        bn(this, "_delegates", void 0),
        bn(this, "_listType", void 0);
      var n = e.config,
        r = e.root,
        i = e.player;
      (this._config = n),
        (this._parent = r),
        (this._player = i),
        (this._listType = n.listType),
        this.renderPanel(),
        this._initEvents(),
        this._bindDomEvent();
    }
    return (
      Kn(t, [
        {
          key: "changeMode",
          value: function (e) {
            this.updatePanel(e), (this._listType = e);
          },
        },
        {
          key: "renderItemList",
          value: function (e) {
            var n,
              r = this,
              i = this._config;
            return (
              e && (i.list = e),
              this._listDom ||
                (this._listDom = Pt.createDom(
                  "div",
                  "",
                  {},
                  "item-list-panel-content"
                )),
              (this._listDom.innerHTML = ""),
              (n = i.list) === null ||
                n === void 0 ||
                On(n).call(n, function (o, l) {
                  var u,
                    c,
                    d = o.selected
                      ? "panel-item select-in"
                      : "panel-item ".concat(
                          (u = o.className) !== null && u !== void 0 ? u : ""
                        );
                  o["data-index"] = l;
                  var h = Pt.createDom("div", "", o, d);
                  o.showText &&
                    (typeof o.showText == "string"
                      ? (h.innerHTML = o.showText)
                      : h.appendChild(o.showText)),
                    (c = r._listDom) === null ||
                      c === void 0 ||
                      c.appendChild(h);
                }),
              this._listDom
            );
          },
        },
        {
          key: "renderTitle",
          value: function () {
            var e,
              n,
              r = this._player.config.i18nManager;
            if (
              (e = this._config.panel) !== null &&
              e !== void 0 &&
              e.title &&
              this._listType !== nC.Inner
            )
              return (
                this._titleDom ||
                  (this._titleDom = Pt.createDom(
                    "div",
                    "",
                    {},
                    "xg-mobile-panel-title"
                  )),
                (this._titleDom.innerHTML = r.normalize(
                  (n = this._config.panel) === null || n === void 0
                    ? void 0
                    : n.title
                )),
                this._titleDom
              );
          },
        },
        {
          key: "updatePanel",
          value: function (e) {
            this._root &&
              Pt.removeClass(this._root, "panel-".concat(this._listType)),
              this._root && Pt.addClass(this._root, "panel-".concat(e));
            var n = Na.device === "mobile" ? "touchend" : "click";
            e === nC.Inner
              ? this._container &&
                this._bind(this._container, n, this._handleHide.bind(this))
              : this._container &&
                this._unbind(this._container, n, this._handleHide.bind(this));
          },
        },
        {
          key: "renderPanel",
          value: function () {
            var e,
              n,
              r,
              i = Ce(
                (e = "xg-mobile-panel panel-".concat(
                  this._config.listType,
                  " "
                ))
              ).call(
                e,
                (n =
                  (r = this._config) === null ||
                  r === void 0 ||
                  (r = r.panel) === null ||
                  r === void 0
                    ? void 0
                    : r.className) !== null && n !== void 0
                  ? n
                  : ""
              );
            (this._root = Pt.createDom("div", "", {}, i)),
              this._parent && this._parent.appendChild(this._root);
            var o = this.renderTitle(),
              l = this.renderItemList();
            (this._container = Pt.createDom(
              "div",
              "",
              {},
              "xg-mobile-panel-content"
            )),
              this._root.appendChild(this._container),
              o && this._container.appendChild(o),
              l && this._container.appendChild(l);
          },
        },
        {
          key: "show",
          value: function () {
            this._root &&
              (Pt.removeClass(this._root, "hide"),
              Pt.addClass(this._root, "active"));
          },
        },
        {
          key: "hide",
          value: function () {
            this._root &&
              (Pt.removeClass(this._root, "active"),
              Pt.addClass(this._root, "hide"));
          },
        },
        {
          key: "destroy",
          value: function () {
            this._parent && this._root && this._parent.removeChild(this._root),
              this._unbindDomEvent(),
              this._unbindEvents();
          },
        },
        {
          key: "_bind",
          value: function (e, n, r) {
            var i =
              arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
            e &&
              "on".concat(n) in e &&
              typeof r == "function" &&
              e.addEventListener(n, r, i);
          },
        },
        {
          key: "_unbind",
          value: function (e, n, r) {
            var i =
              arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
            e &&
              "on".concat(n) in e &&
              typeof r == "function" &&
              e.removeEventListener(n, r, i);
          },
        },
        {
          key: "_initEvents",
          value: function () {
            var e;
            this._config.isAutoChange &&
              (window.addEventListener(
                "orientationchange",
                this._handleOrientationChange.bind(this)
              ),
              (e = this._player) === null ||
                e === void 0 ||
                e.on(m0, this._handleOrientationChange.bind(this)));
          },
        },
        {
          key: "_unbindEvents",
          value: function () {
            var e;
            window.removeEventListener(
              "orientationchange",
              this._handleOrientationChange.bind(this)
            ),
              (e = this._player) === null ||
                e === void 0 ||
                e.off(m0, this._handleOrientationChange.bind(this));
          },
        },
        {
          key: "_handleOrientationChange",
          value: function () {
            var e,
              n,
              r,
              i = $a((e = [90, -90, "90", "-90"])).call(e, window.orientation);
            if (
              (n = this._player) !== null &&
              n !== void 0 &&
              n.fullscreen &&
              i
            )
              this.changeMode(nC.Fullscreen);
            else if (
              this._listType !==
              ((r = this._config) === null || r === void 0
                ? void 0
                : r.listType)
            ) {
              var o;
              this.changeMode(
                (o = this._config) === null || o === void 0
                  ? void 0
                  : o.listType
              );
            }
          },
        },
        {
          key: "_bindDomEvent",
          value: function () {
            var e = Na.device === "mobile" ? "touchend" : "click";
            this._listType === nC.Inner &&
              this._container &&
              this._bind(this._container, e, this._handleHide.bind(this)),
              this._root &&
                this._bind(this._root, e, this._handleHide.bind(this)),
              this._container &&
                this._bind(this._container, e, this._stopPropagation),
              this._listDom &&
                (this._delegates = ml.delegate.call(
                  this,
                  this._listDom,
                  ".panel-item",
                  e,
                  this._onItemClick.bind(this),
                  !0
                ));
          },
        },
        {
          key: "_unbindDomEvent",
          value: function () {
            var e,
              n = Na.device === "mobile" ? "touchend" : "click";
            this._root &&
              this._unbind(this._root, n, this._handleHide.bind(this)),
              this._container &&
                this._unbind(this._container, n, this._handleHide.bind(this)),
              this._container &&
                this._unbind(this._container, n, this._stopPropagation),
              this._delegates &&
                (On((e = this._delegates)).call(e, function (r) {
                  r.destroy && r.destroy();
                }),
                (this._delegates = null));
          },
        },
        {
          key: "_stopPropagation",
          value: function (e) {
            e.stopPropagation(), e.preventDefault();
          },
        },
        {
          key: "_onItemClick",
          value: function (e) {
            var n,
              r,
              i,
              o,
              l = e.delegateTarget,
              u =
                typeof this._config.onOptionClick == "function"
                  ? this._config.onOptionClick
                  : null,
              c =
                typeof this._config.onItemClick == "function"
                  ? this._config.onItemClick
                  : null,
              d =
                (n = this._root) === null || n === void 0
                  ? void 0
                  : n.querySelector(".selected");
            Pt.addClass(l, "selected"),
              d &&
                (Pt.removeClass(d, "selected"),
                (o = Number(d.getAttribute("data-index"))));
            var h = Number(l.getAttribute("data-index")),
              f = {
                from:
                  ti(o) !== void 0
                    ? (r = this._config.list) === null || r === void 0
                      ? void 0
                      : r[o]
                    : void 0,
                to:
                  (i = this._config.list) === null || i === void 0
                    ? void 0
                    : i[h],
              };
            u == null || u(e, f), (l && o === h) || c == null || c(e, f);
          },
        },
        {
          key: "_handleHide",
          value: function (e) {
            var n, r;
            e.stopPropagation(),
              e.preventDefault(),
              (n = (r = this._config).hide) === null ||
                n === void 0 ||
                n.call(r);
          },
        },
      ]),
      t
    );
  })(),
  nC = (function (t) {
    return (
      (t.Middle = "middle"),
      (t.Bottom = "bottom"),
      (t.Fullscreen = "fullscreen"),
      (t.Inner = "inner"),
      t
    );
  })(nC || {}),
  jUe = (function (t) {
    return (t.Icon = "Icon"), (t.Text = "Text"), t;
  })(jUe || {}),
  R2 = Na.device === "mobile",
  Zye = ["bottom", "fullscreen", "inner"],
  Yye = ["middle"],
  $A = ["bottom", "inner", "fullscreen"],
  Qye = ["bottom", "inner", "fullscreen"],
  GI = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n),
        bn(os((i = e.call(this, r))), "optionsList", void 0),
        bn(os(i), "_isIcon", void 0),
        bn(os(i), "_isActive", void 0),
        bn(os(i), "_curIndex", void 0),
        bn(os(i), "activeEvent", void 0),
        bn(os(i), "onEnter", function (o) {
          o.preventDefault(),
            o.stopPropagation(),
            i.emit("icon_mouseenter", { pluginName: i.pluginName }),
            i.toggle(!0);
        }),
        bn(os(i), "onLeave", function (o) {
          o.preventDefault(),
            o.stopPropagation(),
            i.emit("icon_mouseleave", { pluginName: i.pluginName }),
            i._isActive && i.toggle(!1);
        }),
        (i._isIcon = !1),
        (i._isActive = !1),
        (i._curIndex = 0),
        i
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "updateLang",
            value: function () {
              this.config.list &&
                this.renderItemList(this.config.list, this._curIndex);
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r = this,
                i = this.config;
              (this.config.listType = this._getListType()),
                this.initIcons(),
                i.hidePortrait && Pt.addClass(this.root, "portrait"),
                R2 &&
                  this.on(yse, function () {
                    r._isActive &&
                      (r.optionsList && r.optionsList.hide(),
                      (r._isActive = !1));
                  }),
                i.list && this.renderItemList(i.list),
                (this.activeEvent = R2 ? "touchend" : "mouseenter"),
                this.bind(this.activeEvent, this.onEnter),
                this.bind("mouseleave", this.onLeave);
            },
          },
          {
            key: "initIcons",
            value: function () {
              var r = this,
                i = this.icons,
                o = Dn(i);
              if (o.length > 0 && this.config.renderType === "Icon")
                return (
                  o.forEach(function (u) {
                    r.appendChild(".xgplayer-icon", i[u]);
                  }),
                  void (this._isIcon = !0)
                );
              var l = this.appendChild(
                ".xgplayer-icon",
                Pt.createDom("span", "", {}, "icon-text")
              );
              l && Pt.addClass(l, "btn-text");
            },
          },
          {
            key: "show",
            value: function () {
              !this.config.list ||
                this.config.list.length < 1 ||
                (this.config.hideOnSingleOption &&
                  this.config.list.length === 1) ||
                Pt.addClass(this.root, "show");
            },
          },
          {
            key: "hide",
            value: function () {
              Pt.removeClass(this.root, "show");
            },
          },
          {
            key: "toggle",
            value: function (r) {
              if (r !== this._isActive) {
                var i = this.player.controls,
                  o = this.config.listType;
                r
                  ? (o && $a($A).call($A, o)
                      ? i == null || i.blur()
                      : i == null || i.focus(),
                    this.optionsList && this.optionsList.show())
                  : (o && $a($A).call($A, o)
                      ? i == null || i.focus()
                      : i == null || i.focusAwhile(),
                    this.optionsList && this.optionsList.hide()),
                  (this._isActive = r);
              }
            },
          },
          {
            key: "onItemClick",
            value: function (r, i) {
              var o;
              r.preventDefault(), r.stopPropagation();
              var l = this.config.listType;
              (this._curIndex =
                (o = i.to) === null || o === void 0 ? void 0 : o.index),
                this.changeCurrentText(),
                (this.config.isItemClickHide || (l && $a($A).call($A, l))) &&
                  this.toggle(!1);
            },
          },
          {
            key: "onOptionClick",
            value: function (r, i) {
              r.preventDefault(), r.stopPropagation();
            },
          },
          {
            key: "changeCurrentText",
            value: function () {
              if (!this._isIcon) {
                var r = this.config.list,
                  i = r && this._curIndex < r.length ? this._curIndex : 0,
                  o = r == null ? void 0 : r[i];
                if (o) {
                  var l,
                    u = ji(this).call(this, ".icon-text"),
                    c = this.player.config.i18nManager;
                  u &&
                    (u.innerHTML = c.normalize(
                      (l = o == null ? void 0 : o.iconText) !== null &&
                        l !== void 0
                        ? l
                        : o == null
                        ? void 0
                        : o.text
                    ));
                }
              }
            },
          },
          {
            key: "renderItemList",
            value: function (r, i) {
              var o,
                l = this,
                u = this.config,
                c = this.optionsList,
                d = this.player;
              if ((typeof i == "number" && (this._curIndex = i), c))
                return (
                  c.renderItemList(r),
                  this.changeCurrentText(),
                  void (c instanceof Kye && c.renderTitle())
                );
              this.config.isShowIcon &&
                ((this.optionsList =
                  u.listType && $a(Qye).call(Qye, u.listType)
                    ? new Kye({
                        config: {
                          list: r || [],
                          onItemClick: function (h, f) {
                            l.onItemClick(h, f);
                          },
                          onOptionClick: function (h, f) {
                            l.onOptionClick(h, f);
                          },
                          panel: this.config.panel,
                          listType:
                            (o = u.listType) !== null && o !== void 0
                              ? o
                              : n.defaultConfig.listType,
                          isAutoChange: u.isAutoChange,
                          hide: function () {
                            return l.toggle(!1);
                          },
                        },
                        root: d.root,
                        player: d,
                      })
                    : new G$t({
                        config: {
                          data: r || [],
                          onItemClick: function (h, f) {
                            l.onItemClick(h, f);
                          },
                        },
                        root: this.root,
                      })),
                this.changeCurrentText(),
                this.show());
            },
          },
          {
            key: "destroy",
            value: function () {
              this.activeEvent && this.unbind(this.activeEvent, this.onEnter),
                this.unbind("mouseleave", this.onLeave),
                this.optionsList &&
                  (this.optionsList.destroy(), (this.optionsList = void 0));
            },
          },
          {
            key: "render",
            value: function () {
              return this.config.isShowIcon
                ? '<xg-icon class="xg-options-icon '.concat(
                    this.config.className || "",
                    `">
      <div class="xgplayer-icon">
      </div>
    </xg-icon>`
                  )
                : "";
            },
          },
          {
            key: "_getListType",
            value: function () {
              var r,
                i = this.config.listType;
              return (
                (r = this.player) !== null &&
                  r !== void 0 &&
                  (r = r.config) !== null &&
                  r !== void 0 &&
                  r.listType &&
                  (i = this.player.config.listType),
                R2 || (i && $a(Zye).call(Zye, i)) || (i = "bottom"),
                R2 || (i && $a(Yye).call(Yye, i)) || (i = "middle"),
                i
              );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "optionsIcon";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                position: R2 ? dU.ROOT_TOP_RIGHT : dU.CONTROLS_RIGHT,
                listType: R2 ? "bottom" : "middle",
                index: 100,
                list: [],
                listStyle: {},
                hidePortrait: !0,
                isShowIcon: !1,
                renderType: R2 ? "Icon" : "Text",
                isItemClickHide: !0,
                hideOnSingleOption: !0,
                isAutoChange: !0,
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  X5t = (function (t) {
    so(n, GI);
    var e = lo(n);
    function n() {
      return Wn(this, n), e.apply(this, arguments);
    }
    return (
      Kn(
        n,
        [
          {
            key: "updateLang",
            value: function () {
              this.renderItemList();
            },
          },
          {
            key: "beforeCreate",
            value: function (r) {
              var i = r.player.config.sources.sourceManager;
              r.config.list = i.sources;
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return { source: { icon: H5t } };
            },
          },
          {
            key: "renderItemList",
            value: function () {
              var r = this.config.sourceManager,
                i = r.sources,
                o = r.source,
                l = this.player.config.i18nManager;
              if (i.length < 2) this.hide();
              else {
                var u = On(i).call(i, function (d) {
                    var h;
                    return $n(
                      $n({}, d),
                      {},
                      {
                        showText:
                          (h = l.normalize(d.text)) !== null && h !== void 0
                            ? h
                            : d.name,
                        selected: !1,
                      }
                    );
                  }),
                  c = iU(u).call(u, function (d) {
                    return d.name === (o == null ? void 0 : o.name);
                  });
                (this.config.list = i),
                  c > -1 && (u[c].selected = !0),
                  Eo(po(n.prototype), "renderItemList", this).call(this, u, c);
              }
            },
          },
          {
            key: "onItemClick",
            value: function (r, i) {
              var o,
                l = this;
              Eo(po(n.prototype), "onItemClick", this).call(this, r, i),
                (o = this.player.config) === null ||
                  o === void 0 ||
                  o.veplayer
                    .switch(
                      { source: i.to.name },
                      { fallbackToFirstDefinition: !0 }
                    )
                    .catch(function () {
                      l.renderItemList();
                    });
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "sources";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return $n(
                $n({}, GI.defaultConfig),
                {},
                {
                  index: 4,
                  panel: {
                    title: {
                      jp: "ライン選ぶ",
                      en: "Line Choose",
                      "zh-cn": "线路选择",
                      "zh-hk": "線路選擇",
                    },
                  },
                  list: [],
                  className: "xgplayer-sources",
                  hidePortrait: !1,
                  isShowIcon: !0,
                }
              );
            },
          },
          {
            key: "textTips",
            get: function () {
              return {
                jp: "ライン",
                en: "Line",
                "zh-cn": "线路",
                "zh-hk": "線路",
              };
            },
          },
        ]
      ),
      n
    );
  })();
function V5t() {
  return new DOMParser().parseFromString(
    `<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M16 3.8001H4C3.55817 3.8001 3.2 4.15827 3.2 4.6001V12.6001C3.2 13.0419 3.55817 13.4001 4 13.4001H16C16.4418 13.4001 16.8 13.0419 16.8 12.6001V4.6001C16.8 4.15827 16.4418 3.8001 16 3.8001ZM4 2.6001C2.89543 2.6001 2 3.49553 2 4.6001V12.6001C2 13.7047 2.89543 14.6001 4 14.6001H16C17.1046 14.6001 18 13.7047 18 12.6001V4.6001C18 3.49553 17.1046 2.6001 16 2.6001H4ZM5.0249 6.24509V11.6001H5.9024V9.23009H8.6174V11.6001H9.4949V6.24509H8.6174V8.48009H5.9024V6.24509H5.0249ZM10.5474 6.24509V11.6001H12.5049C13.3749 11.6001 14.0274 11.3601 14.4774 10.8801C14.9049 10.4226 15.1224 9.77009 15.1224 8.92259C15.1224 8.06759 14.9049 7.41509 14.4774 6.96509C14.0274 6.48509 13.3749 6.24509 12.5049 6.24509H10.5474ZM11.4249 6.99509H12.3399C13.0074 6.99509 13.4949 7.14509 13.8024 7.45259C14.1024 7.75259 14.2524 8.24759 14.2524 8.92259C14.2524 9.58259 14.1024 10.0701 13.8024 10.3851C13.4949 10.6926 13.0074 10.8501 12.3399 10.8501H11.4249V6.99509ZM4.15 16.1001C3.79101 16.1001 3.5 16.3911 3.5 16.7501C3.5 17.1091 3.79101 17.4001 4.15 17.4001H15.85C16.209 17.4001 16.5 17.1091 16.5 16.7501C16.5 16.3911 16.209 16.1001 15.85 16.1001H4.15Z" fill="#ffffff"/>
</svg>`,
    "image/svg+xml"
  ).firstChild;
}
var _F = { exports: {} };
_F.exports,
  (function (t, e) {
    var n = "__lodash_hash_undefined__",
      r = 9007199254740991,
      i = "[object Arguments]",
      o = "[object Boolean]",
      l = "[object Date]",
      u = "[object Function]",
      c = "[object GeneratorFunction]",
      d = "[object Map]",
      h = "[object Number]",
      f = "[object Object]",
      p = "[object Promise]",
      g = "[object RegExp]",
      y = "[object Set]",
      v = "[object String]",
      b = "[object Symbol]",
      w = "[object WeakMap]",
      k = "[object ArrayBuffer]",
      D = "[object DataView]",
      $ = "[object Float32Array]",
      N = "[object Float64Array]",
      P = "[object Int8Array]",
      I = "[object Int16Array]",
      O = "[object Int32Array]",
      X = "[object Uint8Array]",
      G = "[object Uint8ClampedArray]",
      H = "[object Uint16Array]",
      E = "[object Uint32Array]",
      S = /\w*$/,
      L = /^\[object .+?Constructor\]$/,
      W = /^(?:0|[1-9]\d*)$/,
      F = {};
    (F[i] =
      F["[object Array]"] =
      F[k] =
      F[D] =
      F[o] =
      F[l] =
      F[$] =
      F[N] =
      F[P] =
      F[I] =
      F[O] =
      F[d] =
      F[h] =
      F[f] =
      F[g] =
      F[y] =
      F[v] =
      F[b] =
      F[X] =
      F[G] =
      F[H] =
      F[E] =
        !0),
      (F["[object Error]"] = F[u] = F[w] = !1);
    var oe = ti(Pc) == "object" && Pc && Pc.Object === Object && Pc,
      De =
        (typeof self > "u" ? "undefined" : ti(self)) == "object" &&
        self &&
        self.Object === Object &&
        self,
      Xe = oe || De || Function("return this")(),
      ze = e && !e.nodeType && e,
      ht = ze && t && !t.nodeType && t,
      gt = ht && ht.exports === ze;
    function pt(Ot, _n) {
      return Ot.set(_n[0], _n[1]), Ot;
    }
    function $t(Ot, _n) {
      return Ot.add(_n), Ot;
    }
    function ot(Ot, _n, gr, ut) {
      var Si = -1,
        cn = Ot ? Ot.length : 0;
      for (ut && cn && (gr = Ot[++Si]); ++Si < cn; )
        gr = _n(gr, Ot[Si], Si, Ot);
      return gr;
    }
    function tt(Ot) {
      var _n = !1;
      if (Ot != null && typeof Ot.toString != "function")
        try {
          _n = !!(Ot + "");
        } catch {}
      return _n;
    }
    function He(Ot) {
      var _n = -1,
        gr = Array(Ot.size);
      return (
        Ot.forEach(function (ut, Si) {
          gr[++_n] = [Si, ut];
        }),
        gr
      );
    }
    function de(Ot, _n) {
      return function (gr) {
        return Ot(_n(gr));
      };
    }
    function ue(Ot) {
      var _n = -1,
        gr = Array(Ot.size);
      return (
        Ot.forEach(function (ut) {
          gr[++_n] = ut;
        }),
        gr
      );
    }
    var Z,
      ie = Array.prototype,
      Ne = Function.prototype,
      Pe = Object.prototype,
      kt = Xe["__core-js_shared__"],
      Gt = (Z = /[^.]+$/.exec((kt && hv(kt) && hv(kt).IE_PROTO) || ""))
        ? "Symbol(src)_1." + Z
        : "",
      B = Ne.toString,
      re = Pe.hasOwnProperty,
      Ae = Pe.toString,
      lt = RegExp(
        "^" +
          B.call(re)
            .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&")
            .replace(
              /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
              "$1.*?"
            ) +
          "$"
      ),
      Et = gt ? Xe.Buffer : void 0,
      St = Xe.Symbol,
      Lt = Xe.Uint8Array,
      ln = de(MI, Object),
      Ln = Object.create,
      Tr = Pe.propertyIsEnumerable,
      sr = tl(ie),
      hi = Mc,
      Ra = Et ? Et.isBuffer : void 0,
      En = de(Dn, Object),
      Zn = Xt(Xe, "DataView"),
      on = Xt(Xe, "Map"),
      rn = Xt(Xe, "Promise"),
      It = Xt(Xe, "Set"),
      wt = Xt(Xe, "WeakMap"),
      Mt = Xt(Object, "create"),
      Wt = sn(Zn),
      Ft = sn(on),
      un = sn(rn),
      Yt = sn(It),
      Qt = sn(wt),
      Sn = St ? St.prototype : void 0,
      ar = Sn ? Sn.valueOf : void 0;
    function ye(Ot) {
      var _n = -1,
        gr = Ot ? Ot.length : 0;
      for (this.clear(); ++_n < gr; ) {
        var ut = Ot[_n];
        this.set(ut[0], ut[1]);
      }
    }
    function Gn(Ot) {
      var _n = -1,
        gr = Ot ? Ot.length : 0;
      for (this.clear(); ++_n < gr; ) {
        var ut = Ot[_n];
        this.set(ut[0], ut[1]);
      }
    }
    function Ht(Ot) {
      var _n = -1,
        gr = Ot ? Ot.length : 0;
      for (this.clear(); ++_n < gr; ) {
        var ut = Ot[_n];
        this.set(ut[0], ut[1]);
      }
    }
    function yr(Ot) {
      this.__data__ = new Gn(Ot);
    }
    function T(Ot, _n) {
      var gr =
          Ct(Ot) ||
          (function (ir) {
            return (
              (function (jr) {
                return (
                  (function (Yr) {
                    return !!Yr && ti(Yr) == "object";
                  })(jr) && At(jr)
                );
              })(ir) &&
              re.call(ir, "callee") &&
              (!Tr.call(ir, "callee") || Ae.call(ir) == i)
            );
          })(Ot)
            ? (function (ir, jr) {
                for (var Yr = -1, Qi = Array(ir); ++Yr < ir; ) Qi[Yr] = jr(Yr);
                return Qi;
              })(Ot.length, String)
            : [],
        ut = gr.length,
        Si = !!ut;
      for (var cn in Ot)
        (!_n && !re.call(Ot, cn)) ||
          (Si && (cn == "length" || Ui(cn, ut))) ||
          gr.push(cn);
      return gr;
    }
    function Jn(Ot, _n, gr) {
      var ut = Ot[_n];
      (re.call(Ot, _n) && Ye(ut, gr) && (gr !== void 0 || _n in Ot)) ||
        (Ot[_n] = gr);
    }
    function pr(Ot, _n) {
      for (var gr = Ot.length; gr--; ) if (Ye(Ot[gr][0], _n)) return gr;
      return -1;
    }
    function Ut(Ot, _n, gr, ut, Si, cn, ir) {
      var jr;
      if ((ut && (jr = cn ? ut(Ot, Si, cn, ir) : ut(Ot)), jr !== void 0))
        return jr;
      if (!wn(Ot)) return Ot;
      var Yr = Ct(Ot);
      if (Yr) {
        if (
          ((jr = (function (Fr) {
            var Wr = Fr.length,
              si = Fr.constructor(Wr);
            return (
              Wr &&
                typeof Fr[0] == "string" &&
                re.call(Fr, "index") &&
                ((si.index = Fr.index), (si.input = Fr.input)),
              si
            );
          })(Ot)),
          !_n)
        )
          return (function (Fr, Wr) {
            var si = -1,
              ma = Fr.length;
            for (Wr || (Wr = Array(ma)); ++si < ma; ) Wr[si] = Fr[si];
            return Wr;
          })(Ot, jr);
      } else {
        var Qi = cr(Ot),
          Wa = Qi == u || Qi == c;
        if (Pn(Ot))
          return (function (Fr, Wr) {
            if (Wr) return jn(Fr).call(Fr);
            var si = new Fr.constructor(Fr.length);
            return Fr.copy(si), si;
          })(Ot, _n);
        if (Qi == f || Qi == i || (Wa && !cn)) {
          if (tt(Ot)) return cn ? Ot : {};
          if (
            ((jr = (function (Fr) {
              return typeof Fr.constructor != "function" || Je(Fr)
                ? {}
                : (function (Wr) {
                    return wn(Wr) ? Ln(Wr) : {};
                  })(ln(Fr));
            })(Wa ? {} : Ot)),
            !_n)
          )
            return (function (Fr, Wr) {
              return vn(Fr, qn(Fr), Wr);
            })(
              Ot,
              (function (Fr, Wr) {
                return Fr && vn(Wr, Vn(Wr), Fr);
              })(jr, Ot)
            );
        } else {
          if (!F[Qi]) return cn ? Ot : {};
          jr = (function (Fr, Wr, si, ma) {
            var Aa = Fr.constructor;
            switch (Wr) {
              case k:
                return Kt(Fr);
              case o:
              case l:
                return new Aa(+Fr);
              case D:
                return (function (Ki, Ro) {
                  var Xo = Ro ? Kt(Ki.buffer) : Ki.buffer;
                  return new Ki.constructor(Xo, Ki.byteOffset, Ki.byteLength);
                })(Fr, ma);
              case $:
              case N:
              case P:
              case I:
              case O:
              case X:
              case G:
              case H:
              case E:
                return (function (Ki, Ro) {
                  var Xo = Ro ? Kt(Ki.buffer) : Ki.buffer;
                  return new Ki.constructor(Xo, Ki.byteOffset, Ki.length);
                })(Fr, ma);
              case d:
                return (function (Ki, Ro, Xo) {
                  var Ns = Ro ? Xo(He(Ki), !0) : He(Ki);
                  return ot(Ns, pt, new Ki.constructor());
                })(Fr, ma, si);
              case h:
              case v:
                return new Aa(Fr);
              case g:
                return (function (Ki) {
                  var Ro = new Ki.constructor(Ki.source, S.exec(Ki));
                  return (Ro.lastIndex = Ki.lastIndex), Ro;
                })(Fr);
              case y:
                return (function (Ki, Ro, Xo) {
                  var Ns = Ro ? Xo(ue(Ki), !0) : ue(Ki);
                  return ot(Ns, $t, new Ki.constructor());
                })(Fr, ma, si);
              case b:
                return (Sl = Fr), ar ? Object(ar.call(Sl)) : {};
            }
            var Sl;
          })(Ot, Qi, Ut, _n);
        }
      }
      ir || (ir = new yr());
      var Ni = ir.get(Ot);
      if (Ni) return Ni;
      if ((ir.set(Ot, jr), !Yr))
        var ka = gr
          ? (function (Fr) {
              return (function (Wr, si, ma) {
                var Aa = si(Wr);
                return Ct(Wr)
                  ? Aa
                  : (function (Sl, Ki) {
                      for (
                        var Ro = -1, Xo = Ki.length, Ns = Sl.length;
                        ++Ro < Xo;

                      )
                        Sl[Ns + Ro] = Ki[Ro];
                      return Sl;
                    })(Aa, ma(Wr));
              })(Fr, Vn, qn);
            })(Ot)
          : Vn(Ot);
      return (
        (function (Fr, Wr) {
          for (
            var si = -1, ma = Fr ? Fr.length : 0;
            ++si < ma && Wr(Fr[si], si, Fr) !== !1;

          );
        })(ka || Ot, function (Fr, Wr) {
          ka && (Fr = Ot[(Wr = Fr)]),
            Jn(jr, Wr, Ut(Fr, _n, gr, ut, Wr, Ot, ir));
        }),
        jr
      );
    }
    function Dt(Ot) {
      return (
        !(!wn(Ot) || ((_n = Ot), Gt && Gt in _n)) &&
        (Xn(Ot) || tt(Ot) ? lt : L).test(sn(Ot))
      );
      var _n;
    }
    function Kt(Ot) {
      var _n = new Ot.constructor(Ot.byteLength);
      return new Lt(_n).set(new Lt(Ot)), _n;
    }
    function vn(Ot, _n, gr, ut) {
      gr || (gr = {});
      for (var Si = -1, cn = _n.length; ++Si < cn; ) {
        var ir = _n[Si],
          jr = ut ? ut(gr[ir], Ot[ir], ir, gr, Ot) : void 0;
        Jn(gr, ir, jr === void 0 ? Ot[ir] : jr);
      }
      return gr;
    }
    function st(Ot, _n) {
      var gr,
        ut,
        Si = Ot.__data__;
      return (
        (ut = ti((gr = _n))) == "string" ||
        ut == "number" ||
        ut == "symbol" ||
        ut == "boolean"
          ? gr !== "__proto__"
          : gr === null
      )
        ? Si[typeof _n == "string" ? "string" : "hash"]
        : On(Si);
    }
    function Xt(Ot, _n) {
      var gr = (function (ut, Si) {
        return ut == null ? void 0 : ut[Si];
      })(Ot, _n);
      return Dt(gr) ? gr : void 0;
    }
    (ye.prototype.clear = function () {
      this.__data__ = Mt ? Mt(null) : {};
    }),
      (ye.prototype.delete = function (Ot) {
        return this.has(Ot) && delete this.__data__[Ot];
      }),
      (ye.prototype.get = function (Ot) {
        var _n = this.__data__;
        if (Mt) {
          var gr = _n[Ot];
          return gr === n ? void 0 : gr;
        }
        return re.call(_n, Ot) ? _n[Ot] : void 0;
      }),
      (ye.prototype.has = function (Ot) {
        var _n = this.__data__;
        return Mt ? _n[Ot] !== void 0 : re.call(_n, Ot);
      }),
      (ye.prototype.set = function (Ot, _n) {
        return (this.__data__[Ot] = Mt && _n === void 0 ? n : _n), this;
      }),
      (Gn.prototype.clear = function () {
        this.__data__ = [];
      }),
      (Gn.prototype.delete = function (Ot) {
        var _n = this.__data__,
          gr = pr(_n, Ot);
        return (
          !(gr < 0) && (gr == _n.length - 1 ? _n.pop() : sr.call(_n, gr, 1), !0)
        );
      }),
      (Gn.prototype.get = function (Ot) {
        var _n = this.__data__,
          gr = pr(_n, Ot);
        return gr < 0 ? void 0 : _n[gr][1];
      }),
      (Gn.prototype.has = function (Ot) {
        return pr(this.__data__, Ot) > -1;
      }),
      (Gn.prototype.set = function (Ot, _n) {
        var gr = this.__data__,
          ut = pr(gr, Ot);
        return ut < 0 ? gr.push([Ot, _n]) : (gr[ut][1] = _n), this;
      }),
      (Ht.prototype.clear = function () {
        this.__data__ = {
          hash: new ye(),
          map: new (on || Gn)(),
          string: new ye(),
        };
      }),
      (Ht.prototype.delete = function (Ot) {
        return st(this, Ot).delete(Ot);
      }),
      (Ht.prototype.get = function (Ot) {
        return st(this, Ot).get(Ot);
      }),
      (Ht.prototype.has = function (Ot) {
        return st(this, Ot).has(Ot);
      }),
      (Ht.prototype.set = function (Ot, _n) {
        return st(this, Ot).set(Ot, _n), this;
      }),
      (yr.prototype.clear = function () {
        this.__data__ = new Gn();
      }),
      (yr.prototype.delete = function (Ot) {
        return this.__data__.delete(Ot);
      }),
      (yr.prototype.get = function (Ot) {
        return this.__data__.get(Ot);
      }),
      (yr.prototype.has = function (Ot) {
        return this.__data__.has(Ot);
      }),
      (yr.prototype.set = function (Ot, _n) {
        var gr = this.__data__;
        if (gr instanceof Gn) {
          var ut = gr.__data__;
          if (!on || ut.length < 199) return ut.push([Ot, _n]), this;
          gr = this.__data__ = new Ht(ut);
        }
        return gr.set(Ot, _n), this;
      });
    var qn = hi
        ? de(hi, Object)
        : function () {
            return [];
          },
      cr = function (Ot) {
        return Ae.call(Ot);
      };
    function Ui(Ot, _n) {
      return (
        !!(_n = _n ?? r) &&
        (typeof Ot == "number" || W.test(Ot)) &&
        Ot > -1 &&
        Ot % 1 == 0 &&
        Ot < _n
      );
    }
    function Je(Ot) {
      var _n = Ot && Ot.constructor;
      return Ot === ((typeof _n == "function" && _n.prototype) || Pe);
    }
    function sn(Ot) {
      if (Ot != null) {
        try {
          return B.call(Ot);
        } catch {}
        try {
          return Ot + "";
        } catch {}
      }
      return "";
    }
    function Ye(Ot, _n) {
      return Ot === _n || (Ot != Ot && _n != _n);
    }
    ((Zn && cr(new Zn(new ArrayBuffer(1))) != D) ||
      (on && cr(new on()) != d) ||
      (rn && cr(rn.resolve()) != p) ||
      (It && cr(new It()) != y) ||
      (wt && cr(new wt()) != w)) &&
      (cr = function (Ot) {
        var _n = Ae.call(Ot),
          gr = _n == f ? Ot.constructor : void 0,
          ut = gr ? sn(gr) : void 0;
        if (ut)
          switch (ut) {
            case Wt:
              return D;
            case Ft:
              return d;
            case un:
              return p;
            case Yt:
              return y;
            case Qt:
              return w;
          }
        return _n;
      });
    var Ct = Array.isArray;
    function At(Ot) {
      return (
        Ot != null &&
        (function (_n) {
          return typeof _n == "number" && _n > -1 && _n % 1 == 0 && _n <= r;
        })(Ot.length) &&
        !Xn(Ot)
      );
    }
    var Pn =
      Ra ||
      function () {
        return !1;
      };
    function Xn(Ot) {
      var _n = wn(Ot) ? Ae.call(Ot) : "";
      return _n == u || _n == c;
    }
    function wn(Ot) {
      var _n = ti(Ot);
      return !!Ot && (_n == "object" || _n == "function");
    }
    function Vn(Ot) {
      return At(Ot)
        ? T(Ot)
        : (function (_n) {
            if (!Je(_n)) return En(_n);
            var gr = [];
            for (var ut in Object(_n))
              re.call(_n, ut) && ut != "constructor" && gr.push(ut);
            return gr;
          })(Ot);
    }
    t.exports = function (Ot) {
      return Ut(Ot, !0, !0);
    };
  })(_F, _F.exports);
var z5t = _F.exports,
  WUe = xr(z5t),
  j5t = (function (t) {
    so(r, GI);
    var e,
      n = lo(r);
    function r() {
      var i, o;
      Wn(this, r);
      for (var l = arguments.length, u = new Array(l), c = 0; c < l; c++)
        u[c] = arguments[c];
      return (
        bn(
          os((o = n.call.apply(n, Ce((i = [this])).call(i, u)))),
          "_waitingStartTime",
          0
        ),
        bn(os(o), "_timer", void 0),
        bn(os(o), "_toastId", void 0),
        o
      );
    }
    return (
      Kn(
        r,
        [
          {
            key: "updateLang",
            value: function () {
              this.renderItemList();
            },
          },
          {
            key: "beforeCreate",
            value: function (i) {
              var o,
                l = i.player.config.sources.sourceManager;
              i.config.list =
                (o = l.source) === null || o === void 0
                  ? void 0
                  : o.definitions;
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var i, o;
              Eo(po(r.prototype), "afterCreate", this).call(this),
                ((i =
                  (o = this.player.config.sourceManager.source) === null ||
                  o === void 0
                    ? void 0
                    : o.definitions) !== null && i !== void 0
                  ? i
                  : []
                ).length < 2
                  ? this.hide()
                  : (this.renderItemList(),
                    this.on(cc.WAITING, this._waiting.bind(this)),
                    this.on(cc.PLAYING, this._clearTimer.bind(this)),
                    this.on(cc.PAUSE, this._clearTimer.bind(this)),
                    this.on(cc.PLAY, this._clearTimer.bind(this)),
                    this._initTimeUpdateEvent());
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return { source: { icon: V5t } };
            },
          },
          {
            key: "renderItemList",
            value: function () {
              var i,
                o,
                l,
                u = this,
                c = this.player.config.sourceManager,
                d =
                  (i =
                    (o = c.source) === null || o === void 0
                      ? void 0
                      : o.definitions) !== null && i !== void 0
                    ? i
                    : [];
              if (d.length < 2) this.hide();
              else {
                var h = On(d).call(d, function (p) {
                    var g;
                    return {
                      url: p.url,
                      definition: p.definition || "",
                      showText:
                        (g = u.player.config.i18nManager.normalize(p.text)) !==
                          null && g !== void 0
                          ? g
                          : p.definition,
                      selected: !1,
                    };
                  }),
                  f = iU(d).call(d, function (p) {
                    var g;
                    return (
                      p.definition ===
                      ((g = c.definition) === null || g === void 0
                        ? void 0
                        : g.definition)
                    );
                  });
                (this.config.list =
                  (l = c.source) === null || l === void 0
                    ? void 0
                    : l.definitions),
                  f > -1 && (h[f].selected = !0),
                  Eo(po(r.prototype), "renderItemList", this).call(this, h, f);
              }
            },
          },
          {
            key: "onItemClick",
            value: function (i, o) {
              var l,
                u = this;
              this._showToast(o.to),
                Eo(po(r.prototype), "onItemClick", this).call(this, i, o),
                (l = this.player.config) === null ||
                  l === void 0 ||
                  l.veplayer
                    .switch({ definition: o.to.definition })
                    .catch(function () {
                      u.renderItemList();
                    });
            },
          },
          {
            key: "fallback",
            value:
              ((e = Gi(
                or().mark(function i() {
                  var o,
                    l,
                    u,
                    c,
                    d,
                    h,
                    f,
                    p = arguments;
                  return or().wrap(
                    function (g) {
                      for (;;)
                        switch ((g.prev = g.next)) {
                          case 0:
                            if (
                              ((u =
                                p.length > 0 && p[0] !== void 0
                                  ? p[0]
                                  : { toast: !0 }),
                              (c = this.player.config.sourceManager),
                              !(
                                (d = iU((o = this.config.demotePriority)).call(
                                  o,
                                  function (y) {
                                    var v;
                                    return (
                                      y ===
                                      ((v = c.definition) === null ||
                                      v === void 0
                                        ? void 0
                                        : v.definition)
                                    );
                                  }
                                )) < 0
                              ))
                            ) {
                              g.next = 5;
                              break;
                            }
                            return g.abrupt("return");
                          case 5:
                            if (
                              ((h = WUe(c.definition)),
                              (f = this._getNextDefinition(d)))
                            ) {
                              g.next = 9;
                              break;
                            }
                            return g.abrupt("return");
                          case 9:
                            if (!u.toast) {
                              g.next = 15;
                              break;
                            }
                            return (g.next = 12), this._toast(f);
                          case 12:
                            if (g.sent) {
                              g.next = 15;
                              break;
                            }
                            return g.abrupt("return");
                          case 15:
                            this.player.emit(cc.DEFINITION_FALLBACK, {
                              from: h,
                              to: f,
                            }),
                              (l = this.player.config) === null ||
                                l === void 0 ||
                                l.veplayer
                                  .switch({ definition: f.definition })
                                  .catch(function () {});
                          case 17:
                          case "end":
                            return g.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_waiting",
            value: function () {
              var i = this;
              if (!this._timer) {
                this._waitingStartTime = Date.now();
                var o = this.player.currentTime;
                this._timer = window.setTimeout(function () {
                  i.player &&
                    i.player.currentTime <= o + 0.1 &&
                    (i.player.emit(cc.LONG_WAITING),
                    i.config.needFallback && i.fallback({ toast: !0 }),
                    i._clearTimer());
                }, this.config.longWaitingTime);
              }
            },
          },
          {
            key: "_clearTimer",
            value: function () {
              this._timer &&
                (clearTimeout(this._timer), (this._timer = void 0)),
                this._waitingStartTime && (this._waitingStartTime = 0);
            },
          },
          {
            key: "_toast",
            value: function (i) {
              var o = this,
                l = this.player.config.i18nManager;
              return new Ar(function (u) {
                var c,
                  d,
                  h =
                    (c = o.player) === null || c === void 0
                      ? void 0
                      : c.getPlugin("toast");
                if (h) {
                  var f = Pt.createDom(
                      "div",
                      l.getText("DEFINITION_FALLBACK_TOAST"),
                      void 0,
                      "veplayer-toast-txt"
                    ),
                    p =
                      (d = o.player.config.i18nManager.normalize(i.text)) !==
                        null && d !== void 0
                        ? d
                        : i.definition,
                    g = Pt.createDom(
                      "span",
                      p,
                      void 0,
                      "veplayer-toast-txt-bt"
                    );
                  f.appendChild(g);
                  var y = h.toast(f, { duration: 5e3, closable: !0 });
                  g.addEventListener("click", function () {
                    h.remove(y), u(!0);
                  });
                } else u(!1);
              });
            },
          },
          {
            key: "_getNextDefinition",
            value: function (i) {
              var o,
                l = this.player.config.sourceManager;
              if (
                (o = l.source) !== null &&
                o !== void 0 &&
                o.definitions.length &&
                !(i + 1 >= this.config.demotePriority.length)
              ) {
                var u = i + 1,
                  c = ji(l).call(l, {
                    definition: this.config.demotePriority[u],
                  });
                return c || this._getNextDefinition(u);
              }
            },
          },
          {
            key: "_initTimeUpdateEvent",
            value: function () {
              var i = this,
                o = this.player.currentTime;
              this.on(cc.TIME_UPDATE, function () {
                var l = i.player.currentTime;
                l !== o ? ((o = l), i._clearTimer()) : (o = l);
              });
            },
          },
          {
            key: "_showToast",
            value: function (i) {
              var o,
                l,
                u,
                c = this,
                d =
                  (o = this.player) === null || o === void 0
                    ? void 0
                    : o.getPlugin("toast"),
                h = this.player.config.i18nManager;
              d &&
                (this._toastId && d.remove(this._toastId),
                (this._toastId = d.toast(
                  Ce(
                    (l = "".concat(h.getText("DEFINITION_SWITCHING"), " "))
                  ).call(
                    l,
                    (u = i.showText) !== null && u !== void 0
                      ? u
                      : i.definition,
                    " ..."
                  ),
                  { duration: 2e3, closable: !0 }
                )),
                this.player.once(cc.AFTER_DEFINITION_CHANGE, function () {
                  c._toastId !== void 0 && d.remove(c._toastId);
                }));
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "definition";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return $n(
                $n({}, GI.defaultConfig),
                {},
                {
                  index: 3,
                  list: [],
                  panel: {
                    title: {
                      jp: "クラリティセレクション",
                      en: "Definition Choose",
                      "zh-cn": "清晰度选择",
                      "zh-hk": "清晰度選擇",
                    },
                  },
                  className: "xgplayer-definition",
                  hidePortrait: !1,
                  isShowIcon: !0,
                  longWaitingTime: 5e3,
                  needFallback: !1,
                  demotePriority: ["uhd", "hd", "sd", "ld", "ao"],
                }
              );
            },
          },
          {
            key: "textTips",
            get: function () {
              return {
                jp: "明快さ",
                en: "Definition",
                "zh-cn": "清晰度",
                "zh-hk": "清晰度",
              };
            },
          },
        ]
      ),
      r
    );
  })(),
  Jye = {
    "biz:vod": "veplayer.biz.vod.[env].[ext]",
    "biz:live": "veplayer.biz.live.[env].[ext]",
    "plugin:flv": "veplayer.plugin.flv.[env].[ext]",
    "plugin:mp4": "veplayer.plugin.mp4.[env].[ext]",
    "plugin:hls": "veplayer.plugin.hls.[env].[ext]",
    "plugin:hlsjs": "veplayer.plugin.hlsjs.[env].[ext]",
    "plugin:dashjs": "veplayer.plugin.dashjs.[env].[ext]",
    "plugin:shaka": "veplayer.plugin.shaka.[env].[ext]",
    "plugin:rtm": "veplayer.plugin.rtm.[env].[ext]",
    "plugin:xgvideo": "veplayer.plugin.xgvideo.[env].[ext]",
    "plugin:drm": "veplayer.plugin.drm.[env].[ext]",
    "plugin:abr": "veplayer.plugin.abr.[env].[ext]",
    "strategy:base": "veplayer.strategy.base.[env].[ext]",
    "strategy:rtmAdaptiveBuffer":
      "veplayer.strategy.rtm.adaptive.buffer.[env].[ext]",
  },
  Os = (function (t) {
    return (
      (t.BizVod = "biz:vod"),
      (t.BizLive = "biz:live"),
      (t.PluginFlv = "plugin:flv"),
      (t.PluginMp4 = "plugin:mp4"),
      (t.PluginHls = "plugin:hls"),
      (t.PluginHlsJs = "plugin:hlsjs"),
      (t.PluginDashJs = "plugin:dashjs"),
      (t.PluginShaka = "plugin:shaka"),
      (t.PluginRtm = "plugin:rtm"),
      (t.PluginXgvideo = "plugin:xgvideo"),
      (t.PluginDrm = "plugin:drm"),
      (t.PluginAbr = "plugin:abr"),
      (t.StrategyBase = "strategy:base"),
      (t.StrategyRtmAdaptiveBuffer = "strategy:rtmAdaptiveBuffer"),
      t
    );
  })(Os || {}),
  W5t = (function () {
    function t(e) {
      var n = this;
      Wn(this, t),
        bn(this, "modules", {}),
        bn(this, "mountPromiseMap", {}),
        bn(this, "_baseUrl", void 0),
        bn(this, "_moduleSystem", void 0),
        bn(
          this,
          "load",
          (function () {
            var r = Gi(
              or().mark(function i(o, l) {
                var u, c, d, h, f;
                return or().wrap(function (p) {
                  for (;;)
                    switch ((p.prev = p.next)) {
                      case 0:
                        if (n._moduleSystem) {
                          p.next = 2;
                          break;
                        }
                        throw new Error(
                          'You have to specify moduleSystem first, call "setModuleSystem(moduleSystem)" to set module system'
                        );
                      case 2:
                        if (Jye[o]) {
                          p.next = 4;
                          break;
                        }
                        throw new Error(
                          'Invalid module name: "'.concat(o, '"')
                        );
                      case 4:
                        if (n._moduleSystem !== "esm") {
                          p.next = 11;
                          break;
                        }
                        if (n.modules[o]) {
                          p.next = 9;
                          break;
                        }
                        throw new Error(
                          'Dynamic module "'.concat(
                            o,
                            '" not found, you have to register it first under ESM'
                          )
                        );
                      case 9:
                        return (
                          (c = n.modules[o].exports),
                          p.abrupt(
                            "return",
                            (u = c.default) !== null && u !== void 0 ? u : c
                          )
                        );
                      case 11:
                        if (!n.modules[o]) {
                          p.next = 21;
                          break;
                        }
                        if (n.modules[o].state !== 1) {
                          p.next = 16;
                          break;
                        }
                        return p.abrupt("return", n.modules[o].exports);
                      case 16:
                        if (n.modules[o].state !== 0) {
                          p.next = 20;
                          break;
                        }
                        return p.abrupt(
                          "return",
                          n.mountPromiseMap[o].then(function (g) {
                            var y;
                            return (y = g.default) !== null && y !== void 0
                              ? y
                              : g;
                          })
                        );
                      case 20:
                        throw (d = n.modules[o].error) !== null && d !== void 0
                          ? d
                          : new Error(
                              'Dynamic module "'.concat(o, '" load failed.')
                            );
                      case 21:
                        return (
                          (h = [n._baseUrl, Jye[o]]
                            .join("/")
                            .replace("[env]", "production")
                            .replace("[ext]", "js")),
                          (f = {
                            src: l ?? h,
                            name: o,
                            state: 0,
                            exports: { __PLUGIN_NAME__: o },
                          }),
                          (n.modules[o] = f),
                          (n.mountPromiseMap[o] = n._mount(f)),
                          p.abrupt("return", n.mountPromiseMap[o])
                        );
                      case 26:
                      case "end":
                        return p.stop();
                    }
                }, i);
              })
            );
            return function (i, o) {
              return r.apply(this, arguments);
            };
          })()
        ),
        bn(this, "registerPlugin", function (r, i) {
          if (!n._moduleSystem)
            throw new Error(
              "You have to specify moduleSystem first, call setModuleSystem(moduleSystem) to set module system"
            );
          return n._moduleSystem === "esm"
            ? ((n.modules[r] = {
                src: "esm:".concat(r),
                name: r,
                state: 1,
                exports: i,
              }),
              n.modules[r].exports)
            : (n.modules[r]
                ? (n.modules[r].exports = i)
                : (n.modules[r] = {
                    src: "umd:".concat(r),
                    name: r,
                    state: 1,
                    exports: i,
                  }),
              n.modules[r].exports);
        }),
        bn(this, "register", function (r) {
          return On(r).call(r, function (i) {
            return n.registerPlugin(i.__PLUGIN_NAME__, i);
          });
        }),
        (this._baseUrl = e.baseUrl);
    }
    return (
      Kn(t, [
        {
          key: "baseUrl",
          get: function () {
            return this._baseUrl;
          },
        },
        {
          key: "moduleSystem",
          get: function () {
            return this._moduleSystem;
          },
        },
        {
          key: "setModuleSystem",
          value: function (e) {
            this._moduleSystem = e;
          },
        },
        {
          key: "setBaseUrl",
          value: function (e) {
            this._baseUrl = e;
          },
        },
        {
          key: "_mount",
          value: function (e) {
            var n = this.modules;
            return new Ar(function (r, i) {
              var o = document.createElement("script");
              (o.src = e.src),
                (o.onload = function () {
                  (e.state = 1), r(n[e.name].exports), (o.onload = null);
                }),
                (o.onerror = function (l) {
                  (e.state = 2), (e.error = l), i(l), (o.onerror = null);
                }),
                document.body.appendChild(o);
            });
          },
        },
      ]),
      t
    );
  })(),
  K5t = UFe,
  cm = xr(K5t),
  Z5t = "Expected a function",
  qye = "__lodash_placeholder__",
  HS = 1,
  eB = 2,
  Y5t = 4,
  kS = 8,
  jC = 16,
  Zk = 32,
  _x = 64,
  KUe = 128,
  Q5t = 256,
  ZUe = 512,
  eve = 1 / 0,
  J5t = 9007199254740991,
  q5t = 17976931348623157e292,
  tve = NaN,
  eOt = [
    ["ary", KUe],
    ["bind", HS],
    ["bindKey", eB],
    ["curry", kS],
    ["curryRight", jC],
    ["flip", ZUe],
    ["partial", Zk],
    ["partialRight", _x],
    ["rearg", Q5t],
  ],
  tOt = "[object Function]",
  nOt = "[object GeneratorFunction]",
  rOt = "[object Symbol]",
  iOt = /[\\^$.*+?()[\]{}|]/g,
  aOt = /^\s+|\s+$/g,
  oOt = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  sOt = /\{\n\/\* \[wrapped with (.+)\] \*/,
  lOt = /,? & /,
  uOt = /^[-+]0x[0-9a-f]+$/i,
  cOt = /^0b[01]+$/i,
  dOt = /^\[object .+?Constructor\]$/,
  hOt = /^0o[0-7]+$/i,
  fOt = /^(?:0|[1-9]\d*)$/,
  pOt = _i,
  gOt = ti(Pc) == "object" && Pc && Pc.Object === Object && Pc,
  mOt =
    (typeof self > "u" ? "undefined" : ti(self)) == "object" &&
    self &&
    self.Object === Object &&
    self,
  t5 = gOt || mOt || Function("return this")();
function YUe(t, e, n) {
  switch (n.length) {
    case 0:
      return t.call(e);
    case 1:
      return t.call(e, n[0]);
    case 2:
      return t.call(e, n[0], n[1]);
    case 3:
      return t.call(e, n[0], n[1], n[2]);
  }
  return t.apply(e, n);
}
function yOt(t, e) {
  for (var n = -1, r = t ? t.length : 0; ++n < r && e(t[n], n, t) !== !1; );
  return t;
}
function vOt(t, e) {
  return !!(t && t.length) && _Ot(t, e, 0) > -1;
}
function bOt(t, e, n, r) {
  for (var i = t.length, o = n + (r ? 1 : -1); r ? o-- : ++o < i; )
    if (e(t[o], o, t)) return o;
  return -1;
}
function _Ot(t, e, n) {
  if (e != e) return bOt(t, TOt, n);
  for (var r = n - 1, i = t.length; ++r < i; ) if (t[r] === e) return r;
  return -1;
}
function TOt(t) {
  return t != t;
}
function EOt(t, e) {
  for (var n = t.length, r = 0; n--; ) t[n] === e && r++;
  return r;
}
function SOt(t, e) {
  return t == null ? void 0 : t[e];
}
function ROt(t) {
  var e = !1;
  if (t != null && typeof t.toString != "function")
    try {
      e = !!(t + "");
    } catch {}
  return e;
}
function QUe(t, e) {
  for (var n = -1, r = t.length, i = 0, o = []; ++n < r; ) {
    var l = t[n];
    (l !== e && l !== qye) || ((t[n] = qye), (o[i++] = n));
  }
  return o;
}
var AOt = Function.prototype,
  JUe = Object.prototype,
  RV = t5["__core-js_shared__"],
  nve = (function () {
    var t = /[^.]+$/.exec((RV && hv(RV) && hv(RV).IE_PROTO) || "");
    return t ? "Symbol(src)_1." + t : "";
  })(),
  qUe = AOt.toString,
  wOt = JUe.hasOwnProperty,
  e8e = JUe.toString,
  kOt = RegExp(
    "^" +
      qUe
        .call(wOt)
        .replace(iOt, "\\$&")
        .replace(
          /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
          "$1.*?"
        ) +
      "$"
  ),
  IOt = Object.create,
  cU = Math.max,
  DOt = Math.min,
  rve = (function () {
    var t = ive(Object, "defineProperty"),
      e = ive.name;
    return e && e.length > 2 ? t : void 0;
  })();
function POt(t) {
  return NI(t) ? IOt(t) : {};
}
function MOt(t) {
  return !(!NI(t) || HOt(t)) && (jOt(t) || ROt(t) ? kOt : dOt).test(VOt(t));
}
function COt(t, e, n, r) {
  for (
    var i = -1,
      o = t.length,
      l = n.length,
      u = -1,
      c = e.length,
      d = cU(o - l, 0),
      h = Array(c + d),
      f = !r;
    ++u < c;

  )
    h[u] = e[u];
  for (; ++i < l; ) (f || i < o) && (h[n[i]] = t[i]);
  for (; d--; ) h[u++] = t[i++];
  return h;
}
function $Ot(t, e, n, r) {
  for (
    var i = -1,
      o = t.length,
      l = -1,
      u = n.length,
      c = -1,
      d = e.length,
      h = cU(o - u, 0),
      f = Array(h + d),
      p = !r;
    ++i < h;

  )
    f[i] = t[i];
  for (var g = i; ++c < d; ) f[g + c] = e[c];
  for (; ++l < u; ) (p || i < o) && (f[g + n[l]] = t[i++]);
  return f;
}
function xOt(t, e) {
  var n = -1,
    r = t.length;
  for (e || (e = Array(r)); ++n < r; ) e[n] = t[n];
  return e;
}
function LOt(t, e, n) {
  var r = e & HS,
    i = Tx(t);
  return function o() {
    return (this && this !== t5 && this instanceof o ? i : t).apply(
      r ? n : this,
      arguments
    );
  };
}
function Tx(t) {
  return function () {
    var e = arguments;
    switch (e.length) {
      case 0:
        return new t();
      case 1:
        return new t(e[0]);
      case 2:
        return new t(e[0], e[1]);
      case 3:
        return new t(e[0], e[1], e[2]);
      case 4:
        return new t(e[0], e[1], e[2], e[3]);
      case 5:
        return new t(e[0], e[1], e[2], e[3], e[4]);
      case 6:
        return new t(e[0], e[1], e[2], e[3], e[4], e[5]);
      case 7:
        return new t(e[0], e[1], e[2], e[3], e[4], e[5], e[6]);
    }
    var n = POt(t.prototype),
      r = t.apply(n, e);
    return NI(r) ? r : n;
  };
}
function OOt(t, e, n) {
  var r = Tx(t);
  return function i() {
    for (var o = arguments.length, l = Array(o), u = o, c = n8e(i); u--; )
      l[u] = arguments[u];
    var d = o < 3 && l[0] !== c && l[o - 1] !== c ? [] : QUe(l, c);
    return (o -= d.length) < n
      ? t8e(t, e, Gse, i.placeholder, void 0, l, d, void 0, void 0, n - o)
      : YUe(this && this !== t5 && this instanceof i ? r : t, this, l);
  };
}
function Gse(t, e, n, r, i, o, l, u, c, d) {
  var h = e & KUe,
    f = e & HS,
    p = e & eB,
    g = e & (kS | jC),
    y = e & ZUe,
    v = p ? void 0 : Tx(t);
  return function b() {
    for (var w = arguments.length, k = Array(w), D = w; D--; )
      k[D] = arguments[D];
    if (g)
      var $ = n8e(b),
        N = EOt(k, $);
    if (
      (r && (k = COt(k, r, i, g)),
      o && (k = $Ot(k, o, l, g)),
      (w -= N),
      g && w < d)
    ) {
      var P = QUe(k, $);
      return t8e(t, e, Gse, b.placeholder, n, k, P, u, c, d - w);
    }
    var I = f ? n : this,
      O = p ? I[t] : t;
    return (
      (w = k.length),
      u ? (k = XOt(k, u)) : y && w > 1 && cm(k).call(k),
      h && c < w && (k.length = c),
      this && this !== t5 && this instanceof b && (O = v || Tx(O)),
      O.apply(I, k)
    );
  };
}
function GOt(t, e, n, r) {
  var i = e & HS,
    o = Tx(t);
  return function l() {
    for (
      var u = -1,
        c = arguments.length,
        d = -1,
        h = r.length,
        f = Array(h + c),
        p = this && this !== t5 && this instanceof l ? o : t;
      ++d < h;

    )
      f[d] = r[d];
    for (; c--; ) f[d++] = arguments[++u];
    return YUe(p, i ? n : this, f);
  };
}
function t8e(t, e, n, r, i, o, l, u, c, d) {
  var h = e & kS;
  (e |= h ? Zk : _x), (e &= ~(h ? _x : Zk)) & Y5t || (e &= ~(HS | eB));
  var f = n(
    t,
    e,
    i,
    h ? o : void 0,
    h ? l : void 0,
    h ? void 0 : o,
    h ? void 0 : l,
    u,
    c,
    d
  );
  return (f.placeholder = r), r8e(f, t, e);
}
function NOt(t, e, n, r, i, o, l, u) {
  var c = e & eB;
  if (!c && typeof t != "function") throw new TypeError(Z5t);
  var d = r ? r.length : 0;
  if (
    (d || ((e &= ~(Zk | _x)), (r = i = void 0)),
    (l = l === void 0 ? l : cU(ave(l), 0)),
    (u = u === void 0 ? u : ave(u)),
    (d -= i ? i.length : 0),
    e & _x)
  ) {
    var h = r,
      f = i;
    r = i = void 0;
  }
  var p = [t, e, n, r, i, h, f, o, l, u];
  if (
    ((t = p[0]),
    (e = p[1]),
    (n = p[2]),
    (r = p[3]),
    (i = p[4]),
    !(u = p[9] = p[9] == null ? (c ? 0 : t.length) : cU(p[9] - d, 0)) &&
      e & (kS | jC) &&
      (e &= ~(kS | jC)),
    e && e != HS)
  )
    g =
      e == kS || e == jC
        ? OOt(t, e, u)
        : (e != Zk && e != (HS | Zk)) || i.length
        ? Gse.apply(void 0, p)
        : GOt(t, e, n, r);
  else var g = LOt(t, e, n);
  return r8e(g, t, e);
}
function n8e(t) {
  return t.placeholder;
}
function ive(t, e) {
  var n = SOt(t, e);
  return MOt(n) ? n : void 0;
}
function FOt(t) {
  var e = t.match(sOt);
  return e ? e[1].split(lOt) : [];
}
function UOt(t, e) {
  var n = e.length,
    r = n - 1;
  return (
    (e[r] = (n > 1 ? "& " : "") + e[r]),
    (e = e.join(n > 2 ? ", " : " ")),
    t.replace(
      oOt,
      `{
/* [wrapped with ` +
        e +
        `] */
`
    )
  );
}
function BOt(t, e) {
  return (
    !!(e = e ?? J5t) &&
    (typeof t == "number" || fOt.test(t)) &&
    t > -1 &&
    t % 1 == 0 &&
    t < e
  );
}
function HOt(t) {
  return !!nve && nve in t;
}
function XOt(t, e) {
  for (var n = t.length, r = DOt(e.length, n), i = xOt(t); r--; ) {
    var o = e[r];
    t[r] = BOt(o, n) ? i[o] : void 0;
  }
  return t;
}
var r8e = rve
  ? function (t, e, n) {
      var r = e + "";
      return rve(t, "toString", {
        configurable: !0,
        enumerable: !1,
        value: QOt(UOt(r, zOt(FOt(r), n))),
      });
    }
  : JOt;
function VOt(t) {
  if (t != null) {
    try {
      return qUe.call(t);
    } catch {}
    try {
      return t + "";
    } catch {}
  }
  return "";
}
function zOt(t, e) {
  return (
    yOt(eOt, function (n) {
      var r = "_." + n[0];
      e & n[1] && !vOt(t, r) && t.push(r);
    }),
    mm(t).call(t)
  );
}
function Nse(t, e, n) {
  var r = NOt(
    t,
    kS,
    void 0,
    void 0,
    void 0,
    void 0,
    void 0,
    (e = n ? void 0 : e)
  );
  return (r.placeholder = Nse.placeholder), r;
}
function jOt(t) {
  var e = NI(t) ? e8e.call(t) : "";
  return e == tOt || e == nOt;
}
function NI(t) {
  var e = ti(t);
  return !!t && (e == "object" || e == "function");
}
function WOt(t) {
  return !!t && ti(t) == "object";
}
function KOt(t) {
  return ti(t) == "symbol" || (WOt(t) && e8e.call(t) == rOt);
}
function ZOt(t) {
  return t
    ? (t = YOt(t)) === eve || t === -eve
      ? (t < 0 ? -1 : 1) * q5t
      : t == t
      ? t
      : 0
    : t === 0
    ? t
    : 0;
}
function ave(t) {
  var e = ZOt(t),
    n = e % 1;
  return e == e ? (n ? e - n : e) : 0;
}
function YOt(t) {
  if (typeof t == "number") return t;
  if (KOt(t)) return tve;
  if (NI(t)) {
    var e = typeof t.valueOf == "function" ? t.valueOf() : t;
    t = NI(e) ? e + "" : e;
  }
  if (typeof t != "string") return t === 0 ? t : +t;
  t = t.replace(aOt, "");
  var n = cOt.test(t);
  return n || hOt.test(t)
    ? pOt(jn(t).call(t, 2), n ? 2 : 8)
    : uOt.test(t)
    ? tve
    : +t;
}
function QOt(t) {
  return function () {
    return t;
  };
}
function JOt(t) {
  return t;
}
Nse.placeholder = {};
var qOt = Nse,
  eGt = xr(qOt),
  tGt = uR,
  nGt = pm,
  rGt = hR,
  iGt = Yp,
  aGt = ZL,
  oGt = Math.min,
  xee = [].lastIndexOf,
  i8e = !!xee && 1 / [1].lastIndexOf(1, -0) < 0,
  sGt = aGt("lastIndexOf"),
  lGt = i8e || !sGt,
  ove = lGt
    ? function (t) {
        if (i8e) return tGt(xee, this, arguments) || 0;
        var e = nGt(this),
          n = iGt(e),
          r = n - 1;
        for (
          arguments.length > 1 && (r = oGt(r, rGt(arguments[1]))),
            r < 0 && (r = n + r);
          r >= 0;
          r--
        )
          if (r in e && e[r] === t) return r || 0;
        return -1;
      }
    : xee,
  uGt = ur;
uGt(
  { target: "Array", proto: !0, forced: ove !== [].lastIndexOf },
  { lastIndexOf: ove }
);
var AV,
  wV,
  cGt = Il,
  dGt = cGt("Array").lastIndexOf,
  hGt = Es,
  fGt = dGt,
  kV = Array.prototype,
  pGt = function (t) {
    var e = t.lastIndexOf;
    return t === kV || (hGt(kV, t) && e === kV.lastIndexOf) ? fGt : e;
  },
  gGt = pGt,
  mGt = gGt,
  yGt = mGt,
  vGt = yGt,
  bGt = vGt,
  _Gt = bGt,
  TGt = _Gt,
  EGt = TGt,
  Fse = xr(EGt),
  e3 =
    (AV =
      (wV = document.currentScript) === null || wV === void 0
        ? void 0
        : wV.src) !== null && AV !== void 0
      ? AV
      : "https://tosv.byted.org/obj/lux/sdk/@byted/veplayer/".concat(
          "2.9.2",
          "/object/umd/"
        ),
  SGt = jn(e3).call(e3, 0, Fse(e3).call(e3, "/")),
  tB = new W5t({ baseUrl: SGt });
tB.registerPlugin;
var _ei = tB.register;
function sve(t) {
  tB.setModuleSystem(t);
}
function Nf(t, e) {
  return a8e.apply(this, arguments);
}
function a8e() {
  return (a8e = Gi(
    or().mark(function t(e, n) {
      var r;
      return or().wrap(
        function (i) {
          for (;;)
            switch ((i.prev = i.next)) {
              case 0:
                return (i.prev = 0), (i.next = 3), tB.load(e, n);
              case 3:
                return i.abrupt("return", i.sent);
              case 6:
                throw (
                  ((i.prev = 6),
                  (i.t0 = i.catch(0)),
                  BPt(Rse.MODULE_LOAD_ERROR, {
                    ext: {
                      name: e,
                      cdn:
                        i.t0 === null ||
                        i.t0 === void 0 ||
                        (r = i.t0.target) === null ||
                        r === void 0
                          ? void 0
                          : r.src,
                    },
                    error: i.t0,
                  }))
                );
              case 9:
              case "end":
                return i.stop();
            }
        },
        t,
        null,
        [[0, 6]]
      );
    })
  )).apply(this, arguments);
}
var RGt = function (t, e) {
    var n,
      r = Use(t);
    if (!t || !r) return (n = t) !== null && n !== void 0 ? n : "";
    var i,
      o = pv(t).call(t, "//");
    for (var l in e) {
      var u,
        c,
        d = e[l];
      r != null && r.searchParams.has(l)
        ? r == null ||
          (u = r.searchParams) === null ||
          u === void 0 ||
          u.set(l, d)
        : r == null ||
          (c = r.searchParams) === null ||
          c === void 0 ||
          c.append(l, d);
    }
    return (
      (t = r.toString()),
      o
        ? (i = t) === null || i === void 0
          ? void 0
          : i.replace(location.protocol, "")
        : t
    );
  },
  Use = function (t) {
    if (t) {
      pv(t).call(t, "//") && (t = location.protocol + t);
      try {
        return new Bs(t);
      } catch {
        return;
      }
    }
  };
function o8e(t, e) {
  var n = (G1 !== void 0 && qoe(t)) || t["@@iterator"];
  if (!n) {
    if (Joe(t) || (n = ese(t)) || (e && t && typeof t.length == "number")) {
      n && (t = n);
      var r = 0,
        i = function () {};
      return {
        s: i,
        n: function () {
          return r >= t.length ? { done: !0 } : { done: !1, value: t[r++] };
        },
        e: function (c) {
          throw c;
        },
        f: i,
      };
    }
    throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  }
  var o,
    l = !0,
    u = !1;
  return {
    s: function () {
      n = n.call(t);
    },
    n: function () {
      var c = n.next();
      return (l = c.done), c;
    },
    e: function (c) {
      (u = !0), (o = c);
    },
    f: function () {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw o;
      }
    },
  };
}
function Bse(t) {
  var e,
    n = {},
    r = o8e(t.attributes);
  try {
    for (r.s(); !(e = r.n()).done; ) {
      var i = e.value;
      n[i.name] = i.value;
    }
  } catch (o) {
    r.e(o);
  } finally {
    r.f();
  }
  return n;
}
function s8e(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return (
    Dn(e).forEach(function (n) {
      var r = n,
        i = e[n];
      i && (t == null || t.setAttribute(r, i));
    }),
    t
  );
}
function l8e(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
    n = Bse(t);
  return (
    Dn(n).forEach(function (r) {
      e[r]
        ? t == null || t.setAttribute(r, e[r])
        : t == null || t.removeAttribute(r);
    }),
    t
  );
}
var AGt = Object.freeze({
    __proto__: null,
    getAttributes: Bse,
    replaceAttributes: l8e,
    setAttributes: s8e,
  }),
  wGt = 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"',
  kGt = [
    'video/mp4;codecs="hev1.1.6.L120.90"',
    'video/mp4;codecs="hev1.2.4.L120.90"',
    'video/mp4;codecs="hev1.3.E.L120.90"',
    'video/mp4;codecs="hev1.4.10.L120.90"',
  ],
  RD = eGt(function (t, e) {
    var n;
    return e == null
      ? void 0
      : $a((n = e.split("?")[0].toLowerCase())).call(n, t);
  }),
  IGt = RD(".m3u8"),
  DGt = RD(".mp4"),
  PGt = RD(".flv"),
  u8e = RD(".sdp"),
  MGt = RD(".mpd");
function nE(t) {
  return IGt(t)
    ? "hls"
    : PGt(t)
    ? "flv"
    : u8e(t)
    ? "rtm"
    : DGt(t)
    ? "mp4"
    : MGt(t)
    ? "dash"
    : "unknown";
}
function c8e() {
  var t =
    arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Au.H264;
  return t === Au.H265
    ? Na.isHevcSupported()
    : t === Au.H264
    ? Na.isMSESupport()
    : Na.isMSESupport(t);
}
function CGt() {
  return d8e.apply(this, arguments);
}
function d8e() {
  return (d8e = Gi(
    or().mark(function t() {
      var e, n;
      return or().wrap(function (r) {
        for (;;)
          switch ((r.prev = r.next)) {
            case 0:
              return (r.next = 2), Nf(Os.PluginXgvideo);
            case 2:
              return (
                (e = r.sent),
                (n = e.XGVideoPlugin),
                r.abrupt("return", n == null ? void 0 : n.isSupported())
              );
            case 5:
            case "end":
              return r.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
function h8e() {
  var t =
    arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Au.H264;
  return (
    window.ManagedMediaSource !== void 0 &&
    (t === Au.H264
      ? window.ManagedMediaSource.isTypeSupported(wGt)
      : t === Au.H265
      ? kGt.some(function (e) {
          return window.ManagedMediaSource.isTypeSupported(e);
        })
      : window.ManagedMediaSource.isTypeSupported(t))
  );
}
var Oh = $n(
    $n($n({}, Pt), AGt),
    {},
    {
      getStreamType: nE,
      isMseSupported: c8e,
      isSoftDecodeSupported: CGt,
      isMMSSupported: h8e,
      appendSearchParams: RGt,
      getUrlObject: Use,
    }
  ),
  lve = Na.isWeixin,
  f8e = Na.os,
  $Gt = Na.device,
  uve = f8e.isAndroid,
  xGt = f8e.isIos,
  LGt = $Gt === "mobile",
  cve = 0,
  IV = !1,
  OGt = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n),
        bn(os((i = e.call(this, r))), "_hasSetUserAutoplay", void 0),
        bn(os(i), "_timer", void 0),
        bn(os(i), "_wxTimer", void 0),
        bn(os(i), "_state", { mode: 0, showUnmuteBt: !1 }),
        bn(os(i), "userClickPlay", function () {
          if (!IV) {
            var o = i.player.play();
            o && o.then
              ? o
                  .then(function () {
                    console.log("user action autoplay success"), (IV = !0);
                  })
                  .catch(function (l) {
                    console.warn("user action autoplay fail:", l);
                  })
              : (console.warn("no play promise"), (IV = !0));
          }
        }),
        i
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "afterCreate",
            value: function () {
              this.initState(), this.initEvents(), this.setWXAutoPlay();
            },
          },
          {
            key: "updateLang",
            value: function () {
              this.renderUnmuteBt();
            },
          },
          {
            key: "initState",
            value: function () {
              this._state.mode = this.player.muted ? 1 : 0;
            },
          },
          {
            key: "initEvents",
            value: function () {
              this.player.on(CI, this.handleAutoplayPrevented.bind(this)),
                this.player.on(NT, this.handleAutoplayStart.bind(this)),
                this.player.on(Z6, this.handleVolumechange.bind(this)),
                this.setUserActionAutoPlay();
            },
          },
          {
            key: "setWXAutoPlay",
            value: function () {
              lve &&
                this.player.config.autoplay &&
                this.config.enableWxJsBridgeAutoplay &&
                (window.WeixinJSBridge
                  ? this.wxPlay()
                  : document.addEventListener(
                      "WeixinJSBridgeReady",
                      this.wxPlay.bind(this),
                      !1
                    ));
            },
          },
          {
            key: "wxCanPlayFn",
            value: function () {
              var r = this;
              window.WeixinJSBridge &&
                window.WeixinJSBridge.invoke("getNetworkType", {}, function () {
                  r._wxTimer = window.setTimeout(function () {
                    r._wxTimer && clearTimeout(r._wxTimer);
                    var i = r.player.play();
                    i && i.then
                      ? i
                          .then(function () {
                            console.log("wechat autoplay success");
                          })
                          .catch(function (o) {
                            console.warn("wechat autoplay fail:", o),
                              (r._state.showUnmuteBt = !1),
                              r.renderUnmuteBt();
                          })
                      : console.warn("wechat browser no play promise");
                  });
                });
            },
          },
          {
            key: "wxPlay",
            value: function () {
              this.player.readyState >= 2
                ? this.wxCanPlayFn()
                : uve
                ? this.player.once(lm, this.wxCanPlayFn.bind(this))
                : xGt && this.player.once(Y9, this.wxCanPlayFn.bind(this));
            },
          },
          {
            key: "setUserActionAutoPlay",
            value: function () {
              var r = this;
              this.config.enableUserActionAutoplay &&
                this.player.once(dl.AUTOPLAY_FAIL, function () {
                  (r._hasSetUserAutoplay = !0),
                    (r.config.userActionDom instanceof window.Node
                      ? r.config.userActionDom
                      : window.document.body
                    ).addEventListener("click", r.userClickPlay, !1);
                });
            },
          },
          {
            key: "handleAutoplayPrevented",
            value: function () {
              return this._state.mode === 0
                ? (console.warn("unmute autoplay fail"),
                  this.player.emit(dl.AUTOPLAY_FAIL, { mode: "unmute" }),
                  uve && lve
                    ? void (this._state.mode = 2)
                    : void (
                        this.config.enableDegradeMuteAutoplay &&
                        this.changeMuteMode()
                      ))
                : this._state.mode === 1
                ? (console.warn("mute autoplay fail"),
                  this.player.emit(dl.AUTOPLAY_FAIL, { mode: "mute" }),
                  void (this._state.mode = 2))
                : this._state.mode === 2
                ? (this.player.emit(dl.AUTOPLAY_FAIL, { mode: "noSupport" }),
                  void console.warn("not support autoplay"))
                : void 0;
            },
          },
          {
            key: "changeMuteMode",
            value: function () {
              var r = this;
              (this.player.muted = !0),
                (this._state.showUnmuteBt = !0),
                (this._state.mode = 1),
                this.renderUnmuteBt(),
                (this._timer = window.setTimeout(function () {
                  r._timer && window.clearTimeout(r._timer);
                  var i = r.player.play();
                  i && i.then
                    ? i
                        .then(function () {
                          console.log("degrade mute autoplay success");
                        })
                        .catch(function (o) {
                          console.warn("degrade mute autoplay fail:", o),
                            (r.player.muted = !1),
                            (r._state.showUnmuteBt = !1),
                            r.renderUnmuteBt();
                        })
                    : console.warn("no play promise");
                }));
            },
          },
          {
            key: "handleAutoplayStart",
            value: function () {
              if (this._state.mode !== 0)
                return this._state.mode === 1
                  ? (this.player.emit(dl.AUTOPLAY_SUCCESS, { mode: "mute" }),
                    (this._state.showUnmuteBt = !0),
                    void this.renderUnmuteBt())
                  : this._state.mode === 2
                  ? (this.player.emit(dl.AUTOPLAY_SUCCESS, { mode: "click" }),
                    (this.player.muted = !1),
                    (this._state.showUnmuteBt = !1),
                    void this.renderUnmuteBt())
                  : void 0;
              this.player.emit(dl.AUTOPLAY_SUCCESS, { mode: "unmute" });
            },
          },
          {
            key: "handleVolumechange",
            value: function () {
              (this._state.mode = this.player.muted ? 1 : 0),
                this._state.showUnmuteBt &&
                  ((this._state.showUnmuteBt = !1),
                  this.renderUnmuteBt(),
                  this.player.paused &&
                    this.player.readyState >= 1 &&
                    this.player.play());
            },
          },
          {
            key: "renderUnmuteBt",
            value: function () {
              var r = this.root,
                i = this.player.config.i18nManager;
              if (r && ((r.innerHTML = ""), this._state.showUnmuteBt)) {
                var o = i.getText("UNMUTE"),
                  l = Pt.createDom("div", o, void 0, "veplayer-unmute-bt");
                r.appendChild(l),
                  this.bind(
                    ".veplayer-unmute-bt",
                    "click",
                    this.cancelUnmute.bind(this)
                  ),
                  this.bind(
                    ".veplayer-unmute-bt",
                    "touchend",
                    this.cancelUnmute.bind(this)
                  );
              }
            },
          },
          {
            key: "cancelUnmute",
            value: function () {
              var r = Date.now();
              if (r - cve > 200) {
                (cve = r),
                  (this.player.muted = !1),
                  (this._state.showUnmuteBt = !1),
                  this.renderUnmuteBt(),
                  this.emit(dl.AUTOPLAY_UNMUTE);
                var i = Na.device === "mobile",
                  o = u8e(this.player.config.url);
                i &&
                  o &&
                  (this.player.volume > 0.5
                    ? (this.player.volume = this.player.volume - 0.1)
                    : (this.player.volume = this.player.volume + 0.1));
              }
            },
          },
          {
            key: "destroy",
            value: function () {
              if (
                (this.player.off(CI, this.handleAutoplayPrevented.bind(this)),
                this.player.off(NT, this.handleAutoplayStart.bind(this)),
                this.player.off(Z6, this.handleVolumechange.bind(this)),
                this._timer && window.clearTimeout(this._timer),
                this._wxTimer && window.clearTimeout(this._wxTimer),
                document.removeEventListener(
                  "WeixinJSBridgeReady",
                  this.wxPlay.bind(this),
                  !1
                ),
                this._hasSetUserAutoplay)
              ) {
                var r = LGt ? "touch" : "click";
                (this.config.userActionDom instanceof window.Node
                  ? this.config.userActionDom
                  : window.document.body
                ).removeEventListener(r, this.userClickPlay, !1);
              }
            },
          },
          {
            key: "render",
            value: function () {
              return '<div class="veplayer-unmute"></div>';
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "autoplayPlugin";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                position: ml.POSITIONS.ROOT,
                enableDegradeMuteAutoplay: !1,
                enableWxJsBridgeAutoplay: !1,
                userActionDom: window.document.body,
                enableUserActionAutoplay: !1,
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  GGt = ur,
  NGt = VUe.values;
GGt(
  { target: "Object", stat: !0 },
  {
    values: function (t) {
      return NGt(t);
    },
  }
);
var FGt = za,
  UGt = FGt.Object.values,
  BGt = UGt,
  HGt = BGt,
  XGt = HGt,
  VGt = XGt,
  zGt = VGt,
  jGt = zGt,
  WGt = jGt,
  KGt = WGt,
  ZGt = xr(KGt);
function p8e() {
  return new DOMParser().parseFromString(
    `<svg width="18" height="18" viewBox="0 0 23 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M5.75 11C5.75 11.9665 4.9665 12.75 4 12.75C3.0335 12.75 2.25 11.9665 2.25 11C2.25 10.0335 3.0335 9.25 4 9.25C4.9665 9.25 5.75 10.0335 5.75 11ZM13.25 11C13.25 11.9665 12.4665 12.75 11.5 12.75C10.5335 12.75 9.75 11.9665 9.75 11C9.75 10.0335 10.5335 9.25 11.5 9.25C12.4665 9.25 13.25 10.0335 13.25 11ZM19 12.75C19.9665 12.75 20.75 11.9665 20.75 11C20.75 10.0335 19.9665 9.25 19 9.25C18.0335 9.25 17.25 10.0335 17.25 11C17.25 11.9665 18.0335 12.75 19 12.75Z" fill="white"/>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var dve,
  hve,
  fve = (function (t) {
    so(n, GI);
    var e = lo(n);
    function n() {
      return Wn(this, n), e.apply(this, arguments);
    }
    return (
      Kn(
        n,
        [
          { key: "onItemClick", value: function () {} },
          {
            key: "onOptionClick",
            value: function () {
              this.toggle(!1);
            },
          },
          {
            key: "updateLang",
            value: function () {
              var r,
                i = this,
                o = this.player.config.i18nManager;
              (r = this.config.plugins) === null ||
                r === void 0 ||
                r.forEach(function (l) {
                  var u,
                    c =
                      (u = o.normalize(l.textTips)) !== null && u !== void 0
                        ? u
                        : l.pluginName;
                  if (i.player.root) {
                    var d = Pt.findDom(
                      i.player.root,
                      ".panel-plugin-".concat(
                        l.pluginName,
                        " .panel-icon-bt-text"
                      )
                    );
                    d && (d.innerHTML = c);
                  }
                });
            },
          },
          {
            key: "beforeCreate",
            value: function (r) {
              var i,
                o = r.player.config.i18nManager;
              r.config.list =
                (i = r.config.plugins) === null || i === void 0
                  ? void 0
                  : On(i).call(i, function (l, u) {
                      var c,
                        d = Pt.createDom(
                          "div",
                          "",
                          {},
                          "panel-icon-bt panel-plugin-".concat(l.pluginName)
                        ),
                        h = Pt.createDom("div", "", {}, "panel-icon-svg"),
                        f =
                          (c = o.normalize(l.textTips)) !== null && c !== void 0
                            ? c
                            : l.pluginName;
                      return (
                        d.appendChild(h),
                        d.appendChild(
                          Pt.createDom(
                            "span",
                            f,
                            { "plugin-index": u },
                            "panel-icon-bt-text"
                          )
                        ),
                        {
                          showText: d,
                          plugin: r.player.registerPlugin({
                            plugin: l,
                            options: { root: h },
                          }),
                        }
                      );
                    });
            },
          },
          {
            key: "hideChild",
            value: function (r) {
              if (r) {
                var i;
                (i = r.hide) === null || i === void 0 || i.call(r);
                var o = document.querySelector(
                  ".panel-plugin-".concat(r.pluginName)
                );
                o && Pt.addClass(o, "hide");
              }
            },
          },
          {
            key: "showChild",
            value: function (r) {
              if (r) {
                var i;
                (i = r.show) === null || i === void 0 || i.call(r);
                var o = document.querySelector(
                  ".panel-plugin-".concat(r.pluginName)
                );
                o && Pt.removeClass(o, "hide");
              }
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return { more: { icon: p8e } };
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "more";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return $n(
                $n({}, GI.defaultConfig),
                {},
                {
                  index: 1,
                  plugins: [],
                  list: [],
                  hideOnSingleOption: !1,
                  isShowIcon: !0,
                  hidePortrait: !1,
                  renderType: jUe.Icon,
                  panel: { className: "more-panel-content" },
                }
              );
            },
          },
        ]
      ),
      n
    );
  })(),
  Hse = (function (t) {
    return (
      (t.ROOT_TOP_RIGHT = "rootTopRight"),
      (t.ROOT_TOP_RIGHT_COLLAPSE = "rootTopRightCollapse"),
      t
    );
  })(Hse || {}),
  Xse = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n() {
      return Wn(this, n), e.apply(this, arguments);
    }
    return (
      Kn(
        n,
        [
          {
            key: "registerIcons",
            value: function () {
              return { more: { icon: p8e, class: "xgplayer-more-svg" } };
            },
          },
          {
            key: "children",
            value: function () {
              var r = this,
                i = this._getPlugins(),
                o = i.plugins,
                l = i.collapsePlugins,
                u = {};
              return (
                o.forEach(function (c) {
                  u[c.pluginName] = { plugin: c, options: { root: r.root } };
                }),
                l.length &&
                  (u[fve.pluginName] = {
                    plugin: fve,
                    options: { root: this.root, plugins: l },
                  }),
                u
              );
            },
          },
          {
            key: "render",
            value: function () {
              return '<xg-right-grid class="xg-right-grid xgplayer-rightTop-iconList"></xg-right-grid>';
            },
          },
          {
            key: "_getPlugins",
            value: function () {
              var r,
                i = this,
                o = [],
                l = [],
                u =
                  (r = this.player.config.ignores) === null || r === void 0
                    ? void 0
                    : On(r).call(r, function (c) {
                        return c.toLowerCase();
                      });
              return (
                this.config.plugins.forEach(function (c) {
                  var d,
                    h = c.pluginName.toLowerCase();
                  (u != null && $a(u).call(u, h)) ||
                    (((d = i.player.config[h].position) !== null && d !== void 0
                      ? d
                      : c.defaultConfig.position) === "rootTopRight"
                      ? o.push(c)
                      : l.push(c));
                }),
                { plugins: o ?? [], collapsePlugins: l ?? [] }
              );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "topRightBar";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { position: ml.POSITIONS.ROOT_TOP, plugins: [] };
            },
          },
          {
            key: "isTopRightPlugin",
            value: function (r, i) {
              var o,
                l,
                u,
                c,
                d,
                h =
                  (l =
                    (u =
                      i[
                        r == null || (o = r.pluginName) === null || o === void 0
                          ? void 0
                          : o.toLowerCase()
                      ]) === null || u === void 0
                      ? void 0
                      : u.position) !== null && l !== void 0
                    ? l
                    : r == null ||
                      (c = r.defaultConfig) === null ||
                      c === void 0
                    ? void 0
                    : c.position;
              return !!$a((d = ZGt(Hse))).call(d, h);
            },
          },
        ]
      ),
      n
    );
  })(),
  g8e = [GMt, HMt, jMt, ZPt, ZMt, HPt, VPt, TMt, zPt, F5t, B5t, X5t, j5t, OGt],
  YGt = Ce((dve = [])).call(dve, g8e, [bMt, YPt, Xse]),
  QGt = Ce((hve = [])).call(hve, g8e, [nMt, Xse]),
  m8e = Na.device === "pc" ? YGt : QGt;
function y8e() {
  return new DOMParser().parseFromString(
    '<svg width="21" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.892 2h4.445v1.778H3.892v4.444H2.114V3.778C2.114 2.796 2.91 2 3.892 2zm4.445 16v-4.444c0-.982-.796-1.778-1.778-1.778H2.114v1.778h2.944L2.264 16.35a.9.9 0 001.272 1.273l2.988-2.987a.918.918 0 00.035-.037V18h1.778zm8-6.222v4.444h-4.445V18h4.445c.981 0 1.777-.796 1.777-1.778v-4.444h-1.777zM11.892 2v4.445c0 .981.796 1.777 1.778 1.777h4.444V6.445H15.17l2.568-2.568a.9.9 0 10-1.273-1.273L13.67 5.4V2h-1.778z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function JGt() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 8.333h-4.167c-.92 0-1.666-.746-1.666-1.666V2.5h1.666v4.167H17.5v1.666zM2.5 6.667v1.666h4.167c.92 0 1.666-.746 1.666-1.666V2.5H6.667v4.167H2.5zM2.5 13.333h4.167V17.5h1.666v-4.167c0-.92-.746-1.666-1.666-1.666H2.5v1.666zM13.333 17.5v-4.167H17.5v-1.666h-4.167c-.92 0-1.666.746-1.666 1.666V17.5h1.666z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function v8e() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.778 2h4.444v1.778H3.778v4.444H2V3.778C2 2.796 2.796 2 3.778 2zM2 11.778v4.444C2 17.204 2.796 18 3.778 18h4.444v-1.778H4.823l2.313-2.313a.9.9 0 00-1.272-1.273l-2.086 2.086v-2.944H2zm14.222 0v4.444h-4.444V18h4.444c.982 0 1.778-.796 1.778-1.778v-4.444h-1.778zM18 8.222V3.778C18 2.796 17.204 2 16.222 2h-4.444v1.778h2.945l-2.587 2.586a.9.9 0 101.273 1.273l2.813-2.813v3.398H18z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function qGt() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.125 3a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375H15.5v3.375c0 .207.168.375.375.375h.75A.375.375 0 0017 7.875v-4.5A.375.375 0 0016.625 3h-4.5zm0 12.5a.375.375 0 00-.375.375v.75c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-4.5a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375V15.5h-3.375zM3 3.375C3 3.168 3.168 3 3.375 3h4.5c.207 0 .375.168.375.375v.75a.375.375 0 01-.375.375H4.5v3.375a.375.375 0 01-.375.375h-.75A.375.375 0 013 7.875v-4.5zM7.875 15.5H4.5v-3.375a.375.375 0 00-.375-.375h-.75a.375.375 0 00-.375.375v4.5c0 .207.168.375.375.375h4.5a.375.375 0 00.375-.375v-.75a.375.375 0 00-.375-.375z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function e3t() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="5.313" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/><rect x="11.563" y="3.75" width="3.125" height="12.5" rx=".625" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function t3t() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M14.121 8.299a2 2 0 010 3.402l-7.94 4.91c-1.332.825-3.051-.133-3.051-1.7V5.09c0-1.567 1.72-2.525 3.052-1.701l7.939 4.911z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function n3t() {
  return new DOMParser().parseFromString(
    '<svg width="72" height="72" viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><circle fill-opacity=".3" cx="36" cy="36" r="36"/><path d="M40.167 32.667a.833.833 0 01-.834-.834v-1.666c0-.46.373-.834.834-.834h5.409a11.653 11.653 0 00-9.576-5c-6.443 0-11.667 5.224-11.667 11.667S29.557 47.667 36 47.667c5.285 0 9.749-3.514 11.183-8.333h3.445C49.112 46.014 43.138 51 36 51c-8.284 0-15-6.716-15-15 0-8.284 6.716-15 15-15 4.713 0 8.918 2.173 11.668 5.572l-.001-4.739c0-.46.373-.833.833-.833h1.667c.46 0 .833.373.833.833V31c0 .879-.68 1.598-1.542 1.662l-.125.005h-9.166z"/></g></svg>',
    "image/svg+xml"
  ).firstChild;
}
function r3t() {
  return new DOMParser().parseFromString(
    '<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="60" height="60" rx="30" fill="#000" fill-opacity=".4"/><path d="M40.243 28.3a2 2 0 010 3.401L24.06 41.712c-1.332.825-3.052-.134-3.052-1.7V19.988c0-1.566 1.72-2.525 3.052-1.7l16.184 10.01z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function i3t() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zm6.767 2.278A7.474 7.474 0 0118.75 10a7.477 7.477 0 01-2.128 5.234.4.4 0 01-.57-.004l-.587-.586a.442.442 0 01.005-.617A5.812 5.812 0 0017.083 10c0-1.557-.61-2.97-1.603-4.017a.442.442 0 01-.003-.615l.586-.586a.4.4 0 01.57-.004zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function a3t() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.045 2.5h.55c.44 0 .8.34.831.771l.003.062v13.334c0 .44-.34.799-.771.83l-.063.003h-.55a.833.833 0 01-.443-.128l-.065-.045-4.866-3.744a.831.831 0 01-.323-.59l-.003-.07V7.077c0-.235.1-.458.272-.615l.054-.045 4.866-3.744a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.68 6.667c.23 0 .416.186.416.416v5.834c0 .23-.186.416-.416.416h-.834a.417.417 0 01-.416-.416V7.083c0-.23.186-.416.416-.416h.834zm10.467.294a.417.417 0 01.59 0l1.767 1.768L17.27 6.96a.417.417 0 01.589 0l.59.59a.417.417 0 010 .589L16.68 9.908l1.768 1.767c.15.15.162.387.035.55l-.035.04-.589.589a.417.417 0 01-.59 0l-1.767-1.768-1.768 1.768a.417.417 0 01-.59 0l-.588-.59a.417.417 0 010-.589l1.767-1.768-1.767-1.767a.417.417 0 01-.035-.55l.035-.04.589-.589z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
function o3t() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.867 2.5h.55c.44 0 .799.34.83.771l.003.062v13.334c0 .44-.34.799-.771.83l-.062.003h-.55a.833.833 0 01-.444-.128l-.064-.045-4.867-3.744a.831.831 0 01-.322-.59l-.003-.07V7.077c0-.235.099-.458.271-.615l.054-.045L9.36 2.673a.832.832 0 01.43-.17l.078-.003h.55-.55zM2.5 6.667c.23 0 .417.186.417.416v5.834c0 .23-.187.416-.417.416h-.833a.417.417 0 01-.417-.416V7.083c0-.23.187-.416.417-.416H2.5zm11.768.46A4.153 4.153 0 0115.417 10c0 1.12-.442 2.137-1.162 2.886a.388.388 0 01-.555-.007l-.577-.578c-.176-.176-.156-.467.009-.655A2.49 2.49 0 0013.75 10a2.49 2.49 0 00-.61-1.636c-.163-.188-.182-.477-.006-.653l.578-.578a.388.388 0 01.556-.006z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
var b8e = {
    startPlay: r3t,
    play: t3t,
    pause: e3t,
    fullscreen: v8e,
    exitFullscreen: y8e,
    replay: n3t,
    volumeLarge: i3t,
    volumeMuted: a3t,
    volumeSmall: o3t,
  },
  s3t = $n($n({}, b8e), {}, { fullscreen: v8e, exitFullscreen: y8e }),
  l3t = $n($n({}, b8e), {}, { fullscreen: qGt, exitFullscreen: JGt }),
  u3t = Na.device === "pc" ? s3t : l3t,
  c3t = $n(
    $n({}, bUe.TEXT),
    {},
    {
      DEFINITION_FALLBACK_TOAST:
        "The current network is unstable, it is recommended to switch to ",
      DEFINITION_SWITCHING: "Switching to",
      ERROR_REFRESH: "Refresh",
      UNMUTE: "Click to unmute",
      MANIFEST: "Video parsing error",
      NETWORK: "Network error",
      NETWORK_TIMEOUT: "Network timeout",
      NETWORK_FORBIDDEN: "Authentication  error",
      NETWORK_NOTFOUND: "Stream does not exist",
      DEMUX: "Video parsing error",
      REMUX: "Video parsing error",
      MEDIA: "An error occurred, Please try again",
      MEDIA_ERR_CODEC_NOT_SUPPORTED: "Audio/video codec is not supported",
      MEDIA_ERR_URL_EMPTY: "The stream address is not specified",
      DRM: "Permission verification failed",
      DRM_LICENSE: "Commercial DRM Permission verification failed",
      DRM_UNSUPPORTED: "DRM encrypted playback is not supported",
      DRM_NO_MEDIA_KEY: "Video data lacks the corresponding MediaKey",
      DRM_NO_KEY_SESSION:
        "Browser does not support the corresponding DRM KeySession",
      DRM_GENERATE_QUEST_FAIL: "Decryption playback error",
      DRM_LACK_SERVER_CERTIFICATE_PATH: "Missing DRM certificate request link",
      DRM_LACK_SERVER_PROCESS_SPC_PATH: "Missing DRM License request link",
      DRM_LICENSE_FAIL: "Request or update License failed",
      DRM_KEY_ERROR: "Decryption error",
      DRM_CERT_FAIL: "Request for DRM certificate failed",
      OTHER: "Unknown error",
      RUNTIME: "An error occurred, Please try again",
      MODULE_LOAD_ERROR: "CDN fetch error",
      UNKNOWN: "Unknown error",
    }
  ),
  d3t = $n(
    $n({}, N$t.TEXT),
    {},
    {
      DEFINITION_FALLBACK_TOAST: "当前网络不稳定，建议切换到",
      DEFINITION_SWITCHING: "正在切换至",
      ERROR_REFRESH: "刷新",
      UNMUTE: "点击取消静音",
      MANIFEST: "视频解析错误",
      NETWORK: "网络错误",
      NETWORK_TIMEOUT: "网络超时",
      NETWORK_FORBIDDEN: "鉴权异常",
      NETWORK_NOTFOUND: "播放地址不存在",
      DEMUX: "视频解析错误",
      REMUX: "视频解析错误",
      MEDIA: "播放异常，请重试",
      MEDIA_ERR_CODEC_NOT_SUPPORTED: "不支持的音频/视频格式",
      MEDIA_ERR_URL_EMPTY: "当前播放地址为空",
      DRM: "权限验证失败",
      DRM_LICENSE: "商业 DRM LICENSE 鉴权失败",
      DRM_UNSUPPORTED: "不支持 DRM 加密播放",
      DRM_NO_MEDIA_KEY: "视频数据缺少相应 MediaKey",
      DRM_NO_KEY_SESSION: "浏览器不支持相应 DRM KeySession",
      DRM_GENERATE_QUEST_FAIL: "解密播放错误",
      DRM_LACK_SERVER_CERTIFICATE_PATH: "缺少 DRM 证书请求链接",
      DRM_LACK_SERVER_PROCESS_SPC_PATH: "缺少 DRM License 请求链接",
      DRM_LICENSE_FAIL: "请求或更新 License 失败",
      DRM_KEY_ERROR: "解密错误",
      DRM_CERT_FAIL: "请求 DRM 证书失败",
      OTHER: "其他报错",
      RUNTIME: "播放异常，请重试",
      MODULE_LOAD_ERROR: "插件模块加载异常",
      UNKNOWN: "未知报错",
    }
  ),
  WC = (function () {
    function t(e) {
      var n;
      if (
        (Wn(this, t),
        bn(this, "_lang", void 0),
        (this._lang = (e == null ? void 0 : e.lang) || q6e() || "en"),
        this._lang === "zh" && (this._lang = "zh-cn"),
        e != null && (n = e.i18n) !== null && n !== void 0 && n.texts)
      ) {
        var r,
          i,
          o = On(
            (r = N1(
              e == null || (i = e.i18n) === null || i === void 0
                ? void 0
                : i.texts
            ))
          ).call(r, function (l) {
            var u = hs(l, 2);
            return { LANG: u[0], TEXT: u[1] };
          });
        t.extend(o);
      }
    }
    return (
      Kn(
        t,
        [
          {
            key: "setLang",
            value: function (e) {
              this._lang = e;
            },
          },
          {
            key: "getLang",
            value: function () {
              return this._lang;
            },
          },
          {
            key: "normalize",
            value: function (e) {
              return e ? (typeof e == "string" ? e : e[this._lang]) : "";
            },
          },
          {
            key: "getText",
            value: function (e) {
              var n, r, i;
              if (e) {
                var o = P1 == null ? void 0 : P1.lang;
                return (n =
                  o == null || (r = o[this._lang]) === null || r === void 0
                    ? void 0
                    : r[e]) !== null && n !== void 0
                  ? n
                  : o == null || (i = o.en) === null || i === void 0
                  ? void 0
                  : i[e];
              }
            },
          },
        ],
        [
          {
            key: "langKeys",
            get: function () {
              return P1.langKeys;
            },
          },
          {
            key: "isLangValid",
            value: function (e) {
              var n;
              return $a((n = P1.langKeys)).call(n, e) || e === "zh";
            },
          },
          {
            key: "extend",
            value: function (e, n) {
              P1.extend(e, n);
            },
          },
        ]
      ),
      t
    );
  })(),
  h3t = (function () {
    function t(e) {
      Wn(this, t),
        bn(this, "_videoAttributes", void 0),
        bn(this, "_el", void 0),
        (this._videoAttributes = Bse(e)),
        (this._el = e);
    }
    return (
      Kn(t, [
        {
          key: "options",
          get: function () {
            var e = this;
            return {
              remainMediaAfterDestroy: !0,
              mediaEl: function (n) {
                return s8e(e._el, n);
              },
            };
          },
        },
        {
          key: "destroy",
          value: function () {
            l8e(this._el, this._videoAttributes);
          },
        },
      ]),
      t
    );
  })(),
  f3t = ["autoplay"],
  p3t = ml.POSITIONS,
  dU = $n($n({}, p3t), Hse),
  g3t = {
    id: "veplayer",
    width: "100%",
    height: "100%",
    decodeType: Aoe.Hardware,
    fullscreen: { useCssFullscreen: !1 },
  },
  m3t = function (t) {
    var e,
      n,
      r = t.autoplay,
      i = nse(t, f3t);
    if (i.poster) {
      if (typeof i.poster == "string") i.poster = Vye(i.poster);
      else if (
        typeof ((e = i.poster) === null || e === void 0 ? void 0 : e.poster) ==
        "string"
      ) {
        var o;
        i.poster.poster = Vye(
          (o = i.poster) === null || o === void 0 ? void 0 : o.poster
        );
      }
    }
    return (
      (i.icons = $n($n({}, u3t), i.icons ? u5t(i.icons) : {})),
      (i.autoplay = !!r),
      r &&
        typeof r != "boolean" &&
        ((i.autoplayMuted = r == null ? void 0 : r.muted),
        (i.videoAttributes = $n(
          $n({}, (n = i.videoAttributes) !== null && n !== void 0 ? n : {}),
          {},
          { muted: r == null ? void 0 : r.muted }
        )),
        (i.autoplayPlugin = r)),
      delete i.i18n,
      i
    );
  },
  _8e = (function () {
    function t() {
      var d,
        h,
        f,
        p,
        g,
        y,
        v,
        b,
        w,
        k,
        D,
        $,
        N,
        P = this,
        I = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      Wn(this, t),
        bn(this, "_player", void 0),
        bn(this, "_sourceManager", void 0),
        bn(this, "_preparePlugins", void 0),
        bn(this, "_previousPrepareResult", void 0),
        bn(this, "_i18nManager", void 0),
        bn(this, "_events", {}),
        bn(this, "_customMedia", void 0),
        bn(this, "_errorCallback", void 0),
        bn(this, "_beforeFallbackError", void 0),
        (this._sourceManager = I.sourceManager),
        (this._preparePlugins = I.preparePlugins),
        (this._previousPrepareResult = I.prepareResult),
        (this._beforeFallbackError = I.beforeFallbackError),
        (this._i18nManager =
          (d = I.i18nManager) !== null && d !== void 0
            ? d
            : new WC({ i18n: I.i18n })),
        I.mediaElement && (this._customMedia = new h3t(I.mediaElement));
      var O = m3t(
          $n(
            $n(
              $n({}, I),
              (h = this._customMedia) === null || h === void 0
                ? void 0
                : h.options
            ),
            (f = this._previousPrepareResult) === null || f === void 0
              ? void 0
              : f.options
          )
        ),
        X = Ce((p = [])).call(
          p,
          Cf(
            (g =
              (y = this._previousPrepareResult) === null || y === void 0
                ? void 0
                : y.plugins) !== null && g !== void 0
              ? g
              : []
          ),
          Cf((v = I.plugins) !== null && v !== void 0 ? v : m8e)
        ),
        G = [],
        H = [];
      X.forEach(function (E) {
        Xse.isTopRightPlugin(E, I) ? G.push(E) : H.push(E);
      }),
        (this._player = new mF(
          $n(
            $n($n({}, g3t), O),
            {},
            {
              definition: $n(
                {
                  list:
                    (b =
                      (w = this._sourceManager.source) === null || w === void 0
                        ? void 0
                        : w.definitions) !== null && b !== void 0
                      ? b
                      : [],
                  defaultDefinition:
                    (k = this._sourceManager.definition) === null ||
                    k === void 0
                      ? void 0
                      : k.definition,
                },
                (D = I.definition) !== null && D !== void 0 ? D : {}
              ),
              url:
                ($ = this._sourceManager.definition) === null || $ === void 0
                  ? void 0
                  : $.url,
              sources: $n(
                $n({}, (N = I.sources) !== null && N !== void 0 ? N : {}),
                {},
                { sourceManager: this._sourceManager }
              ),
              topRightBar: { plugins: G },
              plugins: H,
              i18nManager: this._i18nManager,
              veplayer: this,
            }
          )
        )),
        this.emit(cc.PLAYER_CREATE_FINISH, this._player),
        (this._errorCallback = function (E) {
          return P._handleFallback(E);
        }),
        this._player.on(Kk, this._errorCallback);
    }
    var e, n, r, i, o, l, u, c;
    return (
      Kn(
        t,
        [
          {
            key: "readyState",
            get: function () {
              return this._player.readyState;
            },
          },
          {
            key: "buffered",
            get: function () {
              return this._player.buffered;
            },
          },
          {
            key: "played",
            get: function () {
              return this._player.played;
            },
          },
          {
            key: "cumulateTime",
            get: function () {
              return this._player.cumulateTime;
            },
          },
          {
            key: "isFocused",
            get: function () {
              return this._player.isActive;
            },
          },
          {
            key: "isFullscreen",
            get: function () {
              return this._player.isFullscreen;
            },
          },
          {
            key: "isCssFullscreen",
            get: function () {
              return this._player.isCssfullScreen;
            },
          },
          {
            key: "networkState",
            get: function () {
              return this._player.networkState;
            },
          },
          {
            key: "paused",
            get: function () {
              return this._player.paused;
            },
          },
          {
            key: "ended",
            get: function () {
              return this._player.ended;
            },
          },
          {
            key: "state",
            get: function () {
              return this._player.state;
            },
          },
          {
            key: "url",
            get: function () {
              return this._player.config.url;
            },
          },
          {
            key: "source",
            get: function () {
              var d;
              return (d = this._sourceManager.source) === null || d === void 0
                ? void 0
                : d.name;
            },
          },
          {
            key: "playerVersion",
            get: function () {
              return "2.9.2";
            },
          },
          {
            key: "definition",
            get: function () {
              var d;
              return (d = this._sourceManager.definition) === null ||
                d === void 0
                ? void 0
                : d.definition;
            },
          },
          {
            key: "crossOrigin",
            get: function () {
              return this._player.crossOrigin;
            },
            set: function (d) {
              this._player.crossOrigin = d;
            },
          },
          {
            key: "volume",
            get: function () {
              return this._player.volume;
            },
            set: function (d) {
              this._player.volume = d;
            },
          },
          {
            key: "muted",
            get: function () {
              return this._player.muted;
            },
            set: function (d) {
              this._player.muted = d;
            },
          },
          {
            key: "lang",
            get: function () {
              return this._i18nManager.getLang();
            },
            set: function (d) {
              if (this._player.lang !== d)
                if (WC.isLangValid(d))
                  this._i18nManager.setLang(d), (this._player.lang = d);
                else {
                  var h,
                    f,
                    p,
                    g,
                    y = WC.langKeys.join(","),
                    v = {
                      en: Ce(
                        (h = "Sorry, we couldn't set the language to ".concat(
                          d,
                          " because it's not currently supported. The list of supported languages includes "
                        ))
                      ).call(h, y, "."),
                      "zh-cn": Ce(
                        (f = "不支持当前设置的语言".concat(d, ", 支持的语言有"))
                      ).call(f, y, ", 请重新设置"),
                    };
                  console.error(
                    ((p = this._i18nManager) === null ||
                    p === void 0 ||
                    (g = p.normalize) === null ||
                    g === void 0
                      ? void 0
                      : g.call(p, v)) || v.en
                  );
                }
            },
          },
          {
            key: "_src",
            get: function () {
              return this._player.currentSrc;
            },
          },
          {
            key: "switch",
            value:
              ((c = Gi(
                or().mark(function d(h, f) {
                  var p, g, y, v;
                  return or().wrap(
                    function (b) {
                      for (;;)
                        switch ((b.prev = b.next)) {
                          case 0:
                            if (
                              typeof h != "string" ||
                              this._sourceManager.sources.length !== 1 ||
                              ((p = this._sourceManager.sources) === null ||
                              p === void 0 ||
                              (p = p[0].definitions) === null ||
                              p === void 0
                                ? void 0
                                : p.length) !== 1
                            ) {
                              b.next = 5;
                              break;
                            }
                            return (
                              this._sourceManager.updateSources(h),
                              (b.next = 4),
                              this._switchUrl(h, {
                                seamless: f == null ? void 0 : f.seamless,
                              })
                            );
                          case 4:
                            return b.abrupt(
                              "return",
                              this._sourceManager.definition
                            );
                          case 5:
                            if (
                              (y = ji((g = this._sourceManager)).call(g, h, f))
                            ) {
                              b.next = 8;
                              break;
                            }
                            throw new Error(
                              typeof h == "string"
                                ? "No definition found for url: ".concat(h)
                                : Ce(
                                    (v =
                                      "No definition found for source: ".concat(
                                        h.source,
                                        ", definition: "
                                      ))
                                  ).call(v, h.definition)
                            );
                          case 8:
                            return (b.next = 10), this._switch(y);
                          case 10:
                            return b.abrupt("return", y);
                          case 11:
                          case "end":
                            return b.stop();
                        }
                    },
                    d,
                    this
                  );
                })
              )),
              function (d, h) {
                return c.apply(this, arguments);
              }),
          },
          {
            key: "updatePlaylist",
            value:
              ((u = Gi(
                or().mark(function d(h, f) {
                  var p;
                  return or().wrap(
                    function (g) {
                      for (;;)
                        switch ((g.prev = g.next)) {
                          case 0:
                            return (
                              (p = this._sourceManager.updateSources(h, f)),
                              g.abrupt("return", this._switch(p.definition))
                            );
                          case 2:
                          case "end":
                            return g.stop();
                        }
                    },
                    d,
                    this
                  );
                })
              )),
              function (d, h) {
                return u.apply(this, arguments);
              }),
          },
          {
            key: "once",
            value: function (d, h) {
              var f,
                p = this._transformEvent(d, h),
                g = p.xgCallback,
                y = p.xgEventName;
              g &&
                (((f = this._events) !== null && f !== void 0 && f[d]) ||
                  (this._events[d] = new Lf()),
                this._events[d].set(h, g),
                this._player.once(y, g));
            },
          },
          {
            key: "off",
            value: function (d, h) {
              var f,
                p =
                  (f = this._events[d]) === null || f === void 0
                    ? void 0
                    : f.get(h),
                g = this._transformEvent(d).xgEventName;
              p && (this._player.off(g, p), this._events[d].delete(h));
            },
          },
          {
            key: "emit",
            value: function (d, h) {
              var f = this._transformEvent(d).xgEventName;
              this._player.emit(f, h);
            },
          },
          {
            key: "offAll",
            value: function () {
              (this._events = {}), this._player.offAll();
            },
          },
          {
            key: "on",
            value: function (d, h) {
              var f,
                p = this._transformEvent(d, h),
                g = p.xgCallback,
                y = p.xgEventName;
              g &&
                (((f = this._events) !== null && f !== void 0 && f[d]) ||
                  (this._events[d] = new Lf()),
                this._events[d].set(h, g),
                this._player.on(y, g));
            },
          },
          {
            key: "play",
            value: function () {
              /* istanbul ignore next -- @preserve */ return this._player.play();
            },
          },
          {
            key: "pause",
            value: function () {
              /* istanbul ignore next -- @preserve */ return this._player.pause();
            },
          },
          {
            key: "requestPIP",
            value: function () {
              var d;
              /* istanbul ignore next -- @preserve */ (d =
                this._player.plugins.pip) === null ||
                d === void 0 ||
                d.requestPIP();
            },
          },
          {
            key: "exitPIP",
            value: function () {
              var d;
              /* istanbul ignore next -- @preserve */ (d =
                this._player.plugins.pip) === null ||
                d === void 0 ||
                d.exitPIP();
            },
          },
          {
            key: "retry",
            value: function () {
              return this._player.retry();
            },
          },
          {
            key: "focus",
            value: function (d) {
              return this._player.focus(d);
            },
          },
          {
            key: "blur",
            value: function (d) {
              return this._player.blur(d);
            },
          },
          {
            key: "canPlayType",
            value: function (d) {
              return this._player.canPlayType(d);
            },
          },
          {
            key: "requestFullscreen",
            value: function (d) {
              return this._player.getFullscreen(d);
            },
          },
          {
            key: "exitFullscreen",
            value: function (d) {
              return this._player.exitFullscreen(d);
            },
          },
          {
            key: "requestCssFullscreen",
            value: function (d) {
              return this._player.getCssFullscreen(d);
            },
          },
          {
            key: "exitCssFullscreen",
            value: function () {
              return this._player.exitCssFullscreen();
            },
          },
          {
            key: "registerPlugin",
            value: function (d, h) {
              return this._player.registerPlugin(d, h);
            },
          },
          {
            key: "unRegisterPlugin",
            value: function (d) {
              return this._player.unRegisterPlugin(d);
            },
          },
          {
            key: "showIcon",
            value: function (d) {
              var h = this,
                f = this._player.getPlugin("more");
              d.forEach(function (p) {
                var g = h._player.getPlugin(p);
                g &&
                  g != null &&
                  g.root &&
                  (g.config.position === dU.ROOT_TOP_RIGHT_COLLAPSE
                    ? f == null || f.showChild(g)
                    : g.show());
              });
            },
          },
          {
            key: "hideIcon",
            value: function (d) {
              var h = this,
                f = this._player.getPlugin("more");
              d.forEach(function (p) {
                var g = h._player.getPlugin(p);
                g &&
                  g != null &&
                  g.root &&
                  (g.config.position === dU.ROOT_TOP_RIGHT_COLLAPSE
                    ? f == null || f.hideChild(g)
                    : g.hide());
              });
            },
          },
          {
            key: "destroy",
            value: function () {
              var d;
              this._player.off(Kk, this._errorCallback),
                this._player.destroy(),
                (d = this._customMedia) === null || d === void 0 || d.destroy();
            },
          },
          {
            key: "prepare",
            value:
              ((l = Gi(
                or().mark(function d(h) {
                  var f,
                    p,
                    g,
                    y,
                    v,
                    b,
                    w,
                    k,
                    D,
                    $,
                    N,
                    P,
                    I = this;
                  return or().wrap(
                    function (O) {
                      for (;;)
                        switch ((O.prev = O.next)) {
                          case 0:
                            return (
                              (O.next = 2),
                              (f = this._preparePlugins) === null ||
                              f === void 0
                                ? void 0
                                : f.call(this, h)
                            );
                          case 2:
                            return (
                              (y = O.sent) != null &&
                              y.protocol &&
                              (p = this._previousPrepareResult) !== null &&
                              p !== void 0 &&
                              p.protocol
                                ? (v =
                                    y.protocol ===
                                    ((b = this._previousPrepareResult) ===
                                      null || b === void 0
                                      ? void 0
                                      : b.protocol))
                                : (($ =
                                    (w =
                                      y == null ||
                                      (k = y.options) === null ||
                                      k === void 0
                                        ? void 0
                                        : k.url) !== null && w !== void 0
                                      ? w
                                      : h),
                                  (N =
                                    (D = this._player) === null ||
                                    D === void 0 ||
                                    (D = D.config) === null ||
                                    D === void 0
                                      ? void 0
                                      : D.url),
                                  (v = N && nE($) === nE(N))),
                              v ||
                                (P = this._previousPrepareResult) === null ||
                                P === void 0 ||
                                (P = P.plugins) === null ||
                                P === void 0 ||
                                P.forEach(function (X) {
                                  I._player.unRegisterPlugin(X.pluginName);
                                }),
                              (this._previousPrepareResult = y),
                              y != null &&
                                y.options &&
                                this._player.setConfig(y.options),
                              O.abrupt("return", {
                                plugins: v
                                  ? []
                                  : y == null ||
                                    (g = y.plugins) === null ||
                                    g === void 0
                                  ? void 0
                                  : On(g).call(g, function (X) {
                                      return I._player.registerPlugin(X);
                                    }),
                                options: y == null ? void 0 : y.options,
                                isSameProtocol: v,
                                useSrc: y == null ? void 0 : y.useSrc,
                              })
                            );
                          case 8:
                          case "end":
                            return O.stop();
                        }
                    },
                    d,
                    this
                  );
                })
              )),
              function (d) {
                return l.apply(this, arguments);
              }),
          },
          {
            key: "_handleFallback",
            value:
              ((o = Gi(
                or().mark(function d(h) {
                  var f,
                    p,
                    g,
                    y = this;
                  return or().wrap(
                    function (v) {
                      for (;;)
                        switch ((v.prev = v.next)) {
                          case 0:
                            if (
                              (this._player.addClass(qr.ENTER),
                              (f = this._sourceManager.url),
                              (p = this._sourceManager.fallback()))
                            ) {
                              v.next = 19;
                              break;
                            }
                            return (
                              (g = Aee(h, this._i18nManager)),
                              (v.prev = 5),
                              (v.next = 8),
                              this._beforeFallbackError(g)
                            );
                          case 8:
                            if (v.sent.canEmitError) {
                              v.next = 12;
                              break;
                            }
                            return v.abrupt("return");
                          case 12:
                            v.next = 16;
                            break;
                          case 14:
                            (v.prev = 14), (v.t0 = v.catch(5));
                          case 16:
                            return (
                              this._player.removeClass(qr.ENTER),
                              this.emit(cc.FALLBACK_ERROR, g),
                              v.abrupt("return")
                            );
                          case 19:
                            this._player.once("canplay", function () {
                              y._sourceManager.resetFallback();
                            }),
                              this.emit(cc.FALLBACK, {
                                from: { url: f },
                                to: { url: p },
                              }),
                              this._switchUrl(p);
                          case 22:
                          case "end":
                            return v.stop();
                        }
                    },
                    d,
                    this,
                    [[5, 14]]
                  );
                })
              )),
              function (d) {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "_transformEvent",
            value: function (d, h) {
              var f = this;
              return d === Kk
                ? {
                    xgCallback: h
                      ? function (p) {
                          h(Aee(p, f._i18nManager));
                        }
                      : void 0,
                    xgEventName: d,
                  }
                : ULt(d, h);
            },
          },
          {
            key: "_switch",
            value:
              ((i = Gi(
                or().mark(function d(h) {
                  var f, p, g, y, v, b, w, k, D, $, N, P, I;
                  return or().wrap(
                    function (O) {
                      for (;;)
                        switch ((O.prev = O.next)) {
                          case 0:
                            return (
                              (v = WUe(this._sourceManager.definition)),
                              (b =
                                this._player.paused && !this._player.isError),
                              (O.next = 4),
                              this.prepare(h.url)
                            );
                          case 4:
                            if (((O.t0 = O.sent), O.t0)) {
                              O.next = 7;
                              break;
                            }
                            O.t0 = {};
                          case 7:
                            if (
                              ((w = O.t0),
                              (k = w.plugins),
                              (D = w.options),
                              ($ = w.isSameProtocol),
                              (N = w.useSrc),
                              D != null &&
                                D.url &&
                                (h.url = D == null ? void 0 : D.url),
                              this._sourceManager.switch(h),
                              (f = this._player) === null ||
                                f === void 0 ||
                                (f = f.plugins) === null ||
                                f === void 0 ||
                                (f = f.sources) === null ||
                                f === void 0 ||
                                f.renderItemList(),
                              (p = this._player) === null ||
                                p === void 0 ||
                                (p = p.plugins) === null ||
                                p === void 0 ||
                                (p = p.definition) === null ||
                                p === void 0 ||
                                p.renderItemList(),
                              (P =
                                (h == null ||
                                (g = h.source) === null ||
                                g === void 0
                                  ? void 0
                                  : g.name) !==
                                (v == null ||
                                (y = v.source) === null ||
                                y === void 0
                                  ? void 0
                                  : y.name)),
                              (I =
                                (h == null ? void 0 : h.definition) !==
                                (v == null ? void 0 : v.definition)),
                              (this._player.config.url = h.url),
                              !$)
                            ) {
                              O.next = 23;
                              break;
                            }
                            P
                              ? (this.emit(cc.SOURCE_CHANGE),
                                this._player.switchURL(h.url))
                              : this._player.changeDefinition(h, v),
                              (O.next = 27);
                            break;
                          case 23:
                            return (
                              (I || P) &&
                                this.emit(
                                  P ? cc.SOURCE_CHANGE : cc.DEFINITION_CHANGE
                                ),
                              (O.next = 26),
                              this._switchDifferentProtocolUrl(k, h.url, b, N)
                            );
                          case 26:
                            I && this.emit(cc.AFTER_DEFINITION_CHANGE);
                          case 27:
                          case "end":
                            return O.stop();
                        }
                    },
                    d,
                    this
                  );
                })
              )),
              function (d) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "_switchDifferentProtocolUrl",
            value:
              ((r = Gi(
                or().mark(function d(h, f, p, g) {
                  var y,
                    v,
                    b = this;
                  return or().wrap(
                    function (w) {
                      for (;;)
                        switch ((w.prev = w.next)) {
                          case 0:
                            if (
                              (g &&
                                this._player.media &&
                                ((y = this._player.config) !== null &&
                                  y !== void 0 &&
                                  y.preProcessUrl &&
                                  (f =
                                    (v = this._player.config) === null ||
                                    v === void 0
                                      ? void 0
                                      : v.preProcessUrl(f).url),
                                (this._player.media.src = f)),
                              h == null || !h.length)
                            ) {
                              w.next = 4;
                              break;
                            }
                            return (
                              (w.next = 4), this._callBeforePlayerInitForUrl(h)
                            );
                          case 4:
                            return w.abrupt(
                              "return",
                              new Ar(function (k) {
                                var D = b._player.currentTime,
                                  $ = function () {
                                    (b._player.currentTime = D),
                                      p &&
                                        b._player.once(lm, function () {
                                          b._player.pause();
                                        }),
                                      k();
                                  };
                                Na.os.isAndroid
                                  ? b.once(HC, function () {
                                      $();
                                    })
                                  : b.once(lm, function () {
                                      $();
                                    }),
                                  b._player.play();
                              })
                            );
                          case 5:
                          case "end":
                            return w.stop();
                        }
                    },
                    d,
                    this
                  );
                })
              )),
              function (d, h, f, p) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "_switchUrl",
            value:
              ((n = Gi(
                or().mark(function d(h, f) {
                  var p, g, y, v, b, w, k, D, $;
                  return or().wrap(
                    function (N) {
                      for (;;)
                        switch ((N.prev = N.next)) {
                          case 0:
                            return (
                              (g =
                                this._player.paused && !this._player.isError),
                              (N.next = 3),
                              this.prepare(h)
                            );
                          case 3:
                            if (((N.t0 = N.sent), N.t0)) {
                              N.next = 6;
                              break;
                            }
                            N.t0 = {};
                          case 6:
                            if (
                              ((y = N.t0),
                              (v = y.plugins),
                              (b = y.options),
                              (w = y.isSameProtocol),
                              (k = y.useSrc),
                              (D =
                                (p = b == null ? void 0 : b.url) !== null &&
                                p !== void 0
                                  ? p
                                  : h),
                              (this._sourceManager.url = D),
                              (this._player.config.url = D),
                              !w)
                            ) {
                              N.next = 20;
                              break;
                            }
                            if (
                              !($ = this._player.switchURL(D, {
                                seamless: f == null ? void 0 : f.seamless,
                              })) ||
                              !$.then
                            ) {
                              N.next = 18;
                              break;
                            }
                            return N.abrupt("return", $);
                          case 18:
                            N.next = 21;
                            break;
                          case 20:
                            return N.abrupt(
                              "return",
                              this._switchDifferentProtocolUrl(v, D, g, k)
                            );
                          case 21:
                          case "end":
                            return N.stop();
                        }
                    },
                    d,
                    this
                  );
                })
              )),
              function (d, h) {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_callBeforePlayerInitForUrl",
            value: function (d) {
              var h = this;
              return new Ar(function (f) {
                d == null ||
                  d.forEach(function (p) {
                    p.beforePlayerInit();
                  }),
                  h._player.on(cc.CANPLAY, function () {
                    f(void 0);
                  });
              });
            },
          },
        ],
        [
          {
            key: "create",
            value:
              ((e = Gi(
                or().mark(function d() {
                  var h,
                    f,
                    p,
                    g,
                    y,
                    v,
                    b,
                    w,
                    k = arguments;
                  return or().wrap(function (D) {
                    for (;;)
                      switch ((D.prev = D.next)) {
                        case 0:
                          return (
                            (g = k.length > 0 && k[0] !== void 0 ? k[0] : {}),
                            (y = k.length > 1 ? k[1] : void 0),
                            (v = new O5t({
                              sources: zUe.normalize({
                                url: g.url,
                                fallbackUrls: g.fallbackUrls,
                                sources: g.playlist,
                              }),
                              url: g.url,
                              defaultSource: g.defaultSource,
                              defaultDefinition: g.defaultDefinition,
                              maxFallbackRound: g.maxFallbackRound,
                            })),
                            (D.next = 5),
                            g == null ||
                            (h = g.preparePlugins) === null ||
                            h === void 0
                              ? void 0
                              : h.call(
                                  g,
                                  (f = v.url) !== null && f !== void 0 ? f : ""
                                )
                          );
                        case 5:
                          return (
                            (b = D.sent) != null &&
                              (p = b.options) !== null &&
                              p !== void 0 &&
                              p.url &&
                              (v.url =
                                b == null ||
                                (w = b.options) === null ||
                                w === void 0
                                  ? void 0
                                  : w.url),
                            (g.url = v.url),
                            D.abrupt(
                              "return",
                              new (y ?? t)(
                                $n(
                                  $n({}, g),
                                  {},
                                  { prepareResult: b, sourceManager: v }
                                )
                              )
                            )
                          );
                        case 9:
                        case "end":
                          return D.stop();
                      }
                  }, d);
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
        ]
      ),
      t
    );
  })();
function Vse(t) {
  var e = ga(t).call(
      t,
      function (i, o) {
        return i + o.byteLength;
      },
      0
    ),
    n = new Uint8Array(e),
    r = 0;
  return (
    t.forEach(function (i) {
      n.set(i, r), (r += i.byteLength);
    }),
    n
  );
}
function uu(t, e) {
  return wl(t == null ? void 0 : t.toFixed(e || 4));
}
var y3t = ea,
  v3t = function (t, e, n) {
    return e in t
      ? y3t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  U_ = function (t, e, n) {
    return v3t(t, ti(e) !== "symbol" ? e + "" : e, n), n;
  },
  A2 = { SCRIPT: "ScriptData", SEQUENCE: "Sequence_Header", RAW: "RawData" },
  b3t = [5500, 11e3, 22e3, 44e3],
  t3 = { AAC: "aac", PCMA: "pcma", PCMU: "pcmu" },
  n3 = { AVC: "avc", HEVC: "bytevc1" },
  T8e = (function () {
    function t(e) {
      var n = this;
      Wn(this, t),
        U_(this, "type", 0),
        U_(this, "tagSize", 0),
        U_(this, "timestamp", 0),
        U_(this, "duration", 0),
        U_(this, "header", null),
        U_(this, "body", null),
        U_(this, "bodyView", null),
        U_(this, "tailsize", null),
        Dn(e).forEach(function (r) {
          n[r] = e[r];
        });
    }
    return (
      Kn(t, [
        {
          key: "streamType",
          get: function () {
            switch (this.type) {
              case 18:
                return "scriptData";
              case 9:
                return "video";
              case 8:
                return "audio";
            }
          },
        },
        {
          key: "packetType",
          get: function () {
            var e;
            return (e = this.bodyView) == null ? void 0 : e.packetType;
          },
        },
        {
          key: "frameType",
          get: function () {
            var e;
            return (e = this.bodyView) == null ? void 0 : e.frameType;
          },
          set: function (e) {
            this.bodyView.frameType = e;
          },
        },
        {
          key: "dts",
          get: function () {
            return this.timestamp;
          },
        },
        {
          key: "pts",
          get: function () {
            var e;
            return (
              (((e = this.bodyView) == null ? void 0 : e.cts) || 0) +
              this.timestamp
            );
          },
        },
        {
          key: "ptsTime",
          get: function () {
            return this.pts ? uu(this.pts / 1e3) : 0;
          },
        },
        {
          key: "dtsTime",
          get: function () {
            return this.dts ? uu(this.dts / 1e3) : 0;
          },
        },
        {
          key: "sampleView",
          get: function () {
            var e, n, r;
            if (
              ((e = this.bodyView) == null ? void 0 : e.packetType) !==
                "Sequence_Header" &&
              this.type !== 18
            )
              return {
                dts: this.timestamp,
                pts:
                  (((n = this.bodyView) == null ? void 0 : n.cts) || 0) +
                  this.timestamp,
                data: this._getSampleData(),
                units: (r = this.bodyView) == null ? void 0 : r.units,
              };
          },
        },
        {
          key: "size",
          get: function () {
            var e, n;
            return (n = (e = this.sampleView) == null ? void 0 : e.data) == null
              ? void 0
              : n.length;
          },
        },
        {
          key: "data",
          get: function () {
            return this._getSampleData();
          },
        },
        {
          key: "nalTypes",
          get: function () {
            var e, n;
            return (n = (e = this.bodyView) == null ? void 0 : e.units) == null
              ? void 0
              : On(n).call(n, function (r) {
                  return r.type;
                });
          },
        },
        {
          key: "nalSizes",
          get: function () {
            var e, n;
            return (n = (e = this.bodyView) == null ? void 0 : e.units) == null
              ? void 0
              : On(n).call(n, function (r) {
                  return r.unit.length;
                });
          },
        },
        {
          key: "keyframe",
          get: function () {
            return this.frameType === "I";
          },
        },
        {
          key: "isSample",
          get: function () {
            return (
              this.streamType !== "scriptData" &&
              this.packetType !== "Sequence_Header"
            );
          },
        },
        {
          key: "isVideo",
          get: function () {
            return this.isSample && this.streamType === "video";
          },
        },
        {
          key: "isAudio",
          get: function () {
            return this.isSample && this.streamType === "audio";
          },
        },
        {
          key: "isSqHeader",
          get: function () {
            return this.packetType === "Sequence_Header";
          },
        },
        {
          key: "timescale",
          get: function () {
            return 1e3;
          },
        },
        {
          key: "isHevc",
          get: function () {
            var e;
            return (
              ((e = this.bodyView) == null ? void 0 : e.codecType) === "bytevc1"
            );
          },
        },
        {
          key: "_getSampleData",
          value: function () {
            var e, n;
            if (this.streamType === "audio") return this.bodyView.sample;
            var r =
                ((n = this.bodyView) == null
                  ? void 0
                  : _r((e = n.units)).call(e, function (u) {
                      return !u.isSei;
                    })) || [],
              i = ga(r).call(
                r,
                function (u, c) {
                  return u + (c.unit.byteLength + 4);
                },
                0
              ),
              o = new Uint8Array(i),
              l = 0;
            return (
              r.forEach(function (u) {
                o.set([0, 0, 0, 1], l),
                  (l += 4),
                  o.set(u.unit, l),
                  (l += u.unit.byteLength);
              }),
              o
            );
          },
        },
      ]),
      t
    );
  })(),
  pve = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "decode",
          value: function (e) {
            for (var n = [], r = e, i = 0, o = e.length; i < o; )
              if (r[i] < 128) n.push(String.fromCharCode(r[i])), ++i;
              else {
                if (!(r[i] < 192)) {
                  if (r[i] < 224) {
                    if (t._checkContinuation(r, i, 1)) {
                      var l = ((31 & r[i]) << 6) | (63 & r[i + 1]);
                      if (l >= 128) {
                        n.push(String.fromCharCode(65535 & l)), (i += 2);
                        continue;
                      }
                    }
                  } else if (r[i] < 240) {
                    if (t._checkContinuation(r, i, 2)) {
                      var u =
                        ((15 & r[i]) << 12) |
                        ((63 & r[i + 1]) << 6) |
                        (63 & r[i + 2]);
                      if (u >= 2048 && (63488 & u) != 55296) {
                        n.push(String.fromCharCode(65535 & u)), (i += 3);
                        continue;
                      }
                    }
                  } else if (r[i] < 248 && t._checkContinuation(r, i, 3)) {
                    var c =
                      ((7 & r[i]) << 18) |
                      ((63 & r[i + 1]) << 12) |
                      ((63 & r[i + 2]) << 6) |
                      (63 & r[i + 3]);
                    if (c > 65536 && c < 1114112) {
                      (c -= 65536),
                        n.push(String.fromCharCode((c >>> 10) | 55296)),
                        n.push(String.fromCharCode((1023 & c) | 56320)),
                        (i += 4);
                      continue;
                    }
                  }
                }
                n.push(String.fromCharCode(65533)), ++i;
              }
            return n.join("");
          },
        },
        {
          key: "_checkContinuation",
          value: function (e, n, r) {
            var i = e;
            if (n + r < i.length) {
              for (; r--; ) if ((192 & i[++n]) != 128) return !1;
              return !0;
            }
            return !1;
          },
        },
      ]),
      t
    );
  })(),
  _3t = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "parse",
          value: function (e) {
            if (!(e.length < 3)) {
              var n = {},
                r = t._parseValue(
                  new DataView(e.buffer, e.byteOffset, e.byteLength)
                );
              try {
                var i = t._parseValue(
                  new DataView(
                    e.buffer,
                    e.byteOffset + r.size,
                    e.byteLength - r.size
                  )
                );
                n[r.data] = i.data;
              } catch {}
              return n;
            }
          },
        },
        {
          key: "_parseValue",
          value: function (e) {
            var n,
              r = e.byteLength,
              i = 1,
              o = !1;
            switch (e.getUint8(0)) {
              case 0:
                (n = e.getFloat64(1)), (i += 8);
                break;
              case 1:
                (n = !!e.getUint8(1)), (i += 1);
                break;
              case 2:
                var l = t._parseString(
                  new DataView(e.buffer, e.byteOffset + i, e.byteLength - i)
                );
                (n = l.data), (i += l.size);
                break;
              case 3:
                n = {};
                var u = 0;
                for (
                  (16777215 & e.getUint32(r - 4)) == 9 && (u = 3);
                  i < r - 4;

                ) {
                  var c = t._parseObject(
                      new DataView(
                        e.buffer,
                        e.byteOffset + i,
                        e.byteLength - i - u
                      )
                    ),
                    d = c.size,
                    h = c.data;
                  if (c.isEnd) break;
                  (n[h.name] = h.value), (i += d);
                }
                i <= r - 3 && (16777215 & e.getUint32(i - 1)) === 9 && (i += 3);
                break;
              case 8:
                (n = {}), (i += 4);
                var f = 0;
                for (
                  (16777215 & e.getUint32(r - 4)) == 9 && (f = 3);
                  i < r - 8;

                ) {
                  var p = t._parseObject(
                      new DataView(
                        e.buffer,
                        e.byteOffset + i,
                        e.byteLength - i - f
                      )
                    ),
                    g = p.size,
                    y = p.data;
                  if (p.isEnd) break;
                  (n[y.name] = y.value), (i += g);
                }
                i <= r - 3 && (16777215 & e.getUint32(i - 1)) === 9 && (i += 3);
                break;
              case 9:
                (n = void 0), (i = 1), (o = !0);
                break;
              case 10:
                n = [];
                var v = e.getUint32(1);
                i += 4;
                for (var b = 0; b < v; b++) {
                  var w = t._parseValue(
                      new DataView(e.buffer, e.byteOffset + i, e.byteLength - i)
                    ),
                    k = w.data,
                    D = w.size;
                  n.push(k), (i += D);
                }
                break;
              case 11:
                var $ = e.getFloat64(i) + 6e4 * e.getInt16(i + 8);
                (n = new Date($)), (i += 10);
                break;
              case 12:
                var N = e.getUint32(1);
                (i += 4),
                  (n = ""),
                  N > 0 &&
                    (n = pve.decode(
                      new Uint8Array(e.buffer, e.byteOffset + i, N)
                    )),
                  (i += N);
                break;
              default:
                i = r;
            }
            return { data: n, size: i, isEnd: o };
          },
        },
        {
          key: "_parseString",
          value: function (e) {
            var n = e.getUint16(0),
              r = "";
            return (
              n > 0 &&
                (r = pve.decode(new Uint8Array(e.buffer, e.byteOffset + 2, n))),
              { data: r, size: 2 + n }
            );
          },
        },
        {
          key: "_parseObject",
          value: function (e) {
            if (!(e.byteLength < 3)) {
              var n = t._parseString(e),
                r = t._parseValue(
                  new DataView(
                    e.buffer,
                    e.byteOffset + n.size,
                    e.byteLength - n.size
                  )
                );
              return {
                data: { name: n.data, value: r.data },
                size: n.size + r.size,
                isEnd: r.isEnd,
              };
            }
          },
        },
      ]),
      t
    );
  })(),
  zse = typeof window < "u",
  hU = zse && navigator.userAgent.toLocaleLowerCase(),
  T3t = zse && $a(hU).call(hU, "firefox"),
  E3t = zse && $a(hU).call(hU, "android"),
  S3t = ea,
  R3t = function (t, e, n) {
    return e in t
      ? S3t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  A3t = function (t, e, n) {
    return R3t(t, ti(e) !== "symbol" ? e + "" : e, n), n;
  },
  w3t = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "parseADTS",
          value: function (e, n) {
            for (
              var r = e.length, i = 0;
              i + 2 < r && (e[i] !== 255 || (246 & e[i + 1]) != 240);

            )
              i++;
            if (!(i >= r)) {
              var o = i,
                l = [],
                u = (60 & e[i + 2]) >>> 2,
                c = t.FREQ[u];
              if (!c) throw new Error("Invalid sampling index: ".concat(u));
              for (
                var d,
                  h,
                  f = 1 + ((192 & e[i + 2]) >>> 6),
                  p = ((1 & e[i + 2]) << 2) | ((192 & e[i + 3]) >>> 6),
                  g = t._getConfig(u, p, f),
                  y = g.config,
                  v = g.codec,
                  b = 0,
                  w = t.getFrameDuration(c);
                i + 7 < r;

              )
                if (e[i] === 255 && (246 & e[i + 1]) == 240) {
                  if (
                    r - i <
                    (h =
                      ((3 & e[i + 3]) << 11) |
                      (e[i + 4] << 3) |
                      ((224 & e[i + 5]) >> 5))
                  )
                    break;
                  d = 2 * (1 & ~e[i + 1]);
                  var k = uu(n + b * w);
                  l.push({
                    pts: k,
                    dts: k,
                    ptsTime: uu(k / 9e4),
                    dtsTime: uu(k / 9e4),
                    data: e.subarray(i + 7 + d, i + h),
                  }),
                    b++,
                    (i += h);
                } else i++;
              return {
                skip: o,
                remaining: i >= r ? void 0 : e.subarray(i),
                frames: l,
                nbFrame: l.length,
                samplingFrequencyIndex: u,
                sampleRate: c,
                objectType: f,
                channelCount: p,
                codec: v,
                config: y,
                originCodec: "mp4a.40.".concat(f),
              };
            }
          },
        },
        {
          key: "parseAudioSpecificConfig",
          value: function (e) {
            if (e.length) {
              var n = e[0] >>> 3,
                r = ((7 & e[0]) << 1) | (e[1] >>> 7),
                i = (120 & e[1]) >>> 3,
                o = t.FREQ[r];
              if (!o) throw new Error("Invalid sampling index: ".concat(r));
              var l = t._getConfig(r, i, n);
              return {
                samplingFrequencyIndex: r,
                sampleRate: o,
                objectType: n,
                channelCount: i,
                config: l.config,
                codec: l.codec,
                originCodec: "mp4a.40.".concat(n),
              };
            }
          },
        },
        {
          key: "getFrameDuration",
          value: function (e) {
            return (
              (1024 *
                (arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 9e4)) /
              e
            );
          },
        },
        {
          key: "_getConfig",
          value: function (e, n, r) {
            var i,
              o,
              l = [];
            return (
              T3t
                ? e >= 6
                  ? ((i = 5), (o = e - 3))
                  : ((i = 2), (o = e))
                : E3t
                ? ((i = 2), (o = e))
                : ((i = r),
                  (o = e),
                  e >= 6 ? (o = e - 3) : n === 1 && ((i = 2), (o = e))),
              (l[0] = i << 3),
              (l[0] |= (14 & e) >> 1),
              (l[1] = (1 & e) << 7),
              (l[1] |= n << 3),
              i === 5 &&
                ((l[1] |= (14 & o) >> 1),
                (l[2] = (1 & o) << 7),
                (l[2] |= 8),
                (l[3] = 0)),
              { config: l, codec: "mp4a.40.".concat(i) }
            );
          },
        },
        {
          key: "getSilentFrame",
          value: function (e, n) {
            if (e === "mp4a.40.2") {
              if (n === 1) return new Uint8Array([0, 200, 0, 128, 35, 128]);
              if (n === 2)
                return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
              if (n === 3)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142,
                ]);
              if (n === 4)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128,
                  8, 2, 56,
                ]);
              if (n === 5)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 56,
                ]);
              if (n === 6)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224,
                ]);
            } else {
              if (n === 1)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6,
                  241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 2)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 3)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
            }
          },
        },
      ]),
      t
    );
  })(),
  jse = w3t;
A3t(
  jse,
  "FREQ",
  [
    96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3,
    7350,
  ]
);
var k3t = ea,
  I3t = function (t, e, n) {
    return e in t
      ? k3t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  DV = function (t, e, n) {
    return I3t(t, ti(e) !== "symbol" ? e + "" : e, n), n;
  },
  nB = (function () {
    function t(e) {
      if (
        (Wn(this, t),
        DV(this, "_bytesAvailable"),
        DV(this, "_bitsAvailable", 0),
        DV(this, "_word", 0),
        !e)
      )
        throw new Error("ExpGolomb data params is required");
      (this._data = e),
        (this._bytesAvailable = e.byteLength),
        this._bytesAvailable && this._loadWord();
    }
    return (
      Kn(t, [
        {
          key: "_loadWord",
          value: function () {
            var e = this._data.byteLength - this._bytesAvailable,
              n = Math.min(4, this._bytesAvailable);
            if (n === 0) throw new Error("No bytes available");
            var r = new Uint8Array(4);
            r.set(this._data.subarray(e, e + n)),
              (this._word = new DataView(r.buffer).getUint32(0)),
              (this._bitsAvailable = 8 * n),
              (this._bytesAvailable -= n);
          },
        },
        {
          key: "skipBits",
          value: function (e) {
            if (this._bitsAvailable > e)
              (this._word <<= e), (this._bitsAvailable -= e);
            else {
              e -= this._bitsAvailable;
              var n = Math.floor(e / 8);
              (e -= 8 * n),
                (this._bytesAvailable -= n),
                this._loadWord(),
                (this._word <<= e),
                (this._bitsAvailable -= e);
            }
          },
        },
        {
          key: "readBits",
          value: function (e) {
            if (e > 32) throw new Error("Cannot read more than 32 bits");
            var n = Math.min(this._bitsAvailable, e),
              r = this._word >>> (32 - n);
            return (
              (this._bitsAvailable -= n),
              this._bitsAvailable > 0
                ? (this._word <<= n)
                : this._bytesAvailable > 0 && this._loadWord(),
              (n = e - n) > 0 && this._bitsAvailable
                ? (r << n) | this.readBits(n)
                : r
            );
          },
        },
        {
          key: "skipLZ",
          value: function () {
            var e;
            for (e = 0; e < this._bitsAvailable; ++e)
              if (this._word & (2147483648 >>> e))
                return (this._word <<= e), (this._bitsAvailable -= e), e;
            return this._loadWord(), e + this.skipLZ();
          },
        },
        {
          key: "skipUEG",
          value: function () {
            this.skipBits(1 + this.skipLZ());
          },
        },
        {
          key: "readUEG",
          value: function () {
            var e = this.skipLZ();
            return this.readBits(e + 1) - 1;
          },
        },
        {
          key: "readEG",
          value: function () {
            var e = this.readUEG();
            return 1 & e ? (1 + e) >>> 1 : -1 * (e >>> 1);
          },
        },
        {
          key: "readBool",
          value: function () {
            return this.readBits(1) === 1;
          },
        },
        {
          key: "readUByte",
          value: function () {
            return this.readBits(8);
          },
        },
        {
          key: "skipScalingList",
          value: function (e) {
            for (var n = 8, r = 8, i = 0; i < e; i++)
              r !== 0 && (r = (n + this.readEG() + 256) % 256),
                (n = r === 0 ? n : r);
          },
        },
        {
          key: "readSliceType",
          value: function () {
            return this.readUByte(), this.readUEG(), this.readUEG();
          },
        },
        {
          key: "firstMbInSlice",
          value: function () {
            return this.readUByte(), this.readUEG();
          },
        },
      ]),
      t
    );
  })();
function D3t(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (
    ((t[e] << 24) >>> 0) + (t[e + 1] << 16) + (t[e + 2] << 8) + (t[e + 3] || 0)
  );
}
function P3t(t) {
  var e = new nB(t).readSliceType();
  return e === 2 || e === 4 || e === 7 || e === 9
    ? "I"
    : e === 0 || e === 3 || e === 5 || e === 8
    ? "P"
    : e === 1 || e === 6
    ? "B"
    : void 0;
}
var Su = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "parseAnnexB",
          value: function (e) {
            for (var n = e.length, r = 2, i = 0; e[r] !== null && e[r] !== 1; )
              r++;
            if ((i = ++r + 2) >= n) return [];
            for (var o = []; i < n; )
              switch (e[i]) {
                case 0:
                  if (e[i - 1] !== 0) {
                    i += 2;
                    break;
                  }
                  if (e[i - 2] !== 0) {
                    i++;
                    break;
                  }
                  r !== i - 2 && o.push(e.subarray(r, i - 2));
                  do i++;
                  while (e[i] !== 1 && i < n);
                  i = (r = i + 1) + 2;
                  break;
                case 1:
                  if (e[i - 1] !== 0 || e[i - 2] !== 0) {
                    i += 3;
                    break;
                  }
                  r !== i - 2 && o.push(e.subarray(r, i - 2)),
                    (i = (r = i + 1) + 2);
                  break;
                default:
                  i += 3;
              }
            return r < n && o.push(e.subarray(r)), o;
          },
        },
        {
          key: "parseNalu",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 4;
            if (!(e.length < 4)) {
              for (var r, i = e.length, o = [], l = 0; l + n < i; )
                if (((r = D3t(e, l)), n === 3 && (r >>>= 8), (l += n), r)) {
                  if (l + r > i) break;
                  o.push(e.subarray(l, l + r)), (l += r);
                }
              return o;
            }
          },
        },
        {
          key: "parseNaluType",
          value: function (e, n) {
            return e == null
              ? void 0
              : On(e).call(e, function (r) {
                  var i = n ? (r[0] >>> 1) & 63 : 31 & r[0],
                    o = n && (i === 39 || i === 40),
                    l = { type: i, unit: r, isSei: (o = o || (!n && i === 6)) };
                  switch (i) {
                    case 5:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                      if ((!n && i !== 5) || (n && i === 5)) break;
                      l.frameType = "I";
                  }
                  return (
                    n || i !== 1 || (l.frameType = P3t(r)),
                    !n || (i !== 0 && i !== 1) || (l.frameType = "P"),
                    !n &&
                      i <= 5 &&
                      (l.firstMbInSlice = new nB(r).firstMbInSlice()),
                    n && i <= 21 && (l.firstMbInSlice = (128 & r[2]) == 128),
                    l
                  );
                });
          },
        },
        {
          key: "parseSEI",
          value: function (e) {
            for (var n = e.length, r = 1, i = 0, o = 0, l = ""; e[r] === 255; )
              (i += 255), r++;
            for (i += e[r++]; e[r] === 255; ) (o += 255), r++;
            if (((o += e[r++]), i === 5 && n > r + 16))
              for (var u = 0; u < 16; u++) (l += e[r].toString(16)), r++;
            return { payload: e.subarray(r), type: i, size: o, uuid: l };
          },
        },
        {
          key: "removeEPB",
          value: function (e) {
            for (var n = e.byteLength, r = [], i = 1; i < n - 2; )
              e[i] === 0 && e[i + 1] === 0 && e[i + 2] === 3
                ? (r.push(i + 2), (i += 2))
                : i++;
            if (!r.length) return e;
            var o = n - r.length,
              l = new Uint8Array(o),
              u = 0;
            for (i = 0; i < o; u++, i++)
              u === r[0] && (u++, r.shift()), (l[i] = e[u]);
            return l;
          },
        },
      ]),
      t
    );
  })(),
  fU = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "parseAVCDecoderConfigurationRecord",
          value: function (e) {
            if (!(e.length < 7)) {
              for (
                var n,
                  r,
                  i = 1 + (3 & e[4]),
                  o = [],
                  l = [],
                  u = 6,
                  c = 31 & e[5],
                  d = 0;
                d < c;
                d++
              )
                if (((r = (e[u] << 8) | e[u + 1]), (u += 2), r)) {
                  var h = e.subarray(u, u + r);
                  (u += r), o.push(h), n || (n = t.parseSPS(Su.removeEPB(h)));
                }
              var f,
                p = e[u];
              u++;
              for (var g = 0; g < p; g++)
                (f = (e[u] << 8) | e[u + 1]),
                  (u += 2),
                  f && (l.push(e.subarray(u, u + f)), (u += f));
              return { sps: n, spsArr: o, ppsArr: l, nalUnitSize: i };
            }
          },
        },
        {
          key: "parseSPS",
          value: function (e) {
            var n = new nB(e);
            n.readUByte();
            var r = n.readUByte(),
              i = n.readUByte(),
              o = n.readUByte();
            n.skipUEG();
            var l = 420;
            if (
              r === 100 ||
              r === 110 ||
              r === 122 ||
              r === 244 ||
              r === 44 ||
              r === 83 ||
              r === 86 ||
              r === 118 ||
              r === 128 ||
              r === 138 ||
              r === 144
            ) {
              var u = n.readUEG();
              if (
                (u <= 3 && (l = [0, 420, 422, 444][u]),
                u === 3 && n.skipBits(1),
                n.skipUEG(),
                n.skipUEG(),
                n.skipBits(1),
                n.readBool())
              )
                for (var c = u !== 3 ? 8 : 12, d = 0; d < c; d++)
                  n.readBool() &&
                    (d < 6 ? n.skipScalingList(16) : n.skipScalingList(64));
            }
            n.skipUEG();
            var h = n.readUEG();
            if (h === 0) n.readUEG();
            else if (h === 1) {
              n.skipBits(1), n.skipUEG(), n.skipUEG();
              for (var f = n.readUEG(), p = 0; p < f; p++) n.skipUEG();
            }
            n.skipUEG(), n.skipBits(1);
            var g = n.readUEG(),
              y = n.readUEG(),
              v = n.readBits(1);
            v === 0 && n.skipBits(1), n.skipBits(1);
            var b,
              w,
              k,
              D,
              $,
              N = 0,
              P = 0,
              I = 0,
              O = 0;
            if (
              (n.readBool() &&
                ((N = n.readUEG()),
                (P = n.readUEG()),
                (I = n.readUEG()),
                (O = n.readUEG())),
              n.readBool())
            ) {
              if (n.readBool())
                switch (n.readUByte()) {
                  case 1:
                    b = [1, 1];
                    break;
                  case 2:
                    b = [12, 11];
                    break;
                  case 3:
                    b = [10, 11];
                    break;
                  case 4:
                    b = [16, 11];
                    break;
                  case 5:
                    b = [40, 33];
                    break;
                  case 6:
                    b = [24, 11];
                    break;
                  case 7:
                    b = [20, 11];
                    break;
                  case 8:
                    b = [32, 11];
                    break;
                  case 9:
                    b = [80, 33];
                    break;
                  case 10:
                    b = [18, 11];
                    break;
                  case 11:
                    b = [15, 11];
                    break;
                  case 12:
                    b = [64, 33];
                    break;
                  case 13:
                    b = [160, 99];
                    break;
                  case 14:
                    b = [4, 3];
                    break;
                  case 15:
                    b = [3, 2];
                    break;
                  case 16:
                    b = [2, 1];
                    break;
                  case 255:
                    b = [
                      (n.readUByte() << 8) | n.readUByte(),
                      (n.readUByte() << 8) | n.readUByte(),
                    ];
                }
              if (
                (n.readBool() && n.readBool(),
                n.readBool() && (n.readBits(4), n.readBool() && n.readBits(24)),
                n.readBool() && (n.readUEG(), n.readUEG()),
                n.readBool())
              ) {
                var X = n.readBits(32),
                  G = n.readBits(32);
                (w = n.readBool()), ($ = (k = G) / (D = 2 * X));
              }
            }
            for (var H = e.subarray(1, 4), E = "avc1.", S = 0; S < 3; S++) {
              var L = H[S].toString(16);
              L.length < 2 && (L = "0".concat(L)), (E += L);
            }
            return {
              codec: E,
              profileIdc: r,
              profileCompatibility: i,
              levelIdc: o,
              chromaFormat: l,
              width: Math.ceil(16 * (g + 1) - 2 * (N + P)),
              height: (2 - v) * (y + 1) * 16 - (v ? 2 : 4) * (I + O),
              sarRatio: b,
              fpsNum: k,
              fpsDen: D,
              fps: $,
              fixedFrame: w,
            };
          },
        },
      ]),
      t
    );
  })(),
  pU = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "parseHEVCDecoderConfigurationRecord",
          value: function (e) {
            if (!(e.length < 23)) {
              for (
                var n,
                  r,
                  i,
                  o,
                  l = 1 + (3 & e[21]),
                  u = [],
                  c = [],
                  d = [],
                  h = 23,
                  f = e[22],
                  p = 0;
                p < f;
                p++
              ) {
                (r = 63 & e[h]), (i = (e[h + 1] << 8) | e[h + 2]), (h += 3);
                for (var g = 0; g < i; g++)
                  if (((o = (e[h] << 8) | e[h + 1]), (h += 2), o)) {
                    switch (r) {
                      case 32:
                        d.push(e.subarray(h, h + o));
                        break;
                      case 33:
                        var y = e.subarray(h, h + o);
                        n || (n = t.parseSPS(Su.removeEPB(y))), u.push(y);
                        break;
                      case 34:
                        c.push(e.subarray(h, h + o));
                    }
                    h += o;
                  }
              }
              return {
                sps: n,
                spsArr: u,
                ppsArr: c,
                vpsArr: d,
                nalUnitSize: l,
              };
            }
          },
        },
        {
          key: "parseSPS",
          value: function (e) {
            var n = new nB(e);
            n.readUByte(), n.readUByte(), n.readBits(4);
            var r = n.readBits(3);
            n.readBits(1);
            var i = this._parseProfileTierLevel(n, r);
            n.readUEG();
            var o = n.readUEG(),
              l = 420;
            o <= 3 && (l = [0, 420, 422, 444][o]);
            var u = 0;
            o === 3 && (u = n.readBits(1));
            var c,
              d,
              h,
              f,
              p = n.readUEG(),
              g = n.readUEG(),
              y = n.readBits(1);
            return (
              y === 1 &&
                ((c = n.readUEG()),
                (d = n.readUEG()),
                (h = n.readUEG()),
                (f = n.readUEG())),
              y === 1 &&
                ((p -= ((o !== 1 && o !== 2) || u !== 0 ? 1 : 2) * (d + c)),
                (g -= (o === 1 && u === 0 ? 2 : 1) * (f + h))),
              {
                codec: "hev1.1.6.L93.B0",
                width: p,
                height: g,
                chromaFormat: l,
                bitDepthLumaMinus8: n.readUEG(),
                bitDepthChromaMinus8: n.readUEG(),
                generalProfileSpace: i.generalProfileSpace,
                generalTierFlag: i.generalTierFlag,
                generalProfileIdc: i.generalProfileIdc,
                generalLevelIdc: i.generalLevelIdc,
              }
            );
          },
        },
        {
          key: "_parseProfileTierLevel",
          value: function (e, n) {
            var r, i, o;
            (!(arguments.length > 2 && arguments[2] !== void 0) ||
              arguments[2]) &&
              ((r = e.readBits(2)), (i = e.readBits(1)), (o = e.readBits(5))),
              e.readBits(32),
              e.readBits(1),
              e.readBits(1),
              e.readBits(1),
              e.readBits(1),
              e.readBits(16),
              e.readBits(16),
              e.readBits(12);
            for (var l = e.readUByte(), u = [], c = [], d = 0; d < n; d++)
              (u[d] = e.readBits(1)), (c[d] = e.readBits(1));
            n > 0 && e.readBits(2 * (8 - n));
            for (var h = 0; h < n; h++)
              u[h] !== 0 &&
                (e.readBits(2),
                e.readBits(1),
                e.readBits(5),
                e.readBits(16),
                e.readBits(16),
                e.readBits(4),
                e.readBits(16),
                e.readBits(16),
                e.readBits(12)),
                c[h] !== 0 && e.readBits(8);
            return {
              generalProfileSpace: r,
              generalTierFlag: i,
              generalProfileIdc: o,
              generalLevelIdc: l,
            };
          },
        },
      ]),
      t
    );
  })();
function E8e(t) {
  var e,
    n,
    r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
    i = _r((e = t.items)).call(e, function (u) {
      return u.isSample && u.isVideo;
    })[0],
    o = _r((n = t.items)).call(n, function (u) {
      return u.isSample && u.isAudio;
    })[0],
    l = Math.min(
      (o == null ? void 0 : o.dtsTime) || 0,
      (i == null ? void 0 : i.dtsTime) || 0
    );
  return (
    (l -= r),
    t.items.forEach(function (u) {
      u.time = uu(u.dtsTime - l);
    }),
    t
  );
}
function gU(t) {
  var e,
    n = _r((e = t.items)).call(e, function (u) {
      return u.isVideo;
    }),
    r = [],
    i = -1,
    o = {},
    l = {};
  return (
    n.forEach(function (u, c) {
      (u.keyframe || c === n.length - 1) &&
        ((i = i === -1 ? u.time : i),
        r.push({ time: u.time, value: uu(u.time - i) }),
        (i = u.time));
      var d = Math.ceil(u.time + 1e-5);
      o[d] ? o[d]++ : (o[d] = 1),
        l[d] ? (l[d] += 8 * u.size) : (l[d] = 8 * u.size);
    }),
    {
      bitRates: gve(l),
      gops: _r(r).call(r, function (u) {
        return u.value;
      }),
      frameRates: gve(o),
    }
  );
}
function gve(t) {
  var e = Dn(t);
  return On(e).call(e, function (n) {
    return { time: Number(n), value: t[n] };
  });
}
function S8e(t) {
  var e,
    n,
    r,
    i,
    o = ga(
      (e = jn(
        (n = mm(
          (r = _r((i = jn(t).call(t))).call(i, function (l) {
            return l.isSample;
          }))
        ).call(r, function (l, u) {
          return l.time > u.time ? 1 : -1;
        }))
      ).call(n, 0, 3))
    ).call(
      e,
      function (l, u) {
        return l + u.size;
      },
      0
    );
  return o > 1e3 ? uu(o / 1e3) + "KB" : o + "B";
}
function Lee(t) {
  return (
    (ga(t).call(
      t,
      function (e, n) {
        return e + n.size;
      },
      0
    ) /
      ga(t).call(
        t,
        function (e, n) {
          return e + n.duration;
        },
        0
      )) *
    8e3
  );
}
function R8e(t) {
  if (t != null && t.profileIdc)
    switch (t.profileIdc) {
      case 66:
        return "66(Baseline)";
      case 77:
        return "77(Main)";
      case 100:
        return "100(High)";
    }
}
var M3t = ea,
  C3t = function (t, e, n) {
    return e in t
      ? M3t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  JP = function (t, e, n) {
    return C3t(t, ti(e) !== "symbol" ? e + "" : e, n), n;
  },
  $3t = (function () {
    function t() {
      Wn(this, t),
        JP(this, "_nalUnitSize", 0),
        JP(this, "_lastAudio", null),
        JP(this, "_lastVideo", null),
        JP(this, "_videoStartDts", -1),
        JP(this, "_audioStartDts", -1);
    }
    return (
      Kn(t, [
        {
          key: "parse",
          value: function (e) {
            for (
              var n = e.byteLength,
                r = e.subarray(0, 13),
                i = 13,
                o = $n(
                  $n({ header: r }, this._parseHeader(r)),
                  {},
                  { items: [] }
                );
              i + 11 < n;

            ) {
              var l = e.subarray(i, i + 11),
                u = (l[1] << 16) | (l[2] << 8) | l[3],
                c = i + 11 + u;
              if (c > n) break;
              var d = e.subarray(i + 11, c),
                h = new T8e(
                  $n(
                    {
                      tagSize: 11 + u + 4,
                      header: l,
                      body: d,
                      tailsize: e.subarray(c, c + 4),
                    },
                    this._parseTag(l, d)
                  )
                );
              h.isAudio &&
                (this._lastAudio &&
                  (this._lastAudio.duration = h.dts - this._lastAudio.dts),
                (this._lastAudio = h)),
                h.isVideo &&
                  (this._lastVideo &&
                    (this._lastVideo.duration = h.dts - this._lastVideo.dts),
                  (this._lastVideo = h)),
                o.items.push(h),
                (i = c + 4);
            }
            var f = E8e(o);
            return (f.rates = gU(f)), this._addMetadataToFirstKeyFrame(f), f;
          },
        },
        {
          key: "getSnapshoot",
          value: function (e, n) {
            var r,
              i,
              o,
              l,
              u = _r((r = e.items)).call(r, function ($) {
                return $.type === 8;
              })[0],
              c = _r((i = e.items)).call(i, function ($) {
                return $.type === 9;
              })[0],
              d = (u && u.bodyView) || u,
              h = (c && c.bodyView) || c,
              f = _r((o = e.items)).call(o, function ($) {
                return $.isVideo;
              }).length,
              p = this._getNbFrame(e, "I"),
              g = this._getNbFrame(e, "P"),
              y = this._getNbFrame(e, "B"),
              v = 0;
            if (n != null && n.gopCacheBuffer) {
              var b,
                w = new t().parse(n.gopCacheBuffer),
                k = _r((b = w.items)).call(b, function ($) {
                  return $.isVideo;
                }),
                D = (l = k[k.length - 1]) == null ? void 0 : l.time;
              D && (v = D - n.take / 1e3);
            }
            return {
              rates: e.rates,
              audio: d ? Ci({}, d, this._getExt(e, "audio")) : null,
              video: h
                ? Ci({}, h, this._getExt(e, "video"), {
                    topThreeFrameSize: S8e(e.items),
                    gopCache: uu(v),
                    profile: R8e(h.sps),
                    iFrames: p,
                    pFrames: g,
                    bFrames: y,
                    iPercent: uu((p / f) * 100),
                    pPercent: uu((g / f) * 100),
                    bPercent: uu((y / f) * 100),
                  })
                : null,
            };
          },
        },
        {
          key: "_addMetadataToFirstKeyFrame",
          value: function (e) {
            var n,
              r,
              i,
              o = _r((n = e.items)).call(n, function (u) {
                return u.type === 9;
              })[0];
            if (o && (i = o.bodyView) != null && i.sps) {
              var l = _r((r = e.items)).call(r, function (u) {
                return u.isVideo && u.keyframe;
              })[0];
              l &&
                ((l.bodyView.sps = o.bodyView.sps),
                (l.bodyView.vpsArr = o.bodyView.vpsArr),
                (l.bodyView.spsArr = o.bodyView.spsArr),
                (l.bodyView.ppsArr = o.bodyView.ppsArr));
            }
          },
        },
        {
          key: "_getExt",
          value: function (e, n) {
            var r,
              i,
              o,
              l = _r((r = e.items)).call(r, function (f) {
                return f.streamType === n && f.isSample;
              }),
              u = _r((i = e.items)).call(i, function (f) {
                var p;
                return (
                  f.streamType === n &&
                  ((p = f.bodyView) == null ? void 0 : p.packetType) ===
                    A2.SEQUENCE
                );
              })[0];
            if (!l.length) return 0;
            var c = l[0],
              d = l[l.length - 1],
              h = 0;
            return (
              n === "audio" &&
                (h =
                  u &&
                  (1024 / ((o = u.bodyView) == null ? void 0 : o.sampleRate)) *
                    1e3),
              n === "video" && (h = c.duration),
              {
                avgBits: Lee(l),
                startDts: l[0].dts,
                duration: (d.timestamp - c.timestamp) / 1e3,
                refDuration: h,
                frameLength: l.length,
              }
            );
          },
        },
        {
          key: "_getNbFrame",
          value: function (e, n) {
            var r;
            return _r((r = e.items)).call(r, function (i) {
              return i.isVideo && i.frameType === n;
            }).length;
          },
        },
        {
          key: "_parseHeader",
          value: function (e) {
            return { hasAudio: !!((e[4] >> 2) & 1), hasVideo: !!(1 & e[4]) };
          },
        },
        {
          key: "_parseTag",
          value: function (e, n) {
            var r,
              i = 31 & e[0],
              o = ((e[7] << 24) >>> 0) + (e[4] << 16) + (e[5] << 8) + e[6];
            switch (i) {
              case 18:
                r = Ci({ packetType: A2.SCRIPT }, _3t.parse(n));
                break;
              case 9:
                r = this._parseVideo(n, o);
                break;
              case 8:
                r = this._parseAudio(n, o);
            }
            return { type: i, timestamp: o, bodyView: r };
          },
        },
        {
          key: "_parseAudio",
          value: function (e) {
            if (e.length) {
              var n = (240 & e[0]) >>> 4;
              if (n === 10 || n === 7 || n === 8) {
                if (n !== 10) {
                  var r = (12 & e[0]) >> 2,
                    i = (2 & e[0]) >> 1,
                    o = 1 & e[0];
                  return $n(
                    {
                      format: n,
                      sampleRate: b3t[r],
                      sampleSize: i ? 2 : 1,
                      channelCount: o + 1,
                    },
                    this._parseG711(e)
                  );
                }
                return this._parseAac(e, n);
              }
              console.warn("Unsupported sound format: ".concat(n));
            }
          },
        },
        {
          key: "_parseG711",
          value: function (e, n) {
            return {
              codecType: n === 7 ? t3.PCMA : t3.PCMU,
              sampleRate: 8e3,
              sample: e.subarray(1),
              packetType: A2.RAW,
            };
          },
        },
        {
          key: "_parseAac",
          value: function (e, n) {
            if (e[1] === 0) {
              var r = e.subarray(2);
              return $n(
                $n({}, jse.parseAudioSpecificConfig(r)),
                {},
                {
                  format: n,
                  timescale: 1e3,
                  codecType: t3.AAC,
                  packetType: A2.SEQUENCE,
                  sequenceData: [r],
                  frameType: "A",
                }
              );
            }
            if (e[1] === 1)
              return {
                sample: e.subarray(2),
                format: n,
                codecType: t3.AAC,
                packetType: A2.RAW,
                frameType: "A",
              };
          },
        },
        {
          key: "_parseVideo",
          value: function (e, n) {
            if (!(e.length < 6)) {
              var r = (240 & e[0]) >>> 4,
                i = 15 & e[0];
              if (i === 7 || i === 12) {
                var o = i === 12,
                  l = e[1],
                  u = (((e[2] << 16) | (e[3] << 8) | e[4]) << 8) >> 8;
                if (l === 0) {
                  var c = e.subarray(5),
                    d = o
                      ? pU.parseHEVCDecoderConfigurationRecord(c)
                      : fU.parseAVCDecoderConfigurationRecord(c);
                  return (
                    (this._nalUnitSize = d.nalUnitSize),
                    $n(
                      {
                        codecId: i,
                        codecType: o ? n3.HEVC : n3.AVC,
                        packetType: A2.SEQUENCE,
                        timescale: 1e3,
                        sequenceData: [c],
                      },
                      d
                    )
                  );
                }
                if (l === 1) {
                  var h = Su.parseNalu(e.subarray(5), this._nalUnitSize);
                  if (!h || !h.length) return;
                  var f = {
                    dts: n,
                    cts: u,
                    units: (h = Su.parseNaluType(h, o)),
                  };
                  return (
                    r === 1 && (f.keyframe = !0),
                    h.forEach(function (p) {
                      var g = p.type,
                        y = p.unit,
                        v = p.frameType;
                      switch (g) {
                        case 5:
                        case 16:
                        case 17:
                        case 18:
                        case 19:
                        case 20:
                        case 21:
                        case 22:
                        case 23:
                          if ((!o && g !== 5) || (o && g === 5)) break;
                          (f.keyframe = !0), (f.frameType = "I");
                          break;
                        case 6:
                        case 39:
                        case 40:
                          if ((!o && g !== 6) || (o && g === 6)) break;
                          f.seis
                            ? f.seis.push(Su.parseSEI(Su.removeEPB(y)))
                            : (f.seis = [Su.parseSEI(Su.removeEPB(y))]);
                          break;
                        case 32:
                          if (!o) break;
                          f.vpsArr ? f.vpsArr.push(y) : (f.vpsArr = [y]);
                          break;
                        case 7:
                        case 33:
                          if ((!o && g !== 7) || (o && g === 7)) break;
                          f.spsArr ? f.spsArr.push(y) : (f.spsArr = [y]);
                          var b = Su.removeEPB(y);
                          f.sps = o ? pU.parseSPS(b) : fU.parseSPS(b);
                          break;
                        case 8:
                        case 34:
                          if ((!o && g !== 8) || (o && g === 8)) break;
                          f.ppsArr ? f.ppsArr.push(y) : (f.ppsArr = [y]);
                          break;
                        case 1:
                        case 0:
                          f.frameType = v;
                      }
                    }),
                    $n(
                      {
                        codecId: i,
                        codecType: o ? n3.HEVC : n3.AVC,
                        packetType: A2.RAW,
                      },
                      f
                    )
                  );
                }
              } else console.warn("Unsupported codecId: ".concat(i));
            }
          },
        },
      ]),
      t
    );
  })(),
  PV = {
    FLV: "FLV",
    TS: "MPEG-TS",
    MP4: "MP4",
    RAW264: "RAW264",
    NOSUPPORT: "NOSUPPORT",
  };
function x3t(t) {
  for (var e = Math.min(1e3, t.byteLength - 564), n = 0; n < e; n++)
    if (t[n] === 71 && t[n + 188] === 71 && t[n + 376] === 71) return n;
  return -1;
}
function Oee(t, e) {
  var n;
  return On((n = [t[e], t[e + 1], t[e + 2], t[e + 3]]))
    .call(n, function (r) {
      return String.fromCharCode(r);
    })
    .join("");
}
var L3t = ea,
  O3t = function (t, e, n) {
    return e in t
      ? L3t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  y0 = function (t, e, n) {
    return O3t(t, ti(e) !== "symbol" ? e + "" : e, n), n;
  },
  G3t = Kn(function t(e) {
    var n = e.startIndictor,
      r = e.packetType,
      i = e.pid,
      o = e.afc;
    Wn(this, t),
      y0(this, "startIndictor", 0),
      y0(this, "pid", 0),
      y0(this, "afc", 0),
      y0(this, "eleInfo", null),
      y0(this, "packetType", ""),
      (this.startIndictor = n),
      (this.packetType = r),
      (this.pid = i),
      (this.afc = o);
  }),
  qP = (function () {
    function t(e) {
      var n = e.header,
        r = e.headerObject,
        i = e.body,
        o = e.eleInfo,
        l = e.bodyView,
        u = e.headerView;
      Wn(this, t),
        y0(this, "header", null),
        y0(this, "headerView", null),
        y0(this, "body", null),
        y0(this, "bodyView", null),
        y0(this, "eleInfo", null),
        y0(this, "duration", 0),
        (this.header = n),
        (this.headerView = u || new G3t(r)),
        (this.eleInfo = o),
        (this.body = i),
        (this.bodyView = l);
    }
    return (
      Kn(t, [
        {
          key: "type",
          get: function () {
            var e;
            return (e = this.headerView) == null ? void 0 : e.packetType;
          },
        },
        {
          key: "streamType",
          get: function () {
            return this.eleInfo ? this.eleInfo[this.headerView.pid] : "";
          },
        },
        {
          key: "packetType",
          get: function () {
            var e;
            return (e = this.headerView) == null ? void 0 : e.packetType;
          },
        },
        {
          key: "frameType",
          get: function () {
            var e;
            return (e = this.bodyView) == null ? void 0 : e.frameType;
          },
        },
        {
          key: "pts",
          get: function () {
            var e;
            return (e = this.bodyView) == null ? void 0 : e.pts;
          },
        },
        {
          key: "ptsTime",
          get: function () {
            return this.pts ? uu(this.pts / 9e4) : 0;
          },
        },
        {
          key: "dtsTime",
          get: function () {
            return this.dts ? uu(this.dts / 9e4) : 0;
          },
        },
        {
          key: "dts",
          get: function () {
            var e;
            return (e = this.bodyView) == null ? void 0 : e.dts;
          },
        },
        {
          key: "keyframe",
          get: function () {
            return this.frameType === "I";
          },
        },
        {
          key: "nalTypes",
          get: function () {
            var e, n;
            return (n = (e = this.bodyView) == null ? void 0 : e.units) == null
              ? void 0
              : On(n).call(n, function (r) {
                  return r.type;
                });
          },
        },
        {
          key: "nalSizes",
          get: function () {
            var e, n;
            return (n = (e = this.bodyView) == null ? void 0 : e.units) == null
              ? void 0
              : On(n).call(n, function (r) {
                  return r.unit.length;
                });
          },
        },
        {
          key: "isSample",
          get: function () {
            return this.packetType === "PES";
          },
        },
        {
          key: "timescale",
          get: function () {
            return 9e4;
          },
        },
        {
          key: "isHevc",
          get: function () {
            var e, n;
            return (
              ((n = (e = this.eleInfo) == null ? void 0 : e.video) == null
                ? void 0
                : n.codecType) === "bytevc1"
            );
          },
        },
        {
          key: "sampleView",
          get: function () {
            var e;
            if (this.type === "PES")
              return {
                dts: this.dts,
                pts: this.pts,
                units: (e = this.bodyView) == null ? void 0 : e.units,
                data: this._getSampleData(),
              };
          },
        },
        {
          key: "data",
          get: function () {
            return this._getSampleData();
          },
        },
        {
          key: "size",
          get: function () {
            var e, n;
            return (n = (e = this.sampleView) == null ? void 0 : e.data) == null
              ? void 0
              : n.length;
          },
        },
        {
          key: "isVideo",
          get: function () {
            return this.isSample && this.streamType === "video";
          },
        },
        {
          key: "isAudio",
          get: function () {
            return this.isSample && this.streamType === "audio";
          },
        },
        {
          key: "_getSampleData",
          value: function () {
            var e, n;
            if (this.streamType === "audio") return this.bodyView.data;
            var r =
                ((n = this.bodyView) == null
                  ? void 0
                  : _r((e = n.units)).call(e, function (u) {
                      return !u.isSei && !u.isDivision;
                    })) || [],
              i = ga(r).call(
                r,
                function (u, c) {
                  return u + (c.unit.byteLength + 4);
                },
                0
              ),
              o = new Uint8Array(i),
              l = 0;
            return (
              r.forEach(function (u) {
                o.set([0, 0, 0, 1], l),
                  (l += 4),
                  o.set(u.unit, l),
                  (l += u.unit.byteLength);
              }),
              o
            );
          },
        },
      ]),
      t
    );
  })(),
  N3t = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "parse",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 0,
              r = x3t(e);
            if (r === -1) throw new Error("invalid ts file");
            var i = e.byteLength;
            i -= (i - r) % 188;
            for (var o, l = [], u = [], c = [], d = 0, h = r; h < i; ) {
              var f = e.subarray(h, h + 188),
                p = f.subarray(0, 4),
                g = this._parseTsHeader(f.subarray(0, 4));
              h += 188;
              var y = void 0,
                v = void 0,
                b = 4,
                w = "";
              switch (
                ((g == null ? void 0 : g.afc) > 1 &&
                  (b += 1 + Math.min(f[b], 183)),
                g.pid)
              ) {
                case 0:
                  (b += 1 + f[b]),
                    (y = f.subarray(b)),
                    (w = "PAT"),
                    (v = { pmtId: (d = this._parsePAT(y)) });
                  break;
                default:
                  if (g.pid === d) {
                    (b += 1 + f[b]),
                      (y = f.subarray(b)),
                      (v = o = this._parsePMT(y)),
                      (w = "PMT");
                    break;
                  }
                  if (!o || !o[g.pid]) continue;
                  (y = f.subarray(b)), (w = "PES");
              }
              if (((g.packetType = w), w === "PES")) {
                var k = o[g.pid] === "video" ? u : c;
                g.startIndictor &&
                  k.length &&
                  (l.push(
                    new qP(
                      $n($n({}, this._concatPesChunk(k)), {}, { eleInfo: o })
                    )
                  ),
                  (k = o[g.pid] === "video" ? (u = []) : (c = []))),
                  k.push({ header: p, headerObject: g, body: y });
              } else
                l.push(
                  new qP({
                    header: p,
                    headerObject: g,
                    body: y,
                    eleInfo: o,
                    bodyView: v,
                  })
                );
            }
            u.length &&
              (l.push(
                new qP($n($n({}, this._concatPesChunk(u)), {}, { eleInfo: o }))
              ),
              (u = [])),
              c.length &&
                (l.push(
                  new qP(
                    $n($n({}, this._concatPesChunk(c)), {}, { eleInfo: o })
                  )
                ),
                (c = []));
            var D = E8e({ items: this._parsePES(l) }, n);
            return (D.rates = gU(D)), D;
          },
        },
        {
          key: "getSnapshoot",
          value: function (e) {
            var n,
              r,
              i,
              o = e.items,
              l = e.rates,
              u = _r(o).call(o, function (w) {
                return w.streamType === "video";
              }),
              c = _r(o).call(o, function (w) {
                return w.streamType === "audio";
              }),
              d = ji(o).call(o, function (w) {
                return w.type === "PMT";
              }),
              h = u[0],
              f = c[0],
              p = u.length,
              g = this._getNbFrame(u, "I"),
              y = this._getNbFrame(u, "P"),
              v = this._getNbFrame(u, "B"),
              b = {
                rates: l,
                video: h
                  ? Ci(
                      {},
                      h == null ? void 0 : h.bodyView,
                      {
                        codecType: h.eleInfo.video.codecType,
                        frameLength: p,
                        topThreeFrameSize: S8e(o),
                        avgBits: Lee(u),
                        profile: R8e(
                          (n = h == null ? void 0 : h.bodyView) == null
                            ? void 0
                            : n.sps
                        ),
                        iFrames: g,
                        pFrames: y,
                        bFrames: v,
                        iPercent: uu((g / p) * 100),
                        pPercent: uu((y / p) * 100),
                        bPercent: uu((v / p) * 100),
                        timescale: 9e4,
                      },
                      this._getDuration(u, "video")
                    )
                  : null,
                audio: f
                  ? Ci(
                      {},
                      f == null ? void 0 : f.bodyView,
                      {
                        codecType: f.eleInfo.audio.codecType,
                        frameLength: c.length,
                        timescale: 9e4,
                        avgBits: Lee(c),
                      },
                      this._getDuration(c, "audio")
                    )
                  : null,
              };
            return (
              d &&
                (r = d.bodyView) != null &&
                r.noSupported &&
                (b.noSupported =
                  (i = d.bodyView) == null ? void 0 : i.noSupported),
              b
            );
          },
        },
        {
          key: "getRates",
          value: function (e) {
            return gU(e);
          },
        },
        {
          key: "_getDuration",
          value: function (e, n) {
            var r,
              i = e[0],
              o = e[e.length - 1],
              l = 0;
            return (
              n === "audio" &&
                (l =
                  (1024 / ((r = i.bodyView) == null ? void 0 : r.sampleRate)) *
                  1e3),
              n === "video" && (l = i.duration),
              { duration: (o.pts - i.pts) / 9e4, refDuration: l }
            );
          },
        },
        {
          key: "_getNbKeyFrame",
          value: function (e) {
            return _r(e).call(e, function (n) {
              var r;
              return (r = n.bodyView) == null ? void 0 : r.keyframe;
            }).length;
          },
        },
        {
          key: "_getNbFrame",
          value: function (e, n) {
            return _r(e).call(e, function (r) {
              return r.frameType === n;
            }).length;
          },
        },
        {
          key: "_parseTsHeader",
          value: function (e) {
            if (e[0] === 71) {
              var n = {};
              return (
                (n.startIndictor = (64 & e[1]) >> 6),
                (n.pid = ((31 & e[1]) << 8) + e[2]),
                (n.afc = (48 & e[3]) >> 4),
                n
              );
            }
            return null;
          },
        },
        {
          key: "_parsePAT",
          value: function (e) {
            return ((31 & e[10]) << 8) | e[11];
          },
        },
        {
          key: "_parsePMT",
          value: function (e) {
            var n = 0,
              r = 3 + (((15 & e[1]) << 8) | e[2]) - 4;
            e[3], e[4], (n = n + 11 + (((15 & e[10]) << 8) | e[11]) + 1);
            for (
              var i, o = { video: null, audio: null, noSupported: 0 };
              n < r;

            ) {
              i = e[n];
              var l = ((31 & e[n + 1]) << 8) | e[n + 2];
              switch (i) {
                case 27:
                case 36:
                  (o.video = {
                    elePid: l,
                    streamType: i,
                    codecType: i === 27 ? "avc" : "bytevc1",
                  }),
                    (o[l] = "video");
                  break;
                case 15:
                  (o.audio = { elePid: l, streamType: i, codecType: "aac" }),
                    (o[l] = "audio");
                  break;
                default:
                  (o.noSupported = i),
                    console.warn("unsupported streamType,", i);
              }
              n += 5 + (((15 & e[n + 3]) << 8) | e[n + 4]);
            }
            return o;
          },
        },
        {
          key: "_concatPesChunk",
          value: function (e) {
            var n = ga(e).call(
                e,
                function (o, l) {
                  return o + l.body.byteLength;
                },
                0
              ),
              r = new Uint8Array(n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.body;
                r.set(l, i), (i += l.byteLength);
              }),
              $n($n({}, e[0]), {}, { body: r, packetType: "PES" })
            );
          },
        },
        {
          key: "_parsePES",
          value: function (e) {
            var n = this,
              r = [];
            return (
              e.forEach(function (i, o) {
                if (i.isSample) {
                  var l = i,
                    u = n._parsePESInternal(l.body) || {},
                    c = u.data,
                    d = u.pts,
                    h = u.dts;
                  if (c) {
                    if (
                      (i.isVideo &&
                        ((l.bodyView = n._parseVideoFrame(
                          c,
                          d,
                          h,
                          l.eleInfo.video.codecType === "bytevc1"
                        )),
                        n._lastVideo &&
                          (n._lastVideo.duration =
                            1e3 * (i.dtsTime - n._lastVideo.dtsTime)),
                        (n._lastVideo = l)),
                      i.isAudio)
                    ) {
                      var f = jse.parseADTS(c, d),
                        p = f.frames;
                      return (
                        delete f.frames,
                        void (
                          p == null ||
                          p.forEach(function (g) {
                            var y = new qP(
                              Ci({}, l, {
                                bodyView: $n(
                                  $n($n({}, f), g),
                                  {},
                                  { frameType: "A" }
                                ),
                              })
                            );
                            r.push(y),
                              n._lastAudio &&
                                (n._lastAudio.duration =
                                  1e3 * (y.dtsTime - n._lastAudio.dtsTime)),
                              (n._lastAudio = y);
                          })
                        )
                      );
                    }
                    r.push(i);
                  }
                } else r.push(i);
              }),
              r
            );
          },
        },
        {
          key: "_parsePESInternal",
          value: function (e) {
            var n = e[8];
            if (
              !(n === 0 || e.length < n + 9) &&
              ((e[0] << 16) | (e[1] << 8) | e[2]) === 1
            ) {
              var r = (e[4] << 8) + e[5];
              if (!(r && r > e.length - 6)) {
                var i,
                  o,
                  l = e[7];
                return (
                  192 & l &&
                    ((i =
                      536870912 * (14 & e[9]) +
                      4194304 * (255 & e[10]) +
                      16384 * (254 & e[11]) +
                      128 * (255 & e[12]) +
                      (254 & e[13]) / 2),
                    64 & l
                      ? i -
                          (o =
                            536870912 * (14 & e[14]) +
                            4194304 * (255 & e[15]) +
                            16384 * (254 & e[16]) +
                            128 * (255 & e[17]) +
                            (254 & e[18]) / 2) >
                          54e5 && (i = o)
                      : (o = i)),
                  (o = o || i),
                  { data: e.subarray(9 + n), pts: i, dts: o }
                );
              }
            }
          },
        },
        {
          key: "_parseVideoFrame",
          value: function (e, n, r, i) {
            var o = Su.parseAnnexB(e);
            if (o.length) {
              var l = { units: (o = Su.parseNaluType(o, i)), pts: n, dts: r };
              return (
                o.forEach(function (u) {
                  var c = u.unit,
                    d = u.type,
                    h = u.frameType;
                  switch (d) {
                    case 5:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                      if ((!i && d !== 5) || (i && d === 5)) break;
                      (l.keyframe = !0), (l.frameType = "I");
                      break;
                    case 6:
                    case 39:
                    case 40:
                      if ((!i && d !== 6) || (i && d === 6)) break;
                      l.seis
                        ? l.seis.push(Su.parseSEI(Su.removeEPB(c)))
                        : (l.seis = [Su.parseSEI(Su.removeEPB(c))]);
                      break;
                    case 32:
                      if (!i) break;
                      l.vpsArr ? l.vpsArr.push(c) : (l.vpsArr = [c]);
                      break;
                    case 7:
                    case 33:
                      if ((!i && d !== 7) || (i && d === 7)) break;
                      l.spsArr ? l.spsArr.push(c) : (l.spsArr = [c]);
                      var f = Su.removeEPB(c);
                      l.sps = i ? pU.parseSPS(f) : fU.parseSPS(f);
                      break;
                    case 8:
                    case 34:
                      if ((!i && d !== 8) || (i && d === 8)) break;
                      l.ppsArr ? l.ppsArr.push(c) : (l.ppsArr = [c]);
                      break;
                    case 9:
                    case 35:
                      break;
                    case 0:
                    case 1:
                      l.frameType = h;
                  }
                }),
                l
              );
            }
          },
        },
      ]),
      t
    );
  })(),
  F3t = Il,
  U3t = F3t("Array").entries,
  B3t = U3t,
  H3t = B3t,
  X3t = L0,
  V3t = kl,
  z3t = Es,
  j3t = H3t,
  MV = Array.prototype,
  W3t = { DOMTokenList: !0, NodeList: !0 },
  K3t = function (t) {
    var e = t.entries;
    return t === MV || (z3t(MV, t) && e === MV.entries) || V3t(W3t, X3t(t))
      ? j3t
      : e;
  },
  Z3t = K3t,
  Y3t = Z3t,
  Q3t = Y3t,
  J3t = Q3t,
  q3t = J3t,
  e4t = q3t,
  $s = xr(e4t),
  Hl = (function () {
    function t(e) {
      var n =
        arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
      Wn(this, t),
        (this._offset = n),
        (this._buffer = e),
        (this._length = e.byteLength);
    }
    return (
      Kn(t, [
        {
          key: "offset",
          get: function () {
            return this._offset;
          },
          set: function (e) {
            this._offset = e;
          },
        },
        {
          key: "forward",
          value: function (e) {
            this._offset += e;
          },
        },
        {
          key: "subarray",
          value: function (e) {
            return e
              ? this._buffer.subarray(this._offset, this._offset + e)
              : this._buffer.subarray(this._offset, e);
          },
        },
        {
          key: "slice",
          value: function (e) {
            for (
              var n = this._offset, r = this._buffer, i = [], o = 0;
              o < e;
              o++
            )
              i.push(r[n + o]);
            return new Uint8Array(i);
          },
        },
        {
          key: "readU8",
          value: function () {
            return this._buffer[this._offset];
          },
        },
        {
          key: "readU16",
          value: function () {
            var e = this._offset,
              n = this._buffer;
            return (n[e] << 8) | n[e + 1];
          },
        },
        {
          key: "readU24",
          value: function () {
            var e = this._offset,
              n = this._buffer;
            return (n[e] << 16) | (n[e + 1] << 8) | n[e + 12];
          },
        },
        {
          key: "readU32",
          value: function () {
            var e = this._offset,
              n = this._buffer;
            return (
              n[e] * (1 << 24) + 65536 * n[e + 1] + 256 * n[e + 2] + n[e + 3]
            );
          },
        },
        {
          key: "read32",
          value: function () {
            var e = this._offset,
              n = this._buffer;
            return (n[e] << 24) | (n[e + 1] << 16) | (n[e + 2] << 8) | n[e + 3];
          },
        },
      ]),
      t
    );
  })(),
  t4t = ea,
  n4t = function (t, e, n) {
    return e in t
      ? t4t(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  Jm = function (t, e, n) {
    return n4t(t, ti(e) !== "symbol" ? e + "" : e, n), n;
  },
  mU = (function () {
    function t(e, n, r, i, o, l, u, c, d, h) {
      Wn(this, t),
        Jm(this, "dts", 0),
        Jm(this, "pts", 0),
        Jm(this, "units", null),
        Jm(this, "timescale", 0),
        Jm(this, "offset", 0),
        Jm(this, "duration", 0),
        Jm(this, "data", null),
        Jm(this, "size", 0),
        Jm(this, "streamType", ""),
        Jm(this, "_frameType", ""),
        Jm(this, "isHevc", !1),
        (this.dts = e),
        (this.pts = n),
        (this.units = r),
        (this.timescale = i),
        (this.offset = o),
        (this.data = l),
        (this.size = u),
        (this.duration = c),
        (this.streamType = d),
        (this.isHevc = h);
    }
    return (
      Kn(t, [
        {
          key: "isSample",
          get: function () {
            return !0;
          },
        },
        {
          key: "dtsTime",
          get: function () {
            return this.dts / this.timescale;
          },
        },
        {
          key: "ptsTime",
          get: function () {
            return this.pts / this.timescale;
          },
        },
        {
          key: "frameType",
          get: function () {
            var e, n;
            return this.streamType === "audio"
              ? "A"
              : this._frameType ||
                  ((n = this.units) == null
                    ? void 0
                    : _r(
                        (e = On(n).call(n, function (r) {
                          return r.frameType;
                        }))
                      ).call(e, Boolean)[0]);
          },
          set: function (e) {
            this._frameType = e;
          },
        },
        {
          key: "nalTypes",
          get: function () {
            var e;
            return (e = this.units) == null
              ? void 0
              : On(e).call(e, function (n) {
                  return n.type;
                });
          },
        },
        {
          key: "nalSizes",
          get: function () {
            var e;
            return (e = this.units) == null
              ? void 0
              : On(e).call(e, function (n) {
                  return n.unit.length;
                });
          },
        },
        {
          key: "keyframe",
          get: function () {
            return this.frameType === "I";
          },
        },
        {
          key: "isVideo",
          get: function () {
            return this.streamType === "video";
          },
        },
        {
          key: "isAudio",
          get: function () {
            return this.streamType === "audio";
          },
        },
      ]),
      t
    );
  })(),
  r4t = {
    ftyp: "file type and compatibility",
    free: "free box",
    moov: "container for all metadata",
    mvhd: "movie header,overall declarations",
    trak: "container for an individual track or stream",
    tkhd: "track header,overall information about the track",
    tref: "track reference container",
    mdia: "container for the media information in a track",
    mdhd: "media header,oervall information about the media",
    hdlr: "declares the media type",
    minf: "media information container",
    vmhd: "video media header",
    smhd: "sound media header",
    dinf: "data information box",
    stbl: "sample table box",
    stsd: "sample descriptions(codec types, etc)",
    stts: "decoding time to sample",
    ctts: "compostion time to sample",
    cslg: "compostion to decode timeline mapping",
    stsc: "sample to chunk",
    stsz: "sample size",
    stco: "chunk offset",
    stss: "sync sample table",
    sdtp: "independent abd disposable samples",
    sbgp: "sample to group",
    mvex: "movid extends box",
    moof: "movie fragment",
    mfhd: "movie fragment header",
    traf: "track fragment",
    tfhd: "track fragment header",
    trun: "track fragment run",
    tfdt: "track fragment decode time",
    mdat: "media data",
    meta: "metadata",
    avc1: "h264 codec info box",
    hev1: "hevc codec info box",
  };
function Gee(t, e) {
  return {
    isLeading: (12 & t[e]) >> 2,
    dependsOn: 3 & t[e],
    isDenpendedOn: (192 & t[e + 1]) >> 6,
    hasRedundancy: (48 & t[e + 1]) >> 4,
    padding: (14 & t[e + 1]) >> 1,
    nonSync: 1 & t[e + 1],
    degradationPriority: (t[e + 2] << 8) | t[e + 3],
  };
}
function i4t(t) {
  var e = hs(t, 3),
    n = e[1],
    r = e[2];
  return {
    dataOffsetPresent: !!(1 & r),
    firstSampleFlagsPresent: !!(4 & r),
    sampleDurationPresent: !!(1 & n),
    sampleSizePresent: !!((2 & n) >> 1),
    sampleFlagsPresent: !!((4 & n) >> 2),
    sampleCompositionTimeOffsetPresent: !!((8 & n) >> 3),
  };
}
function mve(t, e) {
  var n;
  return On((n = [t[e], t[e + 1], t[e + 2], t[e + 3]]))
    .call(n, function (r) {
      return String.fromCharCode(r);
    })
    .join("");
}
function rB(t) {
  for (
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
      n = [],
      r = 0;
    r < t.byteLength;

  ) {
    var i,
      o = t[r] * 16777216 + 65536 * t[r + 1] + 256 * t[r + 2] + t[r + 3];
    if (o === 1) {
      var l = mve(t, r + 4);
      if (l === "mdat") {
        var u,
          c = new DataView(t.buffer),
          d = c.getUint32(r + 8) * Math.pow(2, 32) + c.getUint32(r + 12);
        console.log(Ce((u = "".concat(l, ": largesize="))).call(u, d)), (o = d);
      }
    }
    if (o) {
      var h = t.subarray(r, r + o),
        f = mve(h, 4);
      n.push({
        size: o,
        length: h.byteLength,
        start: r + e,
        type: f,
        sizetypeRepresent: jn((i = h.subarray(0, 8))).call(i),
        body: h.subarray(8),
        typeDes: r4t[f] || "",
      }),
        (r += o);
    } else r += 4;
  }
  return n;
}
function su(t, e, n) {
  if (t)
    for (var r = 0; r < t.length; r++) {
      var i = t[r];
      if (i.type === e && (!n || n(i))) return i;
      if (i.bodyView instanceof Array) {
        var o = su(i.bodyView, e, n);
        if (o && (!n || n(o))) return o;
      }
    }
}
function Ex(t, e) {
  return su(t, "trak", function (n) {
    var r = su(n.bodyView, "hdlr");
    return r && r.bodyView.handlerType === e;
  });
}
function yve(t, e, n) {
  var r,
    i,
    o,
    l,
    u,
    c,
    d,
    h,
    f,
    p,
    g,
    y,
    v,
    b,
    w,
    k,
    D,
    $,
    N,
    P = Ex(t, e);
  if (!P) return null;
  var I = su(P.bodyView, "stbl"),
    O = su(P.bodyView, "mdhd") || {},
    X =
      ((h =
        (d = _r((r = I.bodyView)).call(r, function (Z) {
          return Z.type === "stts";
        })[0]) == null
          ? void 0
          : d.bodyView) == null
        ? void 0
        : $s(h)) || [];
  (p =
    (f = _r((i = I.bodyView)).call(i, function (Z) {
      return Z.type === "stss";
    })[0]) == null
      ? void 0
      : f.bodyView) == null || $s(p);
  var G =
      ((y =
        (g = _r((o = I.bodyView)).call(o, function (Z) {
          return Z.type === "ctts";
        })[0]) == null
          ? void 0
          : g.bodyView) == null
        ? void 0
        : $s(y)) || [],
    H =
      ((b =
        (v = _r((l = I.bodyView)).call(l, function (Z) {
          return Z.type === "stsc";
        })[0]) == null
          ? void 0
          : v.bodyView) == null
        ? void 0
        : $s(b)) || [],
    E =
      ((k =
        (w = _r((u = I.bodyView)).call(u, function (Z) {
          return Z.type === "stsz";
        })[0]) == null
          ? void 0
          : w.bodyView) == null
        ? void 0
        : $s(k)) || [],
    S =
      (($ =
        (D = _r((c = I.bodyView)).call(c, function (Z) {
          return Z.type === "stco";
        })[0]) == null
          ? void 0
          : D.bodyView) == null
        ? void 0
        : $s($)) || [],
    L = !!su(I.bodyView, "hvcC"),
    W = e === "vide";
  if (!H.length || !S.length || !E.length) return [];
  for (
    var F,
      oe = O.bodyView,
      De = oe.timescale,
      Xe = De === void 0 ? 1 : De,
      ze = oe.duration,
      ht = E.length,
      gt = S.length,
      pt = 1,
      $t = 0,
      ot = [],
      tt = a4t(ht, X, G);
    pt <= gt;

  ) {
    var He = H[$t];
    (He == null ? void 0 : He.firstChunk) !== pt
      ? (ot.push(Ci({}, F, { firstChunk: pt, offset: S[pt - 1] })), pt++)
      : (ot.push($n($n({}, He), {}, { offset: S[pt - 1] })),
        (F = He),
        pt++,
        $t++);
  }
  var de = On(E).call(E, function (Z, ie) {
    var Ne = ot[0],
      Pe = Ne.offset;
    (Ne.offset += Z), Ne.samplesPreChunk--, Ne.samplesPreChunk || ot.shift();
    var kt = tt[ie],
      Gt = n.subarray(Pe, Pe + Z);
    if (W) {
      var B = Su.parseNalu(Gt);
      return new mU(
        kt.dts,
        kt.pts,
        Su.parseNaluType(B, L),
        Xe,
        Pe,
        Gt,
        Z,
        0,
        "video",
        L
      );
    }
    return new mU(kt.dts, kt.pts, null, Xe, Pe, Gt, Z, 0, "audio");
  });
  ga(de).call(
    de,
    function (Z, ie) {
      return Z && (Z.duration = ((ie.dts - Z.dts) / Xe) * 1e3), ie;
    },
    null
  );
  var ue =
    (N = su(
      P == null ? void 0 : P.bodyView,
      e === "vide" ? (L ? "hvcC" : "avcC") : "mp4a"
    )) == null
      ? void 0
      : N.bodyView;
  return $n(
    $n(
      $n(
        {
          samples: de,
          iFrames: _r(de).call(de, function (Z) {
            return Z.frameType === "I";
          }).length,
          pFrames: _r(de).call(de, function (Z) {
            return Z.frameType === "P";
          }).length,
          bFrames: _r(de).call(de, function (Z) {
            return Z.frameType === "B";
          }).length,
        },
        O.bodyView
      ),
      {},
      { frameLength: ht, duration: ze / Xe, timescale: Xe },
      ue
    ),
    ue == null ? void 0 : ue.ests
  );
}
function a4t(t, e) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [],
    r = 0,
    i = 0,
    o = 0,
    l = 0,
    u = 0,
    c = [];
  for (
    e = On(e).call(e, function (f) {
      return $n({}, f);
    }),
      n = On(n).call(n, function (f) {
        return $n({}, f);
      });
    o < t;

  ) {
    var d = e[r],
      h = n[i];
    d.sampleCount && (l += d.sampleDelta),
      d.sampleCount--,
      d.sampleCount || r++,
      h && ((u = h.sampleOffset), h.sampleCount--, h.sampleCount || i++),
      c.push({ dts: l, pts: l + u }),
      o++;
  }
  return c;
}
function o4t(t) {
  var e,
    n,
    r,
    i,
    o = Ex(t, "vide"),
    l = Ex(t, "soun"),
    u = su(o == null ? void 0 : o.bodyView, "tkhd"),
    c = su(l == null ? void 0 : l.bodyView, "tkhd"),
    d = su(o == null ? void 0 : o.bodyView, "mdhd"),
    h = su(l == null ? void 0 : l.bodyView, "mdhd"),
    f =
      su(o == null ? void 0 : o.bodyView, "avcC") ||
      su(o == null ? void 0 : o.bodyView, "hvcC"),
    p = su(l == null ? void 0 : l.bodyView, "mp4a"),
    g = l
      ? $n(
          $n(
            $n(
              {
                type: "audio",
                trackId: (n = c.bodyView) == null ? void 0 : n.trackId,
              },
              h.bodyView
            ),
            p == null ? void 0 : p.bodyView
          ),
          (r = p == null ? void 0 : p.bodyView) == null ? void 0 : r.ests
        )
      : null,
    y = o
      ? $n(
          $n(
            {
              type: "video",
              trackId: (i = u.bodyView) == null ? void 0 : i.trackId,
            },
            d == null ? void 0 : d.bodyView
          ),
          f == null ? void 0 : f.bodyView
        )
      : null;
  return (
    bn((e = {}), (g == null ? void 0 : g.trackId) || 0, g),
    bn(e, (y == null ? void 0 : y.trackId) || 0, y),
    e
  );
}
function s4t(t, e) {
  var n = o4t(t),
    r = iU(t).call(t, function (l) {
      return l.type === "moof";
    });
  if (r === -1) return !1;
  (n.lastVdts = -1), (n.lastAdts = -1);
  for (var i = r; i < t.length && t[i].type === "moof"; i += 2) {
    var o = t[i];
    t[i + 1].bodyView = l4t(o, e, n);
  }
  return !0;
}
function l4t(t, e, n) {
  var r,
    i,
    o = _r((r = t.bodyView)).call(r, function (u) {
      return u.type === "traf";
    }),
    l = _r(
      (i = On(o).call(o, function (u) {
        var c = su(u.bodyView, "tfhd"),
          d = su(u.bodyView, "tfdt"),
          h = su(u.bodyView, "trun");
        if (c && h) {
          var f = c.bodyView.trackId;
          return $n(
            {
              trackId: f,
              baseDataOffset: c.bodyView.baseDataOffset,
              defaultSampleDuration: c.bodyView.defaultSampleDuration,
              defaultSampleSize: c.bodyView.defaultSampleSize,
              baseMediaDecodeTime: d.bodyView.baseMediaDecodeTime,
              dataOffset: h.bodyView.dataOffset,
              samples: h.bodyView.samples,
              sampleCount: h.bodyView.sampleCount,
            },
            n[f]
          );
        }
      }))
    ).call(i, Boolean);
  return On(l).call(l, function (u) {
    var c,
      d,
      h,
      f = u.baseDataOffset,
      p = u.defaultSampleDuration,
      g = p === void 0 ? 0 : p,
      y = u.defaultSampleSize,
      v = y === void 0 ? 0 : y,
      b = u.dataOffset,
      w = u.baseMediaDecodeTime,
      k = w === void 0 ? 0 : w,
      D = u.samples,
      $ = u.sps,
      N = u.timescale,
      P = u.type,
      I = f + b,
      O = 0;
    return (
      (u.samples = On(D).call(D, function (X) {
        var G = e.subarray(I, I + X.size);
        O += X.duration || g;
        var H = k + O;
        if (P === "video") {
          var E = ($ == null ? void 0 : $.codec) === "hev1.1.6.L93.B0",
            S = Su.parseNalu(G);
          return (
            (I += X.size),
            new mU(
              H,
              H + (X.ctOffset || 0),
              Su.parseNaluType(S, E),
              N,
              I,
              G,
              X.size || v,
              ((X.duration || g) / N) * 1e3,
              "video",
              E
            )
          );
        }
        return (
          (I += X.size),
          new mU(
            H,
            H + (X.ctOffset || 0),
            null,
            N,
            I,
            G,
            X.size || v,
            ((X.duration || g) / N) * 1e3,
            "audio"
          )
        );
      })),
      (u.frameLength = u.samples.length),
      (u.duration = O / N),
      (u.iFrames = _r((c = u.samples)).call(c, function (X) {
        return X.frameType === "I";
      }).length),
      (u.pFrames = _r((d = u.samples)).call(d, function (X) {
        return X.frameType === "P";
      }).length),
      (u.bFrames = _r((h = u.samples)).call(h, function (X) {
        return X.frameType === "B";
      }).length),
      u
    );
  });
}
function u4t(t) {
  var e = t.body,
    n = t.start,
    r = new Hl(e);
  return r.forward(78), rB(r.subarray(), n + 78 + 8);
}
function c4t(t) {
  var e = t.body,
    n = { spsArr: [], ppsArr: [] },
    r = new Hl(e);
  (n.configVersion = e[0]),
    (n.avcProfile = e[1]),
    (n.profileComptibility = e[2]),
    (n.avcLevel = e[3]),
    r.forward(4),
    r.forward(1);
  var i = 31 & jn(r).call(r, 1);
  r.forward(1);
  for (var o = 0; o < i; o++) {
    var l = r.readU16();
    r.forward(2), n.spsArr.push(r.subarray(l)), r.forward(l);
  }
  var u = jn(r).call(r, 1);
  r.forward(1);
  for (var c = 0; c < u; c++) {
    var d = r.readU16();
    r.forward(2), n.ppsArr.push(r.subarray(d)), r.forward(d);
  }
  return n;
}
function d4t(t) {
  var e = t.body;
  if (!(e.length < 23)) {
    e[21];
    for (
      var n, r, i, o = [], l = [], u = [], c = 23, d = e[22], h = 0;
      h < d;
      h++
    ) {
      (n = 63 & e[c]), (r = (e[c + 1] << 8) | e[c + 2]), (c += 3);
      for (var f = 0; f < r; f++)
        if (((i = (e[c] << 8) | e[c + 1]), (c += 2), i)) {
          switch (n) {
            case 32:
              u.push(e.subarray(c, c + i));
              break;
            case 33:
              o.push(e.subarray(c, c + i));
              break;
            case 34:
              l.push(e.subarray(c, c + i));
          }
          c += i;
        }
    }
    return { spsArr: o, ppsArr: l, vpsArr: u };
  }
}
function h4t(t) {
  var e = t.body,
    n = new Hl(e),
    r = n.readU32();
  n.forward(4);
  var i = n.readU32();
  return (
    n.forward(4), { bufferSizeDB: r, maxBitrate: i, avgBitrate: n.readU32() }
  );
}
function f4t(t) {
  var e,
    n,
    r,
    i,
    o = t.body,
    l = new Hl(o);
  return (
    l.forward(4),
    (e = l.read32()),
    l.forward(4),
    (n = l.read32()),
    l.forward(4),
    (r = l.read32()),
    l.forward(4),
    (i = l.read32()),
    l.forward(4),
    {
      compositionToDTSShift: e,
      leastDecodeToDisplayDelta: n,
      greatestDecodeToDisplayDelta: r,
      compositionStartTime: i,
      compositionEndTime: l.read32(),
    }
  );
}
function p4t(t) {
  var e = t.body,
    n = t.length,
    r = new Hl(e),
    i = { compatible: [] };
  (i.major = Oee(e, 0)), r.forward(4), (i.version = r.readU32()), r.forward(4);
  for (var o = r.offset; o < n - 8; ) i.compatible.push(Oee(e, o)), (o += 4);
  return i;
}
function g4t(t) {
  return { handlerType: Oee(t.body, 8) };
}
var m4t = Math.pow(2, 32);
function y4t(t) {
  var e = t.body,
    n = {},
    r = new Hl(e),
    i = e[0];
  return (
    r.forward(4),
    i === 1
      ? (r.forward(16),
        (n.timescale = r.readU32()),
        r.forward(4),
        (n.duration = r.readU32() * m4t),
        r.forward(4),
        (n.duration += r.readU32()))
      : (r.forward(8),
        (n.timescale = r.readU32()),
        r.forward(4),
        (n.duration = r.readU32())),
    n
  );
}
function v4t(t) {
  var e,
    n = t.body,
    r = new Hl(n);
  if ((r.forward(4), n[0] === 1)) {
    var i = r.readU32();
    r.forward(4), (e = i * (1 << 30) * 2 + r.readU32());
  } else e = r.readU32();
  return { fragDuration: e };
}
function b4t(t) {
  var e = t.body,
    n = new Hl(e);
  return n.forward(4), { seqNumber: n.readU32() };
}
var _4t = xc,
  T4t = function () {
    var t = _4t(this),
      e = "";
    return (
      t.hasIndices && (e += "d"),
      t.global && (e += "g"),
      t.ignoreCase && (e += "i"),
      t.multiline && (e += "m"),
      t.dotAll && (e += "s"),
      t.unicode && (e += "u"),
      t.unicodeSets && (e += "v"),
      t.sticky && (e += "y"),
      e
    );
  },
  E4t = ts,
  S4t = kl,
  R4t = Es,
  A4t = T4t,
  vve = RegExp.prototype,
  w4t = function (t) {
    var e = t.flags;
    return e !== void 0 || "flags" in vve || S4t(t, "flags") || !R4t(vve, t)
      ? e
      : E4t(A4t, t);
  },
  k4t = w4t,
  I4t = k4t,
  D4t = Es,
  P4t = I4t,
  bve = RegExp.prototype,
  M4t = function (t) {
    return t === bve || D4t(bve, t) ? P4t(t) : t.flags;
  },
  C4t = M4t,
  $4t = C4t,
  x4t = $4t,
  L4t = x4t,
  O4t = L4t,
  G4t = O4t,
  N4t = G4t,
  F4t = N4t,
  Ca = xr(F4t),
  U4t = function () {
    var t = [];
    (t[3] = "ES_Descriptor"),
      (t[4] = "DecoderConfigDescriptor"),
      (t[5] = "DecoderSpecificInfo"),
      (t[6] = "SLConfigDescriptor"),
      (this.getDescriptorName = function (r) {
        return t[r];
      });
    var e = this,
      n = {};
    return (
      (this.parseOneDescriptor = function (r) {
        var i,
          o,
          l = 0,
          u = r.readU8();
        for (r.forward(1), o = r.readU8(), r.forward(1); 128 & o; )
          (l = (127 & o) << 7), (o = r.readU8()), r.forward(1);
        return (
          (l += 127 & o),
          (i = t[u] ? new n[t[u]](l) : new n.Descriptor(l)).parse(r),
          i
        );
      }),
      (n.Descriptor = function (r, i) {
        (this.tag = r), (this.size = i), (this.descs = []);
      }),
      (n.Descriptor.prototype.parse = function (r) {
        (this.data = jn(r).call(r, this.size)), r.forward(this.size);
      }),
      (n.Descriptor.prototype.findDescriptor = function (r) {
        for (var i = 0; i < this.descs.length; i++)
          if (this.descs[i].tag === r) return this.descs[i];
        return null;
      }),
      (n.Descriptor.prototype.parseRemainingDescriptors = function (r) {
        for (var i = r.offset; r.offset < i + this.size; ) {
          var o = e.parseOneDescriptor(r);
          this.descs.push(o);
        }
      }),
      (n.ES_Descriptor = function (r) {
        n.Descriptor.call(this, 3, r);
      }),
      (n.ES_Descriptor.prototype = new n.Descriptor()),
      (n.ES_Descriptor.prototype.parse = function (r) {
        if (
          ((this.ES_ID = r.readU16()),
          r.forward(2),
          (this.flags = r.readU8()),
          r.forward(1),
          (this.size -= 3),
          128 & Ca(this)
            ? ((this.dependsOn_ES_ID = r.readU16()),
              r.forward(2),
              (this.size -= 2))
            : (this.dependsOn_ES_ID = 0),
          64 & Ca(this))
        ) {
          var i,
            o = r.readU8();
          r.forward(1),
            (this.URL = On((i = RE(jn(r).call(r, o)))).call(i, function (l) {
              return String.fromCharCode(l);
            })),
            r.forward(o),
            (this.size -= o + 1);
        } else this.URL = "";
        32 & Ca(this)
          ? ((this.OCR_ES_ID = r.readU16()), r.forward(2), (this.size -= 2))
          : (this.OCR_ES_ID = 0),
          this.parseRemainingDescriptors(r);
      }),
      (n.ES_Descriptor.prototype.getOTI = function (r) {
        var i = this.findDescriptor(4);
        return i ? i.oti : 0;
      }),
      (n.ES_Descriptor.prototype.getAudioConfig = function (r) {
        var i = this.findDescriptor(4);
        if (!i) return null;
        var o = i.findDescriptor(5);
        if (o && o.data) {
          var l = (248 & o.data[0]) >> 3;
          return (
            l === 31 &&
              o.data.length >= 2 &&
              (l = 32 + ((7 & o.data[0]) << 3) + ((224 & o.data[1]) >> 5)),
            l
          );
        }
        return null;
      }),
      (n.DecoderConfigDescriptor = function (r) {
        n.Descriptor.call(this, 4, r);
      }),
      (n.DecoderConfigDescriptor.prototype = new n.Descriptor()),
      (n.DecoderConfigDescriptor.prototype.parse = function (r) {
        (this.oti = r.readU8()),
          r.forward(1),
          (this.streamType = r.readU8()),
          r.forward(1),
          (this.bufferSize = r.readU24()),
          r.forward(3),
          (this.maxBitrate = r.readU32()),
          r.forward(4),
          (this.avgBitrate = r.readU32()),
          r.forward(4),
          (this.size -= 13),
          this.parseRemainingDescriptors(r);
      }),
      (n.DecoderSpecificInfo = function (r) {
        n.Descriptor.call(this, 5, r);
      }),
      (n.DecoderSpecificInfo.prototype = new n.Descriptor()),
      (n.SLConfigDescriptor = function (r) {
        n.Descriptor.call(this, 6, r);
      }),
      (n.SLConfigDescriptor.prototype = new n.Descriptor()),
      this
    );
  };
function B4t(t) {
  var e,
    n,
    r,
    i = ji((e = t.descs)).call(e, function (l) {
      return l.tag === 4;
    });
  i &&
    (n = ji((r = i.descs)).call(r, function (l) {
      return l.tag === 5;
    }));
  var o = Ci({}, i);
  return (
    delete o.descs,
    (o.config =
      n != null && n.data.length ? RE(n == null ? void 0 : n.data) : []),
    o
  );
}
function H4t(t) {
  var e = t.body,
    n = jn(e).call(e, 28),
    r = new U4t().parseOneDescriptor(new Hl(jn(n).call(n, 12), 0)),
    i = (r == null ? void 0 : r.getAudioConfig) && r.getAudioConfig();
  return {
    channelCount: e[17],
    samplesize: e[19],
    sampleRate: (e[24] << 8) | e[25],
    objectType: i,
    codec: "mp4a.40." + i,
    ests: B4t(r),
  };
}
function X4t(t) {
  var e = t.body,
    n = new Hl(e),
    r = {};
  return (
    n.forward(4),
    (r.createTime = n.readU32()),
    n.forward(4),
    (r.modifyTime = n.readU32()),
    n.forward(4),
    (r.timescale = n.readU32()),
    n.forward(4),
    (r.duration = n.readU32()),
    n.forward(4),
    (r.rate = n.readU32()),
    n.forward(4),
    n.forward(2),
    n.forward(70),
    (r.nextTrackId = n.readU32()),
    r
  );
}
function _ve(t) {
  return On(t)
    .call(t, function (e) {
      return e.toString(16);
    })
    .join("");
}
function V4t(t) {
  return On(t)
    .call(t, function (e) {
      return String.fromCharCode(e);
    })
    .join("");
}
function z4t(t) {
  var e = t.body,
    n = {},
    r = e[0],
    i = new Hl(e);
  if (
    (i.forward(4), (n.systemId = _ve(jn(i).call(i, 16))), i.forward(16), r > 0)
  ) {
    var o = i.readU32();
    n.kids = [];
    var l = 0;
    for (i.forward(4); l < o; )
      n.kids.push(_ve(jn(i).call(i, 16))), i.forward(16), l++;
  }
  var u = i.readU32();
  return (
    i.forward(4),
    (n.dataSize = u),
    (n.data = jn(i).call(i, u)),
    (n.dataToBase64 = btoa(V4t(n.data))),
    n
  );
}
function j4t(t, e) {
  var n = t.body,
    r = new Hl(n);
  r.forward(4);
  for (var i, o, l, u, c = [], d = 0; d < e; d++) {
    var h = r.readU8();
    (i = (192 & h) >> 6),
      (o = (48 & h) >> 4),
      (l = (12 & h) >> 2),
      (u = 3 & h),
      c.push({
        isLeading: i,
        dependsOn: o,
        isDenpendedOn: l,
        hasRedundancy: u,
      }),
      r.forward(1);
  }
  return { entries: c };
}
function W4t(t) {
  var e = t.body,
    n = new Hl(e);
  n.forward(4);
  var r = n.readU32(),
    i = [];
  n.forward(4);
  for (var o = 0; o < r; o++) {
    var l = n.readU32();
    i.push(l), n.forward(4);
  }
  return { entries: i, count: i.length };
}
function K4t(t) {
  var e = t.body,
    n = new Hl(e);
  n.forward(4);
  var r = [],
    i = n.readU32();
  n.forward(4);
  for (var o = 0; o < i; o++) {
    var l = n.readU32();
    n.forward(4);
    var u = n.readU32();
    n.forward(4);
    var c = n.readU32();
    n.forward(4),
      r.push({ firstChunk: l, samplesPreChunk: u, sampleDesIndex: c });
  }
  return { entries: r, count: r.length };
}
function Z4t(t) {
  var e = t.body,
    n = new Hl(e);
  n.forward(4);
  var r = n.readU32(),
    i = [];
  n.forward(4);
  for (var o = 0; o < r; o++) {
    var l = n.readU32();
    n.forward(4);
    var u = n.readU32();
    n.forward(4), i.push({ sampleCount: l, sampleOffset: u });
  }
  return { entries: i, count: i.length };
}
function Y4t(t) {
  var e = t.body,
    n = new Hl(e);
  n.forward(4);
  var r = [],
    i = n.readU32();
  n.forward(4);
  for (var o = 0; o < i; o++) {
    var l = n.readU32();
    r.push(l), n.forward(4);
  }
  return { entries: r, count: r.length };
}
function Q4t(t) {
  var e = t.body,
    n = new Hl(e);
  n.forward(4);
  var r = [],
    i = n.readU32();
  n.forward(4);
  var o = n.readU32();
  if ((n.forward(4), i === 0))
    for (var l = 0; l < o; l++) {
      var u = n.readU32();
      r.push(u), n.forward(4);
    }
  else console.warn("parse stsz, sample size not equal 0");
  return { entries: r, count: r.length };
}
function J4t(t) {
  var e = t.body,
    n = new Hl(e);
  n.forward(4);
  var r = n.readU32(),
    i = [];
  n.forward(4);
  for (var o = 0; o < r; o++) {
    var l = n.readU32();
    n.forward(4);
    var u = n.readU32();
    n.forward(4), i.push({ sampleCount: l, sampleDelta: u });
  }
  return { entries: i, count: i.length };
}
var q4t = Math.pow(2, 32);
function eNt(t) {
  var e = t.body,
    n = new Hl(e),
    r = 0;
  return (
    n.forward(4),
    e[0] === 1
      ? ((r = n.readU32() * q4t), n.forward(4), (r += n.readU32()))
      : (r = n.readU32()),
    { baseMediaDecodeTime: r }
  );
}
function tNt(t) {
  var e = t.body,
    n = new Hl(e);
  n.forward(1);
  var r = jn(n).call(n, 3),
    i = (r[0] << 16) | (r[1] << 8) | r[2],
    o = { flags: r },
    l = {
      baseDataOffsetPresent: !!(1 & i),
      sampleDescriptionIndexPresent: !!(2 & i),
      defaultSampleDurationPresent: !!(8 & i),
      defaultSampleSizePresent: !!(16 & i),
      defaultSampleFlagsPresent: !!(32 & i),
      durationIsEmpty: !!(65536 & i),
      defaultBaseIsMoof: !!(131072 & i),
    };
  if (
    ((o.tfFlags = l),
    n.forward(3),
    (o.trackId = n.readU32()),
    l.baseDataOffsetPresent)
  ) {
    n.forward(4);
    var u = n.readU32();
    n.forward(4);
    var c = n.readU32();
    o.baseDataOffset = (u << 32) | c;
  } else
    (o.baseDataOffset = 0),
      console.warn("base data offset not detected in tfhd");
  return (
    l.sampleDescriptionIndexPresent &&
      (n.forward(4), (o.sampleDescriptionIndex = n.readU32())),
    l.defaultSampleDurationPresent &&
      (n.forward(4), (o.defaultSampleDuration = n.readU32())),
    l.defaultSampleSizePresent &&
      (n.forward(4), (o.defaultSampleSize = n.readU32())),
    l.defaultSampleFlagsPresent &&
      (n.forward(4), (o.defaultSampleFlags = n.readU32())),
    o
  );
}
var nNt = Math.pow(2, 32);
function rNt(t) {
  var e = t.body,
    n = new Hl(e, 4),
    r = {},
    i = n.readU8();
  (r.version = i),
    i === 1 ? n.forward(16) : n.forward(8),
    (r.trackId = n.readU32()),
    n.forward(4),
    i === 1
      ? ((r.duration = n.readU32() * nNt),
        n.forward(4),
        (r.duration += n.readU32()))
      : (r.duration = n.readU32());
  var o = e.byteLength;
  return (
    (o -= 8),
    (n.offset = o),
    (r.width = n.readU32() >> 16),
    n.forward(4),
    (r.height = n.readU32() >> 16),
    r
  );
}
function iNt(t) {
  var e = t.body,
    n = {},
    r = new Hl(e);
  return (
    r.forward(4),
    (n.trackId = r.readU32()),
    r.forward(4),
    (n.defaultSdescriptionIndex = r.readU32()),
    r.forward(4),
    (n.defaultSampleDuration = r.readU32()),
    r.forward(4),
    (n.defaultSampleSize = r.readU32()),
    r.forward(4),
    (n.defaultSampleFlags = Gee(e, r.offset)),
    n
  );
}
function aNt(t) {
  var e = t.body,
    n = { samples: [] },
    r = new Hl(e);
  (n.version = r.readU8()), r.forward(1), (n.flags = jn(r).call(r, 3));
  var i = i4t(Ca(n)),
    o = i.dataOffsetPresent,
    l = i.firstSampleFlagsPresent,
    u = i.sampleDurationPresent,
    c = i.sampleSizePresent,
    d = i.sampleFlagsPresent,
    h = i.sampleCompositionTimeOffsetPresent;
  (n.trFlags = i),
    r.forward(3),
    (n.sampleCount = r.readU32()),
    r.forward(4),
    o && ((n.dataOffset = r.readU32()), r.forward(4)),
    l && ((n.firstSampleFlags = Gee(e, r.offset)), r.forward(4));
  for (var f = 0; f < n.sampleCount; ) {
    var p = {};
    u && ((p.duration = r.readU32()), r.forward(4)),
      c && ((p.size = r.readU32()), r.forward(4)),
      d && ((p.flags = Gee(e, r.offset)), r.forward(4)),
      h && ((p.ctOffset = r.readU32()), r.forward(4)),
      n.samples.push(p),
      f++;
  }
  return n;
}
function oNt(t) {
  var e = t.body,
    n = t.start,
    r = new Hl(e);
  r.forward(4);
  var i = r.readU32();
  return (
    r.forward(4), { entryCount: i, childData: rB(r.subarray(), n + 8 + 8) }
  );
}
function sNt(t) {
  var e = rB(t instanceof ArrayBuffer ? new Uint8Array(t) : t, 0);
  if ((TF(e), !s4t(e, t))) {
    var n,
      r = su(e, "mdat");
    r &&
      (r.bodyView = _r(
        (n = [
          $n({ type: "video" }, yve(e, "vide", t)),
          $n({ type: "audio" }, yve(e, "soun", t)),
        ])
      ).call(n, function (i) {
        return !!i.samples;
      }));
  }
  return e;
}
function TF(t) {
  var e = 0;
  t.forEach(function (n) {
    switch (n.type) {
      case "ftyp":
      case "styp":
        n.bodyView = p4t(n);
        break;
      case "moov":
      case "trak":
      case "mvex":
      case "mdia":
      case "minf":
      case "dinf":
      case "moof":
      case "traf":
      case "stbl":
        (n.bodyView = rB(n.body, n.start + 8)), TF(n.bodyView);
        break;
      case "stsd":
        var r = oNt(n),
          i = r.entryCount,
          o = r.childData;
        (n.entryCount = i), (n.bodyView = o), TF(n.bodyView);
        break;
      case "mvhd":
        n.bodyView = X4t(n);
        break;
      case "tkhd":
        n.bodyView = rNt(n);
        break;
      case "mehd":
        n.bodyView = v4t(n);
        break;
      case "mdhd":
        n.bodyView = y4t(n);
        break;
      case "hdlr":
        n.bodyView = g4t(n);
        break;
      case "trex":
        n.bodyView = iNt(n);
        break;
      case "trun":
        (n.bodyView = aNt(n)), (e = n.bodyView.samples.length);
        break;
      case "tfdt":
        n.bodyView = eNt(n);
        break;
      case "avc1":
      case "hvc1":
      case "hev1":
        (n.bodyView = u4t(n)), TF(n.bodyView);
        break;
      case "mp4a":
        (n.bodyView = H4t(n)), n.bodyView && (n.bodyView.codecType = "aac");
        break;
      case "avcC":
        n.bodyView = c4t(n);
        var l = n.bodyView;
        if (((l.codecType = "avc"), !(l != null && l.sps))) {
          var u = l.spsArr[0],
            c = Su.removeEPB(u);
          l.sps = fU.parseSPS(c);
        }
        break;
      case "hvcC":
        n.bodyView = d4t(n);
        var d = n.bodyView;
        if (((d.codecType = "bytevc1"), !(d != null && d.sps))) {
          var h = d.spsArr[0],
            f = Su.removeEPB(h);
          d.sps = pU.parseSPS(f);
        }
        break;
      case "btrt":
        n.bodyView = h4t(n);
        break;
      case "stts":
        (n.bodyView = J4t(n)),
          $s(n.bodyView).length && (e = $s(n.bodyView)[0].sampleCount);
        break;
      case "ctts":
        n.bodyView = Z4t(n);
        break;
      case "cslg":
        n.bodyView = f4t(n);
        break;
      case "stss":
        n.bodyView = Y4t(n);
        break;
      case "stsz":
        n.bodyView = Q4t(n);
        break;
      case "stsc":
        n.bodyView = K4t(n);
        break;
      case "stco":
        n.bodyView = W4t(n);
        break;
      case "sdtp":
        n.bodyView = j4t(n, e);
        break;
      case "mfhd":
        n.bodyView = b4t(n);
        break;
      case "tfhd":
        n.bodyView = tNt(n);
        break;
      case "pssh":
        n.bodyView = z4t(n);
    }
  });
}
function lNt(t) {
  var e,
    n,
    r,
    i,
    o,
    l,
    u = _r(t).call(t, function (N) {
      return N.type === "mdat";
    });
  if (!u.length) {
    var c = Ex(t, "vide"),
      d = Ex(t, "soun"),
      h =
        (n = su(c == null ? void 0 : c.bodyView, "mdhd")) == null
          ? void 0
          : n.bodyView,
      f =
        ((r = su(c == null ? void 0 : c.bodyView, "avcC")) == null
          ? void 0
          : r.bodyView) ||
        ((i = su(c == null ? void 0 : c.bodyView, "hvcC")) == null
          ? void 0
          : i.bodyView),
      p =
        (o = su(d == null ? void 0 : d.bodyView, "mdhd")) == null
          ? void 0
          : o.bodyView,
      g =
        (l = su(d == null ? void 0 : d.bodyView, "mp4a")) == null
          ? void 0
          : l.bodyView;
    try {
      return {
        video: $n(
          $n({}, h),
          {},
          { duration: (h == null ? void 0 : h.duration) / h.timescale },
          f
        ),
        audio: $n(
          $n(
            $n({}, p),
            {},
            { duration: (p == null ? void 0 : p.duration) / p.timescale },
            g
          ),
          g.ests
        ),
      };
    } catch {}
    return {};
  }
  var y = ga(
      (e = On(u).call(u, function (N) {
        return N.bodyView;
      }))
    ).call(
      e,
      function (N, P) {
        return (N = Ce(N).call(N, P));
      },
      []
    ),
    v = ga(y).call(
      y,
      function (N, P) {
        var I,
          O = P.type,
          X = P.frameLength,
          G = P.iFrames,
          H = P.pFrames,
          E = P.bFrames,
          S = P.duration;
        return N[O]
          ? ((N[O].frameLength += X),
            (N[O].iFrames += G),
            (N[O].pFrames += H),
            (N[O].bFrames += E),
            (N[O].duration += S),
            N)
          : ((N[O] = Ci({}, P)),
            N[O].refDuration ||
              (N[O].refDuration =
                (I = P.samples[0]) == null ? void 0 : I.duration),
            N);
      },
      {}
    ),
    b = v.video;
  if (b) {
    var w = b.frameLength,
      k = b.iFrames,
      D = b.pFrames,
      $ = b.bFrames;
    (b.iPercent = uu((k / w) * 100)),
      (b.pPercent = uu((D / w) * 100)),
      (b.bPercent = uu(($ / w) * 100));
  }
  return v;
}
var Tve = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "parse",
          value: function (e) {
            return sNt(e);
          },
        },
        {
          key: "parseV2",
          value: function (e, n) {
            var r,
              i,
              o,
              l,
              u,
              c,
              d = _r(e).call(e, function (v) {
                return v.type === "mdat";
              }),
              h = [],
              f =
                (i = (r = d[0]) == null ? void 0 : r.bodyView) == null
                  ? void 0
                  : _r(i).call(i, function (v) {
                      return v.type === "video";
                    })[0],
              p =
                (l = (o = d[0]) == null ? void 0 : o.bodyView) == null
                  ? void 0
                  : _r(l).call(l, function (v) {
                      return v.type === "audio";
                    })[0],
              g = Math.min(
                ((u = p == null ? void 0 : p.samples[0]) == null
                  ? void 0
                  : u.dtsTime) || 0,
                ((c = f == null ? void 0 : f.samples[0]) == null
                  ? void 0
                  : c.dtsTime) || 0
              );
            d.forEach(function (v) {
              v.bodyView.forEach(function (b) {
                b.samples.forEach(function (w) {
                  (w.time = uu(w.dtsTime - g)), h.push(w);
                });
              });
            });
            var y = {
              items: mm(h).call(h, function (v, b) {
                return v.time > b.time ? 1 : -1;
              }),
            };
            return this._addMetadataToFirstKeyFrame(f), (y.rates = gU(y)), y;
          },
        },
        {
          key: "getSnapshoot",
          value: function (e) {
            return lNt(e);
          },
        },
        {
          key: "_addMetadataToFirstKeyFrame",
          value: function (e) {
            var n;
            if (e) {
              var r = _r((n = e.samples)).call(n, function (i) {
                return i.keyframe;
              })[0];
              r &&
                ((r.sps = e.sps),
                (r.vpsArr = e.vpsArr),
                (r.spsArr = e.spsArr),
                (r.ppsArr = e.ppsArr));
            }
          },
        },
      ]),
      t
    );
  })(),
  Sx = {
    maxFirstAVDtsGap: 0.2,
    minAudioFrameSize: 40,
    maxAVDuationGap: 0.3,
    dtsBreakGap: 0.5,
    consecutiveFrameGap: 0.1,
  },
  uNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e) {
            var n =
                e == null
                  ? void 0
                  : ji(e).call(e, function (d) {
                      return d.isSample && d.streamType === "video";
                    }),
              r =
                e == null
                  ? void 0
                  : ji(e).call(e, function (d) {
                      return d.isSample && d.streamType === "audio";
                    });
            if (n && r) {
              var i,
                o,
                l,
                u = n.pts - r.pts,
                c = uu(u / n.timescale);
              if (u / n.timescale >= Sx.maxFirstAVDtsGap)
                return [
                  {
                    description: Ce(
                      (i = Ce(
                        (o = Ce(
                          (l = "【音视频首帧gap差距过大】视频首帧pts: ".concat(
                            n.pts,
                            ", 音频首帧pts: "
                          ))
                        ).call(l, r.pts, ", delta: "))
                      ).call(o, u, "("))
                    ).call(i, c, "s)"),
                    tips: "".concat(c > 10 ? "可能造成无法起播问题" : ""),
                  },
                ];
            }
          },
        },
      ]),
      t
    );
  })(),
  cNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e) {
            var n =
                e == null
                  ? void 0
                  : _r(e).call(e, function (o) {
                      return o.isSample && o.streamType === "video";
                    }),
              r =
                e == null
                  ? void 0
                  : _r(e).call(e, function (o) {
                      return o.isSample && o.streamType === "audio";
                    }),
              i = !!e[0] && e[0] instanceof T8e;
            return [
              this._checkBreak(n, "video"),
              this._checkBreak(r, "audio"),
              i &&
                this._checkConsecutiveFrameBreak(
                  e == null
                    ? void 0
                    : _r(e).call(e, function (o) {
                        return o.isSample;
                      })
                ),
            ];
          },
        },
        {
          key: "_checkBreak",
          value: function (e, n) {
            var r = e.length;
            if (r)
              for (var i = 0; i < r - 1; i++) {
                var o, l, u, c;
                if (Math.abs(e[i].dtsTime - e[i + 1].dtsTime) > Sx.dtsBreakGap)
                  return {
                    description: Ce(
                      (o = Ce(
                        (l = Ce(
                          (u = Ce(
                            (c = "【".concat(
                              n,
                              "时间戳发生跳变】，当前帧dts: "
                            ))
                          ).call(c, e[i].dts, ", time:"))
                        ).call(u, e[i].time, ", 后一帧dts: "))
                      ).call(l, e[i + 1].dts, ", time:"))
                    ).call(o, e[i + 1].time),
                  };
              }
          },
        },
        {
          key: "_checkConsecutiveFrameBreak",
          value: function (e) {
            var n = e.length;
            if (n) {
              for (var r = 0; r < n - 1; r++)
                if (
                  Math.abs(e[r].dtsTime - e[r + 1].dtsTime) >
                  Sx.consecutiveFrameGap
                ) {
                  var i,
                    o,
                    l,
                    u,
                    c,
                    d = e[r],
                    h = e[r + 1];
                  return {
                    description: Ce(
                      (i = Ce(
                        (o = Ce(
                          (l = Ce(
                            (u = Ce(
                              (c = "【前后帧dts差距过大】，当前帧(".concat(
                                d.streamType,
                                ")dts: "
                              ))
                            ).call(c, d.dts, ", time:"))
                          ).call(u, d.time, ", 后一帧("))
                        ).call(l, h.streamType, ")dts: "))
                      ).call(o, h.dts, ", time:"))
                    ).call(i, h.time),
                    tips: "可能造成播放画面卡顿或者声音卡顿",
                  };
                }
            }
          },
        },
      ]),
      t
    );
  })(),
  dNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e) {
            return [this._checkKeyFrame(e), this._checkAudioFrameDataFull(e)];
          },
        },
        {
          key: "_checkKeyFrame",
          value: function (e) {
            var n =
              e == null
                ? void 0
                : _r(e).call(e, function (r) {
                    return r.isSample && r.streamType === "video";
                  })[0];
            if (n && n.frameType !== "I")
              return {
                description: "【视频首帧非关键帧】",
                tips: "可能播放花屏或者报解码错误",
              };
          },
        },
        {
          key: "_checkAudioFrameDataFull",
          value: function (e) {
            var n =
                e == null
                  ? void 0
                  : _r(e).call(e, function (u) {
                      return u.isSample && u.streamType === "audio";
                    }),
              r = n.length;
            if (r)
              for (var i = 0; i < r; i++) {
                var o,
                  l = n[i].data;
                if ((l == null ? void 0 : l.length) < Sx.minAudioFrameSize)
                  return {
                    description: Ce(
                      (o = "【音频帧数据较少】 pts=".concat(
                        n[i].pts,
                        ", time="
                      ))
                    ).call(o, n[i].time),
                    tips: "可能由于音频数据原因导致解码报错",
                  };
              }
          },
        },
      ]),
      t
    );
  })(),
  hNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e, n) {
            return [
              this._hasVideoMetadata(e),
              this._hasAudioMetadata(e),
              this._checkRepeatedSps(e),
              this._metadataOnlyInSequeceHeader(e, n),
            ];
          },
        },
        {
          key: "_hasVideoMetadata",
          value: function (e) {
            var n,
              r =
                (n =
                  e == null
                    ? void 0
                    : _r(e).call(e, function (i) {
                        return i.streamType === "video";
                      })[0]) == null
                  ? void 0
                  : n.bodyView;
            if (r && !r.sps)
              return {
                description: "【未检测到视频metadata信息】",
                tips: "可能视频无法播放或者报解码错误",
              };
          },
        },
        {
          key: "_hasAudioMetadata",
          value: function (e) {
            var n,
              r =
                (n =
                  e == null
                    ? void 0
                    : _r(e).call(e, function (i) {
                        return i.streamType === "audio";
                      })[0]) == null
                  ? void 0
                  : n.bodyView;
            if (r && (!r.config || !r.sampleRate || !r.channelCount))
              return {
                description: "【未检测到音频metadata信息】",
                tips: "可能视频无法播放或者报解码错误",
              };
          },
        },
        {
          key: "_checkRepeatedSps",
          value: function (e) {
            var n,
              r =
                e == null
                  ? void 0
                  : _r(e).call(e, function (o) {
                      return o.streamType === "video";
                    })[0],
              i =
                ((n = r == null ? void 0 : r.bodyView) == null
                  ? void 0
                  : n.spsArr) || [];
            if (r && i.length > 1 && i[0].join(",") !== i[1].join(","))
              return { description: "【关键帧前包含多个sps信息】" };
          },
        },
        {
          key: "_metadataOnlyInSequeceHeader",
          value: function (e, n) {
            var r;
            if (n === "FLV") {
              var i =
                e == null
                  ? void 0
                  : ji(e).call(e, function (l) {
                      return l.keyframe;
                    });
              if (i) {
                var o = i.isHevc;
                return qt((r = i.nalTypes)).call(r, o ? 33 : 7) === -1
                  ? { description: "【sps、pps信息只存在于Sequence Header中】" }
                  : void 0;
              }
            }
          },
        },
      ]),
      t
    );
  })(),
  fNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e) {
            var n =
              e == null
                ? void 0
                : ji(e).call(e, function (r) {
                    return r.isSample && r.streamType === "video";
                  });
            if (n)
              return n.isHevc
                ? [
                    {
                      id: 1,
                      description: "【H265编码格式】",
                      tips: "对于不支持H265解码的设备无法播放",
                    },
                  ]
                : void 0;
          },
        },
      ]),
      t
    );
  })(),
  pNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e) {
            if (
              e != null &&
              ji(e).call(e, function (n) {
                return n.isSample && n.frameType === "B";
              })
            )
              return [{ description: "【存在B帧】" }];
          },
        },
      ]),
      t
    );
  })(),
  gNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e) {
            var n =
                e == null
                  ? void 0
                  : _r(e).call(e, function (c) {
                      return c.isSample && c.streamType === "video";
                    }),
              r =
                e == null
                  ? void 0
                  : _r(e).call(e, function (c) {
                      return c.isSample && c.streamType === "audio";
                    });
            if (n.length && r.length) {
              var i,
                o,
                l = n[n.length - 1].ptsTime - n[0].ptsTime,
                u = r[r.length - 1].ptsTime - r[0].ptsTime;
              if (Math.abs(l - u) >= Sx.maxAVDuationGap)
                return [
                  {
                    description: Ce(
                      (i = Ce(
                        (o = "【音视频时长存在差距】, video=".concat(
                          l,
                          "s, audio="
                        ))
                      ).call(o, u, "s, delta="))
                    ).call(i, uu(l - u), "s"),
                    tips: "可能造成播放画面卡顿或者声音卡顿",
                  },
                ];
            }
          },
        },
      ]),
      t
    );
  })(),
  mNt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "detect",
          value: function (e) {
            var n =
                e == null
                  ? void 0
                  : _r(e).call(e, function (i) {
                      return i.isSample && i.streamType === "video";
                    }),
              r =
                e == null
                  ? void 0
                  : _r(e).call(e, function (i) {
                      return i.isSample && i.streamType === "audio";
                    });
            if (n.length || r.length)
              return n.length && r.length
                ? void 0
                : [
                    {
                      description: "【流开始只包含".concat(
                        n.length ? "音频" : "视频",
                        "】"
                      ),
                      tips: "可能播放没有声音或者没有画面",
                    },
                  ];
          },
        },
      ]),
      t
    );
  })();
function yNt(t, e) {
  var n, r, i;
  return _r(
    (n = ga(
      (r = On(
        (i = [
          new fNt(),
          new uNt(),
          new cNt(),
          new dNt(),
          new hNt(),
          new gNt(),
          new pNt(),
          new mNt(),
        ])
      ).call(i, function (o) {
        return o.detect(t, e);
      }))
    ).call(
      r,
      function (o, l) {
        return Ce(o).call(o, l);
      },
      []
    ))
  ).call(n, Boolean);
}
var vNt = ea,
  bNt = function (t, e, n) {
    return e in t
      ? vNt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  xA = function (t, e, n) {
    return bNt(t, ti(e) !== "symbol" ? e + "" : e, n), n;
  },
  Rx = (function () {
    function t(e) {
      var n = this;
      Wn(this, t),
        xA(this, "_opts", null),
        xA(this, "_controller", null),
        xA(this, "_reader", null),
        xA(this, "_loading", !1),
        xA(this, "_chunks", []),
        xA(this, "_readStream", function (r, i) {
          var o = 0;
          n._reader = r.getReader();
          var l = n._chunks;
          return (function u() {
            var c;
            return (c = n._reader) == null
              ? void 0
              : c.read().then(function (d) {
                  var h = d.value,
                    f = d.done;
                  return (
                    l.push(h),
                    i(o, h),
                    f
                      ? Ar.resolve(Vse(_r(l).call(l, Boolean)))
                      : ((o += h.byteLength), u())
                  );
                });
          })();
        }),
        (this._opts = e);
    }
    return (
      Kn(t, [
        {
          key: "request",
          value: function () {
            var e = this,
              n = this._opts,
              r = n.url,
              i = n.onProgress,
              o = n.contentType,
              l = o === void 0 ? "ArrayBuffer" : o,
              u = n.loadTimeout,
              c = u === void 0 ? 5e3 : u,
              d = n.headers;
            return (
              (this._controller = new AbortController()),
              Ar.race([
                fetch(r, { signal: this._controller.signal, headers: d }),
                new Ar(function (h, f) {
                  setTimeout(function () {
                    var p;
                    e._loading ||
                      (f({ code: 0, message: "timeout" }),
                      (p = e._controller) == null || p.abort());
                  }, c);
                }),
              ])
                .then(function (h) {
                  return h.ok && h.status >= 200 && h.status < 300
                    ? ((e._loading = !0), h)
                    : Ar.reject({ code: h.status, message: h.statusText });
                })
                .then(function (h) {
                  switch (l) {
                    case "TEXT":
                      return h.text();
                    case "JSON":
                      return h.json();
                    case "ArrayBuffer":
                      return i
                        ? e._readStream(h.clone().body, i)
                        : h.arrayBuffer();
                  }
                })
                .catch(function (h) {
                  if (((e._loading = !1), h.name !== "AbortError"))
                    return Ar.reject({ code: h.code || 0, message: h.message });
                })
            );
          },
        },
        {
          key: "cancel",
          value: function () {
            var e, n;
            try {
              (e = this._reader) == null || e.cancel(),
                (n = this._controller) == null || n.abort(),
                (this._reader = null),
                (this._controller = null);
            } catch {}
          },
        },
      ]),
      t
    );
  })(),
  _Nt = (function () {
    function t() {
      Wn(this, t);
    }
    var e;
    return (
      Kn(t, [
        {
          key: "parse",
          value:
            ((e = Gi(
              or().mark(function n(r, i) {
                var o,
                  l,
                  u,
                  c,
                  d,
                  h,
                  f,
                  p,
                  g,
                  y,
                  v,
                  b = this;
                return or().wrap(
                  function (w) {
                    for (;;)
                      switch ((w.prev = w.next)) {
                        case 0:
                          return (
                            (f = []),
                            (this._loader = new Rx(
                              $n(
                                $n({ url: r }, i),
                                {},
                                {
                                  onProgress: function (k, D) {
                                    f.push(D),
                                      k > i.probeSize && b._loader.cancel();
                                  },
                                }
                              )
                            )),
                            (w.next = 4),
                            this._loader.request()
                          );
                        case 4:
                          return (
                            (p = new $3t()),
                            (g = p.parse(Vse(f))),
                            (y = p.getSnapshoot(g)),
                            (v = (o = y.video) == null ? void 0 : o.sps),
                            w.abrupt("return", {
                              codec:
                                (l = y.video) == null ? void 0 : l.codecType,
                              codecStr: v == null ? void 0 : v.codec,
                              width: v == null ? void 0 : v.width,
                              height: v == null ? void 0 : v.height,
                              vDration:
                                (u = y == null ? void 0 : y.video) == null
                                  ? void 0
                                  : u.duration,
                              aDuration:
                                (c = y == null ? void 0 : y.audio) == null
                                  ? void 0
                                  : c.duration,
                              sampleRate:
                                (d = y == null ? void 0 : y.audio) == null
                                  ? void 0
                                  : d.sampleRate,
                              channelCount:
                                (h = y == null ? void 0 : y.audio) == null
                                  ? void 0
                                  : h.channelCount,
                              views: g,
                              snap: y,
                            })
                          );
                        case 9:
                        case "end":
                          return w.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function (n, r) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  A8e = { exports: {} };
A8e.exports = (function (t) {
  var e = {};
  function n(r) {
    if (e[r]) return e[r].exports;
    var i = (e[r] = { i: r, l: !1, exports: {} });
    return t[r].call(i.exports, i, i.exports, n), (i.l = !0), i.exports;
  }
  return (
    (n.m = t),
    (n.c = e),
    (n.d = function (r, i, o) {
      n.o(r, i) || ea(r, i, { enumerable: !0, get: o });
    }),
    (n.r = function (r) {
      lu !== void 0 && Nye && ea(r, Nye, { value: "Module" }),
        ea(r, "__esModule", { value: !0 });
    }),
    (n.t = function (r, i) {
      if (
        (1 & i && (r = n(r)),
        8 & i || (4 & i && ti(r) == "object" && r && r.__esModule))
      )
        return r;
      var o = Object.create(null);
      if (
        (n.r(o),
        ea(o, "default", { enumerable: !0, value: r }),
        2 & i && typeof r != "string")
      )
        for (var l in r)
          n.d(
            o,
            l,
            function (u) {
              return r[u];
            }.bind(null, l)
          );
      return o;
    }),
    (n.n = function (r) {
      var i =
        r && r.__esModule
          ? function () {
              return r.default;
            }
          : function () {
              return r;
            };
      return n.d(i, "a", i), i;
    }),
    (n.o = function (r, i) {
      return Object.prototype.hasOwnProperty.call(r, i);
    }),
    (n.p = ""),
    n((n.s = 0))
  );
})([
  function (t, e, n) {
    function r(w, k) {
      var D = Dn(w);
      if (Mc) {
        var $ = Mc(w);
        k &&
          ($ = _r($).call($, function (N) {
            return ih(w, N).enumerable;
          })),
          D.push.apply(D, $);
      }
      return D;
    }
    function i(w) {
      return (i =
        typeof lu == "function" && ti(K9) == "symbol"
          ? function (k) {
              return ti(k);
            }
          : function (k) {
              return k &&
                typeof lu == "function" &&
                k.constructor === lu &&
                k !== lu.prototype
                ? "symbol"
                : ti(k);
            })(w);
    }
    function o(w, k, D) {
      return (
        k in w
          ? ea(w, k, {
              value: D,
              enumerable: !0,
              configurable: !0,
              writable: !0,
            })
          : (w[k] = D),
        w
      );
    }
    n.r(e),
      n.d(e, "m3u8Parser", function () {
        return f;
      }),
      n.d(e, "mpdParser", function () {
        return b;
      });
    var l = /EXT(?:-X-)?([^:]+):?(.*)$/,
      u = /([^,="]+)((="[^"]+")|(=[^,]+))*/g;
    function c(w) {
      var k;
      return ga((k = w.split("-"))).call(
        k,
        function (D, $) {
          return (
            D +
            (D ? $.charAt(0) + jn($).call($, 1).toLowerCase() : $.toLowerCase())
          );
        },
        ""
      );
    }
    function d(w) {
      if (!/^#EXT/.test(w) && /^\s*#/.test(w)) return null;
      var k,
        D,
        $ = l.exec(w);
      return (
        $
          ? ((k = c($[1])),
            (D = (function (N, P) {
              if (!N) return null;
              var I = On((P = N.match(u))).call(P, function (O) {
                return (function (X) {
                  var G = es(X).call(X).replace("=", "|").split("|");
                  if (G.length == 2)
                    return o({}, c(G[0]), G[1].replace(/("|')/g, ""));
                  var H = wl(G[0]);
                  return PI(H) ? G[0] : H;
                })(O);
              });
              return I.length === 1
                ? I[0]
                : _r(I).call(I, function (O) {
                    return i(O) === "object";
                  }).length === 0
                ? I
                : ga(I).call(
                    I,
                    function (O, X) {
                      return (function (G) {
                        for (var H = 1; H < arguments.length; H++) {
                          var E = arguments[H] != null ? arguments[H] : {};
                          H % 2
                            ? r(Object(E), !0).forEach(function (S) {
                                o(G, S, E[S]);
                              })
                            : tE
                            ? SD(G, tE(E))
                            : r(Object(E)).forEach(function (S) {
                                ea(G, S, ih(E, S));
                              });
                        }
                        return G;
                      })({}, O, {}, X);
                    },
                    {}
                  );
            })($[2])))
          : ((k = "url"), (D = w)),
        o({}, k, D)
      );
    }
    function h(w, k) {
      if (/^https?/.test(w) || /^data:/.test(w) || /^sdk:/.test(w)) return w;
      for (
        k = jn((D = k.split("/"))).call(D, 0, -1), w = w.split("/");
        w.length;

      ) {
        var D,
          $ = w.shift();
        qt(k).call(k, $) == -1 && k.push($);
      }
      return k.join("/");
    }
    var f = function (w, k, D) {
        var $, N, P;
        if (!w || !k) return { error: 1, msg: "invalid input" };
        var I,
          O = _r(
            ($ = On(
              (N = _r(
                (P = w.split(`
`))
              ).call(P, Boolean))
            ).call(N, function (X) {
              return d(es(X).call(X));
            }))
          ).call($, Boolean);
        if (!O.length) return { error: 1, msg: "invalid m3u8" };
        I =
          _r(O).call(O, function (X) {
            return !!X.streamInf;
          }).length !== 0
            ? { master: !0, m3u8Url: k, levels: [], medias: [] }
            : {
                master: !1,
                m3u8Url: k,
                duration: 0,
                startSN: 0,
                endSN: 0,
                segments: [],
                live: !0,
              };
        try {
          I = (function (X, G, H) {
            for (
              var E = G.master,
                S = X.length,
                L = 0,
                W = 0,
                F = 0,
                oe = 0,
                De = 0,
                Xe = -1,
                ze = 0;
              ze < S;
              ze++
            ) {
              var ht = X[ze];
              for (var gt in ht) {
                var pt = ht[gt];
                switch ((pt && pt.uri && (pt.url = h(pt.uri, G.m3u8Url)), gt)) {
                  case "inf":
                    var $t = {
                      start: W,
                      end: W + (Array.isArray(pt) ? pt[0] : pt),
                      cc: L,
                      sn: F + oe,
                    };
                    Xe >= 0 && ($t.keyIndex = Xe),
                      oe++,
                      (W = $t.end),
                      G.segments.push($t);
                    break;
                  case "start":
                    W = pt;
                    break;
                  case "discontinuity":
                    L++;
                    break;
                  case "mediaSequence":
                    F = pt;
                    break;
                  case "streamInf":
                    De++, (pt.levelId = De), G.levels.push(pt);
                    break;
                  case "media":
                    G.medias.push(pt);
                    break;
                  case "endlist":
                    G.live = !1;
                    break;
                  case "key":
                    Xe++, G.key ? G.key.push(pt) : (G.key = [pt]);
                    break;
                  case "url":
                    var ot = E ? G.levels : G.segments;
                    if (!ot.length) throw new Error("invalid m3u8");
                    E
                      ? (ot[De - 1].url = h(pt, G.m3u8Url))
                      : (ot[oe - 1].url = h(pt, G.m3u8Url));
                    break;
                  default:
                    pt && (G[gt] = pt);
                }
              }
              H && (G = H(ht, G));
            }
            return (
              E || ((G.startSN = F), (G.endSN = F + oe - 1), (G.duration = W)),
              G
            );
          })(O, I, D);
        } catch (X) {
          return { error: 1, msg: X.message };
        }
        return I;
      },
      p = /\s*(<\/?[^>]+>)/,
      g = /\s*(?:<\/?([^\s>]+))?\s*([^>]+)*(?:\/?>)?/,
      y = /\s*([^=]+)="([^"]+)"/g;
    function v(w, k) {
      for (var D, $, N, P = [], I = w.length, O = 0; O < I; O++)
        if ((D = w[O]).closed)
          if ((($ = P.pop()), D.tagName !== "pureValue")) {
            if (
              ($ && $.tagName === D.tagName
                ? (N = P.pop())
                : ((N = $), ($ = D)),
              !N)
            ) {
              P.push($);
              break;
            }
            var X = $,
              G = X.tagName,
              H = X.attrs,
              E = N.attrs[G];
            k && (H = k(G, H)),
              (N.attrs[G] = E
                ? Array.isArray(E)
                  ? Ce(E).call(E, H)
                  : [E, H]
                : H),
              P.push(N);
          } else
            $.attrs ? ($.attrs.value = D.attrs.value) : ($.attrs = D.attrs),
              P.push($);
        else P.push(D);
      var S,
        L,
        W,
        F = P[0];
      return F
        ? F.tagName != "undefined"
          ? ((S = {}),
            (L = F.tagName),
            (W = F.attrs),
            L in S
              ? ea(S, L, {
                  value: W,
                  enumerable: !0,
                  configurable: !0,
                  writable: !0,
                })
              : (S[L] = W),
            S)
          : F.tagName
        : null;
    }
    var b = function (w, k) {
      if (!w) return { error: 1, msg: "invalid input" };
      try {
        var D, $, N;
        return v(
          _r(
            (D = On(($ = _r((N = w.split(p))).call(N, Boolean))).call(
              $,
              function (P) {
                return (function (I) {
                  var O,
                    X,
                    G = I.match(g),
                    H = {},
                    E = (O = G && G[1])
                      ? ga((X = O.split("_"))).call(
                          X,
                          function (W, F) {
                            return W
                              ? (W +=
                                  F.charAt(0).toUpperCase() + jn(F).call(F, 1))
                              : (W =
                                  F.charAt(0).toLowerCase() + jn(F).call(F, 1));
                          },
                          ""
                        )
                      : "";
                  if (G && G[1] && G[2]) {
                    for (var S, L = {}; (S = y.exec(G[2])) != null; )
                      L[S[1]] = S[2];
                    return E === "?xml"
                      ? null
                      : ((H.tagName = E),
                        (H.attrs = L),
                        (H.closed = /\/$/.test(G[2])),
                        H);
                  }
                  return G
                    ? /^<\//.test(G[0])
                      ? ((H.tagName = E), (H.closed = !0), H)
                      : /^</.test(G[0])
                      ? ((H.tagName = E), (H.attrs = {}), H)
                      : ((H.tagName = "pureValue"),
                        (H.attrs = { value: G[2] }),
                        (H.closed = !0),
                        H)
                    : null;
                })(P);
              }
            ))
          ).call(D, Boolean),
          k
        );
      } catch (P) {
        return { error: 1, msg: P.message };
      }
    };
  },
]);
var TNt = A8e.exports;
function Eve(t) {
  return Nee.apply(this, arguments);
}
function Nee() {
  return (
    (Nee = Gi(
      or().mark(function t(e) {
        var n,
          r,
          i,
          o = arguments;
        return or().wrap(function (l) {
          for (;;)
            switch ((l.prev = l.next)) {
              case 0:
                return (
                  (n = new Rx(
                    $n(
                      $n(
                        { url: e },
                        o.length > 1 && o[1] !== void 0 ? o[1] : {}
                      ),
                      {},
                      { contentType: "TEXT" }
                    )
                  )),
                  (l.next = 4),
                  n.request()
                );
              case 4:
                return (
                  (r = l.sent),
                  (i = TNt.m3u8Parser(r, e, function (u, c) {
                    var d;
                    if (!u.url || !/^\//.test(u.url)) return c;
                    var h = u.url,
                      f = c.segments[c.segments.length - 1];
                    return (
                      (f.url =
                        jn((d = f.url.split("/")))
                          .call(d, 0, 3)
                          .join("/") + h),
                      c
                    );
                  })),
                  l.abrupt("return", i)
                );
              case 7:
              case "end":
                return l.stop();
            }
        }, t);
      })
    )),
    Nee.apply(this, arguments)
  );
}
var r3,
  ENt = (function () {
    function t() {
      Wn(this, t);
    }
    var e;
    return (
      Kn(t, [
        {
          key: "parse",
          value:
            ((e = Gi(
              or().mark(function n(r, i) {
                var o, l, u, c, d, h, f, p, g, y, v, b, w, k, D, $;
                return or().wrap(function (N) {
                  for (;;)
                    switch ((N.prev = N.next)) {
                      case 0:
                        return (N.next = 2), Eve(r, i);
                      case 2:
                        if (!(f = N.sent).master) {
                          N.next = 7;
                          break;
                        }
                        return (N.next = 6), Eve(f.levels[0].url);
                      case 6:
                        f = N.sent;
                      case 7:
                        if (f != null && f.segments.length) {
                          N.next = 9;
                          break;
                        }
                        throw new Error("invalid m3u8");
                      case 9:
                        (p = []),
                          (g = i.nbSegment),
                          (y = 0),
                          (v = or().mark(function P() {
                            var I;
                            return or().wrap(function (O) {
                              for (;;)
                                switch ((O.prev = O.next)) {
                                  case 0:
                                    return (
                                      (I = new Rx(
                                        $n(
                                          $n({ url: f.segments[y].url }, i),
                                          {},
                                          {
                                            onProgress: function (X, G) {
                                              p.push(G),
                                                X > i.probeSize && I.cancel();
                                            },
                                          }
                                        )
                                      )),
                                      (O.next = 3),
                                      I.request()
                                    );
                                  case 3:
                                    g--, y++;
                                  case 5:
                                  case "end":
                                    return O.stop();
                                }
                            }, P);
                          }));
                      case 13:
                        if (!g) {
                          N.next = 17;
                          break;
                        }
                        return N.delegateYield(v(), "t0", 15);
                      case 15:
                        N.next = 13;
                        break;
                      case 17:
                        return (
                          (b = new Uint8Array(Vse(_r(p).call(p, Boolean)))),
                          (w = new N3t()),
                          (k = w.parse(b)),
                          (D = w.getSnapshoot(k)),
                          ($ = (o = D.video) == null ? void 0 : o.sps),
                          N.abrupt("return", {
                            codec: (l = D.video) == null ? void 0 : l.codecType,
                            codecStr: $ == null ? void 0 : $.codec,
                            width: $ == null ? void 0 : $.width,
                            height: $ == null ? void 0 : $.height,
                            vDration:
                              (u = D == null ? void 0 : D.video) == null
                                ? void 0
                                : u.duration,
                            aDuration:
                              (c = D == null ? void 0 : D.audio) == null
                                ? void 0
                                : c.duration,
                            sampleRate:
                              (d = D == null ? void 0 : D.audio) == null
                                ? void 0
                                : d.sampleRate,
                            channelCount:
                              (h = D == null ? void 0 : D.audio) == null
                                ? void 0
                                : h.channelCount,
                            views: k,
                            snap: D,
                          })
                        );
                      case 23:
                      case "end":
                        return N.stop();
                    }
                }, n);
              })
            )),
            function (n, r) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  SNt = (function () {
    function t() {
      Wn(this, t);
    }
    var e;
    return (
      Kn(t, [
        {
          key: "parse",
          value:
            ((e = Gi(
              or().mark(function n(r, i) {
                var o, l, u, c, d, h, f, p, g, y, v, b, w, k, D, $, N, P, I;
                return or().wrap(function (O) {
                  for (;;)
                    switch ((O.prev = O.next)) {
                      case 0:
                        return (
                          (p = new Rx(
                            $n(
                              $n({ url: r }, i),
                              {},
                              {
                                contentType: "ArrayBuffer",
                                headers: { Range: "bytes=0-1499" },
                              }
                            )
                          )),
                          (g = []),
                          (O.next = 4),
                          p.request()
                        );
                      case 4:
                        return (
                          (y = O.sent),
                          (v = new Uint8Array(y)),
                          (b = new Tve().parse(v)),
                          (w = ji(b).call(b, function (X) {
                            return X.type === "mdat";
                          })),
                          (k = ji(b).call(b, function (X) {
                            return X.type === "moov";
                          }))
                            ? (g.push(k.start), g.push(k.start + k.size))
                            : w && g.push(w.start + w.size),
                          (p = new Rx(
                            $n(
                              $n({ url: r }, i),
                              {},
                              {
                                contentType: "ArrayBuffer",
                                headers: {
                                  Range: Ce(
                                    (o = "bytes=".concat(g[0], "-"))
                                  ).call(o, g[1] || ""),
                                },
                              }
                            )
                          )),
                          (O.next = 13),
                          p.request()
                        );
                      case 13:
                        return (
                          (D = O.sent),
                          ($ = new Tve()),
                          (N = $.parse(D)),
                          (P = $.getSnapshoot(N)),
                          (I = (l = P.video) == null ? void 0 : l.sps),
                          O.abrupt("return", {
                            codec: (u = P.video) == null ? void 0 : u.codecType,
                            codecStr: I == null ? void 0 : I.codec,
                            width: I == null ? void 0 : I.width,
                            height: I == null ? void 0 : I.height,
                            vDration:
                              (c = P == null ? void 0 : P.video) == null
                                ? void 0
                                : c.duration,
                            aDuration:
                              (d = P == null ? void 0 : P.audio) == null
                                ? void 0
                                : d.duration,
                            sampleRate:
                              (h = P == null ? void 0 : P.audio) == null
                                ? void 0
                                : h.sampleRate,
                            channelCount:
                              (f = P == null ? void 0 : P.audio) == null
                                ? void 0
                                : f.channelCount,
                            views: $.parseV2(N, !0),
                            snap: P,
                          })
                        );
                      case 19:
                      case "end":
                        return O.stop();
                    }
                }, n);
              })
            )),
            function (n, r) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  RNt = (function () {
    function t() {
      Wn(this, t);
    }
    var e;
    return (
      Kn(t, [
        {
          key: "parseUrl",
          value:
            ((e = Gi(
              or().mark(function n(r) {
                var i,
                  o,
                  l,
                  u,
                  c = arguments;
                return or().wrap(function (d) {
                  for (;;)
                    switch ((d.prev = d.next)) {
                      case 0:
                        if (
                          ((o = Ci(
                            { timeout: 5e3, probeSize: 8e4, nbSegment: 1 },
                            (o = c.length > 1 && c[1] !== void 0 ? c[1] : {})
                          )),
                          !/flv/.test(r))
                        ) {
                          d.next = 9;
                          break;
                        }
                        return (d.next = 5), new _Nt().parse(r, o);
                      case 5:
                        (l = d.sent), (u = PV.FLV), (d.next = 20);
                        break;
                      case 9:
                        if (!/m3u8?/.test(r)) {
                          d.next = 16;
                          break;
                        }
                        return (d.next = 12), new ENt().parse(r, o);
                      case 12:
                        (l = d.sent), (u = PV.TS), (d.next = 20);
                        break;
                      case 16:
                        return (d.next = 18), new SNt().parse(r, o);
                      case 18:
                        (l = d.sent), (u = PV.MP4);
                      case 20:
                        return (
                          (l.exceps = _r((i = yNt(l.views.items, u))).call(
                            i,
                            function (h) {
                              return h.id !== 1;
                            }
                          )),
                          d.abrupt("return", l)
                        );
                      case 22:
                      case "end":
                        return d.stop();
                    }
                }, n);
              })
            )),
            function (n) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  w8e = function (t) {
    var e, n;
    return {
      retryCount: 0,
      disconnectRetryCount:
        (e =
          t == null || (n = t.flv) === null || n === void 0
            ? void 0
            : n.retryCount) !== null && e !== void 0
          ? e
          : void 0,
    };
  },
  Fee = function (t) {
    var e;
    return {
      options: {
        flv: $n(
          $n({}, w8e(t)),
          (e = t == null ? void 0 : t.flv) !== null && e !== void 0 ? e : {}
        ),
      },
      module: Os.PluginFlv,
    };
  },
  ANt = function (t) {
    var e;
    return {
      options: {
        flv: $n(
          $n({ preferMMS: !0 }, w8e(t)),
          (e = t == null ? void 0 : t.flv) !== null && e !== void 0 ? e : {}
        ),
      },
      module: Os.PluginFlv,
    };
  },
  Uee = function (t, e) {
    var n;
    return {
      options: {
        hls: $n(
          {
            retryCount: 0,
            pollRetryCount: 0,
            allowedStreamTrackChange: !1,
            minSegmentsStartPlay: e ? 1 : 3,
          },
          (n = t == null ? void 0 : t.hls) !== null && n !== void 0 ? n : {}
        ),
      },
      module: e ? Os.PluginHlsJs : Os.PluginHls,
    };
  },
  k8e = function () {
    return {
      options: { mediaType: "xg-video", innerDegrade: 1, codecType: Au.H264 },
      module: Os.PluginXgvideo,
      afterLoad: function (t) {
        t.isSupported() &&
          t.setDecodeCapacity({
            preloadDecoder: Au.H264,
            wasmFallbackToAsm: !1,
            reuseWasmDecoder: !1,
            disabledWhenErrorOccur: !1,
          });
      },
    };
  },
  I8e = function () {
    return {
      options: { mediaType: "xg-video", innerDegrade: 1, codecType: Au.H265 },
      module: Os.PluginXgvideo,
      afterLoad: function (t) {
        t.isSupported() &&
          t.setDecodeCapacity({
            preloadDecoder: Au.H265,
            wasmFallbackToAsm: !1,
            reuseWasmDecoder: !1,
          });
      },
    };
  };
function Wse(t) {
  return D8e.apply(this, arguments);
}
function D8e() {
  return (D8e = Gi(
    or().mark(function t(e) {
      return or().wrap(function (n) {
        for (;;)
          switch ((n.prev = n.next)) {
            case 0:
              if (!e.codec) {
                n.next = 2;
                break;
              }
              return n.abrupt("return", e.codec);
            case 2:
              if (e.degradation !== Roe.SoftFirst || !e.url) {
                n.next = 6;
                break;
              }
              return (n.next = 5), wNt(e.url);
            case 5:
              return n.abrupt("return", n.sent);
            case 6:
              return n.abrupt("return", "unknown");
            case 7:
            case "end":
              return n.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
function wNt(t) {
  return P8e.apply(this, arguments);
}
function P8e() {
  return (P8e = Gi(
    or().mark(function t(e) {
      var n, r;
      return or().wrap(
        function (i) {
          for (;;)
            switch ((i.prev = i.next)) {
              case 0:
                return (i.prev = 0), (i.next = 3), new RNt().parseUrl(e);
              case 3:
                if (((n = i.sent), (r = n.codec) !== "bytevc1")) {
                  i.next = 9;
                  break;
                }
                return i.abrupt("return", Au.H265);
              case 9:
                if (r !== "avc") {
                  i.next = 11;
                  break;
                }
                return i.abrupt("return", Au.H264);
              case 11:
                return i.abrupt("return", "unknown");
              case 14:
                return (
                  (i.prev = 14),
                  (i.t0 = i.catch(0)),
                  console.error("detect codec error: ", i.t0),
                  i.abrupt("return", "unknown")
                );
              case 18:
              case "end":
                return i.stop();
            }
        },
        t,
        null,
        [[0, 14]]
      );
    })
  )).apply(this, arguments);
}
function M8e(t, e) {
  return C8e.apply(this, arguments);
}
function C8e() {
  return (C8e = Gi(
    or().mark(function t(e, n) {
      return or().wrap(function (r) {
        for (;;)
          switch ((r.prev = r.next)) {
            case 0:
              if (e.decodeType !== Aoe.Software) {
                r.next = 2;
                break;
              }
              return r.abrupt("return", !0);
            case 2:
              if (n !== "unknown") {
                r.next = 4;
                break;
              }
              return r.abrupt("return", !1);
            case 4:
              return (r.next = 6), Wse(e);
            case 6:
              if (r.sent !== Au.H265) {
                r.next = 12;
                break;
              }
              if (!Na.isHevcSupported()) {
                r.next = 10;
                break;
              }
              return r.abrupt("return", !1);
            case 10:
              if (e.degradation !== Roe.SoftFirst) {
                r.next = 12;
                break;
              }
              return r.abrupt("return", !0);
            case 12:
              return r.abrupt("return", !1);
            case 13:
            case "end":
              return r.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
function $8e(t) {
  return ga(t).call(
    t,
    function (e, n) {
      return Ci(e, n == null ? void 0 : n.options);
    },
    {}
  );
}
var kNt = J9,
  x8e = (function (t) {
    return (
      (t[(t.INVALID_PARAMETER = 210)] = "INVALID_PARAMETER"),
      (t[(t.EMPTY_RTM_FALLBACK_PARAMETER = 211)] =
        "EMPTY_RTM_FALLBACK_PARAMETER"),
      (t[(t.INVALID_LOGGER = 220)] = "INVALID_LOGGER"),
      t
    );
  })(x8e || {}),
  KC = $n($n({}, x8e), Rse),
  INt = $n(
    $n({}, Ase),
    {},
    (bn((r3 = {}), 210, {
      messageTextKey: "INVALID_PARAMETER",
      level: vF.Fatal,
    }),
    bn(r3, 211, {
      messageTextKey: "EMPTY_RTM_FALLBACK_PARAMETER",
      level: vF.Warn,
    }),
    bn(r3, 220, { messageTextKey: "INVALID_LOGGER", level: vF.Warn }),
    r3)
  );
function EF(t, e) {
  return new kNt($n({ errorCode: t }, INt[t]), e);
}
var DNt = "Expected a function",
  Sve = NaN,
  PNt = "[object Symbol]",
  MNt = /^\s+|\s+$/g,
  CNt = /^[-+]0x[0-9a-f]+$/i,
  $Nt = /^0b[01]+$/i,
  xNt = /^0o[0-7]+$/i,
  LNt = _i,
  ONt = ti(Pc) == "object" && Pc && Pc.Object === Object && Pc,
  GNt =
    (typeof self > "u" ? "undefined" : ti(self)) == "object" &&
    self &&
    self.Object === Object &&
    self,
  NNt = ONt || GNt || Function("return this")(),
  FNt = Object.prototype,
  UNt = FNt.toString,
  BNt = Math.max,
  HNt = Math.min,
  CV = function () {
    return NNt.Date.now();
  };
function XNt(t, e, n) {
  var r,
    i,
    o,
    l,
    u,
    c,
    d = 0,
    h = !1,
    f = !1,
    p = !0;
  if (typeof t != "function") throw new TypeError(DNt);
  function g(k) {
    var D = r,
      $ = i;
    return (r = i = void 0), (d = k), (l = t.apply($, D));
  }
  function y(k) {
    var D = k - c;
    return c === void 0 || D >= e || D < 0 || (f && k - d >= o);
  }
  function v() {
    var k = CV();
    if (y(k)) return b(k);
    u = setTimeout(
      v,
      (function (D) {
        var $ = e - (D - c);
        return f ? HNt($, o - (D - d)) : $;
      })(k)
    );
  }
  function b(k) {
    return (u = void 0), p && r ? g(k) : ((r = i = void 0), l);
  }
  function w() {
    var k = CV(),
      D = y(k);
    if (((r = arguments), (i = this), (c = k), D)) {
      if (u === void 0)
        return (function ($) {
          return (d = $), (u = setTimeout(v, e)), h ? g($) : l;
        })(c);
      if (f) return (u = setTimeout(v, e)), g(c);
    }
    return u === void 0 && (u = setTimeout(v, e)), l;
  }
  return (
    (e = Rve(e) || 0),
    Bee(n) &&
      ((h = !!n.leading),
      (o = (f = "maxWait" in n) ? BNt(Rve(n.maxWait) || 0, e) : o),
      (p = "trailing" in n ? !!n.trailing : p)),
    (w.cancel = function () {
      u !== void 0 && clearTimeout(u), (d = 0), (r = c = i = u = void 0);
    }),
    (w.flush = function () {
      return u === void 0 ? l : b(CV());
    }),
    w
  );
}
function Bee(t) {
  var e = ti(t);
  return !!t && (e == "object" || e == "function");
}
function VNt(t) {
  return !!t && ti(t) == "object";
}
function zNt(t) {
  return ti(t) == "symbol" || (VNt(t) && UNt.call(t) == PNt);
}
function Rve(t) {
  if (typeof t == "number") return t;
  if (zNt(t)) return Sve;
  if (Bee(t)) {
    var e = typeof t.valueOf == "function" ? t.valueOf() : t;
    t = Bee(e) ? e + "" : e;
  }
  if (typeof t != "string") return t === 0 ? t : +t;
  t = t.replace(MNt, "");
  var n = $Nt.test(t);
  return n || xNt.test(t)
    ? LNt(jn(t).call(t, 2), n ? 2 : 8)
    : CNt.test(t)
    ? Sve
    : +t;
}
var jNt = XNt,
  WNt = xr(jNt),
  KNt = ur,
  ZNt = gm,
  YNt = fR;
KNt(
  { target: "Object", stat: !0 },
  {
    fromEntries: function (t) {
      var e = {};
      return (
        ZNt(
          t,
          function (n, r) {
            YNt(e, n, r);
          },
          { AS_ENTRIES: !0 }
        ),
        e
      );
    },
  }
);
var QNt = za,
  JNt = QNt.Object.fromEntries,
  qNt = JNt,
  eFt = qNt,
  tFt = eFt,
  nFt = tFt,
  rFt = nFt,
  iFt = rFt,
  aFt = iFt,
  oFt = aFt,
  sFt = xr(oFt),
  lFt = yl,
  uFt = lFt.isFinite,
  cFt =
    Number.isFinite ||
    function (t) {
      return typeof t == "number" && uFt(t);
    },
  dFt = ur,
  hFt = cFt;
dFt({ target: "Number", stat: !0 }, { isFinite: hFt });
var fFt = za,
  pFt = fFt.Number.isFinite,
  gFt = pFt,
  mFt = gFt,
  yFt = mFt,
  vFt = yFt,
  bFt = vFt,
  _Ft = bFt,
  TFt = _Ft,
  EFt = TFt,
  SFt = xr(EFt),
  RFt = ur,
  AFt = HUe,
  wFt = Math.abs;
RFt(
  { target: "Number", stat: !0 },
  {
    isSafeInteger: function (t) {
      return AFt(t) && wFt(t) <= 9007199254740991;
    },
  }
);
var kFt = za,
  IFt = kFt.Number.isSafeInteger,
  DFt = IFt,
  PFt = DFt,
  MFt = PFt,
  CFt = MFt,
  $Ft = CFt,
  xFt = $Ft,
  LFt = xFt,
  OFt = LFt,
  GFt = xr(OFt),
  NFt = ur;
NFt(
  { target: "Number", stat: !0, nonConfigurable: !0, nonWritable: !0 },
  { MAX_SAFE_INTEGER: 9007199254740991 }
);
var FFt = 9007199254740991,
  UFt = FFt,
  BFt = UFt,
  HFt = BFt,
  XFt = HFt,
  VFt = XFt,
  zFt = VFt,
  jFt = zFt,
  WFt = jFt,
  Ax = xr(WFt),
  KFt = ur;
KFt(
  { target: "Number", stat: !0, nonConfigurable: !0, nonWritable: !0 },
  { EPSILON: Math.pow(2, -52) }
);
var ZFt = Math.pow(2, -52),
  YFt = ZFt,
  QFt = YFt,
  JFt = QFt,
  qFt = JFt,
  e6t = qFt,
  t6t = e6t,
  n6t = t6t,
  r6t = n6t,
  i6t = xr(r6t),
  a6t = g6e,
  o6t = v6e;
a6t(
  "Set",
  function (t) {
    return function () {
      return t(this, arguments.length ? arguments[0] : void 0);
    };
  },
  o6t
);
var s6t = za,
  l6t = s6t.Set,
  u6t = l6t,
  c6t = u6t,
  d6t = bE,
  ah = function (t) {
    if (
      typeof t == "object" &&
      "size" in t &&
      "has" in t &&
      "add" in t &&
      "delete" in t &&
      "keys" in t
    )
      return t;
    throw TypeError(d6t(t) + " is not a set");
  },
  h6t = $c,
  $V = T6e,
  L8e = h6t("Set"),
  f6t = L8e.prototype,
  O0 = {
    Set: L8e,
    add: $V("add", 1),
    has: $V("has", 1),
    remove: $V("delete", 1),
    proto: f6t,
  },
  p6t = SE,
  vm = function (t, e, n) {
    return n ? p6t(t.keys(), e) : t.forEach(e);
  },
  O8e = O0,
  g6t = vm,
  m6t = O8e.Set,
  y6t = O8e.add,
  Kse = function (t) {
    var e = new m6t();
    return (
      g6t(t, function (n) {
        y6t(e, n);
      }),
      e
    );
  },
  n5 = function (t) {
    return t.size;
  },
  Ave = ku,
  G8e = xc,
  wve = ts,
  v6t = hR,
  b6t = TypeError,
  _6t = Math.max,
  N8e = function (t, e, n, r) {
    (this.set = t), (this.size = e), (this.has = n), (this.keys = r);
  };
N8e.prototype = {
  getIterator: function () {
    return G8e(wve(this.keys, this.set));
  },
  includes: function (t) {
    return wve(this.has, this.set, t);
  },
};
var vR = function (t) {
    G8e(t);
    var e = +t.size;
    if (e != e) throw b6t("Invalid size");
    return new N8e(t, _6t(v6t(e), 0), Ave(t.has), Ave(t.keys));
  },
  T6t = ah,
  F8e = O0,
  E6t = Kse,
  S6t = n5,
  R6t = vR,
  A6t = vm,
  w6t = SE,
  k6t = F8e.has,
  kve = F8e.remove,
  U8e = function (t) {
    var e = T6t(this),
      n = R6t(t),
      r = E6t(e);
    return (
      S6t(e) <= n.size
        ? A6t(e, function (i) {
            n.includes(i) && kve(r, i);
          })
        : w6t(n.getIterator(), function (i) {
            k6t(e, i) && kve(r, i);
          }),
      r
    );
  },
  bR = function () {
    return !1;
  },
  I6t = ur,
  D6t = U8e,
  P6t = bR;
I6t(
  { target: "Set", proto: !0, real: !0, forced: !P6t() },
  { difference: D6t }
);
var M6t = ah,
  Zse = O0,
  C6t = n5,
  $6t = vR,
  x6t = vm,
  L6t = SE,
  O6t = Zse.Set,
  Ive = Zse.add,
  G6t = Zse.has,
  B8e = function (t) {
    var e = M6t(this),
      n = $6t(t),
      r = new O6t();
    return (
      C6t(e) > n.size
        ? L6t(n.getIterator(), function (i) {
            G6t(e, i) && Ive(r, i);
          })
        : x6t(e, function (i) {
            n.includes(i) && Ive(r, i);
          }),
      r
    );
  },
  N6t = ur,
  F6t = B8e,
  U6t = bR,
  B6t = !U6t();
N6t({ target: "Set", proto: !0, real: !0, forced: B6t }, { intersection: F6t });
var H6t = ah,
  X6t = O0.has,
  V6t = n5,
  z6t = vR,
  j6t = vm,
  W6t = SE,
  K6t = X9,
  H8e = function (t) {
    var e = H6t(this),
      n = z6t(t);
    if (V6t(e) <= n.size)
      return (
        j6t(
          e,
          function (i) {
            if (n.includes(i)) return !1;
          },
          !0
        ) !== !1
      );
    var r = n.getIterator();
    return (
      W6t(r, function (i) {
        if (X6t(e, i)) return K6t(r, "normal", !1);
      }) !== !1
    );
  },
  Z6t = ur,
  Y6t = H8e,
  Q6t = bR;
Z6t(
  { target: "Set", proto: !0, real: !0, forced: !Q6t() },
  { isDisjointFrom: Y6t }
);
var J6t = ah,
  q6t = n5,
  eUt = vm,
  tUt = vR,
  X8e = function (t) {
    var e = J6t(this),
      n = tUt(t);
    return (
      !(q6t(e) > n.size) &&
      eUt(
        e,
        function (r) {
          if (!n.includes(r)) return !1;
        },
        !0
      ) !== !1
    );
  },
  nUt = ur,
  rUt = X8e,
  iUt = bR;
nUt(
  { target: "Set", proto: !0, real: !0, forced: !iUt() },
  { isSubsetOf: rUt }
);
var aUt = ah,
  oUt = O0.has,
  sUt = n5,
  lUt = vR,
  uUt = SE,
  cUt = X9,
  V8e = function (t) {
    var e = aUt(this),
      n = lUt(t);
    if (sUt(e) < n.size) return !1;
    var r = n.getIterator();
    return (
      uUt(r, function (i) {
        if (!oUt(e, i)) return cUt(r, "normal", !1);
      }) !== !1
    );
  },
  dUt = ur,
  hUt = V8e,
  fUt = bR;
dUt(
  { target: "Set", proto: !0, real: !0, forced: !fUt() },
  { isSupersetOf: hUt }
);
var pUt = ah,
  Yse = O0,
  gUt = Kse,
  mUt = vR,
  yUt = SE,
  vUt = Yse.add,
  bUt = Yse.has,
  _Ut = Yse.remove,
  z8e = function (t) {
    var e = pUt(this),
      n = mUt(t).getIterator(),
      r = gUt(e);
    return (
      yUt(n, function (i) {
        bUt(e, i) ? _Ut(r, i) : vUt(r, i);
      }),
      r
    );
  },
  TUt = ur,
  EUt = z8e,
  SUt = bR;
TUt(
  { target: "Set", proto: !0, real: !0, forced: !SUt() },
  { symmetricDifference: EUt }
);
var RUt = ah,
  AUt = O0.add,
  wUt = Kse,
  kUt = vR,
  IUt = SE,
  j8e = function (t) {
    var e = RUt(this),
      n = kUt(t).getIterator(),
      r = wUt(e);
    return (
      IUt(n, function (i) {
        AUt(r, i);
      }),
      r
    );
  },
  DUt = ur,
  PUt = j8e,
  MUt = bR;
DUt({ target: "Set", proto: !0, real: !0, forced: !MUt() }, { union: PUt });
var CUt = c6t,
  $Ut = CUt,
  xUt = ur,
  LUt = b6e;
xUt({ target: "Set", stat: !0, forced: !0 }, { from: LUt });
var OUt = ur,
  GUt = _6e;
OUt({ target: "Set", stat: !0, forced: !0 }, { of: GUt });
var NUt = ur,
  FUt = ah,
  UUt = O0.add;
NUt(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    addAll: function () {
      for (var t = FUt(this), e = 0, n = arguments.length; e < n; e++)
        UUt(t, arguments[e]);
      return t;
    },
  }
);
var BUt = ur,
  HUt = ah,
  XUt = O0.remove;
BUt(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    deleteAll: function () {
      for (
        var t, e = HUt(this), n = !0, r = 0, i = arguments.length;
        r < i;
        r++
      )
        (t = XUt(e, arguments[r])), (n = n && t);
      return !!n;
    },
  }
);
var VUt = ur,
  zUt = Iu,
  jUt = ah,
  WUt = vm;
VUt(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    every: function (t) {
      var e = jUt(this),
        n = zUt(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        WUt(
          e,
          function (r) {
            if (!n(r, r, e)) return !1;
          },
          !0
        ) !== !1
      );
    },
  }
);
var KUt = L0,
  ZUt = kl,
  YUt = cR,
  QUt = nl,
  JUt = mR,
  qUt = QUt("iterator"),
  e8t = Object,
  t8t = function (t) {
    if (YUt(t)) return !1;
    var e = e8t(t);
    return e[qUt] !== void 0 || "@@iterator" in e || ZUt(JUt, KUt(e));
  },
  n8t = $c,
  Dve = vl,
  r8t = t8t,
  i8t = Bl,
  a8t = n8t("Set"),
  o8t = function (t) {
    return i8t(t) && typeof t.size == "number" && Dve(t.has) && Dve(t.keys);
  },
  _R = function (t) {
    return o8t(t) ? t : r8t(t) ? new a8t(t) : t;
  },
  s8t = ur,
  l8t = ts,
  u8t = _R,
  c8t = U8e;
s8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    difference: function (t) {
      return l8t(c8t, this, u8t(t));
    },
  }
);
var d8t = ur,
  h8t = Iu,
  f8t = ah,
  W8e = O0,
  p8t = vm,
  g8t = W8e.Set,
  m8t = W8e.add;
d8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    filter: function (t) {
      var e = f8t(this),
        n = h8t(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new g8t();
      return (
        p8t(e, function (i) {
          n(i, i, e) && m8t(r, i);
        }),
        r
      );
    },
  }
);
var y8t = ur,
  v8t = Iu,
  b8t = ah,
  _8t = vm;
y8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    find: function (t) {
      var e = b8t(this),
        n = v8t(t, arguments.length > 1 ? arguments[1] : void 0),
        r = _8t(
          e,
          function (i) {
            if (n(i, i, e)) return { value: i };
          },
          !0
        );
      return r && r.value;
    },
  }
);
var T8t = ur,
  E8t = ts,
  S8t = _R,
  R8t = B8e;
T8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    intersection: function (t) {
      return E8t(R8t, this, S8t(t));
    },
  }
);
var A8t = ur,
  w8t = ts,
  k8t = _R,
  I8t = H8e;
A8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    isDisjointFrom: function (t) {
      return w8t(I8t, this, k8t(t));
    },
  }
);
var D8t = ur,
  P8t = ts,
  M8t = _R,
  C8t = X8e;
D8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    isSubsetOf: function (t) {
      return P8t(C8t, this, M8t(t));
    },
  }
);
var $8t = ur,
  x8t = ts,
  L8t = _R,
  O8t = V8e;
$8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    isSupersetOf: function (t) {
      return x8t(O8t, this, L8t(t));
    },
  }
);
var G8t = ur,
  K8e = Bo,
  N8t = ah,
  F8t = vm,
  U8t = td,
  B8t = K8e([].join),
  H8t = K8e([].push);
G8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    join: function (t) {
      var e = N8t(this),
        n = t === void 0 ? "," : U8t(t),
        r = [];
      return (
        F8t(e, function (i) {
          H8t(r, i);
        }),
        B8t(r, n)
      );
    },
  }
);
var X8t = ur,
  V8t = Iu,
  z8t = ah,
  Z8e = O0,
  j8t = vm,
  W8t = Z8e.Set,
  K8t = Z8e.add;
X8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    map: function (t) {
      var e = z8t(this),
        n = V8t(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new W8t();
      return (
        j8t(e, function (i) {
          K8t(r, n(i, i, e));
        }),
        r
      );
    },
  }
);
var Z8t = ur,
  Y8t = ku,
  Q8t = ah,
  J8t = vm,
  q8t = TypeError;
Z8t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    reduce: function (t) {
      var e = Q8t(this),
        n = arguments.length < 2,
        r = n ? void 0 : arguments[1];
      if (
        (Y8t(t),
        J8t(e, function (i) {
          n ? ((n = !1), (r = i)) : (r = t(r, i, i, e));
        }),
        n)
      )
        throw q8t("Reduce of empty set with no initial value");
      return r;
    },
  }
);
var e9t = ur,
  t9t = Iu,
  n9t = ah,
  r9t = vm;
e9t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    some: function (t) {
      var e = n9t(this),
        n = t9t(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        r9t(
          e,
          function (r) {
            if (n(r, r, e)) return !0;
          },
          !0
        ) === !0
      );
    },
  }
);
var i9t = ur,
  a9t = ts,
  o9t = _R,
  s9t = z8e;
i9t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    symmetricDifference: function (t) {
      return a9t(s9t, this, o9t(t));
    },
  }
);
var l9t = ur,
  u9t = ts,
  c9t = _R,
  d9t = j8e;
l9t(
  { target: "Set", proto: !0, real: !0, forced: !0 },
  {
    union: function (t) {
      return u9t(d9t, this, c9t(t));
    },
  }
);
var eM,
  h9t = $Ut,
  f9t = h9t,
  p9t = f9t,
  g9t = p9t,
  XS = xr(g9t),
  m9t = Il,
  y9t = m9t("Array").values,
  v9t = y9t,
  b9t = v9t,
  _9t = L0,
  T9t = kl,
  E9t = Es,
  S9t = b9t,
  xV = Array.prototype,
  R9t = { DOMTokenList: !0, NodeList: !0 },
  A9t = function (t) {
    var e = t.values;
    return t === xV || (E9t(xV, t) && e === xV.values) || T9t(R9t, _9t(t))
      ? S9t
      : e;
  },
  w9t = A9t,
  k9t = w9t,
  I9t = k9t,
  D9t = I9t,
  P9t = D9t,
  M9t = P9t,
  pS = xr(M9t),
  _a =
    SFt ||
    function (t) {
      return typeof t == "number" && isFinite(t);
    },
  C9t =
    GFt ||
    function (t) {
      return typeof t == "number" && Math.abs(t) <= $9t;
    },
  $9t = Ax || 9007199254740991,
  no = (function (t) {
    return (
      (t.NETWORK_ERROR = "networkError"),
      (t.MEDIA_ERROR = "mediaError"),
      (t.KEY_SYSTEM_ERROR = "keySystemError"),
      (t.MUX_ERROR = "muxError"),
      (t.OTHER_ERROR = "otherError"),
      t
    );
  })({}),
  kr = (function (t) {
    return (
      (t.KEY_SYSTEM_NO_KEYS = "keySystemNoKeys"),
      (t.KEY_SYSTEM_NO_ACCESS = "keySystemNoAccess"),
      (t.KEY_SYSTEM_NO_SESSION = "keySystemNoSession"),
      (t.KEY_SYSTEM_NO_CONFIGURED_LICENSE = "keySystemNoConfiguredLicense"),
      (t.KEY_SYSTEM_LICENSE_REQUEST_FAILED = "keySystemLicenseRequestFailed"),
      (t.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED =
        "keySystemServerCertificateRequestFailed"),
      (t.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED =
        "keySystemServerCertificateUpdateFailed"),
      (t.KEY_SYSTEM_SESSION_UPDATE_FAILED = "keySystemSessionUpdateFailed"),
      (t.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED =
        "keySystemStatusOutputRestricted"),
      (t.KEY_SYSTEM_STATUS_INTERNAL_ERROR = "keySystemStatusInternalError"),
      (t.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR =
        "keySystemDestroyMediaKeysError"),
      (t.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR =
        "keySystemDestroyCloseSessionError"),
      (t.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR =
        "keySystemDestroyRemoveSessionError"),
      (t.MANIFEST_LOAD_ERROR = "manifestLoadError"),
      (t.MANIFEST_LOAD_TIMEOUT = "manifestLoadTimeOut"),
      (t.MANIFEST_PARSING_ERROR = "manifestParsingError"),
      (t.MANIFEST_INCOMPATIBLE_CODECS_ERROR =
        "manifestIncompatibleCodecsError"),
      (t.LEVEL_EMPTY_ERROR = "levelEmptyError"),
      (t.LEVEL_LOAD_ERROR = "levelLoadError"),
      (t.LEVEL_LOAD_TIMEOUT = "levelLoadTimeOut"),
      (t.LEVEL_PARSING_ERROR = "levelParsingError"),
      (t.LEVEL_SWITCH_ERROR = "levelSwitchError"),
      (t.AUDIO_TRACK_LOAD_ERROR = "audioTrackLoadError"),
      (t.AUDIO_TRACK_LOAD_TIMEOUT = "audioTrackLoadTimeOut"),
      (t.SUBTITLE_LOAD_ERROR = "subtitleTrackLoadError"),
      (t.SUBTITLE_TRACK_LOAD_TIMEOUT = "subtitleTrackLoadTimeOut"),
      (t.FRAG_LOAD_ERROR = "fragLoadError"),
      (t.FRAG_LOAD_TIMEOUT = "fragLoadTimeOut"),
      (t.FRAG_DECRYPT_ERROR = "fragDecryptError"),
      (t.FRAG_PARSING_ERROR = "fragParsingError"),
      (t.FRAG_GAP = "fragGap"),
      (t.REMUX_ALLOC_ERROR = "remuxAllocError"),
      (t.KEY_LOAD_ERROR = "keyLoadError"),
      (t.KEY_LOAD_TIMEOUT = "keyLoadTimeOut"),
      (t.BUFFER_ADD_CODEC_ERROR = "bufferAddCodecError"),
      (t.BUFFER_INCOMPATIBLE_CODECS_ERROR = "bufferIncompatibleCodecsError"),
      (t.BUFFER_APPEND_ERROR = "bufferAppendError"),
      (t.BUFFER_APPENDING_ERROR = "bufferAppendingError"),
      (t.BUFFER_STALLED_ERROR = "bufferStalledError"),
      (t.BUFFER_FULL_ERROR = "bufferFullError"),
      (t.BUFFER_SEEK_OVER_HOLE = "bufferSeekOverHole"),
      (t.BUFFER_NUDGE_ON_STALL = "bufferNudgeOnStall"),
      (t.ASSET_LIST_LOAD_ERROR = "assetListLoadError"),
      (t.ASSET_LIST_LOAD_TIMEOUT = "assetListLoadTimeout"),
      (t.ASSET_LIST_PARSING_ERROR = "assetListParsingError"),
      (t.INTERSTITIAL_ASSET_ITEM_ERROR = "interstitialAssetItemError"),
      (t.INTERNAL_EXCEPTION = "internalException"),
      (t.INTERNAL_ABORTED = "aborted"),
      (t.ATTACH_MEDIA_ERROR = "attachMediaError"),
      (t.UNKNOWN = "unknown"),
      t
    );
  })({}),
  _t = (function (t) {
    return (
      (t.MEDIA_ATTACHING = "hlsMediaAttaching"),
      (t.MEDIA_ATTACHED = "hlsMediaAttached"),
      (t.MEDIA_DETACHING = "hlsMediaDetaching"),
      (t.MEDIA_DETACHED = "hlsMediaDetached"),
      (t.MEDIA_ENDED = "hlsMediaEnded"),
      (t.BUFFER_RESET = "hlsBufferReset"),
      (t.BUFFER_CODECS = "hlsBufferCodecs"),
      (t.BUFFER_CREATED = "hlsBufferCreated"),
      (t.BUFFER_APPENDING = "hlsBufferAppending"),
      (t.BUFFER_APPENDED = "hlsBufferAppended"),
      (t.BUFFER_EOS = "hlsBufferEos"),
      (t.BUFFERED_TO_END = "hlsBufferedToEnd"),
      (t.BUFFER_FLUSHING = "hlsBufferFlushing"),
      (t.BUFFER_FLUSHED = "hlsBufferFlushed"),
      (t.MANIFEST_LOADING = "hlsManifestLoading"),
      (t.MANIFEST_LOADED = "hlsManifestLoaded"),
      (t.MANIFEST_PARSED = "hlsManifestParsed"),
      (t.LEVEL_SWITCHING = "hlsLevelSwitching"),
      (t.LEVEL_SWITCHED = "hlsLevelSwitched"),
      (t.LEVEL_LOADING = "hlsLevelLoading"),
      (t.LEVEL_LOADED = "hlsLevelLoaded"),
      (t.LEVEL_UPDATED = "hlsLevelUpdated"),
      (t.LEVEL_PTS_UPDATED = "hlsLevelPtsUpdated"),
      (t.LEVELS_UPDATED = "hlsLevelsUpdated"),
      (t.AUDIO_TRACKS_UPDATED = "hlsAudioTracksUpdated"),
      (t.AUDIO_TRACK_SWITCHING = "hlsAudioTrackSwitching"),
      (t.AUDIO_TRACK_SWITCHED = "hlsAudioTrackSwitched"),
      (t.AUDIO_TRACK_LOADING = "hlsAudioTrackLoading"),
      (t.AUDIO_TRACK_LOADED = "hlsAudioTrackLoaded"),
      (t.AUDIO_TRACK_UPDATED = "hlsAudioTrackUpdated"),
      (t.SUBTITLE_TRACKS_UPDATED = "hlsSubtitleTracksUpdated"),
      (t.SUBTITLE_TRACKS_CLEARED = "hlsSubtitleTracksCleared"),
      (t.SUBTITLE_TRACK_SWITCH = "hlsSubtitleTrackSwitch"),
      (t.SUBTITLE_TRACK_LOADING = "hlsSubtitleTrackLoading"),
      (t.SUBTITLE_TRACK_LOADED = "hlsSubtitleTrackLoaded"),
      (t.SUBTITLE_TRACK_UPDATED = "hlsSubtitleTrackUpdated"),
      (t.SUBTITLE_FRAG_PROCESSED = "hlsSubtitleFragProcessed"),
      (t.CUES_PARSED = "hlsCuesParsed"),
      (t.NON_NATIVE_TEXT_TRACKS_FOUND = "hlsNonNativeTextTracksFound"),
      (t.INIT_PTS_FOUND = "hlsInitPtsFound"),
      (t.FRAG_LOADING = "hlsFragLoading"),
      (t.FRAG_LOAD_EMERGENCY_ABORTED = "hlsFragLoadEmergencyAborted"),
      (t.FRAG_LOADED = "hlsFragLoaded"),
      (t.FRAG_DECRYPTED = "hlsFragDecrypted"),
      (t.FRAG_PARSING_INIT_SEGMENT = "hlsFragParsingInitSegment"),
      (t.FRAG_PARSING_USERDATA = "hlsFragParsingUserdata"),
      (t.FRAG_PARSING_METADATA = "hlsFragParsingMetadata"),
      (t.FRAG_PARSED = "hlsFragParsed"),
      (t.FRAG_BUFFERED = "hlsFragBuffered"),
      (t.FRAG_CHANGED = "hlsFragChanged"),
      (t.FPS_DROP = "hlsFpsDrop"),
      (t.FPS_DROP_LEVEL_CAPPING = "hlsFpsDropLevelCapping"),
      (t.MAX_AUTO_LEVEL_UPDATED = "hlsMaxAutoLevelUpdated"),
      (t.ERROR = "hlsError"),
      (t.DESTROYING = "hlsDestroying"),
      (t.KEY_LOADING = "hlsKeyLoading"),
      (t.KEY_LOADED = "hlsKeyLoaded"),
      (t.LIVE_BACK_BUFFER_REACHED = "hlsLiveBackBufferReached"),
      (t.BACK_BUFFER_REACHED = "hlsBackBufferReached"),
      (t.STEERING_MANIFEST_LOADED = "hlsSteeringManifestLoaded"),
      (t.ASSET_LIST_LOADING = "hlsAssetListLoading"),
      (t.ASSET_LIST_LOADED = "hlsAssetListLoaded"),
      (t.INTERSTITIALS_UPDATED = "hlsInterstitialsUpdated"),
      (t.INTERSTITIALS_BUFFERED_TO_BOUNDARY =
        "hlsInterstitialsBufferedToBoundary"),
      (t.INTERSTITIAL_ASSET_PLAYER_CREATED =
        "hlsInterstitialAssetPlayerCreated"),
      (t.INTERSTITIAL_STARTED = "hlsInterstitialStarted"),
      (t.INTERSTITIAL_ASSET_STARTED = "hlsInterstitialAssetStarted"),
      (t.INTERSTITIAL_ASSET_ENDED = "hlsInterstitialAssetEnded"),
      (t.INTERSTITIAL_ASSET_ERROR = "hlsInterstitialAssetError"),
      (t.INTERSTITIAL_ENDED = "hlsInterstitialEnded"),
      (t.INTERSTITIALS_PRIMARY_RESUMED = "hlsInterstitialsPrimaryResumed"),
      (t.PLAYOUT_LIMIT_REACHED = "hlsPlayoutLimitReached"),
      (t.EVENT_CUE_ENTER = "hlsEventCueEnter"),
      t
    );
  })({}),
  F1 = {
    MANIFEST: "manifest",
    LEVEL: "level",
    AUDIO_TRACK: "audioTrack",
    SUBTITLE_TRACK: "subtitleTrack",
  },
  wo = { MAIN: "main", AUDIO: "audio", SUBTITLE: "subtitle" },
  LA = (function () {
    function t(e) {
      var n =
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
        r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
      Wn(this, t),
        (this.halfLife = void 0),
        (this.alpha_ = void 0),
        (this.estimate_ = void 0),
        (this.totalWeight_ = void 0),
        (this.halfLife = e),
        (this.alpha_ = e ? Math.exp(Math.log(0.5) / e) : 0),
        (this.estimate_ = n),
        (this.totalWeight_ = r);
    }
    return (
      Kn(t, [
        {
          key: "sample",
          value: function (e, n) {
            var r = Math.pow(this.alpha_, e);
            (this.estimate_ = n * (1 - r) + r * this.estimate_),
              (this.totalWeight_ += e);
          },
        },
        {
          key: "getTotalWeight",
          value: function () {
            return this.totalWeight_;
          },
        },
        {
          key: "getEstimate",
          value: function () {
            if (this.alpha_) {
              var e = 1 - Math.pow(this.alpha_, this.totalWeight_);
              if (e) return this.estimate_ / e;
            }
            return this.estimate_;
          },
        },
      ]),
      t
    );
  })(),
  x9t = (function () {
    function t(e, n, r) {
      var i =
        arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 100;
      Wn(this, t),
        (this.defaultEstimate_ = void 0),
        (this.minWeight_ = void 0),
        (this.minDelayMs_ = void 0),
        (this.slow_ = void 0),
        (this.fast_ = void 0),
        (this.defaultTTFB_ = void 0),
        (this.ttfb_ = void 0),
        (this.defaultEstimate_ = r),
        (this.minWeight_ = 0.001),
        (this.minDelayMs_ = 50),
        (this.slow_ = new LA(e)),
        (this.fast_ = new LA(n)),
        (this.defaultTTFB_ = i),
        (this.ttfb_ = new LA(e));
    }
    return (
      Kn(t, [
        {
          key: "update",
          value: function (e, n) {
            var r = this.slow_,
              i = this.fast_,
              o = this.ttfb_;
            r.halfLife !== e &&
              (this.slow_ = new LA(e, r.getEstimate(), r.getTotalWeight())),
              i.halfLife !== n &&
                (this.fast_ = new LA(n, i.getEstimate(), i.getTotalWeight())),
              o.halfLife !== e &&
                (this.ttfb_ = new LA(e, o.getEstimate(), o.getTotalWeight()));
          },
        },
        {
          key: "sample",
          value: function (e, n) {
            var r = (e = Math.max(e, this.minDelayMs_)) / 1e3,
              i = (8 * n) / r;
            this.fast_.sample(r, i), this.slow_.sample(r, i);
          },
        },
        {
          key: "sampleTTFB",
          value: function (e) {
            var n = e / 1e3,
              r = Math.sqrt(2) * Math.exp(-Math.pow(n, 2) / 2);
            this.ttfb_.sample(r, Math.max(e, 5));
          },
        },
        {
          key: "canEstimate",
          value: function () {
            return this.fast_.getTotalWeight() >= this.minWeight_;
          },
        },
        {
          key: "getEstimate",
          value: function () {
            return this.canEstimate()
              ? Math.min(this.fast_.getEstimate(), this.slow_.getEstimate())
              : this.defaultEstimate_;
          },
        },
        {
          key: "getEstimateTTFB",
          value: function () {
            return this.ttfb_.getTotalWeight() >= this.minWeight_
              ? this.ttfb_.getEstimate()
              : this.defaultTTFB_;
          },
        },
        {
          key: "defaultEstimate",
          get: function () {
            return this.defaultEstimate_;
          },
        },
        { key: "destroy", value: function () {} },
      ]),
      t
    );
  })();
function L9t(t, e, n) {
  return (
    (e = G9t(e)) in t
      ? ea(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 })
      : (t[e] = n),
    t
  );
}
function cu() {
  return (
    (cu = Ci
      ? Ci.bind()
      : function (t) {
          for (var e = 1; e < arguments.length; e++) {
            var n = arguments[e];
            for (var r in n) ({}.hasOwnProperty.call(n, r) && (t[r] = n[r]));
          }
          return t;
        }),
    cu.apply(null, arguments)
  );
}
function Pve(t, e) {
  var n = Dn(t);
  if (Mc) {
    var r = Mc(t);
    e &&
      (r = _r(r).call(r, function (i) {
        return ih(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function fl(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? Pve(Object(n), !0).forEach(function (r) {
          L9t(t, r, n[r]);
        })
      : tE
      ? SD(t, tE(n))
      : Pve(Object(n)).forEach(function (r) {
          ea(t, r, ih(n, r));
        });
  }
  return t;
}
function O9t(t, e) {
  if (ti(t) != "object" || !t) return t;
  var n = t[U6e];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (ti(r) != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function G9t(t) {
  var e = O9t(t, "string");
  return ti(e) == "symbol" ? e : e + "";
}
var gb = Kn(function t(e, n) {
    Wn(this, 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);
    var r = "[".concat(e, "]:");
    (this.trace = W2),
      (this.debug = n.debug.bind(null, r)),
      (this.log = n.log.bind(null, r)),
      (this.warn = n.warn.bind(null, r)),
      (this.info = n.info.bind(null, r)),
      (this.error = n.error.bind(null, r));
  }),
  W2 = function () {},
  N9t = { trace: W2, debug: W2, log: W2, warn: W2, info: W2, error: W2 };
function F9t() {
  return cu({}, N9t);
}
var U9t = F9t(),
  Is = U9t;
function wx() {
  if (typeof self < "u")
    return (
      ((!(arguments.length > 0 && arguments[0] !== void 0) ||
        arguments[0] ||
        !self.MediaSource) &&
        self.ManagedMediaSource) ||
      self.MediaSource ||
      self.WebKitMediaSource
    );
}
function B9t(t) {
  return typeof self < "u" && t === self.ManagedMediaSource;
}
function Y8e(t, e) {
  var n = Dn(t),
    r = Dn(e),
    i = n.length,
    o = r.length;
  return (
    !i ||
    !o ||
    (i === o &&
      !n.some(function (l) {
        return qt(r).call(r, l) === -1;
      }))
  );
}
var Mve = {
  audio: {
    a3ds: 1,
    "ac-3": 0.95,
    "ac-4": 1,
    alac: 0.9,
    alaw: 1,
    dra1: 1,
    "dts+": 1,
    "dts-": 1,
    dtsc: 1,
    dtse: 1,
    dtsh: 1,
    "ec-3": 0.9,
    enca: 1,
    fLaC: 0.9,
    flac: 0.9,
    FLAC: 0.9,
    g719: 1,
    g726: 1,
    m4ae: 1,
    mha1: 1,
    mha2: 1,
    mhm1: 1,
    mhm2: 1,
    mlpa: 1,
    mp4a: 1,
    "raw ": 1,
    Opus: 1,
    opus: 1,
    samr: 1,
    sawb: 1,
    sawp: 1,
    sevc: 1,
    sqcp: 1,
    ssmv: 1,
    twos: 1,
    ulaw: 1,
  },
  video: {
    avc1: 1,
    avc2: 1,
    avc3: 1,
    avc4: 1,
    avcp: 1,
    av01: 0.8,
    drac: 1,
    dva1: 1,
    dvav: 1,
    dvh1: 0.7,
    dvhe: 0.7,
    encv: 1,
    hev1: 0.75,
    hvc1: 0.75,
    mjp2: 1,
    mp4v: 1,
    mvc1: 1,
    mvc2: 1,
    mvc3: 1,
    mvc4: 1,
    resv: 1,
    rv60: 1,
    s263: 1,
    svc1: 1,
    svc2: 1,
    "vc-1": 1,
    vp08: 1,
    vp09: 0.9,
  },
  text: { stpp: 1, wvtt: 1 },
};
function H9t(t, e) {
  var n,
    r = wx(!(arguments.length > 2 && arguments[2] !== void 0) || arguments[2]);
  return (n = r == null ? void 0 : r.isTypeSupported(Hee(t, e))) != null && n;
}
function Hee(t, e) {
  var n;
  return Ce((n = "".concat(e, "/mp4;codecs="))).call(n, t);
}
function Cve(t) {
  var e;
  return ga((e = t.split(","))).call(
    e,
    function (n, r) {
      var i = Mve.video[r];
      return i ? (2 * i + n) / (n ? 3 : 2) : (Mve.audio[r] + n) / (n ? 2 : 1);
    },
    0
  );
}
var LV = {};
function X9t(t) {
  var e = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
  if (LV[t]) return LV[t];
  for (
    var n = {
        flac: ["flac", "fLaC", "FLAC"],
        opus: ["opus", "Opus"],
        "mp4a.40.34": ["mp3"],
      }[t],
      r = 0;
    r < n.length;
    r++
  ) {
    var i;
    if (H9t(n[r], "audio", e)) return (LV[t] = n[r]), n[r];
    if (
      n[r] === "mp3" &&
      (i = wx(e)) != null &&
      i.isTypeSupported("audio/mpeg")
    )
      return "";
  }
  return t;
}
var V9t = /flac|opus|mp4a\.40\.34/i;
function Xee(t) {
  var e = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
  return t.replace(V9t, function (n) {
    return X9t(n.toLowerCase(), e);
  });
}
function OV(t, e) {
  var n;
  if (
    t &&
    (t.length > 4 ||
      qt((n = ["ac-3", "ec-3", "alac", "fLaC", "Opus"])).call(n, t) !== -1)
  )
    return t;
  if (e) {
    var r = e.split(",");
    if (r.length > 1) {
      if (t) {
        for (var i = r.length; i--; )
          if (r[i].substring(0, 4) === t.substring(0, 4)) return r[i];
      }
      return r[0];
    }
  }
  return e || t;
}
function z9t(t) {
  if (pv(t).call(t, "av01.")) {
    for (
      var e = t.split("."),
        n = ["0", "111", "01", "01", "01", "0"],
        r = e.length;
      r > 4 && r < 10;
      r++
    )
      e[r] = n[r - 4];
    return e.join(".");
  }
  return t;
}
function $ve(t) {
  var e = wx(t) || {
    isTypeSupported: function () {
      return !1;
    },
  };
  return {
    mpeg: e.isTypeSupported("audio/mpeg"),
    mp3: e.isTypeSupported('audio/mp4; codecs="mp3"'),
    ac3: e.isTypeSupported('audio/mp4; codecs="ac-3"'),
  };
}
var Q8e = {
    supported: !0,
    configurations: [],
    decodingInfoResults: [{ supported: !0, powerEfficient: !0, smooth: !0 }],
  },
  xve = {};
function j9t(t, e, n, r, i, o) {
  var l = t.audioCodec ? t.audioGroups : null,
    u = o == null ? void 0 : o.audioCodec,
    c = o == null ? void 0 : o.channels,
    d = c ? _i(c) : u ? 1 / 0 : 2,
    h = null;
  if (l != null && l.length)
    try {
      h =
        l.length === 1 && l[0]
          ? e.groups[l[0]].channels
          : ga(l).call(
              l,
              function (f, p) {
                if (p) {
                  var g = e.groups[p];
                  if (!g)
                    throw new Error(
                      "Audio track group ".concat(p, " not found")
                    );
                  Dn(g.channels).forEach(function (y) {
                    f[y] = (f[y] || 0) + g.channels[y];
                  });
                }
                return f;
              },
              { 2: 0 }
            );
    } catch {
      return !0;
    }
  return (
    (t.videoCodec !== void 0 &&
      ((t.width > 1920 && t.height > 1088) ||
        (t.height > 1920 && t.width > 1088) ||
        t.frameRate > Math.max(r, 30) ||
        (t.videoRange !== "SDR" && t.videoRange !== n) ||
        t.bitrate > Math.max(i, 8e6))) ||
    (!!h &&
      _a(d) &&
      Dn(h).some(function (f) {
        return _i(f) > d;
      }))
  );
}
function W9t(t, e, n) {
  var r = t.videoCodec,
    i = t.audioCodec;
  if ((!r && !i) || !n) return Ar.resolve(Q8e);
  var o = [];
  if (r) {
    var l,
      u = {
        width: t.width,
        height: t.height,
        bitrate: Math.ceil(Math.max(0.9 * t.bitrate, t.averageBitrate)),
        framerate: t.frameRate || 30,
      },
      c = t.videoRange;
    c !== "SDR" && (u.transferFunction = c.toLowerCase()),
      o.push.apply(
        o,
        On((l = r.split(","))).call(l, function (d) {
          return {
            type: "media-source",
            video: fl(fl({}, u), {}, { contentType: Hee(z9t(d), "video") }),
          };
        })
      );
  }
  return (
    i &&
      t.audioGroups &&
      t.audioGroups.forEach(function (d) {
        var h;
        d &&
          ((h = e.groups[d]) == null ||
            h.tracks.forEach(function (f) {
              if (f.groupId === d) {
                var p,
                  g = f.channels || "",
                  y = wl(g);
                _a(y) &&
                  y > 2 &&
                  o.push.apply(
                    o,
                    On((p = i.split(","))).call(p, function (v) {
                      return {
                        type: "media-source",
                        audio: {
                          contentType: Hee(v, "audio"),
                          channels: "" + y,
                        },
                      };
                    })
                  );
              }
            }));
      }),
    Ar.all(
      On(o).call(o, function (d) {
        var h = K9t(d);
        return xve[h] || (xve[h] = n.decodingInfo(d));
      })
    )
      .then(function (d) {
        return {
          supported: !d.some(function (h) {
            return !h.supported;
          }),
          configurations: o,
          decodingInfoResults: d,
        };
      })
      .catch(function (d) {
        return {
          supported: !1,
          configurations: o,
          decodingInfoResults: [],
          error: d,
        };
      })
  );
}
function K9t(t) {
  var e = t.audio,
    n = t.video,
    r = n || e;
  if (r) {
    var i,
      o,
      l,
      u,
      c,
      d,
      h,
      f = r.contentType.split('"')[1];
    if (n)
      return Ce(
        (i = Ce(
          (o = Ce(
            (l = Ce(
              (u = Ce((c = "r".concat(n.height, "x"))).call(c, n.width, "f"))
            ).call(u, Math.ceil(n.framerate)))
          ).call(l, n.transferFunction || "sd", "_"))
        ).call(o, f, "_"))
      ).call(i, Math.ceil(n.bitrate / 1e5));
    if (e)
      return Ce(
        (d = Ce((h = "c".concat(e.channels))).call(
          h,
          e.spatialRendering ? "s" : "n",
          "_"
        ))
      ).call(d, f);
  }
  return "";
}
var GV = ["NONE", "TYPE-0", "TYPE-1", null],
  Lve = ["SDR", "PQ", "HLG"],
  SF = { No: "", Yes: "YES", v2: "v2" };
function Ove(t) {
  var e = t.canSkipUntil,
    n = t.canSkipDateRanges,
    r = t.age;
  return e && r < e / 2 ? (n ? SF.v2 : SF.Yes) : SF.No;
}
var Gve = (function () {
    function t(e, n, r) {
      Wn(this, t),
        (this.msn = void 0),
        (this.part = void 0),
        (this.skip = void 0),
        (this.msn = e),
        (this.part = n),
        (this.skip = r);
    }
    return (
      Kn(t, [
        {
          key: "addDirectives",
          value: function (e) {
            var n = new Bs(e);
            return (
              this.msn !== void 0 &&
                n.searchParams.set("_HLS_msn", this.msn.toString()),
              this.part !== void 0 &&
                n.searchParams.set("_HLS_part", this.part.toString()),
              this.skip && n.searchParams.set("_HLS_skip", this.skip),
              n.href
            );
          },
        },
      ]),
      t
    );
  })(),
  yU = (function () {
    function t(e) {
      var n, r;
      Wn(this, t),
        (this._attrs = void 0),
        (this.audioCodec = void 0),
        (this.bitrate = void 0),
        (this.codecSet = void 0),
        (this.url = void 0),
        (this.frameRate = void 0),
        (this.height = void 0),
        (this.id = void 0),
        (this.name = void 0),
        (this.videoCodec = void 0),
        (this.width = void 0),
        (this.details = void 0),
        (this.fragmentError = 0),
        (this.loadError = 0),
        (this.loaded = void 0),
        (this.realBitrate = 0),
        (this.supportedPromise = void 0),
        (this.supportedResult = void 0),
        (this._avgBitrate = 0),
        (this._audioGroups = void 0),
        (this._subtitleGroups = void 0),
        (this._urlId = 0),
        (this.url = [e.url]),
        (this._attrs = [e.attrs]),
        (this.bitrate = e.bitrate),
        e.details && (this.details = e.details),
        (this.id = e.id || 0),
        (this.name = e.name),
        (this.width = e.width || 0),
        (this.height = e.height || 0),
        (this.frameRate = e.attrs.optionalFloat("FRAME-RATE", 0)),
        (this._avgBitrate = e.attrs.decimalInteger("AVERAGE-BANDWIDTH")),
        (this.audioCodec = e.audioCodec),
        (this.videoCodec = e.videoCodec),
        (this.codecSet = On(
          (n = _r((r = [e.videoCodec, e.audioCodec])).call(r, function (i) {
            return !!i;
          }))
        )
          .call(n, function (i) {
            return i.substring(0, 4);
          })
          .join(",")),
        this.addGroupId("audio", e.attrs.AUDIO),
        this.addGroupId("text", e.attrs.SUBTITLES);
    }
    return (
      Kn(t, [
        {
          key: "maxBitrate",
          get: function () {
            return Math.max(this.realBitrate, this.bitrate);
          },
        },
        {
          key: "averageBitrate",
          get: function () {
            return this._avgBitrate || this.realBitrate || this.bitrate;
          },
        },
        {
          key: "attrs",
          get: function () {
            return this._attrs[0];
          },
        },
        {
          key: "codecs",
          get: function () {
            return this.attrs.CODECS || "";
          },
        },
        {
          key: "pathwayId",
          get: function () {
            return this.attrs["PATHWAY-ID"] || ".";
          },
        },
        {
          key: "videoRange",
          get: function () {
            return this.attrs["VIDEO-RANGE"] || "SDR";
          },
        },
        {
          key: "score",
          get: function () {
            return this.attrs.optionalFloat("SCORE", 0);
          },
        },
        {
          key: "uri",
          get: function () {
            return this.url[0] || "";
          },
        },
        {
          key: "hasAudioGroup",
          value: function (e) {
            return Nve(this._audioGroups, e);
          },
        },
        {
          key: "hasSubtitleGroup",
          value: function (e) {
            return Nve(this._subtitleGroups, e);
          },
        },
        {
          key: "audioGroups",
          get: function () {
            return this._audioGroups;
          },
        },
        {
          key: "subtitleGroups",
          get: function () {
            return this._subtitleGroups;
          },
        },
        {
          key: "addGroupId",
          value: function (e, n) {
            if (n) {
              if (e === "audio") {
                var r = this._audioGroups;
                r || (r = this._audioGroups = []),
                  qt(r).call(r, n) === -1 && r.push(n);
              } else if (e === "text") {
                var i = this._subtitleGroups;
                i || (i = this._subtitleGroups = []),
                  qt(i).call(i, n) === -1 && i.push(n);
              }
            }
          },
        },
        {
          key: "urlId",
          get: function () {
            return 0;
          },
          set: function (e) {},
        },
        {
          key: "audioGroupIds",
          get: function () {
            return this.audioGroups ? [this.audioGroupId] : void 0;
          },
        },
        {
          key: "textGroupIds",
          get: function () {
            return this.subtitleGroups ? [this.textGroupId] : void 0;
          },
        },
        {
          key: "audioGroupId",
          get: function () {
            var e;
            return (e = this.audioGroups) == null ? void 0 : e[0];
          },
        },
        {
          key: "textGroupId",
          get: function () {
            var e;
            return (e = this.subtitleGroups) == null ? void 0 : e[0];
          },
        },
        { key: "addFallback", value: function () {} },
      ]),
      t
    );
  })();
function Nve(t, e) {
  return !(!e || !t) && qt(t).call(t, e) !== -1;
}
function Z9t() {
  if (typeof matchMedia == "function") {
    var t = matchMedia("(dynamic-range: high)"),
      e = matchMedia("bad query");
    if (t.media !== e.media) return t.matches === !0;
  }
  return !1;
}
function Y9t(t, e) {
  var n = !1,
    r = [];
  if ((t && ((n = t !== "SDR"), (r = [t])), e)) {
    var i =
      (r = e.allowedVideoRanges || jn(Lve).call(Lve, 0)).join("") !== "SDR" &&
      !e.videoCodec;
    (n = e.preferHDR !== void 0 ? e.preferHDR : i && Z9t()) || (r = ["SDR"]);
  }
  return { preferHDR: n, allowedVideoRanges: r };
}
function Q9t(t, e, n, r, i) {
  for (
    var o = Dn(t),
      l = r == null ? void 0 : r.channels,
      u = r == null ? void 0 : r.audioCodec,
      c = i == null ? void 0 : i.videoCodec,
      d = l && _i(l) === 2,
      h = !1,
      f = !1,
      p = 1 / 0,
      g = 1 / 0,
      y = 1 / 0,
      v = 1 / 0,
      b = 0,
      w = [],
      k = Y9t(e, i),
      D = k.preferHDR,
      $ = k.allowedVideoRanges,
      N = function () {
        var G = t[o[P]];
        h || (h = G.channels[2] > 0),
          (p = Math.min(p, G.minHeight)),
          (g = Math.min(g, G.minFramerate)),
          (y = Math.min(y, G.minBitrate)),
          _r($).call($, function (H) {
            return G.videoRanges[H] > 0;
          }).length > 0 && (f = !0);
      },
      P = o.length;
    P--;

  )
    N();
  (p = _a(p) ? p : 0), (g = _a(g) ? g : 0);
  var I = Math.max(1080, p),
    O = Math.max(30, g);
  (y = _a(y) ? y : n), (n = Math.max(y, n)), f || (e = void 0);
  var X = o.length > 1;
  return {
    codecSet: ga(o).call(
      o,
      function (G, H) {
        var E = t[H];
        if (H === G) return G;
        if (
          ((w = f
            ? _r($).call($, function (De) {
                return E.videoRanges[De] > 0;
              })
            : []),
          X)
        ) {
          var S, L, W, F, oe;
          if (E.minBitrate > n)
            return (
              gy(
                H,
                Ce(
                  (S = "min bitrate of ".concat(
                    E.minBitrate,
                    " > current estimate of "
                  ))
                ).call(S, n)
              ),
              G
            );
          if (!E.hasDefaultAudio)
            return (
              gy(H, "no renditions with default or auto-select sound found"), G
            );
          if (u && qt(H).call(H, u.substring(0, 4)) % 5 != 0)
            return (
              gy(H, 'audio codec preference "'.concat(u, '" not found')), G
            );
          if (l && !d) {
            if (!E.channels[l])
              return (
                gy(
                  H,
                  Ce(
                    (L = "no renditions with ".concat(
                      l,
                      " channel sound found (channels options: "
                    ))
                  ).call(L, Dn(E.channels), ")")
                ),
                G
              );
          } else if ((!u || d) && h && E.channels[2] === 0)
            return gy(H, "no renditions with stereo sound found"), G;
          if (E.minHeight > I)
            return (
              gy(
                H,
                Ce(
                  (W = "min resolution of ".concat(
                    E.minHeight,
                    " > maximum of "
                  ))
                ).call(W, I)
              ),
              G
            );
          if (E.minFramerate > O)
            return (
              gy(
                H,
                Ce(
                  (F = "min framerate of ".concat(
                    E.minFramerate,
                    " > maximum of "
                  ))
                ).call(F, O)
              ),
              G
            );
          if (
            !w.some(function (De) {
              return E.videoRanges[De] > 0;
            })
          )
            return (
              gy(H, "no variants with VIDEO-RANGE of ".concat(lr(w), " found")),
              G
            );
          if (c && qt(H).call(H, c.substring(0, 4)) % 5 != 0)
            return (
              gy(H, 'video codec preference "'.concat(c, '" not found')), G
            );
          if (E.maxScore < b)
            return (
              gy(
                H,
                Ce(
                  (oe = "max score of ".concat(
                    E.maxScore,
                    " < selected max of "
                  ))
                ).call(oe, b)
              ),
              G
            );
        }
        return G && (Cve(H) >= Cve(G) || E.fragmentError > t[G].fragmentError)
          ? G
          : ((v = E.minIndex), (b = E.maxScore), H);
      },
      void 0
    ),
    videoRanges: w,
    preferHDR: D,
    minFramerate: g,
    minBitrate: y,
    minIndex: v,
  };
}
function gy(t, e) {
  var n;
  Is.log(
    Ce(
      (n = '[abr] start candidates with "'.concat(t, '" ignored because '))
    ).call(n, e)
  );
}
function J9t(t) {
  return ga(t).call(
    t,
    function (e, n) {
      var r = e.groups[n.groupId];
      r ||
        (r = e.groups[n.groupId] =
          {
            tracks: [],
            channels: { 2: 0 },
            hasDefault: !1,
            hasAutoSelect: !1,
          }),
        r.tracks.push(n);
      var i = n.channels || "2";
      return (
        (r.channels[i] = (r.channels[i] || 0) + 1),
        (r.hasDefault = r.hasDefault || n.default),
        (r.hasAutoSelect = r.hasAutoSelect || n.autoselect),
        r.hasDefault && (e.hasDefaultAudio = !0),
        r.hasAutoSelect && (e.hasAutoSelectAudio = !0),
        e
      );
    },
    { hasDefaultAudio: !1, hasAutoSelectAudio: !1, groups: {} }
  );
}
function q9t(t, e, n, r) {
  var i;
  return ga((i = jn(t).call(t, n, r + 1))).call(
    i,
    function (o, l, u) {
      if (!l.codecSet) return o;
      var c = l.audioGroups,
        d = o[l.codecSet];
      d ||
        (o[l.codecSet] = d =
          {
            minBitrate: 1 / 0,
            minHeight: 1 / 0,
            minFramerate: 1 / 0,
            minIndex: u,
            maxScore: 0,
            videoRanges: { SDR: 0 },
            channels: { 2: 0 },
            hasDefaultAudio: !c,
            fragmentError: 0,
          }),
        (d.minBitrate = Math.min(d.minBitrate, l.bitrate));
      var h = Math.min(l.height, l.width);
      return (
        (d.minHeight = Math.min(d.minHeight, h)),
        (d.minFramerate = Math.min(d.minFramerate, l.frameRate)),
        (d.minIndex = Math.min(d.minIndex, u)),
        (d.maxScore = Math.max(d.maxScore, l.score)),
        (d.fragmentError += l.fragmentError),
        (d.videoRanges[l.videoRange] = (d.videoRanges[l.videoRange] || 0) + 1),
        c &&
          c.forEach(function (f) {
            if (f) {
              var p = e.groups[f];
              p &&
                ((d.hasDefaultAudio =
                  d.hasDefaultAudio || e.hasDefaultAudio
                    ? p.hasDefault
                    : p.hasAutoSelect ||
                      (!e.hasDefaultAudio && !e.hasAutoSelectAudio)),
                Dn(p.channels).forEach(function (g) {
                  d.channels[g] = (d.channels[g] || 0) + p.channels[g];
                }));
            }
          }),
        o
      );
    },
    {}
  );
}
function Fve(t) {
  return (
    t && {
      lang: t.lang,
      assocLang: t.assocLang,
      characteristics: t.characteristics,
      channels: t.channels,
      audioCodec: t.audioCodec,
    }
  );
}
function lv(t, e, n) {
  if ("attrs" in t) {
    var r = qt(e).call(e, t);
    if (r !== -1) return r;
  }
  for (var i = 0; i < e.length; i++) if (Yk(t, e[i], n)) return i;
  return -1;
}
function Yk(t, e, n) {
  var r = t.groupId,
    i = t.name,
    o = t.lang,
    l = t.assocLang,
    u = t.characteristics,
    c = t.default,
    d = t.forced;
  return (
    (r === void 0 || e.groupId === r) &&
    (i === void 0 || e.name === i) &&
    (o === void 0 || eBt(o, e.lang)) &&
    (o === void 0 || e.assocLang === l) &&
    (c === void 0 || e.default === c) &&
    (d === void 0 || e.forced === d) &&
    (u === void 0 || tBt(u, e.characteristics)) &&
    (n === void 0 || n(t, e))
  );
}
function eBt(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "--";
  return t.length === e.length ? t === e : pv(t).call(t, e) || pv(e).call(e, t);
}
function tBt(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
    n = t.split(","),
    r = e.split(",");
  return (
    n.length === r.length &&
    !n.some(function (i) {
      return qt(r).call(r, i) === -1;
    })
  );
}
function OA(t, e) {
  var n = t.audioCodec,
    r = t.channels;
  return !(
    (n !== void 0 &&
      (e.audioCodec || "").substring(0, 4) !== n.substring(0, 4)) ||
    (r !== void 0 && r !== (e.channels || "2"))
  );
}
function nBt(t, e, n, r, i) {
  var o = e[r],
    l = ga(e).call(
      e,
      function (f, p, g) {
        var y = p.uri;
        return (f[y] || (f[y] = [])).push(g), f;
      },
      {}
    )[o.uri];
  l.length > 1 && (r = Math.max.apply(Math, l));
  var u = o.videoRange,
    c = o.frameRate,
    d = o.codecSet.substring(0, 4),
    h = Uve(e, r, function (f) {
      if (
        f.videoRange !== u ||
        f.frameRate !== c ||
        f.codecSet.substring(0, 4) !== d
      )
        return !1;
      var p = f.audioGroups,
        g = _r(n).call(n, function (y) {
          return !p || qt(p).call(p, y.groupId) !== -1;
        });
      return lv(t, g, i) > -1;
    });
  return h > -1
    ? h
    : Uve(e, r, function (f) {
        var p = f.audioGroups,
          g = _r(n).call(n, function (y) {
            return !p || qt(p).call(p, y.groupId) !== -1;
          });
        return lv(t, g, i) > -1;
      });
}
function Uve(t, e, n) {
  for (var r = e; r > -1; r--) if (n(t[r])) return r;
  for (var i = e + 1; i < t.length; i++) if (n(t[i])) return i;
  return -1;
}
function rBt(t, e) {
  var n;
  return !!t && t !== ((n = e.levels[e.loadLevel]) == null ? void 0 : n.uri);
}
var iBt = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n),
        ((i = e.call(this, "abr", r.logger)).hls = void 0),
        (i.lastLevelLoadSec = 0),
        (i.lastLoadedFragLevel = -1),
        (i.firstSelection = -1),
        (i._nextAutoLevel = -1),
        (i.nextAutoLevelKey = ""),
        (i.audioTracksByGroup = null),
        (i.codecTiers = null),
        (i.timer = -1),
        (i.fragCurrent = null),
        (i.partCurrent = null),
        (i.bitrateTestDelay = 0),
        (i.bwEstimator = void 0),
        (i._abandonRulesCheck = function () {
          var o,
            l,
            u,
            c,
            d,
            h,
            f,
            p,
            g,
            y,
            v,
            b,
            w = os(i),
            k = w.fragCurrent,
            D = w.partCurrent,
            $ = w.hls,
            N = $.autoLevelEnabled,
            P = $.media;
          if (k && P) {
            var I = performance.now(),
              O = D ? D.stats : k.stats,
              X = D ? D.duration : k.duration,
              G = I - O.loading.start,
              H = $.minAutoLevel;
            if (O.aborted || (O.loaded && O.loaded === O.total) || k.level <= H)
              return i.clearTimer(), void (i._nextAutoLevel = -1);
            if (N && !P.paused && P.playbackRate && P.readyState) {
              var E = $.mainForwardBufferInfo;
              if (E !== null) {
                var S = i.bwEstimator.getEstimateTTFB(),
                  L = Math.abs(P.playbackRate);
                if (!(G <= Math.max(S, (X / (2 * L)) * 1e3))) {
                  var W = E.len / L,
                    F = O.loading.first
                      ? O.loading.first - O.loading.start
                      : -1,
                    oe = O.loaded && F > -1,
                    De = i.getBwEstimate(),
                    Xe = $.levels,
                    ze = Xe[k.level],
                    ht = Math.max(
                      O.loaded,
                      Math.round((X * (k.bitrate || ze.averageBitrate)) / 8)
                    ),
                    gt = oe ? G - F : G;
                  gt < 1 && oe && (gt = Math.min(G, (8 * O.loaded) / De));
                  var pt = oe ? (1e3 * O.loaded) / gt : 0,
                    $t = S / 1e3,
                    ot = pt ? (ht - O.loaded) / pt : (8 * ht) / De + $t;
                  if (!(ot <= W)) {
                    var tt,
                      He = pt ? 8 * pt : De,
                      de =
                        ((b = i.hls.latestLevelDetails) == null
                          ? void 0
                          : b.live) === !0,
                      ue = i.hls.config.abrBandWidthUpFactor,
                      Z = Number.POSITIVE_INFINITY;
                    for (tt = k.level - 1; tt > H; tt--) {
                      var ie = Xe[tt].maxBitrate,
                        Ne = !Xe[tt].details || de;
                      if (
                        (Z = i.getTimeToLoadFrag($t, He, X * ie, Ne)) <
                        Math.min(W, X + $t)
                      )
                        break;
                    }
                    if (!(Z >= ot || Z > 10 * X)) {
                      oe
                        ? i.bwEstimator.sample(G - Math.min(S, F), O.loaded)
                        : i.bwEstimator.sampleTTFB(G);
                      var Pe = Xe[tt].maxBitrate;
                      i.getBwEstimate() * ue > Pe && i.resetEstimator(Pe);
                      var kt = i.findBestLevel(Pe, H, tt, 0, W, 1, 1);
                      kt > -1 && (tt = kt),
                        i.warn(
                          Ce(
                            (o = Ce(
                              (l = Ce(
                                (u = Ce(
                                  (c = Ce(
                                    (d = Ce(
                                      (h = Ce(
                                        (f = Ce(
                                          (p = Ce(
                                            (g = Ce(
                                              (y = Ce(
                                                (v = "Fragment ".concat(k.sn))
                                              ).call(
                                                v,
                                                D ? " part " + D.index : "",
                                                " of level "
                                              ))
                                            ).call(
                                              y,
                                              k.level,
                                              ` is loading too slowly;
      Fragment duration: `
                                            ))
                                          ).call(
                                            g,
                                            k.duration.toFixed(3),
                                            `
      Time to underbuffer: `
                                          ))
                                        ).call(
                                          p,
                                          W.toFixed(3),
                                          ` s
      Estimated load time for current fragment: `
                                        ))
                                      ).call(
                                        f,
                                        ot.toFixed(3),
                                        ` s
      Estimated load time for down switch fragment: `
                                      ))
                                    ).call(
                                      h,
                                      Z.toFixed(3),
                                      ` s
      TTFB estimate: `
                                    ))
                                  ).call(
                                    d,
                                    0 | F,
                                    ` ms
      Current BW estimate: `
                                  ))
                                ).call(
                                  c,
                                  _a(De) ? 0 | De : "Unknown",
                                  ` bps
      New BW estimate: `
                                ))
                              ).call(
                                u,
                                0 | i.getBwEstimate(),
                                ` bps
      Switching to level `
                              ))
                            ).call(l, tt, " @ "))
                          ).call(o, 0 | Pe, " bps")
                        ),
                        ($.nextLoadLevel = $.nextAutoLevel = tt),
                        i.clearTimer(),
                        (i.timer = self.setInterval(function () {
                          if (
                            (i.clearTimer(),
                            i.fragCurrent === k &&
                              i.hls.loadLevel === tt &&
                              tt > 0)
                          ) {
                            var Gt,
                              B,
                              re = i.getStarvationDelay();
                            if (
                              (i.warn(
                                Ce(
                                  (Gt = Ce(
                                    (B = "Aborting inflight request ".concat(
                                      tt > 0 ? "and switching down" : "",
                                      `
      Fragment duration: `
                                    ))
                                  ).call(
                                    B,
                                    k.duration.toFixed(3),
                                    ` s
      Time to underbuffer: `
                                  ))
                                ).call(Gt, re.toFixed(3), " s")
                              ),
                              k.abortRequests(),
                              (i.fragCurrent = i.partCurrent = null),
                              tt > H)
                            ) {
                              var Ae = i.findBestLevel(
                                i.hls.levels[H].bitrate,
                                H,
                                tt,
                                0,
                                re,
                                1,
                                1
                              );
                              Ae === -1 && (Ae = H),
                                (i.hls.nextLoadLevel = i.hls.nextAutoLevel =
                                  Ae),
                                i.resetEstimator(i.hls.levels[Ae].bitrate);
                            }
                          }
                        }, 1e3 * Z)),
                        $.trigger(_t.FRAG_LOAD_EMERGENCY_ABORTED, {
                          frag: k,
                          part: D,
                          stats: O,
                        });
                    }
                  }
                }
              }
            }
          }
        }),
        (i.hls = r),
        (i.bwEstimator = i.initEstimator()),
        i.registerListeners(),
        i
      );
    }
    return (
      Kn(n, [
        {
          key: "resetEstimator",
          value: function (r) {
            r &&
              (this.log("setting initial bwe to ".concat(r)),
              (this.hls.config.abrEwmaDefaultEstimate = r)),
              (this.firstSelection = -1),
              (this.bwEstimator = this.initEstimator());
          },
        },
        {
          key: "initEstimator",
          value: function () {
            var r = this.hls.config;
            return new x9t(
              r.abrEwmaSlowVoD,
              r.abrEwmaFastVoD,
              r.abrEwmaDefaultEstimate
            );
          },
        },
        {
          key: "registerListeners",
          value: function () {
            var r = this.hls;
            r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.on(_t.FRAG_LOADING, this.onFragLoading, this),
              r.on(_t.FRAG_LOADED, this.onFragLoaded, this),
              r.on(_t.FRAG_BUFFERED, this.onFragBuffered, this),
              r.on(_t.LEVEL_SWITCHING, this.onLevelSwitching, this),
              r.on(_t.LEVEL_LOADED, this.onLevelLoaded, this),
              r.on(_t.LEVELS_UPDATED, this.onLevelsUpdated, this),
              r.on(_t.MAX_AUTO_LEVEL_UPDATED, this.onMaxAutoLevelUpdated, this),
              r.on(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r &&
              (r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.off(_t.FRAG_LOADING, this.onFragLoading, this),
              r.off(_t.FRAG_LOADED, this.onFragLoaded, this),
              r.off(_t.FRAG_BUFFERED, this.onFragBuffered, this),
              r.off(_t.LEVEL_SWITCHING, this.onLevelSwitching, this),
              r.off(_t.LEVEL_LOADED, this.onLevelLoaded, this),
              r.off(_t.LEVELS_UPDATED, this.onLevelsUpdated, this),
              r.off(
                _t.MAX_AUTO_LEVEL_UPDATED,
                this.onMaxAutoLevelUpdated,
                this
              ),
              r.off(_t.ERROR, this.onError, this));
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unregisterListeners(),
              this.clearTimer(),
              (this.hls = this._abandonRulesCheck = null),
              (this.fragCurrent = this.partCurrent = null);
          },
        },
        {
          key: "onManifestLoading",
          value: function (r, i) {
            (this.lastLoadedFragLevel = -1),
              (this.firstSelection = -1),
              (this.lastLevelLoadSec = 0),
              (this.fragCurrent = this.partCurrent = null),
              this.onLevelsUpdated(),
              this.clearTimer();
          },
        },
        {
          key: "onLevelsUpdated",
          value: function () {
            this.lastLoadedFragLevel > -1 &&
              this.fragCurrent &&
              (this.lastLoadedFragLevel = this.fragCurrent.level),
              (this._nextAutoLevel = -1),
              this.onMaxAutoLevelUpdated(),
              (this.codecTiers = null),
              (this.audioTracksByGroup = null);
          },
        },
        {
          key: "onMaxAutoLevelUpdated",
          value: function () {
            (this.firstSelection = -1), (this.nextAutoLevelKey = "");
          },
        },
        {
          key: "onFragLoading",
          value: function (r, i) {
            var o = i.frag;
            if (!this.ignoreFragment(o)) {
              var l;
              o.bitrateTest ||
                ((this.fragCurrent = o),
                (this.partCurrent = (l = i.part) != null ? l : null)),
                this.clearTimer(),
                (this.timer = self.setInterval(this._abandonRulesCheck, 100));
            }
          },
        },
        {
          key: "onLevelSwitching",
          value: function (r, i) {
            this.clearTimer();
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            if (!i.fatal)
              switch (i.details) {
                case kr.BUFFER_ADD_CODEC_ERROR:
                case kr.BUFFER_APPEND_ERROR:
                  (this.lastLoadedFragLevel = -1), (this.firstSelection = -1);
                  break;
                case kr.FRAG_LOAD_TIMEOUT:
                  var o = i.frag,
                    l = this.fragCurrent,
                    u = this.partCurrent;
                  if (o && l && o.sn === l.sn && o.level === l.level) {
                    var c = performance.now(),
                      d = u ? u.stats : o.stats,
                      h = c - d.loading.start,
                      f = d.loading.first
                        ? d.loading.first - d.loading.start
                        : -1;
                    if (d.loaded && f > -1) {
                      var p = this.bwEstimator.getEstimateTTFB();
                      this.bwEstimator.sample(h - Math.min(p, f), d.loaded);
                    } else this.bwEstimator.sampleTTFB(h);
                  }
              }
          },
        },
        {
          key: "getTimeToLoadFrag",
          value: function (r, i, o, l) {
            return r + o / i + (l ? this.lastLevelLoadSec : 0);
          },
        },
        {
          key: "onLevelLoaded",
          value: function (r, i) {
            var o = this.hls.config,
              l = i.stats.loading,
              u = l.end - l.start;
            _a(u) && (this.lastLevelLoadSec = u / 1e3),
              i.details.live
                ? this.bwEstimator.update(o.abrEwmaSlowLive, o.abrEwmaFastLive)
                : this.bwEstimator.update(o.abrEwmaSlowVoD, o.abrEwmaFastVoD);
          },
        },
        {
          key: "onFragLoaded",
          value: function (r, i) {
            var o = i.frag,
              l = i.part,
              u = l ? l.stats : o.stats;
            if (
              (o.type === wo.MAIN &&
                this.bwEstimator.sampleTTFB(u.loading.first - u.loading.start),
              !this.ignoreFragment(o))
            ) {
              if (
                (this.clearTimer(),
                o.level === this._nextAutoLevel && (this._nextAutoLevel = -1),
                (this.firstSelection = -1),
                this.hls.config.abrMaxWithRealBitrate)
              ) {
                var c = l ? l.duration : o.duration,
                  d = this.hls.levels[o.level],
                  h = (d.loaded ? d.loaded.bytes : 0) + u.loaded,
                  f = (d.loaded ? d.loaded.duration : 0) + c;
                (d.loaded = { bytes: h, duration: f }),
                  (d.realBitrate = Math.round((8 * h) / f));
              }
              if (o.bitrateTest) {
                var p = { stats: u, frag: o, part: l, id: o.type };
                this.onFragBuffered(_t.FRAG_BUFFERED, p), (o.bitrateTest = !1);
              } else this.lastLoadedFragLevel = o.level;
            }
          },
        },
        {
          key: "onFragBuffered",
          value: function (r, i) {
            var o = i.frag,
              l = i.part,
              u = l != null && l.stats.loaded ? l.stats : o.stats;
            if (!u.aborted && !this.ignoreFragment(o)) {
              var c =
                u.parsing.end -
                u.loading.start -
                Math.min(
                  u.loading.first - u.loading.start,
                  this.bwEstimator.getEstimateTTFB()
                );
              this.bwEstimator.sample(c, u.loaded),
                (u.bwEstimate = this.getBwEstimate()),
                o.bitrateTest
                  ? (this.bitrateTestDelay = c / 1e3)
                  : (this.bitrateTestDelay = 0);
            }
          },
        },
        {
          key: "ignoreFragment",
          value: function (r) {
            return r.type !== wo.MAIN || r.sn === "initSegment";
          },
        },
        {
          key: "clearTimer",
          value: function () {
            this.timer > -1 &&
              (self.clearInterval(this.timer), (this.timer = -1));
          },
        },
        {
          key: "firstAutoLevel",
          get: function () {
            var r,
              i = this.hls,
              o = i.maxAutoLevel,
              l = i.minAutoLevel,
              u = this.getBwEstimate(),
              c = this.hls.config.maxStarvationDelay,
              d = this.findBestLevel(u, l, o, 0, c, 1, 1);
            if (d > -1) return d;
            var h = this.hls.firstLevel,
              f = Math.min(Math.max(h, l), o);
            return (
              this.warn(
                Ce(
                  (r =
                    "Could not find best starting auto level. Defaulting to first in playlist ".concat(
                      h,
                      " clamped to "
                    ))
                ).call(r, f)
              ),
              f
            );
          },
        },
        {
          key: "forcedAutoLevel",
          get: function () {
            return this.nextAutoLevelKey ? -1 : this._nextAutoLevel;
          },
        },
        {
          key: "nextAutoLevel",
          get: function () {
            var r = this.forcedAutoLevel,
              i = this.bwEstimator.canEstimate(),
              o = this.lastLoadedFragLevel > -1;
            if (
              !(
                r === -1 ||
                (i && o && this.nextAutoLevelKey !== this.getAutoLevelKey())
              )
            )
              return r;
            var l = i && o ? this.getNextABRAutoLevel() : this.firstAutoLevel;
            if (r !== -1) {
              var u = this.hls.levels;
              if (u.length > Math.max(r, l) && u[r].loadError <= u[l].loadError)
                return r;
            }
            return (
              (this._nextAutoLevel = l),
              (this.nextAutoLevelKey = this.getAutoLevelKey()),
              l
            );
          },
          set: function (r) {
            var i = this.hls,
              o = i.maxAutoLevel,
              l = i.minAutoLevel,
              u = Math.min(Math.max(r, l), o);
            this._nextAutoLevel !== u &&
              ((this.nextAutoLevelKey = ""), (this._nextAutoLevel = u));
          },
        },
        {
          key: "getAutoLevelKey",
          value: function () {
            var r;
            return Ce((r = "".concat(this.getBwEstimate(), "_"))).call(
              r,
              this.getStarvationDelay().toFixed(2)
            );
          },
        },
        {
          key: "getNextABRAutoLevel",
          value: function () {
            var r,
              i = this.fragCurrent,
              o = this.partCurrent,
              l = this.hls;
            if (l.levels.length <= 1) return l.loadLevel;
            var u = l.maxAutoLevel,
              c = l.config,
              d = l.minAutoLevel,
              h = o ? o.duration : i ? i.duration : 0,
              f = this.getBwEstimate(),
              p = this.getStarvationDelay(),
              g = c.abrBandWidthFactor,
              y = c.abrBandWidthUpFactor;
            if (p) {
              var v = this.findBestLevel(f, d, u, p, 0, g, y);
              if (v >= 0) return v;
            }
            var b = h
              ? Math.min(h, c.maxStarvationDelay)
              : c.maxStarvationDelay;
            if (!p) {
              var w,
                k = this.bitrateTestDelay;
              k &&
                ((b =
                  (h ? Math.min(h, c.maxLoadingDelay) : c.maxLoadingDelay) - k),
                this.info(
                  Ce(
                    (w = "bitrate test took ".concat(
                      Math.round(1e3 * k),
                      "ms, set first fragment max fetchDuration to "
                    ))
                  ).call(w, Math.round(1e3 * b), " ms")
                ),
                (g = y = 1));
            }
            var D = this.findBestLevel(f, d, u, p, b, g, y);
            if (
              (this.info(
                Ce(
                  (r = "".concat(
                    p ? "rebuffering expected" : "buffer is empty",
                    ", optimal quality level "
                  ))
                ).call(r, D)
              ),
              D > -1)
            )
              return D;
            var $ = l.levels[d],
              N = l.levels[l.loadLevel];
            return ($ == null ? void 0 : $.bitrate) <
              (N == null ? void 0 : N.bitrate)
              ? d
              : l.loadLevel;
          },
        },
        {
          key: "getStarvationDelay",
          value: function () {
            var r = this.hls,
              i = r.media;
            if (!i) return 1 / 0;
            var o = i && i.playbackRate !== 0 ? Math.abs(i.playbackRate) : 1,
              l = r.mainForwardBufferInfo;
            return (l ? l.len : 0) / o;
          },
        },
        {
          key: "getBwEstimate",
          value: function () {
            return this.bwEstimator.canEstimate()
              ? this.bwEstimator.getEstimate()
              : this.hls.config.abrEwmaDefaultEstimate;
          },
        },
        {
          key: "findBestLevel",
          value: function (r, i, o, l, u, c, d) {
            var h,
              f = this,
              p = l + u,
              g = this.lastLoadedFragLevel,
              y = g === -1 ? this.hls.firstLevel : g,
              v = this.fragCurrent,
              b = this.partCurrent,
              w = this.hls,
              k = w.levels,
              D = w.allAudioTracks,
              $ = w.loadLevel,
              N = w.config;
            if (k.length === 1) return 0;
            var P,
              I = k[y],
              O = !((h = this.hls.latestLevelDetails) == null || !h.live),
              X = $ === -1 || g === -1,
              G = "SDR",
              H = (I == null ? void 0 : I.frameRate) || 0,
              E = N.audioPreference,
              S = N.videoPreference,
              L = this.audioTracksByGroup || (this.audioTracksByGroup = J9t(D)),
              W = -1;
            if (X) {
              if (this.firstSelection !== -1) return this.firstSelection;
              var F = Q9t(
                  this.codecTiers || (this.codecTiers = q9t(k, L, i, o)),
                  G,
                  r,
                  E,
                  S
                ),
                oe = F.codecSet,
                De = F.videoRanges,
                Xe = F.minFramerate,
                ze = F.minBitrate,
                ht = F.minIndex,
                gt = F.preferHDR;
              (W = ht),
                (P = oe),
                (G = gt ? De[De.length - 1] : De[0]),
                (H = Xe),
                (r = Math.max(r, ze)),
                this.log("picked start tier ".concat(lr(F)));
            } else
              (P = I == null ? void 0 : I.codecSet),
                (G = I == null ? void 0 : I.videoRange);
            for (
              var pt = b ? b.duration : v ? v.duration : 0,
                $t = this.bwEstimator.getEstimateTTFB() / 1e3,
                ot = [],
                tt = function () {
                  var ie = k[He],
                    Ne = He > y;
                  if (!ie) return "continue";
                  if (
                    N.useMediaCapabilities &&
                    !ie.supportedResult &&
                    !ie.supportedPromise
                  ) {
                    var Pe = navigator.mediaCapabilities;
                    typeof (Pe == null ? void 0 : Pe.decodingInfo) !=
                      "function" ||
                    (!j9t(ie, L, G, H, r, E) &&
                      ((ue = ie.videoCodec) == null
                        ? void 0
                        : ue.substring(0, 4)) !== "hvc1")
                      ? (ie.supportedResult = Q8e)
                      : ((ie.supportedPromise = W9t(ie, L, Pe)),
                        ie.supportedPromise.then(function (Wt) {
                          if (f.hls) {
                            ie.supportedResult = Wt;
                            var Ft,
                              un,
                              Yt = f.hls.levels,
                              Qt = qt(Yt).call(Yt, ie);
                            if (Wt.error)
                              f.warn(
                                Ce(
                                  (Ft = Ce(
                                    (un =
                                      'MediaCapabilities decodingInfo error: "'.concat(
                                        Wt.error,
                                        '" for level '
                                      ))
                                  ).call(un, Qt, " "))
                                ).call(Ft, lr(Wt))
                              );
                            else if (!Wt.supported) {
                              var Sn;
                              f.warn(
                                Ce(
                                  (Sn =
                                    "Unsupported MediaCapabilities decodingInfo result for level ".concat(
                                      Qt,
                                      " "
                                    ))
                                ).call(Sn, lr(Wt))
                              ),
                                Qt > -1 &&
                                  Yt.length > 1 &&
                                  (f.log(
                                    "Removing unsupported level ".concat(Qt)
                                  ),
                                  f.hls.removeLevel(Qt),
                                  f.hls.loadLevel === -1 &&
                                    (f.hls.nextLoadLevel = 0));
                            }
                          }
                        }));
                  }
                  if (
                    ((P && ie.codecSet !== P) ||
                      (G && ie.videoRange !== G) ||
                      (Ne && H > ie.frameRate) ||
                      (!Ne && H > 0 && H < ie.frameRate) ||
                      (ie.supportedResult &&
                        ((de = ie.supportedResult.decodingInfoResults) ==
                          null ||
                          !de[0].smooth))) &&
                    (!X || He !== W)
                  )
                    return ot.push(He), "continue";
                  var kt,
                    Gt = ie.details,
                    B =
                      (b
                        ? Gt == null
                          ? void 0
                          : Gt.partTarget
                        : Gt == null
                        ? void 0
                        : Gt.averagetargetduration) || pt;
                  kt = Ne ? d * r : c * r;
                  var re =
                      pt && l >= 2 * pt && u === 0
                        ? ie.averageBitrate
                        : ie.maxBitrate,
                    Ae = f.getTimeToLoadFrag($t, kt, re * B, Gt === void 0);
                  if (
                    kt >= re &&
                    (He === g ||
                      (ie.loadError === 0 && ie.fragmentError === 0)) &&
                    (Ae <= $t ||
                      !_a(Ae) ||
                      (O && !f.bitrateTestDelay) ||
                      Ae < p)
                  ) {
                    var lt = f.forcedAutoLevel;
                    if (He !== $ && (lt === -1 || lt !== $)) {
                      var Et,
                        St,
                        Lt,
                        ln,
                        Ln,
                        Tr,
                        sr,
                        hi,
                        Ra,
                        En,
                        Zn,
                        on,
                        rn,
                        It,
                        wt,
                        Mt;
                      ot.length &&
                        f.trace(
                          Ce(
                            (on = Ce(
                              (rn = Ce(
                                (It = Ce(
                                  (wt = Ce(
                                    (Mt = "Skipped level(s) ".concat(
                                      ot.join(","),
                                      " of "
                                    ))
                                  ).call(
                                    Mt,
                                    o,
                                    ' max with CODECS and VIDEO-RANGE:"'
                                  ))
                                ).call(wt, k[ot[0]].codecs, '" '))
                              ).call(
                                It,
                                k[ot[0]].videoRange,
                                '; not compatible with "'
                              ))
                            ).call(rn, P, '" '))
                          ).call(on, G)
                        ),
                        f.info(
                          Ce(
                            (Et = Ce(
                              (St = Ce(
                                (Lt = Ce(
                                  (ln = Ce(
                                    (Ln = Ce(
                                      (Tr = Ce(
                                        (sr = Ce(
                                          (hi = Ce(
                                            (Ra = Ce(
                                              (En = Ce(
                                                (Zn =
                                                  "switch candidate:".concat(
                                                    y,
                                                    "->"
                                                  ))
                                              ).call(Zn, He, " adjustedbw("))
                                            ).call(
                                              En,
                                              Math.round(kt),
                                              ")-bitrate="
                                            ))
                                          ).call(
                                            Ra,
                                            Math.round(kt - re),
                                            " ttfb:"
                                          ))
                                        ).call(
                                          hi,
                                          $t.toFixed(1),
                                          " avgDuration:"
                                        ))
                                      ).call(
                                        sr,
                                        B.toFixed(1),
                                        " maxFetchDuration:"
                                      ))
                                    ).call(Tr, p.toFixed(1), " fetchDuration:"))
                                  ).call(Ln, Ae.toFixed(1), " firstSelection:"))
                                ).call(ln, X, " codecSet:"))
                              ).call(Lt, ie.codecSet, " videoRange:"))
                            ).call(St, ie.videoRange, " hls.loadLevel:"))
                          ).call(Et, $)
                        );
                    }
                    return X && (f.firstSelection = He), { v: He };
                  }
                },
                He = o;
              He >= i;
              He--
            ) {
              var de,
                ue,
                Z = tt();
              if (Z !== "continue" && ti(Z) === "object") return Z.v;
            }
            return -1;
          },
        },
      ]),
      n
    );
  })(),
  Qse = {
    search: function (t, e) {
      for (var n = 0, r = t.length - 1, i = null, o = null; n <= r; ) {
        var l = e((o = t[(i = ((n + r) / 2) | 0)]));
        if (l > 0) n = i + 1;
        else {
          if (!(l < 0)) return o;
          r = i - 1;
        }
      }
      return null;
    },
  };
function aBt(t, e, n) {
  if (
    e === null ||
    !Array.isArray(t) ||
    !t.length ||
    !_a(e) ||
    e < (t[0].programDateTime || 0) ||
    e >= (t[t.length - 1].endProgramDateTime || 0)
  )
    return null;
  n = n || 0;
  for (var r = 0; r < t.length; ++r) {
    var i = t[r];
    if (sBt(e, n, i)) return i;
  }
  return null;
}
function FI(t, e) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0,
    r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0,
    i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0.005,
    o = null;
  if (t) {
    o = e[1 + t.sn - e[0].sn] || null;
    var l = t.endDTS - n;
    l > 0 && l < 15e-7 && (n += 15e-7),
      o &&
        t.level !== o.level &&
        o.end <= t.end &&
        (o = e[2 + t.sn - e[0].sn] || null);
  } else n === 0 && e[0].start === 0 && (o = e[0]);
  if (
    o &&
    (((!t || t.level === o.level) && Bve(n, r, o) === 0) ||
      oBt(o, t, Math.min(i, r)))
  )
    return o;
  var u = Qse.search(e, Bve.bind(null, n, r));
  return !u || (u === t && o) ? o : u;
}
function oBt(t, e, n) {
  if (e && e.start === 0 && e.level < t.level && (e.endPTS || 0) > 0) {
    var r,
      i = ga((r = e.tagList)).call(
        r,
        function (o, l) {
          return l[0] === "INF" && (o += wl(l[1])), o;
        },
        n
      );
    return t.start <= i;
  }
  return !1;
}
function Bve() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0,
    e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
    n = arguments.length > 2 ? arguments[2] : void 0;
  if (n.start <= t && n.start + n.duration > t) return 0;
  var r = Math.min(e, n.duration + (n.deltaPTS ? n.deltaPTS : 0));
  return n.start + n.duration - r <= t
    ? 1
    : n.start - r > t && n.start
    ? -1
    : 0;
}
function sBt(t, e, n) {
  var r = 1e3 * Math.min(e, n.duration + (n.deltaPTS ? n.deltaPTS : 0));
  return (n.endProgramDateTime || 0) - r > t;
}
function J8e(t, e) {
  return Qse.search(t, function (n) {
    return n.cc < e ? 1 : n.cc > e ? -1 : 0;
  });
}
function lBt(t, e, n) {
  if (t && t.startCC <= e && t.endCC >= e) {
    var r = n.start,
      i = n.end,
      o = t.fragments;
    if (!n.relurl) {
      var l = t.fragmentHint;
      l && (o = Ce(o).call(o, l));
    }
    return Qse.search(o, function (u) {
      return u.cc < e || u.end <= r ? 1 : u.cc > e || u.start >= i ? -1 : 0;
    });
  }
  return null;
}
function vU(t) {
  switch (t.details) {
    case kr.FRAG_LOAD_TIMEOUT:
    case kr.KEY_LOAD_TIMEOUT:
    case kr.LEVEL_LOAD_TIMEOUT:
    case kr.MANIFEST_LOAD_TIMEOUT:
      return !0;
  }
  return !1;
}
function Hve(t, e) {
  var n = vU(e);
  return t.default["".concat(n ? "timeout" : "error", "Retry")];
}
function Jse(t, e) {
  var n = t.backoff === "linear" ? 1 : Math.pow(2, e);
  return Math.min(n * t.retryDelayMs, t.maxRetryDelayMs);
}
function Xve(t) {
  return fl(fl({}, t), { errorRetry: null, timeoutRetry: null });
}
function bU(t, e, n, r) {
  if (!t) return !1;
  var i = r == null ? void 0 : r.code,
    o = e < t.maxNumRetry && (uBt(i) || !!n);
  return t.shouldRetry ? t.shouldRetry(t, e, n, r, o) : o;
}
function uBt(t) {
  return (t === 0 && navigator.onLine === !1) || (!!t && (t < 400 || t > 499));
}
var Qd = {
    DoNothing: 0,
    SendEndCallback: 1,
    SendAlternateToPenaltyBox: 2,
    RemoveAlternatePermanently: 3,
    InsertDiscontinuity: 4,
    RetryRequest: 5,
  },
  o0 = {
    None: 0,
    MoveAllAlternatesMatchingHost: 1,
    MoveAllAlternatesMatchingHDCP: 2,
    SwitchToSDR: 4,
  },
  cBt = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n),
        ((i = e.call(this, "error-controller", r.logger)).hls = void 0),
        (i.playlistError = 0),
        (i.penalizedRenditions = {}),
        (i.hls = r),
        i.registerListeners(),
        i
      );
    }
    return (
      Kn(n, [
        {
          key: "registerListeners",
          value: function () {
            var r = this.hls;
            r.on(_t.ERROR, this.onError, this),
              r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.on(_t.LEVEL_UPDATED, this.onLevelUpdated, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r &&
              (r.off(_t.ERROR, this.onError, this),
              r.off(_t.ERROR, this.onErrorOut, this),
              r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.off(_t.LEVEL_UPDATED, this.onLevelUpdated, this));
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unregisterListeners(),
              (this.hls = null),
              (this.penalizedRenditions = {});
          },
        },
        { key: "startLoad", value: function (r) {} },
        {
          key: "stopLoad",
          value: function () {
            this.playlistError = 0;
          },
        },
        {
          key: "getVariantLevelIndex",
          value: function (r) {
            return (r == null ? void 0 : r.type) === wo.MAIN
              ? r.level
              : this.hls.loadLevel;
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            (this.playlistError = 0), (this.penalizedRenditions = {});
          },
        },
        {
          key: "onLevelUpdated",
          value: function () {
            this.playlistError = 0;
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            var o;
            if (!i.fatal) {
              var l = this.hls,
                u = i.context;
              switch (i.details) {
                case kr.FRAG_LOAD_ERROR:
                case kr.FRAG_LOAD_TIMEOUT:
                case kr.KEY_LOAD_ERROR:
                case kr.KEY_LOAD_TIMEOUT:
                  return void (i.errorAction =
                    this.getFragRetryOrSwitchAction(i));
                case kr.FRAG_PARSING_ERROR:
                  if ((o = i.frag) != null && o.gap)
                    return void (i.errorAction = kx());
                case kr.FRAG_GAP:
                case kr.FRAG_DECRYPT_ERROR:
                  return (
                    (i.errorAction = this.getFragRetryOrSwitchAction(i)),
                    void (i.errorAction.action = Qd.SendAlternateToPenaltyBox)
                  );
                case kr.LEVEL_EMPTY_ERROR:
                case kr.LEVEL_PARSING_ERROR:
                  var c,
                    d,
                    h = i.parent === wo.MAIN ? i.level : l.loadLevel;
                  return void (i.details === kr.LEVEL_EMPTY_ERROR &&
                  (c = i.context) != null &&
                  (d = c.levelDetails) != null &&
                  d.live
                    ? (i.errorAction = this.getPlaylistRetryOrSwitchAction(
                        i,
                        h
                      ))
                    : ((i.levelRetry = !1),
                      (i.errorAction = this.getLevelSwitchAction(i, h))));
                case kr.LEVEL_LOAD_ERROR:
                case kr.LEVEL_LOAD_TIMEOUT:
                  return void (
                    typeof (u == null ? void 0 : u.level) == "number" &&
                    (i.errorAction = this.getPlaylistRetryOrSwitchAction(
                      i,
                      u.level
                    ))
                  );
                case kr.AUDIO_TRACK_LOAD_ERROR:
                case kr.AUDIO_TRACK_LOAD_TIMEOUT:
                case kr.SUBTITLE_LOAD_ERROR:
                case kr.SUBTITLE_TRACK_LOAD_TIMEOUT:
                  if (u) {
                    var f = l.levels[l.loadLevel];
                    if (
                      f &&
                      ((u.type === F1.AUDIO_TRACK &&
                        f.hasAudioGroup(u.groupId)) ||
                        (u.type === F1.SUBTITLE_TRACK &&
                          f.hasSubtitleGroup(u.groupId)))
                    )
                      return (
                        (i.errorAction = this.getPlaylistRetryOrSwitchAction(
                          i,
                          l.loadLevel
                        )),
                        (i.errorAction.action = Qd.SendAlternateToPenaltyBox),
                        void (i.errorAction.flags =
                          o0.MoveAllAlternatesMatchingHost)
                      );
                  }
                  return;
                case kr.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:
                  var p = l.levels[l.loadLevel],
                    g = p == null ? void 0 : p.attrs["HDCP-LEVEL"];
                  return void (g
                    ? (i.errorAction = {
                        action: Qd.SendAlternateToPenaltyBox,
                        flags: o0.MoveAllAlternatesMatchingHDCP,
                        hdcpLevel: g,
                      })
                    : this.keySystemError(i));
                case kr.BUFFER_ADD_CODEC_ERROR:
                case kr.REMUX_ALLOC_ERROR:
                case kr.BUFFER_APPEND_ERROR:
                  var y;
                  i.errorAction ||
                    (i.errorAction = this.getLevelSwitchAction(
                      i,
                      (y = i.level) != null ? y : l.loadLevel
                    ));
                  return;
                case kr.INTERNAL_EXCEPTION:
                case kr.BUFFER_APPENDING_ERROR:
                case kr.BUFFER_FULL_ERROR:
                case kr.LEVEL_SWITCH_ERROR:
                case kr.BUFFER_STALLED_ERROR:
                case kr.BUFFER_SEEK_OVER_HOLE:
                case kr.BUFFER_NUDGE_ON_STALL:
                  return void (i.errorAction = kx());
              }
              i.type === no.KEY_SYSTEM_ERROR && this.keySystemError(i);
            }
          },
        },
        {
          key: "keySystemError",
          value: function (r) {
            var i = this.getVariantLevelIndex(r.frag);
            (r.levelRetry = !1),
              (r.errorAction = this.getLevelSwitchAction(r, i));
          },
        },
        {
          key: "getPlaylistRetryOrSwitchAction",
          value: function (r, i) {
            var o = Hve(this.hls.config.playlistLoadPolicy, r),
              l = this.playlistError++;
            if (bU(o, l, vU(r), r.response))
              return {
                action: Qd.RetryRequest,
                flags: o0.None,
                retryConfig: o,
                retryCount: l,
              };
            var u = this.getLevelSwitchAction(r, i);
            return o && ((u.retryConfig = o), (u.retryCount = l)), u;
          },
        },
        {
          key: "getFragRetryOrSwitchAction",
          value: function (r) {
            var i,
              o,
              l = this.hls,
              u = this.getVariantLevelIndex(r.frag),
              c = l.levels[u],
              d = l.config,
              h = d.fragLoadPolicy,
              f = d.keyLoadPolicy,
              p = Hve(pv((i = r.details)).call(i, "key") ? f : h, r),
              g = ga((o = l.levels)).call(
                o,
                function (v, b) {
                  return v + b.fragmentError;
                },
                0
              );
            if (
              c &&
              (r.details !== kr.FRAG_GAP && c.fragmentError++,
              bU(p, g, vU(r), r.response))
            )
              return {
                action: Qd.RetryRequest,
                flags: o0.None,
                retryConfig: p,
                retryCount: g,
              };
            var y = this.getLevelSwitchAction(r, u);
            return p && ((y.retryConfig = p), (y.retryCount = g)), y;
          },
        },
        {
          key: "getLevelSwitchAction",
          value: function (r, i) {
            var o = this.hls;
            i == null && (i = o.loadLevel);
            var l = this.hls.levels[i];
            if (l) {
              var u,
                c,
                d = r.details;
              l.loadError++, d === kr.BUFFER_APPEND_ERROR && l.fragmentError++;
              var h = -1,
                f = o.levels,
                p = o.loadLevel,
                g = o.minAutoLevel,
                y = o.maxAutoLevel;
              o.autoLevelEnabled || (o.loadLevel = -1);
              for (
                var v = (u = r.frag) == null ? void 0 : u.type,
                  b =
                    ((v === wo.AUDIO && d === kr.FRAG_PARSING_ERROR) ||
                      (r.sourceBufferName === "audio" &&
                        (d === kr.BUFFER_ADD_CODEC_ERROR ||
                          d === kr.BUFFER_APPEND_ERROR))) &&
                    f.some(function (G) {
                      var H = G.audioCodec;
                      return l.audioCodec !== H;
                    }),
                  w =
                    r.sourceBufferName === "video" &&
                    (d === kr.BUFFER_ADD_CODEC_ERROR ||
                      d === kr.BUFFER_APPEND_ERROR) &&
                    f.some(function (G) {
                      var H = G.codecSet,
                        E = G.audioCodec;
                      return l.codecSet !== H && l.audioCodec === E;
                    }),
                  k = (c = r.context) != null ? c : {},
                  D = k.type,
                  $ = k.groupId,
                  N = function () {
                    var G = (P + p) % f.length;
                    if (G !== p && G >= g && G <= y && f[G].loadError === 0) {
                      var H = f[G];
                      if (d === kr.FRAG_GAP && v === wo.MAIN && r.frag) {
                        var E = f[G].details;
                        if (E) {
                          var S = FI(r.frag, E.fragments, r.frag.start);
                          if (S != null && S.gap) return "continue";
                        }
                      } else if (
                        (D === F1.AUDIO_TRACK && H.hasAudioGroup($)) ||
                        (D === F1.SUBTITLE_TRACK && H.hasSubtitleGroup($)) ||
                        (v === wo.AUDIO &&
                          (I = l.audioGroups) != null &&
                          I.some(function (L) {
                            return H.hasAudioGroup(L);
                          })) ||
                        (v === wo.SUBTITLE &&
                          (O = l.subtitleGroups) != null &&
                          O.some(function (L) {
                            return H.hasSubtitleGroup(L);
                          })) ||
                        (b && l.audioCodec === H.audioCodec) ||
                        (!b && l.audioCodec !== H.audioCodec) ||
                        (w && l.codecSet === H.codecSet)
                      )
                        return "continue";
                      return (h = G), "break";
                    }
                  },
                  P = f.length;
                P--;

              ) {
                var I,
                  O,
                  X = N();
                if (X !== "continue" && X === "break") break;
              }
              if (h > -1 && o.loadLevel !== h)
                return (
                  (r.levelRetry = !0),
                  (this.playlistError = 0),
                  {
                    action: Qd.SendAlternateToPenaltyBox,
                    flags: o0.None,
                    nextAutoLevel: h,
                  }
                );
            }
            return {
              action: Qd.SendAlternateToPenaltyBox,
              flags: o0.MoveAllAlternatesMatchingHost,
            };
          },
        },
        {
          key: "onErrorOut",
          value: function (r, i) {
            var o;
            switch ((o = i.errorAction) == null ? void 0 : o.action) {
              case Qd.DoNothing:
                break;
              case Qd.SendAlternateToPenaltyBox:
                this.sendAlternateToPenaltyBox(i),
                  i.errorAction.resolved || i.details === kr.FRAG_GAP
                    ? /MediaSource readyState: ended/.test(i.error.message) &&
                      (this.warn(
                        'MediaSource ended after "'.concat(
                          i.sourceBufferName,
                          '" sourceBuffer append error. Attempting to recover from media error.'
                        )
                      ),
                      this.hls.recoverMediaError())
                    : (i.fatal = !0);
            }
            i.fatal && this.hls.stopLoad();
          },
        },
        {
          key: "sendAlternateToPenaltyBox",
          value: function (r) {
            var i = this.hls,
              o = r.errorAction;
            if (o) {
              var l = Ca(o),
                u = o.hdcpLevel,
                c = o.nextAutoLevel;
              switch (l) {
                case o0.None:
                  this.switchLevel(r, c);
                  break;
                case o0.MoveAllAlternatesMatchingHDCP:
                  u &&
                    ((i.maxHdcpLevel = GV[qt(GV).call(GV, u) - 1]),
                    (o.resolved = !0)),
                    this.warn(
                      'Restricting playback to HDCP-LEVEL of "'.concat(
                        i.maxHdcpLevel,
                        '" or lower'
                      )
                    );
              }
              o.resolved || this.switchLevel(r, c);
            }
          },
        },
        {
          key: "switchLevel",
          value: function (r, i) {
            var o;
            i !== void 0 &&
              r.errorAction &&
              (this.warn(
                Ce((o = "switching to level ".concat(i, " after "))).call(
                  o,
                  r.details
                )
              ),
              (this.hls.nextAutoLevel = i),
              (r.errorAction.resolved = !0),
              (this.hls.nextLoadLevel = this.hls.nextAutoLevel));
          },
        },
      ]),
      n
    );
  })();
function kx(t) {
  var e = { action: Qd.DoNothing, flags: o0.None };
  return t && (e.resolved = !0), e;
}
var c0 = {
    NOT_LOADED: "NOT_LOADED",
    APPENDING: "APPENDING",
    PARTIAL: "PARTIAL",
    OK: "OK",
  },
  rE = { cbc: 0, ctr: 1 },
  dBt = (function () {
    function t(e, n, r) {
      Wn(this, t),
        (this.subtle = void 0),
        (this.aesIV = void 0),
        (this.aesMode = void 0),
        (this.subtle = e),
        (this.aesIV = n),
        (this.aesMode = r);
    }
    return (
      Kn(t, [
        {
          key: "decrypt",
          value: function (e, n) {
            switch (this.aesMode) {
              case rE.cbc:
                return this.subtle.decrypt(
                  { name: "AES-CBC", iv: this.aesIV },
                  n,
                  e
                );
              case rE.ctr:
                return this.subtle.decrypt(
                  { name: "AES-CTR", counter: this.aesIV, length: 64 },
                  n,
                  e
                );
              default:
                throw new Error(
                  "[AESCrypto] invalid aes mode ".concat(this.aesMode)
                );
            }
          },
        },
      ]),
      t
    );
  })();
function IS(t, e, n) {
  return jn(Uint8Array.prototype)
    ? jn(t).call(t, e, n)
    : new Uint8Array(jn(Array.prototype).call(t, e, n));
}
function hBt(t) {
  var e = t.byteLength,
    n = e && new DataView(t.buffer).getUint8(e - 1);
  return n ? IS(t, 0, e - n) : t;
}
var fBt = (function () {
    function t() {
      Wn(this, t),
        (this.rcon = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]),
        (this.subMix = [
          new Uint32Array(256),
          new Uint32Array(256),
          new Uint32Array(256),
          new Uint32Array(256),
        ]),
        (this.invSubMix = [
          new Uint32Array(256),
          new Uint32Array(256),
          new Uint32Array(256),
          new Uint32Array(256),
        ]),
        (this.sBox = new Uint32Array(256)),
        (this.invSBox = new Uint32Array(256)),
        (this.key = new Uint32Array(0)),
        (this.ksRows = 0),
        (this.keySize = 0),
        (this.keySchedule = void 0),
        (this.invKeySchedule = void 0),
        this.initTable();
    }
    return (
      Kn(t, [
        {
          key: "uint8ArrayToUint32Array_",
          value: function (e) {
            for (
              var n = new DataView(e), r = new Uint32Array(4), i = 0;
              i < 4;
              i++
            )
              r[i] = n.getUint32(4 * i);
            return r;
          },
        },
        {
          key: "initTable",
          value: function () {
            var e = this.sBox,
              n = this.invSBox,
              r = this.subMix,
              i = r[0],
              o = r[1],
              l = r[2],
              u = r[3],
              c = this.invSubMix,
              d = c[0],
              h = c[1],
              f = c[2],
              p = c[3],
              g = new Uint32Array(256),
              y = 0,
              v = 0,
              b = 0;
            for (b = 0; b < 256; b++) g[b] = b < 128 ? b << 1 : (b << 1) ^ 283;
            for (b = 0; b < 256; b++) {
              var w = v ^ (v << 1) ^ (v << 2) ^ (v << 3) ^ (v << 4);
              (w = (w >>> 8) ^ (255 & w) ^ 99), (e[y] = w), (n[w] = y);
              var k = g[y],
                D = g[k],
                $ = g[D],
                N = (257 * g[w]) ^ (16843008 * w);
              (i[y] = (N << 24) | (N >>> 8)),
                (o[y] = (N << 16) | (N >>> 16)),
                (l[y] = (N << 8) | (N >>> 24)),
                (u[y] = N),
                (N = (16843009 * $) ^ (65537 * D) ^ (257 * k) ^ (16843008 * y)),
                (d[w] = (N << 24) | (N >>> 8)),
                (h[w] = (N << 16) | (N >>> 16)),
                (f[w] = (N << 8) | (N >>> 24)),
                (p[w] = N),
                y ? ((y = k ^ g[g[g[$ ^ k]]]), (v ^= g[g[v]])) : (y = v = 1);
            }
          },
        },
        {
          key: "expandKey",
          value: function (e) {
            for (
              var n = this.uint8ArrayToUint32Array_(e), r = !0, i = 0;
              i < n.length && r;

            )
              (r = n[i] === this.key[i]), i++;
            if (!r) {
              this.key = n;
              var o = (this.keySize = n.length);
              if (o !== 4 && o !== 6 && o !== 8)
                throw new Error("Invalid aes key size=" + o);
              var l,
                u,
                c,
                d,
                h = (this.ksRows = 4 * (o + 6 + 1)),
                f = (this.keySchedule = new Uint32Array(h)),
                p = (this.invKeySchedule = new Uint32Array(h)),
                g = this.sBox,
                y = this.rcon,
                v = this.invSubMix,
                b = v[0],
                w = v[1],
                k = v[2],
                D = v[3];
              for (l = 0; l < h; l++)
                l < o
                  ? (c = f[l] = n[l])
                  : ((d = c),
                    l % o == 0
                      ? ((d =
                          (g[(d = (d << 8) | (d >>> 24)) >>> 24] << 24) |
                          (g[(d >>> 16) & 255] << 16) |
                          (g[(d >>> 8) & 255] << 8) |
                          g[255 & d]),
                        (d ^= y[(l / o) | 0] << 24))
                      : o > 6 &&
                        l % o == 4 &&
                        (d =
                          (g[d >>> 24] << 24) |
                          (g[(d >>> 16) & 255] << 16) |
                          (g[(d >>> 8) & 255] << 8) |
                          g[255 & d]),
                    (f[l] = c = (f[l - o] ^ d) >>> 0));
              for (u = 0; u < h; u++)
                (l = h - u),
                  (d = 3 & u ? f[l] : f[l - 4]),
                  (p[u] =
                    u < 4 || l <= 4
                      ? d
                      : b[g[d >>> 24]] ^
                        w[g[(d >>> 16) & 255]] ^
                        k[g[(d >>> 8) & 255]] ^
                        D[g[255 & d]]),
                  (p[u] = p[u] >>> 0);
            }
          },
        },
        {
          key: "networkToHostOrderSwap",
          value: function (e) {
            return (
              (e << 24) |
              ((65280 & e) << 8) |
              ((16711680 & e) >> 8) |
              (e >>> 24)
            );
          },
        },
        {
          key: "decrypt",
          value: function (e, n, r) {
            for (
              var i,
                o,
                l,
                u,
                c,
                d,
                h,
                f,
                p,
                g,
                y,
                v,
                b,
                w,
                k = this.keySize + 6,
                D = this.invKeySchedule,
                $ = this.invSBox,
                N = this.invSubMix,
                P = N[0],
                I = N[1],
                O = N[2],
                X = N[3],
                G = this.uint8ArrayToUint32Array_(r),
                H = G[0],
                E = G[1],
                S = G[2],
                L = G[3],
                W = new Int32Array(e),
                F = new Int32Array(W.length),
                oe = this.networkToHostOrderSwap;
              n < W.length;

            ) {
              for (
                p = oe(W[n]),
                  g = oe(W[n + 1]),
                  y = oe(W[n + 2]),
                  v = oe(W[n + 3]),
                  c = p ^ D[0],
                  d = v ^ D[1],
                  h = y ^ D[2],
                  f = g ^ D[3],
                  b = 4,
                  w = 1;
                w < k;
                w++
              )
                (i =
                  P[c >>> 24] ^
                  I[(d >> 16) & 255] ^
                  O[(h >> 8) & 255] ^
                  X[255 & f] ^
                  D[b]),
                  (o =
                    P[d >>> 24] ^
                    I[(h >> 16) & 255] ^
                    O[(f >> 8) & 255] ^
                    X[255 & c] ^
                    D[b + 1]),
                  (l =
                    P[h >>> 24] ^
                    I[(f >> 16) & 255] ^
                    O[(c >> 8) & 255] ^
                    X[255 & d] ^
                    D[b + 2]),
                  (u =
                    P[f >>> 24] ^
                    I[(c >> 16) & 255] ^
                    O[(d >> 8) & 255] ^
                    X[255 & h] ^
                    D[b + 3]),
                  (c = i),
                  (d = o),
                  (h = l),
                  (f = u),
                  (b += 4);
              (i =
                ($[c >>> 24] << 24) ^
                ($[(d >> 16) & 255] << 16) ^
                ($[(h >> 8) & 255] << 8) ^
                $[255 & f] ^
                D[b]),
                (o =
                  ($[d >>> 24] << 24) ^
                  ($[(h >> 16) & 255] << 16) ^
                  ($[(f >> 8) & 255] << 8) ^
                  $[255 & c] ^
                  D[b + 1]),
                (l =
                  ($[h >>> 24] << 24) ^
                  ($[(f >> 16) & 255] << 16) ^
                  ($[(c >> 8) & 255] << 8) ^
                  $[255 & d] ^
                  D[b + 2]),
                (u =
                  ($[f >>> 24] << 24) ^
                  ($[(c >> 16) & 255] << 16) ^
                  ($[(d >> 8) & 255] << 8) ^
                  $[255 & h] ^
                  D[b + 3]),
                (F[n] = oe(i ^ H)),
                (F[n + 1] = oe(u ^ E)),
                (F[n + 2] = oe(l ^ S)),
                (F[n + 3] = oe(o ^ L)),
                (H = p),
                (E = g),
                (S = y),
                (L = v),
                (n += 4);
            }
            return F.buffer;
          },
        },
      ]),
      t
    );
  })(),
  pBt = (function () {
    function t(e, n, r) {
      Wn(this, t),
        (this.subtle = void 0),
        (this.key = void 0),
        (this.aesMode = void 0),
        (this.subtle = e),
        (this.key = n),
        (this.aesMode = r);
    }
    return (
      Kn(t, [
        {
          key: "expandKey",
          value: function () {
            var e = gBt(this.aesMode);
            return this.subtle.importKey("raw", this.key, { name: e }, !1, [
              "encrypt",
              "decrypt",
            ]);
          },
        },
      ]),
      t
    );
  })();
function gBt(t) {
  switch (t) {
    case rE.cbc:
      return "AES-CBC";
    case rE.ctr:
      return "AES-CTR";
    default:
      throw new Error("[FastAESKey] invalid aes mode ".concat(t));
  }
}
function zp(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
  if (typeof TextDecoder < "u") {
    var n = new TextDecoder("utf-8").decode(t);
    if (e) {
      var r = qt(n).call(n, "\0");
      return r !== -1 ? n.substring(0, r) : n;
    }
    return n.replace(/\0/g, "");
  }
  for (var i, o, l, u = t.length, c = "", d = 0; d < u; ) {
    if ((i = t[d++]) === 0 && e) return c;
    if (i !== 0 && i !== 3)
      switch (i >> 4) {
        case 0:
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
        case 6:
        case 7:
          c += String.fromCharCode(i);
          break;
        case 12:
        case 13:
          (o = t[d++]), (c += String.fromCharCode(((31 & i) << 6) | (63 & o)));
          break;
        case 14:
          (o = t[d++]),
            (l = t[d++]),
            (c += String.fromCharCode(
              ((15 & i) << 12) | ((63 & o) << 6) | ((63 & l) << 0)
            ));
      }
  }
  return c;
}
var Fy = {
  hexDump: function (t) {
    for (var e = "", n = 0; n < t.length; n++) {
      var r = t[n].toString(16);
      r.length < 2 && (r = "0" + r), (e += r);
    }
    return e;
  },
};
function mBt(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default")
    ? t.default
    : t;
}
var yBt = Kn(function t() {
    Wn(this, t),
      (this.aborted = !1),
      (this.loaded = 0),
      (this.retry = 0),
      (this.total = 0),
      (this.chunkCount = 0),
      (this.bwEstimate = 0),
      (this.loading = { start: 0, first: 0, end: 0 }),
      (this.parsing = { start: 0, end: 0 }),
      (this.buffering = { start: 0, first: 0, end: 0 });
  }),
  nh = { AUDIO: "audio", VIDEO: "video", AUDIOVIDEO: "audiovideo" };
function vf(t) {
  return t.sn !== "initSegment";
}
var _U = Math.pow(2, 32) - 1,
  vBt = [].push,
  q8e = { video: 1, audio: 2, id3: 3, text: 4 };
function Ec(t) {
  return String.fromCharCode.apply(null, t);
}
function e9e(t, e) {
  var n = (t[e] << 8) | t[e + 1];
  return n < 0 ? 65536 + n : n;
}
function va(t, e) {
  var n = t9e(t, e);
  return n < 0 ? 4294967296 + n : n;
}
function Vve(t, e) {
  var n = va(t, e);
  return (n *= Math.pow(2, 32)), (n += va(t, e + 4));
}
function t9e(t, e) {
  return (t[e] << 24) | (t[e + 1] << 16) | (t[e + 2] << 8) | t[e + 3];
}
function NV(t, e, n) {
  (t[e] = n >> 24),
    (t[e + 1] = (n >> 16) & 255),
    (t[e + 2] = (n >> 8) & 255),
    (t[e + 3] = 255 & n);
}
function bBt(t) {
  for (var e = t.byteLength, n = 0; n < e; ) {
    var r = va(t, n);
    if (
      r > 8 &&
      t[n + 4] === 109 &&
      t[n + 5] === 111 &&
      t[n + 6] === 111 &&
      t[n + 7] === 102
    )
      return !0;
    n = r > 1 ? n + r : e;
  }
  return !1;
}
function ao(t, e) {
  var n = [];
  if (!e.length) return n;
  for (var r = t.byteLength, i = 0; i < r; ) {
    var o = va(t, i),
      l = o > 1 ? i + o : r;
    if (Ec(t.subarray(i + 4, i + 8)) === e[0])
      if (e.length === 1) n.push(t.subarray(i + 8, l));
      else {
        var u = ao(t.subarray(i + 8, l), jn(e).call(e, 1));
        u.length && vBt.apply(n, u);
      }
    i = l;
  }
  return n;
}
function _Bt(t) {
  var e = [],
    n = t[0],
    r = 8,
    i = va(t, r);
  r += 4;
  var o = 0,
    l = 0;
  n === 0
    ? ((o = va(t, r)), (l = va(t, r + 4)), (r += 8))
    : ((o = Vve(t, r)), (l = Vve(t, r + 8)), (r += 16)),
    (r += 2);
  var u = t.length + l,
    c = e9e(t, r);
  r += 2;
  for (var d = 0; d < c; d++) {
    var h = r,
      f = va(t, h);
    h += 4;
    var p = 2147483647 & f;
    if ((2147483648 & f) >>> 31 === 1)
      return Is.warn("SIDX has hierarchical references (not supported)"), null;
    var g = va(t, h);
    (h += 4),
      e.push({
        referenceSize: p,
        subsegmentDuration: g,
        info: { duration: g / i, start: u, end: u + p - 1 },
      }),
      (u += p),
      (r = h += 4);
  }
  return {
    earliestPresentationTime: o,
    timescale: i,
    version: n,
    referencesCount: c,
    references: e,
  };
}
function n9e(t) {
  for (var e = [], n = ao(t, ["moov", "trak"]), r = 0; r < n.length; r++) {
    var i = n[r],
      o = ao(i, ["tkhd"])[0];
    if (o) {
      var l = o[0],
        u = va(o, l === 0 ? 12 : 20),
        c = ao(i, ["mdia", "mdhd"])[0];
      if (c) {
        var d = va(c, (l = c[0]) === 0 ? 12 : 20),
          h = ao(i, ["mdia", "hdlr"])[0];
        if (h) {
          var f = Ec(h.subarray(8, 12)),
            p = { soun: nh.AUDIO, vide: nh.VIDEO }[f];
          if (p) {
            var g = TBt(ao(i, ["mdia", "minf", "stbl", "stsd"])[0]);
            (e[u] = { timescale: d, type: p }),
              (e[p] = fl({ timescale: d, id: u }, g));
          }
        }
      }
    }
  }
  return (
    ao(t, ["moov", "mvex", "trex"]).forEach(function (y) {
      var v = va(y, 4),
        b = e[v];
      b && (b.default = { duration: va(y, 12), flags: va(y, 20) });
    }),
    e
  );
}
function TBt(t) {
  var e = t.subarray(8),
    n = e.subarray(86),
    r = Ec(e.subarray(4, 8)),
    i = r,
    o = r === "enca" || r === "encv";
  if (o) {
    var l = ao(e, [r])[0];
    ao(l.subarray(r === "enca" ? 28 : 78), ["sinf"]).forEach(function (de) {
      var ue = ao(de, ["schm"])[0];
      if (ue) {
        var Z = Ec(ue.subarray(4, 8));
        if (Z === "cbcs" || Z === "cenc") {
          var ie = ao(de, ["frma"])[0];
          ie && (i = Ec(ie));
        }
      }
    });
  }
  switch (i) {
    case "avc1":
    case "avc2":
    case "avc3":
    case "avc4":
      var u = ao(n, ["avcC"])[0];
      i += "." + i3(u[1]) + i3(u[2]) + i3(u[3]);
      break;
    case "mp4a":
      var c = ao(e, [r])[0],
        d = ao(c.subarray(28), ["esds"])[0];
      if (d && d.length > 7) {
        var h = 4;
        if (d[h++] !== 3) break;
        (h = FV(d, h)), (h += 2);
        var f = d[h++];
        if ((128 & f && (h += 2), 64 & f && (h += d[h++]), d[h++] !== 4)) break;
        h = FV(d, h);
        var p = d[h++];
        if (p !== 64 || ((i += "." + i3(p)), (h += 12), d[h++] !== 5)) break;
        h = FV(d, h);
        var g = d[h++],
          y = (248 & g) >> 3;
        y === 31 && (y += 1 + ((7 & g) << 3) + ((224 & d[h]) >> 5)),
          (i += "." + y);
      }
      break;
    case "hvc1":
    case "hev1":
      var v = ao(n, ["hvcC"])[0],
        b = v[1],
        w = ["", "A", "B", "C"][b >> 6],
        k = 31 & b,
        D = va(v, 2),
        $ = (32 & b) >> 5 ? "H" : "L",
        N = v[12],
        P = v.subarray(6, 12);
      (i += "." + w + k),
        (i += "." + D.toString(16).toUpperCase()),
        (i += "." + $ + N);
      for (var I = "", O = P.length; O--; ) {
        var X = P[O];
        (X || I) && (I = "." + X.toString(16).toUpperCase() + I);
      }
      i += I;
      break;
    case "dvh1":
    case "dvhe":
      var G = ao(n, ["dvcC"])[0],
        H = (G[2] >> 1) & 127,
        E = ((G[2] << 5) & 32) | ((G[3] >> 3) & 31);
      i += "." + my(H) + "." + my(E);
      break;
    case "vp09":
      var S = ao(n, ["vpcC"])[0],
        L = S[4],
        W = S[5],
        F = (S[6] >> 4) & 15;
      i += "." + my(L) + "." + my(W) + "." + my(F);
      break;
    case "av01":
      var oe = ao(n, ["av1C"])[0],
        De = oe[1] >>> 5,
        Xe = 31 & oe[1],
        ze = oe[2] >>> 7 ? "H" : "M",
        ht = (64 & oe[2]) >> 6,
        gt = (32 & oe[2]) >> 5,
        pt = De === 2 && ht ? (gt ? 12 : 10) : ht ? 10 : 8,
        $t = (16 & oe[2]) >> 4,
        ot = (8 & oe[2]) >> 3,
        tt = (4 & oe[2]) >> 2,
        He = 3 & oe[2];
      i +=
        "." +
        De +
        "." +
        my(Xe) +
        ze +
        "." +
        my(pt) +
        "." +
        $t +
        "." +
        ot +
        tt +
        He +
        "." +
        my(1) +
        "." +
        my(1) +
        "." +
        my(1) +
        ".0";
  }
  return { codec: i, encrypted: o };
}
function FV(t, e) {
  for (var n = e + 5; 128 & t[e++] && e < n; );
  return e;
}
function i3(t) {
  var e;
  return jn((e = "0" + t.toString(16).toUpperCase())).call(e, -2);
}
function my(t) {
  return (t < 10 ? "0" : "") + t;
}
function EBt(t, e) {
  if (!t || !e) return t;
  var n = e.keyId;
  return (
    n &&
      e.isCommonEncryption &&
      ao(t, ["moov", "trak"]).forEach(function (r) {
        var i = ao(r, ["mdia", "minf", "stbl", "stsd"])[0].subarray(8),
          o = ao(i, ["enca"]),
          l = o.length > 0;
        l || (o = ao(i, ["encv"])),
          o.forEach(function (u) {
            ao(l ? u.subarray(28) : u.subarray(78), ["sinf"]).forEach(function (
              c
            ) {
              var d = r9e(c);
              if (d) {
                var h,
                  f,
                  p = d.subarray(8, 24);
                p.some(function (g) {
                  return g !== 0;
                }) ||
                  (Is.log(
                    Ce(
                      (h = Ce(
                        (f = "[eme] Patching keyId in 'enc".concat(
                          l ? "a" : "v",
                          ">sinf>>tenc' box: "
                        ))
                      ).call(f, Fy.hexDump(p), " -> "))
                    ).call(h, Fy.hexDump(n))
                  ),
                  d.set(n, 8));
              }
            });
          });
      }),
    t
  );
}
function r9e(t) {
  var e = ao(t, ["schm"])[0];
  if (e) {
    var n = Ec(e.subarray(4, 8));
    if (n === "cbcs" || n === "cenc") return ao(t, ["schi", "tenc"])[0];
  }
  return null;
}
function SBt(t, e) {
  var n;
  return ga((n = ao(e, ["moof", "traf"]))).call(
    n,
    function (r, i) {
      var o,
        l = ao(i, ["tfdt"])[0],
        u = l[0],
        c = ga((o = ao(i, ["tfhd"]))).call(
          o,
          function (d, h) {
            var f = va(h, 4),
              p = t[f];
            if (p) {
              var g = va(l, 4);
              if (u === 1) {
                if (g === _U)
                  return (
                    Is.warn(
                      "[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"
                    ),
                    d
                  );
                (g *= _U + 1), (g += va(l, 8));
              }
              var y = g / (p.timescale || 9e4);
              if (_a(y) && (d === null || y < d)) return y;
            }
            return d;
          },
          null
        );
      return c !== null && _a(c) && (r === null || c < r) ? c : r;
    },
    null
  );
}
function RBt(t, e) {
  for (
    var n = 0, r = 0, i = 0, o = ao(t, ["moof", "traf"]), l = 0;
    l < o.length;
    l++
  ) {
    var u = o[l],
      c = ao(u, ["tfhd"])[0],
      d = e[va(c, 4)];
    if (d) {
      var h = d.default,
        f = va(c, 0) | (h == null ? void 0 : Ca(h)),
        p = h == null ? void 0 : h.duration;
      8 & f && (p = va(c, 2 & f ? 12 : 8));
      for (
        var g = d.timescale || 9e4, y = ao(u, ["trun"]), v = 0;
        v < y.length;
        v++
      )
        !(n = ABt(y[v])) && p && (n = p * va(y[v], 4)),
          d.type === nh.VIDEO
            ? (r += n / g)
            : d.type === nh.AUDIO && (i += n / g);
    }
  }
  if (r === 0 && i === 0) {
    for (
      var b = 1 / 0, w = 0, k = 0, D = ao(t, ["sidx"]), $ = 0;
      $ < D.length;
      $++
    ) {
      var N = _Bt(D[$]);
      if (N != null && N.references) {
        var P;
        b = Math.min(b, N.earliestPresentationTime / N.timescale);
        var I = ga((P = N.references)).call(
          P,
          function (O, X) {
            return O + X.info.duration || 0;
          },
          0
        );
        k = (w = Math.max(w, I + N.earliestPresentationTime / N.timescale)) - b;
      }
    }
    if (k && _a(k)) return k;
  }
  return r || i;
}
function ABt(t) {
  var e = va(t, 0),
    n = 8;
  1 & e && (n += 4), 4 & e && (n += 4);
  for (var r = 0, i = va(t, 4), o = 0; o < i; o++)
    256 & e && ((r += va(t, n)), (n += 4)),
      512 & e && (n += 4),
      1024 & e && (n += 4),
      2048 & e && (n += 4);
  return r;
}
function wBt(t, e, n) {
  ao(e, ["moof", "traf"]).forEach(function (r) {
    ao(r, ["tfhd"]).forEach(function (i) {
      var o = va(i, 4),
        l = t[o];
      if (l) {
        var u = l.timescale || 9e4;
        ao(r, ["tfdt"]).forEach(function (c) {
          var d = c[0],
            h = n * u;
          if (h) {
            var f = va(c, 4);
            if (d === 0) (f -= h), NV(c, 4, (f = Math.max(f, 0)));
            else {
              (f *= Math.pow(2, 32)),
                (f += va(c, 8)),
                (f -= h),
                (f = Math.max(f, 0));
              var p = Math.floor(f / (_U + 1)),
                g = Math.floor(f % (_U + 1));
              NV(c, 4, p), NV(c, 8, g);
            }
          }
        });
      }
    });
  });
}
function kBt(t) {
  var e = { valid: null, remainder: null },
    n = ao(t, ["moof"]);
  if (n.length < 2) return (e.remainder = t), e;
  var r = n[n.length - 1];
  return (
    (e.valid = IS(t, 0, r.byteOffset - 8)),
    (e.remainder = IS(t, r.byteOffset - 8)),
    e
  );
}
function dm(t, e) {
  var n = new Uint8Array(t.length + e.length);
  return n.set(t), n.set(e, t.length), n;
}
function zve(t, e) {
  var n = [],
    r = e.samples,
    i = e.timescale,
    o = e.id,
    l = !1,
    u = ao(r, ["moof"]);
  return (
    On(u).call(u, function (c) {
      var d = c.byteOffset - 8,
        h = ao(c, ["traf"]);
      On(h).call(h, function (f) {
        var p,
          g,
          y = On((p = ao(f, ["tfdt"]))).call(p, function (v) {
            var b = v[0],
              w = va(v, 4);
            return b === 1 && ((w *= Math.pow(2, 32)), (w += va(v, 8))), w / i;
          })[0];
        return (
          y !== void 0 && (t = y),
          On((g = ao(f, ["tfhd"]))).call(g, function (v) {
            var b,
              w = va(v, 4),
              k = 16777215 & va(v, 0),
              D = 0,
              $ = (16 & k) != 0,
              N = 0,
              P = (32 & k) != 0,
              I = 8;
            w === o &&
              (1 & k && (I += 8),
              2 & k && (I += 4),
              8 & k && ((D = va(v, I)), (I += 4)),
              $ && ((N = va(v, I)), (I += 4)),
              P && (I += 4),
              e.type === "video" && (l = IBt(e.codec)),
              On((b = ao(f, ["trun"]))).call(b, function (O) {
                var X = O[0],
                  G = 16777215 & va(O, 0),
                  H = (1 & G) != 0,
                  E = 0,
                  S = (4 & G) != 0,
                  L = (256 & G) != 0,
                  W = 0,
                  F = (512 & G) != 0,
                  oe = 0,
                  De = (1024 & G) != 0,
                  Xe = (2048 & G) != 0,
                  ze = 0,
                  ht = va(O, 4),
                  gt = 8;
                H && ((E = va(O, gt)), (gt += 4)), S && (gt += 4);
                for (var pt = E + d, $t = 0; $t < ht; $t++) {
                  if (
                    (L ? ((W = va(O, gt)), (gt += 4)) : (W = D),
                    F ? ((oe = va(O, gt)), (gt += 4)) : (oe = N),
                    De && (gt += 4),
                    Xe && ((ze = X === 0 ? va(O, gt) : t9e(O, gt)), (gt += 4)),
                    e.type === nh.VIDEO)
                  )
                    for (var ot = 0; ot < oe; ) {
                      var tt = va(r, pt);
                      DBt(l, r[(pt += 4)]) &&
                        qse(r.subarray(pt, pt + tt), l ? 2 : 1, t + ze / i, n),
                        (pt += tt),
                        (ot += tt + 4);
                    }
                  t += W / i;
                }
              }));
          })
        );
      });
    }),
    n
  );
}
function IBt(t) {
  if (!t) return !1;
  var e = qt(t).call(t, "."),
    n = e < 0 ? t : t.substring(0, e);
  return n === "hvc1" || n === "hev1" || n === "dvh1" || n === "dvhe";
}
function DBt(t, e) {
  if (t) {
    var n = (e >> 1) & 63;
    return n === 39 || n === 40;
  }
  return (31 & e) === 6;
}
function qse(t, e, n, r) {
  var i = i9e(t),
    o = 0;
  o += e;
  for (var l = 0, u = 0, c = 0; o < i.length; ) {
    l = 0;
    do {
      if (o >= i.length) break;
      l += c = i[o++];
    } while (c === 255);
    u = 0;
    do {
      if (o >= i.length) break;
      u += c = i[o++];
    } while (c === 255);
    var d = i.length - o,
      h = o;
    if (u < d) o += u;
    else if (u > d) {
      var f;
      Is.error(
        Ce(
          (f = "Malformed SEI payload. ".concat(u, " is too small, only "))
        ).call(f, d, " bytes left to parse.")
      );
      break;
    }
    if (l === 4) {
      if (i[h++] === 181) {
        var p = e9e(i, h);
        if (((h += 2), p === 49)) {
          var g = va(i, h);
          if (((h += 4), g === 1195456820)) {
            var y = i[h++];
            if (y === 3) {
              var v = i[h++],
                b = 64 & v,
                w = b ? 2 + 3 * (31 & v) : 0,
                k = new Uint8Array(w);
              if (b) {
                k[0] = v;
                for (var D = 1; D < w; D++) k[D] = i[h++];
              }
              r.push({ type: y, payloadType: l, pts: n, bytes: k });
            }
          }
        }
      }
    } else if (l === 5 && u > 16) {
      for (var $ = [], N = 0; N < 16; N++) {
        var P = i[h++].toString(16);
        $.push(P.length == 1 ? "0" + P : P),
          (N !== 3 && N !== 5 && N !== 7 && N !== 9) || $.push("-");
      }
      for (var I = u - 16, O = new Uint8Array(I), X = 0; X < I; X++)
        O[X] = i[h++];
      r.push({
        payloadType: l,
        pts: n,
        uuid: $.join(""),
        userData: zp(O),
        userDataBytes: O,
      });
    }
  }
}
function i9e(t) {
  for (var e = t.byteLength, n = [], r = 1; r < e - 2; )
    t[r] === 0 && t[r + 1] === 0 && t[r + 2] === 3
      ? (n.push(r + 2), (r += 2))
      : r++;
  if (n.length === 0) return t;
  var i = e - n.length,
    o = new Uint8Array(i),
    l = 0;
  for (r = 0; r < i; l++, r++) l === n[0] && (l++, n.shift()), (o[r] = t[l]);
  return o;
}
function PBt(t) {
  var e = t[0],
    n = "",
    r = "",
    i = 0,
    o = 0,
    l = 0,
    u = 0,
    c = 0,
    d = 0;
  if (e === 0) {
    for (; Ec(t.subarray(d, d + 1)) !== "\0"; )
      (n += Ec(t.subarray(d, d + 1))), (d += 1);
    for (
      n += Ec(t.subarray(d, d + 1)), d += 1;
      Ec(t.subarray(d, d + 1)) !== "\0";

    )
      (r += Ec(t.subarray(d, d + 1))), (d += 1);
    (r += Ec(t.subarray(d, d + 1))),
      (d += 1),
      (i = va(t, 12)),
      (o = va(t, 16)),
      (u = va(t, 20)),
      (c = va(t, 24)),
      (d = 28);
  } else if (e === 1) {
    i = va(t, (d += 4));
    var h = va(t, (d += 4)),
      f = va(t, (d += 4));
    for (
      d += 4,
        l = Math.pow(2, 32) * h + f,
        C9t(l) ||
          ((l = Ax),
          Is.warn(
            "Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box"
          )),
        u = va(t, d),
        c = va(t, (d += 4)),
        d += 4;
      Ec(t.subarray(d, d + 1)) !== "\0";

    )
      (n += Ec(t.subarray(d, d + 1))), (d += 1);
    for (
      n += Ec(t.subarray(d, d + 1)), d += 1;
      Ec(t.subarray(d, d + 1)) !== "\0";

    )
      (r += Ec(t.subarray(d, d + 1))), (d += 1);
    (r += Ec(t.subarray(d, d + 1))), (d += 1);
  }
  return {
    schemeIdUri: n,
    value: r,
    timeScale: i,
    presentationTime: l,
    presentationTimeDelta: o,
    eventDuration: u,
    id: c,
    payload: t.subarray(d, t.byteLength),
  };
}
function MBt(t) {
  for (
    var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), r = 1;
    r < e;
    r++
  )
    n[r - 1] = arguments[r];
  for (var i = n.length, o = 8, l = i; l--; ) o += n[l].byteLength;
  var u = new Uint8Array(o);
  for (
    u[0] = (o >> 24) & 255,
      u[1] = (o >> 16) & 255,
      u[2] = (o >> 8) & 255,
      u[3] = 255 & o,
      u.set(t, 4),
      l = 0,
      o = 8;
    l < i;
    l++
  )
    u.set(n[l], o), (o += n[l].byteLength);
  return u;
}
function CBt(t, e, n) {
  if (t.byteLength !== 16) throw new RangeError("Invalid system id");
  var r, i;
  (r = new Uint8Array()), (i = new Uint8Array());
  var o = new Uint8Array(4);
  return (
    n &&
      n.byteLength > 0 &&
      new DataView(o.buffer).setUint32(0, n.byteLength, !1),
    MBt(
      [112, 115, 115, 104],
      new Uint8Array([0, 0, 0, 0]),
      t,
      i,
      r,
      o,
      n || new Uint8Array()
    )
  );
}
function $Bt(t) {
  var e = [];
  if (t instanceof ArrayBuffer)
    for (var n = t.byteLength, r = 0; r + 32 < n; ) {
      var i = xBt(new DataView(t, r));
      e.push(i), (r += i.size);
    }
  return e;
}
function xBt(t) {
  var e = t.getUint32(0),
    n = t.byteOffset,
    r = t.byteLength;
  if (r < e) return { offset: n, size: r };
  if (t.getUint32(4) !== 1886614376) return { offset: n, size: e };
  var i = t.getUint32(8) >>> 24;
  if (i !== 0 && i !== 1) return { offset: n, size: e };
  var o = t.buffer,
    l = Fy.hexDump(new Uint8Array(o, n + 12, 16)),
    u = t.getUint32(28),
    c = null,
    d = null;
  if (i === 0) {
    if (e - 32 < u || u < 22) return { offset: n, size: e };
    d = new Uint8Array(o, n + 32, u);
  } else if (i === 1) {
    if (!u || r < n + 32 + 16 * u + 16) return { offset: n, size: e };
    c = [];
    for (var h = 0; h < u; h++) c.push(new Uint8Array(o, n + 32 + 16 * h, 16));
  }
  return { version: i, systemId: l, kids: c, data: d, offset: n, size: e };
}
var LBt = 16,
  ele = (function () {
    function t(e) {
      var n = (
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}
        ).removePKCS7Padding,
        r = n === void 0 || n;
      if (
        (Wn(this, t),
        (this.logEnabled = !0),
        (this.removePKCS7Padding = void 0),
        (this.subtle = null),
        (this.softwareDecrypter = null),
        (this.key = null),
        (this.fastAesKey = null),
        (this.remainderData = null),
        (this.currentIV = null),
        (this.currentResult = null),
        (this.useSoftware = void 0),
        (this.enableSoftwareAES = void 0),
        (this.enableSoftwareAES = e.enableSoftwareAES),
        (this.removePKCS7Padding = r),
        r)
      )
        try {
          var i = self.crypto;
          i && (this.subtle = i.subtle || i.webkitSubtle);
        } catch {}
      this.useSoftware = !this.subtle;
    }
    return (
      Kn(t, [
        {
          key: "destroy",
          value: function () {
            (this.subtle = null),
              (this.softwareDecrypter = null),
              (this.key = null),
              (this.fastAesKey = null),
              (this.remainderData = null),
              (this.currentIV = null),
              (this.currentResult = null);
          },
        },
        {
          key: "isSync",
          value: function () {
            return this.useSoftware;
          },
        },
        {
          key: "flush",
          value: function () {
            var e = this.currentResult,
              n = this.remainderData;
            if (!e || n) return this.reset(), null;
            var r = new Uint8Array(e);
            return this.reset(), this.removePKCS7Padding ? hBt(r) : r;
          },
        },
        {
          key: "reset",
          value: function () {
            (this.currentResult = null),
              (this.currentIV = null),
              (this.remainderData = null),
              this.softwareDecrypter && (this.softwareDecrypter = null);
          },
        },
        {
          key: "decrypt",
          value: function (e, n, r, i) {
            var o = this;
            return this.useSoftware
              ? new Ar(function (l, u) {
                  var c = ArrayBuffer.isView(e) ? e : new Uint8Array(e);
                  o.softwareDecrypt(c, n, r, i);
                  var d = o.flush();
                  d
                    ? l(d.buffer)
                    : u(new Error("[softwareDecrypt] Failed to decrypt data"));
                })
              : this.webCryptoDecrypt(new Uint8Array(e), n, r, i);
          },
        },
        {
          key: "softwareDecrypt",
          value: function (e, n, r, i) {
            var o = this.currentIV,
              l = this.currentResult,
              u = this.remainderData;
            if (i !== rE.cbc || n.byteLength !== 16)
              return (
                Is.warn("SoftwareDecrypt: can only handle AES-128-CBC"), null
              );
            this.logOnce("JS AES decrypt"),
              u && ((e = dm(u, e)), (this.remainderData = null));
            var c = this.getValidChunk(e);
            if (!c.length) return null;
            o && (r = o);
            var d = this.softwareDecrypter;
            d || (d = this.softwareDecrypter = new fBt()), d.expandKey(n);
            var h = l;
            return (
              (this.currentResult = d.decrypt(c.buffer, 0, r)),
              (this.currentIV = IS(c, -16).buffer),
              h || null
            );
          },
        },
        {
          key: "webCryptoDecrypt",
          value: function (e, n, r, i) {
            var o = this;
            if (this.key !== n || !this.fastAesKey) {
              if (!this.subtle)
                return Ar.resolve(this.onWebCryptoError(e, n, r, i));
              (this.key = n), (this.fastAesKey = new pBt(this.subtle, n, i));
            }
            return this.fastAesKey
              .expandKey()
              .then(function (l) {
                return o.subtle
                  ? (o.logOnce("WebCrypto AES decrypt"),
                    new dBt(o.subtle, new Uint8Array(r), i).decrypt(
                      e.buffer,
                      l
                    ))
                  : Ar.reject(new Error("web crypto not initialized"));
              })
              .catch(function (l) {
                var u;
                return (
                  Is.warn(
                    Ce(
                      (u =
                        "[decrypter]: WebCrypto Error, disable WebCrypto API, ".concat(
                          l.name,
                          ": "
                        ))
                    ).call(u, l.message)
                  ),
                  o.onWebCryptoError(e, n, r, i)
                );
              });
          },
        },
        {
          key: "onWebCryptoError",
          value: function (e, n, r, i) {
            var o = this.enableSoftwareAES;
            if (o) {
              (this.useSoftware = !0),
                (this.logEnabled = !0),
                this.softwareDecrypt(e, n, r, i);
              var l = this.flush();
              if (l) return l.buffer;
            }
            throw new Error(
              "WebCrypto" +
                (o ? " and softwareDecrypt" : "") +
                ": failed to decrypt data"
            );
          },
        },
        {
          key: "getValidChunk",
          value: function (e) {
            var n = e,
              r = e.length - (e.length % LBt);
            return (
              r !== e.length &&
                ((n = IS(e, 0, r)), (this.remainderData = IS(e, r))),
              n
            );
          },
        },
        {
          key: "logOnce",
          value: function (e) {
            this.logEnabled &&
              (Is.log("[decrypter]: ".concat(e)), (this.logEnabled = !1));
          },
        },
      ]),
      t
    );
  })(),
  jve = Math.pow(2, 17),
  OBt = (function () {
    function t(e) {
      Wn(this, t),
        (this.config = void 0),
        (this.loader = null),
        (this.partLoadTimeout = -1),
        (this.config = e);
    }
    return (
      Kn(t, [
        {
          key: "destroy",
          value: function () {
            this.loader && (this.loader.destroy(), (this.loader = null));
          },
        },
        {
          key: "abort",
          value: function () {
            this.loader && this.loader.abort();
          },
        },
        {
          key: "load",
          value: function (e, n) {
            var r = this,
              i = e.url;
            if (!i)
              return Ar.reject(
                new gT({
                  type: no.NETWORK_ERROR,
                  details: kr.FRAG_LOAD_ERROR,
                  fatal: !1,
                  frag: e,
                  error: new Error(
                    "Fragment does not have a ".concat(i ? "part list" : "url")
                  ),
                  networkDetails: null,
                })
              );
            this.abort();
            var o = this.config,
              l = o.fLoader,
              u = o.loader;
            return new Ar(function (c, d) {
              if ((r.loader && r.loader.destroy(), e.gap)) {
                if (
                  e.tagList.some(function (v) {
                    return v[0] === "GAP";
                  })
                )
                  return void d(Kve(e));
                e.gap = !1;
              }
              var h = (r.loader = l ? new l(o) : new u(o)),
                f = Wve(e);
              e.loader = h;
              var p = Xve(o.fragLoadPolicy.default),
                g = {
                  loadPolicy: p,
                  timeout: p.maxLoadTimeMs,
                  maxRetry: 0,
                  retryDelay: 0,
                  maxRetryDelay: 0,
                  highWaterMark: e.sn === "initSegment" ? 1 / 0 : jve,
                };
              e.stats = h.stats;
              var y = {
                onSuccess: function (v, b, w, k) {
                  r.resetLoader(e, h);
                  var D = v.data;
                  w.resetIV &&
                    e.decryptdata &&
                    ((e.decryptdata.iv = new Uint8Array(jn(D).call(D, 0, 16))),
                    (D = jn(D).call(D, 16))),
                    c({ frag: e, part: null, payload: D, networkDetails: k });
                },
                onError: function (v, b, w, k) {
                  var D;
                  r.resetLoader(e, h),
                    d(
                      new gT({
                        type: no.NETWORK_ERROR,
                        details: kr.FRAG_LOAD_ERROR,
                        fatal: !1,
                        frag: e,
                        response: fl({ url: i, data: void 0 }, v),
                        error: new Error(
                          Ce((D = "HTTP Error ".concat(v.code, " "))).call(
                            D,
                            v.text
                          )
                        ),
                        networkDetails: w,
                        stats: k,
                      })
                    );
                },
                onAbort: function (v, b, w) {
                  r.resetLoader(e, h),
                    d(
                      new gT({
                        type: no.NETWORK_ERROR,
                        details: kr.INTERNAL_ABORTED,
                        fatal: !1,
                        frag: e,
                        error: new Error("Aborted"),
                        networkDetails: w,
                        stats: v,
                      })
                    );
                },
                onTimeout: function (v, b, w) {
                  r.resetLoader(e, h),
                    d(
                      new gT({
                        type: no.NETWORK_ERROR,
                        details: kr.FRAG_LOAD_TIMEOUT,
                        fatal: !1,
                        frag: e,
                        error: new Error(
                          "Timeout after ".concat(g.timeout, "ms")
                        ),
                        networkDetails: w,
                        stats: v,
                      })
                    );
                },
              };
              n &&
                (y.onProgress = function (v, b, w, k) {
                  return n({
                    frag: e,
                    part: null,
                    payload: w,
                    networkDetails: k,
                  });
                }),
                h.load(f, g, y);
            });
          },
        },
        {
          key: "loadPart",
          value: function (e, n, r) {
            var i = this;
            this.abort();
            var o = this.config,
              l = o.fLoader,
              u = o.loader;
            return new Ar(function (c, d) {
              if ((i.loader && i.loader.destroy(), e.gap || n.gap))
                d(Kve(e, n));
              else {
                var h = (i.loader = l ? new l(o) : new u(o)),
                  f = Wve(e, n);
                e.loader = h;
                var p = Xve(o.fragLoadPolicy.default),
                  g = {
                    loadPolicy: p,
                    timeout: p.maxLoadTimeMs,
                    maxRetry: 0,
                    retryDelay: 0,
                    maxRetryDelay: 0,
                    highWaterMark: jve,
                  };
                (n.stats = h.stats),
                  h.load(f, g, {
                    onSuccess: function (y, v, b, w) {
                      i.resetLoader(e, h), i.updateStatsFromPart(e, n);
                      var k = {
                        frag: e,
                        part: n,
                        payload: y.data,
                        networkDetails: w,
                      };
                      r(k), c(k);
                    },
                    onError: function (y, v, b, w) {
                      var k;
                      i.resetLoader(e, h),
                        d(
                          new gT({
                            type: no.NETWORK_ERROR,
                            details: kr.FRAG_LOAD_ERROR,
                            fatal: !1,
                            frag: e,
                            part: n,
                            response: fl({ url: f.url, data: void 0 }, y),
                            error: new Error(
                              Ce((k = "HTTP Error ".concat(y.code, " "))).call(
                                k,
                                y.text
                              )
                            ),
                            networkDetails: b,
                            stats: w,
                          })
                        );
                    },
                    onAbort: function (y, v, b) {
                      (e.stats.aborted = n.stats.aborted),
                        i.resetLoader(e, h),
                        d(
                          new gT({
                            type: no.NETWORK_ERROR,
                            details: kr.INTERNAL_ABORTED,
                            fatal: !1,
                            frag: e,
                            part: n,
                            error: new Error("Aborted"),
                            networkDetails: b,
                            stats: y,
                          })
                        );
                    },
                    onTimeout: function (y, v, b) {
                      i.resetLoader(e, h),
                        d(
                          new gT({
                            type: no.NETWORK_ERROR,
                            details: kr.FRAG_LOAD_TIMEOUT,
                            fatal: !1,
                            frag: e,
                            part: n,
                            error: new Error(
                              "Timeout after ".concat(g.timeout, "ms")
                            ),
                            networkDetails: b,
                            stats: y,
                          })
                        );
                    },
                  });
              }
            });
          },
        },
        {
          key: "updateStatsFromPart",
          value: function (e, n) {
            var r = e.stats,
              i = n.stats,
              o = i.total;
            if (((r.loaded += i.loaded), o)) {
              var l = Math.round(e.duration / n.duration),
                u = Math.min(Math.round(r.loaded / o), l),
                c = (l - u) * Math.round(r.loaded / u);
              r.total = r.loaded + c;
            } else r.total = Math.max(r.loaded, r.total);
            var d = r.loading,
              h = i.loading;
            d.start
              ? (d.first += h.first - h.start)
              : ((d.start = h.start), (d.first = h.first)),
              (d.end = h.end);
          },
        },
        {
          key: "resetLoader",
          value: function (e, n) {
            (e.loader = null),
              this.loader === n &&
                (self.clearTimeout(this.partLoadTimeout), (this.loader = null)),
              n.destroy();
          },
        },
      ]),
      t
    );
  })();
function Wve(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null,
    n = e || t,
    r = {
      frag: t,
      part: e,
      responseType: "arraybuffer",
      url: n.url,
      headers: {},
      rangeStart: 0,
      rangeEnd: 0,
    },
    i = n.byteRangeStartOffset,
    o = n.byteRangeEndOffset;
  if (_a(i) && _a(o)) {
    var l,
      u = i,
      c = o;
    if (
      t.sn === "initSegment" &&
      GBt((l = t.decryptdata) == null ? void 0 : l.method)
    ) {
      var d = o - i;
      d % 16 && (c = o + (16 - (d % 16))),
        i !== 0 && ((r.resetIV = !0), (u = i - 16));
    }
    (r.rangeStart = u), (r.rangeEnd = c);
  }
  return r;
}
function Kve(t, e) {
  var n = new Error("GAP ".concat(t.gap ? "tag" : "attribute", " found")),
    r = {
      type: no.MEDIA_ERROR,
      details: kr.FRAG_GAP,
      fatal: !1,
      frag: t,
      error: n,
      networkDetails: null,
    };
  return e && (r.part = e), ((e || t).stats.aborted = !0), new gT(r);
}
function GBt(t) {
  return t === "AES-128" || t === "AES-256";
}
var gT = (function (t) {
    so(n, xI(Error));
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n),
        ((i = e.call(this, r.error.message)).data = void 0),
        (i.data = r),
        i
      );
    }
    return Kn(n);
  })(),
  NBt = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r, i) {
      var o;
      return (
        Wn(this, n),
        ((o = e.call(this, r, i))._boundTick = void 0),
        (o._tickTimer = null),
        (o._tickInterval = null),
        (o._tickCallCount = 0),
        (o._boundTick = o.tick.bind(os(o))),
        o
      );
    }
    return (
      Kn(n, [
        {
          key: "destroy",
          value: function () {
            this.onHandlerDestroying(), this.onHandlerDestroyed();
          },
        },
        {
          key: "onHandlerDestroying",
          value: function () {
            this.clearNextTick(), this.clearInterval();
          },
        },
        { key: "onHandlerDestroyed", value: function () {} },
        {
          key: "hasInterval",
          value: function () {
            return !!this._tickInterval;
          },
        },
        {
          key: "hasNextTick",
          value: function () {
            return !!this._tickTimer;
          },
        },
        {
          key: "setInterval",
          value: function (r) {
            return (
              !this._tickInterval &&
              ((this._tickCallCount = 0),
              (this._tickInterval = self.setInterval(this._boundTick, r)),
              !0)
            );
          },
        },
        {
          key: "clearInterval",
          value: function () {
            return (
              !!this._tickInterval &&
              (self.clearInterval(this._tickInterval),
              (this._tickInterval = null),
              !0)
            );
          },
        },
        {
          key: "clearNextTick",
          value: function () {
            return (
              !!this._tickTimer &&
              (self.clearTimeout(this._tickTimer), (this._tickTimer = null), !0)
            );
          },
        },
        {
          key: "tick",
          value: function () {
            this._tickCallCount++,
              this._tickCallCount === 1 &&
                (this.doTick(),
                this._tickCallCount > 1 && this.tickImmediate(),
                (this._tickCallCount = 0));
          },
        },
        {
          key: "tickImmediate",
          value: function () {
            this.clearNextTick(),
              (this._tickTimer = self.setTimeout(this._boundTick, 0));
          },
        },
        { key: "doTick", value: function () {} },
      ]),
      n
    );
  })(),
  a9e = Kn(function t(e, n, r) {
    var i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0,
      o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1,
      l = arguments.length > 5 && arguments[5] !== void 0 && arguments[5];
    Wn(this, t),
      (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 = a3()),
      (this.buffering = { audio: a3(), video: a3(), audiovideo: a3() }),
      (this.level = e),
      (this.sn = n),
      (this.id = r),
      (this.size = i),
      (this.part = o),
      (this.partial = l);
  });
function a3() {
  return { start: 0, executeStart: 0, executeEnd: 0, end: 0 };
}
var Zve = {
    length: 0,
    start: function () {
      return 0;
    },
    end: function () {
      return 0;
    },
  },
  dc = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "isBuffered",
          value: function (e, n) {
            if (e) {
              for (var r = t.getBuffered(e), i = r.length; i--; )
                if (n >= r.start(i) && n <= r.end(i)) return !0;
            }
            return !1;
          },
        },
        {
          key: "bufferInfo",
          value: function (e, n, r) {
            if (e) {
              var i = t.getBuffered(e);
              if (i.length) {
                for (var o = [], l = 0; l < i.length; l++)
                  o.push({ start: i.start(l), end: i.end(l) });
                return t.bufferedInfo(o, n, r);
              }
            }
            return { len: 0, start: n, end: n, nextStart: void 0 };
          },
        },
        {
          key: "bufferedInfo",
          value: function (e, n, r) {
            (n = Math.max(0, n)),
              mm(e).call(e, function (v, b) {
                return v.start - b.start || b.end - v.end;
              });
            var i = [];
            if (r)
              for (var o = 0; o < e.length; o++) {
                var l = i.length;
                if (l) {
                  var u = i[l - 1].end;
                  e[o].start - u < r
                    ? e[o].end > u && (i[l - 1].end = e[o].end)
                    : i.push(e[o]);
                } else i.push(e[o]);
              }
            else i = e;
            for (var c, d = 0, h = n, f = n, p = 0; p < i.length; p++) {
              var g = i[p].start,
                y = i[p].end;
              if (n + r >= g && n < y) (h = g), (d = (f = y) - n);
              else if (n + r < g) {
                c = g;
                break;
              }
            }
            return { len: d, start: h || 0, end: f || 0, nextStart: c };
          },
        },
        {
          key: "getBuffered",
          value: function (e) {
            try {
              return e.buffered || Zve;
            } catch (n) {
              return Is.log("failed to get media.buffered", n), Zve;
            }
          },
        },
      ]),
      t
    );
  })(),
  FBt = /\{\$([a-zA-Z0-9-_]+)\}/g;
function UBt(t, e) {
  if (t.variableList !== null || t.hasVariableRefs) {
    var n = t.variableList;
    return e.replace(FBt, function (r) {
      var i = r.substring(2, r.length - 1),
        o = n == null ? void 0 : n[i];
      return o === void 0
        ? (t.playlistParsingError ||
            (t.playlistParsingError = new Error(
              'Missing preceding EXT-X-DEFINE tag for Variable Reference: "'.concat(
                i,
                '"'
              )
            )),
          r)
        : o;
    });
  }
  return e;
}
var BBt = /^(\d+)x(\d+)$/,
  Yve = /(.+?)=(".*?"|.*?)(?:,|$)/g,
  tle = (function () {
    function t(e, n) {
      Wn(this, t),
        typeof e == "string" && (e = t.parseAttrList(e, n)),
        cu(this, e);
    }
    return (
      Kn(
        t,
        [
          {
            key: "clientAttrs",
            get: function () {
              var e;
              return _r((e = Dn(this))).call(e, function (n) {
                return n.substring(0, 2) === "X-";
              });
            },
          },
          {
            key: "decimalInteger",
            value: function (e) {
              var n = _i(this[e], 10);
              return n > Ax ? 1 / 0 : n;
            },
          },
          {
            key: "hexadecimalInteger",
            value: function (e) {
              if (this[e]) {
                var n,
                  r = jn((n = this[e] || "0x")).call(n, 2);
                r = (1 & r.length ? "0" : "") + r;
                for (
                  var i = new Uint8Array(r.length / 2), o = 0;
                  o < r.length / 2;
                  o++
                )
                  i[o] = _i(jn(r).call(r, 2 * o, 2 * o + 2), 16);
                return i;
              }
              return null;
            },
          },
          {
            key: "hexadecimalIntegerAsNumber",
            value: function (e) {
              var n = _i(this[e], 16);
              return n > Ax ? 1 / 0 : n;
            },
          },
          {
            key: "decimalFloatingPoint",
            value: function (e) {
              return wl(this[e]);
            },
          },
          {
            key: "optionalFloat",
            value: function (e, n) {
              var r = this[e];
              return r ? wl(r) : n;
            },
          },
          {
            key: "enumeratedString",
            value: function (e) {
              return this[e];
            },
          },
          {
            key: "enumeratedStringList",
            value: function (e, n) {
              var r,
                i = this[e];
              return ga((r = i ? i.split(/[ ,]+/) : [])).call(
                r,
                function (o, l) {
                  return (o[l.toLowerCase()] = !0), o;
                },
                n
              );
            },
          },
          {
            key: "bool",
            value: function (e) {
              return this[e] === "YES";
            },
          },
          {
            key: "decimalResolution",
            value: function (e) {
              var n = BBt.exec(this[e]);
              if (n !== null)
                return { width: _i(n[1], 10), height: _i(n[2], 10) };
            },
          },
        ],
        [
          {
            key: "parseAttrList",
            value: function (e, n) {
              var r,
                i,
                o = {};
              for (Yve.lastIndex = 0; (i = Yve.exec(e)) !== null; ) {
                var l,
                  u = es((l = i[1])).call(l),
                  c = i[2],
                  d =
                    qt(c).call(c, '"') === 0 &&
                    Fse(c).call(c, '"') === c.length - 1,
                  h = !1;
                if (d) c = jn(c).call(c, 1, -1);
                else
                  switch (u) {
                    case "IV":
                    case "SCTE35-CMD":
                    case "SCTE35-IN":
                    case "SCTE35-OUT":
                      h = !0;
                  }
                if (n && (d || h)) c = UBt(n, c);
                else if (!h && !d)
                  switch (u) {
                    case "CLOSED-CAPTIONS":
                      if (c === "NONE") break;
                    case "ALLOWED-CPC":
                    case "CLASS":
                    case "ASSOC-LANGUAGE":
                    case "AUDIO":
                    case "BYTERANGE":
                    case "CHANNELS":
                    case "CHARACTERISTICS":
                    case "CODECS":
                    case "DATA-ID":
                    case "END-DATE":
                    case "GROUP-ID":
                    case "ID":
                    case "IMPORT":
                    case "INSTREAM-ID":
                    case "KEYFORMAT":
                    case "KEYFORMATVERSIONS":
                    case "LANGUAGE":
                    case "NAME":
                    case "PATHWAY-ID":
                    case "QUERYPARAM":
                    case "RECENTLY-REMOVED-DATERANGES":
                    case "SERVER-URI":
                    case "STABLE-RENDITION-ID":
                    case "STABLE-VARIANT-ID":
                    case "START-DATE":
                    case "SUBTITLES":
                    case "SUPPLEMENTAL-CODECS":
                    case "URI":
                    case "VALUE":
                    case "VIDEO":
                    case "X-ASSET-LIST":
                    case "X-ASSET-URI":
                      Is.warn(
                        Ce((r = "".concat(e, ": attribute "))).call(
                          r,
                          u,
                          " is missing quotes"
                        )
                      );
                  }
                o[u] = c;
              }
              return o;
            },
          },
        ]
      ),
      t
    );
  })(),
  HBt = "com.apple.hls.interstitial",
  XBt = (function () {
    function t(e, n) {
      var r,
        i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
      if (
        (Wn(this, t),
        (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 = (n == null ? void 0 : n.tagAnchor) || null),
        (this.tagOrder = (r = n == null ? void 0 : n.tagOrder) != null ? r : i),
        n)
      ) {
        var o = n.attr;
        for (var l in o)
          if (Object.prototype.hasOwnProperty.call(e, l) && e[l] !== o[l]) {
            var u;
            Is.warn(
              Ce(
                (u = 'DATERANGE tag attribute: "'.concat(
                  l,
                  '" does not match for tags with ID: "'
                ))
              ).call(u, e.ID, '"')
            ),
              (this._badValueForSameId = l);
            break;
          }
        e = cu(new tle({}), o, e);
      }
      if (
        ((this.attr = e),
        n
          ? ((this._startDate = n._startDate),
            (this._cue = n._cue),
            (this._endDate = n._endDate),
            (this._dateAtEnd = n._dateAtEnd))
          : (this._startDate = new Date(e["START-DATE"])),
        "END-DATE" in this.attr)
      ) {
        var c =
          (n == null ? void 0 : n.endDate) || new Date(this.attr["END-DATE"]);
        _a(c.getTime()) && (this._endDate = c);
      }
    }
    return (
      Kn(t, [
        {
          key: "id",
          get: function () {
            return this.attr.ID;
          },
        },
        {
          key: "class",
          get: function () {
            return this.attr.CLASS;
          },
        },
        {
          key: "cue",
          get: function () {
            var e = this._cue;
            return e === void 0
              ? (this._cue = this.attr.enumeratedStringList(
                  this.attr.CUE ? "CUE" : "X-CUE",
                  { pre: !1, post: !1, once: !1 }
                ))
              : e;
          },
        },
        {
          key: "startTime",
          get: function () {
            var e,
              n = this.tagAnchor;
            return n === null || n.programDateTime === null
              ? (Is.warn(
                  Ce(
                    (e =
                      'Expected tagAnchor Fragment with PDT set for DateRange "'.concat(
                        this.id,
                        '": '
                      ))
                  ).call(e, n)
                ),
                NaN)
              : n.start + (this.startDate.getTime() - n.programDateTime) / 1e3;
          },
        },
        {
          key: "startDate",
          get: function () {
            return this._startDate;
          },
        },
        {
          key: "endDate",
          get: function () {
            var e = this._endDate || this._dateAtEnd;
            if (e) return e;
            var n = this.duration;
            return n !== null
              ? (this._dateAtEnd = new Date(
                  this._startDate.getTime() + 1e3 * n
                ))
              : null;
          },
        },
        {
          key: "duration",
          get: function () {
            if ("DURATION" in this.attr) {
              var e = this.attr.decimalFloatingPoint("DURATION");
              if (_a(e)) return e;
            } else if (this._endDate)
              return (
                (this._endDate.getTime() - this._startDate.getTime()) / 1e3
              );
            return null;
          },
        },
        {
          key: "plannedDuration",
          get: function () {
            return "PLANNED-DURATION" in this.attr
              ? this.attr.decimalFloatingPoint("PLANNED-DURATION")
              : null;
          },
        },
        {
          key: "endOnNext",
          get: function () {
            return this.attr.bool("END-ON-NEXT");
          },
        },
        {
          key: "isInterstitial",
          get: function () {
            return this.class === HBt;
          },
        },
        {
          key: "isValid",
          get: function () {
            return (
              !!this.id &&
              !this._badValueForSameId &&
              _a(this.startDate.getTime()) &&
              (this.duration === null || this.duration >= 0) &&
              (!this.endOnNext || !!this.class) &&
              (!this.attr.CUE ||
                (!this.cue.pre && !this.cue.post) ||
                this.cue.pre !== this.cue.post) &&
              (!this.isInterstitial ||
                "X-ASSET-URI" in this.attr ||
                "X-ASSET-LIST" in this.attr)
            );
          },
        },
      ]),
      t
    );
  })();
function Qk(t) {
  return t === "AES-128" || t === "AES-256" || t === "AES-256-CTR";
}
function nle(t) {
  switch (t) {
    case "AES-128":
    case "AES-256":
      return rE.cbc;
    case "AES-256-CTR":
      return rE.ctr;
    default:
      throw new Error("invalid full segment method ".concat(t));
  }
}
function rle(t) {
  return Uint8Array.from(atob(t), function (e) {
    return e.charCodeAt(0);
  });
}
function Vee(t) {
  return Uint8Array.from(unescape(encodeURIComponent(t)), function (e) {
    return e.charCodeAt(0);
  });
}
function VBt(t) {
  var e = Vee(t).subarray(0, 16),
    n = new Uint8Array(16);
  return n.set(e, 16 - e.length), n;
}
function zBt(t) {
  var e = function (n, r, i) {
    var o = n[r];
    (n[r] = n[i]), (n[i] = o);
  };
  e(t, 0, 3), e(t, 1, 2), e(t, 4, 5), e(t, 6, 7);
}
function jBt(t) {
  var e = t.split(":"),
    n = null;
  if (e[0] === "data" && e.length === 2) {
    var r = e[1].split(";"),
      i = r[r.length - 1].split(",");
    if (i.length === 2) {
      var o = i[0] === "base64",
        l = i[1];
      o ? (tl(r).call(r, -1, 1), (n = rle(l))) : (n = VBt(l));
    }
  }
  return n;
}
var TU = typeof self < "u" ? self : void 0,
  xs = {
    CLEARKEY: "org.w3.clearkey",
    FAIRPLAY: "com.apple.fps",
    PLAYREADY: "com.microsoft.playready",
    WIDEVINE: "com.widevine.alpha",
  },
  bf = {
    CLEARKEY: "org.w3.clearkey",
    FAIRPLAY: "com.apple.streamingkeydelivery",
    PLAYREADY: "com.microsoft.playready",
    WIDEVINE: "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",
  };
function Qve(t) {
  switch (t) {
    case bf.FAIRPLAY:
      return xs.FAIRPLAY;
    case bf.PLAYREADY:
      return xs.PLAYREADY;
    case bf.WIDEVINE:
      return xs.WIDEVINE;
    case bf.CLEARKEY:
      return xs.CLEARKEY;
  }
}
var o3 = {
  CENC: "1077efecc0b24d02ace33c1e52e2fb4b",
  CLEARKEY: "e2719d58a985b3c9781ab030af78d30e",
  FAIRPLAY: "94ce86fb07ff4f43adb893d2fa968ca2",
  PLAYREADY: "9a04f07998404286ab92e65be0885f95",
  WIDEVINE: "edef8ba979d64acea3c827dcd51d21ed",
};
function UV(t) {
  return t === o3.WIDEVINE
    ? xs.WIDEVINE
    : t === o3.PLAYREADY
    ? xs.PLAYREADY
    : t === o3.CENC || t === o3.CLEARKEY
    ? xs.CLEARKEY
    : void 0;
}
function Jve(t) {
  switch (t) {
    case xs.FAIRPLAY:
      return bf.FAIRPLAY;
    case xs.PLAYREADY:
      return bf.PLAYREADY;
    case xs.WIDEVINE:
      return bf.WIDEVINE;
    case xs.CLEARKEY:
      return bf.CLEARKEY;
  }
}
function s3(t) {
  var e,
    n = t.drmSystems,
    r = t.widevineLicenseUrl,
    i = n
      ? _r((e = [xs.FAIRPLAY, xs.WIDEVINE, xs.PLAYREADY, xs.CLEARKEY])).call(
          e,
          function (o) {
            return !!n[o];
          }
        )
      : [];
  return !i[xs.WIDEVINE] && r && i.push(xs.WIDEVINE), i;
}
var o9e = (function (t) {
  return TU != null &&
    (t = TU.navigator) != null &&
    t.requestMediaKeySystemAccess
    ? self.navigator.requestMediaKeySystemAccess.bind(self.navigator)
    : null;
})();
function WBt(t, e, n, r) {
  var i;
  switch (t) {
    case xs.FAIRPLAY:
      i = ["cenc", "sinf"];
      break;
    case xs.WIDEVINE:
    case xs.PLAYREADY:
      i = ["cenc"];
      break;
    case xs.CLEARKEY:
      i = ["cenc", "keyids"];
      break;
    default:
      throw new Error("Unknown key-system: ".concat(t));
  }
  return KBt(i, e, n, r);
}
function KBt(t, e, n, r) {
  return [
    {
      initDataTypes: t,
      persistentState: r.persistentState || "optional",
      distinctiveIdentifier: r.distinctiveIdentifier || "optional",
      sessionTypes: r.sessionTypes || [r.sessionType || "temporary"],
      audioCapabilities: On(e).call(e, function (i) {
        return {
          contentType: "audio/mp4; codecs=".concat(i),
          robustness: r.audioRobustness || "",
          encryptionScheme: r.audioEncryptionScheme || null,
        };
      }),
      videoCapabilities: On(n).call(n, function (i) {
        return {
          contentType: "video/mp4; codecs=".concat(i),
          robustness: r.videoRobustness || "",
          encryptionScheme: r.videoEncryptionScheme || null,
        };
      }),
    },
  ];
}
function s9e(t) {
  var e = new Uint16Array(t.buffer, t.byteOffset, t.byteLength / 2),
    n = String.fromCharCode.apply(null, RE(e)),
    r = n.substring(qt(n).call(n, "<"), n.length),
    i = new DOMParser()
      .parseFromString(r, "text/xml")
      .getElementsByTagName("KID")[0];
  if (i) {
    var o = i.childNodes[0]
      ? i.childNodes[0].nodeValue
      : i.getAttribute("VALUE");
    if (o) {
      var l = rle(o).subarray(0, 16);
      return zBt(l), l;
    }
  }
  return null;
}
var l3 = {},
  qve = (function () {
    function t(e, n, r) {
      var i =
          arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : [1],
        o =
          arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : null;
      Wn(this, t),
        (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 = n),
        (this.keyFormat = r),
        (this.keyFormatVersions = i),
        (this.iv = o),
        (this.encrypted = !!e && e !== "NONE"),
        (this.isCommonEncryption = this.encrypted && !Qk(e));
    }
    return (
      Kn(
        t,
        [
          {
            key: "isSupported",
            value: function () {
              var e;
              if (this.method) {
                if (Qk(this.method) || this.method === "NONE") return !0;
                if (this.keyFormat === "identity")
                  return this.method === "SAMPLE-AES";
                switch (this.keyFormat) {
                  case bf.FAIRPLAY:
                  case bf.WIDEVINE:
                  case bf.PLAYREADY:
                  case bf.CLEARKEY:
                    return (
                      qt(
                        (e = [
                          "ISO-23001-7",
                          "SAMPLE-AES",
                          "SAMPLE-AES-CENC",
                          "SAMPLE-AES-CTR",
                        ])
                      ).call(e, this.method) !== -1
                    );
                }
              }
              return !1;
            },
          },
          {
            key: "getDecryptData",
            value: function (e) {
              if (!this.encrypted || !this.uri) return null;
              if (Qk(this.method) && this.uri && !this.iv) {
                typeof e != "number" &&
                  (Is.warn(
                    'missing IV for initialization segment with method="'.concat(
                      this.method,
                      '" - compliance issue'
                    )
                  ),
                  (e = 0));
                var n = ZBt(e);
                return new t(
                  this.method,
                  this.uri,
                  "identity",
                  this.keyFormatVersions,
                  n
                );
              }
              var r = jBt(this.uri);
              if (r)
                switch (this.keyFormat) {
                  case bf.WIDEVINE:
                    (this.pssh = r),
                      r.length >= 22 &&
                        (this.keyId = r.subarray(r.length - 22, r.length - 6));
                    break;
                  case bf.PLAYREADY:
                    var i = new Uint8Array([
                      154, 4, 240, 121, 152, 64, 66, 134, 171, 146, 230, 91,
                      224, 136, 95, 149,
                    ]);
                    (this.pssh = CBt(i, null, r)), (this.keyId = s9e(r));
                    break;
                  default:
                    var o = r.subarray(0, 16);
                    if (o.length !== 16) {
                      var l = new Uint8Array(16);
                      l.set(o, 16 - o.length), (o = l);
                    }
                    this.keyId = o;
                }
              if (!this.keyId || this.keyId.byteLength !== 16) {
                var u = l3[this.uri];
                if (!u) {
                  var c = Dn(l3).length % Ax;
                  (u = new Uint8Array(16)),
                    new DataView(u.buffer, 12, 4).setUint32(0, c),
                    (l3[this.uri] = u);
                }
                this.keyId = u;
              }
              return this;
            },
          },
        ],
        [
          {
            key: "clearKeyUriToKeyIdMap",
            value: function () {
              l3 = {};
            },
          },
        ]
      ),
      t
    );
  })();
function ZBt(t) {
  for (var e = new Uint8Array(16), n = 12; n < 16; n++)
    e[n] = (t >> (8 * (15 - n))) & 255;
  return e;
}
function YBt(t, e) {
  for (
    var n = t.length,
      r = t[n - 1],
      i = e.live ? 1 / 0 : e.totalduration,
      o = Dn(e.dateRanges),
      l = o.length;
    l--;

  ) {
    var u = e.dateRanges[o[l]],
      c = u.startDate.getTime();
    u.tagAnchor = r.ref;
    for (var d = n; d--; ) {
      var h = QBt(e, c, t, d, i);
      if (h !== -1) {
        u.tagAnchor = e.fragments[h].ref;
        break;
      }
    }
  }
}
function QBt(t, e, n, r, i) {
  var o = n[r];
  if (o) {
    var l,
      u = o.programDateTime;
    if (
      (e >= u || r === 0) &&
      e <=
        u + 1e3 * ((((l = n[r + 1]) == null ? void 0 : l.start) || i) - o.start)
    ) {
      var c = n[r].sn - t.startSN,
        d = t.fragments;
      if (d.length > n.length)
        for (var h = (n[r + 1] || d[d.length - 1]).sn - t.startSN; h > c; h--) {
          var f = d[h].programDateTime;
          if (e >= f && e < f + 1e3 * d[h].duration) return h;
        }
      return c;
    }
  }
  return -1;
}
function JBt(t, e, n) {
  t.rawProgramDateTime
    ? n.push(t)
    : e != null &&
      e.programDateTime &&
      (t.programDateTime = e.endProgramDateTime);
}
function BV(t, e) {
  var n = e.startPTS;
  if (_a(n)) {
    var r,
      i = 0;
    e.sn > t.sn ? ((i = n - t.start), (r = t)) : ((i = t.start - n), (r = e)),
      r.duration !== i && r.setDuration(i);
  } else
    e.sn > t.sn
      ? t.cc === e.cc && t.minEndPTS
        ? e.setStart(t.start + (t.minEndPTS - t.start))
        : e.setStart(t.start + t.duration)
      : e.setStart(Math.max(t.start - e.duration, 0));
}
function l9e(t, e, n, r, i, o) {
  r - n <= 0 &&
    (Is.warn("Fragment should have a positive duration", e),
    (r = n + e.duration),
    (o = i + e.duration));
  var l = n,
    u = r,
    c = e.startPTS,
    d = e.endPTS;
  if (_a(c)) {
    var h = Math.abs(c - n);
    _a(e.deltaPTS) ? (e.deltaPTS = Math.max(h, e.deltaPTS)) : (e.deltaPTS = h),
      (l = Math.max(n, c)),
      (n = Math.min(n, c)),
      (i = Math.min(i, e.startDTS)),
      (u = Math.min(r, d)),
      (r = Math.max(r, d)),
      (o = Math.max(o, e.endDTS));
  }
  var f = n - e.start;
  e.start !== 0 && e.setStart(n),
    e.setDuration(r - e.start),
    (e.startPTS = n),
    (e.maxStartPTS = l),
    (e.startDTS = i),
    (e.endPTS = r),
    (e.minEndPTS = u),
    (e.endDTS = o);
  var p,
    g = e.sn;
  if (!t || g < t.startSN || g > t.endSN) return 0;
  var y = g - t.startSN,
    v = t.fragments;
  for (v[y] = e, p = y; p > 0; p--) BV(v[p], v[p - 1]);
  for (p = y; p < v.length - 1; p++) BV(v[p], v[p + 1]);
  return (
    t.fragmentHint && BV(v[v.length - 1], t.fragmentHint),
    (t.PTSKnown = t.alignedSliding = !0),
    f
  );
}
function qBt(t, e) {
  for (var n, r = null, i = t.fragments, o = i.length - 1; o >= 0; o--) {
    var l = i[o].initSegment;
    if (l) {
      r = l;
      break;
    }
  }
  t.fragmentHint && delete t.fragmentHint.endPTS;
  var u,
    c = 0;
  nHt(t, e, function (k, D) {
    k.relurl && (c = k.cc - D.cc),
      _a(k.startPTS) &&
        _a(k.endPTS) &&
        (D.setStart((D.startPTS = k.startPTS)),
        (D.startDTS = k.startDTS),
        (D.maxStartPTS = k.maxStartPTS),
        (D.endPTS = k.endPTS),
        (D.endDTS = k.endDTS),
        (D.minEndPTS = k.minEndPTS),
        D.setDuration(k.endPTS - k.startPTS),
        D.duration && (u = D),
        (e.PTSKnown = e.alignedSliding = !0)),
      k.hasStreams && (D.elementaryStreams = k.elementaryStreams),
      (D.loader = k.loader),
      k.hasStats && (D.stats = k.stats),
      k.initSegment && ((D.initSegment = k.initSegment), (r = k.initSegment));
  });
  var d = e.fragmentHint
    ? Ce((n = e.fragments)).call(n, e.fragmentHint)
    : e.fragments;
  if (
    (r &&
      d.forEach(function (k) {
        var D;
        !k ||
          (k.initSegment &&
            k.initSegment.relurl !== ((D = r) == null ? void 0 : D.relurl)) ||
          (k.initSegment = r);
      }),
    e.skippedSegments)
  )
    if (
      ((e.deltaUpdateFailed = e.fragments.some(function (k) {
        return !k;
      })),
      e.deltaUpdateFailed)
    ) {
      Is.warn(
        "[level-helper] Previous playlist missing segments skipped in delta playlist"
      );
      for (var h = e.skippedSegments; h--; ) e.fragments.shift();
      (e.startSN = e.fragments[0].sn),
        e.startCC || (e.startCC = e.fragments[0].cc);
    } else {
      var f;
      e.canSkipDateRanges && (e.dateRanges = eHt(t.dateRanges, e));
      var p = _r((f = t.fragments)).call(f, function (k) {
        return k.rawProgramDateTime;
      });
      if (t.hasProgramDateTime && !e.hasProgramDateTime)
        for (var g = 1; g < d.length; g++)
          d[g].programDateTime === null && JBt(d[g], d[g - 1], p);
      YBt(p, e);
    }
  var y = e.fragments;
  if (c) {
    Is.warn("discontinuity sliding from playlist, take drift into account");
    for (var v = 0; v < y.length; v++) y[v].cc += c;
  }
  e.skippedSegments && (e.startCC = e.fragments[0].cc),
    tHt(t.partList, e.partList, function (k, D) {
      (D.elementaryStreams = k.elementaryStreams), (D.stats = k.stats);
    }),
    u ? l9e(e, u, u.startPTS, u.endPTS, u.startDTS, u.endDTS) : u9e(t, e),
    y.length && (e.totalduration = e.edge - y[0].start),
    (e.driftStartTime = t.driftStartTime),
    (e.driftStart = t.driftStart);
  var b = e.advancedDateTime;
  if (e.advanced && b) {
    var w = e.edge;
    e.driftStart || ((e.driftStartTime = b), (e.driftStart = w)),
      (e.driftEndTime = b),
      (e.driftEnd = w);
  } else
    (e.driftEndTime = t.driftEndTime),
      (e.driftEnd = t.driftEnd),
      (e.advancedDateTime = t.advancedDateTime);
  e.requestScheduled === -1 && (e.requestScheduled = t.requestScheduled);
}
function eHt(t, e) {
  var n = e.dateRanges,
    r = e.recentlyRemovedDateranges,
    i = cu({}, t);
  r &&
    r.forEach(function (l) {
      delete i[l];
    });
  var o = Dn(i).length;
  return (
    o &&
      Dn(n).forEach(function (l) {
        var u = i[l],
          c = new XBt(n[l].attr, u);
        c.isValid
          ? ((i[l] = c), u || (c.tagOrder += o))
          : Is.warn(
              'Ignoring invalid Playlist Delta Update DATERANGE tag: "'.concat(
                lr(n[l].attr),
                '"'
              )
            );
      }),
    i
  );
}
function tHt(t, e, n) {
  if (t && e)
    for (var r = 0, i = 0, o = t.length; i <= o; i++) {
      var l = t[i],
        u = e[i + r];
      l && u && l.index === u.index && l.fragment.sn === u.fragment.sn
        ? n(l, u)
        : r--;
    }
}
function nHt(t, e, n) {
  for (
    var r,
      i,
      o = e.skippedSegments,
      l = Math.max(t.startSN, e.startSN) - e.startSN,
      u =
        (t.fragmentHint ? 1 : 0) +
        (o ? e.endSN : Math.min(t.endSN, e.endSN)) -
        e.startSN,
      c = e.startSN - t.startSN,
      d = e.fragmentHint
        ? Ce((r = e.fragments)).call(r, e.fragmentHint)
        : e.fragments,
      h = t.fragmentHint
        ? Ce((i = t.fragments)).call(i, t.fragmentHint)
        : t.fragments,
      f = l;
    f <= u;
    f++
  ) {
    var p = h[c + f],
      g = d[f];
    o && !g && p && (g = e.fragments[f] = p), p && g && n(p, g);
  }
}
function u9e(t, e) {
  var n = !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2],
    r = e.startSN + e.skippedSegments - t.startSN,
    i = t.fragments,
    o = r >= 0,
    l = 0;
  if (o && r < i.length) l = i[r].start;
  else if (o && e.startSN === t.endSN + 1) l = t.fragmentEnd;
  else if (o && n) l = t.fragmentStart + r * e.levelTargetDuration;
  else {
    if (e.skippedSegments || e.fragmentStart !== 0) return;
    l = t.fragmentStart;
  }
  zee(e, l);
}
function zee(t, e) {
  if (e) {
    for (var n = t.fragments, r = t.skippedSegments; r < n.length; r++)
      n[r].addStart(e);
    t.fragmentHint && t.fragmentHint.addStart(e);
  }
}
function rHt(t) {
  var e =
      arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1 / 0,
    n = 1e3 * t.targetduration;
  if (t.updated) {
    var r = t.fragments;
    if (r.length && 4 * n > e) {
      var i = 1e3 * r[r.length - 1].duration;
      i < n && (n = i);
    }
  } else n /= 2;
  return Math.round(n);
}
function iHt(t, e, n) {
  if (!t) return null;
  var r = t.fragments[e - t.startSN];
  return (
    r ||
    ((r = t.fragmentHint) && r.sn === e
      ? r
      : e < t.startSN && n && n.sn === e
      ? n
      : null)
  );
}
function e1e(t, e, n) {
  return t ? c9e(t.partList, e, n) : null;
}
function c9e(t, e, n) {
  if (t)
    for (var r = t.length; r--; ) {
      var i = t[r];
      if (i.index === n && i.fragment.sn === e) return i;
    }
  return null;
}
function aHt(t) {
  t.forEach(function (e, n) {
    var r,
      i = (r = e.details) == null ? void 0 : r.fragments;
    i &&
      i.forEach(function (o) {
        (o.level = n), o.initSegment && (o.initSegment.level = n);
      });
  });
}
function ZC(t, e) {
  for (var n = 0, r = t.length; n < r; n++) {
    var i;
    if (((i = t[n]) == null ? void 0 : i.cc) === e) return t[n];
  }
  return null;
}
function oHt(t, e) {
  return !!(t && e.startCC < t.endCC && e.endCC > t.startCC);
}
function t1e(t, e) {
  if (t) {
    var n = t.start + e;
    (t.start = t.startPTS = n), (t.endPTS = n + t.duration);
  }
}
function d9e(t, e) {
  for (var n = e.fragments, r = 0, i = n.length; r < i; r++) t1e(n[r], t);
  e.fragmentHint && t1e(e.fragmentHint, t), (e.alignedSliding = !0);
}
function sHt(t, e) {
  t &&
    (h9e(e, t),
    !e.alignedSliding && t && EU(e, t),
    e.alignedSliding || !t || e.skippedSegments || u9e(t, e, !1));
}
function h9e(t, e) {
  if (oHt(e, t)) {
    var n = Math.min(e.endCC, t.endCC),
      r = ZC(e.fragments, n),
      i = ZC(t.fragments, n);
    r &&
      i &&
      (Is.log("Aligning playlist at start of dicontinuity sequence ".concat(n)),
      d9e(r.start - i.start, t));
  }
}
function EU(t, e) {
  if (t.hasProgramDateTime && e.hasProgramDateTime) {
    var n = t.fragments,
      r = e.fragments;
    if (n.length && r.length) {
      var i,
        o,
        l = Math.min(e.endCC, t.endCC);
      e.startCC < l && t.startCC < l && ((i = ZC(r, l)), (o = ZC(n, l))),
        (i && o) ||
          (o =
            ZC(n, (i = r[Math.floor(r.length / 2)]).cc) ||
            n[Math.floor(n.length / 2)]);
      var u = i.programDateTime,
        c = o.programDateTime;
      u && c && d9e((c - u) / 1e3 - (o.start - i.start), t);
    }
  }
}
var lHt = {
    toString: function (t) {
      for (var e = "", n = t.length, r = 0; r < n; r++) {
        var i;
        e += Ce((i = "[".concat(t.start(r).toFixed(3), "-"))).call(
          i,
          t.end(r).toFixed(3),
          "]"
        );
      }
      return e;
    },
  },
  li = {
    STOPPED: "STOPPED",
    IDLE: "IDLE",
    KEY_LOADING: "KEY_LOADING",
    FRAG_LOADING: "FRAG_LOADING",
    FRAG_LOADING_WAITING_RETRY: "FRAG_LOADING_WAITING_RETRY",
    WAITING_TRACK: "WAITING_TRACK",
    PARSING: "PARSING",
    PARSED: "PARSED",
    ENDED: "ENDED",
    ERROR: "ERROR",
    WAITING_INIT_PTS: "WAITING_INIT_PTS",
    WAITING_LEVEL: "WAITING_LEVEL",
  },
  f9e = (function (t) {
    so(n, NBt);
    var e = lo(n);
    function n(r, i, o, l, u) {
      var c;
      return (
        Wn(this, n),
        ((c = e.call(this, l, r.logger)).hls = void 0),
        (c.fragPrevious = null),
        (c.fragCurrent = null),
        (c.fragmentTracker = void 0),
        (c.transmuxer = null),
        (c._state = li.STOPPED),
        (c.playlistType = void 0),
        (c.media = null),
        (c.mediaBuffer = null),
        (c.config = void 0),
        (c.bitrateTest = !1),
        (c.lastCurrentTime = 0),
        (c.nextLoadPosition = 0),
        (c.startPosition = 0),
        (c.startTimeOffset = null),
        (c.retryDate = 0),
        (c.levels = null),
        (c.fragmentLoader = void 0),
        (c.keyLoader = void 0),
        (c.levelLastLoaded = null),
        (c.startFragRequested = !1),
        (c.decrypter = void 0),
        (c.initPTS = []),
        (c.buffering = !0),
        (c.loadingParts = !1),
        (c.loopSn = void 0),
        (c.onMediaSeeking = function () {
          var d,
            h = os(c),
            f = h.config,
            p = h.fragCurrent,
            g = h.media,
            y = h.mediaBuffer,
            v = h.state,
            b = g ? g.currentTime : 0,
            w = dc.bufferInfo(y || g, b, f.maxBufferHole);
          if (
            (c.log(
              Ce(
                (d = "media seeking to ".concat(
                  _a(b) ? b.toFixed(3) : b,
                  ", state: "
                ))
              ).call(d, v)
            ),
            c.state === li.ENDED)
          )
            c.resetLoadingState();
          else if (p) {
            var k = f.maxFragLookUpTolerance,
              D = p.start - k,
              $ = p.start + p.duration + k;
            if (!w.len || $ < w.start || D > w.end) {
              var N = b > $;
              (b < D || N) &&
                (N &&
                  p.loader &&
                  (c.log(
                    "seeking outside of buffer while fragment load in progress, cancel fragment load"
                  ),
                  p.abortRequests(),
                  c.resetLoadingState()),
                (c.fragPrevious = null));
            }
          }
          if (
            g &&
            (c.fragmentTracker.removeFragmentsInRange(
              b,
              1 / 0,
              c.playlistType,
              !0
            ),
            b > c.lastCurrentTime && (c.lastCurrentTime = b),
            !c.loadingParts)
          ) {
            var P,
              I = Math.max(w.end, b),
              O = c.shouldLoadParts(c.getLevelDetails(), I);
            O &&
              (c.log(
                Ce(
                  (P = "LL-Part loading ON after seeking to ".concat(
                    b.toFixed(2),
                    " with buffer @"
                  ))
                ).call(P, I.toFixed(2))
              ),
              (c.loadingParts = O));
          }
          c.hls.hasEnoughToStart ||
            w.len ||
            (c.log(
              "setting startPosition to ".concat(
                b,
                " because of seek before start"
              )
            ),
            (c.nextLoadPosition = c.startPosition = b)),
            c.tickImmediate();
        }),
        (c.onMediaEnded = function () {
          c.log("setting startPosition to 0 because media ended"),
            (c.startPosition = c.lastCurrentTime = 0),
            c.triggerEnded();
        }),
        (c.playlistType = u),
        (c.hls = r),
        (c.fragmentLoader = new OBt(r.config)),
        (c.keyLoader = o),
        (c.fragmentTracker = i),
        (c.config = r.config),
        (c.decrypter = new ele(r.config)),
        c
      );
    }
    return (
      Kn(n, [
        {
          key: "registerListeners",
          value: function () {
            var r = this.hls;
            r.on(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
              r.on(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
              r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.on(_t.MANIFEST_LOADED, this.onManifestLoaded, this),
              r.on(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r.off(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
              r.off(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
              r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.off(_t.MANIFEST_LOADED, this.onManifestLoaded, this),
              r.off(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "doTick",
          value: function () {
            this.onTickEnd();
          },
        },
        { key: "onTickEnd", value: function () {} },
        { key: "startLoad", value: function (r) {} },
        {
          key: "stopLoad",
          value: function () {
            if (this.state !== li.STOPPED) {
              this.fragmentLoader.abort(),
                this.keyLoader.abort(this.playlistType);
              var r = this.fragCurrent;
              r != null &&
                r.loader &&
                (r.abortRequests(), this.fragmentTracker.removeFragment(r)),
                this.resetTransmuxer(),
                (this.fragCurrent = null),
                (this.fragPrevious = null),
                this.clearInterval(),
                this.clearNextTick(),
                (this.state = li.STOPPED);
            }
          },
        },
        {
          key: "startPositionValue",
          get: function () {
            var r = this.nextLoadPosition,
              i = this.startPosition;
            return i === -1 && r ? r : i;
          },
        },
        {
          key: "bufferingEnabled",
          get: function () {
            return this.buffering;
          },
        },
        {
          key: "pauseBuffering",
          value: function () {
            this.buffering = !1;
          },
        },
        {
          key: "resumeBuffering",
          value: function () {
            this.buffering = !0;
          },
        },
        {
          key: "_streamEnded",
          value: function (r, i) {
            var o = this.config.timelineOffset !== void 0,
              l = r.nextStart,
              u = l && (!o || l < i.edge);
            if (i.live || u || !r.end || !this.media) return !1;
            var c = i.partList;
            if (c != null && c.length) {
              var d = c[c.length - 1];
              return dc.isBuffered(this.media, d.start + d.duration / 2);
            }
            var h = i.fragments[i.fragments.length - 1].type;
            return this.fragmentTracker.isEndListAppended(h);
          },
        },
        {
          key: "getLevelDetails",
          value: function () {
            var r;
            if (this.levels && this.levelLastLoaded !== null)
              return (r = this.levelLastLoaded) == null ? void 0 : r.details;
          },
        },
        {
          key: "onMediaAttached",
          value: function (r, i) {
            var o = (this.media = this.mediaBuffer = i.media);
            o.removeEventListener("seeking", this.onMediaSeeking),
              o.removeEventListener("ended", this.onMediaEnded),
              o.addEventListener("seeking", this.onMediaSeeking),
              o.addEventListener("ended", this.onMediaEnded);
            var l = this.config;
            this.levels &&
              l.autoStartLoad &&
              this.state === li.STOPPED &&
              this.startLoad(l.startPosition);
          },
        },
        {
          key: "onMediaDetaching",
          value: function (r, i) {
            var o = !!i.transferMedia,
              l = this.media;
            l !== null &&
              (l.ended &&
                (this.log("MSE detaching and video ended, reset startPosition"),
                (this.startPosition = this.lastCurrentTime = 0)),
              l.removeEventListener("seeking", this.onMediaSeeking),
              l.removeEventListener("ended", this.onMediaEnded),
              this.keyLoader && !o && this.keyLoader.detach(),
              (this.media = this.mediaBuffer = null),
              (this.loopSn = void 0),
              o
                ? this.resetTransmuxer()
                : ((this.loadingParts = !1),
                  this.fragmentTracker.removeAllFragments(),
                  this.stopLoad()));
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            (this.initPTS = []),
              (this.levels = this.levelLastLoaded = this.fragCurrent = null),
              (this.lastCurrentTime = this.startPosition = 0),
              (this.startFragRequested = !1);
          },
        },
        { key: "onError", value: function (r, i) {} },
        { key: "triggerEnded", value: function () {} },
        {
          key: "onManifestLoaded",
          value: function (r, i) {
            this.startTimeOffset = i.startTimeOffset;
          },
        },
        {
          key: "onHandlerDestroying",
          value: function () {
            this.stopLoad(),
              this.transmuxer &&
                (this.transmuxer.destroy(), (this.transmuxer = null)),
              Eo(po(n.prototype), "onHandlerDestroying", this).call(this),
              (this.hls = this.onMediaSeeking = this.onMediaEnded = null);
          },
        },
        {
          key: "onHandlerDestroyed",
          value: function () {
            (this.state = li.STOPPED),
              this.fragmentLoader && this.fragmentLoader.destroy(),
              this.keyLoader && this.keyLoader.destroy(),
              this.decrypter && this.decrypter.destroy(),
              (this.hls =
                this.log =
                this.warn =
                this.decrypter =
                this.keyLoader =
                this.fragmentLoader =
                this.fragmentTracker =
                  null),
              Eo(po(n.prototype), "onHandlerDestroyed", this).call(this);
          },
        },
        {
          key: "loadFragment",
          value: function (r, i, o) {
            var l = this.hls.config;
            if (
              l.interstitialsController &&
              l.enableInterstitialPlayback !== !1 &&
              r.type !== wo.SUBTITLE
            ) {
              var u = this.hls.interstitialsManager,
                c = u == null ? void 0 : u.bufferingItem;
              if (c) {
                var d = c.event;
                if (d) {
                  if (
                    d.appendInPlace ||
                    Math.abs(r.start - c.start) > 1 ||
                    c.start === 0
                  )
                    return;
                } else {
                  var h;
                  if (
                    (r.end <= c.start &&
                      ((h = i.details) == null ? void 0 : h.live) === !1) ||
                    (r.start > c.end && c.nextEvent)
                  )
                    return;
                }
              }
            }
            (this.startFragRequested = !0), this._loadFragForPlayback(r, i, o);
          },
        },
        {
          key: "_loadFragForPlayback",
          value: function (r, i, o) {
            var l = this;
            this._doFragLoad(r, i, o, function (u) {
              var c,
                d,
                h,
                f = u.frag;
              if (l.fragContextChanged(f))
                return (
                  l.warn(
                    Ce(
                      (c = Ce(
                        (d = Ce((h = "".concat(f.type, " sn: "))).call(h, f.sn))
                      ).call(d, u.part ? " part: " + u.part.index : "", " of "))
                    ).call(
                      c,
                      l.fragInfo(f, !1, u.part),
                      ") was dropped during download."
                    )
                  ),
                  void l.fragmentTracker.removeFragment(f)
                );
              f.stats.chunkCount++, l._handleFragmentLoadProgress(u);
            })
              .then(function (u) {
                if (u) {
                  var c = l.state,
                    d = u.frag;
                  if (l.fragContextChanged(d))
                    (c === li.FRAG_LOADING ||
                      (!l.fragCurrent && c === li.PARSING)) &&
                      (l.fragmentTracker.removeFragment(d),
                      (l.state = li.IDLE));
                  else {
                    var h, f, p;
                    "payload" in u &&
                      (l.log(
                        Ce(
                          (h = Ce(
                            (f = Ce(
                              (p = "Loaded ".concat(d.type, " sn: "))
                            ).call(p, d.sn, " of "))
                          ).call(f, l.playlistLabel(), " "))
                        ).call(h, d.level)
                      ),
                      l.hls.trigger(_t.FRAG_LOADED, u)),
                      l._handleFragmentLoadComplete(u);
                  }
                }
              })
              .catch(function (u) {
                l.state !== li.STOPPED &&
                  l.state !== li.ERROR &&
                  (l.warn(
                    "Frag error: ".concat((u == null ? void 0 : u.message) || u)
                  ),
                  l.resetFragmentLoading(r));
              });
          },
        },
        {
          key: "clearTrackerIfNeeded",
          value: function (r) {
            var i,
              o = this.fragmentTracker;
            if (o.getState(r) === c0.APPENDING) {
              var l = r.type,
                u = this.getFwdBufferInfo(this.mediaBuffer, l),
                c = Math.max(
                  r.duration,
                  u ? u.len : this.config.maxBufferLength
                ),
                d = this.backtrackFragment;
              ((d ? r.sn - d.sn : 0) === 1 ||
                this.reduceMaxBufferLength(c, r.duration)) &&
                o.removeFragment(r);
            } else
              ((i = this.mediaBuffer) == null ? void 0 : i.buffered.length) ===
              0
                ? o.removeAllFragments()
                : o.hasParts(r.type) &&
                  (o.detectPartialFragments({
                    frag: r,
                    part: null,
                    stats: r.stats,
                    id: r.type,
                  }),
                  o.getState(r) === c0.PARTIAL && o.removeFragment(r));
          },
        },
        {
          key: "checkLiveUpdate",
          value: function (r) {
            if (r.updated && !r.live) {
              var i = r.fragments[r.fragments.length - 1];
              this.fragmentTracker.detectPartialFragments({
                frag: i,
                part: null,
                stats: i.stats,
                id: i.type,
              });
            }
            r.fragments[0] || (r.deltaUpdateFailed = !0);
          },
        },
        {
          key: "waitForLive",
          value: function (r) {
            var i = r.details;
            return (
              (i == null ? void 0 : i.live) &&
              i.type !== "EVENT" &&
              (this.levelLastLoaded !== r || i.expired)
            );
          },
        },
        {
          key: "flushMainBuffer",
          value: function (r, i) {
            if (r - i) {
              var o = {
                startOffset: r,
                endOffset: i,
                type:
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : null,
              };
              this.hls.trigger(_t.BUFFER_FLUSHING, o);
            }
          },
        },
        {
          key: "_loadInitSegment",
          value: function (r, i) {
            var o = this;
            this._doFragLoad(r, i)
              .then(function (l) {
                var u = l == null ? void 0 : l.frag;
                if (!u || o.fragContextChanged(u) || !o.levels)
                  throw new Error("init load aborted");
                return l;
              })
              .then(function (l) {
                var u = o.hls,
                  c = l.frag,
                  d = l.payload,
                  h = c.decryptdata;
                if (
                  d &&
                  d.byteLength > 0 &&
                  h != null &&
                  h.key &&
                  h.iv &&
                  Qk(h.method)
                ) {
                  var f = self.performance.now();
                  return o.decrypter
                    .decrypt(
                      new Uint8Array(d),
                      h.key.buffer,
                      h.iv.buffer,
                      nle(h.method)
                    )
                    .catch(function (p) {
                      throw (
                        (u.trigger(_t.ERROR, {
                          type: no.MEDIA_ERROR,
                          details: kr.FRAG_DECRYPT_ERROR,
                          fatal: !1,
                          error: p,
                          reason: p.message,
                          frag: c,
                        }),
                        p)
                      );
                    })
                    .then(function (p) {
                      var g = self.performance.now();
                      return (
                        u.trigger(_t.FRAG_DECRYPTED, {
                          frag: c,
                          payload: p,
                          stats: { tstart: f, tdecrypt: g },
                        }),
                        (l.payload = p),
                        o.completeInitSegmentLoad(l)
                      );
                    });
                }
                return o.completeInitSegmentLoad(l);
              })
              .catch(function (l) {
                o.state !== li.STOPPED &&
                  o.state !== li.ERROR &&
                  (o.warn(l), o.resetFragmentLoading(r));
              });
          },
        },
        {
          key: "completeInitSegmentLoad",
          value: function (r) {
            if (!this.levels)
              throw new Error("init load aborted, missing levels");
            var i = r.frag.stats;
            this.state !== li.STOPPED && (this.state = li.IDLE),
              (r.frag.data = new Uint8Array(r.payload)),
              (i.parsing.start = i.buffering.start = self.performance.now()),
              (i.parsing.end = i.buffering.end = self.performance.now()),
              this.tick();
          },
        },
        {
          key: "fragContextChanged",
          value: function (r) {
            var i = this.fragCurrent;
            return !r || !i || r.sn !== i.sn || r.level !== i.level;
          },
        },
        {
          key: "fragBufferedComplete",
          value: function (r, i) {
            var o,
              l,
              u,
              c,
              d = this.mediaBuffer ? this.mediaBuffer : this.media;
            if (
              (this.log(
                Ce(
                  (o = Ce(
                    (l = Ce(
                      (u = Ce((c = "Buffered ".concat(r.type, " sn: "))).call(
                        c,
                        r.sn
                      ))
                    ).call(u, i ? " part: " + i.index : "", " of "))
                  ).call(l, this.fragInfo(r, !1, i), " > buffer:"))
                ).call(
                  o,
                  d ? lHt.toString(dc.getBuffered(d)) : "(detached)",
                  ")"
                )
              ),
              vf(r))
            ) {
              var h;
              if (r.type !== wo.SUBTITLE) {
                var f = r.elementaryStreams;
                if (
                  !Dn(f).some(function (g) {
                    return !!f[g];
                  })
                )
                  return void (this.state = li.IDLE);
              }
              var p = (h = this.levels) == null ? void 0 : h[r.level];
              p != null &&
                p.fragmentError &&
                (this.log(
                  "Resetting level fragment error count of ".concat(
                    p.fragmentError,
                    " on frag buffered"
                  )
                ),
                (p.fragmentError = 0));
            }
            this.state = li.IDLE;
          },
        },
        {
          key: "_handleFragmentLoadComplete",
          value: function (r) {
            var i = this.transmuxer;
            if (i) {
              var o = r.frag,
                l = r.part,
                u = r.partsLoaded,
                c =
                  !u ||
                  u.length === 0 ||
                  u.some(function (h) {
                    return !h;
                  }),
                d = new a9e(
                  o.level,
                  o.sn,
                  o.stats.chunkCount + 1,
                  0,
                  l ? l.index : -1,
                  !c
                );
              i.flush(d);
            }
          },
        },
        { key: "_handleFragmentLoadProgress", value: function (r) {} },
        {
          key: "_doFragLoad",
          value: function (r, i) {
            var o,
              l,
              u,
              c,
              d,
              h,
              f = this,
              p =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : null,
              g = arguments.length > 3 ? arguments[3] : void 0;
            this.fragCurrent = r;
            var y = i == null ? void 0 : i.details;
            if (!this.levels || !y)
              throw new Error(
                "frag load aborted, missing level".concat(
                  y ? "" : " detail",
                  "s"
                )
              );
            var v,
              b,
              w,
              k,
              D = null;
            !r.encrypted || ((h = r.decryptdata) != null && h.key)
              ? !r.encrypted &&
                y.encryptedFragments.length &&
                this.keyLoader.loadClear(r, y.encryptedFragments)
              : (this.log(
                  Ce(
                    (v = Ce(
                      (b = Ce(
                        (w = Ce(
                          (k = "Loading key for ".concat(r.sn, " of ["))
                        ).call(k, y.startSN, "-"))
                      ).call(w, y.endSN, "], "))
                    ).call(b, this.playlistLabel(), " "))
                  ).call(v, r.level)
                ),
                (this.state = li.KEY_LOADING),
                (this.fragCurrent = r),
                (D = this.keyLoader.load(r).then(function (pt) {
                  if (!f.fragContextChanged(pt.frag))
                    return (
                      f.hls.trigger(_t.KEY_LOADED, pt),
                      f.state === li.KEY_LOADING && (f.state = li.IDLE),
                      pt
                    );
                })),
                this.hls.trigger(_t.KEY_LOADING, { frag: r }),
                this.fragCurrent === null &&
                  (D = Ar.reject(
                    new Error(
                      "frag load aborted, context changed in KEY_LOADING"
                    )
                  )));
            var $ = this.fragPrevious;
            if (vf(r) && (!$ || r.sn !== $.sn)) {
              var N,
                P,
                I = this.shouldLoadParts(i.details, r.end);
              I !== this.loadingParts &&
                (this.log(
                  Ce(
                    (N = Ce(
                      (P = "LL-Part loading ".concat(
                        I ? "ON" : "OFF",
                        " loading sn "
                      ))
                    ).call(P, $ == null ? void 0 : $.sn, "->"))
                  ).call(N, r.sn)
                ),
                (this.loadingParts = I));
            }
            if (((p = Math.max(r.start, p || 0)), this.loadingParts && vf(r))) {
              var O = y.partList;
              if (O && g) {
                p > r.end && y.fragmentHint && (r = y.fragmentHint);
                var X = this.getNextPart(O, r, p);
                if (X > -1) {
                  var G,
                    H,
                    E,
                    S,
                    L,
                    W,
                    F,
                    oe,
                    De,
                    Xe,
                    ze = O[X];
                  return (
                    (r = this.fragCurrent = ze.fragment),
                    this.log(
                      Ce(
                        (G = Ce(
                          (H = Ce(
                            (E = Ce(
                              (S = Ce(
                                (L = Ce(
                                  (W = Ce(
                                    (F = Ce(
                                      (oe = Ce(
                                        (De = "Loading ".concat(
                                          r.type,
                                          " sn: "
                                        ))
                                      ).call(De, r.sn, " part: "))
                                    ).call(oe, ze.index, " ("))
                                  ).call(F, X, "/"))
                                ).call(W, O.length - 1, ") of "))
                              ).call(L, this.fragInfo(r, !1, ze), ") cc: "))
                            ).call(S, r.cc, " ["))
                          ).call(E, y.startSN, "-"))
                        ).call(H, y.endSN, "], target: "))
                      ).call(G, wl(p.toFixed(3)))
                    ),
                    (this.nextLoadPosition = ze.start + ze.duration),
                    (this.state = li.FRAG_LOADING),
                    (Xe = D
                      ? D.then(function (pt) {
                          return !pt || f.fragContextChanged(pt.frag)
                            ? null
                            : f.doFragPartsLoad(r, ze, i, g);
                        }).catch(function (pt) {
                          return f.handleFragLoadError(pt);
                        })
                      : this.doFragPartsLoad(r, ze, i, g).catch(function (pt) {
                          return f.handleFragLoadError(pt);
                        })),
                    this.hls.trigger(_t.FRAG_LOADING, {
                      frag: r,
                      part: ze,
                      targetBufferTime: p,
                    }),
                    this.fragCurrent === null
                      ? Ar.reject(
                          new Error(
                            "frag load aborted, context changed in FRAG_LOADING parts"
                          )
                        )
                      : Xe
                  );
                }
                if (!r.url || this.loadedEndOfParts(O, p))
                  return Ar.resolve(null);
              }
            }
            if (vf(r) && this.loadingParts)
              this.log(
                "LL-Part loading OFF after next part miss @".concat(
                  p.toFixed(2)
                )
              ),
                (this.loadingParts = !1);
            else if (!r.url) return Ar.resolve(null);
            this.log(
              Ce(
                (o = Ce(
                  (l = Ce(
                    (u = Ce(
                      (c = Ce((d = "Loading ".concat(r.type, " sn: "))).call(
                        d,
                        r.sn,
                        " of "
                      ))
                    ).call(c, this.fragInfo(r, !1), ") cc: "))
                  ).call(u, r.cc, " "))
                ).call(
                  l,
                  y ? "[" + y.startSN + "-" + y.endSN + "]" : "",
                  ", target: "
                ))
              ).call(o, wl(p.toFixed(3)))
            ),
              _a(r.sn) &&
                !this.bitrateTest &&
                (this.nextLoadPosition = r.start + r.duration),
              (this.state = li.FRAG_LOADING);
            var ht,
              gt = this.config.progressive;
            return (
              (ht =
                gt && D
                  ? D.then(function (pt) {
                      return !pt ||
                        f.fragContextChanged(pt == null ? void 0 : pt.frag)
                        ? null
                        : f.fragmentLoader.load(r, g);
                    }).catch(function (pt) {
                      return f.handleFragLoadError(pt);
                    })
                  : Ar.all([this.fragmentLoader.load(r, gt ? g : void 0), D])
                      .then(function (pt) {
                        var $t = hs(pt, 1)[0];
                        return !gt && $t && g && g($t), $t;
                      })
                      .catch(function (pt) {
                        return f.handleFragLoadError(pt);
                      })),
              this.hls.trigger(_t.FRAG_LOADING, {
                frag: r,
                targetBufferTime: p,
              }),
              this.fragCurrent === null
                ? Ar.reject(
                    new Error(
                      "frag load aborted, context changed in FRAG_LOADING"
                    )
                  )
                : ht
            );
          },
        },
        {
          key: "doFragPartsLoad",
          value: function (r, i, o, l) {
            var u = this;
            return new Ar(function (c, d) {
              var h,
                f = [],
                p = (h = o.details) == null ? void 0 : h.partList;
              (function g(y) {
                u.fragmentLoader
                  .loadPart(r, y, l)
                  .then(function (v) {
                    f[y.index] = v;
                    var b = v.part;
                    u.hls.trigger(_t.FRAG_LOADED, v);
                    var w =
                      e1e(o.details, r.sn, y.index + 1) ||
                      c9e(p, r.sn, y.index + 1);
                    if (!w) return c({ frag: r, part: b, partsLoaded: f });
                    g(w);
                  })
                  .catch(d);
              })(i);
            });
          },
        },
        {
          key: "handleFragLoadError",
          value: function (r) {
            if ("data" in r) {
              var i = r.data;
              r.data && i.details === kr.INTERNAL_ABORTED
                ? this.handleFragLoadAborted(i.frag, i.part)
                : this.hls.trigger(_t.ERROR, i);
            } else
              this.hls.trigger(_t.ERROR, {
                type: no.OTHER_ERROR,
                details: kr.INTERNAL_EXCEPTION,
                err: r,
                error: r,
                fatal: !0,
              });
            return null;
          },
        },
        {
          key: "_handleTransmuxerFlush",
          value: function (r) {
            var i = this.getCurrentContext(r);
            if (i && this.state === li.PARSING) {
              var o = i.frag,
                l = i.part,
                u = i.level,
                c = self.performance.now();
              (o.stats.parsing.end = c), l && (l.stats.parsing.end = c);
              var d,
                h = this.getLevelDetails(),
                f = (h && o.sn > h.endSN) || this.shouldLoadParts(h, o.end);
              f !== this.loadingParts &&
                (this.log(
                  Ce(
                    (d = "LL-Part loading ".concat(
                      f ? "ON" : "OFF",
                      " after parsing segment ending @"
                    ))
                  ).call(d, o.end.toFixed(2))
                ),
                (this.loadingParts = f)),
                this.updateLevelTiming(o, l, u, r.partial);
            } else
              this.fragCurrent ||
                this.state === li.STOPPED ||
                this.state === li.ERROR ||
                (this.state = li.IDLE);
          },
        },
        {
          key: "shouldLoadParts",
          value: function (r, i) {
            if (this.config.lowLatencyMode) {
              if (!r) return this.loadingParts;
              if (r != null && r.partList) {
                var o,
                  l,
                  u = r.partList[0];
                if (
                  i >=
                    u.end +
                      (((o = r.fragmentHint) == null ? void 0 : o.duration) ||
                        0) &&
                  (this.hls.hasEnoughToStart
                    ? ((l = this.media) == null ? void 0 : l.currentTime) ||
                      this.lastCurrentTime
                    : this.getLoadPosition()) >
                    u.start - u.fragment.duration
                )
                  return !0;
              }
            }
            return !1;
          },
        },
        {
          key: "getCurrentContext",
          value: function (r) {
            var i,
              o,
              l = this.levels,
              u = this.fragCurrent,
              c = r.level,
              d = r.sn,
              h = r.part;
            if (l == null || !l[c])
              return (
                this.warn(
                  Ce(
                    (i = Ce(
                      (o =
                        "Levels object was unset while buffering fragment ".concat(
                          d,
                          " of "
                        ))
                    ).call(o, this.playlistLabel(), " "))
                  ).call(i, c, ". The current chunk will not be buffered.")
                ),
                null
              );
            var f = l[c],
              p = f.details,
              g = h > -1 ? e1e(p, d, h) : null,
              y = g ? g.fragment : iHt(p, d, u);
            return y
              ? (u && u !== y && (y.stats = u.stats),
                { frag: y, part: g, level: f })
              : null;
          },
        },
        {
          key: "bufferFragmentData",
          value: function (r, i, o, l, u) {
            var c;
            if (r && this.state === li.PARSING) {
              var d = r.data1,
                h = r.data2,
                f = d;
              if ((d && h && (f = dm(d, h)), (c = f) != null && c.length)) {
                var p = {
                  type: r.type,
                  frag: i,
                  part: o,
                  chunkMeta: l,
                  parent: i.type,
                  data: f,
                };
                if (
                  (this.hls.trigger(_t.BUFFER_APPENDING, p),
                  r.dropped && r.independent && !o)
                ) {
                  if (u) return;
                  this.flushBufferGap(i);
                }
              }
            }
          },
        },
        {
          key: "flushBufferGap",
          value: function (r) {
            var i = this.media;
            if (i)
              if (dc.isBuffered(i, i.currentTime)) {
                var o = i.currentTime,
                  l = dc.bufferInfo(i, o, 0),
                  u = r.duration,
                  c = Math.min(
                    2 * this.config.maxFragLookUpTolerance,
                    0.25 * u
                  ),
                  d = Math.max(Math.min(r.start - c, l.end - c), o + c);
                r.start - d > c && this.flushMainBuffer(d, r.start);
              } else this.flushMainBuffer(0, r.start);
          },
        },
        {
          key: "getFwdBufferInfo",
          value: function (r, i) {
            var o,
              l = this.getLoadPosition();
            if (!_a(l)) return null;
            var u =
              this.lastCurrentTime > l || ((o = this.media) != null && o.paused)
                ? 0
                : this.config.maxBufferHole;
            return this.getFwdBufferInfoAtPos(r, l, i, u);
          },
        },
        {
          key: "getFwdBufferInfoAtPos",
          value: function (r, i, o, l) {
            var u = dc.bufferInfo(r, i, l);
            if (u.len === 0 && u.nextStart !== void 0) {
              var c = this.fragmentTracker.getBufferedFrag(i, o);
              if (c && (u.nextStart <= c.end || c.gap))
                return dc.bufferInfo(r, i, Math.max(u.nextStart, l));
            }
            return u;
          },
        },
        {
          key: "getMaxBufferLength",
          value: function (r) {
            var i,
              o = this.config;
            return (
              (i = r
                ? Math.max((8 * o.maxBufferSize) / r, o.maxBufferLength)
                : o.maxBufferLength),
              Math.min(i, o.maxMaxBufferLength)
            );
          },
        },
        {
          key: "reduceMaxBufferLength",
          value: function (r, i) {
            var o = this.config,
              l = Math.max(Math.min(r - i, o.maxBufferLength), i),
              u = Math.max(r - 3 * i, o.maxMaxBufferLength / 2, l);
            return (
              u >= l &&
              ((o.maxMaxBufferLength = u),
              this.warn("Reduce max buffer length to ".concat(u, "s")),
              !0)
            );
          },
        },
        {
          key: "getAppendedFrag",
          value: function (r) {
            var i,
              o =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : wo.MAIN,
              l =
                (i = this.fragmentTracker) == null
                  ? void 0
                  : i.getAppendedFrag(r, o);
            return l && "fragment" in l ? l.fragment : l;
          },
        },
        {
          key: "getNextFragment",
          value: function (r, i) {
            var o = i.fragments,
              l = o.length;
            if (!l) return null;
            var u = this.config,
              c = o[0].start,
              d = u.lowLatencyMode && !!i.partList,
              h = null;
            if (i.live) {
              var f,
                p = u.initialLiveManifestSize;
              if (l < p)
                return (
                  this.warn(
                    Ce(
                      (f =
                        "Not enough fragments to start playback (have: ".concat(
                          l,
                          ", need: "
                        ))
                    ).call(f, p, ")")
                  ),
                  null
                );
              if (
                (!i.PTSKnown &&
                  !this.startFragRequested &&
                  this.startPosition === -1) ||
                r < c
              ) {
                var g, y, v, b;
                d &&
                  !this.loadingParts &&
                  (this.log("LL-Part loading ON for initial live fragment"),
                  (this.loadingParts = !0)),
                  (h = this.getInitialLiveFragment(i, o));
                var w = this.hls.startPosition,
                  k = this.hls.liveSyncPosition,
                  D = h ? (w !== -1 ? w : k) || h.start : r;
                this.log(
                  Ce(
                    (g = Ce(
                      (y = Ce(
                        (v = "Setting startPosition to ".concat(
                          D,
                          " to match initial live edge. mainStart: "
                        ))
                      ).call(v, w, " liveSyncPosition: "))
                    ).call(y, k, " frag.start: "))
                  ).call(g, (b = h) == null ? void 0 : b.start)
                ),
                  (this.startPosition = this.nextLoadPosition = D);
              }
            } else r <= c && (h = o[0]);
            if (!h) {
              var $ = this.loadingParts ? i.partEnd : i.fragmentEnd;
              h = this.getFragmentAtPosition(r, $, i);
            }
            return this.mapToInitFragWhenRequired(h);
          },
        },
        {
          key: "isLoopLoading",
          value: function (r, i) {
            var o = this.fragmentTracker.getState(r);
            return (
              (o === c0.OK || (o === c0.PARTIAL && !!r.gap)) &&
              this.nextLoadPosition > i
            );
          },
        },
        {
          key: "getNextFragmentLoopLoading",
          value: function (r, i, o, l, u) {
            var c = null;
            if (
              r.gap &&
              (c = this.getNextFragment(this.nextLoadPosition, i)) &&
              !c.gap &&
              o.nextStart
            ) {
              var d = this.getFwdBufferInfoAtPos(
                this.mediaBuffer ? this.mediaBuffer : this.media,
                o.nextStart,
                l,
                0
              );
              if (d !== null && o.len + d.len >= u) {
                var h,
                  f = c.sn;
                return (
                  this.loopSn !== f &&
                    (this.log(
                      Ce(
                        (h = 'buffer full after gaps in "'.concat(
                          l,
                          '" playlist starting at sn: '
                        ))
                      ).call(h, f)
                    ),
                    (this.loopSn = f)),
                  null
                );
              }
            }
            return (this.loopSn = void 0), c;
          },
        },
        {
          key: "mapToInitFragWhenRequired",
          value: function (r) {
            return r == null ||
              !r.initSegment ||
              (r != null && r.initSegment.data) ||
              this.bitrateTest
              ? r
              : r.initSegment;
          },
        },
        {
          key: "getNextPart",
          value: function (r, i, o) {
            for (var l = -1, u = !1, c = !0, d = 0, h = r.length; d < h; d++) {
              var f = r[d];
              if (((c = c && !f.independent), l > -1 && o < f.start)) break;
              var p = f.loaded;
              p
                ? (l = -1)
                : (u || f.independent || c) && f.fragment === i && (l = d),
                (u = p);
            }
            return l;
          },
        },
        {
          key: "loadedEndOfParts",
          value: function (r, i) {
            var o = r[r.length - 1];
            return o && i > o.start && o.loaded;
          },
        },
        {
          key: "getInitialLiveFragment",
          value: function (r, i) {
            var o = this.fragPrevious,
              l = null;
            if (o) {
              if (
                (r.hasProgramDateTime &&
                  (this.log(
                    "Live playlist, switching playlist, load frag with same PDT: ".concat(
                      o.programDateTime
                    )
                  ),
                  (l = aBt(
                    i,
                    o.endProgramDateTime,
                    this.config.maxFragLookUpTolerance
                  ))),
                !l)
              ) {
                var u = o.sn + 1;
                if (u >= r.startSN && u <= r.endSN) {
                  var c = i[u - r.startSN];
                  o.cc === c.cc &&
                    ((l = c),
                    this.log(
                      "Live playlist, switching playlist, load frag with next SN: ".concat(
                        l.sn
                      )
                    ));
                }
                l ||
                  ((l = J8e(i, o.cc)) &&
                    this.log(
                      "Live playlist, switching playlist, load frag with same CC: ".concat(
                        l.sn
                      )
                    ));
              }
            } else {
              var d = this.hls.liveSyncPosition;
              d !== null &&
                (l = this.getFragmentAtPosition(
                  d,
                  this.bitrateTest ? r.fragmentEnd : r.edge,
                  r
                ));
            }
            return l;
          },
        },
        {
          key: "getFragmentAtPosition",
          value: function (r, i, o) {
            var l,
              u,
              c = this.config,
              d = this.fragPrevious,
              h = o.fragments,
              f = o.endSN,
              p = o.fragmentHint,
              g = c.maxFragLookUpTolerance,
              y = o.partList,
              v = !!(this.loadingParts && y != null && y.length && p);
            if (
              (v &&
                p &&
                !this.bitrateTest &&
                y[y.length - 1].fragment.sn === p.sn &&
                ((h = Ce(h).call(h, p)), (f = p.sn)),
              r < i
                ? (l = FI(
                    d,
                    h,
                    r,
                    r < this.lastCurrentTime ||
                      r > i - g ||
                      ((u = this.media) != null && u.paused) ||
                      !this.startFragRequested
                      ? 0
                      : g
                  ))
                : (l = h[h.length - 1]),
              l)
            ) {
              var b = l.sn - o.startSN,
                w = this.fragmentTracker.getState(l);
              if (
                ((w === c0.OK || (w === c0.PARTIAL && l.gap)) && (d = l),
                d &&
                  l.sn === d.sn &&
                  (!v || y[0].fragment.sn > l.sn || (!o.live && !v)) &&
                  d &&
                  l.level === d.level)
              ) {
                var k = h[b + 1];
                l =
                  l.sn < f && this.fragmentTracker.getState(k) !== c0.OK
                    ? k
                    : null;
              }
            }
            return l;
          },
        },
        {
          key: "alignPlaylists",
          value: function (r, i, o) {
            var l = r.fragments.length;
            if (!l) return this.warn("No fragments in live playlist"), 0;
            var u = r.fragmentStart,
              c = !i,
              d = r.alignedSliding && _a(u);
            if (c || (!d && !u)) {
              var h, f, p;
              sHt(o, r);
              var g = r.fragmentStart;
              return (
                this.log(
                  Ce(
                    (h = Ce(
                      (f = Ce(
                        (p = "Live playlist sliding: ".concat(
                          g.toFixed(2),
                          " start-sn: "
                        ))
                      ).call(p, i ? i.startSN : "na", "->"))
                    ).call(f, r.startSN, " fragments: "))
                  ).call(h, l)
                ),
                g
              );
            }
            return u;
          },
        },
        {
          key: "waitForCdnTuneIn",
          value: function (r) {
            return (
              r.live &&
              r.canBlockReload &&
              r.partTarget &&
              r.tuneInGoal > Math.max(r.partHoldBack, 3 * r.partTarget)
            );
          },
        },
        {
          key: "setStartPosition",
          value: function (r, i) {
            var o = this.startPosition;
            if ((o < i && (o = -1), o === -1)) {
              var l,
                u,
                c = this.startTimeOffset !== null,
                d = c ? this.startTimeOffset : r.startTimeOffset;
              d !== null && _a(d)
                ? ((o = i + d),
                  d < 0 && (o += r.edge),
                  (o = Math.min(Math.max(i, o), i + r.totalduration)),
                  this.log(
                    Ce(
                      (l = Ce(
                        (u = "Setting startPosition to ".concat(
                          o,
                          " for start time offset "
                        ))
                      ).call(u, d, " found in "))
                    ).call(l, c ? "multivariant" : "media", " playlist")
                  ),
                  (this.startPosition = o))
                : r.live
                ? ((o = this.hls.liveSyncPosition || i),
                  (this.startPosition = -1))
                : (this.log("setting startPosition to 0 by default"),
                  (this.startPosition = o = 0)),
                (this.lastCurrentTime = o);
            }
            this.nextLoadPosition = o;
          },
        },
        {
          key: "getLoadPosition",
          value: function () {
            var r,
              i = this.media,
              o = 0;
            return (
              (r = this.hls) != null && r.hasEnoughToStart && i
                ? (o = i.currentTime)
                : this.nextLoadPosition >= 0 && (o = this.nextLoadPosition),
              o
            );
          },
        },
        {
          key: "handleFragLoadAborted",
          value: function (r, i) {
            var o, l, u;
            this.transmuxer &&
              r.type === this.playlistType &&
              vf(r) &&
              r.stats.aborted &&
              (this.warn(
                Ce(
                  (o = Ce(
                    (l = Ce((u = "Fragment ".concat(r.sn))).call(
                      u,
                      i ? " part " + i.index : "",
                      " of "
                    ))
                  ).call(l, this.playlistLabel(), " "))
                ).call(o, r.level, " was aborted")
              ),
              this.resetFragmentLoading(r));
          },
        },
        {
          key: "resetFragmentLoading",
          value: function (r) {
            (this.fragCurrent &&
              (this.fragContextChanged(r) ||
                this.state === li.FRAG_LOADING_WAITING_RETRY)) ||
              (this.state = li.IDLE);
          },
        },
        {
          key: "onFragmentOrKeyLoadError",
          value: function (r, i) {
            if (i.chunkMeta && !i.frag) {
              var o = this.getCurrentContext(i.chunkMeta);
              o && (i.frag = o.frag);
            }
            var l = i.frag;
            if (l && l.type === r && this.levels)
              if (this.fragContextChanged(l)) {
                var u, c;
                this.warn(
                  Ce(
                    (u =
                      "Frag load error must match current frag to retry ".concat(
                        l.url,
                        " > "
                      ))
                  ).call(u, (c = this.fragCurrent) == null ? void 0 : c.url)
                );
              } else {
                var d = i.details === kr.FRAG_GAP;
                d && this.fragmentTracker.fragBuffered(l, !0);
                var h = i.errorAction,
                  f = h || {},
                  p = f.action,
                  g = Ca(f),
                  y = f.retryCount,
                  v = y === void 0 ? 0 : y,
                  b = f.retryConfig,
                  w = !!h && !!b,
                  k = w && p === Qd.RetryRequest,
                  D =
                    w && !h.resolved && g === o0.MoveAllAlternatesMatchingHost;
                if (!k && D && vf(l) && !l.endList)
                  this.resetFragmentErrors(r),
                    this.treatAsGap(l),
                    (h.resolved = !0);
                else if ((k || D) && v < b.maxNumRetry) {
                  var $, N, P, I, O, X;
                  this.resetStartWhenNotLoaded(this.levelLastLoaded);
                  var G = Jse(b, v);
                  this.warn(
                    Ce(
                      ($ = Ce(
                        (N = Ce(
                          (P = Ce(
                            (I = Ce(
                              (O = Ce(
                                (X = "Fragment ".concat(l.sn, " of "))
                              ).call(X, r, " "))
                            ).call(O, l.level, " errored with "))
                          ).call(I, i.details, ", retrying loading "))
                        ).call(P, v + 1, "/"))
                      ).call(N, b.maxNumRetry, " in "))
                    ).call($, G, "ms")
                  ),
                    (h.resolved = !0),
                    (this.retryDate = self.performance.now() + G),
                    (this.state = li.FRAG_LOADING_WAITING_RETRY);
                } else if (b && h) {
                  var H;
                  if ((this.resetFragmentErrors(r), !(v < b.maxNumRetry)))
                    return void this.warn(
                      Ce(
                        (H = "".concat(
                          i.details,
                          " reached or exceeded max retry ("
                        ))
                      ).call(H, v, ")")
                    );
                  d || p === Qd.RemoveAlternatePermanently || (h.resolved = !0);
                } else
                  p === Qd.SendAlternateToPenaltyBox
                    ? (this.state = li.WAITING_LEVEL)
                    : (this.state = li.ERROR);
                this.tickImmediate();
              }
          },
        },
        {
          key: "reduceLengthAndFlushBuffer",
          value: function (r) {
            if (this.state === li.PARSING || this.state === li.PARSED) {
              var i = r.frag,
                o = r.parent,
                l = this.getFwdBufferInfo(this.mediaBuffer, o),
                u = l && l.len > 0.5;
              u &&
                this.reduceMaxBufferLength(
                  l.len,
                  (i == null ? void 0 : i.duration) || 10
                );
              var c = !u;
              return (
                c &&
                  this.warn(
                    "Buffer full error while media.currentTime is not buffered, flush ".concat(
                      o,
                      " buffer"
                    )
                  ),
                i &&
                  (this.fragmentTracker.removeFragment(i),
                  (this.nextLoadPosition = i.start)),
                this.resetLoadingState(),
                c
              );
            }
            return !1;
          },
        },
        {
          key: "resetFragmentErrors",
          value: function (r) {
            r === wo.AUDIO && (this.fragCurrent = null),
              this.hls.hasEnoughToStart || (this.startFragRequested = !1),
              this.state !== li.STOPPED && (this.state = li.IDLE);
          },
        },
        {
          key: "afterBufferFlushed",
          value: function (r, i, o) {
            if (r) {
              var l = dc.getBuffered(r);
              this.fragmentTracker.detectEvictedFragments(i, l, o),
                this.state === li.ENDED && this.resetLoadingState();
            }
          },
        },
        {
          key: "resetLoadingState",
          value: function () {
            this.log("Reset loading state"),
              (this.fragCurrent = null),
              (this.fragPrevious = null),
              this.state !== li.STOPPED && (this.state = li.IDLE);
          },
        },
        {
          key: "resetStartWhenNotLoaded",
          value: function (r) {
            if (!this.hls.hasEnoughToStart) {
              this.startFragRequested = !1;
              var i = r ? r.details : null;
              i != null && i.live
                ? (this.log("resetting startPosition for live start"),
                  (this.startPosition = -1),
                  this.setStartPosition(i, i.fragmentStart),
                  this.resetLoadingState())
                : (this.nextLoadPosition = this.startPosition);
            }
          },
        },
        {
          key: "resetWhenMissingContext",
          value: function (r) {
            var i, o;
            this.warn(
              Ce(
                (i = Ce(
                  (o =
                    "The loading context changed while buffering fragment ".concat(
                      r.sn,
                      " of "
                    ))
                ).call(o, this.playlistLabel(), " "))
              ).call(i, r.level, ". This chunk will not be buffered.")
            ),
              this.removeUnbufferedFrags(),
              this.resetStartWhenNotLoaded(this.levelLastLoaded),
              this.resetLoadingState();
          },
        },
        {
          key: "removeUnbufferedFrags",
          value: function () {
            var r =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : 0;
            this.fragmentTracker.removeFragmentsInRange(
              r,
              1 / 0,
              this.playlistType,
              !1,
              !0
            );
          },
        },
        {
          key: "updateLevelTiming",
          value: function (r, i, o, l) {
            var u,
              c,
              d,
              h,
              f,
              p = this,
              g = o.details;
            if (g) {
              if (
                !ga((u = Dn(r.elementaryStreams))).call(
                  u,
                  function (D, $) {
                    var N = r.elementaryStreams[$];
                    if (N) {
                      var P,
                        I,
                        O = N.endPTS - N.startPTS;
                      if (O <= 0)
                        return (
                          p.warn(
                            Ce(
                              (P = Ce(
                                (I = "Could not parse fragment ".concat(
                                  r.sn,
                                  " "
                                ))
                              ).call(I, $, " duration reliably ("))
                            ).call(P, O, ")")
                          ),
                          D || !1
                        );
                      var X = l
                        ? 0
                        : l9e(g, r, N.startPTS, N.endPTS, N.startDTS, N.endDTS);
                      return (
                        p.hls.trigger(_t.LEVEL_PTS_UPDATED, {
                          details: g,
                          level: o,
                          drift: X,
                          type: $,
                          frag: r,
                          start: N.startPTS,
                          end: N.endPTS,
                        }),
                        !0
                      );
                    }
                    return D;
                  },
                  !1
                ) &&
                ((f = this.transmuxer) == null ? void 0 : f.error) === null
              ) {
                var y,
                  v,
                  b,
                  w,
                  k = new Error(
                    Ce(
                      (y = Ce(
                        (v = "Found no media in fragment ".concat(r.sn, " of "))
                      ).call(v, this.playlistLabel(), " "))
                    ).call(
                      y,
                      r.level,
                      " resetting transmuxer to fallback to playlist timing"
                    )
                  );
                if (
                  (o.fragmentError === 0 && this.treatAsGap(r, o),
                  this.warn(k.message),
                  this.hls.trigger(_t.ERROR, {
                    type: no.MEDIA_ERROR,
                    details: kr.FRAG_PARSING_ERROR,
                    fatal: !1,
                    error: k,
                    frag: r,
                    reason: Ce(
                      (b = Ce(
                        (w = "Found no media in msn ".concat(r.sn, " of "))
                      ).call(w, this.playlistLabel(), ' "'))
                    ).call(b, o.url, '"'),
                  }),
                  !this.hls)
                )
                  return;
                this.resetTransmuxer();
              }
              (this.state = li.PARSED),
                this.log(
                  Ce(
                    (c = Ce(
                      (d = Ce((h = "Parsed ".concat(r.type, " sn: "))).call(
                        h,
                        r.sn
                      ))
                    ).call(d, i ? " part: " + i.index : "", " of "))
                  ).call(c, this.fragInfo(r, !1, i), ")")
                ),
                this.hls.trigger(_t.FRAG_PARSED, { frag: r, part: i });
            } else this.warn("level.details undefined");
          },
        },
        {
          key: "playlistLabel",
          value: function () {
            return this.playlistType === wo.MAIN ? "level" : "track";
          },
        },
        {
          key: "fragInfo",
          value: function (r) {
            var i,
              o,
              l,
              u,
              c,
              d,
              h,
              f =
                !(arguments.length > 1 && arguments[1] !== void 0) ||
                arguments[1],
              p = arguments.length > 2 ? arguments[2] : void 0;
            return Ce(
              (i = Ce(
                (o = Ce(
                  (l = Ce(
                    (u = Ce((c = "".concat(this.playlistLabel(), " "))).call(
                      c,
                      r.level,
                      " ("
                    ))
                  ).call(u, p ? "part" : "frag", ":["))
                ).call(
                  l,
                  ((d = f && !p ? r.startPTS : (p || r).start) != null
                    ? d
                    : NaN
                  ).toFixed(3),
                  "-"
                ))
              ).call(
                o,
                ((h = f && !p ? r.endPTS : (p || r).end) != null
                  ? h
                  : NaN
                ).toFixed(3),
                "]"
              ))
            ).call(
              i,
              p && r.type === "main"
                ? "INDEPENDENT=" + (p.independent ? "YES" : "NO")
                : ""
            );
          },
        },
        {
          key: "treatAsGap",
          value: function (r, i) {
            i && i.fragmentError++,
              (r.gap = !0),
              this.fragmentTracker.removeFragment(r),
              this.fragmentTracker.fragBuffered(r, !0);
          },
        },
        {
          key: "resetTransmuxer",
          value: function () {
            var r;
            (r = this.transmuxer) == null || r.reset();
          },
        },
        {
          key: "recoverWorkerError",
          value: function (r) {
            r.event === "demuxerWorker" &&
              (this.fragmentTracker.removeAllFragments(),
              this.transmuxer &&
                (this.transmuxer.destroy(), (this.transmuxer = null)),
              this.resetStartWhenNotLoaded(this.levelLastLoaded),
              this.resetLoadingState());
          },
        },
        {
          key: "state",
          get: function () {
            return this._state;
          },
          set: function (r) {
            var i,
              o = this._state;
            o !== r &&
              ((this._state = r),
              this.log(Ce((i = "".concat(o, "->"))).call(i, r)));
          },
        },
      ]),
      n
    );
  })(),
  uHt = (function () {
    function t() {
      Wn(this, t), (this.chunks = []), (this.dataLength = 0);
    }
    return (
      Kn(t, [
        {
          key: "push",
          value: function (e) {
            this.chunks.push(e), (this.dataLength += e.length);
          },
        },
        {
          key: "flush",
          value: function () {
            var e,
              n = this.chunks,
              r = this.dataLength;
            return n.length
              ? ((e = n.length === 1 ? n[0] : cHt(n, r)), this.reset(), e)
              : new Uint8Array(0);
          },
        },
        {
          key: "reset",
          value: function () {
            (this.chunks.length = 0), (this.dataLength = 0);
          },
        },
      ]),
      t
    );
  })();
function cHt(t, e) {
  for (var n = new Uint8Array(e), r = 0, i = 0; i < t.length; i++) {
    var o = t[i];
    n.set(o, r), (r += o.length);
  }
  return n;
}
var p9e = { exports: {} };
(function (t) {
  var e = Object.prototype.hasOwnProperty,
    n = "~";
  function r() {}
  function i(c, d, h) {
    (this.fn = c), (this.context = d), (this.once = h || !1);
  }
  function o(c, d, h, f, p) {
    if (typeof h != "function")
      throw new TypeError("The listener must be a function");
    var g = new i(h, f || c, p),
      y = n ? n + d : d;
    return (
      c._events[y]
        ? c._events[y].fn
          ? (c._events[y] = [c._events[y], g])
          : c._events[y].push(g)
        : ((c._events[y] = g), c._eventsCount++),
      c
    );
  }
  function l(c, d) {
    --c._eventsCount == 0 ? (c._events = new r()) : delete c._events[d];
  }
  function u() {
    (this._events = new r()), (this._eventsCount = 0);
  }
  Object.create &&
    ((r.prototype = Object.create(null)), new r().__proto__ || (n = !1)),
    (u.prototype.eventNames = function () {
      var c,
        d,
        h = [];
      if (this._eventsCount === 0) return h;
      for (d in (c = this._events))
        e.call(c, d) && h.push(n ? jn(d).call(d, 1) : d);
      return Mc ? Ce(h).call(h, Mc(c)) : h;
    }),
    (u.prototype.listeners = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      if (!h) return [];
      if (h.fn) return [h.fn];
      for (var f = 0, p = h.length, g = new Array(p); f < p; f++)
        g[f] = h[f].fn;
      return g;
    }),
    (u.prototype.listenerCount = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      return h ? (h.fn ? 1 : h.length) : 0;
    }),
    (u.prototype.emit = function (c, d, h, f, p, g) {
      var y = n ? n + c : c;
      if (!this._events[y]) return !1;
      var v,
        b,
        w = this._events[y],
        k = arguments.length;
      if (w.fn) {
        switch ((w.once && this.removeListener(c, w.fn, void 0, !0), k)) {
          case 1:
            return w.fn.call(w.context), !0;
          case 2:
            return w.fn.call(w.context, d), !0;
          case 3:
            return w.fn.call(w.context, d, h), !0;
          case 4:
            return w.fn.call(w.context, d, h, f), !0;
          case 5:
            return w.fn.call(w.context, d, h, f, p), !0;
          case 6:
            return w.fn.call(w.context, d, h, f, p, g), !0;
        }
        for (b = 1, v = new Array(k - 1); b < k; b++) v[b - 1] = arguments[b];
        w.fn.apply(w.context, v);
      } else {
        var D,
          $ = w.length;
        for (b = 0; b < $; b++)
          switch (
            (w[b].once && this.removeListener(c, w[b].fn, void 0, !0), k)
          ) {
            case 1:
              w[b].fn.call(w[b].context);
              break;
            case 2:
              w[b].fn.call(w[b].context, d);
              break;
            case 3:
              w[b].fn.call(w[b].context, d, h);
              break;
            case 4:
              w[b].fn.call(w[b].context, d, h, f);
              break;
            default:
              if (!v)
                for (D = 1, v = new Array(k - 1); D < k; D++)
                  v[D - 1] = arguments[D];
              w[b].fn.apply(w[b].context, v);
          }
      }
      return !0;
    }),
    (u.prototype.on = function (c, d, h) {
      return o(this, c, d, h, !1);
    }),
    (u.prototype.once = function (c, d, h) {
      return o(this, c, d, h, !0);
    }),
    (u.prototype.removeListener = function (c, d, h, f) {
      var p = n ? n + c : c;
      if (!this._events[p]) return this;
      if (!d) return l(this, p), this;
      var g = this._events[p];
      if (g.fn)
        g.fn !== d || (f && !g.once) || (h && g.context !== h) || l(this, p);
      else {
        for (var y = 0, v = [], b = g.length; y < b; y++)
          (g[y].fn !== d || (f && !g[y].once) || (h && g[y].context !== h)) &&
            v.push(g[y]);
        v.length ? (this._events[p] = v.length === 1 ? v[0] : v) : l(this, p);
      }
      return this;
    }),
    (u.prototype.removeAllListeners = function (c) {
      var d;
      return (
        c
          ? ((d = n ? n + c : c), this._events[d] && l(this, d))
          : ((this._events = new r()), (this._eventsCount = 0)),
        this
      );
    }),
    (u.prototype.off = u.prototype.removeListener),
    (u.prototype.addListener = u.prototype.on),
    (u.prefixed = n),
    (u.EventEmitter = u),
    (t.exports = u);
})(p9e);
var dHt = p9e.exports,
  g9e = mBt(dHt),
  SU = "1.6.0-beta.2",
  UI = {};
function hHt() {
  return typeof __HLS_WORKER_BUNDLE__ == "function";
}
function fHt() {
  var t = UI[SU];
  if (t) return t.clientCount++, t;
  var e = new self.Blob(
      [
        "var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(".concat(
          __HLS_WORKER_BUNDLE__.toString(),
          ")(true);"
        ),
      ],
      { type: "text/javascript" }
    ),
    n = Bs.createObjectURL(e),
    r = { worker: new self.Worker(n), objectURL: n, clientCount: 1 };
  return (UI[SU] = r), r;
}
function pHt(t) {
  var e = UI[t];
  if (e) return e.clientCount++, e;
  var n = new Bs(t, self.location.href).href,
    r = { worker: new self.Worker(n), scriptURL: n, clientCount: 1 };
  return (UI[t] = r), r;
}
function gHt(t) {
  var e = UI[t || SU];
  if (e && e.clientCount-- === 1) {
    var n = e.worker,
      r = e.objectURL;
    delete UI[t || SU], r && Bs.revokeObjectURL(r), n.terminate();
  }
}
function m9e(t, e) {
  return (
    e + 10 <= t.length &&
    t[e] === 51 &&
    t[e + 1] === 68 &&
    t[e + 2] === 73 &&
    t[e + 3] < 255 &&
    t[e + 4] < 255 &&
    t[e + 6] < 128 &&
    t[e + 7] < 128 &&
    t[e + 8] < 128 &&
    t[e + 9] < 128
  );
}
function ile(t, e) {
  return (
    e + 10 <= t.length &&
    t[e] === 73 &&
    t[e + 1] === 68 &&
    t[e + 2] === 51 &&
    t[e + 3] < 255 &&
    t[e + 4] < 255 &&
    t[e + 6] < 128 &&
    t[e + 7] < 128 &&
    t[e + 8] < 128 &&
    t[e + 9] < 128
  );
}
function iB(t, e) {
  var n = 0;
  return (
    (n = (127 & t[e]) << 21),
    (n |= (127 & t[e + 1]) << 14),
    (n |= (127 & t[e + 2]) << 7),
    (n |= 127 & t[e + 3])
  );
}
function Ix(t, e) {
  for (var n = e, r = 0; ile(t, e); )
    (r += 10), (r += iB(t, e + 6)), m9e(t, e + 10) && (r += 10), (e += r);
  if (r > 0) return t.subarray(n, n + r);
}
function mHt(t, e, n, r) {
  var i,
    o,
    l,
    u,
    c,
    d = e[n + 2],
    h = (d >> 2) & 15;
  if (!(h > 12)) {
    var f = 1 + ((d >> 6) & 3),
      p = ((e[n + 3] >> 6) & 3) | ((1 & d) << 2),
      g = "mp4a.40." + f,
      y = [
        96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025,
        8e3, 7350,
      ][h],
      v = h;
    (f !== 5 && f !== 29) || (v -= 3);
    var b = [(f << 3) | ((14 & v) >> 1), ((1 & v) << 7) | (p << 3)];
    return (
      Is.log(
        Ce(
          (i = Ce(
            (o = Ce(
              (l = Ce(
                (u = Ce(
                  (c = "manifest codec:".concat(r, ", parsed codec:"))
                ).call(c, g, ", channels:"))
              ).call(u, p, ", rate:"))
            ).call(l, y, " (ADTS object type:"))
          ).call(o, f, " sampling index:"))
        ).call(i, h, ")")
      ),
      {
        config: b,
        samplerate: y,
        channelCount: p,
        codec: g,
        parsedCodec: g,
        manifestCodec: r,
      }
    );
  }
  var w = new Error("invalid ADTS sampling index:".concat(h));
  t.emit(_t.ERROR, _t.ERROR, {
    type: no.MEDIA_ERROR,
    details: kr.FRAG_PARSING_ERROR,
    fatal: !0,
    error: w,
    reason: w.message,
  });
}
function y9e(t, e) {
  return t[e] === 255 && (246 & t[e + 1]) == 240;
}
function v9e(t, e) {
  return 1 & t[e + 1] ? 7 : 9;
}
function ale(t, e) {
  return ((3 & t[e + 3]) << 11) | (t[e + 4] << 3) | ((224 & t[e + 5]) >>> 5);
}
function yHt(t, e) {
  return e + 5 < t.length;
}
function RU(t, e) {
  return e + 1 < t.length && y9e(t, e);
}
function vHt(t, e) {
  return yHt(t, e) && y9e(t, e) && ale(t, e) <= t.length - e;
}
function bHt(t, e) {
  if (RU(t, e)) {
    var n = v9e(t, e);
    if (e + n >= t.length) return !1;
    var r = ale(t, e);
    if (r <= n) return !1;
    var i = e + r;
    return i === t.length || RU(t, i);
  }
  return !1;
}
function b9e(t, e, n, r, i) {
  if (!t.samplerate) {
    var o = mHt(e, n, r, i);
    if (!o) return;
    cu(t, o);
  }
}
function _9e(t) {
  return 9216e4 / t;
}
function _Ht(t, e) {
  var n = v9e(t, e);
  if (e + n <= t.length) {
    var r = ale(t, e) - n;
    if (r > 0) return { headerLength: n, frameLength: r };
  }
}
function T9e(t, e, n, r, i) {
  var o,
    l = r + i * _9e(t.samplerate),
    u = _Ht(e, n);
  if (u) {
    var c = u.frameLength,
      d = u.headerLength,
      h = d + c,
      f = Math.max(0, n + h - e.length);
    f
      ? (o = new Uint8Array(h - d)).set(e.subarray(n + d, e.length), 0)
      : (o = e.subarray(n + d, n + h));
    var p = { unit: o, pts: l };
    return f || t.samples.push(p), { sample: p, length: h, missing: f };
  }
  var g = e.length - n;
  return (
    (o = new Uint8Array(g)).set(e.subarray(n, e.length), 0),
    { sample: { unit: o, pts: l }, length: g, missing: -1 }
  );
}
function THt(t, e) {
  return ile(t, e) && iB(t, e + 6) + 10 <= t.length - e;
}
function EHt(t) {
  if (!(t.size < 2)) {
    var e = zp(t.data, !0),
      n = new Uint8Array(t.data.subarray(e.length + 1));
    return { key: t.type, info: e, data: n.buffer };
  }
}
function SHt(t) {
  if (!(t.size < 2)) {
    if (t.type === "TXXX") {
      var e = 1,
        n = zp(t.data.subarray(e), !0);
      e += n.length + 1;
      var r = zp(t.data.subarray(e));
      return { key: t.type, info: n, data: r };
    }
    var i = zp(t.data.subarray(1));
    return { key: t.type, info: "", data: i };
  }
}
function RHt(t) {
  if (t.type === "WXXX") {
    if (t.size < 2) return;
    var e = 1,
      n = zp(t.data.subarray(e), !0);
    e += n.length + 1;
    var r = zp(t.data.subarray(e));
    return { key: t.type, info: n, data: r };
  }
  var i = zp(t.data);
  return { key: t.type, info: "", data: i };
}
function HV(t) {
  return AHt(
    t,
    arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
    arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1 / 0,
    Uint8Array
  );
}
function AHt(t, e, n, r) {
  var i = wHt(t),
    o = 1;
  "BYTES_PER_ELEMENT" in r && (o = r.BYTES_PER_ELEMENT);
  var l = kHt(t) ? t.byteOffset : 0,
    u = (l + t.byteLength) / o,
    c = (l + e) / o,
    d = Math.floor(Math.max(0, Math.min(c, u)));
  return new r(i, d, Math.floor(Math.min(d + Math.max(n, 0), u)) - d);
}
function wHt(t) {
  return t instanceof ArrayBuffer ? t : t.buffer;
}
function kHt(t) {
  return (
    t &&
    t.buffer instanceof ArrayBuffer &&
    t.byteLength !== void 0 &&
    t.byteOffset !== void 0
  );
}
function IHt(t) {
  return t instanceof ArrayBuffer
    ? t
    : t.byteOffset == 0 && t.byteLength == t.buffer.byteLength
    ? t.buffer
    : new Uint8Array(t).buffer;
}
function DHt(t) {
  return btoa(String.fromCharCode.apply(String, Cf(t)));
}
function E9e(t, e) {
  if (t < 0) return -E9e(-t, e);
  var n = Math.pow(10, e);
  if (Math.abs(((t * n) % 1) - 0.5) < i6t) {
    var r = Math.floor(t * n);
    return (r % 2 == 0 ? r : r + 1) / n;
  }
  return Math.round(t * n) / n;
}
function PHt(t, e) {
  var n,
    r,
    i = new Bs(t),
    o = new Bs(e);
  if (i.origin !== o.origin) return t;
  for (
    var l = jn((n = i.pathname.split("/"))).call(n, 1),
      u = jn((r = o.pathname.split("/"))).call(r, 1, -1);
    l[0] === u[0];

  )
    l.shift(), u.shift();
  for (; u.length; ) u.shift(), l.unshift("..");
  return l.join("/");
}
function MHt(t) {
  var e,
    n,
    r = {
      key: t.type,
      description: "",
      data: "",
      mimeType: null,
      pictureType: null,
    };
  if (!(t.size < 2))
    if (t.data[0] === 3) {
      var i = qt((e = t.data.subarray(1))).call(e, 0);
      if (i !== -1) {
        var o = zp(HV(t.data, 1, i)),
          l = t.data[2 + i],
          u = qt((n = t.data.subarray(3 + i))).call(n, 0);
        if (u !== -1) {
          var c,
            d = zp(HV(t.data, 3 + i, u));
          return (
            (c =
              o === "-->"
                ? zp(HV(t.data, 4 + i + u))
                : IHt(t.data.subarray(4 + i + u))),
            (r.mimeType = o),
            (r.pictureType = l),
            (r.description = d),
            (r.data = c),
            r
          );
        }
      }
    } else console.log("Ignore frame with unrecognized character encoding");
}
function CHt(t) {
  return t.type === "PRIV"
    ? EHt(t)
    : t.type[0] === "W"
    ? RHt(t)
    : t.type === "APIC"
    ? MHt(t)
    : SHt(t);
}
function $Ht(t) {
  var e = String.fromCharCode(t[0], t[1], t[2], t[3]),
    n = iB(t, 4);
  return { type: e, size: n, data: t.subarray(10, 10 + n) };
}
var u3 = 10,
  xHt = 10;
function LHt(t) {
  for (var e = 0, n = []; ile(t, e); ) {
    var r = iB(t, e + 6);
    (t[e + 5] >> 6) & 1 && (e += u3);
    for (var i = (e += u3) + r; e + xHt < i; ) {
      var o = $Ht(t.subarray(e)),
        l = CHt(o);
      l && n.push(l), (e += o.size + u3);
    }
    m9e(t, e) && (e += u3);
  }
  return n;
}
function OHt(t) {
  return (
    t &&
    t.key === "PRIV" &&
    t.info === "com.apple.streaming.transportStreamTimestamp"
  );
}
function GHt(t) {
  if (t.data.byteLength === 8) {
    var e = new Uint8Array(t.data),
      n = 1 & e[3],
      r = (e[4] << 23) + (e[5] << 15) + (e[6] << 7) + e[7];
    return (r /= 45), n && (r += 4772185884e-2), Math.round(r);
  }
}
function ole(t) {
  for (var e = LHt(t), n = 0; n < e.length; n++) {
    var r = e[n];
    if (OHt(r)) return GHt(r);
  }
}
var BI = (function (t) {
  return (
    (t.audioId3 = "org.id3"),
    (t.dateRange = "com.apple.quicktime.HLS"),
    (t.emsg = "https://aomedia.org/emsg/ID3"),
    (t.misbklv = "urn:misb:KLV:bin:1910.1"),
    t
  );
})({});
function Wy() {
  return {
    type: arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "",
    id: -1,
    pid: -1,
    inputTimeScale:
      arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 9e4,
    sequenceNumber: -1,
    samples: [],
    dropped: 0,
  };
}
var sle = (function () {
    function t() {
      Wn(this, t),
        (this._audioTrack = void 0),
        (this._id3Track = void 0),
        (this.frameIndex = 0),
        (this.cachedData = null),
        (this.basePTS = null),
        (this.initPTS = null),
        (this.lastPTS = null);
    }
    return (
      Kn(t, [
        {
          key: "resetInitSegment",
          value: function (e, n, r, i) {
            this._id3Track = {
              type: "id3",
              id: 3,
              pid: -1,
              inputTimeScale: 9e4,
              sequenceNumber: 0,
              samples: [],
              dropped: 0,
            };
          },
        },
        {
          key: "resetTimeStamp",
          value: function (e) {
            (this.initPTS = e), this.resetContiguity();
          },
        },
        {
          key: "resetContiguity",
          value: function () {
            (this.basePTS = null), (this.lastPTS = null), (this.frameIndex = 0);
          },
        },
        {
          key: "canParse",
          value: function (e, n) {
            return !1;
          },
        },
        { key: "appendFrame", value: function (e, n, r) {} },
        {
          key: "demux",
          value: function (e, n) {
            this.cachedData &&
              ((e = dm(this.cachedData, e)), (this.cachedData = null));
            var r,
              i = Ix(e, 0),
              o = i ? i.length : 0,
              l = this._audioTrack,
              u = this._id3Track,
              c = i ? ole(i) : void 0,
              d = e.length;
            for (
              (this.basePTS === null || (this.frameIndex === 0 && _a(c))) &&
                ((this.basePTS = NHt(c, n, this.initPTS)),
                (this.lastPTS = this.basePTS)),
                this.lastPTS === null && (this.lastPTS = this.basePTS),
                i &&
                  i.length > 0 &&
                  u.samples.push({
                    pts: this.lastPTS,
                    dts: this.lastPTS,
                    data: i,
                    type: BI.audioId3,
                    duration: Number.POSITIVE_INFINITY,
                  });
              o < d;

            ) {
              if (this.canParse(e, o)) {
                var h = this.appendFrame(l, e, o);
                h
                  ? (this.frameIndex++,
                    (this.lastPTS = h.sample.pts),
                    (r = o += h.length))
                  : (o = d);
              } else
                THt(e, o)
                  ? ((i = Ix(e, o)),
                    u.samples.push({
                      pts: this.lastPTS,
                      dts: this.lastPTS,
                      data: i,
                      type: BI.audioId3,
                      duration: Number.POSITIVE_INFINITY,
                    }),
                    (r = o += i.length))
                  : o++;
              if (o === d && r !== d) {
                var f = IS(e, r);
                this.cachedData
                  ? (this.cachedData = dm(this.cachedData, f))
                  : (this.cachedData = f);
              }
            }
            return {
              audioTrack: l,
              videoTrack: Wy(),
              id3Track: u,
              textTrack: Wy(),
            };
          },
        },
        {
          key: "demuxSampleAes",
          value: function (e, n, r) {
            return Ar.reject(
              new Error(
                "[".concat(
                  this,
                  "] This demuxer does not support Sample-AES decryption"
                )
              )
            );
          },
        },
        {
          key: "flush",
          value: function (e) {
            var n = this.cachedData;
            return (
              n && ((this.cachedData = null), this.demux(n, 0)),
              {
                audioTrack: this._audioTrack,
                videoTrack: Wy(),
                id3Track: this._id3Track,
                textTrack: Wy(),
              }
            );
          },
        },
        {
          key: "destroy",
          value: function () {
            (this.cachedData = null),
              (this._audioTrack = this._id3Track = void 0);
          },
        },
      ]),
      t
    );
  })(),
  NHt = function (t, e, n) {
    return _a(t)
      ? 90 * t
      : 9e4 * e + (n ? (9e4 * n.baseTime) / n.timescale : 0);
  },
  c3 = null,
  FHt = [
    32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48,
    56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64,
    80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 128,
    144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112,
    128, 144, 160,
  ],
  UHt = [44100, 48e3, 32e3, 22050, 24e3, 16e3, 11025, 12e3, 8e3],
  BHt = [
    [0, 72, 144, 12],
    [0, 0, 0, 0],
    [0, 72, 144, 12],
    [0, 144, 144, 12],
  ],
  HHt = [0, 1, 1, 4];
function S9e(t, e, n, r, i) {
  if (!(n + 24 > e.length)) {
    var o = R9e(e, n);
    if (o && n + o.frameLength <= e.length) {
      var l = r + i * ((9e4 * o.samplesPerFrame) / o.sampleRate),
        u = { unit: e.subarray(n, n + o.frameLength), pts: l, dts: l };
      return (
        (t.config = []),
        (t.channelCount = o.channelCount),
        (t.samplerate = o.sampleRate),
        t.samples.push(u),
        { sample: u, length: o.frameLength, missing: 0 }
      );
    }
  }
}
function R9e(t, e) {
  var n = (t[e + 1] >> 3) & 3,
    r = (t[e + 1] >> 1) & 3,
    i = (t[e + 2] >> 4) & 15,
    o = (t[e + 2] >> 2) & 3;
  if (n !== 1 && i !== 0 && i !== 15 && o !== 3) {
    var l = (t[e + 2] >> 1) & 1,
      u = t[e + 3] >> 6,
      c = 1e3 * FHt[14 * (n === 3 ? 3 - r : r === 3 ? 3 : 4) + i - 1],
      d = UHt[3 * (n === 3 ? 0 : n === 2 ? 1 : 2) + o],
      h = u === 3 ? 1 : 2,
      f = BHt[n][r],
      p = HHt[r],
      g = 8 * f * p,
      y = Math.floor((f * c) / d + l) * p;
    if (c3 === null) {
      var v = (navigator.userAgent || "").match(/Chrome\/(\d+)/i);
      c3 = v ? _i(v[1]) : 0;
    }
    return (
      c3 &&
        c3 <= 87 &&
        r === 2 &&
        c >= 224e3 &&
        u === 0 &&
        (t[e + 3] = 128 | t[e + 3]),
      { sampleRate: d, channelCount: h, frameLength: y, samplesPerFrame: g }
    );
  }
}
function lle(t, e) {
  return t[e] === 255 && (224 & t[e + 1]) == 224 && (6 & t[e + 1]) != 0;
}
function A9e(t, e) {
  return e + 1 < t.length && lle(t, e);
}
function XHt(t, e) {
  return lle(t, e) && 4 <= t.length - e;
}
function w9e(t, e) {
  if (e + 1 < t.length && lle(t, e)) {
    var n = R9e(t, e),
      r = 4;
    n != null && n.frameLength && (r = n.frameLength);
    var i = e + r;
    return i === t.length || A9e(t, i);
  }
  return !1;
}
var VHt = (function (t) {
    so(n, sle);
    var e = lo(n);
    function n(r, i) {
      var o;
      return (
        Wn(this, n),
        ((o = e.call(this)).observer = void 0),
        (o.config = void 0),
        (o.observer = r),
        (o.config = i),
        o
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "resetInitSegment",
            value: function (r, i, o, l) {
              Eo(po(n.prototype), "resetInitSegment", this).call(
                this,
                r,
                i,
                o,
                l
              ),
                (this._audioTrack = {
                  container: "audio/adts",
                  type: "audio",
                  id: 2,
                  pid: -1,
                  sequenceNumber: 0,
                  segmentCodec: "aac",
                  samples: [],
                  manifestCodec: i,
                  duration: l,
                  inputTimeScale: 9e4,
                  dropped: 0,
                });
            },
          },
          {
            key: "canParse",
            value: function (r, i) {
              return vHt(r, i);
            },
          },
          {
            key: "appendFrame",
            value: function (r, i, o) {
              b9e(r, this.observer, i, o, r.manifestCodec);
              var l = T9e(r, i, o, this.basePTS, this.frameIndex);
              if (l && l.missing === 0) return l;
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (r, i) {
              if (!r) return !1;
              var o = Ix(r, 0),
                l = (o == null ? void 0 : o.length) || 0;
              if (w9e(r, l)) return !1;
              for (var u = r.length; l < u; l++)
                if (bHt(r, l)) return i.log("ADTS sync word found !"), !0;
              return !1;
            },
          },
        ]
      ),
      n
    );
  })(),
  k9e = function (t, e) {
    var n = 0,
      r = 5;
    e += r;
    for (
      var i = new Uint32Array(1), o = new Uint32Array(1), l = new Uint8Array(1);
      r > 0;

    ) {
      l[0] = t[e];
      var u = Math.min(r, 8),
        c = 8 - u;
      (o[0] = (4278190080 >>> (24 + c)) << c),
        (i[0] = (l[0] & o[0]) >> c),
        (n = n ? (n << u) | i[0] : i[0]),
        (e += 1),
        (r -= u);
    }
    return n;
  },
  zHt = (function (t) {
    so(n, sle);
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n), ((i = e.call(this)).observer = void 0), (i.observer = r), i
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "resetInitSegment",
            value: function (r, i, o, l) {
              Eo(po(n.prototype), "resetInitSegment", this).call(
                this,
                r,
                i,
                o,
                l
              ),
                (this._audioTrack = {
                  container: "audio/ac-3",
                  type: "audio",
                  id: 2,
                  pid: -1,
                  sequenceNumber: 0,
                  segmentCodec: "ac3",
                  samples: [],
                  manifestCodec: i,
                  duration: l,
                  inputTimeScale: 9e4,
                  dropped: 0,
                });
            },
          },
          {
            key: "canParse",
            value: function (r, i) {
              return i + 64 < r.length;
            },
          },
          {
            key: "appendFrame",
            value: function (r, i, o) {
              var l = I9e(r, i, o, this.basePTS, this.frameIndex);
              if (l !== -1)
                return {
                  sample: r.samples[r.samples.length - 1],
                  length: l,
                  missing: 0,
                };
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (r) {
              if (!r) return !1;
              var i = Ix(r, 0);
              if (!i) return !1;
              var o = i.length;
              return (
                r[o] === 11 &&
                r[o + 1] === 119 &&
                ole(i) !== void 0 &&
                k9e(r, o) < 16
              );
            },
          },
        ]
      ),
      n
    );
  })();
function I9e(t, e, n, r, i) {
  if (n + 8 > e.length || e[n] !== 11 || e[n + 1] !== 119) return -1;
  var o = e[n + 4] >> 6;
  if (o >= 3) return -1;
  var l = [48e3, 44100, 32e3][o],
    u = 63 & e[n + 4],
    c =
      2 *
      [
        64, 69, 96, 64, 70, 96, 80, 87, 120, 80, 88, 120, 96, 104, 144, 96, 105,
        144, 112, 121, 168, 112, 122, 168, 128, 139, 192, 128, 140, 192, 160,
        174, 240, 160, 175, 240, 192, 208, 288, 192, 209, 288, 224, 243, 336,
        224, 244, 336, 256, 278, 384, 256, 279, 384, 320, 348, 480, 320, 349,
        480, 384, 417, 576, 384, 418, 576, 448, 487, 672, 448, 488, 672, 512,
        557, 768, 512, 558, 768, 640, 696, 960, 640, 697, 960, 768, 835, 1152,
        768, 836, 1152, 896, 975, 1344, 896, 976, 1344, 1024, 1114, 1536, 1024,
        1115, 1536, 1152, 1253, 1728, 1152, 1254, 1728, 1280, 1393, 1920, 1280,
        1394, 1920,
      ][3 * u + o];
  if (n + c > e.length) return -1;
  var d = e[n + 6] >> 5,
    h = 0;
  d === 2 ? (h += 2) : (1 & d && d !== 1 && (h += 2), 4 & d && (h += 2));
  var f = (((e[n + 6] << 8) | e[n + 7]) >> (12 - h)) & 1,
    p = [2, 1, 2, 3, 3, 4, 4, 5][d] + f,
    g = e[n + 5] >> 3,
    y = 7 & e[n + 5],
    v = new Uint8Array([
      (o << 6) | (g << 1) | (y >> 2),
      ((3 & y) << 6) | (d << 3) | (f << 2) | (u >> 4),
      (u << 4) & 224,
    ]),
    b = r + i * ((1536 / l) * 9e4),
    w = e.subarray(n, n + c);
  return (
    (t.config = v),
    (t.channelCount = p),
    (t.samplerate = l),
    t.samples.push({ unit: w, pts: b }),
    c
  );
}
var jHt = (function (t) {
    so(n, sle);
    var e = lo(n);
    function n() {
      return Wn(this, n), e.apply(this, arguments);
    }
    return (
      Kn(
        n,
        [
          {
            key: "resetInitSegment",
            value: function (r, i, o, l) {
              Eo(po(n.prototype), "resetInitSegment", this).call(
                this,
                r,
                i,
                o,
                l
              ),
                (this._audioTrack = {
                  container: "audio/mpeg",
                  type: "audio",
                  id: 2,
                  pid: -1,
                  sequenceNumber: 0,
                  segmentCodec: "mp3",
                  samples: [],
                  manifestCodec: i,
                  duration: l,
                  inputTimeScale: 9e4,
                  dropped: 0,
                });
            },
          },
          {
            key: "canParse",
            value: function (r, i) {
              return XHt(r, i);
            },
          },
          {
            key: "appendFrame",
            value: function (r, i, o) {
              if (this.basePTS !== null)
                return S9e(r, i, o, this.basePTS, this.frameIndex);
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (r) {
              if (!r) return !1;
              var i = Ix(r, 0),
                o = (i == null ? void 0 : i.length) || 0;
              if (
                i &&
                r[o] === 11 &&
                r[o + 1] === 119 &&
                ole(i) !== void 0 &&
                k9e(r, o) <= 16
              )
                return !1;
              for (var l = r.length; o < l; o++)
                if (w9e(r, o))
                  return Is.log("MPEG Audio sync word found !"), !0;
              return !1;
            },
          },
        ]
      ),
      n
    );
  })(),
  WHt = /\/emsg[-/]ID3/i,
  KHt = (function () {
    function t(e, n) {
      Wn(this, t),
        (this.remainderData = null),
        (this.timeOffset = 0),
        (this.config = void 0),
        (this.videoTrack = void 0),
        (this.audioTrack = void 0),
        (this.id3Track = void 0),
        (this.txtTrack = void 0),
        (this.config = n);
    }
    return (
      Kn(
        t,
        [
          { key: "resetTimeStamp", value: function () {} },
          {
            key: "resetInitSegment",
            value: function (e, n, r, i) {
              var o = (this.videoTrack = Wy("video", 1)),
                l = (this.audioTrack = Wy("audio", 1)),
                u = (this.txtTrack = Wy("text", 1));
              if (
                ((this.id3Track = Wy("id3", 1)),
                (this.timeOffset = 0),
                e != null && e.byteLength)
              ) {
                var c = n9e(e);
                if (c.video) {
                  var d = c.video,
                    h = d.id,
                    f = d.timescale,
                    p = d.codec;
                  (o.id = h), (o.timescale = u.timescale = f), (o.codec = p);
                }
                if (c.audio) {
                  var g = c.audio,
                    y = g.id,
                    v = g.timescale,
                    b = g.codec;
                  (l.id = y), (l.timescale = v), (l.codec = b);
                }
                (u.id = q8e.text),
                  (o.sampleDuration = 0),
                  (o.duration = l.duration = i);
              }
            },
          },
          {
            key: "resetContiguity",
            value: function () {
              this.remainderData = null;
            },
          },
          {
            key: "demux",
            value: function (e, n) {
              this.timeOffset = n;
              var r = e,
                i = this.videoTrack,
                o = this.txtTrack;
              if (this.config.progressive) {
                this.remainderData && (r = dm(this.remainderData, e));
                var l = kBt(r);
                (this.remainderData = l.remainder),
                  (i.samples = l.valid || new Uint8Array());
              } else i.samples = r;
              var u = this.extractID3Track(i, n);
              return (
                (o.samples = zve(n, i)),
                {
                  videoTrack: i,
                  audioTrack: this.audioTrack,
                  id3Track: u,
                  textTrack: this.txtTrack,
                }
              );
            },
          },
          {
            key: "flush",
            value: function () {
              var e = this.timeOffset,
                n = this.videoTrack,
                r = this.txtTrack;
              (n.samples = this.remainderData || new Uint8Array()),
                (this.remainderData = null);
              var i = this.extractID3Track(n, this.timeOffset);
              return (
                (r.samples = zve(e, n)),
                {
                  videoTrack: n,
                  audioTrack: Wy(),
                  id3Track: i,
                  textTrack: Wy(),
                }
              );
            },
          },
          {
            key: "extractID3Track",
            value: function (e, n) {
              var r = this,
                i = this.id3Track;
              if (e.samples.length) {
                var o = ao(e.samples, ["emsg"]);
                o &&
                  o.forEach(function (l) {
                    var u,
                      c = PBt(l);
                    if (WHt.test(c.schemeIdUri)) {
                      var d = n1e(c, n),
                        h =
                          c.eventDuration === 4294967295
                            ? Number.POSITIVE_INFINITY
                            : c.eventDuration / c.timeScale;
                      h <= 0.001 && (h = Number.POSITIVE_INFINITY);
                      var f = c.payload;
                      i.samples.push({
                        data: f,
                        len: f.byteLength,
                        dts: d,
                        pts: d,
                        type: BI.emsg,
                        duration: h,
                      });
                    } else if (
                      r.config.enableEmsgKLVMetadata &&
                      pv((u = c.schemeIdUri)).call(u, "urn:misb:KLV:bin:1910.1")
                    ) {
                      var p = n1e(c, n);
                      i.samples.push({
                        data: c.payload,
                        len: c.payload.byteLength,
                        dts: p,
                        pts: p,
                        type: BI.misbklv,
                        duration: Number.POSITIVE_INFINITY,
                      });
                    }
                  });
              }
              return i;
            },
          },
          {
            key: "demuxSampleAes",
            value: function (e, n, r) {
              return Ar.reject(
                new Error(
                  "The MP4 demuxer does not support SAMPLE-AES decryption"
                )
              );
            },
          },
          {
            key: "destroy",
            value: function () {
              (this.config = null),
                (this.remainderData = null),
                (this.videoTrack =
                  this.audioTrack =
                  this.id3Track =
                  this.txtTrack =
                    void 0);
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (e) {
              return bBt(e);
            },
          },
        ]
      ),
      t
    );
  })();
function n1e(t, e) {
  return _a(t.presentationTime)
    ? t.presentationTime / t.timeScale
    : e + t.presentationTimeDelta / t.timeScale;
}
var ZHt = (function () {
    function t(e, n, r) {
      Wn(this, t),
        (this.keyData = void 0),
        (this.decrypter = void 0),
        (this.keyData = r),
        (this.decrypter = new ele(n, { removePKCS7Padding: !1 }));
    }
    return (
      Kn(t, [
        {
          key: "decryptBuffer",
          value: function (e) {
            return this.decrypter.decrypt(
              e,
              this.keyData.key.buffer,
              this.keyData.iv.buffer,
              rE.cbc
            );
          },
        },
        {
          key: "decryptAacSample",
          value: function (e, n, r) {
            var i,
              o = this,
              l = e[n].unit;
            if (!(l.length <= 16)) {
              var u = l.subarray(16, l.length - (l.length % 16)),
                c = jn((i = u.buffer)).call(
                  i,
                  u.byteOffset,
                  u.byteOffset + u.length
                );
              this.decryptBuffer(c).then(function (d) {
                var h = new Uint8Array(d);
                l.set(h, 16),
                  o.decrypter.isSync() || o.decryptAacSamples(e, n + 1, r);
              });
            }
          },
        },
        {
          key: "decryptAacSamples",
          value: function (e, n, r) {
            for (; ; n++) {
              if (n >= e.length) return void r();
              if (
                !(e[n].unit.length < 32) &&
                (this.decryptAacSample(e, n, r), !this.decrypter.isSync())
              )
                return;
            }
          },
        },
        {
          key: "getAvcEncryptedData",
          value: function (e) {
            for (
              var n = 16 * Math.floor((e.length - 48) / 160) + 16,
                r = new Int8Array(n),
                i = 0,
                o = 32;
              o < e.length - 16;
              o += 160, i += 16
            )
              r.set(e.subarray(o, o + 16), i);
            return r;
          },
        },
        {
          key: "getAvcDecryptedUnit",
          value: function (e, n) {
            for (
              var r = new Uint8Array(n), i = 0, o = 32;
              o < e.length - 16;
              o += 160, i += 16
            )
              e.set(r.subarray(i, i + 16), o);
            return e;
          },
        },
        {
          key: "decryptAvcSample",
          value: function (e, n, r, i, o) {
            var l = this,
              u = i9e(o.data),
              c = this.getAvcEncryptedData(u);
            this.decryptBuffer(c.buffer).then(function (d) {
              (o.data = l.getAvcDecryptedUnit(u, d)),
                l.decrypter.isSync() || l.decryptAvcSamples(e, n, r + 1, i);
            });
          },
        },
        {
          key: "decryptAvcSamples",
          value: function (e, n, r, i) {
            if (e instanceof Uint8Array)
              throw new Error("Cannot decrypt samples of type Uint8Array");
            for (; ; n++, r = 0) {
              if (n >= e.length) return void i();
              for (var o = e[n].units; !(r >= o.length); r++) {
                var l = o[r];
                if (
                  !(
                    l.data.length <= 48 ||
                    (l.type !== 1 && l.type !== 5) ||
                    (this.decryptAvcSample(e, n, r, i, l),
                    this.decrypter.isSync())
                  )
                )
                  return;
              }
            }
          },
        },
      ]),
      t
    );
  })(),
  D9e = (function () {
    function t() {
      Wn(this, t), (this.VideoSample = null);
    }
    return (
      Kn(t, [
        {
          key: "createVideoSample",
          value: function (e, n, r) {
            return { key: e, frame: !1, pts: n, dts: r, units: [], length: 0 };
          },
        },
        {
          key: "getLastNalUnit",
          value: function (e) {
            var n,
              r,
              i = this.VideoSample;
            if (
              ((i && i.units.length !== 0) || (i = e[e.length - 1]),
              (n = i) != null && n.units)
            ) {
              var o = i.units;
              r = o[o.length - 1];
            }
            return r;
          },
        },
        {
          key: "pushAccessUnit",
          value: function (e, n) {
            if (e.units.length && e.frame) {
              if (e.pts === void 0) {
                var r = n.samples,
                  i = r.length;
                if (!i) return void n.dropped++;
                var o = r[i - 1];
                (e.pts = o.pts), (e.dts = o.dts);
              }
              n.samples.push(e);
            }
          },
        },
        {
          key: "parseNALu",
          value: function (e, n, r) {
            var i,
              o,
              l = n.byteLength,
              u = e.naluState || 0,
              c = u,
              d = [],
              h = 0,
              f = -1,
              p = 0;
            for (
              u === -1 &&
              ((f = 0), (p = this.getNALuType(n, 0)), (u = 0), (h = 1));
              h < l;

            )
              if (((i = n[h++]), u))
                if (u !== 1)
                  if (i)
                    if (i === 1) {
                      if (((o = h - u - 1), f >= 0)) {
                        var g = { data: n.subarray(f, o), type: p };
                        d.push(g);
                      } else {
                        var y = this.getLastNalUnit(e.samples);
                        y &&
                          (c &&
                            h <= 4 - c &&
                            y.state &&
                            (y.data = y.data.subarray(
                              0,
                              y.data.byteLength - c
                            )),
                          o > 0 &&
                            ((y.data = dm(y.data, n.subarray(0, o))),
                            (y.state = 0)));
                      }
                      h < l
                        ? ((f = h), (p = this.getNALuType(n, h)), (u = 0))
                        : (u = -1);
                    } else u = 0;
                  else u = 3;
                else u = i ? 0 : 2;
              else u = i ? 0 : 1;
            if (f >= 0 && u >= 0) {
              var v = { data: n.subarray(f, l), type: p, state: u };
              d.push(v);
            }
            if (d.length === 0) {
              var b = this.getLastNalUnit(e.samples);
              b && (b.data = dm(b.data, n));
            }
            return (e.naluState = u), d;
          },
        },
      ]),
      t
    );
  })(),
  YC = (function () {
    function t(e) {
      Wn(this, t),
        (this.data = void 0),
        (this.bytesAvailable = void 0),
        (this.word = void 0),
        (this.bitsAvailable = void 0),
        (this.data = e),
        (this.bytesAvailable = e.byteLength),
        (this.word = 0),
        (this.bitsAvailable = 0);
    }
    return (
      Kn(t, [
        {
          key: "loadWord",
          value: function () {
            var e = this.data,
              n = this.bytesAvailable,
              r = e.byteLength - n,
              i = new Uint8Array(4),
              o = Math.min(4, n);
            if (o === 0) throw new Error("no bytes available");
            i.set(e.subarray(r, r + o)),
              (this.word = new DataView(i.buffer).getUint32(0)),
              (this.bitsAvailable = 8 * o),
              (this.bytesAvailable -= o);
          },
        },
        {
          key: "skipBits",
          value: function (e) {
            var n;
            (e = Math.min(e, 8 * this.bytesAvailable + this.bitsAvailable)),
              this.bitsAvailable > e
                ? ((this.word <<= e), (this.bitsAvailable -= e))
                : ((e -= this.bitsAvailable),
                  (e -= (n = e >> 3) << 3),
                  (this.bytesAvailable -= n),
                  this.loadWord(),
                  (this.word <<= e),
                  (this.bitsAvailable -= e));
          },
        },
        {
          key: "readBits",
          value: function (e) {
            var n = Math.min(this.bitsAvailable, e),
              r = this.word >>> (32 - n);
            if (
              (e > 32 && Is.error("Cannot read more than 32 bits at a time"),
              (this.bitsAvailable -= n),
              this.bitsAvailable > 0)
            )
              this.word <<= n;
            else {
              if (!(this.bytesAvailable > 0))
                throw new Error("no bits available");
              this.loadWord();
            }
            return (n = e - n) > 0 && this.bitsAvailable
              ? (r << n) | this.readBits(n)
              : r;
          },
        },
        {
          key: "skipLZ",
          value: function () {
            var e;
            for (e = 0; e < this.bitsAvailable; ++e)
              if (this.word & (2147483648 >>> e))
                return (this.word <<= e), (this.bitsAvailable -= e), e;
            return this.loadWord(), e + this.skipLZ();
          },
        },
        {
          key: "skipUEG",
          value: function () {
            this.skipBits(1 + this.skipLZ());
          },
        },
        {
          key: "skipEG",
          value: function () {
            this.skipBits(1 + this.skipLZ());
          },
        },
        {
          key: "readUEG",
          value: function () {
            var e = this.skipLZ();
            return this.readBits(e + 1) - 1;
          },
        },
        {
          key: "readEG",
          value: function () {
            var e = this.readUEG();
            return 1 & e ? (1 + e) >>> 1 : -1 * (e >>> 1);
          },
        },
        {
          key: "readBoolean",
          value: function () {
            return this.readBits(1) === 1;
          },
        },
        {
          key: "readUByte",
          value: function () {
            return this.readBits(8);
          },
        },
        {
          key: "readUShort",
          value: function () {
            return this.readBits(16);
          },
        },
        {
          key: "readUInt",
          value: function () {
            return this.readBits(32);
          },
        },
      ]),
      t
    );
  })(),
  r1e = (function (t) {
    so(n, D9e);
    var e = lo(n);
    function n() {
      return Wn(this, n), e.apply(this, arguments);
    }
    return (
      Kn(n, [
        {
          key: "parsePES",
          value: function (r, i, o, l) {
            var u,
              c = this,
              d = this.parseNALu(r, o.data, l),
              h = this.VideoSample,
              f = !1;
            (o.data = null),
              h &&
                d.length &&
                !r.audFound &&
                (this.pushAccessUnit(h, r),
                (h = this.VideoSample =
                  this.createVideoSample(!1, o.pts, o.dts))),
              d.forEach(function (p) {
                var g, y;
                switch (p.type) {
                  case 1:
                    var v = !1;
                    u = !0;
                    var b,
                      w = p.data;
                    if (f && w.length > 4) {
                      var k = c.readSliceType(w);
                      (k !== 2 && k !== 4 && k !== 7 && k !== 9) || (v = !0);
                    }
                    v &&
                      (b = h) != null &&
                      b.frame &&
                      !h.key &&
                      (c.pushAccessUnit(h, r), (h = c.VideoSample = null)),
                      h ||
                        (h = c.VideoSample =
                          c.createVideoSample(!0, o.pts, o.dts)),
                      (h.frame = !0),
                      (h.key = v);
                    break;
                  case 5:
                    (u = !0),
                      (g = h) != null &&
                        g.frame &&
                        !h.key &&
                        (c.pushAccessUnit(h, r), (h = c.VideoSample = null)),
                      h ||
                        (h = c.VideoSample =
                          c.createVideoSample(!0, o.pts, o.dts)),
                      (h.key = !0),
                      (h.frame = !0);
                    break;
                  case 6:
                    (u = !0), qse(p.data, 1, o.pts, i.samples);
                    break;
                  case 7:
                    var D, $;
                    (u = !0), (f = !0);
                    var N = p.data,
                      P = c.readSPS(N);
                    if (
                      !r.sps ||
                      r.width !== P.width ||
                      r.height !== P.height ||
                      ((D = r.pixelRatio) == null ? void 0 : D[0]) !==
                        P.pixelRatio[0] ||
                      (($ = r.pixelRatio) == null ? void 0 : $[1]) !==
                        P.pixelRatio[1]
                    ) {
                      (r.width = P.width),
                        (r.height = P.height),
                        (r.pixelRatio = P.pixelRatio),
                        (r.sps = [N]);
                      for (
                        var I = N.subarray(1, 4), O = "avc1.", X = 0;
                        X < 3;
                        X++
                      ) {
                        var G = I[X].toString(16);
                        G.length < 2 && (G = "0" + G), (O += G);
                      }
                      r.codec = O;
                    }
                    break;
                  case 8:
                    (u = !0), (r.pps = [p.data]);
                    break;
                  case 9:
                    (u = !0),
                      (r.audFound = !0),
                      (y = h) != null &&
                        y.frame &&
                        (c.pushAccessUnit(h, r), (h = null)),
                      h ||
                        (h = c.VideoSample =
                          c.createVideoSample(!1, o.pts, o.dts));
                    break;
                  case 12:
                    u = !0;
                    break;
                  default:
                    u = !1;
                }
                h && u && h.units.push(p);
              }),
              l && h && (this.pushAccessUnit(h, r), (this.VideoSample = null));
          },
        },
        {
          key: "getNALuType",
          value: function (r, i) {
            return 31 & r[i];
          },
        },
        {
          key: "readSliceType",
          value: function (r) {
            var i = new YC(r);
            return i.readUByte(), i.readUEG(), i.readUEG();
          },
        },
        {
          key: "skipScalingList",
          value: function (r, i) {
            for (var o = 8, l = 8, u = 0; u < r; u++)
              l !== 0 && (l = (o + i.readEG() + 256) % 256),
                (o = l === 0 ? o : l);
          },
        },
        {
          key: "readSPS",
          value: function (r) {
            var i,
              o,
              l,
              u = new YC(r),
              c = 0,
              d = 0,
              h = 0,
              f = 0,
              p = u.readUByte.bind(u),
              g = u.readBits.bind(u),
              y = u.readUEG.bind(u),
              v = u.readBoolean.bind(u),
              b = u.skipBits.bind(u),
              w = u.skipEG.bind(u),
              k = u.skipUEG.bind(u),
              D = this.skipScalingList.bind(this);
            p();
            var $ = p();
            if (
              (g(5),
              b(3),
              p(),
              k(),
              $ === 100 ||
                $ === 110 ||
                $ === 122 ||
                $ === 244 ||
                $ === 44 ||
                $ === 83 ||
                $ === 86 ||
                $ === 118 ||
                $ === 128)
            ) {
              var N = y();
              if ((N === 3 && b(1), k(), k(), b(1), v()))
                for (o = N !== 3 ? 8 : 12, l = 0; l < o; l++)
                  v() && D(l < 6 ? 16 : 64, u);
            }
            k();
            var P = y();
            if (P === 0) y();
            else if (P === 1)
              for (b(1), w(), w(), i = y(), l = 0; l < i; l++) w();
            k(), b(1);
            var I = y(),
              O = y(),
              X = g(1);
            X === 0 && b(1),
              b(1),
              v() && ((c = y()), (d = y()), (h = y()), (f = y()));
            var G = [1, 1];
            if (v() && v())
              switch (p()) {
                case 1:
                  G = [1, 1];
                  break;
                case 2:
                  G = [12, 11];
                  break;
                case 3:
                  G = [10, 11];
                  break;
                case 4:
                  G = [16, 11];
                  break;
                case 5:
                  G = [40, 33];
                  break;
                case 6:
                  G = [24, 11];
                  break;
                case 7:
                  G = [20, 11];
                  break;
                case 8:
                  G = [32, 11];
                  break;
                case 9:
                  G = [80, 33];
                  break;
                case 10:
                  G = [18, 11];
                  break;
                case 11:
                  G = [15, 11];
                  break;
                case 12:
                  G = [64, 33];
                  break;
                case 13:
                  G = [160, 99];
                  break;
                case 14:
                  G = [4, 3];
                  break;
                case 15:
                  G = [3, 2];
                  break;
                case 16:
                  G = [2, 1];
                  break;
                case 255:
                  G = [(p() << 8) | p(), (p() << 8) | p()];
              }
            return {
              width: Math.ceil(16 * (I + 1) - 2 * c - 2 * d),
              height: (2 - X) * (O + 1) * 16 - (X ? 2 : 4) * (h + f),
              pixelRatio: G,
            };
          },
        },
      ]),
      n
    );
  })(),
  i1e = (function (t) {
    so(n, D9e);
    var e = lo(n);
    function n() {
      var r, i;
      Wn(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        ((i = e.call.apply(e, Ce((r = [this])).call(r, l))).initVPS = null), i
      );
    }
    return (
      Kn(n, [
        {
          key: "parsePES",
          value: function (r, i, o, l) {
            var u,
              c = this,
              d = this.parseNALu(r, o.data, l),
              h = this.VideoSample,
              f = !1;
            (o.data = null),
              h &&
                d.length &&
                !r.audFound &&
                (this.pushAccessUnit(h, r),
                (h = this.VideoSample =
                  this.createVideoSample(!1, o.pts, o.dts))),
              d.forEach(function (p) {
                var g, y;
                switch (p.type) {
                  case 0:
                  case 1:
                  case 2:
                  case 3:
                  case 4:
                  case 5:
                  case 6:
                  case 7:
                  case 8:
                  case 9:
                    h ||
                      (h = c.VideoSample =
                        c.createVideoSample(!1, o.pts, o.dts)),
                      (h.frame = !0),
                      (u = !0);
                    break;
                  case 16:
                  case 17:
                  case 18:
                  case 21:
                    var v;
                    (u = !0),
                      f &&
                        (v = h) != null &&
                        v.frame &&
                        !h.key &&
                        (c.pushAccessUnit(h, r), (h = c.VideoSample = null)),
                      h ||
                        (h = c.VideoSample =
                          c.createVideoSample(!0, o.pts, o.dts)),
                      (h.key = !0),
                      (h.frame = !0);
                    break;
                  case 19:
                  case 20:
                    (u = !0),
                      (g = h) != null &&
                        g.frame &&
                        !h.key &&
                        (c.pushAccessUnit(h, r), (h = c.VideoSample = null)),
                      h ||
                        (h = c.VideoSample =
                          c.createVideoSample(!0, o.pts, o.dts)),
                      (h.key = !0),
                      (h.frame = !0);
                    break;
                  case 39:
                    (u = !0), qse(p.data, 2, o.pts, i.samples);
                    break;
                  case 32:
                    if (((u = !0), !r.vps)) {
                      var b = c.readVPS(p.data);
                      (r.params = fl({}, b)), (c.initVPS = p.data);
                    }
                    r.vps = [p.data];
                    break;
                  case 33:
                    if (((u = !0), (f = !0), ti(r.params) === "object")) {
                      if (
                        (r.vps === void 0 ||
                          r.vps[0] === c.initVPS ||
                          r.sps === void 0 ||
                          c.matchSPS(r.sps[0], p.data) ||
                          ((c.initVPS = r.vps[0]), (r.sps = r.pps = void 0)),
                        !r.sps)
                      ) {
                        var w = c.readSPS(p.data);
                        for (var k in ((r.width = w.width),
                        (r.height = w.height),
                        (r.pixelRatio = w.pixelRatio),
                        (r.codec = w.codecString),
                        (r.sps = []),
                        w.params))
                          r.params[k] = w.params[k];
                      }
                      r.vps !== void 0 &&
                        r.vps[0] === c.initVPS &&
                        r.sps.push(p.data);
                    }
                    h ||
                      (h = c.VideoSample =
                        c.createVideoSample(!0, o.pts, o.dts)),
                      (h.key = !0);
                    break;
                  case 34:
                    if (((u = !0), ti(r.params) === "object")) {
                      if (!r.pps) {
                        r.pps = [];
                        var D = c.readPPS(p.data);
                        for (var $ in D) r.params[$] = D[$];
                      }
                      r.vps !== void 0 &&
                        r.vps[0] === c.initVPS &&
                        r.pps.push(p.data);
                    }
                    break;
                  case 35:
                    (u = !0),
                      (r.audFound = !0),
                      (y = h) != null &&
                        y.frame &&
                        (c.pushAccessUnit(h, r), (h = null)),
                      h ||
                        (h = c.VideoSample =
                          c.createVideoSample(!1, o.pts, o.dts));
                    break;
                  default:
                    u = !1;
                }
                h && u && h.units.push(p);
              }),
              l && h && (this.pushAccessUnit(h, r), (this.VideoSample = null));
          },
        },
        {
          key: "getNALuType",
          value: function (r, i) {
            return (126 & r[i]) >>> 1;
          },
        },
        {
          key: "ebsp2rbsp",
          value: function (r) {
            for (
              var i = new Uint8Array(r.byteLength), o = 0, l = 0;
              l < r.byteLength;
              l++
            )
              (l >= 2 && r[l] === 3 && r[l - 1] === 0 && r[l - 2] === 0) ||
                ((i[o] = r[l]), o++);
            return new Uint8Array(i.buffer, 0, o);
          },
        },
        {
          key: "pushAccessUnit",
          value: function (r, i) {
            Eo(po(n.prototype), "pushAccessUnit", this).call(this, r, i),
              this.initVPS && (this.initVPS = null);
          },
        },
        {
          key: "readVPS",
          value: function (r) {
            var i = new YC(r);
            return (
              i.readUByte(),
              i.readUByte(),
              i.readBits(4),
              i.skipBits(2),
              i.readBits(6),
              {
                numTemporalLayers: i.readBits(3) + 1,
                temporalIdNested: i.readBoolean(),
              }
            );
          },
        },
        {
          key: "readSPS",
          value: function (r) {
            var i,
              o,
              l,
              u,
              c = new YC(this.ebsp2rbsp(r));
            c.readUByte(), c.readUByte(), c.readBits(4);
            var d = c.readBits(3);
            c.readBoolean();
            for (
              var h = c.readBits(2),
                f = c.readBoolean(),
                p = c.readBits(5),
                g = c.readUByte(),
                y = c.readUByte(),
                v = c.readUByte(),
                b = c.readUByte(),
                w = c.readUByte(),
                k = c.readUByte(),
                D = c.readUByte(),
                $ = c.readUByte(),
                N = c.readUByte(),
                P = c.readUByte(),
                I = c.readUByte(),
                O = [],
                X = [],
                G = 0;
              G < d;
              G++
            )
              O.push(c.readBoolean()), X.push(c.readBoolean());
            if (d > 0) for (var H = d; H < 8; H++) c.readBits(2);
            for (var E = 0; E < d; E++)
              O[E] &&
                (c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte(),
                c.readUByte()),
                X[E] && c.readUByte();
            c.readUEG();
            var S = c.readUEG();
            S == 3 && c.skipBits(1);
            var L = c.readUEG(),
              W = c.readUEG(),
              F = c.readBoolean(),
              oe = 0,
              De = 0,
              Xe = 0,
              ze = 0;
            F &&
              ((oe += c.readUEG()),
              (De += c.readUEG()),
              (Xe += c.readUEG()),
              (ze += c.readUEG()));
            for (
              var ht = c.readUEG(),
                gt = c.readUEG(),
                pt = c.readUEG(),
                $t = c.readBoolean() ? 0 : d;
              $t <= d;
              $t++
            )
              c.skipUEG(), c.skipUEG(), c.skipUEG();
            if (
              (c.skipUEG(),
              c.skipUEG(),
              c.skipUEG(),
              c.skipUEG(),
              c.skipUEG(),
              c.skipUEG(),
              c.readBoolean() && c.readBoolean())
            )
              for (var ot = 0; ot < 4; ot++)
                for (var tt = 0; tt < (ot === 3 ? 2 : 6); tt++)
                  if (c.readBoolean()) {
                    var He = Math.min(64, 1 << (4 + (ot << 1)));
                    ot > 1 && c.readEG();
                    for (var de = 0; de < He; de++) c.readEG();
                  } else c.readUEG();
            c.readBoolean(),
              c.readBoolean(),
              c.readBoolean() &&
                (c.readUByte(), c.skipUEG(), c.skipUEG(), c.readBoolean());
            for (var ue = c.readUEG(), Z = 0, ie = 0; ie < ue; ie++) {
              var Ne = !1;
              if ((ie !== 0 && (Ne = c.readBoolean()), Ne)) {
                ie === ue && c.readUEG(), c.readBoolean(), c.readUEG();
                for (var Pe = 0, kt = 0; kt <= Z; kt++) {
                  var Gt = c.readBoolean(),
                    B = !1;
                  Gt || (B = c.readBoolean()), (Gt || B) && Pe++;
                }
                Z = Pe;
              } else {
                var re = c.readUEG(),
                  Ae = c.readUEG();
                Z = re + Ae;
                for (var lt = 0; lt < re; lt++) c.readUEG(), c.readBoolean();
                for (var Et = 0; Et < Ae; Et++) c.readUEG(), c.readBoolean();
              }
            }
            if (c.readBoolean())
              for (var St = c.readUEG(), Lt = 0; Lt < St; Lt++) {
                for (var ln = 0; ln < pt + 4; ln++) c.readBits(1);
                c.readBits(1);
              }
            var Ln = 0,
              Tr = 1,
              sr = 1,
              hi = !0,
              Ra = 1,
              En = 0;
            c.readBoolean(), c.readBoolean();
            var Zn = !1;
            if (c.readBoolean()) {
              if (c.readBoolean()) {
                var on = c.readUByte();
                on > 0 && on < 16
                  ? ((Tr = [
                      1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3,
                      2,
                    ][on - 1]),
                    (sr = [
                      1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2,
                      1,
                    ][on - 1]))
                  : on === 255 &&
                    ((Tr = c.readBits(16)), (sr = c.readBits(16)));
              }
              if (
                (c.readBoolean() && c.readBoolean(),
                c.readBoolean() &&
                  (c.readBits(3),
                  c.readBoolean(),
                  c.readBoolean() &&
                    (c.readUByte(), c.readUByte(), c.readUByte())),
                c.readBoolean() && (c.readUEG(), c.readUEG()),
                c.readBoolean(),
                c.readBoolean(),
                c.readBoolean(),
                (Zn = c.readBoolean()) &&
                  ((oe += c.readUEG()),
                  (De += c.readUEG()),
                  (Xe += c.readUEG()),
                  (ze += c.readUEG())),
                c.readBoolean() &&
                  ((Ra = c.readBits(32)),
                  (En = c.readBits(32)),
                  c.readBoolean() && c.readUEG(),
                  c.readBoolean()))
              ) {
                var rn = c.readBoolean(),
                  It = c.readBoolean(),
                  wt = !1;
                (rn || It) &&
                  ((wt = c.readBoolean()) &&
                    (c.readUByte(),
                    c.readBits(5),
                    c.readBoolean(),
                    c.readBits(5)),
                  c.readBits(4),
                  c.readBits(4),
                  wt && c.readBits(4),
                  c.readBits(5),
                  c.readBits(5),
                  c.readBits(5));
                for (var Mt = 0; Mt <= d; Mt++) {
                  var Wt = !1;
                  (hi = c.readBoolean()) || c.readBoolean()
                    ? c.readEG()
                    : (Wt = c.readBoolean());
                  var Ft = Wt ? 1 : c.readUEG() + 1;
                  if (rn)
                    for (var un = 0; un < Ft; un++)
                      c.readUEG(),
                        c.readUEG(),
                        wt && (c.readUEG(), c.readUEG()),
                        c.skipBits(1);
                  if (It)
                    for (var Yt = 0; Yt < Ft; Yt++)
                      c.readUEG(),
                        c.readUEG(),
                        wt && (c.readUEG(), c.readUEG()),
                        c.skipBits(1);
                }
              }
              c.readBoolean() &&
                (c.readBoolean(),
                c.readBoolean(),
                c.readBoolean(),
                (Ln = c.readUEG()));
            }
            var Qt = L,
              Sn = W;
            if (F || Zn) {
              var ar = 1,
                ye = 1;
              S === 1 ? (ar = ye = 2) : S == 2 && (ar = 2),
                (Qt = L - ar * De - ar * oe),
                (Sn = W - ye * ze - ye * Xe);
            }
            for (
              var Gn = h ? ["A", "B", "C"][h] : "",
                Ht = (g << 24) | (y << 16) | (v << 8) | b,
                yr = 0,
                T = 0;
              T < 32;
              T++
            )
              yr = (yr | (((Ht >> T) & 1) << (31 - T))) >>> 0;
            var Jn = yr.toString(16);
            p === 1 && Jn === "2" && (Jn = "6");
            var pr = f ? "H" : "L";
            return {
              codecString: Ce(
                (i = Ce(
                  (o = Ce(
                    (l = Ce((u = "hvc1.".concat(Gn))).call(u, p, "."))
                  ).call(l, Jn, "."))
                ).call(o, pr))
              ).call(i, I, ".B0"),
              params: {
                general_tier_flag: f,
                general_profile_idc: p,
                general_profile_space: h,
                general_profile_compatibility_flags: [g, y, v, b],
                general_constraint_indicator_flags: [w, k, D, $, N, P],
                general_level_idc: I,
                bit_depth: ht + 8,
                bit_depth_luma_minus8: ht,
                bit_depth_chroma_minus8: gt,
                min_spatial_segmentation_idc: Ln,
                chroma_format_idc: S,
                frame_rate: { fixed: hi, fps: En / Ra },
              },
              width: Qt,
              height: Sn,
              pixelRatio: [Tr, sr],
            };
          },
        },
        {
          key: "readPPS",
          value: function (r) {
            var i = new YC(this.ebsp2rbsp(r));
            i.readUByte(),
              i.readUByte(),
              i.skipUEG(),
              i.skipUEG(),
              i.skipBits(2),
              i.skipBits(3),
              i.skipBits(2),
              i.skipUEG(),
              i.skipUEG(),
              i.skipEG(),
              i.skipBits(2),
              i.readBoolean() && i.skipUEG(),
              i.skipEG(),
              i.skipEG(),
              i.skipBits(4);
            var o = i.readBoolean(),
              l = i.readBoolean(),
              u = 1;
            return (
              l && o ? (u = 0) : l ? (u = 3) : o && (u = 2),
              { parallelismType: u }
            );
          },
        },
        {
          key: "matchSPS",
          value: function (r, i) {
            return (
              String.fromCharCode.apply(null, r).substr(3) ===
              String.fromCharCode.apply(null, i).substr(3)
            );
          },
        },
      ]),
      n
    );
  })(),
  zc = 188,
  YHt = (function () {
    function t(e, n, r, i) {
      Wn(this, t),
        (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 = n),
        (this.typeSupported = r),
        (this.logger = i),
        (this.videoParser = null);
    }
    return (
      Kn(
        t,
        [
          {
            key: "resetInitSegment",
            value: function (e, n, r, i) {
              (this.pmtParsed = !1),
                (this._pmtId = -1),
                (this._videoTrack = t.createTrack("video")),
                (this._videoTrack.duration = i),
                (this._audioTrack = t.createTrack("audio", i)),
                (this._id3Track = t.createTrack("id3")),
                (this._txtTrack = t.createTrack("text")),
                (this._audioTrack.segmentCodec = "aac"),
                (this.aacOverFlow = null),
                (this.remainderData = null),
                (this.audioCodec = n),
                (this.videoCodec = r);
            },
          },
          { key: "resetTimeStamp", value: function () {} },
          {
            key: "resetContiguity",
            value: function () {
              var e = this._audioTrack,
                n = this._videoTrack,
                r = this._id3Track;
              e && (e.pesData = null),
                n && (n.pesData = null),
                r && (r.pesData = null),
                (this.aacOverFlow = null),
                (this.remainderData = null);
            },
          },
          {
            key: "demux",
            value: function (e, n) {
              var r,
                i =
                  arguments.length > 2 &&
                  arguments[2] !== void 0 &&
                  arguments[2],
                o =
                  arguments.length > 3 &&
                  arguments[3] !== void 0 &&
                  arguments[3];
              i || (this.sampleAes = null);
              var l = this._videoTrack,
                u = this._audioTrack,
                c = this._id3Track,
                d = this._txtTrack,
                h = l.pid,
                f = l.pesData,
                p = u.pid,
                g = c.pid,
                y = u.pesData,
                v = c.pesData,
                b = null,
                w = this.pmtParsed,
                k = this._pmtId,
                D = e.length;
              if (
                (this.remainderData &&
                  ((D = (e = dm(this.remainderData, e)).length),
                  (this.remainderData = null)),
                D < zc && !o)
              )
                return (
                  (this.remainderData = e),
                  { audioTrack: u, videoTrack: l, id3Track: c, textTrack: d }
                );
              var $ = Math.max(0, t.syncOffset(e));
              (D -= (D - $) % zc) < e.byteLength &&
                !o &&
                (this.remainderData = new Uint8Array(
                  e.buffer,
                  D,
                  e.buffer.byteLength - D
                ));
              for (var N = 0, P = $; P < D; P += zc)
                if (e[P] === 71) {
                  var I = !!(64 & e[P + 1]),
                    O = jee(e, P),
                    X = void 0;
                  if ((48 & e[P + 3]) >> 4 > 1) {
                    if ((X = P + 5 + e[P + 4]) === P + zc) continue;
                  } else X = P + 4;
                  switch (O) {
                    case h:
                      if (I) {
                        if (f && (r = GA(f, this.logger))) {
                          if (this.videoParser === null)
                            switch (l.segmentCodec) {
                              case "avc":
                                this.videoParser = new r1e();
                                break;
                              case "hevc":
                                this.videoParser = new i1e();
                            }
                          this.videoParser !== null &&
                            this.videoParser.parsePES(l, d, r, !1);
                        }
                        f = { data: [], size: 0 };
                      }
                      f &&
                        (f.data.push(e.subarray(X, P + zc)),
                        (f.size += P + zc - X));
                      break;
                    case p:
                      if (I) {
                        if (y && (r = GA(y, this.logger)))
                          switch (u.segmentCodec) {
                            case "aac":
                              this.parseAACPES(u, r);
                              break;
                            case "mp3":
                              this.parseMPEGPES(u, r);
                              break;
                            case "ac3":
                              this.parseAC3PES(u, r);
                          }
                        y = { data: [], size: 0 };
                      }
                      y &&
                        (y.data.push(e.subarray(X, P + zc)),
                        (y.size += P + zc - X));
                      break;
                    case g:
                      I &&
                        (v &&
                          (r = GA(v, this.logger)) &&
                          this.parseID3PES(c, r),
                        (v = { data: [], size: 0 })),
                        v &&
                          (v.data.push(e.subarray(X, P + zc)),
                          (v.size += P + zc - X));
                      break;
                    case 0:
                      I && (X += e[X] + 1), (k = this._pmtId = QHt(e, X));
                      break;
                    case k:
                      I && (X += e[X] + 1);
                      var G,
                        H,
                        E = JHt(
                          e,
                          X,
                          this.typeSupported,
                          i,
                          this.observer,
                          this.logger
                        );
                      (h = E.videoPid) > 0 &&
                        ((l.pid = h), (l.segmentCodec = E.segmentVideoCodec)),
                        (p = E.audioPid) > 0 &&
                          ((u.pid = p), (u.segmentCodec = E.segmentAudioCodec)),
                        (g = E.id3Pid) > 0 && (c.pid = g),
                        b !== null &&
                          !w &&
                          (this.logger.warn(
                            Ce(
                              (G = Ce(
                                (H = "MPEG-TS PMT found at ".concat(
                                  P,
                                  " after unknown PID '"
                                ))
                              ).call(H, b, "'. Backtracking to sync byte @"))
                            ).call(G, $, " to parse all TS packets.")
                          ),
                          (b = null),
                          (P = $ - 188)),
                        (w = this.pmtParsed = !0);
                      break;
                    case 17:
                    case 8191:
                      break;
                    default:
                      b = O;
                  }
                } else N++;
              N > 0 &&
                Wee(
                  this.observer,
                  new Error(
                    "Found ".concat(
                      N,
                      " TS packet/s that do not start with 0x47"
                    )
                  ),
                  void 0,
                  this.logger
                ),
                (l.pesData = f),
                (u.pesData = y),
                (c.pesData = v);
              var S = {
                audioTrack: u,
                videoTrack: l,
                id3Track: c,
                textTrack: d,
              };
              return o && this.extractRemainingSamples(S), S;
            },
          },
          {
            key: "flush",
            value: function () {
              var e,
                n = this.remainderData;
              return (
                (this.remainderData = null),
                (e = n
                  ? this.demux(n, -1, !1, !0)
                  : {
                      videoTrack: this._videoTrack,
                      audioTrack: this._audioTrack,
                      id3Track: this._id3Track,
                      textTrack: this._txtTrack,
                    }),
                this.extractRemainingSamples(e),
                this.sampleAes ? this.decrypt(e, this.sampleAes) : e
              );
            },
          },
          {
            key: "extractRemainingSamples",
            value: function (e) {
              var n,
                r = e.audioTrack,
                i = e.videoTrack,
                o = e.id3Track,
                l = e.textTrack,
                u = i.pesData,
                c = r.pesData,
                d = o.pesData;
              if (u && (n = GA(u, this.logger))) {
                if (this.videoParser === null)
                  switch (i.segmentCodec) {
                    case "avc":
                      this.videoParser = new r1e();
                      break;
                    case "hevc":
                      this.videoParser = new i1e();
                  }
                this.videoParser !== null &&
                  (this.videoParser.parsePES(i, l, n, !0), (i.pesData = null));
              } else i.pesData = u;
              if (c && (n = GA(c, this.logger))) {
                switch (r.segmentCodec) {
                  case "aac":
                    this.parseAACPES(r, n);
                    break;
                  case "mp3":
                    this.parseMPEGPES(r, n);
                    break;
                  case "ac3":
                    this.parseAC3PES(r, n);
                }
                r.pesData = null;
              } else
                c != null &&
                  c.size &&
                  this.logger.log(
                    "last AAC PES packet truncated,might overlap between fragments"
                  ),
                  (r.pesData = c);
              d && (n = GA(d, this.logger))
                ? (this.parseID3PES(o, n), (o.pesData = null))
                : (o.pesData = d);
            },
          },
          {
            key: "demuxSampleAes",
            value: function (e, n, r) {
              var i = this.demux(e, r, !0, !this.config.progressive),
                o = (this.sampleAes = new ZHt(this.observer, this.config, n));
              return this.decrypt(i, o);
            },
          },
          {
            key: "decrypt",
            value: function (e, n) {
              return new Ar(function (r) {
                var i = e.audioTrack,
                  o = e.videoTrack;
                i.samples && i.segmentCodec === "aac"
                  ? n.decryptAacSamples(i.samples, 0, function () {
                      o.samples
                        ? n.decryptAvcSamples(o.samples, 0, 0, function () {
                            r(e);
                          })
                        : r(e);
                    })
                  : o.samples &&
                    n.decryptAvcSamples(o.samples, 0, 0, function () {
                      r(e);
                    });
              });
            },
          },
          {
            key: "destroy",
            value: function () {
              this.observer && this.observer.removeAllListeners(),
                (this.config = this.logger = this.observer = null),
                (this.aacOverFlow =
                  this.videoParser =
                  this.remainderData =
                  this.sampleAes =
                    null),
                (this._videoTrack =
                  this._audioTrack =
                  this._id3Track =
                  this._txtTrack =
                    void 0);
            },
          },
          {
            key: "parseAACPES",
            value: function (e, n) {
              var r,
                i,
                o,
                l = 0,
                u = this.aacOverFlow,
                c = n.data;
              if (u) {
                this.aacOverFlow = null;
                var d = u.missing,
                  h = u.sample.unit.byteLength;
                if (d === -1) c = dm(u.sample.unit, c);
                else {
                  var f = h - d;
                  u.sample.unit.set(c.subarray(0, d), f),
                    e.samples.push(u.sample),
                    (l = u.missing);
                }
              }
              for (r = l, i = c.length; r < i - 1 && !RU(c, r); r++);
              if (r !== l) {
                var p,
                  g = r < i - 1;
                if (
                  ((p = g
                    ? "AAC PES did not start with ADTS header,offset:".concat(r)
                    : "No ADTS header found in AAC PES"),
                  Wee(this.observer, new Error(p), g, this.logger),
                  !g)
                )
                  return;
              }
              if (
                (b9e(e, this.observer, c, r, this.audioCodec), n.pts !== void 0)
              )
                o = n.pts;
              else {
                if (!u)
                  return void this.logger.warn(
                    "[tsdemuxer]: AAC PES unknown PTS"
                  );
                var y = _9e(e.samplerate);
                o = u.sample.pts + y;
              }
              for (var v, b = 0; r < i; ) {
                if (((r += (v = T9e(e, c, r, o, b)).length), v.missing)) {
                  this.aacOverFlow = v;
                  break;
                }
                for (b++; r < i - 1 && !RU(c, r); r++);
              }
            },
          },
          {
            key: "parseMPEGPES",
            value: function (e, n) {
              var r = n.data,
                i = r.length,
                o = 0,
                l = 0,
                u = n.pts;
              if (u !== void 0)
                for (; l < i; )
                  if (A9e(r, l)) {
                    var c = S9e(e, r, l, u, o);
                    if (!c) break;
                    (l += c.length), o++;
                  } else l++;
              else this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");
            },
          },
          {
            key: "parseAC3PES",
            value: function (e, n) {
              var r = n.data,
                i = n.pts;
              if (i !== void 0)
                for (
                  var o, l = r.length, u = 0, c = 0;
                  c < l && (o = I9e(e, r, c, i, u++)) > 0;

                )
                  c += o;
              else this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");
            },
          },
          {
            key: "parseID3PES",
            value: function (e, n) {
              if (n.pts !== void 0) {
                var r = cu({}, n, {
                  type: this._videoTrack ? BI.emsg : BI.audioId3,
                  duration: Number.POSITIVE_INFINITY,
                });
                e.samples.push(r);
              } else this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (e, n) {
              var r = t.syncOffset(e);
              return (
                r > 0 &&
                  n.warn(
                    "MPEG2-TS detected but first sync word found @ offset ".concat(
                      r
                    )
                  ),
                r !== -1
              );
            },
          },
          {
            key: "syncOffset",
            value: function (e) {
              for (
                var n = e.length, r = Math.min(5 * zc, n - zc) + 1, i = 0;
                i < r;

              ) {
                for (var o = !1, l = -1, u = 0, c = i; c < n; c += zc) {
                  if (e[c] !== 71 || (n - c !== zc && e[c + zc] !== 71)) {
                    if (u) return -1;
                    break;
                  }
                  if (
                    (u++,
                    l === -1 &&
                      (l = c) !== 0 &&
                      (r = Math.min(l + 99 * zc, e.length - zc) + 1),
                    o || (o = jee(e, c) === 0),
                    o && u > 1 && ((l === 0 && u > 2) || c + zc > r))
                  )
                    return l;
                }
                i++;
              }
              return -1;
            },
          },
          {
            key: "createTrack",
            value: function (e, n) {
              return {
                container:
                  e === "video" || e === "audio" ? "video/mp2t" : void 0,
                type: e,
                id: q8e[e],
                pid: -1,
                inputTimeScale: 9e4,
                sequenceNumber: 0,
                samples: [],
                dropped: 0,
                duration: e === "audio" ? n : void 0,
              };
            },
          },
        ]
      ),
      t
    );
  })();
function jee(t, e) {
  return ((31 & t[e + 1]) << 8) + t[e + 2];
}
function QHt(t, e) {
  return ((31 & t[e + 10]) << 8) | t[e + 11];
}
function JHt(t, e, n, r, i, o) {
  var l = {
      audioPid: -1,
      videoPid: -1,
      id3Pid: -1,
      segmentVideoCodec: "avc",
      segmentAudioCodec: "aac",
    },
    u = e + 3 + (((15 & t[e + 1]) << 8) | t[e + 2]) - 4;
  for (e += 12 + (((15 & t[e + 10]) << 8) | t[e + 11]); e < u; ) {
    var c = jee(t, e),
      d = ((15 & t[e + 3]) << 8) | t[e + 4];
    switch (t[e]) {
      case 207:
        if (!r) {
          XV("ADTS AAC", o);
          break;
        }
      case 15:
        l.audioPid === -1 && (l.audioPid = c);
        break;
      case 21:
        l.id3Pid === -1 && (l.id3Pid = c);
        break;
      case 219:
        if (!r) {
          XV("H.264", o);
          break;
        }
      case 27:
        l.videoPid === -1 && ((l.videoPid = c), (l.segmentVideoCodec = "avc"));
        break;
      case 3:
      case 4:
        n.mpeg || n.mp3
          ? l.audioPid === -1 &&
            ((l.audioPid = c), (l.segmentAudioCodec = "mp3"))
          : o.log("MPEG audio found, not supported in this browser");
        break;
      case 193:
        if (!r) {
          XV("AC-3", o);
          break;
        }
      case 129:
        n.ac3
          ? l.audioPid === -1 &&
            ((l.audioPid = c), (l.segmentAudioCodec = "ac3"))
          : o.log("AC-3 audio found, not supported in this browser");
        break;
      case 6:
        if (l.audioPid === -1 && d > 0)
          for (var h = e + 5, f = d; f > 2; ) {
            t[h] === 106 &&
              (n.ac3 !== !0
                ? o.log(
                    "AC-3 audio found, not supported in this browser for now"
                  )
                : ((l.audioPid = c), (l.segmentAudioCodec = "ac3")));
            var p = t[h + 1] + 2;
            (h += p), (f -= p);
          }
        break;
      case 194:
      case 135:
        return (
          Wee(i, new Error("Unsupported EC-3 in M2TS found"), void 0, o), l
        );
      case 36:
        l.videoPid === -1 &&
          ((l.videoPid = c),
          (l.segmentVideoCodec = "hevc"),
          o.log("HEVC in M2TS found"));
    }
    e += d + 5;
  }
  return l;
}
function Wee(t, e, n, r) {
  r.warn("parsing error: ".concat(e.message)),
    t.emit(_t.ERROR, _t.ERROR, {
      type: no.MEDIA_ERROR,
      details: kr.FRAG_PARSING_ERROR,
      fatal: !1,
      levelRetry: n,
      error: e,
      reason: e.message,
    });
}
function XV(t, e) {
  e.log(
    "".concat(t, " with AES-128-CBC encryption found in unencrypted stream")
  );
}
function GA(t, e) {
  var n,
    r,
    i,
    o,
    l,
    u = 0,
    c = t.data;
  if (!t || t.size === 0) return null;
  for (; c[0].length < 19 && c.length > 1; )
    (c[0] = dm(c[0], c[1])), tl(c).call(c, 1, 1);
  if (((n = c[0])[0] << 16) + (n[1] << 8) + n[2] === 1) {
    if ((r = (n[4] << 8) + n[5]) && r > t.size - 6) return null;
    var d = n[7];
    192 & d &&
      ((o =
        536870912 * (14 & n[9]) +
        4194304 * (255 & n[10]) +
        16384 * (254 & n[11]) +
        128 * (255 & n[12]) +
        (254 & n[13]) / 2),
      64 & d
        ? o -
            (l =
              536870912 * (14 & n[14]) +
              4194304 * (255 & n[15]) +
              16384 * (254 & n[16]) +
              128 * (255 & n[17]) +
              (254 & n[18]) / 2) >
            54e5 &&
          (e.warn(
            "".concat(
              Math.round((o - l) / 9e4),
              "s delta between PTS and DTS, align them"
            )
          ),
          (o = l))
        : (l = o));
    var h = (i = n[8]) + 9;
    if (t.size <= h) return null;
    t.size -= h;
    for (var f = new Uint8Array(t.size), p = 0, g = c.length; p < g; p++) {
      var y = (n = c[p]).byteLength;
      if (h) {
        if (h > y) {
          h -= y;
          continue;
        }
        (n = n.subarray(h)), (y -= h), (h = 0);
      }
      f.set(n, u), (u += y);
    }
    return r && (r -= i + 3), { data: f, pts: o, dts: l, len: r };
  }
  return null;
}
var qHt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "getSilentFrame",
          value: function (e, n) {
            if (e === "mp4a.40.2") {
              if (n === 1) return new Uint8Array([0, 200, 0, 128, 35, 128]);
              if (n === 2)
                return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
              if (n === 3)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142,
                ]);
              if (n === 4)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128,
                  8, 2, 56,
                ]);
              if (n === 5)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 56,
                ]);
              if (n === 6)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224,
                ]);
            } else {
              if (n === 1)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6,
                  241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 2)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 3)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
            }
          },
        },
      ]),
      t
    );
  })(),
  B_ = Math.pow(2, 32) - 1,
  Sd = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "init",
          value: function () {
            var e;
            for (e in ((t.types = {
              avc1: [],
              avcC: [],
              hvc1: [],
              hvcC: [],
              btrt: [],
              dinf: [],
              dref: [],
              esds: [],
              ftyp: [],
              hdlr: [],
              mdat: [],
              mdhd: [],
              mdia: [],
              mfhd: [],
              minf: [],
              moof: [],
              moov: [],
              mp4a: [],
              ".mp3": [],
              dac3: [],
              "ac-3": [],
              mvex: [],
              mvhd: [],
              pasp: [],
              sdtp: [],
              stbl: [],
              stco: [],
              stsc: [],
              stsd: [],
              stsz: [],
              stts: [],
              tfdt: [],
              tfhd: [],
              traf: [],
              trak: [],
              trun: [],
              trex: [],
              tkhd: [],
              vmhd: [],
              smhd: [],
            }),
            t.types))
              t.types.hasOwnProperty(e) &&
                (t.types[e] = [
                  e.charCodeAt(0),
                  e.charCodeAt(1),
                  e.charCodeAt(2),
                  e.charCodeAt(3),
                ]);
            var n = new Uint8Array([
                0, 0, 0, 0, 0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0, 0, 0, 0,
                0, 0, 0, 0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108,
                101, 114, 0,
              ]),
              r = new Uint8Array([
                0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0,
                0, 0, 0, 0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108,
                101, 114, 0,
              ]);
            t.HDLR_TYPES = { video: n, audio: r };
            var i = new Uint8Array([
                0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0,
                1,
              ]),
              o = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]);
            (t.STTS = t.STSC = t.STCO = o),
              (t.STSZ = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
              (t.VMHD = new Uint8Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0])),
              (t.SMHD = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0])),
              (t.STSD = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]));
            var l = new Uint8Array([105, 115, 111, 109]),
              u = new Uint8Array([97, 118, 99, 49]),
              c = new Uint8Array([0, 0, 0, 1]);
            (t.FTYP = t.box(t.types.ftyp, l, c, l, u)),
              (t.DINF = t.box(t.types.dinf, t.box(t.types.dref, i)));
          },
        },
        {
          key: "box",
          value: function (e) {
            for (
              var n = 8,
                r = arguments.length,
                i = new Array(r > 1 ? r - 1 : 0),
                o = 1;
              o < r;
              o++
            )
              i[o - 1] = arguments[o];
            for (var l = i.length, u = l; l--; ) n += i[l].byteLength;
            var c = new Uint8Array(n);
            for (
              c[0] = (n >> 24) & 255,
                c[1] = (n >> 16) & 255,
                c[2] = (n >> 8) & 255,
                c[3] = 255 & n,
                c.set(e, 4),
                l = 0,
                n = 8;
              l < u;
              l++
            )
              c.set(i[l], n), (n += i[l].byteLength);
            return c;
          },
        },
        {
          key: "hdlr",
          value: function (e) {
            return t.box(t.types.hdlr, t.HDLR_TYPES[e]);
          },
        },
        {
          key: "mdat",
          value: function (e) {
            return t.box(t.types.mdat, e);
          },
        },
        {
          key: "mdhd",
          value: function (e, n) {
            n *= e;
            var r = Math.floor(n / (B_ + 1)),
              i = Math.floor(n % (B_ + 1));
            return t.box(
              t.types.mdhd,
              new Uint8Array([
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                3,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                r >> 24,
                (r >> 16) & 255,
                (r >> 8) & 255,
                255 & r,
                i >> 24,
                (i >> 16) & 255,
                (i >> 8) & 255,
                255 & i,
                85,
                196,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "mdia",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.timescale, e.duration),
              t.hdlr(e.type),
              t.minf(e)
            );
          },
        },
        {
          key: "mfhd",
          value: function (e) {
            return t.box(
              t.types.mfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "minf",
          value: function (e) {
            return e.type === "audio"
              ? t.box(
                  t.types.minf,
                  t.box(t.types.smhd, t.SMHD),
                  t.DINF,
                  t.stbl(e)
                )
              : t.box(
                  t.types.minf,
                  t.box(t.types.vmhd, t.VMHD),
                  t.DINF,
                  t.stbl(e)
                );
          },
        },
        {
          key: "moof",
          value: function (e, n, r) {
            return t.box(t.types.moof, t.mfhd(e), t.traf(r, n));
          },
        },
        {
          key: "moov",
          value: function (e) {
            for (var n, r, i = e.length, o = []; i--; ) o[i] = t.trak(e[i]);
            return t.box.apply(
              null,
              Ce(
                (n = Ce(
                  (r = [t.types.moov, t.mvhd(e[0].timescale, e[0].duration)])
                ).call(r, o))
              ).call(n, t.mvex(e))
            );
          },
        },
        {
          key: "mvex",
          value: function (e) {
            for (var n, r = e.length, i = []; r--; ) i[r] = t.trex(e[r]);
            return t.box.apply(null, Ce((n = [t.types.mvex])).call(n, i));
          },
        },
        {
          key: "mvhd",
          value: function (e, n) {
            n *= e;
            var r = Math.floor(n / (B_ + 1)),
              i = Math.floor(n % (B_ + 1)),
              o = new Uint8Array([
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                3,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                r >> 24,
                (r >> 16) & 255,
                (r >> 8) & 255,
                255 & r,
                i >> 24,
                (i >> 16) & 255,
                (i >> 8) & 255,
                255 & i,
                0,
                1,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                255,
                255,
                255,
                255,
              ]);
            return t.box(t.types.mvhd, o);
          },
        },
        {
          key: "sdtp",
          value: function (e) {
            var n,
              r,
              i = e.samples || [],
              o = new Uint8Array(4 + i.length);
            for (n = 0; n < i.length; n++)
              (r = Ca(i[n])),
                (o[n + 4] =
                  (r.dependsOn << 4) | (r.isDependedOn << 2) | r.hasRedundancy);
            return t.box(t.types.sdtp, o);
          },
        },
        {
          key: "stbl",
          value: function (e) {
            return t.box(
              t.types.stbl,
              t.stsd(e),
              t.box(t.types.stts, t.STTS),
              t.box(t.types.stsc, t.STSC),
              t.box(t.types.stsz, t.STSZ),
              t.box(t.types.stco, t.STCO)
            );
          },
        },
        {
          key: "avc1",
          value: function (e) {
            var n,
              r,
              i,
              o,
              l,
              u,
              c = [],
              d = [];
            for (o = 0; o < e.sps.length; o++)
              (u = (l = e.sps[o]).byteLength),
                c.push((u >>> 8) & 255),
                c.push(255 & u),
                (c = Ce(c).call(c, jn(Array.prototype).call(l)));
            for (o = 0; o < e.pps.length; o++)
              (u = (l = e.pps[o]).byteLength),
                d.push((u >>> 8) & 255),
                d.push(255 & u),
                (d = Ce(d).call(d, jn(Array.prototype).call(l)));
            var h = t.box(
                t.types.avcC,
                new Uint8Array(
                  Ce(
                    (n = Ce(
                      (r = Ce(
                        (i = [1, c[3], c[4], c[5], 255, 224 | e.sps.length])
                      ).call(i, c))
                    ).call(r, [e.pps.length]))
                  ).call(n, d)
                )
              ),
              f = e.width,
              p = e.height,
              g = e.pixelRatio[0],
              y = e.pixelRatio[1];
            return t.box(
              t.types.avc1,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (f >> 8) & 255,
                255 & f,
                (p >> 8) & 255,
                255 & p,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                18,
                100,
                97,
                105,
                108,
                121,
                109,
                111,
                116,
                105,
                111,
                110,
                47,
                104,
                108,
                115,
                46,
                106,
                115,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              h,
              t.box(
                t.types.btrt,
                new Uint8Array([
                  0, 28, 156, 128, 0, 45, 198, 192, 0, 45, 198, 192,
                ])
              ),
              t.box(
                t.types.pasp,
                new Uint8Array([
                  g >> 24,
                  (g >> 16) & 255,
                  (g >> 8) & 255,
                  255 & g,
                  y >> 24,
                  (y >> 16) & 255,
                  (y >> 8) & 255,
                  255 & y,
                ])
              )
            );
          },
        },
        {
          key: "esds",
          value: function (e) {
            var n,
              r = e.config;
            return new Uint8Array(
              Ce(
                (n = [
                  0, 0, 0, 0, 3, 25, 0, 1, 0, 4, 17, 64, 21, 0, 0, 0, 0, 0, 0,
                  0, 0, 0, 0, 0, 5, 2,
                ])
              ).call(n, Cf(r), [6, 1, 2])
            );
          },
        },
        {
          key: "audioStsd",
          value: function (e) {
            var n = e.samplerate;
            return new Uint8Array([
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              e.channelCount,
              0,
              16,
              0,
              0,
              0,
              0,
              (n >> 8) & 255,
              255 & n,
              0,
              0,
            ]);
          },
        },
        {
          key: "mp4a",
          value: function (e) {
            return t.box(
              t.types.mp4a,
              t.audioStsd(e),
              t.box(t.types.esds, t.esds(e))
            );
          },
        },
        {
          key: "mp3",
          value: function (e) {
            return t.box(t.types[".mp3"], t.audioStsd(e));
          },
        },
        {
          key: "ac3",
          value: function (e) {
            return t.box(
              t.types["ac-3"],
              t.audioStsd(e),
              t.box(t.types.dac3, e.config)
            );
          },
        },
        {
          key: "stsd",
          value: function (e) {
            return e.type === "audio"
              ? e.segmentCodec === "mp3" && e.codec === "mp3"
                ? t.box(t.types.stsd, t.STSD, t.mp3(e))
                : e.segmentCodec === "ac3"
                ? t.box(t.types.stsd, t.STSD, t.ac3(e))
                : t.box(t.types.stsd, t.STSD, t.mp4a(e))
              : e.segmentCodec === "avc"
              ? t.box(t.types.stsd, t.STSD, t.avc1(e))
              : t.box(t.types.stsd, t.STSD, t.hvc1(e));
          },
        },
        {
          key: "tkhd",
          value: function (e) {
            var n = e.id,
              r = e.duration * e.timescale,
              i = e.width,
              o = e.height,
              l = Math.floor(r / (B_ + 1)),
              u = Math.floor(r % (B_ + 1));
            return t.box(
              t.types.tkhd,
              new Uint8Array([
                1,
                0,
                0,
                7,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                3,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                0,
                0,
                0,
                0,
                l >> 24,
                (l >> 16) & 255,
                (l >> 8) & 255,
                255 & l,
                u >> 24,
                (u >> 16) & 255,
                (u >> 8) & 255,
                255 & u,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                (i >> 8) & 255,
                255 & i,
                0,
                0,
                (o >> 8) & 255,
                255 & o,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "traf",
          value: function (e, n) {
            var r = t.sdtp(e),
              i = e.id,
              o = Math.floor(n / (B_ + 1)),
              l = Math.floor(n % (B_ + 1));
            return t.box(
              t.types.traf,
              t.box(
                t.types.tfhd,
                new Uint8Array([
                  0,
                  0,
                  0,
                  0,
                  i >> 24,
                  (i >> 16) & 255,
                  (i >> 8) & 255,
                  255 & i,
                ])
              ),
              t.box(
                t.types.tfdt,
                new Uint8Array([
                  1,
                  0,
                  0,
                  0,
                  o >> 24,
                  (o >> 16) & 255,
                  (o >> 8) & 255,
                  255 & o,
                  l >> 24,
                  (l >> 16) & 255,
                  (l >> 8) & 255,
                  255 & l,
                ])
              ),
              t.trun(e, r.length + 16 + 20 + 8 + 16 + 8 + 8),
              r
            );
          },
        },
        {
          key: "trak",
          value: function (e) {
            return (
              (e.duration = e.duration || 4294967295),
              t.box(t.types.trak, t.tkhd(e), t.mdia(e))
            );
          },
        },
        {
          key: "trex",
          value: function (e) {
            var n = e.id;
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                n >> 24,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                1,
              ])
            );
          },
        },
        {
          key: "trun",
          value: function (e, n) {
            var r,
              i,
              o,
              l,
              u,
              c,
              d = e.samples || [],
              h = d.length,
              f = 12 + 16 * h,
              p = new Uint8Array(f);
            for (
              n += 8 + f,
                p.set(
                  [
                    e.type === "video" ? 1 : 0,
                    0,
                    15,
                    1,
                    (h >>> 24) & 255,
                    (h >>> 16) & 255,
                    (h >>> 8) & 255,
                    255 & h,
                    (n >>> 24) & 255,
                    (n >>> 16) & 255,
                    (n >>> 8) & 255,
                    255 & n,
                  ],
                  0
                ),
                r = 0;
              r < h;
              r++
            )
              (o = (i = d[r]).duration),
                (l = i.size),
                (u = Ca(i)),
                (c = i.cts),
                p.set(
                  [
                    (o >>> 24) & 255,
                    (o >>> 16) & 255,
                    (o >>> 8) & 255,
                    255 & o,
                    (l >>> 24) & 255,
                    (l >>> 16) & 255,
                    (l >>> 8) & 255,
                    255 & l,
                    (u.isLeading << 2) | u.dependsOn,
                    (u.isDependedOn << 6) |
                      (u.hasRedundancy << 4) |
                      (u.paddingValue << 1) |
                      u.isNonSync,
                    61440 & u.degradPrio,
                    15 & u.degradPrio,
                    (c >>> 24) & 255,
                    (c >>> 16) & 255,
                    (c >>> 8) & 255,
                    255 & c,
                  ],
                  12 + 16 * r
                );
            return t.box(t.types.trun, p);
          },
        },
        {
          key: "initSegment",
          value: function (e) {
            t.types || t.init();
            var n = t.moov(e);
            return dm(t.FTYP, n);
          },
        },
        {
          key: "hvc1",
          value: function (e) {
            for (
              var n = e.params,
                r = [e.vps, e.sps, e.pps],
                i = new Uint8Array([
                  1,
                  (n.general_profile_space << 6) |
                    (n.general_tier_flag ? 32 : 0) |
                    n.general_profile_idc,
                  n.general_profile_compatibility_flags[0],
                  n.general_profile_compatibility_flags[1],
                  n.general_profile_compatibility_flags[2],
                  n.general_profile_compatibility_flags[3],
                  n.general_constraint_indicator_flags[0],
                  n.general_constraint_indicator_flags[1],
                  n.general_constraint_indicator_flags[2],
                  n.general_constraint_indicator_flags[3],
                  n.general_constraint_indicator_flags[4],
                  n.general_constraint_indicator_flags[5],
                  n.general_level_idc,
                  240 | (n.min_spatial_segmentation_idc >> 8),
                  255 & n.min_spatial_segmentation_idc,
                  252 | n.parallelismType,
                  252 | n.chroma_format_idc,
                  248 | n.bit_depth_luma_minus8,
                  248 | n.bit_depth_chroma_minus8,
                  0,
                  _i(n.frame_rate.fps),
                  3 |
                    (n.temporal_id_nested << 2) |
                    (n.num_temporal_layers << 3) |
                    (n.frame_rate.fixed ? 64 : 0),
                  r.length,
                ]),
                o = i.length,
                l = 0;
              l < r.length;
              l += 1
            ) {
              o += 3;
              for (var u = 0; u < r[l].length; u += 1) o += 2 + r[l][u].length;
            }
            var c = new Uint8Array(o);
            c.set(i, 0), (o = i.length);
            for (var d = r.length - 1, h = 0; h < r.length; h += 1) {
              c.set(
                new Uint8Array([
                  (32 + h) | (h === d ? 128 : 0),
                  0,
                  r[h].length,
                ]),
                o
              ),
                (o += 3);
              for (var f = 0; f < r[h].length; f += 1)
                c.set(
                  new Uint8Array([r[h][f].length >> 8, 255 & r[h][f].length]),
                  o
                ),
                  (o += 2),
                  c.set(r[h][f], o),
                  (o += r[h][f].length);
            }
            var p = t.box(t.types.hvcC, c),
              g = e.width,
              y = e.height,
              v = e.pixelRatio[0],
              b = e.pixelRatio[1];
            return t.box(
              t.types.hvc1,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (g >> 8) & 255,
                255 & g,
                (y >> 8) & 255,
                255 & y,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                18,
                100,
                97,
                105,
                108,
                121,
                109,
                111,
                116,
                105,
                111,
                110,
                47,
                104,
                108,
                115,
                46,
                106,
                115,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              p,
              t.box(
                t.types.btrt,
                new Uint8Array([
                  0, 28, 156, 128, 0, 45, 198, 192, 0, 45, 198, 192,
                ])
              ),
              t.box(
                t.types.pasp,
                new Uint8Array([
                  v >> 24,
                  (v >> 16) & 255,
                  (v >> 8) & 255,
                  255 & v,
                  b >> 24,
                  (b >> 16) & 255,
                  (b >> 8) & 255,
                  255 & b,
                ])
              )
            );
          },
        },
      ]),
      t
    );
  })();
(Sd.types = void 0),
  (Sd.HDLR_TYPES = void 0),
  (Sd.STTS = void 0),
  (Sd.STSC = void 0),
  (Sd.STCO = void 0),
  (Sd.STSZ = void 0),
  (Sd.VMHD = void 0),
  (Sd.SMHD = void 0),
  (Sd.STSD = void 0),
  (Sd.FTYP = void 0),
  (Sd.DINF = void 0);
var P9e = 9e4;
function ule(t, e) {
  var n =
    t *
    e *
    (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1);
  return arguments.length > 3 && arguments[3] !== void 0 && arguments[3]
    ? Math.round(n)
    : n;
}
function e7t(t, e) {
  return ule(
    t,
    e,
    1 / (arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1),
    arguments.length > 3 && arguments[3] !== void 0 && arguments[3]
  );
}
function tM(t) {
  return ule(
    t,
    1e3,
    1 / P9e,
    arguments.length > 1 && arguments[1] !== void 0 && arguments[1]
  );
}
function t7t(t) {
  return ule(
    t,
    P9e,
    1 / (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1)
  );
}
var n7t = 1e4,
  r7t = 1024,
  i7t = 1152,
  a7t = 1536,
  NA = null,
  VV = null,
  RF = (function () {
    function t(e, n, r, i) {
      if (
        (Wn(this, t),
        (this.logger = void 0),
        (this.observer = void 0),
        (this.config = void 0),
        (this.typeSupported = void 0),
        (this.ISGenerated = !1),
        (this._initPTS = null),
        (this._initDTS = null),
        (this.nextAvcDts = null),
        (this.nextAudioPts = null),
        (this.videoSampleDuration = null),
        (this.isAudioContiguous = !1),
        (this.isVideoContiguous = !1),
        (this.videoTrackConfig = void 0),
        (this.observer = e),
        (this.config = n),
        (this.typeSupported = r),
        (this.logger = i),
        (this.ISGenerated = !1),
        NA === null)
      ) {
        var o = (navigator.userAgent || "").match(/Chrome\/(\d+)/i);
        NA = o ? _i(o[1]) : 0;
      }
      if (VV === null) {
        var l = navigator.userAgent.match(/Safari\/(\d+)/i);
        VV = l ? _i(l[1]) : 0;
      }
    }
    return (
      Kn(t, [
        {
          key: "destroy",
          value: function () {
            this.config =
              this.videoTrackConfig =
              this._initPTS =
              this._initDTS =
                null;
          },
        },
        {
          key: "resetTimeStamp",
          value: function (e) {
            this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),
              (this._initPTS = this._initDTS = e);
          },
        },
        {
          key: "resetNextTimestamp",
          value: function () {
            this.logger.log("[mp4-remuxer]: reset next timestamp"),
              (this.isVideoContiguous = !1),
              (this.isAudioContiguous = !1);
          },
        },
        {
          key: "resetInitSegment",
          value: function () {
            this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),
              (this.ISGenerated = !1),
              (this.videoTrackConfig = void 0);
          },
        },
        {
          key: "getVideoStartPts",
          value: function (e) {
            var n = !1,
              r = e[0].pts,
              i = ga(e).call(
                e,
                function (o, l) {
                  var u = l.pts,
                    c = u - o;
                  return (
                    c < -4294967296 && ((n = !0), (c = (u = Wg(u, r)) - o)),
                    c > 0 ? o : u
                  );
                },
                r
              );
            return n && this.logger.debug("PTS rollover detected"), i;
          },
        },
        {
          key: "remux",
          value: function (e, n, r, i, o, l, u, c) {
            var d,
              h,
              f,
              p,
              g,
              y,
              v = o,
              b = o,
              w = e.pid > -1,
              k = n.pid > -1,
              D = n.samples.length,
              $ = e.samples.length > 0,
              N = (u && D > 0) || D > 1;
            if (((!w || $) && (!k || N)) || this.ISGenerated || u) {
              if (this.ISGenerated) {
                var P,
                  I,
                  O,
                  X,
                  G = this.videoTrackConfig;
                ((G &&
                  (n.width !== G.width ||
                    n.height !== G.height ||
                    ((P = n.pixelRatio) == null ? void 0 : P[0]) !==
                      ((I = G.pixelRatio) == null ? void 0 : I[0]) ||
                    ((O = n.pixelRatio) == null ? void 0 : O[1]) !==
                      ((X = G.pixelRatio) == null ? void 0 : X[1]))) ||
                  (!G && N) ||
                  (this.nextAudioPts === null && $)) &&
                  this.resetInitSegment();
              }
              this.ISGenerated || (f = this.generateIS(e, n, o, l));
              var H,
                E = this.isVideoContiguous,
                S = -1;
              if (
                N &&
                ((S = o7t(n.samples)),
                !E && this.config.forceKeyFrameOnDiscontinuity)
              )
                if (((y = !0), S > 0)) {
                  var L, W;
                  this.logger.warn(
                    Ce(
                      (L = "[mp4-remuxer]: Dropped ".concat(S, " out of "))
                    ).call(L, D, " video samples due to a missing keyframe")
                  );
                  var F = this.getVideoStartPts(n.samples);
                  (n.samples = jn((W = n.samples)).call(W, S)),
                    (n.dropped += S),
                    (H = b += (n.samples[0].pts - F) / n.inputTimeScale);
                } else
                  S === -1 &&
                    (this.logger.warn(
                      "[mp4-remuxer]: No keyframe found out of ".concat(
                        D,
                        " video samples"
                      )
                    ),
                    (y = !1));
              if (this.ISGenerated) {
                if ($ && N) {
                  var oe = this.getVideoStartPts(n.samples),
                    De = (Wg(e.samples[0].pts, oe) - oe) / n.inputTimeScale;
                  (v += Math.max(0, De)), (b += Math.max(0, -De));
                }
                if ($) {
                  if (
                    (e.samplerate ||
                      (this.logger.warn(
                        "[mp4-remuxer]: regenerate InitSegment as audio detected"
                      ),
                      (f = this.generateIS(e, n, o, l))),
                    (h = this.remuxAudio(
                      e,
                      v,
                      this.isAudioContiguous,
                      l,
                      k || N || c === wo.AUDIO ? b : void 0
                    )),
                    N)
                  ) {
                    var Xe = h ? h.endPTS - h.startPTS : 0;
                    n.inputTimeScale ||
                      (this.logger.warn(
                        "[mp4-remuxer]: regenerate InitSegment as video detected"
                      ),
                      (f = this.generateIS(e, n, o, l))),
                      (d = this.remuxVideo(n, b, E, Xe));
                  }
                } else N && (d = this.remuxVideo(n, b, E, 0));
                d &&
                  ((d.firstKeyFrame = S),
                  (d.independent = S !== -1),
                  (d.firstKeyFramePTS = H));
              }
            }
            return (
              this.ISGenerated &&
                this._initPTS &&
                this._initDTS &&
                (r.samples.length &&
                  (g = M9e(r, o, this._initPTS, this._initDTS)),
                i.samples.length && (p = C9e(i, o, this._initPTS))),
              {
                audio: h,
                video: d,
                initSegment: f,
                independent: y,
                text: p,
                id3: g,
              }
            );
          },
        },
        {
          key: "generateIS",
          value: function (e, n, r, i) {
            var o,
              l,
              u,
              c = e.samples,
              d = n.samples,
              h = this.typeSupported,
              f = {},
              p = this._initPTS,
              g = !p || i,
              y = "audio/mp4";
            if ((g && (o = l = 1 / 0), e.config && c.length)) {
              switch (((e.timescale = e.samplerate), e.segmentCodec)) {
                case "mp3":
                  h.mpeg
                    ? ((y = "audio/mpeg"), (e.codec = ""))
                    : h.mp3 && (e.codec = "mp3");
                  break;
                case "ac3":
                  e.codec = "ac-3";
              }
              (f.audio = {
                id: "audio",
                container: y,
                codec: e.codec,
                initSegment:
                  e.segmentCodec === "mp3" && h.mpeg
                    ? new Uint8Array(0)
                    : Sd.initSegment([e]),
                metadata: { channelCount: e.channelCount },
              }),
                g &&
                  ((u = e.inputTimeScale),
                  p && u === p.timescale
                    ? (g = !1)
                    : (o = l = c[0].pts - Math.round(u * r)));
            }
            if (n.sps && n.pps && d.length) {
              if (
                ((n.timescale = n.inputTimeScale),
                (f.video = {
                  id: "main",
                  container: "video/mp4",
                  codec: n.codec,
                  initSegment: Sd.initSegment([n]),
                  metadata: { width: n.width, height: n.height },
                }),
                g)
              )
                if (((u = n.inputTimeScale), p && u === p.timescale)) g = !1;
                else {
                  var v = this.getVideoStartPts(d),
                    b = Math.round(u * r);
                  (l = Math.min(l, Wg(d[0].dts, v) - b)),
                    (o = Math.min(o, v - b));
                }
              this.videoTrackConfig = {
                width: n.width,
                height: n.height,
                pixelRatio: n.pixelRatio,
              };
            }
            if (Dn(f).length)
              return (
                (this.ISGenerated = !0),
                g
                  ? ((this._initPTS = { baseTime: o, timescale: u }),
                    (this._initDTS = { baseTime: l, timescale: u }))
                  : (o = u = void 0),
                { tracks: f, initPTS: o, timescale: u }
              );
          },
        },
        {
          key: "remuxVideo",
          value: function (e, n, r, i) {
            var o,
              l,
              u = e.inputTimeScale,
              c = e.samples,
              d = [],
              h = c.length,
              f = this._initPTS,
              p = this.nextAvcDts,
              g = 8,
              y = this.videoSampleDuration,
              v = Number.POSITIVE_INFINITY,
              b = Number.NEGATIVE_INFINITY,
              w = !1;
            if (!r || p === null) {
              var k = n * u,
                D = c[0].pts - Wg(c[0].dts, c[0].pts);
              NA && p !== null && Math.abs(k - D - p) < 15e3
                ? (r = !0)
                : (p = k - D);
            }
            for (var $ = (f.baseTime * u) / f.timescale, N = 0; N < h; N++) {
              var P = c[N];
              (P.pts = Wg(P.pts - $, p)),
                (P.dts = Wg(P.dts - $, p)),
                P.dts < c[N > 0 ? N - 1 : N].dts && (w = !0);
            }
            w &&
              mm(c).call(c, function (yr, T) {
                var Jn = yr.dts - T.dts,
                  pr = yr.pts - T.pts;
                return Jn || pr;
              }),
              (o = c[0].dts);
            var I = (l = c[c.length - 1].dts) - o,
              O = I ? Math.round(I / (h - 1)) : y || e.inputTimeScale / 30;
            if (r) {
              var X = o - p,
                G = X > O,
                H = X < -1;
              if (G || H) {
                var E, S, L, W, F, oe;
                if (
                  (G
                    ? this.logger.warn(
                        Ce(
                          (E = Ce(
                            (S = Ce(
                              (L = "".concat(
                                (e.segmentCodec || "").toUpperCase(),
                                ": "
                              ))
                            ).call(L, tM(X, !0), " ms ("))
                          ).call(
                            S,
                            X,
                            "dts) hole between fragments detected at "
                          ))
                        ).call(E, n.toFixed(3))
                      )
                    : this.logger.warn(
                        Ce(
                          (W = Ce(
                            (F = Ce(
                              (oe = "".concat(
                                (e.segmentCodec || "").toUpperCase(),
                                ": "
                              ))
                            ).call(oe, tM(-X, !0), " ms ("))
                          ).call(
                            F,
                            X,
                            "dts) overlapping between fragments detected at "
                          ))
                        ).call(W, n.toFixed(3))
                      ),
                  !H || p >= c[0].pts || NA)
                ) {
                  var De, Xe;
                  o = p;
                  var ze = c[0].pts - X;
                  if (G) (c[0].dts = o), (c[0].pts = ze);
                  else
                    for (
                      var ht = !0, gt = 0;
                      gt < c.length && !(c[gt].dts > ze && ht);
                      gt++
                    ) {
                      var pt = c[gt].pts;
                      if (
                        ((c[gt].dts -= X), (c[gt].pts -= X), gt < c.length - 1)
                      ) {
                        var $t = c[gt + 1].pts;
                        ht = $t <= c[gt].pts == $t <= pt;
                      }
                    }
                  this.logger.log(
                    Ce(
                      (De = Ce(
                        (Xe = "Video: Initial PTS/DTS adjusted: ".concat(
                          tM(ze, !0),
                          "/"
                        ))
                      ).call(Xe, tM(o, !0), ", delta: "))
                    ).call(De, tM(X, !0), " ms")
                  );
                }
              }
            }
            for (
              var ot = 0, tt = 0, He = (o = Math.max(0, o)), de = 0;
              de < h;
              de++
            ) {
              for (
                var ue = c[de], Z = ue.units, ie = Z.length, Ne = 0, Pe = 0;
                Pe < ie;
                Pe++
              )
                Ne += Z[Pe].data.length;
              (tt += Ne),
                (ot += ie),
                (ue.length = Ne),
                ue.dts < He
                  ? ((ue.dts = He), (He += (O / 4) | 0 || 1))
                  : (He = ue.dts),
                (v = Math.min(ue.pts, v)),
                (b = Math.max(ue.pts, b));
            }
            l = c[h - 1].dts;
            var kt,
              Gt = tt + 4 * ot + 8;
            try {
              kt = new Uint8Array(Gt);
            } catch (yr) {
              return void this.observer.emit(_t.ERROR, _t.ERROR, {
                type: no.MUX_ERROR,
                details: kr.REMUX_ALLOC_ERROR,
                fatal: !1,
                error: yr,
                bytes: Gt,
                reason: "fail allocating video mdat ".concat(Gt),
              });
            }
            var B = new DataView(kt.buffer);
            B.setUint32(0, Gt), kt.set(Sd.types.mdat, 4);
            for (
              var re = !1,
                Ae = Number.POSITIVE_INFINITY,
                lt = Number.POSITIVE_INFINITY,
                Et = Number.NEGATIVE_INFINITY,
                St = Number.NEGATIVE_INFINITY,
                Lt = 0;
              Lt < h;
              Lt++
            ) {
              for (
                var ln = c[Lt], Ln = ln.units, Tr = 0, sr = 0, hi = Ln.length;
                sr < hi;
                sr++
              ) {
                var Ra = Ln[sr],
                  En = Ra.data,
                  Zn = Ra.data.byteLength;
                B.setUint32(g, Zn),
                  (g += 4),
                  kt.set(En, g),
                  (g += Zn),
                  (Tr += 4 + Zn);
              }
              var on = void 0;
              if (Lt < h - 1)
                (y = c[Lt + 1].dts - ln.dts), (on = c[Lt + 1].pts - ln.pts);
              else {
                var rn = this.config,
                  It = Lt > 0 ? ln.dts - c[Lt - 1].dts : O;
                if (
                  ((on = Lt > 0 ? ln.pts - c[Lt - 1].pts : O),
                  rn.stretchShortVideoTrack && this.nextAudioPts !== null)
                ) {
                  var wt,
                    Mt = Math.floor(rn.maxBufferHole * u),
                    Wt = (i ? v + i * u : this.nextAudioPts) - ln.pts;
                  Wt > Mt
                    ? ((y = Wt - It) < 0 ? (y = It) : (re = !0),
                      this.logger.log(
                        Ce(
                          (wt = "[mp4-remuxer]: It is approximately ".concat(
                            Wt / 90,
                            " ms to the next segment; using duration "
                          ))
                        ).call(wt, y / 90, " ms for the last video frame.")
                      ))
                    : (y = It);
                } else y = It;
              }
              var Ft = Math.round(ln.pts - ln.dts);
              (Ae = Math.min(Ae, y)),
                (Et = Math.max(Et, y)),
                (lt = Math.min(lt, on)),
                (St = Math.max(St, on)),
                d.push(new a1e(ln.key, y, Tr, Ft));
            }
            if (d.length) {
              if (NA) {
                if (NA < 70) {
                  var un = Ca(d[0]);
                  (un.dependsOn = 2), (un.isNonSync = 0);
                }
              } else if (
                VV &&
                St - lt < Et - Ae &&
                O / Et < 0.025 &&
                d[0].cts === 0
              ) {
                this.logger.warn(
                  "Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration."
                );
                for (var Yt = o, Qt = 0, Sn = d.length; Qt < Sn; Qt++) {
                  var ar = Yt + d[Qt].duration,
                    ye = Yt + d[Qt].cts;
                  if (Qt < Sn - 1) {
                    var Gn = ar + d[Qt + 1].cts;
                    d[Qt].duration = Gn - ye;
                  } else d[Qt].duration = Qt ? d[Qt - 1].duration : O;
                  (d[Qt].cts = 0), (Yt = ar);
                }
              }
            }
            (y = re || !y ? O : y),
              (this.nextAvcDts = p = l + y),
              (this.videoSampleDuration = y),
              (this.isVideoContiguous = !0);
            var Ht = {
              data1: Sd.moof(e.sequenceNumber++, o, cu({}, e, { samples: d })),
              data2: kt,
              startPTS: v / u,
              endPTS: (b + y) / u,
              startDTS: o / u,
              endDTS: p / u,
              type: "video",
              hasAudio: !1,
              hasVideo: !0,
              nb: d.length,
              dropped: e.dropped,
            };
            return (e.samples = []), (e.dropped = 0), Ht;
          },
        },
        {
          key: "getSamplesPerFrame",
          value: function (e) {
            switch (e.segmentCodec) {
              case "mp3":
                return i7t;
              case "ac3":
                return a7t;
              default:
                return r7t;
            }
          },
        },
        {
          key: "remuxAudio",
          value: function (e, n, r, i, o) {
            var l = e.inputTimeScale,
              u = l / (e.samplerate ? e.samplerate : l),
              c = this.getSamplesPerFrame(e),
              d = c * u,
              h = this._initPTS,
              f = e.segmentCodec === "mp3" && this.typeSupported.mpeg,
              p = [],
              g = o !== void 0,
              y = e.samples,
              v = f ? 0 : 8,
              b = this.nextAudioPts || -1,
              w = n * l,
              k = (h.baseTime * l) / h.timescale;
            if (
              ((this.isAudioContiguous = r =
                r ||
                (y.length &&
                  b > 0 &&
                  ((i && Math.abs(w - b) < 9e3) ||
                    Math.abs(Wg(y[0].pts - k, w) - b) < 20 * d))),
              y.forEach(function (kt) {
                kt.pts = Wg(kt.pts - k, w);
              }),
              !r || b < 0)
            ) {
              if (
                !(y = _r(y).call(y, function (kt) {
                  return kt.pts >= 0;
                })).length
              )
                return;
              b = o === 0 ? 0 : i && !g ? Math.max(0, w) : y[0].pts;
            }
            if (e.segmentCodec === "aac")
              for (
                var D = this.config.maxAudioFramesDrift, $ = 0, N = b;
                $ < y.length;
                $++
              ) {
                var P,
                  I = y[$],
                  O = I.pts,
                  X = O - N,
                  G = Math.abs((1e3 * X) / l);
                if (X <= -D * d && g)
                  $ === 0 &&
                    (this.logger.warn(
                      Ce(
                        (P = "Audio frame @ ".concat(
                          (O / l).toFixed(3),
                          "s overlaps nextAudioPts by "
                        ))
                      ).call(P, Math.round((1e3 * X) / l), " ms.")
                    ),
                    (this.nextAudioPts = b = N = O));
                else if (X >= D * d && G < n7t && g) {
                  var H,
                    E,
                    S = Math.round(X / d);
                  (N = O - S * d) < 0 && (S--, (N += d)),
                    $ === 0 && (this.nextAudioPts = b = N),
                    this.logger.warn(
                      Ce(
                        (H = Ce(
                          (E = "[mp4-remuxer]: Injecting ".concat(
                            S,
                            " audio frame @ "
                          ))
                        ).call(E, (N / l).toFixed(3), "s due to "))
                      ).call(H, Math.round((1e3 * X) / l), " ms gap.")
                    );
                  for (var L = 0; L < S; L++) {
                    var W = Math.max(N, 0),
                      F = qHt.getSilentFrame(
                        e.parsedCodec || e.manifestCodec || e.codec,
                        e.channelCount
                      );
                    F ||
                      (this.logger.log(
                        "[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."
                      ),
                      (F = I.unit.subarray())),
                      tl(y).call(y, $, 0, { unit: F, pts: W }),
                      (N += d),
                      $++;
                  }
                }
                (I.pts = N), (N += d);
              }
            for (var oe, De = null, Xe = null, ze = 0, ht = y.length; ht--; )
              ze += y[ht].unit.byteLength;
            for (var gt = 0, pt = y.length; gt < pt; gt++) {
              var $t = y[gt],
                ot = $t.unit,
                tt = $t.pts;
              if (Xe !== null) p[gt - 1].duration = Math.round((tt - Xe) / u);
              else {
                if (
                  (r && e.segmentCodec === "aac" && (tt = b),
                  (De = tt),
                  !(ze > 0))
                )
                  return;
                ze += v;
                try {
                  oe = new Uint8Array(ze);
                } catch (kt) {
                  return void this.observer.emit(_t.ERROR, _t.ERROR, {
                    type: no.MUX_ERROR,
                    details: kr.REMUX_ALLOC_ERROR,
                    fatal: !1,
                    error: kt,
                    bytes: ze,
                    reason: "fail allocating audio mdat ".concat(ze),
                  });
                }
                f ||
                  (new DataView(oe.buffer).setUint32(0, ze),
                  oe.set(Sd.types.mdat, 4));
              }
              oe.set(ot, v);
              var He = ot.byteLength;
              (v += He), p.push(new a1e(!0, c, He, 0)), (Xe = tt);
            }
            var de = p.length;
            if (de) {
              var ue = p[p.length - 1];
              this.nextAudioPts = b = Xe + u * ue.duration;
              var Z = f
                ? new Uint8Array(0)
                : Sd.moof(
                    e.sequenceNumber++,
                    De / u,
                    cu({}, e, { samples: p })
                  );
              e.samples = [];
              var ie = De / l,
                Ne = b / l,
                Pe = {
                  data1: Z,
                  data2: oe,
                  startPTS: ie,
                  endPTS: Ne,
                  startDTS: ie,
                  endDTS: Ne,
                  type: "audio",
                  hasAudio: !0,
                  hasVideo: !1,
                  nb: de,
                };
              return (this.isAudioContiguous = !0), Pe;
            }
          },
        },
      ]),
      t
    );
  })();
function Wg(t, e) {
  var n;
  if (e === null) return t;
  for (n = e < t ? -8589934592 : 8589934592; Math.abs(t - e) > 4294967296; )
    t += n;
  return t;
}
function o7t(t) {
  for (var e = 0; e < t.length; e++) if (t[e].key) return e;
  return -1;
}
function M9e(t, e, n, r) {
  var i = t.samples.length;
  if (i) {
    for (var o = t.inputTimeScale, l = 0; l < i; l++) {
      var u = t.samples[l];
      (u.pts = Wg(u.pts - (n.baseTime * o) / n.timescale, e * o) / o),
        (u.dts = Wg(u.dts - (r.baseTime * o) / r.timescale, e * o) / o);
    }
    var c = t.samples;
    return (t.samples = []), { samples: c };
  }
}
function C9e(t, e, n) {
  var r,
    i = t.samples.length;
  if (i) {
    for (var o = t.inputTimeScale, l = 0; l < i; l++) {
      var u = t.samples[l];
      u.pts = Wg(u.pts - (n.baseTime * o) / n.timescale, e * o) / o;
    }
    mm((r = t.samples)).call(r, function (d, h) {
      return d.pts - h.pts;
    });
    var c = t.samples;
    return (t.samples = []), { samples: c };
  }
}
var b1,
  a1e = Kn(function t(e, n, r, i) {
    Wn(this, t),
      (this.size = void 0),
      (this.duration = void 0),
      (this.cts = void 0),
      (this.flags = void 0),
      (this.duration = n),
      (this.size = r),
      (this.cts = i),
      (this.flags = {
        isLeading: 0,
        isDependedOn: 0,
        hasRedundancy: 0,
        degradPrio: 0,
        dependsOn: e ? 2 : 1,
        isNonSync: e ? 0 : 1,
      });
  }),
  s7t = (function () {
    function t(e, n, r, i) {
      Wn(this, t),
        (this.logger = void 0),
        (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.logger = i);
    }
    return (
      Kn(t, [
        { key: "destroy", value: function () {} },
        {
          key: "resetTimeStamp",
          value: function (e) {
            (this.initPTS = e), (this.lastEndTime = null);
          },
        },
        {
          key: "resetNextTimestamp",
          value: function () {
            this.lastEndTime = null;
          },
        },
        {
          key: "resetInitSegment",
          value: function (e, n, r, i) {
            (this.audioCodec = n),
              (this.videoCodec = r),
              this.generateInitSegment(EBt(e, i)),
              (this.emitInitSegment = !0);
          },
        },
        {
          key: "generateInitSegment",
          value: function (e) {
            var n = this.audioCodec,
              r = this.videoCodec;
            if (e == null || !e.byteLength)
              return (this.initTracks = void 0), void (this.initData = void 0);
            var i = (this.initData = n9e(e));
            i.audio && (n = o1e(i.audio, nh.AUDIO)),
              i.video && (r = o1e(i.video, nh.VIDEO));
            var o = {};
            i.audio && i.video
              ? (o.audiovideo = {
                  container: "video/mp4",
                  codec: n + "," + r,
                  initSegment: e,
                  id: "main",
                })
              : i.audio
              ? (o.audio = {
                  container: "audio/mp4",
                  codec: n,
                  initSegment: e,
                  id: "audio",
                })
              : i.video
              ? (o.video = {
                  container: "video/mp4",
                  codec: r,
                  initSegment: e,
                  id: "main",
                })
              : this.logger.warn(
                  "[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."
                ),
              (this.initTracks = o);
          },
        },
        {
          key: "remux",
          value: function (e, n, r, i, o, l) {
            var u,
              c,
              d = this.initPTS,
              h = this.lastEndTime,
              f = {
                audio: void 0,
                video: void 0,
                text: i,
                id3: r,
                initSegment: void 0,
              };
            _a(h) || (h = this.lastEndTime = o || 0);
            var p = n.samples;
            if (p == null || !p.length) return f;
            var g = { initPTS: void 0, timescale: 1 },
              y = this.initData;
            if (
              (((u = y) != null && u.length) ||
                (this.generateInitSegment(p), (y = this.initData)),
              (c = y) == null || !c.length)
            )
              return (
                this.logger.warn(
                  "[passthrough-remuxer.ts]: Failed to generate initSegment."
                ),
                f
              );
            this.emitInitSegment &&
              ((g.tracks = this.initTracks), (this.emitInitSegment = !1));
            var v = RBt(p, y),
              b = SBt(y, p),
              w = b === null ? o : b;
            if (l7t(d, w, o, v) || (g.timescale !== d.timescale && l)) {
              var k, D;
              (g.initPTS = w - o),
                d &&
                  d.timescale === 1 &&
                  this.logger.warn(
                    Ce(
                      (k = Ce(
                        (D = "Adjusting initPTS @".concat(o, " from "))
                      ).call(D, d.baseTime / d.timescale, " to "))
                    ).call(k, g.initPTS)
                  ),
                (this.initPTS = d = { baseTime: g.initPTS, timescale: 1 });
            }
            var $ = e ? w - d.baseTime / d.timescale : h,
              N = $ + v;
            wBt(y, p, d.baseTime / d.timescale),
              v > 0
                ? (this.lastEndTime = N)
                : (this.logger.warn(
                    "Duration parsed from mp4 should be greater than zero"
                  ),
                  this.resetNextTimestamp());
            var P = !!y.audio,
              I = !!y.video,
              O = "";
            P && (O += "audio"), I && (O += "video");
            var X = {
              data1: p,
              startPTS: $,
              startDTS: $,
              endPTS: N,
              endDTS: N,
              type: O,
              hasAudio: P,
              hasVideo: I,
              nb: 1,
              dropped: 0,
            };
            return (
              (f.audio = X.type === "audio" ? X : void 0),
              (f.video = X.type !== "audio" ? X : void 0),
              (f.initSegment = g),
              (f.id3 = M9e(r, o, d, d)),
              i.samples.length && (f.text = C9e(i, o, d)),
              f
            );
          },
        },
      ]),
      t
    );
  })();
function l7t(t, e, n, r) {
  if (t === null) return !0;
  var i = Math.max(r, 1),
    o = e - t.baseTime / t.timescale;
  return Math.abs(o - n) > i;
}
function o1e(t, e) {
  var n = t == null ? void 0 : t.codec;
  return n && n.length > 4
    ? n
    : e === nh.AUDIO
    ? n === "ec-3" || n === "ac-3" || n === "alac"
      ? n
      : n === "fLaC" || n === "Opus"
      ? Xee(n, !1)
      : (Is.warn('Unhandled audio codec "'.concat(n, '" in mp4 MAP')),
        n || "mp4a")
    : (Is.warn('Unhandled video codec "'.concat(n, '" in mp4 MAP')),
      n || "avc1");
}
try {
  b1 = self.performance.now.bind(self.performance);
} catch {
  b1 = Date.now;
}
var QC = [
  { demux: KHt, remux: s7t },
  { demux: YHt, remux: RF },
  { demux: VHt, remux: RF },
  { demux: jHt, remux: RF },
];
tl(QC).call(QC, 2, 0, { demux: zHt, remux: RF });
var s1e = (function () {
  function t(e, n, r, i, o, l) {
    Wn(this, t),
      (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 = n),
      (this.config = r),
      (this.id = o),
      (this.logger = l);
  }
  return (
    Kn(t, [
      {
        key: "configure",
        value: function (e) {
          (this.transmuxConfig = e), this.decrypter && this.decrypter.reset();
        },
      },
      {
        key: "push",
        value: function (e, n, r, i) {
          var o = this,
            l = r.transmuxing;
          l.executeStart = b1();
          var u = new Uint8Array(e),
            c = this.currentTransmuxState,
            d = this.transmuxConfig;
          i && (this.currentTransmuxState = i);
          var h = i || c,
            f = h.contiguous,
            p = h.discontinuity,
            g = h.trackSwitch,
            y = h.accurateTimeOffset,
            v = h.timeOffset,
            b = h.initSegmentChange,
            w = d.audioCodec,
            k = d.videoCodec,
            D = d.defaultInitPts,
            $ = d.duration,
            N = d.initSegmentData,
            P = u7t(u, n);
          if (P && Qk(P.method)) {
            var I = this.getDecrypter(),
              O = nle(P.method);
            if (!I.isSync())
              return (
                (this.asyncResult = !0),
                (this.decryptionPromise = I.webCryptoDecrypt(
                  u,
                  P.key.buffer,
                  P.iv.buffer,
                  O
                ).then(function (W) {
                  var F = o.push(W, null, r);
                  return (o.decryptionPromise = null), F;
                })),
                this.decryptionPromise
              );
            var X = I.softwareDecrypt(u, P.key.buffer, P.iv.buffer, O);
            if (r.part > -1) {
              var G = I.flush();
              X = G && G.buffer;
            }
            if (!X) return (l.executeEnd = b1()), zV(r);
            u = new Uint8Array(X);
          }
          var H = this.needsProbing(p, g);
          if (H) {
            var E = this.configureTransmuxer(u);
            if (E)
              return (
                this.logger.warn("[transmuxer] ".concat(E.message)),
                this.observer.emit(_t.ERROR, _t.ERROR, {
                  type: no.MEDIA_ERROR,
                  details: kr.FRAG_PARSING_ERROR,
                  fatal: !1,
                  error: E,
                  reason: E.message,
                }),
                (l.executeEnd = b1()),
                zV(r)
              );
          }
          (p || g || b || H) && this.resetInitSegment(N, w, k, $, n),
            (p || b || H) && this.resetInitialTimestamp(D),
            f || this.resetContiguity();
          var S = this.transmux(u, P, v, y, r);
          this.asyncResult = AU(S);
          var L = this.currentTransmuxState;
          return (
            (L.contiguous = !0),
            (L.discontinuity = !1),
            (L.trackSwitch = !1),
            (l.executeEnd = b1()),
            S
          );
        },
      },
      {
        key: "flush",
        value: function (e) {
          var n = this,
            r = e.transmuxing;
          r.executeStart = b1();
          var i = this.decrypter,
            o = this.currentTransmuxState,
            l = this.decryptionPromise;
          if (l)
            return (
              (this.asyncResult = !0),
              l.then(function () {
                return n.flush(e);
              })
            );
          var u = [],
            c = o.timeOffset;
          if (i) {
            var d = i.flush();
            d && u.push(this.push(d.buffer, null, e));
          }
          var h = this.demuxer,
            f = this.remuxer;
          if (!h || !f) {
            r.executeEnd = b1();
            var p = [zV(e)];
            return this.asyncResult ? Ar.resolve(p) : p;
          }
          var g = h.flush(c);
          return AU(g)
            ? ((this.asyncResult = !0),
              g.then(function (y) {
                return n.flushRemux(u, y, e), u;
              }))
            : (this.flushRemux(u, g, e), this.asyncResult ? Ar.resolve(u) : u);
        },
      },
      {
        key: "flushRemux",
        value: function (e, n, r) {
          var i,
            o,
            l,
            u,
            c = n.audioTrack,
            d = n.videoTrack,
            h = n.id3Track,
            f = n.textTrack,
            p = this.currentTransmuxState,
            g = p.accurateTimeOffset,
            y = p.timeOffset;
          this.logger.log(
            Ce(
              (i = Ce(
                (o = Ce(
                  (l = Ce(
                    (u = "[transmuxer.ts]: Flushed ".concat(this.id, " sn: "))
                  ).call(u, r.sn))
                ).call(l, r.part > -1 ? " part: " + r.part : "", " of "))
              ).call(o, this.id === wo.MAIN ? "level" : "track", " "))
            ).call(i, r.level)
          );
          var v = this.remuxer.remux(c, d, h, f, y, g, !0, this.id);
          e.push({ remuxResult: v, chunkMeta: r }),
            (r.transmuxing.executeEnd = b1());
        },
      },
      {
        key: "resetInitialTimestamp",
        value: function (e) {
          var n = this.demuxer,
            r = this.remuxer;
          n && r && (n.resetTimeStamp(e), r.resetTimeStamp(e));
        },
      },
      {
        key: "resetContiguity",
        value: function () {
          var e = this.demuxer,
            n = this.remuxer;
          e && n && (e.resetContiguity(), n.resetNextTimestamp());
        },
      },
      {
        key: "resetInitSegment",
        value: function (e, n, r, i, o) {
          var l = this.demuxer,
            u = this.remuxer;
          l &&
            u &&
            (l.resetInitSegment(e, n, r, i), u.resetInitSegment(e, n, r, o));
        },
      },
      {
        key: "destroy",
        value: function () {
          this.demuxer && (this.demuxer.destroy(), (this.demuxer = void 0)),
            this.remuxer && (this.remuxer.destroy(), (this.remuxer = void 0));
        },
      },
      {
        key: "transmux",
        value: function (e, n, r, i, o) {
          return n && n.method === "SAMPLE-AES"
            ? this.transmuxSampleAes(e, n, r, i, o)
            : this.transmuxUnencrypted(e, r, i, o);
        },
      },
      {
        key: "transmuxUnencrypted",
        value: function (e, n, r, i) {
          var o = this.demuxer.demux(e, n, !1, !this.config.progressive),
            l = o.audioTrack,
            u = o.videoTrack,
            c = o.id3Track,
            d = o.textTrack;
          return {
            remuxResult: this.remuxer.remux(l, u, c, d, n, r, !1, this.id),
            chunkMeta: i,
          };
        },
      },
      {
        key: "transmuxSampleAes",
        value: function (e, n, r, i, o) {
          var l = this;
          return this.demuxer.demuxSampleAes(e, n, r).then(function (u) {
            return {
              remuxResult: l.remuxer.remux(
                u.audioTrack,
                u.videoTrack,
                u.id3Track,
                u.textTrack,
                r,
                i,
                !1,
                l.id
              ),
              chunkMeta: o,
            };
          });
        },
      },
      {
        key: "configureTransmuxer",
        value: function (e) {
          for (
            var n,
              r = this.config,
              i = this.observer,
              o = this.typeSupported,
              l = 0,
              u = QC.length;
            l < u;
            l++
          ) {
            var c;
            if ((c = QC[l].demux) != null && c.probe(e, this.logger)) {
              n = QC[l];
              break;
            }
          }
          if (!n)
            return new Error("Failed to find demuxer by probing fragment data");
          var d = this.demuxer,
            h = this.remuxer,
            f = n.remux,
            p = n.demux;
          (h && h instanceof f) || (this.remuxer = new f(i, r, o, this.logger)),
            (d && d instanceof p) ||
              ((this.demuxer = new p(i, r, o, this.logger)),
              (this.probe = p.probe));
        },
      },
      {
        key: "needsProbing",
        value: function (e, n) {
          return !this.demuxer || !this.remuxer || e || n;
        },
      },
      {
        key: "getDecrypter",
        value: function () {
          var e = this.decrypter;
          return e || (e = this.decrypter = new ele(this.config)), e;
        },
      },
    ]),
    t
  );
})();
function u7t(t, e) {
  var n = null;
  return (
    t.byteLength > 0 &&
      (e == null ? void 0 : e.key) != null &&
      e.iv !== null &&
      e.method != null &&
      (n = e),
    n
  );
}
var zV = function (t) {
  return { remuxResult: {}, chunkMeta: t };
};
function AU(t) {
  return "then" in t && t.then instanceof Function;
}
var c7t = Kn(function t(e, n, r, i, o) {
    Wn(this, t),
      (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 = n),
      (this.initSegmentData = r),
      (this.duration = i),
      (this.defaultInitPts = o || null);
  }),
  d7t = Kn(function t(e, n, r, i, o, l) {
    Wn(this, t),
      (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 = n),
      (this.accurateTimeOffset = r),
      (this.trackSwitch = i),
      (this.timeOffset = o),
      (this.initSegmentChange = l);
  }),
  l1e = 0,
  h7t = (function () {
    function t(e, n, r, i) {
      var o = this;
      Wn(this, t),
        (this.error = null),
        (this.hls = void 0),
        (this.id = void 0),
        (this.instanceNo = l1e++),
        (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 = function (p) {
          var g = p.data,
            y = o.hls;
          if (y && g != null && g.event && g.instanceNo === o.instanceNo)
            switch (g.event) {
              case "init":
                var v,
                  b = (v = o.workerContext) == null ? void 0 : v.objectURL;
                b && Bs.revokeObjectURL(b);
                break;
              case "transmuxComplete":
                o.handleTransmuxComplete(g.data);
                break;
              case "flush":
                o.onFlush(g.data);
                break;
              case "workerLog":
                y.logger[g.data.logType] &&
                  y.logger[g.data.logType](g.data.message);
                break;
              default:
                (g.data = g.data || {}),
                  (g.data.frag = o.frag),
                  (g.data.part = o.part),
                  (g.data.id = o.id),
                  y.trigger(g.event, g.data);
            }
        }),
        (this.onWorkerError = function (p) {
          var g, y;
          if (o.hls) {
            var v = new Error(
              Ce(
                (g = Ce((y = "".concat(p.message, "  ("))).call(
                  y,
                  p.filename,
                  ":"
                ))
              ).call(g, p.lineno, ")")
            );
            (o.hls.config.enableWorker = !1),
              o.hls.logger.warn(
                'Error in "'.concat(o.id, '" Web Worker, fallback to inline')
              ),
              o.hls.trigger(_t.ERROR, {
                type: no.OTHER_ERROR,
                details: kr.INTERNAL_EXCEPTION,
                fatal: !1,
                event: "demuxerWorker",
                error: v,
              });
          }
        });
      var l = e.config;
      (this.hls = e),
        (this.id = n),
        (this.useWorker = !!l.enableWorker),
        (this.onTransmuxComplete = r),
        (this.onFlush = i);
      var u = function (p, g) {
        ((g = g || {}).frag = o.frag || void 0),
          p === _t.ERROR &&
            ((g.parent = o.id), (g.part = o.part), (o.error = g.error)),
          o.hls.trigger(p, g);
      };
      (this.observer = new g9e()),
        this.observer.on(_t.FRAG_DECRYPTED, u),
        this.observer.on(_t.ERROR, u);
      var c = $ve(l.preferManagedMediaSource);
      if (this.useWorker && typeof Worker < "u") {
        var d = this.hls.logger;
        if (l.workerPath || hHt()) {
          try {
            var h;
            l.workerPath
              ? (d.log(
                  Ce(
                    (h = "loading Web Worker ".concat(l.workerPath, ' for "'))
                  ).call(h, n, '"')
                ),
                (this.workerContext = pHt(l.workerPath)))
              : (d.log('injecting Web Worker for "'.concat(n, '"')),
                (this.workerContext = fHt()));
            var f = this.workerContext.worker;
            f.addEventListener("message", this.onWorkerMessage),
              f.addEventListener("error", this.onWorkerError),
              f.postMessage({
                instanceNo: this.instanceNo,
                cmd: "init",
                typeSupported: c,
                id: n,
                config: lr(l),
              });
          } catch (p) {
            d.warn(
              'Error setting up "'.concat(
                n,
                '" Web Worker, fallback to inline'
              ),
              p
            ),
              this.terminateWorker(),
              (this.error = null),
              (this.transmuxer = new s1e(this.observer, c, l, "", n, e.logger));
          }
          return;
        }
      }
      this.transmuxer = new s1e(this.observer, c, l, "", n, e.logger);
    }
    return (
      Kn(t, [
        {
          key: "reset",
          value: function () {
            if (((this.frag = null), (this.part = null), this.workerContext)) {
              var e = this.instanceNo;
              this.instanceNo = l1e++;
              var n = this.hls.config,
                r = $ve(n.preferManagedMediaSource);
              this.workerContext.worker.postMessage({
                instanceNo: this.instanceNo,
                cmd: "reset",
                resetNo: e,
                typeSupported: r,
                id: this.id,
                config: lr(n),
              });
            }
          },
        },
        {
          key: "terminateWorker",
          value: function () {
            if (this.workerContext) {
              var e = this.workerContext.worker;
              (this.workerContext = null),
                e.removeEventListener("message", this.onWorkerMessage),
                e.removeEventListener("error", this.onWorkerError),
                gHt(this.hls.config.workerPath);
            }
          },
        },
        {
          key: "destroy",
          value: function () {
            if (this.workerContext)
              this.terminateWorker(),
                (this.onWorkerMessage = this.onWorkerError = null);
            else {
              var e = this.transmuxer;
              e && (e.destroy(), (this.transmuxer = null));
            }
            var n = this.observer;
            n && n.removeAllListeners(),
              (this.frag = null),
              (this.part = null),
              (this.observer = null),
              (this.hls = null);
          },
        },
        {
          key: "push",
          value: function (e, n, r, i, o, l, u, c, d, h) {
            var f,
              p,
              g = this;
            d.transmuxing.start = self.performance.now();
            var y = this.instanceNo,
              v = this.transmuxer,
              b = l ? l.start : o.start,
              w = o.decryptdata,
              k = this.frag,
              D = !(k && o.cc === k.cc),
              $ = !(k && d.level === k.level),
              N = k ? d.sn - k.sn : -1,
              P = this.part ? d.part - this.part.index : -1,
              I =
                N === 0 &&
                d.id > 1 &&
                d.id === (k == null ? void 0 : k.stats.chunkCount),
              O = !$ && (N === 1 || (N === 0 && (P === 1 || (I && P <= 0)))),
              X = self.performance.now();
            ($ || N || o.stats.parsing.start === 0) &&
              (o.stats.parsing.start = X),
              !l || (!P && O) || (l.stats.parsing.start = X);
            var G = !(
                k &&
                ((f = o.initSegment) == null ? void 0 : f.url) ===
                  ((p = k.initSegment) == null ? void 0 : p.url)
              ),
              H = new d7t(D, O, c, $, b, G);
            if (!O || D || G) {
              var E, S, L, W, F, oe, De, Xe, ze, ht, gt;
              this.hls.logger.log(
                Ce(
                  (E = Ce(
                    (S = Ce(
                      (L = Ce(
                        (W = Ce(
                          (F = Ce(
                            (oe = Ce(
                              (De = Ce(
                                (Xe = Ce(
                                  (ze = Ce(
                                    (ht = Ce(
                                      (gt =
                                        "[transmuxer-interface]: Starting new transmux session for ".concat(
                                          o.type,
                                          " sn: "
                                        ))
                                    ).call(gt, d.sn))
                                  ).call(
                                    ht,
                                    d.part > -1 ? " part: " + d.part : "",
                                    " "
                                  ))
                                ).call(
                                  ze,
                                  this.id === wo.MAIN ? "level" : "track",
                                  ": "
                                ))
                              ).call(Xe, d.level, " id: "))
                            ).call(
                              De,
                              d.id,
                              `
        discontinuity: `
                            ))
                          ).call(
                            oe,
                            D,
                            `
        trackSwitch: `
                          ))
                        ).call(
                          F,
                          $,
                          `
        contiguous: `
                        ))
                      ).call(
                        W,
                        O,
                        `
        accurateTimeOffset: `
                      ))
                    ).call(
                      L,
                      c,
                      `
        timeOffset: `
                    ))
                  ).call(
                    S,
                    b,
                    `
        initSegmentChange: `
                  ))
                ).call(E, G)
              );
              var pt = new c7t(r, i, n, u, h);
              this.configureTransmuxer(pt);
            }
            if (((this.frag = o), (this.part = l), this.workerContext))
              this.workerContext.worker.postMessage(
                {
                  instanceNo: y,
                  cmd: "demux",
                  data: e,
                  decryptdata: w,
                  chunkMeta: d,
                  state: H,
                },
                e instanceof ArrayBuffer ? [e] : []
              );
            else if (v) {
              var $t = v.push(e, w, d, H);
              AU($t)
                ? $t
                    .then(function (ot) {
                      g.handleTransmuxComplete(ot);
                    })
                    .catch(function (ot) {
                      g.transmuxerError(
                        ot,
                        d,
                        "transmuxer-interface push error"
                      );
                    })
                : this.handleTransmuxComplete($t);
            }
          },
        },
        {
          key: "flush",
          value: function (e) {
            var n = this;
            e.transmuxing.start = self.performance.now();
            var r = this.instanceNo,
              i = this.transmuxer;
            if (this.workerContext)
              this.workerContext.worker.postMessage({
                instanceNo: r,
                cmd: "flush",
                chunkMeta: e,
              });
            else if (i) {
              var o = i.flush(e);
              AU(o)
                ? o
                    .then(function (l) {
                      n.handleFlushResult(l, e);
                    })
                    .catch(function (l) {
                      n.transmuxerError(
                        l,
                        e,
                        "transmuxer-interface flush error"
                      );
                    })
                : this.handleFlushResult(o, e);
            }
          },
        },
        {
          key: "transmuxerError",
          value: function (e, n, r) {
            this.hls &&
              ((this.error = e),
              this.hls.trigger(_t.ERROR, {
                type: no.MEDIA_ERROR,
                details: kr.FRAG_PARSING_ERROR,
                chunkMeta: n,
                frag: this.frag || void 0,
                part: this.part || void 0,
                fatal: !1,
                error: e,
                err: e,
                reason: r,
              }));
          },
        },
        {
          key: "handleFlushResult",
          value: function (e, n) {
            var r = this;
            e.forEach(function (i) {
              r.handleTransmuxComplete(i);
            }),
              this.onFlush(n);
          },
        },
        {
          key: "configureTransmuxer",
          value: function (e) {
            var n = this.instanceNo,
              r = this.transmuxer;
            this.workerContext
              ? this.workerContext.worker.postMessage({
                  instanceNo: n,
                  cmd: "configure",
                  config: e,
                })
              : r && r.configure(e);
          },
        },
        {
          key: "handleTransmuxComplete",
          value: function (e) {
            (e.chunkMeta.transmuxing.end = self.performance.now()),
              this.onTransmuxComplete(e);
          },
        },
      ]),
      t
    );
  })();
function $9e(t, e) {
  if (t.length !== e.length) return !1;
  for (var n = 0; n < t.length; n++) if (!HI(t[n].attrs, e[n].attrs)) return !1;
  return !0;
}
function HI(t, e, n) {
  var r = t["STABLE-RENDITION-ID"];
  return r && !n
    ? r === e["STABLE-RENDITION-ID"]
    : !(
        n || [
          "LANGUAGE",
          "NAME",
          "CHARACTERISTICS",
          "AUTOSELECT",
          "DEFAULT",
          "FORCED",
          "ASSOC-LANGUAGE",
        ]
      ).some(function (i) {
        return t[i] !== e[i];
      });
}
function Kee(t, e) {
  return (
    e.label.toLowerCase() === t.name.toLowerCase() &&
    (!e.language || e.language.toLowerCase() === (t.lang || "").toLowerCase())
  );
}
var u1e = 100,
  f7t = (function (t) {
    so(n, f9e);
    var e = lo(n);
    function n(r, i, o) {
      var l;
      return (
        Wn(this, n),
        ((l = e.call(
          this,
          r,
          i,
          o,
          "audio-stream-controller",
          wo.AUDIO
        )).mainAnchor = null),
        (l.mainFragLoading = null),
        (l.audioOnly = !1),
        (l.bufferedTrack = null),
        (l.switchingTrack = null),
        (l.trackId = -1),
        (l.waitingData = null),
        (l.mainDetails = null),
        (l.flushing = !1),
        (l.bufferFlushed = !1),
        (l.cachedTrackLoadedData = null),
        l.registerListeners(),
        l
      );
    }
    return (
      Kn(n, [
        {
          key: "onHandlerDestroying",
          value: function () {
            this.unregisterListeners(),
              Eo(po(n.prototype), "onHandlerDestroying", this).call(this),
              this.resetItem();
          },
        },
        {
          key: "resetItem",
          value: function () {
            this.mainDetails =
              this.mainAnchor =
              this.mainFragLoading =
              this.bufferedTrack =
              this.switchingTrack =
              this.waitingData =
              this.cachedTrackLoadedData =
                null;
          },
        },
        {
          key: "registerListeners",
          value: function () {
            Eo(po(n.prototype), "registerListeners", this).call(this);
            var r = this.hls;
            r.on(_t.LEVEL_LOADED, this.onLevelLoaded, this),
              r.on(_t.AUDIO_TRACKS_UPDATED, this.onAudioTracksUpdated, this),
              r.on(_t.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
              r.on(_t.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
              r.on(_t.BUFFER_RESET, this.onBufferReset, this),
              r.on(_t.BUFFER_CREATED, this.onBufferCreated, this),
              r.on(_t.BUFFER_FLUSHING, this.onBufferFlushing, this),
              r.on(_t.BUFFER_FLUSHED, this.onBufferFlushed, this),
              r.on(_t.INIT_PTS_FOUND, this.onInitPtsFound, this),
              r.on(_t.FRAG_LOADING, this.onFragLoading, this),
              r.on(_t.FRAG_BUFFERED, this.onFragBuffered, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r &&
              (Eo(po(n.prototype), "unregisterListeners", this).call(this),
              r.off(_t.LEVEL_LOADED, this.onLevelLoaded, this),
              r.off(_t.AUDIO_TRACKS_UPDATED, this.onAudioTracksUpdated, this),
              r.off(_t.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
              r.off(_t.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
              r.off(_t.BUFFER_RESET, this.onBufferReset, this),
              r.off(_t.BUFFER_CREATED, this.onBufferCreated, this),
              r.off(_t.BUFFER_FLUSHING, this.onBufferFlushing, this),
              r.off(_t.BUFFER_FLUSHED, this.onBufferFlushed, this),
              r.off(_t.INIT_PTS_FOUND, this.onInitPtsFound, this),
              r.off(_t.FRAG_LOADING, this.onFragLoading, this),
              r.off(_t.FRAG_BUFFERED, this.onFragBuffered, this));
          },
        },
        {
          key: "onInitPtsFound",
          value: function (r, i) {
            var o = i.frag,
              l = i.id,
              u = i.initPTS,
              c = i.timescale;
            if (l === wo.MAIN) {
              var d,
                h,
                f = o.cc,
                p = this.fragCurrent;
              if (
                ((this.initPTS[f] = { baseTime: u, timescale: c }),
                this.log(
                  Ce(
                    (d = Ce(
                      (h = "InitPTS for cc: ".concat(f, " found from main: "))
                    ).call(h, u, "/"))
                  ).call(d, c)
                ),
                (this.mainAnchor = o),
                this.state === li.WAITING_INIT_PTS)
              ) {
                var g = this.waitingData;
                ((!g && !this.loadingParts) || (g && g.frag.cc !== f)) &&
                  (this.nextLoadPosition = this.findSyncFrag(o).start),
                  this.tick();
              } else
                !this.hls.hasEnoughToStart && p && p.cc !== f
                  ? ((this.startFragRequested = !1),
                    (this.nextLoadPosition = this.findSyncFrag(o).start),
                    p.abortRequests(),
                    this.resetLoadingState())
                  : this.state === li.IDLE && this.tick();
            }
          },
        },
        {
          key: "findSyncFrag",
          value: function (r) {
            var i = this.getLevelDetails(),
              o = r.cc;
            return lBt(i, o, r) || (i && J8e(i.fragments, o)) || r;
          },
        },
        {
          key: "startLoad",
          value: function (r) {
            if (!this.levels)
              return (this.startPosition = r), void (this.state = li.STOPPED);
            var i = this.lastCurrentTime;
            this.stopLoad(),
              this.setInterval(u1e),
              i > 0 && r === -1
                ? (this.log(
                    "Override startPosition with lastCurrentTime @".concat(
                      i.toFixed(3)
                    )
                  ),
                  (r = i),
                  (this.state = li.IDLE))
                : (this.state = li.WAITING_TRACK),
              (this.nextLoadPosition =
                this.startPosition =
                this.lastCurrentTime =
                  r),
              this.tick();
          },
        },
        {
          key: "doTick",
          value: function () {
            switch (this.state) {
              case li.IDLE:
                this.doTickIdle();
                break;
              case li.WAITING_TRACK:
                var r = this.levels,
                  i = this.trackId,
                  o = r == null ? void 0 : r[i],
                  l = o == null ? void 0 : o.details;
                if (l && !this.waitForLive(o)) {
                  if (this.waitForCdnTuneIn(l)) break;
                  this.state = li.WAITING_INIT_PTS;
                }
                break;
              case li.FRAG_LOADING_WAITING_RETRY:
                var u,
                  c = performance.now(),
                  d = this.retryDate;
                if (!d || c >= d || ((u = this.media) != null && u.seeking)) {
                  var h = this.levels,
                    f = this.trackId;
                  this.log("RetryDate reached, switch back to IDLE state"),
                    this.resetStartWhenNotLoaded(
                      (h == null ? void 0 : h[f]) || null
                    ),
                    (this.state = li.IDLE);
                }
                break;
              case li.WAITING_INIT_PTS:
                var p = this.waitingData;
                if (p) {
                  var g = p.frag,
                    y = p.part,
                    v = p.cache,
                    b = p.complete,
                    w = this.mainAnchor;
                  if (this.initPTS[g.cc] !== void 0) {
                    (this.waitingData = null), (this.state = li.FRAG_LOADING);
                    var k = {
                      frag: g,
                      part: y,
                      payload: v.flush().buffer,
                      networkDetails: null,
                    };
                    this._handleFragmentLoadProgress(k),
                      b &&
                        Eo(
                          po(n.prototype),
                          "_handleFragmentLoadComplete",
                          this
                        ).call(this, k);
                  } else if (w && w.cc !== p.frag.cc) {
                    var D;
                    this.log(
                      Ce(
                        (D = "Waiting fragment cc (".concat(
                          g.cc,
                          ") cancelled because video is at cc "
                        ))
                      ).call(D, w.cc)
                    ),
                      (this.nextLoadPosition = this.findSyncFrag(w).start),
                      this.clearWaitingFragment();
                  }
                } else this.state = li.IDLE;
            }
            this.onTickEnd();
          },
        },
        {
          key: "clearWaitingFragment",
          value: function () {
            var r = this.waitingData;
            r &&
              (this.hls.hasEnoughToStart || (this.startFragRequested = !1),
              this.fragmentTracker.removeFragment(r.frag),
              (this.waitingData = null),
              this.state !== li.STOPPED && (this.state = li.IDLE));
          },
        },
        {
          key: "resetLoadingState",
          value: function () {
            this.clearWaitingFragment(),
              Eo(po(n.prototype), "resetLoadingState", this).call(this);
          },
        },
        {
          key: "onTickEnd",
          value: function () {
            var r = this.media;
            r != null && r.readyState && (this.lastCurrentTime = r.currentTime);
          },
        },
        {
          key: "doTickIdle",
          value: function () {
            var r,
              i = this.hls,
              o = this.levels,
              l = this.media,
              u = this.trackId,
              c = i.config;
            if (
              this.buffering &&
              (l || (!this.startFragRequested && c.startFragPrefetch)) &&
              o != null &&
              o[u]
            ) {
              var d = o[u],
                h = d.details;
              if (!h || this.waitForLive(d) || this.waitForCdnTuneIn(h))
                return (
                  (this.state = li.WAITING_TRACK),
                  void (this.startFragRequested = !1)
                );
              var f = this.mediaBuffer ? this.mediaBuffer : this.media;
              this.bufferFlushed &&
                f &&
                ((this.bufferFlushed = !1),
                this.afterBufferFlushed(f, nh.AUDIO, wo.AUDIO));
              var p = this.getFwdBufferInfo(f, wo.AUDIO);
              if (p !== null) {
                var g = this.bufferedTrack,
                  y = this.switchingTrack;
                if (!y && this._streamEnded(p, h))
                  return (
                    i.trigger(_t.BUFFER_EOS, { type: "audio" }),
                    void (this.state = li.ENDED)
                  );
                var v = p.len,
                  b = i.maxBufferLength,
                  w = h.fragments,
                  k = w[0].start,
                  D = this.getLoadPosition(),
                  $ = this.flushing ? D : p.end;
                if (y && l) {
                  var N = D;
                  g && !HI(y.attrs, g.attrs) && ($ = N),
                    h.PTSKnown &&
                      N < k &&
                      (p.end > k || p.nextStart) &&
                      (this.log(
                        "Alt audio track ahead of main track, seek to start of alt audio track"
                      ),
                      (l.currentTime = k + 0.05));
                }
                if (!(v >= b && !y && $ < w[w.length - 1].start)) {
                  var P = this.getNextFragment($, h);
                  if (
                    (P &&
                      this.isLoopLoading(P, $) &&
                      (P = this.getNextFragmentLoopLoading(
                        P,
                        h,
                        p,
                        wo.MAIN,
                        b
                      )),
                    P)
                  ) {
                    var I =
                      (r = this.mainFragLoading) == null ? void 0 : r.frag;
                    if (
                      !this.audioOnly &&
                      this.startFragRequested &&
                      I &&
                      vf(I) &&
                      vf(P) &&
                      !P.endList &&
                      (!h.live ||
                        (!this.loadingParts && $ < this.hls.liveSyncPosition))
                    ) {
                      var O = I;
                      if (P.start > O.end) {
                        var X = this.fragmentTracker.getFragAtPos($, wo.MAIN);
                        X &&
                          X.end > I.end &&
                          ((O = X),
                          (this.mainFragLoading = {
                            frag: X,
                            targetBufferTime: null,
                          }));
                      }
                      if (P.start > O.end) return;
                    }
                    this.loadFragment(P, d, $);
                  } else this.bufferFlushed = !0;
                }
              }
            }
          },
        },
        {
          key: "onMediaDetaching",
          value: function (r, i) {
            (this.bufferFlushed = this.flushing = !1),
              Eo(po(n.prototype), "onMediaDetaching", this).call(this, r, i);
          },
        },
        {
          key: "onAudioTracksUpdated",
          value: function (r, i) {
            var o = i.audioTracks;
            this.resetTransmuxer(),
              (this.levels = On(o).call(o, function (l) {
                return new yU(l);
              }));
          },
        },
        {
          key: "onAudioTrackSwitching",
          value: function (r, i) {
            var o = !!i.url;
            this.trackId = i.id;
            var l = this.fragCurrent;
            l && (l.abortRequests(), this.removeUnbufferedFrags(l.start)),
              this.resetLoadingState(),
              o
                ? ((this.switchingTrack = i),
                  this.flushAudioIfNeeded(i),
                  this.state !== li.STOPPED &&
                    (this.setInterval(u1e),
                    (this.state = li.IDLE),
                    this.tick()))
                : (this.resetTransmuxer(),
                  (this.switchingTrack = null),
                  (this.bufferedTrack = i),
                  this.clearInterval());
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            Eo(po(n.prototype), "onManifestLoading", this).call(this),
              (this.bufferFlushed = this.flushing = this.audioOnly = !1),
              this.resetItem(),
              (this.trackId = -1);
          },
        },
        {
          key: "onLevelLoaded",
          value: function (r, i) {
            this.mainDetails = i.details;
            var o = this.cachedTrackLoadedData;
            o &&
              ((this.cachedTrackLoadedData = null),
              this.hls.trigger(_t.AUDIO_TRACK_LOADED, o));
          },
        },
        {
          key: "onAudioTrackLoaded",
          value: function (r, i) {
            var o,
              l,
              u,
              c,
              d,
              h,
              f = this.levels,
              p = i.details,
              g = i.id,
              y = this.mainDetails;
            if (!y || y.expired || p.endCC > y.endCC)
              return (
                (this.cachedTrackLoadedData = i),
                void (
                  this.state !== li.STOPPED && (this.state = li.WAITING_TRACK)
                )
              );
            if (f) {
              this.log(
                Ce(
                  (o = Ce(
                    (l = Ce(
                      (u = Ce((c = "Audio track ".concat(g, " loaded ["))).call(
                        c,
                        p.startSN,
                        ","
                      ))
                    ).call(u, p.endSN, "]"))
                  ).call(
                    l,
                    p.lastPartSn
                      ? Ce((d = "[part-".concat(p.lastPartSn, "-"))).call(
                          d,
                          p.lastPartIndex,
                          "]"
                        )
                      : "",
                    ",duration:"
                  ))
                ).call(o, p.totalduration)
              );
              var v = f[g],
                b = 0;
              if (p.live || ((h = v.details) != null && h.live)) {
                if ((this.checkLiveUpdate(p), p.deltaUpdateFailed)) return;
                var w;
                v.details &&
                  (b = this.alignPlaylists(
                    p,
                    v.details,
                    (w = this.levelLastLoaded) == null ? void 0 : w.details
                  )),
                  p.alignedSliding ||
                    (h9e(p, y),
                    p.alignedSliding || EU(p, y),
                    (b = p.fragmentStart));
              }
              (v.details = p),
                (this.levelLastLoaded = v),
                this.startFragRequested || this.setStartPosition(y, b),
                this.hls.trigger(_t.AUDIO_TRACK_UPDATED, {
                  details: p,
                  id: g,
                  groupId: i.groupId,
                }),
                this.state !== li.WAITING_TRACK ||
                  this.waitForCdnTuneIn(p) ||
                  (this.state = li.IDLE),
                this.tick();
            } else
              this.warn(
                "Audio tracks were reset while loading level ".concat(g)
              );
          },
        },
        {
          key: "_handleFragmentLoadProgress",
          value: function (r) {
            var i,
              o = r.frag,
              l = r.part,
              u = r.payload,
              c = this.config,
              d = this.trackId,
              h = this.levels;
            if (h) {
              var f = h[d];
              if (f) {
                var p = f.details;
                if (!p)
                  return (
                    this.warn(
                      "Audio track details undefined on fragment load progress"
                    ),
                    void this.removeUnbufferedFrags(o.start)
                  );
                var g = c.defaultAudioCodec || f.audioCodec || "mp4a.40.2",
                  y = this.transmuxer;
                y ||
                  (y = this.transmuxer =
                    new h7t(
                      this.hls,
                      wo.AUDIO,
                      this._handleTransmuxComplete.bind(this),
                      this._handleTransmuxerFlush.bind(this)
                    ));
                var v = this.initPTS[o.cc],
                  b = (i = o.initSegment) == null ? void 0 : i.data;
                if (v !== void 0) {
                  var w = l ? l.index : -1,
                    k = w !== -1,
                    D = new a9e(
                      o.level,
                      o.sn,
                      o.stats.chunkCount,
                      u.byteLength,
                      w,
                      k
                    );
                  y.push(u, b, g, "", o, l, p.totalduration, !1, D, v);
                } else {
                  var $, N, P, I;
                  this.log(
                    Ce(
                      ($ = Ce(
                        (N = Ce(
                          (P = Ce(
                            (I = "Unknown video PTS for cc ".concat(
                              o.cc,
                              ", waiting for video PTS before demuxing audio frag "
                            ))
                          ).call(I, o.sn, " of ["))
                        ).call(P, p.startSN, " ,"))
                      ).call(N, p.endSN, "],track "))
                    ).call($, d)
                  ),
                    (this.waitingData = this.waitingData || {
                      frag: o,
                      part: l,
                      cache: new uHt(),
                      complete: !1,
                    }).cache.push(new Uint8Array(u)),
                    this.state !== li.STOPPED &&
                      (this.state = li.WAITING_INIT_PTS);
                }
              } else
                this.warn("Audio track is undefined on fragment load progress");
            } else {
              var O;
              this.warn(
                Ce(
                  (O =
                    "Audio tracks were reset while fragment load was in progress. Fragment ".concat(
                      o.sn,
                      " of level "
                    ))
                ).call(O, o.level, " will not be buffered")
              );
            }
          },
        },
        {
          key: "_handleFragmentLoadComplete",
          value: function (r) {
            this.waitingData
              ? (this.waitingData.complete = !0)
              : Eo(po(n.prototype), "_handleFragmentLoadComplete", this).call(
                  this,
                  r
                );
          },
        },
        {
          key: "onBufferReset",
          value: function () {
            this.mediaBuffer = null;
          },
        },
        {
          key: "onBufferCreated",
          value: function (r, i) {
            this.bufferFlushed = this.flushing = !1;
            var o = i.tracks.audio;
            o && (this.mediaBuffer = o.buffer || null);
          },
        },
        {
          key: "onFragLoading",
          value: function (r, i) {
            !this.audioOnly &&
              i.frag.type === wo.MAIN &&
              vf(i.frag) &&
              ((this.mainFragLoading = i),
              this.state === li.IDLE && this.tick());
          },
        },
        {
          key: "onFragBuffered",
          value: function (r, i) {
            var o = i.frag,
              l = i.part;
            if (o.type === wo.AUDIO)
              if (this.fragContextChanged(o)) {
                var u, c, d, h;
                this.warn(
                  Ce(
                    (u = Ce(
                      (c = Ce(
                        (d = Ce((h = "Fragment ".concat(o.sn))).call(
                          h,
                          l ? " p: " + l.index : "",
                          " of level "
                        ))
                      ).call(
                        d,
                        o.level,
                        " finished buffering, but was aborted. state: "
                      ))
                    ).call(c, this.state, ", audioSwitch: "))
                  ).call(
                    u,
                    this.switchingTrack ? this.switchingTrack.name : "false"
                  )
                );
              } else {
                if (vf(o)) {
                  this.fragPrevious = o;
                  var f = this.switchingTrack;
                  f &&
                    ((this.bufferedTrack = f),
                    (this.switchingTrack = null),
                    this.hls.trigger(_t.AUDIO_TRACK_SWITCHED, fl({}, f)));
                }
                this.fragBufferedComplete(o, l), this.media && this.tick();
              }
            else
              this.audioOnly ||
                o.type !== wo.MAIN ||
                o.elementaryStreams.video ||
                o.elementaryStreams.audiovideo ||
                ((this.audioOnly = !0), (this.mainFragLoading = null));
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            var o;
            if (i.fatal) this.state = li.ERROR;
            else
              switch (i.details) {
                case kr.FRAG_GAP:
                case kr.FRAG_PARSING_ERROR:
                case kr.FRAG_DECRYPT_ERROR:
                case kr.FRAG_LOAD_ERROR:
                case kr.FRAG_LOAD_TIMEOUT:
                case kr.KEY_LOAD_ERROR:
                case kr.KEY_LOAD_TIMEOUT:
                  this.onFragmentOrKeyLoadError(wo.AUDIO, i);
                  break;
                case kr.AUDIO_TRACK_LOAD_ERROR:
                case kr.AUDIO_TRACK_LOAD_TIMEOUT:
                case kr.LEVEL_PARSING_ERROR:
                  i.levelRetry ||
                    this.state !== li.WAITING_TRACK ||
                    ((o = i.context) == null ? void 0 : o.type) !==
                      F1.AUDIO_TRACK ||
                    (this.state = li.IDLE);
                  break;
                case kr.BUFFER_APPEND_ERROR:
                case kr.BUFFER_FULL_ERROR:
                  if (!i.parent || i.parent !== "audio") return;
                  if (i.details === kr.BUFFER_APPEND_ERROR)
                    return void this.resetLoadingState();
                  this.reduceLengthAndFlushBuffer(i) &&
                    ((this.bufferedTrack = null),
                    Eo(po(n.prototype), "flushMainBuffer", this).call(
                      this,
                      0,
                      Number.POSITIVE_INFINITY,
                      "audio"
                    ));
                  break;
                case kr.INTERNAL_EXCEPTION:
                  this.recoverWorkerError(i);
              }
          },
        },
        {
          key: "onBufferFlushing",
          value: function (r, i) {
            i.type !== nh.VIDEO && (this.flushing = !0);
          },
        },
        {
          key: "onBufferFlushed",
          value: function (r, i) {
            var o = i.type;
            if (o !== nh.VIDEO) {
              (this.flushing = !1),
                (this.bufferFlushed = !0),
                this.state === li.ENDED && (this.state = li.IDLE);
              var l = this.mediaBuffer || this.media;
              l && (this.afterBufferFlushed(l, o, wo.AUDIO), this.tick());
            }
          },
        },
        {
          key: "_handleTransmuxComplete",
          value: function (r) {
            var i,
              o = "audio",
              l = this.hls,
              u = r.remuxResult,
              c = r.chunkMeta,
              d = this.getCurrentContext(c);
            if (d) {
              var h = d.frag,
                f = d.part,
                p = d.level,
                g = p.details,
                y = u.audio,
                v = u.text,
                b = u.id3,
                w = u.initSegment;
              if (!this.fragContextChanged(h) && g) {
                if (
                  ((this.state = li.PARSING),
                  this.switchingTrack &&
                    y &&
                    this.completeAudioSwitch(this.switchingTrack),
                  w != null && w.tracks)
                ) {
                  var k = h.initSegment || h;
                  this._bufferInitSegment(p, w.tracks, k, c),
                    l.trigger(_t.FRAG_PARSING_INIT_SEGMENT, {
                      frag: k,
                      id: o,
                      tracks: w.tracks,
                    });
                }
                if (y) {
                  var D = y.startPTS,
                    $ = y.endPTS,
                    N = y.startDTS,
                    P = y.endDTS;
                  f &&
                    (f.elementaryStreams[nh.AUDIO] = {
                      startPTS: D,
                      endPTS: $,
                      startDTS: N,
                      endDTS: P,
                    }),
                    h.setElementaryStreamInfo(nh.AUDIO, D, $, N, P),
                    this.bufferFragmentData(y, h, f, c);
                }
                if (b != null && (i = b.samples) != null && i.length) {
                  var I = cu({ id: o, frag: h, details: g }, b);
                  l.trigger(_t.FRAG_PARSING_METADATA, I);
                }
                if (v) {
                  var O = cu({ id: o, frag: h, details: g }, v);
                  l.trigger(_t.FRAG_PARSING_USERDATA, O);
                }
              } else this.fragmentTracker.removeFragment(h);
            } else this.resetWhenMissingContext(c);
          },
        },
        {
          key: "_bufferInitSegment",
          value: function (r, i, o, l) {
            var u, c;
            if (
              this.state === li.PARSING &&
              (i.video && delete i.video,
              i.audiovideo && delete i.audiovideo,
              i.audio)
            ) {
              var d = i.audio;
              d.id = "audio";
              var h = r.audioCodec;
              this.log(
                Ce(
                  (u = Ce(
                    (c = "Init audio buffer, container:".concat(
                      d.container,
                      ", codecs[level/parsed]=["
                    ))
                  ).call(c, h, "/"))
                ).call(u, d.codec, "]")
              ),
                h && h.split(",").length === 1 && (d.levelCodec = h),
                this.hls.trigger(_t.BUFFER_CODECS, i);
              var f = d.initSegment;
              if (f != null && f.byteLength) {
                var p = {
                  type: "audio",
                  frag: o,
                  part: null,
                  chunkMeta: l,
                  parent: o.type,
                  data: f,
                };
                this.hls.trigger(_t.BUFFER_APPENDING, p);
              }
              this.tickImmediate();
            }
          },
        },
        {
          key: "loadFragment",
          value: function (r, i, o) {
            var l,
              u = this.fragmentTracker.getState(r);
            if (this.switchingTrack || u === c0.NOT_LOADED || u === c0.PARTIAL)
              if (vf(r))
                if ((l = i.details) != null && l.live && !this.initPTS[r.cc]) {
                  var c, d;
                  this.log(
                    Ce(
                      (c = Ce(
                        (d =
                          "Waiting for video PTS in continuity counter ".concat(
                            r.cc,
                            " of live stream before loading audio fragment "
                          ))
                      ).call(d, r.sn, " of level "))
                    ).call(c, this.trackId)
                  ),
                    (this.state = li.WAITING_INIT_PTS);
                  var h = this.mainDetails;
                  h &&
                    h.fragmentStart !== i.details.fragmentStart &&
                    EU(i.details, h);
                } else
                  Eo(po(n.prototype), "loadFragment", this).call(this, r, i, o);
              else this._loadInitSegment(r, i);
            else this.clearTrackerIfNeeded(r);
          },
        },
        {
          key: "flushAudioIfNeeded",
          value: function (r) {
            var i = this.media,
              o = this.bufferedTrack,
              l = o == null ? void 0 : o.attrs,
              u = r.attrs;
            i &&
              l &&
              (l.CHANNELS !== u.CHANNELS ||
                o.name !== r.name ||
                o.lang !== r.lang) &&
              (this.log("Switching audio track : flushing all audio"),
              Eo(po(n.prototype), "flushMainBuffer", this).call(
                this,
                0,
                Number.POSITIVE_INFINITY,
                "audio"
              ),
              (this.bufferedTrack = null));
          },
        },
        {
          key: "completeAudioSwitch",
          value: function (r) {
            var i = this.hls;
            this.flushAudioIfNeeded(r),
              (this.bufferedTrack = r),
              (this.switchingTrack = null),
              i.trigger(_t.AUDIO_TRACK_SWITCHED, fl({}, r));
          },
        },
      ]),
      n
    );
  })(),
  x9e = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r, i) {
      var o;
      return (
        Wn(this, n),
        ((o = e.call(this, i, r.logger)).hls = void 0),
        (o.canLoad = !1),
        (o.timer = -1),
        (o.hls = r),
        o
      );
    }
    return (
      Kn(n, [
        {
          key: "destroy",
          value: function () {
            this.clearTimer(), (this.hls = this.log = this.warn = null);
          },
        },
        {
          key: "clearTimer",
          value: function () {
            this.timer !== -1 &&
              (self.clearTimeout(this.timer), (this.timer = -1));
          },
        },
        {
          key: "startLoad",
          value: function () {
            (this.canLoad = !0), this.loadPlaylist();
          },
        },
        {
          key: "stopLoad",
          value: function () {
            (this.canLoad = !1), this.clearTimer();
          },
        },
        {
          key: "switchParams",
          value: function (r, i, o) {
            var l = i == null ? void 0 : i.renditionReports;
            if (l) {
              for (var u = -1, c = 0; c < l.length; c++) {
                var d = l[c],
                  h = void 0;
                try {
                  h = new Bs(d.URI, i.url).href;
                } catch (b) {
                  this.warn(
                    "Could not construct new URL for Rendition Report: ".concat(
                      b
                    )
                  ),
                    (h = d.URI || "");
                }
                if (h === r) {
                  u = c;
                  break;
                }
                h === r.substring(0, h.length) && (u = c);
              }
              if (u !== -1) {
                var f = l[u],
                  p = _i(f["LAST-MSN"]) || (i == null ? void 0 : i.lastPartSn),
                  g =
                    _i(f["LAST-PART"]) ||
                    (i == null ? void 0 : i.lastPartIndex);
                if (this.hls.config.lowLatencyMode) {
                  var y = Math.min(i.age - i.partTarget, i.targetduration);
                  g >= 0 && y > i.partTarget && (g += 1);
                }
                var v = o && Ove(o);
                return new Gve(p, g >= 0 ? g : void 0, v);
              }
            }
          },
        },
        {
          key: "loadPlaylist",
          value: function (r) {
            this.clearTimer();
          },
        },
        {
          key: "loadingPlaylist",
          value: function (r, i) {
            this.clearTimer();
          },
        },
        {
          key: "shouldLoadPlaylist",
          value: function (r) {
            return (
              this.canLoad && !!r && !!r.url && (!r.details || r.details.live)
            );
          },
        },
        {
          key: "getUrlWithDirectives",
          value: function (r, i) {
            if (i)
              try {
                return i.addDirectives(r);
              } catch (o) {
                this.warn(
                  "Could not construct new URL with HLS Delivery Directives: ".concat(
                    o
                  )
                );
              }
            return r;
          },
        },
        {
          key: "playlistLoaded",
          value: function (r, i, o) {
            var l = i.details,
              u = i.stats,
              c = self.performance.now(),
              d = u.loading.first ? Math.max(0, c - u.loading.first) : 0;
            l.advancedDateTime = Date.now() - d;
            var h = this.hls.config.timelineOffset;
            if (h !== l.appliedTimelineOffset) {
              var f = Math.max(h || 0, 0);
              (l.appliedTimelineOffset = f),
                l.fragments.forEach(function (Xe) {
                  Xe.start = Xe.playlistOffset + f;
                });
            }
            if (l.live || (o != null && o.live)) {
              var p,
                g = "levelInfo" in i ? i.levelInfo : i.track;
              l.reloaded(o),
                o && l.fragments.length > 0 && qBt(o, l),
                l.requestScheduled === -1 &&
                  (l.requestScheduled = u.loading.start);
              var y,
                v = this.hls.mainForwardBufferInfo,
                b = v ? v.end - v.len : 0,
                w = rHt(l, 1e3 * (l.edge - b));
              if (
                (l.requestScheduled + w < c
                  ? (l.requestScheduled = c)
                  : (l.requestScheduled += w),
                this.log(
                  Ce((p = "live playlist ".concat(r, " "))).call(
                    p,
                    l.advanced
                      ? "REFRESHED " + l.lastPartSn + "-" + l.lastPartIndex
                      : l.updated
                      ? "UPDATED"
                      : "MISSED"
                  )
                ),
                !this.canLoad || !l.live)
              )
                return;
              var k = void 0,
                D = void 0;
              if (l.canBlockReload && l.endSN && l.advanced) {
                var $ = this.hls.config.lowLatencyMode,
                  N = l.lastPartSn,
                  P = l.endSN,
                  I = l.lastPartIndex,
                  O = N === P;
                I !== -1
                  ? O
                    ? ((k = P + 1), (D = $ ? 0 : I))
                    : ((k = N), (D = $ ? I + 1 : l.maxPartIndex))
                  : (k = P + 1);
                var X = l.age,
                  G = X + l.ageHeader,
                  H = Math.min(G - l.partTarget, 1.5 * l.targetduration);
                if (H > 0) {
                  if (G > 3 * l.targetduration)
                    this.log(
                      "Playlist last advanced ".concat(
                        X.toFixed(2),
                        "s ago. Omitting segment and part directives."
                      )
                    ),
                      (k = void 0),
                      (D = void 0);
                  else if (
                    o != null &&
                    o.tuneInGoal &&
                    G - l.partTarget > o.tuneInGoal
                  ) {
                    var E, S;
                    this.warn(
                      Ce(
                        (E = Ce(
                          (S = "CDN Tune-in goal increased from: ".concat(
                            o.tuneInGoal,
                            " to: "
                          ))
                        ).call(S, H, " with playlist age: "))
                      ).call(E, l.age)
                    ),
                      (H = 0);
                  } else {
                    var L,
                      W,
                      F,
                      oe,
                      De = Math.floor(H / l.targetduration);
                    (k += De),
                      D !== void 0 &&
                        (D += Math.round(
                          (H % l.targetduration) / l.partTarget
                        )),
                      this.log(
                        Ce(
                          (L = Ce(
                            (W = Ce(
                              (F = Ce(
                                (oe = "CDN Tune-in age: ".concat(
                                  l.ageHeader,
                                  "s last advanced "
                                ))
                              ).call(oe, X.toFixed(2), "s goal: "))
                            ).call(F, H, " skip sn "))
                          ).call(W, De, " to part "))
                        ).call(L, D)
                      );
                  }
                  l.tuneInGoal = H;
                }
                if (
                  ((y = this.getDeliveryDirectives(
                    l,
                    i.deliveryDirectives,
                    k,
                    D
                  )),
                  $ || !O)
                )
                  return (
                    (l.requestScheduled = c), void this.loadingPlaylist(g, y)
                  );
              } else
                (l.canBlockReload || l.canSkipUntil) &&
                  (y = this.getDeliveryDirectives(
                    l,
                    i.deliveryDirectives,
                    k,
                    D
                  ));
              y &&
                k !== void 0 &&
                l.canBlockReload &&
                (l.requestScheduled =
                  u.loading.first + Math.max(w - 2 * d, w / 2)),
                this.scheduleLoading(g, y, l);
            } else this.clearTimer();
          },
        },
        {
          key: "scheduleLoading",
          value: function (r, i, o) {
            var l,
              u = this,
              c = o || r.details;
            if (c) {
              var d = self.performance.now(),
                h = c.requestScheduled;
              if (d >= h) this.loadingPlaylist(r, i);
              else {
                var f = h - d;
                this.log(
                  Ce(
                    (l = "reload live playlist ".concat(
                      r.name || r.bitrate + "bps",
                      " in "
                    ))
                  ).call(l, Math.round(f), " ms")
                ),
                  this.clearTimer(),
                  (this.timer = self.setTimeout(function () {
                    return u.loadingPlaylist(r, i);
                  }, f));
              }
            } else this.loadingPlaylist(r, i);
          },
        },
        {
          key: "getDeliveryDirectives",
          value: function (r, i, o, l) {
            var u = Ove(r);
            return (
              i != null &&
                i.skip &&
                r.deltaUpdateFailed &&
                ((o = i.msn), (l = i.part), (u = SF.No)),
              new Gve(o, l, u)
            );
          },
        },
        {
          key: "checkRetry",
          value: function (r) {
            var i = this,
              o = r.details,
              l = vU(r),
              u = r.errorAction,
              c = u || {},
              d = c.action,
              h = c.retryCount,
              f = h === void 0 ? 0 : h,
              p = c.retryConfig,
              g =
                !!u &&
                !!p &&
                (d === Qd.RetryRequest ||
                  (!u.resolved && d === Qd.SendAlternateToPenaltyBox));
            if (g) {
              var y;
              if (f >= p.maxNumRetry) return !1;
              if (l && (y = r.context) != null && y.deliveryDirectives) {
                var v, b;
                this.warn(
                  Ce(
                    (v = Ce(
                      (b = "Retrying playlist loading ".concat(f + 1, "/"))
                    ).call(b, p.maxNumRetry, ' after "'))
                  ).call(v, o, '" without delivery-directives')
                ),
                  this.loadPlaylist();
              } else {
                var w,
                  k,
                  D,
                  $ = Jse(p, f);
                this.clearTimer(),
                  (this.timer = self.setTimeout(function () {
                    return i.loadPlaylist();
                  }, $)),
                  this.warn(
                    Ce(
                      (w = Ce(
                        (k = Ce(
                          (D = "Retrying playlist loading ".concat(f + 1, "/"))
                        ).call(D, p.maxNumRetry, ' after "'))
                      ).call(k, o, '" in '))
                    ).call(w, $, "ms")
                  );
              }
              (r.levelRetry = !0), (u.resolved = !0);
            }
            return g;
          },
        },
      ]),
      n
    );
  })(),
  p7t = (function (t) {
    so(n, x9e);
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n),
        ((i = e.call(this, r, "audio-track-controller")).tracks = []),
        (i.groupIds = null),
        (i.tracksInGroup = []),
        (i.trackId = -1),
        (i.currentTrack = null),
        (i.selectDefaultTrack = !0),
        i.registerListeners(),
        i
      );
    }
    return (
      Kn(n, [
        {
          key: "registerListeners",
          value: function () {
            var r = this.hls;
            r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.on(_t.MANIFEST_PARSED, this.onManifestParsed, this),
              r.on(_t.LEVEL_LOADING, this.onLevelLoading, this),
              r.on(_t.LEVEL_SWITCHING, this.onLevelSwitching, this),
              r.on(_t.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
              r.on(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.off(_t.MANIFEST_PARSED, this.onManifestParsed, this),
              r.off(_t.LEVEL_LOADING, this.onLevelLoading, this),
              r.off(_t.LEVEL_SWITCHING, this.onLevelSwitching, this),
              r.off(_t.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
              r.off(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unregisterListeners(),
              (this.tracks.length = 0),
              (this.tracksInGroup.length = 0),
              (this.currentTrack = null),
              Eo(po(n.prototype), "destroy", this).call(this);
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            (this.tracks = []),
              (this.tracksInGroup = []),
              (this.groupIds = null),
              (this.currentTrack = null),
              (this.trackId = -1),
              (this.selectDefaultTrack = !0);
          },
        },
        {
          key: "onManifestParsed",
          value: function (r, i) {
            this.tracks = i.audioTracks || [];
          },
        },
        {
          key: "onAudioTrackLoaded",
          value: function (r, i) {
            var o,
              l,
              u,
              c,
              d,
              h = i.id,
              f = i.groupId,
              p = i.details,
              g = this.tracksInGroup[h];
            if (g && g.groupId === f) {
              var y = g.details;
              (g.details = i.details),
                this.log(
                  Ce(
                    (o = Ce(
                      (l = Ce(
                        (u = Ce(
                          (c = Ce((d = "Audio track ".concat(h, ' "'))).call(
                            d,
                            g.name,
                            '" lang:'
                          ))
                        ).call(c, g.lang, " group:"))
                      ).call(u, f, " loaded ["))
                    ).call(l, p.startSN, "-"))
                  ).call(o, p.endSN, "]")
                ),
                h === this.trackId && this.playlistLoaded(h, i, y);
            } else {
              var v, b;
              this.warn(
                Ce(
                  (v = Ce(
                    (b = "Audio track with id:".concat(h, " and group:"))
                  ).call(b, f, " not found in active group "))
                ).call(v, g == null ? void 0 : g.groupId)
              );
            }
          },
        },
        {
          key: "onLevelLoading",
          value: function (r, i) {
            this.switchLevel(i.level);
          },
        },
        {
          key: "onLevelSwitching",
          value: function (r, i) {
            this.switchLevel(i.level);
          },
        },
        {
          key: "switchLevel",
          value: function (r) {
            var i = this.hls.levels[r];
            if (i) {
              var o = i.audioGroups || null,
                l = this.groupIds,
                u = this.currentTrack;
              if (
                !o ||
                (l == null ? void 0 : l.length) !==
                  (o == null ? void 0 : o.length) ||
                (o != null &&
                  o.some(function ($) {
                    return (l == null ? void 0 : qt(l).call(l, $)) === -1;
                  }))
              ) {
                var c, d;
                (this.groupIds = o),
                  (this.trackId = -1),
                  (this.currentTrack = null);
                var h = _r((c = this.tracks)).call(c, function ($) {
                  return !o || qt(o).call(o, $.groupId) !== -1;
                });
                if (h.length)
                  this.selectDefaultTrack &&
                    !h.some(function ($) {
                      return $.default;
                    }) &&
                    (this.selectDefaultTrack = !1),
                    h.forEach(function ($, N) {
                      $.id = N;
                    });
                else if (!u && !this.tracksInGroup.length) return;
                this.tracksInGroup = h;
                var f = this.hls.config.audioPreference;
                if (!u && f) {
                  var p = lv(f, h, OA);
                  if (p > -1) u = h[p];
                  else {
                    var g = lv(f, this.tracks);
                    u = this.tracks[g];
                  }
                }
                var y = this.findTrackId(u);
                y === -1 && u && (y = this.findTrackId(null));
                var v = { audioTracks: h };
                this.log(
                  Ce(
                    (d = "Updating audio tracks, ".concat(
                      h.length,
                      " track(s) found in group(s): "
                    ))
                  ).call(d, o == null ? void 0 : o.join(","))
                ),
                  this.hls.trigger(_t.AUDIO_TRACKS_UPDATED, v);
                var b = this.trackId;
                if (y !== -1 && b === -1) this.setAudioTrack(y);
                else if (h.length && b === -1) {
                  var w,
                    k,
                    D = new Error(
                      Ce(
                        (w =
                          "No audio track selected for current audio group-ID(s): ".concat(
                            (k = this.groupIds) == null ? void 0 : k.join(","),
                            " track count: "
                          ))
                      ).call(w, h.length)
                    );
                  this.warn(D.message),
                    this.hls.trigger(_t.ERROR, {
                      type: no.MEDIA_ERROR,
                      details: kr.AUDIO_TRACK_LOAD_ERROR,
                      fatal: !0,
                      error: D,
                    });
                }
              }
            }
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            var o;
            !i.fatal &&
              i.context &&
              (i.context.type !== F1.AUDIO_TRACK ||
                i.context.id !== this.trackId ||
                (this.groupIds &&
                  qt((o = this.groupIds)).call(o, i.context.groupId) === -1) ||
                this.checkRetry(i));
          },
        },
        {
          key: "allAudioTracks",
          get: function () {
            return this.tracks;
          },
        },
        {
          key: "audioTracks",
          get: function () {
            return this.tracksInGroup;
          },
        },
        {
          key: "audioTrack",
          get: function () {
            return this.trackId;
          },
          set: function (r) {
            (this.selectDefaultTrack = !1), this.setAudioTrack(r);
          },
        },
        {
          key: "setAudioOption",
          value: function (r) {
            var i = this.hls;
            if (((i.config.audioPreference = r), r)) {
              var o = this.allAudioTracks;
              if (((this.selectDefaultTrack = !1), o.length)) {
                var l = this.currentTrack;
                if (l && Yk(r, l, OA)) return l;
                var u = lv(r, this.tracksInGroup, OA);
                if (u > -1) {
                  var c = this.tracksInGroup[u];
                  return this.setAudioTrack(u), c;
                }
                if (l) {
                  var d = i.loadLevel;
                  d === -1 && (d = i.firstAutoLevel);
                  var h = nBt(r, i.levels, o, d, OA);
                  if (h === -1) return null;
                  i.nextLoadLevel = h;
                }
                if (r.channels || r.audioCodec) {
                  var f = lv(r, o);
                  if (f > -1) return o[f];
                }
              }
            }
            return null;
          },
        },
        {
          key: "setAudioTrack",
          value: function (r) {
            var i,
              o,
              l,
              u,
              c = this.tracksInGroup;
            if (r < 0 || r >= c.length)
              this.warn("Invalid audio track id: ".concat(r));
            else {
              this.selectDefaultTrack = !1;
              var d = this.currentTrack,
                h = c[r],
                f = h.details && !h.details.live;
              if (
                !(
                  (r === this.trackId && h === d && f) ||
                  (this.log(
                    Ce(
                      (i = Ce(
                        (o = Ce(
                          (l = Ce(
                            (u = "Switching to audio-track ".concat(r, ' "'))
                          ).call(u, h.name, '" lang:'))
                        ).call(l, h.lang, " group:"))
                      ).call(o, h.groupId, " channels:"))
                    ).call(i, h.channels)
                  ),
                  (this.trackId = r),
                  (this.currentTrack = h),
                  this.hls.trigger(_t.AUDIO_TRACK_SWITCHING, fl({}, h)),
                  f)
                )
              ) {
                var p = this.switchParams(
                  h.url,
                  d == null ? void 0 : d.details,
                  h.details
                );
                this.loadPlaylist(p);
              }
            }
          },
        },
        {
          key: "findTrackId",
          value: function (r) {
            for (var i = this.tracksInGroup, o = 0; o < i.length; o++) {
              var l = i[o];
              if (
                (!this.selectDefaultTrack || l.default) &&
                (!r || Yk(r, l, OA))
              )
                return o;
            }
            if (r) {
              for (
                var u = r.name,
                  c = r.lang,
                  d = r.assocLang,
                  h = r.characteristics,
                  f = r.audioCodec,
                  p = r.channels,
                  g = 0;
                g < i.length;
                g++
              )
                if (
                  Yk(
                    {
                      name: u,
                      lang: c,
                      assocLang: d,
                      characteristics: h,
                      audioCodec: f,
                      channels: p,
                    },
                    i[g],
                    OA
                  )
                )
                  return g;
              for (var y = 0; y < i.length; y++) {
                var v = i[y];
                if (
                  HI(r.attrs, v.attrs, [
                    "LANGUAGE",
                    "ASSOC-LANGUAGE",
                    "CHARACTERISTICS",
                  ])
                )
                  return y;
              }
              for (var b = 0; b < i.length; b++) {
                var w = i[b];
                if (HI(r.attrs, w.attrs, ["LANGUAGE"])) return b;
              }
            }
            return -1;
          },
        },
        {
          key: "loadPlaylist",
          value: function (r) {
            Eo(po(n.prototype), "loadPlaylist", this).call(this);
            var i = this.currentTrack;
            this.shouldLoadPlaylist(i) &&
              rBt(i.url, this.hls) &&
              this.scheduleLoading(i, r);
          },
        },
        {
          key: "loadingPlaylist",
          value: function (r, i) {
            var o, l, u, c, d, h;
            Eo(po(n.prototype), "loadingPlaylist", this).call(this, r, i);
            var f = r.id,
              p = r.groupId,
              g = this.getUrlWithDirectives(r.url, i),
              y = r.details,
              v = y == null ? void 0 : y.age;
            this.log(
              Ce(
                (o = Ce(
                  (l = Ce(
                    (u = Ce(
                      (c = Ce(
                        (d = Ce(
                          (h = "Loading audio-track ".concat(f, ' "'))
                        ).call(h, r.name, '" lang:'))
                      ).call(d, r.lang, " group:"))
                    ).call(c, p))
                  ).call(
                    u,
                    (i == null ? void 0 : i.msn) !== void 0
                      ? " at sn " + i.msn + " part " + i.part
                      : ""
                  ))
                ).call(
                  l,
                  v && y.live
                    ? " age " + v.toFixed(1) + ((y.type && " " + y.type) || "")
                    : "",
                  " "
                ))
              ).call(o, g)
            ),
              this.hls.trigger(_t.AUDIO_TRACK_LOADING, {
                url: g,
                id: f,
                groupId: p,
                deliveryDirectives: i || null,
                track: r,
              });
          },
        },
      ]),
      n
    );
  })(),
  g7t = (function () {
    function t(e) {
      Wn(this, t),
        (this.tracks = void 0),
        (this.queues = { video: [], audio: [], audiovideo: [] }),
        (this.tracks = e);
    }
    return (
      Kn(t, [
        {
          key: "destroy",
          value: function () {
            this.tracks = this.queues = null;
          },
        },
        {
          key: "append",
          value: function (e, n, r) {
            if (this.queues !== null && this.tracks !== null) {
              var i = this.queues[n];
              i.push(e), i.length !== 1 || r || this.executeNext(n);
            }
          },
        },
        {
          key: "appendBlocker",
          value: function (e) {
            var n = this;
            return new Ar(function (r) {
              var i = {
                label: "async-blocker",
                execute: r,
                onStart: function () {},
                onComplete: function () {},
                onError: function () {},
              };
              n.append(i, e);
            });
          },
        },
        {
          key: "prependBlocker",
          value: function (e) {
            var n = this;
            return new Ar(function (r) {
              if (n.queues) {
                var i = {
                  label: "async-blocker-prepend",
                  execute: r,
                  onStart: function () {},
                  onComplete: function () {},
                  onError: function () {},
                };
                n.queues[e].unshift(i);
              }
            });
          },
        },
        {
          key: "removeBlockers",
          value: function () {
            this.queues !== null &&
              [
                this.queues.video,
                this.queues.audio,
                this.queues.audiovideo,
              ].forEach(function (e) {
                var n,
                  r = (n = e[0]) == null ? void 0 : n.label;
                (r !== "async-blocker" && r !== "async-blocker-prepend") ||
                  (e[0].execute(), tl(e).call(e, 0, 1));
              });
          },
        },
        {
          key: "unblockAudio",
          value: function (e) {
            this.queues !== null &&
              this.queues.audio[0] === e &&
              this.shiftAndExecuteNext("audio");
          },
        },
        {
          key: "executeNext",
          value: function (e) {
            if (this.queues !== null && this.tracks !== null) {
              var n = this.queues[e];
              if (n.length) {
                var r = n[0];
                try {
                  r.execute();
                } catch (l) {
                  var i;
                  if (
                    (r.onError(l), this.queues === null || this.tracks === null)
                  )
                    return;
                  var o = (i = this.tracks[e]) == null ? void 0 : i.buffer;
                  (o != null && o.updating) || this.shiftAndExecuteNext(e);
                }
              }
            }
          },
        },
        {
          key: "shiftAndExecuteNext",
          value: function (e) {
            this.queues !== null &&
              (this.queues[e].shift(), this.executeNext(e));
          },
        },
        {
          key: "current",
          value: function (e) {
            var n;
            return ((n = this.queues) == null ? void 0 : n[e][0]) || null;
          },
        },
        {
          key: "toString",
          value: function () {
            var e,
              n,
              r = this.queues,
              i = this.tracks;
            return r === null || i === null
              ? "<destroyed>"
              : Ce(
                  (e = Ce(
                    (n = `
`.concat(
                      this.list("video"),
                      `
`
                    ))
                  ).call(
                    n,
                    this.list("audio"),
                    `
`
                  ))
                ).call(e, this.list("audiovideo"), "}");
          },
        },
        {
          key: "list",
          value: function (e) {
            var n, r, i, o;
            return ((i = this.queues) != null && i[e]) ||
              ((o = this.tracks) != null && o[e])
              ? Ce(
                  (n = Ce((r = "".concat(e, ": ("))).call(
                    r,
                    this.listSbInfo(e),
                    ") "
                  ))
                ).call(n, this.listOps(e))
              : "";
          },
        },
        {
          key: "listSbInfo",
          value: function (e) {
            var n,
              r,
              i,
              o = (i = this.tracks) == null ? void 0 : i[e],
              l = o == null ? void 0 : o.buffer;
            return l
              ? Ce(
                  (n = Ce(
                    (r = "SourceBuffer".concat(l.updating ? " updating" : ""))
                  ).call(r, o.ended ? " ended" : ""))
                ).call(n, o.ending ? " ending" : "")
              : "none";
          },
        },
        {
          key: "listOps",
          value: function (e) {
            var n, r;
            return (
              ((r = this.queues) == null
                ? void 0
                : On((n = r[e]))
                    .call(n, function (i) {
                      return i.label;
                    })
                    .join(", ")) || ""
            );
          },
        },
      ]),
      t
    );
  })(),
  c1e = /(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,
  L9e = "HlsJsTrackRemovedError",
  m7t = (function (t) {
    so(n, xI(Error));
    var e = lo(n);
    function n(r) {
      var i;
      return Wn(this, n), ((i = e.call(this, r)).name = L9e), i;
    }
    return Kn(n);
  })(),
  y7t = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r, i) {
      var o;
      return (
        Wn(this, n),
        ((o = e.call(this, "buffer-controller", r.logger)).hls = void 0),
        (o.fragmentTracker = void 0),
        (o.details = null),
        (o._objectUrl = null),
        (o.operationQueue = null),
        (o.bufferCodecEventsTotal = 0),
        (o.media = null),
        (o.mediaSource = null),
        (o.lastMpegAudioChunk = null),
        (o.blockedAudioAppend = null),
        (o.lastVideoAppendEnd = 0),
        (o.appendSource = void 0),
        (o.transferData = void 0),
        (o.overrides = void 0),
        (o.appendErrors = { audio: 0, video: 0, audiovideo: 0 }),
        (o.tracks = {}),
        (o.sourceBuffers = [
          [null, null],
          [null, null],
        ]),
        (o._onEndStreaming = function (l) {
          var u;
          o.hls &&
            ((u = o.mediaSource) == null ? void 0 : u.readyState) === "open" &&
            o.hls.pauseBuffering();
        }),
        (o._onStartStreaming = function (l) {
          o.hls && o.hls.resumeBuffering();
        }),
        (o._onMediaSourceOpen = function (l) {
          var u = os(o),
            c = u.media,
            d = u.mediaSource;
          l && o.log("Media source opened"),
            c &&
              d &&
              (c.removeEventListener("emptied", o._onMediaEmptied),
              o.updateDuration(),
              o.hls.trigger(_t.MEDIA_ATTACHED, { media: c, mediaSource: d }),
              d.removeEventListener("sourceopen", o._onMediaSourceOpen),
              o.mediaSource !== null && o.checkPendingTracks());
        }),
        (o._onMediaSourceClose = function () {
          o.log("Media source closed");
        }),
        (o._onMediaSourceEnded = function () {
          o.log("Media source ended");
        }),
        (o._onMediaEmptied = function () {
          var l,
            u = os(o),
            c = u.mediaSrc,
            d = u._objectUrl;
          c !== d &&
            o.error(
              Ce(
                (l =
                  "Media element src was set while attaching MediaSource (".concat(
                    d,
                    " > "
                  ))
              ).call(l, c, ")")
            );
        }),
        (o.hls = r),
        (o.fragmentTracker = i),
        (o.appendSource = B9t(wx(r.config.preferManagedMediaSource))),
        o.initTracks(),
        o.registerListeners(),
        o
      );
    }
    return (
      Kn(n, [
        {
          key: "hasSourceTypes",
          value: function () {
            return Dn(this.tracks).length > 0;
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unregisterListeners(),
              (this.details = null),
              (this.lastMpegAudioChunk = this.blockedAudioAppend = null),
              (this.transferData = this.overrides = void 0),
              this.operationQueue &&
                (this.operationQueue.destroy(), (this.operationQueue = null)),
              (this.hls = this.fragmentTracker = null),
              (this._onMediaSourceOpen = this._onMediaSourceClose = null),
              (this._onMediaSourceEnded = null),
              (this._onStartStreaming = this._onEndStreaming = null);
          },
        },
        {
          key: "registerListeners",
          value: function () {
            var r = this.hls;
            r.on(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
              r.on(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
              r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.on(_t.MANIFEST_PARSED, this.onManifestParsed, this),
              r.on(_t.BUFFER_RESET, this.onBufferReset, this),
              r.on(_t.BUFFER_APPENDING, this.onBufferAppending, this),
              r.on(_t.BUFFER_CODECS, this.onBufferCodecs, this),
              r.on(_t.BUFFER_EOS, this.onBufferEos, this),
              r.on(_t.BUFFER_FLUSHING, this.onBufferFlushing, this),
              r.on(_t.LEVEL_UPDATED, this.onLevelUpdated, this),
              r.on(_t.FRAG_PARSED, this.onFragParsed, this),
              r.on(_t.FRAG_CHANGED, this.onFragChanged, this),
              r.on(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r.off(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
              r.off(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
              r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.off(_t.MANIFEST_PARSED, this.onManifestParsed, this),
              r.off(_t.BUFFER_RESET, this.onBufferReset, this),
              r.off(_t.BUFFER_APPENDING, this.onBufferAppending, this),
              r.off(_t.BUFFER_CODECS, this.onBufferCodecs, this),
              r.off(_t.BUFFER_EOS, this.onBufferEos, this),
              r.off(_t.BUFFER_FLUSHING, this.onBufferFlushing, this),
              r.off(_t.LEVEL_UPDATED, this.onLevelUpdated, this),
              r.off(_t.FRAG_PARSED, this.onFragParsed, this),
              r.off(_t.FRAG_CHANGED, this.onFragChanged, this),
              r.off(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "transferMedia",
          value: function () {
            var r = this,
              i = this.media,
              o = this.mediaSource;
            if (!i) return null;
            var l = {};
            if (this.operationQueue) {
              var u = this.isUpdating();
              u || this.operationQueue.removeBlockers();
              var c,
                d,
                h = this.isQueued();
              (u || h) &&
                this.warn(
                  Ce(
                    (c = Ce(
                      (d = "Transfering MediaSource with".concat(
                        h ? " operations in queue" : ""
                      ))
                    ).call(d, u ? " updating SourceBuffer(s)" : "", " "))
                  ).call(c, this.operationQueue)
                ),
                this.operationQueue.destroy();
            }
            var f = this.transferData;
            return (
              !this.sourceBufferCount && f && f.mediaSource === o
                ? cu(l, f.tracks)
                : this.sourceBuffers.forEach(function (p) {
                    var g = hs(p, 1)[0];
                    g && ((l[g] = cu({}, r.tracks[g])), r.removeBuffer(g)),
                      (p[0] = p[1] = null);
                  }),
              { media: i, mediaSource: o, tracks: l }
            );
          },
        },
        {
          key: "initTracks",
          value: function () {
            (this.sourceBuffers = [
              [null, null],
              [null, null],
            ]),
              (this.tracks = {}),
              this.resetQueue(),
              this.resetAppendErrors(),
              (this.lastMpegAudioChunk = this.blockedAudioAppend = null),
              (this.lastVideoAppendEnd = 0);
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            (this.bufferCodecEventsTotal = 0), (this.details = null);
          },
        },
        {
          key: "onManifestParsed",
          value: function (r, i) {
            var o,
              l = 2;
            ((i.audio && !i.video) || !i.altAudio) && (l = 1),
              (this.bufferCodecEventsTotal = l),
              this.log("".concat(l, " bufferCodec event(s) expected.")),
              (o = this.transferData) != null &&
                o.mediaSource &&
                this.sourceBufferCount &&
                l &&
                this.bufferCreated();
          },
        },
        {
          key: "onMediaAttaching",
          value: function (r, i) {
            var o = (this.media = i.media),
              l = wx(this.appendSource);
            if (((this.transferData = this.overrides = void 0), o && l)) {
              var u = !!i.mediaSource;
              (u || i.overrides) &&
                ((this.transferData = i), (this.overrides = i.overrides));
              var c = (this.mediaSource = i.mediaSource || new l());
              if ((this.assignMediaSource(c), u))
                (this._objectUrl = o.src), this.attachTransferred();
              else {
                var d = (this._objectUrl = Bs.createObjectURL(c));
                if (this.appendSource)
                  try {
                    o.removeAttribute("src");
                    var h = self.ManagedMediaSource;
                    (o.disableRemotePlayback =
                      o.disableRemotePlayback || (h && c instanceof h)),
                      d1e(o),
                      v7t(o, d),
                      o.load();
                  } catch {
                    o.src = d;
                  }
                else o.src = d;
              }
              o.addEventListener("emptied", this._onMediaEmptied);
            }
          },
        },
        {
          key: "assignMediaSource",
          value: function (r) {
            var i, o, l;
            this.log(
              Ce(
                (i = "".concat(
                  ((o = this.transferData) == null ? void 0 : o.mediaSource) ===
                    r
                    ? "transferred"
                    : "created",
                  " media source: "
                ))
              ).call(i, (l = r.constructor) == null ? void 0 : l.name)
            ),
              r.addEventListener("sourceopen", this._onMediaSourceOpen),
              r.addEventListener("sourceended", this._onMediaSourceEnded),
              r.addEventListener("sourceclose", this._onMediaSourceClose),
              this.appendSource &&
                (r.addEventListener("startstreaming", this._onStartStreaming),
                r.addEventListener("endstreaming", this._onEndStreaming));
          },
        },
        {
          key: "attachTransferred",
          value: function () {
            var r = this,
              i = this.media,
              o = this.transferData;
            if (o && i) {
              var l = this.tracks,
                u = o.tracks,
                c = u ? Dn(u) : null,
                d = c ? c.length : 0,
                h = function () {
                  r.media && r.mediaSourceOpenOrEnded && r._onMediaSourceOpen();
                };
              if (u && c && d) {
                var f, p;
                if (!this.tracksReady)
                  return (
                    (this.hls.config.startFragPrefetch = !0),
                    void this.log(
                      "attachTransferred: waiting for SourceBuffer track info"
                    )
                  );
                if (
                  (this.log(
                    Ce(
                      (f = Ce(
                        (p =
                          "attachTransferred: (bufferCodecEventsTotal ".concat(
                            this.bufferCodecEventsTotal,
                            `)
required tracks: `
                          ))
                      ).call(
                        p,
                        lr(l, function ($, N) {
                          return $ === "initSegment" ? void 0 : N;
                        }),
                        `;
transfer tracks: `
                      ))
                    ).call(
                      f,
                      lr(u, function ($, N) {
                        return $ === "initSegment" ? void 0 : N;
                      }),
                      "}"
                    )
                  ),
                  !Y8e(u, l))
                ) {
                  var g, y, v;
                  (o.mediaSource = null), (o.tracks = void 0);
                  var b,
                    w = i.currentTime,
                    k = this.details,
                    D = Math.max(
                      w,
                      (k == null ? void 0 : k.fragments[0].start) || 0
                    );
                  return D - w > 1
                    ? void this.log(
                        Ce(
                          (b =
                            "attachTransferred: waiting for playback to reach new tracks start time ".concat(
                              w,
                              " -> "
                            ))
                        ).call(b, D)
                      )
                    : (this.warn(
                        Ce(
                          (g = Ce(
                            (y = Ce(
                              (v =
                                'attachTransferred: resetting MediaSource for incompatible tracks ("'.concat(
                                  Dn(u),
                                  '"->"'
                                ))
                            ).call(v, Dn(l), '") start time: '))
                          ).call(y, D, " currentTime: "))
                        ).call(g, w)
                      ),
                      this.onMediaDetaching(_t.MEDIA_DETACHING, {}),
                      this.onMediaAttaching(_t.MEDIA_ATTACHING, o),
                      void (i.currentTime = D));
                }
                (this.transferData = void 0),
                  c.forEach(function ($) {
                    var N = $,
                      P = u[N];
                    if (P) {
                      var I = P.buffer;
                      if (I) {
                        var O = r.fragmentTracker,
                          X = P.id;
                        if (O.hasFragments(X) || O.hasParts(X)) {
                          var G = dc.getBuffered(I);
                          O.detectEvictedFragments(N, G, X, null, !0);
                        }
                        var H = jV(N),
                          E = [N, I];
                        (r.sourceBuffers[H] = E),
                          I.updating &&
                            r.operationQueue &&
                            r.operationQueue.prependBlocker(N),
                          r.trackSourceBuffer(N, P);
                      }
                    }
                  }),
                  h(),
                  this.bufferCreated();
              } else
                this.log("attachTransferred: MediaSource w/o SourceBuffers"),
                  h();
            }
          },
        },
        {
          key: "mediaSourceOpenOrEnded",
          get: function () {
            var r,
              i = (r = this.mediaSource) == null ? void 0 : r.readyState;
            return i === "open" || i === "ended";
          },
        },
        {
          key: "onMediaDetaching",
          value: function (r, i) {
            var o = this,
              l = !!i.transferMedia;
            this.transferData = this.overrides = void 0;
            var u = this.media,
              c = this.mediaSource,
              d = this._objectUrl;
            if (c) {
              if (
                (this.log(
                  "media source ".concat(l ? "transferring" : "detaching")
                ),
                l)
              )
                this.sourceBuffers.forEach(function (g) {
                  var y = hs(g, 1)[0];
                  y && o.removeBuffer(y);
                }),
                  this.resetQueue();
              else {
                if (this.mediaSourceOpenOrEnded) {
                  var h = c.readyState === "open";
                  try {
                    for (var f = c.sourceBuffers, p = f.length; p--; )
                      h && f[p].abort(), c.removeSourceBuffer(f[p]);
                    h && c.endOfStream();
                  } catch (g) {
                    this.warn(
                      "onMediaDetaching: ".concat(
                        g.message,
                        " while calling endOfStream"
                      )
                    );
                  }
                }
                this.sourceBufferCount && this.onBufferReset();
              }
              c.removeEventListener("sourceopen", this._onMediaSourceOpen),
                c.removeEventListener("sourceended", this._onMediaSourceEnded),
                c.removeEventListener("sourceclose", this._onMediaSourceClose),
                this.appendSource &&
                  (c.removeEventListener(
                    "startstreaming",
                    this._onStartStreaming
                  ),
                  c.removeEventListener("endstreaming", this._onEndStreaming)),
                (this.mediaSource = null),
                (this._objectUrl = null);
            }
            u &&
              (u.removeEventListener("emptied", this._onMediaEmptied),
              l ||
                (d && Bs.revokeObjectURL(d),
                this.mediaSrc === d
                  ? (u.removeAttribute("src"),
                    this.appendSource && d1e(u),
                    u.load())
                  : this.warn(
                      "media|source.src was changed by a third party - skip cleanup"
                    )),
              (this.media = null)),
              this.hls.trigger(_t.MEDIA_DETACHED, i);
          },
        },
        {
          key: "onBufferReset",
          value: function () {
            var r = this;
            this.sourceBuffers.forEach(function (i) {
              var o = hs(i, 1)[0];
              o && r.resetBuffer(o);
            }),
              this.initTracks();
          },
        },
        {
          key: "resetBuffer",
          value: function (r) {
            var i,
              o = (i = this.tracks[r]) == null ? void 0 : i.buffer;
            if ((this.removeBuffer(r), o))
              try {
                var l;
                (l = this.mediaSource) != null &&
                  l.sourceBuffers.length &&
                  this.mediaSource.removeSourceBuffer(o);
              } catch (u) {
                this.warn("onBufferReset ".concat(r), u);
              }
            delete this.tracks[r];
          },
        },
        {
          key: "removeBuffer",
          value: function (r) {
            this.removeBufferListeners(r),
              (this.sourceBuffers[jV(r)] = [null, null]);
            var i = this.tracks[r];
            i && (i.buffer = void 0);
          },
        },
        {
          key: "resetQueue",
          value: function () {
            this.operationQueue && this.operationQueue.destroy(),
              (this.operationQueue = new g7t(this.tracks));
          },
        },
        {
          key: "onBufferCodecs",
          value: function (r, i) {
            var o,
              l = this,
              u = this.tracks,
              c = Dn(i);
            this.log(
              Ce(
                (o = 'BUFFER_CODECS: "'.concat(c, '" (current SB count '))
              ).call(o, this.sourceBufferCount, ")")
            );
            var d,
              h =
                ("audiovideo" in i && (u.audio || u.video)) ||
                (u.audiovideo && ("audio" in i || "video" in i)),
              f =
                !h &&
                this.sourceBufferCount &&
                this.media &&
                c.some(function (p) {
                  return !u[p];
                });
            h || f
              ? this.warn(
                  Ce(
                    (d = 'Unsupported transition between "'.concat(
                      Dn(u),
                      '" and "'
                    ))
                  ).call(d, c, '" SourceBuffers')
                )
              : (c.forEach(function (p) {
                  var g,
                    y,
                    v,
                    b = i[p],
                    w = b.id,
                    k = b.codec,
                    D = b.levelCodec,
                    $ = b.container,
                    N = b.metadata,
                    P = u[p],
                    I =
                      (g = l.transferData) == null || (y = g.tracks) == null
                        ? void 0
                        : y[p],
                    O = I != null && I.buffer ? I : P,
                    X =
                      (O == null ? void 0 : O.pendingCodec) ||
                      (O == null ? void 0 : O.codec),
                    G = O == null ? void 0 : O.levelCodec,
                    H = !O || !!l.hls.config.assetPlayerId;
                  P ||
                    (P = u[p] =
                      {
                        buffer: void 0,
                        listeners: [],
                        codec: k,
                        container: $,
                        levelCodec: D,
                        metadata: N,
                        id: w,
                      });
                  var E,
                    S = OV(X, G),
                    L = S == null ? void 0 : S.replace(c1e, "$1"),
                    W = OV(k, D),
                    F = (v = W) == null ? void 0 : v.replace(c1e, "$1");
                  W &&
                    (L !== F || H) &&
                    (jn(p).call(p, 0, 5) === "audio" &&
                      (W = Xee(W, l.appendSource)),
                    l.log(
                      Ce((E = "switching codec ".concat(X, " to "))).call(E, W)
                    ),
                    W !== (P.pendingCodec || P.codec) && (P.pendingCodec = W),
                    (P.container = $),
                    l.appendChangeType(p, $, W));
                }),
                (this.tracksReady || this.sourceBufferCount) &&
                  (i.tracks = this.sourceBufferTracks),
                this.sourceBufferCount ||
                  (this.mediaSourceOpenOrEnded && this.checkPendingTracks()));
          },
        },
        {
          key: "sourceBufferTracks",
          get: function () {
            var r,
              i = this;
            return ga((r = Dn(this.tracks))).call(
              r,
              function (o, l) {
                var u = i.tracks[l];
                return (
                  (o[l] = {
                    id: u.id,
                    container: u.container,
                    codec: u.codec,
                    levelCodec: u.levelCodec,
                  }),
                  o
                );
              },
              {}
            );
          },
        },
        {
          key: "appendChangeType",
          value: function (r, i, o) {
            var l,
              u = this,
              c = Ce((l = "".concat(i, ";codecs="))).call(l, o),
              d = {
                label: "change-type=".concat(c),
                execute: function () {
                  var h = u.tracks[r];
                  if (h) {
                    var f,
                      p = h.buffer;
                    p != null &&
                      p.changeType &&
                      (u.log(
                        Ce(
                          (f = "changing ".concat(r, " sourceBuffer type to "))
                        ).call(f, c)
                      ),
                      p.changeType(c),
                      (h.codec = o),
                      (h.container = i));
                  }
                  u.shiftAndExecuteNext(r);
                },
                onStart: function () {},
                onComplete: function () {},
                onError: function (h) {
                  u.warn(
                    "Failed to change ".concat(r, " SourceBuffer type"),
                    h
                  );
                },
              };
            this.append(d, r, this.isPending(this.tracks[r]));
          },
        },
        {
          key: "blockAudio",
          value: function (r) {
            var i,
              o = this,
              l = r.start,
              u = l + 0.05 * r.duration;
            if (
              ((i = this.fragmentTracker.getAppendedFrag(l, wo.MAIN)) == null
                ? void 0
                : i.gap) !== !0
            ) {
              var c = {
                label: "block-audio",
                execute: function () {
                  var d,
                    h = o.tracks.video;
                  (o.lastVideoAppendEnd > u ||
                    (h != null && h.buffer && dc.isBuffered(h.buffer, u)) ||
                    ((d = o.fragmentTracker.getAppendedFrag(u, wo.MAIN)) == null
                      ? void 0
                      : d.gap) === !0) &&
                    ((o.blockedAudioAppend = null),
                    o.shiftAndExecuteNext("audio"));
                },
                onStart: function () {},
                onComplete: function () {},
                onError: function (d) {
                  o.warn("Error executing block-audio operation", d);
                },
              };
              (this.blockedAudioAppend = { op: c, frag: r }),
                this.append(c, "audio", !0);
            }
          },
        },
        {
          key: "unblockAudio",
          value: function () {
            var r = this.blockedAudioAppend,
              i = this.operationQueue;
            r && i && ((this.blockedAudioAppend = null), i.unblockAudio(r.op));
          },
        },
        {
          key: "onBufferAppending",
          value: function (r, i) {
            var o = this,
              l = this.tracks,
              u = i.data,
              c = i.type,
              d = i.parent,
              h = i.frag,
              f = i.part,
              p = i.chunkMeta,
              g = p.buffering[c],
              y = h.sn,
              v = self.performance.now();
            g.start = v;
            var b = h.stats.buffering,
              w = f ? f.stats.buffering : null;
            b.start === 0 && (b.start = v), w && w.start === 0 && (w.start = v);
            var k = l.audio,
              D = !1;
            c === "audio" &&
              (k == null ? void 0 : k.container) === "audio/mpeg" &&
              ((D =
                !this.lastMpegAudioChunk ||
                p.id === 1 ||
                this.lastMpegAudioChunk.sn !== p.sn),
              (this.lastMpegAudioChunk = p));
            var $ = this.tracks.video,
              N = $ == null ? void 0 : $.buffer;
            if (N && y !== "initSegment") {
              var P = f || h,
                I = this.blockedAudioAppend;
              if (c !== "audio" || d === "main" || this.blockedAudioAppend) {
                if (c === "video") {
                  var O = P.end;
                  if (I) {
                    var X = I.frag.start;
                    (O > X ||
                      O < this.lastVideoAppendEnd ||
                      dc.isBuffered(N, X)) &&
                      this.unblockAudio();
                  }
                  this.lastVideoAppendEnd = O;
                }
              } else {
                var G = P.start + 0.05 * P.duration,
                  H = N.buffered,
                  E = this.currentOp("video");
                H.length || E
                  ? !E &&
                    !dc.isBuffered(N, G) &&
                    this.lastVideoAppendEnd < G &&
                    this.blockAudio(P)
                  : this.blockAudio(P);
              }
            }
            var S = (f || h).start,
              L = {
                label: "append-".concat(c),
                execute: function () {
                  if (((g.executeStart = self.performance.now()), D)) {
                    var W = o.tracks[c];
                    if (W) {
                      var F = W.buffer;
                      if (F) {
                        var oe,
                          De,
                          Xe = S - F.timestampOffset;
                        Math.abs(Xe) >= 0.1 &&
                          (o.log(
                            Ce(
                              (oe = Ce(
                                (De =
                                  "Updating audio SourceBuffer timestampOffset to ".concat(
                                    S,
                                    " (delta: "
                                  ))
                              ).call(De, Xe, ") sn: "))
                            ).call(oe, y, ")")
                          ),
                          (F.timestampOffset = S));
                      }
                    }
                  }
                  o.appendExecutor(u, c);
                },
                onStart: function () {},
                onComplete: function () {
                  var W = self.performance.now();
                  (g.executeEnd = g.end = W),
                    b.first === 0 && (b.first = W),
                    w && w.first === 0 && (w.first = W);
                  var F = {};
                  o.sourceBuffers.forEach(function (oe) {
                    var De = hs(oe, 2),
                      Xe = De[0],
                      ze = De[1];
                    Xe && (F[Xe] = dc.getBuffered(ze));
                  }),
                    (o.appendErrors[c] = 0),
                    c === "audio" || c === "video"
                      ? (o.appendErrors.audiovideo = 0)
                      : ((o.appendErrors.audio = 0),
                        (o.appendErrors.video = 0)),
                    o.hls.trigger(_t.BUFFER_APPENDED, {
                      type: c,
                      frag: h,
                      part: f,
                      chunkMeta: p,
                      parent: h.type,
                      timeRanges: F,
                    });
                },
                onError: function (W) {
                  var F,
                    oe = {
                      type: no.MEDIA_ERROR,
                      parent: h.type,
                      details: kr.BUFFER_APPEND_ERROR,
                      sourceBufferName: c,
                      frag: h,
                      part: f,
                      chunkMeta: p,
                      error: W,
                      err: W,
                      fatal: !1,
                    };
                  if (W.code === DOMException.QUOTA_EXCEEDED_ERR)
                    oe.details = kr.BUFFER_FULL_ERROR;
                  else if (
                    W.code !== DOMException.INVALID_STATE_ERR ||
                    !o.mediaSourceOpenOrEnded ||
                    ((F = o.media) != null && F.error)
                  )
                    if (W.name === L9e)
                      o.sourceBufferCount === 0
                        ? (oe.errorAction = kx(!0))
                        : ++o.appendErrors[c];
                    else {
                      var De,
                        Xe,
                        ze = ++o.appendErrors[c];
                      o.warn(
                        Ce(
                          (De = Ce((Xe = "Failed ".concat(ze, "/"))).call(
                            Xe,
                            o.hls.config.appendErrorMaxRetry,
                            ' times to append segment in "'
                          ))
                        ).call(De, c, '" sourceBuffer')
                      ),
                        ze >= o.hls.config.appendErrorMaxRetry &&
                          (oe.fatal = !0);
                    }
                  else oe.errorAction = kx(!0);
                  o.hls.trigger(_t.ERROR, oe);
                },
              };
            this.append(L, c, this.isPending(this.tracks[c]));
          },
        },
        {
          key: "getFlushOp",
          value: function (r, i, o) {
            var l,
              u,
              c = this;
            return (
              this.log(
                Ce(
                  (l = Ce((u = 'queuing "'.concat(r, '" remove '))).call(
                    u,
                    i,
                    "-"
                  ))
                ).call(l, o)
              ),
              {
                label: "remove",
                execute: function () {
                  c.removeExecutor(r, i, o);
                },
                onStart: function () {},
                onComplete: function () {
                  c.hls.trigger(_t.BUFFER_FLUSHED, { type: r });
                },
                onError: function (d) {
                  var h, f;
                  c.warn(
                    Ce(
                      (h = Ce((f = "Failed to remove ".concat(i, "-"))).call(
                        f,
                        o,
                        ' from "'
                      ))
                    ).call(h, r, '" SourceBuffer'),
                    d
                  );
                },
              }
            );
          },
        },
        {
          key: "onBufferFlushing",
          value: function (r, i) {
            var o = this,
              l = i.type,
              u = i.startOffset,
              c = i.endOffset;
            l
              ? this.append(this.getFlushOp(l, u, c), l)
              : this.sourceBuffers.forEach(function (d) {
                  var h = hs(d, 1)[0];
                  h && o.append(o.getFlushOp(h, u, c), h);
                });
          },
        },
        {
          key: "onFragParsed",
          value: function (r, i) {
            var o = this,
              l = i.frag,
              u = i.part,
              c = [],
              d = u ? u.elementaryStreams : l.elementaryStreams;
            d[nh.AUDIOVIDEO]
              ? c.push("audiovideo")
              : (d[nh.AUDIO] && c.push("audio"),
                d[nh.VIDEO] && c.push("video"));
            var h, f;
            c.length === 0 &&
              this.warn(
                Ce(
                  (h = Ce(
                    (f =
                      "Fragments must have at least one ElementaryStreamType set. type: ".concat(
                        l.type,
                        " level: "
                      ))
                  ).call(f, l.level, " sn: "))
                ).call(h, l.sn)
              ),
              this.blockBuffers(function () {
                var p = self.performance.now();
                (l.stats.buffering.end = p), u && (u.stats.buffering.end = p);
                var g = u ? u.stats : l.stats;
                o.hls.trigger(_t.FRAG_BUFFERED, {
                  frag: l,
                  part: u,
                  stats: g,
                  id: l.type,
                });
              }, c);
          },
        },
        {
          key: "onFragChanged",
          value: function (r, i) {
            this.trimBuffers();
          },
        },
        {
          key: "bufferedToEnd",
          get: function () {
            var r = this;
            return (
              this.sourceBufferCount > 0 &&
              !this.sourceBuffers.some(function (i) {
                var o,
                  l,
                  u = hs(i, 1)[0];
                return (
                  u &&
                  (!((o = r.tracks[u]) != null && o.ended) ||
                    ((l = r.tracks[u]) == null ? void 0 : l.ending))
                );
              })
            );
          },
        },
        {
          key: "onBufferEos",
          value: function (r, i) {
            var o,
              l = this;
            this.sourceBuffers.forEach(function (c) {
              var d = hs(c, 1)[0];
              if (d) {
                var h = l.tracks[d];
                (i.type && i.type !== d) ||
                  ((h.ending = !0),
                  h.ended ||
                    ((h.ended = !0),
                    l.log("".concat(d, " buffer reached EOS"))));
              }
            });
            var u =
              ((o = this.overrides) == null ? void 0 : o.endOfStream) !== !1;
            this.sourceBufferCount > 0 &&
              !this.sourceBuffers.some(function (c) {
                var d,
                  h = hs(c, 1)[0];
                return h && !((d = l.tracks[h]) != null && d.ended);
              }) &&
              (this.log("Queueing EOS"),
              this.blockUntilOpen(function () {
                if (
                  (l.sourceBuffers.forEach(function (d) {
                    var h = hs(d, 1)[0];
                    if (h !== null) {
                      var f = l.tracks[h];
                      f && (f.ending = !1);
                    }
                  }),
                  u)
                ) {
                  var c = l.mediaSource;
                  if (!c || c.readyState !== "open")
                    return void (
                      c &&
                      l.log(
                        "Could not call mediaSource.endOfStream(). mediaSource.readyState: ".concat(
                          c.readyState
                        )
                      )
                    );
                  l.log("Calling mediaSource.endOfStream()"), c.endOfStream();
                }
                l.hls.trigger(_t.BUFFERED_TO_END, void 0);
              }));
          },
        },
        {
          key: "onLevelUpdated",
          value: function (r, i) {
            var o = i.details;
            o.fragments.length && ((this.details = o), this.updateDuration());
          },
        },
        {
          key: "updateDuration",
          value: function () {
            var r = this,
              i = this.getDurationAndRange();
            i &&
              this.blockUntilOpen(function () {
                return r.updateMediaSource(i);
              });
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            if (i.details === kr.BUFFER_APPEND_ERROR && i.frag) {
              var o,
                l = (o = i.errorAction) == null ? void 0 : o.nextAutoLevel;
              _a(l) && l !== i.frag.level && this.resetAppendErrors();
            }
          },
        },
        {
          key: "resetAppendErrors",
          value: function () {
            this.appendErrors = { audio: 0, video: 0, audiovideo: 0 };
          },
        },
        {
          key: "trimBuffers",
          value: function () {
            var r = this.hls,
              i = this.details,
              o = this.media;
            if (o && i !== null && this.sourceBufferCount) {
              var l = r.config,
                u = o.currentTime,
                c = i.levelTargetDuration,
                d =
                  i.live && l.liveBackBufferLength !== null
                    ? l.liveBackBufferLength
                    : l.backBufferLength;
              if (_a(d) && d >= 0) {
                var h = Math.max(d, c),
                  f = Math.floor(u / c) * c - h;
                this.flushBackBuffer(u, c, f);
              }
              if (
                _a(l.frontBufferFlushThreshold) &&
                l.frontBufferFlushThreshold > 0
              ) {
                var p = Math.max(
                    l.maxBufferLength,
                    l.frontBufferFlushThreshold
                  ),
                  g = Math.max(p, c),
                  y = Math.floor(u / c) * c + g;
                this.flushFrontBuffer(u, c, y);
              }
            }
          },
        },
        {
          key: "flushBackBuffer",
          value: function (r, i, o) {
            var l = this;
            this.sourceBuffers.forEach(function (u) {
              var c = hs(u, 2),
                d = c[0],
                h = c[1];
              if (h) {
                var f = dc.getBuffered(h);
                if (f.length > 0 && o > f.start(0)) {
                  var p;
                  l.hls.trigger(_t.BACK_BUFFER_REACHED, { bufferEnd: o });
                  var g = l.tracks[d];
                  if ((p = l.details) != null && p.live)
                    l.hls.trigger(_t.LIVE_BACK_BUFFER_REACHED, {
                      bufferEnd: o,
                    });
                  else if (
                    g != null &&
                    g.ended &&
                    f.end(f.length - 1) - r < 2 * i
                  )
                    return void l.log(
                      "Cannot flush ".concat(
                        d,
                        " back buffer while SourceBuffer is in ended state"
                      )
                    );
                  l.hls.trigger(_t.BUFFER_FLUSHING, {
                    startOffset: 0,
                    endOffset: o,
                    type: d,
                  });
                }
              }
            });
          },
        },
        {
          key: "flushFrontBuffer",
          value: function (r, i, o) {
            var l = this;
            this.sourceBuffers.forEach(function (u) {
              var c = hs(u, 2),
                d = c[0],
                h = c[1];
              if (h) {
                var f = dc.getBuffered(h),
                  p = f.length;
                if (p < 2) return;
                var g = f.start(p - 1),
                  y = f.end(p - 1),
                  v = l.tracks[d];
                if (o > g || (r >= g && r <= y)) return;
                if (v != null && v.ended && r - y < 2 * i)
                  return void l.log(
                    "Cannot flush ".concat(
                      d,
                      " front buffer while SourceBuffer is in ended state"
                    )
                  );
                l.hls.trigger(_t.BUFFER_FLUSHING, {
                  startOffset: g,
                  endOffset: 1 / 0,
                  type: d,
                });
              }
            });
          },
        },
        {
          key: "getDurationAndRange",
          value: function () {
            var r,
              i = this.details,
              o = this.mediaSource;
            if (
              !i ||
              !this.media ||
              (o == null ? void 0 : o.readyState) !== "open"
            )
              return null;
            var l = i.edge;
            if (i.live && this.hls.config.liveDurationInfinity) {
              if (
                ((o.duration = 1 / 0),
                i.fragments.length && i.live && o.setLiveSeekableRange)
              ) {
                var u = Math.max(0, i.fragmentStart);
                return { duration: 1 / 0, start: u, end: Math.max(u, l) };
              }
              return { duration: 1 / 0 };
            }
            var c = (r = this.overrides) == null ? void 0 : r.duration;
            if (c) return { duration: c };
            var d = this.media.duration;
            return (l > (_a(o.duration) ? o.duration : 0) && l > d) || !_a(d)
              ? { duration: l }
              : null;
          },
        },
        {
          key: "updateMediaSource",
          value: function (r) {
            var i,
              o,
              l = r.duration,
              u = r.start,
              c = r.end,
              d = this.mediaSource;
            this.media &&
              d &&
              d.readyState === "open" &&
              (d.duration !== l &&
                (_a(l) &&
                  this.log(
                    "Updating MediaSource duration to ".concat(l.toFixed(3))
                  ),
                (d.duration = l)),
              u !== void 0 &&
                c !== void 0 &&
                (this.log(
                  Ce(
                    (i = Ce(
                      (o = "MediaSource duration is set to ".concat(
                        d.duration,
                        ". Setting seekable range to "
                      ))
                    ).call(o, u, "-"))
                  ).call(i, c, ".")
                ),
                d.setLiveSeekableRange(u, c)));
          },
        },
        {
          key: "tracksReady",
          get: function () {
            var r = this.pendingTrackCount;
            return (
              r > 0 &&
              (r >= this.bufferCodecEventsTotal ||
                this.isPending(this.tracks.audiovideo))
            );
          },
        },
        {
          key: "checkPendingTracks",
          value: function () {
            var r,
              i,
              o = this.bufferCodecEventsTotal,
              l = this.pendingTrackCount,
              u = this.tracks;
            if (
              (this.log(
                Ce(
                  (r = Ce(
                    (i = "checkPendingTracks (pending: ".concat(
                      l,
                      " codec events expected: "
                    ))
                  ).call(i, o, ") "))
                ).call(r, lr(u))
              ),
              this.tracksReady)
            ) {
              var c,
                d = (c = this.transferData) == null ? void 0 : c.tracks;
              d && Dn(d).length
                ? this.attachTransferred()
                : (this.createSourceBuffers(), this.bufferCreated());
            }
          },
        },
        {
          key: "bufferCreated",
          value: function () {
            var r = this;
            if (this.sourceBufferCount) {
              var i = {};
              this.sourceBuffers.forEach(function (l) {
                var u = hs(l, 2),
                  c = u[0],
                  d = u[1];
                if (c) {
                  var h = r.tracks[c];
                  i[c] = {
                    buffer: d,
                    container: h.container,
                    codec: h.codec,
                    levelCodec: h.levelCodec,
                    id: h.id,
                    metadata: h.metadata,
                  };
                }
              }),
                this.hls.trigger(_t.BUFFER_CREATED, { tracks: i }),
                this.log(
                  "SourceBuffers created. Running queue: ".concat(
                    this.operationQueue
                  )
                ),
                this.sourceBuffers.forEach(function (l) {
                  var u = hs(l, 1)[0];
                  r.executeNext(u);
                });
            } else {
              var o = new Error(
                "could not create source buffer for media codec(s)"
              );
              this.hls.trigger(_t.ERROR, {
                type: no.MEDIA_ERROR,
                details: kr.BUFFER_INCOMPATIBLE_CODECS_ERROR,
                fatal: !0,
                error: o,
                reason: o.message,
              });
            }
          },
        },
        {
          key: "createSourceBuffers",
          value: function () {
            var r = this.tracks,
              i = this.sourceBuffers,
              o = this.mediaSource;
            if (!o)
              throw new Error(
                "createSourceBuffers called when mediaSource was null"
              );
            for (var l in r) {
              var u = l,
                c = r[u];
              if (this.isPending(c)) {
                var d,
                  h,
                  f,
                  p = this.getTrackCodec(c, u),
                  g = Ce((d = "".concat(c.container, ";codecs="))).call(d, p);
                (c.codec = p),
                  this.log(
                    Ce(
                      (h = Ce(
                        (f = "creating sourceBuffer(".concat(g, ")"))
                      ).call(f, this.currentOp(u) ? " Queued" : "", " "))
                    ).call(h, lr(c))
                  );
                try {
                  var y = o.addSourceBuffer(g),
                    v = jV(u),
                    b = [u, y];
                  (i[v] = b), (c.buffer = y);
                } catch (w) {
                  this.error(
                    "error while trying to add sourceBuffer: ".concat(w.message)
                  ),
                    this.hls.trigger(_t.ERROR, {
                      type: no.MEDIA_ERROR,
                      details: kr.BUFFER_ADD_CODEC_ERROR,
                      fatal: !1,
                      error: w,
                      sourceBufferName: u,
                      mimeType: g,
                    });
                  break;
                }
                this.trackSourceBuffer(u, c);
              }
            }
          },
        },
        {
          key: "getTrackCodec",
          value: function (r, i) {
            var o = OV(r.codec, r.levelCodec);
            return o
              ? jn(i).call(i, 0, 5) === "audio"
                ? Xee(o, this.appendSource)
                : o
              : "";
          },
        },
        {
          key: "trackSourceBuffer",
          value: function (r, i) {
            var o = this,
              l = i.buffer;
            if (l) {
              var u = this.getTrackCodec(i, r);
              (this.tracks[r] = {
                buffer: l,
                codec: u,
                container: i.container,
                levelCodec: i.levelCodec,
                metadata: i.metadata,
                id: i.id,
                listeners: [],
              }),
                this.addBufferListener(r, "updatestart", this.onSBUpdateStart),
                this.addBufferListener(r, "updateend", this.onSBUpdateEnd),
                this.addBufferListener(r, "error", this.onSBUpdateError),
                this.appendSource &&
                  this.addBufferListener(r, "bufferedchange", function (c, d) {
                    var h = d.removedRanges;
                    h != null &&
                      h.length &&
                      o.hls.trigger(_t.BUFFER_FLUSHED, { type: c });
                  });
            }
          },
        },
        {
          key: "mediaSrc",
          get: function () {
            var r,
              i,
              o =
                ((r = this.media) == null || (i = r.querySelector) == null
                  ? void 0
                  : i.call(r, "source")) || this.media;
            return o == null ? void 0 : o.src;
          },
        },
        {
          key: "onSBUpdateStart",
          value: function (r) {
            var i = this.currentOp(r);
            i && i.onStart();
          },
        },
        {
          key: "onSBUpdateEnd",
          value: function (r) {
            var i;
            if (
              ((i = this.mediaSource) == null ? void 0 : i.readyState) !==
              "closed"
            ) {
              var o = this.currentOp(r);
              o && (o.onComplete(), this.shiftAndExecuteNext(r));
            } else this.resetBuffer(r);
          },
        },
        {
          key: "onSBUpdateError",
          value: function (r, i) {
            var o,
              l,
              u = new Error(
                Ce(
                  (o = "".concat(
                    r,
                    " SourceBuffer error. MediaSource readyState: "
                  ))
                ).call(
                  o,
                  (l = this.mediaSource) == null ? void 0 : l.readyState
                )
              );
            this.error("".concat(u), i),
              this.hls.trigger(_t.ERROR, {
                type: no.MEDIA_ERROR,
                details: kr.BUFFER_APPENDING_ERROR,
                sourceBufferName: r,
                error: u,
                fatal: !1,
              });
            var c = this.currentOp(r);
            c && c.onError(u);
          },
        },
        {
          key: "removeExecutor",
          value: function (r, i, o) {
            var l = this.media,
              u = this.mediaSource,
              c = this.tracks[r],
              d = c == null ? void 0 : c.buffer;
            if (!l || !u || !d)
              return (
                this.warn(
                  "Attempting to remove from the ".concat(
                    r,
                    " SourceBuffer, but it does not exist"
                  )
                ),
                void this.shiftAndExecuteNext(r)
              );
            var h,
              f,
              p = _a(l.duration) ? l.duration : 1 / 0,
              g = _a(u.duration) ? u.duration : 1 / 0,
              y = Math.max(0, i),
              v = Math.min(o, p, g);
            v > y && (!c.ending || c.ended)
              ? ((c.ended = !1),
                this.log(
                  Ce(
                    (h = Ce((f = "Removing [".concat(y, ","))).call(
                      f,
                      v,
                      "] from the "
                    ))
                  ).call(h, r, " SourceBuffer")
                ),
                d.remove(y, v))
              : this.shiftAndExecuteNext(r);
          },
        },
        {
          key: "appendExecutor",
          value: function (r, i) {
            var o = this.tracks[i],
              l = o == null ? void 0 : o.buffer;
            if (!l)
              throw new m7t(
                "Attempting to append to the ".concat(
                  i,
                  " SourceBuffer, but it does not exist"
                )
              );
            (o.ending = !1), (o.ended = !1), l.appendBuffer(r);
          },
        },
        {
          key: "blockUntilOpen",
          value: function (r) {
            this.isUpdating() || this.isQueued() ? this.blockBuffers(r) : r();
          },
        },
        {
          key: "isUpdating",
          value: function () {
            return this.sourceBuffers.some(function (r) {
              var i = hs(r, 2),
                o = i[0],
                l = i[1];
              return o && l.updating;
            });
          },
        },
        {
          key: "isQueued",
          value: function () {
            var r = this;
            return this.sourceBuffers.some(function (i) {
              var o = hs(i, 1)[0];
              return o && !!r.currentOp(o);
            });
          },
        },
        {
          key: "isPending",
          value: function (r) {
            return !!r && !r.buffer;
          },
        },
        {
          key: "blockBuffers",
          value: function (r) {
            var i = this,
              o =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : this.sourceBufferTypes;
            if (!o.length)
              return (
                this.log(
                  "Blocking operation requested, but no SourceBuffers exist"
                ),
                void Ar.resolve().then(r)
              );
            var l = this.operationQueue,
              u = On(o).call(o, function (c) {
                return i.appendBlocker(c);
              });
            o.length > 1 && this.blockedAudioAppend && this.unblockAudio(),
              Ar.all(u).then(function (c) {
                l === i.operationQueue && (r(), i.stepOperationQueue(o));
              });
          },
        },
        {
          key: "stepOperationQueue",
          value: function (r) {
            var i = this;
            r.forEach(function (o) {
              var l,
                u = (l = i.tracks[o]) == null ? void 0 : l.buffer;
              u && !u.updating && i.shiftAndExecuteNext(o);
            });
          },
        },
        {
          key: "append",
          value: function (r, i, o) {
            this.operationQueue && this.operationQueue.append(r, i, o);
          },
        },
        {
          key: "appendBlocker",
          value: function (r) {
            if (this.operationQueue)
              return this.operationQueue.appendBlocker(r);
          },
        },
        {
          key: "currentOp",
          value: function (r) {
            return this.operationQueue ? this.operationQueue.current(r) : null;
          },
        },
        {
          key: "executeNext",
          value: function (r) {
            r && this.operationQueue && this.operationQueue.executeNext(r);
          },
        },
        {
          key: "shiftAndExecuteNext",
          value: function (r) {
            this.operationQueue && this.operationQueue.shiftAndExecuteNext(r);
          },
        },
        {
          key: "pendingTrackCount",
          get: function () {
            var r,
              i = this;
            return ga((r = Dn(this.tracks))).call(
              r,
              function (o, l) {
                return o + (i.isPending(i.tracks[l]) ? 1 : 0);
              },
              0
            );
          },
        },
        {
          key: "sourceBufferCount",
          get: function () {
            var r;
            return ga((r = this.sourceBuffers)).call(
              r,
              function (i, o) {
                return i + (hs(o, 1)[0] ? 1 : 0);
              },
              0
            );
          },
        },
        {
          key: "sourceBufferTypes",
          get: function () {
            var r, i;
            return _r(
              (r = On((i = this.sourceBuffers)).call(i, function (o) {
                return hs(o, 1)[0];
              }))
            ).call(r, function (o) {
              return !!o;
            });
          },
        },
        {
          key: "addBufferListener",
          value: function (r, i, o) {
            var l = this.tracks[r];
            if (l) {
              var u = l.buffer;
              if (u) {
                var c = o.bind(this, r);
                l.listeners.push({ event: i, listener: c }),
                  u.addEventListener(i, c);
              }
            }
          },
        },
        {
          key: "removeBufferListeners",
          value: function (r) {
            var i = this.tracks[r];
            if (i) {
              var o = i.buffer;
              o &&
                (i.listeners.forEach(function (l) {
                  o.removeEventListener(l.event, l.listener);
                }),
                (i.listeners.length = 0));
            }
          },
        },
      ]),
      n
    );
  })();
function d1e(t) {
  var e = t.querySelectorAll("source");
  jn([])
    .call(e)
    .forEach(function (n) {
      t.removeChild(n);
    });
}
function v7t(t, e) {
  var n = self.document.createElement("source");
  (n.type = "video/mp4"), (n.src = e), t.appendChild(n);
}
function jV(t) {
  return t === "audio" ? 1 : 0;
}
var b7t = (function () {
    function t(e) {
      Wn(this, t),
        (this.hls = void 0),
        (this.autoLevelCapping = void 0),
        (this.firstLevel = void 0),
        (this.media = void 0),
        (this.restrictedLevels = void 0),
        (this.timer = void 0),
        (this.clientRect = void 0),
        (this.streamController = void 0),
        (this.hls = e),
        (this.autoLevelCapping = Number.POSITIVE_INFINITY),
        (this.firstLevel = -1),
        (this.media = null),
        (this.restrictedLevels = []),
        (this.timer = void 0),
        (this.clientRect = null),
        this.registerListeners();
    }
    return (
      Kn(
        t,
        [
          {
            key: "setStreamController",
            value: function (e) {
              this.streamController = e;
            },
          },
          {
            key: "destroy",
            value: function () {
              this.hls && this.unregisterListener(),
                this.timer && this.stopCapping(),
                (this.media = null),
                (this.clientRect = null),
                (this.hls = this.streamController = null);
            },
          },
          {
            key: "registerListeners",
            value: function () {
              var e = this.hls;
              e.on(_t.FPS_DROP_LEVEL_CAPPING, this.onFpsDropLevelCapping, this),
                e.on(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
                e.on(_t.MANIFEST_PARSED, this.onManifestParsed, this),
                e.on(_t.LEVELS_UPDATED, this.onLevelsUpdated, this),
                e.on(_t.BUFFER_CODECS, this.onBufferCodecs, this),
                e.on(_t.MEDIA_DETACHING, this.onMediaDetaching, this);
            },
          },
          {
            key: "unregisterListener",
            value: function () {
              var e = this.hls;
              e.off(
                _t.FPS_DROP_LEVEL_CAPPING,
                this.onFpsDropLevelCapping,
                this
              ),
                e.off(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
                e.off(_t.MANIFEST_PARSED, this.onManifestParsed, this),
                e.off(_t.LEVELS_UPDATED, this.onLevelsUpdated, this),
                e.off(_t.BUFFER_CODECS, this.onBufferCodecs, this),
                e.off(_t.MEDIA_DETACHING, this.onMediaDetaching, this);
            },
          },
          {
            key: "onFpsDropLevelCapping",
            value: function (e, n) {
              var r = this.hls.levels[n.droppedLevel];
              this.isLevelAllowed(r) &&
                this.restrictedLevels.push({
                  bitrate: r.bitrate,
                  height: r.height,
                  width: r.width,
                });
            },
          },
          {
            key: "onMediaAttaching",
            value: function (e, n) {
              (this.media =
                n.media instanceof HTMLVideoElement ? n.media : null),
                (this.clientRect = null),
                this.timer && this.hls.levels.length && this.detectPlayerSize();
            },
          },
          {
            key: "onManifestParsed",
            value: function (e, n) {
              var r = this.hls;
              (this.restrictedLevels = []),
                (this.firstLevel = n.firstLevel),
                r.config.capLevelToPlayerSize && n.video && this.startCapping();
            },
          },
          {
            key: "onLevelsUpdated",
            value: function (e, n) {
              this.timer &&
                _a(this.autoLevelCapping) &&
                this.detectPlayerSize();
            },
          },
          {
            key: "onBufferCodecs",
            value: function (e, n) {
              this.hls.config.capLevelToPlayerSize &&
                n.video &&
                this.startCapping();
            },
          },
          {
            key: "onMediaDetaching",
            value: function () {
              this.stopCapping(), (this.media = null);
            },
          },
          {
            key: "detectPlayerSize",
            value: function () {
              if (this.media) {
                if (this.mediaHeight <= 0 || this.mediaWidth <= 0)
                  return void (this.clientRect = null);
                var e = this.hls.levels;
                if (e.length) {
                  var n,
                    r,
                    i,
                    o,
                    l = this.hls,
                    u = this.getMaxLevel(e.length - 1);
                  u !== this.autoLevelCapping &&
                    l.logger.log(
                      Ce(
                        (n = Ce(
                          (r = Ce(
                            (i = Ce(
                              (o = "Setting autoLevelCapping to ".concat(
                                u,
                                ": "
                              ))
                            ).call(o, e[u].height, "p@"))
                          ).call(i, e[u].bitrate, " for media "))
                        ).call(r, this.mediaWidth, "x"))
                      ).call(n, this.mediaHeight)
                    ),
                    (l.autoLevelCapping = u),
                    l.autoLevelEnabled &&
                      l.autoLevelCapping > this.autoLevelCapping &&
                      this.streamController &&
                      this.streamController.nextLevelSwitch(),
                    (this.autoLevelCapping = l.autoLevelCapping);
                }
              }
            },
          },
          {
            key: "getMaxLevel",
            value: function (e) {
              var n = this,
                r = this.hls.levels;
              if (!r.length) return -1;
              var i = _r(r).call(r, function (o, l) {
                return n.isLevelAllowed(o) && l <= e;
              });
              return (
                (this.clientRect = null),
                t.getMaxLevelByMediaSize(i, this.mediaWidth, this.mediaHeight)
              );
            },
          },
          {
            key: "startCapping",
            value: function () {
              this.timer ||
                ((this.autoLevelCapping = Number.POSITIVE_INFINITY),
                self.clearInterval(this.timer),
                (this.timer = self.setInterval(
                  this.detectPlayerSize.bind(this),
                  1e3
                )),
                this.detectPlayerSize());
            },
          },
          {
            key: "stopCapping",
            value: function () {
              (this.restrictedLevels = []),
                (this.firstLevel = -1),
                (this.autoLevelCapping = Number.POSITIVE_INFINITY),
                this.timer &&
                  (self.clearInterval(this.timer), (this.timer = void 0));
            },
          },
          {
            key: "getDimensions",
            value: function () {
              if (this.clientRect) return this.clientRect;
              var e = this.media,
                n = { width: 0, height: 0 };
              if (e) {
                var r = e.getBoundingClientRect();
                (n.width = r.width),
                  (n.height = r.height),
                  n.width ||
                    n.height ||
                    ((n.width = r.right - r.left || e.width || 0),
                    (n.height = r.bottom - r.top || e.height || 0));
              }
              return (this.clientRect = n), n;
            },
          },
          {
            key: "mediaWidth",
            get: function () {
              return this.getDimensions().width * this.contentScaleFactor;
            },
          },
          {
            key: "mediaHeight",
            get: function () {
              return this.getDimensions().height * this.contentScaleFactor;
            },
          },
          {
            key: "contentScaleFactor",
            get: function () {
              var e = 1;
              if (!this.hls.config.ignoreDevicePixelRatio)
                try {
                  e = self.devicePixelRatio;
                } catch {}
              return Math.min(e, this.hls.config.maxDevicePixelRatio);
            },
          },
          {
            key: "isLevelAllowed",
            value: function (e) {
              return !this.restrictedLevels.some(function (n) {
                return (
                  e.bitrate === n.bitrate &&
                  e.width === n.width &&
                  e.height === n.height
                );
              });
            },
          },
        ],
        [
          {
            key: "getMaxLevelByMediaSize",
            value: function (e, n, r) {
              if (e == null || !e.length) return -1;
              for (
                var i, o, l = e.length - 1, u = Math.max(n, r), c = 0;
                c < e.length;
                c += 1
              ) {
                var d = e[c];
                if (
                  (d.width >= u || d.height >= u) &&
                  ((i = d),
                  !(o = e[c + 1]) ||
                    i.width !== o.width ||
                    i.height !== o.height)
                ) {
                  l = c;
                  break;
                }
              }
              return l;
            },
          },
        ]
      ),
      t
    );
  })(),
  _7t = {
    MANIFEST: "m",
    AUDIO: "a",
    VIDEO: "v",
    MUXED: "av",
    INIT: "i",
    CAPTION: "c",
    TIMED_TEXT: "tt",
    KEY: "k",
    OTHER: "o",
  },
  sf = _7t,
  T7t = { DASH: "d", HLS: "h", SMOOTH: "s", OTHER: "o" },
  E7t = T7t,
  S7t = "CMCD-Object",
  R7t = "CMCD-Request",
  A7t = "CMCD-Session",
  w7t = "CMCD-Status",
  rC = { OBJECT: S7t, REQUEST: R7t, SESSION: A7t, STATUS: w7t },
  k7t =
    (bn((eM = {}), rC.OBJECT, ["br", "d", "ot", "tb"]),
    bn(eM, rC.REQUEST, ["bl", "dl", "mtp", "nor", "nrr", "su"]),
    bn(eM, rC.SESSION, ["cid", "pr", "sf", "sid", "st", "v"]),
    bn(eM, rC.STATUS, ["bs", "rtp"]),
    eM),
  Zee = Kn(function t(e, n) {
    Wn(this, t),
      Array.isArray(e) &&
        (e = On(e).call(e, function (r) {
          return r instanceof t ? r : new t(r);
        })),
      (this.value = e),
      (this.params = n);
  }),
  I7t = "Dict";
function D7t(t) {
  return Array.isArray(t)
    ? lr(t)
    : t instanceof Lf
    ? "Map{}"
    : t instanceof XS
    ? "Set{}"
    : ti(t) === "object"
    ? lr(t)
    : String(t);
}
function P7t(t, e, n, r) {
  var i, o;
  return new Error(
    Ce(
      (i = Ce((o = "failed to ".concat(t, ' "'))).call(o, D7t(e), '" as '))
    ).call(i, n),
    { cause: r }
  );
}
function gv(t, e, n) {
  return P7t("serialize", t, e, n);
}
var O9e = Kn(function t(e) {
    Wn(this, t), (this.description = e);
  }),
  h1e = "Bare Item",
  M7t = "Boolean";
function C7t(t) {
  if (typeof t != "boolean") throw gv(t, M7t);
  return t ? "?1" : "?0";
}
var $7t = "Byte Sequence";
function x7t(t) {
  if (ArrayBuffer.isView(t) === !1) throw gv(t, $7t);
  return ":".concat(DHt(t), ":");
}
var L7t = "Integer";
function O7t(t) {
  return t < -999999999999999 || 999999999999999 < t;
}
function G9e(t) {
  if (O7t(t)) throw gv(t, L7t);
  return t.toString();
}
function G7t(t) {
  return "@".concat(G9e(t.getTime() / 1e3));
}
var N7t = "Decimal";
function F7t(t) {
  var e = E9e(t, 3);
  if (Math.floor(Math.abs(e)).toString().length > 12) throw gv(t, N7t);
  var n = e.toString();
  return $a(n).call(n, ".") ? n : "".concat(n, ".0");
}
var U7t = "String",
  B7t = /[\x00-\x1f\x7f]+/;
function H7t(t) {
  if (B7t.test(t)) throw gv(t, U7t);
  return '"'.concat(t.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), '"');
}
function X7t(t) {
  var e;
  return t.description || jn((e = t.toString())).call(e, 7, -1);
}
var V7t = "Token";
function f1e(t) {
  var e = X7t(t);
  if (/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e) === !1) throw gv(e, V7t);
  return e;
}
function Yee(t) {
  switch (ti(t)) {
    case "number":
      if (!_a(t)) throw gv(t, h1e);
      return Zxt(t) ? G9e(t) : F7t(t);
    case "string":
      return H7t(t);
    case "symbol":
      return f1e(t);
    case "boolean":
      return C7t(t);
    case "object":
      if (t instanceof Date) return G7t(t);
      if (t instanceof Uint8Array) return x7t(t);
      if (t instanceof O9e) return f1e(t);
    default:
      throw gv(t, h1e);
  }
}
var z7t = "Key";
function Qee(t) {
  if (/^[a-z*][a-z0-9\-_.*]*$/.test(t) === !1) throw gv(t, z7t);
  return t;
}
function cle(t) {
  var e;
  return t == null
    ? ""
    : On((e = N1(t)))
        .call(e, function (n) {
          var r,
            i = hs(n, 2),
            o = i[0],
            l = i[1];
          return l === !0
            ? ";".concat(Qee(o))
            : Ce((r = ";".concat(Qee(o), "="))).call(r, Yee(l));
        })
        .join("");
}
function N9e(t) {
  var e;
  return t instanceof Zee
    ? Ce((e = "".concat(Yee(t.value)))).call(e, cle(t.params))
    : Yee(t);
}
function j7t(t) {
  var e, n;
  return Ce(
    (e = "(".concat(
      On((n = t.value))
        .call(n, N9e)
        .join(" "),
      ")"
    ))
  ).call(e, cle(t.params));
}
function W7t(t) {
  var e,
    n =
      arguments.length > 1 && arguments[1] !== void 0
        ? arguments[1]
        : { whitespace: !0 };
  if (ti(t) !== "object") throw gv(t, I7t);
  var r = t instanceof Lf ? $s(t).call(t) : N1(t),
    i = n != null && n.whitespace ? " " : "";
  return On((e = RE(r)))
    .call(e, function (o) {
      var l = hs(o, 2),
        u = l[0],
        c = l[1];
      !(c instanceof Zee) && (c = new Zee(c));
      var d = Qee(u);
      return (
        c.value === !0
          ? (d += cle(c.params))
          : ((d += "="),
            Array.isArray(c.value) ? (d += j7t(c)) : (d += N9e(c))),
        d
      );
    })
    .join(",".concat(i));
}
function K7t(t, e) {
  return W7t(t, e);
}
function Z7t(t) {
  return t === "ot" || t === "sf" || t === "st";
}
function Y7t(t) {
  return typeof t == "number" ? _a(t) : t != null && t !== "" && t !== !1;
}
var AF = function (t) {
    return Math.round(t);
  },
  Q7t = function (t, e) {
    return (
      e != null && e.baseUrl && (t = PHt(t, e.baseUrl)), encodeURIComponent(t)
    );
  },
  d3 = function (t) {
    return 100 * AF(t / 100);
  },
  J7t = { br: AF, d: AF, bl: d3, dl: d3, mtp: d3, nor: Q7t, rtp: d3, tb: AF };
function q7t(t, e) {
  var n,
    r = {};
  if (t == null || ti(t) !== "object") return r;
  var i = mm((n = Dn(t))).call(n),
    o = cu({}, J7t, e == null ? void 0 : e.formatters),
    l = e == null ? void 0 : _r(e);
  return (
    i.forEach(function (u) {
      if (!(l != null && l(u))) {
        var c = t[u],
          d = o[u];
        d && (c = d(c, e)),
          (u === "v" && c === 1) ||
            (u == "pr" && c === 1) ||
            (Y7t(c) &&
              (Z7t(u) && typeof c == "string" && (c = new O9e(c)), (r[u] = c)));
      }
    }),
    r
  );
}
function F9e(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
  return t ? K7t(q7t(t, e), cu({ whitespace: !1 }, e)) : "";
}
function eXt(t) {
  var e,
    n,
    r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
    i = {};
  if (!t) return i;
  var o = N1(t),
    l = Ce((e = N1(k7t))).call(
      e,
      N1((r == null ? void 0 : r.customHeaderMap) || {})
    ),
    u = ga(o).call(
      o,
      function (c, d) {
        var h,
          f,
          p = hs(d, 2),
          g = p[0],
          y = p[1],
          v =
            ((h = ji(l).call(l, function (b) {
              var w;
              return $a((w = b[1])).call(w, g);
            })) === null || h === void 0
              ? void 0
              : h[0]) || rC.REQUEST;
        return (
          ((f = c[v]) !== null && f !== void 0) || (c[v] = {}), (c[v][g] = y), c
        );
      },
      {}
    );
  return ga((n = N1(u))).call(
    n,
    function (c, d) {
      var h = hs(d, 2),
        f = h[0],
        p = h[1];
      return (c[f] = F9e(p, r)), c;
    },
    i
  );
}
function tXt(t, e, n) {
  return cu(t, eXt(e, n));
}
var nXt = "CMCD";
function rXt(t) {
  if (!t) return "";
  var e = F9e(
    t,
    arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}
  );
  return "".concat(nXt, "=").concat(encodeURIComponent(e));
}
var p1e = /CMCD=[^&#]+/;
function iXt(t, e, n) {
  var r,
    i,
    o = rXt(e, n);
  if (!o) return t;
  if (p1e.test(t)) return t.replace(p1e, o);
  var l = $a(t).call(t, "?") ? "&" : "?";
  return Ce((r = Ce((i = "".concat(t))).call(i, l))).call(r, o);
}
var aXt = (function () {
    function t(e) {
      var n = this;
      Wn(this, t),
        (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 = function () {
          n.initialized && (n.starved = !0), (n.buffering = !0);
        }),
        (this.onPlaying = function () {
          n.initialized || (n.initialized = !0), (n.buffering = !1);
        }),
        (this.applyPlaylistData = function (o) {
          try {
            n.apply(o, { ot: sf.MANIFEST, su: !n.initialized });
          } catch (l) {
            n.hls.logger.warn("Could not generate manifest CMCD data.", l);
          }
        }),
        (this.applyFragmentData = function (o) {
          try {
            var l = o.frag,
              u = o.part,
              c = n.hls.levels[l.level],
              d = n.getObjectType(l),
              h = { d: 1e3 * (u || l).duration, ot: d };
            (d !== sf.VIDEO && d !== sf.AUDIO && d != sf.MUXED) ||
              ((h.br = c.bitrate / 1e3),
              (h.tb = n.getTopBandwidth(d) / 1e3),
              (h.bl = n.getBufferLength(d)));
            var f = u ? n.getNextPart(u) : n.getNextFrag(l);
            f != null && f.url && f.url !== l.url && (h.nor = f.url),
              n.apply(o, h);
          } catch (p) {
            n.hls.logger.warn("Could not generate segment CMCD data.", p);
          }
        }),
        (this.hls = e);
      var r = (this.config = e.config),
        i = r.cmcd;
      i != null &&
        ((r.pLoader = this.createPlaylistLoader()),
        (r.fLoader = this.createFragmentLoader()),
        (this.sid = i.sessionId || e.sessionId),
        (this.cid = i.contentId),
        (this.useHeaders = i.useHeaders === !0),
        (this.includeKeys = i.includeKeys),
        this.registerListeners());
    }
    return (
      Kn(t, [
        {
          key: "registerListeners",
          value: function () {
            var e = this.hls;
            e.on(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
              e.on(_t.MEDIA_DETACHED, this.onMediaDetached, this),
              e.on(_t.BUFFER_CREATED, this.onBufferCreated, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var e = this.hls;
            e.off(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
              e.off(_t.MEDIA_DETACHED, this.onMediaDetached, this),
              e.off(_t.BUFFER_CREATED, this.onBufferCreated, this);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unregisterListeners(),
              this.onMediaDetached(),
              (this.hls =
                this.config =
                this.audioBuffer =
                this.videoBuffer =
                  null),
              (this.onWaiting = this.onPlaying = this.media = null);
          },
        },
        {
          key: "onMediaAttached",
          value: function (e, n) {
            (this.media = n.media),
              this.media.addEventListener("waiting", this.onWaiting),
              this.media.addEventListener("playing", this.onPlaying);
          },
        },
        {
          key: "onMediaDetached",
          value: function () {
            this.media &&
              (this.media.removeEventListener("waiting", this.onWaiting),
              this.media.removeEventListener("playing", this.onPlaying),
              (this.media = null));
          },
        },
        {
          key: "onBufferCreated",
          value: function (e, n) {
            var r, i;
            (this.audioBuffer =
              (r = n.tracks.audio) == null ? void 0 : r.buffer),
              (this.videoBuffer =
                (i = n.tracks.video) == null ? void 0 : i.buffer);
          },
        },
        {
          key: "createData",
          value: function () {
            var e;
            return {
              v: 1,
              sf: E7t.HLS,
              sid: this.sid,
              cid: this.cid,
              pr: (e = this.media) == null ? void 0 : e.playbackRate,
              mtp: this.hls.bandwidthEstimate / 1e3,
            };
          },
        },
        {
          key: "apply",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : {};
            cu(n, this.createData());
            var r = n.ot === sf.INIT || n.ot === sf.VIDEO || n.ot === sf.MUXED;
            this.starved &&
              r &&
              ((n.bs = !0), (n.su = !0), (this.starved = !1)),
              n.su == null && (n.su = this.buffering);
            var i,
              o = this.includeKeys;
            o &&
              (n = ga((i = Dn(n))).call(
                i,
                function (u, c) {
                  return $a(o).call(o, c) && (u[c] = n[c]), u;
                },
                {}
              ));
            var l = { baseUrl: e.url };
            this.useHeaders
              ? (e.headers || (e.headers = {}), tXt(e.headers, n, l))
              : (e.url = iXt(e.url, n, l));
          },
        },
        {
          key: "getNextFrag",
          value: function (e) {
            var n,
              r = (n = this.hls.levels[e.level]) == null ? void 0 : n.details;
            if (r) {
              var i = e.sn - r.startSN;
              return r.fragments[i + 1];
            }
          },
        },
        {
          key: "getNextPart",
          value: function (e) {
            var n,
              r,
              i = e.index,
              o = e.fragment,
              l =
                (n = this.hls.levels[o.level]) == null ||
                (r = n.details) == null
                  ? void 0
                  : r.partList;
            if (l)
              for (var u = o.sn, c = l.length - 1; c >= 0; c--) {
                var d = l[c];
                if (d.index === i && d.fragment.sn === u) return l[c + 1];
              }
          },
        },
        {
          key: "getObjectType",
          value: function (e) {
            var n = e.type;
            return n === "subtitle"
              ? sf.TIMED_TEXT
              : e.sn === "initSegment"
              ? sf.INIT
              : n === "audio"
              ? sf.AUDIO
              : n === "main"
              ? this.hls.audioTracks.length
                ? sf.VIDEO
                : sf.MUXED
              : void 0;
          },
        },
        {
          key: "getTopBandwidth",
          value: function (e) {
            var n,
              r = 0,
              i = this.hls;
            if (e === sf.AUDIO) n = i.audioTracks;
            else {
              var o,
                l = i.maxAutoLevel,
                u = l > -1 ? l + 1 : i.levels.length;
              n = jn((o = i.levels)).call(o, 0, u);
            }
            var c,
              d = o8e(n);
            try {
              for (d.s(); !(c = d.n()).done; ) {
                var h = c.value;
                h.bitrate > r && (r = h.bitrate);
              }
            } catch (f) {
              d.e(f);
            } finally {
              d.f();
            }
            return r > 0 ? r : NaN;
          },
        },
        {
          key: "getBufferLength",
          value: function (e) {
            var n = this.media,
              r = e === sf.AUDIO ? this.audioBuffer : this.videoBuffer;
            return r && n
              ? 1e3 *
                  dc.bufferInfo(r, n.currentTime, this.config.maxBufferHole).len
              : NaN;
          },
        },
        {
          key: "createPlaylistLoader",
          value: function () {
            var e = this.config.pLoader,
              n = this.applyPlaylistData,
              r = e || this.config.loader;
            return (function () {
              function i(o) {
                Wn(this, i), (this.loader = void 0), (this.loader = new r(o));
              }
              return (
                Kn(i, [
                  {
                    key: "stats",
                    get: function () {
                      return this.loader.stats;
                    },
                  },
                  {
                    key: "context",
                    get: function () {
                      return this.loader.context;
                    },
                  },
                  {
                    key: "destroy",
                    value: function () {
                      this.loader.destroy();
                    },
                  },
                  {
                    key: "abort",
                    value: function () {
                      this.loader.abort();
                    },
                  },
                  {
                    key: "load",
                    value: function (o, l, u) {
                      n(o), this.loader.load(o, l, u);
                    },
                  },
                ]),
                i
              );
            })();
          },
        },
        {
          key: "createFragmentLoader",
          value: function () {
            var e = this.config.fLoader,
              n = this.applyFragmentData,
              r = e || this.config.loader;
            return (function () {
              function i(o) {
                Wn(this, i), (this.loader = void 0), (this.loader = new r(o));
              }
              return (
                Kn(i, [
                  {
                    key: "stats",
                    get: function () {
                      return this.loader.stats;
                    },
                  },
                  {
                    key: "context",
                    get: function () {
                      return this.loader.context;
                    },
                  },
                  {
                    key: "destroy",
                    value: function () {
                      this.loader.destroy();
                    },
                  },
                  {
                    key: "abort",
                    value: function () {
                      this.loader.abort();
                    },
                  },
                  {
                    key: "load",
                    value: function (o, l, u) {
                      n(o), this.loader.load(o, l, u);
                    },
                  },
                ]),
                i
              );
            })();
          },
        },
      ]),
      t
    );
  })(),
  oXt = 3e5,
  sXt = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r) {
      var i;
      return (
        Wn(this, n),
        ((i = e.call(this, "content-steering", r.logger)).hls = void 0),
        (i.loader = null),
        (i.uri = null),
        (i.pathwayId = "."),
        (i._pathwayPriority = null),
        (i.timeToLoad = 300),
        (i.reloadTimer = -1),
        (i.updated = 0),
        (i.started = !1),
        (i.enabled = !0),
        (i.levels = null),
        (i.audioTracks = null),
        (i.subtitleTracks = null),
        (i.penalizedPathways = {}),
        (i.hls = r),
        i.registerListeners(),
        i
      );
    }
    return (
      Kn(n, [
        {
          key: "registerListeners",
          value: function () {
            var r = this.hls;
            r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.on(_t.MANIFEST_LOADED, this.onManifestLoaded, this),
              r.on(_t.MANIFEST_PARSED, this.onManifestParsed, this),
              r.on(_t.ERROR, this.onError, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r &&
              (r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.off(_t.MANIFEST_LOADED, this.onManifestLoaded, this),
              r.off(_t.MANIFEST_PARSED, this.onManifestParsed, this),
              r.off(_t.ERROR, this.onError, this));
          },
        },
        {
          key: "pathways",
          value: function () {
            var r;
            return ga((r = this.levels || [])).call(
              r,
              function (i, o) {
                return (
                  qt(i).call(i, o.pathwayId) === -1 && i.push(o.pathwayId), i
                );
              },
              []
            );
          },
        },
        {
          key: "pathwayPriority",
          get: function () {
            return this._pathwayPriority;
          },
          set: function (r) {
            this.updatePathwayPriority(r);
          },
        },
        {
          key: "startLoad",
          value: function () {
            if (
              ((this.started = !0),
              this.clearTimeout(),
              this.enabled && this.uri)
            ) {
              if (this.updated) {
                var r =
                  1e3 * this.timeToLoad - (performance.now() - this.updated);
                if (r > 0) return void this.scheduleRefresh(this.uri, r);
              }
              this.loadSteeringManifest(this.uri);
            }
          },
        },
        {
          key: "stopLoad",
          value: function () {
            (this.started = !1),
              this.loader && (this.loader.destroy(), (this.loader = null)),
              this.clearTimeout();
          },
        },
        {
          key: "clearTimeout",
          value: function () {
            this.reloadTimer !== -1 &&
              (self.clearTimeout(this.reloadTimer), (this.reloadTimer = -1));
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unregisterListeners(),
              this.stopLoad(),
              (this.hls = null),
              (this.levels = this.audioTracks = this.subtitleTracks = null);
          },
        },
        {
          key: "removeLevel",
          value: function (r) {
            var i = this.levels;
            i &&
              (this.levels = _r(i).call(i, function (o) {
                return o !== r;
              }));
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            this.stopLoad(),
              (this.enabled = !0),
              (this.timeToLoad = 300),
              (this.updated = 0),
              (this.uri = null),
              (this.pathwayId = "."),
              (this.levels = this.audioTracks = this.subtitleTracks = null);
          },
        },
        {
          key: "onManifestLoaded",
          value: function (r, i) {
            var o = i.contentSteering;
            o !== null &&
              ((this.pathwayId = o.pathwayId),
              (this.uri = o.uri),
              this.started && this.startLoad());
          },
        },
        {
          key: "onManifestParsed",
          value: function (r, i) {
            (this.audioTracks = i.audioTracks),
              (this.subtitleTracks = i.subtitleTracks);
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            var o = i.errorAction;
            if (
              (o == null ? void 0 : o.action) ===
                Qd.SendAlternateToPenaltyBox &&
              Ca(o) === o0.MoveAllAlternatesMatchingHost
            ) {
              var l,
                u,
                c,
                d,
                h,
                f = this.levels,
                p = this._pathwayPriority,
                g = this.pathwayId;
              if (i.context) {
                var y = i.context,
                  v = y.groupId,
                  b = y.pathwayId,
                  w = y.type;
                v && f
                  ? (g = this.getPathwayForGroupId(v, w, g))
                  : b && (g = b);
              }
              g in this.penalizedPathways ||
                (this.penalizedPathways[g] = performance.now()),
                !p && f && (p = this.pathways()),
                p &&
                  p.length > 1 &&
                  (this.updatePathwayPriority(p),
                  (o.resolved = this.pathwayId !== g)),
                !o.resolved &&
                  this.warn(
                    Ce(
                      (l = Ce(
                        (u = Ce(
                          (c = Ce(
                            (d = Ce(
                              (h = "Could not resolve ".concat(
                                i.details,
                                ' ("'
                              ))
                            ).call(
                              h,
                              i.error.message,
                              '") with content-steering for Pathway: '
                            ))
                          ).call(d, g, " levels: "))
                        ).call(c, f && f.length, " priorities: "))
                      ).call(u, lr(p), " penalized: "))
                    ).call(l, lr(this.penalizedPathways))
                  );
            }
          },
        },
        {
          key: "filterParsedLevels",
          value: function (r) {
            this.levels = r;
            var i,
              o,
              l = this.getLevelsForPathway(this.pathwayId);
            if (l.length === 0) {
              var u,
                c = r[0].pathwayId;
              this.log(
                Ce(
                  (u = "No levels found in Pathway ".concat(
                    this.pathwayId,
                    '. Setting initial Pathway to "'
                  ))
                ).call(u, c, '"')
              ),
                (l = this.getLevelsForPathway(c)),
                (this.pathwayId = c);
            }
            return (
              l.length !== r.length &&
                this.log(
                  Ce(
                    (i = Ce((o = "Found ".concat(l.length, "/"))).call(
                      o,
                      r.length,
                      ' levels in Pathway "'
                    ))
                  ).call(i, this.pathwayId, '"')
                ),
              l
            );
          },
        },
        {
          key: "getLevelsForPathway",
          value: function (r) {
            var i;
            return this.levels === null
              ? []
              : _r((i = this.levels)).call(i, function (o) {
                  return r === o.pathwayId;
                });
          },
        },
        {
          key: "updatePathwayPriority",
          value: function (r) {
            var i;
            this._pathwayPriority = r;
            var o = this.penalizedPathways,
              l = performance.now();
            Dn(o).forEach(function (g) {
              l - o[g] > oXt && delete o[g];
            });
            for (var u = 0; u < r.length; u++) {
              var c = r[u];
              if (!(c in o)) {
                if (c === this.pathwayId) return;
                var d = this.hls.nextLoadLevel,
                  h = this.hls.levels[d];
                if ((i = this.getLevelsForPathway(c)).length > 0) {
                  this.log('Setting Pathway to "'.concat(c, '"')),
                    (this.pathwayId = c),
                    aHt(i),
                    this.hls.trigger(_t.LEVELS_UPDATED, { levels: i });
                  var f = this.hls.levels[d];
                  if (h && f && this.levels) {
                    var p;
                    f.attrs["STABLE-VARIANT-ID"] !==
                      h.attrs["STABLE-VARIANT-ID"] &&
                      f.bitrate !== h.bitrate &&
                      this.log(
                        Ce(
                          (p = "Unstable Pathways change from bitrate ".concat(
                            h.bitrate,
                            " to "
                          ))
                        ).call(p, f.bitrate)
                      ),
                      (this.hls.nextLoadLevel = d);
                  }
                  break;
                }
              }
            }
          },
        },
        {
          key: "getPathwayForGroupId",
          value: function (r, i, o) {
            for (
              var l,
                u = Ce((l = this.getLevelsForPathway(o))).call(
                  l,
                  this.levels || []
                ),
                c = 0;
              c < u.length;
              c++
            )
              if (
                (i === F1.AUDIO_TRACK && u[c].hasAudioGroup(r)) ||
                (i === F1.SUBTITLE_TRACK && u[c].hasSubtitleGroup(r))
              )
                return u[c].pathwayId;
            return o;
          },
        },
        {
          key: "clonePathways",
          value: function (r) {
            var i = this,
              o = this.levels;
            if (o) {
              var l = {},
                u = {};
              r.forEach(function (c) {
                var d,
                  h = c.ID,
                  f = c["BASE-ID"],
                  p = c["URI-REPLACEMENT"];
                if (
                  !o.some(function (y) {
                    return y.pathwayId === h;
                  })
                ) {
                  var g = On((d = i.getLevelsForPathway(f))).call(
                    d,
                    function (y) {
                      var v,
                        b,
                        w = new tle(y.attrs);
                      w["PATHWAY-ID"] = h;
                      var k =
                          w.AUDIO &&
                          Ce((v = "".concat(w.AUDIO, "_clone_"))).call(v, h),
                        D =
                          w.SUBTITLES &&
                          Ce((b = "".concat(w.SUBTITLES, "_clone_"))).call(
                            b,
                            h
                          );
                      k && ((l[w.AUDIO] = k), (w.AUDIO = k)),
                        D && ((u[w.SUBTITLES] = D), (w.SUBTITLES = D));
                      var $ = U9e(
                          y.uri,
                          w["STABLE-VARIANT-ID"],
                          "PER-VARIANT-URIS",
                          p
                        ),
                        N = new yU({
                          attrs: w,
                          audioCodec: y.audioCodec,
                          bitrate: y.bitrate,
                          height: y.height,
                          name: y.name,
                          url: $,
                          videoCodec: y.videoCodec,
                          width: y.width,
                        });
                      if (y.audioGroups)
                        for (var P = 1; P < y.audioGroups.length; P++) {
                          var I;
                          N.addGroupId(
                            "audio",
                            Ce(
                              (I = "".concat(y.audioGroups[P], "_clone_"))
                            ).call(I, h)
                          );
                        }
                      if (y.subtitleGroups)
                        for (var O = 1; O < y.subtitleGroups.length; O++) {
                          var X;
                          N.addGroupId(
                            "text",
                            Ce(
                              (X = "".concat(y.subtitleGroups[O], "_clone_"))
                            ).call(X, h)
                          );
                        }
                      return N;
                    }
                  );
                  o.push.apply(o, Cf(g)),
                    g1e(i.audioTracks, l, p, h),
                    g1e(i.subtitleTracks, u, p, h);
                }
              });
            }
          },
        },
        {
          key: "loadSteeringManifest",
          value: function (r) {
            var i,
              o = this,
              l = this.hls.config,
              u = l.loader;
            this.loader && this.loader.destroy(), (this.loader = new u(l));
            try {
              i = new Bs(r);
            } catch {
              return (
                (this.enabled = !1),
                void this.log(
                  "Failed to parse Steering Manifest URI: ".concat(r)
                )
              );
            }
            if (i.protocol !== "data:") {
              var c =
                0 | (this.hls.bandwidthEstimate || l.abrEwmaDefaultEstimate);
              i.searchParams.set("_HLS_pathway", this.pathwayId),
                i.searchParams.set("_HLS_throughput", "" + c);
            }
            var d = { responseType: "json", url: i.href },
              h = l.steeringManifestLoadPolicy.default,
              f = h.errorRetry || h.timeoutRetry || {},
              p = {
                loadPolicy: h,
                timeout: h.maxLoadTimeMs,
                maxRetry: f.maxNumRetry || 0,
                retryDelay: f.retryDelayMs || 0,
                maxRetryDelay: f.maxRetryDelayMs || 0,
              },
              g = {
                onSuccess: function (y, v, b, w) {
                  o.log('Loaded steering manifest: "'.concat(i, '"'));
                  var k = y.data;
                  if ((k == null ? void 0 : k.VERSION) === 1) {
                    (o.updated = performance.now()), (o.timeToLoad = k.TTL);
                    var D = k["RELOAD-URI"],
                      $ = k["PATHWAY-CLONES"],
                      N = k["PATHWAY-PRIORITY"];
                    if (D)
                      try {
                        o.uri = new Bs(D, i).href;
                      } catch {
                        return (
                          (o.enabled = !1),
                          void o.log(
                            "Failed to parse Steering Manifest RELOAD-URI: ".concat(
                              D
                            )
                          )
                        );
                      }
                    o.scheduleRefresh(o.uri || b.url), $ && o.clonePathways($);
                    var P = { steeringManifest: k, url: i.toString() };
                    o.hls.trigger(_t.STEERING_MANIFEST_LOADED, P),
                      N && o.updatePathwayPriority(N);
                  } else
                    o.log(
                      "Steering VERSION ".concat(k.VERSION, " not supported!")
                    );
                },
                onError: function (y, v, b, w) {
                  var k, D;
                  if (
                    (o.log(
                      Ce(
                        (k = Ce(
                          (D = "Error loading steering manifest: ".concat(
                            y.code,
                            " "
                          ))
                        ).call(D, y.text, " ("))
                      ).call(k, v.url, ")")
                    ),
                    o.stopLoad(),
                    y.code === 410)
                  )
                    return (
                      (o.enabled = !1),
                      void o.log(
                        "Steering manifest ".concat(
                          v.url,
                          " no longer available"
                        )
                      )
                    );
                  var $ = 1e3 * o.timeToLoad;
                  if (y.code !== 429) o.scheduleRefresh(o.uri || v.url, $);
                  else {
                    var N = o.loader;
                    if (
                      typeof (N == null ? void 0 : N.getResponseHeader) ==
                      "function"
                    ) {
                      var P = N.getResponseHeader("Retry-After");
                      P && ($ = 1e3 * wl(P));
                    }
                    o.log("Steering manifest ".concat(v.url, " rate limited"));
                  }
                },
                onTimeout: function (y, v, b) {
                  o.log(
                    "Timeout loading steering manifest (".concat(v.url, ")")
                  ),
                    o.scheduleRefresh(o.uri || v.url);
                },
              };
            this.log("Requesting steering manifest: ".concat(i)),
              this.loader.load(d, p, g);
          },
        },
        {
          key: "scheduleRefresh",
          value: function (r) {
            var i = this,
              o =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 1e3 * this.timeToLoad;
            this.clearTimeout(),
              (this.reloadTimer = self.setTimeout(function () {
                var l,
                  u = (l = i.hls) == null ? void 0 : l.media;
                !u || u.ended
                  ? i.scheduleRefresh(r, 1e3 * i.timeToLoad)
                  : i.loadSteeringManifest(r);
              }, o));
          },
        },
      ]),
      n
    );
  })();
function g1e(t, e, n, r) {
  t &&
    Dn(e).forEach(function (i) {
      var o,
        l = On(
          (o = _r(t).call(t, function (u) {
            return u.groupId === i;
          }))
        ).call(o, function (u) {
          var c = cu({}, u);
          return (
            (c.details = void 0),
            (c.attrs = new tle(c.attrs)),
            (c.url = c.attrs.URI =
              U9e(
                u.url,
                u.attrs["STABLE-RENDITION-ID"],
                "PER-RENDITION-URIS",
                n
              )),
            (c.groupId = c.attrs["GROUP-ID"] = e[i]),
            (c.attrs["PATHWAY-ID"] = r),
            c
          );
        });
      t.push.apply(t, Cf(l));
    });
}
function U9e(t, e, n, r) {
  var i,
    o = r.HOST,
    l = r.PARAMS,
    u = r[n];
  e && (i = u == null ? void 0 : u[e]) && (t = i);
  var c,
    d = new Bs(t);
  return (
    o && !i && (d.host = o),
    l &&
      mm((c = Dn(l)))
        .call(c)
        .forEach(function (h) {
          h && d.searchParams.set(h, l[h]);
        }),
    d.href
  );
}
var B9e = (function (t) {
  so(n, gb);
  var e = lo(n);
  function n(r) {
    var i;
    return (
      Wn(this, n),
      ((i = e.call(this, "eme", r.logger)).hls = void 0),
      (i.config = void 0),
      (i.media = null),
      (i.keyFormatPromise = null),
      (i.keySystemAccessPromises = {}),
      (i._requestLicenseFailureCount = 0),
      (i.mediaKeySessions = []),
      (i.keyIdToKeySessionPromise = {}),
      (i.setMediaKeysQueue = n.CDMCleanupPromise ? [n.CDMCleanupPromise] : []),
      (i.onMediaEncrypted = function (o) {
        var l,
          u = o.initDataType,
          c = o.initData,
          d = Ce((l = '"'.concat(o.type, '" event: init data type: "'))).call(
            l,
            u,
            '"'
          );
        if ((i.debug(d), c !== null)) {
          var h, f;
          if (u === "sinf" && i.getLicenseServerUrl(xs.FAIRPLAY)) {
            var p = Ec(new Uint8Array(c));
            try {
              var g = r9e(rle(JSON.parse(p).sinf));
              if (!g)
                throw new Error(
                  "'schm' box missing or not cbcs/cenc with schi > tenc"
                );
              (h = g.subarray(8, 24)), (f = xs.FAIRPLAY);
            } catch (E) {
              var y;
              return void i.warn(
                Ce((y = "".concat(d, " Failed to parse sinf: "))).call(y, E)
              );
            }
          } else if (i.getLicenseServerUrl(xs.WIDEVINE)) {
            var v = $Bt(c),
              b = Dn(i.keySystemAccessPromises);
            b.length || (b = s3(i.config));
            var w = _r(v).call(v, function (E) {
              var S = E.systemId ? UV(E.systemId) : null;
              return !!S && qt(b).call(b, S) > -1;
            })[0];
            if (!w) {
              var k;
              v.length === 0 ||
              v.some(function (E) {
                return !E.systemId;
              })
                ? i.warn(
                    "".concat(d, " contains incomplete or invalid pssh data")
                  )
                : i.log(
                    Ce((k = "ignoring ".concat(d, " for "))).call(
                      k,
                      On(v)
                        .call(v, function (E) {
                          return UV(E.systemId);
                        })
                        .join(","),
                      " pssh data in favor of playlist keys"
                    )
                  );
              return;
            }
            if (((f = UV(w.systemId)), w.version === 0 && w.data))
              if (f === xs.WIDEVINE) {
                var D = w.data.length - 22;
                h = w.data.subarray(D, D + 16);
              } else f === xs.PLAYREADY && (h = s9e(w.data));
          }
          if (f && h) {
            for (
              var $ = Fy.hexDump(h),
                N = os(i),
                P = N.keyIdToKeySessionPromise,
                I = N.mediaKeySessions,
                O = P[$],
                X = function () {
                  var E,
                    S = I[G],
                    L = S.decryptdata;
                  if (!L.keyId) return "continue";
                  var W = Fy.hexDump(L.keyId);
                  return $ === W ||
                    qt((E = L.uri.replace(/-/g, ""))).call(E, $) !== -1
                    ? ((O = P[W]),
                      L.pssh ||
                        (delete P[W],
                        (L.pssh = new Uint8Array(c)),
                        (L.keyId = h),
                        (O = P[$] =
                          O.then(function () {
                            return i.generateRequestWithPreferredKeySession(
                              S,
                              u,
                              c,
                              "encrypted-event-key-match"
                            );
                          })).catch(function (F) {
                          return i.handleError(F);
                        })),
                      "break")
                    : void 0;
                },
                G = 0;
              G < I.length;
              G++
            ) {
              var H = X();
              if (H !== "continue" && H === "break") break;
            }
            O ||
              (O = P[$] =
                i.getKeySystemSelectionPromise([f]).then(function (E) {
                  var S,
                    L = E.keySystem,
                    W = E.mediaKeys;
                  i.throwIfDestroyed();
                  var F = new qve(
                    "ISO-23001-7",
                    $,
                    (S = Jve(L)) != null ? S : ""
                  );
                  return (
                    (F.pssh = new Uint8Array(c)),
                    (F.keyId = h),
                    i.attemptSetMediaKeys(L, W).then(function () {
                      i.throwIfDestroyed();
                      var oe = i.createMediaKeySessionContext({
                        decryptdata: F,
                        keySystem: L,
                        mediaKeys: W,
                      });
                      return i.generateRequestWithPreferredKeySession(
                        oe,
                        u,
                        c,
                        "encrypted-event-no-match"
                      );
                    })
                  );
                })).catch(function (E) {
                return i.handleError(E);
              });
          }
        }
      }),
      (i.onWaitingForKey = function (o) {
        i.log('"'.concat(o.type, '" event'));
      }),
      (i.hls = r),
      (i.config = r.config),
      i.registerListeners(),
      i
    );
  }
  return (
    Kn(n, [
      {
        key: "destroy",
        value: function () {
          this.unregisterListeners(), this.onMediaDetached();
          var r = this.config;
          (r.requestMediaKeySystemAccessFunc = null),
            (r.licenseXhrSetup = r.licenseResponseCallback = void 0),
            (r.drmSystems = r.drmSystemOptions = {}),
            (this.hls = this.config = this.keyIdToKeySessionPromise = null),
            (this.onMediaEncrypted = this.onWaitingForKey = null);
        },
      },
      {
        key: "registerListeners",
        value: function () {
          this.hls.on(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
            this.hls.on(_t.MEDIA_DETACHED, this.onMediaDetached, this),
            this.hls.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
            this.hls.on(_t.MANIFEST_LOADED, this.onManifestLoaded, this);
        },
      },
      {
        key: "unregisterListeners",
        value: function () {
          this.hls.off(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
            this.hls.off(_t.MEDIA_DETACHED, this.onMediaDetached, this),
            this.hls.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
            this.hls.off(_t.MANIFEST_LOADED, this.onManifestLoaded, this);
        },
      },
      {
        key: "getLicenseServerUrl",
        value: function (r) {
          var i = this.config,
            o = i.drmSystems,
            l = i.widevineLicenseUrl,
            u = o[r];
          return u ? u.licenseUrl : r === xs.WIDEVINE && l ? l : void 0;
        },
      },
      {
        key: "getLicenseServerUrlOrThrow",
        value: function (r) {
          var i = this.getLicenseServerUrl(r);
          if (i === void 0)
            throw new Error(
              'no license server URL configured for key-system "'.concat(r, '"')
            );
          return i;
        },
      },
      {
        key: "getServerCertificateUrl",
        value: function (r) {
          var i = this.config.drmSystems[r];
          if (i) return i.serverCertificateUrl;
          this.log(
            'No Server Certificate in config.drmSystems["'.concat(r, '"]')
          );
        },
      },
      {
        key: "attemptKeySystemAccess",
        value: function (r) {
          var i,
            o,
            l = this,
            u = this.hls.levels,
            c = function (f, p, g) {
              return !!f && qt(g).call(g, f) === p;
            },
            d = _r(
              (i = On(u).call(u, function (f) {
                return f.audioCodec;
              }))
            ).call(i, c),
            h = _r(
              (o = On(u).call(u, function (f) {
                return f.videoCodec;
              }))
            ).call(o, c);
          return (
            d.length + h.length === 0 && h.push("avc1.42e01e"),
            new Ar(function (f, p) {
              (function g(y) {
                var v = y.shift();
                l.getMediaKeysPromise(v, d, h)
                  .then(function (b) {
                    return f({ keySystem: v, mediaKeys: b });
                  })
                  .catch(function (b) {
                    y.length
                      ? g(y)
                      : p(
                          b instanceof kg
                            ? b
                            : new kg(
                                {
                                  type: no.KEY_SYSTEM_ERROR,
                                  details: kr.KEY_SYSTEM_NO_ACCESS,
                                  error: b,
                                  fatal: !0,
                                },
                                b.message
                              )
                        );
                  });
              })(r);
            })
          );
        },
      },
      {
        key: "requestMediaKeySystemAccess",
        value: function (r, i) {
          var o = this.config.requestMediaKeySystemAccessFunc;
          if (typeof o != "function") {
            var l =
              "Configured requestMediaKeySystemAccess is not a function ".concat(
                o
              );
            return (
              o9e === null &&
                self.location.protocol === "http:" &&
                (l =
                  "navigator.requestMediaKeySystemAccess is not available over insecure protocol ".concat(
                    location.protocol
                  )),
              Ar.reject(new Error(l))
            );
          }
          return o(r, i);
        },
      },
      {
        key: "getMediaKeysPromise",
        value: function (r, i, o) {
          var l = this,
            u = WBt(r, i, o, this.config.drmSystemOptions),
            c = this.keySystemAccessPromises[r],
            d = c == null ? void 0 : c.keySystemAccess;
          if (!d) {
            var h;
            this.log(
              Ce(
                (h = 'Requesting encrypted media "'.concat(
                  r,
                  '" key-system access with config: '
                ))
              ).call(h, lr(u))
            ),
              (d = this.requestMediaKeySystemAccess(r, u));
            var f = (this.keySystemAccessPromises[r] = { keySystemAccess: d });
            return (
              d.catch(function (p) {
                var g;
                l.log(
                  Ce(
                    (g = 'Failed to obtain access to key-system "'.concat(
                      r,
                      '": '
                    ))
                  ).call(g, p)
                );
              }),
              d.then(function (p) {
                l.log(
                  'Access for key-system "'.concat(p.keySystem, '" obtained')
                );
                var g = l.fetchServerCertificate(r);
                return (
                  l.log('Create media-keys for "'.concat(r, '"')),
                  (f.mediaKeys = p.createMediaKeys().then(function (y) {
                    return (
                      l.log('Media-keys created for "'.concat(r, '"')),
                      g.then(function (v) {
                        return v ? l.setMediaKeysServerCertificate(y, r, v) : y;
                      })
                    );
                  })),
                  f.mediaKeys.catch(function (y) {
                    var v;
                    l.error(
                      Ce(
                        (v = 'Failed to create media-keys for "'.concat(
                          r,
                          '"}: '
                        ))
                      ).call(v, y)
                    );
                  }),
                  f.mediaKeys
                );
              })
            );
          }
          return d.then(function () {
            return c.mediaKeys;
          });
        },
      },
      {
        key: "createMediaKeySessionContext",
        value: function (r) {
          var i,
            o = r.decryptdata,
            l = r.keySystem,
            u = r.mediaKeys;
          this.log(
            Ce(
              (i = 'Creating key-system session "'.concat(l, '" keyId: '))
            ).call(i, Fy.hexDump(o.keyId || []))
          );
          var c = u.createSession(),
            d = {
              decryptdata: o,
              keySystem: l,
              mediaKeys: u,
              mediaKeysSession: c,
              keyStatus: "status-pending",
            };
          return this.mediaKeySessions.push(d), d;
        },
      },
      {
        key: "renewKeySession",
        value: function (r) {
          var i = r.decryptdata;
          if (i.pssh) {
            var o = this.createMediaKeySessionContext(r),
              l = this.getKeyIdString(i);
            this.keyIdToKeySessionPromise[l] =
              this.generateRequestWithPreferredKeySession(
                o,
                "cenc",
                i.pssh.buffer,
                "expired"
              );
          } else
            this.warn(
              "Could not renew expired session. Missing pssh initData."
            );
          this.removeSession(r);
        },
      },
      {
        key: "getKeyIdString",
        value: function (r) {
          if (!r)
            throw new Error("Could not read keyId of undefined decryptdata");
          if (r.keyId === null) throw new Error("keyId is null");
          return Fy.hexDump(r.keyId);
        },
      },
      {
        key: "updateKeySession",
        value: function (r, i) {
          var o,
            l,
            u,
            c = r.mediaKeysSession;
          return (
            this.log(
              Ce(
                (o = Ce(
                  (l = 'Updating key-session "'.concat(
                    c.sessionId,
                    '" for keyID '
                  ))
                ).call(
                  l,
                  Fy.hexDump(
                    ((u = r.decryptdata) == null ? void 0 : u.keyId) || []
                  ),
                  `
      } (data length: `
                ))
              ).call(o, i && i.byteLength, ")")
            ),
            c.update(i)
          );
        },
      },
      {
        key: "selectKeySystemFormat",
        value: function (r) {
          var i,
            o,
            l,
            u = Dn(r.levelkeys || {});
          return (
            this.keyFormatPromise ||
              (this.log(
                Ce(
                  (i = Ce(
                    (o = Ce(
                      (l = "Selecting key-system from fragment (sn: ".concat(
                        r.sn,
                        " "
                      ))
                    ).call(l, r.type, ": "))
                  ).call(o, r.level, ") key formats "))
                ).call(i, u.join(", "))
              ),
              (this.keyFormatPromise = this.getKeyFormatPromise(u))),
            this.keyFormatPromise
          );
        },
      },
      {
        key: "getKeyFormatPromise",
        value: function (r) {
          var i = this;
          return new Ar(function (o, l) {
            var u,
              c = s3(i.config),
              d = _r((u = On(r).call(r, Qve))).call(u, function (h) {
                return !!h && qt(c).call(c, h) !== -1;
              });
            return i
              .getKeySystemSelectionPromise(d)
              .then(function (h) {
                var f = h.keySystem,
                  p = Jve(f);
                p
                  ? o(p)
                  : l(
                      new Error(
                        'Unable to find format for key-system "'.concat(f, '"')
                      )
                    );
              })
              .catch(l);
          });
        },
      },
      {
        key: "loadKey",
        value: function (r) {
          var i,
            o,
            l,
            u = this,
            c = r.keyInfo.decryptdata,
            d = this.getKeyIdString(c),
            h = Ce(
              (i = Ce(
                (o = Ce((l = "(keyId: ".concat(d, ' format: "'))).call(
                  l,
                  c.keyFormat,
                  '" method: '
                ))
              ).call(o, c.method, " uri: "))
            ).call(i, c.uri, ")");
          this.log("Starting session for key ".concat(h));
          var f = this.keyIdToKeySessionPromise[d];
          return (
            f ||
              ((f = this.getKeySystemForKeyPromise(c).then(function (p) {
                var g,
                  y,
                  v,
                  b = p.keySystem,
                  w = p.mediaKeys;
                return (
                  u.throwIfDestroyed(),
                  u.log(
                    Ce(
                      (g = Ce(
                        (y = Ce(
                          (v = "Handle encrypted media sn: ".concat(
                            r.frag.sn,
                            " "
                          ))
                        ).call(v, r.frag.type, ": "))
                      ).call(y, r.frag.level, " using key "))
                    ).call(g, h)
                  ),
                  u.attemptSetMediaKeys(b, w).then(function () {
                    return (
                      u.throwIfDestroyed(),
                      u.createMediaKeySessionContext({
                        keySystem: b,
                        mediaKeys: w,
                        decryptdata: c,
                      })
                    );
                  })
                );
              })),
              (this.keyIdToKeySessionPromise[d] = f.then(function (p) {
                var g = c.pssh ? c.pssh.buffer : null;
                return u.generateRequestWithPreferredKeySession(
                  p,
                  "cenc",
                  g,
                  "playlist-key"
                );
              })).catch(function (p) {
                return u.handleError(p);
              })),
            f
          );
        },
      },
      {
        key: "throwIfDestroyed",
        value: function () {
          if (!this.hls) throw new Error("invalid state");
        },
      },
      {
        key: "handleError",
        value: function (r) {
          this.hls &&
            (this.error(r.message),
            r instanceof kg
              ? this.hls.trigger(_t.ERROR, r.data)
              : this.hls.trigger(_t.ERROR, {
                  type: no.KEY_SYSTEM_ERROR,
                  details: kr.KEY_SYSTEM_NO_KEYS,
                  error: r,
                  fatal: !0,
                }));
        },
      },
      {
        key: "getKeySystemForKeyPromise",
        value: function (r) {
          var i = this.getKeyIdString(r),
            o = this.keyIdToKeySessionPromise[i];
          if (!o) {
            var l = Qve(r.keyFormat),
              u = l ? [l] : s3(this.config);
            return this.attemptKeySystemAccess(u);
          }
          return o;
        },
      },
      {
        key: "getKeySystemSelectionPromise",
        value: function (r) {
          if ((r.length || (r = s3(this.config)), r.length === 0))
            throw new kg(
              {
                type: no.KEY_SYSTEM_ERROR,
                details: kr.KEY_SYSTEM_NO_CONFIGURED_LICENSE,
                fatal: !0,
              },
              "Missing key-system license configuration options ".concat(
                lr({ drmSystems: this.config.drmSystems })
              )
            );
          return this.attemptKeySystemAccess(r);
        },
      },
      {
        key: "attemptSetMediaKeys",
        value: function (r, i) {
          var o,
            l = this,
            u = jn((o = this.setMediaKeysQueue)).call(o);
          this.log('Setting media-keys for "'.concat(r, '"'));
          var c = Ar.all(u).then(function () {
            if (!l.media)
              throw new Error(
                "Attempted to set mediaKeys without media element attached"
              );
            return l.media.setMediaKeys(i);
          });
          return (
            this.setMediaKeysQueue.push(c),
            c.then(function () {
              var d;
              l.log('Media-keys set for "'.concat(r, '"')),
                u.push(c),
                (l.setMediaKeysQueue = _r((d = l.setMediaKeysQueue)).call(
                  d,
                  function (h) {
                    return qt(u).call(u, h) === -1;
                  }
                ));
            })
          );
        },
      },
      {
        key: "generateRequestWithPreferredKeySession",
        value: function (r, i, o, l) {
          var u,
            c,
            d,
            h,
            f,
            p = this,
            g =
              (h = this.config.drmSystems) == null ||
              (f = h[r.keySystem]) == null
                ? void 0
                : f.generateRequest;
          if (g)
            try {
              var y = g.call(this.hls, i, o, r);
              if (!y)
                throw new Error(
                  "Invalid response from configured generateRequest filter"
                );
              (i = y.initDataType),
                (o = y.initData ? y.initData : null),
                (r.decryptdata.pssh = o ? new Uint8Array(o) : null);
            } catch (N) {
              var v;
              if (
                (this.warn(N.message), (v = this.hls) != null && v.config.debug)
              )
                throw N;
            }
          if (o === null)
            return (
              this.log(
                'Skipping key-session request for "'.concat(
                  l,
                  '" (no initData)'
                )
              ),
              Ar.resolve(r)
            );
          var b = this.getKeyIdString(r.decryptdata);
          this.log(
            Ce(
              (u = Ce(
                (c = Ce(
                  (d = 'Generating key-session request for "'.concat(l, '": '))
                ).call(d, b, " (init data type: "))
              ).call(c, i, " length: "))
            ).call(u, o ? o.byteLength : null, ")")
          );
          var w = new g9e(),
            k = (r._onmessage = function (N) {
              var P,
                I,
                O = r.mediaKeysSession;
              if (O) {
                var X = N.messageType,
                  G = N.message;
                p.log(
                  Ce(
                    (P = Ce(
                      (I = '"'.concat(X, '" message event for session "'))
                    ).call(I, O.sessionId, '" message size: '))
                  ).call(P, G.byteLength)
                ),
                  X === "license-request" || X === "license-renewal"
                    ? p.renewLicense(r, G).catch(function (H) {
                        w.eventNames().length
                          ? w.emit("error", H)
                          : p.handleError(H);
                      })
                    : X === "license-release"
                    ? r.keySystem === xs.FAIRPLAY &&
                      (p.updateKeySession(r, Vee("acknowledged")),
                      p.removeSession(r))
                    : p.warn(
                        'unhandled media key message type "'.concat(X, '"')
                      );
              } else w.emit("error", new Error("invalid state"));
            }),
            D = (r._onkeystatuseschange = function (N) {
              if (r.mediaKeysSession) {
                p.onKeyStatusChange(r);
                var P,
                  I = r.keyStatus;
                w.emit("keyStatus", I),
                  I === "expired" &&
                    (p.warn(
                      Ce(
                        (P = "".concat(r.keySystem, " expired for key "))
                      ).call(P, b)
                    ),
                    p.renewKeySession(r));
              } else w.emit("error", new Error("invalid state"));
            });
          r.mediaKeysSession.addEventListener("message", k),
            r.mediaKeysSession.addEventListener("keystatuseschange", D);
          var $ = new Ar(function (N, P) {
            w.on("error", P),
              w.on("keyStatus", function (I) {
                pv(I).call(I, "usable")
                  ? N()
                  : I === "output-restricted"
                  ? P(
                      new kg(
                        {
                          type: no.KEY_SYSTEM_ERROR,
                          details: kr.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,
                          fatal: !1,
                        },
                        "HDCP level output restricted"
                      )
                    )
                  : I === "internal-error"
                  ? P(
                      new kg(
                        {
                          type: no.KEY_SYSTEM_ERROR,
                          details: kr.KEY_SYSTEM_STATUS_INTERNAL_ERROR,
                          fatal: !0,
                        },
                        'key status changed to "'.concat(I, '"')
                      )
                    )
                  : I === "expired"
                  ? P(new Error("key expired while generating request"))
                  : p.warn('unhandled key status change "'.concat(I, '"'));
              });
          });
          return r.mediaKeysSession
            .generateRequest(i, o)
            .then(function () {
              var N, P;
              p.log(
                Ce(
                  (N = 'Request generated for key-session "'.concat(
                    (P = r.mediaKeysSession) == null ? void 0 : P.sessionId,
                    '" keyId: '
                  ))
                ).call(N, b)
              );
            })
            .catch(function (N) {
              throw new kg(
                {
                  type: no.KEY_SYSTEM_ERROR,
                  details: kr.KEY_SYSTEM_NO_SESSION,
                  error: N,
                  fatal: !1,
                },
                "Error generating key-session request: ".concat(N)
              );
            })
            .then(function () {
              return $;
            })
            .catch(function (N) {
              throw (w.removeAllListeners(), p.removeSession(r), N);
            })
            .then(function () {
              return w.removeAllListeners(), r;
            });
        },
      },
      {
        key: "onKeyStatusChange",
        value: function (r) {
          var i = this;
          r.mediaKeysSession.keyStatuses.forEach(function (o, l) {
            var u, c, d;
            i.log(
              Ce(
                (u = Ce(
                  (c = Ce(
                    (d = 'key status change "'.concat(
                      o,
                      '" for keyStatuses keyId: '
                    ))
                  ).call(
                    d,
                    Fy.hexDump(
                      "buffer" in l
                        ? new Uint8Array(l.buffer, l.byteOffset, l.byteLength)
                        : new Uint8Array(l)
                    ),
                    " session keyId: "
                  ))
                ).call(
                  c,
                  Fy.hexDump(new Uint8Array(r.decryptdata.keyId || [])),
                  " uri: "
                ))
              ).call(u, r.decryptdata.uri)
            ),
              (r.keyStatus = o);
          });
        },
      },
      {
        key: "fetchServerCertificate",
        value: function (r) {
          var i = this.config,
            o = new i.loader(i),
            l = this.getServerCertificateUrl(r);
          return l
            ? (this.log('Fetching server certificate for "'.concat(r, '"')),
              new Ar(function (u, c) {
                var d = { responseType: "arraybuffer", url: l },
                  h = i.certLoadPolicy.default,
                  f = {
                    loadPolicy: h,
                    timeout: h.maxLoadTimeMs,
                    maxRetry: 0,
                    retryDelay: 0,
                    maxRetryDelay: 0,
                  },
                  p = {
                    onSuccess: function (g, y, v, b) {
                      u(g.data);
                    },
                    onError: function (g, y, v, b) {
                      var w, k, D;
                      c(
                        new kg(
                          {
                            type: no.KEY_SYSTEM_ERROR,
                            details:
                              kr.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,
                            fatal: !0,
                            networkDetails: v,
                            response: fl({ url: d.url, data: void 0 }, g),
                          },
                          Ce(
                            (w = Ce(
                              (k = Ce(
                                (D = '"'.concat(
                                  r,
                                  '" certificate request failed ('
                                ))
                              ).call(D, l, "). Status: "))
                            ).call(k, g.code, " ("))
                          ).call(w, g.text, ")")
                        )
                      );
                    },
                    onTimeout: function (g, y, v) {
                      var b;
                      c(
                        new kg(
                          {
                            type: no.KEY_SYSTEM_ERROR,
                            details:
                              kr.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,
                            fatal: !0,
                            networkDetails: v,
                            response: { url: d.url, data: void 0 },
                          },
                          Ce(
                            (b = '"'.concat(
                              r,
                              '" certificate request timed out ('
                            ))
                          ).call(b, l, ")")
                        )
                      );
                    },
                    onAbort: function (g, y, v) {
                      c(new Error("aborted"));
                    },
                  };
                o.load(d, f, p);
              }))
            : Ar.resolve();
        },
      },
      {
        key: "setMediaKeysServerCertificate",
        value: function (r, i, o) {
          var l = this;
          return new Ar(function (u, c) {
            r.setServerCertificate(o)
              .then(function (d) {
                var h, f;
                l.log(
                  Ce(
                    (h = Ce(
                      (f = "setServerCertificate ".concat(
                        d ? "success" : "not supported by CDM",
                        " ("
                      ))
                    ).call(f, o == null ? void 0 : o.byteLength, ') on "'))
                  ).call(h, i, '"')
                ),
                  u(r);
              })
              .catch(function (d) {
                c(
                  new kg(
                    {
                      type: no.KEY_SYSTEM_ERROR,
                      details: kr.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,
                      error: d,
                      fatal: !0,
                    },
                    d.message
                  )
                );
              });
          });
        },
      },
      {
        key: "renewLicense",
        value: function (r, i) {
          var o = this;
          return this.requestLicense(r, new Uint8Array(i)).then(function (l) {
            return o.updateKeySession(r, new Uint8Array(l)).catch(function (u) {
              throw new kg(
                {
                  type: no.KEY_SYSTEM_ERROR,
                  details: kr.KEY_SYSTEM_SESSION_UPDATE_FAILED,
                  error: u,
                  fatal: !0,
                },
                u.message
              );
            });
          });
        },
      },
      {
        key: "unpackPlayReadyKeyMessage",
        value: function (r, i) {
          var o = String.fromCharCode.apply(null, new Uint16Array(i.buffer));
          if (!$a(o).call(o, "PlayReadyKeyMessage"))
            return (
              r.setRequestHeader("Content-Type", "text/xml; charset=utf-8"), i
            );
          var l = new DOMParser().parseFromString(o, "application/xml"),
            u = l.querySelectorAll("HttpHeader");
          if (u.length > 0)
            for (var c, d = 0, h = u.length; d < h; d++) {
              var f,
                p,
                g =
                  (f = (c = u[d]).querySelector("name")) == null
                    ? void 0
                    : f.textContent,
                y =
                  (p = c.querySelector("value")) == null
                    ? void 0
                    : p.textContent;
              g && y && r.setRequestHeader(g, y);
            }
          var v = l.querySelector("Challenge"),
            b = v == null ? void 0 : v.textContent;
          if (!b) throw new Error("Cannot find <Challenge> in key message");
          return Vee(atob(b));
        },
      },
      {
        key: "setupLicenseXHR",
        value: function (r, i, o, l) {
          var u = this,
            c = this.config.licenseXhrSetup;
          return c
            ? Ar.resolve()
                .then(function () {
                  if (!o.decryptdata) throw new Error("Key removed");
                  return c.call(u.hls, r, i, o, l);
                })
                .catch(function (d) {
                  if (!o.decryptdata) throw d;
                  return r.open("POST", i, !0), c.call(u.hls, r, i, o, l);
                })
                .then(function (d) {
                  return (
                    r.readyState || r.open("POST", i, !0),
                    { xhr: r, licenseChallenge: d || l }
                  );
                })
            : (r.open("POST", i, !0),
              Ar.resolve({ xhr: r, licenseChallenge: l }));
        },
      },
      {
        key: "requestLicense",
        value: function (r, i) {
          var o = this,
            l = this.config.keyLoadPolicy.default;
          return new Ar(function (u, c) {
            var d = o.getLicenseServerUrlOrThrow(r.keySystem);
            o.log("Sending license request to URL: ".concat(d));
            var h = new XMLHttpRequest();
            (h.responseType = "arraybuffer"),
              (h.onreadystatechange = function () {
                if (!o.hls || !r.mediaKeysSession)
                  return c(new Error("invalid state"));
                if (h.readyState === 4)
                  if (h.status === 200) {
                    o._requestLicenseFailureCount = 0;
                    var f = h.response;
                    o.log(
                      "License received ".concat(
                        f instanceof ArrayBuffer ? f.byteLength : f
                      )
                    );
                    var p = o.config.licenseResponseCallback;
                    if (p)
                      try {
                        f = p.call(o.hls, h, d, r);
                      } catch (k) {
                        o.error(k);
                      }
                    u(f);
                  } else {
                    var g = l.errorRetry,
                      y = g ? g.maxNumRetry : 0;
                    if (
                      (o._requestLicenseFailureCount++,
                      o._requestLicenseFailureCount > y ||
                        (h.status >= 400 && h.status < 500))
                    ) {
                      var v, b;
                      c(
                        new kg(
                          {
                            type: no.KEY_SYSTEM_ERROR,
                            details: kr.KEY_SYSTEM_LICENSE_REQUEST_FAILED,
                            fatal: !0,
                            networkDetails: h,
                            response: {
                              url: d,
                              data: void 0,
                              code: h.status,
                              text: h.statusText,
                            },
                          },
                          Ce(
                            (v = Ce(
                              (b = "License Request XHR failed (".concat(
                                d,
                                "). Status: "
                              ))
                            ).call(b, h.status, " ("))
                          ).call(v, h.statusText, ")")
                        )
                      );
                    } else {
                      var w = y - o._requestLicenseFailureCount + 1;
                      o.warn(
                        "Retrying license request, ".concat(w, " attempts left")
                      ),
                        o.requestLicense(r, i).then(u, c);
                    }
                  }
              }),
              r.licenseXhr &&
                r.licenseXhr.readyState !== XMLHttpRequest.DONE &&
                r.licenseXhr.abort(),
              (r.licenseXhr = h),
              o.setupLicenseXHR(h, d, r, i).then(function (f) {
                var p = f.xhr,
                  g = f.licenseChallenge;
                r.keySystem == xs.PLAYREADY &&
                  (g = o.unpackPlayReadyKeyMessage(p, g)),
                  p.send(g);
              });
          });
        },
      },
      {
        key: "onMediaAttached",
        value: function (r, i) {
          if (this.config.emeEnabled) {
            var o = i.media;
            (this.media = o),
              o.removeEventListener("encrypted", this.onMediaEncrypted),
              o.removeEventListener("waitingforkey", this.onWaitingForKey),
              o.addEventListener("encrypted", this.onMediaEncrypted),
              o.addEventListener("waitingforkey", this.onWaitingForKey);
          }
        },
      },
      {
        key: "onMediaDetached",
        value: function () {
          var r,
            i,
            o = this,
            l = this.media,
            u = this.mediaKeySessions;
          l &&
            (l.removeEventListener("encrypted", this.onMediaEncrypted),
            l.removeEventListener("waitingforkey", this.onWaitingForKey),
            (this.media = null)),
            (this._requestLicenseFailureCount = 0),
            (this.setMediaKeysQueue = []),
            (this.mediaKeySessions = []),
            (this.keyIdToKeySessionPromise = {}),
            qve.clearKeyUriToKeyIdMap();
          var c = u.length;
          n.CDMCleanupPromise = Ar.all(
            Ce(
              (r = On(u).call(u, function (d) {
                return o.removeSession(d);
              }))
            ).call(
              r,
              l == null || (i = l.setMediaKeys(null)) == null
                ? void 0
                : i.catch(function (d) {
                    var h;
                    o.log("Could not clear media keys: ".concat(d)),
                      (h = o.hls) == null ||
                        h.trigger(_t.ERROR, {
                          type: no.OTHER_ERROR,
                          details: kr.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,
                          fatal: !1,
                          error: new Error(
                            "Could not clear media keys: ".concat(d)
                          ),
                        });
                  })
            )
          )
            .then(function () {
              c &&
                (o.log("finished closing key sessions and clearing media keys"),
                (u.length = 0));
            })
            .catch(function (d) {
              var h;
              o.log(
                "Could not close sessions and clear media keys: ".concat(d)
              ),
                (h = o.hls) == null ||
                  h.trigger(_t.ERROR, {
                    type: no.OTHER_ERROR,
                    details: kr.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
                    fatal: !1,
                    error: new Error(
                      "Could not close sessions and clear media keys: ".concat(
                        d
                      )
                    ),
                  });
            });
        },
      },
      {
        key: "onManifestLoading",
        value: function () {
          this.keyFormatPromise = null;
        },
      },
      {
        key: "onManifestLoaded",
        value: function (r, i) {
          var o = i.sessionKeys;
          if (o && this.config.emeEnabled && !this.keyFormatPromise) {
            var l = ga(o).call(
              o,
              function (u, c) {
                return (
                  qt(u).call(u, c.keyFormat) === -1 && u.push(c.keyFormat), u
                );
              },
              []
            );
            this.log(
              "Selecting key-system from session-keys ".concat(l.join(", "))
            ),
              (this.keyFormatPromise = this.getKeyFormatPromise(l));
          }
        },
      },
      {
        key: "removeSession",
        value: function (r) {
          var i = this,
            o = r.mediaKeysSession,
            l = r.licenseXhr;
          if (o) {
            var u;
            this.log(
              "Remove licenses and keys and close session ".concat(o.sessionId)
            ),
              r._onmessage &&
                (o.removeEventListener("message", r._onmessage),
                (r._onmessage = void 0)),
              r._onkeystatuseschange &&
                (o.removeEventListener(
                  "keystatuseschange",
                  r._onkeystatuseschange
                ),
                (r._onkeystatuseschange = void 0)),
              l && l.readyState !== XMLHttpRequest.DONE && l.abort(),
              (r.mediaKeysSession = r.decryptdata = r.licenseXhr = void 0);
            var c,
              d = qt((u = this.mediaKeySessions)).call(u, r);
            return (
              d > -1 && tl((c = this.mediaKeySessions)).call(c, d, 1),
              o
                .remove()
                .catch(function (h) {
                  var f;
                  i.log("Could not remove session: ".concat(h)),
                    (f = i.hls) == null ||
                      f.trigger(_t.ERROR, {
                        type: no.OTHER_ERROR,
                        details: kr.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,
                        fatal: !1,
                        error: new Error(
                          "Could not remove session: ".concat(h)
                        ),
                      });
                })
                .then(function () {
                  return o.close();
                })
                .catch(function (h) {
                  var f;
                  i.log("Could not close session: ".concat(h)),
                    (f = i.hls) == null ||
                      f.trigger(_t.ERROR, {
                        type: no.OTHER_ERROR,
                        details: kr.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
                        fatal: !1,
                        error: new Error("Could not close session: ".concat(h)),
                      });
                })
            );
          }
        },
      },
    ]),
    n
  );
})();
B9e.CDMCleanupPromise = void 0;
var kg = (function (t) {
    so(n, xI(Error));
    var e = lo(n);
    function n(r, i) {
      var o;
      return (
        Wn(this, n),
        ((o = e.call(this, i)).data = void 0),
        r.error || (r.error = new Error(i)),
        (o.data = r),
        (r.err = r.error),
        o
      );
    }
    return Kn(n);
  })(),
  lXt = (function () {
    function t(e) {
      Wn(this, t),
        (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();
    }
    return (
      Kn(t, [
        {
          key: "setStreamController",
          value: function (e) {
            this.streamController = e;
          },
        },
        {
          key: "registerListeners",
          value: function () {
            this.hls.on(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
              this.hls.on(_t.MEDIA_DETACHING, this.onMediaDetaching, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            this.hls.off(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
              this.hls.off(_t.MEDIA_DETACHING, this.onMediaDetaching, this);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.timer && clearInterval(this.timer),
              this.unregisterListeners(),
              (this.isVideoPlaybackQualityAvailable = !1),
              (this.media = null);
          },
        },
        {
          key: "onMediaAttaching",
          value: function (e, n) {
            var r = this.hls.config;
            if (r.capLevelOnFPSDrop) {
              var i = n.media instanceof self.HTMLVideoElement ? n.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),
                  r.fpsDroppedMonitoringPeriod
                ));
            }
          },
        },
        {
          key: "onMediaDetaching",
          value: function () {
            this.media = null;
          },
        },
        {
          key: "checkFPS",
          value: function (e, n, r) {
            var i = performance.now();
            if (n) {
              if (this.lastTime) {
                var o = i - this.lastTime,
                  l = r - this.lastDroppedFrames,
                  u = n - this.lastDecodedFrames,
                  c = (1e3 * l) / o,
                  d = this.hls;
                if (
                  (d.trigger(_t.FPS_DROP, {
                    currentDropped: l,
                    currentDecoded: u,
                    totalDroppedFrames: r,
                  }),
                  c > 0 && l > d.config.fpsDroppedMonitoringThreshold * u)
                ) {
                  var h = d.currentLevel;
                  d.logger.warn(
                    "drop FPS ratio greater than max allowed value for currentLevel: " +
                      h
                  ),
                    h > 0 &&
                      (d.autoLevelCapping === -1 || d.autoLevelCapping >= h) &&
                      ((h -= 1),
                      d.trigger(_t.FPS_DROP_LEVEL_CAPPING, {
                        level: h,
                        droppedLevel: d.currentLevel,
                      }),
                      (d.autoLevelCapping = h),
                      this.streamController.nextLevelSwitch());
                }
              }
              (this.lastTime = i),
                (this.lastDroppedFrames = r),
                (this.lastDecodedFrames = n);
            }
          },
        },
        {
          key: "checkFPSInterval",
          value: function () {
            var e = this.media;
            if (e)
              if (this.isVideoPlaybackQualityAvailable) {
                var n = e.getVideoPlaybackQuality();
                this.checkFPS(e, n.totalVideoFrames, n.droppedVideoFrames);
              } else
                this.checkFPS(
                  e,
                  e.webkitDecodedFrameCount,
                  e.webkitDroppedFrameCount
                );
          },
        },
      ]),
      t
    );
  })();
function uXt(t, e) {
  var n;
  try {
    n = new Event("addtrack");
  } catch {
    (n = document.createEvent("Event")).initEvent("addtrack", !1, !1);
  }
  (n.track = t), e.dispatchEvent(n);
}
function H9e(t, e) {
  var n = t.mode;
  if (
    (n === "disabled" && (t.mode = "hidden"),
    t.cues && !t.cues.getCueById(e.id))
  )
    try {
      if ((t.addCue(e), !t.cues.getCueById(e.id)))
        throw new Error("addCue is failed for: ".concat(e));
    } catch (i) {
      Is.debug("[texttrack-utils]: ".concat(i));
      try {
        var r = new self.TextTrackCue(e.startTime, e.endTime, e.text);
        (r.id = e.id), t.addCue(r);
      } catch (o) {
        Is.debug(
          "[texttrack-utils]: Legacy TextTrackCue fallback failed: ".concat(o)
        );
      }
    }
  n === "disabled" && (t.mode = n);
}
function iC(t, e) {
  var n = t.mode;
  if ((n === "disabled" && (t.mode = "hidden"), t.cues))
    for (var r = t.cues.length; r--; )
      e && t.cues[r].removeEventListener("enter", e), t.removeCue(t.cues[r]);
  n === "disabled" && (t.mode = n);
}
function m1e(t, e, n, r) {
  var i = t.mode;
  if ((i === "disabled" && (t.mode = "hidden"), t.cues && t.cues.length > 0))
    for (var o = dXt(t.cues, e, n), l = 0; l < o.length; l++)
      (r && !r(o[l])) || t.removeCue(o[l]);
  i === "disabled" && (t.mode = i);
}
function cXt(t, e) {
  if (e < t[0].startTime) return 0;
  var n = t.length - 1;
  if (e > t[n].endTime) return -1;
  for (var r = 0, i = n; r <= i; ) {
    var o = Math.floor((i + r) / 2);
    if (e < t[o].startTime) i = o - 1;
    else {
      if (!(e > t[o].startTime && r < n)) return o;
      r = o + 1;
    }
  }
  return t[r].startTime - e < e - t[i].startTime ? r : i;
}
function dXt(t, e, n) {
  var r = [],
    i = cXt(t, e);
  if (i > -1)
    for (var o = i, l = t.length; o < l; o++) {
      var u = t[o];
      if (u.startTime >= e && u.endTime <= n) r.push(u);
      else if (u.startTime > n) return r;
    }
  return r;
}
function wF(t) {
  for (var e = [], n = 0; n < t.length; n++) {
    var r = t[n];
    (r.kind !== "subtitles" && r.kind !== "captions") ||
      !r.label ||
      e.push(t[n]);
  }
  return e;
}
var hXt = (function (t) {
  so(n, x9e);
  var e = lo(n);
  function n(r) {
    var i;
    return (
      Wn(this, n),
      ((i = e.call(this, r, "subtitle-track-controller")).media = null),
      (i.tracks = []),
      (i.groupIds = null),
      (i.tracksInGroup = []),
      (i.trackId = -1),
      (i.currentTrack = null),
      (i.selectDefaultTrack = !0),
      (i.queuedDefaultTrack = -1),
      (i.useTextTrackPolling = !1),
      (i.subtitlePollingInterval = -1),
      (i._subtitleDisplay = !0),
      (i.asyncPollTrackChange = function () {
        return i.pollTrackChange(0);
      }),
      (i.onTextTracksChanged = function () {
        if (
          (i.useTextTrackPolling ||
            self.clearInterval(i.subtitlePollingInterval),
          i.media && i.hls.config.renderTextTracksNatively)
        ) {
          for (
            var o = null, l = wF(i.media.textTracks), u = 0;
            u < l.length;
            u++
          )
            if (l[u].mode === "hidden") o = l[u];
            else if (l[u].mode === "showing") {
              o = l[u];
              break;
            }
          var c = i.findTrackForTextTrack(o);
          i.subtitleTrack !== c && i.setSubtitleTrack(c);
        }
      }),
      i.registerListeners(),
      i
    );
  }
  return (
    Kn(n, [
      {
        key: "destroy",
        value: function () {
          this.unregisterListeners(),
            (this.tracks.length = 0),
            (this.tracksInGroup.length = 0),
            (this.currentTrack = null),
            (this.onTextTracksChanged = this.asyncPollTrackChange = null),
            Eo(po(n.prototype), "destroy", this).call(this);
        },
      },
      {
        key: "subtitleDisplay",
        get: function () {
          return this._subtitleDisplay;
        },
        set: function (r) {
          (this._subtitleDisplay = r),
            this.trackId > -1 && this.toggleTrackModes();
        },
      },
      {
        key: "registerListeners",
        value: function () {
          var r = this.hls;
          r.on(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
            r.on(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
            r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
            r.on(_t.MANIFEST_PARSED, this.onManifestParsed, this),
            r.on(_t.LEVEL_LOADING, this.onLevelLoading, this),
            r.on(_t.LEVEL_SWITCHING, this.onLevelSwitching, this),
            r.on(_t.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
            r.on(_t.ERROR, this.onError, this);
        },
      },
      {
        key: "unregisterListeners",
        value: function () {
          var r = this.hls;
          r.off(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
            r.off(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
            r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
            r.off(_t.MANIFEST_PARSED, this.onManifestParsed, this),
            r.off(_t.LEVEL_LOADING, this.onLevelLoading, this),
            r.off(_t.LEVEL_SWITCHING, this.onLevelSwitching, this),
            r.off(_t.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
            r.off(_t.ERROR, this.onError, this);
        },
      },
      {
        key: "onMediaAttached",
        value: function (r, i) {
          (this.media = i.media),
            this.media &&
              (this.queuedDefaultTrack > -1 &&
                ((this.subtitleTrack = this.queuedDefaultTrack),
                (this.queuedDefaultTrack = -1)),
              (this.useTextTrackPolling = !(
                this.media.textTracks && "onchange" in this.media.textTracks
              )),
              this.useTextTrackPolling
                ? this.pollTrackChange(500)
                : this.media.textTracks.addEventListener(
                    "change",
                    this.asyncPollTrackChange
                  ));
        },
      },
      {
        key: "pollTrackChange",
        value: function (r) {
          self.clearInterval(this.subtitlePollingInterval),
            (this.subtitlePollingInterval = self.setInterval(
              this.onTextTracksChanged,
              r
            ));
        },
      },
      {
        key: "onMediaDetaching",
        value: function (r, i) {
          var o = this.media;
          if (o) {
            var l = !!i.transferMedia;
            self.clearInterval(this.subtitlePollingInterval),
              this.useTextTrackPolling ||
                o.textTracks.removeEventListener(
                  "change",
                  this.asyncPollTrackChange
                ),
              this.trackId > -1 && (this.queuedDefaultTrack = this.trackId),
              (this.subtitleTrack = -1),
              (this.media = null),
              !l &&
                wF(o.textTracks).forEach(function (u) {
                  iC(u);
                });
          }
        },
      },
      {
        key: "onManifestLoading",
        value: function () {
          (this.tracks = []),
            (this.groupIds = null),
            (this.tracksInGroup = []),
            (this.trackId = -1),
            (this.currentTrack = null),
            (this.selectDefaultTrack = !0);
        },
      },
      {
        key: "onManifestParsed",
        value: function (r, i) {
          this.tracks = i.subtitleTracks;
        },
      },
      {
        key: "onSubtitleTrackLoaded",
        value: function (r, i) {
          var o,
            l,
            u,
            c,
            d,
            h = i.id,
            f = i.groupId,
            p = i.details,
            g = this.tracksInGroup[h];
          if (g && g.groupId === f) {
            var y = g.details;
            (g.details = i.details),
              this.log(
                Ce(
                  (o = Ce(
                    (l = Ce(
                      (u = Ce(
                        (c = Ce((d = "Subtitle track ".concat(h, ' "'))).call(
                          d,
                          g.name,
                          '" lang:'
                        ))
                      ).call(c, g.lang, " group:"))
                    ).call(u, f, " loaded ["))
                  ).call(l, p.startSN, "-"))
                ).call(o, p.endSN, "]")
              ),
              h === this.trackId && this.playlistLoaded(h, i, y);
          } else {
            var v, b;
            this.warn(
              Ce(
                (v = Ce(
                  (b = "Subtitle track with id:".concat(h, " and group:"))
                ).call(b, f, " not found in active group "))
              ).call(v, g == null ? void 0 : g.groupId)
            );
          }
        },
      },
      {
        key: "onLevelLoading",
        value: function (r, i) {
          this.switchLevel(i.level);
        },
      },
      {
        key: "onLevelSwitching",
        value: function (r, i) {
          this.switchLevel(i.level);
        },
      },
      {
        key: "switchLevel",
        value: function (r) {
          var i = this.hls.levels[r];
          if (i) {
            var o = i.subtitleGroups || null,
              l = this.groupIds,
              u = this.currentTrack;
            if (
              !o ||
              (l == null ? void 0 : l.length) !==
                (o == null ? void 0 : o.length) ||
              (o != null &&
                o.some(function (b) {
                  return (l == null ? void 0 : qt(l).call(l, b)) === -1;
                }))
            ) {
              var c, d;
              (this.groupIds = o),
                (this.trackId = -1),
                (this.currentTrack = null);
              var h = _r((c = this.tracks)).call(c, function (b) {
                return !o || qt(o).call(o, b.groupId) !== -1;
              });
              if (h.length)
                this.selectDefaultTrack &&
                  !h.some(function (b) {
                    return b.default;
                  }) &&
                  (this.selectDefaultTrack = !1),
                  h.forEach(function (b, w) {
                    b.id = w;
                  });
              else if (!u && !this.tracksInGroup.length) return;
              this.tracksInGroup = h;
              var f = this.hls.config.subtitlePreference;
              if (!u && f) {
                this.selectDefaultTrack = !1;
                var p = lv(f, h);
                if (p > -1) u = h[p];
                else {
                  var g = lv(f, this.tracks);
                  u = this.tracks[g];
                }
              }
              var y = this.findTrackId(u);
              y === -1 && u && (y = this.findTrackId(null));
              var v = { subtitleTracks: h };
              this.log(
                Ce(
                  (d = "Updating subtitle tracks, ".concat(
                    h.length,
                    ' track(s) found in "'
                  ))
                ).call(d, o == null ? void 0 : o.join(","), '" group-id')
              ),
                this.hls.trigger(_t.SUBTITLE_TRACKS_UPDATED, v),
                y !== -1 && this.trackId === -1 && this.setSubtitleTrack(y);
            }
          }
        },
      },
      {
        key: "findTrackId",
        value: function (r) {
          for (
            var i = this.tracksInGroup, o = this.selectDefaultTrack, l = 0;
            l < i.length;
            l++
          ) {
            var u = i[l];
            if ((!o || u.default) && (o || r) && (!r || Yk(u, r))) return l;
          }
          if (r) {
            for (var c = 0; c < i.length; c++) {
              var d = i[c];
              if (
                HI(r.attrs, d.attrs, [
                  "LANGUAGE",
                  "ASSOC-LANGUAGE",
                  "CHARACTERISTICS",
                ])
              )
                return c;
            }
            for (var h = 0; h < i.length; h++) {
              var f = i[h];
              if (HI(r.attrs, f.attrs, ["LANGUAGE"])) return h;
            }
          }
          return -1;
        },
      },
      {
        key: "findTrackForTextTrack",
        value: function (r) {
          if (r) {
            for (var i = this.tracksInGroup, o = 0; o < i.length; o++)
              if (Kee(i[o], r)) return o;
          }
          return -1;
        },
      },
      {
        key: "onError",
        value: function (r, i) {
          var o;
          !i.fatal &&
            i.context &&
            (i.context.type !== F1.SUBTITLE_TRACK ||
              i.context.id !== this.trackId ||
              (this.groupIds &&
                qt((o = this.groupIds)).call(o, i.context.groupId) === -1) ||
              this.checkRetry(i));
        },
      },
      {
        key: "allSubtitleTracks",
        get: function () {
          return this.tracks;
        },
      },
      {
        key: "subtitleTracks",
        get: function () {
          return this.tracksInGroup;
        },
      },
      {
        key: "subtitleTrack",
        get: function () {
          return this.trackId;
        },
        set: function (r) {
          (this.selectDefaultTrack = !1), this.setSubtitleTrack(r);
        },
      },
      {
        key: "setSubtitleOption",
        value: function (r) {
          if (((this.hls.config.subtitlePreference = r), r)) {
            if (r.id === -1) return this.setSubtitleTrack(-1), null;
            var i = this.allSubtitleTracks;
            if (((this.selectDefaultTrack = !1), i.length)) {
              var o = this.currentTrack;
              if (o && Yk(r, o)) return o;
              var l = lv(r, this.tracksInGroup);
              if (l > -1) {
                var u = this.tracksInGroup[l];
                return this.setSubtitleTrack(l), u;
              }
              if (o) return null;
              var c = lv(r, i);
              if (c > -1) return i[c];
            }
          }
          return null;
        },
      },
      {
        key: "loadPlaylist",
        value: function (r) {
          Eo(po(n.prototype), "loadPlaylist", this).call(this),
            this.shouldLoadPlaylist(this.currentTrack) &&
              this.scheduleLoading(this.currentTrack, r);
        },
      },
      {
        key: "loadingPlaylist",
        value: function (r, i) {
          var o, l, u, c, d, h;
          Eo(po(n.prototype), "loadingPlaylist", this).call(this, r, i);
          var f = r.id,
            p = r.groupId,
            g = this.getUrlWithDirectives(r.url, i),
            y = r.details,
            v = y == null ? void 0 : y.age;
          this.log(
            Ce(
              (o = Ce(
                (l = Ce(
                  (u = Ce(
                    (c = Ce(
                      (d = Ce((h = "Loading subtitle ".concat(f, ' "'))).call(
                        h,
                        r.name,
                        '" lang:'
                      ))
                    ).call(d, r.lang, " group:"))
                  ).call(c, p))
                ).call(
                  u,
                  (i == null ? void 0 : i.msn) !== void 0
                    ? " at sn " + i.msn + " part " + i.part
                    : ""
                ))
              ).call(
                l,
                v && y.live
                  ? " age " + v.toFixed(1) + ((y.type && " " + y.type) || "")
                  : "",
                " "
              ))
            ).call(o, g)
          ),
            this.hls.trigger(_t.SUBTITLE_TRACK_LOADING, {
              url: g,
              id: f,
              groupId: p,
              deliveryDirectives: i || null,
              track: r,
            });
        },
      },
      {
        key: "toggleTrackModes",
        value: function () {
          var r = this.media;
          if (r) {
            var i,
              o,
              l = wF(r.textTracks),
              u = this.currentTrack;
            if (
              (u &&
                ((i = _r(l).call(l, function (d) {
                  return Kee(u, d);
                })[0]) ||
                  this.warn(
                    Ce(
                      (o =
                        'Unable to find subtitle TextTrack with name "'.concat(
                          u.name,
                          '" and language "'
                        ))
                    ).call(o, u.lang, '"')
                  )),
              jn([])
                .call(l)
                .forEach(function (d) {
                  d.mode !== "disabled" && d !== i && (d.mode = "disabled");
                }),
              i)
            ) {
              var c = this.subtitleDisplay ? "showing" : "hidden";
              i.mode !== c && (i.mode = c);
            }
          }
        },
      },
      {
        key: "setSubtitleTrack",
        value: function (r) {
          var i,
            o,
            l = this.tracksInGroup;
          if (this.media)
            if (r < -1 || r >= l.length || !_a(r))
              this.warn("Invalid subtitle track id: ".concat(r));
            else {
              this.selectDefaultTrack = !1;
              var u = this.currentTrack,
                c = l[r] || null;
              if (
                ((this.trackId = r),
                (this.currentTrack = c),
                this.toggleTrackModes(),
                c)
              ) {
                var d = !!c.details && !c.details.live;
                if (r !== this.trackId || c !== u || !d) {
                  this.log(
                    "Switching to subtitle-track ".concat(r) +
                      (c
                        ? Ce(
                            (i = Ce((o = ' "'.concat(c.name, '" lang:'))).call(
                              o,
                              c.lang,
                              " group:"
                            ))
                          ).call(i, c.groupId)
                        : "")
                  );
                  var h = c.id,
                    f = c.groupId,
                    p = f === void 0 ? "" : f,
                    g = c.name,
                    y = c.type,
                    v = c.url;
                  this.hls.trigger(_t.SUBTITLE_TRACK_SWITCH, {
                    id: h,
                    groupId: p,
                    name: g,
                    type: y,
                    url: v,
                  });
                  var b = this.switchParams(
                    c.url,
                    u == null ? void 0 : u.details,
                    c.details
                  );
                  this.loadPlaylist(b);
                }
              } else this.hls.trigger(_t.SUBTITLE_TRACK_SWITCH, { id: r });
            }
          else this.queuedDefaultTrack = r;
        },
      },
    ]),
    n
  );
})();
function JC(t) {
  for (var e = 5381, n = t.length; n; ) e = (33 * e) ^ t.charCodeAt(--n);
  return (e >>> 0).toString();
}
var Jk = 0.02,
  wU = (function (t) {
    return (t[(t.Point = 0)] = "Point"), (t[(t.Range = 1)] = "Range"), t;
  })({});
function fXt(t, e, n) {
  var r, i;
  return Ce(
    (r = Ce((i = "".concat(t.identifier, "-"))).call(i, n + 1, "-"))
  ).call(r, JC(e));
}
var pXt = (function () {
  function t(e, n) {
    Wn(this, 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, jump: !1 }),
      (this.snapOptions = { out: !1, in: !1 }),
      (this.assetList = []),
      (this.assetListLoader = void 0),
      (this.assetListResponse = null),
      (this.resumeAnchor = void 0),
      (this.error = void 0),
      (this.base = n),
      (this.dateRange = e),
      this.setDateRange(e);
  }
  return (
    Kn(t, [
      {
        key: "setDateRange",
        value: function (e) {
          (this.dateRange = e),
            (this.resumeOffset = e.attr.optionalFloat(
              "X-RESUME-OFFSET",
              this.resumeOffset
            )),
            (this.playoutLimit = e.attr.optionalFloat(
              "X-PLAYOUT-LIMIT",
              this.playoutLimit
            )),
            (this.restrictions = e.attr.enumeratedStringList(
              "X-RESTRICT",
              this.restrictions
            )),
            (this.snapOptions = e.attr.enumeratedStringList(
              "X-SNAP",
              this.snapOptions
            ));
        },
      },
      {
        key: "reset",
        value: function () {
          var e;
          (e = this.assetListLoader) == null || e.destroy(),
            (this.assetListLoader = this.error = void 0);
        },
      },
      {
        key: "isAssetPastPlayoutLimit",
        value: function (e) {
          if (e >= this.assetList.length) return !0;
          var n = this.playoutLimit;
          return !(e <= 0 || isNaN(n)) && this.assetList[e].startOffset > n;
        },
      },
      {
        key: "findAssetIndex",
        value: function (e) {
          var n;
          return qt((n = this.assetList)).call(n, e);
        },
      },
      {
        key: "identifier",
        get: function () {
          return this.dateRange.id;
        },
      },
      {
        key: "startDate",
        get: function () {
          return this.dateRange.startDate;
        },
      },
      {
        key: "startTime",
        get: function () {
          var e = this.dateRange.startTime;
          if (this.snapOptions.out) {
            var n = this.dateRange.tagAnchor;
            if (n) return y1e(e, n);
          }
          return e;
        },
      },
      {
        key: "startOffset",
        get: function () {
          return this.cue.pre ? 0 : this.startTime;
        },
      },
      {
        key: "resumptionOffset",
        get: function () {
          var e = this.resumeOffset,
            n = _a(e) ? e : this.duration;
          return this.cumulativeDuration + n;
        },
      },
      {
        key: "resumeTime",
        get: function () {
          var e = this.startOffset + this.resumptionOffset;
          if (this.snapOptions.in) {
            var n = this.resumeAnchor;
            if (n) return y1e(e, n);
          }
          return e;
        },
      },
      {
        key: "appendInPlace",
        get: function () {
          return (
            !this.appendInPlaceDisabled &&
            !(
              this.cue.once ||
              this.cue.pre ||
              (this.startTime !== 0 && !this.snapOptions.out) ||
              !(
                (isNaN(this.playoutLimit) && isNaN(this.resumeOffset)) ||
                (this.resumeOffset &&
                  this.duration &&
                  Math.abs(this.resumeOffset - this.duration) < Jk)
              )
            )
          );
        },
        set: function (e) {
          this.appendInPlaceStarted || (this.appendInPlaceDisabled = !e);
        },
      },
      {
        key: "timelineStart",
        get: function () {
          return this._timelineStart !== null
            ? this._timelineStart
            : this.startTime;
        },
        set: function (e) {
          this._timelineStart = e;
        },
      },
      {
        key: "duration",
        get: function () {
          var e,
            n = this.playoutLimit;
          return (
            (e = this._duration
              ? this._duration
              : this.dateRange.duration
              ? this.dateRange.duration
              : this.dateRange.plannedDuration || 0),
            !isNaN(n) && n < e && (e = n),
            e
          );
        },
        set: function (e) {
          this._duration = e;
        },
      },
      {
        key: "cue",
        get: function () {
          return this.dateRange.cue;
        },
      },
      {
        key: "timelineOccupancy",
        get: function () {
          return this.dateRange.attr["X-TIMELINE-OCCUPIES"] === "RANGE"
            ? wU.Range
            : wU.Point;
        },
      },
      {
        key: "supplementsPrimary",
        get: function () {
          return this.dateRange.attr["X-TIMELINE-STYLE"] === "PRIMARY";
        },
      },
      {
        key: "contentMayVary",
        get: function () {
          return this.dateRange.attr["X-CONTENT-MAY-VARY"] !== "NO";
        },
      },
      {
        key: "assetUrl",
        get: function () {
          return this.dateRange.attr["X-ASSET-URI"];
        },
      },
      {
        key: "assetListUrl",
        get: function () {
          return this.dateRange.attr["X-ASSET-LIST"];
        },
      },
      {
        key: "baseUrl",
        get: function () {
          return this.base.url;
        },
      },
      {
        key: "toString",
        value: function () {
          return gXt(this);
        },
      },
    ]),
    t
  );
})();
function y1e(t, e) {
  return t - e.start < e.duration / 2 &&
    !(Math.abs(t - (e.start + e.duration)) < Jk)
    ? e.start
    : e.start + e.duration;
}
function X9e(t, e, n) {
  var r = new Bs(t, n);
  return r.protocol !== "data:" && r.searchParams.set("_HLS_primary_id", e), r;
}
function gXt(t) {
  var e, n, r;
  return Ce(
    (e = Ce(
      (n = Ce((r = '["'.concat(t.identifier, '" '))).call(
        r,
        t.cue.pre ? "<pre>" : t.cue.post ? "<post>" : ""
      ))
    ).call(n, t.timelineStart.toFixed(2), "-"))
  ).call(e, t.resumeTime.toFixed(2), "]");
}
function Jee(t) {
  var e,
    n,
    r = t.timelineStart,
    i = t.duration || 0;
  return Ce(
    (e = Ce((n = '["'.concat(t.identifier, '" '))).call(n, r.toFixed(2), "-"))
  ).call(e, (r + i).toFixed(2), "]");
}
var mXt = (function () {
    function t(e, n, r, i) {
      var o = this;
      Wn(this, t),
        (this.hls = void 0),
        (this.interstitial = void 0),
        (this.assetItem = void 0),
        (this.tracks = null),
        (this.hasDetails = !1),
        (this.mediaAttached = null),
        (this.playoutOffset = 0),
        (this.checkPlayout = function () {
          var d = o.interstitial.playoutLimit;
          o.playoutOffset + o.currentTime >= d &&
            o.hls.trigger(_t.PLAYOUT_LIMIT_REACHED, {});
        });
      var l = (this.hls = new e(n));
      (this.interstitial = r), (this.assetItem = i);
      var u = i.uri;
      try {
        u = X9e(u, l.sessionId).href;
      } catch {}
      l.loadSource(u);
      var c = function () {
        o.hasDetails = !0;
      };
      l.once(_t.LEVEL_LOADED, c),
        l.once(_t.AUDIO_TRACK_LOADED, c),
        l.once(_t.SUBTITLE_TRACK_LOADED, c),
        l.on(_t.MEDIA_ATTACHING, function (d, h) {
          var f = h.media;
          o.removeMediaListeners(), (o.mediaAttached = f);
          var p,
            g,
            y = o.interstitial;
          y.playoutLimit &&
            ((o.playoutOffset =
              ((g = y.assetList[qt((p = y.assetList)).call(p, i)]) == null
                ? void 0
                : g.startOffset) || 0),
            f.addEventListener("timeupdate", o.checkPlayout));
        });
    }
    return (
      Kn(t, [
        {
          key: "destroyed",
          get: function () {
            var e;
            return !((e = this.hls) != null && e.userConfig);
          },
        },
        {
          key: "assetId",
          get: function () {
            return this.assetItem.identifier;
          },
        },
        {
          key: "interstitialId",
          get: function () {
            return this.assetItem.parentIdentifier;
          },
        },
        {
          key: "media",
          get: function () {
            return this.hls.media;
          },
        },
        {
          key: "bufferedEnd",
          get: function () {
            var e = this.media || this.mediaAttached;
            if (!e) return 0;
            var n = dc.bufferInfo(e, e.currentTime, 0.001);
            return this.getAssetTime(n.end);
          },
        },
        {
          key: "currentTime",
          get: function () {
            var e = this.media || this.mediaAttached;
            return e ? this.getAssetTime(e.currentTime) : 0;
          },
        },
        {
          key: "duration",
          get: function () {
            var e,
              n = (e = this.assetItem) == null ? void 0 : e.duration;
            return n || 0;
          },
        },
        {
          key: "remaining",
          get: function () {
            var e = this.duration;
            return e ? Math.max(0, e - this.currentTime) : 0;
          },
        },
        {
          key: "timelineOffset",
          get: function () {
            return this.hls.config.timelineOffset || 0;
          },
          set: function (e) {
            var n = this.timelineOffset;
            if (e !== n) {
              var r = e - n;
              if (Math.abs(r) > 1 / 9e4) {
                if (this.hasDetails)
                  throw new Error(
                    "Cannot set timelineOffset after playlists are loaded"
                  );
                this.hls.config.timelineOffset = e;
              }
            }
          },
        },
        {
          key: "getAssetTime",
          value: function (e) {
            var n = this.timelineOffset,
              r = this.duration;
            return Math.min(Math.max(0, e - n), r);
          },
        },
        {
          key: "removeMediaListeners",
          value: function () {
            var e = this.mediaAttached;
            e && e.removeEventListener("timeupdate", this.checkPlayout);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.removeMediaListeners(),
              this.hls.destroy(),
              (this.hls = this.interstitial = null),
              (this.tracks = this.mediaAttached = this.checkPlayout = null);
          },
        },
        {
          key: "attachMedia",
          value: function (e) {
            this.hls.attachMedia(e);
          },
        },
        {
          key: "detachMedia",
          value: function () {
            this.removeMediaListeners(), this.hls.detachMedia();
          },
        },
        {
          key: "resumeBuffering",
          value: function () {
            this.hls.resumeBuffering();
          },
        },
        {
          key: "pauseBuffering",
          value: function () {
            this.hls.pauseBuffering();
          },
        },
        {
          key: "transferMedia",
          value: function () {
            return this.hls.transferMedia();
          },
        },
        {
          key: "on",
          value: function (e, n, r) {
            this.hls.on(e, n);
          },
        },
        {
          key: "once",
          value: function (e, n, r) {
            this.hls.once(e, n);
          },
        },
        {
          key: "off",
          value: function (e, n, r) {
            this.hls.off(e, n);
          },
        },
        {
          key: "toString",
          value: function () {
            var e, n;
            return Ce(
              (e = Ce(
                (n = "HlsAssetPlayer: ".concat(Jee(this.assetItem), " "))
              ).call(n, this.hls.sessionId, " "))
            ).call(e, this.interstitial.appendInPlace ? "append-in-place" : "");
          },
        },
      ]),
      t
    );
  })(),
  v1e = 0.033,
  yXt = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r, i) {
      var o;
      return (
        Wn(this, n),
        ((o = e.call(this, "interstitials-sched", i)).onScheduleUpdate =
          void 0),
        (o.eventMap = {}),
        (o.events = null),
        (o.items = null),
        (o.durations = { primary: 0, playout: 0, integrated: 0 }),
        (o.onScheduleUpdate = r),
        o
      );
    }
    return (
      Kn(n, [
        {
          key: "destroy",
          value: function () {
            this.reset(), (this.onScheduleUpdate = null);
          },
        },
        {
          key: "reset",
          value: function () {
            (this.eventMap = {}),
              this.setDurations(0, 0, 0),
              this.events &&
                this.events.forEach(function (r) {
                  return r.reset();
                }),
              (this.events = this.items = null);
          },
        },
        {
          key: "duration",
          get: function () {
            var r = this.items;
            return r ? r[r.length - 1].end : 0;
          },
        },
        {
          key: "length",
          get: function () {
            return this.items ? this.items.length : 0;
          },
        },
        {
          key: "getEvent",
          value: function (r) {
            return (r && this.eventMap[r]) || null;
          },
        },
        {
          key: "hasEvent",
          value: function (r) {
            return r in this.eventMap;
          },
        },
        {
          key: "findItemIndex",
          value: function (r, i) {
            if (r.event) return this.findEventIndex(r.event.identifier);
            var o = -1;
            r.nextEvent
              ? (o = this.findEventIndex(r.nextEvent.identifier) - 1)
              : r.previousEvent &&
                (o = this.findEventIndex(r.previousEvent.identifier) + 1);
            var l = this.items;
            if (l)
              for (
                l[o] ||
                (i === void 0 && (i = r.start),
                (o = this.findItemIndexAtTime(i)));
                o >= 0 && (u = l[o]) != null && u.event;

              ) {
                var u;
                o--;
              }
            return o;
          },
        },
        {
          key: "findItemIndexAtTime",
          value: function (r, i) {
            var o = this.items;
            if (o)
              for (var l = 0; l < o.length; l++) {
                var u = o[l];
                if (
                  (i && i !== "primary" && (u = u[i]),
                  r === u.start || (r > u.start && r < u.end))
                )
                  return l;
              }
            return -1;
          },
        },
        {
          key: "findJumpRestrictedIndex",
          value: function (r, i) {
            var o = this.items;
            if (o)
              for (var l = r; l <= i && o[l]; l++) {
                var u = o[l].event;
                if (u != null && u.restrictions.jump && !u.appendInPlace)
                  return l;
              }
            return -1;
          },
        },
        {
          key: "findEventIndex",
          value: function (r) {
            var i = this.items;
            if (i)
              for (var o = i.length; o--; ) {
                var l;
                if (((l = i[o].event) == null ? void 0 : l.identifier) === r)
                  return o;
              }
            return -1;
          },
        },
        {
          key: "findAssetIndex",
          value: function (r, i) {
            var o = r.assetList,
              l = o.length;
            if (l > 1)
              for (var u = 0; u < l; u++) {
                var c = o[u];
                if (!c.error) {
                  var d = c.timelineStart;
                  if (i === d || (i > d && i < d + (c.duration || 0))) return u;
                }
              }
            return 0;
          },
        },
        {
          key: "assetIdAtEnd",
          get: function () {
            var r,
              i,
              o =
                (r = this.items) == null || (i = r[this.length - 1]) == null
                  ? void 0
                  : i.event;
            if (o) {
              var l = o.assetList,
                u = l[l.length - 1];
              if (u) return u.identifier;
            }
            return null;
          },
        },
        {
          key: "parseInterstitialDateRanges",
          value: function (r) {
            var i = this,
              o = r.main.details,
              l = o.dateRanges,
              u = this.events,
              c = this.parseDateRanges(l, { url: o.url }),
              d = Dn(l),
              h = u
                ? _r(u).call(u, function (f) {
                    return !$a(d).call(d, f.identifier);
                  })
                : [];
            c.length &&
              mm(c).call(c, function (f, p) {
                var g = f.cue.pre,
                  y = f.cue.post,
                  v = p.cue.pre,
                  b = p.cue.post;
                if (g && !v) return -1;
                if ((v && !g) || (y && !b)) return 1;
                if (b && !y) return -1;
                if (!(g || v || y || b)) {
                  var w = f.startTime,
                    k = p.startTime;
                  if (w !== k) return w - k;
                }
                return f.dateRange.tagOrder - p.dateRange.tagOrder;
              }),
              (this.events = c),
              h.forEach(function (f) {
                i.removeEvent(f);
              }),
              this.updateSchedule(r, h);
          },
        },
        {
          key: "updateSchedule",
          value: function (r) {
            var i =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : [],
              o = this.events || [];
            if (o.length || i.length || this.length < 2) {
              var l = this.items,
                u = this.parseSchedule(o, r);
              (i.length ||
                (l == null ? void 0 : l.length) !== u.length ||
                u.some(function (c, d) {
                  return (
                    Math.abs(c.playout.start - l[d].playout.start) > 0.005 ||
                    Math.abs(c.playout.end - l[d].playout.end) > 0.005
                  );
                })) &&
                ((this.items = u), this.onScheduleUpdate(i, l));
            }
          },
        },
        {
          key: "parseDateRanges",
          value: function (r, i) {
            for (var o = [], l = Dn(r), u = 0; u < l.length; u++) {
              var c = l[u],
                d = r[c];
              if (d.isInterstitial) {
                var h = this.eventMap[c];
                h
                  ? h.setDateRange(d)
                  : ((h = new pXt(d, i)), (this.eventMap[c] = h)),
                  o.push(h);
              }
            }
            return o;
          },
        },
        {
          key: "parseSchedule",
          value: function (r, i) {
            var o = [],
              l = i.main.details,
              u = l.live ? 1 / 0 : l.edge,
              c = 0;
            if (
              (r = _r(r).call(r, function (b) {
                return !(b.error || (b.cue.once && b.hasPlayed));
              })).length
            ) {
              this.resolveOffsets(r, i);
              var d = 0,
                h = 0;
              if (
                (r.forEach(function (b, w) {
                  var k = b.cue.pre,
                    D = b.cue.post,
                    $ = r[w - 1] || null,
                    N = b.appendInPlace,
                    P = D ? u : b.startOffset,
                    I = b.duration,
                    O = b.timelineOccupancy === wU.Range ? I : 0,
                    X = b.resumptionOffset,
                    G = ($ == null ? void 0 : $.startTime) === P,
                    H = P + b.cumulativeDuration,
                    E = N ? H + I : P + X;
                  if (k || (!D && P <= 0)) {
                    var S = h;
                    (h += O), (b.timelineStart = H);
                    var L = c;
                    (c += I),
                      o.push({
                        event: b,
                        start: H,
                        end: E,
                        playout: { start: L, end: c },
                        integrated: { start: S, end: h },
                      });
                  } else {
                    if (!(P <= u)) return;
                    if (!G) {
                      var W = P - d;
                      if (W > v1e) {
                        var F = d,
                          oe = h;
                        h += W;
                        var De = c;
                        c += W;
                        var Xe = {
                          previousEvent: r[w - 1] || null,
                          nextEvent: b,
                          start: F,
                          end: F + W,
                          playout: { start: De, end: c },
                          integrated: { start: oe, end: h },
                        };
                        o.push(Xe);
                      } else
                        W > 0 &&
                          $ &&
                          (($.cumulativeDuration += W),
                          (o[o.length - 1].end = P));
                    }
                    D && (E = H), (b.timelineStart = H);
                    var ze = h;
                    h += O;
                    var ht = c;
                    (c += I),
                      o.push({
                        event: b,
                        start: H,
                        end: E,
                        playout: { start: ht, end: c },
                        integrated: { start: ze, end: h },
                      });
                  }
                  var gt = b.resumeTime;
                  d = D || gt > u ? u : gt;
                }),
                d < u)
              ) {
                var f,
                  p = d,
                  g = h,
                  y = u - d;
                h += y;
                var v = c;
                (c += y),
                  o.push({
                    previousEvent:
                      ((f = o[o.length - 1]) == null ? void 0 : f.event) ||
                      null,
                    nextEvent: null,
                    start: d,
                    end: p + y,
                    playout: { start: v, end: c },
                    integrated: { start: g, end: h },
                  });
              }
              this.setDurations(u, c, h);
            } else
              o.push({
                previousEvent: null,
                nextEvent: null,
                start: 0,
                end: u,
                playout: { start: 0, end: u },
                integrated: { start: 0, end: u },
              }),
                this.setDurations(u, u, u);
            return o;
          },
        },
        {
          key: "setDurations",
          value: function (r, i, o) {
            this.durations = { primary: r, playout: i, integrated: o };
          },
        },
        {
          key: "resolveOffsets",
          value: function (r, i) {
            var o = this,
              l = i.main.details,
              u = l.live ? 1 / 0 : l.edge,
              c = 0,
              d = -1;
            r.forEach(function (h, f) {
              var p = h.cue.pre,
                g = h.cue.post,
                y = p ? 0 : g ? u : h.startTime;
              if (
                (o.updateAssetDurations(h),
                d === y ? (h.cumulativeDuration = c) : ((c = 0), (d = y)),
                !g &&
                  h.snapOptions.in &&
                  (h.resumeAnchor =
                    FI(
                      null,
                      l.fragments,
                      h.startOffset + h.resumptionOffset,
                      0,
                      0
                    ) || void 0),
                h.appendInPlace &&
                  !h.appendInPlaceStarted &&
                  (o.primaryCanResumeInPlaceAt(h, i) || (h.appendInPlace = !1)),
                !h.appendInPlace)
              )
                for (var v = f - 1; f--; )
                  r[v + 1].startTime - r[v].resumeTime < v1e &&
                    (r[v].appendInPlace = !1);
              var b = _a(h.resumeOffset) ? h.resumeOffset : h.duration;
              c += b;
            });
          },
        },
        {
          key: "primaryCanResumeInPlaceAt",
          value: function (r, i) {
            var o,
              l,
              u,
              c = this,
              d = r.resumeTime,
              h = r.startTime + r.resumptionOffset;
            return Math.abs(d - h) > Jk
              ? (this.log(
                  Ce(
                    (o = Ce(
                      (l = '"'.concat(r.identifier, '" resumption '))
                    ).call(l, d, " not aligned with estimated timeline end "))
                  ).call(o, h)
                ),
                !1)
              : i
              ? !Dn(i).some(function (f) {
                  var p,
                    g,
                    y,
                    v = i[f].details,
                    b = v.edge;
                  if (d > b)
                    return (
                      c.log(
                        Ce(
                          (p = Ce(
                            (g = Ce(
                              (y = '"'.concat(r.identifier, '" resumption '))
                            ).call(y, d, " past "))
                          ).call(g, f, " playlist end "))
                        ).call(p, b)
                      ),
                      !0
                    );
                  var w,
                    k,
                    D = FI(null, v.fragments, d);
                  if (!D)
                    return (
                      c.log(
                        Ce(
                          (w = Ce(
                            (k = '"'.concat(r.identifier, '" resumption '))
                          ).call(
                            k,
                            d,
                            " does not align with any fragments in "
                          ))
                        ).call(w, f, " playlist")
                      ),
                      !0
                    );
                  var $,
                    N,
                    P,
                    I,
                    O,
                    X,
                    G = f === "audio" ? 0.175 : 0;
                  return (
                    !(
                      Math.abs(D.start - d) < Jk || Math.abs(D.end - d) < Jk + G
                    ) &&
                    (c.log(
                      Ce(
                        ($ = Ce(
                          (N = Ce(
                            (P = Ce(
                              (I = Ce(
                                (O = Ce(
                                  (X = '"'.concat(
                                    r.identifier,
                                    '" resumption '
                                  ))
                                ).call(X, d, " not aligned with "))
                              ).call(O, f, " fragment bounds ("))
                            ).call(I, D.start, "-"))
                          ).call(P, D.end, " sn: "))
                        ).call(N, D.sn, " cc: "))
                      ).call($, D.cc, ")")
                    ),
                    !0)
                  );
                })
              : (this.log(
                  Ce((u = '"'.concat(r.identifier, '" resumption '))).call(
                    u,
                    d,
                    " can not be aligned with media (none selected)"
                  )
                ),
                !1);
          },
        },
        {
          key: "updateAssetDurations",
          value: function (r) {
            var i = r.timelineStart,
              o = 0,
              l = !1,
              u = !1;
            r.assetList.forEach(function (c, d) {
              var h = i + o;
              (c.startOffset = o),
                (c.timelineStart = h),
                l || (l = c.duration === null),
                u || (u = !!c.error);
              var f = c.error ? 0 : c.duration || 0;
              o += f;
            }),
              (r.duration = l && !u ? Math.max(o, r.duration) : o);
          },
        },
        {
          key: "removeEvent",
          value: function (r) {
            r.reset(), delete this.eventMap[r.identifier];
          },
        },
      ]),
      n
    );
  })();
function H_(t) {
  var e, n;
  return Ce(
    (e = Ce(
      (n = "[".concat(
        t.event ? '"' + t.event.identifier + '"' : "primary",
        ": "
      ))
    ).call(n, t.start.toFixed(2), "-"))
  ).call(e, t.end.toFixed(2), "]");
}
var vXt = (function () {
  function t(e) {
    Wn(this, t), (this.hls = void 0), (this.hls = e);
  }
  return (
    Kn(t, [
      {
        key: "destroy",
        value: function () {
          this.hls = null;
        },
      },
      {
        key: "loadAssetList",
        value: function (e, n) {
          var r,
            i = this,
            o = e.assetListUrl;
          try {
            r = X9e(o, this.hls.sessionId, e.baseUrl);
          } catch (y) {
            var l = this.assignAssetListError(
              e,
              kr.ASSET_LIST_LOAD_ERROR,
              y,
              o
            );
            return void this.hls.trigger(_t.ERROR, l);
          }
          if (n && !e.cue.pre && !e.cue.post && r.protocol !== "data:") {
            var u = n - e.startTime;
            u > 0 &&
              r.searchParams.set(
                "_HLS_start_offset",
                "" + Math.round(1e3 * u) / 1e3
              );
          }
          var c = this.hls.config,
            d = new c.loader(c),
            h = { responseType: "json", url: r.href },
            f = c.interstitialAssetListLoadPolicy.default,
            p = {
              loadPolicy: f,
              timeout: f.maxLoadTimeMs,
              maxRetry: 0,
              retryDelay: 0,
              maxRetryDelay: 0,
            },
            g = {
              onSuccess: function (y, v, b, w) {
                var k = y.data,
                  D = k == null ? void 0 : k.ASSETS;
                if (Array.isArray(D))
                  (e.assetListResponse = k),
                    i.hls.trigger(_t.ASSET_LIST_LOADED, {
                      event: e,
                      assetListResponse: k,
                      networkDetails: w,
                    });
                else {
                  var $ = i.assignAssetListError(
                    e,
                    kr.ASSET_LIST_PARSING_ERROR,
                    new Error("Invalid interstitial asset list"),
                    b.url,
                    v,
                    w
                  );
                  i.hls.trigger(_t.ERROR, $);
                }
              },
              onError: function (y, v, b, w) {
                var k,
                  D,
                  $ = i.assignAssetListError(
                    e,
                    kr.ASSET_LIST_LOAD_ERROR,
                    new Error(
                      Ce(
                        (k = Ce(
                          (D =
                            "Error loading X-ASSET-LIST: HTTP status ".concat(
                              y.code,
                              " "
                            ))
                        ).call(D, y.text, " ("))
                      ).call(k, v.url, ")")
                    ),
                    v.url,
                    w,
                    b
                  );
                i.hls.trigger(_t.ERROR, $);
              },
              onTimeout: function (y, v, b) {
                var w = i.assignAssetListError(
                  e,
                  kr.ASSET_LIST_LOAD_TIMEOUT,
                  new Error(
                    "Timeout loading X-ASSET-LIST (".concat(v.url, ")")
                  ),
                  v.url,
                  y,
                  b
                );
                i.hls.trigger(_t.ERROR, w);
              },
            };
          return (
            d.load(h, p, g),
            this.hls.trigger(_t.ASSET_LIST_LOADING, { event: e }),
            d
          );
        },
      },
      {
        key: "assignAssetListError",
        value: function (e, n, r, i, o, l) {
          return (
            (e.error = r),
            {
              type: no.NETWORK_ERROR,
              details: n,
              fatal: !1,
              interstitial: e,
              url: i,
              error: r,
              networkDetails: l,
              stats: o,
            }
          );
        },
      },
    ]),
    t
  );
})();
function b1e(t) {
  t == null || t.play().catch();
}
var bXt = (function (t) {
    so(n, gb);
    var e = lo(n);
    function n(r, i) {
      var o;
      return (
        Wn(this, n),
        ((o = e.call(this, "interstitials", r.logger)).HlsPlayerClass = void 0),
        (o.hls = void 0),
        (o.assetListLoader = void 0),
        (o.mediaSelection = null),
        (o.altSelection = null),
        (o.media = null),
        (o.detachedData = null),
        (o.requiredTracks = null),
        (o.manager = null),
        (o.playerQueue = []),
        (o.bufferedPos = -1),
        (o.timelinePos = -1),
        (o.schedule = void 0),
        (o.playingItem = null),
        (o.bufferingItem = null),
        (o.waitingItem = null),
        (o.playingAsset = null),
        (o.bufferingAsset = null),
        (o.shouldPlay = !1),
        (o.onPlay = function () {
          o.shouldPlay = !0;
        }),
        (o.onPause = function () {
          o.shouldPlay = !1;
        }),
        (o.onSeeking = function () {
          var l = o.currentTime;
          if (l !== void 0 && !o.playbackDisabled) {
            var u = l - o.timelinePos;
            if (!(Math.abs(u) < 1 / 7056e5)) {
              var c = u <= -0.01;
              (o.timelinePos = l), (o.bufferedPos = l), o.checkBuffer();
              var d = o.playingItem;
              if (d)
                if ((c && l < d.start) || l >= d.end) {
                  var h,
                    f = o.schedule.findItemIndexAtTime(o.timelinePos);
                  if (
                    (!o.isInterstitial(d) &&
                      (h = o.media) != null &&
                      h.paused &&
                      (o.shouldPlay = !1),
                    !c)
                  ) {
                    var p = o.findItemIndex(d);
                    if (f > p) {
                      var g = o.schedule.findJumpRestrictedIndex(p + 1, f);
                      if (g > p) return void o.setSchedulePosition(g);
                    }
                  }
                  o.setSchedulePosition(f);
                } else {
                  var y = o.playingAsset;
                  if (y) {
                    var v = y.timelineStart,
                      b = y.duration || 0;
                    ((c && l < v) || l >= v + b) &&
                      o.setScheduleToAssetAtTime(l, y);
                  } else if (o.playingLastItem && o.isInterstitial(d)) {
                    var w = d.event.assetList[0];
                    w &&
                      ((o.playingItem = null),
                      o.setScheduleToAssetAtTime(l, w));
                  }
                }
            }
          }
        }),
        (o.onTimeupdate = function () {
          var l = o.currentTime;
          if (l !== void 0 && !o.playbackDisabled && l > o.timelinePos) {
            l > o.bufferedPos && o.checkBuffer(), (o.timelinePos = l);
            var u = o.playingItem;
            if (u && !o.playingLastItem) {
              if (l >= u.end) {
                o.timelinePos = u.end;
                var c = o.findItemIndex(u);
                o.setSchedulePosition(c + 1);
              }
              var d = o.playingAsset;
              d &&
                l >= d.timelineStart + (d.duration || 0) &&
                o.setScheduleToAssetAtTime(l, d);
            }
          }
        }),
        (o.onScheduleUpdate = function (l, u) {
          var c,
            d,
            h = o.schedule,
            f = o.playingItem,
            p = h.events || [],
            g = h.items || [],
            y = h.durations,
            v = On(l).call(l, function (k) {
              return k.identifier;
            }),
            b = !(!p.length && !v.length);
          b &&
            (o.hls.config.interstitialAppendInPlace === !1 &&
              p.forEach(function (k) {
                return (k.appendInPlace = !1);
              }),
            o.log(
              Ce(
                (c = Ce(
                  (d = "INTERSTITIALS_UPDATED (".concat(p.length, "): "))
                ).call(
                  d,
                  p,
                  `
Schedule: `
                ))
              ).call(
                c,
                On(g).call(g, function (k) {
                  return H_(k);
                })
              )
            )),
            v.length && o.log("Removed events ".concat(v)),
            o.playerQueue.forEach(function (k) {
              if (k.interstitial.appendInPlace) {
                var D = k.assetItem.timelineStart,
                  $ = k.timelineOffset - D;
                if ($)
                  try {
                    k.timelineOffset = D;
                  } catch (O) {
                    var N, P, I;
                    Math.abs($) > Jk &&
                      o.warn(
                        Ce(
                          (N = Ce(
                            (P = Ce((I = "".concat(O, ' ("'))).call(
                              I,
                              k.assetId,
                              '" '
                            ))
                          ).call(P, k.timelineOffset, "->"))
                        ).call(N, D, ")")
                      );
                  }
              }
            }),
            f && !f.event && (o.playingItem = o.updateItem(f, o.timelinePos));
          var w = o.bufferingItem;
          if (
            (w &&
              (w.event
                ? o.updateItem(w) ||
                  ((o.bufferingItem = null), o.clearInterstitial(w.event, null))
                : (o.bufferingItem = o.updateItem(w, o.bufferedPos))),
            (o.waitingItem = o.updateItem(o.waitingItem)),
            l.forEach(function (k) {
              k.assetList.forEach(function (D) {
                o.clearAssetPlayer(D.identifier, null);
              });
            }),
            b || u)
          ) {
            if (
              (o.hls.trigger(_t.INTERSTITIALS_UPDATED, {
                events: jn(p).call(p, 0),
                schedule: jn(g).call(g, 0),
                durations: y,
                removedIds: v,
              }),
              o.isInterstitial(f) && $a(v).call(v, f.event.identifier))
            )
              return (
                o.warn(
                  'Interstitial "'.concat(
                    f.event.identifier,
                    '" removed while playing'
                  )
                ),
                void o.primaryFallback(f.event)
              );
            o.checkBuffer();
          }
        }),
        (o.hls = r),
        (o.HlsPlayerClass = i),
        (o.assetListLoader = new vXt(r)),
        (o.schedule = new yXt(o.onScheduleUpdate, r.logger)),
        o.registerListeners(),
        o
      );
    }
    return (
      Kn(n, [
        {
          key: "registerListeners",
          value: function () {
            var r = this.hls;
            r.on(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
              r.on(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
              r.on(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
              r.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.on(_t.LEVEL_UPDATED, this.onLevelUpdated, this),
              r.on(_t.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
              r.on(_t.AUDIO_TRACK_UPDATED, this.onAudioTrackUpdated, this),
              r.on(_t.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
              r.on(
                _t.SUBTITLE_TRACK_UPDATED,
                this.onSubtitleTrackUpdated,
                this
              ),
              r.on(_t.EVENT_CUE_ENTER, this.onInterstitialCueEnter, this),
              r.on(_t.ASSET_LIST_LOADED, this.onAssetListLoaded, this),
              r.on(_t.BUFFER_APPENDED, this.onBufferAppended, this),
              r.on(_t.BUFFER_FLUSHED, this.onBufferFlushed, this),
              r.on(_t.BUFFERED_TO_END, this.onBufferedToEnd, this),
              r.on(_t.MEDIA_ENDED, this.onMediaEnded, this),
              r.on(_t.ERROR, this.onError, this),
              r.on(_t.DESTROYING, this.onDestroying, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            var r = this.hls;
            r &&
              (r.off(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
              r.off(_t.MEDIA_ATTACHED, this.onMediaAttached, this),
              r.off(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
              r.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              r.off(_t.LEVEL_UPDATED, this.onLevelUpdated, this),
              r.off(_t.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
              r.off(_t.AUDIO_TRACK_UPDATED, this.onAudioTrackUpdated, this),
              r.off(_t.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
              r.off(
                _t.SUBTITLE_TRACK_UPDATED,
                this.onSubtitleTrackUpdated,
                this
              ),
              r.off(_t.EVENT_CUE_ENTER, this.onInterstitialCueEnter, this),
              r.off(_t.ASSET_LIST_LOADED, this.onAssetListLoaded, this),
              r.off(_t.BUFFER_CODECS, this.onBufferCodecs, this),
              r.off(_t.BUFFER_APPENDED, this.onBufferAppended, this),
              r.off(_t.BUFFER_FLUSHED, this.onBufferFlushed, this),
              r.off(_t.BUFFERED_TO_END, this.onBufferedToEnd, this),
              r.off(_t.MEDIA_ENDED, this.onMediaEnded, this),
              r.off(_t.ERROR, this.onError, this),
              r.off(_t.DESTROYING, this.onDestroying, this));
          },
        },
        {
          key: "startLoad",
          value: function () {
            this.resumeBuffering();
          },
        },
        {
          key: "stopLoad",
          value: function () {
            this.pauseBuffering();
          },
        },
        {
          key: "resumeBuffering",
          value: function () {
            this.playerQueue.forEach(function (r) {
              return r.resumeBuffering();
            });
          },
        },
        {
          key: "pauseBuffering",
          value: function () {
            this.playerQueue.forEach(function (r) {
              return r.pauseBuffering();
            });
          },
        },
        {
          key: "destroy",
          value: function () {
            this.unregisterListeners(),
              this.stopLoad(),
              this.assetListLoader && this.assetListLoader.destroy(),
              this.emptyPlayerQueue(),
              this.clearScheduleState(),
              this.schedule && this.schedule.destroy(),
              (this.media =
                this.detachedData =
                this.mediaSelection =
                this.requiredTracks =
                this.altSelection =
                this.manager =
                  null),
              (this.hls =
                this.HlsPlayerClass =
                this.schedule =
                this.log =
                  null),
              (this.assetListLoader = null),
              (this.onPlay =
                this.onPause =
                this.onSeeking =
                this.onTimeupdate =
                  null),
              (this.onScheduleUpdate = null);
          },
        },
        {
          key: "onDestroying",
          value: function () {
            var r = this.primaryMedia;
            r && this.removeMediaListeners(r);
          },
        },
        {
          key: "removeMediaListeners",
          value: function (r) {
            r.removeEventListener("play", this.onPlay),
              r.removeEventListener("pause", this.onPause),
              r.removeEventListener("seeking", this.onSeeking),
              r.removeEventListener("timeupdate", this.onTimeupdate);
          },
        },
        {
          key: "onMediaAttaching",
          value: function (r, i) {
            var o = (this.media = i.media);
            this.removeMediaListeners(o),
              o.addEventListener("seeking", this.onSeeking),
              o.addEventListener("timeupdate", this.onTimeupdate),
              o.addEventListener("play", this.onPlay),
              o.addEventListener("pause", this.onPause);
          },
        },
        {
          key: "onMediaAttached",
          value: function (r, i) {
            var o = this.playingItem,
              l = this.detachedData;
            if (((this.detachedData = null), o === null)) this.checkStart();
            else if (!l) {
              this.clearScheduleState();
              var u = this.findItemIndex(o);
              this.setSchedulePosition(u);
            }
          },
        },
        {
          key: "clearScheduleState",
          value: function () {
            this.playingItem =
              this.bufferingItem =
              this.waitingItem =
              this.playingAsset =
              this.bufferingAsset =
                null;
          },
        },
        {
          key: "onMediaDetaching",
          value: function (r, i) {
            var o = !!i.transferMedia,
              l = this.media;
            if (
              ((this.media = null),
              !o && (l && this.removeMediaListeners(l), this.detachedData))
            ) {
              var u = this.getBufferingPlayer();
              u &&
                ((this.playingAsset = null),
                (this.bufferingAsset = null),
                (this.bufferingItem = null),
                (this.waitingItem = null),
                (this.detachedData = null),
                u.detachMedia()),
                (this.shouldPlay = !1);
            }
          },
        },
        {
          key: "interstitialsManager",
          get: function () {
            if (!this.manager) {
              if (!this.hls || !this.schedule.events) return null;
              var r = this,
                i = function () {
                  return r.bufferingItem || r.waitingItem;
                },
                o = function () {
                  return r.playingItem || r.waitingItem;
                },
                l = function (p) {
                  return p && r.getAssetPlayer(p.identifier);
                },
                u = function (p, g, y, v, b) {
                  if (p) {
                    var w = p[g].start,
                      k = p.event;
                    if (k) {
                      if (g === "playout" || k.timelineOccupancy !== wU.Point) {
                        var D = l(y);
                        (D == null ? void 0 : D.interstitial) === k &&
                          (w += D.assetItem.startOffset + D[b]);
                      }
                    } else w += (v === "bufferedPos" ? d() : r[v]) - p.start;
                    return w;
                  }
                  return 0;
                },
                c = function (p, g) {
                  if (p !== 0 && g !== "primary" && r.schedule.length) {
                    var y,
                      v = r.schedule.findItemIndexAtTime(p),
                      b = (y = r.schedule.items) == null ? void 0 : y[v];
                    if (b) return p + (b[g].start - b.start);
                  }
                  return p;
                },
                d = function () {
                  var p = r.bufferedPos;
                  return p === Number.MAX_VALUE ? h("primary") : p;
                },
                h = function (p) {
                  var g;
                  return (g = r.primaryDetails) != null && g.live
                    ? r.primaryDetails.edge
                    : r.schedule.durations[p];
                },
                f = function (p, g) {
                  var y,
                    v,
                    b,
                    w = o();
                  if (
                    w == null ||
                    (v = w.event) == null ||
                    !v.restrictions.skip
                  ) {
                    r.log(Ce((y = "seek to ".concat(p, ' "'))).call(y, g, '"'));
                    var k = o(),
                      D = r.schedule.findItemIndexAtTime(p, g),
                      $ = (b = r.schedule.items) == null ? void 0 : b[D],
                      N = k == null ? void 0 : k.event,
                      P = N == null ? void 0 : N.appendInPlace,
                      I = k && r.itemsMatch(k, $);
                    if (k && (P || I)) {
                      var O = l(r.playingAsset),
                        X = (O == null ? void 0 : O.media) || r.hls.media;
                      if (X) {
                        var G =
                            p -
                            (g === "primary"
                              ? X.currentTime
                              : u(
                                  k,
                                  g,
                                  r.playingAsset,
                                  "timelinePos",
                                  "currentTime"
                                )),
                          H = X.currentTime + G;
                        if (H >= 0 && (!O || P || H <= O.duration))
                          return void (X.currentTime = H);
                      }
                    }
                    if ($) {
                      var E = p;
                      if (g !== "primary") {
                        var S = p - $[g].start;
                        E = $.start + S;
                      }
                      var L = !r.isInterstitial($);
                      if (
                        r.isInterstitial(k) ||
                        (!L && !$.event.appendInPlace)
                      ) {
                        if (k) {
                          var W = r.findItemIndex(k);
                          if (D > W) {
                            var F = r.schedule.findJumpRestrictedIndex(
                              W + 1,
                              D
                            );
                            if (F > W) return void r.setSchedulePosition(F);
                          }
                          var oe = 0;
                          if (L) r.timelinePos = E;
                          else {
                            var De,
                              Xe =
                                $ == null || (De = $.event) == null
                                  ? void 0
                                  : De.assetList;
                            if (Xe)
                              for (
                                var ze = p - ($[g] || $).start, ht = Xe.length;
                                ht--;

                              ) {
                                var gt = Xe[ht];
                                if (
                                  gt.duration &&
                                  ze >= gt.startOffset &&
                                  ze < gt.startOffset + gt.duration
                                ) {
                                  oe = ht;
                                  break;
                                }
                              }
                          }
                          r.setSchedulePosition(D, oe);
                        }
                      } else {
                        var pt = r.hls.media;
                        pt && (pt.currentTime = E);
                      }
                    }
                  }
                };
              this.manager = {
                get events() {
                  var p, g;
                  return (
                    ((p = r.schedule) == null || (g = p.events) == null
                      ? void 0
                      : jn(g).call(g, 0)) || []
                  );
                },
                get schedule() {
                  var p, g;
                  return (
                    ((p = r.schedule) == null || (g = p.items) == null
                      ? void 0
                      : jn(g).call(g, 0)) || []
                  );
                },
                get playerQueue() {
                  var p;
                  return jn((p = r.playerQueue)).call(p, 0);
                },
                get bufferingPlayer() {
                  return r.getBufferingPlayer();
                },
                get bufferingAsset() {
                  return r.bufferingAsset;
                },
                get bufferingItem() {
                  return r.bufferingItem;
                },
                get playingAsset() {
                  return r.playingAsset;
                },
                get playingItem() {
                  return r.playingItem;
                },
                get bufferingIndex() {
                  var p = i();
                  return r.findItemIndex(p);
                },
                get playingIndex() {
                  var p = o();
                  return r.findItemIndex(p);
                },
                get waitingIndex() {
                  return r.findItemIndex(r.waitingItem);
                },
                primary: {
                  get bufferedEnd() {
                    return d();
                  },
                  get currentTime() {
                    var p = r.timelinePos;
                    return p > 0 ? p : 0;
                  },
                  get duration() {
                    return h("primary");
                  },
                  get seekableStart() {
                    var p;
                    return (
                      ((p = r.primaryDetails) == null
                        ? void 0
                        : p.fragmentStart) || 0
                    );
                  },
                  seekTo: function (p) {
                    return f(p, "primary");
                  },
                },
                playout: {
                  get bufferedEnd() {
                    return u(
                      i(),
                      "playout",
                      r.bufferingAsset,
                      "bufferedPos",
                      "bufferedEnd"
                    );
                  },
                  get currentTime() {
                    return u(
                      o(),
                      "playout",
                      r.playingAsset,
                      "timelinePos",
                      "currentTime"
                    );
                  },
                  get duration() {
                    return h("playout");
                  },
                  get seekableStart() {
                    var p;
                    return c(
                      ((p = r.primaryDetails) == null
                        ? void 0
                        : p.fragmentStart) || 0,
                      "playout"
                    );
                  },
                  seekTo: function (p) {
                    return f(p, "playout");
                  },
                },
                integrated: {
                  get bufferedEnd() {
                    return u(
                      i(),
                      "integrated",
                      r.bufferingAsset,
                      "bufferedPos",
                      "bufferedEnd"
                    );
                  },
                  get currentTime() {
                    return u(
                      o(),
                      "integrated",
                      r.playingAsset,
                      "timelinePos",
                      "currentTime"
                    );
                  },
                  get duration() {
                    return h("integrated");
                  },
                  get seekableStart() {
                    var p;
                    return c(
                      ((p = r.primaryDetails) == null
                        ? void 0
                        : p.fragmentStart) || 0,
                      "integrated"
                    );
                  },
                  seekTo: function (p) {
                    return f(p, "integrated");
                  },
                },
                skip: function () {
                  var p = o(),
                    g = p == null ? void 0 : p.event;
                  if (g && !g.restrictions.skip) {
                    var y = r.findItemIndex(p);
                    if (g.appendInPlace) {
                      var v = p.playout.start + p.event.duration;
                      f(v + 0.001, "playout");
                    } else r.advanceAfterAssetEnded(g, y, 1 / 0);
                  }
                },
              };
            }
            return this.manager;
          },
        },
        {
          key: "playingLastItem",
          get: function () {
            var r,
              i = this.playingItem;
            if (!this.playbackStarted || !i) return !1;
            var o = (r = this.schedule) == null ? void 0 : r.items;
            return this.itemsMatch(i, o ? o[o.length - 1] : null);
          },
        },
        {
          key: "playbackStarted",
          get: function () {
            return this.playingItem !== null;
          },
        },
        {
          key: "currentTime",
          get: function () {
            var r, i, o;
            if (this.mediaSelection !== null) {
              var l = this.waitingItem || this.playingItem;
              if (!this.isInterstitial(l) || l.event.appendInPlace) {
                var u = this.media;
                !u &&
                  (r = this.bufferingItem) != null &&
                  (i = r.event) != null &&
                  i.appendInPlace &&
                  (u = this.primaryMedia);
                var c = (o = u) == null ? void 0 : o.currentTime;
                if (c !== void 0 && _a(c)) return c;
              }
            }
          },
        },
        {
          key: "primaryMedia",
          get: function () {
            var r;
            return (
              this.media ||
              ((r = this.detachedData) == null ? void 0 : r.media) ||
              null
            );
          },
        },
        {
          key: "isInterstitial",
          value: function (r) {
            return !(r == null || !r.event);
          },
        },
        {
          key: "retreiveMediaSource",
          value: function (r, i) {
            var o = this.getAssetPlayer(r);
            o && this.transferMediaFromPlayer(o, i);
          },
        },
        {
          key: "transferMediaFromPlayer",
          value: function (r, i) {
            var o = r.interstitial.appendInPlace,
              l = r.media;
            if (o && l === this.primaryMedia) {
              var u;
              if (!i || (this.isInterstitial(i) && !i.event.appendInPlace))
                return void (i && l && (this.detachedData = { media: l }));
              var c = r.transferMedia();
              this.log(
                Ce((u = "transfer MediaSource from ".concat(r, " "))).call(
                  u,
                  lr(c)
                )
              ),
                (this.bufferingAsset = null),
                (this.detachedData = c);
            } else i && l && (this.shouldPlay || (this.shouldPlay = !l.paused));
          },
        },
        {
          key: "transferMediaTo",
          value: function (r, i) {
            var o,
              l,
              u,
              c,
              d,
              h,
              f = null,
              p = this.hls,
              g = r !== p,
              y = g && r.interstitial.appendInPlace,
              v = (c = this.detachedData) == null ? void 0 : c.mediaSource;
            if (p.media && y)
              (f = p.transferMedia()), (this.detachedData = f), (h = "Primary");
            else if (v) {
              var b = this.getBufferingPlayer();
              b && (f = b.transferMedia()), (h = "".concat(b));
            } else h = "<unknown>";
            this.log(
              Ce(
                (o = Ce(
                  (l = "transferring to ".concat(
                    g ? r : "Primary",
                    `
MediaSource `
                  ))
                ).call(l, lr(f), " from "))
              ).call(o, h)
            ),
              f ||
                (v
                  ? ((f = this.detachedData),
                    this.log("using detachedData: MediaSource ".concat(lr(f))))
                  : (this.detachedData && this.hls.media !== i) ||
                    (this.hls.detachMedia(),
                    (this.detachedData = { media: i })));
            var w =
                f &&
                "mediaSource" in f &&
                ((d = f.mediaSource) == null ? void 0 : d.readyState) !==
                  "closed",
              k = w && f ? f : i;
            if (
              (this.log(
                Ce(
                  (u = "".concat(
                    w ? "transfering MediaSource" : "attaching media",
                    " to "
                  ))
                ).call(u, g ? r : "Primary")
              ),
              k === f)
            ) {
              var D = g && r.assetId === this.schedule.assetIdAtEnd;
              k.overrides = {
                duration: this.schedule.duration,
                endOfStream: !g || D,
                cueRemoval: !1,
              };
            }
            r.attachMedia(k);
          },
        },
        {
          key: "onInterstitialCueEnter",
          value: function () {
            this.onTimeupdate();
          },
        },
        {
          key: "checkStart",
          value: function () {
            var r = this.schedule,
              i = r.events;
            if (i && !this.playbackDisabled) {
              this.bufferedPos === -1 && (this.bufferedPos = 0);
              var o = this.timelinePos,
                l = this.waitingItem;
              if (o === -1) {
                var u = this.hls.startPosition;
                if (((this.timelinePos = u), i.length && i[0].cue.pre)) {
                  var c = r.findEventIndex(i[0].identifier);
                  this.setSchedulePosition(c);
                } else if (u >= 0 || !this.primaryLive) {
                  var d = (this.timelinePos = u > 0 ? u : 0),
                    h = r.findItemIndexAtTime(d);
                  this.setSchedulePosition(h);
                }
              } else if (l && !this.playingItem) {
                var f = r.findItemIndex(l);
                this.setSchedulePosition(f);
              }
            }
          },
        },
        {
          key: "advanceAfterAssetEnded",
          value: function (r, i, o) {
            var l = o + 1;
            if (r.isAssetPastPlayoutLimit(l) || r.assetList[l].error) {
              var u = this.schedule.items;
              if (u) {
                var c = i + 1;
                if (c >= u.length) return void this.setSchedulePosition(-1);
                this.setSchedulePosition(c);
              }
            } else this.setSchedulePosition(i, l);
          },
        },
        {
          key: "setScheduleToAssetAtTime",
          value: function (r, i) {
            var o = this.schedule,
              l = i.parentIdentifier,
              u = o.getEvent(l);
            if (u) {
              var c = o.findEventIndex(l),
                d = o.findAssetIndex(u, r);
              this.setSchedulePosition(c, d);
            }
          },
        },
        {
          key: "setSchedulePosition",
          value: function (r, i) {
            var o,
              l = this,
              u = this.schedule.items;
            if (u && !this.playbackDisabled) {
              this.log(
                Ce((o = "setSchedulePosition ".concat(r, ", "))).call(o, i)
              );
              var c = r >= 0 ? u[r] : null,
                d = this.primaryMedia,
                h = this.playingItem,
                f = this.playingLastItem;
              if (this.isInterstitial(h)) {
                var p,
                  g,
                  y = h.event,
                  v = this.playingAsset,
                  b = v == null ? void 0 : v.identifier,
                  w = b ? this.getAssetPlayer(b) : null;
                if (
                  w &&
                  b &&
                  (!this.eventItemsMatch(h, c) ||
                    (i !== void 0 &&
                      b !==
                        ((p = y.assetList) == null ? void 0 : p[i].identifier)))
                ) {
                  var k, D;
                  this.playingAsset = null;
                  var $ = y.findAssetIndex(v);
                  this.log(
                    Ce(
                      (k = Ce(
                        (D = "INTERSTITIAL_ASSET_ENDED ".concat($ + 1, "/"))
                      ).call(D, y.assetList.length, " "))
                    ).call(k, Jee(v))
                  ),
                    this.hls.trigger(_t.INTERSTITIAL_ASSET_ENDED, {
                      asset: v,
                      assetListIndex: $,
                      event: y,
                      schedule: jn(u).call(u, 0),
                      scheduleIndex: r,
                      player: w,
                    }),
                    this.retreiveMediaSource(b, c),
                    w.media && !this.detachedData && w.detachMedia(),
                    this.clearAssetPlayer(b, c);
                }
                if (
                  !this.eventItemsMatch(h, c) &&
                  ((this.playingItem = null),
                  this.log(
                    Ce((g = "INTERSTITIAL_ENDED ".concat(y, " "))).call(
                      g,
                      H_(h)
                    )
                  ),
                  (y.hasPlayed = !0),
                  this.hls.trigger(_t.INTERSTITIAL_ENDED, {
                    event: y,
                    schedule: jn(u).call(u, 0),
                    scheduleIndex: r,
                  }),
                  this.clearInterstitial(y, c),
                  y.cue.once)
                ) {
                  if ((this.updateSchedule(), c)) {
                    var N = this.schedule.findItemIndex(c);
                    this.setSchedulePosition(N, i);
                  }
                  return;
                }
              }
              var P = this.playerQueue;
              if (
                (P.length &&
                  P.forEach(function (oe) {
                    var De = oe.interstitial,
                      Xe = l.schedule.findEventIndex(De.identifier);
                    (Xe < r || Xe > r + 1) && l.clearInterstitial(De, c);
                  }),
                this.isInterstitial(c))
              ) {
                this.timelinePos = Math.min(
                  Math.max(this.timelinePos, c.start),
                  c.end
                );
                var I = c.event;
                i === void 0 &&
                  (i = this.schedule.findAssetIndex(I, this.timelinePos));
                var O,
                  X = this.waitingItem,
                  G = this.preloadAssets(I, i);
                G || this.setBufferingItem(c),
                  !this.eventItemsMatch(c, h || X) &&
                    ((this.waitingItem = c),
                    this.log(
                      Ce((O = "INTERSTITIAL_STARTED ".concat(H_(c), " "))).call(
                        O,
                        I.appendInPlace ? "append in place" : ""
                      )
                    ),
                    this.hls.trigger(_t.INTERSTITIAL_STARTED, {
                      event: I,
                      schedule: jn(u).call(u, 0),
                      scheduleIndex: r,
                    }));
                var H = I.assetList.length;
                if (H === 0 && !I.assetListResponse)
                  return void this.log(
                    "Waiting for ASSET-LIST to complete loading ".concat(I)
                  );
                if (
                  (I.assetListLoader &&
                    (I.assetListLoader.destroy(), (I.assetListLoader = void 0)),
                  !d)
                )
                  return void this.log(
                    "Waiting for attachMedia to start Interstitial ".concat(I)
                  );
                (this.waitingItem = null), (this.playingItem = c);
                var E,
                  S,
                  L = I.assetList[i];
                if (!L) {
                  var W = u[r + 1],
                    F = this.media;
                  return (
                    W &&
                      F &&
                      !this.isInterstitial(W) &&
                      F.currentTime < W.start &&
                      (F.currentTime = this.timelinePos = W.start),
                    void this.advanceAfterAssetEnded(I, r, i || 0)
                  );
                }
                if (
                  (G || (G = this.getAssetPlayer(L.identifier)),
                  (G === null || G.destroyed) &&
                    (this.warn(
                      Ce(
                        (E = Ce((S = "asset ".concat(i + 1, "/"))).call(
                          S,
                          H,
                          " player destroyed "
                        ))
                      ).call(E, I)
                    ),
                    (G = this.createAssetPlayer(I, L, i))),
                  !this.eventItemsMatch(c, this.bufferingItem) &&
                    I.appendInPlace &&
                    this.isAssetBuffered(L))
                )
                  return;
                this.startAssetPlayer(G, i, u, r, d),
                  this.shouldPlay && b1e(G.media);
              } else
                c !== null
                  ? (this.resumePrimary(c, r, h),
                    this.shouldPlay && b1e(this.hls.media))
                  : f &&
                    this.isInterstitial(h) &&
                    ((this.playingItem = h),
                    h.event.appendInPlace ||
                      this.attachPrimary(
                        this.schedule.durations.primary,
                        null
                      ));
            }
          },
        },
        {
          key: "playbackDisabled",
          get: function () {
            return this.hls.config.enableInterstitialPlayback === !1;
          },
        },
        {
          key: "primaryDetails",
          get: function () {
            var r, i;
            return (r = this.mediaSelection) == null || (i = r.main) == null
              ? void 0
              : i.details;
          },
        },
        {
          key: "primaryLive",
          get: function () {
            var r;
            return !((r = this.primaryDetails) == null || !r.live);
          },
        },
        {
          key: "resumePrimary",
          value: function (r, i, o) {
            var l;
            if (
              ((this.playingItem = r),
              (this.playingAsset = null),
              (this.waitingItem = null),
              this.bufferedToItem(r),
              this.log("resuming ".concat(H_(r))),
              (l = this.detachedData) == null || !l.mediaSource)
            ) {
              var u = this.timelinePos;
              (u < r.start || u >= r.end) &&
                ((u = this.getPrimaryResumption(r, i)), (this.timelinePos = u)),
                this.attachPrimary(u, r);
            }
            if (o) {
              var c = this.schedule.items;
              c &&
                (this.log("resumed ".concat(H_(r))),
                this.hls.trigger(_t.INTERSTITIALS_PRIMARY_RESUMED, {
                  schedule: jn(c).call(c, 0),
                  scheduleIndex: i,
                }),
                this.checkBuffer());
            }
          },
        },
        {
          key: "getPrimaryResumption",
          value: function (r, i) {
            var o = r.start;
            if (this.primaryLive) {
              var l = this.primaryDetails;
              if (i === 0) return this.hls.startPosition;
              if (l && (o < l.fragmentStart || o > l.edge))
                return this.hls.liveSyncPosition || -1;
            }
            return o;
          },
        },
        {
          key: "isAssetBuffered",
          value: function (r) {
            var i = this.getAssetPlayer(r.identifier);
            return i != null && i.hls
              ? i.hls.bufferedToEnd
              : dc.bufferInfo(this.primaryMedia, this.timelinePos, 0).end + 1 >=
                  r.timelineStart + (r.duration || 0);
          },
        },
        {
          key: "attachPrimary",
          value: function (r, i, o) {
            i ? this.setBufferingItem(i) : (this.bufferingItem = null),
              (this.bufferingAsset = null);
            var l = this.primaryMedia;
            if (l) {
              var u = this.hls;
              u.media
                ? this.checkBuffer()
                : (this.transferMediaTo(u, l),
                  o && this.startLoadingPrimaryAt(r, o)),
                o || ((this.timelinePos = r), this.startLoadingPrimaryAt(r, o));
            }
          },
        },
        {
          key: "startLoadingPrimaryAt",
          value: function (r, i) {
            this.hls.loadingEnabled && this.hls.startLoad(r, i);
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            this.stopLoad(),
              this.schedule.reset(),
              this.emptyPlayerQueue(),
              this.clearScheduleState(),
              (this.shouldPlay = !1),
              (this.bufferedPos = this.timelinePos = -1),
              (this.mediaSelection =
                this.altSelection =
                this.manager =
                this.requiredTracks =
                  null),
              this.hls.off(_t.BUFFER_CODECS, this.onBufferCodecs, this),
              this.hls.on(_t.BUFFER_CODECS, this.onBufferCodecs, this);
          },
        },
        {
          key: "onLevelUpdated",
          value: function (r, i) {
            if (i.level !== -1) {
              var o = this.hls.levels[i.level],
                l = fl(
                  fl({}, this.mediaSelection || this.altSelection),
                  {},
                  { main: o }
                );
              (this.mediaSelection = l),
                this.schedule.parseInterstitialDateRanges(l),
                !this.playingItem && this.schedule.items && this.checkStart();
            }
          },
        },
        {
          key: "onAudioTrackUpdated",
          value: function (r, i) {
            var o = this.hls.audioTracks[i.id],
              l = this.mediaSelection;
            if (l) {
              var u = fl(fl({}, l), {}, { audio: o });
              this.mediaSelection = u;
            } else
              this.altSelection = fl(
                fl({}, this.altSelection),
                {},
                { audio: o }
              );
          },
        },
        {
          key: "onSubtitleTrackUpdated",
          value: function (r, i) {
            var o = this.hls.subtitleTracks[i.id],
              l = this.mediaSelection;
            if (l) {
              var u = fl(fl({}, l), {}, { subtitles: o });
              this.mediaSelection = u;
            } else
              this.altSelection = fl(
                fl({}, this.altSelection),
                {},
                { subtitles: o }
              );
          },
        },
        {
          key: "onAudioTrackSwitching",
          value: function (r, i) {
            var o = Fve(i);
            this.playerQueue.forEach(function (l) {
              return l.hls.setAudioOption(i) || l.hls.setAudioOption(o);
            });
          },
        },
        {
          key: "onSubtitleTrackSwitch",
          value: function (r, i) {
            var o = Fve(i);
            this.playerQueue.forEach(function (l) {
              return (
                l.hls.setSubtitleOption(i) ||
                (i.id !== -1 && l.hls.setSubtitleOption(o))
              );
            });
          },
        },
        {
          key: "onBufferCodecs",
          value: function (r, i) {
            var o = i.tracks;
            o && (this.requiredTracks = o);
          },
        },
        {
          key: "onBufferAppended",
          value: function (r, i) {
            this.checkBuffer();
          },
        },
        {
          key: "onBufferFlushed",
          value: function (r, i) {
            var o = this.playingItem;
            if (o && o !== this.bufferingItem && !this.isInterstitial(o)) {
              var l = this.timelinePos;
              (this.bufferedPos = l), this.setBufferingItem(o);
            }
          },
        },
        {
          key: "onBufferedToEnd",
          value: function (r) {
            var i = this.schedule.events;
            if (this.bufferedPos < Number.MAX_VALUE && i) {
              for (var o = 0; o < i.length; o++) {
                var l = i[o];
                if (l.cue.post) {
                  var u,
                    c = this.schedule.findEventIndex(l.identifier),
                    d = (u = this.schedule.items) == null ? void 0 : u[c];
                  this.isInterstitial(d) &&
                    this.eventItemsMatch(d, this.bufferingItem) &&
                    this.bufferedToItem(d, 0);
                  break;
                }
              }
              this.bufferedPos = Number.MAX_VALUE;
            }
          },
        },
        {
          key: "onMediaEnded",
          value: function (r) {
            var i = this.playingItem;
            if (!this.playingLastItem && i) {
              var o = this.findItemIndex(i);
              this.setSchedulePosition(o + 1);
            }
          },
        },
        {
          key: "updateItem",
          value: function (r, i) {
            var o = this.schedule.items;
            return (r && o && o[this.findItemIndex(r, i)]) || null;
          },
        },
        {
          key: "itemsMatch",
          value: function (r, i) {
            var o, l;
            return (
              !!i &&
              (r === i ||
                (r.event && i.event && this.eventItemsMatch(r, i)) ||
                (!r.event &&
                  !i.event &&
                  ((o = r.nextEvent) == null ? void 0 : o.identifier) ===
                    ((l = i.nextEvent) == null ? void 0 : l.identifier)))
            );
          },
        },
        {
          key: "eventItemsMatch",
          value: function (r, i) {
            var o;
            return (
              !!i &&
              (r === i ||
                r.event.identifier ===
                  ((o = i.event) == null ? void 0 : o.identifier))
            );
          },
        },
        {
          key: "findItemIndex",
          value: function (r, i) {
            return r ? this.schedule.findItemIndex(r, i) : -1;
          },
        },
        {
          key: "updateSchedule",
          value: function () {
            var r = this.mediaSelection;
            r && this.schedule.updateSchedule(r, []);
          },
        },
        {
          key: "checkBuffer",
          value: function () {
            var r = this.schedule.items;
            if (r) {
              var i = dc.bufferInfo(this.primaryMedia, this.timelinePos, 0);
              this.updateBufferedPos(i.end, r, i.len === 0);
            }
          },
        },
        {
          key: "updateBufferedPos",
          value: function (r, i, o) {
            var l = this.schedule,
              u = this.bufferingItem;
            if (!(this.bufferedPos > r))
              if (i.length === 1 && this.itemsMatch(i[0], u))
                this.bufferedPos = r;
              else {
                var c = this.playingItem,
                  d = this.findItemIndex(c),
                  h = l.findItemIndexAtTime(r);
                if (this.bufferedPos < r) {
                  var f,
                    p = this.findItemIndex(u),
                    g = Math.min(p + 1, i.length - 1),
                    y = i[g];
                  if (
                    (h === -1 && u && r >= u.end && (h = g),
                    g - d > 1 &&
                      (u == null || (f = u.event) == null
                        ? void 0
                        : f.appendInPlace) === !1)
                  )
                    return;
                  if (((this.bufferedPos = r), h > p && h > d))
                    this.bufferedToItem(y);
                  else {
                    var v = this.primaryDetails;
                    this.primaryLive &&
                      v &&
                      r > v.edge - v.targetduration &&
                      y.start <
                        v.edge + this.hls.config.interstitialLiveLookAhead &&
                      this.isInterstitial(y) &&
                      this.preloadAssets(y.event, 0);
                  }
                } else o && c && u !== c && h === d && this.bufferedToItem(c);
              }
          },
        },
        {
          key: "setBufferingItem",
          value: function (r) {
            var i = this.bufferingItem,
              o = this.schedule,
              l = o.items,
              u = o.events;
            if (l && u && (!i || o.findItemIndex(i) !== o.findItemIndex(r))) {
              var c = this.isInterstitial(r),
                d = this.getBufferingPlayer(),
                h = d ? d.remaining : i ? i.end - this.timelinePos : 0;
              this.log(
                "buffered to boundary ".concat(H_(r)) +
                  (i ? " (".concat(h.toFixed(2), " remaining)") : "")
              ),
                (this.bufferingItem = r),
                (this.bufferedPos = r.start),
                this.playbackDisabled ||
                  (c
                    ? this.playerQueue.forEach(function (f) {
                        return f.resumeBuffering();
                      })
                    : (this.hls.resumeBuffering(),
                      this.playerQueue.forEach(function (f) {
                        return f.pauseBuffering();
                      }))),
                this.hls.trigger(_t.INTERSTITIALS_BUFFERED_TO_BOUNDARY, {
                  events: jn(u).call(u, 0),
                  schedule: jn(l).call(l, 0),
                  bufferingIndex: this.findItemIndex(r),
                  playingIndex: this.findItemIndex(this.playingItem),
                });
            }
            return i;
          },
        },
        {
          key: "bufferedToItem",
          value: function (r) {
            var i =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 0,
              o = this.setBufferingItem(r);
            if (!this.playbackDisabled) {
              if (this.isInterstitial(r)) this.bufferedToEvent(r, i);
              else if (o !== null) {
                this.bufferingAsset = null;
                var l = this.detachedData;
                l
                  ? l.mediaSource
                    ? this.attachPrimary(r.start, r, !0)
                    : this.preloadPrimary(r)
                  : this.preloadPrimary(r);
              }
            }
          },
        },
        {
          key: "preloadPrimary",
          value: function (r) {
            var i = this.findItemIndex(r),
              o = this.getPrimaryResumption(r, i);
            this.startLoadingPrimaryAt(o);
          },
        },
        {
          key: "bufferedToEvent",
          value: function (r, i) {
            var o = r.event,
              l = o.assetList.length === 0 && !o.assetListLoader,
              u = o.cue.once;
            if (l || !u) {
              var c = this.preloadAssets(o, i);
              if (c != null && c.interstitial.appendInPlace) {
                var d = o.assetList[i],
                  h = this.primaryMedia;
                d && h && this.bufferAssetPlayer(c, h);
              }
            }
          },
        },
        {
          key: "preloadAssets",
          value: function (r, i) {
            var o = r.assetList.length,
              l = o === 0 && !r.assetListLoader,
              u = r.cue.once;
            if (l) {
              var c, d;
              this.log(
                Ce(
                  (c = Ce(
                    (d = "Load interstitial asset ".concat(i + 1, "/"))
                  ).call(d, o, " "))
                ).call(c, r)
              );
              var h = r.timelineStart;
              r.appendInPlace && this.flushFrontBuffer(h);
              var f = r.assetUrl;
              if (f) return this.createAsset(r, 0, 0, h, r.duration, f);
              var p = 0;
              !this.playingItem &&
                this.primaryLive &&
                (p = this.hls.startPosition) === -1 &&
                (p = this.hls.liveSyncPosition || 0);
              var g = this.assetListLoader.loadAssetList(r, p);
              g && (r.assetListLoader = g);
            } else if (!u && o) {
              for (var y = i; y < o; y++) {
                var v = r.assetList[y],
                  b = this.getAssetPlayerQueueIndex(v.identifier);
                (b !== -1 && !this.playerQueue[b].destroyed) ||
                  v.error ||
                  this.createAssetPlayer(r, v, y);
              }
              return this.getAssetPlayer(r.assetList[i].identifier);
            }
            return null;
          },
        },
        {
          key: "flushFrontBuffer",
          value: function (r) {
            var i = this,
              o = this.requiredTracks;
            o &&
              Dn(o).forEach(function (l) {
                i.hls.trigger(_t.BUFFER_FLUSHING, {
                  startOffset: r,
                  endOffset: 1 / 0,
                  type: l,
                });
              });
          },
        },
        {
          key: "getAssetPlayerQueueIndex",
          value: function (r) {
            for (var i = this.playerQueue, o = 0; o < i.length; o++)
              if (r === i[o].assetId) return o;
            return -1;
          },
        },
        {
          key: "getAssetPlayer",
          value: function (r) {
            var i = this.getAssetPlayerQueueIndex(r);
            return this.playerQueue[i] || null;
          },
        },
        {
          key: "getBufferingPlayer",
          value: function () {
            var r = this.playerQueue,
              i = this.primaryMedia;
            if (i) {
              for (var o = 0; o < r.length; o++)
                if (r[o].media === i) return r[o];
            }
            return null;
          },
        },
        {
          key: "createAsset",
          value: function (r, i, o, l, u, c) {
            var d = {
              parentIdentifier: r.identifier,
              identifier: fXt(r, c, i),
              duration: u,
              startOffset: o,
              timelineStart: l,
              uri: c,
            };
            return this.createAssetPlayer(r, d, i);
          },
        },
        {
          key: "createAssetPlayer",
          value: function (r, i, o) {
            var l = this;
            this.log("create HLSAssetPlayer for ".concat(Jee(i)));
            var u = this.hls,
              c = u.userConfig,
              d = c.videoPreference,
              h = u.levels[u.loadLevel] || u.levels[u.currentLevel];
            (d || h) &&
              ((d = cu({}, d)),
              h.videoCodec && (d.videoCodec = h.videoCodec),
              h.videoRange && (d.allowedVideoRanges = [h.videoRange]));
            var f = u.audioTracks[u.audioTrack],
              p = u.subtitleTracks[u.subtitleTrack],
              g = 0;
            if (this.primaryLive) {
              var y = this.timelinePos - i.timelineStart;
              if (y > 1) {
                var v = i.duration;
                v && y < v && (g = y);
              }
            }
            var b = fl(
              fl({}, c),
              {},
              {
                autoStartLoad: !0,
                startFragPrefetch: !0,
                primarySessionId: u.sessionId,
                assetPlayerId: i.identifier,
                abrEwmaDefaultEstimate: u.bandwidthEstimate,
                interstitialsController: void 0,
                startPosition: g,
                liveDurationInfinity: !1,
                testBandwidth: !1,
                videoPreference: d,
                audioPreference: f || c.audioPreference,
                subtitlePreference: p || c.subtitlePreference,
              }
            );
            r.appendInPlace &&
              ((r.appendInPlaceStarted = !0),
              i.timelineStart && (b.timelineOffset = i.timelineStart));
            var w = b.cmcd;
            w != null &&
              w.sessionId &&
              w.contentId &&
              (b.cmcd = cu({}, w, { contentId: JC(i.uri) }));
            var k = new mXt(this.HlsPlayerClass, b, r, i);
            this.playerQueue.push(k), (r.assetList[o] = i);
            var D = i.identifier,
              $ = function (P) {
                if (P.live) {
                  var I = new Error(
                      "Interstitials MUST be VOD assets ".concat(r)
                    ),
                    O = {
                      fatal: !0,
                      type: no.OTHER_ERROR,
                      details: kr.INTERSTITIAL_ASSET_ITEM_ERROR,
                      error: I,
                    };
                  l.handleAssetItemError(
                    O,
                    r,
                    l.schedule.findEventIndex(r.identifier),
                    o,
                    I.message
                  );
                } else {
                  var X,
                    G,
                    H = P.edge - P.fragmentStart,
                    E = i.duration;
                  (E === null || H > E) &&
                    (l.log(
                      Ce(
                        (X = Ce(
                          (G = 'Interstitial asset "'.concat(
                            D,
                            '" duration change '
                          ))
                        ).call(G, E, " > "))
                      ).call(X, H)
                    ),
                    (i.duration = H),
                    l.updateSchedule());
                }
              };
            k.on(_t.LEVEL_UPDATED, function (P, I) {
              var O = I.details;
              return $(O);
            }),
              k.on(_t.LEVEL_PTS_UPDATED, function (P, I) {
                var O = I.details;
                return $(O);
              }),
              k.on(_t.BUFFER_CODECS, function P(I, O) {
                var X = l.getAssetPlayer(D);
                if (X && O.tracks) {
                  X.off(_t.BUFFER_CODECS, P), (X.tracks = O.tracks);
                  var G = l.primaryMedia;
                  l.bufferingAsset === X.assetItem &&
                    G &&
                    !X.media &&
                    l.bufferAssetPlayer(X, G);
                }
              }),
              k.on(_t.BUFFERED_TO_END, function P(I) {
                var O,
                  X = l.getAssetPlayer(D);
                if ((l.log("buffered to end of asset ".concat(X)), X)) {
                  X.off(_t.BUFFERED_TO_END, P);
                  var G = l.schedule.findEventIndex(r.identifier),
                    H = r.findAssetIndex(i),
                    E = H + 1,
                    S = (O = l.schedule.items) == null ? void 0 : O[G];
                  if (l.isInterstitial(S))
                    if (
                      H === -1 ||
                      r.isAssetPastPlayoutLimit(E) ||
                      r.assetList[E].error
                    ) {
                      var L,
                        W = (L = l.schedule.items) == null ? void 0 : L[G + 1];
                      W && l.bufferedToItem(W);
                    } else l.bufferedToItem(S, H + 1);
                }
              });
            var N = function (P) {
              return function () {
                if (l.getAssetPlayer(D)) {
                  l.shouldPlay = !0;
                  var I = l.schedule.findEventIndex(r.identifier);
                  l.advanceAfterAssetEnded(r, I, P);
                }
              };
            };
            return (
              k.once(_t.MEDIA_ENDED, N(o)),
              k.once(_t.PLAYOUT_LIMIT_REACHED, N(1 / 0)),
              k.on(_t.ERROR, function (P, I) {
                var O;
                l.handleAssetItemError(
                  I,
                  r,
                  l.schedule.findEventIndex(r.identifier),
                  o,
                  Ce((O = "Asset player error ".concat(I.error, " "))).call(
                    O,
                    r
                  )
                );
              }),
              k.on(_t.DESTROYING, function () {
                if (l.getAssetPlayer(D)) {
                  var P = new Error(
                      "Asset player destroyed unexpectedly ".concat(D)
                    ),
                    I = {
                      fatal: !0,
                      type: no.OTHER_ERROR,
                      details: kr.INTERSTITIAL_ASSET_ITEM_ERROR,
                      error: P,
                    };
                  l.handleAssetItemError(
                    I,
                    r,
                    l.schedule.findEventIndex(r.identifier),
                    o,
                    P.message
                  );
                }
              }),
              this.hls.trigger(_t.INTERSTITIAL_ASSET_PLAYER_CREATED, {
                asset: i,
                assetListIndex: o,
                event: r,
                player: k,
              }),
              k
            );
          },
        },
        {
          key: "clearInterstitial",
          value: function (r, i) {
            var o = this;
            r.assetList.forEach(function (l) {
              o.clearAssetPlayer(l.identifier, i);
            }),
              (r.appendInPlaceStarted = !1);
          },
        },
        {
          key: "clearAssetPlayer",
          value: function (r, i) {
            if (i !== null) {
              var o = this.getAssetPlayerQueueIndex(r);
              if (o !== -1) {
                var l, u;
                this.log(
                  Ce(
                    (l = 'clearAssetPlayer "'.concat(r, '" toSegment: '))
                  ).call(l, i && H_(i))
                );
                var c = this.playerQueue[o];
                this.transferMediaFromPlayer(c, i),
                  tl((u = this.playerQueue)).call(u, o, 1),
                  c.destroy();
              }
            }
          },
        },
        {
          key: "emptyPlayerQueue",
          value: function () {
            for (var r; (r = this.playerQueue.pop()); ) r.destroy();
            this.playerQueue = [];
          },
        },
        {
          key: "startAssetPlayer",
          value: function (r, i, o, l, u) {
            var c,
              d,
              h = r.interstitial,
              f = r.assetItem,
              p = r.assetId,
              g = h.assetList.length,
              y = this.playingAsset;
            (this.playingAsset = f),
              (y && y.identifier === p) ||
                (y &&
                  (this.clearAssetPlayer(y.identifier, o[l]), delete y.error),
                this.log(
                  Ce(
                    (c = Ce(
                      (d = "INTERSTITIAL_ASSET_STARTED ".concat(i + 1, "/"))
                    ).call(d, g, " "))
                  ).call(c, r)
                ),
                this.hls.trigger(_t.INTERSTITIAL_ASSET_STARTED, {
                  asset: f,
                  assetListIndex: i,
                  event: h,
                  schedule: jn(o).call(o, 0),
                  scheduleIndex: l,
                  player: r,
                })),
              r.media || this.bufferAssetPlayer(r, u);
          },
        },
        {
          key: "bufferAssetPlayer",
          value: function (r, i) {
            var o,
              l,
              u = r.interstitial,
              c = r.assetItem,
              d = r.assetId,
              h = this.schedule.findEventIndex(u.identifier),
              f = (o = this.schedule.items) == null ? void 0 : o[h];
            if (f) {
              this.setBufferingItem(f), (this.bufferingAsset = c);
              var p = this.getBufferingPlayer();
              if (p !== r) {
                var g =
                  (p == null ? void 0 : p.tracks) ||
                  ((l = this.detachedData) == null ? void 0 : l.tracks) ||
                  this.requiredTracks;
                if (u.appendInPlace && c !== this.playingAsset) {
                  if (!r.tracks) return;
                  if (g && !Y8e(g, r.tracks)) {
                    var y,
                      v,
                      b = new Error(
                        Ce(
                          (y = Ce(
                            (v = 'Asset "'.concat(
                              d,
                              `" SourceBuffer tracks ('`
                            ))
                          ).call(
                            v,
                            Dn(r.tracks),
                            "') are not compatible with primary content tracks ('"
                          ))
                        ).call(y, Dn(g), "')")
                      ),
                      w = {
                        fatal: !0,
                        type: no.OTHER_ERROR,
                        details: kr.INTERSTITIAL_ASSET_ITEM_ERROR,
                        error: b,
                      },
                      k = u.findAssetIndex(c);
                    return void this.handleAssetItemError(
                      w,
                      u,
                      h,
                      k,
                      b.message
                    );
                  }
                }
                this.transferMediaTo(r, i);
              }
            }
          },
        },
        {
          key: "handleAssetItemError",
          value: function (r, i, o, l, u) {
            if (r.details !== kr.BUFFER_STALLED_ERROR) {
              var c = i.assetList[l] || null,
                d = null;
              if (c) {
                var h = this.getAssetPlayerQueueIndex(c.identifier);
                d = this.playerQueue[h] || null;
              }
              var f = this.schedule.items,
                p = cu({}, r, {
                  fatal: !1,
                  errorAction: kx(!0),
                  asset: c,
                  assetListIndex: l,
                  event: i,
                  schedule: f,
                  scheduleIndex: o,
                  player: d,
                });
              if (
                (this.warn("Asset item error: ".concat(r.error)),
                this.hls.trigger(_t.INTERSTITIAL_ASSET_ERROR, p),
                r.fatal)
              ) {
                var g = new Error(u);
                c &&
                  (this.playingAsset !== c &&
                    this.clearAssetPlayer(c.identifier, null),
                  (c.error = g)),
                  i.assetList.some(function (y) {
                    return !y.error;
                  })
                    ? i.appendInPlace && (i.error = g)
                    : (i.error = g),
                  this.primaryFallback(i);
              }
            }
          },
        },
        {
          key: "primaryFallback",
          value: function (r) {
            var i = r.timelineStart,
              o = this.playingItem || this.waitingItem;
            if ((this.updateSchedule(), o)) {
              var l, u, c, d;
              this.log(
                Ce(
                  (l = Ce(
                    (u = Ce(
                      (c = Ce(
                        (d = 'Fallback to primary from event "'.concat(
                          r.identifier,
                          '" start: '
                        ))
                      ).call(d, i, " pos: "))
                    ).call(c, this.timelinePos, " playing: "))
                  ).call(u, o ? H_(o) : "<none>", " error: "))
                ).call(l, r.error)
              ),
                r.appendInPlace &&
                  ((r.appendInPlace = !1),
                  this.attachPrimary(i, null),
                  this.flushFrontBuffer(i));
              var h = this.timelinePos;
              h === -1 && (h = this.hls.startPosition);
              var f = this.updateItem(o, h);
              if (!this.itemsMatch(o, f)) {
                var p = this.schedule.findItemIndexAtTime(h);
                this.setSchedulePosition(p);
              }
            } else this.checkStart();
          },
        },
        {
          key: "onAssetListLoaded",
          value: function (r, i) {
            var o,
              l = this,
              u = i.event,
              c = u.identifier,
              d = i.assetListResponse.ASSETS;
            if (this.schedule.hasEvent(c)) {
              var h = u.timelineStart,
                f = 0;
              d.forEach(function (N, P) {
                var I = wl(N.DURATION);
                l.createAsset(u, P, f, h + f, I, N.URI), (f += I);
              }),
                (u.duration = f);
              var p = this.waitingItem,
                g = (p == null ? void 0 : p.event.identifier) === c;
              this.updateSchedule();
              var y = (o = this.bufferingItem) == null ? void 0 : o.event;
              if (g) {
                var v,
                  b = this.schedule.findEventIndex(c),
                  w = (v = this.schedule.items) == null ? void 0 : v[b];
                w && this.setBufferingItem(w), this.setSchedulePosition(b);
              } else if (
                (y == null ? void 0 : y.identifier) === c &&
                y.appendInPlace
              ) {
                var k = u.assetList[0],
                  D = this.getAssetPlayer(k.identifier),
                  $ = this.primaryMedia;
                k && D && $ && this.bufferAssetPlayer(D, $);
              }
            }
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            switch (i.details) {
              case kr.ASSET_LIST_PARSING_ERROR:
              case kr.ASSET_LIST_LOAD_ERROR:
              case kr.ASSET_LIST_LOAD_TIMEOUT:
                var o = i.interstitial;
                o && this.primaryFallback(o);
            }
          },
        },
      ]),
      n
    );
  })(),
  _1e = 500,
  _Xt = (function (t) {
    so(n, f9e);
    var e = lo(n);
    function n(r, i, o) {
      var l;
      return (
        Wn(this, n),
        ((l = e.call(
          this,
          r,
          i,
          o,
          "subtitle-stream-controller",
          wo.SUBTITLE
        )).currentTrackId = -1),
        (l.tracksBuffered = []),
        (l.mainDetails = null),
        l.registerListeners(),
        l
      );
    }
    return (
      Kn(n, [
        {
          key: "onHandlerDestroying",
          value: function () {
            this.unregisterListeners(),
              Eo(po(n.prototype), "onHandlerDestroying", this).call(this),
              (this.mainDetails = null);
          },
        },
        {
          key: "registerListeners",
          value: function () {
            Eo(po(n.prototype), "registerListeners", this).call(this);
            var r = this.hls;
            r.on(_t.LEVEL_LOADED, this.onLevelLoaded, this),
              r.on(
                _t.SUBTITLE_TRACKS_UPDATED,
                this.onSubtitleTracksUpdated,
                this
              ),
              r.on(_t.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
              r.on(_t.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
              r.on(
                _t.SUBTITLE_FRAG_PROCESSED,
                this.onSubtitleFragProcessed,
                this
              ),
              r.on(_t.BUFFER_FLUSHING, this.onBufferFlushing, this);
          },
        },
        {
          key: "unregisterListeners",
          value: function () {
            Eo(po(n.prototype), "unregisterListeners", this).call(this);
            var r = this.hls;
            r.off(_t.LEVEL_LOADED, this.onLevelLoaded, this),
              r.off(
                _t.SUBTITLE_TRACKS_UPDATED,
                this.onSubtitleTracksUpdated,
                this
              ),
              r.off(_t.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
              r.off(_t.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
              r.off(
                _t.SUBTITLE_FRAG_PROCESSED,
                this.onSubtitleFragProcessed,
                this
              ),
              r.off(_t.BUFFER_FLUSHING, this.onBufferFlushing, this);
          },
        },
        {
          key: "startLoad",
          value: function (r) {
            this.stopLoad(),
              (this.state = li.IDLE),
              this.setInterval(_1e),
              (this.nextLoadPosition =
                this.startPosition =
                this.lastCurrentTime =
                  r),
              this.tick();
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            Eo(po(n.prototype), "onManifestLoading", this).call(this),
              (this.mainDetails = null);
          },
        },
        {
          key: "onMediaDetaching",
          value: function (r, i) {
            (this.tracksBuffered = []),
              Eo(po(n.prototype), "onMediaDetaching", this).call(this, r, i);
          },
        },
        {
          key: "onLevelLoaded",
          value: function (r, i) {
            this.mainDetails = i.details;
          },
        },
        {
          key: "onSubtitleFragProcessed",
          value: function (r, i) {
            var o = i.frag,
              l = i.success;
            if ((vf(o) && (this.fragPrevious = o), (this.state = li.IDLE), l)) {
              var u = this.tracksBuffered[this.currentTrackId];
              if (u) {
                for (var c, d = o.start, h = 0; h < u.length; h++)
                  if (d >= u[h].start && d <= u[h].end) {
                    c = u[h];
                    break;
                  }
                var f = o.start + o.duration;
                c ? (c.end = f) : ((c = { start: d, end: f }), u.push(c)),
                  this.fragmentTracker.fragBuffered(o),
                  this.fragBufferedComplete(o, null),
                  this.media && this.tick();
              }
            }
          },
        },
        {
          key: "onBufferFlushing",
          value: function (r, i) {
            var o = i.startOffset,
              l = i.endOffset;
            if (o === 0 && l !== Number.POSITIVE_INFINITY) {
              var u = l - 1;
              if (u <= 0) return;
              (i.endOffsetSubtitles = Math.max(0, u)),
                this.tracksBuffered.forEach(function (c) {
                  for (var d = 0; d < c.length; )
                    if (c[d].end <= u) c.shift();
                    else {
                      if (!(c[d].start < u)) break;
                      (c[d].start = u), d++;
                    }
                }),
                this.fragmentTracker.removeFragmentsInRange(o, u, wo.SUBTITLE);
            }
          },
        },
        {
          key: "onError",
          value: function (r, i) {
            var o = i.frag;
            (o == null ? void 0 : o.type) === wo.SUBTITLE &&
              (i.details === kr.FRAG_GAP &&
                this.fragmentTracker.fragBuffered(o, !0),
              this.fragCurrent && this.fragCurrent.abortRequests(),
              this.state !== li.STOPPED && (this.state = li.IDLE));
          },
        },
        {
          key: "onSubtitleTracksUpdated",
          value: function (r, i) {
            var o = this,
              l = i.subtitleTracks;
            this.levels && $9e(this.levels, l)
              ? (this.levels = On(l).call(l, function (u) {
                  return new yU(u);
                }))
              : ((this.tracksBuffered = []),
                (this.levels = On(l).call(l, function (u) {
                  var c = new yU(u);
                  return (o.tracksBuffered[c.id] = []), c;
                })),
                this.fragmentTracker.removeFragmentsInRange(
                  0,
                  Number.POSITIVE_INFINITY,
                  wo.SUBTITLE
                ),
                (this.fragPrevious = null),
                (this.mediaBuffer = null));
          },
        },
        {
          key: "onSubtitleTrackSwitch",
          value: function (r, i) {
            var o;
            if (
              ((this.currentTrackId = i.id),
              (o = this.levels) != null &&
                o.length &&
                this.currentTrackId !== -1)
            ) {
              var l = this.levels[this.currentTrackId];
              l != null && l.details
                ? (this.mediaBuffer = this.mediaBufferTimeRanges)
                : (this.mediaBuffer = null),
                l && this.state !== li.STOPPED && this.setInterval(_1e);
            } else this.clearInterval();
          },
        },
        {
          key: "onSubtitleTrackLoaded",
          value: function (r, i) {
            var o,
              l,
              u,
              c,
              d,
              h,
              f = this.currentTrackId,
              p = this.levels,
              g = i.details,
              y = i.id;
            if (p) {
              var v = p[y];
              if (!(y >= p.length) && v) {
                if (
                  (this.log(
                    Ce(
                      (o = Ce(
                        (l = Ce(
                          (u = Ce(
                            (c = "Subtitle track ".concat(y, " loaded ["))
                          ).call(c, g.startSN, ","))
                        ).call(u, g.endSN, "]"))
                      ).call(
                        l,
                        g.lastPartSn
                          ? Ce((d = "[part-".concat(g.lastPartSn, "-"))).call(
                              d,
                              g.lastPartIndex,
                              "]"
                            )
                          : "",
                        ",duration:"
                      ))
                    ).call(o, g.totalduration)
                  ),
                  (this.mediaBuffer = this.mediaBufferTimeRanges),
                  g.live || ((h = v.details) != null && h.live))
                ) {
                  var b = this.mainDetails;
                  if (g.deltaUpdateFailed || !b) return;
                  var w,
                    k = b.fragments[0];
                  v.details
                    ? this.alignPlaylists(
                        g,
                        v.details,
                        (w = this.levelLastLoaded) == null ? void 0 : w.details
                      ) === 0 &&
                      k &&
                      zee(g, k.start)
                    : g.hasProgramDateTime && b.hasProgramDateTime
                    ? (EU(g, b), g.fragmentStart)
                    : k && zee(g, k.start);
                }
                (v.details = g),
                  (this.levelLastLoaded = v),
                  y === f &&
                    (this.hls.trigger(_t.SUBTITLE_TRACK_UPDATED, {
                      details: g,
                      id: y,
                      groupId: i.groupId,
                    }),
                    this.tick(),
                    g.live &&
                      !this.fragCurrent &&
                      this.media &&
                      this.state === li.IDLE &&
                      (FI(null, g.fragments, this.media.currentTime, 0) ||
                        (this.warn(
                          "Subtitle playlist not aligned with playback"
                        ),
                        (v.details = void 0))));
              }
            } else
              this.warn(
                "Subtitle tracks were reset while loading level ".concat(y)
              );
          },
        },
        {
          key: "_handleFragmentLoadComplete",
          value: function (r) {
            var i = this,
              o = r.frag,
              l = r.payload,
              u = o.decryptdata,
              c = this.hls;
            if (
              !this.fragContextChanged(o) &&
              l &&
              l.byteLength > 0 &&
              u != null &&
              u.key &&
              u.iv &&
              Qk(u.method)
            ) {
              var d = performance.now();
              this.decrypter
                .decrypt(
                  new Uint8Array(l),
                  u.key.buffer,
                  u.iv.buffer,
                  nle(u.method)
                )
                .catch(function (h) {
                  throw (
                    (c.trigger(_t.ERROR, {
                      type: no.MEDIA_ERROR,
                      details: kr.FRAG_DECRYPT_ERROR,
                      fatal: !1,
                      error: h,
                      reason: h.message,
                      frag: o,
                    }),
                    h)
                  );
                })
                .then(function (h) {
                  var f = performance.now();
                  c.trigger(_t.FRAG_DECRYPTED, {
                    frag: o,
                    payload: h,
                    stats: { tstart: d, tdecrypt: f },
                  });
                })
                .catch(function (h) {
                  var f;
                  i.warn(Ce((f = "".concat(h.name, ": "))).call(f, h.message)),
                    (i.state = li.IDLE);
                });
            }
          },
        },
        {
          key: "doTick",
          value: function () {
            if (this.media) {
              if (this.state === li.IDLE) {
                var r = this.currentTrackId,
                  i = this.levels,
                  o = i == null ? void 0 : i[r];
                if (!o || !i.length || !o.details || this.waitForLive(o))
                  return;
                var l = this.config,
                  u = this.getLoadPosition(),
                  c = dc.bufferedInfo(
                    this.tracksBuffered[this.currentTrackId] || [],
                    u,
                    l.maxBufferHole
                  ),
                  d = c.end,
                  h = c.len,
                  f = o.details;
                if (h > this.hls.maxBufferLength + f.levelTargetDuration)
                  return;
                var p = f.fragments,
                  g = p.length,
                  y = f.edge,
                  v = null,
                  b = this.fragPrevious;
                if (d < y) {
                  var w = l.maxFragLookUpTolerance,
                    k = d > y - w ? 0 : w;
                  !(v = FI(b, p, Math.max(p[0].start, d), k)) &&
                    b &&
                    b.start < p[0].start &&
                    (v = p[0]);
                } else v = p[g - 1];
                if (!v) return;
                if (vf((v = this.mapToInitFragWhenRequired(v)))) {
                  var D = p[v.sn - f.startSN - 1];
                  D &&
                    D.cc === v.cc &&
                    this.fragmentTracker.getState(D) === c0.NOT_LOADED &&
                    (v = D);
                }
                this.fragmentTracker.getState(v) === c0.NOT_LOADED &&
                  this.loadFragment(v, o, d);
              }
            } else this.state = li.IDLE;
          },
        },
        {
          key: "loadFragment",
          value: function (r, i, o) {
            vf(r)
              ? Eo(po(n.prototype), "loadFragment", this).call(this, r, i, o)
              : this._loadInitSegment(r, i);
          },
        },
        {
          key: "mediaBufferTimeRanges",
          get: function () {
            return new TXt(this.tracksBuffered[this.currentTrackId] || []);
          },
        },
      ]),
      n
    );
  })(),
  TXt = Kn(function t(e) {
    Wn(this, t), (this.buffered = void 0);
    var n = function (r, i, o) {
      var l, u;
      if ((i >>>= 0) > o - 1)
        throw new DOMException(
          Ce(
            (l = Ce(
              (u = "Failed to execute '".concat(
                r,
                "' on 'TimeRanges': The index provided ("
              ))
            ).call(u, i, ") is greater than the maximum bound ("))
          ).call(l, o, ")")
        );
      return e[i][r];
    };
    this.buffered = {
      get length() {
        return e.length;
      },
      end: function (r) {
        return n("end", r, e.length);
      },
      start: function (r) {
        return n("start", r, e.length);
      },
    };
  }),
  EXt = {
    42: 225,
    92: 233,
    94: 237,
    95: 243,
    96: 250,
    123: 231,
    124: 247,
    125: 209,
    126: 241,
    127: 9608,
    128: 174,
    129: 176,
    130: 189,
    131: 191,
    132: 8482,
    133: 162,
    134: 163,
    135: 9834,
    136: 224,
    137: 32,
    138: 232,
    139: 226,
    140: 234,
    141: 238,
    142: 244,
    143: 251,
    144: 193,
    145: 201,
    146: 211,
    147: 218,
    148: 220,
    149: 252,
    150: 8216,
    151: 161,
    152: 42,
    153: 8217,
    154: 9473,
    155: 169,
    156: 8480,
    157: 8226,
    158: 8220,
    159: 8221,
    160: 192,
    161: 194,
    162: 199,
    163: 200,
    164: 202,
    165: 203,
    166: 235,
    167: 206,
    168: 207,
    169: 239,
    170: 212,
    171: 217,
    172: 249,
    173: 219,
    174: 171,
    175: 187,
    176: 195,
    177: 227,
    178: 205,
    179: 204,
    180: 236,
    181: 210,
    182: 242,
    183: 213,
    184: 245,
    185: 123,
    186: 125,
    187: 92,
    188: 94,
    189: 95,
    190: 124,
    191: 8764,
    192: 196,
    193: 228,
    194: 214,
    195: 246,
    196: 223,
    197: 165,
    198: 164,
    199: 9475,
    200: 197,
    201: 229,
    202: 216,
    203: 248,
    204: 9487,
    205: 9491,
    206: 9495,
    207: 9499,
  },
  V9e = function (t) {
    return String.fromCharCode(EXt[t] || t);
  },
  i0 = 15,
  s1 = 100,
  SXt = { 17: 1, 18: 3, 21: 5, 22: 7, 23: 9, 16: 11, 19: 12, 20: 14 },
  RXt = { 17: 2, 18: 4, 21: 6, 22: 8, 23: 10, 19: 13, 20: 15 },
  AXt = { 25: 1, 26: 3, 29: 5, 30: 7, 31: 9, 24: 11, 27: 12, 28: 14 },
  wXt = { 25: 2, 26: 4, 29: 6, 30: 8, 31: 10, 27: 13, 28: 15 },
  kXt = [
    "white",
    "green",
    "blue",
    "cyan",
    "red",
    "yellow",
    "magenta",
    "black",
    "transparent",
  ],
  IXt = (function () {
    function t() {
      Wn(this, t), (this.time = null), (this.verboseLevel = 0);
    }
    return (
      Kn(t, [
        {
          key: "log",
          value: function (e, n) {
            if (this.verboseLevel >= e) {
              var r,
                i,
                o = typeof n == "function" ? n() : n;
              Is.log(
                Ce(
                  (r = Ce((i = "".concat(this.time, " ["))).call(i, e, "] "))
                ).call(r, o)
              );
            }
          },
        },
      ]),
      t
    );
  })(),
  w2 = function (t) {
    for (var e = [], n = 0; n < t.length; n++) e.push(t[n].toString(16));
    return e;
  },
  z9e = (function () {
    function t() {
      Wn(this, t),
        (this.foreground = "white"),
        (this.underline = !1),
        (this.italics = !1),
        (this.background = "black"),
        (this.flash = !1);
    }
    return (
      Kn(t, [
        {
          key: "reset",
          value: function () {
            (this.foreground = "white"),
              (this.underline = !1),
              (this.italics = !1),
              (this.background = "black"),
              (this.flash = !1);
          },
        },
        {
          key: "setStyles",
          value: function (e) {
            for (
              var n = [
                  "foreground",
                  "underline",
                  "italics",
                  "background",
                  "flash",
                ],
                r = 0;
              r < n.length;
              r++
            ) {
              var i = n[r];
              e.hasOwnProperty(i) && (this[i] = e[i]);
            }
          },
        },
        {
          key: "isDefault",
          value: function () {
            return (
              this.foreground === "white" &&
              !this.underline &&
              !this.italics &&
              this.background === "black" &&
              !this.flash
            );
          },
        },
        {
          key: "equals",
          value: function (e) {
            return (
              this.foreground === e.foreground &&
              this.underline === e.underline &&
              this.italics === e.italics &&
              this.background === e.background &&
              this.flash === e.flash
            );
          },
        },
        {
          key: "copy",
          value: function (e) {
            (this.foreground = e.foreground),
              (this.underline = e.underline),
              (this.italics = e.italics),
              (this.background = e.background),
              (this.flash = e.flash);
          },
        },
        {
          key: "toString",
          value: function () {
            return (
              "color=" +
              this.foreground +
              ", underline=" +
              this.underline +
              ", italics=" +
              this.italics +
              ", background=" +
              this.background +
              ", flash=" +
              this.flash
            );
          },
        },
      ]),
      t
    );
  })(),
  DXt = (function () {
    function t() {
      Wn(this, t), (this.uchar = " "), (this.penState = new z9e());
    }
    return (
      Kn(t, [
        {
          key: "reset",
          value: function () {
            (this.uchar = " "), this.penState.reset();
          },
        },
        {
          key: "setChar",
          value: function (e, n) {
            (this.uchar = e), this.penState.copy(n);
          },
        },
        {
          key: "setPenState",
          value: function (e) {
            this.penState.copy(e);
          },
        },
        {
          key: "equals",
          value: function (e) {
            return this.uchar === e.uchar && this.penState.equals(e.penState);
          },
        },
        {
          key: "copy",
          value: function (e) {
            (this.uchar = e.uchar), this.penState.copy(e.penState);
          },
        },
        {
          key: "isEmpty",
          value: function () {
            return this.uchar === " " && this.penState.isDefault();
          },
        },
      ]),
      t
    );
  })(),
  PXt = (function () {
    function t(e) {
      Wn(this, t),
        (this.chars = []),
        (this.pos = 0),
        (this.currPenState = new z9e()),
        (this.cueStartTime = null),
        (this.logger = void 0);
      for (var n = 0; n < s1; n++) this.chars.push(new DXt());
      this.logger = e;
    }
    return (
      Kn(t, [
        {
          key: "equals",
          value: function (e) {
            for (var n = 0; n < s1; n++)
              if (!this.chars[n].equals(e.chars[n])) return !1;
            return !0;
          },
        },
        {
          key: "copy",
          value: function (e) {
            for (var n = 0; n < s1; n++) this.chars[n].copy(e.chars[n]);
          },
        },
        {
          key: "isEmpty",
          value: function () {
            for (var e = !0, n = 0; n < s1; n++)
              if (!this.chars[n].isEmpty()) {
                e = !1;
                break;
              }
            return e;
          },
        },
        {
          key: "setCursor",
          value: function (e) {
            this.pos !== e && (this.pos = e),
              this.pos < 0
                ? (this.logger.log(3, "Negative cursor position " + this.pos),
                  (this.pos = 0))
                : this.pos > s1 &&
                  (this.logger.log(3, "Too large cursor position " + this.pos),
                  (this.pos = s1));
          },
        },
        {
          key: "moveCursor",
          value: function (e) {
            var n = this.pos + e;
            if (e > 1)
              for (var r = this.pos + 1; r < n + 1; r++)
                this.chars[r].setPenState(this.currPenState);
            this.setCursor(n);
          },
        },
        {
          key: "backSpace",
          value: function () {
            this.moveCursor(-1),
              this.chars[this.pos].setChar(" ", this.currPenState);
          },
        },
        {
          key: "insertChar",
          value: function (e) {
            var n = this;
            e >= 144 && this.backSpace();
            var r = V9e(e);
            this.pos >= s1
              ? this.logger.log(0, function () {
                  return (
                    "Cannot insert " +
                    e.toString(16) +
                    " (" +
                    r +
                    ") at position " +
                    n.pos +
                    ". Skipping it!"
                  );
                })
              : (this.chars[this.pos].setChar(r, this.currPenState),
                this.moveCursor(1));
          },
        },
        {
          key: "clearFromPos",
          value: function (e) {
            var n;
            for (n = e; n < s1; n++) this.chars[n].reset();
          },
        },
        {
          key: "clear",
          value: function () {
            this.clearFromPos(0), (this.pos = 0), this.currPenState.reset();
          },
        },
        {
          key: "clearToEndOfRow",
          value: function () {
            this.clearFromPos(this.pos);
          },
        },
        {
          key: "getTextString",
          value: function () {
            for (var e = [], n = !0, r = 0; r < s1; r++) {
              var i = this.chars[r].uchar;
              i !== " " && (n = !1), e.push(i);
            }
            return n ? "" : e.join("");
          },
        },
        {
          key: "setPenStyles",
          value: function (e) {
            this.currPenState.setStyles(e),
              this.chars[this.pos].setPenState(this.currPenState);
          },
        },
      ]),
      t
    );
  })(),
  WV = (function () {
    function t(e) {
      Wn(this, t),
        (this.rows = []),
        (this.currRow = i0 - 1),
        (this.nrRollUpRows = null),
        (this.lastOutputScreen = null),
        (this.logger = void 0);
      for (var n = 0; n < i0; n++) this.rows.push(new PXt(e));
      this.logger = e;
    }
    return (
      Kn(t, [
        {
          key: "reset",
          value: function () {
            for (var e = 0; e < i0; e++) this.rows[e].clear();
            this.currRow = i0 - 1;
          },
        },
        {
          key: "equals",
          value: function (e) {
            for (var n = !0, r = 0; r < i0; r++)
              if (!this.rows[r].equals(e.rows[r])) {
                n = !1;
                break;
              }
            return n;
          },
        },
        {
          key: "copy",
          value: function (e) {
            for (var n = 0; n < i0; n++) this.rows[n].copy(e.rows[n]);
          },
        },
        {
          key: "isEmpty",
          value: function () {
            for (var e = !0, n = 0; n < i0; n++)
              if (!this.rows[n].isEmpty()) {
                e = !1;
                break;
              }
            return e;
          },
        },
        {
          key: "backSpace",
          value: function () {
            this.rows[this.currRow].backSpace();
          },
        },
        {
          key: "clearToEndOfRow",
          value: function () {
            this.rows[this.currRow].clearToEndOfRow();
          },
        },
        {
          key: "insertChar",
          value: function (e) {
            this.rows[this.currRow].insertChar(e);
          },
        },
        {
          key: "setPen",
          value: function (e) {
            this.rows[this.currRow].setPenStyles(e);
          },
        },
        {
          key: "moveCursor",
          value: function (e) {
            this.rows[this.currRow].moveCursor(e);
          },
        },
        {
          key: "setCursor",
          value: function (e) {
            this.logger.log(2, "setCursor: " + e),
              this.rows[this.currRow].setCursor(e);
          },
        },
        {
          key: "setPAC",
          value: function (e) {
            this.logger.log(2, function () {
              return "pacData = " + lr(e);
            });
            var n = e.row - 1;
            if (
              (this.nrRollUpRows &&
                n < this.nrRollUpRows - 1 &&
                (n = this.nrRollUpRows - 1),
              this.nrRollUpRows && this.currRow !== n)
            ) {
              for (var r = 0; r < i0; r++) this.rows[r].clear();
              var i = this.currRow + 1 - this.nrRollUpRows,
                o = this.lastOutputScreen;
              if (o) {
                var l = o.rows[i].cueStartTime,
                  u = this.logger.time;
                if (l !== null && u !== null && l < u)
                  for (var c = 0; c < this.nrRollUpRows; c++)
                    this.rows[n - this.nrRollUpRows + c + 1].copy(
                      o.rows[i + c]
                    );
              }
            }
            this.currRow = n;
            var d = this.rows[this.currRow];
            if (e.indent !== null) {
              var h = e.indent,
                f = Math.max(h - 1, 0);
              d.setCursor(e.indent), (e.color = d.chars[f].penState.foreground);
            }
            var p = {
              foreground: e.color,
              underline: e.underline,
              italics: e.italics,
              background: "black",
              flash: !1,
            };
            this.setPen(p);
          },
        },
        {
          key: "setBkgData",
          value: function (e) {
            this.logger.log(2, function () {
              return "bkgData = " + lr(e);
            }),
              this.backSpace(),
              this.setPen(e),
              this.insertChar(32);
          },
        },
        {
          key: "setRollUpRows",
          value: function (e) {
            this.nrRollUpRows = e;
          },
        },
        {
          key: "rollUp",
          value: function () {
            var e,
              n,
              r = this;
            if (this.nrRollUpRows !== null) {
              this.logger.log(1, function () {
                return r.getDisplayText();
              });
              var i = this.currRow + 1 - this.nrRollUpRows,
                o = tl((e = this.rows)).call(e, i, 1)[0];
              o.clear(),
                tl((n = this.rows)).call(n, this.currRow, 0, o),
                this.logger.log(2, "Rolling up");
            } else this.logger.log(3, "roll_up but nrRollUpRows not set yet");
          },
        },
        {
          key: "getDisplayText",
          value: function (e) {
            e = e || !1;
            for (var n = [], r = "", i = -1, o = 0; o < i0; o++) {
              var l = this.rows[o].getTextString();
              l &&
                ((i = o + 1),
                e
                  ? n.push("Row " + i + ": '" + l + "'")
                  : n.push(es(l).call(l)));
            }
            return (
              n.length > 0 &&
                (r = e
                  ? "[" + n.join(" | ") + "]"
                  : n.join(`
`)),
              r
            );
          },
        },
        {
          key: "getTextAndFormat",
          value: function () {
            return this.rows;
          },
        },
      ]),
      t
    );
  })(),
  T1e = (function () {
    function t(e, n, r) {
      Wn(this, t),
        (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 = n),
        (this.mode = null),
        (this.verbose = 0),
        (this.displayedMemory = new WV(r)),
        (this.nonDisplayedMemory = new WV(r)),
        (this.lastOutputScreen = new WV(r)),
        (this.currRollUpRow = this.displayedMemory.rows[i0 - 1]),
        (this.writeScreen = this.displayedMemory),
        (this.mode = null),
        (this.cueStartTime = null),
        (this.logger = r);
    }
    return (
      Kn(t, [
        {
          key: "reset",
          value: function () {
            (this.mode = null),
              this.displayedMemory.reset(),
              this.nonDisplayedMemory.reset(),
              this.lastOutputScreen.reset(),
              this.outputFilter.reset(),
              (this.currRollUpRow = this.displayedMemory.rows[i0 - 1]),
              (this.writeScreen = this.displayedMemory),
              (this.mode = null),
              (this.cueStartTime = null);
          },
        },
        {
          key: "getHandler",
          value: function () {
            return this.outputFilter;
          },
        },
        {
          key: "setHandler",
          value: function (e) {
            this.outputFilter = e;
          },
        },
        {
          key: "setPAC",
          value: function (e) {
            this.writeScreen.setPAC(e);
          },
        },
        {
          key: "setBkgData",
          value: function (e) {
            this.writeScreen.setBkgData(e);
          },
        },
        {
          key: "setMode",
          value: function (e) {
            e !== this.mode &&
              ((this.mode = e),
              this.logger.log(2, function () {
                return "MODE=" + e;
              }),
              this.mode === "MODE_POP-ON"
                ? (this.writeScreen = this.nonDisplayedMemory)
                : ((this.writeScreen = this.displayedMemory),
                  this.writeScreen.reset()),
              this.mode !== "MODE_ROLL-UP" &&
                ((this.displayedMemory.nrRollUpRows = null),
                (this.nonDisplayedMemory.nrRollUpRows = null)),
              (this.mode = e));
          },
        },
        {
          key: "insertChars",
          value: function (e) {
            for (var n = this, r = 0; r < e.length; r++)
              this.writeScreen.insertChar(e[r]);
            var i =
              this.writeScreen === this.displayedMemory ? "DISP" : "NON_DISP";
            this.logger.log(2, function () {
              return i + ": " + n.writeScreen.getDisplayText(!0);
            }),
              (this.mode !== "MODE_PAINT-ON" && this.mode !== "MODE_ROLL-UP") ||
                (this.logger.log(1, function () {
                  return "DISPLAYED: " + n.displayedMemory.getDisplayText(!0);
                }),
                this.outputDataUpdate());
          },
        },
        {
          key: "ccRCL",
          value: function () {
            this.logger.log(2, "RCL - Resume Caption Loading"),
              this.setMode("MODE_POP-ON");
          },
        },
        {
          key: "ccBS",
          value: function () {
            this.logger.log(2, "BS - BackSpace"),
              this.mode !== "MODE_TEXT" &&
                (this.writeScreen.backSpace(),
                this.writeScreen === this.displayedMemory &&
                  this.outputDataUpdate());
          },
        },
        { key: "ccAOF", value: function () {} },
        { key: "ccAON", value: function () {} },
        {
          key: "ccDER",
          value: function () {
            this.logger.log(2, "DER- Delete to End of Row"),
              this.writeScreen.clearToEndOfRow(),
              this.outputDataUpdate();
          },
        },
        {
          key: "ccRU",
          value: function (e) {
            this.logger.log(2, "RU(" + e + ") - Roll Up"),
              (this.writeScreen = this.displayedMemory),
              this.setMode("MODE_ROLL-UP"),
              this.writeScreen.setRollUpRows(e);
          },
        },
        {
          key: "ccFON",
          value: function () {
            this.logger.log(2, "FON - Flash On"),
              this.writeScreen.setPen({ flash: !0 });
          },
        },
        {
          key: "ccRDC",
          value: function () {
            this.logger.log(2, "RDC - Resume Direct Captioning"),
              this.setMode("MODE_PAINT-ON");
          },
        },
        {
          key: "ccTR",
          value: function () {
            this.logger.log(2, "TR"), this.setMode("MODE_TEXT");
          },
        },
        {
          key: "ccRTD",
          value: function () {
            this.logger.log(2, "RTD"), this.setMode("MODE_TEXT");
          },
        },
        {
          key: "ccEDM",
          value: function () {
            this.logger.log(2, "EDM - Erase Displayed Memory"),
              this.displayedMemory.reset(),
              this.outputDataUpdate(!0);
          },
        },
        {
          key: "ccCR",
          value: function () {
            this.logger.log(2, "CR - Carriage Return"),
              this.writeScreen.rollUp(),
              this.outputDataUpdate(!0);
          },
        },
        {
          key: "ccENM",
          value: function () {
            this.logger.log(2, "ENM - Erase Non-displayed Memory"),
              this.nonDisplayedMemory.reset();
          },
        },
        {
          key: "ccEOC",
          value: function () {
            var e = this;
            if (
              (this.logger.log(2, "EOC - End Of Caption"),
              this.mode === "MODE_POP-ON")
            ) {
              var n = this.displayedMemory;
              (this.displayedMemory = this.nonDisplayedMemory),
                (this.nonDisplayedMemory = n),
                (this.writeScreen = this.nonDisplayedMemory),
                this.logger.log(1, function () {
                  return "DISP: " + e.displayedMemory.getDisplayText();
                });
            }
            this.outputDataUpdate(!0);
          },
        },
        {
          key: "ccTO",
          value: function (e) {
            this.logger.log(2, "TO(" + e + ") - Tab Offset"),
              this.writeScreen.moveCursor(e);
          },
        },
        {
          key: "ccMIDROW",
          value: function (e) {
            var n = { flash: !1 };
            if (((n.underline = e % 2 == 1), (n.italics = e >= 46), n.italics))
              n.foreground = "white";
            else {
              var r = Math.floor(e / 2) - 16;
              n.foreground = [
                "white",
                "green",
                "blue",
                "cyan",
                "red",
                "yellow",
                "magenta",
              ][r];
            }
            this.logger.log(2, "MIDROW: " + lr(n)), this.writeScreen.setPen(n);
          },
        },
        {
          key: "outputDataUpdate",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0 && arguments[0],
              n = this.logger.time;
            n !== null &&
              this.outputFilter &&
              (this.cueStartTime !== null || this.displayedMemory.isEmpty()
                ? this.displayedMemory.equals(this.lastOutputScreen) ||
                  (this.outputFilter.newCue(
                    this.cueStartTime,
                    n,
                    this.lastOutputScreen
                  ),
                  e &&
                    this.outputFilter.dispatchCue &&
                    this.outputFilter.dispatchCue(),
                  (this.cueStartTime = this.displayedMemory.isEmpty()
                    ? null
                    : n))
                : (this.cueStartTime = n),
              this.lastOutputScreen.copy(this.displayedMemory));
          },
        },
        {
          key: "cueSplitAtTime",
          value: function (e) {
            this.outputFilter &&
              (this.displayedMemory.isEmpty() ||
                (this.outputFilter.newCue &&
                  this.outputFilter.newCue(
                    this.cueStartTime,
                    e,
                    this.displayedMemory
                  ),
                (this.cueStartTime = e)));
          },
        },
      ]),
      t
    );
  })(),
  E1e = (function () {
    function t(e, n, r) {
      Wn(this, t),
        (this.channels = void 0),
        (this.currentChannel = 0),
        (this.cmdHistory = CXt()),
        (this.logger = void 0);
      var i = (this.logger = new IXt());
      this.channels = [null, new T1e(e, n, i), new T1e(e + 1, r, i)];
    }
    return (
      Kn(t, [
        {
          key: "getHandler",
          value: function (e) {
            return this.channels[e].getHandler();
          },
        },
        {
          key: "setHandler",
          value: function (e, n) {
            this.channels[e].setHandler(n);
          },
        },
        {
          key: "addData",
          value: function (e, n) {
            var r = this;
            this.logger.time = e;
            for (
              var i = function (l) {
                  var u = 127 & n[l],
                    c = 127 & n[l + 1],
                    d = !1,
                    h = null;
                  if (u === 0 && c === 0) return "continue";
                  r.logger.log(3, function () {
                    return (
                      "[" + w2([n[l], n[l + 1]]) + "] -> (" + w2([u, c]) + ")"
                    );
                  });
                  var f = r.cmdHistory;
                  if (u >= 16 && u <= 31) {
                    if (MXt(u, c, f))
                      return (
                        h3(null, null, f),
                        r.logger.log(3, function () {
                          return (
                            "Repeated command (" + w2([u, c]) + ") is dropped"
                          );
                        }),
                        "continue"
                      );
                    h3(u, c, r.cmdHistory),
                      (d = r.parseCmd(u, c)) || (d = r.parseMidrow(u, c)),
                      d || (d = r.parsePAC(u, c)),
                      d || (d = r.parseBackgroundAttributes(u, c));
                  } else h3(null, null, f);
                  if (!d && (h = r.parseChars(u, c))) {
                    var p = r.currentChannel;
                    p && p > 0
                      ? r.channels[p].insertChars(h)
                      : r.logger.log(2, "No channel found yet. TEXT-MODE?");
                  }
                  d ||
                    h ||
                    r.logger.log(2, function () {
                      return (
                        "Couldn't parse cleaned data " +
                        w2([u, c]) +
                        " orig: " +
                        w2([n[l], n[l + 1]])
                      );
                    });
                },
                o = 0;
              o < n.length;
              o += 2
            )
              i(o);
          },
        },
        {
          key: "parseCmd",
          value: function (e, n) {
            if (
              !(
                (e === 20 || e === 28 || e === 21 || e === 29) &&
                n >= 32 &&
                n <= 47
              ) &&
              !((e === 23 || e === 31) && n >= 33 && n <= 35)
            )
              return !1;
            var r = e === 20 || e === 21 || e === 23 ? 1 : 2,
              i = this.channels[r];
            return (
              e === 20 || e === 21 || e === 28 || e === 29
                ? n === 32
                  ? i.ccRCL()
                  : n === 33
                  ? i.ccBS()
                  : n === 34
                  ? i.ccAOF()
                  : n === 35
                  ? i.ccAON()
                  : n === 36
                  ? i.ccDER()
                  : n === 37
                  ? i.ccRU(2)
                  : n === 38
                  ? i.ccRU(3)
                  : n === 39
                  ? i.ccRU(4)
                  : n === 40
                  ? i.ccFON()
                  : n === 41
                  ? i.ccRDC()
                  : n === 42
                  ? i.ccTR()
                  : n === 43
                  ? i.ccRTD()
                  : n === 44
                  ? i.ccEDM()
                  : n === 45
                  ? i.ccCR()
                  : n === 46
                  ? i.ccENM()
                  : n === 47 && i.ccEOC()
                : i.ccTO(n - 32),
              (this.currentChannel = r),
              !0
            );
          },
        },
        {
          key: "parseMidrow",
          value: function (e, n) {
            var r = 0;
            if ((e === 17 || e === 25) && n >= 32 && n <= 47) {
              if ((r = e === 17 ? 1 : 2) !== this.currentChannel)
                return (
                  this.logger.log(0, "Mismatch channel in midrow parsing"), !1
                );
              var i = this.channels[r];
              return (
                !!i &&
                (i.ccMIDROW(n),
                this.logger.log(3, function () {
                  return "MIDROW (" + w2([e, n]) + ")";
                }),
                !0)
              );
            }
            return !1;
          },
        },
        {
          key: "parsePAC",
          value: function (e, n) {
            var r;
            if (
              !(
                ((e >= 17 && e <= 23) || (e >= 25 && e <= 31)) &&
                n >= 64 &&
                n <= 127
              ) &&
              !((e === 16 || e === 24) && n >= 64 && n <= 95)
            )
              return !1;
            var i = e <= 23 ? 1 : 2;
            r =
              n >= 64 && n <= 95
                ? i === 1
                  ? SXt[e]
                  : AXt[e]
                : i === 1
                ? RXt[e]
                : wXt[e];
            var o = this.channels[i];
            return (
              !!o &&
              (o.setPAC(this.interpretPAC(r, n)), (this.currentChannel = i), !0)
            );
          },
        },
        {
          key: "interpretPAC",
          value: function (e, n) {
            var r,
              i = {
                color: null,
                italics: !1,
                indent: null,
                underline: !1,
                row: e,
              };
            return (
              (r = n > 95 ? n - 96 : n - 64),
              (i.underline = (1 & r) == 1),
              r <= 13
                ? (i.color = [
                    "white",
                    "green",
                    "blue",
                    "cyan",
                    "red",
                    "yellow",
                    "magenta",
                    "white",
                  ][Math.floor(r / 2)])
                : r <= 15
                ? ((i.italics = !0), (i.color = "white"))
                : (i.indent = 4 * Math.floor((r - 16) / 2)),
              i
            );
          },
        },
        {
          key: "parseChars",
          value: function (e, n) {
            var r,
              i,
              o = null,
              l = null;
            return (
              e >= 25 ? ((r = 2), (l = e - 8)) : ((r = 1), (l = e)),
              l >= 17 && l <= 19
                ? ((i = l === 17 ? n + 80 : l === 18 ? n + 112 : n + 144),
                  this.logger.log(2, function () {
                    return "Special char '" + V9e(i) + "' in channel " + r;
                  }),
                  (o = [i]))
                : e >= 32 && e <= 127 && (o = n === 0 ? [e] : [e, n]),
              o &&
                this.logger.log(3, function () {
                  return "Char codes =  " + w2(o).join(",");
                }),
              o
            );
          },
        },
        {
          key: "parseBackgroundAttributes",
          value: function (e, n) {
            var r;
            if (
              !((e === 16 || e === 24) && n >= 32 && n <= 47) &&
              !((e === 23 || e === 31) && n >= 45 && n <= 47)
            )
              return !1;
            var i = {};
            e === 16 || e === 24
              ? ((r = Math.floor((n - 32) / 2)),
                (i.background = kXt[r]),
                n % 2 == 1 && (i.background = i.background + "_semi"))
              : n === 45
              ? (i.background = "transparent")
              : ((i.foreground = "black"), n === 47 && (i.underline = !0));
            var o = e <= 23 ? 1 : 2;
            return this.channels[o].setBkgData(i), !0;
          },
        },
        {
          key: "reset",
          value: function () {
            for (var e = 0; e < Dn(this.channels).length; e++) {
              var n = this.channels[e];
              n && n.reset();
            }
            h3(null, null, this.cmdHistory);
          },
        },
        {
          key: "cueSplitAtTime",
          value: function (e) {
            for (var n = 0; n < this.channels.length; n++) {
              var r = this.channels[n];
              r && r.cueSplitAtTime(e);
            }
          },
        },
      ]),
      t
    );
  })();
function h3(t, e, n) {
  (n.a = t), (n.b = e);
}
function MXt(t, e, n) {
  return n.a === t && n.b === e;
}
function CXt() {
  return { a: null, b: null };
}
var dle = (function () {
    if (TU != null && TU.VTTCue) return self.VTTCue;
    var t = ["", "lr", "rl"],
      e = ["start", "middle", "end", "left", "right"];
    function n(l, u) {
      if (typeof u != "string" || !Array.isArray(l)) return !1;
      var c = u.toLowerCase();
      return !!~qt(l).call(l, c) && c;
    }
    function r(l) {
      return n(e, l);
    }
    function i(l) {
      for (
        var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), d = 1;
        d < u;
        d++
      )
        c[d - 1] = arguments[d];
      for (var h = 1; h < arguments.length; h++) {
        var f = arguments[h];
        for (var p in f) l[p] = f[p];
      }
      return l;
    }
    function o(l, u, c) {
      var d = this,
        h = { enumerable: !0 };
      d.hasBeenReset = !1;
      var f = "",
        p = !1,
        g = l,
        y = u,
        v = c,
        b = null,
        w = "",
        k = !0,
        D = "auto",
        $ = "start",
        N = 50,
        P = "middle",
        I = 50,
        O = "middle";
      ea(
        d,
        "id",
        i({}, h, {
          get: function () {
            return f;
          },
          set: function (X) {
            f = "" + X;
          },
        })
      ),
        ea(
          d,
          "pauseOnExit",
          i({}, h, {
            get: function () {
              return p;
            },
            set: function (X) {
              p = !!X;
            },
          })
        ),
        ea(
          d,
          "startTime",
          i({}, h, {
            get: function () {
              return g;
            },
            set: function (X) {
              if (typeof X != "number")
                throw new TypeError("Start time must be set to a number.");
              (g = X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "endTime",
          i({}, h, {
            get: function () {
              return y;
            },
            set: function (X) {
              if (typeof X != "number")
                throw new TypeError("End time must be set to a number.");
              (y = X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "text",
          i({}, h, {
            get: function () {
              return v;
            },
            set: function (X) {
              (v = "" + X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "region",
          i({}, h, {
            get: function () {
              return b;
            },
            set: function (X) {
              (b = X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "vertical",
          i({}, h, {
            get: function () {
              return w;
            },
            set: function (X) {
              var G = (function (H) {
                return n(t, H);
              })(X);
              if (G === !1)
                throw new SyntaxError(
                  "An invalid or illegal string was specified."
                );
              (w = G), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "snapToLines",
          i({}, h, {
            get: function () {
              return k;
            },
            set: function (X) {
              (k = !!X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "line",
          i({}, h, {
            get: function () {
              return D;
            },
            set: function (X) {
              if (typeof X != "number" && X !== "auto")
                throw new SyntaxError(
                  "An invalid number or illegal string was specified."
                );
              (D = X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "lineAlign",
          i({}, h, {
            get: function () {
              return $;
            },
            set: function (X) {
              var G = r(X);
              if (!G)
                throw new SyntaxError(
                  "An invalid or illegal string was specified."
                );
              ($ = G), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "position",
          i({}, h, {
            get: function () {
              return N;
            },
            set: function (X) {
              if (X < 0 || X > 100)
                throw new Error("Position must be between 0 and 100.");
              (N = X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "positionAlign",
          i({}, h, {
            get: function () {
              return P;
            },
            set: function (X) {
              var G = r(X);
              if (!G)
                throw new SyntaxError(
                  "An invalid or illegal string was specified."
                );
              (P = G), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "size",
          i({}, h, {
            get: function () {
              return I;
            },
            set: function (X) {
              if (X < 0 || X > 100)
                throw new Error("Size must be between 0 and 100.");
              (I = X), (this.hasBeenReset = !0);
            },
          })
        ),
        ea(
          d,
          "align",
          i({}, h, {
            get: function () {
              return O;
            },
            set: function (X) {
              var G = r(X);
              if (!G)
                throw new SyntaxError(
                  "An invalid or illegal string was specified."
                );
              (O = G), (this.hasBeenReset = !0);
            },
          })
        ),
        (d.displayState = void 0);
    }
    return (
      (o.prototype.getCueAsHTML = function () {
        return self.WebVTT.convertCueToDOMTree(self, this.text);
      }),
      o
    );
  })(),
  $Xt = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, [
        {
          key: "decode",
          value: function (e, n) {
            if (!e) return "";
            if (typeof e != "string")
              throw new Error("Error - expected string data.");
            return decodeURIComponent(encodeURIComponent(e));
          },
        },
      ]),
      t
    );
  })();
function j9e(t) {
  function e(r, i, o, l) {
    return 3600 * (0 | r) + 60 * (0 | i) + (0 | o) + wl(l || 0);
  }
  var n = t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);
  return n
    ? wl(n[2]) > 59
      ? e(n[2], n[3], 0, n[4])
      : e(n[1], n[2], n[3], n[4])
    : null;
}
var xXt = (function () {
  function t() {
    Wn(this, t), (this.values = Object.create(null));
  }
  return (
    Kn(t, [
      {
        key: "set",
        value: function (e, n) {
          this.get(e) || n === "" || (pS(this)[e] = n);
        },
      },
      {
        key: "get",
        value: function (e, n, r) {
          return r
            ? this.has(e)
              ? pS(this)[e]
              : n[r]
            : this.has(e)
            ? pS(this)[e]
            : n;
        },
      },
      {
        key: "has",
        value: function (e) {
          return e in pS(this);
        },
      },
      {
        key: "alt",
        value: function (e, n, r) {
          for (var i = 0; i < r.length; ++i)
            if (n === r[i]) {
              this.set(e, n);
              break;
            }
        },
      },
      {
        key: "integer",
        value: function (e, n) {
          /^-?\d+$/.test(n) && this.set(e, _i(n, 10));
        },
      },
      {
        key: "percent",
        value: function (e, n) {
          if (/^([\d]{1,3})(\.[\d]*)?%$/.test(n)) {
            var r = wl(n);
            if (r >= 0 && r <= 100) return this.set(e, r), !0;
          }
          return !1;
        },
      },
    ]),
    t
  );
})();
function W9e(t, e, n, r) {
  var i = r ? t.split(r) : [t];
  for (var o in i)
    if (typeof i[o] == "string") {
      var l = i[o].split(n);
      l.length === 2 && e(l[0], l[1]);
    }
}
var qee = new dle(0, 0, ""),
  f3 = qee.align === "middle" ? "middle" : "center";
function LXt(t, e, n) {
  var r = t;
  function i() {
    var l = j9e(t);
    if (l === null) throw new Error("Malformed timestamp: " + r);
    return (t = t.replace(/^[^\sa-zA-Z-]+/, "")), l;
  }
  function o() {
    t = t.replace(/^\s+/, "");
  }
  if ((o(), (e.startTime = i()), o(), jn(t).call(t, 0, 3) !== "-->"))
    throw new Error(
      "Malformed time stamp (time stamps must be separated by '-->'): " + r
    );
  (t = jn(t).call(t, 3)),
    o(),
    (e.endTime = i()),
    o(),
    (function (l, u) {
      var c = new xXt();
      W9e(
        l,
        function (f, p) {
          var g;
          switch (f) {
            case "region":
              for (var y = n.length - 1; y >= 0; y--)
                if (n[y].id === p) {
                  c.set(f, n[y].region);
                  break;
                }
              break;
            case "vertical":
              c.alt(f, p, ["rl", "lr"]);
              break;
            case "line":
              (g = p.split(",")),
                c.integer(f, g[0]),
                c.percent(f, g[0]) && c.set("snapToLines", !1),
                c.alt(f, g[0], ["auto"]),
                g.length === 2 &&
                  c.alt("lineAlign", g[1], ["start", f3, "end"]);
              break;
            case "position":
              (g = p.split(",")),
                c.percent(f, g[0]),
                g.length === 2 &&
                  c.alt("positionAlign", g[1], [
                    "start",
                    f3,
                    "end",
                    "line-left",
                    "line-right",
                    "auto",
                  ]);
              break;
            case "size":
              c.percent(f, p);
              break;
            case "align":
              c.alt(f, p, ["start", f3, "end", "left", "right"]);
          }
        },
        /:/,
        /\s/
      ),
        (u.region = c.get("region", null)),
        (u.vertical = c.get("vertical", ""));
      var d = c.get("line", "auto");
      d === "auto" && qee.line === -1 && (d = -1),
        (u.line = d),
        (u.lineAlign = c.get("lineAlign", "start")),
        (u.snapToLines = c.get("snapToLines", !0)),
        (u.size = c.get("size", 100)),
        (u.align = c.get("align", f3));
      var h = c.get("position", "auto");
      h === "auto" &&
        qee.position === 50 &&
        (h =
          u.align === "start" || u.align === "left"
            ? 0
            : u.align === "end" || u.align === "right"
            ? 100
            : 50),
        (u.position = h);
    })(t, e);
}
function K9e(t) {
  return t.replace(
    /<br(?: \/)?>/gi,
    `
`
  );
}
var OXt = (function () {
    function t() {
      Wn(this, t),
        (this.state = "INITIAL"),
        (this.buffer = ""),
        (this.decoder = new $Xt()),
        (this.regionList = []),
        (this.cue = null),
        (this.oncue = void 0),
        (this.onparsingerror = void 0),
        (this.onflush = void 0);
    }
    return (
      Kn(t, [
        {
          key: "parse",
          value: function (e) {
            var n = this;
            function r() {
              var c = n.buffer,
                d = 0;
              for (
                c = K9e(c);
                d < c.length &&
                c[d] !== "\r" &&
                c[d] !==
                  `
`;

              )
                ++d;
              var h = jn(c).call(c, 0, d);
              return (
                c[d] === "\r" && ++d,
                c[d] ===
                  `
` && ++d,
                (n.buffer = jn(c).call(c, d)),
                h
              );
            }
            e && (n.buffer += n.decoder.decode(e, { stream: !0 }));
            try {
              var i = "";
              if (n.state === "INITIAL") {
                if (!/\r\n|\n/.test(n.buffer)) return this;
                var o = (i = r()).match(/^(ï»¿)?WEBVTT([ \t].*)?$/);
                if (o == null || !o[0])
                  throw new Error("Malformed WebVTT signature.");
                n.state = "HEADER";
              }
              for (var l = !1; n.buffer; ) {
                if (!/\r\n|\n/.test(n.buffer)) return this;
                switch ((l ? (l = !1) : (i = r()), n.state)) {
                  case "HEADER":
                    /:/.test(i)
                      ? W9e(i, function (c, d) {}, /:/)
                      : i || (n.state = "ID");
                    continue;
                  case "NOTE":
                    i || (n.state = "ID");
                    continue;
                  case "ID":
                    if (/^NOTE($|[ \t])/.test(i)) {
                      n.state = "NOTE";
                      break;
                    }
                    if (!i) continue;
                    if (
                      ((n.cue = new dle(0, 0, "")),
                      (n.state = "CUE"),
                      qt(i).call(i, "-->") === -1)
                    ) {
                      n.cue.id = i;
                      continue;
                    }
                  case "CUE":
                    if (!n.cue) {
                      n.state = "BADCUE";
                      continue;
                    }
                    try {
                      LXt(i, n.cue, n.regionList);
                    } catch {
                      (n.cue = null), (n.state = "BADCUE");
                      continue;
                    }
                    n.state = "CUETEXT";
                    continue;
                  case "CUETEXT":
                    var u = qt(i).call(i, "-->") !== -1;
                    if (!i || (u && (l = !0))) {
                      n.oncue && n.cue && n.oncue(n.cue),
                        (n.cue = null),
                        (n.state = "ID");
                      continue;
                    }
                    if (n.cue === null) continue;
                    n.cue.text &&
                      (n.cue.text += `
`),
                      (n.cue.text += i);
                    continue;
                  case "BADCUE":
                    i || (n.state = "ID");
                }
              }
            } catch {
              n.state === "CUETEXT" && n.cue && n.oncue && n.oncue(n.cue),
                (n.cue = null),
                (n.state = n.state === "INITIAL" ? "BADWEBVTT" : "BADCUE");
            }
            return this;
          },
        },
        {
          key: "flush",
          value: function () {
            var e = this;
            try {
              if (
                ((e.cue || e.state === "HEADER") &&
                  ((e.buffer += `

`),
                  e.parse()),
                e.state === "INITIAL" || e.state === "BADWEBVTT")
              )
                throw new Error("Malformed WebVTT signature.");
            } catch (n) {
              e.onparsingerror && e.onparsingerror(n);
            }
            return e.onflush && e.onflush(), this;
          },
        },
      ]),
      t
    );
  })(),
  GXt = /\r\n|\n\r|\n|\r/g,
  KV = function (t, e) {
    var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
    return jn(t).call(t, n, n + e.length) === e;
  },
  NXt = function (t) {
    var e = _i(jn(t).call(t, -3)),
      n = _i(jn(t).call(t, -6, -4)),
      r = _i(jn(t).call(t, -9, -7)),
      i = t.length > 9 ? _i(t.substring(0, qt(t).call(t, ":"))) : 0;
    if (!(_a(e) && _a(n) && _a(r) && _a(i)))
      throw Error("Malformed X-TIMESTAMP-MAP: Local:".concat(t));
    return (e += 1e3 * n), (e += 6e4 * r), (e += 36e5 * i);
  };
function hle(t, e, n) {
  return JC(t.toString()) + JC(e.toString()) + JC(n);
}
var FXt = function (t, e, n) {
  var r = t[e],
    i = t[r.prevCC];
  if (!i || (!i.new && r.new))
    return (t.ccOffset = t.presentationOffset = r.start), void (r.new = !1);
  for (; (o = i) != null && o.new; ) {
    var o;
    (t.ccOffset += r.start - i.start), (r.new = !1), (i = t[(r = i).prevCC]);
  }
  t.presentationOffset = n;
};
function UXt(t, e, n, r, i, o, l) {
  var u,
    c,
    d = new OXt(),
    h = es((u = zp(new Uint8Array(t))))
      .call(u)
      .replace(
        GXt,
        `
`
      ).split(`
`),
    f = [],
    p = e ? t7t(e.baseTime, e.timescale) : 0,
    g = "00:00.000",
    y = 0,
    v = 0,
    b = !0;
  (d.oncue = function (w) {
    var k,
      D = n[r],
      $ = n.ccOffset,
      N = (y - p) / 9e4;
    if (
      (D != null &&
        D.new &&
        (v !== void 0 ? ($ = n.ccOffset = D.start) : FXt(n, r, N)),
      N)
    ) {
      if (!e) return void (c = new Error("Missing initPTS for VTT MPEGTS"));
      $ = N - n.presentationOffset;
    }
    var P = w.endTime - w.startTime,
      I = Wg(9e4 * (w.startTime + $ - v), 9e4 * i) / 9e4;
    (w.startTime = Math.max(I, 0)), (w.endTime = Math.max(I + P, 0));
    var O = es((k = w.text)).call(k);
    (w.text = decodeURIComponent(encodeURIComponent(O))),
      w.id || (w.id = hle(w.startTime, w.endTime, O)),
      w.endTime > 0 && f.push(w);
  }),
    (d.onparsingerror = function (w) {
      c = w;
    }),
    (d.onflush = function () {
      c ? l(c) : o(f);
    }),
    h.forEach(function (w) {
      if (b) {
        if (KV(w, "X-TIMESTAMP-MAP=")) {
          (b = !1),
            jn(w)
              .call(w, 16)
              .split(",")
              .forEach(function (k) {
                KV(k, "LOCAL:")
                  ? (g = jn(k).call(k, 6))
                  : KV(k, "MPEGTS:") && (y = _i(jn(k).call(k, 7)));
              });
          try {
            v = NXt(g) / 1e3;
          } catch (k) {
            c = k;
          }
          return;
        }
        w === "" && (b = !1);
      }
      d.parse(
        w +
          `
`
      );
    }),
    d.flush();
}
var ZV = "stpp.ttml.im1t",
  Z9e = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,
  Y9e = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,
  BXt = {
    left: "start",
    center: "center",
    right: "end",
    start: "start",
    end: "end",
  };
function S1e(t, e, n, r) {
  var i = ao(new Uint8Array(t), ["mdat"]);
  if (i.length !== 0) {
    var o = On(i).call(i, function (u) {
        return zp(u);
      }),
      l = e7t(e.baseTime, 1, e.timescale);
    try {
      o.forEach(function (u) {
        return n(HXt(u, l));
      });
    } catch (u) {
      r(u);
    }
  } else r(new Error("Could not parse IMSC1 mdat"));
}
function HXt(t, e) {
  var n,
    r,
    i = new DOMParser()
      .parseFromString(t, "text/xml")
      .getElementsByTagName("tt")[0];
  if (!i) throw new Error("Invalid ttml");
  var o = {
      frameRate: 30,
      subFrameRate: 1,
      frameRateMultiplier: 0,
      tickRate: 0,
    },
    l = ga((n = Dn(o))).call(
      n,
      function (f, p) {
        return (f[p] = i.getAttribute("ttp:".concat(p)) || o[p]), f;
      },
      {}
    ),
    u = i.getAttribute("xml:space") !== "preserve",
    c = R1e(YV(i, "styling", "style")),
    d = R1e(YV(i, "layout", "region")),
    h = YV(i, "body", "[begin]");
  return _r(
    (r = On([]).call(h, function (f) {
      var p = Q9e(f, u);
      if (!p || !f.hasAttribute("begin")) return null;
      var g = JV(f.getAttribute("begin"), l),
        y = JV(f.getAttribute("dur"), l),
        v = JV(f.getAttribute("end"), l);
      if (g === null) throw A1e(f);
      if (v === null) {
        if (y === null) throw A1e(f);
        v = g + y;
      }
      var b = new dle(g - e, v - e, p);
      b.id = hle(b.startTime, b.endTime, b.text);
      var w = XXt(d[f.getAttribute("region")], c[f.getAttribute("style")], c),
        k = w.textAlign;
      if (k) {
        var D = BXt[k];
        D && (b.lineAlign = D), (b.align = k);
      }
      return cu(b, w), b;
    }))
  ).call(r, function (f) {
    return f !== null;
  });
}
function YV(t, e, n) {
  var r = t.getElementsByTagName(e)[0];
  return r ? jn([]).call(r.querySelectorAll(n)) : [];
}
function R1e(t) {
  return ga(t).call(
    t,
    function (e, n) {
      var r = n.getAttribute("xml:id");
      return r && (e[r] = n), e;
    },
    {}
  );
}
function Q9e(t, e) {
  var n;
  return ga((n = jn([]).call(t.childNodes))).call(
    n,
    function (r, i, o) {
      var l, u;
      return i.nodeName === "br" && o
        ? r +
            `
`
        : (l = i.childNodes) != null && l.length
        ? Q9e(i, e)
        : e
        ? r +
          es((u = i.textContent))
            .call(u)
            .replace(/\s+/g, " ")
        : r + i.textContent;
    },
    ""
  );
}
function XXt(t, e, n) {
  var r = "http://www.w3.org/ns/ttml#styling",
    i = null,
    o = [
      "displayAlign",
      "textAlign",
      "color",
      "backgroundColor",
      "fontSize",
      "fontFamily",
    ],
    l = t != null && t.hasAttribute("style") ? t.getAttribute("style") : null;
  return (
    l && n.hasOwnProperty(l) && (i = n[l]),
    ga(o).call(
      o,
      function (u, c) {
        var d = QV(e, r, c) || QV(t, r, c) || QV(i, r, c);
        return d && (u[c] = d), u;
      },
      {}
    )
  );
}
function QV(t, e, n) {
  return t && t.hasAttributeNS(e, n) ? t.getAttributeNS(e, n) : null;
}
function A1e(t) {
  return new Error("Could not parse ttml timestamp ".concat(t));
}
function JV(t, e) {
  if (!t) return null;
  var n = j9e(t);
  return (
    n === null &&
      (Z9e.test(t) ? (n = VXt(t, e)) : Y9e.test(t) && (n = zXt(t, e))),
    n
  );
}
function VXt(t, e) {
  var n = Z9e.exec(t),
    r = (0 | n[4]) + (0 | n[5]) / e.subFrameRate;
  return 3600 * (0 | n[1]) + 60 * (0 | n[2]) + (0 | n[3]) + r / e.frameRate;
}
function zXt(t, e) {
  var n = Y9e.exec(t),
    r = Number(n[1]);
  switch (n[2]) {
    case "h":
      return 3600 * r;
    case "m":
      return 60 * r;
    case "ms":
      return 1e3 * r;
    case "f":
      return r / e.frameRate;
    case "t":
      return r / e.tickRate;
  }
  return r;
}
var p3 = (function () {
    function t(e, n) {
      Wn(this, t),
        (this.timelineController = void 0),
        (this.cueRanges = []),
        (this.trackName = void 0),
        (this.startTime = null),
        (this.endTime = null),
        (this.screen = null),
        (this.timelineController = e),
        (this.trackName = n);
    }
    return (
      Kn(t, [
        {
          key: "dispatchCue",
          value: function () {
            this.startTime !== null &&
              (this.timelineController.addCues(
                this.trackName,
                this.startTime,
                this.endTime,
                this.screen,
                this.cueRanges
              ),
              (this.startTime = null));
          },
        },
        {
          key: "newCue",
          value: function (e, n, r) {
            (this.startTime === null || this.startTime > e) &&
              (this.startTime = e),
              (this.endTime = n),
              (this.screen = r),
              this.timelineController.createCaptionsTrack(this.trackName);
          },
        },
        {
          key: "reset",
          value: function () {
            (this.cueRanges = []), (this.startTime = null);
          },
        },
      ]),
      t
    );
  })(),
  jXt = (function () {
    function t(e) {
      Wn(this, t),
        (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 = k1e()),
        (this.captionsProperties = void 0),
        (this.hls = e),
        (this.config = e.config),
        (this.Cues = e.config.cueHandler),
        (this.captionsProperties = {
          textTrack1: {
            label: this.config.captionsTextTrack1Label,
            languageCode: this.config.captionsTextTrack1LanguageCode,
          },
          textTrack2: {
            label: this.config.captionsTextTrack2Label,
            languageCode: this.config.captionsTextTrack2LanguageCode,
          },
          textTrack3: {
            label: this.config.captionsTextTrack3Label,
            languageCode: this.config.captionsTextTrack3LanguageCode,
          },
          textTrack4: {
            label: this.config.captionsTextTrack4Label,
            languageCode: this.config.captionsTextTrack4LanguageCode,
          },
        }),
        e.on(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
        e.on(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
        e.on(_t.MANIFEST_LOADING, this.onManifestLoading, this),
        e.on(_t.MANIFEST_LOADED, this.onManifestLoaded, this),
        e.on(_t.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this),
        e.on(_t.FRAG_LOADING, this.onFragLoading, this),
        e.on(_t.FRAG_LOADED, this.onFragLoaded, this),
        e.on(_t.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this),
        e.on(_t.FRAG_DECRYPTED, this.onFragDecrypted, this),
        e.on(_t.INIT_PTS_FOUND, this.onInitPtsFound, this),
        e.on(_t.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this),
        e.on(_t.BUFFER_FLUSHING, this.onBufferFlushing, this);
    }
    return (
      Kn(t, [
        {
          key: "destroy",
          value: function () {
            var e = this.hls;
            e.off(_t.MEDIA_ATTACHING, this.onMediaAttaching, this),
              e.off(_t.MEDIA_DETACHING, this.onMediaDetaching, this),
              e.off(_t.MANIFEST_LOADING, this.onManifestLoading, this),
              e.off(_t.MANIFEST_LOADED, this.onManifestLoaded, this),
              e.off(
                _t.SUBTITLE_TRACKS_UPDATED,
                this.onSubtitleTracksUpdated,
                this
              ),
              e.off(_t.FRAG_LOADING, this.onFragLoading, this),
              e.off(_t.FRAG_LOADED, this.onFragLoaded, this),
              e.off(_t.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this),
              e.off(_t.FRAG_DECRYPTED, this.onFragDecrypted, this),
              e.off(_t.INIT_PTS_FOUND, this.onInitPtsFound, this),
              e.off(
                _t.SUBTITLE_TRACKS_CLEARED,
                this.onSubtitleTracksCleared,
                this
              ),
              e.off(_t.BUFFER_FLUSHING, this.onBufferFlushing, this),
              (this.hls = this.config = this.media = null),
              (this.cea608Parser1 = this.cea608Parser2 = void 0);
          },
        },
        {
          key: "initCea608Parsers",
          value: function () {
            var e = new p3(this, "textTrack1"),
              n = new p3(this, "textTrack2"),
              r = new p3(this, "textTrack3"),
              i = new p3(this, "textTrack4");
            (this.cea608Parser1 = new E1e(1, e, n)),
              (this.cea608Parser2 = new E1e(3, r, i));
          },
        },
        {
          key: "addCues",
          value: function (e, n, r, i, o) {
            for (var l = !1, u = o.length; u--; ) {
              var c = o[u],
                d = WXt(c[0], c[1], n, r);
              if (
                d >= 0 &&
                ((c[0] = Math.min(c[0], n)),
                (c[1] = Math.max(c[1], r)),
                (l = !0),
                d / (r - n) > 0.5)
              )
                return;
            }
            if ((l || o.push([n, r]), this.config.renderTextTracksNatively)) {
              var h = this.captionsTracks[e];
              this.Cues.newCue(h, n, r, i);
            } else {
              var f = this.Cues.newCue(null, n, r, i);
              this.hls.trigger(_t.CUES_PARSED, {
                type: "captions",
                cues: f,
                track: e,
              });
            }
          },
        },
        {
          key: "onInitPtsFound",
          value: function (e, n) {
            var r = this,
              i = n.frag,
              o = n.id,
              l = n.initPTS,
              u = n.timescale,
              c = this.unparsedVttFrags;
            o === wo.MAIN &&
              (this.initPTS[i.cc] = { baseTime: l, timescale: u }),
              c.length &&
                ((this.unparsedVttFrags = []),
                c.forEach(function (d) {
                  r.onFragLoaded(_t.FRAG_LOADED, d);
                }));
          },
        },
        {
          key: "getExistingTrack",
          value: function (e, n) {
            var r = this.media;
            if (r)
              for (var i = 0; i < r.textTracks.length; i++) {
                var o = r.textTracks[i];
                if (
                  w1e(o, {
                    name: e,
                    lang: n,
                    characteristics:
                      "transcribes-spoken-dialog,describes-music-and-sound",
                    attrs: {},
                  })
                )
                  return o;
              }
            return null;
          },
        },
        {
          key: "createCaptionsTrack",
          value: function (e) {
            this.config.renderTextTracksNatively
              ? this.createNativeTrack(e)
              : this.createNonNativeTrack(e);
          },
        },
        {
          key: "createNativeTrack",
          value: function (e) {
            if (!this.captionsTracks[e]) {
              var n = this.captionsProperties,
                r = this.captionsTracks,
                i = this.media,
                o = n[e],
                l = o.label,
                u = o.languageCode,
                c = this.getExistingTrack(l, u);
              if (c) (r[e] = c), iC(r[e]), uXt(r[e], i);
              else {
                var d = this.createTextTrack("captions", l, u);
                d && ((d[e] = !0), (r[e] = d));
              }
            }
          },
        },
        {
          key: "createNonNativeTrack",
          value: function (e) {
            if (!this.nonNativeCaptionsTracks[e]) {
              var n = this.captionsProperties[e];
              if (n) {
                var r = {
                  _id: e,
                  label: n.label,
                  kind: "captions",
                  default: !!n.media && !!n.media.default,
                  closedCaptions: n.media,
                };
                (this.nonNativeCaptionsTracks[e] = r),
                  this.hls.trigger(_t.NON_NATIVE_TEXT_TRACKS_FOUND, {
                    tracks: [r],
                  });
              }
            }
          },
        },
        {
          key: "createTextTrack",
          value: function (e, n, r) {
            var i = this.media;
            if (i) return i.addTextTrack(e, n, r);
          },
        },
        {
          key: "onMediaAttaching",
          value: function (e, n) {
            (this.media = n.media), n.mediaSource || this._cleanTracks();
          },
        },
        {
          key: "onMediaDetaching",
          value: function (e, n) {
            var r = !!n.transferMedia;
            if (((this.media = null), !r)) {
              var i = this.captionsTracks;
              Dn(i).forEach(function (o) {
                iC(i[o]), delete i[o];
              }),
                (this.nonNativeCaptionsTracks = {});
            }
          },
        },
        {
          key: "onManifestLoading",
          value: function () {
            (this.lastCc = -1),
              (this.lastSn = -1),
              (this.lastPartIndex = -1),
              (this.prevCC = -1),
              (this.vttCCs = k1e()),
              this._cleanTracks(),
              (this.tracks = []),
              (this.captionsTracks = {}),
              (this.nonNativeCaptionsTracks = {}),
              (this.textTracks = []),
              (this.unparsedVttFrags = []),
              (this.initPTS = []),
              this.cea608Parser1 &&
                this.cea608Parser2 &&
                (this.cea608Parser1.reset(), this.cea608Parser2.reset());
          },
        },
        {
          key: "_cleanTracks",
          value: function () {
            var e = this.media;
            if (e) {
              var n = e.textTracks;
              if (n) for (var r = 0; r < n.length; r++) iC(n[r]);
            }
          },
        },
        {
          key: "onSubtitleTracksUpdated",
          value: function (e, n) {
            var r = this,
              i = n.subtitleTracks || [],
              o = i.some(function (p) {
                return p.textCodec === ZV;
              });
            if (this.config.enableWebVTT || (o && this.config.enableIMSC1)) {
              if ($9e(this.tracks, i)) return void (this.tracks = i);
              if (
                ((this.textTracks = []),
                (this.tracks = i),
                this.config.renderTextTracksNatively)
              ) {
                var l = this.media,
                  u = l ? wF(l.textTracks) : null;
                if (
                  (this.tracks.forEach(function (p, g) {
                    var y;
                    if (u) {
                      for (var v = null, b = 0; b < u.length; b++)
                        if (u[b] && w1e(u[b], p)) {
                          (v = u[b]), (u[b] = null);
                          break;
                        }
                      v && (y = v);
                    }
                    if (y) iC(y);
                    else {
                      var w = J9e(p);
                      (y = r.createTextTrack(w, p.name, p.lang)) &&
                        (y.mode = "disabled");
                    }
                    y && r.textTracks.push(y);
                  }),
                  u != null && u.length)
                ) {
                  var c,
                    d = On(
                      (c = _r(u).call(u, function (p) {
                        return p !== null;
                      }))
                    ).call(c, function (p) {
                      return p.label;
                    });
                  d.length &&
                    this.hls.logger.warn(
                      "Media element contains unused subtitle tracks: ".concat(
                        d.join(", "),
                        ". Replace media element for each source to clear TextTracks and captions menu."
                      )
                    );
                }
              } else if (this.tracks.length) {
                var h,
                  f = On((h = this.tracks)).call(h, function (p) {
                    return {
                      label: p.name,
                      kind: p.type.toLowerCase(),
                      default: p.default,
                      subtitleTrack: p,
                    };
                  });
                this.hls.trigger(_t.NON_NATIVE_TEXT_TRACKS_FOUND, {
                  tracks: f,
                });
              }
            }
          },
        },
        {
          key: "onManifestLoaded",
          value: function (e, n) {
            var r = this;
            this.config.enableCEA708Captions &&
              n.captions &&
              n.captions.forEach(function (i) {
                var o = /(?:CC|SERVICE)([1-4])/.exec(i.instreamId);
                if (o) {
                  var l = "textTrack".concat(o[1]),
                    u = r.captionsProperties[l];
                  u &&
                    ((u.label = i.name),
                    i.lang && (u.languageCode = i.lang),
                    (u.media = i));
                }
              });
          },
        },
        {
          key: "closedCaptionsForLevel",
          value: function (e) {
            var n = this.hls.levels[e.level];
            return n == null ? void 0 : n.attrs["CLOSED-CAPTIONS"];
          },
        },
        {
          key: "onFragLoading",
          value: function (e, n) {
            if (this.enabled && n.frag.type === wo.MAIN) {
              var r,
                i,
                o = this.cea608Parser1,
                l = this.cea608Parser2,
                u = this.lastSn,
                c = n.frag,
                d = c.cc,
                h = c.sn,
                f =
                  (r = (i = n.part) == null ? void 0 : i.index) != null
                    ? r
                    : -1;
              o &&
                l &&
                (h !== u + 1 ||
                  (h === u && f !== this.lastPartIndex + 1) ||
                  d !== this.lastCc) &&
                (o.reset(), l.reset()),
                (this.lastCc = d),
                (this.lastSn = h),
                (this.lastPartIndex = f);
            }
          },
        },
        {
          key: "onFragLoaded",
          value: function (e, n) {
            var r = n.frag,
              i = n.payload;
            if (r.type === wo.SUBTITLE)
              if (i.byteLength) {
                var o = r.decryptdata,
                  l = "stats" in n;
                if (o == null || !o.encrypted || l) {
                  var u = this.tracks[r.level],
                    c = this.vttCCs;
                  c[r.cc] ||
                    ((c[r.cc] = {
                      start: r.start,
                      prevCC: this.prevCC,
                      new: !0,
                    }),
                    (this.prevCC = r.cc)),
                    u && u.textCodec === ZV
                      ? this._parseIMSC1(r, i)
                      : this._parseVTTs(n);
                }
              } else
                this.hls.trigger(_t.SUBTITLE_FRAG_PROCESSED, {
                  success: !1,
                  frag: r,
                  error: new Error("Empty subtitle payload"),
                });
          },
        },
        {
          key: "_parseIMSC1",
          value: function (e, n) {
            var r = this,
              i = this.hls;
            S1e(
              n,
              this.initPTS[e.cc],
              function (o) {
                r._appendCues(o, e.level),
                  i.trigger(_t.SUBTITLE_FRAG_PROCESSED, {
                    success: !0,
                    frag: e,
                  });
              },
              function (o) {
                i.logger.log("Failed to parse IMSC1: ".concat(o)),
                  i.trigger(_t.SUBTITLE_FRAG_PROCESSED, {
                    success: !1,
                    frag: e,
                    error: o,
                  });
              }
            );
          },
        },
        {
          key: "_parseVTTs",
          value: function (e) {
            var n,
              r = this,
              i = e.frag,
              o = e.payload,
              l = this.initPTS,
              u = this.unparsedVttFrags,
              c = l.length - 1;
            if (l[i.cc] || c !== -1) {
              var d = this.hls;
              UXt(
                (n = i.initSegment) != null && n.data
                  ? dm(i.initSegment.data, new Uint8Array(o)).buffer
                  : o,
                this.initPTS[i.cc],
                this.vttCCs,
                i.cc,
                i.start,
                function (h) {
                  r._appendCues(h, i.level),
                    d.trigger(_t.SUBTITLE_FRAG_PROCESSED, {
                      success: !0,
                      frag: i,
                    });
                },
                function (h) {
                  var f = h.message === "Missing initPTS for VTT MPEGTS";
                  f ? u.push(e) : r._fallbackToIMSC1(i, o),
                    d.logger.log("Failed to parse VTT cue: ".concat(h)),
                    (f && c > i.cc) ||
                      d.trigger(_t.SUBTITLE_FRAG_PROCESSED, {
                        success: !1,
                        frag: i,
                        error: h,
                      });
                }
              );
            } else u.push(e);
          },
        },
        {
          key: "_fallbackToIMSC1",
          value: function (e, n) {
            var r = this,
              i = this.tracks[e.level];
            i.textCodec ||
              S1e(
                n,
                this.initPTS[e.cc],
                function () {
                  (i.textCodec = ZV), r._parseIMSC1(e, n);
                },
                function () {
                  i.textCodec = "wvtt";
                }
              );
          },
        },
        {
          key: "_appendCues",
          value: function (e, n) {
            var r = this.hls;
            if (this.config.renderTextTracksNatively) {
              var i = this.textTracks[n];
              if (!i || i.mode === "disabled") return;
              e.forEach(function (u) {
                return H9e(i, u);
              });
            } else {
              var o = this.tracks[n];
              if (!o) return;
              var l = o.default ? "default" : "subtitles" + n;
              r.trigger(_t.CUES_PARSED, {
                type: "subtitles",
                cues: e,
                track: l,
              });
            }
          },
        },
        {
          key: "onFragDecrypted",
          value: function (e, n) {
            n.frag.type === wo.SUBTITLE && this.onFragLoaded(_t.FRAG_LOADED, n);
          },
        },
        {
          key: "onSubtitleTracksCleared",
          value: function () {
            (this.tracks = []), (this.captionsTracks = {});
          },
        },
        {
          key: "onFragParsingUserdata",
          value: function (e, n) {
            if (this.enabled && this.config.enableCEA708Captions) {
              var r = n.frag,
                i = n.samples;
              if (
                r.type !== wo.MAIN ||
                this.closedCaptionsForLevel(r) !== "NONE"
              )
                for (var o = 0; o < i.length; o++) {
                  var l = i[o].bytes;
                  if (l) {
                    this.cea608Parser1 || this.initCea608Parsers();
                    var u = this.extractCea608Data(l);
                    this.cea608Parser1.addData(i[o].pts, u[0]),
                      this.cea608Parser2.addData(i[o].pts, u[1]);
                  }
                }
            }
          },
        },
        {
          key: "onBufferFlushing",
          value: function (e, n) {
            var r = n.startOffset,
              i = n.endOffset,
              o = n.endOffsetSubtitles,
              l = n.type,
              u = this.media;
            if (u && !(u.currentTime < i)) {
              if (!l || l === "video") {
                var c = this.captionsTracks;
                Dn(c).forEach(function (h) {
                  return m1e(c[h], r, i);
                });
              }
              if (
                this.config.renderTextTracksNatively &&
                r === 0 &&
                o !== void 0
              ) {
                var d = this.textTracks;
                Dn(d).forEach(function (h) {
                  return m1e(d[h], r, o);
                });
              }
            }
          },
        },
        {
          key: "extractCea608Data",
          value: function (e) {
            for (var n = [[], []], r = 31 & e[0], i = 2, o = 0; o < r; o++) {
              var l = e[i++],
                u = 127 & e[i++],
                c = 127 & e[i++];
              if ((u !== 0 || c !== 0) && 4 & l) {
                var d = 3 & l;
                (d !== 0 && d !== 1) || (n[d].push(u), n[d].push(c));
              }
            }
            return n;
          },
        },
      ]),
      t
    );
  })();
function J9e(t) {
  return t.characteristics &&
    /transcribes-spoken-dialog/gi.test(t.characteristics) &&
    /describes-music-and-sound/gi.test(t.characteristics)
    ? "captions"
    : "subtitles";
}
function w1e(t, e) {
  return !!t && t.kind === J9e(e) && Kee(e, t);
}
function WXt(t, e, n, r) {
  return Math.min(e, r) - Math.max(t, n);
}
function k1e() {
  return {
    ccOffset: 0,
    presentationOffset: 0,
    0: { start: 0, prevCC: -1, new: !0 },
  };
}
var I1e,
  KXt = /\s/,
  ZXt = {
    newCue: function (t, e, n, r) {
      for (
        var i, o, l, u, c, d = [], h = self.VTTCue || self.TextTrackCue, f = 0;
        f < r.rows.length;
        f++
      )
        if (((l = !0), (u = 0), (c = ""), !(i = r.rows[f]).isEmpty())) {
          for (var p, g = 0; g < i.chars.length; g++)
            KXt.test(i.chars[g].uchar) && l
              ? u++
              : ((c += i.chars[g].uchar), (l = !1));
          (i.cueStartTime = e), e === n && (n += 1e-4), u >= 16 ? u-- : u++;
          var y = K9e(es(c).call(c)),
            v = hle(e, n, y);
          (t != null && (p = t.cues) != null && p.getCueById(v)) ||
            (((o = new h(e, n, y)).id = v),
            (o.line = f + 1),
            (o.align = "left"),
            (o.position = 10 + Math.min(80, 10 * Math.floor((8 * u) / 32))),
            d.push(o));
        }
      return (
        t &&
          d.length &&
          (mm(d).call(d, function (b, w) {
            return b.line === "auto" || w.line === "auto"
              ? 0
              : b.line > 8 && w.line > 8
              ? w.line - b.line
              : b.line - w.line;
          }),
          d.forEach(function (b) {
            return H9e(t, b);
          })),
        d
      );
    },
  },
  YXt = /^age:\s*[\d.]+\s*$/im,
  QXt = (function () {
    function t(e) {
      Wn(this, t),
        (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 yBt()),
        (this.retryDelay = 0);
    }
    return (
      Kn(t, [
        {
          key: "destroy",
          value: function () {
            (this.callbacks = null),
              this.abortInternal(),
              (this.loader = null),
              (this.config = null),
              (this.context = null),
              (this.xhrSetup = null);
          },
        },
        {
          key: "abortInternal",
          value: function () {
            var e = this.loader;
            self.clearTimeout(this.requestTimeout),
              self.clearTimeout(this.retryTimeout),
              e &&
                ((e.onreadystatechange = null),
                (e.onprogress = null),
                e.readyState !== 4 && ((this.stats.aborted = !0), e.abort()));
          },
        },
        {
          key: "abort",
          value: function () {
            var e;
            this.abortInternal(),
              (e = this.callbacks) != null &&
                e.onAbort &&
                this.callbacks.onAbort(this.stats, this.context, this.loader);
          },
        },
        {
          key: "load",
          value: function (e, n, r) {
            if (this.stats.loading.start)
              throw new Error("Loader can only be used once.");
            (this.stats.loading.start = self.performance.now()),
              (this.context = e),
              (this.config = n),
              (this.callbacks = r),
              this.loadInternal();
          },
        },
        {
          key: "loadInternal",
          value: function () {
            var e = this,
              n = this.config,
              r = this.context;
            if (n && r) {
              var i = (this.loader = new self.XMLHttpRequest()),
                o = this.stats;
              (o.loading.first = 0), (o.loaded = 0), (o.aborted = !1);
              var l = this.xhrSetup;
              l
                ? Ar.resolve()
                    .then(function () {
                      if (e.loader === i && !e.stats.aborted)
                        return l(i, r.url);
                    })
                    .catch(function (u) {
                      if (e.loader === i && !e.stats.aborted)
                        return i.open("GET", r.url, !0), l(i, r.url);
                    })
                    .then(function () {
                      e.loader !== i ||
                        e.stats.aborted ||
                        e.openAndSendXhr(i, r, n);
                    })
                    .catch(function (u) {
                      e.callbacks.onError(
                        { code: i.status, text: u.message },
                        r,
                        i,
                        o
                      );
                    })
                : this.openAndSendXhr(i, r, n);
            }
          },
        },
        {
          key: "openAndSendXhr",
          value: function (e, n, r) {
            e.readyState || e.open("GET", n.url, !0);
            var i = n.headers,
              o = r.loadPolicy,
              l = o.maxTimeToFirstByteMs,
              u = o.maxLoadTimeMs;
            if (i) for (var c in i) e.setRequestHeader(c, i[c]);
            n.rangeEnd &&
              e.setRequestHeader(
                "Range",
                "bytes=" + n.rangeStart + "-" + (n.rangeEnd - 1)
              ),
              (e.onreadystatechange = this.readystatechange.bind(this)),
              (e.onprogress = this.loadprogress.bind(this)),
              (e.responseType = n.responseType),
              self.clearTimeout(this.requestTimeout),
              (r.timeout = l && _a(l) ? l : u),
              (this.requestTimeout = self.setTimeout(
                this.loadtimeout.bind(this),
                r.timeout
              )),
              e.send();
          },
        },
        {
          key: "readystatechange",
          value: function () {
            var e = this.context,
              n = this.loader,
              r = this.stats;
            if (e && n) {
              var i = n.readyState,
                o = this.config;
              if (
                !r.aborted &&
                i >= 2 &&
                (r.loading.first === 0 &&
                  ((r.loading.first = Math.max(
                    self.performance.now(),
                    r.loading.start
                  )),
                  o.timeout !== o.loadPolicy.maxLoadTimeMs &&
                    (self.clearTimeout(this.requestTimeout),
                    (o.timeout = o.loadPolicy.maxLoadTimeMs),
                    (this.requestTimeout = self.setTimeout(
                      this.loadtimeout.bind(this),
                      o.loadPolicy.maxLoadTimeMs -
                        (r.loading.first - r.loading.start)
                    )))),
                i === 4)
              ) {
                self.clearTimeout(this.requestTimeout),
                  (n.onreadystatechange = null),
                  (n.onprogress = null);
                var l = n.status,
                  u = n.responseType === "text" ? n.responseText : null;
                if (l >= 200 && l < 300) {
                  var c = u ?? n.response;
                  if (c != null) {
                    r.loading.end = Math.max(
                      self.performance.now(),
                      r.loading.first
                    );
                    var d =
                      n.responseType === "arraybuffer"
                        ? c.byteLength
                        : c.length;
                    if (
                      ((r.loaded = r.total = d),
                      (r.bwEstimate =
                        (8e3 * r.total) / (r.loading.end - r.loading.first)),
                      !this.callbacks)
                    )
                      return;
                    var h = this.callbacks.onProgress;
                    if ((h && h(r, e, c, n), !this.callbacks)) return;
                    var f = { url: n.responseURL, data: c, code: l };
                    return void this.callbacks.onSuccess(f, r, e, n);
                  }
                }
                var p,
                  g = o.loadPolicy.errorRetry;
                bU(g, r.retry, !1, { url: e.url, data: void 0, code: l })
                  ? this.retry(g)
                  : (Is.error(
                      Ce((p = "".concat(l, " while loading "))).call(p, e.url)
                    ),
                    this.callbacks.onError(
                      { code: l, text: n.statusText },
                      e,
                      n,
                      r
                    ));
              }
            }
          },
        },
        {
          key: "loadtimeout",
          value: function () {
            if (this.config) {
              var e = this.config.loadPolicy.timeoutRetry;
              if (bU(e, this.stats.retry, !0)) this.retry(e);
              else {
                var n;
                Is.warn(
                  "timeout while loading ".concat(
                    (n = this.context) == null ? void 0 : n.url
                  )
                );
                var r = this.callbacks;
                r &&
                  (this.abortInternal(),
                  r.onTimeout(this.stats, this.context, this.loader));
              }
            }
          },
        },
        {
          key: "retry",
          value: function (e) {
            var n,
              r,
              i,
              o,
              l = this.context,
              u = this.stats;
            (this.retryDelay = Jse(e, u.retry)),
              u.retry++,
              Is.warn(
                Ce(
                  (n = Ce(
                    (r = Ce(
                      (i = Ce(
                        (o = "".concat(
                          status ? "HTTP Status " + status : "Timeout",
                          " while loading "
                        ))
                      ).call(o, l == null ? void 0 : l.url, ", retrying "))
                    ).call(i, u.retry, "/"))
                  ).call(r, e.maxNumRetry, " in "))
                ).call(n, this.retryDelay, "ms")
              ),
              this.abortInternal(),
              (this.loader = null),
              self.clearTimeout(this.retryTimeout),
              (this.retryTimeout = self.setTimeout(
                this.loadInternal.bind(this),
                this.retryDelay
              ));
          },
        },
        {
          key: "loadprogress",
          value: function (e) {
            var n = this.stats;
            (n.loaded = e.loaded), e.lengthComputable && (n.total = e.total);
          },
        },
        {
          key: "getCacheAge",
          value: function () {
            var e = null;
            if (this.loader && YXt.test(this.loader.getAllResponseHeaders())) {
              var n = this.loader.getResponseHeader("age");
              e = n ? wl(n) : null;
            }
            return e;
          },
        },
        {
          key: "getResponseHeader",
          value: function (e) {
            return this.loader &&
              new RegExp("^".concat(e, ":\\s*[\\d.]+\\s*$"), "im").test(
                this.loader.getAllResponseHeaders()
              )
              ? this.loader.getResponseHeader(e)
              : null;
          },
        },
      ]),
      t
    );
  })(),
  JXt = {
    maxTimeToFirstByteMs: 8e3,
    maxLoadTimeMs: 2e4,
    timeoutRetry: null,
    errorRetry: null,
  };
function qXt() {
  return {
    cueHandler: ZXt,
    enableWebVTT: !0,
    enableIMSC1: !0,
    enableCEA708Captions: !0,
    captionsTextTrack1Label: "English",
    captionsTextTrack1LanguageCode: "en",
    captionsTextTrack2Label: "Spanish",
    captionsTextTrack2LanguageCode: "es",
    captionsTextTrack3Label: "Unknown CC",
    captionsTextTrack3LanguageCode: "",
    captionsTextTrack4Label: "Unknown CC",
    captionsTextTrack4LanguageCode: "",
    renderTextTracksNatively: !0,
  };
}
function eVt() {
  if (typeof self < "u") return self.VTTCue || self.TextTrackCue;
}
fl(
  fl(
    {
      autoStartLoad: !0,
      startPosition: -1,
      defaultAudioCodec: void 0,
      debug: !1,
      capLevelOnFPSDrop: !1,
      capLevelToPlayerSize: !1,
      ignoreDevicePixelRatio: !1,
      maxDevicePixelRatio: Number.POSITIVE_INFINITY,
      preferManagedMediaSource: !0,
      initialLiveManifestSize: 1,
      maxBufferLength: 30,
      backBufferLength: 1 / 0,
      frontBufferFlushThreshold: 1 / 0,
      maxBufferSize: 6e7,
      maxBufferHole: 0.1,
      highBufferWatchdogPeriod: 2,
      nudgeOffset: 0.1,
      nudgeMaxRetry: 3,
      maxFragLookUpTolerance: 0.25,
      liveSyncDurationCount: 3,
      liveSyncOnStallIncrease: 1,
      liveMaxLatencyDurationCount: 1 / 0,
      liveSyncDuration: void 0,
      liveMaxLatencyDuration: void 0,
      maxLiveSyncPlaybackRate: 1,
      liveDurationInfinity: !1,
      liveBackBufferLength: null,
      maxMaxBufferLength: 600,
      enableWorker: !0,
      workerPath: null,
      enableSoftwareAES: !0,
      startLevel: void 0,
      startFragPrefetch: !1,
      fpsDroppedMonitoringPeriod: 5e3,
      fpsDroppedMonitoringThreshold: 0.2,
      appendErrorMaxRetry: 3,
      loader: QXt,
      fLoader: void 0,
      pLoader: void 0,
      xhrSetup: void 0,
      licenseXhrSetup: void 0,
      licenseResponseCallback: void 0,
      abrController: iBt,
      bufferController: y7t,
      capLevelController: b7t,
      errorController: cBt,
      fpsController: lXt,
      stretchShortVideoTrack: !1,
      maxAudioFramesDrift: 1,
      forceKeyFrameOnDiscontinuity: !0,
      abrEwmaFastLive: 3,
      abrEwmaSlowLive: 9,
      abrEwmaFastVoD: 3,
      abrEwmaSlowVoD: 9,
      abrEwmaDefaultEstimate: 5e5,
      abrEwmaDefaultEstimateMax: 5e6,
      abrBandWidthFactor: 0.95,
      abrBandWidthUpFactor: 0.7,
      abrMaxWithRealBitrate: !1,
      maxStarvationDelay: 4,
      maxLoadingDelay: 4,
      minAutoBitrate: 0,
      emeEnabled: !1,
      widevineLicenseUrl: void 0,
      drmSystems: {},
      drmSystemOptions: {},
      requestMediaKeySystemAccessFunc: o9e,
      testBandwidth: !0,
      progressive: !1,
      lowLatencyMode: !0,
      cmcd: void 0,
      enableDateRangeMetadataCues: !0,
      enableEmsgMetadataCues: !0,
      enableEmsgKLVMetadata: !1,
      enableID3MetadataCues: !0,
      enableInterstitialPlayback: !0,
      interstitialAppendInPlace: !0,
      interstitialLiveLookAhead: 10,
      useMediaCapabilities: !0,
      certLoadPolicy: { default: JXt },
      keyLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 8e3,
          maxLoadTimeMs: 2e4,
          timeoutRetry: {
            maxNumRetry: 1,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 2e4,
            backoff: "linear",
          },
          errorRetry: {
            maxNumRetry: 8,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 2e4,
            backoff: "linear",
          },
        },
      },
      manifestLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1 / 0,
          maxLoadTimeMs: 2e4,
          timeoutRetry: { maxNumRetry: 2, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 1,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      playlistLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 2e4,
          timeoutRetry: { maxNumRetry: 2, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 2,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      fragLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 12e4,
          timeoutRetry: { maxNumRetry: 4, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 6,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      steeringManifestLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 2e4,
          timeoutRetry: { maxNumRetry: 2, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 1,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      interstitialAssetListLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 3e4,
          timeoutRetry: { maxNumRetry: 0, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 0,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      manifestLoadingTimeOut: 1e4,
      manifestLoadingMaxRetry: 1,
      manifestLoadingRetryDelay: 1e3,
      manifestLoadingMaxRetryTimeout: 64e3,
      levelLoadingTimeOut: 1e4,
      levelLoadingMaxRetry: 4,
      levelLoadingRetryDelay: 1e3,
      levelLoadingMaxRetryTimeout: 64e3,
      fragLoadingTimeOut: 2e4,
      fragLoadingMaxRetry: 6,
      fragLoadingRetryDelay: 1e3,
      fragLoadingMaxRetryTimeout: 64e3,
    },
    qXt()
  ),
  {},
  {
    subtitleStreamController: _Xt,
    subtitleTrackController: hXt,
    timelineController: jXt,
    audioStreamController: f7t,
    audioTrackController: p7t,
    emeController: B9e,
    cmcdController: aXt,
    contentSteeringController: sXt,
    interstitialsController: bXt,
  }
),
  (function () {
    var t = eVt();
    try {
      t && new t(0, Number.POSITIVE_INFINITY, "");
    } catch {
      return Number.MAX_VALUE;
    }
  })();
var tVt = sFt(
    On((I1e = N1(_t))).call(I1e, function (t) {
      var e = hs(t, 2),
        n = e[0],
        r = e[1];
      return ["HLS_".concat(n), r];
    })
  ),
  gS = $n(
    $n($n({}, cc), tVt),
    {},
    { TIME_SHIFT_CHANGE: "timeShiftChange", REFRESH_CLICK: "refreshClick" }
  );
function nVt() {
  return new DOMParser().parseFromString(
    '<svg width="20" height="20" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 2.488a7.48 7.48 0 00-4.154 1.253.908.908 0 101.005 1.512 5.695 5.695 0 018.844 4.746h-.908a.33.33 0 00-.264.528l1.816 2.422a.33.33 0 00.529 0l1.815-2.422A.33.33 0 0018.42 10h-.908A7.511 7.511 0 0010 2.49zM2.489 10a7.511 7.511 0 0011.665 6.26.908.908 0 00-1.005-1.513A5.695 5.695 0 014.305 10h.908a.33.33 0 00.264-.528L3.66 7.05a.33.33 0 00-.528 0L1.317 9.47a.33.33 0 00.264.53h.908z" fill="#fff"/></svg>',
    "image/svg+xml"
  ).firstChild;
}
var rVt = ml.POSITIONS,
  iVt = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n() {
      return Wn(this, n), e.apply(this, arguments);
    }
    return (
      Kn(
        n,
        [
          {
            key: "afterCreate",
            value: function () {
              this.config.disable ||
                (this.appendChild(".xgplayer-icon", this.icons.refresh),
                this._initEvents());
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return { refresh: { icon: nVt, class: "xgplayer-refresh-svg" } };
            },
          },
          {
            key: "destroy",
            value: function () {
              this.unbind(["touchend", "click"], this._handleRefresh);
            },
          },
          {
            key: "render",
            value: function () {
              var r = this.player.config.i18nManager;
              return `
    <xg-icon class="veplayer-refresh">
      <div class="xgplayer-icon">
      </div>
      <div class="xg-tips" lang-key="refresh">`.concat(
                r.getText("REFRESH"),
                `</div>
    </xg-icon>
    `
              );
            },
          },
          {
            key: "_handleRefresh",
            value: function (r) {
              var i = this.player;
              if (i) {
                var o, l;
                r.preventDefault(),
                  r.stopPropagation(),
                  i.addClass("xgplayer-is-enter"),
                  i.pause(),
                  i &&
                    (i.emit(gS.REFRESH_CLICK),
                    (o = this.player) === null ||
                      o === void 0 ||
                      (o = o.config) === null ||
                      o === void 0 ||
                      (o = o.veplayer) === null ||
                      o === void 0 ||
                      o.retry(),
                    (l = this.player) === null ||
                      l === void 0 ||
                      (l = l.plugins) === null ||
                      l === void 0 ||
                      (l = l.error) === null ||
                      l === void 0 ||
                      l.hideError()),
                  i.once(lm, function () {
                    i.removeClass("xgplayer-is-enter");
                  });
              }
            },
          },
          {
            key: "_initEvents",
            value: function () {
              this._handleRefresh = WNt(this._handleRefresh.bind(this), 200);
              var r = Na.device === "mobile" ? "touchend" : "click";
              this.bind(r, this._handleRefresh), this.show();
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "refresh";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { position: rVt.CONTROLS_LEFT, index: 1, disable: !1 };
            },
          },
        ]
      ),
      n
    );
  })(),
  aVt = pR,
  oVt = aVt.f("asyncIterator"),
  sVt = oVt,
  lVt = sVt,
  uVt = lVt,
  cVt = uVt,
  dVt = cVt,
  hVt = dVt,
  fVt = hVt,
  pVt = fVt,
  gVt = xr(pVt),
  mVt = za,
  yVt = mVt.URLSearchParams,
  vVt = yVt,
  bVt = vVt,
  _Vt = bVt,
  TVt = _Vt,
  EVt = TVt,
  SVt = EVt,
  RVt = SVt,
  AVt = RVt,
  aC = xr(AVt),
  wVt = ur,
  D1e = vee;
wVt(
  { target: "Number", stat: !0, forced: Number.parseInt != D1e },
  { parseInt: D1e }
);
var kVt = za,
  IVt = kVt.Number.parseInt,
  DVt = IVt,
  PVt = DVt,
  MVt = PVt,
  CVt = MVt,
  $Vt = CVt,
  xVt = $Vt,
  LVt = xVt,
  OVt = LVt,
  kF = xr(OVt),
  GVt = ur,
  P1e = _ee;
GVt(
  { target: "Number", stat: !0, forced: Number.parseFloat != P1e },
  { parseFloat: P1e }
);
var NVt = za,
  FVt = NVt.Number.parseFloat,
  UVt = FVt,
  BVt = UVt,
  HVt = BVt,
  XVt = HVt,
  VVt = XVt,
  zVt = VVt,
  jVt = zVt,
  WVt = jVt,
  M1e = xr(WVt);
function C1e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      ea(t, r.key, r);
  }
}
function q9e(t, e, n) {
  return e && C1e(t.prototype, e), n && C1e(t, n), t;
}
function KVt(t, e, n) {
  return (
    e in t
      ? ea(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 })
      : (t[e] = n),
    t
  );
}
function $1e(t, e) {
  var n = Dn(t);
  if (Mc) {
    var r = Mc(t);
    e &&
      (r = _r(r).call(r, function (i) {
        return ih(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function Ed(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? $1e(Object(n), !0).forEach(function (r) {
          KVt(t, r, n[r]);
        })
      : tE
      ? SD(t, tE(n))
      : $1e(Object(n)).forEach(function (r) {
          ea(t, r, ih(n, r));
        });
  }
  return t;
}
function ZVt(t, e) {
  try {
    var n = t();
  } catch (r) {
    return e(r);
  }
  return n && n.then ? n.then(void 0, e) : n;
}
lu === void 0 || K9 || (lu.iterator = lu("Symbol.iterator")),
  lu === void 0 || gVt || (lu.asyncIterator = lu("Symbol.asyncIterator"));
var x1e = "xgplayer_device_id",
  L1e = "xgplayer_user_id",
  eBe = function (t) {
    if (!document.cookie) return null;
    for (var e = document.cookie.split(";"), n = 0, r = e.length; n < r; n++) {
      var i,
        o = e[n];
      if (qt((i = e[n])).call(i, t) >= 0) return o.split("=")[1] || null;
    }
  },
  fle = function (t) {
    return String(Math.floor(Math.random() * Math.pow(10, t)));
  },
  YVt = function () {
    var t = eBe(x1e);
    if (t) return t;
    var e = fle(11);
    return (document.cookie = x1e + "=" + e + ";max-age=31536000;path=/"), e;
  },
  QVt = function () {
    var t = eBe(L1e);
    if (t) return t;
    var e = fle(12);
    return (document.cookie = L1e + "=" + e + ";max-age=31536000;path=/"), e;
  },
  JVt = function () {
    return fle(12);
  };
function qVt() {
  var t = navigator.userAgent.toLowerCase(),
    e = {},
    n = {
      IE: window.ActiveXObject || "ActiveXObject" in window,
      Chrome: qt(t).call(t, "chrome") > -1 && qt(t).call(t, "safari") > -1,
      Firefox: qt(t).call(t, "firefox") > -1,
      Opera: qt(t).call(t, "opera") > -1,
      Safari: qt(t).call(t, "safari") > -1 && qt(t).call(t, "chrome") == -1,
      Edge: qt(t).call(t, "edge") > -1,
      QQBrowser: /qqbrowser/.test(t),
      WeixinBrowser: /MicroMessenger/i.test(t),
    };
  for (var r in n)
    if (n[r]) {
      var i = "";
      if (r === "IE") i = t.match(/(msie\s|trident.*rv:)([\w.]+)/)[2];
      else if (r === "Chrome") {
        for (var o in navigator.mimeTypes)
          navigator.mimeTypes[o].type === "application/360softmgrplugin" &&
            (r = "360");
        var l = t.match(/chrome\/([\d.]+)/);
        i = l ? l[1] : "-1";
      } else if (r === "Firefox") {
        var u = t.match(/firefox\/([\d.]+)/);
        i = u ? u[1] : "-1";
      } else if (r === "Opera") {
        var c = t.match(/opera\/([\d.]+)/);
        i = c ? c[1] : "-1";
      } else if (r === "Safari") {
        var d = t.match(/version\/([\d.]+)/);
        i = d ? d[1] : "-1";
      } else if (r === "Edge") {
        var h = t.match(/edge\/([\d.]+)/);
        i = h ? h[1] : "-1";
      } else if (r === "QQBrowser") {
        var f = t.match(/qqbrowser\/([\d.]+)/);
        i = f ? f[1] : "-1";
      }
      (e.type = r), (e.versions = _i(i));
    }
  return e;
}
var Uy = {
  get device() {
    return Uy.os.isPc ? "pc" : "mobile";
  },
  get browser() {
    var t = qVt();
    return t.type + "_" + t.versions;
  },
  get os() {
    var t = navigator.userAgent;
    navigator.platform.toLowerCase();
    var e = /(?:Windows Phone)/.test(t),
      n = /(?:SymbianOS)/.test(t) || e,
      r = /(?:Android)/.test(t),
      i = /(?:Firefox)/.test(t),
      o =
        /(?:iPad|PlayBook)/.test(t) ||
        (r && !/(?:Mobile)/.test(t)) ||
        (i && /(?:Tablet)/.test(t)),
      l = /(?:iPhone)/.test(t) && !o;
    return {
      isTablet: o,
      isPhone: l,
      isAndroid: r,
      isPc: !(l || r || n || o),
      isSymbian: n,
      isWindowsPhone: e,
      isFireFox: i,
    };
  },
  get operation_os() {
    for (
      var t = navigator.userAgent,
        e = [
          {
            s: "windows",
            r: /(Windows 10.0|Windows NT 10.0|Windows NT 10.1|Windows 8.1|Windows NT 6.3|Windows 8|Windows NT 6.2|Windows 7|Windows NT 6.1)/,
          },
          { s: "android", r: /Android/ },
          { s: "linux", r: /(Linux|X11)/ },
          { s: "ios", r: /(iPhone|iPad|iPod)/ },
          { s: "mac", r: /Mac OS X/ },
          { s: "mac", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ },
        ],
        n = 0;
      n < e.length;
      n++
    ) {
      var r = e[n];
      if (r.r.test(t)) return r.s;
    }
    return "unknown";
  },
};
function Cs() {
  return Date.now();
}
function tBe(t) {
  var e = "unknown";
  return typeof t != "string"
    ? e
    : qt(t).call(t, ".flv") > -1
    ? "flv"
    : qt(t).call(t, ".m3u8") > -1
    ? "m3u8"
    : qt(t).call(t, ".mp4") > -1
    ? "mp4"
    : qt(t).call(t, ".sdp") > -1
    ? "rts"
    : e;
}
function nBe(t) {
  return typeof MediaSource < "u"
    ? +MediaSource.isTypeSupported("video/mp4; codecs=" + t)
    : 0;
}
function ezt(t, e, n) {
  var r = new aC(t.split("?")[1]);
  return r.get(e) || r.get(n);
}
function tzt() {
  var t = { cpu_core_number: -1, memory_usage: -1, network_downlink: -1 };
  try {
    (t.cpu_core_number = navigator.hardwareConcurrency || -1),
      (t.memory_usage = navigator.deviceMemory || -1),
      (t.network_downlink =
        navigator.connection && navigator.connection.downlink),
      t.network_downlink == null && (t.network_downlink = -1);
  } catch {}
  return t;
}
function ete(t) {
  if (t.plugins) {
    if (t.plugins.flv) return t.plugins.flv;
    if (t.plugins.hls) return t.plugins.hls;
    if (t.plugins.rts) return t.plugins.rts;
    if (t.plugins.flvlive) return t.plugins.flvlive;
    if (t.plugins.hlslive) return t.plugins.hlslive;
    if (t.plugins.hlsvod) return t.plugins.hlsvod;
    if (t.plugins.hlslivemobile) return t.plugins.hlslivemobile;
    if (t.plugins.flvlivemobile) return t.plugins.flvlivemobile;
  }
  return t.newHls || t.newFlv || t.__core__ || t.flv;
}
function nzt(t) {
  return {
    device_id: t.device_id || YVt(),
    user_id: t.user_id || QVt(),
    error_report_stop:
      typeof t.error_report_stop != "boolean" || t.error_report_stop,
    project_key: t.project_key || "live",
    product_line: t.product_line || "live",
    onReport: t.onReport || function () {},
  };
}
function rzt() {
  return {
    start_play: { start_play_time: 0, event_key: "start_play" },
    first_frame: {
      start: 0,
      first_frame_view: 0,
      event_key: "first_frame",
      first_sei_delay: 0,
      ntp_sync: 0,
      ntp_delta: 0,
      ttfb: -1,
      ttdb: -1,
      ttfb_end: 0,
    },
    first_frame_failed: {
      code: void 0,
      msg: "",
      event_key: "first_frame_failed",
    },
    stall_start: {
      ready_state: -1,
      stall_start_time: 0,
      event_key: "stall_start",
    },
    stalling: { event_key: "stalling" },
    stall: {
      reason: 0,
      stall_start: 0,
      stall_end: 0,
      ready_state: 0,
      event_key: "stall",
    },
    play_stop: {
      code: 0,
      stop_time: 0,
      drop_percent: 0,
      is_stream_received: 0,
      stall_count: 0,
      stall_time: 0,
      retry_count: 0,
      duration: 0,
      stall_count_per_100sec: 0,
      stall_time_per_100sec: 0,
      event_key: "play_stop",
      dns_parse_time: -1,
      redirect: -1,
      ttfb: -1,
      buffered: [],
      is_firstframe_received: 0,
      meta: null,
    },
    playing: {
      index: 0,
      stall_count: 0,
      stall_time: 0,
      play_time: 1e4,
      retry_count: 0,
      is_last: 0,
      video_buffer_time: 0,
      audio_buffer_time: 0,
      speed_switch_count: 0,
      speed_switch_info: "none",
      download_speed: 0,
      decode_fps: 0,
      render_fps: 0,
      drop_count: -1,
      drop_percent: -1,
      sei_source: "",
      sei_delay: 0,
      ntp_sync: 0,
      ntp_delta: 0,
      event_key: "playing",
      stop_time: 0,
      duration: 0,
      stall_count_per_100sec: 0,
      stall_time_per_100sec: 0,
    },
    play_error: { code: void 0, info: "", event_key: "play_error" },
    play_low_decode: {
      fps: -1,
      decode_fps: -1,
      bitrate: -1,
      url: -1,
      msg: "",
      event_key: "play_low_decode",
    },
    play_av_unsync: {
      aDts: -1,
      vDts: -1,
      frameLength: -1,
      currentTime: -1,
      duration: 0,
      event_key: "play_av_unsync",
    },
    play_loadstream: { loadstream_url: "", event_key: "play_loadstream" },
    play_stream_loaded: { event_key: "play_stream_loaded" },
    play_metadata_loaded: {
      metadata_type: "",
      event_key: "play_metadata_loaded",
    },
    stream_exception: { event_key: "stream_exception" },
    pause: { event_key: "pause" },
    play_url_change: { event_key: "play_url_change" },
    source_opened: { event_key: "source_opened" },
    source_updateend: { event_key: "source_updateend" },
    play_result: {
      event_key: "play_result",
      result: 0,
      threshold: 15e3,
      is_threshold: 0,
    },
    degrade: { event_key: "degrade", payload: {} },
    rtcstatechange: { event_key: "rtcstatechange" },
  };
}
function izt(t) {
  var e,
    n = t.player,
    r = n.config.mediaType;
  return Ed(
    {
      project_key: t.project_key,
      live_sdk_version: ete(n) || n.hlsOps ? "2" : "-1",
      player_sdk_version: n.version,
      logger_version: "1.1.0-alpha.21",
      product_line: t.product_line,
      user_id: t.user_id,
      device_id: t.device_id,
      logger_id: JVt(),
      app_name: t.app_name,
      cdn_ip: t.cdn_ip,
      is_wasm: +(!!r && r !== "video"),
      review_is_live: n.config.isLive ? 2 : 1,
      isSupportedH265: nBe("hev1.1.6.L93.B0,mp4a.40.2"),
      aid: t.aid,
      live_id: t.live_id || t.aid + "-" + t.user_id + "-" + Date.now(),
      is_preview: t.is_preview ? 1 : 0,
      codec_type: t.codec_type || "h264",
      width: Math.floor(n.config.width),
      height: Math.floor(n.config.height),
      browser: Uy.browser,
      ua: navigator.userAgent,
      href: window.location.href,
      timestamp: 0,
      fps: -1,
      logger_init_time: Date.now(),
      play_current_time: 0,
      cdn_play_url:
        n.config.url && pv((e = n.config.url)).call(e, "//")
          ? window.location.protocol + n.config.url
          : n.config.url,
      play_format: tBe(n.config.url),
      codec_support: -1,
    },
    t.ext
  );
}
function azt(t) {
  var e, n, r, i, o, l;
  for (e = "", r = t.length, n = 0; n < r; )
    switch ((i = t[n++]) >> 4) {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
      case 6:
      case 7:
        e += String.fromCharCode(i);
        break;
      case 12:
      case 13:
        (o = t[n++]), (e += String.fromCharCode(((31 & i) << 6) | (63 & o)));
        break;
      case 14:
        (o = t[n++]),
          (l = t[n++]),
          (e += String.fromCharCode(
            ((15 & i) << 12) | ((63 & o) << 6) | ((63 & l) << 0)
          ));
    }
  return e;
}
var ozt = function (t) {
    var e,
      n = _r((e = performance.getEntriesByType("resource"))).call(
        e,
        function (o) {
          return o.name === t;
        }
      );
    if (n.length) {
      var r = n[0],
        i = n[n.length - 1];
      return {
        dns_parse_time: kF(r.domainLookupEnd - r.domainLookupStart),
        redirect: kF(r.redirectEnd - r.redirectStart),
        ttfb: kF(i.responseStart - i.requestStart),
      };
    }
    return { dns_parse_time: -1, redirect: -1, ttfb: -1 };
  },
  O1e = {
    1: "MEDIA_ERR_ABORTED",
    2: "MEDIA_ERR_NETWORK",
    3: "MEDIA_ERR_DECODE",
    4: "MEDIA_ERR_SRC_NOT_SUPPORTED",
  },
  szt = (function () {
    function t(n) {
      var r = n.Tea;
      if (!r) throw new Error("lack Tea option");
      r.event ? (this.Tea = r.event.bind(r)) : (this.Tea = r),
        (this.logOptions = n),
        (this._player = n.player);
    }
    q9e(t, [
      {
        key: "videoSize",
        get: function () {
          return this._player && this._player.video
            ? {
                width: this._player.video.videoWidth,
                height: this._player.video.videoHeight,
              }
            : { width: 0, height: 0 };
        },
      },
    ]);
    var e = t.prototype;
    return (
      (e.push = function (n) {
        var r = this._player.config.url;
        this._player.video && (n.play_current_time = this._player.currentTime),
          this.core && this.core.loader && this.core.loader.finnalUrl
            ? (n.cdn_play_url = this.core.loader.finnalUrl)
            : (n.cdn_play_url =
                r && pv(r).call(r, "//") ? window.location.protocol + r : r),
          (n.live_stream_session_id = ezt(
            n.cdn_play_url,
            "_session_id",
            "session_id"
          )),
          (n.play_format = tBe(n.cdn_play_url)),
          (n.timestamp = Cs());
        var i = tzt(),
          o = i.cpu_core_number,
          l = i.memory_usage,
          u = i.network_downlink;
        (n.cpu_core_number = o),
          (n.memory_usage = l),
          (n.network_downlink = u),
          (n.muted = +this._player.muted),
          Ci(n, Ed({}, this.videoSize)),
          this.send(n);
      }),
      (e.send = function (n) {
        n.event_key &&
          (this.logOptions.onReport && this.logOptions.onReport(n.event_key, n),
          this.Tea(n.event_key, Ed({}, n)));
      }),
      t
    );
  })(),
  lzt = function () {
    return navigator.onLine !== void 0;
  },
  uzt = function () {
    var t = navigator.connection;
    return t && (t.effectiveType || t.type);
  },
  czt = function () {
    return lzt() ? (navigator.onLine ? uzt() || Uy.device : "none") : "unknown";
  },
  G1e = [
    "play",
    "playing",
    "pause",
    "ended",
    "seeking",
    "seeked",
    "timeupdate",
    "waiting",
    "canplay",
    "canplaythrough",
    "durationchange",
    "ratechange",
    "volumechange",
    "loadeddata",
  ],
  dzt = (function () {
    function t(n) {
      (this.options = n),
        (this.logger = new N1e(n)),
        (this.restart = this.restart.bind(this)),
        this.bindUrlChange();
    }
    var e = t.prototype;
    return (
      (e.restart = function (n) {
        this.destroy(typeof n != "string" && !!n),
          (this.logger = new N1e(this.options)),
          this.bindUrlChange(),
          this.logger.reportStartPlay(),
          this.logger.handlePlayerComlete();
      }),
      (e.bindUrlChange = function () {
        this.options &&
          this.options.player &&
          !this.options.manual_restart &&
          this.options.player.on("urlchange", this.restart);
      }),
      (e.setNTP = function (n) {
        this.logger.setNTP(n);
      }),
      (e.updateExt = function (n) {
        (this.options.ext = Ci(this.options.ext || {}, n)),
          this.logger && this.logger.updateExt(n);
      }),
      (e.sendLog = function (n) {
        this.logger.sendLog(n);
      }),
      (e.destroy = function (n) {
        this.logger.destroy(n),
          (this.logger = null),
          this.options &&
            this.options.player &&
            !this.options.manual_restart &&
            this.options.player.off("urlchange", this.restart);
      }),
      t
    );
  })(),
  N1e = (function () {
    function t(n) {
      if (!n.player) throw new Error("option player is necessary");
      (this.options = Ci({}, n, nzt(n))),
        (this._player = this.options.player),
        (this._url = this._player.config.url),
        (this.project_key = n.project_key || "live"),
        (this.product_line = n.product_line || "live"),
        (this.ntpDelta = this.options.ntp ? Date.now() - this.options.ntp : 0),
        (this.inWaitingStart = 0),
        (this.errorNumber = 0),
        (this.tempDroppedFrameCount = 0),
        (this.tempTotalFrameCount = 0),
        (this._logmanager = new szt(this.options)),
        this.init(),
        (this.started = !1),
        (this.destroyed = !1),
        (this.completed = !1),
        (this.firstFrameViewed = !1),
        (this.cacheRtcStats = {}),
        (this.cachePlaying = {});
    }
    q9e(t, [
      {
        key: "videoSize",
        get: function () {
          return this.player
            ? {
                width: this.player.video.videoWidth,
                height: this.player.video.videoHeight,
              }
            : { width: 0, height: 0 };
        },
      },
      {
        key: "player",
        get: function () {
          return this._player;
        },
      },
      {
        key: "logmanager",
        get: function () {
          return this._logmanager;
        },
      },
      {
        key: "ntpTime",
        get: function () {
          return Date.now() - this.ntpDelta;
        },
      },
    ]);
    var e = t.prototype;
    return (
      (e.setNTP = function (n) {
        this.options &&
          ((this.options.ntp = n),
          (this.ntpDelta = Date.now() - this.options.ntp));
      }),
      (e.init = function () {
        this.bindCtx(), this.initLog(), this.initEvt();
      }),
      (e.bindCtx = function () {
        (this.handlePlayerComlete = this.handlePlayerComlete.bind(this)),
          (this.handlePlayerPlaying = this.handlePlayerPlaying.bind(this)),
          (this.destroyFunc = this.destroyFunc.bind(this)),
          (this.handleUserLeave = this.handleUserLeave.bind(this)),
          (this.handlePlayerError = this.handlePlayerError.bind(this)),
          (this.handlePlayerReady = this.handlePlayerReady.bind(this)),
          (this.handlePlayerWaiting = this.handlePlayerWaiting.bind(this)),
          (this.handleAVUnsync = this.handleAVUnsync.bind(this)),
          (this.handlePlayerPause = this.handlePlayerPause.bind(this)),
          (this.handleTTFB = this.handleTTFB.bind(this)),
          (this.handleUrlChange = this.handleUrlChange.bind(this)),
          (this.handleKeyframe = this.handleKeyframe.bind(this)),
          (this.handleSourceOpen = this.handleSourceOpen.bind(this)),
          (this.handleBufferAppend = this.handleBufferAppend.bind(this)),
          (this.handleCoreEvent = this.handleCoreEvent.bind(this)),
          (this.handleDegrade = this.handleDegrade.bind(this));
      }),
      (e.initLog = function () {
        var n = this,
          r = this.options,
          i = r.player,
          o = i.hlsOps !== void 0;
        (this.commonParams = Ed({ os: Uy.operation_os }, izt(r))),
          (this.log = Ci({}, rzt()));
        var l = this;
        for (var u in this.log) {
          var c = function (h) {
            ea(n.log[u], h, {
              get: function () {
                return this["_" + h] == null
                  ? l.commonParams[h]
                  : this["_" + h];
              },
              set: function (f) {
                this["_" + h] = f;
              },
              enumerable: !0,
            });
          };
          for (var d in this.commonParams) c(d);
          o &&
            ea(this.log[u], "m3u8", {
              get: function () {
                if (i.__core__) {
                  var h = i.__core__.m3u8Text;
                  return h ? jn(h).call(h, 0, 25e4) : "";
                }
                return "";
              },
              enumerable: !0,
            }),
            ea(this.log[u], "volume", {
              get: function () {
                if (i && i.video) return i.volume || 0;
              },
              enumerable: !0,
            }),
            ea(this.log[u], "access", {
              get: function () {
                return czt();
              },
              enumerable: !0,
            });
        }
      }),
      (e.sendLog = function (n) {
        for (var r in this.commonParams)
          n[r] === void 0 && (n[r] = this["_" + r] || this.commonParams[r]);
        this.logmanager.push(n);
      }),
      (e.updateExt = function (n) {
        for (var r in this.log) for (var i in n) this.log[r][i] = n[i];
      }),
      (e.reportStartPlay = function () {
        this.started ||
          ((this.core = ete(this.player)),
          this.core &&
            ((this.commonParams.live_sdk_version = "2"),
            (this.logmanager.core = this.core)),
          (this.started = !0),
          (this.log.start_play.start_play_time = this.log.start_play.timestamp =
            Cs()),
          this.logmanager.push(this.log.start_play, !0));
      }),
      (e.initWindowListener = function () {
        Uy.device === "pc"
          ? window.addEventListener("beforeunload", this.handleUserLeave)
          : Uy.device === "mobile" &&
            (window.addEventListener("beforeunload", this.handleUserLeave),
            window.addEventListener("pagehide", this.handleUserLeave));
      }),
      (e.removeWindowListener = function () {
        Uy.device === "pc"
          ? window.removeEventListener("beforeunload", this.handleUserLeave)
          : Uy.device === "mobile" &&
            (window.removeEventListener("beforeunload", this.handleUserLeave),
            window.removeEventListener("pagehide", this.handleUserLeave));
      }),
      (e.initEvt = function () {
        var n = this,
          r = this.player;
        G1e.forEach(function (i) {
          (n["handleVideo" + i + "Evt"] = function () {
            n["handleVideo" + i] && n["handleVideo" + i]();
          }),
            n.initWindowListener(),
            n.bindVideoEvt(i, n["handleVideo" + i + "Evt"]);
        }),
          r.once("error", this.handlePlayerError),
          r.once("complete", this.handlePlayerComlete),
          r.once("playing", this.handlePlayerPlaying),
          r.once("timeupdate", this.handlePlayerPlaying),
          r.once("destroy", this.destroyFunc),
          r.on("ready", this.handlePlayerReady),
          r.on("waiting", this.handlePlayerWaiting),
          r.on("pause", this.handlePlayerPause),
          r.on("urlchange", this.handleUrlChange),
          r.once("sourceopen", this.handleSourceOpen),
          r.once("bufferappend", this.handleBufferAppend),
          r.on("core_event", this.handleCoreEvent),
          r.on("degrade", this.handleDegrade),
          this.hiJackPlayerStart();
      }),
      (e.handleCoreEvent = function (n) {
        var r = n.eventName,
          i = n.headers,
          o = n.pts,
          l = n.type,
          u = n.meta,
          c = n.sei,
          d = n.decodeFps,
          h = n.url,
          f = n.state;
        switch (r) {
          case "core.ttfb":
            this.handleTTFB(n);
            break;
          case "core.loadresponseheaders":
            var p = i.get("X-Server-Ip");
            this.player.hlsOps !== void 0 &&
              (this.log.play_stop.review_ts_count += 1),
              p && (this.commonParams.cdn_ip = p);
            break;
          case "core.loadretry":
            this.log.play_stop.retry_count++;
            break;
          case "core.keyframe":
            this.handleKeyframe(o);
            break;
          case "core.metadataparsed":
            this.handleMetaDataLoaded(l, u);
            break;
          case "core.sei":
            this.handleSEIParsed(c);
            break;
          case "core.lowdecode":
            this.commonParams.is_wasm &&
              (Ci(this.log.play_low_decode, n || {}),
              (this.log.play_low_decode.decode_fps = d),
              (this.log.play_low_decode.timestamp = Cs()),
              this.logmanager.push(this.log.play_low_decode, !0),
              (this.commonParams.is_wasm = 0));
            break;
          case "core.largeavgap":
            this.handleAVUnsync(n);
            break;
          case "core.loadstart":
            this.handlePlayerLoadStream(n), this.reportStartPlay();
            break;
          case "core.loadcomplete":
            this.handlePlayerLoadedStream(n);
            break;
          case "core.streamexception":
            this.handleStreamException(n);
            break;
          case "core.rtcstatechange":
            this.logmanager.push(
              Ci({ url: h, state: f }, this.log.rtcstatechange)
            );
        }
      }),
      (e.handleDegrade = function (n) {
        (this.log.degrade.payload = n),
          this.logmanager.push(this.log.degrade, !0);
      }),
      (e.hiJackPlayerStart = function () {
        var n = arguments,
          r = this;
        this.player._start = this.player.start;
        var i = this.player;
        i.start = function () {
          try {
            if (i._start)
              return i._start.apply(i, jn(Array.prototype).call(n, 0));
          } catch {}
          r.destroyed || r.handlePlayerComlete();
        };
      }),
      (e.handleTTFB = function (n) {
        var r = n || {},
          i = r.end,
          o = r.elapsed,
          l = r.responseUrl,
          u = r.url;
        (this.log.first_frame.ttfb = o || -1),
          (this.log.first_frame.ttfb_end = i || 0),
          (this.log.first_frame.is_redirect = +(u !== l)),
          (this.log.play_result.is_redirect = this.log.first_frame.is_redirect);
      }),
      (e.handleUrlChange = function (n) {
        this.logmanager.push(
          Ci(this.log.play_url_change, { url: n, timestamp: Cs() })
        );
      }),
      (e.handleKeyframe = function (n) {
        (this.log.play_stop.is_firstframe_received = 1),
          (this.log.play_stop.firstframe_pts = n);
      }),
      (e.handleSourceOpen = function () {
        (this.log.source_opened.timestamp = Cs()),
          this.logmanager.push(this.log.source_opened);
      }),
      (e.handleBufferAppend = function () {
        (this.log.source_updateend.timestamp = Cs()),
          this.logmanager.push(this.log.source_updateend);
      }),
      (e.handlePlayerPause = function () {
        (this.log.pause.timestamp = Cs()),
          this.logmanager.push(this.log.pause, !0),
          this.stallEnd();
      }),
      (e.handlePlayerError = function (n) {
        this.errorNumber = 1;
        var r = n.errorType,
          i = n.errorCode;
        Ci(
          this.log.play_error,
          Ed(
            {
              timestamp: Cs(),
              code: n.httpCode || i || (r === "parse" ? 31 : 21),
              info: n.message,
              detail: lr(n),
            },
            this.videoSize
          )
        ),
          this.logmanager.push(this.log.play_error, !0),
          this.destroyed ||
            (this.log.first_frame.first_frame_view === 0 &&
              (Ci(this.log.first_frame_failed, {
                code: i || (r === "parse" ? 31 : 21),
                msg: n.message,
              }),
              this.log.first_frame_failed.timestamp !== void 0 &&
                (this.log.first_frame_failed.timestamp = Cs()),
              this.logmanager.push(this.log.first_frame_failed, !0),
              this.log.play_result.is_threshold ||
                (this.clearPlayResultTimer(),
                (this.log.play_result.reason =
                  n.message || "first frame failed"),
                (this.log.play_result.code = this.log.play_error.code),
                this.logmanager.push(this.log.play_result))),
            this.options.error_report_stop
              ? this.destroy(!0)
              : this.updatePlayStopParams());
      }),
      (e.handlePlayerLoadStream = function (n) {
        var r = n.url,
          i = n.offersdp,
          o = n.sessionId;
        if (typeof r == "string") {
          var l = this.log.play_loadstream;
          (l.timestamp = Cs()),
            (l.loadstream_url = r),
            (l.offersdp = i),
            (l.sessionId = o),
            this.logmanager.push(l);
        }
      }),
      (e.handlePlayerLoadedStream = function (n) {
        var r = this.log.play_stream_loaded;
        (r.timestamp = Cs()), Ci(r, n), this.logmanager.push(r);
      }),
      (e.handleSEIParsed = function (n) {
        try {
          var r = this,
            i = r.log,
            o = i.playing,
            l = i.first_frame,
            u = (function () {
              if (n.code === 100) {
                var c = azt(n.content);
                c = jn(c).call(c, qt(c).call(c, "{"), Fse(c).call(c, "}") + 1);
                var d = ZVt(
                  function () {
                    var h = JSON.parse(c);
                    return Ar.resolve(r.getPlayerBuffer()).then(function (f) {
                      var p = f + r.ntpTime - h.ts;
                      (o.sei_delay = p),
                        (o.sei_source = h.source),
                        (o.ntp_sync = r.options.ntp ? 1 : 0),
                        (o.ntp_delta = r.ntp_delta),
                        (l.first_sei_delay = p),
                        (l.ntp_sync = r.options.ntp ? 1 : 0),
                        (l.ntp_delta = r.ntp_delta);
                    });
                  },
                  function () {}
                );
                if (d && d.then) return d.then(function () {});
              }
            })();
          return Ar.resolve(u && u.then ? u.then(function () {}) : void 0);
        } catch (c) {
          return Ar.reject(c);
        }
      }),
      (e.handleMetaDataLoaded = function (n, r) {
        (this.log.play_stop.meta = this.log.play_stop.meta || {}),
          n && (this.log.play_stop.meta[n] = r),
          (this.log.play_metadata_loaded.timestamp = Cs()),
          (this.log.play_metadata_loaded.metadata_type = n),
          r &&
            ((this.log.play_metadata_loaded.meta = r),
            (this.log.play_metadata_loaded.codec = r.codec),
            n === "video" &&
              ((this.commonParams.codec_type = r.codec),
              (this.commonParams.codec_support = nBe(r.codec)))),
          r ||
            ((this.log.play_metadata_loaded.meta = void 0),
            (this.log.play_metadata_loaded.codec = void 0),
            n === "video" && (this.commonParams.codec_type = "unknown")),
          this.logmanager.push(this.log.play_metadata_loaded);
      }),
      (e.handleAVUnsync = function (n) {
        Ci(this.log.play_av_unsync, n || {}),
          (this.log.play_av_unsync.timestamp = Cs()),
          this.logmanager.push(this.log.play_av_unsync);
      }),
      (e.handleStreamException = function (n) {
        this.logmanager.push(Ci({}, this.log.stream_exception, n));
      }),
      (e.handlePlayerComlete = function () {
        this.completed ||
          ((this.completed = !0),
          (this.core = ete(this.player)),
          this.core &&
            ((this.commonParams.live_sdk_version = "2"),
            (this.logmanager.core = this.core)),
          (this.player.config.autoplay || this.player.config.videoInit) &&
            this.reportStartPlay());
      }),
      (e.getPlayerBuffer = function () {
        try {
          var n = this;
          return n.player && n.player.video
            ? Ar.resolve(n.getRtcStats({ onlyJb: !0 })).then(function (r) {
                var i, o;
                if (r.video_jb_delay !== void 0) return r.video_jb_delay;
                var l =
                  (i = n.player) === null ||
                  i === void 0 ||
                  (o = i.video) === null ||
                  o === void 0
                    ? void 0
                    : o.buffered;
                if (l) {
                  var u = Math.max(0, l.length - 1);
                  try {
                    var c = kF(1e3 * (l.end(u) - n.player.video.currentTime));
                    return (
                      (n.log.playing.audio_buffer_time =
                        n.log.playing.video_buffer_time =
                          c),
                      c
                    );
                  } catch {
                    return 0;
                  }
                }
              })
            : Ar.resolve(0);
        } catch (r) {
          return Ar.reject(r);
        }
      }),
      (e.getTransferCost = function (n) {
        var r;
        if (!(!((r = this.core) === null || r === void 0) && r.transferCost))
          return {};
        if (n) return this.core.transferCost;
        var i = this.core.transferCost,
          o = i.demuxCost,
          l = i.remuxCost,
          u = i.appendCost,
          c = {
            demuxCost: o - this.cachePlaying.demuxCost,
            remuxCost: l - this.cachePlaying.remuxCost,
            appendCost: u - this.cachePlaying.appendCost,
          };
        return Ci(this.cachePlaying, this.core.transferCost), c;
      }),
      (e.getPlayerDownloadSpeed = function () {
        return (
          (this.core &&
            this.core.core &&
            typeof this.core.core.speedInfo == "function" &&
            this.core.core.speedInfo().speed) ||
          {}
        );
      }),
      (e.getPlayerQuality = function () {
        var n = this.player.video;
        if (n) {
          if (n.getVideoPlaybackQuality) {
            var r = n.getVideoPlaybackQuality();
            (this.log.playing.drop_count =
              r.droppedVideoFrames - this.tempDroppedFrameCount),
              (this.log.playing.drop_percent = M1e(
                (r.droppedVideoFrames - this.tempDroppedFrameCount) /
                  (r.totalVideoFrames - this.tempTotalFrameCount)
              ).toFixed(1)),
              (this.log.play_stop.drop_percent = M1e(
                r.droppedVideoFrames / r.totalVideoFrames
              ).toFixed(1)),
              (this.tempDroppedFrameCount = r.droppedVideoFrames),
              (this.tempTotalFrameCount = r.totalVideoFrames);
          } else if (n.webkitDroppedFrameCount != null) {
            var i = n.webkitDroppedFrameCount;
            (this.log.playing.drop_count = i - this.tempDroppedFrameCount),
              (this.tempDroppedFrameCount = i);
          }
        }
      }),
      (e.getRtcStats = function (n) {
        var r = n.duration,
          i = r === void 0 ? 1e3 : r,
          o = n.onlyJb,
          l = o !== void 0 && o;
        try {
          var u = this,
            c = u.player.plugins.rts || u.player.plugins.rtm,
            d = c && c.pc,
            h = {};
          return d
            ? Ar.resolve(d.getStats()).then(function (f) {
                return (
                  f.forEach(function (p) {
                    var g = p.type,
                      y = p.mediaType,
                      v = p.bytesReceived,
                      b = p.packetsReceived,
                      w = p.audioLevel,
                      k = p.concealmentEvents,
                      D = p.remoteTimestamp,
                      $ = p.timestamp,
                      N = p.framesDropped,
                      P = p.keyFramesDecoded,
                      I = p.totalDecodeTime,
                      O = p.framesDecoded,
                      X = p.frameHeight,
                      G = p.frameWidth,
                      H = p.framesReceived,
                      E = p.jitterBufferDelay,
                      S = p.jitterBufferEmittedCount,
                      L = p.jitter,
                      W = p.nackCount,
                      F = p.packetsLost,
                      oe = p.pliCount,
                      De = p.totalSamplesReceived,
                      Xe = p.concealedSamples,
                      ze = p.currentRoundTripTime,
                      ht = p.decoderImplementation,
                      gt = p.mimeType,
                      pt = p.freezeCount,
                      $t = p.totalFreezesDuration,
                      ot = p.totalPausesDuration;
                    switch (g) {
                      case "inbound-rtp":
                        if (y === "audio")
                          (h.audio_bytes_received =
                            v - (u.cacheRtcStats.audioBytesReceived || 0)),
                            (u.cacheRtcStats.audioBytesReceived = v),
                            (h.audio_packets_lost =
                              F - (u.cacheRtcStats.audioPacketsLost || 0)),
                            (h.audio_packets_received =
                              b - (u.cacheRtcStats.audioPacketsReceived || 0)),
                            (u.cacheRtcStats.audioPacketsLost = F),
                            (u.cacheRtcStats.audioPacketsReceived = b),
                            (h.audio_level = w),
                            (h.concealment_event = k),
                            (h.audio_fraction_lost =
                              h.audio_packets_lost / h.audio_packets_received),
                            u.cacheRtcStats.totalSamplesReceived !== void 0 &&
                              (h.audio_rec_sample_rate =
                                (De - u.cacheRtcStats.totalSamplesReceived) /
                                i),
                            (u.cacheRtcStats.totalSamplesReceived = De),
                            (h.concealed_samples = Xe),
                            (h.total_samples_received = De);
                        else {
                          if (((h.video_jb_delay = (E / S) * 1e3), l)) return h;
                          (h.frames_dropped = N),
                            (h.iframes_decoded = P),
                            (h.video_bytes_received =
                              v - (u.cacheRtcStats.videoBytesReceived || 0)),
                            (u.cacheRtcStats.videoBytesReceived = v),
                            (h.video_dec_time = I),
                            (h.video_decoded_delay_ms = h.video_dec_elapse / O),
                            (h.video_frame_height = X),
                            (h.video_frame_width = G),
                            u.cacheRtcStats.framesDecoded !== void 0 &&
                              (h.video_decode_framerate =
                                (O - u.cacheRtcStats.framesDecoded) / i),
                            (u.cacheRtcStats.framesDecoded = O),
                            u.cacheRtcStats.framesReceived !== void 0 &&
                              (h.video_recv_framerate =
                                (H - u.cacheRtcStats.framesReceived) / i),
                            u.cacheRtcStats.freezeCount !== void 0 &&
                              ((h.freeze_count =
                                pt - u.cacheRtcStats.freezeCount),
                              (h.freeze_duration =
                                $t - u.cacheRtcStats.totalFreezesDuration)),
                            (u.cacheRtcStats.freezeCount = pt),
                            (u.cacheRtcStats.totalFreezesDuration = $t),
                            (u.cacheRtcStats.framesReceived = H),
                            (h.total_pauses_duration = ot),
                            (h.video_jitter = 1e3 * L),
                            (h.video_nack_count = W),
                            (h.video_packets_lost =
                              F - (u.cacheRtcStats.videoPacketsLost || 0)),
                            (h.video_packets_received =
                              b - (u.cacheRtcStats.videoPacketsReceived || 0)),
                            (h.video_fraction_lost =
                              h.video_packets_lost / h.video_packets_received),
                            (u.cacheRtcStats.videoPacketsLost = F),
                            (u.cacheRtcStats.videoPacketsReceived = b),
                            (h.video_pli_count = oe),
                            (h.decoder_name = ht);
                        }
                        break;
                      case "remote-outbound-rtp":
                        h.e2e_delay_ms = $ - D;
                        break;
                      case "track":
                        G !== void 0 &&
                          ((h.video_frame_width = G),
                          (h.video_frame_height = X));
                        break;
                      case "candidate-pair":
                        h.rtt = 1e3 * ze;
                        break;
                      case "codec":
                        $a(gt).call(gt, "video")
                          ? (h.video_codec = gt)
                          : (h.audio_codec = y);
                    }
                  }),
                  Ci(u.log.playing, {
                    video_download_size: h.video_bytes_received,
                    decode_fps: h.video_decode_framerate,
                    width: h.video_frame_width,
                    height: h.video_frame_height,
                    current_speed:
                      (h.audio_bytes_received + h.video_bytes_received) / i,
                  }),
                  h
                );
              })
            : Ar.resolve(h);
        } catch (f) {
          return Ar.reject(f);
        }
      }),
      (e.reportPlaying = function (n) {
        try {
          var r = this;
          r.commonParams.is_wasm &&
            ((r.commonParams.fps = r.player.video.fps),
            (r.log.playing.render_fps = r.player.video.fps),
            (r.log.playing.decode_fps = r.player.video.decodeFps)),
            r.log.playing.index++;
          var i,
            o = r.log.playing.timestamp;
          r.inWaitingStart &&
            r.inWaitingStart < Cs() &&
            (i = Math.min(
              r.options.playingInterval || r.log.playing.play_time,
              Cs() - Math.max(r.inWaitingStart, o)
            )),
            r.getPlayerQuality(),
            r.getPlayerBuffer();
          var l = r.getTransferCost(!1);
          if (!r.options.downloadSpeedInterval) {
            var u = r.getPlayerDownloadSpeed(),
              c = u.speed,
              d = u.avgSpeed;
            (r.log.playing.current_speed = c), (r.log.playing.avg_speed = d);
          }
          var h = Cs(),
            f = h - o,
            p = (i > 200 ? i : 0) + r.log.playing.stall_time,
            g = (i > 200 ? 1 : 0) + r.log.playing.stall_count;
          return (
            r.options.aggregationDowngradeStallTime &&
              (r.log.playing.aggregation_downgrade_stall =
                (i > r.options.aggregationDowngradeStallTime ? i : 0) +
                (r.log.playing.aggregation_downgrade_stall || 0)),
            Ci(
              r.log.playing,
              Ed(
                Ed(
                  {
                    timestamp: h,
                    stop_time: h,
                    duration: n ? 0 : f / 1e3,
                    stall_time_per_100sec: (p / f) * 100,
                    stall_count_per_100sec: ((1e3 * g) / f) * 100,
                    stall_count: g,
                    stall_time: p,
                    play_current_time: r.player.currentTime,
                  },
                  l
                ),
                r.videoSize
              )
            ),
            Ar.resolve(
              r.getRtcStats({ duration: f, first: n, onlyJb: !1 })
            ).then(function (y) {
              var v = {};
              if (r.core) {
                if (r.core.getStats) {
                  var b = r.core.getStats() || {},
                    w = b.bitrate,
                    k = b.avgSpeed;
                  Ci(v, { bitrate: w, avg_speed: k, rate: k / w });
                }
                if (r.core.getNetWorkInfo) {
                  var D,
                    $ = (r.core.getNetWorkInfo() || {}).lostRate,
                    N = (
                      ((D = r.core.core) === null || D === void 0
                        ? void 0
                        : D._opts) || {}
                    ).networkEvaluateInterval;
                  Ci(v, { lostRate: $, networkEvaluateInterval: N });
                }
              }
              r.logmanager.push(
                Ci({}, r.log.playing, Ed(Ed({ play_time: n ? 0 : f }, y), v)),
                !0
              ),
                (r.log.playing.download_speed_array = []),
                (r.log.playing.stall_time = 0),
                (r.log.playing.stall_count = 0),
                r.options.aggregationDowngradeStallTime &&
                  (r.log.playing.aggregation_downgrade_stall = 0);
            })
          );
        } catch (y) {
          return Ar.reject(y);
        }
      }),
      (e.handlePlayerPlaying = function () {
        try {
          var n = this;
          if (n.player && n.player.video.readyState < 3) return Ar.resolve();
          if (
            (n.player.off("playing", n.handlePlayerPlaying),
            n.player.off("timeupdate", n.handlePlayerPlaying),
            !n.player.video)
          )
            return n.destroyFunc(), Ar.resolve();
          if (n.player.paused) return n.handleVideopause(), Ar.resolve();
          if (n.core && n.core.getStats) {
            var r = (n.core.getStats() || {}).fps;
            n.commonParams.fps = r;
          }
          return Ar.resolve(n.reportPlaying(!0)).then(function () {
            n.clearPlayingInterval();
            var i = n.options.playingInterval || n.log.playing.play_time;
            (n.intervalId = setInterval(function () {
              try {
                var o = (function () {
                  if (
                    Math.abs(Date.now() - n.log.playing.timestamp - i) < 100 ||
                    Date.now() - n.log.playing.timestamp >= i
                  ) {
                    var l = (function () {
                      if (n.player && n.player.video) {
                        var u = (function () {
                          if (!n.player.paused)
                            return Ar.resolve(n.reportPlaying()).then(
                              function () {}
                            );
                          n.handleVideopause();
                        })();
                        if (u && u.then) return u.then(function () {});
                      } else n.destroyFunc();
                    })();
                    if (l && l.then) return l.then(function () {});
                  }
                })();
                return Ar.resolve(
                  o && o.then ? o.then(function () {}) : void 0
                );
              } catch (l) {
                return Ar.reject(l);
              }
            }, 1e3)),
              n.clearStallTimer(),
              n.handleVideoplaying(),
              n.started || n.reportStartPlay(),
              n.saveBuffered();
          });
        } catch (i) {
          return Ar.reject(i);
        }
      }),
      (e.handlePlayerReady = function () {
        var n = this;
        (this.log.start_play.start_play_time = Cs()),
          this.player.config.autoplay && this.reportStartPlay(),
          this.options.playResultThreshold &&
            (this.log.play_result.threshold = this.options.playResultThreshold),
          this.clearPlayResultTimer(),
          (this.log.play_result.start = Cs()),
          (this.playResultTimer = setTimeout(function () {
            n.log.play_result.timestamp >= n.log.play_result.start ||
              (n.player &&
                !n.player.paused &&
                n.player.video &&
                ((n.log.play_result.is_threshold = 1),
                n.logmanager.push(n.log.play_result, !0)));
          }, this.log.play_result.threshold));
      }),
      (e.handlePlayerWaiting = function () {
        var n = this;
        if (!this.inWaitingStart && this.log.first_frame.timestamp) {
          (this.log.stall.timestamp =
            this.inWaitingStart =
            this.log.stall.stall_start =
              Cs()),
            (this.log.stall_start.ready_state = this.log.stall.ready_state =
              this.player.video.readyState),
            (this.log.stall_start.timestamp = Cs()),
            (this.log.stall_start.stall_start_time = Cs()),
            (this.log.stall_start.video_buffer_time =
              this.player.video.readyState),
            (this.log.stall_start.play_current_time = this.player.currentTime),
            (this.log.stall.play_current_time = this.player.currentTime),
            (this.log.stall_start.buffered = this.getBuffered()),
            (this.log.stall.buffered = this.log.stall_start.buffered);
          var r = this.getPlayerDownloadSpeed(),
            i = r.speed,
            o = r.avgSpeed;
          (this.log.stall.current_speed = i),
            (this.log.stall.avg_speed = o),
            Ci(this.log.stall_start, this.videoSize),
            this.clearStallTimer(),
            (this.stallStartTimer = setTimeout(function () {
              n.logmanager.push(n.log.stall_start, !0);
            }, 205));
        }
      }),
      (e.handleVideoseeking = function () {}),
      (e.handleVideoseeked = function () {}),
      (e.handleVideoplay = function () {
        this.reportStartPlay(),
          this.removeVideoEvt("play", this.handleVideoplay);
      }),
      (e.handleVideotimeupdate = function () {
        Math.abs(
          this.player.currentTime - this.log.stall_start.play_current_time
        ) > 0.2 && this.stallEnd(),
          this.saveBuffered();
      }),
      (e.handleVideocanplay = function () {
        this.stallEnd(), this.reportFirstframe();
      }),
      (e.handleVideoplaying = function () {
        this.stallEnd(), (this.log.play_stop.is_stream_received = 1);
        var n = Cs();
        this.reportStartPlay(), (this.log.first_frame.start = n);
      }),
      (e.stallEnd = function () {
        this.clearStallTimer();
        var n = Cs();
        if (this.inWaitingStart) {
          var r = n - this.inWaitingStart;
          r > 200 &&
            (this.log.play_stop.stall_count++,
            (this.log.play_stop.stall_time += n - this.inWaitingStart),
            (this.log.playing.stall_time +=
              n - Math.max(this.inWaitingStart, this.log.playing.timestamp)),
            (this.log.stall.stall_end = n),
            (this.log.stall.timestamp = Cs()),
            this.log.playing.stall_count++,
            Ci(this.log.stall, Ed({}, this.videoSize)),
            this.logmanager.push(this.log.stall, !0)),
            this.options.aggregationDowngradeStallTime &&
              r > this.options.aggregationDowngradeStallTime &&
              (this.log.playing.aggregation_downgrade_stall =
                (this.log.playing.aggregation_downgrade_stall || 0) +
                (n -
                  Math.max(this.inWaitingStart, this.log.playing.timestamp)));
        }
        this.inWaitingStart = 0;
      }),
      (e.handleVideoloadeddata = function () {
        this.reportFirstframe();
      }),
      (e.handleVideoratechange = function () {
        this.log.playing.speed_switch_count++,
          (this.log.playing.speed_switch_info = this.player.video.playbackRate);
      }),
      (e.handleVideoended = function () {
        this.clearPlayingInterval(),
          this.clearStallTimer(),
          Ci(this.log.playing, { is_last: 1 }),
          this.reportPlaying();
      }),
      (e.handleVideoerror = function () {
        var n = this;
        this.errorNumber = 1;
        var r = this.player.video.error;
        Ci(
          this.log.play_error,
          Ed(
            Ed({ timestamp: Cs() }, this.videoSize),
            r && { code: r.code, info: r.message }
          )
        ),
          this.logmanager.push(this.log.play_error, !0),
          n.log.first_frame.first_frame_view !== 0 ||
            n.log.first_frame_failed.code ||
            (r &&
              ((n.log.first_frame_failed.code = r.code),
              (n.log.first_frame_failed.msg = O1e[r.code]),
              n.log.first_frame_failed.timestamp !== void 0 &&
                (n.log.first_frame_failed.timestamp = Cs()),
              n.logmanager.push(n.log.first_frame_failed, !0),
              n.log.play_result.is_threshold ||
                ((n.log.play_result.reason =
                  O1e[r.code] || "first frame failed"),
                (n.log.play_result.code = r.code),
                n.clearPlayResultTimer(),
                n.logmanager.push(n.log.play_result, !0)))),
          n.options.error_report_stop
            ? n.handleUserLeave()
            : n.updatePlayStopParams();
      }),
      (e.handleVideopause = function () {
        this.stallEnd(),
          this.clearPlayingInterval(),
          this.clearStallTimer(),
          clearTimeout(this.collectDownloadSpeedTimer),
          this.player.once("playing", this.handlePlayerPlaying),
          this.player.once("timeupdate", this.handlePlayerPlaying);
      }),
      (e.destroyFunc = function (n) {
        var r = this;
        this.destroyed ||
          (n || this.handleUserLeave(),
          (this.destroyed = !0),
          Uy.device === "pc"
            ? window.removeEventListener("beforeunload", this.handleUserLeave)
            : Uy.device === "mobile" &&
              window.removeEventListener("pagehide", this.handleUserLeave),
          G1e.forEach(function (i) {
            r.removeVideoEvt(i, r["handleVideo" + i + "Evt"]);
          }),
          this.player &&
            (this.player._start &&
              ((this.player.start = this.player._start),
              delete this.player._start),
            this.player.off("destroy", this.destroyFunc),
            this.player.off("complete", this.handlePlayerComlete),
            this.player.off("playing", this.handlePlayerPlaying),
            this.player.off("timeupdate", this.handlePlayerPlaying),
            this.player.off("ready", this.handlePlayerReady),
            this.player.off("waiting", this.handlePlayerWaiting),
            this.player.off("largeavgap", this.handleAVUnsync),
            this.player.off("error", this.handlePlayerError),
            this.player.off("SEI_PARSED", this.handleSEIParsed),
            this.player.off("pause", this.handlePlayerPause),
            this.player.off("ttfb", this.handleTTFB),
            this.player.off("urlchange", this.handleUrlChange),
            this.player.off("isKeyframe", this.handleKeyframe),
            this.player.off("sourceopen", this.handleSourceOpen),
            this.player.off("bufferappend", this.handleBufferAppend),
            this.player.off("core_event", this.handleCoreEvent),
            this.player.off("degrade", this.handleDegrade)),
          this.clearPlayingInterval(),
          this.clearStallTimer(),
          this.clearPlayResultTimer(),
          clearTimeout(this.collectDownloadSpeedTimer),
          (this._player = null));
      }),
      (e.handleUserLeave = function () {
        try {
          var n = this;
          return n.destroyed || !n.started
            ? Ar.resolve()
            : ((n.destroyed = !0),
              Ar.resolve(n.updatePlayStopParams()).then(function () {
                n.reportPlayStop(),
                  n.clearPlayingInterval(),
                  n.clearStallTimer(),
                  clearTimeout(n.collectDownloadSpeedTimer),
                  n.removeWindowListener();
              }));
        } catch (r) {
          return Ar.reject(r);
        }
      }),
      (e.saveBuffered = function () {
        try {
          var n = this.getBuffered();
          n && n.length && (this.log.play_stop.buffered = n);
        } catch {}
      }),
      (e.getBuffered = function () {
        try {
          for (
            var n = [], r = this.player.video, i = 0;
            i < r.buffered.length;
            i++
          )
            n.push([r.buffered.start(i), r.buffered.end(i)]);
          return n;
        } catch {}
      }),
      (e.reportPlayStop = function () {
        this.player &&
          ((this.log.play_stop.play_current_time =
            this.player.currentTime || this.log.playing.play_current_time),
          this.saveBuffered()),
          this.logmanager.push(this.log.play_stop);
      }),
      (e.reportFirstframe = function () {
        if (!this.firstFrameViewed) {
          if (this.core && this.core.getStats) {
            var n = (this.core.getStats() || {}).fps;
            this.commonParams.fps = n;
          }
          var r = this.getTransferCost(!0);
          this.firstFrameViewed = !0;
          var i = Cs();
          Ci(
            this.log.first_frame,
            Ed(
              Ed(
                {
                  first_frame_view:
                    i - this.log.start_play.start_play_time || i,
                  timestamp: i,
                },
                r
              ),
              this.videoSize
            )
          ),
            this.log.first_frame.ttfb_end &&
              (this.log.first_frame.ttdb = i - this.log.first_frame.ttfb_end),
            this.logmanager.push(this.log.first_frame),
            this.clearPlayResultTimer(),
            (this.log.play_result.result = 1),
            this.logmanager.push(this.log.play_result),
            (this.log.play_stop.is_stream_received = 1);
        }
      }),
      (e.updatePlayStopParams = function () {
        try {
          var n,
            r = function () {
              Ci(
                u,
                Ed(
                  {
                    timestamp: l,
                    stop_time: l,
                    duration: i.playedTime / 1e3,
                    play_time: i.playedTime / 1e3,
                  },
                  i.videoSize
                )
              ),
                i.errorNumber === 0 &&
                  (u.play_time_on_no_frame =
                    u.stop_time - i.log.start_play.start_play_time);
            },
            i = this,
            o = ozt(i._url),
            l = Cs();
          i.playedTime = l - i.log.start_play.start_play_time;
          var u = i.log.play_stop;
          if (
            (Ci(u, Ed({}, u.stall_count === 0 && { stall_time: 0 })),
            i.inWaitingStart &&
              l - i.inWaitingStart > 200 &&
              (u.stall_time += l - i.inWaitingStart),
            (i.inWaitingStart = 0),
            Ci(
              u,
              Ed(
                {
                  stall_time_per_100sec: (u.stall_time / i.playedTime) * 100,
                  stall_count_per_100sec:
                    ((1e3 * u.stall_count) / i.playedTime) * 100,
                },
                o
              )
            ),
            i.log.play_stop.stall_count_per_100sec === 0 &&
              (i.log.play_stop.stall_time_per_100sec = 0),
            i.log.play_stop.stall_time_per_100sec > 100 ||
              i.log.play_stop.stall_time_per_100sec < 0)
          )
            return Ar.resolve();
          if (
            (i.log.playing.index
              ? (Ci(i.log.playing, { is_last: 1 }), i.reportPlaying())
              : ((i.log.play_stop.error_code = i.log.play_error.code),
                (i.log.play_stop.error_info = i.log.play_error.info)),
            (l = Cs()),
            (n = i.core) === null || n === void 0 ? void 0 : n.getStats)
          ) {
            var c = i.core.getStats() || {},
              d = c.totalReceivedByte,
              h = c.totalReceivedCost;
            Ci(i.log.play_stop, {
              totalReceivedByte: d,
              totalReceivedCost: h,
              totalAverageSpeed: (8 * d) / (h / 1e3),
            });
          }
          var f = (function () {
            var p;
            if (!((p = i.core) === null || p === void 0) && p.getStatsSnapshoot)
              return Ar.resolve(i.core.getStatsSnapshoot()).then(function (g) {
                var y = g.video || {},
                  v = y.packetsLost,
                  b = y.packetsReceived;
                Ci(u, {
                  packetsLost: v,
                  packetsReceived: b,
                  totalLostRate: v / (v + b),
                });
              });
          })();
          return Ar.resolve(f && f.then ? f.then(r) : r());
        } catch (p) {
          return Ar.reject(p);
        }
      }),
      (e.clearPlayingInterval = function () {
        this.intervalId &&
          (clearInterval(this.intervalId), (this.intervalId = null));
      }),
      (e.clearStallTimer = function () {
        clearTimeout(this.stallStartTimer);
      }),
      (e.clearPlayResultTimer = function () {
        clearTimeout(this.playResultTimer);
      }),
      (e.destroy = function (n) {
        this.destroyFunc(!n);
      }),
      (e.bindVideoEvt = function (n, r) {
        this.player && this.player.video.addEventListener(n, r, !1);
      }),
      (e.removeVideoEvt = function (n, r) {
        this.player &&
          this.player.video &&
          this.player.video.removeEventListener(n, r, !1);
      }),
      (e.send = function (n, r) {
        this.logmanager.send(n, r);
      }),
      t
    );
  })(),
  hzt = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n() {
      var r, i;
      Wn(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        bn(
          os((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "_liveLogger",
          void 0
        ),
        i
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "afterCreate",
            value: function () {
              this.player.config.teaTracker && this.open();
            },
          },
          {
            key: "destroy",
            value: function () {
              this.close();
            },
          },
          {
            key: "close",
            value: function () {
              var r;
              (r = this._liveLogger) === null || r === void 0 || r.destroy(!1),
                (this._liveLogger = void 0);
            },
          },
          {
            key: "open",
            value: function () {
              var r;
              this._liveLogger ||
                (this._start(),
                this.config.showUserIdInErrorPanel &&
                  this.player.plugins.error &&
                  (this.player.plugins.error.config.extraTips = [
                    {
                      label: "userId",
                      value:
                        (r = this.player.config.teaTracker) === null ||
                        r === void 0 ||
                        (r = r.tea) === null ||
                        r === void 0
                          ? void 0
                          : r.getConfig("user_unique_id"),
                    },
                  ]));
            },
          },
          {
            key: "_start",
            value: function () {
              var r, i, o;
              this._liveLogger = new dzt({
                Tea:
                  (r = this.player.config) === null ||
                  r === void 0 ||
                  (r = r.teaTracker) === null ||
                  r === void 0
                    ? void 0
                    : r.tea,
                player: this.player,
                aid: this.config.appId || 654926,
                project_key: this.config.appId,
                app_name: this.config.appName || this.config.appId,
                user_id:
                  (i = this.player.config) === null ||
                  i === void 0 ||
                  (i = i.teaTracker) === null ||
                  i === void 0
                    ? void 0
                    : i.userId,
                device_id:
                  (o = this.player.config) === null ||
                  o === void 0 ||
                  (o = o.teaTracker) === null ||
                  o === void 0
                    ? void 0
                    : o.deviceId,
                error_report_stop: !0,
                ext: {
                  veplayer_version: "2.9.2",
                  flv_version: "3.0.23-rc.6",
                  hls_version: "3.0.21-rc.21",
                  rts_version: "0.2.1-alpha.45",
                },
              });
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "logger";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { appId: 654926, enable: !0, showUserIdInErrorPanel: !0 };
            },
          },
        ]
      ),
      n
    );
  })();
function _1(t, e) {
  return typeof t != "number" ? "-" : e ? e(t) : t.toString();
}
function fzt(t) {
  var e, n, r, i;
  return {
    rows: [
      {
        key: "format",
        labelTextKey: "FORMAT",
        value:
          (e = t == null ? void 0 : t.format) !== null && e !== void 0
            ? e
            : "-",
      },
      {
        key: "fps",
        labelTextKey: "FPS",
        value: _1(t.fps, function (o) {
          return "".concat(o, " fps");
        }),
      },
      {
        key: "bitrate",
        labelTextKey: "BITRATE",
        value: _1(t.bitrate, function (o) {
          return "".concat((o / 1e3).toFixed(2), " kbps");
        }),
      },
      {
        key: "gop",
        labelTextKey: "GOP",
        value: _1(t.gop, function (o) {
          return "".concat(o, " frames");
        }),
      },
      {
        key: "resolution",
        labelTextKey: "RESOLUTION",
        value: Ce((n = "".concat(_1(t.width), " * "))).call(n, _1(t.height)),
      },
      {
        key: "encodeType",
        labelTextKey: "ENCODE_TYPE",
        value: (r = t.encodeType) !== null && r !== void 0 ? r : "-",
      },
      {
        key: "bufferEnd",
        labelTextKey: "BUFFER_END",
        value: _1(
          Number(
            (i = t.bufferEnd) === null || i === void 0 ? void 0 : i.toFixed(2)
          )
        ),
      },
      {
        key: "currentTime",
        labelTextKey: "CURRENT_TIME",
        value: _1(t.currentTime, function (o) {
          return o.toFixed(4) + "s";
        }),
      },
    ],
  };
}
function pzt(t) {
  return {
    titleTextKey: "DECODE_INFO",
    rows: [
      {
        key: "decodeEfficiency",
        labelTextKey: "DECODE_EFFICIENCY",
        value: _1(t.decodeFps, function (e) {
          return e + " frames/s";
        }),
      },
      {
        key: "decodeCost",
        labelTextKey: "DECODE_COST",
        value: _1(t.decodeFps, function (e) {
          return (e ? (1e3 / e).toFixed() : 0) + "ms";
        }),
      },
    ],
  };
}
var qV,
  gzt = (function (t) {
    so(n, ml);
    var e = lo(n);
    function n() {
      var r, i;
      Wn(this, n);
      for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
        l[u] = arguments[u];
      return (
        bn(
          os((i = e.call.apply(e, Ce((r = [this])).call(r, l)))),
          "_pollTimer",
          void 0
        ),
        bn(os(i), "_visible", void 0),
        bn(os(i), "_playPlugin", void 0),
        i
      );
    }
    return (
      Kn(
        n,
        [
          {
            key: "_streamType",
            get: function () {
              return Oh.getStreamType(this.player.config.url);
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r = this;
              (this._playPlugin = this.player.plugins[this._streamType]),
                this.player.on(gS.ERROR, function () {
                  return r.close();
                }),
                this.config.visible &&
                  this.player.once(gS.LOADED_DATA, function () {
                    return r.open();
                  });
            },
          },
          {
            key: "open",
            value: function () {
              var r;
              this._visible ||
                ($a((r = ["flv", "hls"])).call(r, this._streamType)
                  ? this.player.plugins[this._streamType]
                    ? ((this.root.style.display = "block"),
                      this._tick(),
                      (this._visible = !0))
                    : console.warn(
                        "不支持或未加载".concat(this._streamType, "插件")
                      )
                  : console.warn("仅支持flv和hls格式的信息展示"));
            },
          },
          {
            key: "close",
            value: function () {
              this._visible &&
                (clearTimeout(this._pollTimer),
                (this.root.innerHTML = ""),
                (this.root.style.display = "none"),
                (this._visible = !1));
            },
          },
          {
            key: "destroy",
            value: function () {
              var r = this;
              this.close(),
                this.player.off(gS.LOADED_DATA, function () {
                  return r.open();
                }),
                this.player.off(gS.ERROR, function () {
                  return r.close();
                });
            },
          },
          {
            key: "render",
            value: function () {
              return `
    <xg-live-panel class="veplayer-live-panel">
    </xg-live-panel>
    `;
            },
          },
          {
            key: "_tick",
            value: function () {
              var r = this;
              clearTimeout(this._pollTimer),
                this._renderPanel(),
                (this._pollTimer = window.setTimeout(function () {
                  r._tick();
                }, this.config.interval));
            },
          },
          {
            key: "_getStats",
            value: function () {
              var r;
              return (r = this._playPlugin) === null || r === void 0
                ? void 0
                : r.getStats();
            },
          },
          {
            key: "_getPanelData",
            value: function () {
              var r = this._getStats() || {},
                i = "".concat(this._streamType, "_live"),
                o = this._playPlugin.softDecode,
                l = [fzt($n($n({}, r), {}, { format: i }))];
              return o && l.push(pzt(r)), l;
            },
          },
          {
            key: "_renderPanel",
            value: function () {
              var r = this,
                i = this._getPanelData(),
                o = this.root;
              o &&
                ((o.innerHTML = ""),
                i.forEach(function (l) {
                  r._renderGroup(o, l);
                }));
            },
          },
          {
            key: "_renderGroup",
            value: function (r, i) {
              var o = this,
                l = i.title,
                u = i.titleTextKey,
                c = i.rows,
                d = this.player.config.i18nManager;
              if (l || u) {
                var h,
                  f = this._genTitleDom(
                    (h = d.getText(u)) !== null && h !== void 0 ? h : l
                  );
                r.appendChild(f);
              }
              c.forEach(function (p) {
                var g = o._genRowDom(p);
                r.appendChild(g);
              });
            },
          },
          {
            key: "_genTitleDom",
            value: function (r) {
              var i = Pt.createDom(
                  "xg-live-panel",
                  "",
                  void 0,
                  "veplayer-live-panel-row"
                ),
                o = Pt.createDom(
                  "xg-live-panel",
                  r,
                  void 0,
                  "veplayer-live-panel-row-title"
                );
              return i.appendChild(o), i;
            },
          },
          {
            key: "_genRowDom",
            value: function (r) {
              var i = this.player.config.i18nManager,
                o = Pt.createDom(
                  "veplayer-live-panel-row",
                  "",
                  void 0,
                  "veplayer-live-panel-row"
                ),
                l = Pt.createDom(
                  "xg-live-panel",
                  i.getText(r.labelTextKey),
                  void 0,
                  "veplayer-live-panel-row-label"
                );
              o.appendChild(l);
              var u = Pt.createDom("xg-live-panel", r.value);
              return o.appendChild(u), o;
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "infoPanel";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { visible: !1, interval: 500 };
            },
          },
        ]
      ),
      n
    );
  })(),
  rBe =
    "https://docs.byteplus.com/en/docs/byteplus-media-live/docs-feature-implementation#uploading-logs",
  mzt = $n(
    $n({}, c3t),
    {},
    {
      INVALID_PARAMETER:
        "The imported parameter is empty, please pass in necessary parameters such as the stream address",
      INVALID_LOGGER:
        "Log options not configured correctly. Please refer to this document ".concat(
          rBe,
          " to configure the logs."
        ),
      EMPTY_RTM_FALLBACK_PARAMETER:
        "Fallback URL for RTM is not configured. Please set enableFallback: false to disable fallback, or configure fallbackUrl for FLV and HLS formats based on the browser environment.",
      FORMAT: "format",
      FPS: "fps",
      BITRATE: "bitrate",
      GOP: "gop",
      RESOLUTION: "resolution",
      ENCODE_TYPE: "encodeType",
      BUFFER_END: "bufferEnd",
      CURRENT_TIME: "currentTime",
      DECODE_EFFICIENCY: "efficiency",
      DECODE_COST: "cost",
      DECODE_INFO: "decodeInfo",
      REFRESH: "refresh",
    }
  ),
  yzt = $n(
    $n({}, d3t),
    {},
    {
      INVALID_PARAMETER: "入参为空，请传入流地址等必要参数",
      INVALID_LOGGER: "未正确配置质量日志参数, 请参考 ".concat(rBe, " 配置"),
      EMPTY_RTM_FALLBACK_PARAMETER:
        "未配置 RTM 降级地址 fallbackUrl，请设置 enableFallback: false 取消降级或根据浏览器环境配置 FLV、HLS 格式降级地址",
      FORMAT: "格式",
      FPS: "帧率",
      BITRATE: "码率",
      GOP: "GOP",
      RESOLUTION: "视频分辨率",
      ENCODE_TYPE: "编码方式",
      BUFFER_END: "Buffer 水位",
      CURRENT_TIME: "播放进度",
      DECODE_EFFICIENCY: "解码效率",
      DECODE_COST: "解码消耗",
      DECODE_INFO: "软解信息",
      REFRESH: "刷新",
    }
  ),
  vzt = new Uint8Array(16);
function bzt() {
  if (
    !qV &&
    !(qV =
      typeof crypto < "u" &&
      crypto.getRandomValues &&
      crypto.getRandomValues.bind(crypto))
  )
    throw new Error(
      "crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported"
    );
  return qV(vzt);
}
for (var vd = [], ez = 0; ez < 256; ++ez) {
  var F1e;
  vd.push(jn((F1e = (ez + 256).toString(16))).call(F1e, 1));
}
function _zt(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (
    vd[t[e + 0]] +
    vd[t[e + 1]] +
    vd[t[e + 2]] +
    vd[t[e + 3]] +
    "-" +
    vd[t[e + 4]] +
    vd[t[e + 5]] +
    "-" +
    vd[t[e + 6]] +
    vd[t[e + 7]] +
    "-" +
    vd[t[e + 8]] +
    vd[t[e + 9]] +
    "-" +
    vd[t[e + 10]] +
    vd[t[e + 11]] +
    vd[t[e + 12]] +
    vd[t[e + 13]] +
    vd[t[e + 14]] +
    vd[t[e + 15]]
  );
}
var Tzt =
    typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto),
  U1e = { randomUUID: Tzt };
function B1e(t, e, n) {
  if (U1e.randomUUID && !e && !t) return U1e.randomUUID();
  var r = (t = t || {}).random || (t.rng || bzt)();
  if (((r[6] = (15 & r[6]) | 64), (r[8] = (63 & r[8]) | 128), e)) {
    n = n || 0;
    for (var i = 0; i < 16; ++i) e[n + i] = r[i];
    return e;
  }
  return _zt(r);
}
var g3,
  H1e = "veplayer_live_device_id",
  X1e = "veplayer_live_user_id",
  iBe = function (t) {
    return Math.floor((9 * Math.random() + 1) * Math.pow(10, t - 1)).toString();
  },
  Ezt = function () {
    var t = localStorage.getItem(H1e);
    return t || ((t = iBe(11)), localStorage.setItem(H1e, t), t);
  },
  Szt = function () {
    var t = localStorage.getItem(X1e);
    return t || ((t = iBe(12)), localStorage.setItem(X1e, t), t);
  },
  Rzt = function (t) {
    var e = Oh.getUrlObject(t);
    return e
      ? e != null && e.searchParams.get("_session_id")
        ? t
        : Oh.appendSearchParams(t, { _session_id: wzt() })
      : t ?? "";
  },
  Azt = function (t) {
    for (var e = 0, n = 0, r = (t += "").length, i = 0; i < r; i++)
      ((e = 31 * e + t.charCodeAt(n++)) > 0x7fffffffffff ||
        e < -0x800000000000) &&
        (e &= 0xffffffffffff);
    return e < 0 && (e += 0x7ffffffffffff), e;
  },
  wzt = function () {
    return (
      B1e().replace(/-/g, "") +
      "." +
      Date.now() +
      "." +
      Azt(B1e().replace(/-/g, ""))
    );
  },
  gl = {
    Hls: "hls",
    LLHls: "ll-hls",
    Flv: "flv",
    Rtm: "rtm",
    LLFlv: "ll-flv",
    Dash: "dash",
  },
  aBe =
    (bn((g3 = {}), "widevine", "com.widevine.alpha"),
    bn(g3, "playready", "com.microsoft.playready"),
    bn(g3, "fairplay", "com.apple.fps"),
    g3),
  kzt = Oh.isMMSSupported,
  Izt = Oh.isMseSupported;
function oBe() {
  return Na.os.isIos;
}
function sBe() {
  var t =
    arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Au.H264;
  return (oBe() ? kzt : Izt)(t);
}
var lBe = (function (t) {
    return (t.Error = "Error"), (t.Stall = "Stall"), t;
  })(lBe || {}),
  aB = (function () {
    function t(e) {
      Wn(this, t),
        bn(this, "nextProtocol", void 0),
        bn(this, "preProtocol", void 0),
        bn(this, "protocolStrategy", void 0),
        bn(this, "_fallback", void 0),
        (this._fallback = e.fallback);
    }
    return (
      Kn(t, [
        {
          key: "_getKindFallbackStrategy",
          value: function (e) {
            var n, r, i, o, l;
            return (n =
              (r =
                (i = this._fallback) === null ||
                i === void 0 ||
                (i = i.fallbackStrategy) === null ||
                i === void 0 ||
                (i = i[this.protocolType]) === null ||
                i === void 0
                  ? void 0
                  : i[e]) !== null && r !== void 0
                ? r
                : (o = this._fallback) === null ||
                  o === void 0 ||
                  (o = o.fallbackStrategy) === null ||
                  o === void 0 ||
                  (o = o.all) === null ||
                  o === void 0
                ? void 0
                : o[e]) !== null && n !== void 0
              ? n
              : (l = this.defaultFallbackStrategy) === null || l === void 0
              ? void 0
              : l[e];
          },
        },
        {
          key: "errorFallbackStrategy",
          get: function () {
            return this._getKindFallbackStrategy("Error");
          },
        },
        {
          key: "stallFallbackStrategy",
          get: function () {
            return this._getKindFallbackStrategy("Stall");
          },
        },
        {
          key: "shouldFallbackWhenError",
          value: function (e) {
            var n, r, i, o;
            return (n = this.errorFallbackStrategy) !== null &&
              n !== void 0 &&
              n.shouldFallback
              ? (i = this.errorFallbackStrategy) === null || i === void 0
                ? void 0
                : i.shouldFallback(this.protocolType, e)
              : !(
                  (r = this.errorFallbackStrategy) === null ||
                  r === void 0 ||
                  !r.excludeList
                ) &&
                  !$a((o = this.errorFallbackStrategy.excludeList)).call(
                    o,
                    e.error.errorCode
                  );
          },
        },
      ]),
      t
    );
  })(),
  Dzt = Oh.appendSearchParams,
  uBe = (function () {
    var t = Gi(
      or().mark(function e(n) {
        var r, i, o, l, u, c, d, h, f, p, g, y, v, b, w, k, D, $, N, P, I;
        return or().wrap(function (O) {
          for (;;)
            switch ((O.prev = O.next)) {
              case 0:
                return (
                  (y =
                    n == null || (r = n.flv) === null || r === void 0
                      ? void 0
                      : r.enableLowLatency),
                  (v =
                    (i =
                      n == null ||
                      (o = n.flv) === null ||
                      o === void 0 ||
                      (o = o.lowLatency) === null ||
                      o === void 0
                        ? void 0
                        : o.enableFrameChasing) === null ||
                    i === void 0 ||
                    i),
                  (b =
                    (l =
                      n == null ||
                      (u = n.flv) === null ||
                      u === void 0 ||
                      (u = u.lowLatency) === null ||
                      u === void 0
                        ? void 0
                        : u.abrPts) !== null && l !== void 0
                      ? l
                      : "-800"),
                  (O.next = 5),
                  Wse(n)
                );
              case 5:
                return (w = O.sent), (O.next = 8), M8e(n, w);
              case 8:
                if (
                  (O.sent &&
                    ((g = w === Au.H265 ? I8e() : k8e()), (p = Fee(n))),
                  sBe(w === "unknown" ? Au.H264 : w) &&
                    (p = oBe() ? ANt(n) : Fee(n)),
                  p || g)
                ) {
                  O.next = 13;
                  break;
                }
                return O.abrupt("return", {});
              case 13:
                return (
                  (O.next = 15),
                  Ar.all([
                    ((c = p) === null || c === void 0 ? void 0 : c.module) &&
                      Nf(p.module).catch(function () {}),
                    ((d = g) === null || d === void 0 ? void 0 : d.module) &&
                      Nf(g.module).catch(function () {}),
                  ])
                );
              case 15:
                return (
                  (k = O.sent),
                  (D = hs(k, 2)),
                  ($ = D[0]),
                  (N = D[1]) != null &&
                    N.XGVideoPlugin &&
                    ((h = g) === null ||
                      h === void 0 ||
                      (f = h.afterLoad) === null ||
                      f === void 0 ||
                      f.call(h, N == null ? void 0 : N.XGVideoPlugin)),
                  (P = $8e([p, g])),
                  (I = []),
                  y && (P.url = Dzt(n.url, { abr_pts: b })),
                  $ && (I.push($.FlvPlugin), y && v && I.push($.Adaptive)),
                  O.abrupt("return", { options: P, plugins: I })
                );
              case 25:
              case "end":
                return O.stop();
            }
        }, e);
      })
    );
    return function (e) {
      return t.apply(this, arguments);
    };
  })(),
  cBe = (function (t) {
    so(o, aB);
    var e,
      n,
      r,
      i = lo(o);
    function o() {
      return Wn(this, o), i.apply(this, arguments);
    }
    return (
      Kn(
        o,
        [
          {
            key: "protocolType",
            get: function () {
              return gl.Flv;
            },
          },
          {
            key: "defaultFallbackStrategy",
            get: function () {
              return {};
            },
          },
          {
            key: "canPlay",
            value:
              ((r = Gi(
                or().mark(function l() {
                  return or().wrap(function (u) {
                    for (;;)
                      switch ((u.prev = u.next)) {
                        case 0:
                          return u.abrupt("return", { canPlay: sBe() });
                        case 1:
                        case "end":
                          return u.stop();
                      }
                  }, l);
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "shouldFallbackWhenStall",
            value: function () {
              return !1;
            },
          },
          {
            key: "getProtocolStrategy",
            value:
              ((n = Gi(
                or().mark(function l(u, c) {
                  var d;
                  return or().wrap(function (h) {
                    for (;;)
                      switch ((h.prev = h.next)) {
                        case 0:
                          return (
                            (d = c.enableSelector),
                            h.abrupt(
                              "return",
                              uBe(
                                d
                                  ? $n(
                                      $n({}, u),
                                      {},
                                      {
                                        flv: $n(
                                          $n({}, u.flv),
                                          {},
                                          { enableLowLatency: !1 }
                                        ),
                                      }
                                    )
                                  : u
                              )
                            )
                          );
                        case 2:
                        case "end":
                          return h.stop();
                      }
                  }, l);
                })
              )),
              function (l, u) {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "getAbrStrategy",
            value:
              ((e = Gi(
                or().mark(function l(u) {
                  var c, d, h, f;
                  return or().wrap(function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (
                            (h =
                              u == null || (c = u.flv) === null || c === void 0
                                ? void 0
                                : c.abr)
                          ) {
                            p.next = 3;
                            break;
                          }
                          return p.abrupt("return", {});
                        case 3:
                          return (
                            (p.next = 5), Nf(Os.PluginAbr).catch(function () {})
                          );
                        case 5:
                          return (
                            (f = p.sent),
                            p.abrupt("return", {
                              options: {
                                abr: $n(
                                  $n({}, h),
                                  {},
                                  {
                                    open:
                                      (d = h.enable) === null ||
                                      d === void 0 ||
                                      d,
                                  }
                                ),
                              },
                              plugins: [f == null ? void 0 : f.AbrPlugin],
                            })
                          );
                        case 7:
                        case "end":
                          return p.stop();
                      }
                  }, l);
                })
              )),
              function (l) {
                return e.apply(this, arguments);
              }),
          },
          { key: "getDrmStrategy", value: function () {} },
          { key: "getVeStrategy", value: function () {} },
          { key: "updateDrmConfig", value: function () {} },
        ],
        [
          {
            key: "suffix",
            get: function () {
              return ".flv";
            },
          },
          {
            key: "generateUrl",
            value: function (l, u) {
              var c,
                d = u.generateUrlFromOtherProtocol;
              return (c = l[gl.Flv]) !== null && c !== void 0 ? c : d();
            },
          },
          {
            key: "canGenerateOtherProtocol",
            value: function () {
              return !0;
            },
          },
        ]
      ),
      o
    );
  })(),
  Pzt = (function (t) {
    so(r, cBe);
    var e,
      n = lo(r);
    function r() {
      return Wn(this, r), n.apply(this, arguments);
    }
    return (
      Kn(r, [
        {
          key: "protocolType",
          get: function () {
            return gl.LLFlv;
          },
        },
        {
          key: "getProtocolStrategy",
          value:
            ((e = Gi(
              or().mark(function i(o) {
                return or().wrap(function (l) {
                  for (;;)
                    switch ((l.prev = l.next)) {
                      case 0:
                        return l.abrupt(
                          "return",
                          uBe(
                            $n(
                              $n({}, o),
                              {},
                              {
                                flv: $n(
                                  $n({}, o.flv),
                                  {},
                                  { enableLowLatency: !0 }
                                ),
                              }
                            )
                          )
                        );
                      case 1:
                      case "end":
                        return l.stop();
                    }
                }, i);
              })
            )),
            function (i) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      r
    );
  })();
function dBe(t) {
  var e;
  return (
    (t == null || (e = t.drm) === null || e === void 0 ? void 0 : e.fairplay) &&
    (Na.browser === "safari" || Na.os.isIos)
  );
}
function Mzt(t) {
  var e, n;
  return (
    !dBe(t) &&
    (Na.device !== "mobile" ||
      (e =
        t == null || (n = t.hls) === null || n === void 0
          ? void 0
          : n.enableMSE) === null ||
      e === void 0 ||
      e)
  );
}
function hBe(t) {
  var e, n;
  return (
    (e = (n = t.hls) === null || n === void 0 ? void 0 : n.enableHlsJs) ===
      null ||
    e === void 0 ||
    e
  );
}
function V1e(t) {
  var e = {};
  for (var n in t)
    if (t.hasOwnProperty(n)) {
      var r = aBe[n],
        i = t[n];
      r &&
        i &&
        (e[r] = {
          licenseUrl: i == null ? void 0 : i.serverProcessSPCPath,
          serverCertificateUrl: i == null ? void 0 : i.serverCertificatePath,
        });
    }
  return { emeEnabled: !0, drmSystems: e };
}
var Czt = Oh.isMseSupported,
  fBe = (function () {
    var t = Gi(
      or().mark(function e(n) {
        var r, i, o, l, u, c, d, h, f, p, g, y, v, b;
        return or().wrap(function (w) {
          for (;;)
            switch ((w.prev = w.next)) {
              case 0:
                return (w.next = 2), Wse(n);
              case 2:
                return (d = w.sent), (w.next = 5), M8e(n, d);
              case 5:
                if (
                  ((h = w.sent),
                  (f = hBe(n)),
                  h && ((c = d === Au.H265 ? I8e() : k8e()), (u = Uee(n, f))),
                  Mzt(n) &&
                    Czt(d === "unknown" ? Au.H264 : d) &&
                    (u = Uee(n, f)),
                  u || c)
                ) {
                  w.next = 11;
                  break;
                }
                return w.abrupt("return", {});
              case 11:
                return (
                  (w.next = 13),
                  Ar.all([
                    ((r = u) === null || r === void 0 ? void 0 : r.module) &&
                      Nf(u.module).catch(function () {}),
                    ((i = c) === null || i === void 0 ? void 0 : i.module) &&
                      Nf(c.module).catch(function () {}),
                  ])
                );
              case 13:
                return (
                  (p = w.sent),
                  (g = hs(p, 2)),
                  (y = g[0]),
                  (v = g[1]) != null &&
                    v.XGVideoPlugin &&
                    ((o = c) === null ||
                      o === void 0 ||
                      (l = o.afterLoad) === null ||
                      l === void 0 ||
                      l.call(o, v == null ? void 0 : v.XGVideoPlugin)),
                  (b = $8e([u, c])),
                  w.abrupt("return", {
                    options: b,
                    plugins: y != null && y.HlsPlugin ? [y.HlsPlugin] : [],
                  })
                );
              case 20:
              case "end":
                return w.stop();
            }
        }, e);
      })
    );
    return function (e) {
      return t.apply(this, arguments);
    };
  })();
function $zt(t) {
  return typeof t == "string" ? nE(t) : t.type ? t.type : nE(t.url);
}
function z1e(t, e, n) {
  t[e] || (t[e] = []), t[e].push(n);
}
function xzt(t) {
  return ga(t).call(
    t,
    function (e, n) {
      var r,
        i,
        o = ga((r = n.definitions)).call(
          r,
          function (l, u) {
            return z1e(l, $zt(u), u), l;
          },
          {}
        );
      return (
        On((i = Dn(o))).call(i, function (l) {
          z1e(e, l, $n($n({}, n), {}, { definitions: o[l] }));
        }),
        e
      );
    },
    {}
  );
}
function Lzt(t, e, n) {
  return pBe(t, function (r) {
    return r.replace(e, n);
  });
}
function pBe(t, e) {
  var n = [];
  return (
    t == null ||
      t.forEach(function (r) {
        var i = [];
        r.definitions.forEach(function (o) {
          var l;
          typeof o == "string"
            ? i.push(e(o))
            : i.push(
                $n(
                  $n({}, o),
                  {},
                  {
                    url: e(o.url),
                    fallbackUrls:
                      (l = o.fallbackUrls) === null || l === void 0
                        ? void 0
                        : On(l).call(l, function (u) {
                            return e(u);
                          }),
                  }
                )
              );
        }),
          n.push($n($n({}, r), {}, { definitions: i }));
      }),
    n
  );
}
var gBe = (function (t) {
    so(u, aB);
    var e,
      n,
      r,
      i,
      o,
      l = lo(u);
    function u() {
      return Wn(this, u), l.apply(this, arguments);
    }
    return (
      Kn(
        u,
        [
          {
            key: "protocolType",
            get: function () {
              return gl.Hls;
            },
          },
          {
            key: "defaultFallbackStrategy",
            get: function () {
              return {};
            },
          },
          {
            key: "canPlay",
            value:
              ((o = Gi(
                or().mark(function c() {
                  return or().wrap(function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return d.abrupt("return", { canPlay: !0 });
                        case 1:
                        case "end":
                          return d.stop();
                      }
                  }, c);
                })
              )),
              function () {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "shouldFallbackWhenStall",
            value: function () {
              return !1;
            },
          },
          {
            key: "getProtocolStrategy",
            value:
              ((i = Gi(
                or().mark(function c(d) {
                  return or().wrap(function (h) {
                    for (;;)
                      switch ((h.prev = h.next)) {
                        case 0:
                          return h.abrupt("return", fBe(d));
                        case 1:
                        case "end":
                          return h.stop();
                      }
                  }, c);
                })
              )),
              function (c) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "getAbrStrategy",
            value:
              ((r = Gi(
                or().mark(function c(d) {
                  var h, f, p, g;
                  return or().wrap(function (y) {
                    for (;;)
                      switch ((y.prev = y.next)) {
                        case 0:
                          if (
                            (p =
                              d == null || (h = d.hls) === null || h === void 0
                                ? void 0
                                : h.abr)
                          ) {
                            y.next = 3;
                            break;
                          }
                          return y.abrupt("return", {});
                        case 3:
                          return (
                            (y.next = 5), Nf(Os.PluginAbr).catch(function () {})
                          );
                        case 5:
                          return (
                            (g = y.sent),
                            y.abrupt("return", {
                              options: {
                                hlsabr: $n(
                                  $n({}, p),
                                  {},
                                  {
                                    open:
                                      (f = p.enable) === null ||
                                      f === void 0 ||
                                      f,
                                  }
                                ),
                              },
                              plugins: [g == null ? void 0 : g.HlsAbrPlugin],
                            })
                          );
                        case 7:
                        case "end":
                          return y.stop();
                      }
                  }, c);
                })
              )),
              function (c) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "updateDrmConfig",
            value:
              ((n = Gi(
                or().mark(function c(d, h) {
                  var f, p, g, y;
                  return or().wrap(function (v) {
                    for (;;)
                      switch ((v.prev = v.next)) {
                        case 0:
                          if (d) {
                            v.next = 2;
                            break;
                          }
                          return v.abrupt("return");
                        case 2:
                          if (
                            ((g =
                              h == null ||
                              (f = h._player) === null ||
                              f === void 0 ||
                              (f = f.plugins) === null ||
                              f === void 0
                                ? void 0
                                : f.drm),
                            (y =
                              h == null ||
                              (p = h._player) === null ||
                              p === void 0 ||
                              (p = p.plugins) === null ||
                              p === void 0
                                ? void 0
                                : p.hls),
                            !g)
                          ) {
                            v.next = 9;
                            break;
                          }
                          return (
                            g.restart(), v.abrupt("return", g.updateConfig(d))
                          );
                        case 9:
                          y && (y.config = $n($n({}, y.config), V1e(d)));
                        case 10:
                        case "end":
                          return v.stop();
                      }
                  }, c);
                })
              )),
              function (c, d) {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "getDrmStrategy",
            value:
              ((e = Gi(
                or().mark(function c(d, h) {
                  var f, p, g, y;
                  return or().wrap(
                    function (v) {
                      for (;;)
                        switch ((v.prev = v.next)) {
                          case 0:
                            if (
                              ((f = h.player), (v.prev = 1), d != null && d.drm)
                            ) {
                              v.next = 4;
                              break;
                            }
                            return v.abrupt("return", {
                              options: {},
                              plugins: [],
                            });
                          case 4:
                            if (
                              ((g =
                                (p = d == null ? void 0 : d.drm) !== null &&
                                p !== void 0
                                  ? p
                                  : {}),
                              dBe(d) || !hBe(d))
                            ) {
                              v.next = 7;
                              break;
                            }
                            return v.abrupt("return", {
                              options: { hls: $n($n({}, d.hls), V1e(g)) },
                              plugins: [],
                            });
                          case 7:
                            return (
                              (v.next = 9),
                              Nf(Os.PluginDrm)
                                .then(function (b) {
                                  return b.DrmPlugin;
                                })
                                .catch(function () {})
                            );
                          case 9:
                            if (((y = v.sent), (v.t0 = g), !v.t0)) {
                              v.next = 14;
                              break;
                            }
                            return (
                              (v.next = 14),
                              f == null ? void 0 : f.updateDrmConfig(g)
                            );
                          case 14:
                            return v.abrupt("return", {
                              options: { drm: g },
                              plugins: y ? [y] : [],
                            });
                          case 17:
                            (v.prev = 17),
                              (v.t1 = v.catch(1)),
                              console.log(v.t1);
                          case 20:
                            return v.abrupt("return", {});
                          case 21:
                          case "end":
                            return v.stop();
                        }
                    },
                    c,
                    null,
                    [[1, 17]]
                  );
                })
              )),
              function (c, d) {
                return e.apply(this, arguments);
              }),
          },
          { key: "getVeStrategy", value: function () {} },
        ],
        [
          {
            key: "suffix",
            get: function () {
              return ".m3u8";
            },
          },
          {
            key: "canGenerateOtherProtocol",
            value: function () {
              return !0;
            },
          },
          {
            key: "generateUrl",
            value: function (c, d) {
              var h = d.generateUrlFromOtherProtocol;
              return c[gl.Hls]
                ? c[gl.Hls]
                : c[gl.LLHls]
                ? pBe(c[gl.LLHls], function (f) {
                    return Oh.appendSearchParams(f, { fpkey_normal_hls: "1" });
                  })
                : h();
            },
          },
        ]
      ),
      u
    );
  })(),
  Ozt = (function (t) {
    so(i, gBe);
    var e,
      n,
      r = lo(i);
    function i() {
      return Wn(this, i), r.apply(this, arguments);
    }
    return (
      Kn(
        i,
        [
          {
            key: "protocolType",
            get: function () {
              return gl.LLHls;
            },
          },
          {
            key: "defaultFallbackStrategy",
            get: function () {
              return {};
            },
          },
          {
            key: "canPlay",
            value:
              ((n = Gi(
                or().mark(function o() {
                  return or().wrap(function (l) {
                    for (;;)
                      switch ((l.prev = l.next)) {
                        case 0:
                          return l.abrupt("return", { canPlay: !0 });
                        case 1:
                        case "end":
                          return l.stop();
                      }
                  }, o);
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "shouldFallbackWhenStall",
            value: function () {
              return !1;
            },
          },
          {
            key: "getProtocolStrategy",
            value:
              ((e = Gi(
                or().mark(function o(l) {
                  return or().wrap(function (u) {
                    for (;;)
                      switch ((u.prev = u.next)) {
                        case 0:
                          return u.abrupt("return", fBe(l));
                        case 1:
                        case "end":
                          return u.stop();
                      }
                  }, o);
                })
              )),
              function (o) {
                return e.apply(this, arguments);
              }),
          },
          { key: "getVeStrategy", value: function () {} },
        ],
        [
          {
            key: "suffix",
            get: function () {
              return ".m3u8";
            },
          },
          {
            key: "generateUrl",
            value: function (o) {
              return o[gl.LLHls];
            },
          },
          {
            key: "canGenerateOtherProtocol",
            value: function () {
              return !0;
            },
          },
        ]
      ),
      i
    );
  })();
function mBe() {
  return yBe.apply(this, arguments);
}
function yBe() {
  return (yBe = Gi(
    or().mark(function t() {
      var e, n;
      return or().wrap(function (r) {
        for (;;)
          switch ((r.prev = r.next)) {
            case 0:
              return (r.next = 2), Nf(Os.PluginRtm);
            case 2:
              return (
                (e = r.sent),
                (n = e.RtmPlugin),
                r.abrupt("return", n.isSupported())
              );
            case 5:
            case "end":
              return r.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
function vBe() {
  return tte.apply(this, arguments);
}
function tte() {
  return (
    (tte = Gi(
      or().mark(function t() {
        var e,
          n,
          r,
          i = arguments;
        return or().wrap(function (o) {
          for (;;)
            switch ((o.prev = o.next)) {
              case 0:
                return (
                  (e = i.length > 0 && i[0] !== void 0 ? i[0] : nne.H264),
                  (o.next = 3),
                  Nf(Os.PluginRtm)
                );
              case 3:
                if (((n = o.sent), (r = n.RtmPlugin), e !== nne.H264)) {
                  o.next = 7;
                  break;
                }
                return o.abrupt("return", r.isSupportedH264());
              case 7:
                return o.abrupt("return", !1);
              case 8:
              case "end":
                return o.stop();
            }
        }, t);
      })
    )),
    tte.apply(this, arguments)
  );
}
var Gzt = ["fallbackUrl", "enableRTMAutoTranscode"],
  Nzt = { options: {}, module: Os.PluginRtm },
  Fzt = function (t) {
    return Na.device === "pc"
      ? t.replace(".sdp", ".flv")
      : t.replace(".sdp", ".m3u8");
  },
  Uzt = (function () {
    var t = Gi(
      or().mark(function e(n, r, i) {
        var o,
          l,
          u,
          c,
          d,
          h,
          f,
          p,
          g,
          y,
          v,
          b,
          w,
          k,
          D,
          $,
          N,
          P,
          I,
          O,
          X,
          G,
          H,
          E,
          S;
        return or().wrap(function (L) {
          for (;;)
            switch ((L.prev = L.next)) {
              case 0:
                return (
                  (d = ""),
                  (h = n.url),
                  (f = n.playlist),
                  (p = n.rtm || {}),
                  (g = p.fallbackUrl),
                  (y = p.enableRTMAutoTranscode),
                  (v = nse(p, Gzt)),
                  (b = n.rtm || {}),
                  (w = b.enableFallback),
                  (k = w === void 0 || w),
                  f != null && f.length && (k = !1),
                  (D =
                    y ||
                    ((o = Use(h)) === null || o === void 0
                      ? void 0
                      : o.searchParams.get("enableRTMAutoTranscode")) ===
                      "true"),
                  k &&
                    (g
                      ? (d = g)
                      : D && h
                      ? (d = Fzt(h))
                      : console.warn(
                          EF(KC.EMPTY_RTM_FALLBACK_PARAMETER, i).message
                        )),
                  ($ = d && Oh.getStreamType(d)) === "flv" &&
                  Oh.isMseSupported(Au.H264)
                    ? (c = Fee(n))
                    : $ === "hls" &&
                      (Na.device !== "mobile" ||
                        (n != null &&
                          (l = n.hls) !== null &&
                          l !== void 0 &&
                          l.enableMSE)) &&
                      Oh.isMseSupported(Au.H264) &&
                      (c = Uee(n)),
                  (L.next = 11),
                  Ar.all([
                    Nf(Nzt.module)
                      .then(function (W) {
                        return W.RtmPlugin;
                      })
                      .catch(function () {}),
                    c &&
                      Nf(c.module)
                        .then(function (W) {
                          var F, oe;
                          return ((F = c) === null || F === void 0
                            ? void 0
                            : F.module) === Os.PluginFlv
                            ? W.FlvPlugin
                            : ((oe = c) === null || oe === void 0
                                ? void 0
                                : oe.module) === Os.PluginHls
                            ? W.HlsPlugin
                            : void 0;
                        })
                        .catch(function () {}),
                  ])
                );
              case 11:
                if (
                  ((N = L.sent), (P = hs(N, 2)), (I = P[0]), (O = P[1]), !d)
                ) {
                  L.next = 25;
                  break;
                }
                return (L.next = 18), Ar.all([mBe(), vBe()]);
              case 18:
                if (
                  ((X = L.sent), (G = hs(X, 2)), (H = G[0]), (E = G[1]), H && E)
                ) {
                  L.next = 25;
                  break;
                }
                return (
                  r &&
                    r.emit("degrade", {
                      url: d,
                      originRtmUrl: h,
                      code: "NOT_SUPPORT",
                      message: "not support rtm or h264",
                      isRTMSupported: H,
                      isRTMSupportCodec: E,
                    }),
                  L.abrupt("return", {
                    options: $n(
                      $n(
                        {},
                        ((S = c) === null || S === void 0
                          ? void 0
                          : S.options) || {}
                      ),
                      {},
                      {
                        url: d,
                        _RTMdegrade: {
                          _originRtmUrl: h,
                          _isRTMSupported: H,
                          _isRTMSupportCodec: E,
                        },
                      }
                    ),
                    plugins: O ? [O] : [],
                  })
                );
              case 25:
                return L.abrupt("return", {
                  options: $n(
                    $n(
                      {},
                      ((u = c) === null || u === void 0 ? void 0 : u.options) ||
                        {}
                    ),
                    {},
                    {
                      url: y
                        ? Oh.appendSearchParams(h, {
                            enableRTMAutoTranscode: "true",
                          })
                        : void 0,
                      _RTMdegrade: void 0,
                      rts: $n(
                        $n({ retryCount: 0 }, v),
                        {},
                        { backupURL: d, backupConstruct: O }
                      ),
                    }
                  ),
                  plugins: I ? [I] : [],
                });
              case 26:
              case "end":
                return L.stop();
            }
        }, e);
      })
    );
    return function (e, n, r) {
      return t.apply(this, arguments);
    };
  })(),
  Bzt = (function (t) {
    so(o, aB);
    var e,
      n,
      r,
      i = lo(o);
    function o() {
      return Wn(this, o), i.apply(this, arguments);
    }
    return (
      Kn(
        o,
        [
          {
            key: "protocolType",
            get: function () {
              return gl.Rtm;
            },
          },
          {
            key: "defaultFallbackStrategy",
            get: function () {
              return bn({}, lBe.Error, {
                shouldFallback: function () {
                  return !0;
                },
              });
            },
          },
          {
            key: "canPlay",
            value:
              ((r = Gi(
                or().mark(function l() {
                  var u, c, d, h;
                  return or().wrap(function (f) {
                    for (;;)
                      switch ((f.prev = f.next)) {
                        case 0:
                          return (f.next = 2), Ar.all([mBe(), vBe()]);
                        case 2:
                          return (
                            (u = f.sent),
                            (c = hs(u, 2)),
                            (d = c[0]),
                            (h = c[1]),
                            f.abrupt("return", { canPlay: d && h })
                          );
                        case 7:
                        case "end":
                          return f.stop();
                      }
                  }, l);
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "shouldFallbackWhenStall",
            value: function () {
              return !1;
            },
          },
          {
            key: "getProtocolStrategy",
            value:
              ((n = Gi(
                or().mark(function l(u, c) {
                  var d, h, f;
                  return or().wrap(
                    function (p) {
                      for (;;)
                        switch ((p.prev = p.next)) {
                          case 0:
                            return (
                              (d = c.player),
                              (h = c.i18n),
                              (f = c.enableSelector),
                              (p.next = 3),
                              Uzt(
                                f
                                  ? {
                                      options: u,
                                      rtm: $n(
                                        $n({}, u.rtm),
                                        {},
                                        { enableFallback: !1 }
                                      ),
                                    }
                                  : u,
                                d,
                                h
                              )
                            );
                          case 3:
                            return (
                              (this.protocolStrategy = p.sent),
                              p.abrupt("return", this.protocolStrategy)
                            );
                          case 5:
                          case "end":
                            return p.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function (l, u) {
                return n.apply(this, arguments);
              }),
          },
          { key: "getAbrStrategy", value: function () {} },
          { key: "getDrmStrategy", value: function () {} },
          {
            key: "getVeStrategy",
            value:
              ((e = Gi(
                or().mark(function l(u, c) {
                  var d, h, f;
                  return or().wrap(function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (
                            ((h = c.veStrategyManager),
                            (f =
                              h == null ||
                              (d = h.rtmAdaptiveBuffer) === null ||
                              d === void 0
                                ? void 0
                                : d.getResult()))
                          ) {
                            p.next = 4;
                            break;
                          }
                          return p.abrupt("return", {
                            options: u,
                            plugins: [],
                          });
                        case 4:
                          return p.abrupt("return", {
                            options: { rts: $n({}, f) },
                            plugins: [],
                          });
                        case 5:
                        case "end":
                          return p.stop();
                      }
                  }, l);
                })
              )),
              function (l, u) {
                return e.apply(this, arguments);
              }),
          },
          { key: "updateDrmConfig", value: function () {} },
        ],
        [
          {
            key: "suffix",
            get: function () {
              return ".sdp";
            },
          },
          {
            key: "canGenerateOtherProtocol",
            value: function (l) {
              var u;
              return (u = l.rtm) === null || u === void 0
                ? void 0
                : u.enableRTMAutoTranscode;
            },
          },
          {
            key: "generateUrl",
            value: function (l, u) {
              var c,
                d = u.generateUrlFromOtherProtocol,
                h = u.options;
              return l[gl.Rtm]
                ? l[gl.Rtm]
                : (c = h.rtm) !== null &&
                  c !== void 0 &&
                  c.enableRTMAutoTranscode
                ? d()
                : void console.warn(
                    "生成 rtm 地址失败。请传入 rtm 播放地址，或开启自动转码"
                  );
            },
          },
        ]
      ),
      o
    );
  })(),
  bBe = (function () {
    function t(n) {
      var r = n.queue,
        i = n.streams,
        o = n.options;
      Wn(this, t),
        bn(this, "current", void 0),
        bn(this, "_queue", void 0),
        bn(this, "_streams", void 0),
        bn(this, "_options", void 0),
        (this._queue = r),
        (this._streams = i),
        (this._options = o),
        (this.current = this._getStartProtocol());
    }
    var e;
    return (
      Kn(t, [
        {
          key: "getProtocol",
          value:
            ((e = Gi(
              or().mark(function n() {
                var r;
                return or().wrap(
                  function (i) {
                    for (;;)
                      switch ((i.prev = i.next)) {
                        case 0:
                          if (this.current) {
                            i.next = 2;
                            break;
                          }
                          return i.abrupt("return");
                        case 2:
                          return (i.next = 4), this.current.canPlay();
                        case 4:
                          if (
                            ((i.t1 = r = i.sent), (i.t0 = i.t1 !== null), !i.t0)
                          ) {
                            i.next = 8;
                            break;
                          }
                          i.t0 = r !== void 0;
                        case 8:
                          if (!i.t0) {
                            i.next = 12;
                            break;
                          }
                          (i.t2 = r), (i.next = 13);
                          break;
                        case 12:
                          i.t2 = {};
                        case 13:
                          if (!i.t2.canPlay) {
                            i.next = 17;
                            break;
                          }
                          return i.abrupt("return", this.current);
                        case 17:
                          return (
                            this.next(), i.abrupt("return", this.getProtocol())
                          );
                        case 19:
                        case "end":
                          return i.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "next",
          value: function () {
            var n;
            this.current =
              (n = this.current) === null || n === void 0
                ? void 0
                : n.nextProtocol;
          },
        },
        {
          key: "_getStartProtocol",
          value: function () {
            for (var n, r = this._queue.length - 1; r >= 0; r--) {
              var i = this._queue[r],
                o = this._streams[i];
              o && (n && ((n.preProtocol = o), (o.nextProtocol = n)), (n = o));
            }
            return n;
          },
        },
      ]),
      t
    );
  })(),
  _Be = (function (t) {
    so(n, bBe);
    var e = lo(n);
    function n(r) {
      var i = r.streams,
        o = r.options;
      return (
        Wn(this, n), e.call(this, { queue: n.queue, streams: i, options: o })
      );
    }
    return Kn(n);
  })();
bn(_Be, "queue", [gl.Rtm, gl.LLFlv, gl.Flv, gl.LLHls, gl.Hls]);
var TBe = (function (t) {
  so(n, bBe);
  var e = lo(n);
  function n(r) {
    var i,
      o = r.streams,
      l = r.options;
    return (
      Wn(this, n),
      e.call(this, {
        queue:
          (i = l.fallback) === null || i === void 0 ? void 0 : i.fallbackOrder,
        streams: o,
        options: l,
      })
    );
  }
  return Kn(n);
})();
bn(TBe, "queue", void 0);
var IF = { exports: {} };
IF.exports,
  (function (t, e) {
    var n = "__lodash_hash_undefined__",
      r = 9007199254740991,
      i = "[object Arguments]",
      o = "[object AsyncFunction]",
      l = "[object Function]",
      u = "[object GeneratorFunction]",
      c = "[object Null]",
      d = "[object Object]",
      h = "[object Proxy]",
      f = "[object Undefined]",
      p = /^\[object .+?Constructor\]$/,
      g = /^(?:0|[1-9]\d*)$/,
      y = {};
    (y["[object Float32Array]"] =
      y["[object Float64Array]"] =
      y["[object Int8Array]"] =
      y["[object Int16Array]"] =
      y["[object Int32Array]"] =
      y["[object Uint8Array]"] =
      y["[object Uint8ClampedArray]"] =
      y["[object Uint16Array]"] =
      y["[object Uint32Array]"] =
        !0),
      (y[i] =
        y["[object Array]"] =
        y["[object ArrayBuffer]"] =
        y["[object Boolean]"] =
        y["[object DataView]"] =
        y["[object Date]"] =
        y["[object Error]"] =
        y[l] =
        y["[object Map]"] =
        y["[object Number]"] =
        y[d] =
        y["[object RegExp]"] =
        y["[object Set]"] =
        y["[object String]"] =
        y["[object WeakMap]"] =
          !1);
    var v = ti(Pc) == "object" && Pc && Pc.Object === Object && Pc,
      b =
        (typeof self > "u" ? "undefined" : ti(self)) == "object" &&
        self &&
        self.Object === Object &&
        self,
      w = v || b || Function("return this")(),
      k = e && !e.nodeType && e,
      D = k && t && !t.nodeType && t,
      $ = D && D.exports === k,
      N = $ && v.process,
      P = (function () {
        try {
          var st = D && D.require && D.require("util").types;
          return st || (N && N.binding && N.binding("util"));
        } catch {}
      })(),
      I = P && P.isTypedArray,
      O,
      X,
      G,
      H = Array.prototype,
      E = Function.prototype,
      S = Object.prototype,
      L = w["__core-js_shared__"],
      W = E.toString,
      F = S.hasOwnProperty,
      oe = (O = /[^.]+$/.exec((L && hv(L) && hv(L).IE_PROTO) || ""))
        ? "Symbol(src)_1." + O
        : "",
      De = S.toString,
      Xe = W.call(Object),
      ze = RegExp(
        "^" +
          W.call(F)
            .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&")
            .replace(
              /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
              "$1.*?"
            ) +
          "$"
      ),
      ht = $ ? w.Buffer : void 0,
      gt = w.Symbol,
      pt = w.Uint8Array,
      $t = ht ? ht.allocUnsafe : void 0,
      ot =
        ((X = MI),
        (G = Object),
        function (st) {
          return X(G(st));
        }),
      tt = Object.create,
      He = S.propertyIsEnumerable,
      de = tl(H),
      ue = gt ? gt.toStringTag : void 0,
      Z = (function () {
        try {
          var st = Mt(Object, "defineProperty");
          return st({}, "", {}), st;
        } catch {}
      })(),
      ie = ht ? ht.isBuffer : void 0,
      Ne = Math.max,
      Pe = Date.now,
      kt = Mt(w, "Map"),
      Gt = Mt(Object, "create"),
      B = (function () {
        function st() {}
        return function (Xt) {
          if (!T(Xt)) return {};
          if (tt) return tt(Xt);
          st.prototype = Xt;
          var qn = new st();
          return (st.prototype = void 0), qn;
        };
      })();
    function re(st) {
      var Xt = -1,
        qn = st == null ? 0 : st.length;
      for (this.clear(); ++Xt < qn; ) {
        var cr = st[Xt];
        this.set(cr[0], cr[1]);
      }
    }
    function Ae(st) {
      var Xt = -1,
        qn = st == null ? 0 : st.length;
      for (this.clear(); ++Xt < qn; ) {
        var cr = st[Xt];
        this.set(cr[0], cr[1]);
      }
    }
    function lt(st) {
      var Xt = -1,
        qn = st == null ? 0 : st.length;
      for (this.clear(); ++Xt < qn; ) {
        var cr = st[Xt];
        this.set(cr[0], cr[1]);
      }
    }
    function Et(st) {
      var Xt = (this.__data__ = new Ae(st));
      this.size = Xt.size;
    }
    function St(st, Xt) {
      var qn = ar(st),
        cr = !qn && Sn(st),
        Ui = !qn && !cr && Gn(st),
        Je = !qn && !cr && !Ui && pr(st),
        sn = qn || cr || Ui || Je,
        Ye = sn
          ? (function (Pn, Xn) {
              for (var wn = -1, Vn = Array(Pn); ++wn < Pn; ) Vn[wn] = Xn(wn);
              return Vn;
            })(st.length, String)
          : [],
        Ct = Ye.length;
      for (var At in st)
        (!Xt && !F.call(st, At)) ||
          (sn &&
            (At == "length" ||
              (Ui && (At == "offset" || At == "parent")) ||
              (Je &&
                (At == "buffer" || At == "byteLength" || At == "byteOffset")) ||
              Wt(At, Ct))) ||
          Ye.push(At);
      return Ye;
    }
    function Lt(st, Xt, qn) {
      ((qn !== void 0 && !Qt(st[Xt], qn)) || (qn === void 0 && !(Xt in st))) &&
        Tr(st, Xt, qn);
    }
    function ln(st, Xt, qn) {
      var cr = st[Xt];
      (F.call(st, Xt) && Qt(cr, qn) && (qn !== void 0 || Xt in st)) ||
        Tr(st, Xt, qn);
    }
    function Ln(st, Xt) {
      for (var qn = st.length; qn--; ) if (Qt(st[qn][0], Xt)) return qn;
      return -1;
    }
    function Tr(st, Xt, qn) {
      Xt == "__proto__" && Z
        ? Z(st, Xt, {
            configurable: !0,
            enumerable: !0,
            value: qn,
            writable: !0,
          })
        : (st[Xt] = qn);
    }
    (re.prototype.clear = function () {
      (this.__data__ = Gt ? Gt(null) : {}), (this.size = 0);
    }),
      (re.prototype.delete = function (st) {
        var Xt = this.has(st) && delete this.__data__[st];
        return (this.size -= Xt ? 1 : 0), Xt;
      }),
      (re.prototype.get = function (st) {
        var Xt = this.__data__;
        if (Gt) {
          var qn = Xt[st];
          return qn === n ? void 0 : qn;
        }
        return F.call(Xt, st) ? Xt[st] : void 0;
      }),
      (re.prototype.has = function (st) {
        var Xt = this.__data__;
        return Gt ? Xt[st] !== void 0 : F.call(Xt, st);
      }),
      (re.prototype.set = function (st, Xt) {
        var qn = this.__data__;
        return (
          (this.size += this.has(st) ? 0 : 1),
          (qn[st] = Gt && Xt === void 0 ? n : Xt),
          this
        );
      }),
      (Ae.prototype.clear = function () {
        (this.__data__ = []), (this.size = 0);
      }),
      (Ae.prototype.delete = function (st) {
        var Xt = this.__data__,
          qn = Ln(Xt, st);
        return (
          !(qn < 0) &&
          (qn == Xt.length - 1 ? Xt.pop() : de.call(Xt, qn, 1), --this.size, !0)
        );
      }),
      (Ae.prototype.get = function (st) {
        var Xt = this.__data__,
          qn = Ln(Xt, st);
        return qn < 0 ? void 0 : Xt[qn][1];
      }),
      (Ae.prototype.has = function (st) {
        return Ln(this.__data__, st) > -1;
      }),
      (Ae.prototype.set = function (st, Xt) {
        var qn = this.__data__,
          cr = Ln(qn, st);
        return (
          cr < 0 ? (++this.size, qn.push([st, Xt])) : (qn[cr][1] = Xt), this
        );
      }),
      (lt.prototype.clear = function () {
        (this.size = 0),
          (this.__data__ = {
            hash: new re(),
            map: new (kt || Ae)(),
            string: new re(),
          });
      }),
      (lt.prototype.delete = function (st) {
        var Xt = wt(this, st).delete(st);
        return (this.size -= Xt ? 1 : 0), Xt;
      }),
      (lt.prototype.get = function (st) {
        return wt(this, st).get(st);
      }),
      (lt.prototype.has = function (st) {
        return wt(this, st).has(st);
      }),
      (lt.prototype.set = function (st, Xt) {
        var qn = wt(this, st),
          cr = qn.size;
        return qn.set(st, Xt), (this.size += qn.size == cr ? 0 : 1), this;
      }),
      (Et.prototype.clear = function () {
        (this.__data__ = new Ae()), (this.size = 0);
      }),
      (Et.prototype.delete = function (st) {
        var Xt = this.__data__,
          qn = Xt.delete(st);
        return (this.size = Xt.size), qn;
      }),
      (Et.prototype.get = function (st) {
        return this.__data__.get(st);
      }),
      (Et.prototype.has = function (st) {
        return this.__data__.has(st);
      }),
      (Et.prototype.set = function (st, Xt) {
        var qn = this.__data__;
        if (qn instanceof Ae) {
          var cr = qn.__data__;
          if (!kt || cr.length < 199)
            return cr.push([st, Xt]), (this.size = ++qn.size), this;
          qn = this.__data__ = new lt(cr);
        }
        return qn.set(st, Xt), (this.size = qn.size), this;
      });
    var sr = function (st, Xt, qn) {
      for (var cr = -1, Ui = Object(st), Je = qn(st), sn = Je.length; sn--; ) {
        var Ye = Je[++cr];
        if (Xt(Ui[Ye], Ye, Ui) === !1) break;
      }
      return st;
    };
    function hi(st) {
      return st == null
        ? st === void 0
          ? f
          : c
        : ue && ue in Object(st)
        ? (function (Xt) {
            var qn = F.call(Xt, ue),
              cr = Xt[ue];
            try {
              Xt[ue] = void 0;
              var Ui = !0;
            } catch {}
            var Je = De.call(Xt);
            return Ui && (qn ? (Xt[ue] = cr) : delete Xt[ue]), Je;
          })(st)
        : (function (Xt) {
            return De.call(Xt);
          })(st);
    }
    function Ra(st) {
      return Jn(st) && hi(st) == i;
    }
    function En(st) {
      return (
        !(
          !T(st) ||
          (function (Xt) {
            return !!oe && oe in Xt;
          })(st)
        ) &&
        (Ht(st) ? ze : p).test(
          (function (Xt) {
            if (Xt != null) {
              try {
                return W.call(Xt);
              } catch {}
              try {
                return Xt + "";
              } catch {}
            }
            return "";
          })(st)
        )
      );
    }
    function Zn(st) {
      if (!T(st))
        return (function (Ui) {
          var Je = [];
          if (Ui != null) for (var sn in Object(Ui)) Je.push(sn);
          return Je;
        })(st);
      var Xt = Ft(st),
        qn = [];
      for (var cr in st)
        (cr != "constructor" || (!Xt && F.call(st, cr))) && qn.push(cr);
      return qn;
    }
    function on(st, Xt, qn, cr, Ui) {
      st !== Xt &&
        sr(
          Xt,
          function (Je, sn) {
            if ((Ui || (Ui = new Et()), T(Je)))
              (function (Ct, At, Pn, Xn, wn, Vn, Ot) {
                var _n = un(Ct, Pn),
                  gr = un(At, Pn),
                  ut = Ot.get(gr);
                if (ut) return void Lt(Ct, Pn, ut);
                var Si = Vn ? Vn(_n, gr, Pn + "", Ct, At, Ot) : void 0,
                  cn = Si === void 0;
                if (cn) {
                  var ir = ar(gr),
                    jr = !ir && Gn(gr),
                    Yr = !ir && !jr && pr(gr);
                  (Si = gr),
                    ir || jr || Yr
                      ? ar(_n)
                        ? (Si = _n)
                        : Jn((Fr = _n)) && ye(Fr)
                        ? (Si = (function (Wr, si) {
                            var ma = -1,
                              Aa = Wr.length;
                            for (si || (si = Array(Aa)); ++ma < Aa; )
                              si[ma] = Wr[ma];
                            return si;
                          })(_n))
                        : jr
                        ? ((cn = !1),
                          (Si = (function (Wr, si) {
                            if (si) return jn(Wr).call(Wr);
                            var ma = Wr.length,
                              Aa = $t ? $t(ma) : new Wr.constructor(ma);
                            return Wr.copy(Aa), Aa;
                          })(gr, !0)))
                        : Yr
                        ? ((cn = !1),
                          (Qi = gr),
                          (Wa =
                            ((Ni = Qi.buffer),
                            (ka = new Ni.constructor(Ni.byteLength)),
                            new pt(ka).set(new pt(Ni)),
                            ka)),
                          (Si = new Qi.constructor(
                            Wa,
                            Qi.byteOffset,
                            Qi.length
                          )))
                        : (Si = [])
                      : (function (Wr) {
                          if (!Jn(Wr) || hi(Wr) != d) return !1;
                          var si = ot(Wr);
                          if (si === null) return !0;
                          var ma = F.call(si, "constructor") && si.constructor;
                          return (
                            typeof ma == "function" &&
                            ma instanceof ma &&
                            W.call(ma) == Xe
                          );
                        })(gr) || Sn(gr)
                      ? ((Si = _n),
                        Sn(_n)
                          ? (Si = (function (Wr) {
                              return (function (si, ma, Aa, Sl) {
                                var Ki = !Aa;
                                Aa || (Aa = {});
                                for (var Ro = -1, Xo = ma.length; ++Ro < Xo; ) {
                                  var Ns = ma[Ro],
                                    Gu = Sl
                                      ? Sl(Aa[Ns], si[Ns], Ns, Aa, si)
                                      : void 0;
                                  Gu === void 0 && (Gu = si[Ns]),
                                    Ki ? Tr(Aa, Ns, Gu) : ln(Aa, Ns, Gu);
                                }
                                return Aa;
                              })(Wr, Ut(Wr));
                            })(_n))
                          : (T(_n) && !Ht(_n)) ||
                            (Si = (function (Wr) {
                              return typeof Wr.constructor != "function" ||
                                Ft(Wr)
                                ? {}
                                : B(ot(Wr));
                            })(gr)))
                      : (cn = !1);
                }
                var Qi, Wa, Ni, ka, Fr;
                cn && (Ot.set(gr, Si), wn(Si, gr, Xn, Vn, Ot), Ot.delete(gr)),
                  Lt(Ct, Pn, Si);
              })(st, Xt, sn, qn, on, cr, Ui);
            else {
              var Ye = cr ? cr(un(st, sn), Je, sn + "", st, Xt, Ui) : void 0;
              Ye === void 0 && (Ye = Je), Lt(st, sn, Ye);
            }
          },
          Ut
        );
    }
    function rn(st, Xt) {
      return Yt(
        (function (qn, cr, Ui) {
          return (
            (cr = Ne(cr === void 0 ? qn.length - 1 : cr, 0)),
            function () {
              for (
                var Je = arguments,
                  sn = -1,
                  Ye = Ne(Je.length - cr, 0),
                  Ct = Array(Ye);
                ++sn < Ye;

              )
                Ct[sn] = Je[cr + sn];
              sn = -1;
              for (var At = Array(cr + 1); ++sn < cr; ) At[sn] = Je[sn];
              return (
                (At[cr] = Ui(Ct)),
                (function (Pn, Xn, wn) {
                  switch (wn.length) {
                    case 0:
                      return Pn.call(Xn);
                    case 1:
                      return Pn.call(Xn, wn[0]);
                    case 2:
                      return Pn.call(Xn, wn[0], wn[1]);
                    case 3:
                      return Pn.call(Xn, wn[0], wn[1], wn[2]);
                  }
                  return Pn.apply(Xn, wn);
                })(qn, this, At)
              );
            }
          );
        })(st, Xt, vn),
        st + ""
      );
    }
    var It = Z
      ? function (st, Xt) {
          return Z(st, "toString", {
            configurable: !0,
            enumerable: !1,
            value:
              ((qn = Xt),
              function () {
                return qn;
              }),
            writable: !0,
          });
          var qn;
        }
      : vn;
    function wt(st, Xt) {
      var qn,
        cr,
        Ui = st.__data__;
      return (
        (cr = ti((qn = Xt))) == "string" ||
        cr == "number" ||
        cr == "symbol" ||
        cr == "boolean"
          ? qn !== "__proto__"
          : qn === null
      )
        ? Ui[typeof Xt == "string" ? "string" : "hash"]
        : On(Ui);
    }
    function Mt(st, Xt) {
      var qn = (function (cr, Ui) {
        return cr == null ? void 0 : cr[Ui];
      })(st, Xt);
      return En(qn) ? qn : void 0;
    }
    function Wt(st, Xt) {
      var qn = ti(st);
      return (
        !!(Xt = Xt ?? r) &&
        (qn == "number" || (qn != "symbol" && g.test(st))) &&
        st > -1 &&
        st % 1 == 0 &&
        st < Xt
      );
    }
    function Ft(st) {
      var Xt = st && st.constructor;
      return st === ((typeof Xt == "function" && Xt.prototype) || S);
    }
    function un(st, Xt) {
      if (
        (Xt !== "constructor" || typeof st[Xt] != "function") &&
        Xt != "__proto__"
      )
        return st[Xt];
    }
    var Yt = (function (st) {
      var Xt = 0,
        qn = 0;
      return function () {
        var cr = Pe(),
          Ui = 16 - (cr - qn);
        if (((qn = cr), Ui > 0)) {
          if (++Xt >= 800) return arguments[0];
        } else Xt = 0;
        return st.apply(void 0, arguments);
      };
    })(It);
    function Qt(st, Xt) {
      return st === Xt || (st != st && Xt != Xt);
    }
    var Sn = Ra(
        (function () {
          return arguments;
        })()
      )
        ? Ra
        : function (st) {
            return Jn(st) && F.call(st, "callee") && !He.call(st, "callee");
          },
      ar = Array.isArray;
    function ye(st) {
      return st != null && yr(st.length) && !Ht(st);
    }
    var Gn =
      ie ||
      function () {
        return !1;
      };
    function Ht(st) {
      if (!T(st)) return !1;
      var Xt = hi(st);
      return Xt == l || Xt == u || Xt == o || Xt == h;
    }
    function yr(st) {
      return typeof st == "number" && st > -1 && st % 1 == 0 && st <= r;
    }
    function T(st) {
      var Xt = ti(st);
      return st != null && (Xt == "object" || Xt == "function");
    }
    function Jn(st) {
      return st != null && ti(st) == "object";
    }
    var pr = I
      ? (function (st) {
          return function (Xt) {
            return st(Xt);
          };
        })(I)
      : function (st) {
          return Jn(st) && yr(st.length) && !!y[hi(st)];
        };
    function Ut(st) {
      return ye(st) ? St(st, !0) : Zn(st);
    }
    var Dt,
      Kt =
        ((Dt = function (st, Xt, qn) {
          on(st, Xt, qn);
        }),
        rn(function (st, Xt) {
          var qn = -1,
            cr = Xt.length,
            Ui = cr > 1 ? Xt[cr - 1] : void 0,
            Je = cr > 2 ? Xt[2] : void 0;
          for (
            Ui = Dt.length > 3 && typeof Ui == "function" ? (cr--, Ui) : void 0,
              Je &&
                (function (Ye, Ct, At) {
                  if (!T(At)) return !1;
                  var Pn = ti(Ct);
                  return (
                    !!(Pn == "number"
                      ? ye(At) && Wt(Ct, At.length)
                      : Pn == "string" && (Ct in At)) && Qt(At[Ct], Ye)
                  );
                })(Xt[0], Xt[1], Je) &&
                ((Ui = cr < 3 ? void 0 : Ui), (cr = 1)),
              st = Object(st);
            ++qn < cr;

          ) {
            var sn = Xt[qn];
            sn && Dt(st, sn, qn, Ui);
          }
          return st;
        }));
    function vn(st) {
      return st;
    }
    t.exports = Kt;
  })(IF, IF.exports);
var Hzt = IF.exports,
  Xzt = xr(Hzt),
  Vzt = function () {
    return { options: {}, module: Os.PluginDashJs };
  };
function zzt() {
  var t =
    arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Au.H264;
  return h8e(t) || c8e(t);
}
var k2,
  jzt = (function (t) {
    so(o, aB);
    var e,
      n,
      r,
      i = lo(o);
    function o() {
      return Wn(this, o), i.apply(this, arguments);
    }
    return (
      Kn(
        o,
        [
          {
            key: "protocolType",
            get: function () {
              return gl.Dash;
            },
          },
          {
            key: "defaultFallbackStrategy",
            get: function () {
              return {};
            },
          },
          {
            key: "canPlay",
            value:
              ((r = Gi(
                or().mark(function l() {
                  return or().wrap(function (u) {
                    for (;;)
                      switch ((u.prev = u.next)) {
                        case 0:
                          return u.abrupt("return", { canPlay: zzt() });
                        case 1:
                        case "end":
                          return u.stop();
                      }
                  }, l);
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "shouldFallbackWhenStall",
            value: function () {
              return !1;
            },
          },
          {
            key: "getProtocolStrategy",
            value:
              ((n = Gi(
                or().mark(function l(u) {
                  var c, d;
                  return or().wrap(function (h) {
                    for (;;)
                      switch ((h.prev = h.next)) {
                        case 0:
                          if ((c = Vzt())) {
                            h.next = 3;
                            break;
                          }
                          return h.abrupt("return", {});
                        case 3:
                          return (
                            (h.next = 5),
                            (c == null ? void 0 : c.module) &&
                              Nf(c.module).catch(function () {})
                          );
                        case 5:
                          return (
                            (d = h.sent),
                            h.abrupt("return", {
                              options: c.options,
                              plugins:
                                d != null && d.DashPlugin ? [d.DashPlugin] : [],
                            })
                          );
                        case 7:
                        case "end":
                          return h.stop();
                      }
                  }, l);
                })
              )),
              function (l) {
                return n.apply(this, arguments);
              }),
          },
          { key: "getAbrStrategy", value: function () {} },
          { key: "getVeStrategy", value: function () {} },
          {
            key: "getDrmStrategy",
            value:
              ((e = Gi(
                or().mark(function l(u) {
                  var c;
                  return or().wrap(
                    function (d) {
                      for (;;)
                        switch ((d.prev = d.next)) {
                          case 0:
                            if (u != null && u.drm) {
                              d.next = 2;
                              break;
                            }
                            return d.abrupt("return", {});
                          case 2:
                            return (
                              (c = this._generateDashDrmConfig(u.drm)),
                              d.abrupt("return", {
                                options: {
                                  dash: $n($n({}, u.dash), {}, { protData: c }),
                                },
                                plugins: [],
                              })
                            );
                          case 4:
                          case "end":
                            return d.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function (l) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "updateDrmConfig",
            value: function (l, u) {
              var c;
              if (l) {
                var d = this._generateDashDrmConfig(l),
                  h =
                    u == null ||
                    (c = u._player) === null ||
                    c === void 0 ||
                    (c = c.plugins) === null ||
                    c === void 0
                      ? void 0
                      : c.dash;
                h && (h.protData = d);
              }
            },
          },
          {
            key: "_generateDashDrmConfig",
            value: function (l) {
              var u;
              return ga((u = Dn(l))).call(
                u,
                function (c, d) {
                  var h,
                    f = aBe[d];
                  return (
                    f &&
                      (c[f] = {
                        serverURL:
                          l == null || (h = l[d]) === null || h === void 0
                            ? void 0
                            : h.serverProcessSPCPath,
                      }),
                    c
                  );
                },
                {}
              );
            },
          },
        ],
        [
          {
            key: "suffix",
            get: function () {
              return ".mpd";
            },
          },
          {
            key: "canGenerateOtherProtocol",
            value: function () {
              return !0;
            },
          },
          {
            key: "generateUrl",
            value: function (l, u) {
              var c,
                d = u.generateUrlFromOtherProtocol;
              return (c = l[gl.Dash]) !== null && c !== void 0 ? c : d();
            },
          },
        ]
      ),
      o
    );
  })(),
  EBe = (function () {
    function t(l) {
      Wn(this, t),
        bn(this, "_options", void 0),
        bn(this, "_selector", void 0),
        bn(this, "_protocol", void 0),
        bn(this, "_playlistMap", {}),
        (this._options = l),
        this._init({ url: l.url, playlist: l.playlist });
    }
    var e, n, r, i, o;
    return (
      Kn(
        t,
        [
          {
            key: "enableSelector",
            get: function () {
              return !!this._selector;
            },
          },
          {
            key: "protocol",
            get: function () {
              return this._protocol;
            },
          },
          {
            key: "playlist",
            get: function () {
              var l;
              return (l = this._protocol) !== null &&
                l !== void 0 &&
                l.protocolType &&
                this._playlistMap
                ? this._playlistMap[this._protocol.protocolType]
                : void 0;
            },
          },
          {
            key: "getProtocol",
            value:
              ((o = Gi(
                or().mark(function l() {
                  return or().wrap(
                    function (u) {
                      for (;;)
                        switch ((u.prev = u.next)) {
                          case 0:
                            if (!this._selector) {
                              u.next = 4;
                              break;
                            }
                            return (u.next = 3), this._selector.getProtocol();
                          case 3:
                            this._protocol = u.sent;
                          case 4:
                            return u.abrupt("return", this._protocol);
                          case 5:
                          case "end":
                            return u.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function () {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "update",
            value:
              ((i = Gi(
                or().mark(function l(u) {
                  var c, d;
                  return or().wrap(
                    function (h) {
                      for (;;)
                        switch ((h.prev = h.next)) {
                          case 0:
                            return (
                              (c = u.url),
                              (d = u.playlist),
                              (this._options = $n(
                                $n({}, this._options),
                                {},
                                { url: c, playlist: d }
                              )),
                              this._init({ url: c, playlist: d }),
                              (h.next = 5),
                              this.getProtocol()
                            );
                          case 5:
                          case "end":
                            return h.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function (l) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "next",
            value:
              ((r = Gi(
                or().mark(function l() {
                  return or().wrap(
                    function (u) {
                      for (;;)
                        switch ((u.prev = u.next)) {
                          case 0:
                            if (this._selector) {
                              u.next = 2;
                              break;
                            }
                            return u.abrupt("return");
                          case 2:
                            return (
                              this._selector.next(),
                              (u.next = 5),
                              this.getProtocol()
                            );
                          case 5:
                            return u.abrupt("return", this._protocol);
                          case 6:
                          case "end":
                            return u.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "getStrategy",
            value:
              ((n = Gi(
                or().mark(function l(u, c, d) {
                  var h,
                    f,
                    p,
                    g,
                    y,
                    v,
                    b,
                    w,
                    k,
                    D,
                    $,
                    N,
                    P,
                    I,
                    O,
                    X,
                    G,
                    H,
                    E,
                    S,
                    L,
                    W,
                    F,
                    oe;
                  return or().wrap(
                    function (De) {
                      for (;;)
                        switch ((De.prev = De.next)) {
                          case 0:
                            return (
                              (v = this._protocol),
                              (De.next = 3),
                              Ar.all([
                                v == null
                                  ? void 0
                                  : v.getProtocolStrategy(this._options, {
                                      player: u,
                                      i18n: c,
                                      enableSelector: !!this._selector,
                                    }),
                                v == null ||
                                (h = v.getDrmStrategy) === null ||
                                h === void 0
                                  ? void 0
                                  : h.call(v, this._options, { player: u }),
                                v == null ||
                                (f = v.getAbrStrategy) === null ||
                                f === void 0
                                  ? void 0
                                  : f.call(v, this._options),
                                v == null ||
                                (p = v.getVeStrategy) === null ||
                                p === void 0
                                  ? void 0
                                  : p.call(v, this._options, {
                                      veStrategyManager: d,
                                    }),
                              ])
                            );
                          case 3:
                            return (
                              (b = De.sent),
                              (w = hs(b, 4)),
                              (k = w[0]),
                              (D = w[1]),
                              ($ = w[2]),
                              (N = w[3]),
                              (I = (P = k ?? {}).options),
                              (O = P.plugins),
                              (G = (X = D ?? {}).options),
                              (H = X.plugins),
                              (S = (E = $ ?? {}).options),
                              (L = E.plugins),
                              (F = (W = N ?? {}).options),
                              (oe = W.plugins),
                              De.abrupt("return", {
                                options: Xzt(I, G, S, F),
                                plugins: Ce((g = [])).call(
                                  g,
                                  Cf(O ?? []),
                                  Cf(H ?? []),
                                  Cf(L ?? []),
                                  Cf(oe ?? [])
                                ),
                                useSrc: !(
                                  k != null &&
                                  (y = k.plugins) !== null &&
                                  y !== void 0 &&
                                  y.length
                                ),
                                protocol: v == null ? void 0 : v.protocolType,
                              })
                            );
                          case 14:
                          case "end":
                            return De.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function (l, u, c) {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_init",
            value: function (l) {
              var u = l.url,
                c = l.playlist;
              if (c) {
                var d,
                  h,
                  f = xzt(c),
                  p = this._options.latencyMode === "low" ? _Be : TBe,
                  g =
                    (d = p == null ? void 0 : p.queue) !== null && d !== void 0
                      ? d
                      : (h = this._options.fallback) === null || h === void 0
                      ? void 0
                      : h.fallbackOrder;
                if (g != null && g.length) {
                  var y = t._generateProtocolMap(g, f, this._options),
                    v = y.protocolMap,
                    b = y.playlistMap;
                  return (
                    (this._playlistMap = b),
                    void (this._selector = new p({
                      streams: v,
                      options: this._options,
                    }))
                  );
                }
                (this._playlistMap = f), this._initSingleProtocol(Dn(f)[0]);
              } else u && this._initSingleProtocol(nE(u));
            },
          },
          {
            key: "_initSingleProtocol",
            value: function (l) {
              l && (this._protocol = new t._protocolMap[l](this._options));
            },
          },
        ],
        [
          {
            key: "create",
            value:
              ((e = Gi(
                or().mark(function l(u) {
                  var c;
                  return or().wrap(function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return (c = new t(u)), (d.next = 3), c.getProtocol();
                        case 3:
                          return d.abrupt("return", c);
                        case 4:
                        case "end":
                          return d.stop();
                      }
                  }, l);
                })
              )),
              function (l) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_generateProtocolMap",
            value: function (l, u, c) {
              var d = {},
                h = {},
                f = ji(l).call(l, function (p) {
                  return t._protocolMap[p].canGenerateOtherProtocol(c) && u[p];
                });
              return (
                l.forEach(function (p) {
                  var g,
                    y,
                    v =
                      (g =
                        (y = t._protocolMap[p]) === null || y === void 0
                          ? void 0
                          : y.generateUrl(u, {
                              generateUrlFromOtherProtocol: function () {
                                if (f)
                                  return Lzt(
                                    u[f],
                                    t._protocolMap[f].suffix,
                                    t._protocolMap[p].suffix
                                  );
                              },
                              options: c,
                            })) !== null && g !== void 0
                        ? g
                        : u[p];
                  v && ((h[p] = v), (d[p] = new t._protocolMap[p](c)));
                }),
                { protocolMap: d, playlistMap: h }
              );
            },
          },
        ]
      ),
      t
    );
  })();
bn(
  EBe,
  "_protocolMap",
  (bn((k2 = {}), gl.Flv, cBe),
  bn(k2, gl.LLFlv, Pzt),
  bn(k2, gl.Hls, gBe),
  bn(k2, gl.LLHls, Ozt),
  bn(k2, gl.Rtm, Bzt),
  bn(k2, gl.Dash, jzt),
  k2)
);
var j1e,
  Wzt = (function () {
    function t() {
      var n = this;
      Wn(this, t),
        bn(this, "player", void 0),
        bn(this, "protocolManager", void 0),
        bn(
          this,
          "beforeFallbackError",
          (function () {
            var r = Gi(
              or().mark(function i(o) {
                var l, u, c, d, h, f, p, g, y, v;
                return or().wrap(function (b) {
                  for (;;)
                    switch ((b.prev = b.next)) {
                      case 0:
                        if (
                          (l = n.protocolManager) !== null &&
                          l !== void 0 &&
                          (l = l.protocol) !== null &&
                          l !== void 0 &&
                          l.shouldFallbackWhenError({ error: o }) &&
                          (u = n.protocolManager) !== null &&
                          u !== void 0 &&
                          (u = u.protocol) !== null &&
                          u !== void 0 &&
                          u.nextProtocol
                        ) {
                          b.next = 2;
                          break;
                        }
                        return b.abrupt("return", { canEmitError: !0 });
                      case 2:
                        return (
                          (y =
                            (c = n.protocolManager) === null || c === void 0
                              ? void 0
                              : c.playlist),
                          (v = n.protocolManager.protocol),
                          (b.next = 6),
                          (d = n.protocolManager) === null || d === void 0
                            ? void 0
                            : d.next()
                        );
                      case 6:
                        if (
                          b.sent &&
                          (h = n.protocolManager) !== null &&
                          h !== void 0 &&
                          h.playlist
                        ) {
                          b.next = 9;
                          break;
                        }
                        return b.abrupt("return", { canEmitError: !0 });
                      case 9:
                        return (
                          (f = n.player) === null ||
                            f === void 0 ||
                            f.emit(gS.FALLBACK, {
                              from: { playlist: y, protocol: v.protocolType },
                              to: {
                                playlist:
                                  (p = n.protocolManager) === null ||
                                  p === void 0
                                    ? void 0
                                    : p.playlist,
                                protocol:
                                  (g = n.protocolManager) === null ||
                                  g === void 0 ||
                                  (g = g.protocol) === null ||
                                  g === void 0
                                    ? void 0
                                    : g.protocolType,
                              },
                            }),
                          n.fallback(),
                          b.abrupt("return", { canEmitError: !1 })
                        );
                      case 12:
                      case "end":
                        return b.stop();
                    }
                }, i);
              })
            );
            return function (i) {
              return r.apply(this, arguments);
            };
          })()
        );
    }
    var e;
    return (
      Kn(t, [
        {
          key: "initErrorFallback",
          value: function (n, r) {
            (this.player = n), (this.protocolManager = r);
          },
        },
        {
          key: "fallback",
          value:
            ((e = Gi(
              or().mark(function n() {
                var r, i, o, l, u, c;
                return or().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          if (
                            (r = this.protocolManager) !== null &&
                            r !== void 0 &&
                            r.playlist
                          ) {
                            d.next = 2;
                            break;
                          }
                          return d.abrupt("return");
                        case 2:
                          (u =
                            (i = this.player) === null || i === void 0
                              ? void 0
                              : i.definition),
                            (c =
                              (o = this.player) === null || o === void 0
                                ? void 0
                                : o.source),
                            (l = this.player) === null ||
                              l === void 0 ||
                              l.updatePlaylist(
                                this.protocolManager.playlist,
                                { definition: u, source: c },
                                !1
                              );
                        case 5:
                        case "end":
                          return d.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  W1e = new Wzt(),
  au = function () {
    return (au =
      Ci ||
      function (t) {
        for (var e, n = 1, r = arguments.length; n < r; n++)
          for (var i in (e = arguments[n]))
            Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
        return t;
      }).apply(this, arguments);
  };
function Kzt(t, e) {
  var n = typeof lu == "function" && hse(t);
  if (!n) return t;
  var r,
    i,
    o = n.call(t),
    l = [];
  try {
    for (; (e === void 0 || e-- > 0) && !(r = o.next()).done; ) l.push(r.value);
  } catch (u) {
    i = { error: u };
  } finally {
    try {
      r && !r.done && (n = o.return) && n.call(o);
    } finally {
      if (i) throw i.error;
    }
  }
  return l;
}
function nte() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t = Ce(t).call(t, Kzt(arguments[e]));
  return t;
}
var K1e,
  tz,
  rte,
  br,
  Zzt = (function () {
    function t() {
      (this._hooks = {}), (this._cache = []), (this._hooksCache = {});
    }
    return (
      (t.prototype.on = function (e, n) {
        e &&
          n &&
          typeof n == "function" &&
          (this._hooks[e] || (this._hooks[e] = []), this._hooks[e].push(n));
      }),
      (t.prototype.once = function (e, n) {
        var r = this;
        e &&
          n &&
          typeof n == "function" &&
          this.on(e, function i(o) {
            n(o), r.off(e, i);
          });
      }),
      (t.prototype.off = function (e, n) {
        if (e && this._hooks[e] && this._hooks[e].length)
          if (n) {
            var r,
              i,
              o = qt((r = this._hooks[e])).call(r, n);
            o !== -1 && tl((i = this._hooks[e])).call(i, o, 1);
          } else this._hooks[e] = [];
      }),
      (t.prototype.emit = function (e, n, r) {
        if (r) {
          var i;
          if (!e) return;
          qt((i = this._cache)).call(i, r) !== -1
            ? this._emit(e, n)
            : (this._hooksCache.hasOwnProperty(r) || (this._hooksCache[r] = {}),
              this._hooksCache[r].hasOwnProperty(e) ||
                (this._hooksCache[r][e] = []),
              this._hooksCache[r][e].push(n));
        } else this._emit(e, n);
      }),
      (t.prototype._emit = function (e, n) {
        e &&
          this._hooks[e] &&
          this._hooks[e].length &&
          nte(this._hooks[e]).forEach(function (r) {
            try {
              r(n);
            } catch {}
          });
      }),
      (t.prototype.set = function (e) {
        var n;
        e && qt((n = this._cache)).call(n, e) === -1 && this._cache.push(e);
      }),
      t
    );
  })(),
  Z1e = function (t) {
    return t != null && Object.prototype.toString.call(t) == "[object Object]";
  },
  Yzt =
    ((K1e =
      +Date.now() + Number(jn((j1e = "" + Math.random())).call(j1e, 2, 8))),
    function () {
      return (K1e += 1);
    }),
  Ch = function (t) {
    return (function (e, n, r) {
      if (typeof e == "string" && typeof r == "number") {
        var i,
          o = [];
        r = r <= 25 ? r : r % 25;
        var l = String.fromCharCode(r + 97);
        i = e.split(l);
        for (var u = 0; u < i.length; u++) {
          var c = _i(i[u], r);
          c = (1 * c) ^ 64;
          var d = String.fromCharCode(c);
          o.push(d);
        }
        return o.join("");
      }
    })(t, 0, 25);
  },
  Y1e = function () {
    return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
  },
  Qzt = function (t, e) {
    t === void 0 && (t = function () {}), e === void 0 && (e = 1e3);
    var n,
      r = Date.now() + e;
    return (
      (n = window.setTimeout(function i() {
        var o = Date.now() - r;
        t(), (r += e), (n = window.setTimeout(i, Math.max(0, e - o)));
      }, e)),
      function () {
        window.clearTimeout(n);
      }
    );
  },
  SBe = function (t) {
    var e = document.createElement("a");
    return (e.href = t), e;
  },
  ite = function (t) {
    var e = {};
    try {
      var n = SBe(t).search;
      if (!n) return e;
      (n = jn(n).call(n, 1)).split("&").forEach(function (r) {
        var i,
          o,
          l = r.split("=");
        l.length && ((i = l[0]), (o = l[1]));
        try {
          e[i] = decodeURIComponent(o === void 0 ? "" : o);
        } catch {
          e[i] = o;
        }
      });
    } catch {}
    return e;
  },
  Q1e = function (t) {
    for (var e = 0, n = 0, r = (t += "").length, i = 0; i < r; i++)
      ((e = 31 * e + t.charCodeAt(n++)) > 0x7fffffffffff ||
        e < -0x800000000000) &&
        (e &= 0xffffffffffff);
    return e < 0 && (e += 0x7ffffffffffff), e;
  },
  ate =
    ((function (t, e) {
      var n;
      (n = function () {
        function r() {
          for (var o = 0, l = {}; o < arguments.length; o++) {
            var u = arguments[o];
            for (var c in u) l[c] = u[c];
          }
          return l;
        }
        function i(o) {
          return o.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
        }
        return (function o(l) {
          function u() {}
          function c(h, f, p) {
            if (typeof document < "u") {
              typeof (p = r({ path: "/" }, u.defaults, p)).expires ==
                "number" &&
                (p.expires = new Date(1 * new Date() + 864e5 * p.expires)),
                (p.expires = p.expires ? p.expires.toUTCString() : "");
              try {
                var g = lr(f);
                /^[\{\[]/.test(g) && (f = g);
              } catch {}
              (f = l.write
                ? l.write(f, h)
                : encodeURIComponent(String(f)).replace(
                    /%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,
                    decodeURIComponent
                  )),
                (h = encodeURIComponent(String(h))
                  .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
                  .replace(/[\(\)]/g, escape));
              var y = "";
              for (var v in p)
                p[v] &&
                  ((y += "; " + v),
                  p[v] !== !0 && (y += "=" + p[v].split(";")[0]));
              return (document.cookie = h + "=" + f + y);
            }
          }
          function d(h, f) {
            if (typeof document < "u") {
              for (
                var p = {},
                  g = document.cookie ? document.cookie.split("; ") : [],
                  y = 0;
                y < g.length;
                y++
              ) {
                var v = g[y].split("="),
                  b = jn(v).call(v, 1).join("=");
                f || b.charAt(0) !== '"' || (b = jn(b).call(b, 1, -1));
                try {
                  var w = i(v[0]);
                  if (((b = (l.read || l)(b, w) || i(b)), f))
                    try {
                      b = JSON.parse(b);
                    } catch {}
                  if (((p[w] = b), h === w)) break;
                } catch {}
              }
              return h ? p[h] : p;
            }
          }
          return (
            (u.set = c),
            (u.get = function (h) {
              return d(h, !1);
            }),
            (u.getJSON = function (h) {
              return d(h, !0);
            }),
            (u.remove = function (h, f) {
              c(h, "", r(f, { expires: -1 }));
            }),
            (u.defaults = {}),
            (u.withConverter = o),
            u
          );
        })(function () {});
      }),
        (t.exports = n());
    })((tz = { exports: {} }), tz.exports),
    tz.exports),
  ple = function (t, e) {
    try {
      return t ? ate.get(t) : ate.get();
    } catch {
      return "";
    }
  },
  gle = function (t, e, n, r) {
    try {
      var i = r || document.domain,
        o = +new Date() + (n || 6048e5);
      ate.set(t, e, { expires: new Date(o), path: "/", domain: i });
    } catch {}
  },
  Jzt = (function () {
    function t() {
      this.cache = {};
    }
    return (
      (t.prototype.setItem = function (e, n) {
        this.cache[e] = n;
      }),
      (t.prototype.getItem = function (e) {
        return this.cache[e];
      }),
      (t.prototype.removeItem = function (e) {
        this.cache[e] = void 0;
      }),
      (t.prototype.getCookie = function (e, n) {
        return ple(e);
      }),
      (t.prototype.setCookie = function (e, n, r, i) {
        gle(e, n, r, i);
      }),
      t
    );
  })(),
  J1e = {
    getItem: function (t) {
      try {
        var e = localStorage.getItem(t),
          n = e;
        try {
          e && typeof e == "string" && (n = JSON.parse(e));
        } catch {}
        return n || {};
      } catch {}
      return {};
    },
    setItem: function (t, e) {
      try {
        var n = typeof e == "string" ? e : lr(e);
        localStorage.setItem(t, n);
      } catch {}
    },
    removeItem: function (t) {
      try {
        localStorage.removeItem(t);
      } catch {}
    },
    getCookie: function (t, e) {
      return ple(t);
    },
    setCookie: function (t, e, n, r) {
      gle(t, e, n, r);
    },
    isSupportLS: (function () {
      try {
        return (
          localStorage.setItem("_ranger-test-key", "hi"),
          localStorage.getItem("_ranger-test-key"),
          localStorage.removeItem("_ranger-test-key"),
          !0
        );
      } catch {
        return !1;
      }
    })(),
  },
  qzt = {
    getItem: function (t) {
      try {
        var e = sessionStorage.getItem(t),
          n = e;
        try {
          e && typeof e == "string" && (n = JSON.parse(e));
        } catch {}
        return n || {};
      } catch {}
      return {};
    },
    setItem: function (t, e) {
      try {
        var n = typeof e == "string" ? e : lr(e);
        sessionStorage.setItem(t, n);
      } catch {}
    },
    removeItem: function (t) {
      try {
        sessionStorage.removeItem(t);
      } catch {}
    },
    getCookie: function (t, e) {
      return ple(t);
    },
    setCookie: function (t, e, n, r) {
      gle(t, e, n, r);
    },
    isSupportSession: (function () {
      try {
        return (
          sessionStorage.setItem("_ranger-test-key", "hi"),
          sessionStorage.getItem("_ranger-test-key"),
          sessionStorage.removeItem("_ranger-test-key"),
          !0
        );
      } catch {
        return !1;
      }
    })(),
  },
  K1 = (function () {
    function t(e, n) {
      this._storage =
        n && n === "session" ? qzt : !e && J1e.isSupportLS ? J1e : new Jzt();
    }
    return (
      (t.prototype.getItem = function (e) {
        return this._storage.getItem(e);
      }),
      (t.prototype.setItem = function (e, n) {
        this._storage.setItem(e, n);
      }),
      (t.prototype.getCookie = function (e, n) {
        return this._storage.getCookie(e, n);
      }),
      (t.prototype.setCookie = function (e, n, r, i) {
        this._storage.setCookie(e, n, r, i);
      }),
      (t.prototype.removeItem = function (e) {
        this._storage.removeItem(e);
      }),
      t
    );
  })(),
  ejt = (function () {
    function t(e, n, r) {
      (this.appid = e),
        (this.domain = n),
        (this.userAgent = window.navigator.userAgent),
        (this.appVersion = window.navigator.appVersion),
        (this.cookie_expire = r);
    }
    return (
      (t.prototype.init = function () {
        var e,
          n = window.navigator.userAgent,
          r = window.navigator.language,
          i = document.referrer,
          o = i ? SBe(i).hostname : "",
          l = ite(window.location.href),
          u = /Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)
            ? "wap"
            : "web",
          c =
            ((e = window.navigator.connection) === null || e === void 0
              ? void 0
              : e.effectiveType) || "";
        this.utm = (function (f, p, g, y) {
          var v = new K1(!1),
            b = new K1(!1, "session"),
            w = f ? "_tea_utm_cache_" + f : "_tea_utm_cache",
            k = f ? "_$utm_from_url_" + f : "_$utm_from_url",
            D = {},
            $ = [
              "tr_shareuser",
              "tr_admaster",
              "tr_param1",
              "tr_param2",
              "tr_param3",
              "tr_param4",
              "$utm_from_url",
            ],
            N = {
              ad_id: Number(p.ad_id) || void 0,
              campaign_id: Number(p.campaign_id) || void 0,
              creative_id: Number(p.creative_id) || void 0,
              utm_source: p.utm_source,
              utm_medium: p.utm_medium,
              utm_campaign: p.utm_campaign,
              utm_term: p.utm_term,
              utm_content: p.utm_content,
              tr_shareuser: p.tr_shareuser,
              tr_admaster: p.tr_admaster,
              tr_param1: p.tr_param1,
              tr_param2: p.tr_param2,
              tr_param3: p.tr_param3,
              tr_param4: p.tr_param4,
            };
          try {
            var P = !1;
            for (var I in N)
              N[I] &&
                (qt($).call($, I) !== -1
                  ? (D.hasOwnProperty("tracer_data") || (D.tracer_data = {}),
                    (D.tracer_data[I] = N[I]))
                  : (D[I] = N[I]),
                (P = !0));
            if (P) b.setItem(k, "1"), v.setCookie(w, lr(D), y, g);
            else {
              var O = v.getCookie(w, g);
              O && (D = JSON.parse(O));
            }
            b.getItem(k) &&
              (D.hasOwnProperty("tracer_data") || (D.tracer_data = {}),
              (D.tracer_data.$utm_from_url = 1));
          } catch {
            return N;
          }
          return D;
        })(this.appid, l, this.domain, this.cookie_expire);
        var d = this.browser(),
          h = this.os();
        return {
          browser: d.browser,
          browser_version: d.browser_version,
          platform: u,
          os_name: h.os_name,
          os_version: h.os_version,
          userAgent: n,
          screen_width: window.screen && window.screen.width,
          screen_height: window.screen && window.screen.height,
          device_model: this.getDeviceModel(h.os_name),
          language: r,
          referrer: i,
          referrer_host: o,
          network_type: c,
          utm: this.utm,
          latest_data: this.last(i, o),
        };
      }),
      (t.prototype.last = function (e, n) {
        var r = "",
          i = "",
          o = "",
          l = location.hostname,
          u = !1;
        if (e && n && l !== n) {
          (r = e), (i = n), (u = !0);
          var c = ite(e);
          c.keyword && (o = c.keyword);
        }
        return {
          $latest_referrer: r,
          $latest_referrer_host: i,
          $latest_search_keyword: o,
          isLast: u,
        };
      }),
      (t.prototype.browser = function () {
        var e,
          n,
          r = "",
          i = "" + wl(this.appVersion),
          o = this.userAgent;
        return (
          qt(o).call(o, "Edge") !== -1 || qt(o).call(o, "Edg") !== -1
            ? ((r = "Microsoft Edge"),
              qt(o).call(o, "Edge") !== -1
                ? ((e = qt(o).call(o, "Edge")), (i = o.substring(e + 5)))
                : ((e = qt(o).call(o, "Edg")), (i = o.substring(e + 4))))
            : (e = qt(o).call(o, "MSIE")) !== -1
            ? ((r = "Microsoft Internet Explorer"), (i = o.substring(e + 5)))
            : (e = qt(o).call(o, "MetaSr")) !== -1
            ? ((r = "sougoubrowser"), (i = o.substring(e + 7, e + 10)))
            : qt(o).call(o, "MQQBrowser") !== -1 ||
              qt(o).call(o, "QQBrowser") !== -1
            ? ((r = "qqbrowser"),
              qt(o).call(o, "MQQBrowser") !== -1
                ? ((e = qt(o).call(o, "MQQBrowser")),
                  (i = o.substring(e + 11, e + 15)))
                : qt(o).call(o, "QQBrowser") !== -1 &&
                  ((e = qt(o).call(o, "QQBrowser")),
                  (i = o.substring(e + 10, e + 25))))
            : qt(o).call(o, "Chrome") !== -1
            ? (e = qt(o).call(o, "MicroMessenger")) !== -1
              ? ((r = "weixin"), (i = o.substring(e + 15, e + 20)))
              : (e = qt(o).call(o, "360")) !== -1
              ? ((r = "360browser"),
                (i = o.substring(qt(o).call(o, "Chrome") + 7)))
              : qt(o).call(o, "baidubrowser") !== -1 ||
                qt(o).call(o, "BIDUBrowser") !== -1
              ? (qt(o).call(o, "baidubrowser") !== -1
                  ? ((e = qt(o).call(o, "baidubrowser")),
                    (i = o.substring(e + 13, e + 16)))
                  : qt(o).call(o, "BIDUBrowser") !== -1 &&
                    ((e = qt(o).call(o, "BIDUBrowser")),
                    (i = o.substring(e + 12, e + 15))),
                (r = "baidubrowser"))
              : (e = qt(o).call(o, "xiaomi")) !== -1
              ? qt(o).call(o, "openlanguagexiaomi") !== -1
                ? ((r = "openlanguage xiaomi"),
                  (i = o.substring(e + 7, e + 13)))
                : ((r = "xiaomi"), (i = o.substring(e - 7, e - 1)))
              : (e = qt(o).call(o, "TTWebView")) !== -1
              ? ((r = "TTWebView"), (i = o.substring(e + 10, e + 23)))
              : ((e = qt(o).call(o, "Chrome")) !== -1 ||
                  (e = qt(o).call(o, "Chrome")) !== -1) &&
                ((r = "Chrome"), (i = o.substring(e + 7)))
            : qt(o).call(o, "Safari") !== -1
            ? (e = qt(o).call(o, "QQ")) !== -1
              ? ((r = "qqbrowser"), (i = o.substring(e + 10, e + 16)))
              : (e = qt(o).call(o, "Safari")) !== -1 &&
                ((r = "Safari"),
                (i = o.substring(e + 7)),
                (e = qt(o).call(o, "Version")) !== -1 &&
                  (i = o.substring(e + 8)))
            : (e = qt(o).call(o, "Firefox")) !== -1
            ? ((r = "Firefox"), (i = o.substring(e + 8)))
            : (e = qt(o).call(o, "MicroMessenger")) !== -1
            ? ((r = "weixin"), (i = o.substring(e + 15, e + 20)))
            : (e = qt(o).call(o, "QQ")) !== -1 &&
              ((r = "qqbrowser"), (i = o.substring(e + 3, e + 8))),
          (n = qt(i).call(i, ";")) !== -1 && (i = i.substring(0, n)),
          (n = qt(i).call(i, " ")) !== -1 && (i = i.substring(0, n)),
          (n = qt(i).call(i, ")")) !== -1 && (i = i.substring(0, n)),
          { browser: r, browser_version: i }
        );
      }),
      (t.prototype.os = function () {
        for (
          var e,
            n = "",
            r = "",
            i = [
              {
                s: "Windows 10",
                r: /(Windows 10.0|Windows NT 10.0|Windows NT 10.1)/,
              },
              { s: "Windows 8.1", r: /(Windows 8.1|Windows NT 6.3)/ },
              { s: "Windows 8", r: /(Windows 8|Windows NT 6.2)/ },
              { s: "Windows 7", r: /(Windows 7|Windows NT 6.1)/ },
              { s: "Windows", r: /(Windows|Windows NT)/ },
              { s: "Android", r: /Android/ },
              { s: "iOS", r: /(iPhone|iPad|iPod)/ },
              { s: "Mac OS X", r: /Mac OS X/ },
              { s: "Mac OS", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ },
              { s: "chromeOS", r: /CrOS/ },
              { s: "Linux", r: /(Linux|X11)/ },
              { s: "Sun OS", r: /SunOS/ },
            ],
            o = 0;
          o < i.length;
          o++
        ) {
          var l = i[o];
          if (l.r.test(this.userAgent)) {
            (n = l.s) === "Mac OS X" && this.isNewIpad() && (n = "iOS");
            break;
          }
        }
        var u,
          c,
          d = function (p, g) {
            var y = p.exec(g);
            return y && y[1] ? y[1] : "";
          },
          h = function (p, g) {
            var y = RegExp(
              "(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:" + p + ")",
              "i"
            ).exec(g);
            return y ? jn(y).call(y, 1)[0] : "";
          };
        switch (
          (/Windows/.test(n) && ((r = d(/Windows (.*)/, n)), (n = "windows")),
          n)
        ) {
          case "Mac OS X":
            (r = h(
              "Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",
              this.userAgent
            )),
              (n = "mac");
            break;
          case "Android":
            (c = d(/Android ([\.\_\d]+)/, (u = this.userAgent))) ||
              (c = d(/Android\/([\.\_\d]+)/, u)),
              (r = c),
              (n = "android");
            break;
          case "iOS":
            (r = this.isNewIpad()
              ? h(
                  "Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",
                  this.userAgent
                )
              : (r = /OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))
              ? r[1] + "." + r[2] + "." + (0 | r[3])
              : ""),
              (n = "ios");
            break;
          case "chromeOS":
            var f = qt((e = this.userAgent)).call(e, "x86_64");
            r = this.userAgent.substring(f + 7, f + 16);
        }
        return { os_name: n, os_version: r };
      }),
      (t.prototype.getDeviceModel = function (e) {
        var n = "";
        try {
          if (e === "android")
            navigator.userAgent.split(";").forEach(function (o) {
              qt(o).call(o, "Build/") > -1 &&
                (n = jn(o).call(o, 0, qt(o).call(o, "Build/")));
            });
          else if (e === "ios" || e === "mac" || e === "windows")
            if (this.isNewIpad()) n = "iPad";
            else {
              var r = navigator.userAgent.replace("Mozilla/5.0 (", ""),
                i = qt(r).call(r, ";");
              n = i === -1 ? "" : jn(r).call(r, 0, i);
            }
        } catch {
          return es(n).call(n);
        }
        return es(n).call(n);
      }),
      (t.prototype.isNewIpad = function () {
        return (
          this.userAgent !== void 0 &&
          navigator.platform === "MacIntel" &&
          typeof navigator.maxTouchPoints == "number" &&
          navigator.maxTouchPoints > 1
        );
      }),
      t
    );
  })(),
  tjt = {
    cn: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
    va: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
    sg: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
  },
  njt = {
    cn: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az28z1gz1hz1gz1cz18z1nz1gz4az1az1mz1k",
    sg: "1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",
    va: "1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",
    my: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k",
  },
  TT = "5.3.1",
  mle =
    (Ch(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z49z20z18z1lz1ez1cz20z21z4az1hz21"
    ),
    Ch(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1az1mz20z1cz4az1hz21"
    ),
    Ch(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1jz1mz18z1bz1cz20z4az1hz21"
    ),
    Ch(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1fz1cz18z22z1kz18z1nz49z1az1mz20z1c"
    ),
    Ch(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz4fz49z1bz18z22z18z4az24z1mz1jz1az1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz1bz18z22z18z49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz22z1cz21z22z1cz20z49z1cz24z1cz1lz22z49z1gz1lz21z1nz1cz1az22z1mz20"
    ),
    (function () {
      function t(e, n) {
        (this.collector = e),
          (this.config = n),
          (this.eventNameWhiteList = [
            "__bav_page",
            "__bav_beat",
            "__bav_page_statistics",
            "__bav_click",
            "__bav_page_exposure",
            "__bav_slide",
          ]),
          (this.paramsNameWhiteList = [
            "$inactive",
            "$inline",
            "$target_uuid_list",
            "$source_uuid",
            "$is_spider",
            "$source_id",
            "$is_first_time",
            "_staging_flag",
          ]),
          (this.regStr = new RegExp("^[a-zA-Z0-9][a-z0-9A-Z_.-]{1,255}$"));
      }
      return (
        (t.prototype.checkVerify = function (e) {
          var n = this;
          if (!e || !e.length) return !1;
          var r = e[0];
          if (!r) return !1;
          var i = r.events,
            o = r.header;
          if (!i || !i.length) return !1;
          var l = !0;
          return (
            i.forEach(function (u) {
              if (!u) return (l = !1), void (u.checkEvent = "事件异常");
              n.checkEventName(u.event) ||
                ((l = !1), (u.checkEvent = "事件名不能以 $ or __开头")),
                n.checkEventParams(u.params) ||
                  ((l = !1), (u.checkParams = "属性名不能以 $ or __开头"));
            }),
            this.checkEventParams(o) || (l = !1),
            l
          );
        }),
        (t.prototype.checkEventName = function (e) {
          return !!e && this.calculate(e, "event");
        }),
        (t.prototype.checkEventParams = function (e) {
          var n = e;
          if ((typeof e == "string" && (n = JSON.parse(n)), !Dn(n).length))
            return !0;
          for (var r in n)
            return !(
              !this.calculate(r, "params") ||
              (typeof n[r] == "string" &&
                n[r].length > 1024 &&
                (console.warn(
                  "params: " + r + " can not over 1024 byte, please check;"
                ),
                1))
            );
          return !0;
        }),
        (t.prototype.calculate = function (e, n) {
          var r;
          return (
            qt(
              (r =
                n === "event"
                  ? this.eventNameWhiteList
                  : this.paramsNameWhiteList)
            ).call(r, e) !== -1 ||
            (!new RegExp("^\\$").test(e) && !new RegExp("^__").test(e)) ||
            (console.warn(
              (n === "event" ? "event" : "params") +
                " name: " +
                e +
                " can not start with $ or __, pleace check;"
            ),
            !1)
          );
        }),
        t
      );
    })());
(function (t) {
  (t.Init = "init"),
    (t.Config = "config"),
    (t.Start = "start"),
    (t.Ready = "ready"),
    (t.UnReady = "un-ready"),
    (t.TokenComplete = "token-complete"),
    (t.TokenStorage = "token-storage"),
    (t.TokenFetch = "token-fetch"),
    (t.TokenError = "token-error"),
    (t.ConfigUuid = "config-uuid"),
    (t.ConfigWebId = "config-webid"),
    (t.ConfigDiD = "config-device-id"),
    (t.ConfigDomain = "config-domain"),
    (t.CustomWebId = "custom-webid"),
    (t.TokenChange = "token-change"),
    (t.TokenReset = "token-reset"),
    (t.ConfigTransform = "config-transform"),
    (t.EnvTransform = "env-transform"),
    (t.SessionReset = "session-reset"),
    (t.SessionResetTime = "session-reset-time"),
    (t.SetSessionId = "set-session-id"),
    (t.Event = "event"),
    (t.Events = "events"),
    (t.EventNow = "event-now"),
    (t.CleanEvents = "clean-events"),
    (t.BeconEvent = "becon-event"),
    (t.SubmitBefore = "submit-before"),
    (t.SubmitScuess = "submit-scuess"),
    (t.SubmitAfter = "submit-after"),
    (t.SubmitError = "submit-error"),
    (t.SubmitVerify = "submit-verify"),
    (t.CustomHeader = "custom-request-header"),
    (t.SDKInnerError = "sdk-inner-error"),
    (t.SDKRunTimeError = "sdk-run-time-error"),
    (t.LogSetting = "log-setting"),
    (t.LogSettingReady = "log-setting-ready"),
    (t.Stay = "stay"),
    (t.ResetStay = "reset-stay"),
    (t.StayReady = "stay-ready"),
    (t.SetStay = "set-stay"),
    (t.RouteChange = "route-change"),
    (t.RouteReady = "route-ready"),
    (t.Ab = "ab"),
    (t.AbVar = "ab-var"),
    (t.AbAllVars = "ab-all-vars"),
    (t.AbConfig = "ab-config"),
    (t.AbExternalVersion = "ab-external-version"),
    (t.AbVersionChangeOn = "ab-version-change-on"),
    (t.AbVersionChangeOff = "ab-version-change-off"),
    (t.AbOpenLayer = "ab-open-layer"),
    (t.AbCloseLayer = "ab-close-layer"),
    (t.AbReady = "ab-ready"),
    (t.AbComplete = "ab-complete"),
    (t.AbTimeout = "ab-timeout"),
    (t.Profile = "profile"),
    (t.ProfileSet = "profile-set"),
    (t.ProfileSetOnce = "profile-set-once"),
    (t.ProfileUnset = "profile-unset"),
    (t.ProfileIncrement = "profile-increment"),
    (t.ProfileAppend = "profile-append"),
    (t.ProfileClear = "profile-clear"),
    (t.Autotrack = "autotrack"),
    (t.AutotrackReady = "autotrack-ready"),
    (t.CepReady = "cep-ready"),
    (t.TracerReady = "tracer-ready"),
    (t.sessionRecord = "session-record"),
    (t.SessionRecordStart = "session-record-start"),
    (t.SessionRecordPause = "session-record-pause"),
    (t.SessionRecordEnd = "session-record-end"),
    (t.SessionRecordReport = "session-record-report"),
    (t.DestoryInstance = "destory-instance"),
    (t.VisualCollectReady = "visual-collect-ready"),
    (t.VisualApiReady = "visual-api-ready"),
    (t.VisualApiUpdate = "visual-api-update");
})(rte || (rte = {})),
  (function (t) {
    (t.DEBUGGER_MESSAGE = "debugger-message"),
      (t.DEBUGGER_MESSAGE_SDK = "debugger-message-sdk"),
      (t.DEBUGGER_MESSAGE_FETCH = "debugger-message-fetch"),
      (t.DEBUGGER_MESSAGE_FETCH_RESULT = "debugger-message-fetch-result"),
      (t.DEBUGGER_MESSAGE_EVENT = "debugger-message-event"),
      (t.DEVTOOL_WEB_READY = "devtool-web-ready");
  })(br || (br = {}));
var ii = rte,
  jo = void 0,
  RBe = new Date().getTimezoneOffset(),
  rjt = _i("" + -RBe / 60, 10),
  ijt = 60 * RBe,
  ajt = 7776e6,
  ojt = (function () {
    function t(e, n) {
      var r = this;
      (this.is_first_time = !0),
        (this.configPersist = !1),
        (this.initConfig = n),
        (this.collect = e);
      var i = new ejt(
        n.app_id,
        n.cookie_domain || "",
        n.cookie_expire || ajt
      ).init();
      this.eventCheck = new mle(e, n);
      var o = "__tea_cache_first_" + n.app_id;
      (this.configKey = "__tea_cache_config_" + n.app_id),
        (this.sessionStorage = new K1(!1, "session")),
        (this.localStorage = new K1(!1, "local")),
        n.configPersist &&
          ((this.configPersist = !0),
          (this.storage =
            n.configPersist === 1 ? this.sessionStorage : this.localStorage));
      var l = this.localStorage.getItem(o);
      l && l == 1
        ? (this.is_first_time = !1)
        : ((this.is_first_time = !0), this.localStorage.setItem(o, "1")),
        (this.envInfo = {
          user: {
            user_unique_id: jo,
            user_type: jo,
            user_id: jo,
            user_is_auth: jo,
            user_is_login: jo,
            device_id: jo,
            web_id: jo,
            ip_addr_id: jo,
            user_unique_id_type: jo,
          },
          header: {
            app_id: jo,
            app_name: jo,
            app_install_id: jo,
            install_id: jo,
            app_package: jo,
            app_channel: jo,
            app_version: jo,
            ab_version: jo,
            os_name: i.os_name,
            os_version: i.os_version,
            device_model: i.device_model,
            ab_client: jo,
            traffic_type: jo,
            client_ip: jo,
            device_brand: jo,
            os_api: jo,
            access: jo,
            language: i.language,
            region: jo,
            app_language: jo,
            app_region: jo,
            creative_id: i.utm.creative_id,
            ad_id: i.utm.ad_id,
            campaign_id: i.utm.campaign_id,
            log_type: jo,
            rnd: jo,
            platform: i.platform,
            sdk_version: TT,
            sdk_lib: "js",
            province: jo,
            city: jo,
            timezone: rjt,
            tz_offset: ijt,
            tz_name: jo,
            sim_region: jo,
            carrier: jo,
            resolution: i.screen_width + "x" + i.screen_height,
            browser: i.browser,
            browser_version: i.browser_version,
            referrer: i.referrer,
            referrer_host: i.referrer_host,
            width: i.screen_width,
            height: i.screen_height,
            screen_width: i.screen_width,
            screen_height: i.screen_height,
            utm_term: i.utm.utm_term,
            utm_content: i.utm.utm_content,
            utm_source: i.utm.utm_source,
            utm_medium: i.utm.utm_medium,
            utm_campaign: i.utm.utm_campaign,
            tracer_data: lr(i.utm.tracer_data),
            custom: i.network_type ? { network_type: i.network_type } : {},
            wechat_unionid: jo,
            wechat_openid: jo,
          },
        }),
        (this.ab_version = ""),
        (this.evtParams = {}),
        (this.reportErrorCallback = function () {}),
        (this.isLast = !1),
        this.setCustom(i),
        this.initDomain(),
        this.initABData(),
        this.collect.on("route-change", function (u) {
          r.changeReferInfo(u.config);
        });
    }
    return (
      (t.prototype.initDomain = function () {
        var e = this.initConfig.channel_domain;
        if (e) this.domain = e;
        else {
          var n = this.initConfig.channel;
          this.domain = Ch(njt[n]);
        }
      }),
      (t.prototype.setDomain = function (e) {
        this.domain = e;
      }),
      (t.prototype.getDomain = function () {
        return this.domain;
      }),
      (t.prototype.initABData = function () {
        var e = "__tea_sdk_ab_version_" + this.initConfig.app_id,
          n = null;
        if (this.initConfig.ab_cross) {
          var r = this.localStorage.getCookie(
            e,
            this.initConfig.ab_cookie_domain
          );
          n = r ? JSON.parse(r) : null;
        } else n = this.localStorage.getItem(e);
        this.setAbCache(n);
      }),
      (t.prototype.setAbCache = function (e) {
        this.ab_cache = e;
      }),
      (t.prototype.getAbCache = function () {
        return this.ab_cache;
      }),
      (t.prototype.setAbVersion = function (e) {
        this.ab_version = e;
      }),
      (t.prototype.getAbVersion = function () {
        return this.ab_version;
      }),
      (t.prototype.clearAbCache = function () {
        (this.ab_version = ""), (this.ab_cache = {});
      }),
      (t.prototype.getUrl = function (e) {
        var n = "";
        switch (e) {
          case "event":
            n = "/list";
            break;
          case "webid":
            n = "/webid";
            break;
          case "tobid":
            n = "/tobid";
        }
        var r = "";
        return (
          this.initConfig.caller &&
            (r =
              "?sdk_version=" +
              TT +
              "&sdk_name=web&app_id=" +
              this.initConfig.app_id +
              "&caller=" +
              this.initConfig.caller),
          "" + this.getDomain() + n + r
        );
      }),
      (t.prototype.setCustom = function (e) {
        if (e && e.latest_data && e.latest_data.isLast)
          for (var n in (delete e.latest_data.isLast,
          (this.isLast = !0),
          e.latest_data))
            this.envInfo.header.custom[n] = e.latest_data[n];
      }),
      (t.prototype.changeReferInfo = function (e) {
        var n = e;
        this.envInfo.header.referrer = n.referrer;
        var r = "";
        try {
          r = new Bs(n.referrer).host;
        } catch {}
        this.envInfo.header.referrer_host =
          r || this.envInfo.header.referrer_host;
      }),
      (t.prototype.set = function (e) {
        var n = this;
        Dn(e).forEach(function (r) {
          (e[r] !== void 0 && e[r] !== null) || n.delete(r);
          try {
            n.eventCheck.calculate(r, "config");
          } catch {}
          if (
            (r === "traffic_type" &&
              n.isLast &&
              (n.envInfo.header.custom.$latest_traffic_source_type = e[r]),
            r === "evtParams")
          )
            n.evtParams = au(au({}, n.evtParams || {}), e.evtParams || {});
          else if (r === "_staging_flag")
            n.evtParams = au(au({}, n.evtParams || {}), {
              _staging_flag: e._staging_flag,
            });
          else if (r === "reportErrorCallback" && typeof e[r] == "function")
            n.reportErrorCallback = e[r];
          else {
            var i,
              o,
              l,
              u = "",
              c = "";
            if (qt(r).call(r, ".") > -1) {
              var d = r.split(".");
              (u = d[0]), (c = d[1]);
            }
            u
              ? u === "user" || u === "header"
                ? (n.envInfo[u][c] = e[r])
                : ((n.envInfo.header.custom[c] = e[r]),
                  n.collect.emit(br.DEBUGGER_MESSAGE, {
                    type: br.DEBUGGER_MESSAGE_SDK,
                    info: "SDK 添加了Custom",
                    level: "info",
                    time: Date.now(),
                    infoType: "sdk",
                    secType: "HEADER",
                    common: "custom",
                  }))
              : Object.hasOwnProperty.call(n.envInfo.user, r)
              ? (qt((i = ["user_type", "ip_addr_id"])).call(i, r) > -1
                  ? (n.envInfo.user[r] = e[r] ? Number(e[r]) : e[r])
                  : qt(
                      (o = [
                        "user_id",
                        "web_id",
                        "user_unique_id",
                        "user_unique_id_type",
                      ])
                    ).call(o, r) > -1
                  ? (n.envInfo.user[r] = e[r] ? String(e[r]) : e[r])
                  : qt((l = ["user_is_auth", "user_is_login"])).call(l, r) > -1
                  ? (n.envInfo.user[r] = !!e[r])
                  : r === "device_id" && (n.envInfo.user[r] = e[r]),
                n.collect.emit(br.DEBUGGER_MESSAGE, {
                  type: br.DEBUGGER_MESSAGE_SDK,
                  info: "SDK 修改了公共参数",
                  level: "info",
                  time: Date.now(),
                  infoType: "sdk",
                  secType: "USER",
                  common: r,
                }))
              : Object.hasOwnProperty.call(n.envInfo.header, r)
              ? ((n.envInfo.header[r] = e[r]),
                n.collect.emit(br.DEBUGGER_MESSAGE, {
                  type: br.DEBUGGER_MESSAGE_SDK,
                  info: "SDK 修改了公共参数",
                  level: "info",
                  time: Date.now(),
                  infoType: "sdk",
                  secType: "HEADER",
                  common: r,
                }))
              : ((n.envInfo.header.custom[r] = e[r]),
                n.collect.emit(br.DEBUGGER_MESSAGE, {
                  type: br.DEBUGGER_MESSAGE_SDK,
                  info: "SDK 添加了Custom",
                  level: "info",
                  time: Date.now(),
                  infoType: "sdk",
                  secType: "HEADER",
                  common: "custom",
                }));
          }
        });
      }),
      (t.prototype.get = function (e) {
        try {
          return e
            ? e === "evtParams"
              ? this.evtParams
              : e === "reportErrorCallback"
              ? this[e]
              : Object.hasOwnProperty.call(this.envInfo.user, e)
              ? this.envInfo.user[e]
              : Object.hasOwnProperty.call(this.envInfo.header, e)
              ? this.envInfo.header[e]
              : JSON.parse(lr(this.envInfo[e]))
            : JSON.parse(lr(this.envInfo));
        } catch (n) {
          console.log("get config stringify error "),
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: n.message,
            });
        }
      }),
      (t.prototype.setStore = function (e) {
        try {
          if (!this.configPersist) return;
          var n = this.storage.getItem(this.configKey) || {};
          if (n && Dn(e).length) {
            var r = Ci(e, n);
            this.storage.setItem(this.configKey, r);
          }
        } catch (i) {
          console.log("setStore error"),
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: i.message,
            });
        }
      }),
      (t.prototype.getStore = function () {
        try {
          if (!this.configPersist) return null;
          var e = this.storage.getItem(this.configKey) || {};
          return e && Dn(e).length ? e : null;
        } catch (n) {
          return (
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: n.message,
            }),
            null
          );
        }
      }),
      (t.prototype.delete = function (e) {
        try {
          if (!this.configPersist) return;
          var n = this.storage.getItem(this.configKey) || {};
          n &&
            Object.hasOwnProperty.call(n, e) &&
            (delete n[e], this.storage.setItem(this.configKey, n));
        } catch (r) {
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: r.message,
          }),
            console.log("delete error");
        }
      }),
      t
    );
  })(),
  sjt = (function () {
    function t(e, n) {
      (this.isLog = n || !1), (this.name = e || "");
    }
    return (
      (t.prototype.info = function (e) {
        this.isLog &&
          console.log(
            "%c %s",
            "color: yellow; background-color: black;",
            "[AppLog WEB SDK] [instance: " + this.name + "] " + e
          );
      }),
      (t.prototype.warn = function (e) {
        this.isLog &&
          console.warn("[AppLog WEB SDK] [instance: " + this.name + "] " + e);
      }),
      (t.prototype.error = function (e) {
        this.isLog &&
          console.error("[AppLog WEB SDK] [instance: " + this.name + "] " + e);
      }),
      (t.prototype.throw = function (e) {
        throw (this.error(this.name), new Error(e));
      }),
      t
    );
  })(),
  ljt = (function () {
    function t() {
      this.spiderBot = [
        "Baiduspider",
        "googlebot",
        "360Spider",
        "haosouspider",
        "YoudaoBot",
        "Sogou News Spider",
        "Yisouspider",
        "Googlebot",
        "Headless",
        "Applebot",
        "Bingbot",
        "PetalBot",
      ];
    }
    return (
      (t.prototype.checkSpider = function (e) {
        if (!e.enable_spider) return !1;
        var n = window.navigator.userAgent;
        if (!n) return !0;
        var r = !1;
        return (
          this.spiderBot.forEach(function (i) {
            qt(n).call(n, i) !== -1 && (r = !0);
          }),
          r
        );
      }),
      t
    );
  })(),
  ujt = (function () {
    function t(n, r) {
      (this.collect = n), (this.native = r);
    }
    var e = t.prototype;
    return (
      (e.bridgeInject = function () {
        try {
          return (
            !!this.native &&
            (AppLogBridge
              ? (console.log("AppLogBridge is injected"), !0)
              : (console.log("AppLogBridge is not inject"), !1))
          );
        } catch {
          return console.log("AppLogBridge is not inject"), !1;
        }
      }),
      (e.bridgeReady = function () {
        var n = this;
        return new Ar(function (r, i) {
          try {
            n.bridgeInject()
              ? AppLogBridge.hasStarted(function (o) {
                  console.log("AppLogBridge is started? : " + o),
                    o ? r(!0) : i(!1);
                })
              : i(!1);
          } catch (o) {
            console.log("AppLogBridge, error:" + lr(o.stack)), i(!1);
          }
        });
      }),
      (e.setNativeAppId = function (n) {
        try {
          AppLogBridge.setNativeAppId(lr(n)),
            console.log("change bridge appid, event report with appid: " + n);
        } catch {
          console.error("setNativeAppId error");
        }
      }),
      (e.setConfig = function (n) {
        var r = this;
        try {
          Dn(n).forEach(function (i) {
            i === "user_unique_id"
              ? r.setUserUniqueId(n[i])
              : n[i]
              ? r.addHeaderInfo(i, n[i])
              : r.removeHeaderInfo(i);
          });
        } catch {
          console.error("setConfig error");
        }
      }),
      (e.setUserUniqueId = function (n) {
        try {
          AppLogBridge.setUserUniqueId(n);
        } catch {
          console.error("setUserUniqueId error");
        }
      }),
      (e.addHeaderInfo = function (n, r) {
        try {
          AppLogBridge.addHeaderInfo(n, r);
        } catch {
          console.error("addHeaderInfo error");
        }
      }),
      (e.setHeaderInfo = function (n) {
        try {
          AppLogBridge.setHeaderInfo(lr(n));
        } catch {
          console.error("setHeaderInfo error");
        }
      }),
      (e.removeHeaderInfo = function (n) {
        try {
          AppLogBridge.removeHeaderInfo(n);
        } catch {
          console.error("removeHeaderInfo error");
        }
      }),
      (e.reportPv = function (n) {
        this.onEventV3("predefine_pageview", n);
      }),
      (e.onEventV3 = function (n, r) {
        try {
          AppLogBridge.onEventV3(n, r),
            this.collect.emit(DebuggerMesssge.DEBUGGER_MESSAGE, {
              type: DebuggerMesssge.DEBUGGER_MESSAGE_EVENT,
              info: "bridge埋点上报",
              time: Date.now(),
              data: [{ events: [{ event: n, params: r }] }],
              code: 200,
              status: "success",
            });
        } catch {
          console.error("onEventV3 error");
        }
      }),
      (e.profileSet = function (n) {
        try {
          AppLogBridge.profileSet(n);
        } catch {
          console.error("profileSet error");
        }
      }),
      (e.profileSetOnce = function (n) {
        try {
          AppLogBridge.profileSetOnce(n);
        } catch {
          console.error("profileSetOnce error");
        }
      }),
      (e.profileIncrement = function (n) {
        try {
          AppLogBridge.profileIncrement(n);
        } catch {
          console.error("profileIncrement error");
        }
      }),
      (e.profileUnset = function (n) {
        try {
          AppLogBridge.profileUnset(n);
        } catch {
          console.error("profileUnset error");
        }
      }),
      (e.profileAppend = function (n) {
        try {
          AppLogBridge.profileAppend(n);
        } catch {
          console.error("profileAppend error");
        }
      }),
      t
    );
  })(),
  fk = function () {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
      /[xy]/g,
      function (t) {
        var e = (16 * Math.random()) | 0;
        return (t === "x" ? e : (3 & e) | 8).toString(16);
      }
    );
  },
  cjt = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.storage = new K1(!1, "session")),
          (this.sessionKey = "__tea_session_id_" + n.app_id),
          (this.expireTime = n.expireTime || 18e5),
          (this.disableSession = n.disable_session),
          (this.disableSessionTimeCheck = n.disable_session_check),
          this.disableSession ||
            (this.setSessionId(),
            this.collect.on(ii.SessionReset, function (i) {
              r.resetSessionId(i);
            }),
            this.collect.on(ii.SessionResetTime, function () {
              r.updateSessionIdTime();
            }));
      }),
      (t.prototype.updateSessionIdTime = function () {
        var e = this.storage.getItem(this.sessionKey);
        if (e && e.sessionId) {
          var n = e.timestamp;
          Date.now() - n > this.expireTime
            ? (e = { sessionId: fk(), timestamp: Date.now() })
            : (e.timestamp = Date.now()),
            this.storage.setItem(this.sessionKey, e),
            this.resetExpTime();
        }
      }),
      (t.prototype.setSessionId = function () {
        var e = this,
          n = this.storage.getItem(this.sessionKey);
        n && n.sessionId
          ? (n.timestamp = Date.now())
          : (n = { sessionId: fk(), timestamp: Date.now() }),
          this.storage.setItem(this.sessionKey, n),
          this.disableSessionTimeCheck ||
            (this.sessionExp = setInterval(function () {
              e.checkEXp();
            }, this.expireTime));
      }),
      (t.prototype.getSessionId = function () {
        var e = this.storage.getItem(this.sessionKey);
        return this.disableSession ? "" : e && e.sessionId ? e.sessionId : "";
      }),
      (t.prototype.resetExpTime = function () {
        var e = this;
        this.sessionExp &&
          (clearInterval(this.sessionExp),
          (this.sessionExp = setInterval(function () {
            e.checkEXp();
          }, this.expireTime)));
      }),
      (t.prototype.resetSessionId = function (e) {
        var n = { sessionId: e || fk(), timestamp: Date.now() };
        this.storage.setItem(this.sessionKey, n);
      }),
      (t.prototype.checkEXp = function () {
        var e = this.storage.getItem(this.sessionKey);
        e &&
          e.sessionId &&
          Date.now() - e.timestamp + 30 >= this.expireTime &&
          ((e = { sessionId: fk(), timestamp: Date.now() }),
          this.storage.setItem(this.sessionKey, e));
      }),
      t
    );
  })(),
  djt = (function () {
    function t() {
      (this.eventLimit = 50),
        (this.enable_ttwebid = !1),
        (this.eventCache = []),
        (this.beconEventCache = []);
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.config = n),
          (this.configManager = e.configManager),
          (this.eventCheck = new mle(e, n)),
          (this.cacheStorgae = new K1(!0)),
          (this.localStorage = new K1(!1)),
          (this.maxReport = n.max_report || 10),
          (this.reportTime = n.reportTime || n.report_time || 30),
          (this.timeout = n.timeout || 1e5),
          (this.enable_ttwebid = n.enable_ttwebid),
          (this.reportUrl = n.report_url || this.configManager.getUrl("event")),
          (this.eventKey =
            "__tea_cache_events_" + this.configManager.get("app_id")),
          (this.beconKey =
            "__tea_cache_events_becon_" + this.configManager.get("app_id")),
          (this.abKey =
            "__tea_sdk_ab_version_" + this.configManager.get("app_id")),
          (this.refer_key =
            "__tea_cache_refer_" + this.configManager.get("app_id")),
          (this.pageId = fk()),
          this.collect.on(ii.Ready, function () {
            r.reportAll(!1);
          }),
          this.collect.on(ii.ConfigDomain, function () {
            r.reportUrl = r.configManager.getUrl("event");
          }),
          this.collect.on(ii.Event, function (o) {
            r.event(o);
          }),
          this.collect.on(ii.BeconEvent, function (o) {
            r.beconEvent(o);
          }),
          this.collect.on(ii.CleanEvents, function () {
            r.reportAll(!1);
          });
        var i = this.linster();
        this.collect.on(ii.DestoryInstance, function () {
          i && i();
        });
      }),
      (t.prototype.linster = function () {
        var e,
          n = this,
          r = function () {
            n.reportAll(!0);
          };
        window.addEventListener("unload", r, !1),
          (e = r),
          Y1e()
            ? window.addEventListener("pagehide", e, !1)
            : window.addEventListener("beforeunload", e, !1);
        var i = function () {
          document.visibilityState === "hidden" && n.reportAll(!0);
        };
        return (
          document.addEventListener("visibilitychange", i, !1),
          function () {
            window.removeEventListener("unload", r),
              window.removeEventListener("pagehide", r, !1),
              window.removeEventListener("beforeunload", r, !1),
              document.removeEventListener("visibilitychange", i, !1);
          }
        );
      }),
      (t.prototype.reportAll = function (e) {
        this.report(e), this.reportBecon();
      }),
      (t.prototype.event = function (e) {
        var n = this;
        try {
          if (this.collect.destroy || this.collect.sdkStop) return;
          if (this.config.enable_ios_sendbeacon && Y1e())
            return void this.beconEvent(e);
          var r = this.cacheStorgae.getItem(this.eventKey) || [],
            i = e;
          this.config.batch_event && (i = this.batchEvent(e));
          var o = nte(i, r);
          if (
            (this.cacheStorgae.setItem(this.eventKey, o),
            this.reportTimeout && clearTimeout(this.reportTimeout),
            o.length >= this.maxReport)
          )
            this.report(!1);
          else {
            var l = this.reportTime;
            this.reportTimeout = setTimeout(function () {
              n.report(!1), (n.reportTimeout = null);
            }, l);
          }
        } catch (u) {
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 发生了异常",
            level: "error",
            time: Date.now(),
            data: u.message,
            infoType: "sdk",
          });
        }
      }),
      (t.prototype.beconEvent = function (e) {
        if (!this.collect.destroy && !this.collect.sdkStop) {
          var n = nte(e, this.cacheStorgae.getItem(this.beconKey) || []);
          this.cacheStorgae.setItem(this.beconKey, n),
            this.collect.tokenManager.getReady() &&
              this.collect.sdkReady &&
              (this.cacheStorgae.removeItem(this.beconKey),
              this.send(this.split(this.merge(n)), !0));
        }
      }),
      (t.prototype.reportBecon = function () {
        if (
          !this.collect.destroy &&
          !this.collect.sdkStop &&
          this.collect.tokenManager.getReady() &&
          this.collect.sdkReady
        ) {
          var e = this.cacheStorgae.getItem(this.beconKey) || [];
          e &&
            e.length &&
            (this.cacheStorgae.removeItem(this.beconKey),
            this.send(this.split(this.merge(e)), !0));
        }
      }),
      (t.prototype.report = function (e) {
        if (
          !this.collect.destroy &&
          !this.collect.sdkStop &&
          this.collect.tokenManager.getReady() &&
          this.collect.sdkReady
        ) {
          var n = this.cacheStorgae.getItem(this.eventKey) || [];
          n.length &&
            (this.cacheStorgae.removeItem(this.eventKey),
            this.config.batch_event
              ? this.send([n], e)
              : this.sliceEvent(n, e));
        }
      }),
      (t.prototype.batchEvent = function (e) {
        var n = [];
        if (e.length > this.eventLimit)
          for (var r = 0; r < e.length; r += this.eventLimit) {
            var i;
            i = jn(e).call(e, r, r + this.eventLimit);
            var o = this.merge(i);
            n.push(o);
          }
        else n = o = this.merge(e);
        return n;
      }),
      (t.prototype.sliceEvent = function (e, n) {
        if (e.length > this.eventLimit)
          for (var r = 0; r < e.length; r += this.eventLimit) {
            var i;
            i = jn(e).call(e, r, r + this.eventLimit);
            var o = this.split(this.merge(i));
            this.send(o, n);
          }
        else (o = this.split(this.merge(e))), this.send(o, n);
      }),
      (t.prototype.handleRefer = function () {
        var e = "";
        try {
          if (this.config.spa || this.config.autotrack) {
            var n = this.localStorage.getItem(this.refer_key) || {};
            e = n.routeChange
              ? n.refer_key
              : this.configManager.get("referrer");
          } else e = this.configManager.get("referrer");
        } catch {
          e = document.referrer;
        }
        return e;
      }),
      (t.prototype.merge = function (e, n) {
        var r = this,
          i = this.configManager.get(),
          o = i.header,
          l = i.user;
        this.config.enable_pageid && (o.custom.page_id = this.pageId),
          (o.custom = lr(o.custom));
        var u = this.configManager.get("evtParams"),
          c = this.configManager.get("user_unique_id_type"),
          d = [];
        try {
          var h = _r(e).call(e, function (p) {
              try {
                Dn(u).length && !n && (p.params = au(au({}, u), p.params)),
                  c && (p.params.$user_unique_id_type = c);
                var g = r.configManager.getAbCache(),
                  y = l[r.config.ab_user_mode] || l.user_unique_id;
                return (
                  g &&
                    g.uuid &&
                    g.uuid === y &&
                    r.configManager.getAbVersion() &&
                    (p.ab_sdk_version = r.configManager.getAbVersion()),
                  (p.session_id = r.collect.sessionManager.getSessionId()),
                  (p.params = lr(p.params)),
                  p
                );
              } catch (v) {
                return (
                  console.warn(
                    "filter merge event: " +
                      (p && p.event) +
                      " error, pls check",
                    v && v.message
                  ),
                  r.collect.emit(br.DEBUGGER_MESSAGE, {
                    type: br.DEBUGGER_MESSAGE_SDK,
                    info: "SDK 处理Event数据异常",
                    level: "error",
                    time: Date.now(),
                    data: v.message,
                    infoType: "sdk",
                  }),
                  !1
                );
              }
            }),
            f = JSON.parse(lr({ events: h, user: l, header: o }));
          (f.local_time = Math.floor(Date.now() / 1e3)),
            (f.user_unique_type = this.config.enable_ttwebid
              ? this.config.user_unique_type
              : void 0),
            (f.verbose = 1),
            d.push(f);
        } catch (p) {
          console.warn("event merge error, pls check", p && p.message);
        }
        return d;
      }),
      (t.prototype.split = function (e) {
        return On(e).call(e, function (n) {
          var r = [];
          return r.push(n), r;
        });
      }),
      (t.prototype.blockEvent = function (e) {
        try {
          var n = this.blockList;
          if (this.config.enable_logsetting) {
            var r = this.blockList,
              i =
                this.logSetting.getSettingData("blocklist_events").block_event;
            n = Ce(r).call(
              r,
              _r(i).call(i, function (o) {
                return qt(r).call(r, o) === -1;
              })
            );
          }
          return !(n && n.length && $a(n).call(n, e));
        } catch {
          return !0;
        }
      }),
      (t.prototype.whiteEvent = function (e) {
        var n;
        try {
          var r;
          return (
            (n = this.whiteList) === null ||
            n === void 0 ||
            !n.length ||
            !!$a((r = this.whiteList)).call(r, e)
          );
        } catch {
          return !0;
        }
      }),
      (t.prototype.customAllowFilter = function (e, n) {
        try {
          if (
            n ||
            !this.config.enable_logsetting ||
            !this.config.enable_logsetting_header_custom
          )
            return lr(e);
          var r = this.logSetting.getSettingData().header_custom_allow,
            i = {};
          if (r && r.length && Dn(e).length) {
            var o = new XS(r);
            for (var l in e) o.has(l) && (i[l] = e[l]);
          }
          return lr(i);
        } catch (u) {
          return (
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行customAllowFilter发生了异常",
              level: "error",
              time: Date.now(),
              data: u.message,
              infoType: "sdk",
            }),
            lr(e)
          );
        }
      }),
      (t.prototype.paramsAllowFilter = function (e, n) {
        try {
          if (
            n ||
            !this.config.enable_logsetting ||
            !this.config.enable_logsetting_params
          )
            return lr(e.params);
          var r = this.logSetting.getSettingData().params_block,
            i = e.event,
            o = e.params,
            l = {};
          if (r && r[i] && r[i].length) {
            var u = new XS(r[i]);
            for (var c in o)
              (!this.logSetting.getPredefineParamsList().has(c) && u.has(c)) ||
                (l[c] = o[c]);
            return lr(l);
          }
          return lr(e.params);
        } catch (d) {
          return (
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行paramsAllowFilter发生了异常",
              level: "error",
              time: Date.now(),
              data: d.message,
              infoType: "sdk",
            }),
            lr(e.params)
          );
        }
      }),
      (t.prototype.send = function (e, n) {
        var r = this;
        e.length &&
          (this.config.disable_track_event ||
            e.forEach(function (i) {
              try {
                var o,
                  l = JSON.parse(lr(i));
                _r(r.config) &&
                  ((l = _r((o = r.config)).call(o, l)) ||
                    console.warn("filter must return data !!")),
                  r.collect.eventFilter &&
                    l &&
                    ((l = r.collect.eventFilter(l)) ||
                      console.warn("filterEvent api must return data !!"));
                var u = l || i,
                  c = JSON.parse(lr(u));
                if ((r.eventCheck.checkVerify(c), !u.length)) return;
                var d = !0;
                if (
                  (u.forEach(function (h) {
                    h.events.length || (d = !1);
                  }),
                  !d)
                )
                  return;
                r.collect.emit(ii.SubmitBefore, u),
                  r.collect.requestManager.useRequest({
                    url: r.reportUrl,
                    data: u,
                    success: function (h, f) {
                      h && h.e !== 0
                        ? (r.collect.emit(ii.SubmitError, {
                            type: "f_data",
                            eventData: f,
                            errorCode: h.e,
                            response: h,
                          }),
                          r.collect.emit(br.DEBUGGER_MESSAGE, {
                            type: br.DEBUGGER_MESSAGE_EVENT,
                            info: "埋点上报失败",
                            time: Date.now(),
                            data: c,
                            code: h.e,
                            msg: h.m || "",
                            failType: "数据异常失败",
                            status: "fail",
                          }))
                        : (r.collect.emit(ii.SubmitScuess, {
                            eventData: f,
                            res: h,
                          }),
                          r.collect.emit(br.DEBUGGER_MESSAGE, {
                            type: br.DEBUGGER_MESSAGE_EVENT,
                            info: "埋点上报成功",
                            time: Date.now(),
                            data: c,
                            code: 200,
                            status: "success",
                          }));
                    },
                    fail: function (h, f) {
                      r.configManager.get("reportErrorCallback")(h, f),
                        r.collect.emit(ii.SubmitError, {
                          type: "f_net",
                          eventData: h,
                          errorCode: f,
                        }),
                        r.collect.emit(br.DEBUGGER_MESSAGE, {
                          type: br.DEBUGGER_MESSAGE_EVENT,
                          info: "埋点上报网络异常",
                          time: Date.now(),
                          data: c,
                          code: f,
                          failType: "网络异常失败",
                          status: "fail",
                        });
                    },
                    timeout: r.timeout,
                    useBeacon: n,
                    withCredentials: r.enable_ttwebid,
                    zip: !0,
                  }),
                  r.collect.emit(ii.SubmitAfter, u);
              } catch (h) {
                console.warn("something error, " + lr(h.stack)),
                  r.collect.emit(br.DEBUGGER_MESSAGE, {
                    type: br.DEBUGGER_MESSAGE_SDK,
                    info: "SDK发送埋点发生了异常",
                    level: "error",
                    time: Date.now(),
                    data: h.message,
                    infoType: "sdk",
                  });
              }
            }));
      }),
      t
    );
  })(),
  m3 = function () {
    var t;
    return jn(
      (t = (function e(n) {
        return n
          ? (n ^ ((16 * Math.random()) >> (n / 4))).toString(10)
          : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, e);
      })().replace(/-/g, ""))
    ).call(t, 0, 19);
  },
  hjt = (function () {
    function t() {
      (this.cacheToken = {}),
        (this.enableCookie = !1),
        (this.enable_ttwebid = !1),
        (this.enableCustomWebid = !1);
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.config = n),
          (this.configManager = this.collect.configManager),
          (this.storage = new K1(!1)),
          (this.tokenKey = "__tea_cache_tokens_" + n.app_id),
          (this.enable_ttwebid = n.enable_ttwebid),
          (this.enableCustomWebid = n.enable_custom_webid),
          this.collect.on(ii.ConfigUuid, function (i) {
            r.setUuid(i);
          }),
          this.collect.on(ii.ConfigWebId, function (i) {
            r.setWebId(i);
          }),
          this.collect.on(ii.ConfigDiD, function (i) {
            r.setDeviceId(i);
          }),
          (this.enableCookie = n.cross_subdomain),
          (this.expiresTime = n.cookie_expire || 6048e5),
          (this.cookieDomain = n.cookie_domain || ""),
          this.checkStorage();
      }),
      (t.prototype.checkStorage = function () {
        var e = this;
        if (this.enableCookie) {
          var n = this.storage.getCookie(this.tokenKey, this.cookieDomain);
          this.cacheToken = n && typeof n == "string" ? JSON.parse(n) : {};
        } else this.cacheToken = this.storage.getItem(this.tokenKey) || {};
        (this.tokenType =
          this.cacheToken && this.cacheToken._type_
            ? this.cacheToken._type_
            : "default"),
          this.tokenType !== "custom" || this.enableCustomWebid
            ? this.enableCustomWebid
              ? this.collect.on(ii.CustomWebId, function () {
                  (e.tokenReady = !0), e.collect.emit(ii.TokenComplete);
                })
              : this.checkEnv() ||
                (this.enable_ttwebid
                  ? this.completeTtWid(this.cacheToken)
                  : this.check())
            : this.remoteWebid();
      }),
      (t.prototype.check = function () {
        this.cacheToken && this.cacheToken.web_id
          ? this.complete(this.cacheToken)
          : this.config.disable_webid
          ? this.complete({
              web_id: m3(),
              user_unique_id: this.configManager.get("user_unique_id") || m3(),
            })
          : this.remoteWebid();
      }),
      (t.prototype.checkEnv = function () {
        var e = window.navigator.userAgent;
        if (
          qt(e).call(e, "miniProgram") !== -1 ||
          qt(e).call(e, "MiniProgram") !== -1
        ) {
          var n = ite(window.location.href);
          return !(
            !n ||
            !n.Web_ID ||
            (this.complete({
              web_id: "" + n.Web_ID,
              user_unique_id:
                this.configManager.get("user_unique_id") || "" + n.Web_ID,
            }),
            0)
          );
        }
        return !1;
      }),
      (t.prototype.remoteWebid = function () {
        var e = this,
          n = this.configManager.getUrl("webid"),
          r = {
            app_key: this.config.app_key,
            app_id: this.config.app_id,
            url: location.href,
            user_agent: window.navigator.userAgent,
            referer: document.referrer,
            user_unique_id: "",
          };
        this.collect.emit(br.DEBUGGER_MESSAGE, {
          type: br.DEBUGGER_MESSAGE_SDK,
          info: "SDK 发起WebID请求",
          logType: "fetch",
          level: "info",
          time: Date.now(),
          data: r,
          infoType: "sdk",
        }),
          this.collect.requestManager.useRequest({
            url: n,
            data: r,
            success: function (i) {
              var o;
              if (i && i.e === 0)
                (o = i.web_id),
                  e.collect.emit(br.DEBUGGER_MESSAGE, {
                    type: br.DEBUGGER_MESSAGE_SDK,
                    info: "WebID请求成功",
                    logType: "fetch",
                    level: "info",
                    time: Date.now(),
                    data: i,
                    infoType: "sdk",
                  });
              else {
                var l = m3();
                (o = l),
                  e.collect.configManager.set({ localWebId: l }),
                  e.collect.emit(ii.TokenError),
                  e.collect.emit(br.DEBUGGER_MESSAGE, {
                    type: br.DEBUGGER_MESSAGE_SDK,
                    info: "WebID请求返回值异常，采用本地生成",
                    logType: "fetch",
                    level: "warn",
                    time: Date.now(),
                    data: i,
                    infoType: "sdk",
                  }),
                  e.collect.logger.warn(
                    "appid: " +
                      e.config.app_id +
                      " get webid error, use local webid~"
                  );
              }
              e.complete({
                web_id: e.configManager.get("web_id") || o,
                user_unique_id: e.configManager.get("user_unique_id") || o,
              });
            },
            fail: function () {
              var i = m3();
              e.complete({
                web_id: e.configManager.get("web_id") || i,
                user_unique_id: e.configManager.get("user_unique_id") || i,
              }),
                e.collect.configManager.set({ localWebId: i }),
                e.collect.emit(ii.TokenError),
                e.collect.emit(br.DEBUGGER_MESSAGE, {
                  type: br.DEBUGGER_MESSAGE_SDK,
                  info: "WebID请求网络异常，采用本地生成",
                  logType: "fetch",
                  level: "error",
                  time: Date.now(),
                  data: { localWebId: i },
                  infoType: "sdk",
                }),
                e.collect.logger.warn(
                  "appid: " +
                    e.config.app_id +
                    ", get webid error, use local webid~"
                );
            },
            timeout: 3e5,
          });
      }),
      (t.prototype.complete = function (e) {
        var n = e.web_id,
          r = e.user_unique_id,
          i = e.device_id;
        if (
          ((e.timestamp = Date.now()),
          this.collect.configManager.set({ web_id: n, user_unique_id: r }),
          this.config.enable_device_id)
        ) {
          var o = this.configManager.get("device_id") || i || n;
          this.collect.configManager.set({ device_id: o }),
            (e = au(au({}, e), { device_id: o }));
        } else e != null && e.device_id && delete e.device_id;
        this.setStorage(e),
          (this.tokenReady = !0),
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 完成用户信息设置",
            logType: "info",
            level: "info",
            time: Date.now(),
            data: { web_id: n, user_unique_id: r },
            infoType: "sdk",
          }),
          this.collect.emit(ii.TokenComplete);
      }),
      (t.prototype.completeTtWid = function (e) {
        var n = e.user_unique_id || "",
          r = this.configManager.get("user_unique_id");
        (r || n) && this.configManager.set({ user_unique_id: r || n }),
          this.setStorage(e),
          (this.tokenReady = !0),
          this.collect.emit(ii.TokenComplete);
      }),
      (t.prototype.setUuid = function (e) {
        var n;
        if (
          e &&
          qt((n = ["null", "undefined", "Null", "None"])).call(n, e) === -1
        ) {
          var r = String(e),
            i = this.configManager.get("user_unique_id"),
            o = this.cacheToken && this.cacheToken.user_unique_id;
          if (r === i && r === o) return;
          this.configManager.set({ user_unique_id: r }),
            this.cacheToken || (this.cacheToken = {}),
            (this.cacheToken.user_unique_id = r),
            (this.cacheToken.timestamp = Date.now()),
            this.setStorage(this.cacheToken),
            this.collect.emit(ii.TokenChange, "uuid"),
            this.collect.emit(ii.SessionReset);
        } else this.clearUuid();
      }),
      (t.prototype.clearUuid = function () {
        this.config.enable_ttwebid ||
          (this.configManager.get("web_id") &&
            this.configManager.get("user_unique_id") !==
              this.configManager.get("web_id") &&
            (this.configManager.set({
              user_unique_id: this.configManager.get("web_id"),
            }),
            this.cacheToken &&
              this.cacheToken.web_id &&
              ((this.cacheToken.user_unique_id = this.cacheToken.web_id),
              (this.cacheToken.timestamp = Date.now()),
              this.setStorage(this.cacheToken)),
            this.collect.emit(ii.TokenReset, "uuid")));
      }),
      (t.prototype.setWebId = function (e) {
        if (e && !this.config.enable_ttwebid) {
          this.cacheToken && this.cacheToken.web_id
            ? this.cacheToken.web_id !== e &&
              ((this.cacheToken.user_unique_id =
                this.cacheToken.web_id === this.cacheToken.user_unique_id
                  ? e
                  : this.cacheToken.user_unique_id),
              (this.cacheToken.web_id = e))
            : ((this.cacheToken = {}),
              (this.cacheToken.web_id = e),
              (this.cacheToken.user_unique_id = e)),
            (this.cacheToken.timestamp = Date.now());
          var n = this.configManager.get("web_id"),
            r = this.configManager.get("user_unique_id");
          (r && r !== n) ||
            (this.configManager.set({ user_unique_id: e }),
            this.collect.emit(ii.TokenChange, "uuid")),
            n !== e &&
              (this.configManager.set({ web_id: e }),
              this.collect.emit(ii.TokenChange, "webid")),
            this.setStorage(this.cacheToken);
        }
      }),
      (t.prototype.setDeviceId = function (e) {
        this.configManager.set({ device_id: e }),
          this.config.enable_device_id &&
            this.cacheToken &&
            ((this.cacheToken.device_id = e),
            (this.cacheToken.timestamp = Date.now()),
            this.setStorage(this.cacheToken));
      }),
      (t.prototype.setStorage = function (e) {
        var n;
        (e._type_ = this.enableCustomWebid ? "custom" : "default"),
          delete e[
            cm((n = "diss".split("")))
              .call(n)
              .join("")
          ],
          this.enableCookie || this.enable_ttwebid
            ? (this.storage.setCookie(
                this.tokenKey,
                e,
                this.expiresTime,
                this.cookieDomain
              ),
              this.enable_ttwebid &&
                (delete e.web_id, this.storage.setItem(this.tokenKey, e)))
            : this.storage.setItem(this.tokenKey, e),
          (this.cacheToken = e);
      }),
      (t.prototype.getReady = function () {
        return this.tokenReady;
      }),
      (t.prototype.getTobId = function () {
        var e = this;
        return new Ar(function (n) {
          var r = {
            app_id: e.config.app_id,
            user_unique_id: e.configManager.get("user_unique_id"),
            web_id: e.configManager.get("web_id"),
            user_unique_id_type: e.configManager.get("user_unique_id_type"),
          };
          e.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 发起GetToken请求",
            logType: "fetch",
            level: "info",
            time: Date.now(),
            data: r,
            infoType: "sdk",
          }),
            e.collect.requestManager.useRequest({
              url: e.configManager.getUrl("tobid"),
              data: r,
              success: function (i) {
                i && i.e === 0
                  ? (n(i.tobid),
                    e.collect.emit(br.DEBUGGER_MESSAGE, {
                      type: br.DEBUGGER_MESSAGE_SDK,
                      info: "GetToken请求成功",
                      logType: "fetch",
                      level: "info",
                      time: Date.now(),
                      data: i,
                      infoType: "sdk",
                    }))
                  : (n(""),
                    e.collect.emit(br.DEBUGGER_MESSAGE, {
                      type: br.DEBUGGER_MESSAGE_SDK,
                      info: "GetToken请求失败",
                      logType: "fetch",
                      level: "error",
                      time: Date.now(),
                      data: i,
                      infoType: "sdk",
                    }));
              },
              fail: function () {
                n(""),
                  e.collect.emit(br.DEBUGGER_MESSAGE, {
                    type: br.DEBUGGER_MESSAGE_SDK,
                    info: "GetToken请求失败",
                    logType: "fetch",
                    level: "error",
                    time: Date.now(),
                    infoType: "sdk",
                  });
              },
              time: 3e4,
              withCredentials: e.enable_ttwebid,
            });
        });
      }),
      t
    );
  })();
function AD(t) {
  for (var e = t.length; --e >= 0; ) t[e] = 0;
}
var ote = new Uint8Array([
    0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5,
    5, 5, 5, 0,
  ]),
  DF = new Uint8Array([
    0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10,
    11, 11, 12, 12, 13, 13,
  ]),
  fjt = new Uint8Array([
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7,
  ]),
  q1e = new Uint8Array([
    16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
  ]),
  p1 = new Array(576);
AD(p1);
var oC = new Array(60);
AD(oC);
var Dx = new Array(512);
AD(Dx);
var qC = new Array(256);
AD(qC);
var yle = new Array(29);
AD(yle);
var ebe,
  tbe,
  nbe,
  kU = new Array(30);
function nz(t, e, n, r, i) {
  (this.static_tree = t),
    (this.extra_bits = e),
    (this.extra_base = n),
    (this.elems = r),
    (this.max_length = i),
    (this.has_stree = t && t.length);
}
function rz(t, e) {
  (this.dyn_tree = t), (this.max_code = 0), (this.stat_desc = e);
}
AD(kU);
var ABe = function (t) {
    return t < 256 ? Dx[t] : Dx[256 + (t >>> 7)];
  },
  Px = function (t, e) {
    (t.pending_buf[t.pending++] = 255 & e),
      (t.pending_buf[t.pending++] = (e >>> 8) & 255);
  },
  gf = function (t, e, n) {
    t.bi_valid > 16 - n
      ? ((t.bi_buf |= (e << t.bi_valid) & 65535),
        Px(t, t.bi_buf),
        (t.bi_buf = e >> (16 - t.bi_valid)),
        (t.bi_valid += n - 16))
      : ((t.bi_buf |= (e << t.bi_valid) & 65535), (t.bi_valid += n));
  },
  ev = function (t, e, n) {
    gf(t, n[2 * e], n[2 * e + 1]);
  },
  wBe = function (t, e) {
    var n = 0;
    do (n |= 1 & t), (t >>>= 1), (n <<= 1);
    while (--e > 0);
    return n >>> 1;
  },
  kBe = function (t, e, n) {
    var r,
      i,
      o = new Array(16),
      l = 0;
    for (r = 1; r <= 15; r++) (l = (l + n[r - 1]) << 1), (o[r] = l);
    for (i = 0; i <= e; i++) {
      var u = t[2 * i + 1];
      u !== 0 && (t[2 * i] = wBe(o[u]++, u));
    }
  },
  rbe = function (t) {
    var e;
    for (e = 0; e < 286; e++) t.dyn_ltree[2 * e] = 0;
    for (e = 0; e < 30; e++) t.dyn_dtree[2 * e] = 0;
    for (e = 0; e < 19; e++) t.bl_tree[2 * e] = 0;
    (t.dyn_ltree[512] = 1),
      (t.opt_len = t.static_len = 0),
      (t.sym_next = t.matches = 0);
  },
  IBe = function (t) {
    t.bi_valid > 8
      ? Px(t, t.bi_buf)
      : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf),
      (t.bi_buf = 0),
      (t.bi_valid = 0);
  },
  ibe = function (t, e, n, r) {
    var i = 2 * e,
      o = 2 * n;
    return t[i] < t[o] || (t[i] === t[o] && r[e] <= r[n]);
  },
  iz = function (t, e, n) {
    for (
      var r = t.heap[n], i = n << 1;
      i <= t.heap_len &&
      (i < t.heap_len && ibe(e, t.heap[i + 1], t.heap[i], t.depth) && i++,
      !ibe(e, r, t.heap[i], t.depth));

    )
      (t.heap[n] = t.heap[i]), (n = i), (i <<= 1);
    t.heap[n] = r;
  },
  abe = function (t, e, n) {
    var r,
      i,
      o,
      l,
      u = 0;
    if (t.sym_next !== 0)
      do
        (r = 255 & t.pending_buf[t.sym_buf + u++]),
          (r += (255 & t.pending_buf[t.sym_buf + u++]) << 8),
          (i = t.pending_buf[t.sym_buf + u++]),
          r === 0
            ? ev(t, i, e)
            : ((o = qC[i]),
              ev(t, o + 256 + 1, e),
              (l = ote[o]) !== 0 && ((i -= yle[o]), gf(t, i, l)),
              (o = ABe(--r)),
              ev(t, o, n),
              (l = DF[o]) !== 0 && ((r -= kU[o]), gf(t, r, l)));
      while (u < t.sym_next);
    ev(t, 256, e);
  },
  az = function (t, e) {
    var n,
      r,
      i,
      o = e.dyn_tree,
      l = e.stat_desc.static_tree,
      u = e.stat_desc.has_stree,
      c = e.stat_desc.elems,
      d = -1;
    for (t.heap_len = 0, t.heap_max = 573, n = 0; n < c; n++)
      o[2 * n] !== 0
        ? ((t.heap[++t.heap_len] = d = n), (t.depth[n] = 0))
        : (o[2 * n + 1] = 0);
    for (; t.heap_len < 2; )
      (o[2 * (i = t.heap[++t.heap_len] = d < 2 ? ++d : 0)] = 1),
        (t.depth[i] = 0),
        t.opt_len--,
        u && (t.static_len -= l[2 * i + 1]);
    for (e.max_code = d, n = t.heap_len >> 1; n >= 1; n--) iz(t, o, n);
    i = c;
    do
      (n = t.heap[1]),
        (t.heap[1] = t.heap[t.heap_len--]),
        iz(t, o, 1),
        (r = t.heap[1]),
        (t.heap[--t.heap_max] = n),
        (t.heap[--t.heap_max] = r),
        (o[2 * i] = o[2 * n] + o[2 * r]),
        (t.depth[i] = (t.depth[n] >= t.depth[r] ? t.depth[n] : t.depth[r]) + 1),
        (o[2 * n + 1] = o[2 * r + 1] = i),
        (t.heap[1] = i++),
        iz(t, o, 1);
    while (t.heap_len >= 2);
    (t.heap[--t.heap_max] = t.heap[1]),
      (function (h, f) {
        var p,
          g,
          y,
          v,
          b,
          w,
          k = f.dyn_tree,
          D = f.max_code,
          $ = f.stat_desc.static_tree,
          N = f.stat_desc.has_stree,
          P = f.stat_desc.extra_bits,
          I = f.stat_desc.extra_base,
          O = f.stat_desc.max_length,
          X = 0;
        for (v = 0; v <= 15; v++) h.bl_count[v] = 0;
        for (
          k[2 * h.heap[h.heap_max] + 1] = 0, p = h.heap_max + 1;
          p < 573;
          p++
        )
          (v = k[2 * k[2 * (g = h.heap[p]) + 1] + 1] + 1) > O && ((v = O), X++),
            (k[2 * g + 1] = v),
            g > D ||
              (h.bl_count[v]++,
              (b = 0),
              g >= I && (b = P[g - I]),
              (w = k[2 * g]),
              (h.opt_len += w * (v + b)),
              N && (h.static_len += w * ($[2 * g + 1] + b)));
        if (X !== 0) {
          do {
            for (v = O - 1; h.bl_count[v] === 0; ) v--;
            h.bl_count[v]--,
              (h.bl_count[v + 1] += 2),
              h.bl_count[O]--,
              (X -= 2);
          } while (X > 0);
          for (v = O; v !== 0; v--)
            for (g = h.bl_count[v]; g !== 0; )
              (y = h.heap[--p]) > D ||
                (k[2 * y + 1] !== v &&
                  ((h.opt_len += (v - k[2 * y + 1]) * k[2 * y]),
                  (k[2 * y + 1] = v)),
                g--);
        }
      })(t, e),
      kBe(o, d, t.bl_count);
  },
  obe = function (t, e, n) {
    var r,
      i,
      o = -1,
      l = e[1],
      u = 0,
      c = 7,
      d = 4;
    for (
      l === 0 && ((c = 138), (d = 3)), e[2 * (n + 1) + 1] = 65535, r = 0;
      r <= n;
      r++
    )
      (i = l),
        (l = e[2 * (r + 1) + 1]),
        (++u < c && i === l) ||
          (u < d
            ? (t.bl_tree[2 * i] += u)
            : i !== 0
            ? (i !== o && t.bl_tree[2 * i]++, t.bl_tree[32]++)
            : u <= 10
            ? t.bl_tree[34]++
            : t.bl_tree[36]++,
          (u = 0),
          (o = i),
          l === 0
            ? ((c = 138), (d = 3))
            : i === l
            ? ((c = 6), (d = 3))
            : ((c = 7), (d = 4)));
  },
  sbe = function (t, e, n) {
    var r,
      i,
      o = -1,
      l = e[1],
      u = 0,
      c = 7,
      d = 4;
    for (l === 0 && ((c = 138), (d = 3)), r = 0; r <= n; r++)
      if (((i = l), (l = e[2 * (r + 1) + 1]), !(++u < c && i === l))) {
        if (u < d)
          do ev(t, i, t.bl_tree);
          while (--u != 0);
        else
          i !== 0
            ? (i !== o && (ev(t, i, t.bl_tree), u--),
              ev(t, 16, t.bl_tree),
              gf(t, u - 3, 2))
            : u <= 10
            ? (ev(t, 17, t.bl_tree), gf(t, u - 3, 3))
            : (ev(t, 18, t.bl_tree), gf(t, u - 11, 7));
        (u = 0),
          (o = i),
          l === 0
            ? ((c = 138), (d = 3))
            : i === l
            ? ((c = 6), (d = 3))
            : ((c = 7), (d = 4));
      }
  },
  lbe = !1,
  ube = function (t, e, n, r) {
    gf(t, 0 + (r ? 1 : 0), 3),
      IBe(t),
      Px(t, n),
      Px(t, ~n),
      n && t.pending_buf.set(t.window.subarray(e, e + n), t.pending),
      (t.pending += n);
  },
  r5 = {
    _tr_init: function (t) {
      lbe ||
        ((function () {
          var e,
            n,
            r,
            i,
            o,
            l = new Array(16);
          for (r = 0, i = 0; i < 28; i++)
            for (yle[i] = r, e = 0; e < 1 << ote[i]; e++) qC[r++] = i;
          for (qC[r - 1] = i, o = 0, i = 0; i < 16; i++)
            for (kU[i] = o, e = 0; e < 1 << DF[i]; e++) Dx[o++] = i;
          for (o >>= 7; i < 30; i++)
            for (kU[i] = o << 7, e = 0; e < 1 << (DF[i] - 7); e++)
              Dx[256 + o++] = i;
          for (n = 0; n <= 15; n++) l[n] = 0;
          for (e = 0; e <= 143; ) (p1[2 * e + 1] = 8), e++, l[8]++;
          for (; e <= 255; ) (p1[2 * e + 1] = 9), e++, l[9]++;
          for (; e <= 279; ) (p1[2 * e + 1] = 7), e++, l[7]++;
          for (; e <= 287; ) (p1[2 * e + 1] = 8), e++, l[8]++;
          for (kBe(p1, 287, l), e = 0; e < 30; e++)
            (oC[2 * e + 1] = 5), (oC[2 * e] = wBe(e, 5));
          (ebe = new nz(p1, ote, 257, 286, 15)),
            (tbe = new nz(oC, DF, 0, 30, 15)),
            (nbe = new nz(new Array(0), fjt, 0, 19, 7));
        })(),
        (lbe = !0)),
        (t.l_desc = new rz(t.dyn_ltree, ebe)),
        (t.d_desc = new rz(t.dyn_dtree, tbe)),
        (t.bl_desc = new rz(t.bl_tree, nbe)),
        (t.bi_buf = 0),
        (t.bi_valid = 0),
        rbe(t);
    },
    _tr_stored_block: ube,
    _tr_flush_block: function (t, e, n, r) {
      var i,
        o,
        l = 0;
      t.level > 0
        ? (t.strm.data_type === 2 &&
            (t.strm.data_type = (function (u) {
              var c,
                d = 4093624447;
              for (c = 0; c <= 31; c++, d >>>= 1)
                if (1 & d && u.dyn_ltree[2 * c] !== 0) return 0;
              if (
                u.dyn_ltree[18] !== 0 ||
                u.dyn_ltree[20] !== 0 ||
                u.dyn_ltree[26] !== 0
              )
                return 1;
              for (c = 32; c < 256; c++) if (u.dyn_ltree[2 * c] !== 0) return 1;
              return 0;
            })(t)),
          az(t, t.l_desc),
          az(t, t.d_desc),
          (l = (function (u) {
            var c;
            for (
              obe(u, u.dyn_ltree, u.l_desc.max_code),
                obe(u, u.dyn_dtree, u.d_desc.max_code),
                az(u, u.bl_desc),
                c = 18;
              c >= 3 && u.bl_tree[2 * q1e[c] + 1] === 0;
              c--
            );
            return (u.opt_len += 3 * (c + 1) + 5 + 5 + 4), c;
          })(t)),
          (i = (t.opt_len + 3 + 7) >>> 3),
          (o = (t.static_len + 3 + 7) >>> 3) <= i && (i = o))
        : (i = o = n + 5),
        n + 4 <= i && e !== -1
          ? ube(t, e, n, r)
          : t.strategy === 4 || o === i
          ? (gf(t, 2 + (r ? 1 : 0), 3), abe(t, p1, oC))
          : (gf(t, 4 + (r ? 1 : 0), 3),
            (function (u, c, d, h) {
              var f;
              for (
                gf(u, c - 257, 5), gf(u, d - 1, 5), gf(u, h - 4, 4), f = 0;
                f < h;
                f++
              )
                gf(u, u.bl_tree[2 * q1e[f] + 1], 3);
              sbe(u, u.dyn_ltree, c - 1), sbe(u, u.dyn_dtree, d - 1);
            })(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, l + 1),
            abe(t, t.dyn_ltree, t.dyn_dtree)),
        rbe(t),
        r && IBe(t);
    },
    _tr_tally: function (t, e, n) {
      return (
        (t.pending_buf[t.sym_buf + t.sym_next++] = e),
        (t.pending_buf[t.sym_buf + t.sym_next++] = e >> 8),
        (t.pending_buf[t.sym_buf + t.sym_next++] = n),
        e === 0
          ? t.dyn_ltree[2 * n]++
          : (t.matches++,
            e--,
            t.dyn_ltree[2 * (qC[n] + 256 + 1)]++,
            t.dyn_dtree[2 * ABe(e)]++),
        t.sym_next === t.sym_end
      );
    },
    _tr_align: function (t) {
      var e;
      gf(t, 2, 3),
        ev(t, 256, p1),
        (e = t).bi_valid === 16
          ? (Px(e, e.bi_buf), (e.bi_buf = 0), (e.bi_valid = 0))
          : e.bi_valid >= 8 &&
            ((e.pending_buf[e.pending++] = 255 & e.bi_buf),
            (e.bi_buf >>= 8),
            (e.bi_valid -= 8));
    },
  },
  e$ = function (t, e, n, r) {
    for (
      var i = (65535 & t) | 0, o = ((t >>> 16) & 65535) | 0, l = 0;
      n !== 0;

    ) {
      n -= l = n > 2e3 ? 2e3 : n;
      do o = (o + (i = (i + e[r++]) | 0)) | 0;
      while (--l);
      (i %= 65521), (o %= 65521);
    }
    return i | (o << 16) | 0;
  },
  pjt = new Uint32Array(
    (function () {
      for (var t, e = [], n = 0; n < 256; n++) {
        t = n;
        for (var r = 0; r < 8; r++)
          t = 1 & t ? 3988292384 ^ (t >>> 1) : t >>> 1;
        e[n] = t;
      }
      return e;
    })()
  ),
  Wc = function (t, e, n, r) {
    var i = pjt,
      o = r + n;
    t ^= -1;
    for (var l = r; l < o; l++) t = (t >>> 8) ^ i[255 & (t ^ e[l])];
    return -1 ^ t;
  },
  VS = {
    2: "need dictionary",
    1: "stream end",
    0: "",
    "-1": "file error",
    "-2": "stream error",
    "-3": "data error",
    "-4": "insufficient memory",
    "-5": "buffer error",
    "-6": "incompatible version",
  },
  xa = {
    Z_NO_FLUSH: 0,
    Z_PARTIAL_FLUSH: 1,
    Z_SYNC_FLUSH: 2,
    Z_FULL_FLUSH: 3,
    Z_FINISH: 4,
    Z_BLOCK: 5,
    Z_TREES: 6,
    Z_OK: 0,
    Z_STREAM_END: 1,
    Z_NEED_DICT: 2,
    Z_ERRNO: -1,
    Z_STREAM_ERROR: -2,
    Z_DATA_ERROR: -3,
    Z_MEM_ERROR: -4,
    Z_BUF_ERROR: -5,
    Z_NO_COMPRESSION: 0,
    Z_BEST_SPEED: 1,
    Z_BEST_COMPRESSION: 9,
    Z_DEFAULT_COMPRESSION: -1,
    Z_FILTERED: 1,
    Z_HUFFMAN_ONLY: 2,
    Z_RLE: 3,
    Z_FIXED: 4,
    Z_DEFAULT_STRATEGY: 0,
    Z_BINARY: 0,
    Z_TEXT: 1,
    Z_UNKNOWN: 2,
    Z_DEFLATED: 8,
  },
  gjt = r5._tr_init,
  ste = r5._tr_stored_block,
  mjt = r5._tr_flush_block,
  FT = r5._tr_tally,
  yjt = r5._tr_align,
  UT = xa.Z_NO_FLUSH,
  vjt = xa.Z_PARTIAL_FLUSH,
  bjt = xa.Z_FULL_FLUSH,
  am = xa.Z_FINISH,
  cbe = xa.Z_BLOCK,
  _d = xa.Z_OK,
  dbe = xa.Z_STREAM_END,
  By = xa.Z_STREAM_ERROR,
  _jt = xa.Z_DATA_ERROR,
  oz = xa.Z_BUF_ERROR,
  Tjt = xa.Z_DEFAULT_COMPRESSION,
  Ejt = xa.Z_FILTERED,
  y3 = xa.Z_HUFFMAN_ONLY,
  Sjt = xa.Z_RLE,
  Rjt = xa.Z_FIXED,
  Ajt = xa.Z_DEFAULT_STRATEGY,
  wjt = xa.Z_UNKNOWN,
  IU = xa.Z_DEFLATED,
  lte = 286,
  kjt = 30,
  Ijt = 19,
  Djt = 2 * lte + 1,
  Pjt = 15,
  nS = function (t, e) {
    return (t.msg = VS[e]), e;
  },
  hbe = function (t) {
    return 2 * t - (t > 4 ? 9 : 0);
  },
  ET = function (t) {
    for (var e = t.length; --e >= 0; ) t[e] = 0;
  },
  Mjt = function (t) {
    var e,
      n,
      r,
      i = t.w_size;
    r = e = t.hash_size;
    do (n = t.head[--r]), (t.head[r] = n >= i ? n - i : 0);
    while (--e);
    r = e = i;
    do (n = t.prev[--r]), (t.prev[r] = n >= i ? n - i : 0);
    while (--e);
  },
  BT = function (t, e, n) {
    return ((e << t.hash_shift) ^ n) & t.hash_mask;
  },
  Sp = function (t) {
    var e = t.state,
      n = e.pending;
    n > t.avail_out && (n = t.avail_out),
      n !== 0 &&
        (t.output.set(
          e.pending_buf.subarray(e.pending_out, e.pending_out + n),
          t.next_out
        ),
        (t.next_out += n),
        (e.pending_out += n),
        (t.total_out += n),
        (t.avail_out -= n),
        (e.pending -= n),
        e.pending === 0 && (e.pending_out = 0));
  },
  Cp = function (t, e) {
    mjt(
      t,
      t.block_start >= 0 ? t.block_start : -1,
      t.strstart - t.block_start,
      e
    ),
      (t.block_start = t.strstart),
      Sp(t.strm);
  },
  bs = function (t, e) {
    t.pending_buf[t.pending++] = e;
  },
  nM = function (t, e) {
    (t.pending_buf[t.pending++] = (e >>> 8) & 255),
      (t.pending_buf[t.pending++] = 255 & e);
  },
  ute = function (t, e, n, r) {
    var i = t.avail_in;
    return (
      i > r && (i = r),
      i === 0
        ? 0
        : ((t.avail_in -= i),
          e.set(t.input.subarray(t.next_in, t.next_in + i), n),
          t.state.wrap === 1
            ? (t.adler = e$(t.adler, e, i, n))
            : t.state.wrap === 2 && (t.adler = Wc(t.adler, e, i, n)),
          (t.next_in += i),
          (t.total_in += i),
          i)
    );
  },
  DBe = function (t, e) {
    var n,
      r,
      i = t.max_chain_length,
      o = t.strstart,
      l = t.prev_length,
      u = t.nice_match,
      c = t.strstart > t.w_size - 262 ? t.strstart - (t.w_size - 262) : 0,
      d = t.window,
      h = t.w_mask,
      f = t.prev,
      p = t.strstart + 258,
      g = d[o + l - 1],
      y = d[o + l];
    t.prev_length >= t.good_match && (i >>= 2),
      u > t.lookahead && (u = t.lookahead);
    do
      if (
        d[(n = e) + l] === y &&
        d[n + l - 1] === g &&
        d[n] === d[o] &&
        d[++n] === d[o + 1]
      ) {
        (o += 2), n++;
        do;
        while (
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          o < p
        );
        if (((r = 258 - (p - o)), (o = p - 258), r > l)) {
          if (((t.match_start = e), (l = r), r >= u)) break;
          (g = d[o + l - 1]), (y = d[o + l]);
        }
      }
    while ((e = f[e & h]) > c && --i != 0);
    return l <= t.lookahead ? l : t.lookahead;
  },
  pk = function (t) {
    var e,
      n,
      r,
      i = t.w_size;
    do {
      if (
        ((n = t.window_size - t.lookahead - t.strstart),
        t.strstart >= i + (i - 262) &&
          (t.window.set(t.window.subarray(i, i + i - n), 0),
          (t.match_start -= i),
          (t.strstart -= i),
          (t.block_start -= i),
          t.insert > t.strstart && (t.insert = t.strstart),
          Mjt(t),
          (n += i)),
        t.strm.avail_in === 0)
      )
        break;
      if (
        ((e = ute(t.strm, t.window, t.strstart + t.lookahead, n)),
        (t.lookahead += e),
        t.lookahead + t.insert >= 3)
      )
        for (
          r = t.strstart - t.insert,
            t.ins_h = t.window[r],
            t.ins_h = BT(t, t.ins_h, t.window[r + 1]);
          t.insert &&
          ((t.ins_h = BT(t, t.ins_h, t.window[r + 3 - 1])),
          (t.prev[r & t.w_mask] = t.head[t.ins_h]),
          (t.head[t.ins_h] = r),
          r++,
          t.insert--,
          !(t.lookahead + t.insert < 3));

        );
    } while (t.lookahead < 262 && t.strm.avail_in !== 0);
  },
  PBe = function (t, e) {
    var n,
      r,
      i,
      o = t.pending_buf_size - 5 > t.w_size ? t.w_size : t.pending_buf_size - 5,
      l = 0,
      u = t.strm.avail_in;
    do {
      if (
        ((n = 65535),
        (i = (t.bi_valid + 42) >> 3),
        t.strm.avail_out < i ||
          ((i = t.strm.avail_out - i),
          n > (r = t.strstart - t.block_start) + t.strm.avail_in &&
            (n = r + t.strm.avail_in),
          n > i && (n = i),
          n < o &&
            ((n === 0 && e !== am) || e === UT || n !== r + t.strm.avail_in)))
      )
        break;
      (l = e === am && n === r + t.strm.avail_in ? 1 : 0),
        ste(t, 0, 0, l),
        (t.pending_buf[t.pending - 4] = n),
        (t.pending_buf[t.pending - 3] = n >> 8),
        (t.pending_buf[t.pending - 2] = ~n),
        (t.pending_buf[t.pending - 1] = ~n >> 8),
        Sp(t.strm),
        r &&
          (r > n && (r = n),
          t.strm.output.set(
            t.window.subarray(t.block_start, t.block_start + r),
            t.strm.next_out
          ),
          (t.strm.next_out += r),
          (t.strm.avail_out -= r),
          (t.strm.total_out += r),
          (t.block_start += r),
          (n -= r)),
        n &&
          (ute(t.strm, t.strm.output, t.strm.next_out, n),
          (t.strm.next_out += n),
          (t.strm.avail_out -= n),
          (t.strm.total_out += n));
    } while (l === 0);
    return (
      (u -= t.strm.avail_in) &&
        (u >= t.w_size
          ? ((t.matches = 2),
            t.window.set(
              t.strm.input.subarray(t.strm.next_in - t.w_size, t.strm.next_in),
              0
            ),
            (t.strstart = t.w_size),
            (t.insert = t.strstart))
          : (t.window_size - t.strstart <= u &&
              ((t.strstart -= t.w_size),
              t.window.set(
                t.window.subarray(t.w_size, t.w_size + t.strstart),
                0
              ),
              t.matches < 2 && t.matches++,
              t.insert > t.strstart && (t.insert = t.strstart)),
            t.window.set(
              t.strm.input.subarray(t.strm.next_in - u, t.strm.next_in),
              t.strstart
            ),
            (t.strstart += u),
            (t.insert += u > t.w_size - t.insert ? t.w_size - t.insert : u)),
        (t.block_start = t.strstart)),
      t.high_water < t.strstart && (t.high_water = t.strstart),
      l
        ? 4
        : e !== UT &&
          e !== am &&
          t.strm.avail_in === 0 &&
          t.strstart === t.block_start
        ? 2
        : ((i = t.window_size - t.strstart),
          t.strm.avail_in > i &&
            t.block_start >= t.w_size &&
            ((t.block_start -= t.w_size),
            (t.strstart -= t.w_size),
            t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0),
            t.matches < 2 && t.matches++,
            (i += t.w_size),
            t.insert > t.strstart && (t.insert = t.strstart)),
          i > t.strm.avail_in && (i = t.strm.avail_in),
          i &&
            (ute(t.strm, t.window, t.strstart, i),
            (t.strstart += i),
            (t.insert += i > t.w_size - t.insert ? t.w_size - t.insert : i)),
          t.high_water < t.strstart && (t.high_water = t.strstart),
          (i = (t.bi_valid + 42) >> 3),
          (o =
            (i =
              t.pending_buf_size - i > 65535 ? 65535 : t.pending_buf_size - i) >
            t.w_size
              ? t.w_size
              : i),
          ((r = t.strstart - t.block_start) >= o ||
            ((r || e === am) && e !== UT && t.strm.avail_in === 0 && r <= i)) &&
            ((n = r > i ? i : r),
            (l = e === am && t.strm.avail_in === 0 && n === r ? 1 : 0),
            ste(t, t.block_start, n, l),
            (t.block_start += n),
            Sp(t.strm)),
          l ? 3 : 1)
    );
  },
  sz = function (t, e) {
    for (var n, r; ; ) {
      if (t.lookahead < 262) {
        if ((pk(t), t.lookahead < 262 && e === UT)) return 1;
        if (t.lookahead === 0) break;
      }
      if (
        ((n = 0),
        t.lookahead >= 3 &&
          ((t.ins_h = BT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
          (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
          (t.head[t.ins_h] = t.strstart)),
        n !== 0 &&
          t.strstart - n <= t.w_size - 262 &&
          (t.match_length = DBe(t, n)),
        t.match_length >= 3)
      )
        if (
          ((r = FT(t, t.strstart - t.match_start, t.match_length - 3)),
          (t.lookahead -= t.match_length),
          t.match_length <= t.max_lazy_match && t.lookahead >= 3)
        ) {
          t.match_length--;
          do
            t.strstart++,
              (t.ins_h = BT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
              (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
              (t.head[t.ins_h] = t.strstart);
          while (--t.match_length != 0);
          t.strstart++;
        } else
          (t.strstart += t.match_length),
            (t.match_length = 0),
            (t.ins_h = t.window[t.strstart]),
            (t.ins_h = BT(t, t.ins_h, t.window[t.strstart + 1]));
      else (r = FT(t, 0, t.window[t.strstart])), t.lookahead--, t.strstart++;
      if (r && (Cp(t, !1), t.strm.avail_out === 0)) return 1;
    }
    return (
      (t.insert = t.strstart < 2 ? t.strstart : 2),
      e === am
        ? (Cp(t, !0), t.strm.avail_out === 0 ? 3 : 4)
        : t.sym_next && (Cp(t, !1), t.strm.avail_out === 0)
        ? 1
        : 2
    );
  },
  FA = function (t, e) {
    for (var n, r, i; ; ) {
      if (t.lookahead < 262) {
        if ((pk(t), t.lookahead < 262 && e === UT)) return 1;
        if (t.lookahead === 0) break;
      }
      if (
        ((n = 0),
        t.lookahead >= 3 &&
          ((t.ins_h = BT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
          (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
          (t.head[t.ins_h] = t.strstart)),
        (t.prev_length = t.match_length),
        (t.prev_match = t.match_start),
        (t.match_length = 2),
        n !== 0 &&
          t.prev_length < t.max_lazy_match &&
          t.strstart - n <= t.w_size - 262 &&
          ((t.match_length = DBe(t, n)),
          t.match_length <= 5 &&
            (t.strategy === Ejt ||
              (t.match_length === 3 && t.strstart - t.match_start > 4096)) &&
            (t.match_length = 2)),
        t.prev_length >= 3 && t.match_length <= t.prev_length)
      ) {
        (i = t.strstart + t.lookahead - 3),
          (r = FT(t, t.strstart - 1 - t.prev_match, t.prev_length - 3)),
          (t.lookahead -= t.prev_length - 1),
          (t.prev_length -= 2);
        do
          ++t.strstart <= i &&
            ((t.ins_h = BT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
            (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
            (t.head[t.ins_h] = t.strstart));
        while (--t.prev_length != 0);
        if (
          ((t.match_available = 0),
          (t.match_length = 2),
          t.strstart++,
          r && (Cp(t, !1), t.strm.avail_out === 0))
        )
          return 1;
      } else if (t.match_available) {
        if (
          ((r = FT(t, 0, t.window[t.strstart - 1])) && Cp(t, !1),
          t.strstart++,
          t.lookahead--,
          t.strm.avail_out === 0)
        )
          return 1;
      } else (t.match_available = 1), t.strstart++, t.lookahead--;
    }
    return (
      t.match_available &&
        ((r = FT(t, 0, t.window[t.strstart - 1])), (t.match_available = 0)),
      (t.insert = t.strstart < 2 ? t.strstart : 2),
      e === am
        ? (Cp(t, !0), t.strm.avail_out === 0 ? 3 : 4)
        : t.sym_next && (Cp(t, !1), t.strm.avail_out === 0)
        ? 1
        : 2
    );
  };
function yy(t, e, n, r, i) {
  (this.good_length = t),
    (this.max_lazy = e),
    (this.nice_length = n),
    (this.max_chain = r),
    (this.func = i);
}
var sC = [
  new yy(0, 0, 0, 0, PBe),
  new yy(4, 4, 8, 4, sz),
  new yy(4, 5, 16, 8, sz),
  new yy(4, 6, 32, 32, sz),
  new yy(4, 4, 16, 16, FA),
  new yy(8, 16, 32, 32, FA),
  new yy(8, 16, 128, 128, FA),
  new yy(8, 32, 128, 256, FA),
  new yy(32, 128, 258, 1024, FA),
  new yy(32, 258, 258, 4096, FA),
];
function Cjt() {
  (this.strm = null),
    (this.status = 0),
    (this.pending_buf = null),
    (this.pending_buf_size = 0),
    (this.pending_out = 0),
    (this.pending = 0),
    (this.wrap = 0),
    (this.gzhead = null),
    (this.gzindex = 0),
    (this.method = IU),
    (this.last_flush = -1),
    (this.w_size = 0),
    (this.w_bits = 0),
    (this.w_mask = 0),
    (this.window = null),
    (this.window_size = 0),
    (this.prev = null),
    (this.head = null),
    (this.ins_h = 0),
    (this.hash_size = 0),
    (this.hash_bits = 0),
    (this.hash_mask = 0),
    (this.hash_shift = 0),
    (this.block_start = 0),
    (this.match_length = 0),
    (this.prev_match = 0),
    (this.match_available = 0),
    (this.strstart = 0),
    (this.match_start = 0),
    (this.lookahead = 0),
    (this.prev_length = 0),
    (this.max_chain_length = 0),
    (this.max_lazy_match = 0),
    (this.level = 0),
    (this.strategy = 0),
    (this.good_match = 0),
    (this.nice_match = 0),
    (this.dyn_ltree = new Uint16Array(2 * Djt)),
    (this.dyn_dtree = new Uint16Array(2 * (2 * kjt + 1))),
    (this.bl_tree = new Uint16Array(2 * (2 * Ijt + 1))),
    ET(this.dyn_ltree),
    ET(this.dyn_dtree),
    ET(this.bl_tree),
    (this.l_desc = null),
    (this.d_desc = null),
    (this.bl_desc = null),
    (this.bl_count = new Uint16Array(Pjt + 1)),
    (this.heap = new Uint16Array(2 * lte + 1)),
    ET(this.heap),
    (this.heap_len = 0),
    (this.heap_max = 0),
    (this.depth = new Uint16Array(2 * lte + 1)),
    ET(this.depth),
    (this.sym_buf = 0),
    (this.lit_bufsize = 0),
    (this.sym_next = 0),
    (this.sym_end = 0),
    (this.opt_len = 0),
    (this.static_len = 0),
    (this.matches = 0),
    (this.insert = 0),
    (this.bi_buf = 0),
    (this.bi_valid = 0);
}
var lC = function (t) {
    if (!t) return 1;
    var e = t.state;
    return !e ||
      e.strm !== t ||
      (e.status !== 42 &&
        e.status !== 57 &&
        e.status !== 69 &&
        e.status !== 73 &&
        e.status !== 91 &&
        e.status !== 103 &&
        e.status !== 113 &&
        e.status !== 666)
      ? 1
      : 0;
  },
  MBe = function (t) {
    if (lC(t)) return nS(t, By);
    (t.total_in = t.total_out = 0), (t.data_type = wjt);
    var e = t.state;
    return (
      (e.pending = 0),
      (e.pending_out = 0),
      e.wrap < 0 && (e.wrap = -e.wrap),
      (e.status = e.wrap === 2 ? 57 : e.wrap ? 42 : 113),
      (t.adler = e.wrap === 2 ? 0 : 1),
      (e.last_flush = -2),
      gjt(e),
      _d
    );
  },
  CBe = function (t) {
    var e,
      n = MBe(t);
    return (
      n === _d &&
        (((e = t.state).window_size = 2 * e.w_size),
        ET(e.head),
        (e.max_lazy_match = sC[e.level].max_lazy),
        (e.good_match = sC[e.level].good_length),
        (e.nice_match = sC[e.level].nice_length),
        (e.max_chain_length = sC[e.level].max_chain),
        (e.strstart = 0),
        (e.block_start = 0),
        (e.lookahead = 0),
        (e.insert = 0),
        (e.match_length = e.prev_length = 2),
        (e.match_available = 0),
        (e.ins_h = 0)),
      n
    );
  },
  fbe = function (t, e, n, r, i, o) {
    if (!t) return By;
    var l = 1;
    if (
      (e === Tjt && (e = 6),
      r < 0 ? ((l = 0), (r = -r)) : r > 15 && ((l = 2), (r -= 16)),
      i < 1 ||
        i > 9 ||
        n !== IU ||
        r < 8 ||
        r > 15 ||
        e < 0 ||
        e > 9 ||
        o < 0 ||
        o > Rjt ||
        (r === 8 && l !== 1))
    )
      return nS(t, By);
    r === 8 && (r = 9);
    var u = new Cjt();
    return (
      (t.state = u),
      (u.strm = t),
      (u.status = 42),
      (u.wrap = l),
      (u.gzhead = null),
      (u.w_bits = r),
      (u.w_size = 1 << u.w_bits),
      (u.w_mask = u.w_size - 1),
      (u.hash_bits = i + 7),
      (u.hash_size = 1 << u.hash_bits),
      (u.hash_mask = u.hash_size - 1),
      (u.hash_shift = ~~((u.hash_bits + 3 - 1) / 3)),
      (u.window = new Uint8Array(2 * u.w_size)),
      (u.head = new Uint16Array(u.hash_size)),
      (u.prev = new Uint16Array(u.w_size)),
      (u.lit_bufsize = 1 << (i + 6)),
      (u.pending_buf_size = 4 * u.lit_bufsize),
      (u.pending_buf = new Uint8Array(u.pending_buf_size)),
      (u.sym_buf = u.lit_bufsize),
      (u.sym_end = 3 * (u.lit_bufsize - 1)),
      (u.level = e),
      (u.strategy = o),
      (u.method = n),
      CBe(t)
    );
  },
  t$ = {
    deflateInit: function (t, e) {
      return fbe(t, e, IU, 15, 8, Ajt);
    },
    deflateInit2: fbe,
    deflateReset: CBe,
    deflateResetKeep: MBe,
    deflateSetHeader: function (t, e) {
      return lC(t) || t.state.wrap !== 2 ? By : ((t.state.gzhead = e), _d);
    },
    deflate: function (t, e) {
      if (lC(t) || e > cbe || e < 0) return t ? nS(t, By) : By;
      var n = t.state;
      if (
        !t.output ||
        (t.avail_in !== 0 && !t.input) ||
        (n.status === 666 && e !== am)
      )
        return nS(t, t.avail_out === 0 ? oz : By);
      var r = n.last_flush;
      if (((n.last_flush = e), n.pending !== 0)) {
        if ((Sp(t), t.avail_out === 0)) return (n.last_flush = -1), _d;
      } else if (t.avail_in === 0 && hbe(e) <= hbe(r) && e !== am)
        return nS(t, oz);
      if (n.status === 666 && t.avail_in !== 0) return nS(t, oz);
      if (
        (n.status === 42 && n.wrap === 0 && (n.status = 113), n.status === 42)
      ) {
        var i = (IU + ((n.w_bits - 8) << 4)) << 8;
        if (
          ((i |=
            (n.strategy >= y3 || n.level < 2
              ? 0
              : n.level < 6
              ? 1
              : n.level === 6
              ? 2
              : 3) << 6),
          n.strstart !== 0 && (i |= 32),
          nM(n, (i += 31 - (i % 31))),
          n.strstart !== 0 && (nM(n, t.adler >>> 16), nM(n, 65535 & t.adler)),
          (t.adler = 1),
          (n.status = 113),
          Sp(t),
          n.pending !== 0)
        )
          return (n.last_flush = -1), _d;
      }
      if (n.status === 57) {
        if (((t.adler = 0), bs(n, 31), bs(n, 139), bs(n, 8), n.gzhead))
          bs(
            n,
            (n.gzhead.text ? 1 : 0) +
              (n.gzhead.hcrc ? 2 : 0) +
              (n.gzhead.extra ? 4 : 0) +
              (n.gzhead.name ? 8 : 0) +
              (n.gzhead.comment ? 16 : 0)
          ),
            bs(n, 255 & n.gzhead.time),
            bs(n, (n.gzhead.time >> 8) & 255),
            bs(n, (n.gzhead.time >> 16) & 255),
            bs(n, (n.gzhead.time >> 24) & 255),
            bs(n, n.level === 9 ? 2 : n.strategy >= y3 || n.level < 2 ? 4 : 0),
            bs(n, 255 & n.gzhead.os),
            n.gzhead.extra &&
              n.gzhead.extra.length &&
              (bs(n, 255 & n.gzhead.extra.length),
              bs(n, (n.gzhead.extra.length >> 8) & 255)),
            n.gzhead.hcrc &&
              (t.adler = Wc(t.adler, n.pending_buf, n.pending, 0)),
            (n.gzindex = 0),
            (n.status = 69);
        else if (
          (bs(n, 0),
          bs(n, 0),
          bs(n, 0),
          bs(n, 0),
          bs(n, 0),
          bs(n, n.level === 9 ? 2 : n.strategy >= y3 || n.level < 2 ? 4 : 0),
          bs(n, 3),
          (n.status = 113),
          Sp(t),
          n.pending !== 0)
        )
          return (n.last_flush = -1), _d;
      }
      if (n.status === 69) {
        if (n.gzhead.extra) {
          for (
            var o = n.pending, l = (65535 & n.gzhead.extra.length) - n.gzindex;
            n.pending + l > n.pending_buf_size;

          ) {
            var u = n.pending_buf_size - n.pending;
            if (
              (n.pending_buf.set(
                n.gzhead.extra.subarray(n.gzindex, n.gzindex + u),
                n.pending
              ),
              (n.pending = n.pending_buf_size),
              n.gzhead.hcrc &&
                n.pending > o &&
                (t.adler = Wc(t.adler, n.pending_buf, n.pending - o, o)),
              (n.gzindex += u),
              Sp(t),
              n.pending !== 0)
            )
              return (n.last_flush = -1), _d;
            (o = 0), (l -= u);
          }
          var c = new Uint8Array(n.gzhead.extra);
          n.pending_buf.set(c.subarray(n.gzindex, n.gzindex + l), n.pending),
            (n.pending += l),
            n.gzhead.hcrc &&
              n.pending > o &&
              (t.adler = Wc(t.adler, n.pending_buf, n.pending - o, o)),
            (n.gzindex = 0);
        }
        n.status = 73;
      }
      if (n.status === 73) {
        if (n.gzhead.name) {
          var d,
            h = n.pending;
          do {
            if (n.pending === n.pending_buf_size) {
              if (
                (n.gzhead.hcrc &&
                  n.pending > h &&
                  (t.adler = Wc(t.adler, n.pending_buf, n.pending - h, h)),
                Sp(t),
                n.pending !== 0)
              )
                return (n.last_flush = -1), _d;
              h = 0;
            }
            (d =
              n.gzindex < n.gzhead.name.length
                ? 255 & n.gzhead.name.charCodeAt(n.gzindex++)
                : 0),
              bs(n, d);
          } while (d !== 0);
          n.gzhead.hcrc &&
            n.pending > h &&
            (t.adler = Wc(t.adler, n.pending_buf, n.pending - h, h)),
            (n.gzindex = 0);
        }
        n.status = 91;
      }
      if (n.status === 91) {
        if (n.gzhead.comment) {
          var f,
            p = n.pending;
          do {
            if (n.pending === n.pending_buf_size) {
              if (
                (n.gzhead.hcrc &&
                  n.pending > p &&
                  (t.adler = Wc(t.adler, n.pending_buf, n.pending - p, p)),
                Sp(t),
                n.pending !== 0)
              )
                return (n.last_flush = -1), _d;
              p = 0;
            }
            (f =
              n.gzindex < n.gzhead.comment.length
                ? 255 & n.gzhead.comment.charCodeAt(n.gzindex++)
                : 0),
              bs(n, f);
          } while (f !== 0);
          n.gzhead.hcrc &&
            n.pending > p &&
            (t.adler = Wc(t.adler, n.pending_buf, n.pending - p, p));
        }
        n.status = 103;
      }
      if (n.status === 103) {
        if (n.gzhead.hcrc) {
          if (n.pending + 2 > n.pending_buf_size && (Sp(t), n.pending !== 0))
            return (n.last_flush = -1), _d;
          bs(n, 255 & t.adler), bs(n, (t.adler >> 8) & 255), (t.adler = 0);
        }
        if (((n.status = 113), Sp(t), n.pending !== 0))
          return (n.last_flush = -1), _d;
      }
      if (
        t.avail_in !== 0 ||
        n.lookahead !== 0 ||
        (e !== UT && n.status !== 666)
      ) {
        var g =
          n.level === 0
            ? PBe(n, e)
            : n.strategy === y3
            ? (function (y, v) {
                for (var b; ; ) {
                  if (y.lookahead === 0 && (pk(y), y.lookahead === 0)) {
                    if (v === UT) return 1;
                    break;
                  }
                  if (
                    ((y.match_length = 0),
                    (b = FT(y, 0, y.window[y.strstart])),
                    y.lookahead--,
                    y.strstart++,
                    b && (Cp(y, !1), y.strm.avail_out === 0))
                  )
                    return 1;
                }
                return (
                  (y.insert = 0),
                  v === am
                    ? (Cp(y, !0), y.strm.avail_out === 0 ? 3 : 4)
                    : y.sym_next && (Cp(y, !1), y.strm.avail_out === 0)
                    ? 1
                    : 2
                );
              })(n, e)
            : n.strategy === Sjt
            ? (function (y, v) {
                for (var b, w, k, D, $ = y.window; ; ) {
                  if (y.lookahead <= 258) {
                    if ((pk(y), y.lookahead <= 258 && v === UT)) return 1;
                    if (y.lookahead === 0) break;
                  }
                  if (
                    ((y.match_length = 0),
                    y.lookahead >= 3 &&
                      y.strstart > 0 &&
                      (w = $[(k = y.strstart - 1)]) === $[++k] &&
                      w === $[++k] &&
                      w === $[++k])
                  ) {
                    D = y.strstart + 258;
                    do;
                    while (
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      k < D
                    );
                    (y.match_length = 258 - (D - k)),
                      y.match_length > y.lookahead &&
                        (y.match_length = y.lookahead);
                  }
                  if (
                    (y.match_length >= 3
                      ? ((b = FT(y, 1, y.match_length - 3)),
                        (y.lookahead -= y.match_length),
                        (y.strstart += y.match_length),
                        (y.match_length = 0))
                      : ((b = FT(y, 0, y.window[y.strstart])),
                        y.lookahead--,
                        y.strstart++),
                    b && (Cp(y, !1), y.strm.avail_out === 0))
                  )
                    return 1;
                }
                return (
                  (y.insert = 0),
                  v === am
                    ? (Cp(y, !0), y.strm.avail_out === 0 ? 3 : 4)
                    : y.sym_next && (Cp(y, !1), y.strm.avail_out === 0)
                    ? 1
                    : 2
                );
              })(n, e)
            : sC[n.level].func(n, e);
        if (((g !== 3 && g !== 4) || (n.status = 666), g === 1 || g === 3))
          return t.avail_out === 0 && (n.last_flush = -1), _d;
        if (
          g === 2 &&
          (e === vjt
            ? yjt(n)
            : e !== cbe &&
              (ste(n, 0, 0, !1),
              e === bjt &&
                (ET(n.head),
                n.lookahead === 0 &&
                  ((n.strstart = 0), (n.block_start = 0), (n.insert = 0)))),
          Sp(t),
          t.avail_out === 0)
        )
          return (n.last_flush = -1), _d;
      }
      return e !== am
        ? _d
        : n.wrap <= 0
        ? dbe
        : (n.wrap === 2
            ? (bs(n, 255 & t.adler),
              bs(n, (t.adler >> 8) & 255),
              bs(n, (t.adler >> 16) & 255),
              bs(n, (t.adler >> 24) & 255),
              bs(n, 255 & t.total_in),
              bs(n, (t.total_in >> 8) & 255),
              bs(n, (t.total_in >> 16) & 255),
              bs(n, (t.total_in >> 24) & 255))
            : (nM(n, t.adler >>> 16), nM(n, 65535 & t.adler)),
          Sp(t),
          n.wrap > 0 && (n.wrap = -n.wrap),
          n.pending !== 0 ? _d : dbe);
    },
    deflateEnd: function (t) {
      if (lC(t)) return By;
      var e = t.state.status;
      return (t.state = null), e === 113 ? nS(t, _jt) : _d;
    },
    deflateSetDictionary: function (t, e) {
      var n = e.length;
      if (lC(t)) return By;
      var r = t.state,
        i = r.wrap;
      if (i === 2 || (i === 1 && r.status !== 42) || r.lookahead) return By;
      if (
        (i === 1 && (t.adler = e$(t.adler, e, n, 0)),
        (r.wrap = 0),
        n >= r.w_size)
      ) {
        i === 0 &&
          (ET(r.head), (r.strstart = 0), (r.block_start = 0), (r.insert = 0));
        var o = new Uint8Array(r.w_size);
        o.set(e.subarray(n - r.w_size, n), 0), (e = o), (n = r.w_size);
      }
      var l = t.avail_in,
        u = t.next_in,
        c = t.input;
      for (
        t.avail_in = n, t.next_in = 0, t.input = e, pk(r);
        r.lookahead >= 3;

      ) {
        var d = r.strstart,
          h = r.lookahead - 2;
        do
          (r.ins_h = BT(r, r.ins_h, r.window[d + 3 - 1])),
            (r.prev[d & r.w_mask] = r.head[r.ins_h]),
            (r.head[r.ins_h] = d),
            d++;
        while (--h);
        (r.strstart = d), (r.lookahead = 2), pk(r);
      }
      return (
        (r.strstart += r.lookahead),
        (r.block_start = r.strstart),
        (r.insert = r.lookahead),
        (r.lookahead = 0),
        (r.match_length = r.prev_length = 2),
        (r.match_available = 0),
        (t.next_in = u),
        (t.input = c),
        (t.avail_in = l),
        (r.wrap = i),
        _d
      );
    },
    deflateInfo: "pako deflate (from Nodeca project)",
  },
  $jt = function (t, e) {
    return Object.prototype.hasOwnProperty.call(t, e);
  },
  oB = {
    assign: function (t) {
      for (var e = jn(Array.prototype).call(arguments, 1); e.length; ) {
        var n = e.shift();
        if (n) {
          if (ti(n) != "object") throw new TypeError(n + "must be non-object");
          for (var r in n) $jt(n, r) && (t[r] = n[r]);
        }
      }
      return t;
    },
    flattenChunks: function (t) {
      for (var e = 0, n = 0, r = t.length; n < r; n++) e += t[n].length;
      for (var i = new Uint8Array(e), o = 0, l = 0, u = t.length; o < u; o++) {
        var c = t[o];
        i.set(c, l), (l += c.length);
      }
      return i;
    },
  },
  $Be = !0;
try {
  String.fromCharCode.apply(null, new Uint8Array(1));
} catch {
  $Be = !1;
}
for (var Mx = new Uint8Array(256), X_ = 0; X_ < 256; X_++)
  Mx[X_] =
    X_ >= 252
      ? 6
      : X_ >= 248
      ? 5
      : X_ >= 240
      ? 4
      : X_ >= 224
      ? 3
      : X_ >= 192
      ? 2
      : 1;
Mx[254] = Mx[254] = 1;
var Cx = {
    string2buf: function (t) {
      if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
        return new TextEncoder().encode(t);
      var e,
        n,
        r,
        i,
        o,
        l = t.length,
        u = 0;
      for (i = 0; i < l; i++)
        (64512 & (n = t.charCodeAt(i))) == 55296 &&
          i + 1 < l &&
          (64512 & (r = t.charCodeAt(i + 1))) == 56320 &&
          ((n = 65536 + ((n - 55296) << 10) + (r - 56320)), i++),
          (u += n < 128 ? 1 : n < 2048 ? 2 : n < 65536 ? 3 : 4);
      for (e = new Uint8Array(u), o = 0, i = 0; o < u; i++)
        (64512 & (n = t.charCodeAt(i))) == 55296 &&
          i + 1 < l &&
          (64512 & (r = t.charCodeAt(i + 1))) == 56320 &&
          ((n = 65536 + ((n - 55296) << 10) + (r - 56320)), i++),
          n < 128
            ? (e[o++] = n)
            : n < 2048
            ? ((e[o++] = 192 | (n >>> 6)), (e[o++] = 128 | (63 & n)))
            : n < 65536
            ? ((e[o++] = 224 | (n >>> 12)),
              (e[o++] = 128 | ((n >>> 6) & 63)),
              (e[o++] = 128 | (63 & n)))
            : ((e[o++] = 240 | (n >>> 18)),
              (e[o++] = 128 | ((n >>> 12) & 63)),
              (e[o++] = 128 | ((n >>> 6) & 63)),
              (e[o++] = 128 | (63 & n)));
      return e;
    },
    buf2string: function (t, e) {
      var n,
        r,
        i = e || t.length;
      if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
        return new TextDecoder().decode(t.subarray(0, e));
      var o = new Array(2 * i);
      for (r = 0, n = 0; n < i; ) {
        var l = t[n++];
        if (l < 128) o[r++] = l;
        else {
          var u = Mx[l];
          if (u > 4) (o[r++] = 65533), (n += u - 1);
          else {
            for (l &= u === 2 ? 31 : u === 3 ? 15 : 7; u > 1 && n < i; )
              (l = (l << 6) | (63 & t[n++])), u--;
            u > 1
              ? (o[r++] = 65533)
              : l < 65536
              ? (o[r++] = l)
              : ((l -= 65536),
                (o[r++] = 55296 | ((l >> 10) & 1023)),
                (o[r++] = 56320 | (1023 & l)));
          }
        }
      }
      return (function (c, d) {
        if (d < 65534 && c.subarray && $Be)
          return String.fromCharCode.apply(
            null,
            c.length === d ? c : c.subarray(0, d)
          );
        for (var h = "", f = 0; f < d; f++) h += String.fromCharCode(c[f]);
        return h;
      })(o, r);
    },
    utf8border: function (t, e) {
      (e = e || t.length) > t.length && (e = t.length);
      for (var n = e - 1; n >= 0 && (192 & t[n]) == 128; ) n--;
      return n < 0 || n === 0 ? e : n + Mx[t[n]] > e ? n : e;
    },
  },
  xBe = function () {
    (this.input = null),
      (this.next_in = 0),
      (this.avail_in = 0),
      (this.total_in = 0),
      (this.output = null),
      (this.next_out = 0),
      (this.avail_out = 0),
      (this.total_out = 0),
      (this.msg = ""),
      (this.state = null),
      (this.data_type = 2),
      (this.adler = 0);
  },
  LBe = Object.prototype.toString,
  xjt = xa.Z_NO_FLUSH,
  Ljt = xa.Z_SYNC_FLUSH,
  Ojt = xa.Z_FULL_FLUSH,
  Gjt = xa.Z_FINISH,
  DU = xa.Z_OK,
  Njt = xa.Z_STREAM_END,
  Fjt = xa.Z_DEFAULT_COMPRESSION,
  Ujt = xa.Z_DEFAULT_STRATEGY,
  Bjt = xa.Z_DEFLATED;
function n$(t) {
  this.options = oB.assign(
    {
      level: Fjt,
      method: Bjt,
      chunkSize: 16384,
      windowBits: 15,
      memLevel: 8,
      strategy: Ujt,
    },
    t || {}
  );
  var e = this.options;
  e.raw && e.windowBits > 0
    ? (e.windowBits = -e.windowBits)
    : e.gzip && e.windowBits > 0 && e.windowBits < 16 && (e.windowBits += 16),
    (this.err = 0),
    (this.msg = ""),
    (this.ended = !1),
    (this.chunks = []),
    (this.strm = new xBe()),
    (this.strm.avail_out = 0);
  var n = t$.deflateInit2(
    this.strm,
    e.level,
    e.method,
    e.windowBits,
    e.memLevel,
    e.strategy
  );
  if (n !== DU) throw new Error(VS[n]);
  if ((e.header && t$.deflateSetHeader(this.strm, e.header), e.dictionary)) {
    var r;
    if (
      ((r =
        typeof e.dictionary == "string"
          ? Cx.string2buf(e.dictionary)
          : LBe.call(e.dictionary) === "[object ArrayBuffer]"
          ? new Uint8Array(e.dictionary)
          : e.dictionary),
      (n = t$.deflateSetDictionary(this.strm, r)) !== DU)
    )
      throw new Error(VS[n]);
    this._dict_set = !0;
  }
}
function lz(t, e) {
  var n = new n$(e);
  if ((n.push(t, !0), n.err)) throw n.msg || VS[n.err];
  return n.result;
}
(n$.prototype.push = function (t, e) {
  var n,
    r,
    i = this.strm,
    o = this.options.chunkSize;
  if (this.ended) return !1;
  for (
    r = e === ~~e ? e : e === !0 ? Gjt : xjt,
      typeof t == "string"
        ? (i.input = Cx.string2buf(t))
        : LBe.call(t) === "[object ArrayBuffer]"
        ? (i.input = new Uint8Array(t))
        : (i.input = t),
      i.next_in = 0,
      i.avail_in = i.input.length;
    ;

  )
    if (
      (i.avail_out === 0 &&
        ((i.output = new Uint8Array(o)), (i.next_out = 0), (i.avail_out = o)),
      (r === Ljt || r === Ojt) && i.avail_out <= 6)
    )
      this.onData(i.output.subarray(0, i.next_out)), (i.avail_out = 0);
    else {
      if ((n = t$.deflate(i, r)) === Njt)
        return (
          i.next_out > 0 && this.onData(i.output.subarray(0, i.next_out)),
          (n = t$.deflateEnd(this.strm)),
          this.onEnd(n),
          (this.ended = !0),
          n === DU
        );
      if (i.avail_out !== 0) {
        if (r > 0 && i.next_out > 0)
          this.onData(i.output.subarray(0, i.next_out)), (i.avail_out = 0);
        else if (i.avail_in === 0) break;
      } else this.onData(i.output);
    }
  return !0;
}),
  (n$.prototype.onData = function (t) {
    this.chunks.push(t);
  }),
  (n$.prototype.onEnd = function (t) {
    t === DU && (this.result = oB.flattenChunks(this.chunks)),
      (this.chunks = []),
      (this.err = t),
      (this.msg = this.strm.msg);
  });
var v3 = {
    Deflate: n$,
    deflate: lz,
    deflateRaw: function (t, e) {
      return ((e = e || {}).raw = !0), lz(t, e);
    },
    gzip: function (t, e) {
      return ((e = e || {}).gzip = !0), lz(t, e);
    },
    constants: xa,
  },
  Hjt = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f,
      p,
      g,
      y,
      v,
      b,
      w,
      k,
      D,
      $,
      N,
      P,
      I,
      O,
      X,
      G = t.state;
    (n = t.next_in),
      (O = t.input),
      (r = n + (t.avail_in - 5)),
      (i = t.next_out),
      (X = t.output),
      (o = i - (e - t.avail_out)),
      (l = i + (t.avail_out - 257)),
      (u = G.dmax),
      (c = G.wsize),
      (d = G.whave),
      (h = G.wnext),
      (f = G.window),
      (p = G.hold),
      (g = G.bits),
      (y = G.lencode),
      (v = G.distcode),
      (b = (1 << G.lenbits) - 1),
      (w = (1 << G.distbits) - 1);
    e: do {
      g < 15 && ((p += O[n++] << g), (g += 8), (p += O[n++] << g), (g += 8)),
        (k = y[p & b]);
      t: for (;;) {
        if (((p >>>= D = k >>> 24), (g -= D), (D = (k >>> 16) & 255) == 0))
          X[i++] = 65535 & k;
        else {
          if (!(16 & D)) {
            if (!(64 & D)) {
              k = y[(65535 & k) + (p & ((1 << D) - 1))];
              continue t;
            }
            if (32 & D) {
              G.mode = 16191;
              break e;
            }
            (t.msg = "invalid literal/length code"), (G.mode = 16209);
            break e;
          }
          ($ = 65535 & k),
            (D &= 15) &&
              (g < D && ((p += O[n++] << g), (g += 8)),
              ($ += p & ((1 << D) - 1)),
              (p >>>= D),
              (g -= D)),
            g < 15 &&
              ((p += O[n++] << g), (g += 8), (p += O[n++] << g), (g += 8)),
            (k = v[p & w]);
          n: for (;;) {
            if (
              ((p >>>= D = k >>> 24), (g -= D), !(16 & (D = (k >>> 16) & 255)))
            ) {
              if (!(64 & D)) {
                k = v[(65535 & k) + (p & ((1 << D) - 1))];
                continue n;
              }
              (t.msg = "invalid distance code"), (G.mode = 16209);
              break e;
            }
            if (
              ((N = 65535 & k),
              g < (D &= 15) &&
                ((p += O[n++] << g),
                (g += 8) < D && ((p += O[n++] << g), (g += 8))),
              (N += p & ((1 << D) - 1)) > u)
            ) {
              (t.msg = "invalid distance too far back"), (G.mode = 16209);
              break e;
            }
            if (((p >>>= D), (g -= D), N > (D = i - o))) {
              if ((D = N - D) > d && G.sane) {
                (t.msg = "invalid distance too far back"), (G.mode = 16209);
                break e;
              }
              if (((P = 0), (I = f), h === 0)) {
                if (((P += c - D), D < $)) {
                  $ -= D;
                  do X[i++] = f[P++];
                  while (--D);
                  (P = i - N), (I = X);
                }
              } else if (h < D) {
                if (((P += c + h - D), (D -= h) < $)) {
                  $ -= D;
                  do X[i++] = f[P++];
                  while (--D);
                  if (((P = 0), h < $)) {
                    $ -= D = h;
                    do X[i++] = f[P++];
                    while (--D);
                    (P = i - N), (I = X);
                  }
                }
              } else if (((P += h - D), D < $)) {
                $ -= D;
                do X[i++] = f[P++];
                while (--D);
                (P = i - N), (I = X);
              }
              for (; $ > 2; )
                (X[i++] = I[P++]),
                  (X[i++] = I[P++]),
                  (X[i++] = I[P++]),
                  ($ -= 3);
              $ && ((X[i++] = I[P++]), $ > 1 && (X[i++] = I[P++]));
            } else {
              P = i - N;
              do
                (X[i++] = X[P++]),
                  (X[i++] = X[P++]),
                  (X[i++] = X[P++]),
                  ($ -= 3);
              while ($ > 2);
              $ && ((X[i++] = X[P++]), $ > 1 && (X[i++] = X[P++]));
            }
            break;
          }
        }
        break;
      }
    } while (n < r && i < l);
    (n -= $ = g >> 3),
      (p &= (1 << (g -= $ << 3)) - 1),
      (t.next_in = n),
      (t.next_out = i),
      (t.avail_in = n < r ? r - n + 5 : 5 - (n - r)),
      (t.avail_out = i < l ? l - i + 257 : 257 - (i - l)),
      (G.hold = p),
      (G.bits = g);
  },
  Xjt = new Uint16Array([
    3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67,
    83, 99, 115, 131, 163, 195, 227, 258, 0, 0,
  ]),
  Vjt = new Uint8Array([
    16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19,
    19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78,
  ]),
  zjt = new Uint16Array([
    1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513,
    769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0,
  ]),
  jjt = new Uint8Array([
    16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24,
    24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64,
  ]),
  r$ = function (t, e, n, r, i, o, l, u) {
    var c,
      d,
      h,
      f,
      p,
      g,
      y,
      v,
      b,
      w = u.bits,
      k = 0,
      D = 0,
      $ = 0,
      N = 0,
      P = 0,
      I = 0,
      O = 0,
      X = 0,
      G = 0,
      H = 0,
      E = null,
      S = new Uint16Array(16),
      L = new Uint16Array(16),
      W = null;
    for (k = 0; k <= 15; k++) S[k] = 0;
    for (D = 0; D < r; D++) S[e[n + D]]++;
    for (P = w, N = 15; N >= 1 && S[N] === 0; N--);
    if ((P > N && (P = N), N === 0))
      return (i[o++] = 20971520), (i[o++] = 20971520), (u.bits = 1), 0;
    for ($ = 1; $ < N && S[$] === 0; $++);
    for (P < $ && (P = $), X = 1, k = 1; k <= 15; k++)
      if (((X <<= 1), (X -= S[k]) < 0)) return -1;
    if (X > 0 && (t === 0 || N !== 1)) return -1;
    for (L[1] = 0, k = 1; k < 15; k++) L[k + 1] = L[k] + S[k];
    for (D = 0; D < r; D++) e[n + D] !== 0 && (l[L[e[n + D]]++] = D);
    if (
      (t === 0
        ? ((E = W = l), (g = 20))
        : t === 1
        ? ((E = Xjt), (W = Vjt), (g = 257))
        : ((E = zjt), (W = jjt), (g = 0)),
      (H = 0),
      (D = 0),
      (k = $),
      (p = o),
      (I = P),
      (O = 0),
      (h = -1),
      (f = (G = 1 << P) - 1),
      (t === 1 && G > 852) || (t === 2 && G > 592))
    )
      return 1;
    for (;;) {
      (y = k - O),
        l[D] + 1 < g
          ? ((v = 0), (b = l[D]))
          : l[D] >= g
          ? ((v = W[l[D] - g]), (b = E[l[D] - g]))
          : ((v = 96), (b = 0)),
        (c = 1 << (k - O)),
        ($ = d = 1 << I);
      do i[p + (H >> O) + (d -= c)] = (y << 24) | (v << 16) | b | 0;
      while (d !== 0);
      for (c = 1 << (k - 1); H & c; ) c >>= 1;
      if ((c !== 0 ? ((H &= c - 1), (H += c)) : (H = 0), D++, --S[k] == 0)) {
        if (k === N) break;
        k = e[n + l[D]];
      }
      if (k > P && (H & f) !== h) {
        for (
          O === 0 && (O = P), p += $, X = 1 << (I = k - O);
          I + O < N && !((X -= S[I + O]) <= 0);

        )
          I++, (X <<= 1);
        if (((G += 1 << I), (t === 1 && G > 852) || (t === 2 && G > 592)))
          return 1;
        i[(h = H & f)] = (P << 24) | (I << 16) | (p - o) | 0;
      }
    }
    return (
      H !== 0 && (i[p + H] = ((k - O) << 24) | (64 << 16) | 0), (u.bits = P), 0
    );
  },
  pbe = xa.Z_FINISH,
  Wjt = xa.Z_BLOCK,
  b3 = xa.Z_TREES,
  rS = xa.Z_OK,
  Kjt = xa.Z_STREAM_END,
  Zjt = xa.Z_NEED_DICT,
  v0 = xa.Z_STREAM_ERROR,
  gbe = xa.Z_DATA_ERROR,
  mbe = xa.Z_MEM_ERROR,
  Yjt = xa.Z_BUF_ERROR,
  ybe = xa.Z_DEFLATED,
  vbe = function (t) {
    return (
      ((t >>> 24) & 255) +
      ((t >>> 8) & 65280) +
      ((65280 & t) << 8) +
      ((255 & t) << 24)
    );
  };
function Qjt() {
  (this.strm = null),
    (this.mode = 0),
    (this.last = !1),
    (this.wrap = 0),
    (this.havedict = !1),
    (this.flags = 0),
    (this.dmax = 0),
    (this.check = 0),
    (this.total = 0),
    (this.head = null),
    (this.wbits = 0),
    (this.wsize = 0),
    (this.whave = 0),
    (this.wnext = 0),
    (this.window = null),
    (this.hold = 0),
    (this.bits = 0),
    (this.length = 0),
    (this.offset = 0),
    (this.extra = 0),
    (this.lencode = null),
    (this.distcode = null),
    (this.lenbits = 0),
    (this.distbits = 0),
    (this.ncode = 0),
    (this.nlen = 0),
    (this.ndist = 0),
    (this.have = 0),
    (this.next = null),
    (this.lens = new Uint16Array(320)),
    (this.work = new Uint16Array(288)),
    (this.lendyn = null),
    (this.distdyn = null),
    (this.sane = 0),
    (this.back = 0),
    (this.was = 0);
}
var uz,
  cz,
  mS = function (t) {
    if (!t) return 1;
    var e = t.state;
    return !e || e.strm !== t || e.mode < 16180 || e.mode > 16211 ? 1 : 0;
  },
  OBe = function (t) {
    if (mS(t)) return v0;
    var e = t.state;
    return (
      (t.total_in = t.total_out = e.total = 0),
      (t.msg = ""),
      e.wrap && (t.adler = 1 & e.wrap),
      (e.mode = 16180),
      (e.last = 0),
      (e.havedict = 0),
      (e.flags = -1),
      (e.dmax = 32768),
      (e.head = null),
      (e.hold = 0),
      (e.bits = 0),
      (e.lencode = e.lendyn = new Int32Array(852)),
      (e.distcode = e.distdyn = new Int32Array(592)),
      (e.sane = 1),
      (e.back = -1),
      rS
    );
  },
  GBe = function (t) {
    if (mS(t)) return v0;
    var e = t.state;
    return (e.wsize = 0), (e.whave = 0), (e.wnext = 0), OBe(t);
  },
  NBe = function (t, e) {
    var n;
    if (mS(t)) return v0;
    var r = t.state;
    return (
      e < 0 ? ((n = 0), (e = -e)) : ((n = 5 + (e >> 4)), e < 48 && (e &= 15)),
      e && (e < 8 || e > 15)
        ? v0
        : (r.window !== null && r.wbits !== e && (r.window = null),
          (r.wrap = n),
          (r.wbits = e),
          GBe(t))
    );
  },
  bbe = function (t, e) {
    if (!t) return v0;
    var n = new Qjt();
    (t.state = n), (n.strm = t), (n.window = null), (n.mode = 16180);
    var r = NBe(t, e);
    return r !== rS && (t.state = null), r;
  },
  _be = !0,
  Jjt = function (t) {
    if (_be) {
      (uz = new Int32Array(512)), (cz = new Int32Array(32));
      for (var e = 0; e < 144; ) t.lens[e++] = 8;
      for (; e < 256; ) t.lens[e++] = 9;
      for (; e < 280; ) t.lens[e++] = 7;
      for (; e < 288; ) t.lens[e++] = 8;
      for (r$(1, t.lens, 0, 288, uz, 0, t.work, { bits: 9 }), e = 0; e < 32; )
        t.lens[e++] = 5;
      r$(2, t.lens, 0, 32, cz, 0, t.work, { bits: 5 }), (_be = !1);
    }
    (t.lencode = uz), (t.lenbits = 9), (t.distcode = cz), (t.distbits = 5);
  },
  Tbe = function (t, e, n, r) {
    var i,
      o = t.state;
    return (
      o.window === null &&
        ((o.wsize = 1 << o.wbits),
        (o.wnext = 0),
        (o.whave = 0),
        (o.window = new Uint8Array(o.wsize))),
      r >= o.wsize
        ? (o.window.set(e.subarray(n - o.wsize, n), 0),
          (o.wnext = 0),
          (o.whave = o.wsize))
        : ((i = o.wsize - o.wnext) > r && (i = r),
          o.window.set(e.subarray(n - r, n - r + i), o.wnext),
          (r -= i)
            ? (o.window.set(e.subarray(n - r, n), 0),
              (o.wnext = r),
              (o.whave = o.wsize))
            : ((o.wnext += i),
              o.wnext === o.wsize && (o.wnext = 0),
              o.whave < o.wsize && (o.whave += i))),
      0
    );
  },
  A1 = {
    inflateReset: GBe,
    inflateReset2: NBe,
    inflateResetKeep: OBe,
    inflateInit: function (t) {
      return bbe(t, 15);
    },
    inflateInit2: bbe,
    inflate: function (t, e) {
      var n,
        r,
        i,
        o,
        l,
        u,
        c,
        d,
        h,
        f,
        p,
        g,
        y,
        v,
        b,
        w,
        k,
        D,
        $,
        N,
        P,
        I,
        O,
        X,
        G = 0,
        H = new Uint8Array(4),
        E = new Uint8Array([
          16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
        ]);
      if (mS(t) || !t.output || (!t.input && t.avail_in !== 0)) return v0;
      (n = t.state).mode === 16191 && (n.mode = 16192),
        (l = t.next_out),
        (i = t.output),
        (c = t.avail_out),
        (o = t.next_in),
        (r = t.input),
        (u = t.avail_in),
        (d = n.hold),
        (h = n.bits),
        (f = u),
        (p = c),
        (I = rS);
      e: for (;;)
        switch (n.mode) {
          case 16180:
            if (n.wrap === 0) {
              n.mode = 16192;
              break;
            }
            for (; h < 16; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (2 & n.wrap && d === 35615) {
              n.wbits === 0 && (n.wbits = 15),
                (n.check = 0),
                (H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (n.check = Wc(n.check, H, 2, 0)),
                (d = 0),
                (h = 0),
                (n.mode = 16181);
              break;
            }
            if (
              (n.head && (n.head.done = !1),
              !(1 & n.wrap) || (((255 & d) << 8) + (d >> 8)) % 31)
            ) {
              (t.msg = "incorrect header check"), (n.mode = 16209);
              break;
            }
            if ((15 & d) !== ybe) {
              (t.msg = "unknown compression method"), (n.mode = 16209);
              break;
            }
            if (
              ((h -= 4),
              (P = 8 + (15 & (d >>>= 4))),
              n.wbits === 0 && (n.wbits = P),
              P > 15 || P > n.wbits)
            ) {
              (t.msg = "invalid window size"), (n.mode = 16209);
              break;
            }
            (n.dmax = 1 << n.wbits),
              (n.flags = 0),
              (t.adler = n.check = 1),
              (n.mode = 512 & d ? 16189 : 16191),
              (d = 0),
              (h = 0);
            break;
          case 16181:
            for (; h < 16; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (((n.flags = d), (255 & Ca(n)) !== ybe)) {
              (t.msg = "unknown compression method"), (n.mode = 16209);
              break;
            }
            if (57344 & Ca(n)) {
              (t.msg = "unknown header flags set"), (n.mode = 16209);
              break;
            }
            n.head && (n.head.text = (d >> 8) & 1),
              512 & Ca(n) &&
                4 & n.wrap &&
                ((H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (n.check = Wc(n.check, H, 2, 0))),
              (d = 0),
              (h = 0),
              (n.mode = 16182);
          case 16182:
            for (; h < 32; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            n.head && (n.head.time = d),
              512 & Ca(n) &&
                4 & n.wrap &&
                ((H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (H[2] = (d >>> 16) & 255),
                (H[3] = (d >>> 24) & 255),
                (n.check = Wc(n.check, H, 4, 0))),
              (d = 0),
              (h = 0),
              (n.mode = 16183);
          case 16183:
            for (; h < 16; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            n.head && ((n.head.xflags = 255 & d), (n.head.os = d >> 8)),
              512 & Ca(n) &&
                4 & n.wrap &&
                ((H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (n.check = Wc(n.check, H, 2, 0))),
              (d = 0),
              (h = 0),
              (n.mode = 16184);
          case 16184:
            if (1024 & Ca(n)) {
              for (; h < 16; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.length = d),
                n.head && (n.head.extra_len = d),
                512 & Ca(n) &&
                  4 & n.wrap &&
                  ((H[0] = 255 & d),
                  (H[1] = (d >>> 8) & 255),
                  (n.check = Wc(n.check, H, 2, 0))),
                (d = 0),
                (h = 0);
            } else n.head && (n.head.extra = null);
            n.mode = 16185;
          case 16185:
            if (
              1024 & Ca(n) &&
              ((g = n.length) > u && (g = u),
              g &&
                (n.head &&
                  ((P = n.head.extra_len - n.length),
                  n.head.extra ||
                    (n.head.extra = new Uint8Array(n.head.extra_len)),
                  n.head.extra.set(r.subarray(o, o + g), P)),
                512 & Ca(n) && 4 & n.wrap && (n.check = Wc(n.check, r, g, o)),
                (u -= g),
                (o += g),
                (n.length -= g)),
              n.length)
            )
              break e;
            (n.length = 0), (n.mode = 16186);
          case 16186:
            if (2048 & Ca(n)) {
              if (u === 0) break e;
              g = 0;
              do
                (P = r[o + g++]),
                  n.head &&
                    P &&
                    n.length < 65536 &&
                    (n.head.name += String.fromCharCode(P));
              while (P && g < u);
              if (
                (512 & Ca(n) && 4 & n.wrap && (n.check = Wc(n.check, r, g, o)),
                (u -= g),
                (o += g),
                P)
              )
                break e;
            } else n.head && (n.head.name = null);
            (n.length = 0), (n.mode = 16187);
          case 16187:
            if (4096 & Ca(n)) {
              if (u === 0) break e;
              g = 0;
              do
                (P = r[o + g++]),
                  n.head &&
                    P &&
                    n.length < 65536 &&
                    (n.head.comment += String.fromCharCode(P));
              while (P && g < u);
              if (
                (512 & Ca(n) && 4 & n.wrap && (n.check = Wc(n.check, r, g, o)),
                (u -= g),
                (o += g),
                P)
              )
                break e;
            } else n.head && (n.head.comment = null);
            n.mode = 16188;
          case 16188:
            if (512 & Ca(n)) {
              for (; h < 16; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              if (4 & n.wrap && d !== (65535 & n.check)) {
                (t.msg = "header crc mismatch"), (n.mode = 16209);
                break;
              }
              (d = 0), (h = 0);
            }
            n.head && ((n.head.hcrc = (Ca(n) >> 9) & 1), (n.head.done = !0)),
              (t.adler = n.check = 0),
              (n.mode = 16191);
            break;
          case 16189:
            for (; h < 32; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            (t.adler = n.check = vbe(d)), (d = 0), (h = 0), (n.mode = 16190);
          case 16190:
            if (n.havedict === 0)
              return (
                (t.next_out = l),
                (t.avail_out = c),
                (t.next_in = o),
                (t.avail_in = u),
                (n.hold = d),
                (n.bits = h),
                Zjt
              );
            (t.adler = n.check = 1), (n.mode = 16191);
          case 16191:
            if (e === Wjt || e === b3) break e;
          case 16192:
            if (n.last) {
              (d >>>= 7 & h), (h -= 7 & h), (n.mode = 16206);
              break;
            }
            for (; h < 3; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            switch (((n.last = 1 & d), (h -= 1), 3 & (d >>>= 1))) {
              case 0:
                n.mode = 16193;
                break;
              case 1:
                if ((Jjt(n), (n.mode = 16199), e === b3)) {
                  (d >>>= 2), (h -= 2);
                  break e;
                }
                break;
              case 2:
                n.mode = 16196;
                break;
              case 3:
                (t.msg = "invalid block type"), (n.mode = 16209);
            }
            (d >>>= 2), (h -= 2);
            break;
          case 16193:
            for (d >>>= 7 & h, h -= 7 & h; h < 32; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if ((65535 & d) != ((d >>> 16) ^ 65535)) {
              (t.msg = "invalid stored block lengths"), (n.mode = 16209);
              break;
            }
            if (
              ((n.length = 65535 & d),
              (d = 0),
              (h = 0),
              (n.mode = 16194),
              e === b3)
            )
              break e;
          case 16194:
            n.mode = 16195;
          case 16195:
            if ((g = n.length)) {
              if ((g > u && (g = u), g > c && (g = c), g === 0)) break e;
              i.set(r.subarray(o, o + g), l),
                (u -= g),
                (o += g),
                (c -= g),
                (l += g),
                (n.length -= g);
              break;
            }
            n.mode = 16191;
            break;
          case 16196:
            for (; h < 14; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (
              ((n.nlen = 257 + (31 & d)),
              (d >>>= 5),
              (h -= 5),
              (n.ndist = 1 + (31 & d)),
              (d >>>= 5),
              (h -= 5),
              (n.ncode = 4 + (15 & d)),
              (d >>>= 4),
              (h -= 4),
              n.nlen > 286 || n.ndist > 30)
            ) {
              (t.msg = "too many length or distance symbols"), (n.mode = 16209);
              break;
            }
            (n.have = 0), (n.mode = 16197);
          case 16197:
            for (; n.have < n.ncode; ) {
              for (; h < 3; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.lens[E[n.have++]] = 7 & d), (d >>>= 3), (h -= 3);
            }
            for (; n.have < 19; ) n.lens[E[n.have++]] = 0;
            if (
              ((n.lencode = n.lendyn),
              (n.lenbits = 7),
              (O = { bits: n.lenbits }),
              (I = r$(0, n.lens, 0, 19, n.lencode, 0, n.work, O)),
              (n.lenbits = O.bits),
              I)
            ) {
              (t.msg = "invalid code lengths set"), (n.mode = 16209);
              break;
            }
            (n.have = 0), (n.mode = 16198);
          case 16198:
            for (; n.have < n.nlen + n.ndist; ) {
              for (
                ;
                (w =
                  ((G = n.lencode[d & ((1 << n.lenbits) - 1)]) >>> 16) & 255),
                  (k = 65535 & G),
                  !((b = G >>> 24) <= h);

              ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              if (k < 16) (d >>>= b), (h -= b), (n.lens[n.have++] = k);
              else {
                if (k === 16) {
                  for (X = b + 2; h < X; ) {
                    if (u === 0) break e;
                    u--, (d += r[o++] << h), (h += 8);
                  }
                  if (((d >>>= b), (h -= b), n.have === 0)) {
                    (t.msg = "invalid bit length repeat"), (n.mode = 16209);
                    break;
                  }
                  (P = n.lens[n.have - 1]),
                    (g = 3 + (3 & d)),
                    (d >>>= 2),
                    (h -= 2);
                } else if (k === 17) {
                  for (X = b + 3; h < X; ) {
                    if (u === 0) break e;
                    u--, (d += r[o++] << h), (h += 8);
                  }
                  (h -= b),
                    (P = 0),
                    (g = 3 + (7 & (d >>>= b))),
                    (d >>>= 3),
                    (h -= 3);
                } else {
                  for (X = b + 7; h < X; ) {
                    if (u === 0) break e;
                    u--, (d += r[o++] << h), (h += 8);
                  }
                  (h -= b),
                    (P = 0),
                    (g = 11 + (127 & (d >>>= b))),
                    (d >>>= 7),
                    (h -= 7);
                }
                if (n.have + g > n.nlen + n.ndist) {
                  (t.msg = "invalid bit length repeat"), (n.mode = 16209);
                  break;
                }
                for (; g--; ) n.lens[n.have++] = P;
              }
            }
            if (n.mode === 16209) break;
            if (n.lens[256] === 0) {
              (t.msg = "invalid code -- missing end-of-block"),
                (n.mode = 16209);
              break;
            }
            if (
              ((n.lenbits = 9),
              (O = { bits: n.lenbits }),
              (I = r$(1, n.lens, 0, n.nlen, n.lencode, 0, n.work, O)),
              (n.lenbits = O.bits),
              I)
            ) {
              (t.msg = "invalid literal/lengths set"), (n.mode = 16209);
              break;
            }
            if (
              ((n.distbits = 6),
              (n.distcode = n.distdyn),
              (O = { bits: n.distbits }),
              (I = r$(2, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, O)),
              (n.distbits = O.bits),
              I)
            ) {
              (t.msg = "invalid distances set"), (n.mode = 16209);
              break;
            }
            if (((n.mode = 16199), e === b3)) break e;
          case 16199:
            n.mode = 16200;
          case 16200:
            if (u >= 6 && c >= 258) {
              (t.next_out = l),
                (t.avail_out = c),
                (t.next_in = o),
                (t.avail_in = u),
                (n.hold = d),
                (n.bits = h),
                Hjt(t, p),
                (l = t.next_out),
                (i = t.output),
                (c = t.avail_out),
                (o = t.next_in),
                (r = t.input),
                (u = t.avail_in),
                (d = n.hold),
                (h = n.bits),
                n.mode === 16191 && (n.back = -1);
              break;
            }
            for (
              n.back = 0;
              (w = ((G = n.lencode[d & ((1 << n.lenbits) - 1)]) >>> 16) & 255),
                (k = 65535 & G),
                !((b = G >>> 24) <= h);

            ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (w && !(240 & w)) {
              for (
                D = b, $ = w, N = k;
                (w =
                  ((G = n.lencode[N + ((d & ((1 << (D + $)) - 1)) >> D)]) >>>
                    16) &
                  255),
                  (k = 65535 & G),
                  !(D + (b = G >>> 24) <= h);

              ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (d >>>= D), (h -= D), (n.back += D);
            }
            if (
              ((d >>>= b), (h -= b), (n.back += b), (n.length = k), w === 0)
            ) {
              n.mode = 16205;
              break;
            }
            if (32 & w) {
              (n.back = -1), (n.mode = 16191);
              break;
            }
            if (64 & w) {
              (t.msg = "invalid literal/length code"), (n.mode = 16209);
              break;
            }
            (n.extra = 15 & w), (n.mode = 16201);
          case 16201:
            if (n.extra) {
              for (X = n.extra; h < X; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.length += d & ((1 << n.extra) - 1)),
                (d >>>= n.extra),
                (h -= n.extra),
                (n.back += n.extra);
            }
            (n.was = n.length), (n.mode = 16202);
          case 16202:
            for (
              ;
              (w =
                ((G = n.distcode[d & ((1 << n.distbits) - 1)]) >>> 16) & 255),
                (k = 65535 & G),
                !((b = G >>> 24) <= h);

            ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (!(240 & w)) {
              for (
                D = b, $ = w, N = k;
                (w =
                  ((G = n.distcode[N + ((d & ((1 << (D + $)) - 1)) >> D)]) >>>
                    16) &
                  255),
                  (k = 65535 & G),
                  !(D + (b = G >>> 24) <= h);

              ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (d >>>= D), (h -= D), (n.back += D);
            }
            if (((d >>>= b), (h -= b), (n.back += b), 64 & w)) {
              (t.msg = "invalid distance code"), (n.mode = 16209);
              break;
            }
            (n.offset = k), (n.extra = 15 & w), (n.mode = 16203);
          case 16203:
            if (n.extra) {
              for (X = n.extra; h < X; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.offset += d & ((1 << n.extra) - 1)),
                (d >>>= n.extra),
                (h -= n.extra),
                (n.back += n.extra);
            }
            if (n.offset > n.dmax) {
              (t.msg = "invalid distance too far back"), (n.mode = 16209);
              break;
            }
            n.mode = 16204;
          case 16204:
            if (c === 0) break e;
            if (((g = p - c), n.offset > g)) {
              if ((g = n.offset - g) > n.whave && n.sane) {
                (t.msg = "invalid distance too far back"), (n.mode = 16209);
                break;
              }
              g > n.wnext
                ? ((g -= n.wnext), (y = n.wsize - g))
                : (y = n.wnext - g),
                g > n.length && (g = n.length),
                (v = n.window);
            } else (v = i), (y = l - n.offset), (g = n.length);
            g > c && (g = c), (c -= g), (n.length -= g);
            do i[l++] = v[y++];
            while (--g);
            n.length === 0 && (n.mode = 16200);
            break;
          case 16205:
            if (c === 0) break e;
            (i[l++] = n.length), c--, (n.mode = 16200);
            break;
          case 16206:
            if (n.wrap) {
              for (; h < 32; ) {
                if (u === 0) break e;
                u--, (d |= r[o++] << h), (h += 8);
              }
              if (
                ((p -= c),
                (t.total_out += p),
                (n.total += p),
                4 & n.wrap &&
                  p &&
                  (t.adler = n.check =
                    Ca(n)
                      ? Wc(n.check, i, p, l - p)
                      : e$(n.check, i, p, l - p)),
                (p = c),
                4 & n.wrap && (Ca(n) ? d : vbe(d)) !== n.check)
              ) {
                (t.msg = "incorrect data check"), (n.mode = 16209);
                break;
              }
              (d = 0), (h = 0);
            }
            n.mode = 16207;
          case 16207:
            if (n.wrap && Ca(n)) {
              for (; h < 32; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              if (4 & n.wrap && d !== (4294967295 & n.total)) {
                (t.msg = "incorrect length check"), (n.mode = 16209);
                break;
              }
              (d = 0), (h = 0);
            }
            n.mode = 16208;
          case 16208:
            I = Kjt;
            break e;
          case 16209:
            I = gbe;
            break e;
          case 16210:
            return mbe;
          default:
            return v0;
        }
      return (
        (t.next_out = l),
        (t.avail_out = c),
        (t.next_in = o),
        (t.avail_in = u),
        (n.hold = d),
        (n.bits = h),
        (n.wsize ||
          (p !== t.avail_out &&
            n.mode < 16209 &&
            (n.mode < 16206 || e !== pbe))) &&
          Tbe(t, t.output, t.next_out, p - t.avail_out),
        (f -= t.avail_in),
        (p -= t.avail_out),
        (t.total_in += f),
        (t.total_out += p),
        (n.total += p),
        4 & n.wrap &&
          p &&
          (t.adler = n.check =
            Ca(n)
              ? Wc(n.check, i, p, t.next_out - p)
              : e$(n.check, i, p, t.next_out - p)),
        (t.data_type =
          n.bits +
          (n.last ? 64 : 0) +
          (n.mode === 16191 ? 128 : 0) +
          (n.mode === 16199 || n.mode === 16194 ? 256 : 0)),
        ((f === 0 && p === 0) || e === pbe) && I === rS && (I = Yjt),
        I
      );
    },
    inflateEnd: function (t) {
      if (mS(t)) return v0;
      var e = t.state;
      return e.window && (e.window = null), (t.state = null), rS;
    },
    inflateGetHeader: function (t, e) {
      if (mS(t)) return v0;
      var n = t.state;
      return 2 & n.wrap ? ((n.head = e), (e.done = !1), rS) : v0;
    },
    inflateSetDictionary: function (t, e) {
      var n,
        r = e.length;
      return mS(t) || ((n = t.state).wrap !== 0 && n.mode !== 16190)
        ? v0
        : n.mode === 16190 && e$(1, e, r, 0) !== n.check
        ? gbe
        : Tbe(t, e, r, r)
        ? ((n.mode = 16210), mbe)
        : ((n.havedict = 1), rS);
    },
    inflateInfo: "pako inflate (from Nodeca project)",
  },
  qjt = function () {
    (this.text = 0),
      (this.time = 0),
      (this.xflags = 0),
      (this.os = 0),
      (this.extra = null),
      (this.extra_len = 0),
      (this.name = ""),
      (this.comment = ""),
      (this.hcrc = 0),
      (this.done = !1);
  },
  FBe = Object.prototype.toString,
  eWt = xa.Z_NO_FLUSH,
  tWt = xa.Z_FINISH,
  i$ = xa.Z_OK,
  dz = xa.Z_STREAM_END,
  hz = xa.Z_NEED_DICT,
  nWt = xa.Z_STREAM_ERROR,
  Ebe = xa.Z_DATA_ERROR,
  rWt = xa.Z_MEM_ERROR;
function a$(t) {
  this.options = oB.assign(
    { chunkSize: 65536, windowBits: 15, to: "" },
    t || {}
  );
  var e = this.options;
  e.raw &&
    e.windowBits >= 0 &&
    e.windowBits < 16 &&
    ((e.windowBits = -e.windowBits),
    e.windowBits === 0 && (e.windowBits = -15)),
    !(e.windowBits >= 0 && e.windowBits < 16) ||
      (t && t.windowBits) ||
      (e.windowBits += 32),
    e.windowBits > 15 &&
      e.windowBits < 48 &&
      !(15 & e.windowBits) &&
      (e.windowBits |= 15),
    (this.err = 0),
    (this.msg = ""),
    (this.ended = !1),
    (this.chunks = []),
    (this.strm = new xBe()),
    (this.strm.avail_out = 0);
  var n = A1.inflateInit2(this.strm, e.windowBits);
  if (n !== i$) throw new Error(VS[n]);
  if (
    ((this.header = new qjt()),
    A1.inflateGetHeader(this.strm, this.header),
    e.dictionary &&
      (typeof e.dictionary == "string"
        ? (e.dictionary = Cx.string2buf(e.dictionary))
        : FBe.call(e.dictionary) === "[object ArrayBuffer]" &&
          (e.dictionary = new Uint8Array(e.dictionary)),
      e.raw && (n = A1.inflateSetDictionary(this.strm, e.dictionary)) !== i$))
  )
    throw new Error(VS[n]);
}
function fz(t, e) {
  var n = new a$(e);
  if ((n.push(t), n.err)) throw n.msg || VS[n.err];
  return n.result;
}
(a$.prototype.push = function (t, e) {
  var n,
    r,
    i,
    o = this.strm,
    l = this.options.chunkSize,
    u = this.options.dictionary;
  if (this.ended) return !1;
  for (
    r = e === ~~e ? e : e === !0 ? tWt : eWt,
      FBe.call(t) === "[object ArrayBuffer]"
        ? (o.input = new Uint8Array(t))
        : (o.input = t),
      o.next_in = 0,
      o.avail_in = o.input.length;
    ;

  ) {
    for (
      o.avail_out === 0 &&
        ((o.output = new Uint8Array(l)), (o.next_out = 0), (o.avail_out = l)),
        (n = A1.inflate(o, r)) === hz &&
          u &&
          ((n = A1.inflateSetDictionary(o, u)) === i$
            ? (n = A1.inflate(o, r))
            : n === Ebe && (n = hz));
      o.avail_in > 0 && n === dz && o.state.wrap > 0 && t[o.next_in] !== 0;

    )
      A1.inflateReset(o), (n = A1.inflate(o, r));
    switch (n) {
      case nWt:
      case Ebe:
      case hz:
      case rWt:
        return this.onEnd(n), (this.ended = !0), !1;
    }
    if (((i = o.avail_out), o.next_out && (o.avail_out === 0 || n === dz)))
      if (this.options.to === "string") {
        var c = Cx.utf8border(o.output, o.next_out),
          d = o.next_out - c,
          h = Cx.buf2string(o.output, c);
        (o.next_out = d),
          (o.avail_out = l - d),
          d && o.output.set(o.output.subarray(c, c + d), 0),
          this.onData(h);
      } else
        this.onData(
          o.output.length === o.next_out
            ? o.output
            : o.output.subarray(0, o.next_out)
        );
    if (n !== i$ || i !== 0) {
      if (n === dz)
        return (
          (n = A1.inflateEnd(this.strm)), this.onEnd(n), (this.ended = !0), !0
        );
      if (o.avail_in === 0) break;
    }
  }
  return !0;
}),
  (a$.prototype.onData = function (t) {
    this.chunks.push(t);
  }),
  (a$.prototype.onEnd = function (t) {
    t === i$ &&
      (this.options.to === "string"
        ? (this.result = this.chunks.join(""))
        : (this.result = oB.flattenChunks(this.chunks))),
      (this.chunks = []),
      (this.err = t),
      (this.msg = this.strm.msg);
  });
var _3 = {
    Inflate: a$,
    inflate: fz,
    inflateRaw: function (t, e) {
      return ((e = e || {}).raw = !0), fz(t, e);
    },
    ungzip: fz,
    constants: xa,
  },
  iWt = {
    Deflate: v3.Deflate,
    deflate: v3.deflate,
    deflateRaw: v3.deflateRaw,
    gzip: v3.gzip,
    Inflate: _3.Inflate,
    inflate: _3.inflate,
    inflateRaw: _3.inflateRaw,
    ungzip: _3.ungzip,
    constants: xa,
  },
  aWt = function () {
    return !(!window.navigator || !window.navigator.sendBeacon);
  },
  oWt = (function () {
    function t(e, n) {
      var r = this;
      (this.collector = e),
        (this.config = n),
        (this.requestType = n.request_type || "xhr"),
        (this.supportBeacon = aWt()),
        (this.errorCode = {
          NO_URL: 4001,
          IMG_ON: 4e3,
          IMG_CATCH: 4002,
          BEACON_FALSE: 4003,
          XHR_ON: 500,
          RESPONSE: 5001,
          TIMEOUT: 5005,
        }),
        (this.customHeader = n.custom_request_header || {}),
        this.collector.on("custom-request-header", function (i) {
          r.setRequestHeader(i);
        });
    }
    return (
      (t.prototype.setRequestHeader = function (e) {
        this.customHeader = Ci(this.customHeader, e);
      }),
      (t.prototype.useFetch = function (e) {
        var n = e.url,
          r = e.data,
          i = e.method,
          o = e.success,
          l = e.fail,
          u = { "Content-Type": "application/json; charset=utf-8" };
        if (Dn(this.customHeader).length)
          for (var c in this.customHeader) u[c] = this.customHeader[c];
        window.fetch
          ? fetch(n, { method: i || "POST", headers: u, body: lr(r) })
              .then(function (d) {
                return d.json();
              })
              .then(function (d) {
                o && o(d);
              })
              .catch(function (d) {
                l && l(r, d);
              })
          : ((this.requestType = "xhr"),
            console.log("your brwoser not support fetch, use xhr"),
            this.useRequest({
              url: n,
              data: r,
              method: i,
              success: o,
              fail: l,
            }));
      }),
      (t.prototype.useBeacon = function (e) {
        var n = e.url,
          r = e.data,
          i = e.success,
          o = e.fail;
        window.navigator.sendBeacon(n, lr(r))
          ? i && i()
          : o && o(r, this.errorCode.BEACON_FALSE);
      }),
      (t.prototype.useRequest = function (e) {
        var n = this,
          r = e.url,
          i = e.data,
          o = e.method,
          l = e.success,
          u = e.fail,
          c = e.timeout,
          d = e.useBeacon,
          h = e.withCredentials,
          f = e.app_key,
          p = e.forceXhr,
          g = e.zip;
        if (d && this.supportBeacon)
          this.useBeacon({ url: r, data: i, method: o, success: l, fail: u });
        else if (this.requestType !== "fetch" || p)
          try {
            var y = new XMLHttpRequest(),
              v = o || "POST";
            if (
              (y.open(v, "" + r, !0),
              y.setRequestHeader(
                "Content-Type",
                "application/json; charset=utf-8"
              ),
              f && y.setRequestHeader("X-MCS-AppKey", "" + f),
              Dn(this.customHeader).length)
            )
              for (var b in this.customHeader)
                y.setRequestHeader(b, this.customHeader[b]);
            h && (y.withCredentials = !0),
              c &&
                ((y.timeout = c),
                (y.ontimeout = function () {
                  u && u(i, n.errorCode.TIMEOUT);
                })),
              (y.onload = function () {
                if (l) {
                  var $ = null;
                  if (y.responseText) {
                    try {
                      $ = JSON.parse(y.responseText);
                    } catch {
                      $ = {};
                    }
                    l($, i);
                  }
                }
              }),
              (y.onerror = function () {
                y.abort(), u && u(i, n.errorCode.XHR_ON);
              });
            try {
              var w = lr(i);
              if (this.config.need_zip && g) {
                var k = new TextEncoder().encode(w),
                  D = iWt.gzip(k);
                y.setRequestHeader("Content-Encoding", "gzip"), y.send(D);
              } else y.send(w);
            } catch ($) {
              this.collector.emit("sdk-inner-error", {
                type: "sdk_error_send",
                eventData: i,
                errorCode: 1e3,
                msg: $.message || $.stack || "sdk_error_send",
              });
            }
          } catch ($) {
            this.collector.emit("sdk-inner-error", {
              type: "sdk_error_request",
              eventData: i,
              errorCode: 1001,
              msg: $.message || $.stack || "sdk_error_request",
            });
          }
        else this.useFetch({ url: r, data: i, method: o, success: l, fail: u });
      }),
      t
    );
  })(),
  sWt = (function () {
    function t(e, n) {
      if (
        ((this.devToolReady = !1),
        (this.devToolOrigin = "*"),
        (this.sendAlready = !1),
        !n.disable_debug &&
          e.configManager.get("browser") !== "Microsoft Internet Explorer")
      ) {
        (this.collect = e), (this.config = n), (this.app_id = n.app_id);
        var r = e.adapters.storage;
        (this.cacheStorgae = new r(!1)),
          (this.loadUrl =
            n.devtool_url ||
            "https://lf-static.applogcdn.com/obj/applog-sdk-static/log-sdk/collect/devtool/debug-web.v2.0.0.js"),
          (this.filterEvent = new XS([
            "__bav_page",
            "__bav_beat",
            "__bav_page_statistics",
            "__bav_click",
            "__bav_page_exposure",
            "bav2b_page",
            "bav2b_beat",
            "bav2b_page_statistics",
            "bav2b_click",
            "bav2b_page_exposure",
            "_be_active",
            "predefine_pageview",
            "__profile_set",
            "__profile_set_once",
            "__profile_increment",
            "__profile_unset",
            "__profile_append",
            "predefine_page_alive",
            "predefine_page_close",
            "abtest_exposure",
          ])),
          this.load();
      }
    }
    return (
      (t.prototype.loadScript = function (e) {
        try {
          var n = document.createElement("script");
          (n.src = e),
            (n.onerror = function () {
              console.log("load DevTool render fail");
            }),
            (n.onload = function () {
              console.log("load DevTool render success");
            }),
            document.getElementsByTagName("body")[0].appendChild(n);
        } catch (r) {
          console.log("devTool load fail, " + r.message);
        }
      }),
      (t.prototype.parseUrl = function () {
        var e = {};
        try {
          var n = window.location.href.split("?")[1].split("&");
          n.length &&
            n.forEach(function (r) {
              var i = r.split("=");
              e[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
            });
        } catch {}
        return e;
      }),
      (t.prototype.load = function () {
        try {
          var e = this.parseUrl();
          if (e.open_devtool_web && e.app_id) {
            if (_i(e.app_id) !== this.app_id) return;
          } else if (!this.getStorage()) return;
          this.loadBaseInfo(),
            this.loadHook(),
            this.setStorage(),
            this.addLintener(),
            this.loadDebuggerModule(),
            this.loadDevTool();
        } catch (n) {
          console.log("debug fail, " + n.message);
        }
      }),
      (t.prototype.getStorage = function () {
        var e = this.cacheStorgae.getItem("__applog_open_devtool_web");
        return e && _i(e) === this.app_id;
      }),
      (t.prototype.setStorage = function () {
        this.cacheStorgae.setItem("__applog_open_devtool_web", this.app_id);
      }),
      (t.prototype.loadDevTool = function () {
        this.loadScript(this.loadUrl);
      }),
      (t.prototype.loadBaseInfo = function () {
        if (
          ((this.log = []),
          (this.event = []),
          (this.info = [
            {
              title: "基本信息",
              key: "base",
              type: 1,
              content: [
                { name: "app_id", desc: "APP_ID", value: this.config.app_id },
                {
                  name: "channel",
                  desc: "CHANNEL",
                  value: this.config.channel,
                },
                {
                  name: "domain",
                  desc: "上报域名",
                  value: this.collect.configManager.getDomain(),
                },
                { name: "sdk_version", desc: "SDK版本", value: TT },
                { name: "sdk_type", desc: "SDK引入方式", value: "npm" },
              ],
            },
            {
              title: "用户信息",
              key: "user",
              type: 2,
              content: [
                {
                  name: "uuid",
                  desc: "UUID",
                  value:
                    this.collect.configManager.get("user").user_unique_id || "",
                },
                {
                  name: "web_id",
                  desc: "WEB_ID",
                  value: this.collect.configManager.get("user").web_id || "",
                },
              ],
            },
            {
              title: "公共参数信息",
              type: 2,
              key: "common",
              content: [
                {
                  name: "browser",
                  desc: "浏览器",
                  value: this.collect.configManager.get("browser"),
                },
                {
                  name: "browser_version",
                  desc: "浏览器版本",
                  value: this.collect.configManager.get("browser_version"),
                },
                {
                  name: "platform",
                  desc: "平台",
                  value: this.collect.configManager.get("platform"),
                },
                {
                  name: "device_model",
                  desc: "设备型号",
                  value: this.collect.configManager.get("device_model"),
                },
                {
                  name: "os_name",
                  desc: "操作系统",
                  value: this.collect.configManager.get("os_name"),
                },
                {
                  name: "os_version",
                  desc: "操作系统版本",
                  value: this.collect.configManager.get("os_version"),
                },
                {
                  name: "resolution",
                  desc: "屏幕分辨率",
                  value: this.collect.configManager.get("resolution"),
                },
                {
                  name: "referrer",
                  desc: "来源",
                  value: this.collect.configManager.get("referrer"),
                },
                {
                  name: "custom",
                  desc: "自定义信息",
                  value: lr(this.collect.configManager.get("custom")),
                },
              ],
            },
            {
              title: "配置信息",
              key: "config",
              type: 3,
              content: [
                {
                  name: "autotrack",
                  desc: "全埋点",
                  value: !!this.config.autotrack,
                },
                {
                  name: "stay",
                  desc: "停留时长",
                  value: !!this.config.enable_stay_duration,
                },
              ],
            },
            {
              title: "A/B配置信息",
              key: "ab",
              type: 4,
              content: [
                {
                  name: "ab",
                  desc: "A/B实验",
                  value: !!this.config.enable_ab_test,
                },
              ],
            },
          ]),
          this.config.enable_ab_test)
        ) {
          var e = this.getInfo("ab"),
            n = [
              {
                name: "ab",
                desc: "A/B实验",
                value: !!this.config.enable_ab_test,
              },
              {
                name: "vid",
                desc: "已曝光VID",
                value: this.collect.configManager.getAbVersion(),
              },
              {
                name: "ab_domain",
                desc: "A/B域名",
                value:
                  this.config.ab_channel_domain || Ch(tjt[this.config.channel]),
              },
              {
                name: "all_values",
                desc: "全部配置",
                value: this.collect.configManager.getAbCache(),
              },
            ];
          (e.content = n), this.setInfo("ab", e);
        }
        if (this.config.enable_native || this.config.Native) {
          var r = {
            title: "客户端信息",
            type: 3,
            content: [
              {
                name: "native",
                desc: "是否打通",
                value: !!this.collect.bridgeReport,
              },
            ],
          };
          this.setInfo("native", r);
        }
        if ($a(TT).call(TT, "tob")) {
          var i,
            o = this.getInfo("user");
          o.content.push({
            name: "sid",
            desc: cm((i = "DISS".split("")))
              .call(i)
              .join(""),
            value: "点击获取",
          }),
            this.setInfo("user", o);
        }
      }),
      (t.prototype.getInfo = function (e) {
        var n = null;
        return (
          this.info.forEach(function (r) {
            r.key === e && (n = r);
          }),
          n
        );
      }),
      (t.prototype.setInfo = function (e, n) {
        var r = !1;
        this.info.forEach(function (i) {
          i.key === e && ((r = !0), (i = n));
        }),
          r || this.info.push(n);
      }),
      (t.prototype.getSecondInfo = function (e, n) {
        var r = this.getInfo(e),
          i = null;
        return (
          r.content.forEach(function (o) {
            o.name === n && (i = o);
          }),
          i
        );
      }),
      (t.prototype.setSecondInfo = function (e, n, r) {
        var i = this.getInfo(e),
          o = !1;
        if (
          (i.content.forEach(function (u) {
            u.name === n && ((u.value = r), (o = !0));
          }),
          !o)
        ) {
          var l = { name: n, value: r, desc: n.toLocaleUpperCase() };
          i.content.push(l);
        }
        this.setInfo(e, i);
      }),
      (t.prototype.loadHook = function () {
        var e = this;
        this.collect.on(br.DEBUGGER_MESSAGE, function (n) {
          switch (n.type) {
            case br.DEBUGGER_MESSAGE_SDK:
              var r = {
                time: n.time,
                type: n.logType || "sdk",
                infoType: n.infoType || "sdk",
                level: n.level,
                name: n.info,
                show: !0,
                levelShow: !0,
                needDesc: !!n.data,
              };
              if (
                (n.data && (r.desc = { content: lr(n.data) }),
                e.updateLog(r),
                n.secType && n.secType === "AB")
              )
                e.setSecondInfo(
                  "ab",
                  "vid",
                  e.collect.configManager.getAbVersion()
                ),
                  e.setSecondInfo(
                    "ab",
                    "all_values",
                    e.collect.configManager.getAbCache()
                  );
              else if (n.secType === "USER")
                e.setSecondInfo(
                  "user",
                  n.common === "user_unique_id" ? "uuid" : n.common,
                  e.collect.configManager.get(n.common)
                );
              else if (n.secType === "HEADER") {
                var i = e.collect.configManager.get(n.common);
                e.setSecondInfo(
                  "common",
                  n.common,
                  n.common === "custom" ? lr(i) : i
                );
              }
              return void e.updateInfo();
            case br.DEBUGGER_MESSAGE_EVENT:
              if (n.data && n.data.length) {
                var o = n.data[0],
                  l = o.events;
                if (!l.length) return;
                l.forEach(function (u) {
                  (u.checkShow = !0),
                    (u.searchShow = !0),
                    (u.focusShow = !0),
                    (u.status = n.status),
                    (u.type = e.filterEvent.has(u.event) ? "sdk" : "cus"),
                    (u.verifyType = n.verifyType ? "verify" : "no"),
                    (u.info = ""),
                    n.status === "fail" &&
                      (u.info = {
                        message:
                          "code: " +
                          n.code +
                          "， msg: " +
                          (n.msg || n.failType),
                      });
                }),
                  e.updateEvent(o);
              }
              return;
          }
        });
      }),
      (t.prototype.addLintener = function () {
        var e = this;
        window.addEventListener("message", function (n) {
          if (n && n.data && n.data.type === "devtool:web:ready") {
            if (
              ((e.devToolOrigin = n.origin),
              (e.devToolReady = !0),
              e.sendAlready)
            )
              return;
            e.sendData("devtool:web:init", {
              info: e.info,
              log: e.log,
              event: e.event,
              sdk_type: $a(TT).call(TT, "tob") ? "tob" : "inner",
              appId: e.app_id,
            }),
              (e.sendAlready = !0);
          }
          n &&
            n.data &&
            n.data.type === "devtool:web:ssid" &&
            e.collect.getToken(function (r) {
              e.setSecondInfo("user", "sid", r.tobid), e.updateInfo();
            });
        });
      }),
      (t.prototype.sendData = function (e, n) {
        try {
          var r = { type: e, payload: n };
          window && window.postMessage(r, this.devToolOrigin);
        } catch {}
      }),
      (t.prototype.updateInfo = function () {
        this.devToolReady && this.sendData("devtool:web:info", this.info);
      }),
      (t.prototype.updateLog = function (e) {
        this.devToolReady
          ? this.sendData("devtool:web:log", e)
          : this.log.push(e);
      }),
      (t.prototype.updateEvent = function (e) {
        this.devToolReady
          ? this.sendData("devtool:web:event", e)
          : this.event.push(e);
      }),
      (t.prototype.loadDebuggerModule = function () {
        var e =
            `#debugger-applog-web {
      position: fixed;
      width: 45px;
      height: 45px;
      background-image: url(` +
            Ch(
              "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e"
            ) +
            `);
      bottom: 5%;
      right: 10%;
      cursor: pointer;
      z-index:100;
      background-size: 45px;
    }`,
          n = document.head || document.getElementsByTagName("head")[0],
          r = document.createElement("style");
        r.appendChild(document.createTextNode(e)), n.appendChild(r);
        var i = document.createElement("div");
        i.innerHTML =
          '<div id="debugger-applog-web" class="debugger-applog-web"></div>';
        var o = document.createElement("div");
        (o.innerHTML =
          '<div id="debugger-container" class="debugger-container"></div>'),
          document.getElementsByTagName("body")[0].appendChild(i),
          document.getElementsByTagName("body")[0].appendChild(o);
        var l = document.getElementById("debugger-applog-web");
        l &&
          l.addEventListener("click", function () {
            window &&
              window.postMessage(
                { type: "devtool:web:open-draw" },
                location.origin
              );
          });
      }),
      t
    );
  })(),
  pz = {
    autotrack: {
      src: {
        cn: Ch(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z23z22z1mz22z20z18z1az1iz4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js",
      },
      object: "LogAutoTrack",
    },
    ab: {
      src: {
        cn: Ch(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z19z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js",
      },
      object: "LogAb",
    },
    stay: {
      src: {
        cn: Ch(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz21z22z18z27z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js",
      },
      object: "LogStay",
    },
    route: {
      src: {
        cn: Ch(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1mz23z22z1cz4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js",
      },
      object: "LogRoute",
    },
    tracer: {
      src: {
        cn: Ch(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz22z20z18z1az1cz20z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js",
      },
      object: "LogTracer",
    },
    retry: {
      src: {
        cn: Ch(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1cz22z20z27z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js",
      },
      object: "LogRetry",
    },
    visual: {
      src: {
        cn: Ch(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz24z1gz21z23z18z1jz4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js",
      },
      object: "LogVisual",
    },
  },
  Sbe = ["et", "profile", "heartbeat", "monitor"],
  K2 = (function () {
    function t(e) {
      (this.disableAutoPageView = !1),
        (this.bridgeReport = !1),
        (this.staging = !1),
        (this.pluginInstances = []),
        (this.sended = !1),
        (this.started = !1),
        (this.destroy = !1),
        (this.sdkReady = !1),
        (this.adapters = {}),
        (this.loadType = "base"),
        (this.sdkStop = !1),
        (this.name = e),
        (this.hook = new Zzt()),
        (this.remotePlugin = new Lf()),
        (this.Types = ii),
        (this.adapters.storage = K1);
    }
    return (
      (t.usePlugin = function (e, n, r) {
        if (n) {
          for (var i = !1, o = 0, l = t.plugins.length; o < l; o++)
            if (t.plugins[o].name === n) {
              (t.plugins[o].plugin = e),
                (t.plugins[o].options = r || {}),
                (i = !0);
              break;
            }
          i || t.plugins.push({ name: n, plugin: e, options: r });
        } else t.plugins.push({ plugin: e });
      }),
      (t.prototype.usePlugin = function (e, n, r) {
        e &&
          (this.loadType === "full" && $a(Sbe).call(Sbe, e)
            ? console.info("your sdk version has " + e + " plugin already ~")
            : n
            ? typeof n == "string"
              ? this.remotePlugin.get(e) ||
                this.remotePlugin.set(e, { src: n, call: r })
              : this.remotePlugin.get(e) ||
                this.remotePlugin.set(e, { instance: n })
            : this.remotePlugin.get(e) || this.remotePlugin.set(e, "sdk"));
      }),
      (t.prototype.init = function (e) {
        var n,
          r,
          i = this;
        (this.logger = new sjt(this.name, e.log)),
          this.inited
            ? this.logger.warn(
                "[instance: " +
                  this.name +
                  "], every instance's api: init,  can be call only one time!"
              )
            : e && Z1e(e)
            ? e.app_id && typeof (r = e.app_id) == "number" && !isNaN(r)
              ? e.app_key && typeof e.app_key != "string"
                ? this.logger.warn(
                    "app_key param is error, must be string, please check!"
                  )
                : (e.channel_domain ||
                    qt((n = ["cn", "sg", "va", "my"])).call(n, e.channel) !==
                      -1 ||
                    (this.logger.warn(
                      "channel must be `cn`, `sg`,`va`, `my` !"
                    ),
                    (e.channel = "cn")),
                  (this.spider = new ljt()),
                  this.spider.checkSpider(e)
                    ? this.logger.warn(
                        "your env may be a spider, can not report!"
                      )
                    : ((this.appBridge = new ujt(this, e.enable_native)),
                      (this.requestManager = new oWt(this, e)),
                      (this.bridgeReport = this.appBridge.bridgeInject()),
                      (this.configManager = new ojt(this, e)),
                      (this.debugger = new sWt(this, e)),
                      (this.initConfig = e),
                      this.emit(ii.Init),
                      this.emit(br.DEBUGGER_MESSAGE, {
                        type: br.DEBUGGER_MESSAGE_SDK,
                        info: "SDK 执行Init",
                        data: e,
                        level: "info",
                        time: Date.now(),
                        infoType: "cus",
                      }),
                      (this.destroy = !1),
                      e.disable_auto_pv && (this.disableAutoPageView = !0),
                      this.bridgeReport ||
                        (this.configManager.set({ app_id: e.app_id }),
                        (this.eventManager = new djt()),
                        (this.tokenManager = new hjt()),
                        (this.sessionManager = new cjt()),
                        Ar.all([
                          new Ar(function (o) {
                            i.once(ii.TokenComplete, function () {
                              o(!0);
                            });
                          }),
                          new Ar(function (o) {
                            i.once(ii.Start, function () {
                              o(!0);
                            });
                          }),
                        ]).then(function () {
                          try {
                            var o;
                            ga((o = t.plugins)).call(
                              o,
                              function (l, u) {
                                var c = u.plugin,
                                  d = u.options,
                                  h = Ci(i.initConfig, d),
                                  f = new c();
                                return (
                                  f.apply(i, h),
                                  l.push(f),
                                  i.emit(br.DEBUGGER_MESSAGE, {
                                    type: br.DEBUGGER_MESSAGE_SDK,
                                    info: "SDK加载" + u.name + "插件",
                                    level: "info",
                                    time: Date.now(),
                                    infoType: "sdk",
                                  }),
                                  l
                                );
                              },
                              i.pluginInstances
                            );
                          } catch (l) {
                            console.warn("load plugin error, " + l.message),
                              i.emit(br.DEBUGGER_MESSAGE, {
                                type: br.DEBUGGER_MESSAGE_SDK,
                                info: "SDK加载插件发生了异常",
                                level: "error",
                                time: Date.now(),
                                data: l.message,
                                infoType: "sdk",
                              });
                          }
                          (i.sdkReady = !0),
                            i.emit(ii.Ready),
                            i.emit(br.DEBUGGER_MESSAGE, {
                              type: br.DEBUGGER_MESSAGE_SDK,
                              info: "SDK 用户信息初始化完成",
                              time: Date.now(),
                              secType: "USER",
                              level: "info",
                              data: i.configManager.get("user"),
                              infoType: "sdk",
                            }),
                            i.emit(br.DEBUGGER_MESSAGE, {
                              type: br.DEBUGGER_MESSAGE_SDK,
                              info: "SDK 初始化完成",
                              time: Date.now(),
                              level: "info",
                              data: i.configManager.get("user"),
                              infoType: "sdk",
                            }),
                            i.logger.info(
                              "appid: " +
                                e.app_id +
                                ", userInfo:" +
                                lr(i.configManager.get("user"))
                            ),
                            i.logger.info(
                              "appid: " +
                                e.app_id +
                                ", sdk is ready, version type is " +
                                i.loadType +
                                ", version is " +
                                TT +
                                ", you can report now !!!"
                            ),
                            e.disable_auto_pv && (i.disableAutoPageView = !0);
                          try {
                            i.loadType === "full" &&
                              (e.enable_ab_test || e.autotrack) &&
                              (window.opener || window.parent).postMessage(
                                "[tea-sdk]ready",
                                "*"
                              );
                          } catch (l) {
                            i.emit(br.DEBUGGER_MESSAGE, {
                              type: br.DEBUGGER_MESSAGE_SDK,
                              info: "SDK发生了异常",
                              level: "error",
                              time: Date.now(),
                              data: l.message,
                              infoType: "sdk",
                            });
                          }
                          i.pageView(),
                            i.on(ii.TokenChange, function (l) {
                              l === "webid" && i.pageView(),
                                i.logger.info(
                                  "appid: " +
                                    e.app_id +
                                    " token change, new userInfo:" +
                                    lr(i.configManager.get("user"))
                                ),
                                i.emit(br.DEBUGGER_MESSAGE, {
                                  type: br.DEBUGGER_MESSAGE_SDK,
                                  info: "SDK 设置了用户信息",
                                  time: Date.now(),
                                  secType: "USER",
                                  level: "info",
                                  data: i.configManager.get("user"),
                                  infoType: "sdk",
                                });
                            }),
                            i.on(ii.TokenReset, function () {
                              i.logger.info(
                                "appid: " +
                                  e.app_id +
                                  " token reset, new userInfo:" +
                                  lr(i.configManager.get("user"))
                              ),
                                i.emit(br.DEBUGGER_MESSAGE, {
                                  type: br.DEBUGGER_MESSAGE_SDK,
                                  info: "SDK 重置了用户信息",
                                  time: Date.now(),
                                  secType: "USER",
                                  level: "info",
                                  data: i.configManager.get("user"),
                                  infoType: "sdk",
                                });
                            }),
                            i.on(ii.RouteChange, function (l) {
                              l.init || e.disable_route_report || i.pageView();
                            });
                        }),
                        this.tokenManager.apply(this, e),
                        this.eventManager.apply(this, e),
                        this.sessionManager.apply(this, e)),
                      (this.inited = !0)))
              : this.logger.warn(
                  "app_id param is error, must be number, please check!"
                )
            : this.logger.warn("init params error,please check!");
      }),
      (t.prototype.config = function (e) {
        if (!this.inited)
          return (
            console.warn("config must be use after function init"),
            void this.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK执行Config发生了异常",
              level: "error",
              time: Date.now(),
              data: "config must be use after function init",
              infoType: "sdk",
            })
          );
        if (!e || !Z1e(e))
          return (
            console.warn("config params is error, please check"),
            void this.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK执行Config发生了异常",
              level: "error",
              time: Date.now(),
              data: "config params is error, please check",
              infoType: "sdk",
            })
          );
        if (this.bridgeReport) this.appBridge.setConfig(e);
        else {
          e._staging_flag && e._staging_flag === 1 && (this.staging = !0),
            e.disable_auto_pv &&
              ((this.disableAutoPageView = !0), delete e.disable_auto_pv);
          var n = au({}, e),
            r =
              this.initConfig.configPersist ||
              this.initConfig.config_persist ||
              !1;
          if (this.initConfig && r) {
            var i = this.configManager.getStore();
            i && (n = Ci(i, e)), this.configManager.setStore(e);
          }
          n.web_id, n.user_unique_id;
          var o = (function (l, u) {
            var c = {};
            for (var d in l)
              Object.prototype.hasOwnProperty.call(l, d) &&
                qt(u).call(u, d) < 0 &&
                (c[d] = l[d]);
            if (l != null && typeof Mc == "function") {
              var h = 0;
              for (d = Mc(l); h < d.length; h++)
                qt(u).call(u, d[h]) < 0 && (c[d[h]] = l[d[h]]);
            }
            return c;
          })(n, ["web_id", "user_unique_id"]);
          this.configManager.set(o),
            n.hasOwnProperty("web_id") && this.emit(ii.ConfigWebId, n.web_id),
            n.hasOwnProperty("user_unique_id") &&
              this.emit(ii.ConfigUuid, n.user_unique_id),
            this.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行Config",
              level: "info",
              time: Date.now(),
              data: n,
              infoType: "cus",
            });
        }
      }),
      (t.prototype.setUserUniqueID = function (e) {
        this.config({ user_unique_id: e });
      }),
      (t.prototype.setHeaderInfo = function (e, n) {
        var r = {};
        (r[e] = n), this.config(r);
      }),
      (t.prototype.removeHeaderInfo = function (e) {
        var n = {};
        (n[e] = void 0), this.config(n);
      }),
      (t.prototype.setDomain = function (e) {
        this.configManager && this.configManager.setDomain(e),
          this.emit(ii.ConfigDomain);
      }),
      (t.prototype.getConfig = function (e) {
        var n;
        return (n = this.configManager) === null || n === void 0
          ? void 0
          : n.get(e);
      }),
      (t.prototype.send = function () {
        this.start();
      }),
      (t.prototype.start = function () {
        this.inited &&
          !this.sended &&
          ((this.sended = !0),
          (this.started = !0),
          this.emit(ii.Start),
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行Start",
            level: "info",
            time: Date.now(),
            infoType: "cus",
          }),
          this.bridgeReport && (this.pageView(), this.emit(ii.Ready)));
      }),
      (t.prototype.event = function (e, n) {
        var r = this;
        try {
          var i = [];
          if (Array.isArray(e))
            e.forEach(function (l) {
              var u = r.processEvent(l[0], l[1] || {});
              u && i.push(u);
            });
          else {
            var o = this.processEvent(e, n);
            if (!o) return;
            i.push(o);
          }
          this.bridgeReport
            ? i.forEach(function (l) {
                var u = l.event,
                  c = l.params;
                r.appBridge.onEventV3(u, lr(c));
              })
            : i.length &&
              (this.emit(ii.Event, i), this.emit(ii.SessionResetTime)),
            this.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行Event",
              level: "info",
              time: Date.now(),
              data: e,
              infoType: "cus",
            });
        } catch (l) {
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行Event发生了异常",
            level: "error",
            time: Date.now(),
            data: l.message,
            infoType: "sdk",
          });
        }
      }),
      (t.prototype.beconEvent = function (e, n) {
        if (Array.isArray(e))
          console.warn("beconEvent not support batch report, please check");
        else {
          var r = [],
            i = this.processEvent(e, n || {});
          i &&
            (r.push(i),
            r.length &&
              (this.emit(ii.BeconEvent, r), this.emit(ii.SessionResetTime)),
            this.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行Beacon Event",
              level: "info",
              time: Date.now(),
              data: e,
              infoType: "sdk",
            }));
        }
      }),
      (t.prototype.beaconEvent = function (e, n) {
        this.beconEvent(e, n);
      }),
      (t.prototype.processEvent = function (e, n) {
        n === void 0 && (n = {});
        try {
          if (!e) return console.warn("eventName is null， please check"), null;
          var r = e;
          /^event\./.test(e) && (r = jn(e).call(e, 6));
          var i = n;
          ti(i) != "object" && (i = {}),
            i.profile ? delete i.profile : (i.event_index = Yzt());
          var o = void 0;
          return (
            i.local_ms
              ? ((o = i.local_ms), delete i.local_ms)
              : (o = +new Date()),
            {
              event: r,
              params: i,
              local_time_ms: o,
              is_bav: this.initConfig && this.initConfig.autotrack ? 1 : 0,
            }
          );
        } catch (l) {
          return (
            this.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "SDK发生了异常",
              level: "error",
              time: Date.now(),
              data: l.message,
              infoType: "sdk",
            }),
            { event: e, params: n }
          );
        }
      }),
      (t.prototype.filterEvent = function (e) {
        this.eventFilter = e;
      }),
      (t.prototype.on = function (e, n) {
        this.hook.on(e, n);
      }),
      (t.prototype.once = function (e, n) {
        this.hook.once(e, n);
      }),
      (t.prototype.off = function (e, n) {
        this.hook.off(e, n);
      }),
      (t.prototype.emit = function (e, n, r) {
        this.hook.emit(e, n, r);
      }),
      (t.prototype.set = function (e) {
        this.hook.set(e);
      }),
      (t.prototype.stop = function () {
        this.sdkStop = !0;
      }),
      (t.prototype.reStart = function () {
        this.sdkStop = !1;
      }),
      (t.prototype.pageView = function () {
        this.disableAutoPageView || this.predefinePageView();
      }),
      (t.prototype.predefinePageView = function (e) {
        if ((e === void 0 && (e = {}), this.inited)) {
          var n = {
              title: document.title || location.pathname,
              url: location.href,
              url_path: this.handlePath(),
              time: Date.now(),
              referrer: window.document.referrer,
              $is_first_time:
                "" +
                ((this.configManager && this.configManager.is_first_time) ||
                  !1),
            },
            r = au(au({}, n), e);
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 上报PV",
            level: "info",
            time: Date.now(),
            infoType: "sdk",
          }),
            this.event("predefine_pageview", r);
        } else
          console.warn("predefinePageView must be use after function init");
      }),
      (t.prototype.handlePath = function () {
        var e = location.pathname;
        try {
          if (this.initConfig.allow_hash) {
            var n = new Bs(location.href).hash.match(/#\/([^?#]+)/i);
            return n && n.length ? n[1] : location.pathname;
          }
        } catch {
          e = location.pathname;
        }
        return e;
      }),
      (t.prototype.clearEventCache = function () {
        this.emit(ii.CleanEvents);
      }),
      (t.prototype.setWebIDviaUnionID = function (e) {
        if (e) {
          var n = Q1e(e);
          this.config({ web_id: "" + n, wechat_unionid: e }),
            this.emit(ii.CustomWebId);
        }
      }),
      (t.prototype.setWebId = function (e) {
        this.config({ web_id: "" + e });
      }),
      (t.prototype.setWebIDviaOpenID = function (e) {
        if (e) {
          var n = Q1e(e);
          this.config({ web_id: "" + n, wechat_openid: e }),
            this.emit(ii.CustomWebId);
        }
      }),
      (t.prototype.setNativeAppId = function (e) {
        this.bridgeReport && this.appBridge.setNativeAppId(e);
      }),
      (t.prototype.setRequestHeaders = function (e) {
        this.emit(ii.CustomHeader, e);
      }),
      (t.prototype.getSessionId = function () {
        return fk();
      }),
      (t.prototype.setSessionId = function (e) {
        this.emit(ii.SessionReset, e);
      }),
      (t.prototype.resetStayDuration = function (e, n, r) {
        this.emit(ii.ResetStay, { url_path: e, title: n, url: r }, ii.Stay);
      }),
      (t.prototype.resetStayParams = function (e, n, r) {
        e === void 0 && (e = ""),
          n === void 0 && (n = ""),
          r === void 0 && (r = ""),
          this.emit(ii.SetStay, { url_path: e, title: n, url: r }, ii.Stay);
      }),
      (t.prototype.getToken = function (e, n) {
        var r = this;
        if (this.inited) {
          var i = !1,
            o = function (u) {
              if (!i) {
                var c;
                i = !0;
                var d = r.configManager.get().user;
                return (
                  u &&
                    ((d.tobid = u),
                    (d[
                      cm((c = "diss".split("")))
                        .call(c)
                        .join("")
                    ] = u)),
                  e(au({}, d))
                );
              }
            },
            l = function () {
              r.tokenManager.getTobId().then(function (u) {
                o(u);
              });
            };
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行GetToken",
            level: "info",
            time: Date.now(),
            infoType: "cus",
          }),
            this.sdkReady
              ? l()
              : (n &&
                  setTimeout(function () {
                    o();
                  }, n),
                this.on(ii.Ready, function () {
                  l();
                }));
        } else console.warn("getToken must be use after function init");
      }),
      (t.prototype.profileSet = function (e) {
        this.bridgeReport
          ? this.appBridge.profileSet(lr(e))
          : this.emit(ii.ProfileSet, e, ii.Profile),
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileSet",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileSetOnce = function (e) {
        this.bridgeReport
          ? this.appBridge.profileSetOnce(lr(e))
          : this.emit(ii.ProfileSetOnce, e, ii.Profile),
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileSetOnce",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileIncrement = function (e) {
        this.bridgeReport
          ? this.appBridge.profileIncrement(lr(e))
          : this.emit(ii.ProfileIncrement, e, ii.Profile),
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileIncrement",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileUnset = function (e) {
        this.bridgeReport
          ? this.appBridge.profileUnset(e)
          : this.emit(ii.ProfileUnset, e, ii.Profile),
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileUnset",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileAppend = function (e) {
        this.bridgeReport
          ? this.appBridge.profileAppend(lr(e))
          : this.emit(ii.ProfileAppend, e, ii.Profile),
          this.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileAppend",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.setExternalAbVersion = function (e) {
        var n;
        this.emit(
          ii.AbExternalVersion,
          typeof e == "string" && e ? es((n = "" + e)).call(n) : null,
          ii.Ab
        );
      }),
      (t.prototype.getVar = function (e, n, r) {
        this.emit(ii.AbVar, { name: e, defaultValue: n, callback: r }, ii.Ab);
      }),
      (t.prototype.getABconfig = function (e, n) {
        this.emit(ii.AbConfig, { params: e, callback: n }, ii.Ab);
      }),
      (t.prototype.getAbSdkVersion = function () {
        return this.configManager.getAbVersion();
      }),
      (t.prototype.onAbSdkVersionChange = function (e) {
        var n = this;
        return (
          this.emit(ii.AbVersionChangeOn, e, ii.Ab),
          function () {
            n.emit(ii.AbVersionChangeOff, e, ii.Ab);
          }
        );
      }),
      (t.prototype.offAbSdkVersionChange = function (e) {
        this.emit(ii.AbVersionChangeOff, e, ii.Ab);
      }),
      (t.prototype.openOverlayer = function () {
        this.emit(ii.AbOpenLayer, "", ii.Ab);
      }),
      (t.prototype.closeOverlayer = function () {
        this.emit(ii.AbCloseLayer, "", ii.Ab);
      }),
      (t.prototype.getAllVars = function (e) {
        this.emit(ii.AbAllVars, e, ii.Ab);
      }),
      (t.prototype.destoryInstace = function () {
        this.destroy ||
          ((this.destroy = !0),
          this.off(ii.TokenComplete),
          this.emit(ii.DestoryInstance));
      }),
      (t.prototype.destroyInstance = function () {
        this.destroy ||
          ((this.destroy = !0),
          this.off(ii.TokenComplete),
          this.emit(ii.DestoryInstance));
      }),
      (t.plugins = []),
      t
    );
  })(),
  lWt = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        n.event_verify_url &&
          (typeof n.event_verify_url == "string"
            ? ((this.url = n.event_verify_url + "/v1/list_test"),
              e.on(e.Types.SubmitBefore, function (i) {
                e.requestManager.useBeacon({ url: r.url, data: i }),
                  e.emit(br.DEBUGGER_MESSAGE, {
                    type: br.DEBUGGER_MESSAGE_EVENT,
                    info: "SDK Report ByteIo Verify Request",
                    time: Date.now(),
                    data: i,
                    code: 200,
                    status: "success",
                    verifyType: !0,
                  });
              }))
            : console.log("please use correct et_test url"));
      }),
      t
    );
  })(),
  uWt = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.config = n),
          (this.duration = 6e4),
          (this.reportUrl = e.configManager.getDomain() + "/profile/list");
        var i = e.Types;
        (this.eventCheck = new mle(e, n)),
          (this.cache = {}),
          this.collect.on(i.ProfileSet, function (o) {
            r.setProfile(o);
          }),
          this.collect.on(i.ProfileSetOnce, function (o) {
            r.setOnceProfile(o);
          }),
          this.collect.on(i.ProfileUnset, function (o) {
            r.unsetProfile(o);
          }),
          this.collect.on(i.ProfileIncrement, function (o) {
            r.incrementProfile(o);
          }),
          this.collect.on(i.ProfileAppend, function (o) {
            r.appendProfile(o);
          }),
          this.collect.on(i.ProfileClear, function () {
            r.cache = {};
          }),
          this.ready(i.Profile);
      }),
      (t.prototype.ready = function (e) {
        var n = this;
        if (
          (this.collect.set(e), this.collect.hook._hooksCache.hasOwnProperty(e))
        ) {
          var r = this.collect.hook._hooksCache[e];
          if (!Dn(r).length) return;
          var i = function (l) {
            r[l].length &&
              r[l].forEach(function (u) {
                n.collect.hook.emit(l, u);
              });
          };
          for (var o in r) i(o);
        }
      }),
      (t.prototype.report = function (e, n) {
        n === void 0 && (n = {});
        try {
          if (this.config.disable_track_event) return;
          var r = [];
          r.push(this.collect.processEvent(e, n));
          var i = this.collect.eventManager.merge(r);
          this.collect.requestManager.useRequest({
            url: this.reportUrl,
            data: i,
          }),
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_EVENT,
              info: "埋点上报成功",
              time: Date.now(),
              data: i,
              code: 200,
              status: "success",
            });
        } catch (o) {
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: o.message,
          });
        }
      }),
      (t.prototype.setProfile = function (e) {
        var n = this.formatParams(e);
        n &&
          Dn(n).length &&
          (this.pushCache(n),
          this.report("__profile_set", au(au({}, n), { profile: !0 })));
      }),
      (t.prototype.setOnceProfile = function (e) {
        var n = this.formatParams(e, !0);
        n &&
          Dn(n).length &&
          (this.pushCache(n),
          this.report("__profile_set_once", au(au({}, n), { profile: !0 })));
      }),
      (t.prototype.incrementProfile = function (e) {
        e
          ? this.report("__profile_increment", au(au({}, e), { profile: !0 }))
          : console.warn("please check the params, must be object!!!");
      }),
      (t.prototype.unsetProfile = function (e) {
        if (e) {
          var n = {};
          (n[e] = "1"),
            this.report("__profile_unset", au(au({}, n), { profile: !0 }));
        } else console.warn("please check the key, must be string!!!");
      }),
      (t.prototype.appendProfile = function (e) {
        if (e) {
          var n = {};
          for (var r in e) {
            var i;
            typeof e[r] == "string" ||
            jn((i = Object.prototype.toString.call(e[r]))).call(i, 8, -1) ===
              "Array"
              ? (n[r] = e[r])
              : console.warn(
                  "please check the value of param: " +
                    r +
                    ", must be string or array !!!"
                );
          }
          Dn(n).length &&
            this.report("__profile_append", au(au({}, n), { profile: !0 }));
        } else console.warn("please check the params, must be object!!!");
      }),
      (t.prototype.pushCache = function (e) {
        var n = this;
        Dn(e).forEach(function (r) {
          n.cache[r] = { val: n.clone(e[r]), timestamp: Date.now() };
        });
      }),
      (t.prototype.formatParams = function (e, n) {
        var r = this;
        n === void 0 && (n = !1);
        try {
          var i;
          if (!e || Object.prototype.toString.call(e) !== "[object Object]")
            return void console.warn(
              "please check the params type, must be object !!!"
            );
          var o = {};
          for (var l in e) {
            var u;
            typeof e[l] == "string" ||
            typeof e[l] == "number" ||
            jn((u = Object.prototype.toString.call(e[l]))).call(u, 8, -1) ===
              "Array"
              ? (o[l] = e[l])
              : console.warn(
                  "please check the value of params:" +
                    l +
                    ", must be string,number,Array !!!"
                );
          }
          var c = Dn(o);
          if (!c.length || !this.eventCheck.checkEventParams(o)) return;
          var d = Date.now();
          return ga(
            (i = _r(c).call(c, function (h) {
              var f = r.cache[h];
              return n
                ? !f
                : !(
                    f &&
                    r.compare(f.val, e[h]) &&
                    d - f.timestamp < r.duration
                  );
            }))
          ).call(
            i,
            function (h, f) {
              return (h[f] = o[f]), h;
            },
            {}
          );
        } catch (h) {
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: h.message,
          }),
            console.log("error");
        }
      }),
      (t.prototype.compare = function (e, n) {
        try {
          return lr(e) === lr(n);
        } catch (r) {
          return (
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: r.message,
            }),
            !1
          );
        }
      }),
      (t.prototype.clone = function (e) {
        try {
          return JSON.parse(lr(e));
        } catch (n) {
          return (
            this.collect.emit(br.DEBUGGER_MESSAGE, {
              type: br.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: n.message,
            }),
            e
          );
        }
      }),
      (t.prototype.unReady = function () {
        console.warn("sdk is not ready, please use this api after start");
      }),
      t
    );
  })(),
  cWt = (function () {
    function t() {
      var e = this;
      (this.setInterval = function () {
        e.clearIntervalFunc = Qzt(function () {
          e.isSessionhasEvent && e.endCurrentSession();
        }, e.sessionInterval);
      }),
        (this.clearInterval = function () {
          e.clearIntervalFunc && e.clearIntervalFunc();
        });
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        if (((this.collect = e), !n.disable_heartbeat)) {
          (this.sessionInterval = 6e4),
            (this.startTime = 0),
            (this.lastTime = 0),
            this.setInterval();
          var i = this.collect.Types;
          this.collect.on(i.SessionResetTime, function () {
            r.process();
          });
        }
      }),
      (t.prototype.endCurrentSession = function () {
        this.collect.event("_be_active", {
          start_time: this.startTime,
          end_time: this.lastTime,
          url: window.location.href,
          referrer: window.document.referrer,
          title: document.title || location.pathname,
        }),
          (this.isSessionhasEvent = !1),
          (this.startTime = 0);
      }),
      (t.prototype.process = function () {
        this.isSessionhasEvent ||
          ((this.isSessionhasEvent = !0), (this.startTime = +new Date()));
        var e = this.lastTime || +new Date();
        (this.lastTime = +new Date()),
          this.lastTime - e > this.sessionInterval &&
            (this.clearInterval(),
            this.endCurrentSession(),
            this.setInterval());
      }),
      t
    );
  })(),
  dWt = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        n.channel_domain ||
          n.disable_track_event ||
          n.disable_sdk_monitor ||
          ((this.collect = e),
          (this.config = n),
          (this.url = e.configManager.getUrl("event")),
          this.collect.on(e.Types.Ready, function () {
            r.sdkOnload();
          }),
          this.collect.on(e.Types.SubmitError, function (i) {
            var o = i.type,
              l = i.eventData,
              u = i.errorCode,
              c = i.response;
            o === "f_data" && r.sdkError(l, u, c);
          }),
          this.collect.on(e.Types.SDKInnerError, function (i) {
            var o = i.type,
              l = i.eventData,
              u = i.errorCode,
              c = i.msg;
            r.sdkInnerError(o, l, u, c);
          }));
      }),
      (t.prototype.sdkOnload = function () {
        var e = this;
        try {
          var n = this.collect.configManager.get(),
            r = n.header,
            i = n.user,
            o = r.app_id,
            l = r.app_name,
            u = r.sdk_version,
            c = i.web_id,
            d = {
              events: [
                {
                  event: "onload",
                  params: lr({
                    app_id: o,
                    app_name: l || "",
                    sdk_version: u,
                    sdk_type: "npm",
                    sdk_config: this.config,
                    sdk_desc: "TOC",
                    url: location.href,
                  }),
                  local_time_ms: Date.now(),
                },
              ],
              user: { user_unique_id: c },
              header: {},
            };
          setTimeout(function () {
            e.collect.requestManager.useRequest({
              url: e.url,
              data: [d],
              timeout: 3e4,
              app_key: "566f58151b0ed37e",
              forceXhr: !0,
            });
          }, 16);
        } catch {}
      }),
      (t.prototype.sdkError = function (e, n, r) {
        var i = this;
        try {
          var o = e[0],
            l = o.user,
            u = o.header,
            c = [];
          e.forEach(function (h) {
            h.events.forEach(function (f) {
              c.push(f);
            });
          });
          var d = {
            events: On(c).call(c, function (h) {
              return {
                event: "on_error",
                params: lr({
                  type: "sdk_event_error",
                  error_code: n,
                  app_id: u.app_id,
                  app_name: u.app_name || "",
                  error_event: h.event,
                  sdk_version: u.sdk_version,
                  local_time_ms: h.local_time_ms,
                  tea_event_index: Date.now(),
                  params: h.params,
                  header: u,
                  user: l,
                  err_msg: r.m || "",
                }),
                local_time_ms: Date.now(),
              };
            }),
            user: { user_unique_id: l.user_unique_id },
            header: {},
          };
          setTimeout(function () {
            i.collect.requestManager.useRequest({
              url: i.url,
              data: [d],
              timeout: 3e4,
              app_key: "566f58151b0ed37e",
              forceXhr: !0,
            });
          }, 16);
        } catch {}
      }),
      (t.prototype.sdkInnerError = function (e, n, r, i) {
        var o = this;
        try {
          var l = n[0],
            u = l.user,
            c = l.header,
            d = [];
          n.forEach(function (f) {
            f.events.forEach(function (p) {
              d.push(p);
            });
          });
          var h = {
            events: On(d).call(d, function (f) {
              return {
                event: "on_error",
                params: lr({
                  type: e,
                  error_code: r,
                  app_id: c.app_id,
                  app_name: c.app_name || "",
                  error_event: f.event,
                  sdk_version: c.sdk_version,
                  local_time_ms: f.local_time_ms,
                  tea_event_index: Date.now(),
                  params: f.params,
                  header: c,
                  user: u,
                  ua: window.navigator.userAgent,
                  err_msg: i,
                }),
                local_time_ms: Date.now(),
              };
            }),
            user: u,
            header: {},
          };
          setTimeout(function () {
            o.collect.requestManager.useRequest({
              url: o.url,
              data: [h],
              timeout: 3e4,
              app_key: "566f58151b0ed37e",
              forceXhr: !0,
            });
          }, 16);
        } catch {}
      }),
      t
    );
  })(),
  gz =
    typeof window < "u"
      ? (window.LogPluginObject || (window.LogPluginObject = {}),
        window.LogPluginObject)
      : null,
  hWt = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        (this._plugin = {}),
          (this.config = n),
          (this.collect = e),
          (this.channel = n.channel || "cn"),
          this.loadExtend();
      }),
      (t.prototype.loadExtend = function () {
        var e = this;
        try {
          this.collect.remotePlugin.forEach(function (n, r) {
            if (n === "sdk")
              if (pz.hasOwnProperty(r)) {
                var i = pz[r].object,
                  o = pz[r].src[e.channel] + "?query=" + Date.now();
                e.exist(r, i, o);
              } else
                console.warn(
                  "your " + r + " is not exist，please check plugin name"
                );
            else
              ti(n) == "object" &&
                (n.src
                  ? e.exist(r, n.call, n.src)
                  : e.process(r, n.instance, "INSTANCE"));
          });
        } catch (n) {
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: n.message,
          }),
            console.log("load extend error");
        }
      }),
      (t.prototype.exist = function (e, n, r) {
        var i = this;
        gz[n]
          ? (this.process(e, gz[n]),
            console.log("已有" + e + "插件，避免重复加载~"))
          : this.loadPlugin(
              e,
              r,
              function () {
                i.process(e, gz[n]),
                  console.log(
                    " %c %s %s %s",
                    "color: yellow; background-color: black;",
                    "–",
                    "load plugin:" + e + " success",
                    "-"
                  );
              },
              function () {
                console.log(
                  " %c %s %s %s",
                  "color: red; background-color: yellow;",
                  "–",
                  "load plugin:" + e + " error",
                  "-"
                );
              }
            );
      }),
      (t.prototype.process = function (e, n, r) {
        try {
          if (r) {
            var i = new n();
            i.apply && i.apply(this.collect, this.config),
              console.log("excude " + e + " success");
          } else n && n(this.collect, this.config);
        } catch (o) {
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: o.message,
          }),
            console.log("excude " + e + " error, message:" + o.message);
        }
      }),
      (t.prototype.loadPlugin = function (e, n, r, i) {
        var o = this;
        try {
          var l = document.createElement("script");
          (l.src = n),
            this._plugin[e] || (this._plugin[e] = []),
            this._plugin[e].push(r),
            (l.onerror = function () {
              i(n);
            }),
            (l.onload = function () {
              o._plugin[e].forEach(function (u) {
                u();
              });
            }),
            document.getElementsByTagName("head")[0].appendChild(l);
        } catch (u) {
          this.collect.emit(br.DEBUGGER_MESSAGE, {
            type: br.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: u.message,
          });
        }
      }),
      t
    );
  })();
K2.usePlugin(hWt, "extend"),
  K2.usePlugin(lWt, "et"),
  K2.usePlugin(uWt, "profile"),
  K2.usePlugin(cWt, "heartbeat"),
  K2.usePlugin(dWt, "monitor"),
  new K2("default");
var fWt = K2,
  pWt = (function () {
    function t() {
      Wn(this, t),
        bn(this, "tea", void 0),
        bn(this, "_userId", void 0),
        bn(this, "_deviceId", void 0);
    }
    return (
      Kn(t, [
        {
          key: "userId",
          get: function () {
            return this._userId;
          },
        },
        {
          key: "deviceId",
          get: function () {
            return this._deviceId;
          },
        },
        {
          key: "channel",
          get: function () {
            return "sg";
          },
        },
        {
          key: "init",
          value: function (e) {
            (this._userId = (e == null ? void 0 : e.userId) || Szt()),
              (this._deviceId = (e == null ? void 0 : e.deviceId) || Ezt()),
              (e == null ? void 0 : e.enable) !== !1 &&
                (this.tea = this._createTea());
          },
        },
        {
          key: "_createTea",
          value: function () {
            var e = new fWt("player_track");
            return (
              e.init({ app_id: 507365, channel: "sg" }),
              e.start(),
              e.config({
                user_unique_id: this._userId,
                device_id: this._deviceId,
              }),
              e
            );
          },
        },
      ]),
      t
    );
  })(),
  o$ = new pWt(),
  gWt = ur,
  mz = yl;
gWt({ global: !0, forced: mz.globalThis !== mz }, { globalThis: mz });
var mWt = yl,
  yWt = mWt,
  vWt = yWt,
  bWt = vWt,
  _Wt = bWt,
  TWt = _Wt,
  EWt = TWt,
  SWt = EWt,
  RWt = SWt,
  s$ = xr(RWt),
  AWt = ur,
  wWt = uR,
  kWt = ku,
  IWt = xc,
  DWt = So,
  PWt = !DWt(function () {
    Reflect.apply(function () {});
  });
AWt(
  { target: "Reflect", stat: !0, forced: PWt },
  {
    apply: function (t, e, n) {
      return wWt(kWt(t), e, IWt(n));
    },
  }
);
var MWt = za,
  CWt = MWt.Reflect.apply,
  $Wt = CWt,
  xWt = $Wt,
  LWt = xWt,
  OWt = LWt,
  GWt = OWt,
  NWt = GWt,
  FWt = NWt,
  UWt = FWt,
  BWt = xr(UWt),
  HWt = ur,
  XWt = iNe;
HWt({ target: "Math", stat: !0 }, { trunc: XWt });
var VWt = za,
  zWt = VWt.Math.trunc,
  jWt = zWt,
  WWt = jWt,
  KWt = WWt,
  ZWt = KWt,
  YWt = ZWt,
  QWt = YWt,
  JWt = QWt,
  qWt = JWt,
  eKt = xr(qWt),
  tKt = ur,
  nKt = So,
  rKt = U9.f,
  iKt = nKt(function () {
    return !Object.getOwnPropertyNames(1);
  });
tKt({ target: "Object", stat: !0, forced: iKt }, { getOwnPropertyNames: rKt });
var aKt = za,
  oKt = aKt.Object,
  sKt = function (t) {
    return oKt.getOwnPropertyNames(t);
  },
  lKt = sKt,
  uKt = lKt,
  cKt = uKt,
  dKt = cKt,
  hKt = dKt,
  fKt = hKt,
  pKt = fKt,
  gKt = pKt,
  cte = xr(gKt),
  mKt = za,
  yKt = mKt.Symbol.for,
  vKt = yKt,
  bKt = vKt,
  _Kt = bKt,
  TKt = _Kt,
  EKt = TKt,
  SKt = EKt,
  RKt = SKt,
  AKt = RKt,
  wKt = xr(AKt),
  kKt = za,
  IKt = kKt.Symbol.keyFor,
  DKt = IKt,
  PKt = DKt,
  MKt = PKt,
  CKt = MKt,
  $Kt = CKt,
  xKt = $Kt,
  LKt = xKt,
  OKt = LKt,
  GKt = xr(OKt),
  NKt = ur,
  FKt = ise,
  UKt = So,
  BKt = Bl,
  HKt = j9.onFreeze,
  dte = Object.freeze,
  XKt = UKt(function () {
    dte(1);
  });
NKt(
  { target: "Object", stat: !0, forced: XKt, sham: !FKt },
  {
    freeze: function (t) {
      return dte && BKt(t) ? dte(HKt(t)) : t;
    },
  }
);
var VKt = za,
  zKt = VKt.Object.freeze,
  jKt = zKt,
  WKt = jKt,
  KKt = WKt,
  ZKt = KKt,
  YKt = ZKt,
  QKt = YKt,
  JKt = QKt,
  qKt = JKt,
  UBe = xr(qKt),
  eZt = Math.log,
  tZt = Math.LOG10E,
  nZt =
    Math.log10 ||
    function (t) {
      return eZt(t) * tZt;
    },
  rZt = ur,
  iZt = nZt;
rZt({ target: "Math", stat: !0 }, { log10: iZt });
var aZt = za,
  oZt = aZt.Math.log10,
  sZt = oZt,
  lZt = sZt,
  uZt = lZt,
  cZt = uZt,
  dZt = cZt,
  hZt = dZt,
  fZt = hZt,
  pZt = fZt,
  gZt = xr(pZt),
  mZt = ur,
  Rbe = h6e;
mZt(
  { target: "Object", stat: !0, forced: Object.isExtensible !== Rbe },
  { isExtensible: Rbe }
);
var yZt = za,
  vZt = yZt.Object.isExtensible,
  bZt = vZt,
  _Zt = bZt,
  TZt = _Zt,
  EZt = TZt,
  SZt = EZt,
  RZt = SZt,
  AZt = RZt,
  wZt = AZt,
  vle = xr(wZt),
  kZt = ur,
  IZt = Bl,
  DZt = j9.onFreeze,
  PZt = ise,
  MZt = So,
  hte = Object.preventExtensions,
  CZt = MZt(function () {
    hte(1);
  });
kZt(
  { target: "Object", stat: !0, forced: CZt, sham: !PZt },
  {
    preventExtensions: function (t) {
      return hte && IZt(t) ? hte(DZt(t)) : t;
    },
  }
);
var $Zt = za,
  xZt = $Zt.Object.preventExtensions,
  LZt = xZt,
  OZt = LZt,
  GZt = OZt,
  NZt = GZt,
  FZt = NZt,
  UZt = FZt,
  BZt = UZt,
  HZt = BZt,
  XZt = xr(HZt),
  VZt =
    /ANGLE\s+\((?:[^,]+,\s+)?([^,/]+)?(?:[^,]*)(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  zZt = /ANGLE\s+\((?:[^,]+,\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  jZt =
    /ANGLE\s+\((?:[^,]+,\s+)?(?:[^:]+:\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)?/,
  l$ = "OpenGL Engine",
  DS = "Unknow",
  WZt = 4318,
  KZt = 32902,
  ZZt = 4098,
  _f = (function (t) {
    return (
      (t.CpuDeriver = "CpuDeriver"),
      (t.Intel = "Intel"),
      (t.Nvidia = "NVIDIA"),
      (t.Amd = "AMD"),
      (t.Apple = "Apple"),
      (t.Adreno = "Adreno"),
      (t[(t.Unknow = DS)] = "Unknow"),
      t
    );
  })(_f || {});
function fte(t) {
  return t === "NVIDIA" ? WZt : t === "AMD" ? ZZt : t === "Intel" ? KZt : 0;
}
function YZt(t, e) {
  var n,
    r,
    i,
    o,
    l,
    u,
    c = DS,
    d = DS,
    h = DS;
  return (
    (t !== "Intel" && t !== "NVIDIA") || (r = VZt.exec(e)),
    (t !== "AMD" && t !== "Adreno") || (r = zZt.exec(e)),
    t === "Apple" && (r = jZt.exec(e)),
    r != null &&
      r[1] &&
      (c = es((i = r[1].replace(/(AMD|NVIDIA)/, ""))).call(i)),
    r != null && r[2] && (h = es((o = r[2])).call(o)),
    (c = es((n = c.split("(0x00")[0])).call(n)),
    t === "Intel"
      ? (d = c = es((l = c.split(l$)[0])).call(l))
      : (d = es((u = c.split(l$)[0])).call(u)),
    { vendor: t, vendorId: fte(t), model: c, backupModel: d, api: h }
  );
}
function QZt(t) {
  var e = /(SwiftShader|Intel|NVIDIA|AMD|Radeon|Apple|Adreno)/.exec(t);
  return e
    ? e[0] === "Radeon"
      ? "AMD"
      : e[0] === "SwiftShader"
      ? "CpuDeriver"
      : e[0]
    : _f.Unknow;
}
function JZt(t) {
  var e,
    n,
    r,
    i,
    o = QZt(t);
  return o === _f.Unknow || o === "CpuDeriver"
    ? { vendor: o, vendorId: 0, model: t, backupModel: t, api: DS }
    : /^ANGLE/.test(t)
    ? YZt(o, t)
    : o === "Intel"
    ? {
        vendor: o,
        vendorId: fte(o),
        model: es((r = t.split(l$)[0])).call(r),
        backupModel: es((i = t.split(l$)[0])).call(i),
        api: DS,
      }
    : {
        vendor: o,
        vendorId: fte(o),
        model: es((e = t.replace(/(AMD|NVIDIA)/, ""))).call(e),
        backupModel: es((n = t.split(l$)[0].replace(/(AMD|NVIDIA)/, ""))).call(
          n
        ),
        api: DS,
      };
}
var qZt = ur,
  eYt = Math.log,
  tYt = Math.LN2;
qZt(
  { target: "Math", stat: !0 },
  {
    log2: function (t) {
      return eYt(t) / tYt;
    },
  }
);
var nYt = za,
  rYt = nYt.Math.log2,
  iYt = rYt,
  aYt = iYt,
  oYt = aYt,
  sYt = oYt,
  lYt = sYt,
  uYt = lYt,
  cYt = uYt,
  dYt = cYt,
  hYt = xr(dYt),
  Abe = "g_ven";
function fYt() {
  try {
    var t = localStorage.getItem(Abe) || "";
    if (t) return t;
    var e,
      n = document.createElement("canvas").getContext("webgl");
    if (n)
      return (
        (t = (e = n.getExtension("WEBGL_debug_renderer_info"))
          ? n.getParameter(e.UNMASKED_RENDERER_WEBGL)
          : "") && localStorage.setItem(Abe, t),
        t
      );
  } catch {}
  return "";
}
function pYt(t, e) {
  var n, r;
  return (
    e === _f.Intel
      ? (n = On(
          (r = t.split(`
`))
        ).call(r, function (i) {
          return "Intel(R) ".concat(i);
        }))
      : (n = t.split(`
`)),
    On(n).call(n, function (i) {
      return i.split("|");
    })
  );
}
function gYt(t, e) {
  var n = _r(t).call(t, function (o) {
    return o[0] === e.model;
  });
  n.length ||
    (n = _r(t).call(t, function (o) {
      return o[0] === e.backupModel;
    })),
    n.length ||
      e.vendor !== _f.Intel ||
      /^Intel(R)/.test(e.model) ||
      (n = _r(t).call(t, function (o) {
        return o[0] === "Intel(R) " + e.model;
      }));
  var r = "-1";
  if (n.length) {
    var i = n[0][1];
    r = i === "-1" ? "0" : i;
  }
  return _i(r);
}
function mYt(t) {
  return t === 0 ? 0 : t === -1 ? -1 : wl(hYt(t).toFixed(2));
}
var yYt = `Arc(TM) A770M Graphics|995
Arc(TM) A770 Graphics|983
Arc(TM) A770 Graphics|969
Arc(TM) A580 Graphics|944
Arc(TM) A730M Graphics|822
Arc(TM) A750 Graphics|768
Arc(TM) A750 Graphics|768
Arc(TM) A550M Graphics|660
Arc(TM) A550M Graphics|634
Xe Graphics ReleaseInternal|561
Arc(TM) A770M Graphics|498
Arc(TM) A380 Graphics|473
Arc(TM) A380 Graphics|468
Arc(TM) A370M Graphics|342
Arc(TM) A370M Graphics|341
Xe Graphics|319
HD Graphics 630 GT2|309
Arc(TM) A350M Graphics|284
Iris(R) Xe MAX Graphics|214
Iris(R) Xe Graphics RI|205
Iris(R) Xe Graphics ReleaseInternal|181
Iris(R) Xe Graphics|180
Gen12 Desktop Graphics Controller|179
Iris(R) Xe Graphics|178
Iris(R) Xe MAX Graphics|168
Corporation Iris Xe Graphics|167
Corporation TigerLake-LP GT2 [Iris Xe Graphics]|162
Xe Graphics|158
Arc(TM) A350M Graphics|156
Corporation TigerLake GT2 [Iris Xe Graphics]|149
UHD Graphics 770|138
UHD Graphics ReleaseInternal|137
Iris(R) Pro Graphics P580|137
Iris(R) Plus Graphics|132
Iris Plus Graphics|127
Iris(R) Pro Graphics 580|126
UHD Graphics 770|125
UHD Graphics 750|125
Radeong 0.4 on AMD TONGA (DRM 3.1.0, LLVM 3.9.0)|123
Corporation Iris Plus Graphics G7|123
Iris(R) Plus Graphics|122
Iris(R) Plus Graphics 940|121
Iris(R) Plus Graphics 650|121
Iris(R) Plus Graphics 655|121
Iris(R) Plus Graphics 655|121
HD Graphics P4600|120
Iris(TM) Pro Graphics 6200|120
Iris(R) Plus Graphics|118
Iris(R) Plus Graphics 650|116
Iris(R) Plus Graphics 655|115
Iris(R) Pro Graphics 580|114
Corporation Iris Pro Graphics 580|114
Iris(R) Plus Graphics 645|113
Iris(TM) Pro Graphics 6200|113
Iris(TM) Pro Graphics P580|113
Corporation Iris Plus Graphics 655|112
Arc(TM) Graphics RI|111
Iris(R) Plus Graphics 655|111
Iris(R) Plus Graphics 655|110
Iris(R) Plus Graphics|110
UHD Graphics|110
Iris Plus Graphics 655|108
Iris(R) Plus Graphics 650|108
Iris(R) Plus Graphics 650|108
Iris(TM) Pro Graphics 580|108
Iris(TM) Pro Graphics 6200|107
Iris Graphics 6100|107
Iris(TM) Pro Graphics 6200|107
Iris(R) Plus Graphics 645|106
UHD Graphics 730|106
Iris(TM) Pro Graphics 6200|103
Iris Pro Graphics 580|102
Corporation Iris Pro Graphics 6200|102
Iris(R) Plus Graphics gfx-driver-user-comp_media-21486 DC ReleaseInternal|101
Iris(R) Pro Graphics 580|101
Iris Plus Graphics 645|101
UHD Graphics 750|100
Iris(TM) Pro Graphics 580|99
Iris(TM) Graphics 550|99
Iris(TM) Pro Graphics P6300|99
Iris(R) Plus Graphics 650|99
Iris(TM) Pro Graphics 5200|98
Iris(R) Graphics 550|97
Iris(R) Plus Graphics|97
Iris(R) Plus Graphics 650|96
Iris(R) Plus Graphics 655|96
Iris(R) Graphics 550|96
Iris(R) Plus Graphics 645|95
Iris Plus Graphics 650|95
Iris(R) Graphics 550|95
Iris Graphics 550|93
Iris(R) Plus Graphics 650|93
Iris(R) Pro Graphics 580|93
Iris(TM) Plus Graphics 650|91
Iris(TM) Graphics 550|91
Iris(R) Plus Graphics 640|89
Iris(TM) Plus Graphics 650|88
Iris(TM) Pro Graphics P6300|88
Iris(TM) Plus Graphics 650|88
Iris(TM) Graphics 550|87
UHD Graphics 730|87
Corporation Iris Plus Graphics 650|87
Iris(TM) Pro Graphics 5200|86
Corporation CometLake-H GT2 [UHD Graphics]|86
Iris(R) Graphics 540|86
UHD Graphics P630|86
UHD Graphics 630|85
Iris(TM) Graphics 540|85
Iris(TM) Plus Graphics 640|84
Iris(TM) Graphics 540|84
UHD Graphics 630|84
UHD Graphics 630|83
UHD Graphics P630|83
Iris(TM) Plus Graphics 640|83
UHD Graphics 630|83
UHD Graphics 630|83
Iris Plus Graphics 640|83
Iris(TM) Graphics 540|82
UHD Graphics 630|82
UHD Graphics 630|82
Iris(TM) Pro Graphics 5200|81
UHD Graphics 630|81
HD Graphics 630|81
UHD Graphics 630|81
UHD Graphics 630|81
UHD Graphics 630|80
UHD Graphics 630|80
UHD Graphics 630|80
Iris Pro Graphics 6200|80
UHD Graphics 630|80
Iris Graphics 540|80
HD Graphics 630|80
Iris(TM) Graphics 540|80
Iris(TM) Pro Graphics 5200|79
UHD Graphics 630|79
UHD Graphics 630|79
UHD Graphics 630|79
Iris Graphics 540|79
UHD Graphics 630|79
UHD Graphics|78
Corporation Sky Lake Integrated Graphics|78
Iris(TM) Pro Graphics 6200|78
Corporation WhiskeyLake-U GT2 [UHD Graphics 620]|78
Radeong 0.4 on AMD BONAIRE (DRM 2.43.0, LLVM 3.8.0)|78
UHD Graphics 710|78
UHD Graphics 630|78
UHD Graphics P630|77
UHD Graphics 630|77
UHD Graphics 630 (Desktop 9 Series)|77
UHD Graphics 630|77
Coffee Lake UHD Graphics|77
Iris(TM) Pro Graphics 5200|77
UHD Graphics 630|76
Iris(R) Plus Graphics 640|76
Iris(TM) Pro Graphics 5200|76
UHD Graphics 630|76
UHD Graphics|76
UHD Graphics 630|76
Iris(TM) Pro Graphics 5200|75
UHD Graphics 630|75
UHD Graphics P630|75
HD Graphics P530|75
HD Graphics 630|75
Iris(TM) Pro Graphics 5200|75
UHD Graphics 630|75
Iris(TM) Pro Graphics 5200|75
HD Graphics 620|74
UHD Graphics 630|74
HD Graphics 630|74
HD Graphics 630|74
Coffee Lake HD Graphics|74
UHD Graphics 630|74
Iris(TM) Graphics 540|74
UHD 630|74
Iris(R) Graphics 540|73
UHD Graphics 620|73
Iris Graphics 6200|73
Corporation CoffeeLake-H GT2 [UHD Graphics 630]|73
UHD Graphics 630 (Desktop)|73
HD Graphics ICL RVP|73
UHD Graphics 630|73
HD Graphics 630|72
Iris Pro|72
KBL Unknown|72
UHD Graphics 630|72
Iris(TM) Pro Graphics 5200|72
HD Graphics 530|72
Corporation UHD Graphics 630 (Desktop 9 Series)|72
Radeon Pro Vega 16|72
Iris(TM) Graphics 540|72
Iris(R) Graphics 540|72
UHD Graphics 630|71
HD Graphics 630|71
Iris(TM) Pro Graphics 5200|71
UHD Graphics 630|71
Iris Pro|71
CometLake UHD Graphics 630|71
HD Graphics 630|71
UHD Graphics|71
Iris(TM) Plus Graphics 640|71
UHD Graphics|71
Corporation UHD Graphics|70
Iris Pro Graphics 6200|70
Iris(R) Graphics 540|70
Graphics|70
UHD Graphics 630|70
HD Graphics ICL RVP BigSur|70
UHD Graphics ReleaseInternal|70
HD Graphics 530|70
UHD Graphics 630|70
UHD Graphics|70
UHD Graphics gfx-driver-user-comp_core-23599|70
UHD Graphics 630|69
UHD Graphics|69
Iris(TM) Pro Graphics 5200|69
Corporation Iris Plus Graphics G1 (Ice Lake)|69
HD Graphics 630|69
HD Graphics 630|69
Iris(R) Plus Graphics|69
Iris(TM) Pro Graphics 5200|69
UHD Graphics 620|69
UHD Graphics|69
Iris(R) Plus Graphics 640|69
Iris Pro Graphics 6200|69
HD Graphics 630|69
UHD Graphics 630 (Mobile)|68
Iris(TM) Pro Graphics 5200|68
Corporation UHD Graphics 630 (Desktop)|68
HD Graphics 630|68
UHD Graphics 630|68
UHD Graphics 620|68
UHD Graphics 630|68
Iris(TM) Plus Graphics 640|68
UHD Graphics|67
Iris Pro Graphics 580|67
Iris(TM) Graphics 540|67
UHD Graphics 620|67
Iris(TM) Pro Graphics 5200|67
UHD Graphics|66
HD Graphics P530|66
Corporation UHD Graphics 630 (Mobile)|66
Iris(R) Plus Graphics 640|66
UHD Graphics 630|66
Iris(R) Plus Graphics 640|65
HD Graphics 630|65
HD 530|65
UHD Graphics 620|65
SKL Unknown|65
HD Graphics 630|64
Iris(TM) Graphics 540|64
Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)|64
UHD Graphics 630|64
HD Graphics 530|63
HD Graphics 530|63
HD Graphics 530|63
Mesa Intel(R) HD Graphics 530 (SKL GT2)|63
UHD Graphics|63
HD Graphics 530|63
Iris Graphics 550|63
HD Graphics 530|63
Iris Plus Graphics 655|63
HD Graphics 630|63
UHD Graphics, Gen11 LP|63
Corporation 8th Gen Core Processor Gaussian Mixture Model|63
UHD Graphics 630|63
Iris(TM) Graphics 650|63
Iris(R) Plus Graphics 640|62
HD Graphics 530|62
Mesa DRI Intel(R) Iris Graphics 540 (Skylake GT3e)|62
Iris(R) Plus Graphics|61
Iris(TM) Pro Graphics 5200|61
Iris Pro|61
HD Graphics 620|61
UHD Graphics 620|61
UHD Graphics 630|61
UHD Graphics|61
HD Graphics 530|60
Iris Plus Graphics G1|60
Iris(TM) Pro Graphics 5200|60
Iris Plus Graphics 650|60
UHD Graphics|60
HD Graphics 620|60
UHD Graphics 620|60
UHD Graphics 630|60
Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2)|60
UHD Graphics 620|60
HD Graphics 630|60
HD Graphics 630|59
Iris Graphics 540|59
Iris Plus Graphics 640|59
CoffeeLake-H GT2 [UHD Graphics 630]|59
HD Graphics 630|59
UHD Graphics|59
HD Graphics 620|59
UHD Graphics 620|59
HD Graphics 630|59
Corporation UHD Graphics 620 (Whiskey Lake)|59
Iris(R) Plus Graphics 650|59
UHD Graphics 620|59
Mesa Intel(R) HD Graphics 520 (SKL GT2)|58
HD Graphics 630|58
HD Graphics P530|58
Iris(TM) Plus Graphics 640|58
Corporation HD Graphics 630|58
UHD Graphics 620|58
UHD Graphics 630|58
HD Graphics P630|58
Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)|58
Corporation CometLake-S GT2 [UHD Graphics 630]|58
HD Graphics 530|58
Iris Graphics 540|58
HD Graphics 530|58
Corporation Device|58
HD Graphics CFL CRB|57
HD Graphics 620 macOS Edition|57
HD Graphics 530|57
Mesa DRI Intel(R) HD Graphics 520 (SKL GT2)|57
Iris Pro Graphics|56
Iris(TM) Pro Graphics 5200|56
Iris(R) Plus Graphics 655|56
Coffee Lake UHD Graphics|56
Iris(TM) Graphics 640|55
Iris Pro|55
UHD Graphics 630|55
UHD Graphics 620|55
HD Graphics 530|55
HD Graphics 520|54
HD Graphics 530|54
UHD Graphics 620|54
HD Graphics 530|54
Corporation UHD Graphics 620|54
UHD Graphics|54
Iris Plus Graphics G7|54
Corporation Skylake GT2 [HD Graphics 520]|53
UHD Graphics 630|53
HD Graphics 630|53
Corporation HD Graphics 530|53
UHD Graphics 617|53
HD Graphics 520|52
HD Graphics 620|52
HD Graphics 620|52
HD Graphics 620|52
HD Graphics 620|52
HD Graphics 630|52
HD Graphics 630|52
HD Graphics 5600|51
HD Graphics 530|51
HD Graphics 630|51
UHD Graphics 615|51
Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)|51
HD Graphics 630|50
HD Graphics 620|50
UHD Graphics|50
HD Graphics P4600/P4700|50
HD Graphics 520|50
HD Graphics 530|50
HD Graphics 620|50
HD Graphics 530|50
Corporation HD Graphics 620|50
HD Graphics 530|50
UHD Graphics 620|49
UHD Graphics 620|49
HD Graphics 530|49
Iris(TM) Graphics 6100|49
HD Graphics 4600|49
HD Graphics 630|49
UHD Graphics 617|49
UHD Graphics RI|48
HD Graphics 520|48
UHD Graphics 617|48
HD Graphics 5600|48
HD Graphics 620|48
UHD Graphics, Gen11 LP|47
UHD Graphics 617|47
Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)|47
HD Graphics 615|47
UHD Graphics RI|47
HD Graphics 630|47
HD Graphics 4600|46
HD Graphics 520|46
Corporation Skylake GT2 [HD Graphics 520]|46
HD Graphics 520|46
Corporation Device|46
HD Graphics 4600|46
HD Graphics 615|45
HD Graphics 4600|45
Iris(TM) Graphics 6100|45
HD Graphics 615|45
UHD Graphics 615|45
HD Graphics 630 GT2|45
HD Graphics 4600|45
HD Graphics 630|45
Iris(TM) Graphics 6100|45
HD Graphics 4600|45
HD Graphics 620|45
Iris(TM) Graphics 6100|45
HD Graphics 520|45
HD Graphics 4600|45
Iris(TM) Graphics 540|44
HD Graphics 530|44
HD Graphics 4600|44
Iris(TM) Graphics 5100|44
Kabylake HD Graphics ULT GT2|44
Iris Graphics 6100|44
UHD Graphics 630|44
HD Graphics 520|44
HD Graphics KBL CRB|44
HD Graphics 530 (Skylake GT2)|44
Corporation HD Graphics 620|44
HD Graphics 515|44
UHD Graphics|44
UHD Graphics 620|44
Iris(TM) Pro Graphics P580|43
UHD Graphics 615|43
HD Graphics 4600|43
HD Graphics 4600|43
Corporation Skylake Integrated Graphics|43
HD Graphics 530|43
UHD Graphics 615|43
UHD Graphics 630|43
HD Graphics 615|42
HD Graphics 620|42
HD Graphics 4600|42
HD Graphics 615|42
HD Graphics 4600|42
HD Graphics 4600|42
Mesa DRI Intel(R) Kabylake GT2|42
HD Graphics 620|42
Corporation HD Graphics 6000|42
UHD Graphics 615|42
HD Graphics 4600|41
Corporation HD Graphics 520|41
HD Graphics P4600/P4700|41
Corporation, Series Chipset Iris Plus Graphics 655|41
HD Graphics 4600|41
Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)|41
HD Graphics 4600|41
Iris(TM) Graphics 640|41
HD Graphics 4600|41
HD Graphics 630|40
Iris(TM) Graphics 5100|40
Iris(TM) Graphics 6100|40
UHD Graphics 610|40
HD Graphics 4600|40
HD Graphics 4600|40
UHD Graphics 615|40
UHD Graphics 610|40
HD Graphics 530|40
UHD Graphics 605|40
HD Graphics 615|40
HD Graphics 4600|40
UHD Graphics 615|40
HD Graphics 505|39
PHDGD Ivy 4|39
Unknown|39
Iris(TM) Graphics 5100|39
Iris|39
Corporation Iris Graphics 6100|39
HD Graphics 6000|39
Iris(TM) Graphics 5100|39
HD Graphics 615|39
HD Graphics 5500|39
Skylake GT2 [HD Graphics 520]|39
Corporation Broadwell-U Integrated Graphics|38
HD Graphics 615|38
HD Graphics 5500|38
HD Graphics 4600|38
Mesa DRI Intel(R) HD Graphics P4000 (IVB GT2)|38
HD Graphics 4600|38
HD Graphics 615|38
Corporation HD Graphics 610|38
HD Graphics 4600|38
HD Graphics 4600|38
Iris(TM) Graphics 5100|38
Iris Graphics 6100|38
HD Graphics 515|38
HD Graphics 6000|38
UHD Graphics, Gen11 LP|38
Iris(TM) Graphics 5100|38
HD Graphics 4600|37
HD Graphics 610|37
HD Graphics 4600|37
HD Graphics 515|37
HD Graphics 4600|37
HD Graphics 4600|37
Iris Graphics P580|37
Iris(TM) Pro Graphics P6300|37
HD Graphics 5500|37
HD Graphics 4600|37
Iris Graphics 6100|37
UHD Graphics 610|37
HD Graphics 4600|37
HD Graphics 4600|37
UHD Graphics 610|37
HD Graphics 530|37
HD Graphics 5500|37
HD Graphics 515|36
HD Graphics P4600/P4700|36
HD Graphics 515|36
HD Graphics 4600|36
UHD Graphics 615|36
Iris Graphics 6100|36
HD Graphics 4600|36
HD Graphics 4600|36
HD Graphics 4600|36
HD Graphics 520|36
HD Graphics 520|36
HD Graphics 5500|36
Corporation HD Graphics 5500|35
Iris|35
HD5500 Graphics PG7|35
HD Graphics 515|35
Iris|35
Graphics gfx-driver-user-feature_dg1_poweron-27723 DCH ReleaseInternal|35
HD Graphics 615|35
HD Graphics P630|35
HD Graphics 510|35
HD Graphics 6000|35
HD Graphics 5000|35
Corporation HD Graphics 5300|35
HD Graphics 6000|35
HD Graphics 4600|35
HD5500 Broadwell PG7|35
Graphics HD 4600|35
HD Graphics 6000|35
HD Graphics 510|34
HD Graphics 610|34
HD Graphics 4600|34
HD Graphics Family (PHDGD Skylake v2.9)|34
Corporation Device|34
HD Graphics 610|34
UHD Graphics 610|34
HD Graphics 5300|34
HD Graphics 5000|34
HD Graphics 4600|34
UHD Graphics 610|33
HD Graphics 4600|33
UHD Graphics 620|33
Corporation UHD Graphics 615|33
HD Graphics 5000|33
Kabylake HD Graphics ULX GT2|33
HD Graphics 620|33
UHD Graphics 615|33
HD Graphics 4600|33
HD Graphics 5500|33
HD Graphics 515|33
UHD Graphics|33
HD Graphics 4600|33
HD Graphics 520|33
HD Graphics 6000|33
HD Graphics 615|33
HD Graphics KBL CRB|33
HD Graphics 4600|33
UHD Graphics 610|33
Iris Graphics 6100|33
HD Graphics 515|33
Iris|32
Iris|32
HD Graphics 5000|32
Iris|32
HD Graphics 5000|32
Iris(TM) Graphics 5100|32
HD Graphics 4600|32
HD Graphics 4600|32
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|32
HD Graphics 5500 (PHDGD Skylake v2.9)|32
HD Graphics 610|32
HD Graphics 6000|31
HD Graphics 5500|31
Iris|31
HD Graphics 6000|31
UHD Graphics 610|31
HD Graphics 510|31
HD Graphics|31
HD Graphics 6000|31
HD Graphics 4400|31
HD Graphics 5000|31
HD Graphics 4600|30
HD Graphics 515|30
HD Graphics 5600|30
HD Graphics 4600|30
HD Graphics 4400|30
HD Graphics 530|30
GeForce GTX 960|30
UHD Graphics 610|30
GeForce GTX 960|30
HD Graphics 510|30
HD Graphics 6000|30
Corporation HD Graphics 515|30
HD Graphics 610|29
HD Graphics 510|29
HD Graphics 5000|29
HD Graphics 4600|29
Iris(TM) Pro Graphics 6200|29
HD Graphics 510|29
HD Graphics 5000|29
HD Graphics 6000|29
Iris|29
HD Graphics 4400|29
HD Graphics 4400|29
HD Graphics 4000|29
HD Graphics 510|29
HD Graphics 5000|29
HD Graphics 4400|28
HD Graphics 610|28
HD Graphics 5300|28
HD Graphics 510|28
HD Graphics|28
HD Graphics 610|28
HD Graphics 4400|28
HD Graphics 610|28
HD Graphics 4600|28
HD Graphics 4600|28
HD Graphics 5000|28
HD Graphics 4400|28
HD Graphics 4400|28
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|28
HD Graphics 4400|28
HD Graphics 5300|28
HD Graphics 5000|28
UHD Graphics 605|28
HD Graphics 4400|28
HD Graphics 5500|28
HD Graphics 4000|28
HD Graphics 4400|27
HD Graphics 615|27
HD Graphics Family(PHDGD Skylake v2.0)|27
HD Graphics 4400|27
HD Graphics 4400|27
HD Graphics 610|27
Corporation HD Graphics 510|27
Iris|27
HD Graphics 520|27
HD Graphics 5000|27
HD Graphics 5300|27
HD Graphics 6000|27
HD Graphics 4000|27
HD Graphics 610|27
HD Graphics 5000|27
HD Graphics 4600|27
Mesa DRI Intel(R) HD Graphics 505 (Broxton)|27
HD Graphics 5500|27
HD Graphics|27
HD Graphics 5000|26
UHD Graphics 600|26
HD Graphics 4600|26
Mesa DRI Intel(R) Haswell Mobile|26
HD Graphics 4000|26
HD Graphics 5300|26
Iris(TM) Graphics 540|26
HD Graphics 4000|26
HD Graphics 4600|26
HD Graphics|26
HD Graphics 4400|26
HD Graphics 4600|26
HD Graphics 6000|26
Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller|26
HD Graphics 530|26
HD Graphics 5500|25
Broxton-P HD Graphics|25
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|25
HD 4000|25
HD Graphics 4400|25
HD Graphics 4600|25
HD Graphics 5500|25
HD 4000|25
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|25
Corporation HD Graphics|25
HD Graphics 4400|25
Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2)|25
HD Graphics 4400|25
HD Graphics|25
UHD Graphics 600|24
Arc(TM) Graphics|24
HD Graphics 4600|24
HD Graphics 5300|24
HD Graphics 4400|24
HD Graphics 4400|24
HD Graphics 4400|24
HD Graphics 4000|24
UHD Graphics 605|24
HD Graphics 5000|23
Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|23
UHD Graphics, LKF|23
UHD Graphics 605|23
HD Graphics 4400|23
HD Graphics 4400|23
HD Graphics 4000|23
HD Graphics 4400|23
Mesa DRI Intel(R) Ivybridge Desktop|23
0x496e74656c2048442047726170686963000732034343|23
HD Graphics 5300|22
HD Graphics 615|22
Kabylake HD Graphics ULX GT2|22
HD Graphics 5300|22
HD Graphics|22
HD Graphics|22
HD Graphics 4000|22
HD Graphics|22
HD Graphics 515|22
HD Graphics|22
HD Graphics 5300|22
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|22
HD Graphics 5300|22
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|22
HD Graphics 4000|21
UHD Graphics 605|21
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21
HD Graphics 4400|21
HD Graphics|21
HD Graphics 4400|21
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21
HD Graphics|21
HD Graphics 5300|21
HD Graphics 4400|21
HD Graphics 5300|21
HD Graphics P4600/P4700|21
HD Graphics|21
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21
Corporation UHD Graphics 605|20
UHD Graphics 600|20
HD Graphics 4000|20
HD Graphics|20
UHD Graphics 600 Universal|20
HD Graphics 4600|20
HD Graphics 500|20
UHD Graphics 600|20
HD Graphics|20
HD Graphics 5000|20
HD Graphics 4400|20
HD Graphics 5300|19
HD Graphics 4000|19
Mesa DRI Intel(R) Sandybridge Mobile|19
HD Graphics 505|19
HD Graphics 4000|19
HD Graphics 4400|19
UHD Graphics 600|19
HD Graphics 3000|19
HD Graphics 615|19
HD Graphics|19
Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Integrated Graphics Controller|19
HD Graphics 4000|19
HD Graphics|19
UHD Graphics 600|19
HD Graphics|19
Corporation Haswell-ULT Integrated Graphics Controller|19
HD Graphics 4400|19
Corporation GeminiLake [UHD Graphics 600]|19
HD Graphics 4000|18
HD Graphics|18
HD Graphics|18
HD Graphics 500|18
HD Graphics 4000|18
CherryView HD Graphics|17
Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|17
Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|17
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|17
UHD Graphics 600|17
UHD Graphics 600|17
Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|16
HD Graphics|16
UHD Graphics 600|16
HD Graphics|16
HD Graphics 5000 (Android)|16
HD Graphics|16
UHD Graphics 600|16
HD Graphics|16
HD Graphics, Gen10|16
HD Graphics (PHDGD IvyDrive 3.0)|16
HD Graphics|15
UHD Graphics 600|15
Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller|15
HD Graphics 500|15
HD Graphics 505|15
HD Graphics|15
Corporation 3rd Gen Core processor Graphics Controller|15
HD Graphics 4400|15
HD Graphics|14
HD Graphics|14
HD Graphics|14
HD Graphics 505|14
HD Graphics|14
HD Graphics|14
HD Graphics|14
HD Graphics|13
HD Graphics 530|13
HD Graphics 500|13
Corporation 3rd Gen Core processor Graphics Controller|13
HD Graphics 4400|12
HD Graphics 5500|12
HD Graphics|12
HD Graphics|12
Corporation HD Graphics 500|12
HD Graphics 500|12
3rd Gen Core processor Graphics Controller|12
HD Graphics|11
Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers|11
Corporation 2nd Gen Core Processor Family Integrated Graphics Controller|11
HD Graphics 510|11
HD Graphics 4600 (PHDGD Skylake v2.9)|9
Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display|8
Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display|8
Mesa DRI Intel(R) Bay Trail|8
UHD Graphics, Gen12 LP ReleaseInternal|5
Corporation D3D12 (Intel(R) UHD Graphics 630)|3
HD Graphics 3000|2
(PE64) Intel(R) 4th Generation Haswell HD Graphics Family|-1
4 Series Internal Chipset|-1
7 Series/C216 Chipset Family MEI Controller #1|-1
B43 Express Chipset|-1
CometLake-S GT2 [UHD Graphics 630]|-1
HD Graphics 5500|-1
HD Graphics 620|-1
G35 Express Chipset Family|-1
G41 Express Chipset|-1
G45/G43 Express Chipset|-1
Graphics Media Accelerator HD|-1
HD Graphics (PHDGD Omega 5.0)|-1
HD Graphics 4400|-1
HD Graphics P3000|-1
HD Graphics P3000 (PHDGD Omega 5.0)|-1
IncrediblE HD Graphics 3000|-1
Iris Pro Graphics 5200|-1
Mesa DRI Intel(R) HD Graphics (CHV)|-1
Mesa DRI Intel(R) Ivybridge Mobile|-1
Mobile Intel(R) 4 Series Express Chipset Family|-1
Mobile Intel(R) 965 Express Chipset Family|-1
Mobile Intel(R) HD Graphics|-1
PHDGD Quantic C3|-1
Q45/Q43 Express Chipset|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.7.0)|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 3.9.0 / 4.9.0-rc1+, LLVM 4.0.0)|-1
Radeong 0.4 on AMD FIJI (DRM 3.2.0 / 4.7.0-rc5+, LLVM 4.0.0)|-1
UHD Graphics, Gen12 LP ReleaseInternal|-1`;
function vYt() {
  return yYt;
}
var bYt = `
GeForce RTX 4090|1950
GeForce RTX 4090 Laptop GPU|1791
GeForce RTX 4070 Ti|1517
GeForce RTX 3090 Ti|1465
GeForce RTX 4080|1426
GeForce RTX 4060 Laptop GPU|1408
GeForce RTX 3080 Ti Laptop GPU|1394
GeForce RTX 3080|1325
GeForce RTX 3080 Ti|1298
RTX A5500 Laptop GPU|1242
GeForce RTX 3090|1235
GeForce RTX 3070 Ti|1229
GeForce RTX 3070|1228
GeForce RTX 3060 Ti|1166
GeForce RTX 3080 Laptop GPU|1139
RTX A4000 Laptop GPU|1126
GeForce RTX 2080 Ti|1120
GeForce RTX 3070 Laptop GPU|1077
TITAN V|1070
GeForce RTX 2080 SUPER|1063
Quadro RTX 8000|1054
RTX A6000|1046
TITAN RTX|1046
GeForce RTX 3070 Ti Laptop GPU|1033
RTX A5000 Laptop GPU|1027
GeForce RTX 4090 Laptop GPU|1024
GeForce RTX 3060|1015
TITAN X (Pascal)|1008
TITAN Xp|995
GeForce GTX 1080 Ti|992
GeForce RTX 4070 Laptop GPU|989
GeForce RTX 4090|982
GeForce RTX 2070 SUPER|981
GeForce RTX 4080|975
GeForce RTX 3060|970
GeForce RTX 2080|970
GeForce RTX 4080 Laptop GPU|968
GeForce RTX 3060 Laptop GPU|913
GeForce RTX 2060 SUPER|890
GeForce RTX 4060 Laptop GPU|882
GeForce RTX 2070|879
GeForce RTX 2080 Super with Max-Q Design|868
GeForce RTX 2080 with Max-Q Design|868
Quadro RTX 5000|867
GeForce RTX 3080 Ti Laptop GPU|861
Quadro RTX 5000 with Max-Q Design|843
Asus GeForce GTX 1080|841
GeForce GTX 1080|841
GeForce RTX 2070 Super with Max-Q Design|837
RTX A3000 Laptop GPU|835
Quadro RTX 4000 with Max-Q Design|833
GeForce RTX 3070 Ti Laptop GPU|827
Quadro RTX 4000|817
RTX A6000|814
GeForce GTX 1070 Ti|785
GeForce RTX 4070 Ti|784
GeForce RTX 4050 Laptop GPU|784
RTX A5500 Laptop GPU|783
TITAN Xp COLLECTORS EDITION|771
GeForce RTX 2070 with Max-Q Design|765
GeForce RTX 3050|760
GeForce RTX 2060|757
GeForce GTX 980 Ti|755
Quadro P6000|753
GeForce GTX 1080|747
Quadro RTX 6000|744
GeForce GTX 1070|742
RTX A4000|739
GeForce RTX 3090|737
GeForce RTX 3080 Ti|733
GeForce GTX 1080 Ti|729
Quadro P4200|711
GeForce GTX 1080 with Max-Q Design|707
GeForce RTX 3060 Lite Hash Rate|705
EIZO MED-XN83|704
GeForce RTX 3080 Ti|701
GeForce GTX 1660 SUPER|701
TITAN Xp|700
EVGA GeForce GTX 1070|698
GeForce RTX 3090 Ti|696
Quadro GV100|695
Quadro P4000|695
GeForce GTX 1660 Ti|694
GeForce RTX 3070 Ti|690
RTX 6000 Ada Generation|687
GeForce RTX 3070|687
Quadro RTX 8000|685
RTX A2000 12GB|683
GeForce RTX 2080|679
GeForce GTX TITAN X|679
Quadro M6000 24GB|676
GeForce GTX 1660 SUPER|674
TITAN V|673
Quadro RTX 3000|672
Graphics Device|672
RTX A5000|669
GeForce RTX 3090|669
TITAN Xp COLLECTORS EDITION|669
GeForce GTX 1070 A17|668
GeForce RTX 3080 Laptop GPU|667
RTX A4500 Embedded GPU|663
RTX A5000 Laptop GPU|663
GeForce RTX 3080|658
GeForce RTX 3050 Ti Laptop GPU|657
GeForce GTX 1070 with Max-Q Design|656
GeForce RTX 3060 Ti|656
Quadro P4200 with Max-Q Design|651
GeForce RTX 3080|651
GeForce RTX 2080 SUPER|650
GeForce GTX 1070 Ti|648
GeForce GTX 1070 with MaxQ Design|642
RTX A3000 Laptop GPU|641
GeForce RTX 3070 Laptop GPU|641
GeForce GTX 1070|640
GA104GL [RTX A4000]|639
GeForce GTX 980 Ti|637
GeForce RTX 2070 Mobile / Max-Q Refresh|637
RTX A4000 Laptop GPU|634
GeForce RTX 3060|633
Microsoft Virtual Render Driver|633
GeForce RTX 3050 Laptop GPU|631
RTX A2000|629
GeForce RTX 2070 Mobile / Max-Q|626
GeForce RTX 3070|625
Quadro P5000|625
Quadro P4000|621
GeForce RTX 3060 Laptop GPU|621
GeForce RTX 2060 with Max-Q Design|618
GV102|614
GeForce RTX 2070 SUPER|612
GeForce GTX 1660|606
GeForce RTX 2070|604
GeForce GTX 1660 Ti with Max-Q Design|601
GeForce GTX TITAN X|598
RTX A2000 8GB Laptop GPU|598
GeForce GTX TITAN Xp|595
GeForce GTX 980|593
GeForce RTX 2080 SUPER|591
GTX 1060 HL|589
Tesla T4|589
GRID P4-1Q|585
RTX A4000|581
GeForce RTX 2080 Ti|577
GeForce RTX 2080 Super with Max-Q Design|576
Quadro RTX 4000 Mobile / Max-Q|576
TU102 [TITAN RTX]|574
GeForce GTX 1060 with Max-Q Design|571
GeForce RTX 2070 SUPER|570
GeForce GTX 1060 6GB|570
GeForce RTX 2080 Mobile|568
GeForce RTX 2060|568
Quadro P3200|565
P106-100|564
GRID V100DX-1Q|564
RTX A2000|562
GeForce RTX 2080 Ti Rev. A|561
GeForce RTX 2080 Rev. A|559
GV100 [TITAN V]|557
GeForce RTX 2080|556
GeForce GTX 1650 SUPER|554
P106-100 Custom|553
GeForce RTX 2070 Super with Max-Q Design|553
GV100|553
GeForce RTX 2070 Mobile|550
GP102 [TITAN X]|548
RTX A2000 12GB|546
GeForce GTX 1060 5GB|542
MSI GeForce GTX 1060|542
GeForce RTX 2060 SUPER|542
GRID T4-1Q|539
Quadro RTX 5000 Mobile / Max-Q|538
GeForce RTX 3050|538
GeForce GTX 1060 3GB|538
Quadro RTX 5000 with Max-Q Design|537
Quadro M6000|536
RTX A2000 Laptop GPU|536
GeForce GTX 1660 SUPER|533
A10-2B|530
TITAN X (Pascal)|530
Quadro P5000|527
GeForce RTX 2070|526
GeForce GTX 1080|525
GeForce RTX 2060 Mobile|524
PNY GeForce GTX 980|524
GeForce GTX 1080 Mobile|523
GeForce RTX 2060 SUPER|520
GeForce GTX 780 Ti|518
RTX A4500|516
GeForce RTX 2060 Rev. A|515
MSI GeForce GTX 980|515
Quadro P3200 with Max-Q Design|513
GeForce RTX 2070 with Max-Q Design|513
GeForce RTX 3050 Ti Laptop GPU|510
Quadro RTX 3000 Mobile / Max-Q|509
GeForce GTX 1660 SUPER|508
Quadro RTX 4000|508
GeForce GTX 1060|506
GeForce RTX 2080 with Max-Q Design|505
GeForce GTX 1080 Ti|505
GeForce GTX 1660 Ti Rev. A|504
GeForce GTX 1660 Ti Mobile|504
GeForce RTX 3050 Laptop GPU|503
GeForce RTX 2060|503
Quadro RTX 4000 with Max-Q Design|500
EIZO MED-XN83|499
GeForce GTX 970|499
GeForce GTX 1080|495
GeForce GTX 1070 Ti|492
GeForce GTX 980|491
A100-PCIE-40GB|489
GeForce GTX 1070|487
GeForce GTX 1660 Ti|487
Quadro P2200|485
GeForce GTX TITAN Black|484
TITAN Xp COLLECTORS EDITION|483
TITAN RTX|482
Quadro P5200|482
GeForce GTX 1060 with Max-Q Design|480
RTX A1000 Laptop GPU|479
GeForce GTX 1060 6GB|479
Quadro RTX 5000|475
TITAN V|475
GRID P100-4Q|474
EVGA GeForce GTX 970|472
GeForce GTX 1650 SUPER|471
GeForce GTX 1650 Ti|470
Quadro RTX 3000|470
Quadro M5000|469
Quadro RTX 3000 with Max-Q Design|468
GeForce GTX 980 Ti|467
GeForce GTX TITAN|467
Quadro P4200|466
GeForce GTX 1070 with Max-Q Design|466
Quadro M5000|466
GeForce GTX 1080 Ti|466
Tesla M60|462
GeForce GTX 1660|457
GeForce GTX 1660|455
GeForce RTX 2050|453
GeForce GTX 1060|453
GeForce RTX 2060 with Max-Q Design|453
Quadro P3200 with Max-Q Design|452
Quadro P4000|450
GeForce GTX 1060 3GB|449
GeForce GTX 1070|448
GeForce GTX 1060 6GB Rev. 2|447
Gigabyte GeForce GTX 780 Ti|447
TITAN Xp|444
GeForce GTX 980M|440
A10-4Q|439
GeForce GTX 1080 with Max-Q Design|437
GeForce GTX 1650 SUPER|435
Quadro P5000|435
Quadro P3000|434
RTX A6000|434
GeForce GTX 1060 3GB|433
GeForce GTX 1070 Ti|432
GeForce GTX 780|432
GeForce GTX 1060 Mobile|432
Gigabyte GeForce GTX 970|431
GeForce GTX TITAN Z|431
Quadro K6000|429
GeForce GTX 1650|425
GeForce GTX 970|421
Tesla K20m|420
Quadro GV100|419
Quadro P4000|419
Quadro P3200|417
GTX 1060 HL|415
RTX A2000 Laptop GPU|415
GeForce GTX 780 by St3Phl3|414
P102-100|412
T1200 Laptop GPU|412
GeForce GTX 780 Ti|411
GeForce GTX 1060 6GB|408
GeForce GTX 1650 Ti with Max-Q Design|407
Quadro T2000 with Max-Q Design|407
Quadro P2000|406
Quadro P2200|406
GeForce RTX 2060 Max-Q|405
GeForce GTX 1650 Ti Mobile|403
GeForce GTX 1060 Mobile 6GB|403
GeForce GTX 1060 with Max-Q Design|401
GeForce GTX 980|398
GeForce RTX 2070 Rev. A|397
GeForce GTX TITAN X|397
Tesla T4|395
Quadro P6000|394
GeForce GTX 1060 3GB|394
Quadro M5000|393
GeForce GTX 1060 with Max-Q Design|392
PNY GeForce GTX 970|392
Quadro T2000|391
Quadro T1000 with Max-Q Design|391
GRID P40-8Q|390
GeForce GTX 780 Rev. 2|389
Quadro GP100|387
GeForce GTX 980|387
P104-100|387
GeForce GTX 1650 Ti|386
GRID P40-4Q|384
GeForce GTX 780 Ti|383
Device|383
TU117M|381
Quadro P2000|380
Quadro RTX 6000|379
GeForce GTX 1070 Mobile|378
Quadro T1000|377
GeForce RTX 3070 Mobile / Max-Q|376
GeForce GTX 1060|376
GRID V100-1Q|375
GeForce GTX 780 Rev. 2|372
GeForce RTX 2050|370
GeForce GTX 770|370
GeForce GTX 970|368
GeForce GTX 1650 Ti|368
GRID T4-2B4|368
Asus GeForce GTX 780|366
P106-100|365
Quadro RTX 8000|365
GeForce GTX TITAN Black|365
GRID RTX6000-2Q|365
GeForce GTX TITAN Black|363
Quadro M4000|363
GeForce GTX 1060 6GB|362
Quadro P5000|361
GeForce GTX 1650|361
Quadro M5500|361
GeForce GTX 780|360
GeForce GTX 780|360
GeForce GTX 980M|358
GeForce GTX 1650|358
GeForce GTX 1050 Ti|357
Quadro P3200 Mobile|357
GeForce GTX 1650 with Max-Q Design|356
Tesla T4|356
Quadro P2000|356
GeForce GTX TITAN|355
GeForce GTX 970|355
GeForce GTX 980 Ti|354
GeForce GTX 1660 Ti with Max-Q Design|354
GeForce GTX 780 Rev. 2|352
GRID P4-4Q|351
GeForce GTX TITAN X|351
T1200 Laptop GPU|350
GRID T4-8Q|350
GeForce GTX 1060|349
GeForce GTX 1050 Ti with Max-Q Design|348
GeForce GTX 970M|346
T1000 8GB|346
GeForce RTX 3080 Mobile / Max-Q 8GB/16GB|346
GeForce GTX 780 Ti|346
GeForce GTX 680|346
GeForce GTX 1660 Ti|345
GeForce GTX 780|345
Quadro M6000|344
GRID T4-16Q|344
GeForce RTX 2080 Ti|344
GRID T4-1B|343
Quadro K5200|342
Quadro P2200|341
T1000 8GB|341
Tesla K80|341
Quadro T2000 Mobile / Max-Q|338
TU107|337
GeForce GTX 780 Mac|336
GeForce GTX TITAN|336
GeForce GTX 980M|335
GRID P40-2Q|335
EVGA GeForce GTX 780|334
GeForce GTX TITAN Z|334
TITAN X (Pascal)|332
GeForce GTX 960|331
Tesla P40|331
GeForce GTX 1650 Ti with Max-Q Design|330
Tesla P40|330
GeForce GTX 1060se 3GB|329
GeForce GTX 1650 Mobile / Max-Q|329
Quadro T2000 with Max-Q Design|328
T1000|327
RTX A5500|326
A40-8Q|326
GeForce RTX 3060 Mobile / Max-Q|326
GeForce GTX 690|326
Tesla V100-SXM2-16GB|326
Quadro M5000|325
A16-2B|323
GeForce GTX 1050 Ti with Max-Q Design|321
GeForce GTX 1050 Ti Mobile|321
GeForce GTX 980M|319
Quadro M3000M|318
GeForce GTX 1650 with Max-Q Design|318
GeForce GTX 670|316
Quadro P3000|316
T600 Laptop GPU|315
Quadro T1000 with Max-Q Design|313
Tesla K80|312
Tesla K20m|311
GeForce GTX 770|311
Tesla P100-PCIE-16GB|311
Quadro M5000M|311
Tesla K80|309
EVGA GeForce GTX 1070|309
Quadro T1000|309
GeForce GTX 1050 Ti|309
GeForce GTX TITAN Z|308
Quadro T2000|308
Quadro M6000 24GB|308
GeForce GTX 760 Ti|308
GeForce RTX 2080 SUPER Mobile / Max-Q|308
GeForce GTX 1050 Ti|307
Quadro P2000|304
Quadro P6000|304
GeForce GTX 770 Mac Edition|303
MSi GeForce GTX 1050 Ti|303
A40|303
T600|303
P106-090|302
P106-090|301
Quadro K5200|300
GeForce GTX 770|299
GeForce GTX 680|299
GeForce GTX TITAN|299
GeForce GTX 680|297
GRID M60-4Q|296
Quadro M4000|296
GRID M60-2Q|295
GeForce GTX 760|294
GRID V100DX-16Q|293
Quadro RTX 6000/8000|293
GeForce GTX 770|293
GP104|292
GeForce GTX 780 Rev. 2|290
GeForce GTX 1050 Ti|288
GeForce GTX 950|288
EVGA GeForce GTX 1050 Ti|288
GeForce GTX 1650 with Max-Q Design|286
GeForce GTX 880M|285
%NVIDIA_DEV.13D7.0580.1028%|283
GP104GL|283
Gigabyte GeForce GTX 960|282
Quadro K5200|281
GeForce GTX 660 Ti|281
GeForce GTX 670|281
Quadro M4000|280
GeForce GTX 580|280
MSi GeForce GTX 960|280
Tesla M6|278
PNY GeForce GTX 680|278
T500|277
GeForce GTX 1050|276
GeForce GTX 1050 Ti with Max-Q Design|276
GeForce GTX 690|276
GeForce GTX 680|276
GeForce GTX 670|275
GeForce GTX 760 Ti|274
GeForce GTX 1050 3GB|272
GeForce GTX 880M|272
Tesla M60|272
Asus GeForce GTX 960|271
Quadro M4000|269
T600|268
Tesla K20m|268
GeForce GTX 760|268
GP102 [TITAN Xp]|267
GeForce GTX 960|267
GeForce GTX 670|265
Quadro T1000 Mobile|265
GeForce GTX 1050|264
Tesla M60|264
EVGA GeForce GTX 1080 Ti|263
GeForce GTX 970M|263
GeForce GTX 780M|262
GeForce GTX 690|262
Asus GeForce GTX 770|261
GeForce GTX 1070 with MaxQ Design|261
EVGA GeForce GTX 960|261
GeForce GTX 960|260
GRID T4-2Q|259
GeForce GTX 970M|259
GeForce GTX 960|259
Quadro M3000M|258
GeForce GTX 1060se 3GB|257
Tesla K10|257
Quadro M3000M|257
Quadro M2200|256
GeForce GTX 690|255
GeForce GTX 760|254
GeForce GTX 880M|254
Quadro K4200|253
Quadro P2000 with Max-Q Design|253
T550 Laptop GPU|253
Quadro K5200|252
MSI GeForce GTX 760|250
GeForce GTX 580|249
GeForce GTX 780M Mac Edition|249
GeForce GTX 570|249
Tesla V100-PCIE-16GB|248
GeForce GTX880M|248
GeForce GTX 760|247
GeForce GTX 570 Rev. 2|247
Asus GeForce GTX 670|246
GeForce GTX 580|246
GeForce GTX 1050|245
Tesla P4|244
GeForce GTX 680MX|244
GeForce GTX 480|242
GeForce GTX 1050|242
Quadro 7000|241
Quadro M4000M|241
GeForce GTX 1050 Mobile|240
GeForce GTX 660|240
GeForce GTX 760 (192-bit)|239
Quadro K5000|239
GeForce GTX 760 OEM|238
GeForce GTX 660 Ti|238
GeForce GTX 775M Mac Edition|238
GeForce GTX 965M|237
GeForce GTX 870M|236
GeForce GTX 950|236
GeForce GTX 560 Ti 448 Cores|236
GeForce GTX 780M|236
Quadro P2000 with Max-Q Design|234
MSI GeForce GTX 980 TI|234
GRID K2|233
GeForce GTX 1060 6GB OpenGL Engine|233
PNY GeForce GTX 1060|233
EVGA GeForce GTX 980|232
GRID RTX6000P-6Q|232
GeForce GTX 950|232
GeForce GTX 950|232
GeForce GTX 590|231
GeForce GTX 1070 OpenGL Engine|231
TITAN X (Pascal)|229
GeForce GTX 1050 with Max-Q Design|229
GeForce GTX TITAN Black|228
Quadro K4200|227
GeForce GTX 660 OEM|227
GeForce MX450|225
GeForce GTX 1050 with Max-Q Design|225
Quadro P1000|225
Graphics Device|225
Quadro M2000|222
GeForce GTX 1630|222
Quadro M4000M|221
Quadro K5100M|221
EVGA GeForce GTX 760|221
GeForce GTX 1070 Ti|221
GeForce GTX 660 Ti|220
GeForce GTX 570|220
GeForce GTX 660 Ti|219
Quadro K6000|219
GeForce GTX 570 Rev. 2|219
GeForce GTX 1050 with Max-Q Design|219
Tesla M40|218
GeForce GTX 680M|217
GeForce GTX 780M by Nick[D]vB|217
Asus GeForce GTX 980 TI|217
GeForce GTX 1060 3GB|217
Graphics Device|217
GeForce GTX 570 Rev. 2|216
GeForce GTX 1060 3GB OpenGL Engine|216
GeForce GTX 660|215
Point of View GeForce GTX 660 Ti|214
Gigabyte GeForce GTX 980|214
Quadro K5000|213
Quadro P1000|213
GeForce GTX 480|213
GeForce MX450|212
Quadro K4200|211
GRID K280Q|211
Asus GeForce GTX 760|210
Quadro P1000|210
GeForce GTX 680MX|209
GeForce GTX 1060 6GB|209
GeForce GTX 660|209
GeForce GTX 750 Ti|208
GeForce GTX 780M Mac Edition|208
GeForce GTX 775M Mac Edition|208
GRID K520|208
Quadro M2200|207
GRID M60-8Q|207
GRID K2|207
GeForce GTX 775M Mac Edition|206
GeForce GTX 560 Ti 448 Cores|205
GeForce GTX 760 (192-bit)|205
Quadro K5000|205
Gigabyte GeForce GTX 980 TI|204
GeForce GTX 780M Mac Edition|204
Asus GeForce GTX 660|204
GRID M60-1B|202
GeForce GTX 650 Ti BOOST|202
GeForce GTX 480|202
GeForce GTX 960M|201
GeForce GTX 660 OEM|201
GeForce GTX 780 Ti|201
Quadro K5000|201
GeForce GTX 780M Mac Edition|201
GeForce GTX 870M|200
GeForce GTX 680MX|200
GeForce GTX 680MX|199
Quadro P1000|198
Tesla P100 PCIe 16GB|198
Quadro K5100M|198
GeForce GTX 470|198
Quadro P620|197
Asus GeForce GTX 780|197
Quadro 6000|196
Quadro M1200|195
Quadro K2200|195
GeForce GTX 590|195
Quadro M2000M|194
Quadro M4000 OpenGL Engine|194
GeForce GTX 870M|194
GeForce GTX 1070|194
EVGA GeForce GTX 750 Ti|194
Zotac GeForce GTX 680|193
Quadro RTX 3000 with Max-Q Design|193
T400|193
Quadro M2200|193
Quadro K4100M by nikey22|192
GRID K2|192
GTX 865M by iMacGFX|191
Quadro M2000|191
GeForce GTX 980M|190
GeForce GTX 560 Ti|190
Palit GeForce GTX 660|190
GRID K260Q|189
GRID M10-2Q|189
GeForce GTX 660|189
GeForce GTX 965M|189
GeForce GTX 650 Ti BOOST|188
GeForce GTX 675MX Mac Edition|188
Quadro K5100M by nikey22|187
GeForce GTX 680M|187
Zotac GeForce GTX 660|186
GeForce GTX 650 Ti BOOST|186
GeForce GTX 760 (192-bit)|185
GRID M60-1Q|184
Gigabyte GeForce GTX 960|184
Quadro M2000M Special Edition|184
GeForce GTX 560 Ti|184
Inno3D GeForce GTX660|183
GeForce GTX 1060|183
GeForce GTX 675MX Mac Edition|182
Quadro P600|181
GeForce GTX 1080|181
GeForce GTX 675MX Mac Edition|181
Quadro P620|180
GK104 Board - 20530501|180
Ashley|180
Quadro M2000|179
GeForce GTX 860M|179
MSi GeForce GTX 1050 Ti|179
Asus GeForce GTX 750 Ti|178
GeForce GTX 750 Ti|178
GeForce GTX 750 Ti|177
EVGA GeForce GTX 980 TI|177
Asus GeForce GTX 770|177
GeForce GTX 760 OEM|176
GeForce GTX 750|176
Quadro P2000 Mobile|176
Quadro K4100M|175
T400 4GB|174
GeForce GTX 1080 Ti OpenGL Engine|174
Quadro K5000M|173
GeForce GTX 960A|173
GeForce GTX 560 Ti|172
Tesla M10|172
GeForce GTX 1080 Ti|172
GRID RTX6000P-6|172
GK104 Board - 2051b502|172
GeForce GTX 770M|172
GeForce GTX 960M|172
GeForce GTX 970|172
GRID M10-2Q|171
GeForce GTX 560 Ti OEM|171
MSi GeForce GTX 970|171
GK104GL [GRID K2]|171
GeForce GTX 470|170
GeForce GTX 560 Ti|170
TITAN Xp|170
GeForce GTX 870M|170
GeForce MX350|169
MSi GeForce GTX 580|169
GeForce GTX 960M|169
EVGA GeForce GTX 760|169
Quadro K4000M|169
T400|169
GeForce MX350|168
GeForce GTX 470|168
GeForce GTX 560|167
Quadro 6000|167
GeForce GTX 1050 Ti OpenGL Engine|167
Quadro M1200|167
Gigabyte GeForce GTX 970|166
GeForce GT 1030|166
GeForce GTX780M by nikey22|166
GeForce GTX870M by nikey22|166
Tesla V100-PCIE-32GB|165
Quadro K2200|165
Quadro M1000M|165
Quadro K2200|165
Asus GeForce GTX 970|164
GeForce GTX 750 Ti|164
Quadro M2000M|164
GeForce GTX 1050|164
GeForce GTX 1050 Ti|163
Quadro K5000|163
Graphics Device|162
GeForce MX250|162
T500|161
EVGA GeForce GTX 570|161
Quadro M2000M|161
Quadro K1200|159
GeForce GTX 860M|159
GeForce GTX 770M|159
Quadro M1200|158
GeForce GTX 675MX|158
GeForce MX330|158
Quadro K2200M|157
Quadro K4000|157
GeForce GTX 690|157
GeForce GTX 860M|157
MSi GeForce GTX 670|156
Quadro K2200|156
Quadro K4100M|156
GeForce GTX 770M by Nick[D]vB|155
Tesla V100-SXM2-32GB|155
GeForce GTX 1080 OpenGL Engine|155
Gigabyte GeForce GTX 670|155
EVGA GeForce GTX 960|155
GeForce GTX 750|155
GeForce Pre-Release TITAN X (Pascal) OpenGL Engine|154
GeForce GTX TITAN Xp|154
Asus GeForce GTX 950|154
Quadro K4100M|153
GeForce GTX 960|153
GeForce GTX 770M|153
GeForce MX330|153
Quadro M2200 Mobile|153
GeForce MX250|153
GeForce Pre-Release TITAN Xp OpenGL Engine|153
Quadro P600|153
Quadro M620|152
GeForce GTX 1070 Ti OpenGL Engine|152
GeForce GTX 770|152
GeForce GT 1030|152
Tesla C2070|152
GeForce GTX 650 Ti|152
GRID K240Q|151
GeForce GTX 480 OpenGL Engine|151
GeForce GTX 750|151
GeForce GTX TITAN|151
GeForce GTX 760 (192-bit)|151
GeForce GTX 560|151
GeForce GT 1030|151
Quadro K5000M|151
Quadro P1000 Mobile|151
Zotac GeForce GTX 660|151
GeForce GTX 460 v2|150
GRID GTX P40-6|150
MSi GeForce GTX 660|149
GeForce GTX 780M|149
MSI GeForce GTX 760|149
P106-090|149
GeForce GTX 950A|149
GeForce MX150|149
Asus GeForce GTX 1060|149
Unknown|149
GeForce GTX 980 Ti|148
GRID T4-4Q|148
GeForce GTX 465|147
Colorful GeForce GTX 960|147
Gigabyte GeForce GTX 750|147
Quadro M1000M|147
GeForce GTX 780 Mac|147
GeForce GTX 460|146
MSi GeForce GTX 960|146
GeForce GTX 560|146
Quadro K4000|145
GeForce GTX 970M|145
Quadro M1000M|145
Unknown|145
GeForce GTX 980|144
GeForce GTX 950|144
GeForce GTX 675M|144
Zotac GeForce GTX 960|144
GeForce Pre-Release Graphics Device|144
GeForce GTX 670 OpenGL Engine|143
Quadro K4000|143
EVGA GeForce GTX 580|143
GeForce GTX 950M|143
GeForce GTX TITAN Black OpenGL Engine|142
GeForce GTX 760|142
Quadro 5000|142
MSI GeForce GTX 570 HD|142
GeForce Pre-Release TITAN Xp COLLECTORS EDITION OpenGL E|142
GeForce GTX 1050 OpenGL Engine|142
GeForce GTX TITAN X|142
GeForce GTX 880M|141
GV-N660OC-2GD|141
GeForce GTX 750|141
Quadro M5000M|140
GeForce GTX 970 OpenGL Engine|140
GeForce GTX 675MX|140
Asus GeForce GTX 760|140
Quadro P5000 OpenGL Engine|139
GeForce GTX 580|139
GeForce GTX 675MX|139
Zotac GeForce GTX 750|139
Quadro K1200|139
GeForce MX150|139
GeForce GTX 650 Ti|139
Quadro K1200|139
GeForce GTX 980 Ti OpenGL Engine|139
GeForce GTX 580M|138
Asus GeForce GTX 580|138
GeForce GTX 770 OpenGL Engine|138
GeForce GT 1010|138
GeForce GTX 780 Rev. 2|138
Quadro P2000 OpenGL Engine|138
GeForce MX250|138
Quadro K4000|137
GeForce GTX 460 v2|137
GeForce GTX 770M|137
Gigabyte GeForce GTX 570 HD|136
GeForce GTX 465|136
GeForce GTX 460 v2|136
GeForce GTX 670|136
GeForce GTX 590 OpenGL Engine|136
GeForce GTX 780|135
GeForce GTX TITAN Black|135
GeForce GTX 660 Ti|135
Zotac GeForce GTX 560 Ti|134
GeForce GTX 880M OpenGL Engine|134
GeForce GTX 650 Ti|134
GeForce GTX 760 OpenGL Engine|134
null Graphics Device|134
Quadro M620|133
GeForce GTX 780M Mac Edition|133
GeForce MX150|132
Asus GeForce GTX 570 HD|132
GeForce GTX 775M OpenGL Engine|132
GeForce GTX 850M|132
Asus GeForce GTX 570|132
Quadro K6000 OpenGL Engine|131
GeForce GTX 850M|131
GeForce GTX 460|131
GeForce GTX 950A|130
GeForce GTX 780M OpenGL Engine|130
Point of View GeForce GTX 660 Ti|130
GeForce GTX 775M Mac Edition|130
EVGA GeForce GTX 650 Ti|130
EVGA GeForce GTX 750 Ti|129
GeForce GTX 460|129
Quadro P520|129
Gainward GeForce GTX 570|129
Asus GeForce GTX 750 Ti|129
Quadro K3100M|128
Quadro K2200|128
Asus GeForce GTX 560 Ti|127
GeForce GTX 680|127
GeForce GTX 680 OpenGL Engine|127
GeForce GTX 950M|127
GRID V100-2B|127
Gigabyte GeForce GTX 660 Ti|127
N15E-GT|126
Quadro K1200|126
GeForce GTX 650 Ti|126
Gigabyte GeForce GTX 770|126
GeForce GTX 660|126
Quadro 5000|125
GeForce GT 1030|125
GeForce GTX 950M|125
GeForce GTX 765M|125
Quadro M5000|125
Gigabyte GeForce GTX 560 Ti|125
GeForce GTX 580M|125
Quadro M2000|124
GeForce GTX 850M|124
GeForce GTX 570 OpenGL Engine|123
Gainward GeForce GTX 750 Ti|123
Quadro K2200M|123
GeForce GTX 780M Mac Edition|123
GeForce GTX 680MX OpenGL Engine|123
Quadro K4200|123
GeForce GTX 460 OEM|122
GeForce GTX 670MX|122
MSi GeForce GTX 560 Ti|122
GeForce GTX 460 SE|122
Quadro M4000|122
GeForce GTX880M OpenGL Engine|122
Quadro P620|121
GeForce GTX 560 SE|121
GeForce GTX880M by nikey22|121
GeForce GTX 555|121
GeForce GTX 965M OpenGL Engine|121
GeForce GTX 850A|121
Quadro K5000 OpenGL Engine|120
GeForce GTX 580 OpenGL Engine|120
Quadro K3100M|120
GeForce GTX 650 Ti BOOST|119
GeForce GTX 570M|119
GeForce GTX 675MX OpenGL Engine|119
GeForce GTX 775M Mac Edition|119
Zotac GeForce GTX 1050 Ti|118
GeForce GTX 965M|117
Quadro M600M|117
GeForce GTX 780M by Nick[D]vB|117
GeForce GTX 460 SE|117
GeForce GTX 555|116
GeForce GTX 670M|116
Quadro K3000M|116
GeForce GTX 780 Ti OpenGL Engine|116
Quadro K4000M|115
GeForce GTX 860M|115
Asus GeForce GTX 660|115
Tesla C2075|114
GeForce GTX 675MX Mac Edition|114
Zotac GeForce GTX 770|114
Gigabyte GeForce GTX 750 Ti|114
GeForce MX330|114
GeForce GT 1030|113
GeForce GTX TITAN OpenGL Engine|113
GeForce GTX 590|113
Quadro K620|113
GeForce GTX 780M|112
GeForce GTX 560 Ti|112
Quadro 6000|112
EVGA GeForce GTX 560 Ti|112
Asus GeForce GTX 960|112
Quadro K5000|112
Point of View GeForce GTX 470|111
PNY GeForce GTX 580|111
GeForce GTX 770M|111
GeForce GT 120|111
MSi GeForce GTX 660|111
Gigabyte GeForce GTX 560|111
GeForce GTX 680MX|110
GeForce 945M|110
GeForce GTX 765M|110
GeForce GTX 950 OpenGL Engine|110
GeForce Pre-Release Tesla C2075 OpenGL Engine|109
GeForce GTX 550 Ti|109
GeForce GTX 765M|108
PNY GeForce GTX 750|108
GeForce GTX 560 Ti 448 Cores|108
Quadro P500|108
GeForce GTX 670MX|108
GeForce GTX 680MX|107
GeForce GTX 460 SE|107
GeForce GTX 675MX Mac Edition|107
GeForce GTX 770M OpenGL Engine|107
GeForce 945M|107
GeForce GTX 675MX|107
PNY GeForce GTX 570 HD|106
GeForce GTX 745|106
GeForce MX230|106
GeForce GTX 670MX|106
GeForce 845M|106
Quadro K3100M OpenGL Engine|105
Quadro P2000|105
GeForce MX570 A|105
GeForce GTX 750 Ti|104
GeForce GTX 660 OEM|104
Quadro M600M|104
GeForce GTX 750|104
GeForce GTX 645|104
GP108|104
Quadro P520|104
Zotac GeForce GTX 460|103
Chip Model|103
GeForce GTX 670M|103
Quadro T1000|103
GeForce GTX 670M|103
GeForce GTX 650|103
Zotac GeForce GTX 750|102
GeForce GTX 460 OpenGL Engine|102
GeForce GTX 860M OpenGL Engine|102
Quadro 4000|102
Asus GeForce GTX 480|102
Zotac GeForce GTX 650 Ti|102
GeForce GT 755M|101
GF100 Board - 10220000|101
GeForce GTX 470M|101
GeForce GTX 570 Rev. 2|101
GeForce GTX 775M by iDopt Mac|101
GeForce GTX 765M by Nick[D]vB|101
GeForce GTX 570|101
GeForce GTX 645|101
GeForce GTX 550 Ti|100
GeForce GTX 760M|100
GeForce GT 1030 OpenGL Engine|100
GeForce GTX 650|100
Quadro P400|100
GeForce GTX 480|99
EVGA GeForce GTX 650|99
EVGA GeForce GTX 560|99
GeForce MX130|99
GeForce MX130|98
Asus GeForce GTX 460|98
Elitegroup GeForce GTX 460|98
Tesla V100-SXM2-32GB|98
GeForce GT 755M|98
GeForce GTX 760 Ti OpenGL Engine|98
Quadro P520|97
GeForce GT 755M Mac Edition|97
GeForce GTX 1060 5GB|97
Palit GeForce GTX 650 Ti|97
MSi GeForce GTX 460|96
GeForce GTX 650|96
Gigabyte GeForce GTX 580|96
Gigabyte GeForce GTX 460|96
GeForce GTX 745|96
EVGA GeForce GTX 550 Ti|96
GeForce GTX 465|96
GeForce GTX 460 SE|96
GeForce GTX 765M|96
GeForce GT 755M Mac Edition|96
Quadro M520|95
Quadro K620|95
T1000|95
GeForce GTX 745|95
Quadro K620|95
GeForce GT 755M|94
GeForce GTX 660 Ti OpenGL Engine|94
Quadro K3000M|94
Quadro K4000|94
Quadro K4000 OpenGL Engine|94
GeForce GTX 560|94
GeForce GTX 650 Ti OpenGL Engine|94
Zotac GeForce GTX 560|94
Asus GeForce GTX 560|93
GeForce GTX 650 Ti|93
GeForce GPU|92
GeForce GTX 460|92
MSi GeForce GTX 650 Ti|92
GeForce GTX 645|92
Gigabyte GeForce GTX 760|92
GeForce GTX 660M|92
GeForce GTS 450|92
GeForce GTX 765M|92
Quadro K2000D|92
Quadro K2000|91
GeForce GT 740|91
GeForce GTX 650|91
GRID M6-0B|91
HP Quadro K620|91
GeForce MX130|91
Quadro K3000M by ST3PHL3|91
Quadro 4000|90
GeForce MX230|90
Quadro K620|90
Quadro K2100M by Nick[D]vB|90
Quadro K3000M by nikey22|89
GeForce GT 650M OpenGL Engine|89
Quadro 4000|89
Quadro K3000M|88
GeForce GTX 660M|88
Quadro K6000|87
GeForce GT 755M Mac Edition|87
Palit GeForce GTX 650|87
Quadro P500|87
GeForce GTX 570M|86
Gainward GeForce GTX 460|86
GeForce GTX 950M|86
Quadro K2000D|86
GeForce GTX 650 Ti BOOST|86
Quadro K2100M|86
GeForce GTX 470|85
Quadro K2000|85
Quadro K2000|85
GeForce GT 750M Mac Edition|85
GeForce GTX 745|85
GRID K220Q|85
GeForce GTX 750 OpenGL Engine|85
Quadro 5000M|84
Quadro P400|84
GeForce GTS 450|84
GeForce GT 640 Rev. 2|84
GeForce GTX 660M Mac Edition|84
Quadro P400|84
Asus GeForce GTX 560 SE|84
PNY GeForce GTX 460|83
GeForce GT 640 Rev. 2|83
GeForce GTS 450 Rev. 2|83
GeForce GTS 450|83
GeForce GTS 450 Rev. 2|83
GeForce GTX 645|82
GeForce GPU|82
GeForce GTX 560M|82
Quadro K3000M|82
Quadro K2100M by nikey22|82
Gigabyte GeForce GTX 750|82
GeForce GT 740|82
GeForce GT 750M Mac Edition|82
GeForce GTX 765M OpenGL Engine|82
GeForce GTX 645 OpenGL Engine|82
Quadro K620|81
GeForce GTX 550 Ti OpenGL Engine|81
Quadro 4000M|81
PNY GeForce GTX 550 Ti|81
GeForce MX110|80
GeForce GTX 760M|80
MSi GeForce GTX 745|80
Quadro K2100M OpenGL Engine|80
Quadro K2000|80
Quadro 5000|80
Quadro K620 OpenGL Engine|80
MSi GeForce GTX 745|80
GeForce GT 755M OpenGL Engine|80
GeForce GTX 660M|79
Gigabyte GeForce GTX 550 Ti|79
MSi GeForce GTX 650|79
GeForce GTX 560M|79
Quadro P400|78
Quadro K2100M|78
Quadro K2100M|78
Zotac GeForce GTX 1050 Ti|78
Quadro 3000M|77
GeForce 940A|77
GeForce GTX 460M|77
GeForce GTX 550 Ti|77
GeForce GT 545|77
GeForce GT 650M Mac Edition|77
GeForce 940MX|76
GeForce GTX 650 OEM|76
GeForce GTX 550 Ti|76
GeForce GT 755M Mac Edition|76
GeForce GT 740 OpenGL Engine|75
Gainward GeForce GTX 550 Ti|75
Quadro K1200|75
GeForce GT 650M Mac Edition|75
EVGA GeForce GTX 650|75
GeForce GT 750M Mac Edition|74
GeForce GTX 745|73
GeForce GTX 555|73
GeForce GTX 650|73
Gainward GeForce GTS 450|73
GeForce GT 650M|73
GeForce GT 755M Mac Edition|73
GeForce GTX 460M|72
GeForce 930A|72
GeForce 930MX|72
GeForce 940MX|72
GeForce MX110|72
GeForce GT 750M Mac Edition|72
Quadro 2000|72
GeForce 845M|71
Quadro 2000D|71
GeForce GT 640 Rev. 2|71
GeForce MX110|71
GeForce GT 1010|71
GeForce GT 545|71
Quadro K1200 OpenGL Engine|71
GeForce 940MX|71
GeForce GTX 650 OpenGL Engine|71
EVGA GeForce GTX 650 Ti BOOST|71
Quadro K2100M|70
GeForce GT 1010|70
Quadro M500M|70
GeForce GT 650M Mac Edition|70
GeForce GT 640 OEM|70
Quadro K2000D|70
Quadro K2000 OpenGL Engine|70
GeForce GT 750M Mac Edition|70
GeForce GT 650M|69
Quadro K1100M by Nick[D]vB|69
GeForce GT 650M|69
GeForce 940M|69
GeForce GT 650M|69
Quadro 4000|69
GeForce GT 650M Mac Edition|69
GeForce GT 745M|69
Gainward GeForce GTX 560 Ti|68
GeForce 920MX|68
Quadro M520|68
GeForce GT 640|68
GeForce 840M|68
GeForce 9800 GTX / 9800 GTX+|68
GeForce GTX 770M by Nick[D]vB|67
Zotac GeForce GTX 650|67
Asus GeForce GTX 550 Ti|67
GeForce GT 750M|67
Quadro K3100M by nikey22|67
GeForce GT 750M|67
GeForce GTX 760 (192-bit) OpenGL Engine|67
HP Quadro 4000|67
Quadro K2000|67
GeForce GTS 450 Rev. 2|67
GeForce 930MX|67
GeForce GTX 660M Mac Edition|66
GeForce GTX 570|66
GeForce GT 750M|66
GeForce GT 650M Mac Edition|66
GeForce GT 650M OpenGL Engine|65
GeForce GTX 660M OpenGL Engine|65
GeForce 930M|65
Palit GeForce GTX 650|65
GeForce GTX 760M|65
GeForce GT 650M Mac Edition|65
GeForce 940M|65
GeForce GT 750M Mac Edition|64
GeForce 940M|64
GeForce GT 740|63
GeForce 930MX|63
Quadro 3000M|63
GeForce GT 730|63
Quadro K1100M|63
GeForce GT 750M|63
GeForce 840M|63
GeForce GT 640 OEM|63
GeForce 840M|63
GeForce GT 640 Rev. 2|62
GeForce GTS 450|62
Quadro 2000|62
GeForce GT 745M|62
GeForce GT 740|62
GeForce GT 640|62
Quadro 2000|62
GeForce GTX 660M Mac Edition|62
Quadro K1100M OpenGL Engine|62
Quadro K2000M|62
GeForce GTX 680MX OpenGL Engine|61
EVGA GeForce GT 730|61
Quadro 2000D|61
GeForce 840A|61
MSi GeForce GTX 660 Ti|61
Quadro K1100M|61
GeForce GT 645M|61
GeForce GTX 780M OpenGL Engine|61
HP GeForce GT 730|61
Quadro K5000M OpenGL Engine|61
EVGA GeForce GT 640|61
GeForce 920MX|60
Quadro M500M|60
Quadro K620M|60
GeForce 930M|60
GeForce 930A|60
GeForce GT 640 OEM|60
GeForce GT 640|60
Quadro 2000M|60
GeForce GT 640|60
GeForce GT 640M Mac Edition|60
GeForce GT 640M Mac Edition|60
GeForce GT 640M Mac Edition|59
GeForce GT 645M|59
GeForce 930M|59
Gigabyte GeForce GTX 650 Ti|59
GeForce GT 640 OEM|59
GeForce 830M|59
Asus GeForce GT 640|58
MSI GeForce GTX 1070|58
GeForce GT 555M|58
Quadro K2000M|58
Quadro K1100M|57
GeForce GT 650M Mac Edition|57
Quadro K2000M by Nick[D]vB|57
EVGA GeForce GTX 650 Ti|57
GeForce GT 640M|56
GeForce GT 650M Mac Edition|56
GeForce GT 445M|56
GeForce 830A|56
GeForce 9800 GT|56
Asus GeForce GTS 450|55
GeForce 830M|55
GeForce 920MX|55
Quadro 2000|55
EVGA GeForce GT 545|54
Quadro K2000M|54
GeForce GT 650M Mac Edition|54
GeForce GTX 280|54
GeForce GT 640|53
Quadro FX 2800M|53
Quadro 3000M OpenGL Engine|53
GeForce GT 740|53
null GeForce 920A|53
GeForce GT 640M Mac Edition|52
GeForce GT 635|52
Graphics Device|52
GeForce GT 640M|52
GeForce GTX 660M Mac Edition|52
Quadro 2000M|52
Quadro 5010M|52
GeForce GTS 250|52
GeForce GT 445M|51
GeForce GT 640M OpenGL Engine|51
GeForce GT 640M|50
EVGA GeForce GT 740|50
GeForce GT 640M Mac Edition|50
GeForce 730A|50
GeForce 920M|49
HP Quadro 2000|49
GeForce GT 730M|49
null GeForce 920A|49
GeForce GT 555M|49
GeForce GT 640M LE|49
GeForce GT 730M|49
GeForce GT 730M|48
GeForce GT 640M Mac Edition|48
Quadro K2000M OpenGL Engine|48
GeForce GT 640M LE|48
GeForce GT 740M|47
GeForce GTX 460M|47
GeForce GT 440|47
GeForce GT 440|46
GeForce GT 640M Mac Edition|46
Quadro P400|46
GeForce GT 730|46
Dell Quadro 2000M|45
GeForce GT 740M|45
GeForce GT 740M|45
GeForce GTS 450 Rev. 2|45
GeForce 920M|45
GeForce 920M|45
GeForce 910M|44
GeForce GTX 680M|44
GeForce GT 730|44
Quadro 2000M|44
GeForce GT 635|43
GeForce GT 720 OpenGL Engine|43
GeForce GT 635|43
Quadro K5200 OpenGL Engine|43
Zotac GeForce GTX 650|43
GeForce GT 440|43
GeForce GT 435M|42
GeForce GT 735M|42
Gainward GeForce GT 630|42
Quadro 1000M|42
GeForce 820M|41
GeForce GTX 680M OpenGL Engine|41
MSI GeForce GT 635|41
GeForce 820A|41
Tesla M10|41
Asus GeForce GT 440|40
Asus GeForce GT 630|40
GeForce GT 820M|40
GeForce 910M|40
GeForce GT 820M|40
GeForce GT 730|40
GeForce GT 550M|40
GeForce GT 430|40
GeForce GT 540M|39
Asus GeForce GT 720|39
GeForce GT 630|39
GeForce GT 530|39
GeForce GT 635M|39
GeForce GT 620M/630M/635M/640M LE|39
NVS 5400M|39
Quadro K600|39
Quadro K610M|39
Asus GeForce GT 730|39
GeForce GT 630|39
GeForce GT 440|39
GeForce GT 630M|38
GeForce 820M|38
Quadro K420|38
Quadro K610M|38
GeForce GT 625M|38
Quadro K1000M|38
NVS 5200M|38
GRID K1|38
Quadro K600|38
Quadro K420|38
GeForce GT 630|38
Quadro K600|37
Quadro 600|37
HP Quadro 600|37
Quadro K1000M|37
Quadro K610M|37
GRID K180Q|37
GRID K160Q|37
GeForce GT 635M|37
Gigabyte GeForce GT 440|37
GeForce 820M|37
GeForce GT 530|37
GeForce GT 540M|37
GeForce GT 630 OEM|37
Quadro K610M by Nick[D]vB|37
NVS 510|37
GeForce GT 630M|37
Quadro 1000M|37
GeForce GT 540M|37
GeForce GT 530|37
Quadro K1100M|37
Quadro K620M|37
Quadro 1000M|36
GeForce GT 730|36
GeForce 820M|36
GeForce GT 430|36
GRID K1|36
GeForce GT 525M|36
NVS 5200M|36
NVS 510|36
Zotac GeForce GT 430|36
Quadro K600|36
Asus GeForce GT 730|36
HP Quadro K4000|35
GeForce GT 755M Mac Edition|35
GeForce GT 630|35
NVS 5400M|35
NVS 5400M|35
GeForce GT 640 OpenGL Engine|35
GeForce GT 625M|35
GeForce GT 630|35
GeForce GT 430|35
Quadro K600 OpenGL Engine|35
Quadro K1000M|35
Zotac GeForce GT 630|35
Gigabyte GeForce GT 630|35
GRID K140Q vGPU|35
GeForce GT 710M|35
GeForce GT 620M|35
GeForce GT 720M|34
GeForce 710M|34
Quadro 1000M,|34
Quadro K510M|34
GeForce 9400 GT|34
Quadro K1000M|34
GeForce GT 635M|34
Quadro K420|34
GRID K180Q|34
Asus GeForce GT 430|34
Quadro K4100M|34
Gigabyte GeForce GT 730|34
GeForce GT 620M|34
GeForce GT 525M|34
Quadro K420|34
Dell NVS 5200M|34
GeForce 710A|34
GeForce GT 425M|33
GeForce GT 710B|33
GeForce GT 525M|33
Quadro 600|33
GeForce GT 620M|33
Quadro K600|33
Quadro 600|33
GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M|33
MSI GeForce GT 730|33
GeForce GT 710|33
GeForce GT 435M|33
NVS 510|33
Asus GeForce GT 710|33
NVS 510|32
GeForce 710M|32
GeForce GT 720M|32
GeForce GT 730A|32
GeForce GT 710M|32
GIGABYTE GeForce GTX 660|31
EVGA GeForce GT 710|31
GeForce GT 710|31
GeForce GT 710|31
GeForce GT 425M|31
GeForce GT 720|31
EVGA GeForce GT 710|31
Quadro K1000M by Nick[D]vB|31
Asus GeForce GT 710|31
GeForce GT 720|31
GeForce GT 420M|30
GeForce GT 710|30
null Graphics Device|30
GeForce GT 240|30
GeForce 810M|29
GeForce GT 720M|29
GeForce GT 710|29
Quadro 600|29
GeForce 810M|29
GeForce GT 420M|28
Quadro 410|28
GeForce GTX 660M|28
MSI GeForce GT 710|28
GeForce GT 720|28
GeForce GT 735M|27
GeForce GT 720|27
GeForce GT 720|27
GeForce GT 630 OpenGL Engine|27
Quadro 410|27
GeForce GT 330M|26
GeForce GT 420M|26
GeForce GT 430|26
GeForce 615|25
GeForce GTX 760A|25
Toshiba GeForce GT 525M|25
GeForce GT 520MX|25
GeForce GT 620|25
GeForce GT 625|25
GeForce GT 710|24
Quadro NVS 4200M|24
GeForce 840A|24
GeForce 610M|24
GeForce 800M|24
GeForce GT 420|24
GeForce 705M|23
GeForce GT 705|23
GeForce 800M|23
GeForce 610M|23
GeForce GT 620 OEM|23
GeForce GT 625|23
GeForce GT 420|23
Quadro NVS 4200M|23
GeForce GT 520M|22
NVS 4200M|22
GeForce GT 620 OEM|22
NVS 5200M|22
GeForce GT 620 OEM|22
GeForce GT 620|22
GeForce GT 705|21
GeForce GT 620|21
GeForce GT 630 Rev. 2|21
Quadro NVS 4200M|21
GeForce GT 520M|20
GTX 980M SLI|20
GeForce GT 620|20
GeForce GT 520M|20
GeForce GT 520|19
GeForce 410M|19
GeForce 730A|19
GeForce GT 520|19
GeForce GT 610|19
Asus GeForce GT 610|19
NVS 310|18
GeForce 410M|18
NVS 315|18
GeForce 605|18
GeForce GT 610|18
GeForce GT 520|17
GeForce MX550|17
NVS 4200M|17
NVS 315|17
NVS 310|17
GeForce 410M|17
Palit GeForce GTX 660|17
GeForce 605|17
NVS 310|17
GeForce GT 415M|17
Zotac GeForce GT 610|17
GeForce GTX 675M|17
GeForce GT 610|16
Quadro 4000M|16
PNY GeForce GT 610|16
GeForce GT 610|16
GeForce 510|15
MSi GeForce GT 610|15
GeForce GT 735M|15
GeForce GT 520|15
GeForce 510|15
GeForce GT 320M|14
GeForce 9600M GT|14
GeForce GTX 570M|14
Corporation D3D12 (NVIDIA GeForce RTX 3080 Ti)|13
GeForce 510|13
Quadro FX 1800M|12
Asus GeForce GT 520|12
GeForce GT 705|12
MSi GeForce GT 630|11
Quadro 3000M|10
Gigabyte GeForce GT 610|10
Pegatron GeForce GT 420|9
GeForce 210|8
GeForce 9300 / nForce 730i|7
NVS 3100M|7
GeForce 8600 GT|5
GeForce 8400 GS Rev. 3|4
GeForce 8400 GS|3
GeForce 9600 GT|2
GeForce GT 550M|-1
GeForce 8600 GTS|-1
GeForce GT 520MX|-1
EVGA GeForce GTX 460|-1
EVGA GeForce GTX 970|-1
GP106|-1
GRID P4-2B|-1
Gainward GeForce GTX 650|-1
GeForce 210|-1
GeForce 310|-1
GeForce 310M|-1
GeForce 315|-1
GeForce 315M|-1
GeForce 320M|-1
GeForce 405|-1
GeForce 610M|-1
GeForce 820A|-1
GeForce 8300 GS|-1
GeForce 8400 GS|-1
GeForce 8400 GS Rev. 2|-1
GeForce 8400 GS Rev. 3|-1
GeForce 8400M GS|-1
GeForce 8400M GT|-1
GeForce 8500 GT|-1
GeForce 8600 GT|-1
GeForce 8600M GS|-1
GeForce 8600M GT|-1
GeForce 8700M GT|-1
GeForce 8800 GT|-1
GeForce 8800 GTS|-1
GeForce 8800 GTS 512|-1
GeForce 8800 GTX|-1
GeForce 8800M GTX|-1
GeForce 9200M GE|-1
GeForce 9200M GS|-1
GeForce 9300 / nForce 730i|-1
GeForce 9300 GE|-1
GeForce 9300 GS|-1
GeForce 9300M GS|-1
GeForce 9400|-1
GeForce 9400M|-1
GeForce 9500 GT|-1
GeForce 9500M GS|-1
GeForce 9600 GS|-1
GeForce 9600 GSO|-1
GeForce 9600 GSO 512|-1
GeForce 9600 GT|-1
GeForce 9600M GS|-1
GeForce 9600M GT|-1
GeForce 9600M GT / GeForce GT 220M|-1
GeForce 9800 GT|-1
GeForce 9800 GTX+|-1
GeForce 9800 GTX/9800 GTX+|-1
GeForce 9800M GTS|-1
GeForce G 103M|-1
GeForce G 105M|-1
GeForce G105M|-1
GeForce G205M|-1
GeForce G210|-1
GeForce G210M|-1
GeForce GT 120|-1
GeForce GT 120M|-1
GeForce GT 130|-1
GeForce GT 130M|-1
GeForce GT 220|-1
GeForce GT 220M|-1
GeForce GT 230|-1
GeForce GT 230M|-1
GeForce GT 240|-1
GeForce GT 240M|-1
GeForce GT 240M|-1
GeForce GT 320|-1
GeForce GT 320M|-1
GeForce GT 325M|-1
GeForce GT 330|-1
GeForce GT 330M|-1
GeForce GT 335M|-1
GeForce GT 435M|-1
GeForce GT 520M|-1
GeForce GT 525M|-1
GeForce GT 555M/635M|-1
GeForce GTS 240|-1
GeForce GTS 250|-1
GeForce GTS 360M|-1
GeForce GTX 1180|-1
GeForce GTX 260|-1
GeForce GTX 260M|-1
GeForce GTX 275|-1
GeForce GTX 280|-1
GeForce GTX 285|-1
GeForce GTX 295|-1
GeForce GTX 560 SE|-1
GeForce GTX 750 v2|-1
GeForce RTX T10-16|-1
GeForce RTX T10-8|-1
Gigabyte GeForce GTX 1050 Ti|-1
ION|-1
MSI GeForce GT 710|-1
NVS 300|-1
NVS 3100M|-1
NVS 4200M|-1
NVS 5100M|-1
Palit GTX 680 JetStream|-1
Quadro FX 1700|-1
Quadro FX 1700M|-1
Quadro FX 1800|-1
Quadro FX 1800M|-1
Quadro FX 2700M|-1
Quadro FX 2800M|-1
Quadro FX 3600M|-1
Quadro FX 360M|-1
Quadro FX 370|-1
Quadro FX 3700|-1
Quadro FX 3700M|-1
Quadro FX 380 LP|-1
Quadro FX 3800|-1
Quadro FX 3800M|-1
Quadro FX 4600|-1
Quadro FX 4800|-1
Quadro FX 4800|-1
Quadro FX 5600|-1
Quadro FX 570M|-1
Quadro FX 580|-1
Quadro FX 770M|-1
Quadro FX 880M|-1
Quadro K1100M by Nick[D]vB|-1
Quadro K2000D|-1
Quadro K2000M|-1
Quadro K2100M by Nick[D]vB|-1
Quadro NVS 135M|-1
Quadro NVS 140M|-1
Quadro NVS 160M|-1
Quadro NVS 290|-1
Quadro NVS 295|-1
Quadro NVS 4200M|-1
Quadro P4000 OpenGL Engine|-1
Sony GeForce 410M|-1
Zotac GeForce GTX 780|-1
`;
function _Yt() {
  return bYt;
}
var TYt = `
Radeon RX 7900 XT|2202
Radeon RX 7900 XT|1968
RX 6800 XT|1957
Radeon RX 6900 XT (XTXH)|1930
Radeon RX 6900XT|1925
Radeon PRO W6900X|1889
RX 6900 XT|1852
Radeon RX 6900|1814
Radeon RX 7900 XTX|1773
RX6800|1695
FreddyVGA|1603
Radeon PRO W6800|1564
Radeon RX 7900 XTX|1437
Radeon RX 6950 XT|1376
Radeon RX 6800 XT|1358
Radeon RX 6750 XT|1310
Radeon(TM) RX 6850M XT|1294
Radeon RX 6700|1285
Radeon RX 6900 XT|1269
Sapphire Nitro+ RX 6800|1262
Radeon PRO W6800X|1255
Radeon PRO W6800X Duo|1218
Radeon RX 6700|1214
Radeon RX 6800 XT|1183
Sapphire Nitro Radeon RX6650XT|1180
Radeon(TM) RX 6750 XT|1166
Radeon RX 6800|1163
Radeon RX 6900 XT|1162
ASRock RX 6650 XT Phantom Gaming|1161
Radeon Navi23|1139
Radeon RX 6650 XT|1132
Radeon RX 6950 XT|1130
Radeon 6800|1121
Radeon RX 6700 XT|1110
Radeon Pro W6600X|1101
Radeon RX 6700M|1081
Radeon RX 6800M|1078
Radeon RX 5700 XT PJM|1060
Radeon RX 6800|1054
Radeon RX 6600 XT|1037
Radeon RX 6600 XT|1031
ASUS RX 6600XT macOS Edition|1021
Radeon RX 6800M|1016
Radeon Pro Vega II Duo|1015
Radeon RX 5700 Series|961
Radeon RX 6800/6800 XT / 6900 XT|961
Radeon RX 6600 XT|958
Radeon Pro Vega II|956
Radeon RX 6650 XT|951
Navi 10 5700 XT|947
Radeon Pro Vega II|947
Radeon RX 5700 Series|946
Radeon Pro W5700X|934
Radeon RX 6600|929
ASUS Radeon RX 5700 XT|926
Radeon Pro W5700X|917
Radeon Pro 5700 XT|917
Radeon RX 6900 XT|915
Radeon RX 5700 XT|911
Radeon Pro W5700|895
Radeon RX 6600/6600 XT/6600M|889
Radeon RX 6750 XT|883
Radeon RX 6600|874
Radeon RX 5700|855
Radeon RX 5700 XT 50th Anniversary|854
Radeon VII|851
Radeon RX 5700 XT 50th Anniversary|845
Radeon PRO W6800|837
Radeon Pro Vega 64|824
Radeon Navi10|822
Radeon RX 5600 XT|816
Radeon RX 6600M|803
Radeon RX 6800S|791
Radeon Pro 5700 XT|781
Radeon RX Vega 64 8GB|775
Radeon Pro 5700|768
Radeon Vega Frontier Edition|767
Radeon RX Vega|766
Radeon RX Vega 56/64|765
Radeon(TM) RX Vega|756
Radeon Pro Vega 64X|745
Radeon RX 5600 XT|744
Radeon PRO W6600|744
Radeon Vega 64 LC|735
Radeon RX Vega 64.1|732
Radeon RX 6600M|728
Radeon Pro 5700|714
Radeon Vega Frontier Edition|707
Radeon Vega Frontier|704
Radeon Vega FE|701
Radeon RX 5700 XT|691
Radeon Pro Vega 64|673
Radeon Vega 64|667
Radeon VII|663
Radeon Pro WX9100|656
Sapphire Radeon RX Vega 64 8GB|654
Radeon(TM) PRO W6600M|654
Radeon RX 5700 XT 50th Anniversary|652
Radeon RX 5700|640
Radeon Pro W5700|640
Radeon(TM) Pro WX 9100|635
Radeon RX Vega 56|628
Radeon RX Vega 56|623
Radeon Pro 5500 XT|622
Radeon RX 5600 OEM/5600 XT / 5700/5700 XT|621
Radeon RX 5500|618
Radeon RX 5500 XT|617
Radeon Vega Frontier Edition|617
Radeon RX 5500M Series|613
RX xxx|613
Radeon Pro Vega 64X|611
Radeon RX Vega 64|610
Radeon RX 5600 XT|610
Radeon Pro Vega 64|605
Radeon RX 6500 XT|603
Radeon Vega|602
Radeon Pro W5500|601
Radeon RX 5600M|600
Radeon Pro Vega 56|598
Radeon Pro Vega 64|594
Radeon Pro 5600M|593
Radeon Pro Vega 48|592
Radeon Pro Vega II Duo|590
Radeon RX 590 Series|589
Radeon RX Vega 56 8GB|589
Radeon Pro 5600M|589
Radeon Pro WX 9100|588
Radeon Pro 5300|584
Radeon(TM) R9 Fury Series|579
Radeon RX 6800 XT 16GB|567
Radeon Pro 5600M|567
Radeon Pro W5500X|564
Radeon(TM) RX 5500M|559
Radeon HD 7870|556
Radeon Pro W5500|554
Radeon RX 5500M|550
Radeon R9 290X Series|549
66AF:F0|548
Radeon Pro 5500 XT|547
Radeon RX 580 Series|547
Radeon RX 5500XT|547
Radeon(TM) RX 580X|546
Radeon Pro 5500 XT|545
Radeon(TM) Pro W5500M|544
Radeon Pro W5500X|544
Radeon Pro W5500|541
RadeonT RX 5300|537
Radeon(TM) RX 570 Graphics|524
Radeon Pro 5300|522
Radeon(TM) RX 6500M|521
Radeon RX Vega M GL|520
ASUS Radeon RX 570 Series|519
ASUS Radeon RX 580 Series|518
Radeon(TM) RX 580|518
Radeon(TM) Pro V7350x2|518
Radeon(TM) RX 480 Graphics|516
Radeon(TM) RX 570 Graphics|515
Radeon RX 6400|513
Radeon Pro 580X|513
Radeon(TM) R9 390 Series|503
Radeon Pro 5300|500
Radeon RX 580 2048SP|500
Radeon PRO W6400|500
Radeon RX 570 Series|499
Radeon PRO W6800X Duo|497
Radeon Pro 580|494
Radeon RX 5500 XT|493
Radeon RX 6400|487
Radeon Pro 580|485
Radeon(TM) Pro WX 7100 Graphics|485
Radeon(TM) R9 290X|478
Sapphire Radeon RX 580 Pulse|477
Radeon RX 6700/6700 XT / 6800M|476
Radeon(TM) RX 580|475
Radeon RX 6700S|475
Radeon R9 290X|470
Radeon(TM) RX 470 Graphics|469
Radeon R9 FURY / NANO Series|468
Radeon Embedded E9560|467
Kamen Rider Black RX|466
Radeon(TM) E9550|464
Radeon(TM) RX 580 Graphics|463
Radeon RX Vega 56/64|463
Radeon(TM) RX 480|462
Radeon RX 6800 XT|462
Radeon RX 470 Series|461
Radeon RX480|456
66AF:F1|455
Radeon Pro 480/575|455
Radeon Embedded E9560|450
Radeon FURY|450
Radeon RX 5600 OEM/5600 XT / 5700/5700 XT|447
Radeon RX 6600 XT|446
Radeon HD 6800 Series|445
Radeon Pro 570X|444
Radeon(TM) RX 470 Graphics|443
Radeon Pro 575X|443
Radeon RX 470/480/570/570X/580/580X/590|443
Radeon RX 6600|443
Radeon RX Vega M GH Graphics|441
RX 580|440
Radeon RX 570|440
Radeon Pro 570|440
Radeon RX 590|437
Radeon(TM) RX 470 Series|435
Radeon RX 6900 XT|435
Radeon FURY X|434
RX 590|431
Radeon Pro 5500M|430
???|430
Radeon(TM) RX 570|430
Radeon RX 580|429
Radeon HD 8xxx|426
Radeon R9 290|425
Radeon Pro 5500M|420
Radeon Pro 580X|420
Radeon RX 6700 XT|420
Radeon RX 480|419
Radeon R9 290/390|418
Radeon Pro 580X|416
Radeon(TM) Pro Duo|414
Ellesmere Radeon RX 570|411
Radeon R9-290X|411
Radeon Pro 580|411
Radeon R9 200 Series|406
Radeon RX 570|406
Radeon Pro 470/570|404
Radeon RX 6800M|404
Radeon RX 5300M|400
Radeon RX 580 Series (POLARIS10, DRM 3.40.0, 5.11.9-141-tkg-pds, LLVM 11.1.0)|399
Radeon Pro 5300M|399
Radeon R9 285|398
Radeon RX 470|393
Radeon Pro 575|392
Radeon Pro 575X|391
Radeon Pro WX 7100|387
Radeon RX 6700M|386
Radeon RX 470/480/570/570X/580/580X/590|382
Radeon PRO W6600|376
Radeon Polaris|374
Radeon RX 6500 XT|374
Radeon Pro Vega 20|371
Radeon HD 7970|370
Radeon Pro Vega 16|370
Radeon RX 6800|369
Radeon Pro Vega 64 OpenGL Engine|369
Radeon(TM) R9 380 Series|367
Radeon RX 5700XT|366
FirePro W8100|366
Radeon Pro Vega 64|365
Radeon Pro 570|365
Radeon Pro 570X|363
Radeon Pro Vega 64 OpenGL Engine|362
Radeon R9 280x|362
Radeon R9 380|362
Radeon R9 280x|361
Radeon R9 280x|360
Radeon Pro Vega 56|360
R9 280X Dual-X|359
Radeon Pro Vega 56 OpenGL Engine|356
Radeon HD 7970|355
Radeon HD 7970X/8970/R9 280X|354
Radeon R9 285|353
Radeon R9 380X|352
Radeon RX 480|352
Radeon RX 5700 XT Series|350
ASUS Radeon RX 470 Series|350
Radeon Pro Vega 64|349
Radeon R9 200 / HD 7900 Series|346
ASUS Radeon RX 470 Series|346
Radeon Vega 56|346
Radeon RX 580 Series (AMD POLARIS10 / DRM 3.15.0 / 4.12.0-1-amd64, LLVM 4.0.1)|343
Radeon Pro Vega 20|343
R9 380|341
Radeon HD 7970|338
Radeon RX 5700 XT|336
Radeon D700|336
Asus Radeon R9 280|334
Radeon R9 285|334
Radeon R9 M395X|332
Radeon RX 5600 XT|332
PowerColor Radeon R9 280|330
Radeon R9 280|329
FirePro W7100 Graphics Adapter|328
Radeon R9 M295X Mac Edition|327
ASUS Radeon RX 5700|327
Radeon R9 380|326
Radeon Pro Vega 16|325
Radeon R9 290X|325
Radeon RX5600|324
ASUS Radeon RX 5500 XT|323
Radeon R9 280|323
Radeon HD 7950/8950 / R9 280|321
Radeon R9 M395|319
Radeon RX 6800/6800 XT / 6900 XT|318
FirePro D700 (FireGL V)|318
Radeon RX 5500/5500M / Pro 5500M|318
MSI Radeon RX 6600 XT Gaming X|318
FirePro W8000|315
Radeon HD 7950|315
Radeon Pro W5700|315
FirePro W7170M|314
Radeon PRO W6800|314
Radeon RX 5500|313
Radeon RX 580 Special Edition|312
RadeonT RX 5500M|311
Radeon R9 M395 (Bootcamp XG edition by bootcampdrivers.com)|311
Radeon R9 360|309
Radeon Pro WX 7100|307
Radeon Pro WX 7100 Mobile|307
Radeon RX 5700 XT 50th Anniversary|307
R9 xxx|303
Radeon RX 5700XT|302
Radeon PRO W6400|301
Radeon(TM) R9 370 Series|301
Radeon RX 470/480/570/570X/580/580X/590|300
Radeon(TM) PRO W6600M|298
Radeon HD 8950|298
Radeon R9 M395X|297
Radeon R9 M395X|296
RX Vega 64|296
Radeon RX Vega 11 Graphics|295
Radeon Pro 270X|294
Radeon RX 580 2048SP|290
Radeon HD 7950|290
Video Controller (VGA Compatible)|290
Radeon(TM) R7 370 Series Graphics|290
Radeon HD 7950|290
Asus Radeon R9 270X|289
Radeon RX 580X Series|288
Radeon(TM) RX 5500M|285
Radeon R9 270X|285
RX xxx|285
ASUS R7 265 Series|281
Radeon(TM) R9 270|280
731F:C1|280
Radeon R9 M395X|279
Radeon(TM) R7 370 Series|279
Radeon Pro V520 MxGPU|278
Radeon R9 M395|277
FirePro D700|277
Radeon R9 270X|277
Radeon(TM) R9 200 Series|276
Radeon RX 5700|275
Radeong 0.4 on AMD POLARIS10 (DRM 3.8.0 / 4.9.11-1-ARCH, LLVM 3.9.1)|274
Radeon HD 7870 XT|274
Radeon R9 390X|272
Radeon(TM) RX 570 Graphics|272
Radeon HD 7870 GHz Edition|271
Radeon R9 390|270
FirePro D700|269
Radeon R9 M395|268
Radeon R9 270|268
Radeon RX 5700 / 5700 XT|267
ASUS R7 370 Series|267
FirePro W7000|266
Radeon(TM) Pro V7350x2|266
Radeon(TM) RX 470 Series|266
Radeon RX Vega 64 OpenGL Engine|266
Radeon RX 5500M|265
Radeon HD 7950/8950 OEM / R9 280|265
Radeon Vega Frontier Edition OpenGL Engine|265
Radeon 7950 x2|263
Radeon R9 270|263
Radeon VII|263
Radeon HD 7xxx|262
Video Controller (VGA Compatible)|262
Radeon(TM) RX 570|261
Radeon RX 5500 XT|261
Radeon R9 M295X|261
FirePro W7000 (FireGL V) Graphics Adapter|260
Radeon R9 M390|260
Radeon HD 7870 GHz Edition|260
Radeon R9 M390 (Bootcamp edition by bootcampdrivers.com)|260
Radeon R9 370|259
Metal|259
Radeon HD 7870|259
Radeon RX 470/570|258
Radeon(TM) R9 370|257
Radeon(TM) RX 460|257
Radeon RX 560 Series|256
Radeon R9 290|255
Radeon(TM) RX 560 Series|255
Radeon RX 5300M|254
FirePro W7000|254
Radeon R9 290X|253
67EF:E7|253
Radeon HD 7850|253
Radeon(TM) RX 460 Graphics|253
MSI Radeon RX 580|251
Radeon R9 290/390|250
FirePro W8100 (FireGL V)|249
Radeon Pro WX 9100 OpenGL Engine|248
Radeon(TM) RX 560|247
Radeon(TM) RX 560 Series|247
Radeon Pro Vega II Duo|247
Radeon HD 7970M|246
Radeon R9 290|245
Radeon RX 5600M|245
FirePro D300|245
Radeon(TM) RX 5600M Series|244
Radeon RX 590 Series|244
Radeon R7 370 Series|244
Radeon(TM) RX 560|243
FirePro D300|243
Radeon R9 390|243
Radeon RX 470/480/570/570X/580/580X|243
FirePro D300|243
Radeon(TM) R7 370 Series|242
Radeon R9 M390|241
Radeon RX 560X Series|241
FirePro D300|241
Radeon RX 560|240
Radeon R9 M290X|240
Gigabyte Vega 64 macOS Edition|239
Radeon Pro 580|238
Radeon Pro WX 4100|236
Radeon Pro WX 7100 OpenGL Engine|236
Radeon HD - FirePro D300|235
FirePro D500|234
Radeon Pro 580 OpenGL Engine|234
Radeon(TM) E9260|234
Radeon Pro WX 2100|233
FirePro D500|232
FirePro D500|232
Radeon(TM) RX 6500 XT|232
Radeon Pro 580X|231
Radeon HD 7850|231
Radeon Pro 575|231
Radeon Pro Vega 64X|231
ASUS R9 270 Series|230
Radeon Pro 450|230
Radeon(TM) RX 560 Graphics|230
Radeon R9 M290|229
Radeon Pro 560X|228
Radeon Pro 480/575|228
Pitcairn PRO Radeon HD 7850|228
ASUS Radeon RX 5700 XT|227
Radeon HD 7870|227
Radeon(TM) Pro WX 5100 Graphics|226
Radeon R9 370X|225
Radeon(TM) RX 480|224
Radeon HD7970M|224
FirePro S9000 (FireGL V)|223
Radeon RX 550 640SP / RX 560/560X|222
MSI / AMD RX 560 4G|222
Radeon RX 570 OpenGL Engine|222
MSI RX650|222
RX 480|221
MSI / AMD RX 560|221
Baffin AMD Radeon RX 560|221
MSI Baffin RX650|220
Radeon Pro 5700 XT|220
Radeon Pro 570|220
Radeon Pro 575 OpenGL Engine|219
Asus Radeon R9 270X|219
Radeon RX RX 560|218
Radeon RX 560 [Baffin]|218
RX 460|218
Radeon R9 370X|218
Radeon(TM) Pro WX 4100|217
ASUS R9 390 Series|217
Radeon Pro 5600M|217
R9 xxx|217
Radeon HD 7870 Series|217
Radeon Pro RX 560|216
R9 280X Dual-X|215
Radeon Pro 570 OpenGL Engine|214
RX 560|213
Radeon Pro WX 5100|213
FirePro D700|213
Radeon(TM) R9 390 Series|213
Radeon RX 480|212
Radeon RX 560|212
Radeon RX 5500/5500M / Pro 5500M|212
Radeon RX 550 640SP / RX 560/560X|211
Radeon R9 FURY / NANO Series|211
Sapphire Radeon RX 560|211
Radeon RX 460|210
Radeon RX550/550 Series|210
inc. Radeon RX 480|209
Radeon(TM) RX 550|208
Radeon R9 M290X|206
Radeon Pro 560 (Bootcamp XG edition by bootcampdrivers.com)|206
Radeon RX460|206
Radeon RX 550 Series|205
Custom GPU 0405|204
Radeon(TM) RX 460|204
ASUS AMD Radeon R9-990X|204
Radeon Pro 555X|203
Radeon RX 460/560|203
Radeon HD 7970X/8970/R9 280X|202
ASUS Radeon RX 550 Series|201
Radeon HD 8950|201
FirePro D500 (FireGL V)|201
RX 5700XT|200
Radeon 550 Series|200
Radeon HD 8470 + 7660D Dual Graphics|200
Radeon HD 7990|200
Radeon RX 560X|199
Radeon RX Vega|199
Radeon HD 7950 Series|198
Radeon(TM) RX 540|197
Radeon HD 6970|197
Radeon HD 7970/8970 / R9 280X|197
Radeon Navi14|197
Radeon Pro 560|197
Radeon RX 550|197
Radeon R9 285|196
Radeon Pro W5500|195
Radeon Pro Vega 56|195
Radeon Pro 460|195
Radeon RX 470/480|194
Radeon PRO Graphics|194
Radeon(TM) RX550|194
Radeon Pro 560X|193
Radeon Pro 570X|192
66AF:F1|192
Radeon RX Vega M GH|190
Radeon R9 M280X|190
Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X|189
Radeon R9 280,|188
Custom GPU 0405|188
Radeon HD 7790|187
Radeon(TM) RX 480 Graphics|187
Radeon Pro 455|186
Radeon R9 260|186
Radeon RX 580 Series|186
Radeon HD 7950/8950 OEM / R9 280|186
Radeon R9 290X|185
Radeon R9 M290X|184
Radeon(TM) R9 370 Series|184
Radeon Pro 555|184
Radeon R7 260X|184
Radeon HD 6950|183
FirePro W5000|183
Radeon(TM) R9 390X|182
R9 270X Devil|182
Radeon(TM) RX 470 Graphics (AMD POLARIS10 / DRM 3.23.0 / 4.15.0-1-MANJARO, LLVM 5.0.0)|182
Radeon R9 380|182
Radeon(TM) Pro WX 9100|182
Radeon(TM) R7 360 Series|181
Radeon RX 570 Series|181
Radeon(TM) R9 M470X|181
Radeon(TM) R7 360 Series|181
Radeon RX480|180
Radeon R7 200 Series|180
Radeon Pro WX 4150|180
Radeon Pro WX 4100|179
Radeon HD 8xxx|179
ASUS R9 295X2 Series|179
Radeon R9 390X|178
Radeon HD 5870|176
Radeon Pro 560|176
Radeon RX 580 OpenGL Engine|175
Radeon HD 8950|175
FirePro V(FireGL V) Graphics Adapter|175
ASUS Radeon RX 580 Series|174
Radeon Pro WX 4100|174
Radeon Pro 460|173
Radeon HD 2600 XT|173
Radeon Pro WX 4100|172
Radeon HD 8280|172
Radeon Pro 575|171
Radeon Pro 555X|171
Radeon Pro WX 4130/4150|170
Radeon RX Vega M GH Graphics|170
FirePro W5100|170
Radeon(TM) PRO WX 8200|169
Radeon Vega Frontier Edition|169
Radeon Pro 555X|168
FirePro D700|168
Radeon HD 6990|167
Radeon RX 470 OpenGL Engine|167
Radeon HD 7870 XT|167
Radeon RX 580|167
Radeon Polaris|167
FirePro V8800 (FireGL V)|166
Radeon RX 550|165
Radeon HD 6900 Series|165
FirePro W9100 (FireGL V)|164
RX 580|163
Radeon(TM) RX 580X|163
Radeon RX 550|163
Radeon HD 6870|163
Radeon R9 M395X OpenGL Engine|163
Radeon(TM) R9 360|163
Radeon(TM) HD 8490|162
Radeon R9 M295X|162
Radeon HD 7970M|162
Radeon R9 M380|161
FirePro W5100 (FireGL V) Graphics Adapter|161
ASUS HD7850 Series|161
FirePro M6100 FireGL V|161
Radeon Pro 455|160
Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X|160
Radeon R9 M395X|159
Radeon RX 560X|159
Radeon Pro 555|158
RadeonT RX 560X|158
Radeon Pro Vega 48|158
ASUS Radeon RX Vega|158
Radeon Pro WX 9100|158
Radeon Pro Vega 64|157
Powered By QiongB A9999999999|157
Radeon(TM) Pro Duo|157
FirePro D700|157
Radeon Pro WX 7100|156
Radeon RX 460|156
Radeon HD - FirePro D700 OpenGL Engine|156
Radeon R9 M290X|156
Radeon R9 M395 OpenGL Engine|155
Radeon Pro SSG|155
FirePro D300|155
ASUS R9 380 Series|155
Radeon(TM) R9 Series|153
Radeon RX 470/480/570/580|153
FirePro W8000|153
Cezanne|153
Radeon(TM) Graphics|153
FirePro D300|153
Radeon(TM) R9 Fury Series|153
Radeon R9 M395|152
Radeon RX 570|152
Radeon R9 270X Series|152
Radeon Pro 5300M|152
R9 xxx|152
Radeon Pro 555|152
FirePro D500|151
Radeon HD 5850|151
FirePro D300|150
Radeon(TM) R9 290X|150
66AF:F0|149
Radeon(TM) RX 560|149
Radeon R9 M290|148
Radeon Instinct MI25 MxGPU|148
FirePro V7800 (FireGL) Graphics Adapter|148
Radeon(TM) R9 M470|147
Advanced Micro Devices, Inc. [AMD/ATI] Fiji [Radeon R9 FURY / NANO Series]|147
Radeon HD 5870 Series|147
Radeon(TM) E9550|147
Radeon HD 7850|147
Radeon HD 7770|147
Radeon Pro Vega 20|146
Radeon R9 290/390|146
Radeon Pro 450|146
Radeon RX 560X Series|146
Radeon HD 6850|146
Radeon R9 270 1024SP|145
ASUS R9 280X Series|145
Radeon Pro 450|145
Radeon(TM) R9 390 Series|145
FirePro V7900 (FireGL V)|145
Radeon R9 370X|145
Radeon(TM) RX 560 Series|144
ASUS R7 250X|144
Radeon RX 480 OpenGL Engine|144
Radeon R9 290X|144
Radeon RX 550X|144
Radeon(TM) RX 580|144
ASUS Radeon(TM) RX 470 Series|143
Baffin Radeon RX 560|143
Radeon R9 M295X (Bootcamp edition by bootcampdrivers.com)|143
Radeon R9 M295X Mac Edition|143
Radeon R7 Series / HD 9000 Series|142
Advanced Micro Devices [AMD] nee ATI Device|142
Radeon(TM) Pro WX 7100 Graphics|142
Radeon RX 640|142
FirePro D500|141
Radeon HD 7900 Series|141
Radeon R9 290|141
Radeon R7 250X|141
Radeon(TM) RX Vega|140
Radeon 630 Series|140
FirePro W8100 Graphic Adapter|140
Radeon R9 FURY / NANO Series|140
Radeon R9 M390|140
Radeon Pro WX 3100|140
Radeon R9 290|140
Radeon(TM) R9 370|140
FirePro V7900|139
Radeon HD 7970|139
Radeon HD - FirePro D500 OpenGL Engine|139
Radeon HD - FirePro D300 OpenGL Engine|139
Radeon Pro 580|139
Radeon HD 7770|139
Radeon HD - FirePro D500 OpenGL Engine|139
Radeon 540/540X/550/550X / RX 540X/550/550X|138
FirePro S9050|138
Radeon(TM) RX 480 Graphics|138
Radeon(TM) R9 M390X|137
Radeon Vega 64|137
Radeon(TM) Graphics|137
Tonga PRO GL [FirePro W7100]|136
HD7950 Martin Ver.|136
Radeon HD 7990|135
Radeon R9 280x|135
Radeon RX550/550 Series|135
HD7950 MARTIN REV.|134
Radeon RX560|134
Radeon R7 250X Series|134
Radeon R9 M390 OpenGL Engine|134
ASUS R7 250X|134
Radeon HD6870|134
Radeon R9 270X|134
Radeon Pro 5500 XT|134
Radeon(TM) RX 480|133
Radeon R9 270|133
ASUS HD7970 Series|133
Radeon RX 540|133
Radeon 500 Series|132
Radeon HD 5970|132
Radeon HD 7770 GHz Edition|132
Radeon HD 5870|132
Radeon 540X Series|132
Radeon HD 6870 Series|132
Radeon(TM) RX 470 Graphics|132
Radeon HD - FirePro D300 OpenGL Engine|132
Radeon HD 7xxx|131
Radeon HD 5970|131
RadeonT 540X|131
Radeon R7 Graphics + R7 350 Dual Graphics|131
Radeon R9 M295X Mac Edition / R9 380X|131
Firepro M5100|131
Radeon(TM) R9 M375X|131
Radeon R9 280x|130
Radeon(TM) RX 560X|130
Radeon HD 6990|130
Radeon Pro 5500M|130
Radeon Pro WX 5100 OpenGL Engine|129
Radeon R9 M395X (Bootcamp edition by bootcampdrivers.com)|129
Radeon R9 M380|128
FirePro W5170M|128
Radeon R9 280|128
FirePro W5000 (FireGL V)|128
Radeon(TM) RX 5600M Series|128
Radeon RX 560D|128
FirePro D500 (FireGL V)|128
Radeon(TM) Pro WX 5100 Graphics|128
Radeon(TM) RX Vega 11 Graphics|128
Radeon HD 7970|127
Radeon R9 370|127
Radeon HD 7770|127
Radeon R9 M395X|126
Radeon HD 7660D|126
Radeon HD 8970|126
Radeon R9 200 Series|126
Radeon Pro WX 3200 Series|126
Radeon HD 7800 Series|125
Radeon R9 285/380|125
Radeon R9 270X|124
FirePro W2100|124
FirePro W7170M|124
Radeon HD 7870 GHz Edition|123
Radeong 0.4 on AMD TONGA (DRM 3.1.0, LLVM 3.9.0)|123
Radeon RX 460|123
Radeon HD 5970 Series|123
Radeon R9 M380|122
Radeon R9 M395|122
Asus Radeon R9 280|122
Radeon HD 6850 Series|122
Radeon(TM) RX 540|122
Radeon HD 6900 Series|122
Device|122
67DF:C4|121
Radeon HD 6950|121
FirePro D300 (FireGL V)|121
Radeon RX 570|121
Radeon HD 5850 Series|121
Radeon HD 7870 XT|121
Radeon HD 7950|121
FirePro V7800 (FireGL) Graphics Adapter|121
Radeon HD 6850|121
Radeon HD 7950|120
Radeon HD 7870 GHz Edition|120
Radeon R7 370 / R9 270X/370X|120
Radeon HD 6870|120
Radeon Pro V340|120
ASUS Radeon RX 570 Series|119
Radeon(TM) R7 370 Series Graphics|119
Radeon(TM) RX 580 Graphics|119
Radeon(TM) RX 470 Graphics|119
Radeon HD 5870|119
Radeon HD 7950/8950 / R9 280|119
Radeon HD 6790|119
Radeon(TM) RX580|119
ASUS ARES2|119
Radeon(TM) R9 380 Series|118
Radeon HD 7750|118
Radeon Pro 560X|118
Radeon R7 250E|118
Radeon 550 Series|118
Radeon RX 560|118
Radeon Pro WX 5100|117
Radeon R7 370 / R9 270X/370|117
Radeon HD 7800 Series|117
FirePro W5000 (FireGL V) Graphics Adapter|117
Radeon HD 7750 Series|116
Radeon HD 5870|116
Radeon R7 450|115
FirePro R5000|115
Radeon R7 370 Series|115
FirePro W9100|114
Radeon R7 370 / R9 270/370|114
Radeon(TM) 540 Graphics|114
Radeon HD 6510 Series|114
Radeon(TM) R7 370 Series|113
Sapphire Radeon HD6870|113
Firepro M5100|113
Radeon(TM) RX 550|113
Radeon(TM) Pro Duo|113
Radeon 540/540X/550/550X / RX 540X/550/550X|113
Radeon Pro 570|112
Radeon R9 280|112
FirePro D700 (FireGL V)|112
(ATI) FirePro M6000 (FireGL V) Mobility Pro Graphics|112
Renoir|112
Radeon 540X Series (POLARIS12, DRM 3.40.0, 5.10.56-1-MANJARO, LLVM 12.0.1)|112
Radeon HD 6970|112
Radeon HD 8770|112
Radeon Pro WX3200 Graphics|112
Radeon(TM) R9 270|111
Radeon R9 270X|111
Radeon R9 285|111
Radeon HD 7800M Series|111
Radeon(TM) R7 370 Series|111
Radeon HD 7870M Series|111
Radeon Pro 450/550|110
Radeon HD 7000 series|110
Radeon HD 7870|110
Radeon Pro 555X|110
Radeon RX590 GME|109
FirePro S10000|109
Radeon HD 7870M|109
Radeon HD 5800 Series|109
Radeon HD 6970M|108
ASUS HD7770 Series|108
Radeon(TM) R9 M360|108
Radeon(TM) RX 550X|107
Radeon R9 285|107
Radeon HD 6900M Series|107
Radeon HD 7870 GHz Edition|107
FirePro S7000|107
Radeon R9 M370X|106
Radeon Pro WX 4100|106
Radeon HD 6800 Series|106
Radeon HD 7750|106
Radeon Pro 455 OpenGL Engine|106
ASUS R7 370 Series|106
Radeon Pro 560|105
Radeon HD 6870|105
FirePro D300 (FireGL V)|105
Radeon HD 6970M|105
Radeon HD 7850|105
Radeon(TM) R9 200 Series|104
ASUS HD7750 Series|104
Radeon HD 6970M OpenGL Engine|104
Asus Radeon R7 250|104
Radeon R7 370 / R9 270X/370|104
Radeon R9 M395X (Bootcamp XG edition by bootcampdrivers.com)|103
Radeon(TM) RX 560|103
Radeon RX Vega|103
Radeon(TM) Pro W5500M|103
Radeon R9 270|103
Radeon Pro 560X|103
Radeon HD 5850|103
FirePro S7150|103
Radeon(TM) RX 580|103
Radeon(TM) R9 370 Series|103
ASUS Radeon(TM) RX 480 Series|102
Radeon Graphics Processor|102
Radeon R9 M370X|102
FirePro W7100|102
Radeon R9 M370X|101
Radeon Pro 460 OpenGL Engine|101
Radeon RX 580 Series|101
Radeon 500 Series|100
Radeon Pro 555|100
Radeon(TM) Pro WX 4100|100
Asus Radeon R7 260X|100
Radeon(TM) RX Vega 10 Graphics|100
Radeon HD 7790|99
Radeon Pro 450 OpenGL Engine|99
Radeon HD 7790/8770 / R7 360 / R9 260/360|99
FirePro M4000 Mobility Pro Graphics|99
Radeon HD 7970M|99
Radeon R9 M270X|99
Radeon RX 550|98
Radeon HD 6850|98
Radeon(TM) RX 460|98
Radeon(TM) RX Vega11 Graphics|98
Radeon(TM) RX 460 Graphics|98
Radeon Pro 460|97
Radeon HD 7800 Series|97
Matrox C680 PCIe x16|97
Radeon(TM) RX 550|97
Radeon HD 5770|96
Radeon HD 8670D + 7700 Dual Graphics|96
Radeon HD 7790|96
Radeon 630 Series|96
Radeon RX 560 Series|96
Firepro M6100|95
Radeon HD 6700 Series|95
67EF:E7|95
Radeon(TM) Vega 10 Graphics|95
Radeon HD 6900M Series|94
Radeon Pro 455|94
FirePro M4000|94
Radeon R9 260|94
FirePro W7000|94
Radeon Instinct MI25|93
Radeon HD 8870M|93
Radeon(TM) Vega 11 Graphics|93
Radeon Pro 450|93
FirePro W5000|92
Radeon HD 6770|92
Radeon(TM) RX560|92
Radeon(TM) Graphics|91
ASUS Radeon(TM) RX 460 Series|91
Radeon(TM) Vega 8 Graphics|91
Radeon(TM) Graphics|91
FirePro W5100 Graphics Adapter|90
Radeon(TM) Pro WX Series|90
Renoir|90
STRATO XT (6646)|89
Radeon(TM) Pro WX 4150 Graphics|89
Radeon E8870MXM|89
Radeon HD 8970M|89
FirePro M6100 FireGL V|89
Radeon HD 7770|89
FirePro W5100 (FireGL V) Graphics Adapter|89
Radeon HD 6970M|89
Radeon Pro 460|88
Radeon RX Vega 8 Graphics|88
Radeon HD 7700 Series|88
Radeon(TM) R9 M360|88
ASUS R7 265 Series|88
Radeon RX Vega M GL Graphics|88
ASUS Radeon RX 550 Series|88
Radeon R7 360 / R9 360|88
Radeon HD 6950|86
Radeon HD 6790|86
Radeon Pro WX 2100|86
ASUS Radeon RX 560 Series|86
Radeon HD 5750|86
Radeon(TM) RX 640|86
Radeon HD 8870M|85
Radeon R7 260X|85
Radeon Pro WX 7100|85
Radeon(TM) R7 360 Series|85
Radeon Infoshock™ RX 460 Graphics|85
FirePro W5170M|85
Radeon R9 M295X|85
FirePro W8100|85
Radeon HD 6750|85
FirePro W5170M|85
FirePro V5800 (FireGL) Graphics Adapter|84
ASUS R7 250X|84
67E8:00|84
Radeon(TM) RX 550X|84
Radeon(TM) R7 350|84
Radeon(TM) E9260|84
Radeon Sky 500|84
Radeon R9 M270X|83
Radeon(TM) R9 350|83
Radeon(TM) RX Vega 11 Graphics|83
Firepro M6100|83
Radeon R9 360|82
FirePro V7900|82
FirePro V5800 (FireGL V)|82
Radeon HD 8830M|82
Radeon Pro 450|82
Radeon HD 8950|82
6980:00|82
FirePro W5100 (FireGL V)|81
Radeon E8870|81
Radeon HD 7750 Series|81
Radeon HD 7850 / R7 265 / R9 270 1024SP|81
FirePro™ W4190M|80
Radeon HD 5770|80
Radeon(TM) R7 360 Series|80
FirePro M5100 FireGL V|80
Radeon RX 470/480/580|80
Radeon(TM) RX 460 Graphics|79
Radeon HD 6700 Series|79
Mobility Radeon HD 5870|79
Radeon R9 255|79
Radeon 535 Series|79
Radeon R9 M380 OpenGL Engine|78
Radeon(TM) RX 550|78
Radeon R9 M380|78
Radeon R7 250X|78
Saphire Radeon RX 580|78
Radeong 0.4 on AMD BONAIRE (DRM 2.43.0, LLVM 3.8.0)|78
Radeon HD 5000|78
Radeon HD 5770|77
Radeon RX 460|77
FirePro W4300|77
Radeon 530 Series|77
Radeon(TM) 540X|77
Radeon R9 M370X OpenGL Engine|77
FirePro V5900 (FireGL V)|77
Radeon Pro WX 4100|77
SAPPHIRE HD 5770|77
Radeon Pro WX 3100|76
FirePro W5100|76
Radeon(TM) Pro Graphics|76
Radeon Pro WX 3100|76
67FF:C8|76
Radeon(TM) HD8970M|76
Firepro M5100|76
Radeon(TM) R9 M375X|75
Radeon 550X Series|75
Radeon R9 M390|75
Radeon(TM) Vega 9 Graphics|75
FirePro V5900 (FireGL V) Graphics Adapter|74
Radeon HD 8570|74
Radeon(TM) RX 475M|74
Radeon HD 6770|74
Radeon RX 550 Series|74
Radeon RX 550|74
FirePro M4000|74
Radeon RX 460/560D / Pro 450/455/460/560|74
Radeon Pro 560|74
Radeon Vega Series / Radeon Vega Mobile Series|74
Radeon Pro 455|74
Radeon HD 7870M Series|74
Radeon(TM) R7 430|74
Radeon 620 Series|73
Radeon HD 7770 GHz Edition|73
Radeon HD 7770|73
Radeon(TM) R9 360 Series|73
Radeon HD 7770/8760 / R7 250X|73
Radeon(TM) 530|73
15DD Graphics|73
Radeon RX Vega M GL Graphics|73
Radeon(TM) R9 380|72
Radeon(TM) 530 series|72
Radeon R7 200 Series|72
Embedded Radeon E9171|72
Radeon Pro WX3200 Graphics|71
Radeon HD 8800M Series|71
Radeon R9 M375|70
Radeon HD 5770|70
Radeon Pro 555|70
Radeon R7 250E|70
Radeon HD 7750|70
Radeon Pro 555X|70
Radeon(TM) Vega 8 Mobile Graphics|70
Radeon(TM) R9 M380|69
Radeon R7 260X/360|69
Barco MXRT 7600 (WDDM)|69
Radeon(TM) Vega 10 Graphics|69
Radeon HD 7750|69
Radeon R9 M370X|69
Radeon(TM) R2E Graphics|69
Radeon R9™ M370X|68
FirePro V4900 (FireGL V)|68
Radeon(TM) RX Vega11 Graphics|68
Radeon HD 5770|68
Radeon(TM) Renoir Graphics D1|68
Radeon HD 7600 Series|67
Radeon R5 340|67
Radeon(TM) Vega 9 Graphics|67
FirePro W4100 (FireGL V) Graphics Adapter|67
694E:C0|67
694C:C0|67
Radeon R7 250|66
Radeon HD 6750|66
RAVEN (DRM 3.36.0, 5.6.5-AMD, LLVM 9.0.1)|66
FirePro W600|66
Radeon R9 255|66
Radeon RX 470|66
Radeon(TM) R7 250|66
FirePro V5900|65
Radeon(TM) 530|65
Radeon Pro WX Vega M GL Graphics|65
Radeon RX 470/480|65
Radeon HD 5750|65
Radeon R7 260X|65
FirePro V5900 (FireGL V) Graphics Adapter|65
FirePro W4100 Graphics Adapter|65
Radeon HD 6700 Green Edition|65
Radeon R9 M370X|65
Radeon(TM) R7 350X|64
Radeon(TM) R7 350X|64
Radeon HD 7670|64
Radeon R9 M200X Series|64
Radeon R9 M370X|64
Radeon HD 6670|63
Radeon(TM) HD 8350|63
Radeon 530X Series|63
Radeon(TM) R9 360|63
Radeon(TM) Pro WX 4150 Graphics|63
67EF:C5|63
Radeon R7 Graphics + R5 340 Dual Graphics|62
Radeon HD 5670|62
Radeon RX 470/570|62
Radeon 530 Series|62
Radeon R7 250 Series|62
Radeon R7 430|62
Radeon HD 6750 Graphics|62
Radeon(TM) R9 M385X|62
Radeon(TM) Vega 10 Mobile Graphics|62
FirePro V5900 (FireGL V)|61
FirePro V5800 (FireGL V)|61
Radeon(TM) Vega 8 Graphics|61
FirePro V4800 (FireGL V)|61
Radeon HD 7600 Series|61
Radeon(TM) Vega 6 Graphics|61
Radeon(TM) R9 200 Series|61
Radeon HD 8850M|61
Radeon RX460|61
Radeon R7 M460|61
Radeon RX 640 Series|60
Radeon 530|60
Radeon HD 5600/5700|60
Radeon HD 5750 Series|60
Radeon R7 Graphics + R7 200 Dual Graphics|60
Radeon R7 450|60
FirePro V4900|60
Firepro W6150M|60
ASUS R7 250 Series|60
Radeon(TM) RX 560 Graphics|60
Radeon(TM) R7 M370|59
FirePro M4000 Mobility Pro Graphics|59
Radeon R5 430|59
Radeon R9 M275X|59
FirePro V5800 (FireGL) Graphics Adapter|59
Mobility Radeon HD 5870|59
Radeon(TM) R9 M385X|58
Radeon HD 7750M|58
Radeon HD 5670|58
Radeon HD 8850M|58
Radeon HD 7700M Series|58
Radeon HD 8670D + R7 200 Dual Graphics|58
Radeon R7 Series / HD 9000 Series|57
Radeon HD 6730M/6770M|57
Radeon(TM) 625|57
Radeon(TM) R9 M385|57
Radeon HD 5870M|56
Radeon 610 Series|56
FirePro W4100|56
FirePro M6000 Mobility Pro Graphics|56
Radeon RX 540 Series|56
Radeon R7 240|56
Radeon HD 7560D + HD 7700 Dual Graphics|56
Radeon R9 M370X (Bootcamp XG edition by bootcampdrivers.com)|56
FirePro V4900 (ATI FireGL)|55
Radeon(TM) R7 M350|55
FirePro M6000 Mobility Pro Graphics|55
67FF:08|55
Radeon HD 5750|55
Radeon HD 7570|55
Radeon(TM) Vega 11 Graphics|55
Radeon R7 M460|55
Radeon HD 5750 OpenGL Engine|55
Radeon(TM) R7 M370|55
Radeon HD 6730M/6770M/7690M XT|55
Radeon E8860|55
Radeon HD 8790M|54
Radeon HD 6770M|54
Radeon R7 M440|54
Radeon(TM) R7 350|54
Radeon(TM) R7 350X|54
Radeon HD 7870 XT|54
Radeon HD 7800M Series|54
Radeon 520|54
Radeon R7 M370|53
FirePro W4150M FireGL V|53
(ATI) FirePro M4000 (FireGL V) Mobility Pro Graphics|53
Radeon R9 M200X Series|53
Radeon HD 6700M/7700M/7900M Series|53
Radeon(TM) 620|53
Picasso|53
Radeon(TM) RX Vega 10 Graphics|53
67EF:CF|53
Radeon(TM) Vega 3 Graphics|53
Radeon R7 250|53
FirePro W4190M|53
Radeon(TM) Vega 8 Graphics|53
694C:C0|52
Radeon HD 5670 Series|52
Radeon(TM) RX Vega 11 Graphics|52
Radeon HD 6770M OpenGL Engine|52
Radeon(TM) M535DX|52
FirePro V4800 (FireGL V)|52
Radeon R7 350 Series|52
Barco MXRT 5600 (WDDM)|51
Radeon 630|51
FirePro V4900 (FireGL V)|51
FirePro V4900 (FireGL V) Graphics Adapter|51
Radeon(TM) Vega 3 Mobile Graphics|51
Radeon 535 Series|51
Radeon R7 Graphics|51
Radeon HD 5670|51
FirePro W4170M|50
Radeon HD 8700M Series|50
Radeon HD 8670 / R7 250/350|50
Picasso|50
FirePro V4800 (FireGL) Graphics Adapter|50
Mobility Radeon HD 5850|49
OPAL XT/GL (6604)|49
Radeon R5 M335|49
Matrox C900 PCIe x16|49
Radeon HD 7670|49
Radeon HD 6750M|49
Radeon(TM) 535|49
Radeon 540X Series|49
Radeon R9 M275|49
Radeon(TM) RX 640|49
Radeon HD 5700 Series|48
Radeon R5 M230 Series|48
Firepro M6100|48
Radeon(TM) R9 M375|48
Radeon R5 430|48
Radeon(TM) R7 250|47
Radeon R9 M265X|47
Radeon HD 6730M/6770M|47
Radeon HD 8670D|47
Radeon R5 340|47
Radeon 520|47
Radeon(TM) 520|47
FirePro V (FireGL V) Graphics Adapter|47
FirePro M5100 FireGL V|46
Radeon HD 6670|46
Radeon R7 M260X|46
Radeon HD 8550|46
FirePro M4150|46
Radeon HD 6670|46
Radeon HD 7700 Series|46
FirePro M4170|46
Radeon HD 7570|46
Radeon HD 8670D + HD 6670 Dual Graphics|45
699F:C1|45
Radeon R7 Graphics|45
Radeon(TM) R7 M340|45
FirePro W4170M (FireGL V)|45
Radeon(TM) HD 8500M/8700M|45
Radeon R7 M340|44
FirePro M5950|44
Radeon HD 8570D + R7 240 Dual Graphics|44
Radeon HD 6770M|44
Radeon HD 7730M|44
Radeon HD 8790M|44
Radeon HD 7750|44
Radeon HD 8690A|44
Mobility Radeon HD 5730 / 6570M|44
Radeon R9 A375|44
Radeon(TM) R8 M445DX|43
FirePro V (FireGL V) Graphics Adapter|43
Radeon HD 7750/8740 / R7 250E|43
FirePro V3900|43
Radeon HD 7600A Series|43
Radeon(TM) R7 200 Series Graphics|43
Radeon R7 Graphics|43
Radeon HD 6770M|43
Radeon R7 M260 Series|43
Radeon R7 M360|43
Radeon HD 8970M|43
Radeon(TM) Vega 6 Graphics|43
Radeon HD 8570|42
Radeon R7 M440|42
Radeon HD 8670A/8670M/8750M|42
Mobility Radeon HD 5850|42
Radeon HD 8750M|42
Embedded Radeon E9173|42
Radeon(TM) R7 M440|42
Radeon HD 8730M|42
Radeon R7 240 + HD 8570D Dual Graphics|42
FirePro V3900|42
Radeon(TM) 535DX|42
Radeon(TM) 520|42
Radeon(TM) Vega 8 Mobile Graphics|42
Radeon(TM) Vega 8 Graphics|42
Radeon(TM) Vega 2 Graphics|42
Radeon(TM) R9 M375|42
Radeon(TM) R8 M445DX|41
Radeon HD 6750M|41
RadeonT 540X|41
Radeon(TM) 530|41
Radeon HD 7560D + HD 6670 Dual Graphics|41
Radeon R7 240|41
Radeon(TM) R7 M360|41
Radeon R9 M280X|41
Radeon HD 7520G + HD 7600M Dual Graphics|41
Radeon(TM) R7 M445|41
Radeon Vega 8 Mobile|40
Radeon(TM) R9 255|40
Radeon R7 M260X|40
Radeon R8 M535DX|40
Radeon R7 240/340|40
Radeon(TM) R9 M375|40
Radeon(TM) R7 Graphics|40
Radeon(TM) R5 M420|40
Radeon HD 6750M|40
Radeon R9 M265X|40
Radeon R7 M340|40
Radeon HD 6570|40
Radeon HD 7500/7600 Series|39
Radeon R7 430|39
FirePro W2100|39
Radeon HD 7730M|39
Radeon HD 8670D|39
Radeon R5 M255|39
Radeon HD 7560D + HD 6570 Dual Graphics|39
Radeon RX Vega|39
Radeon R7 240 Series|39
Radeon(TM) R7 M445|39
Radeon HD 6800M Series|39
Radeon HD 8690M|39
Radeon HD 7660D + HD 6570 Dual Graphics|39
Radeon R7 M370|39
Radeon(TM) HD 6650M|38
Radeon R5 M435|38
Radeon HD 6500 Series|38
Radeon R7 Graphics|38
FirePro M7820|38
Radeon(TM) R8 M445DX Graphics|38
Radeon HD 5570|38
Radeon HD 8650G + 8750M Dual Graphics|38
Radeon HD 8670A/8670M/8750M|38
Radeon HD 6650M|38
Radeon R7 M260 Series|38
Radeon HD 7660G + 7600M Dual Graphics|38
Radeon HD 7600M Series|38
Radeon HD 7670M|37
Radeon. HD 7670M|37
Radeon(TM) R7 M265|37
Mobility Radeon HD 5000|37
Radeon HD 7500M/7600M Series|37
Radeon R5/R6/R7 Graphics|37
Radeon R7 M270|37
Radeon HD 8650G + HD 7600M Dual Graphics|37
Firepro M5100|37
Radeon HD 7730M|37
Radeon HD 8570D|37
Radeon(TM) HD 7650A Graphics|37
Radeon R7 Graphics|37
Radeon(TM) RX Vega 10 Graphics|37
Radeon HD 7600A Series|36
Radeon R7 M270|36
Radeon HD 7660D + HD 6670 Dual Graphics|36
Radeon HD 7570M/HD 7670M Graphics|36
Radeon 6600M and 6700M Series|36
Radeon R7 Graphics + R7 200 Dual Graphics|36
Radeon HD 7570 Series|36
Radeon HD 8750M|36
Radeon HD 6550D|36
FirePro M5950|36
Radeon HD 7660G + 7600M Dual Graphics|36
Radeon HD 6550D|36
Radeon HD 7600M/7700M Series|36
Radeon(TM) Vega 3 Graphics|36
Radeon(TM) 625|36
Mobility Radeon HD 5570|36
Radeon HD8730|36
Radeon(TM) R9 M380|36
Radeon(TM) R5 240|36
Radeon HD 7650M|35
Radeon HD 7560D|35
Radeon HD 8690M|35
Radeon HD 8650G + 8750M Dual Graphics|35
Radeon HD 8650G + HD 8750M Dual Graphics|35
Radeon HD 8650G + HD 8570M Dual Graphics|35
Radeon HD 6570|35
Radeon HD 7650M|35
Radeon HD 6630M/6650M/6750M/7670M/7690M|35
Radeon HD 6500 Series|35
Radeon(TM) 520|35
Radeon HD 8570D|35
Radeon HD 7600M Series|35
Radeon R7 Graphics|35
Radeon HD 7660G + 8670M Dual Graphics|35
Radeon R7 200 Series|35
Radeon HD 6630M/6650M/6750M/7670M/7690M|35
Radeon R7 M265|35
Radeon HD 8650G + HD 8750M Dual Graphics|35
Radeon HD 8650G + 8670M Dual Graphics|35
Radeon R7 Graphics|34
Radeon HD 6630M Series|34
Radeon(TM) 520|34
Radeon HD 7660D|34
ASUS R7 240 Series|34
Radeon R9 M280X|34
Radeon(TM) R5 340|34
Radeon HD 8550G + 8600/8700M Dual Graphics|34
Radeon R7 Graphics|34
Radeon(TM) HD 8500M/8700M|34
Radeon HD 7660G + HD 7600M Dual Graphics|34
Radeon HD 7670M|34
Radeon(TM) R5 M430|34
Radeon HD 8650G + 8500M Dual Graphics|34
Radeon(TM) R5 340X|34
Radeon(TM) R5 230 series|34
Radeon HD 8550|34
FirePro W2100 (FireGL V)|34
Firepro M4100 FireGL V|34
Radeon HD 6550D|34
Radeon HD 6630M|34
Radeon(TM) R9 M375|34
Radeon HD 5670 OpenGL Engine|33
Radeon HD 5670|33
Radeon R7 Graphics|33
Radeon HD 7660G|33
Radeon HD 5570|33
Radeon HD 7550M/7650M Graphics|33
Radeon HD 7660D|33
Radeon HD 7560D|33
Radeon HD 7560D|33
Radeon R5 M445 Series|33
Radeon R5 M315|33
Radeon HD 8570D|33
Radeon R7 M265|33
Radeon HD 7640G + HD 7500/7600 Dual Graphics|33
Radeon R7 Graphics|33
Radeon HD 8500M Series|33
Mobility Radeon HD 5000|33
Radeon(TM) R7 M360|33
Firepro M4100|33
Radeon(TM) Vega 10 Graphics|32
Radeon HD 7500M/7600M Series|32
Radeon HD 8550G + HD 8600/8700M Dual Graphics|32
Radeon HD 7660G|32
Radeon HD 7350|32
Radeon HD 8470D + HD 6450 Dual Graphics|32
Radeon R7 Graphics|32
Radeon HD 8730M|32
Radeon HD 7640G + HD 7400M Dual Graphics|32
Radeon HD 8690A|32
Radeon HD 8650G + 8600/8700M Dual Graphics|32
Radeon R7|32
Radeon(TM) Vega 11 Graphics|32
Radeon(TM) Vega 8 Graphics|32
Radeon R5 M200 Series|32
Radeon(TM) R5 M335|32
Radeon(TM) R5 M430|32
Radeon HD 8550G + HD 8570M Dual Graphics|32
Radeon HD 7650M Series|32
Radeon R7 250 Series|32
Radeon(TM) R7 M460|32
Radeon HD 6550D|32
Radeon HD 7660G + HD 7600M Dual Graphics|32
Radeon(TM) Vega 3 Graphics|32
Radeon HD 8470D|32
Radeon R8 M365DX|31
Madison [Mobility Radeon HD 5650/5750 / 6530M/6550M]|31
Radeon HD 6630M/6650M/6750M/7670M/7690M|31
Radeon R7 Graphics|31
Radeon E6760|31
Radeon R7 Graphics|31
Radeon(TM) Vega 8 Graphics|31
Radeon(TM) R5 M330|31
Radeon HD 8670A/8670M/8690M|31
Radeon R7 A360|31
Radeon HD 8650G + HD 8600M Dual Graphics|31
Radeon R5 M200 / HD 8500M Series|31
Radeon(TM) R8 M435DX|30
Radeon HD 7640G + HD 7670M Dual Graphics|30
Radeon(TM) Vega 10 Mobile Graphics|30
Radeon R7 Graphics|30
Radeon Pro 450/550|30
Radeon HD 8800M Series|30
Radeon HD 8470D|30
Radeon HD 7660D|30
Radeon HD 8610G + HD 8600M Dual Graphics|30
Radeon HD 7660G + 7670M Dual Graphics|30
Radeon(TM) Vega 8 Mobile Graphics|30
Radeon 610 Series|30
Radeon(TM) R5 M330|30
Radeon HD 7660G|30
Radeon HD 7640G|30
Radeon R8 M365DX|30
Radeon HD 8550G|29
Radeon HD 7540D|29
Radeon HD 7640G|29
Radeon HD 8650G|29
Radeon(TM) R7 Graphics|29
Radeon(TM) RX Vega 11 Graphics|29
Radeon HD 6650M|29
Radeon HD 7660G|29
Radeon 6600M and 6700M Series|29
Radeon HD 7640G + HD 7400M Dual Graphics|29
Radeon(TM) R5 340X|29
Radeon R5 435|29
Radeon HD 6500M/5600/5700 Series|29
Firepro M4100 FireGL V|29
Radeon R7 Graphics|29
Radeon(TM) 535|29
Radeon R7 240 Series|29
Radeon(TM) R7|29
Radeon HD 8550G + 8500M Dual Graphics|28
Radeon(TM) 530|28
Radeon HD 5650 Series|28
Radeon HD 7570M|28
Radeon HD 7570M|28
ASUS R7 240 Series|28
Radeon HD 6570|28
Radeon(TM) Vega 8 Graphics|28
Radeon E8860|28
Radeon(TM) 530 series|28
Radeon(TM) R5 M315|28
Radeon HD 5500 Series|28
Radeon HD 8610G + HD 8670M Dual Graphics|28
Radeon(TM) R6|28
Radeon R9 M275X|28
Radeon HD 8550G + R5 M230 Dual Graphics|28
Radeon HD 8470D|28
Radeon HD 8670D|28
Radeon HD 7620G|28
Radeon(TM) R8 M350DX|28
Radeon HD 8470D|27
Radeon(TM) R8 M445DX|27
Radeon(TM) R7 Graphics|27
Radeon(TM) R5 Graphics|27
Radeon(TM) R7 M340|27
Radeon(TM) R6 Graphics|27
Radeon R6 Graphics|27
Radeon R5 M230 Series|27
Radeon HD 8650G|27
Radeon HD 7480D|27
Radeon(TM) R8 M445DX Graphics|27
Radeon(TM) R6 Graphics|27
Radeon R7 Graphics|27
Radeon R6|27
Radeon R5 M255|27
Radeon(TM) Vega 3 Graphics|27
Radeon 550X|27
Radeon(TM) Vega 3 Graphics|27
Radeon HD 7500/7600 Series|27
Radeon HD 8650G|27
Radeon HD 5500 Series|27
Radeon HD 7610M|27
Radeon Instinct MI25 MxGPU|27
Radeon(TM) HD8530M|27
Radeon R7 M260|27
Radeon(TM) R8 M445DX|27
Radeon R7 Graphics|26
Radeon HD 8500M|26
Radeon(TM) R7 M260DX|26
Radeon HD 8410G|26
Radeon HD 8670A/8670M/8690M|26
Radeon(TM) R7 M360|26
Radeon(TM) R7 M360|26
Radeon HD 8670D|26
Radeon R9 M275|26
Radeon HD 7640G|26
Radeon(TM) R7 Graphics|26
MxGPU|26
Radeon HD 8370D|26
Radeon HD 6620G|25
Radeon HD 7560D|25
Radeon HD 8570 / R5 430 / R7 240/340 / Radeon 520|25
Radeon R4 Graphics|25
Radeon R6 Graphics|25
Radeon R7 Graphics|25
Radeon(TM) 535DX|25
Radeon(TM) 540 Graphics|25
Radeon(TM) R5 M330|25
Radeon HD 6530D|25
Radeon R6 Graphics|25
Radeon HD 8510G|25
Radeon HD 6620G|25
Radeon R7 M360|24
Radeon(TM) R6 Graphics|24
Radeon R7 M260|24
Radeon HD 8610G + HD 8600M Dual Graphics|24
Radeon(TM) R6 Graphics|24
Radeon R5 M200 / HD 8500M Series|24
Radeon R7 Graphics|24
Radeon HD 7600G|24
Radeon R7 Graphics|24
Radeon HD 6620G|24
Radeon R5 M330|24
Radeon(TM) R5 240|24
Radeon(TM) HD 6620G|24
FirePro V3800 (FireGL V)|24
Radeon HD 6520G|24
Radeon R7 Graphics|24
Radeon HD 7520G|24
Radeon(TM) R6 Graphics|24
Radeon(TM) R7 M260|24
Radeon RX 540 Series|24
Radeon(TM) R5 M320|24
Radeon HD 8500M|23
Radeon R5 M230|23
Radeon HD 8670M|23
Radeon HD 8550G + HD 8750M Dual Graphics|23
Radeon HD 8600M Series (HAINAN, DRM 3.40.0, 5.11.13-arch1-1, LLVM 11.1.0)|23
Radeon HD 8550G|23
Radeon R5 M240|23
Radeon R5 M240 Series|23
Radeon HD 7540D|23
Radeon(TM) R5 M430|23
Radeon R5 Graphics|23
Radeon(TM) R5 M430|23
Radeon R6 Graphics|23
Radeon HD 7520G|23
Radeon R7 Graphics|23
Radeon HD 8610G|22
FirePro 3800 (FireGL) Graphics Adapter|22
Radeon HD 7570M/HD 7670M Graphics|22
Radeon HD 7480D|22
Radeon(TM) R7 Graphics|22
Radeon HD 8650G + HD 8600M Dual Graphics|22
Radeon(TM) Vega 6 Graphics|22
Radeon R7 Graphics|22
Radeon R5 Graphics|22
Radeon HD 7660G + HD 8600M Dual Graphics|22
FirePro M2000|22
Radeon R7 Graphics|22
Radeon HD 7870M|22
Radeon R5 M335|22
Radeon R5|22
Radeon HD 8500M Series|22
Radeon(TM) HD 8490|22
Radeon HD 8670M|22
Radeon HD 7660G + HD 7670M Dual Graphics|22
Radeon 7500M/7600M Series|22
Radeon R5 Graphics|21
Radeon(TM) R4 Graphics|21
Radeon HD 8490|21
Radeon HD 8490|21
Radeon R7 Graphics|21
Radeon HD 8570M|21
Radeon(TM) R5 M320|21
Radeon R2|21
Radeon HD 6530D|21
Radeon(TM) HD 6470M|21
MxGPU|21
Radeon HD 7000 series|21
Radeon HD 7470|21
Radeon(TM) R8 M350DX|21
Radeon R7 Graphics|21
Radeon HD 7520G + HD 7400M Dual Graphics|21
Radeon(TM) R5 M335|21
Radeon HD 7400G|21
Radeon HD 7640G + HD 8500M Dual Graphics|21
Radeon HD 7000 series|21
Radeon(TM) R5 Graphics|20
Radeon(TM) R7 M520 (R17M-M1-30)|20
Radeon HD 8470|20
Radeon HD 7480D|20
Radeon HD 6400M/7400M Series|20
Radeon(TM) R3 Graphics|20
Radeon R6 M255DX|20
Radeon HD 8370D|20
Radeon R5 Graphics|20
Radeon R7 Graphics|20
Radeon HD 6410D|20
Radeon(TM) R5 Graphics|20
Radeon R5 M330|20
Radeon R7 M260DX|20
Radeon(TM) R5 Graphics|20
Radeon HD 7480D|20
Radeon HD 6470M|20
Radeon Hybrid (Blocked)|20
Radeon(TM) R7 Graphics|20
Radeon(TM) R6 M340DX|20
Radeon R5 235|20
Radeon HD 7520G|19
Radeon(TM) R6 M255DX|19
Radeon R5 M240|19
Radeon(TM) R3 Graphics|19
Radeon R7E Graphics|19
Radeon R5 M200 Series|19
Radeon HD 7470|19
Radeon HD 7640G + 8500M Dual Graphics|19
Radeon(TM) R5 M330|19
Radeon HD 6470M|19
Radeon R3 Graphics|19
Radeon HD 8400E|19
Radeon HD 7640G + HD 8570M Dual Graphics|19
Radeon HD 8400|19
Radeon HD 8400 / R3 Series|19
Radeon R5 Graphics|19
Radeon(TM) R7 M265|19
Radeon R5 M230|19
Radeon R5 Graphics|19
Radeon HD 7620G|19
Radeon R5 Graphics|19
Radeon(TM) HD 6470M|19
Radeon HD 7480D|18
Radeon R7 Graphics|18
Radeon(TM) R5 Graphics|18
Radeon HD 8550G|18
Radeon HD 8370D|18
Radeon R5 Graphics|18
Radeon(TM) HD 7450|18
Radeon HD 6530D|18
Radeon HD 8570M|18
Radeon R6 Graphics|18
Radeon HD 7650A|18
Radeon HD 8450G|18
Radeon HD 8550G + R5 M230 Dual Graphics|18
Radeon HD 7640G + 7470M Dual Graphics|18
Radeon HD 8370D|18
Radeon HD 7400M Series|18
Radeon HD 8670D + R5 200 Dual Graphics|17
Radeon HD 7500G|17
Radeon HD 7790|17
Radeon HD 7450M|17
Radeon(TM) HD 7450A Graphics|17
Radeon(TM) R5 Graphics|17
Radeon(TM) R6 Graphics|17
Radeon(TM) R4 Graphics|17
Radeon HD 8650G + HD 8500M Dual Graphics|17
Radeon HD 7400M Series|17
Radeon HD 8450G|17
Radeon HD 6520G|17
Radeon HD 8470D|17
Radeon(TM) R5 Graphics|17
Radeon(TM) R4E Graphics|17
Radeon HD 8330|17
Radeon HD 8400|17
Radeon(TM) HD 8510G|17
Radeon(TM) R5 Graphics|17
Radeon HD 8650G|17
Radeon HD 6490M|17
Radeon R7 Graphics|16
Radeon HD 6400 Series|16
Radeon HD 8510G|16
Radeon HD 7400 Series|16
Radeon HD 7400 Series|16
Radeon(TM) HD 8510G|16
Radeon HD 6370D|16
Radeon HD 7420G|16
Radeon HD 7520G + HD 7600M Dual Graphics|16
Radeon R9 260|16
Radeon HD 7640G + 7600M Dual Graphics|16
Radeon HD 7470M|16
Radeon(TM) R2 Graphics|16
RADEON HD 6450|16
Radeon(TM) R1E Graphics|16
Radeon R5 Graphics|16
Radeon HD 7420G|16
Radeon(TM) R4 Graphics|16
Radeon(TM) R4 Graphics|16
Radeon(TM) R4 Graphics|16
Radeon HD 7480D|16
Radeon HD 6490M|15
RADEON HD 6450|15
Radeon(TM) HD 8610G|15
Radeon(TM) HD 8610G|15
Radeon HD 8610G + 8600M Dual Graphics|15
Radeon HD 7350|15
Radeon(TM) HD 6480G|15
Radeon HD 8650G + 8600M Dual Graphics|15
Radeon HD 8570D|15
Radeon HD 6370M|15
Mobility Radeon HD 5000 Series|15
Radeon R2 Graphics|15
Radeon HD 8240 / R3 Series|15
Radeon HD 8650G + R5 M200 Dual Graphics|15
Radeon HD 8400E|15
Radeon(TM) R4 Graphics|15
Radeon R5 Graphics|15
Radeon HD 8610G|15
Radeon HD 8650G + HD 8500M Dual Graphics|15
Radeon(TM) R7 M260|15
ASUS EAH6450 Series|15
Radeon R3 Graphics|15
Radeon(TM) R6 M340DX|15
Radeon R6E Graphics|15
Radeon R5 Graphics|15
Radeon R2 Series|14
Radeon HD 6450/7450/8450/R5 230|14
Radeon HD 8200 / R3 Series|14
Radeon(TM) R3 Graphics|14
Radeon R5 230|14
Radeon(TM) HD 8510G|14
Radeon(TM) R4 Graphics|14
Radeon R5 M435|14
Radeon HD 8240|14
ASUS R5 230 Series|14
FirePro M2000|14
Radeon HD 7500G|14
Radeon HD 7450|14
RADEON HD 6450|14
Radeon HD 8400E|14
RADEON HD 6350|14
Radeon HD 6480G|14
Radeon(TM) R5E Graphics|14
CARRIZO 9874|14
Mobility Radeon HD 5000 Series|14
Radeon HD 6630M|14
Radeon HD 6370M|14
Radeon HD 8400 / R3 Series|14
Radeon(TM) R2 Graphics|14
ASUS EAH6450 Series|14
Radeon HD 7470M|13
Mobility Radeon HD 5470|13
Mobility Radeon HD 5400 Series|13
Radeon(TM) R5E Graphics|13
Radeon(TM) R2 Graphics|13
Radeon HD 6540|13
Radeon HD 7450|13
Radeon HD 5450|13
Radeon HD 8600M Series|13
Radeon HD 8400 / R3 Series|13
Kaveri|13
Radeon(TM) HD 6480G|13
Radeon HD 5400 Series|13
Radeon HD 8330|13
RADEON HD 6350|13
Radeon R4/R5 Graphics|13
Radeon HD 7600G +™ HD Dual Graphics|13
Radeon R3 Graphics|13
ASUS R5 230 Series|13
Radeon(TM) R7 Graphics|13
Radeon HD 7620G|13
Radeon HD 8250|13
Radeon(TM) R7 Graphics|12
Radeon HD 6450/7450/8450 / R5 230|12
Radeon HD 6480G|12
Radeon(TM) R7 Graphics|12
Radeon HD 5450 Series|12
Radeon HD 8400 / R3 Series|12
Radeon(TM) HD 6400 Series|12
Radeon(TM) R4 Graphics|12
RADEON HD5450|12
Radeon R5 Graphics|12
Radeon R5 Graphics|12
Radeon(TM) R6 Graphics|12
Radeon(TM) R4 Graphics|12
Radeon(TM) R2 Graphics|12
Radeon HD 8210|12
Radeon R5 230|12
Radeon R3 Graphics|12
FirePro 2270|12
Radeon(TM) R2E Graphics|12
Radeon HD 8400 / R3 Series|12
Radeon HD 8350G|12
Radeon HD 8400|12
Radeon R2 Graphics|12
Radeon HD 8210 Graphics|12
Radeon E6460|12
Radeon(TM) HD 8280E|12
Radeon R2 Graphics|11
Radeon HD 8450G + HD 8750M Dual Graphics|11
Radeon HD 8330|11
Radeon HD 5470|11
Radeon HD 7600G + 7500M/7600M Dual Graphics|11
Radeon R5 220|11
Radeon HD 8200 / R3 Series|11
Radeon HD 8240|11
Radeon HD 8400 / R3 Series|11
Radeon HD 8200 / R3 Series|11
Radeon HD 5450|11
Radeon(TM) 620|11
Radeon(TM) Vega 8 Mobile Graphics|11
Radeon HD 6530D|11
Radeon(TM) HD 6520G|11
Radeon HD 6300M Series|11
ASUS EAH5450|11
Radeon R5 220|11
Radeon HD 8250|11
Radeon HD 7340|11
Radeon HD 7340M|11
Radeon HD 8210|11
Radeon HD 7700 Series|10
Radeon HD 6380G|10
Radeon HD 5400 Series|10
Radeon HD 8240|10
Radeon HD 7640G + 7670M Dual Graphics|10
Radeon(TM) R6 Graphics|10
ASUS EAH5450 Series|10
Radeon HD 6320|10
Radeon HD 7340G|10
Radeon HD 6410D|10
Radeon HD 7340|10
Radeon HD 6320|10
Radeon(TM) R2 Graphics|10
Radeon HD 8180|9
Mobility Radeon HD 5430|9
Radeon R2 Graphics|9
Radeon R2 Series|9
Radeon HD 8210|9
FirePro 2270|9
Radeon R2E Graphics|9
Radeon HD 7340|9
Radeon HD 6320|9
Radeon HD 7310|9
Radeon HD 6310|9
Radeon R7 Graphics|9
Radeon HD 7310|8
Radeon HD 8250|8
Radeon HD 8180|8
Radeon HD 6630M|8
Radeon HD 6230|8
Radeon HD 6320|8
Radeon HD 6400M Series|8
Radeon HD 7290 Graphics|7
Radeon HD 6290|7
Radeon HD 6310|7
Radeon HD 8180|7
ASUS EAH5450 Series|7
Radeon(TM) R2 Graphics|6
Radeon HD 6310|6
Radeon HD 7500G|6
Radeon HD 8240 / R3 Series|6
Radeon HD 6250|6
Radeon HD 6380G|6
Radeon HD 6300M Series|5
Radeon HD 7310|5
Radeon R3 Graphics|5
Radeon(TM) R6 Graphics|5
Radeon HD 6250|5
Radeon HD 6290|5
Radeon HD 6250|5
Radeon HD 7290 Graphics|4
Radeon HD 5000/6000/7350/8350 Series|3
Radeon RX Vega 56 OpenGL Engine|-1
FirePro V4800 (FireGL) Graphics Adapter|-1
Radeon HD 7670M|-1
Radeon HD 8570D|-1
7340:C5|-1
Radeon HD 8550G|-1
Radeon R5 Graphics|-1
ASUS R7 360 Series|-1
Bonaire [FirePro W5100]|-1
Radeon HD 6380G|-1
Radeon R7 Graphics|-1
FireGL V8650|-1
FirePro S7150|-1
FirePro V3900 (FireGL V)|-1
FirePro V7800 (FireGL V)|-1
FirePro W4100 Graphics Adapter|-1
FirePro W4170M (FireGL V)|-1
Gigabyte Radeon RX 580|-1
Mobility FireGL V5700|-1
Mobility Radeon 4100|-1
Mobility Radeon HD 2400|-1
Mobility Radeon HD 2400 XT|-1
Mobility Radeon HD 2600|-1
Mobility Radeon HD 2600 XT|-1
Mobility Radeon HD 3200|-1
Mobility Radeon HD 3400 Series|-1
Mobility Radeon HD 3430|-1
Mobility Radeon HD 3470|-1
Mobility Radeon HD 3650|-1
Mobility Radeon HD 4200 Series|-1
Mobility Radeon HD 4250|-1
Mobility Radeon HD 4300 Series|-1
Mobility Radeon HD 4500 Series|-1
Mobility Radeon HD 4500/5100 Series|-1
Mobility Radeon HD 4650|-1
Mobility Radeon HD 4670|-1
Mobility Radeon HD 4850|-1
R9 270X Devil|-1
RX 560X|-1
Radeon|-1
Radeon(TM) HD8530M|-1
Radeon 3000|-1
Radeon 3100 Graphics|-1
Radeon HD 2400 PRO|-1
Radeon HD 2400 XT|-1
Radeon HD 2600 Pro|-1
Radeon HD 2600 XT|-1
Radeon HD 2900 GT|-1
Radeon HD 3200 Graphics|-1
Radeon HD 3300|-1
Radeon HD 3450|-1
Radeon HD 3470|-1
Radeon HD 3600 Series|-1
Radeon HD 3650|-1
Radeon HD 3850|-1
Radeon HD 3870|-1
Radeon HD 3870 X2|-1
Radeon HD 4200|-1
Radeon HD 4250|-1
Radeon HD 4290|-1
Radeon HD 4300/4500 Series|-1
Radeon HD 4550|-1
Radeon HD 4600 Series|-1
Radeon HD 4650|-1
Radeon HD 4670|-1
Radeon HD 4830|-1
Radeon HD 4850|-1
Radeon HD 4870|-1
Radeon HD 4890|-1
Radeon HD 5670 640SP Edition|-1
Radeon HD 5800 Series|-1
Radeon HD 5850|-1
Radeon HD 6490M|-1
Radeon HD 6730M/6770M|-1
Radeon HD 6750|-1
Radeon HD 6800M Series|-1
Radeon HD 7540D + HD 6670 Dual Graphics|-1
Radeon HD 7700M Series|-1
Radeon HD 7800 Series|-1
Radeon HD 8350|-1
Radeon HD 8370D|-1
Radeon HD 8600/8700M|-1
Radeon Pro WX Vega M GL Graphics|-1
Radeon R5 200 Series|-1
Radeon R7 A370|-1
Radeon R9 200 Series|-1
Radeon R9 290X/390X|-1
Radeon R9 380X|-1
Radeon RX 480|-1
Radeon RX 550X|-1
Radeon RX 6650M|-1
Radeon RX6600XT|-1
Radeon(TM) R8 M435DX|-1
Radeon(TM) R9 290X|-1
Radeon(TM) RX540|-1
inc. Radeon HD 7970|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.7.0)|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 3.9.0 / 4.9.0-rc1+, LLVM 4.0.0)|-1
Radeong 0.4 on AMD FIJI (DRM 3.2.0 / 4.7.0-rc5+, LLVM 4.0.0)|-1
Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
`;
function EYt() {
  return TYt;
}
function SYt(t) {
  return t === _f.Intel
    ? vYt()
    : t === _f.Nvidia
    ? _Yt()
    : t === _f.Amd
    ? EYt()
    : "";
}
var yz = [],
  vz = [],
  bz = [];
function RYt(t) {
  if (t === _f.Intel && yz.length) return yz;
  if (t === _f.Nvidia && vz.length) return vz;
  if (t === _f.Amd && bz.length) return bz;
  try {
    var e = pYt(SYt(t), t);
    return (
      t === _f.Intel && (yz = e),
      t === _f.Nvidia && (vz = e),
      t === _f.Amd && (bz = e),
      e
    );
  } catch {}
  return [];
}
function AYt(t) {
  return t ? mYt(gYt(RYt(t.vendor), t)) : 0;
}
var wbe,
  kbe,
  Ibe = "",
  Dbe = (function () {
    function t() {
      Wn(this, t);
    }
    return (
      Kn(t, null, [
        {
          key: "getGPUVendor",
          value: function () {
            return Ibe || (Ibe = fYt());
          },
        },
        {
          key: "parseVendor",
          value: function (e) {
            try {
              var n = JZt(e || t.getGPUVendor());
              return $n($n({}, n), {}, { score: AYt(n) });
            } catch {}
            return null;
          },
        },
      ]),
      t
    );
  })(),
  _z =
    s$ !== void 0
      ? s$
      : typeof window < "u"
      ? window
      : typeof global < "u"
      ? global
      : typeof self < "u"
      ? self
      : {};
function Ea(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default")
    ? t.default
    : t;
}
var T3 = function (t) {
    return t && t.Math == Math && t;
  },
  Dl =
    T3((s$ === void 0 ? "undefined" : ti(s$)) == "object" && s$) ||
    T3(
      (typeof window > "u" ? "undefined" : ti(window)) == "object" && window
    ) ||
    T3((typeof self > "u" ? "undefined" : ti(self)) == "object" && self) ||
    T3(ti(_z) == "object" && _z) ||
    (function () {
      return this;
    })() ||
    _z ||
    Function("return this")(),
  Zo = function (t) {
    try {
      return !!t();
    } catch {
      return !0;
    }
  },
  wYt = Zo,
  i5 = !wYt(function () {
    var t = function () {}.bind();
    return typeof t != "function" || t.hasOwnProperty("prototype");
  }),
  kYt = i5,
  BBe = Function.prototype,
  Pbe = BBe.apply,
  Mbe = BBe.call,
  a5 =
    ((typeof Reflect > "u" ? "undefined" : ti(Reflect)) == "object" && BWt) ||
    (kYt
      ? Mbe.bind(Pbe)
      : function () {
          return Mbe.apply(Pbe, arguments);
        }),
  HBe = i5,
  XBe = Function.prototype,
  pte = XBe.call,
  IYt = HBe && XBe.bind.bind(pte, pte),
  ss = HBe
    ? IYt
    : function (t) {
        return function () {
          return pte.apply(t, arguments);
        };
      },
  VBe = ss,
  DYt = VBe({}.toString),
  PYt = VBe(jn("")),
  mb = function (t) {
    return PYt(DYt(t), 8, -1);
  },
  MYt = mb,
  CYt = ss,
  PU = function (t) {
    if (MYt(t) === "Function") return CYt(t);
  },
  gte =
    (typeof document > "u" ? "undefined" : ti(document)) == "object" &&
    document.all,
  $Yt = gte === void 0 && gte !== void 0,
  zBe = { all: gte, IS_HTMLDDA: $Yt },
  jBe = zBe,
  xYt = jBe.all,
  Xl = jBe.IS_HTMLDDA
    ? function (t) {
        return typeof t == "function" || t === xYt;
      }
    : function (t) {
        return typeof t == "function";
      },
  AE = {},
  LYt = Zo,
  Ku = !LYt(function () {
    return (
      ea({}, 1, {
        get: function () {
          return 7;
        },
      })[1] != 7
    );
  }),
  OYt = i5,
  E3 = Function.prototype.call,
  Vl = OYt
    ? E3.bind(E3)
    : function () {
        return E3.apply(E3, arguments);
      },
  sB = {},
  WBe = {}.propertyIsEnumerable,
  KBe = ih,
  GYt = KBe && !WBe.call({ 1: 2 }, 1);
sB.f = GYt
  ? function (t) {
      var e = KBe(this, t);
      return !!e && e.enumerable;
    }
  : WBe;
var V_,
  PF,
  wE = function (t, e) {
    return {
      enumerable: !(1 & t),
      configurable: !(2 & t),
      writable: !(4 & t),
      value: e,
    };
  },
  NYt = ss,
  FYt = Zo,
  UYt = mb,
  Tz = Object,
  BYt = NYt("".split),
  lB = FYt(function () {
    return !Tz("z").propertyIsEnumerable(0);
  })
    ? function (t) {
        return UYt(t) == "String" ? BYt(t, "") : Tz(t);
      }
    : Tz,
  wD = function (t) {
    return t == null;
  },
  HYt = wD,
  XYt = TypeError,
  kD = function (t) {
    if (HYt(t)) throw XYt("Can't call method on " + t);
    return t;
  },
  VYt = lB,
  zYt = kD,
  Ev = function (t) {
    return VYt(zYt(t));
  },
  Cbe = Xl,
  ZBe = zBe,
  jYt = ZBe.all,
  fc = ZBe.IS_HTMLDDA
    ? function (t) {
        return ti(t) == "object" ? t !== null : Cbe(t) || t === jYt;
      }
    : function (t) {
        return ti(t) == "object" ? t !== null : Cbe(t);
      },
  Vs = {},
  Ez = Vs,
  Sz = Dl,
  WYt = Xl,
  $be = function (t) {
    return WYt(t) ? t : void 0;
  },
  kd = function (t, e) {
    return arguments.length < 2
      ? $be(Ez[t]) || $be(Sz[t])
      : (Ez[t] && Ez[t][e]) || (Sz[t] && Sz[t][e]);
  },
  KYt = ss,
  Pu = KYt({}.isPrototypeOf),
  uB = (typeof navigator < "u" && String(navigator.userAgent)) || "",
  YBe = Dl,
  Rz = uB,
  xbe = YBe.process,
  Lbe = YBe.Deno,
  Obe = (xbe && xbe.versions) || (Lbe && Lbe.version),
  Gbe = Obe && Obe.v8;
Gbe && (PF = (V_ = Gbe.split("."))[0] > 0 && V_[0] < 4 ? 1 : +(V_[0] + V_[1])),
  !PF &&
    Rz &&
    (!(V_ = Rz.match(/Edge\/(\d+)/)) || V_[1] >= 74) &&
    (V_ = Rz.match(/Chrome\/(\d+)/)) &&
    (PF = +V_[1]);
var XI = PF,
  Nbe = XI,
  ZYt = Zo,
  YYt = Dl,
  QYt = YYt.String,
  ID =
    !!Mc &&
    !ZYt(function () {
      var t = lu();
      return (
        !QYt(t) || !(Object(t) instanceof lu) || (!lu.sham && Nbe && Nbe < 41)
      );
    }),
  JYt = ID,
  QBe = JYt && !lu.sham && ti(K9) == "symbol",
  qYt = kd,
  eQt = Xl,
  tQt = Pu,
  nQt = QBe,
  rQt = Object,
  o5 = nQt
    ? function (t) {
        return ti(t) == "symbol";
      }
    : function (t) {
        var e = qYt("Symbol");
        return eQt(e) && tQt(e.prototype, rQt(t));
      },
  iQt = String,
  TR = function (t) {
    try {
      return iQt(t);
    } catch {
      return "Object";
    }
  },
  aQt = Xl,
  oQt = TR,
  sQt = TypeError,
  nd = function (t) {
    if (aQt(t)) return t;
    throw sQt(oQt(t) + " is not a function");
  },
  lQt = nd,
  uQt = wD,
  ble = function (t, e) {
    var n = t[e];
    return uQt(n) ? void 0 : lQt(n);
  },
  Az = Vl,
  wz = Xl,
  kz = fc,
  cQt = TypeError,
  dQt = function (t, e) {
    var n, r;
    if (
      (e === "string" && wz((n = t.toString)) && !kz((r = Az(n, t)))) ||
      (wz((n = t.valueOf)) && !kz((r = Az(n, t)))) ||
      (e !== "string" && wz((n = t.toString)) && !kz((r = Az(n, t))))
    )
      return r;
    throw cQt("Can't convert object to primitive value");
  },
  JBe = { exports: {} },
  qBe = !0,
  Fbe = Dl,
  hQt = ea,
  fQt = function (t, e) {
    try {
      hQt(Fbe, t, { value: e, configurable: !0, writable: !0 });
    } catch {
      Fbe[t] = e;
    }
    return e;
  },
  pQt = Dl,
  gQt = fQt,
  Ube = "__core-js_shared__",
  mQt = pQt[Ube] || gQt(Ube, {}),
  _le = mQt,
  Bbe = _le;
(JBe.exports = function (t, e) {
  return Bbe[t] || (Bbe[t] = e !== void 0 ? e : {});
})("versions", []).push({
  version: "3.31.1",
  mode: "pure",
  copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)",
  license: "https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",
  source: "https://github.com/zloirock/core-js",
});
var DD = JBe.exports,
  yQt = kD,
  vQt = Object,
  Qp = function (t) {
    return vQt(yQt(t));
  },
  bQt = ss,
  _Qt = Qp,
  TQt = bQt({}.hasOwnProperty),
  Zu =
    Object.hasOwn ||
    function (t, e) {
      return TQt(_Qt(t), e);
    },
  EQt = ss,
  SQt = 0,
  RQt = Math.random(),
  AQt = EQt((1).toString),
  cB = function (t) {
    return "Symbol(" + (t === void 0 ? "" : t) + ")_" + AQt(++SQt + RQt, 36);
  },
  wQt = Dl,
  kQt = DD,
  Hbe = Zu,
  IQt = cB,
  DQt = ID,
  PQt = QBe,
  gk = wQt.Symbol,
  Iz = kQt("wks"),
  MQt = PQt ? gk.for || gk : (gk && gk.withoutSetter) || IQt,
  rl = function (t) {
    return (
      Hbe(Iz, t) || (Iz[t] = DQt && Hbe(gk, t) ? gk[t] : MQt("Symbol." + t)),
      Iz[t]
    );
  },
  CQt = Vl,
  Xbe = fc,
  Vbe = o5,
  $Qt = ble,
  xQt = dQt,
  LQt = rl,
  OQt = TypeError,
  GQt = LQt("toPrimitive"),
  NQt = function (t, e) {
    if (!Xbe(t) || Vbe(t)) return t;
    var n,
      r = $Qt(t, GQt);
    if (r) {
      if (
        (e === void 0 && (e = "default"), (n = CQt(r, t, e)), !Xbe(n) || Vbe(n))
      )
        return n;
      throw OQt("Can't convert object to primitive value");
    }
    return e === void 0 && (e = "number"), xQt(t, e);
  },
  FQt = NQt,
  UQt = o5,
  dB = function (t) {
    var e = FQt(t, "string");
    return UQt(e) ? e : e + "";
  },
  BQt = Dl,
  zbe = fc,
  mte = BQt.document,
  HQt = zbe(mte) && zbe(mte.createElement),
  Tle = function (t) {
    return HQt ? mte.createElement(t) : {};
  },
  XQt = Ku,
  VQt = Zo,
  zQt = Tle,
  eHe =
    !XQt &&
    !VQt(function () {
      return (
        ea(zQt("div"), "a", {
          get: function () {
            return 7;
          },
        }).a != 7
      );
    }),
  jQt = Ku,
  WQt = Vl,
  KQt = sB,
  ZQt = wE,
  YQt = Ev,
  QQt = dB,
  JQt = Zu,
  qQt = eHe,
  jbe = ih;
AE.f = jQt
  ? jbe
  : function (t, e) {
      if (((t = YQt(t)), (e = QQt(e)), qQt))
        try {
          return jbe(t, e);
        } catch {}
      if (JQt(t, e)) return ZQt(!WQt(KQt.f, t, e), t[e]);
    };
var eJt = Zo,
  tJt = Xl,
  nJt = /#|\.prototype\./,
  s5 = function (t, e) {
    var n = iJt[rJt(t)];
    return n == oJt || (n != aJt && (tJt(e) ? eJt(e) : !!e));
  },
  rJt = (s5.normalize = function (t) {
    return String(t).replace(nJt, ".").toLowerCase();
  }),
  iJt = (s5.data = {}),
  aJt = (s5.NATIVE = "N"),
  oJt = (s5.POLYFILL = "P"),
  tHe = s5,
  sJt = nd,
  lJt = i5,
  uJt = PU(PU.bind),
  Id = function (t, e) {
    return (
      sJt(t),
      e === void 0
        ? t
        : lJt
        ? uJt(t, e)
        : function () {
            return t.apply(e, arguments);
          }
    );
  },
  Bf = {},
  cJt = Ku,
  dJt = Zo,
  nHe =
    cJt &&
    dJt(function () {
      return (
        ea(function () {}, "prototype", { value: 42, writable: !1 })
          .prototype != 42
      );
    }),
  hJt = fc,
  fJt = String,
  pJt = TypeError,
  oh = function (t) {
    if (hJt(t)) return t;
    throw pJt(fJt(t) + " is not an object");
  },
  gJt = Ku,
  mJt = eHe,
  yJt = nHe,
  S3 = oh,
  Wbe = dB,
  vJt = TypeError,
  Dz = ea,
  bJt = ih,
  Pz = "enumerable",
  Mz = "configurable",
  Cz = "writable";
Bf.f = gJt
  ? yJt
    ? function (t, e, n) {
        if (
          (S3(t),
          (e = Wbe(e)),
          S3(n),
          typeof t == "function" &&
            e === "prototype" &&
            "value" in n &&
            Cz in n &&
            !n[Cz])
        ) {
          var r = bJt(t, e);
          r &&
            r[Cz] &&
            ((t[e] = n.value),
            (n = {
              configurable: Mz in n ? n[Mz] : r[Mz],
              enumerable: Pz in n ? n[Pz] : r[Pz],
              writable: !1,
            }));
        }
        return Dz(t, e, n);
      }
    : Dz
  : function (t, e, n) {
      if ((S3(t), (e = Wbe(e)), S3(n), mJt))
        try {
          return Dz(t, e, n);
        } catch {}
      if ("get" in n || "set" in n) throw vJt("Accessors not supported");
      return "value" in n && (t[e] = n.value), t;
    };
var _Jt = Ku,
  TJt = Bf,
  EJt = wE,
  yb = _Jt
    ? function (t, e, n) {
        return TJt.f(t, e, EJt(1, n));
      }
    : function (t, e, n) {
        return (t[e] = n), t;
      },
  R3 = Dl,
  SJt = a5,
  RJt = PU,
  AJt = Xl,
  wJt = AE.f,
  kJt = tHe,
  UA = Vs,
  IJt = Id,
  BA = yb,
  Kbe = Zu,
  DJt = function (t) {
    var e = function n(r, i, o) {
      if (this instanceof n) {
        switch (arguments.length) {
          case 0:
            return new t();
          case 1:
            return new t(r);
          case 2:
            return new t(r, i);
        }
        return new t(r, i, o);
      }
      return SJt(t, this, arguments);
    };
    return (e.prototype = t.prototype), e;
  },
  ci = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f = t.target,
      p = t.global,
      g = t.stat,
      y = t.proto,
      v = p ? R3 : g ? R3[f] : (R3[f] || {}).prototype,
      b = p ? UA : UA[f] || BA(UA, f, {})[f],
      w = b.prototype;
    for (o in e)
      (r =
        !(n = kJt(p ? o : f + (g ? "." : "#") + o, t.forced)) &&
        v &&
        Kbe(v, o)),
        (u = b[o]),
        r && (c = t.dontCallGetSet ? (h = wJt(v, o)) && h.value : v[o]),
        (l = r && c ? c : e[o]),
        (r && ti(u) == ti(l)) ||
          ((d =
            t.bind && r
              ? IJt(l, R3)
              : t.wrap && r
              ? DJt(l)
              : y && AJt(l)
              ? RJt(l)
              : l),
          (t.sham || (l && l.sham) || (u && u.sham)) && BA(d, "sham", !0),
          BA(b, o, d),
          y &&
            (Kbe(UA, (i = f + "Prototype")) || BA(UA, i, {}),
            BA(UA[i], o, l),
            t.real && w && (n || !w[o]) && BA(w, o, l)));
  },
  PJt = mb,
  ER =
    Array.isArray ||
    function (t) {
      return PJt(t) == "Array";
    },
  MJt = Math.ceil,
  CJt = Math.floor,
  $Jt =
    eKt ||
    function (t) {
      var e = +t;
      return (e > 0 ? CJt : MJt)(e);
    },
  xJt = $Jt,
  hB = function (t) {
    var e = +t;
    return e != e || e === 0 ? 0 : xJt(e);
  },
  LJt = hB,
  OJt = Math.min,
  GJt = function (t) {
    return t > 0 ? OJt(LJt(t), 9007199254740991) : 0;
  },
  NJt = GJt,
  G0 = function (t) {
    return NJt(t.length);
  },
  FJt = TypeError,
  UJt = 9007199254740991,
  Ele = function (t) {
    if (t > UJt) throw FJt("Maximum allowed index exceeded");
    return t;
  },
  BJt = dB,
  HJt = Bf,
  XJt = wE,
  PD = function (t, e, n) {
    var r = BJt(e);
    r in t ? HJt.f(t, r, XJt(0, n)) : (t[r] = n);
  },
  VJt = rl,
  zJt = VJt("toStringTag"),
  rHe = {};
rHe[zJt] = "z";
var Sle = String(rHe) === "[object z]",
  jJt = Sle,
  WJt = Xl,
  MF = mb,
  KJt = rl,
  ZJt = KJt("toStringTag"),
  YJt = Object,
  QJt =
    MF(
      (function () {
        return arguments;
      })()
    ) == "Arguments",
  JJt = function (t, e) {
    try {
      return t[e];
    } catch {}
  },
  kE = jJt
    ? MF
    : function (t) {
        var e, n, r;
        return t === void 0
          ? "Undefined"
          : t === null
          ? "Null"
          : typeof (n = JJt((e = YJt(t)), ZJt)) == "string"
          ? n
          : QJt
          ? MF(e)
          : (r = MF(e)) == "Object" && WJt(e.callee)
          ? "Arguments"
          : r;
      },
  qJt = ss,
  eqt = Xl,
  yte = _le,
  tqt = qJt(Function.toString);
eqt(yte.inspectSource) ||
  (yte.inspectSource = function (t) {
    return tqt(t);
  });
var iHe = yte.inspectSource,
  nqt = ss,
  rqt = Zo,
  aHe = Xl,
  iqt = kE,
  aqt = kd,
  oqt = iHe,
  oHe = function () {},
  sqt = [],
  sHe = aqt("Reflect", "construct"),
  Rle = /^\s*(?:class|function)\b/,
  lqt = nqt(Rle.exec),
  uqt = !Rle.exec(oHe),
  rM = function (t) {
    if (!aHe(t)) return !1;
    try {
      return sHe(oHe, sqt, t), !0;
    } catch {
      return !1;
    }
  },
  lHe = function (t) {
    if (!aHe(t)) return !1;
    switch (iqt(t)) {
      case "AsyncFunction":
      case "GeneratorFunction":
      case "AsyncGeneratorFunction":
        return !1;
    }
    try {
      return uqt || !!lqt(Rle, oqt(t));
    } catch {
      return !0;
    }
  };
lHe.sham = !0;
var fB =
    !sHe ||
    rqt(function () {
      var t;
      return (
        rM(rM.call) ||
        !rM(Object) ||
        !rM(function () {
          t = !0;
        }) ||
        t
      );
    })
      ? lHe
      : rM,
  Zbe = ER,
  cqt = fB,
  dqt = fc,
  hqt = rl,
  fqt = hqt("species"),
  Ybe = Array,
  pqt = function (t) {
    var e;
    return (
      Zbe(t) &&
        ((e = t.constructor),
        ((cqt(e) && (e === Ybe || Zbe(e.prototype))) ||
          (dqt(e) && (e = e[fqt]) === null)) &&
          (e = void 0)),
      e === void 0 ? Ybe : e
    );
  },
  gqt = pqt,
  Ale = function (t, e) {
    return new (gqt(t))(e === 0 ? 0 : e);
  },
  mqt = Zo,
  yqt = rl,
  vqt = XI,
  bqt = yqt("species"),
  l5 = function (t) {
    return (
      vqt >= 51 ||
      !mqt(function () {
        var e = [];
        return (
          ((e.constructor = {})[bqt] = function () {
            return { foo: 1 };
          }),
          e[t](Boolean).foo !== 1
        );
      })
    );
  },
  _qt = ci,
  Tqt = Zo,
  Eqt = ER,
  Sqt = fc,
  Rqt = Qp,
  Aqt = G0,
  Qbe = Ele,
  Jbe = PD,
  wqt = Ale,
  kqt = l5,
  Iqt = rl,
  Dqt = XI,
  uHe = Iqt("isConcatSpreadable"),
  Pqt =
    Dqt >= 51 ||
    !Tqt(function () {
      var t = [];
      return (t[uHe] = !1), Ce(t).call(t)[0] !== t;
    }),
  Mqt = function (t) {
    if (!Sqt(t)) return !1;
    var e = t[uHe];
    return e !== void 0 ? !!e : Eqt(t);
  },
  Cqt = !Pqt || !kqt("concat");
_qt(
  { target: "Array", proto: !0, arity: 1, forced: Cqt },
  {
    concat: function (t) {
      var e,
        n,
        r,
        i,
        o,
        l = Rqt(this),
        u = wqt(l, 0),
        c = 0;
      for (e = -1, r = arguments.length; e < r; e++)
        if (Mqt((o = e === -1 ? l : arguments[e])))
          for (i = Aqt(o), Qbe(c + i), n = 0; n < i; n++, c++)
            n in o && Jbe(u, c, o[n]);
        else Qbe(c + 1), Jbe(u, c++, o);
      return (u.length = c), u;
    },
  }
);
var $qt = kE,
  xqt = String,
  Jp = function (t) {
    if ($qt(t) === "Symbol")
      throw TypeError("Cannot convert a Symbol value to a string");
    return xqt(t);
  },
  pB = {},
  Lqt = hB,
  Oqt = Math.max,
  Gqt = Math.min,
  u5 = function (t, e) {
    var n = Lqt(t);
    return n < 0 ? Oqt(n + e, 0) : Gqt(n, e);
  },
  Nqt = Ev,
  Fqt = u5,
  Uqt = G0,
  qbe = function (t) {
    return function (e, n, r) {
      var i,
        o = Nqt(e),
        l = Uqt(o),
        u = Fqt(r, l);
      if (t && n != n) {
        for (; l > u; ) if ((i = o[u++]) != i) return !0;
      } else
        for (; l > u; u++) if ((t || u in o) && o[u] === n) return t || u || 0;
      return !t && -1;
    };
  },
  wle = { includes: qbe(!0), indexOf: qbe(!1) },
  c5 = {},
  Bqt = ss,
  $z = Zu,
  Hqt = Ev,
  Xqt = qt(wle),
  Vqt = c5,
  e_e = Bqt([].push),
  cHe = function (t, e) {
    var n,
      r = Hqt(t),
      i = 0,
      o = [];
    for (n in r) !$z(Vqt, n) && $z(r, n) && e_e(o, n);
    for (; e.length > i; ) $z(r, (n = e[i++])) && (~Xqt(o, n) || e_e(o, n));
    return o;
  },
  kle = [
    "constructor",
    "hasOwnProperty",
    "isPrototypeOf",
    "propertyIsEnumerable",
    "toLocaleString",
    "toString",
    "valueOf",
  ],
  zqt = cHe,
  jqt = kle,
  gB =
    Dn ||
    function (t) {
      return zqt(t, jqt);
    },
  Wqt = Ku,
  Kqt = nHe,
  Zqt = Bf,
  Yqt = oh,
  Qqt = Ev,
  Jqt = gB;
pB.f =
  Wqt && !Kqt
    ? SD
    : function (t, e) {
        Yqt(t);
        for (var n, r = Qqt(e), i = Jqt(e), o = i.length, l = 0; o > l; )
          Zqt.f(t, (n = i[l++]), r[n]);
        return t;
      };
var A3,
  qqt = kd,
  dHe = qqt("document", "documentElement"),
  een = DD,
  ten = cB,
  t_e = een("keys"),
  mB = function (t) {
    return t_e[t] || (t_e[t] = ten(t));
  },
  nen = oh,
  ren = pB,
  n_e = kle,
  ien = c5,
  aen = dHe,
  oen = Tle,
  sen = mB,
  r_e = ">",
  i_e = "<",
  vte = "prototype",
  bte = "script",
  hHe = sen("IE_PROTO"),
  xz = function () {},
  fHe = function (t) {
    return i_e + bte + r_e + t + i_e + "/" + bte + r_e;
  },
  a_e = function (t) {
    t.write(fHe("")), t.close();
    var e = t.parentWindow.Object;
    return (t = null), e;
  },
  len = function () {
    var t,
      e = oen("iframe"),
      n = "java" + bte + ":";
    return (
      (e.style.display = "none"),
      aen.appendChild(e),
      (e.src = String(n)),
      (t = e.contentWindow.document).open(),
      t.write(fHe("document.F=Object")),
      t.close(),
      t.F
    );
  },
  CF = function () {
    try {
      A3 = new ActiveXObject("htmlfile");
    } catch {}
    CF =
      typeof document < "u"
        ? document.domain && A3
          ? a_e(A3)
          : len()
        : a_e(A3);
    for (var t = n_e.length; t--; ) delete CF[vte][n_e[t]];
    return CF();
  };
ien[hHe] = !0;
var IE =
    Object.create ||
    function (t, e) {
      var n;
      return (
        t !== null
          ? ((xz[vte] = nen(t)), (n = new xz()), (xz[vte] = null), (n[hHe] = t))
          : (n = CF()),
        e === void 0 ? n : ren.f(n, e)
      );
    },
  d5 = {},
  uen = cHe,
  o_e = kle,
  cen = Ce(o_e).call(o_e, "length", "prototype");
d5.f =
  cte ||
  function (t) {
    return uen(t, cen);
  };
var Ile = {},
  s_e = u5,
  den = G0,
  hen = PD,
  fen = Array,
  pen = Math.max,
  Dle = function (t, e, n) {
    for (
      var r = den(t),
        i = s_e(e, r),
        o = s_e(n === void 0 ? r : n, r),
        l = fen(pen(o - i, 0)),
        u = 0;
      i < o;
      i++, u++
    )
      hen(l, u, t[i]);
    return (l.length = u), l;
  },
  gen = mb,
  men = Ev,
  pHe = d5.f,
  yen = Dle,
  gHe =
    (typeof window > "u" ? "undefined" : ti(window)) == "object" &&
    window &&
    cte
      ? cte(window)
      : [],
  ven = function (t) {
    try {
      return pHe(t);
    } catch {
      return yen(gHe);
    }
  };
Ile.f = function (t) {
  return gHe && gen(t) == "Window" ? ven(t) : pHe(men(t));
};
var h5 = {};
h5.f = Mc;
var ben = yb,
  DE = function (t, e, n, r) {
    return r && r.enumerable ? (t[e] = n) : ben(t, e, n), t;
  },
  _en = Bf,
  f5 = function (t, e, n) {
    return _en.f(t, e, n);
  },
  p5 = {},
  Ten = rl;
p5.f = Ten;
var MU,
  $x,
  CU,
  l_e = Vs,
  Een = Zu,
  Sen = p5,
  Ren = Bf.f,
  Mu = function (t) {
    var e = l_e.Symbol || (l_e.Symbol = {});
    Een(e, t) || Ren(e, t, { value: Sen.f(t) });
  },
  Aen = Vl,
  wen = kd,
  ken = rl,
  Ien = DE,
  mHe = function () {
    var t = wen("Symbol"),
      e = t && t.prototype,
      n = e && e.valueOf,
      r = ken("toPrimitive");
    e &&
      !e[r] &&
      Ien(
        e,
        r,
        function (i) {
          return Aen(n, this);
        },
        { arity: 1 }
      );
  },
  Den = Sle,
  Pen = kE,
  Men = Den
    ? {}.toString
    : function () {
        return "[object " + Pen(this) + "]";
      },
  Cen = Sle,
  $en = Bf.f,
  xen = yb,
  Len = Zu,
  Oen = Men,
  Gen = rl,
  u_e = Gen("toStringTag"),
  vb = function (t, e, n, r) {
    if (t) {
      var i = n ? t : t.prototype;
      Len(i, u_e) || $en(i, u_e, { configurable: !0, value: e }),
        r && !Cen && xen(i, "toString", Oen);
    }
  },
  Nen = Dl,
  Fen = Xl,
  c_e = Nen.WeakMap,
  Uen = Fen(c_e) && /native code/.test(String(c_e)),
  Ben = Uen,
  yHe = Dl,
  Hen = fc,
  Xen = yb,
  Lz = Zu,
  Oz = _le,
  Ven = mB,
  zen = c5,
  d_e = "Object already initialized",
  _te = yHe.TypeError,
  jen = yHe.WeakMap,
  Wen = function (t) {
    return CU(t) ? $x(t) : MU(t, {});
  },
  Ken = function (t) {
    return function (e) {
      var n;
      if (!Hen(e) || (n = $x(e)).type !== t)
        throw _te("Incompatible receiver, " + t + " required");
      return n;
    };
  };
if (Ben || Oz.state) {
  var vy = Oz.state || (Oz.state = new jen());
  (vy.get = vy.get),
    (vy.has = vy.has),
    (vy.set = vy.set),
    (MU = function (t, e) {
      if (vy.has(t)) throw _te(d_e);
      return (e.facade = t), vy.set(t, e), e;
    }),
    ($x = function (t) {
      return vy.get(t) || {};
    }),
    (CU = function (t) {
      return vy.has(t);
    });
} else {
  var HA = Ven("state");
  (zen[HA] = !0),
    (MU = function (t, e) {
      if (Lz(t, HA)) throw _te(d_e);
      return (e.facade = t), Xen(t, HA, e), e;
    }),
    ($x = function (t) {
      return Lz(t, HA) ? t[HA] : {};
    }),
    (CU = function (t) {
      return Lz(t, HA);
    });
}
var PE = { set: MU, get: $x, has: CU, enforce: Wen, getterFor: Ken },
  Zen = Id,
  Yen = ss,
  Qen = lB,
  Jen = Qp,
  qen = G0,
  etn = Ale,
  h_e = Yen([].push),
  z_ = function (t) {
    var e = t == 1,
      n = t == 2,
      r = t == 3,
      i = t == 4,
      o = t == 6,
      l = t == 7,
      u = t == 5 || o;
    return function (c, d, h, f) {
      for (
        var p,
          g,
          y = Jen(c),
          v = Qen(y),
          b = Zen(d, h),
          w = qen(v),
          k = 0,
          D = f || etn,
          $ = e ? D(c, w) : n || l ? D(c, 0) : void 0;
        w > k;
        k++
      )
        if ((u || k in v) && ((g = b((p = v[k]), k, y)), t))
          if (e) $[k] = g;
          else if (g)
            switch (t) {
              case 3:
                return !0;
              case 5:
                return p;
              case 6:
                return k;
              case 2:
                h_e($, p);
            }
          else
            switch (t) {
              case 4:
                return !1;
              case 7:
                h_e($, p);
            }
      return o ? -1 : r || i ? i : $;
    };
  },
  SR = {
    forEach: z_(0),
    map: z_(1),
    filter: z_(2),
    some: z_(3),
    every: z_(4),
    find: z_(5),
    findIndex: z_(6),
    filterReject: z_(7),
  },
  w3 = ci,
  Ple = Dl,
  Mle = Vl,
  ttn = ss,
  qk = Ku,
  XA = ID,
  ntn = Zo,
  Yc = Zu,
  rtn = Pu,
  Tte = oh,
  yB = Ev,
  Cle = dB,
  itn = Jp,
  Ete = wE,
  xx = IE,
  vHe = gB,
  atn = d5,
  bHe = Ile,
  otn = h5,
  _He = AE,
  THe = Bf,
  stn = pB,
  EHe = sB,
  f_e = DE,
  ltn = f5,
  $le = DD,
  utn = mB,
  SHe = c5,
  p_e = cB,
  ctn = rl,
  dtn = p5,
  htn = Mu,
  ftn = mHe,
  ptn = vb,
  RHe = PE,
  vB = SR.forEach,
  Tf = utn("hidden"),
  $U = "Symbol",
  Lx = "prototype",
  gtn = RHe.set,
  g_e = RHe.getterFor($U),
  w0 = Object[Lx],
  mk = Ple.Symbol,
  $F = mk && mk[Lx],
  mtn = Ple.TypeError,
  Gz = Ple.QObject,
  AHe = _He.f,
  iS = THe.f,
  wHe = bHe.f,
  ytn = EHe.f,
  kHe = ttn([].push),
  Z1 = $le("symbols"),
  g5 = $le("op-symbols"),
  vtn = $le("wks"),
  Nz = !Gz || !Gz[Lx] || !Gz[Lx].findChild,
  Ste =
    qk &&
    ntn(function () {
      return (
        xx(
          iS({}, "a", {
            get: function () {
              return iS(this, "a", { value: 7 }).a;
            },
          })
        ).a != 7
      );
    })
      ? function (t, e, n) {
          var r = AHe(w0, e);
          r && delete w0[e], iS(t, e, n), r && t !== w0 && iS(w0, e, r);
        }
      : iS,
  Fz = function (t, e) {
    var n = (Z1[t] = xx($F));
    return (
      gtn(n, { type: $U, tag: t, description: e }), qk || (n.description = e), n
    );
  },
  Rte = function t(e, n, r) {
    e === w0 && t(g5, n, r), Tte(e);
    var i = Cle(n);
    return (
      Tte(r),
      Yc(Z1, i)
        ? (r.enumerable
            ? (Yc(e, Tf) && e[Tf][i] && (e[Tf][i] = !1),
              (r = xx(r, { enumerable: Ete(0, !1) })))
            : (Yc(e, Tf) || iS(e, Tf, Ete(1, {})), (e[Tf][i] = !0)),
          Ste(e, i, r))
        : iS(e, i, r)
    );
  },
  Ate = function (t, e) {
    var n;
    Tte(t);
    var r = yB(e),
      i = Ce((n = vHe(r))).call(n, DHe(r));
    return (
      vB(i, function (o) {
        (qk && !Mle(IHe, r, o)) || Rte(t, o, r[o]);
      }),
      t
    );
  },
  btn = function (t, e) {
    return e === void 0 ? xx(t) : Ate(xx(t), e);
  },
  IHe = function (t) {
    var e = Cle(t),
      n = Mle(ytn, this, e);
    return (
      !(this === w0 && Yc(Z1, e) && !Yc(g5, e)) &&
      (!(n || !Yc(this, e) || !Yc(Z1, e) || (Yc(this, Tf) && this[Tf][e])) || n)
    );
  },
  m_e = function (t, e) {
    var n = yB(t),
      r = Cle(e);
    if (n !== w0 || !Yc(Z1, r) || Yc(g5, r)) {
      var i = AHe(n, r);
      return (
        !i || !Yc(Z1, r) || (Yc(n, Tf) && n[Tf][r]) || (i.enumerable = !0), i
      );
    }
  },
  y_e = function (t) {
    var e = wHe(yB(t)),
      n = [];
    return (
      vB(e, function (r) {
        Yc(Z1, r) || Yc(SHe, r) || kHe(n, r);
      }),
      n
    );
  },
  DHe = function (t) {
    var e = t === w0,
      n = wHe(e ? g5 : yB(t)),
      r = [];
    return (
      vB(n, function (i) {
        !Yc(Z1, i) || (e && !Yc(w0, i)) || kHe(r, Z1[i]);
      }),
      r
    );
  };
XA ||
  (f_e(
    ($F = (mk = function () {
      if (rtn($F, this)) throw mtn("Symbol is not a constructor");
      var t =
          arguments.length && arguments[0] !== void 0
            ? itn(arguments[0])
            : void 0,
        e = p_e(t);
      return (
        qk &&
          Nz &&
          Ste(w0, e, {
            configurable: !0,
            set: function n(r) {
              this === w0 && Mle(n, g5, r),
                Yc(this, Tf) && Yc(this[Tf], e) && (this[Tf][e] = !1),
                Ste(this, e, Ete(1, r));
            },
          }),
        Fz(e, t)
      );
    })[Lx]),
    "toString",
    function () {
      return g_e(this).tag;
    }
  ),
  f_e(mk, "withoutSetter", function (t) {
    return Fz(p_e(t), t);
  }),
  (EHe.f = IHe),
  (THe.f = Rte),
  (stn.f = Ate),
  (_He.f = m_e),
  (atn.f = bHe.f = y_e),
  (otn.f = DHe),
  (dtn.f = function (t) {
    return Fz(ctn(t), t);
  }),
  qk &&
    ltn($F, "description", {
      configurable: !0,
      get: function () {
        return g_e(this).description;
      },
    })),
  w3(
    { global: !0, constructor: !0, wrap: !0, forced: !XA, sham: !XA },
    { Symbol: mk }
  ),
  vB(vHe(vtn), function (t) {
    htn(t);
  }),
  w3(
    { target: $U, stat: !0, forced: !XA },
    {
      useSetter: function () {
        Nz = !0;
      },
      useSimple: function () {
        Nz = !1;
      },
    }
  ),
  w3(
    { target: "Object", stat: !0, forced: !XA, sham: !qk },
    {
      create: btn,
      defineProperty: Rte,
      defineProperties: Ate,
      getOwnPropertyDescriptor: m_e,
    }
  ),
  w3({ target: "Object", stat: !0, forced: !XA }, { getOwnPropertyNames: y_e }),
  ftn(),
  ptn(mk, $U),
  (SHe[Tf] = !0);
var _tn = ID,
  PHe = _tn && !!wKt && !!GKt,
  Ttn = ci,
  Etn = kd,
  Stn = Zu,
  Rtn = Jp,
  MHe = DD,
  Atn = PHe,
  Uz = MHe("string-to-symbol-registry"),
  wtn = MHe("symbol-to-string-registry");
Ttn(
  { target: "Symbol", stat: !0, forced: !Atn },
  {
    for: function (t) {
      var e = Rtn(t);
      if (Stn(Uz, e)) return Uz[e];
      var n = Etn("Symbol")(e);
      return (Uz[e] = n), (wtn[n] = e), n;
    },
  }
);
var ktn = ci,
  Itn = Zu,
  Dtn = o5,
  Ptn = TR,
  Mtn = DD,
  Ctn = PHe,
  v_e = Mtn("symbol-to-string-registry");
ktn(
  { target: "Symbol", stat: !0, forced: !Ctn },
  {
    keyFor: function (t) {
      if (!Dtn(t)) throw TypeError(Ptn(t) + " is not a symbol");
      if (Itn(v_e, t)) return v_e[t];
    },
  }
);
var $tn = ss,
  m5 = $tn(jn([])),
  xtn = ss,
  b_e = ER,
  Ltn = Xl,
  __e = mb,
  Otn = Jp,
  T_e = xtn([].push),
  Gtn = function (t) {
    if (Ltn(t)) return t;
    if (b_e(t)) {
      for (var e = t.length, n = [], r = 0; r < e; r++) {
        var i = t[r];
        typeof i == "string"
          ? T_e(n, i)
          : (typeof i != "number" &&
              __e(i) != "Number" &&
              __e(i) != "String") ||
            T_e(n, Otn(i));
      }
      var o = n.length,
        l = !0;
      return function (u, c) {
        if (l) return (l = !1), c;
        if (b_e(this)) return c;
        for (var d = 0; d < o; d++) if (n[d] === u) return c;
      };
    }
  },
  Ntn = ci,
  CHe = kd,
  $He = a5,
  Ftn = Vl,
  y5 = ss,
  xHe = Zo,
  E_e = Xl,
  S_e = o5,
  LHe = m5,
  Utn = Gtn,
  Btn = ID,
  Htn = String,
  HT = CHe("JSON", "stringify"),
  k3 = y5(/./.exec),
  R_e = y5("".charAt),
  Xtn = y5("".charCodeAt),
  Vtn = y5("".replace),
  ztn = y5((1).toString),
  jtn = /[\uD800-\uDFFF]/g,
  A_e = /^[\uD800-\uDBFF]$/,
  w_e = /^[\uDC00-\uDFFF]$/,
  k_e =
    !Btn ||
    xHe(function () {
      var t = CHe("Symbol")();
      return (
        HT([t]) != "[null]" || HT({ a: t }) != "{}" || HT(Object(t)) != "{}"
      );
    }),
  I_e = xHe(function () {
    return (
      HT("\uDF06\uD834") !== '"\\udf06\\ud834"' || HT("\uDEAD") !== '"\\udead"'
    );
  }),
  Wtn = function (t, e) {
    var n = LHe(arguments),
      r = Utn(e);
    if (E_e(r) || (t !== void 0 && !S_e(t)))
      return (
        (n[1] = function (i, o) {
          if ((E_e(r) && (o = Ftn(r, this, Htn(i), o)), !S_e(o))) return o;
        }),
        $He(HT, null, n)
      );
  },
  Ktn = function (t, e, n) {
    var r = R_e(n, e - 1),
      i = R_e(n, e + 1);
    return (k3(A_e, t) && !k3(w_e, i)) || (k3(w_e, t) && !k3(A_e, r))
      ? "\\u" + ztn(Xtn(t, 0), 16)
      : t;
  };
HT &&
  Ntn(
    { target: "JSON", stat: !0, arity: 3, forced: k_e || I_e },
    {
      stringify: function (t, e, n) {
        var r = LHe(arguments),
          i = $He(k_e ? Wtn : HT, null, r);
        return I_e && typeof i == "string" ? Vtn(i, jtn, Ktn) : i;
      },
    }
  );
var Ztn = ci,
  Ytn = ID,
  Qtn = Zo,
  OHe = h5,
  Jtn = Qp,
  qtn =
    !Ytn ||
    Qtn(function () {
      OHe.f(1);
    });
Ztn(
  { target: "Object", stat: !0, forced: qtn },
  {
    getOwnPropertySymbols: function (t) {
      var e = OHe.f;
      return e ? e(Jtn(t)) : [];
    },
  }
);
var enn = Mu;
enn("asyncIterator");
var tnn = Mu;
tnn("hasInstance");
var nnn = Mu;
nnn("isConcatSpreadable");
var rnn = Mu;
rnn("iterator");
var inn = Mu;
inn("match");
var ann = Mu;
ann("matchAll");
var onn = Mu;
onn("replace");
var snn = Mu;
snn("search");
var lnn = Mu;
lnn("species");
var unn = Mu;
unn("split");
var cnn = Mu,
  dnn = mHe;
cnn("toPrimitive"), dnn();
var hnn = kd,
  fnn = Mu,
  pnn = vb;
fnn("toStringTag"), pnn(hnn("Symbol"), "Symbol");
var gnn = Mu;
gnn("unscopables");
var mnn = Dl,
  ynn = vb;
ynn(mnn.JSON, "JSON", !0);
var PS,
  D_e,
  P_e,
  vnn = Vs,
  bnn = vnn.Symbol,
  MD = {},
  wte = Ku,
  _nn = Zu,
  GHe = Function.prototype,
  Tnn = wte && ih,
  xle = _nn(GHe, "name"),
  Enn = xle && function () {}.name === "something",
  Snn = xle && (!wte || (wte && Tnn(GHe, "name").configurable)),
  NHe = { EXISTS: xle, PROPER: Enn, CONFIGURABLE: Snn },
  Rnn = Zo,
  FHe = !Rnn(function () {
    function t() {}
    return (t.prototype.constructor = null), MI(new t()) !== t.prototype;
  }),
  Ann = Zu,
  wnn = Xl,
  knn = Qp,
  Inn = mB,
  Dnn = FHe,
  M_e = Inn("IE_PROTO"),
  UHe = Object,
  Pnn = UHe.prototype,
  v5 = Dnn
    ? MI
    : function (t) {
        var e = knn(t);
        if (Ann(e, M_e)) return e[M_e];
        var n = e.constructor;
        return wnn(n) && e instanceof n
          ? n.prototype
          : e instanceof UHe
          ? Pnn
          : null;
      },
  Mnn = Zo,
  Cnn = Xl,
  $nn = fc,
  xnn = IE,
  C_e = v5,
  Lnn = DE,
  Onn = rl,
  kte = Onn("iterator"),
  BHe = !1;
hv([]) &&
  ("next" in (P_e = hv((wbe = [])).call(wbe))
    ? (D_e = C_e(C_e(P_e))) !== Object.prototype && (PS = D_e)
    : (BHe = !0));
var Gnn =
  !$nn(PS) ||
  Mnn(function () {
    var t = {};
    return PS[kte].call(t) !== t;
  });
Cnn((PS = Gnn ? {} : xnn(PS))[kte]) ||
  Lnn(PS, kte, function () {
    return this;
  });
var HHe = { IteratorPrototype: PS, BUGGY_SAFARI_ITERATORS: BHe },
  Nnn = HHe.IteratorPrototype,
  Fnn = IE,
  Unn = wE,
  Bnn = vb,
  Hnn = MD,
  Xnn = function () {
    return this;
  },
  XHe = function (t, e, n, r) {
    var i = e + " Iterator";
    return (
      (t.prototype = Fnn(Nnn, { next: Unn(+!r, n) })),
      Bnn(t, i, !1, !0),
      (Hnn[i] = Xnn),
      t
    );
  },
  Vnn = ss,
  znn = nd,
  jnn = function (t, e, n) {
    try {
      return Vnn(znn(ih(t, e)[n]));
    } catch {}
  },
  Wnn = Xl,
  Knn = String,
  Znn = TypeError,
  Ynn = function (t) {
    if (ti(t) == "object" || Wnn(t)) return t;
    throw Znn("Can't set " + Knn(t) + " as a prototype");
  },
  Qnn = jnn,
  Jnn = oh,
  qnn = Ynn,
  VHe =
    W6 ||
    ("__proto__" in {}
      ? (function () {
          var t,
            e = !1,
            n = {};
          try {
            (t = Qnn(Object.prototype, "__proto__", "set"))(n, []),
              (e = n instanceof Array);
          } catch {}
          return function (r, i) {
            return Jnn(r), qnn(i), e ? t(r, i) : (r.__proto__ = i), r;
          };
        })()
      : void 0),
  ern = ci,
  trn = Vl,
  nrn = NHe,
  rrn = XHe,
  irn = v5,
  arn = vb,
  $_e = DE,
  orn = rl,
  x_e = MD,
  srn = HHe,
  lrn = nrn.PROPER,
  I3 = srn.BUGGY_SAFARI_ITERATORS,
  Bz = orn("iterator"),
  L_e = "keys",
  D3 = "values",
  O_e = "entries",
  urn = function () {
    return this;
  },
  Lle = function (t, e, n, r, i, o, l) {
    rrn(n, e, r);
    var u,
      c,
      d,
      h = function (w) {
        if (w === i && v) return v;
        if (!I3 && w in g) return g[w];
        switch (w) {
          case L_e:
          case D3:
          case O_e:
            return function () {
              return new n(this, w);
            };
        }
        return function () {
          return new n(this);
        };
      },
      f = e + " Iterator",
      p = !1,
      g = t.prototype,
      y = g[Bz] || g["@@iterator"] || (i && g[i]),
      v = (!I3 && y) || h(i),
      b = (e == "Array" && $s(g)) || y;
    if (
      (b &&
        (u = irn(b.call(new t()))) !== Object.prototype &&
        u.next &&
        (arn(u, f, !0, !0), (x_e[f] = urn)),
      lrn &&
        i == D3 &&
        y &&
        y.name !== D3 &&
        ((p = !0),
        (v = function () {
          return trn(y, this);
        })),
      i)
    )
      if (((c = { values: h(D3), keys: o ? v : h(L_e), entries: h(O_e) }), l))
        for (d in c) (I3 || p || !(d in g)) && $_e(g, d, c[d]);
      else ern({ target: e, proto: !0, forced: I3 || p }, c);
    return l && g[Bz] !== v && $_e(g, Bz, v, { name: i }), (x_e[e] = v), c;
  },
  Ole = function (t, e) {
    return { value: t, done: e };
  },
  crn = Ev,
  G_e = MD,
  zHe = PE;
Bf.f;
var drn = Lle,
  N_e = Ole,
  jHe = "Array Iterator",
  hrn = zHe.set,
  frn = zHe.getterFor(jHe);
drn(
  Array,
  "Array",
  function (t, e) {
    hrn(this, { type: jHe, target: crn(t), index: 0, kind: e });
  },
  function () {
    var t = frn(this),
      e = t.target,
      n = t.kind,
      r = t.index++;
    return !e || r >= e.length
      ? ((t.target = void 0), N_e(void 0, !0))
      : N_e(n == "keys" ? r : n == "values" ? e[r] : [r, e[r]], !1);
  },
  "values"
),
  (G_e.Arguments = G_e.Array);
var prn = {
    CSSRuleList: 0,
    CSSStyleDeclaration: 0,
    CSSValueList: 0,
    ClientRectList: 0,
    DOMRectList: 0,
    DOMStringList: 0,
    DOMTokenList: 1,
    DataTransferItemList: 0,
    FileList: 0,
    HTMLAllCollection: 0,
    HTMLCollection: 0,
    HTMLFormElement: 0,
    HTMLSelectElement: 0,
    MediaList: 0,
    MimeTypeArray: 0,
    NamedNodeMap: 0,
    NodeList: 1,
    PaintRequestList: 0,
    Plugin: 0,
    PluginArray: 0,
    SVGLengthList: 0,
    SVGNumberList: 0,
    SVGPathSegList: 0,
    SVGPointList: 0,
    SVGStringList: 0,
    SVGTransformList: 0,
    SourceBufferList: 0,
    StyleSheetList: 0,
    TextTrackCueList: 0,
    TextTrackList: 0,
    TouchList: 0,
  },
  grn = prn,
  mrn = Dl,
  yrn = kE,
  vrn = yb,
  F_e = MD,
  brn = rl,
  U_e = brn("toStringTag");
for (var Hz in grn) {
  var B_e = mrn[Hz],
    Xz = B_e && B_e.prototype;
  Xz && yrn(Xz) !== U_e && vrn(Xz, U_e, Hz), (F_e[Hz] = F_e.Array);
}
var _rn = bnn,
  Trn = _rn,
  Ern = rl,
  Srn = Bf.f,
  H_e = Ern("metadata"),
  X_e = Function.prototype;
X_e[H_e] === void 0 && Srn(X_e, H_e, { value: null });
var Rrn = Mu;
Rrn("dispose");
var Arn = Mu;
Arn("metadata");
var wrn = Trn,
  krn = wrn,
  Irn = Mu;
Irn("asyncDispose");
var Drn = kd,
  Prn = ss,
  Gle = Drn("Symbol"),
  Mrn = Gle.keyFor,
  Crn = Prn(Gle.prototype.valueOf),
  WHe =
    Gle.isRegisteredSymbol ||
    function (t) {
      try {
        return Mrn(Crn(t)) !== void 0;
      } catch {
        return !1;
      }
    },
  $rn = ci,
  xrn = WHe;
$rn({ target: "Symbol", stat: !0 }, { isRegisteredSymbol: xrn });
for (
  var Lrn = DD,
    V_e = kd,
    Orn = ss,
    Grn = o5,
    Nrn = rl,
    P3 = V_e("Symbol"),
    z_e = P3.isWellKnownSymbol,
    KHe = V_e("Object", "getOwnPropertyNames"),
    Frn = Orn(P3.prototype.valueOf),
    j_e = Lrn("wks"),
    Vz = 0,
    W_e = KHe(P3),
    Urn = W_e.length;
  Vz < Urn;
  Vz++
)
  try {
    var K_e = W_e[Vz];
    Grn(P3[K_e]) && Nrn(K_e);
  } catch {}
var ZHe = function (t) {
    if (z_e && z_e(t)) return !0;
    try {
      for (var e = Frn(t), n = 0, r = KHe(j_e), i = r.length; n < i; n++)
        if (j_e[r[n]] == e) return !0;
    } catch {}
    return !1;
  },
  Brn = ci,
  Hrn = ZHe;
Brn({ target: "Symbol", stat: !0, forced: !0 }, { isWellKnownSymbol: Hrn });
var Xrn = Mu;
Xrn("matcher");
var Vrn = Mu;
Vrn("observable");
var zrn = ci,
  jrn = WHe;
zrn(
  { target: "Symbol", stat: !0, name: "isRegisteredSymbol" },
  { isRegistered: jrn }
);
var Wrn = ci,
  Krn = ZHe;
Wrn(
  { target: "Symbol", stat: !0, name: "isWellKnownSymbol", forced: !0 },
  { isWellKnown: Krn }
);
var Zrn = Mu;
Zrn("metadataKey");
var Yrn = Mu;
Yrn("patternMatch");
var Qrn = Mu;
Qrn("replaceAll");
var Jrn = krn,
  qrn = Jrn,
  ein = qrn,
  yk = Ea(ein),
  Nle = ss,
  tin = hB,
  nin = Jp,
  rin = kD,
  iin = Nle("".charAt),
  Z_e = Nle("".charCodeAt),
  ain = Nle(jn("")),
  Y_e = function (t) {
    return function (e, n) {
      var r,
        i,
        o = nin(rin(e)),
        l = tin(n),
        u = o.length;
      return l < 0 || l >= u
        ? t
          ? ""
          : void 0
        : (r = Z_e(o, l)) < 55296 ||
          r > 56319 ||
          l + 1 === u ||
          (i = Z_e(o, l + 1)) < 56320 ||
          i > 57343
        ? t
          ? iin(o, l)
          : r
        : t
        ? ain(o, l, l + 2)
        : i - 56320 + ((r - 55296) << 10) + 65536;
    };
  },
  YHe = { codeAt: Y_e(!1), charAt: Y_e(!0) },
  oin = YHe.charAt,
  sin = Jp,
  QHe = PE,
  lin = Lle,
  Q_e = Ole,
  JHe = "String Iterator",
  uin = QHe.set,
  cin = QHe.getterFor(JHe);
lin(
  String,
  "String",
  function (t) {
    uin(this, { type: JHe, string: sin(t), index: 0 });
  },
  function () {
    var t,
      e = cin(this),
      n = e.string,
      r = e.index;
    return r >= n.length
      ? Q_e(void 0, !0)
      : ((t = oin(n, r)), (e.index += t.length), Q_e(t, !1));
  }
);
var din = p5,
  hin = din.f("iterator"),
  fin = hin,
  pin = fin,
  gin = pin,
  min = gin,
  yin = min,
  vin = yin,
  bin = vin,
  _in = Ea(bin);
function Cc(t) {
  return (Cc =
    typeof yk == "function" && ti(_in) == "symbol"
      ? function (e) {
          return ti(e);
        }
      : function (e) {
          return e &&
            typeof yk == "function" &&
            e.constructor === yk &&
            e !== yk.prototype
            ? "symbol"
            : ti(e);
        })(t);
}
var Tin = ci,
  Ein = Qp,
  qHe = gB,
  Sin = Zo,
  Rin = Sin(function () {
    qHe(1);
  });
Tin(
  { target: "Object", stat: !0, forced: Rin },
  {
    keys: function (t) {
      return qHe(Ein(t));
    },
  }
);
var Ain = Vs,
  win = hv(Ain.Object),
  kin = win,
  Iin = kin,
  Din = Iin,
  Pin = Din,
  Min = Pin,
  Cin = Min,
  e7e = Cin,
  $in = Ea(e7e),
  xin = Vs,
  Lin = xin.Object.getOwnPropertySymbols,
  Oin = Lin,
  Gin = Oin,
  Nin = Gin,
  Fin = Nin,
  Uin = Fin,
  Bin = Uin,
  Hin = Bin,
  J_e = Ea(Hin),
  Xin = ci,
  Vin = _r(SR),
  zin = l5,
  jin = zin("filter");
Xin(
  { target: "Array", proto: !0, forced: !jin },
  {
    filter: function (t) {
      return Vin(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Win = Vs,
  rd = function (t) {
    return Win[t + "Prototype"];
  },
  Kin = rd,
  Zin = _r(Kin("Array")),
  Yin = Pu,
  Qin = Zin,
  zz = Array.prototype,
  Jin = function (t) {
    var e = _r(t);
    return t === zz || (Yin(zz, t) && e === _r(zz)) ? Qin : e;
  },
  qin = Jin,
  ean = qin,
  tan = ean,
  nan = tan,
  ran = nan,
  ian = ran,
  t7e = ian,
  aan = Ea(t7e),
  n7e = { exports: {} },
  oan = ci,
  san = Zo,
  lan = Ev,
  r7e = AE.f,
  i7e = Ku,
  uan =
    !i7e ||
    san(function () {
      r7e(1);
    });
oan(
  { target: "Object", stat: !0, forced: uan, sham: !i7e },
  {
    getOwnPropertyDescriptor: function (t, e) {
      return r7e(lan(t), e);
    },
  }
);
var can = Vs,
  a7e = can.Object,
  dan = (n7e.exports = function (t, e) {
    return a7e.getOwnPropertyDescriptor(t, e);
  });
a7e.getOwnPropertyDescriptor.sham && (dan.sham = !0);
var han = n7e.exports,
  fan = han,
  pan = fan,
  gan = pan,
  man = gan,
  yan = man,
  van = yan,
  ban = van,
  Fle = Ea(ban),
  _an = Ku,
  Tan = ER,
  Ean = TypeError,
  San = ih,
  Ran =
    _an &&
    !(function () {
      if (this !== void 0) return !0;
      try {
        ea([], "length", { writable: !1 }).length = 1;
      } catch (t) {
        return t instanceof TypeError;
      }
    })(),
  o7e = Ran
    ? function (t, e) {
        if (Tan(t) && !San(t, "length").writable)
          throw Ean("Cannot set read only .length");
        return (t.length = e);
      }
    : function (t, e) {
        return (t.length = e);
      },
  Aan = ci,
  wan = Qp,
  kan = G0,
  Ian = o7e,
  Dan = Ele,
  Pan = Zo,
  Man = Pan(function () {
    return [].push.call({ length: 4294967296 }, 1) !== 4294967297;
  }),
  Can = function () {
    try {
      ea([], "length", { writable: !1 }).push();
    } catch (t) {
      return t instanceof TypeError;
    }
  },
  $an = Man || !Can();
Aan(
  { target: "Array", proto: !0, arity: 1, forced: $an },
  {
    push: function (t) {
      var e = wan(this),
        n = kan(e),
        r = arguments.length;
      Dan(n + r);
      for (var i = 0; i < r; i++) (e[n] = arguments[i]), n++;
      return Ian(e, n), n;
    },
  }
);
var xan = rd,
  Lan = xan("Array").push,
  Oan = Pu,
  Gan = Lan,
  jz = Array.prototype,
  Nan = function (t) {
    var e = t.push;
    return t === jz || (Oan(jz, t) && e === jz.push) ? Gan : e;
  },
  Fan = Nan,
  Uan = Fan,
  Ban = Uan,
  Han = Ban,
  Xan = Han,
  Van = Xan,
  zan = Van,
  xU = Ea(zan),
  jan = Zo,
  bB = function (t, e) {
    var n = [][t];
    return (
      !!n &&
      jan(function () {
        n.call(
          null,
          e ||
            function () {
              return 1;
            },
          1
        );
      })
    );
  },
  Wan = SR.forEach,
  Kan = bB,
  Zan = Kan("forEach"),
  q_e = Zan
    ? [].forEach
    : function (t) {
        return Wan(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
  Yan = ci;
Yan(
  { target: "Array", proto: !0, forced: [].forEach != q_e },
  { forEach: q_e }
);
var Qan = rd,
  Jan = Qan("Array").forEach,
  qan = Jan,
  eon = qan,
  ton = kE,
  non = Zu,
  ron = Pu,
  ion = eon,
  Wz = Array.prototype,
  aon = { DOMTokenList: !0, NodeList: !0 },
  oon = function (t) {
    var e = t.forEach;
    return t === Wz || (ron(Wz, t) && e === Wz.forEach) || non(aon, ton(t))
      ? ion
      : e;
  },
  son = oon,
  lon = son,
  uon = lon,
  con = uon,
  s7e = con,
  u$ = Ea(s7e),
  don = kd,
  hon = ss,
  fon = d5,
  pon = h5,
  gon = oh,
  mon = hon(Ce([])),
  l7e =
    don("Reflect", "ownKeys") ||
    function (t) {
      var e = fon.f(gon(t)),
        n = pon.f;
      return n ? mon(e, n(t)) : e;
    },
  yon = ci,
  von = Ku,
  bon = l7e,
  _on = Ev,
  Ton = AE,
  Eon = PD;
yon(
  { target: "Object", stat: !0, sham: !von },
  {
    getOwnPropertyDescriptors: function (t) {
      for (
        var e, n, r = _on(t), i = Ton.f, o = bon(r), l = {}, u = 0;
        o.length > u;

      )
        (n = i(r, (e = o[u++]))) !== void 0 && Eon(l, e, n);
      return l;
    },
  }
);
var Son = Vs,
  Ron = Son.Object.getOwnPropertyDescriptors,
  Aon = Ron,
  won = Aon,
  kon = won,
  Ion = kon,
  Don = Ion,
  Pon = Don,
  Mon = Pon,
  eTe = Ea(Mon),
  u7e = { exports: {} },
  Con = ci,
  $on = Ku,
  tTe = pB.f;
Con(
  { target: "Object", stat: !0, forced: SD !== tTe, sham: !$on },
  { defineProperties: tTe }
);
var xon = Vs,
  c7e = xon.Object,
  Lon = (u7e.exports = function (t, e) {
    return c7e.defineProperties(t, e);
  });
c7e.defineProperties.sham && (Lon.sham = !0);
var Oon = u7e.exports,
  Gon = Oon,
  Non = Gon,
  Fon = Non,
  Uon = Fon,
  Bon = Uon,
  Hon = Bon,
  Xon = Hon,
  Von = Ea(Xon),
  d7e = { exports: {} },
  zon = ci,
  jon = Ku,
  nTe = Bf.f;
zon(
  { target: "Object", stat: !0, forced: ea !== nTe, sham: !jon },
  { defineProperty: nTe }
);
var Won = Vs,
  h7e = Won.Object,
  Kon = (d7e.exports = function (t, e, n) {
    return h7e.defineProperty(t, e, n);
  });
h7e.defineProperty.sham && (Kon.sham = !0);
var Zon = d7e.exports,
  Yon = Zon,
  Qon = Yon,
  Jon = Qon,
  qon = Jon,
  esn = qon,
  tsn = esn,
  f7e = tsn,
  zS = Ea(f7e),
  nsn = p5,
  rsn = nsn.f("toPrimitive"),
  isn = rsn,
  asn = isn,
  osn = asn,
  ssn = osn,
  lsn = ssn,
  usn = lsn,
  csn = usn,
  dsn = Ea(csn);
function hsn(t, e) {
  if (Cc(t) !== "object" || t === null) return t;
  var n = t[dsn];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (Cc(r) !== "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function p7e(t) {
  var e = hsn(t, "string");
  return Cc(e) === "symbol" ? e : String(e);
}
function ca(t, e, n) {
  return (
    (e = p7e(e)) in t
      ? zS(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 })
      : (t[e] = n),
    t
  );
}
function rTe(t, e) {
  var n = $in(t);
  if (J_e) {
    var r = J_e(t);
    e &&
      (r = aan(r).call(r, function (i) {
        return Fle(t, i).enumerable;
      })),
      xU(n).apply(n, r);
  }
  return n;
}
function Jo(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n,
      r,
      i = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? u$((n = rTe(Object(i), !0))).call(n, function (o) {
          ca(t, o, i[o]);
        })
      : eTe
      ? Von(t, eTe(i))
      : u$((r = rTe(Object(i)))).call(r, function (o) {
          zS(t, o, Fle(i, o));
        });
  }
  return t;
}
var fsn = ci,
  psn = Ku,
  gsn = IE;
fsn({ target: "Object", stat: !0, sham: !psn }, { create: gsn });
var msn = Vs,
  ysn = msn.Object,
  vsn = function (t, e) {
    return ysn.create(t, e);
  },
  bsn = vsn,
  _sn = bsn,
  Tsn = _sn,
  Esn = Tsn,
  Ssn = Esn,
  Rsn = Ssn,
  Asn = Rsn,
  xF = Ea(Asn),
  wsn = ci,
  ksn = Zo,
  Isn = Qp,
  g7e = v5,
  Dsn = FHe,
  Psn = ksn(function () {
    g7e(1);
  });
wsn(
  { target: "Object", stat: !0, forced: Psn, sham: !Dsn },
  {
    getPrototypeOf: function (t) {
      return g7e(Isn(t));
    },
  }
);
var Msn = Vs,
  Csn = Msn.Object.getPrototypeOf,
  $sn = Csn,
  xsn = $sn,
  Lsn = xsn,
  Osn = Lsn,
  Gsn = Osn,
  Nsn = Gsn,
  Fsn = Nsn,
  c$ = Ea(Fsn),
  Usn = ci,
  Bsn = VHe;
Usn({ target: "Object", stat: !0 }, { setPrototypeOf: Bsn });
var Hsn = Vs,
  Xsn = Hsn.Object.setPrototypeOf,
  Vsn = Xsn,
  zsn = Vsn,
  jsn = zsn,
  Wsn = jsn,
  Ksn = Wsn,
  Zsn = Ksn,
  Ysn = Zsn,
  Ox = Ea(Ysn),
  iTe = Zu,
  Qsn = l7e,
  Jsn = AE,
  qsn = Bf,
  eln = function (t, e, n) {
    for (var r = Qsn(e), i = qsn.f, o = Jsn.f, l = 0; l < r.length; l++) {
      var u = r[l];
      iTe(t, u) || (n && iTe(n, u)) || i(t, u, o(e, u));
    }
  },
  tln = fc,
  nln = yb,
  rln = function (t, e) {
    tln(e) && "cause" in e && nln(t, "cause", e.cause);
  },
  iln = ss,
  m7e = Error,
  aln = iln("".replace),
  oln = String(m7e("zxcasd").stack),
  y7e = /\n\s*at [^:]*:[^\n]*/,
  sln = y7e.test(oln),
  lln = function (t, e) {
    if (sln && typeof t == "string" && !m7e.prepareStackTrace)
      for (; e--; ) t = aln(t, y7e, "");
    return t;
  },
  uln = Zo,
  cln = wE,
  dln = !uln(function () {
    var t = Error("a");
    return !("stack" in t) || (ea(t, "stack", cln(1, 7)), t.stack !== 7);
  }),
  hln = yb,
  fln = lln,
  pln = dln,
  aTe = Error.captureStackTrace,
  gln = function (t, e, n, r) {
    pln && (aTe ? aTe(t, e) : hln(t, "stack", fln(n, r)));
  },
  mln = rl,
  yln = MD,
  vln = mln("iterator"),
  bln = Array.prototype,
  v7e = function (t) {
    return t !== void 0 && (yln.Array === t || bln[vln] === t);
  },
  _ln = kE,
  oTe = ble,
  Tln = wD,
  Eln = MD,
  Sln = rl,
  Rln = Sln("iterator"),
  _B = function (t) {
    if (!Tln(t)) return oTe(t, Rln) || oTe(t, "@@iterator") || Eln[_ln(t)];
  },
  Aln = Vl,
  wln = nd,
  kln = oh,
  Iln = TR,
  Dln = _B,
  Pln = TypeError,
  Ule = function (t, e) {
    var n = arguments.length < 2 ? Dln(t) : e;
    if (wln(n)) return kln(Aln(n, t));
    throw Pln(Iln(t) + " is not iterable");
  },
  Mln = Vl,
  sTe = oh,
  Cln = ble,
  b7e = function (t, e, n) {
    var r, i;
    sTe(t);
    try {
      if (!(r = Cln(t, "return"))) {
        if (e === "throw") throw n;
        return n;
      }
      r = Mln(r, t);
    } catch (o) {
      (i = !0), (r = o);
    }
    if (e === "throw") throw n;
    if (i) throw r;
    return sTe(r), n;
  },
  $ln = Id,
  xln = Vl,
  Lln = oh,
  Oln = TR,
  Gln = v7e,
  Nln = G0,
  lTe = Pu,
  Fln = Ule,
  Uln = _B,
  uTe = b7e,
  Bln = TypeError,
  LF = function (t, e) {
    (this.stopped = t), (this.result = e);
  },
  cTe = LF.prototype,
  N0 = function (t, e, n) {
    var r,
      i,
      o,
      l,
      u,
      c,
      d,
      h = n && n.that,
      f = !(!n || !n.AS_ENTRIES),
      p = !(!n || !n.IS_RECORD),
      g = !(!n || !n.IS_ITERATOR),
      y = !(!n || !n.INTERRUPTED),
      v = $ln(e, h),
      b = function (k) {
        return r && uTe(r, "normal", k), new LF(!0, k);
      },
      w = function (k) {
        return f
          ? (Lln(k), y ? v(k[0], k[1], b) : v(k[0], k[1]))
          : y
          ? v(k, b)
          : v(k);
      };
    if (p) r = t.iterator;
    else if (g) r = t;
    else {
      if (!(i = Uln(t))) throw Bln(Oln(t) + " is not iterable");
      if (Gln(i)) {
        for (o = 0, l = Nln(t); l > o; o++)
          if ((u = w(t[o])) && lTe(cTe, u)) return u;
        return new LF(!1);
      }
      r = Fln(t, i);
    }
    for (c = p ? t.next : r.next; !(d = xln(c, r)).done; ) {
      try {
        u = w(d.value);
      } catch (k) {
        uTe(r, "throw", k);
      }
      if (ti(u) == "object" && u && lTe(cTe, u)) return u;
    }
    return new LF(!1);
  },
  Hln = Jp,
  Xln = function (t, e) {
    return t === void 0 ? (arguments.length < 2 ? "" : e) : Hln(t);
  },
  Vln = ci,
  zln = Pu,
  jln = v5,
  LU = VHe,
  Wln = eln,
  _7e = IE,
  Kz = yb,
  Zz = wE,
  Kln = rln,
  Zln = gln,
  Yln = N0,
  Qln = Xln,
  Jln = rl,
  qln = Jln("toStringTag"),
  OU = Error,
  eun = [].push,
  Gx = function t(e, n) {
    var r,
      i = zln(Yz, this);
    LU
      ? (r = LU(OU(), i ? jln(this) : Yz))
      : ((r = i ? this : _7e(Yz)), Kz(r, qln, "Error")),
      n !== void 0 && Kz(r, "message", Qln(n)),
      Zln(r, t, r.stack, 1),
      arguments.length > 2 && Kln(r, arguments[2]);
    var o = [];
    return Yln(e, eun, { that: o }), Kz(r, "errors", o), r;
  };
LU ? LU(Gx, OU) : Wln(Gx, OU, { name: !0 });
var Yz = (Gx.prototype = _7e(OU.prototype, {
  constructor: Zz(1, Gx),
  message: Zz(1, ""),
  name: Zz(1, "AggregateError"),
}));
Vln({ global: !0, constructor: !0, arity: 2 }, { AggregateError: Gx });
var Nx,
  VA,
  dTe,
  Qz,
  tun = mb,
  b5 = typeof process < "u" && tun(process) == "process",
  nun = kd,
  run = f5,
  iun = rl,
  aun = Ku,
  hTe = iun("species"),
  T7e = function (t) {
    var e = nun(t);
    aun &&
      e &&
      !e[hTe] &&
      run(e, hTe, {
        configurable: !0,
        get: function () {
          return this;
        },
      });
  },
  oun = Pu,
  sun = TypeError,
  _5 = function (t, e) {
    if (oun(e, t)) return t;
    throw sun("Incorrect invocation");
  },
  lun = fB,
  uun = TR,
  cun = TypeError,
  Ble = function (t) {
    if (lun(t)) return t;
    throw cun(uun(t) + " is not a constructor");
  },
  fTe = oh,
  dun = Ble,
  hun = wD,
  fun = rl,
  pun = fun("species"),
  E7e = function (t, e) {
    var n,
      r = fTe(t).constructor;
    return r === void 0 || hun((n = fTe(r)[pun])) ? e : dun(n);
  },
  gun = TypeError,
  TB = function (t, e) {
    if (t < e) throw gun("Not enough arguments");
    return t;
  },
  mun = uB,
  S7e = /(?:ipad|iphone|ipod).*applewebkit/i.test(mun),
  Up = Dl,
  yun = a5,
  vun = Id,
  pTe = Xl,
  bun = Zu,
  R7e = Zo,
  gTe = dHe,
  _un = m5,
  mTe = Tle,
  Tun = TB,
  Eun = S7e,
  Sun = b5,
  Ite = Up.setImmediate,
  Dte = Up.clearImmediate,
  Run = Up.process,
  Jz = Up.Dispatch,
  Aun = Up.Function,
  yTe = Up.MessageChannel,
  wun = Up.String,
  qz = 0,
  d$ = {},
  vTe = "onreadystatechange";
R7e(function () {
  Nx = Up.location;
});
var Hle = function (t) {
    if (bun(d$, t)) {
      var e = d$[t];
      delete d$[t], e();
    }
  },
  ej = function (t) {
    return function () {
      Hle(t);
    };
  },
  bTe = function (t) {
    Hle(t.data);
  },
  _Te = function (t) {
    Up.postMessage(wun(t), Nx.protocol + "//" + Nx.host);
  };
(Ite && Dte) ||
  ((Ite = function (t) {
    Tun(arguments.length, 1);
    var e = pTe(t) ? t : Aun(t),
      n = _un(arguments, 1);
    return (
      (d$[++qz] = function () {
        yun(e, void 0, n);
      }),
      VA(qz),
      qz
    );
  }),
  (Dte = function (t) {
    delete d$[t];
  }),
  Sun
    ? (VA = function (t) {
        Run.nextTick(ej(t));
      })
    : Jz && Jz.now
    ? (VA = function (t) {
        Jz.now(ej(t));
      })
    : yTe && !Eun
    ? ((Qz = (dTe = new yTe()).port2),
      (dTe.port1.onmessage = bTe),
      (VA = vun(Qz.postMessage, Qz)))
    : Up.addEventListener &&
      pTe(Up.postMessage) &&
      !Up.importScripts &&
      Nx &&
      Nx.protocol !== "file:" &&
      !R7e(_Te)
    ? ((VA = _Te), Up.addEventListener("message", bTe, !1))
    : (VA =
        vTe in mTe("script")
          ? function (t) {
              gTe.appendChild(mTe("script"))[vTe] = function () {
                gTe.removeChild(this), Hle(t);
              };
            }
          : function (t) {
              setTimeout(ej(t), 0);
            }));
var A7e = { set: Ite, clear: Dte },
  w7e = function () {
    (this.head = null), (this.tail = null);
  };
w7e.prototype = {
  add: function (t) {
    var e = { item: t, next: null },
      n = this.tail;
    n ? (n.next = e) : (this.head = e), (this.tail = e);
  },
  get: function () {
    var t = this.head;
    if (t) return (this.head = t.next) === null && (this.tail = null), t.item;
  },
};
var zA,
  tj,
  nj,
  rj,
  TTe,
  k7e = w7e,
  kun = uB,
  Iun = /ipad|iphone|ipod/i.test(kun) && typeof Pebble < "u",
  Dun = uB,
  Pun = /web0s(?!.*chrome)/i.test(Dun),
  jS = Dl,
  ETe = Id,
  Mun = AE.f,
  ij = A7e.set,
  Cun = k7e,
  $un = S7e,
  xun = Iun,
  Lun = Pun,
  aj = b5,
  STe = jS.MutationObserver || jS.WebKitMutationObserver,
  RTe = jS.document,
  ATe = jS.process,
  M3 = jS.Promise,
  wTe = Mun(jS, "queueMicrotask"),
  Pte = wTe && wTe.value;
if (!Pte) {
  var C3 = new Cun(),
    $3 = function () {
      var t, e;
      for (aj && (t = ATe.domain) && t.exit(); (e = C3.get()); )
        try {
          e();
        } catch (n) {
          throw (C3.head && zA(), n);
        }
      t && t.enter();
    };
  $un || aj || Lun || !STe || !RTe
    ? !xun && M3 && M3.resolve
      ? (((rj = M3.resolve(void 0)).constructor = M3),
        (TTe = ETe(rj.then, rj)),
        (zA = function () {
          TTe($3);
        }))
      : aj
      ? (zA = function () {
          ATe.nextTick($3);
        })
      : ((ij = ETe(ij, jS)),
        (zA = function () {
          ij($3);
        }))
    : ((tj = !0),
      (nj = RTe.createTextNode("")),
      new STe($3).observe(nj, { characterData: !0 }),
      (zA = function () {
        nj.data = tj = !tj;
      })),
    (Pte = function (t) {
      C3.head || zA(), C3.add(t);
    });
}
var Oun = Pte,
  Gun = function (t, e) {
    try {
      arguments.length == 1 ? console.error(t) : console.error(t, e);
    } catch {}
  },
  CD = function (t) {
    try {
      return { error: !1, value: t() };
    } catch (e) {
      return { error: !0, value: e };
    }
  },
  Nun = Dl,
  WS = Nun.Promise,
  I7e =
    (typeof Deno > "u" ? "undefined" : ti(Deno)) == "object" &&
    Deno &&
    ti(Deno.version) == "object",
  Fun = I7e,
  Uun = b5,
  Hun =
    !Fun &&
    !Uun &&
    (typeof window > "u" ? "undefined" : ti(window)) == "object" &&
    (typeof document > "u" ? "undefined" : ti(document)) == "object",
  Xun = Dl,
  h$ = WS,
  Vun = Xl,
  zun = tHe,
  jun = iHe,
  Wun = rl,
  Kun = Hun,
  Zun = I7e,
  oj = XI,
  kTe = h$ && h$.prototype,
  Yun = Wun("species"),
  D7e = !1,
  P7e = Vun(Xun.PromiseRejectionEvent),
  Qun = zun("Promise", function () {
    var t = jun(h$),
      e = t !== String(h$);
    if ((!e && oj === 66) || !kTe.catch || !kTe.finally) return !0;
    if (!oj || oj < 51 || !/native code/.test(t)) {
      var n = new h$(function (i) {
          i(1);
        }),
        r = function (i) {
          i(
            function () {},
            function () {}
          );
        };
      if (
        (((n.constructor = {})[Yun] = r),
        !(D7e = n.then(function () {}) instanceof r))
      )
        return !0;
    }
    return !e && (Kun || Zun) && !P7e;
  }),
  T5 = { CONSTRUCTOR: Qun, REJECTION_EVENT: P7e, SUBCLASSING: D7e },
  Sv = {},
  ITe = nd,
  Jun = TypeError,
  qun = function (t) {
    var e, n;
    (this.promise = new t(function (r, i) {
      if (e !== void 0 || n !== void 0) throw Jun("Bad Promise constructor");
      (e = r), (n = i);
    })),
      (this.resolve = ITe(e)),
      (this.reject = ITe(n));
  };
Sv.f = function (t) {
  return new qun(t);
};
var sj,
  DTe,
  ecn,
  tcn = ci,
  GU = b5,
  iE = Dl,
  E5 = Vl,
  ncn = DE,
  rcn = vb,
  icn = T7e,
  acn = nd,
  Mte = Xl,
  ocn = fc,
  scn = _5,
  lcn = E7e,
  M7e = A7e.set,
  Xle = Oun,
  ucn = Gun,
  ccn = CD,
  dcn = k7e,
  C7e = PE,
  Cte = WS,
  $7e = T5,
  x7e = Sv,
  OF = "Promise",
  PTe = $7e.CONSTRUCTOR,
  hcn = $7e.REJECTION_EVENT,
  lj = C7e.getterFor(OF),
  fcn = C7e.set,
  pcn = Cte && Cte.prototype,
  iM = Cte,
  uj = pcn,
  L7e = iE.TypeError,
  $te = iE.document,
  Vle = iE.process,
  xte = x7e.f,
  gcn = xte,
  mcn = !!($te && $te.createEvent && iE.dispatchEvent),
  O7e = "unhandledrejection",
  ycn = "rejectionhandled",
  MTe = 0,
  G7e = 1,
  vcn = 2,
  zle = 1,
  N7e = 2,
  F7e = function (t) {
    var e;
    return !(!ocn(t) || !Mte((e = t.then))) && e;
  },
  U7e = function (t, e) {
    var n,
      r,
      i,
      o = e.value,
      l = e.state == G7e,
      u = l ? t.ok : t.fail,
      c = t.resolve,
      d = t.reject,
      h = t.domain;
    try {
      u
        ? (l || (e.rejection === N7e && _cn(e), (e.rejection = zle)),
          u === !0
            ? (n = o)
            : (h && h.enter(), (n = u(o)), h && (h.exit(), (i = !0))),
          n === t.promise
            ? d(L7e("Promise-chain cycle"))
            : (r = F7e(n))
            ? E5(r, n, c, d)
            : c(n))
        : d(o);
    } catch (f) {
      h && !i && h.exit(), d(f);
    }
  },
  B7e = function (t, e) {
    t.notified ||
      ((t.notified = !0),
      Xle(function () {
        for (var n, r = t.reactions; (n = r.get()); ) U7e(n, t);
        (t.notified = !1), e && !t.rejection && bcn(t);
      }));
  },
  H7e = function (t, e, n) {
    var r, i;
    mcn
      ? (((r = $te.createEvent("Event")).promise = e),
        (r.reason = n),
        r.initEvent(t, !1, !0),
        iE.dispatchEvent(r))
      : (r = { promise: e, reason: n }),
      !hcn && (i = iE["on" + t])
        ? i(r)
        : t === O7e && ucn("Unhandled promise rejection", n);
  },
  bcn = function (t) {
    E5(M7e, iE, function () {
      var e,
        n = t.facade,
        r = t.value;
      if (
        CTe(t) &&
        ((e = ccn(function () {
          GU ? Vle.emit("unhandledRejection", r, n) : H7e(O7e, n, r);
        })),
        (t.rejection = GU || CTe(t) ? N7e : zle),
        e.error)
      )
        throw e.value;
    });
  },
  CTe = function (t) {
    return t.rejection !== zle && !t.parent;
  },
  _cn = function (t) {
    E5(M7e, iE, function () {
      var e = t.facade;
      GU ? Vle.emit("rejectionHandled", e) : H7e(ycn, e, t.value);
    });
  },
  vk = function (t, e, n) {
    return function (r) {
      t(e, r, n);
    };
  },
  eI = function (t, e, n) {
    t.done ||
      ((t.done = !0), n && (t = n), (t.value = e), (t.state = vcn), B7e(t, !0));
  },
  $Te = function t(e, n, r) {
    if (!e.done) {
      (e.done = !0), r && (e = r);
      try {
        if (e.facade === n) throw L7e("Promise can't be resolved itself");
        var i = F7e(n);
        i
          ? Xle(function () {
              var o = { done: !1 };
              try {
                E5(i, n, vk(t, o, e), vk(eI, o, e));
              } catch (l) {
                eI(o, l, e);
              }
            })
          : ((e.value = n), (e.state = G7e), B7e(e, !1));
      } catch (o) {
        eI({ done: !1 }, o, e);
      }
    }
  };
PTe &&
  ((uj = (iM = function (t) {
    scn(this, uj), acn(t), E5(sj, this);
    var e = lj(this);
    try {
      t(vk($Te, e), vk(eI, e));
    } catch (n) {
      eI(e, n);
    }
  }).prototype),
  ((sj = function (t) {
    fcn(this, {
      type: OF,
      done: !1,
      notified: !1,
      parent: !1,
      reactions: new dcn(),
      rejection: !1,
      state: MTe,
      value: void 0,
    });
  }).prototype = ncn(uj, "then", function (t, e) {
    var n = lj(this),
      r = xte(lcn(this, iM));
    return (
      (n.parent = !0),
      (r.ok = !Mte(t) || t),
      (r.fail = Mte(e) && e),
      (r.domain = GU ? Vle.domain : void 0),
      n.state == MTe
        ? n.reactions.add(r)
        : Xle(function () {
            U7e(r, n);
          }),
      r.promise
    );
  })),
  (DTe = function () {
    var t = new sj(),
      e = lj(t);
    (this.promise = t), (this.resolve = vk($Te, e)), (this.reject = vk(eI, e));
  }),
  (x7e.f = xte =
    function (t) {
      return t === iM || t === ecn ? new DTe(t) : gcn(t);
    })),
  tcn({ global: !0, constructor: !0, wrap: !0, forced: PTe }, { Promise: iM }),
  rcn(iM, OF, !1, !0),
  icn(OF);
var Tcn = rl,
  X7e = Tcn("iterator"),
  V7e = !1;
try {
  var Ecn = 0,
    xTe = {
      next: function () {
        return { done: !!Ecn++ };
      },
      return: function () {
        V7e = !0;
      },
    };
  (xTe[X7e] = function () {
    return this;
  }),
    RE(xTe, function () {
      throw 2;
    });
} catch {}
var z7e = function (t, e) {
    if (!e && !V7e) return !1;
    var n = !1;
    try {
      var r = {};
      (r[X7e] = function () {
        return {
          next: function () {
            return { done: (n = !0) };
          },
        };
      }),
        t(r);
    } catch {}
    return n;
  },
  Scn = WS,
  Rcn = z7e,
  Acn = T5.CONSTRUCTOR,
  EB =
    Acn ||
    !Rcn(function (t) {
      Scn.all(t).then(void 0, function () {});
    }),
  wcn = ci,
  kcn = Vl,
  Icn = nd,
  Dcn = Sv,
  Pcn = CD,
  Mcn = N0,
  Ccn = EB;
wcn(
  { target: "Promise", stat: !0, forced: Ccn },
  {
    all: function (t) {
      var e = this,
        n = Dcn.f(e),
        r = n.resolve,
        i = n.reject,
        o = Pcn(function () {
          var l = Icn(e.resolve),
            u = [],
            c = 0,
            d = 1;
          Mcn(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              kcn(l, e, h).then(function (g) {
                p || ((p = !0), (u[f] = g), --d || r(u));
              }, i);
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var $cn = ci,
  xcn = T5.CONSTRUCTOR;
WS && WS.prototype,
  $cn(
    { target: "Promise", proto: !0, forced: xcn, real: !0 },
    {
      catch: function (t) {
        return this.then(void 0, t);
      },
    }
  );
var Lcn = ci,
  Ocn = Vl,
  Gcn = nd,
  Ncn = Sv,
  Fcn = CD,
  Ucn = N0,
  Bcn = EB;
Lcn(
  { target: "Promise", stat: !0, forced: Bcn },
  {
    race: function (t) {
      var e = this,
        n = Ncn.f(e),
        r = n.reject,
        i = Fcn(function () {
          var o = Gcn(e.resolve);
          Ucn(t, function (l) {
            Ocn(o, e, l).then(n.resolve, r);
          });
        });
      return i.error && r(i.value), n.promise;
    },
  }
);
var Hcn = ci,
  Xcn = Vl,
  Vcn = Sv,
  zcn = T5.CONSTRUCTOR;
Hcn(
  { target: "Promise", stat: !0, forced: zcn },
  {
    reject: function (t) {
      var e = Vcn.f(this);
      return Xcn(e.reject, void 0, t), e.promise;
    },
  }
);
var jcn = oh,
  Wcn = fc,
  Kcn = Sv,
  j7e = function (t, e) {
    if ((jcn(t), Wcn(e) && e.constructor === t)) return e;
    var n = Kcn.f(t);
    return (0, n.resolve)(e), n.promise;
  },
  Zcn = ci,
  Ycn = kd,
  Qcn = qBe,
  Jcn = WS,
  qcn = T5.CONSTRUCTOR,
  edn = j7e,
  tdn = Ycn("Promise"),
  ndn = !qcn;
Zcn(
  { target: "Promise", stat: !0, forced: Qcn },
  {
    resolve: function (t) {
      return edn(ndn && this === tdn ? Jcn : this, t);
    },
  }
);
var rdn = ci,
  idn = Vl,
  adn = nd,
  odn = Sv,
  sdn = CD,
  ldn = N0,
  udn = EB;
rdn(
  { target: "Promise", stat: !0, forced: udn },
  {
    allSettled: function (t) {
      var e = this,
        n = odn.f(e),
        r = n.resolve,
        i = n.reject,
        o = sdn(function () {
          var l = adn(e.resolve),
            u = [],
            c = 0,
            d = 1;
          ldn(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              idn(l, e, h).then(
                function (g) {
                  p ||
                    ((p = !0),
                    (u[f] = { status: "fulfilled", value: g }),
                    --d || r(u));
                },
                function (g) {
                  p ||
                    ((p = !0),
                    (u[f] = { status: "rejected", reason: g }),
                    --d || r(u));
                }
              );
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var cdn = ci,
  ddn = Vl,
  hdn = nd,
  fdn = kd,
  pdn = Sv,
  gdn = CD,
  mdn = N0,
  ydn = EB,
  LTe = "No one promise resolved";
cdn(
  { target: "Promise", stat: !0, forced: ydn },
  {
    any: function (t) {
      var e = this,
        n = fdn("AggregateError"),
        r = pdn.f(e),
        i = r.resolve,
        o = r.reject,
        l = gdn(function () {
          var u = hdn(e.resolve),
            c = [],
            d = 0,
            h = 1,
            f = !1;
          mdn(t, function (p) {
            var g = d++,
              y = !1;
            h++,
              ddn(u, e, p).then(
                function (v) {
                  y || f || ((f = !0), i(v));
                },
                function (v) {
                  y || f || ((y = !0), (c[g] = v), --h || o(new n(c, LTe)));
                }
              );
          }),
            --h || o(new n(c, LTe));
        });
      return l.error && o(l.value), r.promise;
    },
  }
);
var vdn = ci,
  Lte = WS,
  bdn = Zo,
  _dn = kd,
  Tdn = Xl,
  Edn = E7e,
  OTe = j7e,
  Sdn = Lte && Lte.prototype,
  Rdn =
    !!Lte &&
    bdn(function () {
      Sdn.finally.call({ then: function () {} }, function () {});
    });
vdn(
  { target: "Promise", proto: !0, real: !0, forced: Rdn },
  {
    finally: function (t) {
      var e = Edn(this, _dn("Promise")),
        n = Tdn(t);
      return this.then(
        n
          ? function (r) {
              return OTe(e, t()).then(function () {
                return r;
              });
            }
          : t,
        n
          ? function (r) {
              return OTe(e, t()).then(function () {
                throw r;
              });
            }
          : t
      );
    },
  }
);
var Adn = Vs,
  wdn = Adn.Promise,
  kdn = wdn,
  Idn = kdn,
  Ddn = Idn,
  Pdn = Ddn,
  Mdn = ci,
  Cdn = Sv;
Mdn(
  { target: "Promise", stat: !0, forced: !0 },
  {
    withResolvers: function () {
      var t = Cdn.f(this);
      return { promise: t.promise, resolve: t.resolve, reject: t.reject };
    },
  }
);
var $dn = ci,
  xdn = Sv,
  Ldn = CD;
$dn(
  { target: "Promise", stat: !0, forced: !0 },
  {
    try: function (t) {
      var e = xdn.f(this),
        n = Ldn(t);
      return (n.error ? e.reject : e.resolve)(n.value), e.promise;
    },
  }
);
var Odn = Pdn,
  Gdn = Odn,
  W7e = Gdn,
  jle = Ea(W7e),
  Ndn = ci,
  Fdn = ss,
  Udn = ER,
  Bdn = Fdn(cm([])),
  cj = [1, 2];
Ndn(
  {
    target: "Array",
    proto: !0,
    forced: String(cj) === String(cm(cj).call(cj)),
  },
  {
    reverse: function () {
      return Udn(this) && (this.length = this.length), Bdn(this);
    },
  }
);
var Hdn = rd,
  Xdn = cm(Hdn("Array")),
  Vdn = Pu,
  zdn = Xdn,
  dj = Array.prototype,
  jdn = function (t) {
    var e = cm(t);
    return t === dj || (Vdn(dj, t) && e === cm(dj)) ? zdn : e;
  },
  Wdn = jdn,
  Kdn = Wdn,
  Zdn = Kdn,
  Ydn = Zdn,
  Qdn = Ydn,
  Jdn = Qdn,
  K7e = Jdn,
  qdn = Ea(K7e),
  ehn = ci,
  GTe = ER,
  thn = fB,
  nhn = fc,
  NTe = u5,
  rhn = G0,
  ihn = Ev,
  ahn = PD,
  ohn = rl,
  shn = l5,
  lhn = m5,
  uhn = shn("slice"),
  chn = ohn("species"),
  hj = Array,
  dhn = Math.max;
ehn(
  { target: "Array", proto: !0, forced: !uhn },
  {
    slice: function (t, e) {
      var n,
        r,
        i,
        o = ihn(this),
        l = rhn(o),
        u = NTe(t, l),
        c = NTe(e === void 0 ? l : e, l);
      if (
        GTe(o) &&
        ((n = o.constructor),
        ((thn(n) && (n === hj || GTe(n.prototype))) ||
          (nhn(n) && (n = n[chn]) === null)) &&
          (n = void 0),
        n === hj || n === void 0)
      )
        return lhn(o, u, c);
      for (
        r = new (n === void 0 ? hj : n)(dhn(c - u, 0)), i = 0;
        u < c;
        u++, i++
      )
        u in o && ahn(r, i, o[u]);
      return (r.length = i), r;
    },
  }
);
var hhn = rd,
  fhn = jn(hhn("Array")),
  phn = Pu,
  ghn = fhn,
  fj = Array.prototype,
  mhn = function (t) {
    var e = jn(t);
    return t === fj || (phn(fj, t) && e === jn(fj)) ? ghn : e;
  },
  yhn = mhn,
  vhn = yhn,
  bhn = vhn,
  _hn = bhn,
  Thn = _hn,
  Ehn = Thn,
  Z7e = Ehn,
  Shn = Ea(Z7e);
function Ac() {
  Ac = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      zS ||
      function (H, E, S) {
        H[E] = S.value;
      },
    i = typeof yk == "function" ? yk : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(H, E, S) {
    return (
      zS(H, E, { value: S, enumerable: !0, configurable: !0, writable: !0 }),
      H[E]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (E, S, L) {
      return (E[S] = L);
    };
  }
  function d(H, E, S, L) {
    var W = E && E.prototype instanceof p ? E : p,
      F = xF(W.prototype),
      oe = new O(L || []);
    return r(F, "_invoke", { value: $(H, S, oe) }), F;
  }
  function h(H, E, S) {
    try {
      return { type: "normal", arg: H.call(E, S) };
    } catch (L) {
      return { type: "throw", arg: L };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = c$ && c$(c$(X([])));
  b && b !== e && n.call(b, o) && (v = b);
  var w = (y.prototype = p.prototype = xF(v));
  function k(H) {
    var E;
    u$((E = ["next", "throw", "return"])).call(E, function (S) {
      c(H, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function D(H, E) {
    function S(W, F, oe, De) {
      var Xe = h(H[W], H, F);
      if (Xe.type !== "throw") {
        var ze = Xe.arg,
          ht = ze.value;
        return ht && Cc(ht) == "object" && n.call(ht, "__await")
          ? E.resolve(ht.__await).then(
              function (gt) {
                S("next", gt, oe, De);
              },
              function (gt) {
                S("throw", gt, oe, De);
              }
            )
          : E.resolve(ht).then(
              function (gt) {
                (ze.value = gt), oe(ze);
              },
              function (gt) {
                return S("throw", gt, oe, De);
              }
            );
      }
      De(Xe.arg);
    }
    var L;
    r(this, "_invoke", {
      value: function (W, F) {
        function oe() {
          return new E(function (De, Xe) {
            S(W, F, De, Xe);
          });
        }
        return (L = L ? L.then(oe, oe) : oe());
      },
    });
  }
  function $(H, E, S) {
    var L = "suspendedStart";
    return function (W, F) {
      if (L === "executing") throw new Error("Generator is already running");
      if (L === "completed") {
        if (W === "throw") throw F;
        return { value: void 0, done: !0 };
      }
      for (S.method = W, S.arg = F; ; ) {
        var oe = S.delegate;
        if (oe) {
          var De = N(oe, S);
          if (De) {
            if (De === f) continue;
            return De;
          }
        }
        if (S.method === "next") S.sent = S._sent = S.arg;
        else if (S.method === "throw") {
          if (L === "suspendedStart") throw ((L = "completed"), S.arg);
          S.dispatchException(S.arg);
        } else S.method === "return" && S.abrupt("return", S.arg);
        L = "executing";
        var Xe = h(H, E, S);
        if (Xe.type === "normal") {
          if (((L = S.done ? "completed" : "suspendedYield"), Xe.arg === f))
            continue;
          return { value: Xe.arg, done: S.done };
        }
        Xe.type === "throw" &&
          ((L = "completed"), (S.method = "throw"), (S.arg = Xe.arg));
      }
    };
  }
  function N(H, E) {
    var S = E.method,
      L = H.iterator[S];
    if (L === void 0)
      return (
        (E.delegate = null),
        (S === "throw" &&
          H.iterator.return &&
          ((E.method = "return"),
          (E.arg = void 0),
          N(H, E),
          E.method === "throw")) ||
          (S !== "return" &&
            ((E.method = "throw"),
            (E.arg = new TypeError(
              "The iterator does not provide a '" + S + "' method"
            )))),
        f
      );
    var W = h(L, H.iterator, E.arg);
    if (W.type === "throw")
      return (E.method = "throw"), (E.arg = W.arg), (E.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((E[H.resultName] = F.value),
          (E.next = H.nextLoc),
          E.method !== "return" && ((E.method = "next"), (E.arg = void 0)),
          (E.delegate = null),
          f)
        : F
      : ((E.method = "throw"),
        (E.arg = new TypeError("iterator result is not an object")),
        (E.delegate = null),
        f);
  }
  function P(H) {
    var E,
      S = { tryLoc: H[0] };
    1 in H && (S.catchLoc = H[1]),
      2 in H && ((S.finallyLoc = H[2]), (S.afterLoc = H[3])),
      xU((E = this.tryEntries)).call(E, S);
  }
  function I(H) {
    var E = H.completion || {};
    (E.type = "normal"), delete E.arg, (H.completion = E);
  }
  function O(H) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      u$(H).call(H, P, this),
      this.reset(!0);
  }
  function X(H) {
    if (H) {
      var E = H[o];
      if (E) return E.call(H);
      if (typeof H.next == "function") return H;
      if (!isNaN(H.length)) {
        var S = -1,
          L = function W() {
            for (; ++S < H.length; )
              if (n.call(H, S)) return (W.value = H[S]), (W.done = !1), W;
            return (W.value = void 0), (W.done = !0), W;
          };
        return (L.next = L);
      }
    }
    return { next: G };
  }
  function G() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(w, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (H) {
      var E = typeof H == "function" && H.constructor;
      return (
        !!E && (E === g || (E.displayName || E.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (H) {
      return (
        Ox ? Ox(H, y) : ((H.__proto__ = y), c(H, u, "GeneratorFunction")),
        (H.prototype = xF(w)),
        H
      );
    }),
    (t.awrap = function (H) {
      return { __await: H };
    }),
    k(D.prototype),
    c(D.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = D),
    (t.async = function (H, E, S, L, W) {
      W === void 0 && (W = jle);
      var F = new D(d(H, E, S, L), W);
      return t.isGeneratorFunction(E)
        ? F
        : F.next().then(function (oe) {
            return oe.done ? oe.value : F.next();
          });
    }),
    k(w),
    c(w, u, "Generator"),
    c(w, o, function () {
      return this;
    }),
    c(w, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (H) {
      var E = Object(H),
        S = [];
      for (var L in E) xU(S).call(S, L);
      return (
        qdn(S).call(S),
        function W() {
          for (; S.length; ) {
            var F = S.pop();
            if (F in E) return (W.value = F), (W.done = !1), W;
          }
          return (W.done = !0), W;
        }
      );
    }),
    (t.values = X),
    (O.prototype = {
      constructor: O,
      reset: function (H) {
        var E;
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          u$((E = this.tryEntries)).call(E, I),
          !H)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+Shn(S).call(S, 1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var H = this.tryEntries[0].completion;
        if (H.type === "throw") throw H.arg;
        return this.rval;
      },
      dispatchException: function (H) {
        if (this.done) throw H;
        var E = this;
        function S(Xe, ze) {
          return (
            (F.type = "throw"),
            (F.arg = H),
            (E.next = Xe),
            ze && ((E.method = "next"), (E.arg = void 0)),
            !!ze
          );
        }
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L],
            F = W.completion;
          if (W.tryLoc === "root") return S("end");
          if (W.tryLoc <= this.prev) {
            var oe = n.call(W, "catchLoc"),
              De = n.call(W, "finallyLoc");
            if (oe && De) {
              if (this.prev < W.catchLoc) return S(W.catchLoc, !0);
              if (this.prev < W.finallyLoc) return S(W.finallyLoc);
            } else if (oe) {
              if (this.prev < W.catchLoc) return S(W.catchLoc, !0);
            } else {
              if (!De)
                throw new Error("try statement without catch or finally");
              if (this.prev < W.finallyLoc) return S(W.finallyLoc);
            }
          }
        }
      },
      abrupt: function (H, E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (
            L.tryLoc <= this.prev &&
            n.call(L, "finallyLoc") &&
            this.prev < L.finallyLoc
          ) {
            var W = L;
            break;
          }
        }
        W &&
          (H === "break" || H === "continue") &&
          W.tryLoc <= E &&
          E <= W.finallyLoc &&
          (W = null);
        var F = W ? W.completion : {};
        return (
          (F.type = H),
          (F.arg = E),
          W
            ? ((this.method = "next"), (this.next = W.finallyLoc), f)
            : this.complete(F)
        );
      },
      complete: function (H, E) {
        if (H.type === "throw") throw H.arg;
        return (
          H.type === "break" || H.type === "continue"
            ? (this.next = H.arg)
            : H.type === "return"
            ? ((this.rval = this.arg = H.arg),
              (this.method = "return"),
              (this.next = "end"))
            : H.type === "normal" && E && (this.next = E),
          f
        );
      },
      finish: function (H) {
        for (var E = this.tryEntries.length - 1; E >= 0; --E) {
          var S = this.tryEntries[E];
          if (S.finallyLoc === H)
            return this.complete(S.completion, S.afterLoc), I(S), f;
        }
      },
      catch: function (H) {
        for (var E = this.tryEntries.length - 1; E >= 0; --E) {
          var S = this.tryEntries[E];
          if (S.tryLoc === H) {
            var L = S.completion;
            if (L.type === "throw") {
              var W = L.arg;
              I(S);
            }
            return W;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (H, E, S) {
        return (
          (this.delegate = { iterator: X(H), resultName: E, nextLoc: S }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function FTe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : jle.resolve(c).then(r, i);
}
function M1(t) {
  return function () {
    var e = this,
      n = arguments;
    return new jle(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        FTe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        FTe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function Mo(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function UTe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      zS(t, p7e(r.key), r);
  }
}
function Co(t, e, n) {
  return (
    e && UTe(t.prototype, e),
    n && UTe(t, n),
    zS(t, "prototype", { writable: !1 }),
    t
  );
}
var Rhn = W7e,
  Of = Ea(Rhn),
  Ahn = s7e,
  zu = Ea(Ahn),
  whn = e7e,
  Df = Ea(whn),
  Ote = Vs,
  khn = a5;
Ote.JSON || (Ote.JSON = { stringify: lr });
var Ihn = function (t, e, n) {
    return khn(Ote.JSON.stringify, null, arguments);
  },
  Dhn = Ihn,
  Phn = Dhn,
  Mhn = Phn,
  Chn = Mhn,
  $hn = Chn,
  xhn = $hn,
  Lhn = xhn,
  Ohn = Lhn,
  XT = Ea(Ohn),
  BTe = Ku,
  Ghn = ss,
  Nhn = Vl,
  Fhn = Zo,
  pj = gB,
  Uhn = h5,
  Bhn = sB,
  Hhn = Qp,
  Xhn = lB,
  jA = Ci,
  HTe = ea,
  Vhn = Ghn(Ce([])),
  Gte =
    !jA ||
    Fhn(function () {
      if (
        BTe &&
        jA(
          { b: 1 },
          jA(
            HTe({}, "a", {
              enumerable: !0,
              get: function () {
                HTe(this, "b", { value: 3, enumerable: !1 });
              },
            }),
            { b: 2 }
          )
        ).b !== 1
      )
        return !0;
      var t = {},
        e = {},
        n = lu(),
        r = "abcdefghijklmnopqrst";
      return (
        (t[n] = 7),
        r.split("").forEach(function (i) {
          e[i] = i;
        }),
        jA({}, t)[n] != 7 || pj(jA({}, e)).join("") != r
      );
    })
      ? function (t, e) {
          for (
            var n = Hhn(t), r = arguments.length, i = 1, o = Uhn.f, l = Bhn.f;
            r > i;

          )
            for (
              var u,
                c = Xhn(arguments[i++]),
                d = o ? Vhn(pj(c), o(c)) : pj(c),
                h = d.length,
                f = 0;
              h > f;

            )
              (u = d[f++]), (BTe && !Nhn(l, c, u)) || (n[u] = c[u]);
          return n;
        }
      : jA,
  zhn = ci;
zhn(
  { target: "Object", stat: !0, arity: 2, forced: Ci !== Gte },
  { assign: Gte }
);
var jhn = Vs,
  Whn = jhn.Object.assign,
  Khn = Whn,
  Zhn = Khn,
  Yhn = Zhn,
  Qhn = Yhn,
  Jhn = Qhn,
  qhn = Jhn,
  efn = qhn,
  tfn = efn,
  KS = Ea(tfn),
  nfn = rd,
  rfn = Ce(nfn("Array")),
  ifn = Pu,
  afn = rfn,
  gj = Array.prototype,
  ofn = function (t) {
    var e = Ce(t);
    return t === gj || (ifn(gj, t) && e === Ce(gj)) ? afn : e;
  },
  sfn = ofn,
  lfn = sfn,
  ufn = lfn,
  cfn = ufn,
  dfn = cfn,
  hfn = dfn,
  ffn = hfn,
  pfn = ffn,
  Jd = Ea(pfn),
  gfn = t7e,
  f$ = Ea(gfn),
  mfn = ci,
  yfn = On(SR),
  vfn = l5,
  bfn = vfn("map");
mfn(
  { target: "Array", proto: !0, forced: !bfn },
  {
    map: function (t) {
      return yfn(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var _fn = rd,
  Tfn = On(_fn("Array")),
  Efn = Pu,
  Sfn = Tfn,
  mj = Array.prototype,
  Rfn = function (t) {
    var e = On(t);
    return t === mj || (Efn(mj, t) && e === On(mj)) ? Sfn : e;
  },
  Afn = Rfn,
  wfn = Afn,
  kfn = wfn,
  Ifn = kfn,
  Dfn = Ifn,
  Pfn = Dfn,
  Mfn = Pfn,
  Cfn = Mfn,
  Ky = Ea(Cfn),
  $fn = ci,
  xfn = $a(wle),
  Lfn = Zo,
  Ofn = Lfn(function () {
    var t;
    return !$a((t = Array(1))).call(t);
  });
$fn(
  { target: "Array", proto: !0, forced: Ofn },
  {
    includes: function (t) {
      return xfn(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Gfn = rd,
  Nfn = $a(Gfn("Array")),
  Ffn = fc,
  Ufn = mb,
  Bfn = rl,
  Hfn = Bfn("match"),
  Xfn = function (t) {
    var e;
    return Ffn(t) && ((e = t[Hfn]) !== void 0 ? !!e : Ufn(t) == "RegExp");
  },
  Vfn = Xfn,
  zfn = TypeError,
  jfn = function (t) {
    if (Vfn(t)) throw zfn("The method doesn't accept regular expressions");
    return t;
  },
  Wfn = rl,
  Kfn = Wfn("match"),
  Zfn = function (t) {
    var e = /./;
    try {
      "/./"[t](e);
    } catch {
      try {
        return (e[Kfn] = !1), "/./"[t](e);
      } catch {}
    }
    return !1;
  },
  Yfn = ci,
  Qfn = ss,
  Jfn = jfn,
  qfn = kD,
  XTe = Jp,
  epn = Zfn,
  tpn = Qfn(qt(""));
Yfn(
  { target: "String", proto: !0, forced: !epn("includes") },
  {
    includes: function (t) {
      return !!~tpn(
        XTe(qfn(this)),
        XTe(Jfn(t)),
        arguments.length > 1 ? arguments[1] : void 0
      );
    },
  }
);
var npn = rd,
  rpn = $a(npn("String")),
  VTe = Pu,
  ipn = Nfn,
  apn = rpn,
  yj = Array.prototype,
  vj = String.prototype,
  opn = function (t) {
    var e = $a(t);
    return t === yj || (VTe(yj, t) && e === $a(yj))
      ? ipn
      : typeof t == "string" || t === vj || (VTe(vj, t) && e === $a(vj))
      ? apn
      : e;
  },
  spn = opn,
  lpn = spn,
  upn = lpn,
  cpn = upn,
  dpn = cpn,
  hpn = dpn,
  fpn = hpn,
  ppn = fpn,
  ZS = Ea(ppn);
function S5(t) {
  return function (e) {
    var n;
    return e == null
      ? void 0
      : ZS((n = e.split("?")[0].toLowerCase())).call(n, t);
  };
}
var Y7e = S5(".m3u8"),
  Q7e = S5(".mp4"),
  J7e = S5(".flv"),
  q7e = S5(".sdp"),
  eXe = S5(".mpd");
function gpn(t) {
  return Y7e(t)
    ? "hls"
    : J7e(t)
    ? "flv"
    : q7e(t)
    ? "rtm"
    : Q7e(t)
    ? "mp4"
    : eXe(t)
    ? "dash"
    : "unknown";
}
function Wle(t, e) {
  try {
    (typeof window > "u" ? "undefined" : Cc(window)) === "object" &&
      window.localStorage &&
      window.localStorage.setItem(t, e);
  } catch {}
}
function Kle(t) {
  try {
    return (typeof window > "u" ? "undefined" : Cc(window)) === "object" &&
      window.localStorage
      ? window.localStorage.getItem(t)
      : null;
  } catch {
    return null;
  }
}
function mpn(t) {
  try {
    return (typeof window > "u" ? "undefined" : Cc(window)) === "object" &&
      window.localStorage
      ? window.localStorage.removeItem(t)
      : null;
  } catch {
    return null;
  }
}
function tXe(t) {
  return t.replace(/[A-Z]/g, function (e) {
    return "_".concat(e.toLowerCase());
  });
}
function nXe(t) {
  if (!t || Object.prototype.toString.call(t) !== "[object Object]") return {};
  var e = {};
  for (var n in t)
    Object.prototype.hasOwnProperty.call(t, n) && (e[tXe(n)] = t[n]);
  return e;
}
UBe({
  __proto__: null,
  camelToSnake: tXe,
  convertToSnakeCase: nXe,
  getLocalStorage: Kle,
  getStreamType: gpn,
  isDash: eXe,
  isFlv: J7e,
  isHls: Y7e,
  isMp4: Q7e,
  isRtm: q7e,
  removeLocalStorage: mpn,
  setLocalStorage: Wle,
});
var ypn = ci,
  vpn = ss,
  rXe = Date,
  bpn = vpn(rXe.prototype.getTime);
ypn(
  { target: "Date", stat: !0 },
  {
    now: function () {
      return bpn(new rXe());
    },
  }
);
var _pn = Vs,
  Tpn = _pn.Date.now,
  Epn = Tpn,
  Spn = Epn,
  Rpn = Spn,
  Apn = Rpn,
  wpn = Apn,
  kpn = wpn,
  Ipn = kpn,
  Dpn = Ipn,
  YS = Ea(Dpn),
  yo = (function (t) {
    return (t.VOD = "VOD"), (t.LIVE = "LIVE"), t;
  })(yo || {}),
  Zle = (function (t) {
    return (t.CN = "cn"), (t.SG = "sg"), (t.US = "us"), t;
  })(Zle || {}),
  GF = (function (t) {
    return (t.MP4 = "mp4"), (t.DASH = "dash"), t;
  })(GF || {}),
  iXe = (function (t) {
    return (
      (t.h265 = "h265"),
      (t.adaptRange = "adaptRange"),
      (t.preload = "preload"),
      t
    );
  })(iXe || {}),
  Ppn = { info: 3, warn: 2, error: 1 },
  Yle = (function () {
    function t(e, n) {
      var r = this;
      Mo(this, t),
        ca(this, "logger", void 0),
        ca(this, "level", void 0),
        ca(this, "customLogger", void 0),
        (this.level = n == null ? void 0 : n.level),
        (this.customLogger = n == null ? void 0 : n.logger),
        (this.logger = function (i, o) {
          var l, u, c, d;
          try {
            d = "1.1.0-rc.0";
          } catch {
            d = "--";
          }
          for (
            var h,
              f,
              p,
              g,
              y,
              v,
              b,
              w,
              k,
              D,
              $,
              N = Jd((l = Jd((u = "[".concat(e, "]["))).call(u, d, "]["))).call(
                l,
                o,
                "]"
              ),
              P = arguments.length,
              I = new Array(P > 2 ? P - 2 : 0),
              O = 2;
            O < P;
            O++
          )
            I[O - 2] = arguments[O];
          if (r.customLogger)
            return i === "info"
              ? r.customLogger.info
                ? (g = r.customLogger).info.apply(g, Jd((y = [N])).call(y, I))
                : (v = (b = r.customLogger).log) === null || v === void 0
                ? void 0
                : v.call.apply(v, Jd((w = [b, N])).call(w, I))
              : (h = (f = r.customLogger)[i]) === null || h === void 0
              ? void 0
              : h.call.apply(h, Jd((p = [f, N])).call(p, I));
          (((c = r.level) !== null && c !== void 0 ? c : 1) >= Ppn[i] ||
            (typeof window < "u" && r._checkOpenLog())) &&
            ((k = window.console) === null ||
              k === void 0 ||
              (D = k[i]) === null ||
              D === void 0 ||
              D.call.apply(D, Jd(($ = [k, N])).call($, I)));
        });
    }
    return (
      Co(t, [
        {
          key: "update",
          value: function (e) {
            var n = e || {},
              r = n.logger,
              i = n.level;
            this.updateLevel(i), this.updateLogger(r);
          },
        },
        {
          key: "info",
          value: function (e) {
            for (
              var n,
                r = arguments.length,
                i = new Array(r > 1 ? r - 1 : 0),
                o = 1;
              o < r;
              o++
            )
              i[o - 1] = arguments[o];
            this.logger.apply(this, Jd((n = ["info", e])).call(n, i));
          },
        },
        {
          key: "warn",
          value: function (e) {
            for (
              var n,
                r = arguments.length,
                i = new Array(r > 1 ? r - 1 : 0),
                o = 1;
              o < r;
              o++
            )
              i[o - 1] = arguments[o];
            this.logger.apply(this, Jd((n = ["warn", e])).call(n, i));
          },
        },
        {
          key: "error",
          value: function (e) {
            for (
              var n,
                r = arguments.length,
                i = new Array(r > 1 ? r - 1 : 0),
                o = 1;
              o < r;
              o++
            )
              i[o - 1] = arguments[o];
            this.logger.apply(this, Jd((n = ["error", e])).call(n, i));
          },
        },
        {
          key: "updateLevel",
          value: function (e) {
            Cc(e) !== void 0 && (this.level = e);
          },
        },
        {
          key: "updateLogger",
          value: function (e) {
            e && (this.customLogger = e);
          },
        },
        {
          key: "_checkOpenLog",
          value: function () {
            try {
              return !!window.localStorage.getItem("VESTRATEGY_LOG");
            } catch {
              return !1;
            }
          },
        },
      ]),
      t
    );
  })(),
  x3 = {
    DEVICE_INFO: "VESTRATEGY_DEVICE_INFO",
    DEVICE_INFO_LIVE: "VESTRATEGY_DEVICE_INFO_LIVE",
  },
  L3 = {
    SERVICE_CONFIG: "STRATEGY_SERVICE_CONFIG",
    SERVICE_CONFIG_LIVE: "STRATEGY_SERVICE_CONFIG_LIVE",
  },
  O3 = new Yle("VeStrategy"),
  Mpn = (function () {
    function t(n, r) {
      Mo(this, t),
        ca(this, "initStrategyConfig", void 0),
        ca(this, "serviceStrategyConfigLoader", void 0),
        ca(this, "serviceStrategyConfig", void 0),
        ca(this, "appConfig", void 0),
        ca(this, "videoType", void 0),
        (this.videoType = n.type || yo.VOD),
        (this.initStrategyConfig = n.strategies),
        (this.appConfig = n),
        (this.serviceStrategyConfigLoader = r),
        O3.update(n.log);
    }
    var e;
    return (
      Co(t, [
        {
          key: "getInitStrategyConfig",
          value: function () {
            return this.initStrategyConfig;
          },
        },
        {
          key: "getServiceStrategyConfig",
          value: function () {
            if (this.serviceStrategyConfig) return this.serviceStrategyConfig;
            try {
              var n = Kle(
                yo.LIVE === this.videoType
                  ? L3.SERVICE_CONFIG_LIVE
                  : L3.SERVICE_CONFIG
              );
              n && (this.serviceStrategyConfig = JSON.parse(n));
            } catch {}
            return this.serviceStrategyConfig;
          },
        },
        {
          key: "fetchStrategyConfig",
          value:
            ((e = M1(
              Ac().mark(function n() {
                var r;
                return Ac().wrap(
                  function (i) {
                    for (;;)
                      switch ((i.prev = i.next)) {
                        case 0:
                          if (this.needFetchStrategyConfig()) {
                            i.next = 3;
                            break;
                          }
                          return (
                            O3.info("UseLocalStrategyConfig"),
                            i.abrupt("return")
                          );
                        case 3:
                          if (
                            ((i.prev = 3), !this.serviceStrategyConfigLoader)
                          ) {
                            i.next = 8;
                            break;
                          }
                          return (
                            (i.next = 7),
                            this.serviceStrategyConfigLoader.fetch()
                          );
                        case 7:
                          r = i.sent;
                        case 8:
                          i.next = 13;
                          break;
                        case 10:
                          (i.prev = 10),
                            (i.t0 = i.catch(3)),
                            O3.warn(
                              "FetchStrategyConfigError",
                              XT({
                                message:
                                  i.t0 === null || i.t0 === void 0
                                    ? void 0
                                    : i.t0.message,
                                name:
                                  i.t0 === null || i.t0 === void 0
                                    ? void 0
                                    : i.t0.name,
                              })
                            );
                        case 13:
                          Wle(
                            yo.LIVE === this.videoType
                              ? L3.SERVICE_CONFIG_LIVE
                              : L3.SERVICE_CONFIG,
                            XT(r)
                          ),
                            O3.info("ServiceStrategyConfig", r),
                            (this.serviceStrategyConfig = r || void 0);
                        case 16:
                        case "end":
                          return i.stop();
                      }
                  },
                  n,
                  this,
                  [[3, 10]]
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        { key: "updateStrategyConfig", value: function () {} },
        { key: "getStrategyConfig", value: function () {} },
        { key: "getStrategyConfigByName", value: function () {} },
        {
          key: "getAppConfig",
          value: function () {
            return this.appConfig;
          },
        },
        {
          key: "needFetchStrategyConfig",
          value: function () {
            var n;
            return (
              this.getServiceStrategyConfig(),
              !this.serviceStrategyConfig ||
                !this.serviceStrategyConfig.use_local_cache ||
                !!(
                  this.serviceStrategyConfig.local_cache_expired_at &&
                  YS() > this.serviceStrategyConfig.local_cache_expired_at
                ) ||
                this.serviceStrategyConfig.cache_key !==
                  ((n = this.serviceStrategyConfigLoader) === null ||
                  n === void 0
                    ? void 0
                    : n.getCacheKey())
            );
          },
        },
      ]),
      t
    );
  })(),
  aXe = ss,
  Cpn = nd,
  $pn = fc,
  xpn = Zu,
  zTe = m5,
  Lpn = i5,
  oXe = Function,
  Opn = aXe(Ce([])),
  Gpn = aXe([].join),
  bj = {},
  Npn = function (t, e, n) {
    if (!xpn(bj, e)) {
      for (var r = [], i = 0; i < e; i++) r[i] = "a[" + i + "]";
      bj[e] = oXe("C,a", "return new C(" + Gpn(r, ",") + ")");
    }
    return bj[e](t, n);
  },
  sXe = Lpn
    ? oXe.bind
    : function (t) {
        var e = Cpn(this),
          n = e.prototype,
          r = zTe(arguments, 1),
          i = function o() {
            var l = Opn(r, zTe(arguments));
            return this instanceof o ? Npn(e, l.length, l) : e.apply(t, l);
          };
        return $pn(n) && (i.prototype = n), i;
      },
  Fpn = ci,
  jTe = sXe;
Fpn(
  { target: "Function", proto: !0, forced: Function.bind !== jTe },
  { bind: jTe }
);
var Upn = rd,
  Bpn = Upn("Function").bind,
  Hpn = Pu,
  Xpn = Bpn,
  _j = Function.prototype,
  Vpn = function (t) {
    var e = t.bind;
    return t === _j || (Hpn(_j, t) && e === _j.bind) ? Xpn : e;
  },
  zpn = Vpn,
  jpn = zpn,
  Wpn = jpn,
  Kpn = Wpn,
  Zpn = Kpn,
  Ypn = Zpn,
  Qpn = Ypn,
  Fx = Ea(Qpn);
function Qle(t, e) {
  var n;
  return (Qle = Ox
    ? Fx((n = Ox)).call(n)
    : function (r, i) {
        return (r.__proto__ = i), r;
      })(t, e);
}
function qp(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = xF(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    zS(t, "prototype", { writable: !1 }),
    e && Qle(t, e);
}
var Jpn = ci,
  qpn = kd,
  Tj = a5,
  egn = sXe,
  WTe = Ble,
  tgn = oh,
  KTe = fc,
  ngn = IE,
  lXe = Zo,
  Jle = qpn("Reflect", "construct"),
  rgn = Object.prototype,
  ign = [].push,
  uXe = lXe(function () {
    function t() {}
    return !(Jle(function () {}, [], t) instanceof t);
  }),
  cXe = !lXe(function () {
    Jle(function () {});
  }),
  ZTe = uXe || cXe;
Jpn(
  { target: "Reflect", stat: !0, forced: ZTe, sham: ZTe },
  {
    construct: function (t, e) {
      WTe(t), tgn(e);
      var n = arguments.length < 3 ? t : WTe(arguments[2]);
      if (cXe && !uXe) return Jle(t, e, n);
      if (t == n) {
        switch (e.length) {
          case 0:
            return new t();
          case 1:
            return new t(e[0]);
          case 2:
            return new t(e[0], e[1]);
          case 3:
            return new t(e[0], e[1], e[2]);
          case 4:
            return new t(e[0], e[1], e[2], e[3]);
        }
        var r = [null];
        return Tj(ign, r, e), new (Tj(egn, t, r))();
      }
      var i = n.prototype,
        o = ngn(KTe(i) ? i : rgn),
        l = Tj(t, o, e);
      return KTe(l) ? l : o;
    },
  }
);
var agn = Vs,
  ogn = agn.Reflect.construct,
  sgn = ogn,
  lgn = sgn,
  ugn = lgn,
  cgn = ugn,
  dgn = cgn,
  hgn = dgn,
  fgn = hgn,
  p$ = Ea(fgn);
function aE(t) {
  var e;
  return (aE = Ox
    ? Fx((e = c$)).call(e)
    : function (n) {
        return n.__proto__ || c$(n);
      })(t);
}
function dXe() {
  if (typeof Reflect > "u" || !p$ || p$.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(p$(Boolean, [], function () {})), !0;
  } catch {
    return !1;
  }
}
function bk(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function pgn(t, e) {
  if (e && (Cc(e) === "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return bk(t);
}
function eg(t) {
  var e = dXe();
  return function () {
    var n,
      r = aE(t);
    if (e) {
      var i = aE(this).constructor;
      n = p$(r, arguments, i);
    } else n = r.apply(this, arguments);
    return pgn(this, n);
  };
}
var ggn = f7e,
  VI = Ea(ggn),
  mgn = VI,
  ygn = function (t, e, n) {
    return e in t
      ? mgn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  YTe = function (t, e, n) {
    return ygn(t, Cc(e) !== "symbol" ? e + "" : e, n), n;
  },
  R5 = (function () {
    function t(e) {
      Mo(this, t),
        YTe(this, "options"),
        YTe(this, "scores"),
        (this.options = e),
        (this.scores = []),
        this._init();
    }
    return (
      Co(t, [
        {
          key: "_init",
          value: function () {
            var e,
              n = this;
            zu((e = Df(this.options.plugins))).call(e, function (r) {
              var i = n.options.plugins[r];
              i.ignore ||
                (i.cls && (i.instance = new i.cls(i)),
                i.instance &&
                  n.scores.push(
                    new Of(function (o) {
                      i.instance.getScore().then(function (l) {
                        o({ key: r, factor: i.factor, val: l });
                      });
                    })
                  ));
            });
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Of(function (n) {
              Of.all(e.scores)
                .then(function (r) {
                  var i = {},
                    o = 0,
                    l = 0;
                  zu(r).call(r, function (d) {
                    var h = d.factor;
                    d.val.score > 0 && (l += h);
                  }),
                    (l = l === 0 ? 1 : l);
                  for (var u = 0; u < r.length; u++) {
                    var c = r[u];
                    (o += (c.factor / l) * c.val.score), (i[c.key] = c.val);
                  }
                  (i.score = o), n(i);
                })
                .catch(console.log);
            });
          },
        },
      ]),
      t
    );
  })(),
  vgn = (function (t) {
    qp(n, R5);
    var e = eg(n);
    function n(r) {
      return Mo(this, n), e.call(this, r);
    }
    return Co(n);
  })(),
  bgn = (function (t) {
    qp(n, R5);
    var e = eg(n);
    function n(r) {
      return Mo(this, n), e.call(this, r);
    }
    return Co(n);
  })(),
  _gn = (function (t) {
    qp(n, R5);
    var e = eg(n);
    function n(r) {
      return Mo(this, n), e.call(this, r);
    }
    return Co(n);
  })(),
  Tgn = VI,
  Egn = function (t, e, n) {
    return e in t
      ? Tgn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  Sgn = function (t, e, n) {
    return Egn(t, Cc(e) !== "symbol" ? e + "" : e, n), n;
  },
  Rgn = (function (t) {
    qp(n, R5);
    var e = eg(n);
    function n() {
      var r;
      return (
        Mo(this, n), (r = e.apply(this, arguments)), Sgn(bk(r), "_player"), r
      );
    }
    return (
      Co(n, [
        {
          key: "setPlayer",
          value: function (r, i) {
            var o,
              l,
              u = this;
            r &&
              ((this._player = r),
              r.on("timeupdate", function c() {
                if (r.video && r.video.getVideoPlaybackQuality) {
                  if (l) {
                    if (YS() - o > 1e3)
                      try {
                        r.off("timeupdate", c);
                        var d = r.video.getVideoPlaybackQuality();
                        localStorage.setItem(
                          "player_".concat(i, "_fps"),
                          d.totalVideoFrames - l + ""
                        );
                      } catch {}
                  } else if (u.bufferLength > 1) {
                    var h = r.video.getVideoPlaybackQuality();
                    (l = h.totalVideoFrames), (o = YS());
                  }
                } else r.off("timeupdate", c);
              }));
          },
        },
        {
          key: "bufferLength",
          get: function () {
            var r = this._player.getBufferedRange();
            if (!this._player.video) return 0;
            var i = this._player.video.currentTime,
              o = r[1] - Math.max(r[0], i);
            return Math.max(0, o);
          },
        },
      ]),
      n
    );
  })(),
  Agn = ci,
  wgn = Math.log,
  kgn = Math.LN2;
Agn(
  { target: "Math", stat: !0 },
  {
    log2: function (t) {
      return wgn(t) / kgn;
    },
  }
);
var Ign = Vs,
  Dgn = Ign.Math.log2,
  Pgn = Dgn,
  Mgn = Pgn,
  Cgn = Mgn,
  $gn = Cgn,
  xgn = $gn,
  Lgn = xgn,
  Ogn = Lgn,
  Ggn = Ogn,
  hXe = Ea(Ggn),
  Ngn = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, [
        {
          key: "getScore",
          value: function () {
            return new Of(function (e) {
              var n = navigator.hardwareConcurrency,
                r = 0;
              if (n > 0) {
                var i = hXe(n);
                r =
                  i <= 2
                    ? 3 * i
                    : i <= 3
                    ? 1.6 * (i - 2) + 6
                    : 0.523 * (i - 3) + 7.6;
              }
              e({ score: r, origin: n });
            });
          },
        },
      ]),
      t
    );
  })(),
  Fgn = new Ngn(),
  Ugn = Math.log,
  Bgn = Math.LOG10E,
  Hgn =
    gZt ||
    function (t) {
      return Ugn(t) * Bgn;
    },
  Xgn = ci,
  Vgn = Hgn;
Xgn({ target: "Math", stat: !0 }, { log10: Vgn });
var zgn = Vs,
  jgn = zgn.Math.log10,
  Wgn = jgn,
  Kgn = Wgn,
  Zgn = Kgn,
  Ygn = Zgn,
  Qgn = Ygn,
  Jgn = Qgn,
  qgn = Jgn,
  emn = qgn,
  tmn = Ea(emn),
  nmn = VI,
  rmn = function (t, e, n) {
    return e in t
      ? nmn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  QTe = function (t, e, n) {
    return rmn(t, Cc(e) !== "symbol" ? e + "" : e, n), n;
  },
  imn = (function () {
    function t() {
      Mo(this, t),
        QTe(this, "_worker"),
        QTe(this, "_getScoreCallback", function () {});
    }
    return (
      Co(t, [
        {
          key: "getScore",
          value: function () {
            return new Of(function (e) {
              try {
                var n = new Image();
                (n.src =
                  "//lf6-cdn-tos.douyinstatic.com/obj/venus/pc-theme/spring/20230411-162827.jpeg"),
                  (n.onload = function () {
                    var r = YS();
                    typeof n.decode == "function"
                      ? n.decode().then(function () {
                          var i = 1e3 / (YS() - r),
                            o = 0;
                          if (i > 0) {
                            var l = tmn(i);
                            o =
                              l <= 1
                                ? 6 * l
                                : l <= 2
                                ? 1.6 * (l - 1) + 6
                                : 2.4 * (l - 2) + 7.6;
                          }
                          e({ score: o, origin: i });
                        })
                      : e({ score: 0, origin: -1 });
                  });
              } catch {
                e({ score: 0, origin: -1 });
              }
            });
          },
        },
      ]),
      t
    );
  })(),
  amn = new imn(),
  omn = Qp,
  JTe = u5,
  smn = G0,
  lmn = function (t) {
    for (
      var e = omn(this),
        n = smn(e),
        r = arguments.length,
        i = JTe(r > 1 ? arguments[1] : void 0, n),
        o = r > 2 ? arguments[2] : void 0,
        l = o === void 0 ? n : JTe(o, n);
      l > i;

    )
      e[i++] = t;
    return e;
  },
  umn = ci,
  cmn = lmn;
umn({ target: "Array", proto: !0 }, { fill: cmn });
var dmn = rd,
  hmn = $ee(dmn("Array")),
  fmn = Pu,
  pmn = hmn,
  Ej = Array.prototype,
  gmn = function (t) {
    var e = $ee(t);
    return t === Ej || (fmn(Ej, t) && e === $ee(Ej)) ? pmn : e;
  },
  mmn = gmn,
  ymn = mmn,
  vmn = ymn,
  bmn = vmn,
  _mn = bmn,
  Tmn = _mn,
  Emn = Tmn,
  Smn = Emn,
  Rmn = Ea(Smn),
  Amn = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, [
        {
          key: "_getOrigin",
          value: function () {
            var e = new Uint8Array(3686400);
            Rmn(e).call(e, 8);
            var n = performance.now();
            return 1e3 / (performance.now() - n);
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Of(function (n) {
              n({ score: 0, origin: e._getOrigin() });
            });
          },
        },
      ]),
      t
    );
  })(),
  wmn = new Amn(),
  kmn = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, [
        {
          key: "getScore",
          value: function () {
            return new Of(function (e) {
              e({ score: 0, origin: navigator.deviceMemory });
            });
          },
        },
      ]),
      t
    );
  })(),
  Imn = new kmn(),
  Dmn = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, [
        {
          key: "getScore",
          value: function () {
            return new Of(function (e) {
              var n,
                r =
                  (n = navigator == null ? void 0 : navigator.connection) ==
                  null
                    ? void 0
                    : n.downlink,
                i = 0;
              r > 0 &&
                r < 1e6 &&
                (i =
                  r < 1
                    ? 60 * r
                    : r < 5
                    ? 0.4 * (r - 1) + 6.01
                    : 0.02 * (r - 5) + 7.61),
                e({ score: i, origin: r });
            });
          },
        },
      ]),
      t
    );
  })(),
  Pmn = new Dmn(),
  Mmn = nd,
  Cmn = Qp,
  $mn = lB,
  xmn = G0,
  Lmn = TypeError,
  qTe = function (t) {
    return function (e, n, r, i) {
      Mmn(n);
      var o = Cmn(e),
        l = $mn(o),
        u = xmn(o),
        c = t ? u - 1 : 0,
        d = t ? -1 : 1;
      if (r < 2)
        for (;;) {
          if (c in l) {
            (i = l[c]), (c += d);
            break;
          }
          if (((c += d), t ? c < 0 : u <= c))
            throw Lmn("Reduce of empty array with no initial value");
        }
      for (; t ? c >= 0 : u > c; c += d) c in l && (i = n(i, l[c], c, o));
      return i;
    };
  },
  Omn = { left: qTe(!1), right: qTe(!0) },
  Gmn = ci,
  Nmn = Omn.left,
  Fmn = bB,
  Umn = b5,
  Bmn = !Umn && XI > 79 && XI < 83,
  Hmn = Bmn || !Fmn("reduce");
Gmn(
  { target: "Array", proto: !0, forced: Hmn },
  {
    reduce: function (t) {
      var e = arguments.length;
      return Nmn(this, t, e, e > 1 ? arguments[1] : void 0);
    },
  }
);
var Xmn = rd,
  Vmn = ga(Xmn("Array")),
  zmn = Pu,
  jmn = Vmn,
  Sj = Array.prototype,
  Wmn = function (t) {
    var e = ga(t);
    return t === Sj || (zmn(Sj, t) && e === ga(Sj)) ? jmn : e;
  },
  Kmn = Wmn,
  Zmn = Kmn,
  Ymn = Zmn,
  Qmn = Ymn,
  Jmn = Qmn,
  qmn = Jmn,
  e0n = qmn,
  t0n = e0n,
  n0n = Ea(t0n),
  r0n = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, [
        {
          key: "_getBandwidth",
          value: function () {
            var e;
            if (!performance.getEntries) return -1;
            var n = f$((e = performance.getEntries())).call(e, function (i) {
                var o = i.initiatorType,
                  l = i.decodedBodySize;
                return o === "img" && l > 0;
              }),
              r = n0n(n).call(
                n,
                function (i, o) {
                  return (
                    i +
                    (1e3 * o.decodedBodySize) /
                      (o.responseEnd - o.responseStart)
                  );
                },
                0
              );
            return n.length ? r / n.length / 1024 : 0;
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Of(function (n, r) {
              try {
                var i = e._getBandwidth(),
                  o = 0;
                i > 0 &&
                  i < 1e6 &&
                  (o =
                    i < 1
                      ? 60 * performance_speed
                      : i < 5
                      ? 0.4 * (performance_speed - 1) + 6.01
                      : 0.02 * (performance_speed - 5) + 7.61),
                  n({ score: o, origin: i });
              } catch {
                n({ score: 0, origin: -1 });
              }
            });
          },
        },
      ]),
      t
    );
  })(),
  i0n = new r0n(),
  qle = (function (t) {
    return (t.H264 = "h264"), (t.H265 = "h265"), t;
  })(qle || {}),
  a0n = VI,
  o0n = function (t, e, n) {
    return e in t
      ? a0n(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  eEe = function (t, e, n) {
    return o0n(t, Cc(e) !== "symbol" ? e + "" : e, n), n;
  },
  fXe = (function () {
    function t(e) {
      Mo(this, t), eEe(this, "_origin"), eEe(this, "_codec"), (this._codec = e);
    }
    return (
      Co(t, [
        {
          key: "_getOrigin",
          value: function () {
            try {
              var e =
                localStorage.getItem("player_".concat(this._codec, "_fps")) ||
                -1;
              return Number(e);
            } catch {
              return -1;
            }
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Of(function (n) {
              var r = e._origin || e._getOrigin(),
                i = 0;
              r > 0 &&
                r <= 120 &&
                (i =
                  r <= 30
                    ? 0.2 * r
                    : r <= 60
                    ? 0.0533 * (r - 30) + 6
                    : 0.04 * (r - 60) + 7.6),
                n({ score: i, origin: r });
            });
          },
        },
      ]),
      t
    );
  })(),
  s0n = (function (t) {
    qp(n, fXe);
    var e = eg(n);
    function n(r) {
      return Mo(this, n), e.call(this, r);
    }
    return Co(n);
  })(),
  l0n = new s0n(qle.H264),
  u0n = (function (t) {
    qp(n, fXe);
    var e = eg(n);
    function n(r) {
      return Mo(this, n), e.call(this, r);
    }
    return Co(n);
  })(),
  c0n = new u0n(qle.H265),
  d0n = {
    plugins: {
      cpu: {
        cls: vgn,
        factor: 8,
        plugins: {
          cpu_core_number: { factor: 4, instance: Fgn },
          decodeImg: { factor: 3, instance: amn },
        },
      },
      memory: {
        cls: bgn,
        factor: 0,
        plugins: {
          copy: { factor: 5, instance: wmn },
          usage: { factor: 5, instance: Imn },
        },
      },
      net: {
        cls: _gn,
        factor: 9,
        plugins: {
          downlink: { factor: 5, instance: Pmn },
          performance: { factor: 4, instance: i0n },
        },
      },
      render: {
        cls: Rgn,
        factor: 0,
        plugins: {
          avc: { factor: 5, instance: l0n },
          hevc: { factor: 5, instance: c0n },
        },
      },
    },
  },
  h0n = (function (t) {
    qp(n, R5);
    var e = eg(n);
    function n(r) {
      return Mo(this, n), e.call(this, KS({}, d0n, r));
    }
    return (
      Co(n, [
        {
          key: "setPlayer",
          value: function (r, i) {
            var o, l;
            (o = this.options.plugins.render) != null &&
              o.instance &&
              ((l = this.options.plugins.render) == null ||
                l.instance.setPlayer(r, i));
          },
        },
      ]),
      n
    );
  })(),
  SB = `	
\v\f\r                　\u2028\u2029\uFEFF`,
  f0n = ss,
  p0n = kD,
  g0n = Jp,
  Nte = SB,
  tEe = f0n("".replace),
  m0n = RegExp("^[" + Nte + "]+"),
  y0n = RegExp("(^|[^" + Nte + "])[" + Nte + "]+$"),
  Rj = function (t) {
    return function (e) {
      var n = g0n(p0n(e));
      return (
        1 & t && (n = tEe(n, m0n, "")), 2 & t && (n = tEe(n, y0n, "$1")), n
      );
    };
  },
  eue = { start: Rj(1), end: Rj(2), trim: Rj(3) },
  v0n = NHe.PROPER,
  b0n = Zo,
  nEe = SB,
  rEe = "​᠎",
  _0n = function (t) {
    return b0n(function () {
      return !!nEe[t]() || rEe[t]() !== rEe || (v0n && nEe[t].name !== t);
    });
  },
  T0n = ci,
  E0n = es(eue),
  S0n = _0n;
T0n(
  { target: "String", proto: !0, forced: S0n("trim") },
  {
    trim: function () {
      return E0n(this);
    },
  }
);
var R0n = rd,
  A0n = es(R0n("String")),
  w0n = Pu,
  k0n = A0n,
  Aj = String.prototype,
  I0n = function (t) {
    var e = es(t);
    return typeof t == "string" || t === Aj || (w0n(Aj, t) && e === es(Aj))
      ? k0n
      : e;
  },
  D0n = I0n,
  P0n = D0n,
  M0n = P0n,
  C0n = M0n,
  $0n = C0n,
  x0n = $0n,
  L0n = x0n,
  O0n = L0n,
  DT = Ea(O0n),
  G0n =
    /ANGLE\s+\((?:[^,]+,\s+)?([^,/]+)?(?:[^,]*)(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  N0n = /ANGLE\s+\((?:[^,]+,\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  g$ = "OpenGL Engine",
  C1 = "Unknow",
  F0n = 4318,
  U0n = 32902,
  B0n = 4098,
  Jg = (function (t) {
    return (
      (t.CpuDeriver = "CpuDeriver"),
      (t.Intel = "Intel"),
      (t.Nvidia = "NVIDIA"),
      (t.Amd = "AMD"),
      (t.Apple = "Apple"),
      (t[(t.Unknow = C1)] = "Unknow"),
      t
    );
  })(Jg || {});
function Fte(t) {
  return t === "NVIDIA" ? F0n : t === "AMD" ? B0n : t === "Intel" ? U0n : 0;
}
function H0n(t, e) {
  var n,
    r,
    i,
    o,
    l,
    u = C1,
    c = C1,
    d = C1;
  return (
    (t !== "Intel" && t !== "NVIDIA") || (n = G0n.exec(e)),
    (t !== "AMD" && t !== "Apple") || (n = N0n.exec(e)),
    n != null &&
      n[1] &&
      n != null &&
      n[2] &&
      ((u = DT((r = n[1].replace(/(AMD|NVIDIA)/, ""))).call(r)),
      (d = DT((i = n[2])).call(i))),
    (c =
      t === "Intel"
        ? (u = DT((o = u.split(g$)[0])).call(o))
        : DT((l = u.split(g$)[0])).call(l)),
    { vendor: t, vendorId: Fte(t), model: u, backupModel: c, api: d }
  );
}
function X0n(t) {
  var e = /(SwiftShader|Intel|NVIDIA|AMD|Radeon|Apple)/.exec(t);
  return e
    ? e[0] === "Radeon"
      ? "AMD"
      : e[0] === "SwiftShader"
      ? "CpuDeriver"
      : e[0]
    : Jg.Unknow;
}
function V0n(t) {
  var e,
    n,
    r,
    i,
    o = X0n(t);
  return o === Jg.Unknow || o === "CpuDeriver"
    ? { vendor: o, vendorId: 0, model: C1, backupModel: C1, api: C1 }
    : /^ANGLE/.test(t)
    ? H0n(o, t)
    : o === "Intel"
    ? {
        vendor: o,
        vendorId: Fte(o),
        model: DT((r = t.split(g$)[0])).call(r),
        backupModel: DT((i = t.split(g$)[0])).call(i),
        api: C1,
      }
    : {
        vendor: o,
        vendorId: Fte(o),
        model: DT((e = t.replace(/(AMD|NVIDIA)/, ""))).call(e),
        backupModel: DT((n = t.split(g$)[0].replace(/(AMD|NVIDIA)/, ""))).call(
          n
        ),
        api: C1,
      };
}
var pXe = Dl,
  z0n = Zo,
  j0n = ss,
  W0n = Jp,
  K0n = es(eue),
  iEe = SB,
  m$ = pXe.parseInt,
  aEe = pXe.Symbol,
  oEe = aEe && aEe.iterator,
  gXe = /^[+-]?0x/i,
  Z0n = j0n(gXe.exec),
  Y0n =
    m$(iEe + "08") !== 8 ||
    m$(iEe + "0x16") !== 22 ||
    (oEe &&
      !z0n(function () {
        m$(Object(oEe));
      })),
  sEe = Y0n
    ? function (t, e) {
        var n = K0n(W0n(t));
        return m$(n, e >>> 0 || (Z0n(gXe, n) ? 16 : 10));
      }
    : m$,
  Q0n = ci;
Q0n({ global: !0, forced: _i != sEe }, { parseInt: sEe });
var J0n = Vs,
  q0n = J0n.parseInt,
  eyn = q0n,
  tyn = eyn,
  nyn = tyn,
  ryn = nyn,
  iyn = ryn,
  ayn = iyn,
  oyn = ayn,
  syn = oyn,
  NU = Ea(syn),
  mXe = Dl,
  lyn = Zo,
  uyn = ss,
  cyn = Jp,
  dyn = es(eue),
  hyn = SB,
  fyn = uyn("".charAt),
  FU = mXe.parseFloat,
  lEe = mXe.Symbol,
  uEe = lEe && lEe.iterator,
  pyn =
    1 / FU(hyn + "-0") != -1 / 0 ||
    (uEe &&
      !lyn(function () {
        FU(Object(uEe));
      })),
  cEe = pyn
    ? function (t) {
        var e = dyn(cyn(t)),
          n = FU(e);
        return n === 0 && fyn(e, 0) == "-" ? -0 : n;
      }
    : FU,
  gyn = ci;
gyn({ global: !0, forced: wl != cEe }, { parseFloat: cEe });
var myn = Vs,
  yyn = myn.parseFloat,
  vyn = yyn,
  byn = vyn,
  _yn = byn,
  Tyn = _yn,
  Eyn = Tyn,
  Syn = Eyn,
  Ryn = Syn,
  Ayn = Ryn,
  wyn = Ea(Ayn),
  dEe = "g_ven";
function kyn() {
  try {
    var t = localStorage.getItem(dEe) || "";
    if (t) return t;
    var e,
      n = document.createElement("canvas").getContext("webgl");
    if (n)
      return (
        (t = (e = n.getExtension("WEBGL_debug_renderer_info"))
          ? n.getParameter(e.UNMASKED_RENDERER_WEBGL)
          : "") && localStorage.setItem(dEe, t),
        t
      );
  } catch {}
  return "";
}
function Iyn(t, e) {
  var n, r;
  return (
    (n =
      e === Jg.Intel
        ? Ky(
            (r = t.split(`
`))
          ).call(r, function (i) {
            return "Intel(R) ".concat(i);
          })
        : t.split(`
`)),
    Ky(n).call(n, function (i) {
      return i.split("|");
    })
  );
}
function Dyn(t, e) {
  var n = f$(t).call(t, function (o) {
    return o[0] === e.model;
  });
  n.length ||
    (n = f$(t).call(t, function (o) {
      return o[0] === e.backupModel;
    })),
    n.length ||
      e.vendor !== Jg.Intel ||
      /^Intel(R)/.test(e.model) ||
      (n = f$(t).call(t, function (o) {
        return o[0] === "Intel(R) " + e.model;
      }));
  var r = "-1";
  if (n.length) {
    var i = n[0][1];
    r = i === "-1" ? "0" : i;
  }
  return NU(r);
}
function Pyn(t) {
  return t === 0 ? 0 : t === -1 ? -1 : wyn(hXe(t).toFixed(2));
}
var wj = {
    AMD_PATH: "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_am.txt",
    INTEL_PATH:
      "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_int.txt",
    NVIDIA_PATH:
      "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_nvi.txt",
  },
  kj = [],
  Ij = [],
  Dj = [];
function Myn(t) {
  return yXe.apply(this, arguments);
}
function yXe() {
  return (yXe = M1(
    Ac().mark(function t(e) {
      var n, r, i;
      return Ac().wrap(
        function (o) {
          for (;;)
            switch ((o.prev = o.next)) {
              case 0:
                if (e !== Jg.Intel) {
                  o.next = 4;
                  break;
                }
                if (!kj.length) {
                  o.next = 3;
                  break;
                }
                return o.abrupt("return", kj);
              case 3:
                n = wj.INTEL_PATH;
              case 4:
                if (e !== Jg.Nvidia) {
                  o.next = 8;
                  break;
                }
                if (!Ij.length) {
                  o.next = 7;
                  break;
                }
                return o.abrupt("return", Ij);
              case 7:
                n = wj.NVIDIA_PATH;
              case 8:
                if (e !== Jg.Amd) {
                  o.next = 12;
                  break;
                }
                if (!Dj.length) {
                  o.next = 11;
                  break;
                }
                return o.abrupt("return", Dj);
              case 11:
                n = wj.AMD_PATH;
              case 12:
                if (n) {
                  o.next = 14;
                  break;
                }
                return o.abrupt("return", Of.resolve([]));
              case 14:
                return (
                  (o.prev = 14),
                  (o.next = 17),
                  fetch(n).then(function (l) {
                    return l.text();
                  })
                );
              case 17:
                return (
                  (r = o.sent),
                  (i = Iyn(r, e)),
                  e === Jg.Intel && (kj = i),
                  e === Jg.Nvidia && (Ij = i),
                  e === Jg.Amd && (Dj = i),
                  o.abrupt("return", i)
                );
              case 25:
                (o.prev = 25), (o.t0 = o.catch(14));
              case 27:
                return o.abrupt("return", []);
              case 28:
              case "end":
                return o.stop();
            }
        },
        t,
        null,
        [[14, 25]]
      );
    })
  )).apply(this, arguments);
}
function Cyn(t) {
  return t
    ? Myn(t.vendor)
        .then(function (e) {
          return Dyn(e, t);
        })
        .then(Pyn)
    : Of.resolve(0);
}
var hEe = "";
function $yn() {
  return hEe || (hEe = kyn());
}
function vXe(t) {
  var e;
  try {
    e = V0n(t || xyn.getGPUVendor());
  } catch {
    return null;
  }
  return e;
}
var xyn = (function () {
  function t() {
    Mo(this, t);
  }
  return (
    Co(t, null, [
      {
        key: "getGPUVendor",
        value: function () {
          return $yn();
        },
      },
      {
        key: "parseVendorAsync",
        value: function (e) {
          var n = vXe(e);
          return n
            ? Cyn(n)
                .then(function (r) {
                  return Jo(Jo({}, n || {}), {}, { score: r });
                })
                .catch(function () {
                  return null;
                })
            : Of.resolve(null);
        },
      },
    ]),
    t
  );
})();
function Lyn() {
  var t = !1;
  if (typeof MediaSource > "u" || !MediaSource.isTypeSupported) return t;
  if (
    (t =
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"') ||
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"') ||
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"') ||
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))
  ) {
    var e = vXe();
    t = !!e && e.vendor !== Jg.CpuDeriver;
  }
  return t;
}
var Oyn = K7e,
  Gyn = Ea(Oyn),
  Nyn = Z7e,
  Fyn = Ea(Nyn),
  Uyn = ci,
  Byn = ji(SR),
  Hyn = "find",
  fEe = !0;
Hyn in [] &&
  ji((kbe = Array(1))).call(kbe, function () {
    fEe = !1;
  }),
  Uyn(
    { target: "Array", proto: !0, forced: fEe },
    {
      find: function (t) {
        return Byn(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
    }
  );
var Xyn = rd,
  Vyn = ji(Xyn("Array")),
  zyn = Pu,
  jyn = Vyn,
  Pj = Array.prototype,
  Wyn = function (t) {
    var e = ji(t);
    return t === Pj || (zyn(Pj, t) && e === ji(Pj)) ? jyn : e;
  },
  Kyn = Wyn,
  Zyn = Kyn,
  Yyn = Zyn,
  Qyn = Yyn,
  Jyn = Qyn,
  qyn = Jyn,
  evn = qyn,
  tvn = evn,
  Hy = Ea(tvn),
  nvn = ci,
  rvn = SR.some,
  ivn = bB,
  avn = ivn("some");
nvn(
  { target: "Array", proto: !0, forced: !avn },
  {
    some: function (t) {
      return rvn(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var ovn = rd,
  svn = ovn("Array").some,
  lvn = Pu,
  uvn = svn,
  Mj = Array.prototype,
  cvn = function (t) {
    var e = t.some;
    return t === Mj || (lvn(Mj, t) && e === Mj.some) ? uvn : e;
  },
  dvn = cvn,
  hvn = dvn,
  fvn = hvn,
  pvn = fvn,
  gvn = pvn,
  mvn = gvn,
  yvn = mvn,
  vvn = yvn,
  aM = Ea(vvn),
  bvn = ci,
  _vn = PU,
  Tvn = qt(wle),
  Evn = bB,
  Ute = _vn(qt([])),
  bXe = !!Ute && 1 / Ute([1], 1, -0) < 0,
  Svn = bXe || !Evn("indexOf");
bvn(
  { target: "Array", proto: !0, forced: Svn },
  {
    indexOf: function (t) {
      var e = arguments.length > 1 ? arguments[1] : void 0;
      return bXe ? Ute(this, t, e) || 0 : Tvn(this, t, e);
    },
  }
);
var Rvn = rd,
  Avn = qt(Rvn("Array")),
  wvn = Pu,
  kvn = Avn,
  Cj = Array.prototype,
  Ivn = function (t) {
    var e = qt(t);
    return t === Cj || (wvn(Cj, t) && e === qt(Cj)) ? kvn : e;
  },
  Dvn = Ivn,
  Pvn = Dvn,
  Mvn = Pvn,
  Cvn = Mvn,
  $vn = Cvn,
  xvn = $vn,
  Lvn = xvn,
  Ovn = Lvn,
  Gvn = Ea(Ovn),
  pEe = TR,
  Nvn = TypeError,
  Fvn = function (t, e) {
    if (!delete t[e])
      throw Nvn("Cannot delete property " + pEe(e) + " of " + pEe(t));
  },
  Uvn = ci,
  Bvn = Qp,
  Hvn = u5,
  Xvn = hB,
  Vvn = G0,
  zvn = o7e,
  jvn = Ele,
  Wvn = Ale,
  Kvn = PD,
  $j = Fvn,
  Zvn = l5,
  Yvn = Zvn("splice"),
  Qvn = Math.max,
  Jvn = Math.min;
Uvn(
  { target: "Array", proto: !0, forced: !Yvn },
  {
    splice: function (t, e) {
      var n,
        r,
        i,
        o,
        l,
        u,
        c = Bvn(this),
        d = Vvn(c),
        h = Hvn(t, d),
        f = arguments.length;
      for (
        f === 0
          ? (n = r = 0)
          : f === 1
          ? ((n = 0), (r = d - h))
          : ((n = f - 2), (r = Jvn(Qvn(Xvn(e), 0), d - h))),
          jvn(d + n - r),
          i = Wvn(c, r),
          o = 0;
        o < r;
        o++
      )
        (l = h + o) in c && Kvn(i, o, c[l]);
      if (((i.length = r), n < r)) {
        for (o = h; o < d - r; o++)
          (u = o + n), (l = o + r) in c ? (c[u] = c[l]) : $j(c, u);
        for (o = d; o > d - r + n; o--) $j(c, o - 1);
      } else if (n > r)
        for (o = d - r; o > h; o--)
          (u = o + n - 1), (l = o + r - 1) in c ? (c[u] = c[l]) : $j(c, u);
      for (o = 0; o < n; o++) c[o + h] = arguments[o + 2];
      return zvn(c, d - r + n), i;
    },
  }
);
var qvn = rd,
  e1n = tl(qvn("Array")),
  t1n = Pu,
  n1n = e1n,
  xj = Array.prototype,
  r1n = function (t) {
    var e = tl(t);
    return t === xj || (t1n(xj, t) && e === tl(xj)) ? n1n : e;
  },
  i1n = r1n,
  a1n = i1n,
  o1n = a1n,
  s1n = o1n,
  l1n = s1n,
  u1n = l1n,
  c1n = u1n,
  d1n = c1n,
  Bte = Ea(d1n),
  h1n = {
    "Amazon Silk": "amazon_silk",
    "Android Browser": "android",
    Bada: "bada",
    BlackBerry: "blackberry",
    Chrome: "chrome",
    Chromium: "chromium",
    Electron: "electron",
    Epiphany: "epiphany",
    Firefox: "firefox",
    Focus: "focus",
    Generic: "generic",
    "Google Search": "google_search",
    Googlebot: "googlebot",
    "Internet Explorer": "ie",
    "K-Meleon": "k_meleon",
    Maxthon: "maxthon",
    "Microsoft Edge": "edge",
    "MZ Browser": "mz",
    "NAVER Whale Browser": "naver",
    Opera: "opera",
    "Opera Coast": "opera_coast",
    PhantomJS: "phantomjs",
    Puffin: "puffin",
    QupZilla: "qupzilla",
    QQ: "qq",
    QQLite: "qqlite",
    Safari: "safari",
    Sailfish: "sailfish",
    "Samsung Internet for Android": "samsung_internet",
    SeaMonkey: "seamonkey",
    Sleipnir: "sleipnir",
    Swing: "swing",
    Tizen: "tizen",
    "UC Browser": "uc",
    Vivaldi: "vivaldi",
    "WebOS Browser": "webos",
    WeChat: "wechat",
    "Yandex Browser": "yandex",
    Roku: "roku",
  },
  _Xe = {
    amazon_silk: "Amazon Silk",
    android: "Android Browser",
    bada: "Bada",
    blackberry: "BlackBerry",
    chrome: "Chrome",
    chromium: "Chromium",
    electron: "Electron",
    epiphany: "Epiphany",
    firefox: "Firefox",
    focus: "Focus",
    generic: "Generic",
    googlebot: "Googlebot",
    google_search: "Google Search",
    ie: "Internet Explorer",
    k_meleon: "K-Meleon",
    maxthon: "Maxthon",
    edge: "Microsoft Edge",
    mz: "MZ Browser",
    naver: "NAVER Whale Browser",
    opera: "Opera",
    opera_coast: "Opera Coast",
    phantomjs: "PhantomJS",
    puffin: "Puffin",
    qupzilla: "QupZilla",
    qq: "QQ Browser",
    qqlite: "QQ Browser Lite",
    safari: "Safari",
    sailfish: "Sailfish",
    samsung_internet: "Samsung Internet for Android",
    seamonkey: "SeaMonkey",
    sleipnir: "Sleipnir",
    swing: "Swing",
    tizen: "Tizen",
    uc: "UC Browser",
    vivaldi: "Vivaldi",
    webos: "WebOS Browser",
    wechat: "WeChat",
    yandex: "Yandex Browser",
  },
  Hu = { tablet: "tablet", mobile: "mobile", desktop: "desktop", tv: "tv" },
  Sh = {
    WindowsPhone: "Windows Phone",
    Windows: "Windows",
    MacOS: "macOS",
    iOS: "iOS",
    Android: "Android",
    WebOS: "WebOS",
    BlackBerry: "BlackBerry",
    Bada: "Bada",
    Tizen: "Tizen",
    Linux: "Linux",
    ChromeOS: "Chrome OS",
    PlayStation4: "PlayStation 4",
    Roku: "Roku",
  },
  mT = {
    EdgeHTML: "EdgeHTML",
    Blink: "Blink",
    Trident: "Trident",
    Presto: "Presto",
    Gecko: "Gecko",
    WebKit: "WebKit",
  },
  Dr = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, null, [
        {
          key: "getFirstMatch",
          value: function (e, n) {
            var r = n.match(e);
            return (r && r.length > 0 && r[1]) || "";
          },
        },
        {
          key: "getSecondMatch",
          value: function (e, n) {
            var r = n.match(e);
            return (r && r.length > 1 && r[2]) || "";
          },
        },
        {
          key: "matchAndReturnConst",
          value: function (e, n, r) {
            if (e.test(n)) return r;
          },
        },
        {
          key: "getWindowsVersionName",
          value: function (e) {
            switch (e) {
              case "NT":
                return "NT";
              case "XP":
              case "NT 5.1":
                return "XP";
              case "NT 5.0":
                return "2000";
              case "NT 5.2":
                return "2003";
              case "NT 6.0":
                return "Vista";
              case "NT 6.1":
                return "7";
              case "NT 6.2":
                return "8";
              case "NT 6.3":
                return "8.1";
              case "NT 10.0":
                return "10";
              default:
                return;
            }
          },
        },
        {
          key: "getMacOSVersionName",
          value: function (e) {
            var n,
              r,
              i = Ky((n = Bte((r = e.split("."))).call(r, 0, 2))).call(
                n,
                function (o) {
                  return NU(o, 10) || 0;
                }
              );
            if ((i.push(0), i[0] === 10))
              switch (i[1]) {
                case 5:
                  return "Leopard";
                case 6:
                  return "Snow Leopard";
                case 7:
                  return "Lion";
                case 8:
                  return "Mountain Lion";
                case 9:
                  return "Mavericks";
                case 10:
                  return "Yosemite";
                case 11:
                  return "El Capitan";
                case 12:
                  return "Sierra";
                case 13:
                  return "High Sierra";
                case 14:
                  return "Mojave";
                case 15:
                  return "Catalina";
                default:
                  return;
              }
          },
        },
        {
          key: "getAndroidVersionName",
          value: function (e) {
            var n,
              r,
              i = Ky((n = Bte((r = e.split("."))).call(r, 0, 2))).call(
                n,
                function (o) {
                  return NU(o, 10) || 0;
                }
              );
            if ((i.push(0), !(i[0] === 1 && i[1] < 5)))
              return i[0] === 1 && i[1] < 6
                ? "Cupcake"
                : i[0] === 1 && i[1] >= 6
                ? "Donut"
                : i[0] === 2 && i[1] < 2
                ? "Eclair"
                : i[0] === 2 && i[1] === 2
                ? "Froyo"
                : i[0] === 2 && i[1] > 2
                ? "Gingerbread"
                : i[0] === 3
                ? "Honeycomb"
                : i[0] === 4 && i[1] < 1
                ? "Ice Cream Sandwich"
                : i[0] === 4 && i[1] < 4
                ? "Jelly Bean"
                : i[0] === 4 && i[1] >= 4
                ? "KitKat"
                : i[0] === 5
                ? "Lollipop"
                : i[0] === 6
                ? "Marshmallow"
                : i[0] === 7
                ? "Nougat"
                : i[0] === 8
                ? "Oreo"
                : i[0] === 9
                ? "Pie"
                : void 0;
          },
        },
        {
          key: "getVersionPrecision",
          value: function (e) {
            return e.split(".").length;
          },
        },
        {
          key: "compareVersions",
          value: function (e, n) {
            var r =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2],
              i = t.getVersionPrecision(e),
              o = t.getVersionPrecision(n),
              l = Math.max(i, o),
              u = 0,
              c = Ky(t).call(t, [e, n], function (d) {
                var h,
                  f = l - t.getVersionPrecision(d),
                  p = d + new Array(f + 1).join(".0");
                return Gyn(
                  (h = Ky(t).call(t, p.split("."), function (g) {
                    return new Array(20 - g.length).join("0") + g;
                  }))
                ).call(h);
              });
            for (r && (u = l - Math.min(i, o)), l -= 1; l >= u; ) {
              if (c[0][l] > c[1][l]) return 1;
              if (c[0][l] === c[1][l]) {
                if (l === u) return 0;
                l -= 1;
              } else if (c[0][l] < c[1][l]) return -1;
            }
          },
        },
        {
          key: "map",
          value: function (e, n) {
            var r,
              i = [];
            if (Ky(Array.prototype)) return Ky(Array.prototype).call(e, n);
            for (r = 0; r < e.length; r += 1) i.push(n(e[r]));
            return i;
          },
        },
        {
          key: "find",
          value: function (e, n) {
            var r, i;
            if (Hy(Array.prototype)) return Hy(Array.prototype).call(e, n);
            for (r = 0, i = e.length; r < i; r += 1) {
              var o = e[r];
              if (n(o, r)) return o;
            }
          },
        },
        {
          key: "assign",
          value: function (e) {
            for (
              var n,
                r,
                i,
                o = e,
                l = arguments.length,
                u = new Array(l > 1 ? l - 1 : 0),
                c = 1;
              c < l;
              c++
            )
              u[c - 1] = arguments[c];
            if (KS) return KS.apply(Object, Jd((i = [e])).call(i, u));
            var d = function () {
              var h = u[n];
              if (Cc(h) === "object" && h !== null) {
                var f = Df(h);
                zu(f).call(f, function (p) {
                  o[p] = h[p];
                });
              }
            };
            for (n = 0, r = u.length; n < r; n += 1) d();
            return e;
          },
        },
        {
          key: "getBrowserAlias",
          value: function (e) {
            return h1n[e];
          },
        },
        {
          key: "getBrowserTypeByAlias",
          value: function (e) {
            return _Xe[e] || "";
          },
        },
      ]),
      t
    );
  })(),
  Ys = /version\/(\d+(\.?_?\d+)+)/i,
  f1n = [
    {
      test: [/googlebot/i],
      describe: function (t) {
        var e = { name: "Googlebot" },
          n =
            Dr.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/opera/i],
      describe: function (t) {
        var e = { name: "Opera" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/opr\/|opios/i],
      describe: function (t) {
        var e = { name: "Opera" },
          n =
            Dr.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/SamsungBrowser/i],
      describe: function (t) {
        var e = { name: "Samsung Internet for Android" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/Whale/i],
      describe: function (t) {
        var e = { name: "NAVER Whale Browser" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/MZBrowser/i],
      describe: function (t) {
        var e = { name: "MZ Browser" },
          n =
            Dr.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/focus/i],
      describe: function (t) {
        var e = { name: "Focus" },
          n =
            Dr.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/swing/i],
      describe: function (t) {
        var e = { name: "Swing" },
          n =
            Dr.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/coast/i],
      describe: function (t) {
        var e = { name: "Opera Coast" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/opt\/\d+(?:.?_?\d+)+/i],
      describe: function (t) {
        var e = { name: "Opera Touch" },
          n =
            Dr.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/yabrowser/i],
      describe: function (t) {
        var e = { name: "Yandex Browser" },
          n =
            Dr.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/ucbrowser/i],
      describe: function (t) {
        var e = { name: "UC Browser" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/Maxthon|mxios/i],
      describe: function (t) {
        var e = { name: "Maxthon" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/epiphany/i],
      describe: function (t) {
        var e = { name: "Epiphany" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/puffin/i],
      describe: function (t) {
        var e = { name: "Puffin" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/sleipnir/i],
      describe: function (t) {
        var e = { name: "Sleipnir" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/k-meleon/i],
      describe: function (t) {
        var e = { name: "K-Meleon" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/micromessenger/i],
      describe: function (t) {
        var e = { name: "WeChat" },
          n =
            Dr.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/qqbrowser/i],
      describe: function (t) {
        var e = {
            name: /qqbrowserlite/i.test(t) ? "QQ Browser Lite" : "QQ Browser",
          },
          n =
            Dr.getFirstMatch(
              /(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,
              t
            ) || Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/msie|trident/i],
      describe: function (t) {
        var e = { name: "Internet Explorer" },
          n = Dr.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/\sedg\//i],
      describe: function (t) {
        var e = { name: "Microsoft Edge" },
          n = Dr.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/edg([ea]|ios)/i],
      describe: function (t) {
        var e = { name: "Microsoft Edge" },
          n = Dr.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/vivaldi/i],
      describe: function (t) {
        var e = { name: "Vivaldi" },
          n = Dr.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/seamonkey/i],
      describe: function (t) {
        var e = { name: "SeaMonkey" },
          n = Dr.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/sailfish/i],
      describe: function (t) {
        var e = { name: "Sailfish" },
          n = Dr.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/silk/i],
      describe: function (t) {
        var e = { name: "Amazon Silk" },
          n = Dr.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/phantom/i],
      describe: function (t) {
        var e = { name: "PhantomJS" },
          n = Dr.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/slimerjs/i],
      describe: function (t) {
        var e = { name: "SlimerJS" },
          n = Dr.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
      describe: function (t) {
        var e = { name: "BlackBerry" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/(web|hpw)[o0]s/i],
      describe: function (t) {
        var e = { name: "WebOS Browser" },
          n =
            Dr.getFirstMatch(Ys, t) ||
            Dr.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/bada/i],
      describe: function (t) {
        var e = { name: "Bada" },
          n = Dr.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/tizen/i],
      describe: function (t) {
        var e = { name: "Tizen" },
          n =
            Dr.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/qupzilla/i],
      describe: function (t) {
        var e = { name: "QupZilla" },
          n =
            Dr.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/firefox|iceweasel|fxios/i],
      describe: function (t) {
        var e = { name: "Firefox" },
          n = Dr.getFirstMatch(
            /(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,
            t
          );
        return n && (e.version = n), e;
      },
    },
    {
      test: [/electron/i],
      describe: function (t) {
        var e = { name: "Electron" },
          n = Dr.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/MiuiBrowser/i],
      describe: function (t) {
        var e = { name: "Miui" },
          n = Dr.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/chromium/i],
      describe: function (t) {
        var e = { name: "Chromium" },
          n =
            Dr.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/chrome|crios|crmo/i],
      describe: function (t) {
        var e = { name: "Chrome" },
          n = Dr.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/GSA/i],
      describe: function (t) {
        var e = { name: "Google Search" },
          n = Dr.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: function (t) {
        var e = !t.test(/like android/i),
          n = t.test(/android/i);
        return e && n;
      },
      describe: function (t) {
        var e = { name: "Android Browser" },
          n = Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/playstation 4/i],
      describe: function (t) {
        var e = { name: "PlayStation 4" },
          n = Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/safari|applewebkit/i],
      describe: function (t) {
        var e = { name: "Safari" },
          n = Dr.getFirstMatch(Ys, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/.*/i],
      describe: function (t) {
        var e =
          t.search("\\(") !== -1 ? /^(.*)\/(.*)[ \t]\((.*)/ : /^(.*)\/(.*) /;
        return {
          name: Dr.getFirstMatch(e, t),
          version: Dr.getSecondMatch(e, t),
        };
      },
    },
  ],
  p1n = [
    {
      test: [/Roku\/DVP/],
      describe: function (t) {
        var e = Dr.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, t);
        return { name: Sh.Roku, version: e };
      },
    },
    {
      test: [/windows phone/i],
      describe: function (t) {
        var e = Dr.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, t);
        return { name: Sh.WindowsPhone, version: e };
      },
    },
    {
      test: [/windows /i],
      describe: function (t) {
        var e = Dr.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, t),
          n = Dr.getWindowsVersionName(e);
        return { name: Sh.Windows, version: e, versionName: n };
      },
    },
    {
      test: [/Macintosh(.*?) FxiOS(.*?)\//],
      describe: function (t) {
        var e = { name: Sh.iOS },
          n = Dr.getSecondMatch(/(Version\/)(\d[\d.]+)/, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/macintosh/i],
      describe: function (t) {
        var e = Dr.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, t).replace(
            /[_\s]/g,
            "."
          ),
          n = Dr.getMacOSVersionName(e),
          r = { name: Sh.MacOS, version: e };
        return n && (r.versionName = n), r;
      },
    },
    {
      test: [/(ipod|iphone|ipad)/i],
      describe: function (t) {
        var e = Dr.getFirstMatch(
          /os (\d+([_\s]\d+)*) like mac os x/i,
          t
        ).replace(/[_\s]/g, ".");
        return { name: Sh.iOS, version: e };
      },
    },
    {
      test: function (t) {
        var e = !t.test(/like android/i),
          n = t.test(/android/i);
        return e && n;
      },
      describe: function (t) {
        var e = Dr.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, t),
          n = Dr.getAndroidVersionName(e),
          r = { name: Sh.Android, version: e };
        return n && (r.versionName = n), r;
      },
    },
    {
      test: [/(web|hpw)[o0]s/i],
      describe: function (t) {
        var e = Dr.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, t),
          n = { name: Sh.WebOS };
        return e && e.length && (n.version = e), n;
      },
    },
    {
      test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
      describe: function (t) {
        var e =
          Dr.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, t) ||
          Dr.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, t) ||
          Dr.getFirstMatch(/\bbb(\d+)/i, t);
        return { name: Sh.BlackBerry, version: e };
      },
    },
    {
      test: [/bada/i],
      describe: function (t) {
        var e = Dr.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, t);
        return { name: Sh.Bada, version: e };
      },
    },
    {
      test: [/tizen/i],
      describe: function (t) {
        var e = Dr.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, t);
        return { name: Sh.Tizen, version: e };
      },
    },
    {
      test: [/linux/i],
      describe: function () {
        return { name: Sh.Linux };
      },
    },
    {
      test: [/CrOS/],
      describe: function () {
        return { name: Sh.ChromeOS };
      },
    },
    {
      test: [/PlayStation 4/],
      describe: function (t) {
        var e = Dr.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, t);
        return { name: Sh.PlayStation4, version: e };
      },
    },
  ],
  g1n = [
    {
      test: [/googlebot/i],
      describe: function () {
        return { type: "bot", vendor: "Google" };
      },
    },
    {
      test: [/huawei/i],
      describe: function (t) {
        var e = Dr.getFirstMatch(/(can-l01)/i, t) && "Nova",
          n = { type: Hu.mobile, vendor: "Huawei" };
        return e && (n.model = e), n;
      },
    },
    {
      test: [/nexus\s*(?:7|8|9|10).*/i],
      describe: function () {
        return { type: Hu.tablet, vendor: "Nexus" };
      },
    },
    {
      test: [/ipad/i],
      describe: function () {
        return { type: Hu.tablet, vendor: "Apple", model: "iPad" };
      },
    },
    {
      test: [/Macintosh(.*?) FxiOS(.*?)\//],
      describe: function () {
        return { type: Hu.tablet, vendor: "Apple", model: "iPad" };
      },
    },
    {
      test: [/kftt build/i],
      describe: function () {
        return { type: Hu.tablet, vendor: "Amazon", model: "Kindle Fire HD 7" };
      },
    },
    {
      test: [/silk/i],
      describe: function () {
        return { type: Hu.tablet, vendor: "Amazon" };
      },
    },
    {
      test: [/tablet(?! pc)/i],
      describe: function () {
        return { type: Hu.tablet };
      },
    },
    {
      test: function (t) {
        var e = t.test(/ipod|iphone/i),
          n = t.test(/like (ipod|iphone)/i);
        return e && !n;
      },
      describe: function (t) {
        var e = Dr.getFirstMatch(/(ipod|iphone)/i, t);
        return { type: Hu.mobile, vendor: "Apple", model: e };
      },
    },
    {
      test: [/nexus\s*[0-6].*/i, /galaxy nexus/i],
      describe: function () {
        return { type: Hu.mobile, vendor: "Nexus" };
      },
    },
    {
      test: [/[^-]mobi/i],
      describe: function () {
        return { type: Hu.mobile };
      },
    },
    {
      test: function (t) {
        return t.getBrowserName(!0) === "blackberry";
      },
      describe: function () {
        return { type: Hu.mobile, vendor: "BlackBerry" };
      },
    },
    {
      test: function (t) {
        return t.getBrowserName(!0) === "bada";
      },
      describe: function () {
        return { type: Hu.mobile };
      },
    },
    {
      test: function (t) {
        return t.getBrowserName() === "windows phone";
      },
      describe: function () {
        return { type: Hu.mobile, vendor: "Microsoft" };
      },
    },
    {
      test: function (t) {
        var e = Number(String(t.getOSVersion()).split(".")[0]);
        return t.getOSName(!0) === "android" && e >= 3;
      },
      describe: function () {
        return { type: Hu.tablet };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "android";
      },
      describe: function () {
        return { type: Hu.mobile };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "macos";
      },
      describe: function () {
        return { type: Hu.desktop, vendor: "Apple" };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "windows";
      },
      describe: function () {
        return { type: Hu.desktop };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "linux";
      },
      describe: function () {
        return { type: Hu.desktop };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "playstation 4";
      },
      describe: function () {
        return { type: Hu.tv };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "roku";
      },
      describe: function () {
        return { type: Hu.tv };
      },
    },
  ],
  m1n = [
    {
      test: function (t) {
        return t.getBrowserName(!0) === "microsoft edge";
      },
      describe: function (t) {
        if (/\sedg\//i.test(t)) return { name: mT.Blink };
        var e = Dr.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, t);
        return { name: mT.EdgeHTML, version: e };
      },
    },
    {
      test: [/trident/i],
      describe: function (t) {
        var e = { name: mT.Trident },
          n = Dr.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: function (t) {
        return t.test(/presto/i);
      },
      describe: function (t) {
        var e = { name: mT.Presto },
          n = Dr.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: function (t) {
        var e = t.test(/gecko/i),
          n = t.test(/like gecko/i);
        return e && !n;
      },
      describe: function (t) {
        var e = { name: mT.Gecko },
          n = Dr.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/(apple)?webkit\/537\.36/i],
      describe: function () {
        return { name: mT.Blink };
      },
    },
    {
      test: [/(apple)?webkit/i],
      describe: function (t) {
        var e = { name: mT.WebKit },
          n = Dr.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
  ],
  gEe = (function () {
    function t(e) {
      var n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
      if ((Mo(this, t), e == null || e === ""))
        throw new Error("UserAgent parameter can't be empty");
      (this._ua = e), (this.parsedResult = {}), n !== !0 && this.parse();
    }
    return (
      Co(t, [
        {
          key: "getUA",
          value: function () {
            return this._ua;
          },
        },
        {
          key: "test",
          value: function (e) {
            return e.test(this._ua);
          },
        },
        {
          key: "parseBrowser",
          value: function () {
            var e = this;
            this.parsedResult.browser = {};
            var n = Hy(Dr).call(Dr, f1n, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return aM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.browser = n.describe(this.getUA())),
              this.parsedResult.browser
            );
          },
        },
        {
          key: "getBrowser",
          value: function () {
            return this.parsedResult.browser
              ? this.parsedResult.browser
              : this.parseBrowser();
          },
        },
        {
          key: "getBrowserName",
          value: function (e) {
            return e
              ? String(this.getBrowser().name).toLowerCase() || ""
              : this.getBrowser().name || "";
          },
        },
        {
          key: "getBrowserVersion",
          value: function () {
            return this.getBrowser().version;
          },
        },
        {
          key: "getOS",
          value: function () {
            return this.parsedResult.os ? this.parsedResult.os : this.parseOS();
          },
        },
        {
          key: "parseOS",
          value: function () {
            var e = this;
            this.parsedResult.os = {};
            var n = Hy(Dr).call(Dr, p1n, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return aM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.os = n.describe(this.getUA())),
              this.parsedResult.os
            );
          },
        },
        {
          key: "getOSName",
          value: function (e) {
            var n = this.getOS().name;
            return e ? String(n).toLowerCase() || "" : n || "";
          },
        },
        {
          key: "getOSVersion",
          value: function () {
            return this.getOS().version;
          },
        },
        {
          key: "getPlatform",
          value: function () {
            return this.parsedResult.platform
              ? this.parsedResult.platform
              : this.parsePlatform();
          },
        },
        {
          key: "getPlatformType",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0 && arguments[0],
              n = this.getPlatform().type;
            return e ? String(n).toLowerCase() || "" : n || "";
          },
        },
        {
          key: "parsePlatform",
          value: function () {
            var e = this;
            this.parsedResult.platform = {};
            var n = Hy(Dr).call(Dr, g1n, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return aM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.platform = n.describe(this.getUA())),
              this.parsedResult.platform
            );
          },
        },
        {
          key: "getEngine",
          value: function () {
            return this.parsedResult.engine
              ? this.parsedResult.engine
              : this.parseEngine();
          },
        },
        {
          key: "getEngineName",
          value: function (e) {
            return e
              ? String(this.getEngine().name).toLowerCase() || ""
              : this.getEngine().name || "";
          },
        },
        {
          key: "parseEngine",
          value: function () {
            var e = this;
            this.parsedResult.engine = {};
            var n = Hy(Dr).call(Dr, m1n, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return aM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.engine = n.describe(this.getUA())),
              this.parsedResult.engine
            );
          },
        },
        {
          key: "parse",
          value: function () {
            return (
              this.parseBrowser(),
              this.parseOS(),
              this.parsePlatform(),
              this.parseEngine(),
              this
            );
          },
        },
        {
          key: "getResult",
          value: function () {
            return Dr.assign({}, this.parsedResult);
          },
        },
        {
          key: "satisfies",
          value: function (e) {
            var n = this,
              r = {},
              i = 0,
              o = {},
              l = 0,
              u = Df(e);
            if (
              (zu(u).call(u, function (v) {
                var b = e[v];
                typeof b == "string"
                  ? ((o[v] = b), (l += 1))
                  : Cc(b) === "object" && ((r[v] = b), (i += 1));
              }),
              i > 0)
            ) {
              var c = Df(r),
                d = Hy(Dr).call(Dr, c, function (v) {
                  return n.isOS(v);
                });
              if (d) {
                var h = this.satisfies(r[d]);
                if (h !== void 0) return h;
              }
              var f = Hy(Dr).call(Dr, c, function (v) {
                return n.isPlatform(v);
              });
              if (f) {
                var p = this.satisfies(r[f]);
                if (p !== void 0) return p;
              }
            }
            if (l > 0) {
              var g = Df(o),
                y = Hy(Dr).call(Dr, g, function (v) {
                  return n.isBrowser(v, !0);
                });
              if (y !== void 0) return this.compareVersion(o[y]);
            }
          },
        },
        {
          key: "isBrowser",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1],
              r = this.getBrowserName().toLowerCase(),
              i = e.toLowerCase(),
              o = Dr.getBrowserTypeByAlias(i);
            return n && o && (i = o.toLowerCase()), i === r;
          },
        },
        {
          key: "compareVersion",
          value: function (e) {
            var n = [0],
              r = e,
              i = !1,
              o = this.getBrowserVersion();
            if (typeof o == "string")
              return (
                e[0] === ">" || e[0] === "<"
                  ? ((r = e.substr(1)),
                    e[1] === "=" ? ((i = !0), (r = e.substr(2))) : (n = []),
                    e[0] === ">" ? n.push(1) : n.push(-1))
                  : e[0] === "="
                  ? (r = e.substr(1))
                  : e[0] === "~" && ((i = !0), (r = e.substr(1))),
                Gvn(n).call(n, Dr.compareVersions(o, r, i)) > -1
              );
          },
        },
        {
          key: "isOS",
          value: function (e) {
            return this.getOSName(!0) === String(e).toLowerCase();
          },
        },
        {
          key: "isPlatform",
          value: function (e) {
            return this.getPlatformType(!0) === String(e).toLowerCase();
          },
        },
        {
          key: "isEngine",
          value: function (e) {
            return this.getEngineName(!0) === String(e).toLowerCase();
          },
        },
        {
          key: "is",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
            return this.isBrowser(e, n) || this.isOS(e) || this.isPlatform(e);
          },
        },
        {
          key: "some",
          value: function () {
            var e = this,
              n =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : [];
            return aM(n).call(n, function (r) {
              return e.is(r);
            });
          },
        },
      ]),
      t
    );
  })(),
  y1n = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, null, [
        {
          key: "getParser",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
            if (typeof e != "string")
              throw new Error("UserAgent should be a string");
            return new gEe(e, n);
          },
        },
        {
          key: "parse",
          value: function (e) {
            return new gEe(e).getResult();
          },
        },
        {
          key: "BROWSER_MAP",
          get: function () {
            return _Xe;
          },
        },
        {
          key: "ENGINE_MAP",
          get: function () {
            return mT;
          },
        },
        {
          key: "OS_MAP",
          get: function () {
            return Sh;
          },
        },
        {
          key: "PLATFORMS_MAP",
          get: function () {
            return Hu;
          },
        },
      ]),
      t
    );
  })(),
  v1n = (function () {
    function t(n) {
      Mo(this, t),
        ca(this, "featureList", void 0),
        ca(this, "videoType", void 0),
        (this.videoType = n.type || yo.VOD),
        (this.featureList = Jo(
          Jo(
            Jo(
              Jo(
                { deviceId: n == null ? void 0 : n.deviceId },
                this.initSync()
              ),
              this.getGPUInfo()
            ),
            this.getLocalDeviceMarkInfo()
          ),
          this.getH265FeatureList()
        ));
    }
    var e;
    return (
      Co(t, [
        {
          key: "initSync",
          value: function () {
            return Jo({}, this.getBrowserInfo());
          },
        },
        {
          key: "updateFeatureList",
          value: function (n) {
            return (this.featureList = Jo(Jo({}, this.featureList), n));
          },
        },
        {
          key: "getFeatureList",
          value: function () {
            return this.featureList;
          },
        },
        {
          key: "getH265FeatureList",
          value: function () {
            return { isHevcSupported: Lyn() };
          },
        },
        {
          key: "getLocalDeviceMarkInfo",
          value: function () {
            var n = Kle(
                this.videoType === yo.LIVE
                  ? x3.DEVICE_INFO_LIVE
                  : x3.DEVICE_INFO
              ),
              r = { cpuScore: -1, netScore: -1, renderScore: -1 };
            if (!n) return r;
            try {
              var i = JSON.parse(n);
              return {
                cpuScore: i.cpuScore,
                netScore: i.netScore,
                renderScore: i.renderScore,
              };
            } catch {}
            return r;
          },
        },
        {
          key: "getDeviceMarkInfoAsync",
          value:
            ((e = M1(
              Ac().mark(function n() {
                var r, i, o, l, u, c;
                return Ac().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return (r = new h0n({})), (d.next = 3), r.getScore();
                        case 3:
                          if (((d.t0 = d.sent), d.t0)) {
                            d.next = 6;
                            break;
                          }
                          d.t0 = {};
                        case 6:
                          return (
                            (i = d.t0),
                            (o = i.cpu),
                            (l = i.net),
                            (u = i.render),
                            (c = {
                              cpuScore: (o == null ? void 0 : o.score) || -1,
                              netScore: (l == null ? void 0 : l.score) || -1,
                              renderScore: (u == null ? void 0 : u.score) || -1,
                            }),
                            Wle(
                              this.videoType === yo.LIVE
                                ? x3.DEVICE_INFO_LIVE
                                : x3.DEVICE_INFO,
                              XT(c)
                            ),
                            this.updateFeatureList(c),
                            d.abrupt("return", c)
                          );
                        case 14:
                        case "end":
                          return d.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "getBrowserInfo",
          value: function () {
            var n = y1n.getParser(navigator.userAgent);
            return {
              browserVersion: n.getBrowserVersion(),
              browserName: n.getBrowserName(),
              cpuCore: navigator.hardwareConcurrency,
              osName: n.getOSName(),
              osVersion: n.getOSVersion(),
              platformType: n.getPlatformType(),
              engineName: n.getEngineName(),
            };
          },
        },
        {
          key: "getGPUInfo",
          value: function () {
            try {
              var n = Dbe.parseVendor(),
                r = Dbe.getGPUVendor(),
                i = ZS(r).call(r, "SwiftShader");
              return {
                gpuScore: (n == null ? void 0 : n.score) || -1,
                isCloseGPU: i,
              };
            } catch {
              return { gpuScore: -1, isCloseGPU: !1 };
            }
          },
        },
      ]),
      t
    );
  })(),
  TXe = { exports: {} },
  b1n = Zo,
  _1n = b1n(function () {
    if (typeof ArrayBuffer == "function") {
      var t = new ArrayBuffer(8);
      vle(t) && ea(t, "a", { value: 8 });
    }
  }),
  T1n = Zo,
  E1n = fc,
  S1n = mb,
  mEe = _1n,
  NF = vle,
  R1n = T1n(function () {
    NF(1);
  }),
  A1n =
    R1n || mEe
      ? function (t) {
          return (
            !!E1n(t) && (!mEe || S1n(t) != "ArrayBuffer") && (!NF || NF(t))
          );
        }
      : NF,
  w1n = Zo,
  k1n = !w1n(function () {
    return vle(XZt({}));
  }),
  I1n = ci,
  D1n = ss,
  P1n = c5,
  M1n = fc,
  tue = Zu,
  C1n = Bf.f,
  yEe = d5,
  $1n = Ile,
  nue = A1n,
  x1n = cB,
  L1n = k1n,
  EXe = !1,
  Y1 = x1n("meta"),
  O1n = 0,
  rue = function (t) {
    C1n(t, Y1, { value: { objectID: "O" + O1n++, weakData: {} } });
  },
  G1n = function (t, e) {
    if (!M1n(t))
      return ti(t) == "symbol" ? t : (typeof t == "string" ? "S" : "P") + t;
    if (!tue(t, Y1)) {
      if (!nue(t)) return "F";
      if (!e) return "E";
      rue(t);
    }
    return t[Y1].objectID;
  },
  N1n = function (t, e) {
    if (!tue(t, Y1)) {
      if (!nue(t)) return !0;
      if (!e) return !1;
      rue(t);
    }
    return t[Y1].weakData;
  },
  F1n = function (t) {
    return L1n && EXe && nue(t) && !tue(t, Y1) && rue(t), t;
  },
  U1n = function () {
    (B1n.enable = function () {}), (EXe = !0);
    var t = yEe.f,
      e = D1n(tl([])),
      n = {};
    (n[Y1] = 1),
      t(n).length &&
        ((yEe.f = function (r) {
          for (var i = t(r), o = 0, l = i.length; o < l; o++)
            if (i[o] === Y1) {
              e(i, o, 1);
              break;
            }
          return i;
        }),
        I1n(
          { target: "Object", stat: !0, forced: !0 },
          { getOwnPropertyNames: $1n.f }
        ));
  },
  B1n = (TXe.exports = {
    enable: U1n,
    fastKey: G1n,
    getWeakData: N1n,
    onFreeze: F1n,
  });
P1n[Y1] = !0;
var SXe = TXe.exports,
  H1n = ci,
  X1n = Dl,
  V1n = SXe,
  z1n = Zo,
  j1n = yb,
  W1n = N0,
  K1n = _5,
  Z1n = Xl,
  Y1n = fc,
  Q1n = vb,
  J1n = Bf.f,
  q1n = SR.forEach,
  ebn = Ku,
  RXe = PE,
  tbn = RXe.set,
  nbn = RXe.getterFor,
  rbn = function (t, e, n) {
    var r,
      i = qt(t).call(t, "Map") !== -1,
      o = qt(t).call(t, "Weak") !== -1,
      l = i ? "set" : "add",
      u = X1n[t],
      c = u && u.prototype,
      d = {};
    if (
      ebn &&
      Z1n(u) &&
      (o ||
        (c.forEach &&
          !z1n(function () {
            var p;
            $s((p = new u()))
              .call(p)
              .next();
          })))
    ) {
      var h = (r = e(function (p, g) {
          tbn(K1n(p, h), { type: t, collection: new u() }),
            g != null && W1n(g, p[l], { that: p, AS_ENTRIES: i });
        })).prototype,
        f = nbn(t);
      q1n(
        [
          "add",
          "clear",
          "delete",
          "forEach",
          "get",
          "has",
          "set",
          "keys",
          "values",
          "entries",
        ],
        function (p) {
          var g = p == "add" || p == "set";
          !(p in c) ||
            (o && p == "clear") ||
            j1n(h, p, function (y, v) {
              var b = f(this).collection;
              if (!g && o && !Y1n(y)) return p == "get" && void 0;
              var w = b[p](y === 0 ? 0 : y, v);
              return g ? this : w;
            });
        }
      ),
        o ||
          J1n(h, "size", {
            configurable: !0,
            get: function () {
              return f(this).collection.size;
            },
          });
    } else (r = n.getConstructor(e, t, i, l)), V1n.enable();
    return (
      Q1n(r, t, !1, !0),
      (d[t] = r),
      H1n({ global: !0, forced: !0 }, d),
      o || n.setStrong(r, t, i),
      r
    );
  },
  ibn = DE,
  AXe = function (t, e, n) {
    for (var r in e) n && n.unsafe && t[r] ? (t[r] = e[r]) : ibn(t, r, e[r], n);
    return t;
  },
  abn = IE,
  obn = f5,
  vEe = AXe,
  sbn = Id,
  lbn = _5,
  ubn = wD,
  cbn = N0,
  dbn = Lle,
  bEe = Ole,
  hbn = T7e,
  oM = Ku,
  _Ee = SXe.fastKey,
  wXe = PE,
  TEe = wXe.set,
  Lj = wXe.getterFor,
  fbn = {
    getConstructor: function (t, e, n, r) {
      var i = t(function (d, h) {
          lbn(d, o),
            TEe(d, {
              type: e,
              index: abn(null),
              first: void 0,
              last: void 0,
              size: 0,
            }),
            oM || (d.size = 0),
            ubn(h) || cbn(h, d[r], { that: d, AS_ENTRIES: n });
        }),
        o = i.prototype,
        l = Lj(e),
        u = function (d, h, f) {
          var p,
            g,
            y = l(d),
            v = c(d, h);
          return (
            v
              ? (v.value = f)
              : ((y.last = v =
                  {
                    index: (g = _Ee(h, !0)),
                    key: h,
                    value: f,
                    previous: (p = y.last),
                    next: void 0,
                    removed: !1,
                  }),
                y.first || (y.first = v),
                p && (p.next = v),
                oM ? y.size++ : d.size++,
                g !== "F" && (y.index[g] = v)),
            d
          );
        },
        c = function (d, h) {
          var f,
            p = l(d),
            g = _Ee(h);
          if (g !== "F") return p.index[g];
          for (f = p.first; f; f = f.next) if (f.key == h) return f;
        };
      return (
        vEe(o, {
          clear: function () {
            for (var d = l(this), h = d.index, f = d.first; f; )
              (f.removed = !0),
                f.previous && (f.previous = f.previous.next = void 0),
                delete h[f.index],
                (f = f.next);
            (d.first = d.last = void 0), oM ? (d.size = 0) : (this.size = 0);
          },
          delete: function (d) {
            var h = this,
              f = l(h),
              p = c(h, d);
            if (p) {
              var g = p.next,
                y = p.previous;
              delete f.index[p.index],
                (p.removed = !0),
                y && (y.next = g),
                g && (g.previous = y),
                f.first == p && (f.first = g),
                f.last == p && (f.last = y),
                oM ? f.size-- : h.size--;
            }
            return !!p;
          },
          forEach: function (d) {
            for (
              var h,
                f = l(this),
                p = sbn(d, arguments.length > 1 ? arguments[1] : void 0);
              (h = h ? h.next : f.first);

            )
              for (p(h.value, h.key, this); h && h.removed; ) h = h.previous;
          },
          has: function (d) {
            return !!c(this, d);
          },
        }),
        vEe(
          o,
          n
            ? {
                get: function (d) {
                  var h = c(this, d);
                  return h && h.value;
                },
                set: function (d, h) {
                  return u(this, d === 0 ? 0 : d, h);
                },
              }
            : {
                add: function (d) {
                  return u(this, (d = d === 0 ? 0 : d), d);
                },
              }
        ),
        oM &&
          obn(o, "size", {
            configurable: !0,
            get: function () {
              return l(this).size;
            },
          }),
        i
      );
    },
    setStrong: function (t, e, n) {
      var r = e + " Iterator",
        i = Lj(e),
        o = Lj(r);
      dbn(
        t,
        e,
        function (l, u) {
          TEe(this, { type: r, target: l, state: i(l), kind: u, last: void 0 });
        },
        function () {
          for (var l = o(this), u = l.kind, c = l.last; c && c.removed; )
            c = c.previous;
          return l.target && (l.last = c = c ? c.next : l.state.first)
            ? bEe(
                u == "keys"
                  ? c.key
                  : u == "values"
                  ? c.value
                  : [c.key, c.value],
                !1
              )
            : ((l.target = void 0), bEe(void 0, !0));
        },
        n ? "entries" : "values",
        !n,
        !0
      ),
        hbn(e);
    },
  },
  pbn = rbn,
  gbn = fbn;
pbn(
  "Map",
  function (t) {
    return function () {
      return t(this, arguments.length ? arguments[0] : void 0);
    };
  },
  gbn
);
var mbn = Vs,
  ybn = mbn.Map,
  vbn = ybn,
  bbn = vbn,
  _bn = bbn,
  Tbn = _bn,
  Ebn = Id,
  Sbn = Vl,
  Rbn = nd,
  Abn = Ble,
  wbn = wD,
  EEe = N0,
  SEe = [].push,
  kbn = function (t) {
    var e,
      n,
      r,
      i,
      o = arguments.length,
      l = o > 1 ? arguments[1] : void 0;
    return (
      Abn(this),
      (e = l !== void 0) && Rbn(l),
      wbn(t)
        ? new this()
        : ((n = []),
          e
            ? ((r = 0),
              (i = Ebn(l, o > 2 ? arguments[2] : void 0)),
              EEe(t, function (u) {
                Sbn(SEe, n, i(u, r++));
              }))
            : EEe(t, SEe, { that: n }),
          new this(n))
    );
  },
  Ibn = ci,
  Dbn = kbn;
Ibn({ target: "Map", stat: !0, forced: !0 }, { from: Dbn });
var Pbn = m5,
  Mbn = function () {
    return new this(Pbn(arguments));
  },
  Cbn = ci,
  $bn = Mbn;
Cbn({ target: "Map", stat: !0, forced: !0 }, { of: $bn });
var xbn = TR,
  Hf = function (t) {
    if (
      ti(t) == "object" &&
      "size" in t &&
      "has" in t &&
      "get" in t &&
      "set" in t &&
      "delete" in t &&
      "entries" in t
    )
      return t;
    throw TypeError(xbn(t) + " is not a map");
  },
  Lbn = function (t, e) {
    return e == 1
      ? function (n, r) {
          return n[t](r);
        }
      : function (n, r, i) {
          return n[t](r, i);
        };
  },
  Obn = kd,
  G3 = Lbn,
  REe = Obn("Map"),
  bb = {
    Map: REe,
    set: G3("set", 2),
    get: G3("get", 1),
    has: G3("has", 1),
    remove: G3("delete", 1),
    proto: REe.prototype,
  },
  Gbn = ci,
  Nbn = Hf,
  Fbn = bb.remove;
Gbn(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    deleteAll: function () {
      for (
        var t, e = Nbn(this), n = !0, r = 0, i = arguments.length;
        r < i;
        r++
      )
        (t = Fbn(e, arguments[r])), (n = n && t);
      return !!n;
    },
  }
);
var Ubn = ci,
  Bbn = Hf,
  iue = bb,
  Hbn = iue.get,
  Xbn = iue.has,
  AEe = iue.set;
Ubn(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    emplace: function (t, e) {
      var n,
        r,
        i = Bbn(this);
      return Xbn(i, t)
        ? ((n = Hbn(i, t)),
          "update" in e && ((n = e.update(n, t, i)), AEe(i, t, n)),
          n)
        : ((r = e.insert(t, i)), AEe(i, t, r), r);
    },
  }
);
var Vbn = Vl,
  zbn = function (t, e, n) {
    for (var r, i, o = n || t.next; !(r = Vbn(o, t)).done; )
      if ((i = e(r.value)) !== void 0) return i;
  },
  jbn = zbn,
  Rv = function (t, e, n) {
    return n
      ? jbn($s(t).call(t), function (r) {
          return e(r[1], r[0]);
        })
      : t.forEach(e);
  },
  Wbn = ci,
  Kbn = Id,
  Zbn = Hf,
  Ybn = Rv;
Wbn(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    every: function (t) {
      var e = Zbn(this),
        n = Kbn(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        Ybn(
          e,
          function (r, i) {
            if (!n(r, i, e)) return !1;
          },
          !0
        ) !== !1
      );
    },
  }
);
var Qbn = ci,
  Jbn = Id,
  qbn = Hf,
  kXe = bb,
  e_n = Rv,
  t_n = kXe.Map,
  n_n = kXe.set;
Qbn(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    filter: function (t) {
      var e = qbn(this),
        n = Jbn(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new t_n();
      return (
        e_n(e, function (i, o) {
          n(i, o, e) && n_n(r, o, i);
        }),
        r
      );
    },
  }
);
var r_n = ci,
  i_n = Id,
  a_n = Hf,
  o_n = Rv;
r_n(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    find: function (t) {
      var e = a_n(this),
        n = i_n(t, arguments.length > 1 ? arguments[1] : void 0),
        r = o_n(
          e,
          function (i, o) {
            if (n(i, o, e)) return { value: i };
          },
          !0
        );
      return r && r.value;
    },
  }
);
var s_n = ci,
  l_n = Id,
  u_n = Hf,
  c_n = Rv;
s_n(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    findKey: function (t) {
      var e = u_n(this),
        n = l_n(t, arguments.length > 1 ? arguments[1] : void 0),
        r = c_n(
          e,
          function (i, o) {
            if (n(i, o, e)) return { key: o };
          },
          !0
        );
      return r && r.key;
    },
  }
);
var d_n = ci,
  h_n = ss,
  f_n = nd,
  p_n = kD,
  g_n = N0,
  RB = bb,
  m_n = RB.Map,
  y_n = RB.has,
  v_n = RB.get,
  b_n = RB.set,
  __n = h_n([].push);
d_n(
  { target: "Map", stat: !0, forced: !0 },
  {
    groupBy: function (t, e) {
      p_n(t), f_n(e);
      var n = new m_n(),
        r = 0;
      return (
        g_n(t, function (i) {
          var o = e(i, r++);
          y_n(n, o) ? __n(v_n(n, o), i) : b_n(n, o, [i]);
        }),
        n
      );
    },
  }
);
var T_n = function (t, e) {
    return t === e || (t != t && e != e);
  },
  E_n = ci,
  S_n = T_n,
  R_n = Hf,
  A_n = Rv;
E_n(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    includes: function (t) {
      return (
        A_n(
          R_n(this),
          function (e) {
            if (S_n(e, t)) return !0;
          },
          !0
        ) === !0
      );
    },
  }
);
var w_n = ci,
  k_n = Vl,
  I_n = N0,
  D_n = Xl,
  wEe = nd,
  P_n = bb.Map;
w_n(
  { target: "Map", stat: !0, forced: !0 },
  {
    keyBy: function (t, e) {
      var n = new (D_n(this) ? this : P_n)();
      wEe(e);
      var r = wEe(n.set);
      return (
        I_n(t, function (i) {
          k_n(r, n, e(i), i);
        }),
        n
      );
    },
  }
);
var M_n = ci,
  C_n = Hf,
  $_n = Rv;
M_n(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    keyOf: function (t) {
      var e = $_n(
        C_n(this),
        function (n, r) {
          if (n === t) return { key: r };
        },
        !0
      );
      return e && e.key;
    },
  }
);
var x_n = ci,
  L_n = Id,
  O_n = Hf,
  IXe = bb,
  G_n = Rv,
  N_n = IXe.Map,
  F_n = IXe.set;
x_n(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    mapKeys: function (t) {
      var e = O_n(this),
        n = L_n(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new N_n();
      return (
        G_n(e, function (i, o) {
          F_n(r, n(i, o, e), i);
        }),
        r
      );
    },
  }
);
var U_n = ci,
  B_n = Id,
  H_n = Hf,
  DXe = bb,
  X_n = Rv,
  V_n = DXe.Map,
  z_n = DXe.set;
U_n(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    mapValues: function (t) {
      var e = H_n(this),
        n = B_n(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new V_n();
      return (
        X_n(e, function (i, o) {
          z_n(r, o, n(i, o, e));
        }),
        r
      );
    },
  }
);
var j_n = ci,
  W_n = Hf,
  K_n = N0,
  Z_n = bb.set;
j_n(
  { target: "Map", proto: !0, real: !0, arity: 1, forced: !0 },
  {
    merge: function (t) {
      for (var e = W_n(this), n = arguments.length, r = 0; r < n; )
        K_n(
          arguments[r++],
          function (i, o) {
            Z_n(e, i, o);
          },
          { AS_ENTRIES: !0 }
        );
      return e;
    },
  }
);
var Y_n = ci,
  Q_n = nd,
  J_n = Hf,
  q_n = Rv,
  eTn = TypeError;
Y_n(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    reduce: function (t) {
      var e = J_n(this),
        n = arguments.length < 2,
        r = n ? void 0 : arguments[1];
      if (
        (Q_n(t),
        q_n(e, function (i, o) {
          n ? ((n = !1), (r = i)) : (r = t(r, i, o, e));
        }),
        n)
      )
        throw eTn("Reduce of empty map with no initial value");
      return r;
    },
  }
);
var tTn = ci,
  nTn = Id,
  rTn = Hf,
  iTn = Rv;
tTn(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    some: function (t) {
      var e = rTn(this),
        n = nTn(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        iTn(
          e,
          function (r, i) {
            if (n(r, i, e)) return !0;
          },
          !0
        ) === !0
      );
    },
  }
);
var aTn = ci,
  kEe = nd,
  oTn = Hf,
  aue = bb,
  sTn = TypeError,
  lTn = aue.get,
  uTn = aue.has,
  cTn = aue.set;
aTn(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    update: function (t, e) {
      var n = oTn(this),
        r = arguments.length;
      kEe(e);
      var i = uTn(n, t);
      if (!i && r < 3) throw sTn("Updating absent value");
      var o = i ? lTn(n, t) : kEe(r > 2 ? arguments[2] : void 0)(t, n);
      return cTn(n, t, e(o, t, n)), n;
    },
  }
);
var N3 = Vl,
  Oj = nd,
  F3 = Xl,
  dTn = oh,
  hTn = TypeError,
  PXe = function (t, e) {
    var n,
      r = dTn(this),
      i = Oj(r.get),
      o = Oj(r.has),
      l = Oj(r.set),
      u = arguments.length > 2 ? arguments[2] : void 0;
    if (!F3(e) && !F3(u)) throw hTn("At least one callback required");
    return (
      N3(o, r, t)
        ? ((n = N3(i, r, t)), F3(e) && ((n = e(n)), N3(l, r, t, n)))
        : F3(u) && ((n = u()), N3(l, r, t, n)),
      n
    );
  },
  fTn = ci,
  pTn = PXe;
fTn({ target: "Map", proto: !0, real: !0, forced: !0 }, { upsert: pTn });
var gTn = ci,
  mTn = PXe;
gTn(
  { target: "Map", proto: !0, real: !0, name: "upsert", forced: !0 },
  { updateOrInsert: mTn }
);
var yTn = Tbn,
  vTn = yTn,
  bTn = vTn,
  _Tn = bTn,
  MXe = Ea(_Tn),
  TTn = oh,
  ETn = b7e,
  STn = function (t, e, n, r) {
    try {
      return r ? e(TTn(n)[0], n[1]) : e(n);
    } catch (i) {
      ETn(t, "throw", i);
    }
  },
  RTn = Id,
  ATn = Vl,
  wTn = Qp,
  kTn = STn,
  ITn = v7e,
  DTn = fB,
  PTn = G0,
  IEe = PD,
  MTn = Ule,
  CTn = _B,
  DEe = Array,
  CXe = function (t) {
    var e = wTn(t),
      n = DTn(this),
      r = arguments.length,
      i = r > 1 ? arguments[1] : void 0,
      o = i !== void 0;
    o && (i = RTn(i, r > 2 ? arguments[2] : void 0));
    var l,
      u,
      c,
      d,
      h,
      f,
      p = CTn(e),
      g = 0;
    if (!p || (this === DEe && ITn(p)))
      for (l = PTn(e), u = n ? new this(l) : DEe(l); l > g; g++)
        (f = o ? i(e[g], g) : e[g]), IEe(u, g, f);
    else
      for (
        h = (d = MTn(e, p)).next, u = n ? new this() : [];
        !(c = ATn(h, d)).done;
        g++
      )
        (f = o ? kTn(d, i, [c.value, g], !0) : c.value), IEe(u, g, f);
    return (u.length = g), u;
  },
  $Tn = ci,
  xTn = CXe,
  LTn = z7e,
  OTn = !LTn(function (t) {
    RE(t);
  });
$Tn({ target: "Array", stat: !0, forced: OTn }, { from: xTn });
var GTn = Vs,
  NTn = GTn.Array.from,
  FTn = NTn,
  UTn = FTn,
  BTn = UTn,
  HTn = BTn,
  XTn = HTn,
  VTn = XTn,
  zTn = VTn,
  jTn = zTn,
  $Xe = Ea(jTn),
  WTn = rd,
  KTn = pS(WTn("Array")),
  ZTn = KTn,
  YTn = ZTn,
  QTn = kE,
  JTn = Zu,
  qTn = Pu,
  eEn = YTn,
  Gj = Array.prototype,
  tEn = { DOMTokenList: !0, NodeList: !0 },
  nEn = function (t) {
    var e = pS(t);
    return t === Gj || (qTn(Gj, t) && e === pS(Gj)) || JTn(tEn, QTn(t))
      ? eEn
      : e;
  },
  rEn = nEn,
  iEn = rEn,
  aEn = iEn,
  oEn = aEn,
  sEn = oEn,
  lEn = sEn,
  lc = Ea(lEn),
  uEn = (function () {
    function t(e) {
      Mo(this, t),
        ca(this, "ctx", void 0),
        ca(this, "strategyMap", new MXe()),
        (this.ctx = e);
    }
    return (
      Co(t, [
        {
          key: "registerStrategy",
          value: function (e) {
            var n;
            return !(
              e == null ||
              (n = e.Strategy) === null ||
              n === void 0 ||
              !n.strategyName ||
              (this.strategyMap.get(e.Strategy.strategyName) ||
                this.strategyMap.set(e.Strategy.strategyName, {
                  inst: new e.Strategy({
                    ctx: this.ctx,
                    config: e.config,
                    strategyName: e.Strategy.strategyName,
                    strategyCenter: this,
                  }),
                }),
              0)
            );
          },
        },
        {
          key: "getStrategyInstByName",
          value: function (e) {
            var n;
            return e &&
              (n = this.strategyMap.get(e)) !== null &&
              n !== void 0 &&
              n.inst
              ? this.strategyMap.get(e).inst
              : null;
          },
        },
        {
          key: "getStrategyList",
          value: function () {
            var e, n;
            return Ky((e = $Xe(lc((n = this.strategyMap)).call(n)))).call(
              e,
              function (r) {
                return r.inst;
              }
            );
          },
        },
        {
          key: "getStrategyByName",
          value: function (e) {
            return e && this.strategyMap.get(e)
              ? this.strategyMap.get(e)
              : null;
          },
        },
        { key: "registerAlgorithm", value: function () {} },
        { key: "getStrategyInstByNameAsync", value: function () {} },
        { key: "loadStrategySrcAsync", value: function () {} },
      ]),
      t
    );
  })(),
  cEn = (function () {
    function t(e) {
      Mo(this, t), ca(this, "inst", void 0), (this.inst = e.inst);
    }
    return (
      Co(t, [
        {
          key: "getInst",
          value: function () {
            return this.inst;
          },
        },
        {
          key: "getPlayerConfig",
          value: function () {
            var e;
            return (e = this.inst) === null || e === void 0
              ? void 0
              : e.playerConfig;
          },
        },
        {
          key: "getStrategyConfig",
          value: function () {
            var e;
            return (e = this.inst) === null || e === void 0
              ? void 0
              : e.strategyConfig;
          },
        },
      ]),
      t
    );
  })(),
  dEn = (function () {
    function t() {
      Mo(this, t), ca(this, "players", void 0), (this.players = new MXe());
    }
    return (
      Co(t, [
        {
          key: "get",
          value: function (e) {
            return this.players.get(e);
          },
        },
        {
          key: "addPlayer",
          value: function (e, n) {
            return !(
              !e ||
              this.players.get(e) ||
              (this.players.set(e, new cEn(n)), 0)
            );
          },
        },
        {
          key: "getPlayerList",
          value: function () {
            var e;
            return $Xe(lc((e = this.players)).call(e));
          },
        },
        {
          key: "removePlayer",
          value: function (e) {
            return !(!e || !this.players.get(e) || (this.players.delete(e), 0));
          },
        },
      ]),
      t
    );
  })();
(function () {
  function t(e) {
    Mo(this, t),
      ca(this, "strategyCenter", void 0),
      ca(this, "ctx", void 0),
      ca(this, "config", void 0),
      ca(this, "player", void 0),
      ca(this, "strategyName", void 0),
      (this.ctx = e.ctx),
      (this.config = e.config),
      (this.strategyName = e.strategyName),
      (this.strategyCenter = e.strategyCenter),
      (this.player = null);
  }
  Co(t, [
    {
      key: "getStrategyConfig",
      value: function () {
        return this.config;
      },
    },
    {
      key: "setPlayerInst",
      value: function (e) {
        this.player = e.getInst();
      },
    },
    { key: "beforePlayerCreate", value: function (e) {} },
    { key: "onPlayerEvent", value: function (e, n) {} },
    { key: "onGlobalEvent", value: function (e, n) {} },
  ]);
})();
var hEn = (function () {
    function t(e) {
      Mo(this, t),
        ca(this, "tracker", void 0),
        ca(this, "_tea", void 0),
        ca(this, "ctx", void 0),
        ca(this, "options", void 0),
        (this.ctx = e.cxt),
        (this.options = e),
        this.initTracker(e),
        this.bindABVersion();
    }
    return (
      Co(t, [
        {
          key: "bindTrackerABVersion",
          value: function (e) {
            var n,
              r,
              i,
              o = this;
            !this._tea &&
              e &&
              (n = this.options) !== null &&
              n !== void 0 &&
              (n = n.trackInfo) !== null &&
              n !== void 0 &&
              n.enableABVersion &&
              ((this._tea = e),
              (r = this._tea) === null ||
                r === void 0 ||
                (i = r.filterEvent) === null ||
                i === void 0 ||
                i.call(r, function (l) {
                  var u, c;
                  return (
                    l == null ||
                      (u = l[0]) === null ||
                      u === void 0 ||
                      (u = u.events) === null ||
                      u === void 0 ||
                      (c = zu(u)) === null ||
                      c === void 0 ||
                      c.call(u, function (d) {
                        var h,
                          f,
                          p,
                          g = (
                            ((h = o.ctx) === null ||
                            h === void 0 ||
                            (h = h.dataCenter) === null ||
                            h === void 0
                              ? void 0
                              : h.getServiceStrategyConfig()) || {}
                          ).libra_ab_version;
                        !g ||
                          !d ||
                          ((f = d.ab_sdk_version) !== null &&
                            f !== void 0 &&
                            ZS(f).call(f, g)) ||
                          (d.ab_sdk_version = d.ab_sdk_version
                            ? Jd((p = "".concat(d.ab_sdk_version, ","))).call(
                                p,
                                g
                              )
                            : "".concat(g));
                      }),
                    l
                  );
                }));
          },
        },
        {
          key: "track",
          value: function (e, n) {
            var r, i;
            typeof this.tracker == "function"
              ? this.tracker(e, n)
              : (r = this.tracker) === null ||
                r === void 0 ||
                (i = r.event) === null ||
                i === void 0 ||
                i.call(r, e, n);
          },
        },
        {
          key: "initTracker",
          value: function (e) {
            var n, r;
            if (
              ZS((n = [yo.LIVE, yo.VOD])).call(n, e.type) &&
              (r = e.trackInfo) !== null &&
              r !== void 0 &&
              r.Collector &&
              typeof window < "u"
            ) {
              var i = "__vestrategy_".concat(e.type, "_tracker__");
              if (!window[i]) {
                (this.tracker = window[i] =
                  new e.trackInfo.Collector("".concat(e.type, "_tracker"))),
                  this.tracker.init({
                    app_id: e.appId,
                    channel: e.channel || Zle.CN,
                    log: !1,
                    disable_sdk_monitor: !0,
                  });
                var o = Jo(
                  {
                    play_type: e.type === yo.VOD ? 0 : 1,
                    line_app_id: e.lineAppId,
                    line_user_id: e.lineUserId,
                  },
                  nXe(this.ctx.featureCenter.getFeatureList())
                );
                return (
                  this.tracker.config(
                    Jo(
                      Jo({}, o),
                      {},
                      { user_unique_id: e.lineUserId, disable_auto_pv: !0 }
                    )
                  ),
                  void this.tracker.start()
                );
              }
              this.tracker = window[i];
            }
          },
        },
        {
          key: "bindABVersion",
          value: function () {
            var e,
              n,
              r = this;
            this.tracker &&
              ((e = this.tracker) === null ||
                e === void 0 ||
                (n = e.filterEvent) === null ||
                n === void 0 ||
                n.call(e, function (i) {
                  var o, l;
                  return (
                    i == null ||
                      (o = i[0]) === null ||
                      o === void 0 ||
                      (o = o.events) === null ||
                      o === void 0 ||
                      (l = zu(o)) === null ||
                      l === void 0 ||
                      l.call(o, function (u) {
                        var c,
                          d = (
                            ((c = r.ctx) === null ||
                            c === void 0 ||
                            (c = c.dataCenter) === null ||
                            c === void 0
                              ? void 0
                              : c.getServiceStrategyConfig()) || {}
                          ).libra_ab_version;
                        d && u && (u.ab_sdk_version = "".concat(d));
                      }),
                    i
                  );
                }));
          },
        },
      ]),
      t
    );
  })(),
  fEn = ci,
  pEn = ER;
fEn({ target: "Array", stat: !0 }, { isArray: pEn });
var I2,
  gEn = Vs,
  mEn = gEn.Array.isArray,
  yEn = mEn,
  vEn = yEn,
  bEn = vEn,
  _En = bEn,
  TEn = _En,
  EEn = TEn,
  SEn = EEn,
  REn = SEn,
  w1 = Ea(REn),
  xXe = (function (t) {
    return (
      (t.Equal = "＝"),
      (t.NotEqual = "≠"),
      (t.Greater = ">"),
      (t.GreaterOrEqual = "≥"),
      (t.Less = "<"),
      (t.LessOrEqual = "≤"),
      t
    );
  })(xXe || {}),
  LXe =
    (ca((I2 = {}), "＝", {
      validate: function (t, e) {
        var n;
        return w1(lc(t)) ? ZS((n = lc(t))).call(n, e) : lc(t) === e;
      },
    }),
    ca(I2, "≠", {
      validate: function (t, e) {
        var n;
        return w1(lc(t)) ? !ZS((n = lc(t))).call(n, e) : lc(t) !== e;
      },
    }),
    ca(I2, ">", {
      validate: function (t, e) {
        return !w1(lc(t)) && typeof lc(t) != "boolean" && e > lc(t);
      },
    }),
    ca(I2, "≥", {
      validate: function (t, e) {
        return !w1(lc(t)) && typeof lc(t) != "boolean" && e >= lc(t);
      },
    }),
    ca(I2, "<", {
      validate: function (t, e) {
        return !w1(lc(t)) && typeof lc(t) != "boolean" && e < lc(t);
      },
    }),
    ca(I2, "≤", {
      validate: function (t, e) {
        return !w1(lc(t)) && typeof lc(t) != "boolean" && e <= lc(t);
      },
    }),
    I2);
function oue(t, e, n) {
  var r;
  return (
    t == null ||
      zu(t).call(t, function (i) {
        var o;
        if ("conditions" in i && i.conditions)
          o = oue(i.conditions, e, i.logic);
        else if ("key" in i) {
          var l,
            u = e[i == null ? void 0 : i.key];
          o =
            (l = LXe[i == null ? void 0 : i.op]) === null || l === void 0
              ? void 0
              : l.validate(i, u);
        }
        r = r === void 0 ? o : n === "||" ? r || o : r && o;
      }),
    r
  );
}
function AEn(t, e) {
  var n = {};
  if (t)
    return (
      zu(t).call(t, function (r) {
        oue(r.conditions, e, r.logic) && (n = Jo(Jo({}, n), r.config));
      }),
      n
    );
}
UBe({
  __proto__: null,
  Operator: xXe,
  getConfigWithRule: AEn,
  operators: LXe,
  validate: oue,
});
var Nj = new Yle("VeStrategy-BasePlugin"),
  Fj = (function (t) {
    qp(n, $I);
    var e = eg(n);
    function n(r) {
      var i, o, l, u, c;
      Mo(this, n),
        ca(bk((c = e.call(this, r))), "ctx", void 0),
        ca(bk(c), "strategyCenter", void 0),
        ca(bk(c), "videoType", void 0),
        ca(bk(c), "playerLogEventHandler", function (h, f) {
          var p, g;
          return typeof h == "string"
            ? (p = c.ctx) === null ||
              p === void 0 ||
              (p = p.tracker) === null ||
              p === void 0 ||
              (g = p.track) === null ||
              g === void 0
              ? void 0
              : g.call(p, h, f)
            : w1(h)
            ? zu(h).call(h, function (y) {
                var v,
                  b,
                  w = y.eventName,
                  k = y.params;
                (v = c.ctx) === null ||
                  v === void 0 ||
                  (v = v.tracker) === null ||
                  v === void 0 ||
                  (b = v.track) === null ||
                  b === void 0 ||
                  b.call(v, w, k);
              })
            : void 0;
        }),
        (c.ctx = r.config.ctx),
        (c.videoType = r.config.videoType),
        (c.strategyCenter = r.config.strategyCenter),
        Nj.update(
          (i = c.ctx) === null ||
            i === void 0 ||
            (i = i.dataCenter) === null ||
            i === void 0 ||
            (i = i.getAppConfig()) === null ||
            i === void 0
            ? void 0
            : i.log
        );
      var d = {
        playerId: c.player.playerId,
        playerConfig: null,
        strategyConfig: null,
        strategyCenter: c.strategyCenter,
      };
      return (
        VI(d, "playerConfig", {
          get: function () {
            return c.playerConfig;
          },
        }),
        VI(d, "strategyConfig", {
          get: function () {
            return r.config.strategyConfig;
          },
        }),
        c.player.playerId &&
          c.ctx.playerManager.addPlayer(c.player.playerId, { inst: d }),
        (o = c.strategyCenter) === null ||
          o === void 0 ||
          (l = o.getStrategyList) === null ||
          l === void 0 ||
          zu((u = l.call(o))).call(u, function (h) {
            var f, p;
            h == null ||
              (f = h.setPlayerInst) === null ||
              f === void 0 ||
              f.call(h, c.ctx.playerManager.get(c.player.playerId)),
              h == null ||
                (p = h.onBasePluginCreated) === null ||
                p === void 0 ||
                p.call(h, c.ctx.playerManager.get(c.player.playerId));
          }),
        Nj.info("BasePluginInit", r.config),
        c
      );
    }
    return (
      Co(
        n,
        [
          {
            key: "afterPlayerInit",
            value: function () {
              var r, i, o;
              this.player.on("abLog", this.playerLogEventHandler),
                this.videoType === yo.VOD &&
                  ((r = this.ctx) === null ||
                    r === void 0 ||
                    (r = r.tracker) === null ||
                    r === void 0 ||
                    (i = r.bindTrackerABVersion) === null ||
                    i === void 0 ||
                    i.call(
                      r,
                      (o = this.player) === null ||
                        o === void 0 ||
                        (o = o.vodLogger) === null ||
                        o === void 0
                        ? void 0
                        : o.tracker
                    )),
                this.videoType,
                yo.LIVE;
            },
          },
          {
            key: "patchEvent",
            value: function (r, i) {
              var o,
                l,
                u,
                c,
                d = this;
              (o = this.strategyCenter) === null ||
                o === void 0 ||
                (l = o.getStrategyList) === null ||
                l === void 0 ||
                zu((u = l.call(o))).call(u, function (h) {
                  var f;
                  h == null ||
                    (f = h.onPlayerEvent) === null ||
                    f === void 0 ||
                    f.call(h, r, { playerInst: h, options: i });
                }),
                (c = this.ctx.playerManager.getPlayerList()) === null ||
                  c === void 0 ||
                  zu(c).call(c, function (h) {
                    var f, p, g;
                    (h == null ||
                    (f = h.getInst) === null ||
                    f === void 0 ||
                    (f = f.call(h)) === null ||
                    f === void 0
                      ? void 0
                      : f.playerId) !== d.player.playerId &&
                      (h == null ||
                        (p = h.getInst) === null ||
                        p === void 0 ||
                        (p = p.call(h)) === null ||
                        p === void 0 ||
                        (p = p.strategyCenter) === null ||
                        p === void 0 ||
                        (g = p.getStrategyList) === null ||
                        g === void 0 ||
                        (g = g.call(p)) === null ||
                        g === void 0 ||
                        zu(g).call(g, function (y) {
                          var v;
                          y == null ||
                            (v = y.onGlobalEvent) === null ||
                            v === void 0 ||
                            v.call(y, r, { playerInst: h, options: i });
                        }));
                  });
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r = this;
              this.on(C0, function (i) {
                r.patchEvent(C0, i), Nj.info("Event", C0);
              });
            },
          },
          {
            key: "destroy",
            value: function () {
              this.ctx.playerManager.removePlayer(this.player.playerId),
                this.player.off("abLog", this.playerLogEventHandler);
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "veStrategyBasePlugin";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { text: "策略基础插件" };
            },
          },
        ]
      ),
      n
    );
  })(),
  wEn = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(t, [
        {
          key: "apply",
          value: function (e, n) {
            var r,
              i,
              o = this,
              l = n || {},
              u = l.plugins,
              c = l.pluginConfiguration,
              d = l.result;
            return (
              e &&
              (u != null && u.length && w1(e.presets)
                ? e.presets.unshift(
                    Co(function h() {
                      Mo(this, h), ca(this, "plugins", u);
                    })
                  )
                : u != null &&
                  u.length &&
                  w1(e.plugins) &&
                  (e.plugins = Jd(u).call(u, e.plugins)),
              u != null &&
                u.length &&
                c &&
                zu((i = Df(c))).call(i, function (h) {
                  e[h] = c[h];
                }),
              d &&
                zu((r = Df(d))).call(r, function (h) {
                  h === iXe.adaptRange && o.adaptRange(e, d[h]);
                }),
              e)
            );
          },
        },
        {
          key: "_findConfig",
          value: function (e, n) {
            var r;
            return Hy((r = Df(e))).call(r, function (i) {
              return (i == null ? void 0 : i.toLowerCase()) === n;
            });
          },
        },
        {
          key: "adaptRange",
          value: function (e, n) {
            var r, i;
            if (
              n == null ||
              !n.enable ||
              !e ||
              n == null ||
              !n._vtype ||
              !ZS((r = [GF.MP4, GF.DASH])).call(r, n._vtype)
            )
              return e;
            var o = this._findConfig(
              e,
              n._vtype === GF.MP4 ? "mp4encryptplayer" : "dashplugin"
            );
            return (
              o &&
                e[o] &&
                n.options &&
                (e[o].adaptRange = Jo(
                  Jo(
                    {},
                    (i = e[o].adaptRange) !== null && i !== void 0 ? i : {}
                  ),
                  n.options
                )),
              e
            );
          },
        },
      ]),
      t
    );
  })(),
  kEn = Zo,
  IEn = rl,
  DEn = Ku,
  PEe = qBe,
  PEn = IEn("iterator"),
  sue = !kEn(function () {
    var t = new Bs("b?a=1&b=2&c=3", "http://a"),
      e = t.searchParams,
      n = new aC("a=1&a=2"),
      r = "";
    return (
      (t.pathname = "c%20d"),
      e.forEach(function (i, o) {
        e.delete("b"), (r += o + i);
      }),
      n.delete("a", 2),
      (PEe && (!t.toJSON || !n.has("a", 1) || n.has("a", 2))) ||
        (!e.size && (PEe || !DEn)) ||
        !mm(e) ||
        t.href !== "http://a/c%20d?a=1&c=3" ||
        e.get("c") !== "3" ||
        String(new aC("?a=1")) !== "a=1" ||
        !e[PEn] ||
        new Bs("https://a@b").username !== "a" ||
        new aC(new aC("a=b")).get("a") !== "b" ||
        new Bs("http://тест").host !== "xn--e1aybc" ||
        new Bs("http://a#б").hash !== "#%D0%B1" ||
        r !== "a1c3" ||
        new Bs("http://x", void 0).host !== "x"
    );
  }),
  MEe = Dle,
  MEn = Math.floor,
  CEn = function t(e, n) {
    var r = e.length,
      i = MEn(r / 2);
    return r < 8 ? $En(e, n) : xEn(e, t(MEe(e, 0, i), n), t(MEe(e, i), n), n);
  },
  $En = function (t, e) {
    for (var n, r, i = t.length, o = 1; o < i; ) {
      for (r = o, n = t[o]; r && e(t[r - 1], n) > 0; ) t[r] = t[--r];
      r !== o++ && (t[r] = n);
    }
    return t;
  },
  xEn = function (t, e, n, r) {
    for (var i = e.length, o = n.length, l = 0, u = 0; l < i || u < o; )
      t[l + u] =
        l < i && u < o
          ? r(e[l], n[u]) <= 0
            ? e[l++]
            : n[u++]
          : l < i
          ? e[l++]
          : n[u++];
    return t;
  },
  LEn = CEn,
  Uj = ci,
  zI = Dl,
  U3 = Vl,
  mv = ss,
  _k = Ku,
  CEe = sue,
  $Ee = DE,
  OEn = f5,
  GEn = AXe,
  NEn = vb,
  FEn = XHe,
  lue = PE,
  OXe = _5,
  Bj = Xl,
  UEn = Zu,
  BEn = Id,
  HEn = kE,
  XEn = oh,
  GXe = fc,
  Ih = Jp,
  VEn = IE,
  xEe = wE,
  Hte = Ule,
  zEn = _B,
  WA = TB,
  jEn = rl,
  WEn = LEn,
  KEn = jEn("iterator"),
  Ux = "URLSearchParams",
  NXe = Ux + "Iterator",
  FXe = lue.set,
  Hg = lue.getterFor(Ux),
  ZEn = lue.getterFor(NXe),
  YEn = ih,
  uue = function (t) {
    if (!_k) return zI[t];
    var e = YEn(zI, t);
    return e && e.value;
  },
  LEe = uue("fetch"),
  UU = uue("Request"),
  y$ = uue("Headers"),
  Hj = UU && UU.prototype,
  OEe = y$ && y$.prototype,
  QEn = zI.RegExp,
  JEn = zI.TypeError,
  UXe = zI.decodeURIComponent,
  qEn = zI.encodeURIComponent,
  e2n = mv("".charAt),
  GEe = mv([].join),
  yS = mv([].push),
  Xte = mv("".replace),
  t2n = mv([].shift),
  NEe = mv(tl([])),
  FEe = mv("".split),
  n2n = mv(jn("")),
  r2n = /\+/g,
  UEe = Array(4),
  i2n = function (t) {
    return (
      UEe[t - 1] || (UEe[t - 1] = QEn("((?:%[\\da-f]{2}){" + t + "})", "gi"))
    );
  },
  a2n = function (t) {
    try {
      return UXe(t);
    } catch {
      return t;
    }
  },
  BEe = function (t) {
    var e = Xte(t, r2n, " "),
      n = 4;
    try {
      return UXe(e);
    } catch {
      for (; n; ) e = Xte(e, i2n(n--), a2n);
      return e;
    }
  },
  o2n = /[!'()~]|%20/g,
  s2n = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
  },
  l2n = function (t) {
    return s2n[t];
  },
  HEe = function (t) {
    return Xte(qEn(t), o2n, l2n);
  },
  Xj = FEn(
    function (t, e) {
      FXe(this, { type: NXe, iterator: Hte($s(Hg(t))), kind: e });
    },
    "Iterator",
    function () {
      var t = ZEn(this),
        e = t.kind,
        n = t.iterator.next(),
        r = n.value;
      return (
        n.done ||
          (n.value =
            e === "keys" ? r.key : e === "values" ? r.value : [r.key, r.value]),
        n
      );
    },
    !0
  ),
  BXe = function (t) {
    (this.entries = []),
      (this.url = null),
      t !== void 0 &&
        (GXe(t)
          ? this.parseObject(t)
          : this.parseQuery(
              typeof t == "string" ? (e2n(t, 0) === "?" ? n2n(t, 1) : t) : Ih(t)
            ));
  };
BXe.prototype = {
  type: Ux,
  bindURL: function (t) {
    (this.url = t), this.update();
  },
  parseObject: function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = zEn(t);
    if (c)
      for (n = (e = Hte(t, c)).next; !(r = U3(n, e)).done; ) {
        if (
          ((o = (i = Hte(XEn(r.value))).next),
          (l = U3(o, i)).done || (u = U3(o, i)).done || !U3(o, i).done)
        )
          throw JEn("Expected sequence with length 2");
        yS($s(this), { key: Ih(l.value), value: Ih(u.value) });
      }
    else
      for (var d in t) UEn(t, d) && yS($s(this), { key: d, value: Ih(t[d]) });
  },
  parseQuery: function (t) {
    if (t)
      for (var e, n, r = FEe(t, "&"), i = 0; i < r.length; )
        (e = r[i++]).length &&
          ((n = FEe(e, "=")),
          yS($s(this), { key: BEe(t2n(n)), value: BEe(GEe(n, "=")) }));
  },
  serialize: function () {
    for (var t, e = $s(this), n = [], r = 0; r < e.length; )
      (t = e[r++]), yS(n, HEe(t.key) + "=" + HEe(t.value));
    return GEe(n, "&");
  },
  update: function () {
    ($s(this).length = 0), this.parseQuery(this.url.query);
  },
  updateURL: function () {
    this.url && this.url.update();
  },
};
var BU = function () {
    OXe(this, Kw);
    var t = FXe(this, new BXe(arguments.length > 0 ? arguments[0] : void 0));
    _k || (this.size = $s(t).length);
  },
  Kw = BU.prototype;
if (
  (GEn(
    Kw,
    {
      append: function (t, e) {
        var n = Hg(this);
        WA(arguments.length, 2),
          yS($s(n), { key: Ih(t), value: Ih(e) }),
          _k || this.length++,
          n.updateURL();
      },
      delete: function (t) {
        for (
          var e = Hg(this),
            n = WA(arguments.length, 1),
            r = $s(e),
            i = Ih(t),
            o = n < 2 ? void 0 : arguments[1],
            l = o === void 0 ? o : Ih(o),
            u = 0;
          u < r.length;

        ) {
          var c = r[u];
          if (c.key !== i || (l !== void 0 && c.value !== l)) u++;
          else if ((NEe(r, u, 1), l !== void 0)) break;
        }
        _k || (this.size = r.length), e.updateURL();
      },
      get: function (t) {
        var e = $s(Hg(this));
        WA(arguments.length, 1);
        for (var n = Ih(t), r = 0; r < e.length; r++)
          if (e[r].key === n) return e[r].value;
        return null;
      },
      getAll: function (t) {
        var e = $s(Hg(this));
        WA(arguments.length, 1);
        for (var n = Ih(t), r = [], i = 0; i < e.length; i++)
          e[i].key === n && yS(r, e[i].value);
        return r;
      },
      has: function (t) {
        for (
          var e = $s(Hg(this)),
            n = WA(arguments.length, 1),
            r = Ih(t),
            i = n < 2 ? void 0 : arguments[1],
            o = i === void 0 ? i : Ih(i),
            l = 0;
          l < e.length;

        ) {
          var u = e[l++];
          if (u.key === r && (o === void 0 || u.value === o)) return !0;
        }
        return !1;
      },
      set: function (t, e) {
        var n = Hg(this);
        WA(arguments.length, 1);
        for (
          var r, i = $s(n), o = !1, l = Ih(t), u = Ih(e), c = 0;
          c < i.length;
          c++
        )
          (r = i[c]).key === l &&
            (o ? NEe(i, c--, 1) : ((o = !0), (r.value = u)));
        o || yS(i, { key: l, value: u }),
          _k || (this.size = i.length),
          n.updateURL();
      },
      sort: function () {
        var t = Hg(this);
        WEn($s(t), function (e, n) {
          return e.key > n.key ? 1 : -1;
        }),
          t.updateURL();
      },
      forEach: function (t) {
        for (
          var e,
            n = $s(Hg(this)),
            r = BEn(t, arguments.length > 1 ? arguments[1] : void 0),
            i = 0;
          i < n.length;

        )
          r((e = n[i++]).value, e.key, this);
      },
      keys: function () {
        return new Xj(this, "keys");
      },
      values: function () {
        return new Xj(this, "values");
      },
      entries: function () {
        return new Xj(this, "entries");
      },
    },
    { enumerable: !0 }
  ),
  $Ee(Kw, KEn, $s(Kw), { name: "entries" }),
  $Ee(
    Kw,
    "toString",
    function () {
      return Hg(this).serialize();
    },
    { enumerable: !0 }
  ),
  _k &&
    OEn(Kw, "size", {
      get: function () {
        return $s(Hg(this)).length;
      },
      configurable: !0,
      enumerable: !0,
    }),
  NEn(BU, Ux),
  Uj({ global: !0, constructor: !0, forced: !CEe }, { URLSearchParams: BU }),
  !CEe && Bj(y$))
) {
  var u2n = mv(OEe.has),
    c2n = mv(OEe.set),
    XEe = function (t) {
      if (GXe(t)) {
        var e,
          n = t.body;
        if (HEn(n) === Ux)
          return (
            (e = t.headers ? new y$(t.headers) : new y$()),
            u2n(e, "content-type") ||
              c2n(
                e,
                "content-type",
                "application/x-www-form-urlencoded;charset=UTF-8"
              ),
            VEn(t, { body: xEe(0, Ih(n)), headers: xEe(0, e) })
          );
      }
      return t;
    };
  if (
    (Bj(LEe) &&
      Uj(
        { global: !0, enumerable: !0, dontCallGetSet: !0, forced: !0 },
        {
          fetch: function (t) {
            return LEe(t, arguments.length > 1 ? XEe(arguments[1]) : {});
          },
        }
      ),
    Bj(UU))
  ) {
    var Vj = function (t) {
      return (
        OXe(this, Hj), new UU(t, arguments.length > 1 ? XEe(arguments[1]) : {})
      );
    };
    (Hj.constructor = Vj),
      (Vj.prototype = Hj),
      Uj(
        { global: !0, constructor: !0, dontCallGetSet: !0, forced: !0 },
        { Request: Vj }
      );
  }
}
var Ig,
  d2n = { URLSearchParams: BU, getState: Hg },
  RR = ss,
  zj = 2147483647,
  v$ = 36,
  HXe = 1,
  Vte = 26,
  h2n = 38,
  f2n = 700,
  p2n = 72,
  g2n = 128,
  m2n = "-",
  y2n = /[^\0-\u007E]/,
  XXe = /[.\u3002\uFF0E\uFF61]/g,
  VEe = "Overflow: input needs wider integers to process",
  jj = v$ - HXe,
  zEe = RangeError,
  v2n = RR(XXe.exec),
  Tk = Math.floor,
  Wj = String.fromCharCode,
  jEe = RR("".charCodeAt),
  VXe = RR([].join),
  PT = RR([].push),
  b2n = RR("".replace),
  _2n = RR("".split),
  T2n = RR("".toLowerCase),
  E2n = function (t) {
    for (var e = [], n = 0, r = t.length; n < r; ) {
      var i = jEe(t, n++);
      if (i >= 55296 && i <= 56319 && n < r) {
        var o = jEe(t, n++);
        (64512 & o) == 56320
          ? PT(e, ((1023 & i) << 10) + (1023 & o) + 65536)
          : (PT(e, i), n--);
      } else PT(e, i);
    }
    return e;
  },
  WEe = function (t) {
    return t + 22 + 75 * (t < 26);
  },
  S2n = function (t, e, n) {
    var r = 0;
    for (t = n ? Tk(t / f2n) : t >> 1, t += Tk(t / e); t > (jj * Vte) >> 1; )
      (t = Tk(t / jj)), (r += v$);
    return Tk(r + ((jj + 1) * t) / (t + h2n));
  },
  R2n = function (t) {
    var e,
      n,
      r = [],
      i = (t = E2n(t)).length,
      o = g2n,
      l = 0,
      u = p2n;
    for (e = 0; e < t.length; e++) (n = t[e]) < 128 && PT(r, Wj(n));
    var c = r.length,
      d = c;
    for (c && PT(r, m2n); d < i; ) {
      var h = zj;
      for (e = 0; e < t.length; e++) (n = t[e]) >= o && n < h && (h = n);
      var f = d + 1;
      if (h - o > Tk((zj - l) / f)) throw zEe(VEe);
      for (l += (h - o) * f, o = h, e = 0; e < t.length; e++) {
        if ((n = t[e]) < o && ++l > zj) throw zEe(VEe);
        if (n == o) {
          for (var p = l, g = v$; ; ) {
            var y = g <= u ? HXe : g >= u + Vte ? Vte : g - u;
            if (p < y) break;
            var v = p - y,
              b = v$ - y;
            PT(r, Wj(WEe(y + (v % b)))), (p = Tk(v / b)), (g += v$);
          }
          PT(r, Wj(WEe(p))), (u = S2n(l, f, d == c)), (l = 0), d++;
        }
      }
      l++, o++;
    }
    return VXe(r, "");
  },
  A2n = function (t) {
    var e,
      n,
      r = [],
      i = _2n(b2n(T2n(t), XXe, "."), ".");
    for (e = 0; e < i.length; e++)
      (n = i[e]), PT(r, v2n(y2n, n) ? "xn--" + R2n(n) : n);
    return VXe(r, ".");
  },
  w2n = ci,
  cue = Ku,
  k2n = sue,
  due = Dl,
  KEe = Id,
  bm = ss,
  B3 = DE,
  Dg = f5,
  I2n = _5,
  zte = Zu,
  hue = Gte,
  KA = CXe,
  qm = Dle,
  D2n = YHe.codeAt,
  P2n = A2n,
  g1 = Jp,
  M2n = vb,
  C2n = TB,
  zXe = d2n,
  jXe = PE,
  $2n = jXe.set,
  HU = jXe.getterFor("URL"),
  x2n = zXe.URLSearchParams,
  L2n = zXe.getState,
  sM = due.URL,
  jte = due.TypeError,
  XU = due.parseInt,
  O2n = Math.floor,
  ZEe = Math.pow,
  qg = bm("".charAt),
  T0 = bm(/./.exec),
  uC = bm([].join),
  G2n = bm((1).toString),
  N2n = bm([].pop),
  Zw = bm([].push),
  Kj = bm("".replace),
  F2n = bm([].shift),
  U2n = bm("".split),
  b$ = bm(jn("")),
  VU = bm("".toLowerCase),
  B2n = bm([].unshift),
  H2n = "Invalid authority",
  Zj = "Invalid scheme",
  D2 = "Invalid host",
  YEe = "Invalid port",
  WXe = /[a-z]/i,
  X2n = /[\d+-.a-z]/i,
  Wte = /\d/,
  V2n = /^0x/i,
  z2n = /^[0-7]+$/,
  j2n = /^\d+$/,
  KXe = /^[\da-f]+$/i,
  W2n = /[\0\t\n\r #%/:<>?@[\\\]^|]/,
  K2n = /[\0\t\n\r #/:<>?@[\\\]^|]/,
  Z2n = /^[\u0000-\u0020]+/,
  Y2n = /(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,
  Q2n = /[\t\n\r]/g,
  J2n = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = U2n(t, ".");
    if ((c.length && c[c.length - 1] == "" && c.length--, (e = c.length) > 4))
      return t;
    for (n = [], r = 0; r < e; r++) {
      if ((i = c[r]) == "") return t;
      if (
        ((o = 10),
        i.length > 1 &&
          qg(i, 0) == "0" &&
          ((o = T0(V2n, i) ? 16 : 8), (i = b$(i, o == 8 ? 1 : 2))),
        i === "")
      )
        l = 0;
      else {
        if (!T0(o == 10 ? j2n : o == 8 ? z2n : KXe, i)) return t;
        l = XU(i, o);
      }
      Zw(n, l);
    }
    for (r = 0; r < e; r++)
      if (((l = n[r]), r == e - 1)) {
        if (l >= ZEe(256, 5 - e)) return null;
      } else if (l > 255) return null;
    for (u = N2n(n), r = 0; r < n.length; r++) u += n[r] * ZEe(256, 3 - r);
    return u;
  },
  q2n = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = [0, 0, 0, 0, 0, 0, 0, 0],
      d = 0,
      h = null,
      f = 0,
      p = function () {
        return qg(t, f);
      };
    if (p() == ":") {
      if (qg(t, 1) != ":") return;
      (f += 2), (h = ++d);
    }
    for (; p(); ) {
      if (d == 8) return;
      if (p() != ":") {
        for (e = n = 0; n < 4 && T0(KXe, p()); )
          (e = 16 * e + XU(p(), 16)), f++, n++;
        if (p() == ".") {
          if (n == 0 || ((f -= n), d > 6)) return;
          for (r = 0; p(); ) {
            if (((i = null), r > 0)) {
              if (!(p() == "." && r < 4)) return;
              f++;
            }
            if (!T0(Wte, p())) return;
            for (; T0(Wte, p()); ) {
              if (((o = XU(p(), 10)), i === null)) i = o;
              else {
                if (i == 0) return;
                i = 10 * i + o;
              }
              if (i > 255) return;
              f++;
            }
            (c[d] = 256 * c[d] + i), (++r != 2 && r != 4) || d++;
          }
          if (r != 4) return;
          break;
        }
        if (p() == ":") {
          if ((f++, !p())) return;
        } else if (p()) return;
        c[d++] = e;
      } else {
        if (h !== null) return;
        f++, (h = ++d);
      }
    }
    if (h !== null)
      for (l = d - h, d = 7; d != 0 && l > 0; )
        (u = c[d]), (c[d--] = c[h + l - 1]), (c[h + --l] = u);
    else if (d != 8) return;
    return c;
  },
  eSn = function (t) {
    for (var e = null, n = 1, r = null, i = 0, o = 0; o < 8; o++)
      t[o] !== 0
        ? (i > n && ((e = r), (n = i)), (r = null), (i = 0))
        : (r === null && (r = o), ++i);
    return i > n && ((e = r), (n = i)), e;
  },
  lM = function (t) {
    var e, n, r, i;
    if (typeof t == "number") {
      for (e = [], n = 0; n < 4; n++) B2n(e, t % 256), (t = O2n(t / 256));
      return uC(e, ".");
    }
    if (ti(t) == "object") {
      for (e = "", r = eSn(t), n = 0; n < 8; n++)
        (i && t[n] === 0) ||
          (i && (i = !1),
          r === n
            ? ((e += n ? ":" : "::"), (i = !0))
            : ((e += G2n(t[n], 16)), n < 7 && (e += ":")));
      return "[" + e + "]";
    }
    return t;
  },
  FF = {},
  ZXe = hue({}, FF, { " ": 1, '"': 1, "<": 1, ">": 1, "`": 1 }),
  YXe = hue({}, ZXe, { "#": 1, "?": 1, "{": 1, "}": 1 }),
  Yj = hue({}, YXe, {
    "/": 1,
    ":": 1,
    ";": 1,
    "=": 1,
    "@": 1,
    "[": 1,
    "\\": 1,
    "]": 1,
    "^": 1,
    "|": 1,
  }),
  j_ = function (t, e) {
    var n = D2n(t, 0);
    return n > 32 && n < 127 && !zte(e, t) ? t : encodeURIComponent(t);
  },
  H3 = { ftp: 21, file: null, http: 80, https: 443, ws: 80, wss: 443 },
  cC = function (t, e) {
    var n;
    return (
      t.length == 2 &&
      T0(WXe, qg(t, 0)) &&
      ((n = qg(t, 1)) == ":" || (!e && n == "|"))
    );
  },
  QEe = function (t) {
    var e;
    return (
      t.length > 1 &&
      cC(b$(t, 0, 2)) &&
      (t.length == 2 ||
        (e = qg(t, 2)) === "/" ||
        e === "\\" ||
        e === "?" ||
        e === "#")
    );
  },
  tSn = function (t) {
    return t === "." || VU(t) === "%2e";
  },
  nSn = function (t) {
    return (
      (t = VU(t)) === ".." || t === "%2e." || t === ".%2e" || t === "%2e%2e"
    );
  },
  Qj = {},
  JEe = {},
  Jj = {},
  qEe = {},
  e2e = {},
  qj = {},
  t2e = {},
  n2e = {},
  X3 = {},
  V3 = {},
  eW = {},
  tW = {},
  nW = {},
  rW = {},
  r2e = {},
  iW = {},
  ZA = {},
  by = {},
  i2e = {},
  P2 = {},
  l1 = {},
  QXe = function t(e, n, r) {
    var i,
      o,
      l,
      u = g1(e);
    if (n) {
      if ((o = this.parse(u))) throw jte(o);
      this.searchParams = null;
    } else {
      if ((r !== void 0 && (i = new t(r, !0)), (o = this.parse(u, null, i))))
        throw jte(o);
      (l = L2n(new x2n())).bindURL(this), (this.searchParams = l);
    }
  };
QXe.prototype = {
  type: "URL",
  parse: function (t, e, n) {
    var r,
      i,
      o,
      l,
      u = this,
      c = e || Qj,
      d = 0,
      h = "",
      f = !1,
      p = !1,
      g = !1;
    for (
      t = g1(t),
        e ||
          ((u.scheme = ""),
          (u.username = ""),
          (u.password = ""),
          (u.host = null),
          (u.port = null),
          (u.path = []),
          (u.query = null),
          (u.fragment = null),
          (u.cannotBeABaseURL = !1),
          (t = Kj(t, Z2n, "")),
          (t = Kj(t, Y2n, "$1"))),
        t = Kj(t, Q2n, ""),
        r = KA(t);
      d <= r.length;

    ) {
      switch (((i = r[d]), c)) {
        case Qj:
          if (!i || !T0(WXe, i)) {
            if (e) return Zj;
            c = Jj;
            continue;
          }
          (h += VU(i)), (c = JEe);
          break;
        case JEe:
          if (i && (T0(X2n, i) || i == "+" || i == "-" || i == ".")) h += VU(i);
          else {
            if (i != ":") {
              if (e) return Zj;
              (h = ""), (c = Jj), (d = 0);
              continue;
            }
            if (
              e &&
              (u.isSpecial() != zte(H3, h) ||
                (h == "file" && (u.includesCredentials() || u.port !== null)) ||
                (u.scheme == "file" && !u.host))
            )
              return;
            if (((u.scheme = h), e))
              return void (
                u.isSpecial() &&
                H3[u.scheme] == u.port &&
                (u.port = null)
              );
            (h = ""),
              u.scheme == "file"
                ? (c = rW)
                : u.isSpecial() && n && n.scheme == u.scheme
                ? (c = qEe)
                : u.isSpecial()
                ? (c = n2e)
                : r[d + 1] == "/"
                ? ((c = e2e), d++)
                : ((u.cannotBeABaseURL = !0), Zw(u.path, ""), (c = i2e));
          }
          break;
        case Jj:
          if (!n || (n.cannotBeABaseURL && i != "#")) return Zj;
          if (n.cannotBeABaseURL && i == "#") {
            (u.scheme = n.scheme),
              (u.path = qm(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (u.cannotBeABaseURL = !0),
              (c = l1);
            break;
          }
          c = n.scheme == "file" ? rW : qj;
          continue;
        case qEe:
          if (i != "/" || r[d + 1] != "/") {
            c = qj;
            continue;
          }
          (c = X3), d++;
          break;
        case e2e:
          if (i == "/") {
            c = V3;
            break;
          }
          c = by;
          continue;
        case qj:
          if (((u.scheme = n.scheme), i == Ig))
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = qm(n.path)),
              (u.query = n.query);
          else if (i == "/" || (i == "\\" && u.isSpecial())) c = t2e;
          else if (i == "?")
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = qm(n.path)),
              (u.query = ""),
              (c = P2);
          else {
            if (i != "#") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (u.path = qm(n.path)),
                u.path.length--,
                (c = by);
              continue;
            }
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = qm(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (c = l1);
          }
          break;
        case t2e:
          if (!u.isSpecial() || (i != "/" && i != "\\")) {
            if (i != "/") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (c = by);
              continue;
            }
            c = V3;
          } else c = X3;
          break;
        case n2e:
          if (((c = X3), i != "/" || qg(h, d + 1) != "/")) continue;
          d++;
          break;
        case X3:
          if (i != "/" && i != "\\") {
            c = V3;
            continue;
          }
          break;
        case V3:
          if (i == "@") {
            f && (h = "%40" + h), (f = !0), (o = KA(h));
            for (var y = 0; y < o.length; y++) {
              var v = o[y];
              if (v != ":" || g) {
                var b = j_(v, Yj);
                g ? (u.password += b) : (u.username += b);
              } else g = !0;
            }
            h = "";
          } else if (
            i == Ig ||
            i == "/" ||
            i == "?" ||
            i == "#" ||
            (i == "\\" && u.isSpecial())
          ) {
            if (f && h == "") return H2n;
            (d -= KA(h).length + 1), (h = ""), (c = eW);
          } else h += i;
          break;
        case eW:
        case tW:
          if (e && u.scheme == "file") {
            c = iW;
            continue;
          }
          if (i != ":" || p) {
            if (
              i == Ig ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial())
            ) {
              if (u.isSpecial() && h == "") return D2;
              if (e && h == "" && (u.includesCredentials() || u.port !== null))
                return;
              if ((l = u.parseHost(h))) return l;
              if (((h = ""), (c = ZA), e)) return;
              continue;
            }
            i == "[" ? (p = !0) : i == "]" && (p = !1), (h += i);
          } else {
            if (h == "") return D2;
            if ((l = u.parseHost(h))) return l;
            if (((h = ""), (c = nW), e == tW)) return;
          }
          break;
        case nW:
          if (!T0(Wte, i)) {
            if (
              i == Ig ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial()) ||
              e
            ) {
              if (h != "") {
                var w = XU(h, 10);
                if (w > 65535) return YEe;
                (u.port = u.isSpecial() && w === H3[u.scheme] ? null : w),
                  (h = "");
              }
              if (e) return;
              c = ZA;
              continue;
            }
            return YEe;
          }
          h += i;
          break;
        case rW:
          if (((u.scheme = "file"), i == "/" || i == "\\")) c = r2e;
          else {
            if (!n || n.scheme != "file") {
              c = by;
              continue;
            }
            if (i == Ig)
              (u.host = n.host), (u.path = qm(n.path)), (u.query = n.query);
            else if (i == "?")
              (u.host = n.host),
                (u.path = qm(n.path)),
                (u.query = ""),
                (c = P2);
            else {
              if (i != "#") {
                QEe(uC(qm(r, d), "")) ||
                  ((u.host = n.host), (u.path = qm(n.path)), u.shortenPath()),
                  (c = by);
                continue;
              }
              (u.host = n.host),
                (u.path = qm(n.path)),
                (u.query = n.query),
                (u.fragment = ""),
                (c = l1);
            }
          }
          break;
        case r2e:
          if (i == "/" || i == "\\") {
            c = iW;
            break;
          }
          n &&
            n.scheme == "file" &&
            !QEe(uC(qm(r, d), "")) &&
            (cC(n.path[0], !0) ? Zw(u.path, n.path[0]) : (u.host = n.host)),
            (c = by);
          continue;
        case iW:
          if (i == Ig || i == "/" || i == "\\" || i == "?" || i == "#") {
            if (!e && cC(h)) c = by;
            else if (h == "") {
              if (((u.host = ""), e)) return;
              c = ZA;
            } else {
              if ((l = u.parseHost(h))) return l;
              if ((u.host == "localhost" && (u.host = ""), e)) return;
              (h = ""), (c = ZA);
            }
            continue;
          }
          h += i;
          break;
        case ZA:
          if (u.isSpecial()) {
            if (((c = by), i != "/" && i != "\\")) continue;
          } else if (e || i != "?")
            if (e || i != "#") {
              if (i != Ig && ((c = by), i != "/")) continue;
            } else (u.fragment = ""), (c = l1);
          else (u.query = ""), (c = P2);
          break;
        case by:
          if (
            i == Ig ||
            i == "/" ||
            (i == "\\" && u.isSpecial()) ||
            (!e && (i == "?" || i == "#"))
          ) {
            if (
              (nSn(h)
                ? (u.shortenPath(),
                  i == "/" || (i == "\\" && u.isSpecial()) || Zw(u.path, ""))
                : tSn(h)
                ? i == "/" || (i == "\\" && u.isSpecial()) || Zw(u.path, "")
                : (u.scheme == "file" &&
                    !u.path.length &&
                    cC(h) &&
                    (u.host && (u.host = ""), (h = qg(h, 0) + ":")),
                  Zw(u.path, h)),
              (h = ""),
              u.scheme == "file" && (i == Ig || i == "?" || i == "#"))
            )
              for (; u.path.length > 1 && u.path[0] === ""; ) F2n(u.path);
            i == "?"
              ? ((u.query = ""), (c = P2))
              : i == "#" && ((u.fragment = ""), (c = l1));
          } else h += j_(i, YXe);
          break;
        case i2e:
          i == "?"
            ? ((u.query = ""), (c = P2))
            : i == "#"
            ? ((u.fragment = ""), (c = l1))
            : i != Ig && (u.path[0] += j_(i, FF));
          break;
        case P2:
          e || i != "#"
            ? i != Ig &&
              (i == "'" && u.isSpecial()
                ? (u.query += "%27")
                : (u.query += i == "#" ? "%23" : j_(i, FF)))
            : ((u.fragment = ""), (c = l1));
          break;
        case l1:
          i != Ig && (u.fragment += j_(i, ZXe));
      }
      d++;
    }
  },
  parseHost: function (t) {
    var e, n, r;
    if (qg(t, 0) == "[") {
      if (qg(t, t.length - 1) != "]" || !(e = q2n(b$(t, 1, -1)))) return D2;
      this.host = e;
    } else if (this.isSpecial()) {
      if (((t = P2n(t)), T0(W2n, t) || (e = J2n(t)) === null)) return D2;
      this.host = e;
    } else {
      if (T0(K2n, t)) return D2;
      for (e = "", n = KA(t), r = 0; r < n.length; r++) e += j_(n[r], FF);
      this.host = e;
    }
  },
  cannotHaveUsernamePasswordPort: function () {
    return !this.host || this.cannotBeABaseURL || this.scheme == "file";
  },
  includesCredentials: function () {
    return this.username != "" || this.password != "";
  },
  isSpecial: function () {
    return zte(H3, this.scheme);
  },
  shortenPath: function () {
    var t = this.path,
      e = t.length;
    !e || (this.scheme == "file" && e == 1 && cC(t[0], !0)) || t.length--;
  },
  serialize: function () {
    var t = this,
      e = t.scheme,
      n = t.username,
      r = t.password,
      i = t.host,
      o = t.port,
      l = t.path,
      u = t.query,
      c = t.fragment,
      d = e + ":";
    return (
      i !== null
        ? ((d += "//"),
          t.includesCredentials() && (d += n + (r ? ":" + r : "") + "@"),
          (d += lM(i)),
          o !== null && (d += ":" + o))
        : e == "file" && (d += "//"),
      (d += t.cannotBeABaseURL ? l[0] : l.length ? "/" + uC(l, "/") : ""),
      u !== null && (d += "?" + u),
      c !== null && (d += "#" + c),
      d
    );
  },
  setHref: function (t) {
    var e = this.parse(t);
    if (e) throw jte(e);
    this.searchParams.update();
  },
  getOrigin: function () {
    var t = this.scheme,
      e = this.port;
    if (t == "blob")
      try {
        return new jI(t.path[0]).origin;
      } catch {
        return "null";
      }
    return t != "file" && this.isSpecial()
      ? t + "://" + lM(this.host) + (e !== null ? ":" + e : "")
      : "null";
  },
  getProtocol: function () {
    return this.scheme + ":";
  },
  setProtocol: function (t) {
    this.parse(g1(t) + ":", Qj);
  },
  getUsername: function () {
    return this.username;
  },
  setUsername: function (t) {
    var e = KA(g1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.username = "";
      for (var n = 0; n < e.length; n++) this.username += j_(e[n], Yj);
    }
  },
  getPassword: function () {
    return this.password;
  },
  setPassword: function (t) {
    var e = KA(g1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.password = "";
      for (var n = 0; n < e.length; n++) this.password += j_(e[n], Yj);
    }
  },
  getHost: function () {
    var t = this.host,
      e = this.port;
    return t === null ? "" : e === null ? lM(t) : lM(t) + ":" + e;
  },
  setHost: function (t) {
    this.cannotBeABaseURL || this.parse(t, eW);
  },
  getHostname: function () {
    var t = this.host;
    return t === null ? "" : lM(t);
  },
  setHostname: function (t) {
    this.cannotBeABaseURL || this.parse(t, tW);
  },
  getPort: function () {
    var t = this.port;
    return t === null ? "" : g1(t);
  },
  setPort: function (t) {
    this.cannotHaveUsernamePasswordPort() ||
      ((t = g1(t)) == "" ? (this.port = null) : this.parse(t, nW));
  },
  getPathname: function () {
    var t = this.path;
    return this.cannotBeABaseURL ? t[0] : t.length ? "/" + uC(t, "/") : "";
  },
  setPathname: function (t) {
    this.cannotBeABaseURL || ((this.path = []), this.parse(t, ZA));
  },
  getSearch: function () {
    var t = this.query;
    return t ? "?" + t : "";
  },
  setSearch: function (t) {
    (t = g1(t)) == ""
      ? (this.query = null)
      : (qg(t, 0) == "?" && (t = b$(t, 1)),
        (this.query = ""),
        this.parse(t, P2)),
      this.searchParams.update();
  },
  getSearchParams: function () {
    return this.searchParams.facade;
  },
  getHash: function () {
    var t = this.fragment;
    return t ? "#" + t : "";
  },
  setHash: function (t) {
    (t = g1(t)) != ""
      ? (qg(t, 0) == "#" && (t = b$(t, 1)),
        (this.fragment = ""),
        this.parse(t, l1))
      : (this.fragment = null);
  },
  update: function () {
    this.query = this.searchParams.serialize() || null;
  },
};
var jI = function (t) {
    var e = I2n(this, Rh),
      n = C2n(arguments.length, 1) > 1 ? arguments[1] : void 0,
      r = $2n(e, new QXe(t, !1, n));
    cue ||
      ((e.href = r.serialize()),
      (e.origin = r.getOrigin()),
      (e.protocol = r.getProtocol()),
      (e.username = r.getUsername()),
      (e.password = r.getPassword()),
      (e.host = r.getHost()),
      (e.hostname = r.getHostname()),
      (e.port = r.getPort()),
      (e.pathname = r.getPathname()),
      (e.search = r.getSearch()),
      (e.searchParams = r.getSearchParams()),
      (e.hash = r.getHash()));
  },
  Rh = jI.prototype,
  Pg = function (t, e) {
    return {
      get: function () {
        return HU(this)[t]();
      },
      set:
        e &&
        function (n) {
          return HU(this)[e](n);
        },
      configurable: !0,
      enumerable: !0,
    };
  };
if (
  (cue &&
    (Dg(Rh, "href", Pg("serialize", "setHref")),
    Dg(Rh, "origin", Pg("getOrigin")),
    Dg(Rh, "protocol", Pg("getProtocol", "setProtocol")),
    Dg(Rh, "username", Pg("getUsername", "setUsername")),
    Dg(Rh, "password", Pg("getPassword", "setPassword")),
    Dg(Rh, "host", Pg("getHost", "setHost")),
    Dg(Rh, "hostname", Pg("getHostname", "setHostname")),
    Dg(Rh, "port", Pg("getPort", "setPort")),
    Dg(Rh, "pathname", Pg("getPathname", "setPathname")),
    Dg(Rh, "search", Pg("getSearch", "setSearch")),
    Dg(Rh, "searchParams", Pg("getSearchParams")),
    Dg(Rh, "hash", Pg("getHash", "setHash"))),
  B3(
    Rh,
    "toJSON",
    function () {
      return HU(this).serialize();
    },
    { enumerable: !0 }
  ),
  B3(
    Rh,
    "toString",
    function () {
      return HU(this).serialize();
    },
    { enumerable: !0 }
  ),
  sM)
) {
  var a2e = sM.createObjectURL,
    o2e = sM.revokeObjectURL;
  a2e && B3(jI, "createObjectURL", KEe(a2e, sM)),
    o2e && B3(jI, "revokeObjectURL", KEe(o2e, sM));
}
M2n(jI, "URL"),
  w2n({ global: !0, constructor: !0, forced: !k2n, sham: !cue }, { URL: jI });
var rSn = ci,
  iSn = kd,
  aSn = Zo,
  oSn = TB,
  s2e = Jp,
  sSn = sue,
  JXe = iSn("URL"),
  lSn =
    sSn &&
    aSn(function () {
      JXe.canParse();
    });
rSn(
  { target: "URL", stat: !0, forced: !lSn },
  {
    canParse: function (t) {
      var e = oSn(arguments.length, 1),
        n = s2e(t),
        r = e < 2 || arguments[1] === void 0 ? void 0 : s2e(arguments[1]);
      try {
        return !!new JXe(n, r);
      } catch {
        return !1;
      }
    },
  }
);
var uSn = Vs,
  cSn = uSn.URL,
  dSn = cSn,
  hSn = dSn,
  fSn = hSn,
  pSn = fSn,
  gSn = pSn,
  mSn = gSn,
  ySn = mSn,
  vSn = ySn,
  bSn = Ea(vSn),
  l2e = Zu,
  _Sn = function (t) {
    return t !== void 0 && (l2e(t, "value") || l2e(t, "writable"));
  },
  TSn = ci,
  ESn = Vl,
  SSn = fc,
  RSn = oh,
  ASn = _Sn,
  wSn = AE,
  kSn = v5;
function qXe(t, e) {
  var n,
    r,
    i = arguments.length < 3 ? t : arguments[2];
  return RSn(t) === i
    ? t[e]
    : (n = wSn.f(t, e))
    ? ASn(n)
      ? n.value
      : n.get === void 0
      ? void 0
      : ESn(n.get, i)
    : SSn((r = kSn(t)))
    ? qXe(r, e, i)
    : void 0;
}
TSn({ target: "Reflect", stat: !0 }, { get: qXe });
var ISn = Vs,
  DSn = ISn.Reflect.get,
  PSn = DSn,
  MSn = PSn,
  CSn = MSn,
  $Sn = CSn,
  xSn = $Sn,
  LSn = xSn,
  OSn = LSn,
  u2e = Ea(OSn);
function GSn(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = aE(t)) !== null; );
  return t;
}
function WI() {
  var t;
  return (
    (WI =
      typeof Reflect < "u" && u2e
        ? Fx((t = u2e)).call(t)
        : function (e, n, r) {
            var i = GSn(e, n);
            if (i) {
              var o = Fle(i, n);
              return o.get ? o.get.call(arguments.length < 3 ? e : r) : o.value;
            }
          }),
    WI.apply(this, arguments)
  );
}
function eVe(t, e, n) {
  var r;
  return (eVe = dXe()
    ? Fx((r = p$)).call(r)
    : function (i, o, l) {
        var u = [null];
        xU(u).apply(u, o);
        var c = new (Fx(Function).apply(i, u))();
        return l && Qle(c, l.prototype), c;
      }).apply(null, arguments);
}
var NSn = ci,
  aW = Dl;
NSn({ global: !0, forced: aW.globalThis !== aW }, { globalThis: aW });
var oW,
  sW,
  lW,
  uW,
  YA,
  tVe,
  FSn = Dl,
  USn = FSn,
  BSn = USn,
  HSn = BSn,
  XSn = HSn,
  VSn = XSn,
  zSn = VSn,
  jSn = zSn,
  WSn = jSn,
  c2e = Ea(WSn),
  d2e =
    ((oW = c2e !== void 0 ? c2e : void 0) === null || oW === void 0
      ? void 0
      : oW.crypto) ||
    ((sW = typeof global < "u" ? global : void 0) === null || sW === void 0
      ? void 0
      : sW.crypto) ||
    ((lW = typeof window < "u" ? window : void 0) === null || lW === void 0
      ? void 0
      : lW.crypto) ||
    ((uW = typeof self < "u" ? self : void 0) === null || uW === void 0
      ? void 0
      : uW.crypto) ||
    ((YA = typeof frames < "u" ? frames : void 0) === null ||
    YA === void 0 ||
    (YA = YA[0]) === null ||
    YA === void 0
      ? void 0
      : YA.crypto);
tVe = d2e
  ? function (t) {
      for (var e = [], n = 0; n < t; n += 4)
        e.push(d2e.getRandomValues(new Uint32Array(1))[0]);
      return new oE(e, t);
    }
  : function (t) {
      for (
        var e,
          n = [],
          r = function (l) {
            var u = l,
              c = 987654321,
              d = 4294967295;
            return function () {
              var h =
                (((c = (36969 * (65535 & c) + (c >> 16)) & d) << 16) +
                  (u = (18e3 * (65535 & u) + (u >> 16)) & d)) &
                d;
              return (
                (h /= 4294967296), (h += 0.5) * (Math.random() > 0.5 ? 1 : -1)
              );
            };
          },
          i = 0;
        i < t;
        i += 4
      ) {
        var o = r(4294967296 * (e || Math.random()));
        (e = 987654071 * o()), n.push((4294967296 * o()) | 0);
      }
      return new oE(n, t);
    };
var AB = (function () {
    function t() {
      Mo(this, t);
    }
    return (
      Co(
        t,
        [
          {
            key: "mixIn",
            value: function (e) {
              return KS(this, e);
            },
          },
          {
            key: "clone",
            value: function () {
              var e = new this.constructor();
              return KS(e, this), e;
            },
          },
        ],
        [
          {
            key: "create",
            value: function () {
              for (
                var e = arguments.length, n = new Array(e), r = 0;
                r < e;
                r++
              )
                n[r] = arguments[r];
              return eVe(this, n);
            },
          },
        ]
      ),
      t
    );
  })(),
  oE = (function (t) {
    qp(n, AB);
    var e = eg(n);
    function n() {
      var r,
        i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [],
        o =
          arguments.length > 1 && arguments[1] !== void 0
            ? arguments[1]
            : 4 * i.length;
      Mo(this, n), (r = e.call(this));
      var l = i;
      if (
        (l instanceof ArrayBuffer && (l = new Uint8Array(l)),
        (l instanceof Int8Array ||
          l instanceof Uint8ClampedArray ||
          l instanceof Int16Array ||
          l instanceof Uint16Array ||
          l instanceof Int32Array ||
          l instanceof Uint32Array ||
          l instanceof Float32Array ||
          l instanceof Float64Array) &&
          (l = new Uint8Array(l.buffer, l.byteOffset, l.byteLength)),
        l instanceof Uint8Array)
      ) {
        for (var u = l.byteLength, c = [], d = 0; d < u; d += 1)
          c[d >>> 2] |= l[d] << (24 - (d % 4) * 8);
        (r.words = c), (r.sigBytes = u);
      } else (r.words = i), (r.sigBytes = o);
      return r;
    }
    return (
      Co(n, [
        {
          key: "toString",
          value: function () {
            return (
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : KSn
            ).stringify(this);
          },
        },
        {
          key: "concat",
          value: function (r) {
            var i = this.words,
              o = r.words,
              l = this.sigBytes,
              u = r.sigBytes;
            if ((this.clamp(), l % 4))
              for (var c = 0; c < u; c += 1) {
                var d = (o[c >>> 2] >>> (24 - (c % 4) * 8)) & 255;
                i[(l + c) >>> 2] |= d << (24 - ((l + c) % 4) * 8);
              }
            else for (var h = 0; h < u; h += 4) i[(l + h) >>> 2] = o[h >>> 2];
            return (this.sigBytes += u), this;
          },
        },
        {
          key: "clamp",
          value: function () {
            var r = this.words,
              i = this.sigBytes;
            (r[i >>> 2] &= 4294967295 << (32 - (i % 4) * 8)),
              (r.length = Math.ceil(i / 4));
          },
        },
        {
          key: "clone",
          value: function () {
            var r,
              i = WI(aE(n.prototype), "clone", this).call(this);
            return (i.words = Fyn((r = this.words)).call(r, 0)), i;
          },
        },
      ]),
      n
    );
  })();
ca(oE, "random", tVe);
var KSn = {
    stringify: function (t) {
      for (var e = t.words, n = t.sigBytes, r = [], i = 0; i < n; i += 1) {
        var o = (e[i >>> 2] >>> (24 - (i % 4) * 8)) & 255;
        r.push((o >>> 4).toString(16)), r.push((15 & o).toString(16));
      }
      return r.join("");
    },
    parse: function (t) {
      for (var e = t.length, n = [], r = 0; r < e; r += 2)
        n[r >>> 3] |= NU(t.substr(r, 2), 16) << (24 - (r % 8) * 4);
      return new oE(n, e / 2);
    },
  },
  h2e = {
    stringify: function (t) {
      for (var e = t.words, n = t.sigBytes, r = [], i = 0; i < n; i += 1) {
        var o = (e[i >>> 2] >>> (24 - (i % 4) * 8)) & 255;
        r.push(String.fromCharCode(o));
      }
      return r.join("");
    },
    parse: function (t) {
      for (var e = t.length, n = [], r = 0; r < e; r += 1)
        n[r >>> 2] |= (255 & t.charCodeAt(r)) << (24 - (r % 4) * 8);
      return new oE(n, e);
    },
  },
  nVe = {
    stringify: function (t) {
      try {
        return decodeURIComponent(escape(h2e.stringify(t)));
      } catch {
        throw new Error("Malformed UTF-8 data");
      }
    },
    parse: function (t) {
      return h2e.parse(unescape(encodeURIComponent(t)));
    },
  },
  ZSn = (function (t) {
    qp(n, AB);
    var e = eg(n);
    function n() {
      var r;
      return Mo(this, n), ((r = e.call(this))._minBufferSize = 0), r;
    }
    return (
      Co(n, [
        {
          key: "reset",
          value: function () {
            (this._data = new oE()), (this._nDataBytes = 0);
          },
        },
        {
          key: "_append",
          value: function (r) {
            var i,
              o = r;
            typeof o == "string" && (o = nVe.parse(o)),
              Jd((i = this._data)).call(i, o),
              (this._nDataBytes += o.sigBytes);
          },
        },
        {
          key: "_process",
          value: function (r) {
            var i,
              o = this._data,
              l = this.blockSize,
              u = o.words,
              c = o.sigBytes,
              d = c / (4 * l),
              h =
                (d = r
                  ? Math.ceil(d)
                  : Math.max((0 | d) - this._minBufferSize, 0)) * l,
              f = Math.min(4 * h, c);
            if (h) {
              for (var p = 0; p < h; p += l) this._doProcessBlock(u, p);
              (i = Bte(u).call(u, 0, h)), (o.sigBytes -= f);
            }
            return new oE(i, f);
          },
        },
        {
          key: "clone",
          value: function () {
            var r = WI(aE(n.prototype), "clone", this).call(this);
            return (r._data = this._data.clone()), r;
          },
        },
      ]),
      n
    );
  })(),
  fue = (function (t) {
    qp(n, ZSn);
    var e = eg(n);
    function n(r) {
      var i;
      return (
        Mo(this, n),
        ((i = e.call(this)).blockSize = 16),
        (i.cfg = KS(new AB(), r)),
        i.reset(),
        i
      );
    }
    return (
      Co(
        n,
        [
          {
            key: "reset",
            value: function () {
              WI(aE(n.prototype), "reset", this).call(this), this._doReset();
            },
          },
          {
            key: "update",
            value: function (r) {
              return this._append(r), this._process(), this;
            },
          },
          {
            key: "finalize",
            value: function (r) {
              return r && this._append(r), this._doFinalize();
            },
          },
        ],
        [
          {
            key: "_createHelper",
            value: function (r) {
              return function (i, o) {
                return new r(o).finalize(i);
              };
            },
          },
          {
            key: "_createHmacHelper",
            value: function (r) {
              return function (i, o) {
                return new YSn(r, o).finalize(i);
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  YSn = (function (t) {
    qp(n, AB);
    var e = eg(n);
    function n(r, i) {
      var o;
      Mo(this, n), (o = e.call(this));
      var l = new r();
      o._hasher = l;
      var u = i;
      typeof u == "string" && (u = nVe.parse(u));
      var c = l.blockSize,
        d = 4 * c;
      u.sigBytes > d && (u = l.finalize(i)), u.clamp();
      var h = u.clone();
      o._oKey = h;
      var f = u.clone();
      o._iKey = f;
      for (var p = h.words, g = f.words, y = 0; y < c; y += 1)
        (p[y] ^= 1549556828), (g[y] ^= 909522486);
      return (h.sigBytes = d), (f.sigBytes = d), o.reset(), o;
    }
    return (
      Co(n, [
        {
          key: "reset",
          value: function () {
            var r = this._hasher;
            r.reset(), r.update(this._iKey);
          },
        },
        {
          key: "update",
          value: function (r) {
            return this._hasher.update(r), this;
          },
        },
        {
          key: "finalize",
          value: function (r) {
            var i,
              o = this._hasher,
              l = o.finalize(r);
            return (
              o.reset(), o.finalize(Jd((i = this._oKey.clone())).call(i, l))
            );
          },
        },
      ]),
      n
    );
  })(),
  M2 = [],
  rVe = (function (t) {
    qp(n, fue);
    var e = eg(n);
    function n() {
      return Mo(this, n), e.apply(this, arguments);
    }
    return (
      Co(n, [
        {
          key: "_doReset",
          value: function () {
            this._hash = new oE([
              1732584193, 4023233417, 2562383102, 271733878, 3285377520,
            ]);
          },
        },
        {
          key: "_doProcessBlock",
          value: function (r, i) {
            for (
              var o = this._hash.words,
                l = o[0],
                u = o[1],
                c = o[2],
                d = o[3],
                h = o[4],
                f = 0;
              f < 80;
              f += 1
            ) {
              if (f < 16) M2[f] = 0 | r[i + f];
              else {
                var p = M2[f - 3] ^ M2[f - 8] ^ M2[f - 14] ^ M2[f - 16];
                M2[f] = (p << 1) | (p >>> 31);
              }
              var g = ((l << 5) | (l >>> 27)) + h + M2[f];
              (g +=
                f < 20
                  ? 1518500249 + ((u & c) | (~u & d))
                  : f < 40
                  ? 1859775393 + (u ^ c ^ d)
                  : f < 60
                  ? ((u & c) | (u & d) | (c & d)) - 1894007588
                  : (u ^ c ^ d) - 899497514),
                (h = d),
                (d = c),
                (c = (u << 30) | (u >>> 2)),
                (u = l),
                (l = g);
            }
            (o[0] = (o[0] + l) | 0),
              (o[1] = (o[1] + u) | 0),
              (o[2] = (o[2] + c) | 0),
              (o[3] = (o[3] + d) | 0),
              (o[4] = (o[4] + h) | 0);
          },
        },
        {
          key: "_doFinalize",
          value: function () {
            var r = this._data,
              i = r.words,
              o = 8 * this._nDataBytes,
              l = 8 * r.sigBytes;
            return (
              (i[l >>> 5] |= 128 << (24 - (l % 32))),
              (i[14 + (((l + 64) >>> 9) << 4)] = Math.floor(o / 4294967296)),
              (i[15 + (((l + 64) >>> 9) << 4)] = o),
              (r.sigBytes = 4 * i.length),
              this._process(),
              this._hash
            );
          },
        },
        {
          key: "clone",
          value: function () {
            var r = WI(aE(n.prototype), "clone", this).call(this);
            return (r._hash = this._hash.clone()), r;
          },
        },
      ]),
      n
    );
  })();
fue._createHelper(rVe);
var Kte,
  QSn = fue._createHmacHelper(rVe);
function JSn(t, e, n) {
  function r(b, w) {
    var k = _i(jn(b).call(b, w, w + 2), 16);
    return k >>> 7
      ? k >>> 6 == 2
        ? ((k = (63 & k) << 8), [2, (k += _i(jn(b).call(b, w + 2, w + 4), 16))])
        : ((k = (63 & k) << 16),
          [3, (k += _i(jn(b).call(b, w + 2, w + 6), 16))])
      : [1, k];
  }
  var i,
    o = 0,
    l = [],
    u = [];
  for (i = 0; i < 4; ++i)
    o += (3 & _i(jn(t).call(t, 8 + 2 * i, 10 + 2 * i), 16)) << (2 * i);
  var c = _i(jn(t).call(t, 16, 24), 16),
    d = 2 * _i(jn(t).call(t, 32, 40), 16);
  for (i = 40; i < d + 40; i += 2) l.push(_i(jn(t).call(t, i, i + 2), 16));
  var h = d + 40,
    f = _i(jn(t).call(t, h, h + 4), 16);
  for (h += 4, i = 0; i < f; ++i) {
    var p = r(t, h);
    h += 2 * p[0];
    for (var g = "", y = 0; y < p[1]; ++y) {
      var v = r(t, h);
      (g += String.fromCharCode(o ^ v[1])), (h += 2 * v[0]);
    }
    u.push(g);
  }
  return (
    (e.p = null),
    (function b(w, k, D, $, N, P) {
      var I,
        O,
        X,
        G,
        H,
        E = -1,
        S = [],
        L = null,
        W = [k];
      for (O = Math.min(k.length, D), X = 0; X < O; ++X) W.push(k[X]);
      W.p = $;
      for (var F = []; ; )
        try {
          switch (l[w++]) {
            case 59:
              S[++E] = null;
              break;
            case 36:
              (I = ((I = ((I = l[w++]) << 8) + l[w++]) << 8) + l[w++]),
                (S[++E] = (I << 8) + l[w++]);
              break;
            case 43:
              (I = (l[w] << 8) + l[w + 1]), (w += 2), (S[++E] = u[I]);
              break;
            case 3:
              S[++E] = void 0;
              break;
            case 52:
              (I = (l[w] << 8) + l[w + 1]),
                (w += 2),
                (E = E - I + 1),
                (O = jn(S).call(S, E, E + I)),
                (S[E] = O);
              break;
            case 47:
              for (O = l[w++], X = l[w++], G = W; O > 0; --O) G = G.p;
              S[++E] = G[X];
              break;
            case 17:
              (I = (l[w] << 8) + l[w + 1]),
                (w += 2),
                (O = u[I]),
                (S[E] = S[E][O]);
              break;
            case 44:
              for (O = l[w++], X = l[w++], G = W; O > 0; --O) G = G.p;
              G[X] = S[E--];
              break;
            case 28:
              (I = l[w++]),
                (O = S[E--]),
                ((X = function oe() {
                  var De = oe._v;
                  return (0, oe._u)(De[0], arguments, De[1], De[2], this);
                })._v = [O, I, W]),
                (X._u = b),
                (S[++E] = X);
              break;
            case 64:
              for (O = S[E--], X = null; (G = F.pop()); )
                if (G[0] === 2 || G[0] === 3) {
                  X = G;
                  break;
                }
              if (X) (w = X[2]), (X[0] = 0), F.push(X);
              else {
                if (!L) return O;
                (w = L[1]),
                  (N = L[2]),
                  (W = L[3]),
                  (F = L[4]),
                  (S[++E] = O),
                  (L = L[0]);
              }
              break;
            case 67:
              (E -= I = l[w++]),
                (X = jn(S).call(S, E + 1, E + I + 1)),
                (O = S[E--]),
                (G = S[E--]),
                O._u === b
                  ? ((O = O._v),
                    (L = [L, w, N, W, F]),
                    (w = O[0]),
                    G == null &&
                      (G = (function () {
                        return this;
                      })()),
                    (N = G),
                    ((W = Ce((P = [X])).call(P, X)).length =
                      Math.min(O[1], I) + 1),
                    (W.p = O[2]),
                    (F = []))
                  : ((H = O.apply(G, X)), (S[++E] = H));
              break;
            case 70:
              (O = S[E]), (S[++E] = O);
              break;
            default:
              throw new Error("ioe");
          }
        } catch (oe) {
          for (; (I = F.pop()) && !I[0]; );
          if (!I) {
            e: for (; L; ) {
              for (O = L[4]; (I = O.pop()); ) if (I[0]) break e;
              L = L[0];
            }
            if (!L) throw oe;
            (w = L[1]), (N = L[2]), (W = L[3]), (F = L[4]), (L = L[0]);
          }
          (O = I[0]) === 1
            ? ((w = I[2]), (I[0] = 0), F.push(I), (S[++E] = oe))
            : O === 2
            ? ((w = I[2]), (I[0] = 0), F.push(I))
            : ((w = I[3]), (I[0] = 2), F.push(I), (S[++E] = oe));
        }
    })(c, [], 0, e, n)
  );
}
JSn(
  "504B0101011a4e7f000000287f4f1a01000000343b2f02002f00012f00022f00032f0004340004461100002b000143012b000243024611000343004024000000001c042c0101034000040480838086808080870180cf2080d880de808380858099808b809c80848081809a80d0808880808081809380d8809b809880d8809f80d980d88083809e80de808780d1808780d080838099808d08809d808680ba809d809b80808087808e",
  {
    get 0() {
      return QSn;
    },
    get 1() {
      return Kte;
    },
    set 1(t) {
      Kte = t;
    },
  },
  void 0
);
var qSn = (function () {
    function t(e, n) {
      var r,
        i =
          arguments.length > 2 && arguments[2] !== void 0
            ? arguments[2]
            : Zle.CN;
      Mo(this, t),
        ca(this, "appId", void 0),
        ca(this, "ctx", void 0),
        ca(this, "host", void 0),
        ca(this, "needSignature", !0),
        ca(this, "region", void 0),
        ca(this, "scene", void 0),
        ca(this, "ext", void 0),
        (this.scene = ((r = {}), ca(r, yo.LIVE, 1), ca(r, yo.VOD, 0), r)[
          n.videoType
        ]),
        (this.ext = Jo({}, this.getConfigType(n.strategies))),
        (this.appId = e),
        (this.ctx = n),
        (this.region = i),
        (this.host = this.getHostByRegion());
    }
    return (
      Co(t, [
        {
          key: "getConfigType",
          value: function (e) {
            var n;
            if (!e) return {};
            var r = {};
            return (
              zu((n = Df(e))).call(n, function (i) {
                var o = e[i];
                o &&
                  (r["".concat(i, "_id")] =
                    Cc(o) === "object" && o.configId ? o.configId : "default");
              }),
              r
            );
          },
        },
        {
          key: "getCacheKey",
          value: function () {
            return XT([
              this.appId,
              this.ctx.cacheKey,
              this.ctx.featureCenter.getH265FeatureList().isHevcSupported,
              this.ctx.featureCenter.getBrowserInfo(),
              this.ctx.featureCenter.getFeatureList().deviceId,
            ]);
          },
        },
        {
          key: "fetch",
          value: (function (e) {
            function n() {
              return e.apply(this, arguments);
            }
            return (
              (n.toString = function () {
                return e.toString();
              }),
              n
            );
          })(
            M1(
              Ac().mark(function e() {
                var n, r, i, o, l, u, c;
                return Ac().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return (
                            (d.prev = 0),
                            (d.next = 3),
                            fetch(this.generateUrl(), { mode: "cors" })
                          );
                        case 3:
                          if ((n = d.sent).ok) {
                            d.next = 6;
                            break;
                          }
                          throw new Error("Network response was not OK");
                        case 6:
                          return (d.next = 8), n.json();
                        case 8:
                          return (
                            (r = d.sent),
                            (i = r.data),
                            (o = i.custom_settings.web),
                            (l = i.general_settings),
                            (u = l.use_local_cache),
                            (c = l.local_cache_expire),
                            d.abrupt(
                              "return",
                              Jo(
                                Jo({}, o),
                                {},
                                {
                                  use_local_cache: u,
                                  local_cache_expired_at:
                                    c > 0 ? YS() + 1e3 * c : void 0,
                                  cache_key: this.getCacheKey(),
                                }
                              )
                            )
                          );
                        case 17:
                          throw ((d.prev = 17), (d.t0 = d.catch(0)), d.t0);
                        case 20:
                        case "end":
                          return d.stop();
                      }
                  },
                  e,
                  this,
                  [[0, 17]]
                );
              })
            )
          ),
        },
        {
          key: "getHostByRegion",
          value: function () {
            var e;
            return (
              ((e = { cn: { settingsHost: "vod-settings.volcvod.com" } }[
                this.region
              ]) === null || e === void 0
                ? void 0
                : e.settingsHost) || "vod-settings.volcvod.com"
            );
          },
        },
        {
          key: "generateSearchParams",
          value: function (e) {
            if (
              (e.searchParams.set("module", "web"),
              e.searchParams.set("aid", String(this.appId)),
              e.searchParams.set("region", this.region),
              e.searchParams.set(
                "web_support_hardware_decode_bytevc1",
                String(
                  this.ctx.featureCenter.getH265FeatureList().isHevcSupported
                )
              ),
              e.searchParams.set(
                "web_os",
                this.ctx.featureCenter.getBrowserInfo().osName
              ),
              e.searchParams.set(
                "web_os_version",
                this.ctx.featureCenter.getBrowserInfo().osVersion
              ),
              e.searchParams.set(
                "web_platform",
                this.ctx.featureCenter.getBrowserInfo().platformType
              ),
              e.searchParams.set(
                "web_browser",
                this.ctx.featureCenter.getBrowserInfo().browserName
              ),
              e.searchParams.set(
                "web_browser_version",
                this.ctx.featureCenter.getBrowserInfo().browserVersion
              ),
              e.searchParams.set(
                "web_cpu_core",
                String(this.ctx.featureCenter.getBrowserInfo().cpuCore)
              ),
              e.searchParams.set("web_scene", String(this.scene)),
              e.searchParams.set("web_ext", XT(this.ext)),
              e.searchParams.set(
                "device_id",
                this.ctx.featureCenter.getFeatureList().deviceId
              ),
              this.needSignature)
            ) {
              var n = YS();
              e.searchParams.set("timestamp", String(n));
              var r = Kte(
                this.appId,
                this.ctx.featureCenter.getFeatureList().deviceId,
                this.ctx.featureCenter.getBrowserInfo().browserName,
                n
              );
              e.searchParams.set("signature", r);
            }
            return e;
          },
        },
        {
          key: "generateUrl",
          value: function () {
            return this.generateSearchParams(
              new bSn("https://".concat(this.host, "/vod/settings/v1"))
            );
          },
        },
      ]),
      t
    );
  })(),
  _h = new Yle("VeStrategy"),
  eRn = ca({}, yo.VOD, wEn),
  f2e = (function () {
    function t(l) {
      Mo(this, t),
        ca(this, "ctx", void 0),
        ca(this, "configPreparePromise", void 0),
        ca(this, "isStrategyStarted", !1);
      var u = new v1n(l),
        c = new Mpn(
          l,
          new qSn(l.appId, {
            featureCenter: u,
            cacheKey: l.cacheKey,
            strategies: l.strategies,
            videoType: l.type || yo.VOD,
          })
        );
      _h.update(l.log),
        (this.ctx = {
          dataCenter: c,
          featureCenter: u,
          playerManager: new dEn(),
          tracker: new hEn({
            trackInfo: l.tracker,
            type: l.type || yo.VOD,
            lineAppId: l.appId,
            lineUserId: l.deviceId,
            appId: l.type === yo.VOD ? 577780 : 579013,
            channel: l.region,
            cxt: { dataCenter: c, featureCenter: u },
          }),
        }),
        this.prepare(!0);
    }
    var e, n, r, i, o;
    return (
      Co(
        t,
        [
          {
            key: "start",
            value:
              ((o = M1(
                Ac().mark(function l() {
                  var u,
                    c = this;
                  return Ac().wrap(
                    function (d) {
                      for (;;)
                        switch ((d.prev = d.next)) {
                          case 0:
                            if (!this.isStrategyStarted) {
                              d.next = 2;
                              break;
                            }
                            return d.abrupt("return");
                          case 2:
                            if (
                              ((this.isStrategyStarted = !0),
                              _h.info("Start"),
                              this.ctx.tracker.track("strategy_start", {}),
                              this.ctx.featureCenter.getFeatureList().deviceId)
                            ) {
                              d.next = 13;
                              break;
                            }
                            return (d.next = 8), this.getTeaToken();
                          case 8:
                            if (((d.t0 = d.sent), d.t0)) {
                              d.next = 11;
                              break;
                            }
                            d.t0 = {};
                          case 11:
                            (u = d.t0),
                              this.ctx.featureCenter.updateFeatureList({
                                deviceId: u.user_unique_id || u.web_id || "",
                              });
                          case 13:
                            return (
                              (this.configPreparePromise =
                                this.ctx.dataCenter.fetchStrategyConfig()),
                              this.configPreparePromise.then(function () {
                                return c.prepare(!1);
                              }),
                              d.abrupt("return", this.configPreparePromise)
                            );
                          case 16:
                          case "end":
                            return d.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function () {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "updateFeatures",
            value:
              ((i = M1(
                Ac().mark(function l(u) {
                  var c, d, h;
                  return Ac().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (
                              u &&
                              (c = this.ctx) !== null &&
                              c !== void 0 &&
                              (c = c.featureCenter) !== null &&
                              c !== void 0 &&
                              c.updateFeatureList
                            ) {
                              f.next = 2;
                              break;
                            }
                            return f.abrupt("return");
                          case 2:
                            if (
                              ((h =
                                (d =
                                  this.ctx.featureCenter.getFeatureList()) ===
                                  null || d === void 0
                                  ? void 0
                                  : d.deviceId),
                              this.ctx.featureCenter.updateFeatureList(
                                Jo({}, u)
                              ),
                              !u.deviceId || u.deviceId === h)
                            ) {
                              f.next = 6;
                              break;
                            }
                            return f.abrupt("return", this.reloadConfig());
                          case 6:
                          case "end":
                            return f.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function (l) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "reloadConfig",
            value:
              ((r = M1(
                Ac().mark(function l() {
                  return Ac().wrap(
                    function (u) {
                      for (;;)
                        switch ((u.prev = u.next)) {
                          case 0:
                            return (
                              (this.configPreparePromise =
                                this.ctx.dataCenter.fetchStrategyConfig()),
                              u.abrupt("return", this.configPreparePromise)
                            );
                          case 2:
                          case "end":
                            return u.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "getTeaToken",
            value:
              ((n = M1(
                Ac().mark(function l() {
                  var u = this;
                  return Ac().wrap(function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          return c.abrupt(
                            "return",
                            new Of(function (d) {
                              var h, f, p;
                              if (
                                typeof ((h = u.ctx.tracker) === null ||
                                h === void 0 ||
                                (h = h.tracker) === null ||
                                h === void 0
                                  ? void 0
                                  : h.getToken) == "function"
                              )
                                return u.ctx.tracker.tracker.getToken(function (
                                  y
                                ) {
                                  return d(y);
                                });
                              var g = (
                                ((f = u.ctx.tracker) === null ||
                                f === void 0 ||
                                (f = f.tracker) === null ||
                                f === void 0 ||
                                (p = f.getConfig) === null ||
                                p === void 0
                                  ? void 0
                                  : p.call(f)) || {}
                              ).user;
                              return d(g === void 0 ? {} : g);
                            })
                          );
                        case 1:
                        case "end":
                          return c.stop();
                      }
                  }, l);
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "prepare",
            value: function (l) {
              var u,
                c = this,
                d = this.ctx.dataCenter.getInitStrategyConfig() || {},
                h = this.ctx.dataCenter.getServiceStrategyConfig() || {};
              zu((u = Df(d))).call(u, function (f) {
                var p, g, y, v, b, w, k;
                (!((p = d[f]) === null || p === void 0) && p.disabled) ||
                  (!(h == null || (g = h[f]) === null || g === void 0) &&
                    g.disabled) ||
                  (y = d[f]) === null ||
                  y === void 0 ||
                  (y = y.Strategy) === null ||
                  y === void 0 ||
                  (v =
                    y[l ? "prepareBeforeStarted" : "prepareAfterStarted"]) ===
                    null ||
                  v === void 0 ||
                  v.call(y, {
                    ctx: c.ctx,
                    Strategy:
                      (b = d[f]) === null || b === void 0 ? void 0 : b.Strategy,
                    config: Jo(
                      Jo(
                        {},
                        (w = d[f]) === null || w === void 0 ? void 0 : w.config
                      ),
                      h == null || (k = h[f]) === null || k === void 0
                        ? void 0
                        : k.config
                    ),
                  });
              });
            },
          },
        ],
        [
          {
            key: "init",
            value: function (l) {
              var u;
              if (
                (_h.update(l == null ? void 0 : l.log),
                l != null && l.appId && l.strategies)
              ) {
                var c = {};
                zu((u = Df(l.strategies))).call(u, function (h) {
                  var f, p;
                  (f = l.strategies) !== null &&
                    f !== void 0 &&
                    f[h] &&
                    Cc(
                      (p = l.strategies) === null || p === void 0
                        ? void 0
                        : p[h]
                    ) === "object" &&
                    (c[h] = l.strategies[h]);
                });
                var d = Jo(
                  Jo({}, l),
                  {},
                  { strategies: c, type: l.type || yo.VOD }
                );
                if (
                  (_h.info("Init", d), d.type === yo.VOD || d.type === yo.LIVE)
                )
                  return d.type === yo.VOD
                    ? ((t._vodInst = t._vodInst || new t(d)),
                      t._vodInst.ctx.tracker.track("strategy_init", {}),
                      t._vodInst)
                    : ((t._liveInst = t._liveInst || new t(d)),
                      t._liveInst.ctx.tracker.track("strategy_init", {}),
                      t._liveInst);
                _h.error("Init Invalid Strategy Type=".concat(l.type));
              } else _h.error("Init without appId or strategies", l);
            },
          },
          {
            key: "bootstrap",
            value: function (l) {
              var u;
              return (u = t.init(l)) === null || u === void 0
                ? void 0
                : u.start();
            },
          },
          {
            key: "inst",
            value: function () {
              var l =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : yo.VOD;
              return l === yo.VOD
                ? t._vodInst
                : l === yo.LIVE
                ? t._liveInst
                : null;
            },
          },
          {
            key: "recLive",
            value: function (l, u) {
              return t.rec(l, u, yo.LIVE);
            },
          },
          {
            key: "recAsync",
            value:
              ((e = M1(
                Ac().mark(function l(u, c) {
                  var d,
                    h,
                    f = arguments;
                  return Ac().wrap(function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (
                            ((d =
                              f.length > 2 && f[2] !== void 0 ? f[2] : yo.VOD),
                            (h = t.inst(d || yo.VOD)),
                            _h.info("recAsync", h, c, d),
                            h != null && h.configPreparePromise)
                          ) {
                            p.next = 6;
                            break;
                          }
                          return (
                            _h.error("VeStrategyNotInitOrStart"),
                            p.abrupt("return", {
                              plugins: [],
                              pluginConfiguration: {},
                              result: {},
                            })
                          );
                        case 6:
                          return (p.next = 8), h.configPreparePromise;
                        case 8:
                          return p.abrupt("return", t.rec(u, c, d));
                        case 9:
                        case "end":
                          return p.stop();
                      }
                  }, l);
                })
              )),
              function (l, u) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "rec",
            value: function (l, u) {
              var c =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : yo.VOD;
              try {
                return t._rec(l, u, c);
              } catch {
                var d;
                _h.error("VeStrategyRecError");
                var h = t.inst(c);
                return (
                  h == null ||
                    (d = h.ctx) === null ||
                    d === void 0 ||
                    (d = d.tracker) === null ||
                    d === void 0 ||
                    d.track("strategy_js_error", {
                      type: c,
                      option: XT(l ?? {}),
                      common_config: XT(u ?? {}),
                    }),
                  { plugins: [], pluginConfiguration: {}, result: {} }
                );
              }
            },
          },
          {
            key: "reportABInfo",
            value: function (l) {
              var u,
                c,
                d =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : yo.VOD;
              yo.VOD !== d
                ? yo.LIVE !== d ||
                  (u = t._liveInst) === null ||
                  u === void 0 ||
                  (u = u.ctx) === null ||
                  u === void 0 ||
                  (u = u.tracker) === null ||
                  u === void 0 ||
                  u.bindTrackerABVersion(l)
                : (c = t._vodInst) === null ||
                  c === void 0 ||
                  (c = c.ctx) === null ||
                  c === void 0 ||
                  (c = c.tracker) === null ||
                  c === void 0 ||
                  c.bindTrackerABVersion(l);
            },
          },
          {
            key: "getServiceConfig",
            value: function () {
              var l,
                u,
                c =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : yo.VOD;
              return yo.VOD === c
                ? ((l = t._vodInst) === null ||
                  l === void 0 ||
                  (l = l.ctx) === null ||
                  l === void 0 ||
                  (l = l.dataCenter) === null ||
                  l === void 0
                    ? void 0
                    : l.getServiceStrategyConfig()) || {}
                : (yo.LIVE === c &&
                    ((u = t._liveInst) === null ||
                    u === void 0 ||
                    (u = u.ctx) === null ||
                    u === void 0 ||
                    (u = u.dataCenter) === null ||
                    u === void 0
                      ? void 0
                      : u.getServiceStrategyConfig())) ||
                    {};
            },
          },
          {
            key: "apply",
            value: function (l, u, c) {
              var d;
              if (!l || !u) return l;
              if (
                ((c == null ? void 0 : c.type) || yo.VOD) === yo.VOD &&
                (d = t._vodInst) !== null &&
                d !== void 0 &&
                d.ctx
              ) {
                var h,
                  f =
                    (c == null ? void 0 : c.Adapter) ||
                    ((h = t._vodInst.ctx.dataCenter.getAppConfig()) === null ||
                    h === void 0 ||
                    (h = h.adapter) === null ||
                    h === void 0
                      ? void 0
                      : h.Adapter) ||
                    eRn[yo.VOD];
                return f && (l = new f().apply(l, u)), l;
              }
              return l;
            },
          },
          {
            key: "_rec",
            value: function (l, u) {
              var c,
                d,
                h,
                f,
                p,
                g,
                y,
                v =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : yo.VOD,
                b = t.inst(v || yo.VOD);
              if ((_h.info("rec", b, u, v), !b))
                return (
                  _h.error("VeStrategyNotInit"),
                  { plugins: [], pluginConfiguration: {}, result: {} }
                );
              var w = {
                  plugins: [Fj],
                  pluginConfiguration: ca({}, Fj.pluginName, {}),
                  result: {},
                  strategyPluginKeys: Fj.pluginName,
                },
                k = new uEn(b.ctx),
                D = b.ctx.dataCenter.getServiceStrategyConfig() || {},
                $ = b.ctx.dataCenter.getInitStrategyConfig() || {};
              zu((c = Df($))).call(c, function (I) {
                var O,
                  X = $[I],
                  G = D[I],
                  H = l == null ? void 0 : l[I];
                if (
                  (X != null && X.disabled) ||
                  (G != null && G.disabled) ||
                  (H != null && H.disabled)
                )
                  _h.warn("StrategyDisabled", X, G, H);
                else {
                  var E,
                    S,
                    L = Jo(
                      Jo(Jo({}, X), H),
                      {},
                      {
                        config: KS(
                          {},
                          X == null ? void 0 : X.config,
                          G == null ? void 0 : G.config,
                          H == null ? void 0 : H.config
                        ),
                      }
                    );
                  ((O = L.Strategy) === null || O === void 0
                    ? void 0
                    : O.strategyName) === I
                    ? k.registerStrategy(L)
                    : _h.warn(
                        "StrategyNameIllegal",
                        Jd(
                          (E = "".concat(
                            (S = L.Strategy) === null || S === void 0
                              ? void 0
                              : S.strategyName,
                            "!=="
                          ))
                        ).call(E, I)
                      );
                }
              }),
                zu((d = k.getStrategyList())).call(d, function (I) {
                  var O, X, G;
                  try {
                    var H;
                    G = (I == null ||
                    (H = I.getRecommendation) === null ||
                    H === void 0
                      ? void 0
                      : H.call(I, u)) || {
                      plugins: [],
                      pluginConfiguration: {},
                      result: {},
                    };
                  } catch (E) {
                    return (
                      _h.error("StrategyRecommendError", E),
                      void b.ctx.tracker.track("strategy_exe_error", {
                        strategy_name: I == null ? void 0 : I.strategyName,
                      })
                    );
                  }
                  (w.plugins = Jd((O = w.plugins)).call(O, G.plugins || [])),
                    (w.pluginConfiguration = Jo(
                      Jo({}, w.pluginConfiguration),
                      G.pluginConfiguration
                    )),
                    (w.result = Jo(
                      Jo({}, w.result),
                      {},
                      ca(
                        {},
                        I.strategyName,
                        Jo(
                          {
                            _strategyConfig:
                              (X = I.getStrategyConfig) === null || X === void 0
                                ? void 0
                                : X.call(I),
                          },
                          G.result
                        )
                      )
                    ));
                });
              var N = b.ctx.dataCenter.getAppConfig();
              zu((h = Df(w.pluginConfiguration))).call(h, function (I) {
                w.pluginConfiguration[I] = Jo(
                  Jo({}, w.pluginConfiguration[I]),
                  {},
                  {
                    ctx: b.ctx,
                    strategyCenter: k,
                    videoType: N == null ? void 0 : N.type,
                  }
                );
              }),
                _h.info("StrategyRecommendResult", w);
              var P = (f = w.result) !== null && f !== void 0 ? f : {};
              return (
                (w.strategyKeys = f$((p = Df(P)))
                  .call(p, function (I) {
                    var O;
                    return (
                      Cc(P[I]) === "object" &&
                      ((O = P[I]) === null || O === void 0 ? void 0 : O.enable)
                    );
                  })
                  .join("|")),
                (w.strategyPluginKeys =
                  (g = w.plugins) === null ||
                  g === void 0 ||
                  (y = Ky(g)) === null ||
                  y === void 0 ||
                  (y = y.call(g, function (I) {
                    return I == null ? void 0 : I.pluginName;
                  })) === null ||
                  y === void 0
                    ? void 0
                    : y.join("|")),
                b.ctx.tracker.track("strategy_rec_info", {
                  strategy_keys: w.strategyKeys,
                  strategy_plugin_keys: w.strategyPluginKeys,
                  strategy_info: XT(w.result),
                }),
                w
              );
            },
          },
        ]
      ),
      t
    );
  })();
ca(f2e, "_vodInst", void 0), ca(f2e, "_liveInst", void 0);
var tRn = ["Strategy", "disabled", "config"];
function nRn(t) {
  if (!t || typeof t == "boolean") return { config: {} };
  t.Strategy, t.disabled;
  var e = t.config,
    n = nse(t, tRn);
  return $n($n({}, t), {}, { config: $n($n({}, n), e ?? {}) });
}
var p2e,
  rRn = (function () {
    function t(u) {
      var c = this;
      Wn(this, t),
        bn(this, "config", void 0),
        bn(this, "tea", void 0),
        bn(this, "Collector", void 0),
        bn(this, "_loadPlugin", void 0),
        bn(this, "webId", void 0),
        bn(this, "status", 0),
        bn(this, "initPromise", void 0),
        bn(this, "_strategyWrappers", {}),
        (this.tea = u.tea),
        (this.Collector = u.Collector),
        (this._loadPlugin = u.loadPlugin),
        u.strategies.forEach(function (d) {
          c._strategyWrappers[d.strategyKey] = new d(c);
        });
    }
    var e, n, r, i, o, l;
    return (
      Kn(t, [
        {
          key: "preload",
          get: function () {
            return this._strategyWrappers.preload;
          },
        },
        {
          key: "h265",
          get: function () {
            return this._strategyWrappers.h265;
          },
        },
        {
          key: "rtmAdaptiveBuffer",
          get: function () {
            return this._strategyWrappers.rtmAdaptiveBuffer;
          },
        },
        {
          key: "init",
          value:
            ((l = Gi(
              or().mark(function u(c) {
                return or().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return (
                            this.initPromise ||
                              (this.initPromise = this.initOnce(c)),
                            d.abrupt("return", this.initPromise)
                          );
                        case 2:
                        case "end":
                          return d.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function (u) {
              return l.apply(this, arguments);
            }),
        },
        {
          key: "prepare",
          value: function () {
            return this.initPromise || Ar.resolve(this.isReady());
          },
        },
        {
          key: "getDeviceId",
          value: function () {
            var u;
            return (u = this.config) === null || u === void 0
              ? void 0
              : u.deviceId;
          },
        },
        {
          key: "isReady",
          value: function () {
            return this.status === 2;
          },
        },
        {
          key: "getStrategyRecommendations",
          value: function () {
            var u,
              c =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : void 0,
              d =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : void 0;
            return this.isReady()
              ? ((u = this.config) === null ||
                u === void 0 ||
                (u = u.Module) === null ||
                u === void 0
                  ? void 0
                  : u.rec(c, d, yo.LIVE)) || {}
              : { plugins: [], pluginConfiguration: {} };
          },
        },
        {
          key: "getStrategyRecommendationsAsync",
          value:
            ((o = Gi(
              or().mark(function u() {
                var c,
                  d,
                  h,
                  f,
                  p = arguments;
                return or().wrap(
                  function (g) {
                    for (;;)
                      switch ((g.prev = g.next)) {
                        case 0:
                          if (
                            ((d =
                              p.length > 0 && p[0] !== void 0 ? p[0] : void 0),
                            (h =
                              p.length > 1 && p[1] !== void 0 ? p[1] : void 0),
                            this.isReady())
                          ) {
                            g.next = 4;
                            break;
                          }
                          return g.abrupt("return", {
                            plugins: [],
                            pluginConfiguration: {},
                          });
                        case 4:
                          return (
                            (g.next = 6),
                            (c = this.config) === null ||
                            c === void 0 ||
                            (c = c.Module) === null ||
                            c === void 0
                              ? void 0
                              : c.recAsync(d, h)
                          );
                        case 6:
                          return (f = g.sent), g.abrupt("return", f);
                        case 8:
                        case "end":
                          return g.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function () {
              return o.apply(this, arguments);
            }),
        },
        {
          key: "fetchWebId",
          value:
            ((i = Gi(
              or().mark(function u() {
                var c,
                  d,
                  h = this;
                return or().wrap(
                  function (f) {
                    for (;;)
                      switch ((f.prev = f.next)) {
                        case 0:
                          if (
                            (c = this.config) === null ||
                            c === void 0 ||
                            !c.deviceId
                          ) {
                            f.next = 2;
                            break;
                          }
                          return f.abrupt(
                            "return",
                            Ar.resolve(
                              (d = this.config) === null || d === void 0
                                ? void 0
                                : d.deviceId
                            )
                          );
                        case 2:
                          return f.abrupt(
                            "return",
                            new Ar(function (p) {
                              var g;
                              return (g = h.tea) !== null &&
                                g !== void 0 &&
                                g.getToken
                                ? h.tea.getToken(function (y) {
                                    p(y == null ? void 0 : y.web_id);
                                  })
                                : p("default_web_id");
                            }).then(function (p) {
                              return (
                                h.config && (h.config.deviceId = p), h.webId
                              );
                            })
                          );
                        case 3:
                        case "end":
                          return f.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function () {
              return i.apply(this, arguments);
            }),
        },
        {
          key: "fetchVeStrategy",
          value:
            ((r = Gi(
              or().mark(function u() {
                var c,
                  d = this;
                return or().wrap(
                  function (h) {
                    for (;;)
                      switch ((h.prev = h.next)) {
                        case 0:
                          if (
                            (c = this.config) === null ||
                            c === void 0 ||
                            !c.Module
                          ) {
                            h.next = 2;
                            break;
                          }
                          return h.abrupt("return");
                        case 2:
                          return h.abrupt(
                            "return",
                            this._loadPlugin("vestrategy").then(function (f) {
                              d.config && f && (d.config.Module = f);
                            })
                          );
                        case 3:
                        case "end":
                          return h.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function () {
              return r.apply(this, arguments);
            }),
        },
        {
          key: "fetchStrategies",
          value:
            ((n = Gi(
              or().mark(function u() {
                var c,
                  d,
                  h,
                  f = this;
                return or().wrap(
                  function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (
                            ((h = {}),
                            (c = this.config) !== null &&
                              c !== void 0 &&
                              c.strategies)
                          ) {
                            p.next = 3;
                            break;
                          }
                          return p.abrupt("return", h);
                        case 3:
                          return (
                            (p.next = 5),
                            Ar.all(
                              On((d = Dn(this.config.strategies))).call(
                                d,
                                (function () {
                                  var g = Gi(
                                    or().mark(function y(v) {
                                      var b, w, k;
                                      return or().wrap(function (D) {
                                        for (;;)
                                          switch ((D.prev = D.next)) {
                                            case 0:
                                              if (
                                                (w =
                                                  (b = f.config) === null ||
                                                  b === void 0
                                                    ? void 0
                                                    : b.strategies[v])
                                              ) {
                                                D.next = 3;
                                                break;
                                              }
                                              return D.abrupt("return");
                                            case 3:
                                              if (
                                                (w === !0 && (w = {}),
                                                (k = w.Strategy))
                                              ) {
                                                D.next = 9;
                                                break;
                                              }
                                              return (
                                                (D.next = 8), f._loadPlugin(v)
                                              );
                                            case 8:
                                              k = D.sent;
                                            case 9:
                                              (h[v] = $n(
                                                $n({}, w),
                                                {},
                                                { Strategy: k }
                                              )),
                                                (h[v] = nRn(h[v]));
                                            case 11:
                                            case "end":
                                              return D.stop();
                                          }
                                      }, y);
                                    })
                                  );
                                  return function (y) {
                                    return g.apply(this, arguments);
                                  };
                                })()
                              )
                            )
                          );
                        case 5:
                          return (
                            (this.config.strategies = h), p.abrupt("return", h)
                          );
                        case 7:
                        case "end":
                          return p.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function () {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "initOnce",
          value:
            ((e = Gi(
              or().mark(function u(c) {
                var d, h, f, p;
                return or().wrap(
                  function (g) {
                    for (;;)
                      switch ((g.prev = g.next)) {
                        case 0:
                          if (c && c.appId) {
                            g.next = 2;
                            break;
                          }
                          return g.abrupt("return");
                        case 2:
                          return (
                            (this.status = 1),
                            (this.config = c),
                            (g.prev = 4),
                            (g.next = 7),
                            Ar.all([this.fetchWebId(), this.fetchVeStrategy()])
                          );
                        case 7:
                          return (g.next = 9), this.fetchStrategies();
                        case 9:
                          g.next = 13;
                          break;
                        case 11:
                          (g.prev = 11), (g.t0 = g.catch(4));
                        case 13:
                          return (
                            (d = this.config),
                            (h = d.appId),
                            (f = d.deviceId),
                            (p = d.Module),
                            h && f && p
                              ? (p.bootstrap(
                                  $n(
                                    $n({}, this.config),
                                    {},
                                    {
                                      tracker: {
                                        Collector: this.Collector,
                                        enableABVersion: !1,
                                      },
                                    }
                                  )
                                ),
                                (this.status = 2))
                              : (this.status = 3),
                            g.abrupt("return", this.isReady())
                          );
                        case 16:
                        case "end":
                          return g.stop();
                      }
                  },
                  u,
                  this,
                  [[4, 11]]
                );
              })
            )),
            function (u) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  as = function () {
    return (as =
      Ci ||
      function (t) {
        for (var e, n = 1, r = arguments.length; n < r; n++)
          for (var i in (e = arguments[n]))
            Object.prototype.hasOwnProperty.call(e, i) && (t[i] = e[i]);
        return t;
      }).apply(this, arguments);
  };
function iRn(t, e) {
  var n = typeof lu == "function" && hse(t);
  if (!n) return t;
  var r,
    i,
    o = n.call(t),
    l = [];
  try {
    for (; (e === void 0 || e-- > 0) && !(r = o.next()).done; ) l.push(r.value);
  } catch (u) {
    i = { error: u };
  } finally {
    try {
      r && !r.done && (n = o.return) && n.call(o);
    } finally {
      if (i) throw i.error;
    }
  }
  return l;
}
function QS() {
  for (var t = [], e = 0; e < arguments.length; e++)
    t = Ce(t).call(t, iRn(arguments[e]));
  return t;
}
var g2e,
  cW,
  Zte,
  Un,
  aRn = (function () {
    function t() {
      (this._hooks = {}), (this._cache = []), (this._hooksCache = {});
    }
    return (
      (t.prototype.on = function (e, n) {
        e &&
          n &&
          typeof n == "function" &&
          (this._hooks[e] || (this._hooks[e] = []), this._hooks[e].push(n));
      }),
      (t.prototype.once = function (e, n) {
        var r = this;
        e &&
          n &&
          typeof n == "function" &&
          this.on(e, function i(o) {
            n(o), r.off(e, i);
          });
      }),
      (t.prototype.off = function (e, n) {
        if (e && this._hooks[e] && this._hooks[e].length)
          if (n) {
            var r,
              i,
              o = qt((r = this._hooks[e])).call(r, n);
            o !== -1 && tl((i = this._hooks[e])).call(i, o, 1);
          } else this._hooks[e] = [];
      }),
      (t.prototype.emit = function (e, n, r) {
        if (r) {
          var i;
          if (!e) return;
          qt((i = this._cache)).call(i, r) !== -1
            ? this._emit(e, n)
            : (this._hooksCache.hasOwnProperty(r) || (this._hooksCache[r] = {}),
              this._hooksCache[r].hasOwnProperty(e) ||
                (this._hooksCache[r][e] = []),
              this._hooksCache[r][e].push(n));
        } else this._emit(e, n);
      }),
      (t.prototype._emit = function (e, n) {
        e &&
          this._hooks[e] &&
          this._hooks[e].length &&
          QS(this._hooks[e]).forEach(function (r) {
            try {
              r(n);
            } catch {}
          });
      }),
      (t.prototype.set = function (e) {
        var n;
        e && qt((n = this._cache)).call(n, e) === -1 && this._cache.push(e);
      }),
      t
    );
  })(),
  Bx = function (t) {
    return t != null && Object.prototype.toString.call(t) == "[object Object]";
  },
  zU = function (t) {
    return Array.isArray(t);
  },
  oRn =
    ((g2e =
      +Date.now() + Number(jn((p2e = "" + Math.random())).call(p2e, 2, 8))),
    function () {
      return (g2e += 1);
    }),
  th = function (t) {
    return (function (e, n, r) {
      if (typeof e == "string" && typeof r == "number") {
        var i,
          o = [];
        r = r <= 25 ? r : r % 25;
        var l = String.fromCharCode(r + 97);
        i = e.split(l);
        for (var u = 0; u < i.length; u++) {
          var c = _i(i[u], r);
          c = (1 * c) ^ 64;
          var d = String.fromCharCode(c);
          o.push(d);
        }
        return o.join("");
      }
    })(t, 0, 25);
  },
  iVe = function () {
    return !!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
  },
  pue = function (t) {
    iVe()
      ? window.addEventListener("pagehide", t, !1)
      : window.addEventListener("beforeunload", t, !1);
  },
  sRn = function (t, e, n) {
    var r = document.createElement("script");
    (r.src = t),
      (r.onerror = function () {
        n(t);
      }),
      (r.onload = function () {
        e();
      }),
      document.getElementsByTagName("head")[0].appendChild(r);
  },
  aVe = function () {
    var t = 0;
    return (
      ["hidden", "msHidden", "webkitHidden"].forEach(function (e) {
        document[e] !== void 0 && (t = 1);
      }),
      t
    );
  },
  lRn = function (t, e) {
    t === void 0 && (t = function () {}), e === void 0 && (e = 1e3);
    var n,
      r = Date.now() + e;
    return (
      (n = window.setTimeout(function i() {
        var o = Date.now() - r;
        t(), (r += e), (n = window.setTimeout(i, Math.max(0, e - o)));
      }, e)),
      function () {
        window.clearTimeout(n);
      }
    );
  },
  gue = function (t) {
    var e = document.createElement("a");
    return (e.href = t), e;
  },
  jU = function (t) {
    var e = {};
    try {
      var n = gue(t).search;
      if (!n) return e;
      (n = jn(n).call(n, 1)).split("&").forEach(function (r) {
        var i,
          o,
          l = r.split("=");
        l.length && ((i = l[0]), (o = l[1]));
        try {
          e[i] = decodeURIComponent(o === void 0 ? "" : o);
        } catch {
          e[i] = o;
        }
      });
    } catch {}
    return e;
  },
  m2e = function (t) {
    for (var e = 0, n = 0, r = (t += "").length, i = 0; i < r; i++)
      ((e = 31 * e + t.charCodeAt(n++)) > 0x7fffffffffff ||
        e < -0x800000000000) &&
        (e &= 0xffffffffffff);
    return e < 0 && (e += 0x7ffffffffffff), e;
  },
  Yte =
    ((function (t, e) {
      var n;
      (n = function () {
        function r() {
          for (var o = 0, l = {}; o < arguments.length; o++) {
            var u = arguments[o];
            for (var c in u) l[c] = u[c];
          }
          return l;
        }
        function i(o) {
          return o.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);
        }
        return (function o(l) {
          function u() {}
          function c(h, f, p) {
            if (typeof document < "u") {
              typeof (p = r({ path: "/" }, u.defaults, p)).expires ==
                "number" &&
                (p.expires = new Date(1 * new Date() + 864e5 * p.expires)),
                (p.expires = p.expires ? p.expires.toUTCString() : "");
              try {
                var g = lr(f);
                /^[\{\[]/.test(g) && (f = g);
              } catch {}
              (f = l.write
                ? l.write(f, h)
                : encodeURIComponent(String(f)).replace(
                    /%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,
                    decodeURIComponent
                  )),
                (h = encodeURIComponent(String(h))
                  .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)
                  .replace(/[\(\)]/g, escape));
              var y = "";
              for (var v in p)
                p[v] &&
                  ((y += "; " + v),
                  p[v] !== !0 && (y += "=" + p[v].split(";")[0]));
              return (document.cookie = h + "=" + f + y);
            }
          }
          function d(h, f) {
            if (typeof document < "u") {
              for (
                var p = {},
                  g = document.cookie ? document.cookie.split("; ") : [],
                  y = 0;
                y < g.length;
                y++
              ) {
                var v = g[y].split("="),
                  b = jn(v).call(v, 1).join("=");
                f || b.charAt(0) !== '"' || (b = jn(b).call(b, 1, -1));
                try {
                  var w = i(v[0]);
                  if (((b = (l.read || l)(b, w) || i(b)), f))
                    try {
                      b = JSON.parse(b);
                    } catch {}
                  if (((p[w] = b), h === w)) break;
                } catch {}
              }
              return h ? p[h] : p;
            }
          }
          return (
            (u.set = c),
            (u.get = function (h) {
              return d(h, !1);
            }),
            (u.getJSON = function (h) {
              return d(h, !0);
            }),
            (u.remove = function (h, f) {
              c(h, "", r(f, { expires: -1 }));
            }),
            (u.defaults = {}),
            (u.withConverter = o),
            u
          );
        })(function () {});
      }),
        (t.exports = n());
    })((cW = { exports: {} }), cW.exports),
    cW.exports),
  mue = function (t, e) {
    try {
      return t ? Yte.get(t) : Yte.get();
    } catch {
      return "";
    }
  },
  yue = function (t, e, n, r) {
    try {
      var i = r || document.domain,
        o = +new Date() + (n || 6048e5);
      Yte.set(t, e, { expires: new Date(o), path: "/", domain: i });
    } catch {}
  },
  uRn = (function () {
    function t() {
      this.cache = {};
    }
    return (
      (t.prototype.setItem = function (e, n) {
        this.cache[e] = n;
      }),
      (t.prototype.getItem = function (e) {
        return this.cache[e];
      }),
      (t.prototype.removeItem = function (e) {
        this.cache[e] = void 0;
      }),
      (t.prototype.getCookie = function (e, n) {
        return mue(e);
      }),
      (t.prototype.setCookie = function (e, n, r, i) {
        yue(e, n, r, i);
      }),
      t
    );
  })(),
  y2e = {
    getItem: function (t) {
      try {
        var e = localStorage.getItem(t),
          n = e;
        try {
          e && typeof e == "string" && (n = JSON.parse(e));
        } catch {}
        return n || {};
      } catch {}
      return {};
    },
    setItem: function (t, e) {
      try {
        var n = typeof e == "string" ? e : lr(e);
        localStorage.setItem(t, n);
      } catch {}
    },
    removeItem: function (t) {
      try {
        localStorage.removeItem(t);
      } catch {}
    },
    getCookie: function (t, e) {
      return mue(t);
    },
    setCookie: function (t, e, n, r) {
      yue(t, e, n, r);
    },
    isSupportLS: (function () {
      try {
        return (
          localStorage.setItem("_ranger-test-key", "hi"),
          localStorage.getItem("_ranger-test-key"),
          localStorage.removeItem("_ranger-test-key"),
          !0
        );
      } catch {
        return !1;
      }
    })(),
  },
  cRn = {
    getItem: function (t) {
      try {
        var e = sessionStorage.getItem(t),
          n = e;
        try {
          e && typeof e == "string" && (n = JSON.parse(e));
        } catch {}
        return n || {};
      } catch {}
      return {};
    },
    setItem: function (t, e) {
      try {
        var n = typeof e == "string" ? e : lr(e);
        sessionStorage.setItem(t, n);
      } catch {}
    },
    removeItem: function (t) {
      try {
        sessionStorage.removeItem(t);
      } catch {}
    },
    getCookie: function (t, e) {
      return mue(t);
    },
    setCookie: function (t, e, n, r) {
      yue(t, e, n, r);
    },
    isSupportSession: (function () {
      try {
        return (
          sessionStorage.setItem("_ranger-test-key", "hi"),
          sessionStorage.getItem("_ranger-test-key"),
          sessionStorage.removeItem("_ranger-test-key"),
          !0
        );
      } catch {
        return !1;
      }
    })(),
  },
  Q1 = (function () {
    function t(e, n) {
      this._storage =
        n && n === "session" ? cRn : !e && y2e.isSupportLS ? y2e : new uRn();
    }
    return (
      (t.prototype.getItem = function (e) {
        return this._storage.getItem(e);
      }),
      (t.prototype.setItem = function (e, n) {
        this._storage.setItem(e, n);
      }),
      (t.prototype.getCookie = function (e, n) {
        return this._storage.getCookie(e, n);
      }),
      (t.prototype.setCookie = function (e, n, r, i) {
        this._storage.setCookie(e, n, r, i);
      }),
      (t.prototype.removeItem = function (e) {
        this._storage.removeItem(e);
      }),
      t
    );
  })(),
  dRn = (function () {
    function t(e, n, r) {
      (this.appid = e),
        (this.domain = n),
        (this.userAgent = window.navigator.userAgent),
        (this.appVersion = window.navigator.appVersion),
        (this.cookie_expire = r);
    }
    return (
      (t.prototype.init = function () {
        var e,
          n = window.navigator.userAgent,
          r = window.navigator.language,
          i = document.referrer,
          o = i ? gue(i).hostname : "",
          l = jU(window.location.href),
          u = /Mobile|htc|mini|Android|iP(ad|od|hone)/.test(this.appVersion)
            ? "wap"
            : "web",
          c =
            ((e = window.navigator.connection) === null || e === void 0
              ? void 0
              : e.effectiveType) || "";
        this.utm = (function (f, p, g, y) {
          var v = new Q1(!1),
            b = new Q1(!1, "session"),
            w = f ? "_tea_utm_cache_" + f : "_tea_utm_cache",
            k = f ? "_$utm_from_url_" + f : "_$utm_from_url",
            D = {},
            $ = [
              "tr_shareuser",
              "tr_admaster",
              "tr_param1",
              "tr_param2",
              "tr_param3",
              "tr_param4",
              "$utm_from_url",
            ],
            N = {
              ad_id: Number(p.ad_id) || void 0,
              campaign_id: Number(p.campaign_id) || void 0,
              creative_id: Number(p.creative_id) || void 0,
              utm_source: p.utm_source,
              utm_medium: p.utm_medium,
              utm_campaign: p.utm_campaign,
              utm_term: p.utm_term,
              utm_content: p.utm_content,
              tr_shareuser: p.tr_shareuser,
              tr_admaster: p.tr_admaster,
              tr_param1: p.tr_param1,
              tr_param2: p.tr_param2,
              tr_param3: p.tr_param3,
              tr_param4: p.tr_param4,
            };
          try {
            var P = !1;
            for (var I in N)
              N[I] &&
                (qt($).call($, I) !== -1
                  ? (D.hasOwnProperty("tracer_data") || (D.tracer_data = {}),
                    (D.tracer_data[I] = N[I]))
                  : (D[I] = N[I]),
                (P = !0));
            if (P) b.setItem(k, "1"), v.setCookie(w, lr(D), y, g);
            else {
              var O = v.getCookie(w, g);
              O && (D = JSON.parse(O));
            }
            b.getItem(k) &&
              (D.hasOwnProperty("tracer_data") || (D.tracer_data = {}),
              (D.tracer_data.$utm_from_url = 1));
          } catch {
            return N;
          }
          return D;
        })(this.appid, l, this.domain, this.cookie_expire);
        var d = this.browser(),
          h = this.os();
        return {
          browser: d.browser,
          browser_version: d.browser_version,
          platform: u,
          os_name: h.os_name,
          os_version: h.os_version,
          userAgent: n,
          screen_width: window.screen && window.screen.width,
          screen_height: window.screen && window.screen.height,
          device_model: this.getDeviceModel(h.os_name),
          language: r,
          referrer: i,
          referrer_host: o,
          network_type: c,
          utm: this.utm,
          latest_data: this.last(i, o),
        };
      }),
      (t.prototype.last = function (e, n) {
        var r = "",
          i = "",
          o = "",
          l = location.hostname,
          u = !1;
        if (e && n && l !== n) {
          (r = e), (i = n), (u = !0);
          var c = jU(e);
          c.keyword && (o = c.keyword);
        }
        return {
          $latest_referrer: r,
          $latest_referrer_host: i,
          $latest_search_keyword: o,
          isLast: u,
        };
      }),
      (t.prototype.browser = function () {
        var e,
          n,
          r = "",
          i = "" + wl(this.appVersion),
          o = this.userAgent;
        return (
          qt(o).call(o, "Edge") !== -1 || qt(o).call(o, "Edg") !== -1
            ? ((r = "Microsoft Edge"),
              qt(o).call(o, "Edge") !== -1
                ? ((e = qt(o).call(o, "Edge")), (i = o.substring(e + 5)))
                : ((e = qt(o).call(o, "Edg")), (i = o.substring(e + 4))))
            : (e = qt(o).call(o, "MSIE")) !== -1
            ? ((r = "Microsoft Internet Explorer"), (i = o.substring(e + 5)))
            : (e = qt(o).call(o, "MetaSr")) !== -1
            ? ((r = "sougoubrowser"), (i = o.substring(e + 7, e + 10)))
            : qt(o).call(o, "MQQBrowser") !== -1 ||
              qt(o).call(o, "QQBrowser") !== -1
            ? ((r = "qqbrowser"),
              qt(o).call(o, "MQQBrowser") !== -1
                ? ((e = qt(o).call(o, "MQQBrowser")),
                  (i = o.substring(e + 11, e + 15)))
                : qt(o).call(o, "QQBrowser") !== -1 &&
                  ((e = qt(o).call(o, "QQBrowser")),
                  (i = o.substring(e + 10, e + 25))))
            : qt(o).call(o, "Chrome") !== -1
            ? (e = qt(o).call(o, "MicroMessenger")) !== -1
              ? ((r = "weixin"), (i = o.substring(e + 15, e + 20)))
              : (e = qt(o).call(o, "360")) !== -1
              ? ((r = "360browser"),
                (i = o.substring(qt(o).call(o, "Chrome") + 7)))
              : qt(o).call(o, "baidubrowser") !== -1 ||
                qt(o).call(o, "BIDUBrowser") !== -1
              ? (qt(o).call(o, "baidubrowser") !== -1
                  ? ((e = qt(o).call(o, "baidubrowser")),
                    (i = o.substring(e + 13, e + 16)))
                  : qt(o).call(o, "BIDUBrowser") !== -1 &&
                    ((e = qt(o).call(o, "BIDUBrowser")),
                    (i = o.substring(e + 12, e + 15))),
                (r = "baidubrowser"))
              : (e = qt(o).call(o, "xiaomi")) !== -1
              ? qt(o).call(o, "openlanguagexiaomi") !== -1
                ? ((r = "openlanguage xiaomi"),
                  (i = o.substring(e + 7, e + 13)))
                : ((r = "xiaomi"), (i = o.substring(e - 7, e - 1)))
              : (e = qt(o).call(o, "TTWebView")) !== -1
              ? ((r = "TTWebView"), (i = o.substring(e + 10, e + 23)))
              : ((e = qt(o).call(o, "Chrome")) !== -1 ||
                  (e = qt(o).call(o, "Chrome")) !== -1) &&
                ((r = "Chrome"), (i = o.substring(e + 7)))
            : qt(o).call(o, "Safari") !== -1
            ? (e = qt(o).call(o, "QQ")) !== -1
              ? ((r = "qqbrowser"), (i = o.substring(e + 10, e + 16)))
              : (e = qt(o).call(o, "Safari")) !== -1 &&
                ((r = "Safari"),
                (i = o.substring(e + 7)),
                (e = qt(o).call(o, "Version")) !== -1 &&
                  (i = o.substring(e + 8)))
            : (e = qt(o).call(o, "Firefox")) !== -1
            ? ((r = "Firefox"), (i = o.substring(e + 8)))
            : (e = qt(o).call(o, "MicroMessenger")) !== -1
            ? ((r = "weixin"), (i = o.substring(e + 15, e + 20)))
            : (e = qt(o).call(o, "QQ")) !== -1 &&
              ((r = "qqbrowser"), (i = o.substring(e + 3, e + 8))),
          (n = qt(i).call(i, ";")) !== -1 && (i = i.substring(0, n)),
          (n = qt(i).call(i, " ")) !== -1 && (i = i.substring(0, n)),
          (n = qt(i).call(i, ")")) !== -1 && (i = i.substring(0, n)),
          { browser: r, browser_version: i }
        );
      }),
      (t.prototype.os = function () {
        for (
          var e,
            n = "",
            r = "",
            i = [
              {
                s: "Windows 10",
                r: /(Windows 10.0|Windows NT 10.0|Windows NT 10.1)/,
              },
              { s: "Windows 8.1", r: /(Windows 8.1|Windows NT 6.3)/ },
              { s: "Windows 8", r: /(Windows 8|Windows NT 6.2)/ },
              { s: "Windows 7", r: /(Windows 7|Windows NT 6.1)/ },
              { s: "Windows", r: /(Windows|Windows NT)/ },
              { s: "Android", r: /Android/ },
              { s: "iOS", r: /(iPhone|iPad|iPod)/ },
              { s: "Mac OS X", r: /Mac OS X/ },
              { s: "Mac OS", r: /(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/ },
              { s: "chromeOS", r: /CrOS/ },
              { s: "Linux", r: /(Linux|X11)/ },
              { s: "Sun OS", r: /SunOS/ },
            ],
            o = 0;
          o < i.length;
          o++
        ) {
          var l = i[o];
          if (l.r.test(this.userAgent)) {
            (n = l.s) === "Mac OS X" && this.isNewIpad() && (n = "iOS");
            break;
          }
        }
        var u,
          c,
          d = function (p, g) {
            var y = p.exec(g);
            return y && y[1] ? y[1] : "";
          },
          h = function (p, g) {
            var y = RegExp(
              "(?:^|[^A-Z0-9-_]|[^A-Z0-9-]_|sprd-)(?:" + p + ")",
              "i"
            ).exec(g);
            return y ? jn(y).call(y, 1)[0] : "";
          };
        switch (
          (/Windows/.test(n) && ((r = d(/Windows (.*)/, n)), (n = "windows")),
          n)
        ) {
          case "Mac OS X":
            (r = h(
              "Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",
              this.userAgent
            )),
              (n = "mac");
            break;
          case "Android":
            (c = d(/Android ([\.\_\d]+)/, (u = this.userAgent))) ||
              (c = d(/Android\/([\.\_\d]+)/, u)),
              (r = c),
              (n = "android");
            break;
          case "iOS":
            (r = this.isNewIpad()
              ? h(
                  "Mac[ +]OS[ +]X(?:[ /](?:Version )?(\\d+(?:[_\\.]\\d+)+))?",
                  this.userAgent
                )
              : (r = /OS (\d+)_(\d+)_?(\d+)?/.exec(this.appVersion))
              ? r[1] + "." + r[2] + "." + (0 | r[3])
              : ""),
              (n = "ios");
            break;
          case "chromeOS":
            var f = qt((e = this.userAgent)).call(e, "x86_64");
            r = this.userAgent.substring(f + 7, f + 16);
        }
        return { os_name: n, os_version: r };
      }),
      (t.prototype.getDeviceModel = function (e) {
        var n = "";
        try {
          if (e === "android")
            navigator.userAgent.split(";").forEach(function (o) {
              qt(o).call(o, "Build/") > -1 &&
                (n = jn(o).call(o, 0, qt(o).call(o, "Build/")));
            });
          else if (e === "ios" || e === "mac" || e === "windows")
            if (this.isNewIpad()) n = "iPad";
            else {
              var r = navigator.userAgent.replace("Mozilla/5.0 (", ""),
                i = qt(r).call(r, ";");
              n = i === -1 ? "" : jn(r).call(r, 0, i);
            }
        } catch {
          return es(n).call(n);
        }
        return es(n).call(n);
      }),
      (t.prototype.isNewIpad = function () {
        return (
          this.userAgent !== void 0 &&
          navigator.platform === "MacIntel" &&
          typeof navigator.maxTouchPoints == "number" &&
          navigator.maxTouchPoints > 1
        );
      }),
      t
    );
  })(),
  oVe = {
    cn: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
    va: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az1gz22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
    sg: "1fz22z22z1nz21z4mz4bz4bz22z1mz19z1jz1mz1ez4az22z1mz19z21z1lz21z21z1bz1iz4az1az1mz1k",
  },
  hRn = {
    cn: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z4az28z1gz1hz1gz1cz18z1nz1gz4az1az1mz1k",
    sg: "1fz22z22z1nz21z4mz4bz4bz21z1ez18z1jz1gz49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",
    va: "1fz22z22z1nz21z4mz4bz4bz1kz18z1jz1gz24z18z49z1kz1az21z4az19z27z22z1cz1mz24z1cz20z21z1cz18z4az1az1mz1k",
    my: "1fz22z22z1nz21z4mz4bz4bz1kz1az21z49z19z1bz49z1kz27z4az1jz18z20z1iz1mz1dz1dz1gz1az1cz4az1az1mz1k",
  },
  tv = "5.3.1",
  fRn =
    (th(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z1cz1bz1gz22z1mz20z49z20z18z1lz1ez1cz20z21z4az1hz21"
    ),
    th(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1az1mz20z1cz4az1hz21"
    ),
    th(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz24z1gz21z23z18z1jz49z18z19z49z1jz1mz18z1bz1cz20z4az1hz21"
    ),
    th(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1fz1cz18z22z1kz18z1nz49z1az1mz20z1c"
    )),
  vue =
    (th(
      "1fz22z22z1nz21z4mz4bz4bz1jz1dz4fz49z1bz18z22z18z4az24z1mz1jz1az1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz1bz18z22z18z49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz22z1cz21z22z1cz20z49z1cz24z1cz1lz22z49z1gz1lz21z1nz1cz1az22z1mz20"
    ),
    (function () {
      function t(e, n) {
        (this.collector = e),
          (this.config = n),
          (this.eventNameWhiteList = [
            "__bav_page",
            "__bav_beat",
            "__bav_page_statistics",
            "__bav_click",
            "__bav_page_exposure",
            "__bav_slide",
          ]),
          (this.paramsNameWhiteList = [
            "$inactive",
            "$inline",
            "$target_uuid_list",
            "$source_uuid",
            "$is_spider",
            "$source_id",
            "$is_first_time",
            "_staging_flag",
          ]),
          (this.regStr = new RegExp("^[a-zA-Z0-9][a-z0-9A-Z_.-]{1,255}$"));
      }
      return (
        (t.prototype.checkVerify = function (e) {
          var n = this;
          if (!e || !e.length) return !1;
          var r = e[0];
          if (!r) return !1;
          var i = r.events,
            o = r.header;
          if (!i || !i.length) return !1;
          var l = !0;
          return (
            i.forEach(function (u) {
              if (!u) return (l = !1), void (u.checkEvent = "事件异常");
              n.checkEventName(u.event) ||
                ((l = !1), (u.checkEvent = "事件名不能以 $ or __开头")),
                n.checkEventParams(u.params) ||
                  ((l = !1), (u.checkParams = "属性名不能以 $ or __开头"));
            }),
            this.checkEventParams(o) || (l = !1),
            l
          );
        }),
        (t.prototype.checkEventName = function (e) {
          return !!e && this.calculate(e, "event");
        }),
        (t.prototype.checkEventParams = function (e) {
          var n = e;
          if ((typeof e == "string" && (n = JSON.parse(n)), !Dn(n).length))
            return !0;
          for (var r in n)
            return !(
              !this.calculate(r, "params") ||
              (typeof n[r] == "string" &&
                n[r].length > 1024 &&
                (console.warn(
                  "params: " + r + " can not over 1024 byte, please check;"
                ),
                1))
            );
          return !0;
        }),
        (t.prototype.calculate = function (e, n) {
          var r;
          return (
            qt(
              (r =
                n === "event"
                  ? this.eventNameWhiteList
                  : this.paramsNameWhiteList)
            ).call(r, e) !== -1 ||
            (!new RegExp("^\\$").test(e) && !new RegExp("^__").test(e)) ||
            (console.warn(
              (n === "event" ? "event" : "params") +
                " name: " +
                e +
                " can not start with $ or __, pleace check;"
            ),
            !1)
          );
        }),
        t
      );
    })());
(function (t) {
  (t.Init = "init"),
    (t.Config = "config"),
    (t.Start = "start"),
    (t.Ready = "ready"),
    (t.UnReady = "un-ready"),
    (t.TokenComplete = "token-complete"),
    (t.TokenStorage = "token-storage"),
    (t.TokenFetch = "token-fetch"),
    (t.TokenError = "token-error"),
    (t.ConfigUuid = "config-uuid"),
    (t.ConfigWebId = "config-webid"),
    (t.ConfigDiD = "config-device-id"),
    (t.ConfigDomain = "config-domain"),
    (t.CustomWebId = "custom-webid"),
    (t.TokenChange = "token-change"),
    (t.TokenReset = "token-reset"),
    (t.ConfigTransform = "config-transform"),
    (t.EnvTransform = "env-transform"),
    (t.SessionReset = "session-reset"),
    (t.SessionResetTime = "session-reset-time"),
    (t.SetSessionId = "set-session-id"),
    (t.Event = "event"),
    (t.Events = "events"),
    (t.EventNow = "event-now"),
    (t.CleanEvents = "clean-events"),
    (t.BeconEvent = "becon-event"),
    (t.SubmitBefore = "submit-before"),
    (t.SubmitScuess = "submit-scuess"),
    (t.SubmitAfter = "submit-after"),
    (t.SubmitError = "submit-error"),
    (t.SubmitVerify = "submit-verify"),
    (t.CustomHeader = "custom-request-header"),
    (t.SDKInnerError = "sdk-inner-error"),
    (t.SDKRunTimeError = "sdk-run-time-error"),
    (t.LogSetting = "log-setting"),
    (t.LogSettingReady = "log-setting-ready"),
    (t.Stay = "stay"),
    (t.ResetStay = "reset-stay"),
    (t.StayReady = "stay-ready"),
    (t.SetStay = "set-stay"),
    (t.RouteChange = "route-change"),
    (t.RouteReady = "route-ready"),
    (t.Ab = "ab"),
    (t.AbVar = "ab-var"),
    (t.AbAllVars = "ab-all-vars"),
    (t.AbConfig = "ab-config"),
    (t.AbExternalVersion = "ab-external-version"),
    (t.AbVersionChangeOn = "ab-version-change-on"),
    (t.AbVersionChangeOff = "ab-version-change-off"),
    (t.AbOpenLayer = "ab-open-layer"),
    (t.AbCloseLayer = "ab-close-layer"),
    (t.AbReady = "ab-ready"),
    (t.AbComplete = "ab-complete"),
    (t.AbTimeout = "ab-timeout"),
    (t.Profile = "profile"),
    (t.ProfileSet = "profile-set"),
    (t.ProfileSetOnce = "profile-set-once"),
    (t.ProfileUnset = "profile-unset"),
    (t.ProfileIncrement = "profile-increment"),
    (t.ProfileAppend = "profile-append"),
    (t.ProfileClear = "profile-clear"),
    (t.Autotrack = "autotrack"),
    (t.AutotrackReady = "autotrack-ready"),
    (t.CepReady = "cep-ready"),
    (t.TracerReady = "tracer-ready"),
    (t.sessionRecord = "session-record"),
    (t.SessionRecordStart = "session-record-start"),
    (t.SessionRecordPause = "session-record-pause"),
    (t.SessionRecordEnd = "session-record-end"),
    (t.SessionRecordReport = "session-record-report"),
    (t.DestoryInstance = "destory-instance"),
    (t.VisualCollectReady = "visual-collect-ready"),
    (t.VisualApiReady = "visual-api-ready"),
    (t.VisualApiUpdate = "visual-api-update");
})(Zte || (Zte = {})),
  (function (t) {
    (t.DEBUGGER_MESSAGE = "debugger-message"),
      (t.DEBUGGER_MESSAGE_SDK = "debugger-message-sdk"),
      (t.DEBUGGER_MESSAGE_FETCH = "debugger-message-fetch"),
      (t.DEBUGGER_MESSAGE_FETCH_RESULT = "debugger-message-fetch-result"),
      (t.DEBUGGER_MESSAGE_EVENT = "debugger-message-event"),
      (t.DEVTOOL_WEB_READY = "devtool-web-ready");
  })(Un || (Un = {}));
var ai = Zte,
  Wo = void 0,
  sVe = new Date().getTimezoneOffset(),
  pRn = _i("" + -sVe / 60, 10),
  gRn = 60 * sVe,
  mRn = 7776e6,
  yRn = (function () {
    function t(e, n) {
      var r = this;
      (this.is_first_time = !0),
        (this.configPersist = !1),
        (this.initConfig = n),
        (this.collect = e);
      var i = new dRn(
        n.app_id,
        n.cookie_domain || "",
        n.cookie_expire || mRn
      ).init();
      this.eventCheck = new vue(e, n);
      var o = "__tea_cache_first_" + n.app_id;
      (this.configKey = "__tea_cache_config_" + n.app_id),
        (this.sessionStorage = new Q1(!1, "session")),
        (this.localStorage = new Q1(!1, "local")),
        n.configPersist &&
          ((this.configPersist = !0),
          (this.storage =
            n.configPersist === 1 ? this.sessionStorage : this.localStorage));
      var l = this.localStorage.getItem(o);
      l && l == 1
        ? (this.is_first_time = !1)
        : ((this.is_first_time = !0), this.localStorage.setItem(o, "1")),
        (this.envInfo = {
          user: {
            user_unique_id: Wo,
            user_type: Wo,
            user_id: Wo,
            user_is_auth: Wo,
            user_is_login: Wo,
            device_id: Wo,
            web_id: Wo,
            ip_addr_id: Wo,
            user_unique_id_type: Wo,
          },
          header: {
            app_id: Wo,
            app_name: Wo,
            app_install_id: Wo,
            install_id: Wo,
            app_package: Wo,
            app_channel: Wo,
            app_version: Wo,
            ab_version: Wo,
            os_name: i.os_name,
            os_version: i.os_version,
            device_model: i.device_model,
            ab_client: Wo,
            traffic_type: Wo,
            client_ip: Wo,
            device_brand: Wo,
            os_api: Wo,
            access: Wo,
            language: i.language,
            region: Wo,
            app_language: Wo,
            app_region: Wo,
            creative_id: i.utm.creative_id,
            ad_id: i.utm.ad_id,
            campaign_id: i.utm.campaign_id,
            log_type: Wo,
            rnd: Wo,
            platform: i.platform,
            sdk_version: tv,
            sdk_lib: "js",
            province: Wo,
            city: Wo,
            timezone: pRn,
            tz_offset: gRn,
            tz_name: Wo,
            sim_region: Wo,
            carrier: Wo,
            resolution: i.screen_width + "x" + i.screen_height,
            browser: i.browser,
            browser_version: i.browser_version,
            referrer: i.referrer,
            referrer_host: i.referrer_host,
            width: i.screen_width,
            height: i.screen_height,
            screen_width: i.screen_width,
            screen_height: i.screen_height,
            utm_term: i.utm.utm_term,
            utm_content: i.utm.utm_content,
            utm_source: i.utm.utm_source,
            utm_medium: i.utm.utm_medium,
            utm_campaign: i.utm.utm_campaign,
            tracer_data: lr(i.utm.tracer_data),
            custom: i.network_type ? { network_type: i.network_type } : {},
            wechat_unionid: Wo,
            wechat_openid: Wo,
          },
        }),
        (this.ab_version = ""),
        (this.evtParams = {}),
        (this.reportErrorCallback = function () {}),
        (this.isLast = !1),
        this.setCustom(i),
        this.initDomain(),
        this.initABData(),
        this.collect.on("route-change", function (u) {
          r.changeReferInfo(u.config);
        });
    }
    return (
      (t.prototype.initDomain = function () {
        var e = this.initConfig.channel_domain;
        if (e) this.domain = e;
        else {
          var n = this.initConfig.channel;
          this.domain = th(hRn[n]);
        }
      }),
      (t.prototype.setDomain = function (e) {
        this.domain = e;
      }),
      (t.prototype.getDomain = function () {
        return this.domain;
      }),
      (t.prototype.initABData = function () {
        var e = "__tea_sdk_ab_version_" + this.initConfig.app_id,
          n = null;
        if (this.initConfig.ab_cross) {
          var r = this.localStorage.getCookie(
            e,
            this.initConfig.ab_cookie_domain
          );
          n = r ? JSON.parse(r) : null;
        } else n = this.localStorage.getItem(e);
        this.setAbCache(n);
      }),
      (t.prototype.setAbCache = function (e) {
        this.ab_cache = e;
      }),
      (t.prototype.getAbCache = function () {
        return this.ab_cache;
      }),
      (t.prototype.setAbVersion = function (e) {
        this.ab_version = e;
      }),
      (t.prototype.getAbVersion = function () {
        return this.ab_version;
      }),
      (t.prototype.clearAbCache = function () {
        (this.ab_version = ""), (this.ab_cache = {});
      }),
      (t.prototype.getUrl = function (e) {
        var n = "";
        switch (e) {
          case "event":
            n = "/list";
            break;
          case "webid":
            n = "/webid";
            break;
          case "tobid":
            n = "/tobid";
        }
        var r = "";
        return (
          this.initConfig.caller &&
            (r =
              "?sdk_version=" +
              tv +
              "&sdk_name=web&app_id=" +
              this.initConfig.app_id +
              "&caller=" +
              this.initConfig.caller),
          "" + this.getDomain() + n + r
        );
      }),
      (t.prototype.setCustom = function (e) {
        if (e && e.latest_data && e.latest_data.isLast)
          for (var n in (delete e.latest_data.isLast,
          (this.isLast = !0),
          e.latest_data))
            this.envInfo.header.custom[n] = e.latest_data[n];
      }),
      (t.prototype.changeReferInfo = function (e) {
        var n = e;
        this.envInfo.header.referrer = n.referrer;
        var r = "";
        try {
          r = new Bs(n.referrer).host;
        } catch {}
        this.envInfo.header.referrer_host =
          r || this.envInfo.header.referrer_host;
      }),
      (t.prototype.set = function (e) {
        var n = this;
        Dn(e).forEach(function (r) {
          (e[r] !== void 0 && e[r] !== null) || n.delete(r);
          try {
            n.eventCheck.calculate(r, "config");
          } catch {}
          if (
            (r === "traffic_type" &&
              n.isLast &&
              (n.envInfo.header.custom.$latest_traffic_source_type = e[r]),
            r === "evtParams")
          )
            n.evtParams = as(as({}, n.evtParams || {}), e.evtParams || {});
          else if (r === "_staging_flag")
            n.evtParams = as(as({}, n.evtParams || {}), {
              _staging_flag: e._staging_flag,
            });
          else if (r === "reportErrorCallback" && typeof e[r] == "function")
            n.reportErrorCallback = e[r];
          else {
            var i,
              o,
              l,
              u = "",
              c = "";
            if (qt(r).call(r, ".") > -1) {
              var d = r.split(".");
              (u = d[0]), (c = d[1]);
            }
            u
              ? u === "user" || u === "header"
                ? (n.envInfo[u][c] = e[r])
                : ((n.envInfo.header.custom[c] = e[r]),
                  n.collect.emit(Un.DEBUGGER_MESSAGE, {
                    type: Un.DEBUGGER_MESSAGE_SDK,
                    info: "SDK 添加了Custom",
                    level: "info",
                    time: Date.now(),
                    infoType: "sdk",
                    secType: "HEADER",
                    common: "custom",
                  }))
              : Object.hasOwnProperty.call(n.envInfo.user, r)
              ? (qt((i = ["user_type", "ip_addr_id"])).call(i, r) > -1
                  ? (n.envInfo.user[r] = e[r] ? Number(e[r]) : e[r])
                  : qt(
                      (o = [
                        "user_id",
                        "web_id",
                        "user_unique_id",
                        "user_unique_id_type",
                      ])
                    ).call(o, r) > -1
                  ? (n.envInfo.user[r] = e[r] ? String(e[r]) : e[r])
                  : qt((l = ["user_is_auth", "user_is_login"])).call(l, r) > -1
                  ? (n.envInfo.user[r] = !!e[r])
                  : r === "device_id" && (n.envInfo.user[r] = e[r]),
                n.collect.emit(Un.DEBUGGER_MESSAGE, {
                  type: Un.DEBUGGER_MESSAGE_SDK,
                  info: "SDK 修改了公共参数",
                  level: "info",
                  time: Date.now(),
                  infoType: "sdk",
                  secType: "USER",
                  common: r,
                }))
              : Object.hasOwnProperty.call(n.envInfo.header, r)
              ? ((n.envInfo.header[r] = e[r]),
                n.collect.emit(Un.DEBUGGER_MESSAGE, {
                  type: Un.DEBUGGER_MESSAGE_SDK,
                  info: "SDK 修改了公共参数",
                  level: "info",
                  time: Date.now(),
                  infoType: "sdk",
                  secType: "HEADER",
                  common: r,
                }))
              : ((n.envInfo.header.custom[r] = e[r]),
                n.collect.emit(Un.DEBUGGER_MESSAGE, {
                  type: Un.DEBUGGER_MESSAGE_SDK,
                  info: "SDK 添加了Custom",
                  level: "info",
                  time: Date.now(),
                  infoType: "sdk",
                  secType: "HEADER",
                  common: "custom",
                }));
          }
        });
      }),
      (t.prototype.get = function (e) {
        try {
          return e
            ? e === "evtParams"
              ? this.evtParams
              : e === "reportErrorCallback"
              ? this[e]
              : Object.hasOwnProperty.call(this.envInfo.user, e)
              ? this.envInfo.user[e]
              : Object.hasOwnProperty.call(this.envInfo.header, e)
              ? this.envInfo.header[e]
              : JSON.parse(lr(this.envInfo[e]))
            : JSON.parse(lr(this.envInfo));
        } catch (n) {
          console.log("get config stringify error "),
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: n.message,
            });
        }
      }),
      (t.prototype.setStore = function (e) {
        try {
          if (!this.configPersist) return;
          var n = this.storage.getItem(this.configKey) || {};
          if (n && Dn(e).length) {
            var r = Ci(e, n);
            this.storage.setItem(this.configKey, r);
          }
        } catch (i) {
          console.log("setStore error"),
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: i.message,
            });
        }
      }),
      (t.prototype.getStore = function () {
        try {
          if (!this.configPersist) return null;
          var e = this.storage.getItem(this.configKey) || {};
          return e && Dn(e).length ? e : null;
        } catch (n) {
          return (
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: n.message,
            }),
            null
          );
        }
      }),
      (t.prototype.delete = function (e) {
        try {
          if (!this.configPersist) return;
          var n = this.storage.getItem(this.configKey) || {};
          n &&
            Object.hasOwnProperty.call(n, e) &&
            (delete n[e], this.storage.setItem(this.configKey, n));
        } catch (r) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: r.message,
          }),
            console.log("delete error");
        }
      }),
      t
    );
  })(),
  vRn = (function () {
    function t(e, n) {
      (this.isLog = n || !1), (this.name = e || "");
    }
    return (
      (t.prototype.info = function (e) {
        this.isLog &&
          console.log(
            "%c %s",
            "color: yellow; background-color: black;",
            "[AppLog WEB SDK] [instance: " + this.name + "] " + e
          );
      }),
      (t.prototype.warn = function (e) {
        this.isLog &&
          console.warn("[AppLog WEB SDK] [instance: " + this.name + "] " + e);
      }),
      (t.prototype.error = function (e) {
        this.isLog &&
          console.error("[AppLog WEB SDK] [instance: " + this.name + "] " + e);
      }),
      (t.prototype.throw = function (e) {
        throw (this.error(this.name), new Error(e));
      }),
      t
    );
  })(),
  bRn = (function () {
    function t() {
      this.spiderBot = [
        "Baiduspider",
        "googlebot",
        "360Spider",
        "haosouspider",
        "YoudaoBot",
        "Sogou News Spider",
        "Yisouspider",
        "Googlebot",
        "Headless",
        "Applebot",
        "Bingbot",
        "PetalBot",
      ];
    }
    return (
      (t.prototype.checkSpider = function (e) {
        if (!e.enable_spider) return !1;
        var n = window.navigator.userAgent;
        if (!n) return !0;
        var r = !1;
        return (
          this.spiderBot.forEach(function (i) {
            qt(n).call(n, i) !== -1 && (r = !0);
          }),
          r
        );
      }),
      t
    );
  })(),
  _Rn = (function () {
    function t(n, r) {
      (this.collect = n), (this.native = r);
    }
    var e = t.prototype;
    return (
      (e.bridgeInject = function () {
        try {
          return (
            !!this.native &&
            (AppLogBridge
              ? (console.log("AppLogBridge is injected"), !0)
              : (console.log("AppLogBridge is not inject"), !1))
          );
        } catch {
          return console.log("AppLogBridge is not inject"), !1;
        }
      }),
      (e.bridgeReady = function () {
        var n = this;
        return new Ar(function (r, i) {
          try {
            n.bridgeInject()
              ? AppLogBridge.hasStarted(function (o) {
                  console.log("AppLogBridge is started? : " + o),
                    o ? r(!0) : i(!1);
                })
              : i(!1);
          } catch (o) {
            console.log("AppLogBridge, error:" + lr(o.stack)), i(!1);
          }
        });
      }),
      (e.setNativeAppId = function (n) {
        try {
          AppLogBridge.setNativeAppId(lr(n)),
            console.log("change bridge appid, event report with appid: " + n);
        } catch {
          console.error("setNativeAppId error");
        }
      }),
      (e.setConfig = function (n) {
        var r = this;
        try {
          Dn(n).forEach(function (i) {
            i === "user_unique_id"
              ? r.setUserUniqueId(n[i])
              : n[i]
              ? r.addHeaderInfo(i, n[i])
              : r.removeHeaderInfo(i);
          });
        } catch {
          console.error("setConfig error");
        }
      }),
      (e.setUserUniqueId = function (n) {
        try {
          AppLogBridge.setUserUniqueId(n);
        } catch {
          console.error("setUserUniqueId error");
        }
      }),
      (e.addHeaderInfo = function (n, r) {
        try {
          AppLogBridge.addHeaderInfo(n, r);
        } catch {
          console.error("addHeaderInfo error");
        }
      }),
      (e.setHeaderInfo = function (n) {
        try {
          AppLogBridge.setHeaderInfo(lr(n));
        } catch {
          console.error("setHeaderInfo error");
        }
      }),
      (e.removeHeaderInfo = function (n) {
        try {
          AppLogBridge.removeHeaderInfo(n);
        } catch {
          console.error("removeHeaderInfo error");
        }
      }),
      (e.reportPv = function (n) {
        this.onEventV3("predefine_pageview", n);
      }),
      (e.onEventV3 = function (n, r) {
        try {
          AppLogBridge.onEventV3(n, r),
            this.collect.emit(DebuggerMesssge.DEBUGGER_MESSAGE, {
              type: DebuggerMesssge.DEBUGGER_MESSAGE_EVENT,
              info: "bridge埋点上报",
              time: Date.now(),
              data: [{ events: [{ event: n, params: r }] }],
              code: 200,
              status: "success",
            });
        } catch {
          console.error("onEventV3 error");
        }
      }),
      (e.profileSet = function (n) {
        try {
          AppLogBridge.profileSet(n);
        } catch {
          console.error("profileSet error");
        }
      }),
      (e.profileSetOnce = function (n) {
        try {
          AppLogBridge.profileSetOnce(n);
        } catch {
          console.error("profileSetOnce error");
        }
      }),
      (e.profileIncrement = function (n) {
        try {
          AppLogBridge.profileIncrement(n);
        } catch {
          console.error("profileIncrement error");
        }
      }),
      (e.profileUnset = function (n) {
        try {
          AppLogBridge.profileUnset(n);
        } catch {
          console.error("profileUnset error");
        }
      }),
      (e.profileAppend = function (n) {
        try {
          AppLogBridge.profileAppend(n);
        } catch {
          console.error("profileAppend error");
        }
      }),
      t
    );
  })(),
  Ek = function () {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
      /[xy]/g,
      function (t) {
        var e = (16 * Math.random()) | 0;
        return (t === "x" ? e : (3 & e) | 8).toString(16);
      }
    );
  },
  TRn = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.storage = new Q1(!1, "session")),
          (this.sessionKey = "__tea_session_id_" + n.app_id),
          (this.expireTime = n.expireTime || 18e5),
          (this.disableSession = n.disable_session),
          (this.disableSessionTimeCheck = n.disable_session_check),
          this.disableSession ||
            (this.setSessionId(),
            this.collect.on(ai.SessionReset, function (i) {
              r.resetSessionId(i);
            }),
            this.collect.on(ai.SessionResetTime, function () {
              r.updateSessionIdTime();
            }));
      }),
      (t.prototype.updateSessionIdTime = function () {
        var e = this.storage.getItem(this.sessionKey);
        if (e && e.sessionId) {
          var n = e.timestamp;
          Date.now() - n > this.expireTime
            ? (e = { sessionId: Ek(), timestamp: Date.now() })
            : (e.timestamp = Date.now()),
            this.storage.setItem(this.sessionKey, e),
            this.resetExpTime();
        }
      }),
      (t.prototype.setSessionId = function () {
        var e = this,
          n = this.storage.getItem(this.sessionKey);
        n && n.sessionId
          ? (n.timestamp = Date.now())
          : (n = { sessionId: Ek(), timestamp: Date.now() }),
          this.storage.setItem(this.sessionKey, n),
          this.disableSessionTimeCheck ||
            (this.sessionExp = setInterval(function () {
              e.checkEXp();
            }, this.expireTime));
      }),
      (t.prototype.getSessionId = function () {
        var e = this.storage.getItem(this.sessionKey);
        return this.disableSession ? "" : e && e.sessionId ? e.sessionId : "";
      }),
      (t.prototype.resetExpTime = function () {
        var e = this;
        this.sessionExp &&
          (clearInterval(this.sessionExp),
          (this.sessionExp = setInterval(function () {
            e.checkEXp();
          }, this.expireTime)));
      }),
      (t.prototype.resetSessionId = function (e) {
        var n = { sessionId: e || Ek(), timestamp: Date.now() };
        this.storage.setItem(this.sessionKey, n);
      }),
      (t.prototype.checkEXp = function () {
        var e = this.storage.getItem(this.sessionKey);
        e &&
          e.sessionId &&
          Date.now() - e.timestamp + 30 >= this.expireTime &&
          ((e = { sessionId: Ek(), timestamp: Date.now() }),
          this.storage.setItem(this.sessionKey, e));
      }),
      t
    );
  })(),
  ERn = (function () {
    function t() {
      (this.eventLimit = 50),
        (this.enable_ttwebid = !1),
        (this.eventCache = []),
        (this.beconEventCache = []);
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.config = n),
          (this.configManager = e.configManager),
          (this.eventCheck = new vue(e, n)),
          (this.cacheStorgae = new Q1(!0)),
          (this.localStorage = new Q1(!1)),
          (this.maxReport = n.max_report || 10),
          (this.reportTime = n.reportTime || n.report_time || 30),
          (this.timeout = n.timeout || 1e5),
          (this.enable_ttwebid = n.enable_ttwebid),
          (this.reportUrl = n.report_url || this.configManager.getUrl("event")),
          (this.eventKey =
            "__tea_cache_events_" + this.configManager.get("app_id")),
          (this.beconKey =
            "__tea_cache_events_becon_" + this.configManager.get("app_id")),
          (this.abKey =
            "__tea_sdk_ab_version_" + this.configManager.get("app_id")),
          (this.refer_key =
            "__tea_cache_refer_" + this.configManager.get("app_id")),
          (this.pageId = Ek()),
          this.collect.on(ai.Ready, function () {
            r.reportAll(!1);
          }),
          this.collect.on(ai.ConfigDomain, function () {
            r.reportUrl = r.configManager.getUrl("event");
          }),
          this.collect.on(ai.Event, function (o) {
            r.event(o);
          }),
          this.collect.on(ai.BeconEvent, function (o) {
            r.beconEvent(o);
          }),
          this.collect.on(ai.CleanEvents, function () {
            r.reportAll(!1);
          });
        var i = this.linster();
        this.collect.on(ai.DestoryInstance, function () {
          i && i();
        });
      }),
      (t.prototype.linster = function () {
        var e = this,
          n = function () {
            e.reportAll(!0);
          };
        window.addEventListener("unload", n, !1), pue(n);
        var r = function () {
          document.visibilityState === "hidden" && e.reportAll(!0);
        };
        return (
          document.addEventListener("visibilitychange", r, !1),
          function () {
            window.removeEventListener("unload", n),
              window.removeEventListener("pagehide", n, !1),
              window.removeEventListener("beforeunload", n, !1),
              document.removeEventListener("visibilitychange", r, !1);
          }
        );
      }),
      (t.prototype.reportAll = function (e) {
        this.report(e), this.reportBecon();
      }),
      (t.prototype.event = function (e) {
        var n = this;
        try {
          if (this.collect.destroy || this.collect.sdkStop) return;
          if (this.config.enable_ios_sendbeacon && iVe())
            return void this.beconEvent(e);
          var r = this.cacheStorgae.getItem(this.eventKey) || [],
            i = e;
          this.config.batch_event && (i = this.batchEvent(e));
          var o = QS(i, r);
          if (
            (this.cacheStorgae.setItem(this.eventKey, o),
            this.reportTimeout && clearTimeout(this.reportTimeout),
            o.length >= this.maxReport)
          )
            this.report(!1);
          else {
            var l = this.reportTime;
            this.reportTimeout = setTimeout(function () {
              n.report(!1), (n.reportTimeout = null);
            }, l);
          }
        } catch (u) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 发生了异常",
            level: "error",
            time: Date.now(),
            data: u.message,
            infoType: "sdk",
          });
        }
      }),
      (t.prototype.beconEvent = function (e) {
        if (!this.collect.destroy && !this.collect.sdkStop) {
          var n = QS(e, this.cacheStorgae.getItem(this.beconKey) || []);
          this.cacheStorgae.setItem(this.beconKey, n),
            this.collect.tokenManager.getReady() &&
              this.collect.sdkReady &&
              (this.cacheStorgae.removeItem(this.beconKey),
              this.send(this.split(this.merge(n)), !0));
        }
      }),
      (t.prototype.reportBecon = function () {
        if (
          !this.collect.destroy &&
          !this.collect.sdkStop &&
          this.collect.tokenManager.getReady() &&
          this.collect.sdkReady
        ) {
          var e = this.cacheStorgae.getItem(this.beconKey) || [];
          e &&
            e.length &&
            (this.cacheStorgae.removeItem(this.beconKey),
            this.send(this.split(this.merge(e)), !0));
        }
      }),
      (t.prototype.report = function (e) {
        if (
          !this.collect.destroy &&
          !this.collect.sdkStop &&
          this.collect.tokenManager.getReady() &&
          this.collect.sdkReady
        ) {
          var n = this.cacheStorgae.getItem(this.eventKey) || [];
          n.length &&
            (this.cacheStorgae.removeItem(this.eventKey),
            this.config.batch_event
              ? this.send([n], e)
              : this.sliceEvent(n, e));
        }
      }),
      (t.prototype.batchEvent = function (e) {
        var n = [];
        if (e.length > this.eventLimit)
          for (var r = 0; r < e.length; r += this.eventLimit) {
            var i;
            i = jn(e).call(e, r, r + this.eventLimit);
            var o = this.merge(i);
            n.push(o);
          }
        else n = o = this.merge(e);
        return n;
      }),
      (t.prototype.sliceEvent = function (e, n) {
        if (e.length > this.eventLimit)
          for (var r = 0; r < e.length; r += this.eventLimit) {
            var i;
            i = jn(e).call(e, r, r + this.eventLimit);
            var o = this.split(this.merge(i));
            this.send(o, n);
          }
        else (o = this.split(this.merge(e))), this.send(o, n);
      }),
      (t.prototype.handleRefer = function () {
        var e = "";
        try {
          if (this.config.spa || this.config.autotrack) {
            var n = this.localStorage.getItem(this.refer_key) || {};
            e = n.routeChange
              ? n.refer_key
              : this.configManager.get("referrer");
          } else e = this.configManager.get("referrer");
        } catch {
          e = document.referrer;
        }
        return e;
      }),
      (t.prototype.merge = function (e, n) {
        var r = this,
          i = this.configManager.get(),
          o = i.header,
          l = i.user;
        this.config.enable_pageid && (o.custom.page_id = this.pageId),
          (o.custom = lr(o.custom));
        var u = this.configManager.get("evtParams"),
          c = this.configManager.get("user_unique_id_type"),
          d = [];
        try {
          var h = _r(e).call(e, function (p) {
              try {
                Dn(u).length && !n && (p.params = as(as({}, u), p.params)),
                  c && (p.params.$user_unique_id_type = c);
                var g = r.configManager.getAbCache(),
                  y = l[r.config.ab_user_mode] || l.user_unique_id;
                return (
                  g &&
                    g.uuid &&
                    g.uuid === y &&
                    r.configManager.getAbVersion() &&
                    (p.ab_sdk_version = r.configManager.getAbVersion()),
                  (p.session_id = r.collect.sessionManager.getSessionId()),
                  (p.params = lr(p.params)),
                  p
                );
              } catch (v) {
                return (
                  console.warn(
                    "filter merge event: " +
                      (p && p.event) +
                      " error, pls check",
                    v && v.message
                  ),
                  r.collect.emit(Un.DEBUGGER_MESSAGE, {
                    type: Un.DEBUGGER_MESSAGE_SDK,
                    info: "SDK 处理Event数据异常",
                    level: "error",
                    time: Date.now(),
                    data: v.message,
                    infoType: "sdk",
                  }),
                  !1
                );
              }
            }),
            f = JSON.parse(lr({ events: h, user: l, header: o }));
          (f.local_time = Math.floor(Date.now() / 1e3)),
            (f.user_unique_type = this.config.enable_ttwebid
              ? this.config.user_unique_type
              : void 0),
            (f.verbose = 1),
            d.push(f);
        } catch (p) {
          console.warn("event merge error, pls check", p && p.message);
        }
        return d;
      }),
      (t.prototype.split = function (e) {
        return On(e).call(e, function (n) {
          var r = [];
          return r.push(n), r;
        });
      }),
      (t.prototype.blockEvent = function (e) {
        try {
          var n = this.blockList;
          if (this.config.enable_logsetting) {
            var r = this.blockList,
              i =
                this.logSetting.getSettingData("blocklist_events").block_event;
            n = Ce(r).call(
              r,
              _r(i).call(i, function (o) {
                return qt(r).call(r, o) === -1;
              })
            );
          }
          return !(n && n.length && $a(n).call(n, e));
        } catch {
          return !0;
        }
      }),
      (t.prototype.whiteEvent = function (e) {
        var n;
        try {
          var r;
          return (
            (n = this.whiteList) === null ||
            n === void 0 ||
            !n.length ||
            !!$a((r = this.whiteList)).call(r, e)
          );
        } catch {
          return !0;
        }
      }),
      (t.prototype.customAllowFilter = function (e, n) {
        try {
          if (
            n ||
            !this.config.enable_logsetting ||
            !this.config.enable_logsetting_header_custom
          )
            return lr(e);
          var r = this.logSetting.getSettingData().header_custom_allow,
            i = {};
          if (r && r.length && Dn(e).length) {
            var o = new XS(r);
            for (var l in e) o.has(l) && (i[l] = e[l]);
          }
          return lr(i);
        } catch (u) {
          return (
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行customAllowFilter发生了异常",
              level: "error",
              time: Date.now(),
              data: u.message,
              infoType: "sdk",
            }),
            lr(e)
          );
        }
      }),
      (t.prototype.paramsAllowFilter = function (e, n) {
        try {
          if (
            n ||
            !this.config.enable_logsetting ||
            !this.config.enable_logsetting_params
          )
            return lr(e.params);
          var r = this.logSetting.getSettingData().params_block,
            i = e.event,
            o = e.params,
            l = {};
          if (r && r[i] && r[i].length) {
            var u = new XS(r[i]);
            for (var c in o)
              (!this.logSetting.getPredefineParamsList().has(c) && u.has(c)) ||
                (l[c] = o[c]);
            return lr(l);
          }
          return lr(e.params);
        } catch (d) {
          return (
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行paramsAllowFilter发生了异常",
              level: "error",
              time: Date.now(),
              data: d.message,
              infoType: "sdk",
            }),
            lr(e.params)
          );
        }
      }),
      (t.prototype.send = function (e, n) {
        var r = this;
        e.length &&
          (this.config.disable_track_event ||
            e.forEach(function (i) {
              try {
                var o,
                  l = JSON.parse(lr(i));
                _r(r.config) &&
                  ((l = _r((o = r.config)).call(o, l)) ||
                    console.warn("filter must return data !!")),
                  r.collect.eventFilter &&
                    l &&
                    ((l = r.collect.eventFilter(l)) ||
                      console.warn("filterEvent api must return data !!"));
                var u = l || i,
                  c = JSON.parse(lr(u));
                if ((r.eventCheck.checkVerify(c), !u.length)) return;
                var d = !0;
                if (
                  (u.forEach(function (h) {
                    h.events.length || (d = !1);
                  }),
                  !d)
                )
                  return;
                r.collect.emit(ai.SubmitBefore, u),
                  r.collect.requestManager.useRequest({
                    url: r.reportUrl,
                    data: u,
                    success: function (h, f) {
                      h && h.e !== 0
                        ? (r.collect.emit(ai.SubmitError, {
                            type: "f_data",
                            eventData: f,
                            errorCode: h.e,
                            response: h,
                          }),
                          r.collect.emit(Un.DEBUGGER_MESSAGE, {
                            type: Un.DEBUGGER_MESSAGE_EVENT,
                            info: "埋点上报失败",
                            time: Date.now(),
                            data: c,
                            code: h.e,
                            msg: h.m || "",
                            failType: "数据异常失败",
                            status: "fail",
                          }))
                        : (r.collect.emit(ai.SubmitScuess, {
                            eventData: f,
                            res: h,
                          }),
                          r.collect.emit(Un.DEBUGGER_MESSAGE, {
                            type: Un.DEBUGGER_MESSAGE_EVENT,
                            info: "埋点上报成功",
                            time: Date.now(),
                            data: c,
                            code: 200,
                            status: "success",
                          }));
                    },
                    fail: function (h, f) {
                      r.configManager.get("reportErrorCallback")(h, f),
                        r.collect.emit(ai.SubmitError, {
                          type: "f_net",
                          eventData: h,
                          errorCode: f,
                        }),
                        r.collect.emit(Un.DEBUGGER_MESSAGE, {
                          type: Un.DEBUGGER_MESSAGE_EVENT,
                          info: "埋点上报网络异常",
                          time: Date.now(),
                          data: c,
                          code: f,
                          failType: "网络异常失败",
                          status: "fail",
                        });
                    },
                    timeout: r.timeout,
                    useBeacon: n,
                    withCredentials: r.enable_ttwebid,
                    zip: !0,
                  }),
                  r.collect.emit(ai.SubmitAfter, u);
              } catch (h) {
                console.warn("something error, " + lr(h.stack)),
                  r.collect.emit(Un.DEBUGGER_MESSAGE, {
                    type: Un.DEBUGGER_MESSAGE_SDK,
                    info: "SDK发送埋点发生了异常",
                    level: "error",
                    time: Date.now(),
                    data: h.message,
                    infoType: "sdk",
                  });
              }
            }));
      }),
      t
    );
  })(),
  dC = function () {
    var t;
    return jn(
      (t = (function e(n) {
        return n
          ? (n ^ ((16 * Math.random()) >> (n / 4))).toString(10)
          : ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, e);
      })().replace(/-/g, ""))
    ).call(t, 0, 19);
  },
  SRn = (function () {
    function t() {
      (this.cacheToken = {}),
        (this.enableCookie = !1),
        (this.enable_ttwebid = !1),
        (this.enableCustomWebid = !1);
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.config = n),
          (this.configManager = this.collect.configManager),
          (this.storage = new Q1(!1)),
          (this.tokenKey = "__tea_cache_tokens_" + n.app_id),
          (this.enable_ttwebid = n.enable_ttwebid),
          (this.enableCustomWebid = n.enable_custom_webid),
          this.collect.on(ai.ConfigUuid, function (i) {
            r.setUuid(i);
          }),
          this.collect.on(ai.ConfigWebId, function (i) {
            r.setWebId(i);
          }),
          this.collect.on(ai.ConfigDiD, function (i) {
            r.setDeviceId(i);
          }),
          (this.enableCookie = n.cross_subdomain),
          (this.expiresTime = n.cookie_expire || 6048e5),
          (this.cookieDomain = n.cookie_domain || ""),
          this.checkStorage();
      }),
      (t.prototype.checkStorage = function () {
        var e = this;
        if (this.enableCookie) {
          var n = this.storage.getCookie(this.tokenKey, this.cookieDomain);
          this.cacheToken = n && typeof n == "string" ? JSON.parse(n) : {};
        } else this.cacheToken = this.storage.getItem(this.tokenKey) || {};
        (this.tokenType =
          this.cacheToken && this.cacheToken._type_
            ? this.cacheToken._type_
            : "default"),
          this.tokenType !== "custom" || this.enableCustomWebid
            ? this.enableCustomWebid
              ? this.collect.on(ai.CustomWebId, function () {
                  (e.tokenReady = !0), e.collect.emit(ai.TokenComplete);
                })
              : this.checkEnv() ||
                (this.enable_ttwebid
                  ? this.completeTtWid(this.cacheToken)
                  : this.check())
            : this.remoteWebid();
      }),
      (t.prototype.check = function () {
        this.cacheToken && this.cacheToken.web_id
          ? this.complete(this.cacheToken)
          : this.config.disable_webid
          ? this.complete({
              web_id: dC(),
              user_unique_id: this.configManager.get("user_unique_id") || dC(),
            })
          : this.remoteWebid();
      }),
      (t.prototype.checkEnv = function () {
        var e = window.navigator.userAgent;
        if (
          qt(e).call(e, "miniProgram") !== -1 ||
          qt(e).call(e, "MiniProgram") !== -1
        ) {
          var n = jU(window.location.href);
          return !(
            !n ||
            !n.Web_ID ||
            (this.complete({
              web_id: "" + n.Web_ID,
              user_unique_id:
                this.configManager.get("user_unique_id") || "" + n.Web_ID,
            }),
            0)
          );
        }
        return !1;
      }),
      (t.prototype.remoteWebid = function () {
        var e = this,
          n = this.configManager.getUrl("webid"),
          r = {
            app_key: this.config.app_key,
            app_id: this.config.app_id,
            url: location.href,
            user_agent: window.navigator.userAgent,
            referer: document.referrer,
            user_unique_id: "",
          };
        this.collect.emit(Un.DEBUGGER_MESSAGE, {
          type: Un.DEBUGGER_MESSAGE_SDK,
          info: "SDK 发起WebID请求",
          logType: "fetch",
          level: "info",
          time: Date.now(),
          data: r,
          infoType: "sdk",
        }),
          this.collect.requestManager.useRequest({
            url: n,
            data: r,
            success: function (i) {
              var o;
              if (i && i.e === 0)
                (o = i.web_id),
                  e.collect.emit(Un.DEBUGGER_MESSAGE, {
                    type: Un.DEBUGGER_MESSAGE_SDK,
                    info: "WebID请求成功",
                    logType: "fetch",
                    level: "info",
                    time: Date.now(),
                    data: i,
                    infoType: "sdk",
                  });
              else {
                var l = dC();
                (o = l),
                  e.collect.configManager.set({ localWebId: l }),
                  e.collect.emit(ai.TokenError),
                  e.collect.emit(Un.DEBUGGER_MESSAGE, {
                    type: Un.DEBUGGER_MESSAGE_SDK,
                    info: "WebID请求返回值异常，采用本地生成",
                    logType: "fetch",
                    level: "warn",
                    time: Date.now(),
                    data: i,
                    infoType: "sdk",
                  }),
                  e.collect.logger.warn(
                    "appid: " +
                      e.config.app_id +
                      " get webid error, use local webid~"
                  );
              }
              e.complete({
                web_id: e.configManager.get("web_id") || o,
                user_unique_id: e.configManager.get("user_unique_id") || o,
              });
            },
            fail: function () {
              var i = dC();
              e.complete({
                web_id: e.configManager.get("web_id") || i,
                user_unique_id: e.configManager.get("user_unique_id") || i,
              }),
                e.collect.configManager.set({ localWebId: i }),
                e.collect.emit(ai.TokenError),
                e.collect.emit(Un.DEBUGGER_MESSAGE, {
                  type: Un.DEBUGGER_MESSAGE_SDK,
                  info: "WebID请求网络异常，采用本地生成",
                  logType: "fetch",
                  level: "error",
                  time: Date.now(),
                  data: { localWebId: i },
                  infoType: "sdk",
                }),
                e.collect.logger.warn(
                  "appid: " +
                    e.config.app_id +
                    ", get webid error, use local webid~"
                );
            },
            timeout: 3e5,
          });
      }),
      (t.prototype.complete = function (e) {
        var n = e.web_id,
          r = e.user_unique_id,
          i = e.device_id;
        if (
          ((e.timestamp = Date.now()),
          this.collect.configManager.set({ web_id: n, user_unique_id: r }),
          this.config.enable_device_id)
        ) {
          var o = this.configManager.get("device_id") || i || n;
          this.collect.configManager.set({ device_id: o }),
            (e = as(as({}, e), { device_id: o }));
        } else e != null && e.device_id && delete e.device_id;
        this.setStorage(e),
          (this.tokenReady = !0),
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 完成用户信息设置",
            logType: "info",
            level: "info",
            time: Date.now(),
            data: { web_id: n, user_unique_id: r },
            infoType: "sdk",
          }),
          this.collect.emit(ai.TokenComplete);
      }),
      (t.prototype.completeTtWid = function (e) {
        var n = e.user_unique_id || "",
          r = this.configManager.get("user_unique_id");
        (r || n) && this.configManager.set({ user_unique_id: r || n }),
          this.setStorage(e),
          (this.tokenReady = !0),
          this.collect.emit(ai.TokenComplete);
      }),
      (t.prototype.setUuid = function (e) {
        var n;
        if (
          e &&
          qt((n = ["null", "undefined", "Null", "None"])).call(n, e) === -1
        ) {
          var r = String(e),
            i = this.configManager.get("user_unique_id"),
            o = this.cacheToken && this.cacheToken.user_unique_id;
          if (r === i && r === o) return;
          this.configManager.set({ user_unique_id: r }),
            this.cacheToken || (this.cacheToken = {}),
            (this.cacheToken.user_unique_id = r),
            (this.cacheToken.timestamp = Date.now()),
            this.setStorage(this.cacheToken),
            this.collect.emit(ai.TokenChange, "uuid"),
            this.collect.emit(ai.SessionReset);
        } else this.clearUuid();
      }),
      (t.prototype.clearUuid = function () {
        this.config.enable_ttwebid ||
          (this.configManager.get("web_id") &&
            this.configManager.get("user_unique_id") !==
              this.configManager.get("web_id") &&
            (this.configManager.set({
              user_unique_id: this.configManager.get("web_id"),
            }),
            this.cacheToken &&
              this.cacheToken.web_id &&
              ((this.cacheToken.user_unique_id = this.cacheToken.web_id),
              (this.cacheToken.timestamp = Date.now()),
              this.setStorage(this.cacheToken)),
            this.collect.emit(ai.TokenReset, "uuid")));
      }),
      (t.prototype.setWebId = function (e) {
        if (e && !this.config.enable_ttwebid) {
          this.cacheToken && this.cacheToken.web_id
            ? this.cacheToken.web_id !== e &&
              ((this.cacheToken.user_unique_id =
                this.cacheToken.web_id === this.cacheToken.user_unique_id
                  ? e
                  : this.cacheToken.user_unique_id),
              (this.cacheToken.web_id = e))
            : ((this.cacheToken = {}),
              (this.cacheToken.web_id = e),
              (this.cacheToken.user_unique_id = e)),
            (this.cacheToken.timestamp = Date.now());
          var n = this.configManager.get("web_id"),
            r = this.configManager.get("user_unique_id");
          (r && r !== n) ||
            (this.configManager.set({ user_unique_id: e }),
            this.collect.emit(ai.TokenChange, "uuid")),
            n !== e &&
              (this.configManager.set({ web_id: e }),
              this.collect.emit(ai.TokenChange, "webid")),
            this.setStorage(this.cacheToken);
        }
      }),
      (t.prototype.setDeviceId = function (e) {
        this.configManager.set({ device_id: e }),
          this.config.enable_device_id &&
            this.cacheToken &&
            ((this.cacheToken.device_id = e),
            (this.cacheToken.timestamp = Date.now()),
            this.setStorage(this.cacheToken));
      }),
      (t.prototype.setStorage = function (e) {
        var n;
        (e._type_ = this.enableCustomWebid ? "custom" : "default"),
          delete e[
            cm((n = "diss".split("")))
              .call(n)
              .join("")
          ],
          this.enableCookie || this.enable_ttwebid
            ? (this.storage.setCookie(
                this.tokenKey,
                e,
                this.expiresTime,
                this.cookieDomain
              ),
              this.enable_ttwebid &&
                (delete e.web_id, this.storage.setItem(this.tokenKey, e)))
            : this.storage.setItem(this.tokenKey, e),
          (this.cacheToken = e);
      }),
      (t.prototype.getReady = function () {
        return this.tokenReady;
      }),
      (t.prototype.getTobId = function () {
        var e = this;
        return new Ar(function (n) {
          var r = {
            app_id: e.config.app_id,
            user_unique_id: e.configManager.get("user_unique_id"),
            web_id: e.configManager.get("web_id"),
            user_unique_id_type: e.configManager.get("user_unique_id_type"),
          };
          e.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 发起GetToken请求",
            logType: "fetch",
            level: "info",
            time: Date.now(),
            data: r,
            infoType: "sdk",
          }),
            e.collect.requestManager.useRequest({
              url: e.configManager.getUrl("tobid"),
              data: r,
              success: function (i) {
                i && i.e === 0
                  ? (n(i.tobid),
                    e.collect.emit(Un.DEBUGGER_MESSAGE, {
                      type: Un.DEBUGGER_MESSAGE_SDK,
                      info: "GetToken请求成功",
                      logType: "fetch",
                      level: "info",
                      time: Date.now(),
                      data: i,
                      infoType: "sdk",
                    }))
                  : (n(""),
                    e.collect.emit(Un.DEBUGGER_MESSAGE, {
                      type: Un.DEBUGGER_MESSAGE_SDK,
                      info: "GetToken请求失败",
                      logType: "fetch",
                      level: "error",
                      time: Date.now(),
                      data: i,
                      infoType: "sdk",
                    }));
              },
              fail: function () {
                n(""),
                  e.collect.emit(Un.DEBUGGER_MESSAGE, {
                    type: Un.DEBUGGER_MESSAGE_SDK,
                    info: "GetToken请求失败",
                    logType: "fetch",
                    level: "error",
                    time: Date.now(),
                    infoType: "sdk",
                  });
              },
              time: 3e4,
              withCredentials: e.enable_ttwebid,
            });
        });
      }),
      t
    );
  })();
function $D(t) {
  for (var e = t.length; --e >= 0; ) t[e] = 0;
}
var Qte = new Uint8Array([
    0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5,
    5, 5, 5, 0,
  ]),
  UF = new Uint8Array([
    0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10,
    11, 11, 12, 12, 13, 13,
  ]),
  RRn = new Uint8Array([
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7,
  ]),
  v2e = new Uint8Array([
    16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
  ]),
  m1 = new Array(576);
$D(m1);
var hC = new Array(60);
$D(hC);
var Hx = new Array(512);
$D(Hx);
var _$ = new Array(256);
$D(_$);
var bue = new Array(29);
$D(bue);
var b2e,
  _2e,
  T2e,
  WU = new Array(30);
function dW(t, e, n, r, i) {
  (this.static_tree = t),
    (this.extra_bits = e),
    (this.extra_base = n),
    (this.elems = r),
    (this.max_length = i),
    (this.has_stree = t && t.length);
}
function hW(t, e) {
  (this.dyn_tree = t), (this.max_code = 0), (this.stat_desc = e);
}
$D(WU);
var lVe = function (t) {
    return t < 256 ? Hx[t] : Hx[256 + (t >>> 7)];
  },
  Xx = function (t, e) {
    (t.pending_buf[t.pending++] = 255 & e),
      (t.pending_buf[t.pending++] = (e >>> 8) & 255);
  },
  mf = function (t, e, n) {
    t.bi_valid > 16 - n
      ? ((t.bi_buf |= (e << t.bi_valid) & 65535),
        Xx(t, t.bi_buf),
        (t.bi_buf = e >> (16 - t.bi_valid)),
        (t.bi_valid += n - 16))
      : ((t.bi_buf |= (e << t.bi_valid) & 65535), (t.bi_valid += n));
  },
  nv = function (t, e, n) {
    mf(t, n[2 * e], n[2 * e + 1]);
  },
  uVe = function (t, e) {
    var n = 0;
    do (n |= 1 & t), (t >>>= 1), (n <<= 1);
    while (--e > 0);
    return n >>> 1;
  },
  cVe = function (t, e, n) {
    var r,
      i,
      o = new Array(16),
      l = 0;
    for (r = 1; r <= 15; r++) (l = (l + n[r - 1]) << 1), (o[r] = l);
    for (i = 0; i <= e; i++) {
      var u = t[2 * i + 1];
      u !== 0 && (t[2 * i] = uVe(o[u]++, u));
    }
  },
  E2e = function (t) {
    var e;
    for (e = 0; e < 286; e++) t.dyn_ltree[2 * e] = 0;
    for (e = 0; e < 30; e++) t.dyn_dtree[2 * e] = 0;
    for (e = 0; e < 19; e++) t.bl_tree[2 * e] = 0;
    (t.dyn_ltree[512] = 1),
      (t.opt_len = t.static_len = 0),
      (t.sym_next = t.matches = 0);
  },
  dVe = function (t) {
    t.bi_valid > 8
      ? Xx(t, t.bi_buf)
      : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf),
      (t.bi_buf = 0),
      (t.bi_valid = 0);
  },
  S2e = function (t, e, n, r) {
    var i = 2 * e,
      o = 2 * n;
    return t[i] < t[o] || (t[i] === t[o] && r[e] <= r[n]);
  },
  fW = function (t, e, n) {
    for (
      var r = t.heap[n], i = n << 1;
      i <= t.heap_len &&
      (i < t.heap_len && S2e(e, t.heap[i + 1], t.heap[i], t.depth) && i++,
      !S2e(e, r, t.heap[i], t.depth));

    )
      (t.heap[n] = t.heap[i]), (n = i), (i <<= 1);
    t.heap[n] = r;
  },
  R2e = function (t, e, n) {
    var r,
      i,
      o,
      l,
      u = 0;
    if (t.sym_next !== 0)
      do
        (r = 255 & t.pending_buf[t.sym_buf + u++]),
          (r += (255 & t.pending_buf[t.sym_buf + u++]) << 8),
          (i = t.pending_buf[t.sym_buf + u++]),
          r === 0
            ? nv(t, i, e)
            : ((o = _$[i]),
              nv(t, o + 256 + 1, e),
              (l = Qte[o]) !== 0 && ((i -= bue[o]), mf(t, i, l)),
              (o = lVe(--r)),
              nv(t, o, n),
              (l = UF[o]) !== 0 && ((r -= WU[o]), mf(t, r, l)));
      while (u < t.sym_next);
    nv(t, 256, e);
  },
  pW = function (t, e) {
    var n,
      r,
      i,
      o = e.dyn_tree,
      l = e.stat_desc.static_tree,
      u = e.stat_desc.has_stree,
      c = e.stat_desc.elems,
      d = -1;
    for (t.heap_len = 0, t.heap_max = 573, n = 0; n < c; n++)
      o[2 * n] !== 0
        ? ((t.heap[++t.heap_len] = d = n), (t.depth[n] = 0))
        : (o[2 * n + 1] = 0);
    for (; t.heap_len < 2; )
      (o[2 * (i = t.heap[++t.heap_len] = d < 2 ? ++d : 0)] = 1),
        (t.depth[i] = 0),
        t.opt_len--,
        u && (t.static_len -= l[2 * i + 1]);
    for (e.max_code = d, n = t.heap_len >> 1; n >= 1; n--) fW(t, o, n);
    i = c;
    do
      (n = t.heap[1]),
        (t.heap[1] = t.heap[t.heap_len--]),
        fW(t, o, 1),
        (r = t.heap[1]),
        (t.heap[--t.heap_max] = n),
        (t.heap[--t.heap_max] = r),
        (o[2 * i] = o[2 * n] + o[2 * r]),
        (t.depth[i] = (t.depth[n] >= t.depth[r] ? t.depth[n] : t.depth[r]) + 1),
        (o[2 * n + 1] = o[2 * r + 1] = i),
        (t.heap[1] = i++),
        fW(t, o, 1);
    while (t.heap_len >= 2);
    (t.heap[--t.heap_max] = t.heap[1]),
      (function (h, f) {
        var p,
          g,
          y,
          v,
          b,
          w,
          k = f.dyn_tree,
          D = f.max_code,
          $ = f.stat_desc.static_tree,
          N = f.stat_desc.has_stree,
          P = f.stat_desc.extra_bits,
          I = f.stat_desc.extra_base,
          O = f.stat_desc.max_length,
          X = 0;
        for (v = 0; v <= 15; v++) h.bl_count[v] = 0;
        for (
          k[2 * h.heap[h.heap_max] + 1] = 0, p = h.heap_max + 1;
          p < 573;
          p++
        )
          (v = k[2 * k[2 * (g = h.heap[p]) + 1] + 1] + 1) > O && ((v = O), X++),
            (k[2 * g + 1] = v),
            g > D ||
              (h.bl_count[v]++,
              (b = 0),
              g >= I && (b = P[g - I]),
              (w = k[2 * g]),
              (h.opt_len += w * (v + b)),
              N && (h.static_len += w * ($[2 * g + 1] + b)));
        if (X !== 0) {
          do {
            for (v = O - 1; h.bl_count[v] === 0; ) v--;
            h.bl_count[v]--,
              (h.bl_count[v + 1] += 2),
              h.bl_count[O]--,
              (X -= 2);
          } while (X > 0);
          for (v = O; v !== 0; v--)
            for (g = h.bl_count[v]; g !== 0; )
              (y = h.heap[--p]) > D ||
                (k[2 * y + 1] !== v &&
                  ((h.opt_len += (v - k[2 * y + 1]) * k[2 * y]),
                  (k[2 * y + 1] = v)),
                g--);
        }
      })(t, e),
      cVe(o, d, t.bl_count);
  },
  A2e = function (t, e, n) {
    var r,
      i,
      o = -1,
      l = e[1],
      u = 0,
      c = 7,
      d = 4;
    for (
      l === 0 && ((c = 138), (d = 3)), e[2 * (n + 1) + 1] = 65535, r = 0;
      r <= n;
      r++
    )
      (i = l),
        (l = e[2 * (r + 1) + 1]),
        (++u < c && i === l) ||
          (u < d
            ? (t.bl_tree[2 * i] += u)
            : i !== 0
            ? (i !== o && t.bl_tree[2 * i]++, t.bl_tree[32]++)
            : u <= 10
            ? t.bl_tree[34]++
            : t.bl_tree[36]++,
          (u = 0),
          (o = i),
          l === 0
            ? ((c = 138), (d = 3))
            : i === l
            ? ((c = 6), (d = 3))
            : ((c = 7), (d = 4)));
  },
  w2e = function (t, e, n) {
    var r,
      i,
      o = -1,
      l = e[1],
      u = 0,
      c = 7,
      d = 4;
    for (l === 0 && ((c = 138), (d = 3)), r = 0; r <= n; r++)
      if (((i = l), (l = e[2 * (r + 1) + 1]), !(++u < c && i === l))) {
        if (u < d)
          do nv(t, i, t.bl_tree);
          while (--u != 0);
        else
          i !== 0
            ? (i !== o && (nv(t, i, t.bl_tree), u--),
              nv(t, 16, t.bl_tree),
              mf(t, u - 3, 2))
            : u <= 10
            ? (nv(t, 17, t.bl_tree), mf(t, u - 3, 3))
            : (nv(t, 18, t.bl_tree), mf(t, u - 11, 7));
        (u = 0),
          (o = i),
          l === 0
            ? ((c = 138), (d = 3))
            : i === l
            ? ((c = 6), (d = 3))
            : ((c = 7), (d = 4));
      }
  },
  k2e = !1,
  I2e = function (t, e, n, r) {
    mf(t, 0 + (r ? 1 : 0), 3),
      dVe(t),
      Xx(t, n),
      Xx(t, ~n),
      n && t.pending_buf.set(t.window.subarray(e, e + n), t.pending),
      (t.pending += n);
  },
  A5 = {
    _tr_init: function (t) {
      k2e ||
        ((function () {
          var e,
            n,
            r,
            i,
            o,
            l = new Array(16);
          for (r = 0, i = 0; i < 28; i++)
            for (bue[i] = r, e = 0; e < 1 << Qte[i]; e++) _$[r++] = i;
          for (_$[r - 1] = i, o = 0, i = 0; i < 16; i++)
            for (WU[i] = o, e = 0; e < 1 << UF[i]; e++) Hx[o++] = i;
          for (o >>= 7; i < 30; i++)
            for (WU[i] = o << 7, e = 0; e < 1 << (UF[i] - 7); e++)
              Hx[256 + o++] = i;
          for (n = 0; n <= 15; n++) l[n] = 0;
          for (e = 0; e <= 143; ) (m1[2 * e + 1] = 8), e++, l[8]++;
          for (; e <= 255; ) (m1[2 * e + 1] = 9), e++, l[9]++;
          for (; e <= 279; ) (m1[2 * e + 1] = 7), e++, l[7]++;
          for (; e <= 287; ) (m1[2 * e + 1] = 8), e++, l[8]++;
          for (cVe(m1, 287, l), e = 0; e < 30; e++)
            (hC[2 * e + 1] = 5), (hC[2 * e] = uVe(e, 5));
          (b2e = new dW(m1, Qte, 257, 286, 15)),
            (_2e = new dW(hC, UF, 0, 30, 15)),
            (T2e = new dW(new Array(0), RRn, 0, 19, 7));
        })(),
        (k2e = !0)),
        (t.l_desc = new hW(t.dyn_ltree, b2e)),
        (t.d_desc = new hW(t.dyn_dtree, _2e)),
        (t.bl_desc = new hW(t.bl_tree, T2e)),
        (t.bi_buf = 0),
        (t.bi_valid = 0),
        E2e(t);
    },
    _tr_stored_block: I2e,
    _tr_flush_block: function (t, e, n, r) {
      var i,
        o,
        l = 0;
      t.level > 0
        ? (t.strm.data_type === 2 &&
            (t.strm.data_type = (function (u) {
              var c,
                d = 4093624447;
              for (c = 0; c <= 31; c++, d >>>= 1)
                if (1 & d && u.dyn_ltree[2 * c] !== 0) return 0;
              if (
                u.dyn_ltree[18] !== 0 ||
                u.dyn_ltree[20] !== 0 ||
                u.dyn_ltree[26] !== 0
              )
                return 1;
              for (c = 32; c < 256; c++) if (u.dyn_ltree[2 * c] !== 0) return 1;
              return 0;
            })(t)),
          pW(t, t.l_desc),
          pW(t, t.d_desc),
          (l = (function (u) {
            var c;
            for (
              A2e(u, u.dyn_ltree, u.l_desc.max_code),
                A2e(u, u.dyn_dtree, u.d_desc.max_code),
                pW(u, u.bl_desc),
                c = 18;
              c >= 3 && u.bl_tree[2 * v2e[c] + 1] === 0;
              c--
            );
            return (u.opt_len += 3 * (c + 1) + 5 + 5 + 4), c;
          })(t)),
          (i = (t.opt_len + 3 + 7) >>> 3),
          (o = (t.static_len + 3 + 7) >>> 3) <= i && (i = o))
        : (i = o = n + 5),
        n + 4 <= i && e !== -1
          ? I2e(t, e, n, r)
          : t.strategy === 4 || o === i
          ? (mf(t, 2 + (r ? 1 : 0), 3), R2e(t, m1, hC))
          : (mf(t, 4 + (r ? 1 : 0), 3),
            (function (u, c, d, h) {
              var f;
              for (
                mf(u, c - 257, 5), mf(u, d - 1, 5), mf(u, h - 4, 4), f = 0;
                f < h;
                f++
              )
                mf(u, u.bl_tree[2 * v2e[f] + 1], 3);
              w2e(u, u.dyn_ltree, c - 1), w2e(u, u.dyn_dtree, d - 1);
            })(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, l + 1),
            R2e(t, t.dyn_ltree, t.dyn_dtree)),
        E2e(t),
        r && dVe(t);
    },
    _tr_tally: function (t, e, n) {
      return (
        (t.pending_buf[t.sym_buf + t.sym_next++] = e),
        (t.pending_buf[t.sym_buf + t.sym_next++] = e >> 8),
        (t.pending_buf[t.sym_buf + t.sym_next++] = n),
        e === 0
          ? t.dyn_ltree[2 * n]++
          : (t.matches++,
            e--,
            t.dyn_ltree[2 * (_$[n] + 256 + 1)]++,
            t.dyn_dtree[2 * lVe(e)]++),
        t.sym_next === t.sym_end
      );
    },
    _tr_align: function (t) {
      var e;
      mf(t, 2, 3),
        nv(t, 256, m1),
        (e = t).bi_valid === 16
          ? (Xx(e, e.bi_buf), (e.bi_buf = 0), (e.bi_valid = 0))
          : e.bi_valid >= 8 &&
            ((e.pending_buf[e.pending++] = 255 & e.bi_buf),
            (e.bi_buf >>= 8),
            (e.bi_valid -= 8));
    },
  },
  T$ = function (t, e, n, r) {
    for (
      var i = (65535 & t) | 0, o = ((t >>> 16) & 65535) | 0, l = 0;
      n !== 0;

    ) {
      n -= l = n > 2e3 ? 2e3 : n;
      do o = (o + (i = (i + e[r++]) | 0)) | 0;
      while (--l);
      (i %= 65521), (o %= 65521);
    }
    return i | (o << 16) | 0;
  },
  ARn = new Uint32Array(
    (function () {
      for (var t, e = [], n = 0; n < 256; n++) {
        t = n;
        for (var r = 0; r < 8; r++)
          t = 1 & t ? 3988292384 ^ (t >>> 1) : t >>> 1;
        e[n] = t;
      }
      return e;
    })()
  ),
  Kc = function (t, e, n, r) {
    var i = ARn,
      o = r + n;
    t ^= -1;
    for (var l = r; l < o; l++) t = (t >>> 8) ^ i[255 & (t ^ e[l])];
    return -1 ^ t;
  },
  JS = {
    2: "need dictionary",
    1: "stream end",
    0: "",
    "-1": "file error",
    "-2": "stream error",
    "-3": "data error",
    "-4": "insufficient memory",
    "-5": "buffer error",
    "-6": "incompatible version",
  },
  La = {
    Z_NO_FLUSH: 0,
    Z_PARTIAL_FLUSH: 1,
    Z_SYNC_FLUSH: 2,
    Z_FULL_FLUSH: 3,
    Z_FINISH: 4,
    Z_BLOCK: 5,
    Z_TREES: 6,
    Z_OK: 0,
    Z_STREAM_END: 1,
    Z_NEED_DICT: 2,
    Z_ERRNO: -1,
    Z_STREAM_ERROR: -2,
    Z_DATA_ERROR: -3,
    Z_MEM_ERROR: -4,
    Z_BUF_ERROR: -5,
    Z_NO_COMPRESSION: 0,
    Z_BEST_SPEED: 1,
    Z_BEST_COMPRESSION: 9,
    Z_DEFAULT_COMPRESSION: -1,
    Z_FILTERED: 1,
    Z_HUFFMAN_ONLY: 2,
    Z_RLE: 3,
    Z_FIXED: 4,
    Z_DEFAULT_STRATEGY: 0,
    Z_BINARY: 0,
    Z_TEXT: 1,
    Z_UNKNOWN: 2,
    Z_DEFLATED: 8,
  },
  wRn = A5._tr_init,
  Jte = A5._tr_stored_block,
  kRn = A5._tr_flush_block,
  VT = A5._tr_tally,
  IRn = A5._tr_align,
  zT = La.Z_NO_FLUSH,
  DRn = La.Z_PARTIAL_FLUSH,
  PRn = La.Z_FULL_FLUSH,
  om = La.Z_FINISH,
  D2e = La.Z_BLOCK,
  Td = La.Z_OK,
  P2e = La.Z_STREAM_END,
  Xy = La.Z_STREAM_ERROR,
  MRn = La.Z_DATA_ERROR,
  gW = La.Z_BUF_ERROR,
  CRn = La.Z_DEFAULT_COMPRESSION,
  $Rn = La.Z_FILTERED,
  z3 = La.Z_HUFFMAN_ONLY,
  xRn = La.Z_RLE,
  LRn = La.Z_FIXED,
  ORn = La.Z_DEFAULT_STRATEGY,
  GRn = La.Z_UNKNOWN,
  KU = La.Z_DEFLATED,
  qte = 286,
  NRn = 30,
  FRn = 19,
  URn = 2 * qte + 1,
  BRn = 15,
  aS = function (t, e) {
    return (t.msg = JS[e]), e;
  },
  M2e = function (t) {
    return 2 * t - (t > 4 ? 9 : 0);
  },
  ST = function (t) {
    for (var e = t.length; --e >= 0; ) t[e] = 0;
  },
  HRn = function (t) {
    var e,
      n,
      r,
      i = t.w_size;
    r = e = t.hash_size;
    do (n = t.head[--r]), (t.head[r] = n >= i ? n - i : 0);
    while (--e);
    r = e = i;
    do (n = t.prev[--r]), (t.prev[r] = n >= i ? n - i : 0);
    while (--e);
  },
  jT = function (t, e, n) {
    return ((e << t.hash_shift) ^ n) & t.hash_mask;
  },
  Rp = function (t) {
    var e = t.state,
      n = e.pending;
    n > t.avail_out && (n = t.avail_out),
      n !== 0 &&
        (t.output.set(
          e.pending_buf.subarray(e.pending_out, e.pending_out + n),
          t.next_out
        ),
        (t.next_out += n),
        (e.pending_out += n),
        (t.total_out += n),
        (t.avail_out -= n),
        (e.pending -= n),
        e.pending === 0 && (e.pending_out = 0));
  },
  $p = function (t, e) {
    kRn(
      t,
      t.block_start >= 0 ? t.block_start : -1,
      t.strstart - t.block_start,
      e
    ),
      (t.block_start = t.strstart),
      Rp(t.strm);
  },
  _s = function (t, e) {
    t.pending_buf[t.pending++] = e;
  },
  uM = function (t, e) {
    (t.pending_buf[t.pending++] = (e >>> 8) & 255),
      (t.pending_buf[t.pending++] = 255 & e);
  },
  ene = function (t, e, n, r) {
    var i = t.avail_in;
    return (
      i > r && (i = r),
      i === 0
        ? 0
        : ((t.avail_in -= i),
          e.set(t.input.subarray(t.next_in, t.next_in + i), n),
          t.state.wrap === 1
            ? (t.adler = T$(t.adler, e, i, n))
            : t.state.wrap === 2 && (t.adler = Kc(t.adler, e, i, n)),
          (t.next_in += i),
          (t.total_in += i),
          i)
    );
  },
  hVe = function (t, e) {
    var n,
      r,
      i = t.max_chain_length,
      o = t.strstart,
      l = t.prev_length,
      u = t.nice_match,
      c = t.strstart > t.w_size - 262 ? t.strstart - (t.w_size - 262) : 0,
      d = t.window,
      h = t.w_mask,
      f = t.prev,
      p = t.strstart + 258,
      g = d[o + l - 1],
      y = d[o + l];
    t.prev_length >= t.good_match && (i >>= 2),
      u > t.lookahead && (u = t.lookahead);
    do
      if (
        d[(n = e) + l] === y &&
        d[n + l - 1] === g &&
        d[n] === d[o] &&
        d[++n] === d[o + 1]
      ) {
        (o += 2), n++;
        do;
        while (
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          d[++o] === d[++n] &&
          o < p
        );
        if (((r = 258 - (p - o)), (o = p - 258), r > l)) {
          if (((t.match_start = e), (l = r), r >= u)) break;
          (g = d[o + l - 1]), (y = d[o + l]);
        }
      }
    while ((e = f[e & h]) > c && --i != 0);
    return l <= t.lookahead ? l : t.lookahead;
  },
  Sk = function (t) {
    var e,
      n,
      r,
      i = t.w_size;
    do {
      if (
        ((n = t.window_size - t.lookahead - t.strstart),
        t.strstart >= i + (i - 262) &&
          (t.window.set(t.window.subarray(i, i + i - n), 0),
          (t.match_start -= i),
          (t.strstart -= i),
          (t.block_start -= i),
          t.insert > t.strstart && (t.insert = t.strstart),
          HRn(t),
          (n += i)),
        t.strm.avail_in === 0)
      )
        break;
      if (
        ((e = ene(t.strm, t.window, t.strstart + t.lookahead, n)),
        (t.lookahead += e),
        t.lookahead + t.insert >= 3)
      )
        for (
          r = t.strstart - t.insert,
            t.ins_h = t.window[r],
            t.ins_h = jT(t, t.ins_h, t.window[r + 1]);
          t.insert &&
          ((t.ins_h = jT(t, t.ins_h, t.window[r + 3 - 1])),
          (t.prev[r & t.w_mask] = t.head[t.ins_h]),
          (t.head[t.ins_h] = r),
          r++,
          t.insert--,
          !(t.lookahead + t.insert < 3));

        );
    } while (t.lookahead < 262 && t.strm.avail_in !== 0);
  },
  fVe = function (t, e) {
    var n,
      r,
      i,
      o = t.pending_buf_size - 5 > t.w_size ? t.w_size : t.pending_buf_size - 5,
      l = 0,
      u = t.strm.avail_in;
    do {
      if (
        ((n = 65535),
        (i = (t.bi_valid + 42) >> 3),
        t.strm.avail_out < i ||
          ((i = t.strm.avail_out - i),
          n > (r = t.strstart - t.block_start) + t.strm.avail_in &&
            (n = r + t.strm.avail_in),
          n > i && (n = i),
          n < o &&
            ((n === 0 && e !== om) || e === zT || n !== r + t.strm.avail_in)))
      )
        break;
      (l = e === om && n === r + t.strm.avail_in ? 1 : 0),
        Jte(t, 0, 0, l),
        (t.pending_buf[t.pending - 4] = n),
        (t.pending_buf[t.pending - 3] = n >> 8),
        (t.pending_buf[t.pending - 2] = ~n),
        (t.pending_buf[t.pending - 1] = ~n >> 8),
        Rp(t.strm),
        r &&
          (r > n && (r = n),
          t.strm.output.set(
            t.window.subarray(t.block_start, t.block_start + r),
            t.strm.next_out
          ),
          (t.strm.next_out += r),
          (t.strm.avail_out -= r),
          (t.strm.total_out += r),
          (t.block_start += r),
          (n -= r)),
        n &&
          (ene(t.strm, t.strm.output, t.strm.next_out, n),
          (t.strm.next_out += n),
          (t.strm.avail_out -= n),
          (t.strm.total_out += n));
    } while (l === 0);
    return (
      (u -= t.strm.avail_in) &&
        (u >= t.w_size
          ? ((t.matches = 2),
            t.window.set(
              t.strm.input.subarray(t.strm.next_in - t.w_size, t.strm.next_in),
              0
            ),
            (t.strstart = t.w_size),
            (t.insert = t.strstart))
          : (t.window_size - t.strstart <= u &&
              ((t.strstart -= t.w_size),
              t.window.set(
                t.window.subarray(t.w_size, t.w_size + t.strstart),
                0
              ),
              t.matches < 2 && t.matches++,
              t.insert > t.strstart && (t.insert = t.strstart)),
            t.window.set(
              t.strm.input.subarray(t.strm.next_in - u, t.strm.next_in),
              t.strstart
            ),
            (t.strstart += u),
            (t.insert += u > t.w_size - t.insert ? t.w_size - t.insert : u)),
        (t.block_start = t.strstart)),
      t.high_water < t.strstart && (t.high_water = t.strstart),
      l
        ? 4
        : e !== zT &&
          e !== om &&
          t.strm.avail_in === 0 &&
          t.strstart === t.block_start
        ? 2
        : ((i = t.window_size - t.strstart),
          t.strm.avail_in > i &&
            t.block_start >= t.w_size &&
            ((t.block_start -= t.w_size),
            (t.strstart -= t.w_size),
            t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0),
            t.matches < 2 && t.matches++,
            (i += t.w_size),
            t.insert > t.strstart && (t.insert = t.strstart)),
          i > t.strm.avail_in && (i = t.strm.avail_in),
          i &&
            (ene(t.strm, t.window, t.strstart, i),
            (t.strstart += i),
            (t.insert += i > t.w_size - t.insert ? t.w_size - t.insert : i)),
          t.high_water < t.strstart && (t.high_water = t.strstart),
          (i = (t.bi_valid + 42) >> 3),
          (o =
            (i =
              t.pending_buf_size - i > 65535 ? 65535 : t.pending_buf_size - i) >
            t.w_size
              ? t.w_size
              : i),
          ((r = t.strstart - t.block_start) >= o ||
            ((r || e === om) && e !== zT && t.strm.avail_in === 0 && r <= i)) &&
            ((n = r > i ? i : r),
            (l = e === om && t.strm.avail_in === 0 && n === r ? 1 : 0),
            Jte(t, t.block_start, n, l),
            (t.block_start += n),
            Rp(t.strm)),
          l ? 3 : 1)
    );
  },
  mW = function (t, e) {
    for (var n, r; ; ) {
      if (t.lookahead < 262) {
        if ((Sk(t), t.lookahead < 262 && e === zT)) return 1;
        if (t.lookahead === 0) break;
      }
      if (
        ((n = 0),
        t.lookahead >= 3 &&
          ((t.ins_h = jT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
          (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
          (t.head[t.ins_h] = t.strstart)),
        n !== 0 &&
          t.strstart - n <= t.w_size - 262 &&
          (t.match_length = hVe(t, n)),
        t.match_length >= 3)
      )
        if (
          ((r = VT(t, t.strstart - t.match_start, t.match_length - 3)),
          (t.lookahead -= t.match_length),
          t.match_length <= t.max_lazy_match && t.lookahead >= 3)
        ) {
          t.match_length--;
          do
            t.strstart++,
              (t.ins_h = jT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
              (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
              (t.head[t.ins_h] = t.strstart);
          while (--t.match_length != 0);
          t.strstart++;
        } else
          (t.strstart += t.match_length),
            (t.match_length = 0),
            (t.ins_h = t.window[t.strstart]),
            (t.ins_h = jT(t, t.ins_h, t.window[t.strstart + 1]));
      else (r = VT(t, 0, t.window[t.strstart])), t.lookahead--, t.strstart++;
      if (r && ($p(t, !1), t.strm.avail_out === 0)) return 1;
    }
    return (
      (t.insert = t.strstart < 2 ? t.strstart : 2),
      e === om
        ? ($p(t, !0), t.strm.avail_out === 0 ? 3 : 4)
        : t.sym_next && ($p(t, !1), t.strm.avail_out === 0)
        ? 1
        : 2
    );
  },
  QA = function (t, e) {
    for (var n, r, i; ; ) {
      if (t.lookahead < 262) {
        if ((Sk(t), t.lookahead < 262 && e === zT)) return 1;
        if (t.lookahead === 0) break;
      }
      if (
        ((n = 0),
        t.lookahead >= 3 &&
          ((t.ins_h = jT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
          (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
          (t.head[t.ins_h] = t.strstart)),
        (t.prev_length = t.match_length),
        (t.prev_match = t.match_start),
        (t.match_length = 2),
        n !== 0 &&
          t.prev_length < t.max_lazy_match &&
          t.strstart - n <= t.w_size - 262 &&
          ((t.match_length = hVe(t, n)),
          t.match_length <= 5 &&
            (t.strategy === $Rn ||
              (t.match_length === 3 && t.strstart - t.match_start > 4096)) &&
            (t.match_length = 2)),
        t.prev_length >= 3 && t.match_length <= t.prev_length)
      ) {
        (i = t.strstart + t.lookahead - 3),
          (r = VT(t, t.strstart - 1 - t.prev_match, t.prev_length - 3)),
          (t.lookahead -= t.prev_length - 1),
          (t.prev_length -= 2);
        do
          ++t.strstart <= i &&
            ((t.ins_h = jT(t, t.ins_h, t.window[t.strstart + 3 - 1])),
            (n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h]),
            (t.head[t.ins_h] = t.strstart));
        while (--t.prev_length != 0);
        if (
          ((t.match_available = 0),
          (t.match_length = 2),
          t.strstart++,
          r && ($p(t, !1), t.strm.avail_out === 0))
        )
          return 1;
      } else if (t.match_available) {
        if (
          ((r = VT(t, 0, t.window[t.strstart - 1])) && $p(t, !1),
          t.strstart++,
          t.lookahead--,
          t.strm.avail_out === 0)
        )
          return 1;
      } else (t.match_available = 1), t.strstart++, t.lookahead--;
    }
    return (
      t.match_available &&
        ((r = VT(t, 0, t.window[t.strstart - 1])), (t.match_available = 0)),
      (t.insert = t.strstart < 2 ? t.strstart : 2),
      e === om
        ? ($p(t, !0), t.strm.avail_out === 0 ? 3 : 4)
        : t.sym_next && ($p(t, !1), t.strm.avail_out === 0)
        ? 1
        : 2
    );
  };
function _y(t, e, n, r, i) {
  (this.good_length = t),
    (this.max_lazy = e),
    (this.nice_length = n),
    (this.max_chain = r),
    (this.func = i);
}
var fC = [
  new _y(0, 0, 0, 0, fVe),
  new _y(4, 4, 8, 4, mW),
  new _y(4, 5, 16, 8, mW),
  new _y(4, 6, 32, 32, mW),
  new _y(4, 4, 16, 16, QA),
  new _y(8, 16, 32, 32, QA),
  new _y(8, 16, 128, 128, QA),
  new _y(8, 32, 128, 256, QA),
  new _y(32, 128, 258, 1024, QA),
  new _y(32, 258, 258, 4096, QA),
];
function XRn() {
  (this.strm = null),
    (this.status = 0),
    (this.pending_buf = null),
    (this.pending_buf_size = 0),
    (this.pending_out = 0),
    (this.pending = 0),
    (this.wrap = 0),
    (this.gzhead = null),
    (this.gzindex = 0),
    (this.method = KU),
    (this.last_flush = -1),
    (this.w_size = 0),
    (this.w_bits = 0),
    (this.w_mask = 0),
    (this.window = null),
    (this.window_size = 0),
    (this.prev = null),
    (this.head = null),
    (this.ins_h = 0),
    (this.hash_size = 0),
    (this.hash_bits = 0),
    (this.hash_mask = 0),
    (this.hash_shift = 0),
    (this.block_start = 0),
    (this.match_length = 0),
    (this.prev_match = 0),
    (this.match_available = 0),
    (this.strstart = 0),
    (this.match_start = 0),
    (this.lookahead = 0),
    (this.prev_length = 0),
    (this.max_chain_length = 0),
    (this.max_lazy_match = 0),
    (this.level = 0),
    (this.strategy = 0),
    (this.good_match = 0),
    (this.nice_match = 0),
    (this.dyn_ltree = new Uint16Array(2 * URn)),
    (this.dyn_dtree = new Uint16Array(2 * (2 * NRn + 1))),
    (this.bl_tree = new Uint16Array(2 * (2 * FRn + 1))),
    ST(this.dyn_ltree),
    ST(this.dyn_dtree),
    ST(this.bl_tree),
    (this.l_desc = null),
    (this.d_desc = null),
    (this.bl_desc = null),
    (this.bl_count = new Uint16Array(BRn + 1)),
    (this.heap = new Uint16Array(2 * qte + 1)),
    ST(this.heap),
    (this.heap_len = 0),
    (this.heap_max = 0),
    (this.depth = new Uint16Array(2 * qte + 1)),
    ST(this.depth),
    (this.sym_buf = 0),
    (this.lit_bufsize = 0),
    (this.sym_next = 0),
    (this.sym_end = 0),
    (this.opt_len = 0),
    (this.static_len = 0),
    (this.matches = 0),
    (this.insert = 0),
    (this.bi_buf = 0),
    (this.bi_valid = 0);
}
var pC = function (t) {
    if (!t) return 1;
    var e = t.state;
    return !e ||
      e.strm !== t ||
      (e.status !== 42 &&
        e.status !== 57 &&
        e.status !== 69 &&
        e.status !== 73 &&
        e.status !== 91 &&
        e.status !== 103 &&
        e.status !== 113 &&
        e.status !== 666)
      ? 1
      : 0;
  },
  pVe = function (t) {
    if (pC(t)) return aS(t, Xy);
    (t.total_in = t.total_out = 0), (t.data_type = GRn);
    var e = t.state;
    return (
      (e.pending = 0),
      (e.pending_out = 0),
      e.wrap < 0 && (e.wrap = -e.wrap),
      (e.status = e.wrap === 2 ? 57 : e.wrap ? 42 : 113),
      (t.adler = e.wrap === 2 ? 0 : 1),
      (e.last_flush = -2),
      wRn(e),
      Td
    );
  },
  gVe = function (t) {
    var e,
      n = pVe(t);
    return (
      n === Td &&
        (((e = t.state).window_size = 2 * e.w_size),
        ST(e.head),
        (e.max_lazy_match = fC[e.level].max_lazy),
        (e.good_match = fC[e.level].good_length),
        (e.nice_match = fC[e.level].nice_length),
        (e.max_chain_length = fC[e.level].max_chain),
        (e.strstart = 0),
        (e.block_start = 0),
        (e.lookahead = 0),
        (e.insert = 0),
        (e.match_length = e.prev_length = 2),
        (e.match_available = 0),
        (e.ins_h = 0)),
      n
    );
  },
  C2e = function (t, e, n, r, i, o) {
    if (!t) return Xy;
    var l = 1;
    if (
      (e === CRn && (e = 6),
      r < 0 ? ((l = 0), (r = -r)) : r > 15 && ((l = 2), (r -= 16)),
      i < 1 ||
        i > 9 ||
        n !== KU ||
        r < 8 ||
        r > 15 ||
        e < 0 ||
        e > 9 ||
        o < 0 ||
        o > LRn ||
        (r === 8 && l !== 1))
    )
      return aS(t, Xy);
    r === 8 && (r = 9);
    var u = new XRn();
    return (
      (t.state = u),
      (u.strm = t),
      (u.status = 42),
      (u.wrap = l),
      (u.gzhead = null),
      (u.w_bits = r),
      (u.w_size = 1 << u.w_bits),
      (u.w_mask = u.w_size - 1),
      (u.hash_bits = i + 7),
      (u.hash_size = 1 << u.hash_bits),
      (u.hash_mask = u.hash_size - 1),
      (u.hash_shift = ~~((u.hash_bits + 3 - 1) / 3)),
      (u.window = new Uint8Array(2 * u.w_size)),
      (u.head = new Uint16Array(u.hash_size)),
      (u.prev = new Uint16Array(u.w_size)),
      (u.lit_bufsize = 1 << (i + 6)),
      (u.pending_buf_size = 4 * u.lit_bufsize),
      (u.pending_buf = new Uint8Array(u.pending_buf_size)),
      (u.sym_buf = u.lit_bufsize),
      (u.sym_end = 3 * (u.lit_bufsize - 1)),
      (u.level = e),
      (u.strategy = o),
      (u.method = n),
      gVe(t)
    );
  },
  E$ = {
    deflateInit: function (t, e) {
      return C2e(t, e, KU, 15, 8, ORn);
    },
    deflateInit2: C2e,
    deflateReset: gVe,
    deflateResetKeep: pVe,
    deflateSetHeader: function (t, e) {
      return pC(t) || t.state.wrap !== 2 ? Xy : ((t.state.gzhead = e), Td);
    },
    deflate: function (t, e) {
      if (pC(t) || e > D2e || e < 0) return t ? aS(t, Xy) : Xy;
      var n = t.state;
      if (
        !t.output ||
        (t.avail_in !== 0 && !t.input) ||
        (n.status === 666 && e !== om)
      )
        return aS(t, t.avail_out === 0 ? gW : Xy);
      var r = n.last_flush;
      if (((n.last_flush = e), n.pending !== 0)) {
        if ((Rp(t), t.avail_out === 0)) return (n.last_flush = -1), Td;
      } else if (t.avail_in === 0 && M2e(e) <= M2e(r) && e !== om)
        return aS(t, gW);
      if (n.status === 666 && t.avail_in !== 0) return aS(t, gW);
      if (
        (n.status === 42 && n.wrap === 0 && (n.status = 113), n.status === 42)
      ) {
        var i = (KU + ((n.w_bits - 8) << 4)) << 8;
        if (
          ((i |=
            (n.strategy >= z3 || n.level < 2
              ? 0
              : n.level < 6
              ? 1
              : n.level === 6
              ? 2
              : 3) << 6),
          n.strstart !== 0 && (i |= 32),
          uM(n, (i += 31 - (i % 31))),
          n.strstart !== 0 && (uM(n, t.adler >>> 16), uM(n, 65535 & t.adler)),
          (t.adler = 1),
          (n.status = 113),
          Rp(t),
          n.pending !== 0)
        )
          return (n.last_flush = -1), Td;
      }
      if (n.status === 57) {
        if (((t.adler = 0), _s(n, 31), _s(n, 139), _s(n, 8), n.gzhead))
          _s(
            n,
            (n.gzhead.text ? 1 : 0) +
              (n.gzhead.hcrc ? 2 : 0) +
              (n.gzhead.extra ? 4 : 0) +
              (n.gzhead.name ? 8 : 0) +
              (n.gzhead.comment ? 16 : 0)
          ),
            _s(n, 255 & n.gzhead.time),
            _s(n, (n.gzhead.time >> 8) & 255),
            _s(n, (n.gzhead.time >> 16) & 255),
            _s(n, (n.gzhead.time >> 24) & 255),
            _s(n, n.level === 9 ? 2 : n.strategy >= z3 || n.level < 2 ? 4 : 0),
            _s(n, 255 & n.gzhead.os),
            n.gzhead.extra &&
              n.gzhead.extra.length &&
              (_s(n, 255 & n.gzhead.extra.length),
              _s(n, (n.gzhead.extra.length >> 8) & 255)),
            n.gzhead.hcrc &&
              (t.adler = Kc(t.adler, n.pending_buf, n.pending, 0)),
            (n.gzindex = 0),
            (n.status = 69);
        else if (
          (_s(n, 0),
          _s(n, 0),
          _s(n, 0),
          _s(n, 0),
          _s(n, 0),
          _s(n, n.level === 9 ? 2 : n.strategy >= z3 || n.level < 2 ? 4 : 0),
          _s(n, 3),
          (n.status = 113),
          Rp(t),
          n.pending !== 0)
        )
          return (n.last_flush = -1), Td;
      }
      if (n.status === 69) {
        if (n.gzhead.extra) {
          for (
            var o = n.pending, l = (65535 & n.gzhead.extra.length) - n.gzindex;
            n.pending + l > n.pending_buf_size;

          ) {
            var u = n.pending_buf_size - n.pending;
            if (
              (n.pending_buf.set(
                n.gzhead.extra.subarray(n.gzindex, n.gzindex + u),
                n.pending
              ),
              (n.pending = n.pending_buf_size),
              n.gzhead.hcrc &&
                n.pending > o &&
                (t.adler = Kc(t.adler, n.pending_buf, n.pending - o, o)),
              (n.gzindex += u),
              Rp(t),
              n.pending !== 0)
            )
              return (n.last_flush = -1), Td;
            (o = 0), (l -= u);
          }
          var c = new Uint8Array(n.gzhead.extra);
          n.pending_buf.set(c.subarray(n.gzindex, n.gzindex + l), n.pending),
            (n.pending += l),
            n.gzhead.hcrc &&
              n.pending > o &&
              (t.adler = Kc(t.adler, n.pending_buf, n.pending - o, o)),
            (n.gzindex = 0);
        }
        n.status = 73;
      }
      if (n.status === 73) {
        if (n.gzhead.name) {
          var d,
            h = n.pending;
          do {
            if (n.pending === n.pending_buf_size) {
              if (
                (n.gzhead.hcrc &&
                  n.pending > h &&
                  (t.adler = Kc(t.adler, n.pending_buf, n.pending - h, h)),
                Rp(t),
                n.pending !== 0)
              )
                return (n.last_flush = -1), Td;
              h = 0;
            }
            (d =
              n.gzindex < n.gzhead.name.length
                ? 255 & n.gzhead.name.charCodeAt(n.gzindex++)
                : 0),
              _s(n, d);
          } while (d !== 0);
          n.gzhead.hcrc &&
            n.pending > h &&
            (t.adler = Kc(t.adler, n.pending_buf, n.pending - h, h)),
            (n.gzindex = 0);
        }
        n.status = 91;
      }
      if (n.status === 91) {
        if (n.gzhead.comment) {
          var f,
            p = n.pending;
          do {
            if (n.pending === n.pending_buf_size) {
              if (
                (n.gzhead.hcrc &&
                  n.pending > p &&
                  (t.adler = Kc(t.adler, n.pending_buf, n.pending - p, p)),
                Rp(t),
                n.pending !== 0)
              )
                return (n.last_flush = -1), Td;
              p = 0;
            }
            (f =
              n.gzindex < n.gzhead.comment.length
                ? 255 & n.gzhead.comment.charCodeAt(n.gzindex++)
                : 0),
              _s(n, f);
          } while (f !== 0);
          n.gzhead.hcrc &&
            n.pending > p &&
            (t.adler = Kc(t.adler, n.pending_buf, n.pending - p, p));
        }
        n.status = 103;
      }
      if (n.status === 103) {
        if (n.gzhead.hcrc) {
          if (n.pending + 2 > n.pending_buf_size && (Rp(t), n.pending !== 0))
            return (n.last_flush = -1), Td;
          _s(n, 255 & t.adler), _s(n, (t.adler >> 8) & 255), (t.adler = 0);
        }
        if (((n.status = 113), Rp(t), n.pending !== 0))
          return (n.last_flush = -1), Td;
      }
      if (
        t.avail_in !== 0 ||
        n.lookahead !== 0 ||
        (e !== zT && n.status !== 666)
      ) {
        var g =
          n.level === 0
            ? fVe(n, e)
            : n.strategy === z3
            ? (function (y, v) {
                for (var b; ; ) {
                  if (y.lookahead === 0 && (Sk(y), y.lookahead === 0)) {
                    if (v === zT) return 1;
                    break;
                  }
                  if (
                    ((y.match_length = 0),
                    (b = VT(y, 0, y.window[y.strstart])),
                    y.lookahead--,
                    y.strstart++,
                    b && ($p(y, !1), y.strm.avail_out === 0))
                  )
                    return 1;
                }
                return (
                  (y.insert = 0),
                  v === om
                    ? ($p(y, !0), y.strm.avail_out === 0 ? 3 : 4)
                    : y.sym_next && ($p(y, !1), y.strm.avail_out === 0)
                    ? 1
                    : 2
                );
              })(n, e)
            : n.strategy === xRn
            ? (function (y, v) {
                for (var b, w, k, D, $ = y.window; ; ) {
                  if (y.lookahead <= 258) {
                    if ((Sk(y), y.lookahead <= 258 && v === zT)) return 1;
                    if (y.lookahead === 0) break;
                  }
                  if (
                    ((y.match_length = 0),
                    y.lookahead >= 3 &&
                      y.strstart > 0 &&
                      (w = $[(k = y.strstart - 1)]) === $[++k] &&
                      w === $[++k] &&
                      w === $[++k])
                  ) {
                    D = y.strstart + 258;
                    do;
                    while (
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      w === $[++k] &&
                      k < D
                    );
                    (y.match_length = 258 - (D - k)),
                      y.match_length > y.lookahead &&
                        (y.match_length = y.lookahead);
                  }
                  if (
                    (y.match_length >= 3
                      ? ((b = VT(y, 1, y.match_length - 3)),
                        (y.lookahead -= y.match_length),
                        (y.strstart += y.match_length),
                        (y.match_length = 0))
                      : ((b = VT(y, 0, y.window[y.strstart])),
                        y.lookahead--,
                        y.strstart++),
                    b && ($p(y, !1), y.strm.avail_out === 0))
                  )
                    return 1;
                }
                return (
                  (y.insert = 0),
                  v === om
                    ? ($p(y, !0), y.strm.avail_out === 0 ? 3 : 4)
                    : y.sym_next && ($p(y, !1), y.strm.avail_out === 0)
                    ? 1
                    : 2
                );
              })(n, e)
            : fC[n.level].func(n, e);
        if (((g !== 3 && g !== 4) || (n.status = 666), g === 1 || g === 3))
          return t.avail_out === 0 && (n.last_flush = -1), Td;
        if (
          g === 2 &&
          (e === DRn
            ? IRn(n)
            : e !== D2e &&
              (Jte(n, 0, 0, !1),
              e === PRn &&
                (ST(n.head),
                n.lookahead === 0 &&
                  ((n.strstart = 0), (n.block_start = 0), (n.insert = 0)))),
          Rp(t),
          t.avail_out === 0)
        )
          return (n.last_flush = -1), Td;
      }
      return e !== om
        ? Td
        : n.wrap <= 0
        ? P2e
        : (n.wrap === 2
            ? (_s(n, 255 & t.adler),
              _s(n, (t.adler >> 8) & 255),
              _s(n, (t.adler >> 16) & 255),
              _s(n, (t.adler >> 24) & 255),
              _s(n, 255 & t.total_in),
              _s(n, (t.total_in >> 8) & 255),
              _s(n, (t.total_in >> 16) & 255),
              _s(n, (t.total_in >> 24) & 255))
            : (uM(n, t.adler >>> 16), uM(n, 65535 & t.adler)),
          Rp(t),
          n.wrap > 0 && (n.wrap = -n.wrap),
          n.pending !== 0 ? Td : P2e);
    },
    deflateEnd: function (t) {
      if (pC(t)) return Xy;
      var e = t.state.status;
      return (t.state = null), e === 113 ? aS(t, MRn) : Td;
    },
    deflateSetDictionary: function (t, e) {
      var n = e.length;
      if (pC(t)) return Xy;
      var r = t.state,
        i = r.wrap;
      if (i === 2 || (i === 1 && r.status !== 42) || r.lookahead) return Xy;
      if (
        (i === 1 && (t.adler = T$(t.adler, e, n, 0)),
        (r.wrap = 0),
        n >= r.w_size)
      ) {
        i === 0 &&
          (ST(r.head), (r.strstart = 0), (r.block_start = 0), (r.insert = 0));
        var o = new Uint8Array(r.w_size);
        o.set(e.subarray(n - r.w_size, n), 0), (e = o), (n = r.w_size);
      }
      var l = t.avail_in,
        u = t.next_in,
        c = t.input;
      for (
        t.avail_in = n, t.next_in = 0, t.input = e, Sk(r);
        r.lookahead >= 3;

      ) {
        var d = r.strstart,
          h = r.lookahead - 2;
        do
          (r.ins_h = jT(r, r.ins_h, r.window[d + 3 - 1])),
            (r.prev[d & r.w_mask] = r.head[r.ins_h]),
            (r.head[r.ins_h] = d),
            d++;
        while (--h);
        (r.strstart = d), (r.lookahead = 2), Sk(r);
      }
      return (
        (r.strstart += r.lookahead),
        (r.block_start = r.strstart),
        (r.insert = r.lookahead),
        (r.lookahead = 0),
        (r.match_length = r.prev_length = 2),
        (r.match_available = 0),
        (t.next_in = u),
        (t.input = c),
        (t.avail_in = l),
        (r.wrap = i),
        Td
      );
    },
    deflateInfo: "pako deflate (from Nodeca project)",
  },
  VRn = function (t, e) {
    return Object.prototype.hasOwnProperty.call(t, e);
  },
  wB = {
    assign: function (t) {
      for (var e = jn(Array.prototype).call(arguments, 1); e.length; ) {
        var n = e.shift();
        if (n) {
          if (ti(n) != "object") throw new TypeError(n + "must be non-object");
          for (var r in n) VRn(n, r) && (t[r] = n[r]);
        }
      }
      return t;
    },
    flattenChunks: function (t) {
      for (var e = 0, n = 0, r = t.length; n < r; n++) e += t[n].length;
      for (var i = new Uint8Array(e), o = 0, l = 0, u = t.length; o < u; o++) {
        var c = t[o];
        i.set(c, l), (l += c.length);
      }
      return i;
    },
  },
  mVe = !0;
try {
  String.fromCharCode.apply(null, new Uint8Array(1));
} catch {
  mVe = !1;
}
for (var Vx = new Uint8Array(256), W_ = 0; W_ < 256; W_++)
  Vx[W_] =
    W_ >= 252
      ? 6
      : W_ >= 248
      ? 5
      : W_ >= 240
      ? 4
      : W_ >= 224
      ? 3
      : W_ >= 192
      ? 2
      : 1;
Vx[254] = Vx[254] = 1;
var zx = {
    string2buf: function (t) {
      if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
        return new TextEncoder().encode(t);
      var e,
        n,
        r,
        i,
        o,
        l = t.length,
        u = 0;
      for (i = 0; i < l; i++)
        (64512 & (n = t.charCodeAt(i))) == 55296 &&
          i + 1 < l &&
          (64512 & (r = t.charCodeAt(i + 1))) == 56320 &&
          ((n = 65536 + ((n - 55296) << 10) + (r - 56320)), i++),
          (u += n < 128 ? 1 : n < 2048 ? 2 : n < 65536 ? 3 : 4);
      for (e = new Uint8Array(u), o = 0, i = 0; o < u; i++)
        (64512 & (n = t.charCodeAt(i))) == 55296 &&
          i + 1 < l &&
          (64512 & (r = t.charCodeAt(i + 1))) == 56320 &&
          ((n = 65536 + ((n - 55296) << 10) + (r - 56320)), i++),
          n < 128
            ? (e[o++] = n)
            : n < 2048
            ? ((e[o++] = 192 | (n >>> 6)), (e[o++] = 128 | (63 & n)))
            : n < 65536
            ? ((e[o++] = 224 | (n >>> 12)),
              (e[o++] = 128 | ((n >>> 6) & 63)),
              (e[o++] = 128 | (63 & n)))
            : ((e[o++] = 240 | (n >>> 18)),
              (e[o++] = 128 | ((n >>> 12) & 63)),
              (e[o++] = 128 | ((n >>> 6) & 63)),
              (e[o++] = 128 | (63 & n)));
      return e;
    },
    buf2string: function (t, e) {
      var n,
        r,
        i = e || t.length;
      if (typeof TextDecoder == "function" && TextDecoder.prototype.decode)
        return new TextDecoder().decode(t.subarray(0, e));
      var o = new Array(2 * i);
      for (r = 0, n = 0; n < i; ) {
        var l = t[n++];
        if (l < 128) o[r++] = l;
        else {
          var u = Vx[l];
          if (u > 4) (o[r++] = 65533), (n += u - 1);
          else {
            for (l &= u === 2 ? 31 : u === 3 ? 15 : 7; u > 1 && n < i; )
              (l = (l << 6) | (63 & t[n++])), u--;
            u > 1
              ? (o[r++] = 65533)
              : l < 65536
              ? (o[r++] = l)
              : ((l -= 65536),
                (o[r++] = 55296 | ((l >> 10) & 1023)),
                (o[r++] = 56320 | (1023 & l)));
          }
        }
      }
      return (function (c, d) {
        if (d < 65534 && c.subarray && mVe)
          return String.fromCharCode.apply(
            null,
            c.length === d ? c : c.subarray(0, d)
          );
        for (var h = "", f = 0; f < d; f++) h += String.fromCharCode(c[f]);
        return h;
      })(o, r);
    },
    utf8border: function (t, e) {
      (e = e || t.length) > t.length && (e = t.length);
      for (var n = e - 1; n >= 0 && (192 & t[n]) == 128; ) n--;
      return n < 0 || n === 0 ? e : n + Vx[t[n]] > e ? n : e;
    },
  },
  yVe = function () {
    (this.input = null),
      (this.next_in = 0),
      (this.avail_in = 0),
      (this.total_in = 0),
      (this.output = null),
      (this.next_out = 0),
      (this.avail_out = 0),
      (this.total_out = 0),
      (this.msg = ""),
      (this.state = null),
      (this.data_type = 2),
      (this.adler = 0);
  },
  vVe = Object.prototype.toString,
  zRn = La.Z_NO_FLUSH,
  jRn = La.Z_SYNC_FLUSH,
  WRn = La.Z_FULL_FLUSH,
  KRn = La.Z_FINISH,
  ZU = La.Z_OK,
  ZRn = La.Z_STREAM_END,
  YRn = La.Z_DEFAULT_COMPRESSION,
  QRn = La.Z_DEFAULT_STRATEGY,
  JRn = La.Z_DEFLATED;
function S$(t) {
  this.options = wB.assign(
    {
      level: YRn,
      method: JRn,
      chunkSize: 16384,
      windowBits: 15,
      memLevel: 8,
      strategy: QRn,
    },
    t || {}
  );
  var e = this.options;
  e.raw && e.windowBits > 0
    ? (e.windowBits = -e.windowBits)
    : e.gzip && e.windowBits > 0 && e.windowBits < 16 && (e.windowBits += 16),
    (this.err = 0),
    (this.msg = ""),
    (this.ended = !1),
    (this.chunks = []),
    (this.strm = new yVe()),
    (this.strm.avail_out = 0);
  var n = E$.deflateInit2(
    this.strm,
    e.level,
    e.method,
    e.windowBits,
    e.memLevel,
    e.strategy
  );
  if (n !== ZU) throw new Error(JS[n]);
  if ((e.header && E$.deflateSetHeader(this.strm, e.header), e.dictionary)) {
    var r;
    if (
      ((r =
        typeof e.dictionary == "string"
          ? zx.string2buf(e.dictionary)
          : vVe.call(e.dictionary) === "[object ArrayBuffer]"
          ? new Uint8Array(e.dictionary)
          : e.dictionary),
      (n = E$.deflateSetDictionary(this.strm, r)) !== ZU)
    )
      throw new Error(JS[n]);
    this._dict_set = !0;
  }
}
function yW(t, e) {
  var n = new S$(e);
  if ((n.push(t, !0), n.err)) throw n.msg || JS[n.err];
  return n.result;
}
(S$.prototype.push = function (t, e) {
  var n,
    r,
    i = this.strm,
    o = this.options.chunkSize;
  if (this.ended) return !1;
  for (
    r = e === ~~e ? e : e === !0 ? KRn : zRn,
      typeof t == "string"
        ? (i.input = zx.string2buf(t))
        : vVe.call(t) === "[object ArrayBuffer]"
        ? (i.input = new Uint8Array(t))
        : (i.input = t),
      i.next_in = 0,
      i.avail_in = i.input.length;
    ;

  )
    if (
      (i.avail_out === 0 &&
        ((i.output = new Uint8Array(o)), (i.next_out = 0), (i.avail_out = o)),
      (r === jRn || r === WRn) && i.avail_out <= 6)
    )
      this.onData(i.output.subarray(0, i.next_out)), (i.avail_out = 0);
    else {
      if ((n = E$.deflate(i, r)) === ZRn)
        return (
          i.next_out > 0 && this.onData(i.output.subarray(0, i.next_out)),
          (n = E$.deflateEnd(this.strm)),
          this.onEnd(n),
          (this.ended = !0),
          n === ZU
        );
      if (i.avail_out !== 0) {
        if (r > 0 && i.next_out > 0)
          this.onData(i.output.subarray(0, i.next_out)), (i.avail_out = 0);
        else if (i.avail_in === 0) break;
      } else this.onData(i.output);
    }
  return !0;
}),
  (S$.prototype.onData = function (t) {
    this.chunks.push(t);
  }),
  (S$.prototype.onEnd = function (t) {
    t === ZU && (this.result = wB.flattenChunks(this.chunks)),
      (this.chunks = []),
      (this.err = t),
      (this.msg = this.strm.msg);
  });
var j3 = {
    Deflate: S$,
    deflate: yW,
    deflateRaw: function (t, e) {
      return ((e = e || {}).raw = !0), yW(t, e);
    },
    gzip: function (t, e) {
      return ((e = e || {}).gzip = !0), yW(t, e);
    },
    constants: La,
  },
  qRn = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f,
      p,
      g,
      y,
      v,
      b,
      w,
      k,
      D,
      $,
      N,
      P,
      I,
      O,
      X,
      G = t.state;
    (n = t.next_in),
      (O = t.input),
      (r = n + (t.avail_in - 5)),
      (i = t.next_out),
      (X = t.output),
      (o = i - (e - t.avail_out)),
      (l = i + (t.avail_out - 257)),
      (u = G.dmax),
      (c = G.wsize),
      (d = G.whave),
      (h = G.wnext),
      (f = G.window),
      (p = G.hold),
      (g = G.bits),
      (y = G.lencode),
      (v = G.distcode),
      (b = (1 << G.lenbits) - 1),
      (w = (1 << G.distbits) - 1);
    e: do {
      g < 15 && ((p += O[n++] << g), (g += 8), (p += O[n++] << g), (g += 8)),
        (k = y[p & b]);
      t: for (;;) {
        if (((p >>>= D = k >>> 24), (g -= D), (D = (k >>> 16) & 255) == 0))
          X[i++] = 65535 & k;
        else {
          if (!(16 & D)) {
            if (!(64 & D)) {
              k = y[(65535 & k) + (p & ((1 << D) - 1))];
              continue t;
            }
            if (32 & D) {
              G.mode = 16191;
              break e;
            }
            (t.msg = "invalid literal/length code"), (G.mode = 16209);
            break e;
          }
          ($ = 65535 & k),
            (D &= 15) &&
              (g < D && ((p += O[n++] << g), (g += 8)),
              ($ += p & ((1 << D) - 1)),
              (p >>>= D),
              (g -= D)),
            g < 15 &&
              ((p += O[n++] << g), (g += 8), (p += O[n++] << g), (g += 8)),
            (k = v[p & w]);
          n: for (;;) {
            if (
              ((p >>>= D = k >>> 24), (g -= D), !(16 & (D = (k >>> 16) & 255)))
            ) {
              if (!(64 & D)) {
                k = v[(65535 & k) + (p & ((1 << D) - 1))];
                continue n;
              }
              (t.msg = "invalid distance code"), (G.mode = 16209);
              break e;
            }
            if (
              ((N = 65535 & k),
              g < (D &= 15) &&
                ((p += O[n++] << g),
                (g += 8) < D && ((p += O[n++] << g), (g += 8))),
              (N += p & ((1 << D) - 1)) > u)
            ) {
              (t.msg = "invalid distance too far back"), (G.mode = 16209);
              break e;
            }
            if (((p >>>= D), (g -= D), N > (D = i - o))) {
              if ((D = N - D) > d && G.sane) {
                (t.msg = "invalid distance too far back"), (G.mode = 16209);
                break e;
              }
              if (((P = 0), (I = f), h === 0)) {
                if (((P += c - D), D < $)) {
                  $ -= D;
                  do X[i++] = f[P++];
                  while (--D);
                  (P = i - N), (I = X);
                }
              } else if (h < D) {
                if (((P += c + h - D), (D -= h) < $)) {
                  $ -= D;
                  do X[i++] = f[P++];
                  while (--D);
                  if (((P = 0), h < $)) {
                    $ -= D = h;
                    do X[i++] = f[P++];
                    while (--D);
                    (P = i - N), (I = X);
                  }
                }
              } else if (((P += h - D), D < $)) {
                $ -= D;
                do X[i++] = f[P++];
                while (--D);
                (P = i - N), (I = X);
              }
              for (; $ > 2; )
                (X[i++] = I[P++]),
                  (X[i++] = I[P++]),
                  (X[i++] = I[P++]),
                  ($ -= 3);
              $ && ((X[i++] = I[P++]), $ > 1 && (X[i++] = I[P++]));
            } else {
              P = i - N;
              do
                (X[i++] = X[P++]),
                  (X[i++] = X[P++]),
                  (X[i++] = X[P++]),
                  ($ -= 3);
              while ($ > 2);
              $ && ((X[i++] = X[P++]), $ > 1 && (X[i++] = X[P++]));
            }
            break;
          }
        }
        break;
      }
    } while (n < r && i < l);
    (n -= $ = g >> 3),
      (p &= (1 << (g -= $ << 3)) - 1),
      (t.next_in = n),
      (t.next_out = i),
      (t.avail_in = n < r ? r - n + 5 : 5 - (n - r)),
      (t.avail_out = i < l ? l - i + 257 : 257 - (i - l)),
      (G.hold = p),
      (G.bits = g);
  },
  eAn = new Uint16Array([
    3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67,
    83, 99, 115, 131, 163, 195, 227, 258, 0, 0,
  ]),
  tAn = new Uint8Array([
    16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19,
    19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78,
  ]),
  nAn = new Uint16Array([
    1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513,
    769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0,
  ]),
  rAn = new Uint8Array([
    16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24,
    24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64,
  ]),
  R$ = function (t, e, n, r, i, o, l, u) {
    var c,
      d,
      h,
      f,
      p,
      g,
      y,
      v,
      b,
      w = u.bits,
      k = 0,
      D = 0,
      $ = 0,
      N = 0,
      P = 0,
      I = 0,
      O = 0,
      X = 0,
      G = 0,
      H = 0,
      E = null,
      S = new Uint16Array(16),
      L = new Uint16Array(16),
      W = null;
    for (k = 0; k <= 15; k++) S[k] = 0;
    for (D = 0; D < r; D++) S[e[n + D]]++;
    for (P = w, N = 15; N >= 1 && S[N] === 0; N--);
    if ((P > N && (P = N), N === 0))
      return (i[o++] = 20971520), (i[o++] = 20971520), (u.bits = 1), 0;
    for ($ = 1; $ < N && S[$] === 0; $++);
    for (P < $ && (P = $), X = 1, k = 1; k <= 15; k++)
      if (((X <<= 1), (X -= S[k]) < 0)) return -1;
    if (X > 0 && (t === 0 || N !== 1)) return -1;
    for (L[1] = 0, k = 1; k < 15; k++) L[k + 1] = L[k] + S[k];
    for (D = 0; D < r; D++) e[n + D] !== 0 && (l[L[e[n + D]]++] = D);
    if (
      (t === 0
        ? ((E = W = l), (g = 20))
        : t === 1
        ? ((E = eAn), (W = tAn), (g = 257))
        : ((E = nAn), (W = rAn), (g = 0)),
      (H = 0),
      (D = 0),
      (k = $),
      (p = o),
      (I = P),
      (O = 0),
      (h = -1),
      (f = (G = 1 << P) - 1),
      (t === 1 && G > 852) || (t === 2 && G > 592))
    )
      return 1;
    for (;;) {
      (y = k - O),
        l[D] + 1 < g
          ? ((v = 0), (b = l[D]))
          : l[D] >= g
          ? ((v = W[l[D] - g]), (b = E[l[D] - g]))
          : ((v = 96), (b = 0)),
        (c = 1 << (k - O)),
        ($ = d = 1 << I);
      do i[p + (H >> O) + (d -= c)] = (y << 24) | (v << 16) | b | 0;
      while (d !== 0);
      for (c = 1 << (k - 1); H & c; ) c >>= 1;
      if ((c !== 0 ? ((H &= c - 1), (H += c)) : (H = 0), D++, --S[k] == 0)) {
        if (k === N) break;
        k = e[n + l[D]];
      }
      if (k > P && (H & f) !== h) {
        for (
          O === 0 && (O = P), p += $, X = 1 << (I = k - O);
          I + O < N && !((X -= S[I + O]) <= 0);

        )
          I++, (X <<= 1);
        if (((G += 1 << I), (t === 1 && G > 852) || (t === 2 && G > 592)))
          return 1;
        i[(h = H & f)] = (P << 24) | (I << 16) | (p - o) | 0;
      }
    }
    return (
      H !== 0 && (i[p + H] = ((k - O) << 24) | (64 << 16) | 0), (u.bits = P), 0
    );
  },
  $2e = La.Z_FINISH,
  iAn = La.Z_BLOCK,
  W3 = La.Z_TREES,
  oS = La.Z_OK,
  aAn = La.Z_STREAM_END,
  oAn = La.Z_NEED_DICT,
  b0 = La.Z_STREAM_ERROR,
  x2e = La.Z_DATA_ERROR,
  L2e = La.Z_MEM_ERROR,
  sAn = La.Z_BUF_ERROR,
  O2e = La.Z_DEFLATED,
  G2e = function (t) {
    return (
      ((t >>> 24) & 255) +
      ((t >>> 8) & 65280) +
      ((65280 & t) << 8) +
      ((255 & t) << 24)
    );
  };
function lAn() {
  (this.strm = null),
    (this.mode = 0),
    (this.last = !1),
    (this.wrap = 0),
    (this.havedict = !1),
    (this.flags = 0),
    (this.dmax = 0),
    (this.check = 0),
    (this.total = 0),
    (this.head = null),
    (this.wbits = 0),
    (this.wsize = 0),
    (this.whave = 0),
    (this.wnext = 0),
    (this.window = null),
    (this.hold = 0),
    (this.bits = 0),
    (this.length = 0),
    (this.offset = 0),
    (this.extra = 0),
    (this.lencode = null),
    (this.distcode = null),
    (this.lenbits = 0),
    (this.distbits = 0),
    (this.ncode = 0),
    (this.nlen = 0),
    (this.ndist = 0),
    (this.have = 0),
    (this.next = null),
    (this.lens = new Uint16Array(320)),
    (this.work = new Uint16Array(288)),
    (this.lendyn = null),
    (this.distdyn = null),
    (this.sane = 0),
    (this.back = 0),
    (this.was = 0);
}
var vW,
  bW,
  vS = function (t) {
    if (!t) return 1;
    var e = t.state;
    return !e || e.strm !== t || e.mode < 16180 || e.mode > 16211 ? 1 : 0;
  },
  bVe = function (t) {
    if (vS(t)) return b0;
    var e = t.state;
    return (
      (t.total_in = t.total_out = e.total = 0),
      (t.msg = ""),
      e.wrap && (t.adler = 1 & e.wrap),
      (e.mode = 16180),
      (e.last = 0),
      (e.havedict = 0),
      (e.flags = -1),
      (e.dmax = 32768),
      (e.head = null),
      (e.hold = 0),
      (e.bits = 0),
      (e.lencode = e.lendyn = new Int32Array(852)),
      (e.distcode = e.distdyn = new Int32Array(592)),
      (e.sane = 1),
      (e.back = -1),
      oS
    );
  },
  _Ve = function (t) {
    if (vS(t)) return b0;
    var e = t.state;
    return (e.wsize = 0), (e.whave = 0), (e.wnext = 0), bVe(t);
  },
  TVe = function (t, e) {
    var n;
    if (vS(t)) return b0;
    var r = t.state;
    return (
      e < 0 ? ((n = 0), (e = -e)) : ((n = 5 + (e >> 4)), e < 48 && (e &= 15)),
      e && (e < 8 || e > 15)
        ? b0
        : (r.window !== null && r.wbits !== e && (r.window = null),
          (r.wrap = n),
          (r.wbits = e),
          _Ve(t))
    );
  },
  N2e = function (t, e) {
    if (!t) return b0;
    var n = new lAn();
    (t.state = n), (n.strm = t), (n.window = null), (n.mode = 16180);
    var r = TVe(t, e);
    return r !== oS && (t.state = null), r;
  },
  F2e = !0,
  uAn = function (t) {
    if (F2e) {
      (vW = new Int32Array(512)), (bW = new Int32Array(32));
      for (var e = 0; e < 144; ) t.lens[e++] = 8;
      for (; e < 256; ) t.lens[e++] = 9;
      for (; e < 280; ) t.lens[e++] = 7;
      for (; e < 288; ) t.lens[e++] = 8;
      for (R$(1, t.lens, 0, 288, vW, 0, t.work, { bits: 9 }), e = 0; e < 32; )
        t.lens[e++] = 5;
      R$(2, t.lens, 0, 32, bW, 0, t.work, { bits: 5 }), (F2e = !1);
    }
    (t.lencode = vW), (t.lenbits = 9), (t.distcode = bW), (t.distbits = 5);
  },
  U2e = function (t, e, n, r) {
    var i,
      o = t.state;
    return (
      o.window === null &&
        ((o.wsize = 1 << o.wbits),
        (o.wnext = 0),
        (o.whave = 0),
        (o.window = new Uint8Array(o.wsize))),
      r >= o.wsize
        ? (o.window.set(e.subarray(n - o.wsize, n), 0),
          (o.wnext = 0),
          (o.whave = o.wsize))
        : ((i = o.wsize - o.wnext) > r && (i = r),
          o.window.set(e.subarray(n - r, n - r + i), o.wnext),
          (r -= i)
            ? (o.window.set(e.subarray(n - r, n), 0),
              (o.wnext = r),
              (o.whave = o.wsize))
            : ((o.wnext += i),
              o.wnext === o.wsize && (o.wnext = 0),
              o.whave < o.wsize && (o.whave += i))),
      0
    );
  },
  k1 = {
    inflateReset: _Ve,
    inflateReset2: TVe,
    inflateResetKeep: bVe,
    inflateInit: function (t) {
      return N2e(t, 15);
    },
    inflateInit2: N2e,
    inflate: function (t, e) {
      var n,
        r,
        i,
        o,
        l,
        u,
        c,
        d,
        h,
        f,
        p,
        g,
        y,
        v,
        b,
        w,
        k,
        D,
        $,
        N,
        P,
        I,
        O,
        X,
        G = 0,
        H = new Uint8Array(4),
        E = new Uint8Array([
          16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15,
        ]);
      if (vS(t) || !t.output || (!t.input && t.avail_in !== 0)) return b0;
      (n = t.state).mode === 16191 && (n.mode = 16192),
        (l = t.next_out),
        (i = t.output),
        (c = t.avail_out),
        (o = t.next_in),
        (r = t.input),
        (u = t.avail_in),
        (d = n.hold),
        (h = n.bits),
        (f = u),
        (p = c),
        (I = oS);
      e: for (;;)
        switch (n.mode) {
          case 16180:
            if (n.wrap === 0) {
              n.mode = 16192;
              break;
            }
            for (; h < 16; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (2 & n.wrap && d === 35615) {
              n.wbits === 0 && (n.wbits = 15),
                (n.check = 0),
                (H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (n.check = Kc(n.check, H, 2, 0)),
                (d = 0),
                (h = 0),
                (n.mode = 16181);
              break;
            }
            if (
              (n.head && (n.head.done = !1),
              !(1 & n.wrap) || (((255 & d) << 8) + (d >> 8)) % 31)
            ) {
              (t.msg = "incorrect header check"), (n.mode = 16209);
              break;
            }
            if ((15 & d) !== O2e) {
              (t.msg = "unknown compression method"), (n.mode = 16209);
              break;
            }
            if (
              ((h -= 4),
              (P = 8 + (15 & (d >>>= 4))),
              n.wbits === 0 && (n.wbits = P),
              P > 15 || P > n.wbits)
            ) {
              (t.msg = "invalid window size"), (n.mode = 16209);
              break;
            }
            (n.dmax = 1 << n.wbits),
              (n.flags = 0),
              (t.adler = n.check = 1),
              (n.mode = 512 & d ? 16189 : 16191),
              (d = 0),
              (h = 0);
            break;
          case 16181:
            for (; h < 16; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (((n.flags = d), (255 & Ca(n)) !== O2e)) {
              (t.msg = "unknown compression method"), (n.mode = 16209);
              break;
            }
            if (57344 & Ca(n)) {
              (t.msg = "unknown header flags set"), (n.mode = 16209);
              break;
            }
            n.head && (n.head.text = (d >> 8) & 1),
              512 & Ca(n) &&
                4 & n.wrap &&
                ((H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (n.check = Kc(n.check, H, 2, 0))),
              (d = 0),
              (h = 0),
              (n.mode = 16182);
          case 16182:
            for (; h < 32; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            n.head && (n.head.time = d),
              512 & Ca(n) &&
                4 & n.wrap &&
                ((H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (H[2] = (d >>> 16) & 255),
                (H[3] = (d >>> 24) & 255),
                (n.check = Kc(n.check, H, 4, 0))),
              (d = 0),
              (h = 0),
              (n.mode = 16183);
          case 16183:
            for (; h < 16; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            n.head && ((n.head.xflags = 255 & d), (n.head.os = d >> 8)),
              512 & Ca(n) &&
                4 & n.wrap &&
                ((H[0] = 255 & d),
                (H[1] = (d >>> 8) & 255),
                (n.check = Kc(n.check, H, 2, 0))),
              (d = 0),
              (h = 0),
              (n.mode = 16184);
          case 16184:
            if (1024 & Ca(n)) {
              for (; h < 16; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.length = d),
                n.head && (n.head.extra_len = d),
                512 & Ca(n) &&
                  4 & n.wrap &&
                  ((H[0] = 255 & d),
                  (H[1] = (d >>> 8) & 255),
                  (n.check = Kc(n.check, H, 2, 0))),
                (d = 0),
                (h = 0);
            } else n.head && (n.head.extra = null);
            n.mode = 16185;
          case 16185:
            if (
              1024 & Ca(n) &&
              ((g = n.length) > u && (g = u),
              g &&
                (n.head &&
                  ((P = n.head.extra_len - n.length),
                  n.head.extra ||
                    (n.head.extra = new Uint8Array(n.head.extra_len)),
                  n.head.extra.set(r.subarray(o, o + g), P)),
                512 & Ca(n) && 4 & n.wrap && (n.check = Kc(n.check, r, g, o)),
                (u -= g),
                (o += g),
                (n.length -= g)),
              n.length)
            )
              break e;
            (n.length = 0), (n.mode = 16186);
          case 16186:
            if (2048 & Ca(n)) {
              if (u === 0) break e;
              g = 0;
              do
                (P = r[o + g++]),
                  n.head &&
                    P &&
                    n.length < 65536 &&
                    (n.head.name += String.fromCharCode(P));
              while (P && g < u);
              if (
                (512 & Ca(n) && 4 & n.wrap && (n.check = Kc(n.check, r, g, o)),
                (u -= g),
                (o += g),
                P)
              )
                break e;
            } else n.head && (n.head.name = null);
            (n.length = 0), (n.mode = 16187);
          case 16187:
            if (4096 & Ca(n)) {
              if (u === 0) break e;
              g = 0;
              do
                (P = r[o + g++]),
                  n.head &&
                    P &&
                    n.length < 65536 &&
                    (n.head.comment += String.fromCharCode(P));
              while (P && g < u);
              if (
                (512 & Ca(n) && 4 & n.wrap && (n.check = Kc(n.check, r, g, o)),
                (u -= g),
                (o += g),
                P)
              )
                break e;
            } else n.head && (n.head.comment = null);
            n.mode = 16188;
          case 16188:
            if (512 & Ca(n)) {
              for (; h < 16; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              if (4 & n.wrap && d !== (65535 & n.check)) {
                (t.msg = "header crc mismatch"), (n.mode = 16209);
                break;
              }
              (d = 0), (h = 0);
            }
            n.head && ((n.head.hcrc = (Ca(n) >> 9) & 1), (n.head.done = !0)),
              (t.adler = n.check = 0),
              (n.mode = 16191);
            break;
          case 16189:
            for (; h < 32; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            (t.adler = n.check = G2e(d)), (d = 0), (h = 0), (n.mode = 16190);
          case 16190:
            if (n.havedict === 0)
              return (
                (t.next_out = l),
                (t.avail_out = c),
                (t.next_in = o),
                (t.avail_in = u),
                (n.hold = d),
                (n.bits = h),
                oAn
              );
            (t.adler = n.check = 1), (n.mode = 16191);
          case 16191:
            if (e === iAn || e === W3) break e;
          case 16192:
            if (n.last) {
              (d >>>= 7 & h), (h -= 7 & h), (n.mode = 16206);
              break;
            }
            for (; h < 3; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            switch (((n.last = 1 & d), (h -= 1), 3 & (d >>>= 1))) {
              case 0:
                n.mode = 16193;
                break;
              case 1:
                if ((uAn(n), (n.mode = 16199), e === W3)) {
                  (d >>>= 2), (h -= 2);
                  break e;
                }
                break;
              case 2:
                n.mode = 16196;
                break;
              case 3:
                (t.msg = "invalid block type"), (n.mode = 16209);
            }
            (d >>>= 2), (h -= 2);
            break;
          case 16193:
            for (d >>>= 7 & h, h -= 7 & h; h < 32; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if ((65535 & d) != ((d >>> 16) ^ 65535)) {
              (t.msg = "invalid stored block lengths"), (n.mode = 16209);
              break;
            }
            if (
              ((n.length = 65535 & d),
              (d = 0),
              (h = 0),
              (n.mode = 16194),
              e === W3)
            )
              break e;
          case 16194:
            n.mode = 16195;
          case 16195:
            if ((g = n.length)) {
              if ((g > u && (g = u), g > c && (g = c), g === 0)) break e;
              i.set(r.subarray(o, o + g), l),
                (u -= g),
                (o += g),
                (c -= g),
                (l += g),
                (n.length -= g);
              break;
            }
            n.mode = 16191;
            break;
          case 16196:
            for (; h < 14; ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (
              ((n.nlen = 257 + (31 & d)),
              (d >>>= 5),
              (h -= 5),
              (n.ndist = 1 + (31 & d)),
              (d >>>= 5),
              (h -= 5),
              (n.ncode = 4 + (15 & d)),
              (d >>>= 4),
              (h -= 4),
              n.nlen > 286 || n.ndist > 30)
            ) {
              (t.msg = "too many length or distance symbols"), (n.mode = 16209);
              break;
            }
            (n.have = 0), (n.mode = 16197);
          case 16197:
            for (; n.have < n.ncode; ) {
              for (; h < 3; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.lens[E[n.have++]] = 7 & d), (d >>>= 3), (h -= 3);
            }
            for (; n.have < 19; ) n.lens[E[n.have++]] = 0;
            if (
              ((n.lencode = n.lendyn),
              (n.lenbits = 7),
              (O = { bits: n.lenbits }),
              (I = R$(0, n.lens, 0, 19, n.lencode, 0, n.work, O)),
              (n.lenbits = O.bits),
              I)
            ) {
              (t.msg = "invalid code lengths set"), (n.mode = 16209);
              break;
            }
            (n.have = 0), (n.mode = 16198);
          case 16198:
            for (; n.have < n.nlen + n.ndist; ) {
              for (
                ;
                (w =
                  ((G = n.lencode[d & ((1 << n.lenbits) - 1)]) >>> 16) & 255),
                  (k = 65535 & G),
                  !((b = G >>> 24) <= h);

              ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              if (k < 16) (d >>>= b), (h -= b), (n.lens[n.have++] = k);
              else {
                if (k === 16) {
                  for (X = b + 2; h < X; ) {
                    if (u === 0) break e;
                    u--, (d += r[o++] << h), (h += 8);
                  }
                  if (((d >>>= b), (h -= b), n.have === 0)) {
                    (t.msg = "invalid bit length repeat"), (n.mode = 16209);
                    break;
                  }
                  (P = n.lens[n.have - 1]),
                    (g = 3 + (3 & d)),
                    (d >>>= 2),
                    (h -= 2);
                } else if (k === 17) {
                  for (X = b + 3; h < X; ) {
                    if (u === 0) break e;
                    u--, (d += r[o++] << h), (h += 8);
                  }
                  (h -= b),
                    (P = 0),
                    (g = 3 + (7 & (d >>>= b))),
                    (d >>>= 3),
                    (h -= 3);
                } else {
                  for (X = b + 7; h < X; ) {
                    if (u === 0) break e;
                    u--, (d += r[o++] << h), (h += 8);
                  }
                  (h -= b),
                    (P = 0),
                    (g = 11 + (127 & (d >>>= b))),
                    (d >>>= 7),
                    (h -= 7);
                }
                if (n.have + g > n.nlen + n.ndist) {
                  (t.msg = "invalid bit length repeat"), (n.mode = 16209);
                  break;
                }
                for (; g--; ) n.lens[n.have++] = P;
              }
            }
            if (n.mode === 16209) break;
            if (n.lens[256] === 0) {
              (t.msg = "invalid code -- missing end-of-block"),
                (n.mode = 16209);
              break;
            }
            if (
              ((n.lenbits = 9),
              (O = { bits: n.lenbits }),
              (I = R$(1, n.lens, 0, n.nlen, n.lencode, 0, n.work, O)),
              (n.lenbits = O.bits),
              I)
            ) {
              (t.msg = "invalid literal/lengths set"), (n.mode = 16209);
              break;
            }
            if (
              ((n.distbits = 6),
              (n.distcode = n.distdyn),
              (O = { bits: n.distbits }),
              (I = R$(2, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, O)),
              (n.distbits = O.bits),
              I)
            ) {
              (t.msg = "invalid distances set"), (n.mode = 16209);
              break;
            }
            if (((n.mode = 16199), e === W3)) break e;
          case 16199:
            n.mode = 16200;
          case 16200:
            if (u >= 6 && c >= 258) {
              (t.next_out = l),
                (t.avail_out = c),
                (t.next_in = o),
                (t.avail_in = u),
                (n.hold = d),
                (n.bits = h),
                qRn(t, p),
                (l = t.next_out),
                (i = t.output),
                (c = t.avail_out),
                (o = t.next_in),
                (r = t.input),
                (u = t.avail_in),
                (d = n.hold),
                (h = n.bits),
                n.mode === 16191 && (n.back = -1);
              break;
            }
            for (
              n.back = 0;
              (w = ((G = n.lencode[d & ((1 << n.lenbits) - 1)]) >>> 16) & 255),
                (k = 65535 & G),
                !((b = G >>> 24) <= h);

            ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (w && !(240 & w)) {
              for (
                D = b, $ = w, N = k;
                (w =
                  ((G = n.lencode[N + ((d & ((1 << (D + $)) - 1)) >> D)]) >>>
                    16) &
                  255),
                  (k = 65535 & G),
                  !(D + (b = G >>> 24) <= h);

              ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (d >>>= D), (h -= D), (n.back += D);
            }
            if (
              ((d >>>= b), (h -= b), (n.back += b), (n.length = k), w === 0)
            ) {
              n.mode = 16205;
              break;
            }
            if (32 & w) {
              (n.back = -1), (n.mode = 16191);
              break;
            }
            if (64 & w) {
              (t.msg = "invalid literal/length code"), (n.mode = 16209);
              break;
            }
            (n.extra = 15 & w), (n.mode = 16201);
          case 16201:
            if (n.extra) {
              for (X = n.extra; h < X; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.length += d & ((1 << n.extra) - 1)),
                (d >>>= n.extra),
                (h -= n.extra),
                (n.back += n.extra);
            }
            (n.was = n.length), (n.mode = 16202);
          case 16202:
            for (
              ;
              (w =
                ((G = n.distcode[d & ((1 << n.distbits) - 1)]) >>> 16) & 255),
                (k = 65535 & G),
                !((b = G >>> 24) <= h);

            ) {
              if (u === 0) break e;
              u--, (d += r[o++] << h), (h += 8);
            }
            if (!(240 & w)) {
              for (
                D = b, $ = w, N = k;
                (w =
                  ((G = n.distcode[N + ((d & ((1 << (D + $)) - 1)) >> D)]) >>>
                    16) &
                  255),
                  (k = 65535 & G),
                  !(D + (b = G >>> 24) <= h);

              ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (d >>>= D), (h -= D), (n.back += D);
            }
            if (((d >>>= b), (h -= b), (n.back += b), 64 & w)) {
              (t.msg = "invalid distance code"), (n.mode = 16209);
              break;
            }
            (n.offset = k), (n.extra = 15 & w), (n.mode = 16203);
          case 16203:
            if (n.extra) {
              for (X = n.extra; h < X; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              (n.offset += d & ((1 << n.extra) - 1)),
                (d >>>= n.extra),
                (h -= n.extra),
                (n.back += n.extra);
            }
            if (n.offset > n.dmax) {
              (t.msg = "invalid distance too far back"), (n.mode = 16209);
              break;
            }
            n.mode = 16204;
          case 16204:
            if (c === 0) break e;
            if (((g = p - c), n.offset > g)) {
              if ((g = n.offset - g) > n.whave && n.sane) {
                (t.msg = "invalid distance too far back"), (n.mode = 16209);
                break;
              }
              g > n.wnext
                ? ((g -= n.wnext), (y = n.wsize - g))
                : (y = n.wnext - g),
                g > n.length && (g = n.length),
                (v = n.window);
            } else (v = i), (y = l - n.offset), (g = n.length);
            g > c && (g = c), (c -= g), (n.length -= g);
            do i[l++] = v[y++];
            while (--g);
            n.length === 0 && (n.mode = 16200);
            break;
          case 16205:
            if (c === 0) break e;
            (i[l++] = n.length), c--, (n.mode = 16200);
            break;
          case 16206:
            if (n.wrap) {
              for (; h < 32; ) {
                if (u === 0) break e;
                u--, (d |= r[o++] << h), (h += 8);
              }
              if (
                ((p -= c),
                (t.total_out += p),
                (n.total += p),
                4 & n.wrap &&
                  p &&
                  (t.adler = n.check =
                    Ca(n)
                      ? Kc(n.check, i, p, l - p)
                      : T$(n.check, i, p, l - p)),
                (p = c),
                4 & n.wrap && (Ca(n) ? d : G2e(d)) !== n.check)
              ) {
                (t.msg = "incorrect data check"), (n.mode = 16209);
                break;
              }
              (d = 0), (h = 0);
            }
            n.mode = 16207;
          case 16207:
            if (n.wrap && Ca(n)) {
              for (; h < 32; ) {
                if (u === 0) break e;
                u--, (d += r[o++] << h), (h += 8);
              }
              if (4 & n.wrap && d !== (4294967295 & n.total)) {
                (t.msg = "incorrect length check"), (n.mode = 16209);
                break;
              }
              (d = 0), (h = 0);
            }
            n.mode = 16208;
          case 16208:
            I = aAn;
            break e;
          case 16209:
            I = x2e;
            break e;
          case 16210:
            return L2e;
          default:
            return b0;
        }
      return (
        (t.next_out = l),
        (t.avail_out = c),
        (t.next_in = o),
        (t.avail_in = u),
        (n.hold = d),
        (n.bits = h),
        (n.wsize ||
          (p !== t.avail_out &&
            n.mode < 16209 &&
            (n.mode < 16206 || e !== $2e))) &&
          U2e(t, t.output, t.next_out, p - t.avail_out),
        (f -= t.avail_in),
        (p -= t.avail_out),
        (t.total_in += f),
        (t.total_out += p),
        (n.total += p),
        4 & n.wrap &&
          p &&
          (t.adler = n.check =
            Ca(n)
              ? Kc(n.check, i, p, t.next_out - p)
              : T$(n.check, i, p, t.next_out - p)),
        (t.data_type =
          n.bits +
          (n.last ? 64 : 0) +
          (n.mode === 16191 ? 128 : 0) +
          (n.mode === 16199 || n.mode === 16194 ? 256 : 0)),
        ((f === 0 && p === 0) || e === $2e) && I === oS && (I = sAn),
        I
      );
    },
    inflateEnd: function (t) {
      if (vS(t)) return b0;
      var e = t.state;
      return e.window && (e.window = null), (t.state = null), oS;
    },
    inflateGetHeader: function (t, e) {
      if (vS(t)) return b0;
      var n = t.state;
      return 2 & n.wrap ? ((n.head = e), (e.done = !1), oS) : b0;
    },
    inflateSetDictionary: function (t, e) {
      var n,
        r = e.length;
      return vS(t) || ((n = t.state).wrap !== 0 && n.mode !== 16190)
        ? b0
        : n.mode === 16190 && T$(1, e, r, 0) !== n.check
        ? x2e
        : U2e(t, e, r, r)
        ? ((n.mode = 16210), L2e)
        : ((n.havedict = 1), oS);
    },
    inflateInfo: "pako inflate (from Nodeca project)",
  },
  cAn = function () {
    (this.text = 0),
      (this.time = 0),
      (this.xflags = 0),
      (this.os = 0),
      (this.extra = null),
      (this.extra_len = 0),
      (this.name = ""),
      (this.comment = ""),
      (this.hcrc = 0),
      (this.done = !1);
  },
  EVe = Object.prototype.toString,
  dAn = La.Z_NO_FLUSH,
  hAn = La.Z_FINISH,
  A$ = La.Z_OK,
  _W = La.Z_STREAM_END,
  TW = La.Z_NEED_DICT,
  fAn = La.Z_STREAM_ERROR,
  B2e = La.Z_DATA_ERROR,
  pAn = La.Z_MEM_ERROR;
function w$(t) {
  this.options = wB.assign(
    { chunkSize: 65536, windowBits: 15, to: "" },
    t || {}
  );
  var e = this.options;
  e.raw &&
    e.windowBits >= 0 &&
    e.windowBits < 16 &&
    ((e.windowBits = -e.windowBits),
    e.windowBits === 0 && (e.windowBits = -15)),
    !(e.windowBits >= 0 && e.windowBits < 16) ||
      (t && t.windowBits) ||
      (e.windowBits += 32),
    e.windowBits > 15 &&
      e.windowBits < 48 &&
      !(15 & e.windowBits) &&
      (e.windowBits |= 15),
    (this.err = 0),
    (this.msg = ""),
    (this.ended = !1),
    (this.chunks = []),
    (this.strm = new yVe()),
    (this.strm.avail_out = 0);
  var n = k1.inflateInit2(this.strm, e.windowBits);
  if (n !== A$) throw new Error(JS[n]);
  if (
    ((this.header = new cAn()),
    k1.inflateGetHeader(this.strm, this.header),
    e.dictionary &&
      (typeof e.dictionary == "string"
        ? (e.dictionary = zx.string2buf(e.dictionary))
        : EVe.call(e.dictionary) === "[object ArrayBuffer]" &&
          (e.dictionary = new Uint8Array(e.dictionary)),
      e.raw && (n = k1.inflateSetDictionary(this.strm, e.dictionary)) !== A$))
  )
    throw new Error(JS[n]);
}
function EW(t, e) {
  var n = new w$(e);
  if ((n.push(t), n.err)) throw n.msg || JS[n.err];
  return n.result;
}
(w$.prototype.push = function (t, e) {
  var n,
    r,
    i,
    o = this.strm,
    l = this.options.chunkSize,
    u = this.options.dictionary;
  if (this.ended) return !1;
  for (
    r = e === ~~e ? e : e === !0 ? hAn : dAn,
      EVe.call(t) === "[object ArrayBuffer]"
        ? (o.input = new Uint8Array(t))
        : (o.input = t),
      o.next_in = 0,
      o.avail_in = o.input.length;
    ;

  ) {
    for (
      o.avail_out === 0 &&
        ((o.output = new Uint8Array(l)), (o.next_out = 0), (o.avail_out = l)),
        (n = k1.inflate(o, r)) === TW &&
          u &&
          ((n = k1.inflateSetDictionary(o, u)) === A$
            ? (n = k1.inflate(o, r))
            : n === B2e && (n = TW));
      o.avail_in > 0 && n === _W && o.state.wrap > 0 && t[o.next_in] !== 0;

    )
      k1.inflateReset(o), (n = k1.inflate(o, r));
    switch (n) {
      case fAn:
      case B2e:
      case TW:
      case pAn:
        return this.onEnd(n), (this.ended = !0), !1;
    }
    if (((i = o.avail_out), o.next_out && (o.avail_out === 0 || n === _W)))
      if (this.options.to === "string") {
        var c = zx.utf8border(o.output, o.next_out),
          d = o.next_out - c,
          h = zx.buf2string(o.output, c);
        (o.next_out = d),
          (o.avail_out = l - d),
          d && o.output.set(o.output.subarray(c, c + d), 0),
          this.onData(h);
      } else
        this.onData(
          o.output.length === o.next_out
            ? o.output
            : o.output.subarray(0, o.next_out)
        );
    if (n !== A$ || i !== 0) {
      if (n === _W)
        return (
          (n = k1.inflateEnd(this.strm)), this.onEnd(n), (this.ended = !0), !0
        );
      if (o.avail_in === 0) break;
    }
  }
  return !0;
}),
  (w$.prototype.onData = function (t) {
    this.chunks.push(t);
  }),
  (w$.prototype.onEnd = function (t) {
    t === A$ &&
      (this.options.to === "string"
        ? (this.result = this.chunks.join(""))
        : (this.result = wB.flattenChunks(this.chunks))),
      (this.chunks = []),
      (this.err = t),
      (this.msg = this.strm.msg);
  });
var k$,
  K3 = {
    Inflate: w$,
    inflate: EW,
    inflateRaw: function (t, e) {
      return ((e = e || {}).raw = !0), EW(t, e);
    },
    ungzip: EW,
    constants: La,
  },
  gAn = {
    Deflate: j3.Deflate,
    deflate: j3.deflate,
    deflateRaw: j3.deflateRaw,
    gzip: j3.gzip,
    Inflate: K3.Inflate,
    inflate: K3.inflate,
    inflateRaw: K3.inflateRaw,
    ungzip: K3.ungzip,
    constants: La,
  },
  mAn = function () {
    return !(!window.navigator || !window.navigator.sendBeacon);
  },
  yAn = (function () {
    function t(e, n) {
      var r = this;
      (this.collector = e),
        (this.config = n),
        (this.requestType = n.request_type || "xhr"),
        (this.supportBeacon = mAn()),
        (this.errorCode = {
          NO_URL: 4001,
          IMG_ON: 4e3,
          IMG_CATCH: 4002,
          BEACON_FALSE: 4003,
          XHR_ON: 500,
          RESPONSE: 5001,
          TIMEOUT: 5005,
        }),
        (this.customHeader = n.custom_request_header || {}),
        this.collector.on("custom-request-header", function (i) {
          r.setRequestHeader(i);
        });
    }
    return (
      (t.prototype.setRequestHeader = function (e) {
        this.customHeader = Ci(this.customHeader, e);
      }),
      (t.prototype.useFetch = function (e) {
        var n = e.url,
          r = e.data,
          i = e.method,
          o = e.success,
          l = e.fail,
          u = { "Content-Type": "application/json; charset=utf-8" };
        if (Dn(this.customHeader).length)
          for (var c in this.customHeader) u[c] = this.customHeader[c];
        window.fetch
          ? fetch(n, { method: i || "POST", headers: u, body: lr(r) })
              .then(function (d) {
                return d.json();
              })
              .then(function (d) {
                o && o(d);
              })
              .catch(function (d) {
                l && l(r, d);
              })
          : ((this.requestType = "xhr"),
            console.log("your brwoser not support fetch, use xhr"),
            this.useRequest({
              url: n,
              data: r,
              method: i,
              success: o,
              fail: l,
            }));
      }),
      (t.prototype.useBeacon = function (e) {
        var n = e.url,
          r = e.data,
          i = e.success,
          o = e.fail;
        window.navigator.sendBeacon(n, lr(r))
          ? i && i()
          : o && o(r, this.errorCode.BEACON_FALSE);
      }),
      (t.prototype.useRequest = function (e) {
        var n = this,
          r = e.url,
          i = e.data,
          o = e.method,
          l = e.success,
          u = e.fail,
          c = e.timeout,
          d = e.useBeacon,
          h = e.withCredentials,
          f = e.app_key,
          p = e.forceXhr,
          g = e.zip;
        if (d && this.supportBeacon)
          this.useBeacon({ url: r, data: i, method: o, success: l, fail: u });
        else if (this.requestType !== "fetch" || p)
          try {
            var y = new XMLHttpRequest(),
              v = o || "POST";
            if (
              (y.open(v, "" + r, !0),
              y.setRequestHeader(
                "Content-Type",
                "application/json; charset=utf-8"
              ),
              f && y.setRequestHeader("X-MCS-AppKey", "" + f),
              Dn(this.customHeader).length)
            )
              for (var b in this.customHeader)
                y.setRequestHeader(b, this.customHeader[b]);
            h && (y.withCredentials = !0),
              c &&
                ((y.timeout = c),
                (y.ontimeout = function () {
                  u && u(i, n.errorCode.TIMEOUT);
                })),
              (y.onload = function () {
                if (l) {
                  var $ = null;
                  if (y.responseText) {
                    try {
                      $ = JSON.parse(y.responseText);
                    } catch {
                      $ = {};
                    }
                    l($, i);
                  }
                }
              }),
              (y.onerror = function () {
                y.abort(), u && u(i, n.errorCode.XHR_ON);
              });
            try {
              var w = lr(i);
              if (this.config.need_zip && g) {
                var k = new TextEncoder().encode(w),
                  D = gAn.gzip(k);
                y.setRequestHeader("Content-Encoding", "gzip"), y.send(D);
              } else y.send(w);
            } catch ($) {
              this.collector.emit("sdk-inner-error", {
                type: "sdk_error_send",
                eventData: i,
                errorCode: 1e3,
                msg: $.message || $.stack || "sdk_error_send",
              });
            }
          } catch ($) {
            this.collector.emit("sdk-inner-error", {
              type: "sdk_error_request",
              eventData: i,
              errorCode: 1001,
              msg: $.message || $.stack || "sdk_error_request",
            });
          }
        else this.useFetch({ url: r, data: i, method: o, success: l, fail: u });
      }),
      t
    );
  })(),
  vAn = (function () {
    function t(e, n) {
      if (
        ((this.devToolReady = !1),
        (this.devToolOrigin = "*"),
        (this.sendAlready = !1),
        !n.disable_debug &&
          e.configManager.get("browser") !== "Microsoft Internet Explorer")
      ) {
        (this.collect = e), (this.config = n), (this.app_id = n.app_id);
        var r = e.adapters.storage;
        (this.cacheStorgae = new r(!1)),
          (this.loadUrl =
            n.devtool_url ||
            "https://lf-static.applogcdn.com/obj/applog-sdk-static/log-sdk/collect/devtool/debug-web.v2.0.0.js"),
          (this.filterEvent = new XS([
            "__bav_page",
            "__bav_beat",
            "__bav_page_statistics",
            "__bav_click",
            "__bav_page_exposure",
            "bav2b_page",
            "bav2b_beat",
            "bav2b_page_statistics",
            "bav2b_click",
            "bav2b_page_exposure",
            "_be_active",
            "predefine_pageview",
            "__profile_set",
            "__profile_set_once",
            "__profile_increment",
            "__profile_unset",
            "__profile_append",
            "predefine_page_alive",
            "predefine_page_close",
            "abtest_exposure",
          ])),
          this.load();
      }
    }
    return (
      (t.prototype.loadScript = function (e) {
        try {
          var n = document.createElement("script");
          (n.src = e),
            (n.onerror = function () {
              console.log("load DevTool render fail");
            }),
            (n.onload = function () {
              console.log("load DevTool render success");
            }),
            document.getElementsByTagName("body")[0].appendChild(n);
        } catch (r) {
          console.log("devTool load fail, " + r.message);
        }
      }),
      (t.prototype.parseUrl = function () {
        var e = {};
        try {
          var n = window.location.href.split("?")[1].split("&");
          n.length &&
            n.forEach(function (r) {
              var i = r.split("=");
              e[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);
            });
        } catch {}
        return e;
      }),
      (t.prototype.load = function () {
        try {
          var e = this.parseUrl();
          if (e.open_devtool_web && e.app_id) {
            if (_i(e.app_id) !== this.app_id) return;
          } else if (!this.getStorage()) return;
          this.loadBaseInfo(),
            this.loadHook(),
            this.setStorage(),
            this.addLintener(),
            this.loadDebuggerModule(),
            this.loadDevTool();
        } catch (n) {
          console.log("debug fail, " + n.message);
        }
      }),
      (t.prototype.getStorage = function () {
        var e = this.cacheStorgae.getItem("__applog_open_devtool_web");
        return e && _i(e) === this.app_id;
      }),
      (t.prototype.setStorage = function () {
        this.cacheStorgae.setItem("__applog_open_devtool_web", this.app_id);
      }),
      (t.prototype.loadDevTool = function () {
        this.loadScript(this.loadUrl);
      }),
      (t.prototype.loadBaseInfo = function () {
        if (
          ((this.log = []),
          (this.event = []),
          (this.info = [
            {
              title: "基本信息",
              key: "base",
              type: 1,
              content: [
                { name: "app_id", desc: "APP_ID", value: this.config.app_id },
                {
                  name: "channel",
                  desc: "CHANNEL",
                  value: this.config.channel,
                },
                {
                  name: "domain",
                  desc: "上报域名",
                  value: this.collect.configManager.getDomain(),
                },
                { name: "sdk_version", desc: "SDK版本", value: tv },
                { name: "sdk_type", desc: "SDK引入方式", value: "npm" },
              ],
            },
            {
              title: "用户信息",
              key: "user",
              type: 2,
              content: [
                {
                  name: "uuid",
                  desc: "UUID",
                  value:
                    this.collect.configManager.get("user").user_unique_id || "",
                },
                {
                  name: "web_id",
                  desc: "WEB_ID",
                  value: this.collect.configManager.get("user").web_id || "",
                },
              ],
            },
            {
              title: "公共参数信息",
              type: 2,
              key: "common",
              content: [
                {
                  name: "browser",
                  desc: "浏览器",
                  value: this.collect.configManager.get("browser"),
                },
                {
                  name: "browser_version",
                  desc: "浏览器版本",
                  value: this.collect.configManager.get("browser_version"),
                },
                {
                  name: "platform",
                  desc: "平台",
                  value: this.collect.configManager.get("platform"),
                },
                {
                  name: "device_model",
                  desc: "设备型号",
                  value: this.collect.configManager.get("device_model"),
                },
                {
                  name: "os_name",
                  desc: "操作系统",
                  value: this.collect.configManager.get("os_name"),
                },
                {
                  name: "os_version",
                  desc: "操作系统版本",
                  value: this.collect.configManager.get("os_version"),
                },
                {
                  name: "resolution",
                  desc: "屏幕分辨率",
                  value: this.collect.configManager.get("resolution"),
                },
                {
                  name: "referrer",
                  desc: "来源",
                  value: this.collect.configManager.get("referrer"),
                },
                {
                  name: "custom",
                  desc: "自定义信息",
                  value: lr(this.collect.configManager.get("custom")),
                },
              ],
            },
            {
              title: "配置信息",
              key: "config",
              type: 3,
              content: [
                {
                  name: "autotrack",
                  desc: "全埋点",
                  value: !!this.config.autotrack,
                },
                {
                  name: "stay",
                  desc: "停留时长",
                  value: !!this.config.enable_stay_duration,
                },
              ],
            },
            {
              title: "A/B配置信息",
              key: "ab",
              type: 4,
              content: [
                {
                  name: "ab",
                  desc: "A/B实验",
                  value: !!this.config.enable_ab_test,
                },
              ],
            },
          ]),
          this.config.enable_ab_test)
        ) {
          var e = this.getInfo("ab"),
            n = [
              {
                name: "ab",
                desc: "A/B实验",
                value: !!this.config.enable_ab_test,
              },
              {
                name: "vid",
                desc: "已曝光VID",
                value: this.collect.configManager.getAbVersion(),
              },
              {
                name: "ab_domain",
                desc: "A/B域名",
                value:
                  this.config.ab_channel_domain || th(oVe[this.config.channel]),
              },
              {
                name: "all_values",
                desc: "全部配置",
                value: this.collect.configManager.getAbCache(),
              },
            ];
          (e.content = n), this.setInfo("ab", e);
        }
        if (this.config.enable_native || this.config.Native) {
          var r = {
            title: "客户端信息",
            type: 3,
            content: [
              {
                name: "native",
                desc: "是否打通",
                value: !!this.collect.bridgeReport,
              },
            ],
          };
          this.setInfo("native", r);
        }
        if ($a(tv).call(tv, "tob")) {
          var i,
            o = this.getInfo("user");
          o.content.push({
            name: "sid",
            desc: cm((i = "DISS".split("")))
              .call(i)
              .join(""),
            value: "点击获取",
          }),
            this.setInfo("user", o);
        }
      }),
      (t.prototype.getInfo = function (e) {
        var n = null;
        return (
          this.info.forEach(function (r) {
            r.key === e && (n = r);
          }),
          n
        );
      }),
      (t.prototype.setInfo = function (e, n) {
        var r = !1;
        this.info.forEach(function (i) {
          i.key === e && ((r = !0), (i = n));
        }),
          r || this.info.push(n);
      }),
      (t.prototype.getSecondInfo = function (e, n) {
        var r = this.getInfo(e),
          i = null;
        return (
          r.content.forEach(function (o) {
            o.name === n && (i = o);
          }),
          i
        );
      }),
      (t.prototype.setSecondInfo = function (e, n, r) {
        var i = this.getInfo(e),
          o = !1;
        if (
          (i.content.forEach(function (u) {
            u.name === n && ((u.value = r), (o = !0));
          }),
          !o)
        ) {
          var l = { name: n, value: r, desc: n.toLocaleUpperCase() };
          i.content.push(l);
        }
        this.setInfo(e, i);
      }),
      (t.prototype.loadHook = function () {
        var e = this;
        this.collect.on(Un.DEBUGGER_MESSAGE, function (n) {
          switch (n.type) {
            case Un.DEBUGGER_MESSAGE_SDK:
              var r = {
                time: n.time,
                type: n.logType || "sdk",
                infoType: n.infoType || "sdk",
                level: n.level,
                name: n.info,
                show: !0,
                levelShow: !0,
                needDesc: !!n.data,
              };
              if (
                (n.data && (r.desc = { content: lr(n.data) }),
                e.updateLog(r),
                n.secType && n.secType === "AB")
              )
                e.setSecondInfo(
                  "ab",
                  "vid",
                  e.collect.configManager.getAbVersion()
                ),
                  e.setSecondInfo(
                    "ab",
                    "all_values",
                    e.collect.configManager.getAbCache()
                  );
              else if (n.secType === "USER")
                e.setSecondInfo(
                  "user",
                  n.common === "user_unique_id" ? "uuid" : n.common,
                  e.collect.configManager.get(n.common)
                );
              else if (n.secType === "HEADER") {
                var i = e.collect.configManager.get(n.common);
                e.setSecondInfo(
                  "common",
                  n.common,
                  n.common === "custom" ? lr(i) : i
                );
              }
              return void e.updateInfo();
            case Un.DEBUGGER_MESSAGE_EVENT:
              if (n.data && n.data.length) {
                var o = n.data[0],
                  l = o.events;
                if (!l.length) return;
                l.forEach(function (u) {
                  (u.checkShow = !0),
                    (u.searchShow = !0),
                    (u.focusShow = !0),
                    (u.status = n.status),
                    (u.type = e.filterEvent.has(u.event) ? "sdk" : "cus"),
                    (u.verifyType = n.verifyType ? "verify" : "no"),
                    (u.info = ""),
                    n.status === "fail" &&
                      (u.info = {
                        message:
                          "code: " +
                          n.code +
                          "， msg: " +
                          (n.msg || n.failType),
                      });
                }),
                  e.updateEvent(o);
              }
              return;
          }
        });
      }),
      (t.prototype.addLintener = function () {
        var e = this;
        window.addEventListener("message", function (n) {
          if (n && n.data && n.data.type === "devtool:web:ready") {
            if (
              ((e.devToolOrigin = n.origin),
              (e.devToolReady = !0),
              e.sendAlready)
            )
              return;
            e.sendData("devtool:web:init", {
              info: e.info,
              log: e.log,
              event: e.event,
              sdk_type: $a(tv).call(tv, "tob") ? "tob" : "inner",
              appId: e.app_id,
            }),
              (e.sendAlready = !0);
          }
          n &&
            n.data &&
            n.data.type === "devtool:web:ssid" &&
            e.collect.getToken(function (r) {
              e.setSecondInfo("user", "sid", r.tobid), e.updateInfo();
            });
        });
      }),
      (t.prototype.sendData = function (e, n) {
        try {
          var r = { type: e, payload: n };
          window && window.postMessage(r, this.devToolOrigin);
        } catch {}
      }),
      (t.prototype.updateInfo = function () {
        this.devToolReady && this.sendData("devtool:web:info", this.info);
      }),
      (t.prototype.updateLog = function (e) {
        this.devToolReady
          ? this.sendData("devtool:web:log", e)
          : this.log.push(e);
      }),
      (t.prototype.updateEvent = function (e) {
        this.devToolReady
          ? this.sendData("devtool:web:event", e)
          : this.event.push(e);
      }),
      (t.prototype.loadDebuggerModule = function () {
        var e =
            `#debugger-applog-web {
      position: fixed;
      width: 45px;
      height: 45px;
      background-image: url(` +
            th(
              "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z1az1bz1lz49z22z1mz21z4az19z27z22z1cz21z1az1kz4az1az1mz1kz4bz1mz19z1hz4bz21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz1bz1cz24z22z1mz1mz1jz4bz18z1nz1nz1jz1mz1ez4az1nz1lz1e"
            ) +
            `);
      bottom: 5%;
      right: 10%;
      cursor: pointer;
      z-index:100;
      background-size: 45px;
    }`,
          n = document.head || document.getElementsByTagName("head")[0],
          r = document.createElement("style");
        r.appendChild(document.createTextNode(e)), n.appendChild(r);
        var i = document.createElement("div");
        i.innerHTML =
          '<div id="debugger-applog-web" class="debugger-applog-web"></div>';
        var o = document.createElement("div");
        (o.innerHTML =
          '<div id="debugger-container" class="debugger-container"></div>'),
          document.getElementsByTagName("body")[0].appendChild(i),
          document.getElementsByTagName("body")[0].appendChild(o);
        var l = document.getElementById("debugger-applog-web");
        l &&
          l.addEventListener("click", function () {
            window &&
              window.postMessage(
                { type: "devtool:web:open-draw" },
                location.origin
              );
          });
      }),
      t
    );
  })(),
  SW = {
    autotrack: {
      src: {
        cn: th(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z23z22z1mz22z20z18z1az1iz4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/autotrack.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/autotrack.js",
      },
      object: "LogAutoTrack",
    },
    ab: {
      src: {
        cn: th(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz18z19z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/ab.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/ab.js",
      },
      object: "LogAb",
    },
    stay: {
      src: {
        cn: th(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz21z22z18z27z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/stay.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/stay.js",
      },
      object: "LogStay",
    },
    route: {
      src: {
        cn: th(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1mz23z22z1cz4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/route.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/route.js",
      },
      object: "LogRoute",
    },
    tracer: {
      src: {
        cn: th(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz22z20z18z1az1cz20z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/tracer.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/tracer.js",
      },
      object: "LogTracer",
    },
    retry: {
      src: {
        cn: th(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz20z1cz22z20z27z4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/retry.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/retry.js",
      },
      object: "LogRetry",
    },
    visual: {
      src: {
        cn: th(
          "1fz22z22z1nz21z4mz4bz4bz1jz1dz49z21z22z18z22z1gz1az4az18z1nz1nz1jz1mz1ez1az1bz1lz4az1az1mz1kz4bz1mz19z1hz4bz18z1nz1nz1jz1mz1ez49z21z1bz1iz49z21z22z18z22z1gz1az4bz1jz1mz1ez49z21z1bz1iz4bz1az1mz1jz1jz1cz1az22z4bz4hz4bz1nz1jz23z1ez1gz1lz4bz24z1gz21z23z18z1jz4az1hz21"
        ),
        sg: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-sg/log-sdk/collect/5/plugin/visual.js",
        va: "https://lf-global-static.iapplogcdn.com/obj/applog-sdk-static-us/log-sdk/collect/5/plugin/visual.js",
      },
      object: "LogVisual",
    },
  },
  H2e = [
    "ab",
    "autotrack",
    "Stay",
    "store",
    "et",
    "profile",
    "cep",
    "heartbeat",
    "monitor",
    "route",
    "tracer",
  ],
  bp = (function () {
    function t(e) {
      (this.disableAutoPageView = !1),
        (this.bridgeReport = !1),
        (this.staging = !1),
        (this.pluginInstances = []),
        (this.sended = !1),
        (this.started = !1),
        (this.destroy = !1),
        (this.sdkReady = !1),
        (this.adapters = {}),
        (this.loadType = "base"),
        (this.sdkStop = !1),
        (this.name = e),
        (this.hook = new aRn()),
        (this.remotePlugin = new Lf()),
        (this.Types = ai),
        (this.adapters.storage = Q1),
        (this.loadType = "full");
    }
    return (
      (t.usePlugin = function (e, n, r) {
        if (n) {
          for (var i = !1, o = 0, l = t.plugins.length; o < l; o++)
            if (t.plugins[o].name === n) {
              (t.plugins[o].plugin = e),
                (t.plugins[o].options = r || {}),
                (i = !0);
              break;
            }
          i || t.plugins.push({ name: n, plugin: e, options: r });
        } else t.plugins.push({ plugin: e });
      }),
      (t.prototype.usePlugin = function (e, n, r) {
        e &&
          (this.loadType === "full" && $a(H2e).call(H2e, e)
            ? console.info("your sdk version has " + e + " plugin already ~")
            : n
            ? typeof n == "string"
              ? this.remotePlugin.get(e) ||
                this.remotePlugin.set(e, { src: n, call: r })
              : this.remotePlugin.get(e) ||
                this.remotePlugin.set(e, { instance: n })
            : this.remotePlugin.get(e) || this.remotePlugin.set(e, "sdk"));
      }),
      (t.prototype.init = function (e) {
        var n,
          r,
          i = this;
        (this.logger = new vRn(this.name, e.log)),
          this.inited
            ? this.logger.warn(
                "[instance: " +
                  this.name +
                  "], every instance's api: init,  can be call only one time!"
              )
            : e && Bx(e)
            ? e.app_id && typeof (r = e.app_id) == "number" && !isNaN(r)
              ? e.app_key && typeof e.app_key != "string"
                ? this.logger.warn(
                    "app_key param is error, must be string, please check!"
                  )
                : (e.channel_domain ||
                    qt((n = ["cn", "sg", "va", "my"])).call(n, e.channel) !==
                      -1 ||
                    (this.logger.warn(
                      "channel must be `cn`, `sg`,`va`, `my` !"
                    ),
                    (e.channel = "cn")),
                  (this.spider = new bRn()),
                  this.spider.checkSpider(e)
                    ? this.logger.warn(
                        "your env may be a spider, can not report!"
                      )
                    : ((this.appBridge = new _Rn(this, e.enable_native)),
                      (this.requestManager = new yAn(this, e)),
                      (this.bridgeReport = this.appBridge.bridgeInject()),
                      (this.configManager = new yRn(this, e)),
                      (this.debugger = new vAn(this, e)),
                      (this.initConfig = e),
                      this.emit(ai.Init),
                      this.emit(Un.DEBUGGER_MESSAGE, {
                        type: Un.DEBUGGER_MESSAGE_SDK,
                        info: "SDK 执行Init",
                        data: e,
                        level: "info",
                        time: Date.now(),
                        infoType: "cus",
                      }),
                      (this.destroy = !1),
                      e.disable_auto_pv && (this.disableAutoPageView = !0),
                      this.bridgeReport ||
                        (this.configManager.set({ app_id: e.app_id }),
                        (this.eventManager = new ERn()),
                        (this.tokenManager = new SRn()),
                        (this.sessionManager = new TRn()),
                        Ar.all([
                          new Ar(function (o) {
                            i.once(ai.TokenComplete, function () {
                              o(!0);
                            });
                          }),
                          new Ar(function (o) {
                            i.once(ai.Start, function () {
                              o(!0);
                            });
                          }),
                        ]).then(function () {
                          try {
                            var o;
                            ga((o = t.plugins)).call(
                              o,
                              function (l, u) {
                                var c = u.plugin,
                                  d = u.options,
                                  h = Ci(i.initConfig, d),
                                  f = new c();
                                return (
                                  f.apply(i, h),
                                  l.push(f),
                                  i.emit(Un.DEBUGGER_MESSAGE, {
                                    type: Un.DEBUGGER_MESSAGE_SDK,
                                    info: "SDK加载" + u.name + "插件",
                                    level: "info",
                                    time: Date.now(),
                                    infoType: "sdk",
                                  }),
                                  l
                                );
                              },
                              i.pluginInstances
                            );
                          } catch (l) {
                            console.warn("load plugin error, " + l.message),
                              i.emit(Un.DEBUGGER_MESSAGE, {
                                type: Un.DEBUGGER_MESSAGE_SDK,
                                info: "SDK加载插件发生了异常",
                                level: "error",
                                time: Date.now(),
                                data: l.message,
                                infoType: "sdk",
                              });
                          }
                          (i.sdkReady = !0),
                            i.emit(ai.Ready),
                            i.emit(Un.DEBUGGER_MESSAGE, {
                              type: Un.DEBUGGER_MESSAGE_SDK,
                              info: "SDK 用户信息初始化完成",
                              time: Date.now(),
                              secType: "USER",
                              level: "info",
                              data: i.configManager.get("user"),
                              infoType: "sdk",
                            }),
                            i.emit(Un.DEBUGGER_MESSAGE, {
                              type: Un.DEBUGGER_MESSAGE_SDK,
                              info: "SDK 初始化完成",
                              time: Date.now(),
                              level: "info",
                              data: i.configManager.get("user"),
                              infoType: "sdk",
                            }),
                            i.logger.info(
                              "appid: " +
                                e.app_id +
                                ", userInfo:" +
                                lr(i.configManager.get("user"))
                            ),
                            i.logger.info(
                              "appid: " +
                                e.app_id +
                                ", sdk is ready, version type is " +
                                i.loadType +
                                ", version is " +
                                tv +
                                ", you can report now !!!"
                            ),
                            e.disable_auto_pv && (i.disableAutoPageView = !0);
                          try {
                            i.loadType === "full" &&
                              (e.enable_ab_test || e.autotrack) &&
                              (window.opener || window.parent).postMessage(
                                "[tea-sdk]ready",
                                "*"
                              );
                          } catch (l) {
                            i.emit(Un.DEBUGGER_MESSAGE, {
                              type: Un.DEBUGGER_MESSAGE_SDK,
                              info: "SDK发生了异常",
                              level: "error",
                              time: Date.now(),
                              data: l.message,
                              infoType: "sdk",
                            });
                          }
                          i.pageView(),
                            i.on(ai.TokenChange, function (l) {
                              l === "webid" && i.pageView(),
                                i.logger.info(
                                  "appid: " +
                                    e.app_id +
                                    " token change, new userInfo:" +
                                    lr(i.configManager.get("user"))
                                ),
                                i.emit(Un.DEBUGGER_MESSAGE, {
                                  type: Un.DEBUGGER_MESSAGE_SDK,
                                  info: "SDK 设置了用户信息",
                                  time: Date.now(),
                                  secType: "USER",
                                  level: "info",
                                  data: i.configManager.get("user"),
                                  infoType: "sdk",
                                });
                            }),
                            i.on(ai.TokenReset, function () {
                              i.logger.info(
                                "appid: " +
                                  e.app_id +
                                  " token reset, new userInfo:" +
                                  lr(i.configManager.get("user"))
                              ),
                                i.emit(Un.DEBUGGER_MESSAGE, {
                                  type: Un.DEBUGGER_MESSAGE_SDK,
                                  info: "SDK 重置了用户信息",
                                  time: Date.now(),
                                  secType: "USER",
                                  level: "info",
                                  data: i.configManager.get("user"),
                                  infoType: "sdk",
                                });
                            }),
                            i.on(ai.RouteChange, function (l) {
                              l.init || e.disable_route_report || i.pageView();
                            });
                        }),
                        this.tokenManager.apply(this, e),
                        this.eventManager.apply(this, e),
                        this.sessionManager.apply(this, e)),
                      (this.inited = !0)))
              : this.logger.warn(
                  "app_id param is error, must be number, please check!"
                )
            : this.logger.warn("init params error,please check!");
      }),
      (t.prototype.config = function (e) {
        if (!this.inited)
          return (
            console.warn("config must be use after function init"),
            void this.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK执行Config发生了异常",
              level: "error",
              time: Date.now(),
              data: "config must be use after function init",
              infoType: "sdk",
            })
          );
        if (!e || !Bx(e))
          return (
            console.warn("config params is error, please check"),
            void this.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK执行Config发生了异常",
              level: "error",
              time: Date.now(),
              data: "config params is error, please check",
              infoType: "sdk",
            })
          );
        if (this.bridgeReport) this.appBridge.setConfig(e);
        else {
          e._staging_flag && e._staging_flag === 1 && (this.staging = !0),
            e.disable_auto_pv &&
              ((this.disableAutoPageView = !0), delete e.disable_auto_pv);
          var n = as({}, e),
            r =
              this.initConfig.configPersist ||
              this.initConfig.config_persist ||
              !1;
          if (this.initConfig && r) {
            var i = this.configManager.getStore();
            i && (n = Ci(i, e)), this.configManager.setStore(e);
          }
          n.web_id, n.user_unique_id;
          var o = (function (l, u) {
            var c = {};
            for (var d in l)
              Object.prototype.hasOwnProperty.call(l, d) &&
                qt(u).call(u, d) < 0 &&
                (c[d] = l[d]);
            if (l != null && typeof Mc == "function") {
              var h = 0;
              for (d = Mc(l); h < d.length; h++)
                qt(u).call(u, d[h]) < 0 && (c[d[h]] = l[d[h]]);
            }
            return c;
          })(n, ["web_id", "user_unique_id"]);
          this.configManager.set(o),
            n.hasOwnProperty("web_id") && this.emit(ai.ConfigWebId, n.web_id),
            n.hasOwnProperty("user_unique_id") &&
              this.emit(ai.ConfigUuid, n.user_unique_id),
            this.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行Config",
              level: "info",
              time: Date.now(),
              data: n,
              infoType: "cus",
            });
        }
      }),
      (t.prototype.setUserUniqueID = function (e) {
        this.config({ user_unique_id: e });
      }),
      (t.prototype.setHeaderInfo = function (e, n) {
        var r = {};
        (r[e] = n), this.config(r);
      }),
      (t.prototype.removeHeaderInfo = function (e) {
        var n = {};
        (n[e] = void 0), this.config(n);
      }),
      (t.prototype.setDomain = function (e) {
        this.configManager && this.configManager.setDomain(e),
          this.emit(ai.ConfigDomain);
      }),
      (t.prototype.getConfig = function (e) {
        var n;
        return (n = this.configManager) === null || n === void 0
          ? void 0
          : n.get(e);
      }),
      (t.prototype.send = function () {
        this.start();
      }),
      (t.prototype.start = function () {
        this.inited &&
          !this.sended &&
          ((this.sended = !0),
          (this.started = !0),
          this.emit(ai.Start),
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行Start",
            level: "info",
            time: Date.now(),
            infoType: "cus",
          }),
          this.bridgeReport && (this.pageView(), this.emit(ai.Ready)));
      }),
      (t.prototype.event = function (e, n) {
        var r = this;
        try {
          var i = [];
          if (Array.isArray(e))
            e.forEach(function (l) {
              var u = r.processEvent(l[0], l[1] || {});
              u && i.push(u);
            });
          else {
            var o = this.processEvent(e, n);
            if (!o) return;
            i.push(o);
          }
          this.bridgeReport
            ? i.forEach(function (l) {
                var u = l.event,
                  c = l.params;
                r.appBridge.onEventV3(u, lr(c));
              })
            : i.length &&
              (this.emit(ai.Event, i), this.emit(ai.SessionResetTime)),
            this.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行Event",
              level: "info",
              time: Date.now(),
              data: e,
              infoType: "cus",
            });
        } catch (l) {
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行Event发生了异常",
            level: "error",
            time: Date.now(),
            data: l.message,
            infoType: "sdk",
          });
        }
      }),
      (t.prototype.beconEvent = function (e, n) {
        if (Array.isArray(e))
          console.warn("beconEvent not support batch report, please check");
        else {
          var r = [],
            i = this.processEvent(e, n || {});
          i &&
            (r.push(i),
            r.length &&
              (this.emit(ai.BeconEvent, r), this.emit(ai.SessionResetTime)),
            this.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK 执行Beacon Event",
              level: "info",
              time: Date.now(),
              data: e,
              infoType: "sdk",
            }));
        }
      }),
      (t.prototype.beaconEvent = function (e, n) {
        this.beconEvent(e, n);
      }),
      (t.prototype.processEvent = function (e, n) {
        n === void 0 && (n = {});
        try {
          if (!e) return console.warn("eventName is null， please check"), null;
          var r = e;
          /^event\./.test(e) && (r = jn(e).call(e, 6));
          var i = n;
          ti(i) != "object" && (i = {}),
            i.profile ? delete i.profile : (i.event_index = oRn());
          var o = void 0;
          return (
            i.local_ms
              ? ((o = i.local_ms), delete i.local_ms)
              : (o = +new Date()),
            {
              event: r,
              params: i,
              local_time_ms: o,
              is_bav: this.initConfig && this.initConfig.autotrack ? 1 : 0,
            }
          );
        } catch (l) {
          return (
            this.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "SDK发生了异常",
              level: "error",
              time: Date.now(),
              data: l.message,
              infoType: "sdk",
            }),
            { event: e, params: n }
          );
        }
      }),
      (t.prototype.filterEvent = function (e) {
        this.eventFilter = e;
      }),
      (t.prototype.on = function (e, n) {
        this.hook.on(e, n);
      }),
      (t.prototype.once = function (e, n) {
        this.hook.once(e, n);
      }),
      (t.prototype.off = function (e, n) {
        this.hook.off(e, n);
      }),
      (t.prototype.emit = function (e, n, r) {
        this.hook.emit(e, n, r);
      }),
      (t.prototype.set = function (e) {
        this.hook.set(e);
      }),
      (t.prototype.stop = function () {
        this.sdkStop = !0;
      }),
      (t.prototype.reStart = function () {
        this.sdkStop = !1;
      }),
      (t.prototype.pageView = function () {
        this.disableAutoPageView || this.predefinePageView();
      }),
      (t.prototype.predefinePageView = function (e) {
        if ((e === void 0 && (e = {}), this.inited)) {
          var n = {
              title: document.title || location.pathname,
              url: location.href,
              url_path: this.handlePath(),
              time: Date.now(),
              referrer: window.document.referrer,
              $is_first_time:
                "" +
                ((this.configManager && this.configManager.is_first_time) ||
                  !1),
            },
            r = as(as({}, n), e);
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 上报PV",
            level: "info",
            time: Date.now(),
            infoType: "sdk",
          }),
            this.event("predefine_pageview", r);
        } else
          console.warn("predefinePageView must be use after function init");
      }),
      (t.prototype.handlePath = function () {
        var e = location.pathname;
        try {
          if (this.initConfig.allow_hash) {
            var n = new Bs(location.href).hash.match(/#\/([^?#]+)/i);
            return n && n.length ? n[1] : location.pathname;
          }
        } catch {
          e = location.pathname;
        }
        return e;
      }),
      (t.prototype.clearEventCache = function () {
        this.emit(ai.CleanEvents);
      }),
      (t.prototype.setWebIDviaUnionID = function (e) {
        if (e) {
          var n = m2e(e);
          this.config({ web_id: "" + n, wechat_unionid: e }),
            this.emit(ai.CustomWebId);
        }
      }),
      (t.prototype.setWebId = function (e) {
        this.config({ web_id: "" + e });
      }),
      (t.prototype.setWebIDviaOpenID = function (e) {
        if (e) {
          var n = m2e(e);
          this.config({ web_id: "" + n, wechat_openid: e }),
            this.emit(ai.CustomWebId);
        }
      }),
      (t.prototype.setNativeAppId = function (e) {
        this.bridgeReport && this.appBridge.setNativeAppId(e);
      }),
      (t.prototype.setRequestHeaders = function (e) {
        this.emit(ai.CustomHeader, e);
      }),
      (t.prototype.getSessionId = function () {
        return Ek();
      }),
      (t.prototype.setSessionId = function (e) {
        this.emit(ai.SessionReset, e);
      }),
      (t.prototype.resetStayDuration = function (e, n, r) {
        this.emit(ai.ResetStay, { url_path: e, title: n, url: r }, ai.Stay);
      }),
      (t.prototype.resetStayParams = function (e, n, r) {
        e === void 0 && (e = ""),
          n === void 0 && (n = ""),
          r === void 0 && (r = ""),
          this.emit(ai.SetStay, { url_path: e, title: n, url: r }, ai.Stay);
      }),
      (t.prototype.getToken = function (e, n) {
        var r = this;
        if (this.inited) {
          var i = !1,
            o = function (u) {
              if (!i) {
                var c;
                i = !0;
                var d = r.configManager.get().user;
                return (
                  u &&
                    ((d.tobid = u),
                    (d[
                      cm((c = "diss".split("")))
                        .call(c)
                        .join("")
                    ] = u)),
                  e(as({}, d))
                );
              }
            },
            l = function () {
              r.tokenManager.getTobId().then(function (u) {
                o(u);
              });
            };
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行GetToken",
            level: "info",
            time: Date.now(),
            infoType: "cus",
          }),
            this.sdkReady
              ? l()
              : (n &&
                  setTimeout(function () {
                    o();
                  }, n),
                this.on(ai.Ready, function () {
                  l();
                }));
        } else console.warn("getToken must be use after function init");
      }),
      (t.prototype.profileSet = function (e) {
        this.bridgeReport
          ? this.appBridge.profileSet(lr(e))
          : this.emit(ai.ProfileSet, e, ai.Profile),
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileSet",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileSetOnce = function (e) {
        this.bridgeReport
          ? this.appBridge.profileSetOnce(lr(e))
          : this.emit(ai.ProfileSetOnce, e, ai.Profile),
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileSetOnce",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileIncrement = function (e) {
        this.bridgeReport
          ? this.appBridge.profileIncrement(lr(e))
          : this.emit(ai.ProfileIncrement, e, ai.Profile),
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileIncrement",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileUnset = function (e) {
        this.bridgeReport
          ? this.appBridge.profileUnset(e)
          : this.emit(ai.ProfileUnset, e, ai.Profile),
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileUnset",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.profileAppend = function (e) {
        this.bridgeReport
          ? this.appBridge.profileAppend(lr(e))
          : this.emit(ai.ProfileAppend, e, ai.Profile),
          this.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行profileAppend",
            level: "info",
            time: Date.now(),
            data: e,
            infoType: "cus",
          });
      }),
      (t.prototype.setExternalAbVersion = function (e) {
        var n;
        this.emit(
          ai.AbExternalVersion,
          typeof e == "string" && e ? es((n = "" + e)).call(n) : null,
          ai.Ab
        );
      }),
      (t.prototype.getVar = function (e, n, r) {
        this.emit(ai.AbVar, { name: e, defaultValue: n, callback: r }, ai.Ab);
      }),
      (t.prototype.getABconfig = function (e, n) {
        this.emit(ai.AbConfig, { params: e, callback: n }, ai.Ab);
      }),
      (t.prototype.getAbSdkVersion = function () {
        return this.configManager.getAbVersion();
      }),
      (t.prototype.onAbSdkVersionChange = function (e) {
        var n = this;
        return (
          this.emit(ai.AbVersionChangeOn, e, ai.Ab),
          function () {
            n.emit(ai.AbVersionChangeOff, e, ai.Ab);
          }
        );
      }),
      (t.prototype.offAbSdkVersionChange = function (e) {
        this.emit(ai.AbVersionChangeOff, e, ai.Ab);
      }),
      (t.prototype.openOverlayer = function () {
        this.emit(ai.AbOpenLayer, "", ai.Ab);
      }),
      (t.prototype.closeOverlayer = function () {
        this.emit(ai.AbCloseLayer, "", ai.Ab);
      }),
      (t.prototype.getAllVars = function (e) {
        this.emit(ai.AbAllVars, e, ai.Ab);
      }),
      (t.prototype.destoryInstace = function () {
        this.destroy ||
          ((this.destroy = !0),
          this.off(ai.TokenComplete),
          this.emit(ai.DestoryInstance));
      }),
      (t.prototype.destroyInstance = function () {
        this.destroy ||
          ((this.destroy = !0),
          this.off(ai.TokenComplete),
          this.emit(ai.DestoryInstance));
      }),
      (t.plugins = []),
      t
    );
  })(),
  RW = "__rangers_ab_style__";
(function (t) {
  (t[(t.Var = 0)] = "Var"), (t[(t.All = 1)] = "All");
})(k$ || (k$ = {}));
var bAn = (function () {
    function t() {
      (this.fetchStatus = "no"),
        (this.refreshFetchStatus = "complete"),
        (this.versions = []),
        (this.extVersions = []),
        (this.mulilinkVersions = []),
        (this.enable_multilink = !1),
        (this.enable_ab_visual = !1),
        (this.editMode = !1),
        (this.callbacks = []),
        (this.data = null),
        (this.changeListener = new Lf()),
        (this.readyStatus = !1),
        (this.exposureCache = []);
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        if (n.enable_ab_test) {
          (this.collect = e), (this.config = n);
          var i = n.enable_multilink,
            o = n.ab_channel_domain,
            l = n.enable_ab_visual,
            u = n.ab_cross,
            c = n.ab_cookie_domain,
            d = n.ab_timeout,
            h = o || th(oVe[n.channel || "cn"]),
            f = e.adapters.storage,
            p = this.collect.Types;
          (this.types = p),
            (this.cacheStorgae = new f(!1)),
            (this.timeout = d || 3e3),
            (this.enable_multilink = i),
            (this.enable_ab_visual = l),
            (this.abKey = "__tea_sdk_ab_version_" + n.app_id),
            (this.ab_cross = u),
            (this.ab_cookie_domain = c || ""),
            (this.fetchUrl = h + "/service/2/abtest_config/"),
            (this.reportUrl = "" + e.configManager.getUrl("event")),
            (this.exposureLimit = n.exposure_limit || 20),
            (this.ab_batch_time = n.ab_batch_time || 500),
            (this.ab_user_mode = n.ab_user_mode || "user_unique_id"),
            (this.callbackMap = new Lf()),
            this.collect.on(p.TokenChange, function (g) {
              g === "uuid" && r.readyStatus && (r.clearCache(), r.fetchAB());
            }),
            this.collect.on(p.TokenReset, function (g) {
              g === "uuid" && r.readyStatus && (r.clearCache(), r.fetchAB());
            }),
            this.collect.on(p.AbVar, function (g) {
              var y = g.name,
                v = g.defaultValue,
                b = g.callback;
              r.getVar(y, v, b);
            }),
            this.collect.on(p.AbAllVars, function (g) {
              r.getAllVars(g);
            }),
            this.collect.on(p.AbConfig, function (g) {
              var y = g.params,
                v = g.callback;
              r.getABconfig(y, v);
            }),
            this.collect.on(p.AbExternalVersion, function (g) {
              r.setExternalAbVersion(g);
            }),
            this.collect.on(p.AbOpenLayer, function () {
              r.openOverlayer();
            }),
            this.collect.on(p.AbCloseLayer, function () {
              r.closeOverlayer();
            }),
            this.collect.on(p.AbVersionChangeOn, function (g) {
              r.changeListener.set(g, g);
            }),
            this.collect.on(p.AbVersionChangeOff, function (g) {
              r.changeListener.get(g) && r.changeListener.delete(g);
            }),
            this.loadMode(),
            (this.enable_ab_visual || this.enable_multilink) &&
              this.openOverlayer(this.config.multilink_timeout_ms || 500),
            this.checkLocal(),
            this.ready("ab"),
            this.readyStatus || (this.fetchAB(), (this.readyStatus = !0)),
            this.collect.emit(p.AbReady);
        }
      }),
      (t.prototype.ready = function (e) {
        var n = this;
        if (
          (this.collect.set(e), this.collect.hook._hooksCache.hasOwnProperty(e))
        ) {
          var r = this.collect.hook._hooksCache[e];
          if (!Dn(r).length) return;
          var i = function (l) {
            r[l].length &&
              r[l].forEach(function (u) {
                n.collect.hook.emit(l, u);
              });
          };
          for (var o in r) i(o);
        }
      }),
      (t.prototype.loadMode = function () {
        var e = (function () {
            try {
              return JSON.parse(atob(window.name)) || void 0;
            } catch {
              return;
            }
          })(),
          n = "";
        if (e) {
          var r = e.scenario,
            i = e.href;
          r
            ? ((this.editMode = !0), (n = r))
            : !i ||
              (qt(i).call(i, "datatester") === -1 &&
                qt(i).call(i, "visual-editor") === -1) ||
              ((this.editMode = !0), (n = "visual-editor"));
        }
        this.enable_ab_visual &&
          n === "visual-editor" &&
          this.collect.destoryInstace();
      }),
      (t.prototype.checkLocal = function () {
        var e,
          n = this.getABCache(),
          r = n.ab_version,
          i = n.ab_ext_version,
          o = n.ab_version_multilink,
          l = n.data,
          u = this.checkFromUrl();
        u ? this.mulilinkVersions.push(u) : (this.mulilinkVersions = o || []),
          (this.extVersions = i || []),
          (this.versions = r || []),
          (this.data = l);
        var c = Ce((e = this.versions)).call(e, this.extVersions);
        this.enable_multilink && (c = Ce(c).call(c, this.mulilinkVersions)),
          this.configVersions(c.join(","));
      }),
      (t.prototype.checkFromUrl = function () {
        var e = jU(window.location.href);
        return e && e.vid ? e.vid : "";
      }),
      (t.prototype.updateVersions = function () {
        var e,
          n = this.extVersions.length
            ? Ce((e = this.versions)).call(e, this.extVersions)
            : this.versions;
        this.enable_multilink && (n = Ce(n).call(n, this.mulilinkVersions)),
          this.configVersions(n.join(",")),
          this.updateABCache(),
          this.changeListener.size > 0 &&
            this.changeListener.forEach(function (r) {
              typeof r == "function" && r(n);
            });
      }),
      (t.prototype.configVersions = function (e) {
        this.collect.configManager.setAbVersion(e);
      }),
      (t.prototype.getVar = function (e, n, r) {
        if (!e) throw new Error("variable must not be empty");
        if (n === void 0) throw new Error("variable no default value");
        if (typeof r != "function")
          throw new Error("callback must be a function");
        var i = { name: e, defaultValue: n, callback: r, type: k$.Var };
        this.collect.emit(Un.DEBUGGER_MESSAGE, {
          type: Un.DEBUGGER_MESSAGE_SDK,
          secType: "AB",
          info: "SDK 调用GetVar",
          level: "info",
          time: Date.now(),
          data: e,
          infoType: "cus",
        }),
          this.fetchStatus === "complete" &&
          this.refreshFetchStatus === "complete"
            ? this.getRealVar(i, e)
            : (this.callbackMap.get(e), this.callbackMap.set(e, i));
      }),
      (t.prototype.getRealVar = function (e, n) {
        var r = e.name,
          i = e.defaultValue,
          o = e.callback,
          l = this.data;
        if (l) {
          var u = l[r];
          if (u && Bx(u)) {
            var c,
              d,
              h = l[r].vid;
            return (
              n === "$ab_url"
                ? $a((c = this.mulilinkVersions)).call(c, h) ||
                  this.mulilinkVersions.push(h)
                : $a((d = this.versions)).call(d, h) || this.versions.push(h),
              this.updateVersions(),
              this.fechEvent(h, n || r, i, o, u.val),
              void this.collect.emit(Un.DEBUGGER_MESSAGE, {
                type: Un.DEBUGGER_MESSAGE_SDK,
                secType: "AB",
                info: "SDK执行GetVar，并曝光了实验" + r,
                level: "info",
                time: Date.now(),
                data: l[r],
                infoType: "sdk",
              })
            );
          }
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            secType: "AB",
            info: "SDK执行GerVar默认回调",
            level: "info",
            time: Date.now(),
            data: this.data,
            infoType: "sdk",
          }),
            o(i);
        } else o(i);
      }),
      (t.prototype.getAllVars = function (e) {
        if (typeof e != "function")
          throw new Error("callback must be a function");
        var n = { callback: e, type: k$.All };
        this.collect.emit(Un.DEBUGGER_MESSAGE, {
          type: Un.DEBUGGER_MESSAGE_SDK,
          secType: "AB",
          info: "SDK 调用GetAllVars",
          level: "info",
          time: Date.now(),
          infoType: "cus",
        }),
          this.fetchStatus === "complete" &&
          this.refreshFetchStatus === "complete"
            ? this.getRealAllVars(n)
            : this.callbackMap.set("allVars", n);
      }),
      (t.prototype.getRealAllVars = function (e) {
        (0, e.callback)(this.data ? JSON.parse(lr(this.data)) : {}),
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            secType: "AB",
            info: "SDK 执行GetAllVars",
            level: "info",
            time: Date.now(),
            data: this.data,
            infoType: "sdk",
          });
      }),
      (t.prototype.fechEvent = function (e, n, r, i, o) {
        try {
          if (this.config.disable_track_event || !e) return;
          var l = this.collect.configManager.get(),
            u = l.header,
            c = l.user,
            d = this.getABCache(),
            h = c[this.ab_user_mode] || c.user_unique_id;
          if (d && d.uuid && d.uuid !== h) return;
          var f = {
            event: "abtest_exposure",
            ab_sdk_version: "" + e,
            params: lr({
              app_id: this.config.appId,
              ab_url: n === "$ab_url" ? r : window.location.href,
            }),
            local_time_ms: Date.now(),
          };
          u.custom = lr(u.custom);
          var p = { events: [f], user: c, header: u };
          this.reportExposure(p, n), i && i(o);
        } catch (g) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 发生了异常",
            level: "error",
            time: Date.now(),
            data: g.message,
            infoType: "sdk",
          });
        }
      }),
      (t.prototype.reportExposure = function (e, n) {
        var r = this;
        this.exposureCache.push(e),
          this.reportTimeout && clearTimeout(this.reportTimeout),
          this.exposureCache.length >= this.exposureLimit
            ? this.report(n)
            : (this.reportTimeout = setTimeout(function () {
                r.report(n), clearTimeout(r.reportTimeout);
              }, this.ab_batch_time));
      }),
      (t.prototype.report = function (e) {
        var n = this;
        this.collect.requestManager.useRequest({
          url: this.reportUrl,
          data: this.exposureCache,
          timeout: 2e4,
          useBeacon: e === "$ab_url",
          zip: !0,
        }),
          this.exposureCache.forEach(function (r) {
            n.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_EVENT,
              info: "曝光埋点上报成功",
              time: Date.now(),
              data: [r],
              code: 200,
              status: "success",
              infoType: "sdk",
            });
          }),
          (this.exposureCache = []);
      }),
      (t.prototype.setExternalAbVersion = function (e) {
        (this.extVersions = [e]), this.updateVersions();
      }),
      (t.prototype.getABconfig = function (e, n) {
        var r = Dn(e);
        r && r.length && this.collect.configManager.set(e), this.fetchAB(n);
      }),
      (t.prototype.get = function (e) {
        if (this.ab_cross) {
          var n = this.cacheStorgae.getCookie(e, this.ab_cookie_domain);
          return n ? JSON.parse(n) : {};
        }
        return this.cacheStorgae.getItem(e);
      }),
      (t.prototype.set = function (e, n) {
        this.ab_cross
          ? this.cacheStorgae.setCookie(e, n, 2592e6, this.ab_cookie_domain)
          : this.cacheStorgae.setItem(e, n),
          this.collect.configManager.setAbCache(n);
      }),
      (t.prototype.getABCache = function (e) {
        var n = {
          ab_version: [],
          ab_ext_version: [],
          ab_version_multilink: [],
          data: null,
          timestamp: +new Date(),
          uuid: "",
        };
        return (n = this.get(this.abKey) || n), e ? n[e] : n;
      }),
      (t.prototype.updateABCache = function () {
        var e = this.getABCache();
        (e.ab_version_multilink = this.mulilinkVersions),
          (e.ab_ext_version = this.extVersions),
          (e.ab_version = this.versions),
          (e.timestamp = Date.now()),
          this.set(this.abKey, e);
      }),
      (t.prototype.setAbCache = function (e) {
        var n = this.getABCache();
        (n.data = this.data),
          (n.uuid = e),
          (n.timestamp = Date.now()),
          this.set(this.abKey, n);
      }),
      (t.prototype.clearCache = function () {
        (this.refreshFetchStatus = "ing"),
          (this.data = {}),
          (this.extVersions = []),
          (this.mulilinkVersions = []),
          (this.versions = []),
          this.collect.configManager.clearAbCache();
      }),
      (t.prototype.openOverlayer = function (e) {
        var n = this;
        if (
          ((function () {
            if (!document.getElementById(RW)) {
              var i = "body { opacity: 0 !important; }",
                o = document.head || document.getElementsByTagName("head")[0],
                l = document.createElement("style");
              (l.id = RW),
                (l.type = "text/css"),
                l.styleSheet
                  ? (l.styleSheet.cssText = i)
                  : l.appendChild(document.createTextNode(i)),
                o.appendChild(l);
            }
          })(),
          e)
        )
          var r = setTimeout(function () {
            n.closeOverlayer(), clearTimeout(r);
          }, e);
      }),
      (t.prototype.closeOverlayer = function () {
        var e;
        (e = document.getElementById(RW)) && e.parentElement.removeChild(e);
      }),
      (t.prototype.fetchComplete = function (e, n) {
        var r = this;
        try {
          if (e && Object.prototype.toString.call(e) == "[object Object]") {
            var i,
              o = this.collect.configManager.get().user;
            if (n && n !== o.user_unique_id) return;
            (this.data = e), this.setAbCache(n);
            var l = [];
            Dn(e).forEach(function (p) {
              var g = e[p].vid;
              g && l.push(g);
            }),
              (this.versions = _r((i = this.versions)).call(i, function (p) {
                return $a(l).call(l, p);
              }));
            var u = e.$ab_url,
              c = e.$ab_modification;
            if (c && c.val && this.enable_ab_visual) {
              if (this.collect.destroy) return;
              this.collect.emit(Un.DEBUGGER_MESSAGE, {
                type: Un.DEBUGGER_MESSAGE_SDK,
                info: "SDK 执行可视化实验",
                level: "info",
                logType: "fetch",
                time: Date.now(),
                infoType: "sdk",
                data: { $ab_modification: c },
              });
            } else if (u && this.enable_multilink) {
              var d;
              (this.mulilinkVersions = _r((d = this.mulilinkVersions)).call(
                d,
                function (p) {
                  return $a(l).call(l, p);
                }
              )),
                this.collect.emit(Un.DEBUGGER_MESSAGE, {
                  type: Un.DEBUGGER_MESSAGE_SDK,
                  info: "SDK 执行多链接实验",
                  level: "info",
                  logType: "fetch",
                  time: Date.now(),
                  infoType: "sdk",
                  data: { $ab_url: u },
                });
              var h = u.val,
                f = u.vid;
              h &&
                f &&
                this.getVar("$ab_url", h, function () {
                  r.editMode ||
                    (h !== window.location.href
                      ? setTimeout(function () {
                          if (!r.collect.destroy) {
                            var p = "" + h;
                            (p =
                              qt(p).call(p, "http") === -1
                                ? "https://" + p
                                : p),
                              gue(p).host !== location.host
                                ? (p = p + "&vid=" + f)
                                : window.history.replaceState("", "", p),
                              (window.location.href = p);
                          }
                        }, 100)
                      : r.closeOverlayer());
                });
            }
            this.updateVersions();
          } else this.closeOverlayer();
          this.callbackMap.forEach(function (p) {
            return r[p.type === k$.Var ? "getRealVar" : "getRealAllVars"](
              p,
              ""
            );
          });
        } catch {}
      }),
      (t.prototype.fetchAB = function (e) {
        var n = this,
          r = this.collect.configManager.get(),
          i = {
            header: as(
              as(as({ aid: this.config.app_id }, r.user || {}), r.header || {}),
              {
                ab_sdk_version: this.collect.configManager.getAbVersion(),
                ab_url: window.location.href,
              }
            ),
          };
        this.collect.emit(Un.DEBUGGER_MESSAGE, {
          type: Un.DEBUGGER_MESSAGE_SDK,
          info: "SDK 发起AB实验请求",
          level: "info",
          logType: "fetch",
          time: Date.now(),
          data: i,
          infoType: "sdk",
        });
        var o = r.user[this.ab_user_mode] || r.user.user_unique_id;
        this.collect.requestManager.useRequest({
          url: this.fetchUrl,
          data: i,
          success: function (l) {
            (n.fetchStatus = "complete"), (n.refreshFetchStatus = "complete");
            var u = l.data;
            l.message === "success"
              ? (n.fetchComplete(u, o), e && e(u))
              : (n.fetchComplete(null, o), e && e(null)),
              n.collect.emit(n.types.AbComplete, u),
              n.collect.emit(Un.DEBUGGER_MESSAGE, {
                type: Un.DEBUGGER_MESSAGE_SDK,
                secType: "AB",
                info: "AB实验请求成功",
                level: "info",
                logType: "fetch",
                time: Date.now(),
                data: u,
                infoType: "sdk",
              });
          },
          fail: function () {
            (n.fetchStatus = "complete"),
              (n.refreshFetchStatus = "complete"),
              n.fetchComplete(null, o),
              n.collect.emit(n.types.AbTimeout),
              e && e(null),
              n.collect.emit(Un.DEBUGGER_MESSAGE, {
                type: Un.DEBUGGER_MESSAGE_SDK,
                secType: "AB",
                info: "AB实验请求网络异常",
                level: "error",
                logType: "fetch",
                time: Date.now(),
                infoType: "sdk",
              });
          },
          timeout: this.timeout,
        });
      }),
      t
    );
  })(),
  _An = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        n.event_verify_url &&
          (typeof n.event_verify_url == "string"
            ? ((this.url = n.event_verify_url + "/v1/list_test"),
              e.on(e.Types.SubmitBefore, function (i) {
                e.requestManager.useBeacon({ url: r.url, data: i }),
                  e.emit(Un.DEBUGGER_MESSAGE, {
                    type: Un.DEBUGGER_MESSAGE_EVENT,
                    info: "SDK Report ByteIo Verify Request",
                    time: Date.now(),
                    data: i,
                    code: 200,
                    status: "success",
                    verifyType: !0,
                  });
              }))
            : console.log("please use correct et_test url"));
      }),
      t
    );
  })();
function YU(t, e, n) {
  if ((e === void 0 && (e = "list"), !t)) return !1;
  if (e && e === "list") {
    var r;
    if (
      $a((r = ["LI", "TR", "DL"])).call(r, t.nodeName) ||
      (t.dataset && t.dataset.hasOwnProperty("teaIdx")) ||
      (t.hasAttribute && t.hasAttribute("data-tea-idx"))
    )
      return !0;
  } else {
    var i;
    if (
      $a((i = ["A", "BUTTON"])).call(i, t.nodeName) ||
      (t.dataset && t.dataset.hasOwnProperty("teaContainer")) ||
      (t.hasAttribute && t.hasAttribute("data-tea-container")) ||
      (n && t.hasAttribute && t.hasAttribute(n))
    )
      return !0;
  }
  return !1;
}
var X2e = function (t, e) {
  return !!EAn(t, e);
};
function AW(t, e) {
  for (var n = t; n && !YU(n, "container", e.container_attr || ""); ) {
    if (n.nodeName === "HTML" || n.nodeName === "BODY") return t;
    n = n.parentElement;
  }
  return n || t;
}
var TAn = function (t) {
  if (!t) return "";
  var e = "";
  try {
    var n, r;
    t.textContent
      ? (e = es((n = t.textContent))
          .call(n)
          .replace(/\s+/g, ","))
      : t.innerText &&
        (e = es((r = t.innerText))
          .call(r)
          .replace(/\s+/g, ",")),
      (t.tagName !== "input" && t.tagName !== "INPUT") || (e = t.value || "");
  } finally {
    return e;
  }
};
function V2e(t) {
  for (var e = t; e && e.parentNode; ) {
    var n;
    if (
      e.hasAttribute("data-tea-ignore") ||
      (e.className && $a((n = e.className)).call(n, "applog-web-devtools-con"))
    )
      return !0;
    if (e.nodeName === "HTML" || e.nodeName === "body") return !1;
    e = e.parentNode;
  }
  return !1;
}
var QU = function (t, e) {
    return t.hasAttribute
      ? t.hasAttribute(e)
      : t.attributes
      ? !(!t.attributes[e] || !t.attributes[e].specified)
      : void 0;
  },
  EAn = function (t, e) {
    if (typeof e == "string") return QU(t, e);
    if (zU(e)) {
      for (var n = !1, r = 0; r < e.length; r++)
        if (QU(t, e[r])) {
          n = !0;
          break;
        }
      return n;
    }
  },
  z2e = function (t, e) {
    var n = {};
    if (typeof e == "string") QU(t, e) && (n[e] = t.getAttribute(e));
    else if (zU(e))
      for (var r = 0; r < e.length; r++)
        QU(t, e[r]) && (n[e[r]] = t.getAttribute(e[r]));
    return n;
  };
function SVe(t) {
  var e = [];
  if (!t) return { element_path: "", positions: [] };
  for (; t.parentElement !== null; ) e.push(t), (t = t.parentElement);
  var n = [],
    r = [];
  return (
    e.forEach(function (i) {
      var o = (function (c) {
          if (c === null) return { str: "", index: 0 };
          var d = 0,
            h = c.parentElement;
          if (h)
            for (var f = h.children, p = 0; p < f.length && f[p] !== c; p++)
              f[p].nodeName === c.nodeName && d++;
          return {
            str: [c.nodeName.toLowerCase(), YU(c, "list") ? "[]" : ""].join(""),
            index: d,
          };
        })(i),
        l = o.str,
        u = o.index;
      n.unshift(l), r.unshift(u);
    }),
    { element_path: "/" + n.join("/"), positions: r }
  );
}
var SAn = (function () {
    function t(e, n) {
      (this.maxDuration = 432e5),
        (this.aliveDTime = 6e4),
        (this.options = {
          aliveName: "predefine_page_alive",
          params: {},
          container: null,
        }),
        (this.focusState = !0),
        (this.collect = e),
        (this.config = n),
        (this.pageStartTime = Date.now()),
        (this.sessionStartTime = this.pageStartTime),
        (this.timerHandler = null),
        Bx(n.enable_stay_duration) &&
          (this.options = Ci(this.options, n.enable_stay_duration)),
        (this.hard = this.options.mode && this.options.mode === "hard"),
        (this.focusState = document.hasFocus()),
        (this.aliveDTime = this.options.aliveTime || 6e4);
    }
    return (
      (t.prototype.setParams = function (e, n, r) {
        (this.set_path = e), (this.set_url = r), (this.set_title = n);
      }),
      (t.prototype.enable = function (e, n, r) {
        (this.url_path = e),
          (this.url = r),
          (this.title = n),
          (this.disableCallback = this.enablePageAlive()),
          this.hard && (this.removeMode = this.hardMode());
      }),
      (t.prototype.disable = function () {
        this.disableCallback(),
          (this.pageStartTime = Date.now()),
          this.hard && this.removeMode && this.removeMode();
      }),
      (t.prototype.sendEvent = function (e, n) {
        n === void 0 && (n = !1);
        var r = n ? this.aliveDTime : Date.now() - this.sessionStartTime;
        if (
          !(
            r < 0 ||
            r > this.aliveDTime ||
            Date.now() - this.pageStartTime > this.maxDuration
          ) &&
          (!n || document.visibilityState !== "hidden") &&
          (!this.hard || this.focusState)
        ) {
          var i = as(
            {
              url_path: this.getParams("url_path"),
              title: this.getParams("title"),
              url: this.getParams("url"),
              duration: r,
              is_support_visibility_change: aVe(),
              startTime: this.sessionStartTime,
              hidden: document.visibilityState,
              leave: e,
              mode: this.hard ? "hard" : "normal",
              focusState: this.focusState,
              aliveType: this.options.container ? "dom" : "page",
            },
            this.options.params
          );
          if (this.options.container) {
            var o = SVe(this.options.container).element_path;
            i = Ci(i, {
              element_path: o,
              aliveType: this.options.container ? "dom" : "page",
            });
          }
          this.collect.beconEvent(this.options.aliveName, i),
            (this.sessionStartTime = Date.now());
        }
      }),
      (t.prototype.getParams = function (e) {
        switch (e) {
          case "url_path":
            return this.set_path || this.url_path || location.pathname;
          case "title":
            return (
              this.set_title ||
              this.title ||
              document.title ||
              location.pathname
            );
          case "url":
            return this.set_url || this.url || location.href;
        }
      }),
      (t.prototype.setUpTimer = function () {
        var e = this;
        return (
          this.timerHandler && clearInterval(this.timerHandler),
          setInterval(function () {
            Date.now() - e.sessionStartTime > e.aliveDTime &&
              e.sendEvent(!1, !0);
          }, 1e3)
        );
      }),
      (t.prototype.visibilitychange = function () {
        this.getDisplayStatus() === "hidden"
          ? this.timerHandler &&
            (clearInterval(this.timerHandler), this.sendEvent(!1))
          : this.getDisplayStatus() === "visible" &&
            ((this.sessionStartTime = Date.now()),
            (this.timerHandler = this.setUpTimer()));
      }),
      (t.prototype.getDisplayStatus = function () {
        if (!this.options.container) return document.visibilityState;
        try {
          var e = window.getComputedStyle(this.options.container);
          return e.display !== "none" &&
            e.visibility !== "hidden" &&
            e.opacity !== "0"
            ? "visible"
            : "hidden";
        } catch {
          return "visible";
        }
      }),
      (t.prototype.beforeunload = function () {
        document.hidden || this.sendEvent(!0);
      }),
      (t.prototype.muition = function () {
        var e = this;
        new MutationObserver(function (n) {
          n.forEach(function (r) {
            e.visibilitychange();
          });
        }).observe(this.options.container, {
          attributes: !0,
          attributeFilter: ["style"],
        });
      }),
      (t.prototype.enablePageAlive = function () {
        var e = this;
        this.timerHandler = this.setUpTimer();
        var n = this.visibilitychange.bind(this),
          r = this.beforeunload.bind(this);
        return (
          this.options.container
            ? this.muition()
            : document.addEventListener("visibilitychange", n),
          window.addEventListener("pagehide", r),
          function () {
            e.beforeunload(),
              document.removeEventListener("visibilitychange", n),
              window.removeEventListener("pagehide", r);
          }
        );
      }),
      (t.prototype.hardMode = function () {
        var e = this,
          n = function () {
            e.timerHandler && (clearInterval(e.timerHandler), e.sendEvent(!1)),
              (e.focusState = !1);
          },
          r = function () {
            (e.focusState = !0),
              (e.sessionStartTime = Date.now()),
              (e.timerHandler = e.setUpTimer());
          };
        return (
          window.addEventListener("blur", n),
          window.addEventListener("focus", r),
          function () {
            window.removeEventListener("blur", n),
              window.removeEventListener("focus", r);
          }
        );
      }),
      t
    );
  })(),
  RAn = (function () {
    function t(e, n) {
      var r = this;
      (this.maxDuration = 432e5),
        (this.aliveDTime = 6e4),
        (this.options = { closeName: "predefine_page_close", params: {} }),
        (this.focusState = !0),
        (this.visibilitychange = function () {
          document.visibilityState === "hidden"
            ? (r.activeEndTime = Date.now())
            : document.visibilityState === "visible" &&
              (r.activeEndTime &&
                ((r.totalTime += r.activeEndTime - r.activeStartTime),
                (r.activeTimes += 1)),
              (r.activeEndTime = void 0),
              (r.activeStartTime = Date.now()));
        }),
        (this.beforeunload = function () {
          if (
            ((r.totalTime +=
              (r.activeEndTime || Date.now()) - r.activeStartTime),
            r.config.autotrack)
          )
            try {
              window.sessionStorage.setItem(
                "_tea_cache_duration",
                lr({
                  duration: r.totalTime,
                  page_title: document.title || location.pathname,
                })
              );
            } catch {}
          r.sendEventPageClose();
        }),
        (this.collect = e),
        (this.config = n),
        (this.maxDuration = n.maxDuration || n.max_duration || 864e5),
        (this.pageStartTime = Date.now()),
        Bx(n.enable_stay_duration) &&
          (this.options = Ci(this.options, n.enable_stay_duration)),
        (this.hard = this.options.mode && this.options.mode === "hard"),
        (this.focusState = document.hasFocus()),
        this.resetData();
    }
    return (
      (t.prototype.setParams = function (e, n, r) {
        (this.set_path = e), (this.set_url = r), (this.set_title = n);
      }),
      (t.prototype.resetParams = function (e, n, r) {
        (this.url_path = e), (this.url = r), (this.title = n);
      }),
      (t.prototype.enable = function (e, n, r) {
        (this.url_path = e),
          (this.url = r),
          (this.title = n),
          (this.disableCallback = this.enablePageClose()),
          this.hard && (this.removeMode = this.hardMode());
      }),
      (t.prototype.disable = function () {
        this.disableCallback(),
          this.hard && this.removeMode && this.removeMode(),
          this.resetData();
      }),
      (t.prototype.resetData = function () {
        (this.activeStartTime =
          this.activeStartTime === void 0 ? this.pageStartTime : Date.now()),
          (this.activeEndTime = void 0),
          (this.activeTimes = 1),
          (this.totalTime = 0),
          this.resetParams(location.pathname, document.title, location.href);
      }),
      (t.prototype.sendEventPageClose = function () {
        var e = Date.now() - this.pageStartTime;
        this.totalTime < 0 ||
          e < 0 ||
          this.totalTime >= this.maxDuration ||
          (this.hard && !this.focusState) ||
          (this.collect.beconEvent(
            this.options.closeName,
            as(
              {
                url_path: this.getParams("url_path"),
                title: this.getParams("title"),
                url: this.getParams("url"),
                active_times: this.activeTimes,
                duration: this.totalTime,
                total_duration: e,
                is_support_visibility_change: aVe(),
                mode: this.hard ? "hard" : "normal",
                focusState: this.focusState,
              },
              this.options.params
            )
          ),
          (this.pageStartTime = Date.now()),
          this.resetData());
      }),
      (t.prototype.getParams = function (e) {
        switch (e) {
          case "url_path":
            return this.set_path || this.url_path || location.pathname;
          case "title":
            return (
              this.set_title ||
              this.title ||
              document.title ||
              location.pathname
            );
          case "url":
            return this.set_url || this.url || location.href;
        }
      }),
      (t.prototype.enablePageClose = function () {
        var e = this,
          n = this.visibilitychange.bind(this),
          r = this.beforeunload.bind(this);
        return (
          document.addEventListener("visibilitychange", n),
          window.addEventListener("pagehide", r),
          function () {
            e.beforeunload(),
              document.removeEventListener("visibilitychange", n),
              window.removeEventListener("pagehide", r);
          }
        );
      }),
      (t.prototype.hardMode = function () {
        var e = this,
          n = function () {
            e.focusState = !1;
          },
          r = function () {
            e.focusState = !0;
          };
        return (
          window.addEventListener("blur", n),
          window.addEventListener("focus", r),
          function () {
            window.removeEventListener("blur", n),
              window.removeEventListener("focus", r);
          }
        );
      }),
      t
    );
  })(),
  AAn = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        if (
          ((this.collect = e),
          (this.config = n),
          this.config.enable_stay_duration)
        ) {
          (this.title = document.title || location.pathname),
            (this.url = location.href),
            (this.url_path = location.pathname),
            (this.pageAlive = new SAn(e, n)),
            (this.pageClose = new RAn(e, n));
          var i = this.collect.Types;
          this.collect.on(i.DestoryInstance, function () {
            r.disable();
          }),
            this.collect.on(i.ResetStay, function (o) {
              var l = o.url_path,
                u = o.title,
                c = o.url;
              r.resetStayDuration(l, u, c);
            }),
            this.collect.on(i.RouteChange, function (o) {
              o.init || n.disable_route_report || r.resetStayDuration();
            }),
            this.collect.on(i.SetStay, function (o) {
              var l = o.url_path,
                u = o.title,
                c = o.url;
              r.setStayParmas(l, u, c);
            }),
            this.enable(this.url_path, this.title, this.url),
            this.ready(i.Stay),
            this.collect.emit(i.StayReady);
        }
      }),
      (t.prototype.ready = function (e) {
        var n = this;
        if (
          (this.collect.set(e), this.collect.hook._hooksCache.hasOwnProperty(e))
        ) {
          var r = this.collect.hook._hooksCache[e];
          if (!Dn(r).length) return;
          var i = function (l) {
            r[l].length &&
              r[l].forEach(function (u) {
                n.collect.hook.emit(l, u);
              });
          };
          for (var o in r) i(o);
        }
      }),
      (t.prototype.enable = function (e, n, r) {
        this.pageAlive.enable(e, n, r), this.pageClose.enable(e, n, r);
      }),
      (t.prototype.disable = function () {
        this.pageAlive.disable(), this.pageClose.disable();
      }),
      (t.prototype.setStayParmas = function (e, n, r) {
        e === void 0 && (e = ""),
          n === void 0 && (n = ""),
          r === void 0 && (r = ""),
          this.pageAlive.setParams(e, n, r),
          this.pageClose.setParams(e, n, r),
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行 resetStayParams",
            level: "info",
            time: Date.now(),
            data: { url_path: e, title: n, url: r },
          });
      }),
      (t.prototype.reset = function (e, n, r) {
        this.disable(), this.enable(e, n, r);
      }),
      (t.prototype.resetStayDuration = function (e, n, r) {
        this.reset(e, n, r),
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "SDK 执行 resetStayDuration",
            level: "info",
            time: Date.now(),
            data: { url_path: e, title: n, url: r },
          });
      }),
      t
    );
  })(),
  wAn = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        (this.collect = e),
          (this.config = n),
          (this.duration = 6e4),
          (this.reportUrl = e.configManager.getDomain() + "/profile/list");
        var i = e.Types;
        (this.eventCheck = new vue(e, n)),
          (this.cache = {}),
          this.collect.on(i.ProfileSet, function (o) {
            r.setProfile(o);
          }),
          this.collect.on(i.ProfileSetOnce, function (o) {
            r.setOnceProfile(o);
          }),
          this.collect.on(i.ProfileUnset, function (o) {
            r.unsetProfile(o);
          }),
          this.collect.on(i.ProfileIncrement, function (o) {
            r.incrementProfile(o);
          }),
          this.collect.on(i.ProfileAppend, function (o) {
            r.appendProfile(o);
          }),
          this.collect.on(i.ProfileClear, function () {
            r.cache = {};
          }),
          this.ready(i.Profile);
      }),
      (t.prototype.ready = function (e) {
        var n = this;
        if (
          (this.collect.set(e), this.collect.hook._hooksCache.hasOwnProperty(e))
        ) {
          var r = this.collect.hook._hooksCache[e];
          if (!Dn(r).length) return;
          var i = function (l) {
            r[l].length &&
              r[l].forEach(function (u) {
                n.collect.hook.emit(l, u);
              });
          };
          for (var o in r) i(o);
        }
      }),
      (t.prototype.report = function (e, n) {
        n === void 0 && (n = {});
        try {
          if (this.config.disable_track_event) return;
          var r = [];
          r.push(this.collect.processEvent(e, n));
          var i = this.collect.eventManager.merge(r);
          this.collect.requestManager.useRequest({
            url: this.reportUrl,
            data: i,
          }),
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_EVENT,
              info: "埋点上报成功",
              time: Date.now(),
              data: i,
              code: 200,
              status: "success",
            });
        } catch (o) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: o.message,
          });
        }
      }),
      (t.prototype.setProfile = function (e) {
        var n = this.formatParams(e);
        n &&
          Dn(n).length &&
          (this.pushCache(n),
          this.report("__profile_set", as(as({}, n), { profile: !0 })));
      }),
      (t.prototype.setOnceProfile = function (e) {
        var n = this.formatParams(e, !0);
        n &&
          Dn(n).length &&
          (this.pushCache(n),
          this.report("__profile_set_once", as(as({}, n), { profile: !0 })));
      }),
      (t.prototype.incrementProfile = function (e) {
        e
          ? this.report("__profile_increment", as(as({}, e), { profile: !0 }))
          : console.warn("please check the params, must be object!!!");
      }),
      (t.prototype.unsetProfile = function (e) {
        if (e) {
          var n = {};
          (n[e] = "1"),
            this.report("__profile_unset", as(as({}, n), { profile: !0 }));
        } else console.warn("please check the key, must be string!!!");
      }),
      (t.prototype.appendProfile = function (e) {
        if (e) {
          var n = {};
          for (var r in e) {
            var i;
            typeof e[r] == "string" ||
            jn((i = Object.prototype.toString.call(e[r]))).call(i, 8, -1) ===
              "Array"
              ? (n[r] = e[r])
              : console.warn(
                  "please check the value of param: " +
                    r +
                    ", must be string or array !!!"
                );
          }
          Dn(n).length &&
            this.report("__profile_append", as(as({}, n), { profile: !0 }));
        } else console.warn("please check the params, must be object!!!");
      }),
      (t.prototype.pushCache = function (e) {
        var n = this;
        Dn(e).forEach(function (r) {
          n.cache[r] = { val: n.clone(e[r]), timestamp: Date.now() };
        });
      }),
      (t.prototype.formatParams = function (e, n) {
        var r = this;
        n === void 0 && (n = !1);
        try {
          var i;
          if (!e || Object.prototype.toString.call(e) !== "[object Object]")
            return void console.warn(
              "please check the params type, must be object !!!"
            );
          var o = {};
          for (var l in e) {
            var u;
            typeof e[l] == "string" ||
            typeof e[l] == "number" ||
            jn((u = Object.prototype.toString.call(e[l]))).call(u, 8, -1) ===
              "Array"
              ? (o[l] = e[l])
              : console.warn(
                  "please check the value of params:" +
                    l +
                    ", must be string,number,Array !!!"
                );
          }
          var c = Dn(o);
          if (!c.length || !this.eventCheck.checkEventParams(o)) return;
          var d = Date.now();
          return ga(
            (i = _r(c).call(c, function (h) {
              var f = r.cache[h];
              return n
                ? !f
                : !(
                    f &&
                    r.compare(f.val, e[h]) &&
                    d - f.timestamp < r.duration
                  );
            }))
          ).call(
            i,
            function (h, f) {
              return (h[f] = o[f]), h;
            },
            {}
          );
        } catch (h) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: h.message,
          }),
            console.log("error");
        }
      }),
      (t.prototype.compare = function (e, n) {
        try {
          return lr(e) === lr(n);
        } catch (r) {
          return (
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: r.message,
            }),
            !1
          );
        }
      }),
      (t.prototype.clone = function (e) {
        try {
          return JSON.parse(lr(e));
        } catch (n) {
          return (
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: n.message,
            }),
            e
          );
        }
      }),
      (t.prototype.unReady = function () {
        console.warn("sdk is not ready, please use this api after start");
      }),
      t
    );
  })(),
  kAn = (function () {
    function t() {
      var e = this;
      (this.setInterval = function () {
        e.clearIntervalFunc = lRn(function () {
          e.isSessionhasEvent && e.endCurrentSession();
        }, e.sessionInterval);
      }),
        (this.clearInterval = function () {
          e.clearIntervalFunc && e.clearIntervalFunc();
        });
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        if (((this.collect = e), !n.disable_heartbeat)) {
          (this.sessionInterval = 6e4),
            (this.startTime = 0),
            (this.lastTime = 0),
            this.setInterval();
          var i = this.collect.Types;
          this.collect.on(i.SessionResetTime, function () {
            r.process();
          });
        }
      }),
      (t.prototype.endCurrentSession = function () {
        this.collect.event("_be_active", {
          start_time: this.startTime,
          end_time: this.lastTime,
          url: window.location.href,
          referrer: window.document.referrer,
          title: document.title || location.pathname,
        }),
          (this.isSessionhasEvent = !1),
          (this.startTime = 0);
      }),
      (t.prototype.process = function () {
        this.isSessionhasEvent ||
          ((this.isSessionhasEvent = !0), (this.startTime = +new Date()));
        var e = this.lastTime || +new Date();
        (this.lastTime = +new Date()),
          this.lastTime - e > this.sessionInterval &&
            (this.clearInterval(),
            this.endCurrentSession(),
            this.setInterval());
      }),
      t
    );
  })(),
  IAn = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        n.channel_domain ||
          n.disable_track_event ||
          n.disable_sdk_monitor ||
          ((this.collect = e),
          (this.config = n),
          (this.url = e.configManager.getUrl("event")),
          this.collect.on(e.Types.Ready, function () {
            r.sdkOnload();
          }),
          this.collect.on(e.Types.SubmitError, function (i) {
            var o = i.type,
              l = i.eventData,
              u = i.errorCode,
              c = i.response;
            o === "f_data" && r.sdkError(l, u, c);
          }),
          this.collect.on(e.Types.SDKInnerError, function (i) {
            var o = i.type,
              l = i.eventData,
              u = i.errorCode,
              c = i.msg;
            r.sdkInnerError(o, l, u, c);
          }));
      }),
      (t.prototype.sdkOnload = function () {
        var e = this;
        try {
          var n = this.collect.configManager.get(),
            r = n.header,
            i = n.user,
            o = r.app_id,
            l = r.app_name,
            u = r.sdk_version,
            c = i.web_id,
            d = {
              events: [
                {
                  event: "onload",
                  params: lr({
                    app_id: o,
                    app_name: l || "",
                    sdk_version: u,
                    sdk_type: "npm",
                    sdk_config: this.config,
                    sdk_desc: "TOC",
                    url: location.href,
                  }),
                  local_time_ms: Date.now(),
                },
              ],
              user: { user_unique_id: c },
              header: {},
            };
          setTimeout(function () {
            e.collect.requestManager.useRequest({
              url: e.url,
              data: [d],
              timeout: 3e4,
              app_key: "566f58151b0ed37e",
              forceXhr: !0,
            });
          }, 16);
        } catch {}
      }),
      (t.prototype.sdkError = function (e, n, r) {
        var i = this;
        try {
          var o = e[0],
            l = o.user,
            u = o.header,
            c = [];
          e.forEach(function (h) {
            h.events.forEach(function (f) {
              c.push(f);
            });
          });
          var d = {
            events: On(c).call(c, function (h) {
              return {
                event: "on_error",
                params: lr({
                  type: "sdk_event_error",
                  error_code: n,
                  app_id: u.app_id,
                  app_name: u.app_name || "",
                  error_event: h.event,
                  sdk_version: u.sdk_version,
                  local_time_ms: h.local_time_ms,
                  tea_event_index: Date.now(),
                  params: h.params,
                  header: u,
                  user: l,
                  err_msg: r.m || "",
                }),
                local_time_ms: Date.now(),
              };
            }),
            user: { user_unique_id: l.user_unique_id },
            header: {},
          };
          setTimeout(function () {
            i.collect.requestManager.useRequest({
              url: i.url,
              data: [d],
              timeout: 3e4,
              app_key: "566f58151b0ed37e",
              forceXhr: !0,
            });
          }, 16);
        } catch {}
      }),
      (t.prototype.sdkInnerError = function (e, n, r, i) {
        var o = this;
        try {
          var l = n[0],
            u = l.user,
            c = l.header,
            d = [];
          n.forEach(function (f) {
            f.events.forEach(function (p) {
              d.push(p);
            });
          });
          var h = {
            events: On(d).call(d, function (f) {
              return {
                event: "on_error",
                params: lr({
                  type: e,
                  error_code: r,
                  app_id: c.app_id,
                  app_name: c.app_name || "",
                  error_event: f.event,
                  sdk_version: c.sdk_version,
                  local_time_ms: f.local_time_ms,
                  tea_event_index: Date.now(),
                  params: f.params,
                  header: c,
                  user: u,
                  ua: window.navigator.userAgent,
                  err_msg: i,
                }),
                local_time_ms: Date.now(),
              };
            }),
            user: u,
            header: {},
          };
          setTimeout(function () {
            o.collect.requestManager.useRequest({
              url: o.url,
              data: [h],
              timeout: 3e4,
              app_key: "566f58151b0ed37e",
              forceXhr: !0,
            });
          }, 16);
        } catch {}
      }),
      t
    );
  })(),
  DAn = function (t) {
    if (t.children.length) {
      var e = t.children;
      return !jn([])
        .call(e)
        .some(function (n) {
          return n.children.length > 0;
        });
    }
    return !0;
  },
  PAn = function (t) {
    if (t.tagName.toLowerCase() === "svg") return !0;
    for (var e = t.parentElement, n = !1; e; )
      e.tagName.toLowerCase() === "svg"
        ? ((e = null), (n = !0))
        : (e = e.parentElement);
    return n;
  };
function MAn(t, e) {
  var n;
  if (
    t.nodeType !== 1 ||
    (!e.svg && PAn(t)) ||
    $a((n = ["HTML", "BODY"])).call(n, t.tagName.toUpperCase())
  )
    return !1;
  var r = t;
  return !(
    r.style.display === "none" ||
    (!YU(r, "container", e.container_attr || "") &&
      !(
        (function (i, o) {
          for (
            var l = i, u = !1;
            l && !YU(l, "container", o.container_attr || "");

          ) {
            if (l.nodeName === "HTML" || l.nodeName === "BODY") return u;
            l = l.parentElement;
          }
          return !0;
        })(r, e) ||
        DAn(r) ||
        e.svg
      ))
  );
}
var CAn = (function () {
    function t(e, n, r) {
      var i = this;
      (this.statistics = !1),
        (this.pageView = !1),
        (this.clickEvent = function (o) {
          MAn(o.target, i.options) &&
            i.eventHandel({ eventType: "dom", eventName: "click" }, o);
        }),
        (this.changeEvent = function (o) {
          i.eventHandel({ eventType: "dom", eventName: "change" }, o);
        }),
        (this.submitEvent = function (o) {
          i.eventHandel({ eventType: "dom", eventName: "submit" }, o);
        }),
        (this.getPageViewEvent = function (o, l) {
          l &&
            l === "pushState" &&
            i.eventHandel(
              { eventType: "dom", eventName: "beat" },
              as({ beat_type: 0 }, o)
            ),
            i.eventHandel({ eventType: "dom", eventName: "page_view" }, o);
        }),
        (this.getPageLoadEvent = function (o) {
          i.eventHandel(
            { eventType: "dom", eventName: "page_statistics" },
            { lcp: o }
          );
        }),
        (this.config = r.getConfig().eventConfig),
        (this.collect = n),
        (this.options = e),
        (this.beatTime = e.beat),
        (this.domContainer = e.container || document);
    }
    return (
      (t.prototype.init = function (e) {
        this.eventHandel = e;
        var n = this.config.mode;
        this.addListener(n);
      }),
      (t.prototype.addListener = function (e) {
        var n = this;
        if (e === "proxy-capturing") {
          if (
            (this.config.click &&
              (zU(this.domContainer)
                ? this.domContainer.forEach(function (d) {
                    d.addEventListener("click", n.clickEvent, !0);
                  })
                : this.domContainer.addEventListener(
                    "click",
                    this.clickEvent,
                    !0
                  )),
            this.config.pv)
          ) {
            this.collect.on("route-change", function (d) {
              var h = d.config,
                f = d.name;
              n.getPageViewEvent(h, f), (n.pageView = !0);
            });
            var r = setTimeout(function () {
              n.pageView ||
                (n.getPageViewEvent(n.getDefaultConfig()),
                (n.pageView = !0),
                clearTimeout(r));
            }, 2e3);
          }
          if (this.config.beat) {
            try {
              document.readyState === "complete"
                ? this.beatEvent(this.beatTime)
                : window.addEventListener("load", function () {
                    n.beatEvent(n.beatTime);
                  });
              var i = 0,
                o = null;
              window.addEventListener("scroll", function () {
                clearTimeout(o),
                  (o = setTimeout(l, 500)),
                  (i =
                    document.documentElement.scrollTop ||
                    document.body.scrollTop);
              });
              var l = function () {
                (document.documentElement.scrollTop ||
                  document.body.scrollTop) == i &&
                  n.eventHandel(
                    { eventType: "dom", eventName: "beat" },
                    { beat_type: 1 }
                  );
              };
            } catch {}
            try {
              var u =
                window.performance &&
                window.performance.getEntriesByType("paint");
              if (u && u.length) {
                new PerformanceObserver(function (d) {
                  var h = d.getEntries(),
                    f = h[h.length - 1],
                    p = f.renderTime || f.loadTime;
                  n.statistics || (n.getPageLoadEvent(p), (n.statistics = !0));
                }).observe({ entryTypes: ["largest-contentful-paint"] });
                var c = setTimeout(function () {
                  n.statistics ||
                    (n.getPageLoadEvent(u[0].startTime || 0),
                    (n.statistics = !0),
                    clearTimeout(c));
                }, 2e3);
              } else this.getPageLoadEvent(0);
            } catch {
              this.getPageLoadEvent(0);
            }
          }
        }
      }),
      (t.prototype.removeListener = function () {
        var e = this;
        zU(this.domContainer)
          ? this.domContainer.forEach(function (n) {
              n.removeEventListener("click", e.clickEvent, !0);
            })
          : this.domContainer.removeEventListener("click", this.clickEvent, !0);
      }),
      (t.prototype.beatEvent = function (e) {
        var n = this;
        try {
          var r;
          this.eventHandel(
            { eventType: "dom", eventName: "beat" },
            { beat_type: 3 }
          ),
            this.beatTime &&
              (r = setInterval(function () {
                n.eventHandel(
                  { eventType: "dom", eventName: "beat" },
                  { beat_type: 2 }
                );
              }, e)),
            pue(function () {
              n.eventHandel(
                { eventType: "dom", eventName: "beat", eventSend: "becon" },
                { beat_type: 0 }
              ),
                n.beatTime && clearInterval(r);
            });
        } catch {}
      }),
      (t.prototype.getDefaultConfig = function () {
        return {
          is_html: 1,
          url: location.href,
          referrer: document.referrer,
          page_key: location.href,
          refer_page_key: document.referrer,
          page_title: document.title || location.pathname,
          page_manual_key: "",
          refer_page_manual_key: "",
          refer_page_title: "",
          page_path: location.pathname,
          page_host: location.host,
        };
      }),
      t
    );
  })(),
  $An = {
    eventConfig: {
      mode: "proxy-capturing",
      submit: !1,
      click: !0,
      change: !1,
      pv: !0,
      beat: !0,
      hashTag: !1,
      impr: !1,
    },
    scoutConfig: { mode: "xpath" },
  },
  xAn = (function () {
    function t(e, n) {
      (this.config = e),
        (this.config.eventConfig = Ci(this.config.eventConfig, n));
    }
    return (
      (t.prototype.getConfig = function () {
        return this.config;
      }),
      (t.prototype.setConfig = function (e) {
        return (this.config = e);
      }),
      t
    );
  })();
function LAn(t, e, n, r) {
  var i,
    o,
    l = {},
    u = (function (G) {
      if (G) {
        var H = G.getBoundingClientRect(),
          E = H.width,
          S = H.height;
        return {
          left: H.left,
          top: H.top,
          element_width: E,
          element_height: S,
        };
      }
    })((e = AW(e, n))),
    c = (function (G, H) {
      G === void 0 && (G = {}), H === void 0 && (H = {});
      var E = G.clientX,
        S = G.clientY,
        L = H.left,
        W = H.top,
        F = E - L >= 0 ? E - L : 0,
        oe = S - W >= 0 ? S - W : 0;
      return { touch_x: Math.floor(F), touch_y: Math.floor(oe) };
    })(t, u),
    d = u.element_width,
    h = u.element_height,
    f = c.touch_x,
    p = c.touch_y,
    g = SVe(e),
    y = g.element_path,
    v = g.positions,
    b =
      ((i = AW(e, n)),
      (o = []),
      (function G(H) {
        var E,
          S,
          L,
          W,
          F =
            ((W = ""),
            (E = H).nodeType === 3
              ? (W = es((S = E.textContent)).call(S))
              : (E.dataset && E.dataset.hasOwnProperty("teaTitle")) ||
                E.hasAttribute("ata-tea-title")
              ? (W = E.getAttribute("data-tea-title"))
              : E.nodeName === "INPUT" &&
                $a((L = ["button", "submit"])).call(L, E.getAttribute("type"))
              ? (W = E.getAttribute("value"))
              : E.nodeName === "IMG" &&
                E.getAttribute("alt") &&
                (W = E.getAttribute("alt")),
            jn(W).call(W, 0, 200));
        if (
          (F && qt(o).call(o, F) === -1 && o.push(F), H.childNodes.length > 0)
        )
          for (var oe = H.childNodes, De = 0; De < oe.length; De++)
            oe[De].nodeType !== 8 && G(oe[De]);
      })(i),
      o),
    w = window.performance.timing.navigationStart,
    k = Date.now() - w,
    D = On(v).call(v, function (G) {
      return "" + G;
    }),
    $ = null;
  if (
    (window.TEAVisualEditor &&
      window.TEAVisualEditor.getOriginXpath &&
      ($ = window.TEAVisualEditor.getOriginXpath({ xpath: y, positions: D })),
    (l.element_path = ($ && $.xpath) || y),
    (l.positions = ($ && $.positions) || D),
    r &&
      !r.text &&
      ((l.texts = b),
      (l.element_title =
        e.getAttribute("data-tea-title") || e.getAttribute("title") || TAn(e))),
    (l.element_id = e.getAttribute("id") || ""),
    (l.element_class_name = e.getAttribute("class") || ""),
    (l.element_type = e.nodeType),
    (l.element_width = Math.floor(d)),
    (l.element_height = Math.floor(h)),
    (l.touch_x = f),
    (l.touch_y = p),
    (l.page_manual_key = ""),
    (l.elememt_manual_key = ""),
    (l.since_page_start_ms = k),
    (l.page_start_ms = w),
    (l.page_path = location.pathname),
    (l.page_host = location.host),
    n.track_attr && X2e(e, n.track_attr))
  ) {
    var N = z2e(e, n.track_attr);
    for (var P in N) l[P] = N[P];
  }
  if (n.custom_attr)
    try {
      if (X2e(e, n.custom_attr)) {
        (N = z2e(e, n.custom_attr)), (P = decodeURIComponent(N[n.custom_attr]));
        var I = JSON.parse(P);
        if (Dn(I)) for (var O in I) l[O] = I[O];
      }
    } catch {
      console.log("custom attr error");
    }
  var X = AW(e, n);
  return (
    X.tagName === "A" && (l.href = X.getAttribute("href")),
    e.tagName === "IMG" && (l.src = e.getAttribute("src")),
    l
  );
}
var JA = function (t, e, n, r, i) {
    return as(as({ event: t }, LAn(e, n, r, i)), {
      is_html: 1,
      page_key: window.location.href,
      page_title: document.title,
    });
  },
  OAn = (function () {
    function t(e, n) {
      (this.ignore = { text: !1 }),
        (this.initConfig = e),
        (this.options = n),
        (this.eventName =
          n && n.custom === "tea"
            ? {
                click: "__bav_click",
                page: "__bav_page",
                beat: "__bav_beat",
                static: "__bav_page_statistics",
                exposure: "__bav_page_exposure",
                scroll: "__bav_slide",
              }
            : {
                click: "bav2b_click",
                page: "bav2b_page",
                beat: "bav2b_beat",
                static: "bav2b_page_statistics",
                exposure: "bav2b_exposure",
                scroll: "$bav2b_slide",
              }),
        n && n.text === !1 && (this.ignore.text = !0),
        n &&
          n.exposure &&
          n.exposure.eventName &&
          (this.eventName.exposure = n.exposure.eventName);
    }
    return (
      (t.prototype.handleEvent = function (e, n) {
        try {
          if (V2e(e.target)) return null;
          var r = "bav2b_click";
          switch (n) {
            case "click":
              return (
                (r =
                  e.target.getAttribute("data-applog-click-event") ||
                  this.eventName.click ||
                  ""),
                JA(r, e, e.target, this.options, this.ignore)
              );
            case "exposure":
              return (
                (r =
                  e.target.getAttribute("data-applog-exposure-event") ||
                  this.eventName.exposure ||
                  ""),
                JA(r, e, e.target || e, this.options, this.ignore)
              );
            case "change":
              return as(
                as({}, JA((r = "bav2b_change"), e, e.target, this.options)),
                (function (i, o) {
                  try {
                    if (i === "bav2b_change")
                      return o.hasAttribute("data-tea-track")
                        ? { value: o.value }
                        : {};
                  } catch {
                    return {};
                  }
                })(r, e.target)
              );
            case "submit":
              return JA((r = "bav2b_submit"), e, e.target, this.options);
          }
        } catch (i) {
          return console.error(i), null;
        }
      }),
      (t.prototype.handleViewEvent = function (e) {
        (e.event = this.eventName.page),
          (e.page_title = document.title),
          (e.page_total_width = window.innerWidth),
          (e.page_total_height = window.innerHeight);
        try {
          var n = window.sessionStorage.getItem("_tea_cache_duration");
          if (n) {
            var r = JSON.parse(n);
            e.refer_page_duration_ms = r ? r.duration : "";
          }
          (e.scroll_width = document.documentElement.scrollLeft
            ? document.documentElement.scrollLeft + window.innerWidth
            : window.innerWidth),
            (e.scroll_height = document.documentElement.scrollTop
              ? document.documentElement.scrollTop + window.innerHeight
              : window.innerHeight),
            (e.page_start_ms = window.performance.timing.navigationStart);
        } catch (i) {
          console.log("page event error " + lr(i));
        }
        return e;
      }),
      (t.prototype.handleStatisticsEvent = function (e) {
        var n = {};
        (n.event = this.eventName.static),
          (n.is_html = 1),
          (n.page_key = location.href),
          (n.refer_page_key = document.referrer || ""),
          (n.page_title = document.title),
          (n.page_manual_key = this.initConfig.autotrack.page_manual_key || ""),
          (n.refer_page_manual_key = "");
        try {
          var r = e.lcp,
            i = window.performance.timing,
            o = i.loadEventEnd - i.navigationStart;
          (n.page_init_cost_ms = _i(r || (o > 0 ? o : 0))),
            (n.page_start_ms = i.navigationStart);
        } catch (l) {
          console.log("page_statistics event error " + lr(l));
        }
        return n;
      }),
      (t.prototype.handleBeadtEvent = function (e) {
        (e.event = this.eventName.beat),
          (e.page_key = window.location.href),
          (e.is_html = 1),
          (e.page_title = document.title),
          (e.page_manual_key = this.initConfig.autotrack.page_manual_key || "");
        try {
          (e.page_viewport_width = window.innerWidth),
            (e.page_viewport_height = window.innerHeight),
            (e.page_total_width = document.documentElement.scrollWidth),
            (e.page_total_height = document.documentElement.scrollHeight),
            (e.scroll_width =
              document.documentElement.scrollLeft + window.innerWidth),
            (e.scroll_height =
              document.documentElement.scrollTop + window.innerHeight),
            (e.since_page_start_ms =
              Date.now() - window.performance.timing.navigationStart),
            (e.page_start_ms = window.performance.timing.navigationStart);
        } catch (n) {
          console.log("beat event error " + lr(n));
        }
        return e;
      }),
      (t.prototype.handleExposureEvent = function (e, n) {
        if (V2e(n.target)) return null;
        var r = JA(
          e.event || this.eventName.exposure,
          n,
          n.target || n,
          this.options,
          this.ignore
        );
        if (
          ((r.$exposure_type = e.exposureType), this.options.exposure.callback)
        ) {
          var i = this.options.exposure.callback(r);
          return i || Dn(i).length
            ? i
            : (console.warn("exposure callback must return data!"), r);
        }
        return r;
      }),
      (t.prototype.handleScrollEvent = function (e, n) {
        var r = JA(
          e.event || this.eventName.scroll,
          n,
          n.target || n,
          this.options,
          this.ignore
        );
        if (
          ((r = Ci(r, e.params)),
          !this.options.scroll.callback ||
            (r = this.options.scroll.callback(r)) ||
            Dn(r).length)
        )
          return r;
        console.warn("scroll callback must return data!");
      }),
      t
    );
  })(),
  GAn = (function () {
    function t(e) {
      (this.collect = e),
        (this.eventNameList = [
          "report_click_event",
          "report_change_event",
          "report_submit_event",
          "report_exposure_event",
          "report_page_view_event",
          "report_page_statistics_event",
          "report_beat_event",
        ]);
    }
    return (
      (t.prototype.send = function (e, n) {
        var r = n.event;
        delete n.event,
          e && e.eventSend === "becon"
            ? this.collect.beconEvent(r, n)
            : this.collect.event(r, n);
      }),
      (t.prototype.get = function (e, n) {
        var r = Ci(
          { headers: { "content-type": "application/json" }, method: "GET" },
          n
        );
        fetch(e, r);
      }),
      (t.prototype.post = function (e, n) {
        var r = Ci(
          { headers: { "content-type": "application/json" }, method: "POST" },
          n
        );
        fetch(e, r);
      }),
      t
    );
  })(),
  I$ = {},
  tne = [],
  NAn = function (t) {
    t.length &&
      t.forEach(function (e) {
        tne.push(e);
      });
  };
function j2e(t, e, n, r) {
  var i = (t && t.source) || window.opener || window.parent,
    o = (t && t.origin) || r || "*",
    l = { type: e, payload: n };
  i.postMessage(lr(l), o);
}
function FAn(t) {
  if (
    tne.some(function (i) {
      return i === "*";
    }) ||
    tne.some(function (i) {
      var o;
      return qt((o = t.origin)).call(o, i) > -1;
    })
  ) {
    var e = t.data;
    if (typeof t.data == "string")
      try {
        e = JSON.parse(t.data);
      } catch {
        e = void 0;
      }
    if (!e) return;
    var n = e.type,
      r = e.payload;
    I$[n] &&
      I$[n].forEach(function (i) {
        typeof i == "function" && i(t, r);
      });
  }
}
var wW = !1;
function UAn(t, e) {
  (window.TEAVisualEditor = window.TEAVisualEditor || {}),
    (window.TEAVisualEditor.appId = e.app_id);
  var n,
    r = e.channel_domain,
    i = "";
  if ((NAn(["*"]), r)) {
    var o,
      l = "";
    try {
      var u = window.performance.getEntriesByType("resource");
      if (
        u &&
        u.length &&
        (u.forEach(function (h) {
          var f;
          h.initiatorType === "script" &&
            h.name &&
            qt((f = h.name)).call(f, "collect") !== -1 &&
            (l = h.name);
        }),
        l && (o = l.split("/")) && o.length)
      ) {
        i = "https:/";
        for (var c = 2; c < o.length && c !== o.length - 1; c++)
          i = i + "/" + o[c];
        if (i && qt(i).call(i, "/5.0")) {
          var d = i.split("/5.0");
          i = d[0] || i;
        }
      }
    } catch {}
  }
  (function (h, f) {
    var p = {};
    if (Dn(h).length)
      for (var g in h) {
        if (g === "filter" || g === "autotrack" || g === "enable_stay_duration")
          break;
        p[g] = h[g];
      }
    var y = h.domain;
    (window.opener || window.parent).postMessage(
      { type: "tea:sdk:info", config: p, version: f },
      y
    ),
      window.addEventListener("message", FAn, !1);
  })(e, tv);
  try {
    (I$[(n = "tea:openHeatMapCore")] = I$[n] || []),
      I$[n].push(function (h) {
        var f = fRn,
          p = h.data.app_id;
        (p && p !== e.app_id) ||
          (function (g) {
            var y = g.event,
              v = g.editorUrl,
              b = g.autoTrackInstance;
            wW ||
              ((wW = !0),
              sRn(
                v,
                function () {
                  j2e(y, "editorScriptloadSuccess"), b.destroy();
                },
                function () {
                  y && j2e(y, "editorScriptloadError"), (wW = !1);
                }
              ));
          })({
            event: h,
            editorUrl: f + ".js?query=" + Date.now(),
            autoTrackInstance: t,
          });
      });
  } catch {
    console.log("openHeatMapCore error");
  }
}
var Ly,
  BAn = (function () {
    function t(e, n) {
      (this._instance = null),
        (this._intersection = e),
        (this.config = n),
        this._intersection && this.init();
    }
    return (
      (t.prototype.init = function () {
        var e = this;
        if (window.MutationObserver)
          try {
            if (
              ((this._instance = new MutationObserver(function (r) {
                r.forEach(function (i) {
                  i.type === "attributes" && e.attributeChangeObserve(i),
                    i.type === "childList" && e.modifyNodeObserve(i);
                });
              })),
              !document || !document.body)
            )
              return void console.warn(
                "please use sdk api init after body element"
              );
            var n = this.config.autotrack.exposure.attributes !== !1;
            this._instance.observe(document.body, {
              childList: !0,
              attributes: n,
              subtree: !0,
              attributeOldValue: !1,
            });
          } catch {
            console.log(
              "your browser cannot support MutationObserver，so cannot report exposure event, please update"
            );
          }
        else
          console.log(
            "your browser cannot support MutationObserver，so cannot report exposure event, please update"
          );
      }),
      (t.prototype.attributeChangeObserve = function (e) {
        e.target.hasAttribute("data-exposure")
          ? this.exposureAdd(e, "mutation")
          : this.exposureRemove(e);
      }),
      (t.prototype.modifyNodeObserve = function (e) {
        var n = this;
        Array.prototype.forEach.call(e.addedNodes, function (r) {
          r.nodeType === 1 &&
            r.hasAttribute("data-exposure") &&
            n.exposureAdd(r, "intersect"),
            n.mapChild(r, n.exposureAdd.bind(n));
        }),
          Array.prototype.forEach.call(e.removedNodes, function (r) {
            r.nodeType === 1 &&
              r.hasAttribute("data-exposure") &&
              n.exposureRemove(r),
              n.mapChild(r, n.exposureRemove.bind(n));
          });
      }),
      (t.prototype.mapChild = function (e, n) {
        var r = this;
        e.nodeType === 1 &&
          e.children.length &&
          Array.prototype.forEach.call(e.children, function (i) {
            i.nodeType === 1 && i.hasAttribute("data-exposure") && n(i),
              r.mapChild(i, n);
          });
      }),
      (t.prototype.exposureAdd = function (e, n) {
        try {
          this._intersection && this._intersection.exposureAdd(e, n);
        } catch (r) {
          console.log("intersection error", lr(r.message));
        }
      }),
      (t.prototype.exposureRemove = function (e) {
        try {
          this._intersection && this._intersection.exposureRemove(e);
        } catch (n) {
          console.log("intersection error", lr(n.message));
        }
      }),
      (t._exposure_observer = null),
      t
    );
  })();
(function (t) {
  (t[(t.EXPOSURE_ONCE = 0)] = "EXPOSURE_ONCE"),
    (t[(t.LIFECYCLE_SHOW_NEW = 3)] = "LIFECYCLE_SHOW_NEW"),
    (t[(t.RESUME_FORM_PAGE = 6)] = "RESUME_FORM_PAGE"),
    (t[(t.RESUME_FORM_BACK = 7)] = "RESUME_FORM_BACK"),
    (t[(t.NOT_EXPOSURE = -1)] = "NOT_EXPOSURE");
})(Ly || (Ly = {}));
var sS,
  HAn = (function () {
    function t(e, n, r) {
      var i = this;
      (this.backStatus = !1),
        (this.instance = this.buildObserver()),
        (this.collect = e),
        (this.observeMap = t._observer_map),
        n.autotrack.exposure.ratio
          ? (this.ratio = n.autotrack.exposure.ratio)
          : n.autotrack.exposure.ratio === 0
          ? (this.ratio = 0)
          : (this.ratio = 0.5),
        (this.timeLimit = n.autotrack.exposure.stay || 0),
        (this.exposureType = Ly.NOT_EXPOSURE),
        (this.eventHandle = r),
        (this.hashMap = new Lf()),
        (this.backStatus = !1),
        (this.lastState = null),
        this.collect.on("re-start-sdk", function () {
          i.visibilitychange();
        }),
        this.addListen();
    }
    return (
      (t.prototype.buildObserver = function () {
        var e = this;
        if (t._observer_instance)
          return (
            console.log(
              "your browser cannot support IntersectionObserver， so cannot report exposure event, please update"
            ),
            null
          );
        if (window.IntersectionObserver) {
          for (var n = [], r = 0; r <= 1; r += 0.01) n.push(r);
          n.push(1);
          try {
            t._observer_instance = new IntersectionObserver(
              function (i) {
                i.forEach(function (o) {
                  var l = o.target.observeId,
                    u = e.observeMap.get(l),
                    c = (o.target, o.isIntersecting, o.intersectionRatio);
                  if (
                    ((u.intersectionRatio = c),
                    c <= 0.1 && (o.target.backStatus = !1),
                    e.observeMap.set(l, u),
                    c < e.ratio)
                  )
                    return (
                      (u.isIntersecting = !1),
                      (u.added = !1),
                      (u.exposured = !1),
                      (u.startTime = Date.now()),
                      void e.observeMap.set(l, u)
                    );
                  if (!u.added) {
                    if (
                      ((u.startTime = Date.now()),
                      (u.added = !0),
                      (u.isIntersecting = !0),
                      e.timeLimit)
                    ) {
                      var d = setTimeout(function () {
                        try {
                          if (
                            u.isIntersecting &&
                            !u.exposured &&
                            e.observeMap.get(l)
                          ) {
                            var h = e.observeMap.get(l).intersectionRatio;
                            e.exposureEvent(o, h, l, u);
                          }
                        } catch (f) {
                          console.log(
                            "IntersectionObserver setTimeout error，msg: " +
                              lr(f)
                          );
                        }
                      }, e.timeLimit);
                      u.wait = d;
                    }
                    e.observeMap.set(l, u);
                  }
                  Date.now() - u.startTime >= e.timeLimit &&
                    !u.exposured &&
                    e.exposureEvent(o, c, l, u);
                });
              },
              { threshold: n }
            );
          } catch (i) {
            console.log("IntersectionObserver error，msg: " + lr(i));
          }
          return t._observer_instance;
        }
        return (
          console.log(
            "your browser cannot support IntersectionObserver， so cannot report exposure event, please update"
          ),
          null
        );
      }),
      (t.prototype.exposureAdd = function (e, n) {
        var r = n === "mutation" ? e.target : e,
          i = r.observeId,
          o = dC();
        if (i || this.observeMap.has(i)) {
          var l = this.observeMap.get(i);
          if (l && r !== l.instance)
            this.unobserve(r),
              this.observeMap.delete(i),
              (r.observeId = o),
              (r.visible = !1),
              this.observeMap.set(o, {
                instance: r.cloneNode(!0),
                isIntersecting: !1,
              }),
              this.observe(r);
          else {
            if (r.visible === !0) return;
            this.handleBoundingExposure(r);
          }
        } else
          (r.observeId = o),
            (r.visible = !1),
            this.observeMap.set(o, {
              instance: r.cloneNode(!0),
              isIntersecting: !1,
            }),
            this.observe(r);
      }),
      (t.prototype.exposureRemove = function (e) {
        this.observeMap.has(e.observeId) &&
          (this.observeMap.delete(e.observeId),
          this.unobserve(e),
          (e.observeId = ""),
          (e.visible = !1));
      }),
      (t.prototype.exposureEvent = function (e, n, r, i) {
        if (n >= this.ratio) {
          if (
            e.target.style.opacity === "0" ||
            e.target.style.visibility === "hidden" ||
            i.exposured === !0
          )
            return;
          i.startWait && clearTimeout(i.startWait);
          var o = e.target.getAttribute("data-exposure-event");
          this.eventHandle(
            {
              eventType: "dom",
              eventName: "exposure",
              event: o,
              exposureType: this.getExposureType(e.target),
            },
            e
          ),
            (e.target.visible = !0),
            (e.target.hasExposure = !0),
            (i.startTime = Date.now()),
            (i.exposured = !0);
        } else (i.startTime = Date.now()), (i.exposured = !1);
        this.observeMap.set(r, i);
      }),
      (t.prototype.observe = function (e) {
        this.instance && this.instance.observe(e);
      }),
      (t.prototype.unobserve = function (e) {
        this.instance && this.instance.unobserve(e);
      }),
      (t.prototype.getExposureDomToExposure = function () {
        var e = this;
        Array.prototype.forEach.call(
          document.querySelectorAll("[data-exposure]"),
          function (n) {
            e.handleBoundingExposure(n);
          }
        );
      }),
      (t.prototype.visibilitychange = function () {
        var e = this,
          n = null;
        document.visibilityState === "visible"
          ? this.timeLimit
            ? (n = setTimeout(function () {
                e.getExposureDomToExposure();
              }, this.timeLimit))
            : this.getExposureDomToExposure()
          : (clearTimeout(n), (this.customType = void 0));
      }),
      (t.prototype.handleBoundingExposure = function (e) {
        if (this.getBoundingRatio(e) >= this.ratio) {
          e.visible = !0;
          var n = e.getAttribute && e.getAttribute("data-exposure-event");
          this.eventHandle(
            {
              eventType: "dom",
              eventName: "exposure",
              event: n,
              exposureType: this.customType || Ly.RESUME_FORM_BACK,
            },
            e
          );
        }
      }),
      (t.prototype.getBoundingRatio = function (e) {
        var n = e.getBoundingClientRect(),
          r = n.top,
          i = n.left,
          o = n.width,
          l = n.height,
          u = window.innerWidth || document.documentElement.clientWidth,
          c = window.innerHeight || document.documentElement.clientHeight;
        return r >= 0 && i >= 0 && r <= c && i <= u
          ? ((o > u ? u : o) * (c - r)) / (o * l)
          : 0;
      }),
      (t.prototype.getExposureType = function (e) {
        return (
          e.visible
            ? e.backStatus !== !1 &&
              (this.backStatus ||
                this.customType ||
                window.performance.navigation.type === 2)
              ? (this.exposureType = Ly.RESUME_FORM_PAGE)
              : (this.exposureType = Ly.LIFECYCLE_SHOW_NEW)
            : (e.hasExposure,
              e.backStatus !== !1 &&
              (this.backStatus ||
                this.customType ||
                window.performance.navigation.type === 2)
                ? (this.exposureType = Ly.RESUME_FORM_PAGE)
                : (this.exposureType = Ly.EXPOSURE_ONCE)),
          this.exposureType
        );
      }),
      (t.prototype.addListen = function () {
        var e = this;
        this.collect.on("set-exposure-type", function (c) {
          e.customType = c;
        });
        var n,
          r,
          i,
          o = this.visibilitychange.bind(this);
        if (
          ((n = document),
          (r = "visibilitychange"),
          (i = o),
          n.addEventListener
            ? n.addEventListener(r, i, !1)
            : n.attachEven
            ? n.attachEven("on" + r, i)
            : (n["on" + r] = i),
          window.addEventListener("hashchange", function (c) {
            var d = e.hashMap.get(c.oldURL);
            d && location.href === d.prev
              ? ((e.backStatus = !0), (e.exposureType = Ly.RESUME_FORM_PAGE))
              : ((e.backStatus = !1),
                e.hashMap.set(location.href, {
                  current: c.newURL,
                  prev: c.oldURL,
                }));
          }),
          this.collect.bridgeReport)
        ) {
          var l = window.history.pushState;
          history.pushState = function (c) {
            for (var d = [], h = 1; h < arguments.length; h++)
              d[h - 1] = arguments[h];
            typeof history.onpushstate == "function" &&
              history.onpushstate({ state: c });
            var f = l.call.apply(l, QS([history, c], d));
            return (e.lastState = c), f;
          };
          var u = history.replaceState;
          history.replaceState = function (c) {
            for (var d = [], h = 1; h < arguments.length; h++)
              d[h - 1] = arguments[h];
            typeof history.onreplacestate == "function" &&
              history.onreplacestate({ state: c });
            var f = u.call.apply(u, QS([history, c], d));
            return (e.lastState = c), f;
          };
        } else
          this.collect.on("STATE_CHANGE", function (c) {
            e.lastState = c;
          });
        return (
          window.addEventListener("popstate", function (c) {
            var d = c.state;
            d &&
            d.current &&
            e.lastState &&
            e.lastState.back &&
            d.current === e.lastState.back
              ? ((e.backStatus = !0), (e.exposureType = Ly.RESUME_FORM_PAGE))
              : (e.backStatus = !1);
          }),
          function () {
            var c, d, h;
            (c = document),
              (d = "visibilitychange"),
              (h = o),
              c.addEventListener
                ? c.removeEventListener(d, h, !1)
                : c.attachEven && c.detachEven("on" + d, h);
          }
        );
      }),
      (t._observer_instance = null),
      (t._observer_map = new Lf()),
      t
    );
  })(),
  XAn = (function () {
    function t(e, n, r) {
      n.autotrack &&
        n.autotrack.exposure &&
        ((this._intersection = new HAn(e, n, r)),
        (this._observer = new BAn(this._intersection, n)),
        this._intersection && this._observer
          ? this.initObserver()
          : console.log(
              "your browser version cannot support exposure event, please update~"
            ));
    }
    return (
      (t.prototype.initObserver = function () {
        var e = this;
        Array.prototype.forEach.call(
          document.querySelectorAll("[data-exposure]"),
          function (n) {
            e._intersection.exposureAdd(n, "intersect");
          }
        );
      }),
      t
    );
  })();
(function (t) {
  (t[(t.SCROLL_UP = 1)] = "SCROLL_UP"),
    (t[(t.SCROLL_DOWN = 2)] = "SCROLL_DOWN"),
    (t[(t.SCROLL_LEFT = 3)] = "SCROLL_LEFT"),
    (t[(t.SCROLL_RIGHT = 4)] = "SCROLL_RIGHT"),
    (t[(t.NOT_SCROLL = -1)] = "NOT_SCROLL");
})(sS || (sS = {}));
var W2e,
  VAn = (function () {
    function t(e, n) {
      (this.distance = 30),
        e.autotrack &&
          e.autotrack.scroll &&
          (e.autotrack.scroll.distance &&
            (this.distance = e.autotrack.scroll.distance),
          (this.eventHandle = n),
          this.addLinstenr(),
          this.mutation());
    }
    return (
      (t.prototype.addLinstenr = function () {
        var e = this;
        Array.prototype.forEach.call(
          document.querySelectorAll("[data-scroll]"),
          function (n) {
            e.scrollHandle(n);
          }
        );
      }),
      (t.prototype.mutation = function () {
        var e = this;
        if (window.MutationObserver)
          try {
            var n = new MutationObserver(function (r) {
              r.forEach(function (i) {
                i.type === "childList" && e.modifyNodeObserve(i);
              });
            });
            if (!document || !document.body)
              return void console.warn(
                "please use sdk api init after body element"
              );
            n.observe(document.body, {
              childList: !0,
              attributes: !0,
              subtree: !0,
              attributeOldValue: !1,
            });
          } catch {
            console.log("your browser cannot support MutationObserver");
          }
        else console.log("your browser cannot support MutationObserver");
      }),
      (t.prototype.modifyNodeObserve = function (e) {
        var n = this;
        Array.prototype.forEach.call(e.addedNodes, function (r) {
          r.nodeType === 1 &&
            r.hasAttribute("data-scroll") &&
            n.scrollHandle(r),
            n.mapChild(r, n.scrollHandle.bind(n));
        }),
          Array.prototype.forEach.call(e.removedNodes, function (r) {
            r.nodeType === 1 &&
              r.hasAttribute("data-scroll") &&
              n.scrollHandle(r, "remove"),
              n.mapChild(r, n.scrollHandle.bind(n));
          });
      }),
      (t.prototype.mapChild = function (e, n) {
        var r = this;
        e.nodeType === 1 &&
          e.children.length &&
          Array.prototype.forEach.call(e.children, function (i) {
            i.nodeType === 1 && i.hasAttribute("data-scroll") && n(i),
              r.mapChild(i, n);
          });
      }),
      (t.prototype.scrollHandle = function (e, n) {
        var r = this;
        try {
          var i = e.scrollTop,
            o = e.scrollLeft,
            l = null,
            u = 0,
            c = 0,
            d = function (h) {
              clearTimeout(l),
                (l = setTimeout(function () {
                  var y = e.scrollTop,
                    v = e.scrollLeft,
                    b =
                      (h.target &&
                        h.target.getAttribute("data-scroll-event")) ||
                      "";
                  g === 1 || g === 2
                    ? y === f &&
                      ((c = f - i),
                      Math.abs(c) >= r.distance &&
                        r.distance &&
                        r.eventHandle(
                          {
                            eventType: "dom",
                            eventName: "scroll",
                            event: b,
                            params: { $direction: g, $offsetY: c, $offsetX: u },
                          },
                          h
                        ))
                    : (g !== 3 && g !== 4) ||
                      (v === p &&
                        ((u = p - o),
                        Math.abs(u) >= r.distance &&
                          r.distance &&
                          r.eventHandle(
                            {
                              eventType: "dom",
                              eventName: "scroll",
                              event: b,
                              params: {
                                $direction: g,
                                $offsetY: c,
                                $offsetX: u,
                              },
                            },
                            h
                          ))),
                    (i = f),
                    (o = p);
                }, 100));
              var f = e.scrollTop,
                p = e.scrollLeft,
                g = sS.NOT_SCROLL;
              f > i
                ? (g = sS.SCROLL_DOWN)
                : f < i
                ? (g = sS.SCROLL_UP)
                : p > o
                ? (g = sS.SCROLL_LEFT)
                : p < o && (g = sS.SCROLL_RIGHT);
            };
          return (
            n === "remove"
              ? e.removeEventListener("scroll", d, !1)
              : e.addEventListener("scroll", d, !1),
            function () {
              e.removeEventListener("scroll", d, !1);
            }
          );
        } catch (h) {
          console.warn("scroll event error", lr(h));
        }
      }),
      t
    );
  })(),
  zAn = { hashTag: !1, impr: !1 },
  jAn = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        if (
          ((this.autoTrackStart = !1),
          (this.collect = e),
          (this.config = n),
          n.autotrack)
        ) {
          var r = e.Types;
          this.ready(r.Autotrack), this.collect.emit(r.AutotrackReady);
        }
      }),
      (t.prototype.ready = function (e) {
        this.collect.set(e);
        var n = this.config.autotrack;
        (n = ti(n) == "object" ? n : {}),
          (n = Ci(zAn, n)),
          (this.destroyed = !1),
          (this.options = n),
          (this.Config = new xAn($An, this.options)),
          (this.Exposure = new XAn(
            this.collect,
            this.config,
            this.handle.bind(this)
          )),
          (this.Scroll = new VAn(this.config, this.handle.bind(this))),
          (this.Listener = new CAn(n, this.collect, this.Config)),
          (this.EventHandle = new OAn(this.config, n)),
          (this.Request = new GAn(this.collect)),
          (this.autoTrackStart = !0),
          this.init(),
          UAn(this, this.config);
      }),
      (t.prototype.init = function () {
        this.Listener.init(this.handle.bind(this));
        try {
          this.collect.loadType === "base" &&
            (window.opener || window.parent).postMessage("[tea-sdk]ready", "*");
        } catch {}
      }),
      (t.prototype.handle = function (e, n) {
        try {
          if (
            this.config.autotrack.collect_url &&
            !this.config.autotrack.collect_url()
          )
            return;
        } catch {}
        e.eventType === "dom" && this.handleDom(e, n);
      }),
      (t.prototype.handleDom = function (e, n) {
        try {
          var r = e.eventName;
          if (r === "click" || r === "change" || r === "submit")
            (u = this.EventHandle.handleEvent(n, r)) &&
              this.Request.send({ eventType: "custom" }, u);
          else if (r === "page_view" || r === "page_statistics") {
            var i;
            (i =
              r === "page_view"
                ? this.EventHandle.handleViewEvent(n)
                : this.EventHandle.handleStatisticsEvent(n)) &&
              this.Request.send({ eventType: "custom" }, i);
          } else if (r === "beat") {
            var o = this.EventHandle.handleBeadtEvent(n),
              l = e.eventSend;
            o && this.Request.send({ eventType: "custom", eventSend: l }, o);
          } else if (r === "exposure")
            (u = this.EventHandle.handleExposureEvent(e, n)) &&
              this.Request.send({ eventType: "custom" }, u);
          else if (r === "scroll") {
            var u;
            (u = this.EventHandle.handleScrollEvent(e, n)) &&
              this.Request.send({ eventType: "custom" }, u);
          }
        } catch (c) {
          console.log("handel dom event error " + lr(c));
        }
      }),
      (t.prototype.destroy = function () {
        if (!this.autoTrackStart)
          return console.warn(
            "engine is undefined, make sure you have called autoTrack.start()"
          );
        (this.autoTrackStart = !1), this.Listener.removeListener();
      }),
      t
    );
  })();
(function (t) {
  (t.Net = "net"), (t.FailNet = "f_net"), (t.FailData = "f_data");
})(W2e || (W2e = {}));
var K2e = {
    pv: ["predefine_pageview"],
    sdk: [
      "_be_active",
      "predefine_page_alive",
      "predefine_page_close",
      "__profile_set",
      "__profile_set_once",
      "__profile_increment",
      "__profile_unset",
      "__profile_append",
    ],
    autotrack: [
      "bav2b_click",
      "bav2b_page",
      "bav2b_beat",
      "bav2b_page_statistics",
      "__bav_click",
      "__bav_page",
      "__bav_beat",
      "__bav_page_statistics",
    ],
  },
  WAn = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        if (n.app_id && n.enable_tracer && !n.disable_track_event) {
          (this.limit = { pv: 1, sdk: 3, autotrack: 3, log: 3 }),
            (this.errorCode = { f_net: 0, f_data: 0 }),
            (this.tracerCache = new Lf()),
            (this.collect = e),
            (this.appid = n.app_id),
            (this.reportUrl = e.configManager.getUrl("event"));
          var i = this.collect.Types;
          this.collect.on(i.Event, function () {
            r.addCount("log");
          }),
            this.collect.on(i.SubmitError, function (o) {
              var l = o.type,
                u = o.eventDate,
                c = o.errorCode,
                d = o.response;
              r.addErrorCount(u, l, c, d);
            }),
            this.listener(),
            this.collect.emit(i.TracerReady);
        }
      }),
      (t.prototype.addCount = function (e, n, r) {
        n === void 0 && (n = "net"), r === void 0 && (r = 1);
        try {
          this.tracerCache || (this.tracerCache = new Lf());
          var i = void 0;
          if (this.tracerCache.has(e))
            (o = this.tracerCache.get(e)).has(n)
              ? ((i = o.get(n).params.count),
                i++,
                o.set(n, this.processTracer(i, e, n)))
              : ((i = r), o.set(n, this.processTracer(r, e, n)));
          else {
            var o = new Lf();
            (i = r),
              o.set(n, this.processTracer(r, e, n)),
              this.tracerCache.set(e, o);
          }
          n === "net" && i >= this.limit[e] && this.report(!1);
        } catch (l) {
          console.log(l);
        }
      }),
      (t.prototype.addErrorCount = function (e, n, r, i) {
        var o = this;
        try {
          if (e && e.length) {
            var l = e[0].events;
            l &&
              l.length &&
              (n === "f_data"
                ? (i && i.hasOwnProperty("sc")
                    ? this.addCount("log", n, l.length - i.sc)
                    : this.addCount("log", n, l.length),
                  (this.errorCode[n] = r))
                : l.forEach(function (u) {
                    var c = "log";
                    for (var d in K2e) {
                      var h;
                      if (qt((h = K2e[d])).call(h, u.event) !== -1) {
                        c = d;
                        break;
                      }
                    }
                    o.addCount(c, n, 1), (o.errorCode[n] = r);
                  }));
          }
        } catch {}
      }),
      (t.prototype.report = function (e) {
        if (this.tracerCache) {
          var n = [];
          this.tracerCache.forEach(function (r) {
            console.log(r),
              r.forEach(function (i) {
                n.push(i);
              });
          }),
            n && n.length && this.sendTracer(n, e);
        }
      }),
      (t.prototype.sendTracer = function (e, n) {
        try {
          var r = this.collect.eventManager.merge(e);
          this.collect.requestManager.useRequest({
            url: this.reportUrl,
            data: r,
            useBeacon: n,
          }),
            (this.tracerCache = null);
        } catch {}
      }),
      (t.prototype.processTracer = function (e, n, r) {
        var i = {
          count: e,
          state: r,
          key: n,
          params_for_special: "applog_trace",
          aid: this.appid,
          platform: "web",
          _staging_flag: 1,
          sdk_version: tv,
        };
        (r !== "f_net" && r !== "f_data") || (i.errorCode = this.errorCode[r]);
        var o = this.collect.processEvent("applog_trace", i);
        if (o && o.event) return delete o.is_bav, o;
      }),
      (t.prototype.listener = function () {
        var e = this;
        document.addEventListener("visibilitychange", function () {
          document.visibilityState === "hidden" && e.leavePage();
        }),
          pue(function () {
            e.leavePage();
          });
      }),
      (t.prototype.leavePage = function () {
        this.report(!0);
      }),
      t
    );
  })(),
  KAn = (function () {
    function t() {
      (this.retryWaitTime = 3e3),
        (this.retryStatus = !1),
        (this.retryCacheStatus = !1);
    }
    return (
      (t.prototype.apply = function (e, n) {
        var r = this;
        if (
          n.enable_storage &&
          !n.disable_storage &&
          ((this.collect = e), (this.config = n), !this.collect.destroy)
        ) {
          var i = e.Types,
            o = e.adapters.storage;
          (this.storage = new o(!1)),
            (this.eventUrl = this.collect.configManager.getUrl("event")),
            (this.eventKey = "__tea_cache_events_" + n.app_id),
            (this.storageNum = n.storage_num || 50),
            (this.retryNum = n.retry_num || 3),
            (this.retryInterval = 1e3),
            e.on(i.SubmitError, function (l) {
              l.type !== "f_data" && r.storeData(l);
            }),
            e.on(i.Ready, function () {
              r.checkStorage();
            });
        }
      }),
      (t.prototype.retryRightNow = function (e) {
        var n = this;
        if (this.retryStatus) this.errorCache.push(e);
        else {
          var r = 0;
          this.retryStatus = !0;
          var i = setInterval(function () {
            if (r === 3)
              return (
                n.storeData(n.errorCache),
                (n.retryStatus = !1),
                void clearInterval(i)
              );
            var o = e.eventData;
            n.fetchData(
              o,
              function () {
                var l;
                (n.retryStatus = !1),
                  clearInterval(i),
                  n.retryCacheStatus && tl((l = n.errorCache)).call(l, 0, 1),
                  n.errorCache.length &&
                    ((n.retryCacheStatus = !0),
                    n.retryRightNow(n.errorCache[0]));
              },
              function () {
                r++;
              }
            );
          }, this.retryInterval);
        }
      }),
      (t.prototype.storeData = function (e) {
        var n = this.storage.getItem(this.eventKey),
          r = e.eventData;
        Dn(n).length !== this.storageNum &&
          ((n[Date.now()] = r), this.storage.setItem(this.eventKey, n));
      }),
      (t.prototype.checkStorage = function () {
        var e = this;
        try {
          if (!window.navigator.onLine) return;
          var n = this.storage.getItem(this.eventKey);
          if (!n || !Dn(n).length) return;
          var r = {
            events: [
              {
                event: "ontest",
                params: { app_id: this.config.app_id },
                local_time_ms: Date.now(),
              },
            ],
            user: { user_unique_id: this.collect.configManager.get("web_id") },
            header: {},
          };
          this.fetchData(
            [r],
            function () {
              var i = JSON.parse(lr(n)),
                o = function (u) {
                  e.fetchData(
                    n[u],
                    function () {
                      delete i[u], e.storage.setItem(e.eventKey, i);
                    },
                    function () {},
                    !1
                  );
                };
              for (var l in n) o(l);
            },
            function () {
              console.log("network error，compensate report fail");
            },
            !0
          );
        } catch {
          console.warn("error check storage");
        }
      }),
      (t.prototype.fetchData = function (e, n, r, i) {
        this.collect.requestManager.useRequest({
          url: this.eventUrl,
          data: e,
          timeout: 3e4,
          success: n,
          fail: r,
          app_key: i ? "566f58151b0ed37e" : "",
        });
      }),
      t
    );
  })(),
  kW =
    typeof window < "u"
      ? (window.LogPluginObject || (window.LogPluginObject = {}),
        window.LogPluginObject)
      : null,
  ZAn = (function () {
    function t() {}
    return (
      (t.prototype.apply = function (e, n) {
        (this._plugin = {}),
          (this.config = n),
          (this.collect = e),
          (this.channel = n.channel || "cn"),
          this.loadExtend();
      }),
      (t.prototype.loadExtend = function () {
        var e = this;
        try {
          this.collect.remotePlugin.forEach(function (n, r) {
            if (n === "sdk")
              if (SW.hasOwnProperty(r)) {
                var i = SW[r].object,
                  o = SW[r].src[e.channel] + "?query=" + Date.now();
                e.exist(r, i, o);
              } else
                console.warn(
                  "your " + r + " is not exist，please check plugin name"
                );
            else
              ti(n) == "object" &&
                (n.src
                  ? e.exist(r, n.call, n.src)
                  : e.process(r, n.instance, "INSTANCE"));
          });
        } catch (n) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: n.message,
          }),
            console.log("load extend error");
        }
      }),
      (t.prototype.exist = function (e, n, r) {
        var i = this;
        kW[n]
          ? (this.process(e, kW[n]),
            console.log("已有" + e + "插件，避免重复加载~"))
          : this.loadPlugin(
              e,
              r,
              function () {
                i.process(e, kW[n]),
                  console.log(
                    " %c %s %s %s",
                    "color: yellow; background-color: black;",
                    "–",
                    "load plugin:" + e + " success",
                    "-"
                  );
              },
              function () {
                console.log(
                  " %c %s %s %s",
                  "color: red; background-color: yellow;",
                  "–",
                  "load plugin:" + e + " error",
                  "-"
                );
              }
            );
      }),
      (t.prototype.process = function (e, n, r) {
        try {
          if (r) {
            var i = new n();
            i.apply && i.apply(this.collect, this.config),
              console.log("excude " + e + " success");
          } else n && n(this.collect, this.config);
        } catch (o) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: o.message,
          }),
            console.log("excude " + e + " error, message:" + o.message);
        }
      }),
      (t.prototype.loadPlugin = function (e, n, r, i) {
        var o = this;
        try {
          var l = document.createElement("script");
          (l.src = n),
            this._plugin[e] || (this._plugin[e] = []),
            this._plugin[e].push(r),
            (l.onerror = function () {
              i(n);
            }),
            (l.onload = function () {
              o._plugin[e].forEach(function (u) {
                u();
              });
            }),
            document.getElementsByTagName("head")[0].appendChild(l);
        } catch (u) {
          this.collect.emit(Un.DEBUGGER_MESSAGE, {
            type: Un.DEBUGGER_MESSAGE_SDK,
            info: "发生了异常",
            level: "error",
            time: Date.now(),
            data: u.message,
          });
        }
      }),
      t
    );
  })(),
  YAn = (function () {
    function t() {
      (this.autotrack = !1),
        (this.spa = !1),
        (this.cache = {}),
        (this.allowHash = !1);
    }
    return (
      (t.prototype.apply = function (e, n) {
        if (n.spa || n.autotrack) {
          var r = e.Types;
          (this.collect = e),
            (this.config = n),
            (this.appid = n.app_id),
            (this.allowHash = n.allow_hash),
            (this.fncArray = new Lf()),
            this.setKey(),
            this.setLocation(),
            this.hack(),
            this.init(),
            this.listener(),
            e.emit(r.RouteReady);
        }
      }),
      (t.prototype.setKey = function () {
        var e = this.collect.adapters.storage;
        (this.storage = new e(!1)),
          (this.cache_key = "__tea_cache_refer_" + this.appid),
          (this.cache = {
            refer_key: "",
            refer_title: document.title || location.pathname,
            refer_manual_key: "",
            routeChange: !1,
          }),
          this.config.autotrack &&
            ti(this.config.autotrack) == "object" &&
            this.config.autotrack.page_manual_key &&
            (this.cache.refer_manual_key =
              this.config.autotrack.page_manual_key),
          this.storage.setItem(this.cache_key, this.cache);
      }),
      (t.prototype.hack = function () {
        var e = this,
          n = window.history.pushState;
        history.pushState = function (i) {
          for (var o = [], l = 1; l < arguments.length; l++)
            o[l - 1] = arguments[l];
          typeof history.onpushstate == "function" &&
            history.onpushstate({ state: i });
          var u = n.call.apply(n, QS([history, i], o));
          if (e.collect.sdkStop || e.collect.destroy) return u;
          if (
            !(
              e.lastLocation === location.href ||
              (e.config.disable_spa_query && e.pathEquel())
            )
          ) {
            e.setReferCache(e.lastLocation);
            var c = e.getPopStateChangeEventData();
            return (
              (e.lastLocation = location.href), e.sendPv(c, "pushState"), u
            );
          }
        };
        var r = history.replaceState;
        history.replaceState = function (i) {
          for (var o = [], l = 1; l < arguments.length; l++)
            o[l - 1] = arguments[l];
          typeof history.onreplacestate == "function" &&
            history.onreplacestate({ state: i });
          var u = r.call.apply(r, QS([history, i], o));
          if (e.collect.sdkStop || e.collect.destroy) return u;
          if (
            !(
              e.lastLocation === location.href ||
              (e.config.disable_spa_query && e.pathEquel())
            )
          ) {
            e.setReferCache(e.lastLocation);
            var c = e.getPopStateChangeEventData();
            return (e.lastLocation = location.href), e.sendPv(c), u;
          }
        };
      }),
      (t.prototype.setLocation = function () {
        typeof window < "u" && (this.lastLocation = window.location.href);
      }),
      (t.prototype.getLocation = function () {
        return this.lastLocation;
      }),
      (t.prototype.pathEquel = function () {
        try {
          return (
            new Bs(this.lastLocation).origin +
              new Bs(this.lastLocation).pathname ===
            new Bs(location.href).origin + new Bs(location.href).pathname
          );
        } catch {
          return !1;
        }
      }),
      (t.prototype.init = function () {
        var e = this.getPopStateChangeEventData();
        this.collect.emit("route-change", { config: e, init: !0 });
      }),
      (t.prototype.listener = function () {
        var e = this;
        window.addEventListener("hashchange", function (n) {
          if (
            !e.collect.sdkStop &&
            !e.collect.destroy &&
            e.lastLocation !== window.location.href &&
            (!e.config.disable_spa_query || !e.pathEquel()) &&
            e.allowHash
          ) {
            e.setReferCache(e.lastLocation),
              (e.lastLocation = window.location.href);
            var r = e.getPopStateChangeEventData();
            e.sendPv(r);
          }
        }),
          window.addEventListener("popstate", function (n) {
            if (
              !e.collect.sdkStop &&
              !e.collect.destroy &&
              !(
                e.lastLocation === window.location.href ||
                (e.config.disable_spa_query && e.pathEquel())
              )
            ) {
              e.setReferCache(e.lastLocation),
                (e.lastLocation = window.location.href);
              var r = e.getPopStateChangeEventData();
              e.sendPv(r);
            }
          });
      }),
      (t.prototype.getPopStateChangeEventData = function () {
        var e = this.pageConfig();
        return (e.is_back = 0), e;
      }),
      (t.prototype.pageConfig = function () {
        try {
          var e,
            n = this.storage.getItem(this.cache_key) || {},
            r = this.storage.getItem("__tea_cache_first_" + this.appid);
          return (
            (e = !r || r != 1),
            {
              is_html: 1,
              url: location.href,
              referrer: this.handleRefer(),
              page_key: location.href,
              refer_page_key: this.handleRefer(),
              page_title: document.title || location.pathname,
              page_manual_key:
                (this.config.autotrack &&
                  this.config.autotrack.page_manual_key) ||
                "",
              refer_page_manual_key: (n && n.refer_manual_key) || "",
              refer_page_title: (n && n.refer_title) || "",
              page_path: location.pathname,
              page_host: location.host,
              is_first_time: "" + e,
            }
          );
        } catch (i) {
          return (
            this.collect.emit(Un.DEBUGGER_MESSAGE, {
              type: Un.DEBUGGER_MESSAGE_SDK,
              info: "发生了异常",
              level: "error",
              time: Date.now(),
              data: i.message,
            }),
            {}
          );
        }
      }),
      (t.prototype.sendPv = function (e, n) {
        this.collect.emit("route-change", { config: e, init: !1 });
      }),
      (t.prototype.handleRefer = function () {
        var e = "";
        try {
          var n = this.storage.getItem(this.cache_key) || {};
          e = n.routeChange
            ? n.refer_key
            : this.collect.configManager.get("referrer");
        } catch {
          e = document.referrer;
        }
        return e;
      }),
      (t.prototype.setReferCache = function (e) {
        var n = this.storage.getItem(this.cache_key) || {};
        (n.refer_key = e),
          (n.routeChange = !0),
          this.storage.setItem(this.cache_key, n);
      }),
      t
    );
  })();
bp.usePlugin(ZAn, "extend"),
  bp.usePlugin(bAn, "ab"),
  bp.usePlugin(AAn, "stay"),
  bp.usePlugin(jAn, "autotrack"),
  bp.usePlugin(_An, "et"),
  bp.usePlugin(wAn, "profile"),
  bp.usePlugin(KAn, "retry"),
  bp.usePlugin(kAn, "heartbeat"),
  bp.usePlugin(IAn, "monitor"),
  bp.usePlugin(YAn, "route"),
  bp.usePlugin(WAn, "tracer"),
  new bp("default");
var IW,
  QAn = bp,
  jx = (function (t) {
    return (
      (t.H265 = "h265"),
      (t.PRELOAD = "preload"),
      (t.ADAPT_RANGE = "adaptRange"),
      (t.RTM_ADAPTIVE_BUFFER = "rtmAdaptiveBuffer"),
      t
    );
  })(jx || {}),
  RVe = (function () {
    function t(e) {
      Wn(this, t),
        bn(this, "_strategyManager", void 0),
        (this._strategyManager = e);
    }
    return (
      Kn(t, [
        {
          key: "getResult",
          value: function () {
            var e,
              n,
              r =
                (e =
                  this._strategyManager.getStrategyRecommendations().result) ===
                  null || e === void 0
                  ? void 0
                  : e[jx.RTM_ADAPTIVE_BUFFER];
            return (
              this._strategyManager.tea.config({ evtParams: $n({}, r) }),
              (n =
                this._strategyManager.getStrategyRecommendations().result) ===
                null || n === void 0
                ? void 0
                : n[jx.RTM_ADAPTIVE_BUFFER]
            );
          },
        },
      ]),
      t
    );
  })();
bn(RVe, "strategyKey", jx.RTM_ADAPTIVE_BUFFER);
var Z2e,
  JAn =
    (bn((IW = {}), jx.RTM_ADAPTIVE_BUFFER, {
      moduleName: Os.StrategyRtmAdaptiveBuffer,
      getModule: function (t) {
        return t == null ? void 0 : t.VeStrategyRtmAdaptiveBuffer;
      },
    }),
    bn(IW, "vestrategy", {
      moduleName: Os.StrategyBase,
      getModule: function (t) {
        return t == null ? void 0 : t.VeStrategy;
      },
    }),
    IW),
  qAn = (function () {
    function t() {
      Wn(this, t), bn(this, "veStrategyManager", void 0);
    }
    return (
      Kn(t, [
        {
          key: "create",
          value: function (e) {
            var n;
            return (
              (this.veStrategyManager = new rRn({
                loadPlugin:
                  ((n = Gi(
                    or().mark(function r(i) {
                      var o, l, u, c, d;
                      return or().wrap(function (h) {
                        for (;;)
                          switch ((h.prev = h.next)) {
                            case 0:
                              if (
                                ((l =
                                  (o = JAn[i]) !== null && o !== void 0
                                    ? o
                                    : {}),
                                (u = l.moduleName),
                                (c = l.getModule),
                                !u)
                              ) {
                                h.next = 6;
                                break;
                              }
                              return (
                                (h.next = 4),
                                Nf(u)
                                  .then(function (f) {
                                    return c == null ? void 0 : c(f);
                                  })
                                  .catch(function () {})
                              );
                            case 4:
                              return (d = h.sent), h.abrupt("return", d);
                            case 6:
                              return h.abrupt("return");
                            case 7:
                            case "end":
                              return h.stop();
                          }
                      }, r);
                    })
                  )),
                  function (r) {
                    return n.apply(this, arguments);
                  }),
                tea: e,
                Collector: QAn,
                strategies: [RVe],
              })),
              this.veStrategyManager
            );
          },
        },
      ]),
      t
    );
  })(),
  AVe = new qAn();
WC.extend([
  { LANG: "zh-cn", TEXT: yzt },
  { LANG: "en", TEXT: mzt },
]);
var ewn = { autoplay: { muted: !0 } },
  twn = Ce((Z2e = [])).call(Z2e, Cf(m8e), [iVt, hzt, gzt]),
  nne = (function (t) {
    return (t.H264 = "h264"), t;
  })(nne || {}),
  nwn = (function (t) {
    so(o, _8e);
    var e,
      n,
      r,
      i = lo(o);
    function o(l) {
      var u;
      return (
        Wn(this, o),
        bn(os((u = i.call(this, l))), "_protocolManager", void 0),
        u
      );
    }
    return (
      Kn(o, [
        {
          key: "playTime",
          get: function () {
            var l;
            if (
              (l = this._player) === null ||
              l === void 0 ||
              (l = l.played) === null ||
              l === void 0 ||
              !l.length
            )
              return 0;
            for (var u = this._player.played.length, c = 0, d = 0; d < u; d++) {
              var h,
                f,
                p =
                  (h = this._player) === null || h === void 0
                    ? void 0
                    : h.played.start(d);
              c +=
                ((f = this._player) === null || f === void 0
                  ? void 0
                  : f.played.end(d)) - p;
            }
            return c;
          },
        },
        {
          key: "ad",
          get: function () {
            var l;
            return (l = this._player.plugins) === null ||
              l === void 0 ||
              (l = l.ad) === null ||
              l === void 0
              ? void 0
              : l.adManager;
          },
        },
        {
          key: "hls",
          get: function () {
            var l;
            return (l = this._player.plugins) === null ||
              l === void 0 ||
              (l = l.hls) === null ||
              l === void 0
              ? void 0
              : l.hls;
          },
        },
        {
          key: "openLog",
          value: function () {
            var l;
            (l = this._player.plugins) === null ||
              l === void 0 ||
              l.logger.open();
          },
        },
        {
          key: "closeLog",
          value: function () {
            var l;
            (l = this._player.plugins) === null ||
              l === void 0 ||
              l.logger.close();
          },
        },
        {
          key: "openInfoPanel",
          value: function () {
            var l;
            (l = this._player.plugins) === null ||
              l === void 0 ||
              l.infopanel.open();
          },
        },
        {
          key: "closeInfoPanel",
          value: function () {
            var l;
            (l = this._player.plugins) === null ||
              l === void 0 ||
              l.infopanel.close();
          },
        },
        {
          key: "openAbr",
          value: function () {
            var l,
              u,
              c = this.url && nE(this.url);
            c !== "flv"
              ? c === "hls" &&
                ((l = this._player.plugins) === null ||
                  l === void 0 ||
                  (l = l.hlsabr) === null ||
                  l === void 0 ||
                  l.switchAbr(!0))
              : (u = this._player.plugins) === null ||
                u === void 0 ||
                (u = u.abr) === null ||
                u === void 0 ||
                u.switchAbr(!0);
          },
        },
        {
          key: "closeAbr",
          value: function () {
            var l,
              u,
              c = this.url && nE(this.url);
            c !== "flv"
              ? c === "hls" &&
                ((l = this._player.plugins) === null ||
                  l === void 0 ||
                  (l = l.hlsabr) === null ||
                  l === void 0 ||
                  l.switchAbr(!1))
              : (u = this._player.plugins) === null ||
                u === void 0 ||
                (u = u.abr) === null ||
                u === void 0 ||
                u.switchAbr(!1);
          },
        },
        {
          key: "updateDrmConfig",
          value:
            ((r = Gi(
              or().mark(function l(u) {
                var c;
                return or().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return d.abrupt(
                            "return",
                            (c = this._protocolManager) === null ||
                              c === void 0 ||
                              (c = c.protocol) === null ||
                              c === void 0
                              ? void 0
                              : c.updateDrmConfig(u, this)
                          );
                        case 1:
                        case "end":
                          return d.stop();
                      }
                  },
                  l,
                  this
                );
              })
            )),
            function (l) {
              return r.apply(this, arguments);
            }),
        },
        {
          key: "switchAbr",
          value: function (l) {
            var u;
            if ((u = this._player.plugins) !== null && u !== void 0 && u.abr) {
              if ((l == null ? void 0 : l.bitrate) !== void 0) {
                var c = this._player.plugins.abr.config.urls[l.bitrate];
                if (!c) return;
                this.switch(c, { seamless: !0 }),
                  (this._player.plugins.abr.bitrate = l.bitrate);
              }
              var d;
              (l == null ? void 0 : l.enable) !== void 0 &&
                ((d = this._player.plugins) === null ||
                  d === void 0 ||
                  d.abr.switchAbr(l.enable));
            }
          },
        },
        {
          key: "getRTMNetWorkInfo",
          value: function () {
            var l;
            return (l = this._player) === null ||
              l === void 0 ||
              (l = l.plugins) === null ||
              l === void 0 ||
              (l = l.rts) === null ||
              l === void 0
              ? void 0
              : l.getNetWorkInfo();
          },
        },
        {
          key: "getRTMStats",
          value:
            ((n = Gi(
              or().mark(function l() {
                var u;
                return or().wrap(
                  function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          return c.abrupt(
                            "return",
                            (u = this._player) === null ||
                              u === void 0 ||
                              (u = u.plugins) === null ||
                              u === void 0 ||
                              (u = u.rts) === null ||
                              u === void 0
                              ? void 0
                              : u.getStatsSnapshoot()
                          );
                        case 1:
                        case "end":
                          return c.stop();
                      }
                  },
                  l,
                  this
                );
              })
            )),
            function () {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "getFLVStats",
          value: function () {
            var l;
            return (l = this._player) === null ||
              l === void 0 ||
              (l = l.plugins) === null ||
              l === void 0 ||
              (l = l.flv) === null ||
              l === void 0
              ? void 0
              : l.getStats();
          },
        },
        {
          key: "getHLSStats",
          value: function () {
            var l;
            return (l = this._player) === null ||
              l === void 0 ||
              (l = l.plugins) === null ||
              l === void 0 ||
              (l = l.hls) === null ||
              l === void 0
              ? void 0
              : l.getStats();
          },
        },
        {
          key: "updatePlaylist",
          value:
            ((e = Gi(
              or().mark(function l(u, c) {
                var d,
                  h = arguments;
                return or().wrap(
                  function (f) {
                    for (;;)
                      switch ((f.prev = f.next)) {
                        case 0:
                          if (h.length > 2 && h[2] !== void 0 && !h[2]) {
                            f.next = 4;
                            break;
                          }
                          return (
                            (f.next = 4),
                            (d = this._protocolManager) === null || d === void 0
                              ? void 0
                              : d.update({ playlist: u })
                          );
                        case 4:
                          return f.abrupt(
                            "return",
                            Eo(po(o.prototype), "updatePlaylist", this).call(
                              this,
                              u,
                              c
                            )
                          );
                        case 5:
                        case "end":
                          return f.stop();
                      }
                  },
                  l,
                  this
                );
              })
            )),
            function (l, u) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      o
    );
  })();
function Tei(t) {
  return wVe.apply(this, arguments);
}
function wVe() {
  return (wVe = Gi(
    or().mark(function t(e) {
      var n, r, i, o, l, u, c, d, h, f;
      return or().wrap(function (p) {
        for (;;)
          switch ((p.prev = p.next)) {
            case 0:
              if (
                ((l = void 0),
                (u = new WC({
                  lang: e == null ? void 0 : e.lang,
                  i18n: e == null ? void 0 : e.i18n,
                })),
                e && (e.url || e.playlist))
              ) {
                p.next = 4;
                break;
              }
              throw EF(KC.INVALID_PARAMETER, u);
            case 4:
              return (
                ((n = e.logger) !== null && n !== void 0 && n.appId) ||
                  (e == null || (r = e.logger) === null || r === void 0
                    ? void 0
                    : r.enable) === !1 ||
                  console.warn(EF(KC.INVALID_LOGGER, u).message),
                o$.tea || o$.init(e.logger),
                (c = $n(
                  $n({}, e),
                  {},
                  {
                    plugins: Ce((i = [])).call(
                      i,
                      Cf(twn),
                      Cf((o = e.plugins) !== null && o !== void 0 ? o : [])
                    ),
                  }
                )),
                (p.next = 9),
                EBe.create(c)
              );
            case 9:
              if (((d = p.sent), e.url || (d != null && d.playlist))) {
                p.next = 12;
                break;
              }
              throw EF(KC.INVALID_PARAMETER, u);
            case 12:
              return (
                (p.next = 14),
                _8e.create(
                  $n(
                    $n($n({}, ewn), c),
                    {},
                    {
                      playlist: d == null ? void 0 : d.playlist,
                      beforeFallbackError: W1e.beforeFallbackError,
                      isLive: !0,
                      i18nManager: u,
                      teaTracker: o$,
                      preProcessUrl: function (g) {
                        return RD(".ts", g) ? { url: g } : { url: Rzt(g) };
                      },
                      preparePlugins: function (g) {
                        return Gi(
                          or().mark(function y() {
                            return or().wrap(function (v) {
                              for (;;)
                                switch ((v.prev = v.next)) {
                                  case 0:
                                    if (d.enableSelector) {
                                      v.next = 3;
                                      break;
                                    }
                                    return (v.next = 3), d.update({ url: g });
                                  case 3:
                                    return v.abrupt(
                                      "return",
                                      d.getStrategy(l, u, AVe.veStrategyManager)
                                    );
                                  case 4:
                                  case "end":
                                    return v.stop();
                                }
                            }, y);
                          })
                        )();
                      },
                    }
                  ),
                  nwn
                )
              );
            case 14:
              return (
                ((l = p.sent)._protocolManager = d),
                W1e.initErrorFallback(l, d),
                l &&
                  (f =
                    (h = l) === null ||
                    h === void 0 ||
                    (h = h._player) === null ||
                    h === void 0 ||
                    (h = h.config) === null ||
                    h === void 0
                      ? void 0
                      : h._RTMdegrade) &&
                  l.emit("degrade", {
                    originRtmUrl: f._originRtmUrl,
                    code: "NOT_SUPPORT",
                    message: "not support rtm or h264",
                    isRTMSupported: f._isRTMSupported,
                    isRTMSupportCodec: f._isRTMSupportCodec,
                  }),
                p.abrupt("return", l)
              );
            case 19:
            case "end":
              return p.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
function rwn(t) {
  return kVe.apply(this, arguments);
}
function kVe() {
  return (kVe = Gi(
    or().mark(function t(e) {
      var n;
      return or().wrap(function (r) {
        for (;;)
          switch ((r.prev = r.next)) {
            case 0:
              if (e.appId) {
                r.next = 2;
                break;
              }
              return r.abrupt("return");
            case 2:
              return (
                o$.init({ userId: e.userId, deviceId: e.deviceId }),
                (n = AVe.create(o$.tea)),
                (r.next = 6),
                n.init($n($n({}, e), {}, { type: "LIVE" }))
              );
            case 6:
              return r.abrupt("return", n);
            case 7:
            case "end":
              return r.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
var Eei = Object.freeze({
  __proto__: null,
  ErrorCode: KC,
  Events: gS,
  prepare: rwn,
});
sve("esm"),
  Oh.isMseSupported,
  Oh.isSoftDecodeSupported,
  Oh.isMMSSupported,
  sve("esm");
var iwn = Object.defineProperty,
  awn = (t, e, n) =>
    e in t
      ? iwn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n),
  own = (t, e, n) => (awn(t, typeof e != "symbol" ? e + "" : e, n), n);
function Y2e(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function $h(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? Y2e(Object(n), !0).forEach(function (r) {
          Mi(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : Y2e(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Ko() {
  Ko = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = S.method,
      W = E.iterator[L];
    if (W === void 0)
      return (
        (S.delegate = null),
        (L === "throw" &&
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")) ||
          (L !== "return" &&
            ((S.method = "throw"),
            (S.arg = new TypeError(
              "The iterator does not provide a '" + L + "' method"
            )))),
        f
      );
    var F = h(W, E.iterator, S.arg);
    if (F.type === "throw")
      return (S.method = "throw"), (S.arg = F.arg), (S.delegate = null), f;
    var oe = F.arg;
    return oe
      ? oe.done
        ? ((S[E.resultName] = oe.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : oe
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function IVe(t) {
  return (IVe =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function Q2e(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function Rd(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        Q2e(o, r, i, l, u, "next", c);
      }
      function u(c) {
        Q2e(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function w5(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function J2e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, CVe(r.key), r);
  }
}
function k5(t, e, n) {
  return (
    e && J2e(t.prototype, e),
    n && J2e(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Mi(t, e, n) {
  return (
    (e = CVe(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function DVe(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && PVe(t, e);
}
function rne(t) {
  return (rne = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function PVe(t, e) {
  return (PVe = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function swn() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function io(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function lwn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return io(t);
}
function MVe(t) {
  var e = swn();
  return function () {
    var n,
      r = rne(t);
    if (e) {
      var i = rne(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return lwn(this, n);
  };
}
function uwn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function CVe(t) {
  var e = uwn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
function q2e(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function eSe(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? q2e(Object(n), !0).forEach(function (r) {
          cwn(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : q2e(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function gC(t) {
  return (gC =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function _ue(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function tSe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, xVe(r.key), r);
  }
}
function Tue(t, e, n) {
  return (
    e && tSe(t.prototype, e),
    n && tSe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function cwn(t, e, n) {
  return (
    (e = xVe(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function $Ve(t) {
  return dwn(t) || hwn(t) || fwn(t) || pwn();
}
function dwn(t) {
  if (Array.isArray(t)) return ine(t);
}
function hwn(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function fwn(t, e) {
  if (t) {
    if (typeof t == "string") return ine(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? ine(t, e)
        : void 0
    );
  }
}
function ine(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function pwn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function gwn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function xVe(t) {
  var e = gwn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
var tI =
  typeof globalThis < "u"
    ? globalThis
    : typeof window < "u"
    ? window
    : typeof global < "u"
    ? global
    : typeof self < "u"
    ? self
    : {};
function xD(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default")
    ? t.default
    : t;
}
var LVe = { exports: {} };
(function (t) {
  var e = Object.prototype.hasOwnProperty,
    n = "~";
  function r() {}
  function i(c, d, h) {
    (this.fn = c), (this.context = d), (this.once = h || !1);
  }
  function o(c, d, h, f, p) {
    if (typeof h != "function")
      throw new TypeError("The listener must be a function");
    var g = new i(h, f || c, p),
      y = n ? n + d : d;
    return (
      c._events[y]
        ? c._events[y].fn
          ? (c._events[y] = [c._events[y], g])
          : c._events[y].push(g)
        : ((c._events[y] = g), c._eventsCount++),
      c
    );
  }
  function l(c, d) {
    --c._eventsCount == 0 ? (c._events = new r()) : delete c._events[d];
  }
  function u() {
    (this._events = new r()), (this._eventsCount = 0);
  }
  Object.create &&
    ((r.prototype = Object.create(null)), new r().__proto__ || (n = !1)),
    (u.prototype.eventNames = function () {
      var c,
        d,
        h = [];
      if (this._eventsCount === 0) return h;
      for (d in (c = this._events)) e.call(c, d) && h.push(n ? d.slice(1) : d);
      return Object.getOwnPropertySymbols
        ? h.concat(Object.getOwnPropertySymbols(c))
        : h;
    }),
    (u.prototype.listeners = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      if (!h) return [];
      if (h.fn) return [h.fn];
      for (var f = 0, p = h.length, g = new Array(p); f < p; f++)
        g[f] = h[f].fn;
      return g;
    }),
    (u.prototype.listenerCount = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      return h ? (h.fn ? 1 : h.length) : 0;
    }),
    (u.prototype.emit = function (c, d, h, f, p, g) {
      var y = n ? n + c : c;
      if (!this._events[y]) return !1;
      var v,
        b,
        w = this._events[y],
        k = arguments.length;
      if (w.fn) {
        switch ((w.once && this.removeListener(c, w.fn, void 0, !0), k)) {
          case 1:
            return w.fn.call(w.context), !0;
          case 2:
            return w.fn.call(w.context, d), !0;
          case 3:
            return w.fn.call(w.context, d, h), !0;
          case 4:
            return w.fn.call(w.context, d, h, f), !0;
          case 5:
            return w.fn.call(w.context, d, h, f, p), !0;
          case 6:
            return w.fn.call(w.context, d, h, f, p, g), !0;
        }
        for (b = 1, v = new Array(k - 1); b < k; b++) v[b - 1] = arguments[b];
        w.fn.apply(w.context, v);
      } else {
        var D,
          $ = w.length;
        for (b = 0; b < $; b++)
          switch (
            (w[b].once && this.removeListener(c, w[b].fn, void 0, !0), k)
          ) {
            case 1:
              w[b].fn.call(w[b].context);
              break;
            case 2:
              w[b].fn.call(w[b].context, d);
              break;
            case 3:
              w[b].fn.call(w[b].context, d, h);
              break;
            case 4:
              w[b].fn.call(w[b].context, d, h, f);
              break;
            default:
              if (!v)
                for (D = 1, v = new Array(k - 1); D < k; D++)
                  v[D - 1] = arguments[D];
              w[b].fn.apply(w[b].context, v);
          }
      }
      return !0;
    }),
    (u.prototype.on = function (c, d, h) {
      return o(this, c, d, h, !1);
    }),
    (u.prototype.once = function (c, d, h) {
      return o(this, c, d, h, !0);
    }),
    (u.prototype.removeListener = function (c, d, h, f) {
      var p = n ? n + c : c;
      if (!this._events[p]) return this;
      if (!d) return l(this, p), this;
      var g = this._events[p];
      if (g.fn)
        g.fn !== d || (f && !g.once) || (h && g.context !== h) || l(this, p);
      else {
        for (var y = 0, v = [], b = g.length; y < b; y++)
          (g[y].fn !== d || (f && !g[y].once) || (h && g[y].context !== h)) &&
            v.push(g[y]);
        v.length ? (this._events[p] = v.length === 1 ? v[0] : v) : l(this, p);
      }
      return this;
    }),
    (u.prototype.removeAllListeners = function (c) {
      var d;
      return (
        c
          ? ((d = n ? n + c : c), this._events[d] && l(this, d))
          : ((this._events = new r()), (this._eventsCount = 0)),
        this
      );
    }),
    (u.prototype.off = u.prototype.removeListener),
    (u.prototype.addListener = u.prototype.on),
    (u.prefixed = n),
    (u.EventEmitter = u),
    (t.exports = u);
})(LVe);
var OVe = LVe.exports,
  Pl = xD(OVe),
  mwn =
    typeof window < "u" &&
    window.location &&
    window.location.href.indexOf("xgplayerdebugger=1") > -1,
  DW = {
    info: "color: #525252; background-color: #90ee90;",
    error: "color: #525252; background-color: red;",
    warn: "color: #525252; background-color: yellow; ",
  },
  PW = "%c[xgplayer]",
  ane = {
    config: { debug: mwn ? 3 : 0 },
    logInfo: function (t) {
      for (
        var e, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
        i < n;
        i++
      )
        r[i - 1] = arguments[i];
      this.config.debug >= 3 &&
        (e = console).log.apply(e, [PW, DW.info, t].concat(r));
    },
    logWarn: function (t) {
      for (
        var e, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
        i < n;
        i++
      )
        r[i - 1] = arguments[i];
      this.config.debug >= 1 &&
        (e = console).warn.apply(e, [PW, DW.warn, t].concat(r));
    },
    logError: function (t) {
      var e;
      if (!(this.config.debug < 1)) {
        for (
          var n = this.config.debug >= 2 ? "trace" : "error",
            r = arguments.length,
            i = new Array(r > 1 ? r - 1 : 0),
            o = 1;
          o < r;
          o++
        )
          i[o - 1] = arguments[o];
        (e = console)[n].apply(e, [PW, DW.error, t].concat(i));
      }
    },
  },
  ywn = (function () {
    function t(e) {
      _ue(this, t), (this.bufferedList = e);
    }
    return (
      Tue(t, [
        {
          key: "start",
          value: function (e) {
            return this.bufferedList[e].start;
          },
        },
        {
          key: "end",
          value: function (e) {
            return this.bufferedList[e].end;
          },
        },
        {
          key: "length",
          get: function () {
            return this.bufferedList.length;
          },
        },
      ]),
      t
    );
  })(),
  Gr = {};
function vwn(t, e) {
  for (var n = 0, r = e.length; n < r; n++) if (t.indexOf(e[n]) > -1) return !0;
  return !1;
}
(Gr.createDom = function () {
  var t =
      arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "div",
    e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
    n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
    r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "",
    i = document.createElement(t);
  return (
    (i.className = r),
    (i.innerHTML = e),
    Object.keys(n).forEach(function (o) {
      var l = o,
        u = n[o];
      t === "video" || t === "audio" || t === "live-video"
        ? u && i.setAttribute(l, u)
        : i.setAttribute(l, u);
    }),
    i
  );
}),
  (Gr.createDomFromHtml = function (t) {
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
      n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
    try {
      var r = document.createElement("div");
      r.innerHTML = t;
      var i = r.children;
      return (
        (r = null),
        i.length > 0
          ? ((i = i[0]),
            n && Gr.addClass(i, n),
            e &&
              Object.keys(e).forEach(function (o) {
                i.setAttribute(o, e[o]);
              }),
            i)
          : null
      );
    } catch (o) {
      return ane.logError("util.createDomFromHtml", o), null;
    }
  }),
  (Gr.hasClass = function (t, e) {
    if (!t || !e) return !1;
    try {
      return Array.prototype.some.call(t.classList, function (r) {
        return r === e;
      });
    } catch {
      var n =
        t.className && gC(t.className) === "object"
          ? t.getAttribute("class")
          : t.className;
      return n && !!n.match(new RegExp("(\\s|^)" + e + "(\\s|$)"));
    }
  }),
  (Gr.addClass = function (t, e) {
    if (t && e)
      try {
        e.replace(/(^\s+|\s+$)/g, "")
          .split(/\s+/g)
          .forEach(function (n) {
            n && t.classList.add(n);
          });
      } catch {
        Gr.hasClass(t, e) ||
          (t.className && gC(t.className) === "object"
            ? t.setAttribute("class", t.getAttribute("class") + " " + e)
            : (t.className += " " + e));
      }
  }),
  (Gr.removeClass = function (t, e) {
    if (t && e)
      try {
        e.replace(/(^\s+|\s+$)/g, "")
          .split(/\s+/g)
          .forEach(function (n) {
            n && t.classList.remove(n);
          });
      } catch {
        Gr.hasClass(t, e) &&
          e.split(/\s+/g).forEach(function (r) {
            var i = new RegExp("(\\s|^)" + r + "(\\s|$)");
            t.className && gC(t.className) === "object"
              ? t.setAttribute("class", t.getAttribute("class").replace(i, " "))
              : (t.className = t.className.replace(i, " "));
          });
      }
  }),
  (Gr.toggleClass = function (t, e) {
    t &&
      e.split(/\s+/g).forEach(function (n) {
        Gr.hasClass(t, n) ? Gr.removeClass(t, n) : Gr.addClass(t, n);
      });
  }),
  (Gr.classNames = function () {
    for (
      var t = arguments,
        e = [],
        n = function (i) {
          Gr.typeOf(t[i]) === "String"
            ? e.push(t[i])
            : Gr.typeOf(t[i]) === "Object" &&
              Object.keys(t[i]).map(function (o) {
                t[i][o] && e.push(o);
              });
        },
        r = 0;
      r < arguments.length;
      r++
    )
      n(r);
    return e.join(" ");
  }),
  (Gr.findDom = function () {
    var t,
      e =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : document,
      n = arguments.length > 1 ? arguments[1] : void 0;
    try {
      t = e.querySelector(n);
    } catch (r) {
      ane.logError("util.findDom", r),
        n.indexOf("#") === 0 && (t = e.getElementById(n.slice(1)));
    }
    return t;
  }),
  (Gr.getCss = function (t, e) {
    return t.currentStyle
      ? t.currentStyle[e]
      : document.defaultView.getComputedStyle(t, !1)[e];
  }),
  (Gr.padStart = function (t, e, n) {
    for (
      var r = String(n),
        i = e >> 0,
        o = Math.ceil(i / r.length),
        l = [],
        u = String(t);
      o--;

    )
      l.push(r);
    return l.join("").substring(0, i - u.length) + u;
  }),
  (Gr.format = function (t) {
    if (window.isNaN(t)) return "";
    t = Math.round(t);
    var e = Gr.padStart(Math.floor(t / 3600), 2, 0),
      n = Gr.padStart(Math.floor((t - 3600 * e) / 60), 2, 0),
      r = Gr.padStart(Math.floor(t - 3600 * e - 60 * n), 2, 0);
    return (e === "00" ? [n, r] : [e, n, r]).join(":");
  }),
  (Gr.event = function (t) {
    if (t.touches) {
      var e = t.touches[0] || t.changedTouches[0];
      (t.clientX = e.clientX || 0),
        (t.clientY = e.clientY || 0),
        (t.offsetX = e.pageX - e.target.offsetLeft),
        (t.offsetY = e.pageY - e.target.offsetTop);
    }
    t._target = t.target || t.srcElement;
  }),
  (Gr.typeOf = function (t) {
    return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0];
  }),
  (Gr.deepCopy = function (t, e) {
    if (Gr.typeOf(e) === "Object" && Gr.typeOf(t) === "Object")
      return (
        Object.keys(e).forEach(function (n) {
          Gr.typeOf(e[n]) !== "Object" || e[n] instanceof Node
            ? Gr.typeOf(e[n]) === "Array"
              ? (t[n] = Gr.typeOf(t[n]) === "Array" ? t[n].concat(e[n]) : e[n])
              : (t[n] = e[n])
            : t[n] === void 0 || t[n] === void 0
            ? (t[n] = e[n])
            : Gr.deepCopy(t[n], e[n]);
        }),
        t
      );
  }),
  (Gr.deepMerge = function (t, e) {
    return (
      Object.keys(e).map(function (n) {
        var r;
        Gr.typeOf(e[n]) === "Array" && Gr.typeOf(t[n]) === "Array"
          ? Gr.typeOf(t[n]) === "Array" && (r = t[n]).push.apply(r, $Ve(e[n]))
          : Gr.typeOf(t[n]) !== Gr.typeOf(e[n]) ||
            t[n] === null ||
            Gr.typeOf(t[n]) !== "Object" ||
            e[n] instanceof window.Node
          ? e[n] !== null && (t[n] = e[n])
          : Gr.deepMerge(t[n], e[n]);
      }),
      t
    );
  }),
  (Gr.getBgImage = function (t) {
    var e = (t.currentStyle || window.getComputedStyle(t, null))
      .backgroundImage;
    if (!e || e === "none") return "";
    var n = document.createElement("a");
    return (n.href = e.replace(/url\("|"\)/g, "")), n.href;
  }),
  (Gr.copyDom = function (t) {
    if (t && t.nodeType === 1) {
      var e = document.createElement(t.tagName);
      return (
        Array.prototype.forEach.call(t.attributes, function (n) {
          e.setAttribute(n.name, n.value);
        }),
        t.innerHTML && (e.innerHTML = t.innerHTML),
        e
      );
    }
    return "";
  }),
  (Gr.setInterval = function (t, e, n, r) {
    t._interval[e] || (t._interval[e] = window.setInterval(n.bind(t), r));
  }),
  (Gr.clearInterval = function (t, e) {
    clearInterval(t._interval[e]), (t._interval[e] = null);
  }),
  (Gr.setTimeout = function (t, e, n) {
    t._timers || (t._timers = []);
    var r = setTimeout(function () {
      e(), Gr.clearTimeout(t, r);
    }, n);
    return t._timers.push(r), r;
  }),
  (Gr.clearTimeout = function (t, e) {
    var n = t._timers;
    if (Gr.typeOf(n) === "Array") {
      for (var r = 0; r < n.length; r++)
        if (n[r] === e) {
          n.splice(r, 1), clearTimeout(e);
          break;
        }
    } else clearTimeout(e);
  }),
  (Gr.clearAllTimers = function (t) {
    var e = t._timers;
    Gr.typeOf(e) === "Array" &&
      (e.map(function (n) {
        clearTimeout(n);
      }),
      (t._timerIds = []));
  }),
  (Gr.createImgBtn = function (t, e, n, r) {
    var i,
      o,
      l,
      u = Gr.createDom("xg-".concat(t), "", {}, "xgplayer-".concat(t, "-img"));
    return (
      (u.style.backgroundImage = 'url("'.concat(e, '")')),
      n &&
        r &&
        (["px", "rem", "em", "pt", "dp", "vw", "vh", "vm", "%"].every(function (
          c
        ) {
          return (
            !(n.indexOf(c) > -1 && r.indexOf(c) > -1) ||
            ((i = parseFloat(n.slice(0, n.indexOf(c)).trim())),
            (o = parseFloat(r.slice(0, r.indexOf(c)).trim())),
            (l = c),
            !1)
          );
        }),
        (u.style.width = "".concat(i).concat(l)),
        (u.style.height = "".concat(o).concat(l)),
        (u.style.backgroundSize = ""
          .concat(i)
          .concat(l, " ")
          .concat(o)
          .concat(l)),
        (u.style.margin =
          t === "start"
            ? "-"
                .concat(o / 2)
                .concat(l, " auto auto -")
                .concat(i / 2)
                .concat(l)
            : "auto 5px auto 5px")),
      u
    );
  }),
  (Gr.Hex2RGBA = function (t, e) {
    var n = [];
    if (/^\#[0-9A-F]{3}$/i.test(t)) {
      var r = "#";
      t.replace(/[0-9A-F]/gi, function (i) {
        r += i + i;
      }),
        (t = r);
    }
    return /^#[0-9A-F]{6}$/i.test(t)
      ? (t.replace(/[0-9A-F]{2}/gi, function (i) {
          n.push(parseInt(i, 16));
        }),
        "rgba(".concat(n.join(","), ", ").concat(e, ")"))
      : "rgba(255, 255, 255, 0.1)";
  }),
  (Gr.getFullScreenEl = function () {
    return (
      document.fullscreenElement ||
      document.webkitFullscreenElement ||
      document.mozFullScreenElement ||
      document.msFullscreenElement
    );
  }),
  (Gr.checkIsFunction = function (t) {
    return t && typeof t == "function";
  }),
  (Gr.checkIsObject = function (t) {
    return t !== null && gC(t) === "object";
  }),
  (Gr.hide = function (t) {
    t.style.display = "none";
  }),
  (Gr.show = function (t, e) {
    t.style.display = e || "block";
  }),
  (Gr.isUndefined = function (t) {
    if (t == null) return !0;
  }),
  (Gr.isNotNull = function (t) {
    return t != null;
  }),
  (Gr.setStyleFromCsstext = function (t, e) {
    e &&
      (Gr.typeOf(e) === "String"
        ? e
            .replace(/\s+/g, "")
            .split(";")
            .map(function (n) {
              if (n) {
                var r = n.split(":");
                r.length > 1 && (t.style[r[0]] = r[1]);
              }
            })
        : Object.keys(e).map(function (n) {
            t.style[n] = e[n];
          }));
  }),
  (Gr.filterStyleFromText = function (t) {
    var e =
        arguments.length > 1 && arguments[1] !== void 0
          ? arguments[1]
          : [
              "width",
              "height",
              "top",
              "left",
              "bottom",
              "right",
              "position",
              "z-index",
              "padding",
              "margin",
              "transform",
            ],
      n = t.style.cssText;
    if (!n) return {};
    var r = n.replace(/\s+/g, "").split(";"),
      i = {},
      o = {};
    return (
      r.map(function (l) {
        if (l) {
          var u = l.split(":");
          u.length > 1 && (vwn(u[0], e) ? (i[u[0]] = u[1]) : (o[u[0]] = u[1]));
        }
      }),
      t.setAttribute("style", ""),
      Object.keys(o).map(function (l) {
        t.style[l] = o[l];
      }),
      i
    );
  }),
  (Gr.getStyleFromCsstext = function (t) {
    var e = t.style.cssText;
    if (!e) return {};
    var n = e.replace(/\s+/g, "").split(";"),
      r = {};
    return (
      n.map(function (i) {
        if (i) {
          var o = i.split(":");
          o.length > 1 && (r[o[0]] = o[1]);
        }
      }),
      r
    );
  }),
  (Gr.preloadImg = function (t) {
    var e =
        arguments.length > 1 && arguments[1] !== void 0
          ? arguments[1]
          : function () {},
      n =
        arguments.length > 2 && arguments[2] !== void 0
          ? arguments[2]
          : function () {};
    if (t) {
      var r = new window.Image();
      (r.onload = function (i) {
        (r = null), e && e(i);
      }),
        (r.onerror = function (i) {
          (r = null), n && n(i);
        }),
        (r.src = t);
    }
  }),
  (Gr.stopPropagation = function (t) {
    t && t.stopPropagation();
  }),
  (Gr.scrollTop = function () {
    return (
      window.pageYOffset ||
      document.documentElement.scrollTop ||
      document.body.scrollTop ||
      0
    );
  }),
  (Gr.scrollLeft = function () {
    return (
      window.pageXOffset ||
      document.documentElement.scrollLeft ||
      document.body.scrollLeft ||
      0
    );
  }),
  (Gr.checkTouchSupport = function () {
    return "ontouchstart" in window;
  }),
  (Gr.getBuffered2 = function (t) {
    for (
      var e =
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.5,
        n = [],
        r = 0;
      r < t.length;
      r++
    )
      n.push({ start: t.start(r) < 0.5 ? 0 : t.start(r), end: t.end(r) });
    n.sort(function (c, d) {
      var h = c.start - d.start;
      return h || d.end - c.end;
    });
    var i = [];
    if (e)
      for (var o = 0; o < n.length; o++) {
        var l = i.length;
        if (l) {
          var u = i[l - 1].end;
          n[o].start - u < e
            ? n[o].end > u && (i[l - 1].end = n[o].end)
            : i.push(n[o]);
        } else i.push(n[o]);
      }
    else i = n;
    return new ywn(i);
  }),
  (Gr.getEventPos = function (t) {
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
    return (
      t.touches && t.touches.length > 0 && (t = t.touches[0]),
      {
        x: t.x / e,
        y: t.y / e,
        clientX: t.clientX / e,
        clientY: t.clientY / e,
        offsetX: t.offsetX / e,
        offsetY: t.offsetY / e,
        pageX: t.pageX / e,
        pageY: t.pageY / e,
      }
    );
  }),
  (Gr.requestAnimationFrame = function (t) {
    var e =
      window.requestAnimationFrame ||
      window.webkitRequestAnimationFrame ||
      window.mozRequestAnimationFrame ||
      window.oRequestAnimationFrame ||
      window.msRequestAnimationFrame;
    if (e) return e(t);
  }),
  (Gr.getHostFromUrl = function (t) {
    if (Gr.typeOf(t) !== "String") return "";
    var e = t.split("/"),
      n = "";
    return e.length > 3 && e[2] && (n = e[2]), n;
  }),
  (Gr.cancelAnimationFrame = function (t) {
    var e =
      window.cancelAnimationFrame ||
      window.mozCancelAnimationFrame ||
      window.cancelRequestAnimationFrame;
    e && e(t);
  }),
  (Gr.isMSE = function (t) {
    return (
      t.media && (t = t.media),
      !!(t && t instanceof HTMLMediaElement) &&
        (/^blob/.test(t.currentSrc) || /^blob/.test(t.src))
    );
  }),
  (Gr.isBlob = function (t) {
    return typeof t == "string" && /^blob/.test(t);
  }),
  (Gr.generateSessionId = function () {
    var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0,
      e = new Date().getTime();
    try {
      t = parseInt(t);
    } catch {
      t = 0;
    }
    return (
      (e += t),
      window.performance &&
        typeof window.performance.now == "function" &&
        (e += parseInt(window.performance.now())),
      "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (n) {
        var r = (e + 16 * Math.random()) % 16 | 0;
        return (
          (e = Math.floor(e / 16)), (n === "x" ? r : (3 & r) | 8).toString(16)
        );
      })
    );
  }),
  (Gr.createEvent = function (t) {
    var e;
    return (
      typeof window.Event == "function"
        ? (e = new Event(t))
        : (e = document.createEvent("Event")).initEvent(t, !0, !0),
      e
    );
  }),
  (Gr.adjustTimeByDuration = function (t, e, n) {
    return e && t && (t > e || (n && t < e)) ? e : t;
  }),
  (Gr.createPositionBar = function (t, e) {
    var n = Gr.createDom("xg-bar", "", { "data-index": -1 }, t);
    return e.appendChild(n), n;
  }),
  (Gr.getTransformStyle = function () {
    var t =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : { x: 0, y: 0, scale: 1, rotate: 0 },
      e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
      n = {
        scale: "".concat(t.scale || 1),
        translate: "".concat(t.x || 0, "%, ").concat(t.y || 0, "%"),
        rotate: "".concat(t.rotate || 0, "deg"),
      };
    return (
      Object.keys(n).forEach(function (r) {
        var i = new RegExp("".concat(r, "\\([^\\(]+\\)"), "g"),
          o = "".concat(r, "(").concat(n[r], ")");
        i.test(e)
          ? ((i.lastIndex = -1), (e = e.replace(i, o)))
          : (e += "".concat(o, " "));
      }),
      e
    );
  }),
  (Gr.convertDeg = function (t) {
    return Math.abs(t) <= 1 ? 360 * t : t % 360;
  }),
  (Gr.getIndexByTime = function (t, e) {
    var n = e.length,
      r = -1;
    if (n < 1) return r;
    if (t <= e[0].end || n < 2) r = 0;
    else if (t > e[n - 1].end) r = n - 1;
    else
      for (var i = 1; i < n; i++)
        if (t > e[i - 1].end && t <= e[i].end) {
          r = i;
          break;
        }
    return r;
  }),
  (Gr.getOffsetCurrentTime = function (t, e) {
    var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1,
      r = -1;
    if ((r = n >= 0 && n < e.length ? n : Gr.getIndexByTime(t, e)) < 0)
      return -1;
    var i = e.length,
      o = e[r],
      l = o.start,
      u = o.end,
      c = o.cTime,
      d = o.offset;
    return t < l ? c : t >= l && t <= u ? t - d : t > u && r >= i - 1 ? u : -1;
  }),
  (Gr.getCurrentTimeByOffset = function (t, e) {
    var n = -1;
    if (!e || e.length < 0) return t;
    for (var r = 0; r < e.length; r++)
      if (t <= e[r].duration) {
        n = r;
        break;
      }
    if (n !== -1) {
      var i = e[n].start;
      return n - 1 < 0 ? i + t : i + (t - e[n - 1].duration);
    }
    return t;
  });
var nSe = { android: /(Android)\s([\d.]+)/, ios: /(Version)\/([\d.]+)/ },
  bwn = [
    "avc1.42E01E, mp4a.40.2",
    "avc1.58A01E, mp4a.40.2",
    "avc1.4D401E, mp4a.40.2",
    "avc1.64001E, mp4a.40.2",
    "avc1.42E01E",
    "mp4v.20.8",
    "mp4v.20.8, mp4a.40.2",
    "mp4v.20.240, mp4a.40.2",
  ],
  mC = {
    get device() {
      return mC.os.isPc ? "pc" : "mobile";
    },
    get browser() {
      if (typeof navigator > "u") return "";
      var t = navigator.userAgent.toLowerCase(),
        e = {
          ie: /rv:([\d.]+)\) like gecko/,
          firefox: /firefox\/([\d.]+)/,
          chrome: /chrome\/([\d.]+)/,
          opera: /opera.([\d.]+)/,
          safari: /version\/([\d.]+).*safari/,
        };
      return [].concat(
        Object.keys(e).filter(function (n) {
          return e[n].test(t);
        })
      )[0];
    },
    get os() {
      if (typeof navigator > "u") return {};
      var t = navigator.userAgent,
        e = /(?:Windows Phone)/.test(t),
        n = /(?:SymbianOS)/.test(t) || e,
        r = /(?:Android)/.test(t),
        i = /(?:Firefox)/.test(t),
        o =
          /(?:iPad|PlayBook)/.test(t) ||
          (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1),
        l = o || (r && !/(?:Mobile)/.test(t)) || (i && /(?:Tablet)/.test(t)),
        u = /(?:iPhone)/.test(t) && !l;
      return {
        isTablet: l,
        isPhone: u,
        isIpad: o,
        isIos: u || o,
        isAndroid: r,
        isPc: !(u || r || n || l),
        isSymbian: n,
        isWindowsPhone: e,
        isFireFox: i,
      };
    },
    get osVersion() {
      if (typeof navigator > "u") return 0;
      var t = navigator.userAgent,
        e = "",
        n = (e = /(?:iPhone)|(?:iPad|PlayBook)/.test(t) ? nSe.ios : nSe.android)
          ? e.exec(t)
          : [];
      if (n && n.length >= 3) {
        var r = n[2].split(".");
        return r.length > 0 ? parseInt(r[0]) : 0;
      }
      return 0;
    },
    get isWeixin() {
      return typeof navigator > "u"
        ? !1
        : !!/(micromessenger)\/([\d.]+)/.exec(
            navigator.userAgent.toLocaleLowerCase()
          );
    },
    isSupportMP4: function () {
      var t = { isSupport: !1, mime: "" };
      if (typeof document > "u") return t;
      if (this.supportResult) return this.supportResult;
      var e = document.createElement("video");
      return (
        typeof e.canPlayType == "function" &&
          bwn.map(function (n) {
            e.canPlayType('video/mp4; codecs="'.concat(n, '"')) ===
              "probably" && ((t.isSupport = !0), (t.mime += "||".concat(n)));
          }),
        (this.supportResult = t),
        (e = null),
        t
      );
    },
    isMSESupport: function () {
      var t =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
      if (typeof MediaSource > "u" || !MediaSource) return !1;
      try {
        return MediaSource.isTypeSupported(t);
      } catch (e) {
        return this._logger.error(t, e), !1;
      }
    },
    isHevcSupported: function () {
      return (
        !(typeof MediaSource > "u" || !MediaSource.isTypeSupported) &&
        (MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))
      );
    },
    probeConfigSupported: function (t) {
      var e = { supported: !1, smooth: !1, powerEfficient: !1 };
      if (!t || typeof navigator > "u") return Promise.resolve(e);
      if (
        navigator.mediaCapabilities &&
        navigator.mediaCapabilities.decodingInfo
      )
        return navigator.mediaCapabilities.decodingInfo(t);
      var n = t.video || {},
        r = t.audio || {};
      try {
        var i = MediaSource.isTypeSupported(n.contentType),
          o = MediaSource.isTypeSupported(r.contentType);
        return Promise.resolve({
          supported: i && o,
          smooth: !1,
          powerEfficient: !1,
        });
      } catch {
        return Promise.resolve(e);
      }
    },
  },
  rSe = "3.0.21-rc.21",
  iSe = { 1: 5101, 2: 5102, 3: 5103, 4: 5104, 5: 5105, 6: 5106 },
  s0 = Tue(function t(e) {
    var n =
      arguments.length > 1 && arguments[1] !== void 0
        ? arguments[1]
        : {
            errorType: "",
            errorCode: 0,
            errorMessage: "",
            originError: "",
            ext: {},
            mediaError: null,
          };
    _ue(this, t);
    var r = e && e.i18n ? e.i18n.ERROR_TYPES : null;
    if (e.media) {
      var i = n.mediaError ? n.mediaError : e.media.error || {},
        o = e.duration,
        l = e.currentTime,
        u = e.ended,
        c = e.src,
        d = e.currentSrc,
        h = e.media,
        f = h.readyState,
        p = h.networkState,
        g = n.errorCode || i.code;
      iSe[g] && (g = iSe[g]);
      var y = {
        playerVersion: rSe,
        currentTime: l,
        duration: o,
        ended: u,
        readyState: f,
        networkState: p,
        src: c || d,
        errorType: n.errorType,
        errorCode: g,
        message: n.errorMessage || i.message,
        mediaError: i,
        originError: n.originError ? n.originError.stack : "",
        host: Gr.getHostFromUrl(c || d),
      };
      return (
        n.ext &&
          Object.keys(n.ext).map(function (k) {
            y[k] = n.ext[k];
          }),
        y
      );
    }
    if (arguments.length > 1) {
      for (
        var v = { playerVersion: rSe, domain: document.domain },
          b = [
            "errorType",
            "currentTime",
            "duration",
            "networkState",
            "readyState",
            "src",
            "currentSrc",
            "ended",
            "errd",
            "errorCode",
            "mediaError",
          ],
          w = 0;
        w < arguments.length;
        w++
      )
        v[b[w]] = arguments[w];
      return (v.ex = r ? (r[arguments[0]] || {}).msg : ""), v;
    }
  }),
  BF = "play",
  _wn = "pause",
  Eue = "error",
  Twn = "timeupdate",
  Ewn = "waiting",
  Swn = "loadeddata",
  Rwn = "loadstart",
  Sue = "destroy",
  Rue = "urlchange",
  aSe = "definition_change",
  Awn = "after_definition_change",
  wwn = "switch_subtitle";
function Z3(t, e, n) {
  for (
    var r = arguments.length, i = new Array(r > 3 ? r - 3 : 0), o = 3;
    o < r;
    o++
  )
    i[o - 3] = arguments[o];
  var l = e.call.apply(e, [t].concat(i));
  n &&
    typeof n == "function" &&
    (l && l.then
      ? l.then(function () {
          for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
            c[d] = arguments[d];
          n.call.apply(n, [t].concat(c));
        })
      : n.call.apply(n, [t].concat(i)));
}
function oSe(t, e) {
  var n =
    arguments.length > 2 && arguments[2] !== void 0
      ? arguments[2]
      : { pre: null, next: null };
  return (
    this.__hooks || (this.__hooks = {}),
    !this.__hooks[t] && (this.__hooks[t] = null),
    function () {
      var r = arguments,
        i = this;
      if (n.pre)
        try {
          var o;
          (o = n.pre).call.apply(
            o,
            [this].concat(Array.prototype.slice.call(arguments))
          );
        } catch (u) {
          throw (
            ((u.message = "[pluginName: "
              .concat(this.pluginName, ":")
              .concat(t, ":pre error] >> ")
              .concat(u.message)),
            u)
          );
        }
      if (this.__hooks && this.__hooks[t])
        try {
          var l = Dwn(this, t, e);
          l
            ? l.then
              ? l
                  .then(function (u) {
                    u !== !1 && Z3.apply(void 0, [i, e, n.next].concat($Ve(r)));
                  })
                  .catch(function (u) {
                    throw u;
                  })
              : Z3.apply(
                  void 0,
                  [this, e, n.next].concat(
                    Array.prototype.slice.call(arguments)
                  )
                )
            : l === void 0 &&
              Z3.apply(
                void 0,
                [this, e, n.next].concat(Array.prototype.slice.call(arguments))
              );
        } catch (u) {
          throw (
            ((u.message = "[pluginName: "
              .concat(this.pluginName, ":")
              .concat(t, "] >> ")
              .concat(u.message)),
            u)
          );
        }
      else
        Z3.apply(
          void 0,
          [this, e, n.next].concat(Array.prototype.slice.call(arguments))
        );
    }.bind(this)
  );
}
function GVe(t, e) {
  var n = this.__hooks;
  if (!n || !Array.isArray(n[t])) return -1;
  for (var r = n[t], i = 0; i < r.length; i++) if (r[i] === e) return i;
  return -1;
}
function sSe(t, e) {
  var n = this.__hooks;
  if (n)
    return n.hasOwnProperty(t)
      ? (Array.isArray(n[t]) || (n[t] = []),
        GVe.call(this, t, e) === -1 && n[t].push(e),
        !0)
      : (console.warn("has no supported hook which name [".concat(t, "]")), !1);
}
function lSe(t, e) {
  var n = this.__hooks;
  if (n)
    if (Array.isArray(n[t])) {
      var r = n[t],
        i = GVe.call(this, t, e);
      i !== -1 && r.splice(i, 1);
    } else n[t] && (n[t] = null);
}
function kwn(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  (t.__hooks = {}),
    e &&
      e.map(function (n) {
        t.__hooks[n] = null;
      }),
    Object.defineProperty(t, "hooks", {
      get: function () {
        return (
          t.__hooks &&
          Object.keys(t.__hooks).map(function (n) {
            if (t.__hooks[n]) return n;
          })
        );
      },
    });
}
function Iwn(t) {
  t.__hooks = null;
}
function Dwn(t, e, n) {
  for (
    var r = arguments.length, i = new Array(r > 3 ? r - 3 : 0), o = 3;
    o < r;
    o++
  )
    i[o - 3] = arguments[o];
  if (t.__hooks && Array.isArray(t.__hooks[e])) {
    var l = t.__hooks[e],
      u = -1;
    return function c(d, h, f) {
      for (
        var p = arguments.length, g = new Array(p > 3 ? p - 3 : 0), y = 3;
        y < p;
        y++
      )
        g[y - 3] = arguments[y];
      if ((u++, l.length === 0 || u === l.length))
        return f.call.apply(f, [d, d].concat(g));
      var v = l[u],
        b = v.call.apply(v, [d, d].concat(g));
      return b && b.then
        ? b
            .then(function (w) {
              return w === !1 ? null : c.apply(void 0, [d, h, f].concat(g));
            })
            .catch(function (w) {
              console.warn("[runHooks]".concat(h, " reject"), w.message);
            })
        : b !== !1
        ? c.apply(void 0, [d, h, f].concat(g))
        : void 0;
    }.apply(void 0, [t, e, n].concat(i));
  }
  return n.call.apply(n, [t, t].concat(i));
}
function MW(t, e) {
  ane.logError(
    "["
      .concat(t, "] event or callback cant be undefined or null when call ")
      .concat(e)
  );
}
var hm = (function () {
    function t(e) {
      _ue(this, t),
        Gr.checkIsFunction(this.beforeCreate) && this.beforeCreate(e),
        kwn(this),
        (this.__args = e),
        (this.__events = {}),
        (this.__onceEvents = {}),
        (this.config = e.config || {}),
        (this.player = null),
        (this.playerConfig = {}),
        (this.pluginName = ""),
        this.__init(e);
    }
    return (
      Tue(
        t,
        [
          { key: "beforeCreate", value: function (e) {} },
          { key: "afterCreate", value: function () {} },
          { key: "beforePlayerInit", value: function () {} },
          { key: "onPluginsReady", value: function () {} },
          { key: "afterPlayerInit", value: function () {} },
          { key: "destroy", value: function () {} },
          {
            key: "__init",
            value: function (e) {
              (this.player = e.player),
                (this.playerConfig = e.player && e.player.config),
                (this.pluginName = e.pluginName
                  ? e.pluginName.toLowerCase()
                  : this.constructor.pluginName.toLowerCase()),
                (this.logger = e.player && e.player.logger);
            },
          },
          {
            key: "updateLang",
            value: function (e) {
              e || (e = this.lang);
            },
          },
          {
            key: "lang",
            get: function () {
              return this.player.lang;
            },
          },
          {
            key: "i18n",
            get: function () {
              return this.player.i18n;
            },
          },
          {
            key: "i18nKeys",
            get: function () {
              return this.player.i18nKeys;
            },
          },
          {
            key: "domEventType",
            get: function () {
              var e = Gr.checkTouchSupport() ? "touch" : "mouse";
              return (
                !this.playerConfig ||
                  (this.playerConfig.domEventType !== "touch" &&
                    this.playerConfig.domEventType !== "mouse") ||
                  (e = this.playerConfig.domEventType),
                e
              );
            },
          },
          {
            key: "on",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? ((this.__events[e] = n), this.player.on(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      (r.__events[i] = n), r.player.on(i, n);
                    })
                : MW(this.pluginName, "plugin.on(event, callback)");
            },
          },
          {
            key: "once",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? ((this.__onceEvents[e] = n), this.player.once(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      (r.__onceEvents[i] = n), r.player.once(e, n);
                    })
                : MW(this.pluginName, "plugin.once(event, callback)");
            },
          },
          {
            key: "off",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? (delete this.__events[e], this.player.off(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      delete r.__events[e], r.player.off(i, n);
                    })
                : MW(this.pluginName, "plugin.off(event, callback)");
            },
          },
          {
            key: "offAll",
            value: function () {
              var e = this;
              ["__events", "__onceEvents"].forEach(function (n) {
                Object.keys(e[n]).forEach(function (r) {
                  e[n][r] && e.off(r, e[n][r]), r && delete e[n][r];
                });
              }),
                (this.__events = {}),
                (this.__onceEvents = {});
            },
          },
          {
            key: "emit",
            value: function (e) {
              var n;
              if (this.player) {
                for (
                  var r = arguments.length,
                    i = new Array(r > 1 ? r - 1 : 0),
                    o = 1;
                  o < r;
                  o++
                )
                  i[o - 1] = arguments[o];
                (n = this.player).emit.apply(n, [e].concat(i));
              }
            },
          },
          {
            key: "emitUserAction",
            value: function (e, n) {
              var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : {};
              if (this.player) {
                var i = eSe(eSe({}, r), {}, { pluginName: this.pluginName });
                this.player.emitUserAction(e, n, i);
              }
            },
          },
          {
            key: "hook",
            value: function (e, n) {
              return oSe.call.apply(
                oSe,
                [this].concat(Array.prototype.slice.call(arguments))
              );
            },
          },
          {
            key: "useHooks",
            value: function (e, n) {
              for (
                var r = arguments.length,
                  i = new Array(r > 2 ? r - 2 : 0),
                  o = 2;
                o < r;
                o++
              )
                i[o - 2] = arguments[o];
              return sSe.call.apply(
                sSe,
                [this].concat(Array.prototype.slice.call(arguments))
              );
            },
          },
          {
            key: "removeHooks",
            value: function (e, n) {
              for (
                var r = arguments.length,
                  i = new Array(r > 2 ? r - 2 : 0),
                  o = 2;
                o < r;
                o++
              )
                i[o - 2] = arguments[o];
              return lSe.call.apply(
                lSe,
                [this].concat(Array.prototype.slice.call(arguments))
              );
            },
          },
          {
            key: "registerPlugin",
            value: function (e) {
              var n =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                r =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : "";
              if (this.player)
                return (
                  r && (n.pluginName = r),
                  this.player.registerPlugin({ plugin: e, options: n })
                );
            },
          },
          {
            key: "getPlugin",
            value: function (e) {
              return this.player ? this.player.getPlugin(e) : null;
            },
          },
          {
            key: "__destroy",
            value: function () {
              var e = this,
                n = this.player,
                r = this.pluginName;
              this.offAll(),
                Gr.clearAllTimers(this),
                Gr.checkIsFunction(this.destroy) && this.destroy(),
                [
                  "player",
                  "playerConfig",
                  "pluginName",
                  "logger",
                  "__args",
                  "__hooks",
                ].map(function (i) {
                  e[i] = null;
                }),
                n.unRegisterPlugin(r),
                Iwn(this);
            },
          },
        ],
        [
          {
            key: "defineGetterOrSetter",
            value: function (e, n) {
              for (var r in n)
                Object.prototype.hasOwnProperty.call(n, r) &&
                  Object.defineProperty(e, r, n[r]);
            },
          },
          {
            key: "defineMethod",
            value: function (e, n) {
              for (var r in n)
                Object.prototype.hasOwnProperty.call(n, r) &&
                  typeof n[r] == "function" &&
                  Object.defineProperty(e, r, {
                    configurable: !0,
                    value: n[r],
                  });
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {};
            },
          },
          {
            key: "pluginName",
            get: function () {
              return "pluginName";
            },
          },
        ]
      ),
      t
    );
  })(),
  Pwn = 9;
if (typeof Element < "u" && !Element.prototype.matches) {
  var qA = Element.prototype;
  qA.matches =
    qA.matchesSelector ||
    qA.mozMatchesSelector ||
    qA.msMatchesSelector ||
    qA.oMatchesSelector ||
    qA.webkitMatchesSelector;
}
function Mwn(t, e) {
  for (; t && t.nodeType !== Pwn; ) {
    if (typeof t.matches == "function" && t.matches(e)) return t;
    t = t.parentNode;
  }
}
var Cwn = Mwn,
  $wn = Cwn;
function CW(t, e, n, r, i) {
  var o = Lwn.apply(this, arguments);
  return (
    t.addEventListener(n, o, i),
    {
      destroy: function () {
        t.removeEventListener(n, o, i);
      },
    }
  );
}
function xwn(t, e, n, r, i) {
  return typeof t.addEventListener == "function"
    ? CW.apply(null, arguments)
    : typeof n == "function"
    ? CW.bind(null, document).apply(null, arguments)
    : (typeof t == "string" && (t = document.querySelectorAll(t)),
      Array.prototype.map.call(t, function (o) {
        return CW(o, e, n, r, i);
      }));
}
function Lwn(t, e, n, r) {
  return function (i) {
    (i.delegateTarget = $wn(i.target, e)), i.delegateTarget && r.call(t, i);
  };
}
var Own = xwn,
  uSe = xD(Own);
function cSe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function Wx(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? cSe(Object(n), !0).forEach(function (r) {
          Mr(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : cSe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function kc() {
  kc = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = S.method,
      W = E.iterator[L];
    if (W === void 0)
      return (
        (S.delegate = null),
        (L === "throw" &&
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")) ||
          (L !== "return" &&
            ((S.method = "throw"),
            (S.arg = new TypeError(
              "The iterator does not provide a '" + L + "' method"
            )))),
        f
      );
    var F = h(W, E.iterator, S.arg);
    if (F.type === "throw")
      return (S.method = "throw"), (S.arg = F.arg), (S.delegate = null), f;
    var oe = F.arg;
    return oe
      ? oe.done
        ? ((S[E.resultName] = oe.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : oe
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function KI(t) {
  return (KI =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function dSe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function X1(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        dSe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        dSe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function Xf(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function hSe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, UVe(r.key), r);
  }
}
function Vf(t, e, n) {
  return (
    e && hSe(t.prototype, e),
    n && hSe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Mr(t, e, n) {
  return (
    (e = UVe(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function I5(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && kB(t, e);
}
function ZI(t) {
  return (ZI = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function kB(t, e) {
  return (kB = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function NVe() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function FVe(t, e, n) {
  return (FVe = NVe()
    ? Reflect.construct.bind()
    : function (r, i, o) {
        var l = [null];
        l.push.apply(l, i);
        var u = new (Function.bind.apply(r, l))();
        return o && kB(u, o.prototype), u;
      }).apply(null, arguments);
}
function Gwn(t) {
  return Function.toString.call(t).indexOf("[native code]") !== -1;
}
function JU(t) {
  var e = typeof Map == "function" ? new Map() : void 0;
  return (
    (JU = function (n) {
      if (n === null || !Gwn(n)) return n;
      if (typeof n != "function")
        throw new TypeError(
          "Super expression must either be null or a function"
        );
      if (e !== void 0) {
        if (e.has(n)) return e.get(n);
        e.set(n, r);
      }
      function r() {
        return FVe(n, arguments, ZI(this).constructor);
      }
      return (
        (r.prototype = Object.create(n.prototype, {
          constructor: {
            value: r,
            enumerable: !1,
            writable: !0,
            configurable: !0,
          },
        })),
        kB(r, n)
      );
    }),
    JU(t)
  );
}
function Nwn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = Object.keys(t);
  for (r = 0; r < o.length; r++) (n = o[r]), e.indexOf(n) >= 0 || (i[n] = t[n]);
  return i;
}
function Fwn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = Nwn(t, e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        e.indexOf(n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
function oa(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function Uwn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return oa(t);
}
function D5(t) {
  var e = NVe();
  return function () {
    var n,
      r = ZI(t);
    if (e) {
      var i = ZI(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return Uwn(this, n);
  };
}
function Bwn(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = ZI(t)) !== null; );
  return t;
}
function one() {
  return (
    (one =
      typeof Reflect < "u" && Reflect.get
        ? Reflect.get.bind()
        : function (t, e, n) {
            var r = Bwn(t, e);
            if (r) {
              var i = Object.getOwnPropertyDescriptor(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    one.apply(this, arguments)
  );
}
function Hwn(t, e) {
  if (t) {
    if (typeof t == "string") return fSe(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? fSe(t, e)
        : void 0
    );
  }
}
function fSe(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function Xwn(t, e) {
  var n = (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (!n) {
    if (
      Array.isArray(t) ||
      (n = Hwn(t)) ||
      (e && t && typeof t.length == "number")
    ) {
      n && (t = n);
      var r = 0,
        i = function () {};
      return {
        s: i,
        n: function () {
          return r >= t.length ? { done: !0 } : { done: !1, value: t[r++] };
        },
        e: function (c) {
          throw c;
        },
        f: i,
      };
    }
    throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  }
  var o,
    l = !0,
    u = !1;
  return {
    s: function () {
      n = n.call(t);
    },
    n: function () {
      var c = n.next();
      return (l = c.done), c;
    },
    e: function (c) {
      (u = !0), (o = c);
    },
    f: function () {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw o;
      }
    },
  };
}
function Vwn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function UVe(t) {
  var e = Vwn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
var gp,
  xh = (function () {
    function t() {
      Xf(this, t);
    }
    return (
      Vf(t, null, [
        {
          key: "start",
          value: function (e) {
            return e && e.length
              ? (e.length === 1 && e.end(0) - e.start(0) < 1e-6) ||
                (e.length === 1 && e.start(0) < 0)
                ? 0
                : e.start(0)
              : 0;
          },
        },
        {
          key: "end",
          value: function (e) {
            return e && e.length
              ? e.length === 1 && e.end(0) - e.start(0) < 1e-6
                ? 0
                : e.end(e.length - 1)
              : 0;
          },
        },
        {
          key: "get",
          value: function (e) {
            if (e)
              try {
                return e.buffered;
              } catch {}
          },
        },
        {
          key: "buffers",
          value: function (e, n) {
            if (!e || !e.length) return [];
            for (var r = [], i = 0, o = e.length; i < o; i++) {
              var l = r.length;
              if (l && n) {
                var u = r[l - 1],
                  c = u[1];
                if (e.start(i) - c <= n) {
                  var d = e.end(i);
                  d > c && (u[1] = d);
                } else r.push([e.start(i), e.end(i)]);
              } else r.push([e.start(i), e.end(i)]);
            }
            return r;
          },
        },
        {
          key: "totalLength",
          value: function (e) {
            return e && e.length
              ? e.reduce(function (n, r) {
                  return n + (r[1] - r[0]);
                }, 0)
              : 0;
          },
        },
        {
          key: "info",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 0,
              r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0;
            if (!e || !e.length) return { start: 0, end: 0, buffers: [] };
            for (
              var i = 0,
                o = 0,
                l = 0,
                u = 0,
                c = 0,
                d = 0,
                h = 0,
                f = t.buffers(e, r),
                p = 0,
                g = f.length;
              p < g;
              p++
            ) {
              var y = f[p];
              if (n + r >= y[0] && n <= y[1]) (i = y[0]), (o = y[1]), (l = p);
              else {
                if (n + r < y[0]) {
                  (u = y[0]), (c = y[1]);
                  break;
                }
                n + r > y[1] && ((d = y[0]), (h = y[1]));
              }
            }
            return {
              start: i,
              end: o,
              index: l,
              buffers: f,
              nextStart: u,
              nextEnd: c,
              prevStart: d,
              prevEnd: h,
              currentTime: n,
              behind: n - i,
              remaining: o ? o - n : 0,
              length: t.totalLength && t.totalLength(f),
            };
          },
        },
        {
          key: "isBuffered",
          value: function (e, n) {
            if (e) {
              var r = t.get(e);
              if (r != null && r.length) {
                for (var i = 0; i < r.length; i++)
                  if (n >= r.start(i) && n <= r.end(i)) return !0;
              }
            }
            return !1;
          },
        },
      ]),
      t
    );
  })(),
  zwn = typeof window < "u",
  qo = {
    MANIFEST: "manifest",
    NETWORK: "network",
    NETWORK_TIMEOUT: "network_timeout",
    NETWORK_FORBIDDEN: "network_forbidden",
    NETWORK_NOTFOUND: "network_notfound",
    NETWROK_RANGE_NOT_SATISFIABLE: "network_range_not_satisfiable",
    DEMUX: "demux",
    REMUX: "remux",
    MEDIA: "media",
    DRM: "drm",
    OTHER: "other",
    RUNTIME: "runtime",
    SUB_TYPES: {
      FLV: "FLV",
      HLS: "HLS",
      MP4: "MP4",
      FMP4: "FMP4",
      MSE_ADD_SB: "MSE_ADD_SB",
      MSE_APPEND_BUFFER: "MSE_APPEND_BUFFER",
      MSE_OTHER: "MSE_OTHER",
      MSE_FULL: "MSE_FULL",
      MSE_CHANGE_TYPE: "MSE_CHANGE_TYPE",
      OPTION: "OPTION",
      DASH: "DASH",
      LICENSE: "LICENSE",
      CUSTOM_LICENSE: "CUSTOM_LICENSE",
      MSE_HIJACK: "MSE_HIJACK",
      EME_HIJACK: "EME_HIJACK",
      SIDX: "SIDX",
      NO_CANPLAY_ERROR: "NO_CANPLAY_ERROR",
      BUFFERBREAK_ERROR: "BUFFERBREAK_ERROR",
      WAITING_TIMEOUT_ERROR: "WAITING_TIMEOUT_ERROR",
      MEDIA_ERR_ABORTED: "MEDIA_ERR_ABORTED",
      MEDIA_ERR_NETWORK: "MEDIA_ERR_NETWORK",
      MEDIA_ERR_DECODE: "MEDIA_ERR_DECODE",
      MEDIA_ERR_SRC_NOT_SUPPORTED: "MEDIA_ERR_SRC_NOT_SUPPORTED",
      MEDIA_ERR_CODEC_NOT_SUPPORTED: "MEDIA_ERR_CODEC_NOT_SUPPORTED",
      MEDIA_ERR_URL_EMPTY: "MEDIA_ERR_URL_EMPTY",
    },
  },
  $W =
    (Mr((gp = {}), qo.MANIFEST, { HLS: 1100, DASH: 1200 }),
    Mr(gp, qo.NETWORK, 2100),
    Mr(gp, qo.NETWORK_TIMEOUT, 2101),
    Mr(gp, qo.NETWORK_FORBIDDEN, 2103),
    Mr(gp, qo.NETWORK_NOTFOUND, 2104),
    Mr(gp, qo.NETWROK_RANGE_NOT_SATISFIABLE, 2116),
    Mr(gp, qo.DEMUX, {
      FLV: 3100,
      HLS: 3200,
      MP4: 3300,
      FMP4: 3400,
      SIDX: 3410,
    }),
    Mr(gp, qo.REMUX, { FMP4: 4100, MP4: 4200 }),
    Mr(gp, qo.MEDIA, {
      MEDIA_ERR_ABORTED: 5101,
      MEDIA_ERR_NETWORK: 5102,
      MEDIA_ERR_DECODE: 5103,
      MEDIA_ERR_SRC_NOT_SUPPORTED: 5104,
      MEDIA_ERR_CODEC_NOT_SUPPORTED: 5105,
      MEDIA_ERR_URL_EMPTY: 5106,
      MSE_ADD_SB: 5200,
      MSE_APPEND_BUFFER: 5201,
      MSE_OTHER: 5202,
      MSE_FULL: 5203,
      MSE_HIJACK: 5204,
      MSE_CHANGE_TYPE: 5205,
      EME_HIJACK: 5301,
    }),
    Mr(gp, qo.DRM, { LICENSE: 7100, CUSTOM_LICENSE: 7200 }),
    Mr(gp, qo.OTHER, 8e3),
    Mr(gp, qo.RUNTIME, {
      NO_CANPLAY_ERROR: 9001,
      BUFFERBREAK_ERROR: 9002,
      WAITING_TIMEOUT_ERROR: 9003,
    }),
    gp),
  Zg = (function (t) {
    I5(n, JU(Error));
    var e = D5(n);
    function n(r, i, o, l, u) {
      var c;
      return (
        Xf(this, n),
        ((c = e.call(this, u || (o == null ? void 0 : o.message))).errorType =
          r === qo.NETWORK_TIMEOUT ? qo.NETWORK : r),
        (c.originError = o),
        (c.ext = l),
        (c.errorCode = $W[r][i] || $W[r]),
        (c.errorMessage = c.message),
        c.errorCode ||
          ((c.errorType = qo.OTHER), (c.errorCode = $W[c.errorType])),
        c
      );
    }
    return (
      Vf(n, null, [
        {
          key: "create",
          value: function (r, i, o, l, u) {
            return r instanceof n
              ? r
              : (r instanceof Error && ((o = r), (r = "")),
                r || (r = qo.OTHER),
                new n(r, i, o, l, u));
          },
        },
        {
          key: "network",
          value: function (r) {
            var i;
            return new n(
              r != null && r.isTimeout ? qo.NETWORK_TIMEOUT : qo.NETWORK,
              null,
              r instanceof Error ? r : null,
              {
                url: r == null ? void 0 : r.url,
                response: r == null ? void 0 : r.response,
                httpCode:
                  r == null || (i = r.response) === null || i === void 0
                    ? void 0
                    : i.status,
              }
            );
          },
        },
      ]),
      n
    );
  })(),
  Y3 = { DEBUG: 1, LOG: 2, WARN: 3, ERROR: 4 },
  jwn = 204800,
  Wwn = ["Boolean", "Number", "String", "Undefined", "Null", "Date", "Object"],
  sE = (function () {
    function t(e, n) {
      Xf(this, t),
        (this.name = e || ""),
        (this._prefix = "[".concat(this.name, "]")),
        (this.logCacheLevel = (n == null ? void 0 : n.logCacheLevel) || 3),
        (this.logMaxSize = (n == null ? void 0 : n.logMaxSize) || jwn),
        (this.logSize = 0),
        (this.logTextArray = []);
    }
    return (
      Vf(
        t,
        [
          {
            key: "debug",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [Y3.DEBUG].concat(r)),
                t.disabled ||
                  (e = console).debug.apply(
                    e,
                    ["[".concat(cM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "log",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [Y3.LOG].concat(r)),
                t.disabled ||
                  (e = console).log.apply(
                    e,
                    ["[".concat(cM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "warn",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [Y3.WARN].concat(r)),
                t.disabled ||
                  (e = console).warn.apply(
                    e,
                    ["[".concat(cM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "error",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [Y3.ERROR].concat(r)),
                t.disabled ||
                  (e = console).error.apply(
                    e,
                    ["[".concat(cM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "logCache",
            value: function (e) {
              if (!(e < this.logCacheLevel)) {
                var n = "";
                try {
                  for (
                    var r = arguments.length,
                      i = new Array(r > 1 ? r - 1 : 0),
                      o = 1;
                    o < r;
                    o++
                  )
                    i[o - 1] = arguments[o];
                  var l = i.map(function (c) {
                    return BVe(c);
                  });
                  n = "[".concat(cM(), "]") + this._prefix + JSON.stringify(l);
                } catch {
                  return;
                }
                if (
                  (e >= this.logCacheLevel &&
                    ((this.logSize += n.length), this.logTextArray.push(n)),
                  this.logSize > this.logMaxSize)
                ) {
                  var u = this.logTextArray.shift();
                  this.logSize -= u.length;
                }
              }
            },
          },
          {
            key: "getLogCache",
            value: function () {
              var e = this.logTextArray.join(`
`);
              return this.reset(), e;
            },
          },
          {
            key: "reset",
            value: function () {
              (this.logTextArray = []), (this.logSize = 0);
            },
          },
          {
            key: "table",
            value: function () {
              var e;
              t.disabled ||
                (console.group(this._prefix),
                (e = console).table.apply(e, arguments),
                console.groupEnd());
            },
          },
          {
            key: "setLogLevel",
            value: function (e) {
              this.logCacheLevel = e;
            },
          },
        ],
        [
          {
            key: "enable",
            value: function () {
              t.disabled = !1;
            },
          },
          {
            key: "disable",
            value: function () {
              t.disabled = !0;
            },
          },
        ]
      ),
      t
    );
  })();
function cM() {
  return new Date().toLocaleString();
}
function Kwn(t) {
  if (KI(t) !== "object") return t;
  var e = Object.prototype.toString.call(t).slice(8, -1);
  switch (e) {
    case "Array":
    case "Uint8Array":
    case "ArrayBuffer":
      return e + "[" + t.length + "]";
    case "Object":
      return "{}";
    default:
      return e;
  }
}
function BVe(t, e, n) {
  n || (n = 1), e || (e = 2);
  var r = {};
  if (!t || KI(t) !== "object") return t;
  var i = Object.prototype.toString.call(t).slice(8, -1);
  if (!Wwn.includes(i)) return i;
  if (!(n > e)) {
    for (var o in t)
      Object.prototype.hasOwnProperty.call(t, o) &&
        (n === e
          ? (r[o] = Kwn(t[o]))
          : KI(t[o]) === "object"
          ? (r[o] = BVe(t[o], e, n + 1))
          : (r[o] = t[o]));
    return r;
  }
}
function Yw() {
  var t,
    e,
    n = new Promise(function (r, i) {
      (t = r), (e = i);
    });
  return (
    (n.used = !1),
    (n.resolve = function () {
      return (n.used = !0), t.apply(void 0, arguments);
    }),
    (n.reject = function () {
      return (n.used = !0), e.apply(void 0, arguments);
    }),
    n
  );
}
function ew() {
  try {
    return parseInt(performance.now(), 10);
  } catch {
    return new Date().getTime();
  }
}
Mr(sE, "disabled", !0);
var Zwn = {
  stringify: function (t) {
    try {
      return JSON.stringify(t);
    } catch {
      return "";
    }
  },
  parse: function (t) {
    try {
      return JSON.parse(t);
    } catch {
      return;
    }
  },
};
function pSe() {
  var t = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
  try {
    return zwn
      ? t && typeof ManagedMediaSource < "u"
        ? ManagedMediaSource
        : window.MediaSource
      : null;
  } catch {}
}
function xW(t) {
  return /ManagedMediaSource/gi.test(Object.prototype.toString.call(t));
}
function Ywn(t) {
  var e = [];
  if (t instanceof TimeRanges)
    for (var n = 0; n < t.length; n++)
      e.push({ start: t.start(n), end: t.end(n) });
  return e;
}
var Q3 = {
    APPEND: "appendBuffer",
    REMOVE: "removeBuffer",
    UPDATE_DURATION: "updateDuration",
  },
  Kx = (function () {
    function t(i, o) {
      var l = this;
      Xf(this, t),
        Mr(this, "media", null),
        Mr(this, "mediaSource", null),
        Mr(this, "_openPromise", Yw()),
        Mr(this, "_queue", Object.create(null)),
        Mr(this, "_sourceBuffer", Object.create(null)),
        Mr(this, "_mseFullFlag", {}),
        Mr(this, "_st", 0),
        Mr(this, "_opst", 0),
        Mr(this, "_logger", null),
        Mr(this, "_config", null),
        Mr(this, "_url", null),
        Mr(this, "_onStartStreaming", function () {
          l._logger.debug("startstreaming");
        }),
        Mr(this, "_onEndStreaming", function () {
          l._logger.debug("endstreaming");
        }),
        Mr(this, "_onSBUpdateEnd", function (u) {
          var c = l._queue[u];
          if (c) {
            var d = c[0];
            if (
              ((d == null ? void 0 : d.opName) !== Q3.UPDATE_DURATION &&
                c.shift(),
              d)
            ) {
              var h,
                f,
                p = ew() - l._opst;
              l._logger.debug(
                "UpdateEnd(".concat(u, "/").concat(d.opName, ")"),
                Zwn.stringify(
                  Ywn(
                    (h = l._sourceBuffer[u]) === null || h === void 0
                      ? void 0
                      : h.buffered
                  )
                ),
                p,
                d.context
              ),
                d.promise.resolve({
                  name: d.opName,
                  context: d.context,
                  costtime: p,
                });
              var g =
                (f = d.context) === null || f === void 0 ? void 0 : f.callback;
              g && typeof g == "function" && g(d.context), l._startQueue(u);
            }
          }
        }),
        Mr(this, "_onSBUpdateError", function (u, c) {
          var d = l._queue[u];
          if (d) {
            var h = d[0];
            h &&
              (l._logger.error("UpdateError", u, h.opName, h.context),
              h.promise.reject(
                new Zg(qo.MEDIA, qo.SUB_TYPES.MSE_APPEND_BUFFER, c)
              ));
          }
        }),
        (this._config = Object.assign(t.getDefaultConfig(), o)),
        i && this.bindMedia(i),
        (this._logger = new sE("MSE")),
        this._config.openLog && sE.enable();
    }
    var e, n, r;
    return (
      Vf(
        t,
        [
          {
            key: "isOpened",
            get: function () {
              var i;
              return (
                ((i = this.mediaSource) === null || i === void 0
                  ? void 0
                  : i.readyState) === "open"
              );
            },
          },
          {
            key: "hasOpTasks",
            get: function () {
              var i = this,
                o = !1;
              return (
                Object.keys(this._queue).forEach(function (l) {
                  var u = i._queue[l];
                  Array.isArray(u) && (o || (o = u.length > 0));
                }),
                o
              );
            },
          },
          {
            key: "url",
            get: function () {
              return this._url;
            },
          },
          {
            key: "duration",
            get: function () {
              var i;
              return (
                ((i = this.mediaSource) === null || i === void 0
                  ? void 0
                  : i.duration) || -1
              );
            },
          },
          {
            key: "isEnded",
            get: function () {
              return (
                !!this.mediaSource && this.mediaSource.readyState === "ended"
              );
            },
          },
          {
            key: "streaming",
            get: function () {
              return !xW(this.mediaSource) || this.mediaSource.streaming;
            },
          },
          {
            key: "isFull",
            value: function (i) {
              return i ? this._mseFullFlag[i] : this._mseFullFlag[t.VIDEO];
            },
          },
          {
            key: "updateDuration",
            value: function (i) {
              var o = this,
                l = this.mediaSource && this.mediaSource.duration > i;
              if (this.mediaSource && this.mediaSource.duration > i) {
                var u = 0;
                if (
                  (Object.keys(this._sourceBuffer).forEach(function (c) {
                    try {
                      u = Math.max(o.bufferEnd(c) || 0, u);
                    } catch {}
                  }),
                  i < u)
                )
                  return Promise.resolve();
              }
              return this._enqueueBlockingOp(
                function () {
                  o.isEnded
                    ? o._logger.debug("setDuration but ended")
                    : o.mediaSource &&
                      ((o.mediaSource.duration = i),
                      o._logger.debug("setDuration", i));
                },
                Q3.UPDATE_DURATION,
                { isReduceDuration: l }
              );
            },
          },
          {
            key: "open",
            value: function () {
              var i = this;
              if (
                this._openPromise.used &&
                !this.isOpened &&
                this.mediaSource
              ) {
                var o = this.mediaSource;
                o.addEventListener("sourceopen", function l() {
                  var u = ew() - i._st;
                  i._logger.debug("sourceopen", u),
                    o.removeEventListener("sourceopen", l),
                    i._openPromise.resolve({ costtime: u });
                }),
                  (this._openPromise = Yw());
              }
              return this._openPromise;
            },
          },
          {
            key: "bindMedia",
            value:
              ((r = X1(
                kc().mark(function i(o) {
                  var l,
                    u,
                    c,
                    d,
                    h = this;
                  return kc().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (!this.mediaSource && !this.media) {
                              f.next = 3;
                              break;
                            }
                            return (f.next = 3), this.unbindMedia();
                          case 3:
                            if (((l = pSe(this._config.preferMMS)), o && l)) {
                              f.next = 6;
                              break;
                            }
                            throw new Error(
                              "Param media or MediaSource does not exist"
                            );
                          case 6:
                            return (
                              (this.media = o),
                              (u = this.mediaSource = new l()),
                              (c = xW(u)),
                              (this._st = ew()),
                              (d = function p() {
                                var g = ew() - h._st;
                                h._logger.debug("sourceopen"),
                                  u.removeEventListener("sourceopen", p),
                                  URL.revokeObjectURL(o.src),
                                  h._openPromise.resolve({ costtime: g });
                              }),
                              u.addEventListener("sourceopen", d),
                              c &&
                                (u.addEventListener(
                                  "startstreaming",
                                  this._onStartStreaming
                                ),
                                u.addEventListener(
                                  "endstreaming",
                                  this._onEndStreaming
                                )),
                              (this._url = URL.createObjectURL(u)),
                              (o.src = this._url),
                              (o.disableRemotePlayback = c),
                              f.abrupt("return", this._openPromise)
                            );
                          case 17:
                          case "end":
                            return f.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function (i) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "unbindMedia",
            value:
              ((n = X1(
                kc().mark(function i() {
                  var o,
                    l,
                    u,
                    c = this;
                  return kc().wrap(
                    function (d) {
                      for (;;)
                        switch ((d.prev = d.next)) {
                          case 0:
                            if (
                              (this._openPromise.used ||
                                this._openPromise.resolve(),
                              (o = this.mediaSource))
                            ) {
                              if (
                                (Object.keys(this._queue).forEach(function (h) {
                                  var f = c._queue[h];
                                  f &&
                                    f.forEach(function (p) {
                                      var g, y;
                                      return (g = p.promise) === null ||
                                        g === void 0 ||
                                        (y = g.resolve) === null ||
                                        y === void 0
                                        ? void 0
                                        : y.call(g);
                                    });
                                }),
                                (l =
                                  !!this.media && this.media.readyState >= 1),
                                (u = o.readyState === "open"),
                                l && u)
                              )
                                try {
                                  o.endOfStream();
                                } catch {}
                              Object.keys(this._sourceBuffer).forEach(function (
                                h
                              ) {
                                try {
                                  o.removeSourceBuffer(c._sourceBuffer[h]);
                                } catch {}
                              }),
                                xW(o) &&
                                  (o.removeEventListener(
                                    "startstreaming",
                                    this._onStartStreaming
                                  ),
                                  o.removeEventListener(
                                    "endstreaming",
                                    this._onEndStreaming
                                  ));
                            }
                            if (this.media) {
                              (this.media.disableRemotePlayback = !1),
                                this.media.removeAttribute("src");
                              try {
                                this.media.load();
                              } catch {}
                              this.media = null;
                            }
                            (this.mediaSource = null),
                              (this._openPromise = Yw()),
                              (this._queue = Object.create(null)),
                              (this._sourceBuffer = Object.create(null));
                          case 8:
                          case "end":
                            return d.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "createSource",
            value: function (i, o) {
              if (!this._sourceBuffer[i] && this.mediaSource) {
                var l;
                try {
                  l = this._sourceBuffer[i] =
                    this.mediaSource.addSourceBuffer(o);
                } catch (u) {
                  throw new Zg(qo.MEDIA, qo.SUB_TYPES.MSE_ADD_SB, u);
                }
                (l.mimeType = o),
                  l.addEventListener(
                    "updateend",
                    this._onSBUpdateEnd.bind(this, i)
                  ),
                  l.addEventListener(
                    "error",
                    this._onSBUpdateError.bind(this, i)
                  );
              }
            },
          },
          {
            key: "changeType",
            value: function (i, o) {
              var l = this,
                u = this._sourceBuffer[i];
              return this.mediaSource && u && u.mimeType !== o
                ? typeof u.changeType != "function"
                  ? Promise.reject(
                      new Zg(
                        qo.MEDIA,
                        qo.SUB_TYPES.MSE_CHANGE_TYPE,
                        new Error("changeType is not a function")
                      )
                    )
                  : this._enqueueOp(
                      i,
                      function () {
                        try {
                          u.changeType(o);
                        } catch (c) {
                          throw new Zg(
                            qo.MEDIA,
                            qo.SUB_TYPES.MSE_CHANGE_TYPE,
                            c
                          );
                        }
                        (u.mimeType = o), l._onSBUpdateEnd(i);
                      },
                      "changeType",
                      { mimeType: o }
                    )
                : Promise.resolve();
            },
          },
          {
            key: "createOrChangeSource",
            value: function (i, o) {
              return this.createSource(i, o), this.changeType(i, o);
            },
          },
          {
            key: "append",
            value: function (i, o, l) {
              var u = this;
              return o && o.byteLength && this._sourceBuffer[i]
                ? this._enqueueOp(
                    i,
                    function () {
                      var c;
                      u.mediaSource &&
                        !u.media.error &&
                        (u._logger.debug("MSE APPEND START", l),
                        (u._opst = ew()),
                        (c = u._sourceBuffer[i]) === null ||
                          c === void 0 ||
                          c.appendBuffer(o));
                    },
                    Q3.APPEND,
                    l
                  )
                : Promise.resolve();
            },
          },
          {
            key: "remove",
            value: function (i, o, l, u) {
              var c = this,
                d = !1;
              return (
                this._mseFullFlag[i] && (d = !0),
                this._enqueueOp(
                  i,
                  function () {
                    if (c.mediaSource && !c.media.error) {
                      var h = c._sourceBuffer[i];
                      o >= l || !h
                        ? c._onSBUpdateEnd(i)
                        : ((c._opst = ew()),
                          c._logger.debug("MSE REMOVE START", i, o, l, u),
                          h.remove(o, l));
                    }
                  },
                  Q3.REMOVE,
                  u,
                  d
                )
              );
            },
          },
          {
            key: "clearBuffer",
            value: function (i, o) {
              var l,
                u = this;
              return (
                Object.keys(this._sourceBuffer).forEach(function (c) {
                  l = u.remove(c, i, o);
                }),
                l || Promise.resolve()
              );
            },
          },
          {
            key: "clearAllBuffer",
            value: function () {
              var i,
                o = this;
              return (
                Object.keys(this._sourceBuffer).forEach(function (l) {
                  var u = o._sourceBuffer[l];
                  i = o.remove(l, 0, xh.end(xh.get(u)));
                }),
                i
              );
            },
          },
          {
            key: "clearOpQueues",
            value: function (i, o) {
              var l;
              this._logger.debug("MSE clearOpQueue START");
              var u = this._queue[i];
              if (o && u) this._queue[i] = [];
              else if (u && u[i] && !(u.length < 5)) {
                var c = [];
                u.forEach(function (d) {
                  d.context && d.context.isinit && c.push(d);
                }),
                  (this._queue[i] = u.slice(0, 2)),
                  c.length > 0 && (l = this._queue[i]).push.apply(l, c);
              }
            },
          },
          {
            key: "endOfStream",
            value: function (i) {
              var o = this;
              return this.mediaSource && this.mediaSource.readyState === "open"
                ? this._enqueueBlockingOp(function () {
                    var l = o.mediaSource;
                    l &&
                      l.readyState === "open" &&
                      (o._logger.debug("MSE endOfStream START"),
                      i ? l.endOfStream(i) : l.endOfStream());
                  }, "endOfStream")
                : Promise.resolve();
            },
          },
          {
            key: "setLiveSeekableRange",
            value: function (i, o) {
              var l = this.mediaSource;
              i < 0 ||
                o < i ||
                l == null ||
                !l.setLiveSeekableRange ||
                l.readyState !== "open" ||
                l.setLiveSeekableRange(i, o);
            },
          },
          {
            key: "getSourceBuffer",
            value: function (i) {
              return this._sourceBuffer[i];
            },
          },
          {
            key: "buffered",
            value: function (i) {
              return xh.get(this._sourceBuffer[i]);
            },
          },
          {
            key: "bufferStart",
            value: function (i) {
              return xh.start(this.buffered(i));
            },
          },
          {
            key: "bufferEnd",
            value: function (i) {
              return xh.end(this.buffered(i));
            },
          },
          {
            key: "_enqueueOp",
            value: function (i, o, l, u, c) {
              var d = this;
              if (!this.mediaSource) return Promise.resolve();
              var h = (this._queue[i] = this._queue[i] || []),
                f = { exec: o, promise: Yw(), opName: l, context: u };
              return (
                c
                  ? (h.splice(0, 0, f),
                    (this._mseFullFlag[i] = !1),
                    this._startQueue(i))
                  : h.push(f),
                this.isOpened || this.isEnded
                  ? h.length === 1 && this._startQueue(i)
                  : this._openPromise.then(function () {
                      h.length === 1 && d._startQueue(i);
                    }),
                f.promise
              );
            },
          },
          {
            key: "_enqueueBlockingOp",
            value:
              ((e = X1(
                kc().mark(function i(o, l, u) {
                  var c,
                    d,
                    h = this;
                  return kc().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (this.mediaSource) {
                              f.next = 2;
                              break;
                            }
                            return f.abrupt("return", Promise.resolve());
                          case 2:
                            if ((c = Object.keys(this._sourceBuffer)).length) {
                              f.next = 5;
                              break;
                            }
                            return f.abrupt("return", o());
                          case 5:
                            return (
                              (d = []),
                              c.forEach(function (p) {
                                var g = h._queue[p],
                                  y = Yw();
                                d.push(y),
                                  g.push({
                                    exec: function () {
                                      y.resolve();
                                    },
                                    promise: y,
                                    opName: l,
                                    context: u,
                                  }),
                                  g.length === 1 && h._startQueue(p);
                              }),
                              f.abrupt(
                                "return",
                                Promise.all(d).then(function () {
                                  try {
                                    return o();
                                  } finally {
                                    c.forEach(function (p) {
                                      var g = h._queue[p],
                                        y = h._sourceBuffer[p];
                                      g == null || g.shift(),
                                        (y && y.updating) || h._startQueue(p);
                                    });
                                  }
                                })
                              )
                            );
                          case 8:
                          case "end":
                            return f.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function (i, o, l) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_startQueue",
            value: function (i) {
              var o = this._queue[i];
              if (o) {
                var l = o[0];
                if (l && !this._mseFullFlag[i])
                  try {
                    l.exec();
                  } catch (d) {
                    var u, c;
                    d &&
                    d.message &&
                    d.message.indexOf("SourceBuffer is full") >= 0
                      ? ((this._mseFullFlag[i] = !0),
                        l.context &&
                          KI(l.context) === "object" &&
                          (l.context.isFull = !0),
                        this._logger.error(
                          "[MSE error],  context,",
                          l.context,
                          " ,name,",
                          l.opName,
                          ",err,SourceBuffer is full"
                        ),
                        l == null ||
                          (u = l.promise) === null ||
                          u === void 0 ||
                          u.reject(new Zg(qo.MEDIA, qo.SUB_TYPES.MSE_FULL, d)))
                      : (this._logger.error(d),
                        l == null ||
                          (c = l.promise) === null ||
                          c === void 0 ||
                          c.reject(
                            d.constructor === Zg
                              ? d
                              : new Zg(qo.MEDIA, qo.SUB_TYPES.MSE_OTHER, d)
                          ),
                        o.shift(),
                        this._startQueue(i));
                  }
              }
            },
          },
          {
            key: "setTimeoffset",
            value: function (i, o, l) {
              var u = this;
              return this._enqueueOp(
                i,
                function () {
                  o < 0 && (o += 0.001),
                    (u._sourceBuffer[i].timestampOffset = o),
                    u._onSBUpdateEnd(i);
                },
                "setTimeoffset",
                l
              );
            },
          },
          {
            key: "abort",
            value: function (i, o) {
              var l = this;
              return this.isOpened
                ? this._enqueueOp(
                    i,
                    function () {
                      l._sourceBuffer[i].abort(), l._onSBUpdateEnd(i);
                    },
                    "abort",
                    o
                  )
                : Promise.resolve();
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              var i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"',
                o = pSe(
                  !(arguments.length > 1 && arguments[1] !== void 0) ||
                    arguments[1]
                );
              if (!o) return !1;
              try {
                return o.isTypeSupported(i);
              } catch (l) {
                return this._logger.error(i, l), !1;
              }
            },
          },
          {
            key: "isMMSOnly",
            value: function () {
              return (
                typeof ManagedMediaSource < "u" && typeof MediaSource > "u"
              );
            },
          },
          {
            key: "getDefaultConfig",
            value: function () {
              return { openLog: !1, preferMMS: !1 };
            },
          },
        ]
      ),
      t
    );
  })();
Mr(Kx, "VIDEO", "video"), Mr(Kx, "AUDIO", "audio");
var bS = { FETCH: "fetch", XHR: "xhr" },
  Zx = { ARRAY_BUFFER: "arraybuffer", TEXT: "text", JSON: "json" },
  rv = (function (t) {
    I5(n, JU(Error));
    var e = D5(n);
    function n(r, i, o, l) {
      var u;
      return (
        Xf(this, n),
        Mr(oa((u = e.call(this, l))), "retryCount", 0),
        Mr(oa(u), "isTimeout", !1),
        Mr(oa(u), "loaderType", bS.FETCH),
        Mr(oa(u), "startTime", 0),
        Mr(oa(u), "endTime", 0),
        Mr(oa(u), "options", {}),
        (u.url = r),
        (u.request = i),
        (u.response = o),
        u
      );
    }
    return Vf(n);
  })(),
  HVe = Object.prototype.toString;
function Qwn(t) {
  return t !== null && KI(t) === "object";
}
function gSe(t) {
  if (HVe.call(t) !== "[object Object]") return !1;
  var e = Object.getPrototypeOf(t);
  return e === null || e === Object.prototype;
}
function Jwn(t) {
  return HVe.call(t) === "[object Date]";
}
function XVe(t) {
  if (
    t &&
    t[0] !== null &&
    t[0] !== void 0 &&
    (t[0] !== 0 || (t[1] !== null && t[1] !== void 0))
  ) {
    var e = "bytes=" + t[0] + "-";
    return t[1] && (e += t[1]), e;
  }
}
function mSe(t) {
  return encodeURIComponent(t)
    .replace(/%3A/gi, ":")
    .replace(/%24/g, "$")
    .replace(/%2C/gi, ",")
    .replace(/%20/g, "+")
    .replace(/%5B/gi, "[")
    .replace(/%5D/gi, "]");
}
function VVe(t, e) {
  if (t) {
    if (!e) return t;
    var n,
      r = Object.keys(e)
        .map(function (o) {
          if ((n = e[o]) != null)
            return (
              Array.isArray(n) ? (o += "[]") : (n = [n]),
              n
                .map(function (l) {
                  return (
                    Jwn(l)
                      ? (l = l.toISOString())
                      : Qwn(l) && (l = JSON.stringify(l)),
                    "".concat(mSe(o), "=").concat(mSe(l))
                  );
                })
                .join("&")
            );
        })
        .filter(Boolean)
        .join("&");
    if (r) {
      var i = t.indexOf("#");
      i !== -1 && (t = t.slice(0, i)),
        (t += (t.indexOf("?") === -1 ? "?" : "&") + r);
    }
    return t;
  }
}
function sne(t, e, n, r, i, o, l, u, c, d, h) {
  return (
    (i = i != null ? parseFloat(i) : null),
    (r = parseInt(r || "0", 10)),
    Number.isNaN(r) && (r = 0),
    {
      data: t,
      done: e,
      options: {
        range: c,
        vid: d,
        index: u,
        contentLength: r,
        age: i,
        startTime: o,
        firstByteTime: l,
        endTime: Date.now(),
        priOptions: h,
      },
      response: n,
    }
  );
}
function lne(t, e) {
  return Math.round((8 * t * 1e3) / e / 1024);
}
var Vi = {
    ERROR: "error",
    TTFB: "core.ttfb",
    LOAD_START: "core.loadstart",
    LOAD_RESPONSE_HEADERS: "core.loadresponseheaders",
    LOAD_COMPLETE: "core.loadcomplete",
    LOAD_RETRY: "core.loadretry",
    SOURCEBUFFER_CREATED: "core.sourcebuffercreated",
    MEDIASOURCE_OPENED: "core.mediasourceopened",
    ANALYZE_DURATION_EXCEEDED: "core.analyzedurationexceeded",
    APPEND_BUFFER: "core.appendbuffer",
    REMOVE_BUFFER: "core.removebuffer",
    BUFFEREOS: "core.buffereos",
    KEYFRAME: "core.keyframe",
    CHASEFRAME: "core.chaseframe",
    METADATA_PARSED: "core.metadataparsed",
    SEI: "core.sei",
    SEI_IN_TIME: "core.seiintime",
    FLV_SCRIPT_DATA: "core.flvscriptdata",
    LOWDECODE: "core.lowdecode",
    SWITCH_URL_SUCCESS: "core.switchurlsuccess",
    SWITCH_URL_FAILED: "core.switchurlfailed",
    SPEED: "core.speed",
    HLS_MANIFEST_LOADED: "core.hlsmanifestloaded",
    HLS_LEVEL_LOADED: "core.hlslevelloaded",
    DEMUXED_TRACK: "core.demuxedtrack",
    STREAM_EXCEPTION: "core.streamexception",
    LARGE_AV_FIRST_FRAME_GAP_DETECT: "LARGE_AV_FIRST_FRAME_GAP_DETECT",
    LARGE_VIDEO_DTS_GAP_DETECT: "LARGE_VIDEO_DTS_GAP_DETECT",
    LARGE_AUDIO_DTS_GAP_DETECT: "LARGE_AUDIO_DTS_GAP_DETECT",
    AUDIO_GAP_DETECT: "AUDIO_GAP_DETECT",
    AUDIO_OVERLAP_DETECT: "AUDIO_OVERLAP_DETECT",
    MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT:
      "MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",
    REAL_TIME_SPEED: "real_time_speed",
  },
  ySe = 2097152,
  une = (function (t) {
    I5(r, Pl);
    var e,
      n = D5(r);
    function r() {
      var i;
      return (
        Xf(this, r),
        Mr(oa((i = n.call(this))), "_abortController", null),
        Mr(oa(i), "_timeoutTimer", null),
        Mr(oa(i), "_reader", null),
        Mr(oa(i), "_response", null),
        Mr(oa(i), "_aborted", !1),
        Mr(oa(i), "_index", -1),
        Mr(oa(i), "_range", null),
        Mr(oa(i), "_receivedLength", 0),
        Mr(oa(i), "_running", !1),
        Mr(oa(i), "_logger", null),
        Mr(oa(i), "_vid", ""),
        Mr(oa(i), "_firtstByte", 0),
        Mr(oa(i), "_onProcessMinLen", 0),
        Mr(oa(i), "_onCancel", null),
        Mr(oa(i), "_priOptions", null),
        i
      );
    }
    return (
      Vf(
        r,
        [
          {
            key: "load",
            value: function (i) {
              var o,
                l = this,
                u = i.url,
                c = i.vid,
                d = i.timeout,
                h = i.responseType,
                f = i.onProgress,
                p = i.index,
                g = i.onTimeout,
                y = i.onCancel,
                v = i.range,
                b = i.transformResponse,
                w = i.request,
                k = i.params,
                D = i.logger,
                $ = i.method,
                N = i.headers,
                P = i.body,
                I = i.mode,
                O = i.credentials,
                X = i.cache,
                G = i.redirect,
                H = i.referrer,
                E = i.referrerPolicy,
                S = i.onProcessMinLen,
                L = i.priOptions,
                W = i.streamRes,
                F = i.firstMaxChunkSize;
              (this._logger = D),
                (this._aborted = !1),
                (this._onProcessMinLen = S),
                (this._onCancel = y),
                (this._abortController =
                  typeof AbortController < "u" && new AbortController()),
                (this._running = !0),
                (this._index = p),
                (this._range = v || [0, 0]),
                (this._vid = c || u),
                (this._priOptions = L || {}),
                (this._firstMaxChunkSize = F);
              var oe = {
                  method: $,
                  headers: N,
                  body: P,
                  mode: I,
                  credentials: O,
                  cache: X,
                  redirect: G,
                  referrer: H,
                  referrerPolicy: E,
                  signal:
                    (o = this._abortController) === null || o === void 0
                      ? void 0
                      : o.signal,
                },
                De = !1;
              clearTimeout(this._timeoutTimer), (u = VVe(u, k));
              var Xe = XVe(v);
              Xe &&
                ((N = w
                  ? w.headers
                  : (oe.headers =
                      oe.headers || (Headers ? new Headers() : {}))),
                Headers && N instanceof Headers
                  ? N.append("Range", Xe)
                  : (N.Range = Xe)),
                d &&
                  (this._timeoutTimer = setTimeout(function () {
                    if (((De = !0), l.cancel(), g)) {
                      var ht = new rv(u, oe, null, "timeout");
                      (ht.isTimeout = !0),
                        g(ht, {
                          index: l._index,
                          range: l._range,
                          vid: l._vid,
                          priOptions: l._priOptions,
                        });
                    }
                  }, d));
              var ze = Date.now();
              return (
                this._logger.debug(
                  "[fetch load start], index,",
                  p,
                  ",range,",
                  v
                ),
                new Promise(function (ht, gt) {
                  (W
                    ? new Promise(function (pt) {
                        pt(W);
                      })
                    : fetch(w || u, w ? void 0 : oe)
                  )
                    .then(
                      (function () {
                        var pt = X1(
                          kc().mark(function $t(ot) {
                            var tt, He, de, ue;
                            return kc().wrap(function (Z) {
                              for (;;)
                                switch ((Z.prev = Z.next)) {
                                  case 0:
                                    if (
                                      (clearTimeout(l._timeoutTimer),
                                      (l._response = ot),
                                      !l._aborted && l._running)
                                    ) {
                                      Z.next = 4;
                                      break;
                                    }
                                    return Z.abrupt("return");
                                  case 4:
                                    if ((b && (ot = b(ot, u) || ot), ot.ok)) {
                                      Z.next = 7;
                                      break;
                                    }
                                    throw new rv(
                                      u,
                                      oe,
                                      ot,
                                      "bad network response"
                                    );
                                  case 7:
                                    if (((tt = Date.now()), h !== Zx.TEXT)) {
                                      Z.next = 15;
                                      break;
                                    }
                                    return (Z.next = 11), ot.text();
                                  case 11:
                                    (He = Z.sent),
                                      (l._running = !1),
                                      (Z.next = 37);
                                    break;
                                  case 15:
                                    if (h !== Zx.JSON) {
                                      Z.next = 22;
                                      break;
                                    }
                                    return (Z.next = 18), ot.json();
                                  case 18:
                                    (He = Z.sent),
                                      (l._running = !1),
                                      (Z.next = 37);
                                    break;
                                  case 22:
                                    if (!f) {
                                      Z.next = 29;
                                      break;
                                    }
                                    return (
                                      (l.resolve = ht),
                                      (l.reject = gt),
                                      l._loadChunk(ot, f, ze, tt),
                                      Z.abrupt("return")
                                    );
                                  case 29:
                                    return (Z.next = 31), ot.arrayBuffer();
                                  case 31:
                                    (He = Z.sent),
                                      (He = new Uint8Array(He)),
                                      (l._running = !1),
                                      (de = Date.now() - ze),
                                      (ue = lne(He.byteLength, de)),
                                      l.emit(Vi.REAL_TIME_SPEED, {
                                        speed: ue,
                                        len: He.byteLength,
                                        time: de,
                                        vid: l._vid,
                                        index: l._index,
                                        range: l._range,
                                        priOptions: l._priOptions,
                                      });
                                  case 37:
                                    l._logger.debug(
                                      "[fetch load end], index,",
                                      p,
                                      ",range,",
                                      v
                                    ),
                                      ht(
                                        sne(
                                          He,
                                          !0,
                                          ot,
                                          ot.headers.get("Content-Length"),
                                          ot.headers.get("age"),
                                          ze,
                                          tt,
                                          p,
                                          v,
                                          l._vid,
                                          l._priOptions
                                        )
                                      );
                                  case 39:
                                  case "end":
                                    return Z.stop();
                                }
                            }, $t);
                          })
                        );
                        return function ($t) {
                          return pt.apply(this, arguments);
                        };
                      })()
                    )
                    .catch(function (pt) {
                      var $t;
                      clearTimeout(l._timeoutTimer),
                        (l._running = !1),
                        (l._aborted && !De) ||
                          (((pt =
                            pt instanceof rv
                              ? pt
                              : new rv(
                                  u,
                                  oe,
                                  null,
                                  ($t = pt) === null || $t === void 0
                                    ? void 0
                                    : $t.message
                                )).startTime = ze),
                          (pt.endTime = Date.now()),
                          (pt.isTimeout = De),
                          (pt.options = {
                            index: l._index,
                            range: l._range,
                            vid: l._vid,
                            priOptions: l._priOptions,
                          }),
                          gt(pt));
                    });
                })
              );
            },
          },
          {
            key: "cancel",
            value:
              ((e = X1(
                kc().mark(function i() {
                  return kc().wrap(
                    function (o) {
                      for (;;)
                        switch ((o.prev = o.next)) {
                          case 0:
                            if (!this._aborted) {
                              o.next = 2;
                              break;
                            }
                            return o.abrupt("return");
                          case 2:
                            if (
                              ((this._aborted = !0),
                              (this._running = !1),
                              !this._response)
                            ) {
                              o.next = 14;
                              break;
                            }
                            if (((o.prev = 5), !this._reader)) {
                              o.next = 9;
                              break;
                            }
                            return (o.next = 9), this._reader.cancel();
                          case 9:
                            o.next = 13;
                            break;
                          case 11:
                            (o.prev = 11), (o.t0 = o.catch(5));
                          case 13:
                            this._response = this._reader = null;
                          case 14:
                            if (this._abortController) {
                              try {
                                this._abortController.abort();
                              } catch {}
                              this._abortController = null;
                            }
                            this._onCancel &&
                              this._onCancel({
                                index: this._index,
                                range: this._range,
                                vid: this._vid,
                                priOptions: this._priOptions,
                              });
                          case 16:
                          case "end":
                            return o.stop();
                        }
                    },
                    i,
                    this,
                    [[5, 11]]
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_loadChunk",
            value: function (i, o, l, u) {
              var c = this;
              if (!i.body || !i.body.getReader) {
                this._running = !1;
                var d = new rv(
                  i.url,
                  "",
                  i,
                  "onProgress of bad response.body.getReader"
                );
                return (
                  (d.options = {
                    index: this._index,
                    range: this._range,
                    vid: this._vid,
                    priOptions: this._priOptions,
                  }),
                  void this.reject(d)
                );
              }
              this._onProcessMinLen > 0 &&
                ((this._cache = new Uint8Array(ySe)), (this._writeIdx = 0));
              var h,
                f,
                p,
                g = (this._reader = i.body.getReader()),
                y = (function () {
                  var v = X1(
                    kc().mark(function b() {
                      var w, k, D, $, N, P, I, O, X, G;
                      return kc().wrap(
                        function (H) {
                          for (;;)
                            switch ((H.prev = H.next)) {
                              case 0:
                                return (
                                  (f = Date.now()),
                                  (H.prev = 1),
                                  (H.next = 4),
                                  g.read()
                                );
                              case 4:
                                (h = H.sent), (p = Date.now()), (H.next = 13);
                                break;
                              case 8:
                                return (
                                  (H.prev = 8),
                                  (H.t0 = H.catch(1)),
                                  (p = Date.now()),
                                  c._aborted ||
                                    ((c._running = !1),
                                    (H.t0.options = {
                                      index: c._index,
                                      range: c._range,
                                      vid: c._vid,
                                      priOptions: c._priOptions,
                                    }),
                                    c.reject(H.t0)),
                                  H.abrupt("return")
                                );
                              case 13:
                                if (
                                  ((k =
                                    ((w = c._range) === null || w === void 0
                                      ? void 0
                                      : w.length) > 0
                                      ? c._range[0]
                                      : 0),
                                  (D = k + c._receivedLength),
                                  !c._aborted)
                                ) {
                                  H.next = 19;
                                  break;
                                }
                                return (
                                  (c._running = !1),
                                  o(
                                    void 0,
                                    !1,
                                    {
                                      range: [D, D],
                                      vid: c._vid,
                                      index: c._index,
                                      startTime: f,
                                      endTime: p,
                                      st: l,
                                      firstByteTime: u,
                                      priOptions: c._priOptions,
                                    },
                                    i
                                  ),
                                  H.abrupt("return")
                                );
                              case 19:
                                ($ = h.value ? h.value.byteLength : 0),
                                  (c._receivedLength += $),
                                  c._logger.debug(
                                    "【fetchLoader,onProgress call】,task,",
                                    c._range,
                                    ", start,",
                                    D,
                                    ", end,",
                                    k + c._receivedLength,
                                    ", done,",
                                    h.done
                                  ),
                                  c._onProcessMinLen > 0
                                    ? c._writeIdx + $ >= c._onProcessMinLen ||
                                      h.done
                                      ? ((N = new Uint8Array(
                                          c._writeIdx + $
                                        )).set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        $ > 0 && N.set(h.value, c._writeIdx),
                                        (c._writeIdx = 0),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress enough】,done,",
                                          h.done,
                                          ",len,",
                                          N.byteLength,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : $ > 0 && c._writeIdx + $ < ySe
                                      ? (c._cache.set(h.value, c._writeIdx),
                                        (c._writeIdx += $),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress cache】,len,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : $ > 0 &&
                                        ((P = new Uint8Array(
                                          c._writeIdx + $ + 2048
                                        )),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra start】,size,",
                                          c._writeIdx + $ + 2048,
                                          ", datalen,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ),
                                        P.set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        $ > 0 && P.set(h.value, c._writeIdx),
                                        (c._writeIdx += $),
                                        delete c._cache,
                                        (c._cache = P),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra end】,len,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                    : (N = h.value),
                                  ((N && N.byteLength > 0) || h.done) &&
                                    (c._firstMaxChunkSize &&
                                      (c._firtstByte
                                        ? c._cacheData &&
                                          ((O = new Uint8Array(
                                            c._cacheData.byteLength +
                                              N.byteLength
                                          )).set(c._cacheData, 0),
                                          O.set(N, c._cacheData.byteLength),
                                          (N = O),
                                          (c._cacheData = null))
                                        : (c._firtstByte++,
                                          (I = N.slice(
                                            0,
                                            c._firstMaxChunkSize
                                          )),
                                          (c._cacheData = N.slice(
                                            c._firstMaxChunkSize
                                          )),
                                          (N = I))),
                                    o(
                                      N,
                                      h.done,
                                      {
                                        range: [
                                          c._range[0] +
                                            c._receivedLength -
                                            (N ? N.byteLength : 0),
                                          c._range[0] + c._receivedLength,
                                        ],
                                        vid: c._vid,
                                        index: c._index,
                                        startTime: f,
                                        endTime: p,
                                        st: l,
                                        firstByteTime: u,
                                        priOptions: c._priOptions,
                                      },
                                      i
                                    )),
                                  h.done
                                    ? ((X = Date.now() - l),
                                      (G = lne(c._receivedLength, X)),
                                      c.emit(Vi.REAL_TIME_SPEED, {
                                        speed: G,
                                        len: c._receivedLength,
                                        time: X,
                                        vid: c._vid,
                                        index: c._index,
                                        range: c._range,
                                        priOptions: c._priOptions,
                                      }),
                                      (c._running = !1),
                                      c._logger.debug(
                                        "[fetchLoader onProgress end],task,",
                                        c._range,
                                        ",done,",
                                        h.done
                                      ),
                                      c.resolve(
                                        sne(
                                          h,
                                          !0,
                                          i,
                                          i.headers.get("Content-Length"),
                                          i.headers.get("age"),
                                          l,
                                          u,
                                          c._index,
                                          c._range,
                                          c._vid,
                                          c._priOptions
                                        )
                                      ))
                                    : c._firstMaxChunkSize
                                    ? setTimeout(function () {
                                        y();
                                      }, 0)
                                    : y();
                              case 25:
                              case "end":
                                return H.stop();
                            }
                        },
                        b,
                        null,
                        [[1, 8]]
                      );
                    })
                  );
                  return function () {
                    return v.apply(this, arguments);
                  };
                })();
              y();
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (i) {
              this._running = i;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return !(typeof fetch > "u");
            },
          },
        ]
      ),
      r
    );
  })();
function qwn(t) {
  return Wx(
    {
      loaderType: bS.FETCH,
      retry: 0,
      retryDelay: 0,
      timeout: 0,
      request: null,
      onTimeout: void 0,
      onProgress: void 0,
      onRetryError: void 0,
      transformRequest: void 0,
      transformResponse: void 0,
      transformError: void 0,
      responseType: Zx.TEXT,
      range: void 0,
      url: "",
      params: void 0,
      method: "GET",
      headers: {},
      body: void 0,
      mode: void 0,
      credentials: void 0,
      cache: void 0,
      redirect: void 0,
      referrer: void 0,
      referrerPolicy: void 0,
      integrity: void 0,
      onProcessMinLen: 0,
    },
    t
  );
}
var ekn = (function (t) {
    I5(n, Pl);
    var e = D5(n);
    function n() {
      var r;
      return (
        Xf(this, n),
        Mr(oa((r = e.call(this))), "_xhr", null),
        Mr(oa(r), "_aborted", !1),
        Mr(oa(r), "_timeoutTimer", null),
        Mr(oa(r), "_range", null),
        Mr(oa(r), "_receivedLength", 0),
        Mr(oa(r), "_url", null),
        Mr(oa(r), "_onProgress", null),
        Mr(oa(r), "_index", -1),
        Mr(oa(r), "_headers", null),
        Mr(oa(r), "_currentChunkSizeKB", 384),
        Mr(oa(r), "_timeout", null),
        Mr(oa(r), "_xhr", null),
        Mr(oa(r), "_withCredentials", null),
        Mr(oa(r), "_startTime", -1),
        Mr(oa(r), "_loadCompleteResolve", null),
        Mr(oa(r), "_loadCompleteReject", null),
        Mr(oa(r), "_runing", !1),
        Mr(oa(r), "_logger", !1),
        Mr(oa(r), "_vid", ""),
        Mr(oa(r), "_responseType", void 0),
        Mr(oa(r), "_credentials", void 0),
        Mr(oa(r), "_method", void 0),
        Mr(oa(r), "_transformResponse", void 0),
        Mr(oa(r), "_firstRtt", void 0),
        Mr(oa(r), "_onCancel", null),
        Mr(oa(r), "_priOptions", null),
        r
      );
    }
    return (
      Vf(
        n,
        [
          {
            key: "load",
            value: function (r) {
              var i = this;
              clearTimeout(this._timeoutTimer),
                (this._logger = r.logger),
                (this._range = r.range),
                (this._onProgress = r.onProgress),
                (this._index = r.index),
                (this._headers = r.headers),
                (this._withCredentials =
                  r.credentials === "include" ||
                  r.credentials === "same-origin"),
                (this._body = r.body || null),
                r.method && (this._method = r.method),
                (this._timeout = r.timeout || null),
                (this._runing = !0),
                (this._vid = r.vid || r.url),
                (this._responseType = r.responseType),
                (this._firstRtt = -1),
                (this._onTimeout = r.onTimeout),
                (this._onCancel = r.onCancel),
                (this._request = r.request),
                (this._priOptions = r.priOptions || {}),
                this._logger.debug("【xhrLoader task】, range", this._range),
                (this._url = VVe(r.url, r.params));
              var o = Date.now();
              return new Promise(function (l, u) {
                (i._loadCompleteResolve = l),
                  (i._loadCompleteReject = u),
                  i._startLoad();
              }).catch(function (l) {
                if (
                  (clearTimeout(i._timeoutTimer), (i._runing = !1), !i._aborted)
                )
                  throw (
                    (((l =
                      l instanceof rv
                        ? l
                        : new rv(i._url, i._request)).startTime = o),
                    (l.endTime = Date.now()),
                    (l.options = {
                      index: i._index,
                      vid: i._vid,
                      priOptions: i._priOptions,
                    }),
                    l)
                  );
              });
            },
          },
          {
            key: "_startLoad",
            value: function () {
              var r = null;
              if (
                this._responseType === Zx.ARRAY_BUFFER &&
                this._range &&
                this._range.length > 1
              )
                if (this._onProgress) {
                  this._firstRtt = -1;
                  var i = 1024 * this._currentChunkSizeKB,
                    o = this._range[0] + this._receivedLength,
                    l = this._range[1];
                  i < this._range[1] - o && (l = o + i),
                    (r = [o, l]),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", SubRange, ",
                      r
                    );
                } else
                  (r = this._range),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", allRange, ",
                      r
                    );
              this._internalOpen(r);
            },
          },
          {
            key: "_internalOpen",
            value: function (r) {
              var i = this;
              try {
                this._startTime = Date.now();
                var o = (this._xhr = new XMLHttpRequest());
                o.open(this._method || "GET", this._url, !0),
                  (o.responseType = this._responseType),
                  this._timeout && (o.timeout = this._timeout),
                  (o.withCredentials = this._withCredentials),
                  (o.onload = this._onLoad.bind(this)),
                  (o.onreadystatechange = this._onReadyStatechange.bind(this)),
                  (o.onerror = function (c) {
                    var d, h, f;
                    i._running = !1;
                    var p = new rv(
                      i._url,
                      i._request,
                      c == null ||
                      (d = c.currentTarget) === null ||
                      d === void 0
                        ? void 0
                        : d.response,
                      "xhr.onerror.status:" +
                        (c == null ||
                        (h = c.currentTarget) === null ||
                        h === void 0
                          ? void 0
                          : h.status) +
                        ",statusText," +
                        (c == null ||
                        (f = c.currentTarget) === null ||
                        f === void 0
                          ? void 0
                          : f.statusText)
                    );
                    (p.options = {
                      index: i._index,
                      range: i._range,
                      vid: i._vid,
                      priOptions: i._priOptions,
                    }),
                      i._loadCompleteReject(p);
                  }),
                  (o.ontimeout = function (c) {
                    i.cancel();
                    var d = new rv(
                      i._url,
                      i._request,
                      { status: 408 },
                      "timeout"
                    );
                    i._onTimeout &&
                      ((d.isTimeout = !0),
                      i._onTimeout(d, {
                        index: i._index,
                        range: i._range,
                        vid: i._vid,
                        priOptions: i._priOptions,
                      })),
                      (d.options = {
                        index: i._index,
                        range: i._range,
                        vid: i._vid,
                        priOptions: i._priOptions,
                      }),
                      i._loadCompleteReject(d);
                  });
                var l = this._headers || {},
                  u = XVe(r);
                u && (l.Range = u),
                  l &&
                    Object.keys(l).forEach(function (c) {
                      o.setRequestHeader(c, l[c]);
                    }),
                  this._logger.debug(
                    "[xhr.send->] tast,",
                    this._range,
                    ",load sub range, ",
                    r
                  ),
                  o.send(this._body);
              } catch (c) {
                (c.options = {
                  index: this._index,
                  range: r,
                  vid: this._vid,
                  priOptions: this._priOptions,
                }),
                  this._loadCompleteReject(c);
              }
            },
          },
          {
            key: "_onReadyStatechange",
            value: function (r) {
              r.target.readyState === 2 &&
                this._firstRtt < 0 &&
                (this._firstRtt = Date.now());
            },
          },
          {
            key: "_onLoad",
            value: function (r) {
              var i,
                o = r.target.status;
              if (o < 200 || o > 299) {
                var l = new rv(
                  this._url,
                  null,
                  Wx(Wx({}, r.target.response), {}, { status: o }),
                  "bad response,status:" + o
                );
                return (
                  (l.options = {
                    index: this._index,
                    range: this._range,
                    vid: this._vid,
                    priOptions: this._priOptions,
                  }),
                  this._loadCompleteReject(l)
                );
              }
              var u,
                c = null,
                d = !1,
                h =
                  ((i = this._range) === null || i === void 0
                    ? void 0
                    : i.length) > 0
                    ? this._range[0]
                    : 0;
              if (this._responseType === Zx.ARRAY_BUFFER) {
                var f,
                  p = new Uint8Array(r.target.response);
                if (((u = h + this._receivedLength), p && p.byteLength > 0)) {
                  this._receivedLength += p.byteLength;
                  var g = Date.now() - this._startTime,
                    y = lne(this._receivedLength, g);
                  this.emit(Vi.REAL_TIME_SPEED, {
                    speed: y,
                    len: this._receivedLength,
                    time: g,
                    vid: this._vid,
                    index: this._index,
                    range: [u, h + this._receivedLength],
                    priOptions: this._priOptions,
                  });
                }
                (c = p),
                  (d = !(
                    ((f = this._range) === null || f === void 0
                      ? void 0
                      : f.length) > 1 &&
                    this._range[1] &&
                    this._receivedLength < this._range[1] - this._range[0]
                  )),
                  this._logger.debug(
                    "[xhr load done->], tast :",
                    this._range,
                    ", start",
                    u,
                    "end ",
                    h + this._receivedLength,
                    ",dataLen,",
                    p ? p.byteLength : 0,
                    ",receivedLength",
                    this._receivedLength,
                    ",index,",
                    this._index,
                    ", done,",
                    d
                  );
              } else (d = !0), (c = r.target.response);
              var v = {
                ok: o >= 200 && o < 300,
                status: o,
                statusText: this._xhr.statusText,
                url: this._xhr.responseURL,
                headers: this._getHeaders(this._xhr),
                body: this._xhr.response,
              };
              this._transformResponse &&
                (v = this._transformResponse(v, this._url) || v),
                this._onProgress &&
                  this._onProgress(
                    c,
                    d,
                    {
                      index: this._index,
                      vid: this._vid,
                      range: [u, h + this._receivedLength],
                      startTime: this._startTime,
                      endTime: Date.now(),
                      priOptions: this._priOptions,
                    },
                    v
                  ),
                d
                  ? ((this._runing = !1),
                    this._loadCompleteResolve &&
                      this._loadCompleteResolve(
                        sne(
                          this._onProgress ? null : c,
                          d,
                          v,
                          v.headers["content-length"],
                          v.headers.age,
                          this._startTime,
                          this._firstRtt,
                          this._index,
                          this._range,
                          this._vid,
                          this._priOptions
                        )
                      ))
                  : this._startLoad();
            },
          },
          {
            key: "cancel",
            value: function () {
              if (!this._aborted)
                return (
                  (this._aborted = !0),
                  (this._runing = !1),
                  one(ZI(n.prototype), "removeAllListeners", this).call(this),
                  this._onCancel &&
                    this._onCancel({
                      index: this._index,
                      range: this._range,
                      vid: this._vid,
                      priOptions: this._priOptions,
                    }),
                  this._xhr ? this._xhr.abort() : void 0
                );
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (r) {
              this._running = r;
            },
          },
          {
            key: "_getHeaders",
            value: function (r) {
              var i,
                o = {},
                l = Xwn(
                  r.getAllResponseHeaders().trim().split(`\r
`)
                );
              try {
                for (l.s(); !(i = l.n()).done; ) {
                  var u = i.value.split(": ");
                  o[u[0].toLowerCase()] = u.slice(1).join(": ");
                }
              } catch (c) {
                l.e(c);
              } finally {
                l.f();
              }
              return o;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return typeof XMLHttpRequest < "u";
            },
          },
        ]
      ),
      n
    );
  })(),
  tkn = ["retry", "retryDelay", "onRetryError", "transformError"],
  nkn = (function () {
    function t(n, r) {
      Xf(this, t),
        (this.promise = Yw()),
        (this.alive = !!r.onProgress),
        !r.logger && (r.logger = new sE("Loader")),
        (this._loaderType = n),
        (this._loader =
          n === bS.FETCH && typeof fetch < "u" ? new une() : new ekn()),
        (this._config = r),
        (this._retryCount = 0),
        (this._retryTimer = null),
        (this._canceled = !1),
        (this._retryCheckFunc = r.retryCheckFunc),
        (this._logger = r.logger);
    }
    var e;
    return (
      Vf(t, [
        {
          key: "exec",
          value: function () {
            var n = this,
              r = this._config,
              i = r.retry,
              o = r.retryDelay,
              l = r.onRetryError,
              u = r.transformError,
              c = Fwn(r, tkn),
              d = (function () {
                var h = X1(
                  kc().mark(function f() {
                    var p, g, y;
                    return kc().wrap(
                      function (v) {
                        for (;;)
                          switch ((v.prev = v.next)) {
                            case 0:
                              return (
                                (v.prev = 0), (v.next = 3), n._loader.load(c)
                              );
                            case 3:
                              (p = v.sent), n.promise.resolve(p), (v.next = 27);
                              break;
                            case 7:
                              if (
                                ((v.prev = 7),
                                (v.t0 = v.catch(0)),
                                (n._loader.running = !1),
                                n._logger.debug(
                                  "[task request catch err]",
                                  v.t0
                                ),
                                !n._canceled)
                              ) {
                                v.next = 13;
                                break;
                              }
                              return v.abrupt("return");
                            case 13:
                              if (
                                ((v.t0.loaderType = n._loaderType),
                                (v.t0.retryCount = n._retryCount),
                                (g = v.t0),
                                u && (g = u(g) || g),
                                l &&
                                  n._retryCount > 0 &&
                                  l(g, n._retryCount, {
                                    index: c.index,
                                    vid: c.vid,
                                    range: c.range,
                                    priOptions: c.priOptions,
                                  }),
                                n._retryCount++,
                                (y = !0),
                                n._retryCheckFunc &&
                                  (y = n._retryCheckFunc(v.t0)),
                                !(y && n._retryCount <= i))
                              ) {
                                v.next = 26;
                                break;
                              }
                              return (
                                clearTimeout(n._retryTimer),
                                n._logger.debug(
                                  "[task request setTimeout],retry",
                                  n._retryCount,
                                  ",retry range,",
                                  c.range
                                ),
                                (n._retryTimer = setTimeout(d, o)),
                                v.abrupt("return")
                              );
                            case 26:
                              n.promise.reject(g);
                            case 27:
                            case "end":
                              return v.stop();
                          }
                      },
                      f,
                      null,
                      [[0, 7]]
                    );
                  })
                );
                return function () {
                  return h.apply(this, arguments);
                };
              })();
            return d(), this.promise;
          },
        },
        {
          key: "cancel",
          value:
            ((e = X1(
              kc().mark(function n() {
                return kc().wrap(
                  function (r) {
                    for (;;)
                      switch ((r.prev = r.next)) {
                        case 0:
                          return (
                            clearTimeout(this._retryTimer),
                            (this._canceled = !0),
                            (this._loader.running = !1),
                            r.abrupt("return", this._loader.cancel())
                          );
                        case 4:
                        case "end":
                          return r.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "running",
          get: function () {
            return this._loader && this._loader.running;
          },
        },
        {
          key: "loader",
          get: function () {
            return this._loader;
          },
        },
      ]),
      t
    );
  })();
function rkn(t) {
  return (
    t && !t.paused && !t.ended && t.playbackRate !== 0 && t.readyState !== 0
  );
}
function ikn(t) {
  if (!t) return {};
  if (typeof t.getVideoPlaybackQuality == "function") {
    var e = t.getVideoPlaybackQuality();
    return {
      droppedVideoFrames: e.droppedVideoFrames || e.corruptedVideoFrames,
      totalVideoFrames: e.totalVideoFrames,
      creationTime: e.creationTime,
    };
  }
  return {
    droppedVideoFrames: t.webkitDroppedFrameCount,
    totalVideoFrames: t.webkitDecodedFrameCount,
    creationTime: performance.now(),
  };
}
function akn() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  if ((e = e.filter(Boolean)).length < 2) return e[0];
  var r = new Uint8Array(
      e.reduce(function (o, l) {
        return o + l.byteLength;
      }, 0)
    ),
    i = 0;
  return (
    e.forEach(function (o) {
      r.set(o, i), (i += o.byteLength);
    }),
    r
  );
}
function okn() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
  return new Promise(function (e) {
    return setTimeout(e, t);
  });
}
var skn = (function (t) {
    I5(r, Pl);
    var e,
      n = D5(r);
    function r(i) {
      var o;
      return (
        Xf(this, r),
        Mr(oa((o = n.call(this, i))), "type", bS.FETCH),
        Mr(oa(o), "_queue", []),
        Mr(oa(o), "_alive", []),
        Mr(oa(o), "_currentTask", null),
        Mr(oa(o), "_finnalUrl", ""),
        Mr(oa(o), "_config", void 0),
        (o._config = qwn(i)),
        (o._config.loaderType !== bS.XHR && une.isSupported()) ||
          (o.type = bS.XHR),
        (o.log = i.logger),
        o
      );
    }
    return (
      Vf(
        r,
        [
          {
            key: "isFetch",
            value: function () {
              return this.type === bS.FETCH;
            },
          },
          {
            key: "load",
            value: function (i) {
              var o = this,
                l =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {};
              typeof i != "string" && i
                ? (l = i)
                : (l.url = i || l.url || this._config.url),
                (l = Object.assign({}, this._config, l)).params &&
                  (l.params = Object.assign({}, l.params)),
                l.headers &&
                  gSe(l.headers) &&
                  (l.headers = Object.assign({}, l.headers)),
                l.body && gSe(l.body) && (l.body = Object.assign({}, l.body)),
                l.transformRequest && (l = l.transformRequest(l) || l),
                (l.logger = this.log);
              var u = new nkn(this.type, l);
              return (
                u.loader.on(Vi.REAL_TIME_SPEED, function (c) {
                  o.emit(Vi.REAL_TIME_SPEED, c);
                }),
                this._queue.push(u),
                this._queue.length !== 1 ||
                  (this._currentTask && this._currentTask.running) ||
                  this._processTask(),
                u.promise
              );
            },
          },
          {
            key: "cancel",
            value:
              ((e = X1(
                kc().mark(function i() {
                  var o;
                  return kc().wrap(
                    function (l) {
                      for (;;)
                        switch ((l.prev = l.next)) {
                          case 0:
                            return (
                              (o = this._queue
                                .map(function (u) {
                                  return u.cancel();
                                })
                                .concat(
                                  this._alive.map(function (u) {
                                    return u.cancel();
                                  })
                                )),
                              this._currentTask &&
                                o.push(this._currentTask.cancel()),
                              (this._queue = []),
                              (this._alive = []),
                              (l.next = 6),
                              Promise.all(o)
                            );
                          case 6:
                            return (l.next = 8), okn();
                          case 8:
                          case "end":
                            return l.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_processTask",
            value: function () {
              var i = this;
              if (
                ((this._currentTask = this._queue.shift()), this._currentTask)
              ) {
                this._currentTask.alive && this._alive.push(this._currentTask);
                var o = this._currentTask.exec().catch(function (l) {});
                o &&
                  typeof o.finally == "function" &&
                  o.finally(function () {
                    var l, u;
                    (l = i._currentTask) !== null &&
                      l !== void 0 &&
                      l.alive &&
                      ((u = i._alive) === null || u === void 0
                        ? void 0
                        : u.length) > 0 &&
                      (i._alive = i._alive.filter(function (c) {
                        return c && c !== i._currentTask;
                      })),
                      i._processTask();
                  });
              }
            },
          },
        ],
        [
          {
            key: "isFetchSupport",
            value: function () {
              return une.isSupported();
            },
          },
        ]
      ),
      r
    );
  })(),
  lkn = (function () {
    function t() {
      Xf(this, t), Mr(this, "_prevCurrentTime", 0);
    }
    return (
      Vf(t, [
        {
          key: "do",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 3,
              r = arguments.length > 2 ? arguments[2] : void 0,
              i =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : 1;
            if (e) {
              var o = e.currentTime,
                l = 0;
              if (this._prevCurrentTime === o) {
                var u = xh.info(xh.get(e), o);
                if (!u.buffers.length) return;
                (r && u.nextStart) || (u.nextStart && u.nextStart - o < n)
                  ? (l = u.nextStart + 0.1)
                  : u.end && u.end - o > i && !e.seeking && (l = o + 0.1);
              }
              (this._prevCurrentTime = o), l && o !== l && (e.currentTime = l);
            }
          },
        },
      ]),
      t
    );
  })(),
  ukn = (function () {
    function t(e) {
      var n = this;
      Xf(this, t),
        Mr(this, "_seiSet", new Set()),
        (this.emitter = e),
        e.on(Vi.SEI, function (r) {
          r && n._seiSet.add(r);
        });
    }
    return (
      Vf(t, [
        {
          key: "throw",
          value: function (e, n) {
            var r = this;
            if (e != null && this._seiSet.size) {
              var i = e - 0.2,
                o = e + 0.2,
                l = [];
              this._seiSet.forEach(function (u) {
                u.time >= i && u.time <= o && l.push(u);
              }),
                l.forEach(function (u) {
                  r._seiSet.delete(u), r.emitter.emit(Vi.SEI_IN_TIME, u);
                }),
                n &&
                  this._seiSet.forEach(function (u) {
                    u.time < e - 5 && r._seiSet.delete(u);
                  });
            }
          },
        },
        {
          key: "reset",
          value: function () {
            this._seiSet.clear();
          },
        },
      ]),
      t
    );
  })(),
  ckn = 1e3,
  dkn = 50,
  hkn = 3,
  fkn = 3e3,
  pkn = (function () {
    function t(e) {
      Xf(this, t),
        Mr(this, "_chunkSpeed", 0),
        Mr(this, "_chunkCache", []),
        Mr(this, "_speeds", []),
        Mr(this, "_totalSize", 0),
        Mr(this, "_totalCost", 0),
        (this._opts = e || {});
    }
    return (
      Vf(t, [
        {
          key: "addRecord",
          value: function (e, n) {
            e &&
              n &&
              (this._speeds.push((8e3 * e) / n),
              (this._speeds = this._speeds.slice(-hkn)));
          },
        },
        {
          key: "addChunkRecord",
          value: function (e, n) {
            var r, i;
            if (
              e &&
              n &&
              !(
                e <
                (((r = this._opts) === null || r === void 0
                  ? void 0
                  : r.skipChunkSize) || ckn)
              )
            ) {
              (this._totalSize += e),
                (this._totalCost += n),
                (this._chunkSpeed = (8e3 * e) / n),
                this._chunkCache.push({
                  size: e,
                  duration: n,
                  timestamp: performance.now(),
                });
              var o =
                ((i = this._opts) === null || i === void 0
                  ? void 0
                  : i.chunkCountForSpeed) || dkn;
              this._chunkCache.length > o &&
                (this._chunkCache = this._chunkCache.slice(-o));
            }
          },
        },
        {
          key: "getAvgSpeed",
          value: function () {
            var e;
            if (!this._chunkCache.length && !this._speeds.length) return 0;
            if (this._speeds.length)
              return (
                this._speeds.reduce(function (i, o) {
                  return i + o;
                }) / this._speeds.length
              );
            var n = this._chunkCache[this._chunkCache.length - 1],
              r = performance.now() - n.timestamp;
            return (
              r >
                (((e = this._opts) === null || e === void 0
                  ? void 0
                  : e.longtimeNoReceived) || fkn) &&
                this._chunkCache.push({
                  size: 0,
                  duration: r,
                  timestamp: performance.now(),
                }),
              (8e3 *
                this._chunkCache.reduce(function (i, o) {
                  return i + o.size;
                }, 0)) /
                this._chunkCache.reduce(function (i, o) {
                  return i + o.duration;
                }, 0)
            );
          },
        },
        {
          key: "getLatestSpeed",
          value: function () {
            return this._chunkCache.length || this._speeds.length
              ? this._speeds.length
                ? this._speeds[this._speeds.length - 1]
                : this._chunkSpeed
              : 0;
          },
        },
        {
          key: "getTotalSize",
          value: function () {
            return this._totalSize;
          },
        },
        {
          key: "getTotalCost",
          value: function () {
            return this._totalCost;
          },
        },
        {
          key: "reset",
          value: function () {
            (this._chunkCache = []),
              (this._speeds = []),
              (this._totalSize = 0),
              (this._totalCost = 0);
          },
        },
      ]),
      t
    );
  })(),
  vSe = (function () {
    function t(e) {
      Xf(this, t),
        Mr(this, "encodeType", ""),
        Mr(this, "audioCodec", ""),
        Mr(this, "videoCodec", ""),
        Mr(this, "domain", ""),
        Mr(this, "fps", 0),
        Mr(this, "bitrate", 0),
        Mr(this, "width", 0),
        Mr(this, "height", 0),
        Mr(this, "samplerate", 0),
        Mr(this, "channelCount", 0),
        Mr(this, "gop", 0),
        Mr(this, "_bitsAccumulateSize", 0),
        Mr(this, "_bitsAccumulateDuration", 0),
        Mr(this, "_startGopId", -1),
        (this._timescale = e);
    }
    return (
      Vf(t, [
        {
          key: "getStats",
          value: function () {
            return {
              encodeType: this.encodeType,
              audioCodec: this.audioCodec,
              videoCodec: this.videoCodec,
              domain: this.domain,
              fps: this.fps,
              bitrate: this.bitrate,
              width: this.width,
              height: this.height,
              samplerate: this.samplerate,
              channelCount: this.channelCount,
              gop: this.gop,
            };
          },
        },
        {
          key: "setEncodeType",
          value: function (e) {
            this.encodeType = e;
          },
        },
        {
          key: "setFpsFromScriptData",
          value: function (e) {
            var n,
              r = e.data,
              i =
                r == null || (n = r.onMetaData) === null || n === void 0
                  ? void 0
                  : n.framerate;
            i && i > 0 && i < 100 && (this.fps = i);
          },
        },
        {
          key: "setVideoMeta",
          value: function (e) {
            if (
              ((this.width = e.width),
              (this.height = e.height),
              (this.videoCodec = e.codec),
              (this.encodeType = e.codecType),
              e.fpsNum && e.fpsDen)
            ) {
              var n = e.fpsNum / e.fpsDen;
              n > 0 && n < 100 && (this.fps = n);
            }
          },
        },
        {
          key: "setAudioMeta",
          value: function (e) {
            (this.audioCodec = e.codec),
              (this.samplerate = e.sampleRate),
              (this.channelCount = e.channelCount);
          },
        },
        {
          key: "setDomain",
          value: function (e) {
            this.domain = e.split("/").slice(2, 3)[0];
          },
        },
        {
          key: "updateBitrate",
          value: function (e) {
            var n = this;
            if ((!this.fps || this.fps >= 100) && e.length) {
              var r =
                e.reduce(function (i, o) {
                  return i + o.duration;
                }, 0) / e.length;
              this.fps = Math.round(this._timescale / r);
            }
            e.forEach(function (i) {
              n._startGopId === -1 && (n._startGopId = i.gopId),
                i.gopId === n._startGopId && n.gop++,
                (n._bitsAccumulateDuration +=
                  i.duration / (n._timescale / 1e3)),
                (n._bitsAccumulateSize += i.units.reduce(function (o, l) {
                  return o + l.length;
                }, 0)),
                n._bitsAccumulateDuration >= 1e3 &&
                  ((n.bitrate = 8 * n._bitsAccumulateSize),
                  (n._bitsAccumulateDuration = 0),
                  (n._bitsAccumulateSize = 0));
            });
          },
        },
      ]),
      t
    );
  })(),
  gkn = (function () {
    function t(e) {
      var n =
        arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e3;
      Xf(this, t),
        Mr(this, "_core", null),
        Mr(this, "_samples", []),
        (this._core = e),
        (this._timescale = n),
        (this._stats = new vSe(n)),
        this._bindEvents();
    }
    return (
      Vf(t, [
        {
          key: "getStats",
          value: function () {
            var e,
              n,
              r,
              i,
              o,
              l,
              u,
              c,
              d,
              h,
              f,
              p =
                ((e = this._core) === null || e === void 0
                  ? void 0
                  : e.media) || {},
              g = p.currentTime,
              y = g === void 0 ? 0 : g,
              v = p.decodeFps,
              b = v === void 0 ? 0 : v;
            return Wx(
              Wx({}, this._stats.getStats()),
              {},
              {
                downloadSpeed:
                  ((n = this._core) === null ||
                  n === void 0 ||
                  (r = n.speedInfo) === null ||
                  r === void 0
                    ? void 0
                    : r.call(n).speed) || 0,
                avgSpeed:
                  ((i = this._core) === null ||
                  i === void 0 ||
                  (o = i.speedInfo) === null ||
                  o === void 0
                    ? void 0
                    : o.call(i).avgSpeed) || 0,
                totalReceivedByte:
                  ((l = this._core) === null ||
                  l === void 0 ||
                  (u = l.speedInfo) === null ||
                  u === void 0
                    ? void 0
                    : u.call(l).totalSize) || 0,
                totalReceivedCost:
                  ((c = this._core) === null ||
                  c === void 0 ||
                  (d = c.speedInfo) === null ||
                  d === void 0
                    ? void 0
                    : d.call(c).totalCost) || 0,
                currentTime: y,
                bufferEnd:
                  ((h = this._core) === null ||
                  h === void 0 ||
                  (f = h.bufferInfo()) === null ||
                  f === void 0
                    ? void 0
                    : f.remaining) || 0,
                decodeFps: b,
              }
            );
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            var e = this;
            this._core.on(Vi.DEMUXED_TRACK, function (n) {
              var r = n.videoTrack;
              return e._stats.updateBitrate(r.samples);
            }),
              this._core.on(Vi.FLV_SCRIPT_DATA, function (n) {
                e._stats.setFpsFromScriptData(n);
              }),
              this._core.on(Vi.METADATA_PARSED, function (n) {
                n.type === "video"
                  ? e._stats.setVideoMeta(n.track)
                  : e._stats.setAudioMeta(n.track);
              }),
              this._core.on(Vi.TTFB, function (n) {
                e._stats.setDomain(n.responseUrl);
              });
          },
        },
        {
          key: "reset",
          value: function () {
            (this._samples = []), (this._stats = new vSe(this._timescale));
          },
        },
      ]),
      t
    );
  })();
function mkn(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o,
      l,
      u = [],
      c = !0,
      d = !1;
    try {
      if (((o = (n = n.call(t)).next), e === 0)) {
        if (Object(n) !== n) return;
        c = !1;
      } else
        for (
          ;
          !(c = (r = o.call(n)).done) && (u.push(r.value), u.length !== e);
          c = !0
        );
    } catch (h) {
      (d = !0), (i = h);
    } finally {
      try {
        if (!c && n.return != null && ((l = n.return()), Object(l) !== l))
          return;
      } finally {
        if (d) throw i;
      }
    }
    return u;
  }
}
function hu(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function bSe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, ZVe(r.key), r);
  }
}
function fu(t, e, n) {
  return (
    e && bSe(t.prototype, e),
    n && bSe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Xr(t, e, n) {
  return (
    (e = ZVe(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function zVe(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && jVe(t, e);
}
function cne(t) {
  return (cne = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function jVe(t, e) {
  return (jVe = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function ykn() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function vkn(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function bkn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return vkn(t);
}
function WVe(t) {
  var e = ykn();
  return function () {
    var n,
      r = cne(t);
    if (e) {
      var i = cne(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return bkn(this, n);
  };
}
function _kn(t, e) {
  return Ekn(t) || mkn(t, e) || KVe(t, e) || Akn();
}
function Ty(t) {
  return Tkn(t) || Skn(t) || KVe(t) || Rkn();
}
function Tkn(t) {
  if (Array.isArray(t)) return dne(t);
}
function Ekn(t) {
  if (Array.isArray(t)) return t;
}
function Skn(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function KVe(t, e) {
  if (t) {
    if (typeof t == "string") return dne(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? dne(t, e)
        : void 0
    );
  }
}
function dne(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function Rkn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Akn() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function wkn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function ZVe(t) {
  var e = wkn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
var nI = { VIDEO: "video", AUDIO: "audio", METADATA: "metadata" },
  Yx = { AV1: "av1", AVC: "avc", HEVC: "hevc" },
  hc = {
    AAC: "aac",
    G711PCMA: "g7110a",
    G711PCMU: "g7110m",
    OPUS: "opus",
    MP3: "mp3",
  },
  em = {
    LARGE_AV_SHIFT: "LARGE_AV_SHIFT",
    LARGE_VIDEO_GAP: "LARGE_VIDEO_GAP",
    LARGE_VIDEO_GAP_BETWEEN_CHUNK: "LARGE_VIDEO_GAP_BETWEEN_CHUNK",
    LARGE_AUDIO_GAP: "LARGE_AUDIO_GAP",
    AUDIO_FILLED: "AUDIO_FILLED",
    AUDIO_DROPPED: "AUDIO_DROPPED",
  },
  kkn = (function () {
    function t() {
      hu(this, t),
        Xr(this, "id", 1),
        Xr(this, "type", nI.VIDEO),
        Xr(this, "codecType", Yx.AVC),
        Xr(this, "pid", -1),
        Xr(this, "hvcC", void 0),
        Xr(this, "codec", ""),
        Xr(this, "timescale", 0),
        Xr(this, "formatTimescale", 0),
        Xr(this, "sequenceNumber", 0),
        Xr(this, "baseMediaDecodeTime", 0),
        Xr(this, "baseDts", 0),
        Xr(this, "duration", 0),
        Xr(this, "warnings", []),
        Xr(this, "samples", []),
        Xr(this, "pps", []),
        Xr(this, "sps", []),
        Xr(this, "vps", []),
        Xr(this, "fpsNum", 0),
        Xr(this, "fpsDen", 0),
        Xr(this, "sarRatio", []),
        Xr(this, "width", 0),
        Xr(this, "height", 0),
        Xr(this, "nalUnitSize", 4),
        Xr(this, "present", !1),
        Xr(this, "isVideoEncryption", !1),
        Xr(this, "isAudioEncryption", !1),
        Xr(this, "isVideo", !0),
        Xr(this, "lastKeyFrameDts", 0),
        Xr(this, "kid", null),
        Xr(this, "pssh", null),
        Xr(this, "ext", void 0);
    }
    return (
      fu(t, [
        {
          key: "reset",
          value: function () {
            (this.sequenceNumber =
              this.width =
              this.height =
              this.fpsDen =
              this.fpsNum =
              this.duration =
              this.baseMediaDecodeTime =
              this.timescale =
                0),
              (this.codec = ""),
              (this.present = !1),
              (this.pid = -1),
              (this.pps = []),
              (this.sps = []),
              (this.vps = []),
              (this.sarRatio = []),
              (this.samples = []),
              (this.warnings = []),
              (this.hvcC = null);
          },
        },
        {
          key: "firstDts",
          get: function () {
            return this.samples.length ? this.samples[0].dts : null;
          },
        },
        {
          key: "firstPts",
          get: function () {
            return this.samples.length ? this.samples[0].pts : null;
          },
        },
        {
          key: "samplesDuration",
          get: function () {
            if (this.samples.length > 0) {
              var e = this.samples[0],
                n = this.samples[this.samples.length - 1];
              return n.dts - e.dts + n.duration;
            }
            return 0;
          },
        },
        {
          key: "exist",
          value: function () {
            return (
              !!/av01/.test(this.codec) ||
              !!(this.pps.length && this.sps.length && this.codec)
            );
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !!this.samples.length;
          },
        },
        {
          key: "isEncryption",
          get: function () {
            return this.isVideoEncryption;
          },
        },
      ]),
      t
    );
  })(),
  Ikn = (function () {
    function t() {
      hu(this, t),
        Xr(this, "id", 2),
        Xr(this, "type", nI.AUDIO),
        Xr(this, "codecType", hc.AAC),
        Xr(this, "pid", -1),
        Xr(this, "codec", ""),
        Xr(this, "container", ""),
        Xr(this, "sequenceNumber", 0),
        Xr(this, "sampleDuration", 0),
        Xr(this, "timescale", 0),
        Xr(this, "formatTimescale", 0),
        Xr(this, "baseMediaDecodeTime", 0),
        Xr(this, "duration", 0),
        Xr(this, "warnings", []),
        Xr(this, "samples", []),
        Xr(this, "baseDts", 0),
        Xr(this, "sampleSize", 16),
        Xr(this, "sampleRate", 0),
        Xr(this, "channelCount", 0),
        Xr(this, "objectType", 0),
        Xr(this, "sampleRateIndex", 0),
        Xr(this, "config", []),
        Xr(this, "present", !1),
        Xr(this, "isVideoEncryption", !1),
        Xr(this, "isAudioEncryption", !1),
        Xr(this, "kid", null),
        Xr(this, "ext", void 0);
    }
    return (
      fu(t, [
        {
          key: "reset",
          value: function () {
            (this.sequenceNumber = 0),
              (this.timescale = 0),
              (this.sampleDuration = 0),
              (this.sampleRate = 0),
              (this.channelCount = 0),
              (this.baseMediaDecodeTime = 0),
              (this.present = !1),
              (this.pid = -1),
              (this.codec = ""),
              (this.samples = []),
              (this.config = []),
              (this.warnings = []);
          },
        },
        {
          key: "exist",
          value: function () {
            return !(
              !this.sampleRate ||
              !this.channelCount ||
              (!this.codec && !this.container) ||
              (this.codecType !== hc.AAC &&
                this.codecType !== hc.G711PCMA &&
                this.codecType !== hc.G711PCMU &&
                this.codecType !== hc.OPUS &&
                this.codecType !== hc.MP3)
            );
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !!this.samples.length;
          },
        },
        {
          key: "isEncryption",
          get: function () {
            return this.isAudioEncryption;
          },
        },
        {
          key: "firstDts",
          get: function () {
            return this.samples.length ? this.samples[0].dts : null;
          },
        },
        {
          key: "firstPts",
          get: function () {
            return this.samples.length ? this.samples[0].pts : null;
          },
        },
        {
          key: "samplesDuration",
          get: function () {
            if (this.samples.length > 0) {
              var e = this.samples[0],
                n = this.samples[this.samples.length - 1];
              return n.dts - e.dts + n.duration;
            }
            return 0;
          },
        },
      ]),
      t
    );
  })(),
  Dkn = (function () {
    function t(e, n, r) {
      hu(this, t),
        Xr(this, "flag", {}),
        Xr(this, "keyframe", !1),
        Xr(this, "gopId", 0),
        Xr(this, "duration", 0),
        Xr(this, "size", 0),
        Xr(this, "units", []),
        Xr(this, "chromaFormat", 420),
        (this.originPts = this.pts = e),
        (this.originDts = this.dts = n),
        r && (this.units = r);
    }
    return (
      fu(t, [
        {
          key: "cts",
          get: function () {
            return this.pts - this.dts;
          },
        },
        {
          key: "setToKeyframe",
          value: function () {
            (this.keyframe = !0),
              (this.flag.dependsOn = 2),
              (this.flag.isNonSyncSample = 0);
          },
        },
      ]),
      t
    );
  })(),
  HF = fu(function t(e, n, r, i) {
    hu(this, t),
      Xr(this, "duration", 1024),
      Xr(this, "flag", { dependsOn: 2, isNonSyncSample: 0 }),
      Xr(this, "keyframe", !0),
      (this.originPts = this.pts = this.dts = e),
      (this.data = n),
      (this.size = n.byteLength),
      (this.sampleOffset = i),
      r && (this.duration = r);
  }),
  YVe = fu(function t(e, n) {
    hu(this, t),
      Xr(this, "time", 0),
      (this.data = e),
      (this.originPts = this.pts = n);
  }),
  Pkn = (function (t) {
    zVe(n, YVe);
    var e = WVe(n);
    function n() {
      return hu(this, n), e.apply(this, arguments);
    }
    return fu(n);
  })(),
  Mkn = (function (t) {
    zVe(n, YVe);
    var e = WVe(n);
    function n() {
      return hu(this, n), e.apply(this, arguments);
    }
    return fu(n);
  })(),
  Ckn = (function () {
    function t() {
      hu(this, t),
        Xr(this, "id", 3),
        Xr(this, "type", nI.METADATA),
        Xr(this, "timescale", 0),
        Xr(this, "flvScriptSamples", []),
        Xr(this, "seiSamples", []);
    }
    return (
      fu(t, [
        {
          key: "exist",
          value: function () {
            return !(
              (!this.flvScriptSamples.length && !this.seiSamples.length) ||
              !this.timescale
            );
          },
        },
        {
          key: "reset",
          value: function () {
            (this.timescale = 0),
              (this.flvScriptSamples = []),
              (this.seiSamples = []);
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !(!this.flvScriptSamples.length && !this.seiSamples.length);
          },
        },
      ]),
      t
    );
  })(),
  qU = (function () {
    function t(e) {
      hu(this, t),
        (this.name = e || ""),
        (this._prefix = "[".concat(this.name, "]"));
    }
    return (
      fu(
        t,
        [
          {
            key: "warn",
            value: function () {
              var e;
              if (!t.disabled) {
                for (
                  var n = arguments.length, r = new Array(n), i = 0;
                  i < n;
                  i++
                )
                  r[i] = arguments[i];
                (e = console).warn.apply(e, [this._prefix].concat(r));
              }
            },
          },
        ],
        [
          {
            key: "enable",
            value: function () {
              t.disabled = !1;
            },
          },
          {
            key: "disable",
            value: function () {
              t.disabled = !0;
            },
          },
        ]
      ),
      t
    );
  })();
Xr(qU, "disabled", !0);
var IB = typeof window < "u",
  Aue = IB && navigator.userAgent.toLocaleLowerCase(),
  $kn = IB && /^((?!chrome|android).)*safari/.test(Aue),
  xkn = IB && Aue.includes("firefox"),
  Lkn = IB && Aue.includes("android"),
  e8 = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "getRateIndexByRate",
          value: function (e) {
            return t.FREQ.indexOf(e);
          },
        },
        {
          key: "parseADTS",
          value: function (e, n) {
            for (
              var r = e.length, i = 0;
              i + 2 < r && (e[i] !== 255 || (246 & e[i + 1]) != 240);

            )
              i++;
            if (!(i >= r)) {
              var o = i,
                l = [],
                u = (60 & e[i + 2]) >>> 2,
                c = t.FREQ[u];
              if (!c) throw new Error("Invalid sampling index: ".concat(u));
              for (
                var d,
                  h,
                  f = 1 + ((192 & e[i + 2]) >>> 6),
                  p = ((1 & e[i + 2]) << 2) | ((192 & e[i + 3]) >>> 6),
                  g = t._getConfig(u, p, f),
                  y = g.config,
                  v = g.codec,
                  b = 0,
                  w = t.getFrameDuration(c);
                i + 7 < r;

              )
                if (e[i] === 255 && (246 & e[i + 1]) == 240) {
                  if (
                    !(h =
                      ((3 & e[i + 3]) << 11) |
                      (e[i + 4] << 3) |
                      ((224 & e[i + 5]) >> 5)) ||
                    r - i < h
                  )
                    break;
                  (d = 2 * (1 & ~e[i + 1])),
                    l.push({
                      pts: n + b * w,
                      data: e.subarray(i + 7 + d, i + h),
                    }),
                    b++,
                    (i += h);
                } else i++;
              return {
                skip: o,
                remaining: i >= r ? void 0 : e.subarray(i),
                frames: l,
                samplingFrequencyIndex: u,
                sampleRate: c,
                objectType: f,
                channelCount: p,
                codec: v,
                config: y,
                originCodec: "mp4a.40.".concat(f),
              };
            }
          },
        },
        {
          key: "parseAudioSpecificConfig",
          value: function (e) {
            if (e.length) {
              var n = e[0] >>> 3,
                r = ((7 & e[0]) << 1) | (e[1] >>> 7),
                i = (120 & e[1]) >>> 3,
                o = t.FREQ[r];
              if (o) {
                var l = t._getConfig(r, i, n);
                return {
                  samplingFrequencyIndex: r,
                  sampleRate: o,
                  objectType: n,
                  channelCount: i,
                  config: l.config,
                  codec: l.codec,
                  originCodec: "mp4a.40.".concat(n),
                };
              }
            }
          },
        },
        {
          key: "getFrameDuration",
          value: function (e) {
            return (
              (1024 *
                (arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 9e4)) /
              e
            );
          },
        },
        {
          key: "_getConfig",
          value: function (e, n, r) {
            var i,
              o,
              l = [];
            return (
              xkn
                ? e >= 6
                  ? ((i = 5), (o = e - 3))
                  : ((i = 2), (o = e))
                : Lkn
                ? ((i = 2), (o = e))
                : ((i = 5),
                  (o = e),
                  e >= 6 ? (o = e - 3) : n === 1 && ((i = 2), (o = e))),
              (l[0] = i << 3),
              (l[0] |= (14 & e) >> 1),
              (l[1] = (1 & e) << 7),
              (l[1] |= n << 3),
              i === 5 &&
                ((l[1] |= (14 & o) >> 1),
                (l[2] = (1 & o) << 7),
                (l[2] |= 8),
                (l[3] = 0)),
              { config: l, codec: "mp4a.40.".concat(i) }
            );
          },
        },
        {
          key: "getSilentFrame",
          value: function (e, n) {
            if (e === "mp4a.40.2") {
              if (n === 1) return new Uint8Array([0, 200, 0, 128, 35, 128]);
              if (n === 2)
                return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
              if (n === 3)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142,
                ]);
              if (n === 4)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128,
                  8, 2, 56,
                ]);
              if (n === 5)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 56,
                ]);
              if (n === 6)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224,
                ]);
            } else {
              if (n === 1)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6,
                  241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 2)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 3)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
            }
          },
        },
      ]),
      t
    );
  })();
Xr(
  e8,
  "FREQ",
  [
    96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3,
    7350,
  ]
);
var hne = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "getFrameDuration",
          value: function (e) {
            return 20;
          },
        },
        {
          key: "parseHeaderPackets",
          value: function (e) {
            if (e.length) {
              for (
                var n = new DataView(e.buffer, e.byteOffset, e.byteLength),
                  r = "",
                  i = 0;
                i < 8;
                i++
              )
                r += String.fromCodePoint(e[i]);
              if (r !== "OpusHead")
                throw new Error("Invalid Opus MagicSignature");
              var o = e[9];
              console.log("Pre-skip", e[10], e[11]);
              var l = n.getUint32(12, !0),
                u = n.getInt16(16, !0);
              if (l)
                return {
                  outputGain: u,
                  sampleRate: l,
                  channelCount: o,
                  config: new Uint8Array(
                    e.buffer,
                    e.byteOffset + 8,
                    e.byteLength - 8
                  ),
                  codec: "opus",
                  originCodec: "opus",
                };
            }
          },
        },
      ]),
      t
    );
  })(),
  Okn = 500,
  _Se = 3,
  LW = 1e3,
  OW = 5e3,
  Gkn = 1e3,
  Nkn = 200,
  TSe = 5e3,
  ESe = 5,
  Fkn = (function () {
    function t(e, n, r) {
      hu(this, t),
        (this.videoTrack = e),
        (this.audioTrack = n),
        (this.metadataTrack = r),
        (this._baseDts = -1),
        (this._baseDtsInited = !1),
        (this._audioNextPts = void 0),
        (this._videoNextDts = void 0),
        (this._audioTimestampBreak = 0),
        (this._videoTimestampBreak = 0),
        (this._lastVideoDuration = 0),
        (this._keyFrameInNextChunk = !1),
        (this._lastAudioExceptionGapDot = -1 / 0),
        (this._lastAudioExceptionOverlapDot = -1 / 0),
        (this._lastAudioExceptionLargeGapDot = -1 / 0),
        (this._lastVideoExceptionLargeGapDot = -1 / 0),
        (this._lastVideoExceptionChunkFirstDtsDot = -1 / 0);
    }
    return (
      fu(t, [
        {
          key: "fix",
          value: function () {
            var e = this,
              n =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 0,
              r =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1],
              i =
                !(arguments.length > 2 && arguments[2] !== void 0) ||
                arguments[2];
            n = Math.round(1e3 * n);
            var o = this.videoTrack,
              l = this.audioTrack;
            if (
              ((!r && i) ||
                ((this._videoLastSample = null),
                (this._audioNextPts = void 0),
                (this._videoNextDts = void 0),
                (this._audioTimestampBreak = 0),
                (this._videoTimestampBreak = 0),
                (this._lastAudioExceptionGapDot = -1 / 0),
                (this._lastAudioExceptionOverlapDot = -1 / 0),
                (this._lastAudioExceptionLargeGapDot = -1 / 0),
                (this._lastVideoExceptionLargeGapDot = -1 / 0),
                (this._lastVideoExceptionChunkFirstDtsDot = -1 / 0)),
              r && !i && (this._baseDtsInited = !1),
              this._baseDtsInited || this._calculateBaseDts(l, o),
              !i && n && (this._audioNextPts = this._videoNextDts = n),
              this._baseDtsInited &&
                (this._videoTimestampBreak || !this.videoTrack.exist()) &&
                (this._audioTimestampBreak || !this.audioTrack.exist()) &&
                this._resetBaseDtsWhenStreamBreaked(),
              this._fixAudio(l),
              (this._keyFrameInNextChunk = !1),
              this._fixVideo(o),
              this.metadataTrack.exist())
            ) {
              var u = this.metadataTrack.timescale;
              this.metadataTrack.seiSamples.forEach(function (c) {
                (c.pts = c.originPts - e._baseDts),
                  (c.time = Math.max(0, c.pts) / u);
              }),
                this.metadataTrack.flvScriptSamples.forEach(function (c) {
                  (c.pts = c.originPts - e._baseDts),
                    (c.time = Math.max(0, c.pts) / u);
                });
            }
            o.samples.length && (o.baseMediaDecodeTime = o.samples[0].dts),
              l.samples.length &&
                (l.baseMediaDecodeTime =
                  (l.samples[0].pts * l.timescale) / 1e3);
          },
        },
        {
          key: "_fixVideo",
          value: function (e) {
            var n = this,
              r = e.samples;
            if (r.length) {
              var i;
              if (
                (r.forEach(function (w) {
                  (w.dts -= n._baseDts),
                    (w.pts -= n._baseDts),
                    w.keyframe && (n._keyFrameInNextChunk = !0);
                }),
                e.fpsNum && e.fpsDen)
              )
                i = e.timescale * (e.fpsDen / e.fpsNum);
              else if (e.length > 1) {
                var o = e.samples[0],
                  l = e.samples[r.length - 1];
                i = Math.floor((l.dts - o.dts) / (r.length - 1));
              } else i = this._lastVideoDuration || 40;
              var u = r.pop();
              if (
                (this._videoLastSample && r.unshift(this._videoLastSample),
                (this._videoLastSample = u),
                r.length)
              ) {
                if (this._videoNextDts === void 0) {
                  var c = r[0];
                  this._videoNextDts = c.dts;
                }
                var d = r.length,
                  h = 0,
                  f = r[0],
                  p = this._videoNextDts - f.dts;
                if (Math.abs(p) > Nkn) {
                  var g;
                  Math.abs(f.dts - this._lastVideoExceptionChunkFirstDtsDot) >
                    TSe &&
                    ((this._lastVideoExceptionChunkFirstDtsDot = f.dts),
                    e.warnings.push({
                      type: em.LARGE_VIDEO_GAP_BETWEEN_CHUNK,
                      nextDts: this._videoNextDts,
                      firstSampleDts: f.dts,
                      nextSampleDts:
                        (g = r[1]) === null || g === void 0 ? void 0 : g.dts,
                      sampleDuration: p,
                    })),
                    this._videoTimestampBreak >= ESe
                      ? ((this._videoNextDts = f.dts),
                        (this._videoTimestampBreak = 0))
                      : ((f.dts += p),
                        (f.pts += p),
                        this.audioTrack.exist() ||
                          (this._videoTimestampBreak = 1));
                }
                for (var y = 0; y < d; y++) {
                  var v = r[y].dts,
                    b = r[y + 1];
                  ((h = y < d - 1 ? b.dts - v : u ? u.dts - v : i) > Gkn ||
                    h < 0) &&
                    (this._videoTimestampBreak++,
                    Math.abs(v - this._lastVideoExceptionLargeGapDot) > TSe &&
                      ((this._lastVideoExceptionLargeGapDot = v),
                      e.warnings.push({
                        type: em.LARGE_VIDEO_GAP,
                        time: v / e.timescale,
                        dts: v,
                        originDts: r[y].originDts,
                        nextDts: this._videoNextDts,
                        sampleDuration: h,
                        refSampleDuration: i,
                      })),
                    (h = i)),
                    (r[y].duration = h),
                    (this._videoNextDts += h),
                    (this._lastVideoDuration = h);
                }
              }
            }
          },
        },
        {
          key: "_fixAudio",
          value: function (e) {
            var n = this,
              r = e.samples;
            r.length &&
              (r.forEach(function (i) {
                i.dts = i.pts -= n._baseDts;
              }),
              this._doFixAudioInternal(e, r, 1e3));
          },
        },
        {
          key: "_calculateBaseDts",
          value: function (e, n) {
            var r = e.samples,
              i = n.samples;
            if (!r.length && !i.length) return !1;
            var o = 1 / 0,
              l = 1 / 0;
            r.length && (e.baseDts = o = r[0].pts),
              i.length && (n.baseDts = l = i[0].dts),
              (this._baseDts = Math.min(o, l));
            var u = l - o;
            return (
              Number.isFinite(u) &&
                Math.abs(u) > Okn &&
                n.warnings.push({
                  type: em.LARGE_AV_SHIFT,
                  videoBaseDts: l,
                  audioBasePts: o,
                  baseDts: this._baseDts,
                  delta: u,
                }),
              (this._baseDtsInited = !0),
              !0
            );
          },
        },
        {
          key: "_resetBaseDtsWhenStreamBreaked",
          value: function () {
            this._calculateBaseDts(this.audioTrack, this.videoTrack) &&
              (this.audioTrack.exist()
                ? this.videoTrack.exist()
                  ? (this._baseDts -= Math.min(
                      this._audioNextPts,
                      this._videoNextDts
                    ))
                  : (this._baseDts -= this._audioNextPts)
                : (this._baseDts -= this._videoNextDts),
              (this._videoTimestampBreak = 0),
              (this._audioTimestampBreak = 0));
          },
        },
        {
          key: "_doFixAudioInternal",
          value: function (e, n, r) {
            if (!e.sampleDuration)
              switch (e.codecType) {
                case hc.AAC:
                  e.sampleDuration = e8.getFrameDuration(e.timescale, r);
                  break;
                case hc.OPUS:
                  e.sampleDuration = hne.getFrameDuration(e.samples, r);
                  break;
                case hc.G711PCMA:
                case hc.G711PCMU:
                  e.sampleDuration = this._getG711Duration(e);
                  break;
                default:
                  console.error("can't fix audio codecType:", e.codecType);
              }
            var i = e.sampleDuration,
              o =
                e.codecType === hc.OPUS
                  ? 20
                  : e.codecType === hc.AAC
                  ? 1024
                  : (i * e.timescale) / 1e3;
            if (this._audioNextPts === void 0) {
              var l = n[0];
              this._audioNextPts = l.pts;
            }
            for (var u = 0; u < n.length; u++) {
              var c = this._audioNextPts,
                d = n[u],
                h = d.pts - c;
              if (
                (u === 0 &&
                  this._audioTimestampBreak >= ESe &&
                  this._keyFrameInNextChunk &&
                  ((c = this._audioNextPts = d.dts),
                  (h = 0),
                  (this._audioTimestampBreak = 0)),
                !this._audioTimestampBreak && h >= _Se * i && h <= LW && !$kn)
              ) {
                var f = this._getSilentFrame(e) || n[0].data.subarray(),
                  p = Math.floor(h / i);
                Math.abs(d.pts - this._lastAudioExceptionGapDot) > OW &&
                  ((this._lastAudioExceptionGapDot = d.pts),
                  e.warnings.push({
                    type: em.AUDIO_FILLED,
                    pts: d.pts,
                    originPts: d.originPts,
                    count: p,
                    nextPts: c,
                    refSampleDuration: i,
                  }));
                for (var g = 0; g < p; g++) {
                  var y = new HF(
                    Math.floor(this._audioNextPts + i) -
                      Math.floor(this._audioNextPts),
                    f,
                    o
                  );
                  (y.originPts = Math.floor(this._baseDts + c)),
                    n.splice(u, 0, y),
                    (this._audioNextPts += i),
                    u++;
                }
                u--;
              } else if (h <= -_Se * i && h >= -1 * LW)
                Math.abs(d.pts - this._lastAudioExceptionOverlapDot) > OW &&
                  ((this._lastAudioExceptionOverlapDot = d.pts),
                  e.warnings.push({
                    type: em.AUDIO_DROPPED,
                    pts: d.pts,
                    originPts: d.originPts,
                    nextPts: c,
                    refSampleDuration: i,
                  })),
                  n.splice(u, 1),
                  u--;
              else {
                if (
                  (Math.abs(h) > LW &&
                    (this._audioTimestampBreak++,
                    Math.abs(d.pts - this._lastAudioExceptionLargeGapDot) >
                      OW &&
                      ((this._lastAudioExceptionLargeGapDot = d.pts),
                      e.warnings.push({
                        type: em.LARGE_AUDIO_GAP,
                        time: d.pts / 1e3,
                        pts: d.pts,
                        originPts: d.originPts,
                        nextPts: c,
                        sampleDuration: h,
                        refSampleDuration: i,
                      }))),
                  e.codecType === hc.OPUS)
                ) {
                  var v = n[n.length - 1];
                  v && (v.duration = d.pts - v.pts);
                } else (d.dts = d.pts = c), (d.duration = o);
                this._audioNextPts += i;
              }
            }
          },
        },
        {
          key: "_getG711Duration",
          value: function (e) {
            var n = e.sampleSize,
              r = e.channelCount,
              i = e.sampleRate,
              o = e.samples[0];
            if (o) return ((2 * o.data.byteLength) / r / (n / 8) / i) * 1e3;
          },
        },
        {
          key: "_getSilentFrame",
          value: function (e) {
            return e.codecType === hc.AAC
              ? e8.getSilentFrame(e.codec, e.channelCount)
              : new Uint8Array(8 * e.sampleDuration * e.channelCount);
          },
        },
      ]),
      t
    );
  })();
function Vy() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  e = e.filter(Boolean);
  var r = new Uint8Array(
      e.reduce(function (o, l) {
        return o + l.byteLength;
      }, 0)
    ),
    i = 0;
  return (
    e.forEach(function (o) {
      r.set(o, i), (i += o.byteLength);
    }),
    r
  );
}
function XF(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (
    ((t[e] << 24) >>> 0) + (t[e + 1] << 16) + (t[e + 2] << 8) + (t[e + 3] || 0)
  );
}
function Ukn(t) {
  for (var e, n = "avc1.", r = 0; r < 3; r++)
    (e = t[r].toString(16)).length < 2 && (e = "0".concat(e)), (n += e);
  return n;
}
function SSe(t) {
  if (!Array.isArray(t)) {
    for (var e = [], n = "", r = 0; r < t.length; r++)
      r % 2 && ((n = t[r - 1] + t[r]), e.push(parseInt(n, 16)), (n = ""));
    return e;
  }
  return t.map(function (i) {
    return parseInt(i, 16);
  });
}
var rI = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "parseAnnexB",
          value: function (e) {
            var n = e.byteLength - 1,
              r = 0;
            do {
              if (e[n] !== 0) break;
              r++, n--;
            } while (n > 0);
            r >= 3 && (e = e.subarray(0, n + 1));
            for (
              var i = e.length, o = 2, l = 0;
              e[o] !== null && e[o] !== void 0 && e[o] !== 1;

            )
              o++;
            if ((l = ++o + 2) >= i) return [];
            for (var u = []; l < i; )
              switch (e[l]) {
                case 0:
                  if (e[l - 1] !== 0) {
                    l += 2;
                    break;
                  }
                  if (e[l - 2] !== 0) {
                    l++;
                    break;
                  }
                  if (l < i - 1 && e[l + 1] !== 1) {
                    l++;
                    break;
                  }
                  o !== l - 2 && u.push(e.subarray(o, l - 2));
                  do l++;
                  while (e[l] !== 1 && l < i);
                  l = (o = l + 1) + 2;
                  break;
                case 1:
                  if (e[l - 1] !== 0 || e[l - 2] !== 0) {
                    l += 3;
                    break;
                  }
                  o !== l - 2 && u.push(e.subarray(o, l - 2)),
                    (l = (o = l + 1) + 2);
                  break;
                default:
                  l += 3;
              }
            return o < i && u.push(e.subarray(o)), u;
          },
        },
        {
          key: "parseAvcC",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 4;
            if (!(e.length < 4)) {
              for (var r, i = e.length, o = [], l = 0; l + n < i; )
                if (((r = XF(e, l)), n === 3 && (r >>>= 8), (l += n), r)) {
                  if (l + r > i) break;
                  o.push(e.subarray(l, l + r)), (l += r);
                }
              return o;
            }
          },
        },
        {
          key: "parseSEI",
          value: function (e, n) {
            for (
              var r = e.length, i = n ? 2 : 1, o = 0, l = 0, u = "";
              e[i] === 255;

            )
              (o += 255), i++;
            for (o += e[i++]; e[i] === 255; ) (l += 255), i++;
            if (((l += e[i++]), o === 5 && r > i + 16))
              for (var c = 0; c < 16; c++) (u += e[i].toString(16)), i++;
            return { payload: e.subarray(i, i + l), type: o, size: l, uuid: u };
          },
        },
        {
          key: "removeEPB",
          value: function (e) {
            for (var n = e.byteLength, r = [], i = 1; i < n - 2; )
              e[i] === 0 && e[i + 1] === 0 && e[i + 2] === 3
                ? (r.push(i + 2), (i += 2))
                : i++;
            if (!r.length) return e;
            var o = n - r.length,
              l = new Uint8Array(o),
              u = 0;
            for (i = 0; i < o; u++, i++)
              u === r[0] && (u++, r.shift()), (l[i] = e[u]);
            return l;
          },
        },
      ]),
      t
    );
  })(),
  fne = (function () {
    function t(e) {
      if (
        (hu(this, t),
        Xr(this, "_bytesAvailable", void 0),
        Xr(this, "_bitsAvailable", 0),
        Xr(this, "_word", 0),
        !e)
      )
        throw new Error("ExpGolomb data params is required");
      (this._data = e),
        (this._bytesAvailable = e.byteLength),
        this._bytesAvailable && this._loadWord();
    }
    return (
      fu(t, [
        {
          key: "bitsAvailable",
          get: function () {
            return this._bitsAvailable;
          },
        },
        {
          key: "_loadWord",
          value: function () {
            var e = this._data.byteLength - this._bytesAvailable,
              n = Math.min(4, this._bytesAvailable);
            if (n === 0) throw new Error("No bytes available");
            var r = new Uint8Array(4);
            r.set(this._data.subarray(e, e + n)),
              (this._word = new DataView(r.buffer).getUint32(0)),
              (this._bitsAvailable = 8 * n),
              (this._bytesAvailable -= n);
          },
        },
        {
          key: "skipBits",
          value: function (e) {
            if (this._bitsAvailable > e)
              (this._word <<= e), (this._bitsAvailable -= e);
            else {
              e -= this._bitsAvailable;
              var n = Math.floor(e / 8);
              (e -= 8 * n),
                (this._bytesAvailable -= n),
                this._loadWord(),
                (this._word <<= e),
                (this._bitsAvailable -= e);
            }
          },
        },
        {
          key: "readBits",
          value: function (e) {
            if (e > 32) throw new Error("Cannot read more than 32 bits");
            var n = Math.min(this._bitsAvailable, e),
              r = this._word >>> (32 - n);
            return (
              (this._bitsAvailable -= n),
              this._bitsAvailable > 0
                ? (this._word <<= n)
                : this._bytesAvailable > 0 && this._loadWord(),
              (n = e - n) > 0 && this._bitsAvailable
                ? (r << n) | this.readBits(n)
                : r
            );
          },
        },
        {
          key: "skipLZ",
          value: function () {
            var e;
            for (e = 0; e < this._bitsAvailable; ++e)
              if (this._word & (2147483648 >>> e))
                return (this._word <<= e), (this._bitsAvailable -= e), e;
            return this._loadWord(), e + this.skipLZ();
          },
        },
        {
          key: "skipUEG",
          value: function () {
            this.skipBits(1 + this.skipLZ());
          },
        },
        {
          key: "readUEG",
          value: function () {
            var e = this.skipLZ();
            return this.readBits(e + 1) - 1;
          },
        },
        {
          key: "readEG",
          value: function () {
            var e = this.readUEG();
            return 1 & e ? (1 + e) >>> 1 : -1 * (e >>> 1);
          },
        },
        {
          key: "readBool",
          value: function () {
            return this.readBits(1) === 1;
          },
        },
        {
          key: "readUByte",
          value: function () {
            return this.readBits(8);
          },
        },
        {
          key: "skipScalingList",
          value: function (e) {
            for (var n = 8, r = 8, i = 0; i < e; i++)
              r !== 0 && (r = (n + this.readEG() + 256) % 256),
                (n = r === 0 ? n : r);
          },
        },
      ]),
      t
    );
  })(),
  Bkn = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "parseAVCDecoderConfigurationRecord",
          value: function (e) {
            if (!(e.length < 7)) {
              for (
                var n,
                  r,
                  i = 1 + (3 & e[4]),
                  o = [],
                  l = [],
                  u = 6,
                  c = 31 & e[5],
                  d = 0;
                d < c;
                d++
              )
                if (((r = (e[u] << 8) | e[u + 1]), (u += 2), r)) {
                  var h = e.subarray(u, u + r);
                  (u += r), o.push(h), n || (n = t.parseSPS(rI.removeEPB(h)));
                }
              var f,
                p = e[u];
              u++;
              for (var g = 0; g < p; g++)
                (f = (e[u] << 8) | e[u + 1]),
                  (u += 2),
                  f && (l.push(e.subarray(u, u + f)), (u += f));
              return { sps: n, spsArr: o, ppsArr: l, nalUnitSize: i };
            }
          },
        },
        {
          key: "parseSPS",
          value: function (e) {
            var n = new fne(e);
            n.readUByte();
            var r = n.readUByte(),
              i = n.readUByte(),
              o = n.readUByte();
            n.skipUEG();
            var l = 420;
            if (
              r === 100 ||
              r === 110 ||
              r === 122 ||
              r === 244 ||
              r === 44 ||
              r === 83 ||
              r === 86 ||
              r === 118 ||
              r === 128 ||
              r === 138 ||
              r === 144
            ) {
              var u = n.readUEG();
              if (
                (u <= 3 && (l = [0, 420, 422, 444][u]),
                u === 3 && n.skipBits(1),
                n.skipUEG(),
                n.skipUEG(),
                n.skipBits(1),
                n.readBool())
              )
                for (var c = u !== 3 ? 8 : 12, d = 0; d < c; d++)
                  n.readBool() &&
                    (d < 6 ? n.skipScalingList(16) : n.skipScalingList(64));
            }
            n.skipUEG();
            var h = n.readUEG();
            if (h === 0) n.readUEG();
            else if (h === 1) {
              n.skipBits(1), n.skipUEG(), n.skipUEG();
              for (var f = n.readUEG(), p = 0; p < f; p++) n.skipUEG();
            }
            n.skipUEG(), n.skipBits(1);
            var g = n.readUEG(),
              y = n.readUEG(),
              v = n.readBits(1);
            v === 0 && n.skipBits(1), n.skipBits(1);
            var b,
              w,
              k,
              D,
              $,
              N = 0,
              P = 0,
              I = 0,
              O = 0;
            if (
              (n.readBool() &&
                ((N = n.readUEG()),
                (P = n.readUEG()),
                (I = n.readUEG()),
                (O = n.readUEG())),
              n.readBool())
            ) {
              if (n.readBool())
                switch (n.readUByte()) {
                  case 1:
                    b = [1, 1];
                    break;
                  case 2:
                    b = [12, 11];
                    break;
                  case 3:
                    b = [10, 11];
                    break;
                  case 4:
                    b = [16, 11];
                    break;
                  case 5:
                    b = [40, 33];
                    break;
                  case 6:
                    b = [24, 11];
                    break;
                  case 7:
                    b = [20, 11];
                    break;
                  case 8:
                    b = [32, 11];
                    break;
                  case 9:
                    b = [80, 33];
                    break;
                  case 10:
                    b = [18, 11];
                    break;
                  case 11:
                    b = [15, 11];
                    break;
                  case 12:
                    b = [64, 33];
                    break;
                  case 13:
                    b = [160, 99];
                    break;
                  case 14:
                    b = [4, 3];
                    break;
                  case 15:
                    b = [3, 2];
                    break;
                  case 16:
                    b = [2, 1];
                    break;
                  case 255:
                    b = [
                      (n.readUByte() << 8) | n.readUByte(),
                      (n.readUByte() << 8) | n.readUByte(),
                    ];
                }
              if (
                (n.readBool() && n.readBool(),
                n.readBool() && (n.readBits(4), n.readBool() && n.readBits(24)),
                n.readBool() && (n.readUEG(), n.readUEG()),
                n.readBool())
              ) {
                var X = n.readBits(32),
                  G = n.readBits(32);
                (w = n.readBool()), ($ = (k = G) / (D = 2 * X));
              }
            }
            return {
              codec: Ukn(e.subarray(1, 4)),
              profileIdc: r,
              profileCompatibility: i,
              levelIdc: o,
              chromaFormat: l,
              width: Math.ceil(16 * (g + 1) - 2 * (N + P)),
              height: (2 - v) * (y + 1) * 16 - (v ? 2 : 4) * (I + O),
              sarRatio: b,
              fpsNum: k,
              fpsDen: D,
              fps: $,
              fixedFrame: w,
            };
          },
        },
      ]),
      t
    );
  })(),
  Hkn = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "parseHEVCDecoderConfigurationRecord",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : {};
            if (!(e.length < 23)) {
              n = n || {};
              for (
                var r,
                  i,
                  o,
                  l,
                  u,
                  c = 1 + (3 & e[21]),
                  d = [],
                  h = [],
                  f = [],
                  p = 23,
                  g = e[22],
                  y = 0;
                y < g;
                y++
              ) {
                (o = 63 & e[p]), (l = (e[p + 1] << 8) | e[p + 2]), (p += 3);
                for (var v = 0; v < l; v++)
                  if (((u = (e[p] << 8) | e[p + 1]), (p += 2), u)) {
                    switch (o) {
                      case 32:
                        var b = e.subarray(p, p + u);
                        r || (r = t.parseVPS(rI.removeEPB(b), n)), f.push(b);
                        break;
                      case 33:
                        var w = e.subarray(p, p + u);
                        i || (i = t.parseSPS(rI.removeEPB(w), n)), d.push(w);
                        break;
                      case 34:
                        h.push(e.subarray(p, p + u));
                    }
                    p += u;
                  }
              }
              return {
                hvcC: n,
                sps: i,
                spsArr: d,
                ppsArr: h,
                vpsArr: f,
                nalUnitSize: c,
              };
            }
          },
        },
        {
          key: "parseVPS",
          value: function (e, n) {
            n = n || {};
            var r = new fne(e);
            r.readUByte(), r.readUByte(), r.readBits(12);
            var i = r.readBits(3);
            return (
              (n.numTemporalLayers = Math.max(n.numTemporalLayers || 0, i + 1)),
              r.readBits(17),
              t._parseProfileTierLevel(r, i, n),
              n
            );
          },
        },
        {
          key: "parseSPS",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : {};
            n = n || {};
            var r = new fne(e);
            r.readUByte(), r.readUByte(), r.readBits(4);
            var i = r.readBits(3);
            (n.numTemporalLayers = Math.max(i + 1, n.numTemporalLayers || 0)),
              (n.temporalIdNested = r.readBits(1)),
              t._parseProfileTierLevel(r, i, n),
              r.readUEG();
            var o = (n.chromaFormatIdc = r.readUEG()),
              l = 420;
            o <= 3 && (l = [0, 420, 422, 444][o]);
            var u = 0;
            o === 3 && (u = r.readBits(1));
            var c,
              d,
              h,
              f,
              p = r.readUEG(),
              g = r.readUEG(),
              y = r.readBits(1);
            return (
              y === 1 &&
                ((c = r.readUEG()),
                (d = r.readUEG()),
                (h = r.readUEG()),
                (f = r.readUEG())),
              (n.bitDepthLumaMinus8 = r.readUEG()),
              (n.bitDepthChromaMinus8 = r.readUEG()),
              y === 1 &&
                ((p -= ((o !== 1 && o !== 2) || u !== 0 ? 1 : 2) * (d + c)),
                (g -= (o === 1 && u === 0 ? 2 : 1) * (f + h))),
              {
                codec: "hev1.1.6.L93.B0",
                width: p,
                height: g,
                chromaFormat: l,
                hvcC: n,
              }
            );
          },
        },
        {
          key: "_parseProfileTierLevel",
          value: function (e, n, r) {
            var i = r.generalTierFlag || 0;
            (r.generalProfileSpace = e.readBits(2)),
              (r.generalTierFlag = Math.max(e.readBits(1), i)),
              (r.generalProfileIdc = Math.max(
                e.readBits(5),
                r.generalProfileIdc || 0
              )),
              (r.generalProfileCompatibilityFlags = e.readBits(32)),
              (r.generalConstraintIndicatorFlags = [
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
              ]);
            var o = e.readBits(8);
            i < r.generalTierFlag
              ? (r.generalLevelIdc = o)
              : (r.generalLevelIdc = Math.max(o, r.generalLevelIdc || 0));
            var l = [],
              u = [];
            if (n > e.bitsAvailable)
              throw new Error("maxSubLayersMinus inavlid size ".concat(n));
            for (var c = 0; c < n; c++)
              (l[c] = e.readBits(1)), (u[c] = e.readBits(1));
            n > 0 && e.readBits(2 * (8 - n));
            for (var d = 0; d < n; d++)
              l[d] !== 0 &&
                (e.readBits(2),
                e.readBits(1),
                e.readBits(5),
                e.readBits(16),
                e.readBits(16),
                e.readBits(4),
                e.readBits(16),
                e.readBits(16),
                e.readBits(12)),
                u[d] !== 0 && e.readBits(8);
          },
        },
      ]),
      t
    );
  })(),
  RSe = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "decode",
          value: function (e) {
            for (var n = [], r = e, i = 0, o = e.length; i < o; )
              if (r[i] < 128) n.push(String.fromCharCode(r[i])), ++i;
              else {
                if (!(r[i] < 192)) {
                  if (r[i] < 224) {
                    if (t._checkContinuation(r, i, 1)) {
                      var l = ((31 & r[i]) << 6) | (63 & r[i + 1]);
                      if (l >= 128) {
                        n.push(String.fromCharCode(65535 & l)), (i += 2);
                        continue;
                      }
                    }
                  } else if (r[i] < 240) {
                    if (t._checkContinuation(r, i, 2)) {
                      var u =
                        ((15 & r[i]) << 12) |
                        ((63 & r[i + 1]) << 6) |
                        (63 & r[i + 2]);
                      if (u >= 2048 && (63488 & u) != 55296) {
                        n.push(String.fromCharCode(65535 & u)), (i += 3);
                        continue;
                      }
                    }
                  } else if (r[i] < 248 && t._checkContinuation(r, i, 3)) {
                    var c =
                      ((7 & r[i]) << 18) |
                      ((63 & r[i + 1]) << 12) |
                      ((63 & r[i + 2]) << 6) |
                      (63 & r[i + 3]);
                    if (c > 65536 && c < 1114112) {
                      (c -= 65536),
                        n.push(String.fromCharCode((c >>> 10) | 55296)),
                        n.push(String.fromCharCode((1023 & c) | 56320)),
                        (i += 4);
                      continue;
                    }
                  }
                }
                n.push(String.fromCharCode(65533)), ++i;
              }
            return n.join("");
          },
        },
        {
          key: "_checkContinuation",
          value: function (e, n, r) {
            var i = e;
            if (n + r < i.length) {
              for (; r--; ) if ((192 & i[++n]) != 128) return !1;
              return !0;
            }
            return !1;
          },
        },
      ]),
      t
    );
  })(),
  Xkn = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "parse",
          value: function (e) {
            if (!(e.length < 3)) {
              var n = {},
                r = t._parseValue(
                  new DataView(e.buffer, e.byteOffset, e.byteLength)
                ),
                i = t._parseValue(
                  new DataView(
                    e.buffer,
                    e.byteOffset + r.size,
                    e.byteLength - r.size
                  )
                );
              return (n[r.data] = i.data), n;
            }
          },
        },
        {
          key: "_parseValue",
          value: function (e) {
            var n,
              r = e.byteLength,
              i = 1,
              o = !1;
            switch (e.getUint8(0)) {
              case 0:
                (n = e.getFloat64(1)), (i += 8);
                break;
              case 1:
                (n = !!e.getUint8(1)), (i += 1);
                break;
              case 2:
                var l = t._parseString(
                  new DataView(e.buffer, e.byteOffset + i, e.byteLength - i)
                );
                (n = l.data), (i += l.size);
                break;
              case 3:
                n = {};
                var u = 0;
                for (
                  (16777215 & e.getUint32(r - 4)) == 9 && (u = 3);
                  i < r - 4;

                ) {
                  var c = t._parseObject(
                      new DataView(
                        e.buffer,
                        e.byteOffset + i,
                        e.byteLength - i - u
                      )
                    ),
                    d = c.size,
                    h = c.data;
                  if (c.isEnd) break;
                  (n[h.name] = h.value), (i += d);
                }
                i <= r - 3 && (16777215 & e.getUint32(i - 1)) === 9 && (i += 3);
                break;
              case 8:
                (n = {}), (i += 4);
                var f = 0;
                for (
                  (16777215 & e.getUint32(r - 4)) == 9 && (f = 3);
                  i < r - 8;

                ) {
                  var p = t._parseObject(
                      new DataView(
                        e.buffer,
                        e.byteOffset + i,
                        e.byteLength - i - f
                      )
                    ),
                    g = p.size,
                    y = p.data;
                  if (p.isEnd) break;
                  (n[y.name] = y.value), (i += g);
                }
                i <= r - 3 && (16777215 & e.getUint32(i - 1)) === 9 && (i += 3);
                break;
              case 9:
                (n = void 0), (i = 1), (o = !0);
                break;
              case 10:
                n = [];
                var v = e.getUint32(1);
                i += 4;
                for (var b = 0; b < v; b++) {
                  var w = t._parseValue(
                      new DataView(e.buffer, e.byteOffset + i, e.byteLength - i)
                    ),
                    k = w.data,
                    D = w.size;
                  n.push(k), (i += D);
                }
                break;
              case 11:
                var $ = e.getFloat64(i) + 6e4 * e.getInt16(i + 8);
                (n = new Date($)), (i += 10);
                break;
              case 12:
                var N = e.getUint32(1);
                (i += 4),
                  (n = ""),
                  N > 0 &&
                    (n = RSe.decode(
                      new Uint8Array(e.buffer, e.byteOffset + i, N)
                    )),
                  (i += N);
                break;
              default:
                i = r;
            }
            return { data: n, size: i, isEnd: o };
          },
        },
        {
          key: "_parseString",
          value: function (e) {
            var n = e.getUint16(0),
              r = "";
            return (
              n > 0 &&
                (r = RSe.decode(new Uint8Array(e.buffer, e.byteOffset + 2, n))),
              { data: r, size: 2 + n }
            );
          },
        },
        {
          key: "_parseObject",
          value: function (e) {
            if (!(e.byteLength < 3)) {
              var n = t._parseString(e),
                r = t._parseValue(
                  new DataView(
                    e.buffer,
                    e.byteOffset + n.size,
                    e.byteLength - n.size
                  )
                );
              return {
                data: { name: n.data, value: r.data },
                size: n.size + r.size,
                isEnd: r.isEnd,
              };
            }
          },
        },
      ]),
      t
    );
  })(),
  Ey = { MP3: 2, G711A: 7, G711M: 8, AAC: 10, OPUS: 13 },
  e0 = new qU("FlvDemuxer"),
  QVe = (function () {
    function t(e, n, r) {
      hu(this, t),
        Xr(this, "_headerParsed", !1),
        Xr(this, "_remainingData", null),
        Xr(this, "_gopId", 0),
        Xr(this, "_needAddMetaBeforeKeyFrameNal", !0),
        (this.videoTrack = e || new kkn()),
        (this.audioTrack = n || new Ikn()),
        (this.metadataTrack = r || new Ckn()),
        (this._fixer = new Fkn(
          this.videoTrack,
          this.audioTrack,
          this.metadataTrack
        ));
    }
    return (
      fu(
        t,
        [
          {
            key: "demux",
            value: function (e) {
              var n,
                r =
                  arguments.length > 1 &&
                  arguments[1] !== void 0 &&
                  arguments[1],
                i =
                  !(arguments.length > 2 && arguments[2] !== void 0) ||
                  arguments[2],
                o = arguments.length > 3 ? arguments[3] : void 0,
                l = this.audioTrack,
                u = this.videoTrack,
                c = this.metadataTrack;
              if (
                ((!r && i) || (this._remainingData = null),
                r && (this._headerParsed = !1),
                r
                  ? (u.reset(), l.reset(), c.reset())
                  : ((u.samples = []),
                    (l.samples = []),
                    (c.seiSamples = []),
                    (c.flvScriptSamples = []),
                    (u.warnings = []),
                    (l.warnings = []),
                    this._remainingData &&
                      ((e = Vy(this._remainingData, e)),
                      (this._remainingData = null))),
                !e.length)
              )
                return { videoTrack: u, audioTrack: l, metadataTrack: c };
              var d = 0;
              if (!this._headerParsed) {
                if (!t.probe(e)) throw new Error("Invalid flv file");
                (l.present = (4 & e[4]) >>> 2 != 0),
                  (u.present = (1 & e[4]) != 0),
                  (this._headerParsed = !0),
                  (d = XF(e, 5) + 4);
              }
              for (
                var h, f, p, g, y, v = e.length;
                d + 15 < v &&
                ((h = e[d]),
                !(
                  d + 15 + (f = (e[d + 1] << 16) | (e[d + 2] << 8) | e[d + 3]) >
                  v
                ));

              )
                (p =
                  ((e[d + 7] << 24) >>> 0) +
                  (e[d + 4] << 16) +
                  (e[d + 5] << 8) +
                  e[d + 6]),
                  (d += 11),
                  (g = e.subarray(d, d + f)),
                  h === 8
                    ? this._parseAudio(g, p)
                    : h === 9
                    ? (o && (this.seamlessLoadingSwitching = !0),
                      this._parseVideo(g, p))
                    : h === 18
                    ? this._parseScript(g, p)
                    : e0.warn("Invalid tag type: ".concat(h)),
                  (y = XF(e, (d += f))) !== 11 + f &&
                    e0.warn(
                      "Invalid PrevTagSize ".concat(y, " (").concat(11 + f, ")")
                    ),
                  (d += 4);
              d < v && (this._remainingData = e.subarray(d)),
                (l.formatTimescale =
                  u.formatTimescale =
                  u.timescale =
                  c.timescale =
                    1e3),
                (l.timescale =
                  l.codecType === hc.OPUS ? 1e3 : l.sampleRate || 0),
                !l.exist() && l.hasSample() && l.reset(),
                !u.exist() && u.hasSample() && u.reset();
              var b = c.flvScriptSamples[c.flvScriptSamples.length - 1],
                w =
                  b == null || (n = b.data) === null || n === void 0
                    ? void 0
                    : n.onMetaData;
              return (
                w &&
                  (u != null &&
                    u.exist() &&
                    (w.hasOwnProperty("duration") &&
                      (u.duration = 1e3 * w.duration),
                    !u.width &&
                      w.hasOwnProperty("width") &&
                      (u.width = w.width),
                    !u.height &&
                      w.hasOwnProperty("height") &&
                      (u.height = w.height)),
                  l != null &&
                    l.exist() &&
                    w.hasOwnProperty("duration") &&
                    (l.duration = 1e3 * w.duration)),
                { videoTrack: u, audioTrack: l, metadataTrack: c }
              );
            },
          },
          {
            key: "fix",
            value: function (e, n, r) {
              return (
                this._fixer.fix(e, n, r),
                {
                  videoTrack: this.videoTrack,
                  audioTrack: this.audioTrack,
                  metadataTrack: this.metadataTrack,
                }
              );
            },
          },
          {
            key: "demuxAndFix",
            value: function (e, n, r, i, o) {
              return this.demux(e, n, r, o), this.fix(i, n, r);
            },
          },
          {
            key: "_parseAudio",
            value: function (e, n) {
              if (e.length) {
                var r = (240 & e[0]) >>> 4,
                  i = this.audioTrack;
                if (
                  r !== Ey.AAC &&
                  r !== Ey.G711A &&
                  r !== Ey.G711M &&
                  r !== Ey.OPUS
                )
                  return (
                    e0.warn("Unsupported sound format: ".concat(r)),
                    void i.reset()
                  );
                if (r !== Ey.AAC && r !== Ey.OPUS) {
                  var o = (12 & e[0]) >> 2,
                    l = (2 & e[0]) >> 1,
                    u = 1 & e[0];
                  (i.sampleRate = t.AUDIO_RATE[o]),
                    (i.sampleSize = l ? 16 : 8),
                    (i.channelCount = u + 1);
                }
                switch (r) {
                  case Ey.G711A:
                  case Ey.G711M:
                    this._parseG711(e, n, r);
                    break;
                  case Ey.AAC:
                    this._parseAac(e, n);
                    break;
                  case Ey.OPUS:
                    this._parseOpus(e, n);
                }
              }
            },
          },
          {
            key: "_parseOpus",
            value: function (e, n) {
              var r = this.audioTrack,
                i = e[1];
              switch (((r.codecType = hc.OPUS), i)) {
                case 0:
                  var o = hne.parseHeaderPackets(e.subarray(2));
                  o
                    ? ((r.codec = o.codec),
                      (r.channelCount = o.channelCount),
                      (r.sampleRate = o.sampleRate),
                      (r.config = o.config),
                      (r.sampleDuration = hne.getFrameDuration(
                        [],
                        r.timescale
                      )))
                    : (r.reset(),
                      e0.warn("Cannot parse AudioSpecificConfig", e));
                  break;
                case 1:
                  if (n == null) return;
                  var l = new HF(n, e.subarray(2), r.sampleDuration);
                  r.samples.push(l);
                  break;
                default:
                  e0.warn("Unknown OpusPacketType: ".concat(i));
              }
            },
          },
          {
            key: "_parseG711",
            value: function (e, n, r) {
              var i = this.audioTrack,
                o = e.subarray(1);
              if (!(o.byteLength < 1)) {
                var l = new HF(n, o);
                (i.codecType = r === 7 ? hc.G711PCMA : hc.G711PCMU),
                  (i.sampleRate = 8e3),
                  (i.codec = i.codecType),
                  i.samples.push(l);
              }
            },
          },
          {
            key: "_parseAac",
            value: function (e, n) {
              var r = this.audioTrack;
              if (((r.codecType = hc.AAC), e[1] === 0)) {
                var i = e8.parseAudioSpecificConfig(e.subarray(2));
                i
                  ? ((r.codec = i.codec),
                    (r.channelCount = i.channelCount),
                    (r.sampleRate = i.sampleRate),
                    (r.config = i.config),
                    (r.objectType = i.objectType),
                    (r.sampleRateIndex = i.samplingFrequencyIndex))
                  : (r.reset(), e0.warn("Cannot parse AudioSpecificConfig", e));
              } else if (e[1] === 1) {
                if (n == null) return;
                r.samples.push(new HF(n, e.subarray(2)));
              } else e0.warn("Unknown AACPacketType: ".concat(e[1]));
            },
          },
          {
            key: "_parseVideo",
            value: function (e, n) {
              var r = this;
              if (!(e.length < 6)) {
                var i = (240 & e[0]) >>> 4,
                  o = 15 & e[0],
                  l = this.videoTrack;
                if (o !== 7 && o !== 12)
                  return (
                    l.reset(), void e0.warn("Unsupported codecId: ".concat(o))
                  );
                var u = o === 12;
                l.codecType = u ? Yx.HEVC : Yx.AVC;
                var c = e[1],
                  d = (((e[2] << 16) | (e[3] << 8) | e[4]) << 8) >> 8;
                if (c === 0) {
                  var h = e.subarray(5),
                    f = u
                      ? Hkn.parseHEVCDecoderConfigurationRecord(h)
                      : Bkn.parseAVCDecoderConfigurationRecord(h);
                  if (f) {
                    var p = f.hvcC,
                      g = f.sps,
                      y = f.ppsArr,
                      v = f.spsArr,
                      b = f.vpsArr,
                      w = f.nalUnitSize;
                    p && (l.hvcC = l.hvcC || p),
                      g &&
                        ((l.codec = g.codec),
                        (l.width = g.width),
                        (l.height = g.height),
                        (l.sarRatio = g.sarRatio),
                        (l.fpsNum = g.fpsNum),
                        (l.fpsDen = g.fpsDen)),
                      v.length && (l.sps = v),
                      y.length && (l.pps = y),
                      b && b.length && (l.vps = b),
                      w && (l.nalUnitSize = w);
                  } else
                    e0.warn(
                      "Cannot parse ".concat(
                        u ? "HEVC" : "AVC",
                        "DecoderConfigurationRecord"
                      ),
                      e
                    );
                } else if (c === 1) {
                  var k = rI.parseAvcC(e.subarray(5), l.nalUnitSize);
                  if ((k = this._checkAddMetaNalToUnits(u, k, l)) && k.length) {
                    var D = new Dkn(n + d, n, k);
                    if (this.seamlessLoadingSwitching && n < l.lastKeyFrameDts)
                      return;
                    (this.seamlessLoadingSwitching = !1),
                      i === 1 && (D.setToKeyframe(), (l.lastKeyFrameDts = n)),
                      l.samples.push(D),
                      k.forEach(function ($) {
                        var N = u ? ($[0] >>> 1) & 63 : 31 & $[0];
                        switch (N) {
                          case 5:
                          case 16:
                          case 17:
                          case 18:
                          case 19:
                          case 20:
                          case 21:
                          case 22:
                          case 23:
                            if ((!u && N !== 5) || (u && N === 5)) break;
                            D.setToKeyframe();
                            break;
                          case 6:
                          case 39:
                          case 40:
                            if ((!u && N !== 6) || (u && N === 6)) break;
                            r.metadataTrack.seiSamples.push(
                              new Mkn(rI.parseSEI(rI.removeEPB($), u), n + d)
                            );
                        }
                      }),
                      D.keyframe && this._gopId++,
                      (D.gopId = this._gopId);
                  } else e0.warn("Cannot parse NALUs", e);
                } else c === 2 || e0.warn("Unknown AVCPacketType: ".concat(c));
              }
            },
          },
          {
            key: "_checkAddMetaNalToUnits",
            value: function (e, n, r) {
              return e && this._needAddMetaBeforeKeyFrameNal
                ? n
                    .map(function (i) {
                      return (i[0] >>> 1) & 63;
                    })
                    .includes(32)
                  ? ((this._needAddMetaBeforeKeyFrameNal = !1), n)
                  : (n.unshift(r.pps[0]),
                    n.unshift(r.sps[0]),
                    n.unshift(r.vps[0]),
                    n.filter(Boolean))
                : ((this._needAddMetaBeforeKeyFrameNal = !1), n);
            },
          },
          {
            key: "_parseScript",
            value: function (e, n) {
              this.metadataTrack.flvScriptSamples.push(
                new Pkn(Xkn.parse(e), n)
              );
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (e) {
              return (
                e[0] === 70 &&
                e[1] === 76 &&
                e[2] === 86 &&
                e[3] === 1 &&
                XF(e, 5) >= 9
              );
            },
          },
        ]
      ),
      t
    );
  })();
function Vkn(t) {
  for (
    var e = 0, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
    i < n;
    i++
  )
    r[i - 1] = arguments[i];
  r.forEach(function (u) {
    e += u.length;
  });
  var o = new t(e),
    l = 0;
  return (
    r.forEach(function (u) {
      o.set(u, l), (l += u.length);
    }),
    o
  );
}
Xr(QVe, "AUDIO_RATE", [5500, 11e3, 22e3, 44e3]);
var Xd = (function () {
    function t() {
      hu(this, t), (this.buffer = new Uint8Array(0));
    }
    return (
      fu(
        t,
        [
          {
            key: "write",
            value: function () {
              for (
                var e = this, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              r.forEach(function (o) {
                o
                  ? (e.buffer = Vkn(Uint8Array, e.buffer, o))
                  : window.console.warn(o);
              });
            },
          },
        ],
        [
          {
            key: "writeUint16",
            value: function (e) {
              return new Uint8Array([(e >> 8) & 255, 255 & e]);
            },
          },
          {
            key: "writeUint32",
            value: function (e) {
              return new Uint8Array([
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ]);
            },
          },
        ]
      ),
      t
    );
  })(),
  ASe = Math.pow(2, 32) - 1,
  co = (function () {
    function t() {
      hu(this, t);
    }
    return (
      fu(t, null, [
        {
          key: "box",
          value: function (e) {
            for (
              var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
              i < n;
              i++
            )
              r[i - 1] = arguments[i];
            var o =
                8 +
                (r = r.filter(Boolean)).reduce(function (c, d) {
                  return c + d.byteLength;
                }, 0),
              l = new Uint8Array(o);
            (l[0] = (o >> 24) & 255),
              (l[1] = (o >> 16) & 255),
              (l[2] = (o >> 8) & 255),
              (l[3] = 255 & o),
              l.set(e, 4);
            var u = 8;
            return (
              r.forEach(function (c) {
                l.set(c, u), (u += c.byteLength);
              }),
              l
            );
          },
        },
        {
          key: "ftyp",
          value: function (e) {
            return e.find(function (n) {
              return n.type === nI.VIDEO && n.codecType === Yx.HEVC;
            })
              ? t.FTYPHEV1
              : t.FTYPAVC1;
          },
        },
        {
          key: "initSegment",
          value: function (e) {
            return Vy(t.ftyp(e), t.moov(e));
          },
        },
        {
          key: "pssh",
          value: function (e) {
            var n = new Uint8Array(
              [1, 0, 0, 0].concat(
                [
                  16, 119, 239, 236, 192, 178, 77, 2, 172, 227, 60, 30, 82, 226,
                  251, 75,
                ],
                [0, 0, 0, 1],
                SSe(e.kid),
                [0, 0, 0, 0]
              )
            );
            return t.box(t.types.pssh, n);
          },
        },
        {
          key: "moov",
          value: function (e) {
            if (e[0].useEME && (e[0].encv || e[0].enca)) {
              e[0].pssh || (e[0].pssh = { kid: e[0].kid });
              var n = this.pssh(e[0].pssh);
              return t.box.apply(
                t,
                [
                  t.types.moov,
                  t.mvhd(
                    e[0].mvhdDurtion || e[0].duration,
                    e[0].mvhdTimecale || e[0].timescale
                  ),
                  t.mvex(e),
                ].concat(
                  Ty(
                    e.map(function (r) {
                      return t.trak(r);
                    })
                  ),
                  [n]
                )
              );
            }
            return t.box.apply(
              t,
              [
                t.types.moov,
                t.mvhd(
                  e[0].mvhdDurtion || e[0].duration,
                  e[0].mvhdTimecale || e[0].timescale
                ),
              ].concat(
                Ty(
                  e.map(function (r) {
                    return t.trak(r);
                  })
                ),
                [t.mvex(e)]
              )
            );
          },
        },
        {
          key: "mvhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mvhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                1,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                255,
                255,
                255,
                255,
              ])
            );
          },
        },
        {
          key: "trak",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.tkhdDuration || 0, e.width, e.height),
              t.mdia(e)
            );
          },
        },
        {
          key: "tkhd",
          value: function (e, n) {
            var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0,
              i =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : 0;
            return t.box(
              t.types.tkhd,
              new Uint8Array([
                0,
                0,
                0,
                7,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
                (i >> 8) & 255,
                255 & i,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "mdia",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minf(e)
            );
          },
        },
        {
          key: "mdhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mdhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                85,
                196,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "hdlr",
          value: function (e) {
            return t.box(t.types.hdlr, t.HDLR_TYPES[e]);
          },
        },
        {
          key: "minf",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === nI.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stbl(e)
            );
          },
        },
        {
          key: "stbl",
          value: function (e) {
            var n = [];
            return (
              e && e.ext && e.ext.stss && n.push(t.stss(e.ext.stss.entries)),
              t.box(
                t.types.stbl,
                t.stsd(e),
                t.STTS,
                n[0],
                t.STSC,
                t.STSZ,
                t.STCO
              )
            );
          },
        },
        {
          key: "stsd",
          value: function (e) {
            var n;
            return (
              (n =
                e.type === "audio"
                  ? e.useEME && e.enca
                    ? t.enca(e)
                    : e.codecType === hc.OPUS
                    ? t.opus(e)
                    : t.mp4a(e)
                  : e.useEME && e.encv
                  ? t.encv(e)
                  : e.av1C
                  ? t.av01(e)
                  : t.avc1hev1(e)),
              t.box(t.types.stsd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]), n)
            );
          },
        },
        {
          key: "enca",
          value: function (e) {
            var n = e.enca.channelCount,
              r = e.enca.sampleRate,
              i = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                n,
                0,
                16,
                0,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
              ]),
              o = t.esds(e.config),
              l = t.sinf(e.enca);
            return t.box(t.types.enca, i, o, l);
          },
        },
        {
          key: "encv",
          value: function (e) {
            var n,
              r,
              i = e.sps.length > 0 ? e.sps[0] : [],
              o = e.pps.length > 0 ? e.pps[0] : [],
              l = e.width,
              u = e.height,
              c = e.sarRatio[0],
              d = e.sarRatio[1],
              h = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (l >> 8) & 255,
                255 & l,
                (u >> 8) & 255,
                255 & u,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                18,
                100,
                97,
                105,
                108,
                121,
                109,
                111,
                116,
                105,
                111,
                110,
                47,
                104,
                108,
                115,
                46,
                106,
                115,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              f = new Uint8Array(
                (n = (r = [
                  1,
                  i[1],
                  i[2],
                  i[3],
                  255,
                  225,
                  (i.length >>> 8) & 255,
                  255 & i.length,
                ]).concat
                  .apply(r, Ty(i))
                  .concat([
                    1,
                    (o.length >>> 8) & 255,
                    255 & o.length,
                  ])).concat.apply(n, Ty(o))
              ),
              p = new Uint8Array([0, 0, 88, 57, 0, 15, 200, 192, 0, 4, 86, 72]),
              g = t.sinf(e.encv),
              y = new Uint8Array([
                c >> 24,
                (c >> 16) & 255,
                (c >> 8) & 255,
                255 & c,
                d >> 24,
                (d >> 16) & 255,
                (d >> 8) & 255,
                255 & d,
              ]);
            return t.box(
              t.types.encv,
              h,
              t.box(t.types.avcC, f),
              t.box(t.types.btrt, p),
              g,
              t.box(t.types.pasp, y)
            );
          },
        },
        {
          key: "schi",
          value: function (e) {
            var n = new Uint8Array([]),
              r = t.tenc(e);
            return t.box(t.types.schi, n, r);
          },
        },
        {
          key: "tenc",
          value: function (e) {
            var n = new Uint8Array(
              [
                0,
                0,
                0,
                0,
                0,
                0,
                255 & e.default_IsEncrypted,
                255 & e.default_IV_size,
              ].concat(SSe(e.default_KID))
            );
            return t.box(t.types.tenc, n);
          },
        },
        {
          key: "sinf",
          value: function (e) {
            var n = new Uint8Array([]),
              r = new Uint8Array([
                e.data_format.charCodeAt(0),
                e.data_format.charCodeAt(1),
                e.data_format.charCodeAt(2),
                e.data_format.charCodeAt(3),
              ]),
              i = new Uint8Array([0, 0, 0, 0, 99, 101, 110, 99, 0, 1, 0, 0]),
              o = t.schi(e);
            return t.box(
              t.types.sinf,
              n,
              t.box(t.types.frma, r),
              t.box(t.types.schm, i),
              o
            );
          },
        },
        {
          key: "av01",
          value: function (e) {
            return t.box(
              t.types.av01,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (e.width >> 8) & 255,
                255 & e.width,
                (e.height >> 8) & 255,
                255 & e.height,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              e.av1C,
              e.colr
            );
          },
        },
        {
          key: "avc1hev1",
          value: function (e) {
            var n = e.codecType === Yx.HEVC,
              r = n ? t.types.hvc1 : t.types.avc1,
              i = n ? t.hvcC(e) : t.avcC(e),
              o = [
                new Uint8Array([
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  (e.width >> 8) & 255,
                  255 & e.width,
                  (e.height >> 8) & 255,
                  255 & e.height,
                  0,
                  72,
                  0,
                  0,
                  0,
                  72,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  24,
                  17,
                  17,
                ]),
                i,
              ];
            return (
              n
                ? o.push(t.box(t.types.fiel, new Uint8Array([1, 0])))
                : e.sarRatio &&
                  e.sarRatio.length > 1 &&
                  o.push(t.pasp(e.sarRatio)),
              t.box.apply(t, [r].concat(o))
            );
          },
        },
        {
          key: "avcC",
          value: function (e) {
            var n,
              r,
              i,
              o = [],
              l = [];
            return (
              e.sps.forEach(function (u) {
                (i = u.byteLength),
                  o.push((i >>> 8) & 255),
                  o.push(255 & i),
                  o.push.apply(o, Ty(u));
              }),
              e.pps.forEach(function (u) {
                (i = u.byteLength),
                  l.push((i >>> 8) & 255),
                  l.push(255 & i),
                  l.push.apply(l, Ty(u));
              }),
              t.box(
                t.types.avcC,
                new Uint8Array(
                  (n = (r = [
                    1,
                    o[3],
                    o[4],
                    o[5],
                    255,
                    224 | e.sps.length,
                  ]).concat
                    .apply(r, o)
                    .concat([e.pps.length])).concat.apply(n, l)
                )
              )
            );
          },
        },
        {
          key: "hvcC",
          value: function (e) {
            var n = e.hvcC;
            if (n instanceof ArrayBuffer || n instanceof Uint8Array) return n;
            var r,
              i = e.vps,
              o = e.sps,
              l = e.pps;
            if (n) {
              var u = n.generalProfileCompatibilityFlags,
                c = n.generalConstraintIndicatorFlags,
                d = (i.length && 1) + (o.length && 1) + (l.length && 1);
              r = [
                1,
                (n.generalProfileSpace << 6) |
                  (n.generalTierFlag << 5) |
                  n.generalProfileIdc,
                u >>> 24,
                u >>> 16,
                u >>> 8,
                u,
                c[0],
                c[1],
                c[2],
                c[3],
                c[4],
                c[5],
                n.generalLevelIdc,
                240,
                0,
                252,
                252 | n.chromaFormatIdc,
                248 | n.bitDepthLumaMinus8,
                248 | n.bitDepthChromaMinus8,
                0,
                0,
                (n.numTemporalLayers << 3) | (n.temporalIdNested << 2) | 3,
                d,
              ];
              var h = function (f) {
                var p;
                r.push(f.length >> 8, f.length), (p = r).push.apply(p, Ty(f));
              };
              i.length && (r.push(160, 0, i.length), i.forEach(h)),
                o.length && (r.push(161, 0, o.length), o.forEach(h)),
                l.length && (r.push(162, 0, l.length), l.forEach(h));
            } else
              r = [
                1, 1, 96, 0, 0, 0, 144, 0, 0, 0, 0, 0, 93, 240, 0, 252, 253,
                248, 248, 0, 0, 15, 3, 160, 0, 1, 0, 24, 64, 1, 12, 1, 255, 255,
                1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0, 0, 3, 0, 93, 153, 152, 9,
                161, 0, 1, 0, 45, 66, 1, 1, 1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0,
                0, 3, 0, 93, 160, 2, 128, 128, 45, 22, 89, 153, 164, 147, 43,
                154, 128, 128, 128, 130, 0, 0, 3, 0, 2, 0, 0, 3, 0, 50, 16, 162,
                0, 1, 0, 7, 68, 1, 193, 114, 180, 98, 64,
              ];
            return t.box(t.types.hvcC, new Uint8Array(r));
          },
        },
        {
          key: "pasp",
          value: function (e) {
            var n = _kn(e, 2),
              r = n[0],
              i = n[1];
            return t.box(
              t.types.pasp,
              new Uint8Array([
                r >> 24,
                (r >> 16) & 255,
                (r >> 8) & 255,
                255 & r,
                i >> 24,
                (i >> 16) & 255,
                (i >> 8) & 255,
                255 & i,
              ])
            );
          },
        },
        {
          key: "mp4a",
          value: function (e) {
            return t.box(
              t.types.mp4a,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                e.channelCount,
                0,
                16,
                0,
                0,
                0,
                0,
                (e.sampleRate >> 8) & 255,
                255 & e.sampleRate,
                0,
                0,
              ]),
              e.config.length ? t.esds(e.config) : void 0
            );
          },
        },
        {
          key: "esds",
          value: function (e) {
            var n = e.length;
            return t.box(
              t.types.esds,
              new Uint8Array(
                [
                  0,
                  0,
                  0,
                  0,
                  3,
                  23 + n,
                  0,
                  0,
                  0,
                  4,
                  15 + n,
                  64,
                  21,
                  0,
                  6,
                  0,
                  0,
                  0,
                  218,
                  192,
                  0,
                  0,
                  218,
                  192,
                  5,
                ]
                  .concat([n])
                  .concat(e)
                  .concat([6, 1, 2])
              )
            );
          },
        },
        {
          key: "opus",
          value: function (e) {
            var n = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                e.channelCount,
                0,
                16,
                0,
                0,
                0,
                0,
                (e.sampleRate >> 8) & 255,
                255 & e.sampleRate,
                0,
                0,
              ]),
              r = e.config.length ? t.dOps(e) : [];
            return t.box(t.types.Opus, n, r);
          },
        },
        {
          key: "dOps",
          value: function (e) {
            if (e.config)
              return (
                (e.config[4] = (e.sampleRate >>> 24) & 255),
                (e.config[5] = (e.sampleRate >>> 16) & 255),
                (e.config[6] = (e.sampleRate >>> 8) & 255),
                (e.config[7] = 255 & e.sampleRate),
                t.box(t.types.dOps, e.config)
              );
          },
        },
        {
          key: "mvex",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.mvex].concat(
                Ty(
                  e.map(function (n) {
                    return t.trex(n.id);
                  })
                )
              )
            );
          },
        },
        {
          key: "trex",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                1,
              ])
            );
          },
        },
        {
          key: "trex1",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                2,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "trex2",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                4,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "moof",
          value: function (e) {
            return t.box.apply(
              t,
              [
                t.types.moof,
                t.mfhd(e[0].samples ? e[0].samples[0].gopId : 0),
              ].concat(
                Ty(
                  e.map(function (n) {
                    return t.traf(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "mfhd",
          value: function (e) {
            return t.box(
              t.types.mfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "traf",
          value: function (e) {
            var n = t.tfhd(e.id),
              r = t.tfdt(e, e.baseMediaDecodeTime),
              i = 0;
            if (
              (e.isVideo &&
                e.videoSenc &&
                e.videoSenc.forEach(function (I) {
                  (i += 8),
                    I.subsamples &&
                      I.subsamples.length &&
                      ((i += 2), (i += 6 * I.subsamples.length));
                }),
              (e.videoSencLength = i),
              e.useEME && (e.isVideoEncryption || e.isAudioEncryption))
            ) {
              if (e.isVideoEncryption) {
                if (e.isVideo) {
                  var o = t.saiz(e),
                    l = t.saio(e),
                    u = t.trun1(e),
                    c = t.senc(e);
                  return t.box(t.types.traf, n, r, o, l, u, c);
                }
                if (e.isAudioEncryption) {
                  var d = t.sbgp(),
                    h = t.saiz(e),
                    f = t.saio(e),
                    p = t.senc(e),
                    g = t.trun1(e);
                  return t.box(t.types.traf, n, r, d, h, f, p, g);
                }
                var y = t.sbgp(),
                  v = t.trun1(e);
                return t.box(t.types.traf, n, r, y, v);
              }
              if (e.isVideo) {
                var b = t.trun1(e);
                return t.box(t.types.traf, n, r, b);
              }
              var w = t.sbgp(),
                k = t.saiz(e),
                D = t.saio(e),
                $ = t.senc(e),
                N = t.trun1(e);
              return t.box(t.types.traf, n, r, w, k, D, $, N);
            }
            var P = t.sdtp(e);
            return t.box(
              t.types.traf,
              n,
              r,
              P,
              t.trun(e.samples, P.byteLength + 76)
            );
          },
        },
        {
          key: "sdtp",
          value: function (e) {
            var n = new Xd();
            return (
              e.samples.forEach(function (r) {
                n.write(
                  new Uint8Array(e.isVideo ? [r.keyframe ? 32 : 16] : [16])
                );
              }),
              t.box(t.types.sdtp, this.extension(0, 0), n.buffer)
            );
          },
        },
        {
          key: "trun1",
          value: function (e) {
            var n = new Xd(),
              r = Xd.writeUint32(e.samples.length),
              i = null;
            if (e.isVideo) {
              var o = e.videoSencLength;
              (i = Xd.writeUint32(16 * e.samples.length + o + 149)),
                !e.isVideoEncryption &&
                  e.isAudioEncryption &&
                  (i = Xd.writeUint32(16 * e.samples.length + 92));
            } else {
              var l = 12 * e.samples.length + 124;
              e.isAudioEncryption &&
                (l = 12 * e.samples.length + 8 * e.audioSenc.length + 177),
                (i = Xd.writeUint32(l));
            }
            return (
              e.samples.forEach(function (u) {
                n.write(Xd.writeUint32(u.duration)),
                  n.write(Xd.writeUint32(u.size)),
                  n.write(Xd.writeUint32(u.keyframe ? 33554432 : 65536)),
                  e.isVideo && n.write(Xd.writeUint32(u.cts ? u.cts : 0));
              }),
              t.box(t.types.trun, this.extension(0, e.flags), r, i, n.buffer)
            );
          },
        },
        {
          key: "senc",
          value: function (e) {
            var n = new Xd(),
              r = e.samples.length,
              i = e.isVideo ? 16 : 8,
              o = e.isVideo ? 2 : 0,
              l = [],
              u = 0;
            return (
              e.isVideo
                ? ((l = e.videoSenc), (u = e.videoSencLength))
                : (l = e.audioSenc),
              (u = u || i * r),
              n.write(
                Xd.writeUint32(16 + u),
                t.types.senc,
                this.extension(0, o)
              ),
              n.write(Xd.writeUint32(r)),
              l.forEach(function (c) {
                for (var d = 0; d < c.InitializationVector.length; d++)
                  n.write(new Uint8Array([c.InitializationVector[d]]));
                c.subsamples &&
                  c.subsamples.length &&
                  (n.write(Xd.writeUint16(c.subsamples.length)),
                  c.subsamples.forEach(function (h) {
                    n.write(Xd.writeUint16(h.BytesOfClearData)),
                      n.write(Xd.writeUint32(h.BytesOfProtectedData));
                  }));
              }),
              n.buffer
            );
          },
        },
        {
          key: "saio",
          value: function (e) {
            var n = 12 * e.samples.length + 141;
            !e.isVideo && e.isAudioEncryption && (n = 149);
            var r = new Uint8Array([
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              0,
              0,
              0,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
            return t.box(t.types.saio, r);
          },
        },
        {
          key: "saiz",
          value: function (e) {
            var n = e.samples.length,
              r = new Uint8Array([
                0,
                0,
                0,
                0,
                16,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
              ]);
            return t.box(t.types.saiz, r);
          },
        },
        {
          key: "sbgp",
          value: function () {
            var e = new Uint8Array([
              114, 111, 108, 108, 0, 0, 0, 1, 0, 0, 1, 25, 0, 0, 0, 1,
            ]);
            return t.box(t.types.sbgp, this.extension(0, 0), e);
          },
        },
        {
          key: "extension",
          value: function (e, n) {
            return new Uint8Array([
              e,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
          },
        },
        {
          key: "tfhd",
          value: function (e) {
            return t.box(
              t.types.tfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "tfdt",
          value: function (e, n) {
            var r = Math.floor(n / (ASe + 1)),
              i = Math.floor(n % (ASe + 1));
            return e.useEME && (e.isVideoEncryption || e.isAudioEncryption)
              ? t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                )
              : t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    1,
                    0,
                    0,
                    0,
                    r >> 24,
                    (r >> 16) & 255,
                    (r >> 8) & 255,
                    255 & r,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                );
          },
        },
        {
          key: "trun",
          value: function (e, n) {
            var r = e.length,
              i = 12 + 16 * r;
            n += 8 + i;
            var o = new Uint8Array(i);
            o.set(
              [
                0,
                0,
                15,
                1,
                (r >>> 24) & 255,
                (r >>> 16) & 255,
                (r >>> 8) & 255,
                255 & r,
                (n >>> 24) & 255,
                (n >>> 16) & 255,
                (n >>> 8) & 255,
                255 & n,
              ],
              0
            );
            for (var l = 0; l < r; l++) {
              var u = e[l],
                c = u.duration,
                d = u.size,
                h = u.flag,
                f = h === void 0 ? {} : h,
                p = u.cts,
                g = p === void 0 ? 0 : p;
              o.set(
                [
                  (c >>> 24) & 255,
                  (c >>> 16) & 255,
                  (c >>> 8) & 255,
                  255 & c,
                  (d >>> 24) & 255,
                  (d >>> 16) & 255,
                  (d >>> 8) & 255,
                  255 & d,
                  (f.isLeading << 2) |
                    (f.dependsOn === null || f.dependsOn === void 0
                      ? 1
                      : f.dependsOn),
                  (f.isDependedOn << 6) |
                    (f.hasRedundancy << 4) |
                    (f.paddingValue << 1) |
                    (f.isNonSyncSample === null || f.isNonSyncSample === void 0
                      ? 1
                      : f.isNonSyncSample),
                  61440 & f.degradationPriority,
                  15 & f.degradationPriority,
                  (g >>> 24) & 255,
                  (g >>> 16) & 255,
                  (g >>> 8) & 255,
                  255 & g,
                ],
                12 + 16 * l
              );
            }
            return t.box(t.types.trun, o);
          },
        },
        {
          key: "moovMP4",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.moov, t.mvhd(e[0].duration, e[0].timescale)].concat(
                Ty(
                  e.map(function (n) {
                    return t.trackMP4(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "trackMP4",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.duration, e.width, e.height),
              t.mdiaMP4(e)
            );
          },
        },
        {
          key: "mdiaMP4",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minfMP4(e)
            );
          },
        },
        {
          key: "minfMP4",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === nI.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stblMP4(e)
            );
          },
        },
        {
          key: "stblMP4",
          value: function (e) {
            var n = e.ext,
              r = [
                t.stsd(e),
                t.stts(n.stts),
                t.stsc(n.stsc),
                t.stsz(n.stsz),
                t.stco(n.stco),
              ];
            return (
              n.stss.length && r.push(t.stss(n.stss)),
              n.ctts.length && r.push(t.ctts(n.ctts)),
              t.box.apply(t, [t.types.stbl].concat(r))
            );
          },
        },
        {
          key: "stts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.stts,
                Vy(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsc",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(12 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.firstChunk,
                  u = o.samplesPerChunk,
                  c = o.sampleDescIndex;
                r.set(
                  [
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    c >> 24,
                    (c >> 16) & 255,
                    (c >> 8) & 255,
                    255 & c,
                  ],
                  i
                ),
                  (i += 12);
              }),
              t.box(
                t.types.stsc,
                Vy(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsz",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stsz,
                Vy(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stco",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stco,
                Vy(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stss",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stss,
                Vy(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "ctts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.ctts,
                Vy(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "styp",
          value: function () {
            return t.box(
              t.types.styp,
              new Uint8Array([
                109, 115, 100, 104, 0, 0, 0, 0, 109, 115, 100, 104, 109, 115,
                105, 120,
              ])
            );
          },
        },
        {
          key: "sidx",
          value: function (e) {
            var n = e.timescale,
              r = e.samples[0].duration,
              i = r * e.samples.length,
              o = e.samples[0].sampleOffset * r,
              l = 8;
            e.samples.forEach(function (f) {
              l += f.size;
            });
            var u = 0;
            if (e.isVideo) {
              var c,
                d = 0;
              e.videoSenc && (c = e.videoSenc),
                e.isVideo &&
                  c.forEach(function (f) {
                    (d += 8),
                      f.subsamples &&
                        f.subsamples.length &&
                        ((d += 2), (d += 6 * f.subsamples.length));
                  }),
                (e.videoSencLength = d),
                (u = l + 141 + 16 * e.samples.length + d),
                e.useEME &&
                  e.isAudioEncryption &&
                  !e.isVideoEncryption &&
                  (u = l + 16 * e.samples.length + 84);
            } else
              (u = l + 116 + 12 * e.samples.length),
                e.useEME &&
                  e.isAudioEncryption &&
                  (u =
                    l + 169 + 12 * e.samples.length + 8 * e.audioSenc.length);
            var h = new Uint8Array([
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              255 & e.id,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
              (o >> 24) & 255,
              (o >> 16) & 255,
              (o >> 8) & 255,
              255 & o,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              (u >> 16) & 255,
              (u >> 8) & 255,
              255 & u,
              (i >> 24) & 255,
              (i >> 16) & 255,
              (i >> 8) & 255,
              255 & i,
              144,
              0,
              0,
              0,
            ]);
            return t.box(t.types.sidx, h);
          },
        },
        {
          key: "mdat",
          value: function (e) {
            return t.box(t.types.mdat, e);
          },
        },
      ]),
      t
    );
  })();
Xr(
  co,
  "types",
  [
    "Opus",
    "dOps",
    "av01",
    "av1C",
    "avc1",
    "avcC",
    "hvc1",
    "hvcC",
    "dinf",
    "dref",
    "esds",
    "ftyp",
    "hdlr",
    "mdat",
    "mdhd",
    "mdia",
    "mfhd",
    "minf",
    "moof",
    "moov",
    "mp4a",
    "mvex",
    "mvhd",
    "pasp",
    "stbl",
    "stco",
    "stsc",
    "stsd",
    "stsz",
    "stts",
    "tfdt",
    "tfhd",
    "traf",
    "trak",
    "trex",
    "tkhd",
    "vmhd",
    "smhd",
    "ctts",
    "stss",
    "styp",
    "pssh",
    "sidx",
    "sbgp",
    "saiz",
    "saio",
    "senc",
    "trun",
    "encv",
    "enca",
    "sinf",
    "btrt",
    "frma",
    "tenc",
    "schm",
    "schi",
    "mehd",
    "fiel",
    "sdtp",
  ].reduce(function (t, e) {
    return (
      (t[e] = [
        e.charCodeAt(0),
        e.charCodeAt(1),
        e.charCodeAt(2),
        e.charCodeAt(3),
      ]),
      t
    );
  }, Object.create(null))
),
  Xr(co, "HDLR_TYPES", {
    video: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
    audio: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
  }),
  Xr(
    co,
    "FTYPAVC1",
    co.box(
      co.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 97, 118, 99, 49,
      ])
    )
  ),
  Xr(
    co,
    "FTYPHEV1",
    co.box(
      co.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 104, 101, 118, 49,
      ])
    )
  ),
  Xr(
    co,
    "DINF",
    co.box(
      co.types.dinf,
      co.box(
        co.types.dref,
        new Uint8Array([
          0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1,
        ])
      )
    )
  ),
  Xr(
    co,
    "VMHD",
    co.box(co.types.vmhd, new Uint8Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  Xr(
    co,
    "SMHD",
    co.box(co.types.smhd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  Xr(co, "StblTable", new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0])),
  Xr(co, "STTS", co.box(co.types.stts, co.StblTable)),
  Xr(co, "STSC", co.box(co.types.stsc, co.StblTable)),
  Xr(
    co,
    "STSZ",
    co.box(co.types.stsz, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  Xr(co, "STCO", co.box(co.types.stco, co.StblTable));
var JVe = (function () {
  function t(e, n) {
    hu(this, t),
      (this.name = e || ""),
      (this._prefix = "[".concat(this.name, "]")),
      (t.disabled = n);
  }
  return (
    fu(
      t,
      [
        {
          key: "debug",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).debug.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "log",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).log.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "warn",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).warn.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "error",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).error.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "table",
          value: function () {
            var e;
            t.disabled ||
              (console.group(this._prefix),
              (e = console).table.apply(e, arguments),
              console.groupEnd());
          },
        },
      ],
      [
        {
          key: "enable",
          value: function () {
            t.disabled = !1;
          },
        },
        {
          key: "disable",
          value: function () {
            t.disabled = !0;
          },
        },
      ]
    ),
    t
  );
})();
Xr(JVe, "disabled", !0);
var zkn = (function () {
  function t(e, n, r) {
    hu(this, t), (this.videoTrack = e), (this.audioTrack = n);
    var i = /Chrome\/([^.]+)/.exec(navigator.userAgent);
    (this.forceFirstIDR = i && Number(i[1]) < 50),
      (this.log = new JVe("FMP4Remuxer", !r || !r.openLog || !r.openLog));
  }
  return (
    fu(t, [
      {
        key: "remux",
        value: function () {
          var e,
            n,
            r,
            i,
            o,
            l = arguments.length > 0 && arguments[0] !== void 0 && arguments[0],
            u =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : {},
            c = this.videoTrack,
            d = this.audioTrack,
            h = c.exist(),
            f = d.exist(),
            p = [];
          return (
            l &&
              (u && u.initMerge
                ? (h && p.push(this.videoTrack),
                  f && p.push(this.audioTrack),
                  (r = co.initSegment(p)))
                : (h && (e = co.initSegment([this.videoTrack])),
                  f && (n = co.initSegment([this.audioTrack])))),
            h && c.hasSample() && (i = this._remuxVideo()),
            f && d.hasSample() && (o = this._remuxAudio()),
            (c.samples = []),
            (d.samples = []),
            {
              initSegment: r,
              videoInitSegment: e,
              audioInitSegment: n,
              videoSegment: i,
              audioSegment: o,
            }
          );
        },
      },
      {
        key: "_remuxVideo",
        value: function () {
          var e = this.videoTrack;
          this.forceFirstIDR &&
            (e.samples[0].flag = { dependsOn: 2, isNonSyncSample: 0 });
          var n = e.samples,
            r = /av01/.test(e.codec),
            i = 0;
          r
            ? n.forEach(function (w) {
                i += w.data.byteLength;
              })
            : n.forEach(function (w) {
                (i += w.units.reduce(function (k, D) {
                  return k + D.byteLength;
                }, 0)),
                  (i += 4 * w.units.length);
              });
          var o = new Uint8Array(i);
          if (r)
            for (var l, u = 0, c = n.length, d = 0; u < c; u++)
              (l = n[u]),
                o.set(l.data, d),
                (l.size = l.data.byteLength),
                (d += l.size);
          else
            for (
              var h,
                f = new DataView(o.buffer),
                p = function (w, k) {
                  k = n[g];
                  var D = 0;
                  k.units.forEach(function ($) {
                    f.setUint32(w, $.byteLength),
                      (w += 4),
                      o.set($, w),
                      (w += $.byteLength),
                      (D += 4 + $.byteLength);
                  }),
                    (k.size = D),
                    (v = w),
                    (h = k);
                },
                g = 0,
                y = n.length,
                v = 0;
              g < y;
              g++
            )
              p(v, h);
          var b = co.mdat(o);
          return Vy(co.moof([e]), b);
        },
      },
      {
        key: "_remuxAudio",
        value: function () {
          var e = this.audioTrack,
            n = new Uint8Array(
              e.samples.reduce(function (i, o) {
                return i + o.size;
              }, 0)
            );
          e.samples.reduce(function (i, o) {
            return n.set(o.data, i), i + o.size;
          }, 0);
          var r = co.mdat(n);
          return Vy(co.moof([e]), r);
        },
      },
      {
        key: "reset",
        value: function () {
          this.videoTrack.reset(), this.audioTrack.reset();
        },
      },
    ]),
    t
  );
})();
let Nh = class {
    static create(...t) {
      return new this(...t);
    }
    mixIn(t) {
      return Object.assign(this, t);
    }
    clone() {
      const t = new this.constructor();
      return Object.assign(t, this), t;
    }
  },
  Kp = class qVe extends Nh {
    constructor(e = [], n = 4 * e.length) {
      super();
      let r = e;
      if (
        (r instanceof ArrayBuffer && (r = new Uint8Array(r)),
        (r instanceof Int8Array ||
          r instanceof Uint8ClampedArray ||
          r instanceof Int16Array ||
          r instanceof Uint16Array ||
          r instanceof Int32Array ||
          r instanceof Uint32Array ||
          r instanceof Float32Array ||
          r instanceof Float64Array) &&
          (r = new Uint8Array(r.buffer, r.byteOffset, r.byteLength)),
        r instanceof Uint8Array)
      ) {
        const i = r.byteLength,
          o = [];
        for (let l = 0; l < i; l += 1) o[l >>> 2] |= r[l] << (24 - (l % 4) * 8);
        (this.words = o), (this.sigBytes = i);
      } else (this.words = e), (this.sigBytes = n);
    }
    static random(e) {
      const n = [],
        r = (i) => {
          let o = i,
            l = 987654321;
          const u = 4294967295;
          return () => {
            (l = (36969 * (65535 & l) + (l >> 16)) & u),
              (o = (18e3 * (65535 & o) + (o >> 16)) & u);
            let c = ((l << 16) + o) & u;
            return (
              (c /= 4294967296), (c += 0.5), c * (Math.random() > 0.5 ? 1 : -1)
            );
          };
        };
      for (let i, o = 0; o < e; o += 4) {
        const l = r(4294967296 * (i || Math.random()));
        (i = 987654071 * l()), n.push((4294967296 * l()) | 0);
      }
      return new qVe(n, e);
    }
    toString(e = pne) {
      return e.stringify(this);
    }
    concat(e) {
      const n = this.words,
        r = e.words,
        i = this.sigBytes,
        o = e.sigBytes;
      if ((this.clamp(), i % 4))
        for (let l = 0; l < o; l += 1) {
          const u = (r[l >>> 2] >>> (24 - (l % 4) * 8)) & 255;
          n[(i + l) >>> 2] |= u << (24 - ((i + l) % 4) * 8);
        }
      else for (let l = 0; l < o; l += 4) n[(i + l) >>> 2] = r[l >>> 2];
      return (this.sigBytes += o), this;
    }
    clamp() {
      const { words: e, sigBytes: n } = this;
      (e[n >>> 2] &= 4294967295 << (32 - (n % 4) * 8)),
        (e.length = Math.ceil(n / 4));
    }
    clone() {
      const e = super.clone.call(this);
      return (e.words = this.words.slice(0)), e;
    }
  };
const pne = {
    stringify(t) {
      const { words: e, sigBytes: n } = t,
        r = [];
      for (let i = 0; i < n; i += 1) {
        const o = (e[i >>> 2] >>> (24 - (i % 4) * 8)) & 255;
        r.push((o >>> 4).toString(16)), r.push((15 & o).toString(16));
      }
      return r.join("");
    },
    parse(t) {
      const e = t.length,
        n = [];
      for (let r = 0; r < e; r += 2)
        n[r >>> 3] |= parseInt(t.substr(r, 2), 16) << (24 - (r % 8) * 4);
      return new Kp(n, e / 2);
    },
  },
  wSe = {
    stringify(t) {
      const { words: e, sigBytes: n } = t,
        r = [];
      for (let i = 0; i < n; i += 1) {
        const o = (e[i >>> 2] >>> (24 - (i % 4) * 8)) & 255;
        r.push(String.fromCharCode(o));
      }
      return r.join("");
    },
    parse(t) {
      const e = t.length,
        n = [];
      for (let r = 0; r < e; r += 1)
        n[r >>> 2] |= (255 & t.charCodeAt(r)) << (24 - (r % 4) * 8);
      return new Kp(n, e);
    },
  },
  eze = {
    stringify(t) {
      try {
        return decodeURIComponent(escape(wSe.stringify(t)));
      } catch {
        throw new Error("Malformed UTF-8 data");
      }
    },
    parse: (t) => wSe.parse(unescape(encodeURIComponent(t))),
  };
let tze = class extends Nh {
    constructor() {
      super(), (this._minBufferSize = 0);
    }
    reset() {
      (this._data = new Kp()), (this._nDataBytes = 0);
    }
    _append(t) {
      let e = t;
      typeof e == "string" && (e = eze.parse(e)),
        this._data.concat(e),
        (this._nDataBytes += e.sigBytes);
    }
    _process(t) {
      let e;
      const { _data: n, blockSize: r } = this,
        i = n.words,
        o = n.sigBytes;
      let l = o / (4 * r);
      l = t ? Math.ceil(l) : Math.max((0 | l) - this._minBufferSize, 0);
      const u = l * r,
        c = Math.min(4 * u, o);
      if (u) {
        for (let d = 0; d < u; d += r) this._doProcessBlock(i, d);
        (e = i.splice(0, u)), (n.sigBytes -= c);
      }
      return new Kp(e, c);
    }
    clone() {
      const t = super.clone.call(this);
      return (t._data = this._data.clone()), t;
    }
  },
  jkn = class extends tze {
    constructor(t) {
      super(),
        (this.blockSize = 16),
        (this.cfg = Object.assign(new Nh(), t)),
        this.reset();
    }
    static _createHelper(t) {
      return (e, n) => new t(n).finalize(e);
    }
    static _createHmacHelper(t) {
      return (e, n) => new Wkn(t, n).finalize(e);
    }
    reset() {
      super.reset.call(this), this._doReset();
    }
    update(t) {
      return this._append(t), this._process(), this;
    }
    finalize(t) {
      return t && this._append(t), this._doFinalize();
    }
  },
  Wkn = class extends Nh {
    constructor(t, e) {
      super();
      const n = new t();
      this._hasher = n;
      let r = e;
      typeof r == "string" && (r = eze.parse(r));
      const i = n.blockSize,
        o = 4 * i;
      r.sigBytes > o && (r = n.finalize(e)), r.clamp();
      const l = r.clone();
      this._oKey = l;
      const u = r.clone();
      this._iKey = u;
      const c = l.words,
        d = u.words;
      for (let h = 0; h < i; h += 1) (c[h] ^= 1549556828), (d[h] ^= 909522486);
      (l.sigBytes = o), (u.sigBytes = o), this.reset();
    }
    reset() {
      const t = this._hasher;
      t.reset(), t.update(this._iKey);
    }
    update(t) {
      return this._hasher.update(t), this;
    }
    finalize(t) {
      const e = this._hasher,
        n = e.finalize(t);
      return e.reset(), e.finalize(this._oKey.clone().concat(n));
    }
  };
const Kkn = (t, e, n) => {
    const r = [];
    let i = 0;
    for (let o = 0; o < e; o += 1)
      if (o % 4) {
        const l =
          (n[t.charCodeAt(o - 1)] << ((o % 4) * 2)) |
          (n[t.charCodeAt(o)] >>> (6 - (o % 4) * 2));
        (r[i >>> 2] |= l << (24 - (i % 4) * 8)), (i += 1);
      }
    return Kp.create(r, i);
  },
  kSe = {
    stringify(t) {
      const { words: e, sigBytes: n } = t,
        r = this._map;
      t.clamp();
      const i = [];
      for (let l = 0; l < n; l += 3) {
        const u =
          (((e[l >>> 2] >>> (24 - (l % 4) * 8)) & 255) << 16) |
          (((e[(l + 1) >>> 2] >>> (24 - ((l + 1) % 4) * 8)) & 255) << 8) |
          ((e[(l + 2) >>> 2] >>> (24 - ((l + 2) % 4) * 8)) & 255);
        for (let c = 0; c < 4 && l + 0.75 * c < n; c += 1)
          i.push(r.charAt((u >>> (6 * (3 - c))) & 63));
      }
      const o = r.charAt(64);
      if (o) for (; i.length % 4; ) i.push(o);
      return i.join("");
    },
    parse(t) {
      let e = t.length;
      const n = this._map;
      let r = this._reverseMap;
      if (!r) {
        (this._reverseMap = []), (r = this._reverseMap);
        for (let o = 0; o < n.length; o += 1) r[n.charCodeAt(o)] = o;
      }
      const i = n.charAt(64);
      if (i) {
        const o = t.indexOf(i);
        o !== -1 && (e = o);
      }
      return Kkn(t, e, r);
    },
    _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  },
  xi = [];
for (let t = 0; t < 64; t += 1)
  xi[t] = (4294967296 * Math.abs(Math.sin(t + 1))) | 0;
const Vd = (t, e, n, r, i, o, l) => {
    const u = t + ((e & n) | (~e & r)) + i + l;
    return ((u << o) | (u >>> (32 - o))) + e;
  },
  zd = (t, e, n, r, i, o, l) => {
    const u = t + ((e & r) | (n & ~r)) + i + l;
    return ((u << o) | (u >>> (32 - o))) + e;
  },
  jd = (t, e, n, r, i, o, l) => {
    const u = t + (e ^ n ^ r) + i + l;
    return ((u << o) | (u >>> (32 - o))) + e;
  },
  Wd = (t, e, n, r, i, o, l) => {
    const u = t + (n ^ (e | ~r)) + i + l;
    return ((u << o) | (u >>> (32 - o))) + e;
  };
class Zkn extends jkn {
  _doReset() {
    this._hash = new Kp([1732584193, 4023233417, 2562383102, 271733878]);
  }
  _doProcessBlock(e, n) {
    const r = e;
    for (let X = 0; X < 16; X += 1) {
      const G = n + X,
        H = e[G];
      r[G] =
        (16711935 & ((H << 8) | (H >>> 24))) |
        (4278255360 & ((H << 24) | (H >>> 8)));
    }
    const i = this._hash.words,
      o = r[n + 0],
      l = r[n + 1],
      u = r[n + 2],
      c = r[n + 3],
      d = r[n + 4],
      h = r[n + 5],
      f = r[n + 6],
      p = r[n + 7],
      g = r[n + 8],
      y = r[n + 9],
      v = r[n + 10],
      b = r[n + 11],
      w = r[n + 12],
      k = r[n + 13],
      D = r[n + 14],
      $ = r[n + 15];
    let N = i[0],
      P = i[1],
      I = i[2],
      O = i[3];
    (N = Vd(N, P, I, O, o, 7, xi[0])),
      (O = Vd(O, N, P, I, l, 12, xi[1])),
      (I = Vd(I, O, N, P, u, 17, xi[2])),
      (P = Vd(P, I, O, N, c, 22, xi[3])),
      (N = Vd(N, P, I, O, d, 7, xi[4])),
      (O = Vd(O, N, P, I, h, 12, xi[5])),
      (I = Vd(I, O, N, P, f, 17, xi[6])),
      (P = Vd(P, I, O, N, p, 22, xi[7])),
      (N = Vd(N, P, I, O, g, 7, xi[8])),
      (O = Vd(O, N, P, I, y, 12, xi[9])),
      (I = Vd(I, O, N, P, v, 17, xi[10])),
      (P = Vd(P, I, O, N, b, 22, xi[11])),
      (N = Vd(N, P, I, O, w, 7, xi[12])),
      (O = Vd(O, N, P, I, k, 12, xi[13])),
      (I = Vd(I, O, N, P, D, 17, xi[14])),
      (P = Vd(P, I, O, N, $, 22, xi[15])),
      (N = zd(N, P, I, O, l, 5, xi[16])),
      (O = zd(O, N, P, I, f, 9, xi[17])),
      (I = zd(I, O, N, P, b, 14, xi[18])),
      (P = zd(P, I, O, N, o, 20, xi[19])),
      (N = zd(N, P, I, O, h, 5, xi[20])),
      (O = zd(O, N, P, I, v, 9, xi[21])),
      (I = zd(I, O, N, P, $, 14, xi[22])),
      (P = zd(P, I, O, N, d, 20, xi[23])),
      (N = zd(N, P, I, O, y, 5, xi[24])),
      (O = zd(O, N, P, I, D, 9, xi[25])),
      (I = zd(I, O, N, P, c, 14, xi[26])),
      (P = zd(P, I, O, N, g, 20, xi[27])),
      (N = zd(N, P, I, O, k, 5, xi[28])),
      (O = zd(O, N, P, I, u, 9, xi[29])),
      (I = zd(I, O, N, P, p, 14, xi[30])),
      (P = zd(P, I, O, N, w, 20, xi[31])),
      (N = jd(N, P, I, O, h, 4, xi[32])),
      (O = jd(O, N, P, I, g, 11, xi[33])),
      (I = jd(I, O, N, P, b, 16, xi[34])),
      (P = jd(P, I, O, N, D, 23, xi[35])),
      (N = jd(N, P, I, O, l, 4, xi[36])),
      (O = jd(O, N, P, I, d, 11, xi[37])),
      (I = jd(I, O, N, P, p, 16, xi[38])),
      (P = jd(P, I, O, N, v, 23, xi[39])),
      (N = jd(N, P, I, O, k, 4, xi[40])),
      (O = jd(O, N, P, I, o, 11, xi[41])),
      (I = jd(I, O, N, P, c, 16, xi[42])),
      (P = jd(P, I, O, N, f, 23, xi[43])),
      (N = jd(N, P, I, O, y, 4, xi[44])),
      (O = jd(O, N, P, I, w, 11, xi[45])),
      (I = jd(I, O, N, P, $, 16, xi[46])),
      (P = jd(P, I, O, N, u, 23, xi[47])),
      (N = Wd(N, P, I, O, o, 6, xi[48])),
      (O = Wd(O, N, P, I, p, 10, xi[49])),
      (I = Wd(I, O, N, P, D, 15, xi[50])),
      (P = Wd(P, I, O, N, h, 21, xi[51])),
      (N = Wd(N, P, I, O, w, 6, xi[52])),
      (O = Wd(O, N, P, I, c, 10, xi[53])),
      (I = Wd(I, O, N, P, v, 15, xi[54])),
      (P = Wd(P, I, O, N, l, 21, xi[55])),
      (N = Wd(N, P, I, O, g, 6, xi[56])),
      (O = Wd(O, N, P, I, $, 10, xi[57])),
      (I = Wd(I, O, N, P, f, 15, xi[58])),
      (P = Wd(P, I, O, N, k, 21, xi[59])),
      (N = Wd(N, P, I, O, d, 6, xi[60])),
      (O = Wd(O, N, P, I, b, 10, xi[61])),
      (I = Wd(I, O, N, P, u, 15, xi[62])),
      (P = Wd(P, I, O, N, y, 21, xi[63])),
      (i[0] = (i[0] + N) | 0),
      (i[1] = (i[1] + P) | 0),
      (i[2] = (i[2] + I) | 0),
      (i[3] = (i[3] + O) | 0);
  }
  _doFinalize() {
    const e = this._data,
      n = e.words,
      r = 8 * this._nDataBytes,
      i = 8 * e.sigBytes;
    n[i >>> 5] |= 128 << (24 - (i % 32));
    const o = Math.floor(r / 4294967296),
      l = r;
    (n[15 + (((i + 64) >>> 9) << 4)] =
      (16711935 & ((o << 8) | (o >>> 24))) |
      (4278255360 & ((o << 24) | (o >>> 8)))),
      (n[14 + (((i + 64) >>> 9) << 4)] =
        (16711935 & ((l << 8) | (l >>> 24))) |
        (4278255360 & ((l << 24) | (l >>> 8)))),
      (e.sigBytes = 4 * (n.length + 1)),
      this._process();
    const u = this._hash,
      c = u.words;
    for (let d = 0; d < 4; d += 1) {
      const h = c[d];
      c[d] =
        (16711935 & ((h << 8) | (h >>> 24))) |
        (4278255360 & ((h << 24) | (h >>> 8)));
    }
    return u;
  }
  clone() {
    const e = super.clone.call(this);
    return (e._hash = this._hash.clone()), e;
  }
}
class Ykn extends Nh {
  constructor(e) {
    super(),
      (this.cfg = Object.assign(
        new Nh(),
        { keySize: 4, hasher: Zkn, iterations: 1 },
        e
      ));
  }
  compute(e, n) {
    let r;
    const { cfg: i } = this,
      o = i.hasher.create(),
      l = Kp.create(),
      u = l.words,
      { keySize: c, iterations: d } = i;
    for (; u.length < c; ) {
      r && o.update(r), (r = o.update(e).finalize(n)), o.reset();
      for (let h = 1; h < d; h += 1) (r = o.finalize(r)), o.reset();
      l.concat(r);
    }
    return (l.sigBytes = 4 * c), l;
  }
}
class yC extends tze {
  constructor(e, n, r) {
    super(),
      (this.cfg = Object.assign(new Nh(), r)),
      (this._xformMode = e),
      (this._key = n),
      this.reset();
  }
  static createEncryptor(e, n) {
    return this.create(this._ENC_XFORM_MODE, e, n);
  }
  static createDecryptor(e, n) {
    return this.create(this._DEC_XFORM_MODE, e, n);
  }
  static _createHelper(e) {
    const n = (r) => (typeof r == "string" ? ize : iI);
    return {
      encrypt: (r, i, o) => n(i).encrypt(e, r, i, o),
      decrypt: (r, i, o) => n(i).decrypt(e, r, i, o),
    };
  }
  reset() {
    super.reset.call(this), this._doReset();
  }
  process(e) {
    return this._append(e), this._process();
  }
  finalize(e) {
    return e && this._append(e), this._doFinalize();
  }
}
(yC._ENC_XFORM_MODE = 1),
  (yC._DEC_XFORM_MODE = 2),
  (yC.keySize = 4),
  (yC.ivSize = 4);
class nze extends Nh {
  constructor(e, n) {
    super(), (this._cipher = e), (this._iv = n);
  }
  static createEncryptor(e, n) {
    return this.Encryptor.create(e, n);
  }
  static createDecryptor(e, n) {
    return this.Decryptor.create(e, n);
  }
}
function ISe(t, e, n) {
  const r = t;
  let i;
  const o = this._iv;
  o ? ((i = o), (this._iv = void 0)) : (i = this._prevBlock);
  for (let l = 0; l < n; l += 1) r[e + l] ^= i[l];
}
class vC extends nze {}
(vC.Encryptor = class extends vC {
  processBlock(t, e) {
    const n = this._cipher,
      { blockSize: r } = n;
    ISe.call(this, t, e, r),
      n.encryptBlock(t, e),
      (this._prevBlock = t.slice(e, e + r));
  }
}),
  (vC.Decryptor = class extends vC {
    processBlock(t, e) {
      const n = this._cipher,
        { blockSize: r } = n,
        i = t.slice(e, e + r);
      n.decryptBlock(t, e), ISe.call(this, t, e, r), (this._prevBlock = i);
    }
  });
const Qkn = {
  pad(t, e) {
    const n = 4 * e,
      r = n - (t.sigBytes % n),
      i = (r << 24) | (r << 16) | (r << 8) | r,
      o = [];
    for (let u = 0; u < r; u += 4) o.push(i);
    const l = Kp.create(o, r);
    t.concat(l);
  },
  unpad(t) {
    const e = t,
      n = 255 & e.words[(e.sigBytes - 1) >>> 2];
    e.sigBytes -= n;
  },
};
class rze extends yC {
  constructor(e, n, r) {
    super(e, n, Object.assign({ mode: vC, padding: Qkn }, r)),
      (this.blockSize = 4);
  }
  reset() {
    let e;
    super.reset.call(this);
    const { cfg: n } = this,
      { iv: r, mode: i } = n;
    this._xformMode === this.constructor._ENC_XFORM_MODE
      ? (e = i.createEncryptor)
      : ((e = i.createDecryptor), (this._minBufferSize = 1)),
      (this._mode = e.call(i, this, r && r.words)),
      (this._mode.__creator = e);
  }
  _doProcessBlock(e, n) {
    this._mode.processBlock(e, n);
  }
  _doFinalize() {
    let e;
    const { padding: n } = this.cfg;
    return (
      this._xformMode === this.constructor._ENC_XFORM_MODE
        ? (n.pad(this._data, this.blockSize), (e = this._process(!0)))
        : ((e = this._process(!0)), n.unpad(e)),
      e
    );
  }
}
class DB extends Nh {
  constructor(e) {
    super(), this.mixIn(e);
  }
  toString(e) {
    return (e || this.formatter).stringify(this);
  }
}
const Jkn = {
  stringify(t) {
    let e;
    const { ciphertext: n, salt: r } = t;
    return (
      (e = r ? Kp.create([1398893684, 1701076831]).concat(r).concat(n) : n),
      e.toString(kSe)
    );
  },
  parse(t) {
    let e;
    const n = kSe.parse(t),
      r = n.words;
    return (
      r[0] === 1398893684 &&
        r[1] === 1701076831 &&
        ((e = Kp.create(r.slice(2, 4))), r.splice(0, 4), (n.sigBytes -= 16)),
      DB.create({ ciphertext: n, salt: e })
    );
  },
};
class iI extends Nh {
  static encrypt(e, n, r, i) {
    const o = Object.assign(new Nh(), this.cfg, i),
      l = e.createEncryptor(r, o),
      u = l.finalize(n),
      c = l.cfg;
    return DB.create({
      ciphertext: u,
      key: r,
      iv: c.iv,
      algorithm: e,
      mode: c.mode,
      padding: c.padding,
      blockSize: l.blockSize,
      formatter: o.format,
    });
  }
  static decrypt(e, n, r, i) {
    let o = n;
    const l = Object.assign(new Nh(), this.cfg, i);
    return (
      (o = this._parse(o, l.format)),
      e.createDecryptor(r, l).finalize(o.ciphertext)
    );
  }
  static _parse(e, n) {
    return typeof e == "string" ? n.parse(e, this) : e;
  }
}
iI.cfg = Object.assign(new Nh(), { format: Jkn });
const qkn = {
  execute(t, e, n, r) {
    let i = r;
    i || (i = Kp.random(8));
    const o = Ykn.create({ keySize: e + n }).compute(t, i),
      l = Kp.create(o.words.slice(e), 4 * n);
    return (o.sigBytes = 4 * e), DB.create({ key: o, iv: l, salt: i });
  },
};
class ize extends iI {
  static encrypt(e, n, r, i) {
    const o = Object.assign(new Nh(), this.cfg, i),
      l = o.kdf.execute(r, e.keySize, e.ivSize);
    o.iv = l.iv;
    const u = iI.encrypt.call(this, e, n, l.key, o);
    return u.mixIn(l), u;
  }
  static decrypt(e, n, r, i) {
    let o = n;
    const l = Object.assign(new Nh(), this.cfg, i);
    o = this._parse(o, l.format);
    const u = l.kdf.execute(r, e.keySize, e.ivSize, o.salt);
    return (l.iv = u.iv), iI.decrypt.call(this, e, o, u.key, l);
  }
}
ize.cfg = Object.assign(iI.cfg, { kdf: qkn });
const cf = [],
  aze = [],
  oze = [],
  sze = [],
  lze = [],
  uze = [],
  gne = [],
  mne = [],
  yne = [],
  vne = [],
  $y = [];
for (let t = 0; t < 256; t += 1) $y[t] = t < 128 ? t << 1 : (t << 1) ^ 283;
let t0 = 0,
  u1 = 0;
for (let t = 0; t < 256; t += 1) {
  let e = u1 ^ (u1 << 1) ^ (u1 << 2) ^ (u1 << 3) ^ (u1 << 4);
  (e = (e >>> 8) ^ (255 & e) ^ 99), (cf[t0] = e), (aze[e] = t0);
  const n = $y[t0],
    r = $y[n],
    i = $y[r];
  let o = (257 * $y[e]) ^ (16843008 * e);
  (oze[t0] = (o << 24) | (o >>> 8)),
    (sze[t0] = (o << 16) | (o >>> 16)),
    (lze[t0] = (o << 8) | (o >>> 24)),
    (uze[t0] = o),
    (o = (16843009 * i) ^ (65537 * r) ^ (257 * n) ^ (16843008 * t0)),
    (gne[e] = (o << 24) | (o >>> 8)),
    (mne[e] = (o << 16) | (o >>> 16)),
    (yne[e] = (o << 8) | (o >>> 24)),
    (vne[e] = o),
    t0
      ? ((t0 = n ^ $y[$y[$y[i ^ n]]]), (u1 ^= $y[$y[u1]]))
      : ((u1 = 1), (t0 = u1));
}
const eIn = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54];
class cze extends rze {
  _doReset() {
    let e;
    if (this._nRounds && this._keyPriorReset === this._key) return;
    this._keyPriorReset = this._key;
    const n = this._keyPriorReset,
      r = n.words,
      i = n.sigBytes / 4;
    this._nRounds = i + 6;
    const o = 4 * (this._nRounds + 1);
    this._keySchedule = [];
    const l = this._keySchedule;
    for (let c = 0; c < o; c += 1)
      c < i
        ? (l[c] = r[c])
        : ((e = l[c - 1]),
          c % i
            ? i > 6 &&
              c % i == 4 &&
              (e =
                (cf[e >>> 24] << 24) |
                (cf[(e >>> 16) & 255] << 16) |
                (cf[(e >>> 8) & 255] << 8) |
                cf[255 & e])
            : ((e = (e << 8) | (e >>> 24)),
              (e =
                (cf[e >>> 24] << 24) |
                (cf[(e >>> 16) & 255] << 16) |
                (cf[(e >>> 8) & 255] << 8) |
                cf[255 & e]),
              (e ^= eIn[(c / i) | 0] << 24)),
          (l[c] = l[c - i] ^ e));
    this._invKeySchedule = [];
    const u = this._invKeySchedule;
    for (let c = 0; c < o; c += 1) {
      const d = o - c;
      (e = c % 4 ? l[d] : l[d - 4]),
        (u[c] =
          c < 4 || d <= 4
            ? e
            : gne[cf[e >>> 24]] ^
              mne[cf[(e >>> 16) & 255]] ^
              yne[cf[(e >>> 8) & 255]] ^
              vne[cf[255 & e]]);
    }
  }
  encryptBlock(e, n) {
    this._doCryptBlock(e, n, this._keySchedule, oze, sze, lze, uze, cf);
  }
  decryptBlock(e, n) {
    const r = e;
    let i = r[n + 1];
    (r[n + 1] = r[n + 3]),
      (r[n + 3] = i),
      this._doCryptBlock(r, n, this._invKeySchedule, gne, mne, yne, vne, aze),
      (i = r[n + 1]),
      (r[n + 1] = r[n + 3]),
      (r[n + 3] = i);
  }
  _doCryptBlock(e, n, r, i, o, l, u, c) {
    const d = e,
      h = this._nRounds;
    let f = d[n] ^ r[0],
      p = d[n + 1] ^ r[1],
      g = d[n + 2] ^ r[2],
      y = d[n + 3] ^ r[3],
      v = 4;
    for (let $ = 1; $ < h; $ += 1) {
      const N =
        i[f >>> 24] ^
        o[(p >>> 16) & 255] ^
        l[(g >>> 8) & 255] ^
        u[255 & y] ^
        r[v];
      v += 1;
      const P =
        i[p >>> 24] ^
        o[(g >>> 16) & 255] ^
        l[(y >>> 8) & 255] ^
        u[255 & f] ^
        r[v];
      v += 1;
      const I =
        i[g >>> 24] ^
        o[(y >>> 16) & 255] ^
        l[(f >>> 8) & 255] ^
        u[255 & p] ^
        r[v];
      v += 1;
      const O =
        i[y >>> 24] ^
        o[(f >>> 16) & 255] ^
        l[(p >>> 8) & 255] ^
        u[255 & g] ^
        r[v];
      (v += 1), (f = N), (p = P), (g = I), (y = O);
    }
    const b =
      ((c[f >>> 24] << 24) |
        (c[(p >>> 16) & 255] << 16) |
        (c[(g >>> 8) & 255] << 8) |
        c[255 & y]) ^
      r[v];
    v += 1;
    const w =
      ((c[p >>> 24] << 24) |
        (c[(g >>> 16) & 255] << 16) |
        (c[(y >>> 8) & 255] << 8) |
        c[255 & f]) ^
      r[v];
    v += 1;
    const k =
      ((c[g >>> 24] << 24) |
        (c[(y >>> 16) & 255] << 16) |
        (c[(f >>> 8) & 255] << 8) |
        c[255 & p]) ^
      r[v];
    v += 1;
    const D =
      ((c[y >>> 24] << 24) |
        (c[(f >>> 16) & 255] << 16) |
        (c[(p >>> 8) & 255] << 8) |
        c[255 & g]) ^
      r[v];
    (v += 1), (d[n] = b), (d[n + 1] = w), (d[n + 2] = k), (d[n + 3] = D);
  }
}
cze.keySize = 8;
const tIn = rze._createHelper(cze);
class bC extends nze {}
(bC.Encryptor = class extends bC {
  processBlock(t, e) {
    const n = t,
      r = this._cipher,
      { blockSize: i } = r,
      o = this._iv;
    let l = this._counter;
    o &&
      ((this._counter = o.slice(0)), (l = this._counter), (this._iv = void 0));
    const u = l.slice(0);
    r.encryptBlock(u, 0), (l[i - 1] = (l[i - 1] + 1) | 0);
    for (let c = 0; c < i; c += 1) n[e + c] ^= u[c];
  }
}),
  (bC.Decryptor = bC.Encryptor);
const nIn = { pad() {}, unpad() {} };
var rIn = (function () {
    function t() {
      w5(this, t),
        Mi(this, "_ttfb", 0),
        Mi(this, "_demuxStart", 0),
        Mi(this, "_demuxEnd", 0),
        Mi(this, "_demuxCost", 0),
        Mi(this, "_remuxStart", 0),
        Mi(this, "_remuxEnd", 0),
        Mi(this, "_remuxCost", 0),
        Mi(this, "_appendStart", 0),
        Mi(this, "_appendEnd", 0),
        Mi(this, "_appendCost", 0);
    }
    return (
      k5(t, [
        {
          key: "set",
          value: function (e, n) {
            this["_".concat(e)] = n;
          },
        },
        {
          key: "start",
          value: function (e) {
            this["_".concat(e, "Start")] = Date.now();
          },
        },
        {
          key: "end",
          value: function (e) {
            (this["_".concat(e, "End")] = Date.now()),
              (this["_".concat(e, "Cost")] =
                this["_".concat(e, "Cost")] +
                (this["_".concat(e, "End")] - this["_".concat(e, "Start")]));
          },
        },
        {
          key: "transferCost",
          get: function () {
            return {
              ttfbCost: this._ttfb,
              demuxCost: this._demuxCost,
              remuxCost: this._remuxCost,
              appendCost: this._appendCost,
            };
          },
        },
      ]),
      t
    );
  })(),
  Z2 = { TTFB: "ttfb", DEMUX: "demux", REMUX: "remux", APPEND: "append" },
  c1 = new sE("BufferService"),
  iIn = (function () {
    function t(u, c) {
      var d =
        arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
      w5(this, t),
        Mi(this, "flv", null),
        Mi(this, "_demuxer", new QVe()),
        Mi(this, "_remuxer", null),
        Mi(this, "_mse", null),
        Mi(this, "_softVideo", null),
        Mi(this, "_sourceCreated", !1),
        Mi(this, "_needInitSegment", !0),
        Mi(this, "_discontinuity", !0),
        Mi(this, "_contiguous", !1),
        Mi(this, "_initSegmentId", ""),
        Mi(this, "_cachedBuffer", null),
        Mi(this, "_demuxStartTime", 0),
        Mi(this, "_opts", null),
        (this.flv = u),
        (this._opts = d),
        c
          ? (this._softVideo = c)
          : ((this._remuxer = new zkn(
              this._demuxer.videoTrack,
              this._demuxer.audioTrack
            )),
            (this._mse = new Kx(null, {
              preferMMS:
                typeof d.preferMMS == "boolean" ? d.preferMMS : !!d.perferMMS,
            })),
            this._mse.bindMedia(u.media));
    }
    var e, n, r, i, o, l;
    return (
      k5(t, [
        {
          key: "baseDts",
          get: function () {
            var u, c;
            return (u = this._demuxer) === null ||
              u === void 0 ||
              (c = u._fixer) === null ||
              c === void 0
              ? void 0
              : c._baseDts;
          },
        },
        {
          key: "blobUrl",
          get: function () {
            var u;
            return (u = this._mse) === null || u === void 0 ? void 0 : u.url;
          },
        },
        {
          key: "isFull",
          value: function () {
            var u =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : Kx.VIDEO;
            return this._mse.isFull(u);
          },
        },
        {
          key: "seamlessSwitch",
          value: function () {
            (this._needInitSegment = !0),
              (this._discontinuity = !0),
              (this._contiguous = !0),
              (this._initSegmentId = "");
          },
        },
        {
          key: "unContiguous",
          value: function (u) {
            (this._contiguous = !1), (this._demuxStartTime = u);
          },
        },
        {
          key: "reset",
          value:
            ((l = Rd(
              Ko().mark(function u() {
                var c,
                  d = arguments;
                return Ko().wrap(
                  function (h) {
                    for (;;)
                      switch ((h.prev = h.next)) {
                        case 0:
                          if (
                            ((c = d.length > 0 && d[0] !== void 0 && d[0]),
                            !this._mse || c)
                          ) {
                            h.next = 6;
                            break;
                          }
                          return (h.next = 4), this._mse.unbindMedia();
                        case 4:
                          return (
                            (h.next = 6), this._mse.bindMedia(this.flv.media)
                          );
                        case 6:
                          (this._needInitSegment = !0),
                            (this._discontinuity = !0),
                            (this._contiguous = !1),
                            (this._sourceCreated = !1),
                            (this._initSegmentId = ""),
                            this.resetSeamlessSwitchStats();
                        case 12:
                        case "end":
                          return h.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function () {
              return l.apply(this, arguments);
            }),
        },
        {
          key: "resetSeamlessSwitchStats",
          value: function () {
            (this.seamlessLoadingSwitch = null),
              (this.seamlessLoadingSwitching = !1),
              this._demuxer && (this._demuxer.seamlessLoadingSwitching = !1);
          },
        },
        {
          key: "endOfStream",
          value:
            ((o = Rd(
              Ko().mark(function u() {
                return Ko().wrap(
                  function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          if (!this._mse) {
                            c.next = 7;
                            break;
                          }
                          if (!this._sourceCreated) {
                            c.next = 5;
                            break;
                          }
                          return (c.next = 4), this._mse.endOfStream();
                        case 4:
                          this.flv.emit(Vi.BUFFEREOS);
                        case 5:
                          c.next = 8;
                          break;
                        case 7:
                          this._softVideo && this._softVideo.endOfStream();
                        case 8:
                        case "end":
                          return c.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function () {
              return o.apply(this, arguments);
            }),
        },
        {
          key: "updateDuration",
          value:
            ((i = Rd(
              Ko().mark(function u(c) {
                return Ko().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          if (!this._mse) {
                            d.next = 7;
                            break;
                          }
                          if (this._mse.isOpened) {
                            d.next = 4;
                            break;
                          }
                          return (d.next = 4), this._mse.open();
                        case 4:
                          return (
                            c1.debug("update duration", c),
                            (d.next = 7),
                            this._mse.updateDuration(c)
                          );
                        case 7:
                        case "end":
                          return d.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function (u) {
              return i.apply(this, arguments);
            }),
        },
        {
          key: "destroy",
          value:
            ((r = Rd(
              Ko().mark(function u() {
                return Ko().wrap(
                  function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          if (!this._mse) {
                            c.next = 3;
                            break;
                          }
                          return (c.next = 3), this._mse.unbindMedia();
                        case 3:
                          (this._mse = null),
                            (this._softVideo = null),
                            (this._demuxer = null),
                            (this._remuxer = null);
                        case 7:
                        case "end":
                          return c.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function () {
              return r.apply(this, arguments);
            }),
        },
        {
          key: "appendBuffer",
          value:
            ((n = Rd(
              Ko().mark(function u(c) {
                var d,
                  h,
                  f,
                  p,
                  g,
                  y,
                  v,
                  b,
                  w,
                  k,
                  D,
                  $,
                  N,
                  P,
                  I,
                  O,
                  X,
                  G,
                  H = this;
                return Ko().wrap(
                  function (E) {
                    for (;;)
                      switch ((E.prev = E.next)) {
                        case 0:
                          if (
                            ((d = !1),
                            this._cachedBuffer &&
                              ((c = akn(this._cachedBuffer, c)),
                              (this._cachedBuffer = null)),
                            (h = this._demuxer),
                            c && c.length && h)
                          ) {
                            E.next = 5;
                            break;
                          }
                          return E.abrupt("return");
                        case 5:
                          (E.prev = 5),
                            this.flv._transferCost.start(Z2.DEMUX),
                            h.demuxAndFix(
                              c,
                              this.seamlessLoadingSwitching ||
                                this._discontinuity,
                              this._contiguous,
                              this._demuxStartTime,
                              this.seamlessLoadingSwitching
                            ),
                            (this.seamlessLoadingSwitching = !1),
                            this.flv._transferCost.end(Z2.DEMUX),
                            (E.next = 15);
                          break;
                        case 12:
                          throw (
                            ((E.prev = 12),
                            (E.t0 = E.catch(5)),
                            new Zg(qo.DEMUX, qo.SUB_TYPES.FLV, E.t0))
                          );
                        case 15:
                          if (
                            ((f = h.videoTrack),
                            (p = h.audioTrack),
                            (g = h.metadataTrack),
                            !this.seamlessLoadingSwitch)
                          ) {
                            E.next = 25;
                            break;
                          }
                          if (
                            !(
                              (y = f.samples.findIndex(function (S) {
                                return S.originDts === f.lastKeyFrameDts;
                              })) >= 0
                            )
                          ) {
                            E.next = 25;
                            break;
                          }
                          return (
                            f.samples.splice(y),
                            (E.next = 22),
                            this.seamlessLoadingSwitch()
                          );
                        case 22:
                          (this.seamlessLoadingSwitch = null),
                            (c = null),
                            (d = !0);
                        case 25:
                          if (
                            ((v = f.exist()),
                            (b = p.exist()),
                            this._opts.onlyAudio &&
                              ((v = !1), (f.present = !1)),
                            this._opts.onlyVideo &&
                              ((b = !1), (p.present = !1)),
                            !((!v && f.present) || (!b && p.present)))
                          ) {
                            E.next = 42;
                            break;
                          }
                          if (
                            ((w = 0),
                            (k = v ? f : b ? p : void 0) &&
                              k.samples.length &&
                              (w =
                                ((k.samples[k.samples.length - 1].originPts -
                                  k.samples[0].originPts) /
                                  k.timescale) *
                                1e3),
                            !(w > this._opts.analyzeDuration))
                          ) {
                            E.next = 40;
                            break;
                          }
                          c1.warn(
                            "analyze duration exceeded, ".concat(w, "ms"),
                            k
                          ),
                            (f.present = v),
                            (p.present = b),
                            this.flv.emit(Vi.ANALYZE_DURATION_EXCEEDED, {
                              duration: w,
                            }),
                            (E.next = 42);
                          break;
                        case 40:
                          return (this._cachedBuffer = c), E.abrupt("return");
                        case 42:
                          if (
                            ((D = f.type),
                            ($ = p.type),
                            this._fireEvents(f, p, g),
                            d ||
                              ((this._discontinuity = !1),
                              (this._contiguous = !0),
                              (this._demuxStartTime = 0)),
                            (N = this._mse),
                            (P = function () {
                              var S, L;
                              (S = H.flv) !== null &&
                                S !== void 0 &&
                                S.emit &&
                                ((L = H.flv) === null ||
                                  L === void 0 ||
                                  L.emit(Vi.APPEND_BUFFER, {}));
                            }),
                            this.flv.emit(Vi.DEMUXED_TRACK, { videoTrack: f }),
                            (I = ""
                              .concat(f.codec, "/")
                              .concat(f.width, "/")
                              .concat(f.height, "/")
                              .concat(p.codec, "/")
                              .concat(p.config)) !== this._initSegmentId &&
                              ((this._needInitSegment = !0),
                              (this._initSegmentId = I),
                              this._emitMetaParsedEvent(f, p)),
                            !N)
                          ) {
                            E.next = 83;
                            break;
                          }
                          if (this._sourceCreated) {
                            E.next = 59;
                            break;
                          }
                          return (E.next = 55), N.open();
                        case 55:
                          v &&
                            (c1.log("codec: video/mp4;codecs=".concat(f.codec)),
                            N.createSource(
                              D,
                              "video/mp4;codecs=".concat(f.codec)
                            )),
                            b &&
                              (c1.log(
                                "codec: audio/mp4;codecs=".concat(p.codec)
                              ),
                              N.createSource(
                                $,
                                "audio/mp4;codecs=".concat(p.codec)
                              )),
                            (this._sourceCreated = !0),
                            this.flv.emit(Vi.SOURCEBUFFER_CREATED);
                        case 59:
                          (E.prev = 59),
                            this._needInitSegment &&
                              !this._opts.mseLowLatency &&
                              ((f.duration =
                                this._opts.durationForMSELowLatencyOff *
                                f.timescale),
                              (p.duration =
                                this._opts.durationForMSELowLatencyOff *
                                b.timescale)),
                            this.flv._transferCost.start(Z2.REMUX),
                            (O = this._remuxer.remux(this._needInitSegment)),
                            this.flv._transferCost.end(Z2.REMUX),
                            (E.next = 69);
                          break;
                        case 66:
                          throw (
                            ((E.prev = 66),
                            (E.t1 = E.catch(59)),
                            new Zg(qo.REMUX, qo.SUB_TYPES.FMP4, E.t1))
                          );
                        case 69:
                          if (
                            !this._needInitSegment ||
                            O.videoInitSegment ||
                            O.audioInitSegment
                          ) {
                            E.next = 71;
                            break;
                          }
                          return E.abrupt("return");
                        case 71:
                          return (
                            (this._needInitSegment = !1),
                            (X = []),
                            O.videoInitSegment &&
                              X.push(N.append(D, O.videoInitSegment)),
                            O.audioInitSegment &&
                              X.push(N.append($, O.audioInitSegment)),
                            O.videoSegment &&
                              X.push(N.append(D, O.videoSegment)),
                            O.audioSegment &&
                              X.push(N.append($, O.audioSegment)),
                            this.flv._transferCost.start(Z2.APPEND),
                            (G = Promise.all(X)).then(P).then(function () {
                              H.flv._transferCost.end(Z2.APPEND), P();
                            }),
                            E.abrupt("return", G)
                          );
                        case 83:
                          this._softVideo &&
                            (this._softVideo.appendBuffer(f, p), P());
                        case 84:
                        case "end":
                          return E.stop();
                      }
                  },
                  u,
                  this,
                  [
                    [5, 12],
                    [59, 66],
                  ]
                );
              })
            )),
            function (u) {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "evictBuffer",
          value:
            ((e = Rd(
              Ko().mark(function u(c) {
                var d,
                  h,
                  f,
                  p = this;
                return Ko().wrap(
                  function (g) {
                    for (;;)
                      switch ((g.prev = g.next)) {
                        case 0:
                          if (
                            ((d = this.flv.media),
                            this._mse && this._demuxer && d && c && !(c < 0))
                          ) {
                            g.next = 3;
                            break;
                          }
                          return g.abrupt("return");
                        case 3:
                          if (((h = d.currentTime), !((f = h - c) <= 0))) {
                            g.next = 7;
                            break;
                          }
                          return g.abrupt("return");
                        case 7:
                          if (!(xh.start(xh.get(d)) + 1 >= f)) {
                            g.next = 10;
                            break;
                          }
                          return g.abrupt("return");
                        case 10:
                          return g.abrupt(
                            "return",
                            this._mse.clearBuffer(0, f).then(function () {
                              return p.flv.emit(Vi.REMOVE_BUFFER, {
                                removeEnd: f,
                              });
                            })
                          );
                        case 11:
                        case "end":
                          return g.stop();
                      }
                  },
                  u,
                  this
                );
              })
            )),
            function (u) {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "_emitMetaParsedEvent",
          value: function (u, c) {
            u.exist() &&
              this.flv.emit(Vi.METADATA_PARSED, {
                type: "video",
                track: u,
                meta: {
                  codec: u.codec,
                  timescale: u.timescale,
                  width: u.width,
                  height: u.height,
                  sarRatio: u.sarRatio,
                  baseDts: u.baseDts,
                },
              }),
              c.exist() &&
                this.flv.emit(Vi.METADATA_PARSED, {
                  type: "audio",
                  track: c,
                  meta: {
                    codec: c.codec,
                    channelCount: c.channelCount,
                    sampleRate: c.sampleRate,
                    timescale: c.timescale,
                    baseDts: c.baseDts,
                  },
                }),
              c1.debug("track parsed", u, c);
          },
        },
        {
          key: "_fireEvents",
          value: function (u, c, d) {
            var h = this;
            c1.debug(
              "videoTrack samples count: "
                .concat(u.samples.length, ", audioTrack samples count: ")
                .concat(c.samples.length)
            ),
              d.flvScriptSamples.forEach(function (f) {
                h.flv.emit(Vi.FLV_SCRIPT_DATA, f), c1.debug("flvScriptData", f);
              }),
              u.samples.forEach(function (f) {
                f.keyframe && h.flv.emit(Vi.KEYFRAME, { pts: f.originPts });
              }),
              u.warnings.forEach(function (f) {
                var p;
                switch (f.type) {
                  case em.LARGE_AV_SHIFT:
                    p = Vi.LARGE_AV_FIRST_FRAME_GAP_DETECT;
                    break;
                  case em.LARGE_VIDEO_GAP:
                    p = Vi.LARGE_VIDEO_DTS_GAP_DETECT;
                    break;
                  case em.LARGE_VIDEO_GAP_BETWEEN_CHUNK:
                    p = Vi.MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT;
                }
                p &&
                  h.flv.emit(
                    Vi.STREAM_EXCEPTION,
                    $h($h({}, f), {}, { type: p })
                  ),
                  c1.warn("video exception", f);
              }),
              c.warnings.forEach(function (f) {
                var p;
                switch (f.type) {
                  case em.LARGE_AUDIO_GAP:
                    p = Vi.LARGE_AUDIO_DTS_GAP_DETECT;
                    break;
                  case em.AUDIO_FILLED:
                    p = Vi.AUDIO_GAP_DETECT;
                    break;
                  case em.AUDIO_DROPPED:
                    p = Vi.AUDIO_OVERLAP_DETECT;
                }
                p &&
                  h.flv.emit(
                    Vi.STREAM_EXCEPTION,
                    $h($h({}, f), {}, { type: p })
                  ),
                  c1.warn("audio exception", f);
              }),
              d.seiSamples.forEach(function (f) {
                h.flv.emit(
                  Vi.SEI,
                  $h(
                    $h({}, f),
                    {},
                    {
                      sei: {
                        code: f.data.type,
                        content: f.data.payload,
                        dts: f.pts,
                      },
                    }
                  )
                );
              });
          },
        },
      ]),
      t
    );
  })();
function aIn(t) {
  var e = $h(
    {
      retryCount: 3,
      retryDelay: 1e3,
      disconnectRetryCount: 0,
      loadTimeout: 1e4,
      maxReaderInterval: 5e3,
      preloadTime: 5,
      defaultVodLoadSize: 1e7,
      isLive: !1,
      softDecode: !1,
      bufferBehind: 10,
      maxJumpDistance: 3,
      analyzeDuration: 2e4,
      seamlesslyReload: !1,
      keepStatusAfterSwitch: !0,
      onlyVideo: !1,
      onlyAudio: !1,
      preferMMS: !1,
      mseLowLatency: !0,
      durationForMSELowLatencyOff: 6,
      chunkCountForSpeed: 50,
      skipChunkSize: 1e3,
      longtimeNoReceived: 3e3,
      enableStartGapJump: !0,
    },
    t
  );
  return (
    e.isLive &&
      e.preloadTime &&
      (e.maxLatency || (e.maxLatency = 2 * e.preloadTime),
      e.targetLatency || (e.targetLatency = e.preloadTime),
      (e.disconnectTime !== null && e.disconnectTime !== void 0) ||
        (e.disconnectTime = e.maxLatency)),
    e
  );
}
function DSe(t, e) {
  var n = 0,
    r = t.length - 1,
    i = 0,
    o = 0,
    l = r;
  for (e < t[0] && ((n = 0), (o = l + 1)); o <= l; ) {
    if (
      (i = o + Math.floor((l - o) / 2)) === r ||
      (e >= t[i] && e < t[i + 1])
    ) {
      n = i;
      break;
    }
    t[i] < e ? (o = i + 1) : (l = i - 1);
  }
  return n;
}
var xy = new sE("flv"),
  J3 = 0.1,
  oIn = 0.3,
  Qx = (function (t) {
    DVe(d, Pl);
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = MVe(d);
    function d(h) {
      var f;
      return (
        w5(this, d),
        Mi(io((f = c.call(this))), "media", null),
        Mi(io(f), "_loading", !1),
        Mi(io(f), "_opts", null),
        Mi(io(f), "_bufferService", null),
        Mi(io(f), "_gapService", null),
        Mi(io(f), "_stats", null),
        Mi(io(f), "_mediaLoader", null),
        Mi(io(f), "_maxChunkWaitTimer", null),
        Mi(io(f), "_tickTimer", null),
        Mi(io(f), "_tickInterval", 500),
        Mi(io(f), "_urlSwitching", !1),
        Mi(io(f), "_seamlessSwitching", !1),
        Mi(io(f), "_disconnectRetryCount", 0),
        Mi(io(f), "_preLoadEndPoint", 0),
        Mi(io(f), "_keyframes", null),
        Mi(io(f), "_acceptRanges", !0),
        Mi(
          io(f),
          "_onProgress",
          (function () {
            var p = Rd(
              Ko().mark(function g(y, v, b, w) {
                var k, D, $, N, P, I, O, X, G, H;
                return Ko().wrap(
                  function (E) {
                    for (;;)
                      switch ((E.prev = E.next)) {
                        case 0:
                          if (
                            ((k = b.startTime),
                            (D = b.endTime),
                            ($ = b.st),
                            (N = b.firstByteTime),
                            (f._loading = !v),
                            f._firstProgressEmit)
                          ) {
                            E.next = 13;
                            break;
                          }
                          if (f.media) {
                            E.next = 6;
                            break;
                          }
                          return (
                            (P = f._mediaLoader) === null ||
                              P === void 0 ||
                              P.cancel(),
                            E.abrupt("return")
                          );
                        case 6:
                          (I = w.headers),
                            (O = $ ? N - $ : D - k),
                            f.emit(Vi.TTFB, {
                              url: f._opts.url,
                              responseUrl: w.url,
                              elapsed: O,
                            }),
                            f.emit(Vi.LOAD_RESPONSE_HEADERS, { headers: I }),
                            f._transferCost.set(Z2.TTFB, O),
                            (f._acceptRanges =
                              !(I == null || !I.get("Accept-Ranges")) ||
                              !(I == null || !I.get("Content-Range"))),
                            (f._firstProgressEmit = !0);
                        case 13:
                          if (f._bufferService) {
                            E.next = 15;
                            break;
                          }
                          return E.abrupt("return");
                        case 15:
                          return (
                            clearTimeout(f._maxChunkWaitTimer),
                            f._bandwidthService.addChunkRecord(
                              y == null ? void 0 : y.byteLength,
                              D - k
                            ),
                            (E.prev = 17),
                            (E.next = 20),
                            f._bufferService.appendBuffer(y)
                          );
                        case 20:
                          (X = f._bufferService) === null ||
                            X === void 0 ||
                            X.evictBuffer(f._opts.bufferBehind),
                            (E.next = 33);
                          break;
                        case 23:
                          if (
                            ((E.prev = 23),
                            (E.t0 = E.catch(17)),
                            f.isLive || !f._bufferService.isFull())
                          ) {
                            E.next = 32;
                            break;
                          }
                          return (E.next = 28), f._mediaLoader.cancel();
                        case 28:
                          return (
                            (f._loading = !1),
                            (G = f.bufferInfo().remaining),
                            (f._opts.preloadTime = parseInt(G) / 2),
                            E.abrupt("return")
                          );
                        case 32:
                          return E.abrupt(
                            "return",
                            f._emitError(Zg.create(E.t0))
                          );
                        case 33:
                          if (
                            (f._urlSwitching &&
                              ((f._urlSwitching = !1),
                              f.emit(Vi.SWITCH_URL_SUCCESS, {
                                url: f._opts.url,
                              })),
                            f._seamlessSwitching &&
                              ((f._seamlessSwitching = !1), f._tick()),
                            !v || f.media.seeking)
                          ) {
                            E.next = 40;
                            break;
                          }
                          return (
                            f.emit(Vi.LOAD_COMPLETE),
                            xy.debug("load done"),
                            f.isLive &&
                              f._disconnectRetryCount <= 0 &&
                              f._end(),
                            E.abrupt("return")
                          );
                        case 40:
                          if (f.isLive) {
                            E.next = 42;
                            break;
                          }
                          return E.abrupt("return");
                        case 42:
                          (H = f._opts.maxReaderInterval) &&
                            f._firstProgressEmit &&
                            (clearTimeout(f._maxChunkWaitTimer),
                            (f._maxChunkWaitTimer = setTimeout(function () {
                              if (f._disconnectRetryCount)
                                return f._disconnectRetryCount--, void f.load();
                              xy.debug("onMaxChunkWait", H), f._end();
                            }, H)));
                        case 44:
                        case "end":
                          return E.stop();
                      }
                  },
                  g,
                  null,
                  [[17, 23]]
                );
              })
            );
            return function (g, y, v, b) {
              return p.apply(this, arguments);
            };
          })()
        ),
        Mi(io(f), "_onRetryError", function (p, g) {
          xy.debug("load retry", p, g),
            f.emit(Vi.LOAD_RETRY, { error: Zg.network(p), retryTime: g });
        }),
        Mi(io(f), "_end", function () {
          f._clear(),
            f._bufferService && f._bufferService.endOfStream(),
            xy.debug("end stream");
        }),
        Mi(io(f), "_resetDisconnectCount", function () {
          f._disconnectRetryCount = f._opts.disconnectRetryCount;
        }),
        Mi(io(f), "_tick", function () {
          clearTimeout(f._tickTimer);
          var p = io(f).media;
          if (p) {
            f._tickTimer = setTimeout(f._tick, f._tickInterval);
            var g = xh.end(xh.get(p));
            if (!(g < J3) && p.readyState) {
              var y = f._opts;
              if (rkn(p) && p.currentTime)
                f._gapService &&
                  f._gapService.do(p, y.maxJumpDistance, f.isLive, 3);
              else {
                if (!p.currentTime && f._gapService && y.enableStartGapJump)
                  return void (
                    (f._opts.mseLowLatency ||
                      (f._opts.mseLowLatency === !1 &&
                        f.bufferInfo(oIn).nextStart)) &&
                    f._gapService.do(p, y.maxJumpDistance, f.isLive, 3)
                  );
                y.isLive &&
                  p.readyState === 4 &&
                  g - p.currentTime > y.disconnectTime &&
                  f.disconnect();
              }
            }
          }
        }),
        Mi(io(f), "_onPlay", function () {
          var p,
            g,
            y =
              f._opts.softDecode ||
              ((p = f.media) === null ||
              p === void 0 ||
              (g = p.buffered) === null ||
              g === void 0
                ? void 0
                : g.length);
          if (f.isLive) !f._loading && y && f.replay(void 0, !0);
          else {
            var v = f.bufferInfo();
            (v.start || v.nextStart) > J3 && f._tick();
          }
        }),
        Mi(io(f), "_onLoadeddata", function () {
          f.isLive &&
            !f._opts.mseLowLatency &&
            f.media.duration !== 1 / 0 &&
            f._bufferService.updateDuration(1 / 0).catch(function (p) {});
        }),
        Mi(
          io(f),
          "_onSeeking",
          Rd(
            Ko().mark(function p() {
              return Ko().wrap(function (g) {
                for (;;)
                  switch ((g.prev = g.next)) {
                    case 0:
                      !f.isLive &&
                        f.seekable &&
                        ((f._preLoadEndPoint = -1), f._checkPreload());
                    case 1:
                    case "end":
                      return g.stop();
                  }
              }, p);
            })
          )
        ),
        Mi(io(f), "_onTimeupdate", function () {
          if (f.media) {
            var p = f._opts,
              g = f.media.currentTime;
            if (p.isLive && p.maxLatency && p.targetLatency) {
              var y = xh.end(xh.get(f.media));
              y - g >= p.maxLatency &&
                ((f.media.currentTime = y - p.targetLatency),
                f.emit(Vi.CHASEFRAME, {
                  currentTime: f.media.currentTime,
                  latency: p.targetLatency,
                }));
            }
            f._seiService.throw(g, !0),
              p.isLive || !f.seekable || f._loading || f._checkPreload();
          }
        }),
        Mi(io(f), "_onWaiting", function () {
          f.isLive &&
            !f._loading &&
            f._disconnectRetryCount &&
            (f._disconnectRetryCount--, f.load());
        }),
        Mi(io(f), "_onBufferUpdate", function () {
          if (!f._opts.isLive) {
            var p = f.bufferInfo(),
              g = p.end,
              y = p.nextEnd;
            Math.abs((g || y) - f.media.duration) < 1 &&
              (f._end(), f.media.readyState <= 2 && f._tick());
          }
        }),
        Mi(
          io(f),
          "_checkPreload",
          Rd(
            Ko().mark(function p() {
              var g, y, v, b, w, k, D, $, N, P;
              return Ko().wrap(function (I) {
                for (;;)
                  switch ((I.prev = I.next)) {
                    case 0:
                      if (
                        ((g = f.bufferInfo()),
                        (y = g.remaining),
                        (v = y === void 0 ? 0 : y),
                        (b = f._opts),
                        (w = f._keyframes.filepositions),
                        (k = f._keyframes.times),
                        (D = f.media.currentTime),
                        !(v < b.preloadTime))
                      ) {
                        I.next = 19;
                        break;
                      }
                      if (
                        (($ = DSe(f._keyframes.times, D + v + J3)),
                        (N = DSe(
                          f._keyframes.times,
                          D + v + f._opts.preloadTime
                        )) === $ && (N = $ + 1),
                        f._preLoadEndPoint !== N)
                      ) {
                        I.next = 11;
                        break;
                      }
                      return I.abrupt("return");
                    case 11:
                      if ((P = w[$]) != null) {
                        I.next = 14;
                        break;
                      }
                      return I.abrupt("return");
                    case 14:
                      return (I.next = 16), f._mediaLoader.cancel();
                    case 16:
                      f._loadData(null, [P, w[N]]),
                        (f._preLoadEndPoint = N),
                        f._bufferService.unContiguous(k[$]);
                    case 19:
                    case "end":
                      return I.stop();
                  }
              }, p);
            })
          )
        ),
        Mi(io(f), "_onFlvScriptData", function (p) {
          var g,
            y,
            v,
            b,
            w =
              (g = p.data) === null ||
              g === void 0 ||
              (y = g.onMetaData) === null ||
              y === void 0
                ? void 0
                : y.keyframes,
            k =
              (v = p.data) === null ||
              v === void 0 ||
              (b = v.onMetaData) === null ||
              b === void 0
                ? void 0
                : b.duration;
          w && (f._keyframes = w),
            !f._opts.isLive && k && f._bufferService.updateDuration(k);
        }),
        (f._opts = aIn(h)),
        (f.media = f._opts.media || document.createElement("video")),
        (f._opts.media = null),
        (f._firstProgressEmit = !1),
        (f._mediaLoader = new skn(
          $h(
            $h({}, f._opts.fetchOptions),
            {},
            {
              retry: f._opts.retryCount,
              retryDelay: f._opts.retryDelay,
              timeout: f._opts.loadTimeout,
              onRetryError: f._onRetryError,
              onProgress: f._onProgress,
              responseType: "arraybuffer",
            }
          )
        )),
        (f._disconnectRetryCount = f._opts.disconnectRetryCount),
        (f._transferCost = new rIn()),
        (f._bufferService = new iIn(
          io(f),
          f._opts.softDecode ? f.media : void 0,
          f._opts
        )),
        (f._seiService = new ukn(io(f))),
        (f._bandwidthService = new pkn({
          chunkCountForSpeed: f._opts.chunkCountForSpeed,
          skipChunkSize: f._opts.skipChunkSize,
          longtimeNoReceived: f._opts.longtimeNoReceived,
        })),
        (f._stats = new gkn(io(f))),
        f._opts.softDecode || (f._gapService = new lkn()),
        f.media.addEventListener("play", f._onPlay),
        f.media.addEventListener("loadeddata", f._onLoadeddata),
        f.media.addEventListener("seeking", f._onSeeking),
        f.media.addEventListener("timeupdate", f._onTimeupdate),
        f.media.addEventListener("progress", f._onBufferUpdate),
        f.media.addEventListener("waiting", f._onWaiting),
        f.on(Vi.FLV_SCRIPT_DATA, f._onFlvScriptData),
        f
      );
    }
    return (
      k5(
        d,
        [
          {
            key: "version",
            get: function () {
              return "3.0.23-rc.6";
            },
          },
          {
            key: "isLive",
            get: function () {
              return this._opts.isLive;
            },
          },
          {
            key: "baseDts",
            get: function () {
              var h;
              return (h = this._bufferService) === null || h === void 0
                ? void 0
                : h.baseDts;
            },
          },
          {
            key: "seekable",
            get: function () {
              return !!this._keyframes && this._acceptRanges;
            },
          },
          {
            key: "loader",
            get: function () {
              return this._mediaLoader;
            },
          },
          {
            key: "blobUrl",
            get: function () {
              var h;
              return (h = this._bufferService) === null || h === void 0
                ? void 0
                : h.blobUrl;
            },
          },
          {
            key: "speedInfo",
            value: function () {
              return {
                speed: this._bandwidthService.getLatestSpeed(),
                avgSpeed: this._bandwidthService.getAvgSpeed(),
                totalSize: this._bandwidthService.getTotalSize(),
                totalCost: this._bandwidthService.getTotalCost(),
              };
            },
          },
          {
            key: "getStats",
            value: function () {
              return this._stats.getStats();
            },
          },
          {
            key: "bufferInfo",
            value: function () {
              var h,
                f =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : J3;
              return xh.info(
                xh.get(this.media),
                (h = this.media) === null || h === void 0
                  ? void 0
                  : h.currentTime,
                f
              );
            },
          },
          {
            key: "playbackQuality",
            value: function () {
              return ikn(this.media);
            },
          },
          {
            key: "load",
            value:
              ((u = Rd(
                Ko().mark(function h(f) {
                  var p,
                    g,
                    y = arguments;
                  return Ko().wrap(
                    function (v) {
                      for (;;)
                        switch ((v.prev = v.next)) {
                          case 0:
                            if (
                              ((p = y.length > 1 && y[1] !== void 0 && y[1]),
                              (g = y.length > 2 ? y[2] : void 0),
                              this._bufferService)
                            ) {
                              v.next = 4;
                              break;
                            }
                            return v.abrupt("return");
                          case 4:
                            return (v.next = 6), this._reset(p);
                          case 6:
                            this._loadData(
                              f,
                              this._opts.isLive
                                ? []
                                : [0, this._opts.defaultVodLoadSize],
                              g
                            ),
                              clearTimeout(this._tickTimer),
                              (this._tickTimer = setTimeout(
                                this._tick,
                                this._tickInterval
                              ));
                          case 9:
                          case "end":
                            return v.stop();
                        }
                    },
                    h,
                    this
                  );
                })
              )),
              function (h) {
                return u.apply(this, arguments);
              }),
          },
          {
            key: "replay",
            value:
              ((l = Rd(
                Ko().mark(function h() {
                  var f,
                    p,
                    g = this,
                    y = arguments;
                  return Ko().wrap(
                    function (v) {
                      for (;;)
                        switch ((v.prev = v.next)) {
                          case 0:
                            if (
                              ((f =
                                y.length > 0 && y[0] !== void 0
                                  ? y[0]
                                  : this._opts.seamlesslyReload),
                              (p = y.length > 1 ? y[1] : void 0),
                              this.media)
                            ) {
                              v.next = 4;
                              break;
                            }
                            return v.abrupt("return");
                          case 4:
                            if ((this._resetDisconnectCount(), !f)) {
                              v.next = 11;
                              break;
                            }
                            return (v.next = 8), this._clear();
                          case 8:
                            setTimeout(function () {
                              (g._seamlessSwitching = !0),
                                g._loadData(g._opts.url),
                                g._bufferService.seamlessSwitch();
                            }),
                              (v.next = 13);
                            break;
                          case 11:
                            return (v.next = 13), this.load();
                          case 13:
                            return v.abrupt(
                              "return",
                              this.media.play(!p).catch(function () {})
                            );
                          case 14:
                          case "end":
                            return v.stop();
                        }
                    },
                    h,
                    this
                  );
                })
              )),
              function () {
                return l.apply(this, arguments);
              }),
          },
          {
            key: "disconnect",
            value: function () {
              var h;
              return (
                xy.debug("disconnect!"),
                (h = this._bufferService) === null ||
                  h === void 0 ||
                  h.resetSeamlessSwitchStats(),
                this._clear()
              );
            },
          },
          {
            key: "switchURL",
            value:
              ((o = Rd(
                Ko().mark(function h(f, p) {
                  var g = this;
                  return Ko().wrap(
                    function (y) {
                      for (;;)
                        switch ((y.prev = y.next)) {
                          case 0:
                            if (this._bufferService) {
                              y.next = 2;
                              break;
                            }
                            return y.abrupt("return");
                          case 2:
                            if (
                              (this._resetDisconnectCount(),
                              !this._loading || !p)
                            ) {
                              y.next = 6;
                              break;
                            }
                            return (
                              (this._bufferService.seamlessLoadingSwitch =
                                (function () {
                                  var v = Rd(
                                    Ko().mark(function b(w) {
                                      return Ko().wrap(function (k) {
                                        for (;;)
                                          switch ((k.prev = k.next)) {
                                            case 0:
                                              return (k.next = 2), g._clear();
                                            case 2:
                                              (g._bufferService.seamlessLoadingSwitching =
                                                !0),
                                                (g._urlSwitching = !0),
                                                (g._seamlessSwitching = !0),
                                                g._bufferService.seamlessSwitch(),
                                                g._loadData(f);
                                            case 7:
                                            case "end":
                                              return k.stop();
                                          }
                                      }, b);
                                    })
                                  );
                                  return function (b) {
                                    return v.apply(this, arguments);
                                  };
                                })()),
                              y.abrupt("return")
                            );
                          case 6:
                            if (p && this._opts.isLive) {
                              y.next = 11;
                              break;
                            }
                            return (y.next = 9), this.load(f);
                          case 9:
                            return (
                              (this._urlSwitching = !0),
                              y.abrupt(
                                "return",
                                this.media.play(!0).catch(function () {})
                              )
                            );
                          case 11:
                            return (y.next = 13), this._clear();
                          case 13:
                            setTimeout(function () {
                              (g._urlSwitching = !0),
                                (g._seamlessSwitching = !0),
                                g._loadData(f),
                                g._bufferService.seamlessSwitch();
                            });
                          case 14:
                          case "end":
                            return y.stop();
                        }
                    },
                    h,
                    this
                  );
                })
              )),
              function (h, f) {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "destroy",
            value:
              ((i = Rd(
                Ko().mark(function h() {
                  return Ko().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (this.media) {
                              f.next = 2;
                              break;
                            }
                            return f.abrupt("return");
                          case 2:
                            return (
                              this.removeAllListeners(),
                              this._seiService.reset(),
                              this.media.removeEventListener(
                                "play",
                                this._onPlay
                              ),
                              this.media.removeEventListener(
                                "loadeddata",
                                this._onLoadeddata
                              ),
                              this.media.removeEventListener(
                                "seeking",
                                this._onSeeking
                              ),
                              this.media.removeEventListener(
                                "timeupdate",
                                this._onTimeupdate
                              ),
                              this.media.removeEventListener(
                                "waiting",
                                this._onWaiting
                              ),
                              this.media.removeEventListener(
                                "progress",
                                this._onBufferUpdate
                              ),
                              (f.next = 12),
                              Promise.all([
                                this._clear(),
                                this._bufferService.destroy(),
                              ])
                            );
                          case 12:
                            (this.media = null), (this._bufferService = null);
                          case 14:
                          case "end":
                            return f.stop();
                        }
                    },
                    h,
                    this
                  );
                })
              )),
              function () {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "_emitError",
            value: function (h) {
              var f,
                p =
                  !(arguments.length > 1 && arguments[1] !== void 0) ||
                  arguments[1];
              xy.table(h),
                xy.error(h),
                xy.error(
                  (f = this.media) === null || f === void 0 ? void 0 : f.error
                ),
                this._urlSwitching &&
                  ((this._urlSwitching = !1),
                  (this._seamlessSwitching = !1),
                  this.emit(Vi.SWITCH_URL_FAILED, h)),
                this.emit(Vi.ERROR, h),
                p && (this._seiService.reset(), this._end());
            },
          },
          {
            key: "_reset",
            value:
              ((r = Rd(
                Ko().mark(function h() {
                  var f,
                    p = arguments;
                  return Ko().wrap(
                    function (g) {
                      for (;;)
                        switch ((g.prev = g.next)) {
                          case 0:
                            return (
                              (f = p.length > 0 && p[0] !== void 0 && p[0]),
                              this._seiService.reset(),
                              this._bandwidthService.reset(),
                              this._stats.reset(),
                              (g.next = 6),
                              this._clear()
                            );
                          case 6:
                            return (g.next = 8), this._bufferService.reset(f);
                          case 8:
                          case "end":
                            return g.stop();
                        }
                    },
                    h,
                    this
                  );
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "_loadData",
            value:
              ((n = Rd(
                Ko().mark(function h(f, p, g) {
                  var y;
                  return Ko().wrap(
                    function (v) {
                      for (;;)
                        switch ((v.prev = v.next)) {
                          case 0:
                            if (
                              (f && (this._opts.url = f),
                              (y = f = this._opts.url),
                              f)
                            ) {
                              v.next = 4;
                              break;
                            }
                            throw new Error("Source url is missing");
                          case 4:
                            if (
                              (this._opts.preProcessUrl &&
                                (y = this._opts.preProcessUrl(f).url),
                              (this._mediaLoader.finnalUrl = y),
                              this.emit(Vi.LOAD_START, {
                                url: y,
                                seamlessSwitching: this._seamlessSwitching,
                              }),
                              xy.debug("load data, loading:", this._loading, y),
                              !this._loading)
                            ) {
                              v.next = 11;
                              break;
                            }
                            return (v.next = 11), this._mediaLoader.cancel();
                          case 11:
                            return (
                              (this._loading = !0),
                              (v.prev = 12),
                              (v.next = 15),
                              this._mediaLoader.load({
                                url: y,
                                range: p,
                                streamRes: g,
                                firstMaxChunkSize: this._opts.firstMaxChunkSize,
                              })
                            );
                          case 15:
                            v.next = 21;
                            break;
                          case 17:
                            return (
                              (v.prev = 17),
                              (v.t0 = v.catch(12)),
                              (this._loading = !1),
                              v.abrupt(
                                "return",
                                this._emitError(Zg.network(v.t0), !1)
                              )
                            );
                          case 21:
                          case "end":
                            return v.stop();
                        }
                    },
                    h,
                    this,
                    [[12, 17]]
                  );
                })
              )),
              function (h, f, p) {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_clear",
            value:
              ((e = Rd(
                Ko().mark(function h() {
                  return Ko().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (!this._mediaLoader) {
                              f.next = 3;
                              break;
                            }
                            return (f.next = 3), this._mediaLoader.cancel();
                          case 3:
                            clearTimeout(this._maxChunkWaitTimer),
                              clearTimeout(this._tickTimer),
                              (this._loading = !1),
                              (this._firstProgressEmit = !1);
                          case 7:
                          case "end":
                            return f.stop();
                        }
                    },
                    h,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
        ],
        [
          {
            key: "isSupported",
            value: function (h) {
              return h && h !== "video" && h !== "audio"
                ? typeof WebAssembly < "u"
                : Kx.isSupported();
            },
          },
          {
            key: "enableLogger",
            value: function () {
              sE.enable(), qU.enable();
            },
          },
          {
            key: "disableLogger",
            value: function () {
              sE.disable(), qU.disable();
            },
          },
        ]
      ),
      d
    );
  })();
try {
  localStorage.getItem("xgd") ? Qx.enableLogger() : Qx.disableLogger();
} catch {}
var sIn = (function () {
    function t(e, n) {
      var r = this;
      w5(this, t),
        Mi(this, "_onLowDecode", function () {
          var i,
            o,
            l,
            u,
            c = r._opts,
            d = c.media,
            h = c.innerDegrade,
            f = c.backupURL;
          (i = r._plugin) === null ||
            i === void 0 ||
            (o = i.player) === null ||
            o === void 0 ||
            o.emit("lowdecode", d.degradeInfo),
            (l = r._plugin) === null ||
              l === void 0 ||
              (u = l.player) === null ||
              u === void 0 ||
              u.emit(
                "core_event",
                $h($h({}, d.degradeInfo), {}, { eventName: Vi.LOWDECODE })
              ),
            (h !== 1 && h !== 3) || !f || r._degrade(f);
        }),
        Mi(this, "_degrade", function (i) {
          var o = r._plugin.player,
            l = o.video;
          if ((l == null ? void 0 : l.TAG) === "MVideo") {
            var u = o.video.degradeVideo;
            (o.video = u), l.degrade(i), i && (o.config.url = i);
            var c = o.root.firstChild;
            c.TAG === "MVideo" && o.root.replaceChild(u, c);
            var d = r._plugin.constructor.pluginName.toLowerCase();
            o.unRegisterPlugin(d),
              o.once("canplay", function () {
                o.play();
              });
          }
        }),
        Mi(this, "forceDegradeToVideo", function (i) {
          var o = r._opts.innerDegrade;
          (o !== 1 && o !== 3) || r._degrade(i);
        }),
        (this._opts = e),
        (this._plugin = n),
        this._init();
    }
    return (
      k5(t, [
        {
          key: "_init",
          value: function () {
            var e = this._opts,
              n = e.media,
              r = e.isLive,
              i = e.preloadTime,
              o = e.innerDegrade,
              l = e.decodeMode;
            n &&
              (r || !n.setPlayMode
                ? (o && n.setAttribute("innerdegrade", o),
                  i && n.setAttribute("preloadtime", i),
                  n.setDecodeMode && n.setDecodeMode(l),
                  this._bindEvents())
                : n.setPlayMode("VOD"));
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            this._opts.media.addEventListener("lowdecode", this._onLowDecode);
          },
        },
        {
          key: "destroy",
          value: function () {
            var e, n;
            (e = this._opts) === null ||
              e === void 0 ||
              (n = e.media) === null ||
              n === void 0 ||
              n.removeEventListener("lowdecode", this._onLowDecode),
              (this._plugin = null);
          },
        },
      ]),
      t
    );
  })(),
  dze = (function (t) {
    DVe(n, hm);
    var e = MVe(n);
    function n() {
      var r;
      w5(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        Mi(io((r = e.call.apply(e, [this].concat(o)))), "logger", xy),
        Mi(io(r), "flv", null),
        Mi(io(r), "pluginExtension", null),
        Mi(io(r), "getStats", function () {
          var u;
          return (u = r.flv) === null || u === void 0 ? void 0 : u.getStats();
        }),
        Mi(io(r), "loadSource", function () {
          var u;
          (arguments.length > 0 && arguments[0] !== void 0) ||
            r.player.config.url;
          var c = arguments.length > 1 ? arguments[1] : void 0;
          (u = r.flv) === null ||
            u === void 0 ||
            u.load(r.player.config.url, !0, c);
        }),
        Mi(io(r), "destroy", function () {
          var u;
          r.flv && (r.flv.destroy(), (r.flv = null)),
            (u = r.pluginExtension) === null || u === void 0 || u.destroy(),
            (r.pluginExtension = null);
        }),
        Mi(io(r), "_onSwitchURL", function (u, c) {
          var d, h;
          r.flv &&
            ((r.player.config.url = u),
            IVe(c) === "object" && (c = c.seamless),
            r.flv.switchURL(u, c),
            !c &&
              (d = r.player.config) !== null &&
              d !== void 0 &&
              (h = d.flv) !== null &&
              h !== void 0 &&
              h.keepStatusAfterSwitch &&
              r._keepPauseStatus());
        }),
        Mi(io(r), "_keepPauseStatus", function () {
          r.player.paused &&
            r.player.once("canplay", function () {
              r.player.pause();
            });
        }),
        Mi(io(r), "_onDefinitionChange", function (u) {
          var c = u.to;
          r.flv && r.flv.switchURL(c);
        }),
        r
      );
    }
    return (
      k5(
        n,
        [
          {
            key: "core",
            get: function () {
              return this.flv;
            },
          },
          {
            key: "version",
            get: function () {
              var r;
              return (r = this.flv) === null || r === void 0
                ? void 0
                : r.version;
            },
          },
          {
            key: "softDecode",
            get: function () {
              var r,
                i,
                o =
                  (r = this.player) === null ||
                  r === void 0 ||
                  (i = r.config) === null ||
                  i === void 0
                    ? void 0
                    : i.mediaType;
              return (
                !!o && o !== "video" && o !== "audio" && o !== "offscreen-video"
              );
            },
          },
          {
            key: "loader",
            get: function () {
              var r;
              return (r = this.flv) === null || r === void 0
                ? void 0
                : r.loader;
            },
          },
          {
            key: "transferCost",
            get: function () {
              return this.flv._transferCost.transferCost;
            },
          },
          {
            key: "beforePlayerInit",
            value: function () {
              var r = this,
                i = this.player.config,
                o = this.player.media || this.player.video;
              if (i.url) {
                this.flv && this.flv.destroy(),
                  (this.player.switchURL = this._onSwitchURL);
                var l,
                  u = i.flv || {};
                (u.disconnectTime !== null && u.disconnectTime !== void 0) ||
                  (u.disconnectTime = 0),
                  (this.flv = new Qx(
                    $h(
                      {
                        softDecode: this.softDecode,
                        isLive: i.isLive,
                        media: o,
                        preProcessUrl: function (c, d) {
                          var h, f;
                          return (
                            ((h = r.player) === null ||
                            h === void 0 ||
                            (f = h.preProcessUrl) === null ||
                            f === void 0
                              ? void 0
                              : f.call(h, c, d)) || { url: c, ext: d }
                          );
                        },
                      },
                      u
                    )
                  )),
                  this.softDecode ||
                    hm.defineGetterOrSetter(this.player, {
                      url: {
                        get: function () {
                          var c;
                          return (c = r.flv) === null || c === void 0
                            ? void 0
                            : c.blobUrl;
                        },
                        configurable: !0,
                      },
                    }),
                  this.softDecode &&
                    ((this.pluginExtension = new sIn(
                      $h({ media: this.player.video, isLive: i.isLive }, i.flv),
                      this
                    )),
                    (this.player.forceDegradeToVideo = function () {
                      for (
                        var c, d = arguments.length, h = new Array(d), f = 0;
                        f < d;
                        f++
                      )
                        h[f] = arguments[f];
                      return (c = r.pluginExtension) === null || c === void 0
                        ? void 0
                        : c.forceDegradeToVideo.apply(c, h);
                    })),
                  i.isLive &&
                    ((l = this.player) === null ||
                      l === void 0 ||
                      l.useHooks("replay", function () {
                        var c;
                        return (c = r.flv) === null || c === void 0
                          ? void 0
                          : c.replay();
                      })),
                  this.on(Rue, this._onSwitchURL),
                  this.on(Sue, this.destroy),
                  this._transError(),
                  this._transCoreEvent(Vi.TTFB),
                  this._transCoreEvent(Vi.LOAD_START),
                  this._transCoreEvent(Vi.LOAD_RESPONSE_HEADERS),
                  this._transCoreEvent(Vi.LOAD_COMPLETE),
                  this._transCoreEvent(Vi.LOAD_RETRY),
                  this._transCoreEvent(Vi.SOURCEBUFFER_CREATED),
                  this._transCoreEvent(Vi.ANALYZE_DURATION_EXCEEDED),
                  this._transCoreEvent(Vi.APPEND_BUFFER),
                  this._transCoreEvent(Vi.REMOVE_BUFFER),
                  this._transCoreEvent(Vi.BUFFEREOS),
                  this._transCoreEvent(Vi.KEYFRAME),
                  this._transCoreEvent(Vi.CHASEFRAME),
                  this._transCoreEvent(Vi.METADATA_PARSED),
                  this._transCoreEvent(Vi.SEI),
                  this._transCoreEvent(Vi.SEI_IN_TIME),
                  this._transCoreEvent(Vi.FLV_SCRIPT_DATA),
                  this._transCoreEvent(Vi.STREAM_EXCEPTION),
                  this._transCoreEvent(Vi.SWITCH_URL_SUCCESS),
                  this._transCoreEvent(Vi.SWITCH_URL_FAILED),
                  u.manualLoad || this.loadSource(i.url, u.streamRes);
              }
            },
          },
          {
            key: "_transError",
            value: function () {
              var r = this;
              this.flv.on(Vi.ERROR, function (i) {
                r.player && r.player.emit(Eue, new s0(r.player, i));
              });
            },
          },
          {
            key: "_transCoreEvent",
            value: function (r) {
              var i = this;
              this.flv.on(r, function (o) {
                i.player &&
                  i.player.emit(
                    "core_event",
                    $h($h({}, o), {}, { eventName: r })
                  );
              });
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "flv";
            },
          },
          {
            key: "isSupported",
            value: function (r, i) {
              return Qx.isSupported(r, i);
            },
          },
          {
            key: "isSupportedMMS",
            value: function () {
              return typeof ManagedMediaSource < "u";
            },
          },
        ]
      ),
      n
    );
  })();
function wue(t, e, n) {
  return (
    (e = bne(e)),
    uIn(
      t,
      hze() ? Reflect.construct(e, n || [], bne(t).constructor) : e.apply(t, n)
    )
  );
}
function hze() {
  try {
    var t = !Boolean.prototype.valueOf.call(
      Reflect.construct(Boolean, [], function () {})
    );
  } catch {}
  return (hze = function () {
    return !!t;
  })();
}
function lIn(t, e) {
  if (typeof t != "object" || !t) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function fze(t) {
  var e = lIn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
function t8(t) {
  return (t8 =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function PB(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function PSe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, fze(r.key), r);
  }
}
function MB(t, e, n) {
  return (
    e && PSe(t.prototype, e),
    n && PSe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function D$(t, e, n) {
  return (
    (e = fze(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function kue(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && pze(t, e);
}
function bne(t) {
  return (bne = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function pze(t, e) {
  return (pze = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function MT(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function uIn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return MT(t);
}
Mi(dze, "Flv", Qx);
var cIn = (function () {
    var t =
      typeof document < "u" && document.currentScript
        ? document.currentScript.src
        : void 0;
    return function (e) {
      var n,
        r,
        i = (e = e || {}) !== void 0 ? e : {};
      (i.ready = new Promise(function (En, Zn) {
        (n = En), (r = Zn);
      })),
        Object.getOwnPropertyDescriptor(i.ready, "_getPredictedBitrate") ||
          (Object.defineProperty(i.ready, "_getPredictedBitrate", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _getPredictedBitrate on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_getPredictedBitrate", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _getPredictedBitrate on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_updateMediaInfo") ||
          (Object.defineProperty(i.ready, "_updateMediaInfo", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _updateMediaInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_updateMediaInfo", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _updateMediaInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_updateBufferInfo") ||
          (Object.defineProperty(i.ready, "_updateBufferInfo", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _updateBufferInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_updateBufferInfo", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _updateBufferInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_updateSwitchInfo") ||
          (Object.defineProperty(i.ready, "_updateSwitchInfo", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _updateSwitchInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_updateSwitchInfo", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _updateSwitchInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_updateDeviceInfo") ||
          (Object.defineProperty(i.ready, "_updateDeviceInfo", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _updateDeviceInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_updateDeviceInfo", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _updateDeviceInfo on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_parseMPD") ||
          (Object.defineProperty(i.ready, "_parseMPD", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _parseMPD on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_parseMPD", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _parseMPD on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_emscripten_stack_get_end") ||
          (Object.defineProperty(i.ready, "_emscripten_stack_get_end", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_emscripten_stack_get_end", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _emscripten_stack_get_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(
          i.ready,
          "_emscripten_stack_get_free"
        ) ||
          (Object.defineProperty(i.ready, "_emscripten_stack_get_free", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_emscripten_stack_get_free", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _emscripten_stack_get_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_emscripten_stack_init") ||
          (Object.defineProperty(i.ready, "_emscripten_stack_init", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_emscripten_stack_init", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _emscripten_stack_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_stackSave") ||
          (Object.defineProperty(i.ready, "_stackSave", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_stackSave", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_stackRestore") ||
          (Object.defineProperty(i.ready, "_stackRestore", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_stackRestore", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_stackAlloc") ||
          (Object.defineProperty(i.ready, "_stackAlloc", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_stackAlloc", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "___wasm_call_ctors") ||
          (Object.defineProperty(i.ready, "___wasm_call_ctors", {
            configurable: !0,
            get: function () {
              He(
                "You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "___wasm_call_ctors", {
            configurable: !0,
            set: function () {
              He(
                "You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_fflush") ||
          (Object.defineProperty(i.ready, "_fflush", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_fflush", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _fflush on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "___errno_location") ||
          (Object.defineProperty(i.ready, "___errno_location", {
            configurable: !0,
            get: function () {
              He(
                "You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "___errno_location", {
            configurable: !0,
            set: function () {
              He(
                "You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "_malloc") ||
          (Object.defineProperty(i.ready, "_malloc", {
            configurable: !0,
            get: function () {
              He(
                "You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "_malloc", {
            configurable: !0,
            set: function () {
              He(
                "You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          })),
        Object.getOwnPropertyDescriptor(i.ready, "onRuntimeInitialized") ||
          (Object.defineProperty(i.ready, "onRuntimeInitialized", {
            configurable: !0,
            get: function () {
              He(
                "You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }),
          Object.defineProperty(i.ready, "onRuntimeInitialized", {
            configurable: !0,
            set: function () {
              He(
                "You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js"
              );
            },
          }));
      var o,
        l = {};
      for (o in i) i.hasOwnProperty(o) && (l[o] = i[o]);
      var u = !0;
      if (i.ENVIRONMENT)
        throw new Error(
          "Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)"
        );
      var c,
        d = "";
      if (
        (typeof document < "u" &&
          document.currentScript &&
          (d = document.currentScript.src),
        t && (d = t),
        (d =
          d.indexOf("blob:") !== 0
            ? d.substr(0, d.replace(/[?#].*/, "").lastIndexOf("/") + 1)
            : ""),
        (typeof window > "u" ? "undefined" : t8(window)) !== "object" &&
          typeof importScripts != "function")
      )
        throw new Error(
          "not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)"
        );
      var h = i.print || console.log.bind(console),
        f = i.printErr || console.warn.bind(console);
      for (o in l) l.hasOwnProperty(o) && (i[o] = l[o]);
      function p(En) {
        p.shown || (p.shown = {}), p.shown[En] || ((p.shown[En] = 1), f(En));
      }
      (l = null),
        i.arguments && i.arguments,
        Object.getOwnPropertyDescriptor(i, "arguments") ||
          Object.defineProperty(i, "arguments", {
            configurable: !0,
            get: function () {
              He(
                "Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        i.thisProgram && i.thisProgram,
        Object.getOwnPropertyDescriptor(i, "thisProgram") ||
          Object.defineProperty(i, "thisProgram", {
            configurable: !0,
            get: function () {
              He(
                "Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        i.quit && i.quit,
        Object.getOwnPropertyDescriptor(i, "quit") ||
          Object.defineProperty(i, "quit", {
            configurable: !0,
            get: function () {
              He(
                "Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        k(
          i.memoryInitializerPrefixURL === void 0,
          "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"
        ),
        k(
          i.pthreadMainPrefixURL === void 0,
          "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"
        ),
        k(
          i.cdInitializerPrefixURL === void 0,
          "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"
        ),
        k(
          i.filePackagePrefixURL === void 0,
          "Module.filePackagePrefixURL option was removed, use Module.locateFile instead"
        ),
        k(
          i.read === void 0,
          "Module.read option was removed (modify read_ in JS)"
        ),
        k(
          i.readAsync === void 0,
          "Module.readAsync option was removed (modify readAsync in JS)"
        ),
        k(
          i.readBinary === void 0,
          "Module.readBinary option was removed (modify readBinary in JS)"
        ),
        k(
          i.setWindowTitle === void 0,
          "Module.setWindowTitle option was removed (modify setWindowTitle in JS)"
        ),
        k(
          i.TOTAL_MEMORY === void 0,
          "Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"
        ),
        Object.getOwnPropertyDescriptor(i, "read") ||
          Object.defineProperty(i, "read", {
            configurable: !0,
            get: function () {
              He(
                "Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(i, "readAsync") ||
          Object.defineProperty(i, "readAsync", {
            configurable: !0,
            get: function () {
              He(
                "Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(i, "readBinary") ||
          Object.defineProperty(i, "readBinary", {
            configurable: !0,
            get: function () {
              He(
                "Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(i, "setWindowTitle") ||
          Object.defineProperty(i, "setWindowTitle", {
            configurable: !0,
            get: function () {
              He(
                "Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        k(
          !0,
          "worker environment detected but not enabled at build time.  Add 'worker' to `-s ENVIRONMENT` to enable."
        ),
        k(
          !0,
          "node environment detected but not enabled at build time.  Add 'node' to `-s ENVIRONMENT` to enable."
        ),
        k(
          !0,
          "shell environment detected but not enabled at build time.  Add 'shell' to `-s ENVIRONMENT` to enable."
        );
      var g,
        y = 0;
      i.wasmBinary && (g = i.wasmBinary),
        Object.getOwnPropertyDescriptor(i, "wasmBinary") ||
          Object.defineProperty(i, "wasmBinary", {
            configurable: !0,
            get: function () {
              He(
                "Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          }),
        i.noExitRuntime,
        Object.getOwnPropertyDescriptor(i, "noExitRuntime") ||
          Object.defineProperty(i, "noExitRuntime", {
            configurable: !0,
            get: function () {
              He(
                "Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
              );
            },
          });
      var v,
        b = {
          Memory: function (En) {
            this.buffer = new ArrayBuffer(65536 * En.initial);
          },
          Module: function (En) {},
          Instance: function (En, Zn) {
            this.exports = (function (on) {
              for (var rn, It = new Uint8Array(123), wt = 25; wt >= 0; --wt)
                (It[48 + wt] = 52 + wt),
                  (It[65 + wt] = wt),
                  (It[97 + wt] = 26 + wt);
              function Mt(ye, Gn, Ht) {
                for (
                  var yr,
                    T,
                    Jn = 0,
                    pr = Gn,
                    Ut = Ht.length,
                    Dt =
                      Gn +
                      ((3 * Ut) >> 2) -
                      (Ht[Ut - 2] == "=") -
                      (Ht[Ut - 1] == "=");
                  Jn < Ut;
                  Jn += 4
                )
                  (yr = It[Ht.charCodeAt(Jn + 1)]),
                    (T = It[Ht.charCodeAt(Jn + 2)]),
                    (ye[pr++] = (It[Ht.charCodeAt(Jn)] << 2) | (yr >> 4)),
                    pr < Dt && (ye[pr++] = (yr << 4) | (T >> 2)),
                    pr < Dt &&
                      (ye[pr++] = (T << 6) | It[Ht.charCodeAt(Jn + 3)]);
              }
              (It[43] = 62), (It[47] = 63);
              var Wt = new ArrayBuffer(16),
                Ft = new Int32Array(Wt),
                un = new Float64Array(Wt);
              function Yt(ye) {
                return Ft[ye];
              }
              function Qt(ye, Gn) {
                Ft[ye] = Gn;
              }
              function Sn() {
                return un[0];
              }
              function ar(ye) {
                un[0] = ye;
              }
              return (function (ye) {
                var Gn = ye.memory.buffer,
                  Ht = new Int8Array(Gn),
                  yr = new Int16Array(Gn),
                  T = new Int32Array(Gn),
                  Jn = new Uint8Array(Gn),
                  pr = new Uint16Array(Gn),
                  Ut = new Uint32Array(Gn),
                  Dt = new Float32Array(Gn),
                  Kt = new Float64Array(Gn),
                  vn = Math.imul,
                  st = Math.fround,
                  Xt = Math.abs,
                  qn = Math.clz32,
                  cr = Math.min,
                  Ui = Math.floor,
                  Je = Math.ceil,
                  sn = Math.sqrt,
                  Ye = ye.abort,
                  Ct = ye.gettimeofday,
                  At = ye.__assert_fail,
                  Pn = ye.__cxa_allocate_exception,
                  Xn = ye.__cxa_throw,
                  wn = ye.fd_write,
                  Vn = ye.abort,
                  Ot = ye.emscripten_resize_heap,
                  _n = ye.emscripten_memcpy_big,
                  gr = ye.setTempRet0,
                  ut = 5254496,
                  Si = 0,
                  cn = 0;
                function ir(A) {
                  var C,
                    V = 0,
                    j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0,
                    Bt = 0,
                    mn = 0;
                  ut = C = (ut - 16) | 0;
                  e: {
                    t: {
                      n: {
                        i: {
                          a: {
                            l: {
                              r: {
                                o: {
                                  c: {
                                    s: {
                                      u: {
                                        if ((A |= 0) >>> 0 <= 244) {
                                          if (
                                            3 &
                                            (V =
                                              ((ge = T[2778]) >>>
                                                (j =
                                                  ((et =
                                                    A >>> 0 < 11
                                                      ? 16
                                                      : (A + 11) & -8) >>>
                                                    3) |
                                                  0)) |
                                              0)
                                          ) {
                                            (A =
                                              ((Ee =
                                                T[
                                                  ((V =
                                                    (ae =
                                                      (j + (1 & (-1 ^ V))) |
                                                      0) << 3) +
                                                    11160) >>
                                                    2
                                                ]) +
                                                8) |
                                              0),
                                              (0 | (j = T[(Ee + 8) >> 2])) !=
                                              (0 | (V = (V + 11152) | 0))
                                                ? ((T[(j + 12) >> 2] = V),
                                                  (T[(V + 8) >> 2] = j))
                                                : (T[2778] = $l(ae) & ge),
                                              (V = ae << 3),
                                              (T[(Ee + 4) >> 2] = 3 | V),
                                              (T[
                                                ((V = (V + Ee) | 0) + 4) >> 2
                                              ] = 1 | T[(V + 4) >> 2]);
                                            break e;
                                          }
                                          if ((mn = T[2780]) >>> 0 >= et >>> 0)
                                            break u;
                                          if (V) {
                                            (j = A =
                                              ((V =
                                                (((0 -
                                                  (A =
                                                    ((0 - (A = 2 << j)) | A) &
                                                    (V << j))) &
                                                  A) -
                                                  1) |
                                                0) >>>
                                                12) &
                                              16),
                                              (j |= A =
                                                ((V = (V >>> A) | 0) >>> 5) &
                                                8),
                                              (j |= A =
                                                ((V = (V >>> A) | 0) >>> 2) &
                                                4),
                                              (Le =
                                                T[
                                                  ((A =
                                                    (j =
                                                      (((j |= A =
                                                        ((V = (V >>> A) | 0) >>>
                                                          1) &
                                                        2) |
                                                        (A =
                                                          ((V =
                                                            (V >>> A) | 0) >>>
                                                            1) &
                                                          1)) +
                                                        ((V >>> A) | 0)) |
                                                      0) << 3) +
                                                    11160) >>
                                                    2
                                                ]),
                                              (0 | (V = T[(Le + 8) >> 2])) !=
                                              (0 | (A = (A + 11152) | 0))
                                                ? ((T[(V + 12) >> 2] = A),
                                                  (T[(A + 8) >> 2] = V))
                                                : ((ge = $l(j) & ge),
                                                  (T[2778] = ge)),
                                              (A = (Le + 8) | 0),
                                              (T[(Le + 4) >> 2] = 3 | et),
                                              (Ee = ((V = j << 3) - et) | 0),
                                              (T[
                                                ((ae = (Le + et) | 0) + 4) >> 2
                                              ] = 1 | Ee),
                                              (T[(V + Le) >> 2] = Ee),
                                              mn &&
                                                ((j =
                                                  (11152 +
                                                    ((V = (mn >>> 3) | 0) <<
                                                      3)) |
                                                  0),
                                                (Le = T[2783]),
                                                (V = 1 << V) & ge
                                                  ? (V = T[(j + 8) >> 2])
                                                  : ((T[2778] = V | ge),
                                                    (V = j)),
                                                (T[(j + 8) >> 2] = Le),
                                                (T[(V + 12) >> 2] = Le),
                                                (T[(Le + 12) >> 2] = j),
                                                (T[(Le + 8) >> 2] = V)),
                                              (T[2783] = ae),
                                              (T[2780] = Ee);
                                            break e;
                                          }
                                          if (!(Bt = T[2779])) break u;
                                          for (
                                            j = A =
                                              ((V =
                                                ((Bt & (0 - Bt)) - 1) | 0) >>>
                                                12) &
                                              16,
                                              j |= A =
                                                ((V = (V >>> A) | 0) >>> 5) & 8,
                                              j |= A =
                                                ((V = (V >>> A) | 0) >>> 2) & 4,
                                              V =
                                                T[
                                                  (11416 +
                                                    ((((j |= A =
                                                      ((V = (V >>> A) | 0) >>>
                                                        1) &
                                                      2) |
                                                      (A =
                                                        ((V = (V >>> A) | 0) >>>
                                                          1) &
                                                        1)) +
                                                      ((V >>> A) | 0)) <<
                                                      2)) >>
                                                    2
                                                ],
                                              ae =
                                                ((-8 & T[(V + 4) >> 2]) - et) |
                                                0,
                                              j = V;
                                            (A = T[(j + 16) >> 2]) ||
                                            (A = T[(j + 20) >> 2]);

                                          )
                                            (ae = (Ee =
                                              (j =
                                                ((-8 & T[(A + 4) >> 2]) - et) |
                                                0) >>>
                                                0 <
                                              ae >>> 0)
                                              ? j
                                              : ae),
                                              (V = Ee ? A : V),
                                              (j = A);
                                          if (
                                            ((yt = T[(V + 24) >> 2]),
                                            (0 | (Ee = T[(V + 12) >> 2])) !=
                                              (0 | V))
                                          ) {
                                            (A = T[(V + 8) >> 2]),
                                              (T[(A + 12) >> 2] = Ee),
                                              (T[(Ee + 8) >> 2] = A);
                                            break t;
                                          }
                                          if (
                                            !(A = T[(j = (V + 20) | 0) >> 2])
                                          ) {
                                            if (!(A = T[(V + 16) >> 2]))
                                              break s;
                                            j = (V + 16) | 0;
                                          }
                                          for (
                                            ;
                                            (Le = j),
                                              (Ee = A),
                                              (A =
                                                T[(j = (A + 20) | 0) >> 2]) ||
                                                ((j = (Ee + 16) | 0),
                                                (A = T[(Ee + 16) >> 2]));

                                          );
                                          T[Le >> 2] = 0;
                                          break t;
                                        }
                                        if (
                                          ((et = -1),
                                          !(A >>> 0 > 4294967231) &&
                                            ((et = -8 & (A = (A + 11) | 0)),
                                            (Bt = T[2779])))
                                        ) {
                                          (ae = (0 - et) | 0),
                                            (ge = 0),
                                            et >>> 0 < 256 ||
                                              ((ge = 31),
                                              et >>> 0 > 16777215 ||
                                                ((A = (A >>> 8) | 0),
                                                (A <<= Le =
                                                  ((A + 1048320) >>> 16) & 8),
                                                (ge =
                                                  (28 +
                                                    (((A =
                                                      (((((A <<= j =
                                                        ((A + 520192) >>> 16) &
                                                        4) <<
                                                        (V =
                                                          ((A + 245760) >>>
                                                            16) &
                                                          2)) >>>
                                                        15) |
                                                        0) -
                                                        (V | j | Le)) |
                                                      0) <<
                                                      1) |
                                                      ((et >>> (A + 21)) &
                                                        1))) |
                                                  0)));
                                          d: {
                                            f: {
                                              if (
                                                (j =
                                                  T[(11416 + (ge << 2)) >> 2])
                                              )
                                                for (
                                                  A = 0,
                                                    V =
                                                      et <<
                                                      ((0 | ge) == 31
                                                        ? 0
                                                        : (25 -
                                                            ((ge >>> 1) | 0)) |
                                                          0);
                                                  ;

                                                ) {
                                                  if (
                                                    !(
                                                      (Le =
                                                        ((-8 &
                                                          T[(j + 4) >> 2]) -
                                                          et) |
                                                        0) >>>
                                                        0 >=
                                                        ae >>> 0 ||
                                                      ((Ee = j), (ae = Le))
                                                    )
                                                  ) {
                                                    (ae = 0), (A = j);
                                                    break f;
                                                  }
                                                  if (
                                                    ((Le = T[(j + 20) >> 2]),
                                                    (j =
                                                      T[
                                                        (16 +
                                                          ((((V >>> 29) & 4) +
                                                            j) |
                                                            0)) >>
                                                          2
                                                      ]),
                                                    (A = Le
                                                      ? (0 | Le) == (0 | j)
                                                        ? A
                                                        : Le
                                                      : A),
                                                    (V <<= 1),
                                                    !j)
                                                  )
                                                    break;
                                                }
                                              else A = 0;
                                              if (!(A | Ee)) {
                                                if (
                                                  ((Ee = 0),
                                                  !(A =
                                                    ((0 - (A = 2 << ge)) | A) &
                                                    Bt))
                                                )
                                                  break u;
                                                (j = A =
                                                  ((V =
                                                    ((A & (0 - A)) - 1) | 0) >>>
                                                    12) &
                                                  16),
                                                  (j |= A =
                                                    ((V = (V >>> A) | 0) >>>
                                                      5) &
                                                    8),
                                                  (j |= A =
                                                    ((V = (V >>> A) | 0) >>>
                                                      2) &
                                                    4),
                                                  (A =
                                                    T[
                                                      (11416 +
                                                        ((((j |= A =
                                                          ((V =
                                                            (V >>> A) | 0) >>>
                                                            1) &
                                                          2) |
                                                          (A =
                                                            ((V =
                                                              (V >>> A) | 0) >>>
                                                              1) &
                                                            1)) +
                                                          ((V >>> A) | 0)) <<
                                                          2)) >>
                                                        2
                                                    ]);
                                              }
                                              if (!A) break d;
                                            }
                                            for (
                                              ;
                                              (ae = (j =
                                                (V =
                                                  ((-8 & T[(A + 4) >> 2]) -
                                                    et) |
                                                  0) >>>
                                                  0 <
                                                ae >>> 0)
                                                ? V
                                                : ae),
                                                (Ee = j ? A : Ee),
                                                (A =
                                                  (V = T[(A + 16) >> 2]) ||
                                                  T[(A + 20) >> 2]);

                                            );
                                          }
                                          if (
                                            !(
                                              !Ee |
                                              ((T[2780] - et) >>> 0 <= ae >>> 0)
                                            )
                                          ) {
                                            if (
                                              ((ge = T[(Ee + 24) >> 2]),
                                              (0 | Ee) !=
                                                (0 | (V = T[(Ee + 12) >> 2])))
                                            ) {
                                              (A = T[(Ee + 8) >> 2]),
                                                (T[(A + 12) >> 2] = V),
                                                (T[(V + 8) >> 2] = A);
                                              break n;
                                            }
                                            if (
                                              !(A = T[(j = (Ee + 20) | 0) >> 2])
                                            ) {
                                              if (!(A = T[(Ee + 16) >> 2]))
                                                break c;
                                              j = (Ee + 16) | 0;
                                            }
                                            for (
                                              ;
                                              (Le = j),
                                                (V = A),
                                                (A =
                                                  T[(j = (A + 20) | 0) >> 2]) ||
                                                  ((j = (V + 16) | 0),
                                                  (A = T[(V + 16) >> 2]));

                                            );
                                            T[Le >> 2] = 0;
                                            break n;
                                          }
                                        }
                                      }
                                      if ((j = T[2780]) >>> 0 >= et >>> 0) {
                                        (ae = T[2783]),
                                          (V = (j - et) | 0) >>> 0 >= 16
                                            ? ((T[2780] = V),
                                              (A = (ae + et) | 0),
                                              (T[2783] = A),
                                              (T[(A + 4) >> 2] = 1 | V),
                                              (T[(j + ae) >> 2] = V),
                                              (T[(ae + 4) >> 2] = 3 | et))
                                            : ((T[2783] = 0),
                                              (T[2780] = 0),
                                              (T[(ae + 4) >> 2] = 3 | j),
                                              (T[
                                                ((A = (j + ae) | 0) + 4) >> 2
                                              ] = 1 | T[(A + 4) >> 2])),
                                          (A = (ae + 8) | 0);
                                        break e;
                                      }
                                      if ((yt = T[2781]) >>> 0 > et >>> 0) {
                                        (V = (yt - et) | 0),
                                          (T[2781] = V),
                                          (A = ((j = T[2784]) + et) | 0),
                                          (T[2784] = A),
                                          (T[(A + 4) >> 2] = 1 | V),
                                          (T[(j + 4) >> 2] = 3 | et),
                                          (A = (j + 8) | 0);
                                        break e;
                                      }
                                      if (
                                        ((A = 0),
                                        (V = Bt = (et + 47) | 0),
                                        T[2896]
                                          ? (j = T[2898])
                                          : ((T[2899] = -1),
                                            (T[2900] = -1),
                                            (T[2897] = 4096),
                                            (T[2898] = 4096),
                                            (T[2896] =
                                              ((C + 12) & -16) ^ 1431655768),
                                            (T[2901] = 0),
                                            (T[2889] = 0),
                                            (j = 4096)),
                                        (j =
                                          (Le = (V + j) | 0) &
                                          (Ee = (0 - j) | 0)) >>>
                                          0 <=
                                          et >>> 0 ||
                                          ((ae = T[2888]) &&
                                            (ae >>> 0 <
                                              (ge = ((V = T[2886]) + j) | 0) >>>
                                                0) |
                                              (V >>> 0 >= ge >>> 0)))
                                      )
                                        break e;
                                      if (4 & Jn[11556]) break l;
                                      u: {
                                        d: {
                                          if ((ae = T[2784]))
                                            for (A = 11560; ; ) {
                                              if (
                                                ((V = T[A >> 2]) >>> 0 <=
                                                  ae >>> 0) &
                                                (ae >>> 0 <
                                                  (V + T[(A + 4) >> 2]) >>> 0)
                                              )
                                                break d;
                                              if (!(A = T[(A + 8) >> 2])) break;
                                            }
                                          if (
                                            (0 | (V = ep(0))) == -1 ||
                                            ((ge = j),
                                            (A = ((ae = T[2897]) - 1) | 0) &
                                              V &&
                                              (ge =
                                                (((j - V) | 0) +
                                                  ((A + V) & (0 - ae))) |
                                                0),
                                            (ge >>> 0 <= et >>> 0) |
                                              (ge >>> 0 > 2147483646)) ||
                                            ((ae = T[2888]) &&
                                              (ae >>> 0 <
                                                (Ee =
                                                  ((A = T[2886]) + ge) | 0) >>>
                                                  0) |
                                                (A >>> 0 >= Ee >>> 0))
                                          )
                                            break r;
                                          if ((0 | V) != (0 | (A = ep(ge))))
                                            break u;
                                          break a;
                                        }
                                        if (
                                          (ge = Ee & (Le - yt)) >>> 0 >
                                          2147483646
                                        )
                                          break r;
                                        if (
                                          (0 | (V = ep(ge))) ==
                                          ((T[A >> 2] + T[(A + 4) >> 2]) | 0)
                                        )
                                          break o;
                                        A = V;
                                      }
                                      if (
                                        !(
                                          ((0 | A) == -1) |
                                          ((et + 48) >>> 0 <= ge >>> 0)
                                        )
                                      ) {
                                        if (
                                          (V =
                                            ((V = T[2898]) + ((Bt - ge) | 0)) &
                                            (0 - V)) >>>
                                            0 >
                                          2147483646
                                        ) {
                                          V = A;
                                          break a;
                                        }
                                        if ((0 | ep(V)) != -1) {
                                          (ge = (V + ge) | 0), (V = A);
                                          break a;
                                        }
                                        ep((0 - ge) | 0);
                                        break r;
                                      }
                                      if (((V = A), (0 | A) != -1)) break a;
                                      break r;
                                    }
                                    Ee = 0;
                                    break t;
                                  }
                                  V = 0;
                                  break n;
                                }
                                if ((0 | V) != -1) break a;
                              }
                              T[2889] = 4 | T[2889];
                            }
                            if (
                              j >>> 0 > 2147483646 ||
                              ((0 | (V = ep(j))) == -1) |
                                ((0 | (A = ep(0))) == -1) |
                                (A >>> 0 <= V >>> 0) ||
                              (ge = (A - V) | 0) >>> 0 <= (et + 40) >>> 0
                            )
                              break i;
                          }
                          (A = (T[2886] + ge) | 0),
                            (T[2886] = A),
                            A >>> 0 > Ut[2887] && (T[2887] = A);
                          a: {
                            l: {
                              r: {
                                if ((Le = T[2784])) {
                                  for (A = 11560; ; ) {
                                    if (
                                      (((ae = T[A >> 2]) +
                                        (j = T[(A + 4) >> 2])) |
                                        0) ==
                                      (0 | V)
                                    )
                                      break r;
                                    if (!(A = T[(A + 8) >> 2])) break;
                                  }
                                  break l;
                                }
                                for (
                                  ((A = T[2782]) >>> 0 <= V >>> 0 && A) ||
                                    (T[2782] = V),
                                    A = 0,
                                    T[2891] = ge,
                                    T[2890] = V,
                                    T[2786] = -1,
                                    T[2787] = T[2896],
                                    T[2893] = 0;
                                  (j = ((ae = A << 3) + 11152) | 0),
                                    (T[(ae + 11160) >> 2] = j),
                                    (T[(ae + 11164) >> 2] = j),
                                    (0 | (A = (A + 1) | 0)) != 32;

                                );
                                (j =
                                  ((ae = (ge - 40) | 0) -
                                    (A = (V + 8) & 7 ? (-8 - V) & 7 : 0)) |
                                  0),
                                  (T[2781] = j),
                                  (A = (A + V) | 0),
                                  (T[2784] = A),
                                  (T[(A + 4) >> 2] = 1 | j),
                                  (T[(4 + ((V + ae) | 0)) >> 2] = 40),
                                  (T[2785] = T[2900]);
                                break a;
                              }
                              if (
                                !(
                                  (8 & Jn[(A + 12) | 0]) |
                                  (ae >>> 0 > Le >>> 0) |
                                  (V >>> 0 <= Le >>> 0)
                                )
                              ) {
                                (T[(A + 4) >> 2] = j + ge),
                                  (j =
                                    ((A = (Le + 8) & 7 ? (-8 - Le) & 7 : 0) +
                                      Le) |
                                    0),
                                  (T[2784] = j),
                                  (A = ((V = (T[2781] + ge) | 0) - A) | 0),
                                  (T[2781] = A),
                                  (T[(j + 4) >> 2] = 1 | A),
                                  (T[(4 + ((V + Le) | 0)) >> 2] = 40),
                                  (T[2785] = T[2900]);
                                break a;
                              }
                            }
                            Ut[2782] > V >>> 0 && (T[2782] = V),
                              (j = (V + ge) | 0),
                              (A = 11560);
                            l: {
                              r: {
                                o: {
                                  c: {
                                    s: {
                                      u: {
                                        for (;;) {
                                          if ((0 | j) != T[A >> 2]) {
                                            if ((A = T[(A + 8) >> 2])) continue;
                                            break u;
                                          }
                                          break;
                                        }
                                        if (!(8 & Jn[(A + 12) | 0])) break s;
                                      }
                                      for (A = 11560; ; ) {
                                        if (
                                          (j = T[A >> 2]) >>> 0 <= Le >>> 0 &&
                                          (Ee = (j + T[(A + 4) >> 2]) | 0) >>>
                                            0 >
                                            Le >>> 0
                                        )
                                          break c;
                                        A = T[(A + 8) >> 2];
                                      }
                                    }
                                    if (
                                      ((T[A >> 2] = V),
                                      (T[(A + 4) >> 2] = T[(A + 4) >> 2] + ge),
                                      (T[
                                        ((Bt =
                                          (((V + 8) & 7 ? (-8 - V) & 7 : 0) +
                                            V) |
                                          0) +
                                          4) >>
                                          2
                                      ] = 3 | et),
                                      (j =
                                        ((ge =
                                          (j +
                                            ((j + 8) & 7 ? (-8 - j) & 7 : 0)) |
                                          0) -
                                          (yt = (et + Bt) | 0)) |
                                        0),
                                      (0 | ge) == (0 | Le))
                                    ) {
                                      (T[2784] = yt),
                                        (A = (T[2781] + j) | 0),
                                        (T[2781] = A),
                                        (T[(yt + 4) >> 2] = 1 | A);
                                      break r;
                                    }
                                    if (T[2783] == (0 | ge)) {
                                      (T[2783] = yt),
                                        (A = (T[2780] + j) | 0),
                                        (T[2780] = A),
                                        (T[(yt + 4) >> 2] = 1 | A),
                                        (T[(A + yt) >> 2] = A);
                                      break r;
                                    }
                                    if ((3 & (A = T[(ge + 4) >> 2])) == 1) {
                                      Le = -8 & A;
                                      s: if (A >>> 0 <= 255) {
                                        if (
                                          ((ae = T[(ge + 8) >> 2]),
                                          (A = (A >>> 3) | 0),
                                          (0 | (V = T[(ge + 12) >> 2])) ==
                                            (0 | ae))
                                        ) {
                                          T[2778] = T[2778] & $l(A);
                                          break s;
                                        }
                                        (T[(ae + 12) >> 2] = V),
                                          (T[(V + 8) >> 2] = ae);
                                      } else {
                                        if (
                                          ((et = T[(ge + 24) >> 2]),
                                          (0 | ge) ==
                                            (0 | (V = T[(ge + 12) >> 2])))
                                        )
                                          if (
                                            (ae =
                                              T[(A = (ge + 20) | 0) >> 2]) ||
                                            (ae = T[(A = (ge + 16) | 0) >> 2])
                                          ) {
                                            for (
                                              ;
                                              (Ee = A),
                                                (ae =
                                                  T[
                                                    (A = ((V = ae) + 20) | 0) >>
                                                      2
                                                  ]) ||
                                                  ((A = (V + 16) | 0),
                                                  (ae = T[(V + 16) >> 2]));

                                            );
                                            T[Ee >> 2] = 0;
                                          } else V = 0;
                                        else
                                          (A = T[(ge + 8) >> 2]),
                                            (T[(A + 12) >> 2] = V),
                                            (T[(V + 8) >> 2] = A);
                                        if (et) {
                                          ae = T[(ge + 28) >> 2];
                                          u: {
                                            if (
                                              T[
                                                (A = (11416 + (ae << 2)) | 0) >>
                                                  2
                                              ] ==
                                              (0 | ge)
                                            ) {
                                              if (((T[A >> 2] = V), V)) break u;
                                              T[2779] = T[2779] & $l(ae);
                                              break s;
                                            }
                                            if (
                                              ((T[
                                                (et +
                                                  (T[(et + 16) >> 2] == (0 | ge)
                                                    ? 16
                                                    : 20)) >>
                                                  2
                                              ] = V),
                                              !V)
                                            )
                                              break s;
                                          }
                                          (T[(V + 24) >> 2] = et),
                                            (A = T[(ge + 16) >> 2]) &&
                                              ((T[(V + 16) >> 2] = A),
                                              (T[(A + 24) >> 2] = V)),
                                            (A = T[(ge + 20) >> 2]) &&
                                              ((T[(V + 20) >> 2] = A),
                                              (T[(A + 24) >> 2] = V));
                                        }
                                      }
                                      (ge = (ge + Le) | 0), (j = (j + Le) | 0);
                                    }
                                    if (
                                      ((T[(ge + 4) >> 2] =
                                        -2 & T[(ge + 4) >> 2]),
                                      (T[(yt + 4) >> 2] = 1 | j),
                                      (T[(j + yt) >> 2] = j),
                                      j >>> 0 <= 255)
                                    ) {
                                      (V =
                                        (11152 + ((A = (j >>> 3) | 0) << 3)) |
                                        0),
                                        (j = T[2778]) & (A = 1 << A)
                                          ? (A = T[(V + 8) >> 2])
                                          : ((T[2778] = A | j), (A = V)),
                                        (T[(V + 8) >> 2] = yt),
                                        (T[(A + 12) >> 2] = yt),
                                        (T[(yt + 12) >> 2] = V),
                                        (T[(yt + 8) >> 2] = A);
                                      break r;
                                    }
                                    if (
                                      ((A = 31),
                                      j >>> 0 <= 16777215 &&
                                        ((A = (j >>> 8) | 0),
                                        (A <<= Ee = ((A + 1048320) >>> 16) & 8),
                                        (A =
                                          (28 +
                                            (((A =
                                              (((((A <<= ae =
                                                ((A + 520192) >>> 16) & 4) <<
                                                (V =
                                                  ((A + 245760) >>> 16) &
                                                  2)) >>>
                                                15) |
                                                0) -
                                                (V | ae | Ee)) |
                                              0) <<
                                              1) |
                                              ((j >>> (A + 21)) & 1))) |
                                          0)),
                                      (T[(yt + 28) >> 2] = A),
                                      (T[(yt + 16) >> 2] = 0),
                                      (T[(yt + 20) >> 2] = 0),
                                      (Ee = (11416 + (A << 2)) | 0),
                                      (ae = T[2779]) & (V = 1 << A))
                                    ) {
                                      for (
                                        A =
                                          j <<
                                          ((0 | A) == 31
                                            ? 0
                                            : (25 - ((A >>> 1) | 0)) | 0),
                                          V = T[Ee >> 2];
                                        ;

                                      ) {
                                        if (
                                          ((ae = V),
                                          (-8 & T[(V + 4) >> 2]) == (0 | j))
                                        )
                                          break o;
                                        if (
                                          ((V = (A >>> 29) | 0),
                                          (A <<= 1),
                                          !(V =
                                            T[
                                              ((Ee = (ae + (4 & V)) | 0) +
                                                16) >>
                                                2
                                            ]))
                                        )
                                          break;
                                      }
                                      (T[(Ee + 16) >> 2] = yt),
                                        (T[(yt + 24) >> 2] = ae);
                                    } else
                                      (T[2779] = V | ae),
                                        (T[Ee >> 2] = yt),
                                        (T[(yt + 24) >> 2] = Ee);
                                    (T[(yt + 12) >> 2] = yt),
                                      (T[(yt + 8) >> 2] = yt);
                                    break r;
                                  }
                                  for (
                                    j =
                                      ((ae = (ge - 40) | 0) -
                                        (A = (V + 8) & 7 ? (-8 - V) & 7 : 0)) |
                                      0,
                                      T[2781] = j,
                                      A = (A + V) | 0,
                                      T[2784] = A,
                                      T[(A + 4) >> 2] = 1 | j,
                                      T[(4 + ((V + ae) | 0)) >> 2] = 40,
                                      T[2785] = T[2900],
                                      T[
                                        ((j =
                                          (A =
                                            (((Ee +
                                              ((Ee - 39) & 7
                                                ? (39 - Ee) & 7
                                                : 0)) |
                                              0) -
                                              47) |
                                            0) >>>
                                            0 <
                                          (Le + 16) >>> 0
                                            ? Le
                                            : A) +
                                          4) >>
                                          2
                                      ] = 27,
                                      A = T[2893],
                                      T[(j + 16) >> 2] = T[2892],
                                      T[(j + 20) >> 2] = A,
                                      A = T[2891],
                                      T[(j + 8) >> 2] = T[2890],
                                      T[(j + 12) >> 2] = A,
                                      T[2892] = j + 8,
                                      T[2891] = ge,
                                      T[2890] = V,
                                      T[2893] = 0,
                                      A = (j + 24) | 0;
                                    (T[(A + 4) >> 2] = 7),
                                      (V = (A + 8) | 0),
                                      (A = (A + 4) | 0),
                                      V >>> 0 < Ee >>> 0;

                                  );
                                  if ((0 | j) == (0 | Le)) break a;
                                  if (
                                    ((T[(j + 4) >> 2] = -2 & T[(j + 4) >> 2]),
                                    (Ee = (j - Le) | 0),
                                    (T[(Le + 4) >> 2] = 1 | Ee),
                                    (T[j >> 2] = Ee),
                                    Ee >>> 0 <= 255)
                                  ) {
                                    (V =
                                      (11152 + ((A = (Ee >>> 3) | 0) << 3)) |
                                      0),
                                      (j = T[2778]) & (A = 1 << A)
                                        ? (A = T[(V + 8) >> 2])
                                        : ((T[2778] = A | j), (A = V)),
                                      (T[(V + 8) >> 2] = Le),
                                      (T[(A + 12) >> 2] = Le),
                                      (T[(Le + 12) >> 2] = V),
                                      (T[(Le + 8) >> 2] = A);
                                    break a;
                                  }
                                  if (
                                    ((A = 31),
                                    (T[(Le + 16) >> 2] = 0),
                                    (T[(Le + 20) >> 2] = 0),
                                    Ee >>> 0 <= 16777215 &&
                                      ((A = (Ee >>> 8) | 0),
                                      (A <<= ae = ((A + 1048320) >>> 16) & 8),
                                      (A =
                                        (28 +
                                          (((A =
                                            (((((A <<= j =
                                              ((A + 520192) >>> 16) & 4) <<
                                              (V =
                                                ((A + 245760) >>> 16) & 2)) >>>
                                              15) |
                                              0) -
                                              (V | j | ae)) |
                                            0) <<
                                            1) |
                                            ((Ee >>> (A + 21)) & 1))) |
                                        0)),
                                    (T[(Le + 28) >> 2] = A),
                                    (ae = (11416 + (A << 2)) | 0),
                                    (j = T[2779]) & (V = 1 << A))
                                  ) {
                                    for (
                                      A =
                                        Ee <<
                                        ((0 | A) == 31
                                          ? 0
                                          : (25 - ((A >>> 1) | 0)) | 0),
                                        V = T[ae >> 2];
                                      ;

                                    ) {
                                      if (
                                        ((j = V),
                                        (0 | Ee) == (-8 & T[(V + 4) >> 2]))
                                      )
                                        break l;
                                      if (
                                        ((V = (A >>> 29) | 0),
                                        (A <<= 1),
                                        !(V =
                                          T[
                                            ((ae = (j + (4 & V)) | 0) + 16) >> 2
                                          ]))
                                      )
                                        break;
                                    }
                                    (T[(ae + 16) >> 2] = Le),
                                      (T[(Le + 24) >> 2] = j);
                                  } else
                                    (T[2779] = V | j),
                                      (T[ae >> 2] = Le),
                                      (T[(Le + 24) >> 2] = ae);
                                  (T[(Le + 12) >> 2] = Le),
                                    (T[(Le + 8) >> 2] = Le);
                                  break a;
                                }
                                (A = T[(ae + 8) >> 2]),
                                  (T[(A + 12) >> 2] = yt),
                                  (T[(ae + 8) >> 2] = yt),
                                  (T[(yt + 24) >> 2] = 0),
                                  (T[(yt + 12) >> 2] = ae),
                                  (T[(yt + 8) >> 2] = A);
                              }
                              A = (Bt + 8) | 0;
                              break e;
                            }
                            (A = T[(j + 8) >> 2]),
                              (T[(A + 12) >> 2] = Le),
                              (T[(j + 8) >> 2] = Le),
                              (T[(Le + 24) >> 2] = 0),
                              (T[(Le + 12) >> 2] = j),
                              (T[(Le + 8) >> 2] = A);
                          }
                          if (!((A = T[2781]) >>> 0 <= et >>> 0)) {
                            (V = (A - et) | 0),
                              (T[2781] = V),
                              (A = ((j = T[2784]) + et) | 0),
                              (T[2784] = A),
                              (T[(A + 4) >> 2] = 1 | V),
                              (T[(j + 4) >> 2] = 3 | et),
                              (A = (j + 8) | 0);
                            break e;
                          }
                        }
                        (T[2441] = 48), (A = 0);
                        break e;
                      }
                      n: if (ge) {
                        j = T[(Ee + 28) >> 2];
                        i: {
                          if (
                            T[(A = (11416 + (j << 2)) | 0) >> 2] ==
                            (0 | Ee)
                          ) {
                            if (((T[A >> 2] = V), V)) break i;
                            (Bt = $l(j) & Bt), (T[2779] = Bt);
                            break n;
                          }
                          if (
                            ((T[
                              (ge +
                                (T[(ge + 16) >> 2] == (0 | Ee) ? 16 : 20)) >>
                                2
                            ] = V),
                            !V)
                          )
                            break n;
                        }
                        (T[(V + 24) >> 2] = ge),
                          (A = T[(Ee + 16) >> 2]) &&
                            ((T[(V + 16) >> 2] = A), (T[(A + 24) >> 2] = V)),
                          (A = T[(Ee + 20) >> 2]) &&
                            ((T[(V + 20) >> 2] = A), (T[(A + 24) >> 2] = V));
                      }
                      n: if (ae >>> 0 <= 15)
                        (A = (ae + et) | 0),
                          (T[(Ee + 4) >> 2] = 3 | A),
                          (T[((A = (A + Ee) | 0) + 4) >> 2] =
                            1 | T[(A + 4) >> 2]);
                      else if (
                        ((T[(Ee + 4) >> 2] = 3 | et),
                        (T[((ge = (Ee + et) | 0) + 4) >> 2] = 1 | ae),
                        (T[(ae + ge) >> 2] = ae),
                        ae >>> 0 <= 255)
                      )
                        (V = (11152 + ((A = (ae >>> 3) | 0) << 3)) | 0),
                          (j = T[2778]) & (A = 1 << A)
                            ? (A = T[(V + 8) >> 2])
                            : ((T[2778] = A | j), (A = V)),
                          (T[(V + 8) >> 2] = ge),
                          (T[(A + 12) >> 2] = ge),
                          (T[(ge + 12) >> 2] = V),
                          (T[(ge + 8) >> 2] = A);
                      else {
                        (A = 31),
                          ae >>> 0 <= 16777215 &&
                            ((A = (ae >>> 8) | 0),
                            (A <<= Le = ((A + 1048320) >>> 16) & 8),
                            (A =
                              (28 +
                                (((A =
                                  (((((A <<= j = ((A + 520192) >>> 16) & 4) <<
                                    (V = ((A + 245760) >>> 16) & 2)) >>>
                                    15) |
                                    0) -
                                    (V | j | Le)) |
                                  0) <<
                                  1) |
                                  ((ae >>> (A + 21)) & 1))) |
                              0)),
                          (T[(ge + 28) >> 2] = A),
                          (T[(ge + 16) >> 2] = 0),
                          (T[(ge + 20) >> 2] = 0),
                          (V = (11416 + (A << 2)) | 0);
                        i: {
                          if ((j = 1 << A) & Bt) {
                            for (
                              A =
                                ae <<
                                ((0 | A) == 31
                                  ? 0
                                  : (25 - ((A >>> 1) | 0)) | 0),
                                et = T[V >> 2];
                              ;

                            ) {
                              if ((-8 & T[((V = et) + 4) >> 2]) == (0 | ae))
                                break i;
                              if (
                                ((j = (A >>> 29) | 0),
                                (A <<= 1),
                                !(et = T[((j = ((4 & j) + V) | 0) + 16) >> 2]))
                              )
                                break;
                            }
                            T[(j + 16) >> 2] = ge;
                          } else (T[2779] = j | Bt), (T[V >> 2] = ge);
                          (T[(ge + 24) >> 2] = V),
                            (T[(ge + 12) >> 2] = ge),
                            (T[(ge + 8) >> 2] = ge);
                          break n;
                        }
                        (A = T[(V + 8) >> 2]),
                          (T[(A + 12) >> 2] = ge),
                          (T[(V + 8) >> 2] = ge),
                          (T[(ge + 24) >> 2] = 0),
                          (T[(ge + 12) >> 2] = V),
                          (T[(ge + 8) >> 2] = A);
                      }
                      A = (Ee + 8) | 0;
                      break e;
                    }
                    t: if (yt) {
                      j = T[(V + 28) >> 2];
                      n: {
                        if (T[(A = (11416 + (j << 2)) | 0) >> 2] == (0 | V)) {
                          if (((T[A >> 2] = Ee), Ee)) break n;
                          T[2779] = $l(j) & Bt;
                          break t;
                        }
                        if (
                          ((T[
                            (yt + (T[(yt + 16) >> 2] == (0 | V) ? 16 : 20)) >> 2
                          ] = Ee),
                          !Ee)
                        )
                          break t;
                      }
                      (T[(Ee + 24) >> 2] = yt),
                        (A = T[(V + 16) >> 2]) &&
                          ((T[(Ee + 16) >> 2] = A), (T[(A + 24) >> 2] = Ee)),
                        (A = T[(V + 20) >> 2]) &&
                          ((T[(Ee + 20) >> 2] = A), (T[(A + 24) >> 2] = Ee));
                    }
                    ae >>> 0 <= 15
                      ? ((A = (ae + et) | 0),
                        (T[(V + 4) >> 2] = 3 | A),
                        (T[((A = (A + V) | 0) + 4) >> 2] = 1 | T[(A + 4) >> 2]))
                      : ((T[(V + 4) >> 2] = 3 | et),
                        (T[((Ee = (V + et) | 0) + 4) >> 2] = 1 | ae),
                        (T[(ae + Ee) >> 2] = ae),
                        mn &&
                          ((j = (11152 + ((A = (mn >>> 3) | 0) << 3)) | 0),
                          (Le = T[2783]),
                          (A = 1 << A) & ge
                            ? (A = T[(j + 8) >> 2])
                            : ((T[2778] = A | ge), (A = j)),
                          (T[(j + 8) >> 2] = Le),
                          (T[(A + 12) >> 2] = Le),
                          (T[(Le + 12) >> 2] = j),
                          (T[(Le + 8) >> 2] = A)),
                        (T[2783] = Ee),
                        (T[2780] = ae)),
                      (A = (V + 8) | 0);
                  }
                  return (ut = (C + 16) | 0), 0 | A;
                }
                function jr(A, C, V) {
                  var j,
                    ae,
                    ge,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0,
                    Bt = 0,
                    mn = 0,
                    Yn = 0,
                    zr = 0,
                    Zr = 0,
                    fi = 0,
                    Pi = 0,
                    ta = 0,
                    Ji = 0;
                  e: {
                    t: {
                      n: {
                        i: {
                          if ((0 | (Ee = vu(C))) <= 109) {
                            if ((0 | Ee) == 34) break i;
                            if ((0 | Ee) == 91) break t;
                            if ((0 | Ee) != 102) break e;
                            a: {
                              l: {
                                if ((0 | vu(C)) == 102) {
                                  if (
                                    (Zs(C),
                                    !(
                                      yu(C, 97) &&
                                      yu(C, 108) &&
                                      yu(C, 115) &&
                                      yu(C, 101) &&
                                      e2(V, 0)
                                    ))
                                  ) {
                                    if (((V = 3), Bi(A))) break l;
                                    ia(A, V, tc(C)), Bi(A);
                                  }
                                  break a;
                                }
                                At(2352, 1459, 883, 1786), Ye();
                              }
                              At(2242, 1459, 891, 1786), Ye();
                            }
                            return;
                          }
                          if ((0 | Ee) == 123) break n;
                          if ((0 | Ee) != 116) {
                            if ((0 | Ee) != 110) break e;
                            a: {
                              l: {
                                if ((0 | vu(C)) == 110) {
                                  if (
                                    (Zs(C),
                                    yu(C, 117) && yu(C, 108) && yu(C, 108))
                                  )
                                    Kb(Yl((V + 32) | 0));
                                  else {
                                    if (Bi(A)) break l;
                                    ia(A, 3, tc(C)), Bi(A);
                                  }
                                  break a;
                                }
                                At(2335, 1459, 857, 1354), Ye();
                              }
                              At(2242, 1459, 865, 1354), Ye();
                            }
                            return;
                          }
                          a: {
                            l: {
                              if ((0 | vu(C)) == 116) {
                                if (
                                  (Zs(C),
                                  !(
                                    yu(C, 114) &&
                                    yu(C, 117) &&
                                    yu(C, 101) &&
                                    e2(V, 1)
                                  ))
                                ) {
                                  if (((V = 3), Bi(A))) break l;
                                  ia(A, V, tc(C)), Bi(A);
                                }
                                break a;
                              }
                              At(2318, 1459, 870, 1728), Ye();
                            }
                            At(2242, 1459, 878, 1728), Ye();
                          }
                          return;
                        }
                        return void ma(A, C, V);
                      }
                      n: {
                        i: {
                          if ((0 | vu(C)) == 123) {
                            if ((Zs(C), Gv(Yl((V + 32) | 0), 3), xd(C), Bi(A)))
                              break n;
                            if (yu(C, 125)) break i;
                            for (;;) {
                              a: {
                                l: {
                                  r: {
                                    o: {
                                      if ((0 | vu(C)) != 34) {
                                        if (Bi(A)) break o;
                                        if ((ia(A, 4, tc(C)), Bi(A))) break n;
                                      }
                                      if (
                                        (ma(A, C, V), Bi(A) || (xd(C), Bi(A)))
                                      )
                                        break n;
                                      if (!yu(C, 58)) {
                                        if (Bi(A)) break r;
                                        if ((ia(A, 5, tc(C)), Bi(A))) break n;
                                      }
                                      if (
                                        (xd(C),
                                        Bi(A) ||
                                          (jr(A, C, V), Bi(A)) ||
                                          (xd(C), Bi(A)))
                                      )
                                        break n;
                                      if (
                                        ((yt = (yt + 1) | 0),
                                        (0 | (Le = vu(C))) == 44)
                                      )
                                        break l;
                                      if ((0 | Le) == 125 && (Zs(C), Gb(V, yt)))
                                        break n;
                                      if (Bi(A)) break a;
                                      if ((ia(A, 6, tc(C)), !Bi(A))) continue;
                                      break n;
                                    }
                                    At(2242, 1459, 758, 1100), Ye();
                                  }
                                  At(2242, 1459, 767, 1100), Ye();
                                }
                                if ((Zs(C), xd(C), !Bi(A))) continue;
                                break n;
                              }
                              break;
                            }
                            At(2242, 1459, 792, 1100), Ye();
                          }
                          At(2301, 1459, 741, 1100), Ye();
                        }
                        Gb(V, 0);
                      }
                      return;
                    }
                    t: {
                      n: {
                        i: {
                          if ((0 | vu(C)) == 91) {
                            if ((Zs(C), Gv(Yl((V + 32) | 0), 4), xd(C), Bi(A)))
                              break t;
                            if (yu(C, 93)) break n;
                            if ((jr(A, C, V), Bi(A))) break t;
                            for (;;) {
                              if ((xd(C), Bi(A))) break t;
                              yt = (yt + 1) | 0;
                              a: {
                                if (yu(C, 44)) {
                                  if ((xd(C), !Bi(A))) break a;
                                  break t;
                                }
                                if (yu(C, 93) && JE(V, yt)) break t;
                                if (Bi(A)) break i;
                                if ((ia(A, 7, tc(C)), Bi(A))) break t;
                              }
                              if ((jr(A, C, V), Bi(A))) break;
                            }
                            break t;
                          }
                          At(2369, 1459, 809, 1024), Ye();
                        }
                        At(2242, 1459, 842, 1024), Ye();
                      }
                      JE(V, 0);
                    }
                    return;
                  }
                  (ut = j = (ut - 32) | 0),
                    (Ee = (j + 8) | 0),
                    (ae = Bv((j + 16) | 0, C)),
                    (T[Ee >> 2] = ae),
                    (ge = Vm(Ee)),
                    (C = mu(Ee, 45));
                  e: {
                    t: {
                      n: {
                        i: {
                          a: {
                            l: {
                              r: {
                                o: if ((0 | qa(Ee)) != 48)
                                  c: {
                                    s: {
                                      if (
                                        !(
                                          (0 | qa(Ee)) < 49 || (0 | qa(Ee)) > 57
                                        )
                                      ) {
                                        (Bt = (nc(Ee) - 48) | 0), (mn = qa(Ee));
                                        u: {
                                          if (!C) {
                                            if ((0 | mn) > 47) break u;
                                            break c;
                                          }
                                          if ((0 | mn) < 48) break c;
                                          for (;;) {
                                            if ((0 | qa(Ee)) > 57) break o;
                                            if (!(Bt >>> 0 < 214748364)) {
                                              if ((0 | Bt) != 214748364)
                                                break s;
                                              if (!((0 | qa(Ee)) <= 56)) {
                                                Bt = 214748364;
                                                break s;
                                              }
                                            }
                                            if (
                                              ((yt = (yt + 1) | 0),
                                              (Bt =
                                                (((nc(Ee) + vn(Bt, 10)) | 0) -
                                                  48) |
                                                0),
                                              !((0 | qa(Ee)) > 47))
                                            )
                                              break;
                                          }
                                          break o;
                                        }
                                        for (;;) {
                                          if ((0 | qa(Ee)) > 57) break o;
                                          if (!(Bt >>> 0 < 429496729)) {
                                            if ((0 | Bt) != 429496729) break s;
                                            if (!((0 | qa(Ee)) <= 53)) {
                                              Bt = 429496729;
                                              break s;
                                            }
                                          }
                                          if (
                                            ((yt = (yt + 1) | 0),
                                            (Bt =
                                              (((nc(Ee) + vn(Bt, 10)) | 0) -
                                                48) |
                                              0),
                                            !((0 | qa(Ee)) > 47))
                                          )
                                            break;
                                        }
                                        break o;
                                      }
                                      if (!Bi(A)) {
                                        if ((ia(A, 3, Vm(Ee)), Bi(A))) break r;
                                        break o;
                                      }
                                      At(2242, 1459, 1538, 1132), Ye();
                                    }
                                    (et = Bt), (mn = qa(Ee));
                                    s: {
                                      u: {
                                        if (!C) {
                                          if (((Pi = 1), (0 | mn) <= 47))
                                            break o;
                                          for (;;) {
                                            if ((0 | qa(Ee)) > 57) break o;
                                            if (
                                              !(
                                                (((0 | Le) == 429496729) &
                                                  (et >>> 0 < 2576980377)) |
                                                (Le >>> 0 < 429496729)
                                              )
                                            ) {
                                              if (
                                                ((0 | et) != -1717986919) |
                                                ((0 | Le) != 429496729)
                                              )
                                                break u;
                                              if (!((0 | qa(Ee)) <= 53)) {
                                                (et = -1717986919),
                                                  (Le = 429496729);
                                                break u;
                                              }
                                            }
                                            if (
                                              ((Le = cd(et, Le, 10, 0)),
                                              (ta = ((et = cn) + 1) | 0),
                                              (zr = et),
                                              (Le =
                                                (et =
                                                  (Le +
                                                    (mn = (nc(Ee) - 48) | 0)) |
                                                  0) >>>
                                                  0 <
                                                mn >>> 0
                                                  ? ta
                                                  : zr),
                                              (yt = (yt + 1) | 0),
                                              !((0 | qa(Ee)) > 47))
                                            )
                                              break;
                                          }
                                          break s;
                                        }
                                        if (((Pi = 1), (0 | mn) < 48)) break o;
                                        for (;;) {
                                          if ((0 | qa(Ee)) > 57) break o;
                                          if (
                                            !(
                                              (((0 | Le) == 214748364) &
                                                (et >>> 0 < 3435973836)) |
                                              (Le >>> 0 < 214748364)
                                            )
                                          ) {
                                            if (
                                              ((0 | et) != -858993460) |
                                              ((0 | Le) != 214748364)
                                            )
                                              break u;
                                            if (!((0 | qa(Ee)) <= 56)) {
                                              (et = -858993460),
                                                (Le = 214748364);
                                              break u;
                                            }
                                          }
                                          if (
                                            ((Le = cd(et, Le, 10, 0)),
                                            (ta = ((et = cn) + 1) | 0),
                                            (zr = et),
                                            (Le =
                                              (et =
                                                (Le +
                                                  (mn = (nc(Ee) - 48) | 0)) |
                                                0) >>>
                                                0 <
                                              mn >>> 0
                                                ? ta
                                                : zr),
                                            (yt = (yt + 1) | 0),
                                            !((0 | qa(Ee)) > 47))
                                          )
                                            break;
                                        }
                                        break s;
                                      }
                                      if (
                                        ((Yn =
                                          +(et >>> 0) +
                                          4294967296 * +(Le >>> 0)),
                                        (Zr = 1),
                                        !((0 | qa(Ee)) < 48))
                                      )
                                        for (;;) {
                                          if ((0 | qa(Ee)) > 57) break s;
                                          if (
                                            ((Yn =
                                              10 * Yn + +((nc(Ee) - 48) | 0)),
                                            !((0 | qa(Ee)) > 47))
                                          )
                                            break;
                                        }
                                    }
                                  }
                                else nc(Ee);
                                o: if (mu(Ee, 46)) {
                                  if (
                                    !((0 | qa(Ee)) >= 48 && (0 | qa(Ee)) < 58)
                                  ) {
                                    if (Bi(A)) break l;
                                    if ((ia(A, 14, Vm(Ee)), Bi(A))) break r;
                                  }
                                  if (!Zr) {
                                    (et = Pi ? et : Bt), (Le = Pi ? Le : 0);
                                    c: if (!((0 | qa(Ee)) < 48))
                                      for (;;) {
                                        if (
                                          ((0 | qa(Ee)) > 57) |
                                          (Le >>> 0 > 2097151)
                                        )
                                          break c;
                                        if (
                                          ((Le = cd(et, Le, 10, 0)),
                                          (mn = ((et = cn) + 1) | 0),
                                          (zr = et),
                                          (yt =
                                            ((((0 |
                                              (et =
                                                (Le +
                                                  (Zr = (nc(Ee) - 48) | 0)) |
                                                0)) !=
                                              0) |
                                              ((0 |
                                                (Le =
                                                  et >>> 0 < Zr >>> 0
                                                    ? mn
                                                    : zr)) !=
                                                0)) +
                                              yt) |
                                            0),
                                          (fi = (fi - 1) | 0),
                                          !((0 | qa(Ee)) > 47))
                                        )
                                          break;
                                      }
                                    Yn = +(et >>> 0) + 4294967296 * +(Le >>> 0);
                                  }
                                  if ((0 | qa(Ee)) < 48) Zr = 1;
                                  else
                                    for (Zr = 1; ; ) {
                                      if ((0 | qa(Ee)) > 57) break o;
                                      c: if ((0 | yt) <= 16) {
                                        if (
                                          ((fi = (fi - 1) | 0),
                                          !(
                                            (Yn =
                                              10 * Yn + +((nc(Ee) - 48) | 0)) >
                                            0
                                          ))
                                        )
                                          break c;
                                        yt = (yt + 1) | 0;
                                      } else nc(Ee);
                                      if (!((0 | qa(Ee)) > 47)) break;
                                    }
                                }
                                if (mu(Ee, 101) || ((zr = 0), mu(Ee, 69))) {
                                  mu(Ee, 43) || (Ji = mu(Ee, 45));
                                  o: if (
                                    (0 | qa(Ee)) < 48 ||
                                    (0 | qa(Ee)) > 57
                                  ) {
                                    if (Bi(A)) break n;
                                    if ((ia(A, 15, Vm(Ee)), (yt = 0), Bi(A)))
                                      break r;
                                  } else {
                                    if (((yt = (nc(Ee) - 48) | 0), Ji)) {
                                      if ((0 | fi) > 0) break a;
                                      if ((0 | qa(Ee)) < 48) break o;
                                      for (
                                        mn = (((fi + 2147483639) | 0) / 10) | 0;
                                        ;

                                      ) {
                                        if ((0 | qa(Ee)) > 57) break o;
                                        c: if (
                                          !(
                                            (0 | mn) >=
                                              (0 |
                                                (yt =
                                                  (((nc(Ee) + vn(yt, 10)) | 0) -
                                                    48) |
                                                  0)) || (0 | qa(Ee)) < 48
                                          )
                                        )
                                          for (;;) {
                                            if ((0 | qa(Ee)) > 57) break c;
                                            if ((nc(Ee), !((0 | qa(Ee)) > 47)))
                                              break;
                                          }
                                        if (!((0 | qa(Ee)) > 47)) break;
                                      }
                                      break o;
                                    }
                                    if ((0 | qa(Ee)) < 48) break o;
                                    for (mn = (308 - fi) | 0; ; ) {
                                      if ((0 | qa(Ee)) > 57) break o;
                                      if (
                                        (0 | mn) <
                                        (0 |
                                          (yt =
                                            (((nc(Ee) + vn(yt, 10)) | 0) - 48) |
                                            0))
                                      ) {
                                        if (Bi(A)) break i;
                                        if ((ia(A, 13, ge), Bi(A))) break r;
                                      }
                                      if (!((0 | qa(Ee)) > 47)) break;
                                    }
                                  }
                                  (Yn = Zr
                                    ? Yn
                                    : +((Pi ? et : Bt) >>> 0) +
                                      4294967296 * +((Pi ? Le : 0) >>> 0)),
                                    (Zr = 1),
                                    (zr = Ji ? (0 - yt) | 0 : yt);
                                }
                                if (((Ee = zr), Zr)) {
                                  if (
                                    (Yn =
                                      (0 | (Le = (Ee + fi) | 0)) <= -309
                                        ? Wb(Wb(Yn, -308), (Le + 308) | 0)
                                        : Wb(Yn, Le)) > 17976931348623157e292
                                  ) {
                                    if (Bi(A)) break t;
                                    if ((ia(A, 13, ge), Bi(A))) break r;
                                  }
                                  (A = Yl((V + 32) | 0)),
                                    (T[(A + 16) >> 2] = 0),
                                    (T[(A + 20) >> 2] = 0),
                                    (T[(A + 8) >> 2] = 0),
                                    (T[(A + 12) >> 2] = 0),
                                    (Kt[A >> 3] = C ? -Yn : Yn),
                                    (yr[(A + 18) >> 1] = 534);
                                } else if (Pi) {
                                  if (C) {
                                    (A = Yl((V + 32) | 0)),
                                      (T[(A + 16) >> 2] = 0),
                                      (T[(A + 20) >> 2] = 0),
                                      (T[(A + 8) >> 2] = 0),
                                      (T[(A + 12) >> 2] = 0),
                                      (Bt = (0 - et) | 0),
                                      (T[A >> 2] = Bt),
                                      (C =
                                        (0 - ((((0 | et) != 0) + Le) | 0)) | 0),
                                      (T[(A + 4) >> 2] = C),
                                      (yr[(A + 18) >> 1] = 150);
                                    o: {
                                      if (((0 | C) > 0) | ((0 | C) >= 0)) {
                                        if (
                                          ((V = C ? 406 : 470),
                                          (yr[(A + 18) >> 1] = V),
                                          (!C & (Bt >>> 0 > 2147483647)) | C)
                                        )
                                          break o;
                                        V |= 32;
                                      } else if (
                                        ((V = 182),
                                        (((0 | C) == -1) &
                                          (Bt >>> 0 < 2147483648)) |
                                          ((0 | C) != -1))
                                      )
                                        break o;
                                      yr[(A + 18) >> 1] = V;
                                    }
                                    break r;
                                  }
                                  (C = Yl((V + 32) | 0)),
                                    (T[(C + 16) >> 2] = 0),
                                    (T[(C + 20) >> 2] = 0),
                                    (T[(C + 8) >> 2] = 0),
                                    (T[(C + 12) >> 2] = 0),
                                    (T[C >> 2] = et),
                                    (A = Le),
                                    (T[(C + 4) >> 2] = A),
                                    (V =
                                      ((0 | A) > 0) | ((0 | A) >= 0)
                                        ? 406
                                        : 278),
                                    (yr[(C + 18) >> 1] = V),
                                    A ||
                                      ((yr[(C + 18) >> 1] = 64 | V),
                                      (!A & (et >>> 0 > 2147483647)) | A ||
                                        (yr[(C + 18) >> 1] = 96 | V));
                                } else
                                  C
                                    ? ((A = Yl((V + 32) | 0)),
                                      (T[(A + 16) >> 2] = 0),
                                      (T[(A + 20) >> 2] = 0),
                                      (T[(A + 8) >> 2] = 0),
                                      (T[(A + 12) >> 2] = 0),
                                      (C = (0 - Bt) | 0),
                                      (T[A >> 2] = C),
                                      (T[(A + 4) >> 2] = C >> 31),
                                      (yr[(A + 18) >> 1] =
                                        (0 | C) >= 0 ? 502 : 182))
                                    : ((A = Yl((V + 32) | 0)),
                                      (T[(A + 16) >> 2] = 0),
                                      (T[(A + 20) >> 2] = 0),
                                      (T[(A + 8) >> 2] = 0),
                                      (T[(A + 12) >> 2] = 0),
                                      (T[A >> 2] = Bt),
                                      (T[(A + 4) >> 2] = 0),
                                      (yr[(A + 18) >> 1] =
                                        (0 | Bt) >= 0 ? 502 : 470));
                              }
                              ey(ae), (ut = (j + 32) | 0);
                              break e;
                            }
                            At(2242, 1459, 1581, 1132), Ye();
                          }
                          At(1989, 1459, 1645, 1132), Ye();
                        }
                        At(2242, 1459, 1661, 1132), Ye();
                      }
                      At(2242, 1459, 1666, 1132), Ye();
                    }
                    At(2242, 1459, 1713, 1132), Ye();
                  }
                }
                function Yr(A, C, V, j, ae) {
                  var ge,
                    Ee,
                    Le,
                    et = 0,
                    yt = 0,
                    Bt = 0,
                    mn = 0,
                    Yn = 0,
                    zr = 0,
                    Zr = 0,
                    fi = 0,
                    Pi = 0,
                    ta = 0,
                    Ji = 0,
                    bo = 0,
                    Oo = 0,
                    Do = 0;
                  (ut = ge = (ut - 80) | 0),
                    (T[(ge + 76) >> 2] = C),
                    (Le = (ge + 55) | 0),
                    (Ee = (ge + 56) | 0),
                    (C = 0);
                  e: {
                    t: for (;;) {
                      (0 | fi) < 0 ||
                        (((2147483647 - fi) | 0) < (0 | C)
                          ? ((T[2441] = 61), (fi = -1))
                          : (fi = (C + fi) | 0));
                      n: {
                        i: {
                          a: {
                            if (
                              ((mn = T[(ge + 76) >> 2]),
                              (et = Jn[0 | (C = mn)]))
                            )
                              for (;;) {
                                l: {
                                  r: if ((et &= 255)) {
                                    if ((0 | et) != 37) break l;
                                    for (et = C; ; ) {
                                      if (Jn[(C + 1) | 0] != 37) break r;
                                      if (
                                        ((yt = (C + 2) | 0),
                                        (T[(ge + 76) >> 2] = yt),
                                        (et = (et + 1) | 0),
                                        (Yn = Jn[(C + 2) | 0]),
                                        (C = yt),
                                        (0 | Yn) != 37)
                                      )
                                        break;
                                    }
                                  } else et = C;
                                  if (
                                    ((C = (et - mn) | 0), A && rs(A, mn, C), C)
                                  )
                                    continue t;
                                  (ta = -1),
                                    (et = 1),
                                    (yt = ge),
                                    (Ji = !Qh(Ht[(T[(ge + 76) >> 2] + 1) | 0])),
                                    (C = T[(ge + 76) >> 2]),
                                    Ji | (Jn[(C + 2) | 0] != 36) ||
                                      ((ta = (Ht[(C + 1) | 0] - 48) | 0),
                                      (bo = 1),
                                      (et = 3)),
                                    (C = (et + C) | 0),
                                    (T[(yt + 76) >> 2] = C),
                                    (Pi = 0);
                                  r: if (
                                    (yt = ((Bt = Ht[0 | C]) - 32) | 0) >>> 0 >
                                    31
                                  )
                                    et = C;
                                  else if (((et = C), 75913 & (yt = 1 << yt)))
                                    for (;;) {
                                      if (
                                        ((et = (C + 1) | 0),
                                        (T[(ge + 76) >> 2] = et),
                                        (Pi |= yt),
                                        (yt =
                                          ((Bt = Ht[(C + 1) | 0]) - 32) | 0) >>>
                                          0 >=
                                          32)
                                      )
                                        break r;
                                      if (((C = et), !(75913 & (yt = 1 << yt))))
                                        break;
                                    }
                                  r: if ((0 | Bt) != 42) {
                                    if ((0 | (zr = J0((ge + 76) | 0))) < 0)
                                      break a;
                                    C = T[(ge + 76) >> 2];
                                  } else {
                                    if (
                                      ((yt = ge),
                                      Qh(Ht[(et + 1) | 0]) &&
                                        ((C = T[(ge + 76) >> 2]),
                                        Jn[(C + 2) | 0] == 36))
                                    )
                                      (T[
                                        ((((Ht[(C + 1) | 0] << 2) + ae) | 0) -
                                          192) >>
                                          2
                                      ] = 10),
                                        (zr =
                                          T[
                                            ((((Ht[(C + 1) | 0] << 3) + j) |
                                              0) -
                                              384) >>
                                              2
                                          ]),
                                        (bo = 1),
                                        (C = (C + 3) | 0);
                                    else {
                                      if (bo) break a;
                                      (bo = 0),
                                        (zr = 0),
                                        A &&
                                          ((C = T[V >> 2]),
                                          (T[V >> 2] = C + 4),
                                          (zr = T[C >> 2])),
                                        (C = (T[(ge + 76) >> 2] + 1) | 0);
                                    }
                                    if (
                                      ((T[(yt + 76) >> 2] = C), (0 | zr) >= 0)
                                    )
                                      break r;
                                    (zr = (0 - zr) | 0), (Pi |= 8192);
                                  }
                                  Yn = -1;
                                  r: if (Jn[0 | C] == 46)
                                    if (Jn[(C + 1) | 0] != 42)
                                      (T[(ge + 76) >> 2] = C + 1),
                                        (Yn = J0((ge + 76) | 0)),
                                        (C = T[(ge + 76) >> 2]);
                                    else {
                                      if (
                                        Qh(Ht[(C + 2) | 0]) &&
                                        ((C = T[(ge + 76) >> 2]),
                                        Jn[(C + 3) | 0] == 36)
                                      ) {
                                        (T[
                                          ((((Ht[(C + 2) | 0] << 2) + ae) | 0) -
                                            192) >>
                                            2
                                        ] = 10),
                                          (Yn =
                                            T[
                                              ((((Ht[(C + 2) | 0] << 3) + j) |
                                                0) -
                                                384) >>
                                                2
                                            ]),
                                          (C = (C + 4) | 0),
                                          (T[(ge + 76) >> 2] = C);
                                        break r;
                                      }
                                      if (bo) break a;
                                      A
                                        ? ((C = T[V >> 2]),
                                          (T[V >> 2] = C + 4),
                                          (Yn = T[C >> 2]))
                                        : (Yn = 0),
                                        (C = (T[(ge + 76) >> 2] + 2) | 0),
                                        (T[(ge + 76) >> 2] = C);
                                    }
                                  for (et = 0; ; ) {
                                    if (
                                      ((Ji = et),
                                      (Zr = -1),
                                      (Ht[0 | C] - 65) >>> 0 > 57)
                                    )
                                      break e;
                                    if (
                                      ((Bt = (C + 1) | 0),
                                      (T[(ge + 76) >> 2] = Bt),
                                      (et = Ht[0 | C]),
                                      (C = Bt),
                                      !(
                                        ((et =
                                          Jn[
                                            (7919 + ((et + vn(Ji, 58)) | 0)) | 0
                                          ]) -
                                          1) >>>
                                          0 <
                                        8
                                      ))
                                    )
                                      break;
                                  }
                                  r: {
                                    o: {
                                      if ((0 | et) != 19) {
                                        if (!et) break e;
                                        if ((0 | ta) >= 0) {
                                          (T[((ta << 2) + ae) >> 2] = et),
                                            (et =
                                              T[
                                                ((C = ((ta << 3) + j) | 0) +
                                                  4) >>
                                                  2
                                              ]),
                                            (T[(ge + 64) >> 2] = T[C >> 2]),
                                            (T[(ge + 68) >> 2] = et);
                                          break o;
                                        }
                                        if (!A) break n;
                                        j0((ge - -64) | 0, et, V),
                                          (Bt = T[(ge + 76) >> 2]);
                                        break r;
                                      }
                                      if ((0 | ta) >= 0) break e;
                                    }
                                    if (((C = 0), !A)) continue t;
                                  }
                                  (yt = -65537 & Pi),
                                    (et = 8192 & Pi ? yt : Pi),
                                    (Zr = 0),
                                    (ta = 1035),
                                    (Pi = Ee);
                                  r: {
                                    o: {
                                      c: {
                                        s: {
                                          u: {
                                            d: {
                                              f: {
                                                h: {
                                                  p: {
                                                    g: {
                                                      v: {
                                                        b: {
                                                          _: {
                                                            m: {
                                                              T: {
                                                                y: switch (
                                                                  ((C =
                                                                    Ht[
                                                                      (Bt - 1) |
                                                                        0
                                                                    ]),
                                                                  ((C =
                                                                    Ji &&
                                                                    (15 & C) ==
                                                                      3
                                                                      ? -33 & C
                                                                      : C) -
                                                                    88) |
                                                                    0)
                                                                ) {
                                                                  case 11:
                                                                    break r;
                                                                  case 9:
                                                                  case 13:
                                                                  case 14:
                                                                  case 15:
                                                                    break o;
                                                                  case 27:
                                                                    break f;
                                                                  case 12:
                                                                  case 17:
                                                                    break g;
                                                                  case 23:
                                                                    break v;
                                                                  case 0:
                                                                  case 32:
                                                                    break b;
                                                                  case 24:
                                                                    break _;
                                                                  case 22:
                                                                    break m;
                                                                  case 29:
                                                                    break T;
                                                                  case 1:
                                                                  case 2:
                                                                  case 3:
                                                                  case 4:
                                                                  case 5:
                                                                  case 6:
                                                                  case 7:
                                                                  case 8:
                                                                  case 10:
                                                                  case 16:
                                                                  case 18:
                                                                  case 19:
                                                                  case 20:
                                                                  case 21:
                                                                  case 25:
                                                                  case 26:
                                                                  case 28:
                                                                  case 30:
                                                                  case 31:
                                                                    break i;
                                                                  default:
                                                                    break y;
                                                                }
                                                                y: switch (
                                                                  (C - 65) |
                                                                  0
                                                                ) {
                                                                  case 0:
                                                                  case 4:
                                                                  case 5:
                                                                  case 6:
                                                                    break o;
                                                                  case 2:
                                                                    break u;
                                                                  case 1:
                                                                  case 3:
                                                                    break i;
                                                                  default:
                                                                    break y;
                                                                }
                                                                if (
                                                                  (0 | C) ==
                                                                  83
                                                                )
                                                                  break d;
                                                                break i;
                                                              }
                                                              (Bt =
                                                                T[
                                                                  (ge + 64) >> 2
                                                                ]),
                                                                (yt =
                                                                  T[
                                                                    (ge + 68) >>
                                                                      2
                                                                  ]),
                                                                (ta = 1035);
                                                              break p;
                                                            }
                                                            C = 0;
                                                            m: switch (
                                                              255 & Ji
                                                            ) {
                                                              case 0:
                                                              case 1:
                                                              case 6:
                                                                T[
                                                                  T[
                                                                    (ge + 64) >>
                                                                      2
                                                                  ] >> 2
                                                                ] = fi;
                                                                continue t;
                                                              case 2:
                                                                (et =
                                                                  T[
                                                                    (ge + 64) >>
                                                                      2
                                                                  ]),
                                                                  (T[et >> 2] =
                                                                    fi),
                                                                  (T[
                                                                    (et + 4) >>
                                                                      2
                                                                  ] = fi >> 31);
                                                                continue t;
                                                              case 3:
                                                                yr[
                                                                  T[
                                                                    (ge + 64) >>
                                                                      2
                                                                  ] >> 1
                                                                ] = fi;
                                                                continue t;
                                                              case 4:
                                                                Ht[
                                                                  T[
                                                                    (ge + 64) >>
                                                                      2
                                                                  ]
                                                                ] = fi;
                                                                continue t;
                                                              case 7:
                                                                break m;
                                                              default:
                                                                continue t;
                                                            }
                                                            (et =
                                                              T[
                                                                (ge + 64) >> 2
                                                              ]),
                                                              (T[et >> 2] = fi),
                                                              (T[
                                                                (et + 4) >> 2
                                                              ] = fi >> 31);
                                                            continue t;
                                                          }
                                                          (Yn =
                                                            Yn >>> 0 > 8
                                                              ? Yn
                                                              : 8),
                                                            (et |= 8),
                                                            (C = 120);
                                                        }
                                                        if (
                                                          ((mn = Ee),
                                                          (Oo = 32 & C),
                                                          (yt = Ji =
                                                            T[(ge + 68) >> 2]) |
                                                            (Bt =
                                                              T[
                                                                (ge + 64) >> 2
                                                              ]))
                                                        )
                                                          for (
                                                            ;
                                                            (Ht[
                                                              0 |
                                                                (mn =
                                                                  (mn - 1) | 0)
                                                            ] =
                                                              Oo |
                                                              Jn[
                                                                (8448 +
                                                                  (15 & Bt)) |
                                                                  0
                                                              ]),
                                                              (Do =
                                                                (!yt &
                                                                  (Bt >>> 0 >
                                                                    15)) |
                                                                ((0 | yt) !=
                                                                  0)),
                                                              (Ji = yt),
                                                              (yt =
                                                                (yt >>> 4) | 0),
                                                              (Bt =
                                                                ((15 & Ji) <<
                                                                  28) |
                                                                (Bt >>> 4)),
                                                              Do;

                                                          );
                                                        if (
                                                          !(8 & et) |
                                                          !(
                                                            T[(ge + 64) >> 2] |
                                                            T[(ge + 68) >> 2]
                                                          )
                                                        )
                                                          break h;
                                                        (ta =
                                                          (1035 +
                                                            ((C >>> 4) | 0)) |
                                                          0),
                                                          (Zr = 2);
                                                        break h;
                                                      }
                                                      if (
                                                        ((C = Ee),
                                                        (yt = mn =
                                                          T[(ge + 68) >> 2]) |
                                                          (Bt =
                                                            T[(ge + 64) >> 2]))
                                                      )
                                                        for (
                                                          ;
                                                          (Ht[
                                                            0 |
                                                              (C = (C - 1) | 0)
                                                          ] = (7 & Bt) | 48),
                                                            (Ji =
                                                              (!yt &
                                                                (Bt >>> 0 >
                                                                  7)) |
                                                              ((0 | yt) != 0)),
                                                            (mn = yt),
                                                            (yt =
                                                              (yt >>> 3) | 0),
                                                            (Bt =
                                                              ((7 & mn) << 29) |
                                                              (Bt >>> 3)),
                                                            Ji;

                                                        );
                                                      if (((mn = C), !(8 & et)))
                                                        break h;
                                                      Yn =
                                                        (0 |
                                                          (C = (Ee - mn) | 0)) <
                                                        (0 | Yn)
                                                          ? Yn
                                                          : (C + 1) | 0;
                                                      break h;
                                                    }
                                                    (yt = C =
                                                      T[(ge + 68) >> 2]),
                                                      (Bt = T[(ge + 64) >> 2]),
                                                      (0 | C) < 0
                                                        ? ((yt =
                                                            (0 -
                                                              ((yt +
                                                                ((0 | Bt) !=
                                                                  0)) |
                                                                0)) |
                                                            0),
                                                          (Bt = (0 - Bt) | 0),
                                                          (T[(ge + 64) >> 2] =
                                                            Bt),
                                                          (T[(ge + 68) >> 2] =
                                                            yt),
                                                          (Zr = 1),
                                                          (ta = 1035))
                                                        : 2048 & et
                                                        ? ((Zr = 1),
                                                          (ta = 1036))
                                                        : (ta = (Zr = 1 & et)
                                                            ? 1037
                                                            : 1035);
                                                  }
                                                  mn = Jf(Bt, yt, Ee);
                                                }
                                                if (
                                                  ((et =
                                                    (0 | Yn) >= 0
                                                      ? -65537 & et
                                                      : et),
                                                  (yt = C = T[(ge + 68) >> 2]),
                                                  !(
                                                    ((0 |
                                                      (Bt =
                                                        T[(ge + 64) >> 2])) !=
                                                      0) |
                                                    ((0 | C) != 0) |
                                                    Yn
                                                  ))
                                                ) {
                                                  (Yn = 0), (mn = Ee);
                                                  break i;
                                                }
                                                Yn =
                                                  (0 |
                                                    (C =
                                                      (!(yt | Bt) +
                                                        ((Ee - mn) | 0)) |
                                                      0)) <
                                                  (0 | Yn)
                                                    ? Yn
                                                    : C;
                                                break i;
                                              }
                                              Pi = (0 | (C = Yn)) != 0;
                                              f: {
                                                h: {
                                                  p: {
                                                    g: if (
                                                      !(
                                                        !(
                                                          3 &
                                                          (et = mn =
                                                            (et =
                                                              T[
                                                                (ge + 64) >> 2
                                                              ]) || 2048)
                                                        ) | !C
                                                      )
                                                    )
                                                      for (;;) {
                                                        if (!Jn[0 | et])
                                                          break p;
                                                        if (
                                                          ((Pi =
                                                            (0 |
                                                              (C =
                                                                (C - 1) | 0)) !=
                                                            0),
                                                          !(
                                                            3 &
                                                            (et = (et + 1) | 0)
                                                          ))
                                                        )
                                                          break g;
                                                        if (!C) break;
                                                      }
                                                    if (!Pi) break h;
                                                  }
                                                  p: if (
                                                    !(
                                                      !Jn[0 | et] |
                                                      (C >>> 0 < 4)
                                                    )
                                                  )
                                                    for (;;) {
                                                      if (
                                                        (-1 ^
                                                          (Bt = T[et >> 2])) &
                                                        (Bt - 16843009) &
                                                        -2139062144
                                                      )
                                                        break p;
                                                      if (
                                                        ((et = (et + 4) | 0),
                                                        !(
                                                          (C = (C - 4) | 0) >>>
                                                            0 >
                                                          3
                                                        ))
                                                      )
                                                        break;
                                                    }
                                                  if (C)
                                                    for (;;) {
                                                      if (
                                                        ((Bt = et), !Jn[0 | et])
                                                      )
                                                        break f;
                                                      if (
                                                        ((et = (et + 1) | 0),
                                                        !(C = (C - 1) | 0))
                                                      )
                                                        break;
                                                    }
                                                }
                                                Bt = 0;
                                              }
                                              (Pi = Bt || (Yn + mn) | 0),
                                                (et = yt),
                                                (Yn = Bt ? (Bt - mn) | 0 : Yn);
                                              break i;
                                            }
                                            if (Yn) {
                                              C = T[(ge + 64) >> 2];
                                              break s;
                                            }
                                            (C = 0), gu(A, 32, zr, 0, et);
                                            break c;
                                          }
                                          (T[(ge + 12) >> 2] = 0),
                                            (T[(ge + 8) >> 2] =
                                              T[(ge + 64) >> 2]),
                                            (C = (ge + 8) | 0),
                                            (T[(ge + 64) >> 2] = C),
                                            (Yn = -1);
                                        }
                                        (yt = C), (C = 0);
                                        s: {
                                          for (;;) {
                                            if (!(mn = T[yt >> 2])) break s;
                                            if (
                                              !(
                                                (Bt =
                                                  (0 |
                                                    (mn = Cm(
                                                      (ge + 4) | 0,
                                                      mn
                                                    ))) <
                                                  0) |
                                                (mn >>> 0 > (Yn - C) >>> 0)
                                              )
                                            ) {
                                              if (
                                                ((yt = (yt + 4) | 0),
                                                Yn >>> 0 >
                                                  (C = (C + mn) | 0) >>> 0)
                                              )
                                                continue;
                                              break s;
                                            }
                                            break;
                                          }
                                          if (((Zr = -1), Bt)) break e;
                                        }
                                        if ((gu(A, 32, zr, C, et), C))
                                          for (
                                            yt = 0, Bt = T[(ge + 64) >> 2];
                                            ;

                                          ) {
                                            if (
                                              !(mn = T[Bt >> 2]) ||
                                              (0 |
                                                (yt =
                                                  ((mn = Cm((ge + 4) | 0, mn)) +
                                                    yt) |
                                                  0)) >
                                                (0 | C)
                                            )
                                              break c;
                                            if (
                                              (rs(A, (ge + 4) | 0, mn),
                                              (Bt = (Bt + 4) | 0),
                                              !(C >>> 0 > yt >>> 0))
                                            )
                                              break;
                                          }
                                        else C = 0;
                                      }
                                      gu(A, 32, zr, C, 8192 ^ et),
                                        (C = (0 | C) < (0 | zr) ? zr : C);
                                      continue t;
                                    }
                                    C =
                                      0 |
                                      Ao[4](
                                        A,
                                        Kt[(ge + 64) >> 3],
                                        zr,
                                        Yn,
                                        et,
                                        C
                                      );
                                    continue t;
                                  }
                                  (Ht[(ge + 55) | 0] = T[(ge + 64) >> 2]),
                                    (Yn = 1),
                                    (mn = Le),
                                    (et = yt);
                                  break i;
                                }
                                (yt = (C + 1) | 0),
                                  (T[(ge + 76) >> 2] = yt),
                                  (et = Jn[(C + 1) | 0]),
                                  (C = yt);
                              }
                            if (((Zr = fi), A)) break e;
                            if (!bo) break n;
                            for (C = 1; ; ) {
                              if ((A = T[((C << 2) + ae) >> 2])) {
                                if (
                                  (j0(((C << 3) + j) | 0, A, V),
                                  (Zr = 1),
                                  (0 | (C = (C + 1) | 0)) != 10)
                                )
                                  continue;
                                break e;
                              }
                              break;
                            }
                            if (((Zr = 1), C >>> 0 >= 10)) break e;
                            for (;;) {
                              if (T[((C << 2) + ae) >> 2]) break a;
                              if ((0 | (C = (C + 1) | 0)) == 10) break;
                            }
                            break e;
                          }
                          Zr = -1;
                          break e;
                        }
                        gu(
                          A,
                          32,
                          (C =
                            (0 |
                              (yt =
                                ((Yn =
                                  (0 | (Bt = (Pi - mn) | 0)) > (0 | Yn)
                                    ? Bt
                                    : Yn) +
                                  Zr) |
                                0)) >
                            (0 | zr)
                              ? yt
                              : zr),
                          yt,
                          et
                        ),
                          rs(A, ta, Zr),
                          gu(A, 48, C, yt, 65536 ^ et),
                          gu(A, 48, Yn, Bt, 0),
                          rs(A, mn, Bt),
                          gu(A, 32, C, yt, 8192 ^ et);
                        continue;
                      }
                      break;
                    }
                    Zr = 0;
                  }
                  return (ut = (ge + 80) | 0), Zr;
                }
                function Qi(A, C, V) {
                  var j,
                    ae,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0,
                    Bt = 0,
                    mn = st(0),
                    Yn = 0,
                    zr = 0,
                    Zr = 0,
                    fi = 0,
                    Pi = 0,
                    ta = 0,
                    Ji = 0,
                    bo = 0,
                    Oo = 0,
                    Do = 0;
                  if (
                    ((ut = yt = ((ut = j = (ut - 208) | 0) - 16) | 0),
                    (et = K0(1155)),
                    (ut = Ee = (ut - 16) | 0),
                    (ge = ae = (j + 192) | 0),
                    et >>> 0 <= 4294967279
                      ? (et >>> 0 <= 10
                          ? (Jh(ge, et), (Le = ge))
                          : (g_(ge, (Le = Fc((Bt = (Hv(et) + 1) | 0)))),
                            n_(ge, Bt),
                            h_(ge, et)),
                        Bm(Le, 1155, et),
                        (Ht[(Ee + 15) | 0] = 0),
                        iy((Le + et) | 0, (Ee + 15) | 0),
                        (ut = (Ee + 16) | 0))
                      : (jm(), Ye()),
                    (ut = (yt + 16) | 0),
                    (ge = hh()),
                    (et = T[(A + 32) >> 2]),
                    (Le =
                      (cn - ((T[(A + 36) >> 2] + (et >>> 0 > ge >>> 0)) | 0)) |
                      0),
                    (et = (ge - et) | 0),
                    (T[(A + 8) >> 2] = et),
                    (T[(A + 12) >> 2] = Le),
                    (!(Ee = T[(A + 732) >> 2]) & ((0 | (ge = Ee >> 31)) <= 0)) |
                      ((0 | ge) < 0) |
                      (((0 | ge) <= (0 | Le)) & (Ee >>> 0 <= et >>> 0)) |
                      ((0 | ge) < (0 | Le)))
                  ) {
                    if (
                      ((ge = -1),
                      (yt = Ee = (vn(T[(A + 556) >> 2], 1e3) - 2e3) | 0),
                      !(
                        (((0 | (Ee >>= 31)) <= (0 | Le)) &
                          (et >>> 0 >= yt >>> 0)) |
                        ((0 | Ee) < (0 | Le))
                      ))
                    ) {
                      if (
                        ((yt = -1),
                        (et = C),
                        (ge = 0),
                        (0 | (Ee = T[(A + 552) >> 2])) <= 0)
                      )
                        Le = -1;
                      else {
                        Le = (0 | C) < 0;
                        e: {
                          for (;;) {
                            if (!Le) {
                              (Le = T[As((A + 584) | 0, 0) >> 2]),
                                (Ee = T[(A + 552) >> 2]);
                              break e;
                            }
                            if ((0 | (ge = (ge + 1) | 0)) == (0 | Ee)) break;
                          }
                          Le = -1;
                        }
                        if (((ge = 1), !((0 | Ee) <= 1)))
                          for (
                            Ee = (A + 584) | 0, Bt = (0 | C) < 0;
                            Bt ||
                              ((Kt[(A + 344) >> 3] * +T[(A + 24) >> 2]) /
                                +Dt[(A + 192) >> 2] >
                                +T[As(Ee, ge) >> 2] &&
                                (yt = T[As(Ee, ge) >> 2])),
                              (0 | (ge = (ge + 1) | 0)) < T[(A + 552) >> 2];

                          );
                      }
                      if (
                        ((Ht[(A + 188) | 0] = 1),
                        (ge = (T[(A + 180) >> 2] + 1) | 0),
                        (T[(A + 180) >> 2] = ge),
                        (ge =
                          (0 | ge) > 1 ? et : (0 | Le) < (0 | yt) ? yt : Le),
                        (0 | V) == 1)
                      ) {
                        (V = A), (ut = et = (ut - 16) | 0), (Ee = -1);
                        e: if (
                          !(
                            ((0 | (Le = T[(A + 152) >> 2])) <= 0) |
                            ((0 | (yt = T[(A + 156) >> 2])) <= 0)
                          )
                        ) {
                          if (T[(V + 552) >> 2] > 0) {
                            for (
                              Yn = (Ee = Le >>> 0 > yt >>> 0) ? Le : yt,
                                Zr = Ee ? yt : Le,
                                fi = (V + 584) | 0,
                                Pi = (V + 572) | 0,
                                ta = (V + 560) | 0,
                                yt = 0;
                              ;

                            ) {
                              if (
                                ((Le = T[As(ta, yt) >> 2]),
                                (Bt = As(Pi, yt)),
                                (Ee = -1),
                                (0 | Le) <= 0 || (0 | (Bt = T[Bt >> 2])) <= 0)
                              )
                                break e;
                              if (
                                ((Ee = As(fi, yt)),
                                ((0 | ((zr = Le >>> 0 > Bt >>> 0) ? Bt : Le)) >=
                                  (0 | Zr)) |
                                  ((0 | Yn) <= (0 | (zr ? Le : Bt))) ||
                                  !(
                                    (0 | (yt = (yt + 1) | 0)) <
                                    T[(V + 552) >> 2]
                                  ))
                              )
                                break;
                            }
                            Ee = T[Ee >> 2];
                          }
                          (T[et >> 2] = Ee), ps(V, 3375, et);
                        }
                        if (
                          ((ut = (et + 16) | 0),
                          (T[(A + 120) >> 2] = Ee),
                          !((0 | Ee) <= 0))
                        ) {
                          (ut = yt = (ut - 16) | 0), (et = ge), (Le = ge);
                          e: if (
                            !(
                              ((0 | Ee) <= 0) | ((0 | ge) <= (0 | Ee)) ||
                              ((Bt = 1),
                              T[(V + 552) >> 2] <= 0 ||
                                (0 |
                                  (ge = T[As((Yn = (V + 584) | 0), 0) >> 2])) >
                                  (0 | Ee))
                            )
                          )
                            for (;;) {
                              if (((Le = ge), T[(V + 552) >> 2] <= (0 | Bt)))
                                break e;
                              if (
                                ((ge = As(Yn, Bt)),
                                (Bt = (Bt + 1) | 0),
                                !((0 | (ge = T[ge >> 2])) <= (0 | Ee)))
                              )
                                break;
                            }
                          (T[(yt + 8) >> 2] = Le),
                            (T[(yt + 4) >> 2] = Ee),
                            (T[yt >> 2] = et),
                            ps(V, 4818, yt),
                            (ut = (yt + 16) | 0),
                            (ge = Le);
                        }
                      }
                      (T[(A + 112) >> 2] = C),
                        (Kt[(A + 264) >> 3] = Dt[(A + 236) >> 2]),
                        e_((V = (A + 652) | 0), (A + 264) | 0),
                        Lo(V) >>> 0 > Ut[(A + 132) >> 2] &&
                          ((T[(j + 176) >> 2] = Vr(V)),
                          tp(V, T[yg((j + 184) | 0, (j + 176) | 0) >> 2])),
                        (Kt[(A + 272) >> 3] = Y0(A)),
                        (T[(j + 176) >> 2] = C),
                        (T[(j + 180) >> 2] = C >> 31),
                        Fu((V = (A + 628) | 0), (j + 176) | 0),
                        Lo(V) >>> 0 > (T[(A + 128) >> 2] << 1) >>> 0 &&
                          ((T[(j + 176) >> 2] = Vr(V)),
                          tp(V, T[yg((j + 168) | 0, (j + 176) | 0) >> 2])),
                        (Le = V = T[(A + 28) >> 2]),
                        (((et = T[(A + 24) >> 2]) >>> 0 < 40001) &
                          ((0 | V) <= 0)) |
                          ((0 | V) < 0) ||
                          ((V = j),
                          (Ee = j),
                          (mn = st(
                            st(+(et >>> 0) + 4294967296 * +(0 | Le)) /
                              Dt[(A + 192) >> 2]
                          )),
                          st(Xt(mn)) < st(9223372036854776e3)
                            ? ((et =
                                st(Xt(mn)) >= st(1)
                                  ? ~~(mn > st(0)
                                      ? st(
                                          cr(
                                            st(
                                              Ui(
                                                st(
                                                  mn * st(23283064365386963e-26)
                                                )
                                              )
                                            ),
                                            st(4294967296)
                                          )
                                        )
                                      : st(
                                          Je(
                                            st(
                                              st(mn - st((~~mn >>> 0) >>> 0)) *
                                                st(23283064365386963e-26)
                                            )
                                          )
                                        )) >>> 0
                                  : 0),
                              (Le = ~~mn >>> 0))
                            : ((et = -2147483648), (Le = 0)),
                          (T[(Ee + 176) >> 2] = Le),
                          (T[(V + 180) >> 2] = et),
                          Gm((V = (A + 616) | 0), (j + 176) | 0),
                          Lo(V) >>> 0 <= Ut[(A + 136) >> 2] ||
                            ((T[(j + 160) >> 2] = Vr(V)),
                            tp(V, T[yg((j + 152) | 0, (j + 160) | 0) >> 2]))),
                        (V = dd(ae)),
                        (Le = hh()),
                        (et = T[(A + 8) >> 2]),
                        (Ee = T[(A + 12) >> 2]),
                        (yt = T[(A + 32) >> 2]),
                        (Bt = T[(A + 36) >> 2]),
                        (Yn = T[(A + 24) >> 2]),
                        (Zr = T[(A + 28) >> 2]),
                        (fi = T[(A + 48) >> 2]),
                        (Pi = T[(A + 52) >> 2]),
                        (Ji = Kt[(A + 264) >> 3]),
                        (ta = T[(A + 104) >> 2]),
                        (zr = T[(A + 68) >> 2]),
                        (bo = T[(A + 64) >> 2]),
                        (Oo = Jn[(A + 188) | 0]),
                        (Do = T[(A + 180) >> 2]),
                        (T[(j + 136) >> 2] = 0),
                        (T[(j + 132) >> 2] = Do),
                        (T[(j + 128) >> 2] = Oo),
                        (T[(j + 120) >> 2] = bo),
                        (T[(j + 124) >> 2] = zr),
                        (T[(j + 112) >> 2] = ta),
                        (T[(j + 104) >> 2] = 0),
                        (T[(j + 108) >> 2] = 0),
                        (T[(j + 96) >> 2] = 0),
                        (T[(j + 100) >> 2] = 0),
                        (Kt[(j + 88) >> 3] = Ji),
                        (T[(j + 84) >> 2] = C),
                        (T[(j + 80) >> 2] = ge),
                        (T[(j + 72) >> 2] = fi),
                        (T[(j + 76) >> 2] = Pi),
                        (T[(C = (j - -64) | 0) >> 2] = Yn),
                        (T[(C + 4) >> 2] = Zr),
                        (T[(j + 56) >> 2] = yt),
                        (T[(j + 60) >> 2] = Bt),
                        (T[(j + 48) >> 2] = et),
                        (T[(j + 52) >> 2] = Ee),
                        (T[(j + 40) >> 2] = Le),
                        (T[(j + 44) >> 2] = cn),
                        (T[(j + 32) >> 2] = V),
                        ps(A, 3448, (j + 32) | 0);
                    }
                  } else
                    (C = dd(ae)),
                      (V = T[(A + 8) >> 2]),
                      (ge = T[(A + 12) >> 2]),
                      (T[(j + 16) >> 2] = T[(A + 732) >> 2]),
                      (T[(j + 8) >> 2] = V),
                      (T[(j + 12) >> 2] = ge),
                      (T[j >> 2] = C),
                      ps(A, 4900, j),
                      (ge = -3);
                  return Nm(ae), (ut = (j + 208) | 0), ge;
                }
                function Wa() {
                  var A = 0,
                    C = 0,
                    V = 0,
                    j = 0,
                    ae = 0;
                  if (!(1 & Ht[9760])) {
                    if (
                      ((ut = V = (ut - 16) | 0),
                      (A = Zb(V)),
                      (ut = j = (ut - 16) | 0),
                      !Jn[T[Uu((j + 8) | 0, T[(A + 4) >> 2]) >> 2]])
                    )
                      e: {
                        t: {
                          if (
                            ((C = T[(A + 8) >> 2]), (0 | (A = Jn[0 | C])) != 1)
                          ) {
                            if (2 & A) break t;
                            (Ht[0 | C] = 2), (C = 1);
                          } else C = 0;
                          break e;
                        }
                        Ye();
                      }
                    (ut = (j + 16) | 0),
                      (ut = (V + 16) | 0),
                      C &&
                        ((T[2256] = 0),
                        (T[2257] = 0),
                        (T[2262] = 0),
                        (T[2263] = 0),
                        (T[2260] = -1),
                        (T[2261] = -1),
                        (T[2268] = -1),
                        (T[2269] = -1),
                        (T[2272] = 0),
                        (T[2273] = 0),
                        (T[2280] = 1082130432),
                        (T[2281] = 5),
                        (T[2278] = 1061158912),
                        (T[2279] = 1093664768),
                        (T[2276] = 1045220557),
                        (T[2277] = 1053609165),
                        (T[2282] = 0),
                        (T[2283] = 0),
                        (T[2294] = -1),
                        (T[2295] = -1),
                        (T[2258] = 0),
                        (T[2259] = 0),
                        (T[2264] = 0),
                        (T[2265] = 0),
                        (T[2266] = 0),
                        (T[2267] = 0),
                        (T[2270] = -1),
                        (T[2271] = -1),
                        (T[2274] = 0),
                        (T[2275] = 0),
                        (T[2284] = 0),
                        (T[2285] = 0),
                        (T[2286] = 0),
                        (T[2287] = 0),
                        (T[2296] = -1),
                        (T[2297] = -1),
                        (T[2300] = 0),
                        (T[2301] = 0),
                        (T[2298] = 0),
                        (T[2299] = 0),
                        (T[2307] = 0),
                        (T[2308] = -1082130432),
                        (T[2309] = -1082130432),
                        (T[2310] = -1082130432),
                        (T[2311] = 1065353216),
                        (T[2312] = 1091567616),
                        (T[2313] = 1073741824),
                        (T[2314] = 0),
                        (T[2315] = 0),
                        (T[2304] = 1065353216),
                        (T[2302] = 16777217),
                        (Ht[9212] = 0),
                        (T[2318] = 0),
                        (T[2319] = 0),
                        (T[2320] = 0),
                        (T[2321] = 0),
                        (T[2322] = 0),
                        (T[2323] = 0),
                        (T[2324] = 0),
                        (T[2325] = 0),
                        (T[2336] = 0),
                        (T[2337] = 1076887552),
                        (T[2334] = 0),
                        (T[2335] = 1078067200),
                        (T[2332] = 0),
                        (T[2333] = 1077542912),
                        Ia(9440),
                        Ia(9452),
                        Ia(9464),
                        (C = Zv(9480)),
                        qE(9552),
                        qE(9564),
                        Ia(9584),
                        Ia(9596),
                        Ia(9608),
                        Ia(9628),
                        (V = Ia(9640)),
                        (A = Ia(9652)),
                        (j = Ia(9664)),
                        (ae = Ia(9676)),
                        Ia(9688),
                        (T[2432] = -1082130432),
                        (T[2430] = 1060320051),
                        (T[2431] = 1056964608),
                        (T[2429] = 0),
                        (T[2427] = 0),
                        (T[2428] = 0),
                        (T[2425] = 1),
                        (T[2356] = 0),
                        (T[2357] = 0),
                        (T[2358] = 0),
                        (T[2359] = 0),
                        (T[2354] = 0),
                        (T[2355] = 0),
                        (T[2439] = 0),
                        (T[2437] = 0),
                        (T[2438] = 0),
                        (T[2435] = 0),
                        (T[2436] = 0),
                        (T[2433] = 0),
                        (T[2434] = 0),
                        ql(9440),
                        ql(9452),
                        Bu(9464),
                        (T[C >> 2] = 0),
                        (T[2374] = 0),
                        (T[2375] = 0),
                        (T[2372] = 0),
                        (T[2373] = 0),
                        ql(9504),
                        (T[2382] = 0),
                        (T[2383] = 0),
                        (T[2380] = 0),
                        Bu(V),
                        Bu(j),
                        Bu(ae),
                        Bu(A),
                        ps(9024, 5085, 0),
                        (T[2439] = 0),
                        (T[2314] = 0),
                        (T[2315] = 0),
                        (T[2287] = 0),
                        (T[2256] = 0),
                        (T[2257] = 0),
                        (T[2258] = 0),
                        (T[2259] = 0),
                        (T[2262] = 0),
                        (T[2263] = 0),
                        (T[2264] = 0),
                        (T[2265] = 0),
                        (T[2318] = 0),
                        (T[2319] = 0),
                        (T[2320] = 0),
                        (T[2321] = 0),
                        (T[2322] = 0),
                        (T[2323] = 0),
                        (T[2324] = 0),
                        (T[2325] = 0),
                        (yr[4604] = 1),
                        (T[2284] = 0),
                        (T[2285] = 0),
                        (T[2274] = 0),
                        (T[2275] = 0),
                        (T[2266] = 0),
                        (T[2267] = 0),
                        (T[2268] = 0),
                        (T[2269] = 0),
                        (T[2358] = 0),
                        (T[2359] = 0),
                        (T[2356] = 0),
                        (T[2357] = 0),
                        (T[2354] = 0),
                        (T[2355] = 0),
                        ql(9440),
                        ql(9452),
                        Bu(9464),
                        Bu(9640),
                        Bu(9676),
                        (T[2395] = 5),
                        ql(9608),
                        (T[2394] = 0),
                        ql(9584),
                        ql(9596),
                        (T[2406] = 5),
                        ql(9628),
                        (T[2405] = 0),
                        np(9552, Yv(9552)),
                        (T[ws(9552) >> 2] = 0),
                        (T[2388] = tu(9552)),
                        (T[tu(9552) >> 2] = 0),
                        Om(9564, Yv(9564)),
                        (T[ws(9564) >> 2] = 0),
                        (T[2391] = tu(9564)),
                        (T[tu(9564) >> 2] = 0),
                        (T[2330] = 0),
                        (T[2331] = 1076887552),
                        (T[2328] = 0),
                        (T[2329] = 1077805056),
                        (T[2326] = 0),
                        (T[2327] = 1077149696),
                        (T[2305] = 1084227584),
                        (T[2306] = 1084227584),
                        (T[2278] = 1061158912),
                        (T[2276] = 1045220557),
                        (T[2277] = 1053609165),
                        (T[2292] = 4),
                        (T[2293] = 2),
                        (T[2290] = 12),
                        (T[2291] = 5),
                        (T[2352] = 0),
                        (T[2353] = 1075314688),
                        (T[2350] = 0),
                        (T[2351] = 1077936128),
                        (T[2348] = -687194767),
                        (T[2349] = -1077055325),
                        (T[2346] = 1717986918),
                        (T[2347] = 1072064102),
                        (T[2344] = 0),
                        (T[2345] = 1071644672),
                        (T[2342] = 0),
                        (T[2343] = 1072168960),
                        (T[2340] = 0),
                        (T[2341] = 1073217536),
                        (T[2338] = -858993459),
                        (T[2339] = 1072483532),
                        (T[2307] = 1086324736),
                        (T[2288] = 10),
                        (T[2289] = 10),
                        (T[2282] = 0),
                        (T[2436] = 0),
                        (T[2437] = 0),
                        (T[2430] = 1060320051),
                        (T[2431] = 1056964608),
                        (T[2426] = 10),
                        (T[2272] = 0),
                        (T[2273] = 0),
                        (ut = C = (ut - 16) | 0),
                        (V = Zb(C)),
                        (ut = A = (ut - 16) | 0),
                        (Ht[T[Uu((A + 8) | 0, T[(V + 4) >> 2]) >> 2]] = 1),
                        (Ht[T[(V + 8) >> 2]] = 1),
                        (ut = (A + 16) | 0),
                        (ut = (C + 16) | 0));
                  }
                  return 9024;
                }
                function Ni(A) {
                  var C = 0,
                    V = 0,
                    j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0;
                  e: if (A) {
                    ge =
                      ((j = (A - 8) | 0) + (A = -8 & (C = T[(A - 4) >> 2]))) |
                      0;
                    t: if (!(1 & C)) {
                      if (
                        !(3 & C) ||
                        (j = (j - (C = T[j >> 2])) | 0) >>> 0 < Ut[2782]
                      )
                        break e;
                      if (((A = (A + C) | 0), T[2783] == (0 | j))) {
                        if ((3 & (C = T[(ge + 4) >> 2])) == 3)
                          return (
                            (T[2780] = A),
                            (T[(ge + 4) >> 2] = -2 & C),
                            (T[(j + 4) >> 2] = 1 | A),
                            void (T[(A + j) >> 2] = A)
                          );
                      } else {
                        if (C >>> 0 <= 255) {
                          if (
                            ((ae = T[(j + 8) >> 2]),
                            (C = (C >>> 3) | 0),
                            (0 | (V = T[(j + 12) >> 2])) == (0 | ae))
                          ) {
                            T[2778] = T[2778] & $l(C);
                            break t;
                          }
                          (T[(ae + 12) >> 2] = V), (T[(V + 8) >> 2] = ae);
                          break t;
                        }
                        if (
                          ((Le = T[(j + 24) >> 2]),
                          (0 | j) == (0 | (C = T[(j + 12) >> 2])))
                        )
                          if (
                            (V = T[(ae = (j + 20) | 0) >> 2]) ||
                            (V = T[(ae = (j + 16) | 0) >> 2])
                          ) {
                            for (
                              ;
                              (Ee = ae),
                                (V = T[(ae = ((C = V) + 20) | 0) >> 2]) ||
                                  ((ae = (C + 16) | 0), (V = T[(C + 16) >> 2]));

                            );
                            T[Ee >> 2] = 0;
                          } else C = 0;
                        else
                          (V = T[(j + 8) >> 2]),
                            (T[(V + 12) >> 2] = C),
                            (T[(C + 8) >> 2] = V);
                        if (!Le) break t;
                        ae = T[(j + 28) >> 2];
                        n: {
                          if (
                            T[(V = (11416 + (ae << 2)) | 0) >> 2] ==
                            (0 | j)
                          ) {
                            if (((T[V >> 2] = C), C)) break n;
                            T[2779] = T[2779] & $l(ae);
                            break t;
                          }
                          if (
                            ((T[
                              (Le + (T[(Le + 16) >> 2] == (0 | j) ? 16 : 20)) >>
                                2
                            ] = C),
                            !C)
                          )
                            break t;
                        }
                        if (
                          ((T[(C + 24) >> 2] = Le),
                          (V = T[(j + 16) >> 2]) &&
                            ((T[(C + 16) >> 2] = V), (T[(V + 24) >> 2] = C)),
                          !(V = T[(j + 20) >> 2]))
                        )
                          break t;
                        (T[(C + 20) >> 2] = V), (T[(V + 24) >> 2] = C);
                      }
                    }
                    if (!(j >>> 0 >= ge >>> 0) && 1 & (C = T[(ge + 4) >> 2])) {
                      t: {
                        if (!(2 & C)) {
                          if (T[2784] == (0 | ge)) {
                            if (
                              ((T[2784] = j),
                              (A = (T[2781] + A) | 0),
                              (T[2781] = A),
                              (T[(j + 4) >> 2] = 1 | A),
                              T[2783] != (0 | j))
                            )
                              break e;
                            return (T[2780] = 0), void (T[2783] = 0);
                          }
                          if (T[2783] == (0 | ge))
                            return (
                              (T[2783] = j),
                              (A = (T[2780] + A) | 0),
                              (T[2780] = A),
                              (T[(j + 4) >> 2] = 1 | A),
                              void (T[(A + j) >> 2] = A)
                            );
                          A = ((-8 & C) + A) | 0;
                          n: if (C >>> 0 <= 255) {
                            if (
                              ((ae = T[(ge + 8) >> 2]),
                              (C = (C >>> 3) | 0),
                              (0 | (V = T[(ge + 12) >> 2])) == (0 | ae))
                            ) {
                              T[2778] = T[2778] & $l(C);
                              break n;
                            }
                            (T[(ae + 12) >> 2] = V), (T[(V + 8) >> 2] = ae);
                          } else {
                            if (
                              ((Le = T[(ge + 24) >> 2]),
                              (0 | ge) == (0 | (C = T[(ge + 12) >> 2])))
                            )
                              if (
                                (V = T[(ae = (ge + 20) | 0) >> 2]) ||
                                (V = T[(ae = (ge + 16) | 0) >> 2])
                              ) {
                                for (
                                  ;
                                  (Ee = ae),
                                    (V = T[(ae = ((C = V) + 20) | 0) >> 2]) ||
                                      ((ae = (C + 16) | 0),
                                      (V = T[(C + 16) >> 2]));

                                );
                                T[Ee >> 2] = 0;
                              } else C = 0;
                            else
                              (V = T[(ge + 8) >> 2]),
                                (T[(V + 12) >> 2] = C),
                                (T[(C + 8) >> 2] = V);
                            if (Le) {
                              ae = T[(ge + 28) >> 2];
                              i: {
                                if (
                                  T[(V = (11416 + (ae << 2)) | 0) >> 2] ==
                                  (0 | ge)
                                ) {
                                  if (((T[V >> 2] = C), C)) break i;
                                  T[2779] = T[2779] & $l(ae);
                                  break n;
                                }
                                if (
                                  ((T[
                                    (Le +
                                      (T[(Le + 16) >> 2] == (0 | ge)
                                        ? 16
                                        : 20)) >>
                                      2
                                  ] = C),
                                  !C)
                                )
                                  break n;
                              }
                              (T[(C + 24) >> 2] = Le),
                                (V = T[(ge + 16) >> 2]) &&
                                  ((T[(C + 16) >> 2] = V),
                                  (T[(V + 24) >> 2] = C)),
                                (V = T[(ge + 20) >> 2]) &&
                                  ((T[(C + 20) >> 2] = V),
                                  (T[(V + 24) >> 2] = C));
                            }
                          }
                          if (
                            ((T[(j + 4) >> 2] = 1 | A),
                            (T[(A + j) >> 2] = A),
                            T[2783] != (0 | j))
                          )
                            break t;
                          return void (T[2780] = A);
                        }
                        (T[(ge + 4) >> 2] = -2 & C),
                          (T[(j + 4) >> 2] = 1 | A),
                          (T[(A + j) >> 2] = A);
                      }
                      if (A >>> 0 <= 255)
                        return (
                          (C = (11152 + ((A = (A >>> 3) | 0) << 3)) | 0),
                          (V = T[2778]) & (A = 1 << A)
                            ? (A = T[(C + 8) >> 2])
                            : ((T[2778] = A | V), (A = C)),
                          (T[(C + 8) >> 2] = j),
                          (T[(A + 12) >> 2] = j),
                          (T[(j + 12) >> 2] = C),
                          void (T[(j + 8) >> 2] = A)
                        );
                      (ae = 31),
                        (T[(j + 16) >> 2] = 0),
                        (T[(j + 20) >> 2] = 0),
                        A >>> 0 <= 16777215 &&
                          ((C = (A >>> 8) | 0),
                          (C <<= Ee = ((C + 1048320) >>> 16) & 8),
                          (ae =
                            (28 +
                              (((C =
                                (((((C <<= ae = ((C + 520192) >>> 16) & 4) <<
                                  (V = ((C + 245760) >>> 16) & 2)) >>>
                                  15) |
                                  0) -
                                  (V | ae | Ee)) |
                                0) <<
                                1) |
                                ((A >>> (C + 21)) & 1))) |
                            0)),
                        (T[(j + 28) >> 2] = ae),
                        (Ee = (11416 + (ae << 2)) | 0);
                      t: {
                        n: {
                          if ((V = T[2779]) & (C = 1 << ae)) {
                            for (
                              ae =
                                A <<
                                ((0 | ae) == 31
                                  ? 0
                                  : (25 - ((ae >>> 1) | 0)) | 0),
                                C = T[Ee >> 2];
                              ;

                            ) {
                              if (((V = C), (-8 & T[(C + 4) >> 2]) == (0 | A)))
                                break n;
                              if (
                                ((C = (ae >>> 29) | 0),
                                (ae <<= 1),
                                !(C = T[((Ee = (V + (4 & C)) | 0) + 16) >> 2]))
                              )
                                break;
                            }
                            (T[(Ee + 16) >> 2] = j), (T[(j + 24) >> 2] = V);
                          } else
                            (T[2779] = C | V),
                              (T[Ee >> 2] = j),
                              (T[(j + 24) >> 2] = Ee);
                          (T[(j + 12) >> 2] = j), (T[(j + 8) >> 2] = j);
                          break t;
                        }
                        (A = T[(V + 8) >> 2]),
                          (T[(A + 12) >> 2] = j),
                          (T[(V + 8) >> 2] = j),
                          (T[(j + 24) >> 2] = 0),
                          (T[(j + 12) >> 2] = V),
                          (T[(j + 8) >> 2] = A);
                      }
                      (A = (T[2786] - 1) | 0), (T[2786] = A || -1);
                    }
                  }
                }
                function ka(A, C) {
                  var V,
                    j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0;
                  V = (A + C) | 0;
                  e: {
                    t: if (!(1 & (j = T[(A + 4) >> 2]))) {
                      if (!(3 & j)) break e;
                      C = ((j = T[A >> 2]) + C) | 0;
                      n: {
                        if ((0 | (A = (A - j) | 0)) != T[2783]) {
                          if (j >>> 0 <= 255) {
                            if (
                              ((ge = T[(A + 8) >> 2]),
                              (j = (j >>> 3) | 0),
                              (0 | (ae = T[(A + 12) >> 2])) != (0 | ge))
                            )
                              break n;
                            T[2778] = T[2778] & $l(j);
                            break t;
                          }
                          if (
                            ((Le = T[(A + 24) >> 2]),
                            (0 | (j = T[(A + 12) >> 2])) == (0 | A))
                          )
                            if (
                              (ae = T[(ge = (A + 20) | 0) >> 2]) ||
                              (ae = T[(ge = (A + 16) | 0) >> 2])
                            ) {
                              for (
                                ;
                                (Ee = ge),
                                  (ae = T[(ge = ((j = ae) + 20) | 0) >> 2]) ||
                                    ((ge = (j + 16) | 0),
                                    (ae = T[(j + 16) >> 2]));

                              );
                              T[Ee >> 2] = 0;
                            } else j = 0;
                          else
                            (ae = T[(A + 8) >> 2]),
                              (T[(ae + 12) >> 2] = j),
                              (T[(j + 8) >> 2] = ae);
                          if (!Le) break t;
                          ge = T[(A + 28) >> 2];
                          i: {
                            if (
                              T[(ae = (11416 + (ge << 2)) | 0) >> 2] ==
                              (0 | A)
                            ) {
                              if (((T[ae >> 2] = j), j)) break i;
                              T[2779] = T[2779] & $l(ge);
                              break t;
                            }
                            if (
                              ((T[
                                (Le +
                                  (T[(Le + 16) >> 2] == (0 | A) ? 16 : 20)) >>
                                  2
                              ] = j),
                              !j)
                            )
                              break t;
                          }
                          if (
                            ((T[(j + 24) >> 2] = Le),
                            (ae = T[(A + 16) >> 2]) &&
                              ((T[(j + 16) >> 2] = ae),
                              (T[(ae + 24) >> 2] = j)),
                            !(ae = T[(A + 20) >> 2]))
                          )
                            break t;
                          (T[(j + 20) >> 2] = ae), (T[(ae + 24) >> 2] = j);
                          break t;
                        }
                        if ((3 & (j = T[(V + 4) >> 2])) != 3) break t;
                        return (
                          (T[2780] = C),
                          (T[(V + 4) >> 2] = -2 & j),
                          (T[(A + 4) >> 2] = 1 | C),
                          void (T[V >> 2] = C)
                        );
                      }
                      (T[(ge + 12) >> 2] = ae), (T[(ae + 8) >> 2] = ge);
                    }
                    t: {
                      if (!(2 & (j = T[(V + 4) >> 2]))) {
                        if (T[2784] == (0 | V)) {
                          if (
                            ((T[2784] = A),
                            (C = (T[2781] + C) | 0),
                            (T[2781] = C),
                            (T[(A + 4) >> 2] = 1 | C),
                            T[2783] != (0 | A))
                          )
                            break e;
                          return (T[2780] = 0), void (T[2783] = 0);
                        }
                        if (T[2783] == (0 | V))
                          return (
                            (T[2783] = A),
                            (C = (T[2780] + C) | 0),
                            (T[2780] = C),
                            (T[(A + 4) >> 2] = 1 | C),
                            void (T[(A + C) >> 2] = C)
                          );
                        C = ((-8 & j) + C) | 0;
                        n: if (j >>> 0 <= 255) {
                          if (
                            ((ge = T[(V + 8) >> 2]),
                            (j = (j >>> 3) | 0),
                            (0 | (ae = T[(V + 12) >> 2])) == (0 | ge))
                          ) {
                            T[2778] = T[2778] & $l(j);
                            break n;
                          }
                          (T[(ge + 12) >> 2] = ae), (T[(ae + 8) >> 2] = ge);
                        } else {
                          if (
                            ((Le = T[(V + 24) >> 2]),
                            (0 | V) == (0 | (j = T[(V + 12) >> 2])))
                          )
                            if (
                              (ge = T[(ae = (V + 20) | 0) >> 2]) ||
                              (ge = T[(ae = (V + 16) | 0) >> 2])
                            ) {
                              for (
                                ;
                                (Ee = ae),
                                  (ge = T[(ae = ((j = ge) + 20) | 0) >> 2]) ||
                                    ((ae = (j + 16) | 0),
                                    (ge = T[(j + 16) >> 2]));

                              );
                              T[Ee >> 2] = 0;
                            } else j = 0;
                          else
                            (ae = T[(V + 8) >> 2]),
                              (T[(ae + 12) >> 2] = j),
                              (T[(j + 8) >> 2] = ae);
                          if (Le) {
                            ge = T[(V + 28) >> 2];
                            i: {
                              if (
                                T[(ae = (11416 + (ge << 2)) | 0) >> 2] ==
                                (0 | V)
                              ) {
                                if (((T[ae >> 2] = j), j)) break i;
                                T[2779] = T[2779] & $l(ge);
                                break n;
                              }
                              if (
                                ((T[
                                  (Le +
                                    (T[(Le + 16) >> 2] == (0 | V) ? 16 : 20)) >>
                                    2
                                ] = j),
                                !j)
                              )
                                break n;
                            }
                            (T[(j + 24) >> 2] = Le),
                              (ae = T[(V + 16) >> 2]) &&
                                ((T[(j + 16) >> 2] = ae),
                                (T[(ae + 24) >> 2] = j)),
                              (ae = T[(V + 20) >> 2]) &&
                                ((T[(j + 20) >> 2] = ae),
                                (T[(ae + 24) >> 2] = j));
                          }
                        }
                        if (
                          ((T[(A + 4) >> 2] = 1 | C),
                          (T[(A + C) >> 2] = C),
                          T[2783] != (0 | A))
                        )
                          break t;
                        return void (T[2780] = C);
                      }
                      (T[(V + 4) >> 2] = -2 & j),
                        (T[(A + 4) >> 2] = 1 | C),
                        (T[(A + C) >> 2] = C);
                    }
                    if (C >>> 0 <= 255)
                      return (
                        (j = (11152 + ((C = (C >>> 3) | 0) << 3)) | 0),
                        (ae = T[2778]) & (C = 1 << C)
                          ? (C = T[(j + 8) >> 2])
                          : ((T[2778] = C | ae), (C = j)),
                        (T[(j + 8) >> 2] = A),
                        (T[(C + 12) >> 2] = A),
                        (T[(A + 12) >> 2] = j),
                        void (T[(A + 8) >> 2] = C)
                      );
                    (ge = 31),
                      (T[(A + 16) >> 2] = 0),
                      (T[(A + 20) >> 2] = 0),
                      C >>> 0 <= 16777215 &&
                        ((j = (C >>> 8) | 0),
                        (j <<= Ee = ((j + 1048320) >>> 16) & 8),
                        (ge =
                          (28 +
                            (((j =
                              (((((j <<= ge = ((j + 520192) >>> 16) & 4) <<
                                (ae = ((j + 245760) >>> 16) & 2)) >>>
                                15) |
                                0) -
                                (ae | ge | Ee)) |
                              0) <<
                              1) |
                              ((C >>> (j + 21)) & 1))) |
                          0)),
                      (T[(A + 28) >> 2] = ge),
                      (Ee = (11416 + (ge << 2)) | 0);
                    t: {
                      if ((ae = T[2779]) & (j = 1 << ge)) {
                        for (
                          ge =
                            C <<
                            ((0 | ge) == 31 ? 0 : (25 - ((ge >>> 1) | 0)) | 0),
                            j = T[Ee >> 2];
                          ;

                        ) {
                          if (((ae = j), (-8 & T[(j + 4) >> 2]) == (0 | C)))
                            break t;
                          if (
                            ((j = (ge >>> 29) | 0),
                            (ge <<= 1),
                            !(j = T[((Ee = (ae + (4 & j)) | 0) + 16) >> 2]))
                          )
                            break;
                        }
                        (T[(Ee + 16) >> 2] = A), (T[(A + 24) >> 2] = ae);
                      } else
                        (T[2779] = j | ae),
                          (T[Ee >> 2] = A),
                          (T[(A + 24) >> 2] = Ee);
                      return (T[(A + 12) >> 2] = A), void (T[(A + 8) >> 2] = A);
                    }
                    (C = T[(ae + 8) >> 2]),
                      (T[(C + 12) >> 2] = A),
                      (T[(ae + 8) >> 2] = A),
                      (T[(A + 24) >> 2] = 0),
                      (T[(A + 12) >> 2] = ae),
                      (T[(A + 8) >> 2] = C);
                  }
                }
                function Fr(A, C) {
                  var V,
                    j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = st(0),
                    Le = 0,
                    et = 0,
                    yt = 0,
                    Bt = st(0),
                    mn = 0;
                  if (
                    ((ut = V = (ut - 48) | 0),
                    (Kt[(A + 264) >> 3] = Dt[(A + 232) >> 2]),
                    e_((ae = (A + 652) | 0), (A + 264) | 0),
                    Lo(ae) >>> 0 > Ut[(A + 132) >> 2] &&
                      ((T[(V + 32) >> 2] = Vr(ae)),
                      tp(ae, T[yg((V + 40) | 0, (V + 32) | 0) >> 2])),
                    (Kt[(A + 272) >> 3] = Y0(A)),
                    (Le = ((ae = T[(A + 8) >> 2]) - (j = T[A >> 2])) | 0),
                    (ge =
                      (T[(A + 12) >> 2] -
                        ((T[(A + 4) >> 2] + (j >>> 0 > ae >>> 0)) | 0)) |
                      0),
                    (j = Lo((ae = (A + 652) | 0))) >>> 0 < 2 ||
                      ((Bt = st((+(Le >>> 0) + 4294967296 * +(0 | ge)) / 1e3)) >
                        st(0) &&
                        (Ee = st(
                          (Kt[Zh(ae, (j - 1) | 0) >> 3] -
                            Kt[Zh(ae, (j - 2) | 0) >> 3]) /
                            +Bt
                        ))),
                    (Dt[(A + 716) >> 2] = Ee),
                    (ut = ae = (ut - 48) | 0),
                    (ge = Vr((Le = (A + 652) | 0))),
                    (et = Hm(Le)),
                    (ut = j = (ut - 32) | 0),
                    (T[(j + 16) >> 2] = et),
                    (T[(j + 24) >> 2] = ge),
                    Jl((j + 24) | 0, (j + 16) | 0) &&
                      ((T[j >> 2] = T[(j + 24) >> 2]), Jl(Fm(j), (j + 16) | 0)))
                  )
                    for (
                      ;
                      ry(T[j >> 2], T[(j + 24) >> 2]) &&
                        (T[(j + 24) >> 2] = T[j >> 2]),
                        Jl(Fm(j), (j + 16) | 0);

                    );
                  if (
                    ((ut = (j + 32) | 0),
                    (T[(ae + 40) >> 2] = T[(j + 24) >> 2]),
                    (Ee = st(-1)),
                    !(
                      st(Kt[T[(ae + 40) >> 2] >> 3]) < st(2.5) ||
                      Lo(Le) >>> 0 < 2
                    ))
                  ) {
                    if (
                      ((ge = Vr(Le)),
                      (et = Hm(Le)),
                      (ut = j = (ut - 16) | 0),
                      (T[j >> 2] = et),
                      (T[(j + 8) >> 2] = ge),
                      Jl((j + 8) | 0, j))
                    )
                      for (
                        ;
                        (yt += Kt[T[(ge = (j + 8) | 0) >> 2] >> 3]),
                          Fm(ge),
                          Jl(ge, j);

                      );
                    if (
                      ((ut = (j + 16) | 0),
                      (Kt[(ae + 40) >> 3] = yt / +(Lo(Le) >>> 0)),
                      (T[(ae + 32) >> 2] = 0),
                      (T[(ae + 36) >> 2] = 0),
                      (ge = Vr(Le)),
                      (et = Hm(Le)),
                      (T[(ae + 28) >> 2] = ae + 40),
                      (T[(ae + 24) >> 2] = ae + 32),
                      (j = T[(ae + 28) >> 2]),
                      (T[(ae + 8) >> 2] = T[(ae + 24) >> 2]),
                      (T[(ae + 12) >> 2] = j),
                      (ut = j = (ut - 16) | 0),
                      (T[j >> 2] = et),
                      (T[(j + 8) >> 2] = ge),
                      Jl((j + 8) | 0, j))
                    )
                      for (
                        ;
                        (et = ge = T[(ae + 8) >> 2]),
                          (mn = Kt[ge >> 3]),
                          (yt =
                            Kt[T[(ge = (j + 8) | 0) >> 2] >> 3] -
                            Kt[T[(ae + 12) >> 2] >> 3]),
                          (Kt[et >> 3] = mn + yt * yt),
                          Fm(ge),
                          Jl(ge, j);

                      );
                    (ge = T[(ae + 12) >> 2]),
                      (T[(ae + 16) >> 2] = T[(ae + 8) >> 2]),
                      (T[(ae + 20) >> 2] = ge),
                      (ut = (j + 16) | 0),
                      (Ee = st(sn(Kt[(ae + 32) >> 3] / +((Lo(Le) - 1) >>> 0))));
                  }
                  (ut = (ae + 48) | 0),
                    (Dt[(A + 704) >> 2] = Ee),
                    (T[(V + 32) >> 2] = C),
                    (T[(V + 36) >> 2] = C >> 31),
                    Fu((C = (A + 628) | 0), (V + 32) | 0),
                    Lo(C) >>> 0 > (T[(A + 128) >> 2] << 1) >>> 0 &&
                      ((T[(V + 32) >> 2] = Vr(C)),
                      tp(C, T[yg((V + 24) | 0, (V + 32) | 0) >> 2])),
                    (ae = C = T[(A + 28) >> 2]),
                    (((j = T[(A + 24) >> 2]) >>> 0 < 40001) & ((0 | ae) <= 0)) |
                      ((0 | ae) < 0) ||
                      ((C = V),
                      (ge = V),
                      (Ee = st(
                        st(+(j >>> 0) + 4294967296 * +(0 | ae)) /
                          Dt[(A + 192) >> 2]
                      )),
                      st(Xt(Ee)) < st(9223372036854776e3)
                        ? ((j =
                            st(Xt(Ee)) >= st(1)
                              ? ~~(Ee > st(0)
                                  ? st(
                                      cr(
                                        st(
                                          Ui(st(Ee * st(23283064365386963e-26)))
                                        ),
                                        st(4294967296)
                                      )
                                    )
                                  : st(
                                      Je(
                                        st(
                                          st(Ee - st((~~Ee >>> 0) >>> 0)) *
                                            st(23283064365386963e-26)
                                        )
                                      )
                                    )) >>> 0
                              : 0),
                          (ae = ~~Ee >>> 0))
                        : ((j = -2147483648), (ae = 0)),
                      (T[(ge + 32) >> 2] = ae),
                      (T[(C + 36) >> 2] = j),
                      Gm((C = (A + 616) | 0), (V + 32) | 0),
                      Lo(C) >>> 0 <= Ut[(A + 136) >> 2] ||
                        ((T[(V + 16) >> 2] = Vr(C)),
                        tp(C, T[yg((V + 8) | 0, (V + 16) | 0) >> 2]))),
                    (T[(A + 692) >> 2] =
                      Dt[(A + 716) >> 2] < st(0)
                        ? (T[(A + 692) >> 2] + 1) | 0
                        : 0),
                    (ut = (V + 48) | 0);
                }
                function Wr(A, C) {
                  var V,
                    j,
                    ae,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0,
                    Bt = 0,
                    mn = 0,
                    Yn = 0,
                    zr = 0,
                    Zr = 0,
                    fi = 0,
                    Pi = 0;
                  if (
                    ((j = Ll(A)),
                    (ae = A),
                    (V = T[(A + 8) >> 2]),
                    Wv(A),
                    (ge = C))
                  ) {
                    if (((Yn = ge), (ge = 0), V))
                      if (Yn >>> 0 >= 4294967232) (T[2441] = 48), (Ee = 0);
                      else {
                        (yt = Yn >>> 0 < 11 ? 16 : (Yn + 11) & -8),
                          (Ee = -8 & (mn = T[((Le = (V - 8) | 0) + 4) >> 2]));
                        e: if (3 & mn) {
                          Bt = (Ee + Le) | 0;
                          t: if (Ee >>> 0 >= yt >>> 0) {
                            if ((ge = (Ee - yt) | 0) >>> 0 < 16) break t;
                            (T[(Le + 4) >> 2] = (1 & mn) | yt | 2),
                              (T[((Ee = (Le + yt) | 0) + 4) >> 2] = 3 | ge),
                              (T[(Bt + 4) >> 2] = 1 | T[(Bt + 4) >> 2]),
                              ka(Ee, ge);
                          } else if (T[2784] != (0 | Bt))
                            if (T[2783] != (0 | Bt)) {
                              if (
                                2 & (et = T[(Bt + 4) >> 2]) ||
                                (zr = (Ee + (-8 & et)) | 0) >>> 0 < yt >>> 0
                              )
                                break e;
                              fi = (zr - yt) | 0;
                              n: if (et >>> 0 <= 255) {
                                if (
                                  ((ge = T[(Bt + 8) >> 2]),
                                  (et = (et >>> 3) | 0),
                                  (0 | (Ee = T[(Bt + 12) >> 2])) == (0 | ge))
                                ) {
                                  T[2778] = T[2778] & $l(et);
                                  break n;
                                }
                                (T[(ge + 12) >> 2] = Ee),
                                  (T[(Ee + 8) >> 2] = ge);
                              } else {
                                if (
                                  ((Zr = T[(Bt + 24) >> 2]),
                                  (0 | Bt) == (0 | (Ee = T[(Bt + 12) >> 2])))
                                )
                                  if (
                                    (ge = T[(et = (Bt + 20) | 0) >> 2]) ||
                                    (ge = T[(et = (Bt + 16) | 0) >> 2])
                                  ) {
                                    for (
                                      ;
                                      (Pi = et),
                                        (Ee = ge),
                                        (ge = T[(et = (ge + 20) | 0) >> 2]) ||
                                          ((et = (Ee + 16) | 0),
                                          (ge = T[(Ee + 16) >> 2]));

                                    );
                                    T[Pi >> 2] = 0;
                                  } else Ee = 0;
                                else
                                  (ge = T[(Bt + 8) >> 2]),
                                    (T[(ge + 12) >> 2] = Ee),
                                    (T[(Ee + 8) >> 2] = ge);
                                if (Zr) {
                                  ge = T[(Bt + 28) >> 2];
                                  i: {
                                    if (
                                      T[(et = (11416 + (ge << 2)) | 0) >> 2] ==
                                      (0 | Bt)
                                    ) {
                                      if (((T[et >> 2] = Ee), Ee)) break i;
                                      T[2779] = T[2779] & $l(ge);
                                      break n;
                                    }
                                    if (
                                      ((T[
                                        ((T[(Zr + 16) >> 2] == (0 | Bt)
                                          ? 16
                                          : 20) +
                                          Zr) >>
                                          2
                                      ] = Ee),
                                      !Ee)
                                    )
                                      break n;
                                  }
                                  (T[(Ee + 24) >> 2] = Zr),
                                    (ge = T[(Bt + 16) >> 2]) &&
                                      ((T[(Ee + 16) >> 2] = ge),
                                      (T[(ge + 24) >> 2] = Ee)),
                                    (ge = T[(Bt + 20) >> 2]) &&
                                      ((T[(Ee + 20) >> 2] = ge),
                                      (T[(ge + 24) >> 2] = Ee));
                                }
                              }
                              fi >>> 0 <= 15
                                ? ((T[(Le + 4) >> 2] = (1 & mn) | zr | 2),
                                  (T[((ge = (Le + zr) | 0) + 4) >> 2] =
                                    1 | T[(ge + 4) >> 2]))
                                : ((T[(Le + 4) >> 2] = (1 & mn) | yt | 2),
                                  (T[((ge = (Le + yt) | 0) + 4) >> 2] = 3 | fi),
                                  (T[((Ee = (Le + zr) | 0) + 4) >> 2] =
                                    1 | T[(Ee + 4) >> 2]),
                                  ka(ge, fi));
                            } else {
                              if ((Ee = (Ee + T[2780]) | 0) >>> 0 < yt >>> 0)
                                break e;
                              (ge = (Ee - yt) | 0) >>> 0 >= 16
                                ? ((T[(Le + 4) >> 2] = (1 & mn) | yt | 2),
                                  (T[((et = (Le + yt) | 0) + 4) >> 2] = 1 | ge),
                                  (T[(Ee = (Ee + Le) | 0) >> 2] = ge),
                                  (T[(Ee + 4) >> 2] = -2 & T[(Ee + 4) >> 2]))
                                : ((T[(Le + 4) >> 2] = Ee | (1 & mn) | 2),
                                  (T[((ge = (Ee + Le) | 0) + 4) >> 2] =
                                    1 | T[(ge + 4) >> 2]),
                                  (ge = 0)),
                                (T[2783] = et),
                                (T[2780] = ge);
                            }
                          else {
                            if ((Ee = (Ee + T[2781]) | 0) >>> 0 <= yt >>> 0)
                              break e;
                            (T[(Le + 4) >> 2] = (1 & mn) | yt | 2),
                              (Ee = (Ee - yt) | 0),
                              (T[((ge = (Le + yt) | 0) + 4) >> 2] = 1 | Ee),
                              (T[2781] = Ee),
                              (T[2784] = ge);
                          }
                          ge = Le;
                        } else {
                          if (
                            yt >>> 0 < 256 ||
                            (Ee >>> 0 >= (yt + 4) >>> 0 &&
                              ((ge = Le),
                              (Ee - yt) >>> 0 <= (T[2898] << 1) >>> 0))
                          )
                            break e;
                          ge = 0;
                        }
                        (Ee = (ge + 8) | 0),
                          ge ||
                            ((Ee = 0),
                            (Le = ir(Yn)) &&
                              (Ro(
                                Le,
                                V,
                                (ge =
                                  ((3 & (ge = T[(V - 4) >> 2]) ? -4 : -8) +
                                    (-8 & ge)) |
                                  0) >>>
                                  0 <
                                  Yn >>> 0
                                  ? ge
                                  : Yn
                              ),
                              Ni(V),
                              (Ee = Le)));
                      }
                    else Ee = ir(Yn);
                    ge = Ee;
                  } else Ni(V), (ge = 0);
                  (T[(ae + 8) >> 2] = ge),
                    (T[(A + 16) >> 2] = C + ge),
                    (T[(A + 12) >> 2] = ge + j);
                }
                function si(A, C, V) {
                  var j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0;
                  e: for (;;) {
                    Le = (C - 4) | 0;
                    t: for (;;) {
                      for (j = A; ; ) {
                        n: {
                          i: {
                            a: {
                              l: {
                                r: {
                                  o: {
                                    c: {
                                      s: {
                                        u: switch (
                                          0 | (ae = (A = (C - j) | 0) >> 2)
                                        ) {
                                          case 5:
                                            break c;
                                          case 4:
                                            break s;
                                          case 2:
                                            break u;
                                          case 0:
                                          case 1:
                                            break n;
                                          case 3:
                                            break r;
                                          default:
                                            break o;
                                        }
                                        if (!Ka((A = (C - 4) | 0), j)) break n;
                                        return void gs(j, A);
                                      }
                                      return void dg(
                                        j,
                                        (j + 4) | 0,
                                        (j + 8) | 0,
                                        (C - 4) | 0
                                      );
                                    }
                                    return void Nv(
                                      j,
                                      (j + 4) | 0,
                                      (j + 8) | 0,
                                      (j + 12) | 0,
                                      (C - 4) | 0
                                    );
                                  }
                                  if ((0 | A) <= 123) {
                                    for (
                                      Le = C,
                                        ut = Ee = (ut - 16) | 0,
                                        ae = j,
                                        qf(j, (j + 4) | 0, (V = (j + 8) | 0)),
                                        C = (j + 12) | 0;
                                      (0 | C) != (0 | Le);

                                    ) {
                                      if (Ka(C, V)) {
                                        for (
                                          T[(Ee + 12) >> 2] = T[C >> 2], j = C;
                                          ;

                                        ) {
                                          if (
                                            ((A = V),
                                            (T[j >> 2] = T[A >> 2]),
                                            (0 | A) != (0 | ae))
                                          ) {
                                            if (
                                              Ka(
                                                (Ee + 12) | 0,
                                                (V = ((j = A) - 4) | 0)
                                              )
                                            )
                                              continue;
                                          } else A = ae;
                                          break;
                                        }
                                        T[A >> 2] = T[(Ee + 12) >> 2];
                                      }
                                      (V = C), (C = (C + 4) | 0);
                                    }
                                    return void (ut = (Ee + 16) | 0);
                                  }
                                  if (
                                    ((ge = ((((0 | ae) / 2) << 2) + j) | 0),
                                    (et = A =
                                      A >>> 0 >= 3997
                                        ? Nv(
                                            j,
                                            ((A = ((0 | ae) / 4) << 2) + j) | 0,
                                            ge,
                                            (A + ge) | 0,
                                            Le
                                          )
                                        : qf(j, ge, Le)),
                                    (A = Le),
                                    !Ka(j, ge))
                                  ) {
                                    for (;;) {
                                      if ((0 | j) == (0 | (A = (A - 4) | 0))) {
                                        if (((ae = (j + 4) | 0), Ka(j, Le)))
                                          break a;
                                        for (;;) {
                                          if ((0 | ae) == (0 | Le)) break n;
                                          if (Ka(j, ae)) {
                                            gs(ae, Le), (ae = (ae + 4) | 0);
                                            break a;
                                          }
                                          ae = (ae + 4) | 0;
                                        }
                                      }
                                      if (Ka(A, ge)) break;
                                    }
                                    gs(j, A), (et = (et + 1) | 0);
                                  }
                                  if ((ae = (j + 4) | 0) >>> 0 >= A >>> 0)
                                    break l;
                                  for (;;)
                                    if (
                                      ((Ee = ae),
                                      (ae = (ae + 4) | 0),
                                      !Ka(Ee, ge))
                                    ) {
                                      for (; !Ka((A = (A - 4) | 0), ge); );
                                      if (A >>> 0 < Ee >>> 0) {
                                        ae = Ee;
                                        break l;
                                      }
                                      gs(Ee, A),
                                        (ge = (0 | ge) == (0 | Ee) ? A : ge),
                                        (et = (et + 1) | 0);
                                    }
                                }
                                qf(j, (j + 4) | 0, (C - 4) | 0);
                                break n;
                              }
                              if (
                                ((0 | ae) != (0 | ge) &&
                                  Ka(ge, ae) &&
                                  (gs(ae, ge), (et = (et + 1) | 0)),
                                !et)
                              ) {
                                if (
                                  ((Ee = Mm(j, ae)), Mm((A = (ae + 4) | 0), C))
                                ) {
                                  if (((C = ae), (A = j), !Ee)) continue e;
                                  break n;
                                }
                                if (((ge = 2), Ee)) break i;
                              }
                              if (((ae - j) | 0) < ((C - ae) | 0)) {
                                si(j, ae, V), (A = (ae + 4) | 0);
                                continue t;
                              }
                              si((ae + 4) | 0, C, V), (C = ae), (A = j);
                              continue e;
                            }
                            if ((0 | (ge = Le)) == (0 | ae)) break n;
                            for (;;)
                              if (((A = ae), (ae = (ae + 4) | 0), Ka(j, A))) {
                                for (; Ka(j, (ge = (ge - 4) | 0)); );
                                if (!(A >>> 0 < ge >>> 0)) break;
                                gs(A, ge);
                              }
                            ge = 4;
                          }
                          switch (((j = A), (ge - 2) | 0)) {
                            case 0:
                              continue t;
                            case 2:
                              continue;
                            default:
                              break n;
                          }
                        }
                        break;
                      }
                      break;
                    }
                    break;
                  }
                }
                function ma(A, C, V, j) {
                  var ae,
                    ge,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0,
                    Bt = 0,
                    mn = 0,
                    Yn = 0;
                  if (
                    ((ut = ge = (ut - 32) | 0),
                    (0 | vu((ae = Bv((ge + 16) | 0, C)))) == 34)
                  ) {
                    Zs(ae),
                      (et = ae),
                      (T[((Bt = (ge + 8) | 0) + 4) >> 2] = 0),
                      (Le = A),
                      (T[Bt >> 2] = Le),
                      (C = Bt);
                    e: {
                      t: {
                        n: {
                          i: {
                            a: {
                              l: {
                                for (;;) {
                                  r: {
                                    o: {
                                      if ((0 | (yt = vu(et))) != 92) {
                                        if ((0 | (Ee = 255 & yt)) != 34)
                                          break o;
                                        Zs(et), Ks(C, 0);
                                        break e;
                                      }
                                      if (
                                        ((mn = tc(et)),
                                        Zs(et),
                                        (yt = vu(et)),
                                        (Ee = Jn[(5232 + (255 & yt)) | 0]))
                                      ) {
                                        Zs(et), Ks(C, (Ee << 24) >> 24);
                                        continue;
                                      }
                                      if ((0 | yt) == 117) {
                                        if (
                                          (Zs(et),
                                          (Ee = Nu(Le, et, mn)),
                                          Bi(Le))
                                        )
                                          break r;
                                        if (((yt = C), (-1024 & Ee) == 55296)) {
                                          if (!yu(et, 92) || !yu(et, 117)) {
                                            if (Bi(Le)) break l;
                                            if ((ia(Le, 9, mn), Bi(Le)))
                                              break r;
                                          }
                                          if (((Yn = Nu(Le, et, mn)), Bi(Le)))
                                            break r;
                                          if ((-1024 & Yn) != 56320) {
                                            if (Bi(Le)) break a;
                                            if ((ia(Le, 9, mn), Bi(Le)))
                                              break r;
                                          }
                                          Ee =
                                            (65536 +
                                              ((Yn - 56320) |
                                                ((Ee << 10) - 56623104))) |
                                            0;
                                        }
                                        c: {
                                          s: {
                                            if (!(Ee >>> 0 <= 127))
                                              if (Ee >>> 0 <= 2047)
                                                Ks(yt, (Ee >>> 6) | -64),
                                                  (Ee = (63 & Ee) | -128);
                                              else if (Ee >>> 0 <= 65535)
                                                Ks(yt, (Ee >>> 12) | -32),
                                                  Ks(
                                                    yt,
                                                    ((Ee >>> 6) & 63) | -128
                                                  ),
                                                  (Ee = (63 & Ee) | -128);
                                              else {
                                                if (Ee >>> 0 >= 1114112)
                                                  break s;
                                                Ks(yt, (Ee >>> 18) | -16),
                                                  Ks(
                                                    yt,
                                                    ((Ee >>> 12) & 63) | -128
                                                  ),
                                                  Ks(
                                                    yt,
                                                    ((Ee >>> 6) & 63) | -128
                                                  ),
                                                  (Ee = (63 & Ee) | -128);
                                              }
                                            Ks(yt, (Ee << 24) >> 24);
                                            break c;
                                          }
                                          At(1932, 1430, 115, 1859), Ye();
                                        }
                                        continue;
                                      }
                                      if (Bi(Le)) break i;
                                      if ((ia(Le, 10, mn), !Bi(Le))) continue;
                                      break r;
                                    }
                                    if (!(Ee >>> 0 <= 31)) {
                                      tc(et), Ks(C, Zs(et));
                                      continue;
                                    }
                                    if (((Ee = Bi(Le)), yt)) {
                                      if (Ee) break t;
                                      if ((ia(Le, 12, tc(et)), !Bi(Le)))
                                        continue;
                                    } else {
                                      if (Ee) break n;
                                      if ((ia(Le, 11, tc(et)), !Bi(Le)))
                                        continue;
                                    }
                                  }
                                  break;
                                }
                                break e;
                              }
                              At(2242, 1459, 1029, 1322), Ye();
                            }
                            At(2242, 1459, 1033, 1322), Ye();
                          }
                          At(2242, 1459, 1039, 1322), Ye();
                        }
                        At(2242, 1459, 1048, 1322), Ye();
                      }
                      At(2242, 1459, 1050, 1322), Ye();
                    }
                    return (
                      Bi(A) ||
                        ((C = (T[(Bt + 4) >> 2] - 1) | 0),
                        (Le = T[(Bt + 4) >> 2]),
                        Ll((et = T[Bt >> 2])) >>> 0 < Le >>> 0 &&
                          (At(2190, 1485, 139, 1176), Ye()),
                        (Le = (T[(et + 12) >> 2] - Le) | 0),
                        (T[(et + 12) >> 2] = Le),
                        No(V, Le, C)),
                      ey(ae),
                      void (ut = (ge + 32) | 0)
                    );
                  }
                  At(2386, 1459, 963, 1576),
                    Ye(),
                    At(2242, 1459, 985, 1576),
                    Ye();
                }
                function Aa(A, C) {
                  var V,
                    j = 0,
                    ae = 0,
                    ge = st(0),
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0;
                  if (
                    ((ut = V = (ut - 16) | 0),
                    (T[(A + 708) >> 2] = 0),
                    (T[(A + 712) >> 2] = 0),
                    (T[(A + 56) >> 2] != -1) | (T[(A + 60) >> 2] != -1) &&
                      Lo((j = (A + 616) | 0)))
                  ) {
                    if (
                      ((ae = Zh(j, (Lo(j) - 1) | 0)),
                      (j = T[ae >> 2]),
                      (et = T[(ae + 4) >> 2]),
                      (ae = T[(A + 56) >> 2]),
                      (Ee = T[(A + 60) >> 2]),
                      (Le = A),
                      ((0 | C) == 1 &&
                        ((ge = st(0)),
                        ((ae >>> 0 < j >>> 0) & ((0 | Ee) <= (0 | et))) |
                          ((0 | Ee) < (0 | et)))) ||
                        ((ae =
                          ((ae =
                            (Ee - ((et + (j >>> 0 > (C = ae) >>> 0)) | 0)) |
                            0) +
                            (Ee = yt = ae >> 31)) |
                          0),
                        (ge = st(
                          (+(((yt = ((C = (C - j) | 0) + Ee) | 0) ^ Ee) >>> 0) +
                            4294967296 *
                              +(
                                Ee ^ (C >>> 0 > yt >>> 0 ? (ae + 1) | 0 : ae)
                              )) /
                            (+(j >>> 0) + 4294967296 * +(0 | et))
                        ))),
                      (Dt[(Le + 708) >> 2] = ge),
                      (Kt[(V + 8) >> 3] = ge),
                      ip((C = (A + 640) | 0), (V + 8) | 0),
                      Lo(C) >>> 0 > Ut[(A + 140) >> 2] &&
                        ((T[(V + 8) >> 2] = Vr(C)),
                        tp(C, T[yg(V, (V + 8) | 0) >> 2])),
                      (j = Vr(C)),
                      (ae = Hm(C)),
                      (ut = C = (ut - 32) | 0),
                      (T[(C + 16) >> 2] = ae),
                      (T[(C + 24) >> 2] = j),
                      Jl((C + 24) | 0, (C + 16) | 0) &&
                        ((T[C >> 2] = T[(C + 24) >> 2]),
                        Jl(Fm(C), (C + 16) | 0)))
                    )
                      for (
                        ;
                        ry(T[(C + 24) >> 2], T[C >> 2]) &&
                          (T[(C + 24) >> 2] = T[C >> 2]),
                          Jl(Fm(C), (C + 16) | 0);

                      );
                    (ut = (C + 32) | 0),
                      (T[(V + 8) >> 2] = T[(C + 24) >> 2]),
                      (Dt[(A + 712) >> 2] = Kt[T[(V + 8) >> 2] >> 3]),
                      (j = A),
                      (Le = A),
                      (ge = st(
                        st(+($m(A) >>> 0) + 4294967296 * +(0 | cn)) /
                          st(Dt[(A + 712) >> 2] + st(1))
                      )),
                      st(Xt(ge)) < st(9223372036854776e3)
                        ? ((ae =
                            st(Xt(ge)) >= st(1)
                              ? ~~(ge > st(0)
                                  ? st(
                                      cr(
                                        st(
                                          Ui(st(ge * st(23283064365386963e-26)))
                                        ),
                                        st(4294967296)
                                      )
                                    )
                                  : st(
                                      Je(
                                        st(
                                          st(ge - st((~~ge >>> 0) >>> 0)) *
                                            st(23283064365386963e-26)
                                        )
                                      )
                                    )) >>> 0
                              : 0),
                          (C = ~~ge >>> 0))
                        : ((ae = -2147483648), (C = 0)),
                      (T[(Le + 48) >> 2] = C),
                      (Le = j),
                      (j = ae),
                      (T[(Le + 52) >> 2] = j);
                  } else
                    (T[(A + 48) >> 2] = $m(A)),
                      (T[(A + 52) >> 2] = cn),
                      (Kt[(V + 8) >> 3] = Dt[(A + 708) >> 2]),
                      ip((A + 640) | 0, (V + 8) | 0),
                      (C = T[(A + 48) >> 2]),
                      (j = T[(A + 52) >> 2]);
                  (T[(A + 56) >> 2] = C),
                    (T[(A + 60) >> 2] = j),
                    (ut = (V + 16) | 0);
                }
                function Sl(A, C, V) {
                  var j,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = st(0),
                    et = st(0),
                    yt = st(0),
                    Bt = st(0),
                    mn = st(0),
                    Yn = st(0),
                    zr = st(0),
                    Zr = st(0),
                    fi = 0,
                    Pi = 0,
                    ta = 0,
                    Ji = 0,
                    bo = 0,
                    Oo = 0,
                    Do = 0,
                    sl = 0,
                    vc = 0,
                    yh = 0;
                  return (
                    (ut = j = (ut - 144) | 0),
                    (ge = T[(A + 36) >> 2]),
                    (!T[(A + 32) >> 2] & ((0 | ge) <= 0)) | ((0 | ge) < 0) ||
                    ((ge = hh()),
                    (Ee = T[(A + 32) >> 2]),
                    (ae =
                      (cn - ((T[(A + 36) >> 2] + (Ee >>> 0 > ge >>> 0)) | 0)) |
                      0),
                    (ge = (ge - Ee) | 0),
                    (T[(A + 8) >> 2] = ge),
                    (T[(A + 12) >> 2] = ae),
                    ((ge >>> 0 < 4e3) & ((0 | ae) <= 0)) | ((0 | ae) < 0))
                      ? (ge = C)
                      : ((T[(A + 112) >> 2] = C),
                        Fr(A, C),
                        Aa(A, 1),
                        Ps((ae = (A + 584) | 0))
                          ? ((Ee = ae),
                            (ge =
                              (0 | (ge = V)) >= T[(A + 552) >> 2]
                                ? (Ps(ae) - 1) | 0
                                : (0 | ge) > 0
                                ? ge
                                : 0),
                            (ge = T[r_(Ee, ge) >> 2]))
                          : (ge = 0),
                        (ae = T[(A + 556) >> 2]),
                        (Le = Dt[(A + 232) >> 2]),
                        (et = Dt[(A + 720) >> 2]),
                        (yt = Dt[(A + 236) >> 2]),
                        (Bt = Dt[(A + 724) >> 2]),
                        (mn = Dt[(A + 192) >> 2]),
                        (Yn = Dt[(A + 708) >> 2]),
                        (zr = Dt[(A + 712) >> 2]),
                        (Zr = Dt[(A + 716) >> 2]),
                        (fi = Kt[(A + 264) >> 3]),
                        (Ee = T[(A + 40) >> 2]),
                        (Pi = T[(A + 44) >> 2]),
                        (ta = T[(A + 24) >> 2]),
                        (Ji = T[(A + 28) >> 2]),
                        (bo = T[(A + 8) >> 2]),
                        (Oo = T[(A + 12) >> 2]),
                        (Do = T[(A + 52) >> 2]),
                        (sl = T[(A + 48) >> 2]),
                        (vc = T[(A + 676) >> 2]),
                        (yh = T[(A + 684) >> 2]),
                        (T[(j + 136) >> 2] = T[(A + 692) >> 2]),
                        (T[(j + 124) >> 2] = yh),
                        (T[(j + 120) >> 2] = vc),
                        (T[(j + 100) >> 2] = 0),
                        (T[(j + 96) >> 2] = ae),
                        (T[((ae = j) + 88) >> 2] = sl),
                        (T[(ae + 92) >> 2] = Do),
                        (T[(ae + 80) >> 2] = bo),
                        (T[(ae + 84) >> 2] = Oo),
                        (T[(ae + 76) >> 2] = ge),
                        (T[(ae + 72) >> 2] = C),
                        (T[(ae + 56) >> 2] = ta),
                        (T[(ae + 60) >> 2] = Ji),
                        (T[(ae + 48) >> 2] = Ee),
                        (T[(ae + 52) >> 2] = Pi),
                        (Kt[(ae + 40) >> 3] = fi),
                        (Kt[(ae + 128) >> 3] = Zr),
                        (Kt[(ae + 112) >> 3] = zr),
                        (Kt[(ae + 104) >> 3] = Yn),
                        (Kt[(ae - -64) >> 3] = mn),
                        (Kt[(ae + 32) >> 3] = Bt),
                        (Kt[(ae + 24) >> 3] = yt),
                        (Kt[(ae + 16) >> 3] = et),
                        (T[(ae + 4) >> 2] = 0),
                        (T[ae >> 2] = V),
                        (Kt[(ae + 8) >> 3] = Le),
                        ps(A, 2805, ae),
                        (T[(A + 116) >> 2] = ge),
                        (C = T[(A + 12) >> 2]),
                        (T[A >> 2] = T[(A + 8) >> 2]),
                        (T[(A + 4) >> 2] = C),
                        (Kt[(A + 248) >> 3] = Dt[(A + 232) >> 2]),
                        (Kt[(A + 256) >> 3] = Dt[(A + 236) >> 2])),
                    (ut = (j + 144) | 0),
                    ge
                  );
                }
                function Ki(A, C) {
                  var V,
                    j,
                    ae,
                    ge,
                    Ee,
                    Le,
                    et = 0,
                    yt = 0,
                    Bt = 0;
                  (ut = ge = (ut - 16) | 0),
                    (j = Od((ge + 8) | 0, C)),
                    (ut = V = (ut + -64) | 0),
                    (Bt = et = (V + 24) | 0),
                    op((ae = (A + 32) | 0))
                      ? (C = T[ae >> 2]) || (At(1892, 1485, 173, 1119), Ye())
                      : (C = 0),
                    zo(Bt, C, 256),
                    ms((yt = (et + 24) | 0)),
                    (T[(et + 32) >> 2] = 2),
                    (Bt = et),
                    (Le = Uu((V + 16) | 0, A)),
                    (C = A),
                    (ut = Ee = (ut - 16) | 0),
                    l2(yt, 0, 0),
                    (yt = Uu((Ee + 8) | 0, et)),
                    xd(j);
                  e: {
                    t: {
                      n: if (!Bi(et)) {
                        i: {
                          if (!vu(j)) {
                            if (((C = 1), !Bi(et))) break i;
                            At(2242, 1459, 571, 1774), Ye();
                          }
                          if (
                            (jr(et, j, C), Bi(et) || (xd(j), Bi(et)) || !vu(j))
                          )
                            break n;
                          if (((C = 2), Bi(et))) break t;
                        }
                        ia(et, C, tc(j)), Bi(et);
                      }
                      (C = T[(et + 28) >> 2]),
                        (T[(V + 8) >> 2] = T[(et + 24) >> 2]),
                        (T[(V + 12) >> 2] = C),
                        yc(T[yt >> 2]),
                        (ut = (Ee + 16) | 0);
                      break e;
                    }
                    At(2242, 1459, 583, 1774), Ye();
                  }
                  (C = T[(V + 12) >> 2]),
                    (T[(A + 56) >> 2] = T[(V + 8) >> 2]),
                    (T[(A + 60) >> 2] = C),
                    (C = op((A + 56) | 0)),
                    (T[(V + 4) >> 2] = 0),
                    (T[V >> 2] = C ? 0 : 3);
                  e: {
                    t: {
                      if (T[V >> 2] | (1 & T[(V + 4) >> 2])) {
                        if ((0 | Ll(ae)) != 24) break t;
                        (0 | (C = A)) != (0 | (yt = zb(ae, 1))) &&
                          ((et = T[(yt + 4) >> 2]),
                          (T[C >> 2] = T[yt >> 2]),
                          (T[(C + 4) >> 2] = et),
                          (et = T[(yt + 20) >> 2]),
                          (T[(C + 16) >> 2] = T[(yt + 16) >> 2]),
                          (T[(C + 20) >> 2] = et),
                          (et = T[(yt + 12) >> 2]),
                          (T[(C + 8) >> 2] = T[(yt + 8) >> 2]),
                          (T[(C + 12) >> 2] = et),
                          (yr[(yt + 18) >> 1] = 0));
                      }
                      yc((C = (T[Le >> 2] + 32) | 0)),
                        T[(C + 12) >> 2] != T[(C + 8) >> 2]
                          ? Wr(C, Ll(C))
                          : (Ni(T[(C + 8) >> 2]),
                            (T[(C + 16) >> 2] = 0),
                            (T[(C + 8) >> 2] = 0),
                            (T[(C + 12) >> 2] = 0)),
                        xl(Bt),
                        (ut = (V - -64) | 0);
                      break e;
                    }
                    At(2055, 1402, 2344, 1342), Ye();
                  }
                  return (ut = (ge + 16) | 0), A;
                }
                function Ro(A, C, V) {
                  var j,
                    ae = 0,
                    ge = 0;
                  if (V >>> 0 >= 512) return _n(0 | A, 0 | C, 0 | V), A;
                  j = (A + V) | 0;
                  e: if (3 & (A ^ C))
                    if (j >>> 0 < 4) V = A;
                    else if ((ae = (j - 4) | 0) >>> 0 < A >>> 0) V = A;
                    else
                      for (
                        V = A;
                        (Ht[0 | V] = Jn[0 | C]),
                          (Ht[(V + 1) | 0] = Jn[(C + 1) | 0]),
                          (Ht[(V + 2) | 0] = Jn[(C + 2) | 0]),
                          (Ht[(V + 3) | 0] = Jn[(C + 3) | 0]),
                          (C = (C + 4) | 0),
                          ae >>> 0 >= (V = (V + 4) | 0) >>> 0;

                      );
                  else {
                    t: if (3 & A)
                      if (V)
                        for (V = A; ; ) {
                          if (
                            ((Ht[0 | V] = Jn[0 | C]),
                            (C = (C + 1) | 0),
                            !(3 & (V = (V + 1) | 0)))
                          )
                            break t;
                          if (!(V >>> 0 < j >>> 0)) break;
                        }
                      else V = A;
                    else V = A;
                    if (
                      !(
                        (ae = -4 & j) >>> 0 < 64 ||
                        (ge = (ae + -64) | 0) >>> 0 < V >>> 0
                      )
                    )
                      for (
                        ;
                        (T[V >> 2] = T[C >> 2]),
                          (T[(V + 4) >> 2] = T[(C + 4) >> 2]),
                          (T[(V + 8) >> 2] = T[(C + 8) >> 2]),
                          (T[(V + 12) >> 2] = T[(C + 12) >> 2]),
                          (T[(V + 16) >> 2] = T[(C + 16) >> 2]),
                          (T[(V + 20) >> 2] = T[(C + 20) >> 2]),
                          (T[(V + 24) >> 2] = T[(C + 24) >> 2]),
                          (T[(V + 28) >> 2] = T[(C + 28) >> 2]),
                          (T[(V + 32) >> 2] = T[(C + 32) >> 2]),
                          (T[(V + 36) >> 2] = T[(C + 36) >> 2]),
                          (T[(V + 40) >> 2] = T[(C + 40) >> 2]),
                          (T[(V + 44) >> 2] = T[(C + 44) >> 2]),
                          (T[(V + 48) >> 2] = T[(C + 48) >> 2]),
                          (T[(V + 52) >> 2] = T[(C + 52) >> 2]),
                          (T[(V + 56) >> 2] = T[(C + 56) >> 2]),
                          (T[(V + 60) >> 2] = T[(C + 60) >> 2]),
                          (C = (C - -64) | 0),
                          ge >>> 0 >= (V = (V - -64) | 0) >>> 0;

                      );
                    if (V >>> 0 >= ae >>> 0) break e;
                    for (
                      ;
                      (T[V >> 2] = T[C >> 2]),
                        (C = (C + 4) | 0),
                        ae >>> 0 > (V = (V + 4) | 0) >>> 0;

                    );
                  }
                  if (V >>> 0 < j >>> 0)
                    for (
                      ;
                      (Ht[0 | V] = Jn[0 | C]),
                        (C = (C + 1) | 0),
                        (0 | j) != (0 | (V = (V + 1) | 0));

                    );
                  return A;
                }
                function Xo(A, C, V) {
                  var j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0,
                    Bt = 0,
                    mn = 0;
                  e: {
                    t: {
                      n: {
                        i: {
                          a: {
                            l: {
                              r: {
                                o: {
                                  c: {
                                    s: {
                                      if (((ae = C), C)) {
                                        if (!(j = V)) break s;
                                        break c;
                                      }
                                      (A = ((A >>> 0) / (V >>> 0)) | 0),
                                        (cn = 0);
                                      break e;
                                    }
                                    if (!A) break o;
                                    break r;
                                  }
                                  if (!((j - 1) & j)) break l;
                                  et =
                                    (0 -
                                      (Le =
                                        (((qn(j) + 33) | 0) - qn(ae)) | 0)) |
                                    0;
                                  break i;
                                }
                                (A = ((ae >>> 0) / 0) | 0), (cn = 0);
                                break e;
                              }
                              if ((j = (32 - qn(ae)) | 0) >>> 0 < 31) break a;
                              break n;
                            }
                            if ((0 | j) == 1) break t;
                            (V =
                              31 & (j = j ? (31 - qn((j - 1) ^ j)) | 0 : 32)),
                              (63 & j) >>> 0 >= 32
                                ? ((ae = 0), (A = (C >>> V) | 0))
                                : ((ae = (C >>> V) | 0),
                                  (A =
                                    ((((1 << V) - 1) & C) << (32 - V)) |
                                    (A >>> V))),
                              (cn = ae);
                            break e;
                          }
                          (Le = (j + 1) | 0), (et = (63 - j) | 0);
                        }
                        if (
                          ((j = C),
                          (ge = 31 & (ae = 63 & Le)),
                          ae >>> 0 >= 32
                            ? ((ae = 0), (ge = (j >>> ge) | 0))
                            : ((ae = (j >>> ge) | 0),
                              (ge =
                                ((((1 << ge) - 1) & j) << (32 - ge)) |
                                (A >>> ge))),
                          (j = 31 & (et &= 63)),
                          et >>> 0 >= 32
                            ? ((C = A << j), (A = 0))
                            : ((C =
                                (((1 << j) - 1) & (A >>> (32 - j))) | (C << j)),
                              (A <<= j)),
                          Le)
                        )
                          for (
                            et = (0 | (j = (V - 1) | 0)) != -1 ? 0 : -1;
                            (ge =
                              ((yt = Ee = (ge << 1) | (C >>> 31)) -
                                (Bt =
                                  V &
                                  (Ee =
                                    (et -
                                      (((ae = (ae << 1) | (ge >>> 31)) +
                                        (j >>> 0 < Ee >>> 0)) |
                                        0)) >>
                                    31))) |
                              0),
                              (ae = (ae - (yt >>> 0 < Bt >>> 0)) | 0),
                              (C = (C << 1) | (A >>> 31)),
                              (A = mn | (A << 1)),
                              (mn = Ee &= 1),
                              (Le = (Le - 1) | 0);

                          );
                        (cn = (C << 1) | (A >>> 31)), (A = Ee | (A << 1));
                        break e;
                      }
                      (A = 0), (C = 0);
                    }
                    cn = C;
                  }
                  return A;
                }
                function Ns(A, C, V) {
                  var j,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0;
                  ut = j = (ut - 16) | 0;
                  e: {
                    if (mh(C)) {
                      if (!Kv(V)) break e;
                      mh((ae = C)) || (At(2231, 1402, 1246, 1292), Ye()),
                        Uu(A, T[(ae + 8) >> 2]),
                        ph((ae = (j + 8) | 0), C);
                      t: if (Jl(A, ae))
                        for (;;) {
                          ge = T[A >> 2];
                          n: {
                            i: {
                              if (Kv((ae = V))) {
                                if (!Kv(ge)) break i;
                                if ((0 | (Ee = Uv(ae))) == (0 | Uv(ge))) {
                                  if (
                                    ((Le = wi(ae)),
                                    (ae = 1),
                                    (0 | Le) == (0 | (ge = wi(ge))))
                                  )
                                    break n;
                                  a: {
                                    l: {
                                      r: {
                                        if (Ee >>> 0 >= 4) {
                                          if (3 & (ge | Le)) break r;
                                          for (;;) {
                                            if (T[Le >> 2] != T[ge >> 2])
                                              break r;
                                            if (
                                              ((ge = (ge + 4) | 0),
                                              (Le = (Le + 4) | 0),
                                              !((Ee = (Ee - 4) | 0) >>> 0 > 3))
                                            )
                                              break;
                                          }
                                        }
                                        if (!Ee) break l;
                                      }
                                      for (;;) {
                                        if (
                                          (0 | (ae = Jn[0 | Le])) ==
                                          (0 | (et = Jn[0 | ge]))
                                        ) {
                                          if (
                                            ((ge = (ge + 1) | 0),
                                            (Le = (Le + 1) | 0),
                                            (Ee = (Ee - 1) | 0))
                                          )
                                            continue;
                                          break l;
                                        }
                                        break;
                                      }
                                      ae = (ae - et) | 0;
                                      break a;
                                    }
                                    ae = 0;
                                  }
                                  ae = !ae;
                                } else ae = 0;
                                break n;
                              }
                              At(2290, 1402, 2171, 1364), Ye();
                            }
                            At(2270, 1402, 2172, 1364), Ye();
                          }
                          if (ae) break t;
                          if (
                            ((T[A >> 2] = T[A >> 2] + 48),
                            ph((ae = (j + 8) | 0), C),
                            !Jl(A, ae))
                          )
                            break;
                        }
                      return void (ut = (j + 16) | 0);
                    }
                    At(2231, 1402, 1334, 1144), Ye();
                  }
                  At(2285, 1402, 1335, 1144), Ye();
                }
                function Gu(A, C, V) {
                  var j = 0,
                    ae = 0;
                  e: if ((0 | A) != (0 | C)) {
                    if ((C - (ae = (A + V) | 0)) >>> 0 <= (0 - (V << 1)) >>> 0)
                      return void Ro(A, C, V);
                    if (((j = 3 & (A ^ C)), A >>> 0 < C >>> 0)) {
                      if (!j) {
                        if (3 & A)
                          for (;;) {
                            if (!V) break e;
                            if (
                              ((Ht[0 | A] = Jn[0 | C]),
                              (C = (C + 1) | 0),
                              (V = (V - 1) | 0),
                              !(3 & (A = (A + 1) | 0)))
                            )
                              break;
                          }
                        if (!(V >>> 0 <= 3))
                          for (
                            ;
                            (T[A >> 2] = T[C >> 2]),
                              (C = (C + 4) | 0),
                              (A = (A + 4) | 0),
                              (V = (V - 4) | 0) >>> 0 > 3;

                          );
                      }
                      if (V)
                        for (
                          ;
                          (Ht[0 | A] = Jn[0 | C]),
                            (A = (A + 1) | 0),
                            (C = (C + 1) | 0),
                            (V = (V - 1) | 0);

                        );
                    } else {
                      if (!j) {
                        if (3 & ae)
                          for (;;) {
                            if (!V) break e;
                            if (
                              ((Ht[0 | (j = ((V = (V - 1) | 0) + A) | 0)] =
                                Jn[(C + V) | 0]),
                              !(3 & j))
                            )
                              break;
                          }
                        if (!(V >>> 0 <= 3))
                          for (
                            ;
                            (T[((V = (V - 4) | 0) + A) >> 2] = T[(C + V) >> 2]),
                              V >>> 0 > 3;

                          );
                      }
                      if (!V) break e;
                      for (
                        ;
                        (Ht[((V = (V - 1) | 0) + A) | 0] = Jn[(C + V) | 0]), V;

                      );
                    }
                  }
                }
                function zh(A, C, V) {
                  var j = 0,
                    ae = 0,
                    ge = 0;
                  if (
                    V &&
                    ((Ht[((ge = (A + V) | 0) - 1) | 0] = C),
                    (Ht[0 | A] = C),
                    !(
                      V >>> 0 < 3 ||
                      ((Ht[(ge - 2) | 0] = C),
                      (Ht[(A + 1) | 0] = C),
                      (Ht[(ge - 3) | 0] = C),
                      (Ht[(A + 2) | 0] = C),
                      V >>> 0 < 7 ||
                        ((Ht[(ge - 4) | 0] = C),
                        (Ht[(A + 3) | 0] = C),
                        V >>> 0 < 9 ||
                          ((ae = ((ge = (0 - A) & 3) + A) | 0),
                          (j = vn(255 & C, 16843009)),
                          (T[ae >> 2] = j),
                          (T[((V = ((C = (V - ge) & -4) + ae) | 0) - 4) >> 2] =
                            j),
                          C >>> 0 < 9 ||
                            ((T[(ae + 8) >> 2] = j),
                            (T[(ae + 4) >> 2] = j),
                            (T[(V - 8) >> 2] = j),
                            (T[(V - 12) >> 2] = j),
                            C >>> 0 < 25 ||
                              ((T[(ae + 24) >> 2] = j),
                              (T[(ae + 20) >> 2] = j),
                              (T[(ae + 16) >> 2] = j),
                              (T[(ae + 12) >> 2] = j),
                              (T[(V - 16) >> 2] = j),
                              (T[(V - 20) >> 2] = j),
                              (T[(V - 24) >> 2] = j),
                              (T[(V - 28) >> 2] = j),
                              (V = ((V = C) - (C = (4 & ae) | 24)) | 0) >>> 0 <
                                32)))))
                    ))
                  )
                    for (
                      j = cd(j, 0, 1, 1), ge = cn, C = (C + ae) | 0;
                      (T[(C + 24) >> 2] = j),
                        (ae = ge),
                        (T[(C + 28) >> 2] = ae),
                        (T[(C + 16) >> 2] = j),
                        (T[(C + 20) >> 2] = ae),
                        (T[(C + 8) >> 2] = j),
                        (T[(C + 12) >> 2] = ae),
                        (T[C >> 2] = j),
                        (T[(C + 4) >> 2] = ae),
                        (C = (C + 32) | 0),
                        (V = (V - 32) | 0) >>> 0 > 31;

                    );
                  return A;
                }
                function j0(A, C, V) {
                  e: if (!(C >>> 0 > 20)) {
                    t: switch ((C - 9) | 0) {
                      case 0:
                        return (
                          (C = T[V >> 2]),
                          (T[V >> 2] = C + 4),
                          void (T[A >> 2] = T[C >> 2])
                        );
                      case 1:
                        return (
                          (C = T[V >> 2]),
                          (T[V >> 2] = C + 4),
                          (C = T[C >> 2]),
                          (T[A >> 2] = C),
                          void (T[(A + 4) >> 2] = C >> 31)
                        );
                      case 2:
                        return (
                          (C = T[V >> 2]),
                          (T[V >> 2] = C + 4),
                          (T[A >> 2] = T[C >> 2]),
                          void (T[(A + 4) >> 2] = 0)
                        );
                      case 3:
                        return (
                          (C = (T[V >> 2] + 7) & -8),
                          (T[V >> 2] = C + 8),
                          (V = T[(C + 4) >> 2]),
                          (T[A >> 2] = T[C >> 2]),
                          void (T[(A + 4) >> 2] = V)
                        );
                      case 4:
                        return (
                          (C = T[V >> 2]),
                          (T[V >> 2] = C + 4),
                          (C = yr[C >> 1]),
                          (T[A >> 2] = C),
                          void (T[(A + 4) >> 2] = C >> 31)
                        );
                      case 5:
                        return (
                          (C = T[V >> 2]),
                          (T[V >> 2] = C + 4),
                          (T[A >> 2] = pr[C >> 1]),
                          void (T[(A + 4) >> 2] = 0)
                        );
                      case 6:
                        return (
                          (C = T[V >> 2]),
                          (T[V >> 2] = C + 4),
                          (C = Ht[0 | C]),
                          (T[A >> 2] = C),
                          void (T[(A + 4) >> 2] = C >> 31)
                        );
                      case 7:
                        return (
                          (C = T[V >> 2]),
                          (T[V >> 2] = C + 4),
                          (T[A >> 2] = Jn[0 | C]),
                          void (T[(A + 4) >> 2] = 0)
                        );
                      case 8:
                        return (
                          (C = (T[V >> 2] + 7) & -8),
                          (T[V >> 2] = C + 8),
                          void (Kt[A >> 3] = Kt[C >> 3])
                        );
                      case 9:
                        break t;
                      default:
                        break e;
                    }
                    Ao[5](A, V);
                  }
                }
                function Ws(A, C) {
                  var V,
                    j,
                    ae,
                    ge,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0;
                  if (T[(A + 4) >> 2] != T[ws(A) >> 2])
                    return (
                      (ut = Le = (ut - 16) | 0),
                      (Ee = Vv(Le, A, 1)),
                      Xm(ws(A), T[(Ee + 4) >> 2], C),
                      (T[(Ee + 4) >> 2] = T[(Ee + 4) >> 2] + 4),
                      Hr(Ee),
                      void (ut = (Le + 16) | 0)
                    );
                  if (
                    ((ut = V = (ut - 32) | 0),
                    (ae = et = ws(A)),
                    (Le = Fb(A, (Ps(A) + 1) | 0)),
                    (ge = Ps(A)),
                    (ut = j = (ut - 16) | 0),
                    (T[(j + 12) >> 2] = 0),
                    u2(((Ee = (V + 8) | 0) + 12) | 0, et),
                    Le && (yt = Qa(T[(Ee + 16) >> 2], Le)),
                    (T[Ee >> 2] = yt),
                    (et = ((ge << 2) + yt) | 0),
                    (T[(Ee + 8) >> 2] = et),
                    (T[(Ee + 4) >> 2] = et),
                    (T[eu(Ee) >> 2] = (Le << 2) + yt),
                    (ut = (j + 16) | 0),
                    Xm(ae, T[(Ee + 8) >> 2], C),
                    (T[(Ee + 8) >> 2] = T[(Ee + 8) >> 2] + 4),
                    l_(A),
                    (C = (Ee + 4) | 0),
                    tA(ws(A), T[A >> 2], T[(A + 4) >> 2], C),
                    gs(A, C),
                    gs((A + 4) | 0, (Ee + 8) | 0),
                    gs(ws(A), eu(Ee)),
                    (T[Ee >> 2] = T[(Ee + 4) >> 2]),
                    Qv(A, Ps(A)),
                    (A = Ee),
                    (C = Ee),
                    (0 | (et = T[(Ee + 8) >> 2])) !=
                      (0 | (Ee = T[(Ee + 4) >> 2])))
                  )
                    for (
                      ;
                      (T[(C + 8) >> 2] = T[(C + 8) >> 2] - 4),
                        (0 | Ee) != T[(C + 8) >> 2];

                    );
                  T[A >> 2] && Ni((C = T[A >> 2])), (ut = (V + 32) | 0);
                }
                function W0(A, C, V, j) {
                  var ae = 0;
                  (T[(j + 8) >> 2] = C),
                    (T[j >> 2] = 0),
                    (T[(j + 4) >> 2] = 0),
                    (T[V >> 2] = j),
                    T[T[A >> 2] >> 2] && (T[A >> 2] = T[T[A >> 2] >> 2]),
                    (V = (0 | (j = T[tu(A) >> 2])) == (0 | (C = T[V >> 2]))),
                    (Ht[(C + 12) | 0] = V);
                  e: if (!V)
                    for (;;) {
                      if (Jn[(T[(C + 8) >> 2] + 12) | 0]) break e;
                      (ae = Ja(T[(C + 8) >> 2])), (V = T[(C + 8) >> 2]);
                      t: {
                        if (ae) {
                          if (
                            !(
                              !(V = T[(T[(V + 8) >> 2] + 4) >> 2]) |
                              Jn[(V + 12) | 0]
                            )
                          )
                            break t;
                          Ja(C) || Ub((C = T[(C + 8) >> 2])),
                            (C = T[(C + 8) >> 2]),
                            (Ht[(C + 12) | 0] = 1),
                            (C = T[(C + 8) >> 2]),
                            (Ht[(C + 12) | 0] = 0),
                            Lm(C);
                          break e;
                        }
                        if (!(V = T[T[(V + 8) >> 2] >> 2]) | Jn[(V + 12) | 0]) {
                          Ja(C) && Lm((C = T[(C + 8) >> 2])),
                            (C = T[(C + 8) >> 2]),
                            (Ht[(C + 12) | 0] = 1),
                            (C = T[(C + 8) >> 2]),
                            (Ht[(C + 12) | 0] = 0),
                            Ub(C);
                          break e;
                        }
                      }
                      if (
                        ((C = T[(C + 8) >> 2]),
                        (Ht[(C + 12) | 0] = 1),
                        (C = T[(C + 8) >> 2]),
                        (Ht[(C + 12) | 0] = (0 | C) == (0 | j)),
                        (Ht[(V + 12) | 0] = 1),
                        (0 | C) == (0 | j))
                      )
                        break;
                    }
                  (A = ws(A)), (T[A >> 2] = T[A >> 2] + 1);
                }
                function Mm(A, C) {
                  var V,
                    j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0;
                  (ut = V = (ut - 16) | 0), (Ee = 1);
                  e: {
                    t: switch ((C - A) >> 2) {
                      case 2:
                        if (!Ka((C = (C - 4) | 0), A)) break e;
                        gs(A, C);
                        break e;
                      case 3:
                        qf(A, (A + 4) | 0, (C - 4) | 0);
                        break e;
                      case 4:
                        dg(A, (A + 4) | 0, (A + 8) | 0, (C - 4) | 0);
                        break e;
                      case 5:
                        Nv(
                          A,
                          (A + 4) | 0,
                          (A + 8) | 0,
                          (A + 12) | 0,
                          (C - 4) | 0
                        );
                        break e;
                      case 0:
                      case 1:
                        break e;
                      default:
                        break t;
                    }
                    for (
                      qf(A, (A + 4) | 0, (ae = (A + 8) | 0)), j = (A + 12) | 0;
                      ;

                    ) {
                      if ((0 | C) == (0 | j)) break e;
                      t: {
                        if (Ka(j, ae)) {
                          for (T[(V + 12) >> 2] = T[j >> 2], Le = j; ; ) {
                            if (
                              ((ge = ae),
                              (T[Le >> 2] = T[ge >> 2]),
                              (0 | A) != (0 | ge))
                            ) {
                              if (
                                ((Le = ge),
                                Ka((V + 12) | 0, (ae = (ge - 4) | 0)))
                              )
                                continue;
                            } else ge = A;
                            break;
                          }
                          if (
                            ((T[ge >> 2] = T[(V + 12) >> 2]),
                            (0 | (et = (et + 1) | 0)) == 8)
                          )
                            break t;
                        }
                        (ae = j), (j = (j + 4) | 0);
                        continue;
                      }
                      break;
                    }
                    Ee = ((j + 4) | 0) == (0 | C);
                  }
                  return (ut = (V + 16) | 0), Ee;
                }
                function ps(A, C, V) {
                  var j,
                    ae = 0,
                    ge = 0,
                    Ee = 0;
                  (ut = j = (ut - 16) | 0),
                    Jn[(A + 186) | 0] &&
                      ((T[(j + 12) >> 2] = V),
                      (A = T[2116]),
                      (ut = ae = (ut - 208) | 0),
                      (T[(ae + 204) >> 2] = V),
                      zh((V = (ae + 160) | 0), 0, 40),
                      (T[(ae + 200) >> 2] = T[(ae + 204) >> 2]),
                      (0 | Yr(0, C, (ae + 200) | 0, (ae + 80) | 0, V)) < 0 ||
                        (T[(A + 76) >> 2] >= 0,
                        (V = T[A >> 2]),
                        Ht[(A + 74) | 0] <= 0 && (T[A >> 2] = -33 & V),
                        (Ee = 32 & V),
                        T[(A + 48) >> 2]
                          ? Yr(
                              A,
                              C,
                              (ae + 200) | 0,
                              (ae + 80) | 0,
                              (ae + 160) | 0
                            )
                          : ((T[(A + 48) >> 2] = 80),
                            (ge = (ae + 80) | 0),
                            (T[(A + 16) >> 2] = ge),
                            (T[(A + 28) >> 2] = ae),
                            (T[(A + 20) >> 2] = ae),
                            (V = T[(A + 44) >> 2]),
                            (T[(A + 44) >> 2] = ae),
                            Yr(A, C, (ae + 200) | 0, ge, (ae + 160) | 0),
                            V &&
                              (Ao[T[(A + 36) >> 2]](A, 0, 0),
                              (T[(A + 48) >> 2] = 0),
                              (T[(A + 44) >> 2] = V),
                              (T[(A + 28) >> 2] = 0),
                              (T[(A + 16) >> 2] = 0),
                              (T[(A + 20) >> 2] = 0))),
                        (T[A >> 2] = T[A >> 2] | Ee)),
                      (ut = (ae + 208) | 0)),
                    (ut = (j + 16) | 0);
                }
                function rs(A, C, V) {
                  var j = 0,
                    ae = 0,
                    ge = 0;
                  if (!(32 & Jn[0 | A]))
                    e: {
                      (ge = C), (ae = V);
                      t: {
                        if (!(A = T[((C = A) + 16) >> 2])) {
                          if (
                            ((A = C),
                            (j = Jn[(C + 74) | 0]),
                            (Ht[(C + 74) | 0] = (j - 1) | j),
                            8 & (j = T[C >> 2])
                              ? ((T[A >> 2] = 32 | j), (A = -1))
                              : ((T[(A + 4) >> 2] = 0),
                                (T[(A + 8) >> 2] = 0),
                                (j = T[(A + 44) >> 2]),
                                (T[(A + 28) >> 2] = j),
                                (T[(A + 20) >> 2] = j),
                                (T[(A + 16) >> 2] = j + T[(A + 48) >> 2]),
                                (A = 0)),
                            A)
                          )
                            break t;
                          A = T[(C + 16) >> 2];
                        }
                        if ((A - (j = T[(C + 20) >> 2])) >>> 0 < ae >>> 0) {
                          Ao[T[(C + 36) >> 2]](C, ge, V);
                          break e;
                        }
                        n: if (!(Ht[(C + 75) | 0] < 0)) {
                          for (A = V; ; ) {
                            if (((ae = A), !A)) break n;
                            if (Jn[(ge + (A = (ae - 1) | 0)) | 0] == 10) break;
                          }
                          if (Ao[T[(C + 36) >> 2]](C, ge, ae) >>> 0 < ae >>> 0)
                            break t;
                          (ge = (ae + ge) | 0),
                            (V = (V - ae) | 0),
                            (j = T[(C + 20) >> 2]);
                        }
                        Ro(j, ge, V), (T[(C + 20) >> 2] = T[(C + 20) >> 2] + V);
                      }
                    }
                }
                function ug(A, C) {
                  var V = 0,
                    j = 0,
                    ae = 0;
                  if ((0 | A) != (0 | C)) {
                    if (!Um(A))
                      return Um(C)
                        ? ((ae = dd(C)),
                          (C = gh(C)),
                          (ut = V = (ut - 16) | 0),
                          C >>> 0 <= 10
                            ? (Jh(A, C),
                              Bm(A, ae, C),
                              (Ht[(V + 15) | 0] = 0),
                              iy((A + C) | 0, (V + 15) | 0))
                            : ec(
                                A,
                                10,
                                (C - 10) | 0,
                                (A = Jn[(A + 11) | 0]),
                                A,
                                C,
                                ae
                              ),
                          void (ut = (V + 16) | 0))
                        : ((T[(A + 8) >> 2] = T[(C + 8) >> 2]),
                          (V = T[(C + 4) >> 2]),
                          (T[A >> 2] = T[C >> 2]),
                          void (T[(A + 4) >> 2] = V));
                    (ae = dd(C)),
                      (C = gh(C)),
                      (ut = V = (ut - 16) | 0),
                      (j = Rl(A)) >>> 0 > C >>> 0
                        ? ((j = T[A >> 2]),
                          h_(A, C),
                          Bm(j, ae, C),
                          (Ht[(V + 15) | 0] = 0),
                          iy((C + j) | 0, (V + 15) | 0))
                        : ec(
                            A,
                            (j - 1) | 0,
                            (1 + ((C - j) | 0)) | 0,
                            (A = T[(A + 4) >> 2]),
                            A,
                            C,
                            ae
                          ),
                      (ut = (V + 16) | 0);
                  }
                }
                function Cm(A, C) {
                  if (!A) return 0;
                  e: {
                    t: {
                      if (A) {
                        if (C >>> 0 <= 127) break t;
                        if (T[T[2760] >> 2]) {
                          if (C >>> 0 <= 2047) {
                            (Ht[(A + 1) | 0] = (63 & C) | 128),
                              (Ht[0 | A] = (C >>> 6) | 192),
                              (A = 2);
                            break e;
                          }
                          if (!(((-8192 & C) != 57344) & (C >>> 0 >= 55296))) {
                            (Ht[(A + 2) | 0] = (63 & C) | 128),
                              (Ht[0 | A] = (C >>> 12) | 224),
                              (Ht[(A + 1) | 0] = ((C >>> 6) & 63) | 128),
                              (A = 3);
                            break e;
                          }
                          if ((C - 65536) >>> 0 <= 1048575) {
                            (Ht[(A + 3) | 0] = (63 & C) | 128),
                              (Ht[0 | A] = (C >>> 18) | 240),
                              (Ht[(A + 2) | 0] = ((C >>> 6) & 63) | 128),
                              (Ht[(A + 1) | 0] = ((C >>> 12) & 63) | 128),
                              (A = 4);
                            break e;
                          }
                        } else if ((-128 & C) == 57216) break t;
                        (T[2441] = 25), (A = -1);
                      } else A = 1;
                      break e;
                    }
                    (Ht[0 | A] = C), (A = 1);
                  }
                  return A;
                }
                function $m(A) {
                  var C,
                    V = 0,
                    j = 0,
                    ae = 0,
                    ge = 0;
                  if (Lo((C = (A + 616) | 0)))
                    for (
                      A = 0;
                      (V = Zh(C, A)),
                        (((0 | (ae = T[(V + 4) >> 2])) >= 0) &
                          ((V = T[V >> 2]) >>> 0 >= 2)) |
                        ((0 | ae) > 0)
                          ? ((V = Zh(C, A)),
                            (ae = T[V >> 2]),
                            (V = T[(V + 4) >> 2]))
                          : ((ae = 1), (V = 0)),
                        (ge += 1 / (+(ae >>> 0) + 4294967296 * +(0 | V))),
                        (A = (A + 1) | 0),
                        Lo(C) >>> 0 > A >>> 0;

                    );
                  return (
                    Lo(C) && (j = +(Lo(C) >>> 0) / ge),
                    Xt(j) < 9223372036854776e3
                      ? ((cn =
                          Xt(j) >= 1
                            ? ~~(j > 0
                                ? cr(Ui(23283064365386963e-26 * j), 4294967295)
                                : Je(
                                    23283064365386963e-26 *
                                      (j - +((~~j >>> 0) >>> 0))
                                  )) >>> 0
                            : 0),
                        ~~j >>> 0)
                      : ((cn = -2147483648), 0)
                  );
                }
                function No(A, C, V) {
                  var j,
                    ae,
                    ge = 0;
                  return (
                    (ge = Yl((A + 32) | 0)),
                    (ae = Jb(A)),
                    (ut = j = (ut - 16) | 0),
                    (T[ge >> 2] = 0),
                    (T[(ge + 4) >> 2] = 0),
                    (T[(ge + 16) >> 2] = 0),
                    (T[(ge + 20) >> 2] = 0),
                    (T[(ge + 8) >> 2] = 0),
                    (T[(ge + 12) >> 2] = 0),
                    (T[((A = (j + 8) | 0) + 4) >> 2] = V),
                    (T[A >> 2] = C || 5488),
                    !V | C || (At(1064, 1402, 401, 1617), Ye()),
                    Ut[(A + 4) >> 2] < 18
                      ? ((yr[(ge + 18) >> 1] = 7173), u_(ge, T[(A + 4) >> 2]))
                      : ((yr[(ge + 18) >> 1] = 3077),
                        (T[ge >> 2] = T[(A + 4) >> 2]),
                        Bc((C = ge), (ge = ud(ae, (T[(A + 4) >> 2] + 1) | 0)))),
                    (Ht[
                      (Ro(ge, T[A >> 2], T[(A + 4) >> 2]) + T[(A + 4) >> 2]) | 0
                    ] = 0),
                    (ut = (j + 16) | 0),
                    1
                  );
                }
                function Ks(A, C) {
                  var V,
                    j = 0,
                    ae = 0;
                  (V = T[A >> 2]),
                    ((T[((j = V) + 16) >> 2] - T[(j + 12) >> 2]) | 0) <= 0 &&
                      (T[(j + 8) >> 2]
                        ? (ae = (((((ae = Wv(j)) + 1) >>> 1) | 0) + ae) | 0)
                        : (T[j >> 2] ||
                            ((ae = Fc(1)),
                            (T[(j + 4) >> 2] = ae),
                            (T[j >> 2] = ae)),
                          (ae = T[(j + 20) >> 2])),
                      Wr(j, (j = (Ll(j) + 1) | 0) >>> 0 > ae >>> 0 ? j : ae));
                  e: {
                    t: {
                      if ((j = T[(V + 12) >> 2])) {
                        if (((T[(V + 16) >> 2] - j) | 0) <= 0) break t;
                        T[(V + 12) >> 2] = j + 1;
                        break e;
                      }
                      At(1903, 1485, 130, 1848), Ye();
                    }
                    At(2093, 1485, 131, 1848), Ye();
                  }
                  (Ht[0 | j] = C), (T[(A + 4) >> 2] = T[(A + 4) >> 2] + 1);
                }
                function ud(A, C) {
                  var V = 0,
                    j = 0,
                    ae = 0,
                    ge = 0;
                  e: if (C) {
                    if (
                      ((ae = (C + 7) & -8),
                      !(
                        (C = T[A >> 2]) &&
                        (j = (ae + (V = T[(C + 4) >> 2])) | 0) >>> 0 <=
                          Ut[C >> 2]
                      ))
                    ) {
                      if (
                        ((j = (C = T[(A + 4) >> 2]) >>> 0 > ae >>> 0 ? C : ae),
                        T[((V = A) + 12) >> 2] ||
                          ((C = Fc(1)),
                          (T[(V + 16) >> 2] = C),
                          (T[(V + 12) >> 2] = C)),
                        (C = (C = (j + 16) | 0) ? ir(C) : 0) &&
                          ((T[(C + 4) >> 2] = 0),
                          (T[C >> 2] = j),
                          (T[(C + 8) >> 2] = T[V >> 2]),
                          (T[V >> 2] = C)),
                        !C)
                      )
                        break e;
                      (C = T[A >> 2]), (j = (ae + (V = T[(C + 4) >> 2])) | 0);
                    }
                    (T[(C + 4) >> 2] = j), (ge = (16 + ((C + V) | 0)) | 0);
                  }
                  return ge;
                }
                function ec(A, C, V, j, ae, ge, Ee) {
                  var Le,
                    et = 0,
                    yt = 0;
                  if (
                    ((ut = Le = (ut - 16) | 0),
                    ((-1 ^ C) - 17) >>> 0 >= V >>> 0)
                  )
                    return (
                      (et = dd(A)),
                      C >>> 0 < 2147483623
                        ? ((T[(Le + 8) >> 2] = C << 1),
                          (T[(Le + 12) >> 2] = C + V),
                          (V = Hv(T[Yb((Le + 12) | 0, (Le + 8) | 0) >> 2])))
                        : (V = -18),
                      (V = Fc((yt = (V + 1) | 0))),
                      ge && Bm(V, Ee, ge),
                      (j = (j - ae) | 0) && Bm((V + ge) | 0, (ae + et) | 0, j),
                      (0 | C) != 10 && Ni(et),
                      g_(A, V),
                      n_(A, yt),
                      h_((C = A), (A = (j + ge) | 0)),
                      (Ht[(Le + 7) | 0] = 0),
                      iy((A + V) | 0, (Le + 7) | 0),
                      void (ut = (Le + 16) | 0)
                    );
                  jm(), Ye();
                }
                function Yl(A) {
                  var C = 0,
                    V = 0;
                  ((T[((C = A) + 16) >> 2] - T[(C + 12) >> 2]) | 0) < 24 &&
                    (T[(C + 8) >> 2]
                      ? (V = (((((V = Wv(C)) + 1) >>> 1) | 0) + V) | 0)
                      : (T[C >> 2] ||
                          ((V = Fc(1)), (T[(C + 4) >> 2] = V), (T[C >> 2] = V)),
                        (V = T[(C + 20) >> 2])),
                    Wr(C, (C = (Ll(C) + 24) | 0) >>> 0 > V >>> 0 ? C : V));
                  e: {
                    t: {
                      if ((C = T[(A + 12) >> 2])) {
                        if (((T[(A + 16) >> 2] - C) | 0) < 24) break t;
                        T[(A + 12) >> 2] = C + 24;
                        break e;
                      }
                      At(1903, 1485, 130, 1848), Ye();
                    }
                    At(2093, 1485, 131, 1848), Ye();
                  }
                  return C;
                }
                function ol(A, C, V, j) {
                  Ht[(A + 53) | 0] = 1;
                  e: if (T[(A + 4) >> 2] == (0 | V)) {
                    Ht[(A + 52) | 0] = 1;
                    t: {
                      if (!(V = T[(A + 16) >> 2])) {
                        if (
                          ((T[(A + 36) >> 2] = 1),
                          (T[(A + 24) >> 2] = j),
                          (T[(A + 16) >> 2] = C),
                          T[(A + 48) >> 2] != 1)
                        )
                          break e;
                        if ((0 | j) == 1) break t;
                        break e;
                      }
                      if ((0 | C) == (0 | V)) {
                        if (
                          ((0 | (V = T[(A + 24) >> 2])) == 2 &&
                            ((T[(A + 24) >> 2] = j), (V = j)),
                          T[(A + 48) >> 2] != 1)
                        )
                          break e;
                        if ((0 | V) == 1) break t;
                        break e;
                      }
                      T[(A + 36) >> 2] = T[(A + 36) >> 2] + 1;
                    }
                    Ht[(A + 54) | 0] = 1;
                  }
                }
                function jh(A, C) {
                  var V, j, ae;
                  return (
                    (ut = ae =
                      ((ut = j = ((ut = V = (ut - 16) | 0) - 16) | 0) - 32) |
                      0),
                    gg(ae, C),
                    Ns(j, A, Ov((ae + 8) | 0, ae)),
                    (ut = (ae + 32) | 0),
                    (T[(C = (j + 8) | 0) >> 2] = T[j >> 2]),
                    (ut = (j + 16) | 0),
                    (T[(V + 8) >> 2] = T[C >> 2]),
                    (ut = C = (ut - 16) | 0),
                    mh(A) || (At(2231, 1402, 1243, 1866), Ye()),
                    (A =
                      T[
                        Uu(
                          (C + 8) | 0,
                          (T[(A + 8) >> 2] + vn(T[A >> 2], 48)) | 0
                        ) >> 2
                      ]),
                    (ut = (C + 16) | 0),
                    (T[V >> 2] = A),
                    (A = Jl((V + 8) | 0, V)),
                    (ut = (V + 16) | 0),
                    A
                  );
                }
                function Nu(A, C, V) {
                  for (var j = 0, ae = 0, ge = 0; ; ) {
                    e: {
                      j = ((ae = vu(C)) + (j << 4)) | 0;
                      t: if (((ae - 48) & 255) >>> 0 <= 9) j = (j - 48) | 0;
                      else if (((ae - 65) & 255) >>> 0 <= 5) j = (j - 55) | 0;
                      else if (((ae - 97) & 255) >>> 0 <= 5) j = (j - 87) | 0;
                      else {
                        if (!Bi(A)) {
                          if ((ia(A, 8, V), !Bi(A))) break t;
                          j = 0;
                          break e;
                        }
                        At(2242, 1459, 919, 1973), Ye();
                      }
                      if ((Zs(C), (0 | (ge = (ge + 1) | 0)) != 4)) continue;
                    }
                    break;
                  }
                  return j;
                }
                function JR(A, C, V) {
                  var j = 0,
                    ae = 0,
                    ge = 0;
                  (j = Yv(A)), (ae = tu(A));
                  e: {
                    if (j) {
                      t: {
                        for (;;) {
                          n: {
                            if (Ka(V, (ge = (j + 16) | 0))) {
                              if (!T[j >> 2]) break e;
                              ae = j;
                            } else {
                              if (!Ka(ge, V)) break t;
                              if (((ae = (j + 4) | 0), !T[(j + 4) >> 2]))
                                break n;
                              ae = j = ae;
                            }
                            j = T[j >> 2];
                            continue;
                          }
                          break;
                        }
                        return (T[C >> 2] = j), ae;
                      }
                      return (T[C >> 2] = j), ae;
                    }
                    j = tu(A);
                  }
                  return (T[C >> 2] = j), j;
                }
                function K0(A) {
                  var C = 0,
                    V = 0,
                    j = 0;
                  e: {
                    if (3 & (C = A))
                      for (;;) {
                        if (!Jn[0 | C]) break e;
                        if (!(3 & (C = (C + 1) | 0))) break;
                      }
                    for (
                      ;
                      (V = C),
                        (C = (C + 4) | 0),
                        !(
                          (-1 ^ (j = T[V >> 2])) &
                          (j - 16843009) &
                          -2139062144
                        );

                    );
                    if (!(255 & j)) return (V - A) | 0;
                    for (; (j = Jn[(V + 1) | 0]), (V = C = (V + 1) | 0), j; );
                  }
                  return (C - A) | 0;
                }
                function $d(A, C, V) {
                  var j = 0;
                  if (!V) return T[(A + 4) >> 2] == T[(C + 4) >> 2];
                  if ((0 | A) == (0 | C)) return 1;
                  (V = T[(A + 4) >> 2]), (A = Jn[0 | V]), (C = T[(C + 4) >> 2]);
                  e: if (!(!A | ((0 | (j = Jn[0 | C])) != (0 | A))))
                    for (;;) {
                      if (((j = Jn[(C + 1) | 0]), !(A = Jn[(V + 1) | 0])))
                        break e;
                      if (
                        ((C = (C + 1) | 0),
                        (V = (V + 1) | 0),
                        (0 | A) != (0 | j))
                      )
                        break;
                    }
                  return (0 | A) == (0 | j);
                }
                function Z0(A, C) {
                  var V,
                    j,
                    ae = 0,
                    ge = 0;
                  (j = C),
                    (C = K0(C)),
                    (ut = V = (ut - 16) | 0),
                    (ae = A),
                    (ae = Um(A) ? (Rl(ae) - 1) | 0 : 10) >>> 0 >= C >>> 0
                      ? ((ge = dd(A)),
                        (ae = C),
                        C && Gu(ge, j, ae),
                        (Ht[(V + 15) | 0] = 0),
                        iy((C + ge) | 0, (V + 15) | 0),
                        Um(A) ? h_(A, C) : Jh(A, C))
                      : ec((ge = A), ae, (C - ae) | 0, (A = gh(A)), A, C, j),
                    (ut = (V + 16) | 0);
                }
                function Lv(A, C) {
                  var V,
                    j,
                    ae = 0;
                  if (
                    ((ut = V = (ut - 16) | 0),
                    (T[(V + 12) >> 2] = C),
                    (ut = j = (ut - 16) | 0),
                    (T[(j + 12) >> 2] = 536870911),
                    (T[(j + 8) >> 2] = 2147483647),
                    (ae = T[a2((j + 12) | 0, (j + 8) | 0) >> 2]),
                    (ut = (j + 16) | 0),
                    C >>> 0 <= ae >>> 0)
                  )
                    return (
                      (A = Zi(A)) >>> 0 < (ae >>> 1) >>> 0 &&
                        ((T[(V + 8) >> 2] = A << 1),
                        (ae = T[Yb((V + 8) | 0, (V + 12) | 0) >> 2])),
                      (ut = (V + 16) | 0),
                      ae
                    );
                  eo(), Ye();
                }
                function Ob(A) {
                  var C,
                    V = 0;
                  return Ut[(A + 20) >> 2] <= Ut[(A + 28) >> 2] ||
                    (Ao[T[(A + 36) >> 2]](A, 0, 0), T[(A + 20) >> 2])
                    ? ((V = T[(A + 4) >> 2]) >>> 0 <
                        (C = T[(A + 8) >> 2]) >>> 0 &&
                        ((V = (V - C) | 0),
                        Ao[T[(A + 40) >> 2]](A, V, V >> 31, 1)),
                      (T[(A + 28) >> 2] = 0),
                      (T[(A + 16) >> 2] = 0),
                      (T[(A + 20) >> 2] = 0),
                      (T[(A + 4) >> 2] = 0),
                      (T[(A + 8) >> 2] = 0),
                      0)
                    : -1;
                }
                function Jf(A, C, V) {
                  var j = 0,
                    ae = 0,
                    ge = 0;
                  if (C)
                    for (
                      ;
                      (j = Xo(A, C, 10)),
                        (ge = ae = cn),
                        (ae = cd(j, ae, 10, 0)),
                        (Ht[0 | (V = (V - 1) | 0)] = (A - ae) | 48),
                        (ae = C >>> 0 > 9),
                        (A = j),
                        (C = ge),
                        ae;

                    );
                  else j = A;
                  if (j)
                    for (
                      ;
                      (A = ((j >>> 0) / 10) | 0),
                        (Ht[0 | (V = (V - 1) | 0)] = (j - vn(A, 10)) | 48),
                        (C = j >>> 0 > 9),
                        (j = A),
                        C;

                    );
                  return V;
                }
                function Gb(A, C) {
                  var V = 0,
                    j = 0,
                    ae = 0,
                    ge = 0;
                  return (
                    (j = V = (A + 32) | 0),
                    (ae = vn(C, 48)),
                    Ll(V) >>> 0 < ae >>> 0 && (At(2190, 1485, 139, 1176), Ye()),
                    (ge = j),
                    (j = (T[(j + 12) >> 2] - ae) | 0),
                    (T[(ge + 12) >> 2] = j),
                    (V = qR(V)),
                    (A = Jb(A)),
                    (yr[(V + 18) >> 1] = 3),
                    C
                      ? (Bc(V, (ae = ud((ge = A), (A = vn(C, 48))))),
                        Ro(ae, j, A))
                      : Bc(V, 0),
                    (T[V >> 2] = C),
                    (T[(V + 4) >> 2] = C),
                    1
                  );
                }
                function Y0(A) {
                  var C,
                    V,
                    j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0,
                    et = 0,
                    yt = 0;
                  if (!((0 | (V = Lo((C = (A + 652) | 0)))) <= 1)) {
                    for (
                      A = j = (V - 1) | 0;
                      (ae = (A - 1) | 0),
                        (ge = +(0 | A)),
                        (Ee += (Kt[Zh(C, A) >> 3] - Kt[Zh(C, ae) >> 3]) * ge),
                        (Le += ge),
                        (et = A >>> 0 > 1),
                        (A = ae),
                        et;

                    );
                    (0 | V) <= 1 || (yt = Ee / (Le * +(0 | j)));
                  }
                  return yt;
                }
                function QE(A, C) {
                  var V,
                    j,
                    ae = 0;
                  if (
                    (ar(+A),
                    (ae = 0 | Yt(1)),
                    (V = 0 | Yt(0)),
                    (j = ae),
                    (0 | (ae = (ae >>> 20) & 2047)) != 2047)
                  ) {
                    if (!ae)
                      return (
                        (ae = C),
                        A == 0
                          ? (C = 0)
                          : ((A = QE(18446744073709552e3 * A, C)),
                            (C = (T[C >> 2] + -64) | 0)),
                        (T[ae >> 2] = C),
                        A
                      );
                    (T[C >> 2] = ae - 1022),
                      Qt(0, 0 | V),
                      Qt(1, (-2146435073 & j) | 1071644672),
                      (A = +Sn());
                  }
                  return A;
                }
                function Ov(A, C) {
                  var V, j;
                  return (
                    (ut = j = (ut - 16) | 0),
                    (T[A >> 2] = 0),
                    (T[(A + 4) >> 2] = 0),
                    (T[(A + 16) >> 2] = 0),
                    (T[(A + 20) >> 2] = 0),
                    (T[(A + 8) >> 2] = 0),
                    (T[(A + 12) >> 2] = 0),
                    (T[(V = (j + 8) | 0) >> 2] = T[C >> 2]),
                    (T[(V + 4) >> 2] = T[(C + 4) >> 2]),
                    (yr[(A + 18) >> 1] = 1029),
                    Bc(A, T[V >> 2]),
                    (T[A >> 2] = T[(V + 4) >> 2]),
                    (ut = (j + 16) | 0),
                    A
                  );
                }
                function Vo(A, C) {
                  var V = 0,
                    j = 0,
                    ae = 0,
                    ge = 0,
                    Ee = 0,
                    Le = 0;
                  if (((ae = -1), T[(A + 552) >> 2] > 0))
                    for (
                      ge = (A + 584) | 0, Ee = 2147483647;
                      (V = (Le = (C - T[As(ge, j) >> 2]) | 0) >> 31),
                        (0 | (V ^= V + Le)) < (0 | Ee) &&
                          ((ae = T[As(ge, j) >> 2]), (Ee = V)),
                        (0 | (j = (j + 1) | 0)) < T[(A + 552) >> 2];

                    );
                  return ae;
                }
                function cd(A, C, V, j) {
                  var ae,
                    ge,
                    Ee,
                    Le,
                    et = 0,
                    yt = 0;
                  return (
                    (Le = vn((et = (V >>> 16) | 0), (yt = (A >>> 16) | 0))),
                    (et =
                      ((65535 &
                        (yt =
                          ((((Ee = vn((ae = 65535 & V), (ge = 65535 & A))) >>>
                            16) |
                            0) +
                            vn(yt, ae)) |
                          0)) +
                        vn(et, ge)) |
                      0),
                    (cn =
                      (((vn(C, V) + Le) | 0) +
                        vn(A, j) +
                        (yt >>> 16) +
                        (et >>> 16)) |
                      0),
                    (65535 & Ee) | (et << 16)
                  );
                }
                function Ql(A, C, V, j) {
                  var ae,
                    ge = 0;
                  return (
                    (ut = ae = (ut - 16) | 0),
                    (T[(ae + 12) >> 2] = 0),
                    u2((A + 12) | 0, j),
                    C &&
                      ((j = C),
                      C >>> 0 > 536870911 && (Q0(1655), Ye()),
                      (ge = Fc(j << 3))),
                    (T[A >> 2] = ge),
                    (V = ((V << 3) + ge) | 0),
                    (T[(A + 8) >> 2] = V),
                    (T[(A + 4) >> 2] = V),
                    (T[eu(A) >> 2] = (C << 3) + ge),
                    (ut = (ae + 16) | 0),
                    A
                  );
                }
                function qf(A, C, V) {
                  var j,
                    ae = 0;
                  (ae = Ka(C, A)), (j = Ka(V, C));
                  e: {
                    if (ae) {
                      if (j) return gs(A, V), 1;
                      if ((gs(A, C), (ae = 1), !Ka(V, C))) break e;
                      gs(C, V);
                    } else {
                      if (((ae = 0), !j || (gs(C, V), (ae = 1), !Ka(C, A))))
                        break e;
                      gs(A, C);
                    }
                    ae = 2;
                  }
                  return ae;
                }
                function Nb(A, C, V) {
                  var j;
                  if (!(j = T[(A + 16) >> 2]))
                    return (
                      (T[(A + 36) >> 2] = 1),
                      (T[(A + 24) >> 2] = V),
                      void (T[(A + 16) >> 2] = C)
                    );
                  e: {
                    if ((0 | C) == (0 | j)) {
                      if (T[(A + 24) >> 2] != 2) break e;
                      return void (T[(A + 24) >> 2] = V);
                    }
                    (Ht[(A + 54) | 0] = 1),
                      (T[(A + 24) >> 2] = 2),
                      (T[(A + 36) >> 2] = T[(A + 36) >> 2] + 1);
                  }
                }
                function xm(A, C) {
                  var V, j, ae;
                  return (
                    (ut = V = (ut - 32) | 0),
                    gg(V, C),
                    (ae = Ov((V + 8) | 0, V)),
                    (ut = C = (ut - 16) | 0),
                    Ns((j = (C + 8) | 0), A, ae),
                    ph(C, A),
                    Jl(j, C)
                      ? ((ut = (C + 16) | 0), (A = (T[(C + 8) >> 2] + 24) | 0))
                      : (At(1780, 1402, 1218, 1913), Ye()),
                    (ut = (V + 32) | 0),
                    A
                  );
                }
                function Cl(A) {
                  var C,
                    V,
                    j = 0,
                    ae = 0;
                  if (
                    ((ut = C = (ut - 16) | 0),
                    zm((j = (C + 8) | 0), (V = (A + 652) | 0)),
                    lp(C, V),
                    (A = 0),
                    fh(j, C))
                  )
                    for (
                      ;
                      (ae = Kt[jb((j = (C + 8) | 0)) >> 3]),
                        v_(j),
                        lp(C, V),
                        (A = ((ae < 0.1) + A) | 0),
                        fh(j, C);

                    );
                  return (ut = (C + 16) | 0), A;
                }
                function gu(A, C, V, j, ae) {
                  var ge;
                  if (
                    ((ut = ge = (ut - 256) | 0),
                    !((73728 & ae) | ((0 | V) <= (0 | j))))
                  ) {
                    if (
                      (zh(
                        ge,
                        255 & C,
                        (j = (V = (V - j) | 0) >>> 0 < 256) ? V : 256
                      ),
                      !j)
                    )
                      for (; rs(A, ge, 256), (V = (V - 256) | 0) >>> 0 > 255; );
                    rs(A, ge, V);
                  }
                  ut = (ge + 256) | 0;
                }
                function Gv(A, C) {
                  var V;
                  if (
                    ((T[(V = A) >> 2] = 0),
                    (T[(V + 4) >> 2] = 0),
                    (T[(V + 16) >> 2] = 0),
                    (T[(V + 20) >> 2] = 0),
                    (T[(V + 8) >> 2] = 0),
                    (T[(V + 12) >> 2] = 0),
                    C >>> 0 < 7)
                  )
                    return (
                      (yr[(A + 18) >> 1] = pr[(5490 + (C << 1)) >> 1]),
                      void ((0 | C) == 5 && u_(A, 0))
                    );
                  At(1797, 1402, 714, 1738), Ye();
                }
                function hh() {
                  var A,
                    C,
                    V = 0,
                    j = 0;
                  return (
                    (ut = V = (ut - 16) | 0),
                    Ct((V + 8) | 0, 0),
                    (j = T[(V + 12) >> 2]),
                    (ut = (V + 16) | 0),
                    (V = cd((V = T[(V + 8) >> 2]), V >> 31, 1e3, 0)),
                    (C = cn),
                    (j = (V + (A = Xo(j, j >> 31, 1e3))) | 0),
                    (V = (cn + C) | 0),
                    (cn = V = j >>> 0 < A >>> 0 ? (V + 1) | 0 : V),
                    j
                  );
                }
                function Nv(A, C, V, j, ae) {
                  var ge = 0;
                  if (((ge = dg(A, C, V, j)), Ka(ae, j))) {
                    if ((gs(j, ae), !Ka(j, V))) return (ge + 1) | 0;
                    if ((gs(V, j), !Ka(V, C))) return (ge + 2) | 0;
                    if ((gs(C, V), !Ka(C, A))) return (ge + 3) | 0;
                    gs(A, C), (ge = (ge + 4) | 0);
                  }
                  return ge;
                }
                function Fb(A, C) {
                  var V;
                  if (
                    ((ut = V = (ut - 16) | 0),
                    (T[(V + 12) >> 2] = C),
                    C >>> 0 <= (C = Vb(A)) >>> 0)
                  )
                    return (
                      (A = hd(A)) >>> 0 < (C >>> 1) >>> 0 &&
                        ((T[(V + 8) >> 2] = A << 1),
                        (C = T[Yb((V + 8) | 0, (V + 12) | 0) >> 2])),
                      (ut = (V + 16) | 0),
                      C
                    );
                  eo(), Ye();
                }
                function Q0(A) {
                  var C, V, j;
                  (C = 0 | Pn(8)),
                    (T[C >> 2] = 8476),
                    (T[C >> 2] = 8520),
                    (j = Fc(((V = K0(A)) + 13) | 0)),
                    (T[(j + 8) >> 2] = 0),
                    (T[(j + 4) >> 2] = V),
                    (T[j >> 2] = V),
                    (T[(C + 4) >> 2] = Ro((j + 12) | 0, A, (V + 1) | 0)),
                    (T[C >> 2] = 8568),
                    Xn(0 | C, 8600, 2),
                    Ye();
                }
                function JE(A, C) {
                  var V,
                    j = 0,
                    ae = 0;
                  return (
                    (V = zb((j = (A + 32) | 0), C)),
                    (j = qR(j)),
                    (A = Jb(A)),
                    (yr[(j + 18) >> 1] = 4),
                    C
                      ? (Bc(j, (ae = ud((ae = A), (A = vn(C, 24))))),
                        Ro(ae, V, A))
                      : Bc(j, 0),
                    (T[j >> 2] = C),
                    (T[(j + 4) >> 2] = C),
                    1
                  );
                }
                function ep(A) {
                  var C, V;
                  return ((A = ((C = T[2253]) + (V = (A + 3) & -4)) | 0) >>>
                    0 <=
                    C >>> 0 &&
                    V) ||
                    (A >>> 0 > (((Gn.byteLength / 65536) | 0) << 16) >>> 0 &&
                      !(0 | Ot(0 | A)))
                    ? ((T[2441] = 48), -1)
                    : ((T[2253] = A), C);
                }
                function Lm(A) {
                  var C,
                    V = 0;
                  (C = T[A >> 2]),
                    (V = T[(C + 4) >> 2]),
                    (T[A >> 2] = V),
                    V && Bc(V, A),
                    (T[(C + 8) >> 2] = T[(A + 8) >> 2]),
                    (V = Ja(A) ? T[(A + 8) >> 2] : (T[(A + 8) >> 2] + 4) | 0),
                    (T[V >> 2] = C),
                    (T[(C + 4) >> 2] = A),
                    Bc(A, C);
                }
                function Ub(A) {
                  var C,
                    V = 0;
                  (C = T[(A + 4) >> 2]),
                    (V = T[C >> 2]),
                    (T[(A + 4) >> 2] = V),
                    V && Bc(V, A),
                    (T[(C + 8) >> 2] = T[(A + 8) >> 2]),
                    (V = Ja(A) ? T[(A + 8) >> 2] : (T[(A + 8) >> 2] + 4) | 0),
                    (T[V >> 2] = C),
                    (T[C >> 2] = A),
                    Bc(A, C);
                }
                function tp(A, C) {
                  var V, j;
                  (ut = V = (ut - 16) | 0),
                    (T[(V + 8) >> 2] = C),
                    (T[V >> 2] = Vr(A)),
                    (j = t_(
                      ((C =
                        (T[A >> 2] +
                          (((T[(V + 8) >> 2] - T[V >> 2]) >> 3) << 3)) |
                        0) +
                        8) |
                        0,
                      T[(A + 4) >> 2],
                      C
                    )),
                    Lo(A),
                    fg(A, j),
                    p_(A),
                    zv(C),
                    (ut = (V + 16) | 0);
                }
                function Bb(A) {
                  var C,
                    V = 0;
                  if (((V = A), (0 | (C = T[(A + 4) >> 2])) != T[(A + 8) >> 2]))
                    for (
                      ;
                      (T[(V + 8) >> 2] = T[(V + 8) >> 2] - 8),
                        T[(V + 8) >> 2] != (0 | C);

                    );
                  T[A >> 2] && Ni((V = T[A >> 2]));
                }
                function Hb(A, C) {
                  var V,
                    j,
                    ae = 0;
                  (ut = V = (ut - 32) | 0),
                    (j = ae = ws(A)),
                    (ae = Ql((V + 8) | 0, Lv(A, (Lo(A) + 1) | 0), Lo(A), ae)),
                    s2(j, T[(ae + 8) >> 2], C),
                    (T[(ae + 8) >> 2] = T[(ae + 8) >> 2] + 8),
                    Nc(A, ae),
                    Bb(ae),
                    (ut = (V + 32) | 0);
                }
                function cg(A, C) {
                  var V,
                    j,
                    ae = 0;
                  (ut = V = (ut - 32) | 0),
                    (j = ae = ws(A)),
                    (ae = Ql((V + 8) | 0, Lv(A, (Lo(A) + 1) | 0), Lo(A), ae)),
                    a_(j, T[(ae + 8) >> 2], C),
                    (T[(ae + 8) >> 2] = T[(ae + 8) >> 2] + 8),
                    Nc(A, ae),
                    Bb(ae),
                    (ut = (V + 32) | 0);
                }
                function J0(A) {
                  var C = 0,
                    V = 0,
                    j = 0;
                  if (Qh(Ht[T[A >> 2]]))
                    for (
                      ;
                      (C = T[A >> 2]),
                        (j = Ht[0 | C]),
                        (T[A >> 2] = C + 1),
                        (V = (((vn(V, 10) + j) | 0) - 48) | 0),
                        Qh(Ht[(C + 1) | 0]);

                    );
                  return V;
                }
                function xd(A) {
                  var C,
                    V = 0;
                  for (
                    ut = C = (ut - 16) | 0, A = Bv(C, A);
                    !(
                      ((V = ((255 & vu(A)) - 9) | 0) >>> 0 > 23) |
                      !((1 << V) & 8388627)
                    );

                  )
                    Zs(A);
                  ey(A), (ut = (C + 16) | 0);
                }
                function dg(A, C, V, j) {
                  var ae = 0;
                  if (((ae = qf(A, C, V)), Ka(j, V))) {
                    if ((gs(V, j), !Ka(V, C))) return (ae + 1) | 0;
                    if ((gs(C, V), !Ka(C, A))) return (ae + 2) | 0;
                    gs(A, C), (ae = (ae + 3) | 0);
                  }
                  return ae;
                }
                function Nc(A, C) {
                  var V;
                  s_(A),
                    (V = (C + 4) | 0),
                    tA(ws(A), T[A >> 2], T[(A + 4) >> 2], V),
                    gs(A, V),
                    gs((A + 4) | 0, (C + 8) | 0),
                    gs(ws(A), eu(C)),
                    (T[C >> 2] = T[(C + 4) >> 2]),
                    Lo(A),
                    Zi(A),
                    Zi(A);
                }
                function hg(A, C, V, j) {
                  var ae;
                  (ut = ae = (ut - 16) | 0),
                    (j = Vv(ae, A, j)),
                    (0 | (A = (V - C) | 0)) > 0 &&
                      (Ro(T[(j + 4) >> 2], C, A),
                      (T[(j + 4) >> 2] = A + T[(j + 4) >> 2])),
                    Hr(j),
                    (ut = (ae + 16) | 0);
                }
                function Xb(A, C) {
                  e: {
                    if (sp(A)) {
                      if (Ut[A >> 2] <= C >>> 0) break e;
                      return (T[(A + 8) >> 2] + vn(C, 24)) | 0;
                    }
                    At(2221, 1402, 1668, 1913), Ye();
                  }
                  At(1634, 1402, 1669, 1913), Ye();
                }
                function qE(A) {
                  var C, V;
                  (ut = C = ((ut = V = (ut - 16) | 0) - 16) | 0),
                    (T[(A + 4) >> 2] = 0),
                    (T[(C + 12) >> 2] = 0),
                    o_((A + 8) | 0, (C + 12) | 0),
                    (T[A >> 2] = tu(A)),
                    (ut = (C + 16) | 0),
                    (ut = (V + 16) | 0);
                }
                function Vb(A) {
                  var C;
                  return (
                    (ut = C = (ut - 16) | 0),
                    (T[(C + 12) >> 2] = 1073741823),
                    (T[(C + 8) >> 2] = 2147483647),
                    (A = T[a2((C + 12) | 0, (C + 8) | 0) >> 2]),
                    (ut = (C + 16) | 0),
                    A
                  );
                }
                function e2(A, C) {
                  return (
                    (A = Yl((A + 32) | 0)),
                    (T[(A + 16) >> 2] = 0),
                    (T[(A + 20) >> 2] = 0),
                    (T[A >> 2] = 0),
                    (T[(A + 4) >> 2] = 0),
                    (T[(A + 8) >> 2] = 0),
                    (T[(A + 12) >> 2] = 0),
                    (yr[(A + 18) >> 1] = C ? 10 : 9),
                    1
                  );
                }
                function q0(A) {
                  var C, V;
                  return (
                    (ut = V = ((ut = C = (ut - 16) | 0) - 16) | 0),
                    (A = T[Uu((V + 8) | 0, tu(A)) >> 2]),
                    (ut = (V + 16) | 0),
                    (A = T[Uu((C + 8) | 0, A) >> 2]),
                    (ut = (C + 16) | 0),
                    A
                  );
                }
                function Wh(A, C, V) {
                  var j;
                  return (
                    (ut = j = (ut - 16) | 0),
                    (T[(j + 12) >> 2] = C),
                    o_(A, (j + 12) | 0),
                    (C = T[(V + 4) >> 2]),
                    (T[(A + 4) >> 2] = T[V >> 2]),
                    (T[(A + 8) >> 2] = C),
                    (ut = (j + 16) | 0),
                    A
                  );
                }
                function t2(A, C) {
                  var V;
                  (ut = V = (ut - 16) | 0),
                    (T[V >> 2] = C),
                    (T[(V + 8) >> 2] = A),
                    (ut = A = (ut - 16) | 0),
                    si(T[(V + 8) >> 2], T[V >> 2], (A + 8) | 0),
                    (ut = (A + 16) | 0),
                    (ut = (V + 16) | 0);
                }
                function Fc(A) {
                  var C = 0;
                  A = A || 1;
                  e: {
                    for (;;) {
                      if ((C = ir(A))) break e;
                      if (!(C = T[2777])) break;
                      Ao[0 | C]();
                    }
                    Vn(), Ye();
                  }
                  return C;
                }
                function zb(A, C) {
                  var V;
                  return (
                    (C = vn(C, 24)),
                    Ll(A) >>> 0 < C >>> 0 && (At(2190, 1485, 139, 1176), Ye()),
                    (V = A),
                    (A = (T[(A + 12) >> 2] - C) | 0),
                    (T[(V + 12) >> 2] = A),
                    A
                  );
                }
                function fg(A, C) {
                  T[(A + 4) >> 2], (T[(A + 4) >> 2] = C);
                }
                function n2(A, C) {
                  T[(A + 4) >> 2], (T[(A + 4) >> 2] = C);
                }
                function Fv(A) {
                  var C, V;
                  return (
                    (T[(A |= 0) >> 2] = 8520),
                    (C = (T[(A + 4) >> 2] - 12) | 0),
                    (V = (T[(C + 8) >> 2] - 1) | 0),
                    (T[(C + 8) >> 2] = V),
                    (0 | V) < 0 && Ni(C),
                    0 | A
                  );
                }
                function r2(A, C) {
                  var V;
                  Vb(A) >>> 0 < C >>> 0 && (eo(), Ye()),
                    (V = Qa(ws(A), C)),
                    (T[A >> 2] = V),
                    (T[(A + 4) >> 2] = V),
                    (T[ws(A) >> 2] = (C << 2) + V),
                    Qv(A);
                }
                function Kh(A, C) {
                  var V, j;
                  (ut = j = (ut - 16) | 0),
                    (V = o2(j, A)),
                    s2(ws(A), T[(V + 4) >> 2], C),
                    (T[(V + 4) >> 2] = T[(V + 4) >> 2] + 8),
                    Hr(V),
                    (ut = (j + 16) | 0);
                }
                function i2(A, C) {
                  var V, j;
                  (ut = j = (ut - 16) | 0),
                    (V = o2(j, A)),
                    a_(ws(A), T[(V + 4) >> 2], C),
                    (T[(V + 4) >> 2] = T[(V + 4) >> 2] + 8),
                    Hr(V),
                    (ut = (j + 16) | 0);
                }
                function fh(A, C) {
                  var V;
                  return (
                    (ut = V = (ut - 16) | 0),
                    (T[(V + 8) >> 2] = T[(A + 4) >> 2]),
                    (T[V >> 2] = T[(C + 4) >> 2]),
                    (A = Jl((V + 8) | 0, V)),
                    (ut = (V + 16) | 0),
                    A
                  );
                }
                function Uv(A) {
                  if (Kv(A))
                    return 16 & Jn[(A + 19) | 0]
                      ? (17 - Ht[(A + 17) | 0]) | 0
                      : T[A >> 2];
                  At(2290, 1402, 1857, 1376), Ye();
                }
                function gs(A, C) {
                  var V;
                  (ut = V = (ut - 16) | 0),
                    (T[(V + 12) >> 2] = T[A >> 2]),
                    (T[A >> 2] = T[C >> 2]),
                    (T[C >> 2] = T[(V + 12) >> 2]),
                    (ut = (V + 16) | 0);
                }
                function Ia(A) {
                  var C;
                  return (
                    (ut = C = (ut - 16) | 0),
                    (T[A >> 2] = 0),
                    (T[(A + 4) >> 2] = 0),
                    (T[(C + 12) >> 2] = 0),
                    __((A + 8) | 0),
                    (ut = (C + 16) | 0),
                    A
                  );
                }
                function jb(A) {
                  var C;
                  return (
                    (ut = C = (ut - 16) | 0),
                    (T[(C + 8) >> 2] = T[(A + 4) >> 2]),
                    (A = T[ny((C + 8) | 0) >> 2]),
                    (ut = (C + 16) | 0),
                    A
                  );
                }
                function Bv(A, C) {
                  var V, j;
                  return (
                    (V = T[(C + 4) >> 2]),
                    (j = T[C >> 2]),
                    (T[(A + 8) >> 2] = C),
                    (T[A >> 2] = j),
                    (T[(A + 4) >> 2] = V),
                    A
                  );
                }
                function Wb(A, C) {
                  if ((0 | C) >= -308) {
                    if ((0 | C) >= 0) return eA(C) * A;
                    A /= eA((0 - C) | 0);
                  } else A = 0;
                  return A;
                }
                function wi(A) {
                  if (Kv(A))
                    return 16 & Jn[(A + 19) | 0] || (A = T[(A + 8) >> 2]), A;
                  At(2290, 1402, 1852, 1566), Ye();
                }
                function zo(A, C, V) {
                  (T[(A + 4) >> 2] = 0),
                    (T[(A + 8) >> 2] = 0),
                    (T[A >> 2] = C),
                    (T[(A + 20) >> 2] = V),
                    (T[(A + 12) >> 2] = 0),
                    (T[(A + 16) >> 2] = 0);
                }
                function Hv(A) {
                  var C = 0;
                  return (A =
                    A >>> 0 >= 11
                      ? (0 | (A = ((C = (A + 16) & -16) - 1) | 0)) == 11
                        ? C
                        : A
                      : 10);
                }
                function Kb(A) {
                  (T[A >> 2] = 0),
                    (T[(A + 4) >> 2] = 0),
                    (T[(A + 16) >> 2] = 0),
                    (T[(A + 20) >> 2] = 0),
                    (T[(A + 8) >> 2] = 0),
                    (T[(A + 12) >> 2] = 0);
                }
                function ph(A, C) {
                  mh(C) || (At(2231, 1402, 1249, 1866), Ye()),
                    Uu(A, (T[(C + 8) >> 2] + vn(T[C >> 2], 48)) | 0);
                }
                function qR(A) {
                  return (
                    Ll(A) >>> 0 <= 23 && (At(2167, 1485, 146, 1172), Ye()),
                    (T[(A + 12) >> 2] - 24) | 0
                  );
                }
                function Xv(A) {
                  var C;
                  (ut = C = (ut - 16) | 0),
                    (T[A >> 2] = 0),
                    (T[(A + 4) >> 2] = 0),
                    (T[(A + 8) >> 2] = 0),
                    (ut = (C + 16) | 0);
                }
                function Vv(A, C, V) {
                  return (
                    (T[A >> 2] = C),
                    (C = T[(C + 4) >> 2]),
                    (T[(A + 4) >> 2] = C),
                    (T[(A + 8) >> 2] = C + (V << 2)),
                    A
                  );
                }
                function Zb(A) {
                  return (
                    (T[(A + 12) >> 2] = 0),
                    (T[(A + 4) >> 2] = 9760),
                    (T[A >> 2] = 9760),
                    (T[(A + 8) >> 2] = 9761),
                    A
                  );
                }
                function eA(A) {
                  return (
                    A >>> 0 >= 309 && (At(1954, 1519, 48, 1983), Ye()),
                    Kt[(5504 + (A << 3)) >> 3]
                  );
                }
                function ey(A) {
                  var C, V;
                  (V = T[(A + 4) >> 2]),
                    (C = T[(A + 8) >> 2]),
                    (T[C >> 2] = T[A >> 2]),
                    (T[(C + 4) >> 2] = V);
                }
                function Yb(A, C) {
                  var V, j;
                  return (
                    (ut = V = (ut - 16) | 0),
                    (j = Io(A, C)),
                    (ut = (V + 16) | 0),
                    j ? C : A
                  );
                }
                function Om(A, C) {
                  C &&
                    (Om(A, T[C >> 2]),
                    Om(A, T[(C + 4) >> 2]),
                    h2((C + 16) | 0),
                    Ni(C));
                }
                function np(A, C) {
                  C &&
                    (np(A, T[C >> 2]),
                    np(A, T[(C + 4) >> 2]),
                    b_((C + 16) | 0),
                    Ni(C));
                }
                function zv(A) {
                  var C;
                  return (
                    (ut = C = (ut - 16) | 0),
                    (A = T[Uu((C + 8) | 0, A) >> 2]),
                    (ut = (C + 16) | 0),
                    A
                  );
                }
                function Qb(A) {
                  var C;
                  return (
                    (ut = C = (ut - 16) | 0),
                    g_((C + 8) | 0, A),
                    (ut = (C + 16) | 0),
                    T[(C + 8) >> 2]
                  );
                }
                function pg(A) {
                  return (
                    32 & Jn[(A + 18) | 0] || (At(1588, 1402, 1816, 1086), Ye()),
                    T[A >> 2]
                  );
                }
                function a2(A, C) {
                  var V, j;
                  return (
                    (ut = V = (ut - 16) | 0),
                    (j = Io(C, A)),
                    (ut = (V + 16) | 0),
                    j ? C : A
                  );
                }
                function tA(A, C, V, j) {
                  (A = (V - C) | 0),
                    (V = (T[j >> 2] - A) | 0),
                    (T[j >> 2] = V),
                    (0 | A) > 0 && Ro(V, C, A);
                }
                function gg(A, C) {
                  (T[A >> 2] = C),
                    C || (At(2002, 1402, 413, 1304), Ye()),
                    (T[(A + 4) >> 2] = K0(C));
                }
                function mg(A) {
                  var C = 0;
                  s_(A), T[A >> 2] && (nA(A), (C = T[A >> 2]), Zi(A), Ni(C));
                }
                function Ld(A) {
                  var C = 0;
                  l_(A), T[A >> 2] && (vg(A), (C = T[A >> 2]), hd(A), Ni(C));
                }
                function $l(A) {
                  var C;
                  return (
                    (((-1 >>> (C = 31 & A)) & -2) << C) |
                    (((-1 << (A = (0 - A) & 31)) & -2) >>> A)
                  );
                }
                function mu(A, C) {
                  var V;
                  return (
                    (0 | (V = qa(A))) == (0 | C) && nc(A), (0 | C) == (0 | V)
                  );
                }
                function yu(A, C) {
                  var V;
                  return (
                    (0 | (V = vu(A))) == (0 | C) && Zs(A), (0 | C) == (0 | V)
                  );
                }
                function o2(A, C) {
                  return (
                    (T[A >> 2] = C),
                    (C = T[(C + 4) >> 2]),
                    (T[(A + 4) >> 2] = C),
                    (T[(A + 8) >> 2] = C + 8),
                    A
                  );
                }
                function Jb(A) {
                  return (
                    (A = T[(A + 24) >> 2]) ||
                      (At(1892, 1402, 2492, 1119), Ye()),
                    A
                  );
                }
                function As(A, C) {
                  return (
                    Ps(A) >>> 0 <= C >>> 0 && (Vn(), Ye()),
                    (T[A >> 2] + (C << 2)) | 0
                  );
                }
                function qb(A, C, V) {
                  (T[(A + 28) >> 2] == 1) | (T[(A + 4) >> 2] != (0 | C)) ||
                    (T[(A + 28) >> 2] = V);
                }
                function rp(A) {
                  return sp(A) || (At(2221, 1402, 1642, 1723), Ye()), T[A >> 2];
                }
                function Gm(A, C) {
                  T[(A + 4) >> 2] == T[ws(A) >> 2] ? Hb(A, C) : Kh(A, C);
                }
                function e_(A, C) {
                  T[(A + 4) >> 2] == T[ws(A) >> 2] ? cg(A, C) : i2(A, C);
                }
                function Qa(A, C) {
                  return C >>> 0 > 1073741823 && (Q0(1655), Ye()), Fc(C << 2);
                }
                function ip(A, C) {
                  Ut[(A + 4) >> 2] < Ut[ws(A) >> 2] ? i2(A, C) : cg(A, C);
                }
                function Fu(A, C) {
                  Ut[(A + 4) >> 2] < Ut[ws(A) >> 2] ? Kh(A, C) : Hb(A, C);
                }
                function Zs(A) {
                  var C;
                  return (
                    (C = A), (A = T[A >> 2]), (T[C >> 2] = A + 1), Ht[0 | A]
                  );
                }
                function gh(A) {
                  return Um(A) ? T[(A + 4) >> 2] : Jn[(A + 11) | 0];
                }
                function s2(A, C, V) {
                  (A = T[(V + 4) >> 2]),
                    (T[C >> 2] = T[V >> 2]),
                    (T[(C + 4) >> 2] = A);
                }
                function Nm(A) {
                  var C = 0;
                  Um(A) && ((C = T[A >> 2]), Rl(A), Ni(C));
                }
                function t_(A, C, V) {
                  return (C = (C - A) | 0) && Gu(V, A, C), (C + V) | 0;
                }
                function xl(A) {
                  Ni(T[(A + 8) >> 2]), (A = T[(A + 4) >> 2]) && Ni(A);
                }
                function ap(A) {
                  var C;
                  return (C = T[A >> 2]), (T[A >> 2] = 0), C;
                }
                function jv(A, C, V) {
                  (T[A >> 2] = T[C >> 2]), (Ht[(A + 4) | 0] = Jn[0 | V]);
                }
                function ty(A) {
                  return A ? ((T[2441] = A), -1) : 0;
                }
                function dd(A) {
                  return Um(A) ? T[A >> 2] : A;
                }
                function Od(A, C) {
                  return (T[(A + 4) >> 2] = C), (T[A >> 2] = C), A;
                }
                function Uc(A, C) {
                  return (Ht[(A + 4) | 0] = 0), (T[A >> 2] = C), A;
                }
                function Wv(A) {
                  return (T[(A + 16) >> 2] - T[(A + 8) >> 2]) | 0;
                }
                function Zi(A) {
                  return (T[ws(A) >> 2] - T[A >> 2]) >> 3;
                }
                function hd(A) {
                  return (T[ws(A) >> 2] - T[A >> 2]) >> 2;
                }
                function Ll(A) {
                  return (T[(A + 12) >> 2] - T[(A + 8) >> 2]) | 0;
                }
                function Ja(A) {
                  return T[T[(A + 8) >> 2] >> 2] == (0 | A);
                }
                function Rl(A) {
                  return 2147483647 & T[(A + 8) >> 2];
                }
                function Lo(A) {
                  return (T[(A + 4) >> 2] - T[A >> 2]) >> 3;
                }
                function Ps(A) {
                  return (T[(A + 4) >> 2] - T[A >> 2]) >> 2;
                }
                function Fm(A) {
                  return (T[A >> 2] = T[A >> 2] + 8), A;
                }
                function ny(A) {
                  return (T[A >> 2] = T[A >> 2] - 8), A;
                }
                function tc(A) {
                  return (T[A >> 2] - T[(A + 4) >> 2]) | 0;
                }
                function yg(A, C) {
                  return (T[A >> 2] = T[C >> 2]), A;
                }
                function Hr(A) {
                  T[(T[A >> 2] + 4) >> 2] = T[(A + 4) >> 2];
                }
                function Jl(A, C) {
                  return T[A >> 2] != T[C >> 2];
                }
                function n_(A, C) {
                  T[(A + 8) >> 2] = -2147483648 | C;
                }
                function Zh(A, C) {
                  return (T[A >> 2] + (C << 3)) | 0;
                }
                function l2(A, C, V) {
                  (T[(A + 4) >> 2] = V), (T[A >> 2] = C);
                }
                function Kv(A) {
                  return ((4 & Jn[(A + 19) | 0]) >>> 2) | 0;
                }
                function op(A) {
                  return (T[(A |= 0) >> 2] != 0) | 0;
                }
                function r_(A, C) {
                  return (T[A >> 2] + (C << 2)) | 0;
                }
                function Gd(A) {
                  return Xv(A), Xv((A + 24) | 0), A;
                }
                function i_(A) {
                  return Xv(A), Xv((A + 32) | 0), A;
                }
                function ry(A, C) {
                  return Kt[A >> 3] < Kt[C >> 3];
                }
                function Ka(A, C) {
                  return T[A >> 2] < T[C >> 2];
                }
                function Io(A, C) {
                  return Ut[A >> 2] < Ut[C >> 2];
                }
                function Um(A) {
                  return (Jn[(A + 11) | 0] >>> 7) | 0;
                }
                function ms(A) {
                  (T[A >> 2] = 0), (T[(A + 4) >> 2] = 0);
                }
                function sp(A) {
                  return pr[(A + 18) >> 1] == 4;
                }
                function mh(A) {
                  return pr[(A + 18) >> 1] == 3;
                }
                function yc(A) {
                  T[(A + 12) >> 2] = T[(A + 8) >> 2];
                }
                function Bm(A, C, V) {
                  V && Ro(A, C, V);
                }
                function Hm(A) {
                  return zv(T[(A + 4) >> 2]);
                }
                function Uu(A, C) {
                  return (T[A >> 2] = C), A;
                }
                function u2(A, C) {
                  __(A), g_((A + 4) | 0, C);
                }
                function Zv(A) {
                  return Ia((A + 24) | 0), A;
                }
                function a_(A, C, V) {
                  Kt[C >> 3] = Kt[V >> 3];
                }
                function Yh(A) {
                  return (T[A >> 2] + 16) | 0;
                }
                function Xm(A, C, V) {
                  T[C >> 2] = T[V >> 2];
                }
                function Yv(A) {
                  return T[tu(A) >> 2];
                }
                function nc(A) {
                  return Zs(T[A >> 2]);
                }
                function qa(A) {
                  return vu(T[A >> 2]);
                }
                function Vm(A) {
                  return tc(T[A >> 2]);
                }
                function ia(A, C, V) {
                  l2((A + 24) | 0, C, V);
                }
                function Vr(A) {
                  return zv(T[A >> 2]);
                }
                function Qh(A) {
                  return (A - 48) >>> 0 < 10;
                }
                function Bu(A) {
                  Lo(A), nA(A), p_(A);
                }
                function ql(A) {
                  Ps(A), vg(A), m_(A);
                }
                function c2(A) {
                  return op((A + 56) | 0);
                }
                function o_(A, C) {
                  T[A >> 2] = T[C >> 2];
                }
                function vu(A) {
                  return Ht[T[A >> 2]];
                }
                function Bi(A) {
                  return op((A + 24) | 0);
                }
                function s_(A) {
                  Zi(A), Lo(A), Zi(A);
                }
                function l_(A) {
                  hd(A), Ps(A), hd(A);
                }
                function d2(A) {
                  return 0 | (A |= 0);
                }
                function u_(A, C) {
                  Ht[(A + 17) | 0] = 17 - C;
                }
                function c_(A) {
                  Nm((A + 24) | 0), Nm(A);
                }
                function d_(A) {
                  Nm((A + 32) | 0), Nm(A);
                }
                function ys(A, C) {
                  return xm(A, C);
                }
                function iy(A, C) {
                  Ht[0 | A] = Jn[0 | C];
                }
                function eu(A) {
                  return (A + 12) | 0;
                }
                function Bc(A, C) {
                  T[(A + 8) >> 2] = C;
                }
                function lp(A, C) {
                  Od(A, Vr(C));
                }
                function zm(A, C) {
                  Od(A, Hm(C));
                }
                function Jh(A, C) {
                  Ht[(A + 11) | 0] = C;
                }
                function h_(A, C) {
                  T[(A + 4) >> 2] = C;
                }
                function Qv(A, C) {
                  hd(A), hd(A);
                }
                function nA(A) {
                  fg(A, T[A >> 2]);
                }
                function vg(A) {
                  n2(A, T[A >> 2]);
                }
                function tu(A) {
                  return (A + 4) | 0;
                }
                function ws(A) {
                  return (A + 8) | 0;
                }
                function eo() {
                  Q0(1112), Ye();
                }
                function jm() {
                  Q0(1553), Ye();
                }
                function f_(A) {
                  Ni((A |= 0));
                }
                function p_(A) {
                  Zi(A), Lo(A);
                }
                function g_(A, C) {
                  T[A >> 2] = C;
                }
                function m_(A) {
                  hd(A), Ps(A);
                }
                function y_(A) {
                  Ld((A + 24) | 0);
                }
                function v_(A) {
                  ny((A + 4) | 0);
                }
                function h2(A) {
                  c_((A + 4) | 0);
                }
                function b_(A) {
                  d_((A + 4) | 0);
                }
                function __(A) {
                  T[A >> 2] = 0;
                }
                function Nd(A) {}
                Mt(
                  (rn = Jn),
                  1024,
                  " "
                ),
                  Mt(rn, 5266, "Ig=="),
                  Mt(rn, 5279, "Lw=="),
                  Mt(rn, 5324, "XAAAAAAACAAAAAwAAAAAAAAACgAAAA0ACQ=="),
                  Mt(
                    rn,
                    5492,
                    "CQAKAAMABAAFHPYDAAAAAAAA8D8AAAAAAAAkQAAAAAAAAFlAAAAAAABAj0AAAAAAAIjDQAAAAAAAavhAAAAAAICELkEAAAAA0BJjQQAAAACE15dBAAAAAGXNzUEAAAAgX6ACQgAAAOh2SDdCAAAAopQabUIAAEDlnDCiQgAAkB7EvNZCAAA0JvVrDEMAgOA3ecNBQwCg2IVXNHZDAMhOZ23Bq0MAPZFg5FjhQ0CMtXgdrxVEUO/i1uQaS0SS1U0Gz/CARPZK4ccCLbVEtJ3ZeUN46kSRAigsKosgRTUDMrf0rVRFAoT+5HHZiUWBEh8v5yfARSHX5vrgMfRF6oygOVk+KUYksAiI741fRhduBbW1uJNGnMlGIuOmyEYDfNjqm9D+RoJNx3JhQjNH4yB5z/kSaEcbaVdDuBeeR7GhFirTztJHHUqc9IeCB0ilXMPxKWM9SOcZGjf6XXJIYaDgxHj1pkh5yBj21rLcSEx9z1nG7xFJnlxD8LdrRknGM1TspQZ8SVygtLMnhLFJc8ihoDHl5UmPOsoIfl4bSppkfsUOG1FKwP3ddtJhhUowfZUUR7q6Sj5u3WxstPBKzskUiIfhJEtB/Blq6RlaS6k9UOIxUJBLE03kWj5kxEtXYJ3xTX35S224BG6h3C9MRPPC5OTpY0wVsPMdXuSYTBuccKV1Hc9MkWFmh2lyA031+T/pA084TXL4j+PEYm5NR/s5Drv9ok0ZesjRKb3XTZ+YOkZ0rA1OZJ/kq8iLQk49x93Wui53Tgw5lYxp+qxOp0Pd94Ec4k6RlNR1oqMWT7W5SROLTExPERQO7NavgU8WmRGnzBu2T1v/1dC/outPmb+F4rdFIVB/LyfbJZdVUF/78FHv/IpQG502kxXewFBiRAT4mhX1UHtVBbYBWypRbVXDEeF4YFHIKjRWGZeUUXo1wavfvMlRbMFYywsWAFLH8S6+jhs0Ujmuum1yImlSx1kpCQ9rn1Id2Lll6aLTUiROKL+jiwhTrWHyroyuPlMMfVftFy1zU09crehd+KdTY7PYYnX23VMecMddCboSVCVMObWLaEdULp+Hoq5CfVR9w5QlrUmyVFz0+W4Y3OZUc3G4ih6THFXoRrMW89tRVaIYYNzvUoZVyh5406vnu1U/Eytky3DxVQ7YNT3+zCVWEk6DzD1AW1bLENKfJgiRVv6UxkcwSsVWPTq4Wbyc+lZmJBO49aEwV4DtFyZzymRX4Oid7w/9mVeMscL1KT7QV+9dM3O0TQRYazUAkCFhOVjFQgD0ablvWLspgDji06NYKjSgxtrI2Fg1QUh4EfsOWcEoLevqXENZ8XL4pSU0eFmtj3YPL0GuWcwZqmm96OJZP6AUxOyiF1pPyBn1p4tNWjIdMPlId4JafiR8NxsVt1qeLVsFYtrsWoL8WEN9CCJbozsvlJyKVluMCju5Qy2MW5fmxFNKnMFbPSC26FwD9ltNqOMiNIQrXDBJzpWgMmFcfNtBu0h/lVxbUhLqGt/KXHlzS9JwywBdV1DeBk3+NF1t5JVI4D1qXcSuXS2sZqBddRq1OFeA1F0SYeIGbaAJXqt8TSREBEBe1ttgLVUFdF7MErl4qgapXn9X5xZVSN9er5ZQLjWNE19bvOR5gnBIX3LrXRijjH5fJ7M67+UXs1/xXwlr393nX+23y0VX1R1g9FKfi1alUmCxJ4curE6HYJ3xKDpXIr1gApdZhHY18mDD/G8l1MImYfT7yy6Jc1xheH0/vTXIkWHWXI8sQzrGYQw0s/fTyPthhwDQeoRdMWKpAISZ5bRlYtQA5f8eIptihCDvX1P10GKl6Oo3qDIFY8+i5UVSfzpjwYWva5OPcGMyZ5tGeLOkY/5AQlhW4Nljn2gp9zUsEGTGwvN0QzdEZHizMFIURXlkVuC8ZlmWr2Q2DDbg973jZEOPQ9h1rRhlFHNUTtPYTmXsx/QQhEeDZej5MRVlGbhlYXh+Wr4f7mU9C4/41tMiZgzOsrbMiFdmj4Ff5P9qjWb5sLvu32LCZjidauqX+/ZmhkQF5X26LGfUSiOvjvRhZ4kd7FqycZZn6ySn8R4OzGcTdwhX04gBaNeUyiwI6zVoDTr9N8pla2hIRP5inh+haFrVvfuFZ9VosUqtemfBCmmvTqys4LhAaVpi19cY53Rp8TrNDd8gqmnWRKBoi1TgaQxWyEKuaRRqj2t60xmESWpzBllIIOV/agikNy0077NqCo2FOAHr6GpM8KaGwSUfazBWKPSYd1Nru2syMX9ViGuqBn/93mq+aypkb17LAvNrNT0LNn7DJ2yCDI7DXbRdbNHHOJq6kJJsxvnGQOk0x2w3uPiQIwL9bCNzmzpWITJt609CyaupZm3m45K7FlScbXDOOzWOtNFtDMKKwrEhBm6Pci0zHqo7bpln/N9SSnFuf4H7l+ecpW7fYfp9IQTbbix9vO6U4hBvdpxrKjobRW+Ugwa1CGJ6bz0SJHFFfbBvzBZtzZac5G9/XMiAvMMZcM85fdBVGlBwQ4icROsghHBUqsMVJim5cOmUNJtvc+9wEd0AwSWoI3FWFEExL5JYcWtZkf26to5x49d63jQyw3HcjRkWwv73cVPxn5ty/i1y1PZDoQe/YnKJ9JSJyW6Xcqsx+ut7Ss1yC198c41OAnPNdlvQMOI2c4FUcgS9mmxz0HTHIrbgoXMEUnmr41jWc4amV5Yc7wt0FMj23XF1QXQYenRVztJ1dJ6Y0eqBR6t0Y//CMrEM4XQ8v3N/3U8VdQuvUN/Uo0p1Z22SC2WmgHXACHdO/s+0dfHKFOL9A+p11v5MrX5CIHaMPqBYHlNUdi9OyO7lZ4l2u2F6at/Bv3YVfYyiK9nzdlqcL4t2zyh3cIP7LVQDX3cmMr2cFGKTd7B+7MOZOsh3XJ7nNEBJ/nf5whAhyO0yeLjzVCk6qWd4pTCqs4iTnXhnXkpwNXzSeAH2XMxCGwd5gjN0fxPiPHkxoKgvTA1yeT3IkjufkKZ5TXp3Csc03HlwrIpm/KAReoxXLYA7CUZ6b604YIqLe3plbCN8Njexen9HLBsEheV6Xln3IUXmGnvblzo1689Qe9I9iQLmA4V7Ro0rg99EuntMOPuxC2vwe18Gep7OhSR89ocYRkKnWXz6VM9riQiQfDgqw8arCsR8x/RzuFYN+Xz48ZBmrFAvfTuXGsBrkmN9Cj0hsAZ3mH1MjClcyJTOfbD3mTn9HAN+nHUAiDzkN34DkwCqS91tfuJbQEpPqqJ+2nLQHONU136QjwTkGyoNf7rZgm5ROkJ/KZAjyuXIdn8zdKw8H3usf6DI64XzzOF/AAAAAAAAAAARAAoAERERAAAAAAUAAAAAAAAJAAAAAAsAAAAAAAAAABEADwoREREDCgcAAQAJCwsAAAkGCwAACwAGEQAAABEREQ=="
                  ),
                  Mt(rn, 8065, "CwAAAAAAAAAAEQAKChEREQAKAAACAAkLAAAACQALAAAL"),
                  Mt(rn, 8123, "DA=="),
                  Mt(rn, 8135, "DAAAAAAMAAAAAAkMAAAAAAAMAAAM"),
                  Mt(rn, 8181, "Dg=="),
                  Mt(rn, 8193, "DQAAAAQNAAAAAAkOAAAAAAAOAAAO"),
                  Mt(rn, 8239, "EA=="),
                  Mt(rn, 8251, "DwAAAAAPAAAAAAkQAAAAAAAQAAAQAAASAAAAEhIS"),
                  Mt(rn, 8306, "EgAAABISEgAAAAAAAAk="),
                  Mt(rn, 8355, "Cw=="),
                  Mt(rn, 8367, "CgAAAAAKAAAAAAkLAAAAAAALAAAL"),
                  Mt(rn, 8413, "DA=="),
                  Mt(
                    rn,
                    8425,
                    "DAAAAAAMAAAAAAkMAAAAAAAMAAAMAAAwMTIzNDU2Nzg5QUJDREVGoCIAAAAAAAA4IQAACQAAAAoAAAALAAAAU3Q5ZXhjZXB0aW9uAAAAACQiAAAoIQAAAAAAAGQhAAACAAAADAAAAA0AAABTdDExbG9naWNfZXJyb3IATCIAAFQhAAA4IQAAAAAAAJghAAACAAAADgAAAA0AAABTdDEybGVuZ3RoX2Vycm9yAAAAAEwiAACEIQAAZCEAAFN0OXR5cGVfaW5mbwAAAAAkIgAApCEAAE4xMF9fY3h4YWJpdjExNl9fc2hpbV90eXBlX2luZm9FAAAAAEwiAAC8IQAAtCEAAE4xMF9fY3h4YWJpdjExN19fY2xhc3NfdHlwZV9pbmZvRQAAAEwiAADsIQAA4CEAAAAAAAAQIgAADwAAABAAAAARAAAAEgAAABMAAAAUAAAAFQAAABYAAAAAAAAAlCIAAA8AAAAXAAAAEQAAABIAAAATAAAAGAAAABkAAAAaAAAATjEwX19jeHhhYml2MTIwX19zaV9jbGFzc190eXBlX2luZm9FAAAAAEwiAABsIgAAECI="
                  ),
                  Mt(rn, 8864, "BQ=="),
                  Mt(rn, 8876, "Bg=="),
                  Mt(rn, 8900, "BwAAAAgAAAA4JgAAAAQ="),
                  Mt(rn, 8924, "AQ=="),
                  Mt(rn, 8939, "Cv////8="),
                  Mt(rn, 9008, "oCIAAGAtUA==");
                var up,
                  Ao =
                    ((up = [
                      null,
                      function (A) {
                        ql(9440),
                          ql(9452),
                          Bu(9464),
                          Bu(9640),
                          Bu(9664),
                          Bu(9676),
                          Bu(9652),
                          Ld(9688),
                          mg(9676),
                          mg(9664),
                          mg(9652),
                          mg(9640),
                          Ld(9628),
                          Ld(9608),
                          Ld(9596),
                          Ld(9584),
                          Om(9564, Yv(9564)),
                          np(9552, Yv(9552)),
                          y_(9480),
                          mg(9464),
                          Ld(9452),
                          Ld(9440);
                      },
                      Fv,
                      op,
                      function (A, C, V, j, ae, ge) {
                        (A |= 0),
                          (C = +C),
                          (V |= 0),
                          (j |= 0),
                          (ae |= 0),
                          (ge |= 0);
                        var Ee,
                          Le = 0,
                          et = 0,
                          yt = 0,
                          Bt = 0,
                          mn = 0,
                          Yn = 0,
                          zr = 0,
                          Zr = 0,
                          fi = 0,
                          Pi = 0,
                          ta = 0,
                          Ji = 0,
                          bo = 0,
                          Oo = 0,
                          Do = 0,
                          sl = 0,
                          vc = 0,
                          yh = 0,
                          bg = 0;
                        (ut = Ee = (ut - 560) | 0),
                          (T[(Ee + 44) >> 2] = 0),
                          ar(+C),
                          (Le = 0 | Yt(1)),
                          Yt(0),
                          (0 | Le) < 0
                            ? ((Do = 1),
                              (sl = 1045),
                              ar(+(C = -C)),
                              (Le = 0 | Yt(1)),
                              Yt(0))
                            : 2048 & ae
                            ? ((Do = 1), (sl = 1048))
                            : ((sl = (Do = 1 & ae) ? 1051 : 1046), (yh = !Do));
                        e: if ((2146435072 & Le) != 2146435072) {
                          bo = (Ee + 16) | 0;
                          t: {
                            n: {
                              i: {
                                if (
                                  ((C = QE(C, (Ee + 44) | 0)), (C += C) != 0)
                                ) {
                                  if (
                                    ((Le = T[(Ee + 44) >> 2]),
                                    (T[(Ee + 44) >> 2] = Le - 1),
                                    (0 | (Pi = 32 | ge)) != 97)
                                  )
                                    break i;
                                  break t;
                                }
                                if ((0 | (Pi = 32 | ge)) == 97) break t;
                                (mn = T[(Ee + 44) >> 2]),
                                  (Yn = (0 | j) < 0 ? 6 : j);
                                break n;
                              }
                              (mn = (Le - 29) | 0),
                                (T[(Ee + 44) >> 2] = mn),
                                (C *= 268435456),
                                (Yn = (0 | j) < 0 ? 6 : j);
                            }
                            for (
                              et = Zr =
                                (0 | mn) < 0 ? (Ee + 48) | 0 : (Ee + 336) | 0;
                              (Le =
                                (C < 4294967296) & (C >= 0) ? ~~C >>> 0 : 0),
                                (T[(j = et) >> 2] = Le),
                                (et = (et + 4) | 0),
                                (C = 1e9 * (C - +(Le >>> 0))) != 0;

                            );
                            if ((0 | mn) <= 0) (j = mn), (Le = et), (Bt = Zr);
                            else
                              for (Bt = Zr, j = mn; ; ) {
                                if (
                                  ((zr = j >>> 0 < 29 ? j : 29),
                                  !(Bt >>> 0 > (Le = (et - 4) | 0) >>> 0))
                                ) {
                                  for (
                                    j = zr, yt = 0;
                                    (ta = Le),
                                      (bg = yt),
                                      (Ji = T[Le >> 2]),
                                      (fi = 31 & j),
                                      (63 & j) >>> 0 >= 32
                                        ? ((yt = Ji << fi), (Ji = 0))
                                        : ((yt =
                                            ((1 << fi) - 1) &
                                            (Ji >>> (32 - fi))),
                                          (Ji <<= fi)),
                                      (yt = (yt + 0) | 0),
                                      (yt =
                                        (fi = (bg + Ji) | 0) >>> 0 < Ji >>> 0
                                          ? (yt + 1) | 0
                                          : yt),
                                      (Ji = ta),
                                      (ta = cd(
                                        (yt = Xo(fi, yt, 1e9)),
                                        cn,
                                        1e9,
                                        0
                                      )),
                                      (T[Ji >> 2] = fi - ta),
                                      Bt >>> 0 <= (Le = (Le - 4) | 0) >>> 0;

                                  );
                                  yt && (T[(Bt = (Bt - 4) | 0) >> 2] = yt);
                                }
                                for (
                                  ;
                                  Bt >>> 0 < (Le = et) >>> 0 &&
                                  !T[(et = (Le - 4) | 0) >> 2];

                                );
                                if (
                                  ((j = (T[(Ee + 44) >> 2] - zr) | 0),
                                  (T[(Ee + 44) >> 2] = j),
                                  (et = Le),
                                  !((0 | j) > 0))
                                )
                                  break;
                              }
                            if (((et = (((Yn + 25) | 0) / 9) | 0), (0 | j) < 0))
                              for (
                                zr = (et + 1) | 0, vc = (0 | Pi) == 102;
                                ;

                              ) {
                                yt = (j = (0 - j) | 0) >>> 0 < 9 ? j : 9;
                                n: if (Le >>> 0 > Bt >>> 0) {
                                  for (
                                    ta = (1e9 >>> yt) | 0,
                                      fi = (-1 << yt) ^ -1,
                                      j = 0,
                                      et = Bt;
                                    (Ji = j),
                                      (j = T[et >> 2]),
                                      (T[et >> 2] = Ji + ((j >>> yt) | 0)),
                                      (j = vn(ta, j & fi)),
                                      (et = (et + 4) | 0) >>> 0 < Le >>> 0;

                                  );
                                  if (((et = T[Bt >> 2]), !j)) break n;
                                  (T[Le >> 2] = j), (Le = (Le + 4) | 0);
                                } else et = T[Bt >> 2];
                                if (
                                  ((j = (yt + T[(Ee + 44) >> 2]) | 0),
                                  (T[(Ee + 44) >> 2] = j),
                                  (Bt = ((!et << 2) + Bt) | 0),
                                  (Le =
                                    (0 | zr) < (Le - (et = vc ? Zr : Bt)) >> 2
                                      ? (et + (zr << 2)) | 0
                                      : Le),
                                  !((0 | j) < 0))
                                )
                                  break;
                              }
                            if (
                              ((et = 0),
                              !(
                                Le >>> 0 <= Bt >>> 0 ||
                                ((et = vn((Zr - Bt) >> 2, 9)),
                                (j = 10),
                                (yt = T[Bt >> 2]) >>> 0 < 10)
                              ))
                            )
                              for (
                                ;
                                (et = (et + 1) | 0),
                                  yt >>> 0 >= (j = vn(j, 10)) >>> 0;

                              );
                            if (
                              (0 |
                                (j =
                                  (((Yn - ((0 | Pi) == 102 ? 0 : et)) | 0) -
                                    (((0 | Pi) == 103) & ((0 | Yn) != 0))) |
                                  0)) <
                              ((vn((Le - Zr) >> 2, 9) - 9) | 0)
                            ) {
                              if (
                                ((yt =
                                  ((((yt =
                                    (((0 | mn) < 0 ? 4 : 292) + Ee) | 0) +
                                    ((zr =
                                      ((0 | (mn = (j + 9216) | 0)) / 9) | 0) <<
                                      2)) |
                                    0) -
                                    4048) |
                                  0),
                                (j = 10),
                                (0 | (mn = (mn - vn(zr, 9)) | 0)) <= 7)
                              )
                                for (
                                  ;
                                  (j = vn(j, 10)),
                                    (0 | (mn = (mn + 1) | 0)) != 8;

                                );
                              if (
                                !(
                                  !(mn =
                                    ((zr = T[yt >> 2]) -
                                      vn(
                                        j,
                                        (ta = ((zr >>> 0) / (j >>> 0)) | 0)
                                      )) |
                                    0) &
                                  ((0 | (fi = (yt + 4) | 0)) == (0 | Le))
                                ) &&
                                ((C = (0 | Le) == (0 | fi) ? 1 : 1.5),
                                (Oo =
                                  mn >>> 0 < (fi = (j >>> 1) | 0) >>> 0
                                    ? 0.5
                                    : (0 | fi) == (0 | mn)
                                    ? C
                                    : 1.5),
                                (C =
                                  1 & ta ? 9007199254740994 : 9007199254740992),
                                (Jn[0 | sl] != 45) | yh ||
                                  ((Oo = -Oo), (C = -C)),
                                (mn = (zr - mn) | 0),
                                (T[yt >> 2] = mn),
                                C + Oo != C)
                              ) {
                                if (
                                  ((j = (j + mn) | 0),
                                  (T[yt >> 2] = j),
                                  j >>> 0 >= 1e9)
                                )
                                  for (
                                    ;
                                    (T[yt >> 2] = 0),
                                      (yt = (yt - 4) | 0) >>> 0 < Bt >>> 0 &&
                                        (T[(Bt = (Bt - 4) | 0) >> 2] = 0),
                                      (j = (T[yt >> 2] + 1) | 0),
                                      (T[yt >> 2] = j),
                                      j >>> 0 > 999999999;

                                  );
                                if (
                                  ((et = vn((Zr - Bt) >> 2, 9)),
                                  (j = 10),
                                  !((mn = T[Bt >> 2]) >>> 0 < 10))
                                )
                                  for (
                                    ;
                                    (et = (et + 1) | 0),
                                      mn >>> 0 >= (j = vn(j, 10)) >>> 0;

                                  );
                              }
                              Le = (j = (yt + 4) | 0) >>> 0 < Le >>> 0 ? j : Le;
                            }
                            for (
                              ;
                              (mn = Le),
                                !(j = Le >>> 0 <= Bt >>> 0) &&
                                  !T[(Le = (mn - 4) | 0) >> 2];

                            );
                            if ((0 | Pi) == 103) {
                              if (
                                ((Yn =
                                  (((yt =
                                    ((0 | (Le = Yn || 1)) > (0 | et)) &
                                    ((0 | et) > -5))
                                    ? -1 ^ et
                                    : -1) +
                                    Le) |
                                  0),
                                (ge = ((yt ? -1 : -2) + ge) | 0),
                                !(Pi = 8 & ae))
                              ) {
                                if (
                                  ((Le = -9),
                                  !j &&
                                    (zr = T[(mn - 4) >> 2]) &&
                                    ((j = 10),
                                    (Le = 0),
                                    !((zr >>> 0) % 10 | 0)))
                                ) {
                                  for (
                                    ;
                                    (yt = Le),
                                      (Le = (Le + 1) | 0),
                                      !(
                                        (zr >>> 0) % ((j = vn(j, 10)) >>> 0) |
                                        0
                                      );

                                  );
                                  Le = -1 ^ yt;
                                }
                                (j = vn((mn - Zr) >> 2, 9)),
                                  (-33 & ge) != 70
                                    ? ((Pi = 0),
                                      (Yn =
                                        (0 |
                                          (j =
                                            (0 |
                                              (j =
                                                (((((j + et) | 0) + Le) | 0) -
                                                  9) |
                                                0)) >
                                            0
                                              ? j
                                              : 0)) >
                                        (0 | Yn)
                                          ? Yn
                                          : j))
                                    : ((Pi = 0),
                                      (Yn =
                                        (0 |
                                          (j =
                                            (0 |
                                              (j = (((j + Le) | 0) - 9) | 0)) >
                                            0
                                              ? j
                                              : 0)) >
                                        (0 | Yn)
                                          ? Yn
                                          : j));
                              }
                            } else Pi = 8 & ae;
                            if (
                              ((zr = (Yn | Pi) != 0),
                              (j = A),
                              (Ji = V),
                              (0 | (ta = -33 & ge)) == 70)
                            )
                              ge = (0 | et) > 0 ? et : 0;
                            else {
                              if (
                                ((bo -
                                  (Le = Jf(
                                    ((Le = et >> 31) + et) ^ Le,
                                    0,
                                    bo
                                  ))) |
                                  0) <=
                                1
                              )
                                for (
                                  ;
                                  (Ht[0 | (Le = (Le - 1) | 0)] = 48),
                                    ((bo - Le) | 0) < 2;

                                );
                              (Ht[0 | (vc = (Le - 2) | 0)] = ge),
                                (Ht[(Le - 1) | 0] = (0 | et) < 0 ? 45 : 43),
                                (ge = (bo - vc) | 0);
                            }
                            gu(
                              j,
                              32,
                              Ji,
                              (yt =
                                (1 +
                                  ((ge + ((zr + ((Yn + Do) | 0)) | 0)) | 0)) |
                                0),
                              ae
                            ),
                              rs(A, sl, Do),
                              gu(A, 48, V, yt, 65536 ^ ae);
                            n: {
                              i: {
                                a: {
                                  if ((0 | ta) == 70) {
                                    for (
                                      j = 8 | (ge = (Ee + 16) | 0),
                                        ge |= 9,
                                        et = Bt = Bt >>> 0 > Zr >>> 0 ? Zr : Bt;
                                      ;

                                    ) {
                                      Le = Jf(T[et >> 2], 0, ge);
                                      l: if ((0 | et) == (0 | Bt))
                                        (0 | ge) == (0 | Le) &&
                                          ((Ht[(Ee + 24) | 0] = 48), (Le = j));
                                      else {
                                        if ((Ee + 16) >>> 0 >= Le >>> 0)
                                          break l;
                                        for (
                                          ;
                                          (Ht[0 | (Le = (Le - 1) | 0)] = 48),
                                            (Ee + 16) >>> 0 < Le >>> 0;

                                        );
                                      }
                                      if (
                                        (rs(A, Le, (ge - Le) | 0),
                                        !(
                                          Zr >>> 0 >=
                                          (et = (et + 4) | 0) >>> 0
                                        ))
                                      )
                                        break;
                                    }
                                    if (((Le = 0), !zr)) break i;
                                    if (
                                      (rs(A, 2046, 1),
                                      ((0 | Yn) <= 0) | (et >>> 0 >= mn >>> 0))
                                    )
                                      break a;
                                    for (;;) {
                                      if (
                                        (Le = Jf(T[et >> 2], 0, ge)) >>> 0 >
                                        (Ee + 16) >>> 0
                                      )
                                        for (
                                          ;
                                          (Ht[0 | (Le = (Le - 1) | 0)] = 48),
                                            (Ee + 16) >>> 0 < Le >>> 0;

                                        );
                                      if (
                                        (rs(A, Le, (0 | Yn) < 9 ? Yn : 9),
                                        (Le = (Yn - 9) | 0),
                                        mn >>> 0 <= (et = (et + 4) | 0) >>> 0)
                                      )
                                        break i;
                                      if (((j = (0 | Yn) > 9), (Yn = Le), !j))
                                        break;
                                    }
                                    break i;
                                  }
                                  l: if (!((0 | Yn) < 0))
                                    for (
                                      Zr =
                                        Bt >>> 0 < mn >>> 0 ? mn : (Bt + 4) | 0,
                                        ge = 9 | (j = (Ee + 16) | 0),
                                        j |= 8,
                                        et = Bt;
                                      ;

                                    ) {
                                      (0 | ge) ==
                                        (0 | (Le = Jf(T[et >> 2], 0, ge))) &&
                                        ((Ht[(Ee + 24) | 0] = 48), (Le = j));
                                      r: if ((0 | et) == (0 | Bt))
                                        rs(A, Le, 1),
                                          (Le = (Le + 1) | 0),
                                          Yn | Pi && rs(A, 2046, 1);
                                      else {
                                        if ((Ee + 16) >>> 0 >= Le >>> 0)
                                          break r;
                                        for (
                                          ;
                                          (Ht[0 | (Le = (Le - 1) | 0)] = 48),
                                            (Ee + 16) >>> 0 < Le >>> 0;

                                        );
                                      }
                                      if (
                                        (rs(
                                          A,
                                          (mn = Le),
                                          (0 | (Le = (ge - Le) | 0)) < (0 | Yn)
                                            ? Le
                                            : Yn
                                        ),
                                        (Yn = (Yn - Le) | 0),
                                        Zr >>> 0 <= (et = (et + 4) | 0) >>> 0)
                                      )
                                        break l;
                                      if (!((0 | Yn) >= 0)) break;
                                    }
                                  gu(A, 48, (Yn + 18) | 0, 18, 0),
                                    rs(A, vc, (bo - vc) | 0);
                                  break n;
                                }
                                Le = Yn;
                              }
                              gu(A, 48, (Le + 9) | 0, 9, 0);
                            }
                            break e;
                          }
                          if (
                            ((Yn = ((((ge << 26) >> 31) & 9) + sl) | 0),
                            !(j >>> 0 > 11))
                          ) {
                            for (
                              Le = (12 - j) | 0, Oo = 8;
                              (Oo *= 16), (Le = (Le - 1) | 0);

                            );
                            C =
                              Jn[0 | Yn] != 45
                                ? C + Oo - Oo
                                : -(Oo + (-C - Oo));
                          }
                          for (
                            (0 | bo) ==
                              (0 |
                                (Le = Jf(
                                  (Le = (et = T[(Ee + 44) >> 2]) >> 31) ^
                                    (Le + et),
                                  0,
                                  bo
                                ))) &&
                              ((Ht[(Ee + 15) | 0] = 48), (Le = (Ee + 15) | 0)),
                              Zr = 2 | Do,
                              mn = 32 & ge,
                              et = T[(Ee + 44) >> 2],
                              Ht[0 | (Bt = (Le - 2) | 0)] = ge + 15,
                              Ht[(Le - 1) | 0] = (0 | et) < 0 ? 45 : 43,
                              yt = 8 & ae,
                              et = (Ee + 16) | 0;
                            (ge = et),
                              (ta = mn),
                              (Le = Xt(C) < 2147483648 ? ~~C : -2147483648),
                              (Ht[0 | et] = ta | Jn[(Le + 8448) | 0]),
                              (C = 16 * (C - +(0 | Le))),
                              !(yt || ((0 | j) > 0) | (C != 0)) |
                                ((((et = (ge + 1) | 0) - ((Ee + 16) | 0)) |
                                  0) !=
                                  1) ||
                                ((Ht[(ge + 1) | 0] = 46), (et = (ge + 2) | 0)),
                              C != 0;

                          );
                          (ge = (Ee + 16) | 0),
                            gu(
                              A,
                              32,
                              V,
                              (yt =
                                ((j =
                                  !j | (((((et - Ee) | 0) - 18) | 0) >= (0 | j))
                                    ? (((bo - ((ge + Bt) | 0)) | 0) + et) | 0
                                    : (2 + ((((j + bo) | 0) - Bt) | 0)) | 0) +
                                  Zr) |
                                0),
                              ae
                            ),
                            rs(A, Yn, Zr),
                            gu(A, 48, V, yt, 65536 ^ ae),
                            rs(A, (Le = ge), (ge = (et - ge) | 0)),
                            gu(
                              A,
                              48,
                              ((Le = j) - (((j = (bo - Bt) | 0) + ge) | 0)) | 0,
                              0,
                              0
                            ),
                            rs(A, Bt, j);
                        } else
                          gu(A, 32, V, (yt = (Do + 3) | 0), -65537 & ae),
                            rs(A, sl, Do),
                            (j = 32 & ge),
                            rs(
                              A,
                              C != C ? (j ? 1318 : 1924) : j ? 1613 : 1928,
                              3
                            );
                        return (
                          gu(A, 32, V, yt, 8192 ^ ae),
                          (ut = (Ee + 560) | 0),
                          0 | ((0 | V) > (0 | yt) ? V : yt)
                        );
                      },
                      function (A, C) {
                        A |= 0;
                        var V,
                          j,
                          ae,
                          ge = 0,
                          Ee = 0,
                          Le = 0,
                          et = 0,
                          yt = 0,
                          Bt = 0,
                          mn = 0,
                          Yn = 0,
                          zr = 0,
                          Zr = 0,
                          fi = 0,
                          Pi = 0;
                        (ge = C |= 0),
                          (C = (T[C >> 2] + 7) & -8),
                          (T[ge >> 2] = C + 16),
                          (ae = A),
                          (mn = T[(A = C) >> 2]),
                          (C = T[(A + 4) >> 2]),
                          (j = Le = T[(A + 12) >> 2]),
                          (ut = V = (ut - 32) | 0),
                          (Le = ge = 2147483647 & Le),
                          (Ee = (ge - 1006698496) | 0),
                          (et = (ge - 1140785152) | 0),
                          (Yn = ge = T[(A + 8) >> 2]);
                        e: if (
                          (((0 | Ee) == (0 | et)) & (ge >>> 0 < ge >>> 0)) |
                          (Ee >>> 0 < et >>> 0)
                        ) {
                          if (
                            ((Le = ge),
                            (ge = (j << 4) | (ge >>> 28)),
                            (Le = (Le << 4) | ((A = C) >>> 28)),
                            (C = A &= 268435455),
                            (((0 | A) == 134217728) & ((0 | mn) != 0)) |
                              (A >>> 0 > 134217728))
                          ) {
                            (A = (ge + 1073741824) | 0),
                              (A = (C = (Le + 1) | 0) ? A : (A + 1) | 0),
                              (Ee = C);
                            break e;
                          }
                          if (
                            ((Ee = Le),
                            (A = (ge + 1073741824) | 0),
                            mn | (134217728 ^ C))
                          )
                            break e;
                          (ge = A),
                            (A =
                              (C = 1 & Le) >>> 0 >
                              (Ee = Le = (C + Ee) | 0) >>> 0
                                ? (ge + 1) | 0
                                : ge);
                        } else
                          (
                            !Yn & ((0 | Le) == 2147418112)
                              ? !(C | mn)
                              : Le >>> 0 < 2147418112
                          )
                            ? ((Ee = 0),
                              (A = 2146435072),
                              Le >>> 0 > 1140785151 ||
                                ((A = 0),
                                (fi = (Le >>> 16) | 0) >>> 0 < 15249 ||
                                  ((Ee = mn),
                                  (A = C),
                                  (Le = et = (65535 & j) | 65536),
                                  (zr = ge),
                                  (yt = ge),
                                  64 & (Bt = (fi - 15233) | 0)
                                    ? ((et = Ee),
                                      (Ee = 31 & (ge = (Bt + -64) | 0)),
                                      (63 & ge) >>> 0 >= 32
                                        ? ((A = et << Ee), (yt = 0))
                                        : ((A =
                                            (((1 << Ee) - 1) &
                                              (et >>> (32 - Ee))) |
                                            (A << Ee)),
                                          (yt = et << Ee)),
                                      (et = A),
                                      (Ee = 0),
                                      (A = 0))
                                    : Bt &&
                                      ((Yn = Bt),
                                      (Zr = 31 & (ge = Bt)),
                                      (63 & ge) >>> 0 >= 32
                                        ? ((ge = yt << Zr), (yt = 0))
                                        : ((ge =
                                            (((1 << Zr) - 1) &
                                              (yt >>> (32 - Zr))) |
                                            (et << Zr)),
                                          (yt <<= Zr)),
                                      (et = ge),
                                      (Pi = yt),
                                      (yt = A),
                                      (Zr = Ee),
                                      (Bt = 31 & (ge = (64 - Bt) | 0)),
                                      (63 & ge) >>> 0 >= 32
                                        ? ((ge = 0), (yt = (yt >>> Bt) | 0))
                                        : ((ge = (yt >>> Bt) | 0),
                                          (yt =
                                            ((((1 << Bt) - 1) & yt) <<
                                              (32 - Bt)) |
                                            (Zr >>> Bt))),
                                      (yt |= Pi),
                                      (et |= ge),
                                      (Bt = 31 & Yn),
                                      (63 & Yn) >>> 0 >= 32
                                        ? ((ge = Ee << Bt), (Ee = 0))
                                        : ((ge =
                                            (((1 << Bt) - 1) &
                                              (Ee >>> (32 - Bt))) |
                                            (A << Bt)),
                                          (Ee <<= Bt)),
                                      (A = ge)),
                                  (T[(V + 16) >> 2] = Ee),
                                  (T[(V + 20) >> 2] = A),
                                  (T[(V + 24) >> 2] = yt),
                                  (T[(V + 28) >> 2] = et),
                                  64 & (ge = (15361 - fi) | 0)
                                    ? ((C = zr),
                                      (Ee = 31 & (A = (ge + -64) | 0)),
                                      (63 & A) >>> 0 >= 32
                                        ? ((ge = 0), (mn = (Le >>> Ee) | 0))
                                        : ((ge = (Le >>> Ee) | 0),
                                          (mn =
                                            ((((1 << Ee) - 1) & Le) <<
                                              (32 - Ee)) |
                                            (C >>> Ee))),
                                      (C = ge),
                                      (zr = 0),
                                      (Le = 0))
                                    : ge &&
                                      ((A = Le),
                                      (Yn = zr),
                                      (yt = 31 & (Ee = (64 - ge) | 0)),
                                      (63 & Ee) >>> 0 >= 32
                                        ? ((A = Yn << yt), (Yn = 0))
                                        : ((A =
                                            (((1 << yt) - 1) &
                                              (Yn >>> (32 - yt))) |
                                            (A << yt)),
                                          (Yn <<= yt)),
                                      (Ee = A),
                                      (yt = Yn),
                                      (Yn = mn),
                                      (A = ge),
                                      (mn = 31 & ge),
                                      (63 & ge) >>> 0 >= 32
                                        ? ((ge = 0), (C = (C >>> mn) | 0))
                                        : ((ge = (C >>> mn) | 0),
                                          (C =
                                            ((((1 << mn) - 1) & C) <<
                                              (32 - mn)) |
                                            (Yn >>> mn))),
                                      (mn = yt | C),
                                      (C = Ee | ge),
                                      (ge = zr),
                                      (Ee = 31 & A),
                                      (63 & A) >>> 0 >= 32
                                        ? ((A = 0), (zr = (Le >>> Ee) | 0))
                                        : ((A = (Le >>> Ee) | 0),
                                          (zr =
                                            ((((1 << Ee) - 1) & Le) <<
                                              (32 - Ee)) |
                                            (ge >>> Ee))),
                                      (Le = A)),
                                  (T[(et = V) >> 2] = mn),
                                  (T[(et + 4) >> 2] = C),
                                  (T[(et + 8) >> 2] = zr),
                                  (T[(et + 12) >> 2] = Le),
                                  (Le = et = T[(V + 4) >> 2]),
                                  (Ee =
                                    ((C = T[(V + 8) >> 2]) << 4) | (Le >>> 28)),
                                  (A = (T[(V + 12) >> 2] << 4) | (C >>> 28)),
                                  (((0 | (Le = et = 268435455 & Le)) ==
                                    134217728) &
                                    ((0 |
                                      (C =
                                        T[V >> 2] |
                                        ((T[(V + 16) >> 2] |
                                          T[(V + 24) >> 2]) !=
                                          0) |
                                        ((T[(V + 20) >> 2] |
                                          T[(V + 28) >> 2]) !=
                                          0))) !=
                                      0)) |
                                  (Le >>> 0 > 134217728)
                                    ? ((A = (C = (Ee + 1) | 0)
                                        ? A
                                        : (A + 1) | 0),
                                      (Ee = C))
                                    : C | (134217728 ^ Le) ||
                                      ((et =
                                        (C = (Ee + (1 & Ee)) | 0) >>> 0 <
                                        Ee >>> 0
                                          ? (A + 1) | 0
                                          : A),
                                      (Ee = C),
                                      (A = et)))))
                            : ((Ee = ((Le = ge) << 4) | (C >>> 28)),
                              (A =
                                (524287 & (ge = (j << 4) | (ge >>> 28))) |
                                2146959360));
                        (ut = (V + 32) | 0),
                          Qt(0, 0 | Ee),
                          Qt(1, (-2147483648 & j) | A),
                          (Kt[ae >> 3] = Sn());
                      },
                      function (A) {
                        return 0;
                      },
                      function (A, C, V) {
                        (C |= 0), (V |= 0);
                        var j,
                          ae = 0,
                          ge = 0,
                          Ee = 0,
                          Le = 0,
                          et = 0,
                          yt = 0;
                        (ut = j = (ut - 32) | 0),
                          (ae = T[(28 + (A |= 0)) >> 2]),
                          (T[(j + 16) >> 2] = ae),
                          (ge = T[(A + 20) >> 2]),
                          (T[(j + 28) >> 2] = V),
                          (T[(j + 24) >> 2] = C),
                          (C = (ge - ae) | 0),
                          (T[(j + 20) >> 2] = C),
                          (ae = (C + V) | 0),
                          (yt = 2);
                        e: {
                          t: {
                            C = (j + 16) | 0;
                            n: {
                              if (
                                !ty(
                                  0 |
                                    wn(T[(A + 60) >> 2], 0 | C, 2, (j + 12) | 0)
                                )
                              )
                                for (;;) {
                                  if ((0 | (ge = T[(j + 12) >> 2])) == (0 | ae))
                                    break n;
                                  if ((0 | ge) < 0) break t;
                                  if (
                                    ((Ee =
                                      (ge -
                                        ((Le =
                                          (Ee = T[(C + 4) >> 2]) >>> 0 <
                                          ge >>> 0)
                                          ? Ee
                                          : 0)) |
                                      0),
                                    (T[(et = ((Le << 3) + C) | 0) >> 2] =
                                      Ee + T[et >> 2]),
                                    (T[(et = ((Le ? 12 : 4) + C) | 0) >> 2] =
                                      T[et >> 2] - Ee),
                                    (ae = (ae - ge) | 0),
                                    (C = Le ? (C + 8) | 0 : C),
                                    (yt = (yt - Le) | 0),
                                    ty(
                                      0 |
                                        wn(
                                          T[(A + 60) >> 2],
                                          0 | C,
                                          0 | yt,
                                          (j + 12) | 0
                                        )
                                    ))
                                  )
                                    break;
                                }
                              if ((0 | ae) != -1) break t;
                            }
                            (C = T[(A + 44) >> 2]),
                              (T[(A + 28) >> 2] = C),
                              (T[(A + 20) >> 2] = C),
                              (T[(A + 16) >> 2] = C + T[(A + 48) >> 2]),
                              (A = V);
                            break e;
                          }
                          (T[(A + 28) >> 2] = 0),
                            (T[(A + 16) >> 2] = 0),
                            (T[(A + 20) >> 2] = 0),
                            (T[A >> 2] = 32 | T[A >> 2]),
                            (A = 0),
                            (0 | yt) != 2 && (A = (V - T[(C + 4) >> 2]) | 0);
                        }
                        return (ut = (j + 32) | 0), 0 | A;
                      },
                      function (A, C, V, j) {
                        return (cn = 0), 0;
                      },
                      d2,
                      f_,
                      function (A) {
                        return 1180;
                      },
                      function (A) {
                        Ni(Fv((A |= 0)));
                      },
                      function (A) {
                        return T[(4 + (A |= 0)) >> 2];
                      },
                      function (A) {
                        Fv((A |= 0)), Ni(A);
                      },
                      d2,
                      f_,
                      Nd,
                      Nd,
                      function (A, C, V) {
                        V |= 0;
                        var j,
                          ae = 0,
                          ge = 0,
                          Ee = 0,
                          Le = 0;
                        if (
                          ((ut = j = (ut + -64) | 0),
                          (ae = 1),
                          !$d((A |= 0), (C |= 0), 0) && ((ae = 0), C))
                        ) {
                          (ut = ae = (ut + -64) | 0),
                            (ge = T[C >> 2]),
                            (Ee = T[(ge - 4) >> 2]),
                            (Le = T[(ge - 8) >> 2]),
                            (T[(ae + 20) >> 2] = 0),
                            (T[(ae + 16) >> 2] = 8672),
                            (T[(ae + 12) >> 2] = C),
                            (T[(ae + 8) >> 2] = 8720),
                            (ge = 0),
                            zh((ae + 24) | 0, 0, 39),
                            (C = (C + Le) | 0);
                          e: if ($d(Ee, 8720, 0))
                            (T[(ae + 56) >> 2] = 1),
                              Ao[T[(T[Ee >> 2] + 20) >> 2]](
                                Ee,
                                (ae + 8) | 0,
                                C,
                                C,
                                1,
                                0
                              ),
                              (ge = T[(ae + 32) >> 2] == 1 ? C : 0);
                          else {
                            Ao[T[(T[Ee >> 2] + 24) >> 2]](
                              Ee,
                              (ae + 8) | 0,
                              C,
                              1,
                              0
                            );
                            t: switch (T[(ae + 44) >> 2]) {
                              case 0:
                                ge =
                                  T[(ae + 48) >> 2] == 1 &&
                                  T[(ae + 36) >> 2] == 1 &&
                                  T[(ae + 40) >> 2] == 1
                                    ? T[(ae + 28) >> 2]
                                    : 0;
                                break e;
                              case 1:
                                break t;
                              default:
                                break e;
                            }
                            (T[(ae + 32) >> 2] != 1 &&
                              T[(ae + 48) >> 2] |
                                (T[(ae + 36) >> 2] != 1) |
                                (T[(ae + 40) >> 2] != 1)) ||
                              (ge = T[(ae + 24) >> 2]);
                          }
                          (ut = (ae - -64) | 0),
                            (ae = 0),
                            ge &&
                              (zh(4 | (C = (j + 8) | 0), 0, 52),
                              (T[(j + 56) >> 2] = 1),
                              (T[(j + 20) >> 2] = -1),
                              (T[(j + 16) >> 2] = A),
                              (T[(j + 8) >> 2] = ge),
                              Ao[T[(T[ge >> 2] + 28) >> 2]](
                                ge,
                                C,
                                T[V >> 2],
                                1
                              ),
                              (0 | (A = T[(j + 32) >> 2])) == 1 &&
                                (T[V >> 2] = T[(j + 24) >> 2]),
                              (ae = (0 | A) == 1));
                        }
                        return (ut = (j - -64) | 0), 0 | ae;
                      },
                      function (A, C, V, j, ae, ge) {
                        (V |= 0),
                          (j |= 0),
                          (ae |= 0),
                          (ge |= 0),
                          $d((A |= 0), T[(8 + (C |= 0)) >> 2], ge) &&
                            ol(C, V, j, ae);
                      },
                      function (A, C, V, j, ae) {
                        if (
                          ((V |= 0),
                          (j |= 0),
                          (ae |= 0),
                          $d((A |= 0), T[(8 + (C |= 0)) >> 2], ae))
                        )
                          qb(C, V, j);
                        else
                          e: if ($d(A, T[C >> 2], ae)) {
                            if (
                              !(
                                (T[(C + 16) >> 2] != (0 | V)) &
                                (T[(C + 20) >> 2] != (0 | V))
                              )
                            ) {
                              if ((0 | j) != 1) break e;
                              return void (T[(C + 32) >> 2] = 1);
                            }
                            (T[(C + 20) >> 2] = V),
                              (T[(C + 32) >> 2] = j),
                              (T[(C + 40) >> 2] = T[(C + 40) >> 2] + 1),
                              (T[(C + 36) >> 2] != 1) |
                                (T[(C + 24) >> 2] != 2) ||
                                (Ht[(C + 54) | 0] = 1),
                              (T[(C + 44) >> 2] = 4);
                          }
                      },
                      function (A, C, V, j) {
                        (V |= 0),
                          (j |= 0),
                          $d((A |= 0), T[(8 + (C |= 0)) >> 2], 0) &&
                            Nb(C, V, j);
                      },
                      f_,
                      function (A, C, V, j, ae, ge) {
                        (V |= 0),
                          (j |= 0),
                          (ae |= 0),
                          (ge |= 0),
                          $d((A |= 0), T[(8 + (C |= 0)) >> 2], ge)
                            ? ol(C, V, j, ae)
                            : ((A = T[(A + 8) >> 2]),
                              Ao[T[(T[A >> 2] + 20) >> 2]](A, C, V, j, ae, ge));
                      },
                      function (A, C, V, j, ae) {
                        if (
                          ((V |= 0),
                          (j |= 0),
                          (ae |= 0),
                          $d((A |= 0), T[(8 + (C |= 0)) >> 2], ae))
                        )
                          qb(C, V, j);
                        else
                          e: {
                            if ($d(A, T[C >> 2], ae)) {
                              if (
                                !(
                                  (T[(C + 16) >> 2] != (0 | V)) &
                                  (T[(C + 20) >> 2] != (0 | V))
                                )
                              ) {
                                if ((0 | j) != 1) break e;
                                return void (T[(C + 32) >> 2] = 1);
                              }
                              T[(C + 32) >> 2] = j;
                              t: if (T[(C + 44) >> 2] != 4) {
                                if (
                                  ((yr[(C + 52) >> 1] = 0),
                                  (A = T[(A + 8) >> 2]),
                                  Ao[T[(T[A >> 2] + 20) >> 2]](
                                    A,
                                    C,
                                    V,
                                    V,
                                    1,
                                    ae
                                  ),
                                  Jn[(C + 53) | 0])
                                ) {
                                  if (
                                    ((T[(C + 44) >> 2] = 3), !Jn[(C + 52) | 0])
                                  )
                                    break t;
                                  break e;
                                }
                                T[(C + 44) >> 2] = 4;
                              }
                              if (
                                ((T[(C + 20) >> 2] = V),
                                (T[(C + 40) >> 2] = T[(C + 40) >> 2] + 1),
                                (T[(C + 36) >> 2] != 1) |
                                  (T[(C + 24) >> 2] != 2))
                              )
                                break e;
                              return void (Ht[(C + 54) | 0] = 1);
                            }
                            (A = T[(A + 8) >> 2]),
                              Ao[T[(T[A >> 2] + 24) >> 2]](A, C, V, j, ae);
                          }
                      },
                      function (A, C, V, j) {
                        (V |= 0),
                          (j |= 0),
                          $d((A |= 0), T[(8 + (C |= 0)) >> 2], 0)
                            ? Nb(C, V, j)
                            : ((A = T[(A + 8) >> 2]),
                              Ao[T[(T[A >> 2] + 28) >> 2]](A, C, V, j));
                      },
                    ]),
                    (up.set = function (A, C) {
                      this[A] = C;
                    }),
                    (up.get = function (A) {
                      return this[A];
                    }),
                    up);
                return {
                  __wasm_call_ctors: function () {
                    (Si = 11616), (T[2760] = 10848), (T[2727] = 42);
                  },
                  malloc: ir,
                  updateSwitchInfo: function (A, C, V, j, ae, ge, Ee) {
                    (A |= 0),
                      (C |= 0),
                      (V |= 0),
                      (j = st(j)),
                      (ae |= 0),
                      (ge = st(ge)),
                      (Ee = st(Ee));
                    var Le,
                      et,
                      yt,
                      Bt = st(0);
                    (ut = et = (ut - 96) | 0),
                      (Le = Wa()),
                      (Dt[(et + 92) >> 2] = Ee),
                      (Dt[(et + 88) >> 2] = ge),
                      (T[(et + 84) >> 2] = 1061158912),
                      (T[(et + 76) >> 2] = 1045220557),
                      (T[(et + 80) >> 2] = 1053609165),
                      (Dt[(et + 72) >> 2] = j),
                      (Ht[(et + 68) | 0] = ae),
                      (T[(et + 64) >> 2] = 50),
                      (T[((ae = et) + 56) >> 2] = C),
                      (T[(ae + 60) >> 2] = V),
                      (T[(ae + 48) >> 2] = A),
                      (C = Ro(ae, (ae + 48) | 0, 48)),
                      (j = Dt[((ae = C) + 28) >> 2]),
                      +st(Xt(j)) <= 1e-6 &&
                        ((T[(ae + 28) >> 2] = 1045220557),
                        (j = st(0.20000000298023224))),
                      (ge = Dt[(ae + 32) >> 2]),
                      +st(Xt(ge)) <= 1e-6 &&
                        ((T[(ae + 32) >> 2] = 1053609165),
                        (ge = st(0.4000000059604645))),
                      (Ee = Dt[(ae + 36) >> 2]),
                      +st(Xt(Ee)) <= 1e-6 &&
                        ((T[(ae + 36) >> 2] = 1061158912), (Ee = st(0.75))),
                      (Bt = Dt[(ae + 24) >> 2]),
                      +st(Xt(Bt)) <= 1e-6 &&
                        ((T[(ae + 24) >> 2] = 1084227584), (Bt = st(5))),
                      (T[(Le + 732) >> 2] = T[ae >> 2]),
                      (A = T[(ae + 12) >> 2]),
                      (T[(Le + 32) >> 2] = T[(ae + 8) >> 2]),
                      (T[(Le + 36) >> 2] = A),
                      (A = V = T[(ae + 16) >> 2]),
                      (T[(Le + 40) >> 2] = A),
                      (T[(Le + 44) >> 2] = A >> 31),
                      (A = Jn[(ae + 20) | 0]),
                      (T[(Le + 200) >> 2] = 1084227584),
                      (Ht[(Le + 186) | 0] = A),
                      (Dt[(Le + 196) >> 2] = Bt),
                      (Bt = st(0 | V)),
                      (Kt[(Le + 296) >> 3] = st(j * Bt)),
                      (Dt[(Le + 88) >> 2] = Ee),
                      (Dt[(Le + 84) >> 2] = ge),
                      (Dt[(Le + 80) >> 2] = j),
                      (Kt[(Le + 288) >> 3] = st(Ee * Bt)),
                      (yt = +st(ge * Bt)),
                      (Kt[(Le + 280) >> 3] = yt),
                      (ge = Dt[(ae + 40) >> 2]),
                      (j = Dt[(ae + 44) >> 2]),
                      (T[(Le + 144) >> 2] = 4),
                      (T[(Le + 148) >> 2] = 2),
                      (T[(Le + 136) >> 2] = 12),
                      (T[(Le + 140) >> 2] = 5),
                      (Kt[(Le + 384) >> 3] = (+(0 | V) / 20) * 3),
                      (Kt[(Le + 376) >> 3] = yt + 12),
                      (T[(Le + 368) >> 2] = -687194767),
                      (T[(Le + 372) >> 2] = -1077055325),
                      (T[(Le + 344) >> 2] = -1717986918),
                      (T[(Le + 348) >> 2] = 1072273817),
                      (T[(Le + 336) >> 2] = 858993459),
                      (T[(Le + 340) >> 2] = 1072902963),
                      (T[(Le + 328) >> 2] = -858993459),
                      (T[(Le + 332) >> 2] = 1072483532),
                      (T[(Le + 128) >> 2] = 10),
                      (T[(Le + 132) >> 2] = 10),
                      (Ht[(Le + 185) | 0] = 0),
                      (T[(Le + 104) >> 2] = 0),
                      (T[(Le + 64) >> 2] = 0),
                      (T[(Le + 68) >> 2] = 0),
                      (A =
                        (ge < st(0)) |
                        (j < st(0)) |
                        (ge > st(99999)) |
                        (j > st(99999))),
                      (Dt[(Le + 96) >> 2] = A ? st(4) : j),
                      (Dt[(Le + 92) >> 2] = A ? st(11) : ge),
                      (ut = (C + 96) | 0);
                  },
                  parseMPD: function (A) {
                    A |= 0;
                    var C,
                      V,
                      j,
                      ae = 0,
                      ge = 0,
                      Ee = 0,
                      Le = 0,
                      et = 0,
                      yt = 0,
                      Bt = 0,
                      mn = 0,
                      Yn = 0,
                      zr = 0,
                      Zr = 0,
                      fi = 0,
                      Pi = 0,
                      ta = 0,
                      Ji = 0,
                      bo = 0,
                      Oo = 0,
                      Do = 0,
                      sl = st(0);
                    if (
                      ((V = Wa()),
                      (ut = C = (ut - 240) | 0),
                      (fi = A),
                      (T[(C + 112) >> 2] = A),
                      ps(V, 2774, (C + 112) | 0),
                      Kb((j = (C + 176) | 0)),
                      (T[(j + 28) >> 2] = 0),
                      (T[(j + 24) >> 2] = 0),
                      zo((j + 32) | 0, 0, 1024),
                      ms((j + 56) | 0),
                      T[(j + 24) >> 2] ||
                        ((A = Fc(20)),
                        (T[(A + 16) >> 2] = 0),
                        (T[(A + 12) >> 2] = 0),
                        (T[(A + 8) >> 2] = 0),
                        (T[(A + 4) >> 2] = 65536),
                        (T[A >> 2] = 0),
                        (T[(j + 28) >> 2] = A),
                        (T[(j + 24) >> 2] = A)),
                      !c2(Ki(j, fi)) && jh(j, 1249))
                    ) {
                      if (sp((zr = xm(j, 1249)))) {
                        if (((et = (V + 528) | 0), rp(zr)))
                          for (Zr = (C + 160) | 0, Pi = (C + 148) | 0; ; ) {
                            (ge = Xb(zr, Bt)),
                              (Le = i_((A = (C + 128) | 0))),
                              Z0(A, wi(ys(ge, 1876))),
                              (A = C),
                              (mn = +(0 | pg(ys(ge, 1275))) / 1e3),
                              (ae = Xt(mn) < 2147483648 ? ~~mn : -2147483648),
                              (T[(A + 152) >> 2] = ae),
                              (T[(C + 148) >> 2] = pg(ys(ge, 1392))),
                              (T[(C + 140) >> 2] = pg(ys(ge, 1396))),
                              (T[(C + 144) >> 2] = pg(ys(ge, 1093))),
                              (A = C);
                            e: {
                              t: {
                                if (
                                  ((ae = ys(ge, 1751)),
                                  ((16 & Jn[(ae + 18) | 0]) >>> 4) | 0)
                                ) {
                                  if (512 & (Ee = pr[(ae + 18) >> 1])) {
                                    mn = Kt[ae >> 3];
                                    break e;
                                  }
                                  if (32 & Ee) {
                                    mn = +T[ae >> 2];
                                    break e;
                                  }
                                  if (64 & Ee) {
                                    mn = +Ut[ae >> 2];
                                    break e;
                                  }
                                  if (128 & Ee) {
                                    mn =
                                      +Ut[ae >> 2] +
                                      4294967296 * +T[(ae + 4) >> 2];
                                    break e;
                                  }
                                  if (!(256 & Ee)) break t;
                                  mn =
                                    +Ut[ae >> 2] +
                                    4294967296 * +Ut[(ae + 4) >> 2];
                                  break e;
                                }
                                At(2259, 1402, 1825, 1838), Ye();
                              }
                              At(2011, 1402, 1830, 1838), Ye();
                            }
                            if (
                              ((Dt[(A + 156) >> 2] = mn),
                              Z0(Zr, wi(ys(ge, 1886))),
                              (ut = Ee = (ut - 32) | 0),
                              (T[(Ee + 16) >> 2] = Qb(Pi)),
                              (Do = ta = (Ee + 24) | 0),
                              (ut = ge = (ut - 32) | 0),
                              (Ji = JR((ae = et), (ge + 28) | 0, Pi)),
                              (Yn = T[Ji >> 2]),
                              (Ht[(ge + 27) | 0] = 0),
                              Yn ||
                                ((ut = Yn = (ut - 16) | 0),
                                (yt = tu(ae)),
                                (bo = Wh(
                                  (A = (ge + 8) | 0),
                                  Fc(64),
                                  Uc((Yn + 8) | 0, yt)
                                )),
                                (Oo = (T[bo >> 2] + 16) | 0),
                                (ut = yt = (ut - 16) | 0),
                                (T[(yt + 8) >> 2] = T[(Ee + 16) >> 2]),
                                (T[Oo >> 2] = T[T[(yt + 8) >> 2] >> 2]),
                                i_(zh((Oo + 4) | 0, 0, 44)),
                                (ut = (yt + 16) | 0),
                                (Ht[(tu(bo) + 4) | 0] = 1),
                                (ut = (Yn + 16) | 0),
                                W0(ae, T[(ge + 28) >> 2], Ji, T[A >> 2]),
                                (Yn = ap(A)),
                                (Ht[(ge + 27) | 0] = 1),
                                (ae = A),
                                (yt = T[A >> 2]),
                                (T[A >> 2] = 0),
                                yt &&
                                  (Jn[(tu(ae) + 4) | 0] && b_((yt + 16) | 0),
                                  yt && Ni(yt))),
                              jv(Do, Uu((ge + 8) | 0, Yn), (ge + 27) | 0),
                              (ut = (ge + 32) | 0),
                              (A = Yh(ta)),
                              (ut = (Ee + 32) | 0),
                              ug((A = (A + 4) | 0), Le),
                              (T[(A + 28) >> 2] = T[(Le + 28) >> 2]),
                              (ae = T[(Le + 24) >> 2]),
                              (T[(A + 20) >> 2] = T[(Le + 20) >> 2]),
                              (T[(A + 24) >> 2] = ae),
                              (ae = T[(Le + 16) >> 2]),
                              (T[(A + 12) >> 2] = T[(Le + 12) >> 2]),
                              (T[(A + 16) >> 2] = ae),
                              ug((A + 32) | 0, (Le + 32) | 0),
                              (A = dd((C + 128) | 0)),
                              (ae = T[(C + 152) >> 2]),
                              (ge = T[(C + 148) >> 2]),
                              (Ee = T[(C + 140) >> 2]),
                              (yt = T[(C + 144) >> 2]),
                              (sl = Dt[(C + 156) >> 2]),
                              (T[(C + 96) >> 2] = dd(Zr)),
                              (Kt[(C + 88) >> 3] = sl),
                              (T[(C + 80) >> 2] = yt),
                              (T[(C + 76) >> 2] = Ee),
                              (T[(C + 72) >> 2] = ge),
                              (T[(C + 68) >> 2] = ae),
                              (T[(C + 64) >> 2] = A),
                              ps(V, 2559, (C - -64) | 0),
                              d_(Le),
                              (Bt = (Bt + 1) | 0),
                              !(rp(zr) >>> 0 > Bt >>> 0))
                            )
                              break;
                          }
                        if (
                          ((T[(V + 556) >> 2] = 5),
                          ql((Bt = (V + 584) | 0)),
                          (T[(V + 552) >> 2] = 0),
                          ql((Ee = (V + 560) | 0)),
                          ql((yt = (V + 572) | 0)),
                          (ut = ae = ((ut = A = (ut - 16) | 0) - 16) | 0),
                          (Le = T[Uu((ae + 8) | 0, T[et >> 2]) >> 2]),
                          (ut = (ae + 16) | 0),
                          (ae = T[Uu((A + 8) | 0, Le) >> 2]),
                          (ut = (A + 16) | 0),
                          (T[(Le = (C + 128) | 0) >> 2] = ae),
                          (T[(C + 120) >> 2] = q0(et)),
                          Jl(Le, (C + 120) | 0))
                        )
                          for (;;) {
                            if (
                              ((T[(V + 556) >> 2] = T[(Yh(Le) + 28) >> 2]),
                              Ws(Bt, (Yh(Le) + 24) | 0),
                              (T[(V + 552) >> 2] = T[(V + 552) >> 2] + 1),
                              Ws(Ee, (Yh(Le) + 16) | 0),
                              Ws(yt, (Yh(Le) + 20) | 0),
                              (A = T[(V + 556) >> 2]),
                              (ae = T[(Yh(Le) + 24) >> 2]),
                              (ge = T[(Yh(Le) + 16) >> 2]),
                              (zr = T[(Yh(Le) + 20) >> 2]),
                              (T[(C + 48) >> 2] = T[(V + 552) >> 2]),
                              (T[(C + 44) >> 2] = zr),
                              (T[(C + 40) >> 2] = ge),
                              (T[(C + 36) >> 2] = ae),
                              (T[(C + 32) >> 2] = A),
                              ps(V, 3275, (C + 32) | 0),
                              (A = T[(ge = Le) >> 2]),
                              (ae = T[(A + 4) >> 2]))
                            )
                              for (A = ae; (ae = A), (A = T[A >> 2]); );
                            else {
                              if (!Ja(A)) for (; !Ja((A = T[(A + 8) >> 2])); );
                              ae = T[(A + 8) >> 2];
                            }
                            if (
                              ((T[ge >> 2] = ae),
                              (T[(C + 120) >> 2] = q0(et)),
                              !Jl(Le, (C + 120) | 0))
                            )
                              break;
                          }
                      }
                      if (!c2(Ki(j, fi)) && jh(j, 1262)) {
                        if (sp((yt = xm(j, 1262)))) {
                          if (((zr = (V + 604) | 0), rp(yt)))
                            for (
                              Le = (V + 540) | 0,
                                Pi = (C + 152) | 0,
                                Yn = (C + 140) | 0,
                                Bt = 0;
                              (ae = Xb(yt, Bt)),
                                (fi = Gd((A = (C + 128) | 0))),
                                Z0(A, wi(ys(ae, 1876))),
                                (A = C),
                                (mn = +(0 | pg(ys(ae, 1275))) / 1e3),
                                (et = Xt(mn) < 2147483648 ? ~~mn : -2147483648),
                                (T[(A + 144) >> 2] = et),
                                (T[(C + 140) >> 2] = pg(ys(ae, 1392))),
                                (T[(C + 148) >> 2] = pg(ys(ae, 1762))),
                                Z0(Pi, wi(ys(ae, 1886))),
                                (ut = ge = (ut - 32) | 0),
                                (T[(ge + 16) >> 2] = Qb(Yn)),
                                (Do = ta = (ge + 24) | 0),
                                (ut = et = (ut - 32) | 0),
                                (Ji = JR((ae = Le), (et + 28) | 0, Yn)),
                                (Zr = T[Ji >> 2]),
                                (Ht[(et + 27) | 0] = 0),
                                Zr ||
                                  ((ut = Zr = (ut - 16) | 0),
                                  (Ee = tu(ae)),
                                  (bo = Wh(
                                    (A = (et + 8) | 0),
                                    Fc(56),
                                    Uc((Zr + 8) | 0, Ee)
                                  )),
                                  (Oo = (T[bo >> 2] + 16) | 0),
                                  (ut = Ee = (ut - 16) | 0),
                                  (T[(Ee + 8) >> 2] = T[(ge + 16) >> 2]),
                                  (T[Oo >> 2] = T[T[(Ee + 8) >> 2] >> 2]),
                                  Gd(zh((Oo + 4) | 0, 0, 36)),
                                  (ut = (Ee + 16) | 0),
                                  (Ht[(tu(bo) + 4) | 0] = 1),
                                  (ut = (Zr + 16) | 0),
                                  W0(ae, T[(et + 28) >> 2], Ji, T[A >> 2]),
                                  (Zr = ap(A)),
                                  (Ht[(et + 27) | 0] = 1),
                                  (ae = A),
                                  (Ee = T[A >> 2]),
                                  (T[A >> 2] = 0),
                                  Ee &&
                                    (Jn[(tu(ae) + 4) | 0] && h2((Ee + 16) | 0),
                                    Ee && Ni(Ee))),
                                jv(Do, Uu((et + 8) | 0, Zr), (et + 27) | 0),
                                (ut = (et + 32) | 0),
                                (A = Yh(ta)),
                                (ut = (ge + 32) | 0),
                                ug((A = (A + 4) | 0), fi),
                                (T[(A + 20) >> 2] = T[(fi + 20) >> 2]),
                                (ae = T[(fi + 16) >> 2]),
                                (T[(A + 12) >> 2] = T[(fi + 12) >> 2]),
                                (T[(A + 16) >> 2] = ae),
                                ug((A + 24) | 0, (fi + 24) | 0),
                                (T[(V + 600) >> 2] = T[(C + 144) >> 2]),
                                Ws(zr, Yn),
                                (T[(V + 596) >> 2] = T[(V + 596) >> 2] + 1),
                                (A = dd((C + 128) | 0)),
                                (ae = T[(C + 144) >> 2]),
                                (et = T[(C + 140) >> 2]),
                                (ge = T[(C + 148) >> 2]),
                                (T[(C + 16) >> 2] = dd(Pi)),
                                (T[(C + 12) >> 2] = ge),
                                (T[(C + 8) >> 2] = et),
                                (T[(C + 4) >> 2] = ae),
                                (T[C >> 2] = A),
                                ps(V, 2676, C),
                                c_(fi),
                                (Bt = (Bt + 1) | 0),
                                rp(yt) >>> 0 > Bt >>> 0;

                            );
                          t2(Vr(zr), Hm(zr));
                        }
                      } else ps(V, 5038, 0);
                    } else ps(V, 4991, 0);
                    if ((ae = T[(j + 28) >> 2])) {
                      e: if ((A = T[ae >> 2])) {
                        for (Le = ae; ; ) {
                          if (T[(Le + 8) >> 2] != (0 | A)) {
                            if (
                              ((et = T[(A + 8) >> 2]),
                              Ni(A),
                              (T[Le >> 2] = et),
                              (A = et))
                            )
                              continue;
                            break e;
                          }
                          break;
                        }
                        T[(A + 4) >> 2] = 0;
                      }
                      (A = T[(ae + 16) >> 2]) && Ni(A), Ni(ae);
                    }
                    xl((j + 32) | 0), (ut = (C + 240) | 0);
                  },
                  updateDeviceInfo: function (A, C, V, j) {
                    (A |= 0), (C |= 0), (V = st(V)), (j = st(j));
                    var ae,
                      ge = 0;
                    (ae = Wa()),
                      ((0 | A) <= 0) | ((0 | C) <= 0) ||
                        ((T[(ae + 164) >> 2] = C),
                        (T[(ae + 160) >> 2] = A),
                        (T[(ae + 156) >> 2] = C),
                        (T[(ae + 152) >> 2] = A),
                        (ge = +V) > 2.01
                          ? (T[(ae + 208) >> 2] = 1073741824)
                          : ge < 0.01
                          ? (T[(ae + 208) >> 2] = 1065353216)
                          : (Dt[(ae + 208) >> 2] = V)),
                      j > st(0) && (Dt[(ae + 212) >> 2] = j);
                  },
                  updateMediaInfo: function (A, C, V) {
                    (A |= 0), (C |= 0), (V = +V);
                    var j,
                      ae,
                      ge,
                      Ee = 0,
                      Le = 0,
                      et = 0,
                      yt = 0,
                      Bt = 0;
                    if (
                      ((ut = ae = (ut - 96) | 0),
                      (j = Zv((ae + 56) | 0)),
                      (ge = Ia((ae + 40) | 0)),
                      (Kt[(j + 16) >> 3] = V),
                      (T[(j + 8) >> 2] = 0),
                      (T[(j + 12) >> 2] = -1074790400),
                      (T[j >> 2] = C),
                      (0 | C) > 0)
                    )
                      for (
                        ;
                        Ws(ge, ((Ee << 2) + A) | 0),
                          (0 | (Ee = (Ee + 1) | 0)) != (0 | C);

                      );
                    if (
                      (t2(Vr(ge), Hm(ge)),
                      (0 | (A = (j + 24) | 0)) != (0 | (C = ge)))
                    ) {
                      (ut = Ee = (ut - 16) | 0),
                        (et = ((yt = T[(C + 4) >> 2]) - (Le = T[C >> 2])) >> 2);
                      e: if (hd(A) >>> 0 >= et >>> 0) {
                        if (Ps(A) >>> 0 < et >>> 0) {
                          (T[(Ee + 12) >> 2] = Le),
                            (C = Ps(A)),
                            (T[(Ee + 12) >> 2] = T[(Ee + 12) >> 2] + (C << 2)),
                            t_(Le, T[(Ee + 12) >> 2], T[A >> 2]),
                            hg(A, T[(Ee + 12) >> 2], yt, (et - Ps(A)) | 0);
                          break e;
                        }
                        (C = t_(Le, yt, T[A >> 2])), Ps(A), n2(A, C), m_(A);
                      } else
                        T[(C = A) >> 2] &&
                          (ql(C),
                          (Bt = T[C >> 2]),
                          hd(C),
                          Ni(Bt),
                          (T[ws(C) >> 2] = 0),
                          (T[C >> 2] = 0),
                          (T[(C + 4) >> 2] = 0)),
                          r2(A, Fb(A, et)),
                          hg(A, Le, yt, et);
                      ut = (Ee + 16) | 0;
                    }
                    if (
                      ((C = Wa()),
                      (A = T[(j + 4) >> 2]),
                      (T[ae >> 2] = T[j >> 2]),
                      (T[(ae + 4) >> 2] = A),
                      (A = T[(j + 20) >> 2]),
                      (T[(ae + 16) >> 2] = T[(j + 16) >> 2]),
                      (T[(ae + 20) >> 2] = A),
                      (A = T[(j + 12) >> 2]),
                      (T[(ae + 8) >> 2] = T[(j + 8) >> 2]),
                      (T[(ae + 12) >> 2] = A),
                      (A = (j + 24) | 0),
                      (ut = Ee = ((ut = Bt = (ut - 16) | 0) - 16) | 0),
                      (T[(Le = et = (ae + 24) | 0) >> 2] = 0),
                      (T[(Le + 4) >> 2] = 0),
                      (T[(Ee + 12) >> 2] = 0),
                      __((Le + 8) | 0),
                      (ut = (Ee + 16) | 0),
                      (Ee = Ps(A)) &&
                        (r2(Le, Ee), hg(Le, T[A >> 2], T[(A + 4) >> 2], Ee)),
                      (Ee = 0),
                      (ut = Le = ((ut = (Bt + 16) | 0) - 16) | 0),
                      ps(C, 2527, 0),
                      (A = ae),
                      (Kt[(C + 464) >> 3] = Kt[(A + 8) >> 3]),
                      (Kt[(C + 472) >> 3] = Kt[(A + 16) >> 3]),
                      (T[(C + 456) >> 2] = T[A >> 2]),
                      ql((yt = (C + 480) | 0)),
                      Ps(et))
                    )
                      for (
                        ;
                        Ws(yt, r_(et, Ee)),
                          (T[Le >> 2] = T[r_(yt, Ee) >> 2]),
                          ps(C, 2523, Le),
                          (Ee = (Ee + 1) | 0),
                          Ps(et) >>> 0 > Ee >>> 0;

                      );
                    ps(C, 5230, 0),
                      (T[(C + 248) >> 2] = 0),
                      (T[(C + 252) >> 2] = 0),
                      (T[(C + 232) >> 2] = 0),
                      (T[(C + 236) >> 2] = 0),
                      (T[(C + 256) >> 2] = 0),
                      (T[(C + 260) >> 2] = 0),
                      (ut = (Le + 16) | 0),
                      y_(A),
                      Ld(ge),
                      y_(j),
                      (ut = (ae + 96) | 0);
                  },
                  updateBufferInfo: function (A, C, V, j, ae, ge) {
                    var Ee, Le;
                    (A = st(A)),
                      (C = st(C)),
                      (V = st(V)),
                      (j |= 0),
                      (ae |= 0),
                      (ge |= 0),
                      (ut = Ee = (ut - 144) | 0),
                      (Le = Wa()),
                      (T[(Ee + 140) >> 2] = ge),
                      (T[(Ee + 136) >> 2] = ae),
                      (T[(Ee + 112) >> 2] = -1082130432),
                      (T[(Ee + 116) >> 2] = -1082130432),
                      (Dt[(Ee + 108) >> 2] = V),
                      (Dt[(Ee + 104) >> 2] = C),
                      (j = vn(j, 8e3)),
                      (T[(Ee + 128) >> 2] = j),
                      (T[(Ee + 132) >> 2] = j >> 31),
                      (Dt[(Ee + 120) >> 2] = +st(Xt(A)) <= 1e-6 ? st(1) : A),
                      Ro((j = (Ee + 32) | 0), (Ee + 104) | 0, 40),
                      (A = Dt[(j + 16) >> 2]),
                      +st(Xt(A)) <= 1e-6 &&
                        ((T[(j + 16) >> 2] = 1065353216), (A = st(1))),
                      (Dt[(Le + 232) >> 2] = Dt[j >> 2]),
                      (Dt[(Le + 236) >> 2] = Dt[(j + 4) >> 2]),
                      (Dt[(Le + 76) >> 2] = Dt[(j + 8) >> 2]),
                      (C = Dt[(j + 12) >> 2]),
                      (Dt[(Le + 72) >> 2] = C),
                      (Kt[(Le + 296) >> 3] = st(C * Dt[(Le + 80) >> 2])),
                      (Kt[(Le + 280) >> 3] = st(C * Dt[(Le + 84) >> 2])),
                      (Kt[(Le + 288) >> 3] = st(C * Dt[(Le + 88) >> 2])),
                      (Kt[(Le + 384) >> 3] = (+C / 20) * 3),
                      (ae = T[(j + 28) >> 2]),
                      (T[(Le + 24) >> 2] = T[(j + 24) >> 2]),
                      (T[(Le + 28) >> 2] = ae),
                      (Dt[(Le + 192) >> 2] = A),
                      (T[(Le + 240) >> 2] = T[(j + 32) >> 2]),
                      (T[(Le + 244) >> 2] = T[(j + 36) >> 2]),
                      Wa(),
                      (T[(Ee + 80) >> 2] = -1),
                      (T[(Ee + 84) >> 2] = -1),
                      (T[(Ee + 8) >> 2] = -1),
                      (T[(Ee + 12) >> 2] = -1),
                      (j = T[(Ee + 92) >> 2]),
                      (T[(Ee + 16) >> 2] = T[(Ee + 88) >> 2]),
                      (T[(Ee + 20) >> 2] = j),
                      (j = T[(Ee + 100) >> 2]),
                      (T[(Ee + 24) >> 2] = T[(Ee + 96) >> 2]),
                      (T[(Ee + 28) >> 2] = j),
                      (T[(Ee + 72) >> 2] = -1),
                      (j = T[(Ee + 76) >> 2]),
                      (T[Ee >> 2] = T[(Ee + 72) >> 2]),
                      (T[(Ee + 4) >> 2] = j),
                      (ut = (Ee + 144) | 0);
                  },
                  getPredictedBitrate: function (A, C, V) {
                    (A |= 0), (C |= 0), (V |= 0);
                    var j,
                      ae = 0,
                      ge = 0,
                      Ee = 0,
                      Le = st(0),
                      et = 0,
                      yt = 0,
                      Bt = 0,
                      mn = 0,
                      Yn = 0,
                      zr = st(0),
                      Zr = st(0),
                      fi = st(0),
                      Pi = 0,
                      ta = st(0),
                      Ji = 0,
                      bo = 0,
                      Oo = st(0),
                      Do = st(0),
                      sl = 0,
                      vc = 0,
                      yh = st(0),
                      bg = 0,
                      _g = 0;
                    (j = Wa()),
                      (ae = hh()),
                      (T[(j + 676) >> 2] = 1),
                      (Ee = T[(j + 32) >> 2]),
                      (et =
                        (cn -
                          ((T[(j + 36) >> 2] + (Ee >>> 0 > ae >>> 0)) | 0)) |
                        0),
                      (T[(j + 8) >> 2] = ae - Ee),
                      (T[(j + 12) >> 2] = et);
                    e: {
                      t: {
                        n: switch ((C - 2) | 0) {
                          case 0:
                            C = Sl(j, A, 0);
                            break e;
                          case 1:
                            C = Sl(j, A, 1);
                            break e;
                          case 2:
                            C = Sl(j, A, 2);
                            break e;
                          case 4:
                            if (
                              ((C = 0),
                              (ut = ge = (ut - 160) | 0),
                              (V = T[(j + 36) >> 2]),
                              (!T[(j + 32) >> 2] & ((0 | V) <= 0)) |
                                ((0 | V) < 0))
                            )
                              C = A;
                            else {
                              (V = hh()),
                                (T[(j + 112) >> 2] = A),
                                (ae = T[(j + 32) >> 2]),
                                (Ee =
                                  (cn -
                                    ((T[(j + 36) >> 2] + (ae >>> 0 > V >>> 0)) |
                                      0)) |
                                  0),
                                (T[(j + 8) >> 2] = V - ae),
                                (T[(j + 12) >> 2] = Ee),
                                Fr(j, A),
                                Aa(j, 0),
                                (ae = V = T[(j + 12) >> 2]);
                              i: {
                                a: {
                                  if (
                                    (((0 | V) <= 0) &
                                      ((Ee = T[(j + 8) >> 2]) >>> 0 <= 1999)) |
                                    ((0 | V) < 0)
                                  ) {
                                    if (((V = A), !Ps((C = (j + 584) | 0))))
                                      break i;
                                    Ee = As(C, 0);
                                  } else {
                                    if (!ae & (Ee >>> 0 <= 3999)) {
                                      if (
                                        ((C = T[(j + 48) >> 2]),
                                        (Le = Dt[(j + 700) >> 2]),
                                        (Bt =
                                          (+st(Dt[(j + 696) >> 2] - Le) /
                                            (+(0 | Cl(j)) + 1) +
                                            +Le) *
                                          +(0 | C)),
                                        (ae =
                                          Xt(Bt) < 2147483648
                                            ? ~~Bt
                                            : -2147483648),
                                        (V = A),
                                        !Ps((et = (j + 584) | 0)))
                                      )
                                        break i;
                                      if (
                                        ((C = 0),
                                        (Ee = -1),
                                        (0 | ae) < T[As(et, 0) >> 2])
                                      )
                                        break a;
                                      for (;;) {
                                        if (
                                          ((Ee = T[As(et, C) >> 2]),
                                          (C = (C + 1) | 0),
                                          Ps(et) >>> 0 <= C >>> 0)
                                        )
                                          break a;
                                        if (!((0 | ae) >= T[As(et, C) >> 2]))
                                          break;
                                      }
                                      break a;
                                    }
                                    if (
                                      ((V = A),
                                      !(Kt[(j + 264) >> 3] > 4.5) ||
                                        ((V = A), T[(j + 240) >> 2]) ||
                                        ((V = A), T[(j + 244) >> 2]) ||
                                        ((V = A), T[(j + 552) >> 2] <= 0))
                                    )
                                      break i;
                                    for (
                                      V = (j + 584) | 0;
                                      (Ee = As(V, C)),
                                        (0 | (C = (C + 1) | 0)) <
                                          T[(j + 552) >> 2];

                                    );
                                  }
                                  Ee = T[Ee >> 2];
                                }
                                (V = A), (0 | Ee) != -1 && (V = Vo(j, Ee));
                              }
                              (C = T[(j + 556) >> 2]),
                                (Le = Dt[(j + 232) >> 2]),
                                (zr = Dt[(j + 720) >> 2]),
                                (Zr = Dt[(j + 236) >> 2]),
                                (fi = Dt[(j + 724) >> 2]),
                                (Bt = Kt[(j + 264) >> 3]),
                                (Ee = T[(j + 40) >> 2]),
                                (et = T[(j + 44) >> 2]),
                                (mn = T[(j + 24) >> 2]),
                                (yt = T[(j + 28) >> 2]),
                                (ta = Dt[(j + 192) >> 2]),
                                (Pi = T[(j + 8) >> 2]),
                                (Yn = T[(j + 12) >> 2]),
                                (Ji = T[(j + 48) >> 2]),
                                (bo = T[(j + 52) >> 2]),
                                (Oo = Dt[(j + 708) >> 2]),
                                (Do = Dt[(j + 712) >> 2]),
                                (sl = T[(j + 676) >> 2]),
                                (vc = T[(j + 684) >> 2]),
                                (yh = Dt[(j + 716) >> 2]),
                                (bg = T[(j + 692) >> 2]),
                                (_g = T[(j + 244) >> 2]),
                                (T[((ae = ge) + 140) >> 2] = T[(j + 240) >> 2]),
                                (T[(ae + 144) >> 2] = _g),
                                (T[(ae + 136) >> 2] = bg),
                                (Kt[(ae + 128) >> 3] = yh),
                                (T[(ae + 124) >> 2] = vc),
                                (T[(ae + 120) >> 2] = sl),
                                (Kt[(ae + 112) >> 3] = Do),
                                (Kt[(ae + 104) >> 3] = Oo),
                                (T[(ae + 100) >> 2] = 0),
                                (T[(ae + 96) >> 2] = C),
                                (T[(ae + 88) >> 2] = Ji),
                                (T[(ae + 92) >> 2] = bo),
                                (T[(ae + 80) >> 2] = Pi),
                                (T[(ae + 84) >> 2] = Yn),
                                (C = V),
                                (T[(ae + 76) >> 2] = V),
                                (T[(ae + 72) >> 2] = A),
                                (Kt[(ae - -64) >> 3] = ta),
                                (T[(ae + 56) >> 2] = mn),
                                (T[(ae + 60) >> 2] = yt),
                                (T[(ae + 48) >> 2] = Ee),
                                (T[(ae + 52) >> 2] = et),
                                (Kt[(ae + 40) >> 3] = Bt),
                                (Kt[(ae + 32) >> 3] = fi),
                                (Kt[(ae + 24) >> 3] = Zr),
                                (Kt[(ae + 16) >> 3] = zr),
                                (Kt[(ae + 8) >> 3] = Le),
                                (T[ae >> 2] = 0),
                                ps(j, 3800, ae),
                                (T[(j + 116) >> 2] = V),
                                (A = T[(j + 12) >> 2]),
                                (T[j >> 2] = T[(j + 8) >> 2]),
                                (T[(j + 4) >> 2] = A),
                                (Kt[(j + 248) >> 3] = Dt[(j + 232) >> 2]),
                                (Kt[(j + 256) >> 3] = Dt[(j + 236) >> 2]);
                            }
                            ut = (ge + 160) | 0;
                            break e;
                          case 5:
                            if ((0 | (C = Qi(j, A, V))) == -1) break t;
                            break e;
                          default:
                            break n;
                        }
                        if ((0 | (C = Qi(j, A, V))) != -1) break e;
                      }
                      if (
                        ((C = 0),
                        (ut = Ee = (ut - 224) | 0),
                        (V = T[(j + 36) >> 2]),
                        (!T[(j + 32) >> 2] & ((0 | V) <= 0)) | ((0 | V) < 0) ||
                          ((V = hh()),
                          (et = T[(j + 32) >> 2]),
                          (ae =
                            (cn -
                              ((T[(j + 36) >> 2] + (et >>> 0 > V >>> 0)) | 0)) |
                            0),
                          (V = (V - et) | 0),
                          (T[(j + 8) >> 2] = V),
                          (T[(j + 12) >> 2] = ae),
                          ((V >>> 0 < 4e3) & ((0 | ae) <= 0)) | ((0 | ae) < 0)))
                      )
                        C = A;
                      else {
                        (T[(j + 112) >> 2] = A), Fr(j, A), Aa(j, 0), (et = j);
                        t: {
                          n: if (T[(j + 676) >> 2]) {
                            i: {
                              if (!((Bt = Kt[(j + 264) >> 3]) < 2.5)) {
                                if (
                                  Bt > 6.5 &&
                                  ((V = T[(j + 52) >> 2]),
                                  !(
                                    ((Ut[(j + 48) >> 2] < 1001) &
                                      ((0 | V) <= 0)) |
                                    ((0 | V) < 0)
                                  ))
                                ) {
                                  if (((ae = A), T[(j + 552) >> 2] <= 0))
                                    break t;
                                  for (V = (j + 584) | 0; ; ) {
                                    if (T[As(V, C) >> 2] > (0 | A)) {
                                      ge = T[As(V, C) >> 2];
                                      break n;
                                    }
                                    if (
                                      !(
                                        (0 | (C = (C + 1) | 0)) <
                                        T[(j + 552) >> 2]
                                      )
                                    )
                                      break;
                                  }
                                  ae = A;
                                  break t;
                                }
                                if (
                                  ((V = Lo((C = (j + 652) | 0))),
                                  (Le = Dt[(j + 704) >> 2]),
                                  (T[(Ee + 208) >> 2] = T[(j + 132) >> 2]),
                                  (T[(Ee + 192) >> 2] = V),
                                  (Kt[(Ee + 200) >> 3] = Le),
                                  ps(j, 3746, (Ee + 192) | 0),
                                  (ae = A),
                                  Lo(C) >>> 0 < Ut[(j + 132) >> 2] ||
                                    ((ae = A),
                                    !((Le = Dt[(j + 704) >> 2]) >= st(0))) ||
                                    ((ae = A), !(Le < st(0.25))))
                                )
                                  break t;
                                ge = -1;
                                a: if (!(T[(j + 552) >> 2] <= 0))
                                  for (V = (j + 584) | 0, C = 0; ; ) {
                                    if (T[As(V, C) >> 2] > (0 | A)) {
                                      ge = T[As(V, C) >> 2];
                                      break a;
                                    }
                                    if (
                                      !(
                                        (0 | (C = (C + 1) | 0)) <
                                        T[(j + 552) >> 2]
                                      )
                                    )
                                      break;
                                  }
                                if ((0 | A) >= (0 | ge)) break n;
                                (C = hh()),
                                  (Bt = Kt[(j + 264) >> 3]),
                                  (Le = Dt[(j + 704) >> 2]),
                                  (V = T[(j + 44) >> 2]),
                                  (T[(Ee + 176) >> 2] = T[(j + 40) >> 2]),
                                  (T[(Ee + 180) >> 2] = V),
                                  (Kt[(Ee + 184) >> 3] = Le),
                                  (Kt[(Ee + 168) >> 3] = Bt),
                                  (T[(Ee + 160) >> 2] = C),
                                  (T[(Ee + 164) >> 2] = cn),
                                  ps(j, 5120, (Ee + 160) | 0);
                                break n;
                              }
                              if (
                                ((C = T[(j + 48) >> 2]),
                                (Le = Dt[(j + 700) >> 2]),
                                (Bt =
                                  (+st(Dt[(j + 696) >> 2] - Le) /
                                    (+(0 | Cl(j)) + 1) +
                                    +Le) *
                                  +(0 | C)),
                                (ae = Xt(Bt) < 2147483648 ? ~~Bt : -2147483648),
                                (C = A),
                                (V = A),
                                !(T[(j + 552) >> 2] <= 0))
                              ) {
                                mn = ae;
                                a: {
                                  if (
                                    (0 | ae) >=
                                    T[As((yt = (j + 584) | 0), 0) >> 2]
                                  )
                                    for (;;) {
                                      if (
                                        ((C = T[As(yt, ge) >> 2]),
                                        (0 | (ae = (ge + 1) | 0)) >=
                                          (0 | (ge = T[(j + 552) >> 2])))
                                      )
                                        break a;
                                      if (
                                        ((ge = ae),
                                        !((0 | mn) >= T[As(yt, ae) >> 2]))
                                      )
                                        break;
                                    }
                                  ge = T[(j + 552) >> 2];
                                }
                                if (
                                  !(
                                    (0 | ge) <= 0 ||
                                    ((ge = 0), T[As(yt, 0) >> 2] >= (0 | A))
                                  )
                                )
                                  for (;;) {
                                    if (
                                      ((V = T[As(yt, ge) >> 2]),
                                      (0 | (ge = (ge + 1) | 0)) >=
                                        T[(j + 552) >> 2])
                                    )
                                      break i;
                                    if (!(T[As(yt, ge) >> 2] < (0 | A))) break;
                                  }
                              }
                            }
                            if (
                              ((ae = A),
                              (0 | (ge = (0 | C) < (0 | V) ? C : V)) > (0 | A))
                            )
                              break t;
                          } else ge = T[(j + 116) >> 2];
                          (ae = A), (0 | ge) != -1 && (ae = Vo(j, ge));
                        }
                        if (
                          ((mn = 0),
                          (ut = ge = (ut - 16) | 0),
                          !((0 | (V = ae)) <= (0 | A)) &&
                            Lo((yt = (et + 628) | 0)))
                        ) {
                          (C = A), zm((ae = (ge + 8) | 0), yt), lp(ge, yt);
                          t: if (fh(ae, ge))
                            for (Pi = (ae = C) >> 31; ; ) {
                              if (
                                ((Yn = jb((ge + 8) | 0)),
                                ((0 | ae) != T[Yn >> 2]) |
                                  ((0 | Pi) != T[(Yn + 4) >> 2]))
                              )
                                break t;
                              if (
                                (v_((Yn = (ge + 8) | 0)),
                                lp(ge, yt),
                                (mn = (mn + 1) | 0),
                                !fh(Yn, ge))
                              )
                                break;
                            }
                          V = T[(et + 680) >> 2] > (0 | mn) ? C : V;
                        }
                        (ut = (ge + 16) | 0), (C = V);
                        t: {
                          if ((0 | V) > (0 | A)) {
                            if (!(T[(j + 240) >> 2] | T[(j + 244) >> 2]))
                              break t;
                            ps(j, 2403, 0);
                          } else {
                            if (!T[(j + 244) >> 2] | ((0 | A) <= (0 | C)))
                              break t;
                            ps(j, 2467, 0);
                          }
                          C = A;
                        }
                        (ae = T[(j + 556) >> 2]),
                          (Le = Dt[(j + 232) >> 2]),
                          (zr = Dt[(j + 720) >> 2]),
                          (Zr = Dt[(j + 236) >> 2]),
                          (fi = Dt[(j + 724) >> 2]),
                          (Bt = Kt[(j + 264) >> 3]),
                          (ge = T[(j + 40) >> 2]),
                          (et = T[(j + 44) >> 2]),
                          (mn = T[(j + 24) >> 2]),
                          (yt = T[(j + 28) >> 2]),
                          (ta = Dt[(j + 192) >> 2]),
                          (Pi = T[(j + 8) >> 2]),
                          (Yn = T[(j + 12) >> 2]),
                          (Ji = T[(j + 48) >> 2]),
                          (bo = T[(j + 52) >> 2]),
                          (Oo = Dt[(j + 708) >> 2]),
                          (Do = Dt[(j + 712) >> 2]),
                          (sl = T[(j + 676) >> 2]),
                          (vc = T[(j + 684) >> 2]),
                          (yh = Dt[(j + 716) >> 2]),
                          (bg = T[(j + 692) >> 2]),
                          (_g = T[(j + 244) >> 2]),
                          (T[((V = Ee) + 140) >> 2] = T[(j + 240) >> 2]),
                          (T[(V + 144) >> 2] = _g),
                          (T[(V + 136) >> 2] = bg),
                          (Kt[(V + 128) >> 3] = yh),
                          (T[(V + 124) >> 2] = vc),
                          (T[(V + 120) >> 2] = sl),
                          (Kt[(V + 112) >> 3] = Do),
                          (Kt[(V + 104) >> 3] = Oo),
                          (T[(V + 100) >> 2] = 0),
                          (T[(V + 96) >> 2] = ae),
                          (T[(V + 88) >> 2] = Ji),
                          (T[(V + 92) >> 2] = bo),
                          (T[(V + 80) >> 2] = Pi),
                          (T[(V + 84) >> 2] = Yn),
                          (T[(V + 76) >> 2] = C),
                          (T[(V + 72) >> 2] = A),
                          (Kt[(V - -64) >> 3] = ta),
                          (T[(V + 56) >> 2] = mn),
                          (T[(V + 60) >> 2] = yt),
                          (T[(V + 48) >> 2] = ge),
                          (T[(V + 52) >> 2] = et),
                          (Kt[(V + 40) >> 3] = Bt),
                          (Kt[(V + 32) >> 3] = fi),
                          (Kt[(V + 24) >> 3] = Zr),
                          (Kt[(V + 16) >> 3] = zr),
                          (Kt[(V + 8) >> 3] = Le),
                          (T[V >> 2] = 0),
                          ps(j, 4310, V),
                          (T[(j + 116) >> 2] = C),
                          (A = T[(j + 12) >> 2]),
                          (T[j >> 2] = T[(j + 8) >> 2]),
                          (T[(j + 4) >> 2] = A),
                          (Kt[(j + 248) >> 3] = Dt[(j + 232) >> 2]),
                          (Kt[(j + 256) >> 3] = Dt[(j + 236) >> 2]);
                      }
                      ut = (Ee + 224) | 0;
                    }
                    return (
                      (A = Wa()),
                      (Le = st(
                        +Ut[(A + 48) >> 2] + 4294967296 * +T[(A + 52) >> 2]
                      )),
                      (zr = Dt[(Wa() + 216) >> 2]),
                      (Zr = Dt[(Wa() + 220) >> 2]),
                      (fi = st(Dt[(Wa() + 224) >> 2] * st(100))),
                      (V = st(Xt(fi)) < st(2147483648) ? ~~fi : -2147483648),
                      (fi = Dt[(Wa() + 228) >> 2]),
                      (A = Fc(24)),
                      (T[(A + 16) >> 2] = V),
                      (V = A),
                      (Zr = st(Zr * st(100))),
                      (ae = st(Xt(Zr)) < st(2147483648) ? ~~Zr : -2147483648),
                      (T[(V + 12) >> 2] = ae),
                      (V = A),
                      (zr = st(zr * st(100))),
                      (ae = st(Xt(zr)) < st(2147483648) ? ~~zr : -2147483648),
                      (T[(V + 8) >> 2] = ae),
                      (V = A),
                      (ae = st(Xt(Le)) < st(2147483648) ? ~~Le : -2147483648),
                      (T[(V + 4) >> 2] = ae),
                      (T[A >> 2] = C),
                      (C = A),
                      (Le = st(fi * st(100))),
                      (V = st(Xt(Le)) < st(2147483648) ? ~~Le : -2147483648),
                      (T[(C + 20) >> 2] = V),
                      0 | A
                    );
                  },
                  __indirect_function_table: Ao,
                  __errno_location: function () {
                    return 9764;
                  },
                  fflush: function A(C) {
                    var V = 0;
                    if ((C |= 0)) return T[(C + 76) >> 2], 0 | Ob(C);
                    if ((T[2252] && (V = A(T[2252])), (C = T[2776])))
                      for (
                        ;
                        Ut[(C + 20) >> 2] > Ut[(C + 28) >> 2] &&
                          (V = Ob(C) | V),
                          (C = T[(C + 56) >> 2]);

                      );
                    return 0 | V;
                  },
                  stackSave: function () {
                    return 0 | ut;
                  },
                  stackRestore: function (A) {
                    ut = A |= 0;
                  },
                  stackAlloc: function (A) {
                    return (ut = A = (ut - (A |= 0)) & -16), 0 | A;
                  },
                  emscripten_stack_init: function () {
                    Si = 11616;
                  },
                  emscripten_stack_get_free: function () {
                    return (ut - Si) | 0;
                  },
                  emscripten_stack_get_end: function () {
                    return 0 | Si;
                  },
                  dynCall_jiji: function (A, C, V, j, ae) {
                    return (
                      (C |= 0),
                      (V |= 0),
                      (j |= 0),
                      (ae |= 0),
                      (A = 0 | Ao[0 | (A |= 0)](C, V, j, ae)),
                      gr(0 | cn),
                      0 | A
                    );
                  },
                };
              })(on);
            })(Et);
          },
          instantiate: function (En, Zn) {
            return {
              then: function (on) {
                var rn = new b.Module(En);
                return (
                  on({ instance: new b.Instance(rn) }),
                  { catch: function () {} }
                );
              },
            };
          },
          RuntimeError: Error,
        };
      (g = []), t8(b) !== "object" && He("no native wasm support detected");
      var w = !1;
      function k(En, Zn) {
        En || He("Assertion failed: " + Zn);
      }
      function D(En, Zn, on, rn, It) {
        var wt = {
            string: function (ar) {
              var ye = 0;
              if (ar != null && ar !== 0) {
                var Gn = 1 + (ar.length << 2);
                (function (Ht, yr, T) {
                  k(
                    typeof T == "number",
                    "stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"
                  ),
                    (function (Jn, pr, Ut, Dt) {
                      if (!(Dt > 0)) return 0;
                      for (
                        var Kt = Ut, vn = Ut + Dt - 1, st = 0;
                        st < Jn.length;
                        ++st
                      ) {
                        var Xt = Jn.charCodeAt(st);
                        if (
                          (Xt >= 55296 &&
                            Xt <= 57343 &&
                            (Xt =
                              (65536 + ((1023 & Xt) << 10)) |
                              (1023 & Jn.charCodeAt(++st))),
                          Xt <= 127)
                        ) {
                          if (Ut >= vn) break;
                          pr[Ut++] = Xt;
                        } else if (Xt <= 2047) {
                          if (Ut + 1 >= vn) break;
                          (pr[Ut++] = 192 | (Xt >> 6)),
                            (pr[Ut++] = 128 | (63 & Xt));
                        } else if (Xt <= 65535) {
                          if (Ut + 2 >= vn) break;
                          (pr[Ut++] = 224 | (Xt >> 12)),
                            (pr[Ut++] = 128 | ((Xt >> 6) & 63)),
                            (pr[Ut++] = 128 | (63 & Xt));
                        } else {
                          if (Ut + 3 >= vn) break;
                          Xt > 1114111 &&
                            p(
                              "Invalid Unicode code point 0x" +
                                Xt.toString(16) +
                                " encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF)."
                            ),
                            (pr[Ut++] = 240 | (Xt >> 18)),
                            (pr[Ut++] = 128 | ((Xt >> 12) & 63)),
                            (pr[Ut++] = 128 | ((Xt >> 6) & 63)),
                            (pr[Ut++] = 128 | (63 & Xt));
                        }
                      }
                      pr[Ut] = 0;
                    })(Ht, P, yr, T);
                })(ar, (ye = Ln(Gn)), Gn);
              }
              return ye;
            },
            array: function (ar) {
              var ye = Ln(ar.length);
              return E(ar, ye), ye;
            },
          },
          Mt = (function (ar) {
            var ye = i["_" + ar];
            return (
              k(
                ye,
                "Cannot call unknown function " +
                  ar +
                  ", make sure it is exported"
              ),
              ye
            );
          })(En),
          Wt = [],
          Ft = 0;
        if ((k(Zn !== "array", 'Return type should not be "array".'), rn))
          for (var un = 0; un < rn.length; un++) {
            var Yt = wt[on[un]];
            Yt
              ? (Ft === 0 && (Ft = Lt()), (Wt[un] = Yt(rn[un])))
              : (Wt[un] = rn[un]);
          }
        var Qt,
          Sn = Mt.apply(null, Wt);
        return (
          (Qt = Sn),
          Ft !== 0 && ln(Ft),
          (Sn = (function (ar) {
            return Zn === "string" ? H(ar) : Zn === "boolean" ? !!ar : ar;
          })(Qt)),
          Sn
        );
      }
      var $,
        N,
        P,
        I,
        O,
        X = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
      function G(En, Zn, on) {
        for (var rn = Zn + on, It = Zn; En[It] && !(It >= rn); ) ++It;
        if (It - Zn > 16 && En.subarray && X)
          return X.decode(En.subarray(Zn, It));
        for (var wt = ""; Zn < It; ) {
          var Mt = En[Zn++];
          if (128 & Mt) {
            var Wt = 63 & En[Zn++];
            if ((224 & Mt) != 192) {
              var Ft = 63 & En[Zn++];
              if (
                ((240 & Mt) == 224
                  ? (Mt = ((15 & Mt) << 12) | (Wt << 6) | Ft)
                  : ((248 & Mt) != 240 &&
                      p(
                        "Invalid UTF-8 leading byte 0x" +
                          Mt.toString(16) +
                          " encountered when deserializing a UTF-8 string in wasm memory to a JS string!"
                      ),
                    (Mt =
                      ((7 & Mt) << 18) |
                      (Wt << 12) |
                      (Ft << 6) |
                      (63 & En[Zn++]))),
                Mt < 65536)
              )
                wt += String.fromCharCode(Mt);
              else {
                var un = Mt - 65536;
                wt += String.fromCharCode(
                  55296 | (un >> 10),
                  56320 | (1023 & un)
                );
              }
            } else wt += String.fromCharCode(((31 & Mt) << 6) | Wt);
          } else wt += String.fromCharCode(Mt);
        }
        return wt;
      }
      function H(En, Zn) {
        return En ? G(P, En, Zn) : "";
      }
      function E(En, Zn) {
        k(
          En.length >= 0,
          "writeArrayToMemory array must have a length (should be an array or typed array)"
        ),
          N.set(En, Zn);
      }
      typeof TextDecoder < "u" && new TextDecoder("utf-16le");
      var S = 5242880;
      i.TOTAL_STACK &&
        k(
          S === i.TOTAL_STACK,
          "the stack size can no longer be determined at runtime"
        );
      var L,
        W,
        F = i.INITIAL_MEMORY || 16777216;
      function oe() {
        var En = hi();
        k((3 & En) == 0),
          (I[(En + 4) >> 2] = 34821223),
          (I[(En + 8) >> 2] = 2310721022),
          (I[0] = 1668509029);
      }
      function De() {
        if (!w) {
          var En = hi(),
            Zn = O[(En + 4) >> 2],
            on = O[(En + 8) >> 2];
          (Zn == 34821223 && on == 2310721022) ||
            He(
              "Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x" +
                on.toString(16) +
                " " +
                Zn.toString(16)
            ),
            I[0] !== 1668509029 &&
              He(
                "Runtime error: The application has corrupted its heap memory area (address zero)!"
              );
        }
      }
      Object.getOwnPropertyDescriptor(i, "INITIAL_MEMORY") ||
        Object.defineProperty(i, "INITIAL_MEMORY", {
          configurable: !0,
          get: function () {
            He(
              "Module.INITIAL_MEMORY has been replaced with plain INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)"
            );
          },
        }),
        k(
          F >= S,
          "INITIAL_MEMORY should be larger than TOTAL_STACK, was " +
            F +
            "! (TOTAL_STACK=" +
            S +
            ")"
        ),
        k(
          typeof Int32Array < "u" &&
            typeof Float64Array < "u" &&
            Int32Array.prototype.subarray !== void 0 &&
            Int32Array.prototype.set !== void 0,
          "JS engine does not provide full typed array support"
        ),
        (v = i.wasmMemory
          ? i.wasmMemory
          : new b.Memory({ initial: F / 65536, maximum: F / 65536 })) &&
          ($ = v.buffer),
        k((F = $.byteLength) % 65536 == 0),
        ($ = L = $),
        (i.HEAP8 = N = new Int8Array(L)),
        (i.HEAP16 = new Int16Array(L)),
        (i.HEAP32 = I = new Int32Array(L)),
        (i.HEAPU8 = P = new Uint8Array(L)),
        (i.HEAPU16 = new Uint16Array(L)),
        (i.HEAPU32 = O = new Uint32Array(L)),
        (i.HEAPF32 = new Float32Array(L)),
        (i.HEAPF64 = new Float64Array(L)),
        (function () {
          var En = new Int16Array(1),
            Zn = new Int8Array(En.buffer);
          if (((En[0] = 25459), Zn[0] !== 115 || Zn[1] !== 99))
            throw "Runtime error: expected the system to be little-endian! (Run with -s SUPPORT_BIG_ENDIAN=1 to bypass)";
        })();
      var Xe = [],
        ze = [],
        ht = [],
        gt = !1;
      k(
        Math.imul,
        "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
      ),
        k(
          Math.fround,
          "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
        ),
        k(
          Math.clz32,
          "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
        ),
        k(
          Math.trunc,
          "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
        );
      var pt = 0,
        $t = null,
        ot = null,
        tt = {};
      function He(En) {
        i.onAbort && i.onAbort(En), f((En = "Aborted(" + En + ")")), (w = !0);
        var Zn = new b.RuntimeError(En);
        throw (r(Zn), Zn);
      }
      (i.preloadedImages = {}), (i.preloadedAudios = {});
      var de = {
        error: function () {
          He(
            "Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with  -s FORCE_FILESYSTEM=1"
          );
        },
        init: function () {
          de.error();
        },
        createDataFile: function () {
          de.error();
        },
        createPreloadedFile: function () {
          de.error();
        },
        createLazyFile: function () {
          de.error();
        },
        open: function () {
          de.error();
        },
        mkdev: function () {
          de.error();
        },
        registerDevice: function () {
          de.error();
        },
        analyzePath: function () {
          de.error();
        },
        loadFilesFromDB: function () {
          de.error();
        },
        ErrnoError: function () {
          de.error();
        },
      };
      (i.FS_createDataFile = de.createDataFile),
        (i.FS_createPreloadedFile = de.createPreloadedFile);
      var ue,
        Z,
        ie = "data:application/octet-stream;base64,";
      function Ne(En) {
        return En.startsWith(ie);
      }
      function Pe(En, Zn) {
        return function () {
          var on = En,
            rn = Zn;
          return (
            Zn || (rn = i.asm),
            k(
              gt,
              "native function `" +
                on +
                "` called before runtime initialization"
            ),
            k(
              !0,
              "native function `" +
                on +
                "` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            rn[En] ||
              k(rn[En], "exported native function `" + on + "` not found"),
            rn[En].apply(null, arguments)
          );
        };
      }
      function kt(En) {
        try {
          if (En == ue && g) return new Uint8Array(g);
          var Zn = (function (on) {
            if (Ne(on))
              return (function (rn) {
                try {
                  for (
                    var It = lt(rn), wt = new Uint8Array(It.length), Mt = 0;
                    Mt < It.length;
                    ++Mt
                  )
                    wt[Mt] = It.charCodeAt(Mt);
                  return wt;
                } catch {
                  throw new Error("Converting base64 string to bytes failed.");
                }
              })(on.slice(ie.length));
          })(En);
          if (Zn) return Zn;
          if (!c) throw "both async and sync fetching of the wasm failed";
        } catch (on) {
          He(on);
        }
      }
      function Gt(En) {
        for (; En.length > 0; ) {
          var Zn = En.shift();
          if (typeof Zn != "function") {
            var on = Zn.func;
            typeof on == "number"
              ? Zn.arg === void 0
                ? B(on)()
                : B(on)(Zn.arg)
              : on(Zn.arg === void 0 ? null : Zn.arg);
          } else Zn(i);
        }
      }
      function B(En) {
        return W.get(En);
      }
      function re(En) {
        (this.excPtr = En),
          (this.ptr = En - 16),
          (this.set_type = function (Zn) {
            I[(this.ptr + 4) >> 2] = Zn;
          }),
          (this.get_type = function () {
            return I[(this.ptr + 4) >> 2];
          }),
          (this.set_destructor = function (Zn) {
            I[(this.ptr + 8) >> 2] = Zn;
          }),
          (this.get_destructor = function () {
            return I[(this.ptr + 8) >> 2];
          }),
          (this.set_refcount = function (Zn) {
            I[this.ptr >> 2] = Zn;
          }),
          (this.set_caught = function (Zn) {
            (Zn = Zn ? 1 : 0), (N[(this.ptr + 12) >> 0] = Zn);
          }),
          (this.get_caught = function () {
            return N[(this.ptr + 12) >> 0] != 0;
          }),
          (this.set_rethrown = function (Zn) {
            (Zn = Zn ? 1 : 0), (N[(this.ptr + 13) >> 0] = Zn);
          }),
          (this.get_rethrown = function () {
            return N[(this.ptr + 13) >> 0] != 0;
          }),
          (this.init = function (Zn, on) {
            this.set_type(Zn),
              this.set_destructor(on),
              this.set_refcount(0),
              this.set_caught(!1),
              this.set_rethrown(!1);
          }),
          (this.add_ref = function () {
            var Zn = I[this.ptr >> 2];
            I[this.ptr >> 2] = Zn + 1;
          }),
          (this.release_ref = function () {
            var Zn = I[this.ptr >> 2];
            return (I[this.ptr >> 2] = Zn - 1), k(Zn > 0), Zn === 1;
          });
      }
      Ne((ue = "<<< WASM_BINARY_FILE >>>")) ||
        ((Z = ue), (ue = i.locateFile ? i.locateFile(Z, d) : d + Z));
      var Ae = {
          mappings: {},
          buffers: [null, [], []],
          printChar: function (En, Zn) {
            var on = Ae.buffers[En];
            k(on),
              Zn === 0 || Zn === 10
                ? ((En === 1 ? h : f)(G(on, 0)), (on.length = 0))
                : on.push(Zn);
          },
          varargs: void 0,
          get: function () {
            return (
              k(Ae.varargs != null), (Ae.varargs += 4), I[(Ae.varargs - 4) >> 2]
            );
          },
          getStr: function (En) {
            return H(En);
          },
          get64: function (En, Zn) {
            return k(En >= 0 ? Zn === 0 : Zn === -1), En;
          },
        },
        lt =
          typeof atob == "function"
            ? atob
            : function (En) {
                var Zn,
                  on,
                  rn,
                  It,
                  wt,
                  Mt,
                  Wt =
                    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
                  Ft = "",
                  un = 0;
                En = En.replace(/[^A-Za-z0-9\+\/\=]/g, "");
                do
                  (Zn =
                    (Wt.indexOf(En.charAt(un++)) << 2) |
                    ((It = Wt.indexOf(En.charAt(un++))) >> 4)),
                    (on =
                      ((15 & It) << 4) |
                      ((wt = Wt.indexOf(En.charAt(un++))) >> 2)),
                    (rn = ((3 & wt) << 6) | (Mt = Wt.indexOf(En.charAt(un++)))),
                    (Ft += String.fromCharCode(Zn)),
                    wt !== 64 && (Ft += String.fromCharCode(on)),
                    Mt !== 64 && (Ft += String.fromCharCode(rn));
                while (un < En.length);
                return Ft;
              },
        Et = {
          __assert_fail: function (En, Zn, on, rn) {
            He(
              "Assertion failed: " +
                H(En) +
                ", at: " +
                [
                  Zn ? H(Zn) : "unknown filename",
                  on,
                  rn ? H(rn) : "unknown function",
                ]
            );
          },
          __cxa_allocate_exception: function (En) {
            return St(En + 16) + 16;
          },
          __cxa_atexit: function (En, Zn) {},
          __cxa_throw: function (En, Zn, on) {
            throw (
              (new re(En).init(Zn, on),
              En +
                " - Exception catching is disabled, this exception cannot be caught. Compile with -s NO_DISABLE_EXCEPTION_CATCHING or -s EXCEPTION_CATCHING_ALLOWED=[..] to catch.")
            );
          },
          abort: function () {
            He("native code called abort()");
          },
          emscripten_memcpy_big: function (En, Zn, on) {
            P.copyWithin(En, Zn, Zn + on);
          },
          emscripten_resize_heap: function (En) {
            P.length,
              (function (Zn) {
                He(
                  "Cannot enlarge memory arrays to size " +
                    Zn +
                    " bytes (OOM). Either (1) compile with  -s INITIAL_MEMORY=X  with X higher than the current value " +
                    N.length +
                    ", (2) compile with  -s ALLOW_MEMORY_GROWTH=1  which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with  -s ABORTING_MALLOC=0 "
                );
              })((En >>>= 0));
          },
          fd_write: function (En, Zn, on, rn) {
            for (var It = 0, wt = 0; wt < on; wt++) {
              var Mt = I[Zn >> 2],
                Wt = I[(Zn + 4) >> 2];
              Zn += 8;
              for (var Ft = 0; Ft < Wt; Ft++) Ae.printChar(En, P[Mt + Ft]);
              It += Wt;
            }
            return (I[rn >> 2] = It), 0;
          },
          getTempRet0: function () {
            return y;
          },
          gettimeofday: function (En) {
            var Zn = Date.now();
            return (
              (I[En >> 2] = (Zn / 1e3) | 0),
              (I[(En + 4) >> 2] = ((Zn % 1e3) * 1e3) | 0),
              0
            );
          },
          memory: v,
          setTempRet0: function (En) {
            y = En;
          },
        };
      (function () {
        var En,
          Zn = { env: Et, wasi_snapshot_preview1: Et };
        function on(Mt, Wt) {
          var Ft,
            un = Mt.exports;
          (i.asm = un),
            k(
              (W = i.asm.__indirect_function_table),
              "table not found in wasm exports"
            ),
            (Ft = i.asm.__wasm_call_ctors),
            ze.unshift(Ft),
            (function (Yt) {
              if (
                (pt--,
                i.monitorRunDependencies && i.monitorRunDependencies(pt),
                Yt
                  ? (k(tt[Yt]), delete tt[Yt])
                  : f("warning: run dependency removed without ID"),
                pt == 0 &&
                  ($t !== null && (clearInterval($t), ($t = null)), ot))
              ) {
                var Qt = ot;
                (ot = null), Qt();
              }
            })("wasm-instantiate");
        }
        (En = "wasm-instantiate"),
          pt++,
          i.monitorRunDependencies && i.monitorRunDependencies(pt),
          En
            ? (k(!tt[En]),
              (tt[En] = 1),
              $t === null &&
                typeof setInterval < "u" &&
                ($t = setInterval(function () {
                  if (w) return clearInterval($t), void ($t = null);
                  var Mt = !1;
                  for (var Wt in tt)
                    Mt || ((Mt = !0), f("still waiting on run dependencies:")),
                      f("dependency: " + Wt);
                  Mt && f("(end of list)");
                }, 1e4)))
            : f("warning: run dependency added without ID");
        var rn = i;
        function It(Mt) {
          k(
            i === rn,
            "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"
          ),
            (rn = null),
            on(Mt.instance);
        }
        function wt(Mt) {
          return (
            !g && u && typeof fetch == "function"
              ? fetch(ue, { credentials: "same-origin" })
                  .then(function (Wt) {
                    if (!Wt.ok)
                      throw "failed to load wasm binary file at '" + ue + "'";
                    return Wt.arrayBuffer();
                  })
                  .catch(function () {
                    return kt(ue);
                  })
              : Promise.resolve().then(function () {
                  return kt(ue);
                })
          )
            .then(function (Wt) {
              return b.instantiate(Wt, Zn);
            })
            .then(function (Wt) {
              return Wt;
            })
            .then(Mt, function (Wt) {
              f("failed to asynchronously prepare wasm: " + Wt),
                ue.startsWith("file://") &&
                  f(
                    "warning: Loading from a file URI (" +
                      ue +
                      ") is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing"
                  ),
                He(Wt);
            });
        }
        if (i.instantiateWasm)
          try {
            return i.instantiateWasm(Zn, on);
          } catch (Mt) {
            return (
              f("Module.instantiateWasm callback failed with error: " + Mt), !1
            );
          }
        (g ||
        typeof b.instantiateStreaming != "function" ||
        Ne(ue) ||
        typeof fetch != "function"
          ? wt(It)
          : fetch(ue, { credentials: "same-origin" }).then(function (Mt) {
              return b.instantiateStreaming(Mt, Zn).then(It, function (Wt) {
                return (
                  f("wasm streaming compile failed: " + Wt),
                  f("falling back to ArrayBuffer instantiation"),
                  wt(It)
                );
              });
            })
        ).catch(r);
      })(),
        (i.___wasm_call_ctors = Pe("__wasm_call_ctors"));
      var St = (i._malloc = Pe("malloc"));
      (i._updateSwitchInfo = Pe("updateSwitchInfo")),
        (i._parseMPD = Pe("parseMPD")),
        (i._updateDeviceInfo = Pe("updateDeviceInfo")),
        (i._updateMediaInfo = Pe("updateMediaInfo")),
        (i._updateBufferInfo = Pe("updateBufferInfo")),
        (i._getPredictedBitrate = Pe("getPredictedBitrate")),
        (i.___errno_location = Pe("__errno_location")),
        (i._fflush = Pe("fflush"));
      var Lt = (i.stackSave = Pe("stackSave")),
        ln = (i.stackRestore = Pe("stackRestore")),
        Ln = (i.stackAlloc = Pe("stackAlloc")),
        Tr = (i._emscripten_stack_init = function () {
          return (Tr = i._emscripten_stack_init =
            i.asm.emscripten_stack_init).apply(null, arguments);
        });
      i._emscripten_stack_get_free = function () {
        return (i._emscripten_stack_get_free =
          i.asm.emscripten_stack_get_free).apply(null, arguments);
      };
      var sr,
        hi = (i._emscripten_stack_get_end = function () {
          return (hi = i._emscripten_stack_get_end =
            i.asm.emscripten_stack_get_end).apply(null, arguments);
        });
      function Ra(En) {
        function Zn() {
          sr ||
            ((sr = !0),
            (i.calledRun = !0),
            w ||
              (De(),
              k(!gt),
              (gt = !0),
              Gt(ze),
              n(i),
              i.onRuntimeInitialized && i.onRuntimeInitialized(),
              k(
                !i._main,
                'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'
              ),
              (function () {
                if ((De(), i.postRun))
                  for (
                    typeof i.postRun == "function" && (i.postRun = [i.postRun]);
                    i.postRun.length;

                  )
                    (on = i.postRun.shift()), ht.unshift(on);
                var on;
                Gt(ht);
              })()));
        }
        pt > 0 ||
          (Tr(),
          oe(),
          (function () {
            if (i.preRun)
              for (
                typeof i.preRun == "function" && (i.preRun = [i.preRun]);
                i.preRun.length;

              )
                (on = i.preRun.shift()), Xe.unshift(on);
            var on;
            Gt(Xe);
          })(),
          pt > 0 ||
            (i.setStatus
              ? (i.setStatus("Running..."),
                setTimeout(function () {
                  setTimeout(function () {
                    i.setStatus("");
                  }, 1),
                    Zn();
                }, 1))
              : Zn(),
            De()));
      }
      if (
        ((i.dynCall_jiji = Pe("dynCall_jiji")),
        Object.getOwnPropertyDescriptor(i, "intArrayFromString") ||
          (i.intArrayFromString = function () {
            He(
              "'intArrayFromString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "intArrayToString") ||
          (i.intArrayToString = function () {
            He(
              "'intArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (i.ccall = D),
        (i.cwrap = function (En, Zn, on, rn) {
          return function () {
            return D(En, Zn, on, arguments);
          };
        }),
        Object.getOwnPropertyDescriptor(i, "setValue") ||
          (i.setValue = function () {
            He(
              "'setValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getValue") ||
          (i.getValue = function () {
            He(
              "'getValue' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "allocate") ||
          (i.allocate = function () {
            He(
              "'allocate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "UTF8ArrayToString") ||
          (i.UTF8ArrayToString = function () {
            He(
              "'UTF8ArrayToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "UTF8ToString") ||
          (i.UTF8ToString = function () {
            He(
              "'UTF8ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stringToUTF8Array") ||
          (i.stringToUTF8Array = function () {
            He(
              "'stringToUTF8Array' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stringToUTF8") ||
          (i.stringToUTF8 = function () {
            He(
              "'stringToUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "lengthBytesUTF8") ||
          (i.lengthBytesUTF8 = function () {
            He(
              "'lengthBytesUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stackTrace") ||
          (i.stackTrace = function () {
            He(
              "'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "addOnPreRun") ||
          (i.addOnPreRun = function () {
            He(
              "'addOnPreRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "addOnInit") ||
          (i.addOnInit = function () {
            He(
              "'addOnInit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "addOnPreMain") ||
          (i.addOnPreMain = function () {
            He(
              "'addOnPreMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "addOnExit") ||
          (i.addOnExit = function () {
            He(
              "'addOnExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "addOnPostRun") ||
          (i.addOnPostRun = function () {
            He(
              "'addOnPostRun' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeStringToMemory") ||
          (i.writeStringToMemory = function () {
            He(
              "'writeStringToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (i.writeArrayToMemory = E),
        Object.getOwnPropertyDescriptor(i, "writeAsciiToMemory") ||
          (i.writeAsciiToMemory = function () {
            He(
              "'writeAsciiToMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "addRunDependency") ||
          (i.addRunDependency = function () {
            He(
              "'addRunDependency' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "removeRunDependency") ||
          (i.removeRunDependency = function () {
            He(
              "'removeRunDependency' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_createFolder") ||
          (i.FS_createFolder = function () {
            He(
              "'FS_createFolder' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_createPath") ||
          (i.FS_createPath = function () {
            He(
              "'FS_createPath' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_createDataFile") ||
          (i.FS_createDataFile = function () {
            He(
              "'FS_createDataFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_createPreloadedFile") ||
          (i.FS_createPreloadedFile = function () {
            He(
              "'FS_createPreloadedFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_createLazyFile") ||
          (i.FS_createLazyFile = function () {
            He(
              "'FS_createLazyFile' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_createLink") ||
          (i.FS_createLink = function () {
            He(
              "'FS_createLink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_createDevice") ||
          (i.FS_createDevice = function () {
            He(
              "'FS_createDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS_unlink") ||
          (i.FS_unlink = function () {
            He(
              "'FS_unlink' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getLEB") ||
          (i.getLEB = function () {
            He(
              "'getLEB' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getFunctionTables") ||
          (i.getFunctionTables = function () {
            He(
              "'getFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "alignFunctionTables") ||
          (i.alignFunctionTables = function () {
            He(
              "'alignFunctionTables' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerFunctions") ||
          (i.registerFunctions = function () {
            He(
              "'registerFunctions' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "addFunction") ||
          (i.addFunction = function () {
            He(
              "'addFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "removeFunction") ||
          (i.removeFunction = function () {
            He(
              "'removeFunction' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getFuncWrapper") ||
          (i.getFuncWrapper = function () {
            He(
              "'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "prettyPrint") ||
          (i.prettyPrint = function () {
            He(
              "'prettyPrint' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "dynCall") ||
          (i.dynCall = function () {
            He(
              "'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getCompilerSetting") ||
          (i.getCompilerSetting = function () {
            He(
              "'getCompilerSetting' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (i.print = h),
        Object.getOwnPropertyDescriptor(i, "printErr") ||
          (i.printErr = function () {
            He(
              "'printErr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getTempRet0") ||
          (i.getTempRet0 = function () {
            He(
              "'getTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setTempRet0") ||
          (i.setTempRet0 = function () {
            He(
              "'setTempRet0' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "callMain") ||
          (i.callMain = function () {
            He(
              "'callMain' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "abort") ||
          (i.abort = function () {
            He(
              "'abort' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "keepRuntimeAlive") ||
          (i.keepRuntimeAlive = function () {
            He(
              "'keepRuntimeAlive' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "zeroMemory") ||
          (i.zeroMemory = function () {
            He(
              "'zeroMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stringToNewUTF8") ||
          (i.stringToNewUTF8 = function () {
            He(
              "'stringToNewUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setFileTime") ||
          (i.setFileTime = function () {
            He(
              "'setFileTime' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "abortOnCannotGrowMemory") ||
          (i.abortOnCannotGrowMemory = function () {
            He(
              "'abortOnCannotGrowMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "emscripten_realloc_buffer") ||
          (i.emscripten_realloc_buffer = function () {
            He(
              "'emscripten_realloc_buffer' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "ENV") ||
          (i.ENV = function () {
            He(
              "'ENV' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "withStackSave") ||
          (i.withStackSave = function () {
            He(
              "'withStackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "ERRNO_CODES") ||
          (i.ERRNO_CODES = function () {
            He(
              "'ERRNO_CODES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "ERRNO_MESSAGES") ||
          (i.ERRNO_MESSAGES = function () {
            He(
              "'ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setErrNo") ||
          (i.setErrNo = function () {
            He(
              "'setErrNo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "inetPton4") ||
          (i.inetPton4 = function () {
            He(
              "'inetPton4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "inetNtop4") ||
          (i.inetNtop4 = function () {
            He(
              "'inetNtop4' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "inetPton6") ||
          (i.inetPton6 = function () {
            He(
              "'inetPton6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "inetNtop6") ||
          (i.inetNtop6 = function () {
            He(
              "'inetNtop6' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "readSockaddr") ||
          (i.readSockaddr = function () {
            He(
              "'readSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeSockaddr") ||
          (i.writeSockaddr = function () {
            He(
              "'writeSockaddr' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "DNS") ||
          (i.DNS = function () {
            He(
              "'DNS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getHostByName") ||
          (i.getHostByName = function () {
            He(
              "'getHostByName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "GAI_ERRNO_MESSAGES") ||
          (i.GAI_ERRNO_MESSAGES = function () {
            He(
              "'GAI_ERRNO_MESSAGES' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "Protocols") ||
          (i.Protocols = function () {
            He(
              "'Protocols' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "Sockets") ||
          (i.Sockets = function () {
            He(
              "'Sockets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getRandomDevice") ||
          (i.getRandomDevice = function () {
            He(
              "'getRandomDevice' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "traverseStack") ||
          (i.traverseStack = function () {
            He(
              "'traverseStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "UNWIND_CACHE") ||
          (i.UNWIND_CACHE = function () {
            He(
              "'UNWIND_CACHE' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "readAsmConstArgsArray") ||
          (i.readAsmConstArgsArray = function () {
            He(
              "'readAsmConstArgsArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "readAsmConstArgs") ||
          (i.readAsmConstArgs = function () {
            He(
              "'readAsmConstArgs' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "mainThreadEM_ASM") ||
          (i.mainThreadEM_ASM = function () {
            He(
              "'mainThreadEM_ASM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "jstoi_q") ||
          (i.jstoi_q = function () {
            He(
              "'jstoi_q' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "jstoi_s") ||
          (i.jstoi_s = function () {
            He(
              "'jstoi_s' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getExecutableName") ||
          (i.getExecutableName = function () {
            He(
              "'getExecutableName' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "listenOnce") ||
          (i.listenOnce = function () {
            He(
              "'listenOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "autoResumeAudioContext") ||
          (i.autoResumeAudioContext = function () {
            He(
              "'autoResumeAudioContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "dynCallLegacy") ||
          (i.dynCallLegacy = function () {
            He(
              "'dynCallLegacy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getDynCaller") ||
          (i.getDynCaller = function () {
            He(
              "'getDynCaller' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "dynCall") ||
          (i.dynCall = function () {
            He(
              "'dynCall' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "callRuntimeCallbacks") ||
          (i.callRuntimeCallbacks = function () {
            He(
              "'callRuntimeCallbacks' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setWasmTableEntry") ||
          (i.setWasmTableEntry = function () {
            He(
              "'setWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getWasmTableEntry") ||
          (i.getWasmTableEntry = function () {
            He(
              "'getWasmTableEntry' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "handleException") ||
          (i.handleException = function () {
            He(
              "'handleException' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "runtimeKeepalivePush") ||
          (i.runtimeKeepalivePush = function () {
            He(
              "'runtimeKeepalivePush' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "runtimeKeepalivePop") ||
          (i.runtimeKeepalivePop = function () {
            He(
              "'runtimeKeepalivePop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "callUserCallback") ||
          (i.callUserCallback = function () {
            He(
              "'callUserCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "maybeExit") ||
          (i.maybeExit = function () {
            He(
              "'maybeExit' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "safeSetTimeout") ||
          (i.safeSetTimeout = function () {
            He(
              "'safeSetTimeout' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "asmjsMangle") ||
          (i.asmjsMangle = function () {
            He(
              "'asmjsMangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "asyncLoad") ||
          (i.asyncLoad = function () {
            He(
              "'asyncLoad' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "alignMemory") ||
          (i.alignMemory = function () {
            He(
              "'alignMemory' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "mmapAlloc") ||
          (i.mmapAlloc = function () {
            He(
              "'mmapAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "reallyNegative") ||
          (i.reallyNegative = function () {
            He(
              "'reallyNegative' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "unSign") ||
          (i.unSign = function () {
            He(
              "'unSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "reSign") ||
          (i.reSign = function () {
            He(
              "'reSign' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "formatString") ||
          (i.formatString = function () {
            He(
              "'formatString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "PATH") ||
          (i.PATH = function () {
            He(
              "'PATH' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "PATH_FS") ||
          (i.PATH_FS = function () {
            He(
              "'PATH_FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "SYSCALLS") ||
          (i.SYSCALLS = function () {
            He(
              "'SYSCALLS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "syscallMmap2") ||
          (i.syscallMmap2 = function () {
            He(
              "'syscallMmap2' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "syscallMunmap") ||
          (i.syscallMunmap = function () {
            He(
              "'syscallMunmap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getSocketFromFD") ||
          (i.getSocketFromFD = function () {
            He(
              "'getSocketFromFD' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getSocketAddress") ||
          (i.getSocketAddress = function () {
            He(
              "'getSocketAddress' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "JSEvents") ||
          (i.JSEvents = function () {
            He(
              "'JSEvents' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerKeyEventCallback") ||
          (i.registerKeyEventCallback = function () {
            He(
              "'registerKeyEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "specialHTMLTargets") ||
          (i.specialHTMLTargets = function () {
            He(
              "'specialHTMLTargets' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "maybeCStringToJsString") ||
          (i.maybeCStringToJsString = function () {
            He(
              "'maybeCStringToJsString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "findEventTarget") ||
          (i.findEventTarget = function () {
            He(
              "'findEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "findCanvasEventTarget") ||
          (i.findCanvasEventTarget = function () {
            He(
              "'findCanvasEventTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getBoundingClientRect") ||
          (i.getBoundingClientRect = function () {
            He(
              "'getBoundingClientRect' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillMouseEventData") ||
          (i.fillMouseEventData = function () {
            He(
              "'fillMouseEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerMouseEventCallback") ||
          (i.registerMouseEventCallback = function () {
            He(
              "'registerMouseEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerWheelEventCallback") ||
          (i.registerWheelEventCallback = function () {
            He(
              "'registerWheelEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerUiEventCallback") ||
          (i.registerUiEventCallback = function () {
            He(
              "'registerUiEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerFocusEventCallback") ||
          (i.registerFocusEventCallback = function () {
            He(
              "'registerFocusEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillDeviceOrientationEventData") ||
          (i.fillDeviceOrientationEventData = function () {
            He(
              "'fillDeviceOrientationEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerDeviceOrientationEventCallback"
        ) ||
          (i.registerDeviceOrientationEventCallback = function () {
            He(
              "'registerDeviceOrientationEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillDeviceMotionEventData") ||
          (i.fillDeviceMotionEventData = function () {
            He(
              "'fillDeviceMotionEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerDeviceMotionEventCallback"
        ) ||
          (i.registerDeviceMotionEventCallback = function () {
            He(
              "'registerDeviceMotionEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "screenOrientation") ||
          (i.screenOrientation = function () {
            He(
              "'screenOrientation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillOrientationChangeEventData") ||
          (i.fillOrientationChangeEventData = function () {
            He(
              "'fillOrientationChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerOrientationChangeEventCallback"
        ) ||
          (i.registerOrientationChangeEventCallback = function () {
            He(
              "'registerOrientationChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillFullscreenChangeEventData") ||
          (i.fillFullscreenChangeEventData = function () {
            He(
              "'fillFullscreenChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerFullscreenChangeEventCallback"
        ) ||
          (i.registerFullscreenChangeEventCallback = function () {
            He(
              "'registerFullscreenChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerRestoreOldStyle") ||
          (i.registerRestoreOldStyle = function () {
            He(
              "'registerRestoreOldStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "hideEverythingExceptGivenElement"
        ) ||
          (i.hideEverythingExceptGivenElement = function () {
            He(
              "'hideEverythingExceptGivenElement' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "restoreHiddenElements") ||
          (i.restoreHiddenElements = function () {
            He(
              "'restoreHiddenElements' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setLetterbox") ||
          (i.setLetterbox = function () {
            He(
              "'setLetterbox' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "currentFullscreenStrategy") ||
          (i.currentFullscreenStrategy = function () {
            He(
              "'currentFullscreenStrategy' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "restoreOldWindowedStyle") ||
          (i.restoreOldWindowedStyle = function () {
            He(
              "'restoreOldWindowedStyle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "softFullscreenResizeWebGLRenderTarget"
        ) ||
          (i.softFullscreenResizeWebGLRenderTarget = function () {
            He(
              "'softFullscreenResizeWebGLRenderTarget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "doRequestFullscreen") ||
          (i.doRequestFullscreen = function () {
            He(
              "'doRequestFullscreen' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillPointerlockChangeEventData") ||
          (i.fillPointerlockChangeEventData = function () {
            He(
              "'fillPointerlockChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerPointerlockChangeEventCallback"
        ) ||
          (i.registerPointerlockChangeEventCallback = function () {
            He(
              "'registerPointerlockChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerPointerlockErrorEventCallback"
        ) ||
          (i.registerPointerlockErrorEventCallback = function () {
            He(
              "'registerPointerlockErrorEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "requestPointerLock") ||
          (i.requestPointerLock = function () {
            He(
              "'requestPointerLock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillVisibilityChangeEventData") ||
          (i.fillVisibilityChangeEventData = function () {
            He(
              "'fillVisibilityChangeEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerVisibilityChangeEventCallback"
        ) ||
          (i.registerVisibilityChangeEventCallback = function () {
            He(
              "'registerVisibilityChangeEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerTouchEventCallback") ||
          (i.registerTouchEventCallback = function () {
            He(
              "'registerTouchEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillGamepadEventData") ||
          (i.fillGamepadEventData = function () {
            He(
              "'fillGamepadEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerGamepadEventCallback") ||
          (i.registerGamepadEventCallback = function () {
            He(
              "'registerGamepadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "registerBeforeUnloadEventCallback"
        ) ||
          (i.registerBeforeUnloadEventCallback = function () {
            He(
              "'registerBeforeUnloadEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "fillBatteryEventData") ||
          (i.fillBatteryEventData = function () {
            He(
              "'fillBatteryEventData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "battery") ||
          (i.battery = function () {
            He(
              "'battery' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "registerBatteryEventCallback") ||
          (i.registerBatteryEventCallback = function () {
            He(
              "'registerBatteryEventCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setCanvasElementSize") ||
          (i.setCanvasElementSize = function () {
            He(
              "'setCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getCanvasElementSize") ||
          (i.getCanvasElementSize = function () {
            He(
              "'getCanvasElementSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "demangle") ||
          (i.demangle = function () {
            He(
              "'demangle' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "demangleAll") ||
          (i.demangleAll = function () {
            He(
              "'demangleAll' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "jsStackTrace") ||
          (i.jsStackTrace = function () {
            He(
              "'jsStackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stackTrace") ||
          (i.stackTrace = function () {
            He(
              "'stackTrace' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getEnvStrings") ||
          (i.getEnvStrings = function () {
            He(
              "'getEnvStrings' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "checkWasiClock") ||
          (i.checkWasiClock = function () {
            He(
              "'checkWasiClock' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "flush_NO_FILESYSTEM") ||
          (i.flush_NO_FILESYSTEM = function () {
            He(
              "'flush_NO_FILESYSTEM' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeI53ToI64") ||
          (i.writeI53ToI64 = function () {
            He(
              "'writeI53ToI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeI53ToI64Clamped") ||
          (i.writeI53ToI64Clamped = function () {
            He(
              "'writeI53ToI64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeI53ToI64Signaling") ||
          (i.writeI53ToI64Signaling = function () {
            He(
              "'writeI53ToI64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeI53ToU64Clamped") ||
          (i.writeI53ToU64Clamped = function () {
            He(
              "'writeI53ToU64Clamped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeI53ToU64Signaling") ||
          (i.writeI53ToU64Signaling = function () {
            He(
              "'writeI53ToU64Signaling' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "readI53FromI64") ||
          (i.readI53FromI64 = function () {
            He(
              "'readI53FromI64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "readI53FromU64") ||
          (i.readI53FromU64 = function () {
            He(
              "'readI53FromU64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "convertI32PairToI53") ||
          (i.convertI32PairToI53 = function () {
            He(
              "'convertI32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "convertU32PairToI53") ||
          (i.convertU32PairToI53 = function () {
            He(
              "'convertU32PairToI53' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setImmediateWrapped") ||
          (i.setImmediateWrapped = function () {
            He(
              "'setImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "clearImmediateWrapped") ||
          (i.clearImmediateWrapped = function () {
            He(
              "'clearImmediateWrapped' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "polyfillSetImmediate") ||
          (i.polyfillSetImmediate = function () {
            He(
              "'polyfillSetImmediate' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "uncaughtExceptionCount") ||
          (i.uncaughtExceptionCount = function () {
            He(
              "'uncaughtExceptionCount' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "exceptionLast") ||
          (i.exceptionLast = function () {
            He(
              "'exceptionLast' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "exceptionCaught") ||
          (i.exceptionCaught = function () {
            He(
              "'exceptionCaught' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "ExceptionInfo") ||
          (i.ExceptionInfo = function () {
            He(
              "'ExceptionInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "CatchInfo") ||
          (i.CatchInfo = function () {
            He(
              "'CatchInfo' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "exception_addRef") ||
          (i.exception_addRef = function () {
            He(
              "'exception_addRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "exception_decRef") ||
          (i.exception_decRef = function () {
            He(
              "'exception_decRef' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "Browser") ||
          (i.Browser = function () {
            He(
              "'Browser' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "funcWrappers") ||
          (i.funcWrappers = function () {
            He(
              "'funcWrappers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "getFuncWrapper") ||
          (i.getFuncWrapper = function () {
            He(
              "'getFuncWrapper' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "setMainLoop") ||
          (i.setMainLoop = function () {
            He(
              "'setMainLoop' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "wget") ||
          (i.wget = function () {
            He(
              "'wget' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "FS") ||
          (i.FS = function () {
            He(
              "'FS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "MEMFS") ||
          (i.MEMFS = function () {
            He(
              "'MEMFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "TTY") ||
          (i.TTY = function () {
            He(
              "'TTY' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "PIPEFS") ||
          (i.PIPEFS = function () {
            He(
              "'PIPEFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "SOCKFS") ||
          (i.SOCKFS = function () {
            He(
              "'SOCKFS' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "_setNetworkCallback") ||
          (i._setNetworkCallback = function () {
            He(
              "'_setNetworkCallback' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "tempFixedLengthArray") ||
          (i.tempFixedLengthArray = function () {
            He(
              "'tempFixedLengthArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "miniTempWebGLFloatBuffers") ||
          (i.miniTempWebGLFloatBuffers = function () {
            He(
              "'miniTempWebGLFloatBuffers' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "heapObjectForWebGLType") ||
          (i.heapObjectForWebGLType = function () {
            He(
              "'heapObjectForWebGLType' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "heapAccessShiftForWebGLHeap") ||
          (i.heapAccessShiftForWebGLHeap = function () {
            He(
              "'heapAccessShiftForWebGLHeap' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "GL") ||
          (i.GL = function () {
            He(
              "'GL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "emscriptenWebGLGet") ||
          (i.emscriptenWebGLGet = function () {
            He(
              "'emscriptenWebGLGet' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "computeUnpackAlignedImageSize") ||
          (i.computeUnpackAlignedImageSize = function () {
            He(
              "'computeUnpackAlignedImageSize' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "emscriptenWebGLGetTexPixelData") ||
          (i.emscriptenWebGLGetTexPixelData = function () {
            He(
              "'emscriptenWebGLGetTexPixelData' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "emscriptenWebGLGetUniform") ||
          (i.emscriptenWebGLGetUniform = function () {
            He(
              "'emscriptenWebGLGetUniform' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "webglGetUniformLocation") ||
          (i.webglGetUniformLocation = function () {
            He(
              "'webglGetUniformLocation' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(
          i,
          "webglPrepareUniformLocationsBeforeFirstUse"
        ) ||
          (i.webglPrepareUniformLocationsBeforeFirstUse = function () {
            He(
              "'webglPrepareUniformLocationsBeforeFirstUse' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "webglGetLeftBracePos") ||
          (i.webglGetLeftBracePos = function () {
            He(
              "'webglGetLeftBracePos' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "emscriptenWebGLGetVertexAttrib") ||
          (i.emscriptenWebGLGetVertexAttrib = function () {
            He(
              "'emscriptenWebGLGetVertexAttrib' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "writeGLArray") ||
          (i.writeGLArray = function () {
            He(
              "'writeGLArray' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "AL") ||
          (i.AL = function () {
            He(
              "'AL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "SDL_unicode") ||
          (i.SDL_unicode = function () {
            He(
              "'SDL_unicode' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "SDL_ttfContext") ||
          (i.SDL_ttfContext = function () {
            He(
              "'SDL_ttfContext' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "SDL_audio") ||
          (i.SDL_audio = function () {
            He(
              "'SDL_audio' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "SDL") ||
          (i.SDL = function () {
            He(
              "'SDL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "SDL_gfx") ||
          (i.SDL_gfx = function () {
            He(
              "'SDL_gfx' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "GLUT") ||
          (i.GLUT = function () {
            He(
              "'GLUT' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "EGL") ||
          (i.EGL = function () {
            He(
              "'EGL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "GLFW_Window") ||
          (i.GLFW_Window = function () {
            He(
              "'GLFW_Window' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "GLFW") ||
          (i.GLFW = function () {
            He(
              "'GLFW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "GLEW") ||
          (i.GLEW = function () {
            He(
              "'GLEW' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "IDBStore") ||
          (i.IDBStore = function () {
            He(
              "'IDBStore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "runAndAbortIfError") ||
          (i.runAndAbortIfError = function () {
            He(
              "'runAndAbortIfError' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "warnOnce") ||
          (i.warnOnce = function () {
            He(
              "'warnOnce' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stackSave") ||
          (i.stackSave = function () {
            He(
              "'stackSave' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stackRestore") ||
          (i.stackRestore = function () {
            He(
              "'stackRestore' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stackAlloc") ||
          (i.stackAlloc = function () {
            He(
              "'stackAlloc' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "AsciiToString") ||
          (i.AsciiToString = function () {
            He(
              "'AsciiToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stringToAscii") ||
          (i.stringToAscii = function () {
            He(
              "'stringToAscii' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "UTF16ToString") ||
          (i.UTF16ToString = function () {
            He(
              "'UTF16ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stringToUTF16") ||
          (i.stringToUTF16 = function () {
            He(
              "'stringToUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "lengthBytesUTF16") ||
          (i.lengthBytesUTF16 = function () {
            He(
              "'lengthBytesUTF16' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "UTF32ToString") ||
          (i.UTF32ToString = function () {
            He(
              "'UTF32ToString' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "stringToUTF32") ||
          (i.stringToUTF32 = function () {
            He(
              "'stringToUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "lengthBytesUTF32") ||
          (i.lengthBytesUTF32 = function () {
            He(
              "'lengthBytesUTF32' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "allocateUTF8") ||
          (i.allocateUTF8 = function () {
            He(
              "'allocateUTF8' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "allocateUTF8OnStack") ||
          (i.allocateUTF8OnStack = function () {
            He(
              "'allocateUTF8OnStack' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (i.writeStackCookie = oe),
        (i.checkStackCookie = De),
        Object.getOwnPropertyDescriptor(i, "intArrayFromBase64") ||
          (i.intArrayFromBase64 = function () {
            He(
              "'intArrayFromBase64' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "tryParseAsDataURI") ||
          (i.tryParseAsDataURI = function () {
            He(
              "'tryParseAsDataURI' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(i, "ALLOC_NORMAL") ||
          Object.defineProperty(i, "ALLOC_NORMAL", {
            configurable: !0,
            get: function () {
              He(
                "'ALLOC_NORMAL' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(i, "ALLOC_STACK") ||
          Object.defineProperty(i, "ALLOC_STACK", {
            configurable: !0,
            get: function () {
              He(
                "'ALLOC_STACK' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the FAQ)"
              );
            },
          }),
        (ot = function En() {
          sr || Ra(), sr || (ot = En);
        }),
        (i.run = Ra),
        i.preInit)
      )
        for (
          typeof i.preInit == "function" && (i.preInit = [i.preInit]);
          i.preInit.length > 0;

        )
          i.preInit.pop()();
      return Ra(), e.ready;
    };
  })(),
  P$ = (function () {
    function t(e, n, r) {
      PB(this, t),
        this.initParamers(e, n),
        (this._openTimeMs = r),
        this.resetCollect();
    }
    return (
      MB(t, [
        {
          key: "bitrates",
          get: function () {
            return this._bitrates;
          },
          set: function (e) {
            (this._bitrates = e), this.parseMPD();
          },
        },
        {
          key: "resetCollect",
          value: function () {
            (this.abr_time_offset_set = []),
              (this.abr_cur_bitrate_set = []),
              (this.abr_pred_bitrate_set = []),
              (this.abr_player_buffer_set = []),
              (this.abr_stall_status_set = []),
              (this.abr_speed_set = []);
          },
        },
        {
          key: "initParamers",
          value: function (e, n) {
            (this.player = e),
              (this._bitrates = n.bitrates),
              (this.bitrate = n.bitrate),
              (this.config = n);
          },
        },
        {
          key: "initModule",
          value: function (e) {
            var n = this,
              r = e || {
                onRuntimeInitialized: function () {
                  (n.inited = !0),
                    n.updateSwitchInfo(),
                    n.parseMPD(),
                    n.updateDeviceInfo();
                },
              };
            (this.module = r), cIn(r);
          },
        },
        {
          key: "parseMPD",
          value: function () {
            try {
              var e = {
                v_adaptation: this.bitrates.map(function (n, r) {
                  return {
                    stream_id: "s".concat(r),
                    bandwidth: Number(n),
                    width: -1,
                    height: -1,
                    codec: "avc",
                    frame_rate: 30,
                    segment_duration: 4e3,
                  };
                }),
              };
              this.module.ccall(
                "parseMPD",
                "null",
                ["string"],
                [JSON.stringify(e)]
              );
            } catch {}
          },
        },
        {
          key: "updateSwitchInfo",
          value: function () {
            var e = dIn(this._openTimeMs);
            this.module._updateSwitchInfo(
              this.config.start_limit,
              e.low,
              e.high,
              5,
              !!this.config.debug,
              11,
              4
            );
          },
        },
        {
          key: "updateDeviceInfo",
          value: function () {
            var e =
                ((typeof window > "u" ? "undefined" : t8(window)) ===
                  "object" &&
                  window.devicePixelRatio) ||
                1,
              n = this.player.video.getBoundingClientRect(),
              r = n.width,
              i = n.height;
            this.module._updateDeviceInfo(Math.floor(r), Math.floor(i), e, 30);
          },
        },
        {
          key: "getPredictedBitrate",
          value: function (e, n, r) {
            if (this.inited) {
              var i,
                o = [];
              try {
                this.updateDeviceInfo(),
                  this.updateBufferInfo(e, n, r),
                  this.abr_time_offset_set.push(Date.now() - this._openTimeMs),
                  this.abr_cur_bitrate_set.push(this.bitrate),
                  this.abr_stall_status_set.push(Number(n)),
                  (i = this.module._getPredictedBitrate(
                    this.bitrate,
                    Number(this.config.method)
                  ));
                for (var l = 0; l < 7; l++)
                  o.push(
                    this.module.HEAP32[i / Int32Array.BYTES_PER_ELEMENT + l]
                  );
                var u = o[0];
                if (
                  (this.abr_pred_bitrate_set.push(u),
                  u !== this.bitrate && u > 0)
                )
                  return u;
              } catch {
                return null;
              }
            }
          },
        },
        {
          key: "updateBufferInfo",
          value: function (e, n, r) {
            var i = this.player.playbackRate || 1,
              o = this.bufferLength;
            return (
              this.abr_player_buffer_set.push(o),
              this.abr_speed_set.push(e),
              (this.buffer = o),
              this.module._updateBufferInfo(i, o, o, e, Number(n), Number(r)),
              { buffer: o, downloadSpeed: e }
            );
          },
        },
        {
          key: "bufferLength",
          get: function () {
            var e = this.player.getBufferedRange(),
              n = this.player.video.currentTime,
              r = e[1] - Math.max(e[0], n);
            return (r = Math.max(0, r).toFixed(2)), parseFloat(r);
          },
        },
      ]),
      t
    );
  })();
function dIn(t) {
  var e = t.toString(16);
  return e.length <= 8
    ? { high: 0, low: t }
    : {
        high: parseInt(e.substr(0, e.length - 8), 16),
        low: parseInt(e.substr(e.length - 8), 16),
      };
}
var aI = {
    formatTime: function (t) {
      var e = Math.floor(t / 3600),
        n = t % 3600,
        r = Math.floor(n / 60),
        i = Math.round(n % 60);
      return e > 0
        ? (r < 10 && (r = "0".concat(r)),
          i < 10 && (i = "0".concat(i)),
          "".concat(e, ":").concat(r, ":").concat(i))
        : (i < 10 && (i = "0".concat(i)), "".concat(r, ":").concat(i));
    },
    get: function (t, e) {
      for (typeof e == "string" && (e = e.split(".")); t != null && e.length; )
        t = t[e.shift()];
      return t;
    },
  },
  hIn = {
    open: !0,
    debug: !1,
    method: 7,
    start_limit: 4e3,
    up_thresh: 8,
    down_thresh: 2.5,
    down_living: 5e3,
    up_living: 5e3,
    speedKey: "live-abr-downloadspeed",
  };
(function (t) {
  function e(n) {
    var r;
    return (
      PB(this, e),
      D$(MT((r = wue(this, e, [n]))), "successSwitch", function (i) {
        var o = i.eventName,
          l = i.url;
        if (
          o === "core.switchurlsuccess" &&
          ((r.isSwitching = !1),
          r.player.off("core_event", r.successSwitch),
          r.player.off("core_event", r.failSwitch),
          (
            aI.get(MT(r), "player.plugins.flv.core.loader.finnalUrl") ||
            r.player.config.url
          ).indexOf(l) > -1)
        ) {
          var u = r.algo.bufferLength;
          r.emit("abr_switch", {
            abr_method: r.config.method,
            is_auto_switch: 1,
            cur_bitrate: r.bitrate,
            predict_bitrate: r.predict_bitrate,
            after_audio_buffer_time: u,
            after_video_buffer_time: u,
            after_url: l,
          }),
            (r.bitrate = r.predict_bitrate),
            (r.config.bitrate = r.predict_bitrate),
            r.emit("switch_definition_success", { bitrate: r.bitrate, url: l });
        }
      }),
      D$(MT(r), "failSwitch", function (i) {
        i.eventName === "core.switchurlfailed" &&
          ((r.isSwitching = !1),
          r.player.off("core_event", r.successSwitch),
          r.player.off("core_event", r.failSwitch),
          r.emit("switch_definition_fail", {
            bitrate: r.predict_bitrate,
            url: i.url,
          }));
      }),
      r.updateConfig(r.config),
      r.bindCtx(),
      r.initBitrate(),
      (r.isSwitching = !1),
      (r.hasFrameChase = !1),
      (r.isStalling = !1),
      (r.stallStartTime = 0),
      r
    );
  }
  return (
    kue(e, hm),
    MB(
      e,
      [
        {
          key: "changeTime",
          get: function () {
            return this.algo && this.algo.changeTime;
          },
          set: function (n) {
            this.algo && (this.algo.changeTime = n);
          },
        },
        {
          key: "bitrates",
          get: function () {
            return this.algo && this.algo.bitrates;
          },
          set: function (n) {
            this.algo && (this.algo.bitrates = n);
          },
        },
        {
          key: "bitrate",
          get: function () {
            return this.algo && this.algo.bitrate;
          },
          set: function (n) {
            this.algo && (this.algo.bitrate = n), (this.config.bitrate = n);
          },
        },
        {
          key: "open",
          get: function () {
            return this._open;
          },
        },
        {
          key: "afterCreate",
          value: function () {
            var n = this;
            this.player.once("canplay", function () {
              (n.config.open || n.config.downTip) && n.setAbr();
            });
          },
        },
        {
          key: "initBitrate",
          value: function () {
            if (e.algo) {
              (this.algo = e.algo),
                this.algo.initParamers(this.player, this.config),
                this.algo.updateSwitchInfo(),
                this.algo.parseMPD();
              var n = this.algo.getPredictedBitrate(this.getSpeed());
              n &&
                ((this.player.config.url = this.config.urls[n]),
                (this.config.bitrate = n));
            }
          },
        },
        {
          key: "switchAbr",
          value: function (n) {
            (this.config.open = n),
              n !== this._open &&
                (n ? this.setAbr() : this.config.downTip || this.delAbr());
          },
        },
        {
          key: "setAbr",
          value: function () {
            this._open ||
              ((this.changeTime = null),
              this.algo ||
                ((this.algo = new P$(this.player, this.config, Date.now())),
                this.algo.initModule()),
              this.player.on("core_event", this._checkStatus),
              this.player.on("waiting", this._recordStalling),
              this.player.on("pause", this._resetStalling),
              this.player.on("playing", this._checkStalling),
              this.player.on("timeupdate", this._checkStalling),
              this.player.on("chaseframe", this._recordFrameTrace),
              (this._open = !0),
              (this.isSwitching = !1),
              (this.hasFrameChase = !1),
              (this.isStalling = !1),
              (this.stallStartTime = 0));
          },
        },
        {
          key: "delAbr",
          value: function () {
            this.player.off("core_event", this._checkStatus),
              this.player.off("waiting", this._recordStalling),
              this.player.off("pause", this._resetStalling),
              this.player.off("playing", this._checkStalling),
              this.player.off("timeupdate", this._checkStalling),
              this.player.off("core_event", this.successSwitch),
              this.player.off("core_event", this.failSwitch),
              (this._open = !1),
              (this.isSwitching = !1),
              (this.stallStartTime = 0);
          },
        },
        {
          key: "storeSpeed",
          value: function (n) {
            try {
              if (!this.config.speedKey) return;
              localStorage.setItem(this.config.speedKey, n);
            } catch {}
          },
        },
        {
          key: "getSpeed",
          value: function () {
            try {
              return localStorage.getItem(this.config.speedKey) || 0;
            } catch {
              return 0;
            }
          },
        },
        {
          key: "updateConfig",
          value: function (n) {
            (this.config = Object.assign({}, hIn, n)),
              (this.config.bitrate && this.config.urls) ||
                console.error("bitrate and urls is necessary!"),
              (this.config.bitrates = Object.keys(this.config.urls)
                .map(function (r) {
                  return Number(r);
                })
                .sort(function (r, i) {
                  return r - i;
                })),
              (this.waitings = []),
              this.algo &&
                this.algo.inited &&
                (this.algo.initParamers(
                  this.player,
                  Object.assign({}, this.config, { bitrate: this.algo.bitrate })
                ),
                this.algo.parseMPD());
          },
        },
        {
          key: "bindCtx",
          value: function () {
            (this._checkStatus = this._checkStatus.bind(this)),
              (this._initAbr = this._initAbr.bind(this)),
              (this._checkStalling = this._checkStalling.bind(this)),
              (this._recordStalling = this._recordStalling.bind(this)),
              (this._recordFrameTrace = this._recordFrameTrace.bind(this)),
              (this._handleUrlChange = this._handleUrlChange.bind(this));
          },
        },
        {
          key: "_handleUrlChange",
          value: function () {
            (this.algo = null),
              (this.firstFrameViewed = !1),
              this.player &&
                (this.player.once("loadeddata", this._initAbr),
                this.player.once("canplay", this._initAbr));
          },
        },
        {
          key: "_initAbr",
          value: function () {
            this.firstFrameViewed ||
              ((this.firstFrameViewed = !0),
              (this.isSwitching = !1),
              (this.algo = new P$(this.player, this.config, Date.now())),
              this.algo.initModule());
          },
        },
        {
          key: "_recordFrameTrace",
          value: function () {
            this.hasFrameChase = !0;
          },
        },
        {
          key: "_recordStalling",
          value: function () {
            (this.isStalling = !0),
              (this.stallStartTime = this.player.currentTime);
          },
        },
        {
          key: "_checkStalling",
          value: function () {
            this.player.currentTime - this.stallStartTime < 0.2 ||
              this._resetStalling();
          },
        },
        {
          key: "_resetStalling",
          value: function () {
            this.isStalling = !1;
          },
        },
        {
          key: "_checkStatus",
          value: function (n) {
            var r = n.eventName,
              i = n.pts,
              o = n.seamlessSwitching;
            if (r !== "core.loadstart") {
              if (r === "core.keyframe" && this.player && this.player.video) {
                var l = aI.get(this, "player.plugins.flv.core");
                if (l && typeof l.speedInfo == "function" && this.algo) {
                  var u = (l.speedInfo() || {}).speed;
                  this.storeSpeed(u);
                  var c = Date.now(),
                    d = this.isStalling,
                    h = this.hasFrameChase,
                    f = this.algo.getPredictedBitrate(u, d, h),
                    p = {
                      cur_download_speed: u,
                      cur_audio_buffer_time: this.algo.buffer,
                      cur_video_buffer_time: this.algo.buffer,
                      start: c,
                      is_stall: Number(d),
                      has_frame_trace: Number(h),
                    };
                  if (((this.hasFrameChase = !1), f)) {
                    if (!this.config.open)
                      return void (
                        this.config.downTip &&
                        f < this.bitrate &&
                        this.emit("down_definition", f)
                      );
                    if (this.isSwitching) return;
                    this.emit("switch_definition_start", {
                      bitrate: f,
                      pts: i,
                    });
                    var g = this.config.urls[f];
                    if (!g) return;
                    var y = ""
                      .concat(g)
                      .concat(g.indexOf("?") > 0 ? "&" : "?", "abr_pts=")
                      .concat(i);
                    this.switchURL(y, f, p);
                  }
                }
              }
            } else o === !1 && this._handleUrlChange();
          },
        },
        {
          key: "switchURL",
          value: function (n, r) {
            var i = aI.get(this.player, "plugins.flv") || {};
            this.player.config.url,
              i && r && !this.isSwitching
                ? (this.player.off("core_event", this.successSwitch),
                  this.player.off("core_event", this.failSwitch),
                  this.player.on("core_event", this.successSwitch),
                  this.player.on("core_event", this.failSwitch),
                  (this.isSwitching = !0),
                  (this.predict_bitrate = r),
                  this.player.switchURL(n, !0))
                : (this.player.src = n);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.delAbr();
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "abr";
          },
        },
        {
          key: "initAbrModule",
          value: function () {
            return new Promise(function (n, r) {
              try {
                var i = new P$({}, {}, Date.now()),
                  o = {
                    onRuntimeInitialized: function () {
                      (i.inited = !0), (e.algo = i), n();
                    },
                  };
                i.initModule(o);
              } catch (l) {
                r(l);
              }
            });
          },
        },
      ]
    ),
    e
  );
})();
var fIn = {
  open: !0,
  debug: !1,
  method: 7,
  start_limit: 4e3,
  up_thresh: 8,
  down_thresh: 2.5,
  down_living: 5e3,
  up_living: 5e3,
  speedKey: "live-abr-downloadspeed",
};
(function (t) {
  function e(n) {
    var r;
    return (
      PB(this, e),
      D$(MT((r = wue(this, e, [n]))), "handleCoreEvt", function (i) {
        var o = i.eventName,
          l = i.playlist;
        if (o === "core.hlsmanifestloaded" && l) {
          if (
            ((r.config.urls = {}),
            l.streams.forEach(function (c) {
              var d = c.bitrate,
                h = c.url;
              r.config.urls[d] = h;
            }),
            r.config.startBitrate)
          ) {
            var u = r.config.urls[r.config.startBitrate];
            u && r.player.switchURL(u, !0);
          }
          (r.config.bitrates = Object.keys(r.config.urls)
            .map(function (c) {
              return Number(c);
            })
            .sort(function (c, d) {
              return c - d;
            })),
            r.algo &&
              r.algo.inited &&
              (r.algo.initParamers(
                r.player,
                Object.assign({}, r.config, { bitrate: r.algo.bitrate })
              ),
              r.algo.parseMPD());
        }
      }),
      D$(MT(r), "successSwitch", function (i) {
        var o = i.eventName,
          l = i.url;
        if (
          o === "core.switchurlsuccess" &&
          ((r.isSwitching = !1),
          r.player.off("core_event", r.successSwitch),
          r.player.off("core_event", r.failSwitch),
          (
            aI.get(MT(r), "player.plugins.hls.core.loader.finnalUrl") ||
            r.player.config.url
          ).indexOf(l) > -1)
        ) {
          var u = r.algo.bufferLength;
          r.emit("abr_switch", {
            abr_method: r.config.method,
            is_auto_switch: 1,
            cur_bitrate: r.bitrate,
            predict_bitrate: r.predict_bitrate,
            after_audio_buffer_time: u,
            after_video_buffer_time: u,
            after_url: l,
          }),
            (r.bitrate = r.predict_bitrate),
            (r.config.bitrate = r.predict_bitrate),
            r.emit("switch_definition_success", { bitrate: r.bitrate, url: l });
        }
      }),
      D$(MT(r), "failSwitch", function (i) {
        i.eventName === "core.switchurlfailed" &&
          ((r.isSwitching = !1),
          r.player.off("core_event", r.successSwitch),
          r.player.off("core_event", r.failSwitch),
          r.emit("switch_definition_fail", {
            bitrate: r.predict_bitrate,
            url: i.url,
          }));
      }),
      r.updateConfig(r.config),
      r.bindCtx(),
      (r.isSwitching = !1),
      (r.hasFrameChase = !1),
      (r.isStalling = !1),
      (r.stallStartTime = 0),
      r
    );
  }
  return (
    kue(e, hm),
    MB(
      e,
      [
        {
          key: "changeTime",
          get: function () {
            return this.algo && this.algo.changeTime;
          },
          set: function (n) {
            this.algo && (this.algo.changeTime = n);
          },
        },
        {
          key: "bitrates",
          get: function () {
            return this.algo && this.algo.bitrates;
          },
          set: function (n) {
            this.algo && (this.algo.bitrates = n);
          },
        },
        {
          key: "bitrate",
          get: function () {
            return this.algo && this.algo.bitrate;
          },
          set: function (n) {
            this.algo && (this.algo.bitrate = n), (this.config.bitrate = n);
          },
        },
        {
          key: "open",
          get: function () {
            return this._open;
          },
        },
        {
          key: "beforePlayerInit",
          value: function () {
            (this.config.open || this.config.downTip) &&
              (this.player.off("core_event", this.handleCoreEvt),
              this.player.on("core_event", this.handleCoreEvt));
          },
        },
        {
          key: "afterCreate",
          value: function () {
            var n = this;
            this.player.once("canplay", function () {
              (n.config.open || n.config.downTip) && n.setAbr();
            });
          },
        },
        {
          key: "switchAbr",
          value: function (n) {
            (this.config.open = n),
              n !== this._open &&
                (n ? this.setAbr() : this.config.downTip || this.delAbr());
          },
        },
        {
          key: "setAbr",
          value: function () {
            this._open ||
              ((this.changeTime = null),
              this.algo ||
                ((this.algo = new P$(this.player, this.config, Date.now())),
                this.algo.initModule()),
              this.player.on("core_event", this._checkStatus),
              this.player.on("urlchange", this._handleUrlChange),
              this.player.on("waiting", this._recordStalling),
              this.player.on("pause", this._resetStalling),
              this.player.on("playing", this._checkStalling),
              this.player.on("timeupdate", this._checkStalling),
              this.player.on("chaseframe", this._recordFrameTrace),
              this.player.on("core_event", this.handleCoreEvt),
              (this._open = !0),
              (this.isSwitching = !1),
              (this.hasFrameChase = !1),
              (this.isStalling = !1),
              (this.stallStartTime = 0));
          },
        },
        {
          key: "delAbr",
          value: function () {
            this.player.off("core_event", this._checkStatus),
              this.player.off("urlchange", this._handleUrlChange),
              this.player.off("waiting", this._recordStalling),
              this.player.off("pause", this._resetStalling),
              this.player.off("playing", this._checkStalling),
              this.player.off("timeupdate", this._checkStalling),
              this.player.off("core_event", this.successSwitch),
              this.player.off("core_event", this.failSwitch),
              this.player.off("core_event", this.handleCoreEvt),
              (this._open = !1),
              (this.isSwitching = !1),
              (this.stallStartTime = 0);
          },
        },
        {
          key: "storeSpeed",
          value: function (n) {
            try {
              if (!this.config.speedKey) return;
              localStorage.setItem(this.config.speedKey, n);
            } catch {}
          },
        },
        {
          key: "getSpeed",
          value: function () {
            try {
              return localStorage.getItem(this.config.speedKey) || 0;
            } catch {
              return 0;
            }
          },
        },
        {
          key: "updateConfig",
          value: function (n) {
            (this.config = Object.assign({}, fIn, n)),
              this.config.bitrate || console.error("bitrate is necessary!"),
              (this.waitings = []);
          },
        },
        {
          key: "bindCtx",
          value: function () {
            (this._checkStatus = this._checkStatus.bind(this)),
              (this._initAbr = this._initAbr.bind(this)),
              (this._checkStalling = this._checkStalling.bind(this)),
              (this._recordStalling = this._recordStalling.bind(this)),
              (this._recordFrameTrace = this._recordFrameTrace.bind(this)),
              (this._handleUrlChange = this._handleUrlChange.bind(this));
          },
        },
        {
          key: "_handleUrlChange",
          value: function () {
            (this.algo = null),
              (this.firstFrameViewed = !1),
              this.player &&
                (this.player.once("loadeddata", this._initAbr),
                this.player.once("canplay", this._initAbr));
          },
        },
        {
          key: "_initAbr",
          value: function () {
            this.firstFrameViewed ||
              ((this.firstFrameViewed = !0),
              (this.isSwitching = !1),
              (this.algo = new P$(this.player, this.config, Date.now())),
              this.algo.initModule());
          },
        },
        {
          key: "_recordFrameTrace",
          value: function () {
            this.hasFrameChase = !0;
          },
        },
        {
          key: "_recordStalling",
          value: function () {
            (this.isStalling = !0),
              (this.stallStartTime = this.player.currentTime);
          },
        },
        {
          key: "_checkStalling",
          value: function () {
            this.player.currentTime - this.stallStartTime < 0.2 ||
              this._resetStalling();
          },
        },
        {
          key: "_resetStalling",
          value: function () {
            this.isStalling = !1;
          },
        },
        {
          key: "_checkStatus",
          value: function (n) {
            var r = n.eventName,
              i = n.pts;
            if (r === "core.keyframe" && this.player && this.player.video) {
              var o = aI.get(this, "player.plugins.hls.core");
              if (o && typeof o.speedInfo == "function" && this.algo) {
                var l = (o.speedInfo() || {}).speed;
                this.storeSpeed(l);
                var u = Date.now(),
                  c = this.isStalling,
                  d = this.hasFrameChase,
                  h = this.algo.getPredictedBitrate(l, c, d),
                  f = {
                    cur_download_speed: l,
                    cur_audio_buffer_time: this.algo.buffer,
                    cur_video_buffer_time: this.algo.buffer,
                    start: u,
                    is_stall: Number(c),
                    has_frame_trace: Number(d),
                  };
                if (((this.hasFrameChase = !1), h)) {
                  if (!this.config.open)
                    return void (
                      this.config.downTip &&
                      h < this.bitrate &&
                      this.emit("down_definition", h)
                    );
                  if (this.isSwitching) return;
                  this.emit("switch_definition_start", { bitrate: h, pts: i });
                  var p = this.config.urls[h];
                  if (!p) return;
                  this.switchURL(p, h, f);
                }
              }
            }
          },
        },
        {
          key: "switchURL",
          value: function (n, r) {
            var i = aI.get(this.player, "plugins.flv") || {};
            this.player.config.url,
              i && r && !this.isSwitching
                ? (this.player.off("core_event", this.successSwitch),
                  this.player.off("core_event", this.failSwitch),
                  this.player.on("core_event", this.successSwitch),
                  this.player.on("core_event", this.failSwitch),
                  (this.isSwitching = !0),
                  (this.predict_bitrate = r),
                  this.player.switchURL(n, !0))
                : (this.player.src = n);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.delAbr();
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "hlsabr";
          },
        },
      ]
    ),
    e
  );
})();
var pIn = (function (t) {
  function e() {
    return PB(this, e), wue(this, e, arguments);
  }
  return (
    kue(e, hm),
    MB(
      e,
      [
        {
          key: "afterCreate",
          value: function () {
            this.on("timeupdate", this.onTimeUpdate.bind(this));
          },
        },
        {
          key: "onTimeUpdate",
          value: function () {
            var n = this.bufferLength;
            this.speed === this.config.hurrySpeed
              ? n <= this.config.hurryEndMs && (this.speed = 1)
              : this.speed === 1 &&
                n >= this.config.hurryStartMs &&
                (this.speed = this.config.hurrySpeed);
          },
        },
        {
          key: "bufferLength",
          get: function () {
            var n = this.player.getBufferedRange(),
              r = this.player.video.currentTime,
              i = n[1] - Math.max(n[0], r);
            return (i = Math.round(1e3 * Math.max(0, i)));
          },
        },
        {
          key: "speed",
          get: function () {
            return this.player.playbackRate;
          },
          set: function (n) {
            this.speed !== n && (this.player.playbackRate = n);
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "adaptive";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return { hurryEndMs: 1800, hurryStartMs: 2500, hurrySpeed: 1.1 };
          },
        },
      ]
    ),
    e
  );
})();
class gIn extends dze {
  constructor() {
    super(...arguments), own(this, "_originSwitchURL");
  }
  beforePlayerInit() {
    this._originSwitchURL = this.player.switchURL;
    const e = this.destroy;
    (this.destroy = () => {
      (this.player.switchURL = this._originSwitchURL), e();
    }),
      super.beforePlayerInit();
  }
}
const mIn = Os.PluginFlv;
var mp,
  Sei = Object.freeze({
    __proto__: null,
    Adaptive: pIn,
    FlvPlugin: gIn,
    __PLUGIN_NAME__: mIn,
  });
function yIn(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o,
      l,
      u = [],
      c = !0,
      d = !1;
    try {
      if (((o = (n = n.call(t)).next), e === 0)) {
        if (Object(n) !== n) return;
        c = !1;
      } else
        for (
          ;
          !(c = (r = o.call(n)).done) && (u.push(r.value), u.length !== e);
          c = !0
        );
    } catch (h) {
      (d = !0), (i = h);
    } finally {
      try {
        if (!c && n.return != null && ((l = n.return()), Object(l) !== l))
          return;
      } finally {
        if (d) throw i;
      }
    }
    return u;
  }
}
function MSe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function xp(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? MSe(Object(n), !0).forEach(function (r) {
          Ii(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : MSe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Ts() {
  Ts = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = S.method,
      W = E.iterator[L];
    if (W === void 0)
      return (
        (S.delegate = null),
        (L === "throw" &&
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")) ||
          (L !== "return" &&
            ((S.method = "throw"),
            (S.arg = new TypeError(
              "The iterator does not provide a '" + L + "' method"
            )))),
        f
      );
    var F = h(W, E.iterator, S.arg);
    if (F.type === "throw")
      return (S.method = "throw"), (S.arg = F.arg), (S.delegate = null), f;
    var oe = F.arg;
    return oe
      ? oe.done
        ? ((S[E.resultName] = oe.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : oe
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function CSe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function Mh(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        CSe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        CSe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function AR(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function $Se(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, bze(r.key), r);
  }
}
function wR(t, e, n) {
  return (
    e && $Se(t.prototype, e),
    n && $Se(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Ii(t, e, n) {
  return (
    (e = bze(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function gze(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && mze(t, e);
}
function _ne(t) {
  return (_ne = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function mze(t, e) {
  return (mze = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function vIn() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function bIn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = Object.keys(t);
  for (r = 0; r < o.length; r++) (n = o[r]), e.indexOf(n) >= 0 || (i[n] = t[n]);
  return i;
}
function _In(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = bIn(t, e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        e.indexOf(n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
function to(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function TIn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return to(t);
}
function yze(t) {
  var e = vIn();
  return function () {
    var n,
      r = _ne(t);
    if (e) {
      var i = _ne(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return TIn(this, n);
  };
}
function q3(t, e) {
  return SIn(t) || yIn(t, e) || vze(t, e) || wIn();
}
function M$(t) {
  return EIn(t) || RIn(t) || vze(t) || AIn();
}
function EIn(t) {
  if (Array.isArray(t)) return Tne(t);
}
function SIn(t) {
  if (Array.isArray(t)) return t;
}
function RIn(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function vze(t, e) {
  if (t) {
    if (typeof t == "string") return Tne(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? Tne(t, e)
        : void 0
    );
  }
}
function Tne(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function AIn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function wIn() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function kIn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function bze(t) {
  var e = kIn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
function xSe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function Ene(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? xSe(Object(n), !0).forEach(function (r) {
          $i(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : xSe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Lp() {
  Lp = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = S.method,
      W = E.iterator[L];
    if (W === void 0)
      return (
        (S.delegate = null),
        (L === "throw" &&
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")) ||
          (L !== "return" &&
            ((S.method = "throw"),
            (S.arg = new TypeError(
              "The iterator does not provide a '" + L + "' method"
            )))),
        f
      );
    var F = h(W, E.iterator, S.arg);
    if (F.type === "throw")
      return (S.method = "throw"), (S.arg = F.arg), (S.delegate = null), f;
    var oe = F.arg;
    return oe
      ? oe.done
        ? ((S[E.resultName] = oe.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : oe
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function Jx(t) {
  return (Jx =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function LSe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function oI(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        LSe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        LSe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function kR(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function OSe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, Eze(r.key), r);
  }
}
function IR(t, e, n) {
  return (
    e && OSe(t.prototype, e),
    n && OSe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function $i(t, e, n) {
  return (
    (e = Eze(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function P5(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && CB(t, e);
}
function YI(t) {
  return (YI = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function CB(t, e) {
  return (CB = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function _ze() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function Tze(t, e, n) {
  return (Tze = _ze()
    ? Reflect.construct.bind()
    : function (r, i, o) {
        var l = [null];
        l.push.apply(l, i);
        var u = new (Function.bind.apply(r, l))();
        return o && CB(u, o.prototype), u;
      }).apply(null, arguments);
}
function IIn(t) {
  return Function.toString.call(t).indexOf("[native code]") !== -1;
}
function n8(t) {
  var e = typeof Map == "function" ? new Map() : void 0;
  return (
    (n8 = function (n) {
      if (n === null || !IIn(n)) return n;
      if (typeof n != "function")
        throw new TypeError(
          "Super expression must either be null or a function"
        );
      if (e !== void 0) {
        if (e.has(n)) return e.get(n);
        e.set(n, r);
      }
      function r() {
        return Tze(n, arguments, YI(this).constructor);
      }
      return (
        (r.prototype = Object.create(n.prototype, {
          constructor: {
            value: r,
            enumerable: !1,
            writable: !0,
            configurable: !0,
          },
        })),
        CB(r, n)
      );
    }),
    n8(t)
  );
}
function DIn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = Object.keys(t);
  for (r = 0; r < o.length; r++) (n = o[r]), e.indexOf(n) >= 0 || (i[n] = t[n]);
  return i;
}
function PIn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = DIn(t, e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        e.indexOf(n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
function la(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function MIn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return la(t);
}
function M5(t) {
  var e = _ze();
  return function () {
    var n,
      r = YI(t);
    if (e) {
      var i = YI(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return MIn(this, n);
  };
}
function CIn(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = YI(t)) !== null; );
  return t;
}
function Sne() {
  return (
    (Sne =
      typeof Reflect < "u" && Reflect.get
        ? Reflect.get.bind()
        : function (t, e, n) {
            var r = CIn(t, e);
            if (r) {
              var i = Object.getOwnPropertyDescriptor(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    Sne.apply(this, arguments)
  );
}
function $In(t, e) {
  if (t) {
    if (typeof t == "string") return GSe(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? GSe(t, e)
        : void 0
    );
  }
}
function GSe(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function xIn(t, e) {
  var n = (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (!n) {
    if (
      Array.isArray(t) ||
      (n = $In(t)) ||
      (e && t && typeof t.length == "number")
    ) {
      n && (t = n);
      var r = 0,
        i = function () {};
      return {
        s: i,
        n: function () {
          return r >= t.length ? { done: !0 } : { done: !1, value: t[r++] };
        },
        e: function (c) {
          throw c;
        },
        f: i,
      };
    }
    throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  }
  var o,
    l = !0,
    u = !1;
  return {
    s: function () {
      n = n.call(t);
    },
    n: function () {
      var c = n.next();
      return (l = c.done), c;
    },
    e: function (c) {
      (u = !0), (o = c);
    },
    f: function () {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw o;
      }
    },
  };
}
function LIn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function Eze(t) {
  var e = LIn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
function OIn() {
  var t,
    e,
    n = new Promise(function (r, i) {
      (t = r), (e = i);
    });
  return (
    (n.used = !1),
    (n.resolve = function () {
      return (n.used = !0), t.apply(void 0, arguments);
    }),
    (n.reject = function () {
      return (n.used = !0), e.apply(void 0, arguments);
    }),
    n
  );
}
var Us = {
    MANIFEST: "manifest",
    NETWORK: "network",
    NETWORK_TIMEOUT: "network_timeout",
    NETWORK_FORBIDDEN: "network_forbidden",
    NETWORK_NOTFOUND: "network_notfound",
    NETWROK_RANGE_NOT_SATISFIABLE: "network_range_not_satisfiable",
    DEMUX: "demux",
    REMUX: "remux",
    MEDIA: "media",
    DRM: "drm",
    OTHER: "other",
    RUNTIME: "runtime",
    SUB_TYPES: {
      FLV: "FLV",
      HLS: "HLS",
      MP4: "MP4",
      FMP4: "FMP4",
      MSE_ADD_SB: "MSE_ADD_SB",
      MSE_APPEND_BUFFER: "MSE_APPEND_BUFFER",
      MSE_OTHER: "MSE_OTHER",
      MSE_FULL: "MSE_FULL",
      OPTION: "OPTION",
      DASH: "DASH",
      LICENSE: "LICENSE",
      CUSTOM_LICENSE: "CUSTOM_LICENSE",
      MSE_HIJACK: "MSE_HIJACK",
      EME_HIJACK: "EME_HIJACK",
      SIDX: "SIDX",
      NO_CANPLAY_ERROR: "NO_CANPLAY_ERROR",
      BUFFERBREAK_ERROR: "BUFFERBREAK_ERROR",
      WAITING_TIMEOUT_ERROR: "WAITING_TIMEOUT_ERROR",
      MEDIA_ERR_ABORTED: "MEDIA_ERR_ABORTED",
      MEDIA_ERR_NETWORK: "MEDIA_ERR_NETWORK",
      MEDIA_ERR_DECODE: "MEDIA_ERR_DECODE",
      MEDIA_ERR_SRC_NOT_SUPPORTED: "MEDIA_ERR_SRC_NOT_SUPPORTED",
      MEDIA_ERR_CODEC_NOT_SUPPORTED: "MEDIA_ERR_CODEC_NOT_SUPPORTED",
      MEDIA_ERR_URL_EMPTY: "MEDIA_ERR_URL_EMPTY",
    },
  },
  GW =
    ($i((mp = {}), Us.MANIFEST, { HLS: 1100, DASH: 1200 }),
    $i(mp, Us.NETWORK, 2100),
    $i(mp, Us.NETWORK_TIMEOUT, 2101),
    $i(mp, Us.NETWORK_FORBIDDEN, 2103),
    $i(mp, Us.NETWORK_NOTFOUND, 2104),
    $i(mp, Us.NETWROK_RANGE_NOT_SATISFIABLE, 2116),
    $i(mp, Us.DEMUX, {
      FLV: 3100,
      HLS: 3200,
      MP4: 3300,
      FMP4: 3400,
      SIDX: 3410,
    }),
    $i(mp, Us.REMUX, { FMP4: 4100, MP4: 4200 }),
    $i(mp, Us.MEDIA, {
      MEDIA_ERR_ABORTED: 5101,
      MEDIA_ERR_NETWORK: 5102,
      MEDIA_ERR_DECODE: 5103,
      MEDIA_ERR_SRC_NOT_SUPPORTED: 5104,
      MEDIA_ERR_CODEC_NOT_SUPPORTED: 5105,
      MEDIA_ERR_URL_EMPTY: 5106,
      MSE_ADD_SB: 5200,
      MSE_APPEND_BUFFER: 5201,
      MSE_OTHER: 5202,
      MSE_FULL: 5203,
      MSE_HIJACK: 5204,
      EME_HIJACK: 5301,
    }),
    $i(mp, Us.DRM, { LICENSE: 7100, CUSTOM_LICENSE: 7200 }),
    $i(mp, Us.OTHER, 8e3),
    $i(mp, Us.RUNTIME, {
      NO_CANPLAY_ERROR: 9001,
      BUFFERBREAK_ERROR: 9002,
      WAITING_TIMEOUT_ERROR: 9003,
    }),
    mp),
  K_ = (function (t) {
    P5(n, n8(Error));
    var e = M5(n);
    function n(r, i, o, l, u) {
      var c;
      return (
        kR(this, n),
        ((c = e.call(this, u || (o == null ? void 0 : o.message))).errorType =
          r === Us.NETWORK_TIMEOUT ? Us.NETWORK : r),
        (c.originError = o),
        (c.ext = l),
        (c.errorCode = GW[r][i] || GW[r]),
        (c.errorMessage = c.message),
        c.errorCode ||
          ((c.errorType = Us.OTHER), (c.errorCode = GW[c.errorType])),
        c
      );
    }
    return (
      IR(n, null, [
        {
          key: "create",
          value: function (r, i, o, l, u) {
            return r instanceof n
              ? r
              : (r instanceof Error && ((o = r), (r = "")),
                r || (r = Us.OTHER),
                new n(r, i, o, l, u));
          },
        },
        {
          key: "network",
          value: function (r) {
            var i;
            return new n(
              r != null && r.isTimeout ? Us.NETWORK_TIMEOUT : Us.NETWORK,
              null,
              r instanceof Error ? r : null,
              {
                url: r == null ? void 0 : r.url,
                response: r == null ? void 0 : r.response,
                httpCode:
                  r == null || (i = r.response) === null || i === void 0
                    ? void 0
                    : i.status,
              }
            );
          },
        },
      ]),
      n
    );
  })(),
  e4 = { DEBUG: 1, LOG: 2, WARN: 3, ERROR: 4 },
  GIn = 204800,
  NIn = ["Boolean", "Number", "String", "Undefined", "Null", "Date", "Object"],
  qx = (function () {
    function t(e, n) {
      kR(this, t),
        (this.name = e || ""),
        (this._prefix = "[".concat(this.name, "]")),
        (this.logCacheLevel = (n == null ? void 0 : n.logCacheLevel) || 3),
        (this.logMaxSize = (n == null ? void 0 : n.logMaxSize) || GIn),
        (this.logSize = 0),
        (this.logTextArray = []);
    }
    return (
      IR(
        t,
        [
          {
            key: "debug",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [e4.DEBUG].concat(r)),
                t.disabled ||
                  (e = console).debug.apply(e, [this._prefix, dM()].concat(r));
            },
          },
          {
            key: "log",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [e4.LOG].concat(r)),
                t.disabled ||
                  (e = console).log.apply(e, [this._prefix, dM()].concat(r));
            },
          },
          {
            key: "warn",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [e4.WARN].concat(r)),
                t.disabled ||
                  (e = console).warn.apply(e, [this._prefix, dM()].concat(r));
            },
          },
          {
            key: "error",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [e4.ERROR].concat(r)),
                t.disabled ||
                  (e = console).error.apply(e, [this._prefix, dM()].concat(r));
            },
          },
          {
            key: "logCache",
            value: function (e) {
              if (!(e < this.logCacheLevel)) {
                var n = "";
                try {
                  for (
                    var r = arguments.length,
                      i = new Array(r > 1 ? r - 1 : 0),
                      o = 1;
                    o < r;
                    o++
                  )
                    i[o - 1] = arguments[o];
                  var l = i.map(function (c) {
                    return Sze(c);
                  });
                  n = this._prefix + dM() + JSON.stringify(l);
                } catch {
                  return;
                }
                if (
                  (e >= this.logCacheLevel &&
                    ((this.logSize += n.length), this.logTextArray.push(n)),
                  this.logSize > this.logMaxSize)
                ) {
                  var u = this.logTextArray.shift();
                  this.logSize -= u.length;
                }
              }
            },
          },
          {
            key: "getLogCache",
            value: function () {
              var e = this.logTextArray.join(`
`);
              return this.reset(), e;
            },
          },
          {
            key: "reset",
            value: function () {
              (this.logTextArray = []), (this.logSize = 0);
            },
          },
          {
            key: "table",
            value: function () {
              var e;
              t.disabled ||
                (console.group(this._prefix),
                (e = console).table.apply(e, arguments),
                console.groupEnd());
            },
          },
          {
            key: "setLogLevel",
            value: function (e) {
              this.logCacheLevel = e;
            },
          },
        ],
        [
          {
            key: "enable",
            value: function () {
              t.disabled = !1;
            },
          },
          {
            key: "disable",
            value: function () {
              t.disabled = !0;
            },
          },
        ]
      ),
      t
    );
  })();
function dM() {
  return new Date().toLocaleString();
}
function FIn(t) {
  if (Jx(t) !== "object") return t;
  var e = Object.prototype.toString.call(t).slice(8, -1);
  switch (e) {
    case "Array":
    case "Uint8Array":
    case "ArrayBuffer":
      return e + "[" + t.length + "]";
    case "Object":
      return "{}";
    default:
      return e;
  }
}
function Sze(t, e, n) {
  n || (n = 1), e || (e = 2);
  var r = {};
  if (!t || Jx(t) !== "object") return t;
  var i = Object.prototype.toString.call(t).slice(8, -1);
  if (!NIn.includes(i)) return i;
  if (!(n > e)) {
    for (var o in t)
      Object.prototype.hasOwnProperty.call(t, o) &&
        (n === e
          ? (r[o] = FIn(t[o]))
          : Jx(t[o]) === "object"
          ? (r[o] = Sze(t[o], e, n + 1))
          : (r[o] = t[o]));
    return r;
  }
}
$i(qx, "disabled", !0);
var _S = { FETCH: "fetch", XHR: "xhr" },
  eL = { ARRAY_BUFFER: "arraybuffer", TEXT: "text", JSON: "json" },
  iv = (function (t) {
    P5(n, n8(Error));
    var e = M5(n);
    function n(r, i, o, l) {
      var u;
      return (
        kR(this, n),
        $i(la((u = e.call(this, l))), "retryCount", 0),
        $i(la(u), "isTimeout", !1),
        $i(la(u), "loaderType", _S.FETCH),
        $i(la(u), "startTime", 0),
        $i(la(u), "endTime", 0),
        $i(la(u), "options", {}),
        (u.url = r),
        (u.request = i),
        (u.response = o),
        u
      );
    }
    return IR(n);
  })(),
  Rze = Object.prototype.toString;
function UIn(t) {
  return t !== null && Jx(t) === "object";
}
function NSe(t) {
  if (Rze.call(t) !== "[object Object]") return !1;
  var e = Object.getPrototypeOf(t);
  return e === null || e === Object.prototype;
}
function BIn(t) {
  return Rze.call(t) === "[object Date]";
}
function Aze(t) {
  if (
    t &&
    t[0] !== null &&
    t[0] !== void 0 &&
    (t[0] !== 0 || (t[1] !== null && t[1] !== void 0))
  ) {
    var e = "bytes=" + t[0] + "-";
    return t[1] && (e += t[1]), e;
  }
}
function FSe(t) {
  return encodeURIComponent(t)
    .replace(/%3A/gi, ":")
    .replace(/%24/g, "$")
    .replace(/%2C/gi, ",")
    .replace(/%20/g, "+")
    .replace(/%5B/gi, "[")
    .replace(/%5D/gi, "]");
}
function wze(t, e) {
  if (t) {
    if (!e) return t;
    var n,
      r = Object.keys(e)
        .map(function (o) {
          if ((n = e[o]) != null)
            return (
              Array.isArray(n) ? (o += "[]") : (n = [n]),
              n
                .map(function (l) {
                  return (
                    BIn(l)
                      ? (l = l.toISOString())
                      : UIn(l) && (l = JSON.stringify(l)),
                    "".concat(FSe(o), "=").concat(FSe(l))
                  );
                })
                .join("&")
            );
        })
        .filter(Boolean)
        .join("&");
    if (r) {
      var i = t.indexOf("#");
      i !== -1 && (t = t.slice(0, i)),
        (t += (t.indexOf("?") === -1 ? "?" : "&") + r);
    }
    return t;
  }
}
function Rne(t, e, n, r, i, o, l, u, c, d, h) {
  return (
    (i = i != null ? parseFloat(i) : null),
    (r = parseInt(r || "0", 10)),
    Number.isNaN(r) && (r = 0),
    {
      data: t,
      done: e,
      options: {
        range: c,
        vid: d,
        index: u,
        contentLength: r,
        age: i,
        startTime: o,
        firstByteTime: l,
        endTime: Date.now(),
        priOptions: h,
      },
      response: n,
    }
  );
}
function Ane(t, e) {
  return Math.round((8 * t * 1e3) / e / 1024);
}
var ou = {
    ERROR: "error",
    TTFB: "core.ttfb",
    LOAD_START: "core.loadstart",
    LOAD_RESPONSE_HEADERS: "core.loadresponseheaders",
    LOAD_COMPLETE: "core.loadcomplete",
    LOAD_RETRY: "core.loadretry",
    SOURCEBUFFER_CREATED: "core.sourcebuffercreated",
    ANALYZE_DURATION_EXCEEDED: "core.analyzedurationexceeded",
    REMOVE_BUFFER: "core.removebuffer",
    BUFFEREOS: "core.buffereos",
    KEYFRAME: "core.keyframe",
    METADATA_PARSED: "core.metadataparsed",
    SEI: "core.sei",
    SEI_IN_TIME: "core.seiintime",
    FLV_SCRIPT_DATA: "core.flvscriptdata",
    LOWDECODE: "core.lowdecode",
    SWITCH_URL_SUCCESS: "core.switchurlsuccess",
    SWITCH_URL_FAILED: "core.switchurlfailed",
    SPEED: "core.speed",
    HLS_MANIFEST_LOADED: "core.hlsmanifestloaded",
    HLS_LEVEL_LOADED: "core.hlslevelloaded",
    DEMUXED_TRACK: "core.demuxedtrack",
    STREAM_EXCEPTION: "core.streamexception",
    LARGE_AV_FIRST_FRAME_GAP_DETECT: "LARGE_AV_FIRST_FRAME_GAP_DETECT",
    LARGE_VIDEO_DTS_GAP_DETECT: "LARGE_VIDEO_DTS_GAP_DETECT",
    LARGE_AUDIO_DTS_GAP_DETECT: "LARGE_AUDIO_DTS_GAP_DETECT",
    AUDIO_GAP_DETECT: "AUDIO_GAP_DETECT",
    AUDIO_OVERLAP_DETECT: "AUDIO_OVERLAP_DETECT",
    MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT:
      "MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",
    REAL_TIME_SPEED: "real_time_speed",
  },
  USe = 2097152,
  wne = (function (t) {
    P5(r, Pl);
    var e,
      n = M5(r);
    function r() {
      var i;
      return (
        kR(this, r),
        $i(la((i = n.call(this))), "_abortController", null),
        $i(la(i), "_timeoutTimer", null),
        $i(la(i), "_reader", null),
        $i(la(i), "_response", null),
        $i(la(i), "_aborted", !1),
        $i(la(i), "_index", -1),
        $i(la(i), "_range", null),
        $i(la(i), "_receivedLength", 0),
        $i(la(i), "_running", !1),
        $i(la(i), "_logger", null),
        $i(la(i), "_vid", ""),
        $i(la(i), "_onProcessMinLen", 0),
        $i(la(i), "_onCancel", null),
        $i(la(i), "_priOptions", null),
        i
      );
    }
    return (
      IR(
        r,
        [
          {
            key: "load",
            value: function (i) {
              var o,
                l = this,
                u = i.url,
                c = i.vid,
                d = i.timeout,
                h = i.responseType,
                f = i.onProgress,
                p = i.index,
                g = i.onTimeout,
                y = i.onCancel,
                v = i.range,
                b = i.transformResponse,
                w = i.request,
                k = i.params,
                D = i.logger,
                $ = i.method,
                N = i.headers,
                P = i.body,
                I = i.mode,
                O = i.credentials,
                X = i.cache,
                G = i.redirect,
                H = i.referrer,
                E = i.referrerPolicy,
                S = i.onProcessMinLen,
                L = i.priOptions;
              (this._logger = D),
                (this._aborted = !1),
                (this._onProcessMinLen = S),
                (this._onCancel = y),
                (this._abortController =
                  typeof AbortController < "u" && new AbortController()),
                (this._running = !0),
                (this._index = p),
                (this._range = v || [0, 0]),
                (this._vid = c || u),
                (this._priOptions = L || {});
              var W = {
                  method: $,
                  headers: N,
                  body: P,
                  mode: I,
                  credentials: O,
                  cache: X,
                  redirect: G,
                  referrer: H,
                  referrerPolicy: E,
                  signal:
                    (o = this._abortController) === null || o === void 0
                      ? void 0
                      : o.signal,
                },
                F = !1;
              clearTimeout(this._timeoutTimer), (u = wze(u, k));
              var oe = Aze(v);
              oe &&
                ((N = w
                  ? w.headers
                  : (W.headers = W.headers || (Headers ? new Headers() : {}))),
                Headers && N instanceof Headers
                  ? N.append("Range", oe)
                  : (N.Range = oe)),
                d &&
                  (this._timeoutTimer = setTimeout(function () {
                    if (((F = !0), l.cancel(), g)) {
                      var Xe = new iv(u, W, null, "timeout");
                      (Xe.isTimeout = !0),
                        g(Xe, {
                          index: l._index,
                          range: l._range,
                          vid: l._vid,
                          priOptions: l._priOptions,
                        });
                    }
                  }, d));
              var De = Date.now();
              return (
                this._logger.debug(
                  "[fetch load start], index,",
                  p,
                  ",range,",
                  v
                ),
                new Promise(function (Xe, ze) {
                  fetch(w || u, w ? void 0 : W)
                    .then(
                      (function () {
                        var ht = oI(
                          Lp().mark(function gt(pt) {
                            var $t, ot, tt, He;
                            return Lp().wrap(function (de) {
                              for (;;)
                                switch ((de.prev = de.next)) {
                                  case 0:
                                    if (
                                      (clearTimeout(l._timeoutTimer),
                                      (l._response = pt),
                                      !l._aborted && l._running)
                                    ) {
                                      de.next = 4;
                                      break;
                                    }
                                    return de.abrupt("return");
                                  case 4:
                                    if ((b && (pt = b(pt, u) || pt), pt.ok)) {
                                      de.next = 7;
                                      break;
                                    }
                                    throw new iv(
                                      u,
                                      W,
                                      pt,
                                      "bad network response"
                                    );
                                  case 7:
                                    if ((($t = Date.now()), h !== eL.TEXT)) {
                                      de.next = 15;
                                      break;
                                    }
                                    return (de.next = 11), pt.text();
                                  case 11:
                                    (ot = de.sent),
                                      (l._running = !1),
                                      (de.next = 37);
                                    break;
                                  case 15:
                                    if (h !== eL.JSON) {
                                      de.next = 22;
                                      break;
                                    }
                                    return (de.next = 18), pt.json();
                                  case 18:
                                    (ot = de.sent),
                                      (l._running = !1),
                                      (de.next = 37);
                                    break;
                                  case 22:
                                    if (!f) {
                                      de.next = 29;
                                      break;
                                    }
                                    return (
                                      (l.resolve = Xe),
                                      (l.reject = ze),
                                      l._loadChunk(pt, f, De, $t),
                                      de.abrupt("return")
                                    );
                                  case 29:
                                    return (de.next = 31), pt.arrayBuffer();
                                  case 31:
                                    (ot = de.sent),
                                      (ot = new Uint8Array(ot)),
                                      (l._running = !1),
                                      (tt = Date.now() - De),
                                      (He = Ane(ot.byteLength, tt)),
                                      l.emit(ou.REAL_TIME_SPEED, {
                                        speed: He,
                                        len: ot.byteLength,
                                        time: tt,
                                        vid: l._vid,
                                        index: l._index,
                                        range: l._range,
                                        priOptions: l._priOptions,
                                      });
                                  case 37:
                                    l._logger.debug(
                                      "[fetch load end], index,",
                                      p,
                                      ",range,",
                                      v
                                    ),
                                      Xe(
                                        Rne(
                                          ot,
                                          !0,
                                          pt,
                                          pt.headers.get("Content-Length"),
                                          pt.headers.get("age"),
                                          De,
                                          $t,
                                          p,
                                          v,
                                          l._vid,
                                          l._priOptions
                                        )
                                      );
                                  case 39:
                                  case "end":
                                    return de.stop();
                                }
                            }, gt);
                          })
                        );
                        return function (gt) {
                          return ht.apply(this, arguments);
                        };
                      })()
                    )
                    .catch(function (ht) {
                      var gt;
                      clearTimeout(l._timeoutTimer),
                        (l._running = !1),
                        (l._aborted && !F) ||
                          (((ht =
                            ht instanceof iv
                              ? ht
                              : new iv(
                                  u,
                                  W,
                                  null,
                                  (gt = ht) === null || gt === void 0
                                    ? void 0
                                    : gt.message
                                )).startTime = De),
                          (ht.endTime = Date.now()),
                          (ht.isTimeout = F),
                          (ht.options = {
                            index: l._index,
                            range: l._range,
                            vid: l._vid,
                            priOptions: l._priOptions,
                          }),
                          ze(ht));
                    });
                })
              );
            },
          },
          {
            key: "cancel",
            value:
              ((e = oI(
                Lp().mark(function i() {
                  return Lp().wrap(
                    function (o) {
                      for (;;)
                        switch ((o.prev = o.next)) {
                          case 0:
                            if (!this._aborted) {
                              o.next = 2;
                              break;
                            }
                            return o.abrupt("return");
                          case 2:
                            if (
                              ((this._aborted = !0),
                              (this._running = !1),
                              !this._response)
                            ) {
                              o.next = 14;
                              break;
                            }
                            if (((o.prev = 5), !this._reader)) {
                              o.next = 9;
                              break;
                            }
                            return (o.next = 9), this._reader.cancel();
                          case 9:
                            o.next = 13;
                            break;
                          case 11:
                            (o.prev = 11), (o.t0 = o.catch(5));
                          case 13:
                            this._response = this._reader = null;
                          case 14:
                            if (this._abortController) {
                              try {
                                this._abortController.abort();
                              } catch {}
                              this._abortController = null;
                            }
                            this._onCancel &&
                              this._onCancel({
                                index: this._index,
                                range: this._range,
                                vid: this._vid,
                                priOptions: this._priOptions,
                              });
                          case 16:
                          case "end":
                            return o.stop();
                        }
                    },
                    i,
                    this,
                    [[5, 11]]
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_loadChunk",
            value: function (i, o, l, u) {
              var c = this;
              if (!i.body || !i.body.getReader) {
                this._running = !1;
                var d = new iv(
                  i.url,
                  "",
                  i,
                  "onProgress of bad response.body.getReader"
                );
                return (
                  (d.options = {
                    index: this._index,
                    range: this._range,
                    vid: this._vid,
                    priOptions: this._priOptions,
                  }),
                  void this.reject(d)
                );
              }
              this._onProcessMinLen > 0 &&
                ((this._cache = new Uint8Array(USe)), (this._writeIdx = 0));
              var h,
                f,
                p,
                g = (this._reader = i.body.getReader()),
                y = (function () {
                  var v = oI(
                    Lp().mark(function b() {
                      var w, k, D, $, N, P, I, O;
                      return Lp().wrap(
                        function (X) {
                          for (;;)
                            switch ((X.prev = X.next)) {
                              case 0:
                                return (
                                  (f = Date.now()),
                                  (X.prev = 1),
                                  (X.next = 4),
                                  g.read()
                                );
                              case 4:
                                (h = X.sent), (p = Date.now()), (X.next = 13);
                                break;
                              case 8:
                                return (
                                  (X.prev = 8),
                                  (X.t0 = X.catch(1)),
                                  (p = Date.now()),
                                  c._aborted ||
                                    ((c._running = !1),
                                    (X.t0.options = {
                                      index: c._index,
                                      range: c._range,
                                      vid: c._vid,
                                      priOptions: c._priOptions,
                                    }),
                                    c.reject(X.t0)),
                                  X.abrupt("return")
                                );
                              case 13:
                                if (
                                  ((k =
                                    ((w = c._range) === null || w === void 0
                                      ? void 0
                                      : w.length) > 0
                                      ? c._range[0]
                                      : 0),
                                  (D = k + c._receivedLength),
                                  !c._aborted)
                                ) {
                                  X.next = 19;
                                  break;
                                }
                                return (
                                  (c._running = !1),
                                  o(
                                    void 0,
                                    !1,
                                    {
                                      range: [D, D],
                                      vid: c._vid,
                                      index: c._index,
                                      startTime: f,
                                      endTime: p,
                                      st: l,
                                      firstByteTime: u,
                                      priOptions: c._priOptions,
                                    },
                                    i
                                  ),
                                  X.abrupt("return")
                                );
                              case 19:
                                ($ = h.value ? h.value.byteLength : 0),
                                  (c._receivedLength += $),
                                  c._logger.debug(
                                    "【fetchLoader,onProgress call】,task,",
                                    c._range,
                                    ", start,",
                                    D,
                                    ", end,",
                                    k + c._receivedLength,
                                    ", done,",
                                    h.done
                                  ),
                                  c._onProcessMinLen > 0
                                    ? c._writeIdx + $ >= c._onProcessMinLen ||
                                      h.done
                                      ? ((N = new Uint8Array(
                                          c._writeIdx + $
                                        )).set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        $ > 0 && N.set(h.value, c._writeIdx),
                                        (c._writeIdx = 0),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress enough】,done,",
                                          h.done,
                                          ",len,",
                                          N.byteLength,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : $ > 0 && c._writeIdx + $ < USe
                                      ? (c._cache.set(h.value, c._writeIdx),
                                        (c._writeIdx += $),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress cache】,len,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : $ > 0 &&
                                        ((P = new Uint8Array(
                                          c._writeIdx + $ + 2048
                                        )),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra start】,size,",
                                          c._writeIdx + $ + 2048,
                                          ", datalen,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ),
                                        P.set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        $ > 0 && P.set(h.value, c._writeIdx),
                                        (c._writeIdx += $),
                                        delete c._cache,
                                        (c._cache = P),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra end】,len,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                    : (N = h.value),
                                  ((N && N.byteLength > 0) || h.done) &&
                                    o(
                                      N,
                                      h.done,
                                      {
                                        range: [
                                          c._range[0] +
                                            c._receivedLength -
                                            (N ? N.byteLength : 0),
                                          c._range[0] + c._receivedLength,
                                        ],
                                        vid: c._vid,
                                        index: c._index,
                                        startTime: f,
                                        endTime: p,
                                        st: l,
                                        firstByteTime: u,
                                        priOptions: c._priOptions,
                                      },
                                      i
                                    ),
                                  h.done
                                    ? ((I = Date.now() - l),
                                      (O = Ane(c._receivedLength, I)),
                                      c.emit(ou.REAL_TIME_SPEED, {
                                        speed: O,
                                        len: c._receivedLength,
                                        time: I,
                                        vid: c._vid,
                                        index: c._index,
                                        range: c._range,
                                        priOptions: c._priOptions,
                                      }),
                                      (c._running = !1),
                                      c._logger.debug(
                                        "[fetchLoader onProgress end],task,",
                                        c._range,
                                        ",done,",
                                        h.done
                                      ),
                                      c.resolve(
                                        Rne(
                                          h,
                                          !0,
                                          i,
                                          i.headers.get("Content-Length"),
                                          i.headers.get("age"),
                                          l,
                                          u,
                                          c._index,
                                          c._range,
                                          c._vid,
                                          c._priOptions
                                        )
                                      ))
                                    : y();
                              case 25:
                              case "end":
                                return X.stop();
                            }
                        },
                        b,
                        null,
                        [[1, 8]]
                      );
                    })
                  );
                  return function () {
                    return v.apply(this, arguments);
                  };
                })();
              y();
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (i) {
              this._running = i;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return !(typeof fetch > "u");
            },
          },
        ]
      ),
      r
    );
  })();
function HIn(t) {
  return Ene(
    {
      loaderType: _S.FETCH,
      retry: 0,
      retryDelay: 0,
      timeout: 0,
      request: null,
      onTimeout: void 0,
      onProgress: void 0,
      onRetryError: void 0,
      transformRequest: void 0,
      transformResponse: void 0,
      transformError: void 0,
      responseType: eL.TEXT,
      range: void 0,
      url: "",
      params: void 0,
      method: "GET",
      headers: {},
      body: void 0,
      mode: void 0,
      credentials: void 0,
      cache: void 0,
      redirect: void 0,
      referrer: void 0,
      referrerPolicy: void 0,
      integrity: void 0,
      onProcessMinLen: 0,
    },
    t
  );
}
var XIn = (function (t) {
    P5(n, Pl);
    var e = M5(n);
    function n() {
      var r;
      return (
        kR(this, n),
        $i(la((r = e.call(this))), "_xhr", null),
        $i(la(r), "_aborted", !1),
        $i(la(r), "_timeoutTimer", null),
        $i(la(r), "_range", null),
        $i(la(r), "_receivedLength", 0),
        $i(la(r), "_url", null),
        $i(la(r), "_onProgress", null),
        $i(la(r), "_index", -1),
        $i(la(r), "_headers", null),
        $i(la(r), "_currentChunkSizeKB", 384),
        $i(la(r), "_timeout", null),
        $i(la(r), "_xhr", null),
        $i(la(r), "_withCredentials", null),
        $i(la(r), "_startTime", -1),
        $i(la(r), "_loadCompleteResolve", null),
        $i(la(r), "_loadCompleteReject", null),
        $i(la(r), "_runing", !1),
        $i(la(r), "_logger", !1),
        $i(la(r), "_vid", ""),
        $i(la(r), "_responseType", void 0),
        $i(la(r), "_credentials", void 0),
        $i(la(r), "_method", void 0),
        $i(la(r), "_transformResponse", void 0),
        $i(la(r), "_firstRtt", void 0),
        $i(la(r), "_onCancel", null),
        $i(la(r), "_priOptions", null),
        r
      );
    }
    return (
      IR(
        n,
        [
          {
            key: "load",
            value: function (r) {
              var i = this;
              clearTimeout(this._timeoutTimer),
                (this._logger = r.logger),
                (this._range = r.range),
                (this._onProgress = r.onProgress),
                (this._index = r.index),
                (this._headers = r.headers),
                (this._withCredentials =
                  r.credentials === "include" ||
                  r.credentials === "same-origin"),
                (this._body = r.body || null),
                r.method && (this._method = r.method),
                (this._timeout = r.timeout || null),
                (this._runing = !0),
                (this._vid = r.vid || r.url),
                (this._responseType = r.responseType),
                (this._firstRtt = -1),
                (this._onTimeout = r.onTimeout),
                (this._onCancel = r.onCancel),
                (this._request = r.request),
                (this._priOptions = r.priOptions || {}),
                this._logger.debug("【xhrLoader task】, range", this._range),
                (this._url = wze(r.url, r.params));
              var o = Date.now();
              return new Promise(function (l, u) {
                (i._loadCompleteResolve = l),
                  (i._loadCompleteReject = u),
                  i._startLoad();
              }).catch(function (l) {
                if (
                  (clearTimeout(i._timeoutTimer), (i._runing = !1), !i._aborted)
                )
                  throw (
                    (((l =
                      l instanceof iv
                        ? l
                        : new iv(i._url, i._request)).startTime = o),
                    (l.endTime = Date.now()),
                    (l.options = {
                      index: i._index,
                      vid: i._vid,
                      priOptions: i._priOptions,
                    }),
                    l)
                  );
              });
            },
          },
          {
            key: "_startLoad",
            value: function () {
              var r = null;
              if (
                this._responseType === eL.ARRAY_BUFFER &&
                this._range &&
                this._range.length > 1
              )
                if (this._onProgress) {
                  this._firstRtt = -1;
                  var i = 1024 * this._currentChunkSizeKB,
                    o = this._range[0] + this._receivedLength,
                    l = this._range[1];
                  i < this._range[1] - o && (l = o + i),
                    (r = [o, l]),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", SubRange, ",
                      r
                    );
                } else
                  (r = this._range),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", allRange, ",
                      r
                    );
              this._internalOpen(r);
            },
          },
          {
            key: "_internalOpen",
            value: function (r) {
              var i = this;
              try {
                this._startTime = Date.now();
                var o = (this._xhr = new XMLHttpRequest());
                o.open(this._method || "GET", this._url, !0),
                  (o.responseType = this._responseType),
                  this._timeout && (o.timeout = this._timeout),
                  (o.withCredentials = this._withCredentials),
                  (o.onload = this._onLoad.bind(this)),
                  (o.onreadystatechange = this._onReadyStatechange.bind(this)),
                  (o.onerror = function (c) {
                    var d, h, f;
                    i._running = !1;
                    var p = new iv(
                      i._url,
                      i._request,
                      c == null ||
                      (d = c.currentTarget) === null ||
                      d === void 0
                        ? void 0
                        : d.response,
                      "xhr.onerror.status:" +
                        (c == null ||
                        (h = c.currentTarget) === null ||
                        h === void 0
                          ? void 0
                          : h.status) +
                        ",statusText," +
                        (c == null ||
                        (f = c.currentTarget) === null ||
                        f === void 0
                          ? void 0
                          : f.statusText)
                    );
                    (p.options = {
                      index: i._index,
                      range: i._range,
                      vid: i._vid,
                      priOptions: i._priOptions,
                    }),
                      i._loadCompleteReject(p);
                  }),
                  (o.ontimeout = function (c) {
                    i.cancel();
                    var d = new iv(
                      i._url,
                      i._request,
                      { status: 408 },
                      "timeout"
                    );
                    i._onTimeout &&
                      ((d.isTimeout = !0),
                      i._onTimeout(d, {
                        index: i._index,
                        range: i._range,
                        vid: i._vid,
                        priOptions: i._priOptions,
                      })),
                      (d.options = {
                        index: i._index,
                        range: i._range,
                        vid: i._vid,
                        priOptions: i._priOptions,
                      }),
                      i._loadCompleteReject(d);
                  });
                var l = this._headers || {},
                  u = Aze(r);
                u && (l.Range = u),
                  l &&
                    Object.keys(l).forEach(function (c) {
                      o.setRequestHeader(c, l[c]);
                    }),
                  this._logger.debug(
                    "[xhr.send->] tast,",
                    this._range,
                    ",load sub range, ",
                    r
                  ),
                  o.send(this._body);
              } catch (c) {
                (c.options = {
                  index: this._index,
                  range: r,
                  vid: this._vid,
                  priOptions: this._priOptions,
                }),
                  this._loadCompleteReject(c);
              }
            },
          },
          {
            key: "_onReadyStatechange",
            value: function (r) {
              r.target.readyState === 2 &&
                this._firstRtt < 0 &&
                (this._firstRtt = Date.now());
            },
          },
          {
            key: "_onLoad",
            value: function (r) {
              var i,
                o = r.target.status;
              if (o < 200 || o > 299) {
                var l = new iv(
                  this._url,
                  null,
                  Ene(Ene({}, r.target.response), {}, { status: o }),
                  "bad response,status:" + o
                );
                return (
                  (l.options = {
                    index: this._index,
                    range: this._range,
                    vid: this._vid,
                    priOptions: this._priOptions,
                  }),
                  this._loadCompleteReject(l)
                );
              }
              var u,
                c = null,
                d = !1,
                h =
                  ((i = this._range) === null || i === void 0
                    ? void 0
                    : i.length) > 0
                    ? this._range[0]
                    : 0;
              if (this._responseType === eL.ARRAY_BUFFER) {
                var f,
                  p = new Uint8Array(r.target.response);
                if (((u = h + this._receivedLength), p && p.byteLength > 0)) {
                  this._receivedLength += p.byteLength;
                  var g = Date.now() - this._startTime,
                    y = Ane(this._receivedLength, g);
                  this.emit(ou.REAL_TIME_SPEED, {
                    speed: y,
                    len: this._receivedLength,
                    time: g,
                    vid: this._vid,
                    index: this._index,
                    range: [u, h + this._receivedLength],
                    priOptions: this._priOptions,
                  });
                }
                (c = p),
                  (d = !(
                    ((f = this._range) === null || f === void 0
                      ? void 0
                      : f.length) > 1 &&
                    this._range[1] &&
                    this._receivedLength < this._range[1] - this._range[0]
                  )),
                  this._logger.debug(
                    "[xhr load done->], tast :",
                    this._range,
                    ", start",
                    u,
                    "end ",
                    h + this._receivedLength,
                    ",dataLen,",
                    p ? p.byteLength : 0,
                    ",receivedLength",
                    this._receivedLength,
                    ",index,",
                    this._index,
                    ", done,",
                    d
                  );
              } else (d = !0), (c = r.target.response);
              var v = {
                ok: o >= 200 && o < 300,
                status: o,
                statusText: this._xhr.statusText,
                url: this._xhr.responseURL,
                headers: this._getHeaders(this._xhr),
                body: this._xhr.response,
              };
              this._transformResponse &&
                (v = this._transformResponse(v, this._url) || v),
                this._onProgress &&
                  this._onProgress(
                    c,
                    d,
                    {
                      index: this._index,
                      vid: this._vid,
                      range: [u, h + this._receivedLength],
                      startTime: this._startTime,
                      endTime: Date.now(),
                      priOptions: this._priOptions,
                    },
                    v
                  ),
                d
                  ? ((this._runing = !1),
                    this._loadCompleteResolve &&
                      this._loadCompleteResolve(
                        Rne(
                          this._onProgress ? null : c,
                          d,
                          v,
                          v.headers["content-length"],
                          v.headers.age,
                          this._startTime,
                          this._firstRtt,
                          this._index,
                          this._range,
                          this._vid,
                          this._priOptions
                        )
                      ))
                  : this._startLoad();
            },
          },
          {
            key: "cancel",
            value: function () {
              if (!this._aborted)
                return (
                  (this._aborted = !0),
                  (this._runing = !1),
                  Sne(YI(n.prototype), "removeAllListeners", this).call(this),
                  this._onCancel &&
                    this._onCancel({
                      index: this._index,
                      range: this._range,
                      vid: this._vid,
                      priOptions: this._priOptions,
                    }),
                  this._xhr ? this._xhr.abort() : void 0
                );
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (r) {
              this._running = r;
            },
          },
          {
            key: "_getHeaders",
            value: function (r) {
              var i,
                o = {},
                l = xIn(
                  r.getAllResponseHeaders().trim().split(`\r
`)
                );
              try {
                for (l.s(); !(i = l.n()).done; ) {
                  var u = i.value.split(": ");
                  o[u[0].toLowerCase()] = u.slice(1).join(": ");
                }
              } catch (c) {
                l.e(c);
              } finally {
                l.f();
              }
              return o;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return typeof XMLHttpRequest < "u";
            },
          },
        ]
      ),
      n
    );
  })(),
  VIn = ["retry", "retryDelay", "onRetryError", "transformError"],
  zIn = (function () {
    function t(n, r) {
      kR(this, t),
        (this.promise = OIn()),
        (this.alive = !!r.onProgress),
        !r.logger && (r.logger = new qx("Loader")),
        (this._loaderType = n),
        (this._loader =
          n === _S.FETCH && typeof fetch < "u" ? new wne() : new XIn()),
        (this._config = r),
        (this._retryCount = 0),
        (this._retryTimer = null),
        (this._canceled = !1),
        (this._retryCheckFunc = r.retryCheckFunc),
        (this._logger = r.logger);
    }
    var e;
    return (
      IR(t, [
        {
          key: "exec",
          value: function () {
            var n = this,
              r = this._config,
              i = r.retry,
              o = r.retryDelay,
              l = r.onRetryError,
              u = r.transformError,
              c = PIn(r, VIn),
              d = (function () {
                var h = oI(
                  Lp().mark(function f() {
                    var p, g, y;
                    return Lp().wrap(
                      function (v) {
                        for (;;)
                          switch ((v.prev = v.next)) {
                            case 0:
                              return (
                                (v.prev = 0), (v.next = 3), n._loader.load(c)
                              );
                            case 3:
                              (p = v.sent), n.promise.resolve(p), (v.next = 27);
                              break;
                            case 7:
                              if (
                                ((v.prev = 7),
                                (v.t0 = v.catch(0)),
                                (n._loader.running = !1),
                                n._logger.debug(
                                  "[task request catch err]",
                                  v.t0
                                ),
                                !n._canceled)
                              ) {
                                v.next = 13;
                                break;
                              }
                              return v.abrupt("return");
                            case 13:
                              if (
                                ((v.t0.loaderType = n._loaderType),
                                (v.t0.retryCount = n._retryCount),
                                (g = v.t0),
                                u && (g = u(g) || g),
                                l &&
                                  n._retryCount > 0 &&
                                  l(g, n._retryCount, {
                                    index: c.index,
                                    vid: c.vid,
                                    range: c.range,
                                    priOptions: c.priOptions,
                                  }),
                                n._retryCount++,
                                (y = !0),
                                n._retryCheckFunc &&
                                  (y = n._retryCheckFunc(v.t0)),
                                !(y && n._retryCount <= i))
                              ) {
                                v.next = 26;
                                break;
                              }
                              return (
                                clearTimeout(n._retryTimer),
                                n._logger.debug(
                                  "[task request setTimeout],retry",
                                  n._retryCount,
                                  ",retry range,",
                                  c.range
                                ),
                                (n._retryTimer = setTimeout(d, o)),
                                v.abrupt("return")
                              );
                            case 26:
                              n.promise.reject(g);
                            case 27:
                            case "end":
                              return v.stop();
                          }
                      },
                      f,
                      null,
                      [[0, 7]]
                    );
                  })
                );
                return function () {
                  return h.apply(this, arguments);
                };
              })();
            return d(), this.promise;
          },
        },
        {
          key: "cancel",
          value:
            ((e = oI(
              Lp().mark(function n() {
                return Lp().wrap(
                  function (r) {
                    for (;;)
                      switch ((r.prev = r.next)) {
                        case 0:
                          return (
                            clearTimeout(this._retryTimer),
                            (this._canceled = !0),
                            (this._loader.running = !1),
                            r.abrupt("return", this._loader.cancel())
                          );
                        case 4:
                        case "end":
                          return r.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "running",
          get: function () {
            return this._loader && this._loader.running;
          },
        },
        {
          key: "loader",
          get: function () {
            return this._loader;
          },
        },
      ]),
      t
    );
  })();
function jIn() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
  return new Promise(function (e) {
    return setTimeout(e, t);
  });
}
var WIn = (function (t) {
    P5(r, Pl);
    var e,
      n = M5(r);
    function r(i) {
      var o;
      return (
        kR(this, r),
        $i(la((o = n.call(this, i))), "type", _S.FETCH),
        $i(la(o), "_queue", []),
        $i(la(o), "_alive", []),
        $i(la(o), "_currentTask", null),
        $i(la(o), "_finnalUrl", ""),
        $i(la(o), "_config", void 0),
        (o._config = HIn(i)),
        (o._config.loaderType !== _S.XHR && wne.isSupported()) ||
          (o.type = _S.XHR),
        (o.log = i.logger),
        o
      );
    }
    return (
      IR(
        r,
        [
          {
            key: "isFetch",
            value: function () {
              return this.type === _S.FETCH;
            },
          },
          {
            key: "load",
            value: function (i) {
              var o = this,
                l =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {};
              typeof i != "string" && i
                ? (l = i)
                : (l.url = i || l.url || this._config.url),
                (l = Object.assign({}, this._config, l)).params &&
                  (l.params = Object.assign({}, l.params)),
                l.headers &&
                  NSe(l.headers) &&
                  (l.headers = Object.assign({}, l.headers)),
                l.body && NSe(l.body) && (l.body = Object.assign({}, l.body)),
                l.transformRequest && (l = l.transformRequest(l) || l),
                (l.logger = this.log);
              var u = new zIn(this.type, l);
              return (
                u.loader.on(ou.REAL_TIME_SPEED, function (c) {
                  o.emit(ou.REAL_TIME_SPEED, c);
                }),
                this._queue.push(u),
                this._queue.length !== 1 ||
                  (this._currentTask && this._currentTask.running) ||
                  this._processTask(),
                u.promise
              );
            },
          },
          {
            key: "cancel",
            value:
              ((e = oI(
                Lp().mark(function i() {
                  var o;
                  return Lp().wrap(
                    function (l) {
                      for (;;)
                        switch ((l.prev = l.next)) {
                          case 0:
                            return (
                              (o = this._queue
                                .map(function (u) {
                                  return u.cancel();
                                })
                                .concat(
                                  this._alive.map(function (u) {
                                    return u.cancel();
                                  })
                                )),
                              this._currentTask &&
                                o.push(this._currentTask.cancel()),
                              (this._queue = []),
                              (this._alive = []),
                              (l.next = 6),
                              Promise.all(o)
                            );
                          case 6:
                            return (l.next = 8), jIn();
                          case 8:
                          case "end":
                            return l.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_processTask",
            value: function () {
              var i = this;
              if (
                ((this._currentTask = this._queue.shift()), this._currentTask)
              ) {
                this._currentTask.alive && this._alive.push(this._currentTask);
                var o = this._currentTask.exec().catch(function (l) {});
                o &&
                  typeof o.finally == "function" &&
                  o.finally(function () {
                    var l, u;
                    (l = i._currentTask) !== null &&
                      l !== void 0 &&
                      l.alive &&
                      ((u = i._alive) === null || u === void 0
                        ? void 0
                        : u.length) > 0 &&
                      (i._alive = i._alive.filter(function (c) {
                        return c && c !== i._currentTask;
                      })),
                      i._processTask();
                  });
              }
            },
          },
        ],
        [
          {
            key: "isFetchSupport",
            value: function () {
              return wne.isSupported();
            },
          },
        ]
      ),
      r
    );
  })(),
  r8 = {
    RTC_STATE_CHANGE: "core.rtcstatechange",
    RTC_NETWORK: "core.rtcnetwork",
  },
  kp = {},
  kze = {},
  Ize = { exports: {} },
  BSe = (Ize.exports = {
    v: [{ name: "version", reg: /^(\d*)$/ }],
    o: [
      {
        name: "origin",
        reg: /^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,
        names: [
          "username",
          "sessionId",
          "sessionVersion",
          "netType",
          "ipVer",
          "address",
        ],
        format: "%s %s %d %s IP%d %s",
      },
    ],
    s: [{ name: "name" }],
    i: [{ name: "description" }],
    u: [{ name: "uri" }],
    e: [{ name: "email" }],
    p: [{ name: "phone" }],
    z: [{ name: "timezones" }],
    r: [{ name: "repeats" }],
    t: [
      {
        name: "timing",
        reg: /^(\d*) (\d*)/,
        names: ["start", "stop"],
        format: "%d %d",
      },
    ],
    c: [
      {
        name: "connection",
        reg: /^IN IP(\d) (\S*)/,
        names: ["version", "ip"],
        format: "IN IP%d %s",
      },
    ],
    b: [
      {
        push: "bandwidth",
        reg: /^(TIAS|AS|CT|RR|RS):(\d*)/,
        names: ["type", "limit"],
        format: "%s:%s",
      },
    ],
    m: [
      {
        reg: /^(\w*) (\d*) ([\w/]*)(?: (.*))?/,
        names: ["type", "port", "protocol", "payloads"],
        format: "%s %d %s %s",
      },
    ],
    a: [
      {
        push: "rtp",
        reg: /^rtpmap:(\d*) ([\w\-.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,
        names: ["payload", "codec", "rate", "encoding"],
        format: function (t) {
          return t.encoding
            ? "rtpmap:%d %s/%s/%s"
            : t.rate
            ? "rtpmap:%d %s/%s"
            : "rtpmap:%d %s";
        },
      },
      {
        push: "fmtp",
        reg: /^fmtp:(\d*) ([\S| ]*)/,
        names: ["payload", "config"],
        format: "fmtp:%d %s",
      },
      { name: "control", reg: /^control:(.*)/, format: "control:%s" },
      {
        name: "rtcp",
        reg: /^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,
        names: ["port", "netType", "ipVer", "address"],
        format: function (t) {
          return t.address != null ? "rtcp:%d %s IP%d %s" : "rtcp:%d";
        },
      },
      {
        push: "rtcpFbTrrInt",
        reg: /^rtcp-fb:(\*|\d*) trr-int (\d*)/,
        names: ["payload", "value"],
        format: "rtcp-fb:%s trr-int %d",
      },
      {
        push: "rtcpFb",
        reg: /^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,
        names: ["payload", "type", "subtype"],
        format: function (t) {
          return t.subtype != null ? "rtcp-fb:%s %s %s" : "rtcp-fb:%s %s";
        },
      },
      {
        push: "ext",
        reg: /^extmap:(\d+)(?:\/(\w+))?(?: (urn:ietf:params:rtp-hdrext:encrypt))? (\S*)(?: (\S*))?/,
        names: ["value", "direction", "encrypt-uri", "uri", "config"],
        format: function (t) {
          return (
            "extmap:%d" +
            (t.direction ? "/%s" : "%v") +
            (t["encrypt-uri"] ? " %s" : "%v") +
            " %s" +
            (t.config ? " %s" : "")
          );
        },
      },
      { name: "extmapAllowMixed", reg: /^(extmap-allow-mixed)/ },
      {
        push: "crypto",
        reg: /^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,
        names: ["id", "suite", "config", "sessionConfig"],
        format: function (t) {
          return t.sessionConfig != null
            ? "crypto:%d %s %s %s"
            : "crypto:%d %s %s";
        },
      },
      { name: "setup", reg: /^setup:(\w*)/, format: "setup:%s" },
      {
        name: "connectionType",
        reg: /^connection:(new|existing)/,
        format: "connection:%s",
      },
      { name: "mid", reg: /^mid:([^\s]*)/, format: "mid:%s" },
      { name: "msid", reg: /^msid:(.*)/, format: "msid:%s" },
      { name: "ptime", reg: /^ptime:(\d*(?:\.\d*)*)/, format: "ptime:%d" },
      {
        name: "maxptime",
        reg: /^maxptime:(\d*(?:\.\d*)*)/,
        format: "maxptime:%d",
      },
      { name: "direction", reg: /^(sendrecv|recvonly|sendonly|inactive)/ },
      { name: "icelite", reg: /^(ice-lite)/ },
      { name: "iceUfrag", reg: /^ice-ufrag:(\S*)/, format: "ice-ufrag:%s" },
      { name: "icePwd", reg: /^ice-pwd:(\S*)/, format: "ice-pwd:%s" },
      {
        name: "fingerprint",
        reg: /^fingerprint:(\S*) (\S*)/,
        names: ["type", "hash"],
        format: "fingerprint:%s %s",
      },
      {
        push: "candidates",
        reg: /^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,
        names: [
          "foundation",
          "component",
          "transport",
          "priority",
          "ip",
          "port",
          "type",
          "raddr",
          "rport",
          "tcptype",
          "generation",
          "network-id",
          "network-cost",
        ],
        format: function (t) {
          var e = "candidate:%s %d %s %d %s %d typ %s";
          return (
            (e += t.raddr != null ? " raddr %s rport %d" : "%v%v"),
            (e += t.tcptype != null ? " tcptype %s" : "%v"),
            t.generation != null && (e += " generation %d"),
            (e += t["network-id"] != null ? " network-id %d" : "%v"),
            (e += t["network-cost"] != null ? " network-cost %d" : "%v")
          );
        },
      },
      { name: "endOfCandidates", reg: /^(end-of-candidates)/ },
      {
        name: "remoteCandidates",
        reg: /^remote-candidates:(.*)/,
        format: "remote-candidates:%s",
      },
      {
        name: "iceOptions",
        reg: /^ice-options:(\S*)/,
        format: "ice-options:%s",
      },
      {
        push: "ssrcs",
        reg: /^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,
        names: ["id", "attribute", "value"],
        format: function (t) {
          var e = "ssrc:%d";
          return (
            t.attribute != null &&
              ((e += " %s"), t.value != null && (e += ":%s")),
            e
          );
        },
      },
      {
        push: "ssrcGroups",
        reg: /^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,
        names: ["semantics", "ssrcs"],
        format: "ssrc-group:%s %s",
      },
      {
        name: "msidSemantic",
        reg: /^msid-semantic:\s?(\w*) (\S*)/,
        names: ["semantic", "token"],
        format: "msid-semantic: %s %s",
      },
      {
        push: "groups",
        reg: /^group:(\w*) (.*)/,
        names: ["type", "mids"],
        format: "group:%s %s",
      },
      { name: "rtcpMux", reg: /^(rtcp-mux)/ },
      { name: "rtcpRsize", reg: /^(rtcp-rsize)/ },
      {
        name: "sctpmap",
        reg: /^sctpmap:([\w_/]*) (\S*)(?: (\S*))?/,
        names: ["sctpmapNumber", "app", "maxMessageSize"],
        format: function (t) {
          return t.maxMessageSize != null
            ? "sctpmap:%s %s %s"
            : "sctpmap:%s %s";
        },
      },
      {
        name: "xGoogleFlag",
        reg: /^x-google-flag:([^\s]*)/,
        format: "x-google-flag:%s",
      },
      {
        push: "rids",
        reg: /^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,
        names: ["id", "direction", "params"],
        format: function (t) {
          return t.params ? "rid:%s %s %s" : "rid:%s %s";
        },
      },
      {
        push: "imageattrs",
        reg: new RegExp(
          "^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"
        ),
        names: ["pt", "dir1", "attrs1", "dir2", "attrs2"],
        format: function (t) {
          return "imageattr:%s %s %s" + (t.dir2 ? " %s %s" : "");
        },
      },
      {
        name: "simulcast",
        reg: new RegExp(
          "^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"
        ),
        names: ["dir1", "list1", "dir2", "list2"],
        format: function (t) {
          return "simulcast:%s %s" + (t.dir2 ? " %s %s" : "");
        },
      },
      {
        name: "simulcast_03",
        reg: /^simulcast:[\s\t]+([\S+\s\t]+)$/,
        names: ["value"],
        format: "simulcast: %s",
      },
      {
        name: "framerate",
        reg: /^framerate:(\d+(?:$|\.\d+))/,
        format: "framerate:%s",
      },
      {
        name: "sourceFilter",
        reg: /^source-filter: *(excl|incl) (\S*) (IP4|IP6|\*) (\S*) (.*)/,
        names: [
          "filterMode",
          "netType",
          "addressTypes",
          "destAddress",
          "srcList",
        ],
        format: "source-filter: %s %s %s %s %s",
      },
      { name: "bundleOnly", reg: /^(bundle-only)/ },
      { name: "label", reg: /^label:(.+)/, format: "label:%s" },
      { name: "sctpPort", reg: /^sctp-port:(\d+)$/, format: "sctp-port:%s" },
      {
        name: "maxMessageSize",
        reg: /^max-message-size:(\d+)$/,
        format: "max-message-size:%s",
      },
      {
        push: "tsRefClocks",
        reg: /^ts-refclk:([^\s=]*)(?:=(\S*))?/,
        names: ["clksrc", "clksrcExt"],
        format: function (t) {
          return "ts-refclk:%s" + (t.clksrcExt != null ? "=%s" : "");
        },
      },
      {
        name: "mediaClk",
        reg: /^mediaclk:(?:id=(\S*))? *([^\s=]*)(?:=(\S*))?(?: *rate=(\d+)\/(\d+))?/,
        names: [
          "id",
          "mediaClockName",
          "mediaClockValue",
          "rateNumerator",
          "rateDenominator",
        ],
        format: function (t) {
          var e = "mediaclk:";
          return (
            (e += t.id != null ? "id=%s %s" : "%v%s"),
            (e += t.mediaClockValue != null ? "=%s" : ""),
            (e += t.rateNumerator != null ? " rate=%s" : ""),
            (e += t.rateDenominator != null ? "/%s" : "")
          );
        },
      },
      { name: "keywords", reg: /^keywds:(.+)$/, format: "keywds:%s" },
      { name: "content", reg: /^content:(.+)/, format: "content:%s" },
      {
        name: "bfcpFloorCtrl",
        reg: /^floorctrl:(c-only|s-only|c-s)/,
        format: "floorctrl:%s",
      },
      { name: "bfcpConfId", reg: /^confid:(\d+)/, format: "confid:%s" },
      { name: "bfcpUserId", reg: /^userid:(\d+)/, format: "userid:%s" },
      {
        name: "bfcpFloorId",
        reg: /^floorid:(.+) (?:m-stream|mstrm):(.+)/,
        names: ["id", "mStream"],
        format: "floorid:%s mstrm:%s",
      },
      { push: "invalid", names: ["value"] },
    ],
  });
Object.keys(BSe).forEach(function (t) {
  BSe[t].forEach(function (e) {
    e.reg || (e.reg = /(.*)/), e.format || (e.format = "%s");
  });
});
var Dze = Ize.exports;
(function (t) {
  var e = function (l) {
      return String(Number(l)) === l ? Number(l) : l;
    },
    n = function (l, u, c) {
      var d = l.name && l.names;
      l.push && !u[l.push]
        ? (u[l.push] = [])
        : d && !u[l.name] && (u[l.name] = {});
      var h = l.push ? {} : d ? u[l.name] : u;
      (function (f, p, g, y) {
        if (y && !g) p[y] = e(f[1]);
        else
          for (var v = 0; v < g.length; v += 1)
            f[v + 1] != null && (p[g[v]] = e(f[v + 1]));
      })(c.match(l.reg), h, l.names, l.name),
        l.push && u[l.push].push(h);
    },
    r = Dze,
    i = RegExp.prototype.test.bind(/^([a-z])=(.*)/);
  t.parse = function (l) {
    var u = {},
      c = [],
      d = u;
    return (
      l
        .split(/(\r\n|\r|\n)/)
        .filter(i)
        .forEach(function (h) {
          var f = h[0],
            p = h.slice(2);
          f === "m" && (c.push({ rtp: [], fmtp: [] }), (d = c[c.length - 1]));
          for (var g = 0; g < (r[f] || []).length; g += 1) {
            var y = r[f][g];
            if (y.reg.test(p)) return n(y, d, p);
          }
        }),
      (u.media = c),
      u
    );
  };
  var o = function (l, u) {
    var c = u.split(/=(.+)/, 2);
    return (
      c.length === 2
        ? (l[c[0]] = e(c[1]))
        : c.length === 1 && u.length > 1 && (l[c[0]] = void 0),
      l
    );
  };
  (t.parseParams = function (l) {
    return l.split(/;\s?/).reduce(o, {});
  }),
    (t.parseFmtpConfig = t.parseParams),
    (t.parsePayloads = function (l) {
      return l.toString().split(" ").map(Number);
    }),
    (t.parseRemoteCandidates = function (l) {
      for (var u = [], c = l.split(" ").map(e), d = 0; d < c.length; d += 3)
        u.push({ component: c[d], ip: c[d + 1], port: c[d + 2] });
      return u;
    }),
    (t.parseImageAttributes = function (l) {
      return l.split(" ").map(function (u) {
        return u
          .substring(1, u.length - 1)
          .split(",")
          .reduce(o, {});
      });
    }),
    (t.parseSimulcastStreamList = function (l) {
      return l.split(";").map(function (u) {
        return u.split(",").map(function (c) {
          var d,
            h = !1;
          return (
            c[0] !== "~"
              ? (d = e(c))
              : ((d = e(c.substring(1, c.length))), (h = !0)),
            { scid: d, paused: h }
          );
        });
      });
    });
})(kze);
var NW = Dze,
  KIn = /%[sdv%]/g,
  ZIn = function (t) {
    var e = 1,
      n = arguments,
      r = n.length;
    return t.replace(KIn, function (i) {
      if (e >= r) return i;
      var o = n[e];
      switch (((e += 1), i)) {
        case "%%":
          return "%";
        case "%s":
          return String(o);
        case "%d":
          return Number(o);
        case "%v":
          return "";
      }
    });
  },
  hM = function (t, e, n) {
    var r = [
      t +
        "=" +
        (e.format instanceof Function
          ? e.format(e.push ? n : n[e.name])
          : e.format),
    ];
    if (e.names)
      for (var i = 0; i < e.names.length; i += 1) {
        var o = e.names[i];
        e.name ? r.push(n[e.name][o]) : r.push(n[e.names[i]]);
      }
    else r.push(n[e.name]);
    return ZIn.apply(null, r);
  },
  YIn = ["v", "o", "s", "i", "u", "e", "p", "c", "b", "t", "r", "z", "a"],
  QIn = ["i", "c", "b", "a"],
  JIn = function (t, e) {
    (e = e || {}),
      t.version == null && (t.version = 0),
      t.name == null && (t.name = " "),
      t.media.forEach(function (o) {
        o.payloads == null && (o.payloads = "");
      });
    var n = e.outerOrder || YIn,
      r = e.innerOrder || QIn,
      i = [];
    return (
      n.forEach(function (o) {
        NW[o].forEach(function (l) {
          l.name in t && t[l.name] != null
            ? i.push(hM(o, l, t))
            : l.push in t &&
              t[l.push] != null &&
              t[l.push].forEach(function (u) {
                i.push(hM(o, l, u));
              });
        });
      }),
      t.media.forEach(function (o) {
        i.push(hM("m", NW.m[0], o)),
          r.forEach(function (l) {
            NW[l].forEach(function (u) {
              u.name in o && o[u.name] != null
                ? i.push(hM(l, u, o))
                : u.push in o &&
                  o[u.push] != null &&
                  o[u.push].forEach(function (c) {
                    i.push(hM(l, u, c));
                  });
            });
          });
      }),
      i.join(`\r
`) +
        `\r
`
    );
  },
  C2 = kze,
  qIn = JIn;
(kp.write = qIn),
  (kp.parse = C2.parse),
  (kp.parseParams = C2.parseParams),
  (kp.parseFmtpConfig = C2.parseFmtpConfig),
  (kp.parsePayloads = C2.parsePayloads),
  (kp.parseRemoteCandidates = C2.parseRemoteCandidates),
  (kp.parseImageAttributes = C2.parseImageAttributes),
  (kp.parseSimulcastStreamList = C2.parseSimulcastStreamList);
var eDn = ["adaptiveJitterBuffer"];
function tDn(t) {
  var e = t || {},
    n = e.adaptiveJitterBuffer,
    r = n === void 0 ? {} : n,
    i = _In(e, eDn);
  return xp(
    {
      retryCount: 0,
      retryDelay: 1e3,
      loadTimeout: 5e3,
      stallInterval: 400,
      networkEvaluateInterval: 1e3,
      delayHint: 0,
      videoDelaySync: !1,
      seamlesslyReload: !1,
      enableSei: !1,
      enableOriginSdpLogger: !1,
      checkStatsErrorDelay: 5e3,
      connectionStateChangeTimeout: 5e3,
      enableNetworkQuality: !1,
      hackCreateOfferIssue: !1,
      progressiveSetDelay: !1,
      networkQuality: {
        networkQos: {
          1: { maxRtt: 250, maxLoss: 0.15 },
          2: { maxRtt: 500, maxLoss: 0.3, minRetransmittedRate: 0.2 },
          3: { maxRtt: 750, maxLoss: 0.45, minRetransmittedRate: 0.35 },
          4: { maxRtt: 1e3, maxLoss: 0.6, minRetransmittedRate: 0.5 },
        },
        networkQoe: {
          audioDelay: 2e3,
          audioStallRadio: 0.3,
          videoDelay: 2e3,
          videoStallRadio: 0.6,
        },
      },
      enableAdaptiveJitterBuffer: !1,
      adaptiveJitterBuffer: xp(
        {
          networkWindow: 3,
          windowMethod: "max",
          loopInterval: 500,
          maxAvSyncDelay: 400,
          maxJitterBufferDiff: 500,
          maxStep: 500,
        },
        r
      ),
      networkStrategy: {
        1: { jitterBuffer: null },
        2: { jitterBuffer: 1.5 },
        3: { jitterBuffer: 2 },
        4: { jitterBuffer: 3 },
        5: { jitterBuffer: 3 },
      },
    },
    i
  );
}
function nDn(t) {
  var e = [],
    n = [];
  return (
    t.forEach(function (r) {
      r.type === "inbound-rtp" && e.push(r),
        r.type === "remote-outbound-rtp" && n.push(r);
    }),
    e.map(function (r) {
      var i,
        o = t.get(r.codecId),
        l = t.get(r.trackId);
      return {
        type: (i = r.mediaType) !== null && i !== void 0 ? i : r.kind,
        inboundRtp: r,
        remoteOutBoundRtp: n.find(function (u) {
          return u.mediaType === r.mediaType;
        }),
        codec: o,
        track: l,
      };
    })
  );
}
function Pze(t) {
  return new Promise(function (e) {
    var n;
    (n = t.getStats(null)) === null ||
      n === void 0 ||
      n.then(function (r) {
        e(nDn(r));
      });
  }).catch(function () {});
}
function Mze(t) {
  var e,
    n,
    r,
    i,
    o,
    l,
    u,
    c,
    d,
    h,
    f,
    p,
    g,
    y,
    v,
    b,
    w,
    k,
    D,
    $,
    N,
    P,
    I,
    O,
    X,
    G,
    H,
    E,
    S,
    L,
    W,
    F,
    oe,
    De,
    Xe,
    ze,
    ht,
    gt =
      t == null
        ? void 0
        : t.filter(function ($t) {
            return $t.type === "video";
          })[0],
    pt =
      t == null
        ? void 0
        : t.filter(function ($t) {
            return $t.type === "audio";
          })[0];
  return (
    gt &&
      gt.remoteOutBoundRtp &&
      (oe = {
        bytesSent: gt.remoteOutBoundRtp.bytesSent,
        packetsSent: gt.remoteOutBoundRtp.packetsSent,
      }),
    pt &&
      pt.remoteOutBoundRtp &&
      (De = {
        bytesSent: pt.remoteOutBoundRtp.bytesSent,
        packetsSent: pt.remoteOutBoundRtp.packetsSent,
      }),
    (gt == null || (e = gt.inboundRtp) === null || e === void 0
      ? void 0
      : e.jitterBufferDelay) !== void 0 &&
      (Xe =
        (((ze = gt.inboundRtp) === null || ze === void 0
          ? void 0
          : ze.jitterBufferDelay) /
          ((ht = gt.inboundRtp) === null || ht === void 0
            ? void 0
            : ht.jitterBufferEmittedCount)) *
        1e3),
    {
      video: gt
        ? {
            codec:
              (n = gt.codec) === null || n === void 0 ? void 0 : n.mimeType,
            payloadType:
              (r = gt.codec) === null || r === void 0 ? void 0 : r.payloadType,
            sdpFmtpLine:
              (i = gt.codec) === null || i === void 0 ? void 0 : i.sdpFmtpLine,
            bytesReceived:
              ((o = gt.inboundRtp) === null || o === void 0
                ? void 0
                : o.bytesReceived) || 0,
            firCount:
              (l = gt.inboundRtp) === null || l === void 0
                ? void 0
                : l.firCount,
            pliCount:
              (u = gt.inboundRtp) === null || u === void 0
                ? void 0
                : u.pliCount,
            frameHeight:
              (c = gt.inboundRtp) === null || c === void 0
                ? void 0
                : c.frameHeight,
            frameWidth:
              (d = gt.inboundRtp) === null || d === void 0
                ? void 0
                : d.frameWidth,
            framesDecoded:
              (h = gt.inboundRtp) === null || h === void 0
                ? void 0
                : h.framesDecoded,
            framesDropped:
              (f = gt.inboundRtp) === null || f === void 0
                ? void 0
                : f.framesDropped,
            framesPerSecond:
              (p = gt.inboundRtp) === null || p === void 0
                ? void 0
                : p.framesPerSecond,
            framesReceived:
              (g =
                (y = gt.inboundRtp) === null || y === void 0
                  ? void 0
                  : y.framesReceived) !== null && g !== void 0
                ? g
                : (v = gt.track) === null || v === void 0
                ? void 0
                : v.framesReceived,
            jitter:
              (b = gt.inboundRtp) === null || b === void 0 ? void 0 : b.jitter,
            jitterBufferDelay:
              (w = gt.inboundRtp) === null || w === void 0
                ? void 0
                : w.jitterBufferDelay,
            keyFramesDecoded:
              (k = gt.inboundRtp) === null || k === void 0
                ? void 0
                : k.keyFramesDecoded,
            nackCount:
              (D = gt.inboundRtp) === null || D === void 0
                ? void 0
                : D.nackCount,
            packetsLost:
              (($ = gt.inboundRtp) === null || $ === void 0
                ? void 0
                : $.packetsLost) || 0,
            packetsReceived:
              ((N = gt.inboundRtp) === null || N === void 0
                ? void 0
                : N.packetsReceived) || 0,
            averageJitterBufferDelay: Xe,
          }
        : void 0,
      audio: pt
        ? {
            codec:
              (P = pt.codec) === null || P === void 0 ? void 0 : P.mimeType,
            payloadType:
              (I = pt.codec) === null || I === void 0 ? void 0 : I.payloadType,
            sdpFmtpLine:
              (O = pt.codec) === null || O === void 0 ? void 0 : O.sdpFmtpLine,
            bytesReceived:
              ((X = pt.inboundRtp) === null || X === void 0
                ? void 0
                : X.bytesReceived) || 0,
            audioLevel:
              (G = pt.inboundRtp) === null || G === void 0
                ? void 0
                : G.audioLevel,
            jitter:
              (H = pt.inboundRtp) === null || H === void 0 ? void 0 : H.jitter,
            jitterBufferDelay:
              (E = pt.inboundRtp) === null || E === void 0
                ? void 0
                : E.jitterBufferDelay,
            packetsLost:
              ((S = pt.inboundRtp) === null || S === void 0
                ? void 0
                : S.packetsLost) || 0,
            packetsReceived:
              ((L = pt.inboundRtp) === null || L === void 0
                ? void 0
                : L.packetsReceived) || 0,
            totalSamplesDuration:
              (W = pt.inboundRtp) === null || W === void 0
                ? void 0
                : W.totalSamplesDuration,
            totalSamplesReceived:
              (F = pt.inboundRtp) === null || F === void 0
                ? void 0
                : F.totalSamplesReceived,
          }
        : void 0,
      videoRemote: oe,
      audioRemote: De,
    }
  );
}
var tw = 5,
  rDn = (function () {
    function t(e, n) {
      var r = this;
      AR(this, t),
        Ii(this, "_pc", null),
        Ii(this, "_lastVideoStats", null),
        Ii(this, "_lastRemoteVideoStats", null),
        Ii(this, "_timer", 0),
        Ii(this, "_timerInterval", 0),
        Ii(this, "_speedQueue", []),
        Ii(this, "_lostRateQueue", []),
        Ii(this, "_receivedRateQueue", []),
        Ii(this, "_currentSpeed", -1),
        Ii(this, "_currentLostRate", -1),
        Ii(this, "_currentReceivedRate", -1),
        Ii(
          this,
          "_evaluate",
          Mh(
            Ts().mark(function i() {
              var o, l, u, c, d, h, f, p, g, y, v, b, w, k, D, $;
              return Ts().wrap(
                function (N) {
                  for (;;)
                    switch ((N.prev = N.next)) {
                      case 0:
                        return (
                          (N.prev = 0),
                          (N.next = 3),
                          Pze(r._pc).then(function (P) {
                            return Mze(P);
                          })
                        );
                      case 3:
                        (o = N.sent),
                          r._lastVideoStats &&
                            o != null &&
                            o.video &&
                            ((l = o.video),
                            (u = l.bytesReceived),
                            (c = l.packetsLost),
                            (d = l.packetsReceived),
                            (h = r._lastVideoStats),
                            (f = h.bytesReceived),
                            (p = h.packetsLost),
                            (g = h.packetsReceived),
                            f &&
                              r._cacheSpeed((8e3 * (u - f)) / r._timerInterval),
                            (y = c - p),
                            (v = d - g) &&
                              y >= 0 &&
                              r._cacheLostRate(
                                ((y / (y + v)) * 1e3) / r._timerInterval
                              )),
                          r._lastRemoteVideoStats &&
                            o != null &&
                            o.videoRemote &&
                            ((b = o.video.bytesReceived),
                            (w = r._lastVideoStats.bytesReceived),
                            (k = o == null ? void 0 : o.videoRemote),
                            (D = k.bytesSent),
                            ($ = r._lastRemoteVideoStats.bytesSent) &&
                              D &&
                              D - $ > 0 &&
                              r._cacheReceivedRate((b - w) / (D - $))),
                          (r._lastVideoStats = o == null ? void 0 : o.video),
                          (r._lastRemoteVideoStats =
                            o == null ? void 0 : o.videoRemote),
                          (N.next = 12);
                        break;
                      case 10:
                        (N.prev = 10), (N.t0 = N.catch(0));
                      case 12:
                      case "end":
                        return N.stop();
                    }
                },
                i,
                null,
                [[0, 10]]
              );
            })
          )
        ),
        (this._pc = e),
        (this._timerInterval = n),
        this.start(n);
    }
    return (
      wR(t, [
        {
          key: "start",
          value: function (e) {
            clearInterval(this._timer),
              this._pc && (this._timer = setInterval(this._evaluate, e));
          },
        },
        {
          key: "getStats",
          value: function () {
            return this._speedQueue.length
              ? {
                  speed: parseFloat(this._currentSpeed.toFixed(2)),
                  avgSpeed: parseFloat(this._getAvgSpeed().toFixed(2)),
                  lostRate: parseFloat(this._currentLostRate.toFixed(2)),
                  avgLostRate: parseFloat(this._getAvgLostRate().toFixed(2)),
                  receivedRate: parseFloat(
                    this._currentReceivedRate.toFixed(2)
                  ),
                  avgReceivedRate: parseFloat(
                    this._getAvgReceivedRate().toFixed(2)
                  ),
                }
              : {};
          },
        },
        {
          key: "destroy",
          value: function () {
            clearInterval(this._timer),
              (this._pc = null),
              (this._lastVideoStats = null);
          },
        },
        {
          key: "_cacheSpeed",
          value: function (e) {
            (this._currentSpeed = e),
              this._speedQueue.length > tw &&
                (this._speedQueue = this._speedQueue.slice(tw)),
              this._speedQueue.push(e);
          },
        },
        {
          key: "_cacheLostRate",
          value: function (e) {
            (this._currentLostRate = e),
              this._lostRateQueue.length > tw &&
                (this._lostRateQueue = this._lostRateQueue.slice(tw)),
              this._lostRateQueue.push(e);
          },
        },
        {
          key: "_cacheReceivedRate",
          value: function (e) {
            (this._currentReceivedRate = e),
              this._receivedRateQueue.length > tw &&
                (this._receivedRateQueue = this._receivedRateQueue.slice(tw)),
              this._receivedRateQueue.push(e);
          },
        },
        {
          key: "_getAvgSpeed",
          value: function () {
            return this._currentSpeed === -1
              ? -1
              : this._speedQueue.reduce(function (e, n) {
                  return e + n;
                }, 0) / this._speedQueue.length;
          },
        },
        {
          key: "_getAvgLostRate",
          value: function () {
            return this._currentLostRate === -1
              ? -1
              : this._lostRateQueue.reduce(function (e, n) {
                  return e + n;
                }, 0) / this._lostRateQueue.length;
          },
        },
        {
          key: "_getAvgReceivedRate",
          value: function () {
            return this._currentReceivedRate === -1
              ? -1
              : this._receivedRateQueue.reduce(function (e, n) {
                  return e + n;
                }, 0) / this._receivedRateQueue.length;
          },
        },
      ]),
      t
    );
  })();
function Cze() {
  return !(
    !window.RTCPeerConnection ||
    !window.RTCPeerConnection.prototype.addTransceiver
  );
}
function iDn() {
  if (!Cze()) return Promise.reject("RTCPeerConnection no support");
  var t;
  try {
    (t = new RTCPeerConnection()).addTransceiver("video", {
      direction: "recvonly",
    }),
      t.addTransceiver("audio", { direction: "recvonly" });
  } catch (e) {
    return Promise.reject(e == null ? void 0 : e.message);
  }
  return t.createOffer().then(function (e) {
    var n, r, i, o;
    Tu.log(e.sdp);
    var l = kp.parse(e.sdp),
      u =
        (n = l.media) === null || n === void 0
          ? void 0
          : n.filter(function (g) {
              return g.type === "video";
            })[0],
      c =
        (r = l.media) === null || r === void 0
          ? void 0
          : r.filter(function (g) {
              return g.type === "audio";
            })[0],
      d =
        u == null || (i = u.rtp) === null || i === void 0
          ? void 0
          : i.filter(function (g) {
              return (
                g.codec === "VP8" || g.codec === "VP9" || g.codec === "H264"
              );
            }),
      h =
        c == null || (o = c.rtp) === null || o === void 0
          ? void 0
          : o.filter(function (g) {
              return g.codec === "opus";
            }),
      f = u == null ? void 0 : u.fmtp,
      p = c == null ? void 0 : c.fmtp;
    return (
      f &&
        d.map(function (g) {
          var y;
          g.config =
            (y = f.filter(function (v) {
              return v.payload === g.payload;
            })[0]) === null || y === void 0
              ? void 0
              : y.config;
        }),
      p &&
        h.map(function (g) {
          var y;
          g.config =
            (y = p.filter(function (v) {
              return v.payload === g.payload;
            })[0]) === null || y === void 0
              ? void 0
              : y.config;
        }),
      t.close(),
      { video: d, audio: h }
    );
  });
}
var aDn = function () {
    return (
      typeof TransformStream < "u" &&
      typeof RTCRtpSender < "u" &&
      typeof RTCRtpReceiver < "u" &&
      typeof RTCRtpScriptTransform < "u" &&
      "transform" in RTCRtpSender.prototype &&
      "transform" in RTCRtpReceiver.prototype &&
      oDn() &&
      sDn()
    );
  },
  oDn = function () {
    return typeof window < "u" && window.Worker;
  },
  sDn = function () {
    return typeof MessageChannel < "u";
  },
  FW = function () {
    return (
      typeof TransformStream < "u" &&
      typeof RTCRtpSender < "u" &&
      typeof RTCRtpReceiver < "u" &&
      RTCRtpSender.prototype.createEncodedStreams !== void 0 &&
      RTCRtpReceiver.prototype.createEncodedStreams !== void 0
    );
  },
  Oy = {
    getNALUnits: function (t) {
      var e = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
      if (t.length - t.position < 4) return [];
      var n = t.position;
      return t.getInt32(n) === 1 ||
        (t.getInt16(n) === 0 && t.getInt8(n + 2) === 1)
        ? Oy.getAnnexbNals(t, e)
        : Oy.getAvccNals(t, e);
    },
    getAnnexbNals: function (t, e) {
      for (
        var n = [], r = Oy.getHeaderPositionAnnexB(t), i = r.pos, o = i;
        i < t.length - 4;

      ) {
        var l = new Uint8Array(t.buffer.slice(i, i + r.headerLength));
        r.pos === t.position && t.skip(r.headerLength),
          (o = (r = Oy.getHeaderPositionAnnexB(t)).pos);
        var u = {
          header: l,
          body: new Uint8Array(t.buffer.slice(i + l.byteLength, o)),
          type: -1,
        };
        e ? Oy.analyseH265Nal(u) : Oy.analyseNal(u),
          (u.type <= 9 || (e && u.type <= 40)) && u.type !== 0 && n.push(u),
          t.skip(o - t.position),
          (i = o);
      }
      return n;
    },
    getAvccNals: function (t, e) {
      for (var n = []; t.position < t.length - 4; ) {
        var r = t.getInt32(t.position);
        if (!(t.length - t.position >= r)) break;
        var i = new Uint8Array(t.buffer.slice(t.position, t.position + 4));
        t.skip(4);
        var o = new Uint8Array(t.buffer.slice(t.position, t.position + r));
        t.skip(r);
        var l = { header: i, body: o, type: -1 };
        e ? Oy.analyseH265Nal(l) : Oy.analyseNal(l),
          l.type <= 9 && l.type !== 0 && n.push(l);
      }
      return n;
    },
    analyseNal: function (t) {
      var e = 31 & t.body[0];
      switch (((t.type = e), e)) {
        case 1:
          t.ndr = !0;
          break;
        case 5:
          t.idr = !0;
          break;
        case 6:
          t.sei = !0;
          break;
        case 7:
          t.sps = !0;
          break;
        case 8:
          t.pps = !0;
      }
    },
    analyseH265Nal: function (t) {
      var e = (126 & t.body[0]) >> 1;
      switch (((t.type = e), e)) {
        case 39:
        case 40:
          t.sei = !0;
      }
    },
    getHeaderPositionAnnexB: function (t) {
      for (
        var e = t.position, n = 0, r = t.length;
        n !== 3 && n !== 4 && e < r - 4;

      )
        t.getInt16(e) === 0
          ? t.getInt16(e + 2) === 1
            ? (n = 4)
            : t.getInt8(e + 2) === 1
            ? (n = 3)
            : e++
          : e++;
      return (
        e === r - 4 &&
          (t.getInt16(e) === 0
            ? t.getInt16(e + 2) === 1
              ? (n = 4)
              : (e = r)
            : (e++,
              t.getInt16(e) === 0 && t.getInt8(e) === 1 ? (n = 3) : (e = r))),
        { pos: e, headerLength: n }
      );
    },
    isH265VideoFrame: function (t) {
      var e, n;
      return (
        ((e = t.getMetadata) === null ||
        e === void 0 ||
        (n = e.call(t)) === null ||
        n === void 0
          ? void 0
          : n.mimeType) || ""
      )
        .toLowerCase()
        .includes("h265");
    },
  },
  lDn = (function () {
    function t(e) {
      AR(this, t), Ii(this, "_position", 0), (this._dataview = new DataView(e));
    }
    return (
      wR(
        t,
        [
          {
            key: "length",
            get: function () {
              return this.buffer.byteLength;
            },
          },
          {
            key: "buffer",
            get: function () {
              return this._dataview.buffer;
            },
          },
          {
            key: "position",
            get: function () {
              return this._position;
            },
            set: function (e) {
              this._position = e;
            },
          },
          {
            key: "back",
            value: function (e) {
              this.position -= e;
            },
          },
          {
            key: "getUint8",
            value: function (e) {
              return this._dataview.getUint8(e);
            },
          },
          {
            key: "getInt8",
            value: function (e) {
              return this._dataview.getInt8(e);
            },
          },
          {
            key: "getInt16",
            value: function (e) {
              return this._dataview.getInt16(e);
            },
          },
          {
            key: "getUint16",
            value: function (e) {
              return this._dataview.getUint16(e);
            },
          },
          {
            key: "getUint32",
            value: function (e) {
              return this._dataview.getUint32(e);
            },
          },
          {
            key: "getInt32",
            value: function (e) {
              return this._dataview.getInt32(e);
            },
          },
          {
            key: "skip",
            value: function (e) {
              for (var n = Math.floor(e / 4), r = e % 4, i = 0; i < n; i++)
                t.readByte(this, 4);
              r > 0 && t.readByte(this, r);
            },
          },
          {
            key: "readUint8",
            value: function () {
              return t.readByte(this, 1);
            },
          },
          {
            key: "readUint16",
            value: function () {
              return t.readByte(this, 2);
            },
          },
          {
            key: "readUint24",
            value: function () {
              return t.readByte(this, 3);
            },
          },
          {
            key: "readUint32",
            value: function () {
              return t.readByte(this, 4);
            },
          },
          {
            key: "readUint64",
            value: function () {
              return t.readByte(this, 8);
            },
          },
          {
            key: "readInt8",
            value: function () {
              return t.readByte(this, 1, !0);
            },
          },
          {
            key: "readInt16",
            value: function () {
              return t.readByte(this, 2, !0);
            },
          },
          {
            key: "readInt32",
            value: function () {
              return t.readByte(this, 4, !0);
            },
          },
          {
            key: "writeUint32",
            value: function (e) {
              return new Uint8Array([
                (e >>> 24) & 255,
                (e >>> 16) & 255,
                (e >>> 8) & 255,
                255 & e,
              ]);
            },
          },
        ],
        [
          {
            key: "readByte",
            value: function (e, n, r) {
              var i;
              switch (n) {
                case 1:
                  i = r ? e.getInt8(e.position) : e.getUint8(e.position);
                  break;
                case 2:
                  i = r ? e.getInt16(e.position) : e.getUint16(e.position);
                  break;
                case 3:
                  if (r) throw new Error("not supported for readByte 3");
                  (i = e.getUint8(e.position) << 16),
                    (i |= e.getUint8(e.position + 1) << 8),
                    (i |= e.getUint8(e.position + 2));
                  break;
                case 4:
                  i = r ? e.getInt32(e.position) : e.getUint32(e.position);
                  break;
                case 8:
                  if (r) throw new Error("not supported for readBody 8");
                  (i = e.getUint32(e.position) << 32),
                    (i |= e.getUint32(e.position + 4));
                  break;
                default:
                  i = "";
              }
              return (e.position += n), i;
            },
          },
        ]
      ),
      t
    );
  })();
function uDn(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function HSe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, hDn(r.key), r);
  }
}
function cDn(t, e, n) {
  return (
    e && HSe(t.prototype, e),
    n && HSe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function dDn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function hDn(t) {
  var e = dDn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
function fDn(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (
    ((t[e] << 24) >>> 0) + (t[e + 1] << 16) + (t[e + 2] << 8) + (t[e + 3] || 0)
  );
}
var XSe = (function () {
  function t() {
    uDn(this, t);
  }
  return (
    cDn(t, null, [
      {
        key: "parseAnnexB",
        value: function (e) {
          var n = e.byteLength - 1,
            r = 0;
          do {
            if (e[n] !== 0) break;
            r++, n--;
          } while (n > 0);
          r >= 3 && (e = e.subarray(0, n + 1));
          for (
            var i = e.length, o = 2, l = 0;
            e[o] !== null && e[o] !== void 0 && e[o] !== 1;

          )
            o++;
          if ((l = ++o + 2) >= i) return [];
          for (var u = []; l < i; )
            switch (e[l]) {
              case 0:
                if (e[l - 1] !== 0) {
                  l += 2;
                  break;
                }
                if (e[l - 2] !== 0) {
                  l++;
                  break;
                }
                if (l < i - 1 && e[l + 1] !== 1) {
                  l++;
                  break;
                }
                o !== l - 2 && u.push(e.subarray(o, l - 2));
                do l++;
                while (e[l] !== 1 && l < i);
                l = (o = l + 1) + 2;
                break;
              case 1:
                if (e[l - 1] !== 0 || e[l - 2] !== 0) {
                  l += 3;
                  break;
                }
                o !== l - 2 && u.push(e.subarray(o, l - 2)),
                  (l = (o = l + 1) + 2);
                break;
              default:
                l += 3;
            }
          return o < i && u.push(e.subarray(o)), u;
        },
      },
      {
        key: "parseAvcC",
        value: function (e) {
          var n =
            arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 4;
          if (!(e.length < 4)) {
            for (var r, i = e.length, o = [], l = 0; l + n < i; )
              if (((r = fDn(e, l)), n === 3 && (r >>>= 8), (l += n), r)) {
                if (l + r > i) break;
                o.push(e.subarray(l, l + r)), (l += r);
              }
            return o;
          }
        },
      },
      {
        key: "parseSEI",
        value: function (e, n) {
          for (
            var r = e.length, i = n ? 2 : 1, o = 0, l = 0, u = "";
            e[i] === 255;

          )
            (o += 255), i++;
          for (o += e[i++]; e[i] === 255; ) (l += 255), i++;
          if (((l += e[i++]), o === 5 && r > i + 16))
            for (var c = 0; c < 16; c++) (u += e[i].toString(16)), i++;
          return { payload: e.subarray(i, i + l), type: o, size: l, uuid: u };
        },
      },
      {
        key: "removeEPB",
        value: function (e) {
          for (var n = e.byteLength, r = [], i = 1; i < n - 2; )
            e[i] === 0 && e[i + 1] === 0 && e[i + 2] === 3
              ? (r.push(i + 2), (i += 2))
              : i++;
          if (!r.length) return e;
          var o = n - r.length,
            l = new Uint8Array(o),
            u = 0;
          for (i = 0; i < o; u++, i++)
            u === r[0] && (u++, r.shift()), (l[i] = e[u]);
          return l;
        },
      },
    ]),
    t
  );
})();
function $ze(t) {
  return new TransformStream({
    transform: function (e, n) {
      var r = Oy.isH265VideoFrame(e);
      Oy.getNALUnits(new lDn(e.data), r).forEach(function (i) {
        if (i.sei) {
          var o = XSe.parseSEI(XSe.removeEPB(i.body), !1);
          o && t({ data: o, sei: { code: o.type, content: o.payload } });
        }
      }),
        n.enqueue(e);
    },
  });
}
typeof self < "u" &&
  self.constructor.name === "DedicatedWorkerGlobalScope" &&
  self.addEventListener("rtctransform", function (t) {
    var e = t.transformer,
      n = e.options.port,
      r = $ze(function (i) {
        n.postMessage(i);
      });
    e.readable.pipeThrough(r).pipeTo(t.transformer.writable);
  });
var xze =
    " ",
  VSe =
    typeof window < "u" &&
    window.Blob &&
    new Blob([atob(xze)], { type: "text/javascript;charset=utf-8" });
function pDn() {
  var t = VSe && (window.URL || window.webkitURL).createObjectURL(VSe);
  try {
    return t
      ? new Worker(t, {})
      : new Worker("data:application/javascript;base64," + xze, {
          type: "module",
        });
  } finally {
    t && (window.URL || window.webkitURL).revokeObjectURL(t);
  }
}
var tL = (function () {
  function t() {
    AR(this, t),
      Ii(this, "_audioStallTimer", null),
      Ii(this, "_preSample", null),
      Ii(this, "_isStallInPreReportEnd", !1),
      Ii(this, "_stallList", []),
      Ii(this, "_audioTransceiver", null);
  }
  var e, n;
  return (
    wR(t, [
      {
        key: "start",
        value: function (r) {
          this.stop(),
            (this._audioTransceiver = r),
            t.interval >= 100 && this._startStallCountInterval();
        },
      },
      {
        key: "stop",
        value: function () {
          (this._stallList = []),
            this._audioStallTimer &&
              (clearTimeout(this._audioStallTimer),
              (this._audioStallTimer = null));
        },
      },
      {
        key: "destroy",
        value: function () {
          this.stop(), (this._audioTransceiver = null);
        },
      },
      {
        key: "getAudioStallInfo",
        value:
          ((n = Mh(
            Ts().mark(function r() {
              var i, o;
              return Ts().wrap(
                function (l) {
                  for (;;)
                    switch ((l.prev = l.next)) {
                      case 0:
                        return (
                          (i = {
                            stats_count: this._stallList.filter(function (u) {
                              return u.get_stats_cost;
                            }).length,
                            stall_list: M$(this._stallList),
                          }),
                          (l.prev = 1),
                          (l.next = 4),
                          this._audioStallCount()
                        );
                      case 4:
                        l.next = 8;
                        break;
                      case 6:
                        (l.prev = 6), (l.t0 = l.catch(1));
                      case 8:
                        return (
                          (o = gDn(
                            this._stallList,
                            2,
                            this._isStallInPreReportEnd
                          )),
                          (this._isStallInPreReportEnd = o.isStallInEnd),
                          this.stop(),
                          this._startStallCountInterval(),
                          l.abrupt("return", {
                            stallCount: o.stall_count,
                            stallDuration: o.stall_duration,
                            list: o.list,
                            extra: i,
                          })
                        );
                      case 13:
                      case "end":
                        return l.stop();
                    }
                },
                r,
                this,
                [[1, 6]]
              );
            })
          )),
          function () {
            return n.apply(this, arguments);
          }),
      },
      {
        key: "_startStallCountInterval",
        value: function () {
          var r = this,
            i = (function () {
              var o = Mh(
                Ts().mark(function l() {
                  return Ts().wrap(function (u) {
                    for (;;)
                      switch ((u.prev = u.next)) {
                        case 0:
                          return (
                            clearTimeout(r._audioStallTimer),
                            (r._audioStallTimer = null),
                            (u.next = 4),
                            r._audioStallCount()
                          );
                        case 4:
                          r._audioStallTimer ||
                            (r._audioStallTimer = setTimeout(i, t.interval));
                        case 5:
                        case "end":
                          return u.stop();
                      }
                  }, l);
                })
              );
              return function () {
                return o.apply(this, arguments);
              };
            })();
          this._audioStallTimer = setTimeout(i, t.interval);
        },
      },
      {
        key: "_audioStallCount",
        value:
          ((e = Mh(
            Ts().mark(function r() {
              var i, o, l, u, c, d, h, f, p, g, y, v, b, w, k, D, $;
              return Ts().wrap(
                function (N) {
                  for (;;)
                    switch ((N.prev = N.next)) {
                      case 0:
                        if (
                          !(
                            this._preSample &&
                            Date.now() - this._preSample.ts < 0.5 * t.interval
                          )
                        ) {
                          N.next = 2;
                          break;
                        }
                        return N.abrupt("return");
                      case 2:
                        return (
                          (i = Date.now()),
                          (u = 0),
                          (N.prev = 4),
                          (N.next = 7),
                          (c = this._audioTransceiver) === null || c === void 0
                            ? void 0
                            : c.receiver.getStats()
                        );
                      case 7:
                        (d = N.sent) == null ||
                          d.forEach(function (P) {
                            P.type === "inbound-rtp" && (o = P), u++;
                          }),
                          (N.next = 14);
                        break;
                      case 11:
                        (N.prev = 11),
                          (N.t0 = N.catch(4)),
                          (l = N.t0.message || JSON.stringify(N.t0));
                      case 14:
                        if (this._preSample) {
                          N.next = 17;
                          break;
                        }
                        return (
                          (this._preSample = {
                            ts: Date.now(),
                            concealedSamples:
                              ((h = o) === null || h === void 0
                                ? void 0
                                : h.concealedSamples) || 0,
                            totalSamplesReceived:
                              ((f = o) === null || f === void 0
                                ? void 0
                                : f.totalSamplesReceived) || 0,
                          }),
                          N.abrupt("return")
                        );
                      case 17:
                        (p = Date.now()),
                          (g = Date.now()),
                          (y = g - this._preSample.ts),
                          o
                            ? ((b = (v = o).concealedSamples),
                              (w = v.totalSamplesReceived),
                              (k = b - this._preSample.concealedSamples),
                              (D = w - this._preSample.totalSamplesReceived),
                              ($ = k >= 0 && D >= 0 && k >= t.ratio * D),
                              this._stallList.push({
                                concealed: k,
                                received: D,
                                diff: y,
                                start: this._preSample.ts,
                                end: g,
                                get_stats_cost: p - i,
                                get_stats_start: i,
                                get_stats_end: p,
                                is_stall: $,
                              }),
                              (this._preSample.concealedSamples = b),
                              (this._preSample.totalSamplesReceived = w),
                              (this._preSample.ts = g))
                            : this._stallList.push({
                                diff: y,
                                start: this._preSample.ts,
                                end: g,
                                get_stats_cost: p - i,
                                get_stats_start: i,
                                get_stats_end: p,
                                reason: u ? l || "no inbound-rtp" : "no report",
                              });
                      case 21:
                      case "end":
                        return N.stop();
                    }
                },
                r,
                this,
                [[4, 11]]
              );
            })
          )),
          function () {
            return e.apply(this, arguments);
          }),
      },
    ]),
    t
  );
})();
Ii(tL, "interval", 100), Ii(tL, "ratio", 0.6);
var gDn = function (t, e, n) {
  for (
    var r,
      i = { stall_count: 0, stall_duration: 0, isStallInEnd: !1, list: [] },
      o = 0,
      l = 0,
      u = function (d) {
        var h = t[d];
        h.is_stall && (o++, (l += h.diff || 0));
        var f = d === t.length - 1;
        if (!h.is_stall || f) {
          var p = o >= e,
            g = d + e - o - 1;
          if (!p && o > 2) {
            var y = 0;
            t.slice(d + 1, g + 1).forEach(function (v) {
              v.is_stall && (y += v.diff || 0);
            }),
              (p = l + y > tL.interval * e * tL.ratio) && ((d = g), (l += y));
          }
          p && (i.stall_count++, (i.stall_duration += l), i.list.push(l)),
            f && (i.isStallInEnd = p),
            (o = l = 0);
        }
        c = d;
      },
      c = 0;
    c < t.length;
    c++
  )
    u(c);
  return (
    ((r = t[0]) === null || r === void 0 ? void 0 : r.is_stall) === !0 &&
      n &&
      i.stall_count > 0 &&
      i.stall_count--,
    i
  );
};
function zSe() {
  var t = navigator.userAgent;
  return t.match("Safari") !== null && t.match("Chrome") === null;
}
function jSe() {
  return navigator.userAgent.match("Firefox") !== null;
}
var mDn = function () {
    return (
      typeof window < "u" &&
      typeof HTMLVideoElement.prototype.requestVideoFrameCallback == "function"
    );
  },
  yDn = (function () {
    function t() {
      var e = this;
      AR(this, t),
        Ii(this, "_handleVisibilityChange", function () {
          document.visibilityState === "hidden" && e._framePause();
        }),
        Ii(this, "_framePause", function () {
          if (e._prePts) {
            var n = performance.now(),
              r = n - e._prePts;
            e._stallList.push({
              playTime: n,
              timeUpdateInterval: Math.round(r),
            }),
              (e._prePts = void 0);
          }
        }),
        (this._removeHandler = void 0),
        (this._remotePlayPauseHandler = void 0),
        (this._prePts = void 0),
        (this._stallList = void 0),
        (this._videoInWaiting100ms = !1),
        (this._videoInWaiting500ms = !1),
        (this._isPaused = void 0),
        (this._pauseStart = 0),
        (this._pauseDuration = 0),
        (this._requestVideoFrameCallbackTimer = void 0),
        (this._player = void 0),
        (this._stallTimeThreshold = {
          stall500ms: zSe() || jSe() ? 550 : 500,
          stall100ms: 100,
        }),
        (this._support100msStall = mDn());
    }
    return (
      wR(t, [
        {
          key: "start",
          value: function (e) {
            var n = this;
            if (((this._player = e), this._support100msStall))
              e &&
                ((this._requestVideoFrameCallbackTimer =
                  e.requestVideoFrameCallback(this._onVideoRefresh.bind(this))),
                (this._removeHandler = function () {
                  n._requestVideoFrameCallbackTimer &&
                    e.cancelVideoFrameCallback(
                      n._requestVideoFrameCallbackTimer
                    );
                }));
            else {
              var r = function () {
                return n._onVideoTimeupdate(e);
              };
              e.addEventListener("timeupdate", r),
                (this._removeHandler = function () {
                  return e.removeEventListener("timeupdate", r);
                });
            }
            var i = function () {
              return n._onVideoPause();
            };
            e.addEventListener("pause", i);
            var o = function () {
              return n._onVideoPlay();
            };
            e.addEventListener("play", o),
              (this._remotePlayPauseHandler = function () {
                e.removeEventListener("pause", i),
                  e.removeEventListener("play", o);
              }),
              document.addEventListener(
                "visibilitychange",
                this._handleVisibilityChange
              ),
              document.addEventListener("pagehide", this._framePause());
          },
        },
        {
          key: "stop",
          value: function () {
            delete this._player,
              this._removeHandler && this._removeHandler(),
              delete this._removeHandler,
              this._remotePlayPauseHandler && this._remotePlayPauseHandler(),
              delete this._remotePlayPauseHandler,
              delete this._stallList,
              delete this._prePts,
              (this._videoInWaiting100ms = !1),
              (this._videoInWaiting500ms = !1),
              document.removeEventListener(
                "visibilitychange",
                this._handleVisibilityChange
              ),
              document.removeEventListener("pagehide", this._framePause());
          },
        },
        {
          key: "destroy",
          value: function () {
            this.stop();
          },
        },
        {
          key: "getStallInfo",
          value: function (e) {
            var n = this,
              r = e.interval,
              i = e.frameRateReceived,
              o = e.frameRateDecoded,
              l = e.bitrate,
              u = {
                pts: 0,
                stall: {
                  stallCount500ms: 0,
                  stallDuration500ms: 0,
                  stallRate500ms: 0,
                  stallCount100ms: 0,
                  stallDuration100ms: 0,
                  stallRate100ms: 0,
                },
                pauseDuration: this._getPauseDuration(),
              };
            if (
              this._stallList &&
              document.visibilityState === "visible" &&
              !this._isPaused
            ) {
              ((zSe() || jSe()) &&
                (l === 0 || (o || 1 / 0) <= 1 || (i || 1 / 0) <= 1)) ||
              this._stallList.length === 0
                ? ((u.stall.stallDuration500ms = r),
                  (u.stall.stallCount500ms = this._videoInWaiting500ms ? 0 : 1),
                  (u.stall.stallRate500ms = 1),
                  (this._videoInWaiting500ms = !0),
                  this._support100msStall &&
                    ((u.stall.stallDuration100ms = r),
                    (u.stall.stallCount100ms = this._videoInWaiting100ms
                      ? 0
                      : 1),
                    (u.stall.stallRate100ms = 1),
                    (this._videoInWaiting100ms = !0)))
                : this._stallList.forEach(function (f, p) {
                    var g = f.timeUpdateInterval,
                      y = f.playTime,
                      v = g;
                    p === 0 &&
                      (n._videoInWaiting100ms || n._videoInWaiting500ms) &&
                      (v = Math.round(g % r)),
                      g > n._stallTimeThreshold.stall500ms
                        ? ((u.stall.stallDuration500ms += v),
                          n._videoInWaiting500ms || u.stall.stallCount500ms++,
                          (n._videoInWaiting500ms = !0))
                        : (n._videoInWaiting500ms = !1),
                      n._support100msStall &&
                        (g > n._stallTimeThreshold.stall100ms
                          ? ((u.stall.stallDuration100ms += v),
                            n._videoInWaiting100ms || u.stall.stallCount100ms++,
                            (n._videoInWaiting100ms = !0))
                          : (n._videoInWaiting100ms = !1)),
                      (u.pts = y);
                  });
              var c = u.stall,
                d = c.stallDuration500ms,
                h = c.stallDuration100ms;
              (u.stall.stallRate500ms = Math.min(
                Number((d / r).toFixed(4)),
                1
              )),
                this._support100msStall
                  ? (u.stall.stallRate100ms = Math.min(
                      Number((h / r).toFixed(4)),
                      1
                    ))
                  : (delete u.stall.stallRate100ms,
                    delete u.stall.stallCount100ms,
                    delete u.stall.stallDuration100ms),
                (this._stallList = []);
            }
            return u;
          },
        },
        {
          key: "_getPauseDuration",
          value: function () {
            var e = this._pauseDuration;
            if (((this._pauseDuration = 0), this._isPaused)) {
              var n = Date.now(),
                r = n - (this._pauseStart || 0);
              r > 500 && ((this._pauseStart = n), (e += r));
            }
            return e;
          },
        },
        {
          key: "_onVideoPause",
          value: function () {
            (this._isPaused = !0),
              (this._pauseStart = Date.now()),
              this._framePause();
          },
        },
        {
          key: "_onVideoPlay",
          value: function () {
            this._isPaused = !1;
            var e = Date.now() - this._pauseStart;
            e > 500 && (this._pauseDuration += e);
          },
        },
        {
          key: "_onVideoTimeupdate",
          value: function (e) {
            if (e && e.currentTime !== 0)
              if (this._prePts !== void 0) {
                if (
                  (this._stallList || (this._stallList = []),
                  e.currentTime > this._prePts)
                ) {
                  var n = e.currentTime - this._prePts;
                  this._stallList.push({
                    playTime: e.currentTime,
                    timeUpdateInterval: Math.round(1e3 * n),
                  });
                }
                this._prePts = e.currentTime;
              } else this._prePts = e.currentTime;
          },
        },
        {
          key: "_onVideoRefresh",
          value: function (e, n) {
            if ((this._stallList || (this._stallList = []), this._prePts)) {
              var r = n.presentationTime - this._prePts;
              this._stallList.push({
                playTime: n.presentationTime,
                timeUpdateInterval: Math.round(r),
              });
            }
            (this._prePts = n.presentationTime),
              this._player &&
                this._player.requestVideoFrameCallback(
                  this._onVideoRefresh.bind(this)
                );
          },
        },
      ]),
      t
    );
  })();
function WSe(t) {
  return Lze.apply(this, arguments);
}
function Lze() {
  return (Lze = Mh(
    Ts().mark(function t(e) {
      var n, r;
      return Ts().wrap(function (i) {
        for (;;)
          switch ((i.prev = i.next)) {
            case 0:
              return (n = {}), (i.next = 3), e;
            case 3:
              return (
                (r = i.sent),
                (n.timestamp = Date.now()),
                r == null ||
                  r.forEach(function (o) {
                    o.type === "inbound-rtp"
                      ? ((n.packetsLost = o.packetsLost),
                        (n.packetsReceived = o.packetsReceived),
                        (n.bytesReceived = o.bytesReceived),
                        o.jitterBufferDelay !== void 0 &&
                          ((n.jitterBufferDelay = o.jitterBufferDelay),
                          (n.jitterBufferEmittedCount =
                            o.jitterBufferEmittedCount)),
                        o.totalSamplesReceived !== void 0 &&
                          ((n.totalSamplesReceived = o.totalSamplesReceived),
                          (n.concealedSamples = o.concealedSamples),
                          (n.silentConcealedSamples = o.silentConcealedSamples),
                          (n.concealmentEvents = o.concealmentEvents)),
                        o.fecPacketsReceived !== void 0 &&
                          (n.fecPacketsReceived = o.fecPacketsReceived),
                        o.estimatedPlayoutTimestamp !== void 0 &&
                          (n.estimatedPlayoutTimestamp =
                            o.estimatedPlayoutTimestamp),
                        o.totalSamplesDuration !== void 0 &&
                          (n.totalSamplesDuration = o.totalSamplesDuration))
                      : o.type === "codec"
                      ? ((n.recordSampleRate = o.clockRate),
                        o.channels && (n.numChannels = o.channels),
                        (n.codecType = o.mimeType))
                      : o.type === "candidate-pair"
                      ? ((n.rtt = 1e3 * o.currentRoundTripTime),
                        (n.total_rtt = 1e3 * o.totalRoundTripTime))
                      : (o.type === "track" && o.audioLevel !== void 0) ||
                        o.type;
                  }),
                i.abrupt("return", n)
              );
            case 7:
            case "end":
              return i.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
function KSe(t, e) {
  var n = hl(t, e, "timestamp"),
    r = hl(t, e, "packetsLost"),
    i = Math.round(
      (hl(t, e, "jitterBufferDelay") / hl(t, e, "jitterBufferEmittedCount")) *
        1e3
    ),
    o = hl(t, e, "packetsReceived");
  return {
    audioLossRate: +(r / (o + r)).toFixed(2),
    receivedKBitrate: +((8 * hl(t, e, "bytesReceived")) / n).toFixed(2),
    statsInterval: n,
    rtt: e.rtt || 0,
    jitterBufferDelay: i,
    packetsReceived: o,
    numChannels: e.numChannels || 1,
    estimatedPlayoutTimestamp: e.estimatedPlayoutTimestamp,
    samplesDuration: Math.round(1e3 * hl(t, e, "totalSamplesDuration")),
    receivedSampleRate: hl(t, e, "totalSamplesReceived") / n,
    concealedSamples: Math.round(hl(t, e, "concealedSamples")),
    concealmentEvent: Math.round(hl(t, e, "concealmentEvents")),
    e2eDelay: Math.round(e.rtt + i),
  };
}
function ZSe(t) {
  return Oze.apply(this, arguments);
}
function Oze() {
  return (Oze = Mh(
    Ts().mark(function t(e) {
      var n, r;
      return Ts().wrap(function (i) {
        for (;;)
          switch ((i.prev = i.next)) {
            case 0:
              return (n = {}), (i.next = 3), e;
            case 3:
              return (
                (r = i.sent),
                (n.timestamp = Date.now()),
                r == null ||
                  r.forEach(function (o) {
                    o.type === "inbound-rtp"
                      ? ((n.packetsLost = o.packetsLost),
                        (n.packetsReceived = o.packetsReceived),
                        (n.bytesReceived = o.bytesReceived),
                        (n.framesDecoded = o.framesDecoded),
                        (n.totalDecodeTime = o.totalDecodeTime),
                        (n.framesReceived = o.framesReceived),
                        (n.keyFramesDecoded = o.keyFramesDecoded),
                        (n.framesDropped = o.framesDropped),
                        (n.firCount = o.firCount),
                        (n.nackCount = o.nackCount),
                        (n.pliCount = o.pliCount),
                        o.jitterBufferDelay !== void 0 &&
                          ((n.jitterBufferEmittedCount =
                            o.jitterBufferEmittedCount),
                          (n.jitterBufferDelay = o.jitterBufferDelay)),
                        o.frameWidth !== void 0 &&
                          ((n.width = o.frameWidth),
                          (n.height = o.frameHeight)),
                        o.estimatedPlayoutTimestamp !== void 0 &&
                          (n.estimatedPlayoutTimestamp =
                            o.estimatedPlayoutTimestamp))
                      : o.type === "track" && o.frameWidth !== void 0
                      ? ((n.width = o.frameWidth),
                        (n.height = o.frameHeight),
                        o.framesReceived !== void 0 &&
                          (n.framesReceived = o.framesReceived))
                      : o.type === "codec"
                      ? (n.codecType = o.mimeType)
                      : o.type === "candidate-pair" &&
                        ((n.rtt = 1e3 * o.currentRoundTripTime),
                        (n.totalRtt = 1e3 * o.totalRoundTripTime));
                  }),
                i.abrupt("return", n)
              );
            case 7:
            case "end":
              return i.stop();
          }
      }, t);
    })
  )).apply(this, arguments);
}
function YSe(t, e) {
  var n = hl(t, e, "timestamp"),
    r = hl(t, e, "packetsLost"),
    i = hl(t, e, "nackCount"),
    o = hl(t, e, "packetsReceived"),
    l = Math.round(
      (hl(t, e, "jitterBufferDelay") / hl(t, e, "jitterBufferEmittedCount")) *
        1e3
    );
  return {
    statsInterval: n,
    width: e.width || 0,
    height: e.height || 0,
    estimatedPlayoutTimestamp: e.estimatedPlayoutTimestamp,
    videoLossRate: +r / (hl(t, e, "packetsReceived") + r),
    receivedKBitrate: +((8 * hl(t, e, "bytesReceived")) / n).toFixed(2),
    decoderOutputFrameRate: Math.round((1e3 * hl(t, e, "framesDecoded")) / n),
    receivedFrameRate: Math.round((1e3 * hl(t, e, "framesReceived")) / n),
    rtt: e.rtt || 0,
    totalRtt: Math.round(e.totalRtt || 0),
    jitterBufferDelay: l,
    codecType: e.codecType,
    packetsReceived: o,
    avgDecodeDelay: Math.round(
      (1e3 * hl(t, e, "totalDecodeTime")) / hl(t, e, "framesDecoded")
    ),
    keyFramesDecoded: hl(t, e, "keyFramesDecoded"),
    framesDropped: hl(t, e, "framesDropped"),
    firCount: hl(t, e, "firCount"),
    nackCount: i,
    pliCount: hl(t, e, "pliCount"),
    e2eDelay: Math.round(e.rtt + l),
    retransmittedRate: +(i / (o + r)).toFixed(2),
  };
}
function hl(t, e, n) {
  var r = Number.isNaN(t[n]) ? 0 : +t[n],
    i = Number.isNaN(e[n]) ? 0 : +e[n];
  return Math.max(0, i - r);
}
var t4 = { INVALID: 0, GOOD: 1, MEDIUM: 2, POOR: 3 },
  Tc = { UNKOWN: 0, EXCELLENT: 1, GOOD: 2, POOR: 3, BAD: 4, VBAD: 5 },
  vDn = {
    UNKNOWN: 0,
    EXCELLENT: 1,
    GOOD: 2,
    POOR: 3,
    BAD: 4,
    VBAD: 5,
    DOWN: 6,
  },
  bDn = (function () {
    function t(e, n) {
      AR(this, t),
        Ii(this, "_preDownlinkStats", []),
        (this._peer = e),
        (this._networkQualityParams = n);
    }
    return (
      wR(t, [
        {
          key: "getDownlinkQuality",
          value: function (e, n) {
            if (e.receivedKBitrate !== 0 || n.receivedKBitrate !== 0) {
              if (
                (this._peer.connectionState !== "connected" &&
                  this._peer.connectionState !== "connecting") ||
                !navigator.onLine
              )
                return [vDn.DOWN, {}];
              var r = this._getQosLevel(
                  e.rtt,
                  e.audioLossRate,
                  n.retransmittedRate
                ),
                i = this._getDownlinkQoE(
                  "audio",
                  e.stallDuration / e.statsInterval,
                  e.e2eDelay
                ),
                o = this._getNetworkQuality(r, i),
                l = this._getQosLevel(
                  n.rtt,
                  n.videoLossRate,
                  n.retransmittedRate
                ),
                u = this._getDownlinkQoE(
                  "video",
                  n.stallDuration / n.statsInterval,
                  n.e2eDelay
                ),
                c = this._getNetworkQuality(l, u),
                d = o && c ? Math.ceil((o + c) / 2) : o || c,
                h = r && l ? Math.ceil((r + l) / 2) : r || l;
              return d
                ? ((this._preDownlinkStats = []
                    .concat(M$(this._preDownlinkStats), [d])
                    .slice(-2)),
                  [
                    Math.floor(
                      this._preDownlinkStats.reduce(function (f, p) {
                        return p + f;
                      }, 0) / this._preDownlinkStats.length
                    ),
                    {
                      qualityQos: h,
                      audioLevel: o,
                      videoLevel: c,
                      audioQos: r,
                      audioQoe: i,
                      videoQos: l,
                      videoQoe: u,
                    },
                  ])
                : void 0;
            }
          },
        },
        {
          key: "destroy",
          value: function () {
            this._preDownlinkStats = [];
          },
        },
        {
          key: "_getQosLevel",
          value: function (e, n, r) {
            var i,
              o = this._networkQualityParams.networkQos;
            return (
              (i =
                (!e || e <= o[Tc.EXCELLENT].maxRtt) &&
                n <= o[Tc.EXCELLENT].maxLoss
                  ? Tc.EXCELLENT
                  : (!e || e <= o[Tc.GOOD].maxRtt) && n <= o[Tc.GOOD].maxLoss
                  ? Tc.GOOD
                  : (!e || e <= o[Tc.POOR].maxRtt) && n <= o[Tc.POOR].maxLoss
                  ? Tc.POOR
                  : (!e || e <= o[Tc.BAD].maxRtt) && n <= o[Tc.BAD].maxLoss
                  ? Tc.BAD
                  : Tc.VBAD),
              r > o[Tc.BAD].minRetransmittedRate
                ? (i = Math.max(i, Tc.BAD))
                : r > o[Tc.POOR].minRetransmittedRate
                ? (i = Math.max(i, Tc.POOR))
                : r > o[Tc.GOOD].minRetransmittedRate &&
                  (i = Math.max(i, Tc.GOOD)),
              i
            );
          },
        },
        {
          key: "_getDownlinkQoE",
          value: function (e, n, r) {
            var i = this._networkQualityParams.networkQoe,
              o = {
                audio: { delay: i.audioDelay, stallRadio: i.audioStallRadio },
                video: { delay: i.videoDelay, stallRadio: i.videoStallRadio },
              }[e];
            return n > o.stallRadio ||
              r > o.delay ||
              (n > o.stallRadio / 2 && r > o.delay / 2)
              ? t4.POOR
              : (n > o.stallRadio / 2 || o.delay, t4.MEDIUM);
          },
        },
        {
          key: "_getNetworkQuality",
          value: function (e, n) {
            return n === t4.GOOD
              ? Math.max(e - 2, 1)
              : n === t4.MEDIUM
              ? e
              : Math.min(e + 1, 5);
          },
        },
      ]),
      t
    );
  })();
function _Dn(t, e, n, r) {
  var i = t + r;
  return i > n && (i = t - r), [t, i];
}
function TDn() {
  return /(HarmonyOS|OpenHarmony|ArkWeb)/i.test(navigator.userAgent);
}
var Tu = new qx("rts"),
  kne = (function (t) {
    gze(o, Pl);
    var e,
      n,
      r,
      i = yze(o);
    function o(l) {
      var u;
      return (
        AR(this, o),
        Ii(to((u = i.call(this))), "_url", ""),
        Ii(to(u), "_pc", null),
        Ii(to(u), "_audioTransceicer", null),
        Ii(to(u), "_videoTransceicer", null),
        Ii(to(u), "_mediaStream", null),
        Ii(to(u), "_lastMediaStream", null),
        Ii(to(u), "_media", null),
        Ii(to(u), "_opts", null),
        Ii(to(u), "_loader", null),
        Ii(to(u), "_networkEvaluate", null),
        Ii(to(u), "_retry", 0),
        Ii(to(u), "_waitingTimer", 0),
        Ii(to(u), "_rctConnectStartTs", 0),
        Ii(to(u), "_isReplacing", !1),
        Ii(to(u), "_checkStatsErrorTimer", null),
        Ii(to(u), "_audioStallObserver", null),
        Ii(to(u), "_videoStallObserver", null),
        Ii(to(u), "_networkQuality", null),
        Ii(to(u), "_preAudioStats", null),
        Ii(to(u), "_preVideoStats", null),
        Ii(to(u), "_rtcReportTimer", 0),
        Ii(to(u), "_networkQualityResult", []),
        Ii(to(u), "_peerStateTimer", null),
        Ii(
          to(u),
          "_checkStatsError",
          Mh(
            Ts().mark(function c() {
              return Ts().wrap(function (d) {
                for (;;)
                  switch ((d.prev = d.next)) {
                    case 0:
                      u._checkStatsErrorTimer &&
                        clearTimeout(u._checkStatsErrorTimer),
                        (u._checkStatsErrorTimer = setTimeout(
                          Mh(
                            Ts().mark(function h() {
                              var f, p, g;
                              return Ts().wrap(function (y) {
                                for (;;)
                                  switch ((y.prev = y.next)) {
                                    case 0:
                                      return (
                                        (y.next = 2), u.getStatsSnapshoot()
                                      );
                                    case 2:
                                      (f = y.sent).video &&
                                        ((p = f.video),
                                        (g = p.framesDecoded),
                                        p.bytesReceived
                                          ? g ||
                                            u._emitError(
                                              K_.create(
                                                Us.MEDIA,
                                                Us.SUB_TYPES.MEDIA_ERR_DECODE,
                                                { message: "rts decode error" }
                                              )
                                            )
                                          : u._emitError(
                                              K_.create(
                                                Us.MEDIA,
                                                Us.SUB_TYPES.MEDIA_ERR_DECODE,
                                                { message: "rts receive empty" }
                                              )
                                            ));
                                    case 4:
                                    case "end":
                                      return y.stop();
                                  }
                              }, h);
                            })
                          ),
                          u._opts.checkStatsErrorDelay
                        ));
                    case 2:
                    case "end":
                      return d.stop();
                  }
              }, c);
            })
          )
        ),
        Ii(to(u), "_onTrack", function (c) {
          Tu.log("addTrack: ", c.track, c.streams),
            (u["_".concat(c.track.kind)] = c.track);
        }),
        Ii(to(u), "_mockWaitingByTimeupdate", function () {
          var c, d;
          (((c = u._pc) === null || c === void 0
            ? void 0
            : c.connectionState) !== "connected" &&
            ((d = u._pc) === null || d === void 0
              ? void 0
              : d.iceConnectionState) !== "connected") ||
            (clearTimeout(u._waitingTimer),
            (u._waitingTimer = setTimeout(function () {
              var h;
              ((h = u._media) !== null && h !== void 0 && h.paused) ||
                u.emit("waiting");
            }, u._opts.stallInterval)));
        }),
        Ii(to(u), "_onLoadedData", function () {
          Tu.log("loadeddata emit"),
            u.getStatsSnapshoot().then(function (c) {
              u.emit(ou.METADATA_PARSED, {
                type: "video",
                elapsed: Date.now() - u._rctConnectStartTs,
                meta: c.video,
              }),
                u.emit(ou.METADATA_PARSED, {
                  type: "audio",
                  elapsed: Date.now() - u._rctConnectStartTs,
                  meta: c.audio,
                });
            });
        }),
        Ii(to(u), "_setDelay", function (c) {
          if (u._opts.progressiveSetDelay) u._startSetDelayLoop(c);
          else {
            var d,
              h = [
                "playoutDelayHint",
                "jitterBufferDelayHint",
                "jitterBufferTarget",
              ].find(function (f) {
                var p, g;
                return (
                  f in
                    ((p = u._audioTransceicer) === null || p === void 0
                      ? void 0
                      : p.receiver) &&
                  f in
                    ((g = u._videoTransceicer) === null || g === void 0
                      ? void 0
                      : g.receiver)
                );
              });
            if (
              !h ||
              ((c = typeof c == "number" && c > 0 ? c : null),
              ((d = u._audioTransceicer) === null || d === void 0
                ? void 0
                : d.receiver[h]) === c)
            )
              return;
            (u._audioTransceicer.receiver[h] = c),
              (u._videoTransceicer.receiver[h] = c);
          }
        }),
        Ii(to(u), "_targetDelayHint", null),
        Ii(to(u), "_setDelayTimer", null),
        Ii(to(u), "_setDelayError", null),
        Ii(
          to(u),
          "_startSetDelayLoop",
          (function () {
            var c = Mh(
              Ts().mark(function d(h) {
                var f, p, g, y, v, b, w, k, D;
                return Ts().wrap(function ($) {
                  for (;;)
                    switch (($.prev = $.next)) {
                      case 0:
                        if (
                          (f = [
                            "playoutDelayHint",
                            "jitterBufferDelayHint",
                            "jitterBufferTarget",
                          ].find(function (N) {
                            var P, I;
                            return (
                              N in
                                ((P = u._audioTransceicer) === null ||
                                P === void 0
                                  ? void 0
                                  : P.receiver) &&
                              N in
                                ((I = u._videoTransceicer) === null ||
                                I === void 0
                                  ? void 0
                                  : I.receiver)
                            );
                          }))
                        ) {
                          $.next = 3;
                          break;
                        }
                        return $.abrupt("return");
                      case 3:
                        if (
                          ((h = typeof h == "number" && h > 0 ? h : null),
                          u._targetDelayHint !== h)
                        ) {
                          $.next = 6;
                          break;
                        }
                        return $.abrupt("return");
                      case 6:
                        if (((u._targetDelayHint = h), !u._setDelayTimer)) {
                          $.next = 9;
                          break;
                        }
                        return $.abrupt("return");
                      case 9:
                        (p = null),
                          (g = null),
                          (y = u._opts.adaptiveJitterBuffer),
                          (v = y.loopInterval),
                          (b = y.maxAvSyncDelay),
                          (w = y.maxJitterBufferDiff),
                          (k = y.maxStep),
                          (D = 0),
                          (u._setDelayTimer = setInterval(
                            Mh(
                              Ts().mark(function N() {
                                var P,
                                  I,
                                  O,
                                  X,
                                  G,
                                  H,
                                  E,
                                  S,
                                  L,
                                  W,
                                  F,
                                  oe,
                                  De,
                                  Xe,
                                  ze,
                                  ht;
                                return Ts().wrap(
                                  function (gt) {
                                    for (;;)
                                      switch ((gt.prev = gt.next)) {
                                        case 0:
                                          if (
                                            ((gt.prev = 0),
                                            (P = u._audioTransceicer) !==
                                              null &&
                                              P !== void 0 &&
                                              P.receiver &&
                                              (I = u._videoTransceicer) !==
                                                null &&
                                              I !== void 0 &&
                                              I.receiver)
                                          ) {
                                            gt.next = 5;
                                            break;
                                          }
                                          return (
                                            (p = null),
                                            (g = null),
                                            gt.abrupt("return")
                                          );
                                        case 5:
                                          if (
                                            (O =
                                              u._audioTransceicer.receiver[
                                                f
                                              ]) !== u._targetDelayHint
                                          ) {
                                            gt.next = 8;
                                            break;
                                          }
                                          return gt.abrupt("return");
                                        case 8:
                                          return (
                                            (X = 1e3 * u._targetDelayHint),
                                            (G = 1e3 * O),
                                            (gt.next = 12),
                                            Promise.all([
                                              WSe(
                                                u._audioTransceicer.receiver.getStats()
                                              ),
                                              ZSe(
                                                u._videoTransceicer.receiver.getStats()
                                              ),
                                            ])
                                          );
                                        case 12:
                                          if (
                                            ((H = gt.sent),
                                            (E = q3(H, 2)),
                                            (S = E[0]),
                                            (L = E[1]),
                                            !p || !g)
                                          ) {
                                            gt.next = 36;
                                            break;
                                          }
                                          if (
                                            ((W = KSe(p, S)),
                                            (F = YSe(g, L))
                                              .estimatedPlayoutTimestamp &&
                                              W.estimatedPlayoutTimestamp &&
                                              (oe =
                                                F.estimatedPlayoutTimestamp -
                                                W.estimatedPlayoutTimestamp),
                                            (De = W.jitterBufferDelay),
                                            (Xe = F.jitterBufferDelay),
                                            !De || !Xe)
                                          ) {
                                            gt.next = 36;
                                            break;
                                          }
                                          if (
                                            !(
                                              Math.abs(De - Xe) > b ||
                                              (oe && Math.abs(oe) > b)
                                            )
                                          ) {
                                            gt.next = 27;
                                            break;
                                          }
                                          return (
                                            D++ > 8 &&
                                              Xe > De &&
                                              ((u._audioTransceicer.receiver[
                                                f
                                              ] = Math.min(
                                                Xe / 1e3,
                                                u._targetDelayHint
                                              )),
                                              (D = 0)),
                                            Tu.log(
                                              "av_jb_diff("
                                                .concat(De - Xe, "=")
                                                .concat(De, "-")
                                                .concat(
                                                  Xe,
                                                  ") or av_sync_diff("
                                                )
                                                .concat(
                                                  oe,
                                                  ") too much, skip setting"
                                                )
                                            ),
                                            gt.abrupt("return")
                                          );
                                        case 27:
                                          if (
                                            ((D = 0),
                                            O === null ||
                                              !(
                                                Math.abs(De - G) > w ||
                                                Math.abs(Xe - G) > w
                                              ))
                                          ) {
                                            gt.next = 31;
                                            break;
                                          }
                                          return (
                                            Tu.log(
                                              "audio("
                                                .concat(De - G, "),video(")
                                                .concat(
                                                  Xe - G,
                                                  "). current_target_diff too much, skip setting"
                                                )
                                            ),
                                            gt.abrupt("return")
                                          );
                                        case 31:
                                          (ze = X > (G || De) ? 1 : -1),
                                            (ht =
                                              (ht =
                                                (Math.abs(X - (G || De)) > k
                                                  ? (G || De) + ze * k
                                                  : X) / 1e3) > 0.2
                                                ? ht
                                                : null),
                                            Tu.log(
                                              "set receiver."
                                                .concat(f, " = ")
                                                .concat(ht)
                                            ),
                                            (u._audioTransceicer.receiver[f] =
                                              ht);
                                        case 36:
                                          (p = S), (g = L), (gt.next = 44);
                                          break;
                                        case 40:
                                          (gt.prev = 40),
                                            (gt.t0 = gt.catch(0)),
                                            Tu.error(
                                              "set delay loop error:",
                                              gt.t0
                                            ),
                                            (u._setDelayError =
                                              gt.t0.message ||
                                              gt.t0.toString() ||
                                              "unknown error");
                                        case 44:
                                        case "end":
                                          return gt.stop();
                                      }
                                  },
                                  N,
                                  null,
                                  [[0, 40]]
                                );
                              })
                            ),
                            v
                          ));
                      case 14:
                      case "end":
                        return $.stop();
                    }
                }, d);
              })
            );
            return function (d) {
              return c.apply(this, arguments);
            };
          })()
        ),
        Ii(to(u), "_getDelay", function () {
          try {
            var c = [
              "playoutDelayHint",
              "jitterBufferDelayHint",
              "jitterBufferTarget",
            ].find(function (d) {
              return (
                d in u._videoTransceicer.receiver &&
                d in u._audioTransceicer.receiver
              );
            });
            return u._audioTransceicer.receiver[c];
          } catch {
            Tu.error("get delay error");
          }
        }),
        Ii(to(u), "_onLoaderRetry", function (c, d) {
          u.emit(ou.LOAD_RETRY, { error: K_.network(c), retryTime: d });
        }),
        (u._opts = tDn(l)),
        (u._media = u._opts.media),
        (u._loader = new WIn(
          xp(
            xp({}, l.fetchOptions),
            {},
            {
              responseType: "json",
              method: "POST",
              retry: u._opts.retryCount,
              retryDelay: u._opts.retryDelay,
              timeout: u._opts.loadTimeout,
              onRetryError: u._onLoaderRetry,
              logger: Tu,
            }
          )
        )),
        (u._retry = u._opts.retryCount),
        u._bindMediaEvent(),
        u._changeVolumeInHarmonyWorkaround(),
        u._opts.mediaStream &&
          u._opts.seamlesslyReload &&
          (u._lastMediaStream = u._opts.mediaStream),
        u
      );
    }
    return (
      wR(
        o,
        [
          {
            key: "pc",
            get: function () {
              return this._pc;
            },
          },
          {
            key: "audioTrack",
            get: function () {
              return this._audio;
            },
          },
          {
            key: "videoTack",
            get: function () {
              return this._video;
            },
          },
          {
            key: "loader",
            get: function () {
              return this._loader;
            },
          },
          {
            key: "networkStats",
            get: function () {
              var l;
              return (l = this._networkEvaluate) === null || l === void 0
                ? void 0
                : l.getStats();
            },
          },
          {
            key: "getStats",
            value: function () {
              return Pze(this._pc);
            },
          },
          {
            key: "getStatsSnapshoot",
            value: function () {
              return this.getStats().then(function (l) {
                return Mze(l);
              });
            },
          },
          {
            key: "load",
            value:
              ((r = Mh(
                Ts().mark(function l(u) {
                  var c,
                    d,
                    h = this;
                  return Ts().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (
                              (this._disconnect(),
                              (this._url = u),
                              (this._retry = this._opts.retryCount),
                              !this._opts.hackCreateOfferIssue)
                            ) {
                              f.next = 6;
                              break;
                            }
                            return (f.next = 6), this._createEmptyPeer();
                          case 6:
                            return (
                              (c = FW()),
                              (f.prev = 7),
                              (d = this._pc) && d.close(),
                              (this._pc = new RTCPeerConnection({
                                encodedInsertableStreams:
                                  !(!c || !this._opts.enableSei) || void 0,
                              })),
                              this._bindRTCEvents(),
                              (f.next = 14),
                              this._connect(u)
                            );
                          case 14:
                            f.next = 19;
                            break;
                          case 16:
                            (f.prev = 16),
                              (f.t0 = f.catch(7)),
                              setTimeout(function () {
                                return h._emitError(
                                  K_.create(Us.OTHER, null, f.t0)
                                );
                              });
                          case 19:
                          case "end":
                            return f.stop();
                        }
                    },
                    l,
                    this,
                    [[7, 16]]
                  );
                })
              )),
              function (l) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "switchURL",
            value: function (l) {
              this.load(l || this._url);
            },
          },
          {
            key: "_bindRTCEvents",
            value: function () {
              var l = this,
                u = this._pc;
              u.addEventListener("track", this._onTrack),
                u.addEventListener("connectionstatechange", function () {
                  if (
                    (Tu.warn("onconnectionstatechange:", u.connectionState),
                    l._clearPeerStateTimeout(),
                    l.emit(r8.RTC_STATE_CHANGE, {
                      state: u.connectionState,
                      url: l._url,
                    }),
                    (u.connectionState !== "disconnected" &&
                      u.connectionState !== "failed") ||
                      (l.emit("waiting"), l._stopRtcReport()),
                    u.connectionState === "failed")
                  ) {
                    if (l._retry === 0)
                      return void l._emitError(
                        K_.network(new Error("rtc connect failed"))
                      );
                    l._retry--, l.load(l._url);
                  }
                  u.connectionState === "connected" &&
                    (l._handleMediaStream(),
                    l.emit(ou.TTFB, {
                      url: l._url,
                      responseUrl: l._url,
                      elapsed: Date.now() - l._rctConnectStartTs,
                    }),
                    l._checkStatsError(),
                    l._startRtcReport());
                });
            },
          },
          {
            key: "_handleMediaStream",
            value: function () {
              var l = this;
              if (this._lastMediaStream) {
                var u,
                  c = this._lastMediaStream.getVideoTracks()[0],
                  d = this._lastMediaStream.getAudioTracks()[0];
                c && this._lastMediaStream.removeTrack(c),
                  d && this._lastMediaStream.removeTrack(d),
                  (this._mediaStream = this._lastMediaStream),
                  this._audio && this._mediaStream.addTrack(this._audio),
                  this._video && this._mediaStream.addTrack(this._video),
                  (this._isReplacing = !0),
                  this._media.pause(),
                  (u = this._media.play()) === null ||
                    u === void 0 ||
                    u.finally(function () {
                      l._isReplacing = !1;
                    });
              } else {
                (this._mediaStream = new MediaStream()),
                  this._audio && this._mediaStream.addTrack(this._audio),
                  this._video && this._mediaStream.addTrack(this._video),
                  (this._media.srcObject = this._mediaStream);
                var h = this._media.play();
                h && h.catch && h.catch(function (f) {});
              }
            },
          },
          {
            key: "initVideoEncodedTransform",
            value: function () {
              var l = this;
              if (this._videoTransceicer && this._videoTransceicer.receiver) {
                var u = this._videoTransceicer.receiver;
                if (FW()) {
                  var c = u.createEncodedStreams(),
                    d = c.readable,
                    h = c.writable;
                  d.pipeThrough(
                    $ze(function (g) {
                      l.emit(ou.SEI, g);
                    })
                  ).pipeTo(h);
                } else if (aDn()) {
                  var f = new pDn(),
                    p = new MessageChannel();
                  (this._videoTransceicer.receiver.transform =
                    new RTCRtpScriptTransform(f, { port: p.port2 }, [p.port2])),
                    (p.port1.onmessage = function (g) {
                      l.emit(ou.SEI, g.data);
                    });
                }
              } else
                console.log(
                  "no receiver found when trying to bind encodedTransform"
                );
            },
          },
          {
            key: "initAudioEncodedTransform",
            value: function () {
              if (this._audioTransceicer && this._audioTransceicer.receiver)
                if (FW()) {
                  var l =
                      this._audioTransceicer.receiver.createEncodedStreams(),
                    u = l.readable,
                    c = l.writable;
                  u.pipeThrough(
                    new TransformStream({
                      transform: function (d, h) {
                        d.data.byteLength <= 1e3
                          ? h.enqueue(d)
                          : Tu.log("too large audio frame", d.data.byteLength);
                      },
                    })
                  ).pipeTo(c);
                } else Tu.warn("legacy EncodedTransform is not supported");
              else
                Tu.warn(
                  "no receiver found when trying to bind encodedTransform"
                );
            },
          },
          {
            key: "_bindMediaEvent",
            value: function () {
              this._media.addEventListener(
                "timeupdate",
                this._mockWaitingByTimeupdate
              ),
                this._media.addEventListener("loadeddata", this._onLoadedData);
            },
          },
          {
            key: "_connect",
            value:
              ((n = Mh(
                Ts().mark(function l() {
                  var u, c, d, h, f, p, g, y, v, b, w, k, D, $, N, P;
                  return Ts().wrap(
                    function (I) {
                      for (;;)
                        switch ((I.prev = I.next)) {
                          case 0:
                            if (!(u = this._pc).addTransceiver) {
                              I.next = 11;
                              break;
                            }
                            return (
                              (this._audioTransceicer = u.addTransceiver(
                                "audio",
                                { direction: "recvonly" }
                              )),
                              (this._videoTransceicer = u.addTransceiver(
                                "video",
                                { direction: "recvonly" }
                              )),
                              this._setDelay(this._opts.delayHint),
                              this._opts.enableSei &&
                                (this.initVideoEncodedTransform(),
                                this.initAudioEncodedTransform()),
                              (I.next = 8),
                              u.createOffer()
                            );
                          case 8:
                            (c = I.sent), (I.next = 14);
                            break;
                          case 11:
                            return (
                              (I.next = 13),
                              u.createOffer({
                                iceRestart: !0,
                                offerToReceiveAudio: !0,
                                offerToReceiveVideo: !0,
                              })
                            );
                          case 13:
                            c = I.sent;
                          case 14:
                            return (
                              this._opts.hackCreateOfferIssue &&
                                this._createEmptyPeer(),
                              Tu.log("local offer"),
                              Tu.log(c.sdp),
                              (d = kp.parse(c.sdp)).media
                                .filter(function (O) {
                                  return O.type === "audio";
                                })
                                .forEach(function (O) {
                                  var X,
                                    G,
                                    H =
                                      (X = O.rtp.filter(function (E) {
                                        return E.codec === "opus";
                                      })[0]) === null || X === void 0
                                        ? void 0
                                        : X.payload;
                                  H &&
                                    (O.fmtp.forEach(function (E) {
                                      E.payload === H &&
                                        (E.config =
                                          "minptime=10;stereo=1;useinbandfec=1");
                                    }),
                                    (G = O.rtcpFb) === null ||
                                      G === void 0 ||
                                      G.push({ payload: H, type: "nack" }));
                                }),
                              (c.sdp = kp.write(d)),
                              Tu.log(
                                `local offer modified:
`,
                                c.sdp
                              ),
                              (I.next = 23),
                              u.setLocalDescription(c)
                            );
                          case 23:
                            return (
                              (h = this._url),
                              (I.prev = 24),
                              this._opts.preProcessUrl &&
                                (h = this._opts.preProcessUrl(h).url),
                              (this._loader.finnalUrl = h),
                              (b = /_?session_id=([^&$]+)/.exec(h)),
                              (w = b ? b[1] : Date.now() + "666"),
                              this.emit(ou.LOAD_START, {
                                url: h,
                                offersdp:
                                  (f = this._opts) !== null &&
                                  f !== void 0 &&
                                  f.enableOriginSdpLogger
                                    ? c.sdp
                                    : void 0,
                                sessionId: w,
                              }),
                              (k = Date.now()),
                              (I.next = 33),
                              this._loader.load(h, {
                                body: JSON.stringify({
                                  sessionId: w,
                                  version: "1.0-html",
                                  localSdp: c,
                                }),
                              })
                            );
                          case 33:
                            if (
                              ((D = I.sent),
                              this.emit(ou.LOAD_RESPONSE_HEADERS, {
                                headers: D.response.headers,
                              }),
                              (($ = D == null ? void 0 : D.data) == null
                                ? void 0
                                : $.code) !== 404 &&
                                ($ == null ? void 0 : $.code) !== 403)
                            ) {
                              I.next = 41;
                              break;
                            }
                            return (
                              ((N = K_.create(
                                $.code === 404
                                  ? Us.NETWORK_NOTFOUND
                                  : Us.NETWORK_FORBIDDEN,
                                null,
                                $
                              )).errorType = Us.NETWORK),
                              this._emitError(N),
                              I.abrupt("return")
                            );
                          case 41:
                            if (($ == null ? void 0 : $.code) === 200) {
                              I.next = 43;
                              break;
                            }
                            throw new Error(
                              "code: "
                                .concat(
                                  $ == null ? void 0 : $.code,
                                  ", message:"
                                )
                                .concat($ == null ? void 0 : $.message)
                            );
                          case 43:
                            if (
                              (Tu.log("answer:"),
                              Tu.log(
                                (p = $.remoteSdp) === null || p === void 0
                                  ? void 0
                                  : p.sdp
                              ),
                              (P = kp.parse($.remoteSdp.sdp)),
                              this.emit(ou.LOAD_COMPLETE, {
                                url: h,
                                elapsed: Date.now() - k,
                                answersdp:
                                  (g = this._opts) !== null &&
                                  g !== void 0 &&
                                  g.enableOriginSdpLogger
                                    ? $ == null ||
                                      (y = $.remoteSdp) === null ||
                                      y === void 0
                                      ? void 0
                                      : y.sdp
                                    : void 0,
                                parsedSdp:
                                  P == null ||
                                  (v = P.media) === null ||
                                  v === void 0
                                    ? void 0
                                    : v.map(function (O) {
                                        return {
                                          candidates: O.candidates,
                                          rtp: O.rtp,
                                          type: O.type,
                                        };
                                      }),
                              }),
                              P.media.forEach(function (O) {
                                var X, G;
                                O.fingerprint.hash =
                                  O.fingerprint.hash.toUpperCase();
                                var H =
                                  (X = O.ssrcs) === null ||
                                  X === void 0 ||
                                  (G = X.find(function (E) {
                                    return E.attribute === "msid";
                                  })) === null ||
                                  G === void 0
                                    ? void 0
                                    : G.value;
                                H && !O.msid && (O.msid = H);
                              }),
                              ($.remoteSdp.sdp = kp.write(P)),
                              Tu.log(
                                `answer modified:
`,
                                $.remoteSdp.sdp
                              ),
                              (this._rctConnectStartTs = Date.now()),
                              u.signalingState !== "closed")
                            ) {
                              I.next = 53;
                              break;
                            }
                            return I.abrupt("return");
                          case 53:
                            return (
                              (I.next = 55), u.setRemoteDescription($.remoteSdp)
                            );
                          case 55:
                            (this._networkEvaluate = new rDn(
                              u,
                              this._opts.networkEvaluateInterval
                            )),
                              this._listenPeerStateTimeout(),
                              (I.next = 62);
                            break;
                          case 59:
                            (I.prev = 59),
                              (I.t0 = I.catch(24)),
                              this._emitError(K_.network(I.t0));
                          case 62:
                          case "end":
                            return I.stop();
                        }
                    },
                    l,
                    this,
                    [[24, 59]]
                  );
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_listenPeerStateTimeout",
            value: function () {
              var l = this;
              this._peerStateTimer && this._clearPeerStateTimeout(),
                this._opts.connectionStateChangeTimeout &&
                  (this._peerStateTimer = setTimeout(function () {
                    l._emitError(
                      K_.create(
                        Us.MEDIA,
                        Us.SUB_TYPES.MEDIA_ERR_SRC_NOT_SUPPORTED,
                        { message: "listen connectionstatechange timeout" }
                      )
                    );
                  }, this._opts.connectionStateChangeTimeout));
            },
          },
          {
            key: "_clearPeerStateTimeout",
            value: function () {
              clearTimeout(this._peerStateTimer), (this._peerStateTimer = null);
            },
          },
          {
            key: "_startRtcReport",
            value: function () {
              var l = this;
              this._stopRtcReport(),
                (this._rtcReportTimer = setInterval(
                  Mh(
                    Ts().mark(function u() {
                      var c,
                        d,
                        h,
                        f,
                        p,
                        g,
                        y,
                        v,
                        b,
                        w,
                        k,
                        D,
                        $,
                        N,
                        P,
                        I,
                        O,
                        X,
                        G;
                      return Ts().wrap(function (H) {
                        for (;;)
                          switch ((H.prev = H.next)) {
                            case 0:
                              if (
                                (c = l._audioTransceicer) !== null &&
                                c !== void 0 &&
                                c.receiver &&
                                (d = l._videoTransceicer) !== null &&
                                d !== void 0 &&
                                d.receiver
                              ) {
                                H.next = 4;
                                break;
                              }
                              return (
                                (l._preAudioStats = null),
                                (l._preVideoStats = null),
                                H.abrupt("return")
                              );
                            case 4:
                              return (
                                !l._audioStallObserver &&
                                  l._audioTransceicer &&
                                  ((l._audioStallObserver = new tL()),
                                  l._audioStallObserver.start(
                                    l._audioTransceicer
                                  )),
                                !l._videoStallObserver &&
                                  l._video &&
                                  ((l._videoStallObserver = new yDn()),
                                  l._videoStallObserver.start(l._media)),
                                !l._networkQuality &&
                                  l._opts.enableNetworkQuality &&
                                  (l._networkQuality = new bDn(
                                    l._pc,
                                    l._opts.networkQuality
                                  )),
                                (H.next = 9),
                                Promise.all([
                                  WSe(l._audioTransceicer.receiver.getStats()),
                                  ZSe(l._videoTransceicer.receiver.getStats()),
                                ])
                              );
                            case 9:
                              if (
                                ((h = H.sent),
                                (f = q3(h, 2)),
                                (p = f[0]),
                                (g = f[1]),
                                !l._preAudioStats || !l._preVideoStats)
                              ) {
                                H.next = 26;
                                break;
                              }
                              return (
                                (k = KSe(l._preAudioStats, p)),
                                (D = YSe(l._preVideoStats, g)),
                                (H.next = 18),
                                (y = l._audioStallObserver) === null ||
                                y === void 0
                                  ? void 0
                                  : y.getAudioStallInfo()
                              );
                            case 18:
                              return (
                                ($ = H.sent),
                                (H.next = 21),
                                (v = l._videoStallObserver) === null ||
                                v === void 0
                                  ? void 0
                                  : v.getStallInfo({
                                      interval: D.statsInterval,
                                      frameRateReceived: D.frameRateReceived,
                                      frameRateDecoded: D.frameRateDecoded,
                                      bitrate: D.receivedKBitrate,
                                    })
                              );
                            case 21:
                              (N = H.sent),
                                (P =
                                  (b =
                                    (w = l._networkQuality) === null ||
                                    w === void 0
                                      ? void 0
                                      : w.getDownlinkQuality(
                                          xp(
                                            xp({}, k),
                                            {},
                                            { stallDuration: $.stallDuration }
                                          ),
                                          xp(
                                            xp({}, D),
                                            {},
                                            {
                                              stallDuration:
                                                N.stall.stallDuration100ms ||
                                                N.stall.stallDuration500ms,
                                            }
                                          )
                                        )) !== null && b !== void 0
                                    ? b
                                    : []),
                                (I = q3(P, 2)),
                                (O = I[0]),
                                (X = I[1]),
                                l._opts.enableAdaptiveJitterBuffer &&
                                  l._handleJitterBuffer(
                                    X == null ? void 0 : X.qualityQos,
                                    l._opts.adaptiveJitterBuffer,
                                    l._opts.networkStrategy
                                  ),
                                D.estimatedPlayoutTimestamp &&
                                  k.estimatedPlayoutTimestamp &&
                                  (G =
                                    D.estimatedPlayoutTimestamp -
                                    k.estimatedPlayoutTimestamp),
                                l.emit(r8.RTC_NETWORK, {
                                  interval: D.statsInterval,
                                  network_quality: O,
                                  audio_stall_duration: $.stallDuration,
                                  audio_stall_count: $.stallCount,
                                  audio_stall_time_per_100sec:
                                    ($.stallDuration / k.statsInterval) * 100,
                                  audio_stall_count_per_100sec:
                                    ($.stallCount / k.statsInterval) *
                                    100 *
                                    1e3,
                                  video_stall_duration:
                                    N.stall.stallDuration500ms,
                                  video_stall_count: N.stall.stallCount500ms,
                                  video_stall_duration_100ms:
                                    N.stall.stallDuration100ms,
                                  video_stall_count_100ms:
                                    N.stall.stallCount100ms,
                                  video_stall_time_per_100sec:
                                    (N.stall.stallDuration500ms /
                                      D.statsInterval) *
                                    100,
                                  video_stall_count_per_100sec:
                                    (N.stall.stallCount500ms /
                                      D.statsInterval) *
                                    100 *
                                    1e3,
                                  rtt: D.rtt,
                                  video_jb_delay: D.jitterBufferDelay,
                                  audio_jb_delay: k.jitterBufferDelay,
                                  audio_lost_rate: k.audioLossRate,
                                  video_lost_rate: D.videoLossRate,
                                  video_retransmitted_rate: D.retransmittedRate,
                                  quality_audio_level:
                                    X == null ? void 0 : X.audioLevel,
                                  quality_video_level:
                                    X == null ? void 0 : X.videoLevel,
                                  quality_audio_qos:
                                    X == null ? void 0 : X.audioQos,
                                  quality_video_qos:
                                    X == null ? void 0 : X.videoQos,
                                  quality_qos:
                                    X == null ? void 0 : X.qualityQos,
                                  quality_audio_qoe:
                                    X == null ? void 0 : X.audioQoe,
                                  quality_video_qoe:
                                    X == null ? void 0 : X.videoQoe,
                                  current_delay: l._getDelay(),
                                  visibility_state: document.visibilityState,
                                  target_delay: l._targetDelayHint,
                                  av_sync_diff: G,
                                  set_delay_error: l._setDelayError || null,
                                });
                            case 26:
                              (l._preAudioStats = p),
                                (l._preVideoStats = g),
                                (l.set_delay_error = null);
                            case 29:
                            case "end":
                              return H.stop();
                          }
                      }, u);
                    })
                  ),
                  2e3
                ));
            },
          },
          {
            key: "_handleJitterBuffer",
            value: function (l, u, c) {
              this._networkQualityResult.push(l),
                this._networkQualityResult.length > u.networkWindow &&
                  this._networkQualityResult.shift();
              var d = this._networkQualityResult.filter(Boolean);
              if (d.length === u.networkWindow) {
                var h, f, p;
                if (u.windowMethod === "min") f = Math.min.apply(Math, M$(d));
                else if (u.windowMethod === "max")
                  f = Math.max.apply(Math, M$(d));
                else {
                  var g = M$(d).sort(function (v, b) {
                      return v - b;
                    }),
                    y = Math.floor(g.length / 2);
                  f = g.length % 2 != 0 ? g[y] : (g[y - 1] + g[y]) / 2;
                }
                f &&
                  ((h = c[f]) === null || h === void 0
                    ? void 0
                    : h.jitterBuffer) !== void 0 &&
                  this._startSetDelayLoop(
                    (p = c[f]) === null || p === void 0
                      ? void 0
                      : p.jitterBuffer
                  );
              }
            },
          },
          {
            key: "_stopRtcReport",
            value: function () {
              var l, u, c;
              (l = this._audioStallObserver) === null ||
                l === void 0 ||
                l.destroy(),
                (u = this._videoStallObserver) === null ||
                  u === void 0 ||
                  u.destroy(),
                (c = this._networkQuality) === null ||
                  c === void 0 ||
                  c.destroy(),
                (this._audioStallObserver = null),
                (this._videoStallObserver = null),
                (this._networkQuality = null),
                (this._preAudioStats = null),
                (this._preVideoStats = null),
                this._rtcReportTimer &&
                  (clearInterval(this._rtcReportTimer),
                  (this._rtcReportTimer = 0));
            },
          },
          {
            key: "_disconnect",
            value: function () {
              var l, u;
              (l = this._loader) === null || l === void 0 || l.cancel(),
                (u = this._networkEvaluate) === null ||
                  u === void 0 ||
                  u.destroy(),
                this._stopRtcReport(),
                clearTimeout(this._checkStatsErrorTimer),
                this._clearPeerStateTimeout(),
                (this._audioTransceicer = null),
                (this._videoTransceicer = null),
                (this._mediaStream = null),
                (this._networkEvaluate = null);
            },
          },
          {
            key: "_emitError",
            value: function (l) {
              this.emit(ou.ERROR, l),
                clearTimeout(this._checkStatsErrorTimer),
                this._clearPeerStateTimeout(),
                this._pc &&
                  (this._pc.close(),
                  this._media &&
                    ((this._media.srcObject = null),
                    this._media.removeAttribute("src")));
            },
          },
          {
            key: "_createEmptyPeer",
            value:
              ((e = Mh(
                Ts().mark(function l() {
                  var u;
                  return Ts().wrap(function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          return (
                            (u = new RTCPeerConnection()),
                            (c.next = 3),
                            u.createOffer()
                          );
                        case 3:
                          u.close(), (u = null);
                        case 5:
                        case "end":
                          return c.stop();
                      }
                  }, l);
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_changeVolumeInHarmonyWorkaround",
            value: function () {
              var l = this;
              if (TDn()) {
                var u = Object.getOwnPropertyDescriptor(
                  HTMLMediaElement.prototype,
                  "muted"
                );
                this._media &&
                  u &&
                  (Tu.log("apply HarmonyOS muted workaround"),
                  Object.defineProperty(this._media, "muted", {
                    configurable: !0,
                    enumerable: !0,
                    get: u.get,
                    set: function (c) {
                      u.set.call(this, c);
                      var d = q3(_Dn(this.volume, 0, 1, 0.01), 2),
                        h = d[0],
                        f = d[1];
                      (this.volume = f),
                        (this.volume = h),
                        Tu.log(
                          "HarmonyOS muted workaround. set muted =",
                          c,
                          "volume:",
                          f,
                          "->",
                          h
                        );
                    },
                  }),
                  (this._revertVolumeWorkaround = function () {
                    Tu.log(
                      "revert HarmonyOS muted workaround. video dom:",
                      l._media
                    ),
                      l._media && Object.defineProperty(l._media, "muted", u);
                  }));
              }
            },
          },
          {
            key: "destroy",
            value: function (l) {
              var u, c;
              this._disconnect(),
                (u = this._revertVolumeWorkaround) === null ||
                  u === void 0 ||
                  u.call(this),
                delete this._revertVolumeWorkaround,
                (c = this._media) === null ||
                  c === void 0 ||
                  c.removeEventListener(
                    "timeupdate",
                    this._mockWaitingByTimeupdate
                  ),
                this._media && !l && (this._media.srcObject = null),
                this._pc && this._pc.close(),
                (this._loader = null),
                (this._media = null),
                (this._pc = null),
                (this._opts = null);
            },
          },
        ],
        [
          {
            key: "enableLogger",
            value: function () {
              qx.enable();
            },
          },
          {
            key: "disableLogger",
            value: function () {
              qx.disable();
            },
          },
        ]
      ),
      o
    );
  })();
try {
  localStorage.getItem("xgd") ? kne.enableLogger() : kne.disableLogger();
} catch {}
var EDn = (function (t) {
  gze(r, hm);
  var e,
    n = yze(r);
  function r() {
    var i;
    AR(this, r);
    for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
      l[u] = arguments[u];
    return (
      Ii(to((i = n.call.apply(n, [this].concat(l)))), "_rts", null),
      Ii(to(i), "_mediaStream", null),
      Ii(to(i), "_disconnectTimer", void 0),
      Ii(to(i), "_rtsOpts", null),
      Ii(to(i), "_onPause", function () {
        i._disconnectTimer ||
          (i._disconnectTimer = setTimeout(function () {
            i._closeAfterPause(), i._clearDisconnectTimer();
          }, 1e3 * i.config.disconnectTime));
      }),
      Ii(to(i), "_reInit", function () {
        var c;
        i._clearDisconnectTimer(),
          ((c = i._rts) !== null && c !== void 0 && c._pc) ||
            (i._init(), i._bindRtsEvents());
      }),
      Ii(to(i), "_init", function () {
        var c;
        (c = i._rts) === null || c === void 0 || c.destroy();
        var d = i.player.config,
          h = d.rts || {};
        (i._rtsOpts = h),
          (i._rts = new kne(
            xp(
              {
                media: i.player.video,
                mediaStream: i._mediaStream,
                preProcessUrl: function (f, p) {
                  var g, y;
                  return (
                    ((g = (y = i.player).preProcessUrl) === null || g === void 0
                      ? void 0
                      : g.call(y, f, p)) || { url: f, ext: p }
                  );
                },
              },
              h
            )
          )),
          i._rts.load(d.url);
      }),
      Ii(to(i), "_onSwitchURL", function (c) {
        c && (i.player.config.url = c),
          i._rts ? i._rts.switchURL(c) : i._reInit();
      }),
      Ii(to(i), "destroy", function () {
        var c;
        (i.player.switchURL = i._originSwitchFn),
          i._clearDisconnectTimer(),
          (c = i._rts) === null || c === void 0 || c.destroy(),
          (i._rts = null);
      }),
      i
    );
  }
  return (
    wR(
      r,
      [
        {
          key: "pc",
          get: function () {
            var i;
            return (i = this._rts) === null || i === void 0 ? void 0 : i.pc;
          },
        },
        {
          key: "videoTrack",
          get: function () {
            var i;
            return (i = this._rts) === null || i === void 0
              ? void 0
              : i.videoTack;
          },
        },
        {
          key: "audioTrack",
          get: function () {
            var i;
            return (i = this._rts) === null || i === void 0
              ? void 0
              : i.audioTrack;
          },
        },
        {
          key: "core",
          get: function () {
            return this._rts;
          },
        },
        {
          key: "loader",
          get: function () {
            var i;
            return (i = this._rts) === null || i === void 0 ? void 0 : i.loader;
          },
        },
        {
          key: "version",
          get: function () {
            return "0.2.1-alpha.45";
          },
        },
        {
          key: "beforePlayerInit",
          value: function () {
            var i,
              o,
              l,
              u = this;
            this._init(),
              this._originSwitchFn ||
                (this._originSwitchFn = this.player.switchURL.bind(
                  this.player
                )),
              (this.player.switchURL = this._onSwitchURL),
              (i = this.player) === null ||
                i === void 0 ||
                i.useHooks("replay", this._onSwitchURL),
              this.on(Rue, this._onSwitchURL),
              this.on(Sue, this.destroy),
              ((o = this.player.config) === null ||
              o === void 0 ||
              (l = o.rts) === null ||
              l === void 0
                ? void 0
                : l.disconnectTime) !== void 0 &&
                (this.on(_wn, function () {
                  var c;
                  ((c = u._rts) !== null && c !== void 0 && c._isReplacing) ||
                    u._onPause();
                }),
                this.on(BF, function () {
                  var c;
                  ((c = u._rts) !== null && c !== void 0 && c._isReplacing) ||
                    u._reInit();
                })),
              this._bindRtsEvents();
            try {
              hm.defineGetterOrSetter(this.player, {
                __url: {
                  get: function () {
                    try {
                      return URL.createObjectURL(new MediaSource());
                    } catch {
                      var c, d;
                      ((c = u.player) !== null &&
                        c !== void 0 &&
                        (d = c.video) !== null &&
                        d !== void 0 &&
                        d.srcObject) ||
                        (u.player.video.srcObject = new MediaStream());
                    }
                  },
                },
              });
            } catch {}
          },
        },
        {
          key: "getStats",
          value: function () {
            var i;
            return (i = this._rts) === null || i === void 0
              ? void 0
              : i.getStats();
          },
        },
        {
          key: "getStatsSnapshoot",
          value: function () {
            var i;
            return (i = this._rts) === null || i === void 0
              ? void 0
              : i.getStatsSnapshoot();
          },
        },
        {
          key: "getNetWorkInfo",
          value: function () {
            var i;
            return (i = this._rts) === null || i === void 0
              ? void 0
              : i.networkStats;
          },
        },
        {
          key: "setDelay",
          value: function (i) {
            var o;
            (o = this._rts) === null || o === void 0 || o._setDelay(i);
          },
        },
        {
          key: "_clearDisconnectTimer",
          value: function () {
            clearTimeout(this._disconnectTimer),
              (this._disconnectTimer = void 0);
          },
        },
        {
          key: "_closeAfterPause",
          value: function () {
            var i, o, l;
            if ((i = this._rts) !== null && i !== void 0 && i._pc) {
              var u;
              (o = this.config) !== null &&
                o !== void 0 &&
                o.seamlesslyReload &&
                (this._mediaStream =
                  (u = this._rts) === null || u === void 0
                    ? void 0
                    : u._mediaStream),
                (l = this._rts) === null || l === void 0 || l.destroy(!0),
                (this._rts = null);
            }
          },
        },
        {
          key: "_bindRtsEvents",
          value: function () {
            this._transErrorEvent(),
              this._transCoreEvent(ou.LOAD_START),
              this._transCoreEvent(ou.LOAD_COMPLETE),
              this._transCoreEvent(ou.TTFB),
              this._transCoreEvent(ou.LOAD_RESPONSE_HEADERS),
              this._transCoreEvent(ou.LOAD_RETRY),
              this._transCoreEvent(ou.METADATA_PARSED),
              this._transCoreEvent(ou.SEI),
              this._transCoreEvent(r8.RTC_STATE_CHANGE),
              this._transCoreEvent(r8.RTC_NETWORK);
          },
        },
        {
          key: "_transErrorEvent",
          value: function () {
            var i = this;
            this._rts.on(ou.ERROR, function (o) {
              if (i.player) {
                var l = new s0(i.player, o),
                  u = i._rtsOpts,
                  c = u.backupConstruct,
                  d = u.backupURL;
                if (d) {
                  var h,
                    f = i.player;
                  f.emit(
                    "core_event",
                    xp(
                      xp(
                        {},
                        {
                          url: f.config.url,
                          code: l.errorCode,
                          message: l.message,
                          httpCode: l.httpCode,
                        }
                      ),
                      {},
                      { eventName: "core.degrade" }
                    )
                  ),
                    f.emit("degrade", {
                      url: f.config.url,
                      code: l.errorCode,
                      message: l.message,
                      httpCode: l.httpCode,
                    }),
                    f.unRegisterPlugin("rts"),
                    (f.switchURL = i._originSwitchFn),
                    (i._rts = null),
                    (f.rts = null),
                    (h = f.video) !== null &&
                      h !== void 0 &&
                      h.srcObject &&
                      (f.video.srcObject = null),
                    (f.config.url = d),
                    c
                      ? f.registerPlugin(c).beforePlayerInit()
                      : (f.video.src = d);
                } else i.player.emit(Eue, l);
              }
            }),
              this._rts.on("waiting", function () {
                var o;
                (o = i.player) === null || o === void 0 || o.emit("waiting");
              });
          },
        },
        {
          key: "_transCoreEvent",
          value: function (i) {
            var o = this;
            this._rts.on(i, function (l) {
              o.player &&
                o.player.emit(
                  "core_event",
                  xp(xp({}, l), {}, { eventName: i })
                );
            });
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "rts";
          },
        },
        {
          key: "isSupported",
          value: function () {
            return Cze();
          },
        },
        {
          key: "getCapacity",
          value: function () {
            return iDn();
          },
        },
        {
          key: "isSupportedH264",
          value:
            ((e = Mh(
              Ts().mark(function i(o) {
                var l, u, c, d, h;
                return Ts().wrap(
                  function (f) {
                    for (;;)
                      switch ((f.prev = f.next)) {
                        case 0:
                          return (f.prev = 0), (f.next = 3), r.getCapacity();
                        case 3:
                          if (
                            ((u = f.sent),
                            (c =
                              (l = u.video) === null || l === void 0
                                ? void 0
                                : l.filter(function (p) {
                                    return (
                                      p.codec === "H264" &&
                                      (!o || p.config.indexOf(o) !== -1)
                                    );
                                  }).length))
                          ) {
                            f.next = 10;
                            break;
                          }
                          return (f.next = 8), r.getCapacity();
                        case 8:
                          (h = f.sent),
                            (c =
                              (d = h.video) === null || d === void 0
                                ? void 0
                                : d.filter(function (p) {
                                    return (
                                      p.codec === "H264" &&
                                      (!o || p.config.indexOf(o) !== -1)
                                    );
                                  }).length);
                        case 10:
                          return f.abrupt("return", !!c);
                        case 13:
                          return (
                            (f.prev = 13),
                            (f.t0 = f.catch(0)),
                            f.abrupt("return", !1)
                          );
                        case 16:
                        case "end":
                          return f.stop();
                      }
                  },
                  i,
                  null,
                  [[0, 13]]
                );
              })
            )),
            function (i) {
              return e.apply(this, arguments);
            }),
        },
      ]
    ),
    r
  );
})();
const SDn = Os.PluginRtm;
var Rei = Object.freeze({
  __proto__: null,
  RtmPlugin: EDn,
  __PLUGIN_NAME__: SDn,
});
function RDn(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o,
      l,
      u = [],
      c = !0,
      d = !1;
    try {
      if (((o = (n = n.call(t)).next), e === 0)) {
        if (Object(n) !== n) return;
        c = !1;
      } else
        for (
          ;
          !(c = (r = o.call(n)).done) && (u.push(r.value), u.length !== e);
          c = !0
        );
    } catch (h) {
      (d = !0), (i = h);
    } finally {
      try {
        if (!c && n.return != null && ((l = n.return()), Object(l) !== l))
          return;
      } finally {
        if (d) throw i;
      }
    }
    return u;
  }
}
function QSe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function is(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? QSe(Object(n), !0).forEach(function (r) {
          xn(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : QSe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Ai() {
  Ai = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = S.method,
      W = E.iterator[L];
    if (W === void 0)
      return (
        (S.delegate = null),
        (L === "throw" &&
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")) ||
          (L !== "return" &&
            ((S.method = "throw"),
            (S.arg = new TypeError(
              "The iterator does not provide a '" + L + "' method"
            )))),
        f
      );
    var F = h(W, E.iterator, S.arg);
    if (F.type === "throw")
      return (S.method = "throw"), (S.arg = F.arg), (S.delegate = null), f;
    var oe = F.arg;
    return oe
      ? oe.done
        ? ((S[E.resultName] = oe.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : oe
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function i8(t) {
  return (i8 =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function JSe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function Qo(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        JSe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        JSe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function pc(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function qSe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, Fze(r.key), r);
  }
}
function gc(t, e, n) {
  return (
    e && qSe(t.prototype, e),
    n && qSe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function xn(t, e, n) {
  return (
    (e = Fze(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function $B(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && Gze(t, e);
}
function Ine(t) {
  return (Ine = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function Gze(t, e) {
  return (Gze = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function ADn() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function wDn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = Object.keys(t);
  for (r = 0; r < o.length; r++) (n = o[r]), e.indexOf(n) >= 0 || (i[n] = t[n]);
  return i;
}
function Dne(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = wDn(t, e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        e.indexOf(n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
function fo(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function kDn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return fo(t);
}
function xB(t) {
  var e = ADn();
  return function () {
    var n,
      r = Ine(t);
    if (e) {
      var i = Ine(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return kDn(this, n);
  };
}
function J1(t, e) {
  return PDn(t) || RDn(t, e) || Nze(t, e) || $Dn();
}
function IDn(t) {
  return DDn(t) || MDn(t) || Nze(t) || CDn();
}
function DDn(t) {
  if (Array.isArray(t)) return Pne(t);
}
function PDn(t) {
  if (Array.isArray(t)) return t;
}
function MDn(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function Nze(t, e) {
  if (t) {
    if (typeof t == "string") return Pne(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? Pne(t, e)
        : void 0
    );
  }
}
function Pne(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function CDn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function $Dn() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function xDn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function Fze(t) {
  var e = xDn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
function eRe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function nL(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? eRe(Object(n), !0).forEach(function (r) {
          Cr(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : eRe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Ic() {
  Ic = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = S.method,
      W = E.iterator[L];
    if (W === void 0)
      return (
        (S.delegate = null),
        (L === "throw" &&
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")) ||
          (L !== "return" &&
            ((S.method = "throw"),
            (S.arg = new TypeError(
              "The iterator does not provide a '" + L + "' method"
            )))),
        f
      );
    var F = h(W, E.iterator, S.arg);
    if (F.type === "throw")
      return (S.method = "throw"), (S.arg = F.arg), (S.delegate = null), f;
    var oe = F.arg;
    return oe
      ? oe.done
        ? ((S[E.resultName] = oe.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : oe
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function QI(t) {
  return (QI =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function tRe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function V1(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        tRe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        tRe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function zf(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function nRe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, Hze(r.key), r);
  }
}
function jf(t, e, n) {
  return (
    e && nRe(t.prototype, e),
    n && nRe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Cr(t, e, n) {
  return (
    (e = Hze(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function C5(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && LB(t, e);
}
function JI(t) {
  return (JI = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function LB(t, e) {
  return (LB = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function Uze() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function Bze(t, e, n) {
  return (Bze = Uze()
    ? Reflect.construct.bind()
    : function (r, i, o) {
        var l = [null];
        l.push.apply(l, i);
        var u = new (Function.bind.apply(r, l))();
        return o && LB(u, o.prototype), u;
      }).apply(null, arguments);
}
function LDn(t) {
  return Function.toString.call(t).indexOf("[native code]") !== -1;
}
function a8(t) {
  var e = typeof Map == "function" ? new Map() : void 0;
  return (
    (a8 = function (n) {
      if (n === null || !LDn(n)) return n;
      if (typeof n != "function")
        throw new TypeError(
          "Super expression must either be null or a function"
        );
      if (e !== void 0) {
        if (e.has(n)) return e.get(n);
        e.set(n, r);
      }
      function r() {
        return Bze(n, arguments, JI(this).constructor);
      }
      return (
        (r.prototype = Object.create(n.prototype, {
          constructor: {
            value: r,
            enumerable: !1,
            writable: !0,
            configurable: !0,
          },
        })),
        LB(r, n)
      );
    }),
    a8(t)
  );
}
function ODn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = Object.keys(t);
  for (r = 0; r < o.length; r++) (n = o[r]), e.indexOf(n) >= 0 || (i[n] = t[n]);
  return i;
}
function GDn(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = ODn(t, e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        e.indexOf(n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
function ua(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function NDn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return ua(t);
}
function $5(t) {
  var e = Uze();
  return function () {
    var n,
      r = JI(t);
    if (e) {
      var i = JI(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return NDn(this, n);
  };
}
function FDn(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = JI(t)) !== null; );
  return t;
}
function Mne() {
  return (
    (Mne =
      typeof Reflect < "u" && Reflect.get
        ? Reflect.get.bind()
        : function (t, e, n) {
            var r = FDn(t, e);
            if (r) {
              var i = Object.getOwnPropertyDescriptor(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    Mne.apply(this, arguments)
  );
}
function UDn(t, e) {
  if (t) {
    if (typeof t == "string") return rRe(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? rRe(t, e)
        : void 0
    );
  }
}
function rRe(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function BDn(t, e) {
  var n = (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (!n) {
    if (
      Array.isArray(t) ||
      (n = UDn(t)) ||
      (e && t && typeof t.length == "number")
    ) {
      n && (t = n);
      var r = 0,
        i = function () {};
      return {
        s: i,
        n: function () {
          return r >= t.length ? { done: !0 } : { done: !1, value: t[r++] };
        },
        e: function (c) {
          throw c;
        },
        f: i,
      };
    }
    throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  }
  var o,
    l = !0,
    u = !1;
  return {
    s: function () {
      n = n.call(t);
    },
    n: function () {
      var c = n.next();
      return (l = c.done), c;
    },
    e: function (c) {
      (u = !0), (o = c);
    },
    f: function () {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw o;
      }
    },
  };
}
function HDn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function Hze(t) {
  var e = HDn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
var yp,
  Pf = (function () {
    function t() {
      zf(this, t);
    }
    return (
      jf(t, null, [
        {
          key: "start",
          value: function (e) {
            return e && e.length
              ? (e.length === 1 && e.end(0) - e.start(0) < 1e-6) ||
                (e.length === 1 && e.start(0) < 0)
                ? 0
                : e.start(0)
              : 0;
          },
        },
        {
          key: "end",
          value: function (e) {
            return e && e.length
              ? e.length === 1 && e.end(0) - e.start(0) < 1e-6
                ? 0
                : e.end(e.length - 1)
              : 0;
          },
        },
        {
          key: "get",
          value: function (e) {
            if (e)
              try {
                return e.buffered;
              } catch {}
          },
        },
        {
          key: "buffers",
          value: function (e, n) {
            if (!e || !e.length) return [];
            for (var r = [], i = 0, o = e.length; i < o; i++) {
              var l = r.length;
              if (l && n) {
                var u = r[l - 1],
                  c = u[1];
                if (e.start(i) - c <= n) {
                  var d = e.end(i);
                  d > c && (u[1] = d);
                } else r.push([e.start(i), e.end(i)]);
              } else r.push([e.start(i), e.end(i)]);
            }
            return r;
          },
        },
        {
          key: "totalLength",
          value: function (e) {
            return e && e.length
              ? e.reduce(function (n, r) {
                  return n + (r[1] - r[0]);
                }, 0)
              : 0;
          },
        },
        {
          key: "info",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 0,
              r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0;
            if (!e || !e.length) return { start: 0, end: 0, buffers: [] };
            for (
              var i = 0,
                o = 0,
                l = 0,
                u = 0,
                c = 0,
                d = 0,
                h = 0,
                f = t.buffers(e, r),
                p = 0,
                g = f.length;
              p < g;
              p++
            ) {
              var y = f[p];
              if (n + r >= y[0] && n <= y[1]) (i = y[0]), (o = y[1]), (l = p);
              else {
                if (n + r < y[0]) {
                  (u = y[0]), (c = y[1]);
                  break;
                }
                n + r > y[1] && ((d = y[0]), (h = y[1]));
              }
            }
            return {
              start: i,
              end: o,
              index: l,
              buffers: f,
              nextStart: u,
              nextEnd: c,
              prevStart: d,
              prevEnd: h,
              currentTime: n,
              behind: n - i,
              remaining: o ? o - n : 0,
              length: t.totalLength && t.totalLength(f),
            };
          },
        },
        {
          key: "isBuffered",
          value: function (e, n) {
            if (e) {
              var r = t.get(e);
              if (r != null && r.length) {
                for (var i = 0; i < r.length; i++)
                  if (n >= r.start(i) && n <= r.end(i)) return !0;
              }
            }
            return !1;
          },
        },
      ]),
      t
    );
  })(),
  XDn = typeof window < "u",
  vo = {
    MANIFEST: "manifest",
    NETWORK: "network",
    NETWORK_TIMEOUT: "network_timeout",
    NETWORK_FORBIDDEN: "network_forbidden",
    NETWORK_NOTFOUND: "network_notfound",
    NETWROK_RANGE_NOT_SATISFIABLE: "network_range_not_satisfiable",
    DEMUX: "demux",
    REMUX: "remux",
    MEDIA: "media",
    DRM: "drm",
    OTHER: "other",
    RUNTIME: "runtime",
    SUB_TYPES: {
      FLV: "FLV",
      HLS: "HLS",
      MP4: "MP4",
      FMP4: "FMP4",
      MSE_ADD_SB: "MSE_ADD_SB",
      MSE_APPEND_BUFFER: "MSE_APPEND_BUFFER",
      MSE_OTHER: "MSE_OTHER",
      MSE_FULL: "MSE_FULL",
      MSE_CHANGE_TYPE: "MSE_CHANGE_TYPE",
      OPTION: "OPTION",
      DASH: "DASH",
      LICENSE: "LICENSE",
      CUSTOM_LICENSE: "CUSTOM_LICENSE",
      MSE_HIJACK: "MSE_HIJACK",
      EME_HIJACK: "EME_HIJACK",
      SIDX: "SIDX",
      NO_CANPLAY_ERROR: "NO_CANPLAY_ERROR",
      BUFFERBREAK_ERROR: "BUFFERBREAK_ERROR",
      WAITING_TIMEOUT_ERROR: "WAITING_TIMEOUT_ERROR",
      MEDIA_ERR_ABORTED: "MEDIA_ERR_ABORTED",
      MEDIA_ERR_NETWORK: "MEDIA_ERR_NETWORK",
      MEDIA_ERR_DECODE: "MEDIA_ERR_DECODE",
      MEDIA_ERR_SRC_NOT_SUPPORTED: "MEDIA_ERR_SRC_NOT_SUPPORTED",
      MEDIA_ERR_CODEC_NOT_SUPPORTED: "MEDIA_ERR_CODEC_NOT_SUPPORTED",
      MEDIA_ERR_URL_EMPTY: "MEDIA_ERR_URL_EMPTY",
    },
  },
  UW =
    (Cr((yp = {}), vo.MANIFEST, { HLS: 1100, DASH: 1200 }),
    Cr(yp, vo.NETWORK, 2100),
    Cr(yp, vo.NETWORK_TIMEOUT, 2101),
    Cr(yp, vo.NETWORK_FORBIDDEN, 2103),
    Cr(yp, vo.NETWORK_NOTFOUND, 2104),
    Cr(yp, vo.NETWROK_RANGE_NOT_SATISFIABLE, 2116),
    Cr(yp, vo.DEMUX, {
      FLV: 3100,
      HLS: 3200,
      MP4: 3300,
      FMP4: 3400,
      SIDX: 3410,
    }),
    Cr(yp, vo.REMUX, { FMP4: 4100, MP4: 4200 }),
    Cr(yp, vo.MEDIA, {
      MEDIA_ERR_ABORTED: 5101,
      MEDIA_ERR_NETWORK: 5102,
      MEDIA_ERR_DECODE: 5103,
      MEDIA_ERR_SRC_NOT_SUPPORTED: 5104,
      MEDIA_ERR_CODEC_NOT_SUPPORTED: 5105,
      MEDIA_ERR_URL_EMPTY: 5106,
      MSE_ADD_SB: 5200,
      MSE_APPEND_BUFFER: 5201,
      MSE_OTHER: 5202,
      MSE_FULL: 5203,
      MSE_HIJACK: 5204,
      MSE_CHANGE_TYPE: 5205,
      EME_HIJACK: 5301,
    }),
    Cr(yp, vo.DRM, { LICENSE: 7100, CUSTOM_LICENSE: 7200 }),
    Cr(yp, vo.OTHER, 8e3),
    Cr(yp, vo.RUNTIME, {
      NO_CANPLAY_ERROR: 9001,
      BUFFERBREAK_ERROR: 9002,
      WAITING_TIMEOUT_ERROR: 9003,
    }),
    yp),
  Fl = (function (t) {
    C5(n, a8(Error));
    var e = $5(n);
    function n(r, i, o, l, u) {
      var c;
      return (
        zf(this, n),
        ((c = e.call(this, u || (o == null ? void 0 : o.message))).errorType =
          r === vo.NETWORK_TIMEOUT ? vo.NETWORK : r),
        (c.originError = o),
        (c.ext = l),
        (c.errorCode = UW[r][i] || UW[r]),
        (c.errorMessage = c.message),
        c.errorCode ||
          ((c.errorType = vo.OTHER), (c.errorCode = UW[c.errorType])),
        c
      );
    }
    return (
      jf(n, null, [
        {
          key: "create",
          value: function (r, i, o, l, u) {
            return r instanceof n
              ? r
              : (r instanceof Error && ((o = r), (r = "")),
                r || (r = vo.OTHER),
                new n(r, i, o, l, u));
          },
        },
        {
          key: "network",
          value: function (r) {
            var i;
            return new n(
              r != null && r.isTimeout ? vo.NETWORK_TIMEOUT : vo.NETWORK,
              null,
              r instanceof Error ? r : null,
              {
                url: r == null ? void 0 : r.url,
                response: r == null ? void 0 : r.response,
                httpCode:
                  r == null || (i = r.response) === null || i === void 0
                    ? void 0
                    : i.status,
              }
            );
          },
        },
      ]),
      n
    );
  })(),
  n4 = { DEBUG: 1, LOG: 2, WARN: 3, ERROR: 4 },
  VDn = 204800,
  zDn = ["Boolean", "Number", "String", "Undefined", "Null", "Date", "Object"],
  yv = (function () {
    function t(e, n) {
      zf(this, t),
        (this.name = e || ""),
        (this._prefix = "[".concat(this.name, "]")),
        (this.logCacheLevel = (n == null ? void 0 : n.logCacheLevel) || 3),
        (this.logMaxSize = (n == null ? void 0 : n.logMaxSize) || VDn),
        (this.logSize = 0),
        (this.logTextArray = []);
    }
    return (
      jf(
        t,
        [
          {
            key: "debug",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [n4.DEBUG].concat(r)),
                t.disabled ||
                  (e = console).debug.apply(
                    e,
                    ["[".concat(fM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "log",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [n4.LOG].concat(r)),
                t.disabled ||
                  (e = console).log.apply(
                    e,
                    ["[".concat(fM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "warn",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [n4.WARN].concat(r)),
                t.disabled ||
                  (e = console).warn.apply(
                    e,
                    ["[".concat(fM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "error",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [n4.ERROR].concat(r)),
                t.disabled ||
                  (e = console).error.apply(
                    e,
                    ["[".concat(fM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "logCache",
            value: function (e) {
              if (!(e < this.logCacheLevel)) {
                var n = "";
                try {
                  for (
                    var r = arguments.length,
                      i = new Array(r > 1 ? r - 1 : 0),
                      o = 1;
                    o < r;
                    o++
                  )
                    i[o - 1] = arguments[o];
                  var l = i.map(function (c) {
                    return Xze(c);
                  });
                  n = "[".concat(fM(), "]") + this._prefix + JSON.stringify(l);
                } catch {
                  return;
                }
                if (
                  (e >= this.logCacheLevel &&
                    ((this.logSize += n.length), this.logTextArray.push(n)),
                  this.logSize > this.logMaxSize)
                ) {
                  var u = this.logTextArray.shift();
                  this.logSize -= u.length;
                }
              }
            },
          },
          {
            key: "getLogCache",
            value: function () {
              var e = this.logTextArray.join(`
`);
              return this.reset(), e;
            },
          },
          {
            key: "reset",
            value: function () {
              (this.logTextArray = []), (this.logSize = 0);
            },
          },
          {
            key: "table",
            value: function () {
              var e;
              t.disabled ||
                (console.group(this._prefix),
                (e = console).table.apply(e, arguments),
                console.groupEnd());
            },
          },
          {
            key: "setLogLevel",
            value: function (e) {
              this.logCacheLevel = e;
            },
          },
        ],
        [
          {
            key: "enable",
            value: function () {
              t.disabled = !1;
            },
          },
          {
            key: "disable",
            value: function () {
              t.disabled = !0;
            },
          },
        ]
      ),
      t
    );
  })();
function fM() {
  return new Date().toLocaleString();
}
function jDn(t) {
  if (QI(t) !== "object") return t;
  var e = Object.prototype.toString.call(t).slice(8, -1);
  switch (e) {
    case "Array":
    case "Uint8Array":
    case "ArrayBuffer":
      return e + "[" + t.length + "]";
    case "Object":
      return "{}";
    default:
      return e;
  }
}
function Xze(t, e, n) {
  n || (n = 1), e || (e = 2);
  var r = {};
  if (!t || QI(t) !== "object") return t;
  var i = Object.prototype.toString.call(t).slice(8, -1);
  if (!zDn.includes(i)) return i;
  if (!(n > e)) {
    for (var o in t)
      Object.prototype.hasOwnProperty.call(t, o) &&
        (n === e
          ? (r[o] = jDn(t[o]))
          : QI(t[o]) === "object"
          ? (r[o] = Xze(t[o], e, n + 1))
          : (r[o] = t[o]));
    return r;
  }
}
function Qw() {
  var t,
    e,
    n = new Promise(function (r, i) {
      (t = r), (e = i);
    });
  return (
    (n.used = !1),
    (n.resolve = function () {
      return (n.used = !0), t.apply(void 0, arguments);
    }),
    (n.reject = function () {
      return (n.used = !0), e.apply(void 0, arguments);
    }),
    n
  );
}
function nw() {
  try {
    return parseInt(performance.now(), 10);
  } catch {
    return new Date().getTime();
  }
}
Cr(yv, "disabled", !0);
var WDn = {
  stringify: function (t) {
    try {
      return JSON.stringify(t);
    } catch {
      return "";
    }
  },
  parse: function (t) {
    try {
      return JSON.parse(t);
    } catch {
      return;
    }
  },
};
function iRe() {
  var t = !(arguments.length > 0 && arguments[0] !== void 0) || arguments[0];
  try {
    return XDn
      ? t && typeof ManagedMediaSource < "u"
        ? ManagedMediaSource
        : window.MediaSource
      : null;
  } catch {}
}
function BW(t) {
  return /ManagedMediaSource/gi.test(Object.prototype.toString.call(t));
}
function KDn(t) {
  var e = [];
  if (t instanceof TimeRanges)
    for (var n = 0; n < t.length; n++)
      e.push({ start: t.start(n), end: t.end(n) });
  return e;
}
var r4 = {
    APPEND: "appendBuffer",
    REMOVE: "removeBuffer",
    UPDATE_DURATION: "updateDuration",
  },
  Dh = (function () {
    function t(i, o) {
      var l = this;
      zf(this, t),
        Cr(this, "media", null),
        Cr(this, "mediaSource", null),
        Cr(this, "_openPromise", Qw()),
        Cr(this, "_queue", Object.create(null)),
        Cr(this, "_sourceBuffer", Object.create(null)),
        Cr(this, "_mseFullFlag", {}),
        Cr(this, "_st", 0),
        Cr(this, "_opst", 0),
        Cr(this, "_logger", null),
        Cr(this, "_config", null),
        Cr(this, "_url", null),
        Cr(this, "_onStartStreaming", function () {
          l._logger.debug("startstreaming");
        }),
        Cr(this, "_onEndStreaming", function () {
          l._logger.debug("endstreaming");
        }),
        Cr(this, "_onSBUpdateEnd", function (u) {
          var c = l._queue[u];
          if (c) {
            var d = c[0];
            if (
              ((d == null ? void 0 : d.opName) !== r4.UPDATE_DURATION &&
                c.shift(),
              d)
            ) {
              var h,
                f,
                p = nw() - l._opst;
              l._logger.debug(
                "UpdateEnd(".concat(u, "/").concat(d.opName, ")"),
                WDn.stringify(
                  KDn(
                    (h = l._sourceBuffer[u]) === null || h === void 0
                      ? void 0
                      : h.buffered
                  )
                ),
                p,
                d.context
              ),
                d.promise.resolve({
                  name: d.opName,
                  context: d.context,
                  costtime: p,
                });
              var g =
                (f = d.context) === null || f === void 0 ? void 0 : f.callback;
              g && typeof g == "function" && g(d.context), l._startQueue(u);
            }
          }
        }),
        Cr(this, "_onSBUpdateError", function (u, c) {
          var d = l._queue[u];
          if (d) {
            var h = d[0];
            h &&
              (l._logger.error("UpdateError", u, h.opName, h.context),
              h.promise.reject(
                new Fl(vo.MEDIA, vo.SUB_TYPES.MSE_APPEND_BUFFER, c)
              ));
          }
        }),
        (this._config = Object.assign(t.getDefaultConfig(), o)),
        i && this.bindMedia(i),
        (this._logger = new yv("MSE")),
        this._config.openLog && yv.enable();
    }
    var e, n, r;
    return (
      jf(
        t,
        [
          {
            key: "isOpened",
            get: function () {
              var i;
              return (
                ((i = this.mediaSource) === null || i === void 0
                  ? void 0
                  : i.readyState) === "open"
              );
            },
          },
          {
            key: "hasOpTasks",
            get: function () {
              var i = this,
                o = !1;
              return (
                Object.keys(this._queue).forEach(function (l) {
                  var u = i._queue[l];
                  Array.isArray(u) && (o || (o = u.length > 0));
                }),
                o
              );
            },
          },
          {
            key: "url",
            get: function () {
              return this._url;
            },
          },
          {
            key: "duration",
            get: function () {
              var i;
              return (
                ((i = this.mediaSource) === null || i === void 0
                  ? void 0
                  : i.duration) || -1
              );
            },
          },
          {
            key: "isEnded",
            get: function () {
              return (
                !!this.mediaSource && this.mediaSource.readyState === "ended"
              );
            },
          },
          {
            key: "streaming",
            get: function () {
              return !BW(this.mediaSource) || this.mediaSource.streaming;
            },
          },
          {
            key: "isFull",
            value: function (i) {
              return i ? this._mseFullFlag[i] : this._mseFullFlag[t.VIDEO];
            },
          },
          {
            key: "updateDuration",
            value: function (i) {
              var o = this,
                l = this.mediaSource && this.mediaSource.duration > i;
              if (this.mediaSource && this.mediaSource.duration > i) {
                var u = 0;
                if (
                  (Object.keys(this._sourceBuffer).forEach(function (c) {
                    try {
                      u = Math.max(o.bufferEnd(c) || 0, u);
                    } catch {}
                  }),
                  i < u)
                )
                  return Promise.resolve();
              }
              return this._enqueueBlockingOp(
                function () {
                  o.isEnded
                    ? o._logger.debug("setDuration but ended")
                    : o.mediaSource &&
                      ((o.mediaSource.duration = i),
                      o._logger.debug("setDuration", i));
                },
                r4.UPDATE_DURATION,
                { isReduceDuration: l }
              );
            },
          },
          {
            key: "open",
            value: function () {
              var i = this;
              if (
                this._openPromise.used &&
                !this.isOpened &&
                this.mediaSource
              ) {
                var o = this.mediaSource;
                o.addEventListener("sourceopen", function l() {
                  var u = nw() - i._st;
                  i._logger.debug("sourceopen", u),
                    o.removeEventListener("sourceopen", l),
                    i._openPromise.resolve({ costtime: u });
                }),
                  (this._openPromise = Qw());
              }
              return this._openPromise;
            },
          },
          {
            key: "bindMedia",
            value:
              ((r = V1(
                Ic().mark(function i(o) {
                  var l,
                    u,
                    c,
                    d,
                    h = this;
                  return Ic().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (!this.mediaSource && !this.media) {
                              f.next = 3;
                              break;
                            }
                            return (f.next = 3), this.unbindMedia();
                          case 3:
                            if (((l = iRe(this._config.preferMMS)), o && l)) {
                              f.next = 6;
                              break;
                            }
                            throw new Error(
                              "Param media or MediaSource does not exist"
                            );
                          case 6:
                            return (
                              (this.media = o),
                              (u = this.mediaSource = new l()),
                              (c = BW(u)),
                              (this._st = nw()),
                              (d = function p() {
                                var g = nw() - h._st;
                                h._logger.debug("sourceopen"),
                                  u.removeEventListener("sourceopen", p),
                                  URL.revokeObjectURL(o.src),
                                  h._openPromise.resolve({ costtime: g });
                              }),
                              u.addEventListener("sourceopen", d),
                              c &&
                                (u.addEventListener(
                                  "startstreaming",
                                  this._onStartStreaming
                                ),
                                u.addEventListener(
                                  "endstreaming",
                                  this._onEndStreaming
                                )),
                              (this._url = URL.createObjectURL(u)),
                              (o.src = this._url),
                              (o.disableRemotePlayback = c),
                              f.abrupt("return", this._openPromise)
                            );
                          case 17:
                          case "end":
                            return f.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function (i) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "unbindMedia",
            value:
              ((n = V1(
                Ic().mark(function i() {
                  var o,
                    l,
                    u,
                    c = this;
                  return Ic().wrap(
                    function (d) {
                      for (;;)
                        switch ((d.prev = d.next)) {
                          case 0:
                            if (
                              (this._openPromise.used ||
                                this._openPromise.resolve(),
                              (o = this.mediaSource))
                            ) {
                              if (
                                (Object.keys(this._queue).forEach(function (h) {
                                  var f = c._queue[h];
                                  f &&
                                    f.forEach(function (p) {
                                      var g, y;
                                      return (g = p.promise) === null ||
                                        g === void 0 ||
                                        (y = g.resolve) === null ||
                                        y === void 0
                                        ? void 0
                                        : y.call(g);
                                    });
                                }),
                                (l =
                                  !!this.media && this.media.readyState >= 1),
                                (u = o.readyState === "open"),
                                l && u)
                              )
                                try {
                                  o.endOfStream();
                                } catch {}
                              Object.keys(this._sourceBuffer).forEach(function (
                                h
                              ) {
                                try {
                                  o.removeSourceBuffer(c._sourceBuffer[h]);
                                } catch {}
                              }),
                                BW(o) &&
                                  (o.removeEventListener(
                                    "startstreaming",
                                    this._onStartStreaming
                                  ),
                                  o.removeEventListener(
                                    "endstreaming",
                                    this._onEndStreaming
                                  ));
                            }
                            if (this.media) {
                              (this.media.disableRemotePlayback = !1),
                                this.media.removeAttribute("src");
                              try {
                                this.media.load();
                              } catch {}
                              this.media = null;
                            }
                            (this.mediaSource = null),
                              (this._openPromise = Qw()),
                              (this._queue = Object.create(null)),
                              (this._sourceBuffer = Object.create(null));
                          case 8:
                          case "end":
                            return d.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "createSource",
            value: function (i, o) {
              if (!this._sourceBuffer[i] && this.mediaSource) {
                var l;
                try {
                  l = this._sourceBuffer[i] =
                    this.mediaSource.addSourceBuffer(o);
                } catch (u) {
                  throw new Fl(vo.MEDIA, vo.SUB_TYPES.MSE_ADD_SB, u);
                }
                (l.mimeType = o),
                  l.addEventListener(
                    "updateend",
                    this._onSBUpdateEnd.bind(this, i)
                  ),
                  l.addEventListener(
                    "error",
                    this._onSBUpdateError.bind(this, i)
                  );
              }
            },
          },
          {
            key: "changeType",
            value: function (i, o) {
              var l = this,
                u = this._sourceBuffer[i];
              return this.mediaSource && u && u.mimeType !== o
                ? typeof u.changeType != "function"
                  ? Promise.reject(
                      new Fl(
                        vo.MEDIA,
                        vo.SUB_TYPES.MSE_CHANGE_TYPE,
                        new Error("changeType is not a function")
                      )
                    )
                  : this._enqueueOp(
                      i,
                      function () {
                        try {
                          u.changeType(o);
                        } catch (c) {
                          throw new Fl(
                            vo.MEDIA,
                            vo.SUB_TYPES.MSE_CHANGE_TYPE,
                            c
                          );
                        }
                        (u.mimeType = o), l._onSBUpdateEnd(i);
                      },
                      "changeType",
                      { mimeType: o }
                    )
                : Promise.resolve();
            },
          },
          {
            key: "createOrChangeSource",
            value: function (i, o) {
              return this.createSource(i, o), this.changeType(i, o);
            },
          },
          {
            key: "append",
            value: function (i, o, l) {
              var u = this;
              return o && o.byteLength && this._sourceBuffer[i]
                ? this._enqueueOp(
                    i,
                    function () {
                      var c;
                      u.mediaSource &&
                        !u.media.error &&
                        (u._logger.debug("MSE APPEND START", l),
                        (u._opst = nw()),
                        (c = u._sourceBuffer[i]) === null ||
                          c === void 0 ||
                          c.appendBuffer(o));
                    },
                    r4.APPEND,
                    l
                  )
                : Promise.resolve();
            },
          },
          {
            key: "remove",
            value: function (i, o, l, u) {
              var c = this,
                d = !1;
              return (
                this._mseFullFlag[i] && (d = !0),
                this._enqueueOp(
                  i,
                  function () {
                    if (c.mediaSource && !c.media.error) {
                      var h = c._sourceBuffer[i];
                      o >= l || !h
                        ? c._onSBUpdateEnd(i)
                        : ((c._opst = nw()),
                          c._logger.debug("MSE REMOVE START", i, o, l, u),
                          h.remove(o, l));
                    }
                  },
                  r4.REMOVE,
                  u,
                  d
                )
              );
            },
          },
          {
            key: "clearBuffer",
            value: function (i, o) {
              var l,
                u = this;
              return (
                Object.keys(this._sourceBuffer).forEach(function (c) {
                  l = u.remove(c, i, o);
                }),
                l || Promise.resolve()
              );
            },
          },
          {
            key: "clearAllBuffer",
            value: function () {
              var i,
                o = this;
              return (
                Object.keys(this._sourceBuffer).forEach(function (l) {
                  var u = o._sourceBuffer[l];
                  i = o.remove(l, 0, Pf.end(Pf.get(u)));
                }),
                i
              );
            },
          },
          {
            key: "clearOpQueues",
            value: function (i, o) {
              var l;
              this._logger.debug("MSE clearOpQueue START");
              var u = this._queue[i];
              if (o && u) this._queue[i] = [];
              else if (u && u[i] && !(u.length < 5)) {
                var c = [];
                u.forEach(function (d) {
                  d.context && d.context.isinit && c.push(d);
                }),
                  (this._queue[i] = u.slice(0, 2)),
                  c.length > 0 && (l = this._queue[i]).push.apply(l, c);
              }
            },
          },
          {
            key: "endOfStream",
            value: function (i) {
              var o = this;
              return this.mediaSource && this.mediaSource.readyState === "open"
                ? this._enqueueBlockingOp(function () {
                    var l = o.mediaSource;
                    l &&
                      l.readyState === "open" &&
                      (o._logger.debug("MSE endOfStream START"),
                      i ? l.endOfStream(i) : l.endOfStream());
                  }, "endOfStream")
                : Promise.resolve();
            },
          },
          {
            key: "setLiveSeekableRange",
            value: function (i, o) {
              var l = this.mediaSource;
              i < 0 ||
                o < i ||
                l == null ||
                !l.setLiveSeekableRange ||
                l.readyState !== "open" ||
                l.setLiveSeekableRange(i, o);
            },
          },
          {
            key: "getSourceBuffer",
            value: function (i) {
              return this._sourceBuffer[i];
            },
          },
          {
            key: "buffered",
            value: function (i) {
              return Pf.get(this._sourceBuffer[i]);
            },
          },
          {
            key: "bufferStart",
            value: function (i) {
              return Pf.start(this.buffered(i));
            },
          },
          {
            key: "bufferEnd",
            value: function (i) {
              return Pf.end(this.buffered(i));
            },
          },
          {
            key: "_enqueueOp",
            value: function (i, o, l, u, c) {
              var d = this;
              if (!this.mediaSource) return Promise.resolve();
              var h = (this._queue[i] = this._queue[i] || []),
                f = { exec: o, promise: Qw(), opName: l, context: u };
              return (
                c
                  ? (h.splice(0, 0, f),
                    (this._mseFullFlag[i] = !1),
                    this._startQueue(i))
                  : h.push(f),
                this.isOpened || this.isEnded
                  ? h.length === 1 && this._startQueue(i)
                  : this._openPromise.then(function () {
                      h.length === 1 && d._startQueue(i);
                    }),
                f.promise
              );
            },
          },
          {
            key: "_enqueueBlockingOp",
            value:
              ((e = V1(
                Ic().mark(function i(o, l, u) {
                  var c,
                    d,
                    h = this;
                  return Ic().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (this.mediaSource) {
                              f.next = 2;
                              break;
                            }
                            return f.abrupt("return", Promise.resolve());
                          case 2:
                            if ((c = Object.keys(this._sourceBuffer)).length) {
                              f.next = 5;
                              break;
                            }
                            return f.abrupt("return", o());
                          case 5:
                            return (
                              (d = []),
                              c.forEach(function (p) {
                                var g = h._queue[p],
                                  y = Qw();
                                d.push(y),
                                  g.push({
                                    exec: function () {
                                      y.resolve();
                                    },
                                    promise: y,
                                    opName: l,
                                    context: u,
                                  }),
                                  g.length === 1 && h._startQueue(p);
                              }),
                              f.abrupt(
                                "return",
                                Promise.all(d).then(function () {
                                  try {
                                    return o();
                                  } finally {
                                    c.forEach(function (p) {
                                      var g = h._queue[p],
                                        y = h._sourceBuffer[p];
                                      g == null || g.shift(),
                                        (y && y.updating) || h._startQueue(p);
                                    });
                                  }
                                })
                              )
                            );
                          case 8:
                          case "end":
                            return f.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function (i, o, l) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_startQueue",
            value: function (i) {
              var o = this._queue[i];
              if (o) {
                var l = o[0];
                if (l && !this._mseFullFlag[i])
                  try {
                    l.exec();
                  } catch (d) {
                    var u, c;
                    d &&
                    d.message &&
                    d.message.indexOf("SourceBuffer is full") >= 0
                      ? ((this._mseFullFlag[i] = !0),
                        l.context &&
                          QI(l.context) === "object" &&
                          (l.context.isFull = !0),
                        this._logger.error(
                          "[MSE error],  context,",
                          l.context,
                          " ,name,",
                          l.opName,
                          ",err,SourceBuffer is full"
                        ),
                        l == null ||
                          (u = l.promise) === null ||
                          u === void 0 ||
                          u.reject(new Fl(vo.MEDIA, vo.SUB_TYPES.MSE_FULL, d)))
                      : (this._logger.error(d),
                        l == null ||
                          (c = l.promise) === null ||
                          c === void 0 ||
                          c.reject(
                            d.constructor === Fl
                              ? d
                              : new Fl(vo.MEDIA, vo.SUB_TYPES.MSE_OTHER, d)
                          ),
                        o.shift(),
                        this._startQueue(i));
                  }
              }
            },
          },
          {
            key: "setTimeoffset",
            value: function (i, o, l) {
              var u = this;
              return this._enqueueOp(
                i,
                function () {
                  o < 0 && (o += 0.001),
                    (u._sourceBuffer[i].timestampOffset = o),
                    u._onSBUpdateEnd(i);
                },
                "setTimeoffset",
                l
              );
            },
          },
          {
            key: "abort",
            value: function (i, o) {
              var l = this;
              return this.isOpened
                ? this._enqueueOp(
                    i,
                    function () {
                      l._sourceBuffer[i].abort(), l._onSBUpdateEnd(i);
                    },
                    "abort",
                    o
                  )
                : Promise.resolve();
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              var i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"',
                o = iRe();
              if (!o) return !1;
              try {
                return o.isTypeSupported(i);
              } catch (l) {
                return this._logger.error(i, l), !1;
              }
            },
          },
          {
            key: "isMMSOnly",
            value: function () {
              return (
                typeof ManagedMediaSource < "u" && typeof MediaSource > "u"
              );
            },
          },
          {
            key: "getDefaultConfig",
            value: function () {
              return { openLog: !1, preferMMS: !1 };
            },
          },
        ]
      ),
      t
    );
  })();
Cr(Dh, "VIDEO", "video"), Cr(Dh, "AUDIO", "audio");
var TS = { FETCH: "fetch", XHR: "xhr" },
  rL = { ARRAY_BUFFER: "arraybuffer", TEXT: "text", JSON: "json" },
  av = (function (t) {
    C5(n, a8(Error));
    var e = $5(n);
    function n(r, i, o, l) {
      var u;
      return (
        zf(this, n),
        Cr(ua((u = e.call(this, l))), "retryCount", 0),
        Cr(ua(u), "isTimeout", !1),
        Cr(ua(u), "loaderType", TS.FETCH),
        Cr(ua(u), "startTime", 0),
        Cr(ua(u), "endTime", 0),
        Cr(ua(u), "options", {}),
        (u.url = r),
        (u.request = i),
        (u.response = o),
        u
      );
    }
    return jf(n);
  })(),
  Vze = Object.prototype.toString;
function ZDn(t) {
  return t !== null && QI(t) === "object";
}
function aRe(t) {
  if (Vze.call(t) !== "[object Object]") return !1;
  var e = Object.getPrototypeOf(t);
  return e === null || e === Object.prototype;
}
function YDn(t) {
  return Vze.call(t) === "[object Date]";
}
function zze(t) {
  if (
    t &&
    t[0] !== null &&
    t[0] !== void 0 &&
    (t[0] !== 0 || (t[1] !== null && t[1] !== void 0))
  ) {
    var e = "bytes=" + t[0] + "-";
    return t[1] && (e += t[1]), e;
  }
}
function oRe(t) {
  return encodeURIComponent(t)
    .replace(/%3A/gi, ":")
    .replace(/%24/g, "$")
    .replace(/%2C/gi, ",")
    .replace(/%20/g, "+")
    .replace(/%5B/gi, "[")
    .replace(/%5D/gi, "]");
}
function jze(t, e) {
  if (t) {
    if (!e) return t;
    var n,
      r = Object.keys(e)
        .map(function (o) {
          if ((n = e[o]) != null)
            return (
              Array.isArray(n) ? (o += "[]") : (n = [n]),
              n
                .map(function (l) {
                  return (
                    YDn(l)
                      ? (l = l.toISOString())
                      : ZDn(l) && (l = JSON.stringify(l)),
                    "".concat(oRe(o), "=").concat(oRe(l))
                  );
                })
                .join("&")
            );
        })
        .filter(Boolean)
        .join("&");
    if (r) {
      var i = t.indexOf("#");
      i !== -1 && (t = t.slice(0, i)),
        (t += (t.indexOf("?") === -1 ? "?" : "&") + r);
    }
    return t;
  }
}
function Cne(t, e, n, r, i, o, l, u, c, d, h) {
  return (
    (i = i != null ? parseFloat(i) : null),
    (r = parseInt(r || "0", 10)),
    Number.isNaN(r) && (r = 0),
    {
      data: t,
      done: e,
      options: {
        range: c,
        vid: d,
        index: u,
        contentLength: r,
        age: i,
        startTime: o,
        firstByteTime: l,
        endTime: Date.now(),
        priOptions: h,
      },
      response: n,
    }
  );
}
function $ne(t, e) {
  return Math.round((8 * t * 1e3) / e / 1024);
}
var pa = {
    ERROR: "error",
    TTFB: "core.ttfb",
    LOAD_START: "core.loadstart",
    LOAD_RESPONSE_HEADERS: "core.loadresponseheaders",
    LOAD_COMPLETE: "core.loadcomplete",
    LOAD_RETRY: "core.loadretry",
    SOURCEBUFFER_CREATED: "core.sourcebuffercreated",
    MEDIASOURCE_OPENED: "core.mediasourceopened",
    ANALYZE_DURATION_EXCEEDED: "core.analyzedurationexceeded",
    APPEND_BUFFER: "core.appendbuffer",
    REMOVE_BUFFER: "core.removebuffer",
    BUFFEREOS: "core.buffereos",
    KEYFRAME: "core.keyframe",
    CHASEFRAME: "core.chaseframe",
    METADATA_PARSED: "core.metadataparsed",
    SEI: "core.sei",
    SEI_IN_TIME: "core.seiintime",
    FLV_SCRIPT_DATA: "core.flvscriptdata",
    LOWDECODE: "core.lowdecode",
    SWITCH_URL_SUCCESS: "core.switchurlsuccess",
    SWITCH_URL_FAILED: "core.switchurlfailed",
    SPEED: "core.speed",
    HLS_MANIFEST_LOADED: "core.hlsmanifestloaded",
    HLS_LEVEL_LOADED: "core.hlslevelloaded",
    DEMUXED_TRACK: "core.demuxedtrack",
    STREAM_EXCEPTION: "core.streamexception",
    LARGE_AV_FIRST_FRAME_GAP_DETECT: "LARGE_AV_FIRST_FRAME_GAP_DETECT",
    LARGE_VIDEO_DTS_GAP_DETECT: "LARGE_VIDEO_DTS_GAP_DETECT",
    LARGE_AUDIO_DTS_GAP_DETECT: "LARGE_AUDIO_DTS_GAP_DETECT",
    AUDIO_GAP_DETECT: "AUDIO_GAP_DETECT",
    AUDIO_OVERLAP_DETECT: "AUDIO_OVERLAP_DETECT",
    MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT:
      "MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",
    REAL_TIME_SPEED: "real_time_speed",
  },
  sRe = 2097152,
  xne = (function (t) {
    C5(r, Pl);
    var e,
      n = $5(r);
    function r() {
      var i;
      return (
        zf(this, r),
        Cr(ua((i = n.call(this))), "_abortController", null),
        Cr(ua(i), "_timeoutTimer", null),
        Cr(ua(i), "_reader", null),
        Cr(ua(i), "_response", null),
        Cr(ua(i), "_aborted", !1),
        Cr(ua(i), "_index", -1),
        Cr(ua(i), "_range", null),
        Cr(ua(i), "_receivedLength", 0),
        Cr(ua(i), "_running", !1),
        Cr(ua(i), "_logger", null),
        Cr(ua(i), "_vid", ""),
        Cr(ua(i), "_onProcessMinLen", 0),
        Cr(ua(i), "_onCancel", null),
        Cr(ua(i), "_priOptions", null),
        i
      );
    }
    return (
      jf(
        r,
        [
          {
            key: "load",
            value: function (i) {
              var o,
                l = this,
                u = i.url,
                c = i.vid,
                d = i.timeout,
                h = i.responseType,
                f = i.onProgress,
                p = i.index,
                g = i.onTimeout,
                y = i.onCancel,
                v = i.range,
                b = i.transformResponse,
                w = i.request,
                k = i.params,
                D = i.logger,
                $ = i.method,
                N = i.headers,
                P = i.body,
                I = i.mode,
                O = i.credentials,
                X = i.cache,
                G = i.redirect,
                H = i.referrer,
                E = i.referrerPolicy,
                S = i.onProcessMinLen,
                L = i.priOptions;
              (this._logger = D),
                (this._aborted = !1),
                (this._onProcessMinLen = S),
                (this._onCancel = y),
                (this._abortController =
                  typeof AbortController < "u" && new AbortController()),
                (this._running = !0),
                (this._index = p),
                (this._range = v || [0, 0]),
                (this._vid = c || u),
                (this._priOptions = L || {});
              var W = {
                  method: $,
                  headers: N,
                  body: P,
                  mode: I,
                  credentials: O,
                  cache: X,
                  redirect: G,
                  referrer: H,
                  referrerPolicy: E,
                  signal:
                    (o = this._abortController) === null || o === void 0
                      ? void 0
                      : o.signal,
                },
                F = !1;
              clearTimeout(this._timeoutTimer), (u = jze(u, k));
              var oe = zze(v);
              oe &&
                ((N = w
                  ? w.headers
                  : (W.headers = W.headers || (Headers ? new Headers() : {}))),
                Headers && N instanceof Headers
                  ? N.append("Range", oe)
                  : (N.Range = oe)),
                d &&
                  (this._timeoutTimer = setTimeout(function () {
                    if (((F = !0), l.cancel(), g)) {
                      var Xe = new av(u, W, null, "timeout");
                      (Xe.isTimeout = !0),
                        g(Xe, {
                          index: l._index,
                          range: l._range,
                          vid: l._vid,
                          priOptions: l._priOptions,
                        });
                    }
                  }, d));
              var De = Date.now();
              return (
                this._logger.debug(
                  "[fetch load start], index,",
                  p,
                  ",range,",
                  v
                ),
                new Promise(function (Xe, ze) {
                  fetch(w || u, w ? void 0 : W)
                    .then(
                      (function () {
                        var ht = V1(
                          Ic().mark(function gt(pt) {
                            var $t, ot, tt, He;
                            return Ic().wrap(function (de) {
                              for (;;)
                                switch ((de.prev = de.next)) {
                                  case 0:
                                    if (
                                      (clearTimeout(l._timeoutTimer),
                                      (l._response = pt),
                                      !l._aborted && l._running)
                                    ) {
                                      de.next = 4;
                                      break;
                                    }
                                    return de.abrupt("return");
                                  case 4:
                                    if ((b && (pt = b(pt, u) || pt), pt.ok)) {
                                      de.next = 7;
                                      break;
                                    }
                                    throw new av(
                                      u,
                                      W,
                                      pt,
                                      "bad network response"
                                    );
                                  case 7:
                                    if ((($t = Date.now()), h !== rL.TEXT)) {
                                      de.next = 15;
                                      break;
                                    }
                                    return (de.next = 11), pt.text();
                                  case 11:
                                    (ot = de.sent),
                                      (l._running = !1),
                                      (de.next = 37);
                                    break;
                                  case 15:
                                    if (h !== rL.JSON) {
                                      de.next = 22;
                                      break;
                                    }
                                    return (de.next = 18), pt.json();
                                  case 18:
                                    (ot = de.sent),
                                      (l._running = !1),
                                      (de.next = 37);
                                    break;
                                  case 22:
                                    if (!f) {
                                      de.next = 29;
                                      break;
                                    }
                                    return (
                                      (l.resolve = Xe),
                                      (l.reject = ze),
                                      l._loadChunk(pt, f, De, $t),
                                      de.abrupt("return")
                                    );
                                  case 29:
                                    return (de.next = 31), pt.arrayBuffer();
                                  case 31:
                                    (ot = de.sent),
                                      (ot = new Uint8Array(ot)),
                                      (l._running = !1),
                                      (tt = Date.now() - De),
                                      (He = $ne(ot.byteLength, tt)),
                                      l.emit(pa.REAL_TIME_SPEED, {
                                        speed: He,
                                        len: ot.byteLength,
                                        time: tt,
                                        vid: l._vid,
                                        index: l._index,
                                        range: l._range,
                                        priOptions: l._priOptions,
                                      });
                                  case 37:
                                    l._logger.debug(
                                      "[fetch load end], index,",
                                      p,
                                      ",range,",
                                      v
                                    ),
                                      Xe(
                                        Cne(
                                          ot,
                                          !0,
                                          pt,
                                          pt.headers.get("Content-Length"),
                                          pt.headers.get("age"),
                                          De,
                                          $t,
                                          p,
                                          v,
                                          l._vid,
                                          l._priOptions
                                        )
                                      );
                                  case 39:
                                  case "end":
                                    return de.stop();
                                }
                            }, gt);
                          })
                        );
                        return function (gt) {
                          return ht.apply(this, arguments);
                        };
                      })()
                    )
                    .catch(function (ht) {
                      var gt;
                      clearTimeout(l._timeoutTimer),
                        (l._running = !1),
                        (l._aborted && !F) ||
                          (((ht =
                            ht instanceof av
                              ? ht
                              : new av(
                                  u,
                                  W,
                                  null,
                                  (gt = ht) === null || gt === void 0
                                    ? void 0
                                    : gt.message
                                )).startTime = De),
                          (ht.endTime = Date.now()),
                          (ht.isTimeout = F),
                          (ht.options = {
                            index: l._index,
                            range: l._range,
                            vid: l._vid,
                            priOptions: l._priOptions,
                          }),
                          ze(ht));
                    });
                })
              );
            },
          },
          {
            key: "cancel",
            value:
              ((e = V1(
                Ic().mark(function i() {
                  return Ic().wrap(
                    function (o) {
                      for (;;)
                        switch ((o.prev = o.next)) {
                          case 0:
                            if (!this._aborted) {
                              o.next = 2;
                              break;
                            }
                            return o.abrupt("return");
                          case 2:
                            if (
                              ((this._aborted = !0),
                              (this._running = !1),
                              !this._response)
                            ) {
                              o.next = 14;
                              break;
                            }
                            if (((o.prev = 5), !this._reader)) {
                              o.next = 9;
                              break;
                            }
                            return (o.next = 9), this._reader.cancel();
                          case 9:
                            o.next = 13;
                            break;
                          case 11:
                            (o.prev = 11), (o.t0 = o.catch(5));
                          case 13:
                            this._response = this._reader = null;
                          case 14:
                            if (this._abortController) {
                              try {
                                this._abortController.abort();
                              } catch {}
                              this._abortController = null;
                            }
                            this._onCancel &&
                              this._onCancel({
                                index: this._index,
                                range: this._range,
                                vid: this._vid,
                                priOptions: this._priOptions,
                              });
                          case 16:
                          case "end":
                            return o.stop();
                        }
                    },
                    i,
                    this,
                    [[5, 11]]
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_loadChunk",
            value: function (i, o, l, u) {
              var c = this;
              if (!i.body || !i.body.getReader) {
                this._running = !1;
                var d = new av(
                  i.url,
                  "",
                  i,
                  "onProgress of bad response.body.getReader"
                );
                return (
                  (d.options = {
                    index: this._index,
                    range: this._range,
                    vid: this._vid,
                    priOptions: this._priOptions,
                  }),
                  void this.reject(d)
                );
              }
              this._onProcessMinLen > 0 &&
                ((this._cache = new Uint8Array(sRe)), (this._writeIdx = 0));
              var h,
                f,
                p,
                g = (this._reader = i.body.getReader()),
                y = (function () {
                  var v = V1(
                    Ic().mark(function b() {
                      var w, k, D, $, N, P, I, O;
                      return Ic().wrap(
                        function (X) {
                          for (;;)
                            switch ((X.prev = X.next)) {
                              case 0:
                                return (
                                  (f = Date.now()),
                                  (X.prev = 1),
                                  (X.next = 4),
                                  g.read()
                                );
                              case 4:
                                (h = X.sent), (p = Date.now()), (X.next = 13);
                                break;
                              case 8:
                                return (
                                  (X.prev = 8),
                                  (X.t0 = X.catch(1)),
                                  (p = Date.now()),
                                  c._aborted ||
                                    ((c._running = !1),
                                    (X.t0.options = {
                                      index: c._index,
                                      range: c._range,
                                      vid: c._vid,
                                      priOptions: c._priOptions,
                                    }),
                                    c.reject(X.t0)),
                                  X.abrupt("return")
                                );
                              case 13:
                                if (
                                  ((k =
                                    ((w = c._range) === null || w === void 0
                                      ? void 0
                                      : w.length) > 0
                                      ? c._range[0]
                                      : 0),
                                  (D = k + c._receivedLength),
                                  !c._aborted)
                                ) {
                                  X.next = 19;
                                  break;
                                }
                                return (
                                  (c._running = !1),
                                  o(
                                    void 0,
                                    !1,
                                    {
                                      range: [D, D],
                                      vid: c._vid,
                                      index: c._index,
                                      startTime: f,
                                      endTime: p,
                                      st: l,
                                      firstByteTime: u,
                                      priOptions: c._priOptions,
                                    },
                                    i
                                  ),
                                  X.abrupt("return")
                                );
                              case 19:
                                ($ = h.value ? h.value.byteLength : 0),
                                  (c._receivedLength += $),
                                  c._logger.debug(
                                    "【fetchLoader,onProgress call】,task,",
                                    c._range,
                                    ", start,",
                                    D,
                                    ", end,",
                                    k + c._receivedLength,
                                    ", done,",
                                    h.done
                                  ),
                                  c._onProcessMinLen > 0
                                    ? c._writeIdx + $ >= c._onProcessMinLen ||
                                      h.done
                                      ? ((N = new Uint8Array(
                                          c._writeIdx + $
                                        )).set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        $ > 0 && N.set(h.value, c._writeIdx),
                                        (c._writeIdx = 0),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress enough】,done,",
                                          h.done,
                                          ",len,",
                                          N.byteLength,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : $ > 0 && c._writeIdx + $ < sRe
                                      ? (c._cache.set(h.value, c._writeIdx),
                                        (c._writeIdx += $),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress cache】,len,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : $ > 0 &&
                                        ((P = new Uint8Array(
                                          c._writeIdx + $ + 2048
                                        )),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra start】,size,",
                                          c._writeIdx + $ + 2048,
                                          ", datalen,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ),
                                        P.set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        $ > 0 && P.set(h.value, c._writeIdx),
                                        (c._writeIdx += $),
                                        delete c._cache,
                                        (c._cache = P),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra end】,len,",
                                          $,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                    : (N = h.value),
                                  ((N && N.byteLength > 0) || h.done) &&
                                    o(
                                      N,
                                      h.done,
                                      {
                                        range: [
                                          c._range[0] +
                                            c._receivedLength -
                                            (N ? N.byteLength : 0),
                                          c._range[0] + c._receivedLength,
                                        ],
                                        vid: c._vid,
                                        index: c._index,
                                        startTime: f,
                                        endTime: p,
                                        st: l,
                                        firstByteTime: u,
                                        priOptions: c._priOptions,
                                      },
                                      i
                                    ),
                                  h.done
                                    ? ((I = Date.now() - l),
                                      (O = $ne(c._receivedLength, I)),
                                      c.emit(pa.REAL_TIME_SPEED, {
                                        speed: O,
                                        len: c._receivedLength,
                                        time: I,
                                        vid: c._vid,
                                        index: c._index,
                                        range: c._range,
                                        priOptions: c._priOptions,
                                      }),
                                      (c._running = !1),
                                      c._logger.debug(
                                        "[fetchLoader onProgress end],task,",
                                        c._range,
                                        ",done,",
                                        h.done
                                      ),
                                      c.resolve(
                                        Cne(
                                          h,
                                          !0,
                                          i,
                                          i.headers.get("Content-Length"),
                                          i.headers.get("age"),
                                          l,
                                          u,
                                          c._index,
                                          c._range,
                                          c._vid,
                                          c._priOptions
                                        )
                                      ))
                                    : y();
                              case 25:
                              case "end":
                                return X.stop();
                            }
                        },
                        b,
                        null,
                        [[1, 8]]
                      );
                    })
                  );
                  return function () {
                    return v.apply(this, arguments);
                  };
                })();
              y();
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (i) {
              this._running = i;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return !(typeof fetch > "u");
            },
          },
        ]
      ),
      r
    );
  })();
function QDn(t) {
  return nL(
    {
      loaderType: TS.FETCH,
      retry: 0,
      retryDelay: 0,
      timeout: 0,
      request: null,
      onTimeout: void 0,
      onProgress: void 0,
      onRetryError: void 0,
      transformRequest: void 0,
      transformResponse: void 0,
      transformError: void 0,
      responseType: rL.TEXT,
      range: void 0,
      url: "",
      params: void 0,
      method: "GET",
      headers: {},
      body: void 0,
      mode: void 0,
      credentials: void 0,
      cache: void 0,
      redirect: void 0,
      referrer: void 0,
      referrerPolicy: void 0,
      integrity: void 0,
      onProcessMinLen: 0,
    },
    t
  );
}
var JDn = (function (t) {
    C5(n, Pl);
    var e = $5(n);
    function n() {
      var r;
      return (
        zf(this, n),
        Cr(ua((r = e.call(this))), "_xhr", null),
        Cr(ua(r), "_aborted", !1),
        Cr(ua(r), "_timeoutTimer", null),
        Cr(ua(r), "_range", null),
        Cr(ua(r), "_receivedLength", 0),
        Cr(ua(r), "_url", null),
        Cr(ua(r), "_onProgress", null),
        Cr(ua(r), "_index", -1),
        Cr(ua(r), "_headers", null),
        Cr(ua(r), "_currentChunkSizeKB", 384),
        Cr(ua(r), "_timeout", null),
        Cr(ua(r), "_xhr", null),
        Cr(ua(r), "_withCredentials", null),
        Cr(ua(r), "_startTime", -1),
        Cr(ua(r), "_loadCompleteResolve", null),
        Cr(ua(r), "_loadCompleteReject", null),
        Cr(ua(r), "_runing", !1),
        Cr(ua(r), "_logger", !1),
        Cr(ua(r), "_vid", ""),
        Cr(ua(r), "_responseType", void 0),
        Cr(ua(r), "_credentials", void 0),
        Cr(ua(r), "_method", void 0),
        Cr(ua(r), "_transformResponse", void 0),
        Cr(ua(r), "_firstRtt", void 0),
        Cr(ua(r), "_onCancel", null),
        Cr(ua(r), "_priOptions", null),
        r
      );
    }
    return (
      jf(
        n,
        [
          {
            key: "load",
            value: function (r) {
              var i = this;
              clearTimeout(this._timeoutTimer),
                (this._logger = r.logger),
                (this._range = r.range),
                (this._onProgress = r.onProgress),
                (this._index = r.index),
                (this._headers = r.headers),
                (this._withCredentials =
                  r.credentials === "include" ||
                  r.credentials === "same-origin"),
                (this._body = r.body || null),
                r.method && (this._method = r.method),
                (this._timeout = r.timeout || null),
                (this._runing = !0),
                (this._vid = r.vid || r.url),
                (this._responseType = r.responseType),
                (this._firstRtt = -1),
                (this._onTimeout = r.onTimeout),
                (this._onCancel = r.onCancel),
                (this._request = r.request),
                (this._priOptions = r.priOptions || {}),
                this._logger.debug("【xhrLoader task】, range", this._range),
                (this._url = jze(r.url, r.params));
              var o = Date.now();
              return new Promise(function (l, u) {
                (i._loadCompleteResolve = l),
                  (i._loadCompleteReject = u),
                  i._startLoad();
              }).catch(function (l) {
                if (
                  (clearTimeout(i._timeoutTimer), (i._runing = !1), !i._aborted)
                )
                  throw (
                    (((l =
                      l instanceof av
                        ? l
                        : new av(i._url, i._request)).startTime = o),
                    (l.endTime = Date.now()),
                    (l.options = {
                      index: i._index,
                      vid: i._vid,
                      priOptions: i._priOptions,
                    }),
                    l)
                  );
              });
            },
          },
          {
            key: "_startLoad",
            value: function () {
              var r = null;
              if (
                this._responseType === rL.ARRAY_BUFFER &&
                this._range &&
                this._range.length > 1
              )
                if (this._onProgress) {
                  this._firstRtt = -1;
                  var i = 1024 * this._currentChunkSizeKB,
                    o = this._range[0] + this._receivedLength,
                    l = this._range[1];
                  i < this._range[1] - o && (l = o + i),
                    (r = [o, l]),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", SubRange, ",
                      r
                    );
                } else
                  (r = this._range),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", allRange, ",
                      r
                    );
              this._internalOpen(r);
            },
          },
          {
            key: "_internalOpen",
            value: function (r) {
              var i = this;
              try {
                this._startTime = Date.now();
                var o = (this._xhr = new XMLHttpRequest());
                o.open(this._method || "GET", this._url, !0),
                  (o.responseType = this._responseType),
                  this._timeout && (o.timeout = this._timeout),
                  (o.withCredentials = this._withCredentials),
                  (o.onload = this._onLoad.bind(this)),
                  (o.onreadystatechange = this._onReadyStatechange.bind(this)),
                  (o.onerror = function (c) {
                    var d, h, f;
                    i._running = !1;
                    var p = new av(
                      i._url,
                      i._request,
                      c == null ||
                      (d = c.currentTarget) === null ||
                      d === void 0
                        ? void 0
                        : d.response,
                      "xhr.onerror.status:" +
                        (c == null ||
                        (h = c.currentTarget) === null ||
                        h === void 0
                          ? void 0
                          : h.status) +
                        ",statusText," +
                        (c == null ||
                        (f = c.currentTarget) === null ||
                        f === void 0
                          ? void 0
                          : f.statusText)
                    );
                    (p.options = {
                      index: i._index,
                      range: i._range,
                      vid: i._vid,
                      priOptions: i._priOptions,
                    }),
                      i._loadCompleteReject(p);
                  }),
                  (o.ontimeout = function (c) {
                    i.cancel();
                    var d = new av(
                      i._url,
                      i._request,
                      { status: 408 },
                      "timeout"
                    );
                    i._onTimeout &&
                      ((d.isTimeout = !0),
                      i._onTimeout(d, {
                        index: i._index,
                        range: i._range,
                        vid: i._vid,
                        priOptions: i._priOptions,
                      })),
                      (d.options = {
                        index: i._index,
                        range: i._range,
                        vid: i._vid,
                        priOptions: i._priOptions,
                      }),
                      i._loadCompleteReject(d);
                  });
                var l = this._headers || {},
                  u = zze(r);
                u && (l.Range = u),
                  l &&
                    Object.keys(l).forEach(function (c) {
                      o.setRequestHeader(c, l[c]);
                    }),
                  this._logger.debug(
                    "[xhr.send->] tast,",
                    this._range,
                    ",load sub range, ",
                    r
                  ),
                  o.send(this._body);
              } catch (c) {
                (c.options = {
                  index: this._index,
                  range: r,
                  vid: this._vid,
                  priOptions: this._priOptions,
                }),
                  this._loadCompleteReject(c);
              }
            },
          },
          {
            key: "_onReadyStatechange",
            value: function (r) {
              r.target.readyState === 2 &&
                this._firstRtt < 0 &&
                (this._firstRtt = Date.now());
            },
          },
          {
            key: "_onLoad",
            value: function (r) {
              var i,
                o = r.target.status;
              if (o < 200 || o > 299) {
                var l = new av(
                  this._url,
                  null,
                  nL(nL({}, r.target.response), {}, { status: o }),
                  "bad response,status:" + o
                );
                return (
                  (l.options = {
                    index: this._index,
                    range: this._range,
                    vid: this._vid,
                    priOptions: this._priOptions,
                  }),
                  this._loadCompleteReject(l)
                );
              }
              var u,
                c = null,
                d = !1,
                h =
                  ((i = this._range) === null || i === void 0
                    ? void 0
                    : i.length) > 0
                    ? this._range[0]
                    : 0;
              if (this._responseType === rL.ARRAY_BUFFER) {
                var f,
                  p = new Uint8Array(r.target.response);
                if (((u = h + this._receivedLength), p && p.byteLength > 0)) {
                  this._receivedLength += p.byteLength;
                  var g = Date.now() - this._startTime,
                    y = $ne(this._receivedLength, g);
                  this.emit(pa.REAL_TIME_SPEED, {
                    speed: y,
                    len: this._receivedLength,
                    time: g,
                    vid: this._vid,
                    index: this._index,
                    range: [u, h + this._receivedLength],
                    priOptions: this._priOptions,
                  });
                }
                (c = p),
                  (d = !(
                    ((f = this._range) === null || f === void 0
                      ? void 0
                      : f.length) > 1 &&
                    this._range[1] &&
                    this._receivedLength < this._range[1] - this._range[0]
                  )),
                  this._logger.debug(
                    "[xhr load done->], tast :",
                    this._range,
                    ", start",
                    u,
                    "end ",
                    h + this._receivedLength,
                    ",dataLen,",
                    p ? p.byteLength : 0,
                    ",receivedLength",
                    this._receivedLength,
                    ",index,",
                    this._index,
                    ", done,",
                    d
                  );
              } else (d = !0), (c = r.target.response);
              var v = {
                ok: o >= 200 && o < 300,
                status: o,
                statusText: this._xhr.statusText,
                url: this._xhr.responseURL,
                headers: this._getHeaders(this._xhr),
                body: this._xhr.response,
              };
              this._transformResponse &&
                (v = this._transformResponse(v, this._url) || v),
                this._onProgress &&
                  this._onProgress(
                    c,
                    d,
                    {
                      index: this._index,
                      vid: this._vid,
                      range: [u, h + this._receivedLength],
                      startTime: this._startTime,
                      endTime: Date.now(),
                      priOptions: this._priOptions,
                    },
                    v
                  ),
                d
                  ? ((this._runing = !1),
                    this._loadCompleteResolve &&
                      this._loadCompleteResolve(
                        Cne(
                          this._onProgress ? null : c,
                          d,
                          v,
                          v.headers["content-length"],
                          v.headers.age,
                          this._startTime,
                          this._firstRtt,
                          this._index,
                          this._range,
                          this._vid,
                          this._priOptions
                        )
                      ))
                  : this._startLoad();
            },
          },
          {
            key: "cancel",
            value: function () {
              if (!this._aborted)
                return (
                  (this._aborted = !0),
                  (this._runing = !1),
                  Mne(JI(n.prototype), "removeAllListeners", this).call(this),
                  this._onCancel &&
                    this._onCancel({
                      index: this._index,
                      range: this._range,
                      vid: this._vid,
                      priOptions: this._priOptions,
                    }),
                  this._xhr ? this._xhr.abort() : void 0
                );
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (r) {
              this._running = r;
            },
          },
          {
            key: "_getHeaders",
            value: function (r) {
              var i,
                o = {},
                l = BDn(
                  r.getAllResponseHeaders().trim().split(`\r
`)
                );
              try {
                for (l.s(); !(i = l.n()).done; ) {
                  var u = i.value.split(": ");
                  o[u[0].toLowerCase()] = u.slice(1).join(": ");
                }
              } catch (c) {
                l.e(c);
              } finally {
                l.f();
              }
              return o;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return typeof XMLHttpRequest < "u";
            },
          },
        ]
      ),
      n
    );
  })(),
  qDn = ["retry", "retryDelay", "onRetryError", "transformError"],
  ePn = (function () {
    function t(n, r) {
      zf(this, t),
        (this.promise = Qw()),
        (this.alive = !!r.onProgress),
        !r.logger && (r.logger = new yv("Loader")),
        (this._loaderType = n),
        (this._loader =
          n === TS.FETCH && typeof fetch < "u" ? new xne() : new JDn()),
        (this._config = r),
        (this._retryCount = 0),
        (this._retryTimer = null),
        (this._canceled = !1),
        (this._retryCheckFunc = r.retryCheckFunc),
        (this._logger = r.logger);
    }
    var e;
    return (
      jf(t, [
        {
          key: "exec",
          value: function () {
            var n = this,
              r = this._config,
              i = r.retry,
              o = r.retryDelay,
              l = r.onRetryError,
              u = r.transformError,
              c = GDn(r, qDn),
              d = (function () {
                var h = V1(
                  Ic().mark(function f() {
                    var p, g, y;
                    return Ic().wrap(
                      function (v) {
                        for (;;)
                          switch ((v.prev = v.next)) {
                            case 0:
                              return (
                                (v.prev = 0), (v.next = 3), n._loader.load(c)
                              );
                            case 3:
                              (p = v.sent), n.promise.resolve(p), (v.next = 27);
                              break;
                            case 7:
                              if (
                                ((v.prev = 7),
                                (v.t0 = v.catch(0)),
                                (n._loader.running = !1),
                                n._logger.debug(
                                  "[task request catch err]",
                                  v.t0
                                ),
                                !n._canceled)
                              ) {
                                v.next = 13;
                                break;
                              }
                              return v.abrupt("return");
                            case 13:
                              if (
                                ((v.t0.loaderType = n._loaderType),
                                (v.t0.retryCount = n._retryCount),
                                (g = v.t0),
                                u && (g = u(g) || g),
                                l &&
                                  n._retryCount > 0 &&
                                  l(g, n._retryCount, {
                                    index: c.index,
                                    vid: c.vid,
                                    range: c.range,
                                    priOptions: c.priOptions,
                                  }),
                                n._retryCount++,
                                (y = !0),
                                n._retryCheckFunc &&
                                  (y = n._retryCheckFunc(v.t0)),
                                !(y && n._retryCount <= i))
                              ) {
                                v.next = 26;
                                break;
                              }
                              return (
                                clearTimeout(n._retryTimer),
                                n._logger.debug(
                                  "[task request setTimeout],retry",
                                  n._retryCount,
                                  ",retry range,",
                                  c.range
                                ),
                                (n._retryTimer = setTimeout(d, o)),
                                v.abrupt("return")
                              );
                            case 26:
                              n.promise.reject(g);
                            case 27:
                            case "end":
                              return v.stop();
                          }
                      },
                      f,
                      null,
                      [[0, 7]]
                    );
                  })
                );
                return function () {
                  return h.apply(this, arguments);
                };
              })();
            return d(), this.promise;
          },
        },
        {
          key: "cancel",
          value:
            ((e = V1(
              Ic().mark(function n() {
                return Ic().wrap(
                  function (r) {
                    for (;;)
                      switch ((r.prev = r.next)) {
                        case 0:
                          return (
                            clearTimeout(this._retryTimer),
                            (this._canceled = !0),
                            (this._loader.running = !1),
                            r.abrupt("return", this._loader.cancel())
                          );
                        case 4:
                        case "end":
                          return r.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "running",
          get: function () {
            return this._loader && this._loader.running;
          },
        },
        {
          key: "loader",
          get: function () {
            return this._loader;
          },
        },
      ]),
      t
    );
  })();
function tPn(t) {
  return (
    t && !t.paused && !t.ended && t.playbackRate !== 0 && t.readyState !== 0
  );
}
function nPn(t) {
  if (!t) return {};
  if (typeof t.getVideoPlaybackQuality == "function") {
    var e = t.getVideoPlaybackQuality();
    return {
      droppedVideoFrames: e.droppedVideoFrames || e.corruptedVideoFrames,
      totalVideoFrames: e.totalVideoFrames,
      creationTime: e.creationTime,
    };
  }
  return {
    droppedVideoFrames: t.webkitDroppedFrameCount,
    totalVideoFrames: t.webkitDecodedFrameCount,
    creationTime: performance.now(),
  };
}
function VF() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  if ((e = e.filter(Boolean)).length < 2) return e[0];
  var r = new Uint8Array(
      e.reduce(function (o, l) {
        return o + l.byteLength;
      }, 0)
    ),
    i = 0;
  return (
    e.forEach(function (o) {
      r.set(o, i), (i += o.byteLength);
    }),
    r
  );
}
function rPn() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
  return new Promise(function (e) {
    return setTimeout(e, t);
  });
}
var sI = (function (t) {
    C5(r, Pl);
    var e,
      n = $5(r);
    function r(i) {
      var o;
      return (
        zf(this, r),
        Cr(ua((o = n.call(this, i))), "type", TS.FETCH),
        Cr(ua(o), "_queue", []),
        Cr(ua(o), "_alive", []),
        Cr(ua(o), "_currentTask", null),
        Cr(ua(o), "_finnalUrl", ""),
        Cr(ua(o), "_config", void 0),
        (o._config = QDn(i)),
        (o._config.loaderType !== TS.XHR && xne.isSupported()) ||
          (o.type = TS.XHR),
        (o.log = i.logger),
        o
      );
    }
    return (
      jf(
        r,
        [
          {
            key: "isFetch",
            value: function () {
              return this.type === TS.FETCH;
            },
          },
          {
            key: "load",
            value: function (i) {
              var o = this,
                l =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {};
              typeof i != "string" && i
                ? (l = i)
                : (l.url = i || l.url || this._config.url),
                (l = Object.assign({}, this._config, l)).params &&
                  (l.params = Object.assign({}, l.params)),
                l.headers &&
                  aRe(l.headers) &&
                  (l.headers = Object.assign({}, l.headers)),
                l.body && aRe(l.body) && (l.body = Object.assign({}, l.body)),
                l.transformRequest && (l = l.transformRequest(l) || l),
                (l.logger = this.log);
              var u = new ePn(this.type, l);
              return (
                u.loader.on(pa.REAL_TIME_SPEED, function (c) {
                  o.emit(pa.REAL_TIME_SPEED, c);
                }),
                this._queue.push(u),
                this._queue.length !== 1 ||
                  (this._currentTask && this._currentTask.running) ||
                  this._processTask(),
                u.promise
              );
            },
          },
          {
            key: "cancel",
            value:
              ((e = V1(
                Ic().mark(function i() {
                  var o;
                  return Ic().wrap(
                    function (l) {
                      for (;;)
                        switch ((l.prev = l.next)) {
                          case 0:
                            return (
                              (o = this._queue
                                .map(function (u) {
                                  return u.cancel();
                                })
                                .concat(
                                  this._alive.map(function (u) {
                                    return u.cancel();
                                  })
                                )),
                              this._currentTask &&
                                o.push(this._currentTask.cancel()),
                              (this._queue = []),
                              (this._alive = []),
                              (l.next = 6),
                              Promise.all(o)
                            );
                          case 6:
                            return (l.next = 8), rPn();
                          case 8:
                          case "end":
                            return l.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_processTask",
            value: function () {
              var i = this;
              if (
                ((this._currentTask = this._queue.shift()), this._currentTask)
              ) {
                this._currentTask.alive && this._alive.push(this._currentTask);
                var o = this._currentTask.exec().catch(function (l) {});
                o &&
                  typeof o.finally == "function" &&
                  o.finally(function () {
                    var l, u;
                    (l = i._currentTask) !== null &&
                      l !== void 0 &&
                      l.alive &&
                      ((u = i._alive) === null || u === void 0
                        ? void 0
                        : u.length) > 0 &&
                      (i._alive = i._alive.filter(function (c) {
                        return c && c !== i._currentTask;
                      })),
                      i._processTask();
                  });
              }
            },
          },
        ],
        [
          {
            key: "isFetchSupport",
            value: function () {
              return xne.isSupported();
            },
          },
        ]
      ),
      r
    );
  })(),
  iPn = (function () {
    function t() {
      zf(this, t), Cr(this, "_prevCurrentTime", 0);
    }
    return (
      jf(t, [
        {
          key: "do",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 3,
              r = arguments.length > 2 ? arguments[2] : void 0,
              i =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : 1;
            if (e) {
              var o = e.currentTime,
                l = 0;
              if (this._prevCurrentTime === o) {
                var u = Pf.info(Pf.get(e), o);
                if (!u.buffers.length) return;
                (r && u.nextStart) || (u.nextStart && u.nextStart - o < n)
                  ? (l = u.nextStart + 0.1)
                  : u.end && u.end - o > i && !e.seeking && (l = o + 0.1);
              }
              (this._prevCurrentTime = o), l && o !== l && (e.currentTime = l);
            }
          },
        },
      ]),
      t
    );
  })(),
  aPn = (function () {
    function t(e) {
      var n = this;
      zf(this, t),
        Cr(this, "_seiSet", new Set()),
        (this.emitter = e),
        e.on(pa.SEI, function (r) {
          r && n._seiSet.add(r);
        });
    }
    return (
      jf(t, [
        {
          key: "throw",
          value: function (e, n) {
            var r = this;
            if (e != null && this._seiSet.size) {
              var i = e - 0.2,
                o = e + 0.2,
                l = [];
              this._seiSet.forEach(function (u) {
                u.time >= i && u.time <= o && l.push(u);
              }),
                l.forEach(function (u) {
                  r._seiSet.delete(u), r.emitter.emit(pa.SEI_IN_TIME, u);
                }),
                n &&
                  this._seiSet.forEach(function (u) {
                    u.time < e - 5 && r._seiSet.delete(u);
                  });
            }
          },
        },
        {
          key: "reset",
          value: function () {
            this._seiSet.clear();
          },
        },
      ]),
      t
    );
  })(),
  oPn = 1e3,
  sPn = 50,
  lPn = 3,
  uPn = 3e3,
  cPn = (function () {
    function t(e) {
      zf(this, t),
        Cr(this, "_chunkSpeed", 0),
        Cr(this, "_chunkCache", []),
        Cr(this, "_speeds", []),
        Cr(this, "_totalSize", 0),
        Cr(this, "_totalCost", 0),
        (this._opts = e || {});
    }
    return (
      jf(t, [
        {
          key: "addRecord",
          value: function (e, n) {
            e &&
              n &&
              (this._speeds.push((8e3 * e) / n),
              (this._speeds = this._speeds.slice(-lPn)));
          },
        },
        {
          key: "addChunkRecord",
          value: function (e, n) {
            var r, i;
            if (
              e &&
              n &&
              !(
                e <
                (((r = this._opts) === null || r === void 0
                  ? void 0
                  : r.skipChunkSize) || oPn)
              )
            ) {
              (this._totalSize += e),
                (this._totalCost += n),
                (this._chunkSpeed = (8e3 * e) / n),
                this._chunkCache.push({
                  size: e,
                  duration: n,
                  timestamp: performance.now(),
                });
              var o =
                ((i = this._opts) === null || i === void 0
                  ? void 0
                  : i.chunkCountForSpeed) || sPn;
              this._chunkCache.length > o &&
                (this._chunkCache = this._chunkCache.slice(-o));
            }
          },
        },
        {
          key: "getAvgSpeed",
          value: function () {
            var e;
            if (!this._chunkCache.length && !this._speeds.length) return 0;
            if (this._speeds.length)
              return (
                this._speeds.reduce(function (i, o) {
                  return i + o;
                }) / this._speeds.length
              );
            var n = this._chunkCache[this._chunkCache.length - 1],
              r = performance.now() - n.timestamp;
            return (
              r >
                (((e = this._opts) === null || e === void 0
                  ? void 0
                  : e.longtimeNoReceived) || uPn) &&
                this._chunkCache.push({
                  size: 0,
                  duration: r,
                  timestamp: performance.now(),
                }),
              (8e3 *
                this._chunkCache.reduce(function (i, o) {
                  return i + o.size;
                }, 0)) /
                this._chunkCache.reduce(function (i, o) {
                  return i + o.duration;
                }, 0)
            );
          },
        },
        {
          key: "getLatestSpeed",
          value: function () {
            return this._chunkCache.length || this._speeds.length
              ? this._speeds.length
                ? this._speeds[this._speeds.length - 1]
                : this._chunkSpeed
              : 0;
          },
        },
        {
          key: "getTotalSize",
          value: function () {
            return this._totalSize;
          },
        },
        {
          key: "getTotalCost",
          value: function () {
            return this._totalCost;
          },
        },
        {
          key: "reset",
          value: function () {
            (this._chunkCache = []),
              (this._speeds = []),
              (this._totalSize = 0),
              (this._totalCost = 0);
          },
        },
      ]),
      t
    );
  })(),
  lRe = (function () {
    function t(e) {
      zf(this, t),
        Cr(this, "encodeType", ""),
        Cr(this, "audioCodec", ""),
        Cr(this, "videoCodec", ""),
        Cr(this, "domain", ""),
        Cr(this, "fps", 0),
        Cr(this, "bitrate", 0),
        Cr(this, "width", 0),
        Cr(this, "height", 0),
        Cr(this, "samplerate", 0),
        Cr(this, "channelCount", 0),
        Cr(this, "gop", 0),
        Cr(this, "_bitsAccumulateSize", 0),
        Cr(this, "_bitsAccumulateDuration", 0),
        Cr(this, "_startGopId", -1),
        (this._timescale = e);
    }
    return (
      jf(t, [
        {
          key: "getStats",
          value: function () {
            return {
              encodeType: this.encodeType,
              audioCodec: this.audioCodec,
              videoCodec: this.videoCodec,
              domain: this.domain,
              fps: this.fps,
              bitrate: this.bitrate,
              width: this.width,
              height: this.height,
              samplerate: this.samplerate,
              channelCount: this.channelCount,
              gop: this.gop,
            };
          },
        },
        {
          key: "setEncodeType",
          value: function (e) {
            this.encodeType = e;
          },
        },
        {
          key: "setFpsFromScriptData",
          value: function (e) {
            var n,
              r = e.data,
              i =
                r == null || (n = r.onMetaData) === null || n === void 0
                  ? void 0
                  : n.framerate;
            i && i > 0 && i < 100 && (this.fps = i);
          },
        },
        {
          key: "setVideoMeta",
          value: function (e) {
            if (
              ((this.width = e.width),
              (this.height = e.height),
              (this.videoCodec = e.codec),
              (this.encodeType = e.codecType),
              e.fpsNum && e.fpsDen)
            ) {
              var n = e.fpsNum / e.fpsDen;
              n > 0 && n < 100 && (this.fps = n);
            }
          },
        },
        {
          key: "setAudioMeta",
          value: function (e) {
            (this.audioCodec = e.codec),
              (this.samplerate = e.sampleRate),
              (this.channelCount = e.channelCount);
          },
        },
        {
          key: "setDomain",
          value: function (e) {
            this.domain = e.split("/").slice(2, 3)[0];
          },
        },
        {
          key: "updateBitrate",
          value: function (e) {
            var n = this;
            if ((!this.fps || this.fps >= 100) && e.length) {
              var r =
                e.reduce(function (i, o) {
                  return i + o.duration;
                }, 0) / e.length;
              this.fps = Math.round(this._timescale / r);
            }
            e.forEach(function (i) {
              n._startGopId === -1 && (n._startGopId = i.gopId),
                i.gopId === n._startGopId && n.gop++,
                (n._bitsAccumulateDuration +=
                  i.duration / (n._timescale / 1e3)),
                (n._bitsAccumulateSize += i.units.reduce(function (o, l) {
                  return o + l.length;
                }, 0)),
                n._bitsAccumulateDuration >= 1e3 &&
                  ((n.bitrate = 8 * n._bitsAccumulateSize),
                  (n._bitsAccumulateDuration = 0),
                  (n._bitsAccumulateSize = 0));
            });
          },
        },
      ]),
      t
    );
  })(),
  dPn = (function () {
    function t(e) {
      var n =
        arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1e3;
      zf(this, t),
        Cr(this, "_core", null),
        Cr(this, "_samples", []),
        (this._core = e),
        (this._timescale = n),
        (this._stats = new lRe(n)),
        this._bindEvents();
    }
    return (
      jf(t, [
        {
          key: "getStats",
          value: function () {
            var e,
              n,
              r,
              i,
              o,
              l,
              u,
              c,
              d,
              h,
              f,
              p =
                ((e = this._core) === null || e === void 0
                  ? void 0
                  : e.media) || {},
              g = p.currentTime,
              y = g === void 0 ? 0 : g,
              v = p.decodeFps,
              b = v === void 0 ? 0 : v;
            return nL(
              nL({}, this._stats.getStats()),
              {},
              {
                downloadSpeed:
                  ((n = this._core) === null ||
                  n === void 0 ||
                  (r = n.speedInfo) === null ||
                  r === void 0
                    ? void 0
                    : r.call(n).speed) || 0,
                avgSpeed:
                  ((i = this._core) === null ||
                  i === void 0 ||
                  (o = i.speedInfo) === null ||
                  o === void 0
                    ? void 0
                    : o.call(i).avgSpeed) || 0,
                totalReceivedByte:
                  ((l = this._core) === null ||
                  l === void 0 ||
                  (u = l.speedInfo) === null ||
                  u === void 0
                    ? void 0
                    : u.call(l).totalSize) || 0,
                totalReceivedCost:
                  ((c = this._core) === null ||
                  c === void 0 ||
                  (d = c.speedInfo) === null ||
                  d === void 0
                    ? void 0
                    : d.call(c).totalCost) || 0,
                currentTime: y,
                bufferEnd:
                  ((h = this._core) === null ||
                  h === void 0 ||
                  (f = h.bufferInfo()) === null ||
                  f === void 0
                    ? void 0
                    : f.remaining) || 0,
                decodeFps: b,
              }
            );
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            var e = this;
            this._core.on(pa.DEMUXED_TRACK, function (n) {
              var r = n.videoTrack;
              return e._stats.updateBitrate(r.samples);
            }),
              this._core.on(pa.FLV_SCRIPT_DATA, function (n) {
                e._stats.setFpsFromScriptData(n);
              }),
              this._core.on(pa.METADATA_PARSED, function (n) {
                n.type === "video"
                  ? e._stats.setVideoMeta(n.track)
                  : e._stats.setAudioMeta(n.track);
              }),
              this._core.on(pa.TTFB, function (n) {
                e._stats.setDomain(n.responseUrl);
              });
          },
        },
        {
          key: "reset",
          value: function () {
            (this._samples = []), (this._stats = new lRe(this._timescale));
          },
        },
      ]),
      t
    );
  })();
function hPn(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o,
      l,
      u = [],
      c = !0,
      d = !1;
    try {
      if (((o = (n = n.call(t)).next), e === 0)) {
        if (Object(n) !== n) return;
        c = !1;
      } else
        for (
          ;
          !(c = (r = o.call(n)).done) && (u.push(r.value), u.length !== e);
          c = !0
        );
    } catch (h) {
      (d = !0), (i = h);
    } finally {
      try {
        if (!c && n.return != null && ((l = n.return()), Object(l) !== l))
          return;
      } finally {
        if (d) throw i;
      }
    }
    return u;
  }
}
function zl(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function uRe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, Kze(r.key), r);
  }
}
function jl(t, e, n) {
  return (
    e && uRe(t.prototype, e),
    n && uRe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Nr(t, e, n) {
  return (
    (e = Kze(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function fPn(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && Wze(t, e);
}
function Lne(t) {
  return (Lne = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function Wze(t, e) {
  return (Wze = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function pPn() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function gPn(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function mPn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return gPn(t);
}
function yPn(t) {
  var e = pPn();
  return function () {
    var n,
      r = Lne(t);
    if (e) {
      var i = Lne(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return mPn(this, n);
  };
}
function vPn(t, e) {
  return _Pn(t) || hPn(t, e) || Iue(t, e) || SPn();
}
function pf(t) {
  return bPn(t) || TPn(t) || Iue(t) || EPn();
}
function bPn(t) {
  if (Array.isArray(t)) return One(t);
}
function _Pn(t) {
  if (Array.isArray(t)) return t;
}
function TPn(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function Iue(t, e) {
  if (t) {
    if (typeof t == "string") return One(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? One(t, e)
        : void 0
    );
  }
}
function One(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function EPn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function SPn() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function RPn(t, e) {
  var n = (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (!n) {
    if (
      Array.isArray(t) ||
      (n = Iue(t)) ||
      (e && t && typeof t.length == "number")
    ) {
      n && (t = n);
      var r = 0,
        i = function () {};
      return {
        s: i,
        n: function () {
          return r >= t.length ? { done: !0 } : { done: !1, value: t[r++] };
        },
        e: function (c) {
          throw c;
        },
        f: i,
      };
    }
    throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  }
  var o,
    l = !0,
    u = !1;
  return {
    s: function () {
      n = n.call(t);
    },
    n: function () {
      var c = n.next();
      return (l = c.done), c;
    },
    e: function (c) {
      (u = !0), (o = c);
    },
    f: function () {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw o;
      }
    },
  };
}
function APn(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function Kze(t) {
  var e = APn(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
var WT = { VIDEO: "video", AUDIO: "audio", METADATA: "metadata" },
  KT = { AV1: "av1", AVC: "avc", HEVC: "hevc" },
  Op = {
    AAC: "aac",
    G711PCMA: "g7110a",
    G711PCMU: "g7110m",
    OPUS: "opus",
    MP3: "mp3",
  },
  tm = {
    LARGE_AV_SHIFT: "LARGE_AV_SHIFT",
    LARGE_VIDEO_GAP: "LARGE_VIDEO_GAP",
    LARGE_VIDEO_GAP_BETWEEN_CHUNK: "LARGE_VIDEO_GAP_BETWEEN_CHUNK",
    LARGE_AUDIO_GAP: "LARGE_AUDIO_GAP",
    AUDIO_FILLED: "AUDIO_FILLED",
    AUDIO_DROPPED: "AUDIO_DROPPED",
  },
  Zze = (function () {
    function t() {
      zl(this, t),
        Nr(this, "id", 1),
        Nr(this, "type", WT.VIDEO),
        Nr(this, "codecType", KT.AVC),
        Nr(this, "pid", -1),
        Nr(this, "hvcC", void 0),
        Nr(this, "codec", ""),
        Nr(this, "timescale", 0),
        Nr(this, "formatTimescale", 0),
        Nr(this, "sequenceNumber", 0),
        Nr(this, "baseMediaDecodeTime", 0),
        Nr(this, "baseDts", 0),
        Nr(this, "duration", 0),
        Nr(this, "warnings", []),
        Nr(this, "samples", []),
        Nr(this, "pps", []),
        Nr(this, "sps", []),
        Nr(this, "vps", []),
        Nr(this, "fpsNum", 0),
        Nr(this, "fpsDen", 0),
        Nr(this, "sarRatio", []),
        Nr(this, "width", 0),
        Nr(this, "height", 0),
        Nr(this, "nalUnitSize", 4),
        Nr(this, "present", !1),
        Nr(this, "isVideoEncryption", !1),
        Nr(this, "isAudioEncryption", !1),
        Nr(this, "isVideo", !0),
        Nr(this, "lastKeyFrameDts", 0),
        Nr(this, "kid", null),
        Nr(this, "pssh", null),
        Nr(this, "ext", void 0);
    }
    return (
      jl(t, [
        {
          key: "reset",
          value: function () {
            (this.sequenceNumber =
              this.width =
              this.height =
              this.fpsDen =
              this.fpsNum =
              this.duration =
              this.baseMediaDecodeTime =
              this.timescale =
                0),
              (this.codec = ""),
              (this.present = !1),
              (this.pid = -1),
              (this.pps = []),
              (this.sps = []),
              (this.vps = []),
              (this.sarRatio = []),
              (this.samples = []),
              (this.warnings = []),
              (this.hvcC = null);
          },
        },
        {
          key: "firstDts",
          get: function () {
            return this.samples.length ? this.samples[0].dts : null;
          },
        },
        {
          key: "firstPts",
          get: function () {
            return this.samples.length ? this.samples[0].pts : null;
          },
        },
        {
          key: "samplesDuration",
          get: function () {
            if (this.samples.length > 0) {
              var e = this.samples[0],
                n = this.samples[this.samples.length - 1];
              return n.dts - e.dts + n.duration;
            }
            return 0;
          },
        },
        {
          key: "exist",
          value: function () {
            return (
              !!/av01/.test(this.codec) ||
              !!(this.pps.length && this.sps.length && this.codec)
            );
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !!this.samples.length;
          },
        },
        {
          key: "isEncryption",
          get: function () {
            return this.isVideoEncryption;
          },
        },
      ]),
      t
    );
  })(),
  Yze = (function () {
    function t() {
      zl(this, t),
        Nr(this, "id", 2),
        Nr(this, "type", WT.AUDIO),
        Nr(this, "codecType", Op.AAC),
        Nr(this, "pid", -1),
        Nr(this, "codec", ""),
        Nr(this, "container", ""),
        Nr(this, "sequenceNumber", 0),
        Nr(this, "sampleDuration", 0),
        Nr(this, "timescale", 0),
        Nr(this, "formatTimescale", 0),
        Nr(this, "baseMediaDecodeTime", 0),
        Nr(this, "duration", 0),
        Nr(this, "warnings", []),
        Nr(this, "samples", []),
        Nr(this, "baseDts", 0),
        Nr(this, "sampleSize", 16),
        Nr(this, "sampleRate", 0),
        Nr(this, "channelCount", 0),
        Nr(this, "objectType", 0),
        Nr(this, "sampleRateIndex", 0),
        Nr(this, "config", []),
        Nr(this, "present", !1),
        Nr(this, "isVideoEncryption", !1),
        Nr(this, "isAudioEncryption", !1),
        Nr(this, "kid", null),
        Nr(this, "ext", void 0);
    }
    return (
      jl(t, [
        {
          key: "reset",
          value: function () {
            (this.sequenceNumber = 0),
              (this.timescale = 0),
              (this.sampleDuration = 0),
              (this.sampleRate = 0),
              (this.channelCount = 0),
              (this.baseMediaDecodeTime = 0),
              (this.present = !1),
              (this.pid = -1),
              (this.codec = ""),
              (this.samples = []),
              (this.config = []),
              (this.warnings = []);
          },
        },
        {
          key: "exist",
          value: function () {
            return !(
              !this.sampleRate ||
              !this.channelCount ||
              (!this.codec && !this.container) ||
              (this.codecType !== Op.AAC &&
                this.codecType !== Op.G711PCMA &&
                this.codecType !== Op.G711PCMU &&
                this.codecType !== Op.OPUS &&
                this.codecType !== Op.MP3)
            );
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !!this.samples.length;
          },
        },
        {
          key: "isEncryption",
          get: function () {
            return this.isAudioEncryption;
          },
        },
        {
          key: "firstDts",
          get: function () {
            return this.samples.length ? this.samples[0].dts : null;
          },
        },
        {
          key: "firstPts",
          get: function () {
            return this.samples.length ? this.samples[0].pts : null;
          },
        },
        {
          key: "samplesDuration",
          get: function () {
            if (this.samples.length > 0) {
              var e = this.samples[0],
                n = this.samples[this.samples.length - 1];
              return n.dts - e.dts + n.duration;
            }
            return 0;
          },
        },
      ]),
      t
    );
  })(),
  Gne = (function () {
    function t(e, n, r) {
      zl(this, t),
        Nr(this, "flag", {}),
        Nr(this, "keyframe", !1),
        Nr(this, "gopId", 0),
        Nr(this, "duration", 0),
        Nr(this, "size", 0),
        Nr(this, "units", []),
        Nr(this, "chromaFormat", 420),
        (this.originPts = this.pts = e),
        (this.originDts = this.dts = n),
        r && (this.units = r);
    }
    return (
      jl(t, [
        {
          key: "cts",
          get: function () {
            return this.pts - this.dts;
          },
        },
        {
          key: "setToKeyframe",
          value: function () {
            (this.keyframe = !0),
              (this.flag.dependsOn = 2),
              (this.flag.isNonSyncSample = 0);
          },
        },
      ]),
      t
    );
  })(),
  C$ = jl(function t(e, n, r, i) {
    zl(this, t),
      Nr(this, "duration", 1024),
      Nr(this, "flag", { dependsOn: 2, isNonSyncSample: 0 }),
      Nr(this, "keyframe", !0),
      (this.originPts = this.pts = this.dts = e),
      (this.data = n),
      (this.size = n.byteLength),
      (this.sampleOffset = i),
      r && (this.duration = r);
  }),
  wPn = jl(function t(e, n) {
    zl(this, t),
      Nr(this, "time", 0),
      (this.data = e),
      (this.originPts = this.pts = n);
  }),
  kPn = (function (t) {
    fPn(n, wPn);
    var e = yPn(n);
    function n() {
      return zl(this, n), e.apply(this, arguments);
    }
    return jl(n);
  })(),
  Qze = (function () {
    function t() {
      zl(this, t),
        Nr(this, "id", 3),
        Nr(this, "type", WT.METADATA),
        Nr(this, "timescale", 0),
        Nr(this, "flvScriptSamples", []),
        Nr(this, "seiSamples", []);
    }
    return (
      jl(t, [
        {
          key: "exist",
          value: function () {
            return !(
              (!this.flvScriptSamples.length && !this.seiSamples.length) ||
              !this.timescale
            );
          },
        },
        {
          key: "reset",
          value: function () {
            (this.timescale = 0),
              (this.flvScriptSamples = []),
              (this.seiSamples = []);
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !(!this.flvScriptSamples.length && !this.seiSamples.length);
          },
        },
      ]),
      t
    );
  })(),
  o8 = (function () {
    function t(e) {
      zl(this, t),
        (this.name = e || ""),
        (this._prefix = "[".concat(this.name, "]"));
    }
    return (
      jl(
        t,
        [
          {
            key: "warn",
            value: function () {
              var e;
              if (!t.disabled) {
                for (
                  var n = arguments.length, r = new Array(n), i = 0;
                  i < n;
                  i++
                )
                  r[i] = arguments[i];
                (e = console).warn.apply(e, [this._prefix].concat(r));
              }
            },
          },
        ],
        [
          {
            key: "enable",
            value: function () {
              t.disabled = !1;
            },
          },
          {
            key: "disable",
            value: function () {
              t.disabled = !0;
            },
          },
        ]
      ),
      t
    );
  })();
Nr(o8, "disabled", !0);
var OB = typeof window < "u",
  Due = OB && navigator.userAgent.toLocaleLowerCase(),
  IPn = OB && /^((?!chrome|android).)*safari/.test(Due),
  Jze = OB && Due.includes("firefox"),
  DPn = OB && Due.includes("android"),
  U1 = (function () {
    function t() {
      zl(this, t);
    }
    return (
      jl(t, null, [
        {
          key: "getRateIndexByRate",
          value: function (e) {
            return t.FREQ.indexOf(e);
          },
        },
        {
          key: "parseADTS",
          value: function (e, n) {
            for (
              var r = e.length, i = 0;
              i + 2 < r && (e[i] !== 255 || (246 & e[i + 1]) != 240);

            )
              i++;
            if (!(i >= r)) {
              var o = i,
                l = [],
                u = (60 & e[i + 2]) >>> 2,
                c = t.FREQ[u];
              if (!c) throw new Error("Invalid sampling index: ".concat(u));
              for (
                var d,
                  h,
                  f = 1 + ((192 & e[i + 2]) >>> 6),
                  p = ((1 & e[i + 2]) << 2) | ((192 & e[i + 3]) >>> 6),
                  g = t._getConfig(u, p, f),
                  y = g.config,
                  v = g.codec,
                  b = 0,
                  w = t.getFrameDuration(c);
                i + 7 < r;

              )
                if (e[i] === 255 && (246 & e[i + 1]) == 240) {
                  if (
                    !(h =
                      ((3 & e[i + 3]) << 11) |
                      (e[i + 4] << 3) |
                      ((224 & e[i + 5]) >> 5)) ||
                    r - i < h
                  )
                    break;
                  (d = 2 * (1 & ~e[i + 1])),
                    l.push({
                      pts: n + b * w,
                      data: e.subarray(i + 7 + d, i + h),
                    }),
                    b++,
                    (i += h);
                } else i++;
              return {
                skip: o,
                remaining: i >= r ? void 0 : e.subarray(i),
                frames: l,
                samplingFrequencyIndex: u,
                sampleRate: c,
                objectType: f,
                channelCount: p,
                codec: v,
                config: y,
                originCodec: "mp4a.40.".concat(f),
              };
            }
          },
        },
        {
          key: "parseAudioSpecificConfig",
          value: function (e) {
            if (e.length) {
              var n = e[0] >>> 3,
                r = ((7 & e[0]) << 1) | (e[1] >>> 7),
                i = (120 & e[1]) >>> 3,
                o = t.FREQ[r];
              if (o) {
                var l = t._getConfig(r, i, n);
                return {
                  samplingFrequencyIndex: r,
                  sampleRate: o,
                  objectType: n,
                  channelCount: i,
                  config: l.config,
                  codec: l.codec,
                  originCodec: "mp4a.40.".concat(n),
                };
              }
            }
          },
        },
        {
          key: "getFrameDuration",
          value: function (e) {
            return (
              (1024 *
                (arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 9e4)) /
              e
            );
          },
        },
        {
          key: "_getConfig",
          value: function (e, n, r) {
            var i,
              o,
              l = [];
            return (
              Jze
                ? e >= 6
                  ? ((i = 5), (o = e - 3))
                  : ((i = 2), (o = e))
                : DPn
                ? ((i = 2), (o = e))
                : ((i = r === 2 || r === 5 ? r : 5),
                  (o = e),
                  e >= 6 ? (o = e - 3) : n === 1 && ((i = 2), (o = e))),
              (l[0] = i << 3),
              (l[0] |= (14 & e) >> 1),
              (l[1] = (1 & e) << 7),
              (l[1] |= n << 3),
              i === 5 &&
                ((l[1] |= (14 & o) >> 1),
                (l[2] = (1 & o) << 7),
                (l[2] |= 8),
                (l[3] = 0)),
              { config: l, codec: "mp4a.40.".concat(i) }
            );
          },
        },
        {
          key: "getSilentFrame",
          value: function (e, n) {
            if (e === "mp4a.40.2") {
              if (n === 1) return new Uint8Array([0, 200, 0, 128, 35, 128]);
              if (n === 2)
                return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
              if (n === 3)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142,
                ]);
              if (n === 4)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128,
                  8, 2, 56,
                ]);
              if (n === 5)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 56,
                ]);
              if (n === 6)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224,
                ]);
            } else {
              if (n === 1)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6,
                  241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 2)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 3)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
            }
          },
        },
      ]),
      t
    );
  })();
function Dp() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  e = e.filter(Boolean);
  var r = new Uint8Array(
      e.reduce(function (o, l) {
        return o + l.byteLength;
      }, 0)
    ),
    i = 0;
  return (
    e.forEach(function (o) {
      r.set(o, i), (i += o.byteLength);
    }),
    r
  );
}
Nr(
  U1,
  "FREQ",
  [
    96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3,
    7350,
  ]
);
var PPn = Math.pow(2, 32);
function ul(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (t[e] << 8) + (t[e + 1] || 0);
}
function MPn(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (t[e] << 16) + (t[e + 1] << 8) + (t[e + 2] || 0);
}
function Ti(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (
    ((t[e] << 24) >>> 0) + (t[e + 1] << 16) + (t[e + 2] << 8) + (t[e + 3] || 0)
  );
}
function $2(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return Ti(t, e) * PPn + Ti(t, e + 4);
}
function qze(t) {
  for (var e, n = "avc1.", r = 0; r < 3; r++)
    (e = t[r].toString(16)).length < 2 && (e = "0".concat(e)), (n += e);
  return n;
}
function cRe(t) {
  if (!Array.isArray(t)) {
    for (var e = [], n = "", r = 0; r < t.length; r++)
      r % 2 && ((n = t[r - 1] + t[r]), e.push(parseInt(n, 16)), (n = ""));
    return e;
  }
  return t.map(function (i) {
    return parseInt(i, 16);
  });
}
function HW(t, e) {
  return +(t + "." + e);
}
function CPn(t) {
  if (t.length < 5) return 0;
  var e = Math.hypot(t[0], t[3]),
    n = Math.hypot(t[1], t[4]);
  return e === 0 || n === 0
    ? 0
    : (180 * Math.atan2(t[1] / n, t[0] / e)) / Math.PI;
}
var RT = (function () {
    function t() {
      zl(this, t);
    }
    return (
      jl(t, null, [
        {
          key: "parseAnnexB",
          value: function (e) {
            var n = e.byteLength - 1,
              r = 0;
            do {
              if (e[n] !== 0) break;
              r++, n--;
            } while (n > 0);
            r >= 3 && (e = e.subarray(0, n + 1));
            for (
              var i = e.length, o = 2, l = 0;
              e[o] !== null && e[o] !== void 0 && e[o] !== 1;

            )
              o++;
            if ((l = ++o + 2) >= i) return [];
            for (var u = []; l < i; )
              switch (e[l]) {
                case 0:
                  if (e[l - 1] !== 0) {
                    l += 2;
                    break;
                  }
                  if (e[l - 2] !== 0) {
                    l++;
                    break;
                  }
                  if (l < i - 1 && e[l + 1] !== 1) {
                    l++;
                    break;
                  }
                  o !== l - 2 && u.push(e.subarray(o, l - 2));
                  do l++;
                  while (e[l] !== 1 && l < i);
                  l = (o = l + 1) + 2;
                  break;
                case 1:
                  if (e[l - 1] !== 0 || e[l - 2] !== 0) {
                    l += 3;
                    break;
                  }
                  o !== l - 2 && u.push(e.subarray(o, l - 2)),
                    (l = (o = l + 1) + 2);
                  break;
                default:
                  l += 3;
              }
            return o < i && u.push(e.subarray(o)), u;
          },
        },
        {
          key: "parseAvcC",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 4;
            if (!(e.length < 4)) {
              for (var r, i = e.length, o = [], l = 0; l + n < i; )
                if (((r = Ti(e, l)), n === 3 && (r >>>= 8), (l += n), r)) {
                  if (l + r > i) break;
                  o.push(e.subarray(l, l + r)), (l += r);
                }
              return o;
            }
          },
        },
        {
          key: "parseSEI",
          value: function (e, n) {
            for (
              var r = e.length, i = n ? 2 : 1, o = 0, l = 0, u = "";
              e[i] === 255;

            )
              (o += 255), i++;
            for (o += e[i++]; e[i] === 255; ) (l += 255), i++;
            if (((l += e[i++]), o === 5 && r > i + 16))
              for (var c = 0; c < 16; c++) (u += e[i].toString(16)), i++;
            return { payload: e.subarray(i, i + l), type: o, size: l, uuid: u };
          },
        },
        {
          key: "removeEPB",
          value: function (e) {
            for (var n = e.byteLength, r = [], i = 1; i < n - 2; )
              e[i] === 0 && e[i + 1] === 0 && e[i + 2] === 3
                ? (r.push(i + 2), (i += 2))
                : i++;
            if (!r.length) return e;
            var o = n - r.length,
              l = new Uint8Array(o),
              u = 0;
            for (i = 0; i < o; u++, i++)
              u === r[0] && (u++, r.shift()), (l[i] = e[u]);
            return l;
          },
        },
      ]),
      t
    );
  })(),
  Nne = (function () {
    function t(e) {
      if (
        (zl(this, t),
        Nr(this, "_bytesAvailable", void 0),
        Nr(this, "_bitsAvailable", 0),
        Nr(this, "_word", 0),
        !e)
      )
        throw new Error("ExpGolomb data params is required");
      (this._data = e),
        (this._bytesAvailable = e.byteLength),
        this._bytesAvailable && this._loadWord();
    }
    return (
      jl(t, [
        {
          key: "bitsAvailable",
          get: function () {
            return this._bitsAvailable;
          },
        },
        {
          key: "_loadWord",
          value: function () {
            var e = this._data.byteLength - this._bytesAvailable,
              n = Math.min(4, this._bytesAvailable);
            if (n === 0) throw new Error("No bytes available");
            var r = new Uint8Array(4);
            r.set(this._data.subarray(e, e + n)),
              (this._word = new DataView(r.buffer).getUint32(0)),
              (this._bitsAvailable = 8 * n),
              (this._bytesAvailable -= n);
          },
        },
        {
          key: "skipBits",
          value: function (e) {
            if (this._bitsAvailable > e)
              (this._word <<= e), (this._bitsAvailable -= e);
            else {
              e -= this._bitsAvailable;
              var n = Math.floor(e / 8);
              (e -= 8 * n),
                (this._bytesAvailable -= n),
                this._loadWord(),
                (this._word <<= e),
                (this._bitsAvailable -= e);
            }
          },
        },
        {
          key: "readBits",
          value: function (e) {
            if (e > 32) throw new Error("Cannot read more than 32 bits");
            var n = Math.min(this._bitsAvailable, e),
              r = this._word >>> (32 - n);
            return (
              (this._bitsAvailable -= n),
              this._bitsAvailable > 0
                ? (this._word <<= n)
                : this._bytesAvailable > 0 && this._loadWord(),
              (n = e - n) > 0 && this._bitsAvailable
                ? (r << n) | this.readBits(n)
                : r
            );
          },
        },
        {
          key: "skipLZ",
          value: function () {
            var e;
            for (e = 0; e < this._bitsAvailable; ++e)
              if (this._word & (2147483648 >>> e))
                return (this._word <<= e), (this._bitsAvailable -= e), e;
            return this._loadWord(), e + this.skipLZ();
          },
        },
        {
          key: "skipUEG",
          value: function () {
            this.skipBits(1 + this.skipLZ());
          },
        },
        {
          key: "readUEG",
          value: function () {
            var e = this.skipLZ();
            return this.readBits(e + 1) - 1;
          },
        },
        {
          key: "readEG",
          value: function () {
            var e = this.readUEG();
            return 1 & e ? (1 + e) >>> 1 : -1 * (e >>> 1);
          },
        },
        {
          key: "readBool",
          value: function () {
            return this.readBits(1) === 1;
          },
        },
        {
          key: "readUByte",
          value: function () {
            return this.readBits(8);
          },
        },
        {
          key: "skipScalingList",
          value: function (e) {
            for (var n = 8, r = 8, i = 0; i < e; i++)
              r !== 0 && (r = (n + this.readEG() + 256) % 256),
                (n = r === 0 ? n : r);
          },
        },
      ]),
      t
    );
  })(),
  $Pn = (function () {
    function t() {
      zl(this, t);
    }
    return (
      jl(t, null, [
        {
          key: "parseAVCDecoderConfigurationRecord",
          value: function (e) {
            if (!(e.length < 7)) {
              for (
                var n,
                  r,
                  i = 1 + (3 & e[4]),
                  o = [],
                  l = [],
                  u = 6,
                  c = 31 & e[5],
                  d = 0;
                d < c;
                d++
              )
                if (((r = (e[u] << 8) | e[u + 1]), (u += 2), r)) {
                  var h = e.subarray(u, u + r);
                  (u += r), o.push(h), n || (n = t.parseSPS(RT.removeEPB(h)));
                }
              var f,
                p = e[u];
              u++;
              for (var g = 0; g < p; g++)
                (f = (e[u] << 8) | e[u + 1]),
                  (u += 2),
                  f && (l.push(e.subarray(u, u + f)), (u += f));
              return { sps: n, spsArr: o, ppsArr: l, nalUnitSize: i };
            }
          },
        },
        {
          key: "parseSPS",
          value: function (e) {
            var n = new Nne(e);
            n.readUByte();
            var r = n.readUByte(),
              i = n.readUByte(),
              o = n.readUByte();
            n.skipUEG();
            var l = 420;
            if (
              r === 100 ||
              r === 110 ||
              r === 122 ||
              r === 244 ||
              r === 44 ||
              r === 83 ||
              r === 86 ||
              r === 118 ||
              r === 128 ||
              r === 138 ||
              r === 144
            ) {
              var u = n.readUEG();
              if (
                (u <= 3 && (l = [0, 420, 422, 444][u]),
                u === 3 && n.skipBits(1),
                n.skipUEG(),
                n.skipUEG(),
                n.skipBits(1),
                n.readBool())
              )
                for (var c = u !== 3 ? 8 : 12, d = 0; d < c; d++)
                  n.readBool() &&
                    (d < 6 ? n.skipScalingList(16) : n.skipScalingList(64));
            }
            n.skipUEG();
            var h = n.readUEG();
            if (h === 0) n.readUEG();
            else if (h === 1) {
              n.skipBits(1), n.skipUEG(), n.skipUEG();
              for (var f = n.readUEG(), p = 0; p < f; p++) n.skipUEG();
            }
            n.skipUEG(), n.skipBits(1);
            var g = n.readUEG(),
              y = n.readUEG(),
              v = n.readBits(1);
            v === 0 && n.skipBits(1), n.skipBits(1);
            var b,
              w,
              k,
              D,
              $,
              N = 0,
              P = 0,
              I = 0,
              O = 0;
            if (
              (n.readBool() &&
                ((N = n.readUEG()),
                (P = n.readUEG()),
                (I = n.readUEG()),
                (O = n.readUEG())),
              n.readBool())
            ) {
              if (n.readBool())
                switch (n.readUByte()) {
                  case 1:
                    b = [1, 1];
                    break;
                  case 2:
                    b = [12, 11];
                    break;
                  case 3:
                    b = [10, 11];
                    break;
                  case 4:
                    b = [16, 11];
                    break;
                  case 5:
                    b = [40, 33];
                    break;
                  case 6:
                    b = [24, 11];
                    break;
                  case 7:
                    b = [20, 11];
                    break;
                  case 8:
                    b = [32, 11];
                    break;
                  case 9:
                    b = [80, 33];
                    break;
                  case 10:
                    b = [18, 11];
                    break;
                  case 11:
                    b = [15, 11];
                    break;
                  case 12:
                    b = [64, 33];
                    break;
                  case 13:
                    b = [160, 99];
                    break;
                  case 14:
                    b = [4, 3];
                    break;
                  case 15:
                    b = [3, 2];
                    break;
                  case 16:
                    b = [2, 1];
                    break;
                  case 255:
                    b = [
                      (n.readUByte() << 8) | n.readUByte(),
                      (n.readUByte() << 8) | n.readUByte(),
                    ];
                }
              if (
                (n.readBool() && n.readBool(),
                n.readBool() && (n.readBits(4), n.readBool() && n.readBits(24)),
                n.readBool() && (n.readUEG(), n.readUEG()),
                n.readBool())
              ) {
                var X = n.readBits(32),
                  G = n.readBits(32);
                (w = n.readBool()), ($ = (k = G) / (D = 2 * X));
              }
            }
            return {
              codec: qze(e.subarray(1, 4)),
              profileIdc: r,
              profileCompatibility: i,
              levelIdc: o,
              chromaFormat: l,
              width: Math.ceil(16 * (g + 1) - 2 * (N + P)),
              height: (2 - v) * (y + 1) * 16 - (v ? 2 : 4) * (I + O),
              sarRatio: b,
              fpsNum: k,
              fpsDen: D,
              fps: $,
              fixedFrame: w,
            };
          },
        },
      ]),
      t
    );
  })(),
  dRe = (function () {
    function t() {
      zl(this, t);
    }
    return (
      jl(t, null, [
        {
          key: "parseHEVCDecoderConfigurationRecord",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : {};
            if (!(e.length < 23)) {
              n = n || {};
              for (
                var r,
                  i,
                  o,
                  l,
                  u,
                  c = 1 + (3 & e[21]),
                  d = [],
                  h = [],
                  f = [],
                  p = 23,
                  g = e[22],
                  y = 0;
                y < g;
                y++
              ) {
                (o = 63 & e[p]), (l = (e[p + 1] << 8) | e[p + 2]), (p += 3);
                for (var v = 0; v < l; v++)
                  if (((u = (e[p] << 8) | e[p + 1]), (p += 2), u)) {
                    switch (o) {
                      case 32:
                        var b = e.subarray(p, p + u);
                        r || (r = t.parseVPS(RT.removeEPB(b), n)), f.push(b);
                        break;
                      case 33:
                        var w = e.subarray(p, p + u);
                        i || (i = t.parseSPS(RT.removeEPB(w), n)), d.push(w);
                        break;
                      case 34:
                        h.push(e.subarray(p, p + u));
                    }
                    p += u;
                  }
              }
              return {
                hvcC: n,
                sps: i,
                spsArr: d,
                ppsArr: h,
                vpsArr: f,
                nalUnitSize: c,
              };
            }
          },
        },
        {
          key: "parseVPS",
          value: function (e, n) {
            n = n || {};
            var r = new Nne(e);
            r.readUByte(), r.readUByte(), r.readBits(12);
            var i = r.readBits(3);
            return (
              (n.numTemporalLayers = Math.max(n.numTemporalLayers || 0, i + 1)),
              r.readBits(17),
              t._parseProfileTierLevel(r, i, n),
              n
            );
          },
        },
        {
          key: "parseSPS",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : {};
            n = n || {};
            var r = new Nne(e);
            r.readUByte(), r.readUByte(), r.readBits(4);
            var i = r.readBits(3);
            (n.numTemporalLayers = Math.max(i + 1, n.numTemporalLayers || 0)),
              (n.temporalIdNested = r.readBits(1)),
              t._parseProfileTierLevel(r, i, n),
              r.readUEG();
            var o = (n.chromaFormatIdc = r.readUEG()),
              l = 420;
            o <= 3 && (l = [0, 420, 422, 444][o]);
            var u = 0;
            o === 3 && (u = r.readBits(1));
            var c,
              d,
              h,
              f,
              p = r.readUEG(),
              g = r.readUEG(),
              y = r.readBits(1);
            return (
              y === 1 &&
                ((c = r.readUEG()),
                (d = r.readUEG()),
                (h = r.readUEG()),
                (f = r.readUEG())),
              (n.bitDepthLumaMinus8 = r.readUEG()),
              (n.bitDepthChromaMinus8 = r.readUEG()),
              y === 1 &&
                ((p -= ((o !== 1 && o !== 2) || u !== 0 ? 1 : 2) * (d + c)),
                (g -= (o === 1 && u === 0 ? 2 : 1) * (f + h))),
              {
                codec: "hev1.1.6.L93.B0",
                width: p,
                height: g,
                chromaFormat: l,
                hvcC: n,
              }
            );
          },
        },
        {
          key: "_parseProfileTierLevel",
          value: function (e, n, r) {
            var i = r.generalTierFlag || 0;
            (r.generalProfileSpace = e.readBits(2)),
              (r.generalTierFlag = Math.max(e.readBits(1), i)),
              (r.generalProfileIdc = Math.max(
                e.readBits(5),
                r.generalProfileIdc || 0
              )),
              (r.generalProfileCompatibilityFlags = e.readBits(32)),
              (r.generalConstraintIndicatorFlags = [
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
                e.readBits(8),
              ]);
            var o = e.readBits(8);
            i < r.generalTierFlag
              ? (r.generalLevelIdc = o)
              : (r.generalLevelIdc = Math.max(o, r.generalLevelIdc || 0));
            var l = [],
              u = [];
            if (n > e.bitsAvailable)
              throw new Error("maxSubLayersMinus inavlid size ".concat(n));
            for (var c = 0; c < n; c++)
              (l[c] = e.readBits(1)), (u[c] = e.readBits(1));
            n > 0 && e.readBits(2 * (8 - n));
            for (var d = 0; d < n; d++)
              l[d] !== 0 &&
                (e.readBits(2),
                e.readBits(1),
                e.readBits(5),
                e.readBits(16),
                e.readBits(16),
                e.readBits(4),
                e.readBits(16),
                e.readBits(16),
                e.readBits(12)),
                u[d] !== 0 && e.readBits(8);
          },
        },
      ]),
      t
    );
  })(),
  xPn = 45e3,
  hRe = 3,
  i4 = 9e4,
  XW = 45e4,
  VW = 9e4,
  LPn = 45e3,
  OPn = 45e4,
  GPn = (function () {
    function t(e, n, r, i) {
      zl(this, t),
        (this.videoTrack = e),
        (this.audioTrack = n),
        (this.metadataTrack = r),
        (this._baseDts = -1),
        (this._baseVideoDts = -1),
        (this._baseAudioDts = -1),
        (this._baseDtsInited = !1),
        (this._audioNextPts = void 0),
        (this._videoNextDts = void 0),
        (this._audioTimestampBreak = !1),
        (this._videoTimestampBreak = !1),
        (this._lastAudioExceptionGapDot = 0),
        (this._lastAudioExceptionOverlapDot = 0),
        (this._lastAudioExceptionLargeGapDot = 0),
        (this._needForceFixLargeGap = i == null ? void 0 : i.forceFixLargeGap),
        (this._largeGapThreshold =
          (i == null ? void 0 : i.largeGapThreshold) || OPn);
    }
    return (
      jl(t, [
        {
          key: "fix",
          value: function () {
            var e = this,
              n =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 0,
              r =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1],
              i =
                !(arguments.length > 2 && arguments[2] !== void 0) ||
                arguments[2];
            n = Math.round(9e4 * n);
            var o = this.videoTrack,
              l = this.audioTrack,
              u = o.samples,
              c = l.samples;
            if (u.length || c.length) {
              var d = u[0],
                h = c[0],
                f = 0;
              if (
                (u.length && c.length && (f = d.dts - h.pts),
                this._baseDtsInited ||
                  this._calculateBaseDts(this.audioTrack, this.videoTrack),
                r &&
                  (this._calculateBaseDts(this.audioTrack, this.videoTrack),
                  (this._baseDts -= n),
                  (this._baseAudioDts -= n),
                  (this._baseVideoDts -= n)),
                !i)
              ) {
                (this._videoNextDts = f > 0 ? n + f : n),
                  (this._audioNextPts = f > 0 ? n : n - f),
                  this._needForceFixLargeGap &&
                    ((this._videoNextDts = 0), (this._audioNextPts = 0));
                var p = d ? d.dts - this._baseDts - this._videoNextDts : 0,
                  g = h ? h.pts - this._baseDts - this._audioNextPts : 0;
                Math.abs(p || g) > VW &&
                  (this._calculateBaseDts(this.audioTrack, this.videoTrack),
                  (this._baseDts -= n));
              }
              if (
                (this._resetBaseDtsWhenStreamBreaked(),
                this._fixAudio(l),
                this._fixVideo(o),
                this.metadataTrack.exist())
              ) {
                var y = this.metadataTrack.timescale;
                this.metadataTrack.seiSamples.forEach(function (v) {
                  (v.pts = v.originPts - e._baseDts),
                    (v.time = Math.max(0, v.pts) / y);
                });
              }
              o.samples.length && (o.baseMediaDecodeTime = o.samples[0].dts),
                l.samples.length &&
                  (l.baseMediaDecodeTime =
                    (l.samples[0].pts * l.timescale) / 9e4);
            }
          },
        },
        {
          key: "_fixVideo",
          value: function (e) {
            var n = this,
              r = e.samples;
            if (r.length) {
              if (
                (r.forEach(function (P) {
                  (P.dts -= n._needForceFixLargeGap
                    ? n._baseVideoDts
                    : n._baseDts),
                    (P.pts -= n._needForceFixLargeGap
                      ? n._baseVideoDts
                      : n._baseDts);
                }),
                this._videoNextDts === void 0)
              ) {
                var i = r[0];
                this._videoNextDts = i.dts;
              }
              var o,
                l,
                u = r.length,
                c = 0,
                d = r[0],
                h = r[1],
                f = this._videoNextDts - d.dts;
              if (Math.abs(f) > LPn)
                if (
                  (e.warnings.push({
                    type: tm.LARGE_VIDEO_GAP_BETWEEN_CHUNK,
                    nextDts: this._videoNextDts / 90,
                    firstSampleDts: d.dts / 90,
                    nextSampleDts:
                      (((o = r[1]) === null || o === void 0 ? void 0 : o.dts) ||
                        0) / 90,
                    sampleDuration: f / 90,
                  }),
                  (d.dts += f),
                  (d.pts += f),
                  h && Math.abs(h.dts - d.dts) > VW)
                )
                  (this._videoTimestampBreak = !0),
                    r.forEach(function (P, I) {
                      I !== 0 && ((P.dts += f), (P.pts += f));
                    });
                else
                  for (var p = 1; p < u - 1; p++) {
                    var g,
                      y = (g = r[p]) === null || g === void 0 ? void 0 : g.dts,
                      v = r[p - 1].dts;
                    y && y - v < 0 && ((r[p].dts += f), (r[p].pts += f));
                  }
              if (
                (e.fpsNum &&
                  e.fpsDen &&
                  (l = e.timescale * (e.fpsDen / e.fpsNum)),
                l < 900 && (l = 0),
                !l)
              ) {
                var b = e.samples[0],
                  w = e.samples[1];
                l = u === 1 ? 9e3 : Math.floor(w.dts - b.dts);
              }
              for (var k = 0; k < u; k++) {
                var D = r[k].dts,
                  $ = r[k + 1];
                if (
                  (c =
                    k < u - 1
                      ? $.dts - D
                      : r[k - 1]
                      ? Math.min(D - r[k - 1].dts, l)
                      : l) > VW ||
                  c < 0
                ) {
                  (this._videoTimestampBreak = !0),
                    (c = this._audioTimestampBreak ? l : Math.max(c, 2700));
                  var N = this._audioNextPts || 0;
                  $ && $.dts > N && (c = l),
                    e.warnings.push({
                      type: tm.LARGE_VIDEO_GAP,
                      time: D / e.timescale,
                      dts: D,
                      originDts: r[k].originDts,
                      nextDts: this._videoNextDts,
                      sampleDuration: c,
                      refSampleDuration: l,
                    });
                }
                (r[k].duration = c), (this._videoNextDts += c);
              }
            }
          },
        },
        {
          key: "_fixAudio",
          value: function (e) {
            var n = this,
              r = e.samples;
            if (r.length)
              if (e.codecType !== Op.MP3)
                r.forEach(function (l) {
                  (l.pts -= n._needForceFixLargeGap
                    ? n._baseAudioDts
                    : n._baseDts),
                    (l.dts = l.pts);
                }),
                  this._doFixAudioInternal(e, r, 9e4);
              else {
                this.lastAudioSample && r.unshift(this.lastAudioSample);
                for (var i = 0; i < r.length; i++) {
                  var o = r[i];
                  if (!r[i + 1]) break;
                  (o.duration = r[i + 1].pts - o.pts),
                    (o.pts -= this._baseDts),
                    (o.dts = o.pts);
                }
                this.lastAudioSample = r.pop();
              }
          },
        },
        {
          key: "_calculateBaseDts",
          value: function (e, n) {
            var r = e.samples,
              i = n.samples;
            if (!r.length && !i.length) return !1;
            var o = 1 / 0,
              l = 1 / 0;
            r.length && ((e.baseDts = o = r[0].pts), (this._baseAudioDts = o)),
              i.length &&
                ((n.baseDts = l = i[0].dts), (this._baseVideoDts = l)),
              (this._baseDts = Math.min(o, l));
            var u = l - o,
              c = !1;
            return (
              Number.isFinite(u) &&
                Math.abs(u) > xPn &&
                n.warnings.push({
                  type: tm.LARGE_AV_SHIFT,
                  videoBaseDts: l,
                  audioBasePts: o,
                  baseDts: this._baseDts,
                  delta: u,
                }),
              Number.isFinite(u) &&
                Math.abs(u) > this._largeGapThreshold * i4 &&
                (c = !0),
              this._baseDtsInited ||
                (c && this._needForceFixLargeGap
                  ? (this._needForceFixLargeGap = !0)
                  : (this._needForceFixLargeGap = !1)),
              (this._baseDtsInited = !0),
              !0
            );
          },
        },
        {
          key: "_resetBaseDtsWhenStreamBreaked",
          value: function () {
            if (
              this._baseDtsInited &&
              this._videoTimestampBreak &&
              this._audioTimestampBreak
            ) {
              if (!this._calculateBaseDts(this.audioTrack, this.videoTrack))
                return;
              (this._baseDts -= Math.min(
                this._audioNextPts,
                this._videoNextDts
              )),
                (this._audioLastSample = null),
                (this._videoLastSample = null),
                (this._videoTimestampBreak = !1),
                (this._audioTimestampBreak = !1);
            }
          },
        },
        {
          key: "_doFixAudioInternal",
          value: function (e, n, r) {
            e.sampleDuration ||
              (e.sampleDuration = U1.getFrameDuration(e.timescale, r));
            var i = e.sampleDuration;
            if (this._audioNextPts === void 0) {
              var o = n[0];
              this._audioNextPts = o.pts;
            }
            for (var l = 0; l < n.length; l++) {
              var u = this._audioNextPts,
                c = n[l],
                d = c.pts - u;
              if (
                !this._audioTimestampBreak &&
                d >= hRe * i &&
                d <= i4 &&
                !IPn
              ) {
                var h =
                    U1.getSilentFrame(e.codec, e.channelCount) ||
                    n[0].data.subarray(),
                  f = Math.floor(d / i);
                Math.abs(c.pts - this._lastAudioExceptionGapDot) > XW &&
                  (this._lastAudioExceptionGapDot = c.pts),
                  e.warnings.push({
                    type: tm.AUDIO_FILLED,
                    pts: c.pts / 90,
                    originPts: c.originPts,
                    count: f,
                    nextPts: u / 90,
                    refSampleDuration: i,
                  });
                for (var p = 0; p < f; p++) {
                  var g = new C$(Math.floor(u), h);
                  (g.originPts = Math.floor(this._baseDts + u)),
                    n.splice(l, 0, g),
                    (this._audioNextPts += i),
                    l++;
                }
                l--;
              } else
                d <= -hRe * i && d >= -1 * i4
                  ? (Math.abs(c.pts - this._lastAudioExceptionOverlapDot) >
                      XW &&
                      ((this._lastAudioExceptionOverlapDot = c.pts),
                      e.warnings.push({
                        type: tm.AUDIO_DROPPED,
                        pts: c.pts / 90,
                        originPts: c.originPts,
                        nextPts: u / 90,
                        refSampleDuration: i,
                      })),
                    n.splice(l, 1),
                    l--)
                  : (Math.abs(d) >= i4 &&
                      ((this._audioTimestampBreak = !0),
                      Math.abs(c.pts - this._lastAudioExceptionLargeGapDot) >
                        XW &&
                        ((this._lastAudioExceptionLargeGapDot = c.pts),
                        e.warnings.push({
                          type: tm.LARGE_AUDIO_GAP,
                          time: c.pts / 1e3,
                          pts: c.pts / 90,
                          originPts: c.originPts,
                          nextPts: u / 90,
                          sampleDuration: d,
                          refSampleDuration: i,
                        }))),
                    (c.dts = c.pts = u),
                    (this._audioNextPts += i));
            }
          },
        },
      ]),
      t
    );
  })(),
  NPn = [
    32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48,
    56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64,
    80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 128,
    144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112,
    128, 144, 160,
  ],
  FPn = [44100, 48e3, 32e3, 22050, 24e3, 16e3, 11025, 12e3, 8e3],
  UPn = [
    [0, 72, 144, 12],
    [0, 0, 0, 0],
    [0, 72, 144, 12],
    [0, 144, 144, 12],
  ],
  BPn = [0, 1, 1, 4],
  a4 = null,
  fRe = (function () {
    function t() {
      zl(this, t);
    }
    return (
      jl(t, null, [
        {
          key: "isHeader",
          value: function (e, n) {
            return (
              n + 1 < e.length &&
              e[n] === 255 &&
              (224 & e[n + 1]) == 224 &&
              (6 & e[n + 1]) != 0
            );
          },
        },
        {
          key: "appendFrame",
          value: function (e, n, r, i, o) {
            if (!(r + 24 > n.length)) {
              var l = t.parseHeader(n, r);
              if (l && r + l.frameLength <= n.length) {
                var u = i + o * ((9e4 * l.samplesPerFrame) / l.sampleRate),
                  c = {
                    data: n.subarray(r, r + l.frameLength),
                    pts: u,
                    dts: u,
                  };
                return (
                  (c.size = c.data.byteLength),
                  (e.config = []),
                  (e.channelCount = l.channelCount),
                  (e.sampleRate = l.sampleRate),
                  Jze ? (e.codec = "mp3") : (e.container = "audio/mpeg"),
                  e.samples.push(c),
                  { length: l.frameLength }
                );
              }
            }
          },
        },
        {
          key: "parseHeader",
          value: function (e, n) {
            var r = (e[n + 1] >> 3) & 3,
              i = (e[n + 1] >> 1) & 3,
              o = (e[n + 2] >> 4) & 15,
              l = (e[n + 2] >> 2) & 3;
            if (r !== 1 && o !== 0 && o !== 15 && l !== 3) {
              var u = (e[n + 2] >> 1) & 1,
                c = e[n + 3] >> 6,
                d = 1e3 * NPn[14 * (r === 3 ? 3 - i : i === 3 ? 3 : 4) + o - 1],
                h = FPn[3 * (r === 3 ? 0 : r === 2 ? 1 : 2) + l],
                f = c === 3 ? 1 : 2,
                p = UPn[r][i],
                g = BPn[i],
                y = 8 * p * g,
                v = Math.floor((p * d) / h + u) * g;
              if (a4 === null) {
                var b = (navigator.userAgent || "").match(/Chrome\/(\d+)/i);
                a4 = b ? parseInt(b[1]) : 0;
              }
              return (
                a4 &&
                  a4 <= 87 &&
                  i === 2 &&
                  d >= 224e3 &&
                  c === 0 &&
                  (e[n + 3] = 128 | e[n + 3]),
                {
                  sampleRate: h,
                  channelCount: f,
                  frameLength: v,
                  samplesPerFrame: y,
                }
              );
            }
          },
        },
      ]),
      t
    );
  })(),
  Mg = new o8("TsDemuxer"),
  eje = (function () {
    function t(e, n, r) {
      var i =
        arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
      zl(this, t),
        Nr(this, "_pmtId", -1),
        Nr(this, "_remainingPacketData", null),
        Nr(this, "_videoPesData", []),
        Nr(this, "_audioPesData", []),
        Nr(this, "_gopId", 0),
        (this.videoTrack = e || new Zze()),
        (this.audioTrack = n || new Yze()),
        (this.metadataTrack = r || new Qze()),
        (this._fixer = new GPn(
          this.videoTrack,
          this.audioTrack,
          this.metadataTrack,
          i
        ));
    }
    return (
      jl(
        t,
        [
          {
            key: "demux",
            value: function (e) {
              var n =
                  arguments.length > 1 &&
                  arguments[1] !== void 0 &&
                  arguments[1],
                r =
                  !(arguments.length > 2 && arguments[2] !== void 0) ||
                  arguments[2],
                i = this.audioTrack,
                o = this.videoTrack,
                l = this.metadataTrack;
              n && ((this._pmtId = -1), o.reset(), i.reset(), l.reset()),
                !r || n
                  ? ((this._remainingPacketData = null),
                    (this._videoPesData = []),
                    (this._audioPesData = []))
                  : ((o.samples = []),
                    (i.samples = []),
                    (l.seiSamples = []),
                    (o.warnings = []),
                    (i.warnings = []),
                    this._remainingPacketData &&
                      ((e = Dp(this._remainingPacketData, e)),
                      (this._remainingPacketData = null)));
              var u = e.length,
                c = u % 188;
              c && ((this._remainingPacketData = e.subarray(u - c)), (u -= c));
              for (var d = o.pid, h = i.pid, f = 0; f < u; f += 188) {
                if (e[f] !== 71)
                  throw new Error("TS packet did not start with 0x47");
                var p = !!(64 & e[f + 1]),
                  g = ((31 & e[f + 1]) << 8) + e[f + 2],
                  y = void 0;
                if ((48 & e[f + 3]) >> 4 > 1) {
                  if ((y = f + 5 + e[f + 4]) === f + 188) continue;
                } else y = f + 4;
                switch (g) {
                  case 0:
                    p && (y += e[y] + 1),
                      (this._pmtId = ((31 & e[y + 10]) << 8) | e[y + 11]);
                    break;
                  case this._pmtId:
                    p && (y += e[y] + 1);
                    var v = y + 3 + (((15 & e[y + 1]) << 8) | e[y + 2]) - 4;
                    for (
                      y += 12 + (((15 & e[y + 10]) << 8) | e[y + 11]);
                      y < v;

                    ) {
                      var b = ((31 & e[y + 1]) << 8) | e[y + 2];
                      switch (e[y]) {
                        case 15:
                          i.pid = h = b;
                          break;
                        case 3:
                        case 4:
                          i.pid === -1 &&
                            ((i.pid = h = b), (i.codecType = Op.MP3));
                          break;
                        case 27:
                          if (d !== -1) break;
                          (o.codecType = KT.AVC), (o.pid = d = b);
                          break;
                        case 36:
                          if (d !== -1) break;
                          (o.codecType = KT.HEVC), (o.pid = d = b);
                          break;
                        default:
                          Mg.warn(
                            "Unsupported stream. type: "
                              .concat(e[y], ", pid: ")
                              .concat(b)
                          );
                      }
                      y += 5 + (((15 & e[y + 3]) << 8) | e[y + 4]);
                    }
                    break;
                  case d:
                    p && this._videoPesData.length && this._parseVideoData(),
                      this._videoPesData.push(e.subarray(y, f + 188));
                    break;
                  case h:
                    p && this._audioPesData.length && this._parseAudioData(),
                      this._audioPesData.push(e.subarray(y, f + 188));
                    break;
                  case 17:
                  case 8191:
                    break;
                  default:
                    Mg.warn("Unknown pid: ".concat(g));
                }
              }
              return (
                this._parseVideoData(),
                this._parseAudioData(),
                (i.formatTimescale =
                  o.formatTimescale =
                  o.timescale =
                  l.timescale =
                    9e4),
                (i.timescale = i.sampleRate || 0),
                { videoTrack: o, audioTrack: i, metadataTrack: l }
              );
            },
          },
          {
            key: "fix",
            value: function (e, n, r) {
              return (
                this._fixer.fix(e, n, r),
                {
                  videoTrack: this.videoTrack,
                  audioTrack: this.audioTrack,
                  metadataTrack: this.metadataTrack,
                }
              );
            },
          },
          {
            key: "demuxAndFix",
            value: function (e, n, r, i) {
              return this.demux(e, n, r), this.fix(i, n, r);
            },
          },
          {
            key: "_parseVideoData",
            value: function () {
              if (this._videoPesData.length) {
                var e = t._parsePES(Dp.apply(void 0, pf(this._videoPesData)));
                if (e) {
                  var n = RT.parseAnnexB(e.data);
                  n
                    ? this._createVideoSample(n, e.pts, e.dts)
                    : Mg.warn("Cannot parse avc units", e),
                    (this._videoPesData = []);
                } else Mg.warn("Cannot parse video pes", this._videoPesData);
              }
            },
          },
          {
            key: "_createVideoSample",
            value: function (e, n, r) {
              var i = this;
              if (e.length) {
                var o = this.videoTrack,
                  l = o.codecType === KT.HEVC,
                  u = new Gne(n, r);
                e.forEach(function (c) {
                  var d = l ? (c[0] >>> 1) & 63 : 31 & c[0];
                  switch (d) {
                    case 5:
                    case 16:
                    case 17:
                    case 18:
                    case 19:
                    case 20:
                    case 21:
                    case 22:
                    case 23:
                      if ((!l && d !== 5) || (l && d === 5)) break;
                      u.setToKeyframe(), i._gopId++;
                      break;
                    case 6:
                    case 39:
                    case 40:
                      if ((!l && d !== 6) || (l && d === 6)) break;
                      return void i.metadataTrack.seiSamples.push(
                        new kPn(RT.parseSEI(RT.removeEPB(c), l), n)
                      );
                    case 32:
                      if (!l) break;
                      if (!o.vps.length) {
                        var h = dRe.parseVPS(RT.removeEPB(c), o.hvcC);
                        (o.hvcC = o.hvcC || h), (o.vps = [c]);
                      }
                      break;
                    case 7:
                    case 33:
                      if ((!l && d !== 7) || (l && d === 7)) break;
                      if (!o.sps.length) {
                        var f = RT.removeEPB(c),
                          p = l ? dRe.parseSPS(f, o.hvcC) : $Pn.parseSPS(f);
                        (o.sps = [c]),
                          (o.hvcC = o.hvcC || p.hvcC),
                          (o.codec = p.codec),
                          (o.width = p.width),
                          (o.height = p.height),
                          (o.sarRatio = p.sarRatio),
                          (o.fpsNum = p.fpsNum),
                          (o.fpsDen = p.fpsDen);
                      }
                      break;
                    case 8:
                    case 34:
                      if ((!l && d !== 8) || (l && d === 8)) break;
                      o.pps.length || (o.pps = [c]);
                      break;
                    case 9:
                    case 35:
                      break;
                    case 38:
                      if (l) {
                        for (var g = !1, y = 2; y < c.byteLength; y++)
                          if (c[y] === 255) {
                            g = !0;
                            break;
                          }
                        if (!g) return;
                      }
                  }
                  u.units.push(c);
                }),
                  (u.gopId = this._gopId),
                  this._pushVideoSample(o, u);
              }
            },
          },
          {
            key: "_pushVideoSample",
            value: function (e, n) {
              if (n.units.length)
                if (n.pts === null || n.pts === void 0) {
                  Mg.warn("Video sample no pts", n);
                  var r = e.samples[e.samples.length - 1];
                  r
                    ? ((n.pts = r.pts), (n.dts = r.dts))
                    : Mg.warn("Drop video sample", n);
                } else e.samples.push(n);
            },
          },
          {
            key: "_parseAudioData",
            value: function () {
              if (this._audioPesData.length) {
                var e = t._parsePES(Dp.apply(void 0, pf(this._audioPesData)));
                if (e) {
                  switch (this.audioTrack.codecType) {
                    case Op.AAC:
                      this._parseAacData(e);
                      break;
                    case Op.MP3:
                      this._parseMPEG(e);
                  }
                  this._audioPesData = [];
                } else Mg.warn("Cannot parse audio pes", this._audioPesData);
              }
            },
          },
          {
            key: "_parseAacData",
            value: function (e) {
              var n = this.audioTrack,
                r = e.pts;
              if (r == null) {
                if (
                  (Mg.warn("AAC pes not pts", n),
                  !n.samples.length || !n.sampleRate)
                )
                  return;
                r =
                  n.samples[n.samples.length - 1].pts +
                  U1.getFrameDuration(n.sampleRate);
              }
              var i,
                o = U1.parseADTS(e.data, r);
              o
                ? ((n.codec = o.codec),
                  (n.channelCount = o.channelCount),
                  (n.sampleRate = o.sampleRate),
                  (n.objectType = o.objectType),
                  (n.sampleRateIndex = o.samplingFrequencyIndex),
                  (n.config = o.config),
                  (i = n.samples).push.apply(
                    i,
                    pf(
                      o.frames.map(function (l) {
                        return new C$(l.pts, l.data);
                      })
                    )
                  ),
                  o.skip && Mg.warn("Skip aac adts ".concat(o.skip, " bits")),
                  o.remaining &&
                    Mg.warn("Remaining aac adts ".concat(o.remaining, " bits")))
                : Mg.warn("Cannot parse aac adts", e);
            },
          },
          {
            key: "_parseMPEG",
            value: function (e) {
              var n = e.data,
                r = n.length,
                i = 0,
                o = 0,
                l = e.pts;
              if (l !== void 0)
                for (; o < r; )
                  if (fRe.isHeader(n, o)) {
                    var u = fRe.appendFrame(this.audioTrack, n, o, l, i);
                    if (!u) break;
                    (o += u.length), i++;
                  } else o++;
              else Mg.warn("[tsdemuxer]: MPEG PES unknown PTS");
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (e) {
              return (
                !!e.length && e[0] === 71 && e[188] === 71 && e[376] === 71
              );
            },
          },
          {
            key: "_parsePES",
            value: function (e) {
              var n = e[8];
              if (
                !(n == null || e.length < n + 9) &&
                ((e[0] << 16) | (e[1] << 8) | e[2]) === 1
              ) {
                var r = (e[4] << 8) + e[5];
                if (!(r && r > e.length - 6)) {
                  var i,
                    o,
                    l = e[7];
                  return (
                    192 & l &&
                      ((i =
                        536870912 * (14 & e[9]) +
                        4194304 * (255 & e[10]) +
                        16384 * (254 & e[11]) +
                        128 * (255 & e[12]) +
                        (254 & e[13]) / 2),
                      64 & l
                        ? i -
                            (o =
                              536870912 * (14 & e[14]) +
                              4194304 * (255 & e[15]) +
                              16384 * (254 & e[16]) +
                              128 * (255 & e[17]) +
                              (254 & e[18]) / 2) >
                            54e5 && (i = o)
                        : (o = i)),
                    { data: e.subarray(9 + n), pts: i, dts: o }
                  );
                }
              }
            },
          },
        ]
      ),
      t
    );
  })(),
  zW = (function () {
    function t(e, n, r) {
      zl(this, t),
        (this.dv = new DataView(e)),
        (this.start = this.offset = n || this.dv.byteOffset),
        (this.end = r ? this.start + r : this.start + this.dv.byteLength);
    }
    return (
      jl(
        t,
        [
          {
            key: "buffer",
            get: function () {
              return this.dv.buffer;
            },
          },
          {
            key: "unreadLength",
            get: function () {
              return Math.max(this.end - this.offset, 0);
            },
          },
          {
            key: "size",
            get: function () {
              return this.end - this.start;
            },
          },
          {
            key: "readFloat",
            value: function (e) {
              var n = 0;
              switch (e) {
                case 4:
                  n = this.dv.getFloat32(this.offset);
                  break;
                case 8:
                  n = this.dv.getFloat64(this.offset);
                  break;
                default:
                  throw new Error(
                    "read ".concat(e, "-byte float is not supported")
                  );
              }
              return (this.offset += e), n;
            },
          },
          {
            key: "back",
            value: function (e) {
              this.offset -= e;
            },
          },
          {
            key: "skip",
            value: function (e) {
              this.offset += e;
            },
          },
          {
            key: "readInt",
            value: function (e) {
              var n = this.offset;
              switch (((this.offset += e), e)) {
                case 1:
                  return this.dv.getInt8(n);
                case 2:
                  return this.dv.getInt16(n);
                case 4:
                  return this.dv.getInt32(n);
                default:
                  throw new Error(
                    "read ".concat(e, "-byte integers is not supported")
                  );
              }
            },
          },
          {
            key: "read",
            value: function (e) {
              var n = this.offset;
              switch (((this.offset += e), e)) {
                case 1:
                  return this.dv.getUint8(n);
                case 2:
                  return this.dv.getUint16(n);
                case 3:
                  return (this.dv.getUint16(n) << 8) + this.dv.getUint8(n + 2);
                case 4:
                  return this.dv.getUint32(n);
                default:
                  return (
                    this.back(e - 4),
                    this.read(e - 4) +
                      this.dv.getUint32(n) * Math.pow(256, e - 4)
                  );
              }
            },
          },
          {
            key: "write",
            value: function (e, n) {
              var r = this.offset;
              switch (((this.offset += e), e)) {
                case 1:
                  return this.dv.setUint8(r, n);
                case 2:
                  return this.dv.setUint16(r, n);
                case 3:
                  return (
                    this.dv.setUint8(r, n >>> 16),
                    this.dv.setUint16(r + 1, 65535 & n)
                  );
                case 4:
                  return this.dv.setUint32(r, n);
                default:
                  throw new Error(
                    "write ".concat(e, "-byte integers is not supported")
                  );
              }
            },
          },
          {
            key: "readToBuffer",
            value: function (e) {
              var n;
              return (
                (n =
                  this.offset || e
                    ? this.dv.buffer.slice(
                        this.offset,
                        e ? this.offset + e : this.end
                      )
                    : this.dv.buffer),
                (this.offset += n.byteLength),
                n
              );
            },
          },
          {
            key: "readToUint8",
            value: function (e) {
              var n = new Uint8Array(
                this.dv.buffer,
                this.offset,
                e || this.unreadLength
              );
              return (this.offset += n.byteLength), n;
            },
          },
          {
            key: "readString",
            value: function (e) {
              for (var n = 0, r = ""; n < e; n++)
                (r += String.fromCharCode(this.dv.getUint8(this.offset))),
                  this.offset++;
              return r;
            },
          },
        ],
        [
          {
            key: "fromUint8",
            value: function (e) {
              return new t(e.buffer, e.byteOffset, e.byteLength);
            },
          },
          {
            key: "concatUint8s",
            value: function (e) {
              var n = new Uint8Array(
                  e.reduce(function (i, o) {
                    return i + o.byteLength;
                  }, 0)
                ),
                r = 0;
              return (
                e.forEach(function (i) {
                  n.set(i, r), (r += i.byteLength);
                }),
                n
              );
            },
          },
          {
            key: "concatUint8",
            value: function () {
              for (
                var e = arguments.length, n = new Array(e), r = 0;
                r < e;
                r++
              )
                n[r] = arguments[r];
              return this.concatUint8s(n);
            },
          },
        ]
      ),
      t
    );
  })(),
  HPn = (function () {
    function t(e, n) {
      zl(this, t), (this.offset = 0), (this.val = e), (this.size = n);
    }
    return (
      jl(
        t,
        [
          {
            key: "skip",
            value: function (e) {
              this.offset += e;
            },
          },
          {
            key: "read",
            value: function (e) {
              var n = this.size - this.offset - e;
              if (n >= 0) {
                var r = 0,
                  i = 0;
                if (((this.offset += e), this.size > 31)) {
                  for (; i < e; i++) r += Math.pow(2, i);
                  return (this.val / Math.pow(2, n)) & r;
                }
                for (; i < e; i++) r += 1 << i;
                return (this.val >>> n) & r;
              }
              throw new Error(
                "the number of the read operation exceeds the total length limit of bits"
              );
            },
          },
        ],
        [
          {
            key: "fromByte",
            value: function (e, n) {
              return new t(e.read(n), n << 3);
            },
          },
        ]
      ),
      t
    );
  })(),
  ll = (function () {
    function t() {
      zl(this, t);
    }
    return (
      jl(t, null, [
        {
          key: "findBox",
          value: function (e, n) {
            var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0,
              i = [];
            if (!e) return i;
            for (var o = 0, l = "", u = 0; e.length > 7; ) {
              if (
                ((o = Ti(e)),
                (l = String.fromCharCode.apply(null, e.subarray(4, 8))),
                (u = 8),
                o === 1 ? ((o = $2(e, 8)), (u += 8)) : o || (o = e.length),
                !n[0] || l === n[0])
              ) {
                var c = e.subarray(0, o);
                if (!(n.length < 2))
                  return t.findBox(c.subarray(u), n.slice(1), r + u);
                i.push({ start: r, size: o, headerSize: u, type: l, data: c });
              }
              (r += o), (e = e.subarray(o));
            }
            return i;
          },
        },
        {
          key: "tfhd",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              n.trackId = Ti(r);
              var i = 4,
                o = 1 & n.flags,
                l = 2 & n.flags,
                u = 8 & n.flags,
                c = 16 & n.flags,
                d = 32 & n.flags;
              o && ((i += 4), (n.baseDataOffset = Ti(r, i)), (i += 4)),
                l && ((n.sampleDescriptionIndex = Ti(r, i)), (i += 4)),
                u && ((n.defaultSampleDuration = Ti(r, i)), (i += 4)),
                c && ((n.defaultSampleSize = Ti(r, i)), (i += 4)),
                d && (n.defaultSampleFlags = Ti(r, i));
            });
          },
        },
        {
          key: "sidx",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              var i = 0;
              (n.reference_ID = Ti(r, i)),
                (i += 4),
                (n.timescale = Ti(r, i)),
                (i += 4),
                n.version === 0
                  ? ((n.earliest_presentation_time = Ti(r, i)),
                    (i += 4),
                    (n.first_offset = Ti(r, i)),
                    (i += 4))
                  : ((n.earliest_presentation_time = $2(r, i)),
                    (i += 8),
                    (n.first_offset = $2(r, i)),
                    (i += 8)),
                (i += 2),
                (n.references = []);
              var o = ul(r, i);
              i += 2;
              for (var l = 0; l < o; l++) {
                var u = {};
                n.references.push(u);
                var c = Ti(r, i);
                (i += 4),
                  (u.reference_type = (c >> 31) & 1),
                  (u.referenced_size = 2147483647 & c),
                  (u.subsegment_duration = Ti(r, i)),
                  (c = Ti(r, (i += 4))),
                  (i += 4),
                  (u.starts_with_SAP = (c >> 31) & 1),
                  (u.SAP_type = (c >> 28) & 7),
                  (u.SAP_delta_time = 268435455 & c);
              }
            });
          },
        },
        {
          key: "moov",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              (n.mvhd = t.mvhd(t.findBox(r, ["mvhd"], i)[0])),
                (n.trak = t.findBox(r, ["trak"], i).map(function (o) {
                  return t.trak(o);
                })),
                (n.pssh = t.pssh(t.findBox(r, ["pssh"], i)[0]));
            });
          },
        },
        {
          key: "mvhd",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              var i = 0;
              n.version === 1
                ? ((n.timescale = Ti(r, 16)),
                  (n.duration = $2(r, 20)),
                  (i += 28))
                : ((n.timescale = Ti(r, 8)),
                  (n.duration = Ti(r, 12)),
                  (i += 16)),
                (n.nextTrackId = Ti(r, i + 76));
            });
          },
        },
        {
          key: "trak",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              (n.tkhd = t.tkhd(t.findBox(r, ["tkhd"], i)[0])),
                (n.mdia = t.mdia(t.findBox(r, ["mdia"], i)[0]));
            });
          },
        },
        {
          key: "tkhd",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              var i = zW.fromUint8(r);
              n.version === 1
                ? (i.read(8),
                  i.read(8),
                  (n.trackId = i.read(4)),
                  i.read(4),
                  (n.duration = i.read(8)))
                : (i.read(4),
                  i.read(4),
                  (n.trackId = i.read(4)),
                  i.read(4),
                  (n.duration = i.read(4))),
                i.skip(16),
                (n.matrix = []);
              for (var o = 0; o < 36; o++) n.matrix.push(i.read(1));
              i.back(36);
              for (var l, u = [], c = 0; c < 3; c++)
                u.push(HW(i.readInt(2), i.readInt(2))),
                  u.push(HW(i.readInt(2), i.readInt(2))),
                  (l = i.readInt(4)),
                  u.push(HW(l >> 30, 1073741823 & l));
              (n.rotation = CPn(u)),
                (n.width = i.read(4)),
                (n.height = i.read(4));
            });
          },
        },
        {
          key: "mdia",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              (n.mdhd = t.mdhd(t.findBox(r, ["mdhd"], i)[0])),
                (n.hdlr = t.hdlr(t.findBox(r, ["hdlr"], i)[0])),
                (n.minf = t.minf(t.findBox(r, ["minf"], i)[0]));
            });
          },
        },
        {
          key: "mdhd",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              var i = 0;
              n.version === 1
                ? ((n.timescale = Ti(r, 16)),
                  (n.duration = $2(r, 20)),
                  (i += 28))
                : ((n.timescale = Ti(r, 8)),
                  (n.duration = Ti(r, 12)),
                  (i += 16));
              var o = ul(r, i);
              n.language = String.fromCharCode(
                96 + ((o >> 10) & 31),
                96 + ((o >> 5) & 31),
                96 + (31 & o)
              );
            });
          },
        },
        {
          key: "hdlr",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              n.version === 0 &&
                (n.handlerType = String.fromCharCode.apply(
                  null,
                  r.subarray(4, 8)
                ));
            });
          },
        },
        {
          key: "minf",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              (n.vmhd = t.vmhd(t.findBox(r, ["vmhd"], i)[0])),
                (n.smhd = t.smhd(t.findBox(r, ["smhd"], i)[0])),
                (n.stbl = t.stbl(t.findBox(r, ["stbl"], i)[0]));
            });
          },
        },
        {
          key: "vmhd",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              (n.graphicsmode = ul(r)),
                (n.opcolor = [ul(r, 2), ul(r, 4), ul(r, 6)]);
            });
          },
        },
        {
          key: "smhd",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              n.balance = ul(r);
            });
          },
        },
        {
          key: "stbl",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              var o, l, u;
              (n.stsd = t.stsd(t.findBox(r, ["stsd"], i)[0])),
                (n.stts = t.stts(t.findBox(r, ["stts"], i)[0])),
                (n.ctts = t.ctts(t.findBox(r, ["ctts"], i)[0])),
                (n.stsc = t.stsc(t.findBox(r, ["stsc"], i)[0])),
                (n.stsz = t.stsz(t.findBox(r, ["stsz"], i)[0])),
                (n.stco = t.stco(t.findBox(r, ["stco"], i)[0])),
                n.stco ||
                  ((n.co64 = t.co64(t.findBox(r, ["co64"], i)[0])),
                  (n.stco = n.co64));
              var c =
                (o = n.stsd.entries[0]) === null ||
                o === void 0 ||
                (l = o.sinf) === null ||
                l === void 0 ||
                (u = l.schi) === null ||
                u === void 0
                  ? void 0
                  : u.tenc.default_IV_size;
              (n.stss = t.stss(t.findBox(r, ["stss"], i)[0])),
                (n.senc = t.senc(t.findBox(r, ["senc"], i)[0], c));
            });
          },
        },
        {
          key: "senc",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 8;
            return Za(e, !0, function (r, i) {
              var o = 0,
                l = Ti(i, o);
              (o += 4), (r.samples = []);
              for (var u = 0; u < l; u++) {
                for (var c = { InitializationVector: [] }, d = 0; d < n; d++)
                  c.InitializationVector[d] = i[o + d];
                if (((o += n), 2 & r.flags)) {
                  c.subsamples = [];
                  var h = ul(i, o);
                  o += 2;
                  for (var f = 0; f < h; f++) {
                    var p = {};
                    (p.BytesOfClearData = ul(i, o)),
                      (o += 2),
                      (p.BytesOfProtectedData = Ti(i, o)),
                      (o += 4),
                      c.subsamples.push(p);
                  }
                }
                r.samples.push(c);
              }
            });
          },
        },
        {
          key: "pssh",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              for (var i = [], o = [], l = 0, u = 0; u < 16; u++)
                o.push(WW(r[l + u]));
              if (((l += 16), n.version > 0)) {
                var c = Ti(r, l);
                l += 4;
                for (var d = 0; d < ("" + c).length; d++)
                  for (var h = 0; h < 16; h++) {
                    var f = r[l];
                    (l += 1), i.push(WW(f));
                  }
              }
              var p = Ti(r, l);
              (n.data_size = p),
                (l += 4),
                (n.kid = i),
                (n.system_id = o),
                (n.buffer = r);
            });
          },
        },
        {
          key: "stsd",
          value: function (e) {
            return Za(e, !0, function (n, r, i) {
              (n.entryCount = Ti(r)),
                (n.entries = t
                  .findBox(r.subarray(4), [], i + 4)
                  .map(function (o) {
                    switch (o.type) {
                      case "av01":
                        return t.av01(o);
                      case "avc1":
                      case "avc2":
                      case "avc3":
                      case "avc4":
                        return t.avc1(o);
                      case "hvc1":
                      case "hev1":
                        return t.hvc1(o);
                      case "mp4a":
                        return t.mp4a(o);
                      case "alaw":
                      case "ulaw":
                        return t.alaw(o);
                      case "enca":
                        return Za(o, !1, function (l, u, c) {
                          (l.channelCount = ul(u, 16)),
                            (l.samplesize = ul(u, 18)),
                            (l.sampleRate = Ti(u, 24) / 65536),
                            (u = u.subarray(28)),
                            (l.sinf = t.sinf(t.findBox(u, ["sinf"], c)[0])),
                            (l.esds = t.esds(t.findBox(u, ["esds"], c)[0]));
                        });
                      case "encv":
                        return Za(o, !1, function (l, u, c) {
                          (l.width = ul(u, 24)),
                            (l.height = ul(u, 26)),
                            (l.horizresolution = Ti(u, 28)),
                            (l.vertresolution = Ti(u, 32)),
                            (u = u.subarray(78)),
                            (l.sinf = t.sinf(t.findBox(u, ["sinf"], c)[0])),
                            (l.avcC = t.avcC(t.findBox(u, ["avcC"], c)[0])),
                            (l.hvcC = t.hvcC(t.findBox(u, ["hvcC"], c)[0])),
                            (l.pasp = t.pasp(t.findBox(u, ["pasp"], c)[0]));
                        });
                    }
                  })
                  .filter(Boolean));
            });
          },
        },
        {
          key: "tenc",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              var i = 6;
              (n.default_IsEncrypted = r[i]),
                (i += 1),
                (n.default_IV_size = r[i]),
                (i += 1),
                (n.default_KID = []);
              for (var o = 0; o < 16; o++)
                n.default_KID.push(WW(r[i])), (i += 1);
            });
          },
        },
        {
          key: "schi",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              n.tenc = t.tenc(t.findBox(r, ["tenc"], i)[0]);
            });
          },
        },
        {
          key: "sinf",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              (n.schi = t.schi(t.findBox(r, ["schi"], i)[0])),
                (n.frma = t.frma(t.findBox(r, ["frma"], i)[0]));
            });
          },
        },
        {
          key: "frma",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              n.data_format = "";
              for (var i = 0; i < 4; i++)
                n.data_format += String.fromCharCode(r[i]);
            });
          },
        },
        {
          key: "colr",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              var i = zW.fromUint8(r);
              (n.data = e.data),
                (n.colorType = i.readString(4)),
                n.colorType === "nclx"
                  ? ((n.colorPrimaries = i.read(2)),
                    (n.transferCharacteristics = i.read(2)),
                    (n.matrixCoefficients = i.read(2)),
                    (n.fullRangeFlag = i.read(1) >> 7))
                  : (n.colorType !== "rICC" && n.colorType !== "prof") ||
                    (n.iccProfile = r.readToUint8());
            });
          },
        },
        {
          key: "av01",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              var o = jW(n, r),
                l = r.subarray(o);
              (i += o),
                (n.av1C = t.av1C(t.findBox(l, ["av1C"], i)[0])),
                (n.colr = t.colr(t.findBox(l, ["colr"], i)[0]));
            });
          },
        },
        {
          key: "av1C",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              n.data = e.data;
              var i,
                o = zW.fromUint8(r),
                l = HPn.fromByte(o, 4);
              (n.marker = l.read(1)),
                (n.version = l.read(7)),
                (n.seqProfile = l.read(3)),
                (n.seqLevelIdx0 = l.read(5)),
                (n.seqTier0 = l.read(1)),
                (n.highBitdepth = l.read(1)),
                (n.twelveBit = l.read(1)),
                (n.monochrome = l.read(1)),
                (n.chromaSubsamplingX = l.read(1)),
                (n.chromaSubsamplingY = l.read(1)),
                (n.chromaSamplePosition = l.read(2)),
                (n.reserved = l.read(3)),
                (n.initialPresentationDelayPresent = l.read(1)),
                n.initialPresentationDelayPresent
                  ? (n.initialPresentationDelayMinusOne = l.read(4))
                  : (n.initialPresentationDelayMinusOne = 0),
                (n.configOBUs = o.readToUint8()),
                n.seqLevelIdx0 === 2 && n.highBitdepth === 1
                  ? (i = n.twelveBit === 1 ? "12" : "10")
                  : n.seqProfile <= 2 &&
                    (i = n.highBitdepth === 1 ? "10" : "08"),
                (n.codec = [
                  "av01",
                  n.seqProfile,
                  (n.seqLevelIdx0 < 10
                    ? "0" + n.seqLevelIdx0
                    : n.seqLevelIdx0) + (n.seqTier0 ? "H" : "M"),
                  i,
                ].join("."));
            });
          },
        },
        {
          key: "avc1",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              var o = jW(n, r),
                l = r.subarray(o);
              (i += o),
                (n.avcC = t.avcC(t.findBox(l, ["avcC"], i)[0])),
                (n.pasp = t.pasp(t.findBox(l, ["pasp"], i)[0]));
            });
          },
        },
        {
          key: "avcC",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              (n.data = e.data),
                (n.configurationVersion = r[0]),
                (n.AVCProfileIndication = r[1]),
                (n.profileCompatibility = r[2]),
                (n.AVCLevelIndication = r[3]),
                (n.codec = qze([r[1], r[2], r[3]])),
                (n.lengthSizeMinusOne = 3 & r[4]),
                (n.spsLength = 31 & r[5]),
                (n.sps = []);
              for (var i = 6, o = 0; o < n.spsLength; o++) {
                var l = ul(r, i);
                (i += 2), n.sps.push(r.subarray(i, i + l)), (i += l);
              }
              (n.ppsLength = r[i]), (i += 1), (n.pps = []);
              for (var u = 0; u < n.ppsLength; u++) {
                var c = ul(r, i);
                (i += 2), n.pps.push(r.subarray(i, (i += c))), (i += c);
              }
            });
          },
        },
        {
          key: "hvc1",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              var o = jW(n, r),
                l = r.subarray(o);
              (i += o),
                (n.hvcC = t.hvcC(t.findBox(l, ["hvcC"], i)[0])),
                (n.pasp = t.pasp(t.findBox(l, ["pasp"], i)[0]));
            });
          },
        },
        {
          key: "hvcC",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              (n.data = e.data),
                (n.codec = "hev1.1.6.L93.B0"),
                (n.configurationVersion = r[0]);
              var i = r[1];
              (n.generalProfileSpace = i >> 6),
                (n.generalTierFlag = (32 & i) >> 5),
                (n.generalProfileIdc = 31 & i),
                (n.generalProfileCompatibility = Ti(r, 2)),
                (n.generalConstraintIndicatorFlags = r.subarray(6, 12)),
                (n.generalLevelIdc = r[12]),
                (n.avgFrameRate = ul(r, 19)),
                (n.numOfArrays = r[22]),
                (n.vps = []),
                (n.sps = []),
                (n.pps = []);
              for (
                var o = 23, l = 0, u = 0, c = 0, d = 0;
                d < n.numOfArrays;
                d++
              ) {
                (l = 63 & r[o]), (u = ul(r, o + 1)), (o += 3);
                for (var h, f = [], p = 0; p < u; p++)
                  (c = ul(r, o)),
                    (o += 2),
                    f.push(r.subarray(o, o + c)),
                    (o += c);
                if (l === 32) (h = n.vps).push.apply(h, f);
                else if (l === 33) {
                  var g;
                  (g = n.sps).push.apply(g, f);
                } else if (l === 34) {
                  var y;
                  (y = n.pps).push.apply(y, f);
                }
              }
            });
          },
        },
        {
          key: "pasp",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              (n.hSpacing = Ti(r)), (n.vSpacing = Ti(r, 4));
            });
          },
        },
        {
          key: "mp4a",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              var o = gRe(n, r);
              n.esds = t.esds(t.findBox(r.subarray(o), ["esds"], i + o)[0]);
            });
          },
        },
        {
          key: "esds",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              n.codec = "mp4a.";
              for (var i = 0, o = 0, l = 0, u = 0; r.length; ) {
                for (u = r[(i = 0)], o = r[i + 1], i += 2; 128 & o; )
                  (l = (127 & o) << 7), (o = r[i]), (i += 1);
                if (((l += 127 & o), u === 3)) r = r.subarray(i + 3);
                else {
                  if (u !== 4) {
                    if (u === 5) {
                      var c = (n.config = r.subarray(i, i + l)),
                        d = (248 & c[0]) >> 3;
                      return (
                        d === 31 &&
                          c.length >= 2 &&
                          (d = 32 + ((7 & c[0]) << 3) + ((224 & c[1]) >> 5)),
                        (n.objectType = d),
                        (n.codec += d.toString(16)),
                        void (
                          n.codec[n.codec.length - 1] === "." &&
                          (n.codec = n.codec.substring(0, n.codec.length - 1))
                        )
                      );
                    }
                    return void (
                      n.codec[n.codec.length - 1] === "." &&
                      (n.codec = n.codec.substring(0, n.codec.length - 1))
                    );
                  }
                  (n.codec += (r[i].toString(16) + ".").padStart(3, "0")),
                    (r = r.subarray(i + 13));
                }
              }
            });
          },
        },
        {
          key: "alaw",
          value: function (e) {
            return Za(e, !1, function (n, r) {
              gRe(n, r);
            });
          },
        },
        {
          key: "stts",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              for (var i = Ti(r), o = [], l = 4, u = 0; u < i; u++)
                o.push({ count: Ti(r, l), delta: Ti(r, l + 4) }), (l += 8);
              (n.entryCount = i), (n.entries = o);
            });
          },
        },
        {
          key: "ctts",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              var i = Ti(r),
                o = [],
                l = 4;
              if (n.version === 1)
                for (var u = 0; u < i; u++)
                  o.push({ count: Ti(r, l), offset: Ti(r, l + 4) }), (l += 8);
              else
                for (var c = 0; c < i; c++)
                  o.push({ count: Ti(r, l), offset: -(1 + ~Ti(r, l + 4)) }),
                    (l += 8);
              (n.entryCount = i), (n.entries = o);
            });
          },
        },
        {
          key: "stsc",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              for (var i = Ti(r), o = [], l = 4, u = 0; u < i; u++)
                o.push({
                  firstChunk: Ti(r, l),
                  samplesPerChunk: Ti(r, l + 4),
                  sampleDescriptionIndex: Ti(r, l + 8),
                }),
                  (l += 12);
              (n.entryCount = i), (n.entries = o);
            });
          },
        },
        {
          key: "stsz",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              var i = Ti(r),
                o = Ti(r, 4),
                l = [];
              if (!i)
                for (var u = 8, c = 0; c < o; c++) l.push(Ti(r, u)), (u += 4);
              (n.sampleSize = i), (n.sampleCount = o), (n.entrySizes = l);
            });
          },
        },
        {
          key: "stco",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              for (var i = Ti(r), o = [], l = 4, u = 0; u < i; u++)
                o.push(Ti(r, l)), (l += 4);
              (n.entryCount = i), (n.entries = o);
            });
          },
        },
        {
          key: "co64",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              for (var i = Ti(r), o = [], l = 4, u = 0; u < i; u++)
                o.push($2(r, l)), (l += 8);
              (n.entryCount = i), (n.entries = o);
            });
          },
        },
        {
          key: "stss",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              for (var i = Ti(r), o = [], l = 4, u = 0; u < i; u++)
                o.push(Ti(r, l)), (l += 4);
              (n.entryCount = i), (n.entries = o);
            });
          },
        },
        {
          key: "moof",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              (n.mfhd = t.mfhd(t.findBox(r, ["mfhd"], i)[0])),
                (n.traf = t.findBox(r, ["traf"], i).map(function (o) {
                  return t.traf(o);
                }));
            });
          },
        },
        {
          key: "mfhd",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              n.sequenceNumber = Ti(r);
            });
          },
        },
        {
          key: "traf",
          value: function (e) {
            return Za(e, !1, function (n, r, i) {
              (n.tfhd = t.tfhd(t.findBox(r, ["tfhd"], i)[0])),
                (n.tfdt = t.tfdt(t.findBox(r, ["tfdt"], i)[0])),
                (n.trun = t.trun(t.findBox(r, ["trun"], i)[0]));
            });
          },
        },
        {
          key: "trun",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              var i = n.version,
                o = n.flags,
                l = r.length,
                u = (n.sampleCount = Ti(r)),
                c = 4;
              if (
                (l > c &&
                  1 & o &&
                  ((n.dataOffset = -(1 + ~Ti(r, c))), (c += 4)),
                l > c && 4 & o && ((n.firstSampleFlags = Ti(r, c)), (c += 4)),
                (n.samples = []),
                l > c)
              )
                for (var d, h = 0; h < u; h++)
                  (d = {}),
                    256 & o && ((d.duration = Ti(r, c)), (c += 4)),
                    512 & o && ((d.size = Ti(r, c)), (c += 4)),
                    1024 & o && ((d.flags = Ti(r, c)), (c += 4)),
                    2048 & o &&
                      ((d.cts = i ? -(1 + ~Ti(r, c + 4)) : Ti(r, c)), (c += 4)),
                    n.samples.push(d);
            });
          },
        },
        {
          key: "tfdt",
          value: function (e) {
            return Za(e, !0, function (n, r) {
              n.version === 1
                ? (n.baseMediaDecodeTime = $2(r))
                : (n.baseMediaDecodeTime = Ti(r));
            });
          },
        },
        {
          key: "probe",
          value: function (e) {
            return !!t.findBox(e, ["ftyp"]);
          },
        },
        {
          key: "parseSampleFlags",
          value: function (e) {
            return {
              isLeading: (12 & e[0]) >>> 2,
              dependsOn: 3 & e[0],
              isDependedOn: (192 & e[1]) >>> 6,
              hasRedundancy: (48 & e[1]) >>> 4,
              paddingValue: (14 & e[1]) >>> 1,
              isNonSyncSample: 1 & e[1],
              degradationPriority: (e[2] << 8) | e[3],
            };
          },
        },
        {
          key: "moovToTrack",
          value: function (e, n, r) {
            var i,
              o,
              l = e.trak;
            if (l && l.length) {
              var u = l.find(function (B) {
                  var re, Ae;
                  return (
                    ((re = B.mdia) === null ||
                    re === void 0 ||
                    (Ae = re.hdlr) === null ||
                    Ae === void 0
                      ? void 0
                      : Ae.handlerType) === "vide"
                  );
                }),
                c = l.find(function (B) {
                  var re, Ae;
                  return (
                    ((re = B.mdia) === null ||
                    re === void 0 ||
                    (Ae = re.hdlr) === null ||
                    Ae === void 0
                      ? void 0
                      : Ae.handlerType) === "soun"
                  );
                });
              if (u && n) {
                var d,
                  h,
                  f,
                  p,
                  g,
                  y,
                  v,
                  b = n,
                  w =
                    (d = u.tkhd) === null || d === void 0 ? void 0 : d.trackId;
                w != null && (b.id = u.tkhd.trackId),
                  (b.tkhdDuration = u.tkhd.duration),
                  (b.mvhdDurtion = e.mvhd.duration),
                  (b.mvhdTimecale = e.mvhd.timescale),
                  (b.timescale = b.formatTimescale = u.mdia.mdhd.timescale),
                  (b.duration =
                    u.mdia.mdhd.duration ||
                    (b.mvhdDurtion / b.mvhdTimecale) * b.timescale),
                  (b.rotation = u.tkhd.rotation),
                  (b.matrix = u.tkhd.matrix);
                var k,
                  D,
                  $,
                  N,
                  P,
                  I,
                  O,
                  X,
                  G = u.mdia.minf.stbl.stsd.entries[0];
                if (
                  ((b.width = G.width),
                  (b.height = G.height),
                  G.pasp && (b.sarRatio = [G.pasp.hSpacing, G.pasp.vSpacing]),
                  G.av1C)
                )
                  (b.codecType = KT.AV1),
                    (b.codec = G.av1C.codec),
                    (b.av1C = G.av1C.data),
                    (b.colr = G.colr.data);
                else if (G.hvcC)
                  (b.codecType = KT.HEVC),
                    (b.codec = G.hvcC.codec),
                    (b.vps = G.hvcC.vps),
                    (b.sps = G.hvcC.sps),
                    (b.pps = G.hvcC.pps),
                    (b.hvcC = G.hvcC.data);
                else {
                  if (!G.avcC) throw new Error("unknown video stsd entry");
                  (b.codec = G.avcC.codec),
                    (b.sps = G.avcC.sps),
                    (b.pps = G.avcC.pps);
                }
                (b.present = !0),
                  (b.ext = {}),
                  (b.ext.stss =
                    (h = u.mdia) === null ||
                    h === void 0 ||
                    (f = h.minf) === null ||
                    f === void 0 ||
                    (p = f.stbl) === null ||
                    p === void 0
                      ? void 0
                      : p.stss),
                  (b.ext.ctts =
                    (g = u.mdia) === null ||
                    g === void 0 ||
                    (y = g.minf) === null ||
                    y === void 0 ||
                    (v = y.stbl) === null ||
                    v === void 0
                      ? void 0
                      : v.ctts),
                  G &&
                    G.type === "encv" &&
                    ((b.isVideoEncryption = !0),
                    (G.default_KID =
                      (k = G.sinf) === null ||
                      k === void 0 ||
                      (D = k.schi) === null ||
                      D === void 0
                        ? void 0
                        : D.tenc.default_KID),
                    (G.default_IsEncrypted =
                      ($ = G.sinf) === null ||
                      $ === void 0 ||
                      (N = $.schi) === null ||
                      N === void 0
                        ? void 0
                        : N.tenc.default_IsEncrypted),
                    (G.default_IV_size =
                      (P = G.sinf) === null ||
                      P === void 0 ||
                      (I = P.schi) === null ||
                      I === void 0
                        ? void 0
                        : I.tenc.default_IV_size),
                    (b.videoSenc =
                      u.mdia.minf.stbl.senc && u.mdia.minf.stbl.senc.samples),
                    (G.data_format =
                      (O = G.sinf) === null ||
                      O === void 0 ||
                      (X = O.frma) === null ||
                      X === void 0
                        ? void 0
                        : X.data_format),
                    (b.useEME = e.useEME),
                    (b.kidValue = e.kidValue),
                    (b.pssh = e.pssh),
                    (b.encv = G));
              }
              if (c && r) {
                var H,
                  E,
                  S,
                  L,
                  W,
                  F,
                  oe,
                  De,
                  Xe,
                  ze = r,
                  ht =
                    (H = c.tkhd) === null || H === void 0 ? void 0 : H.trackId;
                ht != null && (ze.id = c.tkhd.trackId),
                  (ze.tkhdDuration = c.tkhd.duration),
                  (ze.mvhdDurtion = e.mvhd.duration),
                  (ze.mvhdTimecale = e.mvhd.timescale),
                  (ze.timescale = ze.formatTimescale = c.mdia.mdhd.timescale),
                  (ze.duration =
                    c.mdia.mdhd.duration ||
                    (ze.mvhdDurtion / ze.mvhdTimecale) * ze.timescale);
                var gt,
                  pt,
                  $t,
                  ot,
                  tt,
                  He,
                  de,
                  ue,
                  Z = c.mdia.minf.stbl.stsd.entries[0];
                switch (
                  ((ze.sampleSize = Z.sampleSize),
                  (ze.sampleRate = Z.sampleRate),
                  (ze.channelCount = Z.channelCount),
                  (ze.present = !0),
                  Z.type)
                ) {
                  case "alaw":
                    (ze.codecType = ze.codec = Op.G711PCMA),
                      (ze.sampleRate = 8e3);
                    break;
                  case "ulaw":
                    (ze.codecType = ze.codec = Op.G711PCMU),
                      (ze.sampleRate = 8e3);
                    break;
                  default:
                    (ze.sampleDuration = U1.getFrameDuration(
                      ze.sampleRate,
                      ze.timescale
                    )),
                      (ze.sampleRateIndex = U1.getRateIndexByRate(
                        ze.sampleRate
                      )),
                      (ze.objectType =
                        ((i = Z.esds) === null || i === void 0
                          ? void 0
                          : i.objectType) || 2),
                      Z.esds && (ze.config = Array.from(Z.esds.config)),
                      (ze.codec =
                        ((o = Z.esds) === null || o === void 0
                          ? void 0
                          : o.codec) || "mp4a.40.2");
                }
                (ze.sampleDuration = U1.getFrameDuration(
                  ze.sampleRate,
                  ze.timescale
                )),
                  (ze.objectType =
                    ((E = Z.esds) === null || E === void 0
                      ? void 0
                      : E.objectType) || 2),
                  Z.esds &&
                    (Z.esds.config
                      ? (ze.config = Array.from(Z.esds.config))
                      : console.warn("esds config is null")),
                  (ze.codec =
                    ((S = Z.esds) === null || S === void 0
                      ? void 0
                      : S.codec) || "mp4a.40.2"),
                  (ze.sampleRateIndex = U1.getRateIndexByRate(ze.sampleRate)),
                  (ze.ext = {}),
                  (ze.ext.stss =
                    (L = c.mdia) === null ||
                    L === void 0 ||
                    (W = L.minf) === null ||
                    W === void 0 ||
                    (F = W.stbl) === null ||
                    F === void 0
                      ? void 0
                      : F.stss),
                  (ze.ext.ctts =
                    (oe = c.mdia) === null ||
                    oe === void 0 ||
                    (De = oe.minf) === null ||
                    De === void 0 ||
                    (Xe = De.stbl) === null ||
                    Xe === void 0
                      ? void 0
                      : Xe.ctts),
                  (ze.present = !0),
                  Z &&
                    Z.type === "enca" &&
                    ((ze.isAudioEncryption = !0),
                    (Z.data_format =
                      (gt = Z.sinf) === null ||
                      gt === void 0 ||
                      (pt = gt.frma) === null ||
                      pt === void 0
                        ? void 0
                        : pt.data_format),
                    (Z.default_KID =
                      ($t = Z.sinf) === null ||
                      $t === void 0 ||
                      (ot = $t.schi) === null ||
                      ot === void 0
                        ? void 0
                        : ot.tenc.default_KID),
                    (Z.default_IsEncrypted =
                      (tt = Z.sinf) === null ||
                      tt === void 0 ||
                      (He = tt.schi) === null ||
                      He === void 0
                        ? void 0
                        : He.tenc.default_IsEncrypted),
                    (Z.default_IV_size =
                      (de = Z.sinf) === null ||
                      de === void 0 ||
                      (ue = de.schi) === null ||
                      ue === void 0
                        ? void 0
                        : ue.tenc.default_IV_size),
                    (ze.audioSenc =
                      c.mdia.minf.stbl.senc && c.mdia.minf.stbl.senc.samples),
                    (ze.useEME = e.useEME),
                    (ze.kidValue = e.kidValue),
                    (ze.enca = Z));
              }
              if (
                (r && (r.isVideoEncryption = !!n && n.isVideoEncryption),
                n && (n.isAudioEncryption = !!r && r.isAudioEncryption),
                (n != null && n.encv) || (r != null && r.enca))
              ) {
                var ie,
                  Ne,
                  Pe =
                    n == null || (ie = n.encv) === null || ie === void 0
                      ? void 0
                      : ie.default_KID,
                  kt =
                    r == null || (Ne = r.enca) === null || Ne === void 0
                      ? void 0
                      : Ne.default_KID,
                  Gt = Pe || kt ? (Pe || kt).join("") : null;
                n && (n.kid = Gt), r && (r.kid = Gt);
              }
              return (
                n && (n.flags = 3841),
                r && (r.flags = 1793),
                { videoTrack: n, audioTrack: r }
              );
            }
          },
        },
        {
          key: "evaluateDefaultDuration",
          value: function (e, n, r) {
            var i,
              o =
                n == null || (i = n.samples) === null || i === void 0
                  ? void 0
                  : i.length;
            return o ? (((1024 * o) / n.timescale) * e.timescale) / r : 1024;
          },
        },
        {
          key: "moofToSamples",
          value: function (e, n, r) {
            var i = {};
            return (
              e.mfhd &&
                (n && (n.sequenceNumber = e.mfhd.sequenceNumber),
                r && (r.sequenceNumber = e.mfhd.sequenceNumber)),
              e.traf.forEach(function (o) {
                var l = o.tfhd,
                  u = o.tfdt,
                  c = o.trun;
                if (l && c) {
                  u &&
                    (n &&
                      n.id === l.trackId &&
                      (n.baseMediaDecodeTime = u.baseMediaDecodeTime),
                    r &&
                      r.id === l.trackId &&
                      (r.baseMediaDecodeTime = u.baseMediaDecodeTime));
                  var d = l.defaultSampleSize || 0,
                    h =
                      l.defaultSampleDuration ||
                      t.evaluateDefaultDuration(
                        n,
                        r,
                        c.samples.length || c.sampleCount
                      ),
                    f = c.dataOffset || 0,
                    p = 0,
                    g = -1;
                  if (!c.samples.length && c.sampleCount) {
                    i[l.trackId] = [];
                    for (var y = 0; y < c.sampleCount; y++)
                      i[l.trackId].push({
                        offset: f,
                        dts: p,
                        duration: h,
                        size: d,
                      }),
                        (p += h),
                        (f += d);
                  } else
                    i[l.trackId] = c.samples.map(function (v, b) {
                      return (
                        (v = {
                          offset: f,
                          dts: p,
                          pts: p + (v.cts || 0),
                          duration: v.duration || h,
                          size: v.size || d,
                          gopId: g,
                          keyframe:
                            b === 0 ||
                            (v.flags !== null &&
                              v.flags !== void 0 &&
                              (65536 & v.flags) >>> 0 != 65536),
                        }).keyframe && (g++, (v.gopId = g)),
                        (p += v.duration),
                        (f += v.size),
                        v
                      );
                    });
                }
              }),
              i
            );
          },
        },
        {
          key: "moovToSamples",
          value: function (e) {
            var n = e.trak;
            if (n && n.length) {
              var r = n.find(function (X) {
                  var G, H;
                  return (
                    ((G = X.mdia) === null ||
                    G === void 0 ||
                    (H = G.hdlr) === null ||
                    H === void 0
                      ? void 0
                      : H.handlerType) === "vide"
                  );
                }),
                i = n.find(function (X) {
                  var G, H;
                  return (
                    ((G = X.mdia) === null ||
                    G === void 0 ||
                    (H = G.hdlr) === null ||
                    H === void 0
                      ? void 0
                      : H.handlerType) === "soun"
                  );
                });
              if (r || i) {
                var o, l;
                if (r) {
                  var u,
                    c,
                    d =
                      (u = r.mdia) === null ||
                      u === void 0 ||
                      (c = u.minf) === null ||
                      c === void 0
                        ? void 0
                        : c.stbl;
                  if (!d) return;
                  var h = d.stts,
                    f = d.stsc,
                    p = d.stsz,
                    g = d.stco,
                    y = d.stss,
                    v = d.ctts;
                  if (!(h && f && p && g && y)) return;
                  o = pRe(h, f, p, g, v, y);
                }
                if (i) {
                  var b,
                    w,
                    k,
                    D =
                      (b = i.mdia) === null ||
                      b === void 0 ||
                      (w = b.minf) === null ||
                      w === void 0
                        ? void 0
                        : w.stbl;
                  if (!D) return;
                  var $ =
                      (k = i.mdia.mdhd) === null || k === void 0
                        ? void 0
                        : k.timescale,
                    N = D.stts,
                    P = D.stsc,
                    I = D.stsz,
                    O = D.stco;
                  if (!($ && N && P && I && O)) return;
                  l = pRe(N, P, I, O);
                }
                return { videoSamples: o, audioSamples: l };
              }
            }
          },
        },
      ]),
      t
    );
  })();
function pRe(t, e, n, r, i, o) {
  var l,
    u,
    c,
    d = [],
    h = i == null ? void 0 : i.entries,
    f = e.entries,
    p = r.entries,
    g = n.entrySizes,
    y = o == null ? void 0 : o.entries;
  y &&
    ((l = {}),
    y.forEach(function (I) {
      l[I - 1] = !0;
    })),
    h &&
      ((u = []),
      h.forEach(function (I) {
        for (var O = I.count, X = I.offset, G = 0; G < O; G++) u.push(X);
      }));
  var v = -1,
    b = 0,
    w = 0,
    k = 0,
    D = 0,
    $ = 0,
    N = f[0].samplesPerChunk,
    P = f[1] ? f[1].firstChunk - 1 : 1 / 0;
  return (
    t.entries.forEach(function (I) {
      for (var O = I.count, X = I.delta, G = 0; G < O; G++)
        (c = {
          dts: b,
          duration: X,
          size: g[w] || n.sampleSize,
          offset: p[k] + $,
          index: w,
        }),
          y && ((c.keyframe = l[w]), c.keyframe && v++, (c.gopId = v)),
          u && w < u.length && (c.pts = c.dts + u[w]),
          d.push(c),
          (b += X),
          ++w < N
            ? ($ += c.size)
            : (k++,
              ($ = 0),
              k >= P && (D++, (P = f[D + 1] ? f[D + 1].firstChunk - 1 : 1 / 0)),
              (N += f[D].samplesPerChunk));
    }),
    d
  );
}
function jW(t, e) {
  return (
    (t.dataReferenceIndex = ul(e, 6)),
    (t.width = ul(e, 24)),
    (t.height = ul(e, 26)),
    (t.horizresolution = Ti(e, 28)),
    (t.vertresolution = Ti(e, 32)),
    (t.frameCount = ul(e, 40)),
    (t.depth = ul(e, 74)),
    78
  );
}
function gRe(t, e) {
  return (
    (t.dataReferenceIndex = ul(e, 6)),
    (t.channelCount = ul(e, 16)),
    (t.sampleSize = ul(e, 18)),
    (t.sampleRate = Ti(e, 24) / 65536),
    28
  );
}
function Za(t, e, n) {
  if (t) {
    if (t.size !== t.data.length)
      throw new Error("box ".concat(t.type, " size !== data.length"));
    var r = {
      start: t.start,
      size: t.size,
      headerSize: t.headerSize,
      type: t.type,
    };
    return (
      e &&
        ((r.version = t.data[t.headerSize]),
        (r.flags = MPn(t.data, t.headerSize + 1)),
        (r.headerSize += 4)),
      n(r, t.data.subarray(r.headerSize), r.start + r.headerSize),
      r
    );
  }
}
var XPn = function (t, e, n) {
    for (
      var r = String(n),
        i = e >> 0,
        o = Math.ceil(i / r.length),
        l = [],
        u = String(t);
      o--;

    )
      l.push(r);
    return l.join("").substring(0, i - u.length) + u;
  },
  WW = function () {
    for (var t = [], e = arguments.length, n = new Array(e), r = 0; r < e; r++)
      n[r] = arguments[r];
    return (
      n.forEach(function (i) {
        t.push(XPn(Number(i).toString(16), 2, 0));
      }),
      t[0]
    );
  },
  VPn = (function () {
    function t(e, n, r) {
      zl(this, t),
        Nr(this, "__loadedMoofWraps", []),
        Nr(this, "__lastRemainData", null),
        Nr(this, "__lastRemainDataStart", 0),
        Nr(this, "__nextMoofStart", -1),
        (this.videoTrack = e || new Zze()),
        (this.audioTrack = n || new Yze()),
        (this.metadataTrack = r || new Qze());
    }
    return (
      jl(
        t,
        [
          {
            key: "demuxPart",
            value: function (e, n, r) {
              var i = this,
                o = this.videoTrack,
                l = this.audioTrack,
                u = o.exist(),
                c = l.exist(),
                d = /av01/.test(o.codec);
              (o.samples = []), (l.samples = []);
              var h = e,
                f = n;
              if (this.__lastRemainData) {
                var p =
                  this.__lastRemainDataStart + this.__lastRemainData.byteLength;
                if (
                  n <= p &&
                  n > this.__lastRemainDataStart &&
                  n + e.byteLength > p
                ) {
                  var g = e.subarray(
                    this.__lastRemainData.byteLength +
                      this.__lastRemainDataStart -
                      n
                  );
                  (h = Dp(this.__lastRemainData, g)),
                    (f = this.__lastRemainDataStart),
                    (this.__lastRemainData = null);
                } else
                  (this.__lastRemainData = null),
                    (this.__lastRemainDataStart = 0),
                    (this.__nextMoofStart = -1);
              }
              if (!r) {
                var y = ll.findBox(h, ["moov"])[0];
                if (!y) throw new Error("cannot found moov box");
                r = ll.moov(y);
              }
              if (h) {
                var v = f + h.byteLength;
                u || c || ll.moovToTrack(r, o, l);
                var b = [];
                this.__nextMoofStart < 0
                  ? ll.findBox(h, ["moof"], f).forEach(function ($) {
                      return b.push($);
                    })
                  : this.__nextMoofStart >= f &&
                    this.__nextMoofStart <= v - 8 &&
                    ll
                      .findBox(
                        h.subarray(this.__nextMoofStart - f),
                        ["moof"],
                        this.__nextMoofStart
                      )
                      .forEach(function ($) {
                        return b.push($);
                      }),
                  b
                    .filter(function ($) {
                      return $.size <= $.data.length;
                    })
                    .forEach(function ($) {
                      var N = ll.moof($);
                      (i.__nextMoofStart =
                        N.start +
                        Math.max.apply(
                          Math,
                          pf(
                            N.traf.map(function (P) {
                              return P.trun.samples.reduce(function (I, O) {
                                return I + O.size;
                              }, P.trun.dataOffset || 0);
                            })
                          )
                        )),
                        i.__loadedMoofWraps.push({
                          start: N.start,
                          nextMoofStart: i.__nextMoofStart,
                          moof: N,
                        }),
                        i.__loadedMoofWraps.sort(function (P, I) {
                          return P.start - I.start;
                        });
                    });
                var w,
                  k = RPn(this.__loadedMoofWraps);
                try {
                  var D = function () {
                    var $ = w.value;
                    if ($.start > v || $.nextMoofStart < f) return "continue";
                    var N,
                      P = $.start,
                      I = ll.moofToSamples($.moof, o, l),
                      O = o.baseMediaDecodeTime,
                      X = l.baseMediaDecodeTime;
                    Object.keys(I).forEach(function (G) {
                      o.id == G
                        ? I[G].some(function (H) {
                            var E = (H.offset += P);
                            if (!(E < f)) {
                              if (E + H.size > v) return !0;
                              var S = new Gne((H.pts || H.dts) + O, H.dts + O);
                              (S.duration = H.duration),
                                (S.gopId = H.gopId),
                                H.keyframe && S.setToKeyframe();
                              var L = h.subarray(E - f, E - f + H.size);
                              if (((S.data = L), !d))
                                for (var W = 0, F = L.length - 1; W < F; )
                                  (N = Ti(L, W)),
                                    (W += 4),
                                    S.units.push(L.subarray(W, W + N)),
                                    (W += N);
                              (i.__lastRemainDataStart = E + H.size),
                                o.samples.push(S);
                            }
                          })
                        : l.id == G &&
                          I[G].some(function (H) {
                            var E = H.offset + P;
                            if (!(E < f)) {
                              if (E + H.size > v) return !0;
                              var S = h.subarray(E - f, E - f + H.size);
                              l.samples.push(new C$(H.dts + X, S, H.duration)),
                                (i.__lastRemainDataStart = E + H.size);
                            }
                          });
                    });
                  };
                  for (k.s(); !(w = k.n()).done; ) D();
                } catch ($) {
                  k.e($);
                } finally {
                  k.f();
                }
              }
              return (
                this.__lastRemainDataStart > f &&
                this.__lastRemainDataStart < h.byteLength + f
                  ? (this.__lastRemainData = h.subarray(
                      this.__lastRemainDataStart - f
                    ))
                  : ((this.__lastRemainData = h),
                    (this.__lastRemainDataStart = f)),
                o.samples.length && (o.baseMediaDecodeTime = o.samples[0].pts),
                l.samples.length && (l.baseMediaDecodeTime = l.samples[0].pts),
                {
                  videoTrack: o,
                  audioTrack: l,
                  metadataTrack: this.metadataTrack,
                }
              );
            },
          },
          {
            key: "demux",
            value: function (e, n) {
              var r = this.videoTrack,
                i = this.audioTrack,
                o = r.exist(),
                l = i.exist();
              if (((r.samples = []), (i.samples = []), n)) {
                if (!l) {
                  var u = ll.findBox(n, ["moov"])[0];
                  if (!u) throw new Error("cannot found moov box");
                  ll.moovToTrack(ll.moov(u), null, i);
                }
                var c = ll.findBox(n, ["moof"])[0];
                if (c) {
                  var d = ll.moofToSamples(ll.moof(c), null, i)[i.id],
                    h = i.baseMediaDecodeTime;
                  if (d) {
                    var f = c.start;
                    d.map(function (D) {
                      D.offset += f;
                      var $ = n.subarray(D.offset, D.offset + D.size);
                      i.samples.push(new C$(D.dts + h, $, D.duration));
                    });
                  }
                }
              }
              if (e) {
                if (!o && !l) {
                  var p = ll.findBox(e, ["moov"])[0];
                  if (!p) throw new Error("cannot found moov box");
                  ll.moovToTrack(ll.moov(p), r, i);
                }
                var g = ll.findBox(e, ["moof"])[0];
                if (g) {
                  var y,
                    v = ll.moofToSamples(ll.moof(g), r, i),
                    b = r.baseMediaDecodeTime,
                    w = i.baseMediaDecodeTime,
                    k = g.start;
                  Object.keys(v).forEach(function (D) {
                    r.id == D
                      ? v[D].map(function ($) {
                          $.offset += k;
                          var N = new Gne(($.pts || $.dts) + b, $.dts + b);
                          (N.duration = $.duration),
                            (N.gopId = $.gopId),
                            $.keyframe && N.setToKeyframe();
                          var P = e.subarray($.offset, $.offset + $.size);
                          N.data = P;
                          for (var I = 0, O = P.length - 1; I < O; )
                            (y = Ti(P, I)),
                              (I += 4),
                              N.units.push(P.subarray(I, I + y)),
                              (I += y);
                          r.samples.push(N);
                        })
                      : i.id == D &&
                        v[D].map(function ($) {
                          $.offset += k;
                          var N = e.subarray($.offset, $.offset + $.size);
                          i.samples.push(new C$($.dts + w, N, $.duration));
                        });
                  });
                }
              }
              return {
                videoTrack: r,
                audioTrack: i,
                metadataTrack: this.metadataTrack,
              };
            },
          },
          {
            key: "reset",
            value: function () {
              this.videoTrack.reset(),
                this.audioTrack.reset(),
                this.metadataTrack.reset();
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (e) {
              return ll.probe(e);
            },
          },
        ]
      ),
      t
    );
  })();
function zPn(t) {
  for (
    var e = 0, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
    i < n;
    i++
  )
    r[i - 1] = arguments[i];
  r.forEach(function (u) {
    e += u.length;
  });
  var o = new t(e),
    l = 0;
  return (
    r.forEach(function (u) {
      o.set(u, l), (l += u.length);
    }),
    o
  );
}
var Kd = (function () {
    function t() {
      zl(this, t), (this.buffer = new Uint8Array(0));
    }
    return (
      jl(
        t,
        [
          {
            key: "write",
            value: function () {
              for (
                var e = this, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              r.forEach(function (o) {
                o
                  ? (e.buffer = zPn(Uint8Array, e.buffer, o))
                  : window.console.warn(o);
              });
            },
          },
        ],
        [
          {
            key: "writeUint16",
            value: function (e) {
              return new Uint8Array([(e >> 8) & 255, 255 & e]);
            },
          },
          {
            key: "writeUint32",
            value: function (e) {
              return new Uint8Array([
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ]);
            },
          },
        ]
      ),
      t
    );
  })(),
  mRe = Math.pow(2, 32) - 1,
  ho = (function () {
    function t() {
      zl(this, t);
    }
    return (
      jl(t, null, [
        {
          key: "box",
          value: function (e) {
            for (
              var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
              i < n;
              i++
            )
              r[i - 1] = arguments[i];
            var o =
                8 +
                (r = r.filter(Boolean)).reduce(function (c, d) {
                  return c + d.byteLength;
                }, 0),
              l = new Uint8Array(o);
            (l[0] = (o >> 24) & 255),
              (l[1] = (o >> 16) & 255),
              (l[2] = (o >> 8) & 255),
              (l[3] = 255 & o),
              l.set(e, 4);
            var u = 8;
            return (
              r.forEach(function (c) {
                l.set(c, u), (u += c.byteLength);
              }),
              l
            );
          },
        },
        {
          key: "ftyp",
          value: function (e) {
            return e.find(function (n) {
              return n.type === WT.VIDEO && n.codecType === KT.HEVC;
            })
              ? t.FTYPHEV1
              : t.FTYPAVC1;
          },
        },
        {
          key: "initSegment",
          value: function (e) {
            return Dp(t.ftyp(e), t.moov(e));
          },
        },
        {
          key: "pssh",
          value: function (e) {
            var n = new Uint8Array(
              [1, 0, 0, 0].concat(
                [
                  16, 119, 239, 236, 192, 178, 77, 2, 172, 227, 60, 30, 82, 226,
                  251, 75,
                ],
                [0, 0, 0, 1],
                cRe(e.kid),
                [0, 0, 0, 0]
              )
            );
            return t.box(t.types.pssh, n);
          },
        },
        {
          key: "moov",
          value: function (e) {
            if (e[0].useEME && (e[0].encv || e[0].enca)) {
              e[0].pssh || (e[0].pssh = { kid: e[0].kid });
              var n = this.pssh(e[0].pssh);
              return t.box.apply(
                t,
                [
                  t.types.moov,
                  t.mvhd(
                    e[0].mvhdDurtion || e[0].duration,
                    e[0].mvhdTimecale || e[0].timescale
                  ),
                  t.mvex(e),
                ].concat(
                  pf(
                    e.map(function (r) {
                      return t.trak(r);
                    })
                  ),
                  [n]
                )
              );
            }
            return t.box.apply(
              t,
              [
                t.types.moov,
                t.mvhd(
                  e[0].mvhdDurtion || e[0].duration,
                  e[0].mvhdTimecale || e[0].timescale
                ),
              ].concat(
                pf(
                  e.map(function (r) {
                    return t.trak(r);
                  })
                ),
                [t.mvex(e)]
              )
            );
          },
        },
        {
          key: "mvhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mvhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                1,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                255,
                255,
                255,
                255,
              ])
            );
          },
        },
        {
          key: "trak",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.tkhdDuration || 0, e.width, e.height),
              t.mdia(e)
            );
          },
        },
        {
          key: "tkhd",
          value: function (e, n) {
            var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0,
              i =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : 0;
            return t.box(
              t.types.tkhd,
              new Uint8Array([
                0,
                0,
                0,
                7,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
                (i >> 8) & 255,
                255 & i,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "mdia",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minf(e)
            );
          },
        },
        {
          key: "mdhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mdhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                85,
                196,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "hdlr",
          value: function (e) {
            return t.box(t.types.hdlr, t.HDLR_TYPES[e]);
          },
        },
        {
          key: "minf",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === WT.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stbl(e)
            );
          },
        },
        {
          key: "stbl",
          value: function (e) {
            var n = [];
            return (
              e && e.ext && e.ext.stss && n.push(t.stss(e.ext.stss.entries)),
              t.box(
                t.types.stbl,
                t.stsd(e),
                t.STTS,
                n[0],
                t.STSC,
                t.STSZ,
                t.STCO
              )
            );
          },
        },
        {
          key: "stsd",
          value: function (e) {
            var n;
            return (
              (n =
                e.type === "audio"
                  ? e.useEME && e.enca
                    ? t.enca(e)
                    : e.codecType === Op.OPUS
                    ? t.opus(e)
                    : t.mp4a(e)
                  : e.useEME && e.encv
                  ? t.encv(e)
                  : e.av1C
                  ? t.av01(e)
                  : t.avc1hev1(e)),
              t.box(t.types.stsd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]), n)
            );
          },
        },
        {
          key: "enca",
          value: function (e) {
            var n = e.enca.channelCount,
              r = e.enca.sampleRate,
              i = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                n,
                0,
                16,
                0,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
              ]),
              o = t.esds(e.config),
              l = t.sinf(e.enca);
            return t.box(t.types.enca, i, o, l);
          },
        },
        {
          key: "encv",
          value: function (e) {
            var n,
              r,
              i = e.sps.length > 0 ? e.sps[0] : [],
              o = e.pps.length > 0 ? e.pps[0] : [],
              l = e.width,
              u = e.height,
              c = e.sarRatio[0],
              d = e.sarRatio[1],
              h = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (l >> 8) & 255,
                255 & l,
                (u >> 8) & 255,
                255 & u,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                18,
                100,
                97,
                105,
                108,
                121,
                109,
                111,
                116,
                105,
                111,
                110,
                47,
                104,
                108,
                115,
                46,
                106,
                115,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              f = new Uint8Array(
                (n = (r = [
                  1,
                  i[1],
                  i[2],
                  i[3],
                  255,
                  225,
                  (i.length >>> 8) & 255,
                  255 & i.length,
                ]).concat
                  .apply(r, pf(i))
                  .concat([
                    1,
                    (o.length >>> 8) & 255,
                    255 & o.length,
                  ])).concat.apply(n, pf(o))
              ),
              p = new Uint8Array([0, 0, 88, 57, 0, 15, 200, 192, 0, 4, 86, 72]),
              g = t.sinf(e.encv),
              y = new Uint8Array([
                c >> 24,
                (c >> 16) & 255,
                (c >> 8) & 255,
                255 & c,
                d >> 24,
                (d >> 16) & 255,
                (d >> 8) & 255,
                255 & d,
              ]);
            return t.box(
              t.types.encv,
              h,
              t.box(t.types.avcC, f),
              t.box(t.types.btrt, p),
              g,
              t.box(t.types.pasp, y)
            );
          },
        },
        {
          key: "schi",
          value: function (e) {
            var n = new Uint8Array([]),
              r = t.tenc(e);
            return t.box(t.types.schi, n, r);
          },
        },
        {
          key: "tenc",
          value: function (e) {
            var n = new Uint8Array(
              [
                0,
                0,
                0,
                0,
                0,
                0,
                255 & e.default_IsEncrypted,
                255 & e.default_IV_size,
              ].concat(cRe(e.default_KID))
            );
            return t.box(t.types.tenc, n);
          },
        },
        {
          key: "sinf",
          value: function (e) {
            var n = new Uint8Array([]),
              r = new Uint8Array([
                e.data_format.charCodeAt(0),
                e.data_format.charCodeAt(1),
                e.data_format.charCodeAt(2),
                e.data_format.charCodeAt(3),
              ]),
              i = new Uint8Array([0, 0, 0, 0, 99, 101, 110, 99, 0, 1, 0, 0]),
              o = t.schi(e);
            return t.box(
              t.types.sinf,
              n,
              t.box(t.types.frma, r),
              t.box(t.types.schm, i),
              o
            );
          },
        },
        {
          key: "av01",
          value: function (e) {
            return t.box(
              t.types.av01,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (e.width >> 8) & 255,
                255 & e.width,
                (e.height >> 8) & 255,
                255 & e.height,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              e.av1C,
              e.colr
            );
          },
        },
        {
          key: "avc1hev1",
          value: function (e) {
            var n = e.codecType === KT.HEVC,
              r = n ? t.types.hvc1 : t.types.avc1,
              i = n ? t.hvcC(e) : t.avcC(e),
              o = [
                new Uint8Array([
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  (e.width >> 8) & 255,
                  255 & e.width,
                  (e.height >> 8) & 255,
                  255 & e.height,
                  0,
                  72,
                  0,
                  0,
                  0,
                  72,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  24,
                  17,
                  17,
                ]),
                i,
              ];
            return (
              n
                ? o.push(t.box(t.types.fiel, new Uint8Array([1, 0])))
                : e.sarRatio &&
                  e.sarRatio.length > 1 &&
                  o.push(t.pasp(e.sarRatio)),
              t.box.apply(t, [r].concat(o))
            );
          },
        },
        {
          key: "avcC",
          value: function (e) {
            var n,
              r,
              i,
              o = [],
              l = [];
            return (
              e.sps.forEach(function (u) {
                (i = u.byteLength),
                  o.push((i >>> 8) & 255),
                  o.push(255 & i),
                  o.push.apply(o, pf(u));
              }),
              e.pps.forEach(function (u) {
                (i = u.byteLength),
                  l.push((i >>> 8) & 255),
                  l.push(255 & i),
                  l.push.apply(l, pf(u));
              }),
              t.box(
                t.types.avcC,
                new Uint8Array(
                  (n = (r = [
                    1,
                    o[3],
                    o[4],
                    o[5],
                    255,
                    224 | e.sps.length,
                  ]).concat
                    .apply(r, o)
                    .concat([e.pps.length])).concat.apply(n, l)
                )
              )
            );
          },
        },
        {
          key: "hvcC",
          value: function (e) {
            var n = e.hvcC;
            if (n instanceof ArrayBuffer || n instanceof Uint8Array) return n;
            var r,
              i = e.vps,
              o = e.sps,
              l = e.pps;
            if (n) {
              var u = n.generalProfileCompatibilityFlags,
                c = n.generalConstraintIndicatorFlags,
                d = (i.length && 1) + (o.length && 1) + (l.length && 1);
              r = [
                1,
                (n.generalProfileSpace << 6) |
                  (n.generalTierFlag << 5) |
                  n.generalProfileIdc,
                u >>> 24,
                u >>> 16,
                u >>> 8,
                u,
                c[0],
                c[1],
                c[2],
                c[3],
                c[4],
                c[5],
                n.generalLevelIdc,
                240,
                0,
                252,
                252 | n.chromaFormatIdc,
                248 | n.bitDepthLumaMinus8,
                248 | n.bitDepthChromaMinus8,
                0,
                0,
                (n.numTemporalLayers << 3) | (n.temporalIdNested << 2) | 3,
                d,
              ];
              var h = function (f) {
                var p;
                r.push(f.length >> 8, f.length), (p = r).push.apply(p, pf(f));
              };
              i.length && (r.push(160, 0, i.length), i.forEach(h)),
                o.length && (r.push(161, 0, o.length), o.forEach(h)),
                l.length && (r.push(162, 0, l.length), l.forEach(h));
            } else
              r = [
                1, 1, 96, 0, 0, 0, 144, 0, 0, 0, 0, 0, 93, 240, 0, 252, 253,
                248, 248, 0, 0, 15, 3, 160, 0, 1, 0, 24, 64, 1, 12, 1, 255, 255,
                1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0, 0, 3, 0, 93, 153, 152, 9,
                161, 0, 1, 0, 45, 66, 1, 1, 1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0,
                0, 3, 0, 93, 160, 2, 128, 128, 45, 22, 89, 153, 164, 147, 43,
                154, 128, 128, 128, 130, 0, 0, 3, 0, 2, 0, 0, 3, 0, 50, 16, 162,
                0, 1, 0, 7, 68, 1, 193, 114, 180, 98, 64,
              ];
            return t.box(t.types.hvcC, new Uint8Array(r));
          },
        },
        {
          key: "pasp",
          value: function (e) {
            var n = vPn(e, 2),
              r = n[0],
              i = n[1];
            return t.box(
              t.types.pasp,
              new Uint8Array([
                r >> 24,
                (r >> 16) & 255,
                (r >> 8) & 255,
                255 & r,
                i >> 24,
                (i >> 16) & 255,
                (i >> 8) & 255,
                255 & i,
              ])
            );
          },
        },
        {
          key: "mp4a",
          value: function (e) {
            return t.box(
              t.types.mp4a,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                e.channelCount,
                0,
                16,
                0,
                0,
                0,
                0,
                (e.sampleRate >> 8) & 255,
                255 & e.sampleRate,
                0,
                0,
              ]),
              e.config.length ? t.esds(e.config) : void 0
            );
          },
        },
        {
          key: "esds",
          value: function (e) {
            var n = e.length;
            return t.box(
              t.types.esds,
              new Uint8Array(
                [
                  0,
                  0,
                  0,
                  0,
                  3,
                  23 + n,
                  0,
                  0,
                  0,
                  4,
                  15 + n,
                  64,
                  21,
                  0,
                  6,
                  0,
                  0,
                  0,
                  218,
                  192,
                  0,
                  0,
                  218,
                  192,
                  5,
                ]
                  .concat([n])
                  .concat(e)
                  .concat([6, 1, 2])
              )
            );
          },
        },
        {
          key: "opus",
          value: function (e) {
            var n = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                e.channelCount,
                0,
                16,
                0,
                0,
                0,
                0,
                (e.sampleRate >> 8) & 255,
                255 & e.sampleRate,
                0,
                0,
              ]),
              r = e.config.length ? t.dOps(e) : [];
            return t.box(t.types.Opus, n, r);
          },
        },
        {
          key: "dOps",
          value: function (e) {
            if (e.config)
              return (
                (e.config[4] = (e.sampleRate >>> 24) & 255),
                (e.config[5] = (e.sampleRate >>> 16) & 255),
                (e.config[6] = (e.sampleRate >>> 8) & 255),
                (e.config[7] = 255 & e.sampleRate),
                t.box(t.types.dOps, e.config)
              );
          },
        },
        {
          key: "mvex",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.mvex].concat(
                pf(
                  e.map(function (n) {
                    return t.trex(n.id);
                  })
                )
              )
            );
          },
        },
        {
          key: "trex",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                1,
              ])
            );
          },
        },
        {
          key: "trex1",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                2,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "trex2",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                4,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "moof",
          value: function (e) {
            return t.box.apply(
              t,
              [
                t.types.moof,
                t.mfhd(e[0].samples ? e[0].samples[0].gopId : 0),
              ].concat(
                pf(
                  e.map(function (n) {
                    return t.traf(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "mfhd",
          value: function (e) {
            return t.box(
              t.types.mfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "traf",
          value: function (e) {
            var n = t.tfhd(e.id),
              r = t.tfdt(e, e.baseMediaDecodeTime),
              i = 0;
            if (
              (e.isVideo &&
                e.videoSenc &&
                e.videoSenc.forEach(function (I) {
                  (i += 8),
                    I.subsamples &&
                      I.subsamples.length &&
                      ((i += 2), (i += 6 * I.subsamples.length));
                }),
              (e.videoSencLength = i),
              e.useEME && (e.isVideoEncryption || e.isAudioEncryption))
            ) {
              if (e.isVideoEncryption) {
                if (e.isVideo) {
                  var o = t.saiz(e),
                    l = t.saio(e),
                    u = t.trun1(e),
                    c = t.senc(e);
                  return t.box(t.types.traf, n, r, o, l, u, c);
                }
                if (e.isAudioEncryption) {
                  var d = t.sbgp(),
                    h = t.saiz(e),
                    f = t.saio(e),
                    p = t.senc(e),
                    g = t.trun1(e);
                  return t.box(t.types.traf, n, r, d, h, f, p, g);
                }
                var y = t.sbgp(),
                  v = t.trun1(e);
                return t.box(t.types.traf, n, r, y, v);
              }
              if (e.isVideo) {
                var b = t.trun1(e);
                return t.box(t.types.traf, n, r, b);
              }
              var w = t.sbgp(),
                k = t.saiz(e),
                D = t.saio(e),
                $ = t.senc(e),
                N = t.trun1(e);
              return t.box(t.types.traf, n, r, w, k, D, $, N);
            }
            var P = t.sdtp(e);
            return t.box(
              t.types.traf,
              n,
              r,
              P,
              t.trun(e.samples, P.byteLength + 76)
            );
          },
        },
        {
          key: "sdtp",
          value: function (e) {
            var n = new Kd();
            return (
              e.samples.forEach(function (r) {
                n.write(
                  new Uint8Array(e.isVideo ? [r.keyframe ? 32 : 16] : [16])
                );
              }),
              t.box(t.types.sdtp, this.extension(0, 0), n.buffer)
            );
          },
        },
        {
          key: "trun1",
          value: function (e) {
            var n = new Kd(),
              r = Kd.writeUint32(e.samples.length),
              i = null;
            if (e.isVideo) {
              var o = e.videoSencLength;
              (i = Kd.writeUint32(16 * e.samples.length + o + 149)),
                !e.isVideoEncryption &&
                  e.isAudioEncryption &&
                  (i = Kd.writeUint32(16 * e.samples.length + 92));
            } else {
              var l = 12 * e.samples.length + 124;
              e.isAudioEncryption &&
                (l = 12 * e.samples.length + 8 * e.audioSenc.length + 177),
                (i = Kd.writeUint32(l));
            }
            return (
              e.samples.forEach(function (u) {
                n.write(Kd.writeUint32(u.duration)),
                  n.write(Kd.writeUint32(u.size)),
                  n.write(Kd.writeUint32(u.keyframe ? 33554432 : 65536)),
                  e.isVideo && n.write(Kd.writeUint32(u.cts ? u.cts : 0));
              }),
              t.box(t.types.trun, this.extension(0, e.flags), r, i, n.buffer)
            );
          },
        },
        {
          key: "senc",
          value: function (e) {
            var n = new Kd(),
              r = e.samples.length,
              i = e.isVideo ? 16 : 8,
              o = e.isVideo ? 2 : 0,
              l = [],
              u = 0;
            return (
              e.isVideo
                ? ((l = e.videoSenc), (u = e.videoSencLength))
                : (l = e.audioSenc),
              (u = u || i * r),
              n.write(
                Kd.writeUint32(16 + u),
                t.types.senc,
                this.extension(0, o)
              ),
              n.write(Kd.writeUint32(r)),
              l.forEach(function (c) {
                for (var d = 0; d < c.InitializationVector.length; d++)
                  n.write(new Uint8Array([c.InitializationVector[d]]));
                c.subsamples &&
                  c.subsamples.length &&
                  (n.write(Kd.writeUint16(c.subsamples.length)),
                  c.subsamples.forEach(function (h) {
                    n.write(Kd.writeUint16(h.BytesOfClearData)),
                      n.write(Kd.writeUint32(h.BytesOfProtectedData));
                  }));
              }),
              n.buffer
            );
          },
        },
        {
          key: "saio",
          value: function (e) {
            var n = 12 * e.samples.length + 141;
            !e.isVideo && e.isAudioEncryption && (n = 149);
            var r = new Uint8Array([
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              0,
              0,
              0,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
            return t.box(t.types.saio, r);
          },
        },
        {
          key: "saiz",
          value: function (e) {
            var n = e.samples.length,
              r = new Uint8Array([
                0,
                0,
                0,
                0,
                16,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
              ]);
            return t.box(t.types.saiz, r);
          },
        },
        {
          key: "sbgp",
          value: function () {
            var e = new Uint8Array([
              114, 111, 108, 108, 0, 0, 0, 1, 0, 0, 1, 25, 0, 0, 0, 1,
            ]);
            return t.box(t.types.sbgp, this.extension(0, 0), e);
          },
        },
        {
          key: "extension",
          value: function (e, n) {
            return new Uint8Array([
              e,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
          },
        },
        {
          key: "tfhd",
          value: function (e) {
            return t.box(
              t.types.tfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "tfdt",
          value: function (e, n) {
            var r = Math.floor(n / (mRe + 1)),
              i = Math.floor(n % (mRe + 1));
            return e.useEME && (e.isVideoEncryption || e.isAudioEncryption)
              ? t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                )
              : t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    1,
                    0,
                    0,
                    0,
                    r >> 24,
                    (r >> 16) & 255,
                    (r >> 8) & 255,
                    255 & r,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                );
          },
        },
        {
          key: "trun",
          value: function (e, n) {
            var r = e.length,
              i = 12 + 16 * r;
            n += 8 + i;
            var o = new Uint8Array(i);
            o.set(
              [
                0,
                0,
                15,
                1,
                (r >>> 24) & 255,
                (r >>> 16) & 255,
                (r >>> 8) & 255,
                255 & r,
                (n >>> 24) & 255,
                (n >>> 16) & 255,
                (n >>> 8) & 255,
                255 & n,
              ],
              0
            );
            for (var l = 0; l < r; l++) {
              var u = e[l],
                c = u.duration,
                d = u.size,
                h = u.flag,
                f = h === void 0 ? {} : h,
                p = u.cts,
                g = p === void 0 ? 0 : p;
              o.set(
                [
                  (c >>> 24) & 255,
                  (c >>> 16) & 255,
                  (c >>> 8) & 255,
                  255 & c,
                  (d >>> 24) & 255,
                  (d >>> 16) & 255,
                  (d >>> 8) & 255,
                  255 & d,
                  (f.isLeading << 2) |
                    (f.dependsOn === null || f.dependsOn === void 0
                      ? 1
                      : f.dependsOn),
                  (f.isDependedOn << 6) |
                    (f.hasRedundancy << 4) |
                    (f.paddingValue << 1) |
                    (f.isNonSyncSample === null || f.isNonSyncSample === void 0
                      ? 1
                      : f.isNonSyncSample),
                  61440 & f.degradationPriority,
                  15 & f.degradationPriority,
                  (g >>> 24) & 255,
                  (g >>> 16) & 255,
                  (g >>> 8) & 255,
                  255 & g,
                ],
                12 + 16 * l
              );
            }
            return t.box(t.types.trun, o);
          },
        },
        {
          key: "moovMP4",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.moov, t.mvhd(e[0].duration, e[0].timescale)].concat(
                pf(
                  e.map(function (n) {
                    return t.trackMP4(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "trackMP4",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.duration, e.width, e.height),
              t.mdiaMP4(e)
            );
          },
        },
        {
          key: "mdiaMP4",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minfMP4(e)
            );
          },
        },
        {
          key: "minfMP4",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === WT.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stblMP4(e)
            );
          },
        },
        {
          key: "stblMP4",
          value: function (e) {
            var n = e.ext,
              r = [
                t.stsd(e),
                t.stts(n.stts),
                t.stsc(n.stsc),
                t.stsz(n.stsz),
                t.stco(n.stco),
              ];
            return (
              n.stss.length && r.push(t.stss(n.stss)),
              n.ctts.length && r.push(t.ctts(n.ctts)),
              t.box.apply(t, [t.types.stbl].concat(r))
            );
          },
        },
        {
          key: "stts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.stts,
                Dp(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsc",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(12 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.firstChunk,
                  u = o.samplesPerChunk,
                  c = o.sampleDescIndex;
                r.set(
                  [
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    c >> 24,
                    (c >> 16) & 255,
                    (c >> 8) & 255,
                    255 & c,
                  ],
                  i
                ),
                  (i += 12);
              }),
              t.box(
                t.types.stsc,
                Dp(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsz",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stsz,
                Dp(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stco",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stco,
                Dp(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stss",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stss,
                Dp(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "ctts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.ctts,
                Dp(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "styp",
          value: function () {
            return t.box(
              t.types.styp,
              new Uint8Array([
                109, 115, 100, 104, 0, 0, 0, 0, 109, 115, 100, 104, 109, 115,
                105, 120,
              ])
            );
          },
        },
        {
          key: "sidx",
          value: function (e) {
            var n = e.timescale,
              r = e.samples[0].duration,
              i = r * e.samples.length,
              o = e.samples[0].sampleOffset * r,
              l = 8;
            e.samples.forEach(function (f) {
              l += f.size;
            });
            var u = 0;
            if (e.isVideo) {
              var c,
                d = 0;
              e.videoSenc && (c = e.videoSenc),
                e.isVideo &&
                  c.forEach(function (f) {
                    (d += 8),
                      f.subsamples &&
                        f.subsamples.length &&
                        ((d += 2), (d += 6 * f.subsamples.length));
                  }),
                (e.videoSencLength = d),
                (u = l + 141 + 16 * e.samples.length + d),
                e.useEME &&
                  e.isAudioEncryption &&
                  !e.isVideoEncryption &&
                  (u = l + 16 * e.samples.length + 84);
            } else
              (u = l + 116 + 12 * e.samples.length),
                e.useEME &&
                  e.isAudioEncryption &&
                  (u =
                    l + 169 + 12 * e.samples.length + 8 * e.audioSenc.length);
            var h = new Uint8Array([
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              255 & e.id,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
              (o >> 24) & 255,
              (o >> 16) & 255,
              (o >> 8) & 255,
              255 & o,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              (u >> 16) & 255,
              (u >> 8) & 255,
              255 & u,
              (i >> 24) & 255,
              (i >> 16) & 255,
              (i >> 8) & 255,
              255 & i,
              144,
              0,
              0,
              0,
            ]);
            return t.box(t.types.sidx, h);
          },
        },
        {
          key: "mdat",
          value: function (e) {
            return t.box(t.types.mdat, e);
          },
        },
      ]),
      t
    );
  })();
Nr(
  ho,
  "types",
  [
    "Opus",
    "dOps",
    "av01",
    "av1C",
    "avc1",
    "avcC",
    "hvc1",
    "hvcC",
    "dinf",
    "dref",
    "esds",
    "ftyp",
    "hdlr",
    "mdat",
    "mdhd",
    "mdia",
    "mfhd",
    "minf",
    "moof",
    "moov",
    "mp4a",
    "mvex",
    "mvhd",
    "pasp",
    "stbl",
    "stco",
    "stsc",
    "stsd",
    "stsz",
    "stts",
    "tfdt",
    "tfhd",
    "traf",
    "trak",
    "trex",
    "tkhd",
    "vmhd",
    "smhd",
    "ctts",
    "stss",
    "styp",
    "pssh",
    "sidx",
    "sbgp",
    "saiz",
    "saio",
    "senc",
    "trun",
    "encv",
    "enca",
    "sinf",
    "btrt",
    "frma",
    "tenc",
    "schm",
    "schi",
    "mehd",
    "fiel",
    "sdtp",
  ].reduce(function (t, e) {
    return (
      (t[e] = [
        e.charCodeAt(0),
        e.charCodeAt(1),
        e.charCodeAt(2),
        e.charCodeAt(3),
      ]),
      t
    );
  }, Object.create(null))
),
  Nr(ho, "HDLR_TYPES", {
    video: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
    audio: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
  }),
  Nr(
    ho,
    "FTYPAVC1",
    ho.box(
      ho.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 97, 118, 99, 49,
      ])
    )
  ),
  Nr(
    ho,
    "FTYPHEV1",
    ho.box(
      ho.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 104, 101, 118, 49,
      ])
    )
  ),
  Nr(
    ho,
    "DINF",
    ho.box(
      ho.types.dinf,
      ho.box(
        ho.types.dref,
        new Uint8Array([
          0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1,
        ])
      )
    )
  ),
  Nr(
    ho,
    "VMHD",
    ho.box(ho.types.vmhd, new Uint8Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  Nr(
    ho,
    "SMHD",
    ho.box(ho.types.smhd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  Nr(ho, "StblTable", new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0])),
  Nr(ho, "STTS", ho.box(ho.types.stts, ho.StblTable)),
  Nr(ho, "STSC", ho.box(ho.types.stsc, ho.StblTable)),
  Nr(
    ho,
    "STSZ",
    ho.box(ho.types.stsz, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  Nr(ho, "STCO", ho.box(ho.types.stco, ho.StblTable));
var tje = (function () {
  function t(e, n) {
    zl(this, t),
      (this.name = e || ""),
      (this._prefix = "[".concat(this.name, "]")),
      (t.disabled = n);
  }
  return (
    jl(
      t,
      [
        {
          key: "debug",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).debug.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "log",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).log.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "warn",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).warn.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "error",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).error.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "table",
          value: function () {
            var e;
            t.disabled ||
              (console.group(this._prefix),
              (e = console).table.apply(e, arguments),
              console.groupEnd());
          },
        },
      ],
      [
        {
          key: "enable",
          value: function () {
            t.disabled = !1;
          },
        },
        {
          key: "disable",
          value: function () {
            t.disabled = !0;
          },
        },
      ]
    ),
    t
  );
})();
Nr(tje, "disabled", !0);
var jPn = (function () {
    function t(e, n, r) {
      zl(this, t), (this.videoTrack = e), (this.audioTrack = n);
      var i = /Chrome\/([^.]+)/.exec(navigator.userAgent);
      (this.forceFirstIDR = i && Number(i[1]) < 50),
        (this.log = new tje("FMP4Remuxer", !r || !r.openLog || !r.openLog));
    }
    return (
      jl(t, [
        {
          key: "remux",
          value: function () {
            var e,
              n,
              r,
              i,
              o,
              l =
                arguments.length > 0 && arguments[0] !== void 0 && arguments[0],
              u =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : {},
              c = this.videoTrack,
              d = this.audioTrack,
              h = c.exist(),
              f = d.exist(),
              p = [];
            return (
              l &&
                (u && u.initMerge
                  ? (h && p.push(this.videoTrack),
                    f && p.push(this.audioTrack),
                    (r = ho.initSegment(p)))
                  : (h && (e = ho.initSegment([this.videoTrack])),
                    f && (n = ho.initSegment([this.audioTrack])))),
              h && c.hasSample() && (i = this._remuxVideo()),
              f && d.hasSample() && (o = this._remuxAudio()),
              (c.samples = []),
              (d.samples = []),
              {
                initSegment: r,
                videoInitSegment: e,
                audioInitSegment: n,
                videoSegment: i,
                audioSegment: o,
              }
            );
          },
        },
        {
          key: "_remuxVideo",
          value: function () {
            var e = this.videoTrack;
            this.forceFirstIDR &&
              (e.samples[0].flag = { dependsOn: 2, isNonSyncSample: 0 });
            var n = e.samples,
              r = /av01/.test(e.codec),
              i = 0;
            r
              ? n.forEach(function (w) {
                  i += w.data.byteLength;
                })
              : n.forEach(function (w) {
                  (i += w.units.reduce(function (k, D) {
                    return k + D.byteLength;
                  }, 0)),
                    (i += 4 * w.units.length);
                });
            var o = new Uint8Array(i);
            if (r)
              for (var l, u = 0, c = n.length, d = 0; u < c; u++)
                (l = n[u]),
                  o.set(l.data, d),
                  (l.size = l.data.byteLength),
                  (d += l.size);
            else
              for (
                var h,
                  f = new DataView(o.buffer),
                  p = function (w, k) {
                    k = n[g];
                    var D = 0;
                    k.units.forEach(function ($) {
                      f.setUint32(w, $.byteLength),
                        (w += 4),
                        o.set($, w),
                        (w += $.byteLength),
                        (D += 4 + $.byteLength);
                    }),
                      (k.size = D),
                      (v = w),
                      (h = k);
                  },
                  g = 0,
                  y = n.length,
                  v = 0;
                g < y;
                g++
              )
                p(v, h);
            var b = ho.mdat(o);
            return Dp(ho.moof([e]), b);
          },
        },
        {
          key: "_remuxAudio",
          value: function () {
            var e = this.audioTrack,
              n = new Uint8Array(
                e.samples.reduce(function (i, o) {
                  return i + o.size;
                }, 0)
              );
            e.samples.reduce(function (i, o) {
              return n.set(o.data, i), i + o.size;
            }, 0);
            var r = ho.mdat(n);
            return Dp(ho.moof([e]), r);
          },
        },
        {
          key: "reset",
          value: function () {
            this.videoTrack.reset(), this.audioTrack.reset();
          },
        },
      ]),
      t
    );
  })(),
  WPn = (function () {
    function t() {
      pc(this, t);
      var r = window.crypto || window.msCrypto;
      (this.subtle = r && (r.subtle || r.webkitSubtle)),
        (this.externalDecryptor = null);
    }
    var e, n;
    return (
      gc(t, [
        {
          key: "destroy",
          value: function () {
            var r;
            (r = this.externalDecryptor) !== null &&
              r !== void 0 &&
              r.destroy &&
              this.externalDecryptor.destroy();
          },
        },
        {
          key: "decrypt",
          value: function (r, i) {
            if (r || i) {
              var o = [];
              return (
                r && (o[0] = this._decryptSegment(r)),
                i && (o[1] = this._decryptSegment(i)),
                Promise.all(o)
              );
            }
          },
        },
        {
          key: "_decryptSegment",
          value:
            ((n = Qo(
              Ai().mark(function r(i) {
                var o;
                return Ai().wrap(
                  function (l) {
                    for (;;)
                      switch ((l.prev = l.next)) {
                        case 0:
                          if (((o = i.data), !i.key)) {
                            l.next = 5;
                            break;
                          }
                          return (
                            (l.next = 4),
                            this._decryptData(i.data, i.key, i.keyIv)
                          );
                        case 4:
                          o = l.sent;
                        case 5:
                          if (i.map) {
                            l.next = 7;
                            break;
                          }
                          return l.abrupt("return", o);
                        case 7:
                          return l.abrupt("return", VF(i.map, o));
                        case 8:
                        case "end":
                          return l.stop();
                      }
                  },
                  r,
                  this
                );
              })
            )),
            function (r) {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "_decryptData",
          value:
            ((e = Qo(
              Ai().mark(function r(i, o, l) {
                var u;
                return Ai().wrap(
                  function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          if (!this.externalDecryptor) {
                            c.next = 6;
                            break;
                          }
                          return (
                            (c.next = 3),
                            this.externalDecryptor.decrypt(i, o, l)
                          );
                        case 3:
                          return c.abrupt("return", c.sent);
                        case 6:
                          if (this.subtle) {
                            c.next = 8;
                            break;
                          }
                          throw new Error("crypto is not defined");
                        case 8:
                          return (
                            (c.next = 10),
                            this.subtle.importKey(
                              "raw",
                              o,
                              { name: "AES-CBC" },
                              !1,
                              ["encrypt", "decrypt"]
                            )
                          );
                        case 10:
                          return (
                            (u = c.sent),
                            (c.t0 = Uint8Array),
                            (c.next = 14),
                            this.subtle.decrypt(
                              { name: "AES-CBC", iv: l },
                              u,
                              i
                            )
                          );
                        case 14:
                          return (
                            (c.t1 = c.sent), c.abrupt("return", new c.t0(c.t1))
                          );
                        case 16:
                        case "end":
                          return c.stop();
                      }
                  },
                  r,
                  this
                );
              })
            )),
            function (r, i, o) {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  Uo = is(
    is({}, pa),
    {},
    {
      STREAM_PARSED: "core.streamparsed",
      NO_AUDIO_TRACK: "core.noaudiotrack",
      SUBTITLE_SEGMENTS: "core.subtitlesegments",
      SUBTITLE_PLAYLIST: "core.subtitleplaylist",
      SEI_PAYLOAD_TIME: "core.seipayloadtime",
      APPEND_COST: "core.appendcost",
    }
  ),
  KW = new yv("Transmuxer"),
  yRe = (function () {
    function t(e, n, r, i) {
      pc(this, t),
        xn(this, "_initSegmentId", ""),
        (this.hls = e),
        (this._demuxer = n ? new VPn() : new eje(null, null, null, i)),
        (this._isMP4 = n),
        r &&
          (this._remuxer = new jPn(
            this._demuxer.videoTrack,
            this._demuxer.audioTrack
          ));
    }
    return (
      gc(t, [
        {
          key: "transmux",
          value: function (e, n, r, i, o, l) {
            var u = this._demuxer;
            try {
              this._isMP4 ? u.demux(e, n) : u.demuxAndFix(VF(e, n), r, i, o);
            } catch (N) {
              throw new Fl(vo.DEMUX, vo.SUB_TYPES.HLS, N);
            }
            var c = u.videoTrack,
              d = u.audioTrack,
              h = u.metadataTrack,
              f = {
                codec: c.codec,
                timescale: c.timescale,
                firstDts: c.firstDts / c.timescale,
                firstPts: c.firstPts / c.timescale,
                duration: c.samplesDuration / c.timescale,
              },
              p = {
                codec: d.codec,
                timescale: d.timescale,
                firstDts: d.firstDts / c.timescale,
                firstPts: d.firstPts / c.timescale,
                duration: d.samplesDuration / c.timescale,
                container: d.container,
              },
              g = ""
                .concat(c.codec, "/")
                .concat(c.width, "/")
                .concat(c.height, "/")
                .concat(d.codec, "/")
                .concat(d.config);
            if (
              (g !== this._initSegmentId &&
                ((this._initSegmentId = g), (l = !0)),
              this._fireEvents(c, d, h, r || l),
              this.hls.emit(Uo.DEMUXED_TRACK, { videoTrack: c, audioTrack: d }),
              !this._remuxer)
            )
              return [c, d];
            l &&
              this.hls.isLive &&
              !this.hls.config.mseLowLatency &&
              ((c.duration = this.hls.totalDuration * c.timescale),
              (d.duration = this.hls.totalDuration * d.timescale));
            try {
              var y = this._remuxer.remux(l),
                v = y.videoInitSegment,
                b = y.videoSegment,
                w = y.audioInitSegment,
                k = y.audioSegment,
                D = VF(v, b),
                $ = VF(w, k);
              return [
                D ? is(is({}, f), {}, { data: D }) : void 0,
                $ ? is(is({}, p), {}, { data: $ }) : void 0,
              ];
            } catch (N) {
              throw new Fl(vo.REMUX, vo.SUB_TYPES.FMP4, N);
            }
          },
        },
        {
          key: "_fireEvents",
          value: function (e, n, r, i) {
            var o = this,
              l = [e, n],
              u = "discontinuity: ".concat(i);
            l.forEach(function (c) {
              var d;
              (d = c.samples) !== null &&
                d !== void 0 &&
                d.length &&
                (u += "; "
                  .concat(c.samples.length, " ")
                  .concat(
                    c.type === WT.VIDEO ? "video" : "audio",
                    " samples, firstDts/firstPts/duration: "
                  )
                  .concat((c.firstDts / c.timescale).toFixed(3), "/")
                  .concat((c.firstPts / c.timescale).toFixed(3), "/")
                  .concat((c.samplesDuration / c.timescale).toFixed(3))),
                i &&
                  c.exist() &&
                  o.hls.emit(Uo.METADATA_PARSED, {
                    type: c.type,
                    track: c,
                    meta: is(
                      {
                        codec: c.codec,
                        timescale: c.timescale,
                        baseDts: c.baseDts,
                      },
                      c.type === WT.VIDEO
                        ? {
                            width: c.width,
                            height: c.height,
                            sarRatio: c.sarRatio,
                          }
                        : {
                            codec: c.codec,
                            channelCount: c.channelCount,
                            sampleRate: c.sampleRate,
                          }
                    ),
                  });
            }),
              KW.debug(u),
              e.warnings.forEach(function (c) {
                var d;
                switch (c.type) {
                  case tm.LARGE_AV_SHIFT:
                    d = Uo.LARGE_AV_FIRST_FRAME_GAP_DETECT;
                    break;
                  case tm.LARGE_VIDEO_GAP:
                    d = Uo.LARGE_VIDEO_DTS_GAP_DETECT;
                    break;
                  case tm.LARGE_VIDEO_GAP_BETWEEN_CHUNK:
                    d = Uo.MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT;
                }
                d &&
                  o.hls.emit(
                    Uo.STREAM_EXCEPTION,
                    is(is({}, c), {}, { type: d })
                  ),
                  KW.warn("video exception", c);
              }),
              n.warnings.forEach(function (c) {
                var d;
                switch (c.type) {
                  case tm.LARGE_AUDIO_GAP:
                    d = Uo.LARGE_AUDIO_DTS_GAP_DETECT;
                    break;
                  case tm.AUDIO_FILLED:
                    d = Uo.AUDIO_GAP_DETECT;
                    break;
                  case tm.AUDIO_DROPPED:
                    d = Uo.AUDIO_OVERLAP_DETECT;
                }
                d &&
                  o.hls.emit(
                    Uo.STREAM_EXCEPTION,
                    is(is({}, c), {}, { type: d })
                  ),
                  KW.warn("audio exception", c);
              }),
              e.samples.forEach(function (c) {
                c.keyframe && o.hls.emit(Uo.KEYFRAME, { pts: c.pts });
              }),
              r.seiSamples.forEach(function (c) {
                o.hls.emit(
                  Uo.SEI,
                  is(
                    is({}, c),
                    {},
                    {
                      originPts: c.originPts / 90,
                      sei: {
                        code: c.data.type,
                        content: c.data.payload,
                        dts: c.pts,
                      },
                    }
                  )
                );
              });
          },
        },
      ]),
      t
    );
  })(),
  KPn = ["data"],
  ZPn = ["data"],
  vRe = new yv("BufferService"),
  YPn = (function () {
    function t(f) {
      var p = this;
      pc(this, t),
        xn(this, "_decryptor", new WPn()),
        xn(this, "_transmuxer", null),
        xn(this, "_mse", null),
        xn(this, "_softVideo", null),
        xn(this, "_sourceCreated", !1),
        xn(this, "_needInitSegment", !0),
        xn(this, "_directAppend", !1),
        (this.hls = f),
        f.config.softDecode
          ? (this._softVideo = f.media)
          : ((this._mse = new Dh(null, { preferMMS: f.config.preferMMS })),
            f.config.url &&
              this._mse.bindMedia(f.media).then(function (g) {
                p.hls.emit(pa.MEDIASOURCE_OPENED, g);
              })),
        f.config.decryptor &&
          (this._decryptor.externalDecryptor = f.config.decryptor);
    }
    var e, n, r, i, o, l, u, c, d, h;
    return (
      gc(t, [
        {
          key: "baseDts",
          get: function () {
            var f, p, g;
            return (f = this._transmuxer) === null ||
              f === void 0 ||
              (p = f._demuxer) === null ||
              p === void 0 ||
              (g = p._fixer) === null ||
              g === void 0
              ? void 0
              : g._baseDts;
          },
        },
        {
          key: "nbSb",
          get: function () {
            var f;
            return (f = this._mse) !== null && f !== void 0 && f._sourceBuffer
              ? Object.keys(this._mse._sourceBuffer).length
              : 0;
          },
        },
        {
          key: "msIsOpened",
          get: function () {
            var f;
            return (f = this._mse) === null || f === void 0
              ? void 0
              : f.isOpened;
          },
        },
        {
          key: "msHasOpTasks",
          get: function () {
            var f;
            return (f = this._mse) === null || f === void 0
              ? void 0
              : f.hasOpTasks;
          },
        },
        {
          key: "msStreaming",
          get: function () {
            var f;
            return (f = this._mse) === null || f === void 0
              ? void 0
              : f.streaming;
          },
        },
        {
          key: "updateDuration",
          value:
            ((h = Qo(
              Ai().mark(function f(p) {
                return Ai().wrap(
                  function (g) {
                    for (;;)
                      switch ((g.prev = g.next)) {
                        case 0:
                          if ((vRe.debug("update duration", p), !this._mse)) {
                            g.next = 9;
                            break;
                          }
                          if (this._mse.isOpened) {
                            g.next = 5;
                            break;
                          }
                          return (g.next = 5), this._mse.open();
                        case 5:
                          return (g.next = 7), this._mse.updateDuration(p);
                        case 7:
                          g.next = 10;
                          break;
                        case 9:
                          this._softVideo && (this._softVideo.duration = p);
                        case 10:
                        case "end":
                          return g.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function (f) {
              return h.apply(this, arguments);
            }),
        },
        {
          key: "createSource",
          value: function (f, p, g, y) {
            if (!this._sourceCreated) {
              var v = f || p;
              if (v) {
                if (eje.probe(v))
                  this._transmuxer ||
                    (this._transmuxer = new yRe(
                      this.hls,
                      !1,
                      !this._softVideo,
                      this.hls.config.fixerConfig
                    ));
                else {
                  if (!ll.probe(v))
                    throw new Fl(
                      vo.OTHER,
                      null,
                      null,
                      null,
                      "unsupported stream"
                    );
                  if (this._softVideo)
                    this._transmuxer ||
                      (this._transmuxer = new yRe(
                        this.hls,
                        !0,
                        null,
                        this.hls.config.fixerConfig
                      ));
                  else {
                    this._directAppend = !0;
                    var b = !1;
                    f &&
                      !g &&
                      ll.findBox(f, ["moov", "trak"]).forEach(function (w) {
                        var k = ll.findBox(w.data, [
                          "trak",
                          "mdia",
                          "minf",
                          "stbl",
                          "stsd",
                        ])[0];
                        if (k) {
                          var D = ll.stsd(k).entries[0];
                          if (D) {
                            if (D.hvcC) g = D.hvcC.codec || "hev1.1.6.L93.B0";
                            else if (D.avcC) g = D.avcC.codec;
                            else if (D.sampleRate || D.esds) {
                              var $;
                              (y =
                                (($ = D.esds) === null || $ === void 0
                                  ? void 0
                                  : $.codec) || "mp4a.40.2"),
                                (b = !0);
                            }
                          }
                        }
                      }),
                      p &&
                        !y &&
                        ll
                          .findBox(p, [
                            "moov",
                            "trak",
                            "mdia",
                            "minf",
                            "stbl",
                            "stsd",
                          ])
                          .forEach(function (w) {
                            var k = ll.stsd(w).entries[0];
                            k && k.esds && (y = k.esds.codec);
                          }),
                      f && !g && (g = "avc1.42e01e"),
                      p && !y && (y = "mp4a.40.2"),
                      b && ((g += ", ".concat(y)), (y = "")),
                      this._createMseSource(g, y);
                  }
                }
                this._softVideo && (this._sourceCreated = !0);
              }
            }
          },
        },
        {
          key: "appendBuffer",
          value:
            ((d = Qo(
              Ai().mark(function f(p, g, y, v, b, w, k) {
                var D,
                  $,
                  N,
                  P,
                  I,
                  O,
                  X,
                  G,
                  H,
                  E,
                  S,
                  L,
                  W,
                  F,
                  oe,
                  De = this;
                return Ai().wrap(
                  function (Xe) {
                    for (;;)
                      switch ((Xe.prev = Xe.next)) {
                        case 0:
                          if (
                            (y != null && y.length) ||
                            (v != null && v.length)
                          ) {
                            Xe.next = 2;
                            break;
                          }
                          return Xe.abrupt("return");
                        case 2:
                          if (
                            ((D = function () {
                              var ze, ht;
                              (ze = De.hls) !== null &&
                                ze !== void 0 &&
                                ze.emit &&
                                ((ht = De.hls) === null ||
                                  ht === void 0 ||
                                  ht.emit(pa.APPEND_BUFFER, {
                                    start: p.start,
                                    end: p.end,
                                  }));
                            }),
                            !this._directAppend)
                          ) {
                            Xe.next = 8;
                            break;
                          }
                          return (
                            ($ = []),
                            y && $.push(this._mse.append(Dh.VIDEO, y)),
                            v && $.push(this._mse.append(Dh.AUDIO, v)),
                            Xe.abrupt("return", Promise.all($).then(D))
                          );
                        case 8:
                          if (
                            ((N = this._needInitSegment || b),
                            (P = this._transmuxer.transmux(
                              y,
                              v,
                              N,
                              w,
                              k,
                              this._needInitSegment || b
                            )),
                            (I = J1(P, 2)),
                            (O = I[0]),
                            (X = I[1]),
                            v && g && (g == null || g.setTrackExist(!1, !0)),
                            v && p && (p == null || p.setTrackExist(!0, !1)),
                            g || p == null || p.setTrackExist(!!O, !!X),
                            O && !X && this.hls.emit(Uo.NO_AUDIO_TRACK),
                            !this._softVideo)
                          ) {
                            Xe.next = 20;
                            break;
                          }
                          this._softVideo.appendBuffer(O, X),
                            (this._needInitSegment = !1),
                            D(),
                            (Xe.next = 32);
                          break;
                        case 20:
                          if (!this._mse) {
                            Xe.next = 32;
                            break;
                          }
                          return (
                            (G = !this._sourceCreated) &&
                              this._createMseSource(
                                O == null ? void 0 : O.codec,
                                X == null ? void 0 : X.codec,
                                X == null ? void 0 : X.container
                              ),
                            (this._needInitSegment = !1),
                            (H = this._mse),
                            (E = []),
                            N &&
                              !G &&
                              this._handleCodecChange(O, X).forEach(function (
                                ze
                              ) {
                                return E.push(ze);
                              }),
                            O &&
                              ((S = O.data),
                              (L = Dne(O, KPn)),
                              E.push(H.append(Dh.VIDEO, S, L))),
                            X &&
                              ((W = X.data),
                              (F = Dne(X, ZPn)),
                              E.push(H.append(Dh.AUDIO, W, F))),
                            (oe = Promise.all(E)).then(D),
                            Xe.abrupt("return", oe)
                          );
                        case 32:
                        case "end":
                          return Xe.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function (f, p, g, y, v, b, w) {
              return d.apply(this, arguments);
            }),
        },
        {
          key: "removeBuffer",
          value:
            ((c = Qo(
              Ai().mark(function f() {
                var p,
                  g,
                  y,
                  v = this,
                  b = arguments;
                return Ai().wrap(
                  function (w) {
                    for (;;)
                      switch ((w.prev = w.next)) {
                        case 0:
                          if (
                            ((p = b.length > 0 && b[0] !== void 0 ? b[0] : 0),
                            (g =
                              b.length > 1 && b[1] !== void 0 ? b[1] : 1 / 0),
                            (y = this.hls.media),
                            !(
                              !this._mse ||
                              !y ||
                              p < 0 ||
                              g < p ||
                              p >= this._mse.duration
                            ))
                          ) {
                            w.next = 5;
                            break;
                          }
                          return w.abrupt("return");
                        case 5:
                          return w.abrupt(
                            "return",
                            this._mse.clearBuffer(p, g).then(function () {
                              return v.hls.emit(pa.REMOVE_BUFFER, {
                                start: p,
                                end: g,
                                removeEnd: g,
                              });
                            })
                          );
                        case 6:
                        case "end":
                          return w.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function () {
              return c.apply(this, arguments);
            }),
        },
        {
          key: "evictBuffer",
          value:
            ((u = Qo(
              Ai().mark(function f(p) {
                var g, y, v;
                return Ai().wrap(
                  function (b) {
                    for (;;)
                      switch ((b.prev = b.next)) {
                        case 0:
                          if (
                            ((g = this.hls.media),
                            this._mse && g && p && !(p < 0))
                          ) {
                            b.next = 3;
                            break;
                          }
                          return b.abrupt("return");
                        case 3:
                          if (((y = g.currentTime), !((v = y - p) <= 0))) {
                            b.next = 7;
                            break;
                          }
                          return b.abrupt("return");
                        case 7:
                          if (!(Pf.start(Pf.get(g)) + 1 >= v)) {
                            b.next = 10;
                            break;
                          }
                          return b.abrupt("return");
                        case 10:
                          return b.abrupt("return", this.removeBuffer(0, v));
                        case 11:
                        case "end":
                          return b.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function (f) {
              return u.apply(this, arguments);
            }),
        },
        {
          key: "clearAllBuffer",
          value:
            ((l = Qo(
              Ai().mark(function f() {
                return Ai().wrap(
                  function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (!this._mse) {
                            p.next = 2;
                            break;
                          }
                          return p.abrupt("return", this._mse.clearAllBuffer());
                        case 2:
                        case "end":
                          return p.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function () {
              return l.apply(this, arguments);
            }),
        },
        {
          key: "decryptBuffer",
          value: function (f, p) {
            return this._decryptor.decrypt(f, p);
          },
        },
        {
          key: "reset",
          value:
            ((o = Qo(
              Ai().mark(function f() {
                var p,
                  g = arguments;
                return Ai().wrap(
                  function (y) {
                    for (;;)
                      switch ((y.prev = y.next)) {
                        case 0:
                          if (
                            ((p = g.length > 0 && g[0] !== void 0 && g[0]),
                            !this._mse || p)
                          ) {
                            y.next = 8;
                            break;
                          }
                          return (
                            (this._transmuxer = null),
                            (this._sourceCreated = !1),
                            (y.next = 6),
                            this._mse.unbindMedia()
                          );
                        case 6:
                          return (
                            (y.next = 8), this._mse.bindMedia(this.hls.media)
                          );
                        case 8:
                          (this._needInitSegment = !0),
                            (this._directAppend = !1);
                        case 10:
                        case "end":
                          return y.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function () {
              return o.apply(this, arguments);
            }),
        },
        {
          key: "endOfStream",
          value:
            ((i = Qo(
              Ai().mark(function f() {
                return Ai().wrap(
                  function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (!this._mse) {
                            p.next = 5;
                            break;
                          }
                          if (!this._sourceCreated) {
                            p.next = 5;
                            break;
                          }
                          return (p.next = 4), this._mse.endOfStream();
                        case 4:
                          this.hls.emit(pa.BUFFEREOS);
                        case 5:
                          this._softVideo && this._softVideo.endOfStream();
                        case 6:
                        case "end":
                          return p.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function () {
              return i.apply(this, arguments);
            }),
        },
        {
          key: "setLiveSeekableRange",
          value:
            ((r = Qo(
              Ai().mark(function f(p, g) {
                return Ai().wrap(
                  function (y) {
                    for (;;)
                      switch ((y.prev = y.next)) {
                        case 0:
                          this._mse && this._mse.setLiveSeekableRange(p, g);
                        case 1:
                        case "end":
                          return y.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function (f, p) {
              return r.apply(this, arguments);
            }),
        },
        {
          key: "detachMedia",
          value:
            ((n = Qo(
              Ai().mark(function f() {
                return Ai().wrap(
                  function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (!this._mse) {
                            p.next = 3;
                            break;
                          }
                          return (p.next = 3), this._mse.unbindMedia();
                        case 3:
                        case "end":
                          return p.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function () {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "destroy",
          value:
            ((e = Qo(
              Ai().mark(function f() {
                var p;
                return Ai().wrap(
                  function (g) {
                    for (;;)
                      switch ((g.prev = g.next)) {
                        case 0:
                          return (
                            (p = this._decryptor) === null ||
                              p === void 0 ||
                              p.destroy(),
                            (g.next = 3),
                            this.detachMedia()
                          );
                        case 3:
                          (this._decryptor = null),
                            (this._mse = null),
                            (this._softVideo = null);
                        case 6:
                        case "end":
                          return g.stop();
                      }
                  },
                  f,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "_createMseSource",
          value: function (f, p, g) {
            vRe.debug(
              "create mse source, videoCodec="
                .concat(f, ", audioCodec=")
                .concat(p)
            );
            var y = this._mse;
            y &&
              (f &&
                (y.createSource(Dh.VIDEO, "video/mp4;codecs=".concat(f)),
                (this._sourceCreated = !0)),
              p
                ? (y.createSource(Dh.AUDIO, "audio/mp4;codecs=".concat(p)),
                  (this._sourceCreated = !0))
                : g &&
                  (y.createSource(Dh.AUDIO, "".concat(g, ';codecs=""')),
                  (this._sourceCreated = !0)),
              this.hls.emit(pa.SOURCEBUFFER_CREATED));
          },
        },
        {
          key: "_handleCodecChange",
          value: function (f, p) {
            var g = [],
              y = this._mse;
            return (
              [
                { type: Dh.VIDEO, codecs: f == null ? void 0 : f.codec },
                { type: Dh.AUDIO, codecs: p == null ? void 0 : p.codec },
              ]
                .filter(function (v) {
                  return !!v.codecs;
                })
                .forEach(function (v) {
                  var b = v.type,
                    w = v.codecs,
                    k = y.getSourceBuffer(b);
                  if (k) {
                    var D = w.split(",")[0];
                    new RegExp(D, "ig").test(k.mimeType) ||
                      g.push(
                        y.changeType(b, "".concat(b, "/mp4;codecs=").concat(w))
                      );
                  }
                }),
              g
            );
          },
        },
        {
          key: "seamlessSwitch",
          value: function () {
            this._needInitSegment = !0;
          },
        },
        {
          key: "isFull",
          value: function () {
            var f,
              p =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : Dh.VIDEO;
            return (f = this._mse) === null || f === void 0
              ? void 0
              : f.isFull(p);
          },
        },
      ]),
      t
    );
  })();
function QPn(t) {
  var e = (t == null ? void 0 : t.media) || document.createElement("video");
  return is(
    is(
      {
        maxPlaylistSize: 50,
        retryCount: 3,
        retryDelay: 1e3,
        pollRetryCount: 2,
        loadTimeout: 1e4,
        manifestLoadTimeout: 1e4,
        preloadTime: 30,
        softDecode: !1,
        bufferBehind: 10,
        maxJumpDistance: 3,
        startTime: 0,
        useLowLatency: !0,
        targetLatency: 10,
        maxLatency: 20,
        allowedStreamTrackChange: !0,
        seiInTime: !1,
        manifestList: [],
        minSegmentsStartPlay: 3,
        preferMMS: !1,
        preferMMSStreaming: !1,
        mseLowLatency: !0,
        fixerConfig: { forceFixLargeGap: !1, largeGapThreshold: 5 },
      },
      t
    ),
    {},
    { media: e }
  );
}
var JPn = gc(function t() {
    pc(this, t),
      xn(this, "version", 0),
      xn(this, "streams", []),
      xn(this, "isMaster", !0);
  }),
  nje = {
    Audio: "AUDIO",
    Video: "VIDEO",
    SubTitle: "SUBTITLE",
    ClosedCaptions: "CLOSED-CAPTIONS",
  },
  o4 = {
    CLEAR_KEY: "org.w3.clearkey",
    FAIRPLAY: [
      "urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2",
      "com.apple.streamingkeydelivery",
    ],
    WIDEVINE: [
      "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",
      "com.widevine.alpha",
      "com.widevine",
    ],
    PLAYREADY: [
      "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",
      "com.microsoft.playready",
    ],
  };
function rje(t) {
  for (var e = [], n = 0; n < t.length; n++)
    Array.isArray(t[n]) ? (e = e.concat(rje(t[n]))) : e.push(t[n]);
  return e;
}
var Pue = gc(function t() {
    pc(this, t),
      xn(this, "id", 0),
      xn(this, "url", ""),
      xn(this, "default", !1),
      xn(this, "autoSelect", !1),
      xn(this, "forced", !1),
      xn(this, "group", ""),
      xn(this, "name", ""),
      xn(this, "lang", ""),
      xn(this, "segments", []),
      xn(this, "endSN", 0);
  }),
  qPn = (function (t) {
    $B(n, Pue);
    var e = xB(n);
    function n() {
      var r;
      pc(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        xn(fo((r = e.call.apply(e, [this].concat(o)))), "mediaType", nje.Audio),
        xn(fo(r), "channels", 0),
        r
      );
    }
    return gc(n);
  })(),
  eMn = (function (t) {
    $B(n, Pue);
    var e = xB(n);
    function n() {
      var r;
      pc(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        xn(
          fo((r = e.call.apply(e, [this].concat(o)))),
          "mediaType",
          nje.SubTitle
        ),
        r
      );
    }
    return gc(n);
  })(),
  tMn = gc(function t() {
    pc(this, t),
      xn(this, "id", 0),
      xn(this, "bitrate", 0),
      xn(this, "width", 0),
      xn(this, "height", 0),
      xn(this, "name", ""),
      xn(this, "url", ""),
      xn(this, "audioCodec", ""),
      xn(this, "videoCodec", ""),
      xn(this, "textCodec", ""),
      xn(this, "audioGroup", ""),
      xn(this, "audioStreams", []),
      xn(this, "subtitleStreams", []),
      xn(this, "closedCaptionsStream", []);
  }),
  nMn = gc(function t() {
    pc(this, t),
      xn(this, "version", 0),
      xn(this, "url", ""),
      xn(this, "type", ""),
      xn(this, "startCC", 0),
      xn(this, "endCC", 0),
      xn(this, "startSN", 0),
      xn(this, "endSN", 0),
      xn(this, "totalDuration", 0),
      xn(this, "targetDuration", 0),
      xn(this, "partTargetDuration", 0),
      xn(this, "canSkipUntil", 0),
      xn(this, "canSkipDateRanges", !1),
      xn(this, "skippedSegments", 0),
      xn(this, "canBlockReload", !1),
      xn(this, "partHoldBack", 0),
      xn(this, "live", !0),
      xn(this, "lowLatency", !1),
      xn(this, "endPartIndex", 0),
      xn(this, "segments", []),
      xn(this, "dateRanges", {}),
      xn(this, "skippedSegments", 0);
  }),
  s4 = (function () {
    function t(e) {
      pc(this, t),
        xn(this, "sn", 0),
        xn(this, "cc", 0),
        xn(this, "url", ""),
        xn(this, "parentUrl", ""),
        xn(this, "title", ""),
        xn(this, "start", 0),
        xn(this, "duration", 0),
        xn(this, "dataTime", ""),
        xn(this, "key", null),
        xn(this, "byteRange", null),
        xn(this, "isInitSegment", !1),
        xn(this, "initSegment", null),
        xn(this, "isLast", !1),
        xn(this, "hasAudio", !1),
        xn(this, "hasVideo", !1),
        xn(this, "independent", !1),
        xn(this, "partIndex", 0),
        (this.parentUrl = e);
    }
    return (
      gc(t, [
        {
          key: "end",
          get: function () {
            return this.start + this.duration;
          },
        },
        {
          key: "setTrackExist",
          value: function (e, n) {
            (this.hasVideo = e), (this.hasAudio = n);
          },
        },
        {
          key: "setByteRange",
          value: function (e, n) {
            this.byteRange = [0];
            var r = e.split("@");
            r.length === 1 && n && n.byteRange
              ? ((this.byteRange[0] = n.byteRange[1] || 0),
                this.byteRange[0] && (this.byteRange[0] += 1))
              : (this.byteRange[0] = parseInt(r[1])),
              (this.byteRange[1] = this.byteRange[0] + parseInt(r[0]) - 1);
          },
        },
      ]),
      t
    );
  })(),
  rMn = (function () {
    function t(e) {
      pc(this, t),
        xn(this, "method", ""),
        xn(this, "url", ""),
        xn(this, "iv", null),
        xn(this, "keyFormat", ""),
        xn(this, "keyFormatVersions", ""),
        e instanceof t &&
          ((this.method = e.method),
          (this.url = e.url),
          (this.keyFormat = e.keyFormat),
          (this.keyFormatVersions = e.keyFormatVersions),
          e.iv && (this.iv = new Uint8Array(e.iv)));
    }
    return (
      gc(t, [
        {
          key: "clone",
          value: function (e) {
            var n = new t(this);
            return e != null && n.setIVFromSN(e), n;
          },
        },
        {
          key: "setIVFromSN",
          value: function (e) {
            if (
              !this.iv &&
              this.method === "AES-128" &&
              typeof e == "number" &&
              this.url
            ) {
              this.iv = new Uint8Array(16);
              for (var n = 12; n < 16; n++)
                this.iv[n] = (e >> (8 * (15 - n))) & 255;
            }
          },
        },
        {
          key: "isSegmentEncrypted",
          value: function () {
            return this.method === "AES-128";
          },
        },
        {
          key: "isValidKeySystem",
          value: function () {
            return (
              rje([
                o4.CLEAR_KEY,
                o4.FAIRPLAY,
                o4.WIDEVINE,
                o4.PLAYREADY,
              ]).indexOf(this.keyFormat) > -1 &&
              ["SAMPLE-AES", "SAMPLE-AES-CENC", "SAMPLE-AES-CTR"].indexOf(
                this.method
              ) > -1
            );
          },
        },
        {
          key: "isSupported",
          value: function () {
            return (
              !!this.method &&
              (!!this.isSegmentEncrypted() || !!this.isValidKeySystem())
            );
          },
        },
      ]),
      t
    );
  })(),
  iMn = (function () {
    function t(e, n, r) {
      pc(this, t), (this.msn = e), (this.part = n), (this.skip = r);
    }
    return (
      gc(t, [
        {
          key: "addDirectives",
          value: function (e) {
            var n = new self.URL(e);
            return (
              this.msn !== void 0 &&
                n.searchParams.set("_HLS_msn", this.msn.toString()),
              this.part &&
                n.searchParams.set("_HLS_part", this.part.toString()),
              this.skip && n.searchParams.set("_HLS_skip", this.skip),
              n.href
            );
          },
        },
      ]),
      t
    );
  })(),
  aMn = /^#(EXT[^:]*)(?::(.*))?$/,
  bRe = /([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g,
  oMn = /^(?:[a-zA-Z0-9+\-.]+:)?\/\//,
  sMn = /^((?:[a-zA-Z0-9+\-.]+:)?\/\/[^/?#]*)?([^?#]*\/)?/;
function lMn(t) {
  return t
    .split(/[\r\n]/)
    .map(function (e) {
      return e.trim();
    })
    .filter(Boolean);
}
function ije(t) {
  var e = t.match(aMn);
  if (e && e[1]) return [e[1].replace("EXT-X-", ""), e[2]];
}
function Gy(t) {
  for (var e = {}, n = bRe.exec(t); n; )
    (e[n[1]] = n[2] || n[3]), (n = bRe.exec(t));
  return e;
}
function Rk(t, e) {
  if (!e || !t || oMn.test(t)) return t;
  var n = sMn.exec(e);
  return n ? (t[0] === "/" ? n[1] + t : n[1] + n[2] + t) : t;
}
var uMn = {
  audio: [/^mp4a/, /^vorbis$/, /^opus$/, /^flac$/, /^[ae]c-3$/],
  video: [/^avc/, /^hev/, /^hvc/, /^vp0?[89]/, /^av1$/],
  text: [/^vtt$/, /^wvtt/, /^stpp/],
};
function ZW(t, e) {
  var n = uMn[t];
  if (n && e && e.length) {
    for (var r = 0; r < n.length; r++)
      for (var i = 0; i < e.length; i++) if (n[r].test(e[i])) return e[i];
  }
}
function cMn(t, e) {
  var n;
  if (e) {
    for (var r in e)
      if (Object.prototype.hasOwnProperty.call(e, r) && t[r] !== e[r]) {
        n = r;
        break;
      }
  }
  var i = null;
  t.DURATION &&
    ((i = parseFloat(t.DURATION)),
    Number.isFinite(i)
      ? t._endDate &&
        (i = (t._endDate.getTime() - t._startDate.getTime()) / 1e3)
      : (i = null));
  var o = dMn(t.CUE || t["X-CUE"], { pre: !1, post: !1, once: !1 });
  return (
    !!t.ID &&
    !n &&
    Number.isFinite(t._startDate.getTime()) &&
    (i === null || i >= 0) &&
    (t.END_ON_NEXT !== "YES" || !!t.CLASS) &&
    (!t.CUE || (!o.pre && !o.post) || o.pre !== o.post) &&
    (t.CLASS !== "com.apple.hls.interstitial" ||
      "X-ASSET-URI" in t ||
      "X-ASSET-LIST" in t)
  );
}
function dMn(t, e) {
  return (t ? t.split(/[ ,]+/) : []).reduce(function (n, r) {
    return (n[r.toLowerCase()] = !0), n;
  }, e);
}
function hMn(t, e) {
  for (var n, r = new JPn(), i = 0, o = [], l = []; (n = t[i++]); ) {
    var u = ije(n);
    if (u) {
      var c = J1(u, 2),
        d = c[0],
        h = c[1];
      if (d === "VERSION") r.version = parseInt(h);
      else if (d === "MEDIA" && h) {
        var f = Gy(h),
          p = void 0;
        switch (f.TYPE) {
          case "AUDIO":
            p = new qPn();
            break;
          case "SUBTITLES":
            p = new eMn();
            break;
          default:
            p = new Pue();
        }
        (p.url = Rk(f.URI, e)),
          (p.default = f.DEFAULT === "YES"),
          (p.autoSelect = f.AUTOSELECT === "YES"),
          (p.group = f["GROUP-ID"]),
          (p.name = f.NAME),
          (p.lang = f.LANGUAGE),
          f.CHANNELS &&
            ((p.channels = Number(f.CHANNELS.split("/")[0])),
            Number.isNaN(p.channels) && (p.channels = 0)),
          f.TYPE === "AUDIO" && f.URI && o.push(p),
          f.TYPE === "SUBTITLES" && l.push(p);
      } else if (d === "STREAM-INF" && h) {
        var g = new tMn(),
          y = Gy(h);
        if (
          ((g.bitrate = parseInt(y["AVERAGE-BANDWIDTH"] || y.BANDWIDTH)),
          (g.name = y.NAME),
          (g.url = Rk(t[i++], e)),
          y.RESOLUTION)
        ) {
          var v = J1(y.RESOLUTION.split("x"), 2),
            b = v[0],
            w = v[1];
          (g.width = parseInt(b)), (g.height = parseInt(w));
        }
        if (y.CODECS) {
          var k = y.CODECS.split(/[ ,]+/).filter(Boolean);
          (g.videoCodec = ZW("video", k)),
            (g.audioCodec = ZW("audio", k)),
            (g.textCodec = ZW("text", k));
        }
        (g.audioGroup = y.AUDIO),
          (g.subtitleGroup = y.SUBTITLES),
          r.streams.push(g);
      }
    }
  }
  return (
    r.streams.forEach(function (D, $) {
      D.id = $;
    }),
    o.length &&
      (o.forEach(function (D, $) {
        D.id = $;
      }),
      r.streams.forEach(function (D) {
        D.audioGroup &&
          (D.audioStreams = o.filter(function ($) {
            return $.group === D.audioGroup;
          }));
      })),
    l.length &&
      (l.forEach(function (D, $) {
        D.id = $;
      }),
      r.streams.forEach(function (D) {
        D.subtitleGroup &&
          (D.subtitleStreams = l.filter(function ($) {
            return $.group === D.subtitleGroup;
          }));
      })),
    r
  );
}
function fMn(t, e, n) {
  var r = new nMn();
  r.url = e;
  for (
    var i,
      o = new s4(e),
      l = null,
      u = null,
      c = 0,
      d = 0,
      h = 0,
      f = 0,
      p = !1,
      g = 0;
    (i = t[f++]);

  )
    if (i[0] === "#") {
      var y = ije(i);
      if (y) {
        var v = J1(y, 2),
          b = v[0],
          w = v[1];
        switch (b) {
          case "VERSION":
            r.version = parseInt(w);
            break;
          case "PLAYLIST-TYPE":
            r.type = w == null ? void 0 : w.toUpperCase();
            break;
          case "TARGETDURATION":
            r.targetDuration = parseFloat(w);
            break;
          case "PART-INF":
            n && (r.lowLatency = !0);
            var k = Gy(w);
            k["PART-TARGET"] &&
              (r.partTargetDuration = parseFloat(k["PART-TARGET"]));
            break;
          case "SERVER-CONTROL":
            var D = Gy(w);
            (r.canBlockReload = D["CAN-BLOCK-RELOAD"] === "YES"),
              (r.partHoldBack = parseFloat(D["PART-HOLD-BACK"] || 0)),
              (r.canSkipUntil = parseFloat(D["CAN-SKIP-UNTIL"] || 0)),
              (r.canSkipDateRanges =
                r.canSkipUntil > 0 && D["CAN-SKIP-DATERANGES"] === "YES");
            break;
          case "ENDLIST":
            p = !0;
            break;
          case "MEDIA-SEQUENCE":
            d = r.startSN = parseInt(w);
            break;
          case "DISCONTINUITY-SEQUENCE":
            h = r.startCC = parseInt(w);
            break;
          case "DISCONTINUITY":
            h++;
            break;
          case "BYTERANGE":
            o.setByteRange(w, r.segments[r.segments.length - 1]);
            break;
          case "PART":
            if (!r.lowLatency) break;
            var $ = Gy(w);
            (o.duration = parseFloat($.DURATION)),
              (o.independent = $.INDEPENDENT === "YES"),
              (o.sn = d),
              (o.cc = h),
              (o.partIndex = g),
              (o.start = c),
              (o.duration = parseFloat($.DURATION)),
              (c += o.duration),
              (o.url = Rk($.URI, e)),
              u && (o.key = u.clone(d)),
              l && (o.initSegment = l),
              r.segments.push(o),
              (o = new s4(e)),
              g++;
            break;
          case "PRELOAD-HINT":
            var N = Gy(w);
            if (((r.preloadHint = N), N.TYPE === "PART" && N.URI)) {
              var P = N.URI.split(".ts")[0].split("-");
              (r.nextSN = P[3]), (r.nextIndex = P[P.length - 1]);
            }
            break;
          case "PROGRAM-DATE-TIME":
            o.dataTime = w;
            break;
          case "EXTINF":
            if (r.lowLatency) {
              g = 0;
              break;
            }
            var I = J1(w.split(","), 2),
              O = I[0],
              X = I[1];
            (o.start = c),
              (o.duration = parseFloat(O)),
              (c += o.duration),
              (o.title = X);
            break;
          case "KEY":
            var G = Gy(w);
            if (G.METHOD === "NONE") {
              u = null;
              break;
            }
            if (
              (((u = new rMn()).method = G.METHOD),
              (u.url = /^blob:/.test(G.URI) ? G.URI : Rk(G.URI, e)),
              (u.keyFormat = G.KEYFORMAT || "identity"),
              (u.keyFormatVersions = G.KEYFORMATVERSIONS),
              !u.isSupported())
            )
              throw new Error(
                "encrypt "
                  .concat(G.METHOD, "/")
                  .concat(G.KEYFORMAT, " is not supported")
              );
            if (G.IV) {
              var H = G.IV.slice(2);
              (H = (1 & H.length ? "0" : "") + H),
                (u.iv = new Uint8Array(H.length / 2));
              for (var E = 0, S = H.length / 2; E < S; E++)
                u.iv[E] = parseInt(H.slice(2 * E, 2 * E + 2), 16);
            }
            break;
          case "MAP":
            var L = Gy(w);
            (o.url = Rk(L.URI, e)),
              L.BYTERANGE && o.setByteRange(L.BYTERANGE),
              (o.isInitSegment = !0),
              (o.sn = 0),
              u && (o.key = u.clone(0)),
              (l = o),
              (o = new s4(e));
            break;
          case "SKIP":
            var W = Gy(w),
              F = parseInt(W["SKIPPED-SEGMENTS"], 10);
            F <= Number.MAX_SAFE_INTEGER &&
              ((r.skippedSegments += F), (d += F));
            break;
          case "DATERANGE":
            var oe = Gy(w),
              De = r.dateRanges[oe.ID];
            oe._startDate = De ? De._startDate : new Date(oe["START-DATE"]);
            var Xe =
              (De == null ? void 0 : De._endDate) || new Date(oe.END_DATE);
            Number.isFinite(Xe) && (oe._endDate = Xe),
              (cMn(oe, De) || r.skippedSegments) && (r.dateRanges[oe.ID] = oe);
        }
      }
    } else {
      if (r.lowLatency) {
        d++;
        continue;
      }
      (o.sn = d),
        (o.cc = h),
        (o.url = Rk(i, e)),
        u && (o.key = u.clone(d)),
        l && (o.initSegment = l),
        r.segments.push(o),
        (o = new s4(e)),
        d++;
    }
  r.segments = r.segments.filter(function (ht) {
    return ht.duration !== 0;
  });
  var ze = r.segments[r.segments.length - 1];
  return (
    ze &&
      (p && (ze.isLast = !0),
      (r.endSN = ze.sn),
      (r.endPartIndex = ze.partIndex)),
    p && (r.live = !1),
    (r.totalDuration = c),
    (r.endCC = h),
    r
  );
}
var l4 = (function () {
    function t() {
      pc(this, t);
    }
    return (
      gc(t, null, [
        {
          key: "parse",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : "",
              n = arguments.length > 1 ? arguments[1] : void 0,
              r = arguments.length > 2 ? arguments[2] : void 0;
            if (!e.includes("#EXTM3U")) throw new Error("Invalid m3u8 file");
            var i = lMn(e);
            return t.isMediaPlaylist(e) ? fMn(i, n, r) : hMn(i, n);
          },
        },
        {
          key: "isMediaPlaylist",
          value: function (e) {
            return (
              e.includes("#EXTINF:") || e.includes("#EXT-X-TARGETDURATION:")
            );
          },
        },
      ]),
      t
    );
  })(),
  pMn = (function () {
    function t(n) {
      var r = this;
      pc(this, t),
        xn(this, "_emitOnLoaded", function (d, h) {
          var f = d.response,
            p = d.options || {},
            g = p.firstByteTime,
            y = p.startTime,
            v = p.endTime,
            b = p.contentLength,
            w = v - y;
          r.hls.emit(pa.SPEED, { time: w, byteLength: b, url: h }),
            r.hls.emit(pa.LOAD_COMPLETE, { url: h, elapsed: w || 0 }),
            r.hls.emit(pa.TTFB, { url: h, responseUrl: f.url, elapsed: g - y }),
            r.hls.emit(pa.LOAD_RESPONSE_HEADERS, {
              headers: f.headers,
              url: h,
            });
        }),
        xn(this, "_onLoaderRetry", function (d, h) {
          r.hls.emit(Uo.LOAD_RETRY, { error: Fl.network(d), retryTime: h });
        }),
        (this.hls = n),
        (this._timer = null),
        (this._useLowLatency = n.config.useLowLatency);
      var i = this.hls.config,
        o = i.retryCount,
        l = i.retryDelay,
        u = i.manifestLoadTimeout,
        c = i.fetchOptions;
      (this._loader = new sI(
        is(
          is({}, c),
          {},
          {
            responseType: "text",
            retry: o,
            retryDelay: l,
            timeout: u,
            onRetryError: this._onLoaderRetry,
          }
        )
      )),
        (this._audioLoader = new sI(
          is(
            is({}, c),
            {},
            {
              responseType: "text",
              retry: o,
              retryDelay: l,
              timeout: u,
              onRetryError: this._onLoaderRetry,
            }
          )
        )),
        (this._subtitleLoader = new sI(
          is(
            is({}, c),
            {},
            {
              responseType: "text",
              retry: o,
              retryDelay: l,
              timeout: u,
              onRetryError: this._onLoaderRetry,
            }
          )
        ));
    }
    var e;
    return (
      gc(t, [
        {
          key: "load",
          value:
            ((e = Qo(
              Ai().mark(function n(r, i, o) {
                var l, u, c, d, h, f, p, g, y, v, b, w, k, D, $, N, P, I, O, X;
                return Ai().wrap(
                  function (G) {
                    for (;;)
                      switch ((G.prev = G.next)) {
                        case 0:
                          return (
                            (l = [this._loader.load(r)]),
                            i && l.push(this._audioLoader.load(i)),
                            o && l.push(this._subtitleLoader.load(o)),
                            (G.prev = 3),
                            (G.next = 6),
                            Promise.all(l)
                          );
                        case 6:
                          if (
                            ((g = G.sent),
                            (y = J1(g, 3)),
                            (v = y[0]),
                            (b = y[1]),
                            (w = y[2]),
                            v)
                          ) {
                            G.next = 13;
                            break;
                          }
                          return G.abrupt("return", []);
                        case 13:
                          this._emitOnLoaded(v, r),
                            (u = v.data),
                            (h = v.response.url || r),
                            i
                              ? ((c = b == null ? void 0 : b.data),
                                (d = w == null ? void 0 : w.data),
                                (f =
                                  (b == null ||
                                  (k = b.response) === null ||
                                  k === void 0
                                    ? void 0
                                    : k.url) || i),
                                (p =
                                  (w == null ||
                                  (D = w.response) === null ||
                                  D === void 0
                                    ? void 0
                                    : D.url) || o),
                                c && this._emitOnLoaded(b, i),
                                d && this._emitOnLoaded(w, o))
                              : ((d = b == null ? void 0 : b.data),
                                (p =
                                  (b == null ||
                                  ($ = b.response) === null ||
                                  $ === void 0
                                    ? void 0
                                    : $.url) || o),
                                d && this._emitOnLoaded(b, o)),
                            (G.next = 22);
                          break;
                        case 19:
                          throw (
                            ((G.prev = 19),
                            (G.t0 = G.catch(3)),
                            Fl.network(G.t0))
                          );
                        case 22:
                          if (
                            ((N = this.hls.config.onPreM3U8Parse),
                            (G.prev = 23),
                            N &&
                              ((u = N(u) || u),
                              c && (c = N(c, !0) || c),
                              d && (d = N(d, !0) || d)),
                            (P = l4.parse(u, h, this._useLowLatency)),
                            ((X = P) === null || X === void 0
                              ? void 0
                              : X.live) !== !1 ||
                              !P.segments ||
                              P.segments.length)
                          ) {
                            G.next = 28;
                            break;
                          }
                          throw new Error("empty segments list");
                        case 28:
                          c && (I = l4.parse(c, f, this._useLowLatency)),
                            d && (O = l4.parse(d, p, this._useLowLatency)),
                            (G.next = 35);
                          break;
                        case 32:
                          throw (
                            ((G.prev = 32),
                            (G.t1 = G.catch(23)),
                            new Fl(vo.MANIFEST, vo.SUB_TYPES.HLS, G.t1))
                          );
                        case 35:
                          return (
                            P &&
                              (P.isMaster
                                ? this.hls.emit(Uo.HLS_MANIFEST_LOADED, {
                                    playlist: P,
                                  })
                                : (this._useLowLatency &&
                                    (P.canBlockReload
                                      ? (this.deliveryDirectives = new iMn(
                                          P.nextSN,
                                          P.nextIndex,
                                          ""
                                        ))
                                      : (this.deliveryDirectives = null)),
                                  this.hls.emit(Uo.HLS_LEVEL_LOADED, {
                                    playlist: P,
                                  }))),
                            G.abrupt("return", [P, I, O])
                          );
                        case 37:
                        case "end":
                          return G.stop();
                      }
                  },
                  n,
                  this,
                  [
                    [3, 19],
                    [23, 32],
                  ]
                );
              })
            )),
            function (n, r, i) {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "parseText",
          value: function (n, r) {
            var i,
              o = this.hls.config.onPreM3U8Parse;
            try {
              var l;
              if (
                (o && (n = o(n) || n),
                ((l = i = l4.parse(n, r, this._useLowLatency)) === null ||
                l === void 0
                  ? void 0
                  : l.live) === !1 &&
                  i.segments &&
                  !i.segments.length)
              )
                throw new Error("empty segments list");
            } catch (u) {
              throw new Fl(vo.MANIFEST, vo.SUB_TYPES.HLS, u);
            }
            return (
              i &&
                (i.isMaster
                  ? this.hls.emit(Uo.HLS_MANIFEST_LOADED, { playlist: i })
                  : this.hls.emit(Uo.HLS_LEVEL_LOADED, { playlist: i })),
              [i]
            );
          },
        },
        {
          key: "poll",
          value: function (n, r, i, o, l, u) {
            var c = this;
            clearTimeout(this._timer), (u = u || 3e3);
            var d = this.hls.config.pollRetryCount,
              h = (function () {
                var f = Qo(
                  Ai().mark(function p() {
                    var g, y;
                    return Ai().wrap(
                      function (v) {
                        for (;;)
                          switch ((v.prev = v.next)) {
                            case 0:
                              return (
                                clearTimeout(c._timer),
                                (g = n),
                                (v.prev = 2),
                                c.deliveryDirectives &&
                                  (g = c.deliveryDirectives.addDirectives(n)),
                                (v.next = 6),
                                c.load(g, r, i)
                              );
                            case 6:
                              if ((y = v.sent)[0]) {
                                v.next = 9;
                                break;
                              }
                              return v.abrupt("return");
                            case 9:
                              (d = c.hls.config.pollRetryCount),
                                o(y[0], y[1], y[2]),
                                (v.next = 17);
                              break;
                            case 13:
                              (v.prev = 13),
                                (v.t0 = v.catch(2)),
                                --d <= 0 && l(v.t0);
                            case 17:
                              c._timer = setTimeout(h, u);
                            case 18:
                            case "end":
                              return v.stop();
                          }
                      },
                      p,
                      null,
                      [[2, 13]]
                    );
                  })
                );
                return function () {
                  return f.apply(this, arguments);
                };
              })();
            this._timer = setTimeout(h, u);
          },
        },
        {
          key: "stopPoll",
          value: function () {
            return clearTimeout(this._timer), this.cancel();
          },
        },
        {
          key: "cancel",
          value: function () {
            return Promise.all([
              this._loader.cancel(),
              this._audioLoader.cancel(),
            ]);
          },
        },
      ]),
      t
    );
  })();
function aje(t, e, n) {
  return e > n && (n = e), Math.min(Math.max(t, e), n);
}
var YW = new yv("playlist"),
  _Re = (function () {
    function t(e, n, r) {
      pc(this, t),
        xn(this, "live", void 0),
        xn(this, "id", 0),
        xn(this, "bitrate", 0),
        xn(this, "width", 0),
        xn(this, "height", 0),
        xn(this, "name", ""),
        xn(this, "url", ""),
        xn(this, "audioCodec", ""),
        xn(this, "videoCodec", ""),
        xn(this, "textCodec", ""),
        xn(this, "startCC", 0),
        xn(this, "endCC", 0),
        xn(this, "startSN", 0),
        xn(this, "endSN", -1),
        xn(this, "totalDuration", 0),
        xn(this, "targetDuration", 0),
        xn(this, "partTargetDuration", 0),
        xn(this, "canSkipUntil", 0),
        xn(this, "canSkipDateRanges", !1),
        xn(this, "skippedSegments", 0),
        xn(this, "canBlockReload", !1),
        xn(this, "partHoldBack", 0),
        xn(this, "lowLatency", !1),
        xn(this, "endPartIndex", 0),
        xn(this, "snDiff", null),
        xn(this, "segments", []),
        xn(this, "audioStreams", []),
        xn(this, "subtitleStreams", []),
        xn(this, "closedCaptions", []),
        xn(this, "currentAudioStream", null),
        xn(this, "currentSubtitleStream", null),
        this.update(this._setLLPlaybackPoint(e), n, r);
    }
    return (
      gc(t, [
        {
          key: "lastSegment",
          get: function () {
            return this.segments.length
              ? this.segments[this.segments.length - 1]
              : null;
          },
        },
        {
          key: "segmentDuration",
          get: function () {
            var e;
            return (
              this.targetDuration ||
              ((e = this.segments[0]) === null || e === void 0
                ? void 0
                : e.duration) ||
              0
            );
          },
        },
        {
          key: "liveEdge",
          get: function () {
            return this.endTime;
          },
          set: function (e) {
            this.endTime = e;
          },
        },
        {
          key: "endTime",
          get: function () {
            var e;
            return (
              ((e = this.lastSegment) === null || e === void 0
                ? void 0
                : e.end) || 0
            );
          },
          set: function (e) {
            var n = this.lastSegment;
            n && (n.duration = e - n.start);
          },
        },
        {
          key: "currentSubtitleEndSn",
          get: function () {
            var e;
            return (
              ((e = this.currentSubtitleStream) === null || e === void 0
                ? void 0
                : e.endSN) || 0
            );
          },
        },
        {
          key: "clearOldSegment",
          value: function (e, n) {
            return (
              this.currentAudioStream && this._clearSegments(e, n),
              this._clearSegments(e, n)
            );
          },
        },
        {
          key: "getAudioSegment",
          value: function (e) {
            if (e && this.currentAudioStream) {
              var n = e.sn - this.snDiff;
              return this.currentAudioStream.segments.find(function (r) {
                return r.sn === n;
              });
            }
          },
        },
        {
          key: "update",
          value: function (e, n) {
            (this.url = e.url),
              Array.isArray(e.segments)
                ? ((this.live !== null && this.live !== void 0) ||
                    (this.live = e.live),
                  this._updateSegments(e, this),
                  (this.startCC = e.startCC),
                  (this.endCC = e.endCC),
                  (this.startSN = e.startSN),
                  (this.endSN = e.endSN || -1),
                  (this.totalDuration = e.totalDuration),
                  (this.targetDuration = e.targetDuration),
                  (this.live = e.live),
                  (this.lowLatency = e.lowLatency),
                  (this.canBlockReload = e.canBlockReload),
                  (this.canSkipDateRanges = e.canSkipDateRanges),
                  (this.canSkipUntil = e.canSkipUntil),
                  (this.partHoldBack = e.partHoldBack),
                  (this.partTargetDuration = e.partTargetDuration),
                  (this.skippedSegments = e.skippedSegments),
                  (this.endPartIndex = e.endPartIndex),
                  n &&
                    this.currentAudioStream &&
                    Array.isArray(n.segments) &&
                    (this._updateSegments(n, this.currentAudioStream),
                    (this.snDiff === null || this.snDiff === void 0) &&
                      e.segments.length &&
                      n.segments.length &&
                      (this.snDiff = e.segments[0].sn - n.segments[0].sn)))
                : ((this.id = e.id),
                  (this.bitrate = e.bitrate),
                  (this.width = e.width),
                  (this.height = e.height),
                  (this.name = e.name),
                  (this.audioCodec = e.audioCodec),
                  (this.videoCodec = e.videoCodec),
                  (this.textCodec = e.textCodec),
                  (this.audioStreams = e.audioStreams),
                  (this.subtitleStreams = e.subtitleStreams),
                  !this.currentAudioStream &&
                    this.audioStreams.length &&
                    (this.currentAudioStream =
                      this.audioStreams.find(function (r) {
                        return r.default;
                      }) || this.audioStreams[0]),
                  !this.currentSubtitleStream &&
                    this.subtitleStreams.length &&
                    (this.currentSubtitleStream =
                      this.subtitleStreams.find(function (r) {
                        return r.default;
                      }) || this.subtitleStreams[0]));
          },
        },
        {
          key: "updateSubtitle",
          value: function (e) {
            var n = this;
            if (e && this.currentSubtitleStream && Array.isArray(e.segments)) {
              var r = this._updateSegments(e, this.currentSubtitleStream),
                i = this.currentSubtitleStream.segments;
              if (
                (i.length > 100 &&
                  (this.currentSubtitleStream.segments = i.slice(100)),
                r)
              )
                return r.map(function (o) {
                  return {
                    sn: o.sn,
                    url: o.url,
                    duration: o.duration,
                    start: o.start,
                    end: o.end,
                    lang: n.currentSubtitleStream.lang,
                  };
                });
            }
          },
        },
        {
          key: "switchSubtitle",
          value: function (e) {
            var n = this.subtitleStreams.find(function (i) {
                return i.lang === e;
              }),
              r = this.currentSubtitleStream;
            n && ((this.currentSubtitleStream = n), (r.segments = []));
          },
        },
        {
          key: "_setLLPlaybackPoint",
          value: function (e) {
            if (!e.lowLatency || !e.segments.length) return e;
            for (
              var n = e.totalDuration - e.partHoldBack,
                r = e.segments,
                i = 0,
                o = 0,
                l = r.length;
              o < l;
              o++
            )
              r[o].start <= n && r[o].independent && (i = o);
            var u = r.slice(i),
              c = 0;
            return (
              u.forEach(function (d) {
                (d.start = c), (c = d.end);
              }),
              (e.segments = u),
              (e.totalDuration = c),
              (e.startSN = u[0].sn),
              (e.startCC = u[0].cc),
              YW.log(
                "set ll-hls playback point: SN="
                  .concat(e.startSN, " partIndex=")
                  .concat(u[0].partIndex, ", duration=")
                  .concat(c)
              ),
              e
            );
          },
        },
        {
          key: "_clearSegments",
          value: function (e, n) {
            for (var r = 0, i = this.segments, o = 0, l = i.length; o < l; o++)
              if (i[o].end >= e) {
                r = o;
                break;
              }
            return (
              r > n && (r = n),
              r &&
                ((this.segments = this.segments.slice(r)),
                this.currentAudioStream &&
                  (this.currentAudioStream.segments =
                    this.currentAudioStream.segments.slice(r))),
              n - r
            );
          },
        },
        {
          key: "_updateSegments",
          value: function (e, n) {
            var r = n.segments;
            if (this.live) {
              var i,
                o = e.lowLatency,
                l = r[r.length - 1],
                u =
                  (i = l == null ? void 0 : l.sn) !== null && i !== void 0
                    ? i
                    : -1,
                c = (l == null ? void 0 : l.partIndex) || 0,
                d = u < e.endSN && e.segments.length;
              if ((o && (d = d || c < e.endPartIndex), d)) {
                YW.log(
                  "update segments: endSN:"
                    .concat(u, ", partIndex:")
                    .concat(c, " --> endSN:")
                    .concat(e.endSN, ", partIndex:")
                    .concat(e.endPartIndex)
                );
                var h = e.segments.findIndex(function (v) {
                    return v.sn === u && v.partIndex === c;
                  }),
                  f = h < 0 ? e.segments : e.segments.slice(h + 1);
                if (r.length && f.length) {
                  var p = l.end,
                    g = p;
                  f.forEach(function (v) {
                    (v.start = p), (p = v.end);
                  }),
                    YW.log("liveEdge: ".concat(g, " -> ").concat(p));
                  var y = (l == null ? void 0 : l.cc) || -1;
                  y > f[0].cc &&
                    f.forEach(function (v) {
                      return (v.cc += y);
                    });
                }
                return (n.endSN = e.endSN), (n.segments = r.concat(f)), f;
              }
            } else n.segments = e.segments;
          },
        },
      ]),
      t
    );
  })(),
  gMn = (function () {
    function t(e) {
      pc(this, t),
        xn(this, "streams", []),
        xn(this, "currentStream", null),
        xn(this, "dvrWindow", 0),
        xn(this, "_segmentPointer", -1),
        (this.hls = e);
    }
    return (
      gc(t, [
        {
          key: "lowLatency",
          get: function () {
            var e;
            return (e = this.currentStream) === null || e === void 0
              ? void 0
              : e.lowLatency;
          },
        },
        {
          key: "lastSegment",
          get: function () {
            var e;
            return (e = this.currentStream) === null || e === void 0
              ? void 0
              : e.lastSegment;
          },
        },
        {
          key: "currentSegment",
          get: function () {
            var e;
            return (e = this.currentSegments) === null || e === void 0
              ? void 0
              : e[this._segmentPointer];
          },
        },
        {
          key: "nextSegment",
          get: function () {
            var e;
            return (e = this.currentSegments) === null || e === void 0
              ? void 0
              : e[this._segmentPointer + 1];
          },
        },
        {
          key: "currentSegments",
          get: function () {
            var e;
            return (e = this.currentStream) === null || e === void 0
              ? void 0
              : e.segments;
          },
        },
        {
          key: "currentSubtitleEndSn",
          get: function () {
            var e;
            return (e = this.currentStream) === null || e === void 0
              ? void 0
              : e.currentSubtitleEndSn;
          },
        },
        {
          key: "liveEdge",
          get: function () {
            var e;
            return (e = this.currentStream) === null || e === void 0
              ? void 0
              : e.liveEdge;
          },
          set: function (e) {
            this.currentStream && (this.currentStream.liveEdge = e);
          },
        },
        {
          key: "totalDuration",
          get: function () {
            var e;
            return (
              ((e = this.currentStream) === null || e === void 0
                ? void 0
                : e.totalDuration) || 0
            );
          },
        },
        {
          key: "seekRange",
          get: function () {
            var e = this.currentSegments;
            if (e && e.length) return [e[0].start, e[e.length - 1].end];
          },
        },
        {
          key: "nbSegments",
          get: function () {
            var e;
            return (
              ((e = this.currentSegments) === null || e === void 0
                ? void 0
                : e.length) || 0
            );
          },
        },
        {
          key: "isEmpty",
          get: function () {
            var e;
            return !(
              (e = this.currentSegments) !== null &&
              e !== void 0 &&
              e.length
            );
          },
        },
        {
          key: "isLive",
          get: function () {
            var e;
            return (e = this.currentStream) === null || e === void 0
              ? void 0
              : e.live;
          },
        },
        {
          key: "hadSegmentLoaded",
          get: function () {
            return this._segmentPointer !== -1;
          },
        },
        {
          key: "hasSubtitle",
          get: function () {
            var e;
            return !(
              (e = this.currentStream) === null ||
              e === void 0 ||
              !e.currentSubtitleStream
            );
          },
        },
        {
          key: "getAudioSegment",
          value: function (e) {
            var n;
            return (n = this.currentStream) === null || n === void 0
              ? void 0
              : n.getAudioSegment(e);
          },
        },
        {
          key: "moveSegmentPointer",
          value: function (e) {
            var n;
            e == null && (e = this._segmentPointer + 1),
              (this._segmentPointer = aje(
                e,
                -1,
                (n = this.currentSegments) === null || n === void 0
                  ? void 0
                  : n.length
              ));
          },
        },
        {
          key: "reset",
          value: function () {
            (this.streams = []),
              (this.currentStream = null),
              (this.dvrWindow = 0),
              (this._segmentPointer = -1);
          },
        },
        {
          key: "getSegmentByIndex",
          value: function (e) {
            var n;
            return (n = this.currentSegments) === null || n === void 0
              ? void 0
              : n[e];
          },
        },
        {
          key: "setNextSegmentByIndex",
          value: function () {
            var e =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : 0;
            this._segmentPointer = e - 1;
          },
        },
        {
          key: "setNextSegmentBySN",
          value: function () {
            var e,
              n =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 0,
              r =
                (e = this.currentSegments) === null || e === void 0
                  ? void 0
                  : e.findIndex(function (i) {
                      return i.sn === n;
                    });
            return r !== -1 && this.setNextSegmentByIndex(r + 1), r;
          },
        },
        {
          key: "findSegmentIndexByTime",
          value: function (e) {
            var n = this.currentSegments;
            if (n) {
              for (var r, i = 0, o = n.length; i < o; i++)
                if (e >= (r = n[i]).start && e < r.end) return i;
              var l = n[n.length - 1];
              if (Math.abs(e - (l == null ? void 0 : l.end)) < 0.2)
                return n.length - 1;
            }
          },
        },
        {
          key: "upsertPlaylist",
          value: function (e, n, r) {
            var i = this;
            if (e) {
              if (e.isMaster)
                (this.streams.length = e.streams.length),
                  e.streams
                    .filter(function (u) {
                      return u.url;
                    })
                    .forEach(function (u, c) {
                      i.streams[c]
                        ? i.streams[c].update(u)
                        : (i.streams[c] = new _Re(u));
                    }),
                  (this.currentStream = this.streams[0]);
              else if (Array.isArray(e.segments)) {
                var o = this.currentStream;
                if (o) {
                  o.update(e, n, r);
                  var l = o.updateSubtitle(r);
                  l && this.hls.emit(Uo.SUBTITLE_SEGMENTS, { list: l });
                } else
                  this.reset(),
                    (this.currentStream = this.streams[0] = new _Re(e, n, r));
              }
              this.currentStream &&
                this.hls.isLive &&
                !this.dvrWindow &&
                (this.dvrWindow = this.currentSegments.reduce(function (u, c) {
                  return (u += c.duration);
                }, 0));
            }
          },
        },
        {
          key: "updateSegmentsRanges",
          value: function (e, n) {
            var r;
            ((r = this.currentSegments) === null || r === void 0
              ? void 0
              : r.filter(function (i) {
                  return i.sn >= e;
                })
            ).forEach(function (i) {
              (i.start = n), (n = i.end);
            });
          },
        },
        {
          key: "switchSubtitle",
          value: function (e) {
            var n;
            (n = this.currentStream) === null ||
              n === void 0 ||
              n.switchSubtitle(e);
          },
        },
        {
          key: "clearOldSegment",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : this.hls.config.maxPlaylistSize || 50,
              n = this.currentStream;
            if (this.dvrWindow && n) {
              var r = n.endTime - this.dvrWindow;
              r <= 0 ||
                n.segments.length <= e ||
                (this._segmentPointer = n.clearOldSegment(
                  r,
                  this._segmentPointer
                ));
            }
          },
        },
        {
          key: "checkSegmentTrackChange",
          value: function (e, n) {
            var r = this.findSegmentIndexByTime(e),
              i = this.getSegmentByIndex(r);
            if (i && (i.hasAudio || i.hasVideo)) {
              if (n !== 2 && i.hasAudio && i.hasVideo) return i;
              if (!(i.end - e > 0.3)) {
                var o = this.getSegmentByIndex(r + 1);
                if (o && (o.hasAudio || o.hasVideo))
                  return o.hasAudio !== i.hasAudio || o.hasVideo !== i.hasVideo
                    ? o
                    : void 0;
              }
            }
          },
        },
        {
          key: "feedbackLiveEdge",
          value: function (e, n) {
            var r;
            this.currentSegments &&
              (((r = this.lastSegment) === null || r === void 0
                ? void 0
                : r.sn) === e.sn
                ? (this.liveEdge = n)
                : this.updateSegmentsRanges(e.sn + 1, n));
          },
        },
      ]),
      t
    );
  })(),
  mMn = (function () {
    function t(r) {
      var i = this;
      pc(this, t),
        xn(this, "error", null),
        xn(this, "_emitOnLoaded", function (h, f) {
          var p = h.data,
            g = h.response,
            y = h.options || {},
            v = y.firstByteTime,
            b = y.startTime,
            w = y.endTime,
            k = y.contentLength,
            D = w - b;
          i._bandwidthService.addRecord(k || p.byteLength, D),
            i.hls.emit(pa.SPEED, { time: D, byteLength: k, url: f }),
            i.hls.emit(pa.LOAD_COMPLETE, { url: f, elapsed: D || 0 }),
            i.hls.emit(pa.TTFB, { url: f, responseUrl: g.url, elapsed: v - b }),
            i.hls.emit(pa.LOAD_RESPONSE_HEADERS, {
              headers: g.headers,
              url: f,
            });
        }),
        xn(this, "_onLoaderRetry", function (h, f) {
          i.hls.emit(pa.LOAD_RETRY, { error: Fl.network(h), retryTime: f });
        }),
        (this.hls = r),
        (this._bandwidthService = new cPn()),
        (this._mapCache = {}),
        (this._keyCache = {});
      var o = this.hls.config,
        l = o.retryCount,
        u = o.retryDelay,
        c = o.loadTimeout,
        d = o.fetchOptions;
      (this._segmentLoader = new sI(
        is(
          is({}, d),
          {},
          {
            responseType: "arraybuffer",
            retry: l,
            retryDelay: u,
            timeout: c,
            onRetryError: this._onLoaderRetry,
          }
        )
      )),
        (this._audioSegmentLoader = new sI(
          is(
            is({}, d),
            {},
            {
              responseType: "arraybuffer",
              retry: l,
              retryDelay: u,
              timeout: c,
              onRetryError: this._onLoaderRetry,
            }
          )
        )),
        (this._keyLoader = new sI(
          is(
            is({}, d),
            {},
            {
              responseType: "arraybuffer",
              retry: l,
              retryDelay: u,
              timeout: c,
              onRetryError: this._onLoaderRetry,
            }
          )
        ));
    }
    var e, n;
    return (
      gc(t, [
        {
          key: "speedInfo",
          value: function () {
            return {
              speed: this._bandwidthService.getLatestSpeed(),
              avgSpeed: this._bandwidthService.getAvgSpeed(),
            };
          },
        },
        {
          key: "load",
          value: function (r, i, o) {
            var l =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : o,
              u = [];
            return (
              r && (u[0] = this.loadVideoSegment(r, o)),
              i && (u[1] = this.loadAudioSegment(i, l)),
              Promise.all(u)
            );
          },
        },
        {
          key: "loadVideoSegment",
          value: function (r, i) {
            return this._loadSegment(this._segmentLoader, r, i);
          },
        },
        {
          key: "loadAudioSegment",
          value: function (r, i) {
            return this._loadSegment(this._audioSegmentLoader, r, i);
          },
        },
        {
          key: "_loadSegment",
          value:
            ((n = Qo(
              Ai().mark(function r(i, o, l) {
                var u,
                  c,
                  d,
                  h,
                  f,
                  p,
                  g,
                  y,
                  v,
                  b,
                  w,
                  k,
                  D,
                  $,
                  N,
                  P = this;
                return Ai().wrap(
                  function (I) {
                    for (;;)
                      switch ((I.prev = I.next)) {
                        case 0:
                          return (
                            (g = []),
                            this.hls.emit(pa.LOAD_START, { url: o.url }),
                            (g[0] = i.load(o.url)),
                            l &&
                              o.initSegment &&
                              ((v = o.initSegment.url),
                              (c = this._mapCache[v]) ||
                                (this.hls.emit(pa.LOAD_START, { url: v }),
                                (g[1] = i.load(v).then(function (O) {
                                  O &&
                                    (Object.keys(P._mapCache) > 30 &&
                                      (P._mapCache = {}),
                                    (c = P._mapCache[v] = O.data),
                                    P._emitOnLoaded(O, v));
                                }))),
                              (b =
                                (y = o.initSegment.key) === null || y === void 0
                                  ? void 0
                                  : y.url) &&
                                ((p = o.initSegment.key.iv),
                                (f = this._keyCache[b]) ||
                                  (this.hls.emit(pa.LOAD_START, { url: b }),
                                  (g[2] = this._keyLoader
                                    .load(b)
                                    .then(function (O) {
                                      O &&
                                        ((f = P._keyCache[b] = O.data),
                                        P._emitOnLoaded(O, b));
                                    }))))),
                            (w =
                              (u = o.key) === null || u === void 0
                                ? void 0
                                : u.url) &&
                              o.key.isSegmentEncrypted() &&
                              ((h = o.key.iv),
                              (d = this._keyCache[w]) ||
                                (this.hls.emit(pa.LOAD_START, { url: w }),
                                (g[3] = this._keyLoader
                                  .load(w)
                                  .then(function (O) {
                                    O &&
                                      ((d = P._keyCache[w] = O.data),
                                      P._emitOnLoaded(O, w));
                                  })))),
                            (I.next = 8),
                            Promise.all(g)
                          );
                        case 8:
                          if (((k = I.sent), (D = J1(k, 1)), ($ = D[0]))) {
                            I.next = 13;
                            break;
                          }
                          return I.abrupt("return");
                        case 13:
                          return (
                            (N = $.data),
                            this._emitOnLoaded($, o.url),
                            I.abrupt("return", {
                              data: N,
                              map: c,
                              key: d,
                              mapKey: f,
                              keyIv: h,
                              mapKeyIv: p,
                            })
                          );
                        case 16:
                        case "end":
                          return I.stop();
                      }
                  },
                  r,
                  this
                );
              })
            )),
            function (r, i, o) {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "reset",
          value: function () {
            (this.error = null),
              (this._mapCache = {}),
              (this._keyCache = {}),
              this._bandwidthService.reset();
          },
        },
        {
          key: "cancel",
          value:
            ((e = Qo(
              Ai().mark(function r() {
                return Ai().wrap(
                  function (i) {
                    for (;;)
                      switch ((i.prev = i.next)) {
                        case 0:
                          return (
                            (i.next = 2),
                            Promise.all([
                              this._keyLoader.cancel(),
                              this._segmentLoader.cancel(),
                              this._audioSegmentLoader.cancel(),
                            ])
                          );
                        case 2:
                        case "end":
                          return i.stop();
                      }
                  },
                  r,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
      ]),
      t
    );
  })(),
  Yd = new yv("hls"),
  qI = (function (t) {
    $B(w, Pl);
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f,
      p,
      g,
      y,
      v,
      b = xB(w);
    function w(k) {
      var D;
      return (
        pc(this, w),
        xn(fo((D = b.call(this))), "version", w.version),
        xn(fo(D), "media", null),
        xn(fo(D), "config", null),
        xn(fo(D), "_manifestLoader", null),
        xn(fo(D), "_segmentLoader", null),
        xn(fo(D), "_playlist", null),
        xn(fo(D), "_bufferService", null),
        xn(fo(D), "_gapService", null),
        xn(fo(D), "_seiService", null),
        xn(fo(D), "_stats", null),
        xn(fo(D), "_prevSegSn", null),
        xn(fo(D), "_prevSegCc", null),
        xn(fo(D), "_tickTimer", null),
        xn(fo(D), "_tickInterval", 500),
        xn(fo(D), "_segmentProcessing", !1),
        xn(fo(D), "_reloadOnPlay", !1),
        xn(fo(D), "_switchUrlOpts", null),
        xn(fo(D), "_isProcessQuotaExceeded", !1),
        xn(
          fo(D),
          "_loadSegment",
          Qo(
            Ai().mark(function $() {
              var N, P, I, O, X, G, H, E;
              return Ai().wrap(function (S) {
                for (;;)
                  switch ((S.prev = S.next)) {
                    case 0:
                      if (!D._segmentProcessing && D.media) {
                        S.next = 2;
                        break;
                      }
                      return S.abrupt("return");
                    case 2:
                      if (
                        ((N = D._playlist),
                        (P = N.nextSegment),
                        (I = N.lastSegment),
                        (O = fo(D)),
                        (X = O.config),
                        (G = Math.min(
                          Math.max(
                            (I == null ? void 0 : I.duration) - 0.008 || 0,
                            0.016
                          ),
                          0.1
                        )),
                        P)
                      ) {
                        S.next = 8;
                        break;
                      }
                      return S.abrupt("return");
                    case 8:
                      if (D.isLive) {
                        S.next = 18;
                        break;
                      }
                      if (
                        ((H = D.bufferInfo()),
                        D.media.paused &&
                          !D.media.currentTime &&
                          (H = D.bufferInfo(H.nextStart || 0.5)),
                        (E = Math.abs(H.end - D.media.duration) < G),
                        !(H.remaining >= X.preloadTime || E))
                      ) {
                        S.next = 15;
                        break;
                      }
                      return D._tryEos(), S.abrupt("return");
                    case 15:
                      if (
                        !X.preferMMSStreaming ||
                        D._bufferService.msStreaming
                      ) {
                        S.next = 17;
                        break;
                      }
                      return S.abrupt("return");
                    case 17:
                      !D._urlSwitching &&
                        D._prevSegSn !== P.sn - 1 &&
                        H.end &&
                        Math.abs(P.start - H.end) > 1 &&
                        D._playlist.setNextSegmentByIndex(
                          D._playlist.findSegmentIndexByTime(H.end + 0.1)
                        );
                    case 18:
                      return S.abrupt("return", D._loadSegmentDirect());
                    case 19:
                    case "end":
                      return S.stop();
                  }
              }, $);
            })
          )
        ),
        xn(fo(D), "_onLoadeddata", function () {
          D.isLive &&
            !D.config.mseLowLatency &&
            D.media.duration !== 1 / 0 &&
            D._bufferService.updateDuration(1 / 0).catch(function ($) {});
        }),
        xn(
          fo(D),
          "_onPlay",
          Qo(
            Ai().mark(function $() {
              return Ai().wrap(function (N) {
                for (;;)
                  switch ((N.prev = N.next)) {
                    case 0:
                      if (!D.media.seeking || D.media.currentTime !== 0) {
                        N.next = 3;
                        break;
                      }
                      return (
                        Yd.debug("replay currentTime 0, return"),
                        N.abrupt("return")
                      );
                    case 3:
                      if (
                        (clearTimeout(D._disconnectTimer), !D._reloadOnPlay)
                      ) {
                        N.next = 9;
                        break;
                      }
                      (D._reloadOnPlay = !1), D.replay(!0), (N.next = 12);
                      break;
                    case 9:
                      return (N.next = 11), D._loadSegment();
                    case 11:
                      D._startTick();
                    case 12:
                    case "end":
                      return N.stop();
                  }
              }, $);
            })
          )
        ),
        xn(fo(D), "_onPause", function () {
          if (D.isLive) {
            if (!D._reloadOnPlay) {
              var $ = D.config.disconnectTime;
              if (
                ($ == null && ($ = D._playlist.dvrWindow), !Number.isFinite($))
              )
                return;
              clearTimeout(D._disconnectTimer),
                (D._disconnectTimer = setTimeout(function () {
                  (D._reloadOnPlay = !0), D._clear();
                }, $ || 0));
            }
          } else D._stopTick();
        }),
        xn(
          fo(D),
          "_onSeeking",
          Qo(
            Ai().mark(function $() {
              var N, P, I, O, X, G, H;
              return Ai().wrap(function (E) {
                for (;;)
                  switch ((E.prev = E.next)) {
                    case 0:
                      if (D.media) {
                        E.next = 2;
                        break;
                      }
                      return E.abrupt("return");
                    case 2:
                      if (
                        (D._onCheckQuotaExceeded(),
                        (N = D.media.currentTime),
                        !(P = D._playlist.seekRange))
                      ) {
                        E.next = 10;
                        break;
                      }
                      if (
                        !(
                          (I = aje(
                            N,
                            P[0],
                            D.isLive ? P[1] : D.media.duration
                          )) >= 0 && Math.abs(N - I) >= 0.1
                        )
                      ) {
                        E.next = 10;
                        break;
                      }
                      return (D.media.currentTime = I), E.abrupt("return");
                    case 10:
                      if (
                        ((O = D._playlist.currentSegment),
                        (X = Pf.info(Pf.get(D.media), N, 0.1)),
                        !O)
                      ) {
                        E.next = 17;
                        break;
                      }
                      if (!(X.end && Math.abs(X.end - O.end) < 0.2)) {
                        E.next = 15;
                        break;
                      }
                      return E.abrupt("return");
                    case 15:
                      if (!D.isLive || !X.end) {
                        E.next = 17;
                        break;
                      }
                      return E.abrupt("return");
                    case 17:
                      if (
                        ((G = D._playlist.findSegmentIndexByTime(N)),
                        (H = D._playlist.getSegmentByIndex(G)),
                        G != null &&
                          H &&
                          (!D._segmentProcessing ||
                            H !== D._playlist.nextSegment))
                      ) {
                        E.next = 21;
                        break;
                      }
                      return E.abrupt("return");
                    case 21:
                      return (
                        Yd.debug("seek to", N, H),
                        D._playlist.setNextSegmentByIndex(G),
                        D._stopTick(),
                        (E.next = 26),
                        D._segmentLoader.cancel()
                      );
                    case 26:
                      if (((D._segmentProcessing = !1), X.end && !D.isLive)) {
                        E.next = 30;
                        break;
                      }
                      return (E.next = 30), D._loadSegmentDirect(!0);
                    case 30:
                      D._startTick();
                    case 31:
                    case "end":
                      return E.stop();
                  }
              }, $);
            })
          )
        ),
        xn(fo(D), "_onTimeupdate", function () {
          if (D.media) {
            var $,
              N = D.config;
            if (N.isLive && N.maxLatency && N.targetLatency && D.media) {
              var P = D._playlist.liveEdge;
              if (!P) return;
              var I = P - D.media.currentTime;
              I >= N.maxLatency &&
                (Yd.debug(
                  "latency jump, currentTime:"
                    .concat(D.media.currentTime, ", liveEdge:")
                    .concat(P, ",  latency=")
                    .concat(I)
                ),
                (D.media.currentTime = P - N.targetLatency));
            }
            N.seiInTime &&
              (($ = D._seiService) === null ||
                $ === void 0 ||
                $.throw(D.media.currentTime)),
              D.config.allowedStreamTrackChange &&
                !D.config.softDecode &&
                D._checkStreamTrackChange(D.media.currentTime);
          }
        }),
        xn(fo(D), "_tick", function () {
          if (D.media) {
            D._startTick();
            var $ = D.media,
              N = D._segmentLoader.error;
            D._onCheckQuotaExceeded(),
              D._isProcessQuotaExceeded &&
                (D._bufferService.isFull() ||
                  ((D._isProcessQuotaExceeded = !1),
                  (D._segmentProcessing = !1))),
              N
                ? (!$.readyState || D.bufferInfo(0.5).remaining < 1) &&
                  ((N.fatal = !0), D._emitError(Fl.network(N)))
                : ($.readyState &&
                    (tPn($)
                      ? (D._loadSegment(),
                        D._gapService &&
                          D._gapService.do(
                            $,
                            D.config.maxJumpDistance,
                            D.isLive
                          ))
                      : $.readyState < 2 &&
                        D._gapService &&
                        D._gapService.do(
                          $,
                          D.config.maxJumpDistance,
                          !$.currentTime || D.isLive
                        )),
                  D.isLive || D._tryEos());
          }
        }),
        (D.config = k = QPn(k)),
        (D.media = D.config.media),
        (D._manifestLoader = new pMn(fo(D))),
        (D._segmentLoader = new mMn(fo(D))),
        (D._playlist = new gMn(fo(D))),
        (D._bufferService = new YPn(fo(D))),
        k.seiInTime && (D._seiService = new aPn(fo(D))),
        k.softDecode || (D._gapService = new iPn()),
        (D._stats = new dPn(fo(D), 9e4)),
        D.media.addEventListener("loadeddata", D._onLoadeddata),
        D.media.addEventListener("play", D._onPlay),
        D.media.addEventListener("pause", D._onPause),
        D.media.addEventListener("seeking", D._onSeeking),
        D.media.addEventListener("timeupdate", D._onTimeupdate),
        D
      );
    }
    return (
      gc(
        w,
        [
          {
            key: "isLive",
            get: function () {
              return this._playlist.isLive;
            },
          },
          {
            key: "streams",
            get: function () {
              return this._playlist.streams;
            },
          },
          {
            key: "currentStream",
            get: function () {
              return this._playlist.currentStream;
            },
          },
          {
            key: "hasSubtitle",
            get: function () {
              return this._playlist.hasSubtitle;
            },
          },
          {
            key: "totalDuration",
            get: function () {
              return this._playlist.totalDuration;
            },
          },
          {
            key: "baseDts",
            get: function () {
              var k;
              return (k = this._bufferService) === null || k === void 0
                ? void 0
                : k.baseDts;
            },
          },
          {
            key: "abrSwitchPoint",
            get: function () {
              var k = this._urlSwitching
                ? this._playlist.currentSegment
                : this._playlist.nextSegment;
              return k ? k.start + k.duration / 2 : null;
            },
          },
          {
            key: "speedInfo",
            value: function () {
              return this._segmentLoader.speedInfo();
            },
          },
          {
            key: "bufferInfo",
            value: function () {
              var k,
                D =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : 0.1;
              return Pf.info(
                Pf.get(this.media),
                (k = this.media) === null || k === void 0
                  ? void 0
                  : k.currentTime,
                D
              );
            },
          },
          {
            key: "getStats",
            value: function () {
              return this._stats.getStats();
            },
          },
          {
            key: "playbackQuality",
            value: function () {
              return nPn(this.media);
            },
          },
          {
            key: "load",
            value:
              ((v = Qo(
                Ai().mark(function k() {
                  var D,
                    $,
                    N,
                    P = arguments;
                  return Ai().wrap(
                    function (I) {
                      for (;;)
                        switch ((I.prev = I.next)) {
                          case 0:
                            return (
                              (D = P.length > 0 && P[0] !== void 0 ? P[0] : ""),
                              (N =
                                typeof ($ =
                                  P.length > 1 && P[1] !== void 0
                                    ? P[1]
                                    : {}) == "boolean"
                                  ? $
                                  : !($ == null || !$.reuseMse)),
                              i8($) === "object" &&
                                $ != null &&
                                $.clearSwitchStatus &&
                                ((this._urlSwitching = !1),
                                (this._switchUrlOpts = null),
                                (this.config.startTime = void 0)),
                              D && (this.config.url = D),
                              (D = this.config.url),
                              (I.next = 8),
                              this._reset(N)
                            );
                          case 8:
                            return (I.next = 10), this._loadData(D);
                          case 10:
                            this._startTick();
                          case 11:
                          case "end":
                            return I.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function () {
                return v.apply(this, arguments);
              }),
          },
          {
            key: "_loadData",
            value:
              ((y = Qo(
                Ai().mark(function k(D) {
                  var $, N, P, I, O, X, G, H, E, S, L, W, F;
                  return Ai().wrap(
                    function (oe) {
                      for (;;)
                        switch ((oe.prev = oe.next)) {
                          case 0:
                            try {
                              D && (D = D.trim());
                            } catch {}
                            if (D) {
                              oe.next = 3;
                              break;
                            }
                            throw this._emitError(
                              new Fl(
                                vo.OTHER,
                                vo.SUB_TYPES.OPTION,
                                null,
                                null,
                                "m3u8 url is missing"
                              )
                            );
                          case 3:
                            return (oe.next = 5), this._loadM3U8(D);
                          case 5:
                            if (
                              (($ = oe.sent),
                              (N = this._playlist.currentStream),
                              !this._urlSwitching)
                            ) {
                              oe.next = 23;
                              break;
                            }
                            if (!this.isLive) {
                              oe.next = 14;
                              break;
                            }
                            (P = this._playlist.setNextSegmentBySN(
                              this._prevSegSn
                            )),
                              Yd.log(
                                "segment nb="
                                  .concat(this._prevSegSn, " index of ")
                                  .concat(P, " in the new playlist")
                              ),
                              P === -1 &&
                                ((this._prevSegCc = null),
                                (this._prevSegSn = null)),
                              (oe.next = 23);
                            break;
                          case 14:
                            if (
                              (N.bitrate === 0 &&
                                (I = this._switchUrlOpts) !== null &&
                                I !== void 0 &&
                                I.bitrate &&
                                (N.bitrate =
                                  (G = this._switchUrlOpts) === null ||
                                  G === void 0
                                    ? void 0
                                    : G.bitrate),
                              (H =
                                typeof ((O = this._switchUrlOpts) === null ||
                                O === void 0
                                  ? void 0
                                  : O.startTime) == "number"
                                  ? (X = this._switchUrlOpts) === null ||
                                    X === void 0
                                    ? void 0
                                    : X.startTime
                                  : this._getSeamlessSwitchPoint()),
                              (this.config.startTime = H),
                              (E = this._playlist.findSegmentIndexByTime(H)),
                              !(S = this._playlist.getSegmentByIndex(E + 1)))
                            ) {
                              oe.next = 23;
                              break;
                            }
                            return (
                              (L = S.start),
                              (oe.next = 23),
                              this._bufferService.removeBuffer(L)
                            );
                          case 23:
                            if ($) {
                              oe.next = 25;
                              break;
                            }
                            return oe.abrupt("return");
                          case 25:
                            if (!this.isLive) {
                              oe.next = 36;
                              break;
                            }
                            if (
                              (this._bufferService.setLiveSeekableRange(
                                0,
                                4294967295
                              ),
                              Yd.log(
                                "totalDuration first time got:",
                                this._playlist.totalDuration
                              ),
                              Yd.log(
                                "nb segments got:",
                                this._playlist.nbSegments
                              ),
                              this.config.targetLatency <
                                this._playlist.totalDuration &&
                                ((this.config.targetLatency =
                                  this._playlist.totalDuration),
                                (this.config.maxLatency =
                                  1.5 * this.config.targetLatency)),
                              $.isMaster || this._pollM3U8(D),
                              !(
                                this._playlist.nbSegments <
                                this.config.minSegmentsStartPlay
                              ))
                            ) {
                              oe.next = 33;
                              break;
                            }
                            return oe.abrupt("return");
                          case 33:
                            return (oe.next = 35), this._loadSegment();
                          case 35:
                            return oe.abrupt("return");
                          case 36:
                            return (
                              (oe.next = 38),
                              this._bufferService.updateDuration(
                                N.totalDuration
                              )
                            );
                          case 38:
                            return (
                              (W = this.config.startTime) &&
                                (((F = this._switchUrlOpts) !== null &&
                                  F !== void 0 &&
                                  F.seamless) ||
                                  (this.media.currentTime = W),
                                this._playlist.setNextSegmentByIndex(
                                  this._playlist.findSegmentIndexByTime(W) || 0
                                )),
                              (oe.next = 42),
                              this._loadSegment()
                            );
                          case 42:
                          case "end":
                            return oe.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function (k) {
                return y.apply(this, arguments);
              }),
          },
          {
            key: "replay",
            value:
              ((g = Qo(
                Ai().mark(function k(D) {
                  return Ai().wrap(
                    function ($) {
                      for (;;)
                        switch (($.prev = $.next)) {
                          case 0:
                            return (
                              (this.config.startTime = 0),
                              (this._urlSwitching = !1),
                              (this._switchUrlOpts = null),
                              ($.next = 5),
                              this.load()
                            );
                          case 5:
                            return (
                              (this._reloadOnPlay = !1),
                              $.abrupt("return", this.media.play(!D))
                            );
                          case 7:
                          case "end":
                            return $.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function (k) {
                return g.apply(this, arguments);
              }),
          },
          {
            key: "switchURL",
            value:
              ((p = Qo(
                Ai().mark(function k(D) {
                  var $,
                    N,
                    P,
                    I,
                    O,
                    X,
                    G,
                    H = arguments;
                  return Ai().wrap(
                    function (E) {
                      for (;;)
                        switch ((E.prev = E.next)) {
                          case 0:
                            ($ = H.length > 1 && H[1] !== void 0 ? H[1] : {}),
                              (N = { seamless: !1, startTime: 0, bitrate: 0 }),
                              (E.t0 = i8($)),
                              (E.next =
                                E.t0 === "number"
                                  ? 5
                                  : E.t0 === "boolean"
                                  ? 7
                                  : E.t0 === "object"
                                  ? 9
                                  : 11);
                            break;
                          case 5:
                            return (
                              ($ = { startTime: $ }), E.abrupt("break", 12)
                            );
                          case 7:
                            return ($ = { seamless: $ }), E.abrupt("break", 12);
                          case 9:
                            for (P in $)
                              ($[P] !== void 0 && $[P] !== null) || delete $[P];
                            return E.abrupt("break", 12);
                          case 11:
                            throw "unsupported switchURL args: ".concat($);
                          case 12:
                            if (
                              (($ = Object.assign({}, N, $)),
                              (O = (I = $).seamless),
                              (X = I.startTime),
                              (this.config.url = D),
                              (this.config.startTime = X),
                              (this._switchUrlOpts = $),
                              O)
                            ) {
                              E.next = 38;
                              break;
                            }
                            if (((E.prev = 18), !this.config.softDecode)) {
                              E.next = 23;
                              break;
                            }
                            (E.t1 = this.load(D)), (E.next = 26);
                            break;
                          case 23:
                            return (E.next = 25), this.load(D);
                          case 25:
                            E.t1 = E.sent;
                          case 26:
                            (G = E.t1), (E.next = 33);
                            break;
                          case 29:
                            throw (
                              ((E.prev = 29),
                              (E.t2 = E.catch(18)),
                              this.emit(Uo.SWITCH_URL_FAILED, E.t2),
                              E.t2)
                            );
                          case 33:
                            return (
                              (this._reloadOnPlay = !1),
                              G && this.emit(Uo.SWITCH_URL_SUCCESS, { url: D }),
                              E.abrupt("return", this.media.play(!0))
                            );
                          case 38:
                            return (
                              (this._urlSwitching = !0),
                              this.isLive ||
                                ((this._prevSegSn = null),
                                (this._prevSegCc = null)),
                              this._playlist.reset(),
                              this._bufferService.seamlessSwitch(),
                              (E.next = 44),
                              this._clear()
                            );
                          case 44:
                            return (E.next = 46), this._loadData(D);
                          case 46:
                            this._startTick();
                          case 47:
                            this._switchUrlOpts = null;
                          case 48:
                          case "end":
                            return E.stop();
                        }
                    },
                    k,
                    this,
                    [[18, 29]]
                  );
                })
              )),
              function (k) {
                return p.apply(this, arguments);
              }),
          },
          {
            key: "switchStream",
            value:
              ((f = Qo(
                Ai().mark(function k(D) {
                  var $,
                    N,
                    P,
                    I,
                    O,
                    X = arguments;
                  return Ai().wrap(
                    function (G) {
                      for (;;)
                        switch ((G.prev = G.next)) {
                          case 0:
                            if (
                              (($ = !(X.length > 1 && X[1] !== void 0) || X[1]),
                              (N = this.currentStream),
                              (P = this.streams),
                              N && N.id !== D && P && !(P.length < 2))
                            ) {
                              G.next = 5;
                              break;
                            }
                            return G.abrupt("return");
                          case 5:
                            if (
                              (I = P.find(function (H) {
                                return H.id === D;
                              }))
                            ) {
                              G.next = 8;
                              break;
                            }
                            return G.abrupt("return");
                          case 8:
                            return (G.prev = 8), (G.next = 11), this._clear();
                          case 11:
                            if (!$) {
                              G.next = 14;
                              break;
                            }
                            return (
                              (G.next = 14),
                              this._bufferService.clearAllBuffer()
                            );
                          case 14:
                            G.next = 19;
                            break;
                          case 16:
                            throw (
                              ((G.prev = 16),
                              (G.t0 = G.catch(8)),
                              this._emitError(Fl.create(G.t0)))
                            );
                          case 19:
                            if (
                              (N.currentAudioStream &&
                                I.audioStreams.length > 2 &&
                                ((O = N.currentAudioStream.id),
                                (I.currentAudioStream =
                                  I.audioStreams.find(function (H) {
                                    return H.id === O;
                                  }) || I.currentAudioStream)),
                              (this._playlist.currentStream = I),
                              (G.prev = 21),
                              !this.isLive && I.segments.length)
                            ) {
                              G.next = 25;
                              break;
                            }
                            return (G.next = 25), this._refreshM3U8();
                          case 25:
                            return (
                              this._playlist.setNextSegmentByIndex(
                                this._playlist.findSegmentIndexByTime(
                                  this.media.currentTime
                                ) || 0
                              ),
                              (this._prevSegCc = null),
                              (G.next = 29),
                              this._loadSegmentDirect()
                            );
                          case 29:
                            G.next = 35;
                            break;
                          case 31:
                            throw (
                              ((G.prev = 31),
                              (G.t1 = G.catch(21)),
                              (this._playlist.currentStream = N),
                              G.t1)
                            );
                          case 35:
                            return this._startTick(), G.abrupt("return", I);
                          case 37:
                          case "end":
                            return G.stop();
                        }
                    },
                    k,
                    this,
                    [
                      [8, 16],
                      [21, 31],
                    ]
                  );
                })
              )),
              function (k) {
                return f.apply(this, arguments);
              }),
          },
          {
            key: "switchAudioStream",
            value:
              ((h = Qo(
                Ai().mark(function k(D) {
                  var $,
                    N,
                    P,
                    I,
                    O = arguments;
                  return Ai().wrap(
                    function (X) {
                      for (;;)
                        switch ((X.prev = X.next)) {
                          case 0:
                            if (
                              (($ = !(O.length > 1 && O[1] !== void 0) || O[1]),
                              (N = this.currentStream))
                            ) {
                              X.next = 4;
                              break;
                            }
                            return X.abrupt("return");
                          case 4:
                            if (
                              (P = N.currentAudioStream) &&
                              P.id !== D &&
                              !(N.audioStreams.length < 2)
                            ) {
                              X.next = 7;
                              break;
                            }
                            return X.abrupt("return");
                          case 7:
                            if (
                              (I = N.audioStreams.find(function (G) {
                                return G.id === D;
                              }))
                            ) {
                              X.next = 10;
                              break;
                            }
                            return X.abrupt("return");
                          case 10:
                            return (X.prev = 10), (X.next = 13), this._clear();
                          case 13:
                            if (!$) {
                              X.next = 16;
                              break;
                            }
                            return (
                              (X.next = 16),
                              this._bufferService.clearAllBuffer()
                            );
                          case 16:
                            X.next = 21;
                            break;
                          case 18:
                            throw (
                              ((X.prev = 18),
                              (X.t0 = X.catch(10)),
                              this._emitError(Fl.create(X.t0)))
                            );
                          case 21:
                            if (
                              ((N.currentAudioStream = I),
                              (X.prev = 22),
                              !this.isLive && I.segments.length)
                            ) {
                              X.next = 26;
                              break;
                            }
                            return (X.next = 26), this._refreshM3U8();
                          case 26:
                            return (
                              this._playlist.setNextSegmentByIndex(
                                this._playlist.findSegmentIndexByTime(
                                  this.media.currentTime
                                ) || 0
                              ),
                              (this._prevSegCc = null),
                              (X.next = 30),
                              this._loadSegmentDirect()
                            );
                          case 30:
                            X.next = 36;
                            break;
                          case 32:
                            throw (
                              ((X.prev = 32),
                              (X.t1 = X.catch(22)),
                              (N.currentAudioStream = P),
                              X.t1)
                            );
                          case 36:
                            return this._startTick(), X.abrupt("return", I);
                          case 38:
                          case "end":
                            return X.stop();
                        }
                    },
                    k,
                    this,
                    [
                      [10, 18],
                      [22, 32],
                    ]
                  );
                })
              )),
              function (k) {
                return h.apply(this, arguments);
              }),
          },
          {
            key: "switchSubtitleStream",
            value:
              ((d = Qo(
                Ai().mark(function k(D) {
                  return Ai().wrap(
                    function ($) {
                      for (;;)
                        switch (($.prev = $.next)) {
                          case 0:
                            return (
                              this._playlist.switchSubtitle(D),
                              ($.next = 3),
                              this._manifestLoader.stopPoll()
                            );
                          case 3:
                            return ($.next = 5), this._refreshM3U8();
                          case 5:
                          case "end":
                            return $.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function (k) {
                return d.apply(this, arguments);
              }),
          },
          {
            key: "detachMedia",
            value:
              ((c = Qo(
                Ai().mark(function k() {
                  return Ai().wrap(
                    function (D) {
                      for (;;)
                        switch ((D.prev = D.next)) {
                          case 0:
                            if (!this._bufferService) {
                              D.next = 3;
                              break;
                            }
                            return (
                              (D.next = 3), this._bufferService.detachMedia()
                            );
                          case 3:
                          case "end":
                            return D.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function () {
                return c.apply(this, arguments);
              }),
          },
          {
            key: "destroy",
            value:
              ((u = Qo(
                Ai().mark(function k() {
                  var D;
                  return Ai().wrap(
                    function ($) {
                      for (;;)
                        switch (($.prev = $.next)) {
                          case 0:
                            if (this.media) {
                              $.next = 2;
                              break;
                            }
                            return $.abrupt("return");
                          case 2:
                            return (
                              this.removeAllListeners(),
                              this._playlist.reset(),
                              this._segmentLoader.reset(),
                              (D = this._seiService) === null ||
                                D === void 0 ||
                                D.reset(),
                              this.media.removeEventListener(
                                "loadeddata",
                                this._onLoadeddata
                              ),
                              this.media.removeEventListener(
                                "play",
                                this._onPlay
                              ),
                              this.media.removeEventListener(
                                "pause",
                                this._onPause
                              ),
                              this.media.removeEventListener(
                                "seeking",
                                this._onSeeking
                              ),
                              this.media.removeEventListener(
                                "timeupdate",
                                this._onTimeupdate
                              ),
                              ($.next = 13),
                              Promise.all([
                                this._clear(),
                                this._bufferService.destroy(),
                              ])
                            );
                          case 13:
                            this.media = null;
                          case 14:
                          case "end":
                            return $.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function () {
                return u.apply(this, arguments);
              }),
          },
          {
            key: "_loadM3U8",
            value:
              ((l = Qo(
                Ai().mark(function k(D) {
                  var $, N, P, I, O, X, G;
                  return Ai().wrap(
                    function (H) {
                      for (;;)
                        switch ((H.prev = H.next)) {
                          case 0:
                            if (
                              ((H.prev = 0),
                              !(I =
                                (N = this.config.manifestList) === null ||
                                N === void 0 ||
                                (P = N.filter(function (E) {
                                  return E.url === D;
                                })[0]) === null ||
                                P === void 0
                                  ? void 0
                                  : P.manifest))
                            ) {
                              H.next = 6;
                              break;
                            }
                            (H.t0 = this._manifestLoader.parseText(I, D)),
                              (H.next = 9);
                            break;
                          case 6:
                            return (H.next = 8), this._manifestLoader.load(D);
                          case 8:
                            H.t0 = H.sent;
                          case 9:
                            (O = H.t0),
                              (X = J1(O, 1)),
                              ($ = X[0]),
                              (H.next = 17);
                            break;
                          case 14:
                            throw (
                              ((H.prev = 14),
                              (H.t1 = H.catch(0)),
                              this._emitError(Fl.create(H.t1)))
                            );
                          case 17:
                            if ($) {
                              H.next = 19;
                              break;
                            }
                            return H.abrupt("return");
                          case 19:
                            if (
                              (this._playlist.upsertPlaylist($), !$.isMaster)
                            ) {
                              H.next = 24;
                              break;
                            }
                            return (
                              (G =
                                this._playlist.currentStream
                                  .subtitleStreams) !== null &&
                                G !== void 0 &&
                                G.length &&
                                this.emit(Uo.SUBTITLE_PLAYLIST, {
                                  list: this._playlist.currentStream
                                    .subtitleStreams,
                                }),
                              (H.next = 24),
                              this._refreshM3U8()
                            );
                          case 24:
                            return (
                              this.emit(Uo.STREAM_PARSED), H.abrupt("return", $)
                            );
                          case 26:
                          case "end":
                            return H.stop();
                        }
                    },
                    k,
                    this,
                    [[0, 14]]
                  );
                })
              )),
              function (k) {
                return l.apply(this, arguments);
              }),
          },
          {
            key: "_refreshM3U8",
            value: function () {
              var k,
                D,
                $ = this,
                N = this._playlist.currentStream;
              if (!N || !N.url)
                throw this._emitError(
                  Fl.create(null, null, new Error("m3u8 url is not defined"))
                );
              var P = N.url,
                I =
                  (k = N.currentAudioStream) === null || k === void 0
                    ? void 0
                    : k.url,
                O =
                  (D = N.currentSubtitleStream) === null || D === void 0
                    ? void 0
                    : D.url;
              return this._manifestLoader
                .load(P, I, O)
                .then(function (X) {
                  var G = J1(X, 3),
                    H = G[0],
                    E = G[1],
                    S = G[2];
                  H &&
                    ($._playlist.upsertPlaylist(H, E, S),
                    $.isLive && $._pollM3U8(P, I, O));
                })
                .catch(function (X) {
                  throw $._emitError(Fl.create(X));
                });
            },
          },
          {
            key: "_pollM3U8",
            value: function (k, D, $) {
              var N,
                P,
                I = this,
                O = this._playlist.isEmpty;
              this._playlist.lowLatency
                ? (N =
                    1e3 *
                    (this._playlist.currentStream.partTargetDuration || 0))
                : (N =
                    1e3 *
                    (((P = this._playlist.lastSegment) === null || P === void 0
                      ? void 0
                      : P.duration) || 0)),
                this._manifestLoader.poll(
                  k,
                  D,
                  $,
                  function (X, G, H) {
                    I._playlist.upsertPlaylist(X, G, H),
                      I._playlist.clearOldSegment(),
                      ((X && O && !I._playlist.isEmpty) ||
                        (!I._playlist.hadSegmentLoaded &&
                          I._playlist.nbSegments >=
                            I.config.minSegmentsStartPlay)) &&
                        I._loadSegment(),
                      O && (O = I._playlist.isEmpty);
                  },
                  function (X) {
                    I._emitError(Fl.create(X));
                  },
                  N
                );
            },
          },
          {
            key: "_loadSegmentDirect",
            value:
              ((o = Qo(
                Ai().mark(function k(D) {
                  var $, N, P, I, O, X;
                  return Ai().wrap(
                    function (G) {
                      for (;;)
                        switch ((G.prev = G.next)) {
                          case 0:
                            if (($ = this._playlist.nextSegment)) {
                              G.next = 3;
                              break;
                            }
                            return G.abrupt("return");
                          case 3:
                            return (
                              (N = !1),
                              (P = null),
                              (G.prev = 5),
                              (this._segmentProcessing = !0),
                              Yd.log(
                                "load segment, sn:"
                                  .concat($.sn, ", [")
                                  .concat($.start, ", ")
                                  .concat($.end, "], partIndex:")
                                  .concat($.partIndex)
                              ),
                              (G.next = 10),
                              this._reqAndBufferSegment(
                                $,
                                this._playlist.getAudioSegment($)
                              )
                            );
                          case 10:
                            (N = G.sent), (G.next = 16);
                            break;
                          case 13:
                            (G.prev = 13), (G.t0 = G.catch(5)), (P = G.t0);
                          case 16:
                            return (
                              (G.prev = 16),
                              (this._segmentProcessing = !1),
                              G.finish(16)
                            );
                          case 19:
                            if (!P) {
                              G.next = 26;
                              break;
                            }
                            if (!this._bufferService.isFull()) {
                              G.next = 25;
                              break;
                            }
                            return (
                              Yd.log(
                                "load segment, sn:"
                                  .concat($.sn, ", partIndex:")
                                  .concat($.partIndex)
                              ),
                              (this._segmentProcessing = !0),
                              (this._isProcessQuotaExceeded = !0),
                              G.abrupt("return", !1)
                            );
                          case 25:
                            return G.abrupt(
                              "return",
                              this._emitError(Fl.create(P))
                            );
                          case 26:
                            return (
                              N &&
                                ((O = this.bufferInfo().end),
                                this.isLive &&
                                  !this.media.seeking &&
                                  O &&
                                  Math.abs($.end - O) > 1 &&
                                  (Yd.warn(
                                    "segment: "
                                      .concat($.sn, " expected end=")
                                      .concat($.end, ", real end=")
                                      .concat(O)
                                  ),
                                  this._playlist.feedbackLiveEdge($, O)),
                                (X =
                                  ((I = this._playlist.currentStream) ===
                                    null || I === void 0
                                    ? void 0
                                    : I.url) === $.parentUrl),
                                this._urlSwitching &&
                                  !X &&
                                  (Yd.warn("pre playlist segment appended!"),
                                  this._bufferService.seamlessSwitch()),
                                this.isLive &&
                                  this._urlSwitching &&
                                  X &&
                                  ((this._urlSwitching = !1),
                                  this.emit(Uo.SWITCH_URL_SUCCESS, {
                                    url: this.config.url,
                                  })),
                                this._playlist.moveSegmentPointer(),
                                $.isLast
                                  ? this._end()
                                  : D || this._loadSegment()),
                              G.abrupt("return", N)
                            );
                          case 28:
                          case "end":
                            return G.stop();
                        }
                    },
                    k,
                    this,
                    [[5, 13, 16, 19]]
                  );
                })
              )),
              function (k) {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "_reqAndBufferSegment",
            value:
              ((i = Qo(
                Ai().mark(function k(D, $) {
                  var N, P, I, O, X, G, H, E, S, L, W;
                  return Ai().wrap(
                    function (F) {
                      for (;;)
                        switch ((F.prev = F.next)) {
                          case 0:
                            return (
                              (P = D ? D.cc : $.cc),
                              (I = this._prevSegCc !== P),
                              (O = []),
                              (F.prev = 3),
                              (F.next = 6),
                              this._segmentLoader.load(D, $, I)
                            );
                          case 6:
                            (O = F.sent), (F.next = 14);
                            break;
                          case 9:
                            throw (
                              ((F.prev = 9),
                              (F.t0 = F.catch(3)),
                              (F.t0.fatal = !1),
                              (this._segmentLoader.error = F.t0),
                              F.t0)
                            );
                          case 14:
                            if (O[0]) {
                              F.next = 16;
                              break;
                            }
                            return F.abrupt("return");
                          case 16:
                            return (
                              (F.next = 18),
                              (N = this._bufferService).decryptBuffer.apply(
                                N,
                                IDn(O)
                              )
                            );
                          case 18:
                            if ((X = F.sent)) {
                              F.next = 21;
                              break;
                            }
                            return F.abrupt("return");
                          case 21:
                            return (
                              (G = D ? D.sn : $.sn),
                              (H = D ? D.start : $.start),
                              (E = this._playlist.currentStream),
                              this._bufferService.createSource(
                                X[0],
                                X[1],
                                E == null ? void 0 : E.videoCodec,
                                E == null ? void 0 : E.audioCodec
                              ),
                              (S = Date.now()),
                              (L = this._prevSegSn === G - 1),
                              this.isLive &&
                                this._urlSwitching &&
                                ((W = this.bufferInfo().end),
                                this._playlist.updateSegmentsRanges(G, W),
                                Yd.warn(
                                  "update the new playlist liveEdge, segment id="
                                    .concat(G, ", buffer start=")
                                    .concat(W, ", liveEdge=")
                                    .concat(this._playlist.liveEdge)
                                ),
                                (H = W)),
                              (F.next = 30),
                              this._bufferService.appendBuffer(
                                D,
                                $,
                                X[0],
                                X[1],
                                I,
                                L,
                                H
                              )
                            );
                          case 30:
                            return (
                              this.emit(Uo.APPEND_COST, {
                                elapsed: Date.now() - S,
                                url: D.url,
                              }),
                              (F.next = 33),
                              this._bufferService.evictBuffer(
                                this.config.bufferBehind
                              )
                            );
                          case 33:
                            return (
                              (this._prevSegCc = P),
                              (this._prevSegSn = G),
                              F.abrupt("return", !0)
                            );
                          case 36:
                          case "end":
                            return F.stop();
                        }
                    },
                    k,
                    this,
                    [[3, 9]]
                  );
                })
              )),
              function (k, D) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "_onCheckQuotaExceeded",
            value:
              ((r = Qo(
                Ai().mark(function k() {
                  var D, $, N, P, I, O;
                  return Ai().wrap(
                    function (X) {
                      for (;;)
                        switch ((X.prev = X.next)) {
                          case 0:
                            (D = this.media.currentTime),
                              ($ = this.media.buffered),
                              (N = !1),
                              (P = 0);
                          case 4:
                            if (!(P < $.length)) {
                              X.next = 11;
                              break;
                            }
                            if (!($.start(0) >= D && D < $.end(P))) {
                              X.next = 8;
                              break;
                            }
                            return (N = !0), X.abrupt("break", 11);
                          case 8:
                            P++, (X.next = 4);
                            break;
                          case 11:
                            if (!this._bufferService.isFull()) {
                              X.next = 17;
                              break;
                            }
                            if (
                              ((I = N ? this.config.bufferBehind : 5),
                              !((O = this.media.currentTime) - I > 0))
                            ) {
                              X.next = 17;
                              break;
                            }
                            return (
                              (X.next = 17),
                              this._bufferService.removeBuffer(0, O - I)
                            );
                          case 17:
                          case "end":
                            return X.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "_checkStreamTrackChange",
            value: function (k) {
              var D = this._playlist.checkSegmentTrackChange(
                k,
                this._bufferService.nbSb
              );
              D && this.switchURL(this.config.url, D.start + 0.2);
            },
          },
          {
            key: "_clear",
            value:
              ((n = Qo(
                Ai().mark(function k() {
                  return Ai().wrap(
                    function (D) {
                      for (;;)
                        switch ((D.prev = D.next)) {
                          case 0:
                            return (
                              clearTimeout(this._disconnectTimer),
                              this._stopTick(),
                              (D.next = 4),
                              Promise.all([
                                this._segmentLoader.cancel(),
                                this._manifestLoader.stopPoll(),
                              ])
                            );
                          case 4:
                            this._segmentProcessing = !1;
                          case 5:
                          case "end":
                            return D.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_reset",
            value:
              ((e = Qo(
                Ai().mark(function k() {
                  var D,
                    $,
                    N = arguments;
                  return Ai().wrap(
                    function (P) {
                      for (;;)
                        switch ((P.prev = P.next)) {
                          case 0:
                            return (
                              ($ = N.length > 0 && N[0] !== void 0 && N[0]),
                              (this._reloadOnPlay = !1),
                              (this._prevSegSn = null),
                              (this._prevSegCc = null),
                              (this._switchUrlOpts = null),
                              this._playlist.reset(),
                              this._segmentLoader.reset(),
                              (D = this._seiService) === null ||
                                D === void 0 ||
                                D.reset(),
                              this._stats.reset(),
                              (P.next = 11),
                              this._clear()
                            );
                          case 11:
                            return P.abrupt(
                              "return",
                              this._bufferService.reset($)
                            );
                          case 12:
                          case "end":
                            return P.stop();
                        }
                    },
                    k,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_end",
            value: function () {
              this._clear(),
                this._bufferService.endOfStream(),
                (this.media.readyState <= 2 ||
                  this.media.buffered.length > 1) &&
                  this._startTick();
            },
          },
          {
            key: "_stopTick",
            value: function () {
              this._tickTimer && clearTimeout(this._tickTimer),
                (this._tickTimer = null);
            },
          },
          {
            key: "_startTick",
            value: function () {
              this._stopTick(),
                (this._tickTimer = setTimeout(this._tick, this._tickInterval));
            },
          },
          {
            key: "_emitError",
            value: function (k) {
              var D,
                $,
                N,
                P,
                I =
                  arguments.length > 1 &&
                  arguments[1] !== void 0 &&
                  arguments[1];
              return (
                ((D = k.originError) === null || D === void 0
                  ? void 0
                  : D.fatal) === !1
                  ? Yd.warn(k)
                  : (Yd.table(k),
                    Yd.error(k),
                    Yd.error(
                      ($ = this.media) === null || $ === void 0
                        ? void 0
                        : $.error
                    ),
                    (N = this.media) !== null &&
                      N !== void 0 &&
                      N.readyState &&
                      this.media.pause(),
                    this._stopTick(),
                    this._urlSwitching &&
                      ((this._urlSwitching = !1),
                      this.emit(Uo.SWITCH_URL_FAILED, k)),
                    this.emit(Uo.ERROR, k),
                    I && this._end(),
                    (P = this._seiService) === null ||
                      P === void 0 ||
                      P.reset()),
                k
              );
            },
          },
          {
            key: "_getSeamlessSwitchPoint",
            value: function () {
              var k = this.media,
                D = k.currentTime;
              if (!k.paused) {
                var $,
                  N = this._playlist.findSegmentIndexByTime(k.currentTime),
                  P = this._playlist.getSegmentByIndex(N),
                  I =
                    ($ = this._stats) === null || $ === void 0
                      ? void 0
                      : $.getStats().downloadSpeed;
                I && P
                  ? (D +=
                      (P.duration * this._playlist.currentStream.bitrate) / I +
                      1)
                  : (D += 5);
              }
              return D;
            },
          },
          {
            key: "_tryEos",
            value: function () {
              var k,
                D,
                $ = this.media,
                N = this._playlist,
                P = N.nextSegment,
                I = N.lastSegment;
              if (
                (!P || (I && Pf.isBuffered($, I.start + I.duration / 2))) &&
                $.readyState &&
                $.duration > 0 &&
                !((k = this._bufferService) === null || k === void 0) &&
                k.msIsOpened &&
                !(
                  (D = this._bufferService) !== null &&
                  D !== void 0 &&
                  D.msHasOpTasks
                )
              ) {
                var O = this.bufferInfo();
                $.paused &&
                  !$.currentTime &&
                  (O = this.bufferInfo(O.nextStart || 0.5)),
                  (Math.abs(O.end - $.duration) < 0.1 ||
                    (!this.isLive && I && O.end >= I.start + I.duration)) &&
                    this._bufferService.endOfStream();
              }
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function (k) {
              return k && k !== "video" && k !== "audio"
                ? typeof WebAssembly < "u"
                : Dh.isSupported();
            },
          },
          {
            key: "enableLogger",
            value: function () {
              yv.enable(), o8.enable();
            },
          },
          {
            key: "disableLogger",
            value: function () {
              yv.disable(), o8.disable();
            },
          },
        ]
      ),
      w
    );
  })();
xn(qI, "version", "3.0.21-rc.21");
try {
  localStorage.getItem("xgd") ? qI.enableLogger() : qI.disableLogger();
} catch {}
var yMn = (function () {
    function t(e, n) {
      var r = this;
      pc(this, t),
        xn(this, "_opts", null),
        xn(this, "_plugin", null),
        xn(this, "_onLowDecode", function () {
          var i,
            o,
            l,
            u,
            c = r._opts,
            d = c.media,
            h = c.innerDegrade;
          (i = r._plugin) === null ||
            i === void 0 ||
            (o = i.player) === null ||
            o === void 0 ||
            o.emit("lowdecode", d.degradeInfo),
            (l = r._plugin) === null ||
              l === void 0 ||
              (u = l.player) === null ||
              u === void 0 ||
              u.emit(
                "core_event",
                is(is({}, d.degradeInfo), {}, { eventName: Uo.LOWDECODE })
              ),
            h === 1 && r._degrade(d.src);
        }),
        xn(this, "_degrade", function (i) {
          var o = r._plugin.player,
            l = o.video;
          if (!l || l.TAG === "MVideo") {
            var u = o.video.degradeVideo;
            (o.video = u), l.degrade(i), i && (o.config.url = i);
            var c = o.root.firstChild;
            c.TAG === "MVideo" && o.root.replaceChild(u, c);
            var d = r._plugin.constructor.pluginName.toLowerCase();
            o.unRegisterPlugin(d),
              o.once("canplay", function () {
                o.play();
              });
          }
        }),
        xn(this, "forceDegradeToVideo", function (i) {
          r._opts.innerDegrade === 1 && r._degrade(i);
        }),
        (this._opts = e),
        (this._plugin = n),
        this._init();
    }
    return (
      gc(t, [
        {
          key: "_init",
          value: function () {
            var e = this._opts,
              n = e.media,
              r = e.preloadTime,
              i = e.innerDegrade,
              o = e.isLive;
            n &&
              (o || !n.setPlayMode
                ? (i && n.setAttribute("innerdegrade", i),
                  r && n.setAttribute("preloadtime", r),
                  this._bindEvents())
                : n.setPlayMode("VOD"));
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            this._opts.media.addEventListener("lowdecode", this._onLowDecode);
          },
        },
        {
          key: "destroy",
          value: function () {
            var e, n;
            (e = this._opts) === null ||
              e === void 0 ||
              (n = e.media) === null ||
              n === void 0 ||
              n.removeEventListener("lowdecode", this._onLowDecode),
              (this._plugin = null);
          },
        },
      ]),
      t
    );
  })(),
  vMn = ["currentTime"];
function bMn(t, e) {
  var n = { startTime: e.player.currentTime };
  switch (i8(t)) {
    case "boolean":
      n.seamless = t;
      break;
    case "object":
      var r = t.currentTime,
        i = Dne(t, vMn);
      Object.assign(n, i), typeof r == "number" && (n.startTime = r);
  }
  return n;
}
var Fne = (function (t) {
  $B(n, hm);
  var e = xB(n);
  function n() {
    var r;
    pc(this, n);
    for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
      o[l] = arguments[l];
    return (
      xn(fo((r = e.call.apply(e, [this].concat(o)))), "logger", Yd),
      xn(fo(r), "hls", null),
      xn(fo(r), "pluginExtension", null),
      xn(fo(r), "getStats", function () {
        var u;
        return (u = r.hls) === null || u === void 0 ? void 0 : u.getStats();
      }),
      xn(fo(r), "_onSwitchSubtitle", function (u) {
        var c,
          d = u.lang;
        (c = r.hls) === null || c === void 0 || c.switchSubtitleStream(d);
      }),
      xn(fo(r), "_keepPauseStatus", function () {
        r.player.paused &&
          r.player.once("canplay", function () {
            r.player.pause();
          });
      }),
      r
    );
  }
  return (
    gc(
      n,
      [
        {
          key: "core",
          get: function () {
            return this.hls;
          },
        },
        {
          key: "version",
          get: function () {
            var r;
            return (r = this.hls) === null || r === void 0 ? void 0 : r.version;
          },
        },
        {
          key: "softDecode",
          get: function () {
            var r,
              i,
              o =
                (r = this.player) === null ||
                r === void 0 ||
                (i = r.config) === null ||
                i === void 0
                  ? void 0
                  : i.mediaType;
            return (
              !!o && o !== "video" && o !== "audio" && o !== "offscreen-video"
            );
          },
        },
        {
          key: "beforePlayerInit",
          value: function () {
            var r = this,
              i = this.player.config,
              o = this.player.media || this.player.video,
              l = i.hls || {};
            if (
              (i.url || i.__allowHlsEmptyUrl__) &&
              (this.softDecode || l.preferMMS || !Dh.isMMSOnly())
            ) {
              this.hls && this.hls.destroy();
              var u = Object.getOwnPropertyDescriptor(this.player, "switchURL");
              (u && !u.writable) ||
                (this.player.switchURL = function (h, f) {
                  return new Promise(function (p, g) {
                    var y = r.player,
                      v = r.hls;
                    if (v) {
                      var b,
                        w,
                        k = bMn(f, r);
                      (y.config.url = h),
                        v
                          .switchURL(h, k)
                          .then(function () {
                            return p(!0);
                          })
                          .catch(g),
                        !k.seamless &&
                          (b = r.player.config) !== null &&
                          b !== void 0 &&
                          (w = b.hls) !== null &&
                          w !== void 0 &&
                          w.keepStatusAfterSwitch &&
                          r._keepPauseStatus();
                    } else g();
                  });
                });
              var c,
                d = this.player.switchURL;
              (this.player.handleSource = !1),
                (l.innerDegrade = l.innerDegrade || i.innerDegrade),
                (l.disconnectTime !== null && l.disconnectTime !== void 0) ||
                  (l.disconnectTime = 0),
                (this.hls = new qI(
                  is(
                    {
                      softDecode: this.softDecode,
                      isLive: i.isLive,
                      media: o,
                      startTime: i.startTime,
                      url: i.url,
                    },
                    l
                  )
                )),
                this.softDecode ||
                  hm.defineGetterOrSetter(this.player, {
                    url: {
                      get: function () {
                        var h, f;
                        return (h = r.hls) === null ||
                          h === void 0 ||
                          (f = h.media) === null ||
                          f === void 0
                          ? void 0
                          : f.src;
                      },
                      configurable: !0,
                    },
                  }),
                this.softDecode &&
                  ((this.pluginExtension = new yMn(
                    is({ isLive: i.isLive, media: o }, l),
                    this
                  )),
                  (this.player.forceDegradeToVideo = function () {
                    for (
                      var h, f = arguments.length, p = new Array(f), g = 0;
                      g < f;
                      g++
                    )
                      p[g] = arguments[g];
                    return (h = r.pluginExtension) === null || h === void 0
                      ? void 0
                      : h.forceDegradeToVideo.apply(h, p);
                  })),
                i.isLive &&
                  ((c = this.player) === null ||
                    c === void 0 ||
                    c.useHooks("replay", function () {
                      var h;
                      return (h = r.hls) === null || h === void 0
                        ? void 0
                        : h.replay();
                    })),
                this.on(Rue, d),
                this.on(wwn, this._onSwitchSubtitle),
                this.on(Sue, this.destroy.bind(this)),
                this._transError(),
                this._transCoreEvent(pa.TTFB),
                this._transCoreEvent(pa.LOAD_START),
                this._transCoreEvent(pa.LOAD_RESPONSE_HEADERS),
                this._transCoreEvent(pa.LOAD_COMPLETE),
                this._transCoreEvent(pa.LOAD_RETRY),
                this._transCoreEvent(pa.SOURCEBUFFER_CREATED),
                this._transCoreEvent(pa.MEDIASOURCE_OPENED),
                this._transCoreEvent(pa.APPEND_BUFFER),
                this._transCoreEvent(pa.REMOVE_BUFFER),
                this._transCoreEvent(pa.BUFFEREOS),
                this._transCoreEvent(pa.KEYFRAME),
                this._transCoreEvent(pa.METADATA_PARSED),
                this._transCoreEvent(pa.DEMUXED_TRACK),
                this._transCoreEvent(pa.SEI),
                this._transCoreEvent(pa.SEI_IN_TIME),
                this._transCoreEvent(pa.SPEED),
                this._transCoreEvent(pa.HLS_MANIFEST_LOADED),
                this._transCoreEvent(pa.HLS_LEVEL_LOADED),
                this._transCoreEvent(pa.STREAM_EXCEPTION),
                this._transCoreEvent(pa.SWITCH_URL_SUCCESS),
                this._transCoreEvent(pa.SWITCH_URL_FAILED),
                this._transCoreEvent(Uo.NO_AUDIO_TRACK),
                this._transCoreEvent(Uo.STREAM_PARSED),
                this._transCoreEvent(Uo.SUBTITLE_SEGMENTS),
                this._transCoreEvent(Uo.SUBTITLE_PLAYLIST),
                this._transCoreEvent(Uo.APPEND_COST),
                i.url &&
                  this.hls.load(i.url, { reuseMse: !0 }).catch(function (h) {});
            }
          },
        },
        {
          key: "destroy",
          value: function () {
            var r;
            this.hls && (this.hls.destroy(), (this.hls = null)),
              (r = this.pluginExtension) === null ||
                r === void 0 ||
                r.destroy(),
              (this.pluginExtension = null);
          },
        },
        {
          key: "_transError",
          value: function () {
            var r = this;
            this.hls.on(Uo.ERROR, function (i) {
              r.player && r.player.emit(Eue, new s0(r.player, i));
            });
          },
        },
        {
          key: "_transCoreEvent",
          value: function (r) {
            var i = this;
            this.hls.on(r, function (o) {
              i.player &&
                (i.player.emit(
                  "core_event",
                  is(is({}, o), {}, { eventName: r })
                ),
                r === pa.SEI_IN_TIME &&
                  i.hls.hasSubtitle &&
                  i._emitSeiPaylodTime(o));
            });
          },
        },
        {
          key: "_emitSeiPaylodTime",
          value: function (r) {
            try {
              var i = JSON.parse(
                Array.from(r.data.payload)
                  .map(function (o) {
                    return String.fromCharCode(o);
                  })
                  .join("")
                  .slice(0, -1)
              );
              if (!i.rtmp_dts) return;
              this.player.emit("core_event", {
                eventName: Uo.SEI_PAYLOAD_TIME,
                time: i.rtmp_dts,
              });
            } catch {}
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "hls";
          },
        },
        {
          key: "isSupported",
          value: function (r, i) {
            return qI.isSupported(r, i);
          },
        },
      ]
    ),
    n
  );
})();
xn(Fne, "Hls", qI), xn(Fne, "EVENT", Uo);
const _Mn = Os.PluginHls;
var Aei = Object.freeze({
  __proto__: null,
  HlsPlugin: Fne,
  __PLUGIN_NAME__: _Mn,
});
const Ta =
    Number.isFinite ||
    function (t) {
      return typeof t == "number" && isFinite(t);
    },
  TMn =
    Number.isSafeInteger ||
    function (t) {
      return typeof t == "number" && Math.abs(t) <= EMn;
    },
  EMn = Number.MAX_SAFE_INTEGER || 9007199254740991;
let ro = (function (t) {
    return (
      (t.NETWORK_ERROR = "networkError"),
      (t.MEDIA_ERROR = "mediaError"),
      (t.KEY_SYSTEM_ERROR = "keySystemError"),
      (t.MUX_ERROR = "muxError"),
      (t.OTHER_ERROR = "otherError"),
      t
    );
  })({}),
  Ir = (function (t) {
    return (
      (t.KEY_SYSTEM_NO_KEYS = "keySystemNoKeys"),
      (t.KEY_SYSTEM_NO_ACCESS = "keySystemNoAccess"),
      (t.KEY_SYSTEM_NO_SESSION = "keySystemNoSession"),
      (t.KEY_SYSTEM_NO_CONFIGURED_LICENSE = "keySystemNoConfiguredLicense"),
      (t.KEY_SYSTEM_LICENSE_REQUEST_FAILED = "keySystemLicenseRequestFailed"),
      (t.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED =
        "keySystemServerCertificateRequestFailed"),
      (t.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED =
        "keySystemServerCertificateUpdateFailed"),
      (t.KEY_SYSTEM_SESSION_UPDATE_FAILED = "keySystemSessionUpdateFailed"),
      (t.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED =
        "keySystemStatusOutputRestricted"),
      (t.KEY_SYSTEM_STATUS_INTERNAL_ERROR = "keySystemStatusInternalError"),
      (t.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR =
        "keySystemDestroyMediaKeysError"),
      (t.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR =
        "keySystemDestroyCloseSessionError"),
      (t.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR =
        "keySystemDestroyRemoveSessionError"),
      (t.MANIFEST_LOAD_ERROR = "manifestLoadError"),
      (t.MANIFEST_LOAD_TIMEOUT = "manifestLoadTimeOut"),
      (t.MANIFEST_PARSING_ERROR = "manifestParsingError"),
      (t.MANIFEST_INCOMPATIBLE_CODECS_ERROR =
        "manifestIncompatibleCodecsError"),
      (t.LEVEL_EMPTY_ERROR = "levelEmptyError"),
      (t.LEVEL_LOAD_ERROR = "levelLoadError"),
      (t.LEVEL_LOAD_TIMEOUT = "levelLoadTimeOut"),
      (t.LEVEL_PARSING_ERROR = "levelParsingError"),
      (t.LEVEL_SWITCH_ERROR = "levelSwitchError"),
      (t.AUDIO_TRACK_LOAD_ERROR = "audioTrackLoadError"),
      (t.AUDIO_TRACK_LOAD_TIMEOUT = "audioTrackLoadTimeOut"),
      (t.SUBTITLE_LOAD_ERROR = "subtitleTrackLoadError"),
      (t.SUBTITLE_TRACK_LOAD_TIMEOUT = "subtitleTrackLoadTimeOut"),
      (t.FRAG_LOAD_ERROR = "fragLoadError"),
      (t.FRAG_LOAD_TIMEOUT = "fragLoadTimeOut"),
      (t.FRAG_DECRYPT_ERROR = "fragDecryptError"),
      (t.FRAG_PARSING_ERROR = "fragParsingError"),
      (t.FRAG_GAP = "fragGap"),
      (t.REMUX_ALLOC_ERROR = "remuxAllocError"),
      (t.KEY_LOAD_ERROR = "keyLoadError"),
      (t.KEY_LOAD_TIMEOUT = "keyLoadTimeOut"),
      (t.BUFFER_ADD_CODEC_ERROR = "bufferAddCodecError"),
      (t.BUFFER_INCOMPATIBLE_CODECS_ERROR = "bufferIncompatibleCodecsError"),
      (t.BUFFER_APPEND_ERROR = "bufferAppendError"),
      (t.BUFFER_APPENDING_ERROR = "bufferAppendingError"),
      (t.BUFFER_STALLED_ERROR = "bufferStalledError"),
      (t.BUFFER_FULL_ERROR = "bufferFullError"),
      (t.BUFFER_SEEK_OVER_HOLE = "bufferSeekOverHole"),
      (t.BUFFER_NUDGE_ON_STALL = "bufferNudgeOnStall"),
      (t.ASSET_LIST_LOAD_ERROR = "assetListLoadError"),
      (t.ASSET_LIST_LOAD_TIMEOUT = "assetListLoadTimeout"),
      (t.ASSET_LIST_PARSING_ERROR = "assetListParsingError"),
      (t.INTERSTITIAL_ASSET_ITEM_ERROR = "interstitialAssetItemError"),
      (t.INTERNAL_EXCEPTION = "internalException"),
      (t.INTERNAL_ABORTED = "aborted"),
      (t.ATTACH_MEDIA_ERROR = "attachMediaError"),
      (t.UNKNOWN = "unknown"),
      t
    );
  })({}),
  Tt = (function (t) {
    return (
      (t.MEDIA_ATTACHING = "hlsMediaAttaching"),
      (t.MEDIA_ATTACHED = "hlsMediaAttached"),
      (t.MEDIA_DETACHING = "hlsMediaDetaching"),
      (t.MEDIA_DETACHED = "hlsMediaDetached"),
      (t.MEDIA_ENDED = "hlsMediaEnded"),
      (t.BUFFER_RESET = "hlsBufferReset"),
      (t.BUFFER_CODECS = "hlsBufferCodecs"),
      (t.BUFFER_CREATED = "hlsBufferCreated"),
      (t.BUFFER_APPENDING = "hlsBufferAppending"),
      (t.BUFFER_APPENDED = "hlsBufferAppended"),
      (t.BUFFER_EOS = "hlsBufferEos"),
      (t.BUFFERED_TO_END = "hlsBufferedToEnd"),
      (t.BUFFER_FLUSHING = "hlsBufferFlushing"),
      (t.BUFFER_FLUSHED = "hlsBufferFlushed"),
      (t.MANIFEST_LOADING = "hlsManifestLoading"),
      (t.MANIFEST_LOADED = "hlsManifestLoaded"),
      (t.MANIFEST_PARSED = "hlsManifestParsed"),
      (t.LEVEL_SWITCHING = "hlsLevelSwitching"),
      (t.LEVEL_SWITCHED = "hlsLevelSwitched"),
      (t.LEVEL_LOADING = "hlsLevelLoading"),
      (t.LEVEL_LOADED = "hlsLevelLoaded"),
      (t.LEVEL_UPDATED = "hlsLevelUpdated"),
      (t.LEVEL_PTS_UPDATED = "hlsLevelPtsUpdated"),
      (t.LEVELS_UPDATED = "hlsLevelsUpdated"),
      (t.AUDIO_TRACKS_UPDATED = "hlsAudioTracksUpdated"),
      (t.AUDIO_TRACK_SWITCHING = "hlsAudioTrackSwitching"),
      (t.AUDIO_TRACK_SWITCHED = "hlsAudioTrackSwitched"),
      (t.AUDIO_TRACK_LOADING = "hlsAudioTrackLoading"),
      (t.AUDIO_TRACK_LOADED = "hlsAudioTrackLoaded"),
      (t.AUDIO_TRACK_UPDATED = "hlsAudioTrackUpdated"),
      (t.SUBTITLE_TRACKS_UPDATED = "hlsSubtitleTracksUpdated"),
      (t.SUBTITLE_TRACKS_CLEARED = "hlsSubtitleTracksCleared"),
      (t.SUBTITLE_TRACK_SWITCH = "hlsSubtitleTrackSwitch"),
      (t.SUBTITLE_TRACK_LOADING = "hlsSubtitleTrackLoading"),
      (t.SUBTITLE_TRACK_LOADED = "hlsSubtitleTrackLoaded"),
      (t.SUBTITLE_TRACK_UPDATED = "hlsSubtitleTrackUpdated"),
      (t.SUBTITLE_FRAG_PROCESSED = "hlsSubtitleFragProcessed"),
      (t.CUES_PARSED = "hlsCuesParsed"),
      (t.NON_NATIVE_TEXT_TRACKS_FOUND = "hlsNonNativeTextTracksFound"),
      (t.INIT_PTS_FOUND = "hlsInitPtsFound"),
      (t.FRAG_LOADING = "hlsFragLoading"),
      (t.FRAG_LOAD_EMERGENCY_ABORTED = "hlsFragLoadEmergencyAborted"),
      (t.FRAG_LOADED = "hlsFragLoaded"),
      (t.FRAG_DECRYPTED = "hlsFragDecrypted"),
      (t.FRAG_PARSING_INIT_SEGMENT = "hlsFragParsingInitSegment"),
      (t.FRAG_PARSING_USERDATA = "hlsFragParsingUserdata"),
      (t.FRAG_PARSING_METADATA = "hlsFragParsingMetadata"),
      (t.FRAG_PARSED = "hlsFragParsed"),
      (t.FRAG_BUFFERED = "hlsFragBuffered"),
      (t.FRAG_CHANGED = "hlsFragChanged"),
      (t.FPS_DROP = "hlsFpsDrop"),
      (t.FPS_DROP_LEVEL_CAPPING = "hlsFpsDropLevelCapping"),
      (t.MAX_AUTO_LEVEL_UPDATED = "hlsMaxAutoLevelUpdated"),
      (t.ERROR = "hlsError"),
      (t.DESTROYING = "hlsDestroying"),
      (t.KEY_LOADING = "hlsKeyLoading"),
      (t.KEY_LOADED = "hlsKeyLoaded"),
      (t.LIVE_BACK_BUFFER_REACHED = "hlsLiveBackBufferReached"),
      (t.BACK_BUFFER_REACHED = "hlsBackBufferReached"),
      (t.STEERING_MANIFEST_LOADED = "hlsSteeringManifestLoaded"),
      (t.ASSET_LIST_LOADING = "hlsAssetListLoading"),
      (t.ASSET_LIST_LOADED = "hlsAssetListLoaded"),
      (t.INTERSTITIALS_UPDATED = "hlsInterstitialsUpdated"),
      (t.INTERSTITIALS_BUFFERED_TO_BOUNDARY =
        "hlsInterstitialsBufferedToBoundary"),
      (t.INTERSTITIAL_ASSET_PLAYER_CREATED =
        "hlsInterstitialAssetPlayerCreated"),
      (t.INTERSTITIAL_STARTED = "hlsInterstitialStarted"),
      (t.INTERSTITIAL_ASSET_STARTED = "hlsInterstitialAssetStarted"),
      (t.INTERSTITIAL_ASSET_ENDED = "hlsInterstitialAssetEnded"),
      (t.INTERSTITIAL_ASSET_ERROR = "hlsInterstitialAssetError"),
      (t.INTERSTITIAL_ENDED = "hlsInterstitialEnded"),
      (t.INTERSTITIALS_PRIMARY_RESUMED = "hlsInterstitialsPrimaryResumed"),
      (t.PLAYOUT_LIMIT_REACHED = "hlsPlayoutLimitReached"),
      (t.EVENT_CUE_ENTER = "hlsEventCueEnter"),
      t
    );
  })({});
var B1 = {
    MANIFEST: "manifest",
    LEVEL: "level",
    AUDIO_TRACK: "audioTrack",
    SUBTITLE_TRACK: "subtitleTrack",
  },
  ko = { MAIN: "main", AUDIO: "audio", SUBTITLE: "subtitle" };
class rw {
  constructor(e, n = 0, r = 0) {
    (this.halfLife = void 0),
      (this.alpha_ = void 0),
      (this.estimate_ = void 0),
      (this.totalWeight_ = void 0),
      (this.halfLife = e),
      (this.alpha_ = e ? Math.exp(Math.log(0.5) / e) : 0),
      (this.estimate_ = n),
      (this.totalWeight_ = r);
  }
  sample(e, n) {
    const r = Math.pow(this.alpha_, e);
    (this.estimate_ = n * (1 - r) + r * this.estimate_),
      (this.totalWeight_ += e);
  }
  getTotalWeight() {
    return this.totalWeight_;
  }
  getEstimate() {
    if (this.alpha_) {
      const e = 1 - Math.pow(this.alpha_, this.totalWeight_);
      if (e) return this.estimate_ / e;
    }
    return this.estimate_;
  }
}
class SMn {
  constructor(e, n, r, 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_ = r),
      (this.minWeight_ = 0.001),
      (this.minDelayMs_ = 50),
      (this.slow_ = new rw(e)),
      (this.fast_ = new rw(n)),
      (this.defaultTTFB_ = i),
      (this.ttfb_ = new rw(e));
  }
  update(e, n) {
    const { slow_: r, fast_: i, ttfb_: o } = this;
    r.halfLife !== e &&
      (this.slow_ = new rw(e, r.getEstimate(), r.getTotalWeight())),
      i.halfLife !== n &&
        (this.fast_ = new rw(n, i.getEstimate(), i.getTotalWeight())),
      o.halfLife !== e &&
        (this.ttfb_ = new rw(e, o.getEstimate(), o.getTotalWeight()));
  }
  sample(e, n) {
    const r = (e = Math.max(e, this.minDelayMs_)) / 1e3,
      i = (8 * n) / r;
    this.fast_.sample(r, i), this.slow_.sample(r, i);
  }
  sampleTTFB(e) {
    const n = e / 1e3,
      r = Math.sqrt(2) * Math.exp(-Math.pow(n, 2) / 2);
    this.ttfb_.sample(r, Math.max(e, 5));
  }
  canEstimate() {
    return this.fast_.getTotalWeight() >= this.minWeight_;
  }
  getEstimate() {
    return this.canEstimate()
      ? Math.min(this.fast_.getEstimate(), this.slow_.getEstimate())
      : this.defaultEstimate_;
  }
  getEstimateTTFB() {
    return this.ttfb_.getTotalWeight() >= this.minWeight_
      ? this.ttfb_.getEstimate()
      : this.defaultTTFB_;
  }
  get defaultEstimate() {
    return this.defaultEstimate_;
  }
  destroy() {}
}
function RMn(t, e, n) {
  return (
    (e = wMn(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function du() {
  return (
    (du = Object.assign
      ? Object.assign.bind()
      : function (t) {
          for (var e = 1; e < arguments.length; e++) {
            var n = arguments[e];
            for (var r in n) ({}.hasOwnProperty.call(n, r) && (t[r] = n[r]));
          }
          return t;
        }),
    du.apply(null, arguments)
  );
}
function TRe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function pl(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? TRe(Object(n), !0).forEach(function (r) {
          RMn(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : TRe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function AMn(t, e) {
  if (typeof t != "object" || !t) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function wMn(t) {
  var e = AMn(t, "string");
  return typeof e == "symbol" ? e : e + "";
}
let _b = class {
  constructor(t, e) {
    (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 = `[${t}]:`;
    (this.trace = Y2),
      (this.debug = e.debug.bind(null, n)),
      (this.log = e.log.bind(null, n)),
      (this.warn = e.warn.bind(null, n)),
      (this.info = e.info.bind(null, n)),
      (this.error = e.error.bind(null, n));
  }
};
const Y2 = function () {},
  kMn = { trace: Y2, debug: Y2, log: Y2, warn: Y2, info: Y2, error: Y2 };
function IMn() {
  return du({}, kMn);
}
const DMn = IMn(),
  Ds = DMn;
function iL(t = !0) {
  if (!(typeof self > "u"))
    return (
      ((t || !self.MediaSource) && self.ManagedMediaSource) ||
      self.MediaSource ||
      self.WebKitMediaSource
    );
}
function PMn(t) {
  return typeof self < "u" && t === self.ManagedMediaSource;
}
function oje(t, e) {
  const n = Object.keys(t),
    r = Object.keys(e),
    i = n.length,
    o = r.length;
  return !i || !o || (i === o && !n.some((l) => r.indexOf(l) === -1));
}
const ERe = {
  audio: {
    a3ds: 1,
    "ac-3": 0.95,
    "ac-4": 1,
    alac: 0.9,
    alaw: 1,
    dra1: 1,
    "dts+": 1,
    "dts-": 1,
    dtsc: 1,
    dtse: 1,
    dtsh: 1,
    "ec-3": 0.9,
    enca: 1,
    fLaC: 0.9,
    flac: 0.9,
    FLAC: 0.9,
    g719: 1,
    g726: 1,
    m4ae: 1,
    mha1: 1,
    mha2: 1,
    mhm1: 1,
    mhm2: 1,
    mlpa: 1,
    mp4a: 1,
    "raw ": 1,
    Opus: 1,
    opus: 1,
    samr: 1,
    sawb: 1,
    sawp: 1,
    sevc: 1,
    sqcp: 1,
    ssmv: 1,
    twos: 1,
    ulaw: 1,
  },
  video: {
    avc1: 1,
    avc2: 1,
    avc3: 1,
    avc4: 1,
    avcp: 1,
    av01: 0.8,
    drac: 1,
    dva1: 1,
    dvav: 1,
    dvh1: 0.7,
    dvhe: 0.7,
    encv: 1,
    hev1: 0.75,
    hvc1: 0.75,
    mjp2: 1,
    mp4v: 1,
    mvc1: 1,
    mvc2: 1,
    mvc3: 1,
    mvc4: 1,
    resv: 1,
    rv60: 1,
    s263: 1,
    svc1: 1,
    svc2: 1,
    "vc-1": 1,
    vp08: 1,
    vp09: 0.9,
  },
  text: { stpp: 1, wvtt: 1 },
};
function MMn(t, e, n = !0) {
  var r;
  const i = iL(n);
  return (r = i == null ? void 0 : i.isTypeSupported(Une(t, e))) != null && r;
}
function Une(t, e) {
  return `${e}/mp4;codecs=${t}`;
}
function SRe(t) {
  return t.split(",").reduce((e, n) => {
    const r = ERe.video[n];
    return r ? (2 * r + e) / (e ? 3 : 2) : (ERe.audio[n] + e) / (e ? 2 : 1);
  }, 0);
}
const QW = {};
function CMn(t, e = !0) {
  if (QW[t]) return QW[t];
  const n = {
    flac: ["flac", "fLaC", "FLAC"],
    opus: ["opus", "Opus"],
    "mp4a.40.34": ["mp3"],
  }[t];
  for (let i = 0; i < n.length; i++) {
    var r;
    if (MMn(n[i], "audio", e)) return (QW[t] = n[i]), n[i];
    if (
      n[i] === "mp3" &&
      (r = iL(e)) != null &&
      r.isTypeSupported("audio/mpeg")
    )
      return "";
  }
  return t;
}
const $Mn = /flac|opus|mp4a\.40\.34/i;
function Bne(t, e = !0) {
  return t.replace($Mn, (n) => CMn(n.toLowerCase(), e));
}
function JW(t, e) {
  if (
    t &&
    (t.length > 4 || ["ac-3", "ec-3", "alac", "fLaC", "Opus"].indexOf(t) !== -1)
  )
    return t;
  if (e) {
    const n = e.split(",");
    if (n.length > 1) {
      if (t) {
        for (let r = n.length; r--; )
          if (n[r].substring(0, 4) === t.substring(0, 4)) return n[r];
      }
      return n[0];
    }
  }
  return e || t;
}
function xMn(t) {
  if (t.startsWith("av01.")) {
    const e = t.split("."),
      n = ["0", "111", "01", "01", "01", "0"];
    for (let r = e.length; r > 4 && r < 10; r++) e[r] = n[r - 4];
    return e.join(".");
  }
  return t;
}
function RRe(t) {
  const e = iL(t) || { isTypeSupported: () => !1 };
  return {
    mpeg: e.isTypeSupported("audio/mpeg"),
    mp3: e.isTypeSupported('audio/mp4; codecs="mp3"'),
    ac3: e.isTypeSupported('audio/mp4; codecs="ac-3"'),
  };
}
const sje = {
    supported: !0,
    configurations: [],
    decodingInfoResults: [{ supported: !0, powerEfficient: !0, smooth: !0 }],
  },
  ARe = {};
function LMn(t, e, n, r, i, o) {
  const l = t.audioCodec ? t.audioGroups : null,
    u = o == null ? void 0 : o.audioCodec,
    c = o == null ? void 0 : o.channels,
    d = c ? parseInt(c) : u ? 1 / 0 : 2;
  let h = null;
  if (l != null && l.length)
    try {
      h =
        l.length === 1 && l[0]
          ? e.groups[l[0]].channels
          : l.reduce(
              (f, p) => {
                if (p) {
                  const g = e.groups[p];
                  if (!g) throw new Error(`Audio track group ${p} not found`);
                  Object.keys(g.channels).forEach((y) => {
                    f[y] = (f[y] || 0) + g.channels[y];
                  });
                }
                return f;
              },
              { 2: 0 }
            );
    } catch {
      return !0;
    }
  return (
    (t.videoCodec !== void 0 &&
      ((t.width > 1920 && t.height > 1088) ||
        (t.height > 1920 && t.width > 1088) ||
        t.frameRate > Math.max(r, 30) ||
        (t.videoRange !== "SDR" && t.videoRange !== n) ||
        t.bitrate > Math.max(i, 8e6))) ||
    (!!h && Ta(d) && Object.keys(h).some((f) => parseInt(f) > d))
  );
}
function OMn(t, e, n) {
  const r = t.videoCodec,
    i = t.audioCodec;
  if ((!r && !i) || !n) return Promise.resolve(sje);
  const o = [];
  if (r) {
    const l = {
        width: t.width,
        height: t.height,
        bitrate: Math.ceil(Math.max(0.9 * t.bitrate, t.averageBitrate)),
        framerate: t.frameRate || 30,
      },
      u = t.videoRange;
    u !== "SDR" && (l.transferFunction = u.toLowerCase()),
      o.push.apply(
        o,
        r
          .split(",")
          .map((c) => ({
            type: "media-source",
            video: pl(pl({}, l), {}, { contentType: Une(xMn(c), "video") }),
          }))
      );
  }
  return (
    i &&
      t.audioGroups &&
      t.audioGroups.forEach((l) => {
        var u;
        l &&
          ((u = e.groups[l]) == null ||
            u.tracks.forEach((c) => {
              if (c.groupId === l) {
                const d = c.channels || "",
                  h = parseFloat(d);
                Ta(h) &&
                  h > 2 &&
                  o.push.apply(
                    o,
                    i
                      .split(",")
                      .map((f) => ({
                        type: "media-source",
                        audio: {
                          contentType: Une(f, "audio"),
                          channels: "" + h,
                        },
                      }))
                  );
              }
            }));
      }),
    Promise.all(
      o.map((l) => {
        const u = GMn(l);
        return ARe[u] || (ARe[u] = n.decodingInfo(l));
      })
    )
      .then((l) => ({
        supported: !l.some((u) => !u.supported),
        configurations: o,
        decodingInfoResults: l,
      }))
      .catch((l) => ({
        supported: !1,
        configurations: o,
        decodingInfoResults: [],
        error: l,
      }))
  );
}
function GMn(t) {
  const { audio: e, video: n } = t,
    r = n || e;
  if (r) {
    const i = r.contentType.split('"')[1];
    if (n)
      return `r${n.height}x${n.width}f${Math.ceil(n.framerate)}${
        n.transferFunction || "sd"
      }_${i}_${Math.ceil(n.bitrate / 1e5)}`;
    if (e) return `c${e.channels}${e.spatialRendering ? "s" : "n"}_${i}`;
  }
  return "";
}
const wRe = ["NONE", "TYPE-0", "TYPE-1", null],
  NMn = ["SDR", "PQ", "HLG"];
var zF = { No: "", Yes: "YES", v2: "v2" };
function kRe(t) {
  const { canSkipUntil: e, canSkipDateRanges: n, age: r } = t;
  return e && r < e / 2 ? (n ? zF.v2 : zF.Yes) : zF.No;
}
class IRe {
  constructor(e, n, r) {
    (this.msn = void 0),
      (this.part = void 0),
      (this.skip = void 0),
      (this.msn = e),
      (this.part = n),
      (this.skip = r);
  }
  addDirectives(e) {
    const n = new self.URL(e);
    return (
      this.msn !== void 0 &&
        n.searchParams.set("_HLS_msn", this.msn.toString()),
      this.part !== void 0 &&
        n.searchParams.set("_HLS_part", this.part.toString()),
      this.skip && n.searchParams.set("_HLS_skip", this.skip),
      n.href
    );
  }
}
class s8 {
  constructor(e) {
    (this._attrs = void 0),
      (this.audioCodec = void 0),
      (this.bitrate = void 0),
      (this.codecSet = void 0),
      (this.url = void 0),
      (this.frameRate = void 0),
      (this.height = void 0),
      (this.id = void 0),
      (this.name = void 0),
      (this.videoCodec = void 0),
      (this.width = void 0),
      (this.details = void 0),
      (this.fragmentError = 0),
      (this.loadError = 0),
      (this.loaded = void 0),
      (this.realBitrate = 0),
      (this.supportedPromise = void 0),
      (this.supportedResult = void 0),
      (this._avgBitrate = 0),
      (this._audioGroups = void 0),
      (this._subtitleGroups = void 0),
      (this._urlId = 0),
      (this.url = [e.url]),
      (this._attrs = [e.attrs]),
      (this.bitrate = e.bitrate),
      e.details && (this.details = e.details),
      (this.id = e.id || 0),
      (this.name = e.name),
      (this.width = e.width || 0),
      (this.height = e.height || 0),
      (this.frameRate = e.attrs.optionalFloat("FRAME-RATE", 0)),
      (this._avgBitrate = e.attrs.decimalInteger("AVERAGE-BANDWIDTH")),
      (this.audioCodec = e.audioCodec),
      (this.videoCodec = e.videoCodec),
      (this.codecSet = [e.videoCodec, e.audioCodec]
        .filter((n) => !!n)
        .map((n) => n.substring(0, 4))
        .join(",")),
      this.addGroupId("audio", e.attrs.AUDIO),
      this.addGroupId("text", e.attrs.SUBTITLES);
  }
  get maxBitrate() {
    return Math.max(this.realBitrate, this.bitrate);
  }
  get averageBitrate() {
    return this._avgBitrate || this.realBitrate || this.bitrate;
  }
  get attrs() {
    return this._attrs[0];
  }
  get codecs() {
    return this.attrs.CODECS || "";
  }
  get pathwayId() {
    return this.attrs["PATHWAY-ID"] || ".";
  }
  get videoRange() {
    return this.attrs["VIDEO-RANGE"] || "SDR";
  }
  get score() {
    return this.attrs.optionalFloat("SCORE", 0);
  }
  get uri() {
    return this.url[0] || "";
  }
  hasAudioGroup(e) {
    return DRe(this._audioGroups, e);
  }
  hasSubtitleGroup(e) {
    return DRe(this._subtitleGroups, e);
  }
  get audioGroups() {
    return this._audioGroups;
  }
  get subtitleGroups() {
    return this._subtitleGroups;
  }
  addGroupId(e, n) {
    if (n) {
      if (e === "audio") {
        let r = this._audioGroups;
        r || (r = this._audioGroups = []), r.indexOf(n) === -1 && r.push(n);
      } else if (e === "text") {
        let r = this._subtitleGroups;
        r || (r = this._subtitleGroups = []), r.indexOf(n) === -1 && r.push(n);
      }
    }
  }
  get urlId() {
    return 0;
  }
  set urlId(e) {}
  get audioGroupIds() {
    return this.audioGroups ? [this.audioGroupId] : void 0;
  }
  get textGroupIds() {
    return this.subtitleGroups ? [this.textGroupId] : void 0;
  }
  get audioGroupId() {
    var e;
    return (e = this.audioGroups) == null ? void 0 : e[0];
  }
  get textGroupId() {
    var e;
    return (e = this.subtitleGroups) == null ? void 0 : e[0];
  }
  addFallback() {}
}
function DRe(t, e) {
  return !(!e || !t) && t.indexOf(e) !== -1;
}
function FMn() {
  if (typeof matchMedia == "function") {
    const t = matchMedia("(dynamic-range: high)"),
      e = matchMedia("bad query");
    if (t.media !== e.media) return t.matches === !0;
  }
  return !1;
}
function UMn(t, e) {
  let n = !1,
    r = [];
  if ((t && ((n = t !== "SDR"), (r = [t])), e)) {
    r = e.allowedVideoRanges || NMn.slice(0);
    const i = r.join("") !== "SDR" && !e.videoCodec;
    (n = e.preferHDR !== void 0 ? e.preferHDR : i && FMn()), n || (r = ["SDR"]);
  }
  return { preferHDR: n, allowedVideoRanges: r };
}
function BMn(t, e, n, r, i) {
  const o = Object.keys(t),
    l = r == null ? void 0 : r.channels,
    u = r == null ? void 0 : r.audioCodec,
    c = i == null ? void 0 : i.videoCodec,
    d = l && parseInt(l) === 2;
  let h = !1,
    f = !1,
    p = 1 / 0,
    g = 1 / 0,
    y = 1 / 0,
    v = 1 / 0,
    b = 0,
    w = [];
  const { preferHDR: k, allowedVideoRanges: D } = UMn(e, i);
  for (let I = o.length; I--; ) {
    const O = t[o[I]];
    h || (h = O.channels[2] > 0),
      (p = Math.min(p, O.minHeight)),
      (g = Math.min(g, O.minFramerate)),
      (y = Math.min(y, O.minBitrate)),
      D.filter((X) => O.videoRanges[X] > 0).length > 0 && (f = !0);
  }
  (p = Ta(p) ? p : 0), (g = Ta(g) ? g : 0);
  const $ = Math.max(1080, p),
    N = Math.max(30, g);
  (y = Ta(y) ? y : n), (n = Math.max(y, n)), f || (e = void 0);
  const P = o.length > 1;
  return {
    codecSet: o.reduce((I, O) => {
      const X = t[O];
      if (O === I) return I;
      if (((w = f ? D.filter((G) => X.videoRanges[G] > 0) : []), P)) {
        if (X.minBitrate > n)
          return (
            Sy(O, `min bitrate of ${X.minBitrate} > current estimate of ${n}`),
            I
          );
        if (!X.hasDefaultAudio)
          return (
            Sy(O, "no renditions with default or auto-select sound found"), I
          );
        if (u && O.indexOf(u.substring(0, 4)) % 5 != 0)
          return Sy(O, `audio codec preference "${u}" not found`), I;
        if (l && !d) {
          if (!X.channels[l])
            return (
              Sy(
                O,
                `no renditions with ${l} channel sound found (channels options: ${Object.keys(
                  X.channels
                )})`
              ),
              I
            );
        } else if ((!u || d) && h && X.channels[2] === 0)
          return Sy(O, "no renditions with stereo sound found"), I;
        if (X.minHeight > $)
          return Sy(O, `min resolution of ${X.minHeight} > maximum of ${$}`), I;
        if (X.minFramerate > N)
          return (
            Sy(O, `min framerate of ${X.minFramerate} > maximum of ${N}`), I
          );
        if (!w.some((G) => X.videoRanges[G] > 0))
          return (
            Sy(O, `no variants with VIDEO-RANGE of ${JSON.stringify(w)} found`),
            I
          );
        if (c && O.indexOf(c.substring(0, 4)) % 5 != 0)
          return Sy(O, `video codec preference "${c}" not found`), I;
        if (X.maxScore < b)
          return Sy(O, `max score of ${X.maxScore} < selected max of ${b}`), I;
      }
      return I && (SRe(O) >= SRe(I) || X.fragmentError > t[I].fragmentError)
        ? I
        : ((v = X.minIndex), (b = X.maxScore), O);
    }, void 0),
    videoRanges: w,
    preferHDR: k,
    minFramerate: g,
    minBitrate: y,
    minIndex: v,
  };
}
function Sy(t, e) {
  Ds.log(`[abr] start candidates with "${t}" ignored because ${e}`);
}
function HMn(t) {
  return t.reduce(
    (e, n) => {
      let r = e.groups[n.groupId];
      r ||
        (r = e.groups[n.groupId] =
          {
            tracks: [],
            channels: { 2: 0 },
            hasDefault: !1,
            hasAutoSelect: !1,
          }),
        r.tracks.push(n);
      const i = n.channels || "2";
      return (
        (r.channels[i] = (r.channels[i] || 0) + 1),
        (r.hasDefault = r.hasDefault || n.default),
        (r.hasAutoSelect = r.hasAutoSelect || n.autoselect),
        r.hasDefault && (e.hasDefaultAudio = !0),
        r.hasAutoSelect && (e.hasAutoSelectAudio = !0),
        e
      );
    },
    { hasDefaultAudio: !1, hasAutoSelectAudio: !1, groups: {} }
  );
}
function XMn(t, e, n, r) {
  return t.slice(n, r + 1).reduce((i, o, l) => {
    if (!o.codecSet) return i;
    const u = o.audioGroups;
    let c = i[o.codecSet];
    c ||
      (i[o.codecSet] = c =
        {
          minBitrate: 1 / 0,
          minHeight: 1 / 0,
          minFramerate: 1 / 0,
          minIndex: l,
          maxScore: 0,
          videoRanges: { SDR: 0 },
          channels: { 2: 0 },
          hasDefaultAudio: !u,
          fragmentError: 0,
        }),
      (c.minBitrate = Math.min(c.minBitrate, o.bitrate));
    const d = Math.min(o.height, o.width);
    return (
      (c.minHeight = Math.min(c.minHeight, d)),
      (c.minFramerate = Math.min(c.minFramerate, o.frameRate)),
      (c.minIndex = Math.min(c.minIndex, l)),
      (c.maxScore = Math.max(c.maxScore, o.score)),
      (c.fragmentError += o.fragmentError),
      (c.videoRanges[o.videoRange] = (c.videoRanges[o.videoRange] || 0) + 1),
      u &&
        u.forEach((h) => {
          if (!h) return;
          const f = e.groups[h];
          f &&
            ((c.hasDefaultAudio =
              c.hasDefaultAudio || e.hasDefaultAudio
                ? f.hasDefault
                : f.hasAutoSelect ||
                  (!e.hasDefaultAudio && !e.hasAutoSelectAudio)),
            Object.keys(f.channels).forEach((p) => {
              c.channels[p] = (c.channels[p] || 0) + f.channels[p];
            }));
        }),
      i
    );
  }, {});
}
function PRe(t) {
  if (!t) return t;
  const {
    lang: e,
    assocLang: n,
    characteristics: r,
    channels: i,
    audioCodec: o,
  } = t;
  return {
    lang: e,
    assocLang: n,
    characteristics: r,
    channels: i,
    audioCodec: o,
  };
}
function uv(t, e, n) {
  if ("attrs" in t) {
    const r = e.indexOf(t);
    if (r !== -1) return r;
  }
  for (let r = 0; r < e.length; r++) if (lI(t, e[r], n)) return r;
  return -1;
}
function lI(t, e, n) {
  const {
      groupId: r,
      name: i,
      lang: o,
      assocLang: l,
      characteristics: u,
      default: c,
    } = t,
    d = t.forced;
  return (
    (r === void 0 || e.groupId === r) &&
    (i === void 0 || e.name === i) &&
    (o === void 0 || VMn(o, e.lang)) &&
    (o === void 0 || e.assocLang === l) &&
    (c === void 0 || e.default === c) &&
    (d === void 0 || e.forced === d) &&
    (u === void 0 || zMn(u, e.characteristics)) &&
    (n === void 0 || n(t, e))
  );
}
function VMn(t, e = "--") {
  return t.length === e.length ? t === e : t.startsWith(e) || e.startsWith(t);
}
function zMn(t, e = "") {
  const n = t.split(","),
    r = e.split(",");
  return n.length === r.length && !n.some((i) => r.indexOf(i) === -1);
}
function iw(t, e) {
  const { audioCodec: n, channels: r } = t;
  return !(
    (n !== void 0 &&
      (e.audioCodec || "").substring(0, 4) !== n.substring(0, 4)) ||
    (r !== void 0 && r !== (e.channels || "2"))
  );
}
function jMn(t, e, n, r, i) {
  const o = e[r],
    l = e.reduce((f, p, g) => {
      const y = p.uri;
      return (f[y] || (f[y] = [])).push(g), f;
    }, {})[o.uri];
  l.length > 1 && (r = Math.max.apply(Math, l));
  const u = o.videoRange,
    c = o.frameRate,
    d = o.codecSet.substring(0, 4),
    h = MRe(e, r, (f) => {
      if (
        f.videoRange !== u ||
        f.frameRate !== c ||
        f.codecSet.substring(0, 4) !== d
      )
        return !1;
      const p = f.audioGroups,
        g = n.filter((y) => !p || p.indexOf(y.groupId) !== -1);
      return uv(t, g, i) > -1;
    });
  return h > -1
    ? h
    : MRe(e, r, (f) => {
        const p = f.audioGroups,
          g = n.filter((y) => !p || p.indexOf(y.groupId) !== -1);
        return uv(t, g, i) > -1;
      });
}
function MRe(t, e, n) {
  for (let r = e; r > -1; r--) if (n(t[r])) return r;
  for (let r = e + 1; r < t.length; r++) if (n(t[r])) return r;
  return -1;
}
function WMn(t, e) {
  var n;
  return !!t && t !== ((n = e.levels[e.loadLevel]) == null ? void 0 : n.uri);
}
class KMn extends _b {
  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.bwEstimator = void 0),
      (this._abandonRulesCheck = () => {
        var n;
        const { fragCurrent: r, partCurrent: i, hls: o } = this,
          { autoLevelEnabled: l, media: u } = o;
        if (!r || !u) return;
        const c = performance.now(),
          d = i ? i.stats : r.stats,
          h = i ? i.duration : r.duration,
          f = c - d.loading.start,
          p = o.minAutoLevel;
        if (d.aborted || (d.loaded && d.loaded === d.total) || r.level <= p)
          return this.clearTimer(), void (this._nextAutoLevel = -1);
        if (!l || u.paused || !u.playbackRate || !u.readyState) return;
        const g = o.mainForwardBufferInfo;
        if (g === null) return;
        const y = this.bwEstimator.getEstimateTTFB(),
          v = Math.abs(u.playbackRate);
        if (f <= Math.max(y, (h / (2 * v)) * 1e3)) return;
        const b = g.len / v,
          w = d.loading.first ? d.loading.first - d.loading.start : -1,
          k = d.loaded && w > -1,
          D = this.getBwEstimate(),
          $ = o.levels,
          N = $[r.level],
          P = Math.max(
            d.loaded,
            Math.round((h * (r.bitrate || N.averageBitrate)) / 8)
          );
        let I = k ? f - w : f;
        I < 1 && k && (I = Math.min(f, (8 * d.loaded) / D));
        const O = k ? (1e3 * d.loaded) / I : 0,
          X = y / 1e3,
          G = O ? (P - d.loaded) / O : (8 * P) / D + X;
        if (G <= b) return;
        const H = O ? 8 * O : D,
          E =
            ((n = this.hls.latestLevelDetails) == null ? void 0 : n.live) ===
            !0,
          S = this.hls.config.abrBandWidthUpFactor;
        let L,
          W = Number.POSITIVE_INFINITY;
        for (L = r.level - 1; L > p; L--) {
          const De = $[L].maxBitrate,
            Xe = !$[L].details || E;
          if (
            ((W = this.getTimeToLoadFrag(X, H, h * De, Xe)),
            W < Math.min(b, h + X))
          )
            break;
        }
        if (W >= G || W > 10 * h) return;
        k
          ? this.bwEstimator.sample(f - Math.min(y, w), d.loaded)
          : this.bwEstimator.sampleTTFB(f);
        const F = $[L].maxBitrate;
        this.getBwEstimate() * S > F && this.resetEstimator(F);
        const oe = this.findBestLevel(F, p, L, 0, b, 1, 1);
        oe > -1 && (L = oe),
          this.warn(`Fragment ${r.sn}${i ? " part " + i.index : ""} of level ${
            r.level
          } is loading too slowly;
      Fragment duration: ${r.duration.toFixed(3)}
      Time to underbuffer: ${b.toFixed(3)} s
      Estimated load time for current fragment: ${G.toFixed(3)} s
      Estimated load time for down switch fragment: ${W.toFixed(3)} s
      TTFB estimate: ${0 | w} ms
      Current BW estimate: ${Ta(D) ? 0 | D : "Unknown"} bps
      New BW estimate: ${0 | this.getBwEstimate()} bps
      Switching to level ${L} @ ${0 | F} bps`),
          (o.nextLoadLevel = o.nextAutoLevel = L),
          this.clearTimer(),
          (this.timer = self.setInterval(() => {
            if (
              (this.clearTimer(),
              this.fragCurrent === r && this.hls.loadLevel === L && L > 0)
            ) {
              const De = this.getStarvationDelay();
              if (
                (this.warn(`Aborting inflight request ${
                  L > 0 ? "and switching down" : ""
                }
      Fragment duration: ${r.duration.toFixed(3)} s
      Time to underbuffer: ${De.toFixed(3)} s`),
                r.abortRequests(),
                (this.fragCurrent = this.partCurrent = null),
                L > p)
              ) {
                let Xe = this.findBestLevel(
                  this.hls.levels[p].bitrate,
                  p,
                  L,
                  0,
                  De,
                  1,
                  1
                );
                Xe === -1 && (Xe = p),
                  (this.hls.nextLoadLevel = this.hls.nextAutoLevel = Xe),
                  this.resetEstimator(this.hls.levels[Xe].bitrate);
              }
            }
          }, 1e3 * W)),
          o.trigger(Tt.FRAG_LOAD_EMERGENCY_ABORTED, {
            frag: r,
            part: i,
            stats: d,
          });
      }),
      (this.hls = e),
      (this.bwEstimator = this.initEstimator()),
      this.registerListeners();
  }
  resetEstimator(e) {
    e &&
      (this.log(`setting initial bwe to ${e}`),
      (this.hls.config.abrEwmaDefaultEstimate = e)),
      (this.firstSelection = -1),
      (this.bwEstimator = this.initEstimator());
  }
  initEstimator() {
    const e = this.hls.config;
    return new SMn(
      e.abrEwmaSlowVoD,
      e.abrEwmaFastVoD,
      e.abrEwmaDefaultEstimate
    );
  }
  registerListeners() {
    const { hls: e } = this;
    e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.FRAG_LOADING, this.onFragLoading, this),
      e.on(Tt.FRAG_LOADED, this.onFragLoaded, this),
      e.on(Tt.FRAG_BUFFERED, this.onFragBuffered, this),
      e.on(Tt.LEVEL_SWITCHING, this.onLevelSwitching, this),
      e.on(Tt.LEVEL_LOADED, this.onLevelLoaded, this),
      e.on(Tt.LEVELS_UPDATED, this.onLevelsUpdated, this),
      e.on(Tt.MAX_AUTO_LEVEL_UPDATED, this.onMaxAutoLevelUpdated, this),
      e.on(Tt.ERROR, this.onError, this);
  }
  unregisterListeners() {
    const { hls: e } = this;
    e &&
      (e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.FRAG_LOADING, this.onFragLoading, this),
      e.off(Tt.FRAG_LOADED, this.onFragLoaded, this),
      e.off(Tt.FRAG_BUFFERED, this.onFragBuffered, this),
      e.off(Tt.LEVEL_SWITCHING, this.onLevelSwitching, this),
      e.off(Tt.LEVEL_LOADED, this.onLevelLoaded, this),
      e.off(Tt.LEVELS_UPDATED, this.onLevelsUpdated, this),
      e.off(Tt.MAX_AUTO_LEVEL_UPDATED, this.onMaxAutoLevelUpdated, this),
      e.off(Tt.ERROR, this.onError, this));
  }
  destroy() {
    this.unregisterListeners(),
      this.clearTimer(),
      (this.hls = this._abandonRulesCheck = null),
      (this.fragCurrent = this.partCurrent = null);
  }
  onManifestLoading(e, n) {
    (this.lastLoadedFragLevel = -1),
      (this.firstSelection = -1),
      (this.lastLevelLoadSec = 0),
      (this.fragCurrent = this.partCurrent = null),
      this.onLevelsUpdated(),
      this.clearTimer();
  }
  onLevelsUpdated() {
    this.lastLoadedFragLevel > -1 &&
      this.fragCurrent &&
      (this.lastLoadedFragLevel = this.fragCurrent.level),
      (this._nextAutoLevel = -1),
      this.onMaxAutoLevelUpdated(),
      (this.codecTiers = null),
      (this.audioTracksByGroup = null);
  }
  onMaxAutoLevelUpdated() {
    (this.firstSelection = -1), (this.nextAutoLevelKey = "");
  }
  onFragLoading(e, n) {
    const r = n.frag;
    if (!this.ignoreFragment(r)) {
      var i;
      r.bitrateTest ||
        ((this.fragCurrent = r),
        (this.partCurrent = (i = n.part) != null ? i : null)),
        this.clearTimer(),
        (this.timer = self.setInterval(this._abandonRulesCheck, 100));
    }
  }
  onLevelSwitching(e, n) {
    this.clearTimer();
  }
  onError(e, n) {
    if (!n.fatal)
      switch (n.details) {
        case Ir.BUFFER_ADD_CODEC_ERROR:
        case Ir.BUFFER_APPEND_ERROR:
          (this.lastLoadedFragLevel = -1), (this.firstSelection = -1);
          break;
        case Ir.FRAG_LOAD_TIMEOUT: {
          const r = n.frag,
            { fragCurrent: i, partCurrent: o } = this;
          if (r && i && r.sn === i.sn && r.level === i.level) {
            const l = performance.now(),
              u = o ? o.stats : r.stats,
              c = l - u.loading.start,
              d = u.loading.first ? u.loading.first - u.loading.start : -1;
            if (u.loaded && d > -1) {
              const h = this.bwEstimator.getEstimateTTFB();
              this.bwEstimator.sample(c - Math.min(h, d), u.loaded);
            } else this.bwEstimator.sampleTTFB(c);
          }
          break;
        }
      }
  }
  getTimeToLoadFrag(e, n, r, i) {
    return e + r / n + (i ? this.lastLevelLoadSec : 0);
  }
  onLevelLoaded(e, n) {
    const r = this.hls.config,
      { loading: i } = n.stats,
      o = i.end - i.start;
    Ta(o) && (this.lastLevelLoadSec = o / 1e3),
      n.details.live
        ? this.bwEstimator.update(r.abrEwmaSlowLive, r.abrEwmaFastLive)
        : this.bwEstimator.update(r.abrEwmaSlowVoD, r.abrEwmaFastVoD);
  }
  onFragLoaded(e, { frag: n, part: r }) {
    const i = r ? r.stats : n.stats;
    if (
      (n.type === ko.MAIN &&
        this.bwEstimator.sampleTTFB(i.loading.first - i.loading.start),
      !this.ignoreFragment(n))
    ) {
      if (
        (this.clearTimer(),
        n.level === this._nextAutoLevel && (this._nextAutoLevel = -1),
        (this.firstSelection = -1),
        this.hls.config.abrMaxWithRealBitrate)
      ) {
        const o = r ? r.duration : n.duration,
          l = this.hls.levels[n.level],
          u = (l.loaded ? l.loaded.bytes : 0) + i.loaded,
          c = (l.loaded ? l.loaded.duration : 0) + o;
        (l.loaded = { bytes: u, duration: c }),
          (l.realBitrate = Math.round((8 * u) / c));
      }
      if (n.bitrateTest) {
        const o = { stats: i, frag: n, part: r, id: n.type };
        this.onFragBuffered(Tt.FRAG_BUFFERED, o), (n.bitrateTest = !1);
      } else this.lastLoadedFragLevel = n.level;
    }
  }
  onFragBuffered(e, n) {
    const { frag: r, part: i } = n,
      o = i != null && i.stats.loaded ? i.stats : r.stats;
    if (o.aborted || this.ignoreFragment(r)) return;
    const l =
      o.parsing.end -
      o.loading.start -
      Math.min(
        o.loading.first - o.loading.start,
        this.bwEstimator.getEstimateTTFB()
      );
    this.bwEstimator.sample(l, o.loaded),
      (o.bwEstimate = this.getBwEstimate()),
      r.bitrateTest
        ? (this.bitrateTestDelay = l / 1e3)
        : (this.bitrateTestDelay = 0);
  }
  ignoreFragment(e) {
    return e.type !== ko.MAIN || e.sn === "initSegment";
  }
  clearTimer() {
    this.timer > -1 && (self.clearInterval(this.timer), (this.timer = -1));
  }
  get firstAutoLevel() {
    const { maxAutoLevel: e, minAutoLevel: n } = this.hls,
      r = this.getBwEstimate(),
      i = this.hls.config.maxStarvationDelay,
      o = this.findBestLevel(r, n, e, 0, i, 1, 1);
    if (o > -1) return o;
    const l = this.hls.firstLevel,
      u = Math.min(Math.max(l, n), e);
    return (
      this.warn(
        `Could not find best starting auto level. Defaulting to first in playlist ${l} clamped to ${u}`
      ),
      u
    );
  }
  get forcedAutoLevel() {
    return this.nextAutoLevelKey ? -1 : this._nextAutoLevel;
  }
  get nextAutoLevel() {
    const e = this.forcedAutoLevel,
      n = this.bwEstimator.canEstimate(),
      r = this.lastLoadedFragLevel > -1;
    if (
      !(
        e === -1 ||
        (n && r && this.nextAutoLevelKey !== this.getAutoLevelKey())
      )
    )
      return e;
    const i = n && r ? this.getNextABRAutoLevel() : this.firstAutoLevel;
    if (e !== -1) {
      const o = this.hls.levels;
      if (o.length > Math.max(e, i) && o[e].loadError <= o[i].loadError)
        return e;
    }
    return (
      (this._nextAutoLevel = i),
      (this.nextAutoLevelKey = this.getAutoLevelKey()),
      i
    );
  }
  getAutoLevelKey() {
    return `${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`;
  }
  getNextABRAutoLevel() {
    const { fragCurrent: e, partCurrent: n, hls: r } = this;
    if (r.levels.length <= 1) return r.loadLevel;
    const { maxAutoLevel: i, config: o, minAutoLevel: l } = r,
      u = n ? n.duration : e ? e.duration : 0,
      c = this.getBwEstimate(),
      d = this.getStarvationDelay();
    let h = o.abrBandWidthFactor,
      f = o.abrBandWidthUpFactor;
    if (d) {
      const b = this.findBestLevel(c, l, i, d, 0, h, f);
      if (b >= 0) return b;
    }
    let p = u ? Math.min(u, o.maxStarvationDelay) : o.maxStarvationDelay;
    if (!d) {
      const b = this.bitrateTestDelay;
      b &&
        ((p = (u ? Math.min(u, o.maxLoadingDelay) : o.maxLoadingDelay) - b),
        this.info(
          `bitrate test took ${Math.round(
            1e3 * b
          )}ms, set first fragment max fetchDuration to ${Math.round(
            1e3 * p
          )} ms`
        ),
        (h = f = 1));
    }
    const g = this.findBestLevel(c, l, i, d, p, h, f);
    if (
      (this.info(
        `${
          d ? "rebuffering expected" : "buffer is empty"
        }, optimal quality level ${g}`
      ),
      g > -1)
    )
      return g;
    const y = r.levels[l],
      v = r.levels[r.loadLevel];
    return (y == null ? void 0 : y.bitrate) < (v == null ? void 0 : v.bitrate)
      ? l
      : r.loadLevel;
  }
  getStarvationDelay() {
    const e = this.hls,
      n = e.media;
    if (!n) return 1 / 0;
    const r = n && n.playbackRate !== 0 ? Math.abs(n.playbackRate) : 1,
      i = e.mainForwardBufferInfo;
    return (i ? i.len : 0) / r;
  }
  getBwEstimate() {
    return this.bwEstimator.canEstimate()
      ? this.bwEstimator.getEstimate()
      : this.hls.config.abrEwmaDefaultEstimate;
  }
  findBestLevel(e, n, r, i, o, l, u) {
    var c;
    const d = i + o,
      h = this.lastLoadedFragLevel,
      f = h === -1 ? this.hls.firstLevel : h,
      { fragCurrent: p, partCurrent: g } = this,
      { levels: y, allAudioTracks: v, loadLevel: b, config: w } = this.hls;
    if (y.length === 1) return 0;
    const k = y[f],
      D = !((c = this.hls.latestLevelDetails) == null || !c.live),
      $ = b === -1 || h === -1;
    let N,
      P = "SDR",
      I = (k == null ? void 0 : k.frameRate) || 0;
    const { audioPreference: O, videoPreference: X } = w,
      G = this.audioTracksByGroup || (this.audioTracksByGroup = HMn(v));
    let H = -1;
    if ($) {
      if (this.firstSelection !== -1) return this.firstSelection;
      const oe = BMn(
          this.codecTiers || (this.codecTiers = XMn(y, G, n, r)),
          P,
          e,
          O,
          X
        ),
        {
          codecSet: De,
          videoRanges: Xe,
          minFramerate: ze,
          minBitrate: ht,
          minIndex: gt,
          preferHDR: pt,
        } = oe;
      (H = gt),
        (N = De),
        (P = pt ? Xe[Xe.length - 1] : Xe[0]),
        (I = ze),
        (e = Math.max(e, ht)),
        this.log(`picked start tier ${JSON.stringify(oe)}`);
    } else
      (N = k == null ? void 0 : k.codecSet),
        (P = k == null ? void 0 : k.videoRange);
    const E = g ? g.duration : p ? p.duration : 0,
      S = this.bwEstimator.getEstimateTTFB() / 1e3,
      L = [];
    for (let oe = r; oe >= n; oe--) {
      var W;
      const De = y[oe],
        Xe = oe > f;
      if (!De) continue;
      if (
        w.useMediaCapabilities &&
        !De.supportedResult &&
        !De.supportedPromise
      ) {
        var F;
        const ot = navigator.mediaCapabilities;
        typeof (ot == null ? void 0 : ot.decodingInfo) != "function" ||
        (!LMn(De, G, P, I, e, O) &&
          ((F = De.videoCodec) == null ? void 0 : F.substring(0, 4)) !== "hvc1")
          ? (De.supportedResult = sje)
          : ((De.supportedPromise = OMn(De, G, ot)),
            De.supportedPromise.then((tt) => {
              if (!this.hls) return;
              De.supportedResult = tt;
              const He = this.hls.levels,
                de = He.indexOf(De);
              tt.error
                ? this.warn(
                    `MediaCapabilities decodingInfo error: "${
                      tt.error
                    }" for level ${de} ${JSON.stringify(tt)}`
                  )
                : tt.supported ||
                  (this.warn(
                    `Unsupported MediaCapabilities decodingInfo result for level ${de} ${JSON.stringify(
                      tt
                    )}`
                  ),
                  de > -1 &&
                    He.length > 1 &&
                    (this.log(`Removing unsupported level ${de}`),
                    this.hls.removeLevel(de),
                    this.hls.loadLevel === -1 && (this.hls.nextLoadLevel = 0)));
            }));
      }
      if (
        ((N && De.codecSet !== N) ||
          (P && De.videoRange !== P) ||
          (Xe && I > De.frameRate) ||
          (!Xe && I > 0 && I < De.frameRate) ||
          (De.supportedResult &&
            ((W = De.supportedResult.decodingInfoResults) == null ||
              !W[0].smooth))) &&
        (!$ || oe !== H)
      ) {
        L.push(oe);
        continue;
      }
      const ze = De.details,
        ht =
          (g
            ? ze == null
              ? void 0
              : ze.partTarget
            : ze == null
            ? void 0
            : ze.averagetargetduration) || E;
      let gt;
      gt = Xe ? u * e : l * e;
      const pt = E && i >= 2 * E && o === 0 ? De.averageBitrate : De.maxBitrate,
        $t = this.getTimeToLoadFrag(S, gt, pt * ht, ze === void 0);
      if (
        gt >= pt &&
        (oe === h || (De.loadError === 0 && De.fragmentError === 0)) &&
        ($t <= S || !Ta($t) || (D && !this.bitrateTestDelay) || $t < d)
      ) {
        const ot = this.forcedAutoLevel;
        return (
          oe === b ||
            (ot !== -1 && ot === b) ||
            (L.length &&
              this.trace(
                `Skipped level(s) ${L.join(
                  ","
                )} of ${r} max with CODECS and VIDEO-RANGE:"${
                  y[L[0]].codecs
                }" ${y[L[0]].videoRange}; not compatible with "${N}" ${P}`
              ),
            this.info(
              `switch candidate:${f}->${oe} adjustedbw(${Math.round(
                gt
              )})-bitrate=${Math.round(gt - pt)} ttfb:${S.toFixed(
                1
              )} avgDuration:${ht.toFixed(1)} maxFetchDuration:${d.toFixed(
                1
              )} fetchDuration:${$t.toFixed(1)} firstSelection:${$} codecSet:${
                De.codecSet
              } videoRange:${De.videoRange} hls.loadLevel:${b}`
            )),
          $ && (this.firstSelection = oe),
          oe
        );
      }
    }
    return -1;
  }
  set nextAutoLevel(e) {
    const { maxAutoLevel: n, minAutoLevel: r } = this.hls,
      i = Math.min(Math.max(e, r), n);
    this._nextAutoLevel !== i &&
      ((this.nextAutoLevelKey = ""), (this._nextAutoLevel = i));
  }
}
const Mue = {
  search: function (t, e) {
    let n = 0,
      r = t.length - 1,
      i = null,
      o = null;
    for (; n <= r; ) {
      (i = ((n + r) / 2) | 0), (o = t[i]);
      const l = e(o);
      if (l > 0) n = i + 1;
      else {
        if (!(l < 0)) return o;
        r = i - 1;
      }
    }
    return null;
  },
};
function ZMn(t, e, n) {
  if (
    e === null ||
    !Array.isArray(t) ||
    !t.length ||
    !Ta(e) ||
    e < (t[0].programDateTime || 0) ||
    e >= (t[t.length - 1].endProgramDateTime || 0)
  )
    return null;
  n = n || 0;
  for (let r = 0; r < t.length; ++r) {
    const i = t[r];
    if (QMn(e, n, i)) return i;
  }
  return null;
}
function eD(t, e, n = 0, r = 0, i = 0.005) {
  let o = null;
  if (t) {
    o = e[1 + t.sn - e[0].sn] || null;
    const u = t.endDTS - n;
    u > 0 && u < 15e-7 && (n += 15e-7),
      o &&
        t.level !== o.level &&
        o.end <= t.end &&
        (o = e[2 + t.sn - e[0].sn] || null);
  } else n === 0 && e[0].start === 0 && (o = e[0]);
  if (
    o &&
    (((!t || t.level === o.level) && CRe(n, r, o) === 0) ||
      YMn(o, t, Math.min(i, r)))
  )
    return o;
  const l = Mue.search(e, CRe.bind(null, n, r));
  return !l || (l === t && o) ? o : l;
}
function YMn(t, e, n) {
  if (e && e.start === 0 && e.level < t.level && (e.endPTS || 0) > 0) {
    const r = e.tagList.reduce(
      (i, o) => (o[0] === "INF" && (i += parseFloat(o[1])), i),
      n
    );
    return t.start <= r;
  }
  return !1;
}
function CRe(t = 0, e = 0, n) {
  if (n.start <= t && n.start + n.duration > t) return 0;
  const r = Math.min(e, n.duration + (n.deltaPTS ? n.deltaPTS : 0));
  return n.start + n.duration - r <= t
    ? 1
    : n.start - r > t && n.start
    ? -1
    : 0;
}
function QMn(t, e, n) {
  const r = 1e3 * Math.min(e, n.duration + (n.deltaPTS ? n.deltaPTS : 0));
  return (n.endProgramDateTime || 0) - r > t;
}
function lje(t, e) {
  return Mue.search(t, (n) => (n.cc < e ? 1 : n.cc > e ? -1 : 0));
}
function JMn(t, e, n) {
  if (t && t.startCC <= e && t.endCC >= e) {
    const r = n.start,
      i = n.end;
    let o = t.fragments;
    if (!n.relurl) {
      const { fragmentHint: l } = t;
      l && (o = o.concat(l));
    }
    return Mue.search(o, (l) =>
      l.cc < e || l.end <= r ? 1 : l.cc > e || l.start >= i ? -1 : 0
    );
  }
  return null;
}
function l8(t) {
  switch (t.details) {
    case Ir.FRAG_LOAD_TIMEOUT:
    case Ir.KEY_LOAD_TIMEOUT:
    case Ir.LEVEL_LOAD_TIMEOUT:
    case Ir.MANIFEST_LOAD_TIMEOUT:
      return !0;
  }
  return !1;
}
function $Re(t, e) {
  const n = l8(e);
  return t.default[(n ? "timeout" : "error") + "Retry"];
}
function Cue(t, e) {
  const n = t.backoff === "linear" ? 1 : Math.pow(2, e);
  return Math.min(n * t.retryDelayMs, t.maxRetryDelayMs);
}
function xRe(t) {
  return pl(pl({}, t), { errorRetry: null, timeoutRetry: null });
}
function u8(t, e, n, r) {
  if (!t) return !1;
  const i = r == null ? void 0 : r.code,
    o = e < t.maxNumRetry && (qMn(i) || !!n);
  return t.shouldRetry ? t.shouldRetry(t, e, n, r, o) : o;
}
function qMn(t) {
  return (t === 0 && navigator.onLine === !1) || (!!t && (t < 400 || t > 499));
}
var qd = {
    DoNothing: 0,
    SendEndCallback: 1,
    SendAlternateToPenaltyBox: 2,
    RemoveAlternatePermanently: 3,
    InsertDiscontinuity: 4,
    RetryRequest: 5,
  },
  l0 = {
    None: 0,
    MoveAllAlternatesMatchingHost: 1,
    MoveAllAlternatesMatchingHDCP: 2,
    SwitchToSDR: 4,
  };
class eCn extends _b {
  constructor(e) {
    super("error-controller", e.logger),
      (this.hls = void 0),
      (this.playlistError = 0),
      (this.penalizedRenditions = {}),
      (this.hls = e),
      this.registerListeners();
  }
  registerListeners() {
    const e = this.hls;
    e.on(Tt.ERROR, this.onError, this),
      e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.LEVEL_UPDATED, this.onLevelUpdated, this);
  }
  unregisterListeners() {
    const e = this.hls;
    e &&
      (e.off(Tt.ERROR, this.onError, this),
      e.off(Tt.ERROR, this.onErrorOut, this),
      e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.LEVEL_UPDATED, this.onLevelUpdated, this));
  }
  destroy() {
    this.unregisterListeners(),
      (this.hls = null),
      (this.penalizedRenditions = {});
  }
  startLoad(e) {}
  stopLoad() {
    this.playlistError = 0;
  }
  getVariantLevelIndex(e) {
    return (e == null ? void 0 : e.type) === ko.MAIN
      ? e.level
      : this.hls.loadLevel;
  }
  onManifestLoading() {
    (this.playlistError = 0), (this.penalizedRenditions = {});
  }
  onLevelUpdated() {
    this.playlistError = 0;
  }
  onError(e, n) {
    var r;
    if (n.fatal) return;
    const i = this.hls,
      o = n.context;
    switch (n.details) {
      case Ir.FRAG_LOAD_ERROR:
      case Ir.FRAG_LOAD_TIMEOUT:
      case Ir.KEY_LOAD_ERROR:
      case Ir.KEY_LOAD_TIMEOUT:
        return void (n.errorAction = this.getFragRetryOrSwitchAction(n));
      case Ir.FRAG_PARSING_ERROR:
        if ((r = n.frag) != null && r.gap) return void (n.errorAction = aL());
      case Ir.FRAG_GAP:
      case Ir.FRAG_DECRYPT_ERROR:
        return (
          (n.errorAction = this.getFragRetryOrSwitchAction(n)),
          void (n.errorAction.action = qd.SendAlternateToPenaltyBox)
        );
      case Ir.LEVEL_EMPTY_ERROR:
      case Ir.LEVEL_PARSING_ERROR:
        {
          var l, u;
          const d = n.parent === ko.MAIN ? n.level : i.loadLevel;
          n.details === Ir.LEVEL_EMPTY_ERROR &&
          (l = n.context) != null &&
          (u = l.levelDetails) != null &&
          u.live
            ? (n.errorAction = this.getPlaylistRetryOrSwitchAction(n, d))
            : ((n.levelRetry = !1),
              (n.errorAction = this.getLevelSwitchAction(n, d)));
        }
        return;
      case Ir.LEVEL_LOAD_ERROR:
      case Ir.LEVEL_LOAD_TIMEOUT:
        return void (
          typeof (o == null ? void 0 : o.level) == "number" &&
          (n.errorAction = this.getPlaylistRetryOrSwitchAction(n, o.level))
        );
      case Ir.AUDIO_TRACK_LOAD_ERROR:
      case Ir.AUDIO_TRACK_LOAD_TIMEOUT:
      case Ir.SUBTITLE_LOAD_ERROR:
      case Ir.SUBTITLE_TRACK_LOAD_TIMEOUT:
        if (o) {
          const d = i.levels[i.loadLevel];
          if (
            d &&
            ((o.type === B1.AUDIO_TRACK && d.hasAudioGroup(o.groupId)) ||
              (o.type === B1.SUBTITLE_TRACK && d.hasSubtitleGroup(o.groupId)))
          )
            return (
              (n.errorAction = this.getPlaylistRetryOrSwitchAction(
                n,
                i.loadLevel
              )),
              (n.errorAction.action = qd.SendAlternateToPenaltyBox),
              void (n.errorAction.flags = l0.MoveAllAlternatesMatchingHost)
            );
        }
        return;
      case Ir.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:
        {
          const d = i.levels[i.loadLevel],
            h = d == null ? void 0 : d.attrs["HDCP-LEVEL"];
          h
            ? (n.errorAction = {
                action: qd.SendAlternateToPenaltyBox,
                flags: l0.MoveAllAlternatesMatchingHDCP,
                hdcpLevel: h,
              })
            : this.keySystemError(n);
        }
        return;
      case Ir.BUFFER_ADD_CODEC_ERROR:
      case Ir.REMUX_ALLOC_ERROR:
      case Ir.BUFFER_APPEND_ERROR:
        var c;
        n.errorAction ||
          (n.errorAction = this.getLevelSwitchAction(
            n,
            (c = n.level) != null ? c : i.loadLevel
          ));
        return;
      case Ir.INTERNAL_EXCEPTION:
      case Ir.BUFFER_APPENDING_ERROR:
      case Ir.BUFFER_FULL_ERROR:
      case Ir.LEVEL_SWITCH_ERROR:
      case Ir.BUFFER_STALLED_ERROR:
      case Ir.BUFFER_SEEK_OVER_HOLE:
      case Ir.BUFFER_NUDGE_ON_STALL:
        return void (n.errorAction = aL());
    }
    n.type === ro.KEY_SYSTEM_ERROR && this.keySystemError(n);
  }
  keySystemError(e) {
    const n = this.getVariantLevelIndex(e.frag);
    (e.levelRetry = !1), (e.errorAction = this.getLevelSwitchAction(e, n));
  }
  getPlaylistRetryOrSwitchAction(e, n) {
    const r = $Re(this.hls.config.playlistLoadPolicy, e),
      i = this.playlistError++;
    if (u8(r, i, l8(e), e.response))
      return {
        action: qd.RetryRequest,
        flags: l0.None,
        retryConfig: r,
        retryCount: i,
      };
    const o = this.getLevelSwitchAction(e, n);
    return r && ((o.retryConfig = r), (o.retryCount = i)), o;
  }
  getFragRetryOrSwitchAction(e) {
    const n = this.hls,
      r = this.getVariantLevelIndex(e.frag),
      i = n.levels[r],
      { fragLoadPolicy: o, keyLoadPolicy: l } = n.config,
      u = $Re(e.details.startsWith("key") ? l : o, e),
      c = n.levels.reduce((h, f) => h + f.fragmentError, 0);
    if (
      i &&
      (e.details !== Ir.FRAG_GAP && i.fragmentError++,
      u8(u, c, l8(e), e.response))
    )
      return {
        action: qd.RetryRequest,
        flags: l0.None,
        retryConfig: u,
        retryCount: c,
      };
    const d = this.getLevelSwitchAction(e, r);
    return u && ((d.retryConfig = u), (d.retryCount = c)), d;
  }
  getLevelSwitchAction(e, n) {
    const r = this.hls;
    n == null && (n = r.loadLevel);
    const i = this.hls.levels[n];
    if (i) {
      var o, l;
      const d = e.details;
      i.loadError++, d === Ir.BUFFER_APPEND_ERROR && i.fragmentError++;
      let h = -1;
      const { levels: f, loadLevel: p, minAutoLevel: g, maxAutoLevel: y } = r;
      r.autoLevelEnabled || (r.loadLevel = -1);
      const v = (o = e.frag) == null ? void 0 : o.type,
        b =
          ((v === ko.AUDIO && d === Ir.FRAG_PARSING_ERROR) ||
            (e.sourceBufferName === "audio" &&
              (d === Ir.BUFFER_ADD_CODEC_ERROR ||
                d === Ir.BUFFER_APPEND_ERROR))) &&
          f.some(({ audioCodec: $ }) => i.audioCodec !== $),
        w =
          e.sourceBufferName === "video" &&
          (d === Ir.BUFFER_ADD_CODEC_ERROR || d === Ir.BUFFER_APPEND_ERROR) &&
          f.some(
            ({ codecSet: $, audioCodec: N }) =>
              i.codecSet !== $ && i.audioCodec === N
          ),
        { type: k, groupId: D } = (l = e.context) != null ? l : {};
      for (let $ = f.length; $--; ) {
        const N = ($ + p) % f.length;
        if (N !== p && N >= g && N <= y && f[N].loadError === 0) {
          var u, c;
          const P = f[N];
          if (d === Ir.FRAG_GAP && v === ko.MAIN && e.frag) {
            const I = f[N].details;
            if (I) {
              const O = eD(e.frag, I.fragments, e.frag.start);
              if (O != null && O.gap) continue;
            }
          } else if (
            (k === B1.AUDIO_TRACK && P.hasAudioGroup(D)) ||
            (k === B1.SUBTITLE_TRACK && P.hasSubtitleGroup(D)) ||
            (v === ko.AUDIO &&
              (u = i.audioGroups) != null &&
              u.some((I) => P.hasAudioGroup(I))) ||
            (v === ko.SUBTITLE &&
              (c = i.subtitleGroups) != null &&
              c.some((I) => P.hasSubtitleGroup(I))) ||
            (b && i.audioCodec === P.audioCodec) ||
            (!b && i.audioCodec !== P.audioCodec) ||
            (w && i.codecSet === P.codecSet)
          )
            continue;
          h = N;
          break;
        }
      }
      if (h > -1 && r.loadLevel !== h)
        return (
          (e.levelRetry = !0),
          (this.playlistError = 0),
          {
            action: qd.SendAlternateToPenaltyBox,
            flags: l0.None,
            nextAutoLevel: h,
          }
        );
    }
    return {
      action: qd.SendAlternateToPenaltyBox,
      flags: l0.MoveAllAlternatesMatchingHost,
    };
  }
  onErrorOut(e, n) {
    var r;
    switch ((r = n.errorAction) == null ? void 0 : r.action) {
      case qd.DoNothing:
        break;
      case qd.SendAlternateToPenaltyBox:
        this.sendAlternateToPenaltyBox(n),
          n.errorAction.resolved || n.details === Ir.FRAG_GAP
            ? /MediaSource readyState: ended/.test(n.error.message) &&
              (this.warn(
                `MediaSource ended after "${n.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`
              ),
              this.hls.recoverMediaError())
            : (n.fatal = !0);
    }
    n.fatal && this.hls.stopLoad();
  }
  sendAlternateToPenaltyBox(e) {
    const n = this.hls,
      r = e.errorAction;
    if (!r) return;
    const { flags: i, hdcpLevel: o, nextAutoLevel: l } = r;
    switch (i) {
      case l0.None:
        this.switchLevel(e, l);
        break;
      case l0.MoveAllAlternatesMatchingHDCP:
        o && ((n.maxHdcpLevel = wRe[wRe.indexOf(o) - 1]), (r.resolved = !0)),
          this.warn(
            `Restricting playback to HDCP-LEVEL of "${n.maxHdcpLevel}" or lower`
          );
    }
    r.resolved || this.switchLevel(e, l);
  }
  switchLevel(e, n) {
    n !== void 0 &&
      e.errorAction &&
      (this.warn(`switching to level ${n} after ${e.details}`),
      (this.hls.nextAutoLevel = n),
      (e.errorAction.resolved = !0),
      (this.hls.nextLoadLevel = this.hls.nextAutoLevel));
  }
}
function aL(t) {
  const e = { action: qd.DoNothing, flags: l0.None };
  return t && (e.resolved = !0), e;
}
var d0 = {
    NOT_LOADED: "NOT_LOADED",
    APPENDING: "APPENDING",
    PARTIAL: "PARTIAL",
    OK: "OK",
  },
  lE = { cbc: 0, ctr: 1 };
class tCn {
  constructor(e, n, r) {
    (this.subtle = void 0),
      (this.aesIV = void 0),
      (this.aesMode = void 0),
      (this.subtle = e),
      (this.aesIV = n),
      (this.aesMode = r);
  }
  decrypt(e, n) {
    switch (this.aesMode) {
      case lE.cbc:
        return this.subtle.decrypt({ name: "AES-CBC", iv: this.aesIV }, n, e);
      case lE.ctr:
        return this.subtle.decrypt(
          { name: "AES-CTR", counter: this.aesIV, length: 64 },
          n,
          e
        );
      default:
        throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`);
    }
  }
}
function MS(t, e, n) {
  return Uint8Array.prototype.slice
    ? t.slice(e, n)
    : new Uint8Array(Array.prototype.slice.call(t, e, n));
}
function nCn(t) {
  const e = t.byteLength,
    n = e && new DataView(t.buffer).getUint8(e - 1);
  return n ? MS(t, 0, e - n) : t;
}
class rCn {
  constructor() {
    (this.rcon = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]),
      (this.subMix = [
        new Uint32Array(256),
        new Uint32Array(256),
        new Uint32Array(256),
        new Uint32Array(256),
      ]),
      (this.invSubMix = [
        new Uint32Array(256),
        new Uint32Array(256),
        new Uint32Array(256),
        new Uint32Array(256),
      ]),
      (this.sBox = new Uint32Array(256)),
      (this.invSBox = new Uint32Array(256)),
      (this.key = new Uint32Array(0)),
      (this.ksRows = 0),
      (this.keySize = 0),
      (this.keySchedule = void 0),
      (this.invKeySchedule = void 0),
      this.initTable();
  }
  uint8ArrayToUint32Array_(e) {
    const n = new DataView(e),
      r = new Uint32Array(4);
    for (let i = 0; i < 4; i++) r[i] = n.getUint32(4 * i);
    return r;
  }
  initTable() {
    const e = this.sBox,
      n = this.invSBox,
      r = this.subMix,
      i = r[0],
      o = r[1],
      l = r[2],
      u = r[3],
      c = this.invSubMix,
      d = c[0],
      h = c[1],
      f = c[2],
      p = c[3],
      g = new Uint32Array(256);
    let y = 0,
      v = 0,
      b = 0;
    for (b = 0; b < 256; b++) g[b] = b < 128 ? b << 1 : (b << 1) ^ 283;
    for (b = 0; b < 256; b++) {
      let w = v ^ (v << 1) ^ (v << 2) ^ (v << 3) ^ (v << 4);
      (w = (w >>> 8) ^ (255 & w) ^ 99), (e[y] = w), (n[w] = y);
      const k = g[y],
        D = g[k],
        $ = g[D];
      let N = (257 * g[w]) ^ (16843008 * w);
      (i[y] = (N << 24) | (N >>> 8)),
        (o[y] = (N << 16) | (N >>> 16)),
        (l[y] = (N << 8) | (N >>> 24)),
        (u[y] = N),
        (N = (16843009 * $) ^ (65537 * D) ^ (257 * k) ^ (16843008 * y)),
        (d[w] = (N << 24) | (N >>> 8)),
        (h[w] = (N << 16) | (N >>> 16)),
        (f[w] = (N << 8) | (N >>> 24)),
        (p[w] = N),
        y ? ((y = k ^ g[g[g[$ ^ k]]]), (v ^= g[g[v]])) : (y = v = 1);
    }
  }
  expandKey(e) {
    const n = this.uint8ArrayToUint32Array_(e);
    let r = !0,
      i = 0;
    for (; i < n.length && r; ) (r = n[i] === this.key[i]), i++;
    if (r) return;
    this.key = n;
    const o = (this.keySize = n.length);
    if (o !== 4 && o !== 6 && o !== 8)
      throw new Error("Invalid aes key size=" + o);
    const l = (this.ksRows = 4 * (o + 6 + 1));
    let u, c;
    const d = (this.keySchedule = new Uint32Array(l)),
      h = (this.invKeySchedule = new Uint32Array(l)),
      f = this.sBox,
      p = this.rcon,
      g = this.invSubMix,
      y = g[0],
      v = g[1],
      b = g[2],
      w = g[3];
    let k, D;
    for (u = 0; u < l; u++)
      u < o
        ? (k = d[u] = n[u])
        : ((D = k),
          u % o == 0
            ? ((D = (D << 8) | (D >>> 24)),
              (D =
                (f[D >>> 24] << 24) |
                (f[(D >>> 16) & 255] << 16) |
                (f[(D >>> 8) & 255] << 8) |
                f[255 & D]),
              (D ^= p[(u / o) | 0] << 24))
            : o > 6 &&
              u % o == 4 &&
              (D =
                (f[D >>> 24] << 24) |
                (f[(D >>> 16) & 255] << 16) |
                (f[(D >>> 8) & 255] << 8) |
                f[255 & D]),
          (d[u] = k = (d[u - o] ^ D) >>> 0));
    for (c = 0; c < l; c++)
      (u = l - c),
        (D = 3 & c ? d[u] : d[u - 4]),
        (h[c] =
          c < 4 || u <= 4
            ? D
            : y[f[D >>> 24]] ^
              v[f[(D >>> 16) & 255]] ^
              b[f[(D >>> 8) & 255]] ^
              w[f[255 & D]]),
        (h[c] = h[c] >>> 0);
  }
  networkToHostOrderSwap(e) {
    return (e << 24) | ((65280 & e) << 8) | ((16711680 & e) >> 8) | (e >>> 24);
  }
  decrypt(e, n, r) {
    const i = this.keySize + 6,
      o = this.invKeySchedule,
      l = this.invSBox,
      u = this.invSubMix,
      c = u[0],
      d = u[1],
      h = u[2],
      f = u[3],
      p = this.uint8ArrayToUint32Array_(r);
    let g = p[0],
      y = p[1],
      v = p[2],
      b = p[3];
    const w = new Int32Array(e),
      k = new Int32Array(w.length);
    let D, $, N, P, I, O, X, G, H, E, S, L, W, F;
    const oe = this.networkToHostOrderSwap;
    for (; n < w.length; ) {
      for (
        H = oe(w[n]),
          E = oe(w[n + 1]),
          S = oe(w[n + 2]),
          L = oe(w[n + 3]),
          I = H ^ o[0],
          O = L ^ o[1],
          X = S ^ o[2],
          G = E ^ o[3],
          W = 4,
          F = 1;
        F < i;
        F++
      )
        (D =
          c[I >>> 24] ^
          d[(O >> 16) & 255] ^
          h[(X >> 8) & 255] ^
          f[255 & G] ^
          o[W]),
          ($ =
            c[O >>> 24] ^
            d[(X >> 16) & 255] ^
            h[(G >> 8) & 255] ^
            f[255 & I] ^
            o[W + 1]),
          (N =
            c[X >>> 24] ^
            d[(G >> 16) & 255] ^
            h[(I >> 8) & 255] ^
            f[255 & O] ^
            o[W + 2]),
          (P =
            c[G >>> 24] ^
            d[(I >> 16) & 255] ^
            h[(O >> 8) & 255] ^
            f[255 & X] ^
            o[W + 3]),
          (I = D),
          (O = $),
          (X = N),
          (G = P),
          (W += 4);
      (D =
        (l[I >>> 24] << 24) ^
        (l[(O >> 16) & 255] << 16) ^
        (l[(X >> 8) & 255] << 8) ^
        l[255 & G] ^
        o[W]),
        ($ =
          (l[O >>> 24] << 24) ^
          (l[(X >> 16) & 255] << 16) ^
          (l[(G >> 8) & 255] << 8) ^
          l[255 & I] ^
          o[W + 1]),
        (N =
          (l[X >>> 24] << 24) ^
          (l[(G >> 16) & 255] << 16) ^
          (l[(I >> 8) & 255] << 8) ^
          l[255 & O] ^
          o[W + 2]),
        (P =
          (l[G >>> 24] << 24) ^
          (l[(I >> 16) & 255] << 16) ^
          (l[(O >> 8) & 255] << 8) ^
          l[255 & X] ^
          o[W + 3]),
        (k[n] = oe(D ^ g)),
        (k[n + 1] = oe(P ^ y)),
        (k[n + 2] = oe(N ^ v)),
        (k[n + 3] = oe($ ^ b)),
        (g = H),
        (y = E),
        (v = S),
        (b = L),
        (n += 4);
    }
    return k.buffer;
  }
}
class iCn {
  constructor(e, n, r) {
    (this.subtle = void 0),
      (this.key = void 0),
      (this.aesMode = void 0),
      (this.subtle = e),
      (this.key = n),
      (this.aesMode = r);
  }
  expandKey() {
    const e = aCn(this.aesMode);
    return this.subtle.importKey("raw", this.key, { name: e }, !1, [
      "encrypt",
      "decrypt",
    ]);
  }
}
function aCn(t) {
  switch (t) {
    case lE.cbc:
      return "AES-CBC";
    case lE.ctr:
      return "AES-CTR";
    default:
      throw new Error(`[FastAESKey] invalid aes mode ${t}`);
  }
}
function jp(t, e = !1) {
  if (typeof TextDecoder < "u") {
    const c = new TextDecoder("utf-8").decode(t);
    if (e) {
      const d = c.indexOf("\0");
      return d !== -1 ? c.substring(0, d) : c;
    }
    return c.replace(/\0/g, "");
  }
  const n = t.length;
  let r,
    i,
    o,
    l = "",
    u = 0;
  for (; u < n; ) {
    if (((r = t[u++]), r === 0 && e)) return l;
    if (r !== 0 && r !== 3)
      switch (r >> 4) {
        case 0:
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
        case 6:
        case 7:
          l += String.fromCharCode(r);
          break;
        case 12:
        case 13:
          (i = t[u++]), (l += String.fromCharCode(((31 & r) << 6) | (63 & i)));
          break;
        case 14:
          (i = t[u++]),
            (o = t[u++]),
            (l += String.fromCharCode(
              ((15 & r) << 12) | ((63 & i) << 6) | ((63 & o) << 0)
            ));
      }
  }
  return l;
}
const zy = {
  hexDump: function (t) {
    let e = "";
    for (let n = 0; n < t.length; n++) {
      let r = t[n].toString(16);
      r.length < 2 && (r = "0" + r), (e += r);
    }
    return e;
  },
};
function oCn(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default")
    ? t.default
    : t;
}
class sCn {
  constructor() {
    (this.aborted = !1),
      (this.loaded = 0),
      (this.retry = 0),
      (this.total = 0),
      (this.chunkCount = 0),
      (this.bwEstimate = 0),
      (this.loading = { start: 0, first: 0, end: 0 }),
      (this.parsing = { start: 0, end: 0 }),
      (this.buffering = { start: 0, first: 0, end: 0 });
  }
}
var rh = { AUDIO: "audio", VIDEO: "video", AUDIOVIDEO: "audiovideo" };
function Ef(t) {
  return t.sn !== "initSegment";
}
const c8 = Math.pow(2, 32) - 1,
  lCn = [].push,
  uje = { video: 1, audio: 2, id3: 3, text: 4 };
function Sc(t) {
  return String.fromCharCode.apply(null, t);
}
function cje(t, e) {
  const n = (t[e] << 8) | t[e + 1];
  return n < 0 ? 65536 + n : n;
}
function ba(t, e) {
  const n = dje(t, e);
  return n < 0 ? 4294967296 + n : n;
}
function LRe(t, e) {
  let n = ba(t, e);
  return (n *= Math.pow(2, 32)), (n += ba(t, e + 4)), n;
}
function dje(t, e) {
  return (t[e] << 24) | (t[e + 1] << 16) | (t[e + 2] << 8) | t[e + 3];
}
function qW(t, e, n) {
  (t[e] = n >> 24),
    (t[e + 1] = (n >> 16) & 255),
    (t[e + 2] = (n >> 8) & 255),
    (t[e + 3] = 255 & n);
}
function uCn(t) {
  const e = t.byteLength;
  for (let n = 0; n < e; ) {
    const r = ba(t, n);
    if (
      r > 8 &&
      t[n + 4] === 109 &&
      t[n + 5] === 111 &&
      t[n + 6] === 111 &&
      t[n + 7] === 102
    )
      return !0;
    n = r > 1 ? n + r : e;
  }
  return !1;
}
function oo(t, e) {
  const n = [];
  if (!e.length) return n;
  const r = t.byteLength;
  for (let i = 0; i < r; ) {
    const o = ba(t, i),
      l = o > 1 ? i + o : r;
    if (Sc(t.subarray(i + 4, i + 8)) === e[0])
      if (e.length === 1) n.push(t.subarray(i + 8, l));
      else {
        const u = oo(t.subarray(i + 8, l), e.slice(1));
        u.length && lCn.apply(n, u);
      }
    i = l;
  }
  return n;
}
function cCn(t) {
  const e = [],
    n = t[0];
  let r = 8;
  const i = ba(t, r);
  r += 4;
  let o = 0,
    l = 0;
  n === 0
    ? ((o = ba(t, r)), (l = ba(t, r + 4)), (r += 8))
    : ((o = LRe(t, r)), (l = LRe(t, r + 8)), (r += 16)),
    (r += 2);
  let u = t.length + l;
  const c = cje(t, r);
  r += 2;
  for (let d = 0; d < c; d++) {
    let h = r;
    const f = ba(t, h);
    h += 4;
    const p = 2147483647 & f;
    if ((2147483648 & f) >>> 31 === 1)
      return Ds.warn("SIDX has hierarchical references (not supported)"), null;
    const g = ba(t, h);
    (h += 4),
      e.push({
        referenceSize: p,
        subsegmentDuration: g,
        info: { duration: g / i, start: u, end: u + p - 1 },
      }),
      (u += p),
      (h += 4),
      (r = h);
  }
  return {
    earliestPresentationTime: o,
    timescale: i,
    version: n,
    referencesCount: c,
    references: e,
  };
}
function hje(t) {
  const e = [],
    n = oo(t, ["moov", "trak"]);
  for (let r = 0; r < n.length; r++) {
    const i = n[r],
      o = oo(i, ["tkhd"])[0];
    if (o) {
      let l = o[0];
      const u = ba(o, l === 0 ? 12 : 20),
        c = oo(i, ["mdia", "mdhd"])[0];
      if (c) {
        l = c[0];
        const d = ba(c, l === 0 ? 12 : 20),
          h = oo(i, ["mdia", "hdlr"])[0];
        if (h) {
          const f = Sc(h.subarray(8, 12)),
            p = { soun: rh.AUDIO, vide: rh.VIDEO }[f];
          if (p) {
            const g = dCn(oo(i, ["mdia", "minf", "stbl", "stsd"])[0]);
            (e[u] = { timescale: d, type: p }),
              (e[p] = pl({ timescale: d, id: u }, g));
          }
        }
      }
    }
  }
  return (
    oo(t, ["moov", "mvex", "trex"]).forEach((r) => {
      const i = ba(r, 4),
        o = e[i];
      o && (o.default = { duration: ba(r, 12), flags: ba(r, 20) });
    }),
    e
  );
}
function dCn(t) {
  const e = t.subarray(8),
    n = e.subarray(86),
    r = Sc(e.subarray(4, 8));
  let i = r;
  const o = r === "enca" || r === "encv";
  if (o) {
    const l = oo(e, [r])[0];
    oo(l.subarray(r === "enca" ? 28 : 78), ["sinf"]).forEach((u) => {
      const c = oo(u, ["schm"])[0];
      if (c) {
        const d = Sc(c.subarray(4, 8));
        if (d === "cbcs" || d === "cenc") {
          const h = oo(u, ["frma"])[0];
          h && (i = Sc(h));
        }
      }
    });
  }
  switch (i) {
    case "avc1":
    case "avc2":
    case "avc3":
    case "avc4": {
      const l = oo(n, ["avcC"])[0];
      i += "." + u4(l[1]) + u4(l[2]) + u4(l[3]);
      break;
    }
    case "mp4a": {
      const l = oo(e, [r])[0],
        u = oo(l.subarray(28), ["esds"])[0];
      if (u && u.length > 7) {
        let c = 4;
        if (u[c++] !== 3) break;
        (c = eK(u, c)), (c += 2);
        const d = u[c++];
        if ((128 & d && (c += 2), 64 & d && (c += u[c++]), u[c++] !== 4)) break;
        c = eK(u, c);
        const h = u[c++];
        if (h !== 64 || ((i += "." + u4(h)), (c += 12), u[c++] !== 5)) break;
        c = eK(u, c);
        const f = u[c++];
        let p = (248 & f) >> 3;
        p === 31 && (p += 1 + ((7 & f) << 3) + ((224 & u[c]) >> 5)),
          (i += "." + p);
      }
      break;
    }
    case "hvc1":
    case "hev1": {
      const l = oo(n, ["hvcC"])[0],
        u = l[1],
        c = ["", "A", "B", "C"][u >> 6],
        d = 31 & u,
        h = ba(l, 2),
        f = (32 & u) >> 5 ? "H" : "L",
        p = l[12],
        g = l.subarray(6, 12);
      (i += "." + c + d),
        (i += "." + h.toString(16).toUpperCase()),
        (i += "." + f + p);
      let y = "";
      for (let v = g.length; v--; ) {
        const b = g[v];
        (b || y) && (y = "." + b.toString(16).toUpperCase() + y);
      }
      i += y;
      break;
    }
    case "dvh1":
    case "dvhe": {
      const l = oo(n, ["dvcC"])[0],
        u = (l[2] >> 1) & 127,
        c = ((l[2] << 5) & 32) | ((l[3] >> 3) & 31);
      i += "." + Ry(u) + "." + Ry(c);
      break;
    }
    case "vp09": {
      const l = oo(n, ["vpcC"])[0],
        u = l[4],
        c = l[5],
        d = (l[6] >> 4) & 15;
      i += "." + Ry(u) + "." + Ry(c) + "." + Ry(d);
      break;
    }
    case "av01": {
      const l = oo(n, ["av1C"])[0],
        u = l[1] >>> 5,
        c = 31 & l[1],
        d = l[2] >>> 7 ? "H" : "M",
        h = (64 & l[2]) >> 6,
        f = (32 & l[2]) >> 5,
        p = u === 2 && h ? (f ? 12 : 10) : h ? 10 : 8,
        g = (16 & l[2]) >> 4,
        y = (8 & l[2]) >> 3,
        v = (4 & l[2]) >> 2,
        b = 3 & l[2],
        w = 1,
        k = 1,
        D = 1,
        $ = 0;
      i +=
        "." +
        u +
        "." +
        Ry(c) +
        d +
        "." +
        Ry(p) +
        "." +
        g +
        "." +
        y +
        v +
        b +
        "." +
        Ry(w) +
        "." +
        Ry(k) +
        "." +
        Ry(D) +
        "." +
        $;
      break;
    }
  }
  return { codec: i, encrypted: o };
}
function eK(t, e) {
  const n = e + 5;
  for (; 128 & t[e++] && e < n; );
  return e;
}
function u4(t) {
  return ("0" + t.toString(16).toUpperCase()).slice(-2);
}
function Ry(t) {
  return (t < 10 ? "0" : "") + t;
}
function hCn(t, e) {
  if (!t || !e) return t;
  const n = e.keyId;
  return (
    n &&
      e.isCommonEncryption &&
      oo(t, ["moov", "trak"]).forEach((r) => {
        const i = oo(r, ["mdia", "minf", "stbl", "stsd"])[0].subarray(8);
        let o = oo(i, ["enca"]);
        const l = o.length > 0;
        l || (o = oo(i, ["encv"])),
          o.forEach((u) => {
            oo(l ? u.subarray(28) : u.subarray(78), ["sinf"]).forEach((c) => {
              const d = fje(c);
              if (d) {
                const h = d.subarray(8, 24);
                h.some((f) => f !== 0) ||
                  (Ds.log(
                    `[eme] Patching keyId in 'enc${
                      l ? "a" : "v"
                    }>sinf>>tenc' box: ${zy.hexDump(h)} -> ${zy.hexDump(n)}`
                  ),
                  d.set(n, 8));
              }
            });
          });
      }),
    t
  );
}
function fje(t) {
  const e = oo(t, ["schm"])[0];
  if (e) {
    const n = Sc(e.subarray(4, 8));
    if (n === "cbcs" || n === "cenc") return oo(t, ["schi", "tenc"])[0];
  }
  return null;
}
function fCn(t, e) {
  return oo(e, ["moof", "traf"]).reduce((n, r) => {
    const i = oo(r, ["tfdt"])[0],
      o = i[0],
      l = oo(r, ["tfhd"]).reduce((u, c) => {
        const d = ba(c, 4),
          h = t[d];
        if (h) {
          let f = ba(i, 4);
          if (o === 1) {
            if (f === c8)
              return (
                Ds.warn(
                  "[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"
                ),
                u
              );
            (f *= c8 + 1), (f += ba(i, 8));
          }
          const p = f / (h.timescale || 9e4);
          if (Ta(p) && (u === null || p < u)) return p;
        }
        return u;
      }, null);
    return l !== null && Ta(l) && (n === null || l < n) ? l : n;
  }, null);
}
function pCn(t, e) {
  let n = 0,
    r = 0,
    i = 0;
  const o = oo(t, ["moof", "traf"]);
  for (let l = 0; l < o.length; l++) {
    const u = o[l],
      c = oo(u, ["tfhd"])[0],
      d = e[ba(c, 4)];
    if (!d) continue;
    const h = d.default,
      f = ba(c, 0) | (h == null ? void 0 : h.flags);
    let p = h == null ? void 0 : h.duration;
    8 & f && (p = ba(c, 2 & f ? 12 : 8));
    const g = d.timescale || 9e4,
      y = oo(u, ["trun"]);
    for (let v = 0; v < y.length; v++)
      (n = gCn(y[v])),
        !n && p && (n = p * ba(y[v], 4)),
        d.type === rh.VIDEO
          ? (r += n / g)
          : d.type === rh.AUDIO && (i += n / g);
  }
  if (r === 0 && i === 0) {
    let l = 1 / 0,
      u = 0,
      c = 0;
    const d = oo(t, ["sidx"]);
    for (let h = 0; h < d.length; h++) {
      const f = cCn(d[h]);
      if (f != null && f.references) {
        l = Math.min(l, f.earliestPresentationTime / f.timescale);
        const p = f.references.reduce((g, y) => g + y.info.duration || 0, 0);
        (u = Math.max(u, p + f.earliestPresentationTime / f.timescale)),
          (c = u - l);
      }
    }
    if (c && Ta(c)) return c;
  }
  return r || i;
}
function gCn(t) {
  const e = ba(t, 0);
  let n = 8;
  1 & e && (n += 4), 4 & e && (n += 4);
  let r = 0;
  const i = ba(t, 4);
  for (let o = 0; o < i; o++)
    256 & e && ((r += ba(t, n)), (n += 4)),
      512 & e && (n += 4),
      1024 & e && (n += 4),
      2048 & e && (n += 4);
  return r;
}
function mCn(t, e, n) {
  oo(e, ["moof", "traf"]).forEach((r) => {
    oo(r, ["tfhd"]).forEach((i) => {
      const o = ba(i, 4),
        l = t[o];
      if (!l) return;
      const u = l.timescale || 9e4;
      oo(r, ["tfdt"]).forEach((c) => {
        const d = c[0],
          h = n * u;
        if (h) {
          let f = ba(c, 4);
          if (d === 0) (f -= h), (f = Math.max(f, 0)), qW(c, 4, f);
          else {
            (f *= Math.pow(2, 32)),
              (f += ba(c, 8)),
              (f -= h),
              (f = Math.max(f, 0));
            const p = Math.floor(f / (c8 + 1)),
              g = Math.floor(f % (c8 + 1));
            qW(c, 4, p), qW(c, 8, g);
          }
        }
      });
    });
  });
}
function yCn(t) {
  const e = { valid: null, remainder: null },
    n = oo(t, ["moof"]);
  if (n.length < 2) return (e.remainder = t), e;
  const r = n[n.length - 1];
  return (
    (e.valid = MS(t, 0, r.byteOffset - 8)),
    (e.remainder = MS(t, r.byteOffset - 8)),
    e
  );
}
function fm(t, e) {
  const n = new Uint8Array(t.length + e.length);
  return n.set(t), n.set(e, t.length), n;
}
function ORe(t, e) {
  const n = [],
    r = e.samples,
    i = e.timescale,
    o = e.id;
  let l = !1;
  return (
    oo(r, ["moof"]).map((u) => {
      const c = u.byteOffset - 8;
      oo(u, ["traf"]).map((d) => {
        const h = oo(d, ["tfdt"]).map((f) => {
          const p = f[0];
          let g = ba(f, 4);
          return p === 1 && ((g *= Math.pow(2, 32)), (g += ba(f, 8))), g / i;
        })[0];
        return (
          h !== void 0 && (t = h),
          oo(d, ["tfhd"]).map((f) => {
            const p = ba(f, 4),
              g = 16777215 & ba(f, 0);
            let y = 0;
            const v = (16 & g) != 0;
            let b = 0;
            const w = (32 & g) != 0;
            let k = 8;
            p === o &&
              (1 & g && (k += 8),
              2 & g && (k += 4),
              8 & g && ((y = ba(f, k)), (k += 4)),
              v && ((b = ba(f, k)), (k += 4)),
              w && (k += 4),
              e.type === "video" && (l = vCn(e.codec)),
              oo(d, ["trun"]).map((D) => {
                const $ = D[0],
                  N = 16777215 & ba(D, 0),
                  P = (1 & N) != 0;
                let I = 0;
                const O = (4 & N) != 0,
                  X = (256 & N) != 0;
                let G = 0;
                const H = (512 & N) != 0;
                let E = 0;
                const S = (1024 & N) != 0,
                  L = (2048 & N) != 0;
                let W = 0;
                const F = ba(D, 4);
                let oe = 8;
                P && ((I = ba(D, oe)), (oe += 4)), O && (oe += 4);
                let De = I + c;
                for (let Xe = 0; Xe < F; Xe++) {
                  if (
                    (X ? ((G = ba(D, oe)), (oe += 4)) : (G = y),
                    H ? ((E = ba(D, oe)), (oe += 4)) : (E = b),
                    S && (oe += 4),
                    L && ((W = $ === 0 ? ba(D, oe) : dje(D, oe)), (oe += 4)),
                    e.type === rh.VIDEO)
                  ) {
                    let ze = 0;
                    for (; ze < E; ) {
                      const ht = ba(r, De);
                      (De += 4),
                        bCn(l, r[De]) &&
                          $ue(r.subarray(De, De + ht), l ? 2 : 1, t + W / i, n),
                        (De += ht),
                        (ze += ht + 4);
                    }
                  }
                  t += G / i;
                }
              }));
          })
        );
      });
    }),
    n
  );
}
function vCn(t) {
  if (!t) return !1;
  const e = t.indexOf("."),
    n = e < 0 ? t : t.substring(0, e);
  return n === "hvc1" || n === "hev1" || n === "dvh1" || n === "dvhe";
}
function bCn(t, e) {
  if (t) {
    const n = (e >> 1) & 63;
    return n === 39 || n === 40;
  }
  return (31 & e) === 6;
}
function $ue(t, e, n, r) {
  const i = pje(t);
  let o = 0;
  o += e;
  let l = 0,
    u = 0,
    c = 0;
  for (; o < i.length; ) {
    l = 0;
    do {
      if (o >= i.length) break;
      (c = i[o++]), (l += c);
    } while (c === 255);
    u = 0;
    do {
      if (o >= i.length) break;
      (c = i[o++]), (u += c);
    } while (c === 255);
    const d = i.length - o;
    let h = o;
    if (u < d) o += u;
    else if (u > d) {
      Ds.error(
        `Malformed SEI payload. ${u} is too small, only ${d} bytes left to parse.`
      );
      break;
    }
    if (l === 4) {
      if (i[h++] === 181) {
        const f = cje(i, h);
        if (((h += 2), f === 49)) {
          const p = ba(i, h);
          if (((h += 4), p === 1195456820)) {
            const g = i[h++];
            if (g === 3) {
              const y = i[h++],
                v = 64 & y,
                b = v ? 2 + 3 * (31 & y) : 0,
                w = new Uint8Array(b);
              if (v) {
                w[0] = y;
                for (let k = 1; k < b; k++) w[k] = i[h++];
              }
              r.push({ type: g, payloadType: l, pts: n, bytes: w });
            }
          }
        }
      }
    } else if (l === 5 && u > 16) {
      const f = [];
      for (let y = 0; y < 16; y++) {
        const v = i[h++].toString(16);
        f.push(v.length == 1 ? "0" + v : v),
          (y !== 3 && y !== 5 && y !== 7 && y !== 9) || f.push("-");
      }
      const p = u - 16,
        g = new Uint8Array(p);
      for (let y = 0; y < p; y++) g[y] = i[h++];
      r.push({
        payloadType: l,
        pts: n,
        uuid: f.join(""),
        userData: jp(g),
        userDataBytes: g,
      });
    }
  }
}
function pje(t) {
  const e = t.byteLength,
    n = [];
  let r = 1;
  for (; r < e - 2; )
    t[r] === 0 && t[r + 1] === 0 && t[r + 2] === 3
      ? (n.push(r + 2), (r += 2))
      : r++;
  if (n.length === 0) return t;
  const i = e - n.length,
    o = new Uint8Array(i);
  let l = 0;
  for (r = 0; r < i; l++, r++) l === n[0] && (l++, n.shift()), (o[r] = t[l]);
  return o;
}
function _Cn(t) {
  const e = t[0];
  let n = "",
    r = "",
    i = 0,
    o = 0,
    l = 0,
    u = 0,
    c = 0,
    d = 0;
  if (e === 0) {
    for (; Sc(t.subarray(d, d + 1)) !== "\0"; )
      (n += Sc(t.subarray(d, d + 1))), (d += 1);
    for (
      n += Sc(t.subarray(d, d + 1)), d += 1;
      Sc(t.subarray(d, d + 1)) !== "\0";

    )
      (r += Sc(t.subarray(d, d + 1))), (d += 1);
    (r += Sc(t.subarray(d, d + 1))),
      (d += 1),
      (i = ba(t, 12)),
      (o = ba(t, 16)),
      (u = ba(t, 20)),
      (c = ba(t, 24)),
      (d = 28);
  } else if (e === 1) {
    (d += 4), (i = ba(t, d)), (d += 4);
    const h = ba(t, d);
    d += 4;
    const f = ba(t, d);
    for (
      d += 4,
        l = 2 ** 32 * h + f,
        TMn(l) ||
          ((l = Number.MAX_SAFE_INTEGER),
          Ds.warn(
            "Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box"
          )),
        u = ba(t, d),
        d += 4,
        c = ba(t, d),
        d += 4;
      Sc(t.subarray(d, d + 1)) !== "\0";

    )
      (n += Sc(t.subarray(d, d + 1))), (d += 1);
    for (
      n += Sc(t.subarray(d, d + 1)), d += 1;
      Sc(t.subarray(d, d + 1)) !== "\0";

    )
      (r += Sc(t.subarray(d, d + 1))), (d += 1);
    (r += Sc(t.subarray(d, d + 1))), (d += 1);
  }
  return {
    schemeIdUri: n,
    value: r,
    timeScale: i,
    presentationTime: l,
    presentationTimeDelta: o,
    eventDuration: u,
    id: c,
    payload: t.subarray(d, t.byteLength),
  };
}
function TCn(t, ...e) {
  const n = e.length;
  let r = 8,
    i = n;
  for (; i--; ) r += e[i].byteLength;
  const o = new Uint8Array(r);
  for (
    o[0] = (r >> 24) & 255,
      o[1] = (r >> 16) & 255,
      o[2] = (r >> 8) & 255,
      o[3] = 255 & r,
      o.set(t, 4),
      i = 0,
      r = 8;
    i < n;
    i++
  )
    o.set(e[i], r), (r += e[i].byteLength);
  return o;
}
function ECn(t, e, n) {
  if (t.byteLength !== 16) throw new RangeError("Invalid system id");
  let r, i;
  (r = new Uint8Array()), (i = new Uint8Array());
  const o = new Uint8Array(4);
  return (
    n &&
      n.byteLength > 0 &&
      new DataView(o.buffer).setUint32(0, n.byteLength, !1),
    TCn(
      [112, 115, 115, 104],
      new Uint8Array([0, 0, 0, 0]),
      t,
      i,
      r,
      o,
      n || new Uint8Array()
    )
  );
}
function SCn(t) {
  const e = [];
  if (t instanceof ArrayBuffer) {
    const n = t.byteLength;
    let r = 0;
    for (; r + 32 < n; ) {
      const i = RCn(new DataView(t, r));
      e.push(i), (r += i.size);
    }
  }
  return e;
}
function RCn(t) {
  const e = t.getUint32(0),
    n = t.byteOffset,
    r = t.byteLength;
  if (r < e) return { offset: n, size: r };
  if (t.getUint32(4) !== 1886614376) return { offset: n, size: e };
  const i = t.getUint32(8) >>> 24;
  if (i !== 0 && i !== 1) return { offset: n, size: e };
  const o = t.buffer,
    l = zy.hexDump(new Uint8Array(o, n + 12, 16)),
    u = t.getUint32(28);
  let c = null,
    d = null;
  if (i === 0) {
    if (e - 32 < u || u < 22) return { offset: n, size: e };
    d = new Uint8Array(o, n + 32, u);
  } else if (i === 1) {
    if (!u || r < n + 32 + 16 * u + 16) return { offset: n, size: e };
    c = [];
    for (let h = 0; h < u; h++) c.push(new Uint8Array(o, n + 32 + 16 * h, 16));
  }
  return { version: i, systemId: l, kids: c, data: d, offset: n, size: e };
}
class xue {
  constructor(e, { removePKCS7Padding: n = !0 } = {}) {
    if (
      ((this.logEnabled = !0),
      (this.removePKCS7Padding = void 0),
      (this.subtle = null),
      (this.softwareDecrypter = null),
      (this.key = null),
      (this.fastAesKey = null),
      (this.remainderData = null),
      (this.currentIV = null),
      (this.currentResult = null),
      (this.useSoftware = void 0),
      (this.enableSoftwareAES = void 0),
      (this.enableSoftwareAES = e.enableSoftwareAES),
      (this.removePKCS7Padding = n),
      n)
    )
      try {
        const r = self.crypto;
        r && (this.subtle = r.subtle || r.webkitSubtle);
      } catch {}
    this.useSoftware = !this.subtle;
  }
  destroy() {
    (this.subtle = null),
      (this.softwareDecrypter = null),
      (this.key = null),
      (this.fastAesKey = null),
      (this.remainderData = null),
      (this.currentIV = null),
      (this.currentResult = null);
  }
  isSync() {
    return this.useSoftware;
  }
  flush() {
    const { currentResult: e, remainderData: n } = this;
    if (!e || n) return this.reset(), null;
    const r = new Uint8Array(e);
    return this.reset(), this.removePKCS7Padding ? nCn(r) : r;
  }
  reset() {
    (this.currentResult = null),
      (this.currentIV = null),
      (this.remainderData = null),
      this.softwareDecrypter && (this.softwareDecrypter = null);
  }
  decrypt(e, n, r, i) {
    return this.useSoftware
      ? new Promise((o, l) => {
          const u = ArrayBuffer.isView(e) ? e : new Uint8Array(e);
          this.softwareDecrypt(u, n, r, i);
          const c = this.flush();
          c
            ? o(c.buffer)
            : l(new Error("[softwareDecrypt] Failed to decrypt data"));
        })
      : this.webCryptoDecrypt(new Uint8Array(e), n, r, i);
  }
  softwareDecrypt(e, n, r, i) {
    const { currentIV: o, currentResult: l, remainderData: u } = this;
    if (i !== lE.cbc || n.byteLength !== 16)
      return Ds.warn("SoftwareDecrypt: can only handle AES-128-CBC"), null;
    this.logOnce("JS AES decrypt"),
      u && ((e = fm(u, e)), (this.remainderData = null));
    const c = this.getValidChunk(e);
    if (!c.length) return null;
    o && (r = o);
    let d = this.softwareDecrypter;
    d || (d = this.softwareDecrypter = new rCn()), d.expandKey(n);
    const h = l;
    return (
      (this.currentResult = d.decrypt(c.buffer, 0, r)),
      (this.currentIV = MS(c, -16).buffer),
      h || null
    );
  }
  webCryptoDecrypt(e, n, r, i) {
    if (this.key !== n || !this.fastAesKey) {
      if (!this.subtle)
        return Promise.resolve(this.onWebCryptoError(e, n, r, i));
      (this.key = n), (this.fastAesKey = new iCn(this.subtle, n, i));
    }
    return this.fastAesKey
      .expandKey()
      .then((o) =>
        this.subtle
          ? (this.logOnce("WebCrypto AES decrypt"),
            new tCn(this.subtle, new Uint8Array(r), i).decrypt(e.buffer, o))
          : Promise.reject(new Error("web crypto not initialized"))
      )
      .catch(
        (o) => (
          Ds.warn(
            `[decrypter]: WebCrypto Error, disable WebCrypto API, ${o.name}: ${o.message}`
          ),
          this.onWebCryptoError(e, n, r, i)
        )
      );
  }
  onWebCryptoError(e, n, r, i) {
    const o = this.enableSoftwareAES;
    if (o) {
      (this.useSoftware = !0),
        (this.logEnabled = !0),
        this.softwareDecrypt(e, n, r, i);
      const l = this.flush();
      if (l) return l.buffer;
    }
    throw new Error(
      "WebCrypto" +
        (o ? " and softwareDecrypt" : "") +
        ": failed to decrypt data"
    );
  }
  getValidChunk(e) {
    let n = e;
    const r = e.length - (e.length % 16);
    return (
      r !== e.length && ((n = MS(e, 0, r)), (this.remainderData = MS(e, r))), n
    );
  }
  logOnce(e) {
    this.logEnabled && (Ds.log(`[decrypter]: ${e}`), (this.logEnabled = !1));
  }
}
const GRe = Math.pow(2, 17);
class ACn {
  constructor(e) {
    (this.config = void 0),
      (this.loader = null),
      (this.partLoadTimeout = -1),
      (this.config = e);
  }
  destroy() {
    this.loader && (this.loader.destroy(), (this.loader = null));
  }
  abort() {
    this.loader && this.loader.abort();
  }
  load(e, n) {
    const r = e.url;
    if (!r)
      return Promise.reject(
        new yT({
          type: ro.NETWORK_ERROR,
          details: Ir.FRAG_LOAD_ERROR,
          fatal: !1,
          frag: e,
          error: new Error(
            "Fragment does not have a " + (r ? "part list" : "url")
          ),
          networkDetails: null,
        })
      );
    this.abort();
    const i = this.config,
      o = i.fLoader,
      l = i.loader;
    return new Promise((u, c) => {
      if ((this.loader && this.loader.destroy(), e.gap)) {
        if (e.tagList.some((y) => y[0] === "GAP")) return void c(FRe(e));
        e.gap = !1;
      }
      const d = (this.loader = o ? new o(i) : new l(i)),
        h = NRe(e);
      e.loader = d;
      const f = xRe(i.fragLoadPolicy.default),
        p = {
          loadPolicy: f,
          timeout: f.maxLoadTimeMs,
          maxRetry: 0,
          retryDelay: 0,
          maxRetryDelay: 0,
          highWaterMark: e.sn === "initSegment" ? 1 / 0 : GRe,
        };
      e.stats = d.stats;
      const g = {
        onSuccess: (y, v, b, w) => {
          this.resetLoader(e, d);
          let k = y.data;
          b.resetIV &&
            e.decryptdata &&
            ((e.decryptdata.iv = new Uint8Array(k.slice(0, 16))),
            (k = k.slice(16))),
            u({ frag: e, part: null, payload: k, networkDetails: w });
        },
        onError: (y, v, b, w) => {
          this.resetLoader(e, d),
            c(
              new yT({
                type: ro.NETWORK_ERROR,
                details: Ir.FRAG_LOAD_ERROR,
                fatal: !1,
                frag: e,
                response: pl({ url: r, data: void 0 }, y),
                error: new Error(`HTTP Error ${y.code} ${y.text}`),
                networkDetails: b,
                stats: w,
              })
            );
        },
        onAbort: (y, v, b) => {
          this.resetLoader(e, d),
            c(
              new yT({
                type: ro.NETWORK_ERROR,
                details: Ir.INTERNAL_ABORTED,
                fatal: !1,
                frag: e,
                error: new Error("Aborted"),
                networkDetails: b,
                stats: y,
              })
            );
        },
        onTimeout: (y, v, b) => {
          this.resetLoader(e, d),
            c(
              new yT({
                type: ro.NETWORK_ERROR,
                details: Ir.FRAG_LOAD_TIMEOUT,
                fatal: !1,
                frag: e,
                error: new Error(`Timeout after ${p.timeout}ms`),
                networkDetails: b,
                stats: y,
              })
            );
        },
      };
      n &&
        (g.onProgress = (y, v, b, w) =>
          n({ frag: e, part: null, payload: b, networkDetails: w })),
        d.load(h, p, g);
    });
  }
  loadPart(e, n, r) {
    this.abort();
    const i = this.config,
      o = i.fLoader,
      l = i.loader;
    return new Promise((u, c) => {
      if ((this.loader && this.loader.destroy(), e.gap || n.gap))
        return void c(FRe(e, n));
      const d = (this.loader = o ? new o(i) : new l(i)),
        h = NRe(e, n);
      e.loader = d;
      const f = xRe(i.fragLoadPolicy.default),
        p = {
          loadPolicy: f,
          timeout: f.maxLoadTimeMs,
          maxRetry: 0,
          retryDelay: 0,
          maxRetryDelay: 0,
          highWaterMark: GRe,
        };
      (n.stats = d.stats),
        d.load(h, p, {
          onSuccess: (g, y, v, b) => {
            this.resetLoader(e, d), this.updateStatsFromPart(e, n);
            const w = { frag: e, part: n, payload: g.data, networkDetails: b };
            r(w), u(w);
          },
          onError: (g, y, v, b) => {
            this.resetLoader(e, d),
              c(
                new yT({
                  type: ro.NETWORK_ERROR,
                  details: Ir.FRAG_LOAD_ERROR,
                  fatal: !1,
                  frag: e,
                  part: n,
                  response: pl({ url: h.url, data: void 0 }, g),
                  error: new Error(`HTTP Error ${g.code} ${g.text}`),
                  networkDetails: v,
                  stats: b,
                })
              );
          },
          onAbort: (g, y, v) => {
            (e.stats.aborted = n.stats.aborted),
              this.resetLoader(e, d),
              c(
                new yT({
                  type: ro.NETWORK_ERROR,
                  details: Ir.INTERNAL_ABORTED,
                  fatal: !1,
                  frag: e,
                  part: n,
                  error: new Error("Aborted"),
                  networkDetails: v,
                  stats: g,
                })
              );
          },
          onTimeout: (g, y, v) => {
            this.resetLoader(e, d),
              c(
                new yT({
                  type: ro.NETWORK_ERROR,
                  details: Ir.FRAG_LOAD_TIMEOUT,
                  fatal: !1,
                  frag: e,
                  part: n,
                  error: new Error(`Timeout after ${p.timeout}ms`),
                  networkDetails: v,
                  stats: g,
                })
              );
          },
        });
    });
  }
  updateStatsFromPart(e, n) {
    const r = e.stats,
      i = n.stats,
      o = i.total;
    if (((r.loaded += i.loaded), o)) {
      const c = Math.round(e.duration / n.duration),
        d = Math.min(Math.round(r.loaded / o), c),
        h = (c - d) * Math.round(r.loaded / d);
      r.total = r.loaded + h;
    } else r.total = Math.max(r.loaded, r.total);
    const l = r.loading,
      u = i.loading;
    l.start
      ? (l.first += u.first - u.start)
      : ((l.start = u.start), (l.first = u.first)),
      (l.end = u.end);
  }
  resetLoader(e, n) {
    (e.loader = null),
      this.loader === n &&
        (self.clearTimeout(this.partLoadTimeout), (this.loader = null)),
      n.destroy();
  }
}
function NRe(t, e = null) {
  const n = e || t,
    r = {
      frag: t,
      part: e,
      responseType: "arraybuffer",
      url: n.url,
      headers: {},
      rangeStart: 0,
      rangeEnd: 0,
    },
    i = n.byteRangeStartOffset,
    o = n.byteRangeEndOffset;
  if (Ta(i) && Ta(o)) {
    var l;
    let u = i,
      c = o;
    if (
      t.sn === "initSegment" &&
      wCn((l = t.decryptdata) == null ? void 0 : l.method)
    ) {
      const d = o - i;
      d % 16 && (c = o + (16 - (d % 16))),
        i !== 0 && ((r.resetIV = !0), (u = i - 16));
    }
    (r.rangeStart = u), (r.rangeEnd = c);
  }
  return r;
}
function FRe(t, e) {
  const n = new Error(`GAP ${t.gap ? "tag" : "attribute"} found`),
    r = {
      type: ro.MEDIA_ERROR,
      details: Ir.FRAG_GAP,
      fatal: !1,
      frag: t,
      error: n,
      networkDetails: null,
    };
  return e && (r.part = e), ((e || t).stats.aborted = !0), new yT(r);
}
function wCn(t) {
  return t === "AES-128" || t === "AES-256";
}
class yT extends Error {
  constructor(e) {
    super(e.error.message), (this.data = void 0), (this.data = e);
  }
}
class kCn extends _b {
  constructor(e, n) {
    super(e, n),
      (this._boundTick = void 0),
      (this._tickTimer = null),
      (this._tickInterval = null),
      (this._tickCallCount = 0),
      (this._boundTick = this.tick.bind(this));
  }
  destroy() {
    this.onHandlerDestroying(), this.onHandlerDestroyed();
  }
  onHandlerDestroying() {
    this.clearNextTick(), this.clearInterval();
  }
  onHandlerDestroyed() {}
  hasInterval() {
    return !!this._tickInterval;
  }
  hasNextTick() {
    return !!this._tickTimer;
  }
  setInterval(e) {
    return (
      !this._tickInterval &&
      ((this._tickCallCount = 0),
      (this._tickInterval = self.setInterval(this._boundTick, e)),
      !0)
    );
  }
  clearInterval() {
    return (
      !!this._tickInterval &&
      (self.clearInterval(this._tickInterval), (this._tickInterval = null), !0)
    );
  }
  clearNextTick() {
    return (
      !!this._tickTimer &&
      (self.clearTimeout(this._tickTimer), (this._tickTimer = null), !0)
    );
  }
  tick() {
    this._tickCallCount++,
      this._tickCallCount === 1 &&
        (this.doTick(),
        this._tickCallCount > 1 && this.tickImmediate(),
        (this._tickCallCount = 0));
  }
  tickImmediate() {
    this.clearNextTick(),
      (this._tickTimer = self.setTimeout(this._boundTick, 0));
  }
  doTick() {}
}
class gje {
  constructor(e, n, r, i = 0, o = -1, l = !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 = c4()),
      (this.buffering = { audio: c4(), video: c4(), audiovideo: c4() }),
      (this.level = e),
      (this.sn = n),
      (this.id = r),
      (this.size = i),
      (this.part = o),
      (this.partial = l);
  }
}
function c4() {
  return { start: 0, executeStart: 0, executeEnd: 0, end: 0 };
}
const URe = { length: 0, start: () => 0, end: () => 0 };
class Ul {
  static isBuffered(e, n) {
    if (e) {
      const r = Ul.getBuffered(e);
      for (let i = r.length; i--; )
        if (n >= r.start(i) && n <= r.end(i)) return !0;
    }
    return !1;
  }
  static bufferInfo(e, n, r) {
    if (e) {
      const i = Ul.getBuffered(e);
      if (i.length) {
        const o = [];
        for (let l = 0; l < i.length; l++)
          o.push({ start: i.start(l), end: i.end(l) });
        return Ul.bufferedInfo(o, n, r);
      }
    }
    return { len: 0, start: n, end: n, nextStart: void 0 };
  }
  static bufferedInfo(e, n, r) {
    (n = Math.max(0, n)), e.sort((d, h) => d.start - h.start || h.end - d.end);
    let i = [];
    if (r)
      for (let d = 0; d < e.length; d++) {
        const h = i.length;
        if (h) {
          const f = i[h - 1].end;
          e[d].start - f < r
            ? e[d].end > f && (i[h - 1].end = e[d].end)
            : i.push(e[d]);
        } else i.push(e[d]);
      }
    else i = e;
    let o,
      l = 0,
      u = n,
      c = n;
    for (let d = 0; d < i.length; d++) {
      const h = i[d].start,
        f = i[d].end;
      if (n + r >= h && n < f) (u = h), (c = f), (l = c - n);
      else if (n + r < h) {
        o = h;
        break;
      }
    }
    return { len: l, start: u || 0, end: c || 0, nextStart: o };
  }
  static getBuffered(e) {
    try {
      return e.buffered || URe;
    } catch (n) {
      return Ds.log("failed to get media.buffered", n), URe;
    }
  }
}
const ICn = /\{\$([a-zA-Z0-9-_]+)\}/g;
function DCn(t, e) {
  if (t.variableList !== null || t.hasVariableRefs) {
    const n = t.variableList;
    return e.replace(ICn, (r) => {
      const i = r.substring(2, r.length - 1),
        o = n == null ? void 0 : n[i];
      return o === void 0
        ? (t.playlistParsingError ||
            (t.playlistParsingError = new Error(
              `Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`
            )),
          r)
        : o;
    });
  }
  return e;
}
const PCn = /^(\d+)x(\d+)$/,
  BRe = /(.+?)=(".*?"|.*?)(?:,|$)/g;
class x5 {
  constructor(e, n) {
    typeof e == "string" && (e = x5.parseAttrList(e, n)), du(this, e);
  }
  get clientAttrs() {
    return Object.keys(this).filter((e) => e.substring(0, 2) === "X-");
  }
  decimalInteger(e) {
    const n = parseInt(this[e], 10);
    return n > Number.MAX_SAFE_INTEGER ? 1 / 0 : n;
  }
  hexadecimalInteger(e) {
    if (this[e]) {
      let n = (this[e] || "0x").slice(2);
      n = (1 & n.length ? "0" : "") + n;
      const r = new Uint8Array(n.length / 2);
      for (let i = 0; i < n.length / 2; i++)
        r[i] = parseInt(n.slice(2 * i, 2 * i + 2), 16);
      return r;
    }
    return null;
  }
  hexadecimalIntegerAsNumber(e) {
    const n = parseInt(this[e], 16);
    return n > Number.MAX_SAFE_INTEGER ? 1 / 0 : n;
  }
  decimalFloatingPoint(e) {
    return parseFloat(this[e]);
  }
  optionalFloat(e, n) {
    const r = this[e];
    return r ? parseFloat(r) : n;
  }
  enumeratedString(e) {
    return this[e];
  }
  enumeratedStringList(e, n) {
    const r = this[e];
    return (r ? r.split(/[ ,]+/) : []).reduce(
      (i, o) => ((i[o.toLowerCase()] = !0), i),
      n
    );
  }
  bool(e) {
    return this[e] === "YES";
  }
  decimalResolution(e) {
    const n = PCn.exec(this[e]);
    if (n !== null)
      return { width: parseInt(n[1], 10), height: parseInt(n[2], 10) };
  }
  static parseAttrList(e, n) {
    let r;
    const i = {};
    for (BRe.lastIndex = 0; (r = BRe.exec(e)) !== null; ) {
      const o = r[1].trim();
      let l = r[2];
      const u = l.indexOf('"') === 0 && l.lastIndexOf('"') === l.length - 1;
      let c = !1;
      if (u) l = l.slice(1, -1);
      else
        switch (o) {
          case "IV":
          case "SCTE35-CMD":
          case "SCTE35-IN":
          case "SCTE35-OUT":
            c = !0;
        }
      if (n && (u || c)) l = DCn(n, l);
      else if (!c && !u)
        switch (o) {
          case "CLOSED-CAPTIONS":
            if (l === "NONE") break;
          case "ALLOWED-CPC":
          case "CLASS":
          case "ASSOC-LANGUAGE":
          case "AUDIO":
          case "BYTERANGE":
          case "CHANNELS":
          case "CHARACTERISTICS":
          case "CODECS":
          case "DATA-ID":
          case "END-DATE":
          case "GROUP-ID":
          case "ID":
          case "IMPORT":
          case "INSTREAM-ID":
          case "KEYFORMAT":
          case "KEYFORMATVERSIONS":
          case "LANGUAGE":
          case "NAME":
          case "PATHWAY-ID":
          case "QUERYPARAM":
          case "RECENTLY-REMOVED-DATERANGES":
          case "SERVER-URI":
          case "STABLE-RENDITION-ID":
          case "STABLE-VARIANT-ID":
          case "START-DATE":
          case "SUBTITLES":
          case "SUPPLEMENTAL-CODECS":
          case "URI":
          case "VALUE":
          case "VIDEO":
          case "X-ASSET-LIST":
          case "X-ASSET-URI":
            Ds.warn(`${e}: attribute ${o} is missing quotes`);
        }
      i[o] = l;
    }
    return i;
  }
}
const MCn = "com.apple.hls.interstitial";
class CCn {
  constructor(e, n, r = 0) {
    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 = (n == null ? void 0 : n.tagAnchor) || null),
      (this.tagOrder = (i = n == null ? void 0 : n.tagOrder) != null ? i : r),
      n)
    ) {
      const o = n.attr;
      for (const l in o)
        if (Object.prototype.hasOwnProperty.call(e, l) && e[l] !== o[l]) {
          Ds.warn(
            `DATERANGE tag attribute: "${l}" does not match for tags with ID: "${e.ID}"`
          ),
            (this._badValueForSameId = l);
          break;
        }
      e = du(new x5({}), o, e);
    }
    if (
      ((this.attr = e),
      n
        ? ((this._startDate = n._startDate),
          (this._cue = n._cue),
          (this._endDate = n._endDate),
          (this._dateAtEnd = n._dateAtEnd))
        : (this._startDate = new Date(e["START-DATE"])),
      "END-DATE" in this.attr)
    ) {
      const o =
        (n == null ? void 0 : n.endDate) || new Date(this.attr["END-DATE"]);
      Ta(o.getTime()) && (this._endDate = o);
    }
  }
  get id() {
    return this.attr.ID;
  }
  get class() {
    return this.attr.CLASS;
  }
  get cue() {
    const e = this._cue;
    return e === void 0
      ? (this._cue = this.attr.enumeratedStringList(
          this.attr.CUE ? "CUE" : "X-CUE",
          { pre: !1, post: !1, once: !1 }
        ))
      : e;
  }
  get startTime() {
    const { tagAnchor: e } = this;
    return e === null || e.programDateTime === null
      ? (Ds.warn(
          `Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`
        ),
        NaN)
      : e.start + (this.startDate.getTime() - e.programDateTime) / 1e3;
  }
  get startDate() {
    return this._startDate;
  }
  get endDate() {
    const e = this._endDate || this._dateAtEnd;
    if (e) return e;
    const n = this.duration;
    return n !== null
      ? (this._dateAtEnd = new Date(this._startDate.getTime() + 1e3 * n))
      : null;
  }
  get duration() {
    if ("DURATION" in this.attr) {
      const e = this.attr.decimalFloatingPoint("DURATION");
      if (Ta(e)) return e;
    } else if (this._endDate)
      return (this._endDate.getTime() - this._startDate.getTime()) / 1e3;
    return null;
  }
  get plannedDuration() {
    return "PLANNED-DURATION" in this.attr
      ? this.attr.decimalFloatingPoint("PLANNED-DURATION")
      : null;
  }
  get endOnNext() {
    return this.attr.bool("END-ON-NEXT");
  }
  get isInterstitial() {
    return this.class === MCn;
  }
  get isValid() {
    return (
      !!this.id &&
      !this._badValueForSameId &&
      Ta(this.startDate.getTime()) &&
      (this.duration === null || this.duration >= 0) &&
      (!this.endOnNext || !!this.class) &&
      (!this.attr.CUE ||
        (!this.cue.pre && !this.cue.post) ||
        this.cue.pre !== this.cue.post) &&
      (!this.isInterstitial ||
        "X-ASSET-URI" in this.attr ||
        "X-ASSET-LIST" in this.attr)
    );
  }
}
function uI(t) {
  return t === "AES-128" || t === "AES-256" || t === "AES-256-CTR";
}
function Lue(t) {
  switch (t) {
    case "AES-128":
    case "AES-256":
      return lE.cbc;
    case "AES-256-CTR":
      return lE.ctr;
    default:
      throw new Error(`invalid full segment method ${t}`);
  }
}
function Oue(t) {
  return Uint8Array.from(atob(t), (e) => e.charCodeAt(0));
}
function Hne(t) {
  return Uint8Array.from(unescape(encodeURIComponent(t)), (e) =>
    e.charCodeAt(0)
  );
}
function $Cn(t) {
  const e = Hne(t).subarray(0, 16),
    n = new Uint8Array(16);
  return n.set(e, 16 - e.length), n;
}
function xCn(t) {
  const e = function (n, r, i) {
    const o = n[r];
    (n[r] = n[i]), (n[i] = o);
  };
  e(t, 0, 3), e(t, 1, 2), e(t, 4, 5), e(t, 6, 7);
}
function LCn(t) {
  const e = t.split(":");
  let n = null;
  if (e[0] === "data" && e.length === 2) {
    const r = e[1].split(";"),
      i = r[r.length - 1].split(",");
    if (i.length === 2) {
      const o = i[0] === "base64",
        l = i[1];
      o ? (r.splice(-1, 1), (n = Oue(l))) : (n = $Cn(l));
    }
  }
  return n;
}
const d8 = typeof self < "u" ? self : void 0;
var Ls = {
    CLEARKEY: "org.w3.clearkey",
    FAIRPLAY: "com.apple.fps",
    PLAYREADY: "com.microsoft.playready",
    WIDEVINE: "com.widevine.alpha",
  },
  Sf = {
    CLEARKEY: "org.w3.clearkey",
    FAIRPLAY: "com.apple.streamingkeydelivery",
    PLAYREADY: "com.microsoft.playready",
    WIDEVINE: "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",
  };
function HRe(t) {
  switch (t) {
    case Sf.FAIRPLAY:
      return Ls.FAIRPLAY;
    case Sf.PLAYREADY:
      return Ls.PLAYREADY;
    case Sf.WIDEVINE:
      return Ls.WIDEVINE;
    case Sf.CLEARKEY:
      return Ls.CLEARKEY;
  }
}
var d4 = {
  CENC: "1077efecc0b24d02ace33c1e52e2fb4b",
  CLEARKEY: "e2719d58a985b3c9781ab030af78d30e",
  FAIRPLAY: "94ce86fb07ff4f43adb893d2fa968ca2",
  PLAYREADY: "9a04f07998404286ab92e65be0885f95",
  WIDEVINE: "edef8ba979d64acea3c827dcd51d21ed",
};
function tK(t) {
  return t === d4.WIDEVINE
    ? Ls.WIDEVINE
    : t === d4.PLAYREADY
    ? Ls.PLAYREADY
    : t === d4.CENC || t === d4.CLEARKEY
    ? Ls.CLEARKEY
    : void 0;
}
function XRe(t) {
  switch (t) {
    case Ls.FAIRPLAY:
      return Sf.FAIRPLAY;
    case Ls.PLAYREADY:
      return Sf.PLAYREADY;
    case Ls.WIDEVINE:
      return Sf.WIDEVINE;
    case Ls.CLEARKEY:
      return Sf.CLEARKEY;
  }
}
function h4(t) {
  const { drmSystems: e, widevineLicenseUrl: n } = t,
    r = e
      ? [Ls.FAIRPLAY, Ls.WIDEVINE, Ls.PLAYREADY, Ls.CLEARKEY].filter(
          (i) => !!e[i]
        )
      : [];
  return !r[Ls.WIDEVINE] && n && r.push(Ls.WIDEVINE), r;
}
const mje = (function (t) {
  return d8 != null &&
    (t = d8.navigator) != null &&
    t.requestMediaKeySystemAccess
    ? self.navigator.requestMediaKeySystemAccess.bind(self.navigator)
    : null;
})();
function OCn(t, e, n, r) {
  let i;
  switch (t) {
    case Ls.FAIRPLAY:
      i = ["cenc", "sinf"];
      break;
    case Ls.WIDEVINE:
    case Ls.PLAYREADY:
      i = ["cenc"];
      break;
    case Ls.CLEARKEY:
      i = ["cenc", "keyids"];
      break;
    default:
      throw new Error(`Unknown key-system: ${t}`);
  }
  return GCn(i, e, n, r);
}
function GCn(t, e, n, r) {
  return [
    {
      initDataTypes: t,
      persistentState: r.persistentState || "optional",
      distinctiveIdentifier: r.distinctiveIdentifier || "optional",
      sessionTypes: r.sessionTypes || [r.sessionType || "temporary"],
      audioCapabilities: e.map((i) => ({
        contentType: `audio/mp4; codecs=${i}`,
        robustness: r.audioRobustness || "",
        encryptionScheme: r.audioEncryptionScheme || null,
      })),
      videoCapabilities: n.map((i) => ({
        contentType: `video/mp4; codecs=${i}`,
        robustness: r.videoRobustness || "",
        encryptionScheme: r.videoEncryptionScheme || null,
      })),
    },
  ];
}
function yje(t) {
  const e = new Uint16Array(t.buffer, t.byteOffset, t.byteLength / 2),
    n = String.fromCharCode.apply(null, Array.from(e)),
    r = n.substring(n.indexOf("<"), n.length),
    i = new DOMParser()
      .parseFromString(r, "text/xml")
      .getElementsByTagName("KID")[0];
  if (i) {
    const o = i.childNodes[0]
      ? i.childNodes[0].nodeValue
      : i.getAttribute("VALUE");
    if (o) {
      const l = Oue(o).subarray(0, 16);
      return xCn(l), l;
    }
  }
  return null;
}
let f4 = {};
class h8 {
  static clearKeyUriToKeyIdMap() {
    f4 = {};
  }
  constructor(e, n, r, i = [1], o = null) {
    (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 = n),
      (this.keyFormat = r),
      (this.keyFormatVersions = i),
      (this.iv = o),
      (this.encrypted = !!e && e !== "NONE"),
      (this.isCommonEncryption = this.encrypted && !uI(e));
  }
  isSupported() {
    if (this.method) {
      if (uI(this.method) || this.method === "NONE") return !0;
      if (this.keyFormat === "identity") return this.method === "SAMPLE-AES";
      switch (this.keyFormat) {
        case Sf.FAIRPLAY:
        case Sf.WIDEVINE:
        case Sf.PLAYREADY:
        case Sf.CLEARKEY:
          return (
            [
              "ISO-23001-7",
              "SAMPLE-AES",
              "SAMPLE-AES-CENC",
              "SAMPLE-AES-CTR",
            ].indexOf(this.method) !== -1
          );
      }
    }
    return !1;
  }
  getDecryptData(e) {
    if (!this.encrypted || !this.uri) return null;
    if (uI(this.method) && this.uri && !this.iv) {
      typeof e != "number" &&
        (Ds.warn(
          `missing IV for initialization segment with method="${this.method}" - compliance issue`
        ),
        (e = 0));
      const r = NCn(e);
      return new h8(
        this.method,
        this.uri,
        "identity",
        this.keyFormatVersions,
        r
      );
    }
    const n = LCn(this.uri);
    if (n)
      switch (this.keyFormat) {
        case Sf.WIDEVINE:
          (this.pssh = n),
            n.length >= 22 &&
              (this.keyId = n.subarray(n.length - 22, n.length - 6));
          break;
        case Sf.PLAYREADY: {
          const r = new Uint8Array([
            154, 4, 240, 121, 152, 64, 66, 134, 171, 146, 230, 91, 224, 136, 95,
            149,
          ]);
          (this.pssh = ECn(r, null, n)), (this.keyId = yje(n));
          break;
        }
        default: {
          let r = n.subarray(0, 16);
          if (r.length !== 16) {
            const i = new Uint8Array(16);
            i.set(r, 16 - r.length), (r = i);
          }
          this.keyId = r;
          break;
        }
      }
    if (!this.keyId || this.keyId.byteLength !== 16) {
      let r = f4[this.uri];
      if (!r) {
        const i = Object.keys(f4).length % Number.MAX_SAFE_INTEGER;
        (r = new Uint8Array(16)),
          new DataView(r.buffer, 12, 4).setUint32(0, i),
          (f4[this.uri] = r);
      }
      this.keyId = r;
    }
    return this;
  }
}
function NCn(t) {
  const e = new Uint8Array(16);
  for (let n = 12; n < 16; n++) e[n] = (t >> (8 * (15 - n))) & 255;
  return e;
}
function FCn(t, e) {
  const n = t.length,
    r = t[n - 1],
    i = e.live ? 1 / 0 : e.totalduration,
    o = Object.keys(e.dateRanges);
  for (let l = o.length; l--; ) {
    const u = e.dateRanges[o[l]],
      c = u.startDate.getTime();
    u.tagAnchor = r.ref;
    for (let d = n; d--; ) {
      const h = UCn(e, c, t, d, i);
      if (h !== -1) {
        u.tagAnchor = e.fragments[h].ref;
        break;
      }
    }
  }
}
function UCn(t, e, n, r, i) {
  const o = n[r];
  if (o) {
    const u = o.programDateTime;
    if (e >= u || r === 0) {
      var l;
      if (
        e <=
        u + 1e3 * ((((l = n[r + 1]) == null ? void 0 : l.start) || i) - o.start)
      ) {
        const c = n[r].sn - t.startSN,
          d = t.fragments;
        if (d.length > n.length)
          for (
            let h = (n[r + 1] || d[d.length - 1]).sn - t.startSN;
            h > c;
            h--
          ) {
            const f = d[h].programDateTime;
            if (e >= f && e < f + 1e3 * d[h].duration) return h;
          }
        return c;
      }
    }
  }
  return -1;
}
function BCn(t, e, n) {
  t.rawProgramDateTime
    ? n.push(t)
    : e != null &&
      e.programDateTime &&
      (t.programDateTime = e.endProgramDateTime);
}
function nK(t, e) {
  const n = e.startPTS;
  if (Ta(n)) {
    let r,
      i = 0;
    e.sn > t.sn ? ((i = n - t.start), (r = t)) : ((i = t.start - n), (r = e)),
      r.duration !== i && r.setDuration(i);
  } else
    e.sn > t.sn
      ? t.cc === e.cc && t.minEndPTS
        ? e.setStart(t.start + (t.minEndPTS - t.start))
        : e.setStart(t.start + t.duration)
      : e.setStart(Math.max(t.start - e.duration, 0));
}
function vje(t, e, n, r, i, o) {
  r - n <= 0 &&
    (Ds.warn("Fragment should have a positive duration", e),
    (r = n + e.duration),
    (o = i + e.duration));
  let l = n,
    u = r;
  const c = e.startPTS,
    d = e.endPTS;
  if (Ta(c)) {
    const v = Math.abs(c - n);
    Ta(e.deltaPTS) ? (e.deltaPTS = Math.max(v, e.deltaPTS)) : (e.deltaPTS = v),
      (l = Math.max(n, c)),
      (n = Math.min(n, c)),
      (i = Math.min(i, e.startDTS)),
      (u = Math.min(r, d)),
      (r = Math.max(r, d)),
      (o = Math.max(o, e.endDTS));
  }
  const h = n - e.start;
  e.start !== 0 && e.setStart(n),
    e.setDuration(r - e.start),
    (e.startPTS = n),
    (e.maxStartPTS = l),
    (e.startDTS = i),
    (e.endPTS = r),
    (e.minEndPTS = u),
    (e.endDTS = o);
  const f = e.sn;
  if (!t || f < t.startSN || f > t.endSN) return 0;
  let p;
  const g = f - t.startSN,
    y = t.fragments;
  for (y[g] = e, p = g; p > 0; p--) nK(y[p], y[p - 1]);
  for (p = g; p < y.length - 1; p++) nK(y[p], y[p + 1]);
  return (
    t.fragmentHint && nK(y[y.length - 1], t.fragmentHint),
    (t.PTSKnown = t.alignedSliding = !0),
    h
  );
}
function HCn(t, e) {
  let n = null;
  const r = t.fragments;
  for (let d = r.length - 1; d >= 0; d--) {
    const h = r[d].initSegment;
    if (h) {
      n = h;
      break;
    }
  }
  t.fragmentHint && delete t.fragmentHint.endPTS;
  let i,
    o = 0;
  zCn(t, e, (d, h) => {
    d.relurl && (o = d.cc - h.cc),
      Ta(d.startPTS) &&
        Ta(d.endPTS) &&
        (h.setStart((h.startPTS = d.startPTS)),
        (h.startDTS = d.startDTS),
        (h.maxStartPTS = d.maxStartPTS),
        (h.endPTS = d.endPTS),
        (h.endDTS = d.endDTS),
        (h.minEndPTS = d.minEndPTS),
        h.setDuration(d.endPTS - d.startPTS),
        h.duration && (i = h),
        (e.PTSKnown = e.alignedSliding = !0)),
      d.hasStreams && (h.elementaryStreams = d.elementaryStreams),
      (h.loader = d.loader),
      d.hasStats && (h.stats = d.stats),
      d.initSegment && ((h.initSegment = d.initSegment), (n = d.initSegment));
  });
  const l = e.fragmentHint ? e.fragments.concat(e.fragmentHint) : e.fragments;
  if (
    (n &&
      l.forEach((d) => {
        var h;
        !d ||
          (d.initSegment &&
            d.initSegment.relurl !== ((h = n) == null ? void 0 : h.relurl)) ||
          (d.initSegment = n);
      }),
    e.skippedSegments)
  )
    if (
      ((e.deltaUpdateFailed = e.fragments.some((d) => !d)), e.deltaUpdateFailed)
    ) {
      Ds.warn(
        "[level-helper] Previous playlist missing segments skipped in delta playlist"
      );
      for (let d = e.skippedSegments; d--; ) e.fragments.shift();
      (e.startSN = e.fragments[0].sn),
        e.startCC || (e.startCC = e.fragments[0].cc);
    } else {
      e.canSkipDateRanges && (e.dateRanges = XCn(t.dateRanges, e));
      const d = t.fragments.filter((h) => h.rawProgramDateTime);
      if (t.hasProgramDateTime && !e.hasProgramDateTime)
        for (let h = 1; h < l.length; h++)
          l[h].programDateTime === null && BCn(l[h], l[h - 1], d);
      FCn(d, e);
    }
  const u = e.fragments;
  if (o) {
    Ds.warn("discontinuity sliding from playlist, take drift into account");
    for (let d = 0; d < u.length; d++) u[d].cc += o;
  }
  e.skippedSegments && (e.startCC = e.fragments[0].cc),
    VCn(t.partList, e.partList, (d, h) => {
      (h.elementaryStreams = d.elementaryStreams), (h.stats = d.stats);
    }),
    i ? vje(e, i, i.startPTS, i.endPTS, i.startDTS, i.endDTS) : bje(t, e),
    u.length && (e.totalduration = e.edge - u[0].start),
    (e.driftStartTime = t.driftStartTime),
    (e.driftStart = t.driftStart);
  const c = e.advancedDateTime;
  if (e.advanced && c) {
    const d = e.edge;
    e.driftStart || ((e.driftStartTime = c), (e.driftStart = d)),
      (e.driftEndTime = c),
      (e.driftEnd = d);
  } else
    (e.driftEndTime = t.driftEndTime),
      (e.driftEnd = t.driftEnd),
      (e.advancedDateTime = t.advancedDateTime);
  e.requestScheduled === -1 && (e.requestScheduled = t.requestScheduled);
}
function XCn(t, e) {
  const { dateRanges: n, recentlyRemovedDateranges: r } = e,
    i = du({}, t);
  r &&
    r.forEach((l) => {
      delete i[l];
    });
  const o = Object.keys(i).length;
  return (
    o &&
      Object.keys(n).forEach((l) => {
        const u = i[l],
          c = new CCn(n[l].attr, u);
        c.isValid
          ? ((i[l] = c), u || (c.tagOrder += o))
          : Ds.warn(
              `Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(
                n[l].attr
              )}"`
            );
      }),
    i
  );
}
function VCn(t, e, n) {
  if (t && e) {
    let r = 0;
    for (let i = 0, o = t.length; i <= o; i++) {
      const l = t[i],
        u = e[i + r];
      l && u && l.index === u.index && l.fragment.sn === u.fragment.sn
        ? n(l, u)
        : r--;
    }
  }
}
function zCn(t, e, n) {
  const r = e.skippedSegments,
    i = Math.max(t.startSN, e.startSN) - e.startSN,
    o =
      (t.fragmentHint ? 1 : 0) +
      (r ? e.endSN : Math.min(t.endSN, e.endSN)) -
      e.startSN,
    l = e.startSN - t.startSN,
    u = e.fragmentHint ? e.fragments.concat(e.fragmentHint) : e.fragments,
    c = t.fragmentHint ? t.fragments.concat(t.fragmentHint) : t.fragments;
  for (let d = i; d <= o; d++) {
    const h = c[l + d];
    let f = u[d];
    r && !f && h && (f = e.fragments[d] = h), h && f && n(h, f);
  }
}
function bje(t, e, n = !0) {
  const r = e.startSN + e.skippedSegments - t.startSN,
    i = t.fragments,
    o = r >= 0;
  let l = 0;
  if (o && r < i.length) l = i[r].start;
  else if (o && e.startSN === t.endSN + 1) l = t.fragmentEnd;
  else if (o && n) l = t.fragmentStart + r * e.levelTargetDuration;
  else {
    if (e.skippedSegments || e.fragmentStart !== 0) return;
    l = t.fragmentStart;
  }
  Xne(e, l);
}
function Xne(t, e) {
  if (e) {
    const n = t.fragments;
    for (let r = t.skippedSegments; r < n.length; r++) n[r].addStart(e);
    t.fragmentHint && t.fragmentHint.addStart(e);
  }
}
function jCn(t, e = 1 / 0) {
  let n = 1e3 * t.targetduration;
  if (t.updated) {
    const r = t.fragments,
      i = 4;
    if (r.length && n * i > e) {
      const o = 1e3 * r[r.length - 1].duration;
      o < n && (n = o);
    }
  } else n /= 2;
  return Math.round(n);
}
function WCn(t, e, n) {
  if (!t) return null;
  let r = t.fragments[e - t.startSN];
  return (
    r ||
    ((r = t.fragmentHint),
    r && r.sn === e ? r : e < t.startSN && n && n.sn === e ? n : null)
  );
}
function VRe(t, e, n) {
  return t ? _je(t.partList, e, n) : null;
}
function _je(t, e, n) {
  if (t)
    for (let r = t.length; r--; ) {
      const i = t[r];
      if (i.index === n && i.fragment.sn === e) return i;
    }
  return null;
}
function KCn(t) {
  t.forEach((e, n) => {
    var r;
    const i = (r = e.details) == null ? void 0 : r.fragments;
    i &&
      i.forEach((o) => {
        (o.level = n), o.initSegment && (o.initSegment.level = n);
      });
  });
}
function $$(t, e) {
  for (let r = 0, i = t.length; r < i; r++) {
    var n;
    if (((n = t[r]) == null ? void 0 : n.cc) === e) return t[r];
  }
  return null;
}
function ZCn(t, e) {
  return !!(t && e.startCC < t.endCC && e.endCC > t.startCC);
}
function zRe(t, e) {
  if (t) {
    const n = t.start + e;
    (t.start = t.startPTS = n), (t.endPTS = n + t.duration);
  }
}
function Tje(t, e) {
  const n = e.fragments;
  for (let r = 0, i = n.length; r < i; r++) zRe(n[r], t);
  e.fragmentHint && zRe(e.fragmentHint, t), (e.alignedSliding = !0);
}
function YCn(t, e) {
  t &&
    (Eje(e, t),
    !e.alignedSliding && t && f8(e, t),
    e.alignedSliding || !t || e.skippedSegments || bje(t, e, !1));
}
function Eje(t, e) {
  if (!ZCn(e, t)) return;
  const n = Math.min(e.endCC, t.endCC),
    r = $$(e.fragments, n),
    i = $$(t.fragments, n);
  !r ||
    !i ||
    (Ds.log(`Aligning playlist at start of dicontinuity sequence ${n}`),
    Tje(r.start - i.start, t));
}
function f8(t, e) {
  if (!t.hasProgramDateTime || !e.hasProgramDateTime) return;
  const n = t.fragments,
    r = e.fragments;
  if (!n.length || !r.length) return;
  let i, o;
  const l = Math.min(e.endCC, t.endCC);
  e.startCC < l && t.startCC < l && ((i = $$(r, l)), (o = $$(n, l))),
    (i && o) ||
      ((i = r[Math.floor(r.length / 2)]),
      (o = $$(n, i.cc) || n[Math.floor(n.length / 2)]));
  const u = i.programDateTime,
    c = o.programDateTime;
  !u || !c || Tje((c - u) / 1e3 - (o.start - i.start), t);
}
const QCn = {
    toString: function (t) {
      let e = "";
      const n = t.length;
      for (let r = 0; r < n; r++)
        e += `[${t.start(r).toFixed(3)}-${t.end(r).toFixed(3)}]`;
      return e;
    },
  },
  ui = {
    STOPPED: "STOPPED",
    IDLE: "IDLE",
    KEY_LOADING: "KEY_LOADING",
    FRAG_LOADING: "FRAG_LOADING",
    FRAG_LOADING_WAITING_RETRY: "FRAG_LOADING_WAITING_RETRY",
    WAITING_TRACK: "WAITING_TRACK",
    PARSING: "PARSING",
    PARSED: "PARSED",
    ENDED: "ENDED",
    ERROR: "ERROR",
    WAITING_INIT_PTS: "WAITING_INIT_PTS",
    WAITING_LEVEL: "WAITING_LEVEL",
  };
class Sje extends kCn {
  constructor(e, n, r, i, o) {
    super(i, e.logger),
      (this.hls = void 0),
      (this.fragPrevious = null),
      (this.fragCurrent = null),
      (this.fragmentTracker = void 0),
      (this.transmuxer = null),
      (this._state = ui.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: l,
            fragCurrent: u,
            media: c,
            mediaBuffer: d,
            state: h,
          } = this,
          f = c ? c.currentTime : 0,
          p = Ul.bufferInfo(d || c, f, l.maxBufferHole);
        if (
          (this.log(
            `media seeking to ${Ta(f) ? f.toFixed(3) : f}, state: ${h}`
          ),
          this.state === ui.ENDED)
        )
          this.resetLoadingState();
        else if (u) {
          const g = l.maxFragLookUpTolerance,
            y = u.start - g,
            v = u.start + u.duration + g;
          if (!p.len || v < p.start || y > p.end) {
            const b = f > v;
            (f < y || b) &&
              (b &&
                u.loader &&
                (this.log(
                  "seeking outside of buffer while fragment load in progress, cancel fragment load"
                ),
                u.abortRequests(),
                this.resetLoadingState()),
              (this.fragPrevious = null));
          }
        }
        if (
          c &&
          (this.fragmentTracker.removeFragmentsInRange(
            f,
            1 / 0,
            this.playlistType,
            !0
          ),
          f > this.lastCurrentTime && (this.lastCurrentTime = f),
          !this.loadingParts)
        ) {
          const g = Math.max(p.end, f),
            y = this.shouldLoadParts(this.getLevelDetails(), g);
          y &&
            (this.log(
              `LL-Part loading ON after seeking to ${f.toFixed(
                2
              )} with buffer @${g.toFixed(2)}`
            ),
            (this.loadingParts = y));
        }
        this.hls.hasEnoughToStart ||
          p.len ||
          (this.log(
            `setting startPosition to ${f} because of seek before start`
          ),
          (this.nextLoadPosition = this.startPosition = f)),
          this.tickImmediate();
      }),
      (this.onMediaEnded = () => {
        this.log("setting startPosition to 0 because media ended"),
          (this.startPosition = this.lastCurrentTime = 0),
          this.triggerEnded();
      }),
      (this.playlistType = o),
      (this.hls = e),
      (this.fragmentLoader = new ACn(e.config)),
      (this.keyLoader = r),
      (this.fragmentTracker = n),
      (this.config = e.config),
      (this.decrypter = new xue(e.config));
  }
  registerListeners() {
    const { hls: e } = this;
    e.on(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.on(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.MANIFEST_LOADED, this.onManifestLoaded, this),
      e.on(Tt.ERROR, this.onError, this);
  }
  unregisterListeners() {
    const { hls: e } = this;
    e.off(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.off(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.MANIFEST_LOADED, this.onManifestLoaded, this),
      e.off(Tt.ERROR, this.onError, this);
  }
  doTick() {
    this.onTickEnd();
  }
  onTickEnd() {}
  startLoad(e) {}
  stopLoad() {
    if (this.state === ui.STOPPED) return;
    this.fragmentLoader.abort(), this.keyLoader.abort(this.playlistType);
    const e = this.fragCurrent;
    e != null &&
      e.loader &&
      (e.abortRequests(), this.fragmentTracker.removeFragment(e)),
      this.resetTransmuxer(),
      (this.fragCurrent = null),
      (this.fragPrevious = null),
      this.clearInterval(),
      this.clearNextTick(),
      (this.state = ui.STOPPED);
  }
  get startPositionValue() {
    const { nextLoadPosition: e, startPosition: n } = this;
    return n === -1 && e ? e : n;
  }
  get bufferingEnabled() {
    return this.buffering;
  }
  pauseBuffering() {
    this.buffering = !1;
  }
  resumeBuffering() {
    this.buffering = !0;
  }
  _streamEnded(e, n) {
    const r = this.config.timelineOffset !== void 0,
      i = e.nextStart,
      o = i && (!r || i < n.edge);
    if (n.live || o || !e.end || !this.media) return !1;
    const l = n.partList;
    if (l != null && l.length) {
      const c = l[l.length - 1];
      return Ul.isBuffered(this.media, c.start + c.duration / 2);
    }
    const u = n.fragments[n.fragments.length - 1].type;
    return this.fragmentTracker.isEndListAppended(u);
  }
  getLevelDetails() {
    var e;
    if (this.levels && this.levelLastLoaded !== null)
      return (e = this.levelLastLoaded) == null ? void 0 : e.details;
  }
  onMediaAttached(e, n) {
    const r = (this.media = this.mediaBuffer = n.media);
    r.removeEventListener("seeking", this.onMediaSeeking),
      r.removeEventListener("ended", this.onMediaEnded),
      r.addEventListener("seeking", this.onMediaSeeking),
      r.addEventListener("ended", this.onMediaEnded);
    const i = this.config;
    this.levels &&
      i.autoStartLoad &&
      this.state === ui.STOPPED &&
      this.startLoad(i.startPosition);
  }
  onMediaDetaching(e, n) {
    const r = !!n.transferMedia,
      i = this.media;
    i !== null &&
      (i.ended &&
        (this.log("MSE detaching and video ended, reset startPosition"),
        (this.startPosition = this.lastCurrentTime = 0)),
      i.removeEventListener("seeking", this.onMediaSeeking),
      i.removeEventListener("ended", this.onMediaEnded),
      this.keyLoader && !r && this.keyLoader.detach(),
      (this.media = this.mediaBuffer = null),
      (this.loopSn = void 0),
      r
        ? this.resetTransmuxer()
        : ((this.loadingParts = !1),
          this.fragmentTracker.removeAllFragments(),
          this.stopLoad()));
  }
  onManifestLoading() {
    (this.initPTS = []),
      (this.levels = this.levelLastLoaded = this.fragCurrent = null),
      (this.lastCurrentTime = this.startPosition = 0),
      (this.startFragRequested = !1);
  }
  onError(e, n) {}
  triggerEnded() {}
  onManifestLoaded(e, n) {
    this.startTimeOffset = n.startTimeOffset;
  }
  onHandlerDestroying() {
    this.stopLoad(),
      this.transmuxer && (this.transmuxer.destroy(), (this.transmuxer = null)),
      super.onHandlerDestroying(),
      (this.hls = this.onMediaSeeking = this.onMediaEnded = null);
  }
  onHandlerDestroyed() {
    (this.state = ui.STOPPED),
      this.fragmentLoader && this.fragmentLoader.destroy(),
      this.keyLoader && this.keyLoader.destroy(),
      this.decrypter && this.decrypter.destroy(),
      (this.hls =
        this.log =
        this.warn =
        this.decrypter =
        this.keyLoader =
        this.fragmentLoader =
        this.fragmentTracker =
          null),
      super.onHandlerDestroyed();
  }
  loadFragment(e, n, r) {
    const i = this.hls.config;
    if (
      i.interstitialsController &&
      i.enableInterstitialPlayback !== !1 &&
      e.type !== ko.SUBTITLE
    ) {
      const l = this.hls.interstitialsManager,
        u = l == null ? void 0 : l.bufferingItem;
      if (u) {
        const c = u.event;
        if (c) {
          if (
            c.appendInPlace ||
            Math.abs(e.start - u.start) > 1 ||
            u.start === 0
          )
            return;
        } else {
          var o;
          if (
            (e.end <= u.start &&
              ((o = n.details) == null ? void 0 : o.live) === !1) ||
            (e.start > u.end && u.nextEvent)
          )
            return;
        }
      }
    }
    (this.startFragRequested = !0), this._loadFragForPlayback(e, n, r);
  }
  _loadFragForPlayback(e, n, r) {
    this._doFragLoad(e, n, r, (i) => {
      const o = i.frag;
      if (this.fragContextChanged(o))
        return (
          this.warn(
            `${o.type} sn: ${o.sn}${
              i.part ? " part: " + i.part.index : ""
            } of ${this.fragInfo(o, !1, i.part)}) was dropped during download.`
          ),
          void this.fragmentTracker.removeFragment(o)
        );
      o.stats.chunkCount++, this._handleFragmentLoadProgress(i);
    })
      .then((i) => {
        if (!i) return;
        const o = this.state,
          l = i.frag;
        this.fragContextChanged(l)
          ? (o === ui.FRAG_LOADING ||
              (!this.fragCurrent && o === ui.PARSING)) &&
            (this.fragmentTracker.removeFragment(l), (this.state = ui.IDLE))
          : ("payload" in i &&
              (this.log(
                `Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${
                  l.level
                }`
              ),
              this.hls.trigger(Tt.FRAG_LOADED, i)),
            this._handleFragmentLoadComplete(i));
      })
      .catch((i) => {
        this.state !== ui.STOPPED &&
          this.state !== ui.ERROR &&
          (this.warn(`Frag error: ${(i == null ? void 0 : i.message) || i}`),
          this.resetFragmentLoading(e));
      });
  }
  clearTrackerIfNeeded(e) {
    var n;
    const { fragmentTracker: r } = this;
    if (r.getState(e) === d0.APPENDING) {
      const i = e.type,
        o = this.getFwdBufferInfo(this.mediaBuffer, i),
        l = Math.max(e.duration, o ? o.len : this.config.maxBufferLength),
        u = this.backtrackFragment;
      ((u ? e.sn - u.sn : 0) === 1 ||
        this.reduceMaxBufferLength(l, e.duration)) &&
        r.removeFragment(e);
    } else
      ((n = this.mediaBuffer) == null ? void 0 : n.buffered.length) === 0
        ? r.removeAllFragments()
        : r.hasParts(e.type) &&
          (r.detectPartialFragments({
            frag: e,
            part: null,
            stats: e.stats,
            id: e.type,
          }),
          r.getState(e) === d0.PARTIAL && r.removeFragment(e));
  }
  checkLiveUpdate(e) {
    if (e.updated && !e.live) {
      const n = e.fragments[e.fragments.length - 1];
      this.fragmentTracker.detectPartialFragments({
        frag: n,
        part: null,
        stats: n.stats,
        id: n.type,
      });
    }
    e.fragments[0] || (e.deltaUpdateFailed = !0);
  }
  waitForLive(e) {
    const n = e.details;
    return (
      (n == null ? void 0 : n.live) &&
      n.type !== "EVENT" &&
      (this.levelLastLoaded !== e || n.expired)
    );
  }
  flushMainBuffer(e, n, r = null) {
    if (!(e - n)) return;
    const i = { startOffset: e, endOffset: n, type: r };
    this.hls.trigger(Tt.BUFFER_FLUSHING, i);
  }
  _loadInitSegment(e, n) {
    this._doFragLoad(e, n)
      .then((r) => {
        const i = r == null ? void 0 : r.frag;
        if (!i || this.fragContextChanged(i) || !this.levels)
          throw new Error("init load aborted");
        return r;
      })
      .then((r) => {
        const { hls: i } = this,
          { frag: o, payload: l } = r,
          u = o.decryptdata;
        if (
          l &&
          l.byteLength > 0 &&
          u != null &&
          u.key &&
          u.iv &&
          uI(u.method)
        ) {
          const c = self.performance.now();
          return this.decrypter
            .decrypt(
              new Uint8Array(l),
              u.key.buffer,
              u.iv.buffer,
              Lue(u.method)
            )
            .catch((d) => {
              throw (
                (i.trigger(Tt.ERROR, {
                  type: ro.MEDIA_ERROR,
                  details: Ir.FRAG_DECRYPT_ERROR,
                  fatal: !1,
                  error: d,
                  reason: d.message,
                  frag: o,
                }),
                d)
              );
            })
            .then((d) => {
              const h = self.performance.now();
              return (
                i.trigger(Tt.FRAG_DECRYPTED, {
                  frag: o,
                  payload: d,
                  stats: { tstart: c, tdecrypt: h },
                }),
                (r.payload = d),
                this.completeInitSegmentLoad(r)
              );
            });
        }
        return this.completeInitSegmentLoad(r);
      })
      .catch((r) => {
        this.state !== ui.STOPPED &&
          this.state !== ui.ERROR &&
          (this.warn(r), this.resetFragmentLoading(e));
      });
  }
  completeInitSegmentLoad(e) {
    const { levels: n } = this;
    if (!n) throw new Error("init load aborted, missing levels");
    const r = e.frag.stats;
    this.state !== ui.STOPPED && (this.state = ui.IDLE),
      (e.frag.data = new Uint8Array(e.payload)),
      (r.parsing.start = r.buffering.start = self.performance.now()),
      (r.parsing.end = r.buffering.end = self.performance.now()),
      this.tick();
  }
  fragContextChanged(e) {
    const { fragCurrent: n } = this;
    return !e || !n || e.sn !== n.sn || e.level !== n.level;
  }
  fragBufferedComplete(e, n) {
    const r = this.mediaBuffer ? this.mediaBuffer : this.media;
    if (
      (this.log(
        `Buffered ${e.type} sn: ${e.sn}${
          n ? " part: " + n.index : ""
        } of ${this.fragInfo(e, !1, n)} > buffer:${
          r ? QCn.toString(Ul.getBuffered(r)) : "(detached)"
        })`
      ),
      Ef(e))
    ) {
      var i;
      if (e.type !== ko.SUBTITLE) {
        const l = e.elementaryStreams;
        if (!Object.keys(l).some((u) => !!l[u]))
          return void (this.state = ui.IDLE);
      }
      const o = (i = this.levels) == null ? void 0 : i[e.level];
      o != null &&
        o.fragmentError &&
        (this.log(
          `Resetting level fragment error count of ${o.fragmentError} on frag buffered`
        ),
        (o.fragmentError = 0));
    }
    this.state = ui.IDLE;
  }
  _handleFragmentLoadComplete(e) {
    const { transmuxer: n } = this;
    if (!n) return;
    const { frag: r, part: i, partsLoaded: o } = e,
      l = !o || o.length === 0 || o.some((c) => !c),
      u = new gje(
        r.level,
        r.sn,
        r.stats.chunkCount + 1,
        0,
        i ? i.index : -1,
        !l
      );
    n.flush(u);
  }
  _handleFragmentLoadProgress(e) {}
  _doFragLoad(e, n, r = null, i) {
    var o;
    this.fragCurrent = e;
    const l = n == null ? void 0 : n.details;
    if (!this.levels || !l)
      throw new Error(`frag load aborted, missing level${l ? "" : " detail"}s`);
    let u = null;
    !e.encrypted || ((o = e.decryptdata) != null && o.key)
      ? !e.encrypted &&
        l.encryptedFragments.length &&
        this.keyLoader.loadClear(e, l.encryptedFragments)
      : (this.log(
          `Loading key for ${e.sn} of [${l.startSN}-${
            l.endSN
          }], ${this.playlistLabel()} ${e.level}`
        ),
        (this.state = ui.KEY_LOADING),
        (this.fragCurrent = e),
        (u = this.keyLoader.load(e).then((f) => {
          if (!this.fragContextChanged(f.frag))
            return (
              this.hls.trigger(Tt.KEY_LOADED, f),
              this.state === ui.KEY_LOADING && (this.state = ui.IDLE),
              f
            );
        })),
        this.hls.trigger(Tt.KEY_LOADING, { frag: e }),
        this.fragCurrent === null &&
          (u = Promise.reject(
            new Error("frag load aborted, context changed in KEY_LOADING")
          )));
    const c = this.fragPrevious;
    if (Ef(e) && (!c || e.sn !== c.sn)) {
      const f = this.shouldLoadParts(n.details, e.end);
      f !== this.loadingParts &&
        (this.log(
          `LL-Part loading ${f ? "ON" : "OFF"} loading sn ${
            c == null ? void 0 : c.sn
          }->${e.sn}`
        ),
        (this.loadingParts = f));
    }
    if (((r = Math.max(e.start, r || 0)), this.loadingParts && Ef(e))) {
      const f = l.partList;
      if (f && i) {
        r > e.end && l.fragmentHint && (e = l.fragmentHint);
        const p = this.getNextPart(f, e, r);
        if (p > -1) {
          const g = f[p];
          let y;
          return (
            (e = this.fragCurrent = g.fragment),
            this.log(
              `Loading ${e.type} sn: ${e.sn} part: ${g.index} (${p}/${
                f.length - 1
              }) of ${this.fragInfo(e, !1, g)}) cc: ${e.cc} [${l.startSN}-${
                l.endSN
              }], target: ${parseFloat(r.toFixed(3))}`
            ),
            (this.nextLoadPosition = g.start + g.duration),
            (this.state = ui.FRAG_LOADING),
            (y = u
              ? u
                  .then((v) =>
                    !v || this.fragContextChanged(v.frag)
                      ? null
                      : this.doFragPartsLoad(e, g, n, i)
                  )
                  .catch((v) => this.handleFragLoadError(v))
              : this.doFragPartsLoad(e, g, n, i).catch((v) =>
                  this.handleFragLoadError(v)
                )),
            this.hls.trigger(Tt.FRAG_LOADING, {
              frag: e,
              part: g,
              targetBufferTime: r,
            }),
            this.fragCurrent === null
              ? Promise.reject(
                  new Error(
                    "frag load aborted, context changed in FRAG_LOADING parts"
                  )
                )
              : y
          );
        }
        if (!e.url || this.loadedEndOfParts(f, r)) return Promise.resolve(null);
      }
    }
    if (Ef(e) && this.loadingParts)
      this.log(`LL-Part loading OFF after next part miss @${r.toFixed(2)}`),
        (this.loadingParts = !1);
    else if (!e.url) return Promise.resolve(null);
    this.log(
      `Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e, !1)}) cc: ${e.cc} ${
        l ? "[" + l.startSN + "-" + l.endSN + "]" : ""
      }, target: ${parseFloat(r.toFixed(3))}`
    ),
      Ta(e.sn) &&
        !this.bitrateTest &&
        (this.nextLoadPosition = e.start + e.duration),
      (this.state = ui.FRAG_LOADING);
    const d = this.config.progressive;
    let h;
    return (
      (h =
        d && u
          ? u
              .then((f) =>
                !f || this.fragContextChanged(f == null ? void 0 : f.frag)
                  ? null
                  : this.fragmentLoader.load(e, i)
              )
              .catch((f) => this.handleFragLoadError(f))
          : Promise.all([this.fragmentLoader.load(e, d ? i : void 0), u])
              .then(([f]) => (!d && f && i && i(f), f))
              .catch((f) => this.handleFragLoadError(f))),
      this.hls.trigger(Tt.FRAG_LOADING, { frag: e, targetBufferTime: r }),
      this.fragCurrent === null
        ? Promise.reject(
            new Error("frag load aborted, context changed in FRAG_LOADING")
          )
        : h
    );
  }
  doFragPartsLoad(e, n, r, i) {
    return new Promise((o, l) => {
      var u;
      const c = [],
        d = (u = r.details) == null ? void 0 : u.partList,
        h = (f) => {
          this.fragmentLoader
            .loadPart(e, f, i)
            .then((p) => {
              c[f.index] = p;
              const g = p.part;
              this.hls.trigger(Tt.FRAG_LOADED, p);
              const y =
                VRe(r.details, e.sn, f.index + 1) || _je(d, e.sn, f.index + 1);
              if (!y) return o({ frag: e, part: g, partsLoaded: c });
              h(y);
            })
            .catch(l);
        };
      h(n);
    });
  }
  handleFragLoadError(e) {
    if ("data" in e) {
      const n = e.data;
      e.data && n.details === Ir.INTERNAL_ABORTED
        ? this.handleFragLoadAborted(n.frag, n.part)
        : this.hls.trigger(Tt.ERROR, n);
    } else
      this.hls.trigger(Tt.ERROR, {
        type: ro.OTHER_ERROR,
        details: Ir.INTERNAL_EXCEPTION,
        err: e,
        error: e,
        fatal: !0,
      });
    return null;
  }
  _handleTransmuxerFlush(e) {
    const n = this.getCurrentContext(e);
    if (!n || this.state !== ui.PARSING)
      return void (
        this.fragCurrent ||
        this.state === ui.STOPPED ||
        this.state === ui.ERROR ||
        (this.state = ui.IDLE)
      );
    const { frag: r, part: i, level: o } = n,
      l = self.performance.now();
    (r.stats.parsing.end = l), i && (i.stats.parsing.end = l);
    const u = this.getLevelDetails(),
      c = (u && r.sn > u.endSN) || this.shouldLoadParts(u, r.end);
    c !== this.loadingParts &&
      (this.log(
        `LL-Part loading ${
          c ? "ON" : "OFF"
        } after parsing segment ending @${r.end.toFixed(2)}`
      ),
      (this.loadingParts = c)),
      this.updateLevelTiming(r, i, o, e.partial);
  }
  shouldLoadParts(e, n) {
    if (this.config.lowLatencyMode) {
      if (!e) return this.loadingParts;
      if (e != null && e.partList) {
        var r;
        const o = e.partList[0];
        if (
          n >=
          o.end + (((r = e.fragmentHint) == null ? void 0 : r.duration) || 0)
        ) {
          var i;
          if (
            (this.hls.hasEnoughToStart
              ? ((i = this.media) == null ? void 0 : i.currentTime) ||
                this.lastCurrentTime
              : this.getLoadPosition()) >
            o.start - o.fragment.duration
          )
            return !0;
        }
      }
    }
    return !1;
  }
  getCurrentContext(e) {
    const { levels: n, fragCurrent: r } = this,
      { level: i, sn: o, part: l } = e;
    if (n == null || !n[i])
      return (
        this.warn(
          `Levels object was unset while buffering fragment ${o} of ${this.playlistLabel()} ${i}. The current chunk will not be buffered.`
        ),
        null
      );
    const u = n[i],
      c = u.details,
      d = l > -1 ? VRe(c, o, l) : null,
      h = d ? d.fragment : WCn(c, o, r);
    return h
      ? (r && r !== h && (h.stats = r.stats), { frag: h, part: d, level: u })
      : null;
  }
  bufferFragmentData(e, n, r, i, o) {
    var l;
    if (!e || this.state !== ui.PARSING) return;
    const { data1: u, data2: c } = e;
    let d = u;
    if ((u && c && (d = fm(u, c)), (l = d) == null || !l.length)) return;
    const h = {
      type: e.type,
      frag: n,
      part: r,
      chunkMeta: i,
      parent: n.type,
      data: d,
    };
    if (
      (this.hls.trigger(Tt.BUFFER_APPENDING, h),
      e.dropped && e.independent && !r)
    ) {
      if (o) return;
      this.flushBufferGap(n);
    }
  }
  flushBufferGap(e) {
    const n = this.media;
    if (!n) return;
    if (!Ul.isBuffered(n, n.currentTime))
      return void this.flushMainBuffer(0, e.start);
    const r = n.currentTime,
      i = Ul.bufferInfo(n, r, 0),
      o = e.duration,
      l = Math.min(2 * this.config.maxFragLookUpTolerance, 0.25 * o),
      u = Math.max(Math.min(e.start - l, i.end - l), r + l);
    e.start - u > l && this.flushMainBuffer(u, e.start);
  }
  getFwdBufferInfo(e, n) {
    var r;
    const i = this.getLoadPosition();
    if (!Ta(i)) return null;
    const o =
      this.lastCurrentTime > i || ((r = this.media) != null && r.paused)
        ? 0
        : this.config.maxBufferHole;
    return this.getFwdBufferInfoAtPos(e, i, n, o);
  }
  getFwdBufferInfoAtPos(e, n, r, i) {
    const o = Ul.bufferInfo(e, n, i);
    if (o.len === 0 && o.nextStart !== void 0) {
      const l = this.fragmentTracker.getBufferedFrag(n, r);
      if (l && (o.nextStart <= l.end || l.gap))
        return Ul.bufferInfo(e, n, Math.max(o.nextStart, i));
    }
    return o;
  }
  getMaxBufferLength(e) {
    const { config: n } = this;
    let r;
    return (
      (r = e
        ? Math.max((8 * n.maxBufferSize) / e, n.maxBufferLength)
        : n.maxBufferLength),
      Math.min(r, n.maxMaxBufferLength)
    );
  }
  reduceMaxBufferLength(e, n) {
    const r = this.config,
      i = Math.max(Math.min(e - n, r.maxBufferLength), n),
      o = Math.max(e - 3 * n, r.maxMaxBufferLength / 2, i);
    return (
      o >= i &&
      ((r.maxMaxBufferLength = o),
      this.warn(`Reduce max buffer length to ${o}s`),
      !0)
    );
  }
  getAppendedFrag(e, n = ko.MAIN) {
    var r;
    const i =
      (r = this.fragmentTracker) == null ? void 0 : r.getAppendedFrag(e, n);
    return i && "fragment" in i ? i.fragment : i;
  }
  getNextFragment(e, n) {
    const r = n.fragments,
      i = r.length;
    if (!i) return null;
    const { config: o } = this,
      l = r[0].start,
      u = o.lowLatencyMode && !!n.partList;
    let c = null;
    if (n.live) {
      const h = o.initialLiveManifestSize;
      if (i < h)
        return (
          this.warn(
            `Not enough fragments to start playback (have: ${i}, need: ${h})`
          ),
          null
        );
      if (
        (!n.PTSKnown &&
          !this.startFragRequested &&
          this.startPosition === -1) ||
        e < l
      ) {
        var d;
        u &&
          !this.loadingParts &&
          (this.log("LL-Part loading ON for initial live fragment"),
          (this.loadingParts = !0)),
          (c = this.getInitialLiveFragment(n, r));
        const f = this.hls.startPosition,
          p = this.hls.liveSyncPosition,
          g = c ? (f !== -1 ? f : p) || c.start : e;
        this.log(
          `Setting startPosition to ${g} to match initial live edge. mainStart: ${f} liveSyncPosition: ${p} frag.start: ${
            (d = c) == null ? void 0 : d.start
          }`
        ),
          (this.startPosition = this.nextLoadPosition = g);
      }
    } else e <= l && (c = r[0]);
    if (!c) {
      const h = this.loadingParts ? n.partEnd : n.fragmentEnd;
      c = this.getFragmentAtPosition(e, h, n);
    }
    return this.mapToInitFragWhenRequired(c);
  }
  isLoopLoading(e, n) {
    const r = this.fragmentTracker.getState(e);
    return (
      (r === d0.OK || (r === d0.PARTIAL && !!e.gap)) &&
      this.nextLoadPosition > n
    );
  }
  getNextFragmentLoopLoading(e, n, r, i, o) {
    let l = null;
    if (
      e.gap &&
      ((l = this.getNextFragment(this.nextLoadPosition, n)),
      l && !l.gap && r.nextStart)
    ) {
      const u = this.getFwdBufferInfoAtPos(
        this.mediaBuffer ? this.mediaBuffer : this.media,
        r.nextStart,
        i,
        0
      );
      if (u !== null && r.len + u.len >= o) {
        const c = l.sn;
        return (
          this.loopSn !== c &&
            (this.log(
              `buffer full after gaps in "${i}" playlist starting at sn: ${c}`
            ),
            (this.loopSn = c)),
          null
        );
      }
    }
    return (this.loopSn = void 0), l;
  }
  mapToInitFragWhenRequired(e) {
    return e == null ||
      !e.initSegment ||
      (e != null && e.initSegment.data) ||
      this.bitrateTest
      ? e
      : e.initSegment;
  }
  getNextPart(e, n, r) {
    let i = -1,
      o = !1,
      l = !0;
    for (let u = 0, c = e.length; u < c; u++) {
      const d = e[u];
      if (((l = l && !d.independent), i > -1 && r < d.start)) break;
      const h = d.loaded;
      h ? (i = -1) : (o || d.independent || l) && d.fragment === n && (i = u),
        (o = h);
    }
    return i;
  }
  loadedEndOfParts(e, n) {
    const r = e[e.length - 1];
    return r && n > r.start && r.loaded;
  }
  getInitialLiveFragment(e, n) {
    const r = this.fragPrevious;
    let i = null;
    if (r) {
      if (
        (e.hasProgramDateTime &&
          (this.log(
            `Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`
          ),
          (i = ZMn(
            n,
            r.endProgramDateTime,
            this.config.maxFragLookUpTolerance
          ))),
        !i)
      ) {
        const o = r.sn + 1;
        if (o >= e.startSN && o <= e.endSN) {
          const l = n[o - e.startSN];
          r.cc === l.cc &&
            ((i = l),
            this.log(
              `Live playlist, switching playlist, load frag with next SN: ${i.sn}`
            ));
        }
        i ||
          ((i = lje(n, r.cc)),
          i &&
            this.log(
              `Live playlist, switching playlist, load frag with same CC: ${i.sn}`
            ));
      }
    } else {
      const o = this.hls.liveSyncPosition;
      o !== null &&
        (i = this.getFragmentAtPosition(
          o,
          this.bitrateTest ? e.fragmentEnd : e.edge,
          e
        ));
    }
    return i;
  }
  getFragmentAtPosition(e, n, r) {
    const { config: i } = this;
    let { fragPrevious: o } = this,
      { fragments: l, endSN: u } = r;
    const { fragmentHint: c } = r,
      { maxFragLookUpTolerance: d } = i,
      h = r.partList,
      f = !!(this.loadingParts && h != null && h.length && c);
    let p;
    if (
      (f &&
        c &&
        !this.bitrateTest &&
        h[h.length - 1].fragment.sn === c.sn &&
        ((l = l.concat(c)), (u = c.sn)),
      e < n)
    ) {
      var g;
      p = eD(
        o,
        l,
        e,
        e < this.lastCurrentTime ||
          e > n - d ||
          ((g = this.media) != null && g.paused) ||
          !this.startFragRequested
          ? 0
          : d
      );
    } else p = l[l.length - 1];
    if (p) {
      const y = p.sn - r.startSN,
        v = this.fragmentTracker.getState(p);
      if (
        ((v === d0.OK || (v === d0.PARTIAL && p.gap)) && (o = p),
        o &&
          p.sn === o.sn &&
          (!f || h[0].fragment.sn > p.sn || (!r.live && !f)) &&
          o &&
          p.level === o.level)
      ) {
        const b = l[y + 1];
        p = p.sn < u && this.fragmentTracker.getState(b) !== d0.OK ? b : null;
      }
    }
    return p;
  }
  alignPlaylists(e, n, r) {
    const i = e.fragments.length;
    if (!i) return this.warn("No fragments in live playlist"), 0;
    const o = e.fragmentStart,
      l = !n,
      u = e.alignedSliding && Ta(o);
    if (l || (!u && !o)) {
      YCn(r, e);
      const c = e.fragmentStart;
      return (
        this.log(
          `Live playlist sliding: ${c.toFixed(2)} start-sn: ${
            n ? n.startSN : "na"
          }->${e.startSN} fragments: ${i}`
        ),
        c
      );
    }
    return o;
  }
  waitForCdnTuneIn(e) {
    return (
      e.live &&
      e.canBlockReload &&
      e.partTarget &&
      e.tuneInGoal > Math.max(e.partHoldBack, 3 * e.partTarget)
    );
  }
  setStartPosition(e, n) {
    let r = this.startPosition;
    if ((r < n && (r = -1), r === -1)) {
      const i = this.startTimeOffset !== null,
        o = i ? this.startTimeOffset : e.startTimeOffset;
      o !== null && Ta(o)
        ? ((r = n + o),
          o < 0 && (r += e.edge),
          (r = Math.min(Math.max(n, r), n + e.totalduration)),
          this.log(
            `Setting startPosition to ${r} for start time offset ${o} found in ${
              i ? "multivariant" : "media"
            } playlist`
          ),
          (this.startPosition = r))
        : e.live
        ? ((r = this.hls.liveSyncPosition || n), (this.startPosition = -1))
        : (this.log("setting startPosition to 0 by default"),
          (this.startPosition = r = 0)),
        (this.lastCurrentTime = r);
    }
    this.nextLoadPosition = r;
  }
  getLoadPosition() {
    var e;
    const { media: n } = this;
    let r = 0;
    return (
      (e = this.hls) != null && e.hasEnoughToStart && n
        ? (r = n.currentTime)
        : this.nextLoadPosition >= 0 && (r = this.nextLoadPosition),
      r
    );
  }
  handleFragLoadAborted(e, n) {
    this.transmuxer &&
      e.type === this.playlistType &&
      Ef(e) &&
      e.stats.aborted &&
      (this.warn(
        `Fragment ${e.sn}${
          n ? " part " + n.index : ""
        } of ${this.playlistLabel()} ${e.level} was aborted`
      ),
      this.resetFragmentLoading(e));
  }
  resetFragmentLoading(e) {
    (this.fragCurrent &&
      (this.fragContextChanged(e) ||
        this.state === ui.FRAG_LOADING_WAITING_RETRY)) ||
      (this.state = ui.IDLE);
  }
  onFragmentOrKeyLoadError(e, n) {
    if (n.chunkMeta && !n.frag) {
      const y = this.getCurrentContext(n.chunkMeta);
      y && (n.frag = y.frag);
    }
    const r = n.frag;
    if (!r || r.type !== e || !this.levels) return;
    var i;
    if (this.fragContextChanged(r))
      return void this.warn(
        `Frag load error must match current frag to retry ${r.url} > ${
          (i = this.fragCurrent) == null ? void 0 : i.url
        }`
      );
    const o = n.details === Ir.FRAG_GAP;
    o && this.fragmentTracker.fragBuffered(r, !0);
    const l = n.errorAction,
      { action: u, flags: c, retryCount: d = 0, retryConfig: h } = l || {},
      f = !!l && !!h,
      p = f && u === qd.RetryRequest,
      g = f && !l.resolved && c === l0.MoveAllAlternatesMatchingHost;
    if (!p && g && Ef(r) && !r.endList)
      this.resetFragmentErrors(e), this.treatAsGap(r), (l.resolved = !0);
    else if ((p || g) && d < h.maxNumRetry) {
      this.resetStartWhenNotLoaded(this.levelLastLoaded);
      const y = Cue(h, d);
      this.warn(
        `Fragment ${r.sn} of ${e} ${r.level} errored with ${
          n.details
        }, retrying loading ${d + 1}/${h.maxNumRetry} in ${y}ms`
      ),
        (l.resolved = !0),
        (this.retryDate = self.performance.now() + y),
        (this.state = ui.FRAG_LOADING_WAITING_RETRY);
    } else if (h && l) {
      if ((this.resetFragmentErrors(e), !(d < h.maxNumRetry)))
        return void this.warn(
          `${n.details} reached or exceeded max retry (${d})`
        );
      o || u === qd.RemoveAlternatePermanently || (l.resolved = !0);
    } else
      u === qd.SendAlternateToPenaltyBox
        ? (this.state = ui.WAITING_LEVEL)
        : (this.state = ui.ERROR);
    this.tickImmediate();
  }
  reduceLengthAndFlushBuffer(e) {
    if (this.state === ui.PARSING || this.state === ui.PARSED) {
      const n = e.frag,
        r = e.parent,
        i = this.getFwdBufferInfo(this.mediaBuffer, r),
        o = i && i.len > 0.5;
      o &&
        this.reduceMaxBufferLength(
          i.len,
          (n == null ? void 0 : n.duration) || 10
        );
      const l = !o;
      return (
        l &&
          this.warn(
            `Buffer full error while media.currentTime is not buffered, flush ${r} buffer`
          ),
        n &&
          (this.fragmentTracker.removeFragment(n),
          (this.nextLoadPosition = n.start)),
        this.resetLoadingState(),
        l
      );
    }
    return !1;
  }
  resetFragmentErrors(e) {
    e === ko.AUDIO && (this.fragCurrent = null),
      this.hls.hasEnoughToStart || (this.startFragRequested = !1),
      this.state !== ui.STOPPED && (this.state = ui.IDLE);
  }
  afterBufferFlushed(e, n, r) {
    if (!e) return;
    const i = Ul.getBuffered(e);
    this.fragmentTracker.detectEvictedFragments(n, i, r),
      this.state === ui.ENDED && this.resetLoadingState();
  }
  resetLoadingState() {
    this.log("Reset loading state"),
      (this.fragCurrent = null),
      (this.fragPrevious = null),
      this.state !== ui.STOPPED && (this.state = ui.IDLE);
  }
  resetStartWhenNotLoaded(e) {
    if (!this.hls.hasEnoughToStart) {
      this.startFragRequested = !1;
      const n = e ? e.details : null;
      n != null && n.live
        ? (this.log("resetting startPosition for live start"),
          (this.startPosition = -1),
          this.setStartPosition(n, n.fragmentStart),
          this.resetLoadingState())
        : (this.nextLoadPosition = this.startPosition);
    }
  }
  resetWhenMissingContext(e) {
    this.warn(
      `The loading context changed while buffering fragment ${
        e.sn
      } of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`
    ),
      this.removeUnbufferedFrags(),
      this.resetStartWhenNotLoaded(this.levelLastLoaded),
      this.resetLoadingState();
  }
  removeUnbufferedFrags(e = 0) {
    this.fragmentTracker.removeFragmentsInRange(
      e,
      1 / 0,
      this.playlistType,
      !1,
      !0
    );
  }
  updateLevelTiming(e, n, r, i) {
    var o;
    const l = r.details;
    if (!l) return void this.warn("level.details undefined");
    if (
      !Object.keys(e.elementaryStreams).reduce((u, c) => {
        const d = e.elementaryStreams[c];
        if (d) {
          const h = d.endPTS - d.startPTS;
          if (h <= 0)
            return (
              this.warn(
                `Could not parse fragment ${e.sn} ${c} duration reliably (${h})`
              ),
              u || !1
            );
          const f = i
            ? 0
            : vje(l, e, d.startPTS, d.endPTS, d.startDTS, d.endDTS);
          return (
            this.hls.trigger(Tt.LEVEL_PTS_UPDATED, {
              details: l,
              level: r,
              drift: f,
              type: c,
              frag: e,
              start: d.startPTS,
              end: d.endPTS,
            }),
            !0
          );
        }
        return u;
      }, !1) &&
      ((o = this.transmuxer) == null ? void 0 : o.error) === null
    ) {
      const u = new Error(
        `Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${
          e.level
        } resetting transmuxer to fallback to playlist timing`
      );
      if (
        (r.fragmentError === 0 && this.treatAsGap(e, r),
        this.warn(u.message),
        this.hls.trigger(Tt.ERROR, {
          type: ro.MEDIA_ERROR,
          details: Ir.FRAG_PARSING_ERROR,
          fatal: !1,
          error: u,
          frag: e,
          reason: `Found no media in msn ${e.sn} of ${this.playlistLabel()} "${
            r.url
          }"`,
        }),
        !this.hls)
      )
        return;
      this.resetTransmuxer();
    }
    (this.state = ui.PARSED),
      this.log(
        `Parsed ${e.type} sn: ${e.sn}${
          n ? " part: " + n.index : ""
        } of ${this.fragInfo(e, !1, n)})`
      ),
      this.hls.trigger(Tt.FRAG_PARSED, { frag: e, part: n });
  }
  playlistLabel() {
    return this.playlistType === ko.MAIN ? "level" : "track";
  }
  fragInfo(e, n = !0, r) {
    var i, o;
    return `${this.playlistLabel()} ${e.level} (${r ? "part" : "frag"}:[${((i =
      n && !r ? e.startPTS : (r || e).start) != null
      ? i
      : NaN
    ).toFixed(3)}-${((o = n && !r ? e.endPTS : (r || e).end) != null
      ? o
      : NaN
    ).toFixed(3)}]${
      r && e.type === "main"
        ? "INDEPENDENT=" + (r.independent ? "YES" : "NO")
        : ""
    }`;
  }
  treatAsGap(e, n) {
    n && n.fragmentError++,
      (e.gap = !0),
      this.fragmentTracker.removeFragment(e),
      this.fragmentTracker.fragBuffered(e, !0);
  }
  resetTransmuxer() {
    var e;
    (e = this.transmuxer) == null || e.reset();
  }
  recoverWorkerError(e) {
    e.event === "demuxerWorker" &&
      (this.fragmentTracker.removeAllFragments(),
      this.transmuxer && (this.transmuxer.destroy(), (this.transmuxer = null)),
      this.resetStartWhenNotLoaded(this.levelLastLoaded),
      this.resetLoadingState());
  }
  set state(e) {
    const n = this._state;
    n !== e && ((this._state = e), this.log(`${n}->${e}`));
  }
  get state() {
    return this._state;
  }
}
class JCn {
  constructor() {
    (this.chunks = []), (this.dataLength = 0);
  }
  push(e) {
    this.chunks.push(e), (this.dataLength += e.length);
  }
  flush() {
    const { chunks: e, dataLength: n } = this;
    let r;
    return e.length
      ? ((r = e.length === 1 ? e[0] : qCn(e, n)), this.reset(), r)
      : new Uint8Array(0);
  }
  reset() {
    (this.chunks.length = 0), (this.dataLength = 0);
  }
}
function qCn(t, e) {
  const n = new Uint8Array(e);
  let r = 0;
  for (let i = 0; i < t.length; i++) {
    const o = t[i];
    n.set(o, r), (r += o.length);
  }
  return n;
}
var Rje = { exports: {} };
(function (t) {
  var e = Object.prototype.hasOwnProperty,
    n = "~";
  function r() {}
  function i(c, d, h) {
    (this.fn = c), (this.context = d), (this.once = h || !1);
  }
  function o(c, d, h, f, p) {
    if (typeof h != "function")
      throw new TypeError("The listener must be a function");
    var g = new i(h, f || c, p),
      y = n ? n + d : d;
    return (
      c._events[y]
        ? c._events[y].fn
          ? (c._events[y] = [c._events[y], g])
          : c._events[y].push(g)
        : ((c._events[y] = g), c._eventsCount++),
      c
    );
  }
  function l(c, d) {
    --c._eventsCount == 0 ? (c._events = new r()) : delete c._events[d];
  }
  function u() {
    (this._events = new r()), (this._eventsCount = 0);
  }
  Object.create &&
    ((r.prototype = Object.create(null)), new r().__proto__ || (n = !1)),
    (u.prototype.eventNames = function () {
      var c,
        d,
        h = [];
      if (this._eventsCount === 0) return h;
      for (d in (c = this._events)) e.call(c, d) && h.push(n ? d.slice(1) : d);
      return Object.getOwnPropertySymbols
        ? h.concat(Object.getOwnPropertySymbols(c))
        : h;
    }),
    (u.prototype.listeners = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      if (!h) return [];
      if (h.fn) return [h.fn];
      for (var f = 0, p = h.length, g = new Array(p); f < p; f++)
        g[f] = h[f].fn;
      return g;
    }),
    (u.prototype.listenerCount = function (c) {
      var d = n ? n + c : c,
        h = this._events[d];
      return h ? (h.fn ? 1 : h.length) : 0;
    }),
    (u.prototype.emit = function (c, d, h, f, p, g) {
      var y = n ? n + c : c;
      if (!this._events[y]) return !1;
      var v,
        b,
        w = this._events[y],
        k = arguments.length;
      if (w.fn) {
        switch ((w.once && this.removeListener(c, w.fn, void 0, !0), k)) {
          case 1:
            return w.fn.call(w.context), !0;
          case 2:
            return w.fn.call(w.context, d), !0;
          case 3:
            return w.fn.call(w.context, d, h), !0;
          case 4:
            return w.fn.call(w.context, d, h, f), !0;
          case 5:
            return w.fn.call(w.context, d, h, f, p), !0;
          case 6:
            return w.fn.call(w.context, d, h, f, p, g), !0;
        }
        for (b = 1, v = new Array(k - 1); b < k; b++) v[b - 1] = arguments[b];
        w.fn.apply(w.context, v);
      } else {
        var D,
          $ = w.length;
        for (b = 0; b < $; b++)
          switch (
            (w[b].once && this.removeListener(c, w[b].fn, void 0, !0), k)
          ) {
            case 1:
              w[b].fn.call(w[b].context);
              break;
            case 2:
              w[b].fn.call(w[b].context, d);
              break;
            case 3:
              w[b].fn.call(w[b].context, d, h);
              break;
            case 4:
              w[b].fn.call(w[b].context, d, h, f);
              break;
            default:
              if (!v)
                for (D = 1, v = new Array(k - 1); D < k; D++)
                  v[D - 1] = arguments[D];
              w[b].fn.apply(w[b].context, v);
          }
      }
      return !0;
    }),
    (u.prototype.on = function (c, d, h) {
      return o(this, c, d, h, !1);
    }),
    (u.prototype.once = function (c, d, h) {
      return o(this, c, d, h, !0);
    }),
    (u.prototype.removeListener = function (c, d, h, f) {
      var p = n ? n + c : c;
      if (!this._events[p]) return this;
      if (!d) return l(this, p), this;
      var g = this._events[p];
      if (g.fn)
        g.fn !== d || (f && !g.once) || (h && g.context !== h) || l(this, p);
      else {
        for (var y = 0, v = [], b = g.length; y < b; y++)
          (g[y].fn !== d || (f && !g[y].once) || (h && g[y].context !== h)) &&
            v.push(g[y]);
        v.length ? (this._events[p] = v.length === 1 ? v[0] : v) : l(this, p);
      }
      return this;
    }),
    (u.prototype.removeAllListeners = function (c) {
      var d;
      return (
        c
          ? ((d = n ? n + c : c), this._events[d] && l(this, d))
          : ((this._events = new r()), (this._eventsCount = 0)),
        this
      );
    }),
    (u.prototype.off = u.prototype.removeListener),
    (u.prototype.addListener = u.prototype.on),
    (u.prefixed = n),
    (u.EventEmitter = u),
    (t.exports = u);
})(Rje);
var e$n = Rje.exports,
  Aje = oCn(e$n);
const p8 = "1.6.0-beta.2",
  tD = {};
function t$n() {
  return typeof __HLS_WORKER_BUNDLE__ == "function";
}
function n$n() {
  const t = tD[p8];
  if (t) return t.clientCount++, t;
  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" }
    ),
    n = self.URL.createObjectURL(e),
    r = { worker: new self.Worker(n), objectURL: n, clientCount: 1 };
  return (tD[p8] = r), r;
}
function r$n(t) {
  const e = tD[t];
  if (e) return e.clientCount++, e;
  const n = new self.URL(t, self.location.href).href,
    r = { worker: new self.Worker(n), scriptURL: n, clientCount: 1 };
  return (tD[t] = r), r;
}
function i$n(t) {
  const e = tD[t || p8];
  if (e && e.clientCount-- === 1) {
    const { worker: n, objectURL: r } = e;
    delete tD[t || p8], r && self.URL.revokeObjectURL(r), n.terminate();
  }
}
function wje(t, e) {
  return (
    e + 10 <= t.length &&
    t[e] === 51 &&
    t[e + 1] === 68 &&
    t[e + 2] === 73 &&
    t[e + 3] < 255 &&
    t[e + 4] < 255 &&
    t[e + 6] < 128 &&
    t[e + 7] < 128 &&
    t[e + 8] < 128 &&
    t[e + 9] < 128
  );
}
function Gue(t, e) {
  return (
    e + 10 <= t.length &&
    t[e] === 73 &&
    t[e + 1] === 68 &&
    t[e + 2] === 51 &&
    t[e + 3] < 255 &&
    t[e + 4] < 255 &&
    t[e + 6] < 128 &&
    t[e + 7] < 128 &&
    t[e + 8] < 128 &&
    t[e + 9] < 128
  );
}
function GB(t, e) {
  let n = 0;
  return (
    (n = (127 & t[e]) << 21),
    (n |= (127 & t[e + 1]) << 14),
    (n |= (127 & t[e + 2]) << 7),
    (n |= 127 & t[e + 3]),
    n
  );
}
function oL(t, e) {
  const n = e;
  let r = 0;
  for (; Gue(t, e); )
    (r += 10), (r += GB(t, e + 6)), wje(t, e + 10) && (r += 10), (e += r);
  if (r > 0) return t.subarray(n, n + r);
}
function a$n(t, e, n, r) {
  const i = e[n + 2],
    o = (i >> 2) & 15;
  if (o > 12) {
    const p = new Error(`invalid ADTS sampling index:${o}`);
    return void t.emit(Tt.ERROR, Tt.ERROR, {
      type: ro.MEDIA_ERROR,
      details: Ir.FRAG_PARSING_ERROR,
      fatal: !0,
      error: p,
      reason: p.message,
    });
  }
  const l = 1 + ((i >> 6) & 3),
    u = ((e[n + 3] >> 6) & 3) | ((1 & i) << 2),
    c = "mp4a.40." + l,
    d = [
      96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3,
      7350,
    ][o];
  let h = o;
  (l !== 5 && l !== 29) || (h -= 3);
  const f = [(l << 3) | ((14 & h) >> 1), ((1 & h) << 7) | (u << 3)];
  return (
    Ds.log(
      `manifest codec:${r}, parsed codec:${c}, channels:${u}, rate:${d} (ADTS object type:${l} sampling index:${o})`
    ),
    {
      config: f,
      samplerate: d,
      channelCount: u,
      codec: c,
      parsedCodec: c,
      manifestCodec: r,
    }
  );
}
function kje(t, e) {
  return t[e] === 255 && (246 & t[e + 1]) == 240;
}
function Ije(t, e) {
  return 1 & t[e + 1] ? 7 : 9;
}
function Nue(t, e) {
  return ((3 & t[e + 3]) << 11) | (t[e + 4] << 3) | ((224 & t[e + 5]) >>> 5);
}
function o$n(t, e) {
  return e + 5 < t.length;
}
function g8(t, e) {
  return e + 1 < t.length && kje(t, e);
}
function s$n(t, e) {
  return o$n(t, e) && kje(t, e) && Nue(t, e) <= t.length - e;
}
function l$n(t, e) {
  if (g8(t, e)) {
    const n = Ije(t, e);
    if (e + n >= t.length) return !1;
    const r = Nue(t, e);
    if (r <= n) return !1;
    const i = e + r;
    return i === t.length || g8(t, i);
  }
  return !1;
}
function Dje(t, e, n, r, i) {
  if (!t.samplerate) {
    const o = a$n(e, n, r, i);
    if (!o) return;
    du(t, o);
  }
}
function Pje(t) {
  return 9216e4 / t;
}
function u$n(t, e) {
  const n = Ije(t, e);
  if (e + n <= t.length) {
    const r = Nue(t, e) - n;
    if (r > 0) return { headerLength: n, frameLength: r };
  }
}
function Mje(t, e, n, r, i) {
  const o = r + i * Pje(t.samplerate),
    l = u$n(e, n);
  let u;
  if (l) {
    const { frameLength: d, headerLength: h } = l,
      f = h + d,
      p = Math.max(0, n + f - e.length);
    p
      ? ((u = new Uint8Array(f - h)), u.set(e.subarray(n + h, e.length), 0))
      : (u = e.subarray(n + h, n + f));
    const g = { unit: u, pts: o };
    return p || t.samples.push(g), { sample: g, length: f, missing: p };
  }
  const c = e.length - n;
  return (
    (u = new Uint8Array(c)),
    u.set(e.subarray(n, e.length), 0),
    { sample: { unit: u, pts: o }, length: c, missing: -1 }
  );
}
function c$n(t, e) {
  return Gue(t, e) && GB(t, e + 6) + 10 <= t.length - e;
}
function d$n(t) {
  if (t.size < 2) return;
  const e = jp(t.data, !0),
    n = new Uint8Array(t.data.subarray(e.length + 1));
  return { key: t.type, info: e, data: n.buffer };
}
function h$n(t) {
  if (t.size < 2) return;
  if (t.type === "TXXX") {
    let n = 1;
    const r = jp(t.data.subarray(n), !0);
    n += r.length + 1;
    const i = jp(t.data.subarray(n));
    return { key: t.type, info: r, data: i };
  }
  const e = jp(t.data.subarray(1));
  return { key: t.type, info: "", data: e };
}
function f$n(t) {
  if (t.type === "WXXX") {
    if (t.size < 2) return;
    let n = 1;
    const r = jp(t.data.subarray(n), !0);
    n += r.length + 1;
    const i = jp(t.data.subarray(n));
    return { key: t.type, info: r, data: i };
  }
  const e = jp(t.data);
  return { key: t.type, info: "", data: e };
}
function rK(t, e = 0, n = 1 / 0) {
  return p$n(t, e, n, Uint8Array);
}
function p$n(t, e, n, r) {
  const i = g$n(t);
  let o = 1;
  "BYTES_PER_ELEMENT" in r && (o = r.BYTES_PER_ELEMENT);
  const l = m$n(t) ? t.byteOffset : 0,
    u = (l + t.byteLength) / o,
    c = (l + e) / o,
    d = Math.floor(Math.max(0, Math.min(c, u)));
  return new r(i, d, Math.floor(Math.min(d + Math.max(n, 0), u)) - d);
}
function g$n(t) {
  return t instanceof ArrayBuffer ? t : t.buffer;
}
function m$n(t) {
  return (
    t &&
    t.buffer instanceof ArrayBuffer &&
    t.byteLength !== void 0 &&
    t.byteOffset !== void 0
  );
}
function y$n(t) {
  return t instanceof ArrayBuffer
    ? t
    : t.byteOffset == 0 && t.byteLength == t.buffer.byteLength
    ? t.buffer
    : new Uint8Array(t).buffer;
}
function v$n(t) {
  return btoa(String.fromCharCode(...t));
}
function Cje(t, e) {
  if (t < 0) return -Cje(-t, e);
  const n = Math.pow(10, e);
  if (Math.abs(((t * n) % 1) - 0.5) < Number.EPSILON) {
    const r = Math.floor(t * n);
    return (r % 2 == 0 ? r : r + 1) / n;
  }
  return Math.round(t * n) / n;
}
function b$n(t, e) {
  const n = new URL(t),
    r = new URL(e);
  if (n.origin !== r.origin) return t;
  const i = n.pathname.split("/").slice(1),
    o = r.pathname.split("/").slice(1, -1);
  for (; i[0] === o[0]; ) i.shift(), o.shift();
  for (; o.length; ) o.shift(), i.unshift("..");
  return i.join("/");
}
function _$n(t) {
  const e = {
    key: t.type,
    description: "",
    data: "",
    mimeType: null,
    pictureType: null,
  };
  if (t.size < 2) return;
  if (t.data[0] !== 3)
    return void console.log(
      "Ignore frame with unrecognized character encoding"
    );
  const n = t.data.subarray(1).indexOf(0);
  if (n === -1) return;
  const r = jp(rK(t.data, 1, n)),
    i = t.data[2 + n],
    o = t.data.subarray(3 + n).indexOf(0);
  if (o === -1) return;
  const l = jp(rK(t.data, 3 + n, o));
  let u;
  return (
    (u =
      r === "-->"
        ? jp(rK(t.data, 4 + n + o))
        : y$n(t.data.subarray(4 + n + o))),
    (e.mimeType = r),
    (e.pictureType = i),
    (e.description = l),
    (e.data = u),
    e
  );
}
function T$n(t) {
  return t.type === "PRIV"
    ? d$n(t)
    : t.type[0] === "W"
    ? f$n(t)
    : t.type === "APIC"
    ? _$n(t)
    : h$n(t);
}
function E$n(t) {
  const e = String.fromCharCode(t[0], t[1], t[2], t[3]),
    n = GB(t, 4);
  return { type: e, size: n, data: t.subarray(10, 10 + n) };
}
const p4 = 10,
  S$n = 10;
function R$n(t) {
  let e = 0;
  const n = [];
  for (; Gue(t, e); ) {
    const r = GB(t, e + 6);
    (t[e + 5] >> 6) & 1 && (e += p4), (e += p4);
    const i = e + r;
    for (; e + S$n < i; ) {
      const o = E$n(t.subarray(e)),
        l = T$n(o);
      l && n.push(l), (e += o.size + p4);
    }
    wje(t, e) && (e += p4);
  }
  return n;
}
function A$n(t) {
  return (
    t &&
    t.key === "PRIV" &&
    t.info === "com.apple.streaming.transportStreamTimestamp"
  );
}
function w$n(t) {
  if (t.data.byteLength === 8) {
    const e = new Uint8Array(t.data),
      n = 1 & e[3];
    let r = (e[4] << 23) + (e[5] << 15) + (e[6] << 7) + e[7];
    return (r /= 45), n && (r += 4772185884e-2), Math.round(r);
  }
}
function Fue(t) {
  const e = R$n(t);
  for (let n = 0; n < e.length; n++) {
    const r = e[n];
    if (A$n(r)) return w$n(r);
  }
}
let nD = (function (t) {
  return (
    (t.audioId3 = "org.id3"),
    (t.dateRange = "com.apple.quicktime.HLS"),
    (t.emsg = "https://aomedia.org/emsg/ID3"),
    (t.misbklv = "urn:misb:KLV:bin:1910.1"),
    t
  );
})({});
function Zy(t = "", e = 9e4) {
  return {
    type: t,
    id: -1,
    pid: -1,
    inputTimeScale: e,
    sequenceNumber: -1,
    samples: [],
    dropped: 0,
  };
}
class Uue {
  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, n, r, i) {
    this._id3Track = {
      type: "id3",
      id: 3,
      pid: -1,
      inputTimeScale: 9e4,
      sequenceNumber: 0,
      samples: [],
      dropped: 0,
    };
  }
  resetTimeStamp(e) {
    (this.initPTS = e), this.resetContiguity();
  }
  resetContiguity() {
    (this.basePTS = null), (this.lastPTS = null), (this.frameIndex = 0);
  }
  canParse(e, n) {
    return !1;
  }
  appendFrame(e, n, r) {}
  demux(e, n) {
    this.cachedData && ((e = fm(this.cachedData, e)), (this.cachedData = null));
    let r,
      i = oL(e, 0),
      o = i ? i.length : 0;
    const l = this._audioTrack,
      u = this._id3Track,
      c = i ? Fue(i) : void 0,
      d = e.length;
    for (
      (this.basePTS === null || (this.frameIndex === 0 && Ta(c))) &&
        ((this.basePTS = k$n(c, n, this.initPTS)),
        (this.lastPTS = this.basePTS)),
        this.lastPTS === null && (this.lastPTS = this.basePTS),
        i &&
          i.length > 0 &&
          u.samples.push({
            pts: this.lastPTS,
            dts: this.lastPTS,
            data: i,
            type: nD.audioId3,
            duration: Number.POSITIVE_INFINITY,
          });
      o < d;

    ) {
      if (this.canParse(e, o)) {
        const h = this.appendFrame(l, e, o);
        h
          ? (this.frameIndex++,
            (this.lastPTS = h.sample.pts),
            (o += h.length),
            (r = o))
          : (o = d);
      } else
        c$n(e, o)
          ? ((i = oL(e, o)),
            u.samples.push({
              pts: this.lastPTS,
              dts: this.lastPTS,
              data: i,
              type: nD.audioId3,
              duration: Number.POSITIVE_INFINITY,
            }),
            (o += i.length),
            (r = o))
          : o++;
      if (o === d && r !== d) {
        const h = MS(e, r);
        this.cachedData
          ? (this.cachedData = fm(this.cachedData, h))
          : (this.cachedData = h);
      }
    }
    return { audioTrack: l, videoTrack: Zy(), id3Track: u, textTrack: Zy() };
  }
  demuxSampleAes(e, n, r) {
    return Promise.reject(
      new Error(`[${this}] This demuxer does not support Sample-AES decryption`)
    );
  }
  flush(e) {
    const n = this.cachedData;
    return (
      n && ((this.cachedData = null), this.demux(n, 0)),
      {
        audioTrack: this._audioTrack,
        videoTrack: Zy(),
        id3Track: this._id3Track,
        textTrack: Zy(),
      }
    );
  }
  destroy() {
    (this.cachedData = null), (this._audioTrack = this._id3Track = void 0);
  }
}
const k$n = (t, e, n) =>
  Ta(t) ? 90 * t : 9e4 * e + (n ? (9e4 * n.baseTime) / n.timescale : 0);
let g4 = null;
const I$n = [
    32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 32, 48,
    56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 32, 40, 48, 56, 64,
    80, 96, 112, 128, 160, 192, 224, 256, 320, 32, 48, 56, 64, 80, 96, 112, 128,
    144, 160, 176, 192, 224, 256, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112,
    128, 144, 160,
  ],
  D$n = [44100, 48e3, 32e3, 22050, 24e3, 16e3, 11025, 12e3, 8e3],
  P$n = [
    [0, 72, 144, 12],
    [0, 0, 0, 0],
    [0, 72, 144, 12],
    [0, 144, 144, 12],
  ],
  M$n = [0, 1, 1, 4];
function $je(t, e, n, r, i) {
  if (n + 24 > e.length) return;
  const o = xje(e, n);
  if (o && n + o.frameLength <= e.length) {
    const l = r + i * ((9e4 * o.samplesPerFrame) / o.sampleRate),
      u = { unit: e.subarray(n, n + o.frameLength), pts: l, dts: l };
    return (
      (t.config = []),
      (t.channelCount = o.channelCount),
      (t.samplerate = o.sampleRate),
      t.samples.push(u),
      { sample: u, length: o.frameLength, missing: 0 }
    );
  }
}
function xje(t, e) {
  const n = (t[e + 1] >> 3) & 3,
    r = (t[e + 1] >> 1) & 3,
    i = (t[e + 2] >> 4) & 15,
    o = (t[e + 2] >> 2) & 3;
  if (n !== 1 && i !== 0 && i !== 15 && o !== 3) {
    const l = (t[e + 2] >> 1) & 1,
      u = t[e + 3] >> 6,
      c = 1e3 * I$n[14 * (n === 3 ? 3 - r : r === 3 ? 3 : 4) + i - 1],
      d = D$n[3 * (n === 3 ? 0 : n === 2 ? 1 : 2) + o],
      h = u === 3 ? 1 : 2,
      f = P$n[n][r],
      p = M$n[r],
      g = 8 * f * p,
      y = Math.floor((f * c) / d + l) * p;
    if (g4 === null) {
      const v = (navigator.userAgent || "").match(/Chrome\/(\d+)/i);
      g4 = v ? parseInt(v[1]) : 0;
    }
    return (
      g4 &&
        g4 <= 87 &&
        r === 2 &&
        c >= 224e3 &&
        u === 0 &&
        (t[e + 3] = 128 | t[e + 3]),
      { sampleRate: d, channelCount: h, frameLength: y, samplesPerFrame: g }
    );
  }
}
function Bue(t, e) {
  return t[e] === 255 && (224 & t[e + 1]) == 224 && (6 & t[e + 1]) != 0;
}
function Lje(t, e) {
  return e + 1 < t.length && Bue(t, e);
}
function C$n(t, e) {
  return Bue(t, e) && 4 <= t.length - e;
}
function Oje(t, e) {
  if (e + 1 < t.length && Bue(t, e)) {
    const r = xje(t, e);
    let i = 4;
    r != null && r.frameLength && (i = r.frameLength);
    const o = e + i;
    return o === t.length || Lje(t, o);
  }
  return !1;
}
class $$n extends Uue {
  constructor(e, n) {
    super(),
      (this.observer = void 0),
      (this.config = void 0),
      (this.observer = e),
      (this.config = n);
  }
  resetInitSegment(e, n, r, i) {
    super.resetInitSegment(e, n, r, i),
      (this._audioTrack = {
        container: "audio/adts",
        type: "audio",
        id: 2,
        pid: -1,
        sequenceNumber: 0,
        segmentCodec: "aac",
        samples: [],
        manifestCodec: n,
        duration: i,
        inputTimeScale: 9e4,
        dropped: 0,
      });
  }
  static probe(e, n) {
    if (!e) return !1;
    const r = oL(e, 0);
    let i = (r == null ? void 0 : r.length) || 0;
    if (Oje(e, i)) return !1;
    for (let o = e.length; i < o; i++)
      if (l$n(e, i)) return n.log("ADTS sync word found !"), !0;
    return !1;
  }
  canParse(e, n) {
    return s$n(e, n);
  }
  appendFrame(e, n, r) {
    Dje(e, this.observer, n, r, e.manifestCodec);
    const i = Mje(e, n, r, this.basePTS, this.frameIndex);
    if (i && i.missing === 0) return i;
  }
}
const Gje = (t, e) => {
  let n = 0,
    r = 5;
  e += r;
  const i = new Uint32Array(1),
    o = new Uint32Array(1),
    l = new Uint8Array(1);
  for (; r > 0; ) {
    l[0] = t[e];
    const u = Math.min(r, 8),
      c = 8 - u;
    (o[0] = (4278190080 >>> (24 + c)) << c),
      (i[0] = (l[0] & o[0]) >> c),
      (n = n ? (n << u) | i[0] : i[0]),
      (e += 1),
      (r -= u);
  }
  return n;
};
class x$n extends Uue {
  constructor(e) {
    super(), (this.observer = void 0), (this.observer = e);
  }
  resetInitSegment(e, n, r, i) {
    super.resetInitSegment(e, n, r, i),
      (this._audioTrack = {
        container: "audio/ac-3",
        type: "audio",
        id: 2,
        pid: -1,
        sequenceNumber: 0,
        segmentCodec: "ac3",
        samples: [],
        manifestCodec: n,
        duration: i,
        inputTimeScale: 9e4,
        dropped: 0,
      });
  }
  canParse(e, n) {
    return n + 64 < e.length;
  }
  appendFrame(e, n, r) {
    const i = Nje(e, n, r, this.basePTS, this.frameIndex);
    if (i !== -1)
      return { sample: e.samples[e.samples.length - 1], length: i, missing: 0 };
  }
  static probe(e) {
    if (!e) return !1;
    const n = oL(e, 0);
    if (!n) return !1;
    const r = n.length;
    return (
      e[r] === 11 && e[r + 1] === 119 && Fue(n) !== void 0 && Gje(e, r) < 16
    );
  }
}
function Nje(t, e, n, r, i) {
  if (n + 8 > e.length || e[n] !== 11 || e[n + 1] !== 119) return -1;
  const o = e[n + 4] >> 6;
  if (o >= 3) return -1;
  const l = [48e3, 44100, 32e3][o],
    u = 63 & e[n + 4],
    c =
      2 *
      [
        64, 69, 96, 64, 70, 96, 80, 87, 120, 80, 88, 120, 96, 104, 144, 96, 105,
        144, 112, 121, 168, 112, 122, 168, 128, 139, 192, 128, 140, 192, 160,
        174, 240, 160, 175, 240, 192, 208, 288, 192, 209, 288, 224, 243, 336,
        224, 244, 336, 256, 278, 384, 256, 279, 384, 320, 348, 480, 320, 349,
        480, 384, 417, 576, 384, 418, 576, 448, 487, 672, 448, 488, 672, 512,
        557, 768, 512, 558, 768, 640, 696, 960, 640, 697, 960, 768, 835, 1152,
        768, 836, 1152, 896, 975, 1344, 896, 976, 1344, 1024, 1114, 1536, 1024,
        1115, 1536, 1152, 1253, 1728, 1152, 1254, 1728, 1280, 1393, 1920, 1280,
        1394, 1920,
      ][3 * u + o];
  if (n + c > e.length) return -1;
  const d = e[n + 6] >> 5;
  let h = 0;
  d === 2 ? (h += 2) : (1 & d && d !== 1 && (h += 2), 4 & d && (h += 2));
  const f = (((e[n + 6] << 8) | e[n + 7]) >> (12 - h)) & 1,
    p = [2, 1, 2, 3, 3, 4, 4, 5][d] + f,
    g = e[n + 5] >> 3,
    y = 7 & e[n + 5],
    v = new Uint8Array([
      (o << 6) | (g << 1) | (y >> 2),
      ((3 & y) << 6) | (d << 3) | (f << 2) | (u >> 4),
      (u << 4) & 224,
    ]),
    b = r + i * ((1536 / l) * 9e4),
    w = e.subarray(n, n + c);
  return (
    (t.config = v),
    (t.channelCount = p),
    (t.samplerate = l),
    t.samples.push({ unit: w, pts: b }),
    c
  );
}
class L$n extends Uue {
  resetInitSegment(e, n, r, i) {
    super.resetInitSegment(e, n, r, i),
      (this._audioTrack = {
        container: "audio/mpeg",
        type: "audio",
        id: 2,
        pid: -1,
        sequenceNumber: 0,
        segmentCodec: "mp3",
        samples: [],
        manifestCodec: n,
        duration: i,
        inputTimeScale: 9e4,
        dropped: 0,
      });
  }
  static probe(e) {
    if (!e) return !1;
    const n = oL(e, 0);
    let r = (n == null ? void 0 : n.length) || 0;
    if (
      n &&
      e[r] === 11 &&
      e[r + 1] === 119 &&
      Fue(n) !== void 0 &&
      Gje(e, r) <= 16
    )
      return !1;
    for (let i = e.length; r < i; r++)
      if (Oje(e, r)) return Ds.log("MPEG Audio sync word found !"), !0;
    return !1;
  }
  canParse(e, n) {
    return C$n(e, n);
  }
  appendFrame(e, n, r) {
    if (this.basePTS !== null)
      return $je(e, n, r, this.basePTS, this.frameIndex);
  }
}
const O$n = /\/emsg[-/]ID3/i;
let G$n = class {
  constructor(t, e) {
    (this.remainderData = null),
      (this.timeOffset = 0),
      (this.config = void 0),
      (this.videoTrack = void 0),
      (this.audioTrack = void 0),
      (this.id3Track = void 0),
      (this.txtTrack = void 0),
      (this.config = e);
  }
  resetTimeStamp() {}
  resetInitSegment(t, e, n, r) {
    const i = (this.videoTrack = Zy("video", 1)),
      o = (this.audioTrack = Zy("audio", 1)),
      l = (this.txtTrack = Zy("text", 1));
    if (
      ((this.id3Track = Zy("id3", 1)),
      (this.timeOffset = 0),
      t == null || !t.byteLength)
    )
      return;
    const u = hje(t);
    if (u.video) {
      const { id: c, timescale: d, codec: h } = u.video;
      (i.id = c), (i.timescale = l.timescale = d), (i.codec = h);
    }
    if (u.audio) {
      const { id: c, timescale: d, codec: h } = u.audio;
      (o.id = c), (o.timescale = d), (o.codec = h);
    }
    (l.id = uje.text), (i.sampleDuration = 0), (i.duration = o.duration = r);
  }
  resetContiguity() {
    this.remainderData = null;
  }
  static probe(t) {
    return uCn(t);
  }
  demux(t, e) {
    this.timeOffset = e;
    let n = t;
    const r = this.videoTrack,
      i = this.txtTrack;
    if (this.config.progressive) {
      this.remainderData && (n = fm(this.remainderData, t));
      const l = yCn(n);
      (this.remainderData = l.remainder),
        (r.samples = l.valid || new Uint8Array());
    } else r.samples = n;
    const o = this.extractID3Track(r, e);
    return (
      (i.samples = ORe(e, r)),
      {
        videoTrack: r,
        audioTrack: this.audioTrack,
        id3Track: o,
        textTrack: this.txtTrack,
      }
    );
  }
  flush() {
    const t = this.timeOffset,
      e = this.videoTrack,
      n = this.txtTrack;
    (e.samples = this.remainderData || new Uint8Array()),
      (this.remainderData = null);
    const r = this.extractID3Track(e, this.timeOffset);
    return (
      (n.samples = ORe(t, e)),
      { videoTrack: e, audioTrack: Zy(), id3Track: r, textTrack: Zy() }
    );
  }
  extractID3Track(t, e) {
    const n = this.id3Track;
    if (t.samples.length) {
      const r = oo(t.samples, ["emsg"]);
      r &&
        r.forEach((i) => {
          const o = _Cn(i);
          if (O$n.test(o.schemeIdUri)) {
            const l = jRe(o, e);
            let u =
              o.eventDuration === 4294967295
                ? Number.POSITIVE_INFINITY
                : o.eventDuration / o.timeScale;
            u <= 0.001 && (u = Number.POSITIVE_INFINITY);
            const c = o.payload;
            n.samples.push({
              data: c,
              len: c.byteLength,
              dts: l,
              pts: l,
              type: nD.emsg,
              duration: u,
            });
          } else if (
            this.config.enableEmsgKLVMetadata &&
            o.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")
          ) {
            const l = jRe(o, e);
            n.samples.push({
              data: o.payload,
              len: o.payload.byteLength,
              dts: l,
              pts: l,
              type: nD.misbklv,
              duration: Number.POSITIVE_INFINITY,
            });
          }
        });
    }
    return n;
  }
  demuxSampleAes(t, e, n) {
    return Promise.reject(
      new Error("The MP4 demuxer does not support SAMPLE-AES decryption")
    );
  }
  destroy() {
    (this.config = null),
      (this.remainderData = null),
      (this.videoTrack =
        this.audioTrack =
        this.id3Track =
        this.txtTrack =
          void 0);
  }
};
function jRe(t, e) {
  return Ta(t.presentationTime)
    ? t.presentationTime / t.timeScale
    : e + t.presentationTimeDelta / t.timeScale;
}
class N$n {
  constructor(e, n, r) {
    (this.keyData = void 0),
      (this.decrypter = void 0),
      (this.keyData = r),
      (this.decrypter = new xue(n, { removePKCS7Padding: !1 }));
  }
  decryptBuffer(e) {
    return this.decrypter.decrypt(
      e,
      this.keyData.key.buffer,
      this.keyData.iv.buffer,
      lE.cbc
    );
  }
  decryptAacSample(e, n, r) {
    const i = e[n].unit;
    if (i.length <= 16) return;
    const o = i.subarray(16, i.length - (i.length % 16)),
      l = o.buffer.slice(o.byteOffset, o.byteOffset + o.length);
    this.decryptBuffer(l).then((u) => {
      const c = new Uint8Array(u);
      i.set(c, 16),
        this.decrypter.isSync() || this.decryptAacSamples(e, n + 1, r);
    });
  }
  decryptAacSamples(e, n, r) {
    for (; ; n++) {
      if (n >= e.length) return void r();
      if (
        !(e[n].unit.length < 32) &&
        (this.decryptAacSample(e, n, r), !this.decrypter.isSync())
      )
        return;
    }
  }
  getAvcEncryptedData(e) {
    const n = 16 * Math.floor((e.length - 48) / 160) + 16,
      r = new Int8Array(n);
    let i = 0;
    for (let o = 32; o < e.length - 16; o += 160, i += 16)
      r.set(e.subarray(o, o + 16), i);
    return r;
  }
  getAvcDecryptedUnit(e, n) {
    const r = new Uint8Array(n);
    let i = 0;
    for (let o = 32; o < e.length - 16; o += 160, i += 16)
      e.set(r.subarray(i, i + 16), o);
    return e;
  }
  decryptAvcSample(e, n, r, i, o) {
    const l = pje(o.data),
      u = this.getAvcEncryptedData(l);
    this.decryptBuffer(u.buffer).then((c) => {
      (o.data = this.getAvcDecryptedUnit(l, c)),
        this.decrypter.isSync() || this.decryptAvcSamples(e, n, r + 1, i);
    });
  }
  decryptAvcSamples(e, n, r, i) {
    if (e instanceof Uint8Array)
      throw new Error("Cannot decrypt samples of type Uint8Array");
    for (; ; n++, r = 0) {
      if (n >= e.length) return void i();
      const o = e[n].units;
      for (; !(r >= o.length); r++) {
        const l = o[r];
        if (
          !(
            l.data.length <= 48 ||
            (l.type !== 1 && l.type !== 5) ||
            (this.decryptAvcSample(e, n, r, i, l), this.decrypter.isSync())
          )
        )
          return;
      }
    }
  }
}
class Fje {
  constructor() {
    this.VideoSample = null;
  }
  createVideoSample(e, n, r) {
    return { key: e, frame: !1, pts: n, dts: r, units: [], length: 0 };
  }
  getLastNalUnit(e) {
    var n;
    let r,
      i = this.VideoSample;
    if (
      ((i && i.units.length !== 0) || (i = e[e.length - 1]),
      (n = i) != null && n.units)
    ) {
      const o = i.units;
      r = o[o.length - 1];
    }
    return r;
  }
  pushAccessUnit(e, n) {
    if (e.units.length && e.frame) {
      if (e.pts === void 0) {
        const r = n.samples,
          i = r.length;
        if (!i) return void n.dropped++;
        {
          const o = r[i - 1];
          (e.pts = o.pts), (e.dts = o.dts);
        }
      }
      n.samples.push(e);
    }
  }
  parseNALu(e, n, r) {
    const i = n.byteLength;
    let o = e.naluState || 0;
    const l = o,
      u = [];
    let c,
      d,
      h,
      f = 0,
      p = -1,
      g = 0;
    for (
      o === -1 && ((p = 0), (g = this.getNALuType(n, 0)), (o = 0), (f = 1));
      f < i;

    )
      if (((c = n[f++]), o))
        if (o !== 1)
          if (c)
            if (c === 1) {
              if (((d = f - o - 1), p >= 0)) {
                const y = { data: n.subarray(p, d), type: g };
                u.push(y);
              } else {
                const y = this.getLastNalUnit(e.samples);
                y &&
                  (l &&
                    f <= 4 - l &&
                    y.state &&
                    (y.data = y.data.subarray(0, y.data.byteLength - l)),
                  d > 0 &&
                    ((y.data = fm(y.data, n.subarray(0, d))), (y.state = 0)));
              }
              f < i
                ? ((h = this.getNALuType(n, f)), (p = f), (g = h), (o = 0))
                : (o = -1);
            } else o = 0;
          else o = 3;
        else o = c ? 0 : 2;
      else o = c ? 0 : 1;
    if (p >= 0 && o >= 0) {
      const y = { data: n.subarray(p, i), type: g, state: o };
      u.push(y);
    }
    if (u.length === 0) {
      const y = this.getLastNalUnit(e.samples);
      y && (y.data = fm(y.data, n));
    }
    return (e.naluState = o), u;
  }
}
class x$ {
  constructor(e) {
    (this.data = void 0),
      (this.bytesAvailable = void 0),
      (this.word = void 0),
      (this.bitsAvailable = void 0),
      (this.data = e),
      (this.bytesAvailable = e.byteLength),
      (this.word = 0),
      (this.bitsAvailable = 0);
  }
  loadWord() {
    const e = this.data,
      n = this.bytesAvailable,
      r = e.byteLength - n,
      i = new Uint8Array(4),
      o = Math.min(4, n);
    if (o === 0) throw new Error("no bytes available");
    i.set(e.subarray(r, r + o)),
      (this.word = new DataView(i.buffer).getUint32(0)),
      (this.bitsAvailable = 8 * o),
      (this.bytesAvailable -= o);
  }
  skipBits(e) {
    let n;
    (e = Math.min(e, 8 * this.bytesAvailable + this.bitsAvailable)),
      this.bitsAvailable > e
        ? ((this.word <<= e), (this.bitsAvailable -= e))
        : ((n = (e -= this.bitsAvailable) >> 3),
          (e -= n << 3),
          (this.bytesAvailable -= n),
          this.loadWord(),
          (this.word <<= e),
          (this.bitsAvailable -= e));
  }
  readBits(e) {
    let n = Math.min(this.bitsAvailable, e);
    const r = this.word >>> (32 - n);
    if (
      (e > 32 && Ds.error("Cannot read more than 32 bits at a time"),
      (this.bitsAvailable -= n),
      this.bitsAvailable > 0)
    )
      this.word <<= n;
    else {
      if (!(this.bytesAvailable > 0)) throw new Error("no bits available");
      this.loadWord();
    }
    return (
      (n = e - n), n > 0 && this.bitsAvailable ? (r << n) | this.readBits(n) : r
    );
  }
  skipLZ() {
    let e;
    for (e = 0; e < this.bitsAvailable; ++e)
      if (this.word & (2147483648 >>> e))
        return (this.word <<= e), (this.bitsAvailable -= e), e;
    return this.loadWord(), e + this.skipLZ();
  }
  skipUEG() {
    this.skipBits(1 + this.skipLZ());
  }
  skipEG() {
    this.skipBits(1 + this.skipLZ());
  }
  readUEG() {
    const e = this.skipLZ();
    return this.readBits(e + 1) - 1;
  }
  readEG() {
    const e = this.readUEG();
    return 1 & e ? (1 + e) >>> 1 : -1 * (e >>> 1);
  }
  readBoolean() {
    return this.readBits(1) === 1;
  }
  readUByte() {
    return this.readBits(8);
  }
  readUShort() {
    return this.readBits(16);
  }
  readUInt() {
    return this.readBits(32);
  }
}
class WRe extends Fje {
  parsePES(e, n, r, i) {
    const o = this.parseNALu(e, r.data, i);
    let l,
      u = this.VideoSample,
      c = !1;
    (r.data = null),
      u &&
        o.length &&
        !e.audFound &&
        (this.pushAccessUnit(u, e),
        (u = this.VideoSample = this.createVideoSample(!1, r.pts, r.dts))),
      o.forEach((d) => {
        var h, f;
        switch (d.type) {
          case 1: {
            let v = !1;
            l = !0;
            const b = d.data;
            if (c && b.length > 4) {
              const w = this.readSliceType(b);
              (w !== 2 && w !== 4 && w !== 7 && w !== 9) || (v = !0);
            }
            var p;
            v &&
              (p = u) != null &&
              p.frame &&
              !u.key &&
              (this.pushAccessUnit(u, e), (u = this.VideoSample = null)),
              u ||
                (u = this.VideoSample =
                  this.createVideoSample(!0, r.pts, r.dts)),
              (u.frame = !0),
              (u.key = v);
            break;
          }
          case 5:
            (l = !0),
              (h = u) != null &&
                h.frame &&
                !u.key &&
                (this.pushAccessUnit(u, e), (u = this.VideoSample = null)),
              u ||
                (u = this.VideoSample =
                  this.createVideoSample(!0, r.pts, r.dts)),
              (u.key = !0),
              (u.frame = !0);
            break;
          case 6:
            (l = !0), $ue(d.data, 1, r.pts, n.samples);
            break;
          case 7: {
            var g, y;
            (l = !0), (c = !0);
            const v = d.data,
              b = this.readSPS(v);
            if (
              !e.sps ||
              e.width !== b.width ||
              e.height !== b.height ||
              ((g = e.pixelRatio) == null ? void 0 : g[0]) !==
                b.pixelRatio[0] ||
              ((y = e.pixelRatio) == null ? void 0 : y[1]) !== b.pixelRatio[1]
            ) {
              (e.width = b.width),
                (e.height = b.height),
                (e.pixelRatio = b.pixelRatio),
                (e.sps = [v]);
              const w = v.subarray(1, 4);
              let k = "avc1.";
              for (let D = 0; D < 3; D++) {
                let $ = w[D].toString(16);
                $.length < 2 && ($ = "0" + $), (k += $);
              }
              e.codec = k;
            }
            break;
          }
          case 8:
            (l = !0), (e.pps = [d.data]);
            break;
          case 9:
            (l = !0),
              (e.audFound = !0),
              (f = u) != null &&
                f.frame &&
                (this.pushAccessUnit(u, e), (u = null)),
              u ||
                (u = this.VideoSample =
                  this.createVideoSample(!1, r.pts, r.dts));
            break;
          case 12:
            l = !0;
            break;
          default:
            l = !1;
        }
        u && l && u.units.push(d);
      }),
      i && u && (this.pushAccessUnit(u, e), (this.VideoSample = null));
  }
  getNALuType(e, n) {
    return 31 & e[n];
  }
  readSliceType(e) {
    const n = new x$(e);
    return n.readUByte(), n.readUEG(), n.readUEG();
  }
  skipScalingList(e, n) {
    let r,
      i = 8,
      o = 8;
    for (let l = 0; l < e; l++)
      o !== 0 && ((r = n.readEG()), (o = (i + r + 256) % 256)),
        (i = o === 0 ? i : o);
  }
  readSPS(e) {
    const n = new x$(e);
    let r,
      i,
      o,
      l = 0,
      u = 0,
      c = 0,
      d = 0;
    const h = n.readUByte.bind(n),
      f = n.readBits.bind(n),
      p = n.readUEG.bind(n),
      g = n.readBoolean.bind(n),
      y = n.skipBits.bind(n),
      v = n.skipEG.bind(n),
      b = n.skipUEG.bind(n),
      w = this.skipScalingList.bind(this);
    h();
    const k = h();
    if (
      (f(5),
      y(3),
      h(),
      b(),
      k === 100 ||
        k === 110 ||
        k === 122 ||
        k === 244 ||
        k === 44 ||
        k === 83 ||
        k === 86 ||
        k === 118 ||
        k === 128)
    ) {
      const O = p();
      if ((O === 3 && y(1), b(), b(), y(1), g()))
        for (i = O !== 3 ? 8 : 12, o = 0; o < i; o++)
          g() && w(o < 6 ? 16 : 64, n);
    }
    b();
    const D = p();
    if (D === 0) p();
    else if (D === 1) for (y(1), v(), v(), r = p(), o = 0; o < r; o++) v();
    b(), y(1);
    const $ = p(),
      N = p(),
      P = f(1);
    P === 0 && y(1), y(1), g() && ((l = p()), (u = p()), (c = p()), (d = p()));
    let I = [1, 1];
    if (g() && g())
      switch (h()) {
        case 1:
          I = [1, 1];
          break;
        case 2:
          I = [12, 11];
          break;
        case 3:
          I = [10, 11];
          break;
        case 4:
          I = [16, 11];
          break;
        case 5:
          I = [40, 33];
          break;
        case 6:
          I = [24, 11];
          break;
        case 7:
          I = [20, 11];
          break;
        case 8:
          I = [32, 11];
          break;
        case 9:
          I = [80, 33];
          break;
        case 10:
          I = [18, 11];
          break;
        case 11:
          I = [15, 11];
          break;
        case 12:
          I = [64, 33];
          break;
        case 13:
          I = [160, 99];
          break;
        case 14:
          I = [4, 3];
          break;
        case 15:
          I = [3, 2];
          break;
        case 16:
          I = [2, 1];
          break;
        case 255:
          I = [(h() << 8) | h(), (h() << 8) | h()];
      }
    return {
      width: Math.ceil(16 * ($ + 1) - 2 * l - 2 * u),
      height: (2 - P) * (N + 1) * 16 - (P ? 2 : 4) * (c + d),
      pixelRatio: I,
    };
  }
}
class KRe extends Fje {
  constructor(...e) {
    super(...e), (this.initVPS = null);
  }
  parsePES(e, n, r, i) {
    const o = this.parseNALu(e, r.data, i);
    let l,
      u = this.VideoSample,
      c = !1;
    (r.data = null),
      u &&
        o.length &&
        !e.audFound &&
        (this.pushAccessUnit(u, e),
        (u = this.VideoSample = this.createVideoSample(!1, r.pts, r.dts))),
      o.forEach((d) => {
        var h, f;
        switch (d.type) {
          case 0:
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
          case 6:
          case 7:
          case 8:
          case 9:
            u ||
              (u = this.VideoSample = this.createVideoSample(!1, r.pts, r.dts)),
              (u.frame = !0),
              (l = !0);
            break;
          case 16:
          case 17:
          case 18:
          case 21:
            var p;
            (l = !0),
              c &&
                (p = u) != null &&
                p.frame &&
                !u.key &&
                (this.pushAccessUnit(u, e), (u = this.VideoSample = null)),
              u ||
                (u = this.VideoSample =
                  this.createVideoSample(!0, r.pts, r.dts)),
              (u.key = !0),
              (u.frame = !0);
            break;
          case 19:
          case 20:
            (l = !0),
              (h = u) != null &&
                h.frame &&
                !u.key &&
                (this.pushAccessUnit(u, e), (u = this.VideoSample = null)),
              u ||
                (u = this.VideoSample =
                  this.createVideoSample(!0, r.pts, r.dts)),
              (u.key = !0),
              (u.frame = !0);
            break;
          case 39:
            (l = !0), $ue(d.data, 2, r.pts, n.samples);
            break;
          case 32:
            if (((l = !0), !e.vps)) {
              const g = this.readVPS(d.data);
              (e.params = pl({}, g)), (this.initVPS = d.data);
            }
            e.vps = [d.data];
            break;
          case 33:
            if (((l = !0), (c = !0), typeof e.params == "object")) {
              if (
                (e.vps === void 0 ||
                  e.vps[0] === this.initVPS ||
                  e.sps === void 0 ||
                  this.matchSPS(e.sps[0], d.data) ||
                  ((this.initVPS = e.vps[0]), (e.sps = e.pps = void 0)),
                !e.sps)
              ) {
                const g = this.readSPS(d.data);
                (e.width = g.width),
                  (e.height = g.height),
                  (e.pixelRatio = g.pixelRatio),
                  (e.codec = g.codecString),
                  (e.sps = []);
                for (const y in g.params) e.params[y] = g.params[y];
              }
              e.vps !== void 0 &&
                e.vps[0] === this.initVPS &&
                e.sps.push(d.data);
            }
            u ||
              (u = this.VideoSample = this.createVideoSample(!0, r.pts, r.dts)),
              (u.key = !0);
            break;
          case 34:
            if (((l = !0), typeof e.params == "object")) {
              if (!e.pps) {
                e.pps = [];
                const g = this.readPPS(d.data);
                for (const y in g) e.params[y] = g[y];
              }
              e.vps !== void 0 &&
                e.vps[0] === this.initVPS &&
                e.pps.push(d.data);
            }
            break;
          case 35:
            (l = !0),
              (e.audFound = !0),
              (f = u) != null &&
                f.frame &&
                (this.pushAccessUnit(u, e), (u = null)),
              u ||
                (u = this.VideoSample =
                  this.createVideoSample(!1, r.pts, r.dts));
            break;
          default:
            l = !1;
        }
        u && l && u.units.push(d);
      }),
      i && u && (this.pushAccessUnit(u, e), (this.VideoSample = null));
  }
  getNALuType(e, n) {
    return (126 & e[n]) >>> 1;
  }
  ebsp2rbsp(e) {
    const n = new Uint8Array(e.byteLength);
    let r = 0;
    for (let i = 0; i < e.byteLength; i++)
      (i >= 2 && e[i] === 3 && e[i - 1] === 0 && e[i - 2] === 0) ||
        ((n[r] = e[i]), r++);
    return new Uint8Array(n.buffer, 0, r);
  }
  pushAccessUnit(e, n) {
    super.pushAccessUnit(e, n), this.initVPS && (this.initVPS = null);
  }
  readVPS(e) {
    const n = new x$(e);
    return (
      n.readUByte(),
      n.readUByte(),
      n.readBits(4),
      n.skipBits(2),
      n.readBits(6),
      {
        numTemporalLayers: n.readBits(3) + 1,
        temporalIdNested: n.readBoolean(),
      }
    );
  }
  readSPS(e) {
    const n = new x$(this.ebsp2rbsp(e));
    n.readUByte(), n.readUByte(), n.readBits(4);
    const r = n.readBits(3);
    n.readBoolean();
    const i = n.readBits(2),
      o = n.readBoolean(),
      l = n.readBits(5),
      u = n.readUByte(),
      c = n.readUByte(),
      d = n.readUByte(),
      h = n.readUByte(),
      f = n.readUByte(),
      p = n.readUByte(),
      g = n.readUByte(),
      y = n.readUByte(),
      v = n.readUByte(),
      b = n.readUByte(),
      w = n.readUByte(),
      k = [],
      D = [];
    for (let Z = 0; Z < r; Z++)
      k.push(n.readBoolean()), D.push(n.readBoolean());
    if (r > 0) for (let Z = r; Z < 8; Z++) n.readBits(2);
    for (let Z = 0; Z < r; Z++)
      k[Z] &&
        (n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte(),
        n.readUByte()),
        D[Z] && n.readUByte();
    n.readUEG();
    const $ = n.readUEG();
    $ == 3 && n.skipBits(1);
    const N = n.readUEG(),
      P = n.readUEG(),
      I = n.readBoolean();
    let O = 0,
      X = 0,
      G = 0,
      H = 0;
    I &&
      ((O += n.readUEG()),
      (X += n.readUEG()),
      (G += n.readUEG()),
      (H += n.readUEG()));
    const E = n.readUEG(),
      S = n.readUEG(),
      L = n.readUEG();
    for (let Z = n.readBoolean() ? 0 : r; Z <= r; Z++)
      n.skipUEG(), n.skipUEG(), n.skipUEG();
    if (
      (n.skipUEG(),
      n.skipUEG(),
      n.skipUEG(),
      n.skipUEG(),
      n.skipUEG(),
      n.skipUEG(),
      n.readBoolean() && n.readBoolean())
    )
      for (let Z = 0; Z < 4; Z++)
        for (let ie = 0; ie < (Z === 3 ? 2 : 6); ie++)
          if (n.readBoolean()) {
            const Ne = Math.min(64, 1 << (4 + (Z << 1)));
            Z > 1 && n.readEG();
            for (let Pe = 0; Pe < Ne; Pe++) n.readEG();
          } else n.readUEG();
    n.readBoolean(),
      n.readBoolean(),
      n.readBoolean() &&
        (n.readUByte(), n.skipUEG(), n.skipUEG(), n.readBoolean());
    const W = n.readUEG();
    let F = 0;
    for (let Z = 0; Z < W; Z++) {
      let ie = !1;
      if ((Z !== 0 && (ie = n.readBoolean()), ie)) {
        Z === W && n.readUEG(), n.readBoolean(), n.readUEG();
        let Ne = 0;
        for (let Pe = 0; Pe <= F; Pe++) {
          const kt = n.readBoolean();
          let Gt = !1;
          kt || (Gt = n.readBoolean()), (kt || Gt) && Ne++;
        }
        F = Ne;
      } else {
        const Ne = n.readUEG(),
          Pe = n.readUEG();
        F = Ne + Pe;
        for (let kt = 0; kt < Ne; kt++) n.readUEG(), n.readBoolean();
        for (let kt = 0; kt < Pe; kt++) n.readUEG(), n.readBoolean();
      }
    }
    if (n.readBoolean()) {
      const Z = n.readUEG();
      for (let ie = 0; ie < Z; ie++) {
        for (let Ne = 0; Ne < L + 4; Ne++) n.readBits(1);
        n.readBits(1);
      }
    }
    let oe = 0,
      De = 1,
      Xe = 1,
      ze = !0,
      ht = 1,
      gt = 0;
    n.readBoolean(), n.readBoolean();
    let pt = !1;
    if (n.readBoolean()) {
      if (n.readBoolean()) {
        const Z = n.readUByte();
        Z > 0 && Z < 16
          ? ((De = [
              1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2,
            ][Z - 1]),
            (Xe = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1][
              Z - 1
            ]))
          : Z === 255 && ((De = n.readBits(16)), (Xe = n.readBits(16)));
      }
      if (
        (n.readBoolean() && n.readBoolean(),
        n.readBoolean() &&
          (n.readBits(3),
          n.readBoolean(),
          n.readBoolean() && (n.readUByte(), n.readUByte(), n.readUByte())),
        n.readBoolean() && (n.readUEG(), n.readUEG()),
        n.readBoolean(),
        n.readBoolean(),
        n.readBoolean(),
        (pt = n.readBoolean()),
        pt &&
          ((O += n.readUEG()),
          (X += n.readUEG()),
          (G += n.readUEG()),
          (H += n.readUEG())),
        n.readBoolean() &&
          ((ht = n.readBits(32)),
          (gt = n.readBits(32)),
          n.readBoolean() && n.readUEG(),
          n.readBoolean()))
      ) {
        const Z = n.readBoolean(),
          ie = n.readBoolean();
        let Ne = !1;
        (Z || ie) &&
          ((Ne = n.readBoolean()),
          Ne && (n.readUByte(), n.readBits(5), n.readBoolean(), n.readBits(5)),
          n.readBits(4),
          n.readBits(4),
          Ne && n.readBits(4),
          n.readBits(5),
          n.readBits(5),
          n.readBits(5));
        for (let Pe = 0; Pe <= r; Pe++) {
          ze = n.readBoolean();
          let kt = !1;
          ze || n.readBoolean() ? n.readEG() : (kt = n.readBoolean());
          const Gt = kt ? 1 : n.readUEG() + 1;
          if (Z)
            for (let B = 0; B < Gt; B++)
              n.readUEG(),
                n.readUEG(),
                Ne && (n.readUEG(), n.readUEG()),
                n.skipBits(1);
          if (ie)
            for (let B = 0; B < Gt; B++)
              n.readUEG(),
                n.readUEG(),
                Ne && (n.readUEG(), n.readUEG()),
                n.skipBits(1);
        }
      }
      n.readBoolean() &&
        (n.readBoolean(), n.readBoolean(), n.readBoolean(), (oe = n.readUEG()));
    }
    let $t = N,
      ot = P;
    if (I || pt) {
      let Z = 1,
        ie = 1;
      $ === 1 ? (Z = ie = 2) : $ == 2 && (Z = 2),
        ($t = N - Z * X - Z * O),
        (ot = P - ie * H - ie * G);
    }
    const tt = i ? ["A", "B", "C"][i] : "",
      He = (u << 24) | (c << 16) | (d << 8) | h;
    let de = 0;
    for (let Z = 0; Z < 32; Z++)
      de = (de | (((He >> Z) & 1) << (31 - Z))) >>> 0;
    let ue = de.toString(16);
    return (
      l === 1 && ue === "2" && (ue = "6"),
      {
        codecString: `hvc1.${tt}${l}.${ue}.${o ? "H" : "L"}${w}.B0`,
        params: {
          general_tier_flag: o,
          general_profile_idc: l,
          general_profile_space: i,
          general_profile_compatibility_flags: [u, c, d, h],
          general_constraint_indicator_flags: [f, p, g, y, v, b],
          general_level_idc: w,
          bit_depth: E + 8,
          bit_depth_luma_minus8: E,
          bit_depth_chroma_minus8: S,
          min_spatial_segmentation_idc: oe,
          chroma_format_idc: $,
          frame_rate: { fixed: ze, fps: gt / ht },
        },
        width: $t,
        height: ot,
        pixelRatio: [De, Xe],
      }
    );
  }
  readPPS(e) {
    const n = new x$(this.ebsp2rbsp(e));
    n.readUByte(),
      n.readUByte(),
      n.skipUEG(),
      n.skipUEG(),
      n.skipBits(2),
      n.skipBits(3),
      n.skipBits(2),
      n.skipUEG(),
      n.skipUEG(),
      n.skipEG(),
      n.skipBits(2),
      n.readBoolean() && n.skipUEG(),
      n.skipEG(),
      n.skipEG(),
      n.skipBits(4);
    const r = n.readBoolean(),
      i = n.readBoolean();
    let o = 1;
    return (
      i && r ? (o = 0) : i ? (o = 3) : r && (o = 2), { parallelismType: o }
    );
  }
  matchSPS(e, n) {
    return (
      String.fromCharCode.apply(null, e).substr(3) ===
      String.fromCharCode.apply(null, n).substr(3)
    );
  }
}
class _T {
  constructor(e, n, r, 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 = n),
      (this.typeSupported = r),
      (this.logger = i),
      (this.videoParser = null);
  }
  static probe(e, n) {
    const r = _T.syncOffset(e);
    return (
      r > 0 &&
        n.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),
      r !== -1
    );
  }
  static syncOffset(e) {
    const n = e.length;
    let r = Math.min(940, n - 188) + 1,
      i = 0;
    for (; i < r; ) {
      let o = !1,
        l = -1,
        u = 0;
      for (let c = i; c < n; c += 188) {
        if (e[c] !== 71 || (n - c != 188 && e[c + 188] !== 71)) {
          if (u) return -1;
          break;
        }
        if (
          (u++,
          l === -1 &&
            ((l = c), l !== 0 && (r = Math.min(l + 18612, e.length - 188) + 1)),
          o || (o = Vne(e, c) === 0),
          o && u > 1 && ((l === 0 && u > 2) || c + 188 > r))
        )
          return l;
      }
      i++;
    }
    return -1;
  }
  static createTrack(e, n) {
    return {
      container: e === "video" || e === "audio" ? "video/mp2t" : void 0,
      type: e,
      id: uje[e],
      pid: -1,
      inputTimeScale: 9e4,
      sequenceNumber: 0,
      samples: [],
      dropped: 0,
      duration: e === "audio" ? n : void 0,
    };
  }
  resetInitSegment(e, n, r, i) {
    (this.pmtParsed = !1),
      (this._pmtId = -1),
      (this._videoTrack = _T.createTrack("video")),
      (this._videoTrack.duration = i),
      (this._audioTrack = _T.createTrack("audio", i)),
      (this._id3Track = _T.createTrack("id3")),
      (this._txtTrack = _T.createTrack("text")),
      (this._audioTrack.segmentCodec = "aac"),
      (this.aacOverFlow = null),
      (this.remainderData = null),
      (this.audioCodec = n),
      (this.videoCodec = r);
  }
  resetTimeStamp() {}
  resetContiguity() {
    const { _audioTrack: e, _videoTrack: n, _id3Track: r } = this;
    e && (e.pesData = null),
      n && (n.pesData = null),
      r && (r.pesData = null),
      (this.aacOverFlow = null),
      (this.remainderData = null);
  }
  demux(e, n, r = !1, i = !1) {
    let o;
    r || (this.sampleAes = null);
    const l = this._videoTrack,
      u = this._audioTrack,
      c = this._id3Track,
      d = this._txtTrack;
    let h = l.pid,
      f = l.pesData,
      p = u.pid,
      g = c.pid,
      y = u.pesData,
      v = c.pesData,
      b = null,
      w = this.pmtParsed,
      k = this._pmtId,
      D = e.length;
    if (
      (this.remainderData &&
        ((D = (e = fm(this.remainderData, e)).length),
        (this.remainderData = null)),
      D < 188 && !i)
    )
      return (
        (this.remainderData = e),
        { audioTrack: u, videoTrack: l, id3Track: c, textTrack: d }
      );
    const $ = Math.max(0, _T.syncOffset(e));
    (D -= (D - $) % 188),
      D < e.byteLength &&
        !i &&
        (this.remainderData = new Uint8Array(
          e.buffer,
          D,
          e.buffer.byteLength - D
        ));
    let N = 0;
    for (let I = $; I < D; I += 188)
      if (e[I] === 71) {
        const O = !!(64 & e[I + 1]),
          X = Vne(e, I);
        let G;
        if ((48 & e[I + 3]) >> 4 > 1) {
          if (((G = I + 5 + e[I + 4]), G === I + 188)) continue;
        } else G = I + 4;
        switch (X) {
          case h:
            if (O) {
              if (f && (o = aw(f, this.logger))) {
                if (this.videoParser === null)
                  switch (l.segmentCodec) {
                    case "avc":
                      this.videoParser = new WRe();
                      break;
                    case "hevc":
                      this.videoParser = new KRe();
                  }
                this.videoParser !== null &&
                  this.videoParser.parsePES(l, d, o, !1);
              }
              f = { data: [], size: 0 };
            }
            f && (f.data.push(e.subarray(G, I + 188)), (f.size += I + 188 - G));
            break;
          case p:
            if (O) {
              if (y && (o = aw(y, this.logger)))
                switch (u.segmentCodec) {
                  case "aac":
                    this.parseAACPES(u, o);
                    break;
                  case "mp3":
                    this.parseMPEGPES(u, o);
                    break;
                  case "ac3":
                    this.parseAC3PES(u, o);
                }
              y = { data: [], size: 0 };
            }
            y && (y.data.push(e.subarray(G, I + 188)), (y.size += I + 188 - G));
            break;
          case g:
            O &&
              (v && (o = aw(v, this.logger)) && this.parseID3PES(c, o),
              (v = { data: [], size: 0 })),
              v &&
                (v.data.push(e.subarray(G, I + 188)), (v.size += I + 188 - G));
            break;
          case 0:
            O && (G += e[G] + 1), (k = this._pmtId = F$n(e, G));
            break;
          case k: {
            O && (G += e[G] + 1);
            const H = U$n(
              e,
              G,
              this.typeSupported,
              r,
              this.observer,
              this.logger
            );
            (h = H.videoPid),
              h > 0 && ((l.pid = h), (l.segmentCodec = H.segmentVideoCodec)),
              (p = H.audioPid),
              p > 0 && ((u.pid = p), (u.segmentCodec = H.segmentAudioCodec)),
              (g = H.id3Pid),
              g > 0 && (c.pid = g),
              b === null ||
                w ||
                (this.logger.warn(
                  `MPEG-TS PMT found at ${I} after unknown PID '${b}'. Backtracking to sync byte @${$} to parse all TS packets.`
                ),
                (b = null),
                (I = $ - 188)),
              (w = this.pmtParsed = !0);
            break;
          }
          case 17:
          case 8191:
            break;
          default:
            b = X;
        }
      } else N++;
    N > 0 &&
      zne(
        this.observer,
        new Error(`Found ${N} TS packet/s that do not start with 0x47`),
        void 0,
        this.logger
      ),
      (l.pesData = f),
      (u.pesData = y),
      (c.pesData = v);
    const P = { audioTrack: u, videoTrack: l, id3Track: c, textTrack: d };
    return i && this.extractRemainingSamples(P), P;
  }
  flush() {
    const { remainderData: e } = this;
    let n;
    return (
      (this.remainderData = null),
      (n = e
        ? this.demux(e, -1, !1, !0)
        : {
            videoTrack: this._videoTrack,
            audioTrack: this._audioTrack,
            id3Track: this._id3Track,
            textTrack: this._txtTrack,
          }),
      this.extractRemainingSamples(n),
      this.sampleAes ? this.decrypt(n, this.sampleAes) : n
    );
  }
  extractRemainingSamples(e) {
    const { audioTrack: n, videoTrack: r, id3Track: i, textTrack: o } = e,
      l = r.pesData,
      u = n.pesData,
      c = i.pesData;
    let d;
    if (l && (d = aw(l, this.logger))) {
      if (this.videoParser === null)
        switch (r.segmentCodec) {
          case "avc":
            this.videoParser = new WRe();
            break;
          case "hevc":
            this.videoParser = new KRe();
        }
      this.videoParser !== null &&
        (this.videoParser.parsePES(r, o, d, !0), (r.pesData = null));
    } else r.pesData = l;
    if (u && (d = aw(u, this.logger))) {
      switch (n.segmentCodec) {
        case "aac":
          this.parseAACPES(n, d);
          break;
        case "mp3":
          this.parseMPEGPES(n, d);
          break;
        case "ac3":
          this.parseAC3PES(n, d);
      }
      n.pesData = null;
    } else
      u != null &&
        u.size &&
        this.logger.log(
          "last AAC PES packet truncated,might overlap between fragments"
        ),
        (n.pesData = u);
    c && (d = aw(c, this.logger))
      ? (this.parseID3PES(i, d), (i.pesData = null))
      : (i.pesData = c);
  }
  demuxSampleAes(e, n, r) {
    const i = this.demux(e, r, !0, !this.config.progressive),
      o = (this.sampleAes = new N$n(this.observer, this.config, n));
    return this.decrypt(i, o);
  }
  decrypt(e, n) {
    return new Promise((r) => {
      const { audioTrack: i, videoTrack: o } = e;
      i.samples && i.segmentCodec === "aac"
        ? n.decryptAacSamples(i.samples, 0, () => {
            o.samples
              ? n.decryptAvcSamples(o.samples, 0, 0, () => {
                  r(e);
                })
              : r(e);
          })
        : o.samples &&
          n.decryptAvcSamples(o.samples, 0, 0, () => {
            r(e);
          });
    });
  }
  destroy() {
    this.observer && this.observer.removeAllListeners(),
      (this.config = this.logger = this.observer = null),
      (this.aacOverFlow =
        this.videoParser =
        this.remainderData =
        this.sampleAes =
          null),
      (this._videoTrack =
        this._audioTrack =
        this._id3Track =
        this._txtTrack =
          void 0);
  }
  parseAACPES(e, n) {
    let r = 0;
    const i = this.aacOverFlow;
    let o,
      l,
      u,
      c = n.data;
    if (i) {
      this.aacOverFlow = null;
      const f = i.missing,
        p = i.sample.unit.byteLength;
      if (f === -1) c = fm(i.sample.unit, c);
      else {
        const g = p - f;
        i.sample.unit.set(c.subarray(0, f), g),
          e.samples.push(i.sample),
          (r = i.missing);
      }
    }
    for (o = r, l = c.length; o < l - 1 && !g8(c, o); o++);
    if (o !== r) {
      let f;
      const p = o < l - 1;
      if (
        ((f = p
          ? `AAC PES did not start with ADTS header,offset:${o}`
          : "No ADTS header found in AAC PES"),
        zne(this.observer, new Error(f), p, this.logger),
        !p)
      )
        return;
    }
    if ((Dje(e, this.observer, c, o, this.audioCodec), n.pts !== void 0))
      u = n.pts;
    else {
      if (!i) return void this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");
      {
        const f = Pje(e.samplerate);
        u = i.sample.pts + f;
      }
    }
    let d,
      h = 0;
    for (; o < l; ) {
      if (((d = Mje(e, c, o, u, h)), (o += d.length), d.missing)) {
        this.aacOverFlow = d;
        break;
      }
      for (h++; o < l - 1 && !g8(c, o); o++);
    }
  }
  parseMPEGPES(e, n) {
    const r = n.data,
      i = r.length;
    let o = 0,
      l = 0;
    const u = n.pts;
    if (u !== void 0)
      for (; l < i; )
        if (Lje(r, l)) {
          const c = $je(e, r, l, u, o);
          if (!c) break;
          (l += c.length), o++;
        } else l++;
    else this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");
  }
  parseAC3PES(e, n) {
    {
      const r = n.data,
        i = n.pts;
      if (i === void 0)
        return void this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");
      const o = r.length;
      let l,
        u = 0,
        c = 0;
      for (; c < o && (l = Nje(e, r, c, i, u++)) > 0; ) c += l;
    }
  }
  parseID3PES(e, n) {
    if (n.pts === void 0)
      return void this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");
    const r = du({}, n, {
      type: this._videoTrack ? nD.emsg : nD.audioId3,
      duration: Number.POSITIVE_INFINITY,
    });
    e.samples.push(r);
  }
}
function Vne(t, e) {
  return ((31 & t[e + 1]) << 8) + t[e + 2];
}
function F$n(t, e) {
  return ((31 & t[e + 10]) << 8) | t[e + 11];
}
function U$n(t, e, n, r, i, o) {
  const l = {
      audioPid: -1,
      videoPid: -1,
      id3Pid: -1,
      segmentVideoCodec: "avc",
      segmentAudioCodec: "aac",
    },
    u = e + 3 + (((15 & t[e + 1]) << 8) | t[e + 2]) - 4;
  for (e += 12 + (((15 & t[e + 10]) << 8) | t[e + 11]); e < u; ) {
    const c = Vne(t, e),
      d = ((15 & t[e + 3]) << 8) | t[e + 4];
    switch (t[e]) {
      case 207:
        if (!r) {
          iK("ADTS AAC", o);
          break;
        }
      case 15:
        l.audioPid === -1 && (l.audioPid = c);
        break;
      case 21:
        l.id3Pid === -1 && (l.id3Pid = c);
        break;
      case 219:
        if (!r) {
          iK("H.264", o);
          break;
        }
      case 27:
        l.videoPid === -1 && ((l.videoPid = c), (l.segmentVideoCodec = "avc"));
        break;
      case 3:
      case 4:
        n.mpeg || n.mp3
          ? l.audioPid === -1 &&
            ((l.audioPid = c), (l.segmentAudioCodec = "mp3"))
          : o.log("MPEG audio found, not supported in this browser");
        break;
      case 193:
        if (!r) {
          iK("AC-3", o);
          break;
        }
      case 129:
        n.ac3
          ? l.audioPid === -1 &&
            ((l.audioPid = c), (l.segmentAudioCodec = "ac3"))
          : o.log("AC-3 audio found, not supported in this browser");
        break;
      case 6:
        if (l.audioPid === -1 && d > 0) {
          let h = e + 5,
            f = d;
          for (; f > 2; ) {
            t[h] === 106 &&
              (n.ac3 !== !0
                ? o.log(
                    "AC-3 audio found, not supported in this browser for now"
                  )
                : ((l.audioPid = c), (l.segmentAudioCodec = "ac3")));
            const p = t[h + 1] + 2;
            (h += p), (f -= p);
          }
        }
        break;
      case 194:
      case 135:
        return (
          zne(i, new Error("Unsupported EC-3 in M2TS found"), void 0, o), l
        );
      case 36:
        l.videoPid === -1 &&
          ((l.videoPid = c),
          (l.segmentVideoCodec = "hevc"),
          o.log("HEVC in M2TS found"));
    }
    e += d + 5;
  }
  return l;
}
function zne(t, e, n, r) {
  r.warn(`parsing error: ${e.message}`),
    t.emit(Tt.ERROR, Tt.ERROR, {
      type: ro.MEDIA_ERROR,
      details: Ir.FRAG_PARSING_ERROR,
      fatal: !1,
      levelRetry: n,
      error: e,
      reason: e.message,
    });
}
function iK(t, e) {
  e.log(`${t} with AES-128-CBC encryption found in unencrypted stream`);
}
function aw(t, e) {
  let n,
    r,
    i,
    o,
    l,
    u = 0;
  const c = t.data;
  if (!t || t.size === 0) return null;
  for (; c[0].length < 19 && c.length > 1; )
    (c[0] = fm(c[0], c[1])), c.splice(1, 1);
  if (((n = c[0]), (n[0] << 16) + (n[1] << 8) + n[2] === 1)) {
    if (((r = (n[4] << 8) + n[5]), r && r > t.size - 6)) return null;
    const d = n[7];
    192 & d &&
      ((o =
        536870912 * (14 & n[9]) +
        4194304 * (255 & n[10]) +
        16384 * (254 & n[11]) +
        128 * (255 & n[12]) +
        (254 & n[13]) / 2),
      64 & d
        ? ((l =
            536870912 * (14 & n[14]) +
            4194304 * (255 & n[15]) +
            16384 * (254 & n[16]) +
            128 * (255 & n[17]) +
            (254 & n[18]) / 2),
          o - l > 54e5 &&
            (e.warn(
              `${Math.round(
                (o - l) / 9e4
              )}s delta between PTS and DTS, align them`
            ),
            (o = l)))
        : (l = o)),
      (i = n[8]);
    let h = i + 9;
    if (t.size <= h) return null;
    t.size -= h;
    const f = new Uint8Array(t.size);
    for (let p = 0, g = c.length; p < g; p++) {
      n = c[p];
      let y = n.byteLength;
      if (h) {
        if (h > y) {
          h -= y;
          continue;
        }
        (n = n.subarray(h)), (y -= h), (h = 0);
      }
      f.set(n, u), (u += y);
    }
    return r && (r -= i + 3), { data: f, pts: o, dts: l, len: r };
  }
  return null;
}
let B$n = class {
  static getSilentFrame(t, e) {
    if (t === "mp4a.40.2") {
      if (e === 1) return new Uint8Array([0, 200, 0, 128, 35, 128]);
      if (e === 2) return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
      if (e === 3)
        return new Uint8Array([
          0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142,
        ]);
      if (e === 4)
        return new Uint8Array([
          0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128, 8, 2, 56,
        ]);
      if (e === 5)
        return new Uint8Array([
          0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33,
          144, 2, 56,
        ]);
      if (e === 6)
        return new Uint8Array([
          0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33,
          144, 2, 0, 178, 0, 32, 8, 224,
        ]);
    } else {
      if (e === 1)
        return new Uint8Array([
          1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6, 241, 193,
          10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
          90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
          90, 90, 90, 90, 90, 90, 90, 94,
        ]);
      if (e === 2)
        return new Uint8Array([
          1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241,
          161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
          90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
          90, 90, 90, 90, 90, 90, 94,
        ]);
      if (e === 3)
        return new Uint8Array([
          1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241,
          161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
          90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
          90, 90, 90, 90, 90, 90, 94,
        ]);
    }
  }
};
const Z_ = Math.pow(2, 32) - 1;
let Ad = class Nn {
  static init() {
    let e;
    for (e in ((Nn.types = {
      avc1: [],
      avcC: [],
      hvc1: [],
      hvcC: [],
      btrt: [],
      dinf: [],
      dref: [],
      esds: [],
      ftyp: [],
      hdlr: [],
      mdat: [],
      mdhd: [],
      mdia: [],
      mfhd: [],
      minf: [],
      moof: [],
      moov: [],
      mp4a: [],
      ".mp3": [],
      dac3: [],
      "ac-3": [],
      mvex: [],
      mvhd: [],
      pasp: [],
      sdtp: [],
      stbl: [],
      stco: [],
      stsc: [],
      stsd: [],
      stsz: [],
      stts: [],
      tfdt: [],
      tfhd: [],
      traf: [],
      trak: [],
      trun: [],
      trex: [],
      tkhd: [],
      vmhd: [],
      smhd: [],
    }),
    Nn.types))
      Nn.types.hasOwnProperty(e) &&
        (Nn.types[e] = [
          e.charCodeAt(0),
          e.charCodeAt(1),
          e.charCodeAt(2),
          e.charCodeAt(3),
        ]);
    const n = new Uint8Array([
        0, 0, 0, 0, 0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108, 101, 114, 0,
      ]),
      r = new Uint8Array([
        0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0,
      ]);
    Nn.HDLR_TYPES = { video: n, audio: r };
    const i = new Uint8Array([
        0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1,
      ]),
      o = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]);
    (Nn.STTS = Nn.STSC = Nn.STCO = o),
      (Nn.STSZ = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])),
      (Nn.VMHD = new Uint8Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0])),
      (Nn.SMHD = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0])),
      (Nn.STSD = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]));
    const l = new Uint8Array([105, 115, 111, 109]),
      u = new Uint8Array([97, 118, 99, 49]),
      c = new Uint8Array([0, 0, 0, 1]);
    (Nn.FTYP = Nn.box(Nn.types.ftyp, l, c, l, u)),
      (Nn.DINF = Nn.box(Nn.types.dinf, Nn.box(Nn.types.dref, i)));
  }
  static box(e, ...n) {
    let r = 8,
      i = n.length;
    const o = i;
    for (; i--; ) r += n[i].byteLength;
    const l = new Uint8Array(r);
    for (
      l[0] = (r >> 24) & 255,
        l[1] = (r >> 16) & 255,
        l[2] = (r >> 8) & 255,
        l[3] = 255 & r,
        l.set(e, 4),
        i = 0,
        r = 8;
      i < o;
      i++
    )
      l.set(n[i], r), (r += n[i].byteLength);
    return l;
  }
  static hdlr(e) {
    return Nn.box(Nn.types.hdlr, Nn.HDLR_TYPES[e]);
  }
  static mdat(e) {
    return Nn.box(Nn.types.mdat, e);
  }
  static mdhd(e, n) {
    n *= e;
    const r = Math.floor(n / (Z_ + 1)),
      i = Math.floor(n % (Z_ + 1));
    return Nn.box(
      Nn.types.mdhd,
      new Uint8Array([
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        2,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        3,
        (e >> 24) & 255,
        (e >> 16) & 255,
        (e >> 8) & 255,
        255 & e,
        r >> 24,
        (r >> 16) & 255,
        (r >> 8) & 255,
        255 & r,
        i >> 24,
        (i >> 16) & 255,
        (i >> 8) & 255,
        255 & i,
        85,
        196,
        0,
        0,
      ])
    );
  }
  static mdia(e) {
    return Nn.box(
      Nn.types.mdia,
      Nn.mdhd(e.timescale, e.duration),
      Nn.hdlr(e.type),
      Nn.minf(e)
    );
  }
  static mfhd(e) {
    return Nn.box(
      Nn.types.mfhd,
      new Uint8Array([
        0,
        0,
        0,
        0,
        e >> 24,
        (e >> 16) & 255,
        (e >> 8) & 255,
        255 & e,
      ])
    );
  }
  static minf(e) {
    return e.type === "audio"
      ? Nn.box(
          Nn.types.minf,
          Nn.box(Nn.types.smhd, Nn.SMHD),
          Nn.DINF,
          Nn.stbl(e)
        )
      : Nn.box(
          Nn.types.minf,
          Nn.box(Nn.types.vmhd, Nn.VMHD),
          Nn.DINF,
          Nn.stbl(e)
        );
  }
  static moof(e, n, r) {
    return Nn.box(Nn.types.moof, Nn.mfhd(e), Nn.traf(r, n));
  }
  static moov(e) {
    let n = e.length;
    const r = [];
    for (; n--; ) r[n] = Nn.trak(e[n]);
    return Nn.box.apply(
      null,
      [Nn.types.moov, Nn.mvhd(e[0].timescale, e[0].duration)]
        .concat(r)
        .concat(Nn.mvex(e))
    );
  }
  static mvex(e) {
    let n = e.length;
    const r = [];
    for (; n--; ) r[n] = Nn.trex(e[n]);
    return Nn.box.apply(null, [Nn.types.mvex, ...r]);
  }
  static mvhd(e, n) {
    n *= e;
    const r = Math.floor(n / (Z_ + 1)),
      i = Math.floor(n % (Z_ + 1)),
      o = new Uint8Array([
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        2,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        3,
        (e >> 24) & 255,
        (e >> 16) & 255,
        (e >> 8) & 255,
        255 & e,
        r >> 24,
        (r >> 16) & 255,
        (r >> 8) & 255,
        255 & r,
        i >> 24,
        (i >> 16) & 255,
        (i >> 8) & 255,
        255 & i,
        0,
        1,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        64,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        255,
        255,
        255,
        255,
      ]);
    return Nn.box(Nn.types.mvhd, o);
  }
  static sdtp(e) {
    const n = e.samples || [],
      r = new Uint8Array(4 + n.length);
    let i, o;
    for (i = 0; i < n.length; i++)
      (o = n[i].flags),
        (r[i + 4] =
          (o.dependsOn << 4) | (o.isDependedOn << 2) | o.hasRedundancy);
    return Nn.box(Nn.types.sdtp, r);
  }
  static stbl(e) {
    return Nn.box(
      Nn.types.stbl,
      Nn.stsd(e),
      Nn.box(Nn.types.stts, Nn.STTS),
      Nn.box(Nn.types.stsc, Nn.STSC),
      Nn.box(Nn.types.stsz, Nn.STSZ),
      Nn.box(Nn.types.stco, Nn.STCO)
    );
  }
  static avc1(e) {
    let n,
      r,
      i,
      o = [],
      l = [];
    for (n = 0; n < e.sps.length; n++)
      (r = e.sps[n]),
        (i = r.byteLength),
        o.push((i >>> 8) & 255),
        o.push(255 & i),
        (o = o.concat(Array.prototype.slice.call(r)));
    for (n = 0; n < e.pps.length; n++)
      (r = e.pps[n]),
        (i = r.byteLength),
        l.push((i >>> 8) & 255),
        l.push(255 & i),
        (l = l.concat(Array.prototype.slice.call(r)));
    const u = Nn.box(
        Nn.types.avcC,
        new Uint8Array(
          [1, o[3], o[4], o[5], 255, 224 | e.sps.length]
            .concat(o)
            .concat([e.pps.length])
            .concat(l)
        )
      ),
      c = e.width,
      d = e.height,
      h = e.pixelRatio[0],
      f = e.pixelRatio[1];
    return Nn.box(
      Nn.types.avc1,
      new Uint8Array([
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        (c >> 8) & 255,
        255 & c,
        (d >> 8) & 255,
        255 & d,
        0,
        72,
        0,
        0,
        0,
        72,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        18,
        100,
        97,
        105,
        108,
        121,
        109,
        111,
        116,
        105,
        111,
        110,
        47,
        104,
        108,
        115,
        46,
        106,
        115,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        24,
        17,
        17,
      ]),
      u,
      Nn.box(
        Nn.types.btrt,
        new Uint8Array([0, 28, 156, 128, 0, 45, 198, 192, 0, 45, 198, 192])
      ),
      Nn.box(
        Nn.types.pasp,
        new Uint8Array([
          h >> 24,
          (h >> 16) & 255,
          (h >> 8) & 255,
          255 & h,
          f >> 24,
          (f >> 16) & 255,
          (f >> 8) & 255,
          255 & f,
        ])
      )
    );
  }
  static esds(e) {
    const n = e.config;
    return new Uint8Array([
      0,
      0,
      0,
      0,
      3,
      25,
      0,
      1,
      0,
      4,
      17,
      64,
      21,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      5,
      2,
      ...n,
      6,
      1,
      2,
    ]);
  }
  static audioStsd(e) {
    const n = e.samplerate;
    return new Uint8Array([
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      1,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      e.channelCount,
      0,
      16,
      0,
      0,
      0,
      0,
      (n >> 8) & 255,
      255 & n,
      0,
      0,
    ]);
  }
  static mp4a(e) {
    return Nn.box(
      Nn.types.mp4a,
      Nn.audioStsd(e),
      Nn.box(Nn.types.esds, Nn.esds(e))
    );
  }
  static mp3(e) {
    return Nn.box(Nn.types[".mp3"], Nn.audioStsd(e));
  }
  static ac3(e) {
    return Nn.box(
      Nn.types["ac-3"],
      Nn.audioStsd(e),
      Nn.box(Nn.types.dac3, e.config)
    );
  }
  static stsd(e) {
    return e.type === "audio"
      ? e.segmentCodec === "mp3" && e.codec === "mp3"
        ? Nn.box(Nn.types.stsd, Nn.STSD, Nn.mp3(e))
        : e.segmentCodec === "ac3"
        ? Nn.box(Nn.types.stsd, Nn.STSD, Nn.ac3(e))
        : Nn.box(Nn.types.stsd, Nn.STSD, Nn.mp4a(e))
      : e.segmentCodec === "avc"
      ? Nn.box(Nn.types.stsd, Nn.STSD, Nn.avc1(e))
      : Nn.box(Nn.types.stsd, Nn.STSD, Nn.hvc1(e));
  }
  static tkhd(e) {
    const n = e.id,
      r = e.duration * e.timescale,
      i = e.width,
      o = e.height,
      l = Math.floor(r / (Z_ + 1)),
      u = Math.floor(r % (Z_ + 1));
    return Nn.box(
      Nn.types.tkhd,
      new Uint8Array([
        1,
        0,
        0,
        7,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        2,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        3,
        (n >> 24) & 255,
        (n >> 16) & 255,
        (n >> 8) & 255,
        255 & n,
        0,
        0,
        0,
        0,
        l >> 24,
        (l >> 16) & 255,
        (l >> 8) & 255,
        255 & l,
        u >> 24,
        (u >> 16) & 255,
        (u >> 8) & 255,
        255 & u,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        64,
        0,
        0,
        0,
        (i >> 8) & 255,
        255 & i,
        0,
        0,
        (o >> 8) & 255,
        255 & o,
        0,
        0,
      ])
    );
  }
  static traf(e, n) {
    const r = Nn.sdtp(e),
      i = e.id,
      o = Math.floor(n / (Z_ + 1)),
      l = Math.floor(n % (Z_ + 1));
    return Nn.box(
      Nn.types.traf,
      Nn.box(
        Nn.types.tfhd,
        new Uint8Array([
          0,
          0,
          0,
          0,
          i >> 24,
          (i >> 16) & 255,
          (i >> 8) & 255,
          255 & i,
        ])
      ),
      Nn.box(
        Nn.types.tfdt,
        new Uint8Array([
          1,
          0,
          0,
          0,
          o >> 24,
          (o >> 16) & 255,
          (o >> 8) & 255,
          255 & o,
          l >> 24,
          (l >> 16) & 255,
          (l >> 8) & 255,
          255 & l,
        ])
      ),
      Nn.trun(e, r.length + 16 + 20 + 8 + 16 + 8 + 8),
      r
    );
  }
  static trak(e) {
    return (
      (e.duration = e.duration || 4294967295),
      Nn.box(Nn.types.trak, Nn.tkhd(e), Nn.mdia(e))
    );
  }
  static trex(e) {
    const n = e.id;
    return Nn.box(
      Nn.types.trex,
      new Uint8Array([
        0,
        0,
        0,
        0,
        n >> 24,
        (n >> 16) & 255,
        (n >> 8) & 255,
        255 & n,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        1,
      ])
    );
  }
  static trun(e, n) {
    const r = e.samples || [],
      i = r.length,
      o = 12 + 16 * i,
      l = new Uint8Array(o);
    let u, c, d, h, f, p;
    for (
      n += 8 + o,
        l.set(
          [
            e.type === "video" ? 1 : 0,
            0,
            15,
            1,
            (i >>> 24) & 255,
            (i >>> 16) & 255,
            (i >>> 8) & 255,
            255 & i,
            (n >>> 24) & 255,
            (n >>> 16) & 255,
            (n >>> 8) & 255,
            255 & n,
          ],
          0
        ),
        u = 0;
      u < i;
      u++
    )
      (c = r[u]),
        (d = c.duration),
        (h = c.size),
        (f = c.flags),
        (p = c.cts),
        l.set(
          [
            (d >>> 24) & 255,
            (d >>> 16) & 255,
            (d >>> 8) & 255,
            255 & d,
            (h >>> 24) & 255,
            (h >>> 16) & 255,
            (h >>> 8) & 255,
            255 & h,
            (f.isLeading << 2) | f.dependsOn,
            (f.isDependedOn << 6) |
              (f.hasRedundancy << 4) |
              (f.paddingValue << 1) |
              f.isNonSync,
            61440 & f.degradPrio,
            15 & f.degradPrio,
            (p >>> 24) & 255,
            (p >>> 16) & 255,
            (p >>> 8) & 255,
            255 & p,
          ],
          12 + 16 * u
        );
    return Nn.box(Nn.types.trun, l);
  }
  static initSegment(e) {
    Nn.types || Nn.init();
    const n = Nn.moov(e);
    return fm(Nn.FTYP, n);
  }
  static hvc1(e) {
    const n = e.params,
      r = [e.vps, e.sps, e.pps],
      i = new Uint8Array([
        1,
        (n.general_profile_space << 6) |
          (n.general_tier_flag ? 32 : 0) |
          n.general_profile_idc,
        n.general_profile_compatibility_flags[0],
        n.general_profile_compatibility_flags[1],
        n.general_profile_compatibility_flags[2],
        n.general_profile_compatibility_flags[3],
        n.general_constraint_indicator_flags[0],
        n.general_constraint_indicator_flags[1],
        n.general_constraint_indicator_flags[2],
        n.general_constraint_indicator_flags[3],
        n.general_constraint_indicator_flags[4],
        n.general_constraint_indicator_flags[5],
        n.general_level_idc,
        240 | (n.min_spatial_segmentation_idc >> 8),
        255 & n.min_spatial_segmentation_idc,
        252 | n.parallelismType,
        252 | n.chroma_format_idc,
        248 | n.bit_depth_luma_minus8,
        248 | n.bit_depth_chroma_minus8,
        0,
        parseInt(n.frame_rate.fps),
        3 |
          (n.temporal_id_nested << 2) |
          (n.num_temporal_layers << 3) |
          (n.frame_rate.fixed ? 64 : 0),
        r.length,
      ]);
    let o = i.length;
    for (let g = 0; g < r.length; g += 1) {
      o += 3;
      for (let y = 0; y < r[g].length; y += 1) o += 2 + r[g][y].length;
    }
    const l = new Uint8Array(o);
    l.set(i, 0), (o = i.length);
    const u = r.length - 1;
    for (let g = 0; g < r.length; g += 1) {
      l.set(
        new Uint8Array([(32 + g) | (g === u ? 128 : 0), 0, r[g].length]),
        o
      ),
        (o += 3);
      for (let y = 0; y < r[g].length; y += 1)
        l.set(new Uint8Array([r[g][y].length >> 8, 255 & r[g][y].length]), o),
          (o += 2),
          l.set(r[g][y], o),
          (o += r[g][y].length);
    }
    const c = Nn.box(Nn.types.hvcC, l),
      d = e.width,
      h = e.height,
      f = e.pixelRatio[0],
      p = e.pixelRatio[1];
    return Nn.box(
      Nn.types.hvc1,
      new Uint8Array([
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        (d >> 8) & 255,
        255 & d,
        (h >> 8) & 255,
        255 & h,
        0,
        72,
        0,
        0,
        0,
        72,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1,
        18,
        100,
        97,
        105,
        108,
        121,
        109,
        111,
        116,
        105,
        111,
        110,
        47,
        104,
        108,
        115,
        46,
        106,
        115,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        24,
        17,
        17,
      ]),
      c,
      Nn.box(
        Nn.types.btrt,
        new Uint8Array([0, 28, 156, 128, 0, 45, 198, 192, 0, 45, 198, 192])
      ),
      Nn.box(
        Nn.types.pasp,
        new Uint8Array([
          f >> 24,
          (f >> 16) & 255,
          (f >> 8) & 255,
          255 & f,
          p >> 24,
          (p >> 16) & 255,
          (p >> 8) & 255,
          255 & p,
        ])
      )
    );
  }
};
(Ad.types = void 0),
  (Ad.HDLR_TYPES = void 0),
  (Ad.STTS = void 0),
  (Ad.STSC = void 0),
  (Ad.STCO = void 0),
  (Ad.STSZ = void 0),
  (Ad.VMHD = void 0),
  (Ad.SMHD = void 0),
  (Ad.STSD = void 0),
  (Ad.FTYP = void 0),
  (Ad.DINF = void 0);
const Uje = 9e4;
function Hue(t, e, n = 1, r = !1) {
  const i = t * e * n;
  return r ? Math.round(i) : i;
}
function H$n(t, e, n = 1, r = !1) {
  return Hue(t, e, 1 / n, r);
}
function pM(t, e = !1) {
  return Hue(t, 1e3, 1 / Uje, e);
}
function X$n(t, e = 1) {
  return Hue(t, Uje, 1 / e);
}
let T1,
  ow = null,
  aK = null,
  jF = class {
    constructor(t, e, n, r) {
      if (
        ((this.logger = void 0),
        (this.observer = void 0),
        (this.config = void 0),
        (this.typeSupported = void 0),
        (this.ISGenerated = !1),
        (this._initPTS = null),
        (this._initDTS = null),
        (this.nextAvcDts = null),
        (this.nextAudioPts = null),
        (this.videoSampleDuration = null),
        (this.isAudioContiguous = !1),
        (this.isVideoContiguous = !1),
        (this.videoTrackConfig = void 0),
        (this.observer = t),
        (this.config = e),
        (this.typeSupported = n),
        (this.logger = r),
        (this.ISGenerated = !1),
        ow === null)
      ) {
        const i = (navigator.userAgent || "").match(/Chrome\/(\d+)/i);
        ow = i ? parseInt(i[1]) : 0;
      }
      if (aK === null) {
        const i = navigator.userAgent.match(/Safari\/(\d+)/i);
        aK = i ? parseInt(i[1]) : 0;
      }
    }
    destroy() {
      this.config =
        this.videoTrackConfig =
        this._initPTS =
        this._initDTS =
          null;
    }
    resetTimeStamp(t) {
      this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),
        (this._initPTS = this._initDTS = t);
    }
    resetNextTimestamp() {
      this.logger.log("[mp4-remuxer]: reset next timestamp"),
        (this.isVideoContiguous = !1),
        (this.isAudioContiguous = !1);
    }
    resetInitSegment() {
      this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),
        (this.ISGenerated = !1),
        (this.videoTrackConfig = void 0);
    }
    getVideoStartPts(t) {
      let e = !1;
      const n = t[0].pts,
        r = t.reduce((i, o) => {
          let l = o.pts,
            u = l - i;
          return (
            u < -4294967296 && ((e = !0), (l = Kg(l, n)), (u = l - i)),
            u > 0 ? i : l
          );
        }, n);
      return e && this.logger.debug("PTS rollover detected"), r;
    }
    remux(t, e, n, r, i, o, l, u) {
      let c,
        d,
        h,
        f,
        p,
        g,
        y = i,
        v = i;
      const b = t.pid > -1,
        w = e.pid > -1,
        k = e.samples.length,
        D = t.samples.length > 0,
        $ = (l && k > 0) || k > 1;
      if (((!b || D) && (!w || $)) || this.ISGenerated || l) {
        if (this.ISGenerated) {
          var N, P, I, O;
          const E = this.videoTrackConfig;
          ((E &&
            (e.width !== E.width ||
              e.height !== E.height ||
              ((N = e.pixelRatio) == null ? void 0 : N[0]) !==
                ((P = E.pixelRatio) == null ? void 0 : P[0]) ||
              ((I = e.pixelRatio) == null ? void 0 : I[1]) !==
                ((O = E.pixelRatio) == null ? void 0 : O[1]))) ||
            (!E && $) ||
            (this.nextAudioPts === null && D)) &&
            this.resetInitSegment();
        }
        this.ISGenerated || (h = this.generateIS(t, e, i, o));
        const X = this.isVideoContiguous;
        let G,
          H = -1;
        if (
          $ &&
          ((H = V$n(e.samples)), !X && this.config.forceKeyFrameOnDiscontinuity)
        )
          if (((g = !0), H > 0)) {
            this.logger.warn(
              `[mp4-remuxer]: Dropped ${H} out of ${k} video samples due to a missing keyframe`
            );
            const E = this.getVideoStartPts(e.samples);
            (e.samples = e.samples.slice(H)),
              (e.dropped += H),
              (v += (e.samples[0].pts - E) / e.inputTimeScale),
              (G = v);
          } else
            H === -1 &&
              (this.logger.warn(
                `[mp4-remuxer]: No keyframe found out of ${k} video samples`
              ),
              (g = !1));
        if (this.ISGenerated) {
          if (D && $) {
            const E = this.getVideoStartPts(e.samples),
              S = (Kg(t.samples[0].pts, E) - E) / e.inputTimeScale;
            (y += Math.max(0, S)), (v += Math.max(0, -S));
          }
          if (D) {
            if (
              (t.samplerate ||
                (this.logger.warn(
                  "[mp4-remuxer]: regenerate InitSegment as audio detected"
                ),
                (h = this.generateIS(t, e, i, o))),
              (d = this.remuxAudio(
                t,
                y,
                this.isAudioContiguous,
                o,
                w || $ || u === ko.AUDIO ? v : void 0
              )),
              $)
            ) {
              const E = d ? d.endPTS - d.startPTS : 0;
              e.inputTimeScale ||
                (this.logger.warn(
                  "[mp4-remuxer]: regenerate InitSegment as video detected"
                ),
                (h = this.generateIS(t, e, i, o))),
                (c = this.remuxVideo(e, v, X, E));
            }
          } else $ && (c = this.remuxVideo(e, v, X, 0));
          c &&
            ((c.firstKeyFrame = H),
            (c.independent = H !== -1),
            (c.firstKeyFramePTS = G));
        }
      }
      return (
        this.ISGenerated &&
          this._initPTS &&
          this._initDTS &&
          (n.samples.length && (p = Bje(n, i, this._initPTS, this._initDTS)),
          r.samples.length && (f = Hje(r, i, this._initPTS))),
        { audio: d, video: c, initSegment: h, independent: g, text: f, id3: p }
      );
    }
    generateIS(t, e, n, r) {
      const i = t.samples,
        o = e.samples,
        l = this.typeSupported,
        u = {},
        c = this._initPTS;
      let d,
        h,
        f,
        p = !c || r,
        g = "audio/mp4";
      if ((p && (d = h = 1 / 0), t.config && i.length)) {
        switch (((t.timescale = t.samplerate), t.segmentCodec)) {
          case "mp3":
            l.mpeg
              ? ((g = "audio/mpeg"), (t.codec = ""))
              : l.mp3 && (t.codec = "mp3");
            break;
          case "ac3":
            t.codec = "ac-3";
        }
        (u.audio = {
          id: "audio",
          container: g,
          codec: t.codec,
          initSegment:
            t.segmentCodec === "mp3" && l.mpeg
              ? new Uint8Array(0)
              : Ad.initSegment([t]),
          metadata: { channelCount: t.channelCount },
        }),
          p &&
            ((f = t.inputTimeScale),
            c && f === c.timescale
              ? (p = !1)
              : (d = h = i[0].pts - Math.round(f * n)));
      }
      if (e.sps && e.pps && o.length) {
        if (
          ((e.timescale = e.inputTimeScale),
          (u.video = {
            id: "main",
            container: "video/mp4",
            codec: e.codec,
            initSegment: Ad.initSegment([e]),
            metadata: { width: e.width, height: e.height },
          }),
          p)
        )
          if (((f = e.inputTimeScale), c && f === c.timescale)) p = !1;
          else {
            const y = this.getVideoStartPts(o),
              v = Math.round(f * n);
            (h = Math.min(h, Kg(o[0].dts, y) - v)), (d = Math.min(d, y - v));
          }
        this.videoTrackConfig = {
          width: e.width,
          height: e.height,
          pixelRatio: e.pixelRatio,
        };
      }
      if (Object.keys(u).length)
        return (
          (this.ISGenerated = !0),
          p
            ? ((this._initPTS = { baseTime: d, timescale: f }),
              (this._initDTS = { baseTime: h, timescale: f }))
            : (d = f = void 0),
          { tracks: u, initPTS: d, timescale: f }
        );
    }
    remuxVideo(t, e, n, r) {
      const i = t.inputTimeScale,
        o = t.samples,
        l = [],
        u = o.length,
        c = this._initPTS;
      let d,
        h,
        f = this.nextAvcDts,
        p = 8,
        g = this.videoSampleDuration,
        y = Number.POSITIVE_INFINITY,
        v = Number.NEGATIVE_INFINITY,
        b = !1;
      if (!n || f === null) {
        const F = e * i,
          oe = o[0].pts - Kg(o[0].dts, o[0].pts);
        ow && f !== null && Math.abs(F - oe - f) < 15e3
          ? (n = !0)
          : (f = F - oe);
      }
      const w = (c.baseTime * i) / c.timescale;
      for (let F = 0; F < u; F++) {
        const oe = o[F];
        (oe.pts = Kg(oe.pts - w, f)),
          (oe.dts = Kg(oe.dts - w, f)),
          oe.dts < o[F > 0 ? F - 1 : F].dts && (b = !0);
      }
      b &&
        o.sort(function (F, oe) {
          const De = F.dts - oe.dts,
            Xe = F.pts - oe.pts;
          return De || Xe;
        }),
        (d = o[0].dts),
        (h = o[o.length - 1].dts);
      const k = h - d,
        D = k ? Math.round(k / (u - 1)) : g || t.inputTimeScale / 30;
      if (n) {
        const F = d - f,
          oe = F > D,
          De = F < -1;
        if (
          (oe || De) &&
          (oe
            ? this.logger.warn(
                `${(t.segmentCodec || "").toUpperCase()}: ${pM(
                  F,
                  !0
                )} ms (${F}dts) hole between fragments detected at ${e.toFixed(
                  3
                )}`
              )
            : this.logger.warn(
                `${(t.segmentCodec || "").toUpperCase()}: ${pM(
                  -F,
                  !0
                )} ms (${F}dts) overlapping between fragments detected at ${e.toFixed(
                  3
                )}`
              ),
          !De || f >= o[0].pts || ow)
        ) {
          d = f;
          const Xe = o[0].pts - F;
          if (oe) (o[0].dts = d), (o[0].pts = Xe);
          else {
            let ze = !0;
            for (let ht = 0; ht < o.length && !(o[ht].dts > Xe && ze); ht++) {
              const gt = o[ht].pts;
              if (((o[ht].dts -= F), (o[ht].pts -= F), ht < o.length - 1)) {
                const pt = o[ht + 1].pts;
                ze = pt <= o[ht].pts == pt <= gt;
              }
            }
          }
          this.logger.log(
            `Video: Initial PTS/DTS adjusted: ${pM(Xe, !0)}/${pM(
              d,
              !0
            )}, delta: ${pM(F, !0)} ms`
          );
        }
      }
      d = Math.max(0, d);
      let $ = 0,
        N = 0,
        P = d;
      for (let F = 0; F < u; F++) {
        const oe = o[F],
          De = oe.units,
          Xe = De.length;
        let ze = 0;
        for (let ht = 0; ht < Xe; ht++) ze += De[ht].data.length;
        (N += ze),
          ($ += Xe),
          (oe.length = ze),
          oe.dts < P ? ((oe.dts = P), (P += (D / 4) | 0 || 1)) : (P = oe.dts),
          (y = Math.min(oe.pts, y)),
          (v = Math.max(oe.pts, v));
      }
      h = o[u - 1].dts;
      const I = N + 4 * $ + 8;
      let O;
      try {
        O = new Uint8Array(I);
      } catch (F) {
        return void this.observer.emit(Tt.ERROR, Tt.ERROR, {
          type: ro.MUX_ERROR,
          details: Ir.REMUX_ALLOC_ERROR,
          fatal: !1,
          error: F,
          bytes: I,
          reason: `fail allocating video mdat ${I}`,
        });
      }
      const X = new DataView(O.buffer);
      X.setUint32(0, I), O.set(Ad.types.mdat, 4);
      let G = !1,
        H = Number.POSITIVE_INFINITY,
        E = Number.POSITIVE_INFINITY,
        S = Number.NEGATIVE_INFINITY,
        L = Number.NEGATIVE_INFINITY;
      for (let F = 0; F < u; F++) {
        const oe = o[F],
          De = oe.units;
        let Xe,
          ze = 0;
        for (let gt = 0, pt = De.length; gt < pt; gt++) {
          const $t = De[gt],
            ot = $t.data,
            tt = $t.data.byteLength;
          X.setUint32(p, tt), (p += 4), O.set(ot, p), (p += tt), (ze += 4 + tt);
        }
        if (F < u - 1)
          (g = o[F + 1].dts - oe.dts), (Xe = o[F + 1].pts - oe.pts);
        else {
          const gt = this.config,
            pt = F > 0 ? oe.dts - o[F - 1].dts : D;
          if (
            ((Xe = F > 0 ? oe.pts - o[F - 1].pts : D),
            gt.stretchShortVideoTrack && this.nextAudioPts !== null)
          ) {
            const $t = Math.floor(gt.maxBufferHole * i),
              ot = (r ? y + r * i : this.nextAudioPts) - oe.pts;
            ot > $t
              ? ((g = ot - pt),
                g < 0 ? (g = pt) : (G = !0),
                this.logger.log(
                  `[mp4-remuxer]: It is approximately ${
                    ot / 90
                  } ms to the next segment; using duration ${
                    g / 90
                  } ms for the last video frame.`
                ))
              : (g = pt);
          } else g = pt;
        }
        const ht = Math.round(oe.pts - oe.dts);
        (H = Math.min(H, g)),
          (S = Math.max(S, g)),
          (E = Math.min(E, Xe)),
          (L = Math.max(L, Xe)),
          l.push(new ZRe(oe.key, g, ze, ht));
      }
      if (l.length) {
        if (ow) {
          if (ow < 70) {
            const F = l[0].flags;
            (F.dependsOn = 2), (F.isNonSync = 0);
          }
        } else if (aK && L - E < S - H && D / S < 0.025 && l[0].cts === 0) {
          this.logger.warn(
            "Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration."
          );
          let F = d;
          for (let oe = 0, De = l.length; oe < De; oe++) {
            const Xe = F + l[oe].duration,
              ze = F + l[oe].cts;
            if (oe < De - 1) {
              const ht = Xe + l[oe + 1].cts;
              l[oe].duration = ht - ze;
            } else l[oe].duration = oe ? l[oe - 1].duration : D;
            (l[oe].cts = 0), (F = Xe);
          }
        }
      }
      (g = G || !g ? D : g),
        (this.nextAvcDts = f = h + g),
        (this.videoSampleDuration = g),
        (this.isVideoContiguous = !0);
      const W = {
        data1: Ad.moof(t.sequenceNumber++, d, du({}, t, { samples: l })),
        data2: O,
        startPTS: y / i,
        endPTS: (v + g) / i,
        startDTS: d / i,
        endDTS: f / i,
        type: "video",
        hasAudio: !1,
        hasVideo: !0,
        nb: l.length,
        dropped: t.dropped,
      };
      return (t.samples = []), (t.dropped = 0), W;
    }
    getSamplesPerFrame(t) {
      switch (t.segmentCodec) {
        case "mp3":
          return 1152;
        case "ac3":
          return 1536;
        default:
          return 1024;
      }
    }
    remuxAudio(t, e, n, r, i) {
      const o = t.inputTimeScale,
        l = o / (t.samplerate ? t.samplerate : o),
        u = this.getSamplesPerFrame(t),
        c = u * l,
        d = this._initPTS,
        h = t.segmentCodec === "mp3" && this.typeSupported.mpeg,
        f = [],
        p = i !== void 0;
      let g = t.samples,
        y = h ? 0 : 8,
        v = this.nextAudioPts || -1;
      const b = e * o,
        w = (d.baseTime * o) / d.timescale;
      if (
        ((this.isAudioContiguous = n =
          n ||
          (g.length &&
            v > 0 &&
            ((r && Math.abs(b - v) < 9e3) ||
              Math.abs(Kg(g[0].pts - w, b) - v) < 20 * c))),
        g.forEach(function (S) {
          S.pts = Kg(S.pts - w, b);
        }),
        !n || v < 0)
      ) {
        if (((g = g.filter((S) => S.pts >= 0)), !g.length)) return;
        v = i === 0 ? 0 : r && !p ? Math.max(0, b) : g[0].pts;
      }
      if (t.segmentCodec === "aac") {
        const S = this.config.maxAudioFramesDrift;
        for (let L = 0, W = v; L < g.length; L++) {
          const F = g[L],
            oe = F.pts,
            De = oe - W,
            Xe = Math.abs((1e3 * De) / o);
          if (De <= -S * c && p)
            L === 0 &&
              (this.logger.warn(
                `Audio frame @ ${(oe / o).toFixed(
                  3
                )}s overlaps nextAudioPts by ${Math.round((1e3 * De) / o)} ms.`
              ),
              (this.nextAudioPts = v = W = oe));
          else if (De >= S * c && Xe < 1e4 && p) {
            let ze = Math.round(De / c);
            (W = oe - ze * c),
              W < 0 && (ze--, (W += c)),
              L === 0 && (this.nextAudioPts = v = W),
              this.logger.warn(
                `[mp4-remuxer]: Injecting ${ze} audio frame @ ${(W / o).toFixed(
                  3
                )}s due to ${Math.round((1e3 * De) / o)} ms gap.`
              );
            for (let ht = 0; ht < ze; ht++) {
              const gt = Math.max(W, 0);
              let pt = B$n.getSilentFrame(
                t.parsedCodec || t.manifestCodec || t.codec,
                t.channelCount
              );
              pt ||
                (this.logger.log(
                  "[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."
                ),
                (pt = F.unit.subarray())),
                g.splice(L, 0, { unit: pt, pts: gt }),
                (W += c),
                L++;
            }
          }
          (F.pts = W), (W += c);
        }
      }
      let k,
        D = null,
        $ = null,
        N = 0,
        P = g.length;
      for (; P--; ) N += g[P].unit.byteLength;
      for (let S = 0, L = g.length; S < L; S++) {
        const W = g[S],
          F = W.unit;
        let oe = W.pts;
        if ($ !== null) f[S - 1].duration = Math.round((oe - $) / l);
        else {
          if ((n && t.segmentCodec === "aac" && (oe = v), (D = oe), !(N > 0)))
            return;
          N += y;
          try {
            k = new Uint8Array(N);
          } catch (Xe) {
            return void this.observer.emit(Tt.ERROR, Tt.ERROR, {
              type: ro.MUX_ERROR,
              details: Ir.REMUX_ALLOC_ERROR,
              fatal: !1,
              error: Xe,
              bytes: N,
              reason: `fail allocating audio mdat ${N}`,
            });
          }
          h ||
            (new DataView(k.buffer).setUint32(0, N), k.set(Ad.types.mdat, 4));
        }
        k.set(F, y);
        const De = F.byteLength;
        (y += De), f.push(new ZRe(!0, u, De, 0)), ($ = oe);
      }
      const I = f.length;
      if (!I) return;
      const O = f[f.length - 1];
      this.nextAudioPts = v = $ + l * O.duration;
      const X = h
        ? new Uint8Array(0)
        : Ad.moof(t.sequenceNumber++, D / l, du({}, t, { samples: f }));
      t.samples = [];
      const G = D / o,
        H = v / o,
        E = {
          data1: X,
          data2: k,
          startPTS: G,
          endPTS: H,
          startDTS: G,
          endDTS: H,
          type: "audio",
          hasAudio: !0,
          hasVideo: !1,
          nb: I,
        };
      return (this.isAudioContiguous = !0), E;
    }
  };
function Kg(t, e) {
  let n;
  if (e === null) return t;
  for (n = e < t ? -8589934592 : 8589934592; Math.abs(t - e) > 4294967296; )
    t += n;
  return t;
}
function V$n(t) {
  for (let e = 0; e < t.length; e++) if (t[e].key) return e;
  return -1;
}
function Bje(t, e, n, r) {
  const i = t.samples.length;
  if (!i) return;
  const o = t.inputTimeScale;
  for (let u = 0; u < i; u++) {
    const c = t.samples[u];
    (c.pts = Kg(c.pts - (n.baseTime * o) / n.timescale, e * o) / o),
      (c.dts = Kg(c.dts - (r.baseTime * o) / r.timescale, e * o) / o);
  }
  const l = t.samples;
  return (t.samples = []), { samples: l };
}
function Hje(t, e, n) {
  const r = t.samples.length;
  if (!r) return;
  const i = t.inputTimeScale;
  for (let l = 0; l < r; l++) {
    const u = t.samples[l];
    u.pts = Kg(u.pts - (n.baseTime * i) / n.timescale, e * i) / i;
  }
  t.samples.sort((l, u) => l.pts - u.pts);
  const o = t.samples;
  return (t.samples = []), { samples: o };
}
class ZRe {
  constructor(e, n, r, i) {
    (this.size = void 0),
      (this.duration = void 0),
      (this.cts = void 0),
      (this.flags = void 0),
      (this.duration = n),
      (this.size = r),
      (this.cts = i),
      (this.flags = {
        isLeading: 0,
        isDependedOn: 0,
        hasRedundancy: 0,
        degradPrio: 0,
        dependsOn: e ? 2 : 1,
        isNonSync: e ? 0 : 1,
      });
  }
}
class z$n {
  constructor(e, n, r, i) {
    (this.logger = void 0),
      (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.logger = i);
  }
  destroy() {}
  resetTimeStamp(e) {
    (this.initPTS = e), (this.lastEndTime = null);
  }
  resetNextTimestamp() {
    this.lastEndTime = null;
  }
  resetInitSegment(e, n, r, i) {
    (this.audioCodec = n),
      (this.videoCodec = r),
      this.generateInitSegment(hCn(e, i)),
      (this.emitInitSegment = !0);
  }
  generateInitSegment(e) {
    let { audioCodec: n, videoCodec: r } = this;
    if (e == null || !e.byteLength)
      return (this.initTracks = void 0), void (this.initData = void 0);
    const i = (this.initData = hje(e));
    i.audio && (n = YRe(i.audio, rh.AUDIO)),
      i.video && (r = YRe(i.video, rh.VIDEO));
    const o = {};
    i.audio && i.video
      ? (o.audiovideo = {
          container: "video/mp4",
          codec: n + "," + r,
          initSegment: e,
          id: "main",
        })
      : i.audio
      ? (o.audio = {
          container: "audio/mp4",
          codec: n,
          initSegment: e,
          id: "audio",
        })
      : i.video
      ? (o.video = {
          container: "video/mp4",
          codec: r,
          initSegment: e,
          id: "main",
        })
      : this.logger.warn(
          "[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."
        ),
      (this.initTracks = o);
  }
  remux(e, n, r, i, o, l) {
    var u, c;
    let { initPTS: d, lastEndTime: h } = this;
    const f = {
      audio: void 0,
      video: void 0,
      text: i,
      id3: r,
      initSegment: void 0,
    };
    Ta(h) || (h = this.lastEndTime = o || 0);
    const p = n.samples;
    if (p == null || !p.length) return f;
    const g = { initPTS: void 0, timescale: 1 };
    let y = this.initData;
    if (
      (((u = y) != null && u.length) ||
        (this.generateInitSegment(p), (y = this.initData)),
      (c = y) == null || !c.length)
    )
      return (
        this.logger.warn(
          "[passthrough-remuxer.ts]: Failed to generate initSegment."
        ),
        f
      );
    this.emitInitSegment &&
      ((g.tracks = this.initTracks), (this.emitInitSegment = !1));
    const v = pCn(p, y),
      b = fCn(y, p),
      w = b === null ? o : b;
    (j$n(d, w, o, v) || (g.timescale !== d.timescale && l)) &&
      ((g.initPTS = w - o),
      d &&
        d.timescale === 1 &&
        this.logger.warn(
          `Adjusting initPTS @${o} from ${d.baseTime / d.timescale} to ${
            g.initPTS
          }`
        ),
      (this.initPTS = d = { baseTime: g.initPTS, timescale: 1 }));
    const k = e ? w - d.baseTime / d.timescale : h,
      D = k + v;
    mCn(y, p, d.baseTime / d.timescale),
      v > 0
        ? (this.lastEndTime = D)
        : (this.logger.warn(
            "Duration parsed from mp4 should be greater than zero"
          ),
          this.resetNextTimestamp());
    const $ = !!y.audio,
      N = !!y.video;
    let P = "";
    $ && (P += "audio"), N && (P += "video");
    const I = {
      data1: p,
      startPTS: k,
      startDTS: k,
      endPTS: D,
      endDTS: D,
      type: P,
      hasAudio: $,
      hasVideo: N,
      nb: 1,
      dropped: 0,
    };
    return (
      (f.audio = I.type === "audio" ? I : void 0),
      (f.video = I.type !== "audio" ? I : void 0),
      (f.initSegment = g),
      (f.id3 = Bje(r, o, d, d)),
      i.samples.length && (f.text = Hje(i, o, d)),
      f
    );
  }
}
function j$n(t, e, n, r) {
  if (t === null) return !0;
  const i = Math.max(r, 1),
    o = e - t.baseTime / t.timescale;
  return Math.abs(o - n) > i;
}
function YRe(t, e) {
  const n = t == null ? void 0 : t.codec;
  return n && n.length > 4
    ? n
    : e === rh.AUDIO
    ? n === "ec-3" || n === "ac-3" || n === "alac"
      ? n
      : n === "fLaC" || n === "Opus"
      ? Bne(n, !1)
      : (Ds.warn(`Unhandled audio codec "${n}" in mp4 MAP`), n || "mp4a")
    : (Ds.warn(`Unhandled video codec "${n}" in mp4 MAP`), n || "avc1");
}
try {
  T1 = self.performance.now.bind(self.performance);
} catch {
  T1 = Date.now;
}
const WF = [
  { demux: G$n, remux: z$n },
  { demux: _T, remux: jF },
  { demux: $$n, remux: jF },
  { demux: L$n, remux: jF },
];
WF.splice(2, 0, { demux: x$n, remux: jF });
class QRe {
  constructor(e, n, r, i, o, l) {
    (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 = n),
      (this.config = r),
      (this.id = o),
      (this.logger = l);
  }
  configure(e) {
    (this.transmuxConfig = e), this.decrypter && this.decrypter.reset();
  }
  push(e, n, r, i) {
    const o = r.transmuxing;
    o.executeStart = T1();
    let l = new Uint8Array(e);
    const { currentTransmuxState: u, transmuxConfig: c } = this;
    i && (this.currentTransmuxState = i);
    const {
        contiguous: d,
        discontinuity: h,
        trackSwitch: f,
        accurateTimeOffset: p,
        timeOffset: g,
        initSegmentChange: y,
      } = i || u,
      {
        audioCodec: v,
        videoCodec: b,
        defaultInitPts: w,
        duration: k,
        initSegmentData: D,
      } = c,
      $ = W$n(l, n);
    if ($ && uI($.method)) {
      const O = this.getDecrypter(),
        X = Lue($.method);
      if (!O.isSync())
        return (
          (this.asyncResult = !0),
          (this.decryptionPromise = O.webCryptoDecrypt(
            l,
            $.key.buffer,
            $.iv.buffer,
            X
          ).then((G) => {
            const H = this.push(G, null, r);
            return (this.decryptionPromise = null), H;
          })),
          this.decryptionPromise
        );
      {
        let G = O.softwareDecrypt(l, $.key.buffer, $.iv.buffer, X);
        if (r.part > -1) {
          const H = O.flush();
          G = H && H.buffer;
        }
        if (!G) return (o.executeEnd = T1()), oK(r);
        l = new Uint8Array(G);
      }
    }
    const N = this.needsProbing(h, f);
    if (N) {
      const O = this.configureTransmuxer(l);
      if (O)
        return (
          this.logger.warn(`[transmuxer] ${O.message}`),
          this.observer.emit(Tt.ERROR, Tt.ERROR, {
            type: ro.MEDIA_ERROR,
            details: Ir.FRAG_PARSING_ERROR,
            fatal: !1,
            error: O,
            reason: O.message,
          }),
          (o.executeEnd = T1()),
          oK(r)
        );
    }
    (h || f || y || N) && this.resetInitSegment(D, v, b, k, n),
      (h || y || N) && this.resetInitialTimestamp(w),
      d || this.resetContiguity();
    const P = this.transmux(l, $, g, p, r);
    this.asyncResult = m8(P);
    const I = this.currentTransmuxState;
    return (
      (I.contiguous = !0),
      (I.discontinuity = !1),
      (I.trackSwitch = !1),
      (o.executeEnd = T1()),
      P
    );
  }
  flush(e) {
    const n = e.transmuxing;
    n.executeStart = T1();
    const {
      decrypter: r,
      currentTransmuxState: i,
      decryptionPromise: o,
    } = this;
    if (o) return (this.asyncResult = !0), o.then(() => this.flush(e));
    const l = [],
      { timeOffset: u } = i;
    if (r) {
      const f = r.flush();
      f && l.push(this.push(f.buffer, null, e));
    }
    const { demuxer: c, remuxer: d } = this;
    if (!c || !d) {
      n.executeEnd = T1();
      const f = [oK(e)];
      return this.asyncResult ? Promise.resolve(f) : f;
    }
    const h = c.flush(u);
    return m8(h)
      ? ((this.asyncResult = !0), h.then((f) => (this.flushRemux(l, f, e), l)))
      : (this.flushRemux(l, h, e), this.asyncResult ? Promise.resolve(l) : l);
  }
  flushRemux(e, n, r) {
    const { audioTrack: i, videoTrack: o, id3Track: l, textTrack: u } = n,
      { accurateTimeOffset: c, timeOffset: d } = this.currentTransmuxState;
    this.logger.log(
      `[transmuxer.ts]: Flushed ${this.id} sn: ${r.sn}${
        r.part > -1 ? " part: " + r.part : ""
      } of ${this.id === ko.MAIN ? "level" : "track"} ${r.level}`
    );
    const h = this.remuxer.remux(i, o, l, u, d, c, !0, this.id);
    e.push({ remuxResult: h, chunkMeta: r }), (r.transmuxing.executeEnd = T1());
  }
  resetInitialTimestamp(e) {
    const { demuxer: n, remuxer: r } = this;
    n && r && (n.resetTimeStamp(e), r.resetTimeStamp(e));
  }
  resetContiguity() {
    const { demuxer: e, remuxer: n } = this;
    e && n && (e.resetContiguity(), n.resetNextTimestamp());
  }
  resetInitSegment(e, n, r, i, o) {
    const { demuxer: l, remuxer: u } = this;
    l && u && (l.resetInitSegment(e, n, r, i), u.resetInitSegment(e, n, r, o));
  }
  destroy() {
    this.demuxer && (this.demuxer.destroy(), (this.demuxer = void 0)),
      this.remuxer && (this.remuxer.destroy(), (this.remuxer = void 0));
  }
  transmux(e, n, r, i, o) {
    let l;
    return (
      (l =
        n && n.method === "SAMPLE-AES"
          ? this.transmuxSampleAes(e, n, r, i, o)
          : this.transmuxUnencrypted(e, r, i, o)),
      l
    );
  }
  transmuxUnencrypted(e, n, r, i) {
    const {
      audioTrack: o,
      videoTrack: l,
      id3Track: u,
      textTrack: c,
    } = this.demuxer.demux(e, n, !1, !this.config.progressive);
    return {
      remuxResult: this.remuxer.remux(o, l, u, c, n, r, !1, this.id),
      chunkMeta: i,
    };
  }
  transmuxSampleAes(e, n, r, i, o) {
    return this.demuxer
      .demuxSampleAes(e, n, r)
      .then((l) => ({
        remuxResult: this.remuxer.remux(
          l.audioTrack,
          l.videoTrack,
          l.id3Track,
          l.textTrack,
          r,
          i,
          !1,
          this.id
        ),
        chunkMeta: o,
      }));
  }
  configureTransmuxer(e) {
    const { config: n, observer: r, typeSupported: i } = this;
    let o;
    for (let f = 0, p = WF.length; f < p; f++) {
      var l;
      if ((l = WF[f].demux) != null && l.probe(e, this.logger)) {
        o = WF[f];
        break;
      }
    }
    if (!o) return new Error("Failed to find demuxer by probing fragment data");
    const u = this.demuxer,
      c = this.remuxer,
      d = o.remux,
      h = o.demux;
    (c && c instanceof d) || (this.remuxer = new d(r, n, i, this.logger)),
      (u && u instanceof h) ||
        ((this.demuxer = new h(r, n, i, this.logger)), (this.probe = h.probe));
  }
  needsProbing(e, n) {
    return !this.demuxer || !this.remuxer || e || n;
  }
  getDecrypter() {
    let e = this.decrypter;
    return e || (e = this.decrypter = new xue(this.config)), e;
  }
}
function W$n(t, e) {
  let n = null;
  return (
    t.byteLength > 0 &&
      (e == null ? void 0 : e.key) != null &&
      e.iv !== null &&
      e.method != null &&
      (n = e),
    n
  );
}
const oK = (t) => ({ remuxResult: {}, chunkMeta: t });
function m8(t) {
  return "then" in t && t.then instanceof Function;
}
class K$n {
  constructor(e, n, r, i, o) {
    (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 = n),
      (this.initSegmentData = r),
      (this.duration = i),
      (this.defaultInitPts = o || null);
  }
}
class Z$n {
  constructor(e, n, r, i, o, l) {
    (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 = n),
      (this.accurateTimeOffset = r),
      (this.trackSwitch = i),
      (this.timeOffset = o),
      (this.initSegmentChange = l);
  }
}
let JRe = 0;
class Y$n {
  constructor(e, n, r, i) {
    (this.error = null),
      (this.hls = void 0),
      (this.id = void 0),
      (this.instanceNo = JRe++),
      (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 = (c) => {
        const d = c.data,
          h = this.hls;
        if (h && d != null && d.event && d.instanceNo === this.instanceNo)
          switch (d.event) {
            case "init": {
              var f;
              const p = (f = this.workerContext) == null ? void 0 : f.objectURL;
              p && self.URL.revokeObjectURL(p);
              break;
            }
            case "transmuxComplete":
              this.handleTransmuxComplete(d.data);
              break;
            case "flush":
              this.onFlush(d.data);
              break;
            case "workerLog":
              h.logger[d.data.logType] &&
                h.logger[d.data.logType](d.data.message);
              break;
            default:
              (d.data = d.data || {}),
                (d.data.frag = this.frag),
                (d.data.part = this.part),
                (d.data.id = this.id),
                h.trigger(d.event, d.data);
          }
      }),
      (this.onWorkerError = (c) => {
        if (!this.hls) return;
        const d = new Error(`${c.message}  (${c.filename}:${c.lineno})`);
        (this.hls.config.enableWorker = !1),
          this.hls.logger.warn(
            `Error in "${this.id}" Web Worker, fallback to inline`
          ),
          this.hls.trigger(Tt.ERROR, {
            type: ro.OTHER_ERROR,
            details: Ir.INTERNAL_EXCEPTION,
            fatal: !1,
            event: "demuxerWorker",
            error: d,
          });
      });
    const o = e.config;
    (this.hls = e),
      (this.id = n),
      (this.useWorker = !!o.enableWorker),
      (this.onTransmuxComplete = r),
      (this.onFlush = i);
    const l = (c, d) => {
      ((d = d || {}).frag = this.frag || void 0),
        c === Tt.ERROR &&
          ((d.parent = this.id), (d.part = this.part), (this.error = d.error)),
        this.hls.trigger(c, d);
    };
    (this.observer = new Aje()),
      this.observer.on(Tt.FRAG_DECRYPTED, l),
      this.observer.on(Tt.ERROR, l);
    const u = RRe(o.preferManagedMediaSource);
    if (this.useWorker && typeof Worker < "u") {
      const c = this.hls.logger;
      if (o.workerPath || t$n()) {
        try {
          o.workerPath
            ? (c.log(`loading Web Worker ${o.workerPath} for "${n}"`),
              (this.workerContext = r$n(o.workerPath)))
            : (c.log(`injecting Web Worker for "${n}"`),
              (this.workerContext = n$n()));
          const { worker: d } = this.workerContext;
          d.addEventListener("message", this.onWorkerMessage),
            d.addEventListener("error", this.onWorkerError),
            d.postMessage({
              instanceNo: this.instanceNo,
              cmd: "init",
              typeSupported: u,
              id: n,
              config: JSON.stringify(o),
            });
        } catch (d) {
          c.warn(`Error setting up "${n}" Web Worker, fallback to inline`, d),
            this.terminateWorker(),
            (this.error = null),
            (this.transmuxer = new QRe(this.observer, u, o, "", n, e.logger));
        }
        return;
      }
    }
    this.transmuxer = new QRe(this.observer, u, o, "", n, e.logger);
  }
  reset() {
    if (((this.frag = null), (this.part = null), this.workerContext)) {
      const e = this.instanceNo;
      this.instanceNo = JRe++;
      const n = this.hls.config,
        r = RRe(n.preferManagedMediaSource);
      this.workerContext.worker.postMessage({
        instanceNo: this.instanceNo,
        cmd: "reset",
        resetNo: e,
        typeSupported: r,
        id: this.id,
        config: JSON.stringify(n),
      });
    }
  }
  terminateWorker() {
    if (this.workerContext) {
      const { worker: e } = this.workerContext;
      (this.workerContext = null),
        e.removeEventListener("message", this.onWorkerMessage),
        e.removeEventListener("error", this.onWorkerError),
        i$n(this.hls.config.workerPath);
    }
  }
  destroy() {
    if (this.workerContext)
      this.terminateWorker(),
        (this.onWorkerMessage = this.onWorkerError = null);
    else {
      const n = this.transmuxer;
      n && (n.destroy(), (this.transmuxer = null));
    }
    const e = this.observer;
    e && e.removeAllListeners(),
      (this.frag = null),
      (this.part = null),
      (this.observer = null),
      (this.hls = null);
  }
  push(e, n, r, i, o, l, u, c, d, h) {
    var f, p;
    d.transmuxing.start = self.performance.now();
    const { instanceNo: g, transmuxer: y } = this,
      v = l ? l.start : o.start,
      b = o.decryptdata,
      w = this.frag,
      k = !(w && o.cc === w.cc),
      D = !(w && d.level === w.level),
      $ = w ? d.sn - w.sn : -1,
      N = this.part ? d.part - this.part.index : -1,
      P =
        $ === 0 &&
        d.id > 1 &&
        d.id === (w == null ? void 0 : w.stats.chunkCount),
      I = !D && ($ === 1 || ($ === 0 && (N === 1 || (P && N <= 0)))),
      O = self.performance.now();
    (D || $ || o.stats.parsing.start === 0) && (o.stats.parsing.start = O),
      !l || (!N && I) || (l.stats.parsing.start = O);
    const X = !(
        w &&
        ((f = o.initSegment) == null ? void 0 : f.url) ===
          ((p = w.initSegment) == null ? void 0 : p.url)
      ),
      G = new Z$n(k, I, c, D, v, X);
    if (!I || k || X) {
      this.hls.logger
        .log(`[transmuxer-interface]: Starting new transmux session for ${
        o.type
      } sn: ${d.sn}${d.part > -1 ? " part: " + d.part : ""} ${
        this.id === ko.MAIN ? "level" : "track"
      }: ${d.level} id: ${d.id}
        discontinuity: ${k}
        trackSwitch: ${D}
        contiguous: ${I}
        accurateTimeOffset: ${c}
        timeOffset: ${v}
        initSegmentChange: ${X}`);
      const H = new K$n(r, i, n, u, h);
      this.configureTransmuxer(H);
    }
    if (((this.frag = o), (this.part = l), this.workerContext))
      this.workerContext.worker.postMessage(
        {
          instanceNo: g,
          cmd: "demux",
          data: e,
          decryptdata: b,
          chunkMeta: d,
          state: G,
        },
        e instanceof ArrayBuffer ? [e] : []
      );
    else if (y) {
      const H = y.push(e, b, d, G);
      m8(H)
        ? H.then((E) => {
            this.handleTransmuxComplete(E);
          }).catch((E) => {
            this.transmuxerError(E, d, "transmuxer-interface push error");
          })
        : this.handleTransmuxComplete(H);
    }
  }
  flush(e) {
    e.transmuxing.start = self.performance.now();
    const { instanceNo: n, transmuxer: r } = this;
    if (this.workerContext)
      this.workerContext.worker.postMessage({
        instanceNo: n,
        cmd: "flush",
        chunkMeta: e,
      });
    else if (r) {
      const i = r.flush(e);
      m8(i)
        ? i
            .then((o) => {
              this.handleFlushResult(o, e);
            })
            .catch((o) => {
              this.transmuxerError(o, e, "transmuxer-interface flush error");
            })
        : this.handleFlushResult(i, e);
    }
  }
  transmuxerError(e, n, r) {
    this.hls &&
      ((this.error = e),
      this.hls.trigger(Tt.ERROR, {
        type: ro.MEDIA_ERROR,
        details: Ir.FRAG_PARSING_ERROR,
        chunkMeta: n,
        frag: this.frag || void 0,
        part: this.part || void 0,
        fatal: !1,
        error: e,
        err: e,
        reason: r,
      }));
  }
  handleFlushResult(e, n) {
    e.forEach((r) => {
      this.handleTransmuxComplete(r);
    }),
      this.onFlush(n);
  }
  configureTransmuxer(e) {
    const { instanceNo: n, transmuxer: r } = this;
    this.workerContext
      ? this.workerContext.worker.postMessage({
          instanceNo: n,
          cmd: "configure",
          config: e,
        })
      : r && r.configure(e);
  }
  handleTransmuxComplete(e) {
    (e.chunkMeta.transmuxing.end = self.performance.now()),
      this.onTransmuxComplete(e);
  }
}
function Xje(t, e) {
  if (t.length !== e.length) return !1;
  for (let n = 0; n < t.length; n++) if (!rD(t[n].attrs, e[n].attrs)) return !1;
  return !0;
}
function rD(t, e, n) {
  const r = t["STABLE-RENDITION-ID"];
  return r && !n
    ? r === e["STABLE-RENDITION-ID"]
    : !(
        n || [
          "LANGUAGE",
          "NAME",
          "CHARACTERISTICS",
          "AUTOSELECT",
          "DEFAULT",
          "FORCED",
          "ASSOC-LANGUAGE",
        ]
      ).some((i) => t[i] !== e[i]);
}
function jne(t, e) {
  return (
    e.label.toLowerCase() === t.name.toLowerCase() &&
    (!e.language || e.language.toLowerCase() === (t.lang || "").toLowerCase())
  );
}
class Q$n extends Sje {
  constructor(e, n, r) {
    super(e, n, r, "audio-stream-controller", ko.AUDIO),
      (this.mainAnchor = null),
      (this.mainFragLoading = null),
      (this.audioOnly = !1),
      (this.bufferedTrack = null),
      (this.switchingTrack = null),
      (this.trackId = -1),
      (this.waitingData = null),
      (this.mainDetails = null),
      (this.flushing = !1),
      (this.bufferFlushed = !1),
      (this.cachedTrackLoadedData = null),
      this.registerListeners();
  }
  onHandlerDestroying() {
    this.unregisterListeners(), super.onHandlerDestroying(), this.resetItem();
  }
  resetItem() {
    this.mainDetails =
      this.mainAnchor =
      this.mainFragLoading =
      this.bufferedTrack =
      this.switchingTrack =
      this.waitingData =
      this.cachedTrackLoadedData =
        null;
  }
  registerListeners() {
    super.registerListeners();
    const { hls: e } = this;
    e.on(Tt.LEVEL_LOADED, this.onLevelLoaded, this),
      e.on(Tt.AUDIO_TRACKS_UPDATED, this.onAudioTracksUpdated, this),
      e.on(Tt.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
      e.on(Tt.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
      e.on(Tt.BUFFER_RESET, this.onBufferReset, this),
      e.on(Tt.BUFFER_CREATED, this.onBufferCreated, this),
      e.on(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this),
      e.on(Tt.BUFFER_FLUSHED, this.onBufferFlushed, this),
      e.on(Tt.INIT_PTS_FOUND, this.onInitPtsFound, this),
      e.on(Tt.FRAG_LOADING, this.onFragLoading, this),
      e.on(Tt.FRAG_BUFFERED, this.onFragBuffered, this);
  }
  unregisterListeners() {
    const { hls: e } = this;
    e &&
      (super.unregisterListeners(),
      e.off(Tt.LEVEL_LOADED, this.onLevelLoaded, this),
      e.off(Tt.AUDIO_TRACKS_UPDATED, this.onAudioTracksUpdated, this),
      e.off(Tt.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
      e.off(Tt.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
      e.off(Tt.BUFFER_RESET, this.onBufferReset, this),
      e.off(Tt.BUFFER_CREATED, this.onBufferCreated, this),
      e.off(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this),
      e.off(Tt.BUFFER_FLUSHED, this.onBufferFlushed, this),
      e.off(Tt.INIT_PTS_FOUND, this.onInitPtsFound, this),
      e.off(Tt.FRAG_LOADING, this.onFragLoading, this),
      e.off(Tt.FRAG_BUFFERED, this.onFragBuffered, this));
  }
  onInitPtsFound(e, { frag: n, id: r, initPTS: i, timescale: o }) {
    if (r === ko.MAIN) {
      const l = n.cc,
        u = this.fragCurrent;
      if (
        ((this.initPTS[l] = { baseTime: i, timescale: o }),
        this.log(`InitPTS for cc: ${l} found from main: ${i}/${o}`),
        (this.mainAnchor = n),
        this.state === ui.WAITING_INIT_PTS)
      ) {
        const c = this.waitingData;
        ((!c && !this.loadingParts) || (c && c.frag.cc !== l)) &&
          (this.nextLoadPosition = this.findSyncFrag(n).start),
          this.tick();
      } else
        !this.hls.hasEnoughToStart && u && u.cc !== l
          ? ((this.startFragRequested = !1),
            (this.nextLoadPosition = this.findSyncFrag(n).start),
            u.abortRequests(),
            this.resetLoadingState())
          : this.state === ui.IDLE && this.tick();
    }
  }
  findSyncFrag(e) {
    const n = this.getLevelDetails(),
      r = e.cc;
    return JMn(n, r, e) || (n && lje(n.fragments, r)) || e;
  }
  startLoad(e) {
    if (!this.levels)
      return (this.startPosition = e), void (this.state = ui.STOPPED);
    const n = this.lastCurrentTime;
    this.stopLoad(),
      this.setInterval(100),
      n > 0 && e === -1
        ? (this.log(
            `Override startPosition with lastCurrentTime @${n.toFixed(3)}`
          ),
          (e = n),
          (this.state = ui.IDLE))
        : (this.state = ui.WAITING_TRACK),
      (this.nextLoadPosition = this.startPosition = this.lastCurrentTime = e),
      this.tick();
  }
  doTick() {
    switch (this.state) {
      case ui.IDLE:
        this.doTickIdle();
        break;
      case ui.WAITING_TRACK: {
        const { levels: n, trackId: r } = this,
          i = n == null ? void 0 : n[r],
          o = i == null ? void 0 : i.details;
        if (o && !this.waitForLive(i)) {
          if (this.waitForCdnTuneIn(o)) break;
          this.state = ui.WAITING_INIT_PTS;
        }
        break;
      }
      case ui.FRAG_LOADING_WAITING_RETRY: {
        var e;
        const n = performance.now(),
          r = this.retryDate;
        if (!r || n >= r || ((e = this.media) != null && e.seeking)) {
          const { levels: i, trackId: o } = this;
          this.log("RetryDate reached, switch back to IDLE state"),
            this.resetStartWhenNotLoaded((i == null ? void 0 : i[o]) || null),
            (this.state = ui.IDLE);
        }
        break;
      }
      case ui.WAITING_INIT_PTS: {
        const n = this.waitingData;
        if (n) {
          const { frag: r, part: i, cache: o, complete: l } = n,
            u = this.mainAnchor;
          if (this.initPTS[r.cc] !== void 0) {
            (this.waitingData = null), (this.state = ui.FRAG_LOADING);
            const c = {
              frag: r,
              part: i,
              payload: o.flush().buffer,
              networkDetails: null,
            };
            this._handleFragmentLoadProgress(c),
              l && super._handleFragmentLoadComplete(c);
          } else
            u &&
              u.cc !== n.frag.cc &&
              (this.log(
                `Waiting fragment cc (${r.cc}) cancelled because video is at cc ${u.cc}`
              ),
              (this.nextLoadPosition = this.findSyncFrag(u).start),
              this.clearWaitingFragment());
        } else this.state = ui.IDLE;
      }
    }
    this.onTickEnd();
  }
  clearWaitingFragment() {
    const e = this.waitingData;
    e &&
      (this.hls.hasEnoughToStart || (this.startFragRequested = !1),
      this.fragmentTracker.removeFragment(e.frag),
      (this.waitingData = null),
      this.state !== ui.STOPPED && (this.state = ui.IDLE));
  }
  resetLoadingState() {
    this.clearWaitingFragment(), super.resetLoadingState();
  }
  onTickEnd() {
    const { media: e } = this;
    e != null && e.readyState && (this.lastCurrentTime = e.currentTime);
  }
  doTickIdle() {
    var e;
    const { hls: n, levels: r, media: i, trackId: o } = this,
      l = n.config;
    if (
      !this.buffering ||
      (!i && (this.startFragRequested || !l.startFragPrefetch)) ||
      r == null ||
      !r[o]
    )
      return;
    const u = r[o],
      c = u.details;
    if (!c || this.waitForLive(u) || this.waitForCdnTuneIn(c))
      return (
        (this.state = ui.WAITING_TRACK), void (this.startFragRequested = !1)
      );
    const d = this.mediaBuffer ? this.mediaBuffer : this.media;
    this.bufferFlushed &&
      d &&
      ((this.bufferFlushed = !1),
      this.afterBufferFlushed(d, rh.AUDIO, ko.AUDIO));
    const h = this.getFwdBufferInfo(d, ko.AUDIO);
    if (h === null) return;
    const { bufferedTrack: f, switchingTrack: p } = this;
    if (!p && this._streamEnded(h, c))
      return (
        n.trigger(Tt.BUFFER_EOS, { type: "audio" }),
        void (this.state = ui.ENDED)
      );
    const g = h.len,
      y = n.maxBufferLength,
      v = c.fragments,
      b = v[0].start,
      w = this.getLoadPosition();
    let k = this.flushing ? w : h.end;
    if (p && i) {
      const N = w;
      f && !rD(p.attrs, f.attrs) && (k = N),
        c.PTSKnown &&
          N < b &&
          (h.end > b || h.nextStart) &&
          (this.log(
            "Alt audio track ahead of main track, seek to start of alt audio track"
          ),
          (i.currentTime = b + 0.05));
    }
    if (g >= y && !p && k < v[v.length - 1].start) return;
    let D = this.getNextFragment(k, c);
    if (
      (D &&
        this.isLoopLoading(D, k) &&
        (D = this.getNextFragmentLoopLoading(D, c, h, ko.MAIN, y)),
      !D)
    )
      return void (this.bufferFlushed = !0);
    const $ = (e = this.mainFragLoading) == null ? void 0 : e.frag;
    if (
      !this.audioOnly &&
      this.startFragRequested &&
      $ &&
      Ef($) &&
      Ef(D) &&
      !D.endList &&
      (!c.live || (!this.loadingParts && k < this.hls.liveSyncPosition))
    ) {
      let N = $;
      if (D.start > N.end) {
        const P = this.fragmentTracker.getFragAtPos(k, ko.MAIN);
        P &&
          P.end > $.end &&
          ((N = P),
          (this.mainFragLoading = { frag: P, targetBufferTime: null }));
      }
      if (D.start > N.end) return;
    }
    this.loadFragment(D, u, k);
  }
  onMediaDetaching(e, n) {
    (this.bufferFlushed = this.flushing = !1), super.onMediaDetaching(e, n);
  }
  onAudioTracksUpdated(e, { audioTracks: n }) {
    this.resetTransmuxer(), (this.levels = n.map((r) => new s8(r)));
  }
  onAudioTrackSwitching(e, n) {
    const r = !!n.url;
    this.trackId = n.id;
    const { fragCurrent: i } = this;
    i && (i.abortRequests(), this.removeUnbufferedFrags(i.start)),
      this.resetLoadingState(),
      r
        ? ((this.switchingTrack = n),
          this.flushAudioIfNeeded(n),
          this.state !== ui.STOPPED &&
            (this.setInterval(100), (this.state = ui.IDLE), this.tick()))
        : (this.resetTransmuxer(),
          (this.switchingTrack = null),
          (this.bufferedTrack = n),
          this.clearInterval());
  }
  onManifestLoading() {
    super.onManifestLoading(),
      (this.bufferFlushed = this.flushing = this.audioOnly = !1),
      this.resetItem(),
      (this.trackId = -1);
  }
  onLevelLoaded(e, n) {
    this.mainDetails = n.details;
    const r = this.cachedTrackLoadedData;
    r &&
      ((this.cachedTrackLoadedData = null),
      this.hls.trigger(Tt.AUDIO_TRACK_LOADED, r));
  }
  onAudioTrackLoaded(e, n) {
    var r;
    const { levels: i } = this,
      { details: o, id: l } = n,
      u = this.mainDetails;
    if (!u || u.expired || o.endCC > u.endCC)
      return (
        (this.cachedTrackLoadedData = n),
        void (this.state !== ui.STOPPED && (this.state = ui.WAITING_TRACK))
      );
    if (!i)
      return void this.warn(`Audio tracks were reset while loading level ${l}`);
    this.log(
      `Audio track ${l} loaded [${o.startSN},${o.endSN}]${
        o.lastPartSn ? `[part-${o.lastPartSn}-${o.lastPartIndex}]` : ""
      },duration:${o.totalduration}`
    );
    const c = i[l];
    let d = 0;
    if (o.live || ((r = c.details) != null && r.live)) {
      if ((this.checkLiveUpdate(o), o.deltaUpdateFailed)) return;
      var h;
      c.details &&
        (d = this.alignPlaylists(
          o,
          c.details,
          (h = this.levelLastLoaded) == null ? void 0 : h.details
        )),
        o.alignedSliding ||
          (Eje(o, u), o.alignedSliding || f8(o, u), (d = o.fragmentStart));
    }
    (c.details = o),
      (this.levelLastLoaded = c),
      this.startFragRequested || this.setStartPosition(u, d),
      this.hls.trigger(Tt.AUDIO_TRACK_UPDATED, {
        details: o,
        id: l,
        groupId: n.groupId,
      }),
      this.state !== ui.WAITING_TRACK ||
        this.waitForCdnTuneIn(o) ||
        (this.state = ui.IDLE),
      this.tick();
  }
  _handleFragmentLoadProgress(e) {
    var n;
    const r = e.frag,
      { part: i, payload: o } = e,
      { config: l, trackId: u, levels: c } = this;
    if (!c)
      return void this.warn(
        `Audio tracks were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`
      );
    const d = c[u];
    if (!d)
      return void this.warn(
        "Audio track is undefined on fragment load progress"
      );
    const h = d.details;
    if (!h)
      return (
        this.warn("Audio track details undefined on fragment load progress"),
        void this.removeUnbufferedFrags(r.start)
      );
    const f = l.defaultAudioCodec || d.audioCodec || "mp4a.40.2";
    let p = this.transmuxer;
    p ||
      (p = this.transmuxer =
        new Y$n(
          this.hls,
          ko.AUDIO,
          this._handleTransmuxComplete.bind(this),
          this._handleTransmuxerFlush.bind(this)
        ));
    const g = this.initPTS[r.cc],
      y = (n = r.initSegment) == null ? void 0 : n.data;
    if (g !== void 0) {
      const b = i ? i.index : -1,
        w = b !== -1,
        k = new gje(r.level, r.sn, r.stats.chunkCount, o.byteLength, b, w);
      p.push(o, y, f, "", r, i, h.totalduration, !1, k, g);
    } else {
      this.log(
        `Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${h.startSN} ,${h.endSN}],track ${u}`
      );
      const { cache: v } = (this.waitingData = this.waitingData || {
        frag: r,
        part: i,
        cache: new JCn(),
        complete: !1,
      });
      v.push(new Uint8Array(o)),
        this.state !== ui.STOPPED && (this.state = ui.WAITING_INIT_PTS);
    }
  }
  _handleFragmentLoadComplete(e) {
    this.waitingData
      ? (this.waitingData.complete = !0)
      : super._handleFragmentLoadComplete(e);
  }
  onBufferReset() {
    this.mediaBuffer = null;
  }
  onBufferCreated(e, n) {
    this.bufferFlushed = this.flushing = !1;
    const r = n.tracks.audio;
    r && (this.mediaBuffer = r.buffer || null);
  }
  onFragLoading(e, n) {
    !this.audioOnly &&
      n.frag.type === ko.MAIN &&
      Ef(n.frag) &&
      ((this.mainFragLoading = n), this.state === ui.IDLE && this.tick());
  }
  onFragBuffered(e, n) {
    const { frag: r, part: i } = n;
    if (r.type === ko.AUDIO)
      if (this.fragContextChanged(r))
        this.warn(
          `Fragment ${r.sn}${i ? " p: " + i.index : ""} of level ${
            r.level
          } finished buffering, but was aborted. state: ${
            this.state
          }, audioSwitch: ${
            this.switchingTrack ? this.switchingTrack.name : "false"
          }`
        );
      else {
        if (Ef(r)) {
          this.fragPrevious = r;
          const o = this.switchingTrack;
          o &&
            ((this.bufferedTrack = o),
            (this.switchingTrack = null),
            this.hls.trigger(Tt.AUDIO_TRACK_SWITCHED, pl({}, o)));
        }
        this.fragBufferedComplete(r, i), this.media && this.tick();
      }
    else
      this.audioOnly ||
        r.type !== ko.MAIN ||
        r.elementaryStreams.video ||
        r.elementaryStreams.audiovideo ||
        ((this.audioOnly = !0), (this.mainFragLoading = null));
  }
  onError(e, n) {
    var r;
    if (n.fatal) this.state = ui.ERROR;
    else
      switch (n.details) {
        case Ir.FRAG_GAP:
        case Ir.FRAG_PARSING_ERROR:
        case Ir.FRAG_DECRYPT_ERROR:
        case Ir.FRAG_LOAD_ERROR:
        case Ir.FRAG_LOAD_TIMEOUT:
        case Ir.KEY_LOAD_ERROR:
        case Ir.KEY_LOAD_TIMEOUT:
          this.onFragmentOrKeyLoadError(ko.AUDIO, n);
          break;
        case Ir.AUDIO_TRACK_LOAD_ERROR:
        case Ir.AUDIO_TRACK_LOAD_TIMEOUT:
        case Ir.LEVEL_PARSING_ERROR:
          n.levelRetry ||
            this.state !== ui.WAITING_TRACK ||
            ((r = n.context) == null ? void 0 : r.type) !== B1.AUDIO_TRACK ||
            (this.state = ui.IDLE);
          break;
        case Ir.BUFFER_APPEND_ERROR:
        case Ir.BUFFER_FULL_ERROR:
          if (!n.parent || n.parent !== "audio") return;
          if (n.details === Ir.BUFFER_APPEND_ERROR)
            return void this.resetLoadingState();
          this.reduceLengthAndFlushBuffer(n) &&
            ((this.bufferedTrack = null),
            super.flushMainBuffer(0, Number.POSITIVE_INFINITY, "audio"));
          break;
        case Ir.INTERNAL_EXCEPTION:
          this.recoverWorkerError(n);
      }
  }
  onBufferFlushing(e, { type: n }) {
    n !== rh.VIDEO && (this.flushing = !0);
  }
  onBufferFlushed(e, { type: n }) {
    if (n !== rh.VIDEO) {
      (this.flushing = !1),
        (this.bufferFlushed = !0),
        this.state === ui.ENDED && (this.state = ui.IDLE);
      const r = this.mediaBuffer || this.media;
      r && (this.afterBufferFlushed(r, n, ko.AUDIO), this.tick());
    }
  }
  _handleTransmuxComplete(e) {
    var n;
    const r = "audio",
      { hls: i } = this,
      { remuxResult: o, chunkMeta: l } = e,
      u = this.getCurrentContext(l);
    if (!u) return void this.resetWhenMissingContext(l);
    const { frag: c, part: d, level: h } = u,
      { details: f } = h,
      { audio: p, text: g, id3: y, initSegment: v } = o;
    if (!this.fragContextChanged(c) && f) {
      if (
        ((this.state = ui.PARSING),
        this.switchingTrack &&
          p &&
          this.completeAudioSwitch(this.switchingTrack),
        v != null && v.tracks)
      ) {
        const b = c.initSegment || c;
        this._bufferInitSegment(h, v.tracks, b, l),
          i.trigger(Tt.FRAG_PARSING_INIT_SEGMENT, {
            frag: b,
            id: r,
            tracks: v.tracks,
          });
      }
      if (p) {
        const { startPTS: b, endPTS: w, startDTS: k, endDTS: D } = p;
        d &&
          (d.elementaryStreams[rh.AUDIO] = {
            startPTS: b,
            endPTS: w,
            startDTS: k,
            endDTS: D,
          }),
          c.setElementaryStreamInfo(rh.AUDIO, b, w, k, D),
          this.bufferFragmentData(p, c, d, l);
      }
      if (y != null && (n = y.samples) != null && n.length) {
        const b = du({ id: r, frag: c, details: f }, y);
        i.trigger(Tt.FRAG_PARSING_METADATA, b);
      }
      if (g) {
        const b = du({ id: r, frag: c, details: f }, g);
        i.trigger(Tt.FRAG_PARSING_USERDATA, b);
      }
    } else this.fragmentTracker.removeFragment(c);
  }
  _bufferInitSegment(e, n, r, i) {
    if (
      this.state !== ui.PARSING ||
      (n.video && delete n.video, n.audiovideo && delete n.audiovideo, !n.audio)
    )
      return;
    const o = n.audio;
    o.id = "audio";
    const l = e.audioCodec;
    this.log(
      `Init audio buffer, container:${o.container}, codecs[level/parsed]=[${l}/${o.codec}]`
    ),
      l && l.split(",").length === 1 && (o.levelCodec = l),
      this.hls.trigger(Tt.BUFFER_CODECS, n);
    const u = o.initSegment;
    if (u != null && u.byteLength) {
      const c = {
        type: "audio",
        frag: r,
        part: null,
        chunkMeta: i,
        parent: r.type,
        data: u,
      };
      this.hls.trigger(Tt.BUFFER_APPENDING, c);
    }
    this.tickImmediate();
  }
  loadFragment(e, n, r) {
    const i = this.fragmentTracker.getState(e);
    var o;
    if (this.switchingTrack || i === d0.NOT_LOADED || i === d0.PARTIAL)
      if (Ef(e))
        if ((o = n.details) != null && o.live && !this.initPTS[e.cc]) {
          this.log(
            `Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`
          ),
            (this.state = ui.WAITING_INIT_PTS);
          const l = this.mainDetails;
          l && l.fragmentStart !== n.details.fragmentStart && f8(n.details, l);
        } else super.loadFragment(e, n, r);
      else this._loadInitSegment(e, n);
    else this.clearTrackerIfNeeded(e);
  }
  flushAudioIfNeeded(e) {
    const { media: n, bufferedTrack: r } = this,
      i = r == null ? void 0 : r.attrs,
      o = e.attrs;
    n &&
      i &&
      (i.CHANNELS !== o.CHANNELS || r.name !== e.name || r.lang !== e.lang) &&
      (this.log("Switching audio track : flushing all audio"),
      super.flushMainBuffer(0, Number.POSITIVE_INFINITY, "audio"),
      (this.bufferedTrack = null));
  }
  completeAudioSwitch(e) {
    const { hls: n } = this;
    this.flushAudioIfNeeded(e),
      (this.bufferedTrack = e),
      (this.switchingTrack = null),
      n.trigger(Tt.AUDIO_TRACK_SWITCHED, pl({}, e));
  }
}
class Vje extends _b {
  constructor(e, n) {
    super(n, e.logger),
      (this.hls = void 0),
      (this.canLoad = !1),
      (this.timer = -1),
      (this.hls = e);
  }
  destroy() {
    this.clearTimer(), (this.hls = this.log = this.warn = null);
  }
  clearTimer() {
    this.timer !== -1 && (self.clearTimeout(this.timer), (this.timer = -1));
  }
  startLoad() {
    (this.canLoad = !0), this.loadPlaylist();
  }
  stopLoad() {
    (this.canLoad = !1), this.clearTimer();
  }
  switchParams(e, n, r) {
    const i = n == null ? void 0 : n.renditionReports;
    if (i) {
      let o = -1;
      for (let l = 0; l < i.length; l++) {
        const u = i[l];
        let c;
        try {
          c = new self.URL(u.URI, n.url).href;
        } catch (d) {
          this.warn(`Could not construct new URL for Rendition Report: ${d}`),
            (c = u.URI || "");
        }
        if (c === e) {
          o = l;
          break;
        }
        c === e.substring(0, c.length) && (o = l);
      }
      if (o !== -1) {
        const l = i[o],
          u = parseInt(l["LAST-MSN"]) || (n == null ? void 0 : n.lastPartSn);
        let c =
          parseInt(l["LAST-PART"]) || (n == null ? void 0 : n.lastPartIndex);
        if (this.hls.config.lowLatencyMode) {
          const h = Math.min(n.age - n.partTarget, n.targetduration);
          c >= 0 && h > n.partTarget && (c += 1);
        }
        const d = r && kRe(r);
        return new IRe(u, c >= 0 ? c : void 0, d);
      }
    }
  }
  loadPlaylist(e) {
    this.clearTimer();
  }
  loadingPlaylist(e, n) {
    this.clearTimer();
  }
  shouldLoadPlaylist(e) {
    return this.canLoad && !!e && !!e.url && (!e.details || e.details.live);
  }
  getUrlWithDirectives(e, n) {
    if (n)
      try {
        return n.addDirectives(e);
      } catch (r) {
        this.warn(
          `Could not construct new URL with HLS Delivery Directives: ${r}`
        );
      }
    return e;
  }
  playlistLoaded(e, n, r) {
    const { details: i, stats: o } = n,
      l = self.performance.now(),
      u = o.loading.first ? Math.max(0, l - o.loading.first) : 0;
    i.advancedDateTime = Date.now() - u;
    const c = this.hls.config.timelineOffset;
    if (c !== i.appliedTimelineOffset) {
      const d = Math.max(c || 0, 0);
      (i.appliedTimelineOffset = d),
        i.fragments.forEach((h) => {
          h.start = h.playlistOffset + d;
        });
    }
    if (i.live || (r != null && r.live)) {
      const d = "levelInfo" in n ? n.levelInfo : n.track;
      i.reloaded(r),
        r && i.fragments.length > 0 && HCn(r, i),
        i.requestScheduled === -1 && (i.requestScheduled = o.loading.start);
      const h = this.hls.mainForwardBufferInfo,
        f = h ? h.end - h.len : 0,
        p = jCn(i, 1e3 * (i.edge - f));
      if (
        (i.requestScheduled + p < l
          ? (i.requestScheduled = l)
          : (i.requestScheduled += p),
        this.log(
          `live playlist ${e} ${
            i.advanced
              ? "REFRESHED " + i.lastPartSn + "-" + i.lastPartIndex
              : i.updated
              ? "UPDATED"
              : "MISSED"
          }`
        ),
        !this.canLoad || !i.live)
      )
        return;
      let g, y, v;
      if (i.canBlockReload && i.endSN && i.advanced) {
        const b = this.hls.config.lowLatencyMode,
          w = i.lastPartSn,
          k = i.endSN,
          D = i.lastPartIndex,
          $ = w === k;
        D !== -1
          ? $
            ? ((y = k + 1), (v = b ? 0 : D))
            : ((y = w), (v = b ? D + 1 : i.maxPartIndex))
          : (y = k + 1);
        const N = i.age,
          P = N + i.ageHeader;
        let I = Math.min(P - i.partTarget, 1.5 * i.targetduration);
        if (I > 0) {
          if (P > 3 * i.targetduration)
            this.log(
              `Playlist last advanced ${N.toFixed(
                2
              )}s ago. Omitting segment and part directives.`
            ),
              (y = void 0),
              (v = void 0);
          else if (r != null && r.tuneInGoal && P - i.partTarget > r.tuneInGoal)
            this.warn(
              `CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${I} with playlist age: ${i.age}`
            ),
              (I = 0);
          else {
            const O = Math.floor(I / i.targetduration);
            (y += O),
              v !== void 0 &&
                (v += Math.round((I % i.targetduration) / i.partTarget)),
              this.log(
                `CDN Tune-in age: ${i.ageHeader}s last advanced ${N.toFixed(
                  2
                )}s goal: ${I} skip sn ${O} to part ${v}`
              );
          }
          i.tuneInGoal = I;
        }
        if (
          ((g = this.getDeliveryDirectives(i, n.deliveryDirectives, y, v)),
          b || !$)
        )
          return (i.requestScheduled = l), void this.loadingPlaylist(d, g);
      } else
        (i.canBlockReload || i.canSkipUntil) &&
          (g = this.getDeliveryDirectives(i, n.deliveryDirectives, y, v));
      g &&
        y !== void 0 &&
        i.canBlockReload &&
        (i.requestScheduled = o.loading.first + Math.max(p - 2 * u, p / 2)),
        this.scheduleLoading(d, g, i);
    } else this.clearTimer();
  }
  scheduleLoading(e, n, r) {
    const i = r || e.details;
    if (!i) return void this.loadingPlaylist(e, n);
    const o = self.performance.now(),
      l = i.requestScheduled;
    if (o >= l) return void this.loadingPlaylist(e, n);
    const u = l - o;
    this.log(
      `reload live playlist ${e.name || e.bitrate + "bps"} in ${Math.round(
        u
      )} ms`
    ),
      this.clearTimer(),
      (this.timer = self.setTimeout(() => this.loadingPlaylist(e, n), u));
  }
  getDeliveryDirectives(e, n, r, i) {
    let o = kRe(e);
    return (
      n != null &&
        n.skip &&
        e.deltaUpdateFailed &&
        ((r = n.msn), (i = n.part), (o = zF.No)),
      new IRe(r, i, o)
    );
  }
  checkRetry(e) {
    const n = e.details,
      r = l8(e),
      i = e.errorAction,
      { action: o, retryCount: l = 0, retryConfig: u } = i || {},
      c =
        !!i &&
        !!u &&
        (o === qd.RetryRequest ||
          (!i.resolved && o === qd.SendAlternateToPenaltyBox));
    if (c) {
      var d;
      if (l >= u.maxNumRetry) return !1;
      if (r && (d = e.context) != null && d.deliveryDirectives)
        this.warn(
          `Retrying playlist loading ${l + 1}/${
            u.maxNumRetry
          } after "${n}" without delivery-directives`
        ),
          this.loadPlaylist();
      else {
        const h = Cue(u, l);
        this.clearTimer(),
          (this.timer = self.setTimeout(() => this.loadPlaylist(), h)),
          this.warn(
            `Retrying playlist loading ${l + 1}/${
              u.maxNumRetry
            } after "${n}" in ${h}ms`
          );
      }
      (e.levelRetry = !0), (i.resolved = !0);
    }
    return c;
  }
}
class J$n extends Vje {
  constructor(e) {
    super(e, "audio-track-controller"),
      (this.tracks = []),
      (this.groupIds = null),
      (this.tracksInGroup = []),
      (this.trackId = -1),
      (this.currentTrack = null),
      (this.selectDefaultTrack = !0),
      this.registerListeners();
  }
  registerListeners() {
    const { hls: e } = this;
    e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.on(Tt.LEVEL_LOADING, this.onLevelLoading, this),
      e.on(Tt.LEVEL_SWITCHING, this.onLevelSwitching, this),
      e.on(Tt.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
      e.on(Tt.ERROR, this.onError, this);
  }
  unregisterListeners() {
    const { hls: e } = this;
    e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.off(Tt.LEVEL_LOADING, this.onLevelLoading, this),
      e.off(Tt.LEVEL_SWITCHING, this.onLevelSwitching, this),
      e.off(Tt.AUDIO_TRACK_LOADED, this.onAudioTrackLoaded, this),
      e.off(Tt.ERROR, this.onError, this);
  }
  destroy() {
    this.unregisterListeners(),
      (this.tracks.length = 0),
      (this.tracksInGroup.length = 0),
      (this.currentTrack = null),
      super.destroy();
  }
  onManifestLoading() {
    (this.tracks = []),
      (this.tracksInGroup = []),
      (this.groupIds = null),
      (this.currentTrack = null),
      (this.trackId = -1),
      (this.selectDefaultTrack = !0);
  }
  onManifestParsed(e, n) {
    this.tracks = n.audioTracks || [];
  }
  onAudioTrackLoaded(e, n) {
    const { id: r, groupId: i, details: o } = n,
      l = this.tracksInGroup[r];
    if (!l || l.groupId !== i)
      return void this.warn(
        `Audio track with id:${r} and group:${i} not found in active group ${
          l == null ? void 0 : l.groupId
        }`
      );
    const u = l.details;
    (l.details = n.details),
      this.log(
        `Audio track ${r} "${l.name}" lang:${l.lang} group:${i} loaded [${o.startSN}-${o.endSN}]`
      ),
      r === this.trackId && this.playlistLoaded(r, n, u);
  }
  onLevelLoading(e, n) {
    this.switchLevel(n.level);
  }
  onLevelSwitching(e, n) {
    this.switchLevel(n.level);
  }
  switchLevel(e) {
    const n = this.hls.levels[e];
    if (!n) return;
    const r = n.audioGroups || null,
      i = this.groupIds;
    let o = this.currentTrack;
    if (
      !r ||
      (i == null ? void 0 : i.length) !== (r == null ? void 0 : r.length) ||
      (r != null && r.some((u) => (i == null ? void 0 : i.indexOf(u)) === -1))
    ) {
      (this.groupIds = r), (this.trackId = -1), (this.currentTrack = null);
      const u = this.tracks.filter((p) => !r || r.indexOf(p.groupId) !== -1);
      if (u.length)
        this.selectDefaultTrack &&
          !u.some((p) => p.default) &&
          (this.selectDefaultTrack = !1),
          u.forEach((p, g) => {
            p.id = g;
          });
      else if (!o && !this.tracksInGroup.length) return;
      this.tracksInGroup = u;
      const c = this.hls.config.audioPreference;
      if (!o && c) {
        const p = uv(c, u, iw);
        if (p > -1) o = u[p];
        else {
          const g = uv(c, this.tracks);
          o = this.tracks[g];
        }
      }
      let d = this.findTrackId(o);
      d === -1 && o && (d = this.findTrackId(null));
      const h = { audioTracks: u };
      this.log(
        `Updating audio tracks, ${u.length} track(s) found in group(s): ${
          r == null ? void 0 : r.join(",")
        }`
      ),
        this.hls.trigger(Tt.AUDIO_TRACKS_UPDATED, h);
      const f = this.trackId;
      if (d !== -1 && f === -1) this.setAudioTrack(d);
      else if (u.length && f === -1) {
        var l;
        const p = new Error(
          `No audio track selected for current audio group-ID(s): ${
            (l = this.groupIds) == null ? void 0 : l.join(",")
          } track count: ${u.length}`
        );
        this.warn(p.message),
          this.hls.trigger(Tt.ERROR, {
            type: ro.MEDIA_ERROR,
            details: Ir.AUDIO_TRACK_LOAD_ERROR,
            fatal: !0,
            error: p,
          });
      }
    }
  }
  onError(e, n) {
    !n.fatal &&
      n.context &&
      (n.context.type !== B1.AUDIO_TRACK ||
        n.context.id !== this.trackId ||
        (this.groupIds && this.groupIds.indexOf(n.context.groupId) === -1) ||
        this.checkRetry(n));
  }
  get allAudioTracks() {
    return this.tracks;
  }
  get audioTracks() {
    return this.tracksInGroup;
  }
  get audioTrack() {
    return this.trackId;
  }
  set audioTrack(e) {
    (this.selectDefaultTrack = !1), this.setAudioTrack(e);
  }
  setAudioOption(e) {
    const n = this.hls;
    if (((n.config.audioPreference = e), e)) {
      const r = this.allAudioTracks;
      if (((this.selectDefaultTrack = !1), r.length)) {
        const i = this.currentTrack;
        if (i && lI(e, i, iw)) return i;
        const o = uv(e, this.tracksInGroup, iw);
        if (o > -1) {
          const l = this.tracksInGroup[o];
          return this.setAudioTrack(o), l;
        }
        if (i) {
          let l = n.loadLevel;
          l === -1 && (l = n.firstAutoLevel);
          const u = jMn(e, n.levels, r, l, iw);
          if (u === -1) return null;
          n.nextLoadLevel = u;
        }
        if (e.channels || e.audioCodec) {
          const l = uv(e, r);
          if (l > -1) return r[l];
        }
      }
    }
    return null;
  }
  setAudioTrack(e) {
    const n = this.tracksInGroup;
    if (e < 0 || e >= n.length)
      return void this.warn(`Invalid audio track id: ${e}`);
    this.selectDefaultTrack = !1;
    const r = this.currentTrack,
      i = n[e],
      o = i.details && !i.details.live;
    if (
      (e === this.trackId && i === r && o) ||
      (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(Tt.AUDIO_TRACK_SWITCHING, pl({}, i)),
      o)
    )
      return;
    const l = this.switchParams(
      i.url,
      r == null ? void 0 : r.details,
      i.details
    );
    this.loadPlaylist(l);
  }
  findTrackId(e) {
    const n = this.tracksInGroup;
    for (let r = 0; r < n.length; r++) {
      const i = n[r];
      if ((!this.selectDefaultTrack || i.default) && (!e || lI(e, i, iw)))
        return r;
    }
    if (e) {
      const {
        name: r,
        lang: i,
        assocLang: o,
        characteristics: l,
        audioCodec: u,
        channels: c,
      } = e;
      for (let d = 0; d < n.length; d++)
        if (
          lI(
            {
              name: r,
              lang: i,
              assocLang: o,
              characteristics: l,
              audioCodec: u,
              channels: c,
            },
            n[d],
            iw
          )
        )
          return d;
      for (let d = 0; d < n.length; d++) {
        const h = n[d];
        if (
          rD(e.attrs, h.attrs, [
            "LANGUAGE",
            "ASSOC-LANGUAGE",
            "CHARACTERISTICS",
          ])
        )
          return d;
      }
      for (let d = 0; d < n.length; d++) {
        const h = n[d];
        if (rD(e.attrs, h.attrs, ["LANGUAGE"])) return d;
      }
    }
    return -1;
  }
  loadPlaylist(e) {
    super.loadPlaylist();
    const n = this.currentTrack;
    this.shouldLoadPlaylist(n) &&
      WMn(n.url, this.hls) &&
      this.scheduleLoading(n, e);
  }
  loadingPlaylist(e, n) {
    super.loadingPlaylist(e, n);
    const r = e.id,
      i = e.groupId,
      o = this.getUrlWithDirectives(e.url, n),
      l = e.details,
      u = l == null ? void 0 : l.age;
    this.log(
      `Loading audio-track ${r} "${e.name}" lang:${e.lang} group:${i}${
        (n == null ? void 0 : n.msn) !== void 0
          ? " at sn " + n.msn + " part " + n.part
          : ""
      }${
        u && l.live
          ? " age " + u.toFixed(1) + ((l.type && " " + l.type) || "")
          : ""
      } ${o}`
    ),
      this.hls.trigger(Tt.AUDIO_TRACK_LOADING, {
        url: o,
        id: r,
        groupId: i,
        deliveryDirectives: n || null,
        track: e,
      });
  }
}
class q$n {
  constructor(e) {
    (this.tracks = void 0),
      (this.queues = { video: [], audio: [], audiovideo: [] }),
      (this.tracks = e);
  }
  destroy() {
    this.tracks = this.queues = null;
  }
  append(e, n, r) {
    if (this.queues === null || this.tracks === null) return;
    const i = this.queues[n];
    i.push(e), i.length !== 1 || r || this.executeNext(n);
  }
  appendBlocker(e) {
    return new Promise((n) => {
      const r = {
        label: "async-blocker",
        execute: n,
        onStart: () => {},
        onComplete: () => {},
        onError: () => {},
      };
      this.append(r, e);
    });
  }
  prependBlocker(e) {
    return new Promise((n) => {
      if (this.queues) {
        const r = {
          label: "async-blocker-prepend",
          execute: n,
          onStart: () => {},
          onComplete: () => {},
          onError: () => {},
        };
        this.queues[e].unshift(r);
      }
    });
  }
  removeBlockers() {
    this.queues !== null &&
      [this.queues.video, this.queues.audio, this.queues.audiovideo].forEach(
        (e) => {
          var n;
          const r = (n = e[0]) == null ? void 0 : n.label;
          (r !== "async-blocker" && r !== "async-blocker-prepend") ||
            (e[0].execute(), e.splice(0, 1));
        }
      );
  }
  unblockAudio(e) {
    this.queues !== null &&
      this.queues.audio[0] === e &&
      this.shiftAndExecuteNext("audio");
  }
  executeNext(e) {
    if (this.queues === null || this.tracks === null) return;
    const n = this.queues[e];
    if (n.length) {
      const i = n[0];
      try {
        i.execute();
      } catch (o) {
        var r;
        if ((i.onError(o), this.queues === null || this.tracks === null))
          return;
        const l = (r = this.tracks[e]) == null ? void 0 : r.buffer;
        (l != null && l.updating) || this.shiftAndExecuteNext(e);
      }
    }
  }
  shiftAndExecuteNext(e) {
    this.queues !== null && (this.queues[e].shift(), this.executeNext(e));
  }
  current(e) {
    var n;
    return ((n = this.queues) == null ? void 0 : n[e][0]) || null;
  }
  toString() {
    const { queues: e, tracks: n } = this;
    return e === null || n === null
      ? "<destroyed>"
      : `
${this.list("video")}
${this.list("audio")}
${this.list("audiovideo")}}`;
  }
  list(e) {
    var n, r;
    return ((n = this.queues) != null && n[e]) ||
      ((r = this.tracks) != null && r[e])
      ? `${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`
      : "";
  }
  listSbInfo(e) {
    var n;
    const r = (n = this.tracks) == null ? void 0 : n[e],
      i = r == null ? void 0 : r.buffer;
    return i
      ? `SourceBuffer${i.updating ? " updating" : ""}${
          r.ended ? " ended" : ""
        }${r.ending ? " ending" : ""}`
      : "none";
  }
  listOps(e) {
    var n;
    return (
      ((n = this.queues) == null
        ? void 0
        : n[e].map((r) => r.label).join(", ")) || ""
    );
  }
}
const qRe = /(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;
class exn extends Error {
  constructor(e) {
    super(e), (this.name = "HlsJsTrackRemovedError");
  }
}
class txn extends _b {
  constructor(e, n) {
    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 = (r) => {
        var i;
        this.hls &&
          ((i = this.mediaSource) == null ? void 0 : i.readyState) === "open" &&
          this.hls.pauseBuffering();
      }),
      (this._onStartStreaming = (r) => {
        this.hls && this.hls.resumeBuffering();
      }),
      (this._onMediaSourceOpen = (r) => {
        const { media: i, mediaSource: o } = this;
        r && this.log("Media source opened"),
          i &&
            o &&
            (i.removeEventListener("emptied", this._onMediaEmptied),
            this.updateDuration(),
            this.hls.trigger(Tt.MEDIA_ATTACHED, { media: i, mediaSource: o }),
            o.removeEventListener("sourceopen", this._onMediaSourceOpen),
            this.mediaSource !== null && this.checkPendingTracks());
      }),
      (this._onMediaSourceClose = () => {
        this.log("Media source closed");
      }),
      (this._onMediaSourceEnded = () => {
        this.log("Media source ended");
      }),
      (this._onMediaEmptied = () => {
        const { mediaSrc: r, _objectUrl: i } = this;
        r !== i &&
          this.error(
            `Media element src was set while attaching MediaSource (${i} > ${r})`
          );
      }),
      (this.hls = e),
      (this.fragmentTracker = n),
      (this.appendSource = PMn(iL(e.config.preferManagedMediaSource))),
      this.initTracks(),
      this.registerListeners();
  }
  hasSourceTypes() {
    return Object.keys(this.tracks).length > 0;
  }
  destroy() {
    this.unregisterListeners(),
      (this.details = null),
      (this.lastMpegAudioChunk = this.blockedAudioAppend = null),
      (this.transferData = this.overrides = void 0),
      this.operationQueue &&
        (this.operationQueue.destroy(), (this.operationQueue = null)),
      (this.hls = this.fragmentTracker = null),
      (this._onMediaSourceOpen = this._onMediaSourceClose = null),
      (this._onMediaSourceEnded = null),
      (this._onStartStreaming = this._onEndStreaming = null);
  }
  registerListeners() {
    const { hls: e } = this;
    e.on(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.on(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.on(Tt.BUFFER_RESET, this.onBufferReset, this),
      e.on(Tt.BUFFER_APPENDING, this.onBufferAppending, this),
      e.on(Tt.BUFFER_CODECS, this.onBufferCodecs, this),
      e.on(Tt.BUFFER_EOS, this.onBufferEos, this),
      e.on(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this),
      e.on(Tt.LEVEL_UPDATED, this.onLevelUpdated, this),
      e.on(Tt.FRAG_PARSED, this.onFragParsed, this),
      e.on(Tt.FRAG_CHANGED, this.onFragChanged, this),
      e.on(Tt.ERROR, this.onError, this);
  }
  unregisterListeners() {
    const { hls: e } = this;
    e.off(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.off(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.off(Tt.BUFFER_RESET, this.onBufferReset, this),
      e.off(Tt.BUFFER_APPENDING, this.onBufferAppending, this),
      e.off(Tt.BUFFER_CODECS, this.onBufferCodecs, this),
      e.off(Tt.BUFFER_EOS, this.onBufferEos, this),
      e.off(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this),
      e.off(Tt.LEVEL_UPDATED, this.onLevelUpdated, this),
      e.off(Tt.FRAG_PARSED, this.onFragParsed, this),
      e.off(Tt.FRAG_CHANGED, this.onFragChanged, this),
      e.off(Tt.ERROR, this.onError, this);
  }
  transferMedia() {
    const { media: e, mediaSource: n } = this;
    if (!e) return null;
    const r = {};
    if (this.operationQueue) {
      const o = this.isUpdating();
      o || this.operationQueue.removeBlockers();
      const l = this.isQueued();
      (o || l) &&
        this.warn(
          `Transfering MediaSource with${l ? " operations in queue" : ""}${
            o ? " updating SourceBuffer(s)" : ""
          } ${this.operationQueue}`
        ),
        this.operationQueue.destroy();
    }
    const i = this.transferData;
    return (
      !this.sourceBufferCount && i && i.mediaSource === n
        ? du(r, i.tracks)
        : this.sourceBuffers.forEach((o) => {
            const [l] = o;
            l && ((r[l] = du({}, this.tracks[l])), this.removeBuffer(l)),
              (o[0] = o[1] = null);
          }),
      { media: e, mediaSource: n, tracks: r }
    );
  }
  initTracks() {
    (this.sourceBuffers = [
      [null, null],
      [null, null],
    ]),
      (this.tracks = {}),
      this.resetQueue(),
      this.resetAppendErrors(),
      (this.lastMpegAudioChunk = this.blockedAudioAppend = null),
      (this.lastVideoAppendEnd = 0);
  }
  onManifestLoading() {
    (this.bufferCodecEventsTotal = 0), (this.details = null);
  }
  onManifestParsed(e, n) {
    var r;
    let i = 2;
    ((n.audio && !n.video) || !n.altAudio) && (i = 1),
      (this.bufferCodecEventsTotal = i),
      this.log(`${i} bufferCodec event(s) expected.`),
      (r = this.transferData) != null &&
        r.mediaSource &&
        this.sourceBufferCount &&
        i &&
        this.bufferCreated();
  }
  onMediaAttaching(e, n) {
    const r = (this.media = n.media),
      i = iL(this.appendSource);
    if (((this.transferData = this.overrides = void 0), r && i)) {
      const o = !!n.mediaSource;
      (o || n.overrides) &&
        ((this.transferData = n), (this.overrides = n.overrides));
      const l = (this.mediaSource = n.mediaSource || new i());
      if ((this.assignMediaSource(l), o))
        (this._objectUrl = r.src), this.attachTransferred();
      else {
        const u = (this._objectUrl = self.URL.createObjectURL(l));
        if (this.appendSource)
          try {
            r.removeAttribute("src");
            const c = self.ManagedMediaSource;
            (r.disableRemotePlayback =
              r.disableRemotePlayback || (c && l instanceof c)),
              eAe(r),
              nxn(r, u),
              r.load();
          } catch {
            r.src = u;
          }
        else r.src = u;
      }
      r.addEventListener("emptied", this._onMediaEmptied);
    }
  }
  assignMediaSource(e) {
    var n, r;
    this.log(
      `${
        ((n = this.transferData) == null ? void 0 : n.mediaSource) === e
          ? "transferred"
          : "created"
      } media source: ${(r = e.constructor) == null ? void 0 : r.name}`
    ),
      e.addEventListener("sourceopen", this._onMediaSourceOpen),
      e.addEventListener("sourceended", this._onMediaSourceEnded),
      e.addEventListener("sourceclose", this._onMediaSourceClose),
      this.appendSource &&
        (e.addEventListener("startstreaming", this._onStartStreaming),
        e.addEventListener("endstreaming", this._onEndStreaming));
  }
  attachTransferred() {
    const e = this.media,
      n = this.transferData;
    if (!n || !e) return;
    const r = this.tracks,
      i = n.tracks,
      o = i ? Object.keys(i) : null,
      l = o ? o.length : 0,
      u = () => {
        this.media && this.mediaSourceOpenOrEnded && this._onMediaSourceOpen();
      };
    if (i && o && l) {
      if (!this.tracksReady)
        return (
          (this.hls.config.startFragPrefetch = !0),
          void this.log(
            "attachTransferred: waiting for SourceBuffer track info"
          )
        );
      if (
        (this.log(`attachTransferred: (bufferCodecEventsTotal ${
          this.bufferCodecEventsTotal
        })
required tracks: ${JSON.stringify(r, (c, d) =>
          c === "initSegment" ? void 0 : d
        )};
transfer tracks: ${JSON.stringify(i, (c, d) =>
          c === "initSegment" ? void 0 : d
        )}}`),
        !oje(i, r))
      ) {
        (n.mediaSource = null), (n.tracks = void 0);
        const c = e.currentTime,
          d = this.details,
          h = Math.max(c, (d == null ? void 0 : d.fragments[0].start) || 0);
        return h - c > 1
          ? void this.log(
              `attachTransferred: waiting for playback to reach new tracks start time ${c} -> ${h}`
            )
          : (this.warn(
              `attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(
                i
              )}"->"${Object.keys(r)}") start time: ${h} currentTime: ${c}`
            ),
            this.onMediaDetaching(Tt.MEDIA_DETACHING, {}),
            this.onMediaAttaching(Tt.MEDIA_ATTACHING, n),
            void (e.currentTime = h));
      }
      (this.transferData = void 0),
        o.forEach((c) => {
          const d = c,
            h = i[d];
          if (h) {
            const f = h.buffer;
            if (f) {
              const p = this.fragmentTracker,
                g = h.id;
              if (p.hasFragments(g) || p.hasParts(g)) {
                const b = Ul.getBuffered(f);
                p.detectEvictedFragments(d, b, g, null, !0);
              }
              const y = sK(d),
                v = [d, f];
              (this.sourceBuffers[y] = v),
                f.updating &&
                  this.operationQueue &&
                  this.operationQueue.prependBlocker(d),
                this.trackSourceBuffer(d, h);
            }
          }
        }),
        u(),
        this.bufferCreated();
    } else this.log("attachTransferred: MediaSource w/o SourceBuffers"), u();
  }
  get mediaSourceOpenOrEnded() {
    var e;
    const n = (e = this.mediaSource) == null ? void 0 : e.readyState;
    return n === "open" || n === "ended";
  }
  onMediaDetaching(e, n) {
    const r = !!n.transferMedia;
    this.transferData = this.overrides = void 0;
    const { media: i, mediaSource: o, _objectUrl: l } = this;
    if (o) {
      if ((this.log("media source " + (r ? "transferring" : "detaching")), r))
        this.sourceBuffers.forEach(([u]) => {
          u && this.removeBuffer(u);
        }),
          this.resetQueue();
      else {
        if (this.mediaSourceOpenOrEnded) {
          const u = o.readyState === "open";
          try {
            const c = o.sourceBuffers;
            for (let d = c.length; d--; )
              u && c[d].abort(), o.removeSourceBuffer(c[d]);
            u && o.endOfStream();
          } catch (c) {
            this.warn(
              `onMediaDetaching: ${c.message} while calling endOfStream`
            );
          }
        }
        this.sourceBufferCount && this.onBufferReset();
      }
      o.removeEventListener("sourceopen", this._onMediaSourceOpen),
        o.removeEventListener("sourceended", this._onMediaSourceEnded),
        o.removeEventListener("sourceclose", this._onMediaSourceClose),
        this.appendSource &&
          (o.removeEventListener("startstreaming", this._onStartStreaming),
          o.removeEventListener("endstreaming", this._onEndStreaming)),
        (this.mediaSource = null),
        (this._objectUrl = null);
    }
    i &&
      (i.removeEventListener("emptied", this._onMediaEmptied),
      r ||
        (l && self.URL.revokeObjectURL(l),
        this.mediaSrc === l
          ? (i.removeAttribute("src"), this.appendSource && eAe(i), i.load())
          : this.warn(
              "media|source.src was changed by a third party - skip cleanup"
            )),
      (this.media = null)),
      this.hls.trigger(Tt.MEDIA_DETACHED, n);
  }
  onBufferReset() {
    this.sourceBuffers.forEach(([e]) => {
      e && this.resetBuffer(e);
    }),
      this.initTracks();
  }
  resetBuffer(e) {
    var n;
    const r = (n = this.tracks[e]) == null ? void 0 : n.buffer;
    if ((this.removeBuffer(e), r))
      try {
        var i;
        (i = this.mediaSource) != null &&
          i.sourceBuffers.length &&
          this.mediaSource.removeSourceBuffer(r);
      } catch (o) {
        this.warn(`onBufferReset ${e}`, o);
      }
    delete this.tracks[e];
  }
  removeBuffer(e) {
    this.removeBufferListeners(e), (this.sourceBuffers[sK(e)] = [null, null]);
    const n = this.tracks[e];
    n && (n.buffer = void 0);
  }
  resetQueue() {
    this.operationQueue && this.operationQueue.destroy(),
      (this.operationQueue = new q$n(this.tracks));
  }
  onBufferCodecs(e, n) {
    const r = this.tracks,
      i = Object.keys(n);
    this.log(
      `BUFFER_CODECS: "${i}" (current SB count ${this.sourceBufferCount})`
    );
    const o =
        ("audiovideo" in n && (r.audio || r.video)) ||
        (r.audiovideo && ("audio" in n || "video" in n)),
      l = !o && this.sourceBufferCount && this.media && i.some((u) => !r[u]);
    o || l
      ? this.warn(
          `Unsupported transition between "${Object.keys(
            r
          )}" and "${i}" SourceBuffers`
        )
      : (i.forEach((u) => {
          var c, d, h;
          const f = n[u],
            { id: p, codec: g, levelCodec: y, container: v, metadata: b } = f;
          let w = r[u];
          const k =
              (c = this.transferData) == null || (d = c.tracks) == null
                ? void 0
                : d[u],
            D = k != null && k.buffer ? k : w,
            $ =
              (D == null ? void 0 : D.pendingCodec) ||
              (D == null ? void 0 : D.codec),
            N = D == null ? void 0 : D.levelCodec,
            P = !D || !!this.hls.config.assetPlayerId;
          w ||
            (w = r[u] =
              {
                buffer: void 0,
                listeners: [],
                codec: g,
                container: v,
                levelCodec: y,
                metadata: b,
                id: p,
              });
          const I = JW($, N),
            O = I == null ? void 0 : I.replace(qRe, "$1");
          let X = JW(g, y);
          const G = (h = X) == null ? void 0 : h.replace(qRe, "$1");
          X &&
            (O !== G || P) &&
            (u.slice(0, 5) === "audio" && (X = Bne(X, this.appendSource)),
            this.log(`switching codec ${$} to ${X}`),
            X !== (w.pendingCodec || w.codec) && (w.pendingCodec = X),
            (w.container = v),
            this.appendChangeType(u, v, X));
        }),
        (this.tracksReady || this.sourceBufferCount) &&
          (n.tracks = this.sourceBufferTracks),
        this.sourceBufferCount ||
          (this.mediaSourceOpenOrEnded && this.checkPendingTracks()));
  }
  get sourceBufferTracks() {
    return Object.keys(this.tracks).reduce((e, n) => {
      const r = this.tracks[n];
      return (
        (e[n] = {
          id: r.id,
          container: r.container,
          codec: r.codec,
          levelCodec: r.levelCodec,
        }),
        e
      );
    }, {});
  }
  appendChangeType(e, n, r) {
    const i = `${n};codecs=${r}`,
      o = {
        label: `change-type=${i}`,
        execute: () => {
          const l = this.tracks[e];
          if (l) {
            const u = l.buffer;
            u != null &&
              u.changeType &&
              (this.log(`changing ${e} sourceBuffer type to ${i}`),
              u.changeType(i),
              (l.codec = r),
              (l.container = n));
          }
          this.shiftAndExecuteNext(e);
        },
        onStart: () => {},
        onComplete: () => {},
        onError: (l) => {
          this.warn(`Failed to change ${e} SourceBuffer type`, l);
        },
      };
    this.append(o, e, this.isPending(this.tracks[e]));
  }
  blockAudio(e) {
    var n;
    const r = e.start,
      i = r + 0.05 * e.duration;
    if (
      ((n = this.fragmentTracker.getAppendedFrag(r, ko.MAIN)) == null
        ? void 0
        : n.gap) === !0
    )
      return;
    const o = {
      label: "block-audio",
      execute: () => {
        var l;
        const u = this.tracks.video;
        (this.lastVideoAppendEnd > i ||
          (u != null && u.buffer && Ul.isBuffered(u.buffer, i)) ||
          ((l = this.fragmentTracker.getAppendedFrag(i, ko.MAIN)) == null
            ? void 0
            : l.gap) === !0) &&
          ((this.blockedAudioAppend = null), this.shiftAndExecuteNext("audio"));
      },
      onStart: () => {},
      onComplete: () => {},
      onError: (l) => {
        this.warn("Error executing block-audio operation", l);
      },
    };
    (this.blockedAudioAppend = { op: o, frag: e }), this.append(o, "audio", !0);
  }
  unblockAudio() {
    const { blockedAudioAppend: e, operationQueue: n } = this;
    e && n && ((this.blockedAudioAppend = null), n.unblockAudio(e.op));
  }
  onBufferAppending(e, n) {
    const { tracks: r } = this,
      { data: i, type: o, parent: l, frag: u, part: c, chunkMeta: d } = n,
      h = d.buffering[o],
      f = u.sn,
      p = self.performance.now();
    h.start = p;
    const g = u.stats.buffering,
      y = c ? c.stats.buffering : null;
    g.start === 0 && (g.start = p), y && y.start === 0 && (y.start = p);
    const v = r.audio;
    let b = !1;
    o === "audio" &&
      (v == null ? void 0 : v.container) === "audio/mpeg" &&
      ((b =
        !this.lastMpegAudioChunk ||
        d.id === 1 ||
        this.lastMpegAudioChunk.sn !== d.sn),
      (this.lastMpegAudioChunk = d));
    const w = this.tracks.video,
      k = w == null ? void 0 : w.buffer;
    if (k && f !== "initSegment") {
      const N = c || u,
        P = this.blockedAudioAppend;
      if (o !== "audio" || l === "main" || this.blockedAudioAppend) {
        if (o === "video") {
          const I = N.end;
          if (P) {
            const O = P.frag.start;
            (I > O || I < this.lastVideoAppendEnd || Ul.isBuffered(k, O)) &&
              this.unblockAudio();
          }
          this.lastVideoAppendEnd = I;
        }
      } else {
        const I = N.start + 0.05 * N.duration,
          O = k.buffered,
          X = this.currentOp("video");
        O.length || X
          ? !X &&
            !Ul.isBuffered(k, I) &&
            this.lastVideoAppendEnd < I &&
            this.blockAudio(N)
          : this.blockAudio(N);
      }
    }
    const D = (c || u).start,
      $ = {
        label: `append-${o}`,
        execute: () => {
          if (((h.executeStart = self.performance.now()), b)) {
            const N = this.tracks[o];
            if (N) {
              const P = N.buffer;
              if (P) {
                const I = D - P.timestampOffset;
                Math.abs(I) >= 0.1 &&
                  (this.log(
                    `Updating audio SourceBuffer timestampOffset to ${D} (delta: ${I}) sn: ${f})`
                  ),
                  (P.timestampOffset = D));
              }
            }
          }
          this.appendExecutor(i, o);
        },
        onStart: () => {},
        onComplete: () => {
          const N = self.performance.now();
          (h.executeEnd = h.end = N),
            g.first === 0 && (g.first = N),
            y && y.first === 0 && (y.first = N);
          const P = {};
          this.sourceBuffers.forEach(([I, O]) => {
            I && (P[I] = Ul.getBuffered(O));
          }),
            (this.appendErrors[o] = 0),
            o === "audio" || o === "video"
              ? (this.appendErrors.audiovideo = 0)
              : ((this.appendErrors.audio = 0), (this.appendErrors.video = 0)),
            this.hls.trigger(Tt.BUFFER_APPENDED, {
              type: o,
              frag: u,
              part: c,
              chunkMeta: d,
              parent: u.type,
              timeRanges: P,
            });
        },
        onError: (N) => {
          var P;
          const I = {
            type: ro.MEDIA_ERROR,
            parent: u.type,
            details: Ir.BUFFER_APPEND_ERROR,
            sourceBufferName: o,
            frag: u,
            part: c,
            chunkMeta: d,
            error: N,
            err: N,
            fatal: !1,
          };
          if (N.code === DOMException.QUOTA_EXCEEDED_ERR)
            I.details = Ir.BUFFER_FULL_ERROR;
          else if (
            N.code !== DOMException.INVALID_STATE_ERR ||
            !this.mediaSourceOpenOrEnded ||
            ((P = this.media) != null && P.error)
          )
            if (N.name === "HlsJsTrackRemovedError")
              this.sourceBufferCount === 0
                ? (I.errorAction = aL(!0))
                : ++this.appendErrors[o];
            else {
              const O = ++this.appendErrors[o];
              this.warn(
                `Failed ${O}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`
              ),
                O >= this.hls.config.appendErrorMaxRetry && (I.fatal = !0);
            }
          else I.errorAction = aL(!0);
          this.hls.trigger(Tt.ERROR, I);
        },
      };
    this.append($, o, this.isPending(this.tracks[o]));
  }
  getFlushOp(e, n, r) {
    return (
      this.log(`queuing "${e}" remove ${n}-${r}`),
      {
        label: "remove",
        execute: () => {
          this.removeExecutor(e, n, r);
        },
        onStart: () => {},
        onComplete: () => {
          this.hls.trigger(Tt.BUFFER_FLUSHED, { type: e });
        },
        onError: (i) => {
          this.warn(`Failed to remove ${n}-${r} from "${e}" SourceBuffer`, i);
        },
      }
    );
  }
  onBufferFlushing(e, n) {
    const { type: r, startOffset: i, endOffset: o } = n;
    r
      ? this.append(this.getFlushOp(r, i, o), r)
      : this.sourceBuffers.forEach(([l]) => {
          l && this.append(this.getFlushOp(l, i, o), l);
        });
  }
  onFragParsed(e, n) {
    const { frag: r, part: i } = n,
      o = [],
      l = i ? i.elementaryStreams : r.elementaryStreams;
    l[rh.AUDIOVIDEO]
      ? o.push("audiovideo")
      : (l[rh.AUDIO] && o.push("audio"), l[rh.VIDEO] && o.push("video")),
      o.length === 0 &&
        this.warn(
          `Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`
        ),
      this.blockBuffers(() => {
        const u = self.performance.now();
        (r.stats.buffering.end = u), i && (i.stats.buffering.end = u);
        const c = i ? i.stats : r.stats;
        this.hls.trigger(Tt.FRAG_BUFFERED, {
          frag: r,
          part: i,
          stats: c,
          id: r.type,
        });
      }, o);
  }
  onFragChanged(e, n) {
    this.trimBuffers();
  }
  get bufferedToEnd() {
    return (
      this.sourceBufferCount > 0 &&
      !this.sourceBuffers.some(([e]) => {
        var n, r;
        return (
          e &&
          (!((n = this.tracks[e]) != null && n.ended) ||
            ((r = this.tracks[e]) == null ? void 0 : r.ending))
        );
      })
    );
  }
  onBufferEos(e, n) {
    var r;
    this.sourceBuffers.forEach(([o]) => {
      if (o) {
        const l = this.tracks[o];
        (n.type && n.type !== o) ||
          ((l.ending = !0),
          l.ended || ((l.ended = !0), this.log(`${o} buffer reached EOS`)));
      }
    });
    const i = ((r = this.overrides) == null ? void 0 : r.endOfStream) !== !1;
    this.sourceBufferCount > 0 &&
      !this.sourceBuffers.some(([o]) => {
        var l;
        return o && !((l = this.tracks[o]) != null && l.ended);
      }) &&
      (this.log("Queueing EOS"),
      this.blockUntilOpen(() => {
        if (
          (this.sourceBuffers.forEach(([o]) => {
            if (o !== null) {
              const l = this.tracks[o];
              l && (l.ending = !1);
            }
          }),
          i)
        ) {
          const { mediaSource: o } = this;
          if (!o || o.readyState !== "open")
            return void (
              o &&
              this.log(
                `Could not call mediaSource.endOfStream(). mediaSource.readyState: ${o.readyState}`
              )
            );
          this.log("Calling mediaSource.endOfStream()"), o.endOfStream();
        }
        this.hls.trigger(Tt.BUFFERED_TO_END, void 0);
      }));
  }
  onLevelUpdated(e, { details: n }) {
    n.fragments.length && ((this.details = n), this.updateDuration());
  }
  updateDuration() {
    const e = this.getDurationAndRange();
    e && this.blockUntilOpen(() => this.updateMediaSource(e));
  }
  onError(e, n) {
    if (n.details === Ir.BUFFER_APPEND_ERROR && n.frag) {
      var r;
      const i = (r = n.errorAction) == null ? void 0 : r.nextAutoLevel;
      Ta(i) && i !== n.frag.level && this.resetAppendErrors();
    }
  }
  resetAppendErrors() {
    this.appendErrors = { audio: 0, video: 0, audiovideo: 0 };
  }
  trimBuffers() {
    const { hls: e, details: n, media: r } = this;
    if (!r || n === null || !this.sourceBufferCount) return;
    const i = e.config,
      o = r.currentTime,
      l = n.levelTargetDuration,
      u =
        n.live && i.liveBackBufferLength !== null
          ? i.liveBackBufferLength
          : i.backBufferLength;
    if (Ta(u) && u >= 0) {
      const c = Math.max(u, l),
        d = Math.floor(o / l) * l - c;
      this.flushBackBuffer(o, l, d);
    }
    if (Ta(i.frontBufferFlushThreshold) && i.frontBufferFlushThreshold > 0) {
      const c = Math.max(i.maxBufferLength, i.frontBufferFlushThreshold),
        d = Math.max(c, l),
        h = Math.floor(o / l) * l + d;
      this.flushFrontBuffer(o, l, h);
    }
  }
  flushBackBuffer(e, n, r) {
    this.sourceBuffers.forEach(([i, o]) => {
      if (o) {
        const u = Ul.getBuffered(o);
        if (u.length > 0 && r > u.start(0)) {
          var l;
          this.hls.trigger(Tt.BACK_BUFFER_REACHED, { bufferEnd: r });
          const c = this.tracks[i];
          if ((l = this.details) != null && l.live)
            this.hls.trigger(Tt.LIVE_BACK_BUFFER_REACHED, { bufferEnd: r });
          else if (c != null && c.ended && u.end(u.length - 1) - e < 2 * n)
            return void this.log(
              `Cannot flush ${i} back buffer while SourceBuffer is in ended state`
            );
          this.hls.trigger(Tt.BUFFER_FLUSHING, {
            startOffset: 0,
            endOffset: r,
            type: i,
          });
        }
      }
    });
  }
  flushFrontBuffer(e, n, r) {
    this.sourceBuffers.forEach(([i, o]) => {
      if (o) {
        const l = Ul.getBuffered(o),
          u = l.length;
        if (u < 2) return;
        const c = l.start(u - 1),
          d = l.end(u - 1),
          h = this.tracks[i];
        if (r > c || (e >= c && e <= d)) return;
        if (h != null && h.ended && e - d < 2 * n)
          return void this.log(
            `Cannot flush ${i} front buffer while SourceBuffer is in ended state`
          );
        this.hls.trigger(Tt.BUFFER_FLUSHING, {
          startOffset: c,
          endOffset: 1 / 0,
          type: i,
        });
      }
    });
  }
  getDurationAndRange() {
    var e;
    const { details: n, mediaSource: r } = this;
    if (!n || !this.media || (r == null ? void 0 : r.readyState) !== "open")
      return null;
    const i = n.edge;
    if (n.live && this.hls.config.liveDurationInfinity) {
      if (
        ((r.duration = 1 / 0),
        n.fragments.length && n.live && r.setLiveSeekableRange)
      ) {
        const u = Math.max(0, n.fragmentStart);
        return { duration: 1 / 0, start: u, end: Math.max(u, i) };
      }
      return { duration: 1 / 0 };
    }
    const o = (e = this.overrides) == null ? void 0 : e.duration;
    if (o) return { duration: o };
    const l = this.media.duration;
    return (i > (Ta(r.duration) ? r.duration : 0) && i > l) || !Ta(l)
      ? { duration: i }
      : null;
  }
  updateMediaSource({ duration: e, start: n, end: r }) {
    const i = this.mediaSource;
    this.media &&
      i &&
      i.readyState === "open" &&
      (i.duration !== e &&
        (Ta(e) && this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),
        (i.duration = e)),
      n !== void 0 &&
        r !== void 0 &&
        (this.log(
          `MediaSource duration is set to ${i.duration}. Setting seekable range to ${n}-${r}.`
        ),
        i.setLiveSeekableRange(n, r)));
  }
  get tracksReady() {
    const e = this.pendingTrackCount;
    return (
      e > 0 &&
      (e >= this.bufferCodecEventsTotal ||
        this.isPending(this.tracks.audiovideo))
    );
  }
  checkPendingTracks() {
    const { bufferCodecEventsTotal: e, pendingTrackCount: n, tracks: r } = this;
    if (
      (this.log(
        `checkPendingTracks (pending: ${n} codec events expected: ${e}) ${JSON.stringify(
          r
        )}`
      ),
      this.tracksReady)
    ) {
      var i;
      const o = (i = this.transferData) == null ? void 0 : i.tracks;
      o && Object.keys(o).length
        ? this.attachTransferred()
        : (this.createSourceBuffers(), this.bufferCreated());
    }
  }
  bufferCreated() {
    if (this.sourceBufferCount) {
      const e = {};
      this.sourceBuffers.forEach(([n, r]) => {
        if (n) {
          const i = this.tracks[n];
          e[n] = {
            buffer: r,
            container: i.container,
            codec: i.codec,
            levelCodec: i.levelCodec,
            id: i.id,
            metadata: i.metadata,
          };
        }
      }),
        this.hls.trigger(Tt.BUFFER_CREATED, { tracks: e }),
        this.log(
          `SourceBuffers created. Running queue: ${this.operationQueue}`
        ),
        this.sourceBuffers.forEach(([n]) => {
          this.executeNext(n);
        });
    } else {
      const e = new Error("could not create source buffer for media codec(s)");
      this.hls.trigger(Tt.ERROR, {
        type: ro.MEDIA_ERROR,
        details: Ir.BUFFER_INCOMPATIBLE_CODECS_ERROR,
        fatal: !0,
        error: e,
        reason: e.message,
      });
    }
  }
  createSourceBuffers() {
    const { tracks: e, sourceBuffers: n, mediaSource: r } = this;
    if (!r)
      throw new Error("createSourceBuffers called when mediaSource was null");
    for (const i in e) {
      const o = i,
        l = e[o];
      if (this.isPending(l)) {
        const u = this.getTrackCodec(l, o),
          c = `${l.container};codecs=${u}`;
        (l.codec = u),
          this.log(
            `creating sourceBuffer(${c})${
              this.currentOp(o) ? " Queued" : ""
            } ${JSON.stringify(l)}`
          );
        try {
          const d = r.addSourceBuffer(c),
            h = sK(o),
            f = [o, d];
          (n[h] = f), (l.buffer = d);
        } catch (d) {
          this.error(`error while trying to add sourceBuffer: ${d.message}`),
            this.hls.trigger(Tt.ERROR, {
              type: ro.MEDIA_ERROR,
              details: Ir.BUFFER_ADD_CODEC_ERROR,
              fatal: !1,
              error: d,
              sourceBufferName: o,
              mimeType: c,
            });
          break;
        }
        this.trackSourceBuffer(o, l);
      }
    }
  }
  getTrackCodec(e, n) {
    const r = JW(e.codec, e.levelCodec);
    return r ? (n.slice(0, 5) === "audio" ? Bne(r, this.appendSource) : r) : "";
  }
  trackSourceBuffer(e, n) {
    const r = n.buffer;
    if (!r) return;
    const i = this.getTrackCodec(n, e);
    (this.tracks[e] = {
      buffer: r,
      codec: i,
      container: n.container,
      levelCodec: n.levelCodec,
      metadata: n.metadata,
      id: n.id,
      listeners: [],
    }),
      this.addBufferListener(e, "updatestart", this.onSBUpdateStart),
      this.addBufferListener(e, "updateend", this.onSBUpdateEnd),
      this.addBufferListener(e, "error", this.onSBUpdateError),
      this.appendSource &&
        this.addBufferListener(e, "bufferedchange", (o, l) => {
          const u = l.removedRanges;
          u != null &&
            u.length &&
            this.hls.trigger(Tt.BUFFER_FLUSHED, { type: o });
        });
  }
  get mediaSrc() {
    var e, n;
    const r =
      ((e = this.media) == null || (n = e.querySelector) == null
        ? void 0
        : n.call(e, "source")) || this.media;
    return r == null ? void 0 : r.src;
  }
  onSBUpdateStart(e) {
    const n = this.currentOp(e);
    n && n.onStart();
  }
  onSBUpdateEnd(e) {
    var n;
    if (((n = this.mediaSource) == null ? void 0 : n.readyState) === "closed")
      return void this.resetBuffer(e);
    const r = this.currentOp(e);
    r && (r.onComplete(), this.shiftAndExecuteNext(e));
  }
  onSBUpdateError(e, n) {
    var r;
    const i = new Error(
      `${e} SourceBuffer error. MediaSource readyState: ${
        (r = this.mediaSource) == null ? void 0 : r.readyState
      }`
    );
    this.error(`${i}`, n),
      this.hls.trigger(Tt.ERROR, {
        type: ro.MEDIA_ERROR,
        details: Ir.BUFFER_APPENDING_ERROR,
        sourceBufferName: e,
        error: i,
        fatal: !1,
      });
    const o = this.currentOp(e);
    o && o.onError(i);
  }
  removeExecutor(e, n, r) {
    const { media: i, mediaSource: o } = this,
      l = this.tracks[e],
      u = l == null ? void 0 : l.buffer;
    if (!i || !o || !u)
      return (
        this.warn(
          `Attempting to remove from the ${e} SourceBuffer, but it does not exist`
        ),
        void this.shiftAndExecuteNext(e)
      );
    const c = Ta(i.duration) ? i.duration : 1 / 0,
      d = Ta(o.duration) ? o.duration : 1 / 0,
      h = Math.max(0, n),
      f = Math.min(r, c, d);
    f > h && (!l.ending || l.ended)
      ? ((l.ended = !1),
        this.log(`Removing [${h},${f}] from the ${e} SourceBuffer`),
        u.remove(h, f))
      : this.shiftAndExecuteNext(e);
  }
  appendExecutor(e, n) {
    const r = this.tracks[n],
      i = r == null ? void 0 : r.buffer;
    if (!i)
      throw new exn(
        `Attempting to append to the ${n} SourceBuffer, but it does not exist`
      );
    (r.ending = !1), (r.ended = !1), i.appendBuffer(e);
  }
  blockUntilOpen(e) {
    this.isUpdating() || this.isQueued() ? this.blockBuffers(e) : e();
  }
  isUpdating() {
    return this.sourceBuffers.some(([e, n]) => e && n.updating);
  }
  isQueued() {
    return this.sourceBuffers.some(([e]) => e && !!this.currentOp(e));
  }
  isPending(e) {
    return !!e && !e.buffer;
  }
  blockBuffers(e, n = this.sourceBufferTypes) {
    if (!n.length)
      return (
        this.log("Blocking operation requested, but no SourceBuffers exist"),
        void Promise.resolve().then(e)
      );
    const { operationQueue: r } = this,
      i = n.map((o) => this.appendBlocker(o));
    n.length > 1 && this.blockedAudioAppend && this.unblockAudio(),
      Promise.all(i).then((o) => {
        r === this.operationQueue && (e(), this.stepOperationQueue(n));
      });
  }
  stepOperationQueue(e) {
    e.forEach((n) => {
      var r;
      const i = (r = this.tracks[n]) == null ? void 0 : r.buffer;
      i && !i.updating && this.shiftAndExecuteNext(n);
    });
  }
  append(e, n, r) {
    this.operationQueue && this.operationQueue.append(e, n, r);
  }
  appendBlocker(e) {
    if (this.operationQueue) return this.operationQueue.appendBlocker(e);
  }
  currentOp(e) {
    return this.operationQueue ? this.operationQueue.current(e) : null;
  }
  executeNext(e) {
    e && this.operationQueue && this.operationQueue.executeNext(e);
  }
  shiftAndExecuteNext(e) {
    this.operationQueue && this.operationQueue.shiftAndExecuteNext(e);
  }
  get pendingTrackCount() {
    return Object.keys(this.tracks).reduce(
      (e, n) => e + (this.isPending(this.tracks[n]) ? 1 : 0),
      0
    );
  }
  get sourceBufferCount() {
    return this.sourceBuffers.reduce((e, [n]) => e + (n ? 1 : 0), 0);
  }
  get sourceBufferTypes() {
    return this.sourceBuffers.map(([e]) => e).filter((e) => !!e);
  }
  addBufferListener(e, n, r) {
    const i = this.tracks[e];
    if (!i) return;
    const o = i.buffer;
    if (!o) return;
    const l = r.bind(this, e);
    i.listeners.push({ event: n, listener: l }), o.addEventListener(n, l);
  }
  removeBufferListeners(e) {
    const n = this.tracks[e];
    if (!n) return;
    const r = n.buffer;
    r &&
      (n.listeners.forEach((i) => {
        r.removeEventListener(i.event, i.listener);
      }),
      (n.listeners.length = 0));
  }
}
function eAe(t) {
  const e = t.querySelectorAll("source");
  [].slice.call(e).forEach((n) => {
    t.removeChild(n);
  });
}
function nxn(t, e) {
  const n = self.document.createElement("source");
  (n.type = "video/mp4"), (n.src = e), t.appendChild(n);
}
function sK(t) {
  return t === "audio" ? 1 : 0;
}
class Xue {
  constructor(e) {
    (this.hls = void 0),
      (this.autoLevelCapping = void 0),
      (this.firstLevel = void 0),
      (this.media = void 0),
      (this.restrictedLevels = void 0),
      (this.timer = void 0),
      (this.clientRect = void 0),
      (this.streamController = void 0),
      (this.hls = e),
      (this.autoLevelCapping = Number.POSITIVE_INFINITY),
      (this.firstLevel = -1),
      (this.media = null),
      (this.restrictedLevels = []),
      (this.timer = void 0),
      (this.clientRect = null),
      this.registerListeners();
  }
  setStreamController(e) {
    this.streamController = e;
  }
  destroy() {
    this.hls && this.unregisterListener(),
      this.timer && this.stopCapping(),
      (this.media = null),
      (this.clientRect = null),
      (this.hls = this.streamController = null);
  }
  registerListeners() {
    const { hls: e } = this;
    e.on(Tt.FPS_DROP_LEVEL_CAPPING, this.onFpsDropLevelCapping, this),
      e.on(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.on(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.on(Tt.LEVELS_UPDATED, this.onLevelsUpdated, this),
      e.on(Tt.BUFFER_CODECS, this.onBufferCodecs, this),
      e.on(Tt.MEDIA_DETACHING, this.onMediaDetaching, this);
  }
  unregisterListener() {
    const { hls: e } = this;
    e.off(Tt.FPS_DROP_LEVEL_CAPPING, this.onFpsDropLevelCapping, this),
      e.off(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.off(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.off(Tt.LEVELS_UPDATED, this.onLevelsUpdated, this),
      e.off(Tt.BUFFER_CODECS, this.onBufferCodecs, this),
      e.off(Tt.MEDIA_DETACHING, this.onMediaDetaching, this);
  }
  onFpsDropLevelCapping(e, n) {
    const r = this.hls.levels[n.droppedLevel];
    this.isLevelAllowed(r) &&
      this.restrictedLevels.push({
        bitrate: r.bitrate,
        height: r.height,
        width: r.width,
      });
  }
  onMediaAttaching(e, n) {
    (this.media = n.media instanceof HTMLVideoElement ? n.media : null),
      (this.clientRect = null),
      this.timer && this.hls.levels.length && this.detectPlayerSize();
  }
  onManifestParsed(e, n) {
    const r = this.hls;
    (this.restrictedLevels = []),
      (this.firstLevel = n.firstLevel),
      r.config.capLevelToPlayerSize && n.video && this.startCapping();
  }
  onLevelsUpdated(e, n) {
    this.timer && Ta(this.autoLevelCapping) && this.detectPlayerSize();
  }
  onBufferCodecs(e, n) {
    this.hls.config.capLevelToPlayerSize && n.video && this.startCapping();
  }
  onMediaDetaching() {
    this.stopCapping(), (this.media = null);
  }
  detectPlayerSize() {
    if (this.media) {
      if (this.mediaHeight <= 0 || this.mediaWidth <= 0)
        return void (this.clientRect = null);
      const e = this.hls.levels;
      if (e.length) {
        const n = this.hls,
          r = this.getMaxLevel(e.length - 1);
        r !== this.autoLevelCapping &&
          n.logger.log(
            `Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`
          ),
          (n.autoLevelCapping = r),
          n.autoLevelEnabled &&
            n.autoLevelCapping > this.autoLevelCapping &&
            this.streamController &&
            this.streamController.nextLevelSwitch(),
          (this.autoLevelCapping = n.autoLevelCapping);
      }
    }
  }
  getMaxLevel(e) {
    const n = this.hls.levels;
    if (!n.length) return -1;
    const r = n.filter((i, o) => this.isLevelAllowed(i) && o <= e);
    return (
      (this.clientRect = null),
      Xue.getMaxLevelByMediaSize(r, this.mediaWidth, this.mediaHeight)
    );
  }
  startCapping() {
    this.timer ||
      ((this.autoLevelCapping = Number.POSITIVE_INFINITY),
      self.clearInterval(this.timer),
      (this.timer = self.setInterval(this.detectPlayerSize.bind(this), 1e3)),
      this.detectPlayerSize());
  }
  stopCapping() {
    (this.restrictedLevels = []),
      (this.firstLevel = -1),
      (this.autoLevelCapping = Number.POSITIVE_INFINITY),
      this.timer && (self.clearInterval(this.timer), (this.timer = void 0));
  }
  getDimensions() {
    if (this.clientRect) return this.clientRect;
    const e = this.media,
      n = { width: 0, height: 0 };
    if (e) {
      const r = e.getBoundingClientRect();
      (n.width = r.width),
        (n.height = r.height),
        n.width ||
          n.height ||
          ((n.width = r.right - r.left || e.width || 0),
          (n.height = r.bottom - r.top || e.height || 0));
    }
    return (this.clientRect = n), n;
  }
  get mediaWidth() {
    return this.getDimensions().width * this.contentScaleFactor;
  }
  get mediaHeight() {
    return this.getDimensions().height * this.contentScaleFactor;
  }
  get contentScaleFactor() {
    let e = 1;
    if (!this.hls.config.ignoreDevicePixelRatio)
      try {
        e = self.devicePixelRatio;
      } catch {}
    return Math.min(e, this.hls.config.maxDevicePixelRatio);
  }
  isLevelAllowed(e) {
    return !this.restrictedLevels.some(
      (n) =>
        e.bitrate === n.bitrate && e.width === n.width && e.height === n.height
    );
  }
  static getMaxLevelByMediaSize(e, n, r) {
    if (e == null || !e.length) return -1;
    let i = e.length - 1;
    const o = Math.max(n, r);
    for (let c = 0; c < e.length; c += 1) {
      const d = e[c];
      if (
        (d.width >= o || d.height >= o) &&
        ((l = d),
        !(u = e[c + 1]) || l.width !== u.width || l.height !== u.height)
      ) {
        i = c;
        break;
      }
    }
    var l, u;
    return i;
  }
}
const rxn = {
    MANIFEST: "m",
    AUDIO: "a",
    VIDEO: "v",
    MUXED: "av",
    INIT: "i",
    CAPTION: "c",
    TIMED_TEXT: "tt",
    KEY: "k",
    OTHER: "o",
  },
  lf = rxn,
  ixn = { DASH: "d", HLS: "h", SMOOTH: "s", OTHER: "o" },
  axn = ixn,
  oxn = "CMCD-Object",
  sxn = "CMCD-Request",
  lxn = "CMCD-Session",
  uxn = "CMCD-Status",
  _C = { OBJECT: oxn, REQUEST: sxn, SESSION: lxn, STATUS: uxn },
  cxn = {
    [_C.OBJECT]: ["br", "d", "ot", "tb"],
    [_C.REQUEST]: ["bl", "dl", "mtp", "nor", "nrr", "su"],
    [_C.SESSION]: ["cid", "pr", "sf", "sid", "st", "v"],
    [_C.STATUS]: ["bs", "rtp"],
  };
class iD {
  constructor(e, n) {
    Array.isArray(e) && (e = e.map((r) => (r instanceof iD ? r : new iD(r)))),
      (this.value = e),
      (this.params = n);
  }
}
const dxn = "Dict";
function hxn(t) {
  return Array.isArray(t)
    ? JSON.stringify(t)
    : t instanceof Map
    ? "Map{}"
    : t instanceof Set
    ? "Set{}"
    : typeof t == "object"
    ? JSON.stringify(t)
    : String(t);
}
function fxn(t, e, n, r) {
  return new Error(`failed to ${t} "${hxn(e)}" as ${n}`, { cause: r });
}
function vv(t, e, n) {
  return fxn("serialize", t, e, n);
}
class zje {
  constructor(e) {
    this.description = e;
  }
}
const tAe = "Bare Item",
  pxn = "Boolean";
function gxn(t) {
  if (typeof t != "boolean") throw vv(t, pxn);
  return t ? "?1" : "?0";
}
const mxn = "Byte Sequence";
function yxn(t) {
  if (ArrayBuffer.isView(t) === !1) throw vv(t, mxn);
  return `:${v$n(t)}:`;
}
const vxn = "Integer";
function bxn(t) {
  return t < -999999999999999 || 999999999999999 < t;
}
function jje(t) {
  if (bxn(t)) throw vv(t, vxn);
  return t.toString();
}
function _xn(t) {
  return `@${jje(t.getTime() / 1e3)}`;
}
const Txn = "Decimal";
function Exn(t) {
  const e = Cje(t, 3);
  if (Math.floor(Math.abs(e)).toString().length > 12) throw vv(t, Txn);
  const n = e.toString();
  return n.includes(".") ? n : `${n}.0`;
}
const Sxn = "String",
  Rxn = /[\x00-\x1f\x7f]+/;
function Axn(t) {
  if (Rxn.test(t)) throw vv(t, Sxn);
  return `"${t.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
}
function wxn(t) {
  return t.description || t.toString().slice(7, -1);
}
const kxn = "Token";
function nAe(t) {
  const e = wxn(t);
  if (/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e) === !1) throw vv(e, kxn);
  return e;
}
function Wne(t) {
  switch (typeof t) {
    case "number":
      if (!Ta(t)) throw vv(t, tAe);
      return Number.isInteger(t) ? jje(t) : Exn(t);
    case "string":
      return Axn(t);
    case "symbol":
      return nAe(t);
    case "boolean":
      return gxn(t);
    case "object":
      if (t instanceof Date) return _xn(t);
      if (t instanceof Uint8Array) return yxn(t);
      if (t instanceof zje) return nAe(t);
    default:
      throw vv(t, tAe);
  }
}
const Ixn = "Key";
function Kne(t) {
  if (/^[a-z*][a-z0-9\-_.*]*$/.test(t) === !1) throw vv(t, Ixn);
  return t;
}
function Vue(t) {
  return t == null
    ? ""
    : Object.entries(t)
        .map(([e, n]) => (n === !0 ? `;${Kne(e)}` : `;${Kne(e)}=${Wne(n)}`))
        .join("");
}
function Wje(t) {
  return t instanceof iD ? `${Wne(t.value)}${Vue(t.params)}` : Wne(t);
}
function Dxn(t) {
  return `(${t.value.map(Wje).join(" ")})${Vue(t.params)}`;
}
function Pxn(t, e = { whitespace: !0 }) {
  if (typeof t != "object") throw vv(t, dxn);
  const n = t instanceof Map ? t.entries() : Object.entries(t),
    r = e != null && e.whitespace ? " " : "";
  return Array.from(n)
    .map(([i, o]) => {
      !(o instanceof iD) && (o = new iD(o));
      let l = Kne(i);
      return (
        o.value === !0
          ? (l += Vue(o.params))
          : ((l += "="),
            Array.isArray(o.value) ? (l += Dxn(o)) : (l += Wje(o))),
        l
      );
    })
    .join(`,${r}`);
}
function Mxn(t, e) {
  return Pxn(t, e);
}
function Cxn(t) {
  return t === "ot" || t === "sf" || t === "st";
}
function $xn(t) {
  return typeof t == "number" ? Ta(t) : t != null && t !== "" && t !== !1;
}
const KF = (t) => Math.round(t),
  xxn = (t, e) => (
    e != null && e.baseUrl && (t = b$n(t, e.baseUrl)), encodeURIComponent(t)
  ),
  m4 = (t) => 100 * KF(t / 100),
  Lxn = { br: KF, d: KF, bl: m4, dl: m4, mtp: m4, nor: xxn, rtp: m4, tb: KF };
function Oxn(t, e) {
  const n = {};
  if (t == null || typeof t != "object") return n;
  const r = Object.keys(t).sort(),
    i = du({}, Lxn, e == null ? void 0 : e.formatters),
    o = e == null ? void 0 : e.filter;
  return (
    r.forEach((l) => {
      if (o != null && o(l)) return;
      let u = t[l];
      const c = i[l];
      c && (u = c(u, e)),
        (l === "v" && u === 1) ||
          (l == "pr" && u === 1) ||
          ($xn(u) &&
            (Cxn(l) && typeof u == "string" && (u = new zje(u)), (n[l] = u)));
    }),
    n
  );
}
function Kje(t, e = {}) {
  return t ? Mxn(Oxn(t, e), du({ whitespace: !1 }, e)) : "";
}
function Gxn(t, e = {}) {
  const n = {};
  if (!t) return n;
  const r = Object.entries(t),
    i = Object.entries(cxn).concat(
      Object.entries((e == null ? void 0 : e.customHeaderMap) || {})
    ),
    o = r.reduce((l, u) => {
      var c, d;
      const [h, f] = u,
        p =
          ((c = i.find((g) => g[1].includes(h))) === null || c === void 0
            ? void 0
            : c[0]) || _C.REQUEST;
      return (
        ((d = l[p]) !== null && d !== void 0) || (l[p] = {}), (l[p][h] = f), l
      );
    }, {});
  return Object.entries(o).reduce((l, [u, c]) => ((l[u] = Kje(c, e)), l), n);
}
function Nxn(t, e, n) {
  return du(t, Gxn(e, n));
}
const Fxn = "CMCD";
function Uxn(t, e = {}) {
  if (!t) return "";
  const n = Kje(t, e);
  return `${Fxn}=${encodeURIComponent(n)}`;
}
const rAe = /CMCD=[^&#]+/;
function Bxn(t, e, n) {
  const r = Uxn(e, n);
  if (!r) return t;
  if (rAe.test(t)) return t.replace(rAe, r);
  const i = t.includes("?") ? "&" : "?";
  return `${t}${i}${r}`;
}
class Hxn {
  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 = (i) => {
        try {
          this.apply(i, { ot: lf.MANIFEST, su: !this.initialized });
        } catch (o) {
          this.hls.logger.warn("Could not generate manifest CMCD data.", o);
        }
      }),
      (this.applyFragmentData = (i) => {
        try {
          const { frag: o, part: l } = i,
            u = this.hls.levels[o.level],
            c = this.getObjectType(o),
            d = { d: 1e3 * (l || o).duration, ot: c };
          (c !== lf.VIDEO && c !== lf.AUDIO && c != lf.MUXED) ||
            ((d.br = u.bitrate / 1e3),
            (d.tb = this.getTopBandwidth(c) / 1e3),
            (d.bl = this.getBufferLength(c)));
          const h = l ? this.getNextPart(l) : this.getNextFrag(o);
          h != null && h.url && h.url !== o.url && (d.nor = h.url),
            this.apply(i, d);
        } catch (o) {
          this.hls.logger.warn("Could not generate segment CMCD data.", o);
        }
      }),
      (this.hls = e);
    const n = (this.config = e.config),
      { cmcd: r } = n;
    r != null &&
      ((n.pLoader = this.createPlaylistLoader()),
      (n.fLoader = this.createFragmentLoader()),
      (this.sid = r.sessionId || e.sessionId),
      (this.cid = r.contentId),
      (this.useHeaders = r.useHeaders === !0),
      (this.includeKeys = r.includeKeys),
      this.registerListeners());
  }
  registerListeners() {
    const e = this.hls;
    e.on(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.on(Tt.MEDIA_DETACHED, this.onMediaDetached, this),
      e.on(Tt.BUFFER_CREATED, this.onBufferCreated, this);
  }
  unregisterListeners() {
    const e = this.hls;
    e.off(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.off(Tt.MEDIA_DETACHED, this.onMediaDetached, this),
      e.off(Tt.BUFFER_CREATED, this.onBufferCreated, this);
  }
  destroy() {
    this.unregisterListeners(),
      this.onMediaDetached(),
      (this.hls = this.config = this.audioBuffer = this.videoBuffer = null),
      (this.onWaiting = this.onPlaying = this.media = null);
  }
  onMediaAttached(e, n) {
    (this.media = n.media),
      this.media.addEventListener("waiting", this.onWaiting),
      this.media.addEventListener("playing", this.onPlaying);
  }
  onMediaDetached() {
    this.media &&
      (this.media.removeEventListener("waiting", this.onWaiting),
      this.media.removeEventListener("playing", this.onPlaying),
      (this.media = null));
  }
  onBufferCreated(e, n) {
    var r, i;
    (this.audioBuffer = (r = n.tracks.audio) == null ? void 0 : r.buffer),
      (this.videoBuffer = (i = n.tracks.video) == null ? void 0 : i.buffer);
  }
  createData() {
    var e;
    return {
      v: 1,
      sf: axn.HLS,
      sid: this.sid,
      cid: this.cid,
      pr: (e = this.media) == null ? void 0 : e.playbackRate,
      mtp: this.hls.bandwidthEstimate / 1e3,
    };
  }
  apply(e, n = {}) {
    du(n, this.createData());
    const r = n.ot === lf.INIT || n.ot === lf.VIDEO || n.ot === lf.MUXED;
    this.starved && r && ((n.bs = !0), (n.su = !0), (this.starved = !1)),
      n.su == null && (n.su = this.buffering);
    const { includeKeys: i } = this;
    i &&
      (n = Object.keys(n).reduce(
        (l, u) => (i.includes(u) && (l[u] = n[u]), l),
        {}
      ));
    const o = { baseUrl: e.url };
    this.useHeaders
      ? (e.headers || (e.headers = {}), Nxn(e.headers, n, o))
      : (e.url = Bxn(e.url, n, o));
  }
  getNextFrag(e) {
    var n;
    const r = (n = this.hls.levels[e.level]) == null ? void 0 : n.details;
    if (r) {
      const i = e.sn - r.startSN;
      return r.fragments[i + 1];
    }
  }
  getNextPart(e) {
    var n, r;
    const { index: i, fragment: o } = e,
      l =
        (n = this.hls.levels[o.level]) == null || (r = n.details) == null
          ? void 0
          : r.partList;
    if (l) {
      const { sn: u } = o;
      for (let c = l.length - 1; c >= 0; c--) {
        const d = l[c];
        if (d.index === i && d.fragment.sn === u) return l[c + 1];
      }
    }
  }
  getObjectType(e) {
    const { type: n } = e;
    return n === "subtitle"
      ? lf.TIMED_TEXT
      : e.sn === "initSegment"
      ? lf.INIT
      : n === "audio"
      ? lf.AUDIO
      : n === "main"
      ? this.hls.audioTracks.length
        ? lf.VIDEO
        : lf.MUXED
      : void 0;
  }
  getTopBandwidth(e) {
    let n,
      r = 0;
    const i = this.hls;
    if (e === lf.AUDIO) n = i.audioTracks;
    else {
      const o = i.maxAutoLevel,
        l = o > -1 ? o + 1 : i.levels.length;
      n = i.levels.slice(0, l);
    }
    for (const o of n) o.bitrate > r && (r = o.bitrate);
    return r > 0 ? r : NaN;
  }
  getBufferLength(e) {
    const n = this.media,
      r = e === lf.AUDIO ? this.audioBuffer : this.videoBuffer;
    return !r || !n
      ? NaN
      : 1e3 * Ul.bufferInfo(r, n.currentTime, this.config.maxBufferHole).len;
  }
  createPlaylistLoader() {
    const { pLoader: e } = this.config,
      n = this.applyPlaylistData,
      r = e || this.config.loader;
    return class {
      constructor(i) {
        (this.loader = void 0), (this.loader = new r(i));
      }
      get stats() {
        return this.loader.stats;
      }
      get context() {
        return this.loader.context;
      }
      destroy() {
        this.loader.destroy();
      }
      abort() {
        this.loader.abort();
      }
      load(i, o, l) {
        n(i), this.loader.load(i, o, l);
      }
    };
  }
  createFragmentLoader() {
    const { fLoader: e } = this.config,
      n = this.applyFragmentData,
      r = e || this.config.loader;
    return class {
      constructor(i) {
        (this.loader = void 0), (this.loader = new r(i));
      }
      get stats() {
        return this.loader.stats;
      }
      get context() {
        return this.loader.context;
      }
      destroy() {
        this.loader.destroy();
      }
      abort() {
        this.loader.abort();
      }
      load(i, o, l) {
        n(i), this.loader.load(i, o, l);
      }
    };
  }
}
class Xxn extends _b {
  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();
  }
  registerListeners() {
    const e = this.hls;
    e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.MANIFEST_LOADED, this.onManifestLoaded, this),
      e.on(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.on(Tt.ERROR, this.onError, this);
  }
  unregisterListeners() {
    const e = this.hls;
    e &&
      (e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.MANIFEST_LOADED, this.onManifestLoaded, this),
      e.off(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.off(Tt.ERROR, this.onError, this));
  }
  pathways() {
    return (this.levels || []).reduce(
      (e, n) => (e.indexOf(n.pathwayId) === -1 && e.push(n.pathwayId), e),
      []
    );
  }
  get pathwayPriority() {
    return this._pathwayPriority;
  }
  set pathwayPriority(e) {
    this.updatePathwayPriority(e);
  }
  startLoad() {
    if (((this.started = !0), this.clearTimeout(), this.enabled && this.uri)) {
      if (this.updated) {
        const e = 1e3 * this.timeToLoad - (performance.now() - this.updated);
        if (e > 0) return void this.scheduleRefresh(this.uri, e);
      }
      this.loadSteeringManifest(this.uri);
    }
  }
  stopLoad() {
    (this.started = !1),
      this.loader && (this.loader.destroy(), (this.loader = null)),
      this.clearTimeout();
  }
  clearTimeout() {
    this.reloadTimer !== -1 &&
      (self.clearTimeout(this.reloadTimer), (this.reloadTimer = -1));
  }
  destroy() {
    this.unregisterListeners(),
      this.stopLoad(),
      (this.hls = null),
      (this.levels = this.audioTracks = this.subtitleTracks = null);
  }
  removeLevel(e) {
    const n = this.levels;
    n && (this.levels = n.filter((r) => r !== e));
  }
  onManifestLoading() {
    this.stopLoad(),
      (this.enabled = !0),
      (this.timeToLoad = 300),
      (this.updated = 0),
      (this.uri = null),
      (this.pathwayId = "."),
      (this.levels = this.audioTracks = this.subtitleTracks = null);
  }
  onManifestLoaded(e, n) {
    const { contentSteering: r } = n;
    r !== null &&
      ((this.pathwayId = r.pathwayId),
      (this.uri = r.uri),
      this.started && this.startLoad());
  }
  onManifestParsed(e, n) {
    (this.audioTracks = n.audioTracks),
      (this.subtitleTracks = n.subtitleTracks);
  }
  onError(e, n) {
    const { errorAction: r } = n;
    if (
      (r == null ? void 0 : r.action) === qd.SendAlternateToPenaltyBox &&
      r.flags === l0.MoveAllAlternatesMatchingHost
    ) {
      const i = this.levels;
      let o = this._pathwayPriority,
        l = this.pathwayId;
      if (n.context) {
        const { groupId: u, pathwayId: c, type: d } = n.context;
        u && i ? (l = this.getPathwayForGroupId(u, d, l)) : c && (l = c);
      }
      l in this.penalizedPathways ||
        (this.penalizedPathways[l] = performance.now()),
        !o && i && (o = this.pathways()),
        o &&
          o.length > 1 &&
          (this.updatePathwayPriority(o), (r.resolved = this.pathwayId !== l)),
        r.resolved ||
          this.warn(
            `Could not resolve ${n.details} ("${
              n.error.message
            }") with content-steering for Pathway: ${l} levels: ${
              i && i.length
            } priorities: ${JSON.stringify(o)} penalized: ${JSON.stringify(
              this.penalizedPathways
            )}`
          );
    }
  }
  filterParsedLevels(e) {
    this.levels = e;
    let n = this.getLevelsForPathway(this.pathwayId);
    if (n.length === 0) {
      const r = e[0].pathwayId;
      this.log(
        `No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${r}"`
      ),
        (n = this.getLevelsForPathway(r)),
        (this.pathwayId = r);
    }
    return (
      n.length !== e.length &&
        this.log(
          `Found ${n.length}/${e.length} levels in Pathway "${this.pathwayId}"`
        ),
      n
    );
  }
  getLevelsForPathway(e) {
    return this.levels === null
      ? []
      : this.levels.filter((n) => e === n.pathwayId);
  }
  updatePathwayPriority(e) {
    let n;
    this._pathwayPriority = e;
    const r = this.penalizedPathways,
      i = performance.now();
    Object.keys(r).forEach((o) => {
      i - r[o] > 3e5 && delete r[o];
    });
    for (let o = 0; o < e.length; o++) {
      const l = e[o];
      if (l in r) continue;
      if (l === this.pathwayId) return;
      const u = this.hls.nextLoadLevel,
        c = this.hls.levels[u];
      if (((n = this.getLevelsForPathway(l)), n.length > 0)) {
        this.log(`Setting Pathway to "${l}"`),
          (this.pathwayId = l),
          KCn(n),
          this.hls.trigger(Tt.LEVELS_UPDATED, { levels: n });
        const d = this.hls.levels[u];
        c &&
          d &&
          this.levels &&
          (d.attrs["STABLE-VARIANT-ID"] !== c.attrs["STABLE-VARIANT-ID"] &&
            d.bitrate !== c.bitrate &&
            this.log(
              `Unstable Pathways change from bitrate ${c.bitrate} to ${d.bitrate}`
            ),
          (this.hls.nextLoadLevel = u));
        break;
      }
    }
  }
  getPathwayForGroupId(e, n, r) {
    const i = this.getLevelsForPathway(r).concat(this.levels || []);
    for (let o = 0; o < i.length; o++)
      if (
        (n === B1.AUDIO_TRACK && i[o].hasAudioGroup(e)) ||
        (n === B1.SUBTITLE_TRACK && i[o].hasSubtitleGroup(e))
      )
        return i[o].pathwayId;
    return r;
  }
  clonePathways(e) {
    const n = this.levels;
    if (!n) return;
    const r = {},
      i = {};
    e.forEach((o) => {
      const { ID: l, "BASE-ID": u, "URI-REPLACEMENT": c } = o;
      if (n.some((h) => h.pathwayId === l)) return;
      const d = this.getLevelsForPathway(u).map((h) => {
        const f = new x5(h.attrs);
        f["PATHWAY-ID"] = l;
        const p = f.AUDIO && `${f.AUDIO}_clone_${l}`,
          g = f.SUBTITLES && `${f.SUBTITLES}_clone_${l}`;
        p && ((r[f.AUDIO] = p), (f.AUDIO = p)),
          g && ((i[f.SUBTITLES] = g), (f.SUBTITLES = g));
        const y = Zje(h.uri, f["STABLE-VARIANT-ID"], "PER-VARIANT-URIS", c),
          v = new s8({
            attrs: f,
            audioCodec: h.audioCodec,
            bitrate: h.bitrate,
            height: h.height,
            name: h.name,
            url: y,
            videoCodec: h.videoCodec,
            width: h.width,
          });
        if (h.audioGroups)
          for (let b = 1; b < h.audioGroups.length; b++)
            v.addGroupId("audio", `${h.audioGroups[b]}_clone_${l}`);
        if (h.subtitleGroups)
          for (let b = 1; b < h.subtitleGroups.length; b++)
            v.addGroupId("text", `${h.subtitleGroups[b]}_clone_${l}`);
        return v;
      });
      n.push(...d),
        iAe(this.audioTracks, r, c, l),
        iAe(this.subtitleTracks, i, c, l);
    });
  }
  loadSteeringManifest(e) {
    const n = this.hls.config,
      r = n.loader;
    let i;
    this.loader && this.loader.destroy(), (this.loader = new r(n));
    try {
      i = new self.URL(e);
    } catch {
      return (
        (this.enabled = !1),
        void this.log(`Failed to parse Steering Manifest URI: ${e}`)
      );
    }
    if (i.protocol !== "data:") {
      const h = 0 | (this.hls.bandwidthEstimate || n.abrEwmaDefaultEstimate);
      i.searchParams.set("_HLS_pathway", this.pathwayId),
        i.searchParams.set("_HLS_throughput", "" + h);
    }
    const o = { responseType: "json", url: i.href },
      l = n.steeringManifestLoadPolicy.default,
      u = l.errorRetry || l.timeoutRetry || {},
      c = {
        loadPolicy: l,
        timeout: l.maxLoadTimeMs,
        maxRetry: u.maxNumRetry || 0,
        retryDelay: u.retryDelayMs || 0,
        maxRetryDelay: u.maxRetryDelayMs || 0,
      },
      d = {
        onSuccess: (h, f, p, g) => {
          this.log(`Loaded steering manifest: "${i}"`);
          const y = h.data;
          if ((y == null ? void 0 : y.VERSION) !== 1)
            return void this.log(
              `Steering VERSION ${y.VERSION} not supported!`
            );
          (this.updated = performance.now()), (this.timeToLoad = y.TTL);
          const {
            "RELOAD-URI": v,
            "PATHWAY-CLONES": b,
            "PATHWAY-PRIORITY": w,
          } = y;
          if (v)
            try {
              this.uri = new self.URL(v, i).href;
            } catch {
              return (
                (this.enabled = !1),
                void this.log(
                  `Failed to parse Steering Manifest RELOAD-URI: ${v}`
                )
              );
            }
          this.scheduleRefresh(this.uri || p.url), b && this.clonePathways(b);
          const k = { steeringManifest: y, url: i.toString() };
          this.hls.trigger(Tt.STEERING_MANIFEST_LOADED, k),
            w && this.updatePathwayPriority(w);
        },
        onError: (h, f, p, g) => {
          if (
            (this.log(
              `Error loading steering manifest: ${h.code} ${h.text} (${f.url})`
            ),
            this.stopLoad(),
            h.code === 410)
          )
            return (
              (this.enabled = !1),
              void this.log(`Steering manifest ${f.url} no longer available`)
            );
          let y = 1e3 * this.timeToLoad;
          if (h.code !== 429) this.scheduleRefresh(this.uri || f.url, y);
          else {
            const v = this.loader;
            if (
              typeof (v == null ? void 0 : v.getResponseHeader) == "function"
            ) {
              const b = v.getResponseHeader("Retry-After");
              b && (y = 1e3 * parseFloat(b));
            }
            this.log(`Steering manifest ${f.url} rate limited`);
          }
        },
        onTimeout: (h, f, p) => {
          this.log(`Timeout loading steering manifest (${f.url})`),
            this.scheduleRefresh(this.uri || f.url);
        },
      };
    this.log(`Requesting steering manifest: ${i}`), this.loader.load(o, c, d);
  }
  scheduleRefresh(e, n = 1e3 * this.timeToLoad) {
    this.clearTimeout(),
      (this.reloadTimer = self.setTimeout(() => {
        var r;
        const i = (r = this.hls) == null ? void 0 : r.media;
        !i || i.ended
          ? this.scheduleRefresh(e, 1e3 * this.timeToLoad)
          : this.loadSteeringManifest(e);
      }, n));
  }
}
function iAe(t, e, n, r) {
  t &&
    Object.keys(e).forEach((i) => {
      const o = t
        .filter((l) => l.groupId === i)
        .map((l) => {
          const u = du({}, l);
          return (
            (u.details = void 0),
            (u.attrs = new x5(u.attrs)),
            (u.url = u.attrs.URI =
              Zje(
                l.url,
                l.attrs["STABLE-RENDITION-ID"],
                "PER-RENDITION-URIS",
                n
              )),
            (u.groupId = u.attrs["GROUP-ID"] = e[i]),
            (u.attrs["PATHWAY-ID"] = r),
            u
          );
        });
      t.push(...o);
    });
}
function Zje(t, e, n, r) {
  const { HOST: i, PARAMS: o, [n]: l } = r;
  let u;
  e && ((u = l == null ? void 0 : l[e]), u && (t = u));
  const c = new self.URL(t);
  return (
    i && !u && (c.host = i),
    o &&
      Object.keys(o)
        .sort()
        .forEach((d) => {
          d && c.searchParams.set(d, o[d]);
        }),
    c.href
  );
}
class cI extends _b {
  constructor(e) {
    super("eme", e.logger),
      (this.hls = void 0),
      (this.config = void 0),
      (this.media = null),
      (this.keyFormatPromise = null),
      (this.keySystemAccessPromises = {}),
      (this._requestLicenseFailureCount = 0),
      (this.mediaKeySessions = []),
      (this.keyIdToKeySessionPromise = {}),
      (this.setMediaKeysQueue = cI.CDMCleanupPromise
        ? [cI.CDMCleanupPromise]
        : []),
      (this.onMediaEncrypted = (n) => {
        const { initDataType: r, initData: i } = n,
          o = `"${n.type}" event: init data type: "${r}"`;
        if ((this.debug(o), i === null)) return;
        let l, u;
        if (r === "sinf" && this.getLicenseServerUrl(Ls.FAIRPLAY)) {
          const p = Sc(new Uint8Array(i));
          try {
            const g = fje(Oue(JSON.parse(p).sinf));
            if (!g)
              throw new Error(
                "'schm' box missing or not cbcs/cenc with schi > tenc"
              );
            (l = g.subarray(8, 24)), (u = Ls.FAIRPLAY);
          } catch (g) {
            return void this.warn(`${o} Failed to parse sinf: ${g}`);
          }
        } else if (this.getLicenseServerUrl(Ls.WIDEVINE)) {
          const p = SCn(i);
          let g = Object.keys(this.keySystemAccessPromises);
          g.length || (g = h4(this.config));
          const y = p.filter((v) => {
            const b = v.systemId ? tK(v.systemId) : null;
            return !!b && g.indexOf(b) > -1;
          })[0];
          if (!y)
            return void (p.length === 0 || p.some((v) => !v.systemId)
              ? this.warn(`${o} contains incomplete or invalid pssh data`)
              : this.log(
                  `ignoring ${o} for ${p
                    .map((v) => tK(v.systemId))
                    .join(",")} pssh data in favor of playlist keys`
                ));
          if (((u = tK(y.systemId)), y.version === 0 && y.data))
            if (u === Ls.WIDEVINE) {
              const v = y.data.length - 22;
              l = y.data.subarray(v, v + 16);
            } else u === Ls.PLAYREADY && (l = yje(y.data));
        }
        if (!u || !l) return;
        const c = zy.hexDump(l),
          { keyIdToKeySessionPromise: d, mediaKeySessions: h } = this;
        let f = d[c];
        for (let p = 0; p < h.length; p++) {
          const g = h[p],
            y = g.decryptdata;
          if (!y.keyId) continue;
          const v = zy.hexDump(y.keyId);
          if (c === v || y.uri.replace(/-/g, "").indexOf(c) !== -1) {
            if (((f = d[v]), y.pssh)) break;
            delete d[v],
              (y.pssh = new Uint8Array(i)),
              (y.keyId = l),
              (f = d[c] =
                f.then(() =>
                  this.generateRequestWithPreferredKeySession(
                    g,
                    r,
                    i,
                    "encrypted-event-key-match"
                  )
                )),
              f.catch((b) => this.handleError(b));
            break;
          }
        }
        f ||
          ((f = d[c] =
            this.getKeySystemSelectionPromise([u]).then(
              ({ keySystem: p, mediaKeys: g }) => {
                var y;
                this.throwIfDestroyed();
                const v = new h8(
                  "ISO-23001-7",
                  c,
                  (y = XRe(p)) != null ? y : ""
                );
                return (
                  (v.pssh = new Uint8Array(i)),
                  (v.keyId = l),
                  this.attemptSetMediaKeys(p, g).then(() => {
                    this.throwIfDestroyed();
                    const b = this.createMediaKeySessionContext({
                      decryptdata: v,
                      keySystem: p,
                      mediaKeys: g,
                    });
                    return this.generateRequestWithPreferredKeySession(
                      b,
                      r,
                      i,
                      "encrypted-event-no-match"
                    );
                  })
                );
              }
            )),
          f.catch((p) => this.handleError(p)));
      }),
      (this.onWaitingForKey = (n) => {
        this.log(`"${n.type}" event`);
      }),
      (this.hls = e),
      (this.config = e.config),
      this.registerListeners();
  }
  destroy() {
    this.unregisterListeners(), this.onMediaDetached();
    const e = this.config;
    (e.requestMediaKeySystemAccessFunc = null),
      (e.licenseXhrSetup = e.licenseResponseCallback = void 0),
      (e.drmSystems = e.drmSystemOptions = {}),
      (this.hls = this.config = this.keyIdToKeySessionPromise = null),
      (this.onMediaEncrypted = this.onWaitingForKey = null);
  }
  registerListeners() {
    this.hls.on(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      this.hls.on(Tt.MEDIA_DETACHED, this.onMediaDetached, this),
      this.hls.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      this.hls.on(Tt.MANIFEST_LOADED, this.onManifestLoaded, this);
  }
  unregisterListeners() {
    this.hls.off(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      this.hls.off(Tt.MEDIA_DETACHED, this.onMediaDetached, this),
      this.hls.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      this.hls.off(Tt.MANIFEST_LOADED, this.onManifestLoaded, this);
  }
  getLicenseServerUrl(e) {
    const { drmSystems: n, widevineLicenseUrl: r } = this.config,
      i = n[e];
    return i ? i.licenseUrl : e === Ls.WIDEVINE && r ? r : void 0;
  }
  getLicenseServerUrlOrThrow(e) {
    const n = this.getLicenseServerUrl(e);
    if (n === void 0)
      throw new Error(`no license server URL configured for key-system "${e}"`);
    return n;
  }
  getServerCertificateUrl(e) {
    const { drmSystems: n } = this.config,
      r = n[e];
    if (r) return r.serverCertificateUrl;
    this.log(`No Server Certificate in config.drmSystems["${e}"]`);
  }
  attemptKeySystemAccess(e) {
    const n = this.hls.levels,
      r = (l, u, c) => !!l && c.indexOf(l) === u,
      i = n.map((l) => l.audioCodec).filter(r),
      o = n.map((l) => l.videoCodec).filter(r);
    return (
      i.length + o.length === 0 && o.push("avc1.42e01e"),
      new Promise((l, u) => {
        const c = (d) => {
          const h = d.shift();
          this.getMediaKeysPromise(h, i, o)
            .then((f) => l({ keySystem: h, mediaKeys: f }))
            .catch((f) => {
              d.length
                ? c(d)
                : u(
                    f instanceof Cg
                      ? f
                      : new Cg(
                          {
                            type: ro.KEY_SYSTEM_ERROR,
                            details: Ir.KEY_SYSTEM_NO_ACCESS,
                            error: f,
                            fatal: !0,
                          },
                          f.message
                        )
                  );
            });
        };
        c(e);
      })
    );
  }
  requestMediaKeySystemAccess(e, n) {
    const { requestMediaKeySystemAccessFunc: r } = this.config;
    if (typeof r != "function") {
      let i = `Configured requestMediaKeySystemAccess is not a function ${r}`;
      return (
        mje === null &&
          self.location.protocol === "http:" &&
          (i = `navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),
        Promise.reject(new Error(i))
      );
    }
    return r(e, n);
  }
  getMediaKeysPromise(e, n, r) {
    const i = OCn(e, n, r, this.config.drmSystemOptions),
      o = this.keySystemAccessPromises[e];
    let l = o == null ? void 0 : o.keySystemAccess;
    if (!l) {
      this.log(
        `Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(
          i
        )}`
      ),
        (l = this.requestMediaKeySystemAccess(e, i));
      const u = (this.keySystemAccessPromises[e] = { keySystemAccess: l });
      return (
        l.catch((c) => {
          this.log(`Failed to obtain access to key-system "${e}": ${c}`);
        }),
        l.then((c) => {
          this.log(`Access for key-system "${c.keySystem}" obtained`);
          const d = this.fetchServerCertificate(e);
          return (
            this.log(`Create media-keys for "${e}"`),
            (u.mediaKeys = c
              .createMediaKeys()
              .then(
                (h) => (
                  this.log(`Media-keys created for "${e}"`),
                  d.then((f) =>
                    f ? this.setMediaKeysServerCertificate(h, e, f) : h
                  )
                )
              )),
            u.mediaKeys.catch((h) => {
              this.error(`Failed to create media-keys for "${e}"}: ${h}`);
            }),
            u.mediaKeys
          );
        })
      );
    }
    return l.then(() => o.mediaKeys);
  }
  createMediaKeySessionContext({ decryptdata: e, keySystem: n, mediaKeys: r }) {
    this.log(
      `Creating key-system session "${n}" keyId: ${zy.hexDump(e.keyId || [])}`
    );
    const i = r.createSession(),
      o = {
        decryptdata: e,
        keySystem: n,
        mediaKeys: r,
        mediaKeysSession: i,
        keyStatus: "status-pending",
      };
    return this.mediaKeySessions.push(o), o;
  }
  renewKeySession(e) {
    const n = e.decryptdata;
    if (n.pssh) {
      const r = this.createMediaKeySessionContext(e),
        i = this.getKeyIdString(n),
        o = "cenc";
      this.keyIdToKeySessionPromise[i] =
        this.generateRequestWithPreferredKeySession(
          r,
          o,
          n.pssh.buffer,
          "expired"
        );
    } else this.warn("Could not renew expired session. Missing pssh initData.");
    this.removeSession(e);
  }
  getKeyIdString(e) {
    if (!e) throw new Error("Could not read keyId of undefined decryptdata");
    if (e.keyId === null) throw new Error("keyId is null");
    return zy.hexDump(e.keyId);
  }
  updateKeySession(e, n) {
    var r;
    const i = e.mediaKeysSession;
    return (
      this.log(`Updating key-session "${i.sessionId}" for keyID ${zy.hexDump(
        ((r = e.decryptdata) == null ? void 0 : r.keyId) || []
      )}
      } (data length: ${n && n.byteLength})`),
      i.update(n)
    );
  }
  selectKeySystemFormat(e) {
    const n = Object.keys(e.levelkeys || {});
    return (
      this.keyFormatPromise ||
        (this.log(
          `Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${
            e.level
          }) key formats ${n.join(", ")}`
        ),
        (this.keyFormatPromise = this.getKeyFormatPromise(n))),
      this.keyFormatPromise
    );
  }
  getKeyFormatPromise(e) {
    return new Promise((n, r) => {
      const i = h4(this.config),
        o = e.map(HRe).filter((l) => !!l && i.indexOf(l) !== -1);
      return this.getKeySystemSelectionPromise(o)
        .then(({ keySystem: l }) => {
          const u = XRe(l);
          u
            ? n(u)
            : r(new Error(`Unable to find format for key-system "${l}"`));
        })
        .catch(r);
    });
  }
  loadKey(e) {
    const n = e.keyInfo.decryptdata,
      r = this.getKeyIdString(n),
      i = `(keyId: ${r} format: "${n.keyFormat}" method: ${n.method} uri: ${n.uri})`;
    this.log(`Starting session for key ${i}`);
    let o = this.keyIdToKeySessionPromise[r];
    return (
      o ||
        ((o = this.getKeySystemForKeyPromise(n).then(
          ({ keySystem: l, mediaKeys: u }) => (
            this.throwIfDestroyed(),
            this.log(
              `Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`
            ),
            this.attemptSetMediaKeys(l, u).then(
              () => (
                this.throwIfDestroyed(),
                this.createMediaKeySessionContext({
                  keySystem: l,
                  mediaKeys: u,
                  decryptdata: n,
                })
              )
            )
          )
        )),
        (this.keyIdToKeySessionPromise[r] = o.then((l) => {
          const u = n.pssh ? n.pssh.buffer : null;
          return this.generateRequestWithPreferredKeySession(
            l,
            "cenc",
            u,
            "playlist-key"
          );
        })).catch((l) => this.handleError(l))),
      o
    );
  }
  throwIfDestroyed(e = "Invalid state") {
    if (!this.hls) throw new Error("invalid state");
  }
  handleError(e) {
    this.hls &&
      (this.error(e.message),
      e instanceof Cg
        ? this.hls.trigger(Tt.ERROR, e.data)
        : this.hls.trigger(Tt.ERROR, {
            type: ro.KEY_SYSTEM_ERROR,
            details: Ir.KEY_SYSTEM_NO_KEYS,
            error: e,
            fatal: !0,
          }));
  }
  getKeySystemForKeyPromise(e) {
    const n = this.getKeyIdString(e),
      r = this.keyIdToKeySessionPromise[n];
    if (!r) {
      const i = HRe(e.keyFormat),
        o = i ? [i] : h4(this.config);
      return this.attemptKeySystemAccess(o);
    }
    return r;
  }
  getKeySystemSelectionPromise(e) {
    if ((e.length || (e = h4(this.config)), e.length === 0))
      throw new Cg(
        {
          type: ro.KEY_SYSTEM_ERROR,
          details: Ir.KEY_SYSTEM_NO_CONFIGURED_LICENSE,
          fatal: !0,
        },
        `Missing key-system license configuration options ${JSON.stringify({
          drmSystems: this.config.drmSystems,
        })}`
      );
    return this.attemptKeySystemAccess(e);
  }
  attemptSetMediaKeys(e, n) {
    const r = this.setMediaKeysQueue.slice();
    this.log(`Setting media-keys for "${e}"`);
    const i = Promise.all(r).then(() => {
      if (!this.media)
        throw new Error(
          "Attempted to set mediaKeys without media element attached"
        );
      return this.media.setMediaKeys(n);
    });
    return (
      this.setMediaKeysQueue.push(i),
      i.then(() => {
        this.log(`Media-keys set for "${e}"`),
          r.push(i),
          (this.setMediaKeysQueue = this.setMediaKeysQueue.filter(
            (o) => r.indexOf(o) === -1
          ));
      })
    );
  }
  generateRequestWithPreferredKeySession(e, n, r, i) {
    var o, l;
    const u =
      (o = this.config.drmSystems) == null || (l = o[e.keySystem]) == null
        ? void 0
        : l.generateRequest;
    if (u)
      try {
        const y = u.call(this.hls, n, r, e);
        if (!y)
          throw new Error(
            "Invalid response from configured generateRequest filter"
          );
        (n = y.initDataType),
          (r = y.initData ? y.initData : null),
          (e.decryptdata.pssh = r ? new Uint8Array(r) : null);
      } catch (y) {
        var c;
        if ((this.warn(y.message), (c = this.hls) != null && c.config.debug))
          throw y;
      }
    if (r === null)
      return (
        this.log(`Skipping key-session request for "${i}" (no initData)`),
        Promise.resolve(e)
      );
    const d = this.getKeyIdString(e.decryptdata);
    this.log(
      `Generating key-session request for "${i}": ${d} (init data type: ${n} length: ${
        r ? r.byteLength : null
      })`
    );
    const h = new Aje(),
      f = (e._onmessage = (y) => {
        const v = e.mediaKeysSession;
        if (!v) return void h.emit("error", new Error("invalid state"));
        const { messageType: b, message: w } = y;
        this.log(
          `"${b}" message event for session "${v.sessionId}" message size: ${w.byteLength}`
        ),
          b === "license-request" || b === "license-renewal"
            ? this.renewLicense(e, w).catch((k) => {
                h.eventNames().length
                  ? h.emit("error", k)
                  : this.handleError(k);
              })
            : b === "license-release"
            ? e.keySystem === Ls.FAIRPLAY &&
              (this.updateKeySession(e, Hne("acknowledged")),
              this.removeSession(e))
            : this.warn(`unhandled media key message type "${b}"`);
      }),
      p = (e._onkeystatuseschange = (y) => {
        if (!e.mediaKeysSession)
          return void h.emit("error", new Error("invalid state"));
        this.onKeyStatusChange(e);
        const v = e.keyStatus;
        h.emit("keyStatus", v),
          v === "expired" &&
            (this.warn(`${e.keySystem} expired for key ${d}`),
            this.renewKeySession(e));
      });
    e.mediaKeysSession.addEventListener("message", f),
      e.mediaKeysSession.addEventListener("keystatuseschange", p);
    const g = new Promise((y, v) => {
      h.on("error", v),
        h.on("keyStatus", (b) => {
          b.startsWith("usable")
            ? y()
            : b === "output-restricted"
            ? v(
                new Cg(
                  {
                    type: ro.KEY_SYSTEM_ERROR,
                    details: Ir.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,
                    fatal: !1,
                  },
                  "HDCP level output restricted"
                )
              )
            : b === "internal-error"
            ? v(
                new Cg(
                  {
                    type: ro.KEY_SYSTEM_ERROR,
                    details: Ir.KEY_SYSTEM_STATUS_INTERNAL_ERROR,
                    fatal: !0,
                  },
                  `key status changed to "${b}"`
                )
              )
            : b === "expired"
            ? v(new Error("key expired while generating request"))
            : this.warn(`unhandled key status change "${b}"`);
        });
    });
    return e.mediaKeysSession
      .generateRequest(n, r)
      .then(() => {
        var y;
        this.log(
          `Request generated for key-session "${
            (y = e.mediaKeysSession) == null ? void 0 : y.sessionId
          }" keyId: ${d}`
        );
      })
      .catch((y) => {
        throw new Cg(
          {
            type: ro.KEY_SYSTEM_ERROR,
            details: Ir.KEY_SYSTEM_NO_SESSION,
            error: y,
            fatal: !1,
          },
          `Error generating key-session request: ${y}`
        );
      })
      .then(() => g)
      .catch((y) => {
        throw (h.removeAllListeners(), this.removeSession(e), y);
      })
      .then(() => (h.removeAllListeners(), e));
  }
  onKeyStatusChange(e) {
    e.mediaKeysSession.keyStatuses.forEach((n, r) => {
      this.log(
        `key status change "${n}" for keyStatuses keyId: ${zy.hexDump(
          "buffer" in r
            ? new Uint8Array(r.buffer, r.byteOffset, r.byteLength)
            : new Uint8Array(r)
        )} session keyId: ${zy.hexDump(
          new Uint8Array(e.decryptdata.keyId || [])
        )} uri: ${e.decryptdata.uri}`
      ),
        (e.keyStatus = n);
    });
  }
  fetchServerCertificate(e) {
    const n = this.config,
      r = new n.loader(n),
      i = this.getServerCertificateUrl(e);
    return i
      ? (this.log(`Fetching server certificate for "${e}"`),
        new Promise((o, l) => {
          const u = { responseType: "arraybuffer", url: i },
            c = n.certLoadPolicy.default,
            d = {
              loadPolicy: c,
              timeout: c.maxLoadTimeMs,
              maxRetry: 0,
              retryDelay: 0,
              maxRetryDelay: 0,
            },
            h = {
              onSuccess: (f, p, g, y) => {
                o(f.data);
              },
              onError: (f, p, g, y) => {
                l(
                  new Cg(
                    {
                      type: ro.KEY_SYSTEM_ERROR,
                      details: Ir.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,
                      fatal: !0,
                      networkDetails: g,
                      response: pl({ url: u.url, data: void 0 }, f),
                    },
                    `"${e}" certificate request failed (${i}). Status: ${f.code} (${f.text})`
                  )
                );
              },
              onTimeout: (f, p, g) => {
                l(
                  new Cg(
                    {
                      type: ro.KEY_SYSTEM_ERROR,
                      details: Ir.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,
                      fatal: !0,
                      networkDetails: g,
                      response: { url: u.url, data: void 0 },
                    },
                    `"${e}" certificate request timed out (${i})`
                  )
                );
              },
              onAbort: (f, p, g) => {
                l(new Error("aborted"));
              },
            };
          r.load(u, d, h);
        }))
      : Promise.resolve();
  }
  setMediaKeysServerCertificate(e, n, r) {
    return new Promise((i, o) => {
      e.setServerCertificate(r)
        .then((l) => {
          this.log(
            `setServerCertificate ${l ? "success" : "not supported by CDM"} (${
              r == null ? void 0 : r.byteLength
            }) on "${n}"`
          ),
            i(e);
        })
        .catch((l) => {
          o(
            new Cg(
              {
                type: ro.KEY_SYSTEM_ERROR,
                details: Ir.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,
                error: l,
                fatal: !0,
              },
              l.message
            )
          );
        });
    });
  }
  renewLicense(e, n) {
    return this.requestLicense(e, new Uint8Array(n)).then((r) =>
      this.updateKeySession(e, new Uint8Array(r)).catch((i) => {
        throw new Cg(
          {
            type: ro.KEY_SYSTEM_ERROR,
            details: Ir.KEY_SYSTEM_SESSION_UPDATE_FAILED,
            error: i,
            fatal: !0,
          },
          i.message
        );
      })
    );
  }
  unpackPlayReadyKeyMessage(e, n) {
    const r = String.fromCharCode.apply(null, new Uint16Array(n.buffer));
    if (!r.includes("PlayReadyKeyMessage"))
      return e.setRequestHeader("Content-Type", "text/xml; charset=utf-8"), n;
    const i = new DOMParser().parseFromString(r, "application/xml"),
      o = i.querySelectorAll("HttpHeader");
    if (o.length > 0) {
      let h;
      for (let f = 0, p = o.length; f < p; f++) {
        var l, u;
        h = o[f];
        const g =
            (l = h.querySelector("name")) == null ? void 0 : l.textContent,
          y = (u = h.querySelector("value")) == null ? void 0 : u.textContent;
        g && y && e.setRequestHeader(g, y);
      }
    }
    const c = i.querySelector("Challenge"),
      d = c == null ? void 0 : c.textContent;
    if (!d) throw new Error("Cannot find <Challenge> in key message");
    return Hne(atob(d));
  }
  setupLicenseXHR(e, n, r, i) {
    const o = this.config.licenseXhrSetup;
    return o
      ? Promise.resolve()
          .then(() => {
            if (!r.decryptdata) throw new Error("Key removed");
            return o.call(this.hls, e, n, r, i);
          })
          .catch((l) => {
            if (!r.decryptdata) throw l;
            return e.open("POST", n, !0), o.call(this.hls, e, n, r, i);
          })
          .then(
            (l) => (
              e.readyState || e.open("POST", n, !0),
              { xhr: e, licenseChallenge: l || i }
            )
          )
      : (e.open("POST", n, !0),
        Promise.resolve({ xhr: e, licenseChallenge: i }));
  }
  requestLicense(e, n) {
    const r = this.config.keyLoadPolicy.default;
    return new Promise((i, o) => {
      const l = this.getLicenseServerUrlOrThrow(e.keySystem);
      this.log(`Sending license request to URL: ${l}`);
      const u = new XMLHttpRequest();
      (u.responseType = "arraybuffer"),
        (u.onreadystatechange = () => {
          if (!this.hls || !e.mediaKeysSession)
            return o(new Error("invalid state"));
          if (u.readyState === 4)
            if (u.status === 200) {
              this._requestLicenseFailureCount = 0;
              let c = u.response;
              this.log(
                `License received ${
                  c instanceof ArrayBuffer ? c.byteLength : c
                }`
              );
              const d = this.config.licenseResponseCallback;
              if (d)
                try {
                  c = d.call(this.hls, u, l, e);
                } catch (h) {
                  this.error(h);
                }
              i(c);
            } else {
              const c = r.errorRetry,
                d = c ? c.maxNumRetry : 0;
              if (
                (this._requestLicenseFailureCount++,
                this._requestLicenseFailureCount > d ||
                  (u.status >= 400 && u.status < 500))
              )
                o(
                  new Cg(
                    {
                      type: ro.KEY_SYSTEM_ERROR,
                      details: Ir.KEY_SYSTEM_LICENSE_REQUEST_FAILED,
                      fatal: !0,
                      networkDetails: u,
                      response: {
                        url: l,
                        data: void 0,
                        code: u.status,
                        text: u.statusText,
                      },
                    },
                    `License Request XHR failed (${l}). Status: ${u.status} (${u.statusText})`
                  )
                );
              else {
                const h = d - this._requestLicenseFailureCount + 1;
                this.warn(`Retrying license request, ${h} attempts left`),
                  this.requestLicense(e, n).then(i, o);
              }
            }
        }),
        e.licenseXhr &&
          e.licenseXhr.readyState !== XMLHttpRequest.DONE &&
          e.licenseXhr.abort(),
        (e.licenseXhr = u),
        this.setupLicenseXHR(u, l, e, n).then(
          ({ xhr: c, licenseChallenge: d }) => {
            e.keySystem == Ls.PLAYREADY &&
              (d = this.unpackPlayReadyKeyMessage(c, d)),
              c.send(d);
          }
        );
    });
  }
  onMediaAttached(e, n) {
    if (!this.config.emeEnabled) return;
    const r = n.media;
    (this.media = r),
      r.removeEventListener("encrypted", this.onMediaEncrypted),
      r.removeEventListener("waitingforkey", this.onWaitingForKey),
      r.addEventListener("encrypted", this.onMediaEncrypted),
      r.addEventListener("waitingforkey", this.onWaitingForKey);
  }
  onMediaDetached() {
    var e;
    const n = this.media,
      r = this.mediaKeySessions;
    n &&
      (n.removeEventListener("encrypted", this.onMediaEncrypted),
      n.removeEventListener("waitingforkey", this.onWaitingForKey),
      (this.media = null)),
      (this._requestLicenseFailureCount = 0),
      (this.setMediaKeysQueue = []),
      (this.mediaKeySessions = []),
      (this.keyIdToKeySessionPromise = {}),
      h8.clearKeyUriToKeyIdMap();
    const i = r.length;
    cI.CDMCleanupPromise = Promise.all(
      r
        .map((o) => this.removeSession(o))
        .concat(
          n == null || (e = n.setMediaKeys(null)) == null
            ? void 0
            : e.catch((o) => {
                var l;
                this.log(`Could not clear media keys: ${o}`),
                  (l = this.hls) == null ||
                    l.trigger(Tt.ERROR, {
                      type: ro.OTHER_ERROR,
                      details: Ir.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,
                      fatal: !1,
                      error: new Error(`Could not clear media keys: ${o}`),
                    });
              })
        )
    )
      .then(() => {
        i &&
          (this.log("finished closing key sessions and clearing media keys"),
          (r.length = 0));
      })
      .catch((o) => {
        var l;
        this.log(`Could not close sessions and clear media keys: ${o}`),
          (l = this.hls) == null ||
            l.trigger(Tt.ERROR, {
              type: ro.OTHER_ERROR,
              details: Ir.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
              fatal: !1,
              error: new Error(
                `Could not close sessions and clear media keys: ${o}`
              ),
            });
      });
  }
  onManifestLoading() {
    this.keyFormatPromise = null;
  }
  onManifestLoaded(e, { sessionKeys: n }) {
    if (n && this.config.emeEnabled && !this.keyFormatPromise) {
      const r = n.reduce(
        (i, o) => (i.indexOf(o.keyFormat) === -1 && i.push(o.keyFormat), i),
        []
      );
      this.log(`Selecting key-system from session-keys ${r.join(", ")}`),
        (this.keyFormatPromise = this.getKeyFormatPromise(r));
    }
  }
  removeSession(e) {
    const { mediaKeysSession: n, licenseXhr: r } = e;
    if (n) {
      this.log(`Remove licenses and keys and close session ${n.sessionId}`),
        e._onmessage &&
          (n.removeEventListener("message", e._onmessage),
          (e._onmessage = void 0)),
        e._onkeystatuseschange &&
          (n.removeEventListener("keystatuseschange", e._onkeystatuseschange),
          (e._onkeystatuseschange = void 0)),
        r && r.readyState !== XMLHttpRequest.DONE && r.abort(),
        (e.mediaKeysSession = e.decryptdata = e.licenseXhr = void 0);
      const i = this.mediaKeySessions.indexOf(e);
      return (
        i > -1 && this.mediaKeySessions.splice(i, 1),
        n
          .remove()
          .catch((o) => {
            var l;
            this.log(`Could not remove session: ${o}`),
              (l = this.hls) == null ||
                l.trigger(Tt.ERROR, {
                  type: ro.OTHER_ERROR,
                  details: Ir.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,
                  fatal: !1,
                  error: new Error(`Could not remove session: ${o}`),
                });
          })
          .then(() => n.close())
          .catch((o) => {
            var l;
            this.log(`Could not close session: ${o}`),
              (l = this.hls) == null ||
                l.trigger(Tt.ERROR, {
                  type: ro.OTHER_ERROR,
                  details: Ir.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,
                  fatal: !1,
                  error: new Error(`Could not close session: ${o}`),
                });
          })
      );
    }
  }
}
cI.CDMCleanupPromise = void 0;
class Cg extends Error {
  constructor(e, n) {
    super(n),
      (this.data = void 0),
      e.error || (e.error = new Error(n)),
      (this.data = e),
      (e.err = e.error);
  }
}
class Vxn {
  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();
  }
  setStreamController(e) {
    this.streamController = e;
  }
  registerListeners() {
    this.hls.on(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      this.hls.on(Tt.MEDIA_DETACHING, this.onMediaDetaching, this);
  }
  unregisterListeners() {
    this.hls.off(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      this.hls.off(Tt.MEDIA_DETACHING, this.onMediaDetaching, this);
  }
  destroy() {
    this.timer && clearInterval(this.timer),
      this.unregisterListeners(),
      (this.isVideoPlaybackQualityAvailable = !1),
      (this.media = null);
  }
  onMediaAttaching(e, n) {
    const r = this.hls.config;
    if (r.capLevelOnFPSDrop) {
      const i = n.media instanceof self.HTMLVideoElement ? n.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),
          r.fpsDroppedMonitoringPeriod
        ));
    }
  }
  onMediaDetaching() {
    this.media = null;
  }
  checkFPS(e, n, r) {
    const i = performance.now();
    if (n) {
      if (this.lastTime) {
        const o = i - this.lastTime,
          l = r - this.lastDroppedFrames,
          u = n - this.lastDecodedFrames,
          c = (1e3 * l) / o,
          d = this.hls;
        if (
          (d.trigger(Tt.FPS_DROP, {
            currentDropped: l,
            currentDecoded: u,
            totalDroppedFrames: r,
          }),
          c > 0 && l > d.config.fpsDroppedMonitoringThreshold * u)
        ) {
          let h = d.currentLevel;
          d.logger.warn(
            "drop FPS ratio greater than max allowed value for currentLevel: " +
              h
          ),
            h > 0 &&
              (d.autoLevelCapping === -1 || d.autoLevelCapping >= h) &&
              ((h -= 1),
              d.trigger(Tt.FPS_DROP_LEVEL_CAPPING, {
                level: h,
                droppedLevel: d.currentLevel,
              }),
              (d.autoLevelCapping = h),
              this.streamController.nextLevelSwitch());
        }
      }
      (this.lastTime = i),
        (this.lastDroppedFrames = r),
        (this.lastDecodedFrames = n);
    }
  }
  checkFPSInterval() {
    const e = this.media;
    if (e)
      if (this.isVideoPlaybackQualityAvailable) {
        const n = e.getVideoPlaybackQuality();
        this.checkFPS(e, n.totalVideoFrames, n.droppedVideoFrames);
      } else
        this.checkFPS(e, e.webkitDecodedFrameCount, e.webkitDroppedFrameCount);
  }
}
function zxn(t, e) {
  let n;
  try {
    n = new Event("addtrack");
  } catch {
    (n = document.createEvent("Event")), n.initEvent("addtrack", !1, !1);
  }
  (n.track = t), e.dispatchEvent(n);
}
function Yje(t, e) {
  const n = t.mode;
  if (
    (n === "disabled" && (t.mode = "hidden"),
    t.cues && !t.cues.getCueById(e.id))
  )
    try {
      if ((t.addCue(e), !t.cues.getCueById(e.id)))
        throw new Error(`addCue is failed for: ${e}`);
    } catch (r) {
      Ds.debug(`[texttrack-utils]: ${r}`);
      try {
        const i = new self.TextTrackCue(e.startTime, e.endTime, e.text);
        (i.id = e.id), t.addCue(i);
      } catch (i) {
        Ds.debug(
          `[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`
        );
      }
    }
  n === "disabled" && (t.mode = n);
}
function TC(t, e) {
  const n = t.mode;
  if ((n === "disabled" && (t.mode = "hidden"), t.cues))
    for (let r = t.cues.length; r--; )
      e && t.cues[r].removeEventListener("enter", e), t.removeCue(t.cues[r]);
  n === "disabled" && (t.mode = n);
}
function aAe(t, e, n, r) {
  const i = t.mode;
  if ((i === "disabled" && (t.mode = "hidden"), t.cues && t.cues.length > 0)) {
    const o = Wxn(t.cues, e, n);
    for (let l = 0; l < o.length; l++) (r && !r(o[l])) || t.removeCue(o[l]);
  }
  i === "disabled" && (t.mode = i);
}
function jxn(t, e) {
  if (e < t[0].startTime) return 0;
  const n = t.length - 1;
  if (e > t[n].endTime) return -1;
  let r = 0,
    i = n;
  for (; r <= i; ) {
    const o = Math.floor((i + r) / 2);
    if (e < t[o].startTime) i = o - 1;
    else {
      if (!(e > t[o].startTime && r < n)) return o;
      r = o + 1;
    }
  }
  return t[r].startTime - e < e - t[i].startTime ? r : i;
}
function Wxn(t, e, n) {
  const r = [],
    i = jxn(t, e);
  if (i > -1)
    for (let o = i, l = t.length; o < l; o++) {
      const u = t[o];
      if (u.startTime >= e && u.endTime <= n) r.push(u);
      else if (u.startTime > n) return r;
    }
  return r;
}
function ZF(t) {
  const e = [];
  for (let n = 0; n < t.length; n++) {
    const r = t[n];
    (r.kind !== "subtitles" && r.kind !== "captions") ||
      !r.label ||
      e.push(t[n]);
  }
  return e;
}
class Kxn extends Vje {
  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)
        )
          return;
        let n = null;
        const r = ZF(this.media.textTracks);
        for (let o = 0; o < r.length; o++)
          if (r[o].mode === "hidden") n = r[o];
          else if (r[o].mode === "showing") {
            n = r[o];
            break;
          }
        const i = this.findTrackForTextTrack(n);
        this.subtitleTrack !== i && this.setSubtitleTrack(i);
      }),
      this.registerListeners();
  }
  destroy() {
    this.unregisterListeners(),
      (this.tracks.length = 0),
      (this.tracksInGroup.length = 0),
      (this.currentTrack = null),
      (this.onTextTracksChanged = this.asyncPollTrackChange = null),
      super.destroy();
  }
  get subtitleDisplay() {
    return this._subtitleDisplay;
  }
  set subtitleDisplay(e) {
    (this._subtitleDisplay = e), this.trackId > -1 && this.toggleTrackModes();
  }
  registerListeners() {
    const { hls: e } = this;
    e.on(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.on(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.on(Tt.LEVEL_LOADING, this.onLevelLoading, this),
      e.on(Tt.LEVEL_SWITCHING, this.onLevelSwitching, this),
      e.on(Tt.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
      e.on(Tt.ERROR, this.onError, this);
  }
  unregisterListeners() {
    const { hls: e } = this;
    e.off(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.off(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.MANIFEST_PARSED, this.onManifestParsed, this),
      e.off(Tt.LEVEL_LOADING, this.onLevelLoading, this),
      e.off(Tt.LEVEL_SWITCHING, this.onLevelSwitching, this),
      e.off(Tt.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
      e.off(Tt.ERROR, this.onError, this);
  }
  onMediaAttached(e, n) {
    (this.media = n.media),
      this.media &&
        (this.queuedDefaultTrack > -1 &&
          ((this.subtitleTrack = this.queuedDefaultTrack),
          (this.queuedDefaultTrack = -1)),
        (this.useTextTrackPolling = !(
          this.media.textTracks && "onchange" in this.media.textTracks
        )),
        this.useTextTrackPolling
          ? this.pollTrackChange(500)
          : this.media.textTracks.addEventListener(
              "change",
              this.asyncPollTrackChange
            ));
  }
  pollTrackChange(e) {
    self.clearInterval(this.subtitlePollingInterval),
      (this.subtitlePollingInterval = self.setInterval(
        this.onTextTracksChanged,
        e
      ));
  }
  onMediaDetaching(e, n) {
    const r = this.media;
    if (!r) return;
    const i = !!n.transferMedia;
    self.clearInterval(this.subtitlePollingInterval),
      this.useTextTrackPolling ||
        r.textTracks.removeEventListener("change", this.asyncPollTrackChange),
      this.trackId > -1 && (this.queuedDefaultTrack = this.trackId),
      (this.subtitleTrack = -1),
      (this.media = null),
      !i &&
        ZF(r.textTracks).forEach((o) => {
          TC(o);
        });
  }
  onManifestLoading() {
    (this.tracks = []),
      (this.groupIds = null),
      (this.tracksInGroup = []),
      (this.trackId = -1),
      (this.currentTrack = null),
      (this.selectDefaultTrack = !0);
  }
  onManifestParsed(e, n) {
    this.tracks = n.subtitleTracks;
  }
  onSubtitleTrackLoaded(e, n) {
    const { id: r, groupId: i, details: o } = n,
      l = this.tracksInGroup[r];
    if (!l || l.groupId !== i)
      return void this.warn(
        `Subtitle track with id:${r} and group:${i} not found in active group ${
          l == null ? void 0 : l.groupId
        }`
      );
    const u = l.details;
    (l.details = n.details),
      this.log(
        `Subtitle track ${r} "${l.name}" lang:${l.lang} group:${i} loaded [${o.startSN}-${o.endSN}]`
      ),
      r === this.trackId && this.playlistLoaded(r, n, u);
  }
  onLevelLoading(e, n) {
    this.switchLevel(n.level);
  }
  onLevelSwitching(e, n) {
    this.switchLevel(n.level);
  }
  switchLevel(e) {
    const n = this.hls.levels[e];
    if (!n) return;
    const r = n.subtitleGroups || null,
      i = this.groupIds;
    let o = this.currentTrack;
    if (
      !r ||
      (i == null ? void 0 : i.length) !== (r == null ? void 0 : r.length) ||
      (r != null && r.some((l) => (i == null ? void 0 : i.indexOf(l)) === -1))
    ) {
      (this.groupIds = r), (this.trackId = -1), (this.currentTrack = null);
      const l = this.tracks.filter((h) => !r || r.indexOf(h.groupId) !== -1);
      if (l.length)
        this.selectDefaultTrack &&
          !l.some((h) => h.default) &&
          (this.selectDefaultTrack = !1),
          l.forEach((h, f) => {
            h.id = f;
          });
      else if (!o && !this.tracksInGroup.length) return;
      this.tracksInGroup = l;
      const u = this.hls.config.subtitlePreference;
      if (!o && u) {
        this.selectDefaultTrack = !1;
        const h = uv(u, l);
        if (h > -1) o = l[h];
        else {
          const f = uv(u, this.tracks);
          o = this.tracks[f];
        }
      }
      let c = this.findTrackId(o);
      c === -1 && o && (c = this.findTrackId(null));
      const d = { subtitleTracks: l };
      this.log(
        `Updating subtitle tracks, ${l.length} track(s) found in "${
          r == null ? void 0 : r.join(",")
        }" group-id`
      ),
        this.hls.trigger(Tt.SUBTITLE_TRACKS_UPDATED, d),
        c !== -1 && this.trackId === -1 && this.setSubtitleTrack(c);
    }
  }
  findTrackId(e) {
    const n = this.tracksInGroup,
      r = this.selectDefaultTrack;
    for (let i = 0; i < n.length; i++) {
      const o = n[i];
      if ((!r || o.default) && (r || e) && (!e || lI(o, e))) return i;
    }
    if (e) {
      for (let i = 0; i < n.length; i++) {
        const o = n[i];
        if (
          rD(e.attrs, o.attrs, [
            "LANGUAGE",
            "ASSOC-LANGUAGE",
            "CHARACTERISTICS",
          ])
        )
          return i;
      }
      for (let i = 0; i < n.length; i++) {
        const o = n[i];
        if (rD(e.attrs, o.attrs, ["LANGUAGE"])) return i;
      }
    }
    return -1;
  }
  findTrackForTextTrack(e) {
    if (e) {
      const n = this.tracksInGroup;
      for (let r = 0; r < n.length; r++) if (jne(n[r], e)) return r;
    }
    return -1;
  }
  onError(e, n) {
    !n.fatal &&
      n.context &&
      (n.context.type !== B1.SUBTITLE_TRACK ||
        n.context.id !== this.trackId ||
        (this.groupIds && this.groupIds.indexOf(n.context.groupId) === -1) ||
        this.checkRetry(n));
  }
  get allSubtitleTracks() {
    return this.tracks;
  }
  get subtitleTracks() {
    return this.tracksInGroup;
  }
  get subtitleTrack() {
    return this.trackId;
  }
  set subtitleTrack(e) {
    (this.selectDefaultTrack = !1), this.setSubtitleTrack(e);
  }
  setSubtitleOption(e) {
    if (((this.hls.config.subtitlePreference = e), e)) {
      if (e.id === -1) return this.setSubtitleTrack(-1), null;
      const n = this.allSubtitleTracks;
      if (((this.selectDefaultTrack = !1), n.length)) {
        const r = this.currentTrack;
        if (r && lI(e, r)) return r;
        const i = uv(e, this.tracksInGroup);
        if (i > -1) {
          const o = this.tracksInGroup[i];
          return this.setSubtitleTrack(i), o;
        }
        if (r) return null;
        {
          const o = uv(e, n);
          if (o > -1) return n[o];
        }
      }
    }
    return null;
  }
  loadPlaylist(e) {
    super.loadPlaylist(),
      this.shouldLoadPlaylist(this.currentTrack) &&
        this.scheduleLoading(this.currentTrack, e);
  }
  loadingPlaylist(e, n) {
    super.loadingPlaylist(e, n);
    const r = e.id,
      i = e.groupId,
      o = this.getUrlWithDirectives(e.url, n),
      l = e.details,
      u = l == null ? void 0 : l.age;
    this.log(
      `Loading subtitle ${r} "${e.name}" lang:${e.lang} group:${i}${
        (n == null ? void 0 : n.msn) !== void 0
          ? " at sn " + n.msn + " part " + n.part
          : ""
      }${
        u && l.live
          ? " age " + u.toFixed(1) + ((l.type && " " + l.type) || "")
          : ""
      } ${o}`
    ),
      this.hls.trigger(Tt.SUBTITLE_TRACK_LOADING, {
        url: o,
        id: r,
        groupId: i,
        deliveryDirectives: n || null,
        track: e,
      });
  }
  toggleTrackModes() {
    const { media: e } = this;
    if (!e) return;
    const n = ZF(e.textTracks),
      r = this.currentTrack;
    let i;
    if (
      (r &&
        ((i = n.filter((o) => jne(r, o))[0]),
        i ||
          this.warn(
            `Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`
          )),
      [].slice.call(n).forEach((o) => {
        o.mode !== "disabled" && o !== i && (o.mode = "disabled");
      }),
      i)
    ) {
      const o = this.subtitleDisplay ? "showing" : "hidden";
      i.mode !== o && (i.mode = o);
    }
  }
  setSubtitleTrack(e) {
    const n = this.tracksInGroup;
    if (!this.media) return void (this.queuedDefaultTrack = e);
    if (e < -1 || e >= n.length || !Ta(e))
      return void this.warn(`Invalid subtitle track id: ${e}`);
    this.selectDefaultTrack = !1;
    const r = this.currentTrack,
      i = n[e] || null;
    if (
      ((this.trackId = e), (this.currentTrack = i), this.toggleTrackModes(), !i)
    )
      return void this.hls.trigger(Tt.SUBTITLE_TRACK_SWITCH, { id: e });
    const o = !!i.details && !i.details.live;
    if (e === this.trackId && i === r && o) return;
    this.log(
      `Switching to subtitle-track ${e}` +
        (i ? ` "${i.name}" lang:${i.lang} group:${i.groupId}` : "")
    );
    const { id: l, groupId: u = "", name: c, type: d, url: h } = i;
    this.hls.trigger(Tt.SUBTITLE_TRACK_SWITCH, {
      id: l,
      groupId: u,
      name: c,
      type: d,
      url: h,
    });
    const f = this.switchParams(
      i.url,
      r == null ? void 0 : r.details,
      i.details
    );
    this.loadPlaylist(f);
  }
}
function L$(t) {
  let e = 5381,
    n = t.length;
  for (; n; ) e = (33 * e) ^ t.charCodeAt(--n);
  return (e >>> 0).toString();
}
let y8 = (function (t) {
  return (t[(t.Point = 0)] = "Point"), (t[(t.Range = 1)] = "Range"), t;
})({});
function Zxn(t, e, n) {
  return `${t.identifier}-${n + 1}-${L$(e)}`;
}
class Yxn {
  constructor(e, n) {
    (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, jump: !1 }),
      (this.snapOptions = { out: !1, in: !1 }),
      (this.assetList = []),
      (this.assetListLoader = void 0),
      (this.assetListResponse = null),
      (this.resumeAnchor = void 0),
      (this.error = void 0),
      (this.base = n),
      (this.dateRange = e),
      this.setDateRange(e);
  }
  setDateRange(e) {
    (this.dateRange = e),
      (this.resumeOffset = e.attr.optionalFloat(
        "X-RESUME-OFFSET",
        this.resumeOffset
      )),
      (this.playoutLimit = e.attr.optionalFloat(
        "X-PLAYOUT-LIMIT",
        this.playoutLimit
      )),
      (this.restrictions = e.attr.enumeratedStringList(
        "X-RESTRICT",
        this.restrictions
      )),
      (this.snapOptions = e.attr.enumeratedStringList(
        "X-SNAP",
        this.snapOptions
      ));
  }
  reset() {
    var e;
    (e = this.assetListLoader) == null || e.destroy(),
      (this.assetListLoader = this.error = void 0);
  }
  isAssetPastPlayoutLimit(e) {
    if (e >= this.assetList.length) return !0;
    const n = this.playoutLimit;
    return e <= 0 || isNaN(n) ? !1 : this.assetList[e].startOffset > n;
  }
  findAssetIndex(e) {
    return this.assetList.indexOf(e);
  }
  get identifier() {
    return this.dateRange.id;
  }
  get startDate() {
    return this.dateRange.startDate;
  }
  get startTime() {
    const e = this.dateRange.startTime;
    if (this.snapOptions.out) {
      const n = this.dateRange.tagAnchor;
      if (n) return oAe(e, n);
    }
    return e;
  }
  get startOffset() {
    return this.cue.pre ? 0 : this.startTime;
  }
  get resumptionOffset() {
    const e = this.resumeOffset,
      n = Ta(e) ? e : this.duration;
    return this.cumulativeDuration + n;
  }
  get resumeTime() {
    const e = this.startOffset + this.resumptionOffset;
    if (this.snapOptions.in) {
      const n = this.resumeAnchor;
      if (n) return oAe(e, n);
    }
    return e;
  }
  get appendInPlace() {
    return (
      !this.appendInPlaceDisabled &&
      !(
        this.cue.once ||
        this.cue.pre ||
        (this.startTime !== 0 && !this.snapOptions.out) ||
        !(
          (isNaN(this.playoutLimit) && isNaN(this.resumeOffset)) ||
          (this.resumeOffset &&
            this.duration &&
            Math.abs(this.resumeOffset - this.duration) < 0.02)
        )
      )
    );
  }
  set appendInPlace(e) {
    this.appendInPlaceStarted || (this.appendInPlaceDisabled = !e);
  }
  get timelineStart() {
    return this._timelineStart !== null ? this._timelineStart : this.startTime;
  }
  set timelineStart(e) {
    this._timelineStart = e;
  }
  get duration() {
    const e = this.playoutLimit;
    let n;
    return (
      (n = this._duration
        ? this._duration
        : this.dateRange.duration
        ? this.dateRange.duration
        : this.dateRange.plannedDuration || 0),
      !isNaN(e) && e < n && (n = e),
      n
    );
  }
  set duration(e) {
    this._duration = e;
  }
  get cue() {
    return this.dateRange.cue;
  }
  get timelineOccupancy() {
    return this.dateRange.attr["X-TIMELINE-OCCUPIES"] === "RANGE"
      ? y8.Range
      : y8.Point;
  }
  get supplementsPrimary() {
    return this.dateRange.attr["X-TIMELINE-STYLE"] === "PRIMARY";
  }
  get contentMayVary() {
    return this.dateRange.attr["X-CONTENT-MAY-VARY"] !== "NO";
  }
  get assetUrl() {
    return this.dateRange.attr["X-ASSET-URI"];
  }
  get assetListUrl() {
    return this.dateRange.attr["X-ASSET-LIST"];
  }
  get baseUrl() {
    return this.base.url;
  }
  toString() {
    return Qxn(this);
  }
}
function oAe(t, e) {
  return t - e.start < e.duration / 2 &&
    !(Math.abs(t - (e.start + e.duration)) < 0.02)
    ? e.start
    : e.start + e.duration;
}
function Qje(t, e, n) {
  const r = new self.URL(t, n);
  return r.protocol !== "data:" && r.searchParams.set("_HLS_primary_id", e), r;
}
function Qxn(t) {
  return `["${t.identifier}" ${
    t.cue.pre ? "<pre>" : t.cue.post ? "<post>" : ""
  }${t.timelineStart.toFixed(2)}-${t.resumeTime.toFixed(2)}]`;
}
function Zne(t) {
  const e = t.timelineStart,
    n = t.duration || 0;
  return `["${t.identifier}" ${e.toFixed(2)}-${(e + n).toFixed(2)}]`;
}
class Jxn {
  constructor(e, n, r, i) {
    (this.hls = void 0),
      (this.interstitial = void 0),
      (this.assetItem = void 0),
      (this.tracks = null),
      (this.hasDetails = !1),
      (this.mediaAttached = null),
      (this.playoutOffset = 0),
      (this.checkPlayout = () => {
        const c = this.interstitial.playoutLimit;
        this.playoutOffset + this.currentTime >= c &&
          this.hls.trigger(Tt.PLAYOUT_LIMIT_REACHED, {});
      });
    const o = (this.hls = new e(n));
    (this.interstitial = r), (this.assetItem = i);
    let l = i.uri;
    try {
      l = Qje(l, o.sessionId).href;
    } catch {}
    o.loadSource(l);
    const u = () => {
      this.hasDetails = !0;
    };
    o.once(Tt.LEVEL_LOADED, u),
      o.once(Tt.AUDIO_TRACK_LOADED, u),
      o.once(Tt.SUBTITLE_TRACK_LOADED, u),
      o.on(Tt.MEDIA_ATTACHING, (c, { media: d }) => {
        this.removeMediaListeners(), (this.mediaAttached = d);
        const h = this.interstitial;
        var f;
        h.playoutLimit &&
          ((this.playoutOffset =
            ((f = h.assetList[h.assetList.indexOf(i)]) == null
              ? void 0
              : f.startOffset) || 0),
          d.addEventListener("timeupdate", this.checkPlayout));
      });
  }
  get destroyed() {
    var e;
    return !((e = this.hls) != null && e.userConfig);
  }
  get assetId() {
    return this.assetItem.identifier;
  }
  get interstitialId() {
    return this.assetItem.parentIdentifier;
  }
  get media() {
    return this.hls.media;
  }
  get bufferedEnd() {
    const e = this.media || this.mediaAttached;
    if (!e) return 0;
    const n = Ul.bufferInfo(e, e.currentTime, 0.001);
    return this.getAssetTime(n.end);
  }
  get currentTime() {
    const e = this.media || this.mediaAttached;
    return e ? this.getAssetTime(e.currentTime) : 0;
  }
  get duration() {
    var e;
    return ((e = this.assetItem) == null ? void 0 : e.duration) || 0;
  }
  get remaining() {
    const e = this.duration;
    return e ? Math.max(0, e - this.currentTime) : 0;
  }
  get timelineOffset() {
    return this.hls.config.timelineOffset || 0;
  }
  set timelineOffset(e) {
    const n = this.timelineOffset;
    if (e !== n) {
      const r = e - n;
      if (Math.abs(r) > 1 / 9e4) {
        if (this.hasDetails)
          throw new Error(
            "Cannot set timelineOffset after playlists are loaded"
          );
        this.hls.config.timelineOffset = e;
      }
    }
  }
  getAssetTime(e) {
    const n = this.timelineOffset,
      r = this.duration;
    return Math.min(Math.max(0, e - n), r);
  }
  removeMediaListeners() {
    const e = this.mediaAttached;
    e && e.removeEventListener("timeupdate", this.checkPlayout);
  }
  destroy() {
    this.removeMediaListeners(),
      this.hls.destroy(),
      (this.hls = this.interstitial = null),
      (this.tracks = this.mediaAttached = this.checkPlayout = null);
  }
  attachMedia(e) {
    this.hls.attachMedia(e);
  }
  detachMedia() {
    this.removeMediaListeners(), this.hls.detachMedia();
  }
  resumeBuffering() {
    this.hls.resumeBuffering();
  }
  pauseBuffering() {
    this.hls.pauseBuffering();
  }
  transferMedia() {
    return this.hls.transferMedia();
  }
  on(e, n, r) {
    this.hls.on(e, n);
  }
  once(e, n, r) {
    this.hls.once(e, n);
  }
  off(e, n, r) {
    this.hls.off(e, n);
  }
  toString() {
    return `HlsAssetPlayer: ${Zne(this.assetItem)} ${this.hls.sessionId} ${
      this.interstitial.appendInPlace ? "append-in-place" : ""
    }`;
  }
}
class qxn extends _b {
  constructor(e, n) {
    super("interstitials-sched", n),
      (this.onScheduleUpdate = void 0),
      (this.eventMap = {}),
      (this.events = null),
      (this.items = null),
      (this.durations = { primary: 0, playout: 0, integrated: 0 }),
      (this.onScheduleUpdate = e);
  }
  destroy() {
    this.reset(), (this.onScheduleUpdate = null);
  }
  reset() {
    (this.eventMap = {}),
      this.setDurations(0, 0, 0),
      this.events && this.events.forEach((e) => e.reset()),
      (this.events = this.items = null);
  }
  get duration() {
    const e = this.items;
    return e ? e[e.length - 1].end : 0;
  }
  get length() {
    return this.items ? this.items.length : 0;
  }
  getEvent(e) {
    return (e && this.eventMap[e]) || null;
  }
  hasEvent(e) {
    return e in this.eventMap;
  }
  findItemIndex(e, n) {
    if (e.event) return this.findEventIndex(e.event.identifier);
    let r = -1;
    e.nextEvent
      ? (r = this.findEventIndex(e.nextEvent.identifier) - 1)
      : e.previousEvent &&
        (r = this.findEventIndex(e.previousEvent.identifier) + 1);
    const i = this.items;
    if (i)
      for (
        i[r] ||
        (n === void 0 && (n = e.start), (r = this.findItemIndexAtTime(n)));
        r >= 0 && (o = i[r]) != null && o.event;

      ) {
        var o;
        r--;
      }
    return r;
  }
  findItemIndexAtTime(e, n) {
    const r = this.items;
    if (r)
      for (let i = 0; i < r.length; i++) {
        let o = r[i];
        if (
          (n && n !== "primary" && (o = o[n]),
          e === o.start || (e > o.start && e < o.end))
        )
          return i;
      }
    return -1;
  }
  findJumpRestrictedIndex(e, n) {
    const r = this.items;
    if (r)
      for (let i = e; i <= n && r[i]; i++) {
        const o = r[i].event;
        if (o != null && o.restrictions.jump && !o.appendInPlace) return i;
      }
    return -1;
  }
  findEventIndex(e) {
    const n = this.items;
    if (n)
      for (let i = n.length; i--; ) {
        var r;
        if (((r = n[i].event) == null ? void 0 : r.identifier) === e) return i;
      }
    return -1;
  }
  findAssetIndex(e, n) {
    const r = e.assetList,
      i = r.length;
    if (i > 1)
      for (let o = 0; o < i; o++) {
        const l = r[o];
        if (!l.error) {
          const u = l.timelineStart;
          if (n === u || (n > u && n < u + (l.duration || 0))) return o;
        }
      }
    return 0;
  }
  get assetIdAtEnd() {
    var e, n;
    const r =
      (e = this.items) == null || (n = e[this.length - 1]) == null
        ? void 0
        : n.event;
    if (r) {
      const i = r.assetList,
        o = i[i.length - 1];
      if (o) return o.identifier;
    }
    return null;
  }
  parseInterstitialDateRanges(e) {
    const n = e.main.details,
      { dateRanges: r } = n,
      i = this.events,
      o = this.parseDateRanges(r, { url: n.url }),
      l = Object.keys(r),
      u = i ? i.filter((c) => !l.includes(c.identifier)) : [];
    o.length &&
      o.sort((c, d) => {
        const h = c.cue.pre,
          f = c.cue.post,
          p = d.cue.pre,
          g = d.cue.post;
        if (h && !p) return -1;
        if ((p && !h) || (f && !g)) return 1;
        if (g && !f) return -1;
        if (!(h || p || f || g)) {
          const y = c.startTime,
            v = d.startTime;
          if (y !== v) return y - v;
        }
        return c.dateRange.tagOrder - d.dateRange.tagOrder;
      }),
      (this.events = o),
      u.forEach((c) => {
        this.removeEvent(c);
      }),
      this.updateSchedule(e, u);
  }
  updateSchedule(e, n = []) {
    const r = this.events || [];
    if (r.length || n.length || this.length < 2) {
      const i = this.items,
        o = this.parseSchedule(r, e);
      (n.length ||
        (i == null ? void 0 : i.length) !== o.length ||
        o.some(
          (l, u) =>
            Math.abs(l.playout.start - i[u].playout.start) > 0.005 ||
            Math.abs(l.playout.end - i[u].playout.end) > 0.005
        )) &&
        ((this.items = o), this.onScheduleUpdate(n, i));
    }
  }
  parseDateRanges(e, n) {
    const r = [],
      i = Object.keys(e);
    for (let o = 0; o < i.length; o++) {
      const l = i[o],
        u = e[l];
      if (u.isInterstitial) {
        let c = this.eventMap[l];
        c ? c.setDateRange(u) : ((c = new Yxn(u, n)), (this.eventMap[l] = c)),
          r.push(c);
      }
    }
    return r;
  }
  parseSchedule(e, n) {
    const r = [],
      i = n.main.details,
      o = i.live ? 1 / 0 : i.edge;
    let l = 0;
    if (
      (e = e.filter((c) => !(c.error || (c.cue.once && c.hasPlayed)))).length
    ) {
      this.resolveOffsets(e, n);
      let c = 0,
        d = 0;
      if (
        (e.forEach((h, f) => {
          const p = h.cue.pre,
            g = h.cue.post,
            y = e[f - 1] || null,
            v = h.appendInPlace,
            b = g ? o : h.startOffset,
            w = h.duration,
            k = h.timelineOccupancy === y8.Range ? w : 0,
            D = h.resumptionOffset,
            $ = (y == null ? void 0 : y.startTime) === b,
            N = b + h.cumulativeDuration;
          let P = v ? N + w : b + D;
          if (p || (!g && b <= 0)) {
            const O = d;
            (d += k), (h.timelineStart = N);
            const X = l;
            (l += w),
              r.push({
                event: h,
                start: N,
                end: P,
                playout: { start: X, end: l },
                integrated: { start: O, end: d },
              });
          } else {
            if (!(b <= o)) return;
            {
              if (!$) {
                const G = b - c;
                if (G > 0.033) {
                  const H = c,
                    E = d;
                  d += G;
                  const S = l;
                  l += G;
                  const L = {
                    previousEvent: e[f - 1] || null,
                    nextEvent: h,
                    start: H,
                    end: H + G,
                    playout: { start: S, end: l },
                    integrated: { start: E, end: d },
                  };
                  r.push(L);
                } else
                  G > 0 &&
                    y &&
                    ((y.cumulativeDuration += G), (r[r.length - 1].end = b));
              }
              g && (P = N), (h.timelineStart = N);
              const O = d;
              d += k;
              const X = l;
              (l += w),
                r.push({
                  event: h,
                  start: N,
                  end: P,
                  playout: { start: X, end: l },
                  integrated: { start: O, end: d },
                });
            }
          }
          const I = h.resumeTime;
          c = g || I > o ? o : I;
        }),
        c < o)
      ) {
        var u;
        const h = c,
          f = d,
          p = o - c;
        d += p;
        const g = l;
        (l += p),
          r.push({
            previousEvent:
              ((u = r[r.length - 1]) == null ? void 0 : u.event) || null,
            nextEvent: null,
            start: c,
            end: h + p,
            playout: { start: g, end: l },
            integrated: { start: f, end: d },
          });
      }
      this.setDurations(o, l, d);
    } else
      r.push({
        previousEvent: null,
        nextEvent: null,
        start: 0,
        end: o,
        playout: { start: 0, end: o },
        integrated: { start: 0, end: o },
      }),
        this.setDurations(o, o, o);
    return r;
  }
  setDurations(e, n, r) {
    this.durations = { primary: e, playout: n, integrated: r };
  }
  resolveOffsets(e, n) {
    const r = n.main.details,
      i = r.live ? 1 / 0 : r.edge;
    let o = 0,
      l = -1;
    e.forEach((u, c) => {
      const d = u.cue.pre,
        h = u.cue.post,
        f = d ? 0 : h ? i : u.startTime;
      if (
        (this.updateAssetDurations(u),
        l === f ? (u.cumulativeDuration = o) : ((o = 0), (l = f)),
        !h &&
          u.snapOptions.in &&
          (u.resumeAnchor =
            eD(null, r.fragments, u.startOffset + u.resumptionOffset, 0, 0) ||
            void 0),
        u.appendInPlace &&
          !u.appendInPlaceStarted &&
          (this.primaryCanResumeInPlaceAt(u, n) || (u.appendInPlace = !1)),
        !u.appendInPlace)
      )
        for (let g = c - 1; c--; )
          e[g + 1].startTime - e[g].resumeTime < 0.033 &&
            (e[g].appendInPlace = !1);
      const p = Ta(u.resumeOffset) ? u.resumeOffset : u.duration;
      o += p;
    });
  }
  primaryCanResumeInPlaceAt(e, n) {
    const r = e.resumeTime,
      i = e.startTime + e.resumptionOffset;
    return Math.abs(r - i) > 0.02
      ? (this.log(
          `"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${i}`
        ),
        !1)
      : n
      ? !Object.keys(n).some((o) => {
          const l = n[o].details,
            u = l.edge;
          if (r > u)
            return (
              this.log(
                `"${e.identifier}" resumption ${r} past ${o} playlist end ${u}`
              ),
              !0
            );
          const c = eD(null, l.fragments, r);
          if (!c)
            return (
              this.log(
                `"${e.identifier}" resumption ${r} does not align with any fragments in ${o} playlist`
              ),
              !0
            );
          const d = o === "audio" ? 0.175 : 0;
          return (
            !(Math.abs(c.start - r) < 0.02 || Math.abs(c.end - r) < 0.02 + d) &&
            (this.log(
              `"${e.identifier}" resumption ${r} not aligned with ${o} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`
            ),
            !0)
          );
        })
      : (this.log(
          `"${e.identifier}" resumption ${r} can not be aligned with media (none selected)`
        ),
        !1);
  }
  updateAssetDurations(e) {
    const n = e.timelineStart;
    let r = 0,
      i = !1,
      o = !1;
    e.assetList.forEach((l, u) => {
      const c = n + r;
      (l.startOffset = r),
        (l.timelineStart = c),
        i || (i = l.duration === null),
        o || (o = !!l.error);
      const d = l.error ? 0 : l.duration || 0;
      r += d;
    }),
      (e.duration = i && !o ? Math.max(r, e.duration) : r);
  }
  removeEvent(e) {
    e.reset(), delete this.eventMap[e.identifier];
  }
}
function Y_(t) {
  return `[${
    t.event ? '"' + t.event.identifier + '"' : "primary"
  }: ${t.start.toFixed(2)}-${t.end.toFixed(2)}]`;
}
class eLn {
  constructor(e) {
    (this.hls = void 0), (this.hls = e);
  }
  destroy() {
    this.hls = null;
  }
  loadAssetList(e, n) {
    const r = e.assetListUrl;
    let i;
    try {
      i = Qje(r, this.hls.sessionId, e.baseUrl);
    } catch (f) {
      const p = this.assignAssetListError(e, Ir.ASSET_LIST_LOAD_ERROR, f, r);
      return void this.hls.trigger(Tt.ERROR, p);
    }
    if (n && !e.cue.pre && !e.cue.post && i.protocol !== "data:") {
      const f = n - e.startTime;
      f > 0 &&
        i.searchParams.set("_HLS_start_offset", "" + Math.round(1e3 * f) / 1e3);
    }
    const o = this.hls.config,
      l = new o.loader(o),
      u = { responseType: "json", url: i.href },
      c = o.interstitialAssetListLoadPolicy.default,
      d = {
        loadPolicy: c,
        timeout: c.maxLoadTimeMs,
        maxRetry: 0,
        retryDelay: 0,
        maxRetryDelay: 0,
      },
      h = {
        onSuccess: (f, p, g, y) => {
          const v = f.data,
            b = v == null ? void 0 : v.ASSETS;
          if (Array.isArray(b))
            (e.assetListResponse = v),
              this.hls.trigger(Tt.ASSET_LIST_LOADED, {
                event: e,
                assetListResponse: v,
                networkDetails: y,
              });
          else {
            const w = this.assignAssetListError(
              e,
              Ir.ASSET_LIST_PARSING_ERROR,
              new Error("Invalid interstitial asset list"),
              g.url,
              p,
              y
            );
            this.hls.trigger(Tt.ERROR, w);
          }
        },
        onError: (f, p, g, y) => {
          const v = this.assignAssetListError(
            e,
            Ir.ASSET_LIST_LOAD_ERROR,
            new Error(
              `Error loading X-ASSET-LIST: HTTP status ${f.code} ${f.text} (${p.url})`
            ),
            p.url,
            y,
            g
          );
          this.hls.trigger(Tt.ERROR, v);
        },
        onTimeout: (f, p, g) => {
          const y = this.assignAssetListError(
            e,
            Ir.ASSET_LIST_LOAD_TIMEOUT,
            new Error(`Timeout loading X-ASSET-LIST (${p.url})`),
            p.url,
            f,
            g
          );
          this.hls.trigger(Tt.ERROR, y);
        },
      };
    return (
      l.load(u, d, h), this.hls.trigger(Tt.ASSET_LIST_LOADING, { event: e }), l
    );
  }
  assignAssetListError(e, n, r, i, o, l) {
    return (
      (e.error = r),
      {
        type: ro.NETWORK_ERROR,
        details: n,
        fatal: !1,
        interstitial: e,
        url: i,
        error: r,
        networkDetails: l,
        stats: o,
      }
    );
  }
}
function sAe(t) {
  t == null || t.play().catch();
}
class tLn extends _b {
  constructor(e, n) {
    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.playingAsset = null),
      (this.bufferingAsset = null),
      (this.shouldPlay = !1),
      (this.onPlay = () => {
        this.shouldPlay = !0;
      }),
      (this.onPause = () => {
        this.shouldPlay = !1;
      }),
      (this.onSeeking = () => {
        const r = this.currentTime;
        if (r === void 0 || this.playbackDisabled) return;
        const i = r - this.timelinePos;
        if (Math.abs(i) < 1 / 7056e5) return;
        const o = i <= -0.01;
        (this.timelinePos = r), (this.bufferedPos = r), this.checkBuffer();
        const l = this.playingItem;
        if (!l) return;
        if ((o && r < l.start) || r >= l.end) {
          var u;
          const f = this.schedule.findItemIndexAtTime(this.timelinePos);
          if (
            (!this.isInterstitial(l) &&
              (u = this.media) != null &&
              u.paused &&
              (this.shouldPlay = !1),
            !o)
          ) {
            const p = this.findItemIndex(l);
            if (f > p) {
              const g = this.schedule.findJumpRestrictedIndex(p + 1, f);
              if (g > p) return void this.setSchedulePosition(g);
            }
          }
          return void this.setSchedulePosition(f);
        }
        const c = this.playingAsset;
        if (!c) {
          if (this.playingLastItem && this.isInterstitial(l)) {
            const f = l.event.assetList[0];
            f &&
              ((this.playingItem = null), this.setScheduleToAssetAtTime(r, f));
          }
          return;
        }
        const d = c.timelineStart,
          h = c.duration || 0;
        ((o && r < d) || r >= d + h) && this.setScheduleToAssetAtTime(r, c);
      }),
      (this.onTimeupdate = () => {
        const r = this.currentTime;
        if (r === void 0 || this.playbackDisabled || !(r > this.timelinePos))
          return;
        r > this.bufferedPos && this.checkBuffer(), (this.timelinePos = r);
        const i = this.playingItem;
        if (!i || this.playingLastItem) return;
        if (r >= i.end) {
          this.timelinePos = i.end;
          const l = this.findItemIndex(i);
          this.setSchedulePosition(l + 1);
        }
        const o = this.playingAsset;
        o &&
          r >= o.timelineStart + (o.duration || 0) &&
          this.setScheduleToAssetAtTime(r, o);
      }),
      (this.onScheduleUpdate = (r, i) => {
        const o = this.schedule,
          l = this.playingItem,
          u = o.events || [],
          c = o.items || [],
          d = o.durations,
          h = r.map((g) => g.identifier),
          f = !(!u.length && !h.length);
        f &&
          (this.hls.config.interstitialAppendInPlace === !1 &&
            u.forEach((g) => (g.appendInPlace = !1)),
          this.log(`INTERSTITIALS_UPDATED (${u.length}): ${u}
Schedule: ${c.map((g) => Y_(g))}`)),
          h.length && this.log(`Removed events ${h}`),
          this.playerQueue.forEach((g) => {
            if (g.interstitial.appendInPlace) {
              const y = g.assetItem.timelineStart,
                v = g.timelineOffset - y;
              if (v)
                try {
                  g.timelineOffset = y;
                } catch (b) {
                  Math.abs(v) > 0.02 &&
                    this.warn(
                      `${b} ("${g.assetId}" ${g.timelineOffset}->${y})`
                    );
                }
            }
          }),
          l &&
            !l.event &&
            (this.playingItem = this.updateItem(l, this.timelinePos));
        const p = this.bufferingItem;
        if (
          (p &&
            (p.event
              ? this.updateItem(p) ||
                ((this.bufferingItem = null),
                this.clearInterstitial(p.event, null))
              : (this.bufferingItem = this.updateItem(p, this.bufferedPos))),
          (this.waitingItem = this.updateItem(this.waitingItem)),
          r.forEach((g) => {
            g.assetList.forEach((y) => {
              this.clearAssetPlayer(y.identifier, null);
            });
          }),
          f || i)
        ) {
          if (
            (this.hls.trigger(Tt.INTERSTITIALS_UPDATED, {
              events: u.slice(0),
              schedule: c.slice(0),
              durations: d,
              removedIds: h,
            }),
            this.isInterstitial(l) && h.includes(l.event.identifier))
          )
            return (
              this.warn(
                `Interstitial "${l.event.identifier}" removed while playing`
              ),
              void this.primaryFallback(l.event)
            );
          this.checkBuffer();
        }
      }),
      (this.hls = e),
      (this.HlsPlayerClass = n),
      (this.assetListLoader = new eLn(e)),
      (this.schedule = new qxn(this.onScheduleUpdate, e.logger)),
      this.registerListeners();
  }
  registerListeners() {
    const e = this.hls;
    e.on(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.on(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.on(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.LEVEL_UPDATED, this.onLevelUpdated, this),
      e.on(Tt.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
      e.on(Tt.AUDIO_TRACK_UPDATED, this.onAudioTrackUpdated, this),
      e.on(Tt.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
      e.on(Tt.SUBTITLE_TRACK_UPDATED, this.onSubtitleTrackUpdated, this),
      e.on(Tt.EVENT_CUE_ENTER, this.onInterstitialCueEnter, this),
      e.on(Tt.ASSET_LIST_LOADED, this.onAssetListLoaded, this),
      e.on(Tt.BUFFER_APPENDED, this.onBufferAppended, this),
      e.on(Tt.BUFFER_FLUSHED, this.onBufferFlushed, this),
      e.on(Tt.BUFFERED_TO_END, this.onBufferedToEnd, this),
      e.on(Tt.MEDIA_ENDED, this.onMediaEnded, this),
      e.on(Tt.ERROR, this.onError, this),
      e.on(Tt.DESTROYING, this.onDestroying, this);
  }
  unregisterListeners() {
    const e = this.hls;
    e &&
      (e.off(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.off(Tt.MEDIA_ATTACHED, this.onMediaAttached, this),
      e.off(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.LEVEL_UPDATED, this.onLevelUpdated, this),
      e.off(Tt.AUDIO_TRACK_SWITCHING, this.onAudioTrackSwitching, this),
      e.off(Tt.AUDIO_TRACK_UPDATED, this.onAudioTrackUpdated, this),
      e.off(Tt.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
      e.off(Tt.SUBTITLE_TRACK_UPDATED, this.onSubtitleTrackUpdated, this),
      e.off(Tt.EVENT_CUE_ENTER, this.onInterstitialCueEnter, this),
      e.off(Tt.ASSET_LIST_LOADED, this.onAssetListLoaded, this),
      e.off(Tt.BUFFER_CODECS, this.onBufferCodecs, this),
      e.off(Tt.BUFFER_APPENDED, this.onBufferAppended, this),
      e.off(Tt.BUFFER_FLUSHED, this.onBufferFlushed, this),
      e.off(Tt.BUFFERED_TO_END, this.onBufferedToEnd, this),
      e.off(Tt.MEDIA_ENDED, this.onMediaEnded, this),
      e.off(Tt.ERROR, this.onError, this),
      e.off(Tt.DESTROYING, this.onDestroying, this));
  }
  startLoad() {
    this.resumeBuffering();
  }
  stopLoad() {
    this.pauseBuffering();
  }
  resumeBuffering() {
    this.playerQueue.forEach((e) => e.resumeBuffering());
  }
  pauseBuffering() {
    this.playerQueue.forEach((e) => e.pauseBuffering());
  }
  destroy() {
    this.unregisterListeners(),
      this.stopLoad(),
      this.assetListLoader && this.assetListLoader.destroy(),
      this.emptyPlayerQueue(),
      this.clearScheduleState(),
      this.schedule && this.schedule.destroy(),
      (this.media =
        this.detachedData =
        this.mediaSelection =
        this.requiredTracks =
        this.altSelection =
        this.manager =
          null),
      (this.hls = this.HlsPlayerClass = this.schedule = this.log = null),
      (this.assetListLoader = null),
      (this.onPlay = this.onPause = this.onSeeking = this.onTimeupdate = null),
      (this.onScheduleUpdate = null);
  }
  onDestroying() {
    const e = this.primaryMedia;
    e && this.removeMediaListeners(e);
  }
  removeMediaListeners(e) {
    e.removeEventListener("play", this.onPlay),
      e.removeEventListener("pause", this.onPause),
      e.removeEventListener("seeking", this.onSeeking),
      e.removeEventListener("timeupdate", this.onTimeupdate);
  }
  onMediaAttaching(e, n) {
    const r = (this.media = n.media);
    this.removeMediaListeners(r),
      r.addEventListener("seeking", this.onSeeking),
      r.addEventListener("timeupdate", this.onTimeupdate),
      r.addEventListener("play", this.onPlay),
      r.addEventListener("pause", this.onPause);
  }
  onMediaAttached(e, n) {
    const r = this.playingItem,
      i = this.detachedData;
    if (((this.detachedData = null), r === null)) this.checkStart();
    else if (!i) {
      this.clearScheduleState();
      const o = this.findItemIndex(r);
      this.setSchedulePosition(o);
    }
  }
  clearScheduleState() {
    this.playingItem =
      this.bufferingItem =
      this.waitingItem =
      this.playingAsset =
      this.bufferingAsset =
        null;
  }
  onMediaDetaching(e, n) {
    const r = !!n.transferMedia,
      i = this.media;
    if (
      ((this.media = null),
      !r && (i && this.removeMediaListeners(i), this.detachedData))
    ) {
      const o = this.getBufferingPlayer();
      o &&
        ((this.playingAsset = null),
        (this.bufferingAsset = null),
        (this.bufferingItem = null),
        (this.waitingItem = null),
        (this.detachedData = null),
        o.detachMedia()),
        (this.shouldPlay = !1);
    }
  }
  get interstitialsManager() {
    if (!this.manager) {
      if (!this.hls || !this.schedule.events) return null;
      const e = this,
        n = () => e.bufferingItem || e.waitingItem,
        r = () => e.playingItem || e.waitingItem,
        i = (h) => h && e.getAssetPlayer(h.identifier),
        o = (h, f, p, g, y) => {
          if (h) {
            let v = h[f].start;
            const b = h.event;
            if (b) {
              if (f === "playout" || b.timelineOccupancy !== y8.Point) {
                const w = i(p);
                (w == null ? void 0 : w.interstitial) === b &&
                  (v += w.assetItem.startOffset + w[y]);
              }
            } else v += (g === "bufferedPos" ? u() : e[g]) - h.start;
            return v;
          }
          return 0;
        },
        l = (h, f) => {
          if (h !== 0 && f !== "primary" && e.schedule.length) {
            var p;
            const g = e.schedule.findItemIndexAtTime(h),
              y = (p = e.schedule.items) == null ? void 0 : p[g];
            if (y) return h + (y[f].start - y.start);
          }
          return h;
        },
        u = () => {
          const h = e.bufferedPos;
          return h === Number.MAX_VALUE ? c("primary") : h;
        },
        c = (h) => {
          var f;
          return (f = e.primaryDetails) != null && f.live
            ? e.primaryDetails.edge
            : e.schedule.durations[h];
        },
        d = (h, f) => {
          var p, g;
          const y = r();
          if (y != null && (p = y.event) != null && p.restrictions.skip) return;
          e.log(`seek to ${h} "${f}"`);
          const v = r(),
            b = e.schedule.findItemIndexAtTime(h, f),
            w = (g = e.schedule.items) == null ? void 0 : g[b],
            k = v == null ? void 0 : v.event,
            D = k == null ? void 0 : k.appendInPlace,
            $ = v && e.itemsMatch(v, w);
          if (v && (D || $)) {
            const P = i(e.playingAsset),
              I = (P == null ? void 0 : P.media) || e.hls.media;
            if (I) {
              const O =
                  h -
                  (f === "primary"
                    ? I.currentTime
                    : o(v, f, e.playingAsset, "timelinePos", "currentTime")),
                X = I.currentTime + O;
              if (X >= 0 && (!P || D || X <= P.duration))
                return void (I.currentTime = X);
            }
          }
          if (w) {
            let P = h;
            if (f !== "primary") {
              const O = h - w[f].start;
              P = w.start + O;
            }
            const I = !e.isInterstitial(w);
            if (e.isInterstitial(v) || (!I && !w.event.appendInPlace)) {
              if (v) {
                const O = e.findItemIndex(v);
                if (b > O) {
                  const G = e.schedule.findJumpRestrictedIndex(O + 1, b);
                  if (G > O) return void e.setSchedulePosition(G);
                }
                let X = 0;
                if (I) e.timelinePos = P;
                else {
                  var N;
                  const G =
                    w == null || (N = w.event) == null ? void 0 : N.assetList;
                  if (G) {
                    const H = h - (w[f] || w).start;
                    for (let E = G.length; E--; ) {
                      const S = G[E];
                      if (
                        S.duration &&
                        H >= S.startOffset &&
                        H < S.startOffset + S.duration
                      ) {
                        X = E;
                        break;
                      }
                    }
                  }
                }
                e.setSchedulePosition(b, X);
              }
            } else {
              const O = e.hls.media;
              O && (O.currentTime = P);
            }
          }
        };
      this.manager = {
        get events() {
          var h, f;
          return (
            ((h = e.schedule) == null || (f = h.events) == null
              ? void 0
              : f.slice(0)) || []
          );
        },
        get schedule() {
          var h, f;
          return (
            ((h = e.schedule) == null || (f = h.items) == null
              ? void 0
              : f.slice(0)) || []
          );
        },
        get playerQueue() {
          return e.playerQueue.slice(0);
        },
        get bufferingPlayer() {
          return e.getBufferingPlayer();
        },
        get bufferingAsset() {
          return e.bufferingAsset;
        },
        get bufferingItem() {
          return e.bufferingItem;
        },
        get playingAsset() {
          return e.playingAsset;
        },
        get playingItem() {
          return e.playingItem;
        },
        get bufferingIndex() {
          const h = n();
          return e.findItemIndex(h);
        },
        get playingIndex() {
          const h = r();
          return e.findItemIndex(h);
        },
        get waitingIndex() {
          return e.findItemIndex(e.waitingItem);
        },
        primary: {
          get bufferedEnd() {
            return u();
          },
          get currentTime() {
            const h = e.timelinePos;
            return h > 0 ? h : 0;
          },
          get duration() {
            return c("primary");
          },
          get seekableStart() {
            var h;
            return (
              ((h = e.primaryDetails) == null ? void 0 : h.fragmentStart) || 0
            );
          },
          seekTo: (h) => d(h, "primary"),
        },
        playout: {
          get bufferedEnd() {
            return o(
              n(),
              "playout",
              e.bufferingAsset,
              "bufferedPos",
              "bufferedEnd"
            );
          },
          get currentTime() {
            return o(
              r(),
              "playout",
              e.playingAsset,
              "timelinePos",
              "currentTime"
            );
          },
          get duration() {
            return c("playout");
          },
          get seekableStart() {
            var h;
            return l(
              ((h = e.primaryDetails) == null ? void 0 : h.fragmentStart) || 0,
              "playout"
            );
          },
          seekTo: (h) => d(h, "playout"),
        },
        integrated: {
          get bufferedEnd() {
            return o(
              n(),
              "integrated",
              e.bufferingAsset,
              "bufferedPos",
              "bufferedEnd"
            );
          },
          get currentTime() {
            return o(
              r(),
              "integrated",
              e.playingAsset,
              "timelinePos",
              "currentTime"
            );
          },
          get duration() {
            return c("integrated");
          },
          get seekableStart() {
            var h;
            return l(
              ((h = e.primaryDetails) == null ? void 0 : h.fragmentStart) || 0,
              "integrated"
            );
          },
          seekTo: (h) => d(h, "integrated"),
        },
        skip: () => {
          const h = r(),
            f = h == null ? void 0 : h.event;
          if (f && !f.restrictions.skip) {
            const p = e.findItemIndex(h);
            if (f.appendInPlace) {
              const g = h.playout.start + h.event.duration;
              d(g + 0.001, "playout");
            } else e.advanceAfterAssetEnded(f, p, 1 / 0);
          }
        },
      };
    }
    return this.manager;
  }
  get playingLastItem() {
    var e;
    const n = this.playingItem;
    if (!this.playbackStarted || !n) return !1;
    const r = (e = this.schedule) == null ? void 0 : e.items;
    return this.itemsMatch(n, r ? r[r.length - 1] : null);
  }
  get playbackStarted() {
    return this.playingItem !== null;
  }
  get currentTime() {
    var e, n, r;
    if (this.mediaSelection === null) return;
    const i = this.waitingItem || this.playingItem;
    if (this.isInterstitial(i) && !i.event.appendInPlace) return;
    let o = this.media;
    !o &&
      (e = this.bufferingItem) != null &&
      (n = e.event) != null &&
      n.appendInPlace &&
      (o = this.primaryMedia);
    const l = (r = o) == null ? void 0 : r.currentTime;
    return l !== void 0 && Ta(l) ? l : void 0;
  }
  get primaryMedia() {
    var e;
    return (
      this.media || ((e = this.detachedData) == null ? void 0 : e.media) || null
    );
  }
  isInterstitial(e) {
    return !(e == null || !e.event);
  }
  retreiveMediaSource(e, n) {
    const r = this.getAssetPlayer(e);
    r && this.transferMediaFromPlayer(r, n);
  }
  transferMediaFromPlayer(e, n) {
    const r = e.interstitial.appendInPlace,
      i = e.media;
    if (r && i === this.primaryMedia) {
      if (!n || (this.isInterstitial(n) && !n.event.appendInPlace))
        return void (n && i && (this.detachedData = { media: i }));
      const o = e.transferMedia();
      this.log(`transfer MediaSource from ${e} ${JSON.stringify(o)}`),
        (this.bufferingAsset = null),
        (this.detachedData = o);
    } else n && i && (this.shouldPlay || (this.shouldPlay = !i.paused));
  }
  transferMediaTo(e, n) {
    var r, i;
    let o = null;
    const l = this.hls,
      u = e !== l,
      c = u && e.interstitial.appendInPlace,
      d = (r = this.detachedData) == null ? void 0 : r.mediaSource;
    let h;
    if (l.media && c)
      (o = l.transferMedia()), (this.detachedData = o), (h = "Primary");
    else if (d) {
      const g = this.getBufferingPlayer();
      g && (o = g.transferMedia()), (h = `${g}`);
    } else h = "<unknown>";
    this.log(`transferring to ${u ? e : "Primary"}
MediaSource ${JSON.stringify(o)} from ${h}`),
      o ||
        (d
          ? ((o = this.detachedData),
            this.log(`using detachedData: MediaSource ${JSON.stringify(o)}`))
          : (this.detachedData && this.hls.media !== n) ||
            (this.hls.detachMedia(), (this.detachedData = { media: n })));
    const f =
        o &&
        "mediaSource" in o &&
        ((i = o.mediaSource) == null ? void 0 : i.readyState) !== "closed",
      p = f && o ? o : n;
    if (
      (this.log(
        `${f ? "transfering MediaSource" : "attaching media"} to ${
          u ? e : "Primary"
        }`
      ),
      p === o)
    ) {
      const g = u && e.assetId === this.schedule.assetIdAtEnd;
      p.overrides = {
        duration: this.schedule.duration,
        endOfStream: !u || g,
        cueRemoval: !1,
      };
    }
    e.attachMedia(p);
  }
  onInterstitialCueEnter() {
    this.onTimeupdate();
  }
  checkStart() {
    const e = this.schedule,
      n = e.events;
    if (!n || this.playbackDisabled) return;
    this.bufferedPos === -1 && (this.bufferedPos = 0);
    const r = this.timelinePos,
      i = this.waitingItem;
    if (r === -1) {
      const o = this.hls.startPosition;
      if (((this.timelinePos = o), n.length && n[0].cue.pre)) {
        const l = e.findEventIndex(n[0].identifier);
        this.setSchedulePosition(l);
      } else if (o >= 0 || !this.primaryLive) {
        const l = (this.timelinePos = o > 0 ? o : 0),
          u = e.findItemIndexAtTime(l);
        this.setSchedulePosition(u);
      }
    } else if (i && !this.playingItem) {
      const o = e.findItemIndex(i);
      this.setSchedulePosition(o);
    }
  }
  advanceAfterAssetEnded(e, n, r) {
    const i = r + 1;
    if (e.isAssetPastPlayoutLimit(i) || e.assetList[i].error) {
      const o = this.schedule.items;
      if (o) {
        const l = n + 1;
        if (l >= o.length) return void this.setSchedulePosition(-1);
        this.setSchedulePosition(l);
      }
    } else this.setSchedulePosition(n, i);
  }
  setScheduleToAssetAtTime(e, n) {
    const r = this.schedule,
      i = n.parentIdentifier,
      o = r.getEvent(i);
    if (o) {
      const l = r.findEventIndex(i),
        u = r.findAssetIndex(o, e);
      this.setSchedulePosition(l, u);
    }
  }
  setSchedulePosition(e, n) {
    const r = this.schedule.items;
    if (!r || this.playbackDisabled) return;
    this.log(`setSchedulePosition ${e}, ${n}`);
    const i = e >= 0 ? r[e] : null,
      o = this.primaryMedia,
      l = this.playingItem,
      u = this.playingLastItem;
    if (this.isInterstitial(l)) {
      var c;
      const h = l.event,
        f = this.playingAsset,
        p = f == null ? void 0 : f.identifier,
        g = p ? this.getAssetPlayer(p) : null;
      if (
        g &&
        p &&
        (!this.eventItemsMatch(l, i) ||
          (n !== void 0 &&
            p !== ((c = h.assetList) == null ? void 0 : c[n].identifier)))
      ) {
        this.playingAsset = null;
        const y = h.findAssetIndex(f);
        this.log(
          `INTERSTITIAL_ASSET_ENDED ${y + 1}/${h.assetList.length} ${Zne(f)}`
        ),
          this.hls.trigger(Tt.INTERSTITIAL_ASSET_ENDED, {
            asset: f,
            assetListIndex: y,
            event: h,
            schedule: r.slice(0),
            scheduleIndex: e,
            player: g,
          }),
          this.retreiveMediaSource(p, i),
          g.media && !this.detachedData && g.detachMedia(),
          this.clearAssetPlayer(p, i);
      }
      if (
        !this.eventItemsMatch(l, i) &&
        ((this.playingItem = null),
        this.log(`INTERSTITIAL_ENDED ${h} ${Y_(l)}`),
        (h.hasPlayed = !0),
        this.hls.trigger(Tt.INTERSTITIAL_ENDED, {
          event: h,
          schedule: r.slice(0),
          scheduleIndex: e,
        }),
        this.clearInterstitial(h, i),
        h.cue.once)
      ) {
        if ((this.updateSchedule(), i)) {
          const y = this.schedule.findItemIndex(i);
          this.setSchedulePosition(y, n);
        }
        return;
      }
    }
    const d = this.playerQueue;
    if (
      (d.length &&
        d.forEach((h) => {
          const f = h.interstitial,
            p = this.schedule.findEventIndex(f.identifier);
          (p < e || p > e + 1) && this.clearInterstitial(f, i);
        }),
      this.isInterstitial(i))
    ) {
      this.timelinePos = Math.min(Math.max(this.timelinePos, i.start), i.end);
      const h = i.event;
      n === void 0 && (n = this.schedule.findAssetIndex(h, this.timelinePos));
      const f = this.waitingItem;
      let p = this.preloadAssets(h, n);
      p || this.setBufferingItem(i),
        this.eventItemsMatch(i, l || f) ||
          ((this.waitingItem = i),
          this.log(
            `INTERSTITIAL_STARTED ${Y_(i)} ${
              h.appendInPlace ? "append in place" : ""
            }`
          ),
          this.hls.trigger(Tt.INTERSTITIAL_STARTED, {
            event: h,
            schedule: r.slice(0),
            scheduleIndex: e,
          }));
      const g = h.assetList.length;
      if (g === 0 && !h.assetListResponse)
        return void this.log(`Waiting for ASSET-LIST to complete loading ${h}`);
      if (
        (h.assetListLoader &&
          (h.assetListLoader.destroy(), (h.assetListLoader = void 0)),
        !o)
      )
        return void this.log(
          `Waiting for attachMedia to start Interstitial ${h}`
        );
      (this.waitingItem = null), (this.playingItem = i);
      const y = h.assetList[n];
      if (!y) {
        const v = r[e + 1],
          b = this.media;
        return (
          v &&
            b &&
            !this.isInterstitial(v) &&
            b.currentTime < v.start &&
            (b.currentTime = this.timelinePos = v.start),
          void this.advanceAfterAssetEnded(h, e, n || 0)
        );
      }
      if (
        (p || (p = this.getAssetPlayer(y.identifier)),
        (p === null || p.destroyed) &&
          (this.warn(`asset ${n + 1}/${g} player destroyed ${h}`),
          (p = this.createAssetPlayer(h, y, n))),
        !this.eventItemsMatch(i, this.bufferingItem) &&
          h.appendInPlace &&
          this.isAssetBuffered(y))
      )
        return;
      this.startAssetPlayer(p, n, r, e, o), this.shouldPlay && sAe(p.media);
    } else
      i !== null
        ? (this.resumePrimary(i, e, l), this.shouldPlay && sAe(this.hls.media))
        : u &&
          this.isInterstitial(l) &&
          ((this.playingItem = l),
          l.event.appendInPlace ||
            this.attachPrimary(this.schedule.durations.primary, null));
  }
  get playbackDisabled() {
    return this.hls.config.enableInterstitialPlayback === !1;
  }
  get primaryDetails() {
    var e, n;
    return (e = this.mediaSelection) == null || (n = e.main) == null
      ? void 0
      : n.details;
  }
  get primaryLive() {
    var e;
    return !((e = this.primaryDetails) == null || !e.live);
  }
  resumePrimary(e, n, r) {
    var i;
    if (
      ((this.playingItem = e),
      (this.playingAsset = null),
      (this.waitingItem = null),
      this.bufferedToItem(e),
      this.log(`resuming ${Y_(e)}`),
      (i = this.detachedData) == null || !i.mediaSource)
    ) {
      let l = this.timelinePos;
      (l < e.start || l >= e.end) &&
        ((l = this.getPrimaryResumption(e, n)), (this.timelinePos = l)),
        this.attachPrimary(l, e);
    }
    if (!r) return;
    const o = this.schedule.items;
    o &&
      (this.log(`resumed ${Y_(e)}`),
      this.hls.trigger(Tt.INTERSTITIALS_PRIMARY_RESUMED, {
        schedule: o.slice(0),
        scheduleIndex: n,
      }),
      this.checkBuffer());
  }
  getPrimaryResumption(e, n) {
    const r = e.start;
    if (this.primaryLive) {
      const i = this.primaryDetails;
      if (n === 0) return this.hls.startPosition;
      if (i && (r < i.fragmentStart || r > i.edge))
        return this.hls.liveSyncPosition || -1;
    }
    return r;
  }
  isAssetBuffered(e) {
    const n = this.getAssetPlayer(e.identifier);
    return n != null && n.hls
      ? n.hls.bufferedToEnd
      : Ul.bufferInfo(this.primaryMedia, this.timelinePos, 0).end + 1 >=
          e.timelineStart + (e.duration || 0);
  }
  attachPrimary(e, n, r) {
    n ? this.setBufferingItem(n) : (this.bufferingItem = null),
      (this.bufferingAsset = null);
    const i = this.primaryMedia;
    if (!i) return;
    const o = this.hls;
    o.media
      ? this.checkBuffer()
      : (this.transferMediaTo(o, i), r && this.startLoadingPrimaryAt(e, r)),
      r || ((this.timelinePos = e), this.startLoadingPrimaryAt(e, r));
  }
  startLoadingPrimaryAt(e, n) {
    this.hls.loadingEnabled && this.hls.startLoad(e, n);
  }
  onManifestLoading() {
    this.stopLoad(),
      this.schedule.reset(),
      this.emptyPlayerQueue(),
      this.clearScheduleState(),
      (this.shouldPlay = !1),
      (this.bufferedPos = this.timelinePos = -1),
      (this.mediaSelection =
        this.altSelection =
        this.manager =
        this.requiredTracks =
          null),
      this.hls.off(Tt.BUFFER_CODECS, this.onBufferCodecs, this),
      this.hls.on(Tt.BUFFER_CODECS, this.onBufferCodecs, this);
  }
  onLevelUpdated(e, n) {
    if (n.level === -1) return;
    const r = this.hls.levels[n.level],
      i = pl(pl({}, this.mediaSelection || this.altSelection), {}, { main: r });
    (this.mediaSelection = i),
      this.schedule.parseInterstitialDateRanges(i),
      !this.playingItem && this.schedule.items && this.checkStart();
  }
  onAudioTrackUpdated(e, n) {
    const r = this.hls.audioTracks[n.id],
      i = this.mediaSelection;
    if (!i)
      return void (this.altSelection = pl(
        pl({}, this.altSelection),
        {},
        { audio: r }
      ));
    const o = pl(pl({}, i), {}, { audio: r });
    this.mediaSelection = o;
  }
  onSubtitleTrackUpdated(e, n) {
    const r = this.hls.subtitleTracks[n.id],
      i = this.mediaSelection;
    if (!i)
      return void (this.altSelection = pl(
        pl({}, this.altSelection),
        {},
        { subtitles: r }
      ));
    const o = pl(pl({}, i), {}, { subtitles: r });
    this.mediaSelection = o;
  }
  onAudioTrackSwitching(e, n) {
    const r = PRe(n);
    this.playerQueue.forEach(
      (i) => i.hls.setAudioOption(n) || i.hls.setAudioOption(r)
    );
  }
  onSubtitleTrackSwitch(e, n) {
    const r = PRe(n);
    this.playerQueue.forEach(
      (i) =>
        i.hls.setSubtitleOption(n) ||
        (n.id !== -1 && i.hls.setSubtitleOption(r))
    );
  }
  onBufferCodecs(e, n) {
    const r = n.tracks;
    r && (this.requiredTracks = r);
  }
  onBufferAppended(e, n) {
    this.checkBuffer();
  }
  onBufferFlushed(e, n) {
    const { playingItem: r } = this;
    if (r && r !== this.bufferingItem && !this.isInterstitial(r)) {
      const i = this.timelinePos;
      (this.bufferedPos = i), this.setBufferingItem(r);
    }
  }
  onBufferedToEnd(e) {
    const n = this.schedule.events;
    if (this.bufferedPos < Number.MAX_VALUE && n) {
      for (let i = 0; i < n.length; i++) {
        const o = n[i];
        if (o.cue.post) {
          var r;
          const l = this.schedule.findEventIndex(o.identifier),
            u = (r = this.schedule.items) == null ? void 0 : r[l];
          this.isInterstitial(u) &&
            this.eventItemsMatch(u, this.bufferingItem) &&
            this.bufferedToItem(u, 0);
          break;
        }
      }
      this.bufferedPos = Number.MAX_VALUE;
    }
  }
  onMediaEnded(e) {
    const n = this.playingItem;
    if (!this.playingLastItem && n) {
      const r = this.findItemIndex(n);
      this.setSchedulePosition(r + 1);
    }
  }
  updateItem(e, n) {
    const r = this.schedule.items;
    return (e && r && r[this.findItemIndex(e, n)]) || null;
  }
  itemsMatch(e, n) {
    var r, i;
    return (
      !!n &&
      (e === n ||
        (e.event && n.event && this.eventItemsMatch(e, n)) ||
        (!e.event &&
          !n.event &&
          ((r = e.nextEvent) == null ? void 0 : r.identifier) ===
            ((i = n.nextEvent) == null ? void 0 : i.identifier)))
    );
  }
  eventItemsMatch(e, n) {
    var r;
    return (
      !!n &&
      (e === n ||
        e.event.identifier === ((r = n.event) == null ? void 0 : r.identifier))
    );
  }
  findItemIndex(e, n) {
    return e ? this.schedule.findItemIndex(e, n) : -1;
  }
  updateSchedule() {
    const e = this.mediaSelection;
    e && this.schedule.updateSchedule(e, []);
  }
  checkBuffer() {
    const e = this.schedule.items;
    if (!e) return;
    const n = Ul.bufferInfo(this.primaryMedia, this.timelinePos, 0);
    this.updateBufferedPos(n.end, e, n.len === 0);
  }
  updateBufferedPos(e, n, r) {
    const i = this.schedule,
      o = this.bufferingItem;
    if (this.bufferedPos > e) return;
    if (n.length === 1 && this.itemsMatch(n[0], o))
      return void (this.bufferedPos = e);
    const l = this.playingItem,
      u = this.findItemIndex(l);
    let c = i.findItemIndexAtTime(e);
    if (this.bufferedPos < e) {
      var d;
      const h = this.findItemIndex(o),
        f = Math.min(h + 1, n.length - 1),
        p = n[f];
      if (
        (c === -1 && o && e >= o.end && (c = f),
        f - u > 1 &&
          (o == null || (d = o.event) == null ? void 0 : d.appendInPlace) ===
            !1)
      )
        return;
      if (((this.bufferedPos = e), c > h && c > u)) this.bufferedToItem(p);
      else {
        const g = this.primaryDetails;
        this.primaryLive &&
          g &&
          e > g.edge - g.targetduration &&
          p.start < g.edge + this.hls.config.interstitialLiveLookAhead &&
          this.isInterstitial(p) &&
          this.preloadAssets(p.event, 0);
      }
    } else r && l && o !== l && c === u && this.bufferedToItem(l);
  }
  setBufferingItem(e) {
    const n = this.bufferingItem,
      r = this.schedule,
      { items: i, events: o } = r;
    if (i && o && (!n || r.findItemIndex(n) !== r.findItemIndex(e))) {
      const l = this.isInterstitial(e),
        u = this.getBufferingPlayer(),
        c = u ? u.remaining : n ? n.end - this.timelinePos : 0;
      this.log(
        `buffered to boundary ${Y_(e)}` +
          (n ? ` (${c.toFixed(2)} remaining)` : "")
      ),
        (this.bufferingItem = e),
        (this.bufferedPos = e.start),
        this.playbackDisabled ||
          (l
            ? this.playerQueue.forEach((d) => d.resumeBuffering())
            : (this.hls.resumeBuffering(),
              this.playerQueue.forEach((d) => d.pauseBuffering()))),
        this.hls.trigger(Tt.INTERSTITIALS_BUFFERED_TO_BOUNDARY, {
          events: o.slice(0),
          schedule: i.slice(0),
          bufferingIndex: this.findItemIndex(e),
          playingIndex: this.findItemIndex(this.playingItem),
        });
    }
    return n;
  }
  bufferedToItem(e, n = 0) {
    const r = this.setBufferingItem(e);
    if (!this.playbackDisabled) {
      if (this.isInterstitial(e)) this.bufferedToEvent(e, n);
      else if (r !== null) {
        this.bufferingAsset = null;
        const i = this.detachedData;
        i
          ? i.mediaSource
            ? this.attachPrimary(e.start, e, !0)
            : this.preloadPrimary(e)
          : this.preloadPrimary(e);
      }
    }
  }
  preloadPrimary(e) {
    const n = this.findItemIndex(e),
      r = this.getPrimaryResumption(e, n);
    this.startLoadingPrimaryAt(r);
  }
  bufferedToEvent(e, n) {
    const r = e.event,
      i = r.assetList.length === 0 && !r.assetListLoader,
      o = r.cue.once;
    if (i || !o) {
      const l = this.preloadAssets(r, n);
      if (l != null && l.interstitial.appendInPlace) {
        const u = r.assetList[n],
          c = this.primaryMedia;
        u && c && this.bufferAssetPlayer(l, c);
      }
    }
  }
  preloadAssets(e, n) {
    const r = e.assetList.length,
      i = r === 0 && !e.assetListLoader,
      o = e.cue.once;
    if (i) {
      this.log(`Load interstitial asset ${n + 1}/${r} ${e}`);
      const l = e.timelineStart;
      e.appendInPlace && this.flushFrontBuffer(l);
      const u = e.assetUrl;
      if (u) return this.createAsset(e, 0, 0, l, e.duration, u);
      let c = 0;
      !this.playingItem &&
        this.primaryLive &&
        ((c = this.hls.startPosition),
        c === -1 && (c = this.hls.liveSyncPosition || 0));
      const d = this.assetListLoader.loadAssetList(e, c);
      d && (e.assetListLoader = d);
    } else if (!o && r) {
      for (let l = n; l < r; l++) {
        const u = e.assetList[l],
          c = this.getAssetPlayerQueueIndex(u.identifier);
        (c !== -1 && !this.playerQueue[c].destroyed) ||
          u.error ||
          this.createAssetPlayer(e, u, l);
      }
      return this.getAssetPlayer(e.assetList[n].identifier);
    }
    return null;
  }
  flushFrontBuffer(e) {
    const n = this.requiredTracks;
    n &&
      Object.keys(n).forEach((r) => {
        this.hls.trigger(Tt.BUFFER_FLUSHING, {
          startOffset: e,
          endOffset: 1 / 0,
          type: r,
        });
      });
  }
  getAssetPlayerQueueIndex(e) {
    const n = this.playerQueue;
    for (let r = 0; r < n.length; r++) if (e === n[r].assetId) return r;
    return -1;
  }
  getAssetPlayer(e) {
    const n = this.getAssetPlayerQueueIndex(e);
    return this.playerQueue[n] || null;
  }
  getBufferingPlayer() {
    const { playerQueue: e, primaryMedia: n } = this;
    if (n) {
      for (let r = 0; r < e.length; r++) if (e[r].media === n) return e[r];
    }
    return null;
  }
  createAsset(e, n, r, i, o, l) {
    const u = {
      parentIdentifier: e.identifier,
      identifier: Zxn(e, l, n),
      duration: o,
      startOffset: r,
      timelineStart: i,
      uri: l,
    };
    return this.createAssetPlayer(e, u, n);
  }
  createAssetPlayer(e, n, r) {
    this.log(`create HLSAssetPlayer for ${Zne(n)}`);
    const i = this.hls,
      o = i.userConfig;
    let l = o.videoPreference;
    const u = i.levels[i.loadLevel] || i.levels[i.currentLevel];
    (l || u) &&
      ((l = du({}, l)),
      u.videoCodec && (l.videoCodec = u.videoCodec),
      u.videoRange && (l.allowedVideoRanges = [u.videoRange]));
    const c = i.audioTracks[i.audioTrack],
      d = i.subtitleTracks[i.subtitleTrack];
    let h = 0;
    if (this.primaryLive) {
      const D = this.timelinePos - n.timelineStart;
      if (D > 1) {
        const $ = n.duration;
        $ && D < $ && (h = D);
      }
    }
    const f = pl(
      pl({}, o),
      {},
      {
        autoStartLoad: !0,
        startFragPrefetch: !0,
        primarySessionId: i.sessionId,
        assetPlayerId: n.identifier,
        abrEwmaDefaultEstimate: i.bandwidthEstimate,
        interstitialsController: void 0,
        startPosition: h,
        liveDurationInfinity: !1,
        testBandwidth: !1,
        videoPreference: l,
        audioPreference: c || o.audioPreference,
        subtitlePreference: d || o.subtitlePreference,
      }
    );
    e.appendInPlace &&
      ((e.appendInPlaceStarted = !0),
      n.timelineStart && (f.timelineOffset = n.timelineStart));
    const p = f.cmcd;
    p != null &&
      p.sessionId &&
      p.contentId &&
      (f.cmcd = du({}, p, { contentId: L$(n.uri) }));
    const g = new Jxn(this.HlsPlayerClass, f, e, n);
    this.playerQueue.push(g), (e.assetList[r] = n);
    const y = n.identifier,
      v = (D) => {
        if (D.live) {
          const P = new Error(`Interstitials MUST be VOD assets ${e}`),
            I = {
              fatal: !0,
              type: ro.OTHER_ERROR,
              details: Ir.INTERSTITIAL_ASSET_ITEM_ERROR,
              error: P,
            };
          return void this.handleAssetItemError(
            I,
            e,
            this.schedule.findEventIndex(e.identifier),
            r,
            P.message
          );
        }
        const $ = D.edge - D.fragmentStart,
          N = n.duration;
        (N === null || $ > N) &&
          (this.log(`Interstitial asset "${y}" duration change ${N} > ${$}`),
          (n.duration = $),
          this.updateSchedule());
      };
    g.on(Tt.LEVEL_UPDATED, (D, { details: $ }) => v($)),
      g.on(Tt.LEVEL_PTS_UPDATED, (D, { details: $ }) => v($));
    const b = (D, $) => {
      const N = this.getAssetPlayer(y);
      if (N && $.tracks) {
        N.off(Tt.BUFFER_CODECS, b), (N.tracks = $.tracks);
        const P = this.primaryMedia;
        this.bufferingAsset === N.assetItem &&
          P &&
          !N.media &&
          this.bufferAssetPlayer(N, P);
      }
    };
    g.on(Tt.BUFFER_CODECS, b);
    const w = (D) => {
      var $;
      const N = this.getAssetPlayer(y);
      if ((this.log(`buffered to end of asset ${N}`), !N)) return;
      N.off(Tt.BUFFERED_TO_END, w);
      const P = this.schedule.findEventIndex(e.identifier),
        I = e.findAssetIndex(n),
        O = I + 1,
        X = ($ = this.schedule.items) == null ? void 0 : $[P];
      if (this.isInterstitial(X))
        if (I === -1 || e.isAssetPastPlayoutLimit(O) || e.assetList[O].error) {
          var G;
          const H = (G = this.schedule.items) == null ? void 0 : G[P + 1];
          H && this.bufferedToItem(H);
        } else this.bufferedToItem(X, I + 1);
    };
    g.on(Tt.BUFFERED_TO_END, w);
    const k = (D) => () => {
      if (!this.getAssetPlayer(y)) return;
      this.shouldPlay = !0;
      const $ = this.schedule.findEventIndex(e.identifier);
      this.advanceAfterAssetEnded(e, $, D);
    };
    return (
      g.once(Tt.MEDIA_ENDED, k(r)),
      g.once(Tt.PLAYOUT_LIMIT_REACHED, k(1 / 0)),
      g.on(Tt.ERROR, (D, $) => {
        this.handleAssetItemError(
          $,
          e,
          this.schedule.findEventIndex(e.identifier),
          r,
          `Asset player error ${$.error} ${e}`
        );
      }),
      g.on(Tt.DESTROYING, () => {
        if (!this.getAssetPlayer(y)) return;
        const D = new Error(`Asset player destroyed unexpectedly ${y}`),
          $ = {
            fatal: !0,
            type: ro.OTHER_ERROR,
            details: Ir.INTERSTITIAL_ASSET_ITEM_ERROR,
            error: D,
          };
        this.handleAssetItemError(
          $,
          e,
          this.schedule.findEventIndex(e.identifier),
          r,
          D.message
        );
      }),
      this.hls.trigger(Tt.INTERSTITIAL_ASSET_PLAYER_CREATED, {
        asset: n,
        assetListIndex: r,
        event: e,
        player: g,
      }),
      g
    );
  }
  clearInterstitial(e, n) {
    e.assetList.forEach((r) => {
      this.clearAssetPlayer(r.identifier, n);
    }),
      (e.appendInPlaceStarted = !1);
  }
  clearAssetPlayer(e, n) {
    if (n === null) return;
    const r = this.getAssetPlayerQueueIndex(e);
    if (r !== -1) {
      this.log(`clearAssetPlayer "${e}" toSegment: ${n && Y_(n)}`);
      const i = this.playerQueue[r];
      this.transferMediaFromPlayer(i, n),
        this.playerQueue.splice(r, 1),
        i.destroy();
    }
  }
  emptyPlayerQueue() {
    let e;
    for (; (e = this.playerQueue.pop()); ) e.destroy();
    this.playerQueue = [];
  }
  startAssetPlayer(e, n, r, i, o) {
    const { interstitial: l, assetItem: u, assetId: c } = e,
      d = l.assetList.length,
      h = this.playingAsset;
    (this.playingAsset = u),
      (h && h.identifier === c) ||
        (h && (this.clearAssetPlayer(h.identifier, r[i]), delete h.error),
        this.log(`INTERSTITIAL_ASSET_STARTED ${n + 1}/${d} ${e}`),
        this.hls.trigger(Tt.INTERSTITIAL_ASSET_STARTED, {
          asset: u,
          assetListIndex: n,
          event: l,
          schedule: r.slice(0),
          scheduleIndex: i,
          player: e,
        })),
      e.media || this.bufferAssetPlayer(e, o);
  }
  bufferAssetPlayer(e, n) {
    var r, i;
    const { interstitial: o, assetItem: l, assetId: u } = e,
      c = this.schedule.findEventIndex(o.identifier),
      d = (r = this.schedule.items) == null ? void 0 : r[c];
    if (!d) return;
    this.setBufferingItem(d), (this.bufferingAsset = l);
    const h = this.getBufferingPlayer();
    if (h === e) return;
    const f =
      (h == null ? void 0 : h.tracks) ||
      ((i = this.detachedData) == null ? void 0 : i.tracks) ||
      this.requiredTracks;
    if (o.appendInPlace && l !== this.playingAsset) {
      if (!e.tracks) return;
      if (f && !oje(f, e.tracks)) {
        const p = new Error(
            `Asset "${u}" SourceBuffer tracks ('${Object.keys(
              e.tracks
            )}') are not compatible with primary content tracks ('${Object.keys(
              f
            )}')`
          ),
          g = {
            fatal: !0,
            type: ro.OTHER_ERROR,
            details: Ir.INTERSTITIAL_ASSET_ITEM_ERROR,
            error: p,
          },
          y = o.findAssetIndex(l);
        return void this.handleAssetItemError(g, o, c, y, p.message);
      }
    }
    this.transferMediaTo(e, n);
  }
  handleAssetItemError(e, n, r, i, o) {
    if (e.details === Ir.BUFFER_STALLED_ERROR) return;
    const l = n.assetList[i] || null;
    let u = null;
    if (l) {
      const f = this.getAssetPlayerQueueIndex(l.identifier);
      u = this.playerQueue[f] || null;
    }
    const c = this.schedule.items,
      d = du({}, e, {
        fatal: !1,
        errorAction: aL(!0),
        asset: l,
        assetListIndex: i,
        event: n,
        schedule: c,
        scheduleIndex: r,
        player: u,
      });
    if (
      (this.warn(`Asset item error: ${e.error}`),
      this.hls.trigger(Tt.INTERSTITIAL_ASSET_ERROR, d),
      !e.fatal)
    )
      return;
    const h = new Error(o);
    l &&
      (this.playingAsset !== l && this.clearAssetPlayer(l.identifier, null),
      (l.error = h)),
      n.assetList.some((f) => !f.error)
        ? n.appendInPlace && (n.error = h)
        : (n.error = h),
      this.primaryFallback(n);
  }
  primaryFallback(e) {
    const n = e.timelineStart,
      r = this.playingItem || this.waitingItem;
    if ((this.updateSchedule(), r)) {
      this.log(
        `Fallback to primary from event "${e.identifier}" start: ${n} pos: ${
          this.timelinePos
        } playing: ${r ? Y_(r) : "<none>"} error: ${e.error}`
      ),
        e.appendInPlace &&
          ((e.appendInPlace = !1),
          this.attachPrimary(n, null),
          this.flushFrontBuffer(n));
      let i = this.timelinePos;
      i === -1 && (i = this.hls.startPosition);
      const o = this.updateItem(r, i);
      if (!this.itemsMatch(r, o)) {
        const l = this.schedule.findItemIndexAtTime(i);
        this.setSchedulePosition(l);
      }
    } else this.checkStart();
  }
  onAssetListLoaded(e, n) {
    var r;
    const i = n.event,
      o = i.identifier,
      l = n.assetListResponse.ASSETS;
    if (!this.schedule.hasEvent(o)) return;
    const u = i.timelineStart;
    let c = 0;
    l.forEach((g, y) => {
      const v = parseFloat(g.DURATION);
      this.createAsset(i, y, c, u + c, v, g.URI), (c += v);
    }),
      (i.duration = c);
    const d = this.waitingItem,
      h = (d == null ? void 0 : d.event.identifier) === o;
    this.updateSchedule();
    const f = (r = this.bufferingItem) == null ? void 0 : r.event;
    if (h) {
      var p;
      const g = this.schedule.findEventIndex(o),
        y = (p = this.schedule.items) == null ? void 0 : p[g];
      y && this.setBufferingItem(y), this.setSchedulePosition(g);
    } else if ((f == null ? void 0 : f.identifier) === o && f.appendInPlace) {
      const g = i.assetList[0],
        y = this.getAssetPlayer(g.identifier),
        v = this.primaryMedia;
      g && y && v && this.bufferAssetPlayer(y, v);
    }
  }
  onError(e, n) {
    switch (n.details) {
      case Ir.ASSET_LIST_PARSING_ERROR:
      case Ir.ASSET_LIST_LOAD_ERROR:
      case Ir.ASSET_LIST_LOAD_TIMEOUT: {
        const r = n.interstitial;
        r && this.primaryFallback(r);
      }
    }
  }
}
class nLn extends Sje {
  constructor(e, n, r) {
    super(e, n, r, "subtitle-stream-controller", ko.SUBTITLE),
      (this.currentTrackId = -1),
      (this.tracksBuffered = []),
      (this.mainDetails = null),
      this.registerListeners();
  }
  onHandlerDestroying() {
    this.unregisterListeners(),
      super.onHandlerDestroying(),
      (this.mainDetails = null);
  }
  registerListeners() {
    super.registerListeners();
    const { hls: e } = this;
    e.on(Tt.LEVEL_LOADED, this.onLevelLoaded, this),
      e.on(Tt.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this),
      e.on(Tt.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
      e.on(Tt.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
      e.on(Tt.SUBTITLE_FRAG_PROCESSED, this.onSubtitleFragProcessed, this),
      e.on(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this);
  }
  unregisterListeners() {
    super.unregisterListeners();
    const { hls: e } = this;
    e.off(Tt.LEVEL_LOADED, this.onLevelLoaded, this),
      e.off(Tt.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this),
      e.off(Tt.SUBTITLE_TRACK_SWITCH, this.onSubtitleTrackSwitch, this),
      e.off(Tt.SUBTITLE_TRACK_LOADED, this.onSubtitleTrackLoaded, this),
      e.off(Tt.SUBTITLE_FRAG_PROCESSED, this.onSubtitleFragProcessed, this),
      e.off(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this);
  }
  startLoad(e) {
    this.stopLoad(),
      (this.state = ui.IDLE),
      this.setInterval(500),
      (this.nextLoadPosition = this.startPosition = this.lastCurrentTime = e),
      this.tick();
  }
  onManifestLoading() {
    super.onManifestLoading(), (this.mainDetails = null);
  }
  onMediaDetaching(e, n) {
    (this.tracksBuffered = []), super.onMediaDetaching(e, n);
  }
  onLevelLoaded(e, n) {
    this.mainDetails = n.details;
  }
  onSubtitleFragProcessed(e, n) {
    const { frag: r, success: i } = n;
    if ((Ef(r) && (this.fragPrevious = r), (this.state = ui.IDLE), !i)) return;
    const o = this.tracksBuffered[this.currentTrackId];
    if (!o) return;
    let l;
    const u = r.start;
    for (let d = 0; d < o.length; d++)
      if (u >= o[d].start && u <= o[d].end) {
        l = o[d];
        break;
      }
    const c = r.start + r.duration;
    l ? (l.end = c) : ((l = { start: u, end: c }), o.push(l)),
      this.fragmentTracker.fragBuffered(r),
      this.fragBufferedComplete(r, null),
      this.media && this.tick();
  }
  onBufferFlushing(e, n) {
    const { startOffset: r, endOffset: i } = n;
    if (r === 0 && i !== Number.POSITIVE_INFINITY) {
      const o = i - 1;
      if (o <= 0) return;
      (n.endOffsetSubtitles = Math.max(0, o)),
        this.tracksBuffered.forEach((l) => {
          for (let u = 0; u < l.length; )
            if (l[u].end <= o) l.shift();
            else {
              if (!(l[u].start < o)) break;
              (l[u].start = o), u++;
            }
        }),
        this.fragmentTracker.removeFragmentsInRange(r, o, ko.SUBTITLE);
    }
  }
  onError(e, n) {
    const r = n.frag;
    (r == null ? void 0 : r.type) === ko.SUBTITLE &&
      (n.details === Ir.FRAG_GAP && this.fragmentTracker.fragBuffered(r, !0),
      this.fragCurrent && this.fragCurrent.abortRequests(),
      this.state !== ui.STOPPED && (this.state = ui.IDLE));
  }
  onSubtitleTracksUpdated(e, { subtitleTracks: n }) {
    this.levels && Xje(this.levels, n)
      ? (this.levels = n.map((r) => new s8(r)))
      : ((this.tracksBuffered = []),
        (this.levels = n.map((r) => {
          const i = new s8(r);
          return (this.tracksBuffered[i.id] = []), i;
        })),
        this.fragmentTracker.removeFragmentsInRange(
          0,
          Number.POSITIVE_INFINITY,
          ko.SUBTITLE
        ),
        (this.fragPrevious = null),
        (this.mediaBuffer = null));
  }
  onSubtitleTrackSwitch(e, n) {
    var r;
    if (
      ((this.currentTrackId = n.id),
      (r = this.levels) == null || !r.length || this.currentTrackId === -1)
    )
      return void this.clearInterval();
    const i = this.levels[this.currentTrackId];
    i != null && i.details
      ? (this.mediaBuffer = this.mediaBufferTimeRanges)
      : (this.mediaBuffer = null),
      i && this.state !== ui.STOPPED && this.setInterval(500);
  }
  onSubtitleTrackLoaded(e, n) {
    var r;
    const { currentTrackId: i, levels: o } = this,
      { details: l, id: u } = n;
    if (!o)
      return void this.warn(
        `Subtitle tracks were reset while loading level ${u}`
      );
    const c = o[u];
    if (u >= o.length || !c) return;
    this.log(
      `Subtitle track ${u} loaded [${l.startSN},${l.endSN}]${
        l.lastPartSn ? `[part-${l.lastPartSn}-${l.lastPartIndex}]` : ""
      },duration:${l.totalduration}`
    ),
      (this.mediaBuffer = this.mediaBufferTimeRanges);
    let d = 0;
    if (l.live || ((r = c.details) != null && r.live)) {
      const f = this.mainDetails;
      if (l.deltaUpdateFailed || !f) return;
      const p = f.fragments[0];
      var h;
      c.details
        ? ((d = this.alignPlaylists(
            l,
            c.details,
            (h = this.levelLastLoaded) == null ? void 0 : h.details
          )),
          d === 0 && p && ((d = p.start), Xne(l, d)))
        : l.hasProgramDateTime && f.hasProgramDateTime
        ? (f8(l, f), (d = l.fragmentStart))
        : p && ((d = p.start), Xne(l, d));
    }
    (c.details = l),
      (this.levelLastLoaded = c),
      u === i &&
        (this.hls.trigger(Tt.SUBTITLE_TRACK_UPDATED, {
          details: l,
          id: u,
          groupId: n.groupId,
        }),
        this.tick(),
        l.live && !this.fragCurrent && this.media && this.state === ui.IDLE) &&
        (eD(null, l.fragments, this.media.currentTime, 0) ||
          (this.warn("Subtitle playlist not aligned with playback"),
          (c.details = void 0)));
  }
  _handleFragmentLoadComplete(e) {
    const { frag: n, payload: r } = e,
      i = n.decryptdata,
      o = this.hls;
    if (
      !this.fragContextChanged(n) &&
      r &&
      r.byteLength > 0 &&
      i != null &&
      i.key &&
      i.iv &&
      uI(i.method)
    ) {
      const l = performance.now();
      this.decrypter
        .decrypt(new Uint8Array(r), i.key.buffer, i.iv.buffer, Lue(i.method))
        .catch((u) => {
          throw (
            (o.trigger(Tt.ERROR, {
              type: ro.MEDIA_ERROR,
              details: Ir.FRAG_DECRYPT_ERROR,
              fatal: !1,
              error: u,
              reason: u.message,
              frag: n,
            }),
            u)
          );
        })
        .then((u) => {
          const c = performance.now();
          o.trigger(Tt.FRAG_DECRYPTED, {
            frag: n,
            payload: u,
            stats: { tstart: l, tdecrypt: c },
          });
        })
        .catch((u) => {
          this.warn(`${u.name}: ${u.message}`), (this.state = ui.IDLE);
        });
    }
  }
  doTick() {
    if (this.media) {
      if (this.state === ui.IDLE) {
        const { currentTrackId: e, levels: n } = this,
          r = n == null ? void 0 : n[e];
        if (!r || !n.length || !r.details || this.waitForLive(r)) return;
        const { config: i } = this,
          o = this.getLoadPosition(),
          l = Ul.bufferedInfo(
            this.tracksBuffered[this.currentTrackId] || [],
            o,
            i.maxBufferHole
          ),
          { end: u, len: c } = l,
          d = r.details;
        if (c > this.hls.maxBufferLength + d.levelTargetDuration) return;
        const h = d.fragments,
          f = h.length,
          p = d.edge;
        let g = null;
        const y = this.fragPrevious;
        if (u < p) {
          const v = i.maxFragLookUpTolerance,
            b = u > p - v ? 0 : v;
          (g = eD(y, h, Math.max(h[0].start, u), b)),
            !g && y && y.start < h[0].start && (g = h[0]);
        } else g = h[f - 1];
        if (!g) return;
        if (((g = this.mapToInitFragWhenRequired(g)), Ef(g))) {
          const v = h[g.sn - d.startSN - 1];
          v &&
            v.cc === g.cc &&
            this.fragmentTracker.getState(v) === d0.NOT_LOADED &&
            (g = v);
        }
        this.fragmentTracker.getState(g) === d0.NOT_LOADED &&
          this.loadFragment(g, r, u);
      }
    } else this.state = ui.IDLE;
  }
  loadFragment(e, n, r) {
    Ef(e) ? super.loadFragment(e, n, r) : this._loadInitSegment(e, n);
  }
  get mediaBufferTimeRanges() {
    return new rLn(this.tracksBuffered[this.currentTrackId] || []);
  }
}
class rLn {
  constructor(e) {
    this.buffered = void 0;
    const n = (r, i, o) => {
      if ((i >>>= 0) > o - 1)
        throw new DOMException(
          `Failed to execute '${r}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${o})`
        );
      return e[i][r];
    };
    this.buffered = {
      get length() {
        return e.length;
      },
      end: (r) => n("end", r, e.length),
      start: (r) => n("start", r, e.length),
    };
  }
}
const iLn = {
    42: 225,
    92: 233,
    94: 237,
    95: 243,
    96: 250,
    123: 231,
    124: 247,
    125: 209,
    126: 241,
    127: 9608,
    128: 174,
    129: 176,
    130: 189,
    131: 191,
    132: 8482,
    133: 162,
    134: 163,
    135: 9834,
    136: 224,
    137: 32,
    138: 232,
    139: 226,
    140: 234,
    141: 238,
    142: 244,
    143: 251,
    144: 193,
    145: 201,
    146: 211,
    147: 218,
    148: 220,
    149: 252,
    150: 8216,
    151: 161,
    152: 42,
    153: 8217,
    154: 9473,
    155: 169,
    156: 8480,
    157: 8226,
    158: 8220,
    159: 8221,
    160: 192,
    161: 194,
    162: 199,
    163: 200,
    164: 202,
    165: 203,
    166: 235,
    167: 206,
    168: 207,
    169: 239,
    170: 212,
    171: 217,
    172: 249,
    173: 219,
    174: 171,
    175: 187,
    176: 195,
    177: 227,
    178: 205,
    179: 204,
    180: 236,
    181: 210,
    182: 242,
    183: 213,
    184: 245,
    185: 123,
    186: 125,
    187: 92,
    188: 94,
    189: 95,
    190: 124,
    191: 8764,
    192: 196,
    193: 228,
    194: 214,
    195: 246,
    196: 223,
    197: 165,
    198: 164,
    199: 9475,
    200: 197,
    201: 229,
    202: 216,
    203: 248,
    204: 9487,
    205: 9491,
    206: 9495,
    207: 9499,
  },
  Jje = (t) => String.fromCharCode(iLn[t] || t),
  aLn = { 17: 1, 18: 3, 21: 5, 22: 7, 23: 9, 16: 11, 19: 12, 20: 14 },
  oLn = { 17: 2, 18: 4, 21: 6, 22: 8, 23: 10, 19: 13, 20: 15 },
  sLn = { 25: 1, 26: 3, 29: 5, 30: 7, 31: 9, 24: 11, 27: 12, 28: 14 },
  lLn = { 25: 2, 26: 4, 29: 6, 30: 8, 31: 10, 27: 13, 28: 15 },
  uLn = [
    "white",
    "green",
    "blue",
    "cyan",
    "red",
    "yellow",
    "magenta",
    "black",
    "transparent",
  ];
class cLn {
  constructor() {
    (this.time = null), (this.verboseLevel = 0);
  }
  log(e, n) {
    if (this.verboseLevel >= e) {
      const r = typeof n == "function" ? n() : n;
      Ds.log(`${this.time} [${e}] ${r}`);
    }
  }
}
const x2 = function (t) {
  const e = [];
  for (let n = 0; n < t.length; n++) e.push(t[n].toString(16));
  return e;
};
class qje {
  constructor() {
    (this.foreground = "white"),
      (this.underline = !1),
      (this.italics = !1),
      (this.background = "black"),
      (this.flash = !1);
  }
  reset() {
    (this.foreground = "white"),
      (this.underline = !1),
      (this.italics = !1),
      (this.background = "black"),
      (this.flash = !1);
  }
  setStyles(e) {
    const n = ["foreground", "underline", "italics", "background", "flash"];
    for (let r = 0; r < n.length; r++) {
      const i = n[r];
      e.hasOwnProperty(i) && (this[i] = e[i]);
    }
  }
  isDefault() {
    return (
      this.foreground === "white" &&
      !this.underline &&
      !this.italics &&
      this.background === "black" &&
      !this.flash
    );
  }
  equals(e) {
    return (
      this.foreground === e.foreground &&
      this.underline === e.underline &&
      this.italics === e.italics &&
      this.background === e.background &&
      this.flash === e.flash
    );
  }
  copy(e) {
    (this.foreground = e.foreground),
      (this.underline = e.underline),
      (this.italics = e.italics),
      (this.background = e.background),
      (this.flash = e.flash);
  }
  toString() {
    return (
      "color=" +
      this.foreground +
      ", underline=" +
      this.underline +
      ", italics=" +
      this.italics +
      ", background=" +
      this.background +
      ", flash=" +
      this.flash
    );
  }
}
class dLn {
  constructor() {
    (this.uchar = " "), (this.penState = new qje());
  }
  reset() {
    (this.uchar = " "), this.penState.reset();
  }
  setChar(e, n) {
    (this.uchar = e), this.penState.copy(n);
  }
  setPenState(e) {
    this.penState.copy(e);
  }
  equals(e) {
    return this.uchar === e.uchar && this.penState.equals(e.penState);
  }
  copy(e) {
    (this.uchar = e.uchar), this.penState.copy(e.penState);
  }
  isEmpty() {
    return this.uchar === " " && this.penState.isDefault();
  }
}
class hLn {
  constructor(e) {
    (this.chars = []),
      (this.pos = 0),
      (this.currPenState = new qje()),
      (this.cueStartTime = null),
      (this.logger = void 0);
    for (let n = 0; n < 100; n++) this.chars.push(new dLn());
    this.logger = e;
  }
  equals(e) {
    for (let n = 0; n < 100; n++)
      if (!this.chars[n].equals(e.chars[n])) return !1;
    return !0;
  }
  copy(e) {
    for (let n = 0; n < 100; n++) this.chars[n].copy(e.chars[n]);
  }
  isEmpty() {
    let e = !0;
    for (let n = 0; n < 100; n++)
      if (!this.chars[n].isEmpty()) {
        e = !1;
        break;
      }
    return e;
  }
  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 > 100 &&
          (this.logger.log(3, "Too large cursor position " + this.pos),
          (this.pos = 100));
  }
  moveCursor(e) {
    const n = this.pos + e;
    if (e > 1)
      for (let r = this.pos + 1; r < n + 1; r++)
        this.chars[r].setPenState(this.currPenState);
    this.setCursor(n);
  }
  backSpace() {
    this.moveCursor(-1), this.chars[this.pos].setChar(" ", this.currPenState);
  }
  insertChar(e) {
    e >= 144 && this.backSpace();
    const n = Jje(e);
    this.pos >= 100
      ? this.logger.log(
          0,
          () =>
            "Cannot insert " +
            e.toString(16) +
            " (" +
            n +
            ") at position " +
            this.pos +
            ". Skipping it!"
        )
      : (this.chars[this.pos].setChar(n, this.currPenState),
        this.moveCursor(1));
  }
  clearFromPos(e) {
    let n;
    for (n = e; n < 100; n++) this.chars[n].reset();
  }
  clear() {
    this.clearFromPos(0), (this.pos = 0), this.currPenState.reset();
  }
  clearToEndOfRow() {
    this.clearFromPos(this.pos);
  }
  getTextString() {
    const e = [];
    let n = !0;
    for (let r = 0; r < 100; r++) {
      const i = this.chars[r].uchar;
      i !== " " && (n = !1), e.push(i);
    }
    return n ? "" : e.join("");
  }
  setPenStyles(e) {
    this.currPenState.setStyles(e),
      this.chars[this.pos].setPenState(this.currPenState);
  }
}
class lK {
  constructor(e) {
    (this.rows = []),
      (this.currRow = 14),
      (this.nrRollUpRows = null),
      (this.lastOutputScreen = null),
      (this.logger = void 0);
    for (let n = 0; n < 15; n++) this.rows.push(new hLn(e));
    this.logger = e;
  }
  reset() {
    for (let e = 0; e < 15; e++) this.rows[e].clear();
    this.currRow = 14;
  }
  equals(e) {
    let n = !0;
    for (let r = 0; r < 15; r++)
      if (!this.rows[r].equals(e.rows[r])) {
        n = !1;
        break;
      }
    return n;
  }
  copy(e) {
    for (let n = 0; n < 15; n++) this.rows[n].copy(e.rows[n]);
  }
  isEmpty() {
    let e = !0;
    for (let n = 0; n < 15; n++)
      if (!this.rows[n].isEmpty()) {
        e = !1;
        break;
      }
    return e;
  }
  backSpace() {
    this.rows[this.currRow].backSpace();
  }
  clearToEndOfRow() {
    this.rows[this.currRow].clearToEndOfRow();
  }
  insertChar(e) {
    this.rows[this.currRow].insertChar(e);
  }
  setPen(e) {
    this.rows[this.currRow].setPenStyles(e);
  }
  moveCursor(e) {
    this.rows[this.currRow].moveCursor(e);
  }
  setCursor(e) {
    this.logger.log(2, "setCursor: " + e), this.rows[this.currRow].setCursor(e);
  }
  setPAC(e) {
    this.logger.log(2, () => "pacData = " + JSON.stringify(e));
    let n = e.row - 1;
    if (
      (this.nrRollUpRows &&
        n < this.nrRollUpRows - 1 &&
        (n = this.nrRollUpRows - 1),
      this.nrRollUpRows && this.currRow !== n)
    ) {
      for (let u = 0; u < 15; u++) this.rows[u].clear();
      const o = this.currRow + 1 - this.nrRollUpRows,
        l = this.lastOutputScreen;
      if (l) {
        const u = l.rows[o].cueStartTime,
          c = this.logger.time;
        if (u !== null && c !== null && u < c)
          for (let d = 0; d < this.nrRollUpRows; d++)
            this.rows[n - this.nrRollUpRows + d + 1].copy(l.rows[o + d]);
      }
    }
    this.currRow = n;
    const r = this.rows[this.currRow];
    if (e.indent !== null) {
      const o = e.indent,
        l = Math.max(o - 1, 0);
      r.setCursor(e.indent), (e.color = r.chars[l].penState.foreground);
    }
    const i = {
      foreground: e.color,
      underline: e.underline,
      italics: e.italics,
      background: "black",
      flash: !1,
    };
    this.setPen(i);
  }
  setBkgData(e) {
    this.logger.log(2, () => "bkgData = " + JSON.stringify(e)),
      this.backSpace(),
      this.setPen(e),
      this.insertChar(32);
  }
  setRollUpRows(e) {
    this.nrRollUpRows = e;
  }
  rollUp() {
    if (this.nrRollUpRows === null)
      return void this.logger.log(3, "roll_up but nrRollUpRows not set yet");
    this.logger.log(1, () => this.getDisplayText());
    const e = this.currRow + 1 - this.nrRollUpRows,
      n = this.rows.splice(e, 1)[0];
    n.clear(),
      this.rows.splice(this.currRow, 0, n),
      this.logger.log(2, "Rolling up");
  }
  getDisplayText(e) {
    e = e || !1;
    const n = [];
    let r = "",
      i = -1;
    for (let o = 0; o < 15; o++) {
      const l = this.rows[o].getTextString();
      l &&
        ((i = o + 1),
        e ? n.push("Row " + i + ": '" + l + "'") : n.push(l.trim()));
    }
    return (
      n.length > 0 &&
        (r = e
          ? "[" + n.join(" | ") + "]"
          : n.join(`
`)),
      r
    );
  }
  getTextAndFormat() {
    return this.rows;
  }
}
class lAe {
  constructor(e, n, r) {
    (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 = n),
      (this.mode = null),
      (this.verbose = 0),
      (this.displayedMemory = new lK(r)),
      (this.nonDisplayedMemory = new lK(r)),
      (this.lastOutputScreen = new lK(r)),
      (this.currRollUpRow = this.displayedMemory.rows[14]),
      (this.writeScreen = this.displayedMemory),
      (this.mode = null),
      (this.cueStartTime = null),
      (this.logger = r);
  }
  reset() {
    (this.mode = null),
      this.displayedMemory.reset(),
      this.nonDisplayedMemory.reset(),
      this.lastOutputScreen.reset(),
      this.outputFilter.reset(),
      (this.currRollUpRow = this.displayedMemory.rows[14]),
      (this.writeScreen = this.displayedMemory),
      (this.mode = null),
      (this.cueStartTime = null);
  }
  getHandler() {
    return this.outputFilter;
  }
  setHandler(e) {
    this.outputFilter = e;
  }
  setPAC(e) {
    this.writeScreen.setPAC(e);
  }
  setBkgData(e) {
    this.writeScreen.setBkgData(e);
  }
  setMode(e) {
    e !== this.mode &&
      ((this.mode = e),
      this.logger.log(2, () => "MODE=" + e),
      this.mode === "MODE_POP-ON"
        ? (this.writeScreen = this.nonDisplayedMemory)
        : ((this.writeScreen = this.displayedMemory), this.writeScreen.reset()),
      this.mode !== "MODE_ROLL-UP" &&
        ((this.displayedMemory.nrRollUpRows = null),
        (this.nonDisplayedMemory.nrRollUpRows = null)),
      (this.mode = e));
  }
  insertChars(e) {
    for (let r = 0; r < e.length; r++) this.writeScreen.insertChar(e[r]);
    const n = this.writeScreen === this.displayedMemory ? "DISP" : "NON_DISP";
    this.logger.log(2, () => n + ": " + this.writeScreen.getDisplayText(!0)),
      (this.mode !== "MODE_PAINT-ON" && this.mode !== "MODE_ROLL-UP") ||
        (this.logger.log(
          1,
          () => "DISPLAYED: " + this.displayedMemory.getDisplayText(!0)
        ),
        this.outputDataUpdate());
  }
  ccRCL() {
    this.logger.log(2, "RCL - Resume Caption Loading"),
      this.setMode("MODE_POP-ON");
  }
  ccBS() {
    this.logger.log(2, "BS - BackSpace"),
      this.mode !== "MODE_TEXT" &&
        (this.writeScreen.backSpace(),
        this.writeScreen === this.displayedMemory && this.outputDataUpdate());
  }
  ccAOF() {}
  ccAON() {}
  ccDER() {
    this.logger.log(2, "DER- Delete to End of Row"),
      this.writeScreen.clearToEndOfRow(),
      this.outputDataUpdate();
  }
  ccRU(e) {
    this.logger.log(2, "RU(" + e + ") - Roll Up"),
      (this.writeScreen = this.displayedMemory),
      this.setMode("MODE_ROLL-UP"),
      this.writeScreen.setRollUpRows(e);
  }
  ccFON() {
    this.logger.log(2, "FON - Flash On"),
      this.writeScreen.setPen({ flash: !0 });
  }
  ccRDC() {
    this.logger.log(2, "RDC - Resume Direct Captioning"),
      this.setMode("MODE_PAINT-ON");
  }
  ccTR() {
    this.logger.log(2, "TR"), this.setMode("MODE_TEXT");
  }
  ccRTD() {
    this.logger.log(2, "RTD"), this.setMode("MODE_TEXT");
  }
  ccEDM() {
    this.logger.log(2, "EDM - Erase Displayed Memory"),
      this.displayedMemory.reset(),
      this.outputDataUpdate(!0);
  }
  ccCR() {
    this.logger.log(2, "CR - Carriage Return"),
      this.writeScreen.rollUp(),
      this.outputDataUpdate(!0);
  }
  ccENM() {
    this.logger.log(2, "ENM - Erase Non-displayed Memory"),
      this.nonDisplayedMemory.reset();
  }
  ccEOC() {
    if (
      (this.logger.log(2, "EOC - End Of Caption"), this.mode === "MODE_POP-ON")
    ) {
      const e = this.displayedMemory;
      (this.displayedMemory = this.nonDisplayedMemory),
        (this.nonDisplayedMemory = e),
        (this.writeScreen = this.nonDisplayedMemory),
        this.logger.log(
          1,
          () => "DISP: " + this.displayedMemory.getDisplayText()
        );
    }
    this.outputDataUpdate(!0);
  }
  ccTO(e) {
    this.logger.log(2, "TO(" + e + ") - Tab Offset"),
      this.writeScreen.moveCursor(e);
  }
  ccMIDROW(e) {
    const n = { flash: !1 };
    if (((n.underline = e % 2 == 1), (n.italics = e >= 46), n.italics))
      n.foreground = "white";
    else {
      const r = Math.floor(e / 2) - 16,
        i = ["white", "green", "blue", "cyan", "red", "yellow", "magenta"];
      n.foreground = i[r];
    }
    this.logger.log(2, "MIDROW: " + JSON.stringify(n)),
      this.writeScreen.setPen(n);
  }
  outputDataUpdate(e = !1) {
    const n = this.logger.time;
    n !== null &&
      this.outputFilter &&
      (this.cueStartTime !== null || this.displayedMemory.isEmpty()
        ? this.displayedMemory.equals(this.lastOutputScreen) ||
          (this.outputFilter.newCue(
            this.cueStartTime,
            n,
            this.lastOutputScreen
          ),
          e && this.outputFilter.dispatchCue && this.outputFilter.dispatchCue(),
          (this.cueStartTime = this.displayedMemory.isEmpty() ? null : n))
        : (this.cueStartTime = n),
      this.lastOutputScreen.copy(this.displayedMemory));
  }
  cueSplitAtTime(e) {
    this.outputFilter &&
      (this.displayedMemory.isEmpty() ||
        (this.outputFilter.newCue &&
          this.outputFilter.newCue(this.cueStartTime, e, this.displayedMemory),
        (this.cueStartTime = e)));
  }
}
class uAe {
  constructor(e, n, r) {
    (this.channels = void 0),
      (this.currentChannel = 0),
      (this.cmdHistory = pLn()),
      (this.logger = void 0);
    const i = (this.logger = new cLn());
    this.channels = [null, new lAe(e, n, i), new lAe(e + 1, r, i)];
  }
  getHandler(e) {
    return this.channels[e].getHandler();
  }
  setHandler(e, n) {
    this.channels[e].setHandler(n);
  }
  addData(e, n) {
    this.logger.time = e;
    for (let r = 0; r < n.length; r += 2) {
      const i = 127 & n[r],
        o = 127 & n[r + 1];
      let l = !1,
        u = null;
      if (i === 0 && o === 0) continue;
      this.logger.log(
        3,
        () => "[" + x2([n[r], n[r + 1]]) + "] -> (" + x2([i, o]) + ")"
      );
      const c = this.cmdHistory;
      if (i >= 16 && i <= 31) {
        if (fLn(i, o, c)) {
          y4(null, null, c),
            this.logger.log(
              3,
              () => "Repeated command (" + x2([i, o]) + ") is dropped"
            );
          continue;
        }
        y4(i, o, this.cmdHistory),
          (l = this.parseCmd(i, o)),
          l || (l = this.parseMidrow(i, o)),
          l || (l = this.parsePAC(i, o)),
          l || (l = this.parseBackgroundAttributes(i, o));
      } else y4(null, null, c);
      if (!l && ((u = this.parseChars(i, o)), u)) {
        const d = this.currentChannel;
        d && d > 0
          ? this.channels[d].insertChars(u)
          : this.logger.log(2, "No channel found yet. TEXT-MODE?");
      }
      l ||
        u ||
        this.logger.log(
          2,
          () =>
            "Couldn't parse cleaned data " +
            x2([i, o]) +
            " orig: " +
            x2([n[r], n[r + 1]])
        );
    }
  }
  parseCmd(e, n) {
    if (
      !((e === 20 || e === 28 || e === 21 || e === 29) && n >= 32 && n <= 47) &&
      !((e === 23 || e === 31) && n >= 33 && n <= 35)
    )
      return !1;
    const r = e === 20 || e === 21 || e === 23 ? 1 : 2,
      i = this.channels[r];
    return (
      e === 20 || e === 21 || e === 28 || e === 29
        ? n === 32
          ? i.ccRCL()
          : n === 33
          ? i.ccBS()
          : n === 34
          ? i.ccAOF()
          : n === 35
          ? i.ccAON()
          : n === 36
          ? i.ccDER()
          : n === 37
          ? i.ccRU(2)
          : n === 38
          ? i.ccRU(3)
          : n === 39
          ? i.ccRU(4)
          : n === 40
          ? i.ccFON()
          : n === 41
          ? i.ccRDC()
          : n === 42
          ? i.ccTR()
          : n === 43
          ? i.ccRTD()
          : n === 44
          ? i.ccEDM()
          : n === 45
          ? i.ccCR()
          : n === 46
          ? i.ccENM()
          : n === 47 && i.ccEOC()
        : i.ccTO(n - 32),
      (this.currentChannel = r),
      !0
    );
  }
  parseMidrow(e, n) {
    let r = 0;
    if ((e === 17 || e === 25) && n >= 32 && n <= 47) {
      if (((r = e === 17 ? 1 : 2), r !== this.currentChannel))
        return this.logger.log(0, "Mismatch channel in midrow parsing"), !1;
      const i = this.channels[r];
      return (
        !!i &&
        (i.ccMIDROW(n),
        this.logger.log(3, () => "MIDROW (" + x2([e, n]) + ")"),
        !0)
      );
    }
    return !1;
  }
  parsePAC(e, n) {
    let r;
    if (
      !(
        ((e >= 17 && e <= 23) || (e >= 25 && e <= 31)) &&
        n >= 64 &&
        n <= 127
      ) &&
      !((e === 16 || e === 24) && n >= 64 && n <= 95)
    )
      return !1;
    const i = e <= 23 ? 1 : 2;
    r =
      n >= 64 && n <= 95
        ? i === 1
          ? aLn[e]
          : sLn[e]
        : i === 1
        ? oLn[e]
        : lLn[e];
    const o = this.channels[i];
    return (
      !!o && (o.setPAC(this.interpretPAC(r, n)), (this.currentChannel = i), !0)
    );
  }
  interpretPAC(e, n) {
    let r;
    const i = { color: null, italics: !1, indent: null, underline: !1, row: e };
    return (
      (r = n > 95 ? n - 96 : n - 64),
      (i.underline = (1 & r) == 1),
      r <= 13
        ? (i.color = [
            "white",
            "green",
            "blue",
            "cyan",
            "red",
            "yellow",
            "magenta",
            "white",
          ][Math.floor(r / 2)])
        : r <= 15
        ? ((i.italics = !0), (i.color = "white"))
        : (i.indent = 4 * Math.floor((r - 16) / 2)),
      i
    );
  }
  parseChars(e, n) {
    let r,
      i = null,
      o = null;
    if (
      (e >= 25 ? ((r = 2), (o = e - 8)) : ((r = 1), (o = e)),
      o >= 17 && o <= 19)
    ) {
      let l;
      (l = o === 17 ? n + 80 : o === 18 ? n + 112 : n + 144),
        this.logger.log(
          2,
          () => "Special char '" + Jje(l) + "' in channel " + r
        ),
        (i = [l]);
    } else e >= 32 && e <= 127 && (i = n === 0 ? [e] : [e, n]);
    return i && this.logger.log(3, () => "Char codes =  " + x2(i).join(",")), i;
  }
  parseBackgroundAttributes(e, n) {
    if (
      !((e === 16 || e === 24) && n >= 32 && n <= 47) &&
      !((e === 23 || e === 31) && n >= 45 && n <= 47)
    )
      return !1;
    let r;
    const i = {};
    e === 16 || e === 24
      ? ((r = Math.floor((n - 32) / 2)),
        (i.background = uLn[r]),
        n % 2 == 1 && (i.background = i.background + "_semi"))
      : n === 45
      ? (i.background = "transparent")
      : ((i.foreground = "black"), n === 47 && (i.underline = !0));
    const o = e <= 23 ? 1 : 2;
    return this.channels[o].setBkgData(i), !0;
  }
  reset() {
    for (let e = 0; e < Object.keys(this.channels).length; e++) {
      const n = this.channels[e];
      n && n.reset();
    }
    y4(null, null, this.cmdHistory);
  }
  cueSplitAtTime(e) {
    for (let n = 0; n < this.channels.length; n++) {
      const r = this.channels[n];
      r && r.cueSplitAtTime(e);
    }
  }
}
function y4(t, e, n) {
  (n.a = t), (n.b = e);
}
function fLn(t, e, n) {
  return n.a === t && n.b === e;
}
function pLn() {
  return { a: null, b: null };
}
var zue = (function () {
  if (d8 != null && d8.VTTCue) return self.VTTCue;
  const t = ["", "lr", "rl"],
    e = ["start", "middle", "end", "left", "right"];
  function n(l, u) {
    if (typeof u != "string" || !Array.isArray(l)) return !1;
    const c = u.toLowerCase();
    return !!~l.indexOf(c) && c;
  }
  function r(l) {
    return n(e, l);
  }
  function i(l, ...u) {
    let c = 1;
    for (; c < arguments.length; c++) {
      const d = arguments[c];
      for (const h in d) l[h] = d[h];
    }
    return l;
  }
  function o(l, u, c) {
    const d = this,
      h = { enumerable: !0 };
    d.hasBeenReset = !1;
    let f = "",
      p = !1,
      g = l,
      y = u,
      v = c,
      b = null,
      w = "",
      k = !0,
      D = "auto",
      $ = "start",
      N = 50,
      P = "middle",
      I = 50,
      O = "middle";
    Object.defineProperty(
      d,
      "id",
      i({}, h, {
        get: function () {
          return f;
        },
        set: function (X) {
          f = "" + X;
        },
      })
    ),
      Object.defineProperty(
        d,
        "pauseOnExit",
        i({}, h, {
          get: function () {
            return p;
          },
          set: function (X) {
            p = !!X;
          },
        })
      ),
      Object.defineProperty(
        d,
        "startTime",
        i({}, h, {
          get: function () {
            return g;
          },
          set: function (X) {
            if (typeof X != "number")
              throw new TypeError("Start time must be set to a number.");
            (g = X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "endTime",
        i({}, h, {
          get: function () {
            return y;
          },
          set: function (X) {
            if (typeof X != "number")
              throw new TypeError("End time must be set to a number.");
            (y = X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "text",
        i({}, h, {
          get: function () {
            return v;
          },
          set: function (X) {
            (v = "" + X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "region",
        i({}, h, {
          get: function () {
            return b;
          },
          set: function (X) {
            (b = X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "vertical",
        i({}, h, {
          get: function () {
            return w;
          },
          set: function (X) {
            const G = (function (H) {
              return n(t, H);
            })(X);
            if (G === !1)
              throw new SyntaxError(
                "An invalid or illegal string was specified."
              );
            (w = G), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "snapToLines",
        i({}, h, {
          get: function () {
            return k;
          },
          set: function (X) {
            (k = !!X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "line",
        i({}, h, {
          get: function () {
            return D;
          },
          set: function (X) {
            if (typeof X != "number" && X !== "auto")
              throw new SyntaxError(
                "An invalid number or illegal string was specified."
              );
            (D = X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "lineAlign",
        i({}, h, {
          get: function () {
            return $;
          },
          set: function (X) {
            const G = r(X);
            if (!G)
              throw new SyntaxError(
                "An invalid or illegal string was specified."
              );
            ($ = G), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "position",
        i({}, h, {
          get: function () {
            return N;
          },
          set: function (X) {
            if (X < 0 || X > 100)
              throw new Error("Position must be between 0 and 100.");
            (N = X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "positionAlign",
        i({}, h, {
          get: function () {
            return P;
          },
          set: function (X) {
            const G = r(X);
            if (!G)
              throw new SyntaxError(
                "An invalid or illegal string was specified."
              );
            (P = G), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "size",
        i({}, h, {
          get: function () {
            return I;
          },
          set: function (X) {
            if (X < 0 || X > 100)
              throw new Error("Size must be between 0 and 100.");
            (I = X), (this.hasBeenReset = !0);
          },
        })
      ),
      Object.defineProperty(
        d,
        "align",
        i({}, h, {
          get: function () {
            return O;
          },
          set: function (X) {
            const G = r(X);
            if (!G)
              throw new SyntaxError(
                "An invalid or illegal string was specified."
              );
            (O = G), (this.hasBeenReset = !0);
          },
        })
      ),
      (d.displayState = void 0);
  }
  return (
    (o.prototype.getCueAsHTML = function () {
      return self.WebVTT.convertCueToDOMTree(self, this.text);
    }),
    o
  );
})();
class gLn {
  decode(e, n) {
    if (!e) return "";
    if (typeof e != "string") throw new Error("Error - expected string data.");
    return decodeURIComponent(encodeURIComponent(e));
  }
}
function eWe(t) {
  function e(r, i, o, l) {
    return 3600 * (0 | r) + 60 * (0 | i) + (0 | o) + parseFloat(l || 0);
  }
  const n = t.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);
  return n
    ? parseFloat(n[2]) > 59
      ? e(n[2], n[3], 0, n[4])
      : e(n[1], n[2], n[3], n[4])
    : null;
}
class mLn {
  constructor() {
    this.values = Object.create(null);
  }
  set(e, n) {
    this.get(e) || n === "" || (this.values[e] = n);
  }
  get(e, n, r) {
    return r
      ? this.has(e)
        ? this.values[e]
        : n[r]
      : this.has(e)
      ? this.values[e]
      : n;
  }
  has(e) {
    return e in this.values;
  }
  alt(e, n, r) {
    for (let i = 0; i < r.length; ++i)
      if (n === r[i]) {
        this.set(e, n);
        break;
      }
  }
  integer(e, n) {
    /^-?\d+$/.test(n) && this.set(e, parseInt(n, 10));
  }
  percent(e, n) {
    if (/^([\d]{1,3})(\.[\d]*)?%$/.test(n)) {
      const r = parseFloat(n);
      if (r >= 0 && r <= 100) return this.set(e, r), !0;
    }
    return !1;
  }
}
function tWe(t, e, n, r) {
  const i = r ? t.split(r) : [t];
  for (const o in i) {
    if (typeof i[o] != "string") continue;
    const l = i[o].split(n);
    l.length === 2 && e(l[0], l[1]);
  }
}
const Yne = new zue(0, 0, ""),
  v4 = Yne.align === "middle" ? "middle" : "center";
function yLn(t, e, n) {
  const r = t;
  function i() {
    const l = eWe(t);
    if (l === null) throw new Error("Malformed timestamp: " + r);
    return (t = t.replace(/^[^\sa-zA-Z-]+/, "")), l;
  }
  function o() {
    t = t.replace(/^\s+/, "");
  }
  if ((o(), (e.startTime = i()), o(), t.slice(0, 3) !== "-->"))
    throw new Error(
      "Malformed time stamp (time stamps must be separated by '-->'): " + r
    );
  (t = t.slice(3)),
    o(),
    (e.endTime = i()),
    o(),
    (function (l, u) {
      const c = new mLn();
      tWe(
        l,
        function (f, p) {
          let g;
          switch (f) {
            case "region":
              for (let y = n.length - 1; y >= 0; y--)
                if (n[y].id === p) {
                  c.set(f, n[y].region);
                  break;
                }
              break;
            case "vertical":
              c.alt(f, p, ["rl", "lr"]);
              break;
            case "line":
              (g = p.split(",")),
                c.integer(f, g[0]),
                c.percent(f, g[0]) && c.set("snapToLines", !1),
                c.alt(f, g[0], ["auto"]),
                g.length === 2 &&
                  c.alt("lineAlign", g[1], ["start", v4, "end"]);
              break;
            case "position":
              (g = p.split(",")),
                c.percent(f, g[0]),
                g.length === 2 &&
                  c.alt("positionAlign", g[1], [
                    "start",
                    v4,
                    "end",
                    "line-left",
                    "line-right",
                    "auto",
                  ]);
              break;
            case "size":
              c.percent(f, p);
              break;
            case "align":
              c.alt(f, p, ["start", v4, "end", "left", "right"]);
          }
        },
        /:/,
        /\s/
      ),
        (u.region = c.get("region", null)),
        (u.vertical = c.get("vertical", ""));
      let d = c.get("line", "auto");
      d === "auto" && Yne.line === -1 && (d = -1),
        (u.line = d),
        (u.lineAlign = c.get("lineAlign", "start")),
        (u.snapToLines = c.get("snapToLines", !0)),
        (u.size = c.get("size", 100)),
        (u.align = c.get("align", v4));
      let h = c.get("position", "auto");
      h === "auto" &&
        Yne.position === 50 &&
        (h =
          u.align === "start" || u.align === "left"
            ? 0
            : u.align === "end" || u.align === "right"
            ? 100
            : 50),
        (u.position = h);
    })(t, e);
}
function nWe(t) {
  return t.replace(
    /<br(?: \/)?>/gi,
    `
`
  );
}
class vLn {
  constructor() {
    (this.state = "INITIAL"),
      (this.buffer = ""),
      (this.decoder = new gLn()),
      (this.regionList = []),
      (this.cue = null),
      (this.oncue = void 0),
      (this.onparsingerror = void 0),
      (this.onflush = void 0);
  }
  parse(e) {
    const n = this;
    function r() {
      let i = n.buffer,
        o = 0;
      for (
        i = nWe(i);
        o < i.length &&
        i[o] !== "\r" &&
        i[o] !==
          `
`;

      )
        ++o;
      const l = i.slice(0, o);
      return (
        i[o] === "\r" && ++o,
        i[o] ===
          `
` && ++o,
        (n.buffer = i.slice(o)),
        l
      );
    }
    e && (n.buffer += n.decoder.decode(e, { stream: !0 }));
    try {
      let i = "";
      if (n.state === "INITIAL") {
        if (!/\r\n|\n/.test(n.buffer)) return this;
        i = r();
        const l = i.match(/^(ï»¿)?WEBVTT([ \t].*)?$/);
        if (l == null || !l[0]) throw new Error("Malformed WebVTT signature.");
        n.state = "HEADER";
      }
      let o = !1;
      for (; n.buffer; ) {
        if (!/\r\n|\n/.test(n.buffer)) return this;
        switch ((o ? (o = !1) : (i = r()), n.state)) {
          case "HEADER":
            /:/.test(i)
              ? tWe(i, function (l, u) {}, /:/)
              : i || (n.state = "ID");
            continue;
          case "NOTE":
            i || (n.state = "ID");
            continue;
          case "ID":
            if (/^NOTE($|[ \t])/.test(i)) {
              n.state = "NOTE";
              break;
            }
            if (!i) continue;
            if (
              ((n.cue = new zue(0, 0, "")),
              (n.state = "CUE"),
              i.indexOf("-->") === -1)
            ) {
              n.cue.id = i;
              continue;
            }
          case "CUE":
            if (!n.cue) {
              n.state = "BADCUE";
              continue;
            }
            try {
              yLn(i, n.cue, n.regionList);
            } catch {
              (n.cue = null), (n.state = "BADCUE");
              continue;
            }
            n.state = "CUETEXT";
            continue;
          case "CUETEXT":
            {
              const l = i.indexOf("-->") !== -1;
              if (!i || (l && (o = !0))) {
                n.oncue && n.cue && n.oncue(n.cue),
                  (n.cue = null),
                  (n.state = "ID");
                continue;
              }
              if (n.cue === null) continue;
              n.cue.text &&
                (n.cue.text += `
`),
                (n.cue.text += i);
            }
            continue;
          case "BADCUE":
            i || (n.state = "ID");
        }
      }
    } catch {
      n.state === "CUETEXT" && n.cue && n.oncue && n.oncue(n.cue),
        (n.cue = null),
        (n.state = n.state === "INITIAL" ? "BADWEBVTT" : "BADCUE");
    }
    return this;
  }
  flush() {
    const e = this;
    try {
      if (
        ((e.cue || e.state === "HEADER") &&
          ((e.buffer += `

`),
          e.parse()),
        e.state === "INITIAL" || e.state === "BADWEBVTT")
      )
        throw new Error("Malformed WebVTT signature.");
    } catch (n) {
      e.onparsingerror && e.onparsingerror(n);
    }
    return e.onflush && e.onflush(), this;
  }
}
const bLn = /\r\n|\n\r|\n|\r/g,
  uK = function (t, e, n = 0) {
    return t.slice(n, n + e.length) === e;
  },
  _Ln = function (t) {
    let e = parseInt(t.slice(-3));
    const n = parseInt(t.slice(-6, -4)),
      r = parseInt(t.slice(-9, -7)),
      i = t.length > 9 ? parseInt(t.substring(0, t.indexOf(":"))) : 0;
    if (!(Ta(e) && Ta(n) && Ta(r) && Ta(i)))
      throw Error(`Malformed X-TIMESTAMP-MAP: Local:${t}`);
    return (e += 1e3 * n), (e += 6e4 * r), (e += 36e5 * i), e;
  };
function jue(t, e, n) {
  return L$(t.toString()) + L$(e.toString()) + L$(n);
}
const TLn = function (t, e, n) {
  let r = t[e],
    i = t[r.prevCC];
  if (!i || (!i.new && r.new))
    return (t.ccOffset = t.presentationOffset = r.start), void (r.new = !1);
  for (; (o = i) != null && o.new; ) {
    var o;
    (t.ccOffset += r.start - i.start), (r.new = !1), (r = i), (i = t[r.prevCC]);
  }
  t.presentationOffset = n;
};
function ELn(t, e, n, r, i, o, l) {
  const u = new vLn(),
    c = jp(new Uint8Array(t))
      .trim()
      .replace(
        bLn,
        `
`
      ).split(`
`),
    d = [],
    h = e ? X$n(e.baseTime, e.timescale) : 0;
  let f,
    p = "00:00.000",
    g = 0,
    y = 0,
    v = !0;
  (u.oncue = function (b) {
    const w = n[r];
    let k = n.ccOffset;
    const D = (g - h) / 9e4;
    if (
      (w != null &&
        w.new &&
        (y !== void 0 ? (k = n.ccOffset = w.start) : TLn(n, r, D)),
      D)
    ) {
      if (!e) return void (f = new Error("Missing initPTS for VTT MPEGTS"));
      k = D - n.presentationOffset;
    }
    const $ = b.endTime - b.startTime,
      N = Kg(9e4 * (b.startTime + k - y), 9e4 * i) / 9e4;
    (b.startTime = Math.max(N, 0)), (b.endTime = Math.max(N + $, 0));
    const P = b.text.trim();
    (b.text = decodeURIComponent(encodeURIComponent(P))),
      b.id || (b.id = jue(b.startTime, b.endTime, P)),
      b.endTime > 0 && d.push(b);
  }),
    (u.onparsingerror = function (b) {
      f = b;
    }),
    (u.onflush = function () {
      f ? l(f) : o(d);
    }),
    c.forEach((b) => {
      if (v) {
        if (uK(b, "X-TIMESTAMP-MAP=")) {
          (v = !1),
            b
              .slice(16)
              .split(",")
              .forEach((w) => {
                uK(w, "LOCAL:")
                  ? (p = w.slice(6))
                  : uK(w, "MPEGTS:") && (g = parseInt(w.slice(7)));
              });
          try {
            y = _Ln(p) / 1e3;
          } catch (w) {
            f = w;
          }
          return;
        }
        b === "" && (v = !1);
      }
      u.parse(
        b +
          `
`
      );
    }),
    u.flush();
}
const cK = "stpp.ttml.im1t",
  rWe = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,
  iWe = /^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,
  SLn = {
    left: "start",
    center: "center",
    right: "end",
    start: "start",
    end: "end",
  };
function cAe(t, e, n, r) {
  const i = oo(new Uint8Array(t), ["mdat"]);
  if (i.length === 0) return void r(new Error("Could not parse IMSC1 mdat"));
  const o = i.map((u) => jp(u)),
    l = H$n(e.baseTime, 1, e.timescale);
  try {
    o.forEach((u) => n(RLn(u, l)));
  } catch (u) {
    r(u);
  }
}
function RLn(t, e) {
  const n = new DOMParser()
    .parseFromString(t, "text/xml")
    .getElementsByTagName("tt")[0];
  if (!n) throw new Error("Invalid ttml");
  const r = {
      frameRate: 30,
      subFrameRate: 1,
      frameRateMultiplier: 0,
      tickRate: 0,
    },
    i = Object.keys(r).reduce(
      (d, h) => ((d[h] = n.getAttribute(`ttp:${h}`) || r[h]), d),
      {}
    ),
    o = n.getAttribute("xml:space") !== "preserve",
    l = dAe(dK(n, "styling", "style")),
    u = dAe(dK(n, "layout", "region")),
    c = dK(n, "body", "[begin]");
  return [].map
    .call(c, (d) => {
      const h = aWe(d, o);
      if (!h || !d.hasAttribute("begin")) return null;
      const f = fK(d.getAttribute("begin"), i),
        p = fK(d.getAttribute("dur"), i);
      let g = fK(d.getAttribute("end"), i);
      if (f === null) throw hAe(d);
      if (g === null) {
        if (p === null) throw hAe(d);
        g = f + p;
      }
      const y = new zue(f - e, g - e, h);
      y.id = jue(y.startTime, y.endTime, y.text);
      const v = ALn(u[d.getAttribute("region")], l[d.getAttribute("style")], l),
        { textAlign: b } = v;
      if (b) {
        const w = SLn[b];
        w && (y.lineAlign = w), (y.align = b);
      }
      return du(y, v), y;
    })
    .filter((d) => d !== null);
}
function dK(t, e, n) {
  const r = t.getElementsByTagName(e)[0];
  return r ? [].slice.call(r.querySelectorAll(n)) : [];
}
function dAe(t) {
  return t.reduce((e, n) => {
    const r = n.getAttribute("xml:id");
    return r && (e[r] = n), e;
  }, {});
}
function aWe(t, e) {
  return [].slice.call(t.childNodes).reduce((n, r, i) => {
    var o;
    return r.nodeName === "br" && i
      ? n +
          `
`
      : (o = r.childNodes) != null && o.length
      ? aWe(r, e)
      : e
      ? n + r.textContent.trim().replace(/\s+/g, " ")
      : n + r.textContent;
  }, "");
}
function ALn(t, e, n) {
  const r = "http://www.w3.org/ns/ttml#styling";
  let i = null;
  const o =
    t != null && t.hasAttribute("style") ? t.getAttribute("style") : null;
  return (
    o && n.hasOwnProperty(o) && (i = n[o]),
    [
      "displayAlign",
      "textAlign",
      "color",
      "backgroundColor",
      "fontSize",
      "fontFamily",
    ].reduce((l, u) => {
      const c = hK(e, r, u) || hK(t, r, u) || hK(i, r, u);
      return c && (l[u] = c), l;
    }, {})
  );
}
function hK(t, e, n) {
  return t && t.hasAttributeNS(e, n) ? t.getAttributeNS(e, n) : null;
}
function hAe(t) {
  return new Error(`Could not parse ttml timestamp ${t}`);
}
function fK(t, e) {
  if (!t) return null;
  let n = eWe(t);
  return (
    n === null &&
      (rWe.test(t) ? (n = wLn(t, e)) : iWe.test(t) && (n = kLn(t, e))),
    n
  );
}
function wLn(t, e) {
  const n = rWe.exec(t),
    r = (0 | n[4]) + (0 | n[5]) / e.subFrameRate;
  return 3600 * (0 | n[1]) + 60 * (0 | n[2]) + (0 | n[3]) + r / e.frameRate;
}
function kLn(t, e) {
  const n = iWe.exec(t),
    r = Number(n[1]);
  switch (n[2]) {
    case "h":
      return 3600 * r;
    case "m":
      return 60 * r;
    case "ms":
      return 1e3 * r;
    case "f":
      return r / e.frameRate;
    case "t":
      return r / e.tickRate;
  }
  return r;
}
class b4 {
  constructor(e, n) {
    (this.timelineController = void 0),
      (this.cueRanges = []),
      (this.trackName = void 0),
      (this.startTime = null),
      (this.endTime = null),
      (this.screen = null),
      (this.timelineController = e),
      (this.trackName = n);
  }
  dispatchCue() {
    this.startTime !== null &&
      (this.timelineController.addCues(
        this.trackName,
        this.startTime,
        this.endTime,
        this.screen,
        this.cueRanges
      ),
      (this.startTime = null));
  }
  newCue(e, n, r) {
    (this.startTime === null || this.startTime > e) && (this.startTime = e),
      (this.endTime = n),
      (this.screen = r),
      this.timelineController.createCaptionsTrack(this.trackName);
  }
  reset() {
    (this.cueRanges = []), (this.startTime = null);
  }
}
class ILn {
  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 = pAe()),
      (this.captionsProperties = void 0),
      (this.hls = e),
      (this.config = e.config),
      (this.Cues = e.config.cueHandler),
      (this.captionsProperties = {
        textTrack1: {
          label: this.config.captionsTextTrack1Label,
          languageCode: this.config.captionsTextTrack1LanguageCode,
        },
        textTrack2: {
          label: this.config.captionsTextTrack2Label,
          languageCode: this.config.captionsTextTrack2LanguageCode,
        },
        textTrack3: {
          label: this.config.captionsTextTrack3Label,
          languageCode: this.config.captionsTextTrack3LanguageCode,
        },
        textTrack4: {
          label: this.config.captionsTextTrack4Label,
          languageCode: this.config.captionsTextTrack4LanguageCode,
        },
      }),
      e.on(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.on(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.on(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.on(Tt.MANIFEST_LOADED, this.onManifestLoaded, this),
      e.on(Tt.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this),
      e.on(Tt.FRAG_LOADING, this.onFragLoading, this),
      e.on(Tt.FRAG_LOADED, this.onFragLoaded, this),
      e.on(Tt.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this),
      e.on(Tt.FRAG_DECRYPTED, this.onFragDecrypted, this),
      e.on(Tt.INIT_PTS_FOUND, this.onInitPtsFound, this),
      e.on(Tt.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this),
      e.on(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this);
  }
  destroy() {
    const { hls: e } = this;
    e.off(Tt.MEDIA_ATTACHING, this.onMediaAttaching, this),
      e.off(Tt.MEDIA_DETACHING, this.onMediaDetaching, this),
      e.off(Tt.MANIFEST_LOADING, this.onManifestLoading, this),
      e.off(Tt.MANIFEST_LOADED, this.onManifestLoaded, this),
      e.off(Tt.SUBTITLE_TRACKS_UPDATED, this.onSubtitleTracksUpdated, this),
      e.off(Tt.FRAG_LOADING, this.onFragLoading, this),
      e.off(Tt.FRAG_LOADED, this.onFragLoaded, this),
      e.off(Tt.FRAG_PARSING_USERDATA, this.onFragParsingUserdata, this),
      e.off(Tt.FRAG_DECRYPTED, this.onFragDecrypted, this),
      e.off(Tt.INIT_PTS_FOUND, this.onInitPtsFound, this),
      e.off(Tt.SUBTITLE_TRACKS_CLEARED, this.onSubtitleTracksCleared, this),
      e.off(Tt.BUFFER_FLUSHING, this.onBufferFlushing, this),
      (this.hls = this.config = this.media = null),
      (this.cea608Parser1 = this.cea608Parser2 = void 0);
  }
  initCea608Parsers() {
    const e = new b4(this, "textTrack1"),
      n = new b4(this, "textTrack2"),
      r = new b4(this, "textTrack3"),
      i = new b4(this, "textTrack4");
    (this.cea608Parser1 = new uAe(1, e, n)),
      (this.cea608Parser2 = new uAe(3, r, i));
  }
  addCues(e, n, r, i, o) {
    let l = !1;
    for (let u = o.length; u--; ) {
      const c = o[u],
        d = DLn(c[0], c[1], n, r);
      if (
        d >= 0 &&
        ((c[0] = Math.min(c[0], n)),
        (c[1] = Math.max(c[1], r)),
        (l = !0),
        d / (r - n) > 0.5)
      )
        return;
    }
    if ((l || o.push([n, r]), this.config.renderTextTracksNatively)) {
      const u = this.captionsTracks[e];
      this.Cues.newCue(u, n, r, i);
    } else {
      const u = this.Cues.newCue(null, n, r, i);
      this.hls.trigger(Tt.CUES_PARSED, { type: "captions", cues: u, track: e });
    }
  }
  onInitPtsFound(e, { frag: n, id: r, initPTS: i, timescale: o }) {
    const { unparsedVttFrags: l } = this;
    r === ko.MAIN && (this.initPTS[n.cc] = { baseTime: i, timescale: o }),
      l.length &&
        ((this.unparsedVttFrags = []),
        l.forEach((u) => {
          this.onFragLoaded(Tt.FRAG_LOADED, u);
        }));
  }
  getExistingTrack(e, n) {
    const { media: r } = this;
    if (r)
      for (let i = 0; i < r.textTracks.length; i++) {
        const o = r.textTracks[i];
        if (
          fAe(o, {
            name: e,
            lang: n,
            characteristics:
              "transcribes-spoken-dialog,describes-music-and-sound",
            attrs: {},
          })
        )
          return o;
      }
    return null;
  }
  createCaptionsTrack(e) {
    this.config.renderTextTracksNatively
      ? this.createNativeTrack(e)
      : this.createNonNativeTrack(e);
  }
  createNativeTrack(e) {
    if (this.captionsTracks[e]) return;
    const { captionsProperties: n, captionsTracks: r, media: i } = this,
      { label: o, languageCode: l } = n[e],
      u = this.getExistingTrack(o, l);
    if (u) (r[e] = u), TC(r[e]), zxn(r[e], i);
    else {
      const c = this.createTextTrack("captions", o, l);
      c && ((c[e] = !0), (r[e] = c));
    }
  }
  createNonNativeTrack(e) {
    if (this.nonNativeCaptionsTracks[e]) return;
    const n = this.captionsProperties[e];
    if (!n) return;
    const r = {
      _id: e,
      label: n.label,
      kind: "captions",
      default: !!n.media && !!n.media.default,
      closedCaptions: n.media,
    };
    (this.nonNativeCaptionsTracks[e] = r),
      this.hls.trigger(Tt.NON_NATIVE_TEXT_TRACKS_FOUND, { tracks: [r] });
  }
  createTextTrack(e, n, r) {
    const i = this.media;
    if (i) return i.addTextTrack(e, n, r);
  }
  onMediaAttaching(e, n) {
    (this.media = n.media), n.mediaSource || this._cleanTracks();
  }
  onMediaDetaching(e, n) {
    const r = !!n.transferMedia;
    if (((this.media = null), r)) return;
    const { captionsTracks: i } = this;
    Object.keys(i).forEach((o) => {
      TC(i[o]), delete i[o];
    }),
      (this.nonNativeCaptionsTracks = {});
  }
  onManifestLoading() {
    (this.lastCc = -1),
      (this.lastSn = -1),
      (this.lastPartIndex = -1),
      (this.prevCC = -1),
      (this.vttCCs = pAe()),
      this._cleanTracks(),
      (this.tracks = []),
      (this.captionsTracks = {}),
      (this.nonNativeCaptionsTracks = {}),
      (this.textTracks = []),
      (this.unparsedVttFrags = []),
      (this.initPTS = []),
      this.cea608Parser1 &&
        this.cea608Parser2 &&
        (this.cea608Parser1.reset(), this.cea608Parser2.reset());
  }
  _cleanTracks() {
    const { media: e } = this;
    if (!e) return;
    const n = e.textTracks;
    if (n) for (let r = 0; r < n.length; r++) TC(n[r]);
  }
  onSubtitleTracksUpdated(e, n) {
    const r = n.subtitleTracks || [],
      i = r.some((o) => o.textCodec === cK);
    if (this.config.enableWebVTT || (i && this.config.enableIMSC1)) {
      if (Xje(this.tracks, r)) return void (this.tracks = r);
      if (
        ((this.textTracks = []),
        (this.tracks = r),
        this.config.renderTextTracksNatively)
      ) {
        const o = this.media,
          l = o ? ZF(o.textTracks) : null;
        if (
          (this.tracks.forEach((u, c) => {
            let d;
            if (l) {
              let h = null;
              for (let f = 0; f < l.length; f++)
                if (l[f] && fAe(l[f], u)) {
                  (h = l[f]), (l[f] = null);
                  break;
                }
              h && (d = h);
            }
            if (d) TC(d);
            else {
              const h = oWe(u);
              (d = this.createTextTrack(h, u.name, u.lang)),
                d && (d.mode = "disabled");
            }
            d && this.textTracks.push(d);
          }),
          l != null && l.length)
        ) {
          const u = l.filter((c) => c !== null).map((c) => c.label);
          u.length &&
            this.hls.logger.warn(
              `Media element contains unused subtitle tracks: ${u.join(
                ", "
              )}. Replace media element for each source to clear TextTracks and captions menu.`
            );
        }
      } else if (this.tracks.length) {
        const o = this.tracks.map((l) => ({
          label: l.name,
          kind: l.type.toLowerCase(),
          default: l.default,
          subtitleTrack: l,
        }));
        this.hls.trigger(Tt.NON_NATIVE_TEXT_TRACKS_FOUND, { tracks: o });
      }
    }
  }
  onManifestLoaded(e, n) {
    this.config.enableCEA708Captions &&
      n.captions &&
      n.captions.forEach((r) => {
        const i = /(?:CC|SERVICE)([1-4])/.exec(r.instreamId);
        if (!i) return;
        const o = `textTrack${i[1]}`,
          l = this.captionsProperties[o];
        l &&
          ((l.label = r.name),
          r.lang && (l.languageCode = r.lang),
          (l.media = r));
      });
  }
  closedCaptionsForLevel(e) {
    const n = this.hls.levels[e.level];
    return n == null ? void 0 : n.attrs["CLOSED-CAPTIONS"];
  }
  onFragLoading(e, n) {
    if (this.enabled && n.frag.type === ko.MAIN) {
      var r, i;
      const { cea608Parser1: o, cea608Parser2: l, lastSn: u } = this,
        { cc: c, sn: d } = n.frag,
        h = (r = (i = n.part) == null ? void 0 : i.index) != null ? r : -1;
      o &&
        l &&
        (d !== u + 1 ||
          (d === u && h !== this.lastPartIndex + 1) ||
          c !== this.lastCc) &&
        (o.reset(), l.reset()),
        (this.lastCc = c),
        (this.lastSn = d),
        (this.lastPartIndex = h);
    }
  }
  onFragLoaded(e, n) {
    const { frag: r, payload: i } = n;
    if (r.type === ko.SUBTITLE)
      if (i.byteLength) {
        const o = r.decryptdata,
          l = "stats" in n;
        if (o == null || !o.encrypted || l) {
          const u = this.tracks[r.level],
            c = this.vttCCs;
          c[r.cc] ||
            ((c[r.cc] = { start: r.start, prevCC: this.prevCC, new: !0 }),
            (this.prevCC = r.cc)),
            u && u.textCodec === cK
              ? this._parseIMSC1(r, i)
              : this._parseVTTs(n);
        }
      } else
        this.hls.trigger(Tt.SUBTITLE_FRAG_PROCESSED, {
          success: !1,
          frag: r,
          error: new Error("Empty subtitle payload"),
        });
  }
  _parseIMSC1(e, n) {
    const r = this.hls;
    cAe(
      n,
      this.initPTS[e.cc],
      (i) => {
        this._appendCues(i, e.level),
          r.trigger(Tt.SUBTITLE_FRAG_PROCESSED, { success: !0, frag: e });
      },
      (i) => {
        r.logger.log(`Failed to parse IMSC1: ${i}`),
          r.trigger(Tt.SUBTITLE_FRAG_PROCESSED, {
            success: !1,
            frag: e,
            error: i,
          });
      }
    );
  }
  _parseVTTs(e) {
    var n;
    const { frag: r, payload: i } = e,
      { initPTS: o, unparsedVttFrags: l } = this,
      u = o.length - 1;
    if (!o[r.cc] && u === -1) return void l.push(e);
    const c = this.hls;
    ELn(
      (n = r.initSegment) != null && n.data
        ? fm(r.initSegment.data, new Uint8Array(i)).buffer
        : i,
      this.initPTS[r.cc],
      this.vttCCs,
      r.cc,
      r.start,
      (d) => {
        this._appendCues(d, r.level),
          c.trigger(Tt.SUBTITLE_FRAG_PROCESSED, { success: !0, frag: r });
      },
      (d) => {
        const h = d.message === "Missing initPTS for VTT MPEGTS";
        h ? l.push(e) : this._fallbackToIMSC1(r, i),
          c.logger.log(`Failed to parse VTT cue: ${d}`),
          (h && u > r.cc) ||
            c.trigger(Tt.SUBTITLE_FRAG_PROCESSED, {
              success: !1,
              frag: r,
              error: d,
            });
      }
    );
  }
  _fallbackToIMSC1(e, n) {
    const r = this.tracks[e.level];
    r.textCodec ||
      cAe(
        n,
        this.initPTS[e.cc],
        () => {
          (r.textCodec = cK), this._parseIMSC1(e, n);
        },
        () => {
          r.textCodec = "wvtt";
        }
      );
  }
  _appendCues(e, n) {
    const r = this.hls;
    if (this.config.renderTextTracksNatively) {
      const i = this.textTracks[n];
      if (!i || i.mode === "disabled") return;
      e.forEach((o) => Yje(i, o));
    } else {
      const i = this.tracks[n];
      if (!i) return;
      const o = i.default ? "default" : "subtitles" + n;
      r.trigger(Tt.CUES_PARSED, { type: "subtitles", cues: e, track: o });
    }
  }
  onFragDecrypted(e, n) {
    const { frag: r } = n;
    r.type === ko.SUBTITLE && this.onFragLoaded(Tt.FRAG_LOADED, n);
  }
  onSubtitleTracksCleared() {
    (this.tracks = []), (this.captionsTracks = {});
  }
  onFragParsingUserdata(e, n) {
    if (!this.enabled || !this.config.enableCEA708Captions) return;
    const { frag: r, samples: i } = n;
    if (r.type !== ko.MAIN || this.closedCaptionsForLevel(r) !== "NONE")
      for (let o = 0; o < i.length; o++) {
        const l = i[o].bytes;
        if (l) {
          this.cea608Parser1 || this.initCea608Parsers();
          const u = this.extractCea608Data(l);
          this.cea608Parser1.addData(i[o].pts, u[0]),
            this.cea608Parser2.addData(i[o].pts, u[1]);
        }
      }
  }
  onBufferFlushing(
    e,
    { startOffset: n, endOffset: r, endOffsetSubtitles: i, type: o }
  ) {
    const { media: l } = this;
    if (l && !(l.currentTime < r)) {
      if (!o || o === "video") {
        const { captionsTracks: u } = this;
        Object.keys(u).forEach((c) => aAe(u[c], n, r));
      }
      if (this.config.renderTextTracksNatively && n === 0 && i !== void 0) {
        const { textTracks: u } = this;
        Object.keys(u).forEach((c) => aAe(u[c], n, i));
      }
    }
  }
  extractCea608Data(e) {
    const n = [[], []],
      r = 31 & e[0];
    let i = 2;
    for (let o = 0; o < r; o++) {
      const l = e[i++],
        u = 127 & e[i++],
        c = 127 & e[i++];
      if (!(u === 0 && c === 0) && 4 & l) {
        const d = 3 & l;
        (d !== 0 && d !== 1) || (n[d].push(u), n[d].push(c));
      }
    }
    return n;
  }
}
function oWe(t) {
  return t.characteristics &&
    /transcribes-spoken-dialog/gi.test(t.characteristics) &&
    /describes-music-and-sound/gi.test(t.characteristics)
    ? "captions"
    : "subtitles";
}
function fAe(t, e) {
  return !!t && t.kind === oWe(e) && jne(e, t);
}
function DLn(t, e, n, r) {
  return Math.min(e, r) - Math.max(t, n);
}
function pAe() {
  return {
    ccOffset: 0,
    presentationOffset: 0,
    0: { start: 0, prevCC: -1, new: !0 },
  };
}
const PLn = /\s/,
  MLn = {
    newCue(t, e, n, r) {
      const i = [];
      let o, l, u, c, d;
      const h = self.VTTCue || self.TextTrackCue;
      for (let p = 0; p < r.rows.length; p++)
        if (((o = r.rows[p]), (u = !0), (c = 0), (d = ""), !o.isEmpty())) {
          var f;
          for (let v = 0; v < o.chars.length; v++)
            PLn.test(o.chars[v].uchar) && u
              ? c++
              : ((d += o.chars[v].uchar), (u = !1));
          (o.cueStartTime = e), e === n && (n += 1e-4), c >= 16 ? c-- : c++;
          const g = nWe(d.trim()),
            y = jue(e, n, g);
          (t != null && (f = t.cues) != null && f.getCueById(y)) ||
            ((l = new h(e, n, g)),
            (l.id = y),
            (l.line = p + 1),
            (l.align = "left"),
            (l.position = 10 + Math.min(80, 10 * Math.floor((8 * c) / 32))),
            i.push(l));
        }
      return (
        t &&
          i.length &&
          (i.sort((p, g) =>
            p.line === "auto" || g.line === "auto"
              ? 0
              : p.line > 8 && g.line > 8
              ? g.line - p.line
              : p.line - g.line
          ),
          i.forEach((p) => Yje(t, p))),
        i
      );
    },
  },
  CLn = /^age:\s*[\d.]+\s*$/im;
let $Ln = class {
  constructor(t) {
    (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 = (t && t.xhrSetup) || null),
      (this.stats = new sCn()),
      (this.retryDelay = 0);
  }
  destroy() {
    (this.callbacks = null),
      this.abortInternal(),
      (this.loader = null),
      (this.config = null),
      (this.context = null),
      (this.xhrSetup = null);
  }
  abortInternal() {
    const t = this.loader;
    self.clearTimeout(this.requestTimeout),
      self.clearTimeout(this.retryTimeout),
      t &&
        ((t.onreadystatechange = null),
        (t.onprogress = null),
        t.readyState !== 4 && ((this.stats.aborted = !0), t.abort()));
  }
  abort() {
    var t;
    this.abortInternal(),
      (t = this.callbacks) != null &&
        t.onAbort &&
        this.callbacks.onAbort(this.stats, this.context, this.loader);
  }
  load(t, e, n) {
    if (this.stats.loading.start)
      throw new Error("Loader can only be used once.");
    (this.stats.loading.start = self.performance.now()),
      (this.context = t),
      (this.config = e),
      (this.callbacks = n),
      this.loadInternal();
  }
  loadInternal() {
    const { config: t, context: e } = this;
    if (!t || !e) return;
    const n = (this.loader = new self.XMLHttpRequest()),
      r = this.stats;
    (r.loading.first = 0), (r.loaded = 0), (r.aborted = !1);
    const i = this.xhrSetup;
    i
      ? Promise.resolve()
          .then(() => {
            if (this.loader === n && !this.stats.aborted) return i(n, e.url);
          })
          .catch((o) => {
            if (this.loader === n && !this.stats.aborted)
              return n.open("GET", e.url, !0), i(n, e.url);
          })
          .then(() => {
            this.loader !== n ||
              this.stats.aborted ||
              this.openAndSendXhr(n, e, t);
          })
          .catch((o) => {
            this.callbacks.onError(
              { code: n.status, text: o.message },
              e,
              n,
              r
            );
          })
      : this.openAndSendXhr(n, e, t);
  }
  openAndSendXhr(t, e, n) {
    t.readyState || t.open("GET", e.url, !0);
    const r = e.headers,
      { maxTimeToFirstByteMs: i, maxLoadTimeMs: o } = n.loadPolicy;
    if (r) for (const l in r) t.setRequestHeader(l, r[l]);
    e.rangeEnd &&
      t.setRequestHeader(
        "Range",
        "bytes=" + e.rangeStart + "-" + (e.rangeEnd - 1)
      ),
      (t.onreadystatechange = this.readystatechange.bind(this)),
      (t.onprogress = this.loadprogress.bind(this)),
      (t.responseType = e.responseType),
      self.clearTimeout(this.requestTimeout),
      (n.timeout = i && Ta(i) ? i : o),
      (this.requestTimeout = self.setTimeout(
        this.loadtimeout.bind(this),
        n.timeout
      )),
      t.send();
  }
  readystatechange() {
    const { context: t, loader: e, stats: n } = this;
    if (!t || !e) return;
    const r = e.readyState,
      i = this.config;
    if (
      !n.aborted &&
      r >= 2 &&
      (n.loading.first === 0 &&
        ((n.loading.first = Math.max(self.performance.now(), n.loading.start)),
        i.timeout !== i.loadPolicy.maxLoadTimeMs &&
          (self.clearTimeout(this.requestTimeout),
          (i.timeout = i.loadPolicy.maxLoadTimeMs),
          (this.requestTimeout = self.setTimeout(
            this.loadtimeout.bind(this),
            i.loadPolicy.maxLoadTimeMs - (n.loading.first - n.loading.start)
          )))),
      r === 4)
    ) {
      self.clearTimeout(this.requestTimeout),
        (e.onreadystatechange = null),
        (e.onprogress = null);
      const o = e.status,
        l = e.responseType === "text" ? e.responseText : null;
      if (o >= 200 && o < 300) {
        const c = l ?? e.response;
        if (c != null) {
          n.loading.end = Math.max(self.performance.now(), n.loading.first);
          const d = e.responseType === "arraybuffer" ? c.byteLength : c.length;
          if (
            ((n.loaded = n.total = d),
            (n.bwEstimate =
              (8e3 * n.total) / (n.loading.end - n.loading.first)),
            !this.callbacks)
          )
            return;
          const h = this.callbacks.onProgress;
          if ((h && h(n, t, c, e), !this.callbacks)) return;
          const f = { url: e.responseURL, data: c, code: o };
          return void this.callbacks.onSuccess(f, n, t, e);
        }
      }
      const u = i.loadPolicy.errorRetry;
      u8(u, n.retry, !1, { url: t.url, data: void 0, code: o })
        ? this.retry(u)
        : (Ds.error(`${o} while loading ${t.url}`),
          this.callbacks.onError({ code: o, text: e.statusText }, t, e, n));
    }
  }
  loadtimeout() {
    if (!this.config) return;
    const t = this.config.loadPolicy.timeoutRetry;
    if (u8(t, this.stats.retry, !0)) this.retry(t);
    else {
      var e;
      Ds.warn(
        `timeout while loading ${(e = this.context) == null ? void 0 : e.url}`
      );
      const n = this.callbacks;
      n &&
        (this.abortInternal(),
        n.onTimeout(this.stats, this.context, this.loader));
    }
  }
  retry(t) {
    const { context: e, stats: n } = this;
    (this.retryDelay = Cue(t, n.retry)),
      n.retry++,
      Ds.warn(
        `${status ? "HTTP Status " + status : "Timeout"} while loading ${
          e == null ? void 0 : e.url
        }, retrying ${n.retry}/${t.maxNumRetry} in ${this.retryDelay}ms`
      ),
      this.abortInternal(),
      (this.loader = null),
      self.clearTimeout(this.retryTimeout),
      (this.retryTimeout = self.setTimeout(
        this.loadInternal.bind(this),
        this.retryDelay
      ));
  }
  loadprogress(t) {
    const e = this.stats;
    (e.loaded = t.loaded), t.lengthComputable && (e.total = t.total);
  }
  getCacheAge() {
    let t = null;
    if (this.loader && CLn.test(this.loader.getAllResponseHeaders())) {
      const e = this.loader.getResponseHeader("age");
      t = e ? parseFloat(e) : null;
    }
    return t;
  }
  getResponseHeader(t) {
    return this.loader &&
      new RegExp(`^${t}:\\s*[\\d.]+\\s*$`, "im").test(
        this.loader.getAllResponseHeaders()
      )
      ? this.loader.getResponseHeader(t)
      : null;
  }
};
const xLn = {
  maxTimeToFirstByteMs: 8e3,
  maxLoadTimeMs: 2e4,
  timeoutRetry: null,
  errorRetry: null,
};
pl(
  pl(
    {
      autoStartLoad: !0,
      startPosition: -1,
      defaultAudioCodec: void 0,
      debug: !1,
      capLevelOnFPSDrop: !1,
      capLevelToPlayerSize: !1,
      ignoreDevicePixelRatio: !1,
      maxDevicePixelRatio: Number.POSITIVE_INFINITY,
      preferManagedMediaSource: !0,
      initialLiveManifestSize: 1,
      maxBufferLength: 30,
      backBufferLength: 1 / 0,
      frontBufferFlushThreshold: 1 / 0,
      maxBufferSize: 6e7,
      maxBufferHole: 0.1,
      highBufferWatchdogPeriod: 2,
      nudgeOffset: 0.1,
      nudgeMaxRetry: 3,
      maxFragLookUpTolerance: 0.25,
      liveSyncDurationCount: 3,
      liveSyncOnStallIncrease: 1,
      liveMaxLatencyDurationCount: 1 / 0,
      liveSyncDuration: void 0,
      liveMaxLatencyDuration: void 0,
      maxLiveSyncPlaybackRate: 1,
      liveDurationInfinity: !1,
      liveBackBufferLength: null,
      maxMaxBufferLength: 600,
      enableWorker: !0,
      workerPath: null,
      enableSoftwareAES: !0,
      startLevel: void 0,
      startFragPrefetch: !1,
      fpsDroppedMonitoringPeriod: 5e3,
      fpsDroppedMonitoringThreshold: 0.2,
      appendErrorMaxRetry: 3,
      loader: $Ln,
      fLoader: void 0,
      pLoader: void 0,
      xhrSetup: void 0,
      licenseXhrSetup: void 0,
      licenseResponseCallback: void 0,
      abrController: KMn,
      bufferController: txn,
      capLevelController: Xue,
      errorController: eCn,
      fpsController: Vxn,
      stretchShortVideoTrack: !1,
      maxAudioFramesDrift: 1,
      forceKeyFrameOnDiscontinuity: !0,
      abrEwmaFastLive: 3,
      abrEwmaSlowLive: 9,
      abrEwmaFastVoD: 3,
      abrEwmaSlowVoD: 9,
      abrEwmaDefaultEstimate: 5e5,
      abrEwmaDefaultEstimateMax: 5e6,
      abrBandWidthFactor: 0.95,
      abrBandWidthUpFactor: 0.7,
      abrMaxWithRealBitrate: !1,
      maxStarvationDelay: 4,
      maxLoadingDelay: 4,
      minAutoBitrate: 0,
      emeEnabled: !1,
      widevineLicenseUrl: void 0,
      drmSystems: {},
      drmSystemOptions: {},
      requestMediaKeySystemAccessFunc: mje,
      testBandwidth: !0,
      progressive: !1,
      lowLatencyMode: !0,
      cmcd: void 0,
      enableDateRangeMetadataCues: !0,
      enableEmsgMetadataCues: !0,
      enableEmsgKLVMetadata: !1,
      enableID3MetadataCues: !0,
      enableInterstitialPlayback: !0,
      interstitialAppendInPlace: !0,
      interstitialLiveLookAhead: 10,
      useMediaCapabilities: !0,
      certLoadPolicy: { default: xLn },
      keyLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 8e3,
          maxLoadTimeMs: 2e4,
          timeoutRetry: {
            maxNumRetry: 1,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 2e4,
            backoff: "linear",
          },
          errorRetry: {
            maxNumRetry: 8,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 2e4,
            backoff: "linear",
          },
        },
      },
      manifestLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1 / 0,
          maxLoadTimeMs: 2e4,
          timeoutRetry: { maxNumRetry: 2, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 1,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      playlistLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 2e4,
          timeoutRetry: { maxNumRetry: 2, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 2,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      fragLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 12e4,
          timeoutRetry: { maxNumRetry: 4, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 6,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      steeringManifestLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 2e4,
          timeoutRetry: { maxNumRetry: 2, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 1,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      interstitialAssetListLoadPolicy: {
        default: {
          maxTimeToFirstByteMs: 1e4,
          maxLoadTimeMs: 3e4,
          timeoutRetry: { maxNumRetry: 0, retryDelayMs: 0, maxRetryDelayMs: 0 },
          errorRetry: {
            maxNumRetry: 0,
            retryDelayMs: 1e3,
            maxRetryDelayMs: 8e3,
          },
        },
      },
      manifestLoadingTimeOut: 1e4,
      manifestLoadingMaxRetry: 1,
      manifestLoadingRetryDelay: 1e3,
      manifestLoadingMaxRetryTimeout: 64e3,
      levelLoadingTimeOut: 1e4,
      levelLoadingMaxRetry: 4,
      levelLoadingRetryDelay: 1e3,
      levelLoadingMaxRetryTimeout: 64e3,
      fragLoadingTimeOut: 2e4,
      fragLoadingMaxRetry: 6,
      fragLoadingRetryDelay: 1e3,
      fragLoadingMaxRetryTimeout: 64e3,
    },
    LLn()
  ),
  {},
  {
    subtitleStreamController: nLn,
    subtitleTrackController: Kxn,
    timelineController: ILn,
    audioStreamController: Q$n,
    audioTrackController: J$n,
    emeController: cI,
    cmcdController: Hxn,
    contentSteeringController: Xxn,
    interstitialsController: tLn,
  }
);
function LLn() {
  return {
    cueHandler: MLn,
    enableWebVTT: !0,
    enableIMSC1: !0,
    enableCEA708Captions: !0,
    captionsTextTrack1Label: "English",
    captionsTextTrack1LanguageCode: "en",
    captionsTextTrack2Label: "Spanish",
    captionsTextTrack2LanguageCode: "es",
    captionsTextTrack3Label: "Unknown CC",
    captionsTextTrack3LanguageCode: "",
    captionsTextTrack4Label: "Unknown CC",
    captionsTextTrack4LanguageCode: "",
    renderTextTracksNatively: !0,
  };
}
function OLn() {
  if (typeof self < "u") return self.VTTCue || self.TextTrackCue;
}
(() => {
  const t = OLn();
  try {
    t && new t(0, Number.POSITIVE_INFINITY, "");
  } catch {
    return Number.MAX_VALUE;
  }
  return Number.POSITIVE_INFINITY;
})();
Os.PluginHlsJs;
var GLn = {
    7267: function (t, e) {
      (e.byteLength = function (d) {
        var h = u(d),
          f = h[0],
          p = h[1];
        return (3 * (f + p)) / 4 - p;
      }),
        (e.toByteArray = function (d) {
          var h,
            f,
            p,
            g = u(d),
            y = g[0],
            v = g[1],
            b = new i((3 * (y + (p = v))) / 4 - p),
            w = 0,
            k = v > 0 ? y - 4 : y;
          for (f = 0; f < k; f += 4)
            (h =
              (r[d.charCodeAt(f)] << 18) |
              (r[d.charCodeAt(f + 1)] << 12) |
              (r[d.charCodeAt(f + 2)] << 6) |
              r[d.charCodeAt(f + 3)]),
              (b[w++] = (h >> 16) & 255),
              (b[w++] = (h >> 8) & 255),
              (b[w++] = 255 & h);
          return (
            v === 2 &&
              ((h = (r[d.charCodeAt(f)] << 2) | (r[d.charCodeAt(f + 1)] >> 4)),
              (b[w++] = 255 & h)),
            v === 1 &&
              ((h =
                (r[d.charCodeAt(f)] << 10) |
                (r[d.charCodeAt(f + 1)] << 4) |
                (r[d.charCodeAt(f + 2)] >> 2)),
              (b[w++] = (h >> 8) & 255),
              (b[w++] = 255 & h)),
            b
          );
        }),
        (e.fromByteArray = function (d) {
          for (
            var h, f = d.length, p = f % 3, g = [], y = 16383, v = 0, b = f - p;
            v < b;
            v += y
          )
            g.push(c(d, v, v + y > b ? b : v + y));
          return (
            p === 1
              ? ((h = d[f - 1]), g.push(n[h >> 2] + n[(h << 4) & 63] + "=="))
              : p === 2 &&
                ((h = (d[f - 2] << 8) + d[f - 1]),
                g.push(n[h >> 10] + n[(h >> 4) & 63] + n[(h << 2) & 63] + "=")),
            g.join("")
          );
        });
      for (
        var n = [],
          r = [],
          i = typeof Uint8Array < "u" ? Uint8Array : Array,
          o =
            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
          l = 0;
        l < 64;
        ++l
      )
        (n[l] = o[l]), (r[o.charCodeAt(l)] = l);
      function u(d) {
        var h = d.length;
        if (h % 4 > 0)
          throw new Error("Invalid string. Length must be a multiple of 4");
        var f = d.indexOf("=");
        return f === -1 && (f = h), [f, f === h ? 0 : 4 - (f % 4)];
      }
      function c(d, h, f) {
        for (var p, g, y = [], v = h; v < f; v += 3)
          (p =
            ((d[v] << 16) & 16711680) +
            ((d[v + 1] << 8) & 65280) +
            (255 & d[v + 2])),
            y.push(
              n[((g = p) >> 18) & 63] +
                n[(g >> 12) & 63] +
                n[(g >> 6) & 63] +
                n[63 & g]
            );
        return y.join("");
      }
      (r["-".charCodeAt(0)] = 62), (r["_".charCodeAt(0)] = 63);
    },
    44: function (t, e, n) {
      var r = n(7267),
        i = n(7986),
        o =
          typeof Symbol == "function" && typeof Symbol.for == "function"
            ? Symbol.for("nodejs.util.inspect.custom")
            : null;
      (e.Buffer = c),
        (e.SlowBuffer = function (de) {
          return +de != de && (de = 0), c.alloc(+de);
        }),
        (e.INSPECT_MAX_BYTES = 50);
      var l = 2147483647;
      function u(de) {
        if (de > l)
          throw new RangeError(
            'The value "' + de + '" is invalid for option "size"'
          );
        var ue = new Uint8Array(de);
        return Object.setPrototypeOf(ue, c.prototype), ue;
      }
      function c(de, ue, Z) {
        if (typeof de == "number") {
          if (typeof ue == "string")
            throw new TypeError(
              'The "string" argument must be of type string. Received type number'
            );
          return f(de);
        }
        return d(de, ue, Z);
      }
      function d(de, ue, Z) {
        if (typeof de == "string")
          return (function (Pe, kt) {
            if (
              ((typeof kt == "string" && kt !== "") || (kt = "utf8"),
              !c.isEncoding(kt))
            )
              throw new TypeError("Unknown encoding: " + kt);
            var Gt = 0 | v(Pe, kt),
              B = u(Gt),
              re = B.write(Pe, kt);
            return re !== Gt && (B = B.slice(0, re)), B;
          })(de, ue);
        if (ArrayBuffer.isView(de))
          return (function (Pe) {
            if (ot(Pe, Uint8Array)) {
              var kt = new Uint8Array(Pe);
              return g(kt.buffer, kt.byteOffset, kt.byteLength);
            }
            return p(Pe);
          })(de);
        if (de == null)
          throw new TypeError(
            "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " +
              typeof de
          );
        if (
          ot(de, ArrayBuffer) ||
          (de && ot(de.buffer, ArrayBuffer)) ||
          (typeof SharedArrayBuffer < "u" &&
            (ot(de, SharedArrayBuffer) ||
              (de && ot(de.buffer, SharedArrayBuffer))))
        )
          return g(de, ue, Z);
        if (typeof de == "number")
          throw new TypeError(
            'The "value" argument must not be of type number. Received type number'
          );
        var ie = de.valueOf && de.valueOf();
        if (ie != null && ie !== de) return c.from(ie, ue, Z);
        var Ne = (function (Pe) {
          if (c.isBuffer(Pe)) {
            var kt = 0 | y(Pe.length),
              Gt = u(kt);
            return Gt.length === 0 || Pe.copy(Gt, 0, 0, kt), Gt;
          }
          return Pe.length !== void 0
            ? typeof Pe.length != "number" || tt(Pe.length)
              ? u(0)
              : p(Pe)
            : Pe.type === "Buffer" && Array.isArray(Pe.data)
            ? p(Pe.data)
            : void 0;
        })(de);
        if (Ne) return Ne;
        if (
          typeof Symbol < "u" &&
          Symbol.toPrimitive != null &&
          typeof de[Symbol.toPrimitive] == "function"
        )
          return c.from(de[Symbol.toPrimitive]("string"), ue, Z);
        throw new TypeError(
          "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " +
            typeof de
        );
      }
      function h(de) {
        if (typeof de != "number")
          throw new TypeError('"size" argument must be of type number');
        if (de < 0)
          throw new RangeError(
            'The value "' + de + '" is invalid for option "size"'
          );
      }
      function f(de) {
        return h(de), u(de < 0 ? 0 : 0 | y(de));
      }
      function p(de) {
        for (
          var ue = de.length < 0 ? 0 : 0 | y(de.length), Z = u(ue), ie = 0;
          ie < ue;
          ie += 1
        )
          Z[ie] = 255 & de[ie];
        return Z;
      }
      function g(de, ue, Z) {
        if (ue < 0 || de.byteLength < ue)
          throw new RangeError('"offset" is outside of buffer bounds');
        if (de.byteLength < ue + (Z || 0))
          throw new RangeError('"length" is outside of buffer bounds');
        var ie;
        return (
          (ie =
            ue === void 0 && Z === void 0
              ? new Uint8Array(de)
              : Z === void 0
              ? new Uint8Array(de, ue)
              : new Uint8Array(de, ue, Z)),
          Object.setPrototypeOf(ie, c.prototype),
          ie
        );
      }
      function y(de) {
        if (de >= l)
          throw new RangeError(
            "Attempt to allocate Buffer larger than maximum size: 0x" +
              l.toString(16) +
              " bytes"
          );
        return 0 | de;
      }
      function v(de, ue) {
        if (c.isBuffer(de)) return de.length;
        if (ArrayBuffer.isView(de) || ot(de, ArrayBuffer)) return de.byteLength;
        if (typeof de != "string")
          throw new TypeError(
            'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' +
              typeof de
          );
        var Z = de.length,
          ie = arguments.length > 2 && arguments[2] === !0;
        if (!ie && Z === 0) return 0;
        for (var Ne = !1; ; )
          switch (ue) {
            case "ascii":
            case "latin1":
            case "binary":
              return Z;
            case "utf8":
            case "utf-8":
              return gt(de).length;
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return 2 * Z;
            case "hex":
              return Z >>> 1;
            case "base64":
              return pt(de).length;
            default:
              if (Ne) return ie ? -1 : gt(de).length;
              (ue = ("" + ue).toLowerCase()), (Ne = !0);
          }
      }
      function b(de, ue, Z) {
        var ie = !1;
        if (
          ((ue === void 0 || ue < 0) && (ue = 0),
          ue > this.length ||
            ((Z === void 0 || Z > this.length) && (Z = this.length), Z <= 0) ||
            (Z >>>= 0) <= (ue >>>= 0))
        )
          return "";
        for (de || (de = "utf8"); ; )
          switch (de) {
            case "hex":
              return L(this, ue, Z);
            case "utf8":
            case "utf-8":
              return G(this, ue, Z);
            case "ascii":
              return E(this, ue, Z);
            case "latin1":
            case "binary":
              return S(this, ue, Z);
            case "base64":
              return X(this, ue, Z);
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return W(this, ue, Z);
            default:
              if (ie) throw new TypeError("Unknown encoding: " + de);
              (de = (de + "").toLowerCase()), (ie = !0);
          }
      }
      function w(de, ue, Z) {
        var ie = de[ue];
        (de[ue] = de[Z]), (de[Z] = ie);
      }
      function k(de, ue, Z, ie, Ne) {
        if (de.length === 0) return -1;
        if (
          (typeof Z == "string"
            ? ((ie = Z), (Z = 0))
            : Z > 2147483647
            ? (Z = 2147483647)
            : Z < -2147483648 && (Z = -2147483648),
          tt((Z = +Z)) && (Z = Ne ? 0 : de.length - 1),
          Z < 0 && (Z = de.length + Z),
          Z >= de.length)
        ) {
          if (Ne) return -1;
          Z = de.length - 1;
        } else if (Z < 0) {
          if (!Ne) return -1;
          Z = 0;
        }
        if ((typeof ue == "string" && (ue = c.from(ue, ie)), c.isBuffer(ue)))
          return ue.length === 0 ? -1 : D(de, ue, Z, ie, Ne);
        if (typeof ue == "number")
          return (
            (ue &= 255),
            typeof Uint8Array.prototype.indexOf == "function"
              ? Ne
                ? Uint8Array.prototype.indexOf.call(de, ue, Z)
                : Uint8Array.prototype.lastIndexOf.call(de, ue, Z)
              : D(de, [ue], Z, ie, Ne)
          );
        throw new TypeError("val must be string, number or Buffer");
      }
      function D(de, ue, Z, ie, Ne) {
        var Pe,
          kt = 1,
          Gt = de.length,
          B = ue.length;
        if (
          ie !== void 0 &&
          ((ie = String(ie).toLowerCase()) === "ucs2" ||
            ie === "ucs-2" ||
            ie === "utf16le" ||
            ie === "utf-16le")
        ) {
          if (de.length < 2 || ue.length < 2) return -1;
          (kt = 2), (Gt /= 2), (B /= 2), (Z /= 2);
        }
        function re(St, Lt) {
          return kt === 1 ? St[Lt] : St.readUInt16BE(Lt * kt);
        }
        if (Ne) {
          var Ae = -1;
          for (Pe = Z; Pe < Gt; Pe++)
            if (re(de, Pe) === re(ue, Ae === -1 ? 0 : Pe - Ae)) {
              if ((Ae === -1 && (Ae = Pe), Pe - Ae + 1 === B)) return Ae * kt;
            } else Ae !== -1 && (Pe -= Pe - Ae), (Ae = -1);
        } else
          for (Z + B > Gt && (Z = Gt - B), Pe = Z; Pe >= 0; Pe--) {
            for (var lt = !0, Et = 0; Et < B; Et++)
              if (re(de, Pe + Et) !== re(ue, Et)) {
                lt = !1;
                break;
              }
            if (lt) return Pe;
          }
        return -1;
      }
      function $(de, ue, Z, ie) {
        Z = Number(Z) || 0;
        var Ne = de.length - Z;
        ie ? (ie = Number(ie)) > Ne && (ie = Ne) : (ie = Ne);
        var Pe = ue.length;
        ie > Pe / 2 && (ie = Pe / 2);
        for (var kt = 0; kt < ie; ++kt) {
          var Gt = parseInt(ue.substr(2 * kt, 2), 16);
          if (tt(Gt)) return kt;
          de[Z + kt] = Gt;
        }
        return kt;
      }
      function N(de, ue, Z, ie) {
        return $t(gt(ue, de.length - Z), de, Z, ie);
      }
      function P(de, ue, Z, ie) {
        return $t(
          (function (Ne) {
            for (var Pe = [], kt = 0; kt < Ne.length; ++kt)
              Pe.push(255 & Ne.charCodeAt(kt));
            return Pe;
          })(ue),
          de,
          Z,
          ie
        );
      }
      function I(de, ue, Z, ie) {
        return $t(pt(ue), de, Z, ie);
      }
      function O(de, ue, Z, ie) {
        return $t(
          (function (Ne, Pe) {
            for (
              var kt, Gt, B, re = [], Ae = 0;
              Ae < Ne.length && !((Pe -= 2) < 0);
              ++Ae
            )
              (Gt = (kt = Ne.charCodeAt(Ae)) >> 8),
                (B = kt % 256),
                re.push(B),
                re.push(Gt);
            return re;
          })(ue, de.length - Z),
          de,
          Z,
          ie
        );
      }
      function X(de, ue, Z) {
        return ue === 0 && Z === de.length
          ? r.fromByteArray(de)
          : r.fromByteArray(de.slice(ue, Z));
      }
      function G(de, ue, Z) {
        Z = Math.min(de.length, Z);
        for (var ie = [], Ne = ue; Ne < Z; ) {
          var Pe,
            kt,
            Gt,
            B,
            re = de[Ne],
            Ae = null,
            lt = re > 239 ? 4 : re > 223 ? 3 : re > 191 ? 2 : 1;
          if (Ne + lt <= Z)
            switch (lt) {
              case 1:
                re < 128 && (Ae = re);
                break;
              case 2:
                (192 & (Pe = de[Ne + 1])) == 128 &&
                  (B = ((31 & re) << 6) | (63 & Pe)) > 127 &&
                  (Ae = B);
                break;
              case 3:
                (Pe = de[Ne + 1]),
                  (kt = de[Ne + 2]),
                  (192 & Pe) == 128 &&
                    (192 & kt) == 128 &&
                    (B = ((15 & re) << 12) | ((63 & Pe) << 6) | (63 & kt)) >
                      2047 &&
                    (B < 55296 || B > 57343) &&
                    (Ae = B);
                break;
              case 4:
                (Pe = de[Ne + 1]),
                  (kt = de[Ne + 2]),
                  (Gt = de[Ne + 3]),
                  (192 & Pe) == 128 &&
                    (192 & kt) == 128 &&
                    (192 & Gt) == 128 &&
                    (B =
                      ((15 & re) << 18) |
                      ((63 & Pe) << 12) |
                      ((63 & kt) << 6) |
                      (63 & Gt)) > 65535 &&
                    B < 1114112 &&
                    (Ae = B);
            }
          Ae === null
            ? ((Ae = 65533), (lt = 1))
            : Ae > 65535 &&
              ((Ae -= 65536),
              ie.push(((Ae >>> 10) & 1023) | 55296),
              (Ae = 56320 | (1023 & Ae))),
            ie.push(Ae),
            (Ne += lt);
        }
        return (function (Et) {
          var St = Et.length;
          if (St <= H) return String.fromCharCode.apply(String, Et);
          for (var Lt = "", ln = 0; ln < St; )
            Lt += String.fromCharCode.apply(String, Et.slice(ln, (ln += H)));
          return Lt;
        })(ie);
      }
      (e.kMaxLength = l),
        (c.TYPED_ARRAY_SUPPORT = (function () {
          try {
            var de = new Uint8Array(1),
              ue = {
                foo: function () {
                  return 42;
                },
              };
            return (
              Object.setPrototypeOf(ue, Uint8Array.prototype),
              Object.setPrototypeOf(de, ue),
              de.foo() === 42
            );
          } catch {
            return !1;
          }
        })()),
        c.TYPED_ARRAY_SUPPORT ||
          typeof console > "u" ||
          typeof console.error != "function" ||
          console.error(
            "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
          ),
        Object.defineProperty(c.prototype, "parent", {
          enumerable: !0,
          get: function () {
            if (c.isBuffer(this)) return this.buffer;
          },
        }),
        Object.defineProperty(c.prototype, "offset", {
          enumerable: !0,
          get: function () {
            if (c.isBuffer(this)) return this.byteOffset;
          },
        }),
        (c.poolSize = 8192),
        (c.from = function (de, ue, Z) {
          return d(de, ue, Z);
        }),
        Object.setPrototypeOf(c.prototype, Uint8Array.prototype),
        Object.setPrototypeOf(c, Uint8Array),
        (c.alloc = function (de, ue, Z) {
          return (
            (Ne = ue),
            (Pe = Z),
            h((ie = de)),
            ie <= 0
              ? u(ie)
              : Ne !== void 0
              ? typeof Pe == "string"
                ? u(ie).fill(Ne, Pe)
                : u(ie).fill(Ne)
              : u(ie)
          );
          var ie, Ne, Pe;
        }),
        (c.allocUnsafe = function (de) {
          return f(de);
        }),
        (c.allocUnsafeSlow = function (de) {
          return f(de);
        }),
        (c.isBuffer = function (de) {
          return de != null && de._isBuffer === !0 && de !== c.prototype;
        }),
        (c.compare = function (de, ue) {
          if (
            (ot(de, Uint8Array) && (de = c.from(de, de.offset, de.byteLength)),
            ot(ue, Uint8Array) && (ue = c.from(ue, ue.offset, ue.byteLength)),
            !c.isBuffer(de) || !c.isBuffer(ue))
          )
            throw new TypeError(
              'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
            );
          if (de === ue) return 0;
          for (
            var Z = de.length, ie = ue.length, Ne = 0, Pe = Math.min(Z, ie);
            Ne < Pe;
            ++Ne
          )
            if (de[Ne] !== ue[Ne]) {
              (Z = de[Ne]), (ie = ue[Ne]);
              break;
            }
          return Z < ie ? -1 : ie < Z ? 1 : 0;
        }),
        (c.isEncoding = function (de) {
          switch (String(de).toLowerCase()) {
            case "hex":
            case "utf8":
            case "utf-8":
            case "ascii":
            case "latin1":
            case "binary":
            case "base64":
            case "ucs2":
            case "ucs-2":
            case "utf16le":
            case "utf-16le":
              return !0;
            default:
              return !1;
          }
        }),
        (c.concat = function (de, ue) {
          if (!Array.isArray(de))
            throw new TypeError('"list" argument must be an Array of Buffers');
          if (de.length === 0) return c.alloc(0);
          var Z;
          if (ue === void 0)
            for (ue = 0, Z = 0; Z < de.length; ++Z) ue += de[Z].length;
          var ie = c.allocUnsafe(ue),
            Ne = 0;
          for (Z = 0; Z < de.length; ++Z) {
            var Pe = de[Z];
            if (ot(Pe, Uint8Array))
              Ne + Pe.length > ie.length
                ? c.from(Pe).copy(ie, Ne)
                : Uint8Array.prototype.set.call(ie, Pe, Ne);
            else {
              if (!c.isBuffer(Pe))
                throw new TypeError(
                  '"list" argument must be an Array of Buffers'
                );
              Pe.copy(ie, Ne);
            }
            Ne += Pe.length;
          }
          return ie;
        }),
        (c.byteLength = v),
        (c.prototype._isBuffer = !0),
        (c.prototype.swap16 = function () {
          var de = this.length;
          if (de % 2 != 0)
            throw new RangeError("Buffer size must be a multiple of 16-bits");
          for (var ue = 0; ue < de; ue += 2) w(this, ue, ue + 1);
          return this;
        }),
        (c.prototype.swap32 = function () {
          var de = this.length;
          if (de % 4 != 0)
            throw new RangeError("Buffer size must be a multiple of 32-bits");
          for (var ue = 0; ue < de; ue += 4)
            w(this, ue, ue + 3), w(this, ue + 1, ue + 2);
          return this;
        }),
        (c.prototype.swap64 = function () {
          var de = this.length;
          if (de % 8 != 0)
            throw new RangeError("Buffer size must be a multiple of 64-bits");
          for (var ue = 0; ue < de; ue += 8)
            w(this, ue, ue + 7),
              w(this, ue + 1, ue + 6),
              w(this, ue + 2, ue + 5),
              w(this, ue + 3, ue + 4);
          return this;
        }),
        (c.prototype.toString = function () {
          var de = this.length;
          return de === 0
            ? ""
            : arguments.length === 0
            ? G(this, 0, de)
            : b.apply(this, arguments);
        }),
        (c.prototype.toLocaleString = c.prototype.toString),
        (c.prototype.equals = function (de) {
          if (!c.isBuffer(de)) throw new TypeError("Argument must be a Buffer");
          return this === de || c.compare(this, de) === 0;
        }),
        (c.prototype.inspect = function () {
          var de = "",
            ue = e.INSPECT_MAX_BYTES;
          return (
            (de = this.toString("hex", 0, ue)
              .replace(/(.{2})/g, "$1 ")
              .trim()),
            this.length > ue && (de += " ... "),
            "<Buffer " + de + ">"
          );
        }),
        o && (c.prototype[o] = c.prototype.inspect),
        (c.prototype.compare = function (de, ue, Z, ie, Ne) {
          if (
            (ot(de, Uint8Array) && (de = c.from(de, de.offset, de.byteLength)),
            !c.isBuffer(de))
          )
            throw new TypeError(
              'The "target" argument must be one of type Buffer or Uint8Array. Received type ' +
                typeof de
            );
          if (
            (ue === void 0 && (ue = 0),
            Z === void 0 && (Z = de ? de.length : 0),
            ie === void 0 && (ie = 0),
            Ne === void 0 && (Ne = this.length),
            ue < 0 || Z > de.length || ie < 0 || Ne > this.length)
          )
            throw new RangeError("out of range index");
          if (ie >= Ne && ue >= Z) return 0;
          if (ie >= Ne) return -1;
          if (ue >= Z) return 1;
          if (this === de) return 0;
          for (
            var Pe = (Ne >>>= 0) - (ie >>>= 0),
              kt = (Z >>>= 0) - (ue >>>= 0),
              Gt = Math.min(Pe, kt),
              B = this.slice(ie, Ne),
              re = de.slice(ue, Z),
              Ae = 0;
            Ae < Gt;
            ++Ae
          )
            if (B[Ae] !== re[Ae]) {
              (Pe = B[Ae]), (kt = re[Ae]);
              break;
            }
          return Pe < kt ? -1 : kt < Pe ? 1 : 0;
        }),
        (c.prototype.includes = function (de, ue, Z) {
          return this.indexOf(de, ue, Z) !== -1;
        }),
        (c.prototype.indexOf = function (de, ue, Z) {
          return k(this, de, ue, Z, !0);
        }),
        (c.prototype.lastIndexOf = function (de, ue, Z) {
          return k(this, de, ue, Z, !1);
        }),
        (c.prototype.write = function (de, ue, Z, ie) {
          if (ue === void 0) (ie = "utf8"), (Z = this.length), (ue = 0);
          else if (Z === void 0 && typeof ue == "string")
            (ie = ue), (Z = this.length), (ue = 0);
          else {
            if (!isFinite(ue))
              throw new Error(
                "Buffer.write(string, encoding, offset[, length]) is no longer supported"
              );
            (ue >>>= 0),
              isFinite(Z)
                ? ((Z >>>= 0), ie === void 0 && (ie = "utf8"))
                : ((ie = Z), (Z = void 0));
          }
          var Ne = this.length - ue;
          if (
            ((Z === void 0 || Z > Ne) && (Z = Ne),
            (de.length > 0 && (Z < 0 || ue < 0)) || ue > this.length)
          )
            throw new RangeError("Attempt to write outside buffer bounds");
          ie || (ie = "utf8");
          for (var Pe = !1; ; )
            switch (ie) {
              case "hex":
                return $(this, de, ue, Z);
              case "utf8":
              case "utf-8":
                return N(this, de, ue, Z);
              case "ascii":
              case "latin1":
              case "binary":
                return P(this, de, ue, Z);
              case "base64":
                return I(this, de, ue, Z);
              case "ucs2":
              case "ucs-2":
              case "utf16le":
              case "utf-16le":
                return O(this, de, ue, Z);
              default:
                if (Pe) throw new TypeError("Unknown encoding: " + ie);
                (ie = ("" + ie).toLowerCase()), (Pe = !0);
            }
        }),
        (c.prototype.toJSON = function () {
          return {
            type: "Buffer",
            data: Array.prototype.slice.call(this._arr || this, 0),
          };
        });
      var H = 4096;
      function E(de, ue, Z) {
        var ie = "";
        Z = Math.min(de.length, Z);
        for (var Ne = ue; Ne < Z; ++Ne) ie += String.fromCharCode(127 & de[Ne]);
        return ie;
      }
      function S(de, ue, Z) {
        var ie = "";
        Z = Math.min(de.length, Z);
        for (var Ne = ue; Ne < Z; ++Ne) ie += String.fromCharCode(de[Ne]);
        return ie;
      }
      function L(de, ue, Z) {
        var ie = de.length;
        (!ue || ue < 0) && (ue = 0), (!Z || Z < 0 || Z > ie) && (Z = ie);
        for (var Ne = "", Pe = ue; Pe < Z; ++Pe) Ne += He[de[Pe]];
        return Ne;
      }
      function W(de, ue, Z) {
        for (
          var ie = de.slice(ue, Z), Ne = "", Pe = 0;
          Pe < ie.length - 1;
          Pe += 2
        )
          Ne += String.fromCharCode(ie[Pe] + 256 * ie[Pe + 1]);
        return Ne;
      }
      function F(de, ue, Z) {
        if (de % 1 != 0 || de < 0) throw new RangeError("offset is not uint");
        if (de + ue > Z)
          throw new RangeError("Trying to access beyond buffer length");
      }
      function oe(de, ue, Z, ie, Ne, Pe) {
        if (!c.isBuffer(de))
          throw new TypeError('"buffer" argument must be a Buffer instance');
        if (ue > Ne || ue < Pe)
          throw new RangeError('"value" argument is out of bounds');
        if (Z + ie > de.length) throw new RangeError("Index out of range");
      }
      function De(de, ue, Z, ie, Ne, Pe) {
        if (Z + ie > de.length) throw new RangeError("Index out of range");
        if (Z < 0) throw new RangeError("Index out of range");
      }
      function Xe(de, ue, Z, ie, Ne) {
        return (
          (ue = +ue),
          (Z >>>= 0),
          Ne || De(de, 0, Z, 4),
          i.write(de, ue, Z, ie, 23, 4),
          Z + 4
        );
      }
      function ze(de, ue, Z, ie, Ne) {
        return (
          (ue = +ue),
          (Z >>>= 0),
          Ne || De(de, 0, Z, 8),
          i.write(de, ue, Z, ie, 52, 8),
          Z + 8
        );
      }
      (c.prototype.slice = function (de, ue) {
        var Z = this.length;
        (de = ~~de) < 0 ? (de += Z) < 0 && (de = 0) : de > Z && (de = Z),
          (ue = ue === void 0 ? Z : ~~ue) < 0
            ? (ue += Z) < 0 && (ue = 0)
            : ue > Z && (ue = Z),
          ue < de && (ue = de);
        var ie = this.subarray(de, ue);
        return Object.setPrototypeOf(ie, c.prototype), ie;
      }),
        (c.prototype.readUintLE = c.prototype.readUIntLE =
          function (de, ue, Z) {
            (de >>>= 0), (ue >>>= 0), Z || F(de, ue, this.length);
            for (var ie = this[de], Ne = 1, Pe = 0; ++Pe < ue && (Ne *= 256); )
              ie += this[de + Pe] * Ne;
            return ie;
          }),
        (c.prototype.readUintBE = c.prototype.readUIntBE =
          function (de, ue, Z) {
            (de >>>= 0), (ue >>>= 0), Z || F(de, ue, this.length);
            for (var ie = this[de + --ue], Ne = 1; ue > 0 && (Ne *= 256); )
              ie += this[de + --ue] * Ne;
            return ie;
          }),
        (c.prototype.readUint8 = c.prototype.readUInt8 =
          function (de, ue) {
            return (de >>>= 0), ue || F(de, 1, this.length), this[de];
          }),
        (c.prototype.readUint16LE = c.prototype.readUInt16LE =
          function (de, ue) {
            return (
              (de >>>= 0),
              ue || F(de, 2, this.length),
              this[de] | (this[de + 1] << 8)
            );
          }),
        (c.prototype.readUint16BE = c.prototype.readUInt16BE =
          function (de, ue) {
            return (
              (de >>>= 0),
              ue || F(de, 2, this.length),
              (this[de] << 8) | this[de + 1]
            );
          }),
        (c.prototype.readUint32LE = c.prototype.readUInt32LE =
          function (de, ue) {
            return (
              (de >>>= 0),
              ue || F(de, 4, this.length),
              (this[de] | (this[de + 1] << 8) | (this[de + 2] << 16)) +
                16777216 * this[de + 3]
            );
          }),
        (c.prototype.readUint32BE = c.prototype.readUInt32BE =
          function (de, ue) {
            return (
              (de >>>= 0),
              ue || F(de, 4, this.length),
              16777216 * this[de] +
                ((this[de + 1] << 16) | (this[de + 2] << 8) | this[de + 3])
            );
          }),
        (c.prototype.readIntLE = function (de, ue, Z) {
          (de >>>= 0), (ue >>>= 0), Z || F(de, ue, this.length);
          for (var ie = this[de], Ne = 1, Pe = 0; ++Pe < ue && (Ne *= 256); )
            ie += this[de + Pe] * Ne;
          return ie >= (Ne *= 128) && (ie -= Math.pow(2, 8 * ue)), ie;
        }),
        (c.prototype.readIntBE = function (de, ue, Z) {
          (de >>>= 0), (ue >>>= 0), Z || F(de, ue, this.length);
          for (
            var ie = ue, Ne = 1, Pe = this[de + --ie];
            ie > 0 && (Ne *= 256);

          )
            Pe += this[de + --ie] * Ne;
          return Pe >= (Ne *= 128) && (Pe -= Math.pow(2, 8 * ue)), Pe;
        }),
        (c.prototype.readInt8 = function (de, ue) {
          return (
            (de >>>= 0),
            ue || F(de, 1, this.length),
            128 & this[de] ? -1 * (255 - this[de] + 1) : this[de]
          );
        }),
        (c.prototype.readInt16LE = function (de, ue) {
          (de >>>= 0), ue || F(de, 2, this.length);
          var Z = this[de] | (this[de + 1] << 8);
          return 32768 & Z ? 4294901760 | Z : Z;
        }),
        (c.prototype.readInt16BE = function (de, ue) {
          (de >>>= 0), ue || F(de, 2, this.length);
          var Z = this[de + 1] | (this[de] << 8);
          return 32768 & Z ? 4294901760 | Z : Z;
        }),
        (c.prototype.readInt32LE = function (de, ue) {
          return (
            (de >>>= 0),
            ue || F(de, 4, this.length),
            this[de] |
              (this[de + 1] << 8) |
              (this[de + 2] << 16) |
              (this[de + 3] << 24)
          );
        }),
        (c.prototype.readInt32BE = function (de, ue) {
          return (
            (de >>>= 0),
            ue || F(de, 4, this.length),
            (this[de] << 24) |
              (this[de + 1] << 16) |
              (this[de + 2] << 8) |
              this[de + 3]
          );
        }),
        (c.prototype.readFloatLE = function (de, ue) {
          return (
            (de >>>= 0),
            ue || F(de, 4, this.length),
            i.read(this, de, !0, 23, 4)
          );
        }),
        (c.prototype.readFloatBE = function (de, ue) {
          return (
            (de >>>= 0),
            ue || F(de, 4, this.length),
            i.read(this, de, !1, 23, 4)
          );
        }),
        (c.prototype.readDoubleLE = function (de, ue) {
          return (
            (de >>>= 0),
            ue || F(de, 8, this.length),
            i.read(this, de, !0, 52, 8)
          );
        }),
        (c.prototype.readDoubleBE = function (de, ue) {
          return (
            (de >>>= 0),
            ue || F(de, 8, this.length),
            i.read(this, de, !1, 52, 8)
          );
        }),
        (c.prototype.writeUintLE = c.prototype.writeUIntLE =
          function (de, ue, Z, ie) {
            (de = +de),
              (ue >>>= 0),
              (Z >>>= 0),
              ie || oe(this, de, ue, Z, Math.pow(2, 8 * Z) - 1, 0);
            var Ne = 1,
              Pe = 0;
            for (this[ue] = 255 & de; ++Pe < Z && (Ne *= 256); )
              this[ue + Pe] = (de / Ne) & 255;
            return ue + Z;
          }),
        (c.prototype.writeUintBE = c.prototype.writeUIntBE =
          function (de, ue, Z, ie) {
            (de = +de),
              (ue >>>= 0),
              (Z >>>= 0),
              ie || oe(this, de, ue, Z, Math.pow(2, 8 * Z) - 1, 0);
            var Ne = Z - 1,
              Pe = 1;
            for (this[ue + Ne] = 255 & de; --Ne >= 0 && (Pe *= 256); )
              this[ue + Ne] = (de / Pe) & 255;
            return ue + Z;
          }),
        (c.prototype.writeUint8 = c.prototype.writeUInt8 =
          function (de, ue, Z) {
            return (
              (de = +de),
              (ue >>>= 0),
              Z || oe(this, de, ue, 1, 255, 0),
              (this[ue] = 255 & de),
              ue + 1
            );
          }),
        (c.prototype.writeUint16LE = c.prototype.writeUInt16LE =
          function (de, ue, Z) {
            return (
              (de = +de),
              (ue >>>= 0),
              Z || oe(this, de, ue, 2, 65535, 0),
              (this[ue] = 255 & de),
              (this[ue + 1] = de >>> 8),
              ue + 2
            );
          }),
        (c.prototype.writeUint16BE = c.prototype.writeUInt16BE =
          function (de, ue, Z) {
            return (
              (de = +de),
              (ue >>>= 0),
              Z || oe(this, de, ue, 2, 65535, 0),
              (this[ue] = de >>> 8),
              (this[ue + 1] = 255 & de),
              ue + 2
            );
          }),
        (c.prototype.writeUint32LE = c.prototype.writeUInt32LE =
          function (de, ue, Z) {
            return (
              (de = +de),
              (ue >>>= 0),
              Z || oe(this, de, ue, 4, 4294967295, 0),
              (this[ue + 3] = de >>> 24),
              (this[ue + 2] = de >>> 16),
              (this[ue + 1] = de >>> 8),
              (this[ue] = 255 & de),
              ue + 4
            );
          }),
        (c.prototype.writeUint32BE = c.prototype.writeUInt32BE =
          function (de, ue, Z) {
            return (
              (de = +de),
              (ue >>>= 0),
              Z || oe(this, de, ue, 4, 4294967295, 0),
              (this[ue] = de >>> 24),
              (this[ue + 1] = de >>> 16),
              (this[ue + 2] = de >>> 8),
              (this[ue + 3] = 255 & de),
              ue + 4
            );
          }),
        (c.prototype.writeIntLE = function (de, ue, Z, ie) {
          if (((de = +de), (ue >>>= 0), !ie)) {
            var Ne = Math.pow(2, 8 * Z - 1);
            oe(this, de, ue, Z, Ne - 1, -Ne);
          }
          var Pe = 0,
            kt = 1,
            Gt = 0;
          for (this[ue] = 255 & de; ++Pe < Z && (kt *= 256); )
            de < 0 && Gt === 0 && this[ue + Pe - 1] !== 0 && (Gt = 1),
              (this[ue + Pe] = (((de / kt) | 0) - Gt) & 255);
          return ue + Z;
        }),
        (c.prototype.writeIntBE = function (de, ue, Z, ie) {
          if (((de = +de), (ue >>>= 0), !ie)) {
            var Ne = Math.pow(2, 8 * Z - 1);
            oe(this, de, ue, Z, Ne - 1, -Ne);
          }
          var Pe = Z - 1,
            kt = 1,
            Gt = 0;
          for (this[ue + Pe] = 255 & de; --Pe >= 0 && (kt *= 256); )
            de < 0 && Gt === 0 && this[ue + Pe + 1] !== 0 && (Gt = 1),
              (this[ue + Pe] = (((de / kt) | 0) - Gt) & 255);
          return ue + Z;
        }),
        (c.prototype.writeInt8 = function (de, ue, Z) {
          return (
            (de = +de),
            (ue >>>= 0),
            Z || oe(this, de, ue, 1, 127, -128),
            de < 0 && (de = 255 + de + 1),
            (this[ue] = 255 & de),
            ue + 1
          );
        }),
        (c.prototype.writeInt16LE = function (de, ue, Z) {
          return (
            (de = +de),
            (ue >>>= 0),
            Z || oe(this, de, ue, 2, 32767, -32768),
            (this[ue] = 255 & de),
            (this[ue + 1] = de >>> 8),
            ue + 2
          );
        }),
        (c.prototype.writeInt16BE = function (de, ue, Z) {
          return (
            (de = +de),
            (ue >>>= 0),
            Z || oe(this, de, ue, 2, 32767, -32768),
            (this[ue] = de >>> 8),
            (this[ue + 1] = 255 & de),
            ue + 2
          );
        }),
        (c.prototype.writeInt32LE = function (de, ue, Z) {
          return (
            (de = +de),
            (ue >>>= 0),
            Z || oe(this, de, ue, 4, 2147483647, -2147483648),
            (this[ue] = 255 & de),
            (this[ue + 1] = de >>> 8),
            (this[ue + 2] = de >>> 16),
            (this[ue + 3] = de >>> 24),
            ue + 4
          );
        }),
        (c.prototype.writeInt32BE = function (de, ue, Z) {
          return (
            (de = +de),
            (ue >>>= 0),
            Z || oe(this, de, ue, 4, 2147483647, -2147483648),
            de < 0 && (de = 4294967295 + de + 1),
            (this[ue] = de >>> 24),
            (this[ue + 1] = de >>> 16),
            (this[ue + 2] = de >>> 8),
            (this[ue + 3] = 255 & de),
            ue + 4
          );
        }),
        (c.prototype.writeFloatLE = function (de, ue, Z) {
          return Xe(this, de, ue, !0, Z);
        }),
        (c.prototype.writeFloatBE = function (de, ue, Z) {
          return Xe(this, de, ue, !1, Z);
        }),
        (c.prototype.writeDoubleLE = function (de, ue, Z) {
          return ze(this, de, ue, !0, Z);
        }),
        (c.prototype.writeDoubleBE = function (de, ue, Z) {
          return ze(this, de, ue, !1, Z);
        }),
        (c.prototype.copy = function (de, ue, Z, ie) {
          if (!c.isBuffer(de))
            throw new TypeError("argument should be a Buffer");
          if (
            (Z || (Z = 0),
            ie || ie === 0 || (ie = this.length),
            ue >= de.length && (ue = de.length),
            ue || (ue = 0),
            ie > 0 && ie < Z && (ie = Z),
            ie === Z || de.length === 0 || this.length === 0)
          )
            return 0;
          if (ue < 0) throw new RangeError("targetStart out of bounds");
          if (Z < 0 || Z >= this.length)
            throw new RangeError("Index out of range");
          if (ie < 0) throw new RangeError("sourceEnd out of bounds");
          ie > this.length && (ie = this.length),
            de.length - ue < ie - Z && (ie = de.length - ue + Z);
          var Ne = ie - Z;
          return (
            this === de && typeof Uint8Array.prototype.copyWithin == "function"
              ? this.copyWithin(ue, Z, ie)
              : Uint8Array.prototype.set.call(de, this.subarray(Z, ie), ue),
            Ne
          );
        }),
        (c.prototype.fill = function (de, ue, Z, ie) {
          if (typeof de == "string") {
            if (
              (typeof ue == "string"
                ? ((ie = ue), (ue = 0), (Z = this.length))
                : typeof Z == "string" && ((ie = Z), (Z = this.length)),
              ie !== void 0 && typeof ie != "string")
            )
              throw new TypeError("encoding must be a string");
            if (typeof ie == "string" && !c.isEncoding(ie))
              throw new TypeError("Unknown encoding: " + ie);
            if (de.length === 1) {
              var Ne = de.charCodeAt(0);
              ((ie === "utf8" && Ne < 128) || ie === "latin1") && (de = Ne);
            }
          } else
            typeof de == "number"
              ? (de &= 255)
              : typeof de == "boolean" && (de = Number(de));
          if (ue < 0 || this.length < ue || this.length < Z)
            throw new RangeError("Out of range index");
          if (Z <= ue) return this;
          var Pe;
          if (
            ((ue >>>= 0),
            (Z = Z === void 0 ? this.length : Z >>> 0),
            de || (de = 0),
            typeof de == "number")
          )
            for (Pe = ue; Pe < Z; ++Pe) this[Pe] = de;
          else {
            var kt = c.isBuffer(de) ? de : c.from(de, ie),
              Gt = kt.length;
            if (Gt === 0)
              throw new TypeError(
                'The value "' + de + '" is invalid for argument "value"'
              );
            for (Pe = 0; Pe < Z - ue; ++Pe) this[Pe + ue] = kt[Pe % Gt];
          }
          return this;
        });
      var ht = /[^+/0-9A-Za-z-_]/g;
      function gt(de, ue) {
        var Z;
        ue = ue || 1 / 0;
        for (var ie = de.length, Ne = null, Pe = [], kt = 0; kt < ie; ++kt) {
          if ((Z = de.charCodeAt(kt)) > 55295 && Z < 57344) {
            if (!Ne) {
              if (Z > 56319) {
                (ue -= 3) > -1 && Pe.push(239, 191, 189);
                continue;
              }
              if (kt + 1 === ie) {
                (ue -= 3) > -1 && Pe.push(239, 191, 189);
                continue;
              }
              Ne = Z;
              continue;
            }
            if (Z < 56320) {
              (ue -= 3) > -1 && Pe.push(239, 191, 189), (Ne = Z);
              continue;
            }
            Z = 65536 + (((Ne - 55296) << 10) | (Z - 56320));
          } else Ne && (ue -= 3) > -1 && Pe.push(239, 191, 189);
          if (((Ne = null), Z < 128)) {
            if ((ue -= 1) < 0) break;
            Pe.push(Z);
          } else if (Z < 2048) {
            if ((ue -= 2) < 0) break;
            Pe.push((Z >> 6) | 192, (63 & Z) | 128);
          } else if (Z < 65536) {
            if ((ue -= 3) < 0) break;
            Pe.push((Z >> 12) | 224, ((Z >> 6) & 63) | 128, (63 & Z) | 128);
          } else {
            if (!(Z < 1114112)) throw new Error("Invalid code point");
            if ((ue -= 4) < 0) break;
            Pe.push(
              (Z >> 18) | 240,
              ((Z >> 12) & 63) | 128,
              ((Z >> 6) & 63) | 128,
              (63 & Z) | 128
            );
          }
        }
        return Pe;
      }
      function pt(de) {
        return r.toByteArray(
          (function (ue) {
            if (
              (ue = (ue = ue.split("=")[0]).trim().replace(ht, "")).length < 2
            )
              return "";
            for (; ue.length % 4 != 0; ) ue += "=";
            return ue;
          })(de)
        );
      }
      function $t(de, ue, Z, ie) {
        for (
          var Ne = 0;
          Ne < ie && !(Ne + Z >= ue.length || Ne >= de.length);
          ++Ne
        )
          ue[Ne + Z] = de[Ne];
        return Ne;
      }
      function ot(de, ue) {
        return (
          de instanceof ue ||
          (de != null &&
            de.constructor != null &&
            de.constructor.name != null &&
            de.constructor.name === ue.name)
        );
      }
      function tt(de) {
        return de != de;
      }
      var He = (function () {
        for (
          var de = "0123456789abcdef", ue = new Array(256), Z = 0;
          Z < 16;
          ++Z
        )
          for (var ie = 16 * Z, Ne = 0; Ne < 16; ++Ne)
            ue[ie + Ne] = de[Z] + de[Ne];
        return ue;
      })();
    },
    6877: function (t, e) {
      var n = {
        parseBuffer: function (o) {
          return new r(o).parse();
        },
        addBoxProcessor: function (o, l) {
          typeof o == "string" &&
            typeof l == "function" &&
            (i.prototype._boxProcessors[o] = l);
        },
        createFile: function () {
          return new r();
        },
        createBox: function (o, l, u) {
          var c = i.create(o);
          return l && l.append(c, u), c;
        },
        createFullBox: function (o, l, u) {
          var c = n.createBox(o, l, u);
          return (c.version = 0), (c.flags = 0), c;
        },
        Utils: {},
      };
      (n.Utils.dataViewToString = function (o, l) {
        var u = l || "utf-8";
        if (typeof TextDecoder < "u") return new TextDecoder(u).decode(o);
        var c = [],
          d = 0;
        if (u === "utf-8")
          for (; d < o.byteLength; ) {
            var h = o.getUint8(d++);
            h < 128 ||
              (h < 224
                ? ((h = (31 & h) << 6), (h |= 63 & o.getUint8(d++)))
                : h < 240
                ? ((h = (15 & h) << 12),
                  (h |= (63 & o.getUint8(d++)) << 6),
                  (h |= 63 & o.getUint8(d++)))
                : ((h = (7 & h) << 18),
                  (h |= (63 & o.getUint8(d++)) << 12),
                  (h |= (63 & o.getUint8(d++)) << 6),
                  (h |= 63 & o.getUint8(d++)))),
              c.push(String.fromCharCode(h));
          }
        else
          for (; d < o.byteLength; )
            c.push(String.fromCharCode(o.getUint8(d++)));
        return c.join("");
      }),
        (n.Utils.utf8ToByteArray = function (o) {
          var l, u;
          if (typeof TextEncoder < "u") l = new TextEncoder().encode(o);
          else
            for (l = [], u = 0; u < o.length; ++u) {
              var c = o.charCodeAt(u);
              c < 128
                ? l.push(c)
                : c < 2048
                ? (l.push(192 | (c >> 6)), l.push(128 | (63 & c)))
                : c < 65536
                ? (l.push(224 | (c >> 12)),
                  l.push(128 | (63 & (c >> 6))),
                  l.push(128 | (63 & c)))
                : (l.push(240 | (c >> 18)),
                  l.push(128 | (63 & (c >> 12))),
                  l.push(128 | (63 & (c >> 6))),
                  l.push(128 | (63 & c)));
            }
          return l;
        }),
        (n.Utils.appendBox = function (o, l, u) {
          if (
            ((l._offset = o._cursor.offset),
            (l._root = o._root ? o._root : o),
            (l._raw = o._raw),
            (l._parent = o),
            u !== -1)
          )
            if (u != null) {
              var c,
                d = -1;
              if (typeof u == "number") d = u;
              else {
                if (typeof u == "string") c = u;
                else {
                  if (typeof u != "object" || !u.type)
                    return void o.boxes.push(l);
                  c = u.type;
                }
                for (var h = 0; h < o.boxes.length; h++)
                  if (c === o.boxes[h].type) {
                    d = h + 1;
                    break;
                  }
              }
              o.boxes.splice(d, 0, l);
            } else o.boxes.push(l);
        }),
        (e.parseBuffer = n.parseBuffer),
        (e.addBoxProcessor = n.addBoxProcessor),
        (e.createFile = n.createFile),
        (e.createBox = n.createBox),
        (e.createFullBox = n.createFullBox),
        (e.Utils = n.Utils),
        (n.Cursor = function (o) {
          this.offset = o === void 0 ? 0 : o;
        });
      var r = function (o) {
        (this._cursor = new n.Cursor()),
          (this.boxes = []),
          o && (this._raw = new DataView(o));
      };
      (r.prototype.fetch = function (o) {
        var l = this.fetchAll(o, !0);
        return l.length ? l[0] : null;
      }),
        (r.prototype.fetchAll = function (o, l) {
          var u = [];
          return r._sweep.call(this, o, u, l), u;
        }),
        (r.prototype.parse = function () {
          for (
            this._cursor.offset = 0, this.boxes = [];
            this._cursor.offset < this._raw.byteLength;

          ) {
            var o = i.parse(this);
            if (o.type === void 0) break;
            this.boxes.push(o);
          }
          return this;
        }),
        (r._sweep = function (o, l, u) {
          for (var c in (this.type && this.type == o && l.push(this),
          this.boxes)) {
            if (l.length && u) return;
            r._sweep.call(this.boxes[c], o, l, u);
          }
        }),
        (r.prototype.write = function () {
          var o,
            l = 0;
          for (o = 0; o < this.boxes.length; o++)
            l += this.boxes[o].getLength(!1);
          var u = new Uint8Array(l);
          for (
            this._rawo = new DataView(u.buffer),
              this.bytes = u,
              this._cursor.offset = 0,
              o = 0;
            o < this.boxes.length;
            o++
          )
            this.boxes[o].write();
          return u.buffer;
        }),
        (r.prototype.append = function (o, l) {
          n.Utils.appendBox(this, o, l);
        });
      var i = function () {
        this._cursor = new n.Cursor();
      };
      (i.parse = function (o) {
        var l = new i();
        return (
          (l._offset = o._cursor.offset),
          (l._root = o._root ? o._root : o),
          (l._raw = o._raw),
          (l._parent = o),
          l._parseBox(),
          (o._cursor.offset = l._raw.byteOffset + l._raw.byteLength),
          l
        );
      }),
        (i.create = function (o) {
          var l = new i();
          return (l.type = o), (l.boxes = []), l;
        }),
        (i.prototype._boxContainers = [
          "dinf",
          "edts",
          "mdia",
          "meco",
          "mfra",
          "minf",
          "moof",
          "moov",
          "mvex",
          "stbl",
          "strk",
          "traf",
          "trak",
          "tref",
          "udta",
          "vttc",
          "sinf",
          "schi",
          "encv",
          "enca",
          "meta",
          "grpl",
          "prsl",
        ]),
        (i.prototype._boxProcessors = {}),
        (i.prototype._procField = function (o, l, u) {
          this._parsing
            ? (this[o] = this._readField(l, u))
            : this._writeField(l, u, this[o]);
        }),
        (i.prototype._procFieldArray = function (o, l, u, c) {
          var d;
          if (this._parsing)
            for (this[o] = [], d = 0; d < l; d++)
              this[o][d] = this._readField(u, c);
          else
            for (d = 0; d < this[o].length; d++)
              this._writeField(u, c, this[o][d]);
        }),
        (i.prototype._procFullBox = function () {
          this._procField("version", "uint", 8),
            this._procField("flags", "uint", 24);
        }),
        (i.prototype._procEntries = function (o, l, u) {
          var c;
          if (this._parsing)
            for (this[o] = [], c = 0; c < l; c++)
              this[o].push({}), u.call(this, this[o][c]);
          else for (c = 0; c < l; c++) u.call(this, this[o][c]);
        }),
        (i.prototype._procSubEntries = function (o, l, u, c) {
          var d;
          if (this._parsing)
            for (o[l] = [], d = 0; d < u; d++)
              o[l].push({}), c.call(this, o[l][d]);
          else for (d = 0; d < u; d++) c.call(this, o[l][d]);
        }),
        (i.prototype._procEntryField = function (o, l, u, c) {
          this._parsing
            ? (o[l] = this._readField(u, c))
            : this._writeField(u, c, o[l]);
        }),
        (i.prototype._procSubBoxes = function (o, l) {
          var u;
          if (this._parsing)
            for (this[o] = [], u = 0; u < l; u++) this[o].push(i.parse(this));
          else
            for (u = 0; u < l; u++)
              this._rawo
                ? this[o][u].write()
                : (this.size += this[o][u].getLength());
        }),
        (i.prototype._readField = function (o, l) {
          switch (o) {
            case "uint":
              return this._readUint(l);
            case "int":
              return this._readInt(l);
            case "template":
              return this._readTemplate(l);
            case "string":
              return l === -1
                ? this._readTerminatedString()
                : this._readString(l);
            case "data":
              return this._readData(l);
            case "utf8":
              return this._readUTF8String();
            case "utf8string":
              return this._readUTF8TerminatedString();
            default:
              return -1;
          }
        }),
        (i.prototype._readInt = function (o) {
          var l = null,
            u = this._cursor.offset - this._raw.byteOffset;
          switch (o) {
            case 8:
              l = this._raw.getInt8(u);
              break;
            case 16:
              l = this._raw.getInt16(u);
              break;
            case 32:
              l = this._raw.getInt32(u);
              break;
            case 64:
              var c = this._raw.getInt32(u),
                d = this._raw.getInt32(u + 4);
              l = c * Math.pow(2, 32) + d;
          }
          return (this._cursor.offset += o >> 3), l;
        }),
        (i.prototype._readUint = function (o) {
          var l,
            u,
            c = null,
            d = this._cursor.offset - this._raw.byteOffset;
          switch (o) {
            case 8:
              c = this._raw.getUint8(d);
              break;
            case 16:
              c = this._raw.getUint16(d);
              break;
            case 24:
              c =
                ((l = this._raw.getUint16(d)) << 8) +
                (u = this._raw.getUint8(d + 2));
              break;
            case 32:
              c = this._raw.getUint32(d);
              break;
            case 64:
              (l = this._raw.getUint32(d)),
                (u = this._raw.getUint32(d + 4)),
                (c = l * Math.pow(2, 32) + u);
          }
          return (this._cursor.offset += o >> 3), c;
        }),
        (i.prototype._readString = function (o) {
          for (var l = "", u = 0; u < o; u++) {
            var c = this._readUint(8);
            l += String.fromCharCode(c);
          }
          return l;
        }),
        (i.prototype._readTemplate = function (o) {
          return (
            this._readUint(o / 2) + this._readUint(o / 2) / Math.pow(2, o / 2)
          );
        }),
        (i.prototype._readTerminatedString = function () {
          for (
            var o = "";
            this._cursor.offset - this._offset < this._raw.byteLength;

          ) {
            var l = this._readUint(8);
            if (l === 0) break;
            o += String.fromCharCode(l);
          }
          return o;
        }),
        (i.prototype._readData = function (o) {
          var l =
            o > 0
              ? o
              : this._raw.byteLength - (this._cursor.offset - this._offset);
          if (l > 0) {
            var u = new Uint8Array(this._raw.buffer, this._cursor.offset, l);
            return (this._cursor.offset += l), u;
          }
          return null;
        }),
        (i.prototype._readUTF8String = function () {
          var o = this._raw.byteLength - (this._cursor.offset - this._offset),
            l = null;
          return (
            o > 0 &&
              ((l = new DataView(this._raw.buffer, this._cursor.offset, o)),
              (this._cursor.offset += o)),
            l && n.Utils.dataViewToString(l)
          );
        }),
        (i.prototype._readUTF8TerminatedString = function () {
          var o = this._raw.byteLength - (this._cursor.offset - this._offset),
            l = null;
          if (o > 0) {
            var u;
            for (
              l = new DataView(this._raw.buffer, this._cursor.offset, o), u = 0;
              u < o && l.getUint8(u) !== 0;
              u++
            );
            (l = new DataView(this._raw.buffer, this._cursor.offset, u)),
              (this._cursor.offset += Math.min(u + 1, o));
          }
          return l && n.Utils.dataViewToString(l);
        }),
        (i.prototype._parseBox = function () {
          if (
            ((this._parsing = !0),
            (this._cursor.offset = this._offset),
            this._offset + 8 > this._raw.buffer.byteLength)
          )
            this._root._incomplete = !0;
          else {
            switch (
              (this._procField("size", "uint", 32),
              this._procField("type", "string", 4),
              this.size === 1 && this._procField("largesize", "uint", 64),
              this.type === "uuid" &&
                this._procFieldArray("usertype", 16, "uint", 8),
              this.size)
            ) {
              case 0:
                this._raw = new DataView(this._raw.buffer, this._offset);
                break;
              case 1:
                this._offset + this.size > this._raw.buffer.byteLength
                  ? ((this._incomplete = !0), (this._root._incomplete = !0))
                  : (this._raw = new DataView(
                      this._raw.buffer,
                      this._offset,
                      this.largesize
                    ));
                break;
              default:
                this._offset + this.size > this._raw.buffer.byteLength
                  ? ((this._incomplete = !0), (this._root._incomplete = !0))
                  : (this._raw = new DataView(
                      this._raw.buffer,
                      this._offset,
                      this.size
                    ));
            }
            this._incomplete ||
              (this._boxProcessors[this.type] &&
                this._boxProcessors[this.type].call(this),
              this._boxContainers.indexOf(this.type) !== -1
                ? this._parseContainerBox()
                : (this._data = this._readData()));
          }
        }),
        (i.prototype._parseFullBox = function () {
          (this.version = this._readUint(8)), (this.flags = this._readUint(24));
        }),
        (i.prototype._parseContainerBox = function () {
          for (
            this.boxes = [];
            this._cursor.offset - this._raw.byteOffset < this._raw.byteLength;

          )
            this.boxes.push(i.parse(this));
        }),
        (i.prototype.append = function (o, l) {
          n.Utils.appendBox(this, o, l);
        }),
        (i.prototype.getLength = function () {
          if (
            ((this._parsing = !1),
            (this._rawo = null),
            (this.size = 0),
            this._procField("size", "uint", 32),
            this._procField("type", "string", 4),
            this.size === 1 && this._procField("largesize", "uint", 64),
            this.type === "uuid" &&
              this._procFieldArray("usertype", 16, "uint", 8),
            this._boxProcessors[this.type] &&
              this._boxProcessors[this.type].call(this),
            this._boxContainers.indexOf(this.type) !== -1)
          )
            for (var o = 0; o < this.boxes.length; o++)
              this.size += this.boxes[o].getLength();
          return this._data && this._writeData(this._data), this.size;
        }),
        (i.prototype.write = function () {
          switch (
            ((this._parsing = !1),
            (this._cursor.offset = this._parent._cursor.offset),
            this.size)
          ) {
            case 0:
              this._rawo = new DataView(
                this._parent._rawo.buffer,
                this._cursor.offset,
                this.parent._rawo.byteLength - this._cursor.offset
              );
              break;
            case 1:
              this._rawo = new DataView(
                this._parent._rawo.buffer,
                this._cursor.offset,
                this.largesize
              );
              break;
            default:
              this._rawo = new DataView(
                this._parent._rawo.buffer,
                this._cursor.offset,
                this.size
              );
          }
          if (
            (this._procField("size", "uint", 32),
            this._procField("type", "string", 4),
            this.size === 1 && this._procField("largesize", "uint", 64),
            this.type === "uuid" &&
              this._procFieldArray("usertype", 16, "uint", 8),
            this._boxProcessors[this.type] &&
              this._boxProcessors[this.type].call(this),
            this._boxContainers.indexOf(this.type) !== -1)
          )
            for (var o = 0; o < this.boxes.length; o++) this.boxes[o].write();
          return (
            this._data && this._writeData(this._data),
            (this._parent._cursor.offset += this.size),
            this.size
          );
        }),
        (i.prototype._writeInt = function (o, l) {
          if (this._rawo) {
            var u = this._cursor.offset - this._rawo.byteOffset;
            switch (o) {
              case 8:
                this._rawo.setInt8(u, l);
                break;
              case 16:
                this._rawo.setInt16(u, l);
                break;
              case 32:
                this._rawo.setInt32(u, l);
                break;
              case 64:
                var c = Math.floor(l / Math.pow(2, 32)),
                  d = l - c * Math.pow(2, 32);
                this._rawo.setUint32(u, c), this._rawo.setUint32(u + 4, d);
            }
            this._cursor.offset += o >> 3;
          } else this.size += o >> 3;
        }),
        (i.prototype._writeUint = function (o, l) {
          if (this._rawo) {
            var u,
              c,
              d = this._cursor.offset - this._rawo.byteOffset;
            switch (o) {
              case 8:
                this._rawo.setUint8(d, l);
                break;
              case 16:
                this._rawo.setUint16(d, l);
                break;
              case 24:
                (u = (16776960 & l) >> 8),
                  (c = 255 & l),
                  this._rawo.setUint16(d, u),
                  this._rawo.setUint8(d + 2, c);
                break;
              case 32:
                this._rawo.setUint32(d, l);
                break;
              case 64:
                (c =
                  l - (u = Math.floor(l / Math.pow(2, 32))) * Math.pow(2, 32)),
                  this._rawo.setUint32(d, u),
                  this._rawo.setUint32(d + 4, c);
            }
            this._cursor.offset += o >> 3;
          } else this.size += o >> 3;
        }),
        (i.prototype._writeString = function (o, l) {
          for (var u = 0; u < o; u++) this._writeUint(8, l.charCodeAt(u));
        }),
        (i.prototype._writeTerminatedString = function (o) {
          if (o.length !== 0) {
            for (var l = 0; l < o.length; l++)
              this._writeUint(8, o.charCodeAt(l));
            this._writeUint(8, 0);
          }
        }),
        (i.prototype._writeTemplate = function (o, l) {
          var u = Math.floor(l),
            c = (l - u) * Math.pow(2, o / 2);
          this._writeUint(o / 2, u), this._writeUint(o / 2, c);
        }),
        (i.prototype._writeData = function (o) {
          if (o)
            if (this._rawo) {
              if (o instanceof Array) {
                for (
                  var l = this._cursor.offset - this._rawo.byteOffset, u = 0;
                  u < o.length;
                  u++
                )
                  this._rawo.setInt8(l + u, o[u]);
                this._cursor.offset += o.length;
              }
              o instanceof Uint8Array &&
                (this._root.bytes.set(o, this._cursor.offset),
                (this._cursor.offset += o.length));
            } else this.size += o.length;
        }),
        (i.prototype._writeUTF8String = function (o) {
          var l = n.Utils.utf8ToByteArray(o);
          if (this._rawo)
            for (
              var u = new DataView(
                  this._rawo.buffer,
                  this._cursor.offset,
                  l.length
                ),
                c = 0;
              c < l.length;
              c++
            )
              u.setUint8(c, l[c]);
          else this.size += l.length;
        }),
        (i.prototype._writeField = function (o, l, u) {
          switch (o) {
            case "uint":
              this._writeUint(l, u);
              break;
            case "int":
              this._writeInt(l, u);
              break;
            case "template":
              this._writeTemplate(l, u);
              break;
            case "string":
              l == -1
                ? this._writeTerminatedString(u)
                : this._writeString(l, u);
              break;
            case "data":
              this._writeData(u);
              break;
            case "utf8":
              this._writeUTF8String(u);
          }
        }),
        (i.prototype._boxProcessors.ardi = function () {
          this._procFullBox(),
            this._procField("audio_rendering_indication", "uint", 8);
        }),
        (i.prototype._boxProcessors.avc1 =
          i.prototype._boxProcessors.avc2 =
          i.prototype._boxProcessors.avc3 =
          i.prototype._boxProcessors.avc4 =
          i.prototype._boxProcessors.hvc1 =
          i.prototype._boxProcessors.hev1 =
          i.prototype._boxProcessors.encv =
            function () {
              this._procFieldArray("reserved1", 6, "uint", 8),
                this._procField("data_reference_index", "uint", 16),
                this._procField("pre_defined1", "uint", 16),
                this._procField("reserved2", "uint", 16),
                this._procFieldArray("pre_defined2", 3, "uint", 32),
                this._procField("width", "uint", 16),
                this._procField("height", "uint", 16),
                this._procField("horizresolution", "template", 32),
                this._procField("vertresolution", "template", 32),
                this._procField("reserved3", "uint", 32),
                this._procField("frame_count", "uint", 16),
                this._procFieldArray("compressorname", 32, "uint", 8),
                this._procField("depth", "uint", 16),
                this._procField("pre_defined3", "int", 16),
                this._procField("config", "data", -1);
            }),
        (i.prototype._boxProcessors.ctts = function () {
          this._procFullBox(),
            this._procField("entry_count", "uint", 32),
            this._procEntries("entries", this.entry_count, function (o) {
              this._procEntryField(o, "sample_count", "uint", 32),
                this._procEntryField(
                  o,
                  "sample_offset",
                  this.version === 1 ? "int" : "uint",
                  32
                );
            });
        }),
        (i.prototype._boxProcessors.dref = function () {
          this._procFullBox(),
            this._procField("entry_count", "uint", 32),
            this._procSubBoxes("entries", this.entry_count);
        }),
        (i.prototype._boxProcessors.elng = function () {
          this._procFullBox(),
            this._procField("extended_language", "utf8string");
        }),
        (i.prototype._boxProcessors.elst = function () {
          this._procFullBox(),
            this._procField("entry_count", "uint", 32),
            this._procEntries("entries", this.entry_count, function (o) {
              this._procEntryField(
                o,
                "segment_duration",
                "uint",
                this.version === 1 ? 64 : 32
              ),
                this._procEntryField(
                  o,
                  "media_time",
                  "int",
                  this.version === 1 ? 64 : 32
                ),
                this._procEntryField(o, "media_rate_integer", "int", 16),
                this._procEntryField(o, "media_rate_fraction", "int", 16);
            });
        }),
        (i.prototype._boxProcessors.emsg = function () {
          this._procFullBox(),
            this.version == 1
              ? (this._procField("timescale", "uint", 32),
                this._procField("presentation_time", "uint", 64),
                this._procField("event_duration", "uint", 32),
                this._procField("id", "uint", 32),
                this._procField("scheme_id_uri", "string", -1),
                this._procField("value", "string", -1))
              : (this._procField("scheme_id_uri", "string", -1),
                this._procField("value", "string", -1),
                this._procField("timescale", "uint", 32),
                this._procField("presentation_time_delta", "uint", 32),
                this._procField("event_duration", "uint", 32),
                this._procField("id", "uint", 32)),
            this._procField("message_data", "data", -1);
        }),
        (i.prototype._boxProcessors.free = i.prototype._boxProcessors.skip =
          function () {
            this._procField("data", "data", -1);
          }),
        (i.prototype._boxProcessors.frma = function () {
          this._procField("data_format", "uint", 32);
        }),
        (i.prototype._boxProcessors.ftyp = i.prototype._boxProcessors.styp =
          function () {
            this._procField("major_brand", "string", 4),
              this._procField("minor_version", "uint", 32);
            var o = -1;
            this._parsing &&
              (o =
                (this._raw.byteLength -
                  (this._cursor.offset - this._raw.byteOffset)) /
                4),
              this._procFieldArray("compatible_brands", o, "string", 4);
          }),
        (i.prototype._boxProcessors.hdlr = function () {
          this._procFullBox(),
            this._procField("pre_defined", "uint", 32),
            this._procField("handler_type", "string", 4),
            this._procFieldArray("reserved", 3, "uint", 32),
            this._procField("name", "string", -1);
        }),
        (i.prototype._boxProcessors.imda = function () {
          this._procField("imda_identifier", "uint", 32),
            this._procField("data", "data", -1);
        }),
        (i.prototype._boxProcessors.kind = function () {
          this._procFullBox(),
            this._procField("schemeURI", "utf8string"),
            this._procField("value", "utf8string");
        }),
        (i.prototype._boxProcessors.labl = function () {
          this._procFullBox(),
            (this.is_group_label = !!(1 & this.flags)),
            this._procField("label_id", "uint", 16),
            this._procField("language", "utf8string"),
            this._procField("label", "utf8string");
        }),
        (i.prototype._boxProcessors.mdat = function () {
          this._procField("data", "data", -1);
        }),
        (i.prototype._boxProcessors.mdhd = function () {
          this._procFullBox(),
            this._procField(
              "creation_time",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField(
              "modification_time",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField("timescale", "uint", 32),
            this._procField("duration", "uint", this.version == 1 ? 64 : 32),
            this._parsing ||
              typeof this.language != "string" ||
              (this.language =
                ((this.language.charCodeAt(0) - 96) << 10) |
                ((this.language.charCodeAt(1) - 96) << 5) |
                (this.language.charCodeAt(2) - 96)),
            this._procField("language", "uint", 16),
            this._parsing &&
              (this.language = String.fromCharCode(
                96 + ((this.language >> 10) & 31),
                96 + ((this.language >> 5) & 31),
                96 + (31 & this.language)
              )),
            this._procField("pre_defined", "uint", 16);
        }),
        (i.prototype._boxProcessors.mehd = function () {
          this._procFullBox(),
            this._procField(
              "fragment_duration",
              "uint",
              this.version == 1 ? 64 : 32
            );
        }),
        (i.prototype._boxProcessors.meta = function () {
          this._procFullBox();
        }),
        (i.prototype._boxProcessors.mfhd = function () {
          this._procFullBox(), this._procField("sequence_number", "uint", 32);
        }),
        (i.prototype._boxProcessors.mfro = function () {
          this._procFullBox(), this._procField("mfra_size", "uint", 32);
        }),
        (i.prototype._boxProcessors.mp4a = i.prototype._boxProcessors.enca =
          function () {
            this._procFieldArray("reserved1", 6, "uint", 8),
              this._procField("data_reference_index", "uint", 16),
              this._procFieldArray("reserved2", 2, "uint", 32),
              this._procField("channelcount", "uint", 16),
              this._procField("samplesize", "uint", 16),
              this._procField("pre_defined", "uint", 16),
              this._procField("reserved3", "uint", 16),
              this._procField("samplerate", "template", 32),
              this._procField("esds", "data", -1);
          }),
        (i.prototype._boxProcessors.mvhd = function () {
          this._procFullBox(),
            this._procField(
              "creation_time",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField(
              "modification_time",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField("timescale", "uint", 32),
            this._procField("duration", "uint", this.version == 1 ? 64 : 32),
            this._procField("rate", "template", 32),
            this._procField("volume", "template", 16),
            this._procField("reserved1", "uint", 16),
            this._procFieldArray("reserved2", 2, "uint", 32),
            this._procFieldArray("matrix", 9, "template", 32),
            this._procFieldArray("pre_defined", 6, "uint", 32),
            this._procField("next_track_ID", "uint", 32);
        }),
        (i.prototype._boxProcessors.payl = function () {
          this._procField("cue_text", "utf8");
        }),
        (i.prototype._boxProcessors.prft = function () {
          this._procFullBox(),
            this._procField("reference_track_ID", "uint", 32),
            this._procField("ntp_timestamp_sec", "uint", 32),
            this._procField("ntp_timestamp_frac", "uint", 32),
            this._procField("media_time", "uint", this.version == 1 ? 64 : 32);
        }),
        (i.prototype._boxProcessors.prsl = function () {
          this._procFullBox(),
            this._procField("group_id", "uint", 32),
            this._procField("num_entities_in_group", "uint", 32),
            this._procEntries(
              "entities",
              this.num_entities_in_group,
              function (o) {
                this._procEntryField(o, "entity_id", "uint", 32);
              }
            ),
            4096 & this.flags &&
              this._procField("preselection_tag", "utf8string"),
            8192 & this.flags &&
              this._procField("selection_priority", "uint", 8),
            16384 & this.flags &&
              this._procField("interleaving_tag", "utf8string");
        }),
        (i.prototype._boxProcessors.pssh = function () {
          this._procFullBox(),
            this._procFieldArray("SystemID", 16, "uint", 8),
            this._procField("DataSize", "uint", 32),
            this._procFieldArray("Data", this.DataSize, "uint", 8);
        }),
        (i.prototype._boxProcessors.schm = function () {
          this._procFullBox(),
            this._procField("scheme_type", "uint", 32),
            this._procField("scheme_version", "uint", 32),
            1 & this.flags && this._procField("scheme_uri", "string", -1);
        }),
        (i.prototype._boxProcessors.sdtp = function () {
          this._procFullBox();
          var o = -1;
          this._parsing &&
            (o =
              this._raw.byteLength -
              (this._cursor.offset - this._raw.byteOffset)),
            this._procFieldArray("sample_dependency_table", o, "uint", 8);
        }),
        (i.prototype._boxProcessors.sidx = function () {
          this._procFullBox(),
            this._procField("reference_ID", "uint", 32),
            this._procField("timescale", "uint", 32),
            this._procField(
              "earliest_presentation_time",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField(
              "first_offset",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField("reserved", "uint", 16),
            this._procField("reference_count", "uint", 16),
            this._procEntries("references", this.reference_count, function (o) {
              this._parsing ||
                ((o.reference = (1 & o.reference_type) << 31),
                (o.reference |= 2147483647 & o.referenced_size),
                (o.sap = (1 & o.starts_with_SAP) << 31),
                (o.sap |= (3 & o.SAP_type) << 28),
                (o.sap |= 268435455 & o.SAP_delta_time)),
                this._procEntryField(o, "reference", "uint", 32),
                this._procEntryField(o, "subsegment_duration", "uint", 32),
                this._procEntryField(o, "sap", "uint", 32),
                this._parsing &&
                  ((o.reference_type = (o.reference >> 31) & 1),
                  (o.referenced_size = 2147483647 & o.reference),
                  (o.starts_with_SAP = (o.sap >> 31) & 1),
                  (o.SAP_type = (o.sap >> 28) & 7),
                  (o.SAP_delta_time = 268435455 & o.sap));
            });
        }),
        (i.prototype._boxProcessors.smhd = function () {
          this._procFullBox(),
            this._procField("balance", "uint", 16),
            this._procField("reserved", "uint", 16);
        }),
        (i.prototype._boxProcessors.ssix = function () {
          this._procFullBox(),
            this._procField("subsegment_count", "uint", 32),
            this._procEntries(
              "subsegments",
              this.subsegment_count,
              function (o) {
                this._procEntryField(o, "ranges_count", "uint", 32),
                  this._procSubEntries(
                    o,
                    "ranges",
                    o.ranges_count,
                    function (l) {
                      this._procEntryField(l, "level", "uint", 8),
                        this._procEntryField(l, "range_size", "uint", 24);
                    }
                  );
              }
            );
        }),
        (i.prototype._boxProcessors.stsd = function () {
          this._procFullBox(),
            this._procField("entry_count", "uint", 32),
            this._procSubBoxes("entries", this.entry_count);
        }),
        (i.prototype._boxProcessors.sttg = function () {
          this._procField("settings", "utf8");
        }),
        (i.prototype._boxProcessors.stts = function () {
          this._procFullBox(),
            this._procField("entry_count", "uint", 32),
            this._procEntries("entries", this.entry_count, function (o) {
              this._procEntryField(o, "sample_count", "uint", 32),
                this._procEntryField(o, "sample_delta", "uint", 32);
            });
        }),
        (i.prototype._boxProcessors.subs = function () {
          this._procFullBox(),
            this._procField("entry_count", "uint", 32),
            this._procEntries("entries", this.entry_count, function (o) {
              this._procEntryField(o, "sample_delta", "uint", 32),
                this._procEntryField(o, "subsample_count", "uint", 16),
                this._procSubEntries(
                  o,
                  "subsamples",
                  o.subsample_count,
                  function (l) {
                    this._procEntryField(
                      l,
                      "subsample_size",
                      "uint",
                      this.version === 1 ? 32 : 16
                    ),
                      this._procEntryField(l, "subsample_priority", "uint", 8),
                      this._procEntryField(l, "discardable", "uint", 8),
                      this._procEntryField(
                        l,
                        "codec_specific_parameters",
                        "uint",
                        32
                      );
                  }
                );
            });
        }),
        (i.prototype._boxProcessors.tenc = function () {
          this._procFullBox(),
            this._procField("default_IsEncrypted", "uint", 24),
            this._procField("default_IV_size", "uint", 8),
            this._procFieldArray("default_KID", 16, "uint", 8);
        }),
        (i.prototype._boxProcessors.tfdt = function () {
          this._procFullBox(),
            this._procField(
              "baseMediaDecodeTime",
              "uint",
              this.version == 1 ? 64 : 32
            );
        }),
        (i.prototype._boxProcessors.tfhd = function () {
          this._procFullBox(),
            this._procField("track_ID", "uint", 32),
            1 & this.flags && this._procField("base_data_offset", "uint", 64),
            2 & this.flags &&
              this._procField("sample_description_offset", "uint", 32),
            8 & this.flags &&
              this._procField("default_sample_duration", "uint", 32),
            16 & this.flags &&
              this._procField("default_sample_size", "uint", 32),
            32 & this.flags &&
              this._procField("default_sample_flags", "uint", 32);
        }),
        (i.prototype._boxProcessors.tfra = function () {
          this._procFullBox(),
            this._procField("track_ID", "uint", 32),
            this._parsing ||
              ((this.reserved = 0),
              (this.reserved |= (48 & this.length_size_of_traf_num) << 4),
              (this.reserved |= (12 & this.length_size_of_trun_num) << 2),
              (this.reserved |= 3 & this.length_size_of_sample_num)),
            this._procField("reserved", "uint", 32),
            this._parsing &&
              ((this.length_size_of_traf_num = (48 & this.reserved) >> 4),
              (this.length_size_of_trun_num = (12 & this.reserved) >> 2),
              (this.length_size_of_sample_num = 3 & this.reserved)),
            this._procField("number_of_entry", "uint", 32),
            this._procEntries("entries", this.number_of_entry, function (o) {
              this._procEntryField(
                o,
                "time",
                "uint",
                this.version === 1 ? 64 : 32
              ),
                this._procEntryField(
                  o,
                  "moof_offset",
                  "uint",
                  this.version === 1 ? 64 : 32
                ),
                this._procEntryField(
                  o,
                  "traf_number",
                  "uint",
                  8 * (this.length_size_of_traf_num + 1)
                ),
                this._procEntryField(
                  o,
                  "trun_number",
                  "uint",
                  8 * (this.length_size_of_trun_num + 1)
                ),
                this._procEntryField(
                  o,
                  "sample_number",
                  "uint",
                  8 * (this.length_size_of_sample_num + 1)
                );
            });
        }),
        (i.prototype._boxProcessors.tkhd = function () {
          this._procFullBox(),
            this._procField(
              "creation_time",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField(
              "modification_time",
              "uint",
              this.version == 1 ? 64 : 32
            ),
            this._procField("track_ID", "uint", 32),
            this._procField("reserved1", "uint", 32),
            this._procField("duration", "uint", this.version == 1 ? 64 : 32),
            this._procFieldArray("reserved2", 2, "uint", 32),
            this._procField("layer", "uint", 16),
            this._procField("alternate_group", "uint", 16),
            this._procField("volume", "template", 16),
            this._procField("reserved3", "uint", 16),
            this._procFieldArray("matrix", 9, "template", 32),
            this._procField("width", "template", 32),
            this._procField("height", "template", 32);
        }),
        (i.prototype._boxProcessors.trex = function () {
          this._procFullBox(),
            this._procField("track_ID", "uint", 32),
            this._procField("default_sample_description_index", "uint", 32),
            this._procField("default_sample_duration", "uint", 32),
            this._procField("default_sample_size", "uint", 32),
            this._procField("default_sample_flags", "uint", 32);
        }),
        (i.prototype._boxProcessors.trun = function () {
          this._procFullBox(),
            this._procField("sample_count", "uint", 32),
            1 & this.flags && this._procField("data_offset", "int", 32),
            4 & this.flags && this._procField("first_sample_flags", "uint", 32),
            this._procEntries("samples", this.sample_count, function (o) {
              256 & this.flags &&
                this._procEntryField(o, "sample_duration", "uint", 32),
                512 & this.flags &&
                  this._procEntryField(o, "sample_size", "uint", 32),
                1024 & this.flags &&
                  this._procEntryField(o, "sample_flags", "uint", 32),
                2048 & this.flags &&
                  this._procEntryField(
                    o,
                    "sample_composition_time_offset",
                    this.version === 1 ? "int" : "uint",
                    32
                  );
            });
        }),
        (i.prototype._boxProcessors["url "] = i.prototype._boxProcessors[
          "urn "
        ] =
          function () {
            this._procFullBox(),
              this.type === "urn " && this._procField("name", "string", -1),
              this._procField("location", "string", -1);
          }),
        (i.prototype._boxProcessors.vlab = function () {
          this._procField("source_label", "utf8");
        }),
        (i.prototype._boxProcessors.vmhd = function () {
          this._procFullBox(),
            this._procField("graphicsmode", "uint", 16),
            this._procFieldArray("opcolor", 3, "uint", 16);
        }),
        (i.prototype._boxProcessors.vttC = function () {
          this._procField("config", "utf8");
        }),
        (i.prototype._boxProcessors.vtte = function () {});
    },
    9826: function (t) {
      var e,
        n = typeof Reflect == "object" ? Reflect : null,
        r =
          n && typeof n.apply == "function"
            ? n.apply
            : function (b, w, k) {
                return Function.prototype.apply.call(b, w, k);
              };
      e =
        n && typeof n.ownKeys == "function"
          ? n.ownKeys
          : Object.getOwnPropertySymbols
          ? function (b) {
              return Object.getOwnPropertyNames(b).concat(
                Object.getOwnPropertySymbols(b)
              );
            }
          : function (b) {
              return Object.getOwnPropertyNames(b);
            };
      var i =
        Number.isNaN ||
        function (b) {
          return b != b;
        };
      function o() {
        o.init.call(this);
      }
      (t.exports = o),
        (t.exports.once = function (b, w) {
          return new Promise(function (k, D) {
            function $(O) {
              b.removeListener(w, N), D(O);
            }
            function N() {
              typeof b.removeListener == "function" &&
                b.removeListener("error", $),
                k([].slice.call(arguments));
            }
            var P, I;
            v(b, w, N, { once: !0 }),
              w !== "error" &&
                ((I = $),
                typeof (P = b).on == "function" &&
                  v(P, "error", I, { once: !0 }));
          });
        }),
        (o.EventEmitter = o),
        (o.prototype._events = void 0),
        (o.prototype._eventsCount = 0),
        (o.prototype._maxListeners = void 0);
      var l = 10;
      function u(b) {
        if (typeof b != "function")
          throw new TypeError(
            'The "listener" argument must be of type Function. Received type ' +
              typeof b
          );
      }
      function c(b) {
        return b._maxListeners === void 0
          ? o.defaultMaxListeners
          : b._maxListeners;
      }
      function d(b, w, k, D) {
        var $, N, P, I;
        if (
          (u(k),
          (N = b._events) === void 0
            ? ((N = b._events = Object.create(null)), (b._eventsCount = 0))
            : (N.newListener !== void 0 &&
                (b.emit("newListener", w, k.listener ? k.listener : k),
                (N = b._events)),
              (P = N[w])),
          P === void 0)
        )
          (P = N[w] = k), ++b._eventsCount;
        else if (
          (typeof P == "function"
            ? (P = N[w] = D ? [k, P] : [P, k])
            : D
            ? P.unshift(k)
            : P.push(k),
          ($ = c(b)) > 0 && P.length > $ && !P.warned)
        ) {
          P.warned = !0;
          var O = new Error(
            "Possible EventEmitter memory leak detected. " +
              P.length +
              " " +
              String(w) +
              " listeners added. Use emitter.setMaxListeners() to increase limit"
          );
          (O.name = "MaxListenersExceededWarning"),
            (O.emitter = b),
            (O.type = w),
            (O.count = P.length),
            (I = O),
            console && console.warn && console.warn(I);
        }
        return b;
      }
      function h() {
        if (!this.fired)
          return (
            this.target.removeListener(this.type, this.wrapFn),
            (this.fired = !0),
            arguments.length === 0
              ? this.listener.call(this.target)
              : this.listener.apply(this.target, arguments)
          );
      }
      function f(b, w, k) {
        var D = { fired: !1, wrapFn: void 0, target: b, type: w, listener: k },
          $ = h.bind(D);
        return ($.listener = k), (D.wrapFn = $), $;
      }
      function p(b, w, k) {
        var D = b._events;
        if (D === void 0) return [];
        var $ = D[w];
        return $ === void 0
          ? []
          : typeof $ == "function"
          ? k
            ? [$.listener || $]
            : [$]
          : k
          ? (function (N) {
              for (var P = new Array(N.length), I = 0; I < P.length; ++I)
                P[I] = N[I].listener || N[I];
              return P;
            })($)
          : y($, $.length);
      }
      function g(b) {
        var w = this._events;
        if (w !== void 0) {
          var k = w[b];
          if (typeof k == "function") return 1;
          if (k !== void 0) return k.length;
        }
        return 0;
      }
      function y(b, w) {
        for (var k = new Array(w), D = 0; D < w; ++D) k[D] = b[D];
        return k;
      }
      function v(b, w, k, D) {
        if (typeof b.on == "function") D.once ? b.once(w, k) : b.on(w, k);
        else {
          if (typeof b.addEventListener != "function")
            throw new TypeError(
              'The "emitter" argument must be of type EventEmitter. Received type ' +
                typeof b
            );
          b.addEventListener(w, function $(N) {
            D.once && b.removeEventListener(w, $), k(N);
          });
        }
      }
      Object.defineProperty(o, "defaultMaxListeners", {
        enumerable: !0,
        get: function () {
          return l;
        },
        set: function (b) {
          if (typeof b != "number" || b < 0 || i(b))
            throw new RangeError(
              'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' +
                b +
                "."
            );
          l = b;
        },
      }),
        (o.init = function () {
          (this._events !== void 0 &&
            this._events !== Object.getPrototypeOf(this)._events) ||
            ((this._events = Object.create(null)), (this._eventsCount = 0)),
            (this._maxListeners = this._maxListeners || void 0);
        }),
        (o.prototype.setMaxListeners = function (b) {
          if (typeof b != "number" || b < 0 || i(b))
            throw new RangeError(
              'The value of "n" is out of range. It must be a non-negative number. Received ' +
                b +
                "."
            );
          return (this._maxListeners = b), this;
        }),
        (o.prototype.getMaxListeners = function () {
          return c(this);
        }),
        (o.prototype.emit = function (b) {
          for (var w = [], k = 1; k < arguments.length; k++)
            w.push(arguments[k]);
          var D = b === "error",
            $ = this._events;
          if ($ !== void 0) D = D && $.error === void 0;
          else if (!D) return !1;
          if (D) {
            var N;
            if ((w.length > 0 && (N = w[0]), N instanceof Error)) throw N;
            var P = new Error(
              "Unhandled error." + (N ? " (" + N.message + ")" : "")
            );
            throw ((P.context = N), P);
          }
          var I = $[b];
          if (I === void 0) return !1;
          if (typeof I == "function") r(I, this, w);
          else {
            var O = I.length,
              X = y(I, O);
            for (k = 0; k < O; ++k) r(X[k], this, w);
          }
          return !0;
        }),
        (o.prototype.addListener = function (b, w) {
          return d(this, b, w, !1);
        }),
        (o.prototype.on = o.prototype.addListener),
        (o.prototype.prependListener = function (b, w) {
          return d(this, b, w, !0);
        }),
        (o.prototype.once = function (b, w) {
          return u(w), this.on(b, f(this, b, w)), this;
        }),
        (o.prototype.prependOnceListener = function (b, w) {
          return u(w), this.prependListener(b, f(this, b, w)), this;
        }),
        (o.prototype.removeListener = function (b, w) {
          var k, D, $, N, P;
          if ((u(w), (D = this._events) === void 0)) return this;
          if ((k = D[b]) === void 0) return this;
          if (k === w || k.listener === w)
            --this._eventsCount == 0
              ? (this._events = Object.create(null))
              : (delete D[b],
                D.removeListener &&
                  this.emit("removeListener", b, k.listener || w));
          else if (typeof k != "function") {
            for ($ = -1, N = k.length - 1; N >= 0; N--)
              if (k[N] === w || k[N].listener === w) {
                (P = k[N].listener), ($ = N);
                break;
              }
            if ($ < 0) return this;
            $ === 0
              ? k.shift()
              : (function (I, O) {
                  for (; O + 1 < I.length; O++) I[O] = I[O + 1];
                  I.pop();
                })(k, $),
              k.length === 1 && (D[b] = k[0]),
              D.removeListener !== void 0 &&
                this.emit("removeListener", b, P || w);
          }
          return this;
        }),
        (o.prototype.off = o.prototype.removeListener),
        (o.prototype.removeAllListeners = function (b) {
          var w, k, D;
          if ((k = this._events) === void 0) return this;
          if (k.removeListener === void 0)
            return (
              arguments.length === 0
                ? ((this._events = Object.create(null)),
                  (this._eventsCount = 0))
                : k[b] !== void 0 &&
                  (--this._eventsCount == 0
                    ? (this._events = Object.create(null))
                    : delete k[b]),
              this
            );
          if (arguments.length === 0) {
            var $,
              N = Object.keys(k);
            for (D = 0; D < N.length; ++D)
              ($ = N[D]) !== "removeListener" && this.removeAllListeners($);
            return (
              this.removeAllListeners("removeListener"),
              (this._events = Object.create(null)),
              (this._eventsCount = 0),
              this
            );
          }
          if (typeof (w = k[b]) == "function") this.removeListener(b, w);
          else if (w !== void 0)
            for (D = w.length - 1; D >= 0; D--) this.removeListener(b, w[D]);
          return this;
        }),
        (o.prototype.listeners = function (b) {
          return p(this, b, !0);
        }),
        (o.prototype.rawListeners = function (b) {
          return p(this, b, !1);
        }),
        (o.listenerCount = function (b, w) {
          return typeof b.listenerCount == "function"
            ? b.listenerCount(w)
            : g.call(b, w);
        }),
        (o.prototype.listenerCount = g),
        (o.prototype.eventNames = function () {
          return this._eventsCount > 0 ? e(this._events) : [];
        });
    },
    7316: function (t) {
      t.exports = function e(n, r) {
        if (n === r) return !0;
        if (n && r && typeof n == "object" && typeof r == "object") {
          if (n.constructor !== r.constructor) return !1;
          var i, o, l;
          if (Array.isArray(n)) {
            if ((i = n.length) != r.length) return !1;
            for (o = i; o-- != 0; ) if (!e(n[o], r[o])) return !1;
            return !0;
          }
          if (n.constructor === RegExp)
            return n.source === r.source && n.flags === r.flags;
          if (n.valueOf !== Object.prototype.valueOf)
            return n.valueOf() === r.valueOf();
          if (n.toString !== Object.prototype.toString)
            return n.toString() === r.toString();
          if ((i = (l = Object.keys(n)).length) !== Object.keys(r).length)
            return !1;
          for (o = i; o-- != 0; )
            if (!Object.prototype.hasOwnProperty.call(r, l[o])) return !1;
          for (o = i; o-- != 0; ) {
            var u = l[o];
            if (!e(n[u], r[u])) return !1;
          }
          return !0;
        }
        return n != n && r != r;
      };
    },
    7986: function (t, e) {
      (e.read = function (n, r, i, o, l) {
        var u,
          c,
          d = 8 * l - o - 1,
          h = (1 << d) - 1,
          f = h >> 1,
          p = -7,
          g = i ? l - 1 : 0,
          y = i ? -1 : 1,
          v = n[r + g];
        for (
          g += y, u = v & ((1 << -p) - 1), v >>= -p, p += d;
          p > 0;
          u = 256 * u + n[r + g], g += y, p -= 8
        );
        for (
          c = u & ((1 << -p) - 1), u >>= -p, p += o;
          p > 0;
          c = 256 * c + n[r + g], g += y, p -= 8
        );
        if (u === 0) u = 1 - f;
        else {
          if (u === h) return c ? NaN : (1 / 0) * (v ? -1 : 1);
          (c += Math.pow(2, o)), (u -= f);
        }
        return (v ? -1 : 1) * c * Math.pow(2, u - o);
      }),
        (e.write = function (n, r, i, o, l, u) {
          var c,
            d,
            h,
            f = 8 * u - l - 1,
            p = (1 << f) - 1,
            g = p >> 1,
            y = l === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
            v = o ? 0 : u - 1,
            b = o ? 1 : -1,
            w = r < 0 || (r === 0 && 1 / r < 0) ? 1 : 0;
          for (
            r = Math.abs(r),
              isNaN(r) || r === 1 / 0
                ? ((d = isNaN(r) ? 1 : 0), (c = p))
                : ((c = Math.floor(Math.log(r) / Math.LN2)),
                  r * (h = Math.pow(2, -c)) < 1 && (c--, (h *= 2)),
                  (r += c + g >= 1 ? y / h : y * Math.pow(2, 1 - g)) * h >= 2 &&
                    (c++, (h /= 2)),
                  c + g >= p
                    ? ((d = 0), (c = p))
                    : c + g >= 1
                    ? ((d = (r * h - 1) * Math.pow(2, l)), (c += g))
                    : ((d = r * Math.pow(2, g - 1) * Math.pow(2, l)), (c = 0)));
            l >= 8;
            n[i + v] = 255 & d, v += b, d /= 256, l -= 8
          );
          for (
            c = (c << l) | d, f += l;
            f > 0;
            n[i + v] = 255 & c, v += b, c /= 256, f -= 8
          );
          n[i + v - b] |= 128 * w;
        });
    },
    5474: function (t, e, n) {
      (function (r) {
        (r.parser = function (Z, ie) {
          return new l(Z, ie);
        }),
          (r.SAXParser = l),
          (r.SAXStream = c),
          (r.createStream = function (Z, ie) {
            return new c(Z, ie);
          }),
          (r.MAX_BUFFER_LENGTH = 65536);
        var i,
          o = [
            "comment",
            "sgmlDecl",
            "textNode",
            "tagName",
            "doctype",
            "procInstName",
            "procInstBody",
            "entity",
            "attribName",
            "attribValue",
            "cdata",
            "script",
          ];
        function l(Z, ie) {
          if (!(this instanceof l)) return new l(Z, ie);
          var Ne = this;
          (function (Pe) {
            for (var kt = 0, Gt = o.length; kt < Gt; kt++) Pe[o[kt]] = "";
          })(Ne),
            (Ne.q = Ne.c = ""),
            (Ne.bufferCheckPosition = r.MAX_BUFFER_LENGTH),
            (Ne.opt = ie || {}),
            (Ne.opt.lowercase = Ne.opt.lowercase || Ne.opt.lowercasetags),
            (Ne.looseCase = Ne.opt.lowercase ? "toLowerCase" : "toUpperCase"),
            (Ne.tags = []),
            (Ne.closed = Ne.closedRoot = Ne.sawRoot = !1),
            (Ne.tag = Ne.error = null),
            (Ne.strict = !!Z),
            (Ne.noscript = !(!Z && !Ne.opt.noscript)),
            (Ne.state = S.BEGIN),
            (Ne.strictEntities = Ne.opt.strictEntities),
            (Ne.ENTITIES = Ne.strictEntities
              ? Object.create(r.XML_ENTITIES)
              : Object.create(r.ENTITIES)),
            (Ne.attribList = []),
            Ne.opt.xmlns && (Ne.ns = Object.create(k)),
            (Ne.trackPosition = Ne.opt.position !== !1),
            Ne.trackPosition && (Ne.position = Ne.line = Ne.column = 0),
            W(Ne, "onready");
        }
        (r.EVENTS = [
          "text",
          "processinginstruction",
          "sgmldeclaration",
          "doctype",
          "comment",
          "opentagstart",
          "attribute",
          "opentag",
          "closetag",
          "opencdata",
          "cdata",
          "closecdata",
          "error",
          "end",
          "ready",
          "script",
          "opennamespace",
          "closenamespace",
        ]),
          Object.create ||
            (Object.create = function (Z) {
              function ie() {}
              return (ie.prototype = Z), new ie();
            }),
          Object.keys ||
            (Object.keys = function (Z) {
              var ie = [];
              for (var Ne in Z) Z.hasOwnProperty(Ne) && ie.push(Ne);
              return ie;
            }),
          (l.prototype = {
            end: function () {
              ze(this);
            },
            write: function (Z) {
              var ie = this;
              if (this.error) throw this.error;
              if (ie.closed)
                return Xe(
                  ie,
                  "Cannot write after close. Assign an onready handler."
                );
              if (Z === null) return ze(ie);
              typeof Z == "object" && (Z = Z.toString());
              for (var Ne = 0, Pe = ""; (Pe = ue(Z, Ne++)), (ie.c = Pe), Pe; )
                switch (
                  (ie.trackPosition &&
                    (ie.position++,
                    Pe ===
                    `
`
                      ? (ie.line++, (ie.column = 0))
                      : ie.column++),
                  ie.state)
                ) {
                  case S.BEGIN:
                    if (((ie.state = S.BEGIN_WHITESPACE), Pe === "\uFEFF"))
                      continue;
                    de(ie, Pe);
                    continue;
                  case S.BEGIN_WHITESPACE:
                    de(ie, Pe);
                    continue;
                  case S.TEXT:
                    if (ie.sawRoot && !ie.closedRoot) {
                      for (var kt = Ne - 1; Pe && Pe !== "<" && Pe !== "&"; )
                        (Pe = ue(Z, Ne++)) &&
                          ie.trackPosition &&
                          (ie.position++,
                          Pe ===
                          `
`
                            ? (ie.line++, (ie.column = 0))
                            : ie.column++);
                      ie.textNode += Z.substring(kt, Ne - 1);
                    }
                    Pe !== "<" || (ie.sawRoot && ie.closedRoot && !ie.strict)
                      ? (!X(d, Pe) ||
                          (ie.sawRoot && !ie.closedRoot) ||
                          ht(ie, "Text data outside of root node."),
                        Pe === "&"
                          ? (ie.state = S.TEXT_ENTITY)
                          : (ie.textNode += Pe))
                      : ((ie.state = S.OPEN_WAKA),
                        (ie.startTagPosition = ie.position));
                    continue;
                  case S.SCRIPT:
                    Pe === "<"
                      ? (ie.state = S.SCRIPT_ENDING)
                      : (ie.script += Pe);
                    continue;
                  case S.SCRIPT_ENDING:
                    Pe === "/"
                      ? (ie.state = S.CLOSE_TAG)
                      : ((ie.script += "<" + Pe), (ie.state = S.SCRIPT));
                    continue;
                  case S.OPEN_WAKA:
                    if (Pe === "!")
                      (ie.state = S.SGML_DECL), (ie.sgmlDecl = "");
                    else if (!O(d, Pe))
                      if (O(D, Pe)) (ie.state = S.OPEN_TAG), (ie.tagName = Pe);
                      else if (Pe === "/")
                        (ie.state = S.CLOSE_TAG), (ie.tagName = "");
                      else if (Pe === "?")
                        (ie.state = S.PROC_INST),
                          (ie.procInstName = ie.procInstBody = "");
                      else {
                        if (
                          (ht(ie, "Unencoded <"),
                          ie.startTagPosition + 1 < ie.position)
                        ) {
                          var Gt = ie.position - ie.startTagPosition;
                          Pe = new Array(Gt).join(" ") + Pe;
                        }
                        (ie.textNode += "<" + Pe), (ie.state = S.TEXT);
                      }
                    continue;
                  case S.SGML_DECL:
                    (ie.sgmlDecl + Pe).toUpperCase() === y
                      ? (F(ie, "onopencdata"),
                        (ie.state = S.CDATA),
                        (ie.sgmlDecl = ""),
                        (ie.cdata = ""))
                      : ie.sgmlDecl + Pe === "--"
                      ? ((ie.state = S.COMMENT),
                        (ie.comment = ""),
                        (ie.sgmlDecl = ""))
                      : (ie.sgmlDecl + Pe).toUpperCase() === v
                      ? ((ie.state = S.DOCTYPE),
                        (ie.doctype || ie.sawRoot) &&
                          ht(ie, "Inappropriately located doctype declaration"),
                        (ie.doctype = ""),
                        (ie.sgmlDecl = ""))
                      : Pe === ">"
                      ? (F(ie, "onsgmldeclaration", ie.sgmlDecl),
                        (ie.sgmlDecl = ""),
                        (ie.state = S.TEXT))
                      : (O(p, Pe) && (ie.state = S.SGML_DECL_QUOTED),
                        (ie.sgmlDecl += Pe));
                    continue;
                  case S.SGML_DECL_QUOTED:
                    Pe === ie.q && ((ie.state = S.SGML_DECL), (ie.q = "")),
                      (ie.sgmlDecl += Pe);
                    continue;
                  case S.DOCTYPE:
                    Pe === ">"
                      ? ((ie.state = S.TEXT),
                        F(ie, "ondoctype", ie.doctype),
                        (ie.doctype = !0))
                      : ((ie.doctype += Pe),
                        Pe === "["
                          ? (ie.state = S.DOCTYPE_DTD)
                          : O(p, Pe) &&
                            ((ie.state = S.DOCTYPE_QUOTED), (ie.q = Pe)));
                    continue;
                  case S.DOCTYPE_QUOTED:
                    (ie.doctype += Pe),
                      Pe === ie.q && ((ie.q = ""), (ie.state = S.DOCTYPE));
                    continue;
                  case S.DOCTYPE_DTD:
                    (ie.doctype += Pe),
                      Pe === "]"
                        ? (ie.state = S.DOCTYPE)
                        : O(p, Pe) &&
                          ((ie.state = S.DOCTYPE_DTD_QUOTED), (ie.q = Pe));
                    continue;
                  case S.DOCTYPE_DTD_QUOTED:
                    (ie.doctype += Pe),
                      Pe === ie.q && ((ie.state = S.DOCTYPE_DTD), (ie.q = ""));
                    continue;
                  case S.COMMENT:
                    Pe === "-"
                      ? (ie.state = S.COMMENT_ENDING)
                      : (ie.comment += Pe);
                    continue;
                  case S.COMMENT_ENDING:
                    Pe === "-"
                      ? ((ie.state = S.COMMENT_ENDED),
                        (ie.comment = De(ie.opt, ie.comment)),
                        ie.comment && F(ie, "oncomment", ie.comment),
                        (ie.comment = ""))
                      : ((ie.comment += "-" + Pe), (ie.state = S.COMMENT));
                    continue;
                  case S.COMMENT_ENDED:
                    Pe !== ">"
                      ? (ht(ie, "Malformed comment"),
                        (ie.comment += "--" + Pe),
                        (ie.state = S.COMMENT))
                      : (ie.state = S.TEXT);
                    continue;
                  case S.CDATA:
                    Pe === "]" ? (ie.state = S.CDATA_ENDING) : (ie.cdata += Pe);
                    continue;
                  case S.CDATA_ENDING:
                    Pe === "]"
                      ? (ie.state = S.CDATA_ENDING_2)
                      : ((ie.cdata += "]" + Pe), (ie.state = S.CDATA));
                    continue;
                  case S.CDATA_ENDING_2:
                    Pe === ">"
                      ? (ie.cdata && F(ie, "oncdata", ie.cdata),
                        F(ie, "onclosecdata"),
                        (ie.cdata = ""),
                        (ie.state = S.TEXT))
                      : Pe === "]"
                      ? (ie.cdata += "]")
                      : ((ie.cdata += "]]" + Pe), (ie.state = S.CDATA));
                    continue;
                  case S.PROC_INST:
                    Pe === "?"
                      ? (ie.state = S.PROC_INST_ENDING)
                      : O(d, Pe)
                      ? (ie.state = S.PROC_INST_BODY)
                      : (ie.procInstName += Pe);
                    continue;
                  case S.PROC_INST_BODY:
                    if (!ie.procInstBody && O(d, Pe)) continue;
                    Pe === "?"
                      ? (ie.state = S.PROC_INST_ENDING)
                      : (ie.procInstBody += Pe);
                    continue;
                  case S.PROC_INST_ENDING:
                    Pe === ">"
                      ? (F(ie, "onprocessinginstruction", {
                          name: ie.procInstName,
                          body: ie.procInstBody,
                        }),
                        (ie.procInstName = ie.procInstBody = ""),
                        (ie.state = S.TEXT))
                      : ((ie.procInstBody += "?" + Pe),
                        (ie.state = S.PROC_INST_BODY));
                    continue;
                  case S.OPEN_TAG:
                    O($, Pe)
                      ? (ie.tagName += Pe)
                      : (gt(ie),
                        Pe === ">"
                          ? ot(ie)
                          : Pe === "/"
                          ? (ie.state = S.OPEN_TAG_SLASH)
                          : (X(d, Pe) &&
                              ht(ie, "Invalid character in tag name"),
                            (ie.state = S.ATTRIB)));
                    continue;
                  case S.OPEN_TAG_SLASH:
                    Pe === ">"
                      ? (ot(ie, !0), tt(ie))
                      : (ht(
                          ie,
                          "Forward-slash in opening tag not followed by >"
                        ),
                        (ie.state = S.ATTRIB));
                    continue;
                  case S.ATTRIB:
                    if (O(d, Pe)) continue;
                    Pe === ">"
                      ? ot(ie)
                      : Pe === "/"
                      ? (ie.state = S.OPEN_TAG_SLASH)
                      : O(D, Pe)
                      ? ((ie.attribName = Pe),
                        (ie.attribValue = ""),
                        (ie.state = S.ATTRIB_NAME))
                      : ht(ie, "Invalid attribute name");
                    continue;
                  case S.ATTRIB_NAME:
                    Pe === "="
                      ? (ie.state = S.ATTRIB_VALUE)
                      : Pe === ">"
                      ? (ht(ie, "Attribute without value"),
                        (ie.attribValue = ie.attribName),
                        $t(ie),
                        ot(ie))
                      : O(d, Pe)
                      ? (ie.state = S.ATTRIB_NAME_SAW_WHITE)
                      : O($, Pe)
                      ? (ie.attribName += Pe)
                      : ht(ie, "Invalid attribute name");
                    continue;
                  case S.ATTRIB_NAME_SAW_WHITE:
                    if (Pe === "=") ie.state = S.ATTRIB_VALUE;
                    else {
                      if (O(d, Pe)) continue;
                      ht(ie, "Attribute without value"),
                        (ie.tag.attributes[ie.attribName] = ""),
                        (ie.attribValue = ""),
                        F(ie, "onattribute", {
                          name: ie.attribName,
                          value: "",
                        }),
                        (ie.attribName = ""),
                        Pe === ">"
                          ? ot(ie)
                          : O(D, Pe)
                          ? ((ie.attribName = Pe), (ie.state = S.ATTRIB_NAME))
                          : (ht(ie, "Invalid attribute name"),
                            (ie.state = S.ATTRIB));
                    }
                    continue;
                  case S.ATTRIB_VALUE:
                    if (O(d, Pe)) continue;
                    O(p, Pe)
                      ? ((ie.q = Pe), (ie.state = S.ATTRIB_VALUE_QUOTED))
                      : (ht(ie, "Unquoted attribute value"),
                        (ie.state = S.ATTRIB_VALUE_UNQUOTED),
                        (ie.attribValue = Pe));
                    continue;
                  case S.ATTRIB_VALUE_QUOTED:
                    if (Pe !== ie.q) {
                      Pe === "&"
                        ? (ie.state = S.ATTRIB_VALUE_ENTITY_Q)
                        : (ie.attribValue += Pe);
                      continue;
                    }
                    $t(ie), (ie.q = ""), (ie.state = S.ATTRIB_VALUE_CLOSED);
                    continue;
                  case S.ATTRIB_VALUE_CLOSED:
                    O(d, Pe)
                      ? (ie.state = S.ATTRIB)
                      : Pe === ">"
                      ? ot(ie)
                      : Pe === "/"
                      ? (ie.state = S.OPEN_TAG_SLASH)
                      : O(D, Pe)
                      ? (ht(ie, "No whitespace between attributes"),
                        (ie.attribName = Pe),
                        (ie.attribValue = ""),
                        (ie.state = S.ATTRIB_NAME))
                      : ht(ie, "Invalid attribute name");
                    continue;
                  case S.ATTRIB_VALUE_UNQUOTED:
                    if (X(g, Pe)) {
                      Pe === "&"
                        ? (ie.state = S.ATTRIB_VALUE_ENTITY_U)
                        : (ie.attribValue += Pe);
                      continue;
                    }
                    $t(ie), Pe === ">" ? ot(ie) : (ie.state = S.ATTRIB);
                    continue;
                  case S.CLOSE_TAG:
                    if (ie.tagName)
                      Pe === ">"
                        ? tt(ie)
                        : O($, Pe)
                        ? (ie.tagName += Pe)
                        : ie.script
                        ? ((ie.script += "</" + ie.tagName),
                          (ie.tagName = ""),
                          (ie.state = S.SCRIPT))
                        : (X(d, Pe) && ht(ie, "Invalid tagname in closing tag"),
                          (ie.state = S.CLOSE_TAG_SAW_WHITE));
                    else {
                      if (O(d, Pe)) continue;
                      X(D, Pe)
                        ? ie.script
                          ? ((ie.script += "</" + Pe), (ie.state = S.SCRIPT))
                          : ht(ie, "Invalid tagname in closing tag.")
                        : (ie.tagName = Pe);
                    }
                    continue;
                  case S.CLOSE_TAG_SAW_WHITE:
                    if (O(d, Pe)) continue;
                    Pe === ">"
                      ? tt(ie)
                      : ht(ie, "Invalid characters in closing tag");
                    continue;
                  case S.TEXT_ENTITY:
                  case S.ATTRIB_VALUE_ENTITY_Q:
                  case S.ATTRIB_VALUE_ENTITY_U:
                    var B, re;
                    switch (ie.state) {
                      case S.TEXT_ENTITY:
                        (B = S.TEXT), (re = "textNode");
                        break;
                      case S.ATTRIB_VALUE_ENTITY_Q:
                        (B = S.ATTRIB_VALUE_QUOTED), (re = "attribValue");
                        break;
                      case S.ATTRIB_VALUE_ENTITY_U:
                        (B = S.ATTRIB_VALUE_UNQUOTED), (re = "attribValue");
                    }
                    Pe === ";"
                      ? ((ie[re] += He(ie)), (ie.entity = ""), (ie.state = B))
                      : O(ie.entity.length ? P : N, Pe)
                      ? (ie.entity += Pe)
                      : (ht(ie, "Invalid character in entity name"),
                        (ie[re] += "&" + ie.entity + Pe),
                        (ie.entity = ""),
                        (ie.state = B));
                    continue;
                  default:
                    throw new Error(ie, "Unknown state: " + ie.state);
                }
              return (
                ie.position >= ie.bufferCheckPosition &&
                  (function (Ae) {
                    for (
                      var lt = Math.max(r.MAX_BUFFER_LENGTH, 10),
                        Et = 0,
                        St = 0,
                        Lt = o.length;
                      St < Lt;
                      St++
                    ) {
                      var ln = Ae[o[St]].length;
                      if (ln > lt)
                        switch (o[St]) {
                          case "textNode":
                            oe(Ae);
                            break;
                          case "cdata":
                            F(Ae, "oncdata", Ae.cdata), (Ae.cdata = "");
                            break;
                          case "script":
                            F(Ae, "onscript", Ae.script), (Ae.script = "");
                            break;
                          default:
                            Xe(Ae, "Max buffer length exceeded: " + o[St]);
                        }
                      Et = Math.max(Et, ln);
                    }
                    var Ln = r.MAX_BUFFER_LENGTH - Et;
                    Ae.bufferCheckPosition = Ln + Ae.position;
                  })(ie),
                ie
              );
            },
            resume: function () {
              return (this.error = null), this;
            },
            close: function () {
              return this.write(null);
            },
            flush: function () {
              var Z;
              oe((Z = this)),
                Z.cdata !== "" && (F(Z, "oncdata", Z.cdata), (Z.cdata = "")),
                Z.script !== "" &&
                  (F(Z, "onscript", Z.script), (Z.script = ""));
            },
          });
        try {
          i = n(3515).Stream;
        } catch {
          i = function () {};
        }
        var u = r.EVENTS.filter(function (Z) {
          return Z !== "error" && Z !== "end";
        });
        function c(Z, ie) {
          if (!(this instanceof c)) return new c(Z, ie);
          i.apply(this),
            (this._parser = new l(Z, ie)),
            (this.writable = !0),
            (this.readable = !0);
          var Ne = this;
          (this._parser.onend = function () {
            Ne.emit("end");
          }),
            (this._parser.onerror = function (Pe) {
              Ne.emit("error", Pe), (Ne._parser.error = null);
            }),
            (this._decoder = null),
            u.forEach(function (Pe) {
              Object.defineProperty(Ne, "on" + Pe, {
                get: function () {
                  return Ne._parser["on" + Pe];
                },
                set: function (kt) {
                  if (!kt)
                    return (
                      Ne.removeAllListeners(Pe),
                      (Ne._parser["on" + Pe] = kt),
                      kt
                    );
                  Ne.on(Pe, kt);
                },
                enumerable: !0,
                configurable: !1,
              });
            });
        }
        (c.prototype = Object.create(i.prototype, {
          constructor: { value: c },
        })),
          (c.prototype.write = function (Z) {
            if (
              typeof Buffer == "function" &&
              typeof Buffer.isBuffer == "function" &&
              Buffer.isBuffer(Z)
            ) {
              if (!this._decoder) {
                var ie = n(748).StringDecoder;
                this._decoder = new ie("utf8");
              }
              Z = this._decoder.write(Z);
            }
            return this._parser.write(Z.toString()), this.emit("data", Z), !0;
          }),
          (c.prototype.end = function (Z) {
            return Z && Z.length && this.write(Z), this._parser.end(), !0;
          }),
          (c.prototype.on = function (Z, ie) {
            var Ne = this;
            return (
              Ne._parser["on" + Z] ||
                u.indexOf(Z) === -1 ||
                (Ne._parser["on" + Z] = function () {
                  var Pe =
                    arguments.length === 1
                      ? [arguments[0]]
                      : Array.apply(null, arguments);
                  Pe.splice(0, 0, Z), Ne.emit.apply(Ne, Pe);
                }),
              i.prototype.on.call(Ne, Z, ie)
            );
          });
        var d = `\r
	 `,
          h = "0124356789",
          f = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
          p = `'"`,
          g = d + ">",
          y = "[CDATA[",
          v = "DOCTYPE",
          b = "http://www.w3.org/XML/1998/namespace",
          w = "http://www.w3.org/2000/xmlns/",
          k = { xml: b, xmlns: w };
        (d = I(d)), (h = I(h)), (f = I(f));
        var D =
            /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,
          $ =
            /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/,
          N =
            /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,
          P =
            /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/;
        function I(Z) {
          return Z.split("").reduce(function (ie, Ne) {
            return (ie[Ne] = !0), ie;
          }, {});
        }
        function O(Z, ie) {
          return (
            (Ne = Z),
            Object.prototype.toString.call(Ne) === "[object RegExp]"
              ? !!ie.match(Z)
              : Z[ie]
          );
          var Ne;
        }
        function X(Z, ie) {
          return !O(Z, ie);
        }
        (p = I(p)), (g = I(g));
        var G,
          H,
          E,
          S = 0;
        for (var L in ((r.STATE = {
          BEGIN: S++,
          BEGIN_WHITESPACE: S++,
          TEXT: S++,
          TEXT_ENTITY: S++,
          OPEN_WAKA: S++,
          SGML_DECL: S++,
          SGML_DECL_QUOTED: S++,
          DOCTYPE: S++,
          DOCTYPE_QUOTED: S++,
          DOCTYPE_DTD: S++,
          DOCTYPE_DTD_QUOTED: S++,
          COMMENT_STARTING: S++,
          COMMENT: S++,
          COMMENT_ENDING: S++,
          COMMENT_ENDED: S++,
          CDATA: S++,
          CDATA_ENDING: S++,
          CDATA_ENDING_2: S++,
          PROC_INST: S++,
          PROC_INST_BODY: S++,
          PROC_INST_ENDING: S++,
          OPEN_TAG: S++,
          OPEN_TAG_SLASH: S++,
          ATTRIB: S++,
          ATTRIB_NAME: S++,
          ATTRIB_NAME_SAW_WHITE: S++,
          ATTRIB_VALUE: S++,
          ATTRIB_VALUE_QUOTED: S++,
          ATTRIB_VALUE_CLOSED: S++,
          ATTRIB_VALUE_UNQUOTED: S++,
          ATTRIB_VALUE_ENTITY_Q: S++,
          ATTRIB_VALUE_ENTITY_U: S++,
          CLOSE_TAG: S++,
          CLOSE_TAG_SAW_WHITE: S++,
          SCRIPT: S++,
          SCRIPT_ENDING: S++,
        }),
        (r.XML_ENTITIES = { amp: "&", gt: ">", lt: "<", quot: '"', apos: "'" }),
        (r.ENTITIES = {
          amp: "&",
          gt: ">",
          lt: "<",
          quot: '"',
          apos: "'",
          AElig: 198,
          Aacute: 193,
          Acirc: 194,
          Agrave: 192,
          Aring: 197,
          Atilde: 195,
          Auml: 196,
          Ccedil: 199,
          ETH: 208,
          Eacute: 201,
          Ecirc: 202,
          Egrave: 200,
          Euml: 203,
          Iacute: 205,
          Icirc: 206,
          Igrave: 204,
          Iuml: 207,
          Ntilde: 209,
          Oacute: 211,
          Ocirc: 212,
          Ograve: 210,
          Oslash: 216,
          Otilde: 213,
          Ouml: 214,
          THORN: 222,
          Uacute: 218,
          Ucirc: 219,
          Ugrave: 217,
          Uuml: 220,
          Yacute: 221,
          aacute: 225,
          acirc: 226,
          aelig: 230,
          agrave: 224,
          aring: 229,
          atilde: 227,
          auml: 228,
          ccedil: 231,
          eacute: 233,
          ecirc: 234,
          egrave: 232,
          eth: 240,
          euml: 235,
          iacute: 237,
          icirc: 238,
          igrave: 236,
          iuml: 239,
          ntilde: 241,
          oacute: 243,
          ocirc: 244,
          ograve: 242,
          oslash: 248,
          otilde: 245,
          ouml: 246,
          szlig: 223,
          thorn: 254,
          uacute: 250,
          ucirc: 251,
          ugrave: 249,
          uuml: 252,
          yacute: 253,
          yuml: 255,
          copy: 169,
          reg: 174,
          nbsp: 160,
          iexcl: 161,
          cent: 162,
          pound: 163,
          curren: 164,
          yen: 165,
          brvbar: 166,
          sect: 167,
          uml: 168,
          ordf: 170,
          laquo: 171,
          not: 172,
          shy: 173,
          macr: 175,
          deg: 176,
          plusmn: 177,
          sup1: 185,
          sup2: 178,
          sup3: 179,
          acute: 180,
          micro: 181,
          para: 182,
          middot: 183,
          cedil: 184,
          ordm: 186,
          raquo: 187,
          frac14: 188,
          frac12: 189,
          frac34: 190,
          iquest: 191,
          times: 215,
          divide: 247,
          OElig: 338,
          oelig: 339,
          Scaron: 352,
          scaron: 353,
          Yuml: 376,
          fnof: 402,
          circ: 710,
          tilde: 732,
          Alpha: 913,
          Beta: 914,
          Gamma: 915,
          Delta: 916,
          Epsilon: 917,
          Zeta: 918,
          Eta: 919,
          Theta: 920,
          Iota: 921,
          Kappa: 922,
          Lambda: 923,
          Mu: 924,
          Nu: 925,
          Xi: 926,
          Omicron: 927,
          Pi: 928,
          Rho: 929,
          Sigma: 931,
          Tau: 932,
          Upsilon: 933,
          Phi: 934,
          Chi: 935,
          Psi: 936,
          Omega: 937,
          alpha: 945,
          beta: 946,
          gamma: 947,
          delta: 948,
          epsilon: 949,
          zeta: 950,
          eta: 951,
          theta: 952,
          iota: 953,
          kappa: 954,
          lambda: 955,
          mu: 956,
          nu: 957,
          xi: 958,
          omicron: 959,
          pi: 960,
          rho: 961,
          sigmaf: 962,
          sigma: 963,
          tau: 964,
          upsilon: 965,
          phi: 966,
          chi: 967,
          psi: 968,
          omega: 969,
          thetasym: 977,
          upsih: 978,
          piv: 982,
          ensp: 8194,
          emsp: 8195,
          thinsp: 8201,
          zwnj: 8204,
          zwj: 8205,
          lrm: 8206,
          rlm: 8207,
          ndash: 8211,
          mdash: 8212,
          lsquo: 8216,
          rsquo: 8217,
          sbquo: 8218,
          ldquo: 8220,
          rdquo: 8221,
          bdquo: 8222,
          dagger: 8224,
          Dagger: 8225,
          bull: 8226,
          hellip: 8230,
          permil: 8240,
          prime: 8242,
          Prime: 8243,
          lsaquo: 8249,
          rsaquo: 8250,
          oline: 8254,
          frasl: 8260,
          euro: 8364,
          image: 8465,
          weierp: 8472,
          real: 8476,
          trade: 8482,
          alefsym: 8501,
          larr: 8592,
          uarr: 8593,
          rarr: 8594,
          darr: 8595,
          harr: 8596,
          crarr: 8629,
          lArr: 8656,
          uArr: 8657,
          rArr: 8658,
          dArr: 8659,
          hArr: 8660,
          forall: 8704,
          part: 8706,
          exist: 8707,
          empty: 8709,
          nabla: 8711,
          isin: 8712,
          notin: 8713,
          ni: 8715,
          prod: 8719,
          sum: 8721,
          minus: 8722,
          lowast: 8727,
          radic: 8730,
          prop: 8733,
          infin: 8734,
          ang: 8736,
          and: 8743,
          or: 8744,
          cap: 8745,
          cup: 8746,
          int: 8747,
          there4: 8756,
          sim: 8764,
          cong: 8773,
          asymp: 8776,
          ne: 8800,
          equiv: 8801,
          le: 8804,
          ge: 8805,
          sub: 8834,
          sup: 8835,
          nsub: 8836,
          sube: 8838,
          supe: 8839,
          oplus: 8853,
          otimes: 8855,
          perp: 8869,
          sdot: 8901,
          lceil: 8968,
          rceil: 8969,
          lfloor: 8970,
          rfloor: 8971,
          lang: 9001,
          rang: 9002,
          loz: 9674,
          spades: 9824,
          clubs: 9827,
          hearts: 9829,
          diams: 9830,
        }),
        Object.keys(r.ENTITIES).forEach(function (Z) {
          var ie = r.ENTITIES[Z],
            Ne = typeof ie == "number" ? String.fromCharCode(ie) : ie;
          r.ENTITIES[Z] = Ne;
        }),
        r.STATE))
          r.STATE[r.STATE[L]] = L;
        function W(Z, ie, Ne) {
          Z[ie] && Z[ie](Ne);
        }
        function F(Z, ie, Ne) {
          Z.textNode && oe(Z), W(Z, ie, Ne);
        }
        function oe(Z) {
          (Z.textNode = De(Z.opt, Z.textNode)),
            Z.textNode && W(Z, "ontext", Z.textNode),
            (Z.textNode = "");
        }
        function De(Z, ie) {
          return (
            Z.trim && (ie = ie.trim()),
            Z.normalize && (ie = ie.replace(/\s+/g, " ")),
            ie
          );
        }
        function Xe(Z, ie) {
          return (
            oe(Z),
            Z.trackPosition &&
              (ie +=
                `
Line: ` +
                Z.line +
                `
Column: ` +
                Z.column +
                `
Char: ` +
                Z.c),
            (ie = new Error(ie)),
            (Z.error = ie),
            W(Z, "onerror", ie),
            Z
          );
        }
        function ze(Z) {
          return (
            Z.sawRoot && !Z.closedRoot && ht(Z, "Unclosed root tag"),
            Z.state !== S.BEGIN &&
              Z.state !== S.BEGIN_WHITESPACE &&
              Z.state !== S.TEXT &&
              Xe(Z, "Unexpected end"),
            oe(Z),
            (Z.c = ""),
            (Z.closed = !0),
            W(Z, "onend"),
            l.call(Z, Z.strict, Z.opt),
            Z
          );
        }
        function ht(Z, ie) {
          if (typeof Z != "object" || !(Z instanceof l))
            throw new Error("bad call to strictFail");
          Z.strict && Xe(Z, ie);
        }
        function gt(Z) {
          Z.strict || (Z.tagName = Z.tagName[Z.looseCase]());
          var ie = Z.tags[Z.tags.length - 1] || Z,
            Ne = (Z.tag = { name: Z.tagName, attributes: {} });
          Z.opt.xmlns && (Ne.ns = ie.ns),
            (Z.attribList.length = 0),
            F(Z, "onopentagstart", Ne);
        }
        function pt(Z, ie) {
          var Ne = Z.indexOf(":") < 0 ? ["", Z] : Z.split(":"),
            Pe = Ne[0],
            kt = Ne[1];
          return (
            ie && Z === "xmlns" && ((Pe = "xmlns"), (kt = "")),
            { prefix: Pe, local: kt }
          );
        }
        function $t(Z) {
          if (
            (Z.strict || (Z.attribName = Z.attribName[Z.looseCase]()),
            Z.attribList.indexOf(Z.attribName) !== -1 ||
              Z.tag.attributes.hasOwnProperty(Z.attribName))
          )
            Z.attribName = Z.attribValue = "";
          else {
            if (Z.opt.xmlns) {
              var ie = pt(Z.attribName, !0),
                Ne = ie.prefix,
                Pe = ie.local;
              if (Ne === "xmlns")
                if (Pe === "xml" && Z.attribValue !== b)
                  ht(
                    Z,
                    "xml: prefix must be bound to " +
                      b +
                      `
Actual: ` +
                      Z.attribValue
                  );
                else if (Pe === "xmlns" && Z.attribValue !== w)
                  ht(
                    Z,
                    "xmlns: prefix must be bound to " +
                      w +
                      `
Actual: ` +
                      Z.attribValue
                  );
                else {
                  var kt = Z.tag,
                    Gt = Z.tags[Z.tags.length - 1] || Z;
                  kt.ns === Gt.ns && (kt.ns = Object.create(Gt.ns)),
                    (kt.ns[Pe] = Z.attribValue);
                }
              Z.attribList.push([Z.attribName, Z.attribValue]);
            } else
              (Z.tag.attributes[Z.attribName] = Z.attribValue),
                F(Z, "onattribute", {
                  name: Z.attribName,
                  value: Z.attribValue,
                });
            Z.attribName = Z.attribValue = "";
          }
        }
        function ot(Z, ie) {
          if (Z.opt.xmlns) {
            var Ne = Z.tag,
              Pe = pt(Z.tagName);
            (Ne.prefix = Pe.prefix),
              (Ne.local = Pe.local),
              (Ne.uri = Ne.ns[Pe.prefix] || ""),
              Ne.prefix &&
                !Ne.uri &&
                (ht(
                  Z,
                  "Unbound namespace prefix: " + JSON.stringify(Z.tagName)
                ),
                (Ne.uri = Pe.prefix));
            var kt = Z.tags[Z.tags.length - 1] || Z;
            Ne.ns &&
              kt.ns !== Ne.ns &&
              Object.keys(Ne.ns).forEach(function (Tr) {
                F(Z, "onopennamespace", { prefix: Tr, uri: Ne.ns[Tr] });
              });
            for (var Gt = 0, B = Z.attribList.length; Gt < B; Gt++) {
              var re = Z.attribList[Gt],
                Ae = re[0],
                lt = re[1],
                Et = pt(Ae, !0),
                St = Et.prefix,
                Lt = Et.local,
                ln = St === "" ? "" : Ne.ns[St] || "",
                Ln = { name: Ae, value: lt, prefix: St, local: Lt, uri: ln };
              St &&
                St !== "xmlns" &&
                !ln &&
                (ht(Z, "Unbound namespace prefix: " + JSON.stringify(St)),
                (Ln.uri = St)),
                (Z.tag.attributes[Ae] = Ln),
                F(Z, "onattribute", Ln);
            }
            Z.attribList.length = 0;
          }
          (Z.tag.isSelfClosing = !!ie),
            (Z.sawRoot = !0),
            Z.tags.push(Z.tag),
            F(Z, "onopentag", Z.tag),
            ie ||
              (Z.noscript || Z.tagName.toLowerCase() !== "script"
                ? (Z.state = S.TEXT)
                : (Z.state = S.SCRIPT),
              (Z.tag = null),
              (Z.tagName = "")),
            (Z.attribName = Z.attribValue = ""),
            (Z.attribList.length = 0);
        }
        function tt(Z) {
          if (!Z.tagName)
            return (
              ht(Z, "Weird empty close tag."),
              (Z.textNode += "</>"),
              void (Z.state = S.TEXT)
            );
          if (Z.script) {
            if (Z.tagName !== "script")
              return (
                (Z.script += "</" + Z.tagName + ">"),
                (Z.tagName = ""),
                void (Z.state = S.SCRIPT)
              );
            F(Z, "onscript", Z.script), (Z.script = "");
          }
          var ie = Z.tags.length,
            Ne = Z.tagName;
          Z.strict || (Ne = Ne[Z.looseCase]());
          for (var Pe = Ne; ie-- && Z.tags[ie].name !== Pe; )
            ht(Z, "Unexpected close tag");
          if (ie < 0)
            return (
              ht(Z, "Unmatched closing tag: " + Z.tagName),
              (Z.textNode += "</" + Z.tagName + ">"),
              void (Z.state = S.TEXT)
            );
          Z.tagName = Ne;
          for (var kt = Z.tags.length; kt-- > ie; ) {
            var Gt = (Z.tag = Z.tags.pop());
            (Z.tagName = Z.tag.name), F(Z, "onclosetag", Z.tagName);
            var B = {};
            for (var re in Gt.ns) B[re] = Gt.ns[re];
            var Ae = Z.tags[Z.tags.length - 1] || Z;
            Z.opt.xmlns &&
              Gt.ns !== Ae.ns &&
              Object.keys(Gt.ns).forEach(function (lt) {
                var Et = Gt.ns[lt];
                F(Z, "onclosenamespace", { prefix: lt, uri: Et });
              });
          }
          ie === 0 && (Z.closedRoot = !0),
            (Z.tagName = Z.attribValue = Z.attribName = ""),
            (Z.attribList.length = 0),
            (Z.state = S.TEXT);
        }
        function He(Z) {
          var ie,
            Ne = Z.entity,
            Pe = Ne.toLowerCase(),
            kt = "";
          return Z.ENTITIES[Ne]
            ? Z.ENTITIES[Ne]
            : Z.ENTITIES[Pe]
            ? Z.ENTITIES[Pe]
            : ((Ne = Pe).charAt(0) === "#" &&
                (Ne.charAt(1) === "x"
                  ? ((Ne = Ne.slice(2)),
                    (kt = (ie = parseInt(Ne, 16)).toString(16)))
                  : ((Ne = Ne.slice(1)),
                    (kt = (ie = parseInt(Ne, 10)).toString(10)))),
              (Ne = Ne.replace(/^0+/, "")),
              kt.toLowerCase() !== Ne
                ? (ht(Z, "Invalid character entity"), "&" + Z.entity + ";")
                : String.fromCodePoint(ie));
        }
        function de(Z, ie) {
          ie === "<"
            ? ((Z.state = S.OPEN_WAKA), (Z.startTagPosition = Z.position))
            : X(d, ie) &&
              (ht(Z, "Non-whitespace before first tag."),
              (Z.textNode = ie),
              (Z.state = S.TEXT));
        }
        function ue(Z, ie) {
          var Ne = "";
          return ie < Z.length && (Ne = Z.charAt(ie)), Ne;
        }
        (S = r.STATE),
          String.fromCodePoint ||
            ((G = String.fromCharCode),
            (H = Math.floor),
            (E = function () {
              var Z,
                ie,
                Ne = [],
                Pe = -1,
                kt = arguments.length;
              if (!kt) return "";
              for (var Gt = ""; ++Pe < kt; ) {
                var B = Number(arguments[Pe]);
                if (!isFinite(B) || B < 0 || B > 1114111 || H(B) !== B)
                  throw RangeError("Invalid code point: " + B);
                B <= 65535
                  ? Ne.push(B)
                  : ((Z = 55296 + ((B -= 65536) >> 10)),
                    (ie = (B % 1024) + 56320),
                    Ne.push(Z, ie)),
                  (Pe + 1 === kt || Ne.length > 16384) &&
                    ((Gt += G.apply(null, Ne)), (Ne.length = 0));
              }
              return Gt;
            }),
            Object.defineProperty
              ? Object.defineProperty(String, "fromCodePoint", {
                  value: E,
                  configurable: !0,
                  writable: !0,
                })
              : (String.fromCodePoint = E));
      })(e);
    },
    6739: function (t, e, n) {
      (function (r, i, o, l, u) {
        function c(ue) {
          if ("contents" in ue)
            for (
              var Z =
                  ("styleAttrs" in ue)
                    ? ue.styleAttrs[l.byName.ruby.qname]
                    : null,
                ie =
                  ue.kind === "span" &&
                  (Z === "container" ||
                    Z === "textContainer" ||
                    Z === "baseContainer"),
                Ne = ue.contents.length - 1;
              Ne >= 0;
              Ne--
            )
              !ie ||
              ("styleAttrs" in ue.contents[Ne] &&
                l.byName.ruby.qname in ue.contents[Ne].styleAttrs)
                ? c(ue.contents[Ne])
                : delete ue.contents[Ne];
        }
        function d(ue, Z, ie, Ne) {
          var Pe = Ne && Ne.timeContainer === "seq",
            kt = 0;
          Ne && (kt = Pe && ie ? ie.end : Ne.begin),
            (Z.begin = Z.explicit_begin ? Z.explicit_begin + kt : kt);
          var Gt = Z.begin,
            B = null;
          if ("sets" in Z)
            for (var re = 0; re < Z.sets.length; re++)
              d(ue, Z.sets[re], B, Z),
                (Gt =
                  Z.timeContainer === "seq"
                    ? Z.sets[re].end
                    : Math.max(Gt, Z.sets[re].end)),
                (B = Z.sets[re]);
          if ("contents" in Z) {
            if ("contents" in Z)
              for (var Ae = 0; Ae < Z.contents.length; Ae++)
                d(ue, Z.contents[Ae], B, Z),
                  (Gt =
                    Z.timeContainer === "seq"
                      ? Z.contents[Ae].end
                      : Math.max(Gt, Z.contents[Ae].end)),
                  (B = Z.contents[Ae]);
          } else Gt = Pe ? Z.begin : Number.POSITIVE_INFINITY;
          Z.explicit_end !== null && Z.explicit_dur !== null
            ? (Z.end = Math.min(Z.begin + Z.explicit_dur, kt + Z.explicit_end))
            : Z.explicit_end === null && Z.explicit_dur !== null
            ? (Z.end = Z.begin + Z.explicit_dur)
            : Z.explicit_end !== null && Z.explicit_dur === null
            ? (Z.end = kt + Z.explicit_end)
            : (Z.end = Gt),
            delete Z.explicit_begin,
            delete Z.explicit_dur,
            delete Z.explicit_end,
            ue._registerEvent(Z);
        }
        function h(ue) {
          this.node = ue;
        }
        function f() {
          (this.events = []), (this.head = new p()), (this.body = null);
        }
        function p() {
          (this.styling = new g()), (this.layout = new b());
        }
        function g() {
          (this.styles = {}), (this.initials = {});
        }
        function y() {
          (this.id = null), (this.styleAttrs = null), (this.styleRefs = null);
        }
        function v() {
          this.styleAttrs = null;
        }
        function b() {
          this.regions = {};
        }
        function w(ue, Z) {
          k.call(this, "image"), (this.src = ue), (this.type = Z);
        }
        function k(ue) {
          this.kind = ue;
        }
        function D(ue) {
          this.id = ue;
        }
        function $(ue) {
          this.regionID = ue;
        }
        function N(ue) {
          this.styleAttrs = ue;
        }
        function P(ue) {
          this.sets = ue;
        }
        function I(ue) {
          this.contents = ue;
        }
        function O(ue, Z, ie) {
          (this.explicit_begin = ue),
            (this.explicit_end = Z),
            (this.explicit_dur = ie);
        }
        function X() {
          k.call(this, "body");
        }
        function G() {
          k.call(this, "div");
        }
        function H() {
          k.call(this, "p");
        }
        function E() {
          k.call(this, "span");
        }
        function S() {
          k.call(this, "span");
        }
        function L() {
          k.call(this, "br");
        }
        function W() {}
        function F() {}
        function oe(ue) {
          return (
            (ue &&
              "xml:id" in ue.attributes &&
              ue.attributes["xml:id"].value) ||
            null
          );
        }
        function De(ue) {
          return ue && "style" in ue.attributes
            ? ue.attributes.style.value.split(" ")
            : [];
        }
        function Xe(ue, Z) {
          var ie = {};
          if (ue !== null)
            for (var Ne in ue.attributes) {
              var Pe = ue.attributes[Ne].uri + " " + ue.attributes[Ne].local,
                kt = l.byQName[Pe];
              if (kt !== void 0) {
                var Gt = kt.parse(ue.attributes[Ne].value);
                Gt !== null
                  ? ((ie[Pe] = Gt),
                    kt === l.byName.zIndex &&
                      ot(
                        Z,
                        "zIndex attribute present but not used by IMSC1 since regions do not overlap"
                      ))
                  : tt(
                      Z,
                      "Cannot parse styling attribute " +
                        Pe +
                        " --> " +
                        ue.attributes[Ne].value
                    );
              }
            }
          return ie;
        }
        function ze(ue, Z, ie) {
          for (var Ne in ue.attributes)
            if (ue.attributes[Ne].uri === Z && ue.attributes[Ne].local === ie)
              return ue.attributes[Ne].value;
          return null;
        }
        function ht(ue, Z, ie) {
          var Ne,
            Pe = null;
          return (
            (Ne = /^(\d+(?:\.\d+)?)f$/.exec(ie)) !== null
              ? Z !== null && (Pe = parseFloat(Ne[1]) / Z)
              : (Ne = /^(\d+(?:\.\d+)?)t$/.exec(ie)) !== null
              ? ue !== null && (Pe = parseFloat(Ne[1]) / ue)
              : (Ne = /^(\d+(?:\.\d+)?)ms$/.exec(ie)) !== null
              ? (Pe = parseFloat(Ne[1]) / 1e3)
              : (Ne = /^(\d+(?:\.\d+)?)s$/.exec(ie)) !== null
              ? (Pe = parseFloat(Ne[1]))
              : (Ne = /^(\d+(?:\.\d+)?)h$/.exec(ie)) !== null
              ? (Pe = 3600 * parseFloat(Ne[1]))
              : (Ne = /^(\d+(?:\.\d+)?)m$/.exec(ie)) !== null
              ? (Pe = 60 * parseFloat(Ne[1]))
              : (Ne = /^(\d{2,}):(\d\d):(\d\d(?:\.\d+)?)$/.exec(ie)) !== null
              ? (Pe =
                  3600 * parseInt(Ne[1]) +
                  60 * parseInt(Ne[2]) +
                  parseFloat(Ne[3]))
              : (Ne = /^(\d{2,}):(\d\d):(\d\d)\:(\d{2,})$/.exec(ie)) !== null &&
                Z !== null &&
                (Pe =
                  3600 * parseInt(Ne[1]) +
                  60 * parseInt(Ne[2]) +
                  parseInt(Ne[3]) +
                  (Ne[4] === null ? 0 : parseInt(Ne[4]) / Z)),
            Pe
          );
        }
        function gt(ue, Z, ie) {
          for (; Z.styleRefs.length > 0; ) {
            var Ne = Z.styleRefs.pop();
            Ne in ue.styles
              ? (gt(ue, ue.styles[Ne], ie),
                $t(ue.styles[Ne].styleAttrs, Z.styleAttrs))
              : tt(ie, "Non-existant style id referenced");
          }
        }
        function pt(ue, Z, ie, Ne) {
          for (var Pe = Z.length - 1; Pe >= 0; Pe--) {
            var kt = Z[Pe];
            kt in ue.styles
              ? $t(ue.styles[kt].styleAttrs, ie)
              : tt(Ne, "Non-existant style id referenced");
          }
        }
        function $t(ue, Z) {
          for (var ie in ue)
            ue.hasOwnProperty(ie) && (ie in Z || (Z[ie] = ue[ie]));
        }
        function ot(ue, Z) {
          if (ue && ue.warn && ue.warn(Z)) throw Z;
        }
        function tt(ue, Z) {
          if (ue && ue.error && ue.error(Z)) throw Z;
        }
        function He(ue, Z) {
          throw (ue && ue.fatal && ue.fatal(Z), Z);
        }
        function de(ue, Z) {
          for (var ie, Ne = 0, Pe = ue.length - 1; Ne <= Pe; ) {
            var kt = ue[(ie = Math.floor((Ne + Pe) / 2))];
            if (kt < Z) Ne = ie + 1;
            else {
              if (!(kt > Z)) return { found: !0, index: ie };
              Pe = ie - 1;
            }
          }
          return { found: !1, index: Ne };
        }
        (r.fromXML = function (ue, Z, ie) {
          var Ne = i.parser(!0, { xmlns: !0 }),
            Pe = [],
            kt = [],
            Gt = [],
            B = 0,
            re = null;
          (Ne.onclosetag = function (Lt) {
            if (Pe[0] instanceof W)
              re.head !== null &&
                re.head.styling !== null &&
                pt(re.head.styling, Pe[0].styleRefs, Pe[0].styleAttrs, Z),
                delete Pe[0].styleRefs;
            else if (Pe[0] instanceof g)
              for (var ln in Pe[0].styles)
                Pe[0].styles.hasOwnProperty(ln) &&
                  gt(Pe[0], Pe[0].styles[ln], Z);
            else if (Pe[0] instanceof H || Pe[0] instanceof E) {
              if (Pe[0].contents.length > 1) {
                var Ln,
                  Tr = [Pe[0].contents[0]];
                for (Ln = 1; Ln < Pe[0].contents.length; Ln++)
                  Pe[0].contents[Ln] instanceof S &&
                  Tr[Tr.length - 1] instanceof S
                    ? (Tr[Tr.length - 1].text += Pe[0].contents[Ln].text)
                    : Tr.push(Pe[0].contents[Ln]);
                Pe[0].contents = Tr;
              }
              Pe[0] instanceof E &&
                Pe[0].contents.length === 1 &&
                Pe[0].contents[0] instanceof S &&
                ((Pe[0].text = Pe[0].contents[0].text), delete Pe[0].contents);
            } else
              Pe[0] instanceof h &&
                (Pe[0].node.uri === o.ns_tt && Pe[0].node.local === "metadata"
                  ? B--
                  : B > 0 && ie && "onCloseTag" in ie && ie.onCloseTag());
            Gt.shift(), kt.shift(), Pe.shift();
          }),
            (Ne.ontext = function (Lt) {
              if (Pe[0] !== void 0)
                if (Pe[0] instanceof E || Pe[0] instanceof H) {
                  if (Pe[0] instanceof E) {
                    var ln = Pe[0].styleAttrs[l.byName.ruby.qname];
                    if (
                      ln === "container" ||
                      ln === "textContainer" ||
                      ln === "baseContainer"
                    )
                      return;
                  }
                  var Ln = new S();
                  Ln.initFromText(re, Pe[0], Lt, kt[0], Gt[0], Z),
                    Pe[0].contents.push(Ln);
                } else
                  Pe[0] instanceof h &&
                    B > 0 &&
                    ie &&
                    "onText" in ie &&
                    ie.onText(Lt);
            }),
            (Ne.onopentag = function (Lt) {
              var ln = Lt.attributes["xml:space"];
              ln
                ? Gt.unshift(ln.value)
                : Gt.length === 0
                ? Gt.unshift("default")
                : Gt.unshift(Gt[0]);
              var Ln = Lt.attributes["xml:lang"];
              if (
                (Ln
                  ? kt.unshift(Ln.value)
                  : kt.length === 0
                  ? kt.unshift("")
                  : kt.unshift(kt[0]),
                Lt.uri === o.ns_tt)
              )
                if (Lt.local === "tt")
                  re !== null &&
                    He(
                      Z,
                      "Two <tt> elements at (" +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    ),
                    (re = new f()).initFromNode(Lt, kt[0], Z),
                    Pe.unshift(re);
                else if (Lt.local === "head")
                  Pe[0] instanceof f ||
                    He(
                      Z,
                      "Parent of <head> element is not <tt> at (" +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    ),
                    Pe.unshift(re.head);
                else if (Lt.local === "styling")
                  Pe[0] instanceof p ||
                    He(
                      Z,
                      "Parent of <styling> element is not <head> at (" +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    ),
                    Pe.unshift(re.head.styling);
                else if (Lt.local === "style") {
                  var Tr;
                  Pe[0] instanceof g
                    ? ((Tr = new y()).initFromNode(Lt, Z),
                      Tr.id
                        ? (re.head.styling.styles[Tr.id] = Tr)
                        : tt(Z, "<style> element missing @id attribute"),
                      Pe.unshift(Tr))
                    : Pe[0] instanceof W
                    ? ((Tr = new y()).initFromNode(Lt, Z),
                      $t(Tr.styleAttrs, Pe[0].styleAttrs),
                      Pe.unshift(Tr))
                    : He(
                        Z,
                        "Parent of <style> element is not <styling> or <region> at (" +
                          this.line +
                          "," +
                          this.column +
                          ")"
                      );
                } else if (Lt.local === "initial") {
                  var sr;
                  if (Pe[0] instanceof g) {
                    for (var hi in ((sr = new v()).initFromNode(Lt, Z),
                    sr.styleAttrs))
                      sr.styleAttrs.hasOwnProperty(hi) &&
                        (re.head.styling.initials[hi] = sr.styleAttrs[hi]);
                    Pe.unshift(sr);
                  } else
                    He(
                      Z,
                      "Parent of <initial> element is not <styling> at (" +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                } else if (Lt.local === "layout")
                  Pe[0] instanceof p ||
                    He(
                      Z,
                      "Parent of <layout> element is not <head> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    ),
                    Pe.unshift(re.head.layout);
                else if (Lt.local === "region") {
                  Pe[0] instanceof b ||
                    He(
                      Z,
                      "Parent of <region> element is not <layout> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                  var Ra = new W();
                  Ra.initFromNode(re, Lt, kt[0], Z),
                    !Ra.id || Ra.id in re.head.layout.regions
                      ? tt(
                          Z,
                          "Ignoring <region> with duplicate or missing @id at " +
                            this.line +
                            "," +
                            this.column +
                            ")"
                        )
                      : (re.head.layout.regions[Ra.id] = Ra),
                    Pe.unshift(Ra);
                } else if (Lt.local === "body") {
                  Pe[0] instanceof f ||
                    He(
                      Z,
                      "Parent of <body> element is not <tt> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    ),
                    re.body !== null &&
                      He(
                        Z,
                        "Second <body> element at " +
                          this.line +
                          "," +
                          this.column +
                          ")"
                      );
                  var En = new X();
                  En.initFromNode(re, Lt, kt[0], Z),
                    (re.body = En),
                    Pe.unshift(En);
                } else if (Lt.local === "div") {
                  Pe[0] instanceof G ||
                    Pe[0] instanceof X ||
                    He(
                      Z,
                      "Parent of <div> element is not <body> or <div> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                  var Zn = new G();
                  Zn.initFromNode(re, Pe[0], Lt, kt[0], Z);
                  var on = Zn.styleAttrs[l.byName.backgroundImage.qname];
                  on &&
                    (Zn.contents.push(new w(on)),
                    delete Zn.styleAttrs[l.byName.backgroundImage.qname]),
                    Pe[0].contents.push(Zn),
                    Pe.unshift(Zn);
                } else if (Lt.local === "image") {
                  Pe[0] instanceof G ||
                    He(
                      Z,
                      "Parent of <image> element is not <div> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                  var rn = new w();
                  rn.initFromNode(re, Pe[0], Lt, kt[0], Z),
                    Pe[0].contents.push(rn),
                    Pe.unshift(rn);
                } else if (Lt.local === "p") {
                  Pe[0] instanceof G ||
                    He(
                      Z,
                      "Parent of <p> element is not <div> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                  var It = new H();
                  It.initFromNode(re, Pe[0], Lt, kt[0], Z),
                    Pe[0].contents.push(It),
                    Pe.unshift(It);
                } else if (Lt.local === "span") {
                  Pe[0] instanceof E ||
                    Pe[0] instanceof H ||
                    He(
                      Z,
                      "Parent of <span> element is not <span> or <p> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                  var wt = new E();
                  wt.initFromNode(re, Pe[0], Lt, kt[0], Gt[0], Z),
                    Pe[0].contents.push(wt),
                    Pe.unshift(wt);
                } else if (Lt.local === "br") {
                  Pe[0] instanceof E ||
                    Pe[0] instanceof H ||
                    He(
                      Z,
                      "Parent of <br> element is not <span> or <p> at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                  var Mt = new L();
                  Mt.initFromNode(re, Pe[0], Lt, kt[0], Z),
                    Pe[0].contents.push(Mt),
                    Pe.unshift(Mt);
                } else if (Lt.local === "set") {
                  Pe[0] instanceof E ||
                    Pe[0] instanceof H ||
                    Pe[0] instanceof G ||
                    Pe[0] instanceof X ||
                    Pe[0] instanceof W ||
                    Pe[0] instanceof L ||
                    He(
                      Z,
                      "Parent of <set> element is not a content element or a region at " +
                        this.line +
                        "," +
                        this.column +
                        ")"
                    );
                  var Wt = new F();
                  Wt.initFromNode(re, Pe[0], Lt, Z),
                    Pe[0].sets.push(Wt),
                    Pe.unshift(Wt);
                } else Pe.unshift(new h(Lt));
              else Pe.unshift(new h(Lt));
              if (Pe[0] instanceof h) {
                if (Lt.uri === o.ns_tt && Lt.local === "metadata") B++;
                else if (B > 0 && ie && "onOpenTag" in ie) {
                  var Ft = [];
                  for (var un in Lt.attributes)
                    Ft[Lt.attributes[un].uri + " " + Lt.attributes[un].local] =
                      {
                        uri: Lt.attributes[un].uri,
                        local: Lt.attributes[un].local,
                        value: Lt.attributes[un].value,
                      };
                  ie.onOpenTag(Lt.uri, Lt.local, Ft);
                }
              }
            }),
            Ne.write(ue).close(),
            delete re.head.styling.styles;
          var Ae = !1;
          for (var lt in re.head.layout.regions)
            if (re.head.layout.regions.hasOwnProperty(lt)) {
              Ae = !0;
              break;
            }
          if (!Ae) {
            var Et = W.prototype.createDefaultRegion(re.lang);
            re.head.layout.regions[Et.id] = Et;
          }
          for (var St in re.head.layout.regions)
            re.head.layout.regions.hasOwnProperty(St) &&
              d(re, re.head.layout.regions[St], null, null);
          return (
            re.body && d(re, re.body, null, null), re.body && c(re.body), re
          );
        }),
          (f.prototype.initFromNode = function (ue, Z, ie) {
            var Ne = (function (B, re) {
              var Ae = ze(B, o.ns_ttp, "cellResolution"),
                lt = 15,
                Et = 32;
              if (Ae !== null) {
                var St = /(\d+) (\d+)/.exec(Ae);
                St !== null
                  ? ((Et = parseInt(St[1])), (lt = parseInt(St[2])))
                  : ot(
                      re,
                      "Malformed cellResolution value (using initial value instead)"
                    );
              }
              return { w: Et, h: lt };
            })(ue, ie);
            this.cellLength = {
              h: new u.ComputedLength(0, 1 / Ne.h),
              w: new u.ComputedLength(1 / Ne.w, 0),
            };
            var Pe = (function (B, re) {
              var Ae,
                lt = ze(B, o.ns_ttp, "frameRate"),
                Et = 30;
              lt !== null &&
                ((Ae = /(\d+)/.exec(lt)) !== null
                  ? (Et = parseInt(Ae[1]))
                  : ot(
                      re,
                      "Malformed frame rate attribute (using initial value instead)"
                    ));
              var St = ze(B, o.ns_ttp, "frameRateMultiplier"),
                Lt = 1;
              St !== null &&
                ((Ae = /(\d+) (\d+)/.exec(St)) !== null
                  ? (Lt = parseInt(Ae[1]) / parseInt(Ae[2]))
                  : ot(
                      re,
                      "Malformed frame rate multiplier attribute (using initial value instead)"
                    ));
              var ln = Lt * Et,
                Ln = 1,
                Tr = ze(B, o.ns_ttp, "tickRate");
              return (
                Tr === null
                  ? lt !== null && (Ln = ln)
                  : (Ae = /(\d+)/.exec(Tr)) !== null
                  ? (Ln = parseInt(Ae[1]))
                  : ot(
                      re,
                      "Malformed tick rate attribute (using initial value instead)"
                    ),
                { effectiveFrameRate: ln, tickRate: Ln }
              );
            })(ue, ie);
            (this.effectiveFrameRate = Pe.effectiveFrameRate),
              (this.tickRate = Pe.tickRate),
              (this.aspectRatio = (function (B, re) {
                var Ae = ze(B, o.ns_ittp, "aspectRatio");
                Ae === null && (Ae = ze(B, o.ns_ttp, "displayAspectRatio"));
                var lt = null;
                if (Ae !== null) {
                  var Et = /(\d+)\s+(\d+)/.exec(Ae);
                  if (Et !== null) {
                    var St = parseInt(Et[1]),
                      Lt = parseInt(Et[2]);
                    St !== 0 && Lt !== 0
                      ? (lt = St / Lt)
                      : tt(re, "Illegal aspectRatio values (ignoring)");
                  } else tt(re, "Malformed aspectRatio attribute (ignoring)");
                }
                return lt;
              })(ue, ie));
            var kt = ze(ue, o.ns_ttp, "timeBase");
            kt !== null && kt !== "media" && He(ie, "Unsupported time base");
            var Gt = (function (B, re) {
              var Ae = ze(B, o.ns_tts, "extent");
              if (Ae === null) return null;
              var lt = Ae.split(" ");
              if (lt.length !== 2)
                return ot(re, "Malformed extent (ignoring)"), null;
              var Et = u.parseLength(lt[0]),
                St = u.parseLength(lt[1]);
              return St && Et
                ? { h: St, w: Et }
                : (ot(re, "Malformed extent values (ignoring)"), null);
            })(ue, ie);
            Gt === null
              ? (this.pxLength = { h: null, w: null })
              : ((Gt.h.unit === "px" && Gt.w.unit === "px") ||
                  He(ie, "Extent on TT must be in px or absent"),
                (this.pxLength = {
                  h: new u.ComputedLength(0, 1 / Gt.h.value),
                  w: new u.ComputedLength(1 / Gt.w.value, 0),
                })),
              (this.dimensions = {
                h: new u.ComputedLength(0, 1),
                w: new u.ComputedLength(1, 0),
              }),
              (this.lang = Z);
          }),
          (f.prototype._registerEvent = function (ue) {
            if (!(ue.end <= ue.begin)) {
              var Z = de(this.events, ue.begin);
              if (
                (Z.found || this.events.splice(Z.index, 0, ue.begin),
                ue.end !== Number.POSITIVE_INFINITY)
              ) {
                var ie = de(this.events, ue.end);
                ie.found || this.events.splice(ie.index, 0, ue.end);
              }
            }
          }),
          (f.prototype.getMediaTimeRange = function () {
            return [this.events[0], this.events[this.events.length - 1]];
          }),
          (f.prototype.getMediaTimeEvents = function () {
            return this.events;
          }),
          (y.prototype.initFromNode = function (ue, Z) {
            (this.id = oe(ue)),
              (this.styleAttrs = Xe(ue, Z)),
              (this.styleRefs = De(ue));
          }),
          (v.prototype.initFromNode = function (ue, Z) {
            for (var ie in ((this.styleAttrs = {}), ue.attributes))
              if (
                ue.attributes[ie].uri === o.ns_itts ||
                ue.attributes[ie].uri === o.ns_ebutts ||
                ue.attributes[ie].uri === o.ns_tts
              ) {
                var Ne = ue.attributes[ie].uri + " " + ue.attributes[ie].local;
                this.styleAttrs[Ne] = ue.attributes[ie].value;
              }
          }),
          (w.prototype.initFromNode = function (ue, Z, ie, Ne, Pe) {
            (this.src =
              "src" in ie.attributes ? ie.attributes.src.value : null),
              this.src || tt(Pe, "Invalid image@src attribute"),
              (this.type =
                "type" in ie.attributes ? ie.attributes.type.value : null),
              this.type || tt(Pe, "Invalid image@type attribute"),
              N.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              O.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              P.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              $.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              (this.lang = Ne);
          }),
          (D.prototype.initFromNode = function (ue, Z, ie, Ne) {
            this.id = oe(ie);
          }),
          ($.prototype.initFromNode = function (ue, Z, ie, Ne) {
            var Pe;
            this.regionID =
              (Pe = ie) && "region" in Pe.attributes
                ? Pe.attributes.region.value
                : "";
          }),
          (N.prototype.initFromNode = function (ue, Z, ie, Ne) {
            (this.styleAttrs = Xe(ie, Ne)),
              ue.head !== null &&
                ue.head.styling !== null &&
                pt(ue.head.styling, De(ie), this.styleAttrs, Ne);
          }),
          (P.prototype.initFromNode = function (ue, Z, ie, Ne) {
            this.sets = [];
          }),
          (I.prototype.initFromNode = function (ue, Z, ie, Ne) {
            this.contents = [];
          }),
          (O.prototype.initFromNode = function (ue, Z, ie, Ne) {
            var Pe,
              kt,
              Gt,
              B = (function (re, Ae, lt, Et) {
                var St = null;
                lt &&
                  "begin" in lt.attributes &&
                  (St = ht(
                    re.tickRate,
                    re.effectiveFrameRate,
                    lt.attributes.begin.value
                  )) === null &&
                  ot(
                    Et,
                    "Malformed begin value " +
                      lt.attributes.begin.value +
                      " (using 0)"
                  );
                var Lt = null;
                lt &&
                  "dur" in lt.attributes &&
                  (Lt = ht(
                    re.tickRate,
                    re.effectiveFrameRate,
                    lt.attributes.dur.value
                  )) === null &&
                  ot(
                    Et,
                    "Malformed dur value " +
                      lt.attributes.dur.value +
                      " (ignoring)"
                  );
                var ln = null;
                return (
                  lt &&
                    "end" in lt.attributes &&
                    (ln = ht(
                      re.tickRate,
                      re.effectiveFrameRate,
                      lt.attributes.end.value
                    )) === null &&
                    ot(Et, "Malformed end value (ignoring)"),
                  { explicit_begin: St, explicit_end: ln, explicit_dur: Lt }
                );
              })(ue, 0, ie, Ne);
            (this.explicit_begin = B.explicit_begin),
              (this.explicit_end = B.explicit_end),
              (this.explicit_dur = B.explicit_dur),
              (this.timeContainer =
                ((kt = Ne),
                (Gt =
                  (Pe = ie) && "timeContainer" in Pe.attributes
                    ? Pe.attributes.timeContainer.value
                    : null) && Gt !== "par"
                  ? Gt === "seq"
                    ? "seq"
                    : (tt(
                        kt,
                        "Illegal value of timeContainer (assuming 'par')"
                      ),
                      "par")
                  : "par"));
          }),
          (X.prototype.initFromNode = function (ue, Z, ie, Ne) {
            N.prototype.initFromNode.call(this, ue, null, Z, Ne),
              O.prototype.initFromNode.call(this, ue, null, Z, Ne),
              P.prototype.initFromNode.call(this, ue, null, Z, Ne),
              $.prototype.initFromNode.call(this, ue, null, Z, Ne),
              I.prototype.initFromNode.call(this, ue, null, Z, Ne),
              (this.lang = ie);
          }),
          (G.prototype.initFromNode = function (ue, Z, ie, Ne, Pe) {
            N.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              O.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              P.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              $.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              I.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              (this.lang = Ne);
          }),
          (H.prototype.initFromNode = function (ue, Z, ie, Ne, Pe) {
            N.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              O.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              P.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              $.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              I.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              (this.lang = Ne);
          }),
          (E.prototype.initFromNode = function (ue, Z, ie, Ne, Pe, kt) {
            N.prototype.initFromNode.call(this, ue, Z, ie, kt),
              O.prototype.initFromNode.call(this, ue, Z, ie, kt),
              P.prototype.initFromNode.call(this, ue, Z, ie, kt),
              $.prototype.initFromNode.call(this, ue, Z, ie, kt),
              I.prototype.initFromNode.call(this, ue, Z, ie, kt),
              (this.space = Pe),
              (this.lang = Ne);
          }),
          (S.prototype.initFromText = function (ue, Z, ie, Ne, Pe, kt) {
            O.prototype.initFromNode.call(this, ue, Z, null, kt),
              (this.text = ie),
              (this.space = Pe),
              (this.lang = Ne);
          }),
          (L.prototype.initFromNode = function (ue, Z, ie, Ne, Pe) {
            $.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              O.prototype.initFromNode.call(this, ue, Z, ie, Pe),
              (this.lang = Ne);
          }),
          (W.prototype.createDefaultRegion = function (ue) {
            var Z = new W();
            return (
              D.call(Z, ""),
              N.call(Z, {}),
              P.call(Z, []),
              O.call(Z, 0, Number.POSITIVE_INFINITY, null),
              (this.lang = ue),
              Z
            );
          }),
          (W.prototype.initFromNode = function (ue, Z, ie, Ne) {
            D.prototype.initFromNode.call(this, ue, null, Z, Ne),
              O.prototype.initFromNode.call(this, ue, null, Z, Ne),
              P.prototype.initFromNode.call(this, ue, null, Z, Ne),
              (this.styleAttrs = Xe(Z, Ne)),
              (this.styleRefs = De(Z)),
              (this.lang = ie);
          }),
          (F.prototype.initFromNode = function (ue, Z, ie, Ne) {
            O.prototype.initFromNode.call(this, ue, Z, ie, Ne);
            var Pe = Xe(ie, Ne);
            for (var kt in ((this.qname = null), (this.value = null), Pe))
              if (Pe.hasOwnProperty(kt)) {
                if (this.qname) {
                  tt(Ne, "More than one style specified on set");
                  break;
                }
                (this.qname = kt), (this.value = Pe[kt]);
              }
          });
      })(
        e,
        typeof sax > "u" ? n(5474) : sax,
        typeof imscNames > "u" ? n(977) : imscNames,
        typeof imscStyles > "u" ? n(1219) : imscStyles,
        typeof imscUtils > "u" ? n(6404) : imscUtils
      );
    },
    1612: function (t, e, n) {
      var r = /firefox/i.test(navigator.userAgent);
      (function (i, o, l) {
        function u(I, O, X, G) {
          var H;
          if (X.kind === "region")
            (H = document.createElement("div")).style.position = "absolute";
          else if (X.kind === "body") H = document.createElement("div");
          else if (X.kind === "div") H = document.createElement("div");
          else if (X.kind === "image") {
            if (
              ((H = document.createElement("img")),
              I.imgResolver !== null && X.src !== null)
            ) {
              var E = I.imgResolver(X.src, H);
              E && (H.src = E), (H.height = I.regionH), (H.width = I.regionW);
            }
          } else if (X.kind === "p") H = document.createElement("p");
          else if (X.kind === "span")
            if (X.styleAttrs[l.byName.ruby.qname] === "container")
              (H = document.createElement("ruby")), (I.ruby = !0);
            else if (X.styleAttrs[l.byName.ruby.qname] === "base")
              H = document.createElement("span");
            else if (X.styleAttrs[l.byName.ruby.qname] === "text")
              H = document.createElement("rt");
            else if (X.styleAttrs[l.byName.ruby.qname] === "baseContainer")
              H = document.createElement("rbc");
            else if (X.styleAttrs[l.byName.ruby.qname] === "textContainer")
              H = document.createElement("rtc");
            else {
              if (X.styleAttrs[l.byName.ruby.qname] === "delimiter") return;
              H = document.createElement("span");
            }
          else X.kind === "br" && (H = document.createElement("br"));
          if (H) {
            if (
              (X.lang &&
                ((X.kind !== "region" && X.lang === G.lang) ||
                  (H.lang = X.lang)),
              O.appendChild(H),
              (H.style.margin = "0"),
              X.kind === "region")
            ) {
              var S = X.styleAttrs[l.byName.writingMode.qname];
              S === "lrtb" || S === "lr"
                ? ((I.ipd = "lr"), (I.bpd = "tb"))
                : S === "rltb" || S === "rl"
                ? ((I.ipd = "rl"), (I.bpd = "tb"))
                : S === "tblr"
                ? ((I.ipd = "tb"), (I.bpd = "lr"))
                : (S !== "tbrl" && S !== "tb") ||
                  ((I.ipd = "tb"), (I.bpd = "rl"));
            } else if (X.kind === "p" && I.bpd === "tb") {
              var L = X.styleAttrs[l.byName.direction.qname];
              I.ipd = L === "ltr" ? "lr" : "rl";
            }
            for (var W = 0; W < v.length; W++) {
              var F = v[W],
                oe = X.styleAttrs[F.qname];
              oe !== void 0 && F.map !== null && F.map(I, H, X, oe);
            }
            var De = H,
              Xe = X.styleAttrs[l.byName.linePadding.qname];
            if (Xe && !Xe.isZero()) {
              var ze = Xe.toUsedLength(I.w, I.h);
              if (ze > 0) {
                var ht = Math.ceil(ze) + "px";
                I.bpd === "tb"
                  ? ((De.style.paddingLeft = ht), (De.style.paddingRight = ht))
                  : ((De.style.paddingTop = ht), (De.style.paddingBottom = ht)),
                  (I.lp = Xe);
              }
            }
            var gt = X.styleAttrs[l.byName.multiRowAlign.qname];
            if (gt && gt !== "auto") {
              var pt = document.createElement("span");
              (pt.style.display = "inline-block"),
                (pt.style.textAlign = gt),
                H.appendChild(pt),
                (De = pt),
                (I.mra = gt);
            }
            var $t = X.styleAttrs[l.byName.rubyReserve.qname];
            if (
              ($t && $t[0] !== "none" && (I.rubyReserve = $t),
              X.styleAttrs[l.byName.fillLineGap.qname] && (I.flg = !0),
              X.kind === "span" && X.text)
            ) {
              var ot = X.styleAttrs[l.byName.textEmphasis.qname];
              if (
                (ot && ot.style !== "none" && (I.textEmphasis = !0),
                l.byName.textCombine.qname in X.styleAttrs &&
                  X.styleAttrs[l.byName.textCombine.qname] === "all")
              )
                (H.textContent = X.text),
                  (H._isd_element = X),
                  ot && g(I, H, 0, ot);
              else
                for (var tt = "", He = 0; He < X.text.length; He++) {
                  tt += X.text.charAt(He);
                  var de = X.text.charCodeAt(He);
                  if (de < 55296 || de > 56319 || He === X.text.length - 1) {
                    var ue = document.createElement("span");
                    (ue.textContent = tt),
                      ot && g(I, ue, 0, ot),
                      H.appendChild(ue),
                      (tt = ""),
                      (ue._isd_element = X);
                  }
                }
            }
            if ("contents" in X)
              for (var Z = 0; Z < X.contents.length; Z++)
                u(I, De, X.contents[Z], X);
            var ie = [];
            if (
              X.kind === "p" &&
              (p(I, De, ie, null),
              I.rubyReserve &&
                ((function (B, re) {
                  for (var Ae = 0; Ae < B.length; Ae++) {
                    var lt,
                      Et,
                      St = document.createElement("ruby"),
                      Lt = document.createElement("span");
                    (Lt.textContent = "​"), St.appendChild(Lt);
                    var ln,
                      Ln = re.rubyReserve[1].toUsedLength(re.w, re.h) + "px";
                    re.rubyReserve[0] === "both" ||
                    (re.rubyReserve[0] === "outside" && B.length == 1)
                      ? (((lt = document.createElement("rtc")).style[D] = k
                          ? "after"
                          : "under"),
                        (lt.textContent = "​"),
                        (lt.style.fontSize = Ln),
                        ((Et = document.createElement("rtc")).style[D] = k
                          ? "before"
                          : "over"),
                        (Et.textContent = "​"),
                        (Et.style.fontSize = Ln),
                        St.appendChild(lt),
                        St.appendChild(Et))
                      : (((lt = document.createElement("rtc")).textContent =
                          "​"),
                        (lt.style.fontSize = Ln),
                        (ln =
                          re.rubyReserve[0] === "after" ||
                          (re.rubyReserve[0] === "outside" && Ae > 0)
                            ? k
                              ? "after"
                              : re.bpd === "tb" || re.bpd === "rl"
                              ? "under"
                              : "over"
                            : k
                            ? "before"
                            : re.bpd === "tb" || re.bpd === "rl"
                            ? "over"
                            : "under"),
                        (lt.style[D] = ln),
                        St.appendChild(lt));
                    for (var Tr = null, sr = 0; sr < B[Ae].rbc.length; sr++)
                      if (B[Ae].rbc[sr].localName === "ruby") {
                        Tr = B[Ae].rbc[sr];
                        for (var hi = 0; hi < Tr.style.length; hi++)
                          St.style.setProperty(
                            Tr.style.item(hi),
                            Tr.style.getPropertyValue(Tr.style.item(hi))
                          );
                        break;
                      }
                    (Tr =
                      Tr || B[Ae].elements[0].node).parentElement.insertBefore(
                      St,
                      Tr
                    );
                  }
                })(ie, I),
                (I.rubyReserve = null)),
              (I.ruby || I.rubyReserve) &&
                ((function (B, re) {
                  for (var Ae = 0; Ae < B.length; Ae++)
                    for (var lt = 0; lt < B[Ae].rbc.length; lt++) {
                      var Et;
                      B[Ae].rbc[lt].style[D] ||
                        ((Et = k
                          ? Ae === 0
                            ? "before"
                            : "after"
                          : re.bpd === "tb" || re.bpd === "rl"
                          ? Ae === 0
                            ? "over"
                            : "under"
                          : Ae === 0
                          ? "under"
                          : "over"),
                        (B[Ae].rbc[lt].style[D] = Et));
                    }
                })(ie, I),
                (I.ruby = null)),
              I.textEmphasis &&
                ((function (B, re) {
                  for (var Ae = 0; Ae < B.length; Ae++)
                    for (var lt = 0; lt < B[Ae].te.length; lt++) {
                      var Et;
                      (B[Ae].te[lt].style[N] &&
                        B[Ae].te[lt].style[N] !== "none") ||
                        ((Et =
                          re.bpd === "tb"
                            ? Ae === 0
                              ? "left over"
                              : "left under"
                            : re.bpd === "rl"
                            ? Ae === 0
                              ? "right under"
                              : "left under"
                            : Ae === 0
                            ? "left under"
                            : "right under"),
                        (B[Ae].te[lt].style[N] = Et));
                    }
                })(ie, I),
                (I.textEmphasis = null)),
              I.mra &&
                ((function (B) {
                  for (var re = 0; re < B.length - 1; re++) {
                    var Ae = B[re].elements.length;
                    if (Ae !== 0 && B[re].br === !1) {
                      var lt = document.createElement("br"),
                        Et = B[re].elements[Ae - 1].node;
                      Et.parentElement.insertBefore(lt, Et.nextSibling);
                    }
                  }
                })(ie),
                (I.mra = null)),
              I.lp &&
                ((function (B, re, Ae) {
                  if (B !== null)
                    for (var lt = 0; lt < B.length; lt++) {
                      var Et = B[lt].elements.length,
                        St = Math.ceil(re) + "px",
                        Lt = "-" + Math.ceil(re) + "px";
                      if (Et !== 0) {
                        var ln = B[lt].elements[B[lt].start_elem],
                          Ln = B[lt].elements[B[lt].end_elem];
                        if (ln === Ln) {
                          var Tr = ln.node.getBoundingClientRect();
                          if (Tr.width == 0 || Tr.height == 0) continue;
                        }
                        Ae.ipd === "lr"
                          ? ((ln.node.style.marginLeft = Lt),
                            (ln.node.style.paddingLeft = St))
                          : Ae.ipd === "rl"
                          ? ((ln.node.style.paddingRight = St),
                            (ln.node.style.marginRight = Lt))
                          : Ae.ipd === "tb" &&
                            ((ln.node.style.paddingTop = St),
                            (ln.node.style.marginTop = Lt)),
                          Ae.ipd === "lr"
                            ? (r || (Ln.node.style.marginRight = Lt),
                              (Ln.node.style.paddingRight = St))
                            : Ae.ipd === "rl"
                            ? ((Ln.node.style.paddingLeft = St),
                              r || (Ln.node.style.marginLeft = Lt))
                            : Ae.ipd === "tb" &&
                              ((Ln.node.style.paddingBottom = St),
                              (Ln.node.style.marginBottom = Lt));
                      }
                    }
                })(ie, I.lp.toUsedLength(I.w, I.h), I),
                (I.lp = null)),
              (function (B, re) {
                for (var Ae = 0; Ae < B.length; Ae++)
                  for (var lt = B[Ae], Et = 1; Et < lt.elements.length; ) {
                    var St = lt.elements[Et - 1],
                      Lt = lt.elements[Et];
                    d(St.node, Lt.node, re) ? lt.elements.splice(Et, 1) : Et++;
                  }
                for (var ln, Ln, Tr = [], sr = 0; sr < B.length; sr++)
                  for (var hi = 0; hi < B[sr].elements.length; hi++)
                    (Ln = c((ln = B[sr].elements[hi].node), Tr, !1)) &&
                      (ln.style.backgroundColor = Ln);
                for (var Ra = 0; Ra < Tr.length; Ra++)
                  Tr[Ra].style.backgroundColor = "";
              })(ie, I),
              I.flg)
            ) {
              var Ne = f(De.getBoundingClientRect(), I);
              (function (B, re, Ae, lt) {
                for (
                  var Et = Math.sign(Ae - re), St = 0;
                  St <= B.length;
                  St++
                ) {
                  var Lt, ln, Ln, Tr;
                  if (
                    ((Lt =
                      St === 0
                        ? Math.round(re)
                        : St === B.length
                        ? Math.round(Ae)
                        : Math.round((B[St - 1].after + B[St].before) / 2)),
                    St > 0 && B[St - 1])
                  )
                    for (Ln = 0; Ln < B[St - 1].elements.length; Ln++)
                      (ln =
                        Et * (Lt - (Tr = B[St - 1].elements[Ln]).after) + "px"),
                        lt.bpd === "lr"
                          ? (Tr.node.style.paddingRight = ln)
                          : lt.bpd === "rl"
                          ? (Tr.node.style.paddingLeft = ln)
                          : lt.bpd === "tb" &&
                            (Tr.node.style.paddingBottom = ln);
                  if (St < B.length)
                    for (Ln = 0; Ln < B[St].elements.length; Ln++)
                      (ln =
                        Et * ((Tr = B[St].elements[Ln]).before - Lt) + "px"),
                        lt.bpd === "lr"
                          ? (Tr.node.style.paddingLeft = ln)
                          : lt.bpd === "rl"
                          ? (Tr.node.style.paddingRight = ln)
                          : lt.bpd === "tb" && (Tr.node.style.paddingTop = ln);
                }
              })(ie, Ne.before, Ne.after, I),
                (I.flg = null);
            }
            if (
              X.kind === "region" &&
              I.bpd === "tb" &&
              I.enableRollUp &&
              X.contents.length > 0 &&
              X.styleAttrs[l.byName.displayAlign.qname] === "after"
            ) {
              p(I, De, ie, null);
              var Pe = new h(X.id === "" ? "_" : X.id, ie);
              if (
                ((I.currentISDState[Pe.id] = Pe),
                I.previousISDState &&
                  Pe.id in I.previousISDState &&
                  I.previousISDState[Pe.id].plist.length > 0 &&
                  Pe.plist.length > 1 &&
                  Pe.plist[Pe.plist.length - 2].text ===
                    I.previousISDState[Pe.id].plist[
                      I.previousISDState[Pe.id].plist.length - 1
                    ].text)
              ) {
                var kt = H.firstElementChild,
                  Gt =
                    Pe.plist[Pe.plist.length - 1].after -
                    Pe.plist[Pe.plist.length - 1].before;
                (kt.style.bottom = "-" + Gt + "px"),
                  (kt.style.transition = "transform 0.4s"),
                  (kt.style.position = "relative"),
                  (kt.style.transform = "translateY(-" + Gt + "px)");
              }
            }
          } else
            P(I.errorHandler, "Error processing ISD element kind: " + X.kind);
        }
        function c(I, O, X) {
          return I.style.backgroundColor
            ? (X && !O.includes(I) && O.push(I), I.style.backgroundColor)
            : I.parentElement.nodeName === "SPAN" ||
              I.parentElement.nodeName === "RUBY" ||
              I.parentElement.nodeName === "RBC" ||
              I.parentElement.nodeName === "RTC" ||
              I.parentElement.nodeName === "RT"
            ? c(I.parentElement, O, !0)
            : void 0;
        }
        function d(I, O, X) {
          if (
            I.tagName === "SPAN" &&
            O.tagName === "SPAN" &&
            I._isd_element === O._isd_element
          ) {
            if (!I._isd_element)
              return (
                P(
                  X.errorHandler,
                  "Internal error: HTML span is not linked to a source element; cannot merge spans."
                ),
                !1
              );
            I.textContent += O.textContent;
            for (var G = 0; G < O.style.length; G++) {
              var H = O.style[G];
              (H.indexOf("border") >= 0 ||
                H.indexOf("padding") >= 0 ||
                H.indexOf("margin") >= 0) &&
                (I.style[H] = O.style[H]);
            }
            return O.parentElement.removeChild(O), !0;
          }
          return !1;
        }
        function h(I, O) {
          (this.id = I), (this.plist = O);
        }
        function f(I, O) {
          var X = { before: null, after: null, start: null, end: null };
          return (
            O.bpd === "tb"
              ? ((X.before = I.top),
                (X.after = I.bottom),
                O.ipd === "lr"
                  ? ((X.start = I.left), (X.end = I.right))
                  : ((X.start = I.right), (X.end = I.left)))
              : O.bpd === "lr"
              ? ((X.before = I.left),
                (X.after = I.right),
                (X.start = I.top),
                (X.end = I.bottom))
              : O.bpd === "rl" &&
                ((X.before = I.right),
                (X.after = I.left),
                (X.start = I.top),
                (X.end = I.bottom)),
            X
          );
        }
        function p(I, O, X, G) {
          if (O.localName !== "rt" && O.localName !== "rtc") {
            var H,
              E,
              S,
              L,
              W = O.style.backgroundColor || G;
            if (O.childElementCount === 0)
              if (O.localName === "span" || O.localName === "rb") {
                var F = f(O.getBoundingClientRect(), I);
                if (
                  X.length !== 0 &&
                  ((H = F.before),
                  (E = F.after),
                  (S = X[X.length - 1].before),
                  (E < (L = X[X.length - 1].after) && H > S) ||
                    (L <= E && S >= H))
                ) {
                  var oe = Math.sign(F.after - F.before),
                    De = Math.sign(F.end - F.start);
                  oe * (F.before - X[X.length - 1].before) < 0 &&
                    (X[X.length - 1].before = F.before),
                    oe * (F.after - X[X.length - 1].after) > 0 &&
                      (X[X.length - 1].after = F.after),
                    De * (F.start - X[X.length - 1].start) < 0 &&
                      ((X[X.length - 1].start = F.start),
                      (X[X.length - 1].start_elem =
                        X[X.length - 1].elements.length)),
                    De * (F.end - X[X.length - 1].end) > 0 &&
                      ((X[X.length - 1].end = F.end),
                      (X[X.length - 1].end_elem =
                        X[X.length - 1].elements.length));
                } else
                  X.push({
                    before: F.before,
                    after: F.after,
                    start: F.start,
                    end: F.end,
                    start_elem: 0,
                    end_elem: 0,
                    elements: [],
                    rbc: [],
                    te: [],
                    text: "",
                    br: !1,
                  });
                (X[X.length - 1].text += O.textContent),
                  X[X.length - 1].elements.push({
                    node: O,
                    bgcolor: W,
                    before: F.before,
                    after: F.after,
                  });
              } else
                O.localName === "br" &&
                  X.length !== 0 &&
                  (X[X.length - 1].br = !0);
            else
              for (var Xe = O.firstChild; Xe; )
                Xe.nodeType === Node.ELEMENT_NODE &&
                  (p(I, Xe, X, W),
                  Xe.localName === "ruby" || Xe.localName === "rtc"
                    ? X.length > 0 && X[X.length - 1].rbc.push(Xe)
                    : Xe.localName === "span" &&
                      Xe.style[$] &&
                      Xe.style[$] !== "none" &&
                      X.length > 0 &&
                      X[X.length - 1].te.push(Xe)),
                  (Xe = Xe.nextSibling);
          }
        }
        function g(I, O, X, G) {
          var H;
          G.style !== "none" &&
            (G.style === "auto"
              ? (O.style[$] = "filled")
              : (O.style[$] = G.style + " " + G.symbol),
            (G.position === "before" || G.position === "after") &&
              ((H =
                I.bpd === "tb"
                  ? G.position === "before"
                    ? "left over"
                    : "left under"
                  : I.bpd === "rl"
                  ? G.position === "before"
                    ? "right under"
                    : "left under"
                  : G.position === "before"
                  ? "left under"
                  : "right under"),
              (O.style[N] = H)));
        }
        function y(I, O) {
          (this.qname = I), (this.map = O);
        }
        i.render = function (I, O, X, G, H, E, S, L, W) {
          var F = G || O.clientHeight,
            oe = H || O.clientWidth;
          if (I.aspectRatio !== null) {
            var De = F * I.aspectRatio;
            De > oe ? (F = Math.round(oe / I.aspectRatio)) : (oe = De);
          }
          var Xe = document.createElement("div");
          (Xe.style.position = "relative"),
            (Xe.style.width = oe + "px"),
            (Xe.style.height = F + "px"),
            (Xe.style.margin = "auto"),
            (Xe.style.top = 0),
            (Xe.style.bottom = 0),
            (Xe.style.left = 0),
            (Xe.style.right = 0),
            (Xe.style.zIndex = 0);
          var ze = {
            h: F,
            w: oe,
            regionH: null,
            regionW: null,
            imgResolver: X,
            displayForcedOnlyMode: E || !1,
            isd: I,
            errorHandler: S,
            previousISDState: L,
            enableRollUp: W || !1,
            currentISDState: {},
            flg: null,
            lp: null,
            mra: null,
            ipd: null,
            bpd: null,
            ruby: null,
            textEmphasis: null,
            rubyReserve: null,
          };
          if ((O.appendChild(Xe), "contents" in I))
            for (var ht = 0; ht < I.contents.length; ht++)
              u(ze, Xe, I.contents[ht], I);
          return ze.currentISDState;
        };
        for (
          var v = [
              new y(
                "http://www.w3.org/ns/ttml#styling backgroundColor",
                function (I, O, X, G) {
                  G[3] !== 0 &&
                    (O.style.backgroundColor =
                      "rgba(" +
                      G[0].toString() +
                      "," +
                      G[1].toString() +
                      "," +
                      G[2].toString() +
                      "," +
                      (G[3] / 255).toString() +
                      ")");
                }
              ),
              new y("http://www.w3.org/ns/ttml#styling color", function (
                I,
                O,
                X,
                G
              ) {
                O.style.color =
                  "rgba(" +
                  G[0].toString() +
                  "," +
                  G[1].toString() +
                  "," +
                  G[2].toString() +
                  "," +
                  (G[3] / 255).toString() +
                  ")";
              }),
              new y("http://www.w3.org/ns/ttml#styling direction", function (
                I,
                O,
                X,
                G
              ) {
                O.style.direction = G;
              }),
              new y("http://www.w3.org/ns/ttml#styling display", function (
                I,
                O,
                X,
                G
              ) {}),
              new y("http://www.w3.org/ns/ttml#styling displayAlign", function (
                I,
                O,
                X,
                G
              ) {
                (O.style.display = "flex"),
                  (O.style.flexDirection = "column"),
                  G === "before"
                    ? (O.style.justifyContent = "flex-start")
                    : G === "center"
                    ? (O.style.justifyContent = "center")
                    : G === "after" && (O.style.justifyContent = "flex-end");
              }),
              new y("http://www.w3.org/ns/ttml#styling extent", function (
                I,
                O,
                X,
                G
              ) {
                (I.regionH = G.h.toUsedLength(I.w, I.h)),
                  (I.regionW = G.w.toUsedLength(I.w, I.h));
                var H = 0,
                  E = 0,
                  S = X.styleAttrs["http://www.w3.org/ns/ttml#styling padding"];
                S &&
                  ((H =
                    S[0].toUsedLength(I.w, I.h) + S[2].toUsedLength(I.w, I.h)),
                  (E =
                    S[1].toUsedLength(I.w, I.h) + S[3].toUsedLength(I.w, I.h))),
                  (O.style.height = I.regionH - H + "px"),
                  (O.style.width = I.regionW - E + "px");
              }),
              new y("http://www.w3.org/ns/ttml#styling fontFamily", function (
                I,
                O,
                X,
                G
              ) {
                for (var H = [], E = 0; E < G.length; E++)
                  (G[E] = G[E].trim()),
                    G[E] === "monospaceSerif"
                      ? (H.push("Courier New"),
                        H.push('"Liberation Mono"'),
                        H.push("Courier"),
                        H.push("monospace"))
                      : G[E] === "proportionalSansSerif"
                      ? (H.push("Arial"),
                        H.push("Helvetica"),
                        H.push('"Liberation Sans"'),
                        H.push("sans-serif"))
                      : G[E] === "monospace"
                      ? H.push("monospace")
                      : G[E] === "sansSerif"
                      ? H.push("sans-serif")
                      : G[E] === "serif"
                      ? H.push("serif")
                      : G[E] === "monospaceSansSerif"
                      ? (H.push("Consolas"), H.push("monospace"))
                      : G[E] === "proportionalSerif"
                      ? H.push("serif")
                      : H.push(G[E]);
                if (H.length > 0) {
                  for (var S = [H[0]], L = 1; L < H.length; L++)
                    S.indexOf(H[L]) == -1 && S.push(H[L]);
                  H = S;
                }
                O.style.fontFamily = H.join(",");
              }),
              new y("http://www.w3.org/ns/ttml#styling shear", function (
                I,
                O,
                X,
                G
              ) {
                if (G !== 0) {
                  var H = -0.9 * G;
                  I.bpd === "tb"
                    ? (O.style.transform = "skewX(" + H + "deg)")
                    : (O.style.transform = "skewY(" + H + "deg)");
                }
              }),
              new y("http://www.w3.org/ns/ttml#styling fontSize", function (
                I,
                O,
                X,
                G
              ) {
                O.style.fontSize = G.toUsedLength(I.w, I.h) + "px";
              }),
              new y("http://www.w3.org/ns/ttml#styling fontStyle", function (
                I,
                O,
                X,
                G
              ) {
                O.style.fontStyle = G;
              }),
              new y("http://www.w3.org/ns/ttml#styling fontWeight", function (
                I,
                O,
                X,
                G
              ) {
                O.style.fontWeight = G;
              }),
              new y("http://www.w3.org/ns/ttml#styling lineHeight", function (
                I,
                O,
                X,
                G
              ) {
                O.style.lineHeight =
                  G === "normal" ? "normal" : G.toUsedLength(I.w, I.h) + "px";
              }),
              new y("http://www.w3.org/ns/ttml#styling opacity", function (
                I,
                O,
                X,
                G
              ) {
                O.style.opacity = G;
              }),
              new y("http://www.w3.org/ns/ttml#styling origin", function (
                I,
                O,
                X,
                G
              ) {
                (O.style.top = G.h.toUsedLength(I.w, I.h) + "px"),
                  (O.style.left = G.w.toUsedLength(I.w, I.h) + "px");
              }),
              new y("http://www.w3.org/ns/ttml#styling overflow", function (
                I,
                O,
                X,
                G
              ) {
                O.style.overflow = G;
              }),
              new y("http://www.w3.org/ns/ttml#styling padding", function (
                I,
                O,
                X,
                G
              ) {
                var H = [];
                (H[0] = G[0].toUsedLength(I.w, I.h) + "px"),
                  (H[1] = G[3].toUsedLength(I.w, I.h) + "px"),
                  (H[2] = G[2].toUsedLength(I.w, I.h) + "px"),
                  (H[3] = G[1].toUsedLength(I.w, I.h) + "px"),
                  (O.style.padding = H.join(" "));
              }),
              new y("http://www.w3.org/ns/ttml#styling position", function (
                I,
                O,
                X,
                G
              ) {
                (O.style.top = G.h.toUsedLength(I.w, I.h) + "px"),
                  (O.style.left = G.w.toUsedLength(I.w, I.h) + "px");
              }),
              new y("http://www.w3.org/ns/ttml#styling rubyAlign", function (
                I,
                O,
                X,
                G
              ) {
                O.style.rubyAlign =
                  G === "spaceAround" ? "space-around" : "center";
              }),
              new y("http://www.w3.org/ns/ttml#styling rubyPosition", function (
                I,
                O,
                X,
                G
              ) {
                var H;
                (G !== "before" && G !== "after") ||
                  ((H = k
                    ? G
                    : I.bpd === "tb" || I.bpd === "rl"
                    ? G === "before"
                      ? "over"
                      : "under"
                    : G === "before"
                    ? "under"
                    : "over"),
                  (O.parentElement.style[D] = H));
              }),
              new y("http://www.w3.org/ns/ttml#styling showBackground", null),
              new y("http://www.w3.org/ns/ttml#styling textAlign", function (
                I,
                O,
                X,
                G
              ) {
                var H;
                (H =
                  G === "start"
                    ? I.ipd === "rl"
                      ? "right"
                      : "left"
                    : G === "end"
                    ? I.ipd === "rl"
                      ? "left"
                      : "right"
                    : G),
                  (O.style.textAlign = H);
              }),
              new y(
                "http://www.w3.org/ns/ttml#styling textDecoration",
                function (I, O, X, G) {
                  O.style.textDecoration = G.join(" ").replace(
                    "lineThrough",
                    "line-through"
                  );
                }
              ),
              new y("http://www.w3.org/ns/ttml#styling textOutline", function (
                I,
                O,
                X,
                G
              ) {}),
              new y("http://www.w3.org/ns/ttml#styling textShadow", function (
                I,
                O,
                X,
                G
              ) {
                var H = X.styleAttrs[l.byName.textOutline.qname];
                if (G === "none" && H === "none") O.style.textShadow = "";
                else {
                  var E = [];
                  if (H !== "none") {
                    var S =
                      "rgba(" +
                      H.color[0].toString() +
                      "," +
                      H.color[1].toString() +
                      "," +
                      H.color[2].toString() +
                      "," +
                      (H.color[3] / 255).toString() +
                      ")";
                    E.push("1px 1px 1px " + S),
                      E.push("-1px 1px 1px " + S),
                      E.push("1px -1px 1px " + S),
                      E.push("-1px -1px 1px " + S);
                  }
                  if (G !== "none")
                    for (var L = 0; L < G.length; L++)
                      E.push(
                        G[L].x_off.toUsedLength(I.w, I.h) +
                          "px " +
                          G[L].y_off.toUsedLength(I.w, I.h) +
                          "px " +
                          G[L].b_radius.toUsedLength(I.w, I.h) +
                          "px rgba(" +
                          G[L].color[0].toString() +
                          "," +
                          G[L].color[1].toString() +
                          "," +
                          G[L].color[2].toString() +
                          "," +
                          (G[L].color[3] / 255).toString() +
                          ")"
                      );
                  O.style.textShadow = E.join(",");
                }
              }),
              new y("http://www.w3.org/ns/ttml#styling textCombine", function (
                I,
                O,
                X,
                G
              ) {
                O.style.textCombineUpright = G;
              }),
              new y("http://www.w3.org/ns/ttml#styling textEmphasis", function (
                I,
                O,
                X,
                G
              ) {}),
              new y("http://www.w3.org/ns/ttml#styling unicodeBidi", function (
                I,
                O,
                X,
                G
              ) {
                var H;
                (H = G === "bidiOverride" ? "bidi-override" : G),
                  (O.style.unicodeBidi = H);
              }),
              new y("http://www.w3.org/ns/ttml#styling visibility", function (
                I,
                O,
                X,
                G
              ) {
                O.style.visibility = G;
              }),
              new y("http://www.w3.org/ns/ttml#styling wrapOption", function (
                I,
                O,
                X,
                G
              ) {
                G === "wrap"
                  ? X.space === "preserve"
                    ? (O.style.whiteSpace = "pre-wrap")
                    : (O.style.whiteSpace = "normal")
                  : X.space === "preserve"
                  ? (O.style.whiteSpace = "pre")
                  : (O.style.whiteSpace = "noWrap");
              }),
              new y("http://www.w3.org/ns/ttml#styling writingMode", function (
                I,
                O,
                X,
                G
              ) {
                G === "lrtb" || G === "lr" || G === "rltb" || G === "rl"
                  ? (O.style.writingMode = "horizontal-tb")
                  : G === "tblr"
                  ? (O.style.writingMode = "vertical-lr")
                  : (G !== "tbrl" && G !== "tb") ||
                    (O.style.writingMode = "vertical-rl");
              }),
              new y("http://www.w3.org/ns/ttml#styling zIndex", function (
                I,
                O,
                X,
                G
              ) {
                O.style.zIndex = G;
              }),
              new y(
                "http://www.w3.org/ns/ttml/profile/imsc1#styling forcedDisplay",
                function (I, O, X, G) {
                  I.displayForcedOnlyMode &&
                    G === !1 &&
                    (O.style.visibility = "hidden");
                }
              ),
            ],
            b = {},
            w = 0;
          w < v.length;
          w++
        )
          b[v[w].qname] = v[w];
        var k =
            "webkitRubyPosition" in
            window.getComputedStyle(document.documentElement),
          D = k ? "webkitRubyPosition" : "rubyPosition",
          $ =
            "webkitTextEmphasisStyle" in
            window.getComputedStyle(document.documentElement)
              ? "webkitTextEmphasisStyle"
              : "textEmphasisStyle",
          N =
            "webkitTextEmphasisPosition" in
            window.getComputedStyle(document.documentElement)
              ? "webkitTextEmphasisPosition"
              : "textEmphasisPosition";
        function P(I, O) {
          if (I && I.error && I.error(O)) throw O;
        }
      })(
        e,
        typeof imscNames > "u" ? n(977) : imscNames,
        typeof imscStyles > "u" ? n(1219) : imscStyles,
        typeof imscUtils > "u" ? n(6404) : imscUtils
      );
    },
    8905: function (t, e, n) {
      (function (r, i, o, l) {
        r.generateISD = function (y, v, b) {
          var w,
            k = new f(y),
            D = {},
            $ = {},
            N = y.head.styling.initials[o.byName.showBackground.qname],
            P = y.head.styling.initials[o.byName.backgroundColor.qname];
          for (var I in y.head.layout.regions)
            if (y.head.layout.regions.hasOwnProperty(I)) {
              var O = y.head.layout.regions[I],
                X = O.styleAttrs[o.byName.showBackground.qname] || N,
                G = O.styleAttrs[o.byName.backgroundColor.qname] || P;
              $[O.id] =
                (X === "always" || X === void 0) &&
                G !== void 0 &&
                !(v < O.begin || v >= O.end);
            }
          for (var H in (y.body && y.body.regionID && ($[y.body.regionID] = !0),
          (w =
            y.body !== null
              ? (function S(L, W) {
                  if (W.contents) {
                    var F = {};
                    for (var oe in W) W.hasOwnProperty(oe) && (F[oe] = W[oe]);
                    return (
                      (F.contents = []),
                      W.contents
                        .filter(function (De) {
                          return !(L < De.begin || L >= De.end);
                        })
                        .forEach(function (De) {
                          var Xe = S(L, De);
                          Xe.regionID && ($[Xe.regionID] = !0),
                            Xe !== null && F.contents.push(Xe);
                        }),
                      F
                    );
                  }
                  return W;
                })(v, y.body)
              : null),
          $[""] !== void 0 && ($[""] = !0),
          $))
            if ($[H]) {
              var E = c(
                y,
                v,
                y.head.layout.regions[H],
                w,
                null,
                "",
                y.head.layout.regions[H],
                b,
                D
              );
              E !== null && k.contents.push(E.element);
            }
          return k;
        };
        var u = [
          o.byName.color.qname,
          o.byName.textCombine.qname,
          o.byName.textDecoration.qname,
          o.byName.textEmphasis.qname,
          o.byName.textOutline.qname,
          o.byName.textShadow.qname,
        ];
        function c(y, v, b, w, k, D, $, N, P) {
          if (v < $.begin || v >= $.end) return null;
          var I = "regionID" in $ && $.regionID !== "" ? $.regionID : D;
          if (
            k !== null &&
            I !== b.id &&
            (!("contents" in $) ||
              ("contents" in $ && $.contents.length === 0) ||
              I !== "")
          )
            return null;
          var O = new p($);
          if ("sets" in $)
            for (var X = 0; X < $.sets.length; X++)
              v < $.sets[X].begin ||
                v >= $.sets[X].end ||
                (O.styleAttrs[$.sets[X].qname] = $.sets[X].value);
          var G = {};
          for (var H in O.styleAttrs)
            if (
              O.styleAttrs.hasOwnProperty(H) &&
              ((G[H] = !0),
              O.kind === "region" &&
                H === o.byName.writingMode.qname &&
                !(o.byName.direction.qname in O.styleAttrs))
            ) {
              var E = O.styleAttrs[H];
              E === "lrtb" || E === "lr"
                ? (O.styleAttrs[o.byName.direction.qname] = "ltr")
                : (E !== "rltb" && E !== "rl") ||
                  (O.styleAttrs[o.byName.direction.qname] = "rtl");
            }
          if (k !== null)
            for (var S = 0; S < o.all.length; S++) {
              var L = o.all[S];
              if (L.qname === o.byName.textDecoration.qname) {
                var W = k.styleAttrs[L.qname],
                  F = O.styleAttrs[L.qname],
                  oe = [];
                F === void 0
                  ? (oe = W)
                  : F.indexOf("none") === -1
                  ? (((F.indexOf("noUnderline") === -1 &&
                      W.indexOf("underline") !== -1) ||
                      F.indexOf("underline") !== -1) &&
                      oe.push("underline"),
                    ((F.indexOf("noLineThrough") === -1 &&
                      W.indexOf("lineThrough") !== -1) ||
                      F.indexOf("lineThrough") !== -1) &&
                      oe.push("lineThrough"),
                    ((F.indexOf("noOverline") === -1 &&
                      W.indexOf("overline") !== -1) ||
                      F.indexOf("overline") !== -1) &&
                      oe.push("overline"))
                  : oe.push("none"),
                  (O.styleAttrs[L.qname] = oe);
              } else if (
                L.qname !== o.byName.fontSize.qname ||
                L.qname in O.styleAttrs ||
                O.kind !== "span" ||
                O.styleAttrs[o.byName.ruby.qname] !== "textContainer"
              )
                if (
                  L.qname !== o.byName.fontSize.qname ||
                  L.qname in O.styleAttrs ||
                  O.kind !== "span" ||
                  O.styleAttrs[o.byName.ruby.qname] !== "text"
                )
                  L.inherit &&
                    L.qname in k.styleAttrs &&
                    !(L.qname in O.styleAttrs) &&
                    (O.styleAttrs[L.qname] = k.styleAttrs[L.qname]);
                else {
                  var De = k.styleAttrs[o.byName.fontSize.qname];
                  k.styleAttrs[o.byName.ruby.qname] === "textContainer"
                    ? (O.styleAttrs[L.qname] = De)
                    : (O.styleAttrs[L.qname] = new l.ComputedLength(
                        0.5 * De.rw,
                        0.5 * De.rh
                      ));
                }
              else {
                var Xe = k.styleAttrs[o.byName.fontSize.qname];
                O.styleAttrs[L.qname] = new l.ComputedLength(
                  0.5 * Xe.rw,
                  0.5 * Xe.rh
                );
              }
            }
          for (var ze = 0; ze < o.all.length; ze++) {
            var ht = o.all[ze];
            if (
              !(ht.qname in O.styleAttrs) &&
              !(
                (ht.qname === o.byName.position.qname &&
                  o.byName.origin.qname in O.styleAttrs) ||
                (ht.qname === o.byName.origin.qname &&
                  o.byName.position.qname in O.styleAttrs)
              )
            ) {
              var gt = y.head.styling.initials[ht.qname] || ht.initial;
              if (
                gt !== null &&
                (O.kind === "region" || (ht.inherit === !1 && gt !== null))
              ) {
                var pt = ht.parse(gt);
                pt !== null
                  ? ((O.styleAttrs[ht.qname] = pt), (G[ht.qname] = !0))
                  : g(
                      N,
                      "Invalid initial value for '" +
                        ht.qname +
                        "' on element '" +
                        O.kind
                    );
              }
            }
          }
          for (var $t = 0; $t < o.all.length; $t++) {
            var ot = o.all[$t];
            if (ot.qname in G && ot.compute !== null) {
              var tt = ot.compute(y, k, O, O.styleAttrs[ot.qname], P);
              tt !== null
                ? (O.styleAttrs[ot.qname] = tt)
                : ((O.styleAttrs[ot.qname] = ot.compute(
                    y,
                    k,
                    O,
                    ot.parse(ot.initial),
                    P
                  )),
                  g(
                    N,
                    "Style '" +
                      ot.qname +
                      "' on element '" +
                      O.kind +
                      "' cannot be computed"
                  ));
            }
          }
          if (O.styleAttrs[o.byName.display.qname] === "none") return null;
          var He = null;
          k === null
            ? (He = w === null ? [] : [w])
            : "contents" in $ && (He = $.contents);
          for (var de = 0; He !== null && de < He.length; de++) {
            var ue = c(y, v, b, w, O, I, He[de], N, P);
            ue !== null && O.contents.push(ue.element);
          }
          for (var Z in O.styleAttrs)
            if (O.styleAttrs.hasOwnProperty(Z)) {
              var ie = !1;
              if (O.kind === "span") {
                var Ne = O.styleAttrs[o.byName.ruby.qname];
                (ie =
                  (Ne === "container" ||
                    Ne === "textContainer" ||
                    Ne === "baseContainer") &&
                  u.indexOf(Z) !== -1) ||
                  (ie = Ne !== "container" && Z === o.byName.rubyAlign.qname),
                  ie ||
                    (ie =
                      !(Ne === "textContainer" || Ne === "text") &&
                      Z === o.byName.rubyPosition.qname);
              }
              if (!ie) {
                var Pe = o.byQName[Z];
                "applies" in Pe && (ie = Pe.applies.indexOf(O.kind) === -1);
              }
              ie && delete O.styleAttrs[Z];
            }
          var kt = O.styleAttrs[o.byName.ruby.qname];
          if (
            O.kind === "p" ||
            (O.kind === "span" && (kt === "textContainer" || kt === "text"))
          ) {
            var Gt = [];
            d(O, Gt),
              (function (B) {
                for (var re, Ae = 0; Ae < B.length; )
                  if ((re = B[Ae]).kind !== "br" && re.space !== "preserve") {
                    var lt = re.text.replace(/[\t\r\n ]+/g, " ");
                    /^[ ]/.test(lt) &&
                      (Ae === 0 ||
                        (Et = B[Ae - 1]).kind === "br" ||
                        /[\r\n\t ]$/.test(Et.text)) &&
                      (lt = lt.substring(1)),
                      (re.text = lt),
                      lt.length === 0 ? B.splice(Ae, 1) : Ae++;
                  } else Ae++;
                var Et, St;
                for (Ae = 0; Ae < B.length; Ae++)
                  (re = B[Ae]).kind !== "br" && re.space !== "preserve"
                    ? /[ ]$/.test(re.text) &&
                      (Ae === B.length - 1 ||
                        (St = B[Ae + 1]).kind === "br" ||
                        (St.space === "preserve" && /^[\r\n]/.test(St.text))) &&
                      (re.text = re.text.slice(0, -1))
                    : Ae++;
              })(Gt),
              h(O);
          }
          return (O.kind === "div" &&
            o.byName.backgroundImage.qname in O.styleAttrs) ||
            O.kind === "br" ||
            O.kind === "image" ||
            ("contents" in O && O.contents.length > 0) ||
            (O.kind === "span" && O.text !== null) ||
            (O.kind === "region" &&
              O.styleAttrs[o.byName.showBackground.qname] === "always")
            ? { region_id: I, element: O }
            : null;
        }
        function d(y, v) {
          if ("contents" in y)
            for (var b = 0; b < y.contents.length; b++) {
              var w = y.contents[b],
                k = w.styleAttrs[o.byName.ruby.qname];
              (w.kind !== "span" || (k !== "textContainer" && k !== "text")) &&
                ("contents" in w
                  ? d(w, v)
                  : ((w.kind === "span" && w.text.length !== 0) ||
                      w.kind === "br") &&
                    v.push(w));
            }
        }
        function h(y) {
          if (y.kind === "br") return !1;
          if ("text" in y) return y.text.length === 0;
          if ("contents" in y) {
            for (var v = y.contents.length; v--; )
              h(y.contents[v]) && y.contents.splice(v, 1);
            return y.contents.length === 0;
          }
        }
        function f(y) {
          (this.contents = []),
            (this.aspectRatio = y.aspectRatio),
            (this.lang = y.lang);
        }
        function p(y) {
          for (var v in ((this.kind = y.kind || "region"),
          (this.lang = y.lang),
          y.id && (this.id = y.id),
          (this.styleAttrs = {}),
          y.styleAttrs))
            y.styleAttrs.hasOwnProperty(v) &&
              (this.styleAttrs[v] = y.styleAttrs[v]);
          "src" in y && (this.src = y.src),
            "type" in y && (this.type = y.type),
            "text" in y
              ? (this.text = y.text)
              : (this.kind === "region" || "contents" in y) &&
                (this.contents = []),
            "space" in y && (this.space = y.space);
        }
        function g(y, v) {
          if (y && y.error && y.error(v)) throw v;
        }
      })(
        e,
        typeof imscNames > "u" ? n(977) : imscNames,
        typeof imscStyles > "u" ? n(1219) : imscStyles,
        typeof imscUtils > "u" ? n(6404) : imscUtils
      );
    },
    7640: function (t, e, n) {
      (e.generateISD = n(8905).generateISD),
        (e.fromXML = n(6739).fromXML),
        (e.renderHTML = n(1612).render);
    },
    977: function (t, e) {
      var n;
      ((n = e).ns_tt = "http://www.w3.org/ns/ttml"),
        (n.ns_tts = "http://www.w3.org/ns/ttml#styling"),
        (n.ns_ttp = "http://www.w3.org/ns/ttml#parameter"),
        (n.ns_xml = "http://www.w3.org/XML/1998/namespace"),
        (n.ns_itts = "http://www.w3.org/ns/ttml/profile/imsc1#styling"),
        (n.ns_ittp = "http://www.w3.org/ns/ttml/profile/imsc1#parameter"),
        (n.ns_smpte = "http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"),
        (n.ns_ebutts = "urn:ebu:tt:style");
    },
    1219: function (t, e, n) {
      (function (r, i, o) {
        function l(d, h, f, p, g, y, v, b) {
          (this.name = h),
            (this.ns = d),
            (this.qname = d + " " + h),
            (this.inherit = g),
            (this.animatable = y),
            (this.initial = f),
            (this.applies = p),
            (this.parse = v),
            (this.compute = b);
        }
        for (var u in ((r.all = [
          new l(
            i.ns_tts,
            "backgroundColor",
            "transparent",
            ["body", "div", "p", "region", "span"],
            !1,
            !0,
            o.parseColor,
            null
          ),
          new l(
            i.ns_tts,
            "color",
            "white",
            ["span"],
            !0,
            !0,
            o.parseColor,
            null
          ),
          new l(
            i.ns_tts,
            "direction",
            "ltr",
            ["p", "span"],
            !0,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "display",
            "auto",
            ["body", "div", "p", "region", "span"],
            !1,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "displayAlign",
            "before",
            ["region"],
            !1,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "extent",
            "auto",
            ["tt", "region"],
            !1,
            !0,
            function (d) {
              if (d === "auto") return d;
              var h = d.split(" ");
              if (h.length !== 2) return null;
              var f = o.parseLength(h[0]),
                p = o.parseLength(h[1]);
              return p && f ? { h: p, w: f } : null;
            },
            function (d, h, f, p, g) {
              var y, v;
              if (p === "auto") y = new o.ComputedLength(0, 1);
              else if (
                (y = o.toComputedLength(
                  p.h.value,
                  p.h.unit,
                  null,
                  d.dimensions.h,
                  null,
                  d.pxLength.h
                )) === null
              )
                return null;
              if (p === "auto") v = new o.ComputedLength(1, 0);
              else if (
                (v = o.toComputedLength(
                  p.w.value,
                  p.w.unit,
                  null,
                  d.dimensions.w,
                  null,
                  d.pxLength.w
                )) === null
              )
                return null;
              return { h: y, w: v };
            }
          ),
          new l(
            i.ns_tts,
            "fontFamily",
            "default",
            ["span", "p"],
            !0,
            !0,
            function (d) {
              for (var h = d.split(","), f = [], p = 0; p < h.length; p++)
                (h[p] = h[p].trim()),
                  h[p].charAt(0) !== "'" &&
                  h[p].charAt(0) !== '"' &&
                  h[p] === "default"
                    ? f.push("monospaceSerif")
                    : f.push(h[p]);
              return f;
            },
            null
          ),
          new l(
            i.ns_tts,
            "shear",
            "0%",
            ["p"],
            !0,
            !0,
            o.parseLength,
            function (d, h, f, p) {
              return p.unit !== "%"
                ? null
                : Math.abs(p.value) > 100
                ? 100 * Math.sign(p.value)
                : p.value;
            }
          ),
          new l(
            i.ns_tts,
            "fontSize",
            "1c",
            ["span", "p"],
            !0,
            !0,
            o.parseLength,
            function (d, h, f, p, g) {
              return o.toComputedLength(
                p.value,
                p.unit,
                h !== null
                  ? h.styleAttrs[r.byName.fontSize.qname]
                  : d.cellLength.h,
                h !== null
                  ? h.styleAttrs[r.byName.fontSize.qname]
                  : d.cellLength.h,
                d.cellLength.h,
                d.pxLength.h
              );
            }
          ),
          new l(
            i.ns_tts,
            "fontStyle",
            "normal",
            ["span", "p"],
            !0,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "fontWeight",
            "normal",
            ["span", "p"],
            !0,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "lineHeight",
            "normal",
            ["p"],
            !0,
            !0,
            function (d) {
              return d === "normal" ? d : o.parseLength(d);
            },
            function (d, h, f, p, g) {
              var y;
              if (p === "normal") y = p;
              else if (
                (y = o.toComputedLength(
                  p.value,
                  p.unit,
                  f.styleAttrs[r.byName.fontSize.qname],
                  f.styleAttrs[r.byName.fontSize.qname],
                  d.cellLength.h,
                  d.pxLength.h
                )) === null
              )
                return null;
              return y;
            }
          ),
          new l(i.ns_tts, "opacity", 1, ["region"], !1, !0, parseFloat, null),
          new l(
            i.ns_tts,
            "origin",
            "auto",
            ["region"],
            !1,
            !0,
            function (d) {
              if (d === "auto") return d;
              var h = d.split(" ");
              if (h.length !== 2) return null;
              var f = o.parseLength(h[0]),
                p = o.parseLength(h[1]);
              return p && f ? { h: p, w: f } : null;
            },
            function (d, h, f, p, g) {
              var y, v;
              if (p === "auto") y = new o.ComputedLength(0, 0);
              else if (
                (y = o.toComputedLength(
                  p.h.value,
                  p.h.unit,
                  null,
                  d.dimensions.h,
                  null,
                  d.pxLength.h
                )) === null
              )
                return null;
              if (p === "auto") v = new o.ComputedLength(0, 0);
              else if (
                (v = o.toComputedLength(
                  p.w.value,
                  p.w.unit,
                  null,
                  d.dimensions.w,
                  null,
                  d.pxLength.w
                )) === null
              )
                return null;
              return { h: y, w: v };
            }
          ),
          new l(
            i.ns_tts,
            "overflow",
            "hidden",
            ["region"],
            !1,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "padding",
            "0px",
            ["region"],
            !1,
            !0,
            function (d) {
              var h = d.split(" ");
              if (h.length > 4) return null;
              for (var f = [], p = 0; p < h.length; p++) {
                var g = o.parseLength(h[p]);
                if (!g) return null;
                f.push(g);
              }
              return f;
            },
            function (d, h, f, p, g) {
              var y;
              if (p.length === 1) y = [p[0], p[0], p[0], p[0]];
              else if (p.length === 2) y = [p[0], p[1], p[0], p[1]];
              else if (p.length === 3) y = [p[0], p[1], p[2], p[1]];
              else {
                if (p.length !== 4) return null;
                y = [p[0], p[1], p[2], p[3]];
              }
              var v = f.styleAttrs[r.byName.writingMode.qname];
              if (v === "lrtb" || v === "lr") y = [y[0], y[3], y[2], y[1]];
              else if (v === "rltb" || v === "rl") y = [y[0], y[1], y[2], y[3]];
              else if (v === "tblr") y = [y[3], y[0], y[1], y[2]];
              else {
                if (v !== "tbrl" && v !== "tb") return null;
                y = [y[3], y[2], y[1], y[0]];
              }
              for (var b = [], w = 0; w < y.length; w++)
                if (y[w].value === 0) b[w] = new o.ComputedLength(0, 0);
                else if (
                  ((b[w] = o.toComputedLength(
                    y[w].value,
                    y[w].unit,
                    f.styleAttrs[r.byName.fontSize.qname],
                    w === 0 || w === 2
                      ? f.styleAttrs[r.byName.extent.qname].h
                      : f.styleAttrs[r.byName.extent.qname].w,
                    w === 0 || w === 2 ? d.cellLength.h : d.cellLength.w,
                    w === 0 || w === 2 ? d.pxLength.h : d.pxLength.w
                  )),
                  b[w] === null)
                )
                  return null;
              return b;
            }
          ),
          new l(
            i.ns_tts,
            "position",
            "top left",
            ["region"],
            !1,
            !0,
            function (d) {
              return o.parsePosition(d);
            },
            function (d, h, f, p) {
              var g, y;
              return (g = o.toComputedLength(
                p.v.offset.value,
                p.v.offset.unit,
                null,
                new o.ComputedLength(
                  -f.styleAttrs[r.byName.extent.qname].h.rw,
                  d.dimensions.h.rh - f.styleAttrs[r.byName.extent.qname].h.rh
                ),
                null,
                d.pxLength.h
              )) === null
                ? null
                : (p.v.edge === "bottom" &&
                    (g = new o.ComputedLength(
                      -g.rw - f.styleAttrs[r.byName.extent.qname].h.rw,
                      d.dimensions.h.rh -
                        g.rh -
                        f.styleAttrs[r.byName.extent.qname].h.rh
                    )),
                  (y = o.toComputedLength(
                    p.h.offset.value,
                    p.h.offset.unit,
                    null,
                    new o.ComputedLength(
                      d.dimensions.w.rw -
                        f.styleAttrs[r.byName.extent.qname].w.rw,
                      -f.styleAttrs[r.byName.extent.qname].w.rh
                    ),
                    null,
                    d.pxLength.w
                  )),
                  g === null
                    ? null
                    : (p.h.edge === "right" &&
                        (y = new o.ComputedLength(
                          d.dimensions.w.rw -
                            y.rw -
                            f.styleAttrs[r.byName.extent.qname].w.rw,
                          -y.rh - f.styleAttrs[r.byName.extent.qname].w.rh
                        )),
                      { h: g, w: y }));
            }
          ),
          new l(
            i.ns_tts,
            "ruby",
            "none",
            ["span"],
            !1,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "rubyAlign",
            "center",
            ["span"],
            !0,
            !0,
            function (d) {
              return d !== "center" && d !== "spaceAround" ? null : d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "rubyPosition",
            "outside",
            ["span"],
            !0,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "rubyReserve",
            "none",
            ["p"],
            !0,
            !0,
            function (d) {
              var h = d.split(" "),
                f = [null, null];
              if (
                h.length === 0 ||
                h.length > 2 ||
                (h[0] !== "none" &&
                  h[0] !== "both" &&
                  h[0] !== "after" &&
                  h[0] !== "before" &&
                  h[0] !== "outside")
              )
                return null;
              if (((f[0] = h[0]), h.length === 2 && h[0] !== "none")) {
                var p = o.parseLength(h[1]);
                if (!p) return null;
                f[1] = p;
              }
              return f;
            },
            function (d, h, f, p, g) {
              return p[0] === "none"
                ? p
                : (y =
                    p[1] === null
                      ? new o.ComputedLength(
                          0.5 * f.styleAttrs[r.byName.fontSize.qname].rw,
                          0.5 * f.styleAttrs[r.byName.fontSize.qname].rh
                        )
                      : o.toComputedLength(
                          p[1].value,
                          p[1].unit,
                          f.styleAttrs[r.byName.fontSize.qname],
                          f.styleAttrs[r.byName.fontSize.qname],
                          d.cellLength.h,
                          d.pxLength.h
                        )) === null
                ? null
                : [p[0], y];
              var y;
            }
          ),
          new l(
            i.ns_tts,
            "showBackground",
            "always",
            ["region"],
            !1,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "textAlign",
            "start",
            ["p"],
            !0,
            !0,
            function (d) {
              return d;
            },
            function (d, h, f, p, g) {
              return p === "left" ? "start" : p === "right" ? "end" : p;
            }
          ),
          new l(
            i.ns_tts,
            "textCombine",
            "none",
            ["span"],
            !0,
            !0,
            function (d) {
              return d === "none" || d === "all" ? d : null;
            },
            null
          ),
          new l(
            i.ns_tts,
            "textDecoration",
            "none",
            ["span"],
            !0,
            !0,
            function (d) {
              return d.split(" ");
            },
            null
          ),
          new l(
            i.ns_tts,
            "textEmphasis",
            "none",
            ["span"],
            !0,
            !0,
            function (d) {
              for (
                var h = d.split(" "),
                  f = {
                    style: null,
                    symbol: null,
                    color: null,
                    position: null,
                  },
                  p = 0;
                p < h.length;
                p++
              )
                if (h[p] === "none" || h[p] === "auto") f.style = h[p];
                else if (h[p] === "filled" || h[p] === "open") f.style = h[p];
                else if (
                  h[p] === "circle" ||
                  h[p] === "dot" ||
                  h[p] === "sesame"
                )
                  f.symbol = h[p];
                else if (h[p] === "current") f.color = h[p];
                else if (
                  h[p] === "outside" ||
                  h[p] === "before" ||
                  h[p] === "after"
                )
                  f.position = h[p];
                else if (((f.color = o.parseColor(h[p])), f.color === null))
                  return null;
              return (
                f.style == null && f.symbol == null
                  ? (f.style = "auto")
                  : ((f.symbol = f.symbol || "circle"),
                    (f.style = f.style || "filled")),
                (f.position = f.position || "outside"),
                (f.color = f.color || "current"),
                f
              );
            },
            null
          ),
          new l(
            i.ns_tts,
            "textOutline",
            "none",
            ["span"],
            !0,
            !0,
            function (d) {
              if (d === "none") return d;
              var h = {},
                f = d.split(" ");
              if (f.length === 0 || f.length > 2) return null;
              var p = o.parseColor(f[0]);
              if (((h.color = p), p !== null && f.shift(), f.length !== 1))
                return null;
              var g = o.parseLength(f[0]);
              return g ? ((h.thickness = g), h) : null;
            },
            function (d, h, f, p, g) {
              if (p === "none") return p;
              var y = {};
              return (
                p.color === null
                  ? (y.color = f.styleAttrs[r.byName.color.qname])
                  : (y.color = p.color),
                (y.thickness = o.toComputedLength(
                  p.thickness.value,
                  p.thickness.unit,
                  f.styleAttrs[r.byName.fontSize.qname],
                  f.styleAttrs[r.byName.fontSize.qname],
                  d.cellLength.h,
                  d.pxLength.h
                )),
                y.thickness === null ? null : y
              );
            }
          ),
          new l(
            i.ns_tts,
            "textShadow",
            "none",
            ["span"],
            !0,
            !0,
            o.parseTextShadow,
            function (d, h, f, p) {
              if (p === "none") return p;
              for (var g = [], y = 0; y < p.length; y++) {
                var v = {};
                if (
                  ((v.x_off = o.toComputedLength(
                    p[y][0].value,
                    p[y][0].unit,
                    null,
                    f.styleAttrs[r.byName.fontSize.qname],
                    null,
                    d.pxLength.w
                  )),
                  v.x_off === null ||
                    ((v.y_off = o.toComputedLength(
                      p[y][1].value,
                      p[y][1].unit,
                      null,
                      f.styleAttrs[r.byName.fontSize.qname],
                      null,
                      d.pxLength.h
                    )),
                    v.y_off === null))
                )
                  return null;
                if (p[y][2] === null) v.b_radius = 0;
                else if (
                  ((v.b_radius = o.toComputedLength(
                    p[y][2].value,
                    p[y][2].unit,
                    null,
                    f.styleAttrs[r.byName.fontSize.qname],
                    null,
                    d.pxLength.h
                  )),
                  v.b_radius === null)
                )
                  return null;
                p[y][3] === null
                  ? (v.color = f.styleAttrs[r.byName.color.qname])
                  : (v.color = p[y][3]),
                  g.push(v);
              }
              return g;
            }
          ),
          new l(
            i.ns_tts,
            "unicodeBidi",
            "normal",
            ["span", "p"],
            !1,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "visibility",
            "visible",
            ["body", "div", "p", "region", "span"],
            !0,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "wrapOption",
            "wrap",
            ["span"],
            !0,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "writingMode",
            "lrtb",
            ["region"],
            !1,
            !0,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_tts,
            "zIndex",
            "auto",
            ["region"],
            !1,
            !0,
            function (d) {
              var h;
              return (
                d === "auto"
                  ? (h = d)
                  : ((h = parseInt(d)), isNaN(h) && (h = null)),
                h
              );
            },
            null
          ),
          new l(
            i.ns_ebutts,
            "linePadding",
            "0c",
            ["p"],
            !0,
            !1,
            o.parseLength,
            function (d, h, f, p, g) {
              return o.toComputedLength(
                p.value,
                p.unit,
                null,
                null,
                d.cellLength.w,
                null
              );
            }
          ),
          new l(
            i.ns_ebutts,
            "multiRowAlign",
            "auto",
            ["p"],
            !0,
            !1,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_smpte,
            "backgroundImage",
            null,
            ["div"],
            !1,
            !1,
            function (d) {
              return d;
            },
            null
          ),
          new l(
            i.ns_itts,
            "forcedDisplay",
            "false",
            ["body", "div", "p", "region", "span"],
            !0,
            !0,
            function (d) {
              return d === "true";
            },
            null
          ),
          new l(
            i.ns_itts,
            "fillLineGap",
            "false",
            ["p"],
            !0,
            !0,
            function (d) {
              return d === "true";
            },
            null
          ),
        ]),
        (r.byQName = {}),
        r.all))
          r.byQName[r.all[u].qname] = r.all[u];
        for (var c in ((r.byName = {}), r.all))
          r.byName[r.all[c].name] = r.all[c];
      })(
        e,
        typeof imscNames > "u" ? n(977) : imscNames,
        typeof imscUtils > "u" ? n(6404) : imscUtils
      );
    },
    6404: function (t, e) {
      (function (n) {
        var r =
            /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?/,
          i = /rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,
          o = /rgba\(\s*(\d+),\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/,
          l = {
            transparent: [0, 0, 0, 0],
            black: [0, 0, 0, 255],
            silver: [192, 192, 192, 255],
            gray: [128, 128, 128, 255],
            white: [255, 255, 255, 255],
            maroon: [128, 0, 0, 255],
            red: [255, 0, 0, 255],
            purple: [128, 0, 128, 255],
            fuchsia: [255, 0, 255, 255],
            magenta: [255, 0, 255, 255],
            green: [0, 128, 0, 255],
            lime: [0, 255, 0, 255],
            olive: [128, 128, 0, 255],
            yellow: [255, 255, 0, 255],
            navy: [0, 0, 128, 255],
            blue: [0, 0, 255, 255],
            teal: [0, 128, 128, 255],
            aqua: [0, 255, 255, 255],
            cyan: [0, 255, 255, 255],
          };
        n.parseColor = function (c) {
          var d,
            h = null,
            f = l[c.toLowerCase()];
          return (
            f !== void 0
              ? (h = f)
              : (d = r.exec(c)) !== null
              ? (h = [
                  parseInt(d[1], 16),
                  parseInt(d[2], 16),
                  parseInt(d[3], 16),
                  d[4] !== void 0 ? parseInt(d[4], 16) : 255,
                ])
              : (d = i.exec(c)) !== null
              ? (h = [parseInt(d[1]), parseInt(d[2]), parseInt(d[3]), 255])
              : (d = o.exec(c)) !== null &&
                (h = [
                  parseInt(d[1]),
                  parseInt(d[2]),
                  parseInt(d[3]),
                  parseInt(d[4]),
                ]),
            h
          );
        };
        var u = /^((?:\+|\-)?\d*(?:\.\d+)?)(px|em|c|%|rh|rw)$/;
        (n.parseLength = function (c) {
          var d,
            h = null;
          return (
            (d = u.exec(c)) !== null &&
              (h = { value: parseFloat(d[1]), unit: d[2] }),
            h
          );
        }),
          (n.parseTextShadow = function (c) {
            for (
              var d = c.match(/([^\(,\)]|\([^\)]+\))+/g), h = [], f = 0;
              f < d.length;
              f++
            ) {
              var p = d[f].split(" ");
              if (p.length === 1 && p[0] === "none") return "none";
              if (p.length > 1 && p.length < 5) {
                var g = [null, null, null, null],
                  y = n.parseLength(p.shift());
                if (
                  y === null ||
                  ((g[0] = y), (y = n.parseLength(p.shift())) === null)
                )
                  return null;
                if (((g[1] = y), p.length === 0)) {
                  h.push(g);
                  continue;
                }
                if (
                  ((y = n.parseLength(p[0])) !== null &&
                    ((g[2] = y), p.shift()),
                  p.length === 0)
                ) {
                  h.push(g);
                  continue;
                }
                var v = n.parseColor(p[0]);
                if (v === null) return null;
                (g[3] = v), h.push(g);
              }
            }
            return h;
          }),
          (n.parsePosition = function (c) {
            var d = c.split(" "),
              h = function (w) {
                return (
                  w === "center" ||
                  w === "left" ||
                  w === "top" ||
                  w === "bottom" ||
                  w === "right"
                );
              };
            if (d.length > 4) return null;
            for (var f = 0; f < d.length; f++)
              if (!h(d[f])) {
                var p = n.parseLength(d[f]);
                if (p === null) return null;
                d[f] = p;
              }
            for (
              var g = {
                  h: { edge: "left", offset: { value: 50, unit: "%" } },
                  v: { edge: "top", offset: { value: 50, unit: "%" } },
                },
                y = 0;
              y < d.length;

            ) {
              var v = d[y++];
              if (h(v)) {
                var b = { value: 0, unit: "%" };
                d.length !== 2 && y < d.length && !h(d[y]) && (b = d[y++]),
                  v === "right"
                    ? ((g.h.edge = v), (g.h.offset = b))
                    : v === "bottom"
                    ? ((g.v.edge = v), (g.v.offset = b))
                    : v === "left"
                    ? (g.h.offset = b)
                    : v === "top" && (g.v.offset = b);
              } else {
                if (d.length !== 1 && d.length !== 2) return null;
                y === 1 ? (g.h.offset = v) : (g.v.offset = v);
              }
            }
            return g;
          }),
          (n.ComputedLength = function (c, d) {
            (this.rw = c), (this.rh = d);
          }),
          (n.ComputedLength.prototype.toUsedLength = function (c, d) {
            return c * this.rw + d * this.rh;
          }),
          (n.ComputedLength.prototype.isZero = function () {
            return this.rw === 0 && this.rh === 0;
          }),
          (n.toComputedLength = function (c, d, h, f, p, g) {
            return d === "%" && f
              ? new n.ComputedLength((f.rw * c) / 100, (f.rh * c) / 100)
              : d === "em" && h
              ? new n.ComputedLength(h.rw * c, h.rh * c)
              : d === "c" && p
              ? new n.ComputedLength(c * p.rw, c * p.rh)
              : d === "px" && g
              ? new n.ComputedLength(c * g.rw, c * g.rh)
              : d === "rh"
              ? new n.ComputedLength(0, c / 100)
              : d === "rw"
              ? new n.ComputedLength(c / 100, 0)
              : null;
          });
      })(e);
    },
    7523: function (t) {
      typeof Object.create == "function"
        ? (t.exports = function (e, n) {
            n &&
              ((e.super_ = n),
              (e.prototype = Object.create(n.prototype, {
                constructor: {
                  value: e,
                  enumerable: !1,
                  writable: !0,
                  configurable: !0,
                },
              })));
          })
        : (t.exports = function (e, n) {
            if (n) {
              e.super_ = n;
              var r = function () {};
              (r.prototype = n.prototype),
                (e.prototype = new r()),
                (e.prototype.constructor = e);
            }
          });
    },
    3282: function (t) {
      function e(i) {
        if (typeof i != "string")
          throw new TypeError(
            "Path must be a string. Received " + JSON.stringify(i)
          );
      }
      function n(i, o) {
        for (var l, u = "", c = 0, d = -1, h = 0, f = 0; f <= i.length; ++f) {
          if (f < i.length) l = i.charCodeAt(f);
          else {
            if (l === 47) break;
            l = 47;
          }
          if (l === 47) {
            if (!(d === f - 1 || h === 1))
              if (d !== f - 1 && h === 2) {
                if (
                  u.length < 2 ||
                  c !== 2 ||
                  u.charCodeAt(u.length - 1) !== 46 ||
                  u.charCodeAt(u.length - 2) !== 46
                ) {
                  if (u.length > 2) {
                    var p = u.lastIndexOf("/");
                    if (p !== u.length - 1) {
                      p === -1
                        ? ((u = ""), (c = 0))
                        : (c =
                            (u = u.slice(0, p)).length -
                            1 -
                            u.lastIndexOf("/")),
                        (d = f),
                        (h = 0);
                      continue;
                    }
                  } else if (u.length === 2 || u.length === 1) {
                    (u = ""), (c = 0), (d = f), (h = 0);
                    continue;
                  }
                }
                o && (u.length > 0 ? (u += "/..") : (u = ".."), (c = 2));
              } else
                u.length > 0
                  ? (u += "/" + i.slice(d + 1, f))
                  : (u = i.slice(d + 1, f)),
                  (c = f - d - 1);
            (d = f), (h = 0);
          } else l === 46 && h !== -1 ? ++h : (h = -1);
        }
        return u;
      }
      var r = {
        resolve: function () {
          for (
            var i, o = "", l = !1, u = arguments.length - 1;
            u >= -1 && !l;
            u--
          ) {
            var c;
            u >= 0
              ? (c = arguments[u])
              : (i === void 0 && (i = process.cwd()), (c = i)),
              e(c),
              c.length !== 0 &&
                ((o = c + "/" + o), (l = c.charCodeAt(0) === 47));
          }
          return (
            (o = n(o, !l)),
            l ? (o.length > 0 ? "/" + o : "/") : o.length > 0 ? o : "."
          );
        },
        normalize: function (i) {
          if ((e(i), i.length === 0)) return ".";
          var o = i.charCodeAt(0) === 47,
            l = i.charCodeAt(i.length - 1) === 47;
          return (
            (i = n(i, !o)).length !== 0 || o || (i = "."),
            i.length > 0 && l && (i += "/"),
            o ? "/" + i : i
          );
        },
        isAbsolute: function (i) {
          return e(i), i.length > 0 && i.charCodeAt(0) === 47;
        },
        join: function () {
          if (arguments.length === 0) return ".";
          for (var i, o = 0; o < arguments.length; ++o) {
            var l = arguments[o];
            e(l), l.length > 0 && (i === void 0 ? (i = l) : (i += "/" + l));
          }
          return i === void 0 ? "." : r.normalize(i);
        },
        relative: function (i, o) {
          if (
            (e(i), e(o), i === o || (i = r.resolve(i)) === (o = r.resolve(o)))
          )
            return "";
          for (var l = 1; l < i.length && i.charCodeAt(l) === 47; ++l);
          for (
            var u = i.length, c = u - l, d = 1;
            d < o.length && o.charCodeAt(d) === 47;
            ++d
          );
          for (
            var h = o.length - d, f = c < h ? c : h, p = -1, g = 0;
            g <= f;
            ++g
          ) {
            if (g === f) {
              if (h > f) {
                if (o.charCodeAt(d + g) === 47) return o.slice(d + g + 1);
                if (g === 0) return o.slice(d + g);
              } else
                c > f &&
                  (i.charCodeAt(l + g) === 47 ? (p = g) : g === 0 && (p = 0));
              break;
            }
            var y = i.charCodeAt(l + g);
            if (y !== o.charCodeAt(d + g)) break;
            y === 47 && (p = g);
          }
          var v = "";
          for (g = l + p + 1; g <= u; ++g)
            (g !== u && i.charCodeAt(g) !== 47) ||
              (v.length === 0 ? (v += "..") : (v += "/.."));
          return v.length > 0
            ? v + o.slice(d + p)
            : ((d += p), o.charCodeAt(d) === 47 && ++d, o.slice(d));
        },
        _makeLong: function (i) {
          return i;
        },
        dirname: function (i) {
          if ((e(i), i.length === 0)) return ".";
          for (
            var o = i.charCodeAt(0),
              l = o === 47,
              u = -1,
              c = !0,
              d = i.length - 1;
            d >= 1;
            --d
          )
            if ((o = i.charCodeAt(d)) === 47) {
              if (!c) {
                u = d;
                break;
              }
            } else c = !1;
          return u === -1
            ? l
              ? "/"
              : "."
            : l && u === 1
            ? "//"
            : i.slice(0, u);
        },
        basename: function (i, o) {
          if (o !== void 0 && typeof o != "string")
            throw new TypeError('"ext" argument must be a string');
          e(i);
          var l,
            u = 0,
            c = -1,
            d = !0;
          if (o !== void 0 && o.length > 0 && o.length <= i.length) {
            if (o.length === i.length && o === i) return "";
            var h = o.length - 1,
              f = -1;
            for (l = i.length - 1; l >= 0; --l) {
              var p = i.charCodeAt(l);
              if (p === 47) {
                if (!d) {
                  u = l + 1;
                  break;
                }
              } else
                f === -1 && ((d = !1), (f = l + 1)),
                  h >= 0 &&
                    (p === o.charCodeAt(h)
                      ? --h == -1 && (c = l)
                      : ((h = -1), (c = f)));
            }
            return (
              u === c ? (c = f) : c === -1 && (c = i.length), i.slice(u, c)
            );
          }
          for (l = i.length - 1; l >= 0; --l)
            if (i.charCodeAt(l) === 47) {
              if (!d) {
                u = l + 1;
                break;
              }
            } else c === -1 && ((d = !1), (c = l + 1));
          return c === -1 ? "" : i.slice(u, c);
        },
        extname: function (i) {
          e(i);
          for (
            var o = -1, l = 0, u = -1, c = !0, d = 0, h = i.length - 1;
            h >= 0;
            --h
          ) {
            var f = i.charCodeAt(h);
            if (f !== 47)
              u === -1 && ((c = !1), (u = h + 1)),
                f === 46
                  ? o === -1
                    ? (o = h)
                    : d !== 1 && (d = 1)
                  : o !== -1 && (d = -1);
            else if (!c) {
              l = h + 1;
              break;
            }
          }
          return o === -1 ||
            u === -1 ||
            d === 0 ||
            (d === 1 && o === u - 1 && o === l + 1)
            ? ""
            : i.slice(o, u);
        },
        format: function (i) {
          if (i === null || typeof i != "object")
            throw new TypeError(
              'The "pathObject" argument must be of type Object. Received type ' +
                typeof i
            );
          return (
            (l = (o = i).dir || o.root),
            (u = o.base || (o.name || "") + (o.ext || "")),
            l ? (l === o.root ? l + u : l + "/" + u) : u
          );
          var o, l, u;
        },
        parse: function (i) {
          e(i);
          var o = { root: "", dir: "", base: "", ext: "", name: "" };
          if (i.length === 0) return o;
          var l,
            u = i.charCodeAt(0),
            c = u === 47;
          c ? ((o.root = "/"), (l = 1)) : (l = 0);
          for (
            var d = -1, h = 0, f = -1, p = !0, g = i.length - 1, y = 0;
            g >= l;
            --g
          )
            if ((u = i.charCodeAt(g)) !== 47)
              f === -1 && ((p = !1), (f = g + 1)),
                u === 46
                  ? d === -1
                    ? (d = g)
                    : y !== 1 && (y = 1)
                  : d !== -1 && (y = -1);
            else if (!p) {
              h = g + 1;
              break;
            }
          return (
            d === -1 ||
            f === -1 ||
            y === 0 ||
            (y === 1 && d === f - 1 && d === h + 1)
              ? f !== -1 &&
                (o.base = o.name = h === 0 && c ? i.slice(1, f) : i.slice(h, f))
              : (h === 0 && c
                  ? ((o.name = i.slice(1, d)), (o.base = i.slice(1, f)))
                  : ((o.name = i.slice(h, d)), (o.base = i.slice(h, f))),
                (o.ext = i.slice(d, f))),
            h > 0 ? (o.dir = i.slice(0, h - 1)) : c && (o.dir = "/"),
            o
          );
        },
        sep: "/",
        delimiter: ":",
        win32: null,
        posix: null,
      };
      (r.posix = r), (t.exports = r);
    },
    3515: function (t, e, n) {
      t.exports = i;
      var r = n(9826).EventEmitter;
      function i() {
        r.call(this);
      }
      n(7523)(i, r),
        (i.Readable = n(2762)),
        (i.Writable = n(3726)),
        (i.Duplex = n(884)),
        (i.Transform = n(6756)),
        (i.PassThrough = n(1390)),
        (i.finished = n(2896)),
        (i.pipeline = n(8460)),
        (i.Stream = i),
        (i.prototype.pipe = function (o, l) {
          var u = this;
          function c(v) {
            o.writable && o.write(v) === !1 && u.pause && u.pause();
          }
          function d() {
            u.readable && u.resume && u.resume();
          }
          u.on("data", c),
            o.on("drain", d),
            o._isStdio ||
              (l && l.end === !1) ||
              (u.on("end", f), u.on("close", p));
          var h = !1;
          function f() {
            h || ((h = !0), o.end());
          }
          function p() {
            h || ((h = !0), typeof o.destroy == "function" && o.destroy());
          }
          function g(v) {
            if ((y(), r.listenerCount(this, "error") === 0)) throw v;
          }
          function y() {
            u.removeListener("data", c),
              o.removeListener("drain", d),
              u.removeListener("end", f),
              u.removeListener("close", p),
              u.removeListener("error", g),
              o.removeListener("error", g),
              u.removeListener("end", y),
              u.removeListener("close", y),
              o.removeListener("close", y);
          }
          return (
            u.on("error", g),
            o.on("error", g),
            u.on("end", y),
            u.on("close", y),
            o.on("close", y),
            o.emit("pipe", u),
            o
          );
        });
    },
    1602: function (t) {
      var e = {};
      function n(i, o, l) {
        l || (l = Error);
        var u = (function (c) {
          var d, h;
          function f(p, g, y) {
            return (
              c.call(
                this,
                ((v = p),
                (b = g),
                (w = y),
                typeof o == "string" ? o : o(v, b, w))
              ) || this
            );
            var v, b, w;
          }
          return (
            (h = c),
            ((d = f).prototype = Object.create(h.prototype)),
            (d.prototype.constructor = d),
            (d.__proto__ = h),
            f
          );
        })(l);
        (u.prototype.name = l.name), (u.prototype.code = i), (e[i] = u);
      }
      function r(i, o) {
        if (Array.isArray(i)) {
          var l = i.length;
          return (
            (i = i.map(function (u) {
              return String(u);
            })),
            l > 2
              ? "one of "
                  .concat(o, " ")
                  .concat(i.slice(0, l - 1).join(", "), ", or ") + i[l - 1]
              : l === 2
              ? "one of ".concat(o, " ").concat(i[0], " or ").concat(i[1])
              : "of ".concat(o, " ").concat(i[0])
          );
        }
        return "of ".concat(o, " ").concat(String(i));
      }
      n(
        "ERR_INVALID_OPT_VALUE",
        function (i, o) {
          return 'The value "' + o + '" is invalid for option "' + i + '"';
        },
        TypeError
      ),
        n(
          "ERR_INVALID_ARG_TYPE",
          function (i, o, l) {
            var u, c, d, h, f, p;
            if (
              (typeof o == "string" && o.substr(0, 4) === "not "
                ? ((u = "must not be"), (o = o.replace(/^not /, "")))
                : (u = "must be"),
              (f = i),
              (p === void 0 || p > f.length) && (p = f.length),
              f.substring(p - 9, p) === " argument")
            )
              c = "The ".concat(i, " ").concat(u, " ").concat(r(o, "type"));
            else {
              var g =
                (typeof h != "number" && (h = 0),
                h + 1 > (d = i).length || d.indexOf(".", h) === -1
                  ? "argument"
                  : "property");
              c = 'The "'
                .concat(i, '" ')
                .concat(g, " ")
                .concat(u, " ")
                .concat(r(o, "type"));
            }
            return c + ". Received type ".concat(typeof l);
          },
          TypeError
        ),
        n("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"),
        n("ERR_METHOD_NOT_IMPLEMENTED", function (i) {
          return "The " + i + " method is not implemented";
        }),
        n("ERR_STREAM_PREMATURE_CLOSE", "Premature close"),
        n("ERR_STREAM_DESTROYED", function (i) {
          return "Cannot call " + i + " after a stream was destroyed";
        }),
        n("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"),
        n("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"),
        n("ERR_STREAM_WRITE_AFTER_END", "write after end"),
        n(
          "ERR_STREAM_NULL_VALUES",
          "May not write null values to stream",
          TypeError
        ),
        n(
          "ERR_UNKNOWN_ENCODING",
          function (i) {
            return "Unknown encoding: " + i;
          },
          TypeError
        ),
        n(
          "ERR_STREAM_UNSHIFT_AFTER_END_EVENT",
          "stream.unshift() after end event"
        ),
        (t.exports.codes = e);
    },
    884: function (t, e, n) {
      var r =
        Object.keys ||
        function (p) {
          var g = [];
          for (var y in p) g.push(y);
          return g;
        };
      t.exports = d;
      var i = n(2762),
        o = n(3726);
      n(7523)(d, i);
      for (var l = r(o.prototype), u = 0; u < l.length; u++) {
        var c = l[u];
        d.prototype[c] || (d.prototype[c] = o.prototype[c]);
      }
      function d(p) {
        if (!(this instanceof d)) return new d(p);
        i.call(this, p),
          o.call(this, p),
          (this.allowHalfOpen = !0),
          p &&
            (p.readable === !1 && (this.readable = !1),
            p.writable === !1 && (this.writable = !1),
            p.allowHalfOpen === !1 &&
              ((this.allowHalfOpen = !1), this.once("end", h)));
      }
      function h() {
        this._writableState.ended || process.nextTick(f, this);
      }
      function f(p) {
        p.end();
      }
      Object.defineProperty(d.prototype, "writableHighWaterMark", {
        enumerable: !1,
        get: function () {
          return this._writableState.highWaterMark;
        },
      }),
        Object.defineProperty(d.prototype, "writableBuffer", {
          enumerable: !1,
          get: function () {
            return this._writableState && this._writableState.getBuffer();
          },
        }),
        Object.defineProperty(d.prototype, "writableLength", {
          enumerable: !1,
          get: function () {
            return this._writableState.length;
          },
        }),
        Object.defineProperty(d.prototype, "destroyed", {
          enumerable: !1,
          get: function () {
            return (
              this._readableState !== void 0 &&
              this._writableState !== void 0 &&
              this._readableState.destroyed &&
              this._writableState.destroyed
            );
          },
          set: function (p) {
            this._readableState !== void 0 &&
              this._writableState !== void 0 &&
              ((this._readableState.destroyed = p),
              (this._writableState.destroyed = p));
          },
        });
    },
    1390: function (t, e, n) {
      t.exports = i;
      var r = n(6756);
      function i(o) {
        if (!(this instanceof i)) return new i(o);
        r.call(this, o);
      }
      n(7523)(i, r),
        (i.prototype._transform = function (o, l, u) {
          u(null, o);
        });
    },
    2762: function (t, e, n) {
      var r;
      (t.exports = O), (O.ReadableState = I), n(9826).EventEmitter;
      var i,
        o = function (ot, tt) {
          return ot.listeners(tt).length;
        },
        l = n(2611),
        u = n(44).Buffer,
        c =
          (n.g !== void 0
            ? n.g
            : typeof window < "u"
            ? window
            : typeof self < "u"
            ? self
            : {}
          ).Uint8Array || function () {},
        d = n(7199);
      i = d && d.debuglog ? d.debuglog("stream") : function () {};
      var h,
        f,
        p,
        g = n(3791),
        y = n(2410),
        v = n(1749).getHighWaterMark,
        b = n(1602).codes,
        w = b.ERR_INVALID_ARG_TYPE,
        k = b.ERR_STREAM_PUSH_AFTER_EOF,
        D = b.ERR_METHOD_NOT_IMPLEMENTED,
        $ = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
      n(7523)(O, l);
      var N = y.errorOrDestroy,
        P = ["error", "close", "destroy", "pause", "resume"];
      function I(ot, tt, He) {
        (r = r || n(884)),
          (ot = ot || {}),
          typeof He != "boolean" && (He = tt instanceof r),
          (this.objectMode = !!ot.objectMode),
          He && (this.objectMode = this.objectMode || !!ot.readableObjectMode),
          (this.highWaterMark = v(this, ot, "readableHighWaterMark", He)),
          (this.buffer = new g()),
          (this.length = 0),
          (this.pipes = null),
          (this.pipesCount = 0),
          (this.flowing = null),
          (this.ended = !1),
          (this.endEmitted = !1),
          (this.reading = !1),
          (this.sync = !0),
          (this.needReadable = !1),
          (this.emittedReadable = !1),
          (this.readableListening = !1),
          (this.resumeScheduled = !1),
          (this.paused = !0),
          (this.emitClose = ot.emitClose !== !1),
          (this.autoDestroy = !!ot.autoDestroy),
          (this.destroyed = !1),
          (this.defaultEncoding = ot.defaultEncoding || "utf8"),
          (this.awaitDrain = 0),
          (this.readingMore = !1),
          (this.decoder = null),
          (this.encoding = null),
          ot.encoding &&
            (h || (h = n(748).StringDecoder),
            (this.decoder = new h(ot.encoding)),
            (this.encoding = ot.encoding));
      }
      function O(ot) {
        if (((r = r || n(884)), !(this instanceof O))) return new O(ot);
        var tt = this instanceof r;
        (this._readableState = new I(ot, this, tt)),
          (this.readable = !0),
          ot &&
            (typeof ot.read == "function" && (this._read = ot.read),
            typeof ot.destroy == "function" && (this._destroy = ot.destroy)),
          l.call(this);
      }
      function X(ot, tt, He, de, ue) {
        i("readableAddChunk", tt);
        var Z,
          ie,
          Ne,
          Pe,
          kt,
          Gt = ot._readableState;
        if (tt === null)
          (Gt.reading = !1),
            (function (B, re) {
              if ((i("onEofChunk"), !re.ended)) {
                if (re.decoder) {
                  var Ae = re.decoder.end();
                  Ae &&
                    Ae.length &&
                    (re.buffer.push(Ae),
                    (re.length += re.objectMode ? 1 : Ae.length));
                }
                (re.ended = !0),
                  re.sync
                    ? S(B)
                    : ((re.needReadable = !1),
                      re.emittedReadable || ((re.emittedReadable = !0), L(B)));
              }
            })(ot, Gt);
        else if (
          (ue ||
            ((ie = Gt),
            (kt = Ne = tt),
            u.isBuffer(kt) ||
              kt instanceof c ||
              typeof Ne == "string" ||
              Ne === void 0 ||
              ie.objectMode ||
              (Pe = new w("chunk", ["string", "Buffer", "Uint8Array"], Ne)),
            (Z = Pe)),
          Z)
        )
          N(ot, Z);
        else if (Gt.objectMode || (tt && tt.length > 0))
          if (
            (typeof tt == "string" ||
              Gt.objectMode ||
              Object.getPrototypeOf(tt) === u.prototype ||
              (tt = (function (B) {
                return u.from(B);
              })(tt)),
            de)
          )
            Gt.endEmitted ? N(ot, new $()) : G(ot, Gt, tt, !0);
          else if (Gt.ended) N(ot, new k());
          else {
            if (Gt.destroyed) return !1;
            (Gt.reading = !1),
              Gt.decoder && !He
                ? ((tt = Gt.decoder.write(tt)),
                  Gt.objectMode || tt.length !== 0
                    ? G(ot, Gt, tt, !1)
                    : W(ot, Gt))
                : G(ot, Gt, tt, !1);
          }
        else de || ((Gt.reading = !1), W(ot, Gt));
        return !Gt.ended && (Gt.length < Gt.highWaterMark || Gt.length === 0);
      }
      function G(ot, tt, He, de) {
        tt.flowing && tt.length === 0 && !tt.sync
          ? ((tt.awaitDrain = 0), ot.emit("data", He))
          : ((tt.length += tt.objectMode ? 1 : He.length),
            de ? tt.buffer.unshift(He) : tt.buffer.push(He),
            tt.needReadable && S(ot)),
          W(ot, tt);
      }
      Object.defineProperty(O.prototype, "destroyed", {
        enumerable: !1,
        get: function () {
          return (
            this._readableState !== void 0 && this._readableState.destroyed
          );
        },
        set: function (ot) {
          this._readableState && (this._readableState.destroyed = ot);
        },
      }),
        (O.prototype.destroy = y.destroy),
        (O.prototype._undestroy = y.undestroy),
        (O.prototype._destroy = function (ot, tt) {
          tt(ot);
        }),
        (O.prototype.push = function (ot, tt) {
          var He,
            de = this._readableState;
          return (
            de.objectMode
              ? (He = !0)
              : typeof ot == "string" &&
                ((tt = tt || de.defaultEncoding) !== de.encoding &&
                  ((ot = u.from(ot, tt)), (tt = "")),
                (He = !0)),
            X(this, ot, tt, !1, He)
          );
        }),
        (O.prototype.unshift = function (ot) {
          return X(this, ot, null, !0, !1);
        }),
        (O.prototype.isPaused = function () {
          return this._readableState.flowing === !1;
        }),
        (O.prototype.setEncoding = function (ot) {
          h || (h = n(748).StringDecoder);
          var tt = new h(ot);
          (this._readableState.decoder = tt),
            (this._readableState.encoding =
              this._readableState.decoder.encoding);
          for (var He = this._readableState.buffer.head, de = ""; He !== null; )
            (de += tt.write(He.data)), (He = He.next);
          return (
            this._readableState.buffer.clear(),
            de !== "" && this._readableState.buffer.push(de),
            (this._readableState.length = de.length),
            this
          );
        });
      var H = 1073741824;
      function E(ot, tt) {
        return ot <= 0 || (tt.length === 0 && tt.ended)
          ? 0
          : tt.objectMode
          ? 1
          : ot != ot
          ? tt.flowing && tt.length
            ? tt.buffer.head.data.length
            : tt.length
          : (ot > tt.highWaterMark &&
              (tt.highWaterMark =
                ((He = ot) >= H
                  ? (He = H)
                  : (He--,
                    (He |= He >>> 1),
                    (He |= He >>> 2),
                    (He |= He >>> 4),
                    (He |= He >>> 8),
                    (He |= He >>> 16),
                    He++),
                He)),
            ot <= tt.length
              ? ot
              : tt.ended
              ? tt.length
              : ((tt.needReadable = !0), 0));
        var He;
      }
      function S(ot) {
        var tt = ot._readableState;
        i("emitReadable", tt.needReadable, tt.emittedReadable),
          (tt.needReadable = !1),
          tt.emittedReadable ||
            (i("emitReadable", tt.flowing),
            (tt.emittedReadable = !0),
            process.nextTick(L, ot));
      }
      function L(ot) {
        var tt = ot._readableState;
        i("emitReadable_", tt.destroyed, tt.length, tt.ended),
          tt.destroyed ||
            (!tt.length && !tt.ended) ||
            (ot.emit("readable"), (tt.emittedReadable = !1)),
          (tt.needReadable =
            !tt.flowing && !tt.ended && tt.length <= tt.highWaterMark),
          ze(ot);
      }
      function W(ot, tt) {
        tt.readingMore || ((tt.readingMore = !0), process.nextTick(F, ot, tt));
      }
      function F(ot, tt) {
        for (
          ;
          !tt.reading &&
          !tt.ended &&
          (tt.length < tt.highWaterMark || (tt.flowing && tt.length === 0));

        ) {
          var He = tt.length;
          if ((i("maybeReadMore read 0"), ot.read(0), He === tt.length)) break;
        }
        tt.readingMore = !1;
      }
      function oe(ot) {
        var tt = ot._readableState;
        (tt.readableListening = ot.listenerCount("readable") > 0),
          tt.resumeScheduled && !tt.paused
            ? (tt.flowing = !0)
            : ot.listenerCount("data") > 0 && ot.resume();
      }
      function De(ot) {
        i("readable nexttick read 0"), ot.read(0);
      }
      function Xe(ot, tt) {
        i("resume", tt.reading),
          tt.reading || ot.read(0),
          (tt.resumeScheduled = !1),
          ot.emit("resume"),
          ze(ot),
          tt.flowing && !tt.reading && ot.read(0);
      }
      function ze(ot) {
        var tt = ot._readableState;
        for (i("flow", tt.flowing); tt.flowing && ot.read() !== null; );
      }
      function ht(ot, tt) {
        return tt.length === 0
          ? null
          : (tt.objectMode
              ? (He = tt.buffer.shift())
              : !ot || ot >= tt.length
              ? ((He = tt.decoder
                  ? tt.buffer.join("")
                  : tt.buffer.length === 1
                  ? tt.buffer.first()
                  : tt.buffer.concat(tt.length)),
                tt.buffer.clear())
              : (He = tt.buffer.consume(ot, tt.decoder)),
            He);
        var He;
      }
      function gt(ot) {
        var tt = ot._readableState;
        i("endReadable", tt.endEmitted),
          tt.endEmitted || ((tt.ended = !0), process.nextTick(pt, tt, ot));
      }
      function pt(ot, tt) {
        if (
          (i("endReadableNT", ot.endEmitted, ot.length),
          !ot.endEmitted &&
            ot.length === 0 &&
            ((ot.endEmitted = !0),
            (tt.readable = !1),
            tt.emit("end"),
            ot.autoDestroy))
        ) {
          var He = tt._writableState;
          (!He || (He.autoDestroy && He.finished)) && tt.destroy();
        }
      }
      function $t(ot, tt) {
        for (var He = 0, de = ot.length; He < de; He++)
          if (ot[He] === tt) return He;
        return -1;
      }
      (O.prototype.read = function (ot) {
        i("read", ot), (ot = parseInt(ot, 10));
        var tt = this._readableState,
          He = ot;
        if (
          (ot !== 0 && (tt.emittedReadable = !1),
          ot === 0 &&
            tt.needReadable &&
            ((tt.highWaterMark !== 0
              ? tt.length >= tt.highWaterMark
              : tt.length > 0) ||
              tt.ended))
        )
          return (
            i("read: emitReadable", tt.length, tt.ended),
            tt.length === 0 && tt.ended ? gt(this) : S(this),
            null
          );
        if ((ot = E(ot, tt)) === 0 && tt.ended)
          return tt.length === 0 && gt(this), null;
        var de,
          ue = tt.needReadable;
        return (
          i("need readable", ue),
          (tt.length === 0 || tt.length - ot < tt.highWaterMark) &&
            i("length less than watermark", (ue = !0)),
          tt.ended || tt.reading
            ? i("reading or ended", (ue = !1))
            : ue &&
              (i("do read"),
              (tt.reading = !0),
              (tt.sync = !0),
              tt.length === 0 && (tt.needReadable = !0),
              this._read(tt.highWaterMark),
              (tt.sync = !1),
              tt.reading || (ot = E(He, tt))),
          (de = ot > 0 ? ht(ot, tt) : null) === null
            ? ((tt.needReadable = tt.length <= tt.highWaterMark), (ot = 0))
            : ((tt.length -= ot), (tt.awaitDrain = 0)),
          tt.length === 0 &&
            (tt.ended || (tt.needReadable = !0),
            He !== ot && tt.ended && gt(this)),
          de !== null && this.emit("data", de),
          de
        );
      }),
        (O.prototype._read = function (ot) {
          N(this, new D("_read()"));
        }),
        (O.prototype.pipe = function (ot, tt) {
          var He = this,
            de = this._readableState;
          switch (de.pipesCount) {
            case 0:
              de.pipes = ot;
              break;
            case 1:
              de.pipes = [de.pipes, ot];
              break;
            default:
              de.pipes.push(ot);
          }
          (de.pipesCount += 1), i("pipe count=%d opts=%j", de.pipesCount, tt);
          var ue =
            (tt && tt.end === !1) ||
            ot === process.stdout ||
            ot === process.stderr
              ? Ae
              : Z;
          function Z() {
            i("onend"), ot.end();
          }
          de.endEmitted ? process.nextTick(ue) : He.once("end", ue),
            ot.on("unpipe", function lt(Et, St) {
              i("onunpipe"),
                Et === He &&
                  St &&
                  St.hasUnpiped === !1 &&
                  ((St.hasUnpiped = !0),
                  i("cleanup"),
                  ot.removeListener("close", B),
                  ot.removeListener("finish", re),
                  ot.removeListener("drain", Ne),
                  ot.removeListener("error", Gt),
                  ot.removeListener("unpipe", lt),
                  He.removeListener("end", Z),
                  He.removeListener("end", Ae),
                  He.removeListener("data", kt),
                  (Pe = !0),
                  !de.awaitDrain ||
                    (ot._writableState && !ot._writableState.needDrain) ||
                    Ne());
            });
          var ie,
            Ne =
              ((ie = He),
              function () {
                var lt = ie._readableState;
                i("pipeOnDrain", lt.awaitDrain),
                  lt.awaitDrain && lt.awaitDrain--,
                  lt.awaitDrain === 0 &&
                    o(ie, "data") &&
                    ((lt.flowing = !0), ze(ie));
              });
          ot.on("drain", Ne);
          var Pe = !1;
          function kt(lt) {
            i("ondata");
            var Et = ot.write(lt);
            i("dest.write", Et),
              Et === !1 &&
                (((de.pipesCount === 1 && de.pipes === ot) ||
                  (de.pipesCount > 1 && $t(de.pipes, ot) !== -1)) &&
                  !Pe &&
                  (i("false write response, pause", de.awaitDrain),
                  de.awaitDrain++),
                He.pause());
          }
          function Gt(lt) {
            i("onerror", lt),
              Ae(),
              ot.removeListener("error", Gt),
              o(ot, "error") === 0 && N(ot, lt);
          }
          function B() {
            ot.removeListener("finish", re), Ae();
          }
          function re() {
            i("onfinish"), ot.removeListener("close", B), Ae();
          }
          function Ae() {
            i("unpipe"), He.unpipe(ot);
          }
          return (
            He.on("data", kt),
            (function (lt, Et, St) {
              if (typeof lt.prependListener == "function")
                return lt.prependListener(Et, St);
              lt._events && lt._events[Et]
                ? Array.isArray(lt._events[Et])
                  ? lt._events[Et].unshift(St)
                  : (lt._events[Et] = [St, lt._events[Et]])
                : lt.on(Et, St);
            })(ot, "error", Gt),
            ot.once("close", B),
            ot.once("finish", re),
            ot.emit("pipe", He),
            de.flowing || (i("pipe resume"), He.resume()),
            ot
          );
        }),
        (O.prototype.unpipe = function (ot) {
          var tt = this._readableState,
            He = { hasUnpiped: !1 };
          if (tt.pipesCount === 0) return this;
          if (tt.pipesCount === 1)
            return (
              (ot && ot !== tt.pipes) ||
                (ot || (ot = tt.pipes),
                (tt.pipes = null),
                (tt.pipesCount = 0),
                (tt.flowing = !1),
                ot && ot.emit("unpipe", this, He)),
              this
            );
          if (!ot) {
            var de = tt.pipes,
              ue = tt.pipesCount;
            (tt.pipes = null), (tt.pipesCount = 0), (tt.flowing = !1);
            for (var Z = 0; Z < ue; Z++)
              de[Z].emit("unpipe", this, { hasUnpiped: !1 });
            return this;
          }
          var ie = $t(tt.pipes, ot);
          return (
            ie === -1 ||
              (tt.pipes.splice(ie, 1),
              (tt.pipesCount -= 1),
              tt.pipesCount === 1 && (tt.pipes = tt.pipes[0]),
              ot.emit("unpipe", this, He)),
            this
          );
        }),
        (O.prototype.on = function (ot, tt) {
          var He = l.prototype.on.call(this, ot, tt),
            de = this._readableState;
          return (
            ot === "data"
              ? ((de.readableListening = this.listenerCount("readable") > 0),
                de.flowing !== !1 && this.resume())
              : ot === "readable" &&
                (de.endEmitted ||
                  de.readableListening ||
                  ((de.readableListening = de.needReadable = !0),
                  (de.flowing = !1),
                  (de.emittedReadable = !1),
                  i("on readable", de.length, de.reading),
                  de.length
                    ? S(this)
                    : de.reading || process.nextTick(De, this))),
            He
          );
        }),
        (O.prototype.addListener = O.prototype.on),
        (O.prototype.removeListener = function (ot, tt) {
          var He = l.prototype.removeListener.call(this, ot, tt);
          return ot === "readable" && process.nextTick(oe, this), He;
        }),
        (O.prototype.removeAllListeners = function (ot) {
          var tt = l.prototype.removeAllListeners.apply(this, arguments);
          return (
            (ot !== "readable" && ot !== void 0) || process.nextTick(oe, this),
            tt
          );
        }),
        (O.prototype.resume = function () {
          var ot,
            tt,
            He = this._readableState;
          return (
            He.flowing ||
              (i("resume"),
              (He.flowing = !He.readableListening),
              (ot = this),
              (tt = He).resumeScheduled ||
                ((tt.resumeScheduled = !0), process.nextTick(Xe, ot, tt))),
            (He.paused = !1),
            this
          );
        }),
        (O.prototype.pause = function () {
          return (
            i("call pause flowing=%j", this._readableState.flowing),
            this._readableState.flowing !== !1 &&
              (i("pause"),
              (this._readableState.flowing = !1),
              this.emit("pause")),
            (this._readableState.paused = !0),
            this
          );
        }),
        (O.prototype.wrap = function (ot) {
          var tt = this,
            He = this._readableState,
            de = !1;
          for (var ue in (ot.on("end", function () {
            if ((i("wrapped end"), He.decoder && !He.ended)) {
              var ie = He.decoder.end();
              ie && ie.length && tt.push(ie);
            }
            tt.push(null);
          }),
          ot.on("data", function (ie) {
            i("wrapped data"),
              He.decoder && (ie = He.decoder.write(ie)),
              (He.objectMode && ie == null) ||
                ((He.objectMode || (ie && ie.length)) &&
                  (tt.push(ie) || ((de = !0), ot.pause())));
          }),
          ot))
            this[ue] === void 0 &&
              typeof ot[ue] == "function" &&
              (this[ue] = (function (ie) {
                return function () {
                  return ot[ie].apply(ot, arguments);
                };
              })(ue));
          for (var Z = 0; Z < P.length; Z++)
            ot.on(P[Z], this.emit.bind(this, P[Z]));
          return (
            (this._read = function (ie) {
              i("wrapped _read", ie), de && ((de = !1), ot.resume());
            }),
            this
          );
        }),
        typeof Symbol == "function" &&
          (O.prototype[Symbol.asyncIterator] = function () {
            return f === void 0 && (f = n(5857)), f(this);
          }),
        Object.defineProperty(O.prototype, "readableHighWaterMark", {
          enumerable: !1,
          get: function () {
            return this._readableState.highWaterMark;
          },
        }),
        Object.defineProperty(O.prototype, "readableBuffer", {
          enumerable: !1,
          get: function () {
            return this._readableState && this._readableState.buffer;
          },
        }),
        Object.defineProperty(O.prototype, "readableFlowing", {
          enumerable: !1,
          get: function () {
            return this._readableState.flowing;
          },
          set: function (ot) {
            this._readableState && (this._readableState.flowing = ot);
          },
        }),
        (O._fromList = ht),
        Object.defineProperty(O.prototype, "readableLength", {
          enumerable: !1,
          get: function () {
            return this._readableState.length;
          },
        }),
        typeof Symbol == "function" &&
          (O.from = function (ot, tt) {
            return p === void 0 && (p = n(3411)), p(O, ot, tt);
          });
    },
    6756: function (t, e, n) {
      t.exports = h;
      var r = n(1602).codes,
        i = r.ERR_METHOD_NOT_IMPLEMENTED,
        o = r.ERR_MULTIPLE_CALLBACK,
        l = r.ERR_TRANSFORM_ALREADY_TRANSFORMING,
        u = r.ERR_TRANSFORM_WITH_LENGTH_0,
        c = n(884);
      function d(g, y) {
        var v = this._transformState;
        v.transforming = !1;
        var b = v.writecb;
        if (b === null) return this.emit("error", new o());
        (v.writechunk = null),
          (v.writecb = null),
          y != null && this.push(y),
          b(g);
        var w = this._readableState;
        (w.reading = !1),
          (w.needReadable || w.length < w.highWaterMark) &&
            this._read(w.highWaterMark);
      }
      function h(g) {
        if (!(this instanceof h)) return new h(g);
        c.call(this, g),
          (this._transformState = {
            afterTransform: d.bind(this),
            needTransform: !1,
            transforming: !1,
            writecb: null,
            writechunk: null,
            writeencoding: null,
          }),
          (this._readableState.needReadable = !0),
          (this._readableState.sync = !1),
          g &&
            (typeof g.transform == "function" &&
              (this._transform = g.transform),
            typeof g.flush == "function" && (this._flush = g.flush)),
          this.on("prefinish", f);
      }
      function f() {
        var g = this;
        typeof this._flush != "function" || this._readableState.destroyed
          ? p(this, null, null)
          : this._flush(function (y, v) {
              p(g, y, v);
            });
      }
      function p(g, y, v) {
        if (y) return g.emit("error", y);
        if ((v != null && g.push(v), g._writableState.length)) throw new u();
        if (g._transformState.transforming) throw new l();
        return g.push(null);
      }
      n(7523)(h, c),
        (h.prototype.push = function (g, y) {
          return (
            (this._transformState.needTransform = !1),
            c.prototype.push.call(this, g, y)
          );
        }),
        (h.prototype._transform = function (g, y, v) {
          v(new i("_transform()"));
        }),
        (h.prototype._write = function (g, y, v) {
          var b = this._transformState;
          if (
            ((b.writecb = v),
            (b.writechunk = g),
            (b.writeencoding = y),
            !b.transforming)
          ) {
            var w = this._readableState;
            (b.needTransform || w.needReadable || w.length < w.highWaterMark) &&
              this._read(w.highWaterMark);
          }
        }),
        (h.prototype._read = function (g) {
          var y = this._transformState;
          y.writechunk === null || y.transforming
            ? (y.needTransform = !0)
            : ((y.transforming = !0),
              this._transform(y.writechunk, y.writeencoding, y.afterTransform));
        }),
        (h.prototype._destroy = function (g, y) {
          c.prototype._destroy.call(this, g, function (v) {
            y(v);
          });
        });
    },
    3726: function (t, e, n) {
      function r(W) {
        var F = this;
        (this.next = null),
          (this.entry = null),
          (this.finish = function () {
            (function (oe, De) {
              var Xe = oe.entry;
              for (oe.entry = null; Xe; ) {
                var ze = Xe.callback;
                De.pendingcb--, ze(void 0), (Xe = Xe.next);
              }
              De.corkedRequestsFree.next = oe;
            })(F, W);
          });
      }
      var i;
      (t.exports = O), (O.WritableState = I);
      var o,
        l = { deprecate: n(9e3) },
        u = n(2611),
        c = n(44).Buffer,
        d =
          (n.g !== void 0
            ? n.g
            : typeof window < "u"
            ? window
            : typeof self < "u"
            ? self
            : {}
          ).Uint8Array || function () {},
        h = n(2410),
        f = n(1749).getHighWaterMark,
        p = n(1602).codes,
        g = p.ERR_INVALID_ARG_TYPE,
        y = p.ERR_METHOD_NOT_IMPLEMENTED,
        v = p.ERR_MULTIPLE_CALLBACK,
        b = p.ERR_STREAM_CANNOT_PIPE,
        w = p.ERR_STREAM_DESTROYED,
        k = p.ERR_STREAM_NULL_VALUES,
        D = p.ERR_STREAM_WRITE_AFTER_END,
        $ = p.ERR_UNKNOWN_ENCODING,
        N = h.errorOrDestroy;
      function P() {}
      function I(W, F, oe) {
        (i = i || n(884)),
          (W = W || {}),
          typeof oe != "boolean" && (oe = F instanceof i),
          (this.objectMode = !!W.objectMode),
          oe && (this.objectMode = this.objectMode || !!W.writableObjectMode),
          (this.highWaterMark = f(this, W, "writableHighWaterMark", oe)),
          (this.finalCalled = !1),
          (this.needDrain = !1),
          (this.ending = !1),
          (this.ended = !1),
          (this.finished = !1),
          (this.destroyed = !1);
        var De = W.decodeStrings === !1;
        (this.decodeStrings = !De),
          (this.defaultEncoding = W.defaultEncoding || "utf8"),
          (this.length = 0),
          (this.writing = !1),
          (this.corked = 0),
          (this.sync = !0),
          (this.bufferProcessing = !1),
          (this.onwrite = function (Xe) {
            (function (ze, ht) {
              var gt,
                pt = ze._writableState,
                $t = pt.sync,
                ot = pt.writecb;
              if (typeof ot != "function") throw new v();
              if (
                (((gt = pt).writing = !1),
                (gt.writecb = null),
                (gt.length -= gt.writelen),
                (gt.writelen = 0),
                ht)
              )
                (function (He, de, ue, Z, ie) {
                  --de.pendingcb,
                    ue
                      ? (process.nextTick(ie, Z),
                        process.nextTick(L, He, de),
                        (He._writableState.errorEmitted = !0),
                        N(He, Z))
                      : (ie(Z),
                        (He._writableState.errorEmitted = !0),
                        N(He, Z),
                        L(He, de));
                })(ze, pt, $t, ht, ot);
              else {
                var tt = E(pt) || ze.destroyed;
                tt ||
                  pt.corked ||
                  pt.bufferProcessing ||
                  !pt.bufferedRequest ||
                  H(ze, pt),
                  $t ? process.nextTick(G, ze, pt, tt, ot) : G(ze, pt, tt, ot);
              }
            })(F, Xe);
          }),
          (this.writecb = null),
          (this.writelen = 0),
          (this.bufferedRequest = null),
          (this.lastBufferedRequest = null),
          (this.pendingcb = 0),
          (this.prefinished = !1),
          (this.errorEmitted = !1),
          (this.emitClose = W.emitClose !== !1),
          (this.autoDestroy = !!W.autoDestroy),
          (this.bufferedRequestCount = 0),
          (this.corkedRequestsFree = new r(this));
      }
      function O(W) {
        var F = this instanceof (i = i || n(884));
        if (!F && !o.call(O, this)) return new O(W);
        (this._writableState = new I(W, this, F)),
          (this.writable = !0),
          W &&
            (typeof W.write == "function" && (this._write = W.write),
            typeof W.writev == "function" && (this._writev = W.writev),
            typeof W.destroy == "function" && (this._destroy = W.destroy),
            typeof W.final == "function" && (this._final = W.final)),
          u.call(this);
      }
      function X(W, F, oe, De, Xe, ze, ht) {
        (F.writelen = De),
          (F.writecb = ht),
          (F.writing = !0),
          (F.sync = !0),
          F.destroyed
            ? F.onwrite(new w("write"))
            : oe
            ? W._writev(Xe, F.onwrite)
            : W._write(Xe, ze, F.onwrite),
          (F.sync = !1);
      }
      function G(W, F, oe, De) {
        var Xe, ze;
        oe ||
          ((Xe = W),
          (ze = F).length === 0 &&
            ze.needDrain &&
            ((ze.needDrain = !1), Xe.emit("drain"))),
          F.pendingcb--,
          De(),
          L(W, F);
      }
      function H(W, F) {
        F.bufferProcessing = !0;
        var oe = F.bufferedRequest;
        if (W._writev && oe && oe.next) {
          var De = F.bufferedRequestCount,
            Xe = new Array(De),
            ze = F.corkedRequestsFree;
          ze.entry = oe;
          for (var ht = 0, gt = !0; oe; )
            (Xe[ht] = oe), oe.isBuf || (gt = !1), (oe = oe.next), (ht += 1);
          (Xe.allBuffers = gt),
            X(W, F, !0, F.length, Xe, "", ze.finish),
            F.pendingcb++,
            (F.lastBufferedRequest = null),
            ze.next
              ? ((F.corkedRequestsFree = ze.next), (ze.next = null))
              : (F.corkedRequestsFree = new r(F)),
            (F.bufferedRequestCount = 0);
        } else {
          for (; oe; ) {
            var pt = oe.chunk,
              $t = oe.encoding,
              ot = oe.callback;
            if (
              (X(W, F, !1, F.objectMode ? 1 : pt.length, pt, $t, ot),
              (oe = oe.next),
              F.bufferedRequestCount--,
              F.writing)
            )
              break;
          }
          oe === null && (F.lastBufferedRequest = null);
        }
        (F.bufferedRequest = oe), (F.bufferProcessing = !1);
      }
      function E(W) {
        return (
          W.ending &&
          W.length === 0 &&
          W.bufferedRequest === null &&
          !W.finished &&
          !W.writing
        );
      }
      function S(W, F) {
        W._final(function (oe) {
          F.pendingcb--,
            oe && N(W, oe),
            (F.prefinished = !0),
            W.emit("prefinish"),
            L(W, F);
        });
      }
      function L(W, F) {
        var oe,
          De,
          Xe = E(F);
        if (
          Xe &&
          ((oe = W),
          (De = F).prefinished ||
            De.finalCalled ||
            (typeof oe._final != "function" || De.destroyed
              ? ((De.prefinished = !0), oe.emit("prefinish"))
              : (De.pendingcb++,
                (De.finalCalled = !0),
                process.nextTick(S, oe, De))),
          F.pendingcb === 0 &&
            ((F.finished = !0), W.emit("finish"), F.autoDestroy))
        ) {
          var ze = W._readableState;
          (!ze || (ze.autoDestroy && ze.endEmitted)) && W.destroy();
        }
        return Xe;
      }
      n(7523)(O, u),
        (I.prototype.getBuffer = function () {
          for (var W = this.bufferedRequest, F = []; W; )
            F.push(W), (W = W.next);
          return F;
        }),
        (function () {
          try {
            Object.defineProperty(I.prototype, "buffer", {
              get: l.deprecate(
                function () {
                  return this.getBuffer();
                },
                "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.",
                "DEP0003"
              ),
            });
          } catch {}
        })(),
        typeof Symbol == "function" &&
        Symbol.hasInstance &&
        typeof Function.prototype[Symbol.hasInstance] == "function"
          ? ((o = Function.prototype[Symbol.hasInstance]),
            Object.defineProperty(O, Symbol.hasInstance, {
              value: function (W) {
                return (
                  !!o.call(this, W) ||
                  (this === O && W && W._writableState instanceof I)
                );
              },
            }))
          : (o = function (W) {
              return W instanceof this;
            }),
        (O.prototype.pipe = function () {
          N(this, new b());
        }),
        (O.prototype.write = function (W, F, oe) {
          var De,
            Xe,
            ze = this._writableState,
            ht = !1,
            gt =
              !ze.objectMode && ((De = W), c.isBuffer(De) || De instanceof d);
          return (
            gt && !c.isBuffer(W) && ((Xe = W), (W = c.from(Xe))),
            typeof F == "function" && ((oe = F), (F = null)),
            gt ? (F = "buffer") : F || (F = ze.defaultEncoding),
            typeof oe != "function" && (oe = P),
            ze.ending
              ? (function (pt, $t) {
                  var ot = new D();
                  N(pt, ot), process.nextTick($t, ot);
                })(this, oe)
              : (gt ||
                  (function (pt, $t, ot, tt) {
                    var He;
                    return (
                      ot === null
                        ? (He = new k())
                        : typeof ot == "string" ||
                          $t.objectMode ||
                          (He = new g("chunk", ["string", "Buffer"], ot)),
                      !He || (N(pt, He), process.nextTick(tt, He), !1)
                    );
                  })(this, ze, W, oe)) &&
                (ze.pendingcb++,
                (ht = (function (pt, $t, ot, tt, He, de) {
                  if (!ot) {
                    var ue =
                      ((ie = tt),
                      (Ne = He),
                      (Z = $t).objectMode ||
                        Z.decodeStrings === !1 ||
                        typeof ie != "string" ||
                        (ie = c.from(ie, Ne)),
                      ie);
                    tt !== ue && ((ot = !0), (He = "buffer"), (tt = ue));
                  }
                  var Z,
                    ie,
                    Ne,
                    Pe = $t.objectMode ? 1 : tt.length;
                  $t.length += Pe;
                  var kt = $t.length < $t.highWaterMark;
                  if ((kt || ($t.needDrain = !0), $t.writing || $t.corked)) {
                    var Gt = $t.lastBufferedRequest;
                    ($t.lastBufferedRequest = {
                      chunk: tt,
                      encoding: He,
                      isBuf: ot,
                      callback: de,
                      next: null,
                    }),
                      Gt
                        ? (Gt.next = $t.lastBufferedRequest)
                        : ($t.bufferedRequest = $t.lastBufferedRequest),
                      ($t.bufferedRequestCount += 1);
                  } else X(pt, $t, !1, Pe, tt, He, de);
                  return kt;
                })(this, ze, gt, W, F, oe))),
            ht
          );
        }),
        (O.prototype.cork = function () {
          this._writableState.corked++;
        }),
        (O.prototype.uncork = function () {
          var W = this._writableState;
          W.corked &&
            (W.corked--,
            W.writing ||
              W.corked ||
              W.bufferProcessing ||
              !W.bufferedRequest ||
              H(this, W));
        }),
        (O.prototype.setDefaultEncoding = function (W) {
          if (
            (typeof W == "string" && (W = W.toLowerCase()),
            !(
              [
                "hex",
                "utf8",
                "utf-8",
                "ascii",
                "binary",
                "base64",
                "ucs2",
                "ucs-2",
                "utf16le",
                "utf-16le",
                "raw",
              ].indexOf((W + "").toLowerCase()) > -1
            ))
          )
            throw new $(W);
          return (this._writableState.defaultEncoding = W), this;
        }),
        Object.defineProperty(O.prototype, "writableBuffer", {
          enumerable: !1,
          get: function () {
            return this._writableState && this._writableState.getBuffer();
          },
        }),
        Object.defineProperty(O.prototype, "writableHighWaterMark", {
          enumerable: !1,
          get: function () {
            return this._writableState.highWaterMark;
          },
        }),
        (O.prototype._write = function (W, F, oe) {
          oe(new y("_write()"));
        }),
        (O.prototype._writev = null),
        (O.prototype.end = function (W, F, oe) {
          var De,
            Xe,
            ze,
            ht = this._writableState;
          return (
            typeof W == "function"
              ? ((oe = W), (W = null), (F = null))
              : typeof F == "function" && ((oe = F), (F = null)),
            W != null && this.write(W, F),
            ht.corked && ((ht.corked = 1), this.uncork()),
            ht.ending ||
              ((De = this),
              (ze = oe),
              ((Xe = ht).ending = !0),
              L(De, Xe),
              ze &&
                (Xe.finished ? process.nextTick(ze) : De.once("finish", ze)),
              (Xe.ended = !0),
              (De.writable = !1)),
            this
          );
        }),
        Object.defineProperty(O.prototype, "writableLength", {
          enumerable: !1,
          get: function () {
            return this._writableState.length;
          },
        }),
        Object.defineProperty(O.prototype, "destroyed", {
          enumerable: !1,
          get: function () {
            return (
              this._writableState !== void 0 && this._writableState.destroyed
            );
          },
          set: function (W) {
            this._writableState && (this._writableState.destroyed = W);
          },
        }),
        (O.prototype.destroy = h.destroy),
        (O.prototype._undestroy = h.undestroy),
        (O.prototype._destroy = function (W, F) {
          F(W);
        });
    },
    5857: function (t, e, n) {
      var r;
      function i(k, D, $) {
        return (
          (D =
            typeof (N = (function (P) {
              if (typeof P != "object" || P === null) return P;
              var I = P[Symbol.toPrimitive];
              if (I !== void 0) {
                var O = I.call(P, "string");
                if (typeof O != "object") return O;
                throw new TypeError(
                  "@@toPrimitive must return a primitive value."
                );
              }
              return String(P);
            })(D)) == "symbol"
              ? N
              : String(N)) in k
            ? Object.defineProperty(k, D, {
                value: $,
                enumerable: !0,
                configurable: !0,
                writable: !0,
              })
            : (k[D] = $),
          k
        );
        var N;
      }
      var o = n(2896),
        l = Symbol("lastResolve"),
        u = Symbol("lastReject"),
        c = Symbol("error"),
        d = Symbol("ended"),
        h = Symbol("lastPromise"),
        f = Symbol("handlePromise"),
        p = Symbol("stream");
      function g(k, D) {
        return { value: k, done: D };
      }
      function y(k) {
        var D = k[l];
        if (D !== null) {
          var $ = k[p].read();
          $ !== null &&
            ((k[h] = null), (k[l] = null), (k[u] = null), D(g($, !1)));
        }
      }
      function v(k) {
        process.nextTick(y, k);
      }
      var b = Object.getPrototypeOf(function () {}),
        w = Object.setPrototypeOf(
          (i(
            (r = {
              get stream() {
                return this[p];
              },
              next: function () {
                var k = this,
                  D = this[c];
                if (D !== null) return Promise.reject(D);
                if (this[d]) return Promise.resolve(g(void 0, !0));
                if (this[p].destroyed)
                  return new Promise(function (X, G) {
                    process.nextTick(function () {
                      k[c] ? G(k[c]) : X(g(void 0, !0));
                    });
                  });
                var $,
                  N,
                  P,
                  I = this[h];
                if (I)
                  $ = new Promise(
                    ((N = I),
                    (P = this),
                    function (X, G) {
                      N.then(function () {
                        P[d] ? X(g(void 0, !0)) : P[f](X, G);
                      }, G);
                    })
                  );
                else {
                  var O = this[p].read();
                  if (O !== null) return Promise.resolve(g(O, !1));
                  $ = new Promise(this[f]);
                }
                return (this[h] = $), $;
              },
            }),
            Symbol.asyncIterator,
            function () {
              return this;
            }
          ),
          i(r, "return", function () {
            var k = this;
            return new Promise(function (D, $) {
              k[p].destroy(null, function (N) {
                N ? $(N) : D(g(void 0, !0));
              });
            });
          }),
          r),
          b
        );
      t.exports = function (k) {
        var D,
          $ = Object.create(
            w,
            (i((D = {}), p, { value: k, writable: !0 }),
            i(D, l, { value: null, writable: !0 }),
            i(D, u, { value: null, writable: !0 }),
            i(D, c, { value: null, writable: !0 }),
            i(D, d, { value: k._readableState.endEmitted, writable: !0 }),
            i(D, f, {
              value: function (N, P) {
                var I = $[p].read();
                I
                  ? (($[h] = null), ($[l] = null), ($[u] = null), N(g(I, !1)))
                  : (($[l] = N), ($[u] = P));
              },
              writable: !0,
            }),
            D)
          );
        return (
          ($[h] = null),
          o(k, function (N) {
            if (N && N.code !== "ERR_STREAM_PREMATURE_CLOSE") {
              var P = $[u];
              return (
                P !== null &&
                  (($[h] = null), ($[l] = null), ($[u] = null), P(N)),
                void ($[c] = N)
              );
            }
            var I = $[l];
            I !== null &&
              (($[h] = null), ($[l] = null), ($[u] = null), I(g(void 0, !0))),
              ($[d] = !0);
          }),
          k.on("readable", v.bind(null, $)),
          $
        );
      };
    },
    3791: function (t, e, n) {
      function r(h, f) {
        var p = Object.keys(h);
        if (Object.getOwnPropertySymbols) {
          var g = Object.getOwnPropertySymbols(h);
          f &&
            (g = g.filter(function (y) {
              return Object.getOwnPropertyDescriptor(h, y).enumerable;
            })),
            p.push.apply(p, g);
        }
        return p;
      }
      function i(h) {
        for (var f = 1; f < arguments.length; f++) {
          var p = arguments[f] != null ? arguments[f] : {};
          f % 2
            ? r(Object(p), !0).forEach(function (g) {
                o(h, g, p[g]);
              })
            : Object.getOwnPropertyDescriptors
            ? Object.defineProperties(h, Object.getOwnPropertyDescriptors(p))
            : r(Object(p)).forEach(function (g) {
                Object.defineProperty(
                  h,
                  g,
                  Object.getOwnPropertyDescriptor(p, g)
                );
              });
        }
        return h;
      }
      function o(h, f, p) {
        return (
          (f = l(f)) in h
            ? Object.defineProperty(h, f, {
                value: p,
                enumerable: !0,
                configurable: !0,
                writable: !0,
              })
            : (h[f] = p),
          h
        );
      }
      function l(h) {
        var f = (function (p) {
          if (typeof p != "object" || p === null) return p;
          var g = p[Symbol.toPrimitive];
          if (g !== void 0) {
            var y = g.call(p, "string");
            if (typeof y != "object") return y;
            throw new TypeError("@@toPrimitive must return a primitive value.");
          }
          return String(p);
        })(h);
        return typeof f == "symbol" ? f : String(f);
      }
      var u = n(44).Buffer,
        c = n(3779).inspect,
        d = (c && c.custom) || "inspect";
      t.exports = (function () {
        function h() {
          (function (g, y) {
            if (!(g instanceof y))
              throw new TypeError("Cannot call a class as a function");
          })(this, h),
            (this.head = null),
            (this.tail = null),
            (this.length = 0);
        }
        var f, p;
        return (
          (f = h),
          (p = [
            {
              key: "push",
              value: function (g) {
                var y = { data: g, next: null };
                this.length > 0 ? (this.tail.next = y) : (this.head = y),
                  (this.tail = y),
                  ++this.length;
              },
            },
            {
              key: "unshift",
              value: function (g) {
                var y = { data: g, next: this.head };
                this.length === 0 && (this.tail = y),
                  (this.head = y),
                  ++this.length;
              },
            },
            {
              key: "shift",
              value: function () {
                if (this.length !== 0) {
                  var g = this.head.data;
                  return (
                    this.length === 1
                      ? (this.head = this.tail = null)
                      : (this.head = this.head.next),
                    --this.length,
                    g
                  );
                }
              },
            },
            {
              key: "clear",
              value: function () {
                (this.head = this.tail = null), (this.length = 0);
              },
            },
            {
              key: "join",
              value: function (g) {
                if (this.length === 0) return "";
                for (var y = this.head, v = "" + y.data; (y = y.next); )
                  v += g + y.data;
                return v;
              },
            },
            {
              key: "concat",
              value: function (g) {
                if (this.length === 0) return u.alloc(0);
                for (
                  var y, v, b, w = u.allocUnsafe(g >>> 0), k = this.head, D = 0;
                  k;

                )
                  (y = k.data),
                    (v = w),
                    (b = D),
                    u.prototype.copy.call(y, v, b),
                    (D += k.data.length),
                    (k = k.next);
                return w;
              },
            },
            {
              key: "consume",
              value: function (g, y) {
                var v;
                return (
                  g < this.head.data.length
                    ? ((v = this.head.data.slice(0, g)),
                      (this.head.data = this.head.data.slice(g)))
                    : (v =
                        g === this.head.data.length
                          ? this.shift()
                          : y
                          ? this._getString(g)
                          : this._getBuffer(g)),
                  v
                );
              },
            },
            {
              key: "first",
              value: function () {
                return this.head.data;
              },
            },
            {
              key: "_getString",
              value: function (g) {
                var y = this.head,
                  v = 1,
                  b = y.data;
                for (g -= b.length; (y = y.next); ) {
                  var w = y.data,
                    k = g > w.length ? w.length : g;
                  if (
                    (k === w.length ? (b += w) : (b += w.slice(0, g)),
                    (g -= k) == 0)
                  ) {
                    k === w.length
                      ? (++v,
                        y.next
                          ? (this.head = y.next)
                          : (this.head = this.tail = null))
                      : ((this.head = y), (y.data = w.slice(k)));
                    break;
                  }
                  ++v;
                }
                return (this.length -= v), b;
              },
            },
            {
              key: "_getBuffer",
              value: function (g) {
                var y = u.allocUnsafe(g),
                  v = this.head,
                  b = 1;
                for (v.data.copy(y), g -= v.data.length; (v = v.next); ) {
                  var w = v.data,
                    k = g > w.length ? w.length : g;
                  if ((w.copy(y, y.length - g, 0, k), (g -= k) == 0)) {
                    k === w.length
                      ? (++b,
                        v.next
                          ? (this.head = v.next)
                          : (this.head = this.tail = null))
                      : ((this.head = v), (v.data = w.slice(k)));
                    break;
                  }
                  ++b;
                }
                return (this.length -= b), y;
              },
            },
            {
              key: d,
              value: function (g, y) {
                return c(
                  this,
                  i(i({}, y), {}, { depth: 0, customInspect: !1 })
                );
              },
            },
          ]) &&
            (function (g, y) {
              for (var v = 0; v < y.length; v++) {
                var b = y[v];
                (b.enumerable = b.enumerable || !1),
                  (b.configurable = !0),
                  "value" in b && (b.writable = !0),
                  Object.defineProperty(g, l(b.key), b);
              }
            })(f.prototype, p),
          Object.defineProperty(f, "prototype", { writable: !1 }),
          h
        );
      })();
    },
    2410: function (t) {
      function e(i, o) {
        r(i, o), n(i);
      }
      function n(i) {
        (i._writableState && !i._writableState.emitClose) ||
          (i._readableState && !i._readableState.emitClose) ||
          i.emit("close");
      }
      function r(i, o) {
        i.emit("error", o);
      }
      t.exports = {
        destroy: function (i, o) {
          var l = this,
            u = this._readableState && this._readableState.destroyed,
            c = this._writableState && this._writableState.destroyed;
          return u || c
            ? (o
                ? o(i)
                : i &&
                  (this._writableState
                    ? this._writableState.errorEmitted ||
                      ((this._writableState.errorEmitted = !0),
                      process.nextTick(r, this, i))
                    : process.nextTick(r, this, i)),
              this)
            : (this._readableState && (this._readableState.destroyed = !0),
              this._writableState && (this._writableState.destroyed = !0),
              this._destroy(i || null, function (d) {
                !o && d
                  ? l._writableState
                    ? l._writableState.errorEmitted
                      ? process.nextTick(n, l)
                      : ((l._writableState.errorEmitted = !0),
                        process.nextTick(e, l, d))
                    : process.nextTick(e, l, d)
                  : o
                  ? (process.nextTick(n, l), o(d))
                  : process.nextTick(n, l);
              }),
              this);
        },
        undestroy: function () {
          this._readableState &&
            ((this._readableState.destroyed = !1),
            (this._readableState.reading = !1),
            (this._readableState.ended = !1),
            (this._readableState.endEmitted = !1)),
            this._writableState &&
              ((this._writableState.destroyed = !1),
              (this._writableState.ended = !1),
              (this._writableState.ending = !1),
              (this._writableState.finalCalled = !1),
              (this._writableState.prefinished = !1),
              (this._writableState.finished = !1),
              (this._writableState.errorEmitted = !1));
        },
        errorOrDestroy: function (i, o) {
          var l = i._readableState,
            u = i._writableState;
          (l && l.autoDestroy) || (u && u.autoDestroy)
            ? i.destroy(o)
            : i.emit("error", o);
        },
      };
    },
    2896: function (t, e, n) {
      var r = n(1602).codes.ERR_STREAM_PREMATURE_CLOSE;
      function i() {}
      t.exports = function o(l, u, c) {
        if (typeof u == "function") return o(l, null, u);
        var d, h;
        u || (u = {}),
          (d = c || i),
          (h = !1),
          (c = function () {
            if (!h) {
              h = !0;
              for (
                var N = arguments.length, P = new Array(N), I = 0;
                I < N;
                I++
              )
                P[I] = arguments[I];
              d.apply(this, P);
            }
          });
        var f = u.readable || (u.readable !== !1 && l.readable),
          p = u.writable || (u.writable !== !1 && l.writable),
          g = function () {
            l.writable || v();
          },
          y = l._writableState && l._writableState.finished,
          v = function () {
            (p = !1), (y = !0), f || c.call(l);
          },
          b = l._readableState && l._readableState.endEmitted,
          w = function () {
            (f = !1), (b = !0), p || c.call(l);
          },
          k = function (N) {
            c.call(l, N);
          },
          D = function () {
            var N;
            return f && !b
              ? ((l._readableState && l._readableState.ended) || (N = new r()),
                c.call(l, N))
              : p && !y
              ? ((l._writableState && l._writableState.ended) || (N = new r()),
                c.call(l, N))
              : void 0;
          },
          $ = function () {
            l.req.on("finish", v);
          };
        return (
          (function (N) {
            return N.setHeader && typeof N.abort == "function";
          })(l)
            ? (l.on("complete", v),
              l.on("abort", D),
              l.req ? $() : l.on("request", $))
            : p && !l._writableState && (l.on("end", g), l.on("close", g)),
          l.on("end", w),
          l.on("finish", v),
          u.error !== !1 && l.on("error", k),
          l.on("close", D),
          function () {
            l.removeListener("complete", v),
              l.removeListener("abort", D),
              l.removeListener("request", $),
              l.req && l.req.removeListener("finish", v),
              l.removeListener("end", g),
              l.removeListener("close", g),
              l.removeListener("finish", v),
              l.removeListener("end", w),
              l.removeListener("error", k),
              l.removeListener("close", D);
          }
        );
      };
    },
    3411: function (t) {
      t.exports = function () {
        throw new Error("Readable.from is not available in the browser");
      };
    },
    8460: function (t, e, n) {
      var r,
        i = n(1602).codes,
        o = i.ERR_MISSING_ARGS,
        l = i.ERR_STREAM_DESTROYED;
      function u(h) {
        if (h) throw h;
      }
      function c(h) {
        h();
      }
      function d(h, f) {
        return h.pipe(f);
      }
      t.exports = function () {
        for (var h = arguments.length, f = new Array(h), p = 0; p < h; p++)
          f[p] = arguments[p];
        var g,
          y,
          v = (y = f).length
            ? typeof y[y.length - 1] != "function"
              ? u
              : y.pop()
            : u;
        if ((Array.isArray(f[0]) && (f = f[0]), f.length < 2))
          throw new o("streams");
        var b = f.map(function (w, k) {
          var D = k < f.length - 1;
          return (function ($, N, P, I) {
            var O, X;
            (O = I),
              (X = !1),
              (I = function () {
                X || ((X = !0), O.apply(void 0, arguments));
              });
            var G = !1;
            $.on("close", function () {
              G = !0;
            }),
              r === void 0 && (r = n(2896)),
              r($, { readable: N, writable: P }, function (E) {
                if (E) return I(E);
                (G = !0), I();
              });
            var H = !1;
            return function (E) {
              if (!G && !H)
                return (
                  (H = !0),
                  (function (S) {
                    return S.setHeader && typeof S.abort == "function";
                  })($)
                    ? $.abort()
                    : typeof $.destroy == "function"
                    ? $.destroy()
                    : void I(E || new l("pipe"))
                );
            };
          })(w, D, k > 0, function ($) {
            g || (g = $), $ && b.forEach(c), D || (b.forEach(c), v(g));
          });
        });
        return f.reduce(d);
      };
    },
    1749: function (t, e, n) {
      var r = n(1602).codes.ERR_INVALID_OPT_VALUE;
      t.exports = {
        getHighWaterMark: function (i, o, l, u) {
          var c,
            d,
            h,
            f =
              ((d = u),
              (h = l),
              (c = o).highWaterMark != null
                ? c.highWaterMark
                : d
                ? c[h]
                : null);
          if (f != null) {
            if (!isFinite(f) || Math.floor(f) !== f || f < 0)
              throw new r(u ? l : "highWaterMark", f);
            return Math.floor(f);
          }
          return i.objectMode ? 16 : 16384;
        },
      };
    },
    2611: function (t, e, n) {
      t.exports = n(9826).EventEmitter;
    },
    748: function (t, e, n) {
      var r = n(4598).Buffer,
        i =
          r.isEncoding ||
          function (y) {
            switch ((y = "" + y) && y.toLowerCase()) {
              case "hex":
              case "utf8":
              case "utf-8":
              case "ascii":
              case "binary":
              case "base64":
              case "ucs2":
              case "ucs-2":
              case "utf16le":
              case "utf-16le":
              case "raw":
                return !0;
              default:
                return !1;
            }
          };
      function o(y) {
        var v;
        switch (
          ((this.encoding = (function (b) {
            var w = (function (k) {
              if (!k) return "utf8";
              for (var D; ; )
                switch (k) {
                  case "utf8":
                  case "utf-8":
                    return "utf8";
                  case "ucs2":
                  case "ucs-2":
                  case "utf16le":
                  case "utf-16le":
                    return "utf16le";
                  case "latin1":
                  case "binary":
                    return "latin1";
                  case "base64":
                  case "ascii":
                  case "hex":
                    return k;
                  default:
                    if (D) return;
                    (k = ("" + k).toLowerCase()), (D = !0);
                }
            })(b);
            if (typeof w != "string" && (r.isEncoding === i || !i(b)))
              throw new Error("Unknown encoding: " + b);
            return w || b;
          })(y)),
          this.encoding)
        ) {
          case "utf16le":
            (this.text = c), (this.end = d), (v = 4);
            break;
          case "utf8":
            (this.fillLast = u), (v = 4);
            break;
          case "base64":
            (this.text = h), (this.end = f), (v = 3);
            break;
          default:
            return (this.write = p), void (this.end = g);
        }
        (this.lastNeed = 0),
          (this.lastTotal = 0),
          (this.lastChar = r.allocUnsafe(v));
      }
      function l(y) {
        return y <= 127
          ? 0
          : y >> 5 == 6
          ? 2
          : y >> 4 == 14
          ? 3
          : y >> 3 == 30
          ? 4
          : y >> 6 == 2
          ? -1
          : -2;
      }
      function u(y) {
        var v = this.lastTotal - this.lastNeed,
          b = (function (w, k) {
            if ((192 & k[0]) != 128) return (w.lastNeed = 0), "�";
            if (w.lastNeed > 1 && k.length > 1) {
              if ((192 & k[1]) != 128) return (w.lastNeed = 1), "�";
              if (w.lastNeed > 2 && k.length > 2 && (192 & k[2]) != 128)
                return (w.lastNeed = 2), "�";
            }
          })(this, y);
        return b !== void 0
          ? b
          : this.lastNeed <= y.length
          ? (y.copy(this.lastChar, v, 0, this.lastNeed),
            this.lastChar.toString(this.encoding, 0, this.lastTotal))
          : (y.copy(this.lastChar, v, 0, y.length),
            void (this.lastNeed -= y.length));
      }
      function c(y, v) {
        if ((y.length - v) % 2 == 0) {
          var b = y.toString("utf16le", v);
          if (b) {
            var w = b.charCodeAt(b.length - 1);
            if (w >= 55296 && w <= 56319)
              return (
                (this.lastNeed = 2),
                (this.lastTotal = 4),
                (this.lastChar[0] = y[y.length - 2]),
                (this.lastChar[1] = y[y.length - 1]),
                b.slice(0, -1)
              );
          }
          return b;
        }
        return (
          (this.lastNeed = 1),
          (this.lastTotal = 2),
          (this.lastChar[0] = y[y.length - 1]),
          y.toString("utf16le", v, y.length - 1)
        );
      }
      function d(y) {
        var v = y && y.length ? this.write(y) : "";
        if (this.lastNeed) {
          var b = this.lastTotal - this.lastNeed;
          return v + this.lastChar.toString("utf16le", 0, b);
        }
        return v;
      }
      function h(y, v) {
        var b = (y.length - v) % 3;
        return b === 0
          ? y.toString("base64", v)
          : ((this.lastNeed = 3 - b),
            (this.lastTotal = 3),
            b === 1
              ? (this.lastChar[0] = y[y.length - 1])
              : ((this.lastChar[0] = y[y.length - 2]),
                (this.lastChar[1] = y[y.length - 1])),
            y.toString("base64", v, y.length - b));
      }
      function f(y) {
        var v = y && y.length ? this.write(y) : "";
        return this.lastNeed
          ? v + this.lastChar.toString("base64", 0, 3 - this.lastNeed)
          : v;
      }
      function p(y) {
        return y.toString(this.encoding);
      }
      function g(y) {
        return y && y.length ? this.write(y) : "";
      }
      (e.StringDecoder = o),
        (o.prototype.write = function (y) {
          if (y.length === 0) return "";
          var v, b;
          if (this.lastNeed) {
            if ((v = this.fillLast(y)) === void 0) return "";
            (b = this.lastNeed), (this.lastNeed = 0);
          } else b = 0;
          return b < y.length
            ? v
              ? v + this.text(y, b)
              : this.text(y, b)
            : v || "";
        }),
        (o.prototype.end = function (y) {
          var v = y && y.length ? this.write(y) : "";
          return this.lastNeed ? v + "�" : v;
        }),
        (o.prototype.text = function (y, v) {
          var b = (function (k, D, $) {
            var N = D.length - 1;
            if (N < $) return 0;
            var P = l(D[N]);
            return P >= 0
              ? (P > 0 && (k.lastNeed = P - 1), P)
              : --N < $ || P === -2
              ? 0
              : (P = l(D[N])) >= 0
              ? (P > 0 && (k.lastNeed = P - 2), P)
              : --N < $ || P === -2
              ? 0
              : (P = l(D[N])) >= 0
              ? (P > 0 && (P === 2 ? (P = 0) : (k.lastNeed = P - 3)), P)
              : 0;
          })(this, y, v);
          if (!this.lastNeed) return y.toString("utf8", v);
          this.lastTotal = b;
          var w = y.length - (b - this.lastNeed);
          return y.copy(this.lastChar, 0, w), y.toString("utf8", v, w);
        }),
        (o.prototype.fillLast = function (y) {
          if (this.lastNeed <= y.length)
            return (
              y.copy(
                this.lastChar,
                this.lastTotal - this.lastNeed,
                0,
                this.lastNeed
              ),
              this.lastChar.toString(this.encoding, 0, this.lastTotal)
            );
          y.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, y.length),
            (this.lastNeed -= y.length);
        });
    },
    4598: function (t, e, n) {
      var r = n(44),
        i = r.Buffer;
      function o(u, c) {
        for (var d in u) c[d] = u[d];
      }
      function l(u, c, d) {
        return i(u, c, d);
      }
      i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow
        ? (t.exports = r)
        : (o(r, e), (e.Buffer = l)),
        o(i, l),
        (l.from = function (u, c, d) {
          if (typeof u == "number")
            throw new TypeError("Argument must not be a number");
          return i(u, c, d);
        }),
        (l.alloc = function (u, c, d) {
          if (typeof u != "number")
            throw new TypeError("Argument must be a number");
          var h = i(u);
          return (
            c !== void 0
              ? typeof d == "string"
                ? h.fill(c, d)
                : h.fill(c)
              : h.fill(0),
            h
          );
        }),
        (l.allocUnsafe = function (u) {
          if (typeof u != "number")
            throw new TypeError("Argument must be a number");
          return i(u);
        }),
        (l.allocUnsafeSlow = function (u) {
          if (typeof u != "number")
            throw new TypeError("Argument must be a number");
          return r.SlowBuffer(u);
        });
    },
    8571: function (t, e, n) {
      var r;
      (function (i, o) {
        var l = "function",
          u = "undefined",
          c = "object",
          d = "string",
          h = "major",
          f = "model",
          p = "name",
          g = "type",
          y = "vendor",
          v = "version",
          b = "architecture",
          w = "console",
          k = "mobile",
          D = "tablet",
          $ = "smarttv",
          N = "wearable",
          P = "embedded",
          I = "Amazon",
          O = "Apple",
          X = "ASUS",
          G = "BlackBerry",
          H = "Browser",
          E = "Chrome",
          S = "Firefox",
          L = "Google",
          W = "Huawei",
          F = "LG",
          oe = "Microsoft",
          De = "Motorola",
          Xe = "Opera",
          ze = "Samsung",
          ht = "Sharp",
          gt = "Sony",
          pt = "Xiaomi",
          $t = "Zebra",
          ot = "Facebook",
          tt = "Chromium OS",
          He = "Mac OS",
          de = function (lt) {
            for (var Et = {}, St = 0; St < lt.length; St++)
              Et[lt[St].toUpperCase()] = lt[St];
            return Et;
          },
          ue = function (lt, Et) {
            return typeof lt === d && Z(Et).indexOf(Z(lt)) !== -1;
          },
          Z = function (lt) {
            return lt.toLowerCase();
          },
          ie = function (lt, Et) {
            if (typeof lt === d)
              return (
                (lt = lt.replace(/^\s\s*/, "")),
                typeof Et === u ? lt : lt.substring(0, 500)
              );
          },
          Ne = function (lt, Et) {
            for (var St, Lt, ln, Ln, Tr, sr, hi = 0; hi < Et.length && !Tr; ) {
              var Ra = Et[hi],
                En = Et[hi + 1];
              for (St = Lt = 0; St < Ra.length && !Tr && Ra[St]; )
                if ((Tr = Ra[St++].exec(lt)))
                  for (ln = 0; ln < En.length; ln++)
                    (sr = Tr[++Lt]),
                      typeof (Ln = En[ln]) === c && Ln.length > 0
                        ? Ln.length === 2
                          ? typeof Ln[1] == l
                            ? (this[Ln[0]] = Ln[1].call(this, sr))
                            : (this[Ln[0]] = Ln[1])
                          : Ln.length === 3
                          ? typeof Ln[1] !== l || (Ln[1].exec && Ln[1].test)
                            ? (this[Ln[0]] = sr ? sr.replace(Ln[1], Ln[2]) : o)
                            : (this[Ln[0]] = sr
                                ? Ln[1].call(this, sr, Ln[2])
                                : o)
                          : Ln.length === 4 &&
                            (this[Ln[0]] = sr
                              ? Ln[3].call(this, sr.replace(Ln[1], Ln[2]))
                              : o)
                        : (this[Ln] = sr || o);
              hi += 2;
            }
          },
          Pe = function (lt, Et) {
            for (var St in Et)
              if (typeof Et[St] === c && Et[St].length > 0) {
                for (var Lt = 0; Lt < Et[St].length; Lt++)
                  if (ue(Et[St][Lt], lt)) return St === "?" ? o : St;
              } else if (ue(Et[St], lt)) return St === "?" ? o : St;
            return lt;
          },
          kt = {
            ME: "4.90",
            "NT 3.11": "NT3.51",
            "NT 4.0": "NT4.0",
            2e3: "NT 5.0",
            XP: ["NT 5.1", "NT 5.2"],
            Vista: "NT 6.0",
            7: "NT 6.1",
            8: "NT 6.2",
            8.1: "NT 6.3",
            10: ["NT 6.4", "NT 10.0"],
            RT: "ARM",
          },
          Gt = {
            browser: [
              [/\b(?:crmo|crios)\/([\w\.]+)/i],
              [v, [p, "Chrome"]],
              [/edg(?:e|ios|a)?\/([\w\.]+)/i],
              [v, [p, "Edge"]],
              [
                /(opera mini)\/([-\w\.]+)/i,
                /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
                /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i,
              ],
              [p, v],
              [/opios[\/ ]+([\w\.]+)/i],
              [v, [p, Xe + " Mini"]],
              [/\bop(?:rg)?x\/([\w\.]+)/i],
              [v, [p, Xe + " GX"]],
              [/\bopr\/([\w\.]+)/i],
              [v, [p, Xe]],
              [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],
              [v, [p, "Baidu"]],
              [
                /(kindle)\/([\w\.]+)/i,
                /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
                /(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,
                /(?:ms|\()(ie) ([\w\.]+)/i,
                /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
                /(heytap|ovi)browser\/([\d\.]+)/i,
                /(weibo)__([\d\.]+)/i,
              ],
              [p, v],
              [/\bddg\/([\w\.]+)/i],
              [v, [p, "DuckDuckGo"]],
              [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],
              [v, [p, "UC" + H]],
              [
                /microm.+\bqbcore\/([\w\.]+)/i,
                /\bqbcore\/([\w\.]+).+microm/i,
                /micromessenger\/([\w\.]+)/i,
              ],
              [v, [p, "WeChat"]],
              [/konqueror\/([\w\.]+)/i],
              [v, [p, "Konqueror"]],
              [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],
              [v, [p, "IE"]],
              [/ya(?:search)?browser\/([\w\.]+)/i],
              [v, [p, "Yandex"]],
              [/slbrowser\/([\w\.]+)/i],
              [v, [p, "Smart Lenovo " + H]],
              [/(avast|avg)\/([\w\.]+)/i],
              [[p, /(.+)/, "$1 Secure " + H], v],
              [/\bfocus\/([\w\.]+)/i],
              [v, [p, S + " Focus"]],
              [/\bopt\/([\w\.]+)/i],
              [v, [p, Xe + " Touch"]],
              [/coc_coc\w+\/([\w\.]+)/i],
              [v, [p, "Coc Coc"]],
              [/dolfin\/([\w\.]+)/i],
              [v, [p, "Dolphin"]],
              [/coast\/([\w\.]+)/i],
              [v, [p, Xe + " Coast"]],
              [/miuibrowser\/([\w\.]+)/i],
              [v, [p, "MIUI " + H]],
              [/fxios\/([-\w\.]+)/i],
              [v, [p, S]],
              [/\bqihu|(qi?ho?o?|360)browser/i],
              [[p, "360 " + H]],
              [/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],
              [[p, /(.+)/, "$1 " + H], v],
              [/samsungbrowser\/([\w\.]+)/i],
              [v, [p, ze + " Internet"]],
              [/(comodo_dragon)\/([\w\.]+)/i],
              [[p, /_/g, " "], v],
              [/metasr[\/ ]?([\d\.]+)/i],
              [v, [p, "Sogou Explorer"]],
              [/(sogou)mo\w+\/([\d\.]+)/i],
              [[p, "Sogou Mobile"], v],
              [
                /(electron)\/([\w\.]+) safari/i,
                /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
                /m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i,
              ],
              [p, v],
              [/(lbbrowser)/i, /\[(linkedin)app\]/i],
              [p],
              [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],
              [[p, ot], v],
              [
                /(Klarna)\/([\w\.]+)/i,
                /(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
                /(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
                /safari (line)\/([\w\.]+)/i,
                /\b(line)\/([\w\.]+)\/iab/i,
                /(alipay)client\/([\w\.]+)/i,
                /(twitter)(?:and| f.+e\/([\w\.]+))/i,
                /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i,
              ],
              [p, v],
              [/\bgsa\/([\w\.]+) .*safari\//i],
              [v, [p, "GSA"]],
              [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],
              [v, [p, "TikTok"]],
              [/headlesschrome(?:\/([\w\.]+)| )/i],
              [v, [p, E + " Headless"]],
              [/ wv\).+(chrome)\/([\w\.]+)/i],
              [[p, E + " WebView"], v],
              [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],
              [v, [p, "Android " + H]],
              [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],
              [p, v],
              [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],
              [v, [p, "Mobile Safari"]],
              [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],
              [v, p],
              [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
              [
                p,
                [
                  v,
                  Pe,
                  {
                    "1.0": "/8",
                    1.2: "/1",
                    1.3: "/3",
                    "2.0": "/412",
                    "2.0.2": "/416",
                    "2.0.3": "/417",
                    "2.0.4": "/419",
                    "?": "/",
                  },
                ],
              ],
              [/(webkit|khtml)\/([\w\.]+)/i],
              [p, v],
              [/(navigator|netscape\d?)\/([-\w\.]+)/i],
              [[p, "Netscape"], v],
              [/mobile vr; rv:([\w\.]+)\).+firefox/i],
              [v, [p, S + " Reality"]],
              [
                /ekiohf.+(flow)\/([\w\.]+)/i,
                /(swiftfox)/i,
                /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
                /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
                /(firefox)\/([\w\.]+)/i,
                /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
                /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
                /(links) \(([\w\.]+)/i,
                /panasonic;(viera)/i,
              ],
              [p, v],
              [/(cobalt)\/([\w\.]+)/i],
              [p, [v, /master.|lts./, ""]],
            ],
            cpu: [
              [/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],
              [[b, "amd64"]],
              [/(ia32(?=;))/i],
              [[b, Z]],
              [/((?:i[346]|x)86)[;\)]/i],
              [[b, "ia32"]],
              [/\b(aarch64|arm(v?8e?l?|_?64))\b/i],
              [[b, "arm64"]],
              [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],
              [[b, "armhf"]],
              [/windows (ce|mobile); ppc;/i],
              [[b, "arm"]],
              [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],
              [[b, /ower/, "", Z]],
              [/(sun4\w)[;\)]/i],
              [[b, "sparc"]],
              [
                /((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i,
              ],
              [[b, Z]],
            ],
            device: [
              [
                /\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i,
              ],
              [f, [y, ze], [g, D]],
              [
                /\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
                /samsung[- ]([-\w]+)/i,
                /sec-(sgh\w+)/i,
              ],
              [f, [y, ze], [g, k]],
              [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],
              [f, [y, O], [g, k]],
              [
                /\((ipad);[-\w\),; ]+apple/i,
                /applecoremedia\/[\w\.]+ \((ipad)/i,
                /\b(ipad)\d\d?,\d\d?[;\]].+ios/i,
              ],
              [f, [y, O], [g, D]],
              [/(macintosh);/i],
              [f, [y, O]],
              [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
              [f, [y, ht], [g, k]],
              [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],
              [f, [y, W], [g, D]],
              [
                /(?:huawei|honor)([-\w ]+)[;\)]/i,
                /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i,
              ],
              [f, [y, W], [g, k]],
              [
                /\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
                /\b; (\w+) build\/hm\1/i,
                /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
                /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
                /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,
                /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i,
              ],
              [
                [f, /_/g, " "],
                [y, pt],
                [g, k],
              ],
              [
                /oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
                /\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i,
              ],
              [
                [f, /_/g, " "],
                [y, pt],
                [g, D],
              ],
              [
                /; (\w+) bui.+ oppo/i,
                /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i,
              ],
              [f, [y, "OPPO"], [g, k]],
              [/\b(opd2\d{3}a?) bui/i],
              [f, [y, "OPPO"], [g, D]],
              [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i],
              [f, [y, "Vivo"], [g, k]],
              [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],
              [f, [y, "Realme"], [g, k]],
              [
                /\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
                /\bmot(?:orola)?[- ](\w*)/i,
                /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i,
              ],
              [f, [y, De], [g, k]],
              [/\b(mz60\d|xoom[2 ]{0,2}) build\//i],
              [f, [y, De], [g, D]],
              [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],
              [f, [y, F], [g, D]],
              [
                /(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
                /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
                /\blg-?([\d\w]+) bui/i,
              ],
              [f, [y, F], [g, k]],
              [
                /(ideatab[-\w ]+)/i,
                /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i,
              ],
              [f, [y, "Lenovo"], [g, D]],
              [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i],
              [
                [f, /_/g, " "],
                [y, "Nokia"],
                [g, k],
              ],
              [/(pixel c)\b/i],
              [f, [y, L], [g, D]],
              [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],
              [f, [y, L], [g, k]],
              [
                /droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i,
              ],
              [f, [y, gt], [g, k]],
              [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i],
              [
                [f, "Xperia Tablet"],
                [y, gt],
                [g, D],
              ],
              [
                / (kb2005|in20[12]5|be20[12][59])\b/i,
                /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i,
              ],
              [f, [y, "OnePlus"], [g, k]],
              [
                /(alexa)webm/i,
                /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
                /(kf[a-z]+)( bui|\)).+silk\//i,
              ],
              [f, [y, I], [g, D]],
              [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],
              [
                [f, /(.+)/g, "Fire Phone $1"],
                [y, I],
                [g, k],
              ],
              [/(playbook);[-\w\),; ]+(rim)/i],
              [f, y, [g, D]],
              [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i],
              [f, [y, G], [g, k]],
              [
                /(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i,
              ],
              [f, [y, X], [g, D]],
              [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],
              [f, [y, X], [g, k]],
              [/(nexus 9)/i],
              [f, [y, "HTC"], [g, D]],
              [
                /(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
                /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
                /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i,
              ],
              [y, [f, /_/g, " "], [g, k]],
              [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],
              [f, [y, "Acer"], [g, D]],
              [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i],
              [f, [y, "Meizu"], [g, k]],
              [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],
              [f, [y, "Ulefone"], [g, k]],
              [
                /(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,
                /(hp) ([\w ]+\w)/i,
                /(asus)-?(\w+)/i,
                /(microsoft); (lumia[\w ]+)/i,
                /(lenovo)[-_ ]?([-\w]+)/i,
                /(jolla)/i,
                /(oppo) ?([\w ]+) bui/i,
              ],
              [y, f, [g, k]],
              [
                /(kobo)\s(ereader|touch)/i,
                /(archos) (gamepad2?)/i,
                /(hp).+(touchpad(?!.+tablet)|tablet)/i,
                /(kindle)\/([\w\.]+)/i,
                /(nook)[\w ]+build\/(\w+)/i,
                /(dell) (strea[kpr\d ]*[\dko])/i,
                /(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
                /(trinity)[- ]*(t\d{3}) bui/i,
                /(gigaset)[- ]+(q\w{1,9}) bui/i,
                /(vodafone) ([\w ]+)(?:\)| bui)/i,
              ],
              [y, f, [g, D]],
              [/(surface duo)/i],
              [f, [y, oe], [g, D]],
              [/droid [\d\.]+; (fp\du?)(?: b|\))/i],
              [f, [y, "Fairphone"], [g, k]],
              [/(u304aa)/i],
              [f, [y, "AT&T"], [g, k]],
              [/\bsie-(\w*)/i],
              [f, [y, "Siemens"], [g, k]],
              [/\b(rct\w+) b/i],
              [f, [y, "RCA"], [g, D]],
              [/\b(venue[\d ]{2,7}) b/i],
              [f, [y, "Dell"], [g, D]],
              [/\b(q(?:mv|ta)\w+) b/i],
              [f, [y, "Verizon"], [g, D]],
              [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],
              [f, [y, "Barnes & Noble"], [g, D]],
              [/\b(tm\d{3}\w+) b/i],
              [f, [y, "NuVision"], [g, D]],
              [/\b(k88) b/i],
              [f, [y, "ZTE"], [g, D]],
              [/\b(nx\d{3}j) b/i],
              [f, [y, "ZTE"], [g, k]],
              [/\b(gen\d{3}) b.+49h/i],
              [f, [y, "Swiss"], [g, k]],
              [/\b(zur\d{3}) b/i],
              [f, [y, "Swiss"], [g, D]],
              [/\b((zeki)?tb.*\b) b/i],
              [f, [y, "Zeki"], [g, D]],
              [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i],
              [[y, "Dragon Touch"], f, [g, D]],
              [/\b(ns-?\w{0,9}) b/i],
              [f, [y, "Insignia"], [g, D]],
              [/\b((nxa|next)-?\w{0,9}) b/i],
              [f, [y, "NextBook"], [g, D]],
              [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],
              [[y, "Voice"], f, [g, k]],
              [/\b(lvtel\-)?(v1[12]) b/i],
              [[y, "LvTel"], f, [g, k]],
              [/\b(ph-1) /i],
              [f, [y, "Essential"], [g, k]],
              [/\b(v(100md|700na|7011|917g).*\b) b/i],
              [f, [y, "Envizen"], [g, D]],
              [/\b(trio[-\w\. ]+) b/i],
              [f, [y, "MachSpeed"], [g, D]],
              [/\btu_(1491) b/i],
              [f, [y, "Rotor"], [g, D]],
              [/(shield[\w ]+) b/i],
              [f, [y, "Nvidia"], [g, D]],
              [/(sprint) (\w+)/i],
              [y, f, [g, k]],
              [/(kin\.[onetw]{3})/i],
              [
                [f, /\./g, " "],
                [y, oe],
                [g, k],
              ],
              [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],
              [f, [y, $t], [g, D]],
              [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],
              [f, [y, $t], [g, k]],
              [/smart-tv.+(samsung)/i],
              [y, [g, $]],
              [/hbbtv.+maple;(\d+)/i],
              [
                [f, /^/, "SmartTV"],
                [y, ze],
                [g, $],
              ],
              [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],
              [
                [y, F],
                [g, $],
              ],
              [/(apple) ?tv/i],
              [y, [f, O + " TV"], [g, $]],
              [/crkey/i],
              [
                [f, E + "cast"],
                [y, L],
                [g, $],
              ],
              [/droid.+aft(\w+)( bui|\))/i],
              [f, [y, I], [g, $]],
              [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
              [f, [y, ht], [g, $]],
              [/(bravia[\w ]+)( bui|\))/i],
              [f, [y, gt], [g, $]],
              [/(mitv-\w{5}) bui/i],
              [f, [y, pt], [g, $]],
              [/Hbbtv.*(technisat) (.*);/i],
              [y, f, [g, $]],
              [
                /\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
                /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i,
              ],
              [
                [y, ie],
                [f, ie],
                [g, $],
              ],
              [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],
              [[g, $]],
              [/(ouya)/i, /(nintendo) ([wids3utch]+)/i],
              [y, f, [g, w]],
              [/droid.+; (shield) bui/i],
              [f, [y, "Nvidia"], [g, w]],
              [/(playstation [345portablevi]+)/i],
              [f, [y, gt], [g, w]],
              [/\b(xbox(?: one)?(?!; xbox))[\); ]/i],
              [f, [y, oe], [g, w]],
              [/((pebble))app/i],
              [y, f, [g, N]],
              [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],
              [f, [y, O], [g, N]],
              [/droid.+; (glass) \d/i],
              [f, [y, L], [g, N]],
              [/droid.+; (wt63?0{2,3})\)/i],
              [f, [y, $t], [g, N]],
              [/(quest( \d| pro)?)/i],
              [f, [y, ot], [g, N]],
              [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
              [y, [g, P]],
              [/(aeobc)\b/i],
              [f, [y, I], [g, P]],
              [
                /droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i,
              ],
              [f, [g, k]],
              [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],
              [f, [g, D]],
              [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],
              [[g, D]],
              [
                /(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i,
              ],
              [[g, k]],
              [/(android[-\w\. ]{0,9});.+buil/i],
              [f, [y, "Generic"]],
            ],
            engine: [
              [/windows.+ edge\/([\w\.]+)/i],
              [v, [p, "EdgeHTML"]],
              [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
              [v, [p, "Blink"]],
              [
                /(presto)\/([\w\.]+)/i,
                /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
                /ekioh(flow)\/([\w\.]+)/i,
                /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
                /(icab)[\/ ]([23]\.[\d\.]+)/i,
                /\b(libweb)/i,
              ],
              [p, v],
              [/rv\:([\w\.]{1,9})\b.+(gecko)/i],
              [v, p],
            ],
            os: [
              [/microsoft (windows) (vista|xp)/i],
              [p, v],
              [/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],
              [p, [v, Pe, kt]],
              [
                /windows nt 6\.2; (arm)/i,
                /windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
                /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i,
              ],
              [
                [v, Pe, kt],
                [p, "Windows"],
              ],
              [
                /ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
                /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,
                /cfnetwork\/.+darwin/i,
              ],
              [
                [v, /_/g, "."],
                [p, "iOS"],
              ],
              [
                /(mac os x) ?([\w\. ]*)/i,
                /(macintosh|mac_powerpc\b)(?!.+haiku)/i,
              ],
              [
                [p, He],
                [v, /_/g, "."],
              ],
              [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],
              [v, p],
              [
                /(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
                /(blackberry)\w*\/([\w\.]*)/i,
                /(tizen|kaios)[\/ ]([\w\.]+)/i,
                /\((series40);/i,
              ],
              [p, v],
              [/\(bb(10);/i],
              [v, [p, G]],
              [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],
              [v, [p, "Symbian"]],
              [
                /mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i,
              ],
              [v, [p, S + " OS"]],
              [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],
              [v, [p, "webOS"]],
              [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],
              [v, [p, "watchOS"]],
              [/crkey\/([\d\.]+)/i],
              [v, [p, E + "cast"]],
              [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
              [[p, tt], v],
              [
                /panasonic;(viera)/i,
                /(netrange)mmh/i,
                /(nettv)\/(\d+\.[\w\.]+)/i,
                /(nintendo|playstation) ([wids345portablevuch]+)/i,
                /(xbox); +xbox ([^\);]+)/i,
                /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
                /(mint)[\/\(\) ]?(\w*)/i,
                /(mageia|vectorlinux)[; ]/i,
                /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
                /(hurd|linux) ?([\w\.]*)/i,
                /(gnu) ?([\w\.]*)/i,
                /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
                /(haiku) (\w+)/i,
              ],
              [p, v],
              [/(sunos) ?([\w\.\d]*)/i],
              [[p, "Solaris"], v],
              [
                /((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
                /(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
                /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
                /(unix) ?([\w\.]*)/i,
              ],
              [p, v],
            ],
          },
          B = function (lt, Et) {
            if (
              (typeof lt === c && ((Et = lt), (lt = o)), !(this instanceof B))
            )
              return new B(lt, Et).getResult();
            var St = typeof i !== u && i.navigator ? i.navigator : o,
              Lt = lt || (St && St.userAgent ? St.userAgent : ""),
              ln = St && St.userAgentData ? St.userAgentData : o,
              Ln = Et
                ? (function (sr, hi) {
                    var Ra = {};
                    for (var En in sr)
                      hi[En] && hi[En].length % 2 == 0
                        ? (Ra[En] = hi[En].concat(sr[En]))
                        : (Ra[En] = sr[En]);
                    return Ra;
                  })(Gt, Et)
                : Gt,
              Tr = St && St.userAgent == Lt;
            return (
              (this.getBrowser = function () {
                var sr,
                  hi = {};
                return (
                  (hi[p] = o),
                  (hi[v] = o),
                  Ne.call(hi, Lt, Ln.browser),
                  (hi[h] =
                    typeof (sr = hi[v]) === d
                      ? sr.replace(/[^\d\.]/g, "").split(".")[0]
                      : o),
                  Tr &&
                    St &&
                    St.brave &&
                    typeof St.brave.isBrave == l &&
                    (hi[p] = "Brave"),
                  hi
                );
              }),
              (this.getCPU = function () {
                var sr = {};
                return (sr[b] = o), Ne.call(sr, Lt, Ln.cpu), sr;
              }),
              (this.getDevice = function () {
                var sr = {};
                return (
                  (sr[y] = o),
                  (sr[f] = o),
                  (sr[g] = o),
                  Ne.call(sr, Lt, Ln.device),
                  Tr && !sr[g] && ln && ln.mobile && (sr[g] = k),
                  Tr &&
                    sr[f] == "Macintosh" &&
                    St &&
                    typeof St.standalone !== u &&
                    St.maxTouchPoints &&
                    St.maxTouchPoints > 2 &&
                    ((sr[f] = "iPad"), (sr[g] = D)),
                  sr
                );
              }),
              (this.getEngine = function () {
                var sr = {};
                return (sr[p] = o), (sr[v] = o), Ne.call(sr, Lt, Ln.engine), sr;
              }),
              (this.getOS = function () {
                var sr = {};
                return (
                  (sr[p] = o),
                  (sr[v] = o),
                  Ne.call(sr, Lt, Ln.os),
                  Tr &&
                    !sr[p] &&
                    ln &&
                    ln.platform &&
                    ln.platform != "Unknown" &&
                    (sr[p] = ln.platform
                      .replace(/chrome os/i, tt)
                      .replace(/macos/i, He)),
                  sr
                );
              }),
              (this.getResult = function () {
                return {
                  ua: this.getUA(),
                  browser: this.getBrowser(),
                  engine: this.getEngine(),
                  os: this.getOS(),
                  device: this.getDevice(),
                  cpu: this.getCPU(),
                };
              }),
              (this.getUA = function () {
                return Lt;
              }),
              (this.setUA = function (sr) {
                return (
                  (Lt = typeof sr === d && sr.length > 500 ? ie(sr, 500) : sr),
                  this
                );
              }),
              this.setUA(Lt),
              this
            );
          };
        (B.VERSION = "1.0.38"),
          (B.BROWSER = de([p, v, h])),
          (B.CPU = de([b])),
          (B.DEVICE = de([f, y, g, w, k, $, D, N, P])),
          (B.ENGINE = B.OS = de([p, v])),
          typeof e !== u
            ? (t.exports && (e = t.exports = B), (e.UAParser = B))
            : n.amdO
            ? (r = function () {
                return B;
              }.call(e, n, e, t)) === o || (t.exports = r)
            : typeof i !== u && (i.UAParser = B);
        var re = typeof i !== u && (i.jQuery || i.Zepto);
        if (re && !re.ua) {
          var Ae = new B();
          (re.ua = Ae.getResult()),
            (re.ua.get = function () {
              return Ae.getUA();
            }),
            (re.ua.set = function (lt) {
              Ae.setUA(lt);
              var Et = Ae.getResult();
              for (var St in Et) re.ua[St] = Et[St];
            });
        }
      })(typeof window == "object" ? window : this);
    },
    9e3: function (t, e, n) {
      function r(i) {
        try {
          if (!n.g.localStorage) return !1;
        } catch {
          return !1;
        }
        var o = n.g.localStorage[i];
        return o != null && String(o).toLowerCase() === "true";
      }
      t.exports = function (i, o) {
        if (r("noDeprecation")) return i;
        var l = !1;
        return function () {
          if (!l) {
            if (r("throwDeprecation")) throw new Error(o);
            r("traceDeprecation") ? console.trace(o) : console.warn(o),
              (l = !0);
          }
          return i.apply(this, arguments);
        };
      };
    },
    3779: function () {},
    7199: function () {},
    5393: function (t, e, n) {
      n.r(e),
        n.d(e, {
          Debug: function () {
            return o.default;
          },
          FactoryMaker: function () {
            return i.default;
          },
          MediaPlayer: function () {
            return r.default;
          },
        });
      var r = n(5849),
        i = n(138),
        o = n(649),
        l = n(8986),
        u = (typeof window < "u" && window) || global,
        c = u.dashjs;
      c || (c = u.dashjs = {}),
        (c.MediaPlayer = r.default),
        (c.FactoryMaker = i.default),
        (c.Debug = o.default),
        (c.Version = (0, l.getVersionString)()),
        (e.default = c);
    },
    649: function (t, e, n) {
      n.r(e);
      var r = n(8850),
        i = n(3621),
        o = n(138);
      function l(c) {
        c = c || {};
        const d = this.context,
          h = (0, r.default)(d).getInstance(),
          f = c.settings,
          p = [];
        let g, y, v, b;
        function w(O) {
          return O && O.bind
            ? O.bind(window.console)
            : window.console.log.bind(window.console);
        }
        function k() {
          for (var O = arguments.length, X = new Array(O), G = 0; G < O; G++)
            X[G] = arguments[G];
          I(1, this, ...X);
        }
        function D() {
          for (var O = arguments.length, X = new Array(O), G = 0; G < O; G++)
            X[G] = arguments[G];
          I(2, this, ...X);
        }
        function $() {
          for (var O = arguments.length, X = new Array(O), G = 0; G < O; G++)
            X[G] = arguments[G];
          I(3, this, ...X);
        }
        function N() {
          for (var O = arguments.length, X = new Array(O), G = 0; G < O; G++)
            X[G] = arguments[G];
          I(4, this, ...X);
        }
        function P() {
          for (var O = arguments.length, X = new Array(O), G = 0; G < O; G++)
            X[G] = arguments[G];
          I(5, this, ...X);
        }
        function I(O, X) {
          let G = "",
            H = null;
          y && ((H = new Date().getTime()), (G += "[" + (H - b) + "]")),
            v &&
              X &&
              X.getClassName &&
              ((G += "[" + X.getClassName() + "]"),
              X.getType && (G += "[" + X.getType() + "]")),
            G.length > 0 && (G += " ");
          for (
            var E = arguments.length, S = new Array(E > 2 ? E - 2 : 0), L = 2;
            L < E;
            L++
          )
            S[L - 2] = arguments[L];
          Array.apply(null, S).forEach(function (W) {
            G += W + " ";
          }),
            p[O] && f && f.get().debug.logLevel >= O && p[O](G),
            f &&
              f.get().debug.dispatchEvent &&
              h.trigger(i.default.LOG, { message: G, level: O });
        }
        return (
          (g = {
            getLogger: function (O) {
              return {
                fatal: k.bind(O),
                error: D.bind(O),
                warn: $.bind(O),
                info: N.bind(O),
                debug: P.bind(O),
              };
            },
            setLogTimestampVisible: function (O) {
              y = O;
            },
            setCalleeNameVisible: function (O) {
              v = O;
            },
          }),
          (y = !0),
          (v = !0),
          (b = new Date().getTime()),
          typeof window < "u" &&
            window.console &&
            ((p[1] = w(window.console.error)),
            (p[2] = w(window.console.error)),
            (p[3] = w(window.console.warn)),
            (p[4] = w(window.console.info)),
            (p[5] = w(window.console.debug))),
          g
        );
      }
      l.__dashjs_factory_name = "Debug";
      const u = o.default.getSingletonFactory(l);
      (u.LOG_LEVEL_NONE = 0),
        (u.LOG_LEVEL_FATAL = 1),
        (u.LOG_LEVEL_ERROR = 2),
        (u.LOG_LEVEL_WARNING = 3),
        (u.LOG_LEVEL_INFO = 4),
        (u.LOG_LEVEL_DEBUG = 5),
        o.default.updateSingletonFactory(l.__dashjs_factory_name, u),
        (e.default = u);
    },
    8850: function (t, e, n) {
      n.r(e);
      var r = n(138),
        i = n(1191);
      function o() {
        let u = {};
        function c(p, g, y) {
          let v =
              arguments.length > 3 && arguments[3] !== void 0
                ? arguments[3]
                : {},
            b = arguments.length > 4 && arguments[4] !== void 0 && arguments[4];
          if (!p) throw new Error("event type cannot be null or undefined");
          if (!g || typeof g != "function")
            throw new Error("listener must be a function: " + g);
          let w = v.priority || 0;
          if (h(p, g, y) >= 0) return;
          u[p] = u[p] || [];
          const k = { callback: g, scope: y, priority: w, executeOnlyOnce: b };
          y && y.getStreamId && (k.streamId = y.getStreamId()),
            y && y.getType && (k.mediaType = y.getType()),
            v && v.mode && (k.mode = v.mode),
            u[p].some((D, $) => {
              if (D && w > D.priority) return u[p].splice($, 0, k), !0;
            }) || u[p].push(k);
        }
        function d(p, g, y) {
          if (!p || !g || !u[p]) return;
          const v = h(p, g, y);
          v < 0 || (u[p][v] = null);
        }
        function h(p, g, y) {
          let v = -1;
          return (
            u[p] &&
              u[p].some((b, w) => {
                if (b && b.callback === g && (!y || y === b.scope))
                  return (v = w), !0;
              }),
            v
          );
        }
        return {
          on: function (p, g, y) {
            c(
              p,
              g,
              y,
              arguments.length > 3 && arguments[3] !== void 0
                ? arguments[3]
                : {}
            );
          },
          once: function (p, g, y) {
            c(
              p,
              g,
              y,
              arguments.length > 3 && arguments[3] !== void 0
                ? arguments[3]
                : {},
              !0
            );
          },
          off: d,
          trigger: function (p) {
            let g =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : {},
              y =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : {};
            if (!p || !u[p]) return;
            if (((g = g || {}), g.hasOwnProperty("type")))
              throw new Error(
                "'type' is a reserved word for event dispatching"
              );
            (g.type = p),
              y.streamId && (g.streamId = y.streamId),
              y.mediaType && (g.mediaType = y.mediaType);
            const v = [];
            u[p]
              .filter(
                (b) =>
                  !(
                    !b ||
                    (y.streamId && b.streamId && b.streamId !== y.streamId) ||
                    (y.mediaType &&
                      b.mediaType &&
                      b.mediaType !== y.mediaType) ||
                    (y.mode && b.mode && b.mode !== y.mode) ||
                    (!b.mode &&
                      y.mode &&
                      y.mode === i.default.EVENT_MODE_ON_RECEIVE)
                  )
              )
              .forEach((b) => {
                b && b.callback.call(b.scope, g),
                  b.executeOnlyOnce && v.push(b);
              }),
              v.forEach((b) => {
                d(p, b.callback, b.scope);
              });
          },
          reset: function () {
            u = {};
          },
        };
      }
      o.__dashjs_factory_name = "EventBus";
      const l = r.default.getSingletonFactory(o);
      (l.EVENT_PRIORITY_LOW = 0),
        (l.EVENT_PRIORITY_HIGH = 5e3),
        r.default.updateSingletonFactory(o.__dashjs_factory_name, l),
        (e.default = l);
    },
    138: function (t, e, n) {
      n.r(e);
      const r = (function () {
        let i,
          o = [];
        const l = {},
          u = {};
        function c(p, g) {
          for (const y in o) {
            const v = o[y];
            if (v.context === p && v.name === g) return v.instance;
          }
          return null;
        }
        function d(p, g) {
          return g[p];
        }
        function h(p, g, y) {
          p in y && (y[p] = g);
        }
        function f(p, g, y) {
          let v;
          const b = p.__dashjs_factory_name,
            w = g[b];
          if (w) {
            let k = w.instance;
            if (!w.override) return k.apply({ context: g, factory: i }, y);
            (v = p.apply({ context: g }, y)),
              (k = k.apply({ context: g, factory: i, parent: v }, y));
            for (const D in k) v.hasOwnProperty(D) && (v[D] = k[D]);
          } else v = p.apply({ context: g }, y);
          return (
            (v.getClassName = function () {
              return b;
            }),
            v
          );
        }
        return (
          (i = {
            extend: function (p, g, y, v) {
              !v[p] && g && (v[p] = { instance: g, override: y });
            },
            getSingletonInstance: c,
            setSingletonInstance: function (p, g, y) {
              for (const v in o) {
                const b = o[v];
                if (b.context === p && b.name === g)
                  return void (o[v].instance = y);
              }
              o.push({ name: g, context: p, instance: y });
            },
            deleteSingletonInstances: function (p) {
              o = o.filter((g) => g.context !== p);
            },
            getSingletonFactory: function (p) {
              let g = d(p.__dashjs_factory_name, l);
              return (
                g ||
                  ((g = function (y) {
                    let v;
                    return (
                      y === void 0 && (y = {}),
                      {
                        getInstance: function () {
                          return (
                            v || (v = c(y, p.__dashjs_factory_name)),
                            v ||
                              ((v = f(p, y, arguments)),
                              o.push({
                                name: p.__dashjs_factory_name,
                                context: y,
                                instance: v,
                              })),
                            v
                          );
                        },
                      }
                    );
                  }),
                  (l[p.__dashjs_factory_name] = g)),
                g
              );
            },
            getSingletonFactoryByName: function (p) {
              return d(p, l);
            },
            updateSingletonFactory: function (p, g) {
              h(p, g, l);
            },
            getClassFactory: function (p) {
              let g = d(p.__dashjs_factory_name, u);
              return (
                g ||
                  ((g = function (y) {
                    return (
                      y === void 0 && (y = {}),
                      {
                        create: function () {
                          return f(p, y, arguments);
                        },
                      }
                    );
                  }),
                  (u[p.__dashjs_factory_name] = g)),
                g
              );
            },
            getClassFactoryByName: function (p) {
              return d(p, u);
            },
            updateClassFactory: function (p, g) {
              h(p, g, u);
            },
          }),
          i
        );
      })();
      e.default = r;
    },
    8261: function (t, e, n) {
      n.r(e);
      var r = n(138),
        i = n(7263),
        o = n(649),
        l = n(5212),
        u = n(7568),
        c = n(8850),
        d = n(3621);
      function h() {
        let p;
        const g = this.context,
          y = (0, c.default)(g).getInstance(),
          v = {
            "streaming.delay.liveDelay": d.default.SETTING_UPDATED_LIVE_DELAY,
            "streaming.delay.liveDelayFragmentCount":
              d.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,
            "streaming.liveCatchup.enabled":
              d.default.SETTING_UPDATED_CATCHUP_ENABLED,
            "streaming.liveCatchup.playbackRate.min":
              d.default.SETTING_UPDATED_PLAYBACK_RATE_MIN,
            "streaming.liveCatchup.playbackRate.max":
              d.default.SETTING_UPDATED_PLAYBACK_RATE_MAX,
            "streaming.abr.rules.throughputRule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.rules.bolaRule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.rules.insufficientBufferRule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.rules.switchHistoryRule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.rules.droppedFramesRule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.rules.abandonRequestsRule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.rules.l2ARule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.rules.loLPRule.active":
              d.default.SETTING_UPDATED_ABR_ACTIVE_RULES,
            "streaming.abr.maxBitrate.video":
              d.default.SETTING_UPDATED_MAX_BITRATE,
            "streaming.abr.maxBitrate.audio":
              d.default.SETTING_UPDATED_MAX_BITRATE,
            "streaming.abr.minBitrate.video":
              d.default.SETTING_UPDATED_MIN_BITRATE,
            "streaming.abr.minBitrate.audio":
              d.default.SETTING_UPDATED_MIN_BITRATE,
          },
          b = {
            debug: { logLevel: o.default.LOG_LEVEL_WARNING, dispatchEvent: !1 },
            streaming: {
              abandonLoadTimeout: 1e4,
              wallclockTimeUpdateInterval: 100,
              manifestUpdateRetryInterval: 100,
              liveUpdateTimeThresholdInMilliseconds: 0,
              cacheInitSegments: !1,
              applyServiceDescription: !0,
              applyProducerReferenceTime: !0,
              applyContentSteering: !0,
              enableManifestDurationMismatchFix: !0,
              parseInbandPrft: !1,
              enableManifestTimescaleMismatchFix: !1,
              capabilities: {
                filterUnsupportedEssentialProperties: !0,
                supportedEssentialProperties: [
                  { schemeIdUri: l.default.FONT_DOWNLOAD_DVB_SCHEME },
                  {
                    schemeIdUri: l.default.COLOUR_PRIMARIES_SCHEME_ID_URI,
                    value: /1|5|6|7/,
                  },
                  { schemeIdUri: l.default.URL_QUERY_INFO_SCHEME },
                  { schemeIdUri: l.default.EXT_URL_QUERY_INFO_SCHEME },
                  {
                    schemeIdUri: l.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI,
                    value: /0|1|5|6/,
                  },
                  {
                    schemeIdUri:
                      l.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI,
                    value: /1|6|13|14|15/,
                  },
                  ...l.default.THUMBNAILS_SCHEME_ID_URIS.map((D) => ({
                    schemeIdUri: D,
                  })),
                ],
                useMediaCapabilitiesApi: !0,
                filterVideoColorimetryEssentialProperties: !1,
                filterHDRMetadataFormatEssentialProperties: !1,
              },
              events: {
                eventControllerRefreshDelay: 100,
                deleteEventMessageDataAfterEventStarted: !0,
              },
              timeShiftBuffer: {
                calcFromSegmentTimeline: !1,
                fallbackToSegmentTimeline: !0,
              },
              metrics: { maxListDepth: 100 },
              delay: {
                liveDelayFragmentCount: NaN,
                liveDelay: NaN,
                useSuggestedPresentationDelay: !0,
              },
              protection: {
                keepProtectionMediaKeys: !1,
                ignoreEmeEncryptedEvent: !1,
                detectPlayreadyMessageFormat: !0,
                ignoreKeyStatuses: !1,
              },
              buffer: {
                enableSeekDecorrelationFix: !1,
                fastSwitchEnabled: null,
                flushBufferAtTrackSwitch: !1,
                reuseExistingSourceBuffers: !0,
                bufferPruningInterval: 10,
                bufferToKeep: 20,
                bufferTimeAtTopQuality: 30,
                bufferTimeAtTopQualityLongForm: 60,
                initialBufferLevel: NaN,
                bufferTimeDefault: 18,
                longFormContentDurationThreshold: 600,
                stallThreshold: 0.3,
                useAppendWindow: !0,
                setStallState: !0,
                avoidCurrentTimeRangePruning: !1,
                useChangeType: !0,
                mediaSourceDurationInfinity: !0,
                resetSourceBuffersForTrackSwitch: !1,
                syntheticStallEvents: { enabled: !1, ignoreReadyState: !1 },
              },
              gaps: {
                jumpGaps: !0,
                jumpLargeGaps: !0,
                smallGapLimit: 1.5,
                threshold: 0.3,
                enableSeekFix: !0,
                enableStallFix: !1,
                stallSeek: 0.1,
              },
              utcSynchronization: {
                enabled: !0,
                useManifestDateHeaderTimeSource: !0,
                backgroundAttempts: 2,
                timeBetweenSyncAttempts: 30,
                maximumTimeBetweenSyncAttempts: 600,
                minimumTimeBetweenSyncAttempts: 2,
                timeBetweenSyncAttemptsAdjustmentFactor: 2,
                maximumAllowedDrift: 100,
                enableBackgroundSyncAfterSegmentDownloadError: !0,
                defaultTimingSource: {
                  scheme: "urn:mpeg:dash:utc:http-xsdate:2014",
                  value: "https://time.akamai.com/?iso&ms",
                },
              },
              scheduling: {
                defaultTimeout: 500,
                lowLatencyTimeout: 0,
                scheduleWhilePaused: !0,
              },
              text: {
                defaultEnabled: !0,
                dispatchForManualRendering: !1,
                extendSegmentedCues: !0,
                imsc: { displayForcedOnlyMode: !1, enableRollUp: !0 },
                webvtt: { customRenderingEnabled: !1 },
              },
              liveCatchup: {
                maxDrift: NaN,
                playbackRate: { min: NaN, max: NaN },
                playbackBufferMin: 0.5,
                enabled: null,
                mode: l.default.LIVE_CATCHUP_MODE_DEFAULT,
              },
              lastBitrateCachingInfo: { enabled: !0, ttl: 36e4 },
              lastMediaSettingsCachingInfo: { enabled: !0, ttl: 36e4 },
              saveLastMediaSettingsForCurrentStreamingSession: !0,
              cacheLoadThresholds: { video: 10, audio: 5 },
              trackSwitchMode: {
                audio: l.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE,
                video: l.default.TRACK_SWITCH_MODE_NEVER_REPLACE,
              },
              selectionModeForInitialTrack:
                l.default.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,
              fragmentRequestTimeout: 2e4,
              fragmentRequestProgressTimeout: -1,
              manifestRequestTimeout: 1e4,
              retryIntervals: {
                [u.HTTPRequest.MPD_TYPE]: 500,
                [u.HTTPRequest.XLINK_EXPANSION_TYPE]: 500,
                [u.HTTPRequest.MEDIA_SEGMENT_TYPE]: 1e3,
                [u.HTTPRequest.INIT_SEGMENT_TYPE]: 1e3,
                [u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]: 1e3,
                [u.HTTPRequest.INDEX_SEGMENT_TYPE]: 1e3,
                [u.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]: 1e3,
                [u.HTTPRequest.LICENSE]: 1e3,
                [u.HTTPRequest.OTHER_TYPE]: 1e3,
                lowLatencyReductionFactor: 10,
              },
              retryAttempts: {
                [u.HTTPRequest.MPD_TYPE]: 3,
                [u.HTTPRequest.XLINK_EXPANSION_TYPE]: 1,
                [u.HTTPRequest.MEDIA_SEGMENT_TYPE]: 3,
                [u.HTTPRequest.INIT_SEGMENT_TYPE]: 3,
                [u.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]: 3,
                [u.HTTPRequest.INDEX_SEGMENT_TYPE]: 3,
                [u.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE]: 3,
                [u.HTTPRequest.LICENSE]: 3,
                [u.HTTPRequest.OTHER_TYPE]: 3,
                lowLatencyMultiplyFactor: 5,
              },
              abr: {
                limitBitrateByPortal: !1,
                usePixelRatioInLimitBitrateByPortal: !1,
                enableSupplementalPropertyAdaptationSetSwitching: !0,
                rules: {
                  throughputRule: { active: !0 },
                  bolaRule: { active: !0 },
                  insufficientBufferRule: {
                    active: !0,
                    parameters: {
                      throughputSafetyFactor: 0.7,
                      segmentIgnoreCount: 2,
                    },
                  },
                  switchHistoryRule: {
                    active: !0,
                    parameters: {
                      sampleSize: 8,
                      switchPercentageThreshold: 0.075,
                    },
                  },
                  droppedFramesRule: {
                    active: !1,
                    parameters: {
                      minimumSampleSize: 375,
                      droppedFramesPercentageThreshold: 0.15,
                    },
                  },
                  abandonRequestsRule: {
                    active: !0,
                    parameters: {
                      abandonDurationMultiplier: 1.8,
                      minSegmentDownloadTimeThresholdInMs: 500,
                      minThroughputSamplesThreshold: 6,
                    },
                  },
                  l2ARule: { active: !1 },
                  loLPRule: { active: !1 },
                },
                throughput: {
                  averageCalculationMode:
                    l.default.THROUGHPUT_CALCULATION_MODES.EWMA,
                  lowLatencyDownloadTimeCalculationMode:
                    l.default.LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE
                      .MOOF_PARSING,
                  useResourceTimingApi: !0,
                  useNetworkInformationApi: { xhr: !1, fetch: !1 },
                  useDeadTimeLatency: !0,
                  bandwidthSafetyFactor: 0.9,
                  sampleSettings: {
                    live: 3,
                    vod: 4,
                    enableSampleSizeAdjustment: !0,
                    decreaseScale: 0.7,
                    increaseScale: 1.3,
                    maxMeasurementsToKeep: 20,
                    averageLatencySampleAmount: 4,
                  },
                  ewma: {
                    throughputSlowHalfLifeSeconds: 8,
                    throughputFastHalfLifeSeconds: 3,
                    latencySlowHalfLifeCount: 2,
                    latencyFastHalfLifeCount: 1,
                    weightDownloadTimeMultiplicationFactor: 0.0015,
                  },
                },
                maxBitrate: { audio: -1, video: -1 },
                minBitrate: { audio: -1, video: -1 },
                initialBitrate: { audio: -1, video: -1 },
                autoSwitchBitrate: { audio: !0, video: !0 },
              },
              cmcd: {
                applyParametersFromMpd: !0,
                enabled: !1,
                sid: null,
                cid: null,
                rtp: null,
                rtpSafetyFactor: 5,
                mode: l.default.CMCD_MODE_QUERY,
                enabledKeys: l.default.CMCD_AVAILABLE_KEYS,
                includeInRequests: ["segment", "mpd"],
                version: 1,
              },
              cmsd: { enabled: !1, abr: { applyMb: !1, etpWeightRatio: 0 } },
              defaultSchemeIdUri: {
                viewpoint: "",
                audioChannelConfiguration:
                  "urn:mpeg:mpegB:cicp:ChannelConfiguration",
                role: "urn:mpeg:dash:role:2011",
                accessibility: "urn:mpeg:dash:role:2011",
              },
            },
            errors: { recoverAttempts: { mediaErrorDecode: 5 } },
          };
        let w = i.default.clone(b);
        function k(D, $, N) {
          for (let P in D)
            D.hasOwnProperty(P) &&
              ($.hasOwnProperty(P)
                ? typeof D[P] != "object" ||
                  D[P] instanceof RegExp ||
                  D[P] instanceof Array ||
                  D[P] === null
                  ? (($[P] = i.default.clone(D[P])),
                    v[N + P] && y.trigger(v[N + P]))
                  : k(D[P], $[P], N.slice() + P + ".")
                : console.error(
                    "Settings parameter " + N + P + " is not supported"
                  ));
        }
        return (
          (p = {
            get: function () {
              return w;
            },
            update: function (D) {
              typeof D == "object" && k(D, w, "");
            },
            reset: function () {
              w = i.default.clone(b);
            },
          }),
          p
        );
      }
      h.__dashjs_factory_name = "Settings";
      let f = r.default.getSingletonFactory(h);
      e.default = f;
    },
    7263: function (t, e, n) {
      n.r(e);
      var r = n(3282),
        i = n(8571),
        o = n(5212);
      class l {
        static mixin(c, d, h) {
          let f,
            p = {};
          if (c)
            for (let g in d)
              d.hasOwnProperty(g) &&
                ((f = d[g]),
                (g in c && (c[g] === f || (g in p && p[g] === f))) ||
                  (typeof c[g] == "object" && c[g] !== null
                    ? (c[g] = l.mixin(c[g], f, h))
                    : (c[g] = h(f))));
          return c;
        }
        static clone(c) {
          if (!c || typeof c != "object") return c;
          if (c instanceof RegExp) return new RegExp(c);
          let d;
          if (c instanceof Array) {
            d = [];
            for (let h = 0, f = c.length; h < f; ++h)
              h in c && d.push(l.clone(c[h]));
          } else d = {};
          return l.mixin(d, c, l.clone);
        }
        static addAdditionalQueryParameterToUrl(c, d) {
          try {
            if (!d || d.length === 0) return c;
            let h = c;
            return (
              d.forEach((f) => {
                let { key: p, value: g } = f;
                const y = h.includes("?") ? "&" : "?";
                h += `${y}${encodeURIComponent(p)}=${encodeURIComponent(g)}`;
              }),
              h
            );
          } catch {
            return c;
          }
        }
        static removeQueryParameterFromUrl(c, d) {
          if (!c || !d) return c;
          const h = new URL(c),
            f = new URLSearchParams(h.search);
          return f && f.size !== 0
            ? (f.delete(d), (h.search = f.toString()), h.toString())
            : c;
        }
        static parseHttpHeaders(c) {
          let d = {};
          if (!c) return d;
          let h = c.trim().split(`\r
`);
          for (let f = 0, p = h.length; f < p; f++) {
            let g = h[f],
              y = g.indexOf(": ");
            y > 0 && (d[g.substring(0, y)] = g.substring(y + 2));
          }
          return d;
        }
        static parseQueryParams(c) {
          const d = [],
            h = new URLSearchParams(c);
          for (const [f, p] of h.entries())
            d.push({
              key: decodeURIComponent(f),
              value: decodeURIComponent(p),
            });
          return d;
        }
        static generateUuid() {
          let c = new Date().getTime();
          return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
            /[xy]/g,
            function (d) {
              const h = (c + 16 * Math.random()) % 16 | 0;
              return (
                (c = Math.floor(c / 16)),
                (d == "x" ? h : (3 & h) | 8).toString(16)
              );
            }
          );
        }
        static generateHashCode(c) {
          let d = 0;
          if (c.length === 0) return d;
          for (let h = 0; h < c.length; h++)
            (d = (d << 5) - d + c.charCodeAt(h)), (d |= 0);
          return d;
        }
        static getRelativeUrl(c, d) {
          try {
            const h = new URL(c),
              f = new URL(d);
            if (((h.protocol = f.protocol), h.origin !== f.origin)) return d;
            let p = r.relative(
              h.pathname.substr(0, h.pathname.lastIndexOf("/")),
              f.pathname.substr(0, f.pathname.lastIndexOf("/"))
            );
            const g = p.length === 0 ? 1 : 0;
            return (
              (p += f.pathname.substr(
                f.pathname.lastIndexOf("/") + g,
                f.pathname.length - 1
              )),
              f.pathname.length < p.length ? f.pathname : p
            );
          } catch {
            return d;
          }
        }
        static getHostFromUrl(c) {
          try {
            return new URL(c).host;
          } catch {
            return null;
          }
        }
        static parseUserAgent() {
          let c =
            arguments.length > 0 && arguments[0] !== void 0
              ? arguments[0]
              : null;
          try {
            const d =
              c === null && typeof navigator < "u"
                ? navigator.userAgent.toLowerCase()
                : "";
            return (0, i.UAParser)(d);
          } catch {
            return {};
          }
        }
        static stringHasProtocol(c) {
          return /(http(s?)):\/\//i.test(c);
        }
        static bufferSourceToDataView(c) {
          return l.toDataView(c, DataView);
        }
        static bufferSourceToInt8(c) {
          return l.toDataView(c, Uint8Array);
        }
        static bufferSourceToHex(c) {
          const d = l.bufferSourceToInt8(c);
          let h = "";
          for (let f of d)
            (f = f.toString(16)), f.length === 1 && (f = "0" + f), (h += f);
          return h;
        }
        static toDataView(c, d) {
          const h = l.getArrayBuffer(c);
          let f = 1;
          "BYTES_PER_ELEMENT" in DataView && (f = DataView.BYTES_PER_ELEMENT);
          const p = ((c.byteOffset || 0) + c.byteLength) / f,
            g = (c.byteOffset || 0) / f,
            y = Math.floor(Math.max(0, Math.min(g, p)));
          return new d(
            h,
            y,
            Math.floor(Math.min(y + Math.max(1 / 0, 0), p)) - y
          );
        }
        static getArrayBuffer(c) {
          return c instanceof ArrayBuffer ? c : c.buffer;
        }
        static getCodecFamily(c) {
          const { base: d, profile: h } = l._getCodecParts(c);
          switch (d) {
            case "mp4a":
              switch (h) {
                case "69":
                case "6b":
                case "40.34":
                  return o.default.CODEC_FAMILIES.MP3;
                case "66":
                case "67":
                case "68":
                case "40.2":
                case "40.02":
                case "40.5":
                case "40.05":
                case "40.29":
                case "40.42":
                  return o.default.CODEC_FAMILIES.AAC;
                case "a5":
                  return o.default.CODEC_FAMILIES.AC3;
                case "e6":
                  return o.default.CODEC_FAMILIES.EC3;
                case "b2":
                  return o.default.CODEC_FAMILIES.DTSX;
                case "a9":
                  return o.default.CODEC_FAMILIES.DTSC;
              }
              break;
            case "avc1":
            case "avc3":
              return o.default.CODEC_FAMILIES.AVC;
            case "hvc1":
            case "hvc3":
              return o.default.CODEC_FAMILIES.HEVC;
            default:
              return d;
          }
          return d;
        }
        static _getCodecParts(c) {
          const [d, ...h] = c.split(".");
          return { base: d, profile: h.join(".") };
        }
      }
      e.default = l;
    },
    8986: function (t, e, n) {
      n.r(e),
        n.d(e, {
          getVersionString: function () {
            return i;
          },
        });
      const r = "5.0.0";
      function i() {
        return r;
      }
    },
    8748: function (t, e, n) {
      n.r(e),
        (e.default = class {
          extend(r, i) {
            if (!r) return;
            let o = !!i && i.override,
              l = !!i && i.publicOnly;
            for (const u in r)
              !r.hasOwnProperty(u) ||
                (this[u] && !o) ||
                (l && r[u].indexOf("public_") === -1) ||
                (this[u] = r[u]);
          }
        });
    },
    5734: function (t, e, n) {
      n.r(e);
      var r = n(7252);
      class i extends r.default {
        constructor() {
          super(),
            (this.ATTEMPT_BACKGROUND_SYNC = "attemptBackgroundSync"),
            (this.BUFFERING_COMPLETED = "bufferingCompleted"),
            (this.BUFFER_CLEARED = "bufferCleared"),
            (this.BYTES_APPENDED_END_FRAGMENT = "bytesAppendedEndFragment"),
            (this.BUFFER_REPLACEMENT_STARTED = "bufferReplacementStarted"),
            (this.CHECK_FOR_EXISTENCE_COMPLETED = "checkForExistenceCompleted"),
            (this.CMSD_STATIC_HEADER = "cmsdStaticHeader"),
            (this.CURRENT_TRACK_CHANGED = "currentTrackChanged"),
            (this.DATA_UPDATE_COMPLETED = "dataUpdateCompleted"),
            (this.INBAND_EVENTS = "inbandEvents"),
            (this.INITIAL_STREAM_SWITCH = "initialStreamSwitch"),
            (this.INIT_FRAGMENT_LOADED = "initFragmentLoaded"),
            (this.INIT_FRAGMENT_NEEDED = "initFragmentNeeded"),
            (this.INTERNAL_MANIFEST_LOADED = "internalManifestLoaded"),
            (this.ORIGINAL_MANIFEST_LOADED = "originalManifestLoaded"),
            (this.LOADING_COMPLETED = "loadingCompleted"),
            (this.LOADING_PROGRESS = "loadingProgress"),
            (this.LOADING_DATA_PROGRESS = "loadingDataProgress"),
            (this.LOADING_ABANDONED = "loadingAborted"),
            (this.MANIFEST_UPDATED = "manifestUpdated"),
            (this.MEDIA_FRAGMENT_LOADED = "mediaFragmentLoaded"),
            (this.MEDIA_FRAGMENT_NEEDED = "mediaFragmentNeeded"),
            (this.MEDIAINFO_UPDATED = "mediaInfoUpdated"),
            (this.QUOTA_EXCEEDED = "quotaExceeded"),
            (this.SEGMENT_LOCATION_BLACKLIST_ADD =
              "segmentLocationBlacklistAdd"),
            (this.SEGMENT_LOCATION_BLACKLIST_CHANGED =
              "segmentLocationBlacklistChanged"),
            (this.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD =
              "serviceLocationBlacklistAdd"),
            (this.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED =
              "serviceLocationBlacklistChanged"),
            (this.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD =
              "serviceLocationLocationBlacklistAdd"),
            (this.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED =
              "serviceLocationLocationBlacklistChanged"),
            (this.SET_FRAGMENTED_TEXT_AFTER_DISABLED =
              "setFragmentedTextAfterDisabled"),
            (this.SET_NON_FRAGMENTED_TEXT = "setNonFragmentedText"),
            (this.SOURCE_BUFFER_ERROR = "sourceBufferError"),
            (this.STREAMS_COMPOSED = "streamsComposed"),
            (this.STREAM_BUFFERING_COMPLETED = "streamBufferingCompleted"),
            (this.STREAM_REQUESTING_COMPLETED = "streamRequestingCompleted"),
            (this.TEXT_TRACKS_QUEUE_INITIALIZED = "textTracksQueueInitialized"),
            (this.TIME_SYNCHRONIZATION_COMPLETED =
              "timeSynchronizationComplete"),
            (this.UPDATE_TIME_SYNC_OFFSET = "updateTimeSyncOffset"),
            (this.URL_RESOLUTION_FAILED = "urlResolutionFailed"),
            (this.VIDEO_CHUNK_RECEIVED = "videoChunkReceived"),
            (this.WALLCLOCK_TIME_UPDATED = "wallclockTimeUpdated"),
            (this.XLINK_ELEMENT_LOADED = "xlinkElementLoaded"),
            (this.XLINK_READY = "xlinkReady"),
            (this.SEEK_TARGET = "seekTarget"),
            (this.SETTING_UPDATED_LIVE_DELAY = "settingUpdatedLiveDelay"),
            (this.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT =
              "settingUpdatedLiveDelayFragmentCount"),
            (this.SETTING_UPDATED_CATCHUP_ENABLED =
              "settingUpdatedCatchupEnabled"),
            (this.SETTING_UPDATED_PLAYBACK_RATE_MIN =
              "settingUpdatedPlaybackRateMin"),
            (this.SETTING_UPDATED_PLAYBACK_RATE_MAX =
              "settingUpdatedPlaybackRateMax"),
            (this.SETTING_UPDATED_ABR_ACTIVE_RULES =
              "settingUpdatedAbrActiveRules"),
            (this.SETTING_UPDATED_MAX_BITRATE = "settingUpdatedMaxBitrate"),
            (this.SETTING_UPDATED_MIN_BITRATE = "settingUpdatedMinBitrate");
        }
      }
      e.default = i;
    },
    3621: function (t, e, n) {
      n.r(e);
      var r = n(5734);
      class i extends r.default {}
      let o = new i();
      e.default = o;
    },
    7252: function (t, e, n) {
      n.r(e),
        (e.default = class {
          extend(r, i) {
            if (!r) return;
            let o = !!i && i.override,
              l = !!i && i.publicOnly;
            for (const u in r)
              !r.hasOwnProperty(u) ||
                (this[u] && !o) ||
                (l && r[u].indexOf("public_") === -1) ||
                (this[u] = r[u]);
          }
        });
    },
    8854: function (t, e, n) {
      n.r(e),
        (e.default = {
          ACCESSIBILITY: "Accessibility",
          ADAPTATION_SET: "AdaptationSet",
          ADAPTATION_SETS: "adaptationSets",
          ADAPTATION_SET_SWITCHING_SCHEME_ID_URI:
            "urn:mpeg:dash:adaptation-set-switching:2016",
          ADD: "add",
          ASSET_IDENTIFIER: "AssetIdentifier",
          AUDIO_CHANNEL_CONFIGURATION: "AudioChannelConfiguration",
          AUDIO_SAMPLING_RATE: "audioSamplingRate",
          AVAILABILITY_END_TIME: "availabilityEndTime",
          AVAILABILITY_START_TIME: "availabilityStartTime",
          AVAILABILITY_TIME_COMPLETE: "availabilityTimeComplete",
          AVAILABILITY_TIME_OFFSET: "availabilityTimeOffset",
          BANDWITH: "bandwidth",
          BASE_URL: "BaseURL",
          BITSTREAM_SWITCHING: "BitstreamSwitching",
          BITSTREAM_SWITCHING_MINUS: "bitstreamSwitching",
          BYTE_RANGE: "byteRange",
          CAPTION: "caption",
          CENC_DEFAULT_KID: "cenc:default_KID",
          CLIENT_DATA_REPORTING: "ClientDataReporting",
          CLIENT_REQUIREMENT: "clientRequirement",
          CMCD_PARAMETERS: "CMCDParameters",
          CODECS: "codecs",
          CODEC_PRIVATE_DATA: "codecPrivateData",
          CODING_DEPENDENCY: "codingDependency",
          CONTENT_COMPONENT: "ContentComponent",
          CONTENT_PROTECTION: "ContentProtection",
          CONTENT_STEERING: "ContentSteering",
          CONTENT_STEERING_RESPONSE: {
            VERSION: "VERSION",
            TTL: "TTL",
            RELOAD_URI: "RELOAD-URI",
            PATHWAY_PRIORITY: "PATHWAY-PRIORITY",
            PATHWAY_CLONES: "PATHWAY-CLONES",
            BASE_ID: "BASE-ID",
            ID: "ID",
            URI_REPLACEMENT: "URI-REPLACEMENT",
            HOST: "HOST",
            PARAMS: "PARAMS",
          },
          CONTENT_TYPE: "contentType",
          DEFAULT_SERVICE_LOCATION: "defaultServiceLocation",
          DEPENDENCY_ID: "dependencyId",
          DURATION: "duration",
          DVB_PRIORITY: "dvb:priority",
          DVB_WEIGHT: "dvb:weight",
          DVB_URL: "dvb:url",
          DVB_MIMETYPE: "dvb:mimeType",
          DVB_FONTFAMILY: "dvb:fontFamily",
          DYNAMIC: "dynamic",
          ESSENTIAL_PROPERTY: "EssentialProperty",
          EVENT: "Event",
          EVENT_STREAM: "EventStream",
          FORCED_SUBTITLE: "forced-subtitle",
          FRAMERATE: "frameRate",
          FRAME_PACKING: "FramePacking",
          GROUP_LABEL: "GroupLabel",
          HEIGHT: "height",
          ID: "id",
          INBAND: "inband",
          INBAND_EVENT_STREAM: "InbandEventStream",
          INDEX: "index",
          INDEX_RANGE: "indexRange",
          INITIALIZATION: "Initialization",
          INITIALIZATION_MINUS: "initialization",
          LA_URL: "Laurl",
          LA_URL_LOWER_CASE: "laurl",
          LABEL: "Label",
          LANG: "lang",
          LOCATION: "Location",
          MAIN: "main",
          MAXIMUM_SAP_PERIOD: "maximumSAPPeriod",
          MAX_PLAYOUT_RATE: "maxPlayoutRate",
          MAX_SEGMENT_DURATION: "maxSegmentDuration",
          MAX_SUBSEGMENT_DURATION: "maxSubsegmentDuration",
          MEDIA: "media",
          MEDIA_PRESENTATION_DURATION: "mediaPresentationDuration",
          MEDIA_RANGE: "mediaRange",
          MEDIA_STREAM_STRUCTURE_ID: "mediaStreamStructureId",
          METRICS: "Metrics",
          METRICS_MINUS: "metrics",
          MIME_TYPE: "mimeType",
          MINIMUM_UPDATE_PERIOD: "minimumUpdatePeriod",
          MIN_BUFFER_TIME: "minBufferTime",
          MP4_PROTECTION_SCHEME: "urn:mpeg:dash:mp4protection:2011",
          MPD: "MPD",
          MPD_TYPE: "mpd",
          MPD_PATCH_TYPE: "mpdpatch",
          ORIGINAL_MPD_ID: "mpdId",
          ORIGINAL_PUBLISH_TIME: "originalPublishTime",
          PATCH_LOCATION: "PatchLocation",
          PERIOD: "Period",
          PRESENTATION_TIME: "presentationTime",
          PRESENTATION_TIME_OFFSET: "presentationTimeOffset",
          PRO: "pro",
          PRODUCER_REFERENCE_TIME: "ProducerReferenceTime",
          PRODUCER_REFERENCE_TIME_TYPE: {
            ENCODER: "encoder",
            CAPTURED: "captured",
            APPLICATION: "application",
          },
          PROFILES: "profiles",
          PSSH: "pssh",
          PUBLISH_TIME: "publishTime",
          QUALITY_RANKING: "qualityRanking",
          QUERY_BEFORE_START: "queryBeforeStart",
          QUERY_PART: "$querypart$",
          RANGE: "range",
          RATING: "Rating",
          REF: "ref",
          REF_ID: "refId",
          REMOVE: "remove",
          REPLACE: "replace",
          REPORTING: "Reporting",
          REPRESENTATION: "Representation",
          REPRESENTATION_INDEX: "RepresentationIndex",
          ROBUSTNESS: "robustness",
          ROLE: "Role",
          S: "S",
          SAR: "sar",
          SCAN_TYPE: "scanType",
          SEGMENT_ALIGNMENT: "segmentAlignment",
          SEGMENT_BASE: "SegmentBase",
          SEGMENT_LIST: "SegmentList",
          SEGMENT_PROFILES: "segmentProfiles",
          SEGMENT_TEMPLATE: "SegmentTemplate",
          SEGMENT_TIMELINE: "SegmentTimeline",
          SEGMENT_TYPE: "segment",
          SEGMENT_URL: "SegmentURL",
          SERVICE_DESCRIPTION: "ServiceDescription",
          SERVICE_DESCRIPTION_LATENCY: "Latency",
          SERVICE_DESCRIPTION_OPERATING_BANDWIDTH: "OperatingBandwidth",
          SERVICE_DESCRIPTION_OPERATING_QUALITY: "OperatingQuality",
          SERVICE_DESCRIPTION_PLAYBACK_RATE: "PlaybackRate",
          SERVICE_DESCRIPTION_SCOPE: "Scope",
          SERVICE_LOCATION: "serviceLocation",
          SERVICE_LOCATIONS: "serviceLocations",
          SOURCE_URL: "sourceURL",
          START: "start",
          START_NUMBER: "startNumber",
          START_WITH_SAP: "startWithSAP",
          STATIC: "static",
          STEERING_TYPE: "steering",
          SUBSET: "Subset",
          SUBTITLE: "subtitle",
          SUB_REPRESENTATION: "SubRepresentation",
          SUB_SEGMENT_ALIGNMENT: "subsegmentAlignment",
          SUGGESTED_PRESENTATION_DELAY: "suggestedPresentationDelay",
          SUPPLEMENTAL_PROPERTY: "SupplementalProperty",
          SUPPLEMENTAL_CODECS: "scte214:supplementalCodecs",
          TIMESCALE: "timescale",
          TIMESHIFT_BUFFER_DEPTH: "timeShiftBufferDepth",
          TTL: "ttl",
          TYPE: "type",
          UTC_TIMING: "UTCTiming",
          VALUE: "value",
          VIEWPOINT: "Viewpoint",
          WALL_CLOCK_TIME: "wallClockTime",
          WIDTH: "width",
        });
    },
    5717: function (t, e, n) {
      n.r(e),
        (e.default = class {
          constructor() {
            (this.schemeIdUri = ""), (this.value = "");
          }
        });
    },
    5849: function (t, e, n) {
      n.r(e),
        n.d(e, {
          default: function () {
            return Zm;
          },
        });
      class r {
        constructor() {
          (this.time = null), (this.verboseLevel = 0);
        }
        log(U, K) {
          if (this.verboseLevel >= U) {
            const Q = typeof K == "function" ? K() : K;
            console.log(`${this.time} [${U}] ${Q}`);
          }
        }
      }
      class i {
        constructor() {
          (this.foreground = "white"),
            (this.underline = !1),
            (this.italics = !1),
            (this.background = "black"),
            (this.flash = !1);
        }
        reset() {
          (this.foreground = "white"),
            (this.underline = !1),
            (this.italics = !1),
            (this.background = "black"),
            (this.flash = !1);
        }
        setStyles(U) {
          const K = [
            "foreground",
            "underline",
            "italics",
            "background",
            "flash",
          ];
          for (let Q = 0; Q < K.length; Q++) {
            const q = K[Q];
            Object.prototype.hasOwnProperty.call(U, q) && (this[q] = U[q]);
          }
        }
        isDefault() {
          return (
            this.foreground === "white" &&
            !this.underline &&
            !this.italics &&
            this.background === "black" &&
            !this.flash
          );
        }
        equals(U) {
          return (
            this.foreground === U.foreground &&
            this.underline === U.underline &&
            this.italics === U.italics &&
            this.background === U.background &&
            this.flash === U.flash
          );
        }
        copy(U) {
          (this.foreground = U.foreground),
            (this.underline = U.underline),
            (this.italics = U.italics),
            (this.background = U.background),
            (this.flash = U.flash);
        }
      }
      class o {
        constructor() {
          (this.uchar = " "), (this.penState = new i());
        }
        reset() {
          (this.uchar = " "), this.penState.reset();
        }
        setChar(U, K) {
          (this.uchar = U), this.penState.copy(K);
        }
        setPenState(U) {
          this.penState.copy(U);
        }
        equals(U) {
          return this.uchar === U.uchar && this.penState.equals(U.penState);
        }
        copy(U) {
          (this.uchar = U.uchar), this.penState.copy(U.penState);
        }
        isEmpty() {
          return this.uchar === " " && this.penState.isDefault();
        }
      }
      const l = 100,
        u = {
          42: 225,
          92: 233,
          94: 237,
          95: 243,
          96: 250,
          123: 231,
          124: 247,
          125: 209,
          126: 241,
          127: 9608,
          128: 174,
          129: 176,
          130: 189,
          131: 191,
          132: 8482,
          133: 162,
          134: 163,
          135: 9834,
          136: 224,
          137: 32,
          138: 232,
          139: 226,
          140: 234,
          141: 238,
          142: 244,
          143: 251,
          144: 193,
          145: 201,
          146: 211,
          147: 218,
          148: 220,
          149: 252,
          150: 8216,
          151: 161,
          152: 42,
          153: 8217,
          154: 9473,
          155: 169,
          156: 8480,
          157: 8226,
          158: 8220,
          159: 8221,
          160: 192,
          161: 194,
          162: 199,
          163: 200,
          164: 202,
          165: 203,
          166: 235,
          167: 206,
          168: 207,
          169: 239,
          170: 212,
          171: 217,
          172: 249,
          173: 219,
          174: 171,
          175: 187,
          176: 195,
          177: 227,
          178: 205,
          179: 204,
          180: 236,
          181: 210,
          182: 242,
          183: 213,
          184: 245,
          185: 123,
          186: 125,
          187: 92,
          188: 94,
          189: 95,
          190: 124,
          191: 8764,
          192: 196,
          193: 228,
          194: 214,
          195: 246,
          196: 223,
          197: 165,
          198: 164,
          199: 9475,
          200: 197,
          201: 229,
          202: 216,
          203: 248,
          204: 9487,
          205: 9491,
          206: 9495,
          207: 9499,
        },
        c = function (Y) {
          return String.fromCharCode(u[Y] || Y);
        };
      class d {
        constructor() {
          let U =
            arguments.length > 0 && arguments[0] !== void 0
              ? arguments[0]
              : new r();
          (this.chars = []),
            (this.cueStartTime = null),
            (this.pos = 0),
            (this.currPenState = new i());
          for (let K = 0; K < l; K++) this.chars.push(new o());
          this.logger = U;
        }
        equals(U) {
          for (let K = 0; K < l; K++)
            if (!this.chars[K].equals(U.chars[K])) return !1;
          return !0;
        }
        copy(U) {
          for (let K = 0; K < l; K++) this.chars[K].copy(U.chars[K]);
        }
        isEmpty() {
          let U = !0;
          for (let K = 0; K < l; K++)
            if (!this.chars[K].isEmpty()) {
              U = !1;
              break;
            }
          return U;
        }
        setCursor(U) {
          this.pos !== U && (this.pos = U),
            this.pos < 0
              ? (this.logger.log(3, "Negative cursor position " + this.pos),
                (this.pos = 0))
              : this.pos > l &&
                (this.logger.log(3, "Too large cursor position " + this.pos),
                (this.pos = l));
        }
        moveCursor(U) {
          const K = this.pos + U;
          if (U > 1)
            for (let Q = this.pos + 1; Q < K + 1; Q++)
              this.chars[Q].setPenState(this.currPenState);
          this.setCursor(K);
        }
        backSpace() {
          this.moveCursor(-1),
            this.chars[this.pos].setChar(" ", this.currPenState);
        }
        insertChar(U) {
          U >= 144 && this.backSpace();
          const K = c(U);
          this.pos >= l
            ? this.logger.log(
                0,
                () =>
                  "Cannot insert " +
                  U.toString(16) +
                  " (" +
                  K +
                  ") at position " +
                  this.pos +
                  ". Skipping it!"
              )
            : (this.chars[this.pos].setChar(K, this.currPenState),
              this.moveCursor(1));
        }
        clearFromPos(U) {
          let K;
          for (K = U; K < l; K++) this.chars[K].reset();
        }
        clear() {
          this.clearFromPos(0), (this.pos = 0), this.currPenState.reset();
        }
        clearToEndOfRow() {
          this.clearFromPos(this.pos);
        }
        getTextString() {
          const U = [];
          let K = !0;
          for (let Q = 0; Q < l; Q++) {
            const q = this.chars[Q].uchar;
            q !== " " && (K = !1), U.push(q);
          }
          return K ? "" : U.join("");
        }
        setPenStyles(U) {
          this.currPenState.setStyles(U),
            this.chars[this.pos].setPenState(this.currPenState);
        }
      }
      const h = 15;
      class f {
        constructor() {
          let U =
            arguments.length > 0 && arguments[0] !== void 0
              ? arguments[0]
              : new r();
          (this.rows = []),
            (this.currRow = 14),
            (this.nrRollUpRows = null),
            (this.lastOutputScreen = null);
          for (let K = 0; K < h; K++) this.rows.push(new d(U));
          this.logger = U;
        }
        reset() {
          for (let U = 0; U < h; U++) this.rows[U].clear();
          this.currRow = 14;
        }
        equals(U) {
          let K = !0;
          for (let Q = 0; Q < h; Q++)
            if (!this.rows[Q].equals(U.rows[Q])) {
              K = !1;
              break;
            }
          return K;
        }
        copy(U) {
          for (let K = 0; K < h; K++) this.rows[K].copy(U.rows[K]);
        }
        isEmpty() {
          let U = !0;
          for (let K = 0; K < h; K++)
            if (!this.rows[K].isEmpty()) {
              U = !1;
              break;
            }
          return U;
        }
        backSpace() {
          this.rows[this.currRow].backSpace();
        }
        clearToEndOfRow() {
          this.rows[this.currRow].clearToEndOfRow();
        }
        insertChar(U) {
          this.rows[this.currRow].insertChar(U);
        }
        setPen(U) {
          this.rows[this.currRow].setPenStyles(U);
        }
        moveCursor(U) {
          this.rows[this.currRow].moveCursor(U);
        }
        setCursor(U) {
          this.logger.log(2, "setCursor: " + U),
            this.rows[this.currRow].setCursor(U);
        }
        setPAC(U) {
          this.logger.log(2, () => "pacData = " + JSON.stringify(U));
          let K = U.row - 1;
          if (
            (this.nrRollUpRows &&
              K < this.nrRollUpRows - 1 &&
              (K = this.nrRollUpRows - 1),
            this.nrRollUpRows && this.currRow !== K)
          ) {
            for (let ve = 0; ve < h; ve++) this.rows[ve].clear();
            const ee = this.currRow + 1 - this.nrRollUpRows,
              fe = this.lastOutputScreen;
            if (fe) {
              const ve = fe.rows[ee].cueStartTime,
                ne = this.logger.time;
              if (ve !== null && ne !== null && ve < ne)
                for (let Te = 0; Te < this.nrRollUpRows; Te++)
                  this.rows[K - this.nrRollUpRows + Te + 1].copy(
                    fe.rows[ee + Te]
                  );
            }
          }
          this.currRow = K;
          const Q = this.rows[this.currRow];
          if (U.indent !== null) {
            const ee = U.indent,
              fe = Math.max(ee - 1, 0);
            Q.setCursor(U.indent), (U.color = Q.chars[fe].penState.foreground);
          }
          const q = {
            foreground: U.color,
            underline: U.underline,
            italics: U.italics,
            background: "black",
            flash: !1,
          };
          this.setPen(q);
        }
        setBkgData(U) {
          this.logger.log(2, () => "bkgData = " + JSON.stringify(U)),
            this.backSpace(),
            this.setPen(U),
            this.insertChar(32);
        }
        setRollUpRows(U) {
          this.nrRollUpRows = U;
        }
        rollUp() {
          if (this.nrRollUpRows === null)
            return void this.logger.log(
              3,
              "roll_up but nrRollUpRows not set yet"
            );
          this.logger.log(1, () => this.getDisplayText());
          const U = this.currRow + 1 - this.nrRollUpRows,
            K = this.rows.splice(U, 1)[0];
          K.clear(),
            this.rows.splice(this.currRow, 0, K),
            this.logger.log(2, "Rolling up");
        }
        getDisplayText(U) {
          U = U || !1;
          const K = [];
          let Q = "",
            q = -1;
          for (let ee = 0; ee < h; ee++) {
            const fe = this.rows[ee].getTextString();
            fe &&
              ((q = ee + 1),
              U ? K.push("Row " + q + ": '" + fe + "'") : K.push(fe.trim()));
          }
          return (
            K.length > 0 &&
              (Q = U
                ? "[" + K.join(" | ") + "]"
                : K.join(`
`)),
            Q
          );
        }
        getTextAndFormat() {
          return this.rows;
        }
      }
      class p {
        constructor(U, K) {
          let Q =
            arguments.length > 2 && arguments[2] !== void 0
              ? arguments[2]
              : new r();
          (this.chNr = U),
            (this.outputFilter = K),
            (this.mode = null),
            (this.displayedMemory = new f(Q)),
            (this.nonDisplayedMemory = new f(Q)),
            (this.lastOutputScreen = new f(Q)),
            (this.writeScreen = this.displayedMemory),
            (this.mode = null),
            (this.cueStartTime = null),
            (this.logger = Q),
            this.logger.log(2, "new Cea608Channel(" + this.chNr + ")");
        }
        reset() {
          var U, K;
          (this.mode = null),
            this.displayedMemory.reset(),
            this.nonDisplayedMemory.reset(),
            this.lastOutputScreen.reset(),
            (K =
              (U = this.outputFilter) === null || U === void 0
                ? void 0
                : U.reset) === null ||
              K === void 0 ||
              K.call(U),
            (this.writeScreen = this.displayedMemory),
            (this.mode = null),
            (this.cueStartTime = null);
        }
        setPAC(U) {
          this.writeScreen.setPAC(U);
        }
        setBkgData(U) {
          this.writeScreen.setBkgData(U);
        }
        setMode(U) {
          U !== this.mode &&
            ((this.mode = U),
            this.logger.log(2, () => "MODE=" + U),
            this.mode === "MODE_POP-ON"
              ? (this.writeScreen = this.nonDisplayedMemory)
              : ((this.writeScreen = this.displayedMemory),
                this.writeScreen.reset()),
            this.mode !== "MODE_ROLL-UP" &&
              (this.displayedMemory.setRollUpRows(null),
              this.nonDisplayedMemory.setRollUpRows(null)),
            (this.mode = U));
        }
        insertChars(U) {
          for (let Q = 0; Q < U.length; Q++) this.writeScreen.insertChar(U[Q]);
          const K =
            this.writeScreen === this.displayedMemory ? "DISP" : "NON_DISP";
          this.logger.log(
            2,
            () => K + ": " + this.writeScreen.getDisplayText(!0)
          ),
            (this.mode !== "MODE_PAINT-ON" && this.mode !== "MODE_ROLL-UP") ||
              (this.logger.log(
                1,
                () => "DISPLAYED: " + this.displayedMemory.getDisplayText(!0)
              ),
              this.outputDataUpdate());
        }
        ccRCL() {
          this.logger.log(2, "RCL - Resume Caption Loading"),
            this.setMode("MODE_POP-ON");
        }
        ccBS() {
          this.logger.log(2, "BS - BackSpace"),
            this.mode !== "MODE_TEXT" &&
              (this.writeScreen.backSpace(),
              this.writeScreen === this.displayedMemory &&
                this.outputDataUpdate());
        }
        ccAOF() {}
        ccAON() {}
        ccDER() {
          this.logger.log(2, "DER- Delete to End of Row"),
            this.writeScreen.clearToEndOfRow(),
            this.outputDataUpdate();
        }
        ccRU(U) {
          this.logger.log(2, "RU(" + U + ") - Roll Up"),
            (this.writeScreen = this.displayedMemory),
            this.setMode("MODE_ROLL-UP"),
            this.writeScreen.setRollUpRows(U);
        }
        ccFON() {
          this.logger.log(2, "FON - Flash On"),
            this.writeScreen.setPen({ flash: !0 });
        }
        ccRDC() {
          this.logger.log(2, "RDC - Resume Direct Captioning"),
            this.setMode("MODE_PAINT-ON");
        }
        ccTR() {
          this.logger.log(2, "TR"), this.setMode("MODE_TEXT");
        }
        ccRTD() {
          this.logger.log(2, "RTD"), this.setMode("MODE_TEXT");
        }
        ccEDM() {
          this.logger.log(2, "EDM - Erase Displayed Memory"),
            this.displayedMemory.reset(),
            this.outputDataUpdate(!0);
        }
        ccCR() {
          this.logger.log(2, "CR - Carriage Return"),
            this.writeScreen.rollUp(),
            this.outputDataUpdate(!0);
        }
        ccENM() {
          this.logger.log(2, "ENM - Erase Non-displayed Memory"),
            this.nonDisplayedMemory.reset();
        }
        ccEOC() {
          if (
            (this.logger.log(2, "EOC - End Of Caption"),
            this.mode === "MODE_POP-ON")
          ) {
            const U = this.displayedMemory;
            (this.displayedMemory = this.nonDisplayedMemory),
              (this.nonDisplayedMemory = U),
              (this.writeScreen = this.nonDisplayedMemory),
              this.logger.log(
                1,
                () => "DISP: " + this.displayedMemory.getDisplayText()
              );
          }
          this.outputDataUpdate(!0);
        }
        ccTO(U) {
          this.logger.log(2, "TO(" + U + ") - Tab Offset"),
            this.writeScreen.moveCursor(U);
        }
        ccMIDROW(U) {
          const K = { flash: !1 };
          if (((K.underline = U % 2 == 1), (K.italics = U >= 46), K.italics))
            K.foreground = "white";
          else {
            const Q = Math.floor(U / 2) - 16,
              q = [
                "white",
                "green",
                "blue",
                "cyan",
                "red",
                "yellow",
                "magenta",
              ];
            K.foreground = q[Q];
          }
          this.logger.log(2, "MIDROW: " + JSON.stringify(K)),
            this.writeScreen.setPen(K);
        }
        outputDataUpdate() {
          let U =
            arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
          const K = this.logger.time;
          K !== null &&
            this.outputFilter &&
            (this.cueStartTime !== null || this.displayedMemory.isEmpty()
              ? this.displayedMemory.equals(this.lastOutputScreen) ||
                (this.outputFilter.newCue(
                  this.cueStartTime,
                  K,
                  this.lastOutputScreen
                ),
                U &&
                  this.outputFilter.dispatchCue &&
                  this.outputFilter.dispatchCue(),
                (this.cueStartTime = this.displayedMemory.isEmpty() ? null : K))
              : (this.cueStartTime = K),
            this.lastOutputScreen.copy(this.displayedMemory));
        }
        cueSplitAtTime(U) {
          this.outputFilter &&
            (this.displayedMemory.isEmpty() ||
              (this.outputFilter.newCue &&
                this.outputFilter.newCue(
                  this.cueStartTime,
                  U,
                  this.displayedMemory
                ),
              (this.cueStartTime = U)));
        }
      }
      const g = [
        "white",
        "green",
        "blue",
        "cyan",
        "red",
        "yellow",
        "magenta",
        "black",
        "transparent",
      ];
      function y(Y, U, K) {
        return K.a === Y && K.b === U;
      }
      const v = function (Y) {
          const U = [];
          for (let K = 0; K < Y.length; K++) U.push(Y[K].toString(16));
          return U;
        },
        b = { 17: 2, 18: 4, 21: 6, 22: 8, 23: 10, 19: 13, 20: 15 },
        w = { 25: 2, 26: 4, 29: 6, 30: 8, 31: 10, 27: 13, 28: 15 },
        k = { 17: 1, 18: 3, 21: 5, 22: 7, 23: 9, 16: 11, 19: 12, 20: 14 },
        D = { 25: 1, 26: 3, 29: 5, 30: 7, 31: 9, 24: 11, 27: 12, 28: 14 };
      function $(Y, U, K) {
        (K.a = Y), (K.b = U);
      }
      class N {
        constructor(U, K, Q) {
          (this.currentChannel = 0),
            (this.cmdHistory = { a: null, b: null }),
            (this.lastTime = null);
          const q = (this.logger = new r());
          this.channels = [null, new p(U, K, q), new p(U + 1, Q, q)];
        }
        addData(U, K) {
          (this.lastTime = U), (this.logger.time = U);
          for (let Q = 0; Q < K.length; Q += 2) {
            const q = 127 & K[Q],
              ee = 127 & K[Q + 1];
            let fe = !1,
              ve = null;
            if (
              (this.lastTime !== null &&
                ((U = this.lastTime + (0.5 * Q * 1001) / 3e4),
                (this.logger.time = U)),
              q === 0 && ee === 0)
            )
              continue;
            this.logger.log(
              3,
              () => "[" + v([K[Q], K[Q + 1]]) + "] -> (" + v([q, ee]) + ")"
            );
            const ne = this.cmdHistory;
            if (q >= 16 && q <= 31) {
              if (y(q, ee, ne)) {
                $(null, null, ne),
                  this.logger.log(
                    3,
                    () => "Repeated command (" + v([q, ee]) + ") is dropped"
                  );
                continue;
              }
              $(q, ee, this.cmdHistory),
                (fe = this.parseCmd(q, ee)),
                fe || (fe = this.parseMidrow(q, ee)),
                fe || (fe = this.parsePAC(q, ee)),
                fe || (fe = this.parseBackgroundAttributes(q, ee));
            } else $(null, null, ne);
            if (!fe && ((ve = this.parseChars(q, ee)), ve.length)) {
              const Te = this.currentChannel;
              Te && Te > 0
                ? this.channels[Te].insertChars(ve)
                : this.logger.log(2, "No channel found yet. TEXT-MODE?");
            }
            fe ||
              ve ||
              this.logger.log(
                2,
                () =>
                  "Couldn't parse cleaned data " +
                  v([q, ee]) +
                  " orig: " +
                  v([K[Q], K[Q + 1]])
              );
          }
        }
        parseCmd(U, K) {
          if (
            !(
              ((U === 20 || U === 28 || U === 21 || U === 29) &&
                K >= 32 &&
                K <= 47) ||
              ((U === 23 || U === 31) && K >= 33 && K <= 35)
            )
          )
            return !1;
          const Q = U === 20 || U === 21 || U === 23 ? 1 : 2,
            q = this.channels[Q];
          return (
            U === 20 || U === 21 || U === 28 || U === 29
              ? K === 32
                ? q.ccRCL()
                : K === 33
                ? q.ccBS()
                : K === 34
                ? q.ccAOF()
                : K === 35
                ? q.ccAON()
                : K === 36
                ? q.ccDER()
                : K === 37
                ? q.ccRU(2)
                : K === 38
                ? q.ccRU(3)
                : K === 39
                ? q.ccRU(4)
                : K === 40
                ? q.ccFON()
                : K === 41
                ? q.ccRDC()
                : K === 42
                ? q.ccTR()
                : K === 43
                ? q.ccRTD()
                : K === 44
                ? q.ccEDM()
                : K === 45
                ? q.ccCR()
                : K === 46
                ? q.ccENM()
                : K === 47 && q.ccEOC()
              : q.ccTO(K - 32),
            (this.currentChannel = Q),
            !0
          );
        }
        parseMidrow(U, K) {
          let Q = 0;
          if ((U === 17 || U === 25) && K >= 32 && K <= 47) {
            if (((Q = U === 17 ? 1 : 2), Q !== this.currentChannel))
              return (
                this.logger.log(0, "Mismatch channel in midrow parsing"), !1
              );
            const q = this.channels[Q];
            return (
              !!q &&
              (q.ccMIDROW(K),
              this.logger.log(3, () => "MIDROW (" + v([U, K]) + ")"),
              !0)
            );
          }
          return !1;
        }
        parsePAC(U, K) {
          let Q;
          if (
            !(
              (((U >= 17 && U <= 23) || (U >= 25 && U <= 31)) &&
                K >= 64 &&
                K <= 127) ||
              ((U === 16 || U === 24) && K >= 64 && K <= 95)
            )
          )
            return !1;
          const q = U <= 23 ? 1 : 2;
          Q =
            K >= 64 && K <= 95
              ? q === 1
                ? k[U]
                : D[U]
              : q === 1
              ? b[U]
              : w[U];
          const ee = this.channels[q];
          return (
            !!ee &&
            (ee.setPAC(this.interpretPAC(Q, K)), (this.currentChannel = q), !0)
          );
        }
        interpretPAC(U, K) {
          let Q;
          const q = {
            color: null,
            italics: !1,
            indent: null,
            underline: !1,
            row: U,
          };
          return (
            (Q = K > 95 ? K - 96 : K - 64),
            (q.underline = !(1 & ~Q)),
            Q <= 13
              ? (q.color = [
                  "white",
                  "green",
                  "blue",
                  "cyan",
                  "red",
                  "yellow",
                  "magenta",
                  "white",
                ][Math.floor(Q / 2)])
              : Q <= 15
              ? ((q.italics = !0), (q.color = "white"))
              : (q.indent = 4 * Math.floor((Q - 16) / 2)),
            q
          );
        }
        parseChars(U, K) {
          let Q,
            q = [],
            ee = null;
          if (
            (U >= 25 ? ((Q = 2), (ee = U - 8)) : ((Q = 1), (ee = U)),
            ee >= 17 && ee <= 19)
          ) {
            let fe;
            (fe = ee === 17 ? K + 80 : ee === 18 ? K + 112 : K + 144),
              this.logger.log(
                2,
                () => "Special char '" + c(fe) + "' in channel " + Q
              ),
              (q = [fe]);
          } else U >= 32 && U <= 127 && (q = K === 0 ? [U] : [U, K]);
          return (
            q && this.logger.log(3, () => "Char codes =  " + v(q).join(",")), q
          );
        }
        parseBackgroundAttributes(U, K) {
          if (
            !(
              ((U === 16 || U === 24) && K >= 32 && K <= 47) ||
              ((U === 23 || U === 31) && K >= 45 && K <= 47)
            )
          )
            return !1;
          let Q;
          const q = {};
          U === 16 || U === 24
            ? ((Q = Math.floor((K - 32) / 2)),
              (q.background = g[Q]),
              K % 2 == 1 && (q.background = q.background + "_semi"))
            : K === 45
            ? (q.background = "transparent")
            : ((q.foreground = "black"), K === 47 && (q.underline = !0));
          const ee = U <= 23 ? 1 : 2;
          return this.channels[ee].setBkgData(q), !0;
        }
        reset() {
          for (let U = 0; U < Object.keys(this.channels).length; U++) {
            const K = this.channels[U];
            K && K.reset();
          }
          $(null, null, this.cmdHistory);
        }
        cueSplitAtTime(U) {
          for (let K = 0; K < this.channels.length; K++) {
            const Q = this.channels[K];
            Q && Q.cueSplitAtTime(U);
          }
        }
      }
      var P = n(5212),
        I = n(8854),
        O = {
          TCP_CONNECTION: "TcpList",
          HTTP_REQUEST: "HttpList",
          TRACK_SWITCH: "RepSwitchList",
          BUFFER_LEVEL: "BufferLevel",
          BUFFER_LOADED: "bufferLoaded",
          ABANDON_LOAD: "abandonload",
          ALLOW_LOAD: "allowload",
          BUFFER_EMPTY: "bufferStalled",
          BUFFER_STATE: "BufferState",
          DVR_INFO: "DVRInfo",
          DROPPED_FRAMES: "DroppedFrames",
          SCHEDULING_INFO: "SchedulingInfo",
          REQUESTS_QUEUE: "RequestsQueue",
          MANIFEST_UPDATE: "ManifestUpdate",
          MANIFEST_UPDATE_STREAM_INFO: "ManifestUpdatePeriodInfo",
          MANIFEST_UPDATE_TRACK_INFO: "ManifestUpdateRepresentationInfo",
          PLAY_LIST: "PlayList",
          DVB_ERRORS: "DVBErrors",
          HTTP_REQUEST_DVB_REPORTING_TYPE: "DVBReporting",
        },
        X = n(8850),
        G = n(3621),
        H = n(138),
        E = n(649),
        S = n(1191);
      function L() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K,
          Q,
          q,
          ee,
          fe,
          ve,
          ne,
          Te,
          _e,
          se,
          le,
          me,
          we,
          Me,
          Oe,
          Ge,
          $e,
          Fe,
          qe,
          Re,
          be,
          Se,
          ke,
          he,
          rt;
        function Ze() {
          Ve(),
            (Me = !1),
            (se = 0),
            (le = 0),
            ($e = 0),
            (ke = !1),
            (Fe = !0),
            (qe = !1),
            (he = !1),
            (Re = NaN),
            (Ge = NaN),
            ne &&
              (U.off(G.default.DATA_UPDATE_COMPLETED, nr, K),
              U.off(G.default.MANIFEST_UPDATED, rr, K),
              U.off(G.default.STREAMS_COMPOSED, Er, K),
              U.off(S.default.PLAYBACK_ENDED, Hn, K),
              U.off(S.default.STREAM_INITIALIZING, Jt, K),
              U.off(S.default.REPRESENTATION_SWITCH, Cn, K),
              U.off(S.default.BUFFER_LEVEL_STATE_CHANGED, hr, K),
              fn(),
              ne.removeEventListener("canplay", Bn),
              ne.removeEventListener("canplaythrough", wr),
              ne.removeEventListener("play", pi),
              ne.removeEventListener("waiting", Rn),
              ne.removeEventListener("playing", $r),
              ne.removeEventListener("pause", ni),
              ne.removeEventListener("error", Sr),
              ne.removeEventListener("seeking", Fi),
              ne.removeEventListener("seeked", Xi),
              ne.removeEventListener("timeupdate", Hi),
              ne.removeEventListener("progress", jt),
              ne.removeEventListener("ratechange", An),
              ne.removeEventListener("loadedmetadata", pn),
              ne.removeEventListener("loadeddata", Mn),
              ne.removeEventListener("stalled", Lr),
              ne.removeEventListener("ended", Zt),
              ne.removeEventListener("volumechange", Fn)),
            (_e = null),
            (ne = null),
            (me = null),
            (we = null);
        }
        function nt() {
          return parseFloat(
            (
              vt(
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : null
              ) - We()
            ).toFixed(5)
          );
        }
        function vt(gn) {
          const ct = gn || me;
          return ct.start + ct.duration;
        }
        function ce() {
          let gn =
            arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
          me && ne && ne.getElement()
            ? (gn && we && Qe(We()), ne.play())
            : (Me = !0);
        }
        function Ve() {
          me && ne && ne.pause();
        }
        function je(gn) {
          let ct =
              arguments.length > 1 && arguments[1] !== void 0 && arguments[1],
            Vt =
              arguments.length > 2 && arguments[2] !== void 0 && arguments[2],
            kn =
              arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
          me &&
            ne &&
            ne.getElement() &&
            gn !== (isNaN(Re) ? ne.getTime() : Re) &&
            ((be = Vt === !0),
            be || (Re = gn),
            Q.info(
              "Requesting seek to time: " + gn + (be ? " (internal)" : "")
            ),
            we && kn && Qe(gn),
            ne.setCurrentTime(gn, ct));
        }
        function it() {
          if (!me || !ne || !we) return;
          const gn = q && q.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO,
            ct = fe.getCurrentDVRInfo(gn);
          return ct && ct.range ? ct.range.end : 0;
        }
        function Qe(gn) {
          const ct = new Date(Te.getClientReferenceTime()),
            Vt = ve.getRegularPeriods()[0];
          se = Te.calcPresentationTimeFromWallTime(ct, Vt) - gn;
        }
        function We() {
          return me && ne ? ne.getTime() : null;
        }
        function Ke() {
          return me && ne ? ne.isPaused() : null;
        }
        function Ie() {
          return me && ne ? ne.isSeeking() : null;
        }
        function Ue() {
          return me && ne ? ne.isStalled() : null;
        }
        function at() {
          return me && ne ? ne.getPlaybackRate() : null;
        }
        function ft() {
          return me && ne ? ne.getEnded() : null;
        }
        function Rt() {
          return we;
        }
        function an() {
          let gn =
            arguments.length > 0 && arguments[0] !== void 0
              ? arguments[0]
              : null;
          if (Ke() || !we || ne.getReadyState() === 0 || Ie() || ke) return;
          gn || (gn = q.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO);
          const ct = We(),
            Vt = (function (kn, zt) {
              const zn = fe.getCurrentDVRInfo(zt),
                Rr = zn ? zn.range : null;
              let vi;
              return Rr
                ? ((vi =
                    kn > Rr.end
                      ? Math.max(Rr.end - se, Rr.start)
                      : kn > 0 &&
                        kn + 0.25 < Rr.start &&
                        Math.abs(kn - Rr.start) < 31536e4
                      ? qe
                        ? Math.max(Rr.end - se, Rr.start)
                        : Rr.start
                      : kn),
                  vi)
                : NaN;
            })(ct, gn);
          !isNaN(Vt) &&
            Vt !== ct &&
            !Ie() &&
            (Ue() || Se || ne.getReadyState() === 1) &&
            (Q.debug(
              `UpdateCurrentTime: Seek to actual time: ${Vt} from currentTime: ${ct}`
            ),
            je(Vt, !1, !1));
        }
        function tn() {
          _e === null &&
            (_e = setInterval(() => {
              (function () {
                if (
                  (U.trigger(G.default.WALLCLOCK_TIME_UPDATED, {
                    isDynamic: we,
                    time: new Date(),
                  }),
                  Rt())
                ) {
                  const gn = Date.now();
                  (isNaN(Ge) ||
                    gn >
                      Ge +
                        rt.get().streaming
                          .liveUpdateTimeThresholdInMilliseconds) &&
                    (q.addDVRMetric(),
                    Ke()
                      ? (function () {
                          const ct = Date.now();
                          (!Oe || ct > Oe + 500) && ((Oe = ct), Hi());
                        })()
                      : an(),
                    (Ge = gn));
                }
              })();
            }, rt.get().streaming.wallclockTimeUpdateInterval));
        }
        function fn() {
          clearInterval(_e), (_e = null);
        }
        function nr(gn) {
          const ct = gn.currentRepresentation,
            Vt = ct ? ct.mediaInfo.streamInfo : null;
          Vt !== null && me.id === Vt.id && (me = Vt);
        }
        function Bn() {
          U.trigger(G.default.CAN_PLAY);
        }
        function wr() {
          U.trigger(G.default.CAN_PLAY_THROUGH);
        }
        function hr(gn) {
          gn.streamId === q.getActiveStreamInfo().id &&
            ((Se = gn.state === O.BUFFER_EMPTY),
            rt.get().streaming.buffer.setStallState &&
              ne.setStallState(gn.mediaType, gn.state === O.BUFFER_EMPTY));
        }
        function pi() {
          Q.info("Native video element event: play"),
            an(),
            tn(),
            U.trigger(G.default.PLAYBACK_STARTED, { startTime: We() });
        }
        function Rn() {
          Q.info("Native video element event: waiting"),
            U.trigger(G.default.PLAYBACK_WAITING, { playingTime: We() });
        }
        function $r() {
          Q.info("Native video element event: playing"),
            (be = !1),
            U.trigger(G.default.PLAYBACK_PLAYING, { playingTime: We() });
        }
        function ni() {
          Q.info("Native video element event: pause"),
            U.trigger(G.default.PLAYBACK_PAUSED, { ended: ft() });
        }
        function Fi() {
          if (be) return;
          let gn = We();
          isNaN(Re) || Re === gn || (gn = Re),
            (Re = NaN),
            Q.info("Seeking to: " + gn),
            tn(),
            U.trigger(G.default.PLAYBACK_SEEKING, {
              seekTime: gn,
              streamId: me.id,
            });
        }
        function Xi() {
          Q.info("Native video element event: seeked"),
            (be = !1),
            U.trigger(G.default.PLAYBACK_SEEKED);
        }
        function Hi() {
          me &&
            U.trigger(G.default.PLAYBACK_TIME_UPDATED, {
              timeToEnd: nt(),
              time: We(),
              streamId: me.id,
            });
        }
        function jt() {
          U.trigger(G.default.PLAYBACK_PROGRESS, { streamId: me.id });
        }
        function An() {
          const gn = at();
          Q.info("Native video element event: ratechange: ", gn),
            U.trigger(G.default.PLAYBACK_RATE_CHANGED, { playbackRate: gn });
        }
        function pn() {
          Q.info("Native video element event: loadedmetadata"),
            U.trigger(G.default.PLAYBACK_METADATA_LOADED),
            tn();
        }
        function Mn() {
          Q.info("Native video element event: loadeddata"),
            U.trigger(G.default.PLAYBACK_LOADED_DATA);
        }
        function Zt() {
          Q.info("Native video element event: ended"), Ve(), fn();
          const gn = q ? q.getActiveStreamInfo() : null;
          gn && U.trigger(G.default.PLAYBACK_ENDED, { isLast: gn.isLast });
        }
        function Fn() {
          U.trigger(G.default.PLAYBACK_VOLUME_CHANGED);
        }
        function Hn(gn) {
          if (_e && gn.isLast) {
            Q.info(
              "onPlaybackEnded -- PLAYBACK_ENDED but native video element didn't fire ended"
            );
            const ct = gn.seekTime ? gn.seekTime : vt();
            ne.setCurrentTime(ct), Ve(), fn();
          }
        }
        function Sr(gn) {
          const ct = gn.target || gn.srcElement;
          U.trigger(G.default.PLAYBACK_ERROR, { error: ct.error });
        }
        function fr() {
          we = !1;
        }
        function Lr(gn) {
          U.trigger(G.default.PLAYBACK_STALLED, { e: gn });
        }
        function Jt(gn) {
          var ct;
          (ct = gn.mediaInfo) &&
            ct.supplementalProperties &&
            ct.supplementalProperties.find(
              (Vt) =>
                Vt.schemeIdUri === P.default.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME
            ) &&
            (Q.debug(
              "Low Latency critical SupplementalProperty set: Enabling low Latency"
            ),
            (qe = !0));
        }
        function Cn(gn) {
          const ct = q.getActiveStreamInfo();
          gn &&
            ct &&
            gn.currentRepresentation &&
            gn.streamId &&
            gn.streamId === ct.id &&
            gn.mediaType &&
            (gn.mediaType === P.default.VIDEO ||
              gn.mediaType === P.default.AUDIO) &&
            ((Fe = gn.currentRepresentation.availabilityTimeComplete),
            (qe = !Fe),
            qe && !he && (he = !0));
        }
        function rr() {
          ke = !0;
        }
        function Er() {
          ke = !1;
        }
        return (
          (K = {
            computeAndSetLiveDelay: function (gn, ct) {
              let Vt, kn, zt;
              const zn = !isNaN(gn) && isFinite(gn) ? gn : NaN;
              let Rr = ve.getSuggestedPresentationDelay();
              const vi = ee.getServiceDescriptionSettings();
              return (
                (Vt = isNaN(rt.get().streaming.delay.liveDelay)
                  ? rt.get().streaming.delay.liveDelayFragmentCount === null ||
                    isNaN(rt.get().streaming.delay.liveDelayFragmentCount) ||
                    isNaN(zn)
                    ? vi && !isNaN(vi.liveDelay) && vi.liveDelay > 0
                      ? vi.liveDelay
                      : rt.get().streaming.delay
                          .useSuggestedPresentationDelay === !0 &&
                        Rr !== null &&
                        !isNaN(Rr) &&
                        Rr > 0
                      ? Rr
                      : isNaN(zn)
                      ? ct && !isNaN(ct.minBufferTime)
                        ? 4 * ct.minBufferTime
                        : 4 * me.manifestInfo.minBufferTime
                      : 4 * zn
                    : zn * rt.get().streaming.delay.liveDelayFragmentCount
                  : rt.get().streaming.delay.liveDelay),
                (zt = ve.getAvailabilityStartTime()),
                zt !== null && ($e = zt),
                (kn =
                  ct && ct.dvrWindowSize > 0
                    ? Math.min(Vt, ct.dvrWindowSize)
                    : Vt),
                (se = kn),
                (le = kn),
                kn
              );
            },
            getAvailabilityStartTime: function () {
              return $e;
            },
            getBufferLevel: function () {
              let gn =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : null,
                ct = null;
              return (
                q.getActiveStreamProcessors().forEach((Vt) => {
                  if (
                    !gn ||
                    gn.length === 0 ||
                    gn.indexOf(Vt.getType()) === -1
                  ) {
                    const kn = Vt.getBufferLevel();
                    ct = ct === null ? kn : Math.min(ct, kn);
                  }
                }),
                ct
              );
            },
            getCurrentLiveLatency: function () {
              if (!we || isNaN($e)) return NaN;
              let gn = We();
              if (isNaN(gn) || gn === 0) return 0;
              const ct = new Date().getTime() + 1e3 * Te.getClientTimeOffset();
              return Math.max(((ct - $e - 1e3 * gn) / 1e3).toFixed(3), 0);
            },
            getEnded: ft,
            getInitialCatchupModeActivated: function () {
              return he;
            },
            getIsDynamic: Rt,
            getIsManifestUpdateInProgress: function () {
              return ke;
            },
            getLiveDelay: function () {
              return se;
            },
            getLowLatencyModeEnabled: function () {
              return qe;
            },
            getOriginalLiveDelay: function () {
              return le;
            },
            getPlaybackRate: at,
            getPlaybackStalled: function () {
              return Se;
            },
            getPlayedRanges: function () {
              return me && ne ? ne.getPlayedRanges() : null;
            },
            getStreamController: function () {
              return q;
            },
            getStreamEndTime: vt,
            getTime: We,
            getTimeToStreamEnd: nt,
            initialize: function (gn, ct) {
              (me = gn),
                ct !== !0 &&
                  (ne.addEventListener("canplay", Bn),
                  ne.addEventListener("canplaythrough", wr),
                  ne.addEventListener("play", pi),
                  ne.addEventListener("waiting", Rn),
                  ne.addEventListener("playing", $r),
                  ne.addEventListener("pause", ni),
                  ne.addEventListener("error", Sr),
                  ne.addEventListener("seeking", Fi),
                  ne.addEventListener("seeked", Xi),
                  ne.addEventListener("timeupdate", Hi),
                  ne.addEventListener("progress", jt),
                  ne.addEventListener("ratechange", An),
                  ne.addEventListener("loadedmetadata", pn),
                  ne.addEventListener("loadeddata", Mn),
                  ne.addEventListener("stalled", Lr),
                  ne.addEventListener("ended", Zt),
                  ne.addEventListener("volumechange", Fn),
                  (we = me.manifestInfo.isDynamic),
                  (Se = !1),
                  (be = !1),
                  U.on(G.default.DATA_UPDATE_COMPLETED, nr, K),
                  U.on(G.default.MANIFEST_UPDATED, rr, K),
                  U.on(G.default.STREAMS_COMPOSED, Er, K),
                  U.on(S.default.PLAYBACK_ENDED, Hn, K, {
                    priority: X.default.EVENT_PRIORITY_HIGH,
                  }),
                  U.on(S.default.STREAM_INITIALIZING, Jt, K),
                  U.on(S.default.REPRESENTATION_SWITCH, Cn, K),
                  U.on(S.default.BUFFER_LEVEL_STATE_CHANGED, hr, K),
                  U.on(S.default.DYNAMIC_TO_STATIC, fr, K),
                  Me && ((Me = !1), ce()));
            },
            isPaused: Ke,
            isProgressing: function () {
              let gn =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 500;
              return new Promise((ct) => {
                let Vt = -1,
                  kn = null;
                const zt = (Rr) => {
                    clearTimeout(kn),
                      (kn = null),
                      U.off(S.default.PLAYBACK_TIME_UPDATED, zn, K),
                      ct(Rr);
                  },
                  zn = (Rr) => {
                    Vt < 0 ? (Vt = Rr.time) : Rr.time > Vt + 0.1 && zt(!0);
                  };
                (kn = setTimeout(() => {
                  zt(!1);
                }, gn)),
                  U.on(S.default.PLAYBACK_TIME_UPDATED, zn, K);
              });
            },
            isSeeking: Ie,
            isStalled: Ue,
            pause: Ve,
            play: ce,
            reset: Ze,
            seek: je,
            seekToCurrentLive: function () {
              let gn =
                  arguments.length > 0 &&
                  arguments[0] !== void 0 &&
                  arguments[0],
                ct =
                  arguments.length > 1 &&
                  arguments[1] !== void 0 &&
                  arguments[1],
                Vt =
                  arguments.length > 2 &&
                  arguments[2] !== void 0 &&
                  arguments[2];
              const kn = it();
              kn !== 0 && je(kn - se, gn, ct, Vt);
            },
            seekToOriginalLive: function () {
              let gn =
                  arguments.length > 0 &&
                  arguments[0] !== void 0 &&
                  arguments[0],
                ct =
                  arguments.length > 1 &&
                  arguments[1] !== void 0 &&
                  arguments[1],
                Vt =
                  arguments.length > 2 &&
                  arguments[2] !== void 0 &&
                  arguments[2];
              const kn = it();
              kn !== 0 && ((se = le), je(kn - se, gn, ct, Vt));
            },
            setConfig: function (gn) {
              gn &&
                (gn.streamController && (q = gn.streamController),
                gn.serviceDescriptionController &&
                  (ee = gn.serviceDescriptionController),
                gn.dashMetrics && (fe = gn.dashMetrics),
                gn.adapter && (ve = gn.adapter),
                gn.videoModel && (ne = gn.videoModel),
                gn.timelineConverter && (Te = gn.timelineConverter),
                gn.settings && (rt = gn.settings));
            },
            updateCurrentTime: an,
          }),
          (Q = (0, E.default)(Y).getInstance().getLogger(K)),
          Ze(),
          K
        );
      }
      L.__dashjs_factory_name = "PlaybackController";
      var W = H.default.getSingletonFactory(L),
        F = n(7568);
      class oe {
        constructor(U) {
          (this.action = oe.ACTION_DOWNLOAD),
            (this.availabilityEndTime = null),
            (this.availabilityStartTime = null),
            (this.bandwidth = NaN),
            (this.bytesLoaded = NaN),
            (this.bytesTotal = NaN),
            (this.delayLoadingTime = NaN),
            (this.duration = NaN),
            (this.endDate = null),
            (this.firstByteDate = null),
            (this.index = NaN),
            (this.mediaStartTime = NaN),
            (this.mediaType = null),
            (this.quality = NaN),
            (this.range = null),
            (this.representation = null),
            (this.responseType = "arraybuffer"),
            (this.serviceLocation = null),
            (this.startDate = null),
            (this.startTime = NaN),
            (this.timescale = NaN),
            (this.type = null),
            (this.url = U || null),
            (this.wallStartTime = null);
        }
        isInitializationRequest() {
          return this.type && this.type === F.HTTPRequest.INIT_SEGMENT_TYPE;
        }
        setInfo(U) {
          (this.type =
            U && U.init
              ? F.HTTPRequest.INIT_SEGMENT_TYPE
              : F.HTTPRequest.MEDIA_SEGMENT_TYPE),
            (this.url = U && U.url ? U.url : null),
            (this.range =
              U && U.range ? U.range.start + "-" + U.range.end : null),
            (this.mediaType = U && U.mediaType ? U.mediaType : null),
            (this.representation =
              U && U.representation ? U.representation : null);
        }
      }
      (oe.ACTION_DOWNLOAD = "download"), (oe.ACTION_COMPLETE = "complete");
      var De = oe;
      const Xe = "loading",
        ze = "executed",
        ht = "failed";
      function gt(Y) {
        const U = (Y = Y || {}).eventBus,
          K = Y.events,
          Q = Y.dashMetrics,
          q = Y.fragmentLoader,
          ee = Y.debug,
          fe = Y.streamInfo,
          ve = Y.type;
        let ne, Te, _e, se;
        function le(be) {
          return (
            !!be &&
            (function (Se) {
              let ke = !1;
              return (
                Se.some((he) => {
                  if (
                    ((Ze = be),
                    (nt = he),
                    (!isNaN(Ze.index) &&
                      Ze.startTime === nt.startTime &&
                      Ze.adaptationIndex === nt.adaptationIndex &&
                      Ze.type === nt.type) ||
                      ((rt = he),
                      be.representation.id === rt.representation.id) ||
                      (function (vt, ce) {
                        return (
                          vt.action === De.ACTION_COMPLETE &&
                          vt.action === ce.action
                        );
                      })(be, he))
                  )
                    return (ke = !0), ke;
                  var rt, Ze, nt;
                }),
                ke
              );
            })(_e)
          );
        }
        function me(be) {
          return isNaN(be.duration) ? 0.25 : Math.min(be.duration / 8, 0.5);
        }
        function we(be) {
          _e = _e.filter((Se) => {
            const ke = me(Se);
            return (
              isNaN(Se.startTime) || (be !== void 0 && Se.startTime >= be - ke)
            );
          });
        }
        function Me(be, Se) {
          Se <= be + 0.5 ||
            (_e = _e.filter((ke) => {
              const he = me(ke);
              return (
                isNaN(ke.startTime) ||
                ke.startTime >= Se - he ||
                isNaN(ke.duration) ||
                ke.startTime + ke.duration <= be + he
              );
            }));
        }
        function Oe(be, Se, ke) {
          for (let he = be.length - 1; he >= 0; he--) {
            const rt = be[he],
              Ze = rt.startTime,
              nt = Ze + rt.duration;
            if (
              ((ke = isNaN(ke) ? me(rt) : ke),
              (!isNaN(Ze) && !isNaN(nt) && Se + ke >= Ze && Se - ke < nt) ||
                (isNaN(Ze) && isNaN(Se)))
            )
              return rt;
          }
          return null;
        }
        function Ge(be, Se) {
          Q.addSchedulingInfo(be, Se), Q.addRequestsQueue(be.mediaType, se, _e);
        }
        function $e(be) {
          be.sender === q &&
            (se.splice(se.indexOf(be.request), 1),
            be.response && !be.error && _e.push(be.request),
            Ge(be.request, be.error ? ht : ze),
            U.trigger(
              K.FRAGMENT_LOADING_COMPLETED,
              {
                request: be.request,
                response: be.response,
                error: be.error,
                sender: this,
              },
              { streamId: fe.id, mediaType: ve }
            ));
        }
        function Fe(be) {
          be.sender === q &&
            U.trigger(
              K.FRAGMENT_LOADING_PROGRESS,
              {
                request: be.request,
                response: be.response,
                error: be.error,
                sender: this,
              },
              { streamId: fe.id, mediaType: ve }
            );
        }
        function qe(be) {
          be.sender === q &&
            U.trigger(
              K.FRAGMENT_LOADING_ABANDONED,
              { request: be.request },
              { streamId: fe.id, mediaType: ve }
            );
        }
        function Re() {
          (_e = []), (se = []), q && q.resetInitialSettings();
        }
        return (
          (ne = {
            abortRequests: function () {
              Te.debug("abort requests"), q.abort(), (se = []);
            },
            executeRequest: function (be) {
              var Se;
              be.action === De.ACTION_DOWNLOAD
                ? (Ge(be, Xe),
                  se.push(be),
                  (Se = be),
                  U.trigger(
                    K.FRAGMENT_LOADING_STARTED,
                    { request: Se },
                    { streamId: fe.id, mediaType: ve }
                  ),
                  q.load(Se))
                : Te.warn("Unknown request action.");
            },
            getRequests: function (be) {
              const Se = be
                ? be.state instanceof Array
                  ? be.state
                  : [be.state]
                : [];
              let ke = [];
              return (
                Se.forEach((he) => {
                  const rt = (function (vt) {
                    let ce;
                    switch (vt) {
                      case Xe:
                        ce = se;
                        break;
                      case ze:
                        ce = _e;
                        break;
                      default:
                        ce = [];
                    }
                    return ce;
                  })(he);
                  var Ze, nt;
                  ke = ke.concat(
                    ((Ze = rt),
                    (nt = be).hasOwnProperty("time")
                      ? [Oe(Ze, nt.time, nt.threshold)]
                      : Ze.filter((vt) => {
                          for (const ce in nt)
                            if (
                              ce !== "state" &&
                              nt.hasOwnProperty(ce) &&
                              vt[ce] != nt[ce]
                            )
                              return !1;
                          return !0;
                        }))
                  );
                }),
                ke
              );
            },
            getStreamId: function () {
              return fe.id;
            },
            getType: function () {
              return ve;
            },
            isFragmentLoaded: le,
            isFragmentLoadedOrPending: function (be) {
              let Se,
                ke = !1,
                he = 0;
              if (((ke = le(be)), !ke))
                for (he = 0; he < se.length; he++)
                  (Se = se[he]),
                    be.url === Se.url &&
                      be.startTime === Se.startTime &&
                      (ke = !0);
              return ke;
            },
            removeExecutedRequestsAfterTime: function (be) {
              _e = _e.filter(
                (Se) =>
                  isNaN(Se.startTime) || (be !== void 0 && Se.startTime < be)
              );
            },
            removeExecutedRequestsBeforeTime: we,
            reset: function () {
              U.off(K.LOADING_COMPLETED, $e, this),
                U.off(K.LOADING_DATA_PROGRESS, Fe, this),
                U.off(K.LOADING_ABANDONED, qe, this),
                q && q.reset(),
                Re();
            },
            resetInitialSettings: Re,
            syncExecutedRequestsWithBufferedRange: function (be, Se) {
              if (!be || be.length === 0) return void we();
              let ke = 0;
              for (let he = 0, rt = be.length; he < rt; he++)
                Me(ke, be.start(he)), (ke = be.end(he));
              Se > 0 && Me(ke, Se);
            },
          }),
          (Te = ee.getLogger(ne)),
          Re(),
          U.on(K.LOADING_COMPLETED, $e, ne),
          U.on(K.LOADING_DATA_PROGRESS, Fe, ne),
          U.on(K.LOADING_ABANDONED, qe, ne),
          ne
        );
      }
      gt.__dashjs_factory_name = "FragmentModel";
      const pt = H.default.getClassFactory(gt);
      (pt.FRAGMENT_MODEL_LOADING = Xe),
        (pt.FRAGMENT_MODEL_EXECUTED = ze),
        (pt.FRAGMENT_MODEL_CANCELED = "canceled"),
        (pt.FRAGMENT_MODEL_FAILED = ht),
        H.default.updateClassFactory(gt.__dashjs_factory_name, pt);
      var $t = pt,
        ot = n(1944),
        tt = n(8748);
      class He extends tt.default {
        constructor() {
          super(),
            (this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE = 10),
            (this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE = 11),
            (this.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE = 12),
            (this.SEGMENT_BASE_LOADER_ERROR_CODE = 15),
            (this.TIME_SYNC_FAILED_ERROR_CODE = 16),
            (this.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE = 17),
            (this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE = 18),
            (this.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE = 19),
            (this.APPEND_ERROR_CODE = 20),
            (this.REMOVE_ERROR_CODE = 21),
            (this.DATA_UPDATE_FAILED_ERROR_CODE = 22),
            (this.CAPABILITY_MEDIASOURCE_ERROR_CODE = 23),
            (this.CAPABILITY_MEDIAKEYS_ERROR_CODE = 24),
            (this.DOWNLOAD_ERROR_ID_MANIFEST_CODE = 25),
            (this.DOWNLOAD_ERROR_ID_SIDX_CODE = 26),
            (this.DOWNLOAD_ERROR_ID_CONTENT_CODE = 27),
            (this.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE = 28),
            (this.DOWNLOAD_ERROR_ID_XLINK_CODE = 29),
            (this.MANIFEST_ERROR_ID_PARSE_CODE = 31),
            (this.MANIFEST_ERROR_ID_NOSTREAMS_CODE = 32),
            (this.TIMED_TEXT_ERROR_ID_PARSE_CODE = 33),
            (this.MANIFEST_ERROR_ID_MULTIPLEXED_CODE = 34),
            (this.MEDIASOURCE_TYPE_UNSUPPORTED_CODE = 35),
            (this.NO_SUPPORTED_KEY_IDS = 36),
            (this.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE =
              "parsing failed for "),
            (this.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE =
              "Failed loading manifest: "),
            (this.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE =
              "Failed loading Xlink element: "),
            (this.SEGMENTS_UPDATE_FAILED_ERROR_MESSAGE =
              "Segments update failed"),
            (this.SEGMENTS_UNAVAILABLE_ERROR_MESSAGE =
              "no segments are available yet"),
            (this.SEGMENT_BASE_LOADER_ERROR_MESSAGE =
              "error loading segment ranges from sidx"),
            (this.TIME_SYNC_FAILED_ERROR_MESSAGE =
              "Failed to synchronize client and server time"),
            (this.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE =
              "request is null"),
            (this.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE =
              "Failed to resolve a valid URL"),
            (this.APPEND_ERROR_MESSAGE = "chunk is not defined"),
            (this.REMOVE_ERROR_MESSAGE = "Removing data from the SourceBuffer"),
            (this.DATA_UPDATE_FAILED_ERROR_MESSAGE = "Data update failed"),
            (this.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE =
              "mediasource is not supported"),
            (this.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE =
              "mediakeys is not supported"),
            (this.TIMED_TEXT_ERROR_MESSAGE_PARSE = "parsing error :"),
            (this.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE =
              "Error creating source buffer of type : "),
            (this.NO_SUPPORTED_KEY_IDS_MESSAGE =
              "All possible Adaptation Sets have an invalid key status");
        }
      }
      var de = new He(),
        ue = n(8261);
      function Z(Y) {
        const U = this.context,
          K = (0, ue.default)(U).getInstance(),
          Q = Y.textController,
          q = Y.eventBus;
        let ee,
          fe,
          ve,
          ne,
          Te,
          _e,
          se = [],
          le = [],
          me = !1,
          we = Y.mediaSource,
          Me = null;
        function Oe(Ze) {
          return Ze.mimeType + ';codecs="' + Ze.codecs + '"';
        }
        function Ge(Ze) {
          return (ne = Q.getTextSourceBuffer(Ze)), Promise.resolve();
        }
        function $e() {
          if (typeof ne.addEventListener == "function")
            try {
              ne.addEventListener("updateend", ke, !1),
                ne.addEventListener("error", he, !1),
                ne.addEventListener("abort", he, !1);
            } catch {
              _e = setInterval(ke, 50);
            }
          else _e = setInterval(ke, 50);
        }
        function Fe() {
          try {
            typeof ne.removeEventListener == "function" &&
              (ne.removeEventListener("updateend", ke, !1),
              ne.removeEventListener("error", he, !1),
              ne.removeEventListener("abort", he, !1)),
              clearInterval(_e);
          } catch (Ze) {
            ve.error(Ze);
          }
        }
        function qe(Ze) {
          return new Promise((nt) => {
            ne && K.get().streaming.buffer.useAppendWindow
              ? rt(() => {
                  try {
                    if (!ne) return void nt();
                    let vt = we.duration,
                      ce = 0;
                    Ze &&
                      !isNaN(Ze.start) &&
                      !isNaN(Ze.duration) &&
                      isFinite(Ze.duration) &&
                      (vt = Ze.start + Ze.duration),
                      Ze && !isNaN(Ze.start) && (ce = Ze.start),
                      (ne.appendWindowEnd === vt &&
                        ne.appendWindowStart === ce) ||
                        ((ne.appendWindowStart = 0),
                        (ne.appendWindowEnd = vt + 0.01),
                        (ne.appendWindowStart = Math.max(ce - 0.1, 0)),
                        ve.debug(
                          `Updated append window for ${Te.type}. Set start to ${ne.appendWindowStart} and end to ${ne.appendWindowEnd}`
                        )),
                      nt();
                  } catch {
                    ve.warn("Failed to set append window"), nt();
                  }
                })
              : nt();
          });
        }
        function Re(Ze) {
          return new Promise((nt) => {
            ne
              ? rt(() => {
                  try {
                    ne.timestampOffset === Ze ||
                      isNaN(Ze) ||
                      ((ne.timestampOffset = Ze),
                      ve.debug(`Set MSE timestamp offset to ${Ze}`)),
                      nt();
                  } catch {
                    nt();
                  }
                })
              : nt();
          });
        }
        function be() {
          if (!me && le.length > 0) {
            me = !0;
            const Ze = le[0];
            le.splice(0, 1);
            const nt = function () {
              (me = !1),
                le.length > 0 && be.call(this),
                Ze &&
                  Ze.data &&
                  Ze.data.segmentType &&
                  Ze.data.segmentType !== F.HTTPRequest.INIT_SEGMENT_TYPE &&
                  delete Ze.data.bytes,
                Ze.promise.resolve({ chunk: Ze.data });
            };
            try {
              if (((Me = Ze.request), Ze.data.bytes.byteLength === 0))
                nt.call(this);
              else {
                try {
                  ve.debug(
                    `Appending ${Ze.data.segmentType} from period ${Ze.data.streamId} to buffer. Request URL: ${Ze.request.url}, Representation: ID: ${Ze.data.representation.id}, bitrate: ${Ze.data.representation.bitrateInKbit}`
                  );
                } catch {}
                ne.appendBuffer
                  ? ne.appendBuffer(Ze.data.bytes)
                  : ne.append(Ze.data.bytes, Ze.data),
                  rt(nt.bind(this));
              }
            } catch (vt) {
              ve.fatal('SourceBuffer append failed "' + vt + '"'),
                le.length > 0 ? be() : (me = !1),
                delete Ze.data.bytes,
                Ze.promise.reject({
                  chunk: Ze.data,
                  error: new ot.default(vt.code, vt.message),
                });
            }
          }
        }
        function Se() {
          se.length > 0 && !ne.updating && (se.shift()(), Se());
        }
        function ke() {
          ne.updating || Se();
        }
        function he(Ze) {
          const nt = Ze.target || {};
          (function (vt, ce) {
            let Ve = ce || {};
            q.trigger(vt, Ve, { streamId: Te.streamInfo.id, mediaType: fe });
          })(G.default.SOURCE_BUFFER_ERROR, {
            error: nt,
            lastRequestAppended: Me,
          });
        }
        function rt(Ze) {
          try {
            se.push(Ze), ne.updating || Se();
          } catch (nt) {
            ve.error(nt);
          }
        }
        return (
          (ee = {
            abort: function () {
              return new Promise((Ze) => {
                try {
                  (le = []),
                    we.readyState === "open"
                      ? rt(() => {
                          try {
                            ne && ne.abort(), Ze();
                          } catch {
                            Ze();
                          }
                        })
                      : (ne &&
                          ne.setTextTrack &&
                          we.readyState === "ended" &&
                          ne.abort(),
                        Ze());
                } catch {
                  Ze();
                }
              });
            },
            abortBeforeAppend: function () {
              return new Promise((Ze) => {
                rt(() => {
                  const nt = ne.appendWindowStart,
                    vt = ne.appendWindowEnd;
                  ne &&
                    (ne.abort(),
                    (ne.appendWindowStart = nt),
                    (ne.appendWindowEnd = vt)),
                    Ze();
                });
              });
            },
            append: function (Ze) {
              let nt =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : null;
              return new Promise((vt, ce) => {
                Ze
                  ? (le.push({
                      data: Ze,
                      promise: { resolve: vt, reject: ce },
                      request: nt,
                    }),
                    rt(be.bind(this)))
                  : ce({
                      chunk: Ze,
                      error: new ot.default(
                        de.APPEND_ERROR_CODE,
                        de.APPEND_ERROR_MESSAGE
                      ),
                    });
              });
            },
            changeType: function (Ze) {
              const nt = Oe(Ze);
              return new Promise((vt) => {
                rt(() => {
                  ne.changeType &&
                    (ve.debug(`Changing SourceBuffer codec to ${nt}`),
                    ne.changeType(nt)),
                    vt();
                });
              });
            },
            getAllBufferRanges: function () {
              try {
                return ne.buffered;
              } catch (Ze) {
                return (
                  ve.error("getAllBufferRanges exception: " + Ze.message), null
                );
              }
            },
            getBuffer: function () {
              return ne;
            },
            getType: function () {
              return fe;
            },
            initializeForFirstUse: function (Ze, nt) {
              Te = Ze;
              const vt = Ze.streamInfo;
              fe = Te.type;
              const ce = nt ? Oe(nt) : Ze.codec;
              try {
                if (ce.match(/application\/mp4;\s*codecs="(stpp|wvtt).*"/i))
                  return Ge(vt);
                (ne = we.addSourceBuffer(ce)), $e();
                const Ve = [];
                return (
                  Ve.push(qe(Te.streamInfo)),
                  nt &&
                    nt.mseTimeOffset !== void 0 &&
                    Ve.push(Re(nt.mseTimeOffset)),
                  Promise.all(Ve)
                );
              } catch (Ve) {
                return (Te.type == P.default.TEXT && !Te.isFragmented) ||
                  ce.indexOf('codecs="stpp') !== -1 ||
                  ce.indexOf('codecs="vtt') !== -1 ||
                  ce.indexOf("text/vtt") !== -1
                  ? Ge(vt)
                  : Promise.reject(Ve);
              }
            },
            initializeForStreamSwitch: function (Ze, nt, vt) {
              (Te = Ze), (fe = Te.type), (ne = vt.getBuffer()), $e();
            },
            remove: function (Ze) {
              return new Promise((nt, vt) => {
                const ce = Ze.start,
                  Ve = Ze.end;
                ce >= 0 && Ve > ce
                  ? rt(function () {
                      try {
                        ne.remove(ce, Ve),
                          rt(function () {
                            nt({ from: ce, to: Ve, unintended: !1 }),
                              Ze.resolve && Ze.resolve();
                          });
                      } catch (je) {
                        vt({
                          from: ce,
                          to: Ve,
                          unintended: !1,
                          error: new ot.default(
                            de.REMOVE_ERROR_CODE,
                            de.REMOVE_ERROR_MESSAGE
                          ),
                        }),
                          Ze.reject && Ze.reject(je);
                      }
                    })
                  : nt();
              });
            },
            removeEventListeners: Fe,
            reset: function () {
              if (ne) {
                try {
                  (se = []),
                    Fe(),
                    (me = !1),
                    (le = []),
                    (ne.getClassName &&
                      ne.getClassName() === "TextSourceBuffer") ||
                      (ve.debug("Removing sourcebuffer from media source"),
                      we.removeSourceBuffer(ne));
                } catch {}
                ne = null;
              }
              Me = null;
            },
            updateAppendWindow: qe,
            updateTimestampOffset: Re,
          }),
          (ve = (0, E.default)(U).getInstance().getLogger(ee)),
          ee
        );
      }
      Z.__dashjs_factory_name = "SourceBufferSink";
      var ie = H.default.getClassFactory(Z);
      function Ne(Y) {
        const U = this.context;
        let K,
          Q,
          q,
          ee = [],
          fe = Y;
        function ve(ne, Te) {
          return (
            (ee = ee.filter(
              (_e) =>
                !((isNaN(Te) || _e.start < Te) && (isNaN(ne) || _e.end > ne))
            )),
            Promise.resolve()
          );
        }
        return (
          (K = {
            getAllBufferRanges: function () {
              let ne = [];
              for (let _e = 0; _e < ee.length; _e++) {
                let se = ee[_e];
                ne.length === 0 || se.start > ne[ne.length - 1].end
                  ? ne.push({ start: se.start, end: se.end })
                  : (ne[ne.length - 1].end = se.end);
              }
              const Te = {
                start: function (_e) {
                  return ne[_e].start;
                },
                end: function (_e) {
                  return ne[_e].end;
                },
              };
              return (
                Object.defineProperty(Te, "length", {
                  get: function () {
                    return ne.length;
                  },
                }),
                Te
              );
            },
            append: function (ne) {
              return (
                ne.segmentType !== "InitializationSegment"
                  ? (ee.push(ne),
                    ee.sort(function (Te, _e) {
                      return Te.start - _e.start;
                    }),
                    (q = null))
                  : (q = ne),
                Q.debug(
                  "PreBufferSink appended chunk s: " +
                    ne.start +
                    "; e: " +
                    ne.end
                ),
                fe && fe({ chunk: ne }),
                Promise.resolve()
              );
            },
            remove: ve,
            abort: function () {
              return Promise.resolve();
            },
            discharge: function (ne, Te) {
              const _e =
                ((se = ne),
                (le = Te),
                ee.filter(
                  (me) =>
                    (isNaN(le) || me.start < le) && (isNaN(se) || me.end > se)
                ));
              var se, le;
              return q && (_e.push(q), (q = null)), ve(ne, Te), _e;
            },
            reset: function () {
              (ee = []), (q = null), (fe = null);
            },
            updateTimestampOffset: function () {
              return Promise.resolve();
            },
            waitForUpdateEnd: function (ne) {
              ne();
            },
            getBuffer: function () {
              return this;
            },
          }),
          (Q = (0, E.default)(U).getInstance().getLogger(K)),
          K
        );
      }
      Ne.__dashjs_factory_name = "PreBufferSink";
      var Pe = H.default.getClassFactory(Ne);
      function kt() {
        let Y = {};
        return {
          save: function (U) {
            const K = U.streamId,
              Q = U.representation.id;
            (Y[K] = Y[K] || {}), (Y[K][Q] = U);
          },
          extract: function (U, K) {
            return Y && Y[U] && Y[U][K] ? Y[U][K] : null;
          },
          reset: function () {
            Y = {};
          },
        };
      }
      kt.__dashjs_factory_name = "InitCache";
      var Gt = H.default.getSingletonFactory(kt);
      const B = 0.01,
        re = "BufferController";
      function Ae(Y) {
        const U = (Y = Y || {}).capabilities,
          K = this.context,
          Q = (0, X.default)(K).getInstance(),
          q = Y.fragmentModel,
          ee = Y.playbackController,
          fe = Y.representationController,
          ve = Y.settings,
          ne = Y.streamInfo,
          Te = Y.textController,
          _e = Y.type;
        let se,
          le,
          me,
          we,
          Me,
          Oe,
          Ge,
          $e,
          Fe,
          qe,
          Re,
          be,
          Se,
          ke,
          he,
          rt,
          Ze,
          nt,
          vt,
          ce,
          Ve;
        function je(Jt) {
          let Cn =
            arguments.length > 1 && arguments[1] !== void 0
              ? arguments[1]
              : null;
          return new Promise((rr, Er) => {
            (Oe = Jt),
              Fe && Cn && typeof Fe.discharge == "function"
                ? ((qe = Fe),
                  it(Cn)
                    .then(() => {
                      rr();
                    })
                    .catch((gn) => {
                      Er(gn);
                    }))
                : rr();
          });
        }
        function it(Jt) {
          let Cn =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : [],
            rr = arguments.length > 2 ? arguments[2] : void 0;
          return new Promise((Er, gn) => {
            var ct, Vt, kn;
            nt && Jt
              ? Oe
                ? ((Re = !1),
                  ((ct = Jt),
                  (Vt = Cn),
                  (kn = rr),
                  new Promise((zt) => {
                    (Fe = ie(K).create({
                      mediaSource: Oe,
                      textController: Te,
                      eventBus: Q,
                    })),
                      (function (zn, Rr, vi) {
                        const na = fe.getCurrentRepresentation();
                        return Rr &&
                          Rr[_e] &&
                          (_e === P.default.VIDEO || _e === P.default.AUDIO)
                          ? (function (Fs, ya, Hc, fd) {
                              Fe.initializeForStreamSwitch(Fs, ya, Hc[_e]);
                              const pd = [];
                              return (
                                pd.push(Fe.abortBeforeAppend()),
                                pd.push(An()),
                                pd.push(ft(ya, fd)),
                                ya &&
                                  ya.mseTimeOffset !== void 0 &&
                                  pd.push(jt(ya)),
                                Promise.allSettled(pd)
                              );
                            })(zn, na, Rr, vi)
                          : ((Ri = zn),
                            (Da = na),
                            Fe.initializeForFirstUse(Ri, Da));
                        var Ri, Da;
                      })(ct, Vt, kn)
                        .then(() => jt(fe.getCurrentRepresentation()))
                        .then(() => {
                          zt(Fe);
                        })
                        .catch((zn) => {
                          le.warn("Caught error on create SourceBuffer: " + zn),
                            zt(Fe);
                        });
                  }))
                    .then((zt) => {
                      Er(zt);
                    })
                    .catch((zt) => {
                      gn(zt);
                    }))
                : ((Re = !0),
                  (function () {
                    return new Promise((zt, zn) => {
                      (Fe = Pe(K).create(Ue.bind(this))),
                        jt(fe.getCurrentRepresentation())
                          .then(() => {
                            zt(Fe);
                          })
                          .catch(() => {
                            zn();
                          });
                    });
                  })()
                    .then((zt) => {
                      Er(zt);
                    })
                    .catch((zt) => {
                      gn(zt);
                    }))
              : Er(null);
          });
        }
        function Qe(Jt) {
          ve.get().streaming.cacheInitSegments &&
            (le.info(
              "Init fragment finished loading saving to",
              _e + "'s init cache"
            ),
            nt.save(Jt.chunk)),
            le.debug(
              "Append Init fragment",
              _e,
              " with representationId:",
              Jt.chunk.representation.id,
              " and quality:",
              Jt.chunk.quality,
              ", data size:",
              Jt.chunk.bytes.byteLength
            ),
            Ke(Jt.chunk);
        }
        function We(Jt) {
          Ke(Jt.chunk, Jt.request);
        }
        function Ke(Jt) {
          let Cn =
            arguments.length > 1 && arguments[1] !== void 0
              ? arguments[1]
              : null;
          Fe &&
            (Fe.append(Jt, Cn)
              .then((rr) => {
                Ue(rr);
              })
              .catch((rr) => {
                Ue(rr);
              }),
            Jt.representation.mediaInfo.type === P.default.VIDEO &&
              fr(G.default.VIDEO_CHUNK_RECEIVED, { chunk: Jt }));
        }
        function Ie(Jt) {
          if (Jt && Jt.length > 0)
            for (let Cn = 0, rr = Jt.length; Cn < rr; Cn++)
              le.debug(
                "Buffered range: " +
                  Jt.start(Cn) +
                  " - " +
                  Jt.end(Cn) +
                  ", currentTime = ",
                ee.getTime()
              );
        }
        function Ue(Jt) {
          if (Jt.error)
            return (
              Jt.error.code === 22 &&
                (function () {
                  if (
                    ((Ze = !0),
                    (Me = 0.8 * Fn()),
                    le.warn("Quota exceeded, Critical Buffer: " + Me),
                    Me > 0)
                  ) {
                    const Er = Math.max(0.2 * Me, 1),
                      gn = Me - Er,
                      ct = Math.min(
                        ve.get().streaming.buffer.bufferTimeAtTopQuality,
                        0.9 * gn
                      ),
                      Vt = Math.min(
                        ve.get().streaming.buffer
                          .bufferTimeAtTopQualityLongForm,
                        0.9 * gn
                      ),
                      kn = {
                        streaming: {
                          buffer: {
                            bufferToKeep: parseFloat(Er.toFixed(5)),
                            bufferTimeAtTopQuality: parseFloat(ct.toFixed(5)),
                            bufferTimeAtTopQualityLongForm: parseFloat(
                              Vt.toFixed(5)
                            ),
                          },
                        },
                      };
                    ve.update(kn);
                  }
                })(),
              void (
                (Jt.error.code !== 22 && Sr()) ||
                (le.warn(
                  "Clearing playback buffer to overcome quota exceed situation"
                ),
                fr(G.default.QUOTA_EXCEEDED, {
                  criticalBufferLevel: Me,
                  quotaExceededTime: Jt.chunk.start,
                }),
                Fi(ni()))
              )
            );
          if (!Fe || (wr(), (Ze = !1), (ke = Jt.chunk), !ke || !ke.endFragment))
            return;
          ke && !isNaN(ke.index) && ((Ge = Math.max(ke.index, Ge)), hr());
          const Cn = Fe.getAllBufferRanges();
          ke.segmentType === F.HTTPRequest.MEDIA_SEGMENT_TYPE &&
            (Ie(Cn),
            tn(),
            (function () {
              if (isNaN(Ve) || Re) return;
              if (_e !== P.default.AUDIO && _e !== P.default.VIDEO)
                return void (Ve = NaN);
              const Er = ee.getTime(),
                gn = Bn(Er, 0),
                ct = Bn(Ve, 0);
              if (gn && ct && gn.start === ct.start) return void (Ve = NaN);
              const Vt = fe.getCurrentRepresentation().segmentDuration,
                kn = Bn(Ve, Vt);
              kn &&
                (ve.get().streaming.buffer.enableSeekDecorrelationFix &&
                Math.abs(Er - Ve) > Vt
                  ? Ve <= kn.end && ee.seek(Math.max(Ve, kn.start), !1, !0)
                  : Er < kn.start && ee.seek(kn.start, !1, !0));
            })());
          let rr = !1;
          be && (be.indexOf(ke) > 0 && (rr = !0), (be = null)),
            ke &&
              !rr &&
              fr(G.default.BYTES_APPENDED_END_FRAGMENT, {
                startTime: ke.start,
                index: ke.index,
                bufferedRanges: Cn,
                segmentType: ke.segmentType,
                mediaType: _e,
                representationId: ke.representation.id,
              });
        }
        function at(Jt, Cn) {
          const rr = [];
          return (
            rr.push(jt(Jt)),
            rr.push(Fe ? Fe.abort() : Promise.resolve()),
            rr.push(ft(Jt, Cn)),
            Promise.allSettled(rr)
          );
        }
        function ft(Jt, Cn) {
          return Jt && Cn
            ? Jt &&
              Cn &&
              Jt.mimeType === Cn.mimeType &&
              Jt.codecFamily === Cn.codecFamily
              ? (le.debug(
                  `Switching to new codec ${Jt.codecs} without changeType as previous codec ${Cn.codecs} is compatible.`
                ),
                Promise.resolve())
              : ve.get().streaming.buffer.useChangeType &&
                U.supportsChangeType()
              ? (le.debug(
                  `Using changeType() to switch from codec ${Cn.codecs} to ${Jt.codecs}`
                ),
                Fe.changeType(Jt))
              : (le.debug("changeType() not available"), Promise.resolve())
            : (le.warn(
                "BufferController._changeCodec() is missing the information about the Representations. Doing nothing"
              ),
              Promise.resolve());
        }
        function Rt() {
          return new Promise((Jt, Cn) => {
            let rr = an();
            if (!rr || rr.length === 0) return tn(), void Jt();
            Fi(rr)
              .then(() => {
                Jt();
              })
              .catch((Er) => {
                Cn(Er);
              });
          });
        }
        function an(Jt) {
          const Cn = [],
            rr = Fe.getAllBufferRanges();
          if (!rr || rr.length === 0) return Cn;
          if ((!Jt && Jt !== 0) || isNaN(Jt))
            Cn.push({ start: rr.start(0), end: rr.end(rr.length - 1) + 0.5 });
          else {
            const Er = (function (ct, Vt) {
                const kn = ve.get().streaming.buffer.bufferToKeep,
                  zt = Vt.start(0);
                if (ct - zt > kn) {
                  let zn = Math.max(0, ct - kn);
                  const Rr = q.getRequests({
                    state: $t.FRAGMENT_MODEL_EXECUTED,
                    time: ct,
                    threshold: B,
                  })[0];
                  if ((Rr && (zn = Math.min(Rr.startTime, zn)), zn > 0))
                    return { start: zt, end: zn };
                }
                return null;
              })(Jt, rr),
              gn = (function (ct, Vt) {
                const kn = Vt.end(Vt.length - 1) + 0.5,
                  zt = Hn(ct),
                  zn =
                    ne.manifestInfo.duration >=
                    ve.get().streaming.buffer.longFormContentDurationThreshold
                      ? ve.get().streaming.buffer.bufferTimeAtTopQualityLongForm
                      : ve.get().streaming.buffer.bufferTimeAtTopQuality;
                let Rr = isNaN(zt) ? ct : Math.min(zt, ct + zn);
                if (Rr >= Vt.end(Vt.length - 1)) return null;
                const vi = q.getRequests({
                  state: $t.FRAGMENT_MODEL_EXECUTED,
                  time: ct,
                  threshold: B,
                })[0];
                if (
                  (vi && (Rr = Math.max(vi.startTime + vi.duration, Rr)),
                  ve.get().streaming.buffer.avoidCurrentTimeRangePruning)
                ) {
                  for (let na = 0; na < Vt.length; na++)
                    if (
                      Vt.start(na) <= ct &&
                      ct <= Vt.end(na) &&
                      Vt.start(na) <= Rr &&
                      Rr <= Vt.end(na)
                    ) {
                      let Ri = Rr;
                      (Rr =
                        na + 1 < Vt.length ? Vt.start(na + 1) : Vt.end(na) + 1),
                        le.debug(
                          "Buffered range [" +
                            Vt.start(na) +
                            ", " +
                            Vt.end(na) +
                            "] overlaps with targetTime " +
                            ct +
                            " and range to be pruned [" +
                            Ri +
                            ", " +
                            kn +
                            "], using [" +
                            Rr +
                            ", " +
                            kn +
                            "] instead" +
                            (Rr < kn ? "" : " (no actual pruning)")
                        );
                      break;
                    }
                }
                return Rr < Vt.end(Vt.length - 1)
                  ? { start: Rr, end: kn }
                  : null;
              })(Jt, rr);
            Er && Cn.push(Er), gn && Cn.push(gn);
          }
          return Cn;
        }
        function tn() {
          (!ce || (_e === P.default.TEXT && Te.isTextEnabled())) && wr();
        }
        function fn() {
          pi();
        }
        function nr() {
          pi(), (Ve = NaN);
        }
        function Bn(Jt, Cn) {
          if (!Fe) return null;
          const rr = Fe.getAllBufferRanges();
          let Er,
            gn,
            ct = 0,
            Vt = 0,
            kn = null,
            zt = null,
            zn = 0;
          const Rr = isNaN(Cn) ? 0.15 : Cn;
          if (rr != null) {
            for (gn = 0, Er = rr.length; gn < Er; gn++)
              if (((ct = rr.start(gn)), (Vt = rr.end(gn)), kn === null))
                (zn = Math.abs(ct - Jt)),
                  ((Jt >= ct && Jt < Vt) || zn <= Rr) && ((kn = ct), (zt = Vt));
              else {
                if (((zn = ct - zt), !(zn <= Rr))) break;
                zt = Vt;
              }
            if (kn !== null) return { start: kn, end: zt };
          }
          return null;
        }
        function wr() {
          if (ee) {
            let Jt = ee.getTime() || 0;
            Re && (Jt = isNaN(Ve) ? 0 : Ve);
            const Cn =
              ve.get().streaming.gaps.jumpGaps &&
              !isNaN(ve.get().streaming.gaps.smallGapLimit)
                ? ve.get().streaming.gaps.smallGapLimit
                : NaN;
            (we = Math.max(
              (function (rr, Er) {
                let gn, ct;
                return (
                  ve.get().streaming.gaps.jumpGaps &&
                    (Er = ve.get().streaming.gaps.smallGapLimit),
                  (gn = Bn(rr, Er)),
                  (ct = gn === null ? 0 : gn.end - rr),
                  ct
                );
              })(Jt, Cn),
              0
            )),
              fr(G.default.BUFFER_LEVEL_UPDATED, {
                mediaType: _e,
                bufferLevel: we,
              }),
              pi();
          }
        }
        function hr() {
          const Jt = Ge >= $e - 1,
            Cn = ee.getTimeToStreamEnd(ne) - we < 1e-5;
          (!Jt && !Cn) ||
            me ||
            (Zt(!0),
            le.debug(
              `checkIfBufferingCompleted trigger BUFFERING_COMPLETED for stream id ${ne.id} and type ${_e}`
            ));
        }
        function pi() {
          (_e !== P.default.AUDIO && _e !== P.default.VIDEO) ||
            (((!ee.getLowLatencyModeEnabled() &&
              we < ve.get().streaming.buffer.stallThreshold) ||
              we === 0) &&
            !me
              ? Rn(O.BUFFER_EMPTY)
              : (me ||
                  we >= ve.get().streaming.buffer.stallThreshold ||
                  (ee.getLowLatencyModeEnabled() && we > 0)) &&
                Rn(O.BUFFER_LOADED));
        }
        function Rn(Jt) {
          Se === Jt ||
            (Jt === O.BUFFER_EMPTY && ee.getTime() === 0) ||
            (_e === P.default.TEXT && !Te.isTextEnabled()) ||
            ((Se = Jt),
            fr(G.default.BUFFER_LEVEL_STATE_CHANGED, { state: Jt }),
            fr(
              Jt === O.BUFFER_LOADED
                ? G.default.BUFFER_LOADED
                : G.default.BUFFER_EMPTY
            ),
            le.debug(
              Jt === O.BUFFER_LOADED
                ? "Got enough buffer to start"
                : "Waiting for more buffer before starting playback"
            ));
        }
        function $r() {
          Fe && _e !== P.default.TEXT && (me || Fi(ni()));
        }
        function ni() {
          const Jt = [],
            Cn = Fe.getAllBufferRanges();
          if (!Cn || Cn.length === 0) return Jt;
          const rr = ee.getTime();
          let Er = Math.max(0, rr - ve.get().streaming.buffer.bufferToKeep);
          const gn = q.getRequests({
            state: $t.FRAGMENT_MODEL_EXECUTED,
            time: rr,
            threshold: B,
          })[0];
          if (gn) Er = Math.min(gn.startTime, Er);
          else if (rr === 0 && ee.getIsDynamic()) return [];
          if (Cn.start(0) <= Er) {
            const ct = { start: 0, end: Er };
            for (let Vt = 0; Vt < Cn.length && Cn.end(Vt) <= Er; Vt++)
              ct.end = Cn.end(Vt);
            ct.start < ct.end && Jt.push(ct);
          }
          return Jt;
        }
        function Fi(Jt) {
          return new Promise((Cn, rr) => {
            if (!Jt || !Fe || Jt.length === 0) return wr(), void Cn();
            const Er = [];
            Jt.forEach((gn) => {
              var ct;
              Er.push(
                ((ct = gn),
                new Promise((Vt, kn) => {
                  (ct.resolve = Vt), (ct.reject = kn), vt.push(ct);
                }))
              );
            }),
              rt || Xi(),
              Promise.all(Er)
                .then(() => {
                  Cn();
                })
                .catch((gn) => {
                  rr(gn);
                });
          });
        }
        function Xi() {
          try {
            if (vt.length === 0 || !Fe)
              return (
                le.debug("Nothing to prune, halt pruning"),
                (vt = []),
                void (rt = !1)
              );
            const Jt = Fe.getBuffer();
            if (!Jt || !Jt.buffered || Jt.buffered.length === 0)
              return (
                le.debug(
                  "SourceBuffer is empty (or does not exist), halt pruning"
                ),
                (vt = []),
                void (rt = !1)
              );
            const Cn = vt.shift();
            le.debug(`${_e}: Removing buffer from: ${Cn.start} to ${Cn.end}`),
              (rt = !0),
              ee.getTime() < Cn.end && Zt(!1),
              Fe.remove(Cn)
                .then((rr) => {
                  Hi(rr);
                })
                .catch((rr) => {
                  Hi(rr);
                });
          } catch {
            rt = !1;
          }
        }
        function Hi(Jt) {
          le.debug("onRemoved buffer from:", Jt.from, "to", Jt.to),
            Fe &&
              (Ie(Fe.getAllBufferRanges()),
              vt.length === 0 && ((rt = !1), wr()),
              Jt.unintended &&
                (le.warn(
                  "Detected unintended removal from:",
                  Jt.from,
                  "to",
                  Jt.to,
                  "setting streamprocessor time to",
                  Jt.from
                ),
                fr(G.default.SEEK_TARGET, { time: Jt.from })),
              rt
                ? Xi()
                : (ce ? (ce = !1) : wr(),
                  fr(G.default.BUFFER_CLEARED, {
                    from: Jt.from,
                    to: Jt.to,
                    unintended: Jt.unintended,
                    hasEnoughSpaceToAppend: Sr(),
                    quotaExceeded: Ze,
                  })));
        }
        function jt(Jt) {
          return new Promise((Cn) => {
            Jt && Jt.mseTimeOffset !== void 0 && Fe && Fe.updateTimestampOffset
              ? Fe.updateTimestampOffset(Jt.mseTimeOffset)
                  .then(() => {
                    Cn();
                  })
                  .catch(() => {
                    Cn();
                  })
              : Cn();
          });
        }
        function An() {
          return Fe && !me ? Fe.updateAppendWindow(ne) : Promise.resolve();
        }
        function pn() {
          he++,
            he * (ve.get().streaming.wallclockTimeUpdateInterval / 1e3) >=
              ve.get().streaming.buffer.bufferPruningInterval &&
              ((he = 0), $r());
        }
        function Mn() {
          pi();
        }
        function Zt(Jt) {
          (me = Jt),
            me
              ? fr(G.default.BUFFERING_COMPLETED)
              : ($e = Number.POSITIVE_INFINITY);
        }
        function Fn() {
          try {
            const Jt = Fe.getAllBufferRanges();
            let Cn,
              rr,
              Er = 0;
            if (!Jt) return Er;
            for (rr = 0, Cn = Jt.length; rr < Cn; rr++)
              Er += Jt.end(rr) - Jt.start(rr);
            return Er;
          } catch {
            return 0;
          }
        }
        function Hn(Jt) {
          try {
            let Cn = Jt;
            const rr = Fe.getAllBufferRanges();
            if (!rr || rr.length === 0) return NaN;
            let Er = 0;
            for (; Cn === Jt && Er < rr.length; ) {
              const gn = rr.start(Er),
                ct = rr.end(Er);
              Cn >= gn && Cn <= ct && (Cn = ct), (Er += 1);
            }
            return Cn === Jt ? NaN : Cn;
          } catch {
            return NaN;
          }
        }
        function Sr() {
          const Jt = Fn();
          return isNaN(Jt) || Jt < Me;
        }
        function fr(Jt, Cn) {
          let rr = Cn || {};
          Q.trigger(Jt, rr, { streamId: ne.id, mediaType: _e });
        }
        function Lr(Jt, Cn) {
          if (
            ((Me = Number.POSITIVE_INFINITY),
            (Se = void 0),
            ($e = Number.POSITIVE_INFINITY),
            (Ge = 0),
            (ke = null),
            (me = !1),
            (rt = !1),
            (Ze = !1),
            (we = 0),
            (he = 0),
            (vt = []),
            (Ve = NaN),
            (Re = !1),
            Fe)
          ) {
            let rr = Fe;
            (Fe = null),
              Jt ||
                (Cn
                  ? rr.removeEventListeners()
                  : rr.abort().then(() => {
                      rr.reset(Cn), (rr = null);
                    }));
          }
          ce = !1;
        }
        return (
          (se = {
            appendInitSegmentFromCache: function (Jt) {
              const Cn = nt.extract(ne.id, Jt);
              return (
                !!Cn &&
                (le.info(
                  "Append Init fragment",
                  _e,
                  " with representationId:",
                  Cn.representation.id,
                  " and quality:",
                  Cn.quality,
                  ", data size:",
                  Cn.bytes.byteLength
                ),
                Ke(Cn),
                !0)
              );
            },
            clearBuffers: Fi,
            createBufferSink: it,
            dischargePreBuffer: function () {
              if (Fe && qe && typeof qe.discharge == "function") {
                const Jt = qe.getAllBufferRanges();
                if (Jt.length > 0) {
                  let Er =
                    "Beginning " +
                    _e +
                    "PreBuffer discharge, adding buffer for:";
                  for (let gn = 0; gn < Jt.length; gn++)
                    Er +=
                      " start: " + Jt.start(gn) + ", end: " + Jt.end(gn) + ";";
                  le.debug(Er);
                } else
                  le.debug(
                    "PreBuffer discharge requested, but there were no media segments in the PreBuffer."
                  );
                be = [];
                let Cn = qe.discharge(),
                  rr = null;
                for (let Er = 0; Er < Cn.length; Er++) {
                  const gn = Cn[Er];
                  if (gn.segmentType !== F.HTTPRequest.INIT_SEGMENT_TYPE) {
                    const ct = nt.extract(gn.streamId, gn.representation.id);
                    ct && rr !== ct && (be.push(ct), Fe.append(ct), (rr = ct));
                  }
                  be.push(gn), Fe.append(gn);
                }
                qe.reset(), (qe = null);
              }
            },
            getAllRangesWithSafetyFactor: an,
            getBuffer: function () {
              return Fe;
            },
            getBufferControllerType: function () {
              return re;
            },
            getBufferLevel: function () {
              return we;
            },
            getContinuousBufferTimeForTargetTime: Hn,
            getIsBufferingCompleted: function () {
              return me;
            },
            getIsPruningInProgress: function () {
              return rt;
            },
            getMediaSource: function () {
              return Oe;
            },
            getRangeAt: Bn,
            getStreamId: function () {
              return ne.id;
            },
            getType: function () {
              return _e;
            },
            hasBufferAtTime: function (Jt) {
              try {
                const Cn = Fe.getAllBufferRanges();
                if (!Cn || Cn.length === 0) return !1;
                let rr = 0;
                for (; rr < Cn.length; ) {
                  const Er = Cn.start(rr),
                    gn = Cn.end(rr);
                  if (Jt >= Er && Jt <= gn) return !0;
                  rr += 1;
                }
                return !1;
              } catch (Cn) {
                return le.error(Cn), !1;
              }
            },
            initialize: function (Jt) {
              je(Jt),
                Q.on(G.default.INIT_FRAGMENT_LOADED, Qe, se),
                Q.on(G.default.MEDIA_FRAGMENT_LOADED, We, se),
                Q.on(G.default.WALLCLOCK_TIME_UPDATED, pn, se),
                Q.on(S.default.PLAYBACK_PLAYING, nr, se),
                Q.on(S.default.PLAYBACK_PROGRESS, tn, se),
                Q.on(S.default.PLAYBACK_TIME_UPDATED, tn, se),
                Q.on(S.default.PLAYBACK_RATE_CHANGED, Mn, se),
                Q.on(S.default.PLAYBACK_STALLED, fn, se);
            },
            prepareForAbandonQualitySwitch: function (Jt, Cn) {
              return at(Jt, Cn);
            },
            prepareForDefaultQualitySwitch: function (Jt, Cn) {
              return at(Jt, Cn);
            },
            prepareForFastQualitySwitch: function (Jt, Cn) {
              return at(Jt, Cn);
            },
            prepareForForceReplacementQualitySwitch: function (Jt, Cn) {
              return new Promise((rr) => {
                const Er = [];
                Er.push(Fe.abort()),
                  Er.push(An()),
                  Er.push(Rt()),
                  Er.push(jt(Jt)),
                  Er.push(ft(Jt, Cn)),
                  Promise.allSettled(Er).then(() => {
                    Zt(!1), rr();
                  });
              });
            },
            prepareForNonReplacementTrackSwitch: function (Jt, Cn) {
              return new Promise((rr) => {
                const Er = [];
                Er.push(An()),
                  Er.push(ft(Jt, Cn)),
                  Promise.allSettled(Er).then(() => {
                    rr();
                  });
              });
            },
            prepareForPlaybackSeek: function () {
              return me && Zt(!1), Fe.abort();
            },
            prepareForReplacementTrackSwitch: function (Jt, Cn) {
              return new Promise((rr) => {
                const Er = [];
                Er.push(Fe.abort()),
                  Er.push(An()),
                  Er.push(ft(Jt, Cn)),
                  Er.push(Rt()),
                  Er.push(jt(Jt)),
                  Promise.allSettled(Er).then(() => {
                    Zt(!1), rr();
                  });
              });
            },
            pruneAllSafely: Rt,
            pruneBuffer: $r,
            reset: function (Jt, Cn) {
              Q.off(G.default.INIT_FRAGMENT_LOADED, Qe, this),
                Q.off(G.default.MEDIA_FRAGMENT_LOADED, We, this),
                Q.off(G.default.WALLCLOCK_TIME_UPDATED, pn, this),
                Q.off(S.default.PLAYBACK_PLAYING, nr, this),
                Q.off(S.default.PLAYBACK_PROGRESS, tn, this),
                Q.off(S.default.PLAYBACK_TIME_UPDATED, tn, this),
                Q.off(S.default.PLAYBACK_RATE_CHANGED, Mn, this),
                Q.off(S.default.PLAYBACK_STALLED, fn, this),
                Lr(Jt, Cn);
            },
            segmentRequestingCompleted: function (Jt) {
              isNaN(Jt) || (($e = Jt), hr());
            },
            setIsBufferingCompleted: Zt,
            setMediaSource: je,
            setSeekTarget: function (Jt) {
              Ve = Jt;
            },
            updateAppendWindow: An,
            updateBufferTimestampOffset: jt,
          }),
          (le = (0, E.default)(K).getInstance().getLogger(se)),
          (nt = Gt(K).getInstance()),
          Lr(),
          se
        );
      }
      Ae.__dashjs_factory_name = re;
      var lt = H.default.getClassFactory(Ae);
      const Et = "NotFragmentedTextBufferController";
      function St(Y) {
        Y = Y || {};
        const U = this.context,
          K = (0, X.default)(U).getInstance(),
          Q = Y.textController,
          q = Y.errHandler,
          ee = Y.streamInfo,
          fe = Y.type;
        let ve, ne, Te, _e, se, le;
        function me(Oe) {
          _e = Oe;
        }
        function we(Oe) {
          var Ge;
          ne !== Oe &&
            ((ne = Oe),
            ne &&
              ((Ge = G.default.BUFFERING_COMPLETED),
              K.trigger(Ge, {}, { streamId: ee.id, mediaType: fe })));
        }
        function Me(Oe) {
          Oe.chunk.bytes &&
            !ne &&
            (le.save(Oe.chunk), se.append(Oe.chunk), we(!0));
        }
        return (
          (ve = {
            initialize: function (Oe) {
              me(Oe);
            },
            getStreamId: function () {
              return ee.id;
            },
            getType: function () {
              return fe;
            },
            getBufferControllerType: function () {
              return Et;
            },
            createBufferSink: function (Oe) {
              return new Promise((Ge, $e) => {
                try {
                  (se = ie(U).create({
                    mediaSource: _e,
                    textController: Q,
                    eventBus: K,
                  })),
                    se.initializeForFirstUse(Oe),
                    Te ||
                      (se.getBuffer() &&
                        typeof se.getBuffer().initialize == "function" &&
                        se.getBuffer().initialize(),
                      (Te = !0)),
                    Ge(se);
                } catch (Fe) {
                  q.error(
                    new ot.default(
                      de.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,
                      de.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE + fe
                    )
                  ),
                    $e(Fe);
                }
              });
            },
            dischargePreBuffer: function () {},
            getBuffer: function () {
              return se;
            },
            getBufferLevel: function () {
              return 0;
            },
            getRangeAt: function () {
              return null;
            },
            pruneBuffer: function () {},
            hasBufferAtTime: function () {
              return !0;
            },
            getAllRangesWithSafetyFactor: function () {
              return [];
            },
            getContinuousBufferTimeForTargetTime: function () {
              return Number.POSITIVE_INFINITY;
            },
            setMediaSource: me,
            getMediaSource: function () {
              return _e;
            },
            appendInitSegmentFromCache: function (Oe) {
              return le.extract(ee.id, Oe) !== null;
            },
            getIsBufferingCompleted: function () {
              return ne;
            },
            setIsBufferingCompleted: we,
            getIsPruningInProgress: function () {
              return !1;
            },
            reset: function (Oe) {
              K.off(G.default.INIT_FRAGMENT_LOADED, Me, ve),
                !Oe && se && (se.abort(), se.reset(), (se = null));
            },
            clearBuffers: function () {
              return Promise.resolve();
            },
            prepareForPlaybackSeek: function () {
              return Promise.resolve();
            },
            prepareForReplacementTrackSwitch: function () {
              return (ne = !1), Promise.resolve();
            },
            setSeekTarget: function () {},
            updateAppendWindow: function () {
              return Promise.resolve();
            },
            pruneAllSafely: function () {
              return Promise.resolve();
            },
            updateBufferTimestampOffset: function () {
              return Promise.resolve();
            },
            segmentRequestingCompleted: function () {},
          }),
          (Te = !1),
          (_e = null),
          (ne = !1),
          (le = Gt(U).getInstance()),
          K.on(G.default.INIT_FRAGMENT_LOADED, Me, ve),
          ve
        );
      }
      St.__dashjs_factory_name = Et;
      var Lt = H.default.getClassFactory(St);
      function ln(Y) {
        Y = Y || {};
        const U = this.context,
          K = (0, X.default)(U).getInstance(),
          Q = Y.dashMetrics,
          q = Y.mediaPlayerModel,
          ee = Y.fragmentModel,
          fe = Y.abrController,
          ve = Y.playbackController,
          ne = Y.textController,
          Te = Y.type,
          _e = Y.bufferController,
          se = Y.representationController,
          le = Y.settings;
        let me, we, Me, Oe, Ge, $e, Fe, qe, Re, be, Se, ke;
        function he() {
          Se = !0;
        }
        function rt() {
          Se = !1;
        }
        function Ze(Ie) {
          if (_e.getIsBufferingCompleted()) return;
          nt();
          const Ue = isNaN(Ie) ? 0 : Ie;
          Ge = setTimeout(vt, Ue);
        }
        function nt() {
          Ge && (clearTimeout(Ge), (Ge = null));
        }
        function vt() {
          try {
            if (
              (function () {
                try {
                  return (
                    (Te === P.default.TEXT && !ne.isTextEnabled()) ||
                    (ve.isPaused() &&
                      (!ve.getStreamController().getInitialPlayback() ||
                        !ve.getStreamController().getAutoPlay()) &&
                      !le.get().streaming.scheduling.scheduleWhilePaused)
                  );
                } catch {
                  return !1;
                }
              })()
            )
              return void nt();
            if (
              (function () {
                try {
                  return (
                    !!Se &&
                    se.getCurrentRepresentation() &&
                    (qe == null ||
                      Re ||
                      (function () {
                        const Ie = se.getCurrentRepresentation();
                        if (!Te || !Ie) return !0;
                        let Ue =
                          Ie && Ie.segmentDuration && !isNaN(Ie.segmentDuration)
                            ? Ie.segmentDuration
                            : 0;
                        const at = Q.getCurrentBufferLevel(Te),
                          ft = ce();
                        return (
                          (ft <= Ue ||
                            ve.getLowLatencyModeEnabled() ||
                            (Te === P.default.AUDIO && $e)) &&
                            (Ue = 0),
                          at + Ue < ft
                        );
                      })())
                  );
                } catch {
                  return !1;
                }
              })()
            ) {
              let Ie = !1;
              ke && (Ie = fe.checkPlaybackQuality(Te, we.id)),
                Ie ||
                  (function () {
                    const Ue = se.getCurrentRepresentation();
                    be || Ue.id !== qe || Re
                      ? (Re
                          ? (Me.debug(
                              "Switch track for " +
                                Te +
                                ", representation id = " +
                                Ue.id
                            ),
                            (Re = !1))
                          : Me.debug(
                              "Quality has changed, get init request for representationid = " +
                                Ue.id
                            ),
                        K.trigger(
                          G.default.INIT_FRAGMENT_NEEDED,
                          { representationId: Ue.id, sender: me },
                          { streamId: we.id, mediaType: Te }
                        ),
                        (ke = !1),
                        (be = !1))
                      : (Me.debug(
                          `Media segment needed for ${Te} and stream id ${we.id}`
                        ),
                        K.trigger(
                          G.default.MEDIA_FRAGMENT_NEEDED,
                          {},
                          { streamId: we.id, mediaType: Te }
                        ),
                        (ke = !0));
                  })();
            } else
              Ze(
                ve.getLowLatencyModeEnabled()
                  ? le.get().streaming.scheduling.lowLatencyTimeout
                  : le.get().streaming.scheduling.defaultTimeout
              );
          } catch {
            Ze(
              ve.getLowLatencyModeEnabled()
                ? le.get().streaming.scheduling.lowLatencyTimeout
                : le.get().streaming.scheduling.defaultTimeout
            );
          }
        }
        function ce() {
          let Ie = NaN;
          const Ue = se.getCurrentRepresentation();
          return (
            Te &&
              Ue &&
              (Ie =
                Te === P.default.TEXT
                  ? (function () {
                      try {
                        if (ne.isTextEnabled()) {
                          const at = se.getCurrentRepresentation();
                          if (isNaN(at.fragmentDuration)) {
                            const ft = Q.getCurrentSchedulingInfo(
                              O.SCHEDULING_INFO
                            );
                            return ft ? ft.duration : 0;
                          }
                          return at.fragmentDuration;
                        }
                        return 0;
                      } catch {
                        return 0;
                      }
                    })()
                  : Te === P.default.AUDIO && $e
                  ? (function () {
                      try {
                        const at = Q.getCurrentBufferLevel(P.default.VIDEO),
                          ft = se.getCurrentRepresentation();
                        return isNaN(ft.fragmentDuration)
                          ? at + 1
                          : Math.max(at + 1, ft.fragmentDuration);
                      } catch {
                        return 0;
                      }
                    })()
                  : (function () {
                      try {
                        const at = se.getCurrentRepresentation(),
                          ft = at.mediaInfo.streamInfo;
                        return fe.isPlayingAtTopQuality(at)
                          ? ft.manifestInfo.duration >=
                            le.get().streaming.buffer
                              .longFormContentDurationThreshold
                            ? le.get().streaming.buffer
                                .bufferTimeAtTopQualityLongForm
                            : le.get().streaming.buffer.bufferTimeAtTopQuality
                          : q.getBufferTimeDefaultUnadjusted();
                      } catch {
                        return q.getBufferTimeDefaultUnadjusted();
                      }
                    })()),
            Ie
          );
        }
        function Ve() {
          je(!0);
        }
        function je(Ie) {
          if (ve && ee) {
            const Ue = ee.getRequests({
              state: $t.FRAGMENT_MODEL_EXECUTED,
              time: ve.getTime(),
              threshold: 0,
            })[0];
            Ue &&
              ve.getTime() >= Ue.startTime &&
              ((!Fe.representation ||
                (Ue.representation.mediaInfo.type ===
                  Fe.representation.mediaInfo.type &&
                  Ue.representation.mediaInfo.index !==
                    Fe.representation.mediaInfo.index)) &&
                Ie &&
                (Me.debug(
                  `Track change rendered for streamId ${we.id} and type ${Te}`
                ),
                K.trigger(G.default.TRACK_CHANGE_RENDERED, {
                  mediaType: Te,
                  oldMediaInfo:
                    Fe && Fe.representation && Fe.representation.mediaInfo
                      ? Fe.representation.mediaInfo
                      : null,
                  newMediaInfo: Ue.representation.mediaInfo,
                  streamId: we.id,
                })),
              (Fe.representation &&
                Ue.representation.id === Fe.representation.id) ||
                !Ie ||
                (Me.debug(
                  `Quality change rendered for streamId ${we.id} and type ${Te}`
                ),
                K.trigger(G.default.QUALITY_CHANGE_RENDERED, {
                  mediaType: Te,
                  oldRepresentation: Fe.representation
                    ? Fe.representation
                    : null,
                  newRepresentation: Ue.representation,
                  streamId: we.id,
                })),
              (Fe.representation = Ue.representation));
          }
        }
        function it() {
          ee.abortRequests(), nt();
        }
        function Qe() {
          le.get().streaming.scheduling.scheduleWhilePaused || Ze();
        }
        function We(Ie) {
          Q.updatePlayListTraceMetrics({
            playbackspeed: Ie.playbackRate.toString(),
          });
        }
        function Ke() {
          (ke = !0),
            (Oe = 0),
            (qe = null),
            (Fe = { representation: null }),
            (Re = !1),
            (be = !1),
            (Se = !0);
        }
        return (
          (me = {
            clearScheduleTimer: nt,
            getBufferTarget: ce,
            getPlaybackController: function () {
              return ve;
            },
            getStreamId: function () {
              return we.id;
            },
            getSwitchTrack: function () {
              return Re;
            },
            getTimeToLoadDelay: function () {
              return Oe;
            },
            getType: function () {
              return Te;
            },
            initialize: function (Ie) {
              ($e = Ie),
                K.on(G.default.URL_RESOLUTION_FAILED, it, me),
                K.on(S.default.PLAYBACK_STARTED, Qe, me),
                K.on(S.default.PLAYBACK_RATE_CHANGED, We, me),
                K.on(S.default.PLAYBACK_TIME_UPDATED, Ve, me),
                K.on(S.default.MANAGED_MEDIA_SOURCE_START_STREAMING, he, me),
                K.on(S.default.MANAGED_MEDIA_SOURCE_END_STREAMING, rt, me);
            },
            reset: function () {
              K.off(G.default.URL_RESOLUTION_FAILED, it, me),
                K.off(S.default.PLAYBACK_STARTED, Qe, me),
                K.off(S.default.PLAYBACK_RATE_CHANGED, We, me),
                K.off(S.default.PLAYBACK_TIME_UPDATED, Ve, me),
                K.off(S.default.MANAGED_MEDIA_SOURCE_START_STREAMING, he, me),
                K.off(S.default.MANAGED_MEDIA_SOURCE_END_STREAMING, rt, me),
                nt(),
                je(!1),
                Ke(),
                (we = null);
            },
            setCheckPlaybackQuality: function (Ie) {
              ke = Ie;
            },
            setInitSegmentRequired: function (Ie) {
              be = Ie;
            },
            setLastInitializedRepresentationId: function (Ie) {
              qe = Ie;
            },
            setSwitchTrack: function (Ie) {
              Re = Ie;
            },
            setTimeToLoadDelay: function (Ie) {
              Oe = Ie;
            },
            startScheduleTimer: Ze,
          }),
          (Me = (0, E.default)(U).getInstance().getLogger(me)),
          Ke(),
          (we = Y.streamInfo),
          me
        );
      }
      ln.__dashjs_factory_name = "ScheduleController";
      var Ln = H.default.getClassFactory(ln),
        Tr = class {
          constructor() {
            (this.availabilityEndTime = NaN),
              (this.availabilityStartTime = NaN),
              (this.duration = NaN),
              (this.index = null),
              (this.indexRange = null),
              (this.media = null),
              (this.mediaRange = null),
              (this.mediaStartTime = NaN),
              (this.presentationStartTime = NaN),
              (this.replacementNumber = NaN),
              (this.replacementTime = null),
              (this.representation = null),
              (this.wallStartTime = NaN);
          }
        };
      function sr(Y, U) {
        for (; Y.length < U; ) Y = "0" + Y;
        return Y;
      }
      function hi(Y) {
        return Y && Y.split("$$").join("$");
      }
      function Ra(Y, U) {
        if (!U || !Y || Y.indexOf("$RepresentationID$") === -1) return Y;
        let K = U.toString();
        return Y.split("$RepresentationID$").join(K);
      }
      function En(Y, U, K) {
        let Q, q, ee, fe, ve, ne;
        const Te = U.length;
        if (!Y) return Y;
        for (;;) {
          if (
            ((Q = Y.indexOf("$" + U)),
            Q < 0 || ((q = Y.indexOf("$", Q + Te)), q < 0))
          )
            return Y;
          if (((ee = Y.indexOf("%0", Q + Te)), ee > Q && ee < q))
            switch (
              ((fe = Y.charAt(q - 1)),
              (ve = parseInt(Y.substring(ee + 2, q - 1), 10)),
              fe)
            ) {
              case "d":
              case "i":
              case "u":
                ne = sr(K.toString(), ve);
                break;
              case "x":
                ne = sr(K.toString(16), ve);
                break;
              case "X":
                ne = sr(K.toString(16), ve).toUpperCase();
                break;
              case "o":
                ne = sr(K.toString(8), ve);
                break;
              default:
                return Y;
            }
          else ne = K;
          Y = Y.substring(0, Q) + ne + Y.substring(q + 1);
        }
      }
      function Zn(Y, U, K, Q, q, ee, fe, ve) {
        let ne = new Tr();
        var Te;
        return (
          (ne.representation = Y),
          (ne.duration = U),
          (ne.presentationStartTime = K),
          (ne.mediaStartTime = Q),
          (ne.availabilityStartTime =
            q.calcAvailabilityStartTimeFromPresentationTime(ee, Y, fe)),
          (ne.availabilityEndTime =
            q.calcAvailabilityEndTimeFromPresentationTime(ee + U, Y, fe)),
          (ne.wallStartTime = q.calcWallTimeForSegment(ne, fe)),
          (ne.replacementNumber =
            ((Te = ve), ne.representation.startNumber + Te)),
          (ne.index = ve),
          ne
        );
      }
      function on(Y, U, K, Q) {
        const q = U.adaptation.period;
        if (
          isFinite(q.duration) &&
          q.start + q.duration <= K.presentationStartTime
        )
          return !1;
        if (Q) {
          if (U.availabilityTimeOffset === "INF") return !0;
          const ee = Y.getClientReferenceTime();
          return (
            K.availabilityStartTime.getTime() <= ee &&
            (!isFinite(K.availabilityEndTime) ||
              K.availabilityEndTime.getTime() >= ee)
          );
        }
        return !0;
      }
      function rn(Y, U, K, Q) {
        let q, ee, fe;
        (q = K.segmentDuration),
          isNaN(q) && (q = K.adaptation.period.duration),
          (ee = parseFloat((K.adaptation.period.start + Q * q).toFixed(5))),
          (fe = parseFloat((ee + q).toFixed(5)));
        const ve = Zn(
          K,
          q,
          ee,
          Y.calcMediaTimeFromPresentationTime(ee, K),
          Y,
          fe,
          U,
          Q
        );
        return on(Y, K, ve, U) ? ve : null;
      }
      function It(Y, U, K, Q, q, ee, fe, ve, ne, Te) {
        const _e = Q / ee,
          se = q / ee;
        let le, me, we;
        return (
          (le = Y.calcPresentationTimeFromMediaTime(_e, K)),
          (me = le + se),
          (we = Zn(K, se, le, _e, Y, me, U, ne)),
          on(Y, K, we, U)
            ? ((we.replacementTime = Te || Q),
              (fe = En(fe, "Number", we.replacementNumber)),
              (fe = En(fe, "Time", we.replacementTime)),
              (we.media = fe),
              (we.mediaRange = ve),
              we)
            : null
        );
      }
      function wt(Y) {
        const U = (Y = Y || {}).eventBus,
          K = Y.events,
          Q = Y.abrController,
          q = Y.dashMetrics,
          ee = Y.playbackController,
          fe = Y.timelineConverter,
          ve = Y.type,
          ne = Y.streamInfo,
          Te = Y.segmentsController,
          _e = Y.isDynamic;
        let se, le, me;
        function we() {
          return ve;
        }
        function Me() {
          return me;
        }
        function Oe() {
          (me = null), (le = []);
        }
        function Ge(be) {
          return new Promise((Se, ke) => {
            const he = be.hasInitialization(),
              rt = be.hasSegments(),
              Ze = [];
            Ze.push(Te.updateInitData(be, he)),
              Ze.push(Te.updateSegmentData(be, rt)),
              Promise.all(Ze)
                .then((nt) => {
                  var vt, ce, Ve;
                  nt[0] &&
                    !nt[0].error &&
                    ((ce = be),
                    (Ve = nt[0]),
                    (be =
                      Ve && !Ve.error && Ve.representation
                        ? Ve.representation
                        : ce)),
                    nt[1] &&
                      !nt[1].error &&
                      (be = (function (je, it) {
                        if (!it || it.error) return;
                        const Qe = it.segments,
                          We = [];
                        let Ke,
                          Ie,
                          Ue,
                          at,
                          ft = 0;
                        for (Ke = 0, Ie = Qe ? Qe.length : 0; Ke < Ie; Ke++)
                          (Ue = Qe[Ke]),
                            (at = It(
                              fe,
                              _e,
                              je,
                              Ue.startTime,
                              Ue.duration,
                              Ue.timescale,
                              Ue.media,
                              Ue.mediaRange,
                              ft
                            )),
                            at && (We.push(at), (at = null), ft++);
                        return We.length > 0 && (je.segments = We), je;
                      })(be, nt[1])),
                    (be.fragmentDuration = be.segmentDuration
                      ? be.segmentDuration
                      : be.segments && be.segments.length > 0
                      ? be.segments[0].duration
                      : NaN),
                    ((vt = be).mediaFinishedInformation =
                      Te.getMediaFinishedInformation(vt)),
                    (function (je) {
                      let it,
                        Qe = q.getCurrentManifestUpdate(),
                        We = !1;
                      if (Qe) {
                        for (
                          let Ke = 0;
                          Ke < Qe.representationInfo.length;
                          Ke++
                        )
                          if (
                            ((it = Qe.representationInfo[Ke]),
                            it.index === je.index && it.mediaType === we())
                          ) {
                            We = !0;
                            break;
                          }
                        We || q.addManifestUpdateRepresentationInfo(je, we());
                      }
                    })(be),
                    Se();
                })
                .catch((nt) => {
                  ke(nt);
                });
          });
        }
        function $e(be) {
          if (!le || le.length === 0) return null;
          const Se = le.filter((ke) => ke.id === be);
          return Se.length > 0 ? Se[0] : null;
        }
        function Fe(be) {
          U.trigger(
            K.DATA_UPDATE_COMPLETED,
            { currentRepresentation: me, error: be },
            { streamId: ne.id, mediaType: ve }
          );
        }
        function qe(be) {
          (me && me.id === be.id) ||
            (function (Se) {
              (function () {
                if (!(Q && q && ee && fe))
                  throw new Error(P.default.MISSING_CONFIG_ERROR);
              })();
              const ke = new Date(),
                he = 1e3 * ee.getTime();
              Se &&
                q.addRepresentationSwitch(Se.adaptation.type, ke, he, Se.id),
                U.trigger(
                  S.default.REPRESENTATION_SWITCH,
                  { mediaType: ve, streamId: ne.id, currentRepresentation: Se },
                  { streamId: ne.id, mediaType: ve }
                );
            })(be),
            (me = be);
        }
        function Re(be) {
          if (be.newDuration) {
            const Se = Me();
            Se &&
              Se.adaptation.period &&
              (Se.adaptation.period.duration = be.newDuration);
          }
        }
        return (
          (se = {
            getCurrentRepresentation: Me,
            getRepresentationById: $e,
            getStreamId: function () {
              return ne.id;
            },
            getType: we,
            prepareQualityChange: function (be) {
              const Se = le.filter((ke) => ke.id === be.id);
              Se.length > 0 && qe(Se[0]);
            },
            reset: function () {
              U.off(S.default.MANIFEST_VALIDITY_CHANGED, Re, se), Oe();
            },
            updateData: function (be, Se, ke) {
              return new Promise((he, rt) => {
                if (
                  ((le = be),
                  qe($e(ke)),
                  ve !== P.default.VIDEO &&
                    ve !== P.default.AUDIO &&
                    (ve !== P.default.TEXT || !Se))
                )
                  return Fe(), void he();
                const Ze = [];
                for (let nt = 0, vt = le.length; nt < vt; nt++) {
                  const ce = le[nt];
                  Ze.push(Ge(ce));
                }
                Promise.all(Ze)
                  .then(() => {
                    (function () {
                      Q.setPlaybackQuality(ve, ne, me);
                      const nt = q.getCurrentDVRInfo(ve);
                      nt &&
                        q.updateManifestUpdateInfo({
                          latency: nt.range.end - ee.getTime(),
                        }),
                        Fe();
                    })(),
                      he();
                  })
                  .catch((nt) => {
                    rt(nt);
                  });
              });
            },
          }),
          Oe(),
          U.on(S.default.MANIFEST_VALIDITY_CHANGED, Re, se),
          se
        );
      }
      wt.__dashjs_factory_name = "RepresentationController";
      var Mt = H.default.getClassFactory(wt),
        Wt = n(656);
      function Ft(Y) {
        const U = (Y = Y || {}).eventBus,
          K = Y.debug,
          Q = Y.urlUtils,
          q = Y.type,
          ee = Y.streamInfo,
          fe = Y.segmentsController,
          ve = Y.timelineConverter,
          ne = Y.baseURLController;
        let Te, _e, se, le, me;
        function we() {
          return q;
        }
        function Me() {
          se = null;
        }
        function Oe(Re, be, Se) {
          const ke = ne.resolve(Se.path);
          let he,
            rt,
            Ze = {};
          return (
            ke && be !== ke.url && Q.isRelative(be)
              ? ((he = ke.url),
                (rt = ke.serviceLocation),
                (Ze = ke.queryParams),
                be && (he = Q.resolve(be, he)))
              : (he = be),
            !Q.isRelative(he) &&
              ((Re.url = he),
              (Re.serviceLocation = rt),
              (Re.queryParams = Ze),
              !0)
          );
        }
        function Ge(Re, be) {
          if (be == null) return null;
          const Se = new De(),
            ke = be.representation,
            he = ke.bandwidth;
          let rt = be.media;
          return (
            (rt = En(rt, "Number", be.replacementNumber)),
            (rt = En(rt, "Time", be.replacementTime)),
            (rt = En(rt, "Bandwidth", he)),
            (rt = Ra(rt, ke.id)),
            (rt = hi(rt)),
            (Se.mediaType = we()),
            (Se.bandwidth = ke.bandwidth),
            (Se.type = F.HTTPRequest.MEDIA_SEGMENT_TYPE),
            (Se.range = be.mediaRange),
            (Se.startTime = be.presentationStartTime),
            (Se.mediaStartTime = be.mediaStartTime),
            (Se.duration = be.duration),
            (Se.timescale = ke.timescale),
            (Se.availabilityStartTime = be.availabilityStartTime),
            (Se.availabilityEndTime = be.availabilityEndTime),
            (Se.availabilityTimeComplete = ke.availabilityTimeComplete),
            (Se.wallStartTime = be.wallStartTime),
            (Se.index = be.index),
            (Se.adaptationIndex = ke.adaptation.index),
            (Se.representation = ke),
            Oe(Se, rt, ke) ? Se : void 0
          );
        }
        function $e(Re, be, Se) {
          let ke = null;
          if (!be || !be.segmentInfoType) return ke;
          const he = fe.getSegmentByTime(be, Se);
          return (
            he &&
              ((se = he),
              _e.debug("Index for time " + Se + " is " + he.index),
              (ke = Ge(0, he))),
            ke
          );
        }
        function Fe(Re, be, Se) {
          let ke = null;
          const he = fe.getSegmentByIndex(be, Se, se ? se.mediaStartTime : -1);
          if (he) (ke = Ge(0, he)), (se = he);
          else {
            if (le && !me)
              return (
                _e.debug(
                  we() +
                    " No segment found at index: " +
                    Se +
                    ". Wait for next loop"
                ),
                null
              );
            me = !0;
          }
          return ke;
        }
        function qe() {
          _e.debug("Dynamic stream complete"), (me = !0);
        }
        return (
          (Te = {
            getCurrentIndex: function () {
              return se ? se.index : -1;
            },
            getInitRequest: function (Re, be) {
              return be
                ? (function (Se, ke, he) {
                    const rt = new De(),
                      Ze = ke.adaptation.period,
                      nt = Ze.start;
                    if (
                      ((rt.mediaType = he),
                      (rt.type = F.HTTPRequest.INIT_SEGMENT_TYPE),
                      (rt.range = ke.range),
                      (rt.availabilityStartTime =
                        ve.calcAvailabilityStartTimeFromPresentationTime(
                          nt,
                          ke,
                          le
                        )),
                      (rt.availabilityEndTime =
                        ve.calcAvailabilityEndTimeFromPresentationTime(
                          nt + Ze.duration,
                          ke,
                          le
                        )),
                      (rt.representation = ke),
                      Oe(rt, ke.initialization, ke))
                    )
                      return (
                        (rt.url = En(rt.url, "Bandwidth", ke.bandwidth)), rt
                      );
                  })(0, be, we())
                : null;
            },
            getNextSegmentRequest: function (Re, be) {
              return be && be.segmentInfoType
                ? Fe(0, be, se ? se.index + 1 : 0)
                : null;
            },
            getNextSegmentRequestIdempotent: function (Re, be) {
              let Se = null,
                ke = se ? se.index + 1 : 0;
              const he = fe.getSegmentByIndex(
                be,
                ke,
                se ? se.mediaStartTime : -1
              );
              return he ? ((Se = Ge(0, he)), Se) : null;
            },
            getSegmentRequestForTime: $e,
            getStreamId: function () {
              return ee.id;
            },
            getStreamInfo: function () {
              return ee;
            },
            getType: we,
            getValidTimeAheadOfTargetTime: function (Re, be, Se, ke) {
              try {
                if (isNaN(Re) || !be || !Se) return NaN;
                if (
                  (Re < 0 && (Re = 0), isNaN(ke) && (ke = 0.5), $e(0, Se, Re))
                )
                  return Re;
                if (
                  Se.adaptation.period.start + Se.adaptation.period.duration <
                  Re
                )
                  return NaN;
                const he = isFinite(Se.adaptation.period.duration)
                  ? Se.adaptation.period.start + Se.adaptation.period.duration
                  : Re + 30;
                let rt = Math.min(Re + ke, he),
                  Ze = NaN,
                  nt = null;
                for (; rt <= he; ) {
                  let vt = null;
                  if ((rt <= he && (vt = $e(0, Se, rt)), vt)) {
                    (Ze = rt), (nt = vt);
                    break;
                  }
                  rt += ke;
                }
                if (nt) {
                  const vt = nt.startTime + nt.duration;
                  return Re > nt.startTime && vt - Re > ke
                    ? Re
                    : !isNaN(nt.startTime) &&
                      Re < nt.startTime &&
                      Ze > nt.startTime
                    ? nt.startTime + 0.001
                    : Math.min(vt - ke, Ze);
                }
                return Ze;
              } catch {
                return NaN;
              }
            },
            initialize: function (Re) {
              (le = Re), (me = !1), fe.initialize(Re);
            },
            isLastSegmentRequested: function (Re, be) {
              return !Re || !se
                ? !1
                : me
                ? !0
                : !isFinite(Re.adaptation.period.duration) ||
                  se.presentationStartTime + se.duration > be
                ? !1
                : Re.mediaFinishedInformation &&
                  !isNaN(Re.mediaFinishedInformation.numberOfSegments) &&
                  !isNaN(se.index) &&
                  se.index >=
                    Re.mediaFinishedInformation.numberOfSegments - 1 &&
                  (!le ||
                    Re.segmentInfoType === I.default.SEGMENT_TEMPLATE ||
                    (le &&
                      Re.segmentInfoType === I.default.SEGMENT_LIST &&
                      Re.adaptation.period.nextPeriodId))
                ? !0
                : !!(
                    le &&
                    Re.adaptation.period.nextPeriodId &&
                    Re.segmentInfoType === I.default.SEGMENT_TIMELINE &&
                    Re.mediaFinishedInformation &&
                    !isNaN(
                      Re.mediaFinishedInformation.mediaTimeOfLastSignaledSegment
                    ) &&
                    se &&
                    !isNaN(se.mediaStartTime) &&
                    !isNaN(se.duration) &&
                    se.mediaStartTime + se.duration >=
                      Re.mediaFinishedInformation
                        .mediaTimeOfLastSignaledSegment -
                        0.05
                  );
            },
            repeatSegmentRequest: function (Re, be) {
              return be && be.segmentInfoType
                ? Fe(0, be, se ? se.index : 0)
                : null;
            },
            reset: function () {
              Me(), U.off(S.default.DYNAMIC_TO_STATIC, qe, Te);
            },
          }),
          (_e = K.getLogger(Te)),
          Me(),
          U.on(S.default.DYNAMIC_TO_STATIC, qe, Te),
          Te
        );
      }
      Ft.__dashjs_factory_name = "DashHandler";
      var un = H.default.getClassFactory(Ft);
      function Yt() {
        let Y;
        const U = /^[a-z][a-z0-9+\-_.]*:/i,
          K = /^https?:\/\//i,
          Q = /^https:\/\//i,
          q = /^([a-z][a-z0-9+\-_.]*:\/\/[^\/]+)\/?/i,
          ee = (me, we) => {
            try {
              return new window.URL(me, we).toString();
            } catch {
              return me;
            }
          },
          fe = (me, we) => {
            let Me = ve;
            if (!we || !_e(me)) return me;
            se(me) && (Me = ne), le(me) && (Me = Te);
            const Oe = Me(we),
              Ge =
                Oe.charAt(Oe.length - 1) !== "/" && me.charAt(0) !== "/"
                  ? "/"
                  : "";
            return [Oe, me].join(Ge);
          };
        function ve(me) {
          const we = me.indexOf("/"),
            Me = me.lastIndexOf("/");
          return we !== -1
            ? Me === we + 1
              ? me
              : (me.indexOf("?") !== -1 &&
                  (me = me.substring(0, me.indexOf("?"))),
                me.substring(0, Me + 1))
            : "";
        }
        function ne(me) {
          const we = me.match(q);
          return we ? we[1] : "";
        }
        function Te(me) {
          const we = me.match(U);
          return we ? we[0] : "";
        }
        function _e(me) {
          return !U.test(me);
        }
        function se(me) {
          return _e(me) && me.charAt(0) === "/";
        }
        function le(me) {
          return me.indexOf("//") === 0;
        }
        return (
          (function () {
            try {
              new window.URL("x", "http://y"), (Y = ee);
            } catch {
            } finally {
              Y = Y || fe;
            }
          })(),
          {
            parseBaseUrl: ve,
            parseOrigin: ne,
            parseScheme: Te,
            isRelative: _e,
            isPathAbsolute: se,
            isSchemeRelative: le,
            isHTTPURL: function (me) {
              return K.test(me);
            },
            isHTTPS: function (me) {
              return Q.test(me);
            },
            removeHostname: function (me) {
              return /^(?:\w+\:\/\/)?([^\/]+)(.*)$/.exec(me)[2].substring(1);
            },
            resolve: function (me, we) {
              return Y(me, we);
            },
          }
        );
      }
      Yt.__dashjs_factory_name = "DefaultURLUtils";
      var Qt = H.default.getSingletonFactory(Yt);
      function Sn() {
        let Y,
          U,
          K = [];
        const Q = this.context;
        function q(ee, fe, ve) {
          let ne = (function (Te) {
            let _e;
            for (_e = 0; _e < K.length; _e++)
              if (K[_e].regex.test(Te)) return K[_e].utils;
            return U;
          })(ve || fe);
          return ne && typeof ne[ee] == "function"
            ? ne[ee](fe, ve)
            : U[ee](fe, ve);
        }
        return (
          (U = Qt(Q).getInstance()),
          (Y = {
            registerUrlRegex: function (ee, fe) {
              K.push({ regex: ee, utils: fe });
            },
            parseBaseUrl: function (ee) {
              return q("parseBaseUrl", ee);
            },
            parseOrigin: function (ee) {
              return q("parseOrigin", ee);
            },
            parseScheme: function (ee) {
              return q("parseScheme", ee);
            },
            isRelative: function (ee) {
              return q("isRelative", ee);
            },
            isPathAbsolute: function (ee) {
              return q("isPathAbsolute", ee);
            },
            isSchemeRelative: function (ee) {
              return q("isSchemeRelative", ee);
            },
            isHTTPURL: function (ee) {
              return q("isHTTPURL", ee);
            },
            isHTTPS: function (ee) {
              return q("isHTTPS", ee);
            },
            removeHostname: function (ee) {
              return q("removeHostname", ee);
            },
            resolve: function (ee, fe) {
              return q("resolve", ee, fe);
            },
          }),
          Y
        );
      }
      Sn.__dashjs_factory_name = "URLUtils";
      var ar = H.default.getSingletonFactory(Sn);
      class ye {
        constructor() {
          (this.start = null),
            (this.mstart = null),
            (this.starttype = null),
            (this.trace = []);
        }
      }
      (ye.INITIAL_PLAYOUT_START_REASON = "initial_playout"),
        (ye.SEEK_START_REASON = "seek"),
        (ye.RESUME_FROM_PAUSE_START_REASON = "resume"),
        (ye.METRICS_COLLECTION_START_REASON = "metrics_collection_start");
      class Gn {
        constructor() {
          (this.representationid = null),
            (this.subreplevel = null),
            (this.start = null),
            (this.mstart = null),
            (this.duration = null),
            (this.playbackspeed = null),
            (this.stopreason = null);
        }
      }
      function Ht(Y, U) {
        const K = (Y = Y || {}).timelineConverter,
          Q = Y.dashMetrics;
        let q;
        function ee() {
          if (!K) throw new Error(P.default.MISSING_CONFIG_ERROR);
        }
        function fe(ne, Te) {
          const _e =
              ne.adaptation.period.mpd.manifest.Period[
                ne.adaptation.period.index
              ].AdaptationSet[ne.adaptation.index].Representation[ne.index]
                .SegmentTemplate ||
              ne.adaptation.period.mpd.manifest.Period[
                ne.adaptation.period.index
              ].AdaptationSet[ne.adaptation.index].Representation[ne.index]
                .SegmentList,
            se = _e.SegmentTimeline,
            le = _e.SegmentURL;
          let me,
            we,
            Me,
            Oe,
            Ge,
            $e,
            Fe,
            qe = 0,
            Re = -1;
          (Fe = ne.timescale), (me = se.S);
          let be = !1;
          for (Me = 0, Oe = me.length; Me < Oe && !be; Me++)
            for (
              we = me[Me],
                $e = 0,
                we.hasOwnProperty("r") && ($e = we.r),
                we.hasOwnProperty("t") && (qe = we.t),
                $e < 0 && ($e = ve(ne, me[Me + 1], we, Fe, qe / Fe)),
                Ge = 0;
              Ge <= $e && !be;
              Ge++
            )
              Re++,
                (be = Te(qe, _e, le, we, Fe, Re, Me)),
                be && (ne.segmentDuration = we.d / Fe),
                (qe += we.d);
        }
        function ve(ne, Te, _e, se, le) {
          let me;
          if (Te && Te.hasOwnProperty("t")) me = Te.t / se;
          else
            try {
              let we = 0;
              if (
                isNaN(ne.adaptation.period.start) ||
                isNaN(ne.adaptation.period.duration) ||
                !isFinite(ne.adaptation.period.duration)
              ) {
                const Me = Q.getCurrentDVRInfo();
                we = isNaN(Me.end) ? 0 : Me.end;
              } else
                we = ne.adaptation.period.start + ne.adaptation.period.duration;
              (me = K.calcMediaTimeFromPresentationTime(we, ne)),
                (ne.segmentDuration = _e.d / se);
            } catch {
              me = 0;
            }
          return Math.max(Math.ceil((me - le) / (_e.d / se)) - 1, 0);
        }
        return (
          (q = {
            getSegmentByIndex: function (ne, Te, _e) {
              if ((ee(), !ne)) return null;
              let se = null,
                le = !1;
              return (
                fe(ne, function (me, we, Me, Oe, Ge, $e, Fe) {
                  if (le || _e < 0) {
                    let qe = we.media,
                      Re = Oe.mediaRange;
                    return (
                      Me &&
                        ((qe = Me[Fe].media || ""), (Re = Me[Fe].mediaRange)),
                      (se = It(
                        K,
                        U,
                        ne,
                        me,
                        Oe.d,
                        Ge,
                        qe,
                        Re,
                        $e,
                        Oe.tManifest
                      )),
                      !0
                    );
                  }
                  return me >= _e * Ge - 0.5 * Oe.d && (le = !0), !1;
                }),
                se
              );
            },
            getSegmentByTime: function (ne, Te) {
              if ((ee(), !ne)) return null;
              Te === void 0 && (Te = null);
              let _e = null;
              const se = K.calcMediaTimeFromPresentationTime(Te, ne);
              return (
                fe(ne, function (le, me, we, Me, Oe, Ge, $e) {
                  const Fe = parseFloat((se * Oe).toPrecision(15));
                  if (Fe < le + Me.d && Fe >= le) {
                    let qe = me.media,
                      Re = Me.mediaRange;
                    return (
                      we &&
                        ((qe = we[$e].media || ""), (Re = we[$e].mediaRange)),
                      (_e = It(
                        K,
                        U,
                        ne,
                        le,
                        Me.d,
                        Oe,
                        qe,
                        Re,
                        Ge,
                        Me.tManifest
                      )),
                      !0
                    );
                  }
                  return !1;
                }),
                _e
              );
            },
            getMediaFinishedInformation: function (ne) {
              if (!ne) return 0;
              const Te = (
                ne.adaptation.period.mpd.manifest.Period[
                  ne.adaptation.period.index
                ].AdaptationSet[ne.adaptation.index].Representation[ne.index]
                  .SegmentTemplate ||
                ne.adaptation.period.mpd.manifest.Period[
                  ne.adaptation.period.index
                ].AdaptationSet[ne.adaptation.index].Representation[ne.index]
                  .SegmentList
              ).SegmentTimeline;
              let _e,
                se,
                le,
                me,
                we,
                Me,
                Oe,
                Ge = 0,
                $e = 0,
                Fe = 0;
              for (
                Oe = ne.timescale, _e = Te.S, me = _e.length, le = 0;
                le < me;
                le++
              )
                for (
                  se = _e[le],
                    Me = 0,
                    se.hasOwnProperty("r") && (Me = se.r),
                    se.hasOwnProperty("t") && ((Ge = se.t), ($e = Ge / Oe)),
                    Me < 0 && (Me = ve(ne, _e[le + 1], se, Oe, $e)),
                    we = 0;
                  we <= Me;
                  we++
                )
                  Fe++, (Ge += se.d), ($e = Ge / Oe);
              return {
                numberOfSegments: Fe,
                mediaTimeOfLastSignaledSegment: $e,
              };
            },
          }),
          q
        );
      }
      (Gn.REPRESENTATION_SWITCH_STOP_REASON = "representation_switch"),
        (Gn.REBUFFERING_REASON = "rebuffering"),
        (Gn.USER_REQUEST_STOP_REASON = "user_request"),
        (Gn.END_OF_PERIOD_STOP_REASON = "end_of_period"),
        (Gn.END_OF_CONTENT_STOP_REASON = "end_of_content"),
        (Gn.METRICS_COLLECTION_STOP_REASON = "metrics_collection_end"),
        (Gn.FAILURE_STOP_REASON = "failure"),
        (Ht.__dashjs_factory_name = "TimelineSegmentsGetter");
      var yr = H.default.getClassFactory(Ht);
      function T(Y, U) {
        const K = (Y = Y || {}).timelineConverter;
        let Q;
        function q() {
          if (
            !K ||
            !K.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime")
          )
            throw new Error(P.default.MISSING_CONFIG_ERROR);
        }
        function ee(fe, ve) {
          if ((q(), !fe)) return null;
          const ne =
            fe.adaptation.period.mpd.manifest.Period[fe.adaptation.period.index]
              .AdaptationSet[fe.adaptation.index].Representation[fe.index]
              .SegmentTemplate;
          ve = Math.max(ve, 0);
          const Te = rn(K, U, fe, ve);
          if (Te) {
            Te.replacementTime = Math.round(
              ve * fe.segmentDuration * fe.timescale,
              10
            );
            let _e = ne.media;
            (_e = En(_e, "Number", Te.replacementNumber)),
              (_e = En(_e, "Time", Te.replacementTime)),
              (Te.media = _e);
          }
          return Te;
        }
        return (
          (Q = {
            getSegmentByIndex: ee,
            getSegmentByTime: function (fe, ve) {
              if ((q(), !fe)) return null;
              const ne = fe.segmentDuration;
              if (isNaN(ne)) return null;
              let Te = K.calcPeriodRelativeTimeFromMpdRelativeTime(fe, ve);
              return ee(fe, Math.floor(Te / ne));
            },
            getMediaFinishedInformation: function (fe) {
              const ve = {
                numberOfSegments: 0,
                mediaTimeOfLastSignaledSegment: NaN,
              };
              if (!fe) return ve;
              const ne = fe.segmentDuration;
              return (
                isNaN(ne)
                  ? (ve.numberOfSegments = 1)
                  : (ve.numberOfSegments = Math.ceil(
                      fe.adaptation.period.duration / ne
                    )),
                ve
              );
            },
          }),
          Q
        );
      }
      T.__dashjs_factory_name = "TemplateSegmentsGetter";
      var Jn = H.default.getClassFactory(T);
      function pr(Y, U) {
        const K = (Y = Y || {}).timelineConverter;
        let Q;
        function q() {
          if (
            !K ||
            !K.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime")
          )
            throw new Error(P.default.MISSING_CONFIG_ERROR);
        }
        function ee(fe, ve) {
          if ((q(), !fe)) return null;
          const ne =
              fe.adaptation.period.mpd.manifest.Period[
                fe.adaptation.period.index
              ].AdaptationSet[fe.adaptation.index].Representation[fe.index]
                .SegmentList,
            Te = ne.SegmentURL.length,
            _e = fe && !isNaN(fe.startNumber) ? fe.startNumber : 1,
            se = Math.max(_e - 1, 0),
            le = Math.max(ve - se, 0);
          let me = null;
          if (le < Te) {
            const we = ne.SegmentURL[le];
            (me = rn(K, U, fe, ve)),
              me &&
                ((me.replacementTime = (_e + ve - 1) * fe.segmentDuration),
                (me.media = we.media ? we.media : ""),
                (me.mediaRange = we.mediaRange),
                (me.indexRange = we.indexRange));
          }
          return me;
        }
        return (
          (Q = {
            getSegmentByIndex: ee,
            getSegmentByTime: function (fe, ve) {
              if ((q(), !fe)) return null;
              const ne = fe.segmentDuration;
              if (isNaN(ne)) return null;
              const Te = K.calcPeriodRelativeTimeFromMpdRelativeTime(fe, ve);
              return ee(fe, Math.floor(Te / ne));
            },
            getMediaFinishedInformation: function (fe) {
              const ve = {
                numberOfSegments: 0,
                mediaTimeOfLastSignaledSegment: NaN,
              };
              if (!fe) return ve;
              const ne =
                  fe.adaptation.period.mpd.manifest.Period[
                    fe.adaptation.period.index
                  ].AdaptationSet[fe.adaptation.index].Representation[fe.index]
                    .SegmentList,
                Te = fe && !isNaN(fe.startNumber) ? fe.startNumber : 1,
                _e = Math.max(Te - 1, 0);
              return (ve.numberOfSegments = _e + ne.SegmentURL.length), ve;
            },
          }),
          Q
        );
      }
      pr.__dashjs_factory_name = "ListSegmentsGetter";
      var Ut = H.default.getClassFactory(pr);
      function Dt(Y) {
        const U = (Y = Y || {}).timelineConverter;
        let K;
        function Q() {
          if (
            !U ||
            !U.hasOwnProperty("calcPeriodRelativeTimeFromMpdRelativeTime")
          )
            throw new Error(P.default.MISSING_CONFIG_ERROR);
        }
        function q(ee, fe) {
          if ((Q(), !ee)) return null;
          const ve = ee.segments ? ee.segments.length : -1;
          let ne;
          if (fe < ve && ((ne = ee.segments[fe]), ne && ne.index === fe))
            return ne;
          for (let Te = 0; Te < ve; Te++)
            if (((ne = ee.segments[Te]), ne && ne.index === fe)) return ne;
          return null;
        }
        return (
          (K = {
            getSegmentByIndex: q,
            getSegmentByTime: function (ee, fe) {
              return (
                Q(),
                q(
                  ee,
                  (function (ve, ne) {
                    if (!ve) return -1;
                    const Te = ve.segments,
                      _e = Te ? Te.length : null;
                    let se,
                      le,
                      me,
                      we,
                      Me,
                      Oe = -1;
                    if (Te && _e > 0) {
                      for (Me = 0; Me < _e; Me++)
                        if (
                          ((le = Te[Me]),
                          (me = le.presentationStartTime),
                          (we = le.duration),
                          (se = we / 2),
                          ne + se >= me && ne - se < me + we)
                        ) {
                          Oe = le.index;
                          break;
                        }
                    }
                    return Oe;
                  })(ee, fe)
                )
              );
            },
            getMediaFinishedInformation: function (ee) {
              const fe = {
                numberOfSegments: 0,
                mediaTimeOfLastSignaledSegment: NaN,
              };
              return (
                ee && ee.segments && (fe.numberOfSegments = ee.segments.length),
                fe
              );
            },
          }),
          K
        );
      }
      Dt.__dashjs_factory_name = "SegmentBaseGetter";
      var Kt = H.default.getClassFactory(Dt);
      function vn(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.dashConstants,
          Q = Y.type,
          q = Y.segmentBaseController;
        let ee, fe;
        function ve(ne) {
          return ne
            ? ne.segments
              ? fe[K.SEGMENT_BASE]
              : fe[ne.segmentInfoType]
            : null;
        }
        return (
          (ee = {
            initialize: function (ne) {
              (fe[K.SEGMENT_TIMELINE] = yr(U).create(Y, ne)),
                (fe[K.SEGMENT_TEMPLATE] = Jn(U).create(Y, ne)),
                (fe[K.SEGMENT_LIST] = Ut(U).create(Y, ne)),
                (fe[K.SEGMENT_BASE] = Kt(U).create(Y, ne));
            },
            updateInitData: function (ne, Te) {
              return Te
                ? Promise.resolve()
                : q.getSegmentBaseInitSegment({
                    representation: ne,
                    mediaType: Q,
                  });
            },
            updateSegmentData: function (ne, Te) {
              return Te
                ? Promise.resolve()
                : q.getSegmentList({
                    mimeType: ne.mimeType,
                    representation: ne,
                    mediaType: Q,
                  });
            },
            getSegmentByIndex: function (ne, Te, _e) {
              const se = ve(ne);
              return se ? se.getSegmentByIndex(ne, Te, _e) : null;
            },
            getSegmentByTime: function (ne, Te) {
              const _e = ve(ne);
              return _e ? _e.getSegmentByTime(ne, Te) : null;
            },
            getMediaFinishedInformation: function (ne) {
              const Te = ve(ne);
              return Te
                ? Te.getMediaFinishedInformation(ne)
                : { numberOfSegments: 0, mediaTimeOfLastSignaledSegment: NaN };
            },
          }),
          (fe = {}),
          ee
        );
      }
      vn.__dashjs_factory_name = "SegmentsController";
      var st = H.default.getClassFactory(vn);
      function Xt() {
        let Y;
        return (
          (Y = {
            ntpToUTC: function (U) {
              const K = new Date(Date.UTC(1900, 0, 1, 0, 0, 0));
              return new Date(K.getTime() + U).getTime();
            },
          }),
          Y
        );
      }
      Xt.__dashjs_factory_name = "TimeUtils";
      var qn = H.default.getSingletonFactory(Xt),
        cr = class {
          constructor(Y) {
            (this.newMediaInfo = Y.newMediaInfo),
              (this.previouslySelectedRepresentation =
                Y.previouslySelectedRepresentation),
              (this.newRepresentation = Y.newRepresentation);
          }
        };
      function Ui(Y) {
        Y = Y || {};
        let U,
          K,
          Q,
          q,
          ee,
          fe,
          ve,
          ne,
          Te,
          _e,
          se,
          le,
          me,
          we,
          Me,
          Oe,
          Ge = this.context,
          $e = (0, X.default)(Ge).getInstance(),
          Fe = Y.abrController,
          qe = Y.adapter,
          Re = Y.boxParser,
          be = Y.capabilities,
          Se = Y.dashMetrics,
          ke = Y.errHandler,
          he = Y.fragmentModel,
          rt = Y.manifestModel,
          Ze = Y.mediaController,
          nt = Y.mediaPlayerModel,
          vt = Y.mimeType,
          ce = Y.playbackController,
          Ve = Y.segmentBlacklistController,
          je = Y.settings,
          it = Y.streamInfo,
          Qe = Y.textController,
          We = Y.timelineConverter,
          Ke = Y.type;
        function Ie() {
          return it.id;
        }
        function Ue() {
          return Ke;
        }
        function at() {
          (ne = []),
            (Q = null),
            (K = 0),
            (Me = !1),
            (we = !1),
            (_e = !1),
            (Oe = !1),
            pi();
        }
        function ft(zt) {
          return (
            !isNaN(zt) &&
            !isNaN(it.duration) &&
            isFinite(it.duration) &&
            zt >= it.start + it.duration
          );
        }
        function Rt(zt) {
          let zn =
            !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
          if (zt.sender) {
            if (ce.getIsManifestUpdateInProgress()) fn();
            else if (
              (!Q.isText || Qe.isTextEnabled()) &&
              U &&
              zt.representationId &&
              !U.appendInitSegmentFromCache(zt.representationId)
            ) {
              const Rr = se.getCurrentRepresentation();
              if (Rr.range === 0) return void an();
              const vi = q ? q.getInitRequest(Q, Rr) : null;
              vi
                ? he.executeRequest(vi)
                : zn && (le.setInitSegmentRequired(!0), fn());
            }
          }
        }
        function an(zt) {
          let zn =
            !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
          if (ce.getIsManifestUpdateInProgress() || U.getIsPruningInProgress())
            return void fn();
          let Rr = (function () {
            let na;
            if (isNaN(K) || (Ue() === P.default.TEXT && !Qe.isTextEnabled()))
              return null;
            if (q) {
              const Ri = Jt();
              na = Me
                ? q.getSegmentRequestForTime(Q, Ri, K)
                : we
                ? q.repeatSegmentRequest(Q, Ri)
                : q.getNextSegmentRequest(Q, Ri);
            }
            return na;
          })();
          var vi;
          Rr
            ? ((Me = !1),
              (we = !1),
              (vi = Rr),
              isNaN(vi.startTime + vi.duration) ||
                (K = vi.startTime + vi.duration),
              (vi.delayLoadingTime =
                new Date().getTime() + le.getTimeToLoadDelay()),
              le.setTimeToLoadDelay(0),
              (function (na) {
                let Ri = na.url;
                return (
                  na.range && (Ri = Ri.concat("_", na.range)), Ve.contains(Ri)
                );
              })(vi)
                ? (ve.warn(
                    `Fragment request url ${vi.url} for stream id ${it.id} and media type ${Ke} is on the ignore list and will be skipped`
                  ),
                  fn())
                : (ve.debug(
                    `Next fragment request url for stream id ${it.id} and media type ${Ke} is ${vi.url} with request range ${vi.range}`
                  ),
                  he.executeRequest(vi)))
            : (function (na) {
                const Ri = se.getCurrentRepresentation();
                try {
                  if (
                    je.get().streaming.gaps.enableSeekFix &&
                    (Me || ce.getTime() === 0)
                  ) {
                    let Da;
                    if (
                      (fe
                        ? fe &&
                          Ri.segmentInfoType === I.default.SEGMENT_TIMELINE &&
                          (Da = q.getValidTimeAheadOfTargetTime(
                            K,
                            Q,
                            Ri,
                            je.get().streaming.gaps.threshold
                          ))
                        : ((Da = q.getValidTimeAheadOfTargetTime(
                            K,
                            Q,
                            Ri,
                            je.get().streaming.gaps.threshold
                          )),
                          isNaN(Da) &&
                            K >=
                              Ri.adaptation.period.mpd
                                .mediaPresentationDuration -
                                Ri.segmentDuration &&
                            (Da = K - 0.1)),
                      !isNaN(Da) && Da !== K)
                    )
                      return void (ce.isSeeking() || ce.getTime() === 0
                        ? (ve.warn(
                            `Adjusting playback time ${Da} because of gap in the manifest. Seeking by ${
                              Da - K
                            }`
                          ),
                          ce.seek(Da, !1, !1))
                        : (ve.warn(
                            `Adjusting buffering time ${Da} because of gap in the manifest. Adjusting time by ${
                              Da - K
                            }`
                          ),
                          kn(Da),
                          na && fn()));
                  }
                } catch (Da) {
                  ve.error(Da);
                }
                tn() || (na && fn());
              })(zn);
        }
        function tn() {
          const zt = se.getCurrentRepresentation(),
            zn = q.isLastSegmentRequested(zt, K);
          if (zn) {
            const Rr = q.getCurrentIndex();
            ve.debug(`Segment requesting for stream ${it.id} has finished`),
              $e.trigger(
                G.default.STREAM_REQUESTING_COMPLETED,
                { segmentIndex: Rr },
                { streamId: it.id, mediaType: Ke }
              ),
              U.segmentRequestingCompleted(Rr),
              Lr();
          }
          return zn;
        }
        function fn() {
          le.startScheduleTimer(
            ce.getLowLatencyModeEnabled()
              ? je.get().streaming.scheduling.lowLatencyTimeout
              : je.get().streaming.scheduling.defaultTimeout
          );
        }
        function nr(zt) {
          Se.addBufferState(Ke, zt.state, le.getBufferTarget()),
            zt.state !== O.BUFFER_EMPTY ||
              ce.isSeeking() ||
              (ve.info("Buffer is empty! Stalling!"),
              Se.pushPlayListTraceMetrics(new Date(), Gn.REBUFFERING_REASON));
        }
        function Bn(zt) {
          he.syncExecutedRequestsWithBufferedRange(
            U.getBuffer().getAllBufferRanges(),
            it.duration
          ),
            zt.quotaExceeded && zt.from > ce.getTime() && kn(zt.from),
            zt.hasEnoughSpaceToAppend &&
              zt.quotaExceeded &&
              le.startScheduleTimer();
        }
        function wr(zt) {
          if (!zt || !zt.lastRequestAppended || !zt.lastRequestAppended.url)
            return;
          let zn = zt.lastRequestAppended.url;
          zt.lastRequestAppended.range &&
            (zn = zn.concat("_", zt.lastRequestAppended.range)),
            ve.warn(`Blacklisting segment with url ${zn}`),
            Ve.add(zn);
        }
        function hr(zt) {
          if (
            (ve.debug(
              `Appended bytes for ${zt.mediaType} and stream id ${zt.streamId}`
            ),
            zt.segmentType === F.HTTPRequest.INIT_SEGMENT_TYPE)
          ) {
            const zn = zt.representationId;
            le.setLastInitializedRepresentationId(zn),
              ve.info(
                "[" + Ke + "] lastInitializedRepresentationId changed to " + zn
              );
          }
          Te && Te.enabled
            ? jt(Te.newRepresentation, Te.oldRepresentation)
            : Oe || le.startScheduleTimer(0);
        }
        function pi() {
          Te = {
            newRepresentation: null,
            oldRepresentation: null,
            enabled: !1,
          };
        }
        function Rn(zt) {
          return new Promise((zn) => {
            if (!se) return Promise.resolve();
            let Rr = null;
            var vi;
            (Rr = zt.newRepresentation
              ? {
                  selectedRepresentation: (vi = zt).newRepresentation,
                  currentMediaInfo: vi.newMediaInfo,
                }
              : Q !== null && qe.areMediaInfosEqual(Q, zt.newMediaInfo)
              ? {
                  currentMediaInfo: zt.newMediaInfo,
                  selectedRepresentation: se.getCurrentRepresentation(),
                }
              : (function (Ri) {
                  let Da = NaN;
                  return (
                    (Da =
                      !je.get().streaming.abr.autoSwitchBitrate[
                        Ri.newMediaInfo.type
                      ] && Ri.previouslySelectedRepresentation
                        ? Ri.previouslySelectedRepresentation.bitrateInKbit
                        : Fe.getInitialBitrateFor(Ke)),
                    {
                      selectedRepresentation:
                        Fe.getOptimalRepresentationForBitrate(
                          Ri.newMediaInfo,
                          Da,
                          !1
                        ),
                      currentMediaInfo: Ri.newMediaInfo,
                    }
                  );
                })(zt)),
              $r(Rr.currentMediaInfo),
              $e.trigger();
            const na = Fe.getPossibleVoRepresentations(Q, !1);
            return se
              .updateData(na, Q.isFragmented, Rr.selectedRepresentation.id)
              .then(() => {
                (function () {
                  const Ri = se.getCurrentRepresentation();
                  U.getIsBufferingCompleted() ||
                    U.updateBufferTimestampOffset(Ri);
                })(),
                  zn();
              })
              .catch((Ri) => {
                ve.error(Ri), zn();
              });
          });
        }
        function $r(zt) {
          qe.areMediaInfosEqual(Q, zt) ||
            $e.trigger(S.default.NEW_TRACK_SELECTED, { value: zt }),
            (Q = zt),
            Fe.handleNewMediaInfo(Q),
            $e.trigger(G.default.MEDIAINFO_UPDATED, {
              mediaType: Ke,
              streamId: it.id,
              currentMediaInfo: Q,
            });
        }
        function ni(zt) {
          const zn = zt.newRepresentation,
            Rr = zt.oldRepresentation;
          var vi, na;
          (zn && Rr) ||
            ve.warn(
              "_handleDifferentSwitchTypes() is missing the target representations"
            ),
            zt.reason && zt.reason.forceReplace
              ? ((vi = zn),
                (na = Rr),
                he.abortRequests(),
                $e.trigger(
                  G.default.BUFFER_REPLACEMENT_STARTED,
                  { mediaType: Ke, streamId: it.id },
                  { mediaType: Ke, streamId: it.id }
                ),
                le.setCheckPlaybackQuality(!1),
                U.prepareForForceReplacementQualitySwitch(vi, na)
                  .then(() => {
                    Fi();
                  })
                  .catch(() => {
                    Fi();
                  }))
              : zt && zt.reason && zt.reason.forceAbandon
              ? (function (Ri, Da) {
                  U.prepareForAbandonQualitySwitch(Ri, Da)
                    .then(() => {
                      Xi();
                    })
                    .catch(() => {
                      Xi();
                    });
                })(zn, Rr)
              : nt.getFastSwitchEnabled()
              ? (function (Ri, Da) {
                  const Fs = ce.getTime();
                  let ya =
                    1.5 *
                    (isNaN(Ri.fragmentDuration) ? 1 : Ri.fragmentDuration);
                  const Hc = he.getRequests({
                    state: $t.FRAGMENT_MODEL_EXECUTED,
                    time: Fs + ya,
                    threshold: 0,
                  })[0];
                  if (Hc && !Q.isText) {
                    const fd = U.getBufferLevel(),
                      pd = Fe.getAbandonmentStateFor(it.id, Ke);
                    Hc.bandwidth < Ri.bandwidth &&
                    fd >= ya &&
                    pd === O.ALLOW_LOAD
                      ? U.prepareForFastQualitySwitch(Ri, Da)
                          .then(() => {
                            Hi(Fs, ya);
                          })
                          .catch(() => {
                            Hi(Fs, ya);
                          })
                      : jt(Ri, Da);
                  } else jt(Ri, Da);
                })(zn, Rr)
              : jt(zn, Rr),
            Se.pushPlayListTraceMetrics(
              new Date(),
              Gn.REPRESENTATION_SWITCH_STOP_REASON
            ),
            Se.createPlaylistTraceMetrics(
              zn.id,
              1e3 * ce.getTime(),
              ce.getPlaybackRate()
            );
        }
        function Fi() {
          gn(), pi(), (_e = !1);
        }
        function Xi() {
          he.abortRequests(),
            (we = !0),
            le.setCheckPlaybackQuality(!1),
            le.startScheduleTimer(),
            (_e = !1);
        }
        function Hi(zt, zn) {
          he.abortRequests(),
            kn(zt + zn),
            le.setCheckPlaybackQuality(!1),
            le.startScheduleTimer(),
            (_e = !1);
        }
        function jt(zt, zn) {
          const Rr = he.getRequests({ state: $t.FRAGMENT_MODEL_LOADING });
          if (Rr && Rr.length > 0)
            return (
              ve.debug(
                "Preparing for default quality switch: Waiting for ongoing segment request to be finished before applying switch."
              ),
              (Te.newRepresentation = zt),
              (Te.oldRepresentation = zn),
              void (Te.enabled = !0)
            );
          U.prepareForDefaultQualitySwitch(zt, zn)
            .then(() => {
              An();
            })
            .catch(() => {
              An();
            });
        }
        function An() {
          le.setCheckPlaybackQuality(!1),
            Q.segmentAlignment || Q.subSegmentAlignment
              ? le.startScheduleTimer()
              : ct(),
            pi(),
            (_e = !1);
        }
        function pn(zt) {
          ve.info(
            "onFragmentLoadingAbandoned request: " +
              zt.request.url +
              " has been aborted"
          ),
            ce.isSeeking() ||
              le.getSwitchTrack() ||
              _e ||
              (ve.info(
                "onFragmentLoadingAbandoned request: " +
                  zt.request.url +
                  " has to be downloaded again, origin is not seeking process or switch track call"
              ),
              zt.request && zt.request.isInitializationRequest()
                ? le.setInitSegmentRequired(!0)
                : kn(zt.request.startTime + zt.request.duration / 2),
              le.startScheduleTimer(0));
        }
        function Mn(zt) {
          var zn;
          ve.info(
            "OnFragmentLoadingCompleted for stream id " +
              it.id +
              " and media type " +
              Ke +
              " - Url:",
            zt.request ? zt.request.url : "undefined",
            zt.request.range ? ", Range:" + zt.request.range : ""
          ),
            Q.isText && le.startScheduleTimer(0),
            zt.error &&
              zt.request.serviceLocation &&
              ((zn = zt),
              ve.info("Fragment loading completed with an error"),
              zn &&
                zn.request &&
                zn.request.type &&
                (zn.request.type === F.HTTPRequest.INIT_SEGMENT_TYPE
                  ? Rt(
                      {
                        representationId: zn.request.representation.id,
                        sender: {},
                      },
                      !1
                    )
                  : zn.request.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE &&
                    (kn(zn.request.startTime + zn.request.duration / 2),
                    an({}, !1))));
        }
        function Zt() {
          kn(ce.getTime()), fr().startScheduleTimer();
        }
        function Fn(zt) {
          const zn = zt.currentTrackInfo;
          if (!zn) return;
          const Rr = ne.find(
            (vi) => vi.index === zn.index && vi.lang === zn.lang
          );
          Rr &&
            Rn(new cr({ newMediaInfo: Rr })).then(() => {
              U.setIsBufferingCompleted(!1),
                kn(ce.getTime()),
                le.setInitSegmentRequired(!0),
                le.startScheduleTimer();
            });
        }
        function Hn(zt) {
          kn(zt.quotaExceededTime), Lr();
        }
        function Sr() {
          return U ? U.getBuffer() : null;
        }
        function fr() {
          return le;
        }
        function Lr() {
          le && le.clearScheduleTimer();
        }
        function Jt() {
          let zt,
            zn =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : NaN;
          return (
            isNaN(zn)
              ? (zt = se ? se.getCurrentRepresentation() : null)
              : ((0, Wt.checkInteger)(zn),
                (zt = se ? se.getRepresentationById(zn) : null)),
            zt
          );
        }
        function Cn() {
          return !!U && U.getIsBufferingCompleted();
        }
        function rr(zt) {
          if (!je.get().streaming.enableManifestTimescaleMismatchFix) return;
          const zn = zt.chunk,
            Rr = zn.bytes,
            vi = Jt(zn.representation.id);
          vi && (vi.timescale = Re.getMediaTimescaleFromMoov(Rr));
        }
        function Er(zt) {
          const zn = zt.chunk,
            Rr = zn.bytes,
            vi = Jt(zn.representation.id);
          if (vi) {
            let na;
            if (
              je.get().streaming.parseInbandPrft &&
              zt.request.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE
            ) {
              na = na || Re.parse(Rr);
              const Fs = (function (ya, Hc) {
                const fd = ya.getBoxes("prft"),
                  pd = [];
                return (
                  fd.forEach((M_) => {
                    pd.push(
                      (function (dp, ic) {
                        let Xc = "unknown";
                        switch (dp.flags) {
                          case 0:
                            Xc = I.default.PRODUCER_REFERENCE_TIME_TYPE.ENCODER;
                            break;
                          case 16:
                            Xc =
                              I.default.PRODUCER_REFERENCE_TIME_TYPE
                                .APPLICATION;
                            break;
                          case 24:
                            Xc =
                              I.default.PRODUCER_REFERENCE_TIME_TYPE.CAPTURED;
                        }
                        let Ud =
                          1e3 * dp.ntp_timestamp_sec +
                          (dp.ntp_timestamp_frac / 2 ** 32) * 1e3;
                        return (
                          (Ud = qn(Ge).getInstance().ntpToUTC(Ud)),
                          {
                            type: Xc,
                            ntpTimestamp: Ud,
                            mediaTime: dp.media_time / ic,
                          }
                        );
                      })(M_, Hc)
                    );
                  }),
                  pd
                );
              })(na, vi.timescale);
              Fs &&
                Fs.length &&
                $e.trigger(
                  S.default.INBAND_PRFT,
                  { data: Fs },
                  { streamId: it.id, mediaType: Ke }
                );
            }
            const Ri = qe.getEventsFor(vi.mediaInfo, null, it),
              Da = qe.getEventsFor(vi, vi, it);
            if ((Ri && Ri.length > 0) || (Da && Da.length > 0)) {
              const Fs = zt.request;
              na = na || Re.parse(Rr);
              const ya = (function (Hc, fd, pd, M_) {
                try {
                  const dp = {},
                    ic = [],
                    Xc = pd.concat(M_);
                  for (let _c = 0, bu = Xc.length; _c < bu; _c++)
                    dp[Xc[_c].schemeIdUri + "/" + Xc[_c].value] = Xc[_c];
                  const Ud = Hc.getBoxes("emsg");
                  if (!Ud || Ud.length === 0) return ic;
                  const ly = Hc.getBox("sidx"),
                    pA =
                      !ly ||
                      isNaN(ly.earliest_presentation_time) ||
                      isNaN(ly.timescale)
                        ? fd && !isNaN(fd.mediaStartTime)
                          ? fd.mediaStartTime
                          : 0
                        : ly.earliest_presentation_time / ly.timescale,
                    Tg = Math.max(pA, 0),
                    uy = se.getCurrentRepresentation();
                  for (let _c = 0, bu = Ud.length; _c < bu; _c++) {
                    const nf = qe.getEvent(Ud[_c], dp, Tg, uy);
                    nf && ic.push(nf);
                  }
                  return ic;
                } catch {
                  return [];
                }
              })(na, Fs, Ri, Da);
              $e.trigger(
                G.default.INBAND_EVENTS,
                { events: ya },
                { streamId: it.id }
              );
            }
          }
        }
        function gn() {
          const zt = ce.getTime();
          je.get().streaming.buffer.flushBufferAtTrackSwitch &&
            ce.seek(zt + 0.001, !1, !0),
            kn(zt),
            U.setSeekTarget(zt),
            le.startScheduleTimer();
        }
        function ct() {
          const zt = ce.getTime(),
            zn = U.getContinuousBufferTimeForTargetTime(zt);
          kn(isNaN(zn) ? zt : zn), le.startScheduleTimer();
        }
        function Vt(zt) {
          zt && !isNaN(zt.time) && (kn(zt.time), U.setSeekTarget(zt.time));
        }
        function kn(zt) {
          (K = zt), (Me = !0);
        }
        return (
          (ee = {
            checkAndHandleCompletedBuffering: tn,
            clearScheduleTimer: Lr,
            createBufferSinks: function (zt, zn) {
              const Rr = Sr();
              return Rr
                ? Promise.resolve(Rr)
                : U
                ? U.createBufferSink(Q, zt, zn)
                : Promise.resolve(null);
            },
            dischargePreBuffer: function () {
              U.dischargePreBuffer();
            },
            finalisePlayList: function (zt, zn) {
              Se.pushPlayListTraceMetrics(zt, zn);
            },
            getAllMediaInfos: function () {
              return ne;
            },
            getBuffer: Sr,
            getBufferController: function () {
              return U;
            },
            getBufferLevel: function () {
              return U ? U.getBufferLevel() : 0;
            },
            getFragmentModel: function () {
              return he;
            },
            getMediaInfo: function () {
              return Q;
            },
            getMediaSource: function () {
              return U.getMediaSource();
            },
            getRepresentation: Jt,
            getRepresentationController: function () {
              return se;
            },
            getScheduleController: fr,
            getStreamId: Ie,
            getStreamInfo: function () {
              return it;
            },
            getType: Ue,
            initialize: function (zt, zn, Rr) {
              (me = st(Ge).create({
                events: G.default,
                eventBus: $e,
                streamInfo: it,
                timelineConverter: We,
                dashConstants: I.default,
                segmentBaseController: Y.segmentBaseController,
                type: Ke,
              })),
                (q = un(Ge).create({
                  streamInfo: it,
                  type: Ke,
                  timelineConverter: We,
                  dashMetrics: Se,
                  mediaPlayerModel: nt,
                  baseURLController: Y.baseURLController,
                  errHandler: ke,
                  segmentsController: me,
                  settings: je,
                  boxParser: Re,
                  events: G.default,
                  eventBus: $e,
                  errors: de,
                  debug: (0, E.default)(Ge).getInstance(),
                  dashConstants: I.default,
                  constants: P.default,
                  urlUtils: ar(Ge).getInstance(),
                })),
                (fe = it.manifestInfo.isDynamic),
                q.initialize(fe),
                Fe.registerStreamType(Ke, ee),
                (se = Mt(Ge).create({
                  streamInfo: it,
                  type: Ke,
                  abrController: Fe,
                  dashMetrics: Se,
                  playbackController: ce,
                  timelineConverter: We,
                  dashConstants: I.default,
                  events: G.default,
                  eventBus: $e,
                  errors: de,
                  isDynamic: fe,
                  adapter: qe,
                  segmentsController: me,
                })),
                (U = (function (vi, na) {
                  let Ri = null;
                  return vi
                    ? ((Ri =
                        vi !== P.default.TEXT || na
                          ? lt(Ge).create({
                              abrController: Fe,
                              capabilities: be,
                              errHandler: ke,
                              fragmentModel: he,
                              manifestModel: rt,
                              mediaController: Ze,
                              mediaPlayerModel: nt,
                              playbackController: ce,
                              representationController: se,
                              settings: je,
                              streamInfo: it,
                              textController: Qe,
                              type: vi,
                            })
                          : Lt(Ge).create({
                              errHandler: ke,
                              fragmentModel: he,
                              mimeType: vt,
                              settings: je,
                              streamInfo: it,
                              textController: Qe,
                              type: vi,
                            })),
                      Ri)
                    : (ke.error(
                        new ot.default(
                          de.MEDIASOURCE_TYPE_UNSUPPORTED_CODE,
                          de.MEDIASOURCE_TYPE_UNSUPPORTED_MESSAGE +
                            "not properly defined"
                        )
                      ),
                      null);
                })(Ke, Rr)),
                U && U.initialize(zt),
                (le = Ln(Ge).create({
                  streamInfo: it,
                  type: Ke,
                  mimeType: vt,
                  adapter: qe,
                  dashMetrics: Se,
                  mediaPlayerModel: nt,
                  fragmentModel: he,
                  abrController: Fe,
                  playbackController: ce,
                  textController: Qe,
                  mediaController: Ze,
                  bufferController: U,
                  representationController: se,
                  settings: je,
                })),
                le.initialize(zn),
                (K = 0),
                (Me = !1),
                (we = !1);
            },
            isBufferingCompleted: Cn,
            prepareInnerPeriodPlaybackSeeking: function (zt) {
              return new Promise((zn) => {
                if (U.hasBufferAtTime(zt.seekTime))
                  return (
                    U.pruneBuffer(),
                    ft(U.getContinuousBufferTimeForTargetTime(zt.seekTime)) &&
                      U.setIsBufferingCompleted(!0),
                    void zn()
                  );
                Lr(),
                  he.abortRequests(),
                  U.prepareForPlaybackSeek()
                    .then(() => {
                      const Rr = U.getAllRangesWithSafetyFactor(zt.seekTime);
                      return U.clearBuffers(Rr);
                    })
                    .then(() => {
                      const Rr = U.getContinuousBufferTimeForTargetTime(
                        zt.seekTime
                      );
                      if (ft(Rr)) U.setIsBufferingCompleted(!0), zn();
                      else {
                        const vi = isNaN(Rr) ? zt.seekTime : Rr;
                        kn(vi), U.setSeekTarget(vi);
                        const na = [];
                        na.push(U.updateAppendWindow());
                        const Ri = Jt();
                        na.push(U.updateBufferTimestampOffset(Ri)),
                          Promise.all(na).then(() => {
                            le.setInitSegmentRequired(!0),
                              le.setCheckPlaybackQuality(!1),
                              le.startScheduleTimer(),
                              zn();
                          });
                      }
                    })
                    .catch((Rr) => {
                      ve.error(Rr);
                    });
              });
            },
            prepareOuterPeriodPlaybackSeeking: function () {
              return new Promise((zt, zn) => {
                try {
                  Lr(),
                    he.abortRequests(),
                    U.prepareForPlaybackSeek()
                      .then(() => U.pruneAllSafely())
                      .then(() => {
                        zt();
                      });
                } catch (Rr) {
                  zn(Rr);
                }
              });
            },
            prepareQualityChange: function (zt) {
              zt.newRepresentation &&
                (Te &&
                  Te.enabled &&
                  ve.warn(
                    `Canceling queued representation switch to ${Te.newRepresentation.id} for ${Ke}`
                  ),
                zt.isAdaptationSetSwitch
                  ? (ve.debug(
                      `Preparing quality switch to different AdaptationSet for type ${Ke}`
                    ),
                    (function (zn) {
                      const Rr = zn.newRepresentation;
                      (_e = !0), Lr(), le.setSwitchTrack(!0);
                      const vi = Rr.mediaInfo;
                      $r(vi),
                        Rn(
                          new cr({ newMediaInfo: vi, newRepresentation: Rr })
                        ).then(() => {
                          ni(zn);
                        });
                    })(zt))
                  : (ve.debug(
                      `Preparing quality within the same AdaptationSet for type ${Ke}`
                    ),
                    (function (zn) {
                      const Rr = zn.newRepresentation;
                      (_e = !0), Lr(), se.prepareQualityChange(Rr), ni(zn);
                    })(zt)));
            },
            prepareTrackSwitch: function (zt) {
              let zn =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
              return new Promise((Rr) => {
                ve.debug(`Preparing track switch for type ${Ke}`);
                const vi =
                  Ke === P.default.TEXT ||
                  zn ||
                  (je.get().streaming.trackSwitchMode[Ke] ===
                    P.default.TRACK_SWITCH_MODE_ALWAYS_REPLACE &&
                    ce.getTimeToStreamEnd(it) >
                      je.get().streaming.buffer.stallThreshold);
                var na;
                U.getIsBufferingCompleted() && !vi
                  ? ((na = zt),
                    new Promise((Ri) => {
                      const Da = se.getCurrentRepresentation();
                      U.prepareForNonReplacementTrackSwitch(Da, na)
                        .then(() => {
                          $e.trigger(
                            G.default.BUFFERING_COMPLETED,
                            {},
                            { streamId: it.id, mediaType: Ke }
                          ),
                            Ri();
                        })
                        .catch(() => {
                          $e.trigger(
                            G.default.BUFFERING_COMPLETED,
                            {},
                            { streamId: it.id, mediaType: Ke }
                          ),
                            Ri();
                        });
                    })).then(() => {
                      Rr();
                    })
                  : (le.setSwitchTrack(!0),
                    vi
                      ? (function (Ri) {
                          return new Promise((Da) => {
                            $e.trigger(
                              G.default.BUFFER_REPLACEMENT_STARTED,
                              { mediaType: Ke, streamId: it.id },
                              { mediaType: Ke, streamId: it.id }
                            ),
                              he.abortRequests();
                            const Fs = Jt();
                            U.prepareForReplacementTrackSwitch(Fs, Ri)
                              .then(() => {
                                gn(), Da();
                              })
                              .catch(() => {
                                gn(), Da();
                              });
                          });
                        })(zt).then(() => {
                          Rr();
                        })
                      : (function (Ri) {
                          return new Promise((Da) => {
                            const Fs = () => {
                              const ya = he.getRequests({
                                state: $t.FRAGMENT_MODEL_LOADING,
                              });
                              if (ya && ya.length !== 0)
                                $e.once(
                                  S.default.FRAGMENT_LOADING_COMPLETED,
                                  Fs,
                                  ee
                                );
                              else {
                                const Hc = Jt();
                                U.prepareForNonReplacementTrackSwitch(Hc, Ri)
                                  .then(() => {
                                    ct(), Da();
                                  })
                                  .catch((fd) => {
                                    ve.error(fd), ct(), Da();
                                  });
                              }
                            };
                            Fs();
                          });
                        })(zt).then(() => {
                          Rr();
                        }));
              });
            },
            probeNextRequest: function () {
              const zt = Jt();
              return q.getNextSegmentRequestIdempotent(Q, zt);
            },
            reset: function (zt, zn) {
              q && q.reset(),
                U && (U.reset(zt, zn), (U = null)),
                le && (le.reset(), (le = null)),
                se && (se.reset(), (se = null)),
                me && (me = null),
                Fe && Fe.unRegisterStreamType(Ie(), Ke),
                $e.off(G.default.INIT_FRAGMENT_NEEDED, Rt, ee),
                $e.off(G.default.MEDIA_FRAGMENT_NEEDED, an, ee),
                $e.off(G.default.INIT_FRAGMENT_LOADED, rr, ee),
                $e.off(G.default.MEDIA_FRAGMENT_LOADED, Er, ee),
                $e.off(G.default.BUFFER_LEVEL_STATE_CHANGED, nr, ee),
                $e.off(G.default.BUFFER_CLEARED, Bn, ee),
                $e.off(G.default.SEEK_TARGET, Vt, ee),
                $e.off(G.default.FRAGMENT_LOADING_ABANDONED, pn, ee),
                $e.off(G.default.FRAGMENT_LOADING_COMPLETED, Mn, ee),
                $e.off(G.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED, Zt, ee),
                $e.off(G.default.SET_NON_FRAGMENTED_TEXT, Fn, ee),
                $e.off(G.default.QUOTA_EXCEEDED, Hn, ee),
                $e.off(G.default.SOURCE_BUFFER_ERROR, wr, ee),
                $e.off(G.default.BYTES_APPENDED_END_FRAGMENT, hr, ee),
                at(),
                (Ke = null),
                (it = null);
            },
            selectMediaInfo: Rn,
            setExplicitBufferingTime: kn,
            setMediaInfoArray: function (zt) {
              ne = zt;
            },
            setMediaSource: function (zt) {
              return U.setMediaSource(zt, Q);
            },
            setTrackSwitchInProgress: function (zt) {
              Oe = zt;
            },
            updateStreamInfo: function (zt) {
              return (
                (it = zt), Cn() ? Promise.resolve() : U.updateAppendWindow()
              );
            },
          }),
          (ve = (0, E.default)(Ge).getInstance().getLogger(ee)),
          at(),
          $e.on(G.default.INIT_FRAGMENT_NEEDED, Rt, ee),
          $e.on(G.default.MEDIA_FRAGMENT_NEEDED, an, ee),
          $e.on(G.default.INIT_FRAGMENT_LOADED, rr, ee),
          $e.on(G.default.MEDIA_FRAGMENT_LOADED, Er, ee),
          $e.on(G.default.BUFFER_LEVEL_STATE_CHANGED, nr, ee),
          $e.on(G.default.BUFFER_CLEARED, Bn, ee),
          $e.on(G.default.SEEK_TARGET, Vt, ee),
          $e.on(G.default.FRAGMENT_LOADING_ABANDONED, pn, ee),
          $e.on(G.default.FRAGMENT_LOADING_COMPLETED, Mn, ee),
          $e.on(G.default.QUOTA_EXCEEDED, Hn, ee),
          $e.on(G.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED, Zt, ee),
          $e.on(G.default.SET_NON_FRAGMENTED_TEXT, Fn, ee),
          $e.on(G.default.SOURCE_BUFFER_ERROR, wr, ee),
          $e.on(G.default.BYTES_APPENDED_END_FRAGMENT, hr, ee),
          ee
        );
      }
      Ui.__dashjs_factory_name = "StreamProcessor";
      var Je = H.default.getClassFactory(Ui),
        sn = n(7263);
      function Ye() {
        let Y, U;
        function K() {
          U &&
            ((U.onloadend = U.onerror = U.onprogress = U.onload = null),
            U.abort(),
            (U = null));
        }
        return (
          (Y = {
            load: function (Q, q) {
              if (
                ((U = null),
                (U = new XMLHttpRequest()),
                U.open(Q.method, Q.url, !0),
                Q.responseType && (U.responseType = Q.responseType),
                Q.headers)
              )
                for (let ee in Q.headers) {
                  let fe = Q.headers[ee];
                  fe && U.setRequestHeader(ee, fe);
                }
              return (
                (U.withCredentials = Q.credentials === "include"),
                (U.timeout = Q.timeout),
                (U.onload = function () {
                  (q.url = this.responseURL),
                    (q.status = this.status),
                    (q.statusText = this.statusText),
                    (q.headers = sn.default.parseHttpHeaders(
                      this.getAllResponseHeaders()
                    )),
                    (q.data = this.response);
                }),
                (U.onloadend = Q.customData.onloadend),
                (U.onprogress = Q.customData.onprogress),
                (U.onabort = Q.customData.onabort),
                (U.ontimeout = Q.customData.ontimeout),
                U.send(),
                (Q.customData.abort = K.bind(this)),
                !0
              );
            },
            abort: K,
            getXhr: function () {
              return U;
            },
            reset: function () {
              K(), (Y = null);
            },
            resetInitialSettings: function () {
              K();
            },
          }),
          Y
        );
      }
      Ye.__dashjs_factory_name = "XHRLoader";
      var Ct = H.default.getClassFactory(Ye);
      function At() {
        const Y = this.context,
          U = (0, ue.default)(Y).getInstance();
        let K, Q, q;
        function ee(se, le, me) {
          se.customData.reader
            .read()
            .then(me)
            .catch(function () {
              fe(se);
            });
        }
        function fe(se) {
          se.customData.onloadend && se.customData.onloadend();
        }
        function ve() {
          return typeof performance < "u" &&
            typeof performance.now == "function"
            ? performance.now()
            : Date.now();
        }
        function ne() {
          if (this.customData.abortController)
            this.customData.abortController.abort();
          else if (this.customData.reader)
            try {
              this.customData.reader.cancel(), this.onabort();
            } catch {}
        }
        function Te(se, le) {
          try {
            if (
              (se = se.filter((me) => me.bytes > le / 4 / se.length)).length > 1
            ) {
              let me = 0;
              const we =
                (se[se.length - 1].timestamp - se[0].timestamp) / se.length;
              return (
                se.forEach((Me, Oe) => {
                  const Ge = se[Oe + 1];
                  if (Ge) {
                    const $e = Ge.timestamp - Me.timestamp;
                    me += $e < we ? $e : 0;
                  }
                }),
                me
              );
            }
            return null;
          } catch {
            return null;
          }
        }
        function _e(se, le) {
          return (8 * se) / le;
        }
        return (
          (q = (0, E.default)(Y).getInstance().getLogger(K)),
          (K = {
            abort: ne,
            calculateDownloadedTime: Te,
            load: function (se, le) {
              const me = (function (Fe) {
                  const qe = new Headers();
                  if (Fe.headers)
                    for (let Re in Fe.headers) {
                      let be = Fe.headers[Re];
                      be && qe.append(Re, be);
                    }
                  return qe;
                })(se),
                we = (function (Fe) {
                  let qe;
                  return (
                    typeof window.AbortController == "function" &&
                      ((qe = new AbortController()),
                      (Fe.customData.abortController = qe),
                      (qe.signal.onabort = Fe.customData.onabort)),
                    (Fe.customData.abort = ne.bind(Fe)),
                    qe
                  );
                })(se),
                Me =
                  ((Oe = se),
                  (Ge = me),
                  ($e = we),
                  new Request(Oe.url, {
                    method: Oe.method,
                    headers: Ge,
                    credentials: Oe.credentials,
                    signal: $e ? $e.signal : void 0,
                  }));
              var Oe, Ge, $e;
              fetch(Me)
                .then((Fe) => {
                  (function (qe, Re, be) {
                    (function (it, Qe) {
                      (it.status = Qe.status),
                        (it.statusText = Qe.statusText),
                        (it.url = Qe.url);
                      const We = {};
                      for (const Ke of Qe.headers.keys())
                        We[Ke] = Qe.headers.get(Ke);
                      it.headers = We;
                    })(be, qe),
                      qe.ok || Re.customData.onloadend();
                    let Se = 0,
                      ke = !1,
                      he = new Uint8Array(),
                      rt = 0;
                    Re.customData.reader = qe.body.getReader();
                    let Ze = [],
                      nt = [],
                      vt = [],
                      ce = !0;
                    const Ve =
                        U.get().streaming.abr.throughput
                          .lowLatencyDownloadTimeCalculationMode,
                      je = (it) => {
                        let { value: Qe, done: We } = it;
                        We
                          ? (function () {
                              if (he) {
                                const Ke = (function () {
                                  let Ie = null;
                                  return (
                                    Ve ===
                                    P.default
                                      .LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE
                                      .MOOF_PARSING
                                      ? (Ie = (function () {
                                          const Ue = (function (at, ft) {
                                            try {
                                              let Rt, an;
                                              if (
                                                ((Rt = at.slice(0, -1)),
                                                (an = ft.slice(0, -1)),
                                                Rt.length !== an.length &&
                                                  q.warn(
                                                    `[FetchLoader] Moof and Mdat data arrays have different lengths. Moof: ${Rt.length}, Mdat: ${an.length}`
                                                  ),
                                                Rt.length <= 1)
                                              )
                                                return null;
                                              let tn = [],
                                                fn = 0,
                                                nr = 0;
                                              for (
                                                let Bn = 0;
                                                Bn < Rt.length;
                                                Bn++
                                              )
                                                if (Rt[Bn] && an[Bn]) {
                                                  let wr =
                                                    an[Bn].timestamp -
                                                    Rt[Bn].timestamp;
                                                  if (wr > 1) {
                                                    const hr = _e(
                                                      an[Bn].bytes,
                                                      wr
                                                    );
                                                    tn.push(hr), (nr = 0);
                                                  } else {
                                                    nr === 0 &&
                                                      ((nr = Rt[Bn].timestamp),
                                                      (fn = 0));
                                                    let hr =
                                                      an[Bn].timestamp - nr;
                                                    if (hr > 1) {
                                                      fn += an[Bn].bytes;
                                                      const pi = _e(fn, hr);
                                                      tn.push(pi), (nr = 0);
                                                    } else fn += an[Bn].bytes;
                                                  }
                                                }
                                              return tn.length > 0
                                                ? tn.reduce(
                                                    (Bn, wr) => Bn + wr,
                                                    0
                                                  ) / tn.length
                                                : null;
                                            } catch {
                                              return null;
                                            }
                                          })(nt, vt);
                                          return Ue ? (8 * Se) / Ue : null;
                                        })())
                                      : Ve ===
                                          P.default
                                            .LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE
                                            .DOWNLOADED_DATA &&
                                        (Ie = Te(Ze, Se)),
                                    Ie
                                  );
                                })();
                                Re.customData.onprogress({
                                  loaded: Se,
                                  total: Se,
                                  lengthComputable: !0,
                                  time: Ke,
                                }),
                                  (be.data = he.buffer);
                              }
                              Re.customData.onloadend();
                            })()
                          : (Qe &&
                              Qe.length > 0 &&
                              (function (Ke) {
                                (he = (function (at, ft) {
                                  if (at.length === 0) return ft;
                                  const Rt = new Uint8Array(
                                    at.length + ft.length
                                  );
                                  return Rt.set(at), Rt.set(ft, at.length), Rt;
                                })(he, Ke)),
                                  (Se += Ke.length),
                                  Ze.push({
                                    timestamp: ve(),
                                    bytes: Ke.length,
                                  }),
                                  Ve ===
                                    P.default
                                      .LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE
                                      .MOOF_PARSING &&
                                    ce &&
                                    Q.findLastTopIsoBoxCompleted(
                                      ["moof"],
                                      he,
                                      rt
                                    ).found &&
                                    ((ce = !1), nt.push({ timestamp: ve() }));
                                const Ie = Q.findLastTopIsoBoxCompleted(
                                  ["moov", "mdat"],
                                  he,
                                  rt
                                );
                                var Ue;
                                Ie.found
                                  ? (function (at) {
                                      const ft = (function (Rt) {
                                        let an;
                                        return (
                                          Rt === he.length
                                            ? ((an = he),
                                              (he = new Uint8Array()))
                                            : ((an = new Uint8Array(
                                                he.subarray(0, Rt)
                                              )),
                                              (he = he.subarray(Rt))),
                                          an
                                        );
                                      })(
                                        at.startOffsetOfLastFoundTargetBox +
                                          at.sizeOfLastFoundTargetBox
                                      );
                                      Ve !==
                                        P.default
                                          .LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE
                                          .MOOF_PARSING ||
                                        ce ||
                                        ((ce = !0),
                                        vt.push({
                                          timestamp: ve(),
                                          bytes: ft.length,
                                        })),
                                        Re.customData.onprogress({
                                          data: ft.buffer,
                                          lengthComputable: !1,
                                          noTrace: !0,
                                        }),
                                        (rt = 0);
                                    })(Ie)
                                  : ((rt =
                                      (Ue = Ie).startOffsetOfLastCompletedBox +
                                      Ue.sizeOfLastCompletedBox),
                                    ke ||
                                      (Re.customData.onprogress({
                                        lengthComputable: !1,
                                        noTrace: !0,
                                      }),
                                      (ke = !0)));
                              })(Qe),
                            ee(Re, 0, je));
                      };
                    ee(Re, 0, je);
                  })(Fe, se, le);
                })
                .catch(() => {
                  fe(se);
                });
            },
            reset: function () {},
            setConfig: function (se) {
              Q = se.boxParser;
            },
          }),
          K
        );
      }
      At.__dashjs_factory_name = "FetchLoader";
      var Pn = H.default.getClassFactory(At),
        Xn = n(913),
        wn = class {
          constructor() {
            (this.period = null), (this.index = -1), (this.type = null);
          }
        };
      class Vn {
        constructor(U, K, Q, q) {
          (this.url = U || ""),
            (this.serviceLocation = K || U || ""),
            (this.dvbPriority = Q || 1),
            (this.dvbWeight = q || 1),
            (this.availabilityTimeOffset = 0),
            (this.availabilityTimeComplete = !0),
            (this.queryParams = {});
        }
      }
      (Vn.DEFAULT_DVB_PRIORITY = 1), (Vn.DEFAULT_DVB_WEIGHT = 1);
      var Ot = Vn,
        _n = class {
          constructor() {
            (this.schemeIdUri = null), (this.value = null), (this.id = null);
          }
          init(Y) {
            Y &&
              ((this.schemeIdUri = Y.schemeIdUri ? Y.schemeIdUri : null),
              (this.value = Y.value ? Y.value.toString() : null),
              (this.id = Y.id ? Y.id : null),
              Y[I.default.DVB_URL] && (this.dvbUrl = Y[I.default.DVB_URL]),
              Y[I.default.DVB_MIMETYPE] &&
                (this.dvbMimeType = Y[I.default.DVB_MIMETYPE]),
              Y[I.default.DVB_FONTFAMILY] &&
                (this.dvbFontFamily = Y[I.default.DVB_FONTFAMILY]));
          }
          inArray(Y) {
            return (
              !!Y &&
              Y.some(
                (U) =>
                  this.schemeIdUri === U.schemeIdUri &&
                  (this.value
                    ? this.value.toString().match(U.value)
                    : "".match(U.value))
              )
            );
          }
        },
        gr = class extends _n {
          constructor() {
            super(),
              (this.version = null),
              (this.sessionID = null),
              (this.contentID = null),
              (this.mode = null),
              (this.keys = null),
              (this.includeInRequests = null);
          }
          init(Y) {
            super.init(Y),
              Y &&
                ((this.version = Y.version),
                (this.sessionID = Y.sessionID),
                (this.contentID = Y.contentID),
                (this.mode = Y.mode ?? "query"),
                (this.keys = Y.keys ? Y.keys.split(" ") : null),
                (this.includeInRequests = Y.includeInRequests
                  ? Y.includeInRequests.split(" ")
                  : ["segment"]),
                (this.schemeIdUri = Y.schemeIdUri));
          }
        },
        ut = class extends _n {
          constructor() {
            super(),
              (this.ref = null),
              (this.refId = null),
              (this.robustness = null),
              (this.keyId = null),
              (this.cencDefaultKid = null),
              (this.pssh = null),
              (this.pro = null),
              (this.laUrl = null);
          }
          init(Y) {
            super.init(Y),
              Y &&
                ((this.ref = Y.hasOwnProperty(I.default.REF)
                  ? Y[I.default.REF]
                  : null),
                (this.refId = Y.hasOwnProperty(I.default.REF_ID)
                  ? Y[I.default.REF_ID]
                  : null),
                (this.robustness = Y.hasOwnProperty(I.default.ROBUSTNESS)
                  ? Y[I.default.ROBUSTNESS]
                  : null),
                (this.cencDefaultKid = Y.hasOwnProperty(
                  I.default.CENC_DEFAULT_KID
                )
                  ? Y[I.default.CENC_DEFAULT_KID]
                  : null),
                (this.pssh = Y.hasOwnProperty(I.default.PSSH)
                  ? Y[I.default.PSSH]
                  : null),
                (this.pro = Y.hasOwnProperty(I.default.PRO)
                  ? Y[I.default.PRO]
                  : null),
                (this.laUrl = Y.hasOwnProperty(I.default.LA_URL)
                  ? Y[I.default.LA_URL]
                  : Y.hasOwnProperty(I.default.LA_URL_LOWER_CASE)
                  ? Y[I.default.LA_URL_LOWER_CASE]
                  : null));
          }
          mergeAttributesFromReference(Y) {
            [
              "schemeIdUri",
              "value",
              "id",
              "robustness",
              "cencDefaultKid",
              "pro",
              "pssh",
              "laUrl",
            ].forEach((U) => {
              this[U] === null && (this[U] = Y[U]);
            });
          }
        },
        Si = class {
          constructor() {
            (this.type = ""),
              (this.duration = NaN),
              (this.presentationTime = NaN),
              (this.id = NaN),
              (this.messageData = ""),
              (this.eventStream = null),
              (this.presentationTimeDelta = NaN),
              (this.parsedMessageData = null);
          }
        },
        cn = class {
          constructor() {
            (this.adaptionSet = null),
              (this.representation = null),
              (this.period = null),
              (this.timescale = 1),
              (this.value = ""),
              (this.schemeIdUri = ""),
              (this.presentationTimeOffset = 0);
          }
        },
        ir = class {
          constructor(Y, U) {
            (this.url = Y || ""),
              (this.serviceLocation = U || null),
              (this.queryParams = {});
          }
        },
        jr = n(7393);
      class Yr {
        constructor() {
          (this.id = null),
            (this.index = -1),
            (this.duration = NaN),
            (this.start = NaN),
            (this.mpd = null),
            (this.nextPeriodId = null),
            (this.isEncrypted = !1);
        }
      }
      Yr.DEFAULT_ID = "defaultId";
      var Qi = Yr,
        Wa = class {
          constructor() {
            (this.absoluteIndex = NaN),
              (this.adaptation = null),
              (this.availabilityTimeComplete = !0),
              (this.availabilityTimeOffset = 0),
              (this.bandwidth = NaN),
              (this.bitrateInKbit = NaN),
              (this.bitsPerPixel = NaN),
              (this.codecFamily = null),
              (this.codecPrivateData = null),
              (this.codecs = null),
              (this.essentialProperties = []),
              (this.fragmentDuration = null),
              (this.frameRate = null),
              (this.height = NaN),
              (this.id = null),
              (this.indexRange = null),
              (this.initialization = null),
              (this.maxPlayoutRate = NaN),
              (this.mediaFinishedInformation = {
                numberOfSegments: 0,
                mediaTimeOfLastSignaledSegment: NaN,
              }),
              (this.mediaInfo = null),
              (this.mimeType = null),
              (this.mseTimeOffset = NaN),
              (this.pixelsPerSecond = NaN),
              (this.presentationTimeOffset = 0),
              (this.qualityRanking = NaN),
              (this.range = null),
              (this.scanType = null),
              (this.segments = null),
              (this.segmentDuration = NaN),
              (this.segmentInfoType = null),
              (this.supplementalProperties = []),
              (this.startNumber = 1),
              (this.timescale = 1),
              (this.width = NaN);
          }
          hasInitialization() {
            return this.initialization !== null || this.range !== null;
          }
          hasSegments() {
            return (
              this.segmentInfoType !== I.default.BASE_URL &&
              this.segmentInfoType !== I.default.SEGMENT_BASE &&
              !this.indexRange
            );
          }
        },
        Ni = n(5717);
      function ka() {
        let Y, U, K, Q;
        const q = this.context,
          ee = ar(q).getInstance(),
          fe =
            Number.isInteger ||
            function (ce) {
              return (
                typeof ce == "number" && isFinite(ce) && Math.floor(ce) === ce
              );
            };
        function ve(ce, Ve) {
          if (!ce) throw new Error("adaptation is not defined");
          if (!Ve) throw new Error("type is not defined");
          if (ce.Representation && ce.Representation.length) {
            const it = Re(ce.Representation[0]);
            if (
              it &&
              it.some(
                (Qe) =>
                  P.default.THUMBNAILS_SCHEME_ID_URIS.indexOf(Qe.schemeIdUri) >=
                  0
              )
            )
              return Ve === P.default.IMAGE;
          }
          if (ce.ContentComponent && ce.ContentComponent.length > 0) {
            if (ce.ContentComponent.length > 1) return Ve === P.default.MUXED;
            if (ce.ContentComponent[0].contentType === Ve) return !0;
          }
          const je =
            Ve === P.default.TEXT
              ? new RegExp("(ttml|vtt|wvtt|stpp)")
              : new RegExp(Ve);
          if (ce.Representation && ce.Representation.length) {
            const it = ce.Representation[0].codecs;
            if (je.test(it)) return !0;
          }
          if (ce.hasOwnProperty(I.default.MIME_TYPE))
            return je.test(ce.mimeType);
          if (ce.Representation) {
            let it;
            for (let Qe = 0; Qe < ce.Representation.length; Qe++)
              if (
                ((it = ce.Representation[Qe]),
                it.hasOwnProperty(I.default.MIME_TYPE))
              )
                return je.test(it.mimeType);
          }
          return !1;
        }
        function ne(ce) {
          if (!ce) throw new Error("adaptation is not defined");
          if (
            ce.hasOwnProperty(I.default.SEGMENT_TEMPLATE) ||
            ce.hasOwnProperty(I.default.SEGMENT_TIMELINE) ||
            ce.hasOwnProperty(I.default.SEGMENT_LIST) ||
            ce.hasOwnProperty(I.default.SEGMENT_BASE)
          )
            return !0;
          if (ce.Representation && ce.Representation.length > 0) {
            const Ve = ce.Representation[0];
            if (
              Ve.hasOwnProperty(I.default.SEGMENT_TEMPLATE) ||
              Ve.hasOwnProperty(I.default.SEGMENT_TIMELINE) ||
              Ve.hasOwnProperty(I.default.SEGMENT_LIST) ||
              Ve.hasOwnProperty(I.default.SEGMENT_BASE)
            )
              return !0;
          }
          return !1;
        }
        function Te(ce) {
          return ve(ce, P.default.VIDEO);
        }
        function _e(ce) {
          return ve(ce, P.default.TEXT);
        }
        function se(ce) {
          return ve(ce, P.default.IMAGE);
        }
        function le(ce) {
          return (
            ce &&
              ce.Representation &&
              ce.Representation.sort((Ve, je) => Ve.bandwidth - je.bandwidth),
            ce
          );
        }
        function me(ce, Ve) {
          return ce && ce.Period && fe(Ve) && ce.Period[Ve]
            ? ce.Period[Ve].AdaptationSet
            : [];
        }
        function we(ce) {
          return ce && ce.Period ? ce.Period : [];
        }
        function Me(ce) {
          const Ve = Oe(ce);
          return Ve && Ve.length > 0;
        }
        function Oe(ce) {
          let Ve = [];
          if (!ce) return Ve;
          const je = Ge(ce);
          return (
            (Ve = Ve.concat(je)),
            ce.hasOwnProperty(I.default.ADAPTATION_SET) &&
              ce[I.default.ADAPTATION_SET].length > 0 &&
              ce[I.default.ADAPTATION_SET].forEach((it) => {
                const Qe = Ge(it);
                Ve = Ve.concat(Qe);
              }),
            Ve
          );
        }
        function Ge(ce) {
          return ce &&
            ce.hasOwnProperty(I.default.CONTENT_PROTECTION) &&
            ce.ContentProtection.length !== 0
            ? ce[I.default.CONTENT_PROTECTION].map((Ve) => {
                const je = new ut();
                return je.init(Ve), je;
              })
            : [];
        }
        function $e(ce) {
          let Ve = !1;
          return (
            ce &&
              ce.hasOwnProperty("type") &&
              (Ve = ce.type === I.default.DYNAMIC),
            Ve
          );
        }
        function Fe(ce, Ve) {
          return Ve && Ve.hasOwnProperty(ce) && Ve[ce].length
            ? Ve[ce].map((je) => {
                const it = new _n();
                return it.init(je), it;
              })
            : [];
        }
        function qe(ce, Ve) {
          if (!Ve) return [];
          let je = (function (it, Qe) {
            if (!Qe || !Qe.length) return [];
            let We = Qe[0][it] || [];
            return We.length === 0
              ? []
              : Qe.length === 1
              ? We
              : We.filter((Ke) =>
                  Qe.slice(1).every(
                    (Ie) =>
                      Ie.hasOwnProperty(it) &&
                      Ie[it].some(
                        (Ue) =>
                          Ue.schemeIdUri === Ke.schemeIdUri &&
                          Ue.value === Ke.value
                      )
                  )
                );
          })(ce, Ve[I.default.REPRESENTATION]);
          return (
            Ve.hasOwnProperty(ce) && Ve[ce].length && je.push(...Ve[ce]),
            je.map((it) => {
              const Qe = new _n();
              return Qe.init(it), Qe;
            })
          );
        }
        function Re(ce) {
          return Fe(I.default.ESSENTIAL_PROPERTY, ce);
        }
        function be(ce) {
          return Fe(I.default.SUPPLEMENTAL_PROPERTY, ce);
        }
        function Se(ce) {
          if (!ce || !ce.S) return NaN;
          let Ve = ce.S[0],
            je = ce.S[1];
          return Ve.hasOwnProperty("d") ? Ve.d : je.t - Ve.t;
        }
        function ke(ce) {
          const Ve = ce.presentationTimeOffset;
          return ce.adaptation.period.start - Ve;
        }
        function he(ce, Ve) {
          if (!ce) throw new Error("Period cannot be null or undefined");
          let je = Qi.DEFAULT_ID + "_" + Ve;
          return (
            ce.hasOwnProperty(I.default.ID) &&
              ce.id.toString().length > 0 &&
              ce.id !== "__proto__" &&
              (je = ce.id.toString()),
            je
          );
        }
        function rt(ce, Ve, je) {
          const it = [];
          let Qe;
          if (!ce) return it;
          for (Qe = 0; Qe < ce.length; Qe++) {
            const We = new cn();
            if (
              ((We.timescale = 1),
              (We.representation = Ve),
              !ce[Qe].hasOwnProperty(P.default.SCHEME_ID_URI))
            )
              throw new Error("Invalid EventStream. SchemeIdUri has to be set");
            (We.schemeIdUri = ce[Qe].schemeIdUri),
              ce[Qe].hasOwnProperty(I.default.TIMESCALE) &&
                (We.timescale = ce[Qe].timescale),
              ce[Qe].hasOwnProperty(I.default.VALUE) &&
                (We.value = ce[Qe].value),
              it.push(We),
              (We.period = je);
          }
          return it;
        }
        function Ze(ce) {
          const Ve = [],
            je = ce.BaseURL || [ce.baseUri];
          let it = !1;
          return (
            je.some((Qe) => {
              if (Qe) {
                const We = new Ot();
                let Ke = Qe.__text || Qe;
                return (
                  ee.isRelative(Ke) &&
                    ((it = !0),
                    ce.baseUri && (Ke = ee.resolve(Ke, ce.baseUri))),
                  (We.url = Ke),
                  Qe.hasOwnProperty(I.default.SERVICE_LOCATION) &&
                  Qe.serviceLocation.length
                    ? (We.serviceLocation = Qe.serviceLocation)
                    : (We.serviceLocation = Ke),
                  Qe.hasOwnProperty(I.default.DVB_PRIORITY) &&
                    (We.dvbPriority = Qe[I.default.DVB_PRIORITY]),
                  Qe.hasOwnProperty(I.default.DVB_WEIGHT) &&
                    (We.dvbWeight = Qe[I.default.DVB_WEIGHT]),
                  Qe.hasOwnProperty(I.default.AVAILABILITY_TIME_OFFSET) &&
                    (We.availabilityTimeOffset =
                      Qe[I.default.AVAILABILITY_TIME_OFFSET]),
                  Qe.hasOwnProperty(I.default.AVAILABILITY_TIME_COMPLETE) &&
                    (We.availabilityTimeComplete =
                      Qe[I.default.AVAILABILITY_TIME_COMPLETE] !== "false"),
                  Ve.push(We),
                  it
                );
              }
            }),
            Ve
          );
        }
        function nt(ce) {
          const Ve = new (class {
            constructor() {
              (this.defaultServiceLocation = null),
                (this.defaultServiceLocationArray = []),
                (this.queryBeforeStart = !1),
                (this.serverUrl = null),
                (this.clientRequirement = !0);
            }
          })();
          return (
            (Ve.serverUrl = ce.__text),
            ce.hasOwnProperty(I.default.DEFAULT_SERVICE_LOCATION) &&
              ((Ve.defaultServiceLocation =
                ce[I.default.DEFAULT_SERVICE_LOCATION]),
              (Ve.defaultServiceLocationArray =
                Ve.defaultServiceLocation.split(" "))),
            ce.hasOwnProperty(I.default.QUERY_BEFORE_START) &&
              (Ve.queryBeforeStart =
                ce[I.default.QUERY_BEFORE_START].toLowerCase() === "true"),
            ce.hasOwnProperty(I.default.CLIENT_REQUIREMENT) &&
              (Ve.clientRequirement =
                ce[I.default.CLIENT_REQUIREMENT].toLowerCase() !== "false"),
            Ve
          );
        }
        function vt(ce) {
          const Ve = new (class {
            constructor() {
              (this.adaptationSets = null),
                (this.adaptationSetsArray = []),
                (this.cmcdParameters = null),
                (this.serviceLocations = null),
                (this.serviceLocationsArray = []);
            }
          })();
          return (
            ce.hasOwnProperty(I.default.CMCD_PARAMETERS) &&
              ce[I.default.CMCD_PARAMETERS].schemeIdUri ===
                P.default.CTA_5004_2023_SCHEME &&
              ((Ve.cmcdParameters = new gr()),
              Ve.cmcdParameters.init(ce[I.default.CMCD_PARAMETERS])),
            ce.hasOwnProperty(I.default.SERVICE_LOCATIONS) &&
              ce[I.default.SERVICE_LOCATIONS] !== "" &&
              ((Ve.serviceLocations = ce[I.default.SERVICE_LOCATIONS]),
              (Ve.serviceLocationsArray = Ve.serviceLocations
                .toString()
                .split(" "))),
            ce.hasOwnProperty(I.default.ADAPTATION_SETS) &&
              ce[I.default.ADAPTATION_SETS] !== "" &&
              ((Ve.adaptationSets = ce[I.default.ADAPTATION_SETS]),
              (Ve.adaptationSetsArray = Ve.adaptationSets
                .toString()
                .split(" "))),
            Ve
          );
        }
        return (
          (Y = {
            getAccessibilityForAdaptation: function (ce) {
              return ce &&
                ce.hasOwnProperty(I.default.ACCESSIBILITY) &&
                ce[I.default.ACCESSIBILITY].length
                ? ce[I.default.ACCESSIBILITY].map((Ve) => {
                    const je = new _n();
                    return je.init(Ve), je;
                  })
                : [];
            },
            getAdaptationForId: function (ce, Ve, je) {
              const it = me(Ve, je);
              let Qe, We;
              for (Qe = 0, We = it.length; Qe < We; Qe++)
                if (it[Qe].hasOwnProperty(I.default.ID) && it[Qe].id === ce)
                  return it[Qe];
              return null;
            },
            getAdaptationForIndex: function (ce, Ve, je) {
              const it = me(Ve, je);
              return it.length > 0 && fe(ce) ? it[ce] : null;
            },
            getAdaptationsForPeriod: function (ce) {
              const Ve =
                  ce && fe(ce.index) ? ce.mpd.manifest.Period[ce.index] : null,
                je = [];
              let it, Qe, We;
              if (Ve && Ve.AdaptationSet)
                for (We = 0; We < Ve.AdaptationSet.length; We++)
                  (Qe = Ve.AdaptationSet[We]),
                    (it = new wn()),
                    Qe.hasOwnProperty(I.default.ID) && (it.id = Qe.id),
                    (it.index = We),
                    (it.period = ce),
                    ve(Qe, P.default.MUXED)
                      ? (it.type = P.default.MUXED)
                      : ve(Qe, P.default.AUDIO)
                      ? (it.type = P.default.AUDIO)
                      : Te(Qe)
                      ? (it.type = P.default.VIDEO)
                      : _e(Qe)
                      ? (it.type = P.default.TEXT)
                      : se(Qe)
                      ? (it.type = P.default.IMAGE)
                      : U.warn("Unknown Adaptation stream type"),
                    je.push(it);
              return je;
            },
            getAdaptationsForType: function (ce, Ve, je) {
              const it = me(ce, Ve);
              let Qe, We;
              const Ke = [];
              for (Qe = 0, We = it.length; Qe < We; Qe++)
                ve(it[Qe], je) && Ke.push(le(it[Qe]));
              return Ke;
            },
            getAudioChannelConfigurationForAdaptation: function (ce) {
              return ce &&
                ce.hasOwnProperty(I.default.AUDIO_CHANNEL_CONFIGURATION) &&
                ce[I.default.AUDIO_CHANNEL_CONFIGURATION].length
                ? ce[I.default.AUDIO_CHANNEL_CONFIGURATION].map((Ve) => {
                    const je = new _n();
                    return je.init(Ve), je;
                  })
                : [];
            },
            getAudioChannelConfigurationForRepresentation: function (ce) {
              return ce &&
                ce.hasOwnProperty(I.default.AUDIO_CHANNEL_CONFIGURATION) &&
                ce[I.default.AUDIO_CHANNEL_CONFIGURATION].length
                ? ce[I.default.AUDIO_CHANNEL_CONFIGURATION].map((Ve) => {
                    const je = new _n();
                    return je.init(Ve), je;
                  })
                : [];
            },
            getAvailabilityStartTime: function (ce) {
              return ce &&
                ce.hasOwnProperty(I.default.AVAILABILITY_START_TIME) &&
                ce.availabilityStartTime !== null
                ? ce.availabilityStartTime.getTime()
                : null;
            },
            getBandwidth: function (ce) {
              return ce && ce.bandwidth ? ce.bandwidth : NaN;
            },
            getBaseURLsFromElement: Ze,
            getBitrateListForAdaptation: function (ce) {
              const Ve = le(ce);
              return (Ve && Ve.Representation ? Ve.Representation : []).map(
                (je) => ({
                  bandwidth: je.bandwidth,
                  width: je.width || 0,
                  height: je.height || 0,
                  scanType: je.scanType || null,
                  id: je.id || null,
                })
              );
            },
            getCodec: function (ce, Ve, je) {
              let it = null;
              if (ce && ce.Representation && ce.Representation.length > 0) {
                const Qe =
                  fe(Ve) && Ve >= 0 && Ve < ce.Representation.length
                    ? ce.Representation[Ve]
                    : ce.Representation[0];
                Qe &&
                  ((it = Qe.mimeType + ';codecs="' + Qe.codecs + '"'),
                  je &&
                    Qe.width !== void 0 &&
                    (it +=
                      ';width="' + Qe.width + '";height="' + Qe.height + '"'));
              }
              return it && (it = it.replace(/\sprofiles=[^;]*/g, "")), it;
            },
            getCombinedEssentialPropertiesForAdaptationSet: function (ce) {
              return qe(I.default.ESSENTIAL_PROPERTY, ce);
            },
            getCombinedSupplementalPropertiesForAdaptationSet: function (ce) {
              return qe(I.default.SUPPLEMENTAL_PROPERTY, ce);
            },
            getContentProtectionByAdaptation: function (ce) {
              return Ge(ce);
            },
            getContentProtectionByManifest: function (ce) {
              let Ve = [];
              if (!ce) return Ve;
              const je = Ge(ce);
              return (
                (Ve = Ve.concat(je)),
                ce.hasOwnProperty(I.default.PERIOD) &&
                  ce[I.default.PERIOD].length > 0 &&
                  ce[I.default.PERIOD].forEach((it) => {
                    const Qe = Oe(it);
                    Ve = Ve.concat(Qe);
                  }),
                Ve
              );
            },
            getContentProtectionByPeriod: Oe,
            getContentSteering: function (ce) {
              if (ce && ce.hasOwnProperty(I.default.CONTENT_STEERING))
                return nt(ce[I.default.CONTENT_STEERING][0]);
            },
            getDuration: function (ce) {
              let Ve;
              return (
                (Ve =
                  ce && ce.hasOwnProperty(I.default.MEDIA_PRESENTATION_DURATION)
                    ? ce.mediaPresentationDuration
                    : ce && ce.type == "dynamic"
                    ? Number.POSITIVE_INFINITY
                    : Number.MAX_SAFE_INTEGER || Number.MAX_VALUE),
                Ve
              );
            },
            getEssentialPropertiesForAdaptationSet: function (ce) {
              return Fe(I.default.ESSENTIAL_PROPERTY, ce);
            },
            getEssentialPropertiesForRepresentation: Re,
            getEventStreamForAdaptationSet: function (ce, Ve, je) {
              let it, Qe, We;
              return (
                ce &&
                  ce.Period &&
                  Ve &&
                  Ve.period &&
                  fe(Ve.period.index) &&
                  ((Qe = ce.Period[Ve.period.index]),
                  Qe &&
                    Qe.AdaptationSet &&
                    fe(Ve.index) &&
                    ((We = Qe.AdaptationSet[Ve.index]),
                    We && (it = We.InbandEventStream))),
                rt(it, null, je)
              );
            },
            getEventStreamForRepresentation: function (ce, Ve, je) {
              let it, Qe, We, Ke;
              return (
                ce &&
                  ce.Period &&
                  Ve &&
                  Ve.adaptation &&
                  Ve.adaptation.period &&
                  fe(Ve.adaptation.period.index) &&
                  ((Qe = ce.Period[Ve.adaptation.period.index]),
                  Qe &&
                    Qe.AdaptationSet &&
                    fe(Ve.adaptation.index) &&
                    ((We = Qe.AdaptationSet[Ve.adaptation.index]),
                    We &&
                      We.Representation &&
                      fe(Ve.index) &&
                      ((Ke = We.Representation[Ve.index]),
                      Ke && (it = Ke.InbandEventStream)))),
                rt(it, Ve, je)
              );
            },
            getEventsForPeriod: function (ce) {
              const Ve =
                  ce && ce.mpd && ce.mpd.manifest ? ce.mpd.manifest : null,
                je = Ve ? Ve.Period : null,
                it = je && ce && fe(ce.index) ? je[ce.index].EventStream : null,
                Qe = [];
              let We, Ke;
              if (it)
                for (We = 0; We < it.length; We++) {
                  const Ie = new cn();
                  if (
                    ((Ie.period = ce),
                    (Ie.timescale = 1),
                    !it[We].hasOwnProperty(P.default.SCHEME_ID_URI))
                  )
                    throw new Error(
                      "Invalid EventStream. SchemeIdUri has to be set"
                    );
                  for (
                    Ie.schemeIdUri = it[We][P.default.SCHEME_ID_URI],
                      it[We].hasOwnProperty(I.default.TIMESCALE) &&
                        (Ie.timescale = it[We][I.default.TIMESCALE]),
                      it[We].hasOwnProperty(I.default.VALUE) &&
                        (Ie.value = it[We][I.default.VALUE]),
                      it[We].hasOwnProperty(
                        I.default.PRESENTATION_TIME_OFFSET
                      ) &&
                        (Ie.presentationTimeOffset =
                          it[We][I.default.PRESENTATION_TIME_OFFSET]),
                      Ke = 0;
                    it[We].Event && Ke < it[We].Event.length;
                    Ke++
                  ) {
                    const Ue = it[We].Event[Ke],
                      at = new Si();
                    (at.presentationTime = 0),
                      (at.eventStream = Ie),
                      Ue.hasOwnProperty(I.default.PRESENTATION_TIME) &&
                        (at.presentationTime = Ue.presentationTime);
                    const ft = Ie.presentationTimeOffset
                      ? Ie.presentationTimeOffset / Ie.timescale
                      : 0;
                    (at.calculatedPresentationTime =
                      at.presentationTime / Ie.timescale + ce.start - ft),
                      Ue.hasOwnProperty(I.default.DURATION) &&
                        (at.duration = Ue.duration / Ie.timescale),
                      Ue.hasOwnProperty(I.default.ID)
                        ? (at.id = parseInt(Ue.id))
                        : (at.id = null),
                      Ue.Signal && Ue.Signal.Binary
                        ? (at.messageData = Q.decodeArray(
                            Ue.Signal.Binary.toString()
                          ))
                        : (at.messageData =
                            Ue.messageData || Ue.__cdata || Ue.__text),
                      Qe.push(at);
                  }
                }
              return Qe;
            },
            getId: function (ce) {
              return (ce && ce[I.default.ID]) || null;
            },
            getIndexForAdaptation: function (ce, Ve, je) {
              if (!ce) return -1;
              const it = me(Ve, je);
              for (let Qe = 0; Qe < it.length; Qe++)
                if ((0, jr.default)(q).getInstance().areEqual(it[Qe], ce))
                  return Qe;
              return -1;
            },
            getIsDynamic: $e,
            getIsFragmented: ne,
            getIsText: _e,
            getIsTypeOf: ve,
            getLabelsForAdaptation: function (ce) {
              if (!ce || !ce.Label) return [];
              const Ve = [];
              for (let je = 0; je < ce.Label.length; je++)
                Ve.push({
                  lang: ce.Label[je].lang,
                  text: ce.Label[je].__text || ce.Label[je],
                });
              return Ve;
            },
            getLanguageForAdaptation: function (ce) {
              let Ve = "";
              return (
                ce && ce.hasOwnProperty(I.default.LANG) && (Ve = ce.lang), Ve
              );
            },
            getLocation: function (ce) {
              return ce && ce.hasOwnProperty(I.default.LOCATION)
                ? ce[I.default.LOCATION].map((Ve) => {
                    const je = Ve.__text || Ve,
                      it = Ve.hasOwnProperty(I.default.SERVICE_LOCATION)
                        ? Ve[I.default.SERVICE_LOCATION]
                        : null;
                    return new ir(je, it);
                  })
                : [];
            },
            getManifestUpdatePeriod: function (ce) {
              let Ve =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : 0,
                je = NaN;
              return (
                ce &&
                  ce.hasOwnProperty(I.default.MINIMUM_UPDATE_PERIOD) &&
                  (je = ce.minimumUpdatePeriod),
                isNaN(je) ? je : Math.max(je - Ve, 1)
              );
            },
            getMimeType: function (ce) {
              return ce && ce.Representation && ce.Representation.length > 0
                ? ce.Representation[0].mimeType
                : null;
            },
            getMpd: function (ce) {
              const Ve = new (class {
                constructor() {
                  (this.availabilityEndTime = Number.POSITIVE_INFINITY),
                    (this.availabilityStartTime = null),
                    (this.manifest = null),
                    (this.maxSegmentDuration = Number.POSITIVE_INFINITY),
                    (this.mediaPresentationDuration = NaN),
                    (this.minimumUpdatePeriod = NaN),
                    (this.publishTime = null),
                    (this.suggestedPresentationDelay = 0),
                    (this.timeShiftBufferDepth = Number.POSITIVE_INFINITY);
                }
              })();
              return (
                ce &&
                  ((Ve.manifest = ce),
                  ce.hasOwnProperty(I.default.AVAILABILITY_START_TIME)
                    ? (Ve.availabilityStartTime = new Date(
                        ce.availabilityStartTime.getTime()
                      ))
                    : ce.loadedTime &&
                      (Ve.availabilityStartTime = new Date(
                        ce.loadedTime.getTime()
                      )),
                  ce.hasOwnProperty(I.default.AVAILABILITY_END_TIME) &&
                    (Ve.availabilityEndTime = new Date(
                      ce.availabilityEndTime.getTime()
                    )),
                  ce.hasOwnProperty(I.default.MINIMUM_UPDATE_PERIOD) &&
                    (Ve.minimumUpdatePeriod = ce.minimumUpdatePeriod),
                  ce.hasOwnProperty(I.default.MEDIA_PRESENTATION_DURATION) &&
                    (Ve.mediaPresentationDuration =
                      ce.mediaPresentationDuration),
                  ce.hasOwnProperty(I.default.SUGGESTED_PRESENTATION_DELAY) &&
                    (Ve.suggestedPresentationDelay =
                      ce.suggestedPresentationDelay),
                  ce.hasOwnProperty(I.default.TIMESHIFT_BUFFER_DEPTH) &&
                    (Ve.timeShiftBufferDepth = ce.timeShiftBufferDepth),
                  ce.hasOwnProperty(I.default.MAX_SEGMENT_DURATION) &&
                    (Ve.maxSegmentDuration = ce.maxSegmentDuration),
                  ce.hasOwnProperty(I.default.PUBLISH_TIME) &&
                    (Ve.publishTime = new Date(ce.publishTime))),
                Ve
              );
            },
            getPatchLocation: function (ce) {
              return ce && ce.hasOwnProperty(I.default.PATCH_LOCATION)
                ? ce[I.default.PATCH_LOCATION].map((Ve) => {
                    const je = Ve.__text || Ve,
                      it = Ve.hasOwnProperty(I.default.SERVICE_LOCATION)
                        ? Ve[I.default.SERVICE_LOCATION]
                        : null;
                    let Qe = Ve.hasOwnProperty(I.default.TTL)
                      ? 1e3 * parseFloat(Ve[I.default.TTL])
                      : NaN;
                    return new (class {
                      constructor(We, Ke, Ie) {
                        (this.url = We || ""),
                          (this.serviceLocation = Ke || null),
                          (this.ttl = Ie || NaN),
                          (this.queryParams = {});
                      }
                    })(je, it, Qe);
                  })
                : [];
            },
            getProducerReferenceTimesForAdaptation: function (ce) {
              const Ve =
                ce && ce.hasOwnProperty(I.default.PRODUCER_REFERENCE_TIME)
                  ? ce[I.default.PRODUCER_REFERENCE_TIME]
                  : [];
              (ce && ce.hasOwnProperty(I.default.REPRESENTATION)
                ? ce[I.default.REPRESENTATION]
                : []
              ).forEach((it) => {
                it.hasOwnProperty(I.default.PRODUCER_REFERENCE_TIME) &&
                  Ve.push(...it[I.default.PRODUCER_REFERENCE_TIME]);
              });
              const je = [];
              return (
                Ve.forEach((it) => {
                  const Qe = new (class {
                    constructor() {
                      (this.id = null),
                        (this.inband = !1),
                        (this.type = "encoder"),
                        (this.applicationScheme = null),
                        (this.wallClockTime = null),
                        (this.presentationTime = NaN),
                        (this.UTCTiming = null);
                    }
                  })();
                  it.hasOwnProperty(I.default.ID) &&
                    ((Qe[I.default.ID] = parseInt(it[I.default.ID])),
                    it.hasOwnProperty(I.default.WALL_CLOCK_TIME) &&
                      ((Qe[I.default.WALL_CLOCK_TIME] =
                        it[I.default.WALL_CLOCK_TIME]),
                      it.hasOwnProperty(I.default.PRESENTATION_TIME) &&
                        ((Qe[I.default.PRESENTATION_TIME] =
                          it[I.default.PRESENTATION_TIME]),
                        it.hasOwnProperty(I.default.INBAND) &&
                          (Qe[I.default.INBAND] =
                            it[I.default.INBAND] !== "false"),
                        it.hasOwnProperty(I.default.TYPE) &&
                          (Qe[I.default.TYPE] = it[I.default.TYPE]),
                        je.push(Qe))));
                }),
                je
              );
            },
            getPublishTime: function (ce) {
              return ce && ce.hasOwnProperty(I.default.PUBLISH_TIME)
                ? new Date(ce[I.default.PUBLISH_TIME])
                : null;
            },
            getRealPeriodForIndex: function (ce, Ve) {
              const je = we(Ve);
              return je.length > 0 && fe(ce) ? je[ce] : null;
            },
            getRealPeriods: we,
            getRegularPeriods: function (ce) {
              const Ve = !!ce && $e(ce.manifest),
                je = [];
              let it,
                Qe,
                We = null,
                Ke = null,
                Ie = null,
                Ue = null;
              for (
                Qe = 0,
                  it =
                    ce && ce.manifest && ce.manifest.Period
                      ? ce.manifest.Period.length
                      : 0;
                Qe < it;
                Qe++
              )
                (Ke = ce.manifest.Period[Qe]),
                  Ke.hasOwnProperty(I.default.START)
                    ? ((Ue = new Qi()), (Ue.start = Ke.start))
                    : We !== null &&
                      We.hasOwnProperty(I.default.DURATION) &&
                      Ie !== null
                    ? ((Ue = new Qi()),
                      (Ue.start = parseFloat(
                        (Ie.start + Ie.duration).toFixed(5)
                      )))
                    : Qe !== 0 || Ve || ((Ue = new Qi()), (Ue.start = 0)),
                  Ie !== null &&
                    isNaN(Ie.duration) &&
                    (Ue !== null
                      ? (Ie.duration = parseFloat(
                          (Ue.start - Ie.start).toFixed(5)
                        ))
                      : U.warn(
                          "First period duration could not be calculated because lack of start and duration period properties. This will cause timing issues during playback"
                        )),
                  Ue !== null &&
                    ((Ue.id = he(Ke, Qe)),
                    (Ue.index = Qe),
                    (Ue.mpd = ce),
                    (Ue.isEncrypted = Me(Ke)),
                    Ke.hasOwnProperty(I.default.DURATION) &&
                      (Ue.duration = Ke.duration),
                    Ie && (Ie.nextPeriodId = Ue.id),
                    je.push(Ue),
                    (We = Ke),
                    (Ie = Ue)),
                  (Ke = null),
                  (Ue = null);
              return (
                je.length === 0 ||
                  (Ie !== null &&
                    isNaN(Ie.duration) &&
                    (Ie.duration = parseFloat(
                      (
                        (function (at) {
                          (function () {
                            if (!K || !K.hasOwnProperty("error"))
                              throw new Error(P.default.MISSING_CONFIG_ERROR);
                          })();
                          const ft = $e(at.mpd.manifest);
                          let Rt;
                          return (
                            at.mpd.manifest.mediaPresentationDuration
                              ? (Rt = at.mpd.manifest.mediaPresentationDuration)
                              : at.duration
                              ? (Rt = at.duration)
                              : ft
                              ? (Rt = Number.POSITIVE_INFINITY)
                              : K.error(
                                  new ot.default(
                                    de.MANIFEST_ERROR_ID_PARSE_CODE,
                                    "Must have @mediaPresentationDuration on MPD or an explicit @duration on the last period.",
                                    at
                                  )
                                ),
                            Rt
                          );
                        })(Ie) - Ie.start
                      ).toFixed(5)
                    ))),
                je
              );
            },
            getRepresentationCount: function (ce) {
              return ce && ce.Representation ? ce.Representation.length : 0;
            },
            getRepresentationFor: function (ce, Ve) {
              return Ve &&
                Ve.Representation &&
                Ve.Representation.length > 0 &&
                fe(ce)
                ? Ve.Representation[ce]
                : null;
            },
            getRepresentationSortFunction: function () {
              return (ce, Ve) => ce.bandwidth - Ve.bandwidth;
            },
            getRepresentationsForAdaptation: function (ce, Ve) {
              const je = [],
                it = (function (Ke) {
                  if (Ke && Ke.period && fe(Ke.period.index)) {
                    const Ie = Ke.period.mpd.manifest.Period[Ke.period.index];
                    if (Ie && Ie.AdaptationSet && fe(Ke.index))
                      return le(Ie.AdaptationSet[Ke.index]);
                  }
                })(ce);
              let Qe, We;
              if (it && it.Representation) {
                if (ce && ce.period && fe(ce.period.index)) {
                  const Ke = Ze(ce.period.mpd.manifest);
                  Ke && (We = Ke[0]);
                }
                for (let Ke = 0, Ie = it.Representation.length; Ke < Ie; ++Ke) {
                  const Ue = it.Representation[Ke],
                    at = new Wa();
                  if (
                    ((at.index = Ke),
                    (at.adaptation = ce),
                    (at.mediaInfo = Ve),
                    Ue.hasOwnProperty(I.default.ID) && (at.id = Ue.id),
                    Ue.hasOwnProperty(I.default.CODECS) &&
                      ((at.codecs = Ue.codecs),
                      (at.codecFamily = sn.default.getCodecFamily(at.codecs))),
                    Ue.hasOwnProperty(I.default.MIME_TYPE) &&
                      (at.mimeType = Ue[I.default.MIME_TYPE]),
                    Ue.hasOwnProperty(I.default.CODEC_PRIVATE_DATA) &&
                      (at.codecPrivateData = Ue.codecPrivateData),
                    Ue.hasOwnProperty(I.default.BANDWITH) &&
                      ((at.bandwidth = Ue.bandwidth),
                      (at.bitrateInKbit = Ue.bandwidth / 1e3)),
                    Ue.hasOwnProperty(I.default.WIDTH) && (at.width = Ue.width),
                    Ue.hasOwnProperty(I.default.HEIGHT) &&
                      (at.height = Ue.height),
                    Ue.hasOwnProperty(I.default.SCAN_TYPE) &&
                      (at.scanType = Ue.scanType),
                    Ue.hasOwnProperty(I.default.FRAMERATE))
                  ) {
                    const ft = Ue[I.default.FRAMERATE];
                    if (isNaN(ft) && ft.includes("/")) {
                      const Rt = ft.split("/");
                      if (Rt.length === 2) {
                        const an = parseFloat(Rt[0]),
                          tn = parseFloat(Rt[1]);
                        isNaN(an) ||
                          isNaN(tn) ||
                          tn === 0 ||
                          (at.frameRate = an / tn);
                      }
                    } else at.frameRate = ft;
                  }
                  if (
                    (Ue.hasOwnProperty(I.default.QUALITY_RANKING) &&
                      (at.qualityRanking = Ue[I.default.QUALITY_RANKING]),
                    Ue.hasOwnProperty(I.default.MAX_PLAYOUT_RATE) &&
                      (at.maxPlayoutRate = Ue.maxPlayoutRate),
                    Ue.hasOwnProperty(I.default.SEGMENT_BASE)
                      ? ((Qe = Ue.SegmentBase),
                        (at.segmentInfoType = I.default.SEGMENT_BASE))
                      : Ue.hasOwnProperty(I.default.SEGMENT_LIST)
                      ? ((Qe = Ue.SegmentList),
                        Qe.hasOwnProperty(I.default.SEGMENT_TIMELINE)
                          ? (at.segmentInfoType = I.default.SEGMENT_TIMELINE)
                          : (at.segmentInfoType = I.default.SEGMENT_LIST))
                      : Ue.hasOwnProperty(I.default.SEGMENT_TEMPLATE)
                      ? ((Qe = Ue.SegmentTemplate),
                        Qe.hasOwnProperty(I.default.SEGMENT_TIMELINE)
                          ? (at.segmentInfoType = I.default.SEGMENT_TIMELINE)
                          : (at.segmentInfoType = I.default.SEGMENT_TEMPLATE),
                        Qe.hasOwnProperty(I.default.INITIALIZATION_MINUS) &&
                          (at.initialization = Qe.initialization
                            .split("$Bandwidth$")
                            .join(Ue.bandwidth)
                            .split("$RepresentationID$")
                            .join(Ue.id)))
                      : (at.segmentInfoType = I.default.BASE_URL),
                    (at.essentialProperties = Re(Ue)),
                    (at.supplementalProperties = be(Ue)),
                    Qe)
                  ) {
                    if (Qe.hasOwnProperty(I.default.INITIALIZATION)) {
                      const ft = Qe.Initialization;
                      ft.hasOwnProperty(I.default.SOURCE_URL) &&
                        (at.initialization = ft.sourceURL),
                        ft.hasOwnProperty(I.default.RANGE) &&
                          (at.range = ft.range);
                    } else
                      _e(it) &&
                        ne(it) &&
                        it.mimeType &&
                        it.mimeType.indexOf("application/mp4") === -1 &&
                        (at.range = 0);
                    Qe.hasOwnProperty(I.default.TIMESCALE) &&
                      (at.timescale = Qe.timescale),
                      Qe.hasOwnProperty(I.default.DURATION)
                        ? (at.segmentDuration = Qe.duration / at.timescale)
                        : Ue.hasOwnProperty(I.default.SEGMENT_TEMPLATE) &&
                          ((Qe = Ue.SegmentTemplate),
                          Qe.hasOwnProperty(I.default.SEGMENT_TIMELINE) &&
                            (at.segmentDuration =
                              Se(Qe.SegmentTimeline) / at.timescale)),
                      Qe.hasOwnProperty(I.default.MEDIA) &&
                        (at.media = Qe.media),
                      Qe.hasOwnProperty(I.default.START_NUMBER) &&
                        (at.startNumber = parseInt(Qe.startNumber)),
                      Qe.hasOwnProperty(I.default.INDEX_RANGE) &&
                        (at.indexRange = Qe.indexRange),
                      Qe.hasOwnProperty(I.default.PRESENTATION_TIME_OFFSET) &&
                        (at.presentationTimeOffset =
                          Qe.presentationTimeOffset / at.timescale),
                      Qe.hasOwnProperty(I.default.AVAILABILITY_TIME_OFFSET)
                        ? (at.availabilityTimeOffset =
                            Qe.availabilityTimeOffset)
                        : We &&
                          We.availabilityTimeOffset !== void 0 &&
                          (at.availabilityTimeOffset =
                            We.availabilityTimeOffset),
                      Qe.hasOwnProperty(I.default.AVAILABILITY_TIME_COMPLETE)
                        ? (at.availabilityTimeComplete =
                            Qe.availabilityTimeComplete !== "false")
                        : We &&
                          We.availabilityTimeComplete !== void 0 &&
                          (at.availabilityTimeComplete =
                            We.availabilityTimeComplete);
                  }
                  (at.mseTimeOffset = ke(at)),
                    (at.path = [ce.period.index, ce.index, Ke]),
                    isNaN(at.width) ||
                      isNaN(at.height) ||
                      isNaN(at.frameRate) ||
                      ((at.pixelsPerSecond = Math.max(
                        1,
                        at.width * at.height * at.frameRate
                      )),
                      isNaN(at.bandwidth) ||
                        (at.bitsPerPixel = at.bandwidth / at.pixelsPerSecond)),
                    je.push(at);
                }
              }
              return je;
            },
            getRolesForAdaptation: function (ce) {
              return ce &&
                ce.hasOwnProperty(I.default.ROLE) &&
                ce[I.default.ROLE].length
                ? ce[I.default.ROLE].map((Ve) => {
                    const je = new _n();
                    return je.init(Ve), je;
                  })
                : [];
            },
            getSegmentAlignment: function (ce) {
              return (
                !(!ce || !ce.hasOwnProperty(I.default.SEGMENT_ALIGNMENT)) &&
                ce[I.default.SEGMENT_ALIGNMENT] === "true"
              );
            },
            getSelectionPriority: function (ce) {
              try {
                const Ve =
                  ce && ce.selectionPriority !== void 0
                    ? parseInt(ce.selectionPriority)
                    : 1;
                return isNaN(Ve) ? 1 : Ve;
              } catch {
                return 1;
              }
            },
            getServiceDescriptions: function (ce) {
              const Ve = [];
              if (ce && ce.hasOwnProperty(I.default.SERVICE_DESCRIPTION))
                for (const je of ce.ServiceDescription) {
                  let it = null,
                    Qe = null,
                    We = null,
                    Ke = null,
                    Ie = null,
                    Ue = null,
                    at = null,
                    ft = null;
                  for (const Rt in je)
                    if (je.hasOwnProperty(Rt))
                      if (Rt === I.default.ID) it = je[Rt];
                      else if (Rt === I.default.SERVICE_DESCRIPTION_SCOPE)
                        Qe = je[Rt].schemeIdUri;
                      else if (Rt === I.default.SERVICE_DESCRIPTION_LATENCY)
                        We = {
                          target: parseInt(je[Rt].target),
                          max: parseInt(je[Rt].max),
                          min: parseInt(je[Rt].min),
                          referenceId: parseInt(je[Rt].referenceId),
                        };
                      else if (
                        Rt === I.default.SERVICE_DESCRIPTION_PLAYBACK_RATE
                      )
                        Ke = {
                          max: parseFloat(je[Rt].max),
                          min: parseFloat(je[Rt].min),
                        };
                      else if (
                        Rt === I.default.SERVICE_DESCRIPTION_OPERATING_QUALITY
                      )
                        Ie = {
                          mediaType: je[Rt].mediaType,
                          max: parseInt(je[Rt].max),
                          min: parseInt(je[Rt].min),
                          target: parseInt(je[Rt].target),
                          type: je[Rt].type,
                          maxQualityDifference: parseInt(
                            je[Rt].maxQualityDifference
                          ),
                        };
                      else if (
                        Rt === I.default.SERVICE_DESCRIPTION_OPERATING_BANDWIDTH
                      )
                        Ue = {
                          mediaType: je[Rt].mediaType,
                          max: parseInt(je[Rt].max),
                          min: parseInt(je[Rt].min),
                          target: parseInt(je[Rt].target),
                        };
                      else if (Rt === I.default.CONTENT_STEERING) {
                        let an = je[Rt];
                        (an = Array.isArray(an) ? an.at(an.length - 1) : an),
                          (at = nt(an));
                      } else
                        Rt === I.default.CLIENT_DATA_REPORTING &&
                          (ft = vt(je[Rt]));
                  Ve.push({
                    id: it,
                    schemeIdUri: Qe,
                    latency: We,
                    playbackRate: Ke,
                    operatingQuality: Ie,
                    operatingBandwidth: Ue,
                    contentSteering: at,
                    clientDataReporting: ft,
                  });
                }
              return Ve;
            },
            getSubSegmentAlignment: function (ce) {
              return (
                !(!ce || !ce.hasOwnProperty(I.default.SUB_SEGMENT_ALIGNMENT)) &&
                ce[I.default.SUB_SEGMENT_ALIGNMENT] === "true"
              );
            },
            getSuggestedPresentationDelay: function (ce) {
              return ce &&
                ce.hasOwnProperty(I.default.SUGGESTED_PRESENTATION_DELAY)
                ? ce.suggestedPresentationDelay
                : null;
            },
            getSupplementalPropertiesForAdaptationSet: function (ce) {
              return Fe(I.default.SUPPLEMENTAL_PROPERTY, ce);
            },
            getSupplementalPropertiesForRepresentation: be,
            getUTCTimingSources: function (ce) {
              const Ve = $e(ce),
                je =
                  !!ce && ce.hasOwnProperty(I.default.AVAILABILITY_START_TIME),
                it = ce ? ce.UTCTiming : null,
                Qe = [];
              return (
                (Ve || je) &&
                  it &&
                  it.forEach(function (We) {
                    const Ke = new Ni.default();
                    We.hasOwnProperty(P.default.SCHEME_ID_URI) &&
                      ((Ke.schemeIdUri = We.schemeIdUri),
                      We.hasOwnProperty(I.default.VALUE) &&
                        ((Ke.value = We.value.toString()), Qe.push(Ke)));
                  }),
                Qe
              );
            },
            getViewpointForAdaptation: function (ce) {
              return ce &&
                ce.hasOwnProperty(I.default.VIEWPOINT) &&
                ce[I.default.VIEWPOINT].length
                ? ce[I.default.VIEWPOINT].map((Ve) => {
                    const je = new _n();
                    return je.init(Ve), je;
                  })
                : [];
            },
            hasProfile: function (ce, Ve) {
              let je = !1;
              return (
                ce &&
                  ce.profiles &&
                  ce.profiles.length > 0 &&
                  (je = ce.profiles.indexOf(Ve) !== -1),
                je
              );
            },
            isPeriodEncrypted: Me,
            setConfig: function (ce) {
              ce &&
                (ce.errHandler && (K = ce.errHandler),
                ce.BASE64 && (Q = ce.BASE64));
            },
          }),
          (U = (0, E.default)(q).getInstance().getLogger(Y)),
          Y
        );
      }
      ka.__dashjs_factory_name = "DashManifestModel";
      var Fr = H.default.getSingletonFactory(ka);
      const Wr = {
          MANIFEST: "m",
          AUDIO: "a",
          VIDEO: "v",
          MUXED: "av",
          INIT: "i",
          CAPTION: "c",
          TIMED_TEXT: "tt",
          KEY: "k",
          OTHER: "o",
        },
        si = Wr;
      class ma {
        constructor(U, K) {
          Array.isArray(U) &&
            (U = U.map((Q) => (Q instanceof ma ? Q : new ma(Q)))),
            (this.value = U),
            (this.params = K);
        }
      }
      const Aa = "Dict";
      function Sl(Y, U, K, Q) {
        return new Error(
          `failed to ${Y} "${
            ((q = U),
            Array.isArray(q)
              ? JSON.stringify(q)
              : q instanceof Map
              ? "Map{}"
              : q instanceof Set
              ? "Set{}"
              : typeof q == "object"
              ? JSON.stringify(q)
              : String(q))
          }" as ${K}`,
          { cause: Q }
        );
        var q;
      }
      function Ki(Y, U, K) {
        return Sl("serialize", Y, U, K);
      }
      class Ro {
        constructor(U) {
          this.description = U;
        }
      }
      const Xo = "Bare Item",
        Ns = "Boolean",
        Gu = "Byte Sequence",
        zh = "Integer";
      function j0(Y) {
        return Y < -999999999999999 || 999999999999999 < Y;
      }
      function Ws(Y) {
        if (j0(Y)) throw Ki(Y, zh);
        return Y.toString();
      }
      function W0(Y, U) {
        if (Y < 0) return -W0(-Y, U);
        const K = Math.pow(10, U);
        if (Math.abs(((Y * K) % 1) - 0.5) < Number.EPSILON) {
          const Q = Math.floor(Y * K);
          return (Q % 2 == 0 ? Q : Q + 1) / K;
        }
        return Math.round(Y * K) / K;
      }
      const Mm = "Decimal";
      function ps(Y) {
        const U = W0(Y, 3);
        if (Math.floor(Math.abs(U)).toString().length > 12) throw Ki(Y, Mm);
        const K = U.toString();
        return K.includes(".") ? K : `${K}.0`;
      }
      const rs = "String",
        ug = /[\x00-\x1f\x7f]+/;
      function Cm(Y) {
        return Y.description || Y.toString().slice(7, -1);
      }
      const $m = "Token";
      function No(Y) {
        const U = Cm(Y);
        if (/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(U) === !1)
          throw Ki(U, $m);
        return U;
      }
      function Ks(Y) {
        switch (typeof Y) {
          case "number":
            if (!Number.isFinite(Y)) throw Ki(Y, Xo);
            return Number.isInteger(Y) ? Ws(Y) : ps(Y);
          case "string":
            return (function (U) {
              if (ug.test(U)) throw Ki(U, rs);
              return `"${U.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
            })(Y);
          case "symbol":
            return No(Y);
          case "boolean":
            return (function (U) {
              if (typeof U != "boolean") throw Ki(U, Ns);
              return U ? "?1" : "?0";
            })(Y);
          case "object":
            if (Y instanceof Date) return `@${Ws(Y.getTime() / 1e3)}`;
            if (Y instanceof Uint8Array)
              return (function (U) {
                if (ArrayBuffer.isView(U) === !1) throw Ki(U, Gu);
                return `:${((K = U), btoa(String.fromCharCode(...K)))}:`;
                var K;
              })(Y);
            if (Y instanceof Ro) return No(Y);
          default:
            throw Ki(Y, Xo);
        }
      }
      const ud = "Key";
      function ec(Y) {
        if (/^[a-z*][a-z0-9\-_.*]*$/.test(Y) === !1) throw Ki(Y, ud);
        return Y;
      }
      function Yl(Y) {
        return Y == null
          ? ""
          : Object.entries(Y)
              .map((U) => {
                let [K, Q] = U;
                return Q === !0 ? `;${ec(K)}` : `;${ec(K)}=${Ks(Q)}`;
              })
              .join("");
      }
      function ol(Y) {
        return Y instanceof ma ? `${Ks(Y.value)}${Yl(Y.params)}` : Ks(Y);
      }
      const jh = (Y) => Math.round(Y),
        Nu = (Y) => 100 * jh(Y / 100),
        JR = {
          br: jh,
          d: jh,
          bl: Nu,
          dl: Nu,
          mtp: Nu,
          nor: (Y, U) => (
            U != null &&
              U.baseUrl &&
              (Y = (function (K, Q) {
                const q = new URL(K),
                  ee = new URL(Q);
                if (q.origin !== ee.origin) return K;
                const fe = q.pathname.split("/").slice(1),
                  ve = ee.pathname.split("/").slice(1, -1);
                for (; fe[0] === ve[0]; ) fe.shift(), ve.shift();
                for (; ve.length; ) ve.shift(), fe.unshift("..");
                return fe.join("/");
              })(Y, U.baseUrl)),
            encodeURIComponent(Y)
          ),
          rtp: Nu,
          tb: jh,
        };
      function K0(Y) {
        let U =
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        return Y
          ? ((K = (function (q, ee) {
              const fe = {};
              if (q == null || typeof q != "object") return fe;
              const ve = Object.keys(q).sort(),
                ne = Object.assign({}, JR, ee == null ? void 0 : ee.formatters),
                Te = ee == null ? void 0 : ee.filter;
              return (
                ve.forEach((_e) => {
                  if (Te != null && Te(_e)) return;
                  let se = q[_e];
                  const le = ne[_e];
                  var me;
                  le && (se = le(se, ee)),
                    (_e === "v" && se === 1) ||
                      (_e == "pr" && se === 1) ||
                      ((typeof (me = se) == "number"
                        ? Number.isFinite(me)
                        : me != null && me !== "" && me !== !1) &&
                        ((function (we) {
                          return we === "ot" || we === "sf" || we === "st";
                        })(_e) &&
                          typeof se == "string" &&
                          (se = new Ro(se)),
                        (fe[_e] = se)));
                }),
                fe
              );
            })(Y, U)),
            (Q = Object.assign({ whitespace: !1 }, U)),
            (function (q) {
              let ee =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : { whitespace: !0 };
              if (typeof q != "object") throw Ki(q, Aa);
              const fe = q instanceof Map ? q.entries() : Object.entries(q),
                ve = ee != null && ee.whitespace ? " " : "";
              return Array.from(fe)
                .map((ne) => {
                  let [Te, _e] = ne;
                  _e instanceof ma == 0 && (_e = new ma(_e));
                  let se = ec(Te);
                  var le;
                  return (
                    _e.value === !0
                      ? (se += Yl(_e.params))
                      : ((se += "="),
                        Array.isArray(_e.value)
                          ? (se += `(${(le = _e).value.map(ol).join(" ")})${Yl(
                              le.params
                            )}`)
                          : (se += ol(_e))),
                    se
                  );
                })
                .join(`,${ve}`);
            })(K, Q))
          : "";
        var K, Q;
      }
      const $d = "CMCD-Request",
        Z0 = "CMCD-Session",
        Lv = {
          "CMCD-Object": ["br", "d", "ot", "tb"],
          [$d]: ["bl", "dl", "mtp", "nor", "nrr", "su"],
          [Z0]: ["cid", "pr", "sf", "sid", "st", "v"],
          "CMCD-Status": ["bs", "rtp"],
        },
        Ob = "segment";
      function Jf() {
        let Y,
          U,
          K,
          Q,
          q,
          ee,
          fe,
          ve,
          ne,
          Te,
          _e,
          se,
          le,
          me,
          we,
          Me,
          Oe = this.context,
          Ge = (0, X.default)(Oe).getInstance(),
          $e = (0, ue.default)(Oe).getInstance(),
          Fe = (0, E.default)(Oe).getInstance();
        function qe() {
          (Q = {
            pr: 1,
            nor: null,
            st: null,
            sf: null,
            sid: `${sn.default.generateUuid()}`,
            cid: null,
          }),
            (le = {}),
            (se = {}),
            (me = {}),
            (_e = void 0),
            (we = void 0),
            (Me = !1),
            ke();
        }
        function Re() {
          ke();
        }
        function be() {
          we || (we = Date.now());
        }
        function Se() {
          we && !Q.msd && (Q.msd = Date.now() - we);
        }
        function ke() {
          if (!fe) return;
          const Ie = fe.getStreamController();
          if (!Ie || typeof Ie.getActiveStream != "function") return;
          const Ue = Ie.getActiveStream();
          Ue && (Te = Ue.getStreamProcessors());
        }
        function he(Ie) {
          try {
            const Ue = Ze(),
              at = Ue.version ? Ue.keys : $e.get().streaming.cmcd.enabledKeys;
            return Object.keys(Ie)
              .filter((ft) => at.includes(ft))
              .reduce((ft, Rt) => ((ft[Rt] = Ie[Rt]), ft), {});
          } catch {
            return Ie;
          }
        }
        function rt() {
          const Ie = Ze();
          return (
            (function (Ue) {
              if (Object.keys(Ue).length) {
                if (parseInt(Ue.version) !== 1)
                  return K.error("version parameter must be defined in 1."), !1;
                if (!Ue.keys)
                  return K.error("keys parameter must be defined."), !1;
              }
              const at = Ue.version,
                ft = $e.get().streaming.cmcd && $e.get().streaming.cmcd.enabled;
              return at || ft;
            })(Ie) &&
            (function (Ue) {
              let at = $e.get().streaming.cmcd.includeInRequests;
              Ue.version && (at = Ue.includeInRequests ?? [Ob]);
              const ft = P.default.CMCD_AVAILABLE_REQUESTS,
                Rt = at.filter((an) => !ft.includes(an));
              return Rt.length === at.length
                ? (K.error("None of the request types are supported."), !1)
                : (Rt.map((an) => {
                    K.warn(`request type ${an} is not supported.`);
                  }),
                  !0);
            })(Ie) &&
            (function (Ue) {
              const at = P.default.CMCD_AVAILABLE_KEYS,
                ft = P.default.CMCD_V2_AVAILABLE_KEYS,
                Rt = Ue.version ? Ue.keys : $e.get().streaming.cmcd.enabledKeys,
                an = $e.get().streaming.cmcd.version,
                tn = Rt.filter(
                  (fn) => !(at.includes(fn) || (an === 2 && ft.includes(fn)))
                );
              return tn.length === Rt.length && Rt.length > 0
                ? (K.error(
                    `None of the keys are implemented for CMCD version ${an}.`
                  ),
                  !1)
                : (tn.map((fn) => {
                    K.warn(
                      `key parameter ${fn} is not implemented for CMCD version ${an}.`
                    );
                  }),
                  !0);
            })(Ie)
          );
        }
        function Ze() {
          let Ie = {};
          if (ve) {
            const Ue = ve.getServiceDescriptionSettings();
            $e.get().streaming.cmcd.applyParametersFromMpd &&
              Ue.clientDataReporting &&
              Ue.clientDataReporting.cmcdParameters &&
              (Ie = Ue.clientDataReporting.cmcdParameters);
          }
          return Ie;
        }
        function nt(Ie) {
          try {
            let at = null;
            if (
              (Ie.type,
              ((Ue = Ie.mediaType) !== P.default.VIDEO &&
                Ue !== P.default.AUDIO) ||
                (_e && _e != P.default.AUDIO) ||
                (_e = Ue),
              (function (ft) {
                const Rt = Ze();
                let an = $e.get().streaming.cmcd.includeInRequests;
                Rt.version &&
                  (an = Rt.includeInRequests ? Rt.includeInRequests : [Ob]);
                const tn = {
                  [F.HTTPRequest.INIT_SEGMENT_TYPE]: "segment",
                  [F.HTTPRequest.MEDIA_SEGMENT_TYPE]: "segment",
                  [F.HTTPRequest.XLINK_EXPANSION_TYPE]: "xlink",
                  [F.HTTPRequest.MPD_TYPE]: "mpd",
                  [F.HTTPRequest.CONTENT_STEERING_TYPE]: "steering",
                  [F.HTTPRequest.OTHER_TYPE]: "other",
                };
                return an.some((fn) => tn[ft] === fn);
              })(Ie.type))
            ) {
              if (Ie.type === F.HTTPRequest.MPD_TYPE)
                return (function () {
                  const ft = Ve();
                  return (ft.ot = si.MANIFEST), ft;
                })();
              if (Ie.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE)
                return ce(Ie.mediaType), vt(Ie, Ie.mediaType);
              if (Ie.type === F.HTTPRequest.INIT_SEGMENT_TYPE)
                return (function () {
                  const ft = Ve();
                  return (ft.ot = si.INIT), (ft.su = !0), ft;
                })();
              if (
                Ie.type === F.HTTPRequest.OTHER_TYPE ||
                Ie.type === F.HTTPRequest.XLINK_EXPANSION_TYPE
              )
                return (function () {
                  const ft = Ve();
                  return (ft.ot = si.OTHER), ft;
                })();
              if (Ie.type === F.HTTPRequest.LICENSE)
                return (function () {
                  const ft = Ve();
                  return (ft.ot = si.KEY), ft;
                })();
              if (Ie.type === F.HTTPRequest.CONTENT_STEERING_TYPE)
                return (function (ft) {
                  const Rt = _e ? vt(ft, _e) : Ve();
                  return (Rt.ot = si.OTHER), Rt;
                })(Ie);
            }
            return at;
          } catch {
            return null;
          }
          var Ue;
        }
        function vt(Ie, Ue) {
          var at;
          ce(Ue);
          const ft = Ve(),
            Rt = (function ($r) {
              try {
                return parseInt($r.bandwidth / 1e3);
              } catch {
                return null;
              }
            })(Ie),
            an = (function ($r) {
              try {
                return isNaN($r.duration) ? NaN : Math.round(1e3 * $r.duration);
              } catch {
                return null;
              }
            })(Ie),
            tn = (function ($r) {
              try {
                return 100 * parseInt(ne.getSafeAverageThroughput($r) / 100);
              } catch {
                return null;
              }
            })(Ue),
            fn = (function ($r) {
              try {
                const ni = Q.pr,
                  Fi = ee.getCurrentBufferLevel($r);
                return isNaN(ni) || isNaN(Fi)
                  ? null
                  : 100 * parseInt((Fi / ni) * 10);
              } catch {
                return null;
              }
            })(Ue),
            nr = je(Ue),
            Bn = (function ($r) {
              try {
                const ni = q
                  .getPossibleVoRepresentationsFilteredBySettings($r)
                  .map((Fi) => Fi.bitrateInKbit);
                return Math.max(...ni);
              } catch {
                return null;
              }
            })((at = Ie.representation) == null ? void 0 : at.mediaInfo),
            wr = Q.pr,
            hr = (function ($r) {
              if (Te && Te.length !== 0) {
                for (let ni of Te)
                  if (ni.getType() === $r) return ni.probeNextRequest();
              }
            })(Ue);
          let pi;
          Ue === P.default.VIDEO && (pi = si.VIDEO),
            Ue === P.default.AUDIO && (pi = si.AUDIO),
            Ue === P.default.TEXT &&
              (pi =
                Ie.representation.mediaInfo.mimeType === "application/mp4"
                  ? si.TIMED_TEXT
                  : si.CAPTION);
          let Rn = $e.get().streaming.cmcd.rtp;
          return (
            Rn ||
              (Rn = (function ($r) {
                try {
                  let ni = fe.getPlaybackRate();
                  ni || (ni = 1);
                  let {
                    bandwidth: Fi,
                    mediaType: Xi,
                    representation: Hi,
                    duration: jt,
                  } = $r;
                  if (!Hi.mediaInfo) return NaN;
                  let An = je(Xi);
                  An === 0 && (An = 500);
                  let pn = (Fi * jt) / 1e3 / (An / ni / 1e3),
                    Mn =
                      $e.get().streaming.cmcd.rtpSafetyFactor &&
                      !isNaN($e.get().streaming.cmcd.rtpSafetyFactor)
                        ? $e.get().streaming.cmcd.rtpSafetyFactor
                        : 5;
                  return 100 * (parseInt((pn * Mn) / 100) + 1);
                } catch {
                  return NaN;
                }
              })(Ie)),
            isNaN(Rn) || (ft.rtp = Rn),
            hr &&
              (Ie.url !== hr.url
                ? (ft.nor = encodeURIComponent(
                    sn.default.getRelativeUrl(Ie.url, hr.url)
                  ))
                : hr.range && (ft.nrr = hr.range)),
            Rt && (ft.br = Rt),
            pi && (ft.ot = pi),
            isNaN(an) || (ft.d = an),
            isNaN(tn) || (ft.mtp = tn),
            isNaN(fn) || (ft.dl = fn),
            isNaN(nr) || (ft.bl = nr),
            isNaN(Bn) || (ft.tb = Bn),
            isNaN(wr) || wr === 1 || (ft.pr = wr),
            le[Ue] && ((ft.bs = !0), (le[Ue] = !1)),
            (!se[Ue] && me[Ue]) || ((ft.su = !0), (se[Ue] = !1), (me[Ue] = !0)),
            ft
          );
        }
        function ce(Ie) {
          me.hasOwnProperty(Ie) || (me[Ie] = !1),
            se.hasOwnProperty(Ie) || (se[Ie] = !1),
            le.hasOwnProperty(Ie) || (le[Ie] = !1);
        }
        function Ve() {
          const Ie = Ze(),
            Ue = {};
          let at = $e.get().streaming.cmcd.cid
            ? $e.get().streaming.cmcd.cid
            : Q.cid;
          if (
            ((at = Ie.contentID ? Ie.contentID : at),
            (Ue.v = $e.get().streaming.cmcd.version ?? 1),
            (Ue.sid = $e.get().streaming.cmcd.sid
              ? $e.get().streaming.cmcd.sid
              : Q.sid),
            (Ue.sid = Ie.sessionID ? Ie.sessionID : Ue.sid),
            (Ue.sid = `${Ue.sid}`),
            at && (Ue.cid = `${at}`),
            isNaN(Q.pr) || Q.pr === 1 || Q.pr === null || (Ue.pr = Q.pr),
            Q.st && (Ue.st = Q.st),
            Q.sf && (Ue.sf = Q.sf),
            Ue.v === 2)
          ) {
            let ft = 1e3 * fe.getCurrentLiveLatency();
            isNaN(ft) || (Ue.ltc = ft);
            const Rt = Q.msd;
            Me || isNaN(Rt) || ((Ue.msd = Rt), (Me = !0));
          }
          return Ue;
        }
        function je(Ie) {
          try {
            const Ue = ee.getCurrentBufferLevel(Ie);
            return isNaN(Ue) ? null : 100 * parseInt(10 * Ue);
          } catch {
            return null;
          }
        }
        function it(Ie) {
          try {
            Q.pr = Ie.playbackRate;
          } catch {}
        }
        function Qe(Ie) {
          try {
            const Ue = Y.getIsDynamic(Ie.data) ? "l" : "v",
              at = Ie.protocol && Ie.protocol === "MSS" ? "s" : "d";
            (Q.st = `${Ue}`), (Q.sf = `${at}`);
          } catch {}
        }
        function We(Ie) {
          try {
            Ie.state &&
              Ie.mediaType &&
              Ie.state === S.default.BUFFER_EMPTY &&
              (le[Ie.mediaType] || (le[Ie.mediaType] = !0),
              se[Ie.mediaType] || (se[Ie.mediaType] = !0));
          } catch {}
        }
        function Ke() {
          for (let Ie in le) le.hasOwnProperty(Ie) && (le[Ie] = !0);
          for (let Ie in se) se.hasOwnProperty(Ie) && (se[Ie] = !0);
        }
        return (
          (U = {
            getCmcdData: nt,
            getQueryParameter: function (Ie) {
              try {
                if (rt()) {
                  const Ue = nt(Ie),
                    at = K0(he(Ue));
                  return (
                    Ge.trigger(Xn.default.CMCD_DATA_GENERATED, {
                      url: Ie.url,
                      mediaType: Ie.mediaType,
                      cmcdData: Ue,
                      cmcdString: at,
                    }),
                    { key: "CMCD", value: at }
                  );
                }
                return null;
              } catch {
                return null;
              }
            },
            getHeaderParameters: function (Ie) {
              try {
                if (rt()) {
                  const Ue = nt(Ie),
                    at = (function (ft) {
                      let Rt =
                        arguments.length > 1 && arguments[1] !== void 0
                          ? arguments[1]
                          : {};
                      const an = {};
                      if (!ft) return an;
                      const tn = Object.entries(ft),
                        fn = Object.entries(Lv).concat(
                          Object.entries(
                            (Rt == null ? void 0 : Rt.customHeaderMap) || {}
                          )
                        ),
                        nr = tn.reduce((Bn, wr) => {
                          var hr, pi;
                          const [Rn, $r] = wr,
                            ni =
                              ((hr = fn.find((Fi) => Fi[1].includes(Rn))) ===
                                null || hr === void 0
                                ? void 0
                                : hr[0]) || $d;
                          return (
                            ((pi = Bn[ni]) !== null && pi !== void 0) ||
                              (Bn[ni] = {}),
                            (Bn[ni][Rn] = $r),
                            Bn
                          );
                        }, {});
                      return Object.entries(nr).reduce((Bn, wr) => {
                        let [hr, pi] = wr;
                        return (Bn[hr] = K0(pi, Rt)), Bn;
                      }, an);
                    })(
                      he(Ue),
                      $e.get().streaming.cmcd.version === 1
                        ? {}
                        : { customHeaderMap: { [$d]: ["ltc"], [Z0]: ["msd"] } }
                    );
                  return (
                    Ge.trigger(Xn.default.CMCD_DATA_GENERATED, {
                      url: Ie.url,
                      mediaType: Ie.mediaType,
                      cmcdData: Ue,
                      headers: at,
                    }),
                    at
                  );
                }
                return null;
              } catch {
                return null;
              }
            },
            getCmcdParametersFromManifest: Ze,
            setConfig: function (Ie) {
              Ie &&
                (Ie.abrController && (q = Ie.abrController),
                Ie.dashMetrics && (ee = Ie.dashMetrics),
                Ie.throughputController && (ne = Ie.throughputController),
                Ie.playbackController && (fe = Ie.playbackController),
                Ie.serviceDescriptionController &&
                  (ve = Ie.serviceDescriptionController));
            },
            reset: function () {
              Ge.off(S.default.PLAYBACK_RATE_CHANGED, it, this),
                Ge.off(S.default.MANIFEST_LOADED, Qe, this),
                Ge.off(S.default.BUFFER_LEVEL_STATE_CHANGED, We, U),
                Ge.off(S.default.PLAYBACK_SEEKED, Ke, U),
                Ge.off(S.default.PLAYBACK_STARTED, be, U),
                Ge.off(S.default.PLAYBACK_PLAYING, Se, U),
                qe();
            },
            initialize: function (Ie) {
              Ge.on(S.default.PLAYBACK_RATE_CHANGED, it, U),
                Ge.on(S.default.MANIFEST_LOADED, Qe, U),
                Ge.on(S.default.BUFFER_LEVEL_STATE_CHANGED, We, U),
                Ge.on(S.default.PLAYBACK_SEEKED, Ke, U),
                Ge.on(S.default.PERIOD_SWITCH_COMPLETED, Re, U),
                Ie
                  ? Ge.on(S.default.MANIFEST_LOADING_STARTED, be, U)
                  : Ge.on(S.default.PLAYBACK_STARTED, be, U),
                Ge.on(S.default.PLAYBACK_PLAYING, Se, U);
            },
            isCmcdEnabled: rt,
          }),
          (Y = Fr(Oe).getInstance()),
          (K = Fe.getLogger(U)),
          qe(),
          U
        );
      }
      Jf.__dashjs_factory_name = "CmcdModel";
      var Gb = H.default.getSingletonFactory(Jf);
      const Y0 = "CMSD-Dynamic",
        QE = "CMSD-Static",
        Ov = Wr;
      function Vo(Y, U, K) {
        return Sl("parse", Y, U, K);
      }
      const cd = "List";
      function Ql(Y, U) {
        return { value: Y, src: U };
      }
      const qf = "Inner List",
        Nb = "Date",
        xm = `${zh} or ${Mm}`;
      function Cl(Y) {
        let U,
          K = 1,
          Q = "";
        const q = Vo(Y, xm);
        if ((Y[0] === "-" && ((K = -1), (Y = Y.substring(1))), Y.length <= 0))
          throw q;
        const ee = /^(\d+)?/g,
          fe = ee.exec(Y);
        if (fe[0].length === 0) throw q;
        if (((Q += fe[1]), (Y = Y.substring(ee.lastIndex))[0] === ".")) {
          if (Q.length > 12) throw q;
          const ve = /^(\.\d+)?/g,
            ne = ve.exec(Y);
          if (
            ((Y = Y.substring(ve.lastIndex)),
            ne[0].length === 0 ||
              ne[1].length > 4 ||
              ((Q += ne[1]), Q.length > 16))
          )
            throw q;
          U = parseFloat(Q) * K;
        } else {
          if (Q.length > 15) throw q;
          if (((U = parseInt(Q) * K), j0(U))) throw Vo(Q, xm);
        }
        return Ql(U, Y);
      }
      function gu(Y, U) {
        const K = Y[0];
        if (K === '"')
          return (function (Q) {
            let q = "",
              ee = 0;
            if (Q[ee] !== '"') throw Vo(Q, rs);
            for (ee++; Q.length > ee; ) {
              if (Q[ee] === "\\") {
                if (
                  Q.length <= ee + 1 ||
                  (ee++, Q[ee] !== '"' && Q[ee] !== "\\")
                )
                  throw Vo(Q, rs);
                q += Q[ee];
              } else {
                if (Q[ee] === '"') return Ql(q, Q.substring(++ee));
                if (ug.test(Q[ee])) throw Vo(Q, rs);
                q += Q[ee];
              }
              ee++;
            }
            throw Vo(Q, rs);
          })(Y);
        if (/^[-0-9]/.test(K)) return Cl(Y);
        if (K === "?")
          return (function (Q) {
            let q = 0;
            if (Q[q] !== "?") throw Vo(Q, Ns);
            if ((q++, Q[q] === "1")) return Ql(!0, Q.substring(++q));
            if (Q[q] === "0") return Ql(!1, Q.substring(++q));
            throw Vo(Q, Ns);
          })(Y);
        if (K === ":")
          return (function (Q) {
            if (Q[0] !== ":" || (Q = Q.substring(1)).includes(":") === !1)
              throw Vo(Q, Gu);
            const q = /(^.*?)(:)/g,
              ee = q.exec(Q)[1];
            return (
              (Q = Q.substring(q.lastIndex)),
              Ql(new Uint8Array([...atob(ee)].map((fe) => fe.charCodeAt(0))), Q)
            );
          })(Y);
        if (/^[a-zA-Z*]/.test(K))
          return (function (Q, q) {
            if (/^[a-zA-Z*]$/.test(Q[0]) === !1) throw Vo(Q, $m);
            const ee = /^([!#$%&'*+\-.^_`|~\w:/]+)/g,
              fe = ee.exec(Q)[1];
            return (
              (Q = Q.substring(ee.lastIndex)),
              Ql(
                (q == null ? void 0 : q.useSymbol) === !1
                  ? new Ro(fe)
                  : Symbol.for(fe),
                Q
              )
            );
          })(Y, U);
        if (K === "@")
          return (function (Q) {
            let q = 0;
            if (Q[q] !== "@") throw Vo(Q, Nb);
            q++;
            const ee = Cl(Q.substring(q));
            if (Number.isInteger(ee.value) === !1) throw Vo(Q, Nb);
            return Ql(new Date(1e3 * ee.value), ee.src);
          })(Y);
        throw Vo(Y, Xo);
      }
      function Gv(Y) {
        let U = 0;
        if (/^[a-z*]$/.test(Y[U]) === !1) throw Vo(Y, ud);
        let K = "";
        for (; Y.length > U; ) {
          if (/^[a-z0-9_\-.*]$/.test(Y[U]) === !1) return Ql(K, Y.substring(U));
          (K += Y[U]), U++;
        }
        return Ql(K, Y.substring(U));
      }
      function hh(Y, U) {
        let K;
        for (; Y.length > 0 && Y[0] === ";"; ) {
          const Q = Gv((Y = Y.substring(1).trim())),
            q = Q.value;
          let ee = !0;
          if ((Y = Q.src)[0] === "=") {
            const fe = gu((Y = Y.substring(1)), U);
            (ee = fe.value), (Y = fe.src);
          }
          K == null && (K = {}), (K[q] = ee);
        }
        return Ql(K, Y);
      }
      function Nv(Y, U) {
        const K = gu(Y, U),
          Q = hh((Y = K.src), U);
        return (Y = Q.src), Ql(new ma(K.value, Q.value), Y);
      }
      function Fb(Y, U) {
        return Y[0] === "("
          ? (function (K, Q) {
              if (K[0] !== "(") throw Vo(K, qf);
              K = K.substring(1);
              const q = [];
              for (; K.length > 0; ) {
                if ((K = K.trim())[0] === ")") {
                  const fe = hh((K = K.substring(1)), Q);
                  return Ql(new ma(q, fe.value), fe.src);
                }
                const ee = Nv(K, Q);
                if ((q.push(ee.value), (K = ee.src)[0] !== " " && K[0] !== ")"))
                  throw Vo(K, qf);
              }
              throw Vo(K, qf);
            })(Y, U)
          : Nv(Y, U);
      }
      const Q0 = QE.toLowerCase(),
        JE = Y0.toLowerCase(),
        ep = ["mb", "st", "sf", "v"],
        Lm = "stream",
        Ub = {
          video: Ov.VIDEO,
          audio: Ov.AUDIO,
          text: Ov.TIMED_TEXT,
          stream: Lm,
        };
      function tp() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K, Q, q, ee;
        function fe() {
          (q = {}), (ee = {});
        }
        function ve(le) {
          le &&
            Object.keys(le).forEach((me) => {
              ep.includes(me) || delete le[me];
            });
        }
        function ne(le) {
          try {
            return (me = le)
              ? Object.entries(
                  (function (we, Me) {
                    try {
                      const { src: Oe, value: Ge } = (function ($e, Fe) {
                        const qe = {};
                        for (; $e.length > 0; ) {
                          let Re;
                          const be = Gv($e),
                            Se = be.value;
                          if (($e = be.src)[0] === "=") {
                            const ke = Fb($e.substring(1), Fe);
                            (Re = ke.value), ($e = ke.src);
                          } else {
                            const ke = hh($e, Fe);
                            (Re = new ma(!0, ke.value)), ($e = ke.src);
                          }
                          if (((qe[Se] = Re), ($e = $e.trim()).length === 0))
                            return Ql(qe, $e);
                          if (
                            $e[0] !== "," ||
                            ($e = $e.substring(1).trim()).length === 0 ||
                            $e[0] === ","
                          )
                            throw Vo($e, Aa);
                        }
                        return Ql(qe, $e);
                      })(we.trim(), void 0);
                      if (Oe !== "") throw Vo(Oe, Aa);
                      return Ge;
                    } catch (Oe) {
                      throw Vo(we, Aa, Oe);
                    }
                  })(me)
                ).reduce((we, Me) => {
                  let [Oe, Ge] = Me;
                  const { value: $e } = Ge;
                  return (we[Oe] = typeof $e == "symbol" ? Cm($e) : $e), we;
                }, {})
              : {};
          } catch (we) {
            Q.error("Failed to parse CMSD-Static response header value:", we);
          }
          var me;
        }
        function Te(le) {
          try {
            const we = (me = le)
                ? (function (Oe, Ge) {
                    try {
                      const { src: $e, value: Fe } = (function (qe, Re) {
                        const be = [];
                        for (; qe.length > 0; ) {
                          const Se = Fb(qe, void 0);
                          if (
                            (be.push(Se.value),
                            (qe = Se.src.trim()).length === 0)
                          )
                            return Ql(be, qe);
                          if (
                            qe[0] !== "," ||
                            (qe = qe.substring(1).trim()).length === 0 ||
                            qe[0] === ","
                          )
                            throw Vo(qe, cd);
                        }
                        return Ql(be, qe);
                      })(Oe.trim());
                      if ($e !== "") throw Vo($e, cd);
                      return Fe;
                    } catch ($e) {
                      throw Vo(Oe, cd, $e);
                    }
                  })(me)
                : [],
              Me = we[we.length - 1];
            return (Me == null ? void 0 : Me.params) || {};
          } catch (we) {
            return (
              Q.error(
                "Failed to parse CMSD-Dynamic response header value:",
                we
              ),
              {}
            );
          }
          var me;
        }
        function _e(le) {
          return Ub[le] || Ov.OTHER;
        }
        function se(le, me, we) {
          const Me = le === QE ? q : ee,
            Oe = Me[me] || {},
            Ge = Me[Lm] || {};
          return Oe[we] || Ge[we];
        }
        return (
          (K = {
            setConfig: function () {},
            initialize: function () {},
            reset: function () {
              fe();
            },
            parseResponseHeaders: function (le, me) {
              let we = null,
                Me = null;
              for (const Ge in le) {
                const $e = le[Ge];
                switch (Ge) {
                  case Q0:
                    (we = ne($e)), U.trigger(G.default.CMSD_STATIC_HEADER, we);
                    break;
                  case JE:
                    Me || (Me = Te($e));
                }
              }
              let Oe = Lm;
              return (
                we && we.ot ? (Oe = we.ot) : me && (Oe = _e(me)),
                ve(q[Oe]),
                ve(ee[Oe]),
                we && (q[Oe] = Object.assign(q[Oe] || {}, we)),
                Me && (ee[Oe] = Object.assign(ee[Oe] || {}, Me)),
                { static: we, dynamic: Me }
              );
            },
            getMaxBitrate: function (le) {
              let me = _e(le);
              return se(Y0, me, "mb") || -1;
            },
            getEstimatedThroughput: function (le) {
              let me = _e(le);
              return se(Y0, me, "etp") || null;
            },
            getResponseDelay: function (le) {
              let me = _e(le);
              return se(Y0, me, "rd") || null;
            },
            getRoundTripTime: function (le) {
              let me = _e(le);
              return se(Y0, me, "rtt") || null;
            },
          }),
          (Q = (0, E.default)(Y).getInstance().getLogger(K)),
          fe(),
          K
        );
      }
      tp.__dashjs_factory_name = "CmsdModel";
      var Bb = H.default.getSingletonFactory(tp),
        Hb = n(1926);
      function cg() {
        let Y, U;
        function K() {
          U = {};
        }
        return (
          (Y = {
            reset: function () {
              K();
            },
            processResponseHeaders: function (Q) {
              if (!(Q && Q.headers && Q.request && Q.request.url)) return;
              const q = Q.headers[P.default.COMMON_ACCESS_TOKEN_HEADER];
              if (q) {
                const ee = sn.default.getHostFromUrl(Q.request.url);
                ee && (U[ee] = q);
              }
            },
            getCommonAccessTokenForUrl: function (Q) {
              if (!Q) return null;
              const q = sn.default.getHostFromUrl(Q);
              return q ? (U[q] ? U[q] : null) : void 0;
            },
          }),
          K(),
          Y
        );
      }
      cg.__dashjs_factory_name = "CommonAccessTokenController";
      var J0 = H.default.getSingletonFactory(cg);
      function xd() {
        let Y, U;
        return (
          (Y = {
            setConfig: function (K) {
              K &&
                K.serviceDescriptionController &&
                (U = K.serviceDescriptionController);
            },
            isAdaptationsIncluded: function (K) {
              var Q;
              const { adaptationSetsArray: q } =
                ((Q = U == null ? void 0 : U.getServiceDescriptionSettings()) ==
                null
                  ? void 0
                  : Q.clientDataReporting) ?? {};
              return (
                !q || (q == null ? void 0 : q.length) === 0 || q.includes(K)
              );
            },
            isServiceLocationIncluded: function (K, Q) {
              var q;
              if (K === F.HTTPRequest.CONTENT_STEERING_TYPE) return !0;
              const { serviceLocationsArray: ee } =
                ((q = U == null ? void 0 : U.getServiceDescriptionSettings()) ==
                null
                  ? void 0
                  : q.clientDataReporting) ?? {};
              return (
                !ee || (ee == null ? void 0 : ee.length) === 0 || ee.includes(Q)
              );
            },
          }),
          Y
        );
      }
      xd.__dashjs_factory_name = "ClientDataReportingController";
      var dg = H.default.getSingletonFactory(xd);
      function Nc() {
        let Y, U, K;
        const Q = this.context;
        function q(ee, fe, ve, ne, Te) {
          var _e;
          const se = (function (Me, Oe) {
            let Ge = [];
            return (
              (Ge =
                Oe === I.default.PERIOD
                  ? Me[I.default.SUPPLEMENTAL_PROPERTY] || []
                  : [
                      ...(Me[I.default.ESSENTIAL_PROPERTY] || []),
                      ...(Me[I.default.SUPPLEMENTAL_PROPERTY] || []),
                    ]),
              Ge.find(
                ($e) =>
                  ($e.schemeIdUri === P.default.URL_QUERY_INFO_SCHEME &&
                    $e.UrlQueryInfo) ||
                  ($e.schemeIdUri === P.default.EXT_URL_QUERY_INFO_SCHEME &&
                    $e.ExtUrlQueryInfo)
              )
            );
          })(fe, Te);
          var le, me, we;
          (function (Me, Oe, Ge, $e) {
            Ge.initialQueryString = "";
            let Fe = "";
            const qe =
              (Me == null ? void 0 : Me.ExtUrlQueryInfo) ||
              (Me == null ? void 0 : Me.UrlQueryInfo);
            (Fe =
              qe && qe.queryString
                ? Oe && Oe.length > 0
                  ? Oe + "&" + qe.queryString
                  : qe.queryString
                : Oe),
              (qe == null ? void 0 : qe.useMPDUrlQuery) === "true" &&
                $e &&
                (Fe = Fe ? Fe + "&" + $e : $e),
              (Ge.initialQueryString = Fe);
          })(se, ne.initialQueryString, ee, ve),
            (function (Me, Oe, Ge) {
              var $e, Fe;
              if (!Me) return void (Oe.finalQueryString = Ge);
              const qe =
                (($e = Me == null ? void 0 : Me.ExtUrlQueryInfo) == null
                  ? void 0
                  : $e.queryTemplate) ||
                ((Fe = Me == null ? void 0 : Me.UrlQueryInfo) == null
                  ? void 0
                  : Fe.queryTemplate) ||
                "";
              Oe.finalQueryString =
                qe === I.default.QUERY_PART
                  ? Oe == null
                    ? void 0
                    : Oe.initialQueryString
                  : "";
            })(se, ee, ne.finalQueryString),
            (ee.sameOriginOnly =
              (_e = se == null ? void 0 : se.ExtUrlQueryInfo) == null
                ? void 0
                : _e.sameOriginOnly),
            (ee.queryParams = sn.default.parseQueryParams(
              ee == null ? void 0 : ee.finalQueryString
            )),
            (ee.includeInRequests =
              ((le = se),
              (me = ne.includeInRequests),
              le
                ? (we = le.ExtUrlQueryInfo) != null && we.includeInRequests
                  ? le.ExtUrlQueryInfo.includeInRequests.split(" ")
                  : [I.default.SEGMENT_TYPE]
                : me));
        }
        return (
          (U = (0, E.default)(Q).getInstance().getLogger(Y)),
          (Y = {
            getFinalQueryString: function (ee) {
              try {
                if (!K) return null;
                if (
                  ee.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE ||
                  ee.type === F.HTTPRequest.INIT_SEGMENT_TYPE
                ) {
                  const fe = ee.representation;
                  if (!fe) return null;
                  const ve = fe.adaptation,
                    ne = ve.period,
                    Te =
                      K.period[ne.index].adaptation[ve.index].representation[
                        fe.index
                      ],
                    _e = new URL(ee.url),
                    se = !Te.sameOriginOnly || K.origin === _e.origin;
                  if (
                    Te.includeInRequests.includes(I.default.SEGMENT_TYPE) &&
                    se
                  )
                    return Te.queryParams;
                } else if (ee.type === F.HTTPRequest.MPD_TYPE) {
                  if (
                    [I.default.MPD_TYPE, I.default.MPD_PATCH_TYPE].some((fe) =>
                      K.includeInRequests.includes(fe)
                    )
                  )
                    return K.queryParams;
                } else if (
                  ee.type === F.HTTPRequest.CONTENT_STEERING_TYPE &&
                  K.includeInRequests.includes(I.default.STEERING_TYPE)
                )
                  return K.queryParams;
              } catch (fe) {
                return U.error(fe), null;
              }
            },
            createFinalQueryStrings: function (ee) {
              K = { origin: new URL(ee.url).origin, period: [] };
              const fe = ee.url.split("?")[1];
              q(
                K,
                ee,
                fe,
                { initialQueryString: "", includeInRequests: [] },
                I.default.MPD
              ),
                ee.Period.forEach((ve) => {
                  const ne = { adaptation: [] };
                  q(ne, ve, fe, K, I.default.PERIOD),
                    ve.AdaptationSet.forEach((Te) => {
                      const _e = { representation: [] };
                      q(_e, Te, fe, ne, I.default.ADAPTATION_SET),
                        Te.Representation.forEach((se) => {
                          const le = {};
                          q(le, se, fe, _e, I.default.REPRESENTATION),
                            _e.representation.push(le);
                        }),
                        ne.adaptation.push(_e);
                    }),
                    K.period.push(ne);
                });
            },
          }),
          Y
        );
      }
      Nc.__dashjs_factory_name = "ExtUrlQueryInfoController";
      var hg = H.default.getSingletonFactory(Nc);
      function Xb(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.errHandler,
          Q = Y.dashMetrics,
          q = Y.mediaPlayerModel,
          ee = Y.boxParser,
          fe = Y.errors,
          ve = Y.requestTimeout || 0,
          ne = (0, X.default)(U).getInstance(),
          Te = (0, ue.default)(U).getInstance();
        let _e, se, le, me, we, Me, Oe, Ge, $e, Fe, qe, Re, be, Se;
        function ke(he, rt) {
          const Ze = function () {
              Ve();
            },
            nt = function (Rn) {
              const $r = new Date();
              Ue &&
                ((Ue = !1),
                (!Rn.lengthComputable ||
                  (Rn.lengthComputable && Rn.total !== Rn.loaded)) &&
                  ((Ke.firstByteDate = $r),
                  (fn.resourceTiming.responseStart = $r.getTime()))),
                Rn.lengthComputable &&
                  ((Ke.bytesLoaded = fn.length = Rn.loaded),
                  (Ke.bytesTotal = fn.resourceTiming.encodedBodySize =
                    Rn.total),
                  (fn.length = Rn.total),
                  (fn.resourceTiming.encodedBodySize = Rn.loaded)),
                Rn.noTrace ||
                  (Ie.push({
                    s: ft,
                    d: Rn.time ? Rn.time : $r.getTime() - ft.getTime(),
                    b: [Rn.loaded ? Rn.loaded - Rt : 0],
                    t: Rn.throughput,
                  }),
                  (Ke.traces = Ie),
                  (ft = $r),
                  (Rt = Rn.loaded)),
                an && (clearTimeout(an), (an = null)),
                Te.get().streaming.fragmentRequestProgressTimeout > 0 &&
                  (an = setTimeout(function () {
                    Se.warn(
                      "Abort request " + tn.url + " due to progress timeout"
                    ),
                      Bn.abort(tn),
                      Ze();
                  }, Te.get().streaming.fragmentRequestProgressTimeout)),
                he.progress && Rn && he.progress(Rn);
            },
            vt = function () {
              Ve(!0);
            },
            ce = function (Rn) {
              let $r;
              if (Rn.lengthComputable) {
                let ni = (Rn.loaded / Rn.total) * 100;
                $r =
                  "Request timeout: loaded: " +
                  Rn.loaded +
                  ", out of: " +
                  Rn.total +
                  " : " +
                  ni.toFixed(3) +
                  "% Completed";
              } else $r = "Request timeout: non-computable download size";
              Se.warn($r);
            },
            Ve = function () {
              let Rn =
                arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
              se.indexOf(tn) !== -1 && se.splice(se.indexOf(tn), 1),
                an && (clearTimeout(an), (an = null)),
                qe.processResponseHeaders(fn),
                je(),
                it(),
                (function ($r) {
                  const ni = Fe.getResponseInterceptors();
                  return ni
                    ? ni.reduce(
                        (Fi, Xi) => Fi.then((Hi) => Xi(Hi)),
                        Promise.resolve($r)
                      )
                    : Promise.resolve($r);
                })(fn).then(($r) => {
                  if (
                    ((fn = $r),
                    (function (ni, Fi, Xi) {
                      const Hi = ni.customData.request,
                        jt =
                          Te.get().streaming.cmsd &&
                          Te.get().streaming.cmsd.enabled
                            ? Oe.parseResponseHeaders(Fi.headers, Hi.mediaType)
                            : null;
                      Q.addHttpRequest(
                        Hi,
                        Fi.url,
                        Fi.status,
                        Fi.headers,
                        Xi,
                        jt
                      );
                    })(tn, fn, Ie),
                    Rn)
                  )
                    he.abort && he.abort(Ke);
                  else if (
                    (Ke.type === F.HTTPRequest.MPD_TYPE &&
                      (Q.addManifestUpdate(Ke),
                      ne.trigger(G.default.MANIFEST_LOADING_FINISHED, {
                        requestObject: Ke,
                      })),
                    fn.status >= 200 && fn.status <= 299 && fn.data)
                  )
                    he.success && he.success(fn.data, fn.statusText, fn.url),
                      he.complete && he.complete(Ke, fn.statusText);
                  else {
                    try {
                      fn.status === 404 &&
                        Te.get().streaming.utcSynchronization
                          .enableBackgroundSyncAfterSegmentDownloadError &&
                        Ke.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE &&
                        q.getRetryAttemptsForType(
                          F.HTTPRequest.MEDIA_SEGMENT_TYPE
                        ) === rt &&
                        ne.trigger(G.default.ATTEMPT_BACKGROUND_SYNC);
                    } catch {}
                    We();
                  }
                });
            },
            je = function () {
              (Ke.startDate = at),
                (Ke.endDate = new Date()),
                (Ke.firstByteDate = Ke.firstByteDate || at);
            },
            it = function () {
              (fn.resourceTiming.responseEnd = Date.now()),
                (function (Rn, $r) {
                  if (
                    !Te.get().streaming.abr.throughput.useResourceTimingApi ||
                    typeof performance > "u" ||
                    Rn.range
                  )
                    return;
                  const ni = performance.getEntriesByType("resource");
                  if (ni === void 0 || ni.length <= 0) return;
                  let Fi = 0,
                    Xi = null;
                  for (; Fi < ni.length; ) {
                    if (ni[Fi].name === Rn.url) {
                      Xi = ni[Fi];
                      break;
                    }
                    Fi += 1;
                  }
                  var Hi;
                  (Hi = Xi) &&
                    !isNaN(Hi.responseStart) &&
                    Hi.responseStart > 0 &&
                    !isNaN(Hi.responseEnd) &&
                    Hi.responseEnd > 0 &&
                    !isNaN(Hi.transferSize) &&
                    Hi.transferSize > 0 &&
                    ((Rn.customData.request.resourceTimingValues = Xi),
                    ($r.resourceTiming.startTime = Xi.startTime),
                    ($r.resourceTiming.encodedBodySize = Xi.encodedBodySize),
                    ($r.resourceTiming.responseStart = Xi.startTime),
                    ($r.resourceTiming.responseEnd = Xi.responseEnd),
                    ($r.resourceTiming.duration = Xi.duration));
                })(tn, fn);
            },
            Qe = function (Rn, $r, ni) {
              return new Promise((Fi) => {
                (function (Xi) {
                  const Hi = Fe.getRequestInterceptors();
                  return Hi
                    ? Hi.reduce(
                        (jt, An) => jt.then((pn) => An(pn)),
                        Promise.resolve(Xi)
                      )
                    : Promise.resolve(Xi);
                })($r).then((Xi) => {
                  (($r = Xi).customData.onloadend = Ze),
                    ($r.customData.onprogress = nt),
                    ($r.customData.onabort = vt),
                    ($r.customData.ontimeout = ce),
                    (ni.resourceTiming.startTime = Date.now()),
                    Rn.load($r, ni),
                    Fi();
                });
              });
            },
            We = function () {
              if (rt > 0) {
                rt--;
                let Rn = { config: he };
                me.push(Rn),
                  (Rn.timeout = setTimeout(function () {
                    me.indexOf(Rn) !== -1 &&
                      (me.splice(me.indexOf(Rn), 1), ke(he, rt));
                  }, q.getRetryIntervalsForType(Ke.type)));
              } else {
                if (Ke.type === F.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE)
                  return;
                K.error(
                  new ot.default(we[Ke.type], Ke.url + " is not available", {
                    request: Ke,
                    response: fn,
                  })
                ),
                  he.error && he.error(Ke, "error", fn.statusText, fn),
                  he.complete && he.complete(Ke, fn.statusText);
              }
            },
            Ke = he.request,
            Ie = [];
          let Ue, at, ft, Rt, an, tn, fn;
          if (
            ((Ke.bytesLoaded = NaN),
            (Ke.bytesTotal = NaN),
            (Ke.firstByteDate = null),
            (Ke.traces = []),
            (Ue = !0),
            (at = new Date()),
            (ft = at),
            (Rt = 0),
            (an = null),
            !Q || !K)
          )
            throw new Error("config object is not correct or missing");
          const nr = (function (Rn) {
              let $r, ni;
              return (
                Rn.hasOwnProperty("availabilityTimeComplete") &&
                Rn.availabilityTimeComplete === !1 &&
                window.fetch &&
                Rn.responseType === "arraybuffer" &&
                Rn.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE
                  ? ($e ||
                      (($e = Pn(U).create()),
                      $e.setConfig({ dashMetrics: Q, boxParser: ee })),
                    ($r = $e),
                    (ni = P.default.FILE_LOADER_TYPES.FETCH))
                  : (Ge || (Ge = Ct(U).create()),
                    ($r = Ge),
                    (ni = P.default.FILE_LOADER_TYPES.XHR)),
                { loader: $r, fileLoaderType: ni }
              );
            })(Ke),
            Bn = nr.loader;
          var wr;
          (Ke.fileLoaderType = nr.fileLoaderType),
            (Ke.headers = {}),
            (function (Rn) {
              var $r, ni;
              const Fi = Rn == null ? void 0 : Rn.serviceLocation,
                Xi =
                  (ni =
                    ($r = Rn == null ? void 0 : Rn.mediaInfo) == null
                      ? void 0
                      : $r.id) == null
                    ? void 0
                    : ni.toString();
              if (
                Re.isServiceLocationIncluded(Rn.type, Fi) &&
                Re.isAdaptationsIncluded(Xi) &&
                Me.isCmcdEnabled()
              ) {
                const Hi = Me.getCmcdParametersFromManifest(),
                  jt = Hi.mode ? Hi.mode : Te.get().streaming.cmcd.mode;
                if (jt === P.default.CMCD_MODE_QUERY) {
                  Rn.url = sn.default.removeQueryParameterFromUrl(
                    Rn.url,
                    P.default.CMCD_QUERY_KEY
                  );
                  const An = (function (pn) {
                    try {
                      const Mn = [],
                        Zt = Me.getQueryParameter(pn);
                      return Zt && Mn.push(Zt), Mn;
                    } catch {
                      return [];
                    }
                  })(Rn);
                  Rn.url = sn.default.addAdditionalQueryParameterToUrl(
                    Rn.url,
                    An
                  );
                } else
                  jt === P.default.CMCD_MODE_HEADER &&
                    (Rn.headers = Object.assign(
                      Rn.headers,
                      Me.getHeaderParameters(Rn)
                    ));
              }
            })((wr = Ke)),
            (function (Rn) {
              let $r = be.getFinalQueryString(Rn);
              $r &&
                (Rn.url = sn.default.addAdditionalQueryParameterToUrl(
                  Rn.url,
                  $r
                ));
            })(wr),
            (function (Rn) {
              if (Rn.queryParams) {
                const $r = Object.keys(Rn.queryParams).map((ni) => ({
                  key: ni,
                  value: Rn.queryParams[ni],
                }));
                Rn.url = sn.default.addAdditionalQueryParameterToUrl(
                  Rn.url,
                  $r
                );
              }
            })(wr),
            (function (Rn) {
              const $r = qe.getCommonAccessTokenForUrl(Rn.url);
              $r && (Rn.headers[P.default.COMMON_ACCESS_TOKEN_HEADER] = $r);
            })(wr),
            Ke.range && (Ke.headers.Range = "bytes=" + Ke.range);
          const hr = Fe.getXHRWithCredentialsForType(Ke.type);
          (tn = new (class {
            constructor(Rn) {
              (this.url = Rn.url),
                (this.method = Rn.method),
                (this.responseType =
                  Rn.responseType !== void 0 ? Rn.responseType : null),
                (this.headers = Rn.headers !== void 0 ? Rn.headers : {}),
                (this.credentials =
                  Rn.credentials !== void 0 ? Rn.credentials : null),
                (this.mode = Rn.mode !== void 0 ? Rn.mode : null),
                (this.timeout = Rn.timeout !== void 0 ? Rn.timeout : 0),
                (this.cmcd = Rn.cmcd !== void 0 ? Rn.cmcd : null),
                (this.customData =
                  Rn.customData !== void 0 ? Rn.customData : null);
            }
          })({
            url: Ke.url,
            method: F.HTTPRequest.GET,
            responseType: Ke.responseType,
            headers: Ke.headers,
            credentials: hr ? "include" : "omit",
            timeout: ve,
            cmcd: Me.getCmcdData(Ke),
            customData: { request: Ke },
          })),
            (fn = new (class {
              constructor(Rn) {
                (this.request = Rn.request),
                  (this.url = Rn.url !== void 0 ? Rn.url : null),
                  (this.redirected = Rn.redirected !== void 0 && Rn.redirected),
                  (this.status = Rn.status !== void 0 ? Rn.status : null),
                  (this.statusText =
                    Rn.statusText !== void 0 ? Rn.statusText : ""),
                  (this.type = Rn.type !== void 0 ? Rn.type : ""),
                  (this.headers = Rn.headers !== void 0 ? Rn.headers : {}),
                  (this.data = Rn.data !== void 0 ? Rn.data : null),
                  (this.resourceTiming =
                    Rn.resourceTiming !== void 0 ? Rn.resourceTiming : null);
              }
            })({
              request: tn,
              resourceTiming: { startTime: Date.now(), encodedBodySize: 0 },
              status: 0,
            }));
          let pi = new Date().getTime();
          if (isNaN(Ke.delayLoadingTime) || pi >= Ke.delayLoadingTime)
            return se.push(tn), Qe(Bn, tn, fn);
          {
            let Rn = { httpRequest: tn, httpResponse: fn };
            return (
              le.push(Rn),
              (Rn.delayTimeout = setTimeout(function () {
                if (le.indexOf(Rn) !== -1) {
                  le.splice(le.indexOf(Rn), 1);
                  try {
                    (at = new Date()),
                      (ft = at),
                      se.push(Rn.httpRequest),
                      Qe(Bn, Rn.httpRequest, Rn.httpResponse);
                  } catch {
                    Rn.httpRequest.onloadend();
                  }
                }
              }, Ke.delayLoadingTime - pi)),
              Promise.resolve()
            );
          }
        }
        return (
          (_e = {
            abort: function () {
              me.forEach((he) => {
                clearTimeout(he.timeout),
                  he.config.request &&
                    he.config.abort &&
                    he.config.abort(he.config.request);
              }),
                (me = []),
                le.forEach((he) => clearTimeout(he.delayTimeout)),
                (le = []),
                se.forEach((he) => {
                  const rt = he.customData;
                  rt &&
                    ((rt.request &&
                      rt.request.type ===
                        F.HTTPRequest.MSS_FRAGMENT_INFO_SEGMENT_TYPE) ||
                      ((rt.onloadend = rt.onprogress = void 0),
                      rt.abort && rt.abort()));
                }),
                (se = []);
            },
            load: function (he) {
              return he.request
                ? ke(he, q.getRetryAttemptsForType(he.request.type))
                : (he.error && he.error(he.request, "error"),
                  Promise.resolve());
            },
            reset: function () {
              (se = []),
                (le = []),
                (me = []),
                Ge && Ge.reset(),
                $e && $e.reset(),
                (Ge = null),
                ($e = null);
            },
            resetInitialSettings: function () {
              Ge && Ge.resetInitialSettings();
            },
            setConfig: function (he) {
              he &&
                (he.commonAccessTokenController &&
                  (qe = he.commonAccessTokenController),
                he.extUrlQueryInfoController &&
                  (be = he.extUrlQueryInfoController));
            },
          }),
          (Se = (0, E.default)(U).getInstance().getLogger(_e)),
          (se = []),
          (le = []),
          (me = []),
          (Me = Gb(U).getInstance()),
          (Re = dg(U).getInstance()),
          (Oe = Bb(U).getInstance()),
          (Fe = (0, Hb.default)(U).getInstance()),
          (qe = J0(U).getInstance()),
          (be = hg(U).getInstance()),
          (we = {
            [F.HTTPRequest.MPD_TYPE]: fe.DOWNLOAD_ERROR_ID_MANIFEST_CODE,
            [F.HTTPRequest.XLINK_EXPANSION_TYPE]:
              fe.DOWNLOAD_ERROR_ID_XLINK_CODE,
            [F.HTTPRequest.INIT_SEGMENT_TYPE]:
              fe.DOWNLOAD_ERROR_ID_INITIALIZATION_CODE,
            [F.HTTPRequest.MEDIA_SEGMENT_TYPE]:
              fe.DOWNLOAD_ERROR_ID_CONTENT_CODE,
            [F.HTTPRequest.INDEX_SEGMENT_TYPE]:
              fe.DOWNLOAD_ERROR_ID_CONTENT_CODE,
            [F.HTTPRequest.BITSTREAM_SWITCHING_SEGMENT_TYPE]:
              fe.DOWNLOAD_ERROR_ID_CONTENT_CODE,
            [F.HTTPRequest.OTHER_TYPE]: fe.DOWNLOAD_ERROR_ID_CONTENT_CODE,
          }),
          _e
        );
      }
      Xb.__dashjs_factory_name = "HTTPLoader";
      var qE = H.default.getClassFactory(Xb);
      function Vb() {
        let Y, U;
        function K() {
          U = {};
        }
        function Q() {
          K();
        }
        return (
          Q(),
          (Y = {
            getLoader: function (q) {
              for (var ee in U)
                if (U.hasOwnProperty(ee) && q.startsWith(ee)) return U[ee];
              return qE;
            },
            registerLoader: function (q, ee) {
              U[q] = ee;
            },
            unregisterLoader: function (q) {
              U[q] && delete U[q];
            },
            unregisterAllLoader: K,
            reset: Q,
          }),
          Y
        );
      }
      Vb.__dashjs_factory_name = "SchemeLoaderFactory";
      var e2 = H.default.getSingletonFactory(Vb);
      function q0(Y) {
        Y = Y || {};
        const U = this.context;
        let K, Q, q;
        return (
          (Q = e2(U).getInstance()),
          (K = {
            abort: function () {
              q && q.abort();
            },
            load: function (ee) {
              q ||
                (q = Q.getLoader(ee && ee.request ? ee.request.url : null)(
                  U
                ).create({
                  errHandler: Y.errHandler,
                  mediaPlayerModel: Y.mediaPlayerModel,
                  dashMetrics: Y.dashMetrics,
                  boxParser: Y.boxParser ? Y.boxParser : null,
                  constants: Y.constants ? Y.constants : null,
                  dashConstants: Y.dashConstants ? Y.dashConstants : null,
                  urlUtils: Y.urlUtils ? Y.urlUtils : null,
                  requestTimeout: isNaN(Y.requestTimeout)
                    ? 0
                    : Y.requestTimeout,
                  errors: Y.errors,
                })),
                q.load(ee);
            },
            reset: function () {
              Q && (Q.reset(), (Q = null)),
                q && typeof q.reset == "function" && q.reset(),
                (q = null);
            },
            resetInitialSettings: function () {
              q &&
                typeof q.resetInitialSettings == "function" &&
                q.resetInitialSettings();
            },
          }),
          K
        );
      }
      q0.__dashjs_factory_name = "URLLoader";
      var Wh = H.default.getClassFactory(q0),
        t2 = class extends De {
          constructor(Y) {
            super(Y), (this.checkForExistenceOnly = !0);
          }
        };
      function Fc(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.eventBus,
          Q = Y.events,
          q = Y.urlUtils,
          ee = Y.errors,
          fe = Y.streamId;
        let ve, ne;
        return (
          (ve = {
            abort: function () {
              ne && ne.abort();
            },
            checkForExistence: function (Te) {
              const _e = function (se) {
                K.trigger(Q.CHECK_FOR_EXISTENCE_COMPLETED, {
                  request: Te,
                  exists: se,
                });
              };
              if (Te) {
                let se = new t2(Te.url);
                ne.load({
                  request: se,
                  success: function () {
                    _e(!0);
                  },
                  error: function () {
                    _e(!1);
                  },
                });
              } else _e(!1);
            },
            load: function (Te) {
              const _e = function (se, le) {
                K.trigger(Q.LOADING_COMPLETED, {
                  request: Te,
                  response: se || null,
                  error: le || null,
                  sender: ve,
                });
              };
              Te
                ? ne.load({
                    request: Te,
                    progress: function (se) {
                      K.trigger(Q.LOADING_PROGRESS, {
                        request: Te,
                        stream: se.stream,
                        streamId: fe,
                      }),
                        se.data &&
                          K.trigger(Q.LOADING_DATA_PROGRESS, {
                            request: Te,
                            response: se.data || null,
                            error: null,
                            sender: ve,
                          });
                    },
                    success: function (se) {
                      _e(se);
                    },
                    error: function (se, le, me) {
                      _e(
                        void 0,
                        new ot.default(
                          ee.FRAGMENT_LOADER_LOADING_FAILURE_ERROR_CODE,
                          me,
                          le
                        )
                      );
                    },
                    abort: function (se) {
                      se &&
                        K.trigger(Q.LOADING_ABANDONED, {
                          mediaType: se.mediaType,
                          request: se,
                          sender: ve,
                        });
                    },
                  })
                : _e(
                    void 0,
                    new ot.default(
                      ee.FRAGMENT_LOADER_NULL_REQUEST_ERROR_CODE,
                      ee.FRAGMENT_LOADER_NULL_REQUEST_ERROR_MESSAGE
                    )
                  );
            },
            reset: function () {
              ne && (ne.abort(), ne.reset(), (ne = null));
            },
            resetInitialSettings: function () {
              ne && ne.resetInitialSettings();
            },
          }),
          (ne = Wh(U).create({
            errHandler: Y.errHandler,
            errors: ee,
            dashMetrics: Y.dashMetrics,
            mediaPlayerModel: Y.mediaPlayerModel,
            urlUtils: q,
            constants: P.default,
            boxParser: Y.boxParser,
            dashConstants: Y.dashConstants,
            requestTimeout: Y.settings.get().streaming.fragmentRequestTimeout,
          })),
          ve
        );
      }
      Fc.__dashjs_factory_name = "FragmentLoader";
      var zb = H.default.getClassFactory(Fc);
      function fg(Y) {
        Y = Y || {};
        const U = this.context,
          K = (0, X.default)(U).getInstance(),
          Q = Y.errHandler,
          q = Y.mediaPlayerModel,
          ee = Y.dashMetrics,
          fe = (0, E.default)(U).getInstance(),
          ve = Y.streamInfo;
        let ne, Te, _e;
        function se() {
          return ve.id;
        }
        function le() {
          for (let we in _e) _e[we].reset();
          _e = {};
        }
        function me(we) {
          if (!we.sender) return;
          const Me = we.request,
            Oe = we.response,
            Ge = Me.isInitializationRequest(),
            $e = Me.representation.mediaInfo.streamInfo;
          if (
            (we.error &&
              (Me.mediaType === P.default.AUDIO ||
                Me.mediaType === P.default.VIDEO ||
                (Me.mediaType === P.default.TEXT &&
                  Me.representation.mediaInfo.isFragmented)) &&
              K.trigger(G.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD, {
                entry: we.request.serviceLocation,
              }),
            !Oe || !$e)
          )
            return void Te.warn(
              "No " + Me.mediaType + " bytes to push or stream is inactive."
            );
          const Fe = (function (qe, Re, be, Se) {
            const ke = new (class {
              constructor() {
                (this.streamId = null),
                  (this.segmentType = null),
                  (this.quality = NaN),
                  (this.index = NaN),
                  (this.bytes = null),
                  (this.start = NaN),
                  (this.end = NaN),
                  (this.duration = NaN),
                  (this.representation = null),
                  (this.endFragment = null);
              }
            })();
            return (
              (ke.streamId = be),
              (ke.segmentType = Re.type),
              (ke.start = Re.startTime),
              (ke.duration = Re.duration),
              (ke.end = ke.start + ke.duration),
              (ke.bytes = qe),
              (ke.index = Re.index),
              (ke.quality = Re.quality),
              (ke.representation = Re.representation),
              (ke.endFragment = Se),
              ke
            );
          })(Oe, Me, ve.id, we.type !== G.default.FRAGMENT_LOADING_PROGRESS);
          K.trigger(
            Ge
              ? G.default.INIT_FRAGMENT_LOADED
              : G.default.MEDIA_FRAGMENT_LOADED,
            { chunk: Fe, request: Me },
            { streamId: $e.id, mediaType: Me.mediaType }
          );
        }
        return (
          (ne = {
            getStreamId: se,
            getModel: function (we) {
              let Me = _e[we];
              return (
                Me ||
                  ((Me = $t(U).create({
                    streamInfo: ve,
                    type: we,
                    dashMetrics: ee,
                    fragmentLoader: zb(U).create({
                      dashMetrics: ee,
                      mediaPlayerModel: q,
                      errHandler: Q,
                      settings: Y.settings,
                      boxParser: Y.boxParser,
                      eventBus: K,
                      events: G.default,
                      errors: de,
                      dashConstants: Y.dashConstants,
                      urlUtils: Y.urlUtils,
                      streamId: se(),
                    }),
                    debug: fe,
                    eventBus: K,
                    events: G.default,
                  })),
                  (_e[we] = Me)),
                Me
              );
            },
            reset: function () {
              K.off(S.default.FRAGMENT_LOADING_COMPLETED, me, this),
                K.off(S.default.FRAGMENT_LOADING_PROGRESS, me, this),
                le();
            },
          }),
          (Te = fe.getLogger(ne)),
          le(),
          K.on(S.default.FRAGMENT_LOADING_COMPLETED, me, ne),
          K.on(S.default.FRAGMENT_LOADING_PROGRESS, me, ne),
          ne
        );
      }
      fg.__dashjs_factory_name = "FragmentController";
      var n2 = H.default.getClassFactory(fg);
      class Fv {
        constructor(U) {
          if (
            ((this.offset = U._offset),
            (this.type = U.type),
            (this.size = U.size),
            (this.boxes = []),
            U.boxes)
          )
            for (let K = 0; K < U.boxes.length; K++)
              this.boxes.push(new Fv(U.boxes[K]));
          switch (((this.isComplete = !0), U.type)) {
            case "sidx":
              if (
                ((this.timescale = U.timescale),
                (this.earliest_presentation_time =
                  U.earliest_presentation_time),
                (this.first_offset = U.first_offset),
                (this.references = U.references),
                U.references)
              ) {
                this.references = [];
                for (let K = 0; K < U.references.length; K++) {
                  let Q = {
                    reference_type: U.references[K].reference_type,
                    referenced_size: U.references[K].referenced_size,
                    subsegment_duration: U.references[K].subsegment_duration,
                  };
                  this.references.push(Q);
                }
              }
              break;
            case "emsg":
              (this.id = U.id),
                (this.version = U.version === 1 ? 1 : 0),
                (this.value = U.value),
                (this.timescale = U.timescale),
                (this.scheme_id_uri = U.scheme_id_uri),
                (this.presentation_time_delta =
                  U.version === 1
                    ? U.presentation_time
                    : U.presentation_time_delta),
                (this.event_duration = U.event_duration),
                (this.message_data = U.message_data);
              break;
            case "mdhd":
              this.timescale = U.timescale;
              break;
            case "mfhd":
              this.sequence_number = U.sequence_number;
              break;
            case "subs":
              (this.entry_count = U.entry_count), (this.entries = U.entries);
              break;
            case "tfhd":
              (this.base_data_offset = U.base_data_offset),
                (this.sample_description_index = U.sample_description_index),
                (this.default_sample_duration = U.default_sample_duration),
                (this.default_sample_size = U.default_sample_size),
                (this.default_sample_flags = U.default_sample_flags),
                (this.flags = U.flags);
              break;
            case "tfdt":
              (this.version = U.version),
                (this.baseMediaDecodeTime = U.baseMediaDecodeTime),
                (this.flags = U.flags);
              break;
            case "trun":
              if (
                ((this.sample_count = U.sample_count),
                (this.first_sample_flags = U.first_sample_flags),
                (this.data_offset = U.data_offset),
                (this.flags = U.flags),
                (this.samples = U.samples),
                U.samples)
              ) {
                this.samples = [];
                for (let K = 0, Q = U.samples.length; K < Q; K++) {
                  let q = {
                    sample_size: U.samples[K].sample_size,
                    sample_duration: U.samples[K].sample_duration,
                    sample_composition_time_offset:
                      U.samples[K].sample_composition_time_offset,
                  };
                  this.samples.push(q);
                }
              }
              break;
            case "prft":
              (this.version = U.version),
                (this.reference_track_ID = U.reference_track_ID),
                (this.ntp_timestamp_sec = U.ntp_timestamp_sec),
                (this.ntp_timestamp_frac = U.ntp_timestamp_frac),
                (this.media_time = U.media_time),
                (this.flags = U.flags);
          }
        }
        getChildBox(U) {
          for (let K = 0; K < this.boxes.length; K++)
            if (this.boxes[K].type === U) return this.boxes[K];
        }
        getChildBoxes(U) {
          let K = [];
          for (let Q = 0; Q < this.boxes.length; Q++)
            this.boxes[Q].type === U && K.push(this.boxes[Q]);
          return K;
        }
      }
      var r2 = Fv;
      function Kh() {
        let Y, U;
        function K(q) {
          let ee = [];
          if (!q || !U || typeof U.fetchAll != "function") return ee;
          let fe,
            ve = U.fetchAll(q);
          for (let ne = 0, Te = ve.length; ne < Te; ne++)
            (fe = Q(ve[ne])), fe && ee.push(fe);
          return ee;
        }
        function Q(q) {
          if (!q) return null;
          let ee = new r2(q);
          return (
            q.hasOwnProperty("_incomplete") && (ee.isComplete = !q._incomplete),
            ee
          );
        }
        return (
          (Y = {
            getBox: function (q) {
              return q &&
                U &&
                U.boxes &&
                U.boxes.length !== 0 &&
                typeof U.fetch == "function"
                ? Q(U.fetch(q))
                : null;
            },
            getBoxes: K,
            setData: function (q) {
              U = q;
            },
            getLastBox: function () {
              if (!U || !U.boxes || !U.boxes.length) return null;
              let q = K(U.boxes[U.boxes.length - 1].type);
              return q.length > 0 ? q[q.length - 1] : null;
            },
          }),
          Y
        );
      }
      Kh.__dashjs_factory_name = "IsoFile";
      var i2 = H.default.getClassFactory(Kh),
        fh = n(6877),
        Uv = class {
          constructor(Y) {
            let {
              found: U,
              sizeOfLastCompletedBox: K,
              sizeOfLastFoundTargetBox: Q,
              startOffsetOfLastCompletedBox: q,
              startOffsetOfLastFoundTargetBox: ee,
              typeOfLastCompletedBox: fe,
              typeOfLastTargetBox: ve,
            } = Y;
            (this.found = U !== void 0 && U),
              (this.sizeOfLastCompletedBox = K !== void 0 ? K : 0),
              (this.sizeOfLastFoundTargetBox = Q !== void 0 ? Q : 0),
              (this.startOffsetOfLastCompletedBox = q !== void 0 ? q : 0),
              (this.startOffsetOfLastFoundTargetBox = ee !== void 0 ? ee : 0),
              (this.typeOfLastCompletedBox = fe !== void 0 ? fe : null),
              (this.typeOfLastTargetBox = ve !== void 0 ? ve : null);
          }
        };
      function gs() {
        let Y,
          U,
          K = this.context;
        function Q(fe) {
          if (!fe) return null;
          fe.fileStart === void 0 && (fe.fileStart = 0);
          let ve = fh.parseBuffer(fe),
            ne = i2(K).create();
          return ne.setData(ve), ne;
        }
        function q(fe, ve) {
          return (
            (fe[ve + 3] >>> 0) |
            ((fe[ve + 2] << 8) >>> 0) |
            ((fe[ve + 1] << 16) >>> 0) |
            ((fe[ve] << 24) >>> 0)
          );
        }
        function ee(fe, ve) {
          return (
            String.fromCharCode(fe[ve++]) +
            String.fromCharCode(fe[ve++]) +
            String.fromCharCode(fe[ve++]) +
            String.fromCharCode(fe[ve])
          );
        }
        return (
          (U = {
            findInitRange: function (fe) {
              let ve,
                ne,
                Te = null;
              const _e = Q(fe);
              if (!_e) return Te;
              const se = _e.getBox("ftyp"),
                le = _e.getBox("moov");
              return (
                Y.debug("Searching for initialization."),
                le &&
                  le.isComplete &&
                  ((ve = se ? se.offset : le.offset),
                  (ne = le.offset + le.size - 1),
                  (Te = ve + "-" + ne),
                  Y.debug("Found the initialization.  Range: " + Te)),
                Te
              );
            },
            findLastTopIsoBoxCompleted: function (fe, ve, ne) {
              if ((ne === void 0 && (ne = 0), !ve || ne + 8 >= ve.byteLength))
                return new Uv({ found: !1 });
              const Te = ve instanceof ArrayBuffer ? new Uint8Array(ve) : ve;
              let _e,
                se = 0,
                le = 0,
                me = null;
              for (; ne < Te.byteLength; ) {
                const we = q(Te, ne),
                  Me = ee(Te, ne + 4);
                if (we === 0) break;
                ne + we <= Te.byteLength &&
                  (fe.indexOf(Me) >= 0
                    ? (_e = new Uv({
                        found: !0,
                        startOffsetOfLastFoundTargetBox: ne,
                        sizeOfLastFoundTargetBox: we,
                        typeOfLastTargetBox: Me,
                      }))
                    : ((se = ne), (le = we), (me = Me))),
                  (ne += we);
              }
              return (
                _e ||
                new Uv({
                  found: !1,
                  startOffsetOfLastCompletedBox: se,
                  sizeOfLastCompletedBox: le,
                  typeOfLastCompletedBox: me,
                })
              );
            },
            getMediaTimescaleFromMoov: function (fe) {
              let ve = Q(fe),
                ne = ve ? ve.getBox("mdhd") : void 0;
              return ne ? ne.timescale : NaN;
            },
            getSamplesInfo: function (fe) {
              if (!fe || fe.byteLength === 0)
                return {
                  sampleList: [],
                  lastSequenceNumber: NaN,
                  totalDuration: NaN,
                  numSequences: NaN,
                };
              let ve,
                ne,
                Te,
                _e,
                se,
                le,
                me,
                we,
                Me,
                Oe,
                Ge,
                $e,
                Fe,
                qe,
                Re,
                be,
                Se,
                ke = Q(fe),
                he = ke.getBoxes("moof"),
                rt = ke.getBoxes("mfhd");
              (be = ke.getBoxes("moof").length),
                (Re = rt[rt.length - 1].sequence_number),
                (Te = 0),
                (le = []);
              let Ze = -1,
                nt = -1;
              for (Ge = 0; Ge < he.length; Ge++) {
                let vt = he[Ge],
                  ce = vt.getChildBoxes("traf");
                for (Me = 0; Me < ce.length; Me++) {
                  let Ve = ce[Me],
                    je = Ve.getChildBox("tfhd"),
                    it = Ve.getChildBox("tfdt");
                  se = it.baseMediaDecodeTime;
                  let Qe = Ve.getChildBoxes("trun"),
                    We = Ve.getChildBoxes("subs");
                  for (Oe = 0; Oe < Qe.length; Oe++) {
                    let Ke = Qe[Oe];
                    for (
                      Te = Ke.sample_count,
                        qe = (je.base_data_offset || 0) + (Ke.data_offset || 0),
                        we = 0;
                      we < Te;
                      we++
                    ) {
                      (me = Ke.samples[we]),
                        (ve =
                          me.sample_duration !== void 0
                            ? me.sample_duration
                            : je.default_sample_duration),
                        (_e =
                          me.sample_size !== void 0
                            ? me.sample_size
                            : je.default_sample_size),
                        (ne =
                          me.sample_composition_time_offset !== void 0
                            ? me.sample_composition_time_offset
                            : 0);
                      let Ie = {
                        dts: se,
                        cts: se + ne,
                        duration: ve,
                        offset: vt.offset + qe,
                        size: _e,
                        subSizes: [_e],
                      };
                      if (We)
                        for ($e = 0; $e < We.length; $e++) {
                          let Ue = We[$e];
                          if (
                            (Ze < Ue.entry_count - 1 &&
                              we > nt &&
                              (Ze++, (nt += Ue.entries[Ze].sample_delta)),
                            we == nt)
                          ) {
                            Ie.subSizes = [];
                            let at = Ue.entries[Ze];
                            for (Fe = 0; Fe < at.subsample_count; Fe++)
                              Ie.subSizes.push(
                                at.subsamples[Fe].subsample_size
                              );
                          }
                        }
                      le.push(Ie), (qe += _e), (se += ve);
                    }
                  }
                  Se = se - it.baseMediaDecodeTime;
                }
              }
              return {
                sampleList: le,
                lastSequenceNumber: Re,
                totalDuration: Se,
                numSequences: be,
              };
            },
            parse: Q,
          }),
          (Y = (0, E.default)(K).getInstance().getLogger(U)),
          U
        );
      }
      gs.__dashjs_factory_name = "BoxParser";
      var Ia = H.default.getSingletonFactory(gs);
      function jb(Y) {
        const U = this.context,
          K = Y.adapter,
          Q = Y.baseURLController,
          q = Y.streamInfo,
          ee = Y.timelineConverter,
          fe = Y.debug,
          ve = Y.eventBus,
          ne = Y.events,
          Te = Y.dashConstants,
          _e = ar(U).getInstance();
        let se, le, me, we, Me, Oe, Ge, $e, Fe;
        function qe(be, Se) {
          const ke = new (class {
            constructor() {
              (this.bitrate = 0),
                (this.width = 0),
                (this.height = 0),
                (this.tilesHor = 0),
                (this.tilesVert = 0),
                (this.widthPerTile = 0),
                (this.heightPerTile = 0),
                (this.startNumber = 0),
                (this.segmentDuration = 0),
                (this.timescale = 0),
                (this.templateUrl = ""),
                (this.id = "");
            }
          })();
          (ke.id = be.id),
            (ke.bitrate = be.bandwidth),
            (ke.width = be.width),
            (ke.height = be.height),
            (ke.tilesHor = 1),
            (ke.tilesVert = 1),
            be.essentialProperties &&
              be.essentialProperties.forEach((he) => {
                if (
                  P.default.THUMBNAILS_SCHEME_ID_URIS.indexOf(he.schemeIdUri) >=
                    0 &&
                  he.value
                ) {
                  const rt = he.value.split("x");
                  rt.length !== 2 ||
                    isNaN(rt[0]) ||
                    isNaN(rt[1]) ||
                    ((ke.tilesHor = parseInt(rt[0], 10)),
                    (ke.tilesVert = parseInt(rt[1], 10)));
                }
              }),
            Se
              ? Ge.updateSegmentData(be).then((he) => {
                  (function (rt, Ze, nt) {
                    let vt = [];
                    const ce = (function (Ve, je) {
                      const it = [];
                      let Qe,
                        We,
                        Ke,
                        Ie,
                        Ue = 0;
                      for (Qe = 0, We = Ve.segments.length; Qe < We; Qe++)
                        (Ke = Ve.segments[Qe]),
                          (Ie = It(
                            ee,
                            K.getIsDynamic(),
                            je,
                            Ke.startTime,
                            Ke.duration,
                            Ke.timescale,
                            Ke.media,
                            Ke.mediaRange,
                            Ue
                          )),
                          Ie && (it.push(Ie), (Ie = null), Ue++);
                      return it;
                    })(nt, Ze);
                    (Ze.segments = ce),
                      (Ze.fragmentDuration =
                        Ze.segmentDuration ||
                        (Ze.segments && Ze.segments.length > 0
                          ? Ze.segments[0].duration
                          : NaN)),
                      (rt.segmentDuration = Ze.segments[0].duration),
                      (rt.readThumbnail = function (Ve, je) {
                        let it = null;
                        vt.some((Qe) => {
                          if (Qe.start <= Ve && Qe.end > Ve)
                            return (it = Qe.url), !0;
                        }),
                          it
                            ? je(it)
                            : Ze.segments.some((Qe) => {
                                if (
                                  Qe.mediaStartTime <= Ve &&
                                  Qe.mediaStartTime + Qe.duration > Ve
                                ) {
                                  const We = Q.resolve(Ze.path);
                                  return (
                                    $e.load({
                                      method: "get",
                                      url: We.url,
                                      request: {
                                        range: Qe.mediaRange,
                                        responseType: "arraybuffer",
                                      },
                                      onload: function (Ke) {
                                        let Ie = Fe.getSamplesInfo(
                                            Ke.target.response
                                          ),
                                          Ue = new Blob(
                                            [
                                              Ke.target.response.slice(
                                                Ie.sampleList[0].offset,
                                                Ie.sampleList[0].offset +
                                                  Ie.sampleList[0].size
                                              ),
                                            ],
                                            { type: "image/jpeg" }
                                          ),
                                          at = window.URL.createObjectURL(Ue);
                                        vt.push({
                                          start: Qe.mediaStartTime,
                                          end: Qe.mediaStartTime + Qe.duration,
                                          url: at,
                                        }),
                                          je && je(at);
                                      },
                                    }),
                                    !0
                                  );
                                }
                              });
                      });
                  })(ke, be, he);
                })
              : ((ke.startNumber = be.startNumber),
                (ke.segmentDuration = be.segmentDuration),
                (ke.timescale = be.timescale),
                (ke.templateUrl = (function (he) {
                  const rt = _e.isRelative(he.media)
                    ? _e.resolve(he.media, Q.resolve(he.path).url)
                    : he.media;
                  return rt ? Ra(rt, he.id) : "";
                })(be))),
            ke.tilesHor > 0 &&
              ke.tilesVert > 0 &&
              ((ke.widthPerTile = ke.width / ke.tilesHor),
              (ke.heightPerTile = ke.height / ke.tilesVert),
              le.push(ke));
        }
        function Re() {
          (le = []),
            (me = []),
            (Me = -1),
            (Oe = null),
            we && (we.reset(), (we = null));
        }
        return (
          (se = {
            addTracks: function () {
              if (
                !q ||
                !K ||
                ((Oe = K.getMediaInfoForType(q, P.default.IMAGE)), !Oe)
              )
                return;
              const be = K.getVoRepresentations(Oe);
              be &&
                be.length > 0 &&
                be.forEach((Se) => {
                  ((Se.segmentInfoType === I.default.SEGMENT_TEMPLATE &&
                    Se.segmentDuration > 0 &&
                    Se.media) ||
                    Se.segmentInfoType === I.default.SEGMENT_TIMELINE) &&
                    qe(Se),
                    Se.segmentInfoType === I.default.SEGMENT_BASE && qe(Se, !0),
                    me.push(Se);
                }),
                le.length > 0 && le.sort((Se, ke) => Se.bitrate - ke.bitrate);
            },
            getCurrentTrack: function () {
              return Me < 0 ? null : le[Me];
            },
            getCurrentTrackIndex: function () {
              return Me;
            },
            getRepresentations: function () {
              return me;
            },
            getThumbnailRequestForTime: function (be) {
              let Se;
              const ke = K.getVoRepresentations(Oe);
              for (let he = 0; he < ke.length; he++)
                if (le[Me].id === ke[he].id) {
                  Se = ke[he];
                  break;
                }
              return we.getSegmentRequestForTime(Oe, Se, be);
            },
            getTracks: function () {
              return le;
            },
            reset: Re,
            setTrackById: function (be) {
              if (!le || le.length === 0) return;
              const Se = le.findIndex((ke) => ke.id === be);
              Se !== -1 && (Me = Se);
            },
            setTrackByIndex: function (be) {
              le &&
                le.length !== 0 &&
                (be >= le.length && (be = le.length - 1), (Me = be));
            },
          }),
          Re(),
          ($e = Ct(U).create({})),
          (Fe = Ia(U).getInstance()),
          (Ge = st(U).create({
            events: ne,
            eventBus: ve,
            streamInfo: q,
            timelineConverter: ee,
            dashConstants: Te,
            dashMetrics: Y.dashMetrics,
            segmentBaseController: Y.segmentBaseController,
            type: P.default.IMAGE,
          })),
          (we = un(U).create({
            streamInfo: q,
            type: P.default.IMAGE,
            timelineConverter: ee,
            segmentsController: Ge,
            baseURLController: Q,
            debug: fe,
            eventBus: ve,
            events: ne,
            dashConstants: Te,
            urlUtils: _e,
          })),
          we.initialize(!!K && K.getIsDynamic()),
          se
        );
      }
      jb.__dashjs_factory_name = "ThumbnailTracks";
      var Bv = H.default.getClassFactory(jb);
      function Wb(Y) {
        const U = this.context,
          K = Y.streamInfo;
        let Q, q;
        function ee(ve) {
          q.setTrackByIndex(ve);
        }
        function fe() {
          q && q.reset();
        }
        return (
          (Q = {
            getCurrentTrack: function () {
              return q.getCurrentTrack();
            },
            getCurrentTrackIndex: function () {
              return q.getCurrentTrackIndex();
            },
            getPossibleVoRepresentations: function () {
              return q.getRepresentations();
            },
            getStreamId: function () {
              return K.id;
            },
            initialize: function () {
              q.addTracks();
              const ve = q.getTracks();
              ve && ve.length > 0 && ee(0);
            },
            provide: function (ve, ne) {
              if (typeof ne != "function") return;
              const Te = q.getCurrentTrack();
              let _e, se;
              if (!Te || Te.segmentDuration <= 0 || ve == null)
                return void ne(null);
              (se = q.getThumbnailRequestForTime(ve)),
                se && (Te.segmentDuration = se.duration),
                (_e = ve % Te.segmentDuration);
              const le = Math.floor(
                  (_e * Te.tilesHor * Te.tilesVert) / Te.segmentDuration
                ),
                me = new (class {
                  constructor() {
                    (this.url = null),
                      (this.width = null),
                      (this.height = null),
                      (this.x = null),
                      (this.y = null);
                  }
                })();
              if (
                ((me.width = Math.floor(Te.widthPerTile)),
                (me.height = Math.floor(Te.heightPerTile)),
                (me.x = Math.floor(le % Te.tilesHor) * Te.widthPerTile),
                (me.y = Math.floor(le / Te.tilesHor) * Te.heightPerTile),
                "readThumbnail" in Te)
              )
                return Te.readThumbnail(ve, (we) => {
                  (me.url = we), ne(me);
                });
              if (se) (me.url = se.url), (Te.segmentDuration = NaN);
              else {
                const we = Math.floor(ve / Te.segmentDuration);
                me.url = (function (Me, Oe) {
                  const Ge = Oe + Me.startNumber;
                  let $e = En(Me.templateUrl, "Number", Ge);
                  return (
                    ($e = En(
                      $e,
                      "Time",
                      (Ge - 1) * Me.segmentDuration * Me.timescale
                    )),
                    ($e = En($e, "Bandwidth", Me.bandwidth)),
                    hi($e)
                  );
                })(Te, we);
              }
              ne(me);
            },
            reset: fe,
            setTrackByIndex: ee,
            setTrackById: function (ve) {
              q.setTrackById(ve);
            },
          }),
          fe(),
          (q = Bv(U).create({
            streamInfo: K,
            adapter: Y.adapter,
            baseURLController: Y.baseURLController,
            timelineConverter: Y.timelineConverter,
            debug: Y.debug,
            eventBus: Y.eventBus,
            events: Y.events,
            dashConstants: Y.dashConstants,
            dashMetrics: Y.dashMetrics,
            segmentBaseController: Y.segmentBaseController,
          })),
          Q
        );
      }
      Wb.__dashjs_factory_name = "ThumbnailController";
      var wi = H.default.getClassFactory(Wb);
      function zo(Y) {
        let U;
        Y = Y || {};
        let K = [];
        const Q = (0, X.default)(this.context).getInstance(),
          q = Y.updateEventName,
          ee = Y.addBlacklistEventName;
        function fe(ne) {
          K.indexOf(ne) === -1 && (K.push(ne), Q.trigger(q, { entry: ne }));
        }
        function ve(ne) {
          fe(ne.entry);
        }
        return (
          (U = {
            add: fe,
            remove: function (ne) {
              const Te = K.indexOf(ne);
              Te !== -1 && K.splice(Te, 1);
            },
            contains: function (ne) {
              return !!(K.length && ne && ne.length) && K.indexOf(ne) !== -1;
            },
            reset: function () {
              ee && Q.off(ee, ve, U), (K = []);
            },
          }),
          ee && Q.on(ee, ve, U),
          U
        );
      }
      zo.__dashjs_factory_name = "BlackListController";
      var Hv = H.default.getClassFactory(zo);
      const Kb = [
        P.default.VIDEO,
        P.default.AUDIO,
        P.default.TEXT,
        P.default.MUXED,
        P.default.IMAGE,
      ];
      function ph(Y) {
        Y = Y || {};
        const U = this.context,
          K = (0, X.default)(U).getInstance(),
          Q = ar(U).getInstance(),
          q = Y.manifestModel,
          ee = Y.mediaPlayerModel,
          fe = Y.dashMetrics,
          ve = Y.manifestUpdater,
          ne = Y.adapter,
          Te = Y.timelineConverter,
          _e = Y.capabilities,
          se = Y.errHandler,
          le = Y.abrController,
          me = Y.playbackController,
          we = Y.throughputController,
          Me = Y.eventController,
          Oe = Y.mediaController,
          Ge = Y.protectionController,
          $e = Y.textController,
          Fe = Y.videoModel;
        let qe = Y.streamInfo;
        const Re = Y.settings;
        let be, Se, ke, he, rt, Ze, nt, vt, ce, Ve, je, it, Qe, We, Ke, Ie;
        function Ue(Zt, Fn, Hn) {
          return new Promise((Sr, fr) => {
            Bn(), hr();
            let Lr = Fe.getElement();
            const Jt = [];
            Kb.forEach((Cn) => {
              if (
                (Cn !== P.default.TEXT || Zt) &&
                (Cn !== P.default.VIDEO ||
                  !Lr ||
                  (Lr && /^VIDEO$/i.test(Lr.nodeName)))
              ) {
                const rr = Hn.find((Er) => Er.mediaInfo.type === Cn);
                Jt.push(at(Cn, Zt, rr));
              }
            }),
              Promise.all(Jt)
                .then(() => {
                  return (
                    (Cn = Fn),
                    new Promise((rr) => {
                      const Er = {},
                        gn = ke.map((ct) => {
                          const Vt = ct.getRepresentation();
                          return ct.createBufferSinks(Cn, Vt);
                        });
                      Promise.all(gn)
                        .then((ct) => {
                          ct.forEach((Vt) => {
                            Vt && (Er[Vt.getType()] = Vt);
                          }),
                            rr(Er);
                        })
                        .catch(() => {
                          rr(Er);
                        });
                    })
                  );
                  var Cn;
                })
                .then((Cn) => {
                  if (ke.length === 0) {
                    const rr = "No streams to play.";
                    se.error(
                      new ot.default(
                        de.MANIFEST_ERROR_ID_NOSTREAMS_CODE,
                        rr,
                        q.getValue()
                      )
                    ),
                      Se.fatal(rr);
                  } else An();
                  Zt && $e.createTracks(qe), Sr(Cn);
                })
                .catch((Cn) => {
                  fr(Cn);
                });
          });
        }
        function at(Zt, Fn, Hn) {
          let Sr,
            fr = ne.getAllMediaInfoForType(qe, Zt),
            Lr = [],
            Jt = null;
          if (!fr || fr.length === 0)
            return Se.info("No " + Zt + " data."), Promise.resolve();
          Zt === P.default.VIDEO && (nt = !0),
            Zt === P.default.AUDIO && (vt = !0);
          for (let rr = 0, Er = fr.length; rr < Er; rr++)
            (Jt = fr[rr]),
              Zt === P.default.TEXT &&
                Jt.isEmbedded &&
                ($e.addEmbeddedTrack(qe, Jt), Lr.push(Jt)),
              ft(Jt) && Oe.addTrack(Jt);
          if (
            (Lr.length > 0 &&
              (Oe.setInitialMediaSettingsForType(Zt, qe),
              $e.addMediaInfosToBuffer(qe, Zt, Lr)),
            (fr = fr.filter((rr) => !rr.isEmbedded)),
            fr.length === 0)
          )
            return Promise.resolve();
          if (Zt === P.default.IMAGE)
            return (
              (Ve = wi(U).create({
                streamInfo: qe,
                adapter: ne,
                baseURLController: Y.baseURLController,
                timelineConverter: Y.timelineConverter,
                debug: We,
                eventBus: K,
                events: G.default,
                dashConstants: I.default,
                dashMetrics: Y.dashMetrics,
                segmentBaseController: Y.segmentBaseController,
              })),
              Ve.initialize(),
              Promise.resolve()
            );
          K.trigger(G.default.STREAM_INITIALIZING, {
            streamInfo: qe,
            mediaInfo: Jt,
          }),
            Oe.setInitialMediaSettingsForType(Zt, qe);
          let Cn = (function (rr, Er) {
            const gn = rr && rr.length > 0 ? rr[0] : null;
            let ct = ce.getModel(gn ? gn.type : null);
            const Vt = gn ? gn.type : null,
              kn = gn ? gn.mimeType : null,
              zt = gn ? gn.isFragmented : null;
            let zn = Je(U).create({
              abrController: le,
              adapter: ne,
              baseURLController: Y.baseURLController,
              boxParser: Qe,
              capabilities: _e,
              dashMetrics: Y.dashMetrics,
              errHandler: se,
              fragmentModel: ct,
              manifestModel: q,
              mediaController: Oe,
              mediaPlayerModel: ee,
              mimeType: kn,
              playbackController: me,
              segmentBaseController: Y.segmentBaseController,
              segmentBlacklistController: je,
              settings: Re,
              streamInfo: qe,
              textController: $e,
              throughputController: we,
              timelineConverter: Te,
              type: Vt,
            });
            return (
              zn.initialize(Er, nt, zt),
              ke.push(zn),
              zn.setMediaInfoArray(rr),
              Vt === P.default.TEXT && $e.addMediaInfosToBuffer(qe, Vt, rr, ct),
              zn
            );
          })(fr, Fn);
          if (((Sr = Oe.getCurrentTrackFor(Zt, qe.id)), Sr)) {
            const rr = Zt === P.default.TEXT && Sr.isEmbedded ? fr[0] : Sr,
              Er = new cr({
                newMediaInfo: rr,
                previouslySelectedRepresentation: Hn,
              });
            return Cn.selectMediaInfo(Er);
          }
          return Promise.resolve();
        }
        function ft(Zt) {
          const Fn = Zt ? Zt.type : null;
          let Hn;
          return Fn === P.default.MUXED
            ? ((Hn =
                "Multiplexed representations are intentionally not supported, as they are not compliant with the DASH-AVC/264 guidelines"),
              Se.fatal(Hn),
              se.error(
                new ot.default(
                  de.MANIFEST_ERROR_ID_MULTIPLEXED_CODE,
                  Hn,
                  q.getValue()
                )
              ),
              !1)
            : !(
                Fn !== P.default.TEXT &&
                Fn !== P.default.IMAGE &&
                Zt.contentProtection &&
                Zt.contentProtection.length > 0 &&
                !_e.supportsEncryptedMedia() &&
                (se.error(
                  new ot.default(
                    de.CAPABILITY_MEDIAKEYS_ERROR_CODE,
                    de.CAPABILITY_MEDIAKEYS_ERROR_MESSAGE
                  )
                ),
                1)
              );
        }
        function Rt(Zt) {
          let Fn = ke ? ke.length : 0;
          for (let Hn = 0; Hn < Fn; Hn++) {
            let Sr = ke[Hn].getFragmentModel();
            Sr.abortRequests(), Sr.resetInitialSettings(), ke[Hn].reset(!1, Zt);
          }
          $e && $e.deactivateStream(qe),
            Ve && (Ve.reset(), (Ve = null)),
            (ke = []),
            (rt = !1),
            (Ze = !1),
            pn(!1),
            tn(!1),
            K.trigger(G.default.STREAM_DEACTIVATED, { streamInfo: qe });
        }
        function an(Zt) {
          Rt(Zt), (he = !1), (nt = !1), (vt = !1), (Ke = !1), (Ie = []);
        }
        function tn(Zt) {
          Ke = Zt;
        }
        function fn() {
          return qe ? qe.start : NaN;
        }
        function nr() {
          return qe ? qe.id : null;
        }
        function Bn() {
          if (!Fe || !le) throw new Error(P.default.MISSING_CONFIG_ERROR);
        }
        function wr(Zt) {
          Zt.error && (se.error(Zt.error), Se.fatal(Zt.error.message));
        }
        function hr() {
          if (Me) {
            const Zt = ne.getEventsFor(qe);
            Zt && Zt.length > 0 && Me.addInlineEvents(Zt, qe.id);
          }
        }
        function pi(Zt) {
          let Fn = Rn(Zt);
          return Fn ? Fn.getMediaInfo() : null;
        }
        function Rn(Zt) {
          return Zt ? ke.find((Fn) => Fn.getType() === Zt) : null;
        }
        function $r() {
          let Zt = Hi();
          const Fn = Zt.length;
          if (Fn !== 0) {
            for (let Hn = 0; Hn < Fn; Hn++)
              if (
                !Zt[Hn].isBufferingCompleted() &&
                (Zt[Hn].getType() === P.default.AUDIO ||
                  Zt[Hn].getType() === P.default.VIDEO)
              )
                return void Se.debug(
                  "onBufferingCompleted - One streamProcessor has finished but",
                  Zt[Hn].getType(),
                  "one is not buffering completed"
                );
            Se.debug(
              "onBufferingCompleted - trigger STREAM_BUFFERING_COMPLETED"
            ),
              (Ze = !0),
              K.trigger(
                G.default.STREAM_BUFFERING_COMPLETED,
                { streamInfo: qe },
                { streamInfo: qe }
              );
          } else
            Se.warn(
              "onBufferingCompleted - can't trigger STREAM_BUFFERING_COMPLETED because no streamProcessor is defined"
            );
        }
        function ni(Zt) {
          Me && Me.addInbandEvents(Zt.events, qe.id);
        }
        function Fi(Zt) {
          return Zt && Zt.type ? Xi(Zt.type) : null;
        }
        function Xi(Zt) {
          return Zt
            ? Hi().filter(function (Fn) {
                return Fn.getType() === Zt;
              })[0]
            : null;
        }
        function Hi() {
          let Zt,
            Fn,
            Hn = [];
          for (let Sr = 0; Sr < ke.length; Sr++)
            (Fn = ke[Sr]),
              (Zt = Fn.getType()),
              (Zt !== P.default.AUDIO &&
                Zt !== P.default.VIDEO &&
                Zt !== P.default.TEXT) ||
                Hn.push(Fn);
          return Hn;
        }
        function jt() {
          const Zt = ke.length;
          for (let Fn = 0; Fn < Zt && ke[Fn]; Fn++)
            ke[Fn].getScheduleController().startScheduleTimer();
        }
        function An() {
          const Zt = ke.length;
          if (Ge) {
            Ge.clearMediaInfoArray();
            for (let Fn = 0; Fn < Zt && ke[Fn]; Fn++) {
              const Hn = ke[Fn].getType(),
                Sr = ke[Fn].getMediaInfo();
              if (
                Hn === P.default.AUDIO ||
                Hn === P.default.VIDEO ||
                (Hn === P.default.TEXT && Sr && Sr.isFragmented)
              ) {
                let fr = ke[Fn].getMediaInfo();
                fr && Ge.initializeForMedia(fr);
              }
            }
            Ge.handleKeySystemFromManifest();
          }
          he ||
            ((he = !0),
            Fe.waitForReadyState(
              P.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,
              () => {
                K.trigger(G.default.STREAM_INITIALIZED, { streamInfo: qe });
              }
            ));
        }
        function pn(Zt) {
          it = Zt;
        }
        function Mn() {
          return it;
        }
        return (
          (be = {
            activate: function (Zt, Fn) {
              let Hn =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : [];
              return new Promise((Sr, fr) => {
                if (!rt)
                  return Mn()
                    ? ((rt = !0),
                      K.trigger(G.default.STREAM_ACTIVATED, { streamInfo: qe }),
                      void Sr(Fn))
                    : void (function (Lr, Jt) {
                        return Ue(
                          Lr,
                          Jt,
                          arguments.length > 2 && arguments[2] !== void 0
                            ? arguments[2]
                            : []
                        );
                      })(Zt, Fn, Hn)
                        .then((Lr) => {
                          (rt = !0),
                            Hn && Hn.length > 0 && jt(),
                            K.trigger(G.default.STREAM_ACTIVATED, {
                              streamInfo: qe,
                            }),
                            Sr(Lr);
                        })
                        .catch((Lr) => {
                          fr(Lr);
                        });
                Sr(Fn);
              });
            },
            checkAndHandleCompletedBuffering: function () {
              Ze ||
                ke.forEach((Zt) => {
                  Zt.checkAndHandleCompletedBuffering();
                });
            },
            deactivate: Rt,
            getAdapter: function () {
              return ne;
            },
            getCurrentMediaInfoForType: function (Zt) {
              const Fn = Xi(Zt);
              return Fn ? Fn.getMediaInfo() : null;
            },
            getCurrentRepresentationForType: function (Zt) {
              const Fn = Xi(Zt);
              return Fn ? Fn.getRepresentation() : null;
            },
            getDuration: function () {
              return qe ? qe.duration : NaN;
            },
            getHasAudioTrack: function () {
              return vt;
            },
            getHasFinishedBuffering: function () {
              return Ze;
            },
            getHasVideoTrack: function () {
              return nt;
            },
            getId: nr,
            getIsActive: function () {
              return rt;
            },
            getIsEndedEventSignaled: function () {
              return Ke;
            },
            getPreloaded: Mn,
            getRepresentationForTypeById: function (Zt, Fn) {
              let Hn;
              if (Zt === P.default.IMAGE) {
                if (!Ve) return null;
                Hn = Ve.getPossibleVoRepresentations();
              } else
                Hn = (function (fr) {
                  let Lr = Rn(fr);
                  return Lr ? Lr.getAllMediaInfos() : [];
                })(Zt).flatMap((fr) =>
                  le.getPossibleVoRepresentationsFilteredBySettings(fr, !0)
                );
              if (!Hn || Hn.length === 0) return null;
              const Sr = Hn.filter((fr) => fr.id === Fn);
              return Sr && Sr.length > 0 ? Sr[0] : null;
            },
            getRepresentationForTypeByIndex: function (Zt, Fn) {
              let Hn;
              if (Zt === P.default.IMAGE) {
                if (!Ve) return null;
                Hn = Ve.getPossibleVoRepresentations();
              } else {
                const Sr = pi(Zt);
                Hn = le.getPossibleVoRepresentationsFilteredBySettings(Sr, !0);
              }
              return Hn[(Fn = Math.max(Math.min(Fn, Hn.length - 1), 0))];
            },
            getRepresentationsByType: function (Zt) {
              if ((Bn(), Zt === P.default.IMAGE))
                return Ve ? Ve.getPossibleVoRepresentations() : [];
              const Fn = pi(Zt);
              return le.getPossibleVoRepresentationsFilteredBySettings(Fn, !0);
            },
            getStartTime: fn,
            getStreamId: function () {
              return qe ? qe.id : null;
            },
            getStreamInfo: function () {
              return qe;
            },
            getStreamProcessors: Hi,
            getThumbnailController: function () {
              return Ve;
            },
            initialize: function () {
              K.on(G.default.BUFFERING_COMPLETED, $r, be),
                K.on(G.default.INBAND_EVENTS, ni, be),
                Ge &&
                  (K.on(G.default.KEY_ERROR, wr, be),
                  K.on(G.default.SERVER_CERTIFICATE_UPDATED, wr, be),
                  K.on(G.default.LICENSE_REQUEST_COMPLETE, wr, be),
                  K.on(G.default.KEY_SYSTEM_SELECTED, wr, be),
                  K.on(G.default.KEY_SESSION_CREATED, wr, be)),
                $e.initializeForStream(qe),
                K.trigger(G.default.STREAM_UPDATED, { streamInfo: qe });
            },
            initializeForTextWithMediaSource: function (Zt) {
              return new Promise((Fn, Hn) => {
                at(P.default.TEXT, Zt, null)
                  .then(() =>
                    (function () {
                      const Sr = Xi(P.default.TEXT);
                      return Sr ? Sr.createBufferSinks() : Promise.resolve();
                    })()
                  )
                  .then(() => {
                    $e.createTracks(qe), Fn();
                  })
                  .catch((Sr) => {
                    Hn(Sr);
                  });
              });
            },
            prepareQualityChange: function (Zt) {
              const Fn = Xi(Zt.mediaType);
              Fn && Fn.prepareQualityChange(Zt);
            },
            prepareTrackChange: function (Zt) {
              if (!rt || !qe) return;
              Ze = !1;
              let Fn = Zt.newMediaInfo,
                Hn = q.getValue(),
                Sr = Fi(Fn);
              if (!Sr) return;
              let fr = me.getTime();
              if (
                (Se.info(
                  "Stream -  Process track changed at current time " + fr
                ),
                Hn.refreshManifestOnSwitchTrack)
              )
                Ie.push(Zt),
                  ve.getIsUpdating() ||
                    (Se.debug("Stream -  Refreshing manifest for switch track"),
                    ve.refreshManifest());
              else {
                Sr.clearScheduleTimer(), Sr.setTrackSwitchInProgress(!0);
                const Lr = Sr.getRepresentation();
                Sr.selectMediaInfo(new cr({ newMediaInfo: Fn }))
                  .then(() => {
                    const Jt =
                      !!(
                        Zt &&
                        Zt.options &&
                        Zt.options.hasOwnProperty("replaceBuffer")
                      ) && Zt.options.replaceBuffer;
                    return Sr.prepareTrackSwitch(Lr, Jt);
                  })
                  .then(() => {
                    Sr.setTrackSwitchInProgress(!1);
                  });
              }
            },
            reset: function (Zt) {
              ce && (ce.reset(), (ce = null)),
                le && qe && le.clearDataForStream(qe.id),
                je && (je.reset(), (je = null)),
                $e && qe && $e.clearDataForStream(qe.id),
                Oe && qe && Oe.clearDataForStream(qe.id),
                an(Zt),
                (qe = null),
                K.off(G.default.BUFFERING_COMPLETED, $r, be),
                K.off(G.default.INBAND_EVENTS, ni, be),
                Ge &&
                  (K.off(G.default.KEY_ERROR, wr, be),
                  K.off(G.default.SERVER_CERTIFICATE_UPDATED, wr, be),
                  K.off(G.default.LICENSE_REQUEST_COMPLETE, wr, be),
                  K.off(G.default.KEY_SYSTEM_SELECTED, wr, be),
                  K.off(G.default.KEY_SESSION_CREATED, wr, be));
            },
            setIsEndedEventSignaled: tn,
            setMediaSource: function (Zt) {
              return new Promise((Fn, Hn) => {
                const Sr = [];
                for (let fr = 0; fr < ke.length; )
                  ft(ke[fr].getMediaInfo())
                    ? (Sr.push(ke[fr].setMediaSource(Zt)), fr++)
                    : (ke[fr].reset(), ke.splice(fr, 1));
                Promise.all(Sr)
                  .then(() => {
                    for (let fr = 0; fr < ke.length; fr++)
                      ke[fr].dischargePreBuffer();
                    if (ke.length === 0) {
                      const fr = "No streams to play.";
                      se.error(
                        new ot.default(
                          de.MANIFEST_ERROR_ID_NOSTREAMS_CODE,
                          fr + "nostreams",
                          q.getValue()
                        )
                      ),
                        Se.fatal(fr);
                    }
                    Fn();
                  })
                  .catch((fr) => {
                    Se.error(fr), Hn(fr);
                  });
              });
            },
            startPreloading: function (Zt, Fn) {
              let Hn =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : [];
              return new Promise((Sr, fr) => {
                Mn()
                  ? fr()
                  : (Se.info(
                      `[startPreloading] Preloading next stream with id ${nr()}`
                    ),
                    pn(!0),
                    Ue(Zt, Fn, Hn)
                      .then(() => {
                        for (let Lr = 0; Lr < ke.length && ke[Lr]; Lr++)
                          ke[Lr].setExplicitBufferingTime(fn()),
                            ke[Lr].getScheduleController().startScheduleTimer();
                        Sr();
                      })
                      .catch(() => {
                        pn(!1), fr();
                      }));
              });
            },
            startScheduleControllers: jt,
            triggerProtectionError: function (Zt) {
              wr(Zt);
            },
            updateData: function (Zt) {
              return new Promise((Fn) => {
                (qe = Zt), Me && hr();
                let Hn,
                  Sr = [];
                for (let fr = 0, Lr = ke.length; fr < Lr; fr++) {
                  let Jt = ke[fr];
                  const Cn = Jt.getMediaInfo();
                  Sr.push(Jt.updateStreamInfo(qe));
                  let rr = ne.getAllMediaInfoForType(qe, Jt.getType());
                  if (
                    ((rr = rr.filter((Er) => !Er.isEmbedded)),
                    Jt.setMediaInfoArray(rr),
                    rr)
                  )
                    for (let Er = 0; Er < rr.length; Er++)
                      ne.areMediaInfosEqual(Cn, rr[Er]) &&
                        Sr.push(
                          Jt.selectMediaInfo(new cr({ newMediaInfo: rr[Er] }))
                        );
                }
                Promise.all(Sr)
                  .then(() => {
                    let fr = [];
                    for (; Ie.length > 0; ) {
                      let Lr = Ie.pop(),
                        Jt = Lr.newMediaInfo;
                      if (((Hn = Fi(Lr.oldMediaInfo)), !Hn)) return;
                      const Cn = Hn.getRepresentation();
                      Hn.setTrackSwitchInProgress(!0),
                        fr.push(Hn.prepareTrackSwitch(Cn)),
                        fr.push(
                          Hn.selectMediaInfo(new cr({ newMediaInfo: Jt }))
                        );
                    }
                    return Promise.all(fr);
                  })
                  .then(() => {
                    An(),
                      Hn && Hn.setTrackSwitchInProgress(!1),
                      K.trigger(G.default.STREAM_UPDATED, { streamInfo: qe }),
                      Fn();
                  })
                  .catch((fr) => {
                    se.error(fr);
                  });
              });
            },
          }),
          (function () {
            try {
              (We = (0, E.default)(U).getInstance()),
                (Se = We.getLogger(be)),
                an(),
                (Qe = Ia(U).getInstance()),
                (je = Hv(U).create({
                  updateEventName: G.default.SEGMENT_LOCATION_BLACKLIST_CHANGED,
                  addBlacklistEventName:
                    G.default.SEGMENT_LOCATION_BLACKLIST_ADD,
                })),
                (ce = n2(U).create({
                  streamInfo: qe,
                  mediaPlayerModel: ee,
                  dashMetrics: fe,
                  errHandler: se,
                  settings: Re,
                  boxParser: Qe,
                  dashConstants: I.default,
                  urlUtils: Q,
                }));
            } catch (Zt) {
              throw Zt;
            }
          })(),
          be
        );
      }
      ph.__dashjs_factory_name = "Stream";
      var qR = H.default.getClassFactory(ph);
      function Xv() {
        const Y = this.context,
          U = ar(Y).getInstance();
        let K, Q, q, ee, fe, ve, ne, Te, _e, se, le, me, we, Me, Oe;
        function Ge(nt) {
          qe(nt, "baseUrl");
        }
        function $e(nt) {
          qe(nt, "location");
        }
        function Fe(nt) {
          var vt, ce;
          nt &&
            nt.throughputValues &&
            nt.throughputValues.serviceLocation &&
            ((vt = nt.throughputValues.serviceLocation),
            (ce = nt.throughputValues),
            fe[vt] || (fe[vt] = []),
            fe[vt].push(ce),
            fe[vt].length > 4 && fe[vt].shift());
        }
        function qe(nt, vt) {
          if (nt && nt.request && nt.request.serviceLocation) {
            const ce = nt.request.serviceLocation;
            ee[vt].all.indexOf(ce) === -1 && ee[vt].all.push(ce),
              (ee[vt].current = ce);
          }
        }
        function Re() {
          const nt = le.getValue();
          let vt = Oe.getContentSteering(nt);
          return (
            vt || (vt = me.getServiceDescriptionSettings().contentSteering), vt
          );
        }
        function be() {
          return new Promise((nt) => {
            try {
              const vt = Re();
              if (!vt || !vt.serverUrl) return void nt();
              const ce = (function (je) {
                  let it = je.serverUrl;
                  q &&
                    q.reloadUri &&
                    (it = U.isRelative(q.reloadUri)
                      ? U.resolve(q.reloadUri, je.serverUrl)
                      : q.reloadUri);
                  const Qe = [],
                    We = ee.baseUrl.all.concat(ee.location.all);
                  if (We.length > 0) {
                    const Ke = We.map((at) => ({
                      serviceLocation: at,
                      throughput: (function (ft) {
                        if (!ft || !fe[ft] || fe[ft].length === 0) return -1;
                        const Rt = we.getArithmeticMean(
                          fe[ft],
                          fe[ft].length,
                          !0
                        );
                        return parseInt(1e3 * Rt);
                      })(at),
                    }));
                    Ke.sort((at, ft) => ft.throughput - at.throughput);
                    let Ie = "",
                      Ue = "";
                    Ke.forEach((at, ft) => {
                      ft !== 0 &&
                        ((Ie = `${Ie},`),
                        at.throughput > -1 && (Ue = `${Ue},`)),
                        (Ie = `${Ie}${at.serviceLocation}`),
                        at.throughput > -1 && (Ue = `${Ue}${at.throughput}`);
                    }),
                      Qe.push({ key: "_DASH_pathway", value: `"${Ie}"` }),
                      Qe.push({ key: "_DASH_throughput", value: Ue });
                  }
                  return (
                    (it = sn.default.addAdditionalQueryParameterToUrl(it, Qe)),
                    it
                  );
                })(vt),
                Ve = new (class {
                  constructor(je) {
                    (this.url = je || null),
                      (this.type = F.HTTPRequest.CONTENT_STEERING_TYPE),
                      (this.responseType = "json");
                  }
                })(ce);
              ne.load({
                request: Ve,
                success: (je) => {
                  var it;
                  (it = je) &&
                    it[I.default.CONTENT_STEERING_RESPONSE.VERSION] &&
                    parseInt(
                      it[I.default.CONTENT_STEERING_RESPONSE.VERSION]
                    ) === 1 &&
                    ((q = new (class {
                      constructor() {
                        (this.version = null),
                          (this.ttl = 300),
                          (this.reloadUri = null),
                          (this.pathwayPriority = []),
                          (this.pathwayClones = []);
                      }
                    })()),
                    (q.version =
                      it[I.default.CONTENT_STEERING_RESPONSE.VERSION]),
                    it[I.default.CONTENT_STEERING_RESPONSE.TTL] &&
                      !isNaN(it[I.default.CONTENT_STEERING_RESPONSE.TTL]) &&
                      (q.ttl = it[I.default.CONTENT_STEERING_RESPONSE.TTL]),
                    it[I.default.CONTENT_STEERING_RESPONSE.RELOAD_URI] &&
                      (q.reloadUri =
                        it[I.default.CONTENT_STEERING_RESPONSE.RELOAD_URI]),
                    it[I.default.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY] &&
                      (q.pathwayPriority =
                        it[
                          I.default.CONTENT_STEERING_RESPONSE.PATHWAY_PRIORITY
                        ]),
                    it[I.default.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES] &&
                      ((q.pathwayClones =
                        it[I.default.CONTENT_STEERING_RESPONSE.PATHWAY_CLONES]),
                      (q.pathwayClones = q.pathwayClones.filter((Qe) => {
                        return (
                          (We = Qe)[
                            I.default.CONTENT_STEERING_RESPONSE.BASE_ID
                          ] &&
                          We[I.default.CONTENT_STEERING_RESPONSE.ID] &&
                          We[
                            I.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT
                          ] &&
                          We[
                            I.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT
                          ][I.default.CONTENT_STEERING_RESPONSE.HOST]
                        );
                        var We;
                      }))),
                    he()),
                    Me.trigger(S.default.CONTENT_STEERING_REQUEST_COMPLETED, {
                      currentSteeringResponseData: q,
                      url: ce,
                    }),
                    nt();
                },
                error: (je, it, Qe, We) => {
                  (function (Ke, Ie) {
                    try {
                      switch (
                        (Q.warn(
                          "Error fetching data from content steering server",
                          Ke
                        ),
                        Ie.status)
                      ) {
                        case 410:
                          break;
                        case 429:
                          const Ue =
                            Ie && Ie.getResponseHeader
                              ? Ie.getResponseHeader("retry-after")
                              : null;
                          Ue !== null &&
                            (q || (q = {}), (q.ttl = parseInt(Ue))),
                            he();
                          break;
                        default:
                          he();
                      }
                    } catch (Ue) {
                      Q.error(Ue);
                    }
                  })(je, We),
                    nt(je);
                },
                complete: () => {
                  (ee.baseUrl.all = Se(ee.baseUrl)),
                    (ee.location.all = Se(ee.location));
                },
              });
            } catch (vt) {
              nt(vt);
            }
          });
        }
        function Se(nt) {
          return nt.all && nt.all.length !== 0 && nt.current
            ? nt.all.filter((vt) => vt === nt.current)
            : [];
        }
        function ke(nt) {
          try {
            const vt = [];
            return (
              nt &&
                nt.length !== 0 &&
                q &&
                q.pathwayClones &&
                q.pathwayClones.length !== 0 &&
                q.pathwayClones.forEach((ce) => {
                  let Ve = nt.filter(
                      (it) =>
                        ce[I.default.CONTENT_STEERING_RESPONSE.BASE_ID] ===
                        it.serviceLocation
                    ),
                    je = null;
                  if ((Ve && Ve.length > 0 && (je = Ve[0]), je)) {
                    const it = new URL(je.url);
                    let Qe =
                      ce[I.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][
                        I.default.CONTENT_STEERING_RESPONSE.HOST
                      ];
                    Qe = sn.default.stringHasProtocol(Qe)
                      ? Qe
                      : `${it.protocol}//${Qe}`;
                    const We = {
                      synthesizedUrl: `${Qe}${it.pathname}`,
                      serviceLocation:
                        ce[I.default.CONTENT_STEERING_RESPONSE.ID],
                      queryParams:
                        ce[I.default.CONTENT_STEERING_RESPONSE.URI_REPLACEMENT][
                          I.default.CONTENT_STEERING_RESPONSE.PARAMS
                        ],
                      reference: je,
                    };
                    vt.push(We);
                  }
                }),
              vt
            );
          } catch (vt) {
            return Q.error(vt), [];
          }
        }
        function he() {
          q &&
            q.ttl &&
            !isNaN(q.ttl) &&
            (ve && clearTimeout(ve),
            (ve = setTimeout(() => {
              be();
            }, 1e3 * q.ttl)));
        }
        function rt() {
          ve && clearTimeout(ve), (ve = null);
        }
        function Ze() {
          (q = null),
            (fe = {}),
            (ee = {
              baseUrl: { current: null, all: [] },
              location: { current: null, all: [] },
            }),
            rt();
        }
        return (
          (K = {
            reset: function () {
              Ze(),
                Me.off(S.default.FRAGMENT_LOADING_STARTED, Ge, K),
                Me.off(S.default.MANIFEST_LOADING_STARTED, $e, K),
                Me.off(S.default.THROUGHPUT_MEASUREMENT_STORED, Fe, K);
            },
            setConfig: function (nt) {
              nt &&
                (nt.adapter && (Oe = nt.adapter),
                nt.errHandler && (Te = nt.errHandler),
                nt.dashMetrics && (_e = nt.dashMetrics),
                nt.mediaPlayerModel && (se = nt.mediaPlayerModel),
                nt.manifestModel && (le = nt.manifestModel),
                nt.serviceDescriptionController &&
                  (me = nt.serviceDescriptionController),
                nt.throughputController && (we = nt.throughputController),
                nt.eventBus && (Me = nt.eventBus));
            },
            loadSteeringData: be,
            getCurrentSteeringResponseData: function () {
              return q;
            },
            shouldQueryBeforeStart: function () {
              const nt = Re();
              return !!nt && nt.queryBeforeStart;
            },
            getSteeringDataFromManifest: Re,
            stopSteeringRequestTimer: rt,
            getSynthesizedBaseUrlElements: function (nt) {
              try {
                return ke(nt).map((vt) => {
                  const ce = new Ot(vt.synthesizedUrl, vt.serviceLocation);
                  return (
                    (ce.queryParams = vt.queryParams),
                    (ce.dvbPriority = vt.reference.dvbPriority),
                    (ce.dvbWeight = vt.reference.dvbWeight),
                    (ce.availabilityTimeOffset =
                      vt.reference.availabilityTimeOffset),
                    (ce.availabilityTimeComplete =
                      vt.reference.availabilityTimeComplete),
                    ce
                  );
                });
              } catch (vt) {
                return Q.error(vt), [];
              }
            },
            getSynthesizedLocationElements: function (nt) {
              try {
                return ke(nt).map((vt) => {
                  const ce = new ir(vt.synthesizedUrl, vt.serviceLocation);
                  return (ce.queryParams = vt.queryParams), ce;
                });
              } catch (vt) {
                return Q.error(vt), [];
              }
            },
            initialize: function () {
              (ne = Wh(Y).create({
                errHandler: Te,
                dashMetrics: _e,
                mediaPlayerModel: se,
                errors: de,
              })),
                Me.on(S.default.FRAGMENT_LOADING_STARTED, Ge, K),
                Me.on(S.default.MANIFEST_LOADING_STARTED, $e, K),
                Me.on(S.default.THROUGHPUT_MEASUREMENT_STORED, Fe, K);
            },
          }),
          (Q = (0, E.default)(Y).getInstance().getLogger(K)),
          Ze(),
          K
        );
      }
      Xv.__dashjs_factory_name = "ContentSteeringController";
      var Vv = H.default.getSingletonFactory(Xv);
      function Zb() {
        const Y = this.context,
          U = (0, ue.default)(Y).getInstance();
        let K, Q, q;
        return (
          (K = {
            select: function (ee) {
              if (!ee || ee.length === 0) return null;
              let fe = null;
              return (
                U.get().streaming.applyContentSteering &&
                  (fe = (function (ve) {
                    const ne = q.getCurrentSteeringResponseData();
                    return ne &&
                      ne.pathwayPriority &&
                      ne.pathwayPriority.length > 0
                      ? (function () {
                          let Te =
                              arguments.length > 0 && arguments[0] !== void 0
                                ? arguments[0]
                                : [],
                            _e =
                              arguments.length > 1 && arguments[1] !== void 0
                                ? arguments[1]
                                : [],
                            se = 0,
                            le = null;
                          for (; se < Te.length; ) {
                            const me = Te[se],
                              we = _e.findIndex(
                                (Me) =>
                                  Me.serviceLocation &&
                                  Me.serviceLocation === me
                              );
                            if (
                              we !== -1 &&
                              !Q.contains(_e[we].serviceLocation)
                            ) {
                              le = _e[we];
                              break;
                            }
                            se += 1;
                          }
                          return le;
                        })(ne.pathwayPriority, ve)
                      : null;
                  })(ee)),
                fe || (fe = ee[0]),
                fe
              );
            },
            setConfig: function (ee) {
              ee.blacklistController && (Q = ee.blacklistController),
                ee.contentSteeringController &&
                  (q = ee.contentSteeringController);
            },
            reset: function () {
              Q.reset();
            },
          }),
          (Q = Hv(Y).create({
            updateEventName:
              G.default.SERVICE_LOCATION_LOCATION_BLACKLIST_CHANGED,
            addBlacklistEventName:
              G.default.SERVICE_LOCATION_LOCATION_BLACKLIST_ADD,
          })),
          (q = Vv(Y).getInstance()),
          K
        );
      }
      Zb.__dashjs_factory_name = "LocationSelector";
      var eA = H.default.getClassFactory(Zb);
      function ey() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance(),
          K = ar(Y).getInstance();
        let Q, q, ee, fe, ve, ne, Te, _e, se, le, me, we, Me, Oe;
        function Ge() {
          (ee = NaN), (Te = !1), (ve = !0), (ne = !1), $e();
        }
        function $e() {
          fe !== null && (clearTimeout(fe), (fe = null));
        }
        function Fe(Ze) {
          $e(),
            ne ||
              (isNaN(Ze) && !isNaN(ee) && (Ze = 1e3 * ee),
              isNaN(Ze) ||
                (q.debug("Refresh manifest in " + Ze + " milliseconds."),
                (fe = setTimeout(be, Ze))));
        }
        function qe() {
          let Ze =
            arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
          Te = !0;
          const nt = se.getValue();
          let vt = nt.url;
          vt &&
            (vt = sn.default.removeQueryParameterFromUrl(
              vt,
              P.default.CMCD_QUERY_KEY
            ));
          let ce = null;
          const Ve = me.getPatchLocation(nt),
            je = le.select(Ve);
          let it = null;
          if (je && !Ze)
            (vt = je.url), (ce = je.serviceLocation), (it = je.queryParams);
          else {
            const Qe = (function (Ke) {
                const Ie = me.getLocation(Ke),
                  Ue = Me.getSynthesizedLocationElements(Ie);
                return Ie.concat(Ue);
              })(nt),
              We = le.select(Qe);
            We &&
              ((vt = We.url), (ce = We.serviceLocation), (it = We.queryParams));
          }
          K.isRelative(vt) && (vt = K.resolve(vt, nt.url)), _e.load(vt, ce, it);
        }
        function Re(Ze) {
          if (Ze) {
            if (me.getIsPatch(Ze)) {
              let ce = Ze;
              Ze = se.getValue();
              let Ve = me.isPatchValid(Ze, ce),
                je = Ve;
              if (Ve) {
                let it = me.getPublishTime(Ze);
                me.applyPatchToManifest(Ze, ce);
                let Qe = me.getPublishTime(Ze);
                je = it.getTime() !== Qe.getTime();
              }
              if (!je)
                return (
                  q.debug(
                    "Patch provided is invalid, performing full manifest refresh"
                  ),
                  void qe(!0)
                );
              Ze.loadedTime = new Date();
            }
          } else (Ze = se.getValue()).loadedTime = new Date();
          if (
            se.getValue() &&
            se.getValue().type === I.default.DYNAMIC &&
            Ze.type === I.default.STATIC
          )
            return (
              U.trigger(G.default.DYNAMIC_TO_STATIC), (Te = !1), void (ne = !0)
            );
          se.setValue(Ze);
          const nt = new Date(),
            vt = (nt.getTime() - Ze.loadedTime.getTime()) / 1e3;
          (ee = me.getManifestUpdatePeriod(Ze, vt)),
            1e3 * ee > 2147483647 && (ee = 2147483647e-3),
            U.trigger(G.default.MANIFEST_UPDATED, { manifest: Ze }),
            q.info(
              "Manifest has been refreshed at " +
                nt +
                "[" +
                nt.getTime() / 1e3 +
                "] "
            ),
            ve || Fe();
        }
        function be() {
          ve ||
            (Te ? Fe(Oe.get().streaming.manifestUpdateRetryInterval) : qe());
        }
        function Se(Ze) {
          Ze.error
            ? Ze.error.code === de.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE &&
              we.error(Ze.error)
            : Re(Ze.manifest);
        }
        function ke() {
          (ve = !1), Fe();
        }
        function he() {
          (ve = !Oe.get().streaming.scheduling.scheduleWhilePaused), ve && $e();
        }
        function rt() {
          Te = !1;
        }
        return (
          (Q = {
            initialize: function () {
              Ge(),
                U.on(G.default.STREAMS_COMPOSED, rt, this),
                U.on(S.default.PLAYBACK_STARTED, ke, this),
                U.on(S.default.PLAYBACK_PAUSED, he, this),
                U.on(G.default.INTERNAL_MANIFEST_LOADED, Se, this);
            },
            setManifest: function (Ze) {
              Re(Ze);
            },
            refreshManifest: qe,
            getIsUpdating: function () {
              return Te;
            },
            setConfig: function (Ze) {
              Ze &&
                (Ze.manifestModel && (se = Ze.manifestModel),
                Ze.adapter && (me = Ze.adapter),
                Ze.manifestLoader && (_e = Ze.manifestLoader),
                Ze.errHandler && (we = Ze.errHandler),
                Ze.locationSelector && (le = Ze.locationSelector),
                Ze.settings && (Oe = Ze.settings),
                Ze.contentSteeringController &&
                  (Me = Ze.contentSteeringController));
            },
            reset: function () {
              U.off(S.default.PLAYBACK_STARTED, ke, this),
                U.off(S.default.PLAYBACK_PAUSED, he, this),
                U.off(G.default.STREAMS_COMPOSED, rt, this),
                U.off(G.default.INTERNAL_MANIFEST_LOADED, Se, this),
                Ge();
            },
          }),
          (q = (0, E.default)(Y).getInstance().getLogger(Q)),
          (le = eA(Y).create()),
          Q
        );
      }
      ey.__dashjs_factory_name = "ManifestUpdater";
      var Yb = H.default.getClassFactory(ey);
      function Om() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance(),
          K = ar(Y).getInstance();
        let Q, q, ee, fe, ve, ne, Te, _e, se, le, me, we, Me, Oe, Ge, $e;
        function Fe() {
          (_e = []),
            (se = []),
            (le = null),
            (me = null),
            (Me = null),
            (we = NaN),
            (ee = !1),
            (fe = !1),
            (Oe =
              ve.get().streaming.utcSynchronization.timeBetweenSyncAttempts);
        }
        function qe() {
          ve.get().streaming.utcSynchronization.enabled &&
            !ee &&
            !fe &&
            Me &&
            Me.value &&
            Me.schemeIdUri &&
            !isNaN(we) &&
            !isNaN(ve.get().streaming.utcSynchronization.backgroundAttempts) &&
            ((me && (Date.now() - me) / 1e3 < 30) ||
              ((_e = []),
              (fe = !0),
              Re(
                isNaN(ve.get().streaming.utcSynchronization.backgroundAttempts)
                  ? 2
                  : ve.get().streaming.utcSynchronization.backgroundAttempts
              )));
        }
        function Re(We) {
          try {
            if (We <= 0) return void it();
            const Ke = Date.now();
            ne[Me.schemeIdUri](
              Me.value,
              function (Ie) {
                const Ue = Date.now(),
                  at = Se(Ke, Ue, Ie);
                _e.push(at), Re(We - 1);
              },
              function () {
                it();
              }
            );
          } catch {
            it();
          }
        }
        function be() {
          let We =
            (arguments.length > 0 && arguments[0] !== void 0
              ? arguments[0]
              : null) || 0;
          if (!se || se.length === 0 || We >= se.length) return void ke();
          let Ke = se[We];
          if (Ke)
            if (ne.hasOwnProperty(Ke.schemeIdUri)) {
              const Ie = new Date().getTime();
              ne[Ke.schemeIdUri](
                Ke.value,
                function (Ue) {
                  const at = new Date().getTime(),
                    ft = Se(Ie, at, Ue);
                  (Me = Ke), ke(ft);
                },
                function () {
                  be(We + 1);
                }
              );
            } else be(We + 1);
          else ke();
        }
        function Se(We, Ke, Ie) {
          return Ie - (Ke - (Ke - We) / 2);
        }
        function ke() {
          let We =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : NaN,
            Ke = isNaN(We);
          Ke &&
          ve.get().streaming.utcSynchronization.useManifestDateHeaderTimeSource
            ? (function () {
                let Ie = Te.getLatestMPDRequestHeaderValueByID("Date"),
                  Ue = Ie !== null ? new Date(Ie).getTime() : Number.NaN;
                isNaN(Ue) ? je(!0) : je(!1, Ue - Date.now());
              })()
            : je(Ke, We);
        }
        function he(We) {
          let Ke = Date.parse(We);
          return (
            isNaN(Ke) &&
              (Ke = (function (Ie) {
                let Ue,
                  at,
                  ft =
                    /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+\-])([0-9]{2})([0-9]{2}))?/.exec(
                      Ie
                    );
                return (
                  (Ue = Date.UTC(
                    parseInt(ft[1], 10),
                    parseInt(ft[2], 10) - 1,
                    parseInt(ft[3], 10),
                    parseInt(ft[4], 10),
                    parseInt(ft[5], 10),
                    ft[6] && (parseInt(ft[6], 10) || 0),
                    (ft[7] && 1e3 * parseFloat(ft[7])) || 0
                  )),
                  ft[9] &&
                    ft[10] &&
                    ((at = 60 * parseInt(ft[9], 10) + parseInt(ft[10], 10)),
                    (Ue += (ft[8] === "+" ? -1 : 1) * at * 60 * 1e3)),
                  new Date(Ue).getTime()
                );
              })(We)),
            Ke
          );
        }
        function rt(We) {
          return Date.parse(We);
        }
        function Ze(We) {
          return Date.parse(We);
        }
        function nt(We, Ke, Ie) {
          Ie();
        }
        function vt(We, Ke, Ie) {
          let Ue = he(We);
          isNaN(Ue) ? Ie() : Ke(Ue);
        }
        function ce(We, Ke, Ie, Ue, at) {
          let ft,
            Rt,
            an = !1,
            tn = new XMLHttpRequest(),
            fn = at ? F.HTTPRequest.HEAD : F.HTTPRequest.GET,
            nr = Ke.match(/\S+/g);
          if (
            ((Ke = nr.shift()),
            (ft = function () {
              an ||
                ((an = !0),
                nr.length ? ce(We, nr.join(" "), Ie, Ue, at) : Ue());
            }),
            (Rt = function () {
              let Bn, wr;
              tn.status === 200 &&
                ((Bn = at ? tn.getResponseHeader("Date") : tn.response),
                (wr = We(Bn)),
                isNaN(wr) || (Ie(wr), (an = !0)));
            }),
            K.isRelative(Ke))
          ) {
            const Bn = $e.resolve();
            Bn && (Ke = K.resolve(Ke, Bn.url));
          }
          tn.open(fn, Ke),
            (tn.timeout = 5e3),
            (tn.onload = Rt),
            (tn.onloadend = ft),
            tn.send();
        }
        function Ve(We, Ke, Ie) {
          ce(Ze, We, Ke, Ie, !0);
        }
        function je(We, Ke) {
          if (
            (isNaN(we) ||
              isNaN(Ke) ||
              We ||
              (function (Ie) {
                try {
                  const Ue = Qe(Ie),
                    at = isNaN(Oe) ? 30 : Oe,
                    ft = isNaN(
                      ve.get().streaming.utcSynchronization
                        .timeBetweenSyncAttemptsAdjustmentFactor
                    )
                      ? 2
                      : ve.get().streaming.utcSynchronization
                          .timeBetweenSyncAttemptsAdjustmentFactor,
                    Rt = isNaN(
                      ve.get().streaming.utcSynchronization
                        .maximumTimeBetweenSyncAttempts
                    )
                      ? 600
                      : ve.get().streaming.utcSynchronization
                          .maximumTimeBetweenSyncAttempts,
                    an = isNaN(
                      ve.get().streaming.utcSynchronization
                        .minimumTimeBetweenSyncAttempts
                    )
                      ? 2
                      : ve.get().streaming.utcSynchronization
                          .minimumTimeBetweenSyncAttempts;
                  let tn;
                  Ue
                    ? ((tn = Math.min(at * ft, Rt)),
                      q.debug(`Increasing timeBetweenSyncAttempts to ${tn}`))
                    : ((tn = Math.max(at / ft, an)),
                      q.debug(`Decreasing timeBetweenSyncAttempts to ${tn}`)),
                    (Oe = tn);
                } catch {}
              })(Ke),
            !We && !isNaN(Ke))
          ) {
            (le = Date.now()), (ee = !1);
            const Ie = isNaN(we);
            (we = Ke),
              Ie && qe(),
              q.debug(
                `Completed UTC sync. Setting client - server offset to ${Ke}`
              );
          }
          We &&
            ((Me = null),
            (ee = !1),
            Ge.error(
              new ot.default(
                de.TIME_SYNC_FAILED_ERROR_CODE,
                de.TIME_SYNC_FAILED_ERROR_MESSAGE
              )
            )),
            U.trigger(G.default.UPDATE_TIME_SYNC_OFFSET, { offset: Ke }),
            U.trigger(G.default.TIME_SYNCHRONIZATION_COMPLETED);
        }
        function it() {
          if (!_e || _e.length === 0) return;
          const We = _e.reduce((Ke, Ie) => Ke + Ie, 0) / _e.length;
          Qe(We)
            ? q.debug(
                "Completed background UTC sync. Offset is within allowed threshold and is not adjusted."
              )
            : (q.debug(
                `Completed background UTC sync. Setting client - server offset to ${We}`
              ),
              (we = We),
              U.trigger(G.default.UPDATE_TIME_SYNC_OFFSET, { offset: we })),
            (fe = !1),
            (me = Date.now());
        }
        function Qe(We) {
          try {
            if (isNaN(we)) return !0;
            const Ke =
              ve.get().streaming.utcSynchronization.maximumAllowedDrift &&
              !isNaN(ve.get().streaming.utcSynchronization.maximumAllowedDrift)
                ? ve.get().streaming.utcSynchronization.maximumAllowedDrift
                : 100;
            return We >= we - Ke && We <= we + Ke;
          } catch {
            return !0;
          }
        }
        return (
          (Q = {
            initialize: function () {
              Fe(),
                (ne = {
                  "urn:mpeg:dash:utc:http-head:2014": Ve,
                  "urn:mpeg:dash:utc:http-xsdate:2014": ce.bind(null, he),
                  "urn:mpeg:dash:utc:http-iso:2014": ce.bind(null, rt),
                  "urn:mpeg:dash:utc:direct:2014": vt,
                  "urn:mpeg:dash:utc:http-head:2012": Ve,
                  "urn:mpeg:dash:utc:http-xsdate:2012": ce.bind(null, he),
                  "urn:mpeg:dash:utc:http-iso:2012": ce.bind(null, rt),
                  "urn:mpeg:dash:utc:direct:2012": vt,
                  "urn:mpeg:dash:utc:http-ntp:2014": nt,
                  "urn:mpeg:dash:utc:ntp:2014": nt,
                  "urn:mpeg:dash:utc:sntp:2014": nt,
                });
            },
            attemptSync: function (We, Ke) {
              (se = We),
                ee ||
                  ((function (Ie) {
                    try {
                      if (!Ie || !ve.get().streaming.utcSynchronization.enabled)
                        return !1;
                      const Ue = isNaN(Oe) ? 30 : Oe;
                      return (
                        !(le && Ue && !isNaN(Ue)) ||
                        (Date.now() - le) / 1e3 >= Ue
                      );
                    } catch {
                      return !0;
                    }
                  })(Ke)
                    ? ((ee = !0), be())
                    : U.trigger(G.default.TIME_SYNCHRONIZATION_COMPLETED));
            },
            setConfig: function (We) {
              We &&
                (We.dashMetrics && (Te = We.dashMetrics),
                We.baseURLController && ($e = We.baseURLController),
                We.errHandler && (Ge = We.errHandler),
                We.settings && (ve = We.settings));
            },
            reset: function () {
              Fe(), U.off(G.default.ATTEMPT_BACKGROUND_SYNC, qe, Q);
            },
          }),
          (q = (0, E.default)(Y).getInstance().getLogger(Q)),
          U.on(G.default.ATTEMPT_BACKGROUND_SYNC, qe, Q),
          Q
        );
      }
      Om.__dashjs_factory_name = "TimeSyncController";
      const np = H.default.getSingletonFactory(Om);
      (np.HTTP_TIMEOUT_MS = 5e3),
        H.default.updateSingletonFactory(Om.__dashjs_factory_name, np);
      var zv = np;
      function Qb() {
        let Y, U, K, Q, q;
        const ee = this.context,
          fe = (0, X.default)(ee).getInstance();
        return (
          (Y = {
            attachMediaSource: function (ve) {
              let ne = window.URL.createObjectURL(U);
              return (
                ve.setSource(ne),
                Q === "managedMediaSource" &&
                  (ve.setDisableRemotePlayback(!0),
                  U.addEventListener("startstreaming", () => {
                    fe.trigger(S.default.MANAGED_MEDIA_SOURCE_START_STREAMING);
                  }),
                  U.addEventListener("endstreaming", () => {
                    fe.trigger(S.default.MANAGED_MEDIA_SOURCE_END_STREAMING);
                  })),
                ne
              );
            },
            createMediaSource: function () {
              let ve = "WebKitMediaSource" in window,
                ne = "MediaSource" in window;
              return (
                "ManagedMediaSource" in window
                  ? ((U = new ManagedMediaSource()),
                    (Q = "managedMediaSource"),
                    q.info("Created ManagedMediaSource"))
                  : ne
                  ? ((U = new MediaSource()),
                    (Q = "mediaSource"),
                    q.info("Created MediaSource"))
                  : ve &&
                    ((U = new WebKitMediaSource()),
                    q.info("Created WebkitMediaSource")),
                U
              );
            },
            detachMediaSource: function (ve) {
              ve.setSource(null);
            },
            setConfig: function (ve) {
              ve && ve.settings && (K = ve.settings);
            },
            setDuration: function ve(ne) {
              U &&
                U.readyState === "open" &&
                ((ne === null && isNaN(ne)) ||
                  (U.duration !== ne &&
                    (ne !== 1 / 0 ||
                      K.get().streaming.buffer.mediaSourceDurationInfinity ||
                      (ne = Math.pow(2, 32)),
                    (function (Te) {
                      let _e = Te.sourceBuffers;
                      for (let se = 0; se < _e.length; se++)
                        if (_e[se].updating) return !0;
                      return !1;
                    })(U)
                      ? setTimeout(ve.bind(null, ne), 50)
                      : (q.info("Set MediaSource duration:" + ne),
                        (U.duration = ne)))));
            },
            setSeekable: function (ve, ne) {
              U &&
                typeof U.setLiveSeekableRange == "function" &&
                typeof U.clearLiveSeekableRange == "function" &&
                U.readyState === "open" &&
                ve >= 0 &&
                ve < ne &&
                (U.clearLiveSeekableRange(), U.setLiveSeekableRange(ve, ne));
            },
            signalEndOfStream: function (ve) {
              if (!ve || ve.readyState !== "open") return;
              let ne = ve.sourceBuffers;
              for (let Te = 0; Te < ne.length; Te++)
                if (ne[Te].updating || ne[Te].buffered.length === 0) return;
              q.info("call to mediaSource endOfStream"), ve.endOfStream();
            },
          }),
          (q = (0, E.default)(ee).getInstance().getLogger(Y)),
          Y
        );
      }
      Qb.__dashjs_factory_name = "MediaSourceController";
      var pg = H.default.getSingletonFactory(Qb);
      function a2() {
        const Y = "urn:mpeg:dash:event:2012",
          K = "urn:mpeg:dash:event:callback:2015",
          q = "updated",
          ee = "added",
          fe = this.context,
          ve = (0, X.default)(fe).getInstance();
        let ne, Te, _e, se, le, me, we, Me, Oe, Ge, $e;
        function Fe() {
          if (!we || !Me)
            throw new Error("setConfig function has to be called previously");
        }
        function qe() {
          ($e = !1),
            (_e = {}),
            (se = {}),
            (le = null),
            (Ge = !1),
            (me = Date.now() / 1e3);
        }
        function Re() {
          try {
            if (!Ge) {
              Ge = !0;
              const ce = Me.getTime();
              let Ve = ce - me;
              (Ve = me > 0 ? Math.max(0, Ve) : 0),
                be(se, Ve, ce),
                be(_e, Ve, ce),
                Se(se),
                Se(_e),
                (me = ce),
                (Ge = !1);
            }
          } catch (ce) {
            (Ge = !1), Te.error(ce);
          }
        }
        function be(ce, Ve, je) {
          try {
            Ze(ce, function (it) {
              if (it !== void 0) {
                const Qe = isNaN(it.duration) ? 0 : it.duration;
                it.calculatedPresentationTime <= je &&
                it.calculatedPresentationTime + Ve + Qe >= je
                  ? vt(it, S.default.EVENT_MODE_ON_START)
                  : (nt(je, Qe + Ve, it.calculatedPresentationTime) ||
                      (function (We) {
                        try {
                          const Ke =
                            We.eventStream.period.start +
                            We.eventStream.period.duration;
                          return We.calculatedPresentationTime > Ke;
                        } catch (Ke) {
                          return Te.error(Ke), !1;
                        }
                      })(it)) &&
                    (Te.debug(
                      `Removing event ${it.id} from period ${it.eventStream.period.id} as it is expired or invalid`
                    ),
                    (function (We, Ke) {
                      try {
                        const Ie = Ke.eventStream.schemeIdUri,
                          Ue = Ke.eventStream.period.id,
                          at = Ke.eventStream.value,
                          ft = Ke.id;
                        (We[Ue][Ie] = We[Ue][Ie].filter(
                          (Rt) =>
                            (at &&
                              Rt.eventStream.value &&
                              Rt.eventStream.value !== at) ||
                            Rt.id !== ft
                        )),
                          We[Ue][Ie].length === 0 && delete We[Ue][Ie];
                      } catch (Ie) {
                        Te.error(Ie);
                      }
                    })(ce, it));
              }
            });
          } catch (it) {
            Te.error(it);
          }
        }
        function Se(ce) {
          try {
            for (const Ve in ce)
              ce.hasOwnProperty(Ve) &&
                Object.keys(ce[Ve]).length === 0 &&
                delete ce[Ve];
          } catch (Ve) {
            Te.error(Ve);
          }
        }
        function ke(ce, Ve) {
          let je =
            arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
          const it = ce.eventStream.schemeIdUri,
            Qe = ce.eventStream.value,
            We = ce.id;
          let Ke = "discarded";
          Ve[it] || (Ve[it] = []);
          const Ie = Ve[it].findIndex(
            (Ue) =>
              (!Qe || (Ue.eventStream.value && Ue.eventStream.value === Qe)) &&
              Ue.id === We
          );
          if (Ie === -1)
            Ve[it].push(ce),
              (ce.triggeredReceivedEvent = !1),
              (ce.triggeredStartEvent = !1),
              (Ke = ee);
          else if (je) {
            const Ue = Ve[it][Ie];
            (ce.triggeredReceivedEvent = Ue.triggeredReceivedEvent),
              (ce.triggeredStartEvent = Ue.triggeredStartEvent),
              (Ve[it][Ie] = ce),
              (Ke = q);
          }
          return Ke;
        }
        function he(ce) {
          try {
            if (ce.eventStream.value == 1) {
              const Ve = ce.calculatedPresentationTime;
              let je;
              (je =
                ce.calculatedPresentationTime == 4294967295
                  ? NaN
                  : ce.calculatedPresentationTime + ce.duration),
                ve.trigger(
                  S.default.MANIFEST_VALIDITY_CHANGED,
                  {
                    id: ce.id,
                    validUntil: Ve,
                    newDuration: je,
                    newManifestValidAfter: NaN,
                  },
                  { mode: S.default.EVENT_MODE_ON_START }
                );
            }
          } catch (Ve) {
            Te.error(Ve);
          }
        }
        function rt(ce) {
          try {
            const Ve = Me.getTime();
            Ze(ce, function (je) {
              const it =
                  je.eventStream &&
                  je.eventStream.period &&
                  !isNaN(je.eventStream.period.duration)
                    ? je.eventStream.period.duration
                    : NaN,
                Qe =
                  je.eventStream &&
                  je.eventStream.period &&
                  !isNaN(je.eventStream.period.start)
                    ? je.eventStream.period.start
                    : NaN;
              if (isNaN(it) || isNaN(Qe)) return;
              const We = je.calculatedPresentationTime;
              Math.abs(We - Ve) < 300 && vt(je, S.default.EVENT_MODE_ON_START);
            });
          } catch (Ve) {
            Te.error(Ve);
          }
        }
        function Ze(ce, Ve) {
          try {
            if (ce) {
              const je = Object.keys(ce);
              for (let it = 0; it < je.length; it++) {
                const Qe = ce[je[it]],
                  We = Object.keys(Qe);
                for (let Ke = 0; Ke < We.length; Ke++)
                  Qe[We[Ke]].forEach((Ie) => {
                    Ie !== void 0 && Ve(Ie);
                  });
              }
            }
          } catch (je) {
            Te.error(je);
          }
        }
        function nt(ce, Ve, je) {
          try {
            return ce - Ve > je;
          } catch (it) {
            return Te.error(it), !1;
          }
        }
        function vt(ce, Ve) {
          try {
            const je = Me.getTime(),
              it = ce.id;
            if (
              Ve === S.default.EVENT_MODE_ON_RECEIVE &&
              !ce.triggeredReceivedEvent
            )
              return (
                Te.debug(`Received event ${it}`),
                (ce.triggeredReceivedEvent = !0),
                void ve.trigger(
                  ce.eventStream.schemeIdUri,
                  { event: JSON.parse(JSON.stringify(ce)) },
                  { mode: Ve }
                )
              );
            ce.triggeredStartEvent ||
              (ce.eventStream.schemeIdUri === Y && ce.eventStream.value == 1
                ? (ce.duration === 0 && ce.presentationTimeDelta === 0) ||
                  (Te.debug(`Starting manifest refresh event ${it} at ${je}`),
                  (function () {
                    try {
                      Fe(), we.refreshManifest();
                    } catch (Qe) {
                      Te.error(Qe);
                    }
                  })())
                : ce.eventStream.schemeIdUri === K && ce.eventStream.value == 1
                ? (Te.debug(`Starting callback event ${it} at ${je}`),
                  (function (Qe) {
                    try {
                      Ct(fe)
                        .create({})
                        .load({
                          method: "get",
                          url: Qe,
                          request: { responseType: "arraybuffer" },
                        });
                    } catch (We) {
                      Te.error(We);
                    }
                  })(ce.messageData))
                : (Te.debug(
                    `Starting event ${it} from period ${ce.eventStream.period.id} at ${je}`
                  ),
                  ve.trigger(
                    ce.eventStream.schemeIdUri,
                    { event: JSON.parse(JSON.stringify(ce)) },
                    { mode: Ve }
                  ),
                  Oe.get().streaming.events
                    .deleteEventMessageDataAfterEventStarted &&
                    (delete ce.messageData, delete ce.parsedMessageData)),
              (ce.triggeredStartEvent = !0));
          } catch (je) {
            Te.error(je);
          }
        }
        return (
          (ne = {
            addInlineEvents: function (ce, Ve) {
              try {
                if ((Fe(), _e[Ve] || (_e[Ve] = {}), ce))
                  for (let je = 0; je < ce.length; je++) {
                    let it = ce[je];
                    if (
                      !nt(
                        Me.getTime(),
                        isNaN(it.duration) ? 0 : it.duration,
                        it.calculatedPresentationTime
                      )
                    ) {
                      let Qe = ke(it, _e[Ve], !0);
                      Qe === ee
                        ? (Te.debug(
                            `Added inline event with id ${it.id} from period ${Ve}`
                          ),
                          vt(it, S.default.EVENT_MODE_ON_RECEIVE))
                        : Qe === q &&
                          Te.debug(
                            `Updated inline event with id ${it.id} from period ${Ve}`
                          );
                    }
                  }
              } catch (je) {
                throw je;
              }
            },
            addInbandEvents: function (ce, Ve) {
              try {
                Fe(), se[Ve] || (se[Ve] = {});
                for (let je = 0; je < ce.length; je++) {
                  let it = ce[je];
                  nt(
                    Me.getTime(),
                    isNaN(it.duration) ? 0 : it.duration,
                    it.calculatedPresentationTime
                  ) ||
                    (ke(it, se[Ve], !1) === ee
                      ? (it.eventStream.schemeIdUri === Y && he(it),
                        Te.debug(
                          `Added inband event with id ${it.id} from period ${Ve}`
                        ),
                        vt(it, S.default.EVENT_MODE_ON_RECEIVE))
                      : Te.debug(
                          `Inband event with scheme_id_uri ${it.eventStream.schemeIdUri}, value ${it.eventStream.value}, period id ${Ve} and event id ${it.id} was ignored because it has been added before.`
                        ));
                }
                Re();
              } catch (je) {
                throw je;
              }
            },
            getInbandEvents: function () {
              return se;
            },
            getInlineEvents: function () {
              return _e;
            },
            start: function () {
              try {
                Fe(), Te.debug("Start Event Controller");
                const ce =
                  Oe.get().streaming.events.eventControllerRefreshDelay;
                $e || isNaN(ce) || (($e = !0), (le = setInterval(Re, ce)));
              } catch (ce) {
                throw ce;
              }
            },
            setConfig: function (ce) {
              try {
                if (!ce) return;
                ce.manifestUpdater && (we = ce.manifestUpdater),
                  ce.playbackController && (Me = ce.playbackController),
                  ce.settings && (Oe = ce.settings);
              } catch (Ve) {
                throw Ve;
              }
            },
            reset: function () {
              (function () {
                try {
                  le !== null &&
                    $e &&
                    (clearInterval(le),
                    (le = null),
                    ($e = !1),
                    (function () {
                      try {
                        rt(se), rt(_e);
                      } catch (ce) {
                        Te.error(ce);
                      }
                    })());
                } catch (ce) {
                  throw ce;
                }
              })(),
                qe();
            },
          }),
          (Te = (0, E.default)(fe).getInstance().getLogger(ne)),
          qe(),
          ne
        );
      }
      a2.__dashjs_factory_name = "EventController";
      var tA = H.default.getSingletonFactory(a2),
        gg = {
          LEVELS: {
            SUGGESTION: "Suggestion",
            WARNING: "Warning",
            ERROR: "Error",
          },
          EVENTS: {
            NO_UTC_TIMING_ELEMENT: {
              key: "NO_UTC_TIMING_ELEMENT",
              message:
                "No UTCTiming element is present in the manifest. You may experience playback failures. For a detailed validation use https://conformance.dashif.org/",
            },
            NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE: {
              key: "NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE",
              message:
                'SMPTE 2052-1:2013 defines the attribute name as "imageType" and does not define "imagetype"',
            },
            INVALID_DVR_WINDOW: {
              key: "INVALID_DVR_WINDOW",
              message:
                "No valid segment found when applying a specification compliant DVR window calculation. Using SegmentTimeline entries as a fallback.",
            },
          },
        },
        mg = n(445),
        Ld = n(1923);
      function $l() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K,
          Q,
          q,
          ee,
          fe,
          ve,
          ne,
          Te,
          _e,
          se,
          le,
          me,
          we,
          Me,
          Oe,
          Ge,
          $e,
          Fe,
          qe,
          Re,
          be,
          Se,
          ke,
          he,
          rt,
          Ze,
          nt,
          vt,
          ce,
          Ve,
          je,
          it,
          Qe,
          We,
          Ke,
          Ie,
          Ue,
          at,
          ft,
          Rt,
          an,
          tn,
          fn,
          nr,
          Bn,
          wr,
          hr,
          pi,
          Rn;
        function $r() {
          if (
            !(
              ve &&
              ve.hasOwnProperty("load") &&
              Se &&
              Se.hasOwnProperty("initialize") &&
              Se.hasOwnProperty("reset") &&
              Se.hasOwnProperty("getClientTimeOffset") &&
              ne &&
              be &&
              _e &&
              Ke
            )
          )
            throw new Error(P.default.MISSING_CONFIG_ERROR);
        }
        function ni() {
          (function () {
            try {
              const er = Te.getStreamsInfo();
              if (!he && er.length === 0)
                throw new Error("There are no periods in the MPD");
              he &&
                er.length > 0 &&
                _e.updateManifestUpdateInfo({
                  currentTime: Ke.getTime(),
                  buffered: We.getBufferRange(),
                  presentationStartTime: er[0].start,
                  clientTimeOffset: Se.getClientTimeOffset(),
                }),
                ke.length > 0 &&
                  ((nn = er).length !== 0
                    ? (ke = ke.filter((Qr) => {
                        const qi =
                          nn.filter((Ua) => Ua.id === Qr.getId()).length > 0 ||
                          Qr.getId() === he.getId();
                        return (
                          qi ||
                            (Q.debug(`Removing stream ${Qr.getId()}`),
                            Qr.reset(!0),
                            (Qr = null)),
                          qi
                        );
                      }))
                    : Q.warn(
                        "No periods included in the current manifest. Skipping the filtering of outdated stream objects."
                      ));
              const gi = [];
              for (let Qr = 0, qi = er.length; Qr < qi; Qr++) {
                const Ua = er[Qr];
                gi.push(Xi(Ua)), _e.addManifestUpdateStreamInfo(Ua);
              }
              Promise.all(gi)
                .then(
                  () =>
                    new Promise((Qr, qi) => {
                      he ? Qr() : Hi(er, Qr, qi);
                    })
                )
                .then(() => {
                  U.trigger(G.default.STREAMS_COMPOSED), Rr();
                })
                .catch((Qr) => {
                  throw Qr;
                });
            } catch (er) {
              be.error(
                new ot.default(
                  de.MANIFEST_ERROR_ID_NOSTREAMS_CODE,
                  er.message + " nostreamscomposed",
                  ne.getValue()
                )
              ),
                (it = !0),
                nf();
            }
            var nn;
          })();
        }
        function Fi() {
          wr = !0;
        }
        function Xi(nn) {
          let er = uy(nn.id);
          return er
            ? er.updateData(nn)
            : ((er = qR(Y).create({
                manifestModel: ne,
                mediaPlayerModel: Ue,
                dashMetrics: _e,
                manifestUpdater: fe,
                adapter: Te,
                timelineConverter: Se,
                capabilities: q,
                capabilitiesFilter: ee,
                errHandler: be,
                baseURLController: we,
                segmentBaseController: Me,
                textController: Ze,
                abrController: Ge,
                playbackController: Ke,
                throughputController: $e,
                eventController: qe,
                mediaController: Fe,
                protectionController: rt,
                videoModel: We,
                streamInfo: nn,
                settings: Bn,
              })),
              ke.push(er),
              er.initialize(),
              Promise.resolve());
        }
        function Hi(nn, er, gi) {
          try {
            rr();
            const Qr = _e.getCurrentDVRInfo().range;
            if (Qr.end < Qr.start) {
              hr && clearTimeout(hr);
              const Ua = Math.min(
                1e3 * (-1 * (Qr.end - Qr.start) + 2),
                2147483647
              );
              return (
                Q.debug(`Waiting for ${Ua} ms before playback can start`),
                U.trigger(G.default.AST_IN_FUTURE, { delay: Ua }),
                void (hr = setTimeout(() => {
                  Hi(nn, er, gi);
                }, Ua))
              );
            }
            Bn.get().streaming.applyProducerReferenceTime &&
              Ie.calculateProducerReferenceTimeOffsets(nn);
            const qi = nn[0].manifestInfo;
            if (
              (Bn.get().streaming.applyServiceDescription &&
                Ie.applyServiceDescription(qi),
              Te.getIsDynamic())
            ) {
              const Ua = fd(0, qi);
              Ke.computeAndSetLiveDelay(Ua, qi);
            }
            (Bn.get().streaming.applyContentSteering &&
            me.shouldQueryBeforeStart()
              ? me.loadSteeringData()
              : Promise.resolve()
            )
              .then(() => {
                const Ua = ne.getValue();
                Ua && we.update(Ua), jt(), er();
              })
              .catch((Ua) => {
                Q.error(Ua), jt(), er();
              });
          } catch (Qr) {
            gi(Qr);
          }
        }
        function jt() {
          const nn = (function () {
            let Qr;
            if (Te.getIsDynamic()) {
              const qi = _e.getCurrentDVRInfo();
              Qr =
                (qi && qi.range ? qi.range.end : 0) - Ke.getOriginalLiveDelay();
              const Ua = qi ? qi.range : null;
              if (Ua) {
                if (isNaN(pi) && pi.toString().indexOf("posix:") === -1) {
                  const ru = Fs(!0);
                  isNaN(ru) ||
                    (Q.info(`Start time from URI parameters: ${ru}`),
                    (Qr = Math.min(Qr, ru)));
                } else {
                  Q.info(`Start time provided by the app: ${pi}`);
                  const ru = ya(!0, pi);
                  isNaN(ru) || (Qr = Math.min(Qr, ru));
                }
                const nu = Bn.get().streaming.timeShiftBuffer
                  .calcFromSegmentTimeline
                  ? 0.1
                  : 0;
                Qr = Math.max(Qr, Ua.start + nu);
              }
            } else if (((Qr = b2()[0].getStreamInfo().start), isNaN(pi))) {
              const qi = Fs(!1);
              isNaN(qi) ||
                (Q.info(`Start time from URI parameters: ${qi}`),
                (Qr = Math.max(Qr, qi)));
            } else {
              Q.info(`Start time provided by the app: ${pi}`);
              const qi = ya(!1, pi);
              isNaN(qi) || (Qr = Math.max(Qr, qi));
            }
            return Qr;
          })();
          let er = Cn(nn);
          const gi = er !== null ? er : ke[0];
          U.trigger(G.default.INITIAL_STREAM_SWITCH, { startTime: nn }),
            An(gi, null, nn),
            tn ||
              (tn = setInterval(function () {
                !Ve &&
                  Ke.getTimeToStreamEnd() <= 0 &&
                  !Ke.isSeeking() &&
                  U.trigger(G.default.PLAYBACK_ENDED, { isLast: Tg().isLast });
              }, 200));
        }
        function An(nn, er, gi) {
          try {
            if (Ve || !nn || (er === nn && nn.getIsActive())) return;
            (Ve = !0),
              U.trigger(G.default.PERIOD_SWITCH_STARTED, {
                fromStreamInfo: er ? er.getStreamInfo() : null,
                toStreamInfo: nn.getStreamInfo(),
              });
            let Qr = !1,
              qi = [];
            (he = nn),
              er && ((Qr = Lr(nn, er)), (qi = Zt(er)), er.deactivate(Qr)),
              (gi = isNaN(gi)
                ? !Qr && er
                  ? nn.getStreamInfo().start
                  : NaN
                : gi),
              Q.info(
                `Switch to stream ${nn.getId()}. Seektime is ${gi}, current playback time is ${Ke.getTime()}. Seamless period switch is set to ${Qr}`
              ),
              (nr = nr.filter((Ua) => Ua.getId() !== he.getId())),
              Ke.initialize(Tg(), !!er),
              We.getElement()
                ? pn({
                    seekTime: gi,
                    keepBuffers: Qr,
                    streamActivated: !1,
                    representationsFromPreviousPeriod: qi,
                  })
                : Mn({ seekTime: gi, keepBuffers: Qr });
          } catch {
            Ve = !1;
          }
        }
        function pn(nn) {
          let er;
          function gi() {
            if (!Qe || Qe.readyState !== "open") return;
            Q.debug("MediaSource is open!"),
              window.URL.revokeObjectURL(er),
              Qe.removeEventListener("sourceopen", gi),
              Qe.removeEventListener("webkitsourceopen", gi),
              Da();
            const qi = _e.getCurrentDVRInfo();
            se.setSeekable(qi.range.start, qi.range.end),
              nn.streamActivated
                ? (isNaN(nn.seekTime) || Ke.seek(nn.seekTime, !0, !0),
                  he.setMediaSource(Qe).then(() => {
                    he.initializeForTextWithMediaSource(Qe);
                  }))
                : Mn(nn);
          }
          function Qr() {
            Qe.addEventListener("sourceopen", gi, !1),
              Qe.addEventListener("webkitsourceopen", gi, !1),
              (er = se.attachMediaSource(We)),
              Q.debug("MediaSource attached to element.  Waiting on open...");
          }
          Qe
            ? nn.keepBuffers
              ? Mn(nn)
              : (se.detachMediaSource(We), Qr())
            : ((Qe = se.createMediaSource()), Qr());
        }
        function Mn(nn) {
          const er = nn.representationsFromPreviousPeriod || [];
          he.activate(Qe, nn.keepBuffers ? fn : void 0, er).then((gi) => {
            gi && (fn = gi),
              isNaN(nn.seekTime) ||
                (U.trigger(
                  G.default.SEEK_TARGET,
                  { time: nn.seekTime },
                  { streamId: he.getId() }
                ),
                Ke.seek(nn.seekTime, !1, !0),
                he.startScheduleControllers()),
              (Ve = !1),
              U.trigger(G.default.PERIOD_SWITCH_COMPLETED, {
                toStreamInfo: Tg(),
              });
          });
        }
        function Zt(nn) {
          return (nn ? nn.getStreamProcessors() : []).map((er) =>
            er.getRepresentation()
          );
        }
        function Fn(nn) {
          const er = Cn(nn.seekTime);
          var gi;
          er && er !== he
            ? er &&
              er !== he &&
              (Hn(),
              (function (Qr, qi) {
                const Ua = Qr && !isNaN(Qr.seekTime) ? Qr.seekTime : NaN,
                  nu = he
                    .getStreamProcessors()
                    .map((ru) => ru.prepareOuterPeriodPlaybackSeeking(Qr));
                Promise.all(nu)
                  .then(() => {
                    An(qi, he, Ua);
                  })
                  .catch((ru) => {
                    be.error(ru);
                  });
              })(nn, er))
            : (Hn(),
              (gi = nn),
              he
                .getStreamProcessors()
                .forEach((Qr) => Qr.prepareInnerPeriodPlaybackSeeking(gi)),
              ic(Gn.USER_REQUEST_STOP_REASON)),
            Xc(ye.SEEK_START_REASON);
        }
        function Hn() {
          Sr();
        }
        function Sr() {
          nr &&
            nr.length > 0 &&
            (nr.forEach((nn) => {
              nn.deactivate(!0);
            }),
            (nr = []));
        }
        function fr(nn) {
          if (nn.newMediaInfo.streamInfo.id === he.getId()) {
            if (
              (Sr(),
              Bn.get().streaming.buffer.resetSourceBuffersForTrackSwitch &&
                nn.oldMediaInfo &&
                nn.oldMediaInfo.codec !== nn.newMediaInfo.codec)
            ) {
              const er = Ke.getTime();
              return (
                he.deactivate(!1),
                void pn({ seekTime: er, keepBuffers: !1, streamActivated: !1 })
              );
            }
            he.prepareTrackChange(nn);
          }
        }
        function Lr(nn, er) {
          try {
            return (
              Bn.get().streaming.buffer.reuseExistingSourceBuffers &&
              (q.isProtectionCompatible(
                er.getStreamInfo(),
                nn.getStreamInfo()
              ) ||
                wr) &&
              q.supportsChangeType() &&
              Bn.get().streaming.buffer.useChangeType
            );
          } catch {
            return !1;
          }
        }
        function Jt(nn) {
          let er =
            arguments.length > 1 && arguments[1] !== void 0
              ? arguments[1]
              : null;
          if (Qe && !nn.getPreloaded() && Lr(nn, er)) {
            const gi = Zt(er);
            nn.startPreloading(Qe, fn, gi).then(() => {
              nr.push(nn);
            });
          }
        }
        function Cn(nn) {
          if (isNaN(nn)) return null;
          const er = ke.length;
          for (let gi = 0; gi < er; gi++) {
            const Qr = ke[gi];
            if (
              nn < parseFloat((Qr.getStartTime() + Qr.getDuration()).toFixed(5))
            )
              return Qr;
          }
          return null;
        }
        function rr() {
          try {
            const nn = Te.getIsDynamic(),
              er = Te.getStreamsInfo()[0].manifestInfo,
              gi = Ke.getTime(),
              Qr = Se.calcTimeShiftBufferWindow(ke, nn),
              qi = na();
            if (Qr.start === void 0 || Qr.end === void 0) return;
            qi && qi.length !== 0
              ? qi.forEach((Ua) => {
                  _e.addDVRInfo(Ua.getType(), gi, er, Qr);
                })
              : _e.addDVRInfo(P.default.VIDEO, gi, er, Qr);
          } catch {}
        }
        function Er(nn) {
          if (Rt && ce) {
            const er = Ue.getInitialBufferLevel(),
              gi = [P.default.TEXT];
            (isNaN(er) ||
              er <= Ke.getBufferLevel(gi) ||
              (Te.getIsDynamic() && er > Ke.getLiveDelay())) &&
              ((Rt = !1), Xc(ye.INITIAL_PLAYOUT_START_REASON), Ke.play());
          }
          nn &&
            nn.mediaType &&
            _e.addBufferLevel(nn.mediaType, new Date(), 1e3 * nn.bufferLevel);
        }
        function gn(nn) {
          nn.streamInfo.id === he.getId() && Sr(),
            uy(nn.streamInfo.id).prepareQualityChange(nn);
        }
        function ct() {
          if (Te.getIsDynamic() && Ke.getOriginalLiveDelay() !== 0 && he) {
            const nn = Te.getStreamsInfo();
            if (nn.length > 0) {
              const er = nn[0].manifestInfo,
                gi = fd(0, er);
              Ke.computeAndSetLiveDelay(gi, er);
            }
          }
        }
        function Vt() {
          if (M_()) {
            const nn = We.getPlaybackQuality();
            nn && _e.addDroppedFrames(nn);
          }
        }
        function kn() {
          Q.debug("[onPlaybackStarted]"),
            !Rt && ft && Xc(ye.RESUME_FROM_PAUSE_START_REASON),
            Rt && (Rt = !1),
            an &&
              ((an = !1),
              Bn.get().streaming.applyContentSteering &&
                !me.shouldQueryBeforeStart() &&
                me.loadSteeringData()),
            (ft = !1);
        }
        function zt(nn) {
          Q.debug("[onPlaybackPaused]"),
            nn.ended || ((ft = !0), ic(Gn.USER_REQUEST_STOP_REASON));
        }
        function zn(nn) {
          Q.debug(`Stream with id ${nn.streamInfo.id} finished buffering`);
          const er = nn.streamInfo.isLast;
          Qe && er
            ? (Q.info(
                "[onStreamBufferingCompleted] calls signalEndOfStream of mediaSourceController."
              ),
              se.signalEndOfStream(Qe))
            : Rr();
        }
        function Rr() {
          if (!he) return;
          if (!he.getHasFinishedBuffering())
            return void he.checkAndHandleCompletedBuffering();
          const nn = (function () {
            let gi =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : null;
            try {
              const Qr = gi || he || null;
              if (Qr) {
                const qi = Qr.getStreamInfo();
                return ke.filter(function (Ua) {
                  const nu = Ua.getStreamInfo();
                  return nu.start > qi.start && qi.id !== nu.id;
                });
              }
            } catch {
              return [];
            }
          })(he);
          let er = 0;
          for (; er < nn.length; ) {
            const gi = nn[er],
              Qr = er === 0 ? he : nn[er - 1];
            !gi.getPreloaded() &&
              Qr.getHasFinishedBuffering() &&
              Qe &&
              Jt(gi, Qr),
              (er += 1);
          }
        }
        function vi() {
          tn && (clearInterval(tn), (tn = null));
        }
        function na() {
          return he ? he.getStreamProcessors() : [];
        }
        function Ri(nn) {
          if (he && !he.getIsEndedEventSignaled()) {
            he.setIsEndedEventSignaled(!0);
            const er = (function () {
              const gi =
                (arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : null) ||
                he ||
                null;
              if (!gi) return null;
              const Qr = gi.getStreamInfo(),
                qi = Qr.start;
              let Ua = 0,
                nu = -1,
                ru = NaN;
              for (; Ua < ke.length; ) {
                const FP = ke[Ua].getStreamInfo(),
                  UP = FP.start - qi;
                UP > 0 &&
                  (isNaN(ru) || UP < ru) &&
                  Qr.id !== FP.id &&
                  ((ru = UP), (nu = Ua)),
                  (Ua += 1);
              }
              return nu >= 0 ? ke[nu] : null;
            })();
            er
              ? (Q.debug(
                  `StreamController onEnded, found next stream with id ${
                    er.getStreamInfo().id
                  }. Switching from ${he.getStreamInfo().id} to ${
                    er.getStreamInfo().id
                  }`
                ),
                An(er, he, NaN))
              : (Q.debug("StreamController no next stream found"),
                he.setIsEndedEventSignaled(!1)),
              ic(
                er
                  ? Gn.END_OF_PERIOD_STOP_REASON
                  : Gn.END_OF_CONTENT_STOP_REASON
              );
          }
          nn && nn.isLast && (vi(), me.stopSteeringRequestTimer());
        }
        function Da(nn) {
          const er = nn || Tg().manifestInfo.duration;
          se.setDuration(er);
        }
        function Fs(nn) {
          const er = Oe.getURIFragmentData();
          if (!er || !er.t) return NaN;
          const gi = b2()[0].getStreamInfo().start;
          return (er.t = er.t.split(",")[0]), Hc(nn, er.t, gi);
        }
        function ya(nn, er) {
          let gi = 0;
          return nn || (gi = b2()[0].getStreamInfo().start), Hc(nn, er, gi);
        }
        function Hc(nn, er, gi) {
          const Qr = Te.getRegularPeriods()[0],
            qi = er.toString(),
            Ua =
              qi.indexOf("posix:") !== -1
                ? qi.substring(6) === "now"
                  ? Date.now() / 1e3
                  : parseFloat(qi.substring(6))
                : NaN;
          return nn && !isNaN(Ua)
            ? Se.calcPresentationTimeFromWallTime(new Date(1e3 * Ua), Qr)
            : parseFloat(qi) + gi;
        }
        function fd(nn, er) {
          try {
            let gi = NaN;
            return er &&
              !isNaN(er.maxFragmentDuration) &&
              isFinite(er.maxFragmentDuration)
              ? er.maxFragmentDuration
              : isFinite(gi)
              ? gi
              : NaN;
          } catch {
            return NaN;
          }
        }
        function pd(nn) {
          if (nn.error) (it = !0), nf();
          else {
            Q.info("Manifest updated... updating data system wide.");
            const er = nn.manifest;
            Te.updatePeriods(er),
              ee.filterUnsupportedFeatures(er).then(() => {
                we.initialize(er);
                let gi = Te.getUTCTimingSources();
                !Te.getIsDynamic() ||
                  (gi && gi.length !== 0) ||
                  U.trigger(S.default.CONFORMANCE_VIOLATION, {
                    level: gg.LEVELS.WARNING,
                    event: gg.EVENTS.NO_UTC_TIMING_ELEMENT,
                  });
                let Qr = Te.getIsDynamic()
                  ? gi.concat(at.getUTCTimingSources())
                  : gi;
                le.attemptSync(Qr, Te.getIsDynamic()),
                  vt.createFinalQueryStrings(er);
              });
          }
        }
        function M_() {
          return !!he && he.getHasVideoTrack();
        }
        function dp() {
          return !!he && he.getHasAudioTrack();
        }
        function ic(nn, er) {
          (er = er || new Date()),
            na().forEach((gi) => {
              gi.finalisePlayList(er, nn);
            }),
            _e.addPlayList();
        }
        function Xc(nn) {
          _e.createPlaylistMetrics(1e3 * Ke.getTime(), nn);
        }
        function Ud(nn) {
          rt.updateKeyStatusesMap(nn),
            (function () {
              const er = na();
              let gi = !1;
              er.forEach((Qr) => {
                const qi = Qr.getMediaInfo();
                !qi || q.areKeyIdsUsable(qi)
                  ? qi &&
                    q.areKeyIdsExpired(qi) &&
                    (function (Ua) {
                      const nu = uy(Ua.getStreamId());
                      nu &&
                        nu.triggerProtectionError({
                          error: new ot.default(
                            Ld.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE,
                            Ld.default.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE
                          ),
                        });
                    })(Qr)
                  : ((gi = !0),
                    (function (Ua) {
                      const nu = Ua.getAllMediaInfos().filter((ru) =>
                        q.areKeyIdsUsable(ru)
                      );
                      if (nu && nu.length !== 0)
                        Fe.setTrack(nu[0], { replaceBuffer: !0 });
                      else {
                        const ru = Ua.getType();
                        be.error(
                          new ot.default(
                            de.NO_SUPPORTED_KEY_IDS,
                            `Type: ${ru}: ${de.NO_SUPPORTED_KEY_IDS_MESSAGE}`
                          )
                        );
                      }
                    })(Qr));
              }),
                gi &&
                  (Ke.getTime() === 0
                    ? U.once(
                        S.default.FRAGMENT_LOADING_COMPLETED,
                        () => {
                          ly();
                        },
                        K
                      )
                    : Ke.isProgressing(500).then((Qr) => {
                        Qr || ly();
                      }));
            })();
        }
        function ly() {
          const nn = Ke.getTime();
          Ke.seek(nn + 0.01, !1, !1);
        }
        function pA(nn) {
          if (!nn.error) return;
          let er;
          switch (nn.error.code) {
            case 1:
              er = "MEDIA_ERR_ABORTED";
              break;
            case 2:
              er = "MEDIA_ERR_NETWORK";
              break;
            case 3:
              (er = "MEDIA_ERR_DECODE"), (Rn.counts.mediaErrorDecode += 1);
              break;
            case 4:
              er = "MEDIA_ERR_SRC_NOT_SUPPORTED";
              break;
            case 5:
              er = "MEDIA_ERR_ENCRYPTED";
              break;
            default:
              er = "UNKNOWN";
          }
          er === "MEDIA_ERR_DECODE" &&
          Bn.get().errors.recoverAttempts.mediaErrorDecode >=
            Rn.counts.mediaErrorDecode
            ? (function () {
                Q.error(
                  "A MEDIA_ERR_DECODE occured: Resetting the MediaSource"
                );
                const gi = Ke.getTime();
                he.deactivate(!1),
                  Q.info(
                    `MediaSource has been resetted. Resuming playback from time ${gi}`
                  ),
                  pn({ seekTime: gi, keepBuffers: !1, streamActivated: !1 });
              })()
            : ((je = !0),
              nn.error.message && (er += " (" + nn.error.message + ")"),
              nn.error.msExtendedCode &&
                (er +=
                  " (0x" +
                  (nn.error.msExtendedCode >>> 0).toString(16).toUpperCase() +
                  ")"),
              Q.fatal("Video Element Error: " + er),
              nn.error && Q.fatal(nn.error),
              be.error(new ot.default(nn.error.code, er)),
              nf());
        }
        function Tg() {
          return he ? he.getStreamInfo() : null;
        }
        function uy(nn) {
          for (let er = 0, gi = ke.length; er < gi; er++)
            if (ke[er].getId() === nn) return ke[er];
          return null;
        }
        function _c(nn) {
          isNaN(nn.newDuration) || Da(nn.newDuration);
        }
        function bu() {
          (ke = []),
            (pi = NaN),
            (rt = null),
            (Ve = !1),
            (he = null),
            (je = !1),
            (it = !1),
            (Rt = !0),
            (an = !0),
            (ft = !1),
            (ce = !0),
            (tn = null),
            (wr = !1),
            (nr = []),
            (hr = null),
            (Rn = { counts: { mediaErrorDecode: 0 } });
        }
        function nf() {
          $r(),
            le.reset(),
            ic(je || it ? Gn.FAILURE_STOP_REASON : Gn.USER_REQUEST_STOP_REASON);
          for (let nn = 0, er = ke ? ke.length : 0; nn < er; nn++)
            ke[nn].reset(je);
          U.off(S.default.PLAYBACK_TIME_UPDATED, Vt, K),
            U.off(S.default.PLAYBACK_SEEKING, Fn, K),
            U.off(S.default.PLAYBACK_ERROR, pA, K),
            U.off(S.default.PLAYBACK_STARTED, kn, K),
            U.off(S.default.PLAYBACK_PAUSED, zt, K),
            U.off(S.default.PLAYBACK_ENDED, Ri, K),
            U.off(S.default.METRIC_ADDED, mG, K),
            U.off(S.default.MANIFEST_VALIDITY_CHANGED, _c, K),
            U.off(S.default.BUFFER_LEVEL_UPDATED, Er, K),
            U.off(S.default.QUALITY_CHANGE_REQUESTED, gn, K),
            G.default.KEY_SESSION_UPDATED &&
              U.off(G.default.KEY_SESSION_UPDATED, Fi, K),
            U.off(G.default.MANIFEST_UPDATED, pd, K),
            U.off(G.default.STREAM_BUFFERING_COMPLETED, zn, K),
            U.off(G.default.TIME_SYNCHRONIZATION_COMPLETED, ni, K),
            U.off(G.default.CURRENT_TRACK_CHANGED, fr, K),
            U.off(G.default.SETTING_UPDATED_LIVE_DELAY, ct, K),
            U.off(G.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT, ct, K),
            U.off(mg.default.INTERNAL_KEY_STATUSES_CHANGED, Ud, K),
            we.reset(),
            fe.reset(),
            qe.reset(),
            _e.clearAllCurrentMetrics(),
            ne.setValue(null),
            ve.reset(),
            Se.reset(),
            Re.reset(),
            Qe && (se.detachMediaSource(We), (Qe = null)),
            (We = null),
            rt &&
              ((rt = null),
              (nt = null),
              ne.getValue() &&
                U.trigger(G.default.PROTECTION_DESTROYED, {
                  data: ne.getValue().url,
                })),
            vi(),
            U.trigger(G.default.STREAM_TEARDOWN_COMPLETE),
            bu();
        }
        function mG(nn) {
          if (nn.metric === O.DVR_INFO) {
            const er = dp() ? P.default.AUDIO : P.default.VIDEO;
            nn.mediaType === er &&
              se.setSeekable(nn.value.range.start, nn.value.range.end);
          }
        }
        function b2() {
          return ke;
        }
        return (
          (K = {
            addDVRMetric: rr,
            getActiveStream: function () {
              return he;
            },
            getActiveStreamInfo: Tg,
            getActiveStreamProcessors: na,
            getAutoPlay: function () {
              return ce;
            },
            getHasMediaOrInitialisationError: function () {
              return je || it;
            },
            getInitialPlayback: function () {
              return Rt;
            },
            getIsStreamSwitchInProgress: function () {
              return Ve;
            },
            getStreamById: uy,
            getStreamForTime: Cn,
            getStreams: b2,
            getTimeRelativeToStreamId: function (nn, er) {
              let gi = null,
                Qr = 0,
                qi = 0,
                Ua = null;
              for (let nu = 0; nu < ke.length; nu++) {
                if (
                  ((gi = ke[nu]),
                  (qi = gi.getStartTime()),
                  (Ua = gi.getDuration()),
                  Number.isFinite(qi) && (Qr = qi),
                  gi.getId() === er)
                )
                  return nn - Qr;
                Number.isFinite(Ua) && (Qr += Ua);
              }
              return null;
            },
            hasAudioTrack: dp,
            hasVideoTrack: M_,
            initialize: function (nn, er) {
              $r(),
                (ce = nn),
                (nt = er),
                Se.initialize(),
                (fe = Yb(Y).create()),
                fe.setConfig({
                  manifestModel: ne,
                  adapter: Te,
                  manifestLoader: ve,
                  errHandler: be,
                  settings: Bn,
                  contentSteeringController: me,
                }),
                fe.initialize(),
                (qe = tA(Y).getInstance()),
                qe.setConfig({
                  manifestUpdater: fe,
                  playbackController: Ke,
                  settings: Bn,
                }),
                qe.start(),
                (vt = hg(Y).getInstance()),
                le.setConfig({
                  dashMetrics: _e,
                  baseURLController: we,
                  errHandler: be,
                  settings: Bn,
                }),
                le.initialize(),
                se.setConfig({ settings: Bn }),
                rt &&
                  (U.trigger(G.default.PROTECTION_CREATED, { controller: rt }),
                  rt.setMediaElement(We.getElement()),
                  nt && rt.setProtectionData(nt)),
                U.on(S.default.PLAYBACK_TIME_UPDATED, Vt, K),
                U.on(S.default.PLAYBACK_SEEKING, Fn, K),
                U.on(S.default.PLAYBACK_ERROR, pA, K),
                U.on(S.default.PLAYBACK_STARTED, kn, K),
                U.on(S.default.PLAYBACK_PAUSED, zt, K),
                U.on(S.default.PLAYBACK_ENDED, Ri, K),
                U.on(S.default.METRIC_ADDED, mG, K),
                U.on(S.default.MANIFEST_VALIDITY_CHANGED, _c, K),
                U.on(S.default.BUFFER_LEVEL_UPDATED, Er, K),
                U.on(S.default.QUALITY_CHANGE_REQUESTED, gn, K),
                G.default.KEY_SESSION_UPDATED &&
                  U.on(G.default.KEY_SESSION_UPDATED, Fi, K),
                U.on(G.default.MANIFEST_UPDATED, pd, K),
                U.on(G.default.STREAM_BUFFERING_COMPLETED, zn, K),
                U.on(G.default.TIME_SYNCHRONIZATION_COMPLETED, ni, K),
                U.on(G.default.CURRENT_TRACK_CHANGED, fr, K),
                U.on(G.default.SETTING_UPDATED_LIVE_DELAY, ct, K),
                U.on(
                  G.default.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,
                  ct,
                  K
                ),
                U.on(mg.default.INTERNAL_KEY_STATUSES_CHANGED, Ud, K);
            },
            load: function (nn) {
              let er =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : NaN;
              $r(), (pi = er), ve.load(nn);
            },
            loadWithManifest: function (nn) {
              let er =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : NaN;
              (function () {
                if (!fe || !fe.hasOwnProperty("setManifest"))
                  throw new Error(
                    "initialize function has to be called previously"
                  );
              })(),
                (pi = er),
                fe.setManifest(nn);
            },
            refreshManifest: function () {
              fe.getIsUpdating() || fe.refreshManifest();
            },
            reset: nf,
            setConfig: function (nn) {
              nn &&
                (nn.capabilities && (q = nn.capabilities),
                nn.capabilitiesFilter && (ee = nn.capabilitiesFilter),
                nn.manifestLoader && (ve = nn.manifestLoader),
                nn.manifestModel && (ne = nn.manifestModel),
                nn.mediaPlayerModel && (Ue = nn.mediaPlayerModel),
                nn.customParametersModel && (at = nn.customParametersModel),
                nn.protectionController && (rt = nn.protectionController),
                nn.adapter && (Te = nn.adapter),
                nn.dashMetrics && (_e = nn.dashMetrics),
                nn.errHandler && (be = nn.errHandler),
                nn.timelineConverter && (Se = nn.timelineConverter),
                nn.videoModel && (We = nn.videoModel),
                nn.playbackController && (Ke = nn.playbackController),
                nn.throughputController && ($e = nn.throughputController),
                nn.serviceDescriptionController &&
                  (Ie = nn.serviceDescriptionController),
                nn.contentSteeringController &&
                  (me = nn.contentSteeringController),
                nn.textController && (Ze = nn.textController),
                nn.abrController && (Ge = nn.abrController),
                nn.mediaController && (Fe = nn.mediaController),
                nn.settings && (Bn = nn.settings),
                nn.baseURLController && (we = nn.baseURLController),
                nn.uriFragmentModel && (Oe = nn.uriFragmentModel),
                nn.segmentBaseController && (Me = nn.segmentBaseController),
                nn.manifestUpdater && (fe = nn.manifestUpdater));
            },
            setProtectionData: function (nn) {
              (nt = nn), rt && rt.setProtectionData(nt);
            },
            switchToVideoElement: function (nn) {
              he &&
                (Ke.initialize(Tg()),
                pn({ seekTime: nn, keepBuffers: !1, streamActivated: !0 }));
            },
          }),
          (Q = (0, E.default)(Y).getInstance().getLogger(K)),
          (le = zv(Y).getInstance()),
          (se = pg(Y).getInstance()),
          (Re = Gt(Y).getInstance()),
          bu(),
          K
        );
      }
      $l.__dashjs_factory_name = "StreamController";
      var mu = H.default.getSingletonFactory($l);
      function yu() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K, Q, q, ee, fe, ve, ne, Te, _e, se, le, me;
        function we() {
          me.debug("Stopping the gap controller"),
            fe && (clearInterval(fe), (fe = null)),
            (function () {
              U.off(G.default.WALLCLOCK_TIME_UPDATED, Fe, this),
                U.off(G.default.INITIAL_STREAM_SWITCH, $e, this),
                U.off(G.default.PLAYBACK_SEEKING, Me, this),
                U.off(G.default.BUFFER_REPLACEMENT_STARTED, Oe, K),
                U.off(G.default.TRACK_CHANGE_RENDERED, Ge, K);
            })(),
            (fe = null),
            (ve = NaN),
            (ee = 0),
            (se = null),
            (le = {});
        }
        function Me() {
          se && (clearTimeout(se), (se = null));
        }
        function Oe(be) {
          try {
            if (
              be.streamId !== Te.getActiveStreamInfo().id ||
              (be.mediaType !== P.default.VIDEO &&
                be.mediaType !== P.default.AUDIO)
            )
              return;
            be.streamId === Te.getActiveStreamInfo().id &&
              (le[be.mediaType] = !0);
          } catch (Se) {
            me.error(Se);
          }
        }
        function Ge(be) {
          be && be.mediaType && (le[be.mediaType] = !1);
        }
        function $e() {
          fe ||
            (function () {
              try {
                fe ||
                  (me.debug("Starting the gap controller"),
                  (fe = setInterval(() => {
                    qe() && Re(ne.getTime());
                  }, 100)));
              } catch {}
            })();
        }
        function Fe() {
          if (qe(q.get().streaming.gaps.enableSeekFix) && (ee++, ee >= 10)) {
            const be = ne.getTime();
            Q === be ? Re(be, !0) : ((Q = be), (ve = NaN)), (ee = 0);
          }
        }
        function qe() {
          let be =
            arguments.length > 0 && arguments[0] !== void 0 && arguments[0];
          if (!Te.getActiveStream()) return !1;
          const Se = Object.keys(le).some((he) => le[he]),
            ke =
              !!be &&
              (function () {
                const he = Te.getActiveStream(),
                  rt = parseFloat(
                    (he.getStartTime() + he.getDuration()).toFixed(5)
                  );
                return ne.getTime() + q.get().streaming.gaps.threshold >= rt;
              })();
          return (
            !Se &&
            q.get().streaming.gaps.jumpGaps &&
            Te.getActiveStreamProcessors().length > 0 &&
            (!ne.isSeeking() || ke) &&
            !ne.isPaused() &&
            !Te.getIsStreamSwitchInProgress() &&
            !Te.getHasMediaOrInitialisationError()
          );
        }
        function Re(be) {
          let Se =
            arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
          const ke = q.get().streaming.gaps.enableStallFix,
            he = q.get().streaming.gaps.stallSeek,
            rt = q.get().streaming.gaps.smallGapLimit,
            Ze = q.get().streaming.gaps.jumpLargeGaps,
            nt = _e.getBufferRange();
          let vt,
            ce = NaN,
            Ve = !1;
          if (
            ((vt = (function (it, Qe) {
              try {
                if (!it || (it.length <= 1 && Qe > 0)) return NaN;
                let We = NaN,
                  Ke = 0;
                for (; isNaN(We) && Ke < it.length; ) {
                  const Ie = Ke > 0 ? it.end(Ke - 1) : 0;
                  Qe < it.start(Ke) &&
                    Ie - Qe < q.get().streaming.gaps.threshold &&
                    (We = Ke),
                    (Ke += 1);
                }
                return We;
              } catch {
                return null;
              }
            })(nt, be)),
            !isNaN(vt))
          ) {
            const it = nt.start(vt),
              Qe = it - be;
            Qe > 0 && (Qe <= rt || Ze) && (ce = it);
          }
          const je = ne.getTimeToStreamEnd();
          if (
            (isNaN(ce) &&
              Se &&
              isFinite(je) &&
              !isNaN(je) &&
              je < rt &&
              ((ce = parseFloat(ne.getStreamEndTime().toFixed(5))), (Ve = !0)),
            ke &&
              isNaN(ce) &&
              Se &&
              isNaN(vt) &&
              (function (it, Qe) {
                for (let We = 0, Ke = it.length; We < Ke; We++)
                  if (Qe >= it.start(We) && Qe <= it.end(We)) return !0;
                return !1;
              })(nt, be) &&
              (he === 0
                ? (me.warn("Toggle play pause to break stall"),
                  _e.pause(),
                  _e.play())
                : (me.warn(`Jumping ${he}s to break stall`), (ce = be + he))),
            ce > 0 && ve !== ce && ce > be && !se)
          ) {
            const it = ce - be;
            if (Ve) {
              const Qe = Te.getStreamForTime(ce),
                We = Qe && !!Qe.getPreloaded();
              me.warn(
                `Jumping to end of stream because of gap from ${be} to ${ce}. Gap duration: ${it}`
              ),
                ne.seek(ce, !0, We);
            } else {
              const Qe = ne.getIsDynamic(),
                We = vt > 0 ? nt.end(vt - 1) : be,
                Ke = Qe ? 1e3 * Math.max(0, it - 0.1) : 0;
              se = window.setTimeout(() => {
                ne.seek(ce, !0, !0),
                  me.warn(
                    `Jumping gap occuring in period ${Te.getActiveStream().getStreamId()} starting at ${We} and ending at ${ce}. Jumping by: ${
                      ce - We
                    }`
                  ),
                  (se = null);
              }, Ke);
            }
            ve = ce;
          }
        }
        return (
          (K = {
            reset: we,
            setConfig: function (be) {
              be &&
                (be.settings && (q = be.settings),
                be.playbackController && (ne = be.playbackController),
                be.streamController && (Te = be.streamController),
                be.videoModel && (_e = be.videoModel));
            },
            initialize: function () {
              (function () {
                U.on(G.default.WALLCLOCK_TIME_UPDATED, Fe, this),
                  U.on(G.default.INITIAL_STREAM_SWITCH, $e, this),
                  U.on(G.default.PLAYBACK_SEEKING, Me, this),
                  U.on(G.default.BUFFER_REPLACEMENT_STARTED, Oe, K),
                  U.on(G.default.TRACK_CHANGE_RENDERED, Ge, K);
              })();
            },
          }),
          (me = (0, E.default)(Y).getInstance().getLogger(K)),
          we(),
          K
        );
      }
      yu.__dashjs_factory_name = "GapController";
      var o2 = H.default.getSingletonFactory(yu);
      function Jb() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K, Q, q, ee, fe, ve, ne, Te, _e, se;
        function le() {
          Q = !1;
          const Re = sn.default.parseUserAgent();
          q =
            Re &&
            Re.browser &&
            Re.browser.name &&
            Re.browser.name.toLowerCase() === "safari";
        }
        function me() {
          Q = !1;
        }
        function we(Re) {
          if (Re.streamId !== ve.getActiveStreamInfo().id || !_e) return;
          const be = ne.getLiveDelay();
          ne.getBufferLevel() > be / 2 && (_e = !1);
        }
        function Me(Re) {
          Re.streamId === ve.getActiveStreamInfo().id &&
            (_e = Re.state === O.BUFFER_EMPTY);
        }
        function Oe() {
          Te.getCatchupModeEnabled() || ee.setPlaybackRate(1);
        }
        function Ge() {
          ne.getIsDynamic() &&
            Te.getCatchupModeEnabled() &&
            (Te.getCatchupPlaybackRates().max > 0 ||
              Te.getCatchupPlaybackRates().min < 0) &&
            !ne.isPaused() &&
            !ne.isSeeking() &&
            (function () {
              try {
                return (
                  !(!ne.getTime() > 0 || Q) &&
                  (Fe() === P.default.LIVE_CATCHUP_MODE_LOLP
                    ? (function (Re, be) {
                        try {
                          return Math.abs($e()) > 0 || Re < be;
                        } catch {
                          return !1;
                        }
                      })(
                        ne.getBufferLevel(),
                        fe.get().streaming.liveCatchup.playbackBufferMin
                      )
                    : (function () {
                        try {
                          return Math.abs($e()) > 0;
                        } catch {
                          return !1;
                        }
                      })())
                );
              } catch {
                return !1;
              }
            })() &&
            (function () {
              if (!Q && ee) {
                let Re;
                const be = ee.getPlaybackRate(),
                  Se = Te.getCatchupPlaybackRates(),
                  ke = ne.getBufferLevel(),
                  he = $e(),
                  rt = Te.getCatchupMaxDrift();
                if (!isNaN(rt) && rt > 0 && he > rt)
                  se.info(
                    "[CatchupController]: Low Latency catchup mechanism. Latency too high, doing a seek to live point"
                  ),
                    (Q = !0),
                    ne.seekToCurrentLive(!0, !1);
                else {
                  const Ze = ne.getCurrentLiveLatency(),
                    nt = ne.getLiveDelay();
                  Re =
                    Fe() === P.default.LIVE_CATCHUP_MODE_LOLP
                      ? (function (ce, Ve, je, it, Qe) {
                          let We;
                          if (Qe < it) {
                            const Ke = Math.abs(ce.min),
                              Ie = 5 * (Qe - it);
                            (We =
                              1 - Ke + (2 * Ke) / (1 + Math.pow(Math.E, -Ie))),
                              se.debug(
                                "[LoL+ playback control_buffer-based] bufferLevel: " +
                                  Qe +
                                  ", newRate: " +
                                  We
                              );
                          } else {
                            if (Math.abs(Ve - je) <= 0.02 * je) We = 1;
                            else {
                              const Ie = Ve - je,
                                Ue = Ie < 0 ? Math.abs(ce.min) : ce.max,
                                at = 5 * Ie;
                              We =
                                1 - Ue + (2 * Ue) / (1 + Math.pow(Math.E, -at));
                            }
                            se.debug(
                              "[LoL+ playback control_latency-based] latency: " +
                                Ve +
                                ", newRate: " +
                                We
                            );
                          }
                          return We;
                        })(
                          Se,
                          Ze,
                          nt,
                          fe.get().streaming.liveCatchup.playbackBufferMin,
                          ke
                        )
                      : (function (ce, Ve, je, it) {
                          if (_e) return 1;
                          const Qe = Ve - je,
                            We = Qe < 0 ? Math.abs(ce.min) : ce.max,
                            Ke = 5 * Qe;
                          let Ie =
                            1 - We + (2 * We) / (1 + Math.pow(Math.E, -Ke));
                          return (
                            ne.getPlaybackStalled() &&
                              it <= je / 2 &&
                              Qe > 0 &&
                              (Ie = 1),
                            Ie
                          );
                        })(Se, Ze, nt, ke);
                  const vt = q ? 0.25 : 0.02 / (0.5 / Se.max);
                  ((Re && Math.abs(be - Re) >= vt) || Re == 1) &&
                    (se.debug(
                      `[CatchupController]: Setting playback rate to ${Re}`
                    ),
                    ee.setPlaybackRate(Re));
                }
              }
            })();
        }
        function $e() {
          return ne.getCurrentLiveLatency() - ne.getLiveDelay();
        }
        function Fe() {
          const Re = fe.get().streaming.liveCatchup.playbackBufferMin;
          return fe.get().streaming.liveCatchup.mode !==
            P.default.LIVE_CATCHUP_MODE_LOLP ||
            Re === null ||
            isNaN(Re)
            ? P.default.LIVE_CATCHUP_MODE_DEFAULT
            : P.default.LIVE_CATCHUP_MODE_LOLP;
        }
        function qe() {
          Te.getCatchupPlaybackRates(!0);
        }
        return (
          (K = {
            reset: function () {
              U.off(S.default.BUFFER_LEVEL_UPDATED, we, K),
                U.off(S.default.BUFFER_LEVEL_STATE_CHANGED, Me, K),
                U.off(S.default.PLAYBACK_PROGRESS, Ge, K),
                U.off(S.default.PLAYBACK_TIME_UPDATED, Ge, K),
                U.off(S.default.PLAYBACK_SEEKED, me, K),
                U.off(G.default.SETTING_UPDATED_CATCHUP_ENABLED, Oe, K),
                U.off(G.default.SETTING_UPDATED_PLAYBACK_RATE_MIN, qe, K),
                U.off(G.default.SETTING_UPDATED_PLAYBACK_RATE_MAX, qe, K),
                U.off(S.default.STREAM_INITIALIZED, qe, K),
                le(),
                ee.setPlaybackRate(1, !0);
            },
            setConfig: function (Re) {
              Re &&
                (Re.settings && (fe = Re.settings),
                Re.videoModel && (ee = Re.videoModel),
                Re.streamController && (ve = Re.streamController),
                Re.playbackController && (ne = Re.playbackController),
                Re.mediaPlayerModel && (Te = Re.mediaPlayerModel));
            },
            initialize: function () {
              U.on(S.default.BUFFER_LEVEL_UPDATED, we, K),
                U.on(S.default.BUFFER_LEVEL_STATE_CHANGED, Me, K),
                U.on(S.default.PLAYBACK_PROGRESS, Ge, K),
                U.on(S.default.PLAYBACK_TIME_UPDATED, Ge, K),
                U.on(S.default.PLAYBACK_SEEKED, me, K),
                U.on(G.default.SETTING_UPDATED_CATCHUP_ENABLED, Oe, K),
                U.on(G.default.SETTING_UPDATED_PLAYBACK_RATE_MIN, qe, K),
                U.on(G.default.SETTING_UPDATED_PLAYBACK_RATE_MAX, qe, K),
                U.on(S.default.STREAM_INITIALIZED, qe, K),
                qe();
            },
          }),
          (se = (0, E.default)(Y).getInstance().getLogger(K)),
          le(),
          K
        );
      }
      Jb.__dashjs_factory_name = "CatchupController";
      var As = H.default.getSingletonFactory(Jb);
      const qb = [P.default.SERVICE_DESCRIPTION_DVB_LL_SCHEME],
        rp = "video",
        Gm = "audio";
      function e_() {
        const Y = this.context;
        let U, K, Q, q, ee;
        function fe() {
          (K = {
            liveDelay: NaN,
            liveCatchup: {
              maxDrift: NaN,
              playbackRate: { min: NaN, max: NaN },
            },
            minBitrate: {},
            maxBitrate: {},
            initialBitrate: {},
            contentSteering: null,
            clientDataReporting: null,
          }),
            (Q = []);
        }
        function ve(ne, Te, _e) {
          try {
            K[ne][Te] = _e / 1e3;
          } catch (se) {
            q.error(se);
          }
        }
        return (
          (U = {
            getServiceDescriptionSettings: function () {
              return K;
            },
            getProducerReferenceTimeOffsets: function () {
              return Q;
            },
            calculateProducerReferenceTimeOffsets: function (ne) {
              try {
                let Te = [];
                if (ne && ne.length > 0) {
                  const _e = [P.default.VIDEO, P.default.AUDIO, P.default.TEXT],
                    se = ee.getAvailabilityStartTime() / 1e3;
                  ne.forEach((le) => {
                    const me = _e
                      .reduce(
                        (we, Me) =>
                          we.concat(ee.getAllMediaInfoForType(le, Me)),
                        []
                      )
                      .reduce(
                        (we, Me) => (
                          ee.getProducerReferenceTimes(le, Me).forEach((Oe) => {
                            const Ge = ee.getVoRepresentations(Me);
                            if (
                              Ge &&
                              Ge.length > 0 &&
                              Ge[0].adaptation &&
                              Ge[0].segmentInfoType ===
                                I.default.SEGMENT_TEMPLATE
                            ) {
                              const $e = Ge[0],
                                Fe =
                                  new Date(
                                    Oe[I.default.WALL_CLOCK_TIME]
                                  ).getTime() /
                                    1e3 -
                                  (Oe[I.default.PRESENTATION_TIME] /
                                    $e[I.default.TIMESCALE] -
                                    $e[I.default.PRESENTATION_TIME_OFFSET] +
                                    le.start),
                                qe = se - Fe;
                              we.push({ id: Oe[I.default.ID], to: qe });
                            }
                          }),
                          we
                        ),
                        []
                      );
                    Te = Te.concat(me);
                  });
                }
                Q = Te;
              } catch (Te) {
                q.error(Te), (Q = []);
              }
            },
            applyServiceDescription: function (ne) {
              if (!ne || !ne.serviceDescriptions) return;
              const Te = ne.serviceDescriptions.filter((me) =>
                  qb.includes(me.schemeIdUri)
                ),
                _e = ne.serviceDescriptions.filter(
                  (me) => me.schemeIdUri == null
                );
              let se = Te.length > 0 ? Te[Te.length - 1] : _e[_e.length - 1];
              var le;
              se &&
                (se.latency &&
                  se.latency.target > 0 &&
                  (function (me) {
                    let we;
                    if (
                      (me.schemeIdUri,
                      P.default.SERVICE_DESCRIPTION_DVB_LL_SCHEME,
                      (we = {
                        liveDelay: (Me = me).latency.target / 1e3,
                        maxDrift:
                          !isNaN(Me.latency.max) &&
                          Me.latency.max > Me.latency.target
                            ? (Me.latency.max - Me.latency.target + 500) / 1e3
                            : NaN,
                        referenceId: Me.latency.referenceId || NaN,
                      }),
                      Q.length > 0)
                    ) {
                      let { to: Oe, id: Ge } = (function ($e) {
                        let Fe,
                          qe = 0,
                          Re = Q.filter((be) => be.id === $e.referenceId);
                        return (
                          Re.length === 0
                            ? ((qe = Q.length > 0 ? Q[0].to : 0),
                              (Fe = Q[0].id || NaN))
                            : ((qe = Re[0].to || 0), (Fe = Re[0].id || NaN)),
                          { to: qe, id: Fe }
                        );
                      })(we);
                      (K.liveDelay = we.liveDelay - Oe),
                        (K.liveCatchup.maxDrift = we.maxDrift),
                        q.debug(`
                Found latency properties coming from service description. Applied time offset of ${Oe} from ProducerReferenceTime element with id ${Ge}.
                Live Delay: ${we.liveDelay - Oe}, Live catchup max drift: ${
                          we.maxDrift
                        }
            `);
                    } else
                      (K.liveDelay = we.liveDelay),
                        (K.liveCatchup.maxDrift = we.maxDrift),
                        q.debug(
                          `Found latency properties coming from service description: Live Delay: ${we.liveDelay}, Live catchup max drift: ${we.maxDrift}`
                        );
                    var Me;
                  })(se),
                se.playbackRate &&
                  (function (me) {
                    const we = me.playbackRate.min
                        ? Math.round(1e3 * (me.playbackRate.min - 1)) / 1e3
                        : NaN,
                      Me = me.playbackRate.max
                        ? Math.round(1e3 * (me.playbackRate.max - 1)) / 1e3
                        : NaN;
                    (K.liveCatchup.playbackRate.min = we),
                      (K.liveCatchup.playbackRate.max = Me),
                      q.debug(
                        `Found latency properties coming from service description: Live catchup min playback rate: ${we}`
                      ),
                      q.debug(
                        `Found latency properties coming from service description: Live catchup max playback rate: ${Me}`
                      );
                  })(se),
                se.operatingQuality,
                se.operatingBandwidth &&
                  (function (me) {
                    if (
                      !me ||
                      !me.operatingBandwidth ||
                      !me.operatingBandwidth.mediaType ||
                      me.operatingBandwidth.mediaType === "all"
                    )
                      return;
                    const we = {};
                    (we.minBandwidth = me.operatingBandwidth.min),
                      (we.maxBandwidth = me.operatingBandwidth.max),
                      (we.targetBandwidth = me.operatingBandwidth.target);
                    const Me = [];
                    me.operatingBandwidth.mediaType === rp ||
                    me.operatingBandwidth.mediaType === Gm
                      ? Me.push(me.operatingBandwidth.mediaType)
                      : me.operatingBandwidth.mediaType === "any" &&
                        (Me.push(Gm), Me.push(rp)),
                      Me.forEach((Oe) => {
                        isNaN(we.minBandwidth) ||
                          ve("minBitrate", Oe, we.minBandwidth),
                          isNaN(we.maxBandwidth) ||
                            ve("maxBitrate", Oe, we.maxBandwidth),
                          isNaN(we.targetBandwidth) ||
                            ve("initialBitrate", Oe, we.targetBandwidth);
                      });
                  })(se),
                se.contentSteering &&
                  ((le = se), (K.contentSteering = le.contentSteering)),
                se.clientDataReporting &&
                  (function (me) {
                    K.clientDataReporting = me.clientDataReporting;
                  })(se));
            },
            reset: function () {
              fe();
            },
            setConfig: function (ne) {
              ne && ne.adapter && (ee = ne.adapter);
            },
          }),
          (q = (0, E.default)(Y).getInstance().getLogger(U)),
          fe(),
          U
        );
      }
      e_.__dashjs_factory_name = "ServiceDescriptionController";
      var Qa = H.default.getSingletonFactory(e_);
      function ip() {
        let Y =
            arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
          U = [];
        if (Y.irregular) return Y.irregular;
        if (Y.regular) return Y.regular;
        if (Y.language) {
          U = U.concat(
            Y.language,
            Y.extendedLanguageSubtags || [],
            Y.script || [],
            Y.region || [],
            Y.variants || []
          );
          const K = Y.extensions || [];
          let Q = -1;
          for (; ++Q < K.length; ) {
            const q = K[Q];
            q.singleton &&
              q.extensions &&
              q.extensions.length > 0 &&
              U.push(q.singleton, ...q.extensions);
          }
        }
        return (
          Y.privateuse &&
            Y.privateuse.length > 0 &&
            U.push("x", ...Y.privateuse),
          U.join("-")
        );
      }
      function Fu(Y) {
        const U = typeof Y == "string" ? Y.charCodeAt(0) : Y;
        return (U >= 97 && U <= 122) || (U >= 65 && U <= 90);
      }
      function Zs(Y) {
        const U = typeof Y == "string" ? Y.charCodeAt(0) : Y;
        return U >= 48 && U <= 57;
      }
      function gh(Y) {
        return Fu(Y) || Zs(Y);
      }
      const s2 = [
          "art-lojban",
          "cel-gaulish",
          "no-bok",
          "no-nyn",
          "zh-guoyu",
          "zh-hakka",
          "zh-min",
          "zh-min-nan",
          "zh-xiang",
        ],
        Nm = {
          "en-gb-oed": "en-GB-oxendict",
          "i-ami": "ami",
          "i-bnn": "bnn",
          "i-default": null,
          "i-enochian": null,
          "i-hak": "hak",
          "i-klingon": "tlh",
          "i-lux": "lb",
          "i-mingo": null,
          "i-navajo": "nv",
          "i-pwn": "pwn",
          "i-tao": "tao",
          "i-tay": "tay",
          "i-tsu": "tsu",
          "sgn-be-fr": "sfb",
          "sgn-be-nl": "vgt",
          "sgn-ch-de": "sgg",
          "art-lojban": "jbo",
          "cel-gaulish": null,
          "no-bok": "nb",
          "no-nyn": "nn",
          "zh-guoyu": "cmn",
          "zh-hakka": "hak",
          "zh-min": null,
          "zh-min-nan": "nan",
          "zh-xiang": "hsn",
        },
        t_ = {}.hasOwnProperty;
      function xl(Y) {
        let U =
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
        const K = {
            language: null,
            extendedLanguageSubtags: [],
            script: null,
            region: null,
            variants: [],
            extensions: [],
            privateuse: [],
            irregular: null,
            regular: null,
          },
          Q = String(Y),
          q = Q.toLowerCase();
        let ee = 0;
        if (Y == null) throw new Error("Expected string, got `" + Y + "`");
        if (t_.call(Nm, q)) {
          const ve = Nm[q];
          return (U.normalize !== void 0 &&
            U.normalize !== null &&
            !U.normalize) ||
            typeof ve != "string"
            ? ((K[s2.includes(q) ? "regular" : "irregular"] = Q), K)
            : xl(ve);
        }
        for (; Fu(q.charCodeAt(ee)) && ee < 9; ) ee++;
        if (ee > 1 && ee < 9) {
          if (((K.language = Q.slice(0, ee)), ee < 4)) {
            let ve = 0;
            for (
              ;
              q.charCodeAt(ee) === 45 &&
              Fu(q.charCodeAt(ee + 1)) &&
              Fu(q.charCodeAt(ee + 2)) &&
              Fu(q.charCodeAt(ee + 3)) &&
              !Fu(q.charCodeAt(ee + 4));

            ) {
              if (ve > 2)
                return fe(
                  ee,
                  3,
                  "Too many extended language subtags, expected at most 3 subtags"
                );
              K.extendedLanguageSubtags.push(Q.slice(ee + 1, ee + 4)),
                (ee += 4),
                ve++;
            }
          }
          for (
            q.charCodeAt(ee) === 45 &&
              Fu(q.charCodeAt(ee + 1)) &&
              Fu(q.charCodeAt(ee + 2)) &&
              Fu(q.charCodeAt(ee + 3)) &&
              Fu(q.charCodeAt(ee + 4)) &&
              !Fu(q.charCodeAt(ee + 5)) &&
              ((K.script = Q.slice(ee + 1, ee + 5)), (ee += 5)),
              q.charCodeAt(ee) === 45 &&
                (Fu(q.charCodeAt(ee + 1)) &&
                Fu(q.charCodeAt(ee + 2)) &&
                !Fu(q.charCodeAt(ee + 3))
                  ? ((K.region = Q.slice(ee + 1, ee + 3)), (ee += 3))
                  : Zs(q.charCodeAt(ee + 1)) &&
                    Zs(q.charCodeAt(ee + 2)) &&
                    Zs(q.charCodeAt(ee + 3)) &&
                    !Zs(q.charCodeAt(ee + 4)) &&
                    ((K.region = Q.slice(ee + 1, ee + 4)), (ee += 4)));
            q.charCodeAt(ee) === 45;

          ) {
            const ve = ee + 1;
            let ne = ve;
            for (; gh(q.charCodeAt(ne)); ) {
              if (ne - ve > 7)
                return fe(
                  ne,
                  1,
                  "Too long variant, expected at most 8 characters"
                );
              ne++;
            }
            if (!(ne - ve > 4 || (ne - ve > 3 && Zs(q.charCodeAt(ve))))) break;
            K.variants.push(Q.slice(ve, ne)), (ee = ne);
          }
          for (
            ;
            q.charCodeAt(ee) === 45 &&
            q.charCodeAt(ee + 1) !== 120 &&
            gh(q.charCodeAt(ee + 1)) &&
            q.charCodeAt(ee + 2) === 45 &&
            gh(q.charCodeAt(ee + 3));

          ) {
            let ve = ee + 2,
              ne = 0;
            for (
              ;
              q.charCodeAt(ve) === 45 &&
              gh(q.charCodeAt(ve + 1)) &&
              gh(q.charCodeAt(ve + 2));

            ) {
              const Te = ve + 1;
              for (ve = Te + 2, ne++; gh(q.charCodeAt(ve)); ) {
                if (ve - Te > 7)
                  return fe(
                    ve,
                    2,
                    "Too long extension, expected at most 8 characters"
                  );
                ve++;
              }
            }
            if (!ne)
              return fe(
                ve,
                4,
                "Empty extension, extensions must have at least 2 characters of content"
              );
            K.extensions.push({
              singleton: Q.charAt(ee + 1),
              extensions: Q.slice(ee + 3, ve).split("-"),
            }),
              (ee = ve);
          }
        } else ee = 0;
        if (
          (ee === 0 && q.charCodeAt(ee) === 120) ||
          (q.charCodeAt(ee) === 45 && q.charCodeAt(ee + 1) === 120)
        ) {
          ee = ee ? ee + 2 : 1;
          let ve = ee;
          for (; q.charCodeAt(ve) === 45 && gh(q.charCodeAt(ve + 1)); ) {
            const ne = ee + 1;
            for (ve = ne; gh(q.charCodeAt(ve)); ) {
              if (ve - ne > 7)
                return fe(
                  ve,
                  5,
                  "Too long private-use area, expected at most 8 characters"
                );
              ve++;
            }
            K.privateuse.push(Q.slice(ee + 1, ve)), (ee = ve);
          }
        }
        return ee !== Q.length
          ? fe(ee, 6, "Found superfluous content after tag")
          : K;
        function fe(ve, ne, Te) {
          return (
            U.warning && U.warning(Te, ne, ve),
            U.forgiving
              ? K
              : {
                  language: null,
                  extendedLanguageSubtags: [],
                  script: null,
                  region: null,
                  variants: [],
                  extensions: [],
                  privateuse: [],
                  irregular: null,
                  regular: null,
                }
          );
        }
      }
      const ap =
        ((jv = function (Y, U) {
          const K = Y.split("-"),
            Q = U.split("-");
          let q = 0,
            ee = 0;
          if (Q[ee] !== "*" && K[q] !== Q[ee]) return !1;
          for (q++, ee++; ee < Q.length; )
            if (Q[ee] !== "*") {
              if (!K[q]) return !1;
              if (K[q] !== Q[ee]) {
                if (K[q].length === 1) return !1;
                q++;
              } else q++, ee++;
            } else ee++;
          return !0;
        }),
        (ty = !0),
        function (Y, U) {
          let K = dd(Y, "tag");
          const Q = dd(U ?? "*", "range"),
            q = [];
          let ee = -1;
          for (; ++ee < Q.length; ) {
            const fe = Q[ee].toLowerCase();
            if (!ty && fe === "*") continue;
            let ve = -1;
            const ne = [];
            for (; ++ve < K.length; )
              if (jv(K[ve].toLowerCase(), fe)) {
                if (!ty) return K[ve];
                q.push(K[ve]);
              } else ne.push(K[ve]);
            K = ne;
          }
          return ty ? q : void 0;
        });
      var jv, ty;
      function dd(Y, U) {
        const K = Y && typeof Y == "string" ? [Y] : Y;
        if (!K || typeof K != "object" || !("length" in K))
          throw new Error(
            "Invalid " + U + " `" + K + "`, expected non-empty string"
          );
        return K;
      }
      const Od = [
          { from: "in", to: "id" },
          { from: "iw", to: "he" },
          { from: "ji", to: "yi" },
          { from: "jw", to: "jv" },
          { from: "mo", to: "ro" },
          { from: "scc", to: "sr" },
          { from: "scr", to: "hr" },
          { from: "aam", to: "aas" },
          { from: "adp", to: "dz" },
          { from: "aue", to: "ktz" },
          { from: "ayx", to: "nun" },
          { from: "bgm", to: "bcg" },
          { from: "bjd", to: "drl" },
          { from: "ccq", to: "rki" },
          { from: "cjr", to: "mom" },
          { from: "cka", to: "cmr" },
          { from: "cmk", to: "xch" },
          { from: "coy", to: "pij" },
          { from: "cqu", to: "quh" },
          { from: "drh", to: "mn" },
          { from: "drw", to: "fa-af" },
          { from: "gav", to: "dev" },
          { from: "gfx", to: "vaj" },
          { from: "ggn", to: "gvr" },
          { from: "gti", to: "nyc" },
          { from: "guv", to: "duz" },
          { from: "hrr", to: "jal" },
          { from: "ibi", to: "opa" },
          { from: "ilw", to: "gal" },
          { from: "jeg", to: "oyb" },
          { from: "kgc", to: "tdf" },
          { from: "kgh", to: "kml" },
          { from: "koj", to: "kwv" },
          { from: "krm", to: "bmf" },
          { from: "ktr", to: "dtp" },
          { from: "kvs", to: "gdj" },
          { from: "kwq", to: "yam" },
          { from: "kxe", to: "tvd" },
          { from: "kzj", to: "dtp" },
          { from: "kzt", to: "dtp" },
          { from: "lii", to: "raq" },
          { from: "lmm", to: "rmx" },
          { from: "meg", to: "cir" },
          { from: "mst", to: "mry" },
          { from: "mwj", to: "vaj" },
          { from: "myt", to: "mry" },
          { from: "nad", to: "xny" },
          { from: "ncp", to: "kdz" },
          { from: "nnx", to: "ngv" },
          { from: "nts", to: "pij" },
          { from: "oun", to: "vaj" },
          { from: "pcr", to: "adx" },
          { from: "pmc", to: "huw" },
          { from: "pmu", to: "phr" },
          { from: "ppa", to: "bfy" },
          { from: "ppr", to: "lcq" },
          { from: "pry", to: "prt" },
          { from: "puz", to: "pub" },
          { from: "sca", to: "hle" },
          { from: "skk", to: "oyb" },
          { from: "tdu", to: "dtp" },
          { from: "thc", to: "tpo" },
          { from: "thx", to: "oyb" },
          { from: "tie", to: "ras" },
          { from: "tkk", to: "twm" },
          { from: "tlw", to: "weo" },
          { from: "tmp", to: "tyj" },
          { from: "tne", to: "kak" },
          { from: "tnf", to: "fa-af" },
          { from: "tsf", to: "taj" },
          { from: "uok", to: "ema" },
          { from: "xba", to: "cax" },
          { from: "xia", to: "acn" },
          { from: "xkh", to: "waw" },
          { from: "xsj", to: "suj" },
          { from: "ybd", to: "rki" },
          { from: "yma", to: "lrr" },
          { from: "ymt", to: "mtm" },
          { from: "yos", to: "zom" },
          { from: "yuu", to: "yug" },
          { from: "asd", to: "snz" },
          { from: "dit", to: "dif" },
          { from: "llo", to: "ngt" },
          { from: "myd", to: "aog" },
          { from: "nns", to: "nbr" },
          { from: "agp", to: "apf" },
          { from: "ais", to: "ami" },
          { from: "ajt", to: "aeb" },
          { from: "baz", to: "nvo" },
          { from: "bhk", to: "fbl" },
          { from: "bic", to: "bir" },
          { from: "bjq", to: "bzc" },
          { from: "bkb", to: "ebk" },
          { from: "blg", to: "iba" },
          { from: "btb", to: "beb" },
          { from: "daf", to: "dnj" },
          { from: "dap", to: "njz" },
          { from: "djl", to: "dze" },
          { from: "dkl", to: "aqd" },
          { from: "drr", to: "kzk" },
          { from: "dud", to: "uth" },
          { from: "duj", to: "dwu" },
          { from: "dwl", to: "dbt" },
          { from: "elp", to: "amq" },
          { from: "gbc", to: "wny" },
          { from: "ggo", to: "esg" },
          { from: "ggr", to: "gtu" },
          { from: "gio", to: "aou" },
          { from: "gli", to: "kzk" },
          { from: "ill", to: "ilm" },
          { from: "izi", to: "eza" },
          { from: "jar", to: "jgk" },
          { from: "kdv", to: "zkd" },
          { from: "kgd", to: "ncq" },
          { from: "kpp", to: "jkm" },
          { from: "kxl", to: "kru" },
          { from: "kzh", to: "dgl" },
          { from: "lak", to: "ksp" },
          { from: "leg", to: "enl" },
          { from: "mgx", to: "jbk" },
          { from: "mnt", to: "wnn" },
          { from: "mof", to: "xnt" },
          { from: "mwd", to: "dmw" },
          { from: "nbf", to: "nru" },
          { from: "nbx", to: "ekc" },
          { from: "nln", to: "azd" },
          { from: "nlr", to: "nrk" },
          { from: "noo", to: "dtd" },
          { from: "nxu", to: "bpp" },
          { from: "pat", to: "kxr" },
          { from: "rmr", to: "emx" },
          { from: "sap", to: "aqt" },
          { from: "sgl", to: "isk" },
          { from: "smd", to: "kmb" },
          { from: "snb", to: "iba" },
          { from: "sul", to: "sgd" },
          { from: "sum", to: "ulw" },
          { from: "tgg", to: "bjp" },
          { from: "thw", to: "ola" },
          { from: "tid", to: "itd" },
          { from: "unp", to: "wro" },
          { from: "wgw", to: "wgb" },
          { from: "wit", to: "nol" },
          { from: "wiw", to: "nwo" },
          { from: "xrq", to: "dmw" },
          { from: "yen", to: "ynq" },
          { from: "yiy", to: "yrm" },
          { from: "zir", to: "scv" },
          { from: "sgn-br", to: "bzs" },
          { from: "sgn-co", to: "csn" },
          { from: "sgn-de", to: "gsg" },
          { from: "sgn-dk", to: "dsl" },
          { from: "sgn-fr", to: "fsl" },
          { from: "sgn-gb", to: "bfi" },
          { from: "sgn-gr", to: "gss" },
          { from: "sgn-ie", to: "isg" },
          { from: "sgn-it", to: "ise" },
          { from: "sgn-jp", to: "jsl" },
          { from: "sgn-mx", to: "mfs" },
          { from: "sgn-ni", to: "ncs" },
          { from: "sgn-nl", to: "dse" },
          { from: "sgn-no", to: "nsi" },
          { from: "sgn-pt", to: "psr" },
          { from: "sgn-se", to: "swl" },
          { from: "sgn-us", to: "ase" },
          { from: "sgn-za", to: "sfs" },
          { from: "sgn-es", to: "ssp" },
          { from: "zh-cmn", to: "zh" },
          { from: "zh-cmn-hans", to: "zh-hans" },
          { from: "zh-cmn-hant", to: "zh-hant" },
          { from: "zh-gan", to: "gan" },
          { from: "zh-wuu", to: "wuu" },
          { from: "zh-yue", to: "yue" },
          { from: "no-bokmal", to: "nb" },
          { from: "no-nynorsk", to: "nn" },
          { from: "aa-saaho", to: "ssy" },
          { from: "sh", to: "sr-latn" },
          { from: "cnr", to: "sr-me" },
          { from: "tl", to: "fil" },
          { from: "aju", to: "jrb" },
          { from: "als", to: "sq" },
          { from: "arb", to: "ar" },
          { from: "ayr", to: "ay" },
          { from: "azj", to: "az" },
          { from: "bcc", to: "bal" },
          { from: "bcl", to: "bik" },
          { from: "bxk", to: "luy" },
          { from: "bxr", to: "bua" },
          { from: "cld", to: "syr" },
          { from: "cmn", to: "zh" },
          { from: "cwd", to: "cr" },
          { from: "dgo", to: "doi" },
          { from: "dhd", to: "mwr" },
          { from: "dik", to: "din" },
          { from: "diq", to: "zza" },
          { from: "lbk", to: "bnc" },
          { from: "ekk", to: "et" },
          { from: "emk", to: "man" },
          { from: "esk", to: "ik" },
          { from: "fat", to: "ak" },
          { from: "fuc", to: "ff" },
          { from: "gaz", to: "om" },
          { from: "gbo", to: "grb" },
          { from: "gno", to: "gon" },
          { from: "gug", to: "gn" },
          { from: "gya", to: "gba" },
          { from: "hdn", to: "hai" },
          { from: "hea", to: "hmn" },
          { from: "ike", to: "iu" },
          { from: "kmr", to: "ku" },
          { from: "knc", to: "kr" },
          { from: "kng", to: "kg" },
          { from: "knn", to: "kok" },
          { from: "kpv", to: "kv" },
          { from: "lvs", to: "lv" },
          { from: "mhr", to: "chm" },
          { from: "mup", to: "raj" },
          { from: "khk", to: "mn" },
          { from: "npi", to: "ne" },
          { from: "ojg", to: "oj" },
          { from: "ory", to: "or" },
          { from: "pbu", to: "ps" },
          { from: "pes", to: "fa" },
          { from: "plt", to: "mg" },
          { from: "pnb", to: "lah" },
          { from: "quz", to: "qu" },
          { from: "rmy", to: "rom" },
          { from: "spy", to: "kln" },
          { from: "src", to: "sc" },
          { from: "swh", to: "sw" },
          { from: "ttq", to: "tmh" },
          { from: "tw", to: "ak" },
          { from: "umu", to: "del" },
          { from: "uzn", to: "uz" },
          { from: "xpe", to: "kpe" },
          { from: "xsl", to: "den" },
          { from: "ydd", to: "yi" },
          { from: "zai", to: "zap" },
          { from: "zsm", to: "ms" },
          { from: "zyb", to: "za" },
          { from: "him", to: "srx" },
          { from: "mnk", to: "man" },
          { from: "bh", to: "bho" },
          { from: "prs", to: "fa-af" },
          { from: "swc", to: "sw-cd" },
          { from: "aar", to: "aa" },
          { from: "abk", to: "ab" },
          { from: "ave", to: "ae" },
          { from: "afr", to: "af" },
          { from: "aka", to: "ak" },
          { from: "amh", to: "am" },
          { from: "arg", to: "an" },
          { from: "ara", to: "ar" },
          { from: "asm", to: "as" },
          { from: "ava", to: "av" },
          { from: "aym", to: "ay" },
          { from: "aze", to: "az" },
          { from: "bak", to: "ba" },
          { from: "bel", to: "be" },
          { from: "bul", to: "bg" },
          { from: "bih", to: "bho" },
          { from: "bis", to: "bi" },
          { from: "bam", to: "bm" },
          { from: "ben", to: "bn" },
          { from: "bod", to: "bo" },
          { from: "bre", to: "br" },
          { from: "bos", to: "bs" },
          { from: "cat", to: "ca" },
          { from: "che", to: "ce" },
          { from: "cha", to: "ch" },
          { from: "cos", to: "co" },
          { from: "cre", to: "cr" },
          { from: "ces", to: "cs" },
          { from: "chu", to: "cu" },
          { from: "chv", to: "cv" },
          { from: "cym", to: "cy" },
          { from: "dan", to: "da" },
          { from: "deu", to: "de" },
          { from: "div", to: "dv" },
          { from: "dzo", to: "dz" },
          { from: "ewe", to: "ee" },
          { from: "ell", to: "el" },
          { from: "eng", to: "en" },
          { from: "epo", to: "eo" },
          { from: "spa", to: "es" },
          { from: "est", to: "et" },
          { from: "eus", to: "eu" },
          { from: "fas", to: "fa" },
          { from: "ful", to: "ff" },
          { from: "fin", to: "fi" },
          { from: "fij", to: "fj" },
          { from: "fao", to: "fo" },
          { from: "fra", to: "fr" },
          { from: "fry", to: "fy" },
          { from: "gle", to: "ga" },
          { from: "gla", to: "gd" },
          { from: "glg", to: "gl" },
          { from: "grn", to: "gn" },
          { from: "guj", to: "gu" },
          { from: "glv", to: "gv" },
          { from: "hau", to: "ha" },
          { from: "heb", to: "he" },
          { from: "hin", to: "hi" },
          { from: "hmo", to: "ho" },
          { from: "hrv", to: "hr" },
          { from: "hat", to: "ht" },
          { from: "hun", to: "hu" },
          { from: "hye", to: "hy" },
          { from: "her", to: "hz" },
          { from: "ina", to: "ia" },
          { from: "ind", to: "id" },
          { from: "ile", to: "ie" },
          { from: "ibo", to: "ig" },
          { from: "iii", to: "ii" },
          { from: "ipk", to: "ik" },
          { from: "ido", to: "io" },
          { from: "isl", to: "is" },
          { from: "ita", to: "it" },
          { from: "iku", to: "iu" },
          { from: "jpn", to: "ja" },
          { from: "jav", to: "jv" },
          { from: "kat", to: "ka" },
          { from: "kon", to: "kg" },
          { from: "kik", to: "ki" },
          { from: "kua", to: "kj" },
          { from: "kaz", to: "kk" },
          { from: "kal", to: "kl" },
          { from: "khm", to: "km" },
          { from: "kan", to: "kn" },
          { from: "kor", to: "ko" },
          { from: "kau", to: "kr" },
          { from: "kas", to: "ks" },
          { from: "kur", to: "ku" },
          { from: "kom", to: "kv" },
          { from: "cor", to: "kw" },
          { from: "kir", to: "ky" },
          { from: "lat", to: "la" },
          { from: "ltz", to: "lb" },
          { from: "lug", to: "lg" },
          { from: "lim", to: "li" },
          { from: "lin", to: "ln" },
          { from: "lao", to: "lo" },
          { from: "lit", to: "lt" },
          { from: "lub", to: "lu" },
          { from: "lav", to: "lv" },
          { from: "mlg", to: "mg" },
          { from: "mah", to: "mh" },
          { from: "mri", to: "mi" },
          { from: "mkd", to: "mk" },
          { from: "mal", to: "ml" },
          { from: "mon", to: "mn" },
          { from: "mol", to: "ro" },
          { from: "mar", to: "mr" },
          { from: "msa", to: "ms" },
          { from: "mlt", to: "mt" },
          { from: "mya", to: "my" },
          { from: "nau", to: "na" },
          { from: "nob", to: "nb" },
          { from: "nde", to: "nd" },
          { from: "nep", to: "ne" },
          { from: "ndo", to: "ng" },
          { from: "nld", to: "nl" },
          { from: "nno", to: "nn" },
          { from: "nor", to: "no" },
          { from: "nbl", to: "nr" },
          { from: "nav", to: "nv" },
          { from: "nya", to: "ny" },
          { from: "oci", to: "oc" },
          { from: "oji", to: "oj" },
          { from: "orm", to: "om" },
          { from: "ori", to: "or" },
          { from: "oss", to: "os" },
          { from: "pan", to: "pa" },
          { from: "pli", to: "pi" },
          { from: "pol", to: "pl" },
          { from: "pus", to: "ps" },
          { from: "por", to: "pt" },
          { from: "que", to: "qu" },
          { from: "roh", to: "rm" },
          { from: "run", to: "rn" },
          { from: "ron", to: "ro" },
          { from: "rus", to: "ru" },
          { from: "kin", to: "rw" },
          { from: "san", to: "sa" },
          { from: "srd", to: "sc" },
          { from: "snd", to: "sd" },
          { from: "sme", to: "se" },
          { from: "sag", to: "sg" },
          { from: "hbs", to: "sr-latn" },
          { from: "sin", to: "si" },
          { from: "slk", to: "sk" },
          { from: "slv", to: "sl" },
          { from: "smo", to: "sm" },
          { from: "sna", to: "sn" },
          { from: "som", to: "so" },
          { from: "sqi", to: "sq" },
          { from: "srp", to: "sr" },
          { from: "ssw", to: "ss" },
          { from: "sot", to: "st" },
          { from: "sun", to: "su" },
          { from: "swe", to: "sv" },
          { from: "swa", to: "sw" },
          { from: "tam", to: "ta" },
          { from: "tel", to: "te" },
          { from: "tgk", to: "tg" },
          { from: "tha", to: "th" },
          { from: "tir", to: "ti" },
          { from: "tuk", to: "tk" },
          { from: "tgl", to: "fil" },
          { from: "tsn", to: "tn" },
          { from: "ton", to: "to" },
          { from: "tur", to: "tr" },
          { from: "tso", to: "ts" },
          { from: "tat", to: "tt" },
          { from: "twi", to: "ak" },
          { from: "tah", to: "ty" },
          { from: "uig", to: "ug" },
          { from: "ukr", to: "uk" },
          { from: "urd", to: "ur" },
          { from: "uzb", to: "uz" },
          { from: "ven", to: "ve" },
          { from: "vie", to: "vi" },
          { from: "vol", to: "vo" },
          { from: "wln", to: "wa" },
          { from: "wol", to: "wo" },
          { from: "xho", to: "xh" },
          { from: "yid", to: "yi" },
          { from: "yor", to: "yo" },
          { from: "zha", to: "za" },
          { from: "zho", to: "zh" },
          { from: "zul", to: "zu" },
          { from: "alb", to: "sq" },
          { from: "arm", to: "hy" },
          { from: "baq", to: "eu" },
          { from: "bur", to: "my" },
          { from: "chi", to: "zh" },
          { from: "cze", to: "cs" },
          { from: "dut", to: "nl" },
          { from: "fre", to: "fr" },
          { from: "geo", to: "ka" },
          { from: "ger", to: "de" },
          { from: "gre", to: "el" },
          { from: "ice", to: "is" },
          { from: "mac", to: "mk" },
          { from: "mao", to: "mi" },
          { from: "may", to: "ms" },
          { from: "per", to: "fa" },
          { from: "rum", to: "ro" },
          { from: "slo", to: "sk" },
          { from: "tib", to: "bo" },
          { from: "wel", to: "cy" },
          { from: "und-aaland", to: "und-ax" },
          { from: "hy-arevmda", to: "hyw" },
          { from: "und-arevmda", to: "und" },
          { from: "und-arevela", to: "und" },
          { from: "und-lojban", to: "und" },
          { from: "und-saaho", to: "und" },
          { from: "und-bokmal", to: "und" },
          { from: "und-nynorsk", to: "und" },
          { from: "und-hakka", to: "und" },
          { from: "und-xiang", to: "und" },
          { from: "und-hepburn-heploc", to: "und-alalc97" },
        ],
        Uc = [
          {
            from: { field: "script", value: "qaai" },
            to: { field: "script", value: "zinh" },
          },
          {
            from: { field: "region", value: "bu" },
            to: { field: "region", value: "mm" },
          },
          {
            from: { field: "region", value: "ct" },
            to: { field: "region", value: "ki" },
          },
          {
            from: { field: "region", value: "dd" },
            to: { field: "region", value: "de" },
          },
          {
            from: { field: "region", value: "dy" },
            to: { field: "region", value: "bj" },
          },
          {
            from: { field: "region", value: "fx" },
            to: { field: "region", value: "fr" },
          },
          {
            from: { field: "region", value: "hv" },
            to: { field: "region", value: "bf" },
          },
          {
            from: { field: "region", value: "jt" },
            to: { field: "region", value: "um" },
          },
          {
            from: { field: "region", value: "mi" },
            to: { field: "region", value: "um" },
          },
          {
            from: { field: "region", value: "nh" },
            to: { field: "region", value: "vu" },
          },
          {
            from: { field: "region", value: "nq" },
            to: { field: "region", value: "aq" },
          },
          {
            from: { field: "region", value: "pu" },
            to: { field: "region", value: "um" },
          },
          {
            from: { field: "region", value: "pz" },
            to: { field: "region", value: "pa" },
          },
          {
            from: { field: "region", value: "qu" },
            to: { field: "region", value: "eu" },
          },
          {
            from: { field: "region", value: "rh" },
            to: { field: "region", value: "zw" },
          },
          {
            from: { field: "region", value: "tp" },
            to: { field: "region", value: "tl" },
          },
          {
            from: { field: "region", value: "uk" },
            to: { field: "region", value: "gb" },
          },
          {
            from: { field: "region", value: "vd" },
            to: { field: "region", value: "vn" },
          },
          {
            from: { field: "region", value: "wk" },
            to: { field: "region", value: "um" },
          },
          {
            from: { field: "region", value: "yd" },
            to: { field: "region", value: "ye" },
          },
          {
            from: { field: "region", value: "zr" },
            to: { field: "region", value: "cd" },
          },
          {
            from: { field: "region", value: "230" },
            to: { field: "region", value: "et" },
          },
          {
            from: { field: "region", value: "280" },
            to: { field: "region", value: "de" },
          },
          {
            from: { field: "region", value: "736" },
            to: { field: "region", value: "sd" },
          },
          {
            from: { field: "region", value: "886" },
            to: { field: "region", value: "ye" },
          },
          {
            from: { field: "region", value: "958" },
            to: { field: "region", value: "aa" },
          },
          {
            from: { field: "region", value: "020" },
            to: { field: "region", value: "ad" },
          },
          {
            from: { field: "region", value: "784" },
            to: { field: "region", value: "ae" },
          },
          {
            from: { field: "region", value: "004" },
            to: { field: "region", value: "af" },
          },
          {
            from: { field: "region", value: "028" },
            to: { field: "region", value: "ag" },
          },
          {
            from: { field: "region", value: "660" },
            to: { field: "region", value: "ai" },
          },
          {
            from: { field: "region", value: "008" },
            to: { field: "region", value: "al" },
          },
          {
            from: { field: "region", value: "051" },
            to: { field: "region", value: "am" },
          },
          {
            from: { field: "region", value: "024" },
            to: { field: "region", value: "ao" },
          },
          {
            from: { field: "region", value: "010" },
            to: { field: "region", value: "aq" },
          },
          {
            from: { field: "region", value: "032" },
            to: { field: "region", value: "ar" },
          },
          {
            from: { field: "region", value: "016" },
            to: { field: "region", value: "as" },
          },
          {
            from: { field: "region", value: "040" },
            to: { field: "region", value: "at" },
          },
          {
            from: { field: "region", value: "036" },
            to: { field: "region", value: "au" },
          },
          {
            from: { field: "region", value: "533" },
            to: { field: "region", value: "aw" },
          },
          {
            from: { field: "region", value: "248" },
            to: { field: "region", value: "ax" },
          },
          {
            from: { field: "region", value: "031" },
            to: { field: "region", value: "az" },
          },
          {
            from: { field: "region", value: "070" },
            to: { field: "region", value: "ba" },
          },
          {
            from: { field: "region", value: "052" },
            to: { field: "region", value: "bb" },
          },
          {
            from: { field: "region", value: "050" },
            to: { field: "region", value: "bd" },
          },
          {
            from: { field: "region", value: "056" },
            to: { field: "region", value: "be" },
          },
          {
            from: { field: "region", value: "854" },
            to: { field: "region", value: "bf" },
          },
          {
            from: { field: "region", value: "100" },
            to: { field: "region", value: "bg" },
          },
          {
            from: { field: "region", value: "048" },
            to: { field: "region", value: "bh" },
          },
          {
            from: { field: "region", value: "108" },
            to: { field: "region", value: "bi" },
          },
          {
            from: { field: "region", value: "204" },
            to: { field: "region", value: "bj" },
          },
          {
            from: { field: "region", value: "652" },
            to: { field: "region", value: "bl" },
          },
          {
            from: { field: "region", value: "060" },
            to: { field: "region", value: "bm" },
          },
          {
            from: { field: "region", value: "096" },
            to: { field: "region", value: "bn" },
          },
          {
            from: { field: "region", value: "068" },
            to: { field: "region", value: "bo" },
          },
          {
            from: { field: "region", value: "535" },
            to: { field: "region", value: "bq" },
          },
          {
            from: { field: "region", value: "076" },
            to: { field: "region", value: "br" },
          },
          {
            from: { field: "region", value: "044" },
            to: { field: "region", value: "bs" },
          },
          {
            from: { field: "region", value: "064" },
            to: { field: "region", value: "bt" },
          },
          {
            from: { field: "region", value: "104" },
            to: { field: "region", value: "mm" },
          },
          {
            from: { field: "region", value: "074" },
            to: { field: "region", value: "bv" },
          },
          {
            from: { field: "region", value: "072" },
            to: { field: "region", value: "bw" },
          },
          {
            from: { field: "region", value: "112" },
            to: { field: "region", value: "by" },
          },
          {
            from: { field: "region", value: "084" },
            to: { field: "region", value: "bz" },
          },
          {
            from: { field: "region", value: "124" },
            to: { field: "region", value: "ca" },
          },
          {
            from: { field: "region", value: "166" },
            to: { field: "region", value: "cc" },
          },
          {
            from: { field: "region", value: "180" },
            to: { field: "region", value: "cd" },
          },
          {
            from: { field: "region", value: "140" },
            to: { field: "region", value: "cf" },
          },
          {
            from: { field: "region", value: "178" },
            to: { field: "region", value: "cg" },
          },
          {
            from: { field: "region", value: "756" },
            to: { field: "region", value: "ch" },
          },
          {
            from: { field: "region", value: "384" },
            to: { field: "region", value: "ci" },
          },
          {
            from: { field: "region", value: "184" },
            to: { field: "region", value: "ck" },
          },
          {
            from: { field: "region", value: "152" },
            to: { field: "region", value: "cl" },
          },
          {
            from: { field: "region", value: "120" },
            to: { field: "region", value: "cm" },
          },
          {
            from: { field: "region", value: "156" },
            to: { field: "region", value: "cn" },
          },
          {
            from: { field: "region", value: "170" },
            to: { field: "region", value: "co" },
          },
          {
            from: { field: "region", value: "188" },
            to: { field: "region", value: "cr" },
          },
          {
            from: { field: "region", value: "192" },
            to: { field: "region", value: "cu" },
          },
          {
            from: { field: "region", value: "132" },
            to: { field: "region", value: "cv" },
          },
          {
            from: { field: "region", value: "531" },
            to: { field: "region", value: "cw" },
          },
          {
            from: { field: "region", value: "162" },
            to: { field: "region", value: "cx" },
          },
          {
            from: { field: "region", value: "196" },
            to: { field: "region", value: "cy" },
          },
          {
            from: { field: "region", value: "203" },
            to: { field: "region", value: "cz" },
          },
          {
            from: { field: "region", value: "278" },
            to: { field: "region", value: "de" },
          },
          {
            from: { field: "region", value: "276" },
            to: { field: "region", value: "de" },
          },
          {
            from: { field: "region", value: "262" },
            to: { field: "region", value: "dj" },
          },
          {
            from: { field: "region", value: "208" },
            to: { field: "region", value: "dk" },
          },
          {
            from: { field: "region", value: "212" },
            to: { field: "region", value: "dm" },
          },
          {
            from: { field: "region", value: "214" },
            to: { field: "region", value: "do" },
          },
          {
            from: { field: "region", value: "012" },
            to: { field: "region", value: "dz" },
          },
          {
            from: { field: "region", value: "218" },
            to: { field: "region", value: "ec" },
          },
          {
            from: { field: "region", value: "233" },
            to: { field: "region", value: "ee" },
          },
          {
            from: { field: "region", value: "818" },
            to: { field: "region", value: "eg" },
          },
          {
            from: { field: "region", value: "732" },
            to: { field: "region", value: "eh" },
          },
          {
            from: { field: "region", value: "232" },
            to: { field: "region", value: "er" },
          },
          {
            from: { field: "region", value: "724" },
            to: { field: "region", value: "es" },
          },
          {
            from: { field: "region", value: "231" },
            to: { field: "region", value: "et" },
          },
          {
            from: { field: "region", value: "246" },
            to: { field: "region", value: "fi" },
          },
          {
            from: { field: "region", value: "242" },
            to: { field: "region", value: "fj" },
          },
          {
            from: { field: "region", value: "238" },
            to: { field: "region", value: "fk" },
          },
          {
            from: { field: "region", value: "583" },
            to: { field: "region", value: "fm" },
          },
          {
            from: { field: "region", value: "234" },
            to: { field: "region", value: "fo" },
          },
          {
            from: { field: "region", value: "250" },
            to: { field: "region", value: "fr" },
          },
          {
            from: { field: "region", value: "249" },
            to: { field: "region", value: "fr" },
          },
          {
            from: { field: "region", value: "266" },
            to: { field: "region", value: "ga" },
          },
          {
            from: { field: "region", value: "826" },
            to: { field: "region", value: "gb" },
          },
          {
            from: { field: "region", value: "308" },
            to: { field: "region", value: "gd" },
          },
          {
            from: { field: "region", value: "268" },
            to: { field: "region", value: "ge" },
          },
          {
            from: { field: "region", value: "254" },
            to: { field: "region", value: "gf" },
          },
          {
            from: { field: "region", value: "831" },
            to: { field: "region", value: "gg" },
          },
          {
            from: { field: "region", value: "288" },
            to: { field: "region", value: "gh" },
          },
          {
            from: { field: "region", value: "292" },
            to: { field: "region", value: "gi" },
          },
          {
            from: { field: "region", value: "304" },
            to: { field: "region", value: "gl" },
          },
          {
            from: { field: "region", value: "270" },
            to: { field: "region", value: "gm" },
          },
          {
            from: { field: "region", value: "324" },
            to: { field: "region", value: "gn" },
          },
          {
            from: { field: "region", value: "312" },
            to: { field: "region", value: "gp" },
          },
          {
            from: { field: "region", value: "226" },
            to: { field: "region", value: "gq" },
          },
          {
            from: { field: "region", value: "300" },
            to: { field: "region", value: "gr" },
          },
          {
            from: { field: "region", value: "239" },
            to: { field: "region", value: "gs" },
          },
          {
            from: { field: "region", value: "320" },
            to: { field: "region", value: "gt" },
          },
          {
            from: { field: "region", value: "316" },
            to: { field: "region", value: "gu" },
          },
          {
            from: { field: "region", value: "624" },
            to: { field: "region", value: "gw" },
          },
          {
            from: { field: "region", value: "328" },
            to: { field: "region", value: "gy" },
          },
          {
            from: { field: "region", value: "344" },
            to: { field: "region", value: "hk" },
          },
          {
            from: { field: "region", value: "334" },
            to: { field: "region", value: "hm" },
          },
          {
            from: { field: "region", value: "340" },
            to: { field: "region", value: "hn" },
          },
          {
            from: { field: "region", value: "191" },
            to: { field: "region", value: "hr" },
          },
          {
            from: { field: "region", value: "332" },
            to: { field: "region", value: "ht" },
          },
          {
            from: { field: "region", value: "348" },
            to: { field: "region", value: "hu" },
          },
          {
            from: { field: "region", value: "360" },
            to: { field: "region", value: "id" },
          },
          {
            from: { field: "region", value: "372" },
            to: { field: "region", value: "ie" },
          },
          {
            from: { field: "region", value: "376" },
            to: { field: "region", value: "il" },
          },
          {
            from: { field: "region", value: "833" },
            to: { field: "region", value: "im" },
          },
          {
            from: { field: "region", value: "356" },
            to: { field: "region", value: "in" },
          },
          {
            from: { field: "region", value: "086" },
            to: { field: "region", value: "io" },
          },
          {
            from: { field: "region", value: "368" },
            to: { field: "region", value: "iq" },
          },
          {
            from: { field: "region", value: "364" },
            to: { field: "region", value: "ir" },
          },
          {
            from: { field: "region", value: "352" },
            to: { field: "region", value: "is" },
          },
          {
            from: { field: "region", value: "380" },
            to: { field: "region", value: "it" },
          },
          {
            from: { field: "region", value: "832" },
            to: { field: "region", value: "je" },
          },
          {
            from: { field: "region", value: "388" },
            to: { field: "region", value: "jm" },
          },
          {
            from: { field: "region", value: "400" },
            to: { field: "region", value: "jo" },
          },
          {
            from: { field: "region", value: "392" },
            to: { field: "region", value: "jp" },
          },
          {
            from: { field: "region", value: "404" },
            to: { field: "region", value: "ke" },
          },
          {
            from: { field: "region", value: "417" },
            to: { field: "region", value: "kg" },
          },
          {
            from: { field: "region", value: "116" },
            to: { field: "region", value: "kh" },
          },
          {
            from: { field: "region", value: "296" },
            to: { field: "region", value: "ki" },
          },
          {
            from: { field: "region", value: "174" },
            to: { field: "region", value: "km" },
          },
          {
            from: { field: "region", value: "659" },
            to: { field: "region", value: "kn" },
          },
          {
            from: { field: "region", value: "408" },
            to: { field: "region", value: "kp" },
          },
          {
            from: { field: "region", value: "410" },
            to: { field: "region", value: "kr" },
          },
          {
            from: { field: "region", value: "414" },
            to: { field: "region", value: "kw" },
          },
          {
            from: { field: "region", value: "136" },
            to: { field: "region", value: "ky" },
          },
          {
            from: { field: "region", value: "398" },
            to: { field: "region", value: "kz" },
          },
          {
            from: { field: "region", value: "418" },
            to: { field: "region", value: "la" },
          },
          {
            from: { field: "region", value: "422" },
            to: { field: "region", value: "lb" },
          },
          {
            from: { field: "region", value: "662" },
            to: { field: "region", value: "lc" },
          },
          {
            from: { field: "region", value: "438" },
            to: { field: "region", value: "li" },
          },
          {
            from: { field: "region", value: "144" },
            to: { field: "region", value: "lk" },
          },
          {
            from: { field: "region", value: "430" },
            to: { field: "region", value: "lr" },
          },
          {
            from: { field: "region", value: "426" },
            to: { field: "region", value: "ls" },
          },
          {
            from: { field: "region", value: "440" },
            to: { field: "region", value: "lt" },
          },
          {
            from: { field: "region", value: "442" },
            to: { field: "region", value: "lu" },
          },
          {
            from: { field: "region", value: "428" },
            to: { field: "region", value: "lv" },
          },
          {
            from: { field: "region", value: "434" },
            to: { field: "region", value: "ly" },
          },
          {
            from: { field: "region", value: "504" },
            to: { field: "region", value: "ma" },
          },
          {
            from: { field: "region", value: "492" },
            to: { field: "region", value: "mc" },
          },
          {
            from: { field: "region", value: "498" },
            to: { field: "region", value: "md" },
          },
          {
            from: { field: "region", value: "499" },
            to: { field: "region", value: "me" },
          },
          {
            from: { field: "region", value: "663" },
            to: { field: "region", value: "mf" },
          },
          {
            from: { field: "region", value: "450" },
            to: { field: "region", value: "mg" },
          },
          {
            from: { field: "region", value: "584" },
            to: { field: "region", value: "mh" },
          },
          {
            from: { field: "region", value: "807" },
            to: { field: "region", value: "mk" },
          },
          {
            from: { field: "region", value: "466" },
            to: { field: "region", value: "ml" },
          },
          {
            from: { field: "region", value: "496" },
            to: { field: "region", value: "mn" },
          },
          {
            from: { field: "region", value: "446" },
            to: { field: "region", value: "mo" },
          },
          {
            from: { field: "region", value: "580" },
            to: { field: "region", value: "mp" },
          },
          {
            from: { field: "region", value: "474" },
            to: { field: "region", value: "mq" },
          },
          {
            from: { field: "region", value: "478" },
            to: { field: "region", value: "mr" },
          },
          {
            from: { field: "region", value: "500" },
            to: { field: "region", value: "ms" },
          },
          {
            from: { field: "region", value: "470" },
            to: { field: "region", value: "mt" },
          },
          {
            from: { field: "region", value: "480" },
            to: { field: "region", value: "mu" },
          },
          {
            from: { field: "region", value: "462" },
            to: { field: "region", value: "mv" },
          },
          {
            from: { field: "region", value: "454" },
            to: { field: "region", value: "mw" },
          },
          {
            from: { field: "region", value: "484" },
            to: { field: "region", value: "mx" },
          },
          {
            from: { field: "region", value: "458" },
            to: { field: "region", value: "my" },
          },
          {
            from: { field: "region", value: "508" },
            to: { field: "region", value: "mz" },
          },
          {
            from: { field: "region", value: "516" },
            to: { field: "region", value: "na" },
          },
          {
            from: { field: "region", value: "540" },
            to: { field: "region", value: "nc" },
          },
          {
            from: { field: "region", value: "562" },
            to: { field: "region", value: "ne" },
          },
          {
            from: { field: "region", value: "574" },
            to: { field: "region", value: "nf" },
          },
          {
            from: { field: "region", value: "566" },
            to: { field: "region", value: "ng" },
          },
          {
            from: { field: "region", value: "558" },
            to: { field: "region", value: "ni" },
          },
          {
            from: { field: "region", value: "528" },
            to: { field: "region", value: "nl" },
          },
          {
            from: { field: "region", value: "578" },
            to: { field: "region", value: "no" },
          },
          {
            from: { field: "region", value: "524" },
            to: { field: "region", value: "np" },
          },
          {
            from: { field: "region", value: "520" },
            to: { field: "region", value: "nr" },
          },
          {
            from: { field: "region", value: "570" },
            to: { field: "region", value: "nu" },
          },
          {
            from: { field: "region", value: "554" },
            to: { field: "region", value: "nz" },
          },
          {
            from: { field: "region", value: "512" },
            to: { field: "region", value: "om" },
          },
          {
            from: { field: "region", value: "591" },
            to: { field: "region", value: "pa" },
          },
          {
            from: { field: "region", value: "604" },
            to: { field: "region", value: "pe" },
          },
          {
            from: { field: "region", value: "258" },
            to: { field: "region", value: "pf" },
          },
          {
            from: { field: "region", value: "598" },
            to: { field: "region", value: "pg" },
          },
          {
            from: { field: "region", value: "608" },
            to: { field: "region", value: "ph" },
          },
          {
            from: { field: "region", value: "586" },
            to: { field: "region", value: "pk" },
          },
          {
            from: { field: "region", value: "616" },
            to: { field: "region", value: "pl" },
          },
          {
            from: { field: "region", value: "666" },
            to: { field: "region", value: "pm" },
          },
          {
            from: { field: "region", value: "612" },
            to: { field: "region", value: "pn" },
          },
          {
            from: { field: "region", value: "630" },
            to: { field: "region", value: "pr" },
          },
          {
            from: { field: "region", value: "275" },
            to: { field: "region", value: "ps" },
          },
          {
            from: { field: "region", value: "620" },
            to: { field: "region", value: "pt" },
          },
          {
            from: { field: "region", value: "585" },
            to: { field: "region", value: "pw" },
          },
          {
            from: { field: "region", value: "600" },
            to: { field: "region", value: "py" },
          },
          {
            from: { field: "region", value: "634" },
            to: { field: "region", value: "qa" },
          },
          {
            from: { field: "region", value: "959" },
            to: { field: "region", value: "qm" },
          },
          {
            from: { field: "region", value: "960" },
            to: { field: "region", value: "qn" },
          },
          {
            from: { field: "region", value: "962" },
            to: { field: "region", value: "qp" },
          },
          {
            from: { field: "region", value: "963" },
            to: { field: "region", value: "qq" },
          },
          {
            from: { field: "region", value: "964" },
            to: { field: "region", value: "qr" },
          },
          {
            from: { field: "region", value: "965" },
            to: { field: "region", value: "qs" },
          },
          {
            from: { field: "region", value: "966" },
            to: { field: "region", value: "qt" },
          },
          {
            from: { field: "region", value: "967" },
            to: { field: "region", value: "eu" },
          },
          {
            from: { field: "region", value: "968" },
            to: { field: "region", value: "qv" },
          },
          {
            from: { field: "region", value: "969" },
            to: { field: "region", value: "qw" },
          },
          {
            from: { field: "region", value: "970" },
            to: { field: "region", value: "qx" },
          },
          {
            from: { field: "region", value: "971" },
            to: { field: "region", value: "qy" },
          },
          {
            from: { field: "region", value: "972" },
            to: { field: "region", value: "qz" },
          },
          {
            from: { field: "region", value: "638" },
            to: { field: "region", value: "re" },
          },
          {
            from: { field: "region", value: "642" },
            to: { field: "region", value: "ro" },
          },
          {
            from: { field: "region", value: "688" },
            to: { field: "region", value: "rs" },
          },
          {
            from: { field: "region", value: "643" },
            to: { field: "region", value: "ru" },
          },
          {
            from: { field: "region", value: "646" },
            to: { field: "region", value: "rw" },
          },
          {
            from: { field: "region", value: "682" },
            to: { field: "region", value: "sa" },
          },
          {
            from: { field: "region", value: "090" },
            to: { field: "region", value: "sb" },
          },
          {
            from: { field: "region", value: "690" },
            to: { field: "region", value: "sc" },
          },
          {
            from: { field: "region", value: "729" },
            to: { field: "region", value: "sd" },
          },
          {
            from: { field: "region", value: "752" },
            to: { field: "region", value: "se" },
          },
          {
            from: { field: "region", value: "702" },
            to: { field: "region", value: "sg" },
          },
          {
            from: { field: "region", value: "654" },
            to: { field: "region", value: "sh" },
          },
          {
            from: { field: "region", value: "705" },
            to: { field: "region", value: "si" },
          },
          {
            from: { field: "region", value: "744" },
            to: { field: "region", value: "sj" },
          },
          {
            from: { field: "region", value: "703" },
            to: { field: "region", value: "sk" },
          },
          {
            from: { field: "region", value: "694" },
            to: { field: "region", value: "sl" },
          },
          {
            from: { field: "region", value: "674" },
            to: { field: "region", value: "sm" },
          },
          {
            from: { field: "region", value: "686" },
            to: { field: "region", value: "sn" },
          },
          {
            from: { field: "region", value: "706" },
            to: { field: "region", value: "so" },
          },
          {
            from: { field: "region", value: "740" },
            to: { field: "region", value: "sr" },
          },
          {
            from: { field: "region", value: "728" },
            to: { field: "region", value: "ss" },
          },
          {
            from: { field: "region", value: "678" },
            to: { field: "region", value: "st" },
          },
          {
            from: { field: "region", value: "222" },
            to: { field: "region", value: "sv" },
          },
          {
            from: { field: "region", value: "534" },
            to: { field: "region", value: "sx" },
          },
          {
            from: { field: "region", value: "760" },
            to: { field: "region", value: "sy" },
          },
          {
            from: { field: "region", value: "748" },
            to: { field: "region", value: "sz" },
          },
          {
            from: { field: "region", value: "796" },
            to: { field: "region", value: "tc" },
          },
          {
            from: { field: "region", value: "148" },
            to: { field: "region", value: "td" },
          },
          {
            from: { field: "region", value: "260" },
            to: { field: "region", value: "tf" },
          },
          {
            from: { field: "region", value: "768" },
            to: { field: "region", value: "tg" },
          },
          {
            from: { field: "region", value: "764" },
            to: { field: "region", value: "th" },
          },
          {
            from: { field: "region", value: "762" },
            to: { field: "region", value: "tj" },
          },
          {
            from: { field: "region", value: "772" },
            to: { field: "region", value: "tk" },
          },
          {
            from: { field: "region", value: "626" },
            to: { field: "region", value: "tl" },
          },
          {
            from: { field: "region", value: "795" },
            to: { field: "region", value: "tm" },
          },
          {
            from: { field: "region", value: "788" },
            to: { field: "region", value: "tn" },
          },
          {
            from: { field: "region", value: "776" },
            to: { field: "region", value: "to" },
          },
          {
            from: { field: "region", value: "792" },
            to: { field: "region", value: "tr" },
          },
          {
            from: { field: "region", value: "780" },
            to: { field: "region", value: "tt" },
          },
          {
            from: { field: "region", value: "798" },
            to: { field: "region", value: "tv" },
          },
          {
            from: { field: "region", value: "158" },
            to: { field: "region", value: "tw" },
          },
          {
            from: { field: "region", value: "834" },
            to: { field: "region", value: "tz" },
          },
          {
            from: { field: "region", value: "804" },
            to: { field: "region", value: "ua" },
          },
          {
            from: { field: "region", value: "800" },
            to: { field: "region", value: "ug" },
          },
          {
            from: { field: "region", value: "581" },
            to: { field: "region", value: "um" },
          },
          {
            from: { field: "region", value: "840" },
            to: { field: "region", value: "us" },
          },
          {
            from: { field: "region", value: "858" },
            to: { field: "region", value: "uy" },
          },
          {
            from: { field: "region", value: "860" },
            to: { field: "region", value: "uz" },
          },
          {
            from: { field: "region", value: "336" },
            to: { field: "region", value: "va" },
          },
          {
            from: { field: "region", value: "670" },
            to: { field: "region", value: "vc" },
          },
          {
            from: { field: "region", value: "862" },
            to: { field: "region", value: "ve" },
          },
          {
            from: { field: "region", value: "092" },
            to: { field: "region", value: "vg" },
          },
          {
            from: { field: "region", value: "850" },
            to: { field: "region", value: "vi" },
          },
          {
            from: { field: "region", value: "704" },
            to: { field: "region", value: "vn" },
          },
          {
            from: { field: "region", value: "548" },
            to: { field: "region", value: "vu" },
          },
          {
            from: { field: "region", value: "876" },
            to: { field: "region", value: "wf" },
          },
          {
            from: { field: "region", value: "882" },
            to: { field: "region", value: "ws" },
          },
          {
            from: { field: "region", value: "973" },
            to: { field: "region", value: "xa" },
          },
          {
            from: { field: "region", value: "974" },
            to: { field: "region", value: "xb" },
          },
          {
            from: { field: "region", value: "975" },
            to: { field: "region", value: "xc" },
          },
          {
            from: { field: "region", value: "976" },
            to: { field: "region", value: "xd" },
          },
          {
            from: { field: "region", value: "977" },
            to: { field: "region", value: "xe" },
          },
          {
            from: { field: "region", value: "978" },
            to: { field: "region", value: "xf" },
          },
          {
            from: { field: "region", value: "979" },
            to: { field: "region", value: "xg" },
          },
          {
            from: { field: "region", value: "980" },
            to: { field: "region", value: "xh" },
          },
          {
            from: { field: "region", value: "981" },
            to: { field: "region", value: "xi" },
          },
          {
            from: { field: "region", value: "982" },
            to: { field: "region", value: "xj" },
          },
          {
            from: { field: "region", value: "983" },
            to: { field: "region", value: "xk" },
          },
          {
            from: { field: "region", value: "984" },
            to: { field: "region", value: "xl" },
          },
          {
            from: { field: "region", value: "985" },
            to: { field: "region", value: "xm" },
          },
          {
            from: { field: "region", value: "986" },
            to: { field: "region", value: "xn" },
          },
          {
            from: { field: "region", value: "987" },
            to: { field: "region", value: "xo" },
          },
          {
            from: { field: "region", value: "988" },
            to: { field: "region", value: "xp" },
          },
          {
            from: { field: "region", value: "989" },
            to: { field: "region", value: "xq" },
          },
          {
            from: { field: "region", value: "990" },
            to: { field: "region", value: "xr" },
          },
          {
            from: { field: "region", value: "991" },
            to: { field: "region", value: "xs" },
          },
          {
            from: { field: "region", value: "992" },
            to: { field: "region", value: "xt" },
          },
          {
            from: { field: "region", value: "993" },
            to: { field: "region", value: "xu" },
          },
          {
            from: { field: "region", value: "994" },
            to: { field: "region", value: "xv" },
          },
          {
            from: { field: "region", value: "995" },
            to: { field: "region", value: "xw" },
          },
          {
            from: { field: "region", value: "996" },
            to: { field: "region", value: "xx" },
          },
          {
            from: { field: "region", value: "997" },
            to: { field: "region", value: "xy" },
          },
          {
            from: { field: "region", value: "998" },
            to: { field: "region", value: "xz" },
          },
          {
            from: { field: "region", value: "720" },
            to: { field: "region", value: "ye" },
          },
          {
            from: { field: "region", value: "887" },
            to: { field: "region", value: "ye" },
          },
          {
            from: { field: "region", value: "175" },
            to: { field: "region", value: "yt" },
          },
          {
            from: { field: "region", value: "710" },
            to: { field: "region", value: "za" },
          },
          {
            from: { field: "region", value: "894" },
            to: { field: "region", value: "zm" },
          },
          {
            from: { field: "region", value: "716" },
            to: { field: "region", value: "zw" },
          },
          {
            from: { field: "region", value: "999" },
            to: { field: "region", value: "zz" },
          },
          {
            from: { field: "variants", value: "polytoni" },
            to: { field: "variants", value: "polyton" },
          },
          {
            from: { field: "variants", value: "heploc" },
            to: { field: "variants", value: "alalc97" },
          },
        ],
        Wv = {
          region: {
            172: [
              "ru",
              "am",
              "az",
              "by",
              "ge",
              "kg",
              "kz",
              "md",
              "tj",
              "tm",
              "ua",
              "uz",
            ],
            200: ["cz", "sk"],
            530: ["cw", "sx", "bq"],
            532: ["cw", "sx", "bq"],
            536: ["sa", "iq"],
            582: ["fm", "mh", "mp", "pw"],
            810: [
              "ru",
              "am",
              "az",
              "by",
              "ee",
              "ge",
              "kz",
              "kg",
              "lv",
              "lt",
              "md",
              "tj",
              "tm",
              "ua",
              "uz",
            ],
            830: ["je", "gg"],
            890: ["rs", "me", "si", "hr", "mk", "ba"],
            891: ["rs", "me"],
            an: ["cw", "sx", "bq"],
            cs: ["rs", "me"],
            fq: ["aq", "tf"],
            nt: ["sa", "iq"],
            pc: ["fm", "mh", "mp", "pw"],
            su: [
              "ru",
              "am",
              "az",
              "by",
              "ee",
              "ge",
              "kz",
              "kg",
              "lv",
              "lt",
              "md",
              "tj",
              "tm",
              "ua",
              "uz",
            ],
            yu: ["rs", "me"],
            "062": ["034", "143"],
            ant: ["cw", "sx", "bq"],
            scg: ["rs", "me"],
            ntz: ["sa", "iq"],
            sun: [
              "ru",
              "am",
              "az",
              "by",
              "ee",
              "ge",
              "kz",
              "kg",
              "lv",
              "lt",
              "md",
              "tj",
              "tm",
              "ua",
              "uz",
            ],
            yug: ["rs", "me"],
          },
        },
        Zi = {
          aa: "aa-latn-et",
          aaa: "aaa-latn-ng",
          aab: "aab-latn-ng",
          aac: "aac-latn-pg",
          aad: "aad-latn-pg",
          aae: "aae-latn-it",
          "aae-grek": "aae-grek-it",
          aaf: "aaf-mlym-in",
          "aaf-arab": "aaf-arab-in",
          aag: "aag-latn-pg",
          aah: "aah-latn-pg",
          aai: "aai-latn-zz",
          aak: "aak-latn-zz",
          aal: "aal-latn-cm",
          aan: "aan-latn-br",
          aao: "aao-arab-dz",
          aap: "aap-latn-br",
          aaq: "aaq-latn-us",
          aas: "aas-latn-tz",
          aat: "aat-grek-gr",
          aau: "aau-latn-zz",
          aaw: "aaw-latn-pg",
          aax: "aax-latn-id",
          aaz: "aaz-latn-id",
          ab: "ab-cyrl-ge",
          aba: "aba-latn-ci",
          abb: "abb-latn-cm",
          abc: "abc-latn-ph",
          abd: "abd-latn-ph",
          abe: "abe-latn-ca",
          abf: "abf-latn-my",
          abg: "abg-latn-pg",
          abh: "abh-arab-tj",
          abi: "abi-latn-zz",
          abl: "abl-rjng-id",
          "abl-latn": "abl-latn-id",
          abm: "abm-latn-ng",
          abn: "abn-latn-ng",
          abo: "abo-latn-ng",
          abp: "abp-latn-ph",
          abq: "abq-cyrl-zz",
          abr: "abr-latn-gh",
          abs: "abs-latn-id",
          abt: "abt-latn-zz",
          abu: "abu-latn-ci",
          abv: "abv-arab-bh",
          abw: "abw-latn-pg",
          abx: "abx-latn-ph",
          aby: "aby-latn-zz",
          abz: "abz-latn-id",
          aca: "aca-latn-co",
          acb: "acb-latn-ng",
          acd: "acd-latn-zz",
          ace: "ace-latn-id",
          acf: "acf-latn-lc",
          ach: "ach-latn-ug",
          acm: "acm-arab-iq",
          acn: "acn-latn-cn",
          acp: "acp-latn-ng",
          acq: "acq-arab-ye",
          acr: "acr-latn-gt",
          acs: "acs-latn-br",
          act: "act-latn-nl",
          acu: "acu-latn-ec",
          acv: "acv-latn-us",
          acw: "acw-arab-sa",
          acx: "acx-arab-om",
          acy: "acy-latn-cy",
          "acy-arab": "acy-arab-cy",
          "acy-grek": "acy-grek-cy",
          acz: "acz-latn-sd",
          ada: "ada-latn-gh",
          adb: "adb-latn-tl",
          add: "add-latn-cm",
          ade: "ade-latn-zz",
          adf: "adf-arab-om",
          adg: "adg-latn-au",
          adh: "adh-latn-ug",
          adi: "adi-latn-in",
          "adi-tibt": "adi-tibt-cn",
          adj: "adj-latn-zz",
          adl: "adl-latn-in",
          adn: "adn-latn-id",
          ado: "ado-latn-pg",
          adp: "adp-tibt-bt",
          adq: "adq-latn-gh",
          adr: "adr-latn-id",
          adt: "adt-latn-au",
          adu: "adu-latn-ng",
          adw: "adw-latn-br",
          adx: "adx-tibt-cn",
          ady: "ady-cyrl-ru",
          adz: "adz-latn-zz",
          ae: "ae-avst-ir",
          aea: "aea-latn-au",
          aeb: "aeb-arab-tn",
          aec: "aec-arab-eg",
          aee: "aee-arab-af",
          aek: "aek-latn-nc",
          ael: "ael-latn-cm",
          aem: "aem-latn-vn",
          aeq: "aeq-arab-pk",
          aer: "aer-latn-au",
          aeu: "aeu-latn-cn",
          aew: "aew-latn-pg",
          aey: "aey-latn-zz",
          aez: "aez-latn-pg",
          af: "af-latn-za",
          afb: "afb-arab-kw",
          afd: "afd-latn-pg",
          afe: "afe-latn-ng",
          afh: "afh-latn-gh",
          afi: "afi-latn-pg",
          afk: "afk-latn-pg",
          afn: "afn-latn-ng",
          afo: "afo-latn-ng",
          afp: "afp-latn-pg",
          afs: "afs-latn-mx",
          afu: "afu-latn-gh",
          afz: "afz-latn-id",
          aga: "aga-latn-pe",
          agb: "agb-latn-ng",
          agc: "agc-latn-zz",
          agd: "agd-latn-zz",
          age: "age-latn-pg",
          agf: "agf-latn-id",
          agg: "agg-latn-zz",
          agh: "agh-latn-cd",
          agi: "agi-deva-in",
          agj: "agj-ethi-et",
          "agj-arab": "agj-arab-et",
          agk: "agk-latn-ph",
          agl: "agl-latn-pg",
          agm: "agm-latn-zz",
          agn: "agn-latn-ph",
          ago: "ago-latn-zz",
          agq: "agq-latn-cm",
          agr: "agr-latn-pe",
          ags: "ags-latn-cm",
          agt: "agt-latn-ph",
          agu: "agu-latn-gt",
          agv: "agv-latn-ph",
          agw: "agw-latn-sb",
          agx: "agx-cyrl-ru",
          agy: "agy-latn-ph",
          agz: "agz-latn-ph",
          aha: "aha-latn-zz",
          ahb: "ahb-latn-vu",
          ahg: "ahg-ethi-et",
          ahh: "ahh-latn-id",
          ahi: "ahi-latn-ci",
          ahk: "ahk-latn-mm",
          "ahk-mymr": "ahk-mymr-mm",
          "ahk-th": "ahk-latn-th",
          "ahk-thai": "ahk-thai-th",
          ahl: "ahl-latn-zz",
          ahm: "ahm-latn-ci",
          ahn: "ahn-latn-ng",
          aho: "aho-ahom-in",
          ahp: "ahp-latn-ci",
          ahr: "ahr-deva-in",
          ahs: "ahs-latn-ng",
          aht: "aht-latn-us",
          aia: "aia-latn-sb",
          aib: "aib-arab-cn",
          aic: "aic-latn-pg",
          aid: "aid-latn-au",
          aie: "aie-latn-pg",
          aif: "aif-latn-pg",
          aig: "aig-latn-ag",
          aij: "aij-hebr-il",
          aik: "aik-latn-ng",
          ail: "ail-latn-pg",
          aim: "aim-latn-in",
          ain: "ain-kana-jp",
          "ain-latn": "ain-latn-jp",
          aio: "aio-mymr-in",
          aip: "aip-latn-id",
          aiq: "aiq-arab-af",
          air: "air-latn-id",
          ait: "ait-latn-br",
          aiw: "aiw-latn-et",
          "aiw-arab": "aiw-arab-et",
          "aiw-ethi": "aiw-ethi-et",
          aix: "aix-latn-pg",
          aiy: "aiy-latn-cf",
          aja: "aja-latn-ss",
          ajg: "ajg-latn-zz",
          aji: "aji-latn-nc",
          ajn: "ajn-latn-au",
          ajp: "ajp-arab-jo",
          ajt: "ajt-arab-tn",
          ajw: "ajw-latn-ng",
          ajz: "ajz-latn-in",
          ak: "ak-latn-gh",
          akb: "akb-latn-id",
          "akb-batk": "akb-batk-id",
          akc: "akc-latn-id",
          akd: "akd-latn-ng",
          ake: "ake-latn-gy",
          akf: "akf-latn-ng",
          akg: "akg-latn-id",
          akh: "akh-latn-pg",
          aki: "aki-latn-pg",
          akk: "akk-xsux-iq",
          akl: "akl-latn-ph",
          ako: "ako-latn-sr",
          akp: "akp-latn-gh",
          akq: "akq-latn-pg",
          akr: "akr-latn-vu",
          aks: "aks-latn-tg",
          akt: "akt-latn-pg",
          aku: "aku-latn-cm",
          akv: "akv-cyrl-ru",
          akw: "akw-latn-cg",
          akz: "akz-latn-us",
          ala: "ala-latn-zz",
          alc: "alc-latn-cl",
          ald: "ald-latn-ci",
          ale: "ale-latn-us",
          alf: "alf-latn-ng",
          alh: "alh-latn-au",
          ali: "ali-latn-zz",
          alj: "alj-latn-ph",
          alk: "alk-laoo-la",
          all: "all-mlym-in",
          alm: "alm-latn-vu",
          aln: "aln-latn-xk",
          alo: "alo-latn-id",
          alp: "alp-latn-id",
          alq: "alq-latn-ca",
          alr: "alr-cyrl-ru",
          alt: "alt-cyrl-ru",
          alu: "alu-latn-sb",
          alw: "alw-ethi-et",
          alx: "alx-latn-pg",
          aly: "aly-latn-au",
          alz: "alz-latn-cd",
          am: "am-ethi-et",
          ama: "ama-latn-br",
          amb: "amb-latn-ng",
          amc: "amc-latn-pe",
          ame: "ame-latn-pe",
          amf: "amf-latn-et",
          "amf-ethi": "amf-ethi-et",
          amg: "amg-latn-au",
          ami: "ami-latn-tw",
          amj: "amj-latn-td",
          amk: "amk-latn-id",
          amm: "amm-latn-zz",
          amn: "amn-latn-zz",
          amo: "amo-latn-ng",
          amp: "amp-latn-zz",
          amq: "amq-latn-id",
          amr: "amr-latn-pe",
          ams: "ams-jpan-jp",
          amt: "amt-latn-pg",
          amu: "amu-latn-mx",
          amv: "amv-latn-id",
          amw: "amw-syrc-sy",
          "amw-arab": "amw-arab-sy",
          "amw-armi": "amw-armi-sy",
          "amw-latn": "amw-latn-sy",
          amx: "amx-latn-au",
          amy: "amy-latn-au",
          amz: "amz-latn-au",
          an: "an-latn-es",
          ana: "ana-latn-co",
          anb: "anb-latn-pe",
          anc: "anc-latn-zz",
          and: "and-latn-id",
          ane: "ane-latn-nc",
          anf: "anf-latn-gh",
          ang: "ang-latn-gb",
          anh: "anh-latn-pg",
          ani: "ani-cyrl-ru",
          anj: "anj-latn-pg",
          ank: "ank-latn-zz",
          anl: "anl-latn-mm",
          anm: "anm-latn-in",
          ann: "ann-latn-ng",
          ano: "ano-latn-co",
          anp: "anp-deva-in",
          anr: "anr-deva-in",
          ans: "ans-latn-co",
          ant: "ant-latn-au",
          anu: "anu-ethi-et",
          "anu-arab": "anu-arab-ss",
          "anu-latn": "anu-latn-ss",
          anv: "anv-latn-cm",
          anw: "anw-latn-ng",
          anx: "anx-latn-pg",
          any: "any-latn-zz",
          anz: "anz-latn-pg",
          aoa: "aoa-latn-st",
          aob: "aob-latn-pg",
          aoc: "aoc-latn-ve",
          aod: "aod-latn-pg",
          aoe: "aoe-latn-pg",
          aof: "aof-latn-pg",
          aog: "aog-latn-pg",
          aoi: "aoi-latn-au",
          aoj: "aoj-latn-zz",
          aok: "aok-latn-nc",
          aol: "aol-latn-id",
          aom: "aom-latn-zz",
          aon: "aon-latn-pg",
          aor: "aor-latn-vu",
          aos: "aos-latn-id",
          aot: "aot-beng-bd",
          "aot-latn": "aot-latn-in",
          aox: "aox-latn-gy",
          aoz: "aoz-latn-id",
          apb: "apb-latn-sb",
          apc: "apc-arab-sy",
          apd: "apd-arab-tg",
          ape: "ape-latn-zz",
          apf: "apf-latn-ph",
          apg: "apg-latn-id",
          aph: "aph-deva-np",
          api: "api-latn-br",
          apj: "apj-latn-us",
          apk: "apk-latn-us",
          apl: "apl-latn-us",
          apm: "apm-latn-us",
          apn: "apn-latn-br",
          apo: "apo-latn-pg",
          app: "app-latn-vu",
          apr: "apr-latn-zz",
          aps: "aps-latn-zz",
          apt: "apt-latn-in",
          apu: "apu-latn-br",
          apv: "apv-latn-br",
          apw: "apw-latn-us",
          apx: "apx-latn-id",
          apy: "apy-latn-br",
          apz: "apz-latn-zz",
          aqc: "aqc-cyrl-ru",
          aqd: "aqd-latn-ml",
          aqg: "aqg-latn-ng",
          aqk: "aqk-latn-ng",
          aqm: "aqm-latn-id",
          aqn: "aqn-latn-ph",
          aqr: "aqr-latn-nc",
          aqt: "aqt-latn-py",
          aqz: "aqz-latn-br",
          ar: "ar-arab-eg",
          arc: "arc-armi-ir",
          "arc-nbat": "arc-nbat-jo",
          "arc-palm": "arc-palm-sy",
          ard: "ard-latn-au",
          are: "are-latn-au",
          arh: "arh-latn-zz",
          ari: "ari-latn-us",
          arj: "arj-latn-br",
          ark: "ark-latn-br",
          arl: "arl-latn-pe",
          arn: "arn-latn-cl",
          aro: "aro-latn-bo",
          arp: "arp-latn-us",
          arq: "arq-arab-dz",
          arr: "arr-latn-br",
          ars: "ars-arab-sa",
          aru: "aru-latn-br",
          arw: "arw-latn-sr",
          arx: "arx-latn-br",
          ary: "ary-arab-ma",
          arz: "arz-arab-eg",
          as: "as-beng-in",
          asa: "asa-latn-tz",
          asb: "asb-latn-ca",
          asc: "asc-latn-id",
          ase: "ase-sgnw-us",
          asg: "asg-latn-zz",
          ash: "ash-latn-pe",
          asi: "asi-latn-id",
          asj: "asj-latn-cm",
          ask: "ask-arab-af",
          asl: "asl-latn-id",
          asn: "asn-latn-br",
          aso: "aso-latn-zz",
          ass: "ass-latn-cm",
          ast: "ast-latn-es",
          asu: "asu-latn-br",
          asv: "asv-latn-cd",
          asx: "asx-latn-pg",
          asy: "asy-latn-id",
          asz: "asz-latn-id",
          ata: "ata-latn-zz",
          atb: "atb-latn-cn",
          "atb-lisu": "atb-lisu-cn",
          atc: "atc-latn-pe",
          atd: "atd-latn-ph",
          ate: "ate-latn-pg",
          atg: "atg-latn-zz",
          ati: "ati-latn-ci",
          atj: "atj-latn-ca",
          atk: "atk-latn-ph",
          atl: "atl-latn-ph",
          atm: "atm-latn-ph",
          atn: "atn-arab-ir",
          ato: "ato-latn-cm",
          atp: "atp-latn-ph",
          atq: "atq-latn-id",
          atr: "atr-latn-br",
          ats: "ats-latn-us",
          att: "att-latn-ph",
          atu: "atu-latn-ss",
          atv: "atv-cyrl-ru",
          atw: "atw-latn-us",
          atx: "atx-latn-br",
          aty: "aty-latn-vu",
          atz: "atz-latn-ph",
          aua: "aua-latn-sb",
          auc: "auc-latn-ec",
          aud: "aud-latn-sb",
          aug: "aug-latn-bj",
          auh: "auh-latn-zm",
          aui: "aui-latn-pg",
          auj: "auj-arab-ly",
          "auj-latn": "auj-latn-ly",
          "auj-tfng": "auj-tfng-ly",
          auk: "auk-latn-pg",
          aul: "aul-latn-vu",
          aum: "aum-latn-ng",
          aun: "aun-latn-pg",
          auo: "auo-latn-ng",
          aup: "aup-latn-pg",
          auq: "auq-latn-id",
          aur: "aur-latn-pg",
          aut: "aut-latn-pf",
          auu: "auu-latn-id",
          auw: "auw-latn-id",
          auy: "auy-latn-zz",
          auz: "auz-arab-uz",
          av: "av-cyrl-ru",
          avb: "avb-latn-pg",
          avd: "avd-arab-ir",
          avi: "avi-latn-ci",
          avk: "avk-latn-001",
          avl: "avl-arab-zz",
          avm: "avm-latn-au",
          avn: "avn-latn-zz",
          avo: "avo-latn-br",
          avs: "avs-latn-pe",
          avt: "avt-latn-zz",
          avu: "avu-latn-zz",
          avv: "avv-latn-br",
          awa: "awa-deva-in",
          awb: "awb-latn-zz",
          awc: "awc-latn-ng",
          awe: "awe-latn-br",
          awg: "awg-latn-au",
          awh: "awh-latn-id",
          awi: "awi-latn-pg",
          awk: "awk-latn-au",
          awm: "awm-latn-pg",
          awn: "awn-ethi-et",
          awo: "awo-latn-zz",
          awr: "awr-latn-id",
          aws: "aws-latn-id",
          awt: "awt-latn-br",
          awu: "awu-latn-id",
          awv: "awv-latn-id",
          aww: "aww-latn-pg",
          awx: "awx-latn-zz",
          awy: "awy-latn-id",
          axb: "axb-latn-ar",
          axe: "axe-latn-au",
          axg: "axg-latn-br",
          axk: "axk-latn-cf",
          axl: "axl-latn-au",
          axm: "axm-armn-am",
          axx: "axx-latn-nc",
          ay: "ay-latn-bo",
          aya: "aya-latn-pg",
          ayb: "ayb-latn-zz",
          ayc: "ayc-latn-pe",
          ayd: "ayd-latn-au",
          aye: "aye-latn-ng",
          ayg: "ayg-latn-tg",
          ayh: "ayh-arab-ye",
          ayi: "ayi-latn-ng",
          ayk: "ayk-latn-ng",
          ayl: "ayl-arab-ly",
          ayn: "ayn-arab-ye",
          ayo: "ayo-latn-py",
          ayp: "ayp-arab-iq",
          ayq: "ayq-latn-pg",
          ays: "ays-latn-ph",
          ayt: "ayt-latn-ph",
          ayu: "ayu-latn-ng",
          ayz: "ayz-latn-id",
          az: "az-latn-az",
          "az-arab": "az-arab-ir",
          "az-iq": "az-arab-iq",
          "az-ir": "az-arab-ir",
          "az-ru": "az-cyrl-ru",
          azb: "azb-arab-ir",
          "azb-cyrl": "azb-cyrl-az",
          "azb-latn": "azb-latn-az",
          azd: "azd-latn-mx",
          azg: "azg-latn-mx",
          azm: "azm-latn-mx",
          azn: "azn-latn-mx",
          azo: "azo-latn-cm",
          azt: "azt-latn-ph",
          azz: "azz-latn-mx",
          ba: "ba-cyrl-ru",
          baa: "baa-latn-sb",
          bab: "bab-latn-gw",
          bac: "bac-latn-id",
          bae: "bae-latn-ve",
          baf: "baf-latn-cm",
          bag: "bag-latn-cm",
          bah: "bah-latn-bs",
          baj: "baj-latn-id",
          bal: "bal-arab-pk",
          ban: "ban-latn-id",
          bao: "bao-latn-co",
          bap: "bap-deva-np",
          bar: "bar-latn-at",
          bas: "bas-latn-cm",
          bau: "bau-latn-ng",
          bav: "bav-latn-zz",
          baw: "baw-latn-cm",
          bax: "bax-bamu-cm",
          bay: "bay-latn-id",
          bba: "bba-latn-zz",
          bbb: "bbb-latn-zz",
          bbc: "bbc-latn-id",
          bbd: "bbd-latn-zz",
          bbe: "bbe-latn-cd",
          bbf: "bbf-latn-pg",
          bbg: "bbg-latn-ga",
          bbi: "bbi-latn-cm",
          bbj: "bbj-latn-cm",
          bbk: "bbk-latn-cm",
          bbl: "bbl-geor-ge",
          bbm: "bbm-latn-cd",
          bbn: "bbn-latn-pg",
          bbo: "bbo-latn-bf",
          bbp: "bbp-latn-zz",
          bbq: "bbq-latn-cm",
          bbr: "bbr-latn-zz",
          bbs: "bbs-latn-ng",
          bbt: "bbt-latn-ng",
          bbu: "bbu-latn-ng",
          bbv: "bbv-latn-pg",
          bbw: "bbw-latn-cm",
          bbx: "bbx-latn-cm",
          bby: "bby-latn-cm",
          bca: "bca-latn-cn",
          "bca-hani": "bca-hani-cn",
          bcb: "bcb-latn-sn",
          bcd: "bcd-latn-id",
          bce: "bce-latn-cm",
          bcf: "bcf-latn-zz",
          bcg: "bcg-latn-gn",
          bch: "bch-latn-zz",
          bci: "bci-latn-ci",
          bcj: "bcj-latn-au",
          bck: "bck-latn-au",
          bcm: "bcm-latn-zz",
          bcn: "bcn-latn-zz",
          bco: "bco-latn-zz",
          bcp: "bcp-latn-cd",
          bcq: "bcq-ethi-zz",
          bcr: "bcr-latn-ca",
          bcs: "bcs-latn-ng",
          bct: "bct-latn-cd",
          bcu: "bcu-latn-zz",
          bcv: "bcv-latn-ng",
          bcw: "bcw-latn-cm",
          bcy: "bcy-latn-ng",
          bcz: "bcz-latn-sn",
          bda: "bda-latn-sn",
          bdb: "bdb-latn-id",
          bdc: "bdc-latn-co",
          bdd: "bdd-latn-zz",
          bde: "bde-latn-ng",
          bdf: "bdf-latn-pg",
          bdg: "bdg-latn-my",
          bdh: "bdh-latn-ss",
          bdi: "bdi-latn-sd",
          bdj: "bdj-latn-ss",
          bdk: "bdk-latn-az",
          bdl: "bdl-latn-id",
          bdm: "bdm-latn-td",
          bdn: "bdn-latn-cm",
          bdo: "bdo-latn-td",
          bdp: "bdp-latn-tz",
          bdq: "bdq-latn-vn",
          bdr: "bdr-latn-my",
          bds: "bds-latn-tz",
          bdt: "bdt-latn-cf",
          bdu: "bdu-latn-cm",
          bdv: "bdv-orya-in",
          bdw: "bdw-latn-id",
          bdx: "bdx-latn-id",
          bdy: "bdy-latn-au",
          bdz: "bdz-arab-pk",
          be: "be-cyrl-by",
          bea: "bea-latn-ca",
          "bea-cans": "bea-cans-ca",
          beb: "beb-latn-cm",
          bec: "bec-latn-cm",
          bed: "bed-latn-id",
          bee: "bee-deva-in",
          bef: "bef-latn-zz",
          beh: "beh-latn-zz",
          bei: "bei-latn-id",
          bej: "bej-arab-sd",
          bek: "bek-latn-pg",
          bem: "bem-latn-zm",
          beo: "beo-latn-pg",
          bep: "bep-latn-id",
          beq: "beq-latn-cg",
          bes: "bes-latn-td",
          bet: "bet-latn-zz",
          beu: "beu-latn-id",
          bev: "bev-latn-ci",
          bew: "bew-latn-id",
          bex: "bex-latn-zz",
          bey: "bey-latn-pg",
          bez: "bez-latn-tz",
          bfa: "bfa-latn-ss",
          "bfa-arab": "bfa-arab-ss",
          bfb: "bfb-deva-in",
          bfc: "bfc-latn-cn",
          bfd: "bfd-latn-cm",
          bfe: "bfe-latn-id",
          bff: "bff-latn-cf",
          bfg: "bfg-latn-id",
          bfh: "bfh-latn-pg",
          bfj: "bfj-latn-cm",
          bfl: "bfl-latn-cf",
          bfm: "bfm-latn-cm",
          bfn: "bfn-latn-tl",
          bfo: "bfo-latn-bf",
          bfp: "bfp-latn-cm",
          bfq: "bfq-taml-in",
          bfs: "bfs-latn-cn",
          "bfs-hani": "bfs-hani-cn",
          bft: "bft-arab-pk",
          bfu: "bfu-tibt-in",
          "bfu-takr": "bfu-takr-in",
          bfw: "bfw-orya-in",
          bfx: "bfx-latn-ph",
          bfy: "bfy-deva-in",
          bfz: "bfz-deva-in",
          bg: "bg-cyrl-bg",
          bga: "bga-latn-ng",
          bgb: "bgb-latn-id",
          bgc: "bgc-deva-in",
          bgd: "bgd-deva-in",
          bgf: "bgf-latn-cm",
          bgg: "bgg-latn-in",
          bgi: "bgi-latn-ph",
          bgj: "bgj-latn-cm",
          bgn: "bgn-arab-pk",
          bgo: "bgo-latn-gn",
          bgp: "bgp-arab-pk",
          bgq: "bgq-deva-in",
          bgr: "bgr-latn-in",
          bgs: "bgs-latn-ph",
          bgt: "bgt-latn-sb",
          bgu: "bgu-latn-ng",
          bgv: "bgv-latn-id",
          bgw: "bgw-deva-in",
          bgx: "bgx-grek-tr",
          bgy: "bgy-latn-id",
          bgz: "bgz-latn-id",
          bha: "bha-deva-in",
          bhb: "bhb-deva-in",
          bhc: "bhc-latn-id",
          bhd: "bhd-deva-in",
          "bhd-arab": "bhd-arab-in",
          "bhd-takr": "bhd-takr-in",
          bhe: "bhe-arab-pk",
          bhf: "bhf-latn-pg",
          bhg: "bhg-latn-zz",
          bhh: "bhh-cyrl-il",
          "bhh-hebr": "bhh-hebr-il",
          "bhh-latn": "bhh-latn-il",
          bhi: "bhi-deva-in",
          bhj: "bhj-deva-np",
          bhl: "bhl-latn-zz",
          bhm: "bhm-arab-om",
          bhn: "bhn-syrc-ge",
          bho: "bho-deva-in",
          bhp: "bhp-latn-id",
          bhq: "bhq-latn-id",
          bhr: "bhr-latn-mg",
          bhs: "bhs-latn-cm",
          bht: "bht-takr-in",
          "bht-deva": "bht-deva-in",
          "bht-latn": "bht-latn-in",
          bhu: "bhu-deva-in",
          bhv: "bhv-latn-id",
          bhw: "bhw-latn-id",
          bhy: "bhy-latn-zz",
          bhz: "bhz-latn-id",
          bi: "bi-latn-vu",
          bia: "bia-latn-au",
          bib: "bib-latn-zz",
          bid: "bid-latn-td",
          bie: "bie-latn-pg",
          bif: "bif-latn-gw",
          big: "big-latn-zz",
          bik: "bik-latn-ph",
          bil: "bil-latn-ng",
          bim: "bim-latn-zz",
          bin: "bin-latn-ng",
          bio: "bio-latn-zz",
          bip: "bip-latn-cd",
          biq: "biq-latn-zz",
          bir: "bir-latn-pg",
          bit: "bit-latn-pg",
          biu: "biu-latn-in",
          biv: "biv-latn-gh",
          biw: "biw-latn-cm",
          biy: "biy-deva-in",
          biz: "biz-latn-cd",
          bja: "bja-latn-cd",
          bjb: "bjb-latn-au",
          bjc: "bjc-latn-pg",
          bjf: "bjf-syrc-il",
          bjg: "bjg-latn-gw",
          bjh: "bjh-latn-zz",
          bji: "bji-ethi-zz",
          bjj: "bjj-deva-in",
          bjk: "bjk-latn-pg",
          bjl: "bjl-latn-pg",
          bjm: "bjm-arab-iq",
          bjn: "bjn-latn-id",
          bjo: "bjo-latn-zz",
          bjp: "bjp-latn-pg",
          bjr: "bjr-latn-zz",
          bjs: "bjs-latn-bb",
          bjt: "bjt-latn-sn",
          bju: "bju-latn-cm",
          bjv: "bjv-latn-td",
          bjw: "bjw-latn-ci",
          bjx: "bjx-latn-ph",
          bjy: "bjy-latn-au",
          bjz: "bjz-latn-zz",
          bka: "bka-latn-ng",
          bkc: "bkc-latn-zz",
          bkd: "bkd-latn-ph",
          bkf: "bkf-latn-cd",
          bkg: "bkg-latn-cf",
          bkh: "bkh-latn-cm",
          bki: "bki-latn-vu",
          bkj: "bkj-latn-cf",
          bkl: "bkl-latn-id",
          bkm: "bkm-latn-cm",
          bkn: "bkn-latn-id",
          bko: "bko-latn-cm",
          bkp: "bkp-latn-cd",
          bkq: "bkq-latn-zz",
          bkr: "bkr-latn-id",
          bks: "bks-latn-ph",
          bkt: "bkt-latn-cd",
          bku: "bku-latn-ph",
          bkv: "bkv-latn-zz",
          bkw: "bkw-latn-cg",
          bkx: "bkx-latn-tl",
          bky: "bky-latn-ng",
          bkz: "bkz-latn-id",
          bla: "bla-latn-ca",
          blb: "blb-latn-sb",
          blc: "blc-latn-ca",
          bld: "bld-latn-id",
          ble: "ble-latn-gw",
          blf: "blf-latn-id",
          blg: "blg-latn-my",
          blh: "blh-latn-lr",
          bli: "bli-latn-cd",
          blj: "blj-latn-id",
          blk: "blk-mymr-mm",
          blm: "blm-latn-ss",
          bln: "bln-latn-ph",
          blo: "blo-latn-bj",
          blp: "blp-latn-sb",
          blq: "blq-latn-pg",
          blr: "blr-latn-cn",
          "blr-tale": "blr-tale-cn",
          "blr-thai": "blr-thai-th",
          bls: "bls-latn-id",
          blt: "blt-tavt-vn",
          blv: "blv-latn-ao",
          blw: "blw-latn-ph",
          blx: "blx-latn-ph",
          bly: "bly-latn-bj",
          blz: "blz-latn-id",
          bm: "bm-latn-ml",
          bma: "bma-latn-ng",
          bmb: "bmb-latn-cd",
          bmc: "bmc-latn-pg",
          bmd: "bmd-latn-gn",
          bme: "bme-latn-cf",
          bmf: "bmf-latn-sl",
          bmg: "bmg-latn-cd",
          bmh: "bmh-latn-zz",
          bmi: "bmi-latn-td",
          bmj: "bmj-deva-np",
          bmk: "bmk-latn-zz",
          bml: "bml-latn-cd",
          bmm: "bmm-latn-mg",
          bmn: "bmn-latn-pg",
          bmo: "bmo-latn-cm",
          bmp: "bmp-latn-pg",
          bmq: "bmq-latn-ml",
          bmr: "bmr-latn-co",
          bms: "bms-latn-ne",
          bmu: "bmu-latn-zz",
          bmv: "bmv-latn-cm",
          bmw: "bmw-latn-cg",
          bmx: "bmx-latn-pg",
          bmz: "bmz-latn-pg",
          bn: "bn-beng-bd",
          bna: "bna-latn-id",
          bnb: "bnb-latn-my",
          bnc: "bnc-latn-ph",
          bnd: "bnd-latn-id",
          bne: "bne-latn-id",
          bnf: "bnf-latn-id",
          bng: "bng-latn-zz",
          bni: "bni-latn-cd",
          bnj: "bnj-latn-ph",
          bnk: "bnk-latn-vu",
          bnm: "bnm-latn-zz",
          bnn: "bnn-latn-tw",
          bno: "bno-latn-ph",
          bnp: "bnp-latn-zz",
          bnq: "bnq-latn-id",
          bnr: "bnr-latn-vu",
          bns: "bns-deva-in",
          bnu: "bnu-latn-id",
          bnv: "bnv-latn-id",
          bnw: "bnw-latn-pg",
          bnx: "bnx-latn-cd",
          bny: "bny-latn-my",
          bnz: "bnz-latn-cm",
          bo: "bo-tibt-cn",
          boa: "boa-latn-pe",
          bob: "bob-latn-ke",
          boe: "boe-latn-cm",
          bof: "bof-latn-bf",
          boh: "boh-latn-cd",
          boj: "boj-latn-zz",
          bok: "bok-latn-cg",
          bol: "bol-latn-ng",
          bom: "bom-latn-zz",
          bon: "bon-latn-zz",
          boo: "boo-latn-ml",
          bop: "bop-latn-pg",
          boq: "boq-latn-pg",
          bor: "bor-latn-br",
          bot: "bot-latn-ss",
          bou: "bou-latn-tz",
          bov: "bov-latn-gh",
          bow: "bow-latn-pg",
          box: "box-latn-bf",
          boy: "boy-latn-cf",
          boz: "boz-latn-ml",
          "boz-arab": "boz-arab-ml",
          bpa: "bpa-latn-vu",
          bpc: "bpc-latn-cm",
          bpd: "bpd-latn-cf",
          bpe: "bpe-latn-pg",
          bpg: "bpg-latn-id",
          bph: "bph-cyrl-ru",
          bpi: "bpi-latn-pg",
          bpj: "bpj-latn-cd",
          bpk: "bpk-latn-nc",
          bpl: "bpl-latn-au",
          bpm: "bpm-latn-pg",
          bpo: "bpo-latn-id",
          bpp: "bpp-latn-id",
          bpq: "bpq-latn-id",
          bpr: "bpr-latn-ph",
          bps: "bps-latn-ph",
          bpt: "bpt-latn-au",
          bpu: "bpu-latn-pg",
          bpv: "bpv-latn-id",
          bpw: "bpw-latn-pg",
          bpx: "bpx-deva-in",
          bpy: "bpy-beng-in",
          bpz: "bpz-latn-id",
          bqa: "bqa-latn-bj",
          bqb: "bqb-latn-id",
          bqc: "bqc-latn-zz",
          bqd: "bqd-latn-cm",
          bqf: "bqf-latn-gn",
          "bqf-arab": "bqf-arab-gn",
          bqg: "bqg-latn-tg",
          bqi: "bqi-arab-ir",
          bqj: "bqj-latn-sn",
          bqk: "bqk-latn-cf",
          bql: "bql-latn-pg",
          bqm: "bqm-latn-cm",
          bqo: "bqo-latn-cm",
          bqp: "bqp-latn-zz",
          bqq: "bqq-latn-id",
          bqr: "bqr-latn-id",
          bqs: "bqs-latn-pg",
          bqt: "bqt-latn-cm",
          bqu: "bqu-latn-cd",
          bqv: "bqv-latn-ci",
          bqw: "bqw-latn-ng",
          bqx: "bqx-latn-ng",
          bqz: "bqz-latn-cm",
          br: "br-latn-fr",
          bra: "bra-deva-in",
          brb: "brb-khmr-kh",
          "brb-laoo": "brb-laoo-la",
          "brb-latn": "brb-latn-vn",
          brc: "brc-latn-gy",
          brd: "brd-deva-np",
          brf: "brf-latn-cd",
          brg: "brg-latn-bo",
          brh: "brh-arab-pk",
          bri: "bri-latn-cm",
          brj: "brj-latn-vu",
          brk: "brk-arab-sd",
          brl: "brl-latn-bw",
          brm: "brm-latn-cd",
          brn: "brn-latn-cr",
          brp: "brp-latn-id",
          brq: "brq-latn-pg",
          brr: "brr-latn-sb",
          brs: "brs-latn-id",
          brt: "brt-latn-ng",
          bru: "bru-latn-vn",
          "bru-laoo": "bru-laoo-la",
          "bru-thai": "bru-thai-la",
          brv: "brv-laoo-la",
          brx: "brx-deva-in",
          bry: "bry-latn-pg",
          brz: "brz-latn-zz",
          bs: "bs-latn-ba",
          bsa: "bsa-latn-id",
          bsb: "bsb-latn-bn",
          bsc: "bsc-latn-sn",
          bse: "bse-latn-cm",
          bsf: "bsf-latn-ng",
          bsh: "bsh-arab-af",
          bsi: "bsi-latn-cm",
          bsj: "bsj-latn-zz",
          bsk: "bsk-arab-pk",
          "bsk-latn": "bsk-latn-pk",
          bsl: "bsl-latn-ng",
          bsm: "bsm-latn-id",
          bsn: "bsn-latn-co",
          bso: "bso-latn-td",
          bsp: "bsp-latn-gn",
          bsq: "bsq-bass-lr",
          bsr: "bsr-latn-ng",
          bss: "bss-latn-cm",
          bst: "bst-ethi-zz",
          bsu: "bsu-latn-id",
          bsv: "bsv-latn-gn",
          "bsv-arab": "bsv-arab-gn",
          bsw: "bsw-latn-et",
          "bsw-ethi": "bsw-ethi-et",
          bsx: "bsx-latn-ng",
          bsy: "bsy-latn-my",
          bta: "bta-latn-ng",
          btc: "btc-latn-cm",
          btd: "btd-batk-id",
          bte: "bte-latn-ng",
          btf: "btf-latn-td",
          btg: "btg-latn-ci",
          bth: "bth-latn-my",
          bti: "bti-latn-id",
          btj: "btj-latn-id",
          btm: "btm-batk-id",
          btn: "btn-latn-ph",
          bto: "bto-latn-ph",
          btp: "btp-latn-pg",
          btq: "btq-latn-my",
          btr: "btr-latn-vu",
          bts: "bts-latn-id",
          "bts-batk": "bts-batk-id",
          btt: "btt-latn-zz",
          btu: "btu-latn-ng",
          btv: "btv-deva-pk",
          btw: "btw-latn-ph",
          btx: "btx-latn-id",
          "btx-batk": "btx-batk-id",
          bty: "bty-latn-id",
          btz: "btz-latn-id",
          bua: "bua-cyrl-ru",
          bub: "bub-latn-td",
          buc: "buc-latn-yt",
          bud: "bud-latn-zz",
          bue: "bue-latn-ca",
          buf: "buf-latn-cd",
          bug: "bug-latn-id",
          buh: "buh-latn-cn",
          bui: "bui-latn-cg",
          buj: "buj-latn-ng",
          buk: "buk-latn-zz",
          bum: "bum-latn-cm",
          bun: "bun-latn-sl",
          buo: "buo-latn-zz",
          bup: "bup-latn-id",
          buq: "buq-latn-pg",
          bus: "bus-latn-zz",
          but: "but-latn-pg",
          buu: "buu-latn-zz",
          buv: "buv-latn-pg",
          buw: "buw-latn-ga",
          bux: "bux-latn-ng",
          buy: "buy-latn-sl",
          buz: "buz-latn-ng",
          bva: "bva-latn-td",
          bvb: "bvb-latn-gq",
          bvc: "bvc-latn-sb",
          bvd: "bvd-latn-sb",
          bve: "bve-latn-id",
          bvf: "bvf-latn-td",
          bvg: "bvg-latn-cm",
          bvh: "bvh-latn-ng",
          bvi: "bvi-latn-ss",
          bvj: "bvj-latn-ng",
          bvk: "bvk-latn-id",
          bvm: "bvm-latn-cm",
          bvn: "bvn-latn-pg",
          bvo: "bvo-latn-td",
          bvq: "bvq-latn-cf",
          bvr: "bvr-latn-au",
          bvt: "bvt-latn-id",
          bvu: "bvu-latn-id",
          bvv: "bvv-latn-ve",
          bvw: "bvw-latn-ng",
          bvx: "bvx-latn-cg",
          bvy: "bvy-latn-ph",
          bvz: "bvz-latn-id",
          bwa: "bwa-latn-nc",
          bwb: "bwb-latn-fj",
          bwc: "bwc-latn-zm",
          bwd: "bwd-latn-zz",
          bwe: "bwe-mymr-mm",
          "bwe-latn": "bwe-latn-mm",
          bwf: "bwf-latn-pg",
          bwg: "bwg-latn-mz",
          bwh: "bwh-latn-cm",
          bwi: "bwi-latn-ve",
          bwj: "bwj-latn-bf",
          bwk: "bwk-latn-pg",
          bwl: "bwl-latn-cd",
          bwm: "bwm-latn-pg",
          bwo: "bwo-latn-et",
          "bwo-ethi": "bwo-ethi-et",
          bwp: "bwp-latn-id",
          bwq: "bwq-latn-bf",
          bwr: "bwr-latn-zz",
          bws: "bws-latn-cd",
          bwt: "bwt-latn-cm",
          bwu: "bwu-latn-gh",
          bww: "bww-latn-cd",
          bwx: "bwx-latn-cn",
          bwy: "bwy-latn-bf",
          bwz: "bwz-latn-cg",
          bxa: "bxa-latn-sb",
          bxb: "bxb-latn-ss",
          bxc: "bxc-latn-gq",
          bxf: "bxf-latn-pg",
          bxg: "bxg-latn-cd",
          bxh: "bxh-latn-zz",
          bxi: "bxi-latn-au",
          bxj: "bxj-latn-au",
          bxl: "bxl-latn-bf",
          bxm: "bxm-cyrl-mn",
          "bxm-latn": "bxm-latn-mn",
          "bxm-mong": "bxm-mong-mn",
          bxn: "bxn-latn-au",
          bxo: "bxo-latn-ng",
          bxp: "bxp-latn-cm",
          bxq: "bxq-latn-ng",
          bxs: "bxs-latn-cm",
          bxu: "bxu-mong-cn",
          "bxu-cyrl": "bxu-cyrl-cn",
          "bxu-latn": "bxu-latn-cn",
          bxv: "bxv-latn-td",
          bxw: "bxw-latn-ml",
          bxz: "bxz-latn-pg",
          bya: "bya-latn-ph",
          byb: "byb-latn-cm",
          byc: "byc-latn-ng",
          byd: "byd-latn-id",
          bye: "bye-latn-zz",
          byf: "byf-latn-ng",
          byh: "byh-deva-np",
          byi: "byi-latn-cd",
          byj: "byj-latn-ng",
          byk: "byk-latn-cn",
          byl: "byl-latn-id",
          bym: "bym-latn-au",
          byn: "byn-ethi-er",
          byp: "byp-latn-ng",
          byr: "byr-latn-zz",
          bys: "bys-latn-zz",
          byv: "byv-latn-cm",
          byw: "byw-deva-np",
          byx: "byx-latn-zz",
          byz: "byz-latn-pg",
          bza: "bza-latn-zz",
          bzb: "bzb-latn-id",
          bzc: "bzc-latn-mg",
          bzd: "bzd-latn-cr",
          bze: "bze-latn-ml",
          bzf: "bzf-latn-zz",
          bzh: "bzh-latn-zz",
          bzi: "bzi-thai-th",
          bzj: "bzj-latn-bz",
          bzk: "bzk-latn-ni",
          bzl: "bzl-latn-id",
          bzm: "bzm-latn-cd",
          bzn: "bzn-latn-id",
          bzo: "bzo-latn-cd",
          bzp: "bzp-latn-id",
          bzq: "bzq-latn-id",
          bzr: "bzr-latn-au",
          bzt: "bzt-latn-001",
          bzu: "bzu-latn-id",
          bzv: "bzv-latn-cm",
          bzw: "bzw-latn-zz",
          bzx: "bzx-latn-ml",
          bzy: "bzy-latn-ng",
          bzz: "bzz-latn-ng",
          ca: "ca-latn-es",
          caa: "caa-latn-gt",
          cab: "cab-latn-hn",
          cac: "cac-latn-gt",
          cad: "cad-latn-us",
          cae: "cae-latn-sn",
          caf: "caf-latn-ca",
          "caf-cans": "caf-cans-ca",
          cag: "cag-latn-py",
          cah: "cah-latn-pe",
          caj: "caj-latn-ar",
          cak: "cak-latn-gt",
          cal: "cal-latn-mp",
          cam: "cam-latn-nc",
          can: "can-latn-zz",
          cao: "cao-latn-bo",
          cap: "cap-latn-bo",
          caq: "caq-latn-in",
          car: "car-latn-ve",
          cas: "cas-latn-bo",
          cav: "cav-latn-bo",
          caw: "caw-latn-bo",
          cax: "cax-latn-bo",
          cay: "cay-latn-ca",
          caz: "caz-latn-bo",
          cbb: "cbb-latn-co",
          cbc: "cbc-latn-co",
          cbd: "cbd-latn-co",
          cbg: "cbg-latn-co",
          cbi: "cbi-latn-ec",
          cbj: "cbj-latn-zz",
          cbk: "cbk-latn-ph",
          "cbk-brai": "cbk-brai-ph",
          cbl: "cbl-latn-mm",
          cbn: "cbn-thai-th",
          cbo: "cbo-latn-ng",
          cbq: "cbq-latn-ng",
          cbr: "cbr-latn-pe",
          cbs: "cbs-latn-pe",
          cbt: "cbt-latn-pe",
          cbu: "cbu-latn-pe",
          cbv: "cbv-latn-co",
          cbw: "cbw-latn-ph",
          cby: "cby-latn-co",
          ccc: "ccc-latn-pe",
          ccd: "ccd-latn-br",
          cce: "cce-latn-mz",
          ccg: "ccg-latn-ng",
          cch: "cch-latn-ng",
          ccj: "ccj-latn-gw",
          ccl: "ccl-latn-tz",
          ccm: "ccm-latn-my",
          cco: "cco-latn-mx",
          ccp: "ccp-cakm-bd",
          ccr: "ccr-latn-sv",
          cde: "cde-telu-in",
          cdf: "cdf-latn-in",
          "cdf-beng": "cdf-beng-in",
          cdh: "cdh-deva-in",
          "cdh-takr": "cdh-takr-in",
          cdi: "cdi-gujr-in",
          cdj: "cdj-deva-in",
          cdm: "cdm-deva-np",
          "cdm-latn": "cdm-latn-np",
          cdo: "cdo-hans-cn",
          "cdo-hant": "cdo-hant-cn",
          "cdo-latn": "cdo-latn-cn",
          cdr: "cdr-latn-ng",
          cdz: "cdz-beng-in",
          ce: "ce-cyrl-ru",
          cea: "cea-latn-us",
          ceb: "ceb-latn-ph",
          ceg: "ceg-latn-py",
          cek: "cek-latn-mm",
          cen: "cen-latn-ng",
          cet: "cet-latn-ng",
          cey: "cey-latn-mm",
          cfa: "cfa-latn-zz",
          cfd: "cfd-latn-ng",
          cfg: "cfg-latn-ng",
          cfm: "cfm-latn-mm",
          "cfm-beng": "cfm-beng-in",
          cga: "cga-latn-pg",
          cgc: "cgc-latn-ph",
          cgg: "cgg-latn-ug",
          cgk: "cgk-tibt-bt",
          ch: "ch-latn-gu",
          chb: "chb-latn-co",
          chd: "chd-latn-mx",
          chf: "chf-latn-mx",
          chg: "chg-arab-tm",
          chh: "chh-latn-us",
          chj: "chj-latn-mx",
          chk: "chk-latn-fm",
          chl: "chl-latn-us",
          chm: "chm-cyrl-ru",
          chn: "chn-latn-us",
          "chn-dupl": "chn-dupl-us",
          cho: "cho-latn-us",
          chp: "chp-latn-ca",
          chq: "chq-latn-mx",
          chr: "chr-cher-us",
          cht: "cht-latn-pe",
          chw: "chw-latn-mz",
          chx: "chx-deva-np",
          chy: "chy-latn-us",
          chz: "chz-latn-mx",
          cia: "cia-latn-id",
          "cia-arab": "cia-arab-id",
          "cia-hang": "cia-hang-id",
          cib: "cib-latn-bj",
          cic: "cic-latn-us",
          cie: "cie-latn-ng",
          cih: "cih-deva-in",
          cim: "cim-latn-it",
          cin: "cin-latn-br",
          cip: "cip-latn-mx",
          cir: "cir-latn-nc",
          ciw: "ciw-latn-us",
          "ciw-cans": "ciw-cans-us",
          ciy: "ciy-latn-ve",
          cja: "cja-arab-kh",
          cje: "cje-latn-vn",
          cjh: "cjh-latn-us",
          cji: "cji-cyrl-ru",
          cjk: "cjk-latn-ao",
          cjm: "cjm-cham-vn",
          cjn: "cjn-latn-pg",
          cjo: "cjo-latn-pe",
          cjp: "cjp-latn-cr",
          cjs: "cjs-latn-ru",
          "cjs-cyrl": "cjs-cyrl-ru",
          cjv: "cjv-latn-zz",
          cjy: "cjy-hans-cn",
          "cjy-hant": "cjy-hant-cn",
          ckb: "ckb-arab-iq",
          ckl: "ckl-latn-zz",
          ckm: "ckm-latn-hr",
          "ckm-glag": "ckm-glag-hr",
          ckn: "ckn-latn-mm",
          cko: "cko-latn-zz",
          ckq: "ckq-latn-td",
          ckr: "ckr-latn-pg",
          cks: "cks-latn-nc",
          ckt: "ckt-cyrl-ru",
          cku: "cku-latn-us",
          ckv: "ckv-latn-tw",
          ckx: "ckx-latn-cm",
          cky: "cky-latn-zz",
          ckz: "ckz-latn-gt",
          cla: "cla-latn-zz",
          clc: "clc-latn-ca",
          cle: "cle-latn-mx",
          clh: "clh-arab-pk",
          cli: "cli-latn-gh",
          clj: "clj-latn-mm",
          clk: "clk-latn-in",
          "clk-tibt": "clk-tibt-cn",
          cll: "cll-latn-gh",
          clm: "clm-latn-us",
          clo: "clo-latn-mx",
          clt: "clt-latn-mm",
          clu: "clu-latn-ph",
          clw: "clw-cyrl-ru",
          cly: "cly-latn-mx",
          cma: "cma-latn-vn",
          cme: "cme-latn-zz",
          cmg: "cmg-soyo-mn",
          cmi: "cmi-latn-co",
          cml: "cml-latn-id",
          cmo: "cmo-latn-vn",
          "cmo-kh": "cmo-latn-kh",
          "cmo-khmr": "cmo-khmr-kh",
          cmr: "cmr-latn-mm",
          cms: "cms-latn-it",
          cmt: "cmt-latn-za",
          cna: "cna-tibt-in",
          cnb: "cnb-latn-mm",
          cnc: "cnc-latn-vn",
          cng: "cng-latn-cn",
          cnh: "cnh-latn-mm",
          cni: "cni-latn-pe",
          cnk: "cnk-latn-mm",
          cnl: "cnl-latn-mx",
          cnp: "cnp-hans-cn",
          "cnp-hant": "cnp-hant-cn",
          cnq: "cnq-latn-cm",
          cns: "cns-latn-id",
          cnt: "cnt-latn-mx",
          cnw: "cnw-latn-mm",
          cnx: "cnx-latn-gb",
          co: "co-latn-fr",
          coa: "coa-latn-au",
          cob: "cob-latn-mx",
          coc: "coc-latn-mx",
          cod: "cod-latn-pe",
          coe: "coe-latn-co",
          cof: "cof-latn-ec",
          cog: "cog-thai-th",
          coh: "coh-latn-ke",
          coj: "coj-latn-mx",
          cok: "cok-latn-mx",
          col: "col-latn-us",
          com: "com-latn-us",
          coo: "coo-latn-ca",
          cop: "cop-copt-eg",
          coq: "coq-latn-us",
          cot: "cot-latn-pe",
          cou: "cou-latn-sn",
          cox: "cox-latn-pe",
          coz: "coz-latn-mx",
          cpa: "cpa-latn-mx",
          cpb: "cpb-latn-pe",
          cpc: "cpc-latn-pe",
          cpg: "cpg-grek-gr",
          cpi: "cpi-latn-nr",
          cpn: "cpn-latn-gh",
          cpo: "cpo-latn-bf",
          cps: "cps-latn-ph",
          cpu: "cpu-latn-pe",
          cpx: "cpx-latn-cn",
          cpy: "cpy-latn-pe",
          cqd: "cqd-latn-cn",
          cr: "cr-cans-ca",
          crb: "crb-latn-vc",
          crc: "crc-latn-vu",
          crd: "crd-latn-us",
          crf: "crf-latn-co",
          crg: "crg-latn-ca",
          crh: "crh-cyrl-ua",
          cri: "cri-latn-st",
          crj: "crj-cans-ca",
          "crj-latn": "crj-latn-ca",
          crk: "crk-cans-ca",
          crl: "crl-cans-ca",
          crm: "crm-cans-ca",
          crn: "crn-latn-mx",
          cro: "cro-latn-us",
          crq: "crq-latn-ar",
          crs: "crs-latn-sc",
          crt: "crt-latn-ar",
          crv: "crv-latn-in",
          crw: "crw-latn-vn",
          crx: "crx-latn-ca",
          "crx-cans": "crx-cans-ca",
          cry: "cry-latn-ng",
          crz: "crz-latn-us",
          cs: "cs-latn-cz",
          csa: "csa-latn-mx",
          csb: "csb-latn-pl",
          csh: "csh-mymr-mm",
          "csh-latn": "csh-latn-mm",
          csj: "csj-latn-mm",
          csk: "csk-latn-sn",
          csm: "csm-latn-us",
          cso: "cso-latn-mx",
          csp: "csp-hans-cn",
          "csp-hant": "csp-hant-cn",
          css: "css-latn-us",
          cst: "cst-latn-us",
          csv: "csv-latn-mm",
          csw: "csw-cans-ca",
          csy: "csy-latn-mm",
          csz: "csz-latn-us",
          cta: "cta-latn-mx",
          ctc: "ctc-latn-us",
          ctd: "ctd-pauc-mm",
          cte: "cte-latn-mx",
          ctg: "ctg-beng-bd",
          "ctg-arab": "ctg-arab-bd",
          "ctg-latn": "ctg-latn-bd",
          cth: "cth-latn-mm",
          ctl: "ctl-latn-mx",
          ctm: "ctm-latn-us",
          ctn: "ctn-deva-np",
          cto: "cto-latn-co",
          ctp: "ctp-latn-mx",
          cts: "cts-latn-ph",
          ctt: "ctt-taml-in",
          ctu: "ctu-latn-mx",
          ctz: "ctz-latn-mx",
          cu: "cu-cyrl-ru",
          "cu-glag": "cu-glag-bg",
          cua: "cua-latn-vn",
          cub: "cub-latn-co",
          cuc: "cuc-latn-mx",
          cuh: "cuh-latn-ke",
          cui: "cui-latn-co",
          cuj: "cuj-latn-pe",
          cuk: "cuk-latn-pa",
          cul: "cul-latn-br",
          cuo: "cuo-latn-ve",
          cup: "cup-latn-us",
          cut: "cut-latn-mx",
          cuu: "cuu-lana-cn",
          cuv: "cuv-latn-cm",
          cux: "cux-latn-mx",
          cv: "cv-cyrl-ru",
          cvg: "cvg-latn-in",
          "cvg-tibt": "cvg-tibt-in",
          cvn: "cvn-latn-mx",
          cwa: "cwa-latn-tz",
          cwb: "cwb-latn-mz",
          cwe: "cwe-latn-tz",
          cwg: "cwg-latn-my",
          cwt: "cwt-latn-sn",
          cy: "cy-latn-gb",
          cya: "cya-latn-mx",
          cyb: "cyb-latn-bo",
          cyo: "cyo-latn-ph",
          czh: "czh-hans-cn",
          "czh-hant": "czh-hant-cn",
          czk: "czk-hebr-cz",
          czn: "czn-latn-mx",
          czt: "czt-latn-mm",
          da: "da-latn-dk",
          daa: "daa-latn-td",
          dac: "dac-latn-pg",
          dad: "dad-latn-zz",
          dae: "dae-latn-cm",
          daf: "daf-latn-ci",
          dag: "dag-latn-zz",
          dah: "dah-latn-zz",
          dai: "dai-latn-td",
          daj: "daj-latn-sd",
          dak: "dak-latn-us",
          dal: "dal-latn-ke",
          dam: "dam-latn-ng",
          dao: "dao-latn-mm",
          daq: "daq-deva-in",
          dar: "dar-cyrl-ru",
          das: "das-latn-ci",
          dau: "dau-latn-td",
          dav: "dav-latn-ke",
          daw: "daw-latn-ph",
          dax: "dax-latn-au",
          daz: "daz-latn-id",
          dba: "dba-latn-ml",
          dbb: "dbb-latn-ng",
          dbd: "dbd-latn-zz",
          dbe: "dbe-latn-id",
          dbf: "dbf-latn-id",
          dbg: "dbg-latn-ml",
          dbi: "dbi-latn-ng",
          dbj: "dbj-latn-my",
          "dbj-arab": "dbj-arab-my",
          dbl: "dbl-latn-au",
          dbm: "dbm-latn-ng",
          dbn: "dbn-latn-id",
          dbo: "dbo-latn-ng",
          dbp: "dbp-latn-ng",
          dbq: "dbq-latn-zz",
          dbt: "dbt-latn-ml",
          dbu: "dbu-latn-ml",
          dbv: "dbv-latn-ng",
          dbw: "dbw-latn-ml",
          dby: "dby-latn-pg",
          dcc: "dcc-arab-in",
          dcr: "dcr-latn-vi",
          dda: "dda-latn-au",
          ddd: "ddd-latn-ss",
          dde: "dde-latn-cg",
          ddg: "ddg-latn-tl",
          ddi: "ddi-latn-pg",
          ddj: "ddj-latn-au",
          ddn: "ddn-latn-zz",
          ddo: "ddo-cyrl-ru",
          ddr: "ddr-latn-au",
          dds: "dds-latn-ml",
          ddw: "ddw-latn-id",
          de: "de-latn-de",
          dec: "dec-latn-sd",
          ded: "ded-latn-zz",
          dee: "dee-latn-lr",
          def: "def-arab-ir",
          deg: "deg-latn-ng",
          deh: "deh-arab-pk",
          dei: "dei-latn-id",
          dek: "dek-latn-cm",
          del: "del-latn-us",
          dem: "dem-latn-id",
          den: "den-latn-ca",
          deq: "deq-latn-cf",
          der: "der-beng-in",
          "der-latn": "der-latn-in",
          des: "des-latn-br",
          dev: "dev-latn-pg",
          dez: "dez-latn-cd",
          dga: "dga-latn-zz",
          dgb: "dgb-latn-ml",
          dgc: "dgc-latn-ph",
          dgd: "dgd-latn-bf",
          dge: "dge-latn-pg",
          dgg: "dgg-latn-pg",
          dgh: "dgh-latn-zz",
          dgi: "dgi-latn-zz",
          dgk: "dgk-latn-cf",
          dgl: "dgl-arab-zz",
          dgn: "dgn-latn-au",
          dgr: "dgr-latn-ca",
          dgs: "dgs-latn-bf",
          dgt: "dgt-latn-au",
          dgw: "dgw-latn-au",
          dgx: "dgx-latn-pg",
          dgz: "dgz-latn-zz",
          dhg: "dhg-latn-au",
          dhi: "dhi-deva-np",
          dhl: "dhl-latn-au",
          dhm: "dhm-latn-ao",
          dhn: "dhn-gujr-in",
          dho: "dho-deva-in",
          dhr: "dhr-latn-au",
          dhs: "dhs-latn-tz",
          dhu: "dhu-latn-au",
          dhv: "dhv-latn-nc",
          dhw: "dhw-deva-np",
          dhx: "dhx-latn-au",
          dia: "dia-latn-zz",
          dib: "dib-latn-ss",
          dic: "dic-latn-ci",
          did: "did-latn-ss",
          dif: "dif-latn-au",
          dig: "dig-latn-ke",
          dih: "dih-latn-mx",
          dii: "dii-latn-cm",
          dij: "dij-latn-id",
          dil: "dil-latn-sd",
          din: "din-latn-ss",
          "din-arab": "din-arab-ss",
          dio: "dio-latn-ng",
          dip: "dip-latn-ss",
          dir: "dir-latn-ng",
          dis: "dis-latn-in",
          "dis-beng": "dis-beng-in",
          diu: "diu-latn-na",
          diw: "diw-latn-ss",
          dix: "dix-latn-vu",
          diy: "diy-latn-id",
          diz: "diz-latn-cd",
          dja: "dja-latn-au",
          djb: "djb-latn-au",
          djc: "djc-latn-td",
          djd: "djd-latn-au",
          dje: "dje-latn-ne",
          djf: "djf-latn-au",
          dji: "dji-latn-au",
          djj: "djj-latn-au",
          djk: "djk-latn-sr",
          djm: "djm-latn-ml",
          djn: "djn-latn-au",
          djo: "djo-latn-id",
          djr: "djr-latn-au",
          dju: "dju-latn-pg",
          djw: "djw-latn-au",
          dka: "dka-tibt-bt",
          dkg: "dkg-latn-ng",
          dkk: "dkk-latn-id",
          dkr: "dkr-latn-my",
          dks: "dks-latn-ss",
          dkx: "dkx-latn-cm",
          dlg: "dlg-cyrl-ru",
          dlm: "dlm-latn-hr",
          dln: "dln-latn-in",
          dma: "dma-latn-ga",
          dmb: "dmb-latn-ml",
          dmc: "dmc-latn-pg",
          dmd: "dmd-latn-au",
          dme: "dme-latn-cm",
          dmf: "dmf-medf-ng",
          dmg: "dmg-latn-my",
          dmk: "dmk-arab-pk",
          dml: "dml-arab-pk",
          dmm: "dmm-latn-cm",
          dmo: "dmo-latn-cm",
          dmr: "dmr-latn-id",
          dms: "dms-latn-id",
          dmu: "dmu-latn-id",
          dmv: "dmv-latn-my",
          dmw: "dmw-latn-au",
          dmx: "dmx-latn-mz",
          dmy: "dmy-latn-id",
          dna: "dna-latn-id",
          dnd: "dnd-latn-pg",
          dne: "dne-latn-tz",
          dng: "dng-cyrl-kg",
          "dng-arab": "dng-arab-kg",
          dni: "dni-latn-id",
          dnj: "dnj-latn-ci",
          dnk: "dnk-latn-id",
          dnn: "dnn-latn-bf",
          dno: "dno-latn-cd",
          dnr: "dnr-latn-pg",
          dnt: "dnt-latn-id",
          dnu: "dnu-mymr-mm",
          dnv: "dnv-mymr-mm",
          dnw: "dnw-latn-id",
          dny: "dny-latn-br",
          doa: "doa-latn-pg",
          dob: "dob-latn-zz",
          doc: "doc-latn-cn",
          doe: "doe-latn-tz",
          dof: "dof-latn-pg",
          doh: "doh-latn-ng",
          doi: "doi-deva-in",
          dok: "dok-latn-id",
          dol: "dol-latn-pg",
          don: "don-latn-pg",
          doo: "doo-latn-cd",
          dop: "dop-latn-zz",
          dor: "dor-latn-sb",
          dos: "dos-latn-bf",
          dot: "dot-latn-ng",
          dov: "dov-latn-zw",
          dow: "dow-latn-zz",
          dox: "dox-ethi-et",
          doy: "doy-latn-gh",
          dpp: "dpp-latn-my",
          drc: "drc-latn-pt",
          dre: "dre-tibt-np",
          drg: "drg-latn-my",
          drh: "drh-mong-cn",
          dri: "dri-latn-zz",
          drl: "drl-latn-au",
          drn: "drn-latn-id",
          dro: "dro-latn-my",
          drq: "drq-deva-np",
          drs: "drs-ethi-zz",
          drt: "drt-latn-nl",
          dru: "dru-latn-tw",
          dry: "dry-deva-np",
          dsb: "dsb-latn-de",
          dsh: "dsh-latn-ke",
          dsi: "dsi-latn-td",
          dsn: "dsn-latn-id",
          dso: "dso-orya-in",
          dsq: "dsq-latn-ml",
          "dsq-arab": "dsq-arab-ml",
          dta: "dta-latn-cn",
          "dta-cyrl": "dta-cyrl-cn",
          "dta-hans": "dta-hans-cn",
          dtb: "dtb-latn-my",
          dtd: "dtd-latn-ca",
          dth: "dth-latn-au",
          dti: "dti-latn-ml",
          dtk: "dtk-latn-ml",
          dtm: "dtm-latn-ml",
          dto: "dto-latn-ml",
          dtp: "dtp-latn-my",
          dtr: "dtr-latn-my",
          dts: "dts-latn-zz",
          dtt: "dtt-latn-ml",
          dtu: "dtu-latn-ml",
          dty: "dty-deva-np",
          dua: "dua-latn-cm",
          dub: "dub-gujr-in",
          duc: "duc-latn-zz",
          dud: "dud-latn-zz",
          due: "due-latn-ph",
          duf: "duf-latn-nc",
          dug: "dug-latn-zz",
          duh: "duh-deva-in",
          "duh-gujr": "duh-gujr-in",
          dui: "dui-latn-pg",
          duk: "duk-latn-pg",
          dul: "dul-latn-ph",
          dum: "dum-latn-nl",
          dun: "dun-latn-id",
          duo: "duo-latn-ph",
          dup: "dup-latn-id",
          duq: "duq-latn-id",
          dur: "dur-latn-cm",
          dus: "dus-deva-np",
          duu: "duu-latn-cn",
          duv: "duv-latn-id",
          duw: "duw-latn-id",
          dux: "dux-latn-ml",
          duy: "duy-latn-ph",
          duz: "duz-latn-cm",
          dv: "dv-thaa-mv",
          dva: "dva-latn-zz",
          dwa: "dwa-latn-ng",
          dwk: "dwk-orya-in",
          dwr: "dwr-latn-et",
          "dwr-ethi": "dwr-ethi-et",
          dws: "dws-latn-001",
          dwu: "dwu-latn-au",
          dww: "dww-latn-zz",
          dwy: "dwy-latn-au",
          dwz: "dwz-deva-np",
          dya: "dya-latn-bf",
          dyb: "dyb-latn-au",
          dyd: "dyd-latn-au",
          dyg: "dyg-latn-ph",
          dyi: "dyi-latn-ci",
          dym: "dym-latn-ml",
          dyn: "dyn-latn-au",
          dyo: "dyo-latn-sn",
          dyu: "dyu-latn-bf",
          dyy: "dyy-latn-au",
          dz: "dz-tibt-bt",
          dza: "dza-latn-ng",
          dze: "dze-latn-au",
          dzg: "dzg-latn-zz",
          dzl: "dzl-tibt-bt",
          dzn: "dzn-latn-cd",
          eaa: "eaa-latn-au",
          ebc: "ebc-latn-id",
          ebg: "ebg-latn-ng",
          ebk: "ebk-latn-ph",
          ebo: "ebo-latn-cg",
          ebr: "ebr-latn-ci",
          ebu: "ebu-latn-ke",
          ecr: "ecr-grek-gr",
          ecy: "ecy-cprt-cy",
          ee: "ee-latn-gh",
          efa: "efa-latn-ng",
          efe: "efe-latn-cd",
          efi: "efi-latn-ng",
          ega: "ega-latn-ci",
          egl: "egl-latn-it",
          egm: "egm-latn-tz",
          ego: "ego-latn-ng",
          egy: "egy-egyp-eg",
          ehu: "ehu-latn-ng",
          eip: "eip-latn-id",
          eit: "eit-latn-pg",
          eiv: "eiv-latn-pg",
          eja: "eja-latn-gw",
          eka: "eka-latn-zz",
          eke: "eke-latn-ng",
          ekg: "ekg-latn-id",
          eki: "eki-latn-ng",
          ekl: "ekl-latn-bd",
          ekm: "ekm-latn-cm",
          eko: "eko-latn-mz",
          "eko-arab": "eko-arab-mz",
          ekp: "ekp-latn-ng",
          ekr: "ekr-latn-ng",
          eky: "eky-kali-mm",
          el: "el-grek-gr",
          ele: "ele-latn-pg",
          elk: "elk-latn-pg",
          elm: "elm-latn-ng",
          elo: "elo-latn-ke",
          elu: "elu-latn-pg",
          ema: "ema-latn-zz",
          emb: "emb-latn-id",
          eme: "eme-latn-gf",
          emg: "emg-deva-np",
          emi: "emi-latn-zz",
          emm: "emm-latn-mx",
          emn: "emn-latn-cm",
          emp: "emp-latn-pa",
          ems: "ems-latn-us",
          "ems-cyrl": "ems-cyrl-us",
          emu: "emu-deva-in",
          emw: "emw-latn-id",
          emx: "emx-latn-fr",
          emz: "emz-latn-cm",
          en: "en-latn-us",
          "en-shaw": "en-shaw-gb",
          ena: "ena-latn-pg",
          enb: "enb-latn-ke",
          enc: "enc-latn-vn",
          end: "end-latn-id",
          enf: "enf-cyrl-ru",
          enh: "enh-cyrl-ru",
          enl: "enl-latn-py",
          enm: "enm-latn-gb",
          enn: "enn-latn-zz",
          eno: "eno-latn-id",
          enq: "enq-latn-zz",
          enr: "enr-latn-id",
          env: "env-latn-ng",
          enw: "enw-latn-ng",
          enx: "enx-latn-py",
          eo: "eo-latn-001",
          eot: "eot-latn-ci",
          epi: "epi-latn-ng",
          era: "era-taml-in",
          erg: "erg-latn-vu",
          erh: "erh-latn-ng",
          eri: "eri-latn-zz",
          erk: "erk-latn-vu",
          err: "err-latn-au",
          ert: "ert-latn-id",
          erw: "erw-latn-id",
          es: "es-latn-es",
          ese: "ese-latn-bo",
          esg: "esg-gonm-in",
          esh: "esh-arab-ir",
          esi: "esi-latn-us",
          esm: "esm-latn-ci",
          ess: "ess-latn-us",
          "ess-cyrl": "ess-cyrl-us",
          esu: "esu-latn-us",
          esy: "esy-latn-ph",
          et: "et-latn-ee",
          etb: "etb-latn-ng",
          etn: "etn-latn-vu",
          eto: "eto-latn-cm",
          etr: "etr-latn-zz",
          ets: "ets-latn-ng",
          ett: "ett-ital-it",
          etu: "etu-latn-zz",
          etx: "etx-latn-zz",
          etz: "etz-latn-id",
          eu: "eu-latn-es",
          eve: "eve-cyrl-ru",
          evh: "evh-latn-ng",
          evn: "evn-cyrl-ru",
          "evn-latn": "evn-latn-cn",
          "evn-mong": "evn-mong-cn",
          ewo: "ewo-latn-cm",
          ext: "ext-latn-es",
          eya: "eya-latn-us",
          eyo: "eyo-latn-ke",
          eza: "eza-latn-zz",
          eze: "eze-latn-ng",
          fa: "fa-arab-ir",
          faa: "faa-latn-zz",
          fab: "fab-latn-zz",
          fad: "fad-latn-pg",
          faf: "faf-latn-sb",
          fag: "fag-latn-zz",
          fah: "fah-latn-ng",
          fai: "fai-latn-zz",
          faj: "faj-latn-pg",
          fak: "fak-latn-cm",
          fal: "fal-latn-cm",
          fam: "fam-latn-ng",
          fan: "fan-latn-gq",
          fap: "fap-latn-sn",
          far: "far-latn-sb",
          fau: "fau-latn-id",
          fax: "fax-latn-es",
          fay: "fay-arab-ir",
          faz: "faz-arab-ir",
          fbl: "fbl-latn-ph",
          fer: "fer-latn-ss",
          ff: "ff-latn-sn",
          "ff-adlm": "ff-adlm-gn",
          ffi: "ffi-latn-zz",
          ffm: "ffm-latn-ml",
          fgr: "fgr-latn-td",
          fi: "fi-latn-fi",
          fia: "fia-arab-sd",
          fie: "fie-latn-ng",
          fif: "fif-latn-sa",
          fil: "fil-latn-ph",
          fip: "fip-latn-tz",
          fir: "fir-latn-ng",
          fit: "fit-latn-se",
          fiw: "fiw-latn-pg",
          fj: "fj-latn-fj",
          fkk: "fkk-latn-ng",
          fkv: "fkv-latn-no",
          fla: "fla-latn-us",
          flh: "flh-latn-id",
          fli: "fli-latn-ng",
          fll: "fll-latn-cm",
          fln: "fln-latn-au",
          flr: "flr-latn-zz",
          fly: "fly-latn-za",
          fmp: "fmp-latn-zz",
          fmu: "fmu-deva-in",
          fnb: "fnb-latn-vu",
          fng: "fng-latn-za",
          fni: "fni-latn-td",
          fo: "fo-latn-fo",
          fod: "fod-latn-zz",
          foi: "foi-latn-pg",
          fom: "fom-latn-cd",
          fon: "fon-latn-bj",
          for: "for-latn-zz",
          fos: "fos-latn-tw",
          fpe: "fpe-latn-zz",
          fqs: "fqs-latn-zz",
          fr: "fr-latn-fr",
          frc: "frc-latn-us",
          frd: "frd-latn-id",
          frk: "frk-latn-de",
          frm: "frm-latn-fr",
          fro: "fro-latn-fr",
          frp: "frp-latn-fr",
          frq: "frq-latn-pg",
          frr: "frr-latn-de",
          frs: "frs-latn-de",
          frt: "frt-latn-vu",
          fub: "fub-arab-cm",
          fud: "fud-latn-wf",
          fue: "fue-latn-zz",
          fuf: "fuf-latn-gn",
          fuh: "fuh-latn-zz",
          fui: "fui-latn-td",
          fum: "fum-latn-ng",
          fun: "fun-latn-br",
          fuq: "fuq-latn-ne",
          fur: "fur-latn-it",
          fut: "fut-latn-vu",
          fuu: "fuu-latn-cd",
          fuv: "fuv-latn-ng",
          fuy: "fuy-latn-zz",
          fvr: "fvr-latn-sd",
          fwa: "fwa-latn-nc",
          fwe: "fwe-latn-na",
          fy: "fy-latn-nl",
          ga: "ga-latn-ie",
          gaa: "gaa-latn-gh",
          gab: "gab-latn-td",
          gac: "gac-latn-in",
          "gac-deva": "gac-deva-in",
          gad: "gad-latn-ph",
          gae: "gae-latn-ve",
          gaf: "gaf-latn-zz",
          gag: "gag-latn-md",
          gah: "gah-latn-zz",
          gai: "gai-latn-pg",
          gaj: "gaj-latn-zz",
          gak: "gak-latn-id",
          gal: "gal-latn-tl",
          gam: "gam-latn-zz",
          gan: "gan-hans-cn",
          gao: "gao-latn-pg",
          gap: "gap-latn-pg",
          gaq: "gaq-orya-in",
          gar: "gar-latn-pg",
          gas: "gas-gujr-in",
          gat: "gat-latn-pg",
          gau: "gau-telu-in",
          gaw: "gaw-latn-zz",
          gax: "gax-latn-et",
          "gax-ethi": "gax-ethi-et",
          gay: "gay-latn-id",
          gba: "gba-latn-zz",
          gbb: "gbb-latn-au",
          gbd: "gbd-latn-au",
          gbe: "gbe-latn-pg",
          gbf: "gbf-latn-zz",
          gbg: "gbg-latn-cf",
          gbh: "gbh-latn-bj",
          gbi: "gbi-latn-id",
          gbj: "gbj-orya-in",
          gbk: "gbk-deva-in",
          "gbk-takr": "gbk-takr-in",
          gbl: "gbl-gujr-in",
          "gbl-deva": "gbl-deva-in",
          gbm: "gbm-deva-in",
          gbn: "gbn-latn-ss",
          gbp: "gbp-latn-cf",
          gbq: "gbq-latn-cf",
          gbr: "gbr-latn-ng",
          gbs: "gbs-latn-bj",
          gbu: "gbu-latn-au",
          gbv: "gbv-latn-cf",
          gbw: "gbw-latn-au",
          gbx: "gbx-latn-bj",
          gby: "gby-latn-zz",
          gbz: "gbz-arab-ir",
          gcc: "gcc-latn-pg",
          gcd: "gcd-latn-au",
          gcf: "gcf-latn-gp",
          gcl: "gcl-latn-gd",
          gcn: "gcn-latn-pg",
          gcr: "gcr-latn-gf",
          gct: "gct-latn-ve",
          gd: "gd-latn-gb",
          gdb: "gdb-orya-in",
          "gdb-telu": "gdb-telu-in",
          gdc: "gdc-latn-au",
          gdd: "gdd-latn-pg",
          gde: "gde-latn-zz",
          gdf: "gdf-latn-ng",
          gdg: "gdg-latn-ph",
          gdh: "gdh-latn-au",
          gdi: "gdi-latn-cf",
          gdj: "gdj-latn-au",
          gdk: "gdk-latn-td",
          gdl: "gdl-latn-et",
          "gdl-ethi": "gdl-ethi-et",
          gdm: "gdm-latn-td",
          gdn: "gdn-latn-zz",
          gdo: "gdo-cyrl-ru",
          gdq: "gdq-latn-ye",
          gdr: "gdr-latn-zz",
          gdt: "gdt-latn-au",
          gdu: "gdu-latn-ng",
          gdx: "gdx-deva-in",
          gea: "gea-latn-ng",
          geb: "geb-latn-zz",
          gec: "gec-latn-lr",
          ged: "ged-latn-ng",
          gef: "gef-latn-id",
          geg: "geg-latn-ng",
          geh: "geh-latn-ca",
          gei: "gei-latn-id",
          gej: "gej-latn-zz",
          gek: "gek-latn-ng",
          gel: "gel-latn-zz",
          geq: "geq-latn-cf",
          ges: "ges-latn-id",
          gev: "gev-latn-ga",
          gew: "gew-latn-ng",
          gex: "gex-latn-so",
          gey: "gey-latn-cd",
          gez: "gez-ethi-et",
          gfk: "gfk-latn-zz",
          gga: "gga-latn-sb",
          ggb: "ggb-latn-lr",
          ggd: "ggd-latn-au",
          gge: "gge-latn-au",
          ggg: "ggg-arab-pk",
          ggk: "ggk-latn-au",
          ggl: "ggl-latn-pg",
          ggn: "ggn-deva-np",
          ggt: "ggt-latn-pg",
          ggu: "ggu-latn-ci",
          ggw: "ggw-latn-pg",
          gha: "gha-arab-ly",
          "gha-latn": "gha-latn-ly",
          "gha-tfng": "gha-tfng-ly",
          ghc: "ghc-latn-gb",
          ghe: "ghe-deva-np",
          ghk: "ghk-latn-mm",
          ghn: "ghn-latn-sb",
          ghr: "ghr-arab-pk",
          ghs: "ghs-latn-zz",
          ght: "ght-tibt-np",
          gia: "gia-latn-au",
          gib: "gib-latn-ng",
          gic: "gic-latn-za",
          gid: "gid-latn-cm",
          gie: "gie-latn-ci",
          gig: "gig-arab-pk",
          gih: "gih-latn-au",
          gil: "gil-latn-ki",
          gim: "gim-latn-zz",
          gin: "gin-cyrl-ru",
          gip: "gip-latn-pg",
          giq: "giq-latn-vn",
          gir: "gir-latn-vn",
          gis: "gis-latn-cm",
          git: "git-latn-ca",
          gix: "gix-latn-cd",
          giy: "giy-latn-au",
          giz: "giz-latn-cm",
          gjk: "gjk-arab-pk",
          gjm: "gjm-latn-au",
          gjn: "gjn-latn-zz",
          gjr: "gjr-latn-au",
          gju: "gju-arab-pk",
          gka: "gka-latn-pg",
          gkd: "gkd-latn-pg",
          gke: "gke-latn-cm",
          gkn: "gkn-latn-zz",
          gko: "gko-latn-au",
          gkp: "gkp-latn-zz",
          gku: "gku-latn-za",
          gl: "gl-latn-es",
          glb: "glb-latn-ng",
          glc: "glc-latn-td",
          gld: "gld-cyrl-ru",
          glh: "glh-arab-af",
          glj: "glj-latn-td",
          glk: "glk-arab-ir",
          gll: "gll-latn-au",
          glo: "glo-latn-ng",
          glr: "glr-latn-lr",
          glu: "glu-latn-td",
          glw: "glw-latn-ng",
          gma: "gma-latn-au",
          gmb: "gmb-latn-sb",
          gmd: "gmd-latn-ng",
          gmg: "gmg-latn-pg",
          gmh: "gmh-latn-de",
          gmm: "gmm-latn-zz",
          gmn: "gmn-latn-cm",
          gmr: "gmr-latn-au",
          gmu: "gmu-latn-pg",
          gmv: "gmv-ethi-zz",
          gmx: "gmx-latn-tz",
          gmy: "gmy-linb-gr",
          gmz: "gmz-latn-ng",
          gn: "gn-latn-py",
          gna: "gna-latn-bf",
          gnb: "gnb-latn-in",
          gnc: "gnc-latn-es",
          gnd: "gnd-latn-zz",
          gne: "gne-latn-ng",
          gng: "gng-latn-zz",
          gnh: "gnh-latn-ng",
          gni: "gni-latn-au",
          gnj: "gnj-latn-ci",
          gnk: "gnk-latn-bw",
          gnl: "gnl-latn-au",
          gnm: "gnm-latn-pg",
          gnn: "gnn-latn-au",
          gnq: "gnq-latn-my",
          gnr: "gnr-latn-au",
          gnt: "gnt-latn-pg",
          gnu: "gnu-latn-pg",
          gnw: "gnw-latn-bo",
          gnz: "gnz-latn-cf",
          goa: "goa-latn-ci",
          gob: "gob-latn-co",
          goc: "goc-latn-pg",
          god: "god-latn-zz",
          goe: "goe-tibt-bt",
          gof: "gof-ethi-zz",
          gog: "gog-latn-tz",
          goh: "goh-latn-de",
          goi: "goi-latn-zz",
          gok: "gok-deva-in",
          gol: "gol-latn-lr",
          gom: "gom-deva-in",
          gon: "gon-telu-in",
          goo: "goo-latn-fj",
          gop: "gop-latn-id",
          goq: "goq-latn-id",
          gor: "gor-latn-id",
          gos: "gos-latn-nl",
          got: "got-goth-ua",
          gou: "gou-latn-cm",
          gov: "gov-latn-ci",
          gow: "gow-latn-tz",
          gox: "gox-latn-cd",
          goy: "goy-latn-td",
          gpa: "gpa-latn-ng",
          gpe: "gpe-latn-gh",
          gpn: "gpn-latn-pg",
          gqa: "gqa-latn-ng",
          gqn: "gqn-latn-br",
          gqr: "gqr-latn-td",
          gra: "gra-deva-in",
          "gra-gujr": "gra-gujr-in",
          grb: "grb-latn-zz",
          grc: "grc-cprt-cy",
          "grc-linb": "grc-linb-gr",
          grd: "grd-latn-ng",
          grg: "grg-latn-pg",
          grh: "grh-latn-ng",
          gri: "gri-latn-sb",
          grj: "grj-latn-lr",
          grm: "grm-latn-my",
          grq: "grq-latn-pg",
          grs: "grs-latn-id",
          grt: "grt-beng-in",
          gru: "gru-ethi-et",
          "gru-latn": "gru-latn-et",
          grv: "grv-latn-lr",
          grw: "grw-latn-zz",
          grx: "grx-latn-pg",
          gry: "gry-latn-lr",
          grz: "grz-latn-pg",
          gsl: "gsl-latn-sn",
          gsn: "gsn-latn-pg",
          gso: "gso-latn-cf",
          gsp: "gsp-latn-pg",
          gsw: "gsw-latn-ch",
          gta: "gta-latn-br",
          gtu: "gtu-latn-au",
          gu: "gu-gujr-in",
          gua: "gua-latn-ng",
          gub: "gub-latn-br",
          guc: "guc-latn-co",
          gud: "gud-latn-zz",
          gue: "gue-latn-au",
          guf: "guf-latn-au",
          guh: "guh-latn-co",
          gui: "gui-latn-bo",
          guk: "guk-latn-et",
          "guk-ethi": "guk-ethi-et",
          gul: "gul-latn-us",
          gum: "gum-latn-co",
          gun: "gun-latn-br",
          guo: "guo-latn-co",
          gup: "gup-latn-au",
          guq: "guq-latn-py",
          gur: "gur-latn-gh",
          gut: "gut-latn-cr",
          guu: "guu-latn-ve",
          guw: "guw-latn-zz",
          gux: "gux-latn-zz",
          guz: "guz-latn-ke",
          gv: "gv-latn-im",
          gva: "gva-latn-py",
          gvc: "gvc-latn-br",
          gve: "gve-latn-pg",
          gvf: "gvf-latn-zz",
          gvj: "gvj-latn-br",
          gvl: "gvl-latn-td",
          gvm: "gvm-latn-ng",
          gvn: "gvn-latn-au",
          gvo: "gvo-latn-br",
          gvp: "gvp-latn-br",
          gvr: "gvr-deva-np",
          gvs: "gvs-latn-zz",
          gvy: "gvy-latn-au",
          gwa: "gwa-latn-ci",
          gwb: "gwb-latn-ng",
          gwc: "gwc-arab-zz",
          gwd: "gwd-latn-et",
          gwe: "gwe-latn-tz",
          gwf: "gwf-arab-pk",
          gwg: "gwg-latn-ng",
          gwi: "gwi-latn-ca",
          gwj: "gwj-latn-bw",
          gwm: "gwm-latn-au",
          gwn: "gwn-latn-ng",
          gwr: "gwr-latn-ug",
          gwt: "gwt-arab-zz",
          gwu: "gwu-latn-au",
          gww: "gww-latn-au",
          gwx: "gwx-latn-gh",
          gxx: "gxx-latn-ci",
          gyb: "gyb-latn-pg",
          gyd: "gyd-latn-au",
          gye: "gye-latn-ng",
          gyf: "gyf-latn-au",
          gyg: "gyg-latn-cf",
          gyi: "gyi-latn-zz",
          gyl: "gyl-latn-et",
          "gyl-ethi": "gyl-ethi-et",
          gym: "gym-latn-pa",
          gyn: "gyn-latn-gy",
          gyo: "gyo-deva-np",
          gyr: "gyr-latn-bo",
          gyy: "gyy-latn-au",
          gyz: "gyz-latn-ng",
          gza: "gza-latn-sd",
          gzi: "gzi-arab-ir",
          gzn: "gzn-latn-id",
          ha: "ha-latn-ng",
          "ha-cm": "ha-arab-cm",
          "ha-sd": "ha-arab-sd",
          haa: "haa-latn-us",
          hac: "hac-arab-ir",
          had: "had-latn-id",
          hae: "hae-latn-et",
          hag: "hag-latn-zz",
          hah: "hah-latn-pg",
          hai: "hai-latn-ca",
          haj: "haj-latn-in",
          "haj-beng": "haj-beng-in",
          hak: "hak-hans-cn",
          hal: "hal-latn-vn",
          ham: "ham-latn-zz",
          han: "han-latn-tz",
          hao: "hao-latn-pg",
          hap: "hap-latn-id",
          haq: "haq-latn-tz",
          har: "har-ethi-et",
          "har-arab": "har-arab-et",
          "har-latn": "har-latn-et",
          has: "has-latn-ca",
          hav: "hav-latn-cd",
          haw: "haw-latn-us",
          hax: "hax-latn-ca",
          hay: "hay-latn-tz",
          haz: "haz-arab-af",
          hba: "hba-latn-cd",
          hbb: "hbb-latn-zz",
          hbn: "hbn-latn-sd",
          hbo: "hbo-hebr-il",
          hbu: "hbu-latn-tl",
          hch: "hch-latn-mx",
          hdy: "hdy-ethi-zz",
          he: "he-hebr-il",
          hed: "hed-latn-td",
          heg: "heg-latn-id",
          heh: "heh-latn-tz",
          hei: "hei-latn-ca",
          hem: "hem-latn-cd",
          hgm: "hgm-latn-na",
          hgw: "hgw-latn-pg",
          hhi: "hhi-latn-pg",
          hhr: "hhr-latn-sn",
          hhy: "hhy-latn-zz",
          hi: "hi-deva-in",
          "hi-latn": "hi-latn-in",
          hia: "hia-latn-zz",
          hib: "hib-latn-pe",
          hid: "hid-latn-us",
          hif: "hif-latn-fj",
          hig: "hig-latn-zz",
          hih: "hih-latn-zz",
          hii: "hii-takr-in",
          "hii-deva": "hii-deva-in",
          hij: "hij-latn-cm",
          hik: "hik-latn-id",
          hil: "hil-latn-ph",
          hio: "hio-latn-bw",
          hir: "hir-latn-br",
          hit: "hit-xsux-tr",
          hiw: "hiw-latn-vu",
          hix: "hix-latn-br",
          hji: "hji-latn-id",
          hka: "hka-latn-tz",
          hke: "hke-latn-cd",
          hkh: "hkh-arab-in",
          "hkh-deva": "hkh-deva-in",
          "hkh-latn": "hkh-latn-in",
          hkk: "hkk-latn-pg",
          hla: "hla-latn-zz",
          hlb: "hlb-deva-in",
          hld: "hld-latn-vn",
          hlt: "hlt-latn-mm",
          hlu: "hlu-hluw-tr",
          hma: "hma-latn-cn",
          hmb: "hmb-latn-ml",
          hmd: "hmd-plrd-cn",
          hmf: "hmf-latn-vn",
          hmj: "hmj-bopo-cn",
          hmm: "hmm-latn-cn",
          hmn: "hmn-latn-cn",
          "hmn-bopo": "hmn-bopo-cn",
          "hmn-hmng": "hmn-hmng-cn",
          hmp: "hmp-latn-cn",
          hmq: "hmq-bopo-cn",
          hmr: "hmr-latn-in",
          hms: "hms-latn-cn",
          hmt: "hmt-latn-zz",
          hmu: "hmu-latn-id",
          hmv: "hmv-latn-vn",
          hmw: "hmw-latn-cn",
          hmy: "hmy-latn-cn",
          hmz: "hmz-latn-cn",
          "hmz-plrd": "hmz-plrd-cn",
          hna: "hna-latn-cm",
          hnd: "hnd-arab-pk",
          hne: "hne-deva-in",
          hng: "hng-latn-ao",
          hnh: "hnh-latn-bw",
          hni: "hni-latn-cn",
          hnj: "hnj-hmnp-us",
          "hnj-au": "hnj-laoo-au",
          "hnj-cn": "hnj-laoo-cn",
          "hnj-fr": "hnj-laoo-fr",
          "hnj-gf": "hnj-laoo-gf",
          "hnj-la": "hnj-laoo-la",
          "hnj-laoo": "hnj-laoo-la",
          "hnj-mm": "hnj-laoo-mm",
          "hnj-sr": "hnj-laoo-sr",
          "hnj-th": "hnj-laoo-th",
          "hnj-us": "hnj-hmnp-us",
          "hnj-vn": "hnj-laoo-vn",
          hnn: "hnn-latn-ph",
          hno: "hno-arab-pk",
          hns: "hns-latn-sr",
          ho: "ho-latn-pg",
          hoa: "hoa-latn-sb",
          hob: "hob-latn-pg",
          hoc: "hoc-deva-in",
          hod: "hod-latn-ng",
          hoe: "hoe-latn-ng",
          hoh: "hoh-arab-om",
          hoi: "hoi-latn-us",
          hoj: "hoj-deva-in",
          hol: "hol-latn-ao",
          hom: "hom-latn-ss",
          hoo: "hoo-latn-cd",
          hop: "hop-latn-us",
          hor: "hor-latn-td",
          hot: "hot-latn-zz",
          hov: "hov-latn-id",
          how: "how-hani-cn",
          hoy: "hoy-deva-in",
          hpo: "hpo-mymr-mm",
          hr: "hr-latn-hr",
          hra: "hra-latn-in",
          hrc: "hrc-latn-pg",
          hre: "hre-latn-vn",
          hrk: "hrk-latn-id",
          hrm: "hrm-latn-cn",
          "hrm-hmng": "hrm-hmng-cn",
          hro: "hro-latn-vn",
          hrp: "hrp-latn-au",
          hrt: "hrt-syrc-tr",
          hru: "hru-latn-in",
          hrw: "hrw-latn-pg",
          hrx: "hrx-latn-br",
          hrz: "hrz-arab-ir",
          hsb: "hsb-latn-de",
          hsn: "hsn-hans-cn",
          hss: "hss-arab-om",
          ht: "ht-latn-ht",
          hti: "hti-latn-id",
          hto: "hto-latn-co",
          hts: "hts-latn-tz",
          htu: "htu-latn-id",
          htx: "htx-xsux-tr",
          hu: "hu-latn-hu",
          hub: "hub-latn-pe",
          huc: "huc-latn-bw",
          hud: "hud-latn-id",
          hue: "hue-latn-mx",
          huf: "huf-latn-pg",
          hug: "hug-latn-pe",
          huh: "huh-latn-cl",
          hui: "hui-latn-zz",
          huk: "huk-latn-id",
          hul: "hul-latn-pg",
          hum: "hum-latn-cd",
          hup: "hup-latn-us",
          hur: "hur-latn-ca",
          hus: "hus-latn-mx",
          hut: "hut-deva-np",
          "hut-tibt": "hut-tibt-np",
          huu: "huu-latn-pe",
          huv: "huv-latn-mx",
          huw: "huw-latn-id",
          hux: "hux-latn-pe",
          huy: "huy-hebr-il",
          huz: "huz-cyrl-ru",
          hvc: "hvc-latn-ht",
          hve: "hve-latn-mx",
          hvk: "hvk-latn-nc",
          hvn: "hvn-latn-id",
          hvv: "hvv-latn-mx",
          hwa: "hwa-latn-ci",
          hwc: "hwc-latn-us",
          hwo: "hwo-latn-ng",
          hy: "hy-armn-am",
          hya: "hya-latn-cm",
          hyw: "hyw-armn-am",
          hz: "hz-latn-na",
          ia: "ia-latn-001",
          iai: "iai-latn-nc",
          ian: "ian-latn-zz",
          iar: "iar-latn-zz",
          iba: "iba-latn-my",
          ibb: "ibb-latn-ng",
          ibd: "ibd-latn-au",
          ibe: "ibe-latn-ng",
          ibg: "ibg-latn-ph",
          ibh: "ibh-latn-vn",
          ibl: "ibl-latn-ph",
          ibm: "ibm-latn-ng",
          ibn: "ibn-latn-ng",
          ibr: "ibr-latn-ng",
          ibu: "ibu-latn-id",
          iby: "iby-latn-zz",
          ica: "ica-latn-zz",
          ich: "ich-latn-zz",
          icr: "icr-latn-co",
          id: "id-latn-id",
          ida: "ida-latn-ke",
          idb: "idb-latn-in",
          idc: "idc-latn-ng",
          idd: "idd-latn-zz",
          ide: "ide-latn-ng",
          idi: "idi-latn-zz",
          idr: "idr-latn-ss",
          ids: "ids-latn-ng",
          idt: "idt-latn-tl",
          idu: "idu-latn-zz",
          ie: "ie-latn-001",
          ifa: "ifa-latn-ph",
          ifb: "ifb-latn-ph",
          ife: "ife-latn-tg",
          iff: "iff-latn-vu",
          ifk: "ifk-latn-ph",
          ifm: "ifm-latn-cg",
          ifu: "ifu-latn-ph",
          ify: "ify-latn-ph",
          ig: "ig-latn-ng",
          igb: "igb-latn-zz",
          ige: "ige-latn-zz",
          igg: "igg-latn-pg",
          igl: "igl-latn-ng",
          igm: "igm-latn-pg",
          ign: "ign-latn-bo",
          igo: "igo-latn-pg",
          igs: "igs-latn-001",
          "igs-grek": "igs-grek-001",
          igw: "igw-latn-ng",
          ihb: "ihb-latn-id",
          ihi: "ihi-latn-ng",
          ihp: "ihp-latn-id",
          ihw: "ihw-latn-au",
          ii: "ii-yiii-cn",
          iin: "iin-latn-au",
          ijc: "ijc-latn-ng",
          ije: "ije-latn-ng",
          ijj: "ijj-latn-zz",
          ijn: "ijn-latn-ng",
          ijs: "ijs-latn-ng",
          ik: "ik-latn-us",
          iki: "iki-latn-ng",
          ikk: "ikk-latn-zz",
          ikl: "ikl-latn-ng",
          iko: "iko-latn-ng",
          ikp: "ikp-latn-ng",
          ikr: "ikr-latn-au",
          ikt: "ikt-latn-ca",
          "ikt-cans": "ikt-cans-ca",
          ikv: "ikv-latn-ng",
          ikw: "ikw-latn-zz",
          ikx: "ikx-latn-zz",
          ikz: "ikz-latn-tz",
          ila: "ila-latn-id",
          ilb: "ilb-latn-zm",
          ilg: "ilg-latn-au",
          ili: "ili-latn-cn",
          "ili-arab": "ili-arab-cn",
          "ili-cyrl": "ili-cyrl-kz",
          ilk: "ilk-latn-ph",
          ilm: "ilm-latn-my",
          ilo: "ilo-latn-ph",
          ilp: "ilp-latn-ph",
          ilu: "ilu-latn-id",
          ilv: "ilv-latn-ng",
          imi: "imi-latn-pg",
          iml: "iml-latn-us",
          imn: "imn-latn-pg",
          imo: "imo-latn-zz",
          imr: "imr-latn-id",
          ims: "ims-latn-it",
          imt: "imt-latn-ss",
          imy: "imy-lyci-tr",
          in: "in-latn-id",
          inb: "inb-latn-co",
          ing: "ing-latn-us",
          inh: "inh-cyrl-ru",
          inj: "inj-latn-co",
          inn: "inn-latn-ph",
          ino: "ino-latn-pg",
          inp: "inp-latn-pe",
          int: "int-mymr-mm",
          io: "io-latn-001",
          ior: "ior-ethi-et",
          iou: "iou-latn-zz",
          iow: "iow-latn-us",
          ipi: "ipi-latn-pg",
          ipo: "ipo-latn-pg",
          iqu: "iqu-latn-pe",
          iqw: "iqw-latn-ng",
          ire: "ire-latn-id",
          irh: "irh-latn-id",
          iri: "iri-latn-zz",
          irk: "irk-latn-tz",
          irn: "irn-latn-br",
          iru: "iru-taml-in",
          "iru-mlym": "iru-mlym-in",
          irx: "irx-latn-id",
          iry: "iry-latn-ph",
          is: "is-latn-is",
          isa: "isa-latn-pg",
          isc: "isc-latn-pe",
          isd: "isd-latn-ph",
          ish: "ish-latn-ng",
          isi: "isi-latn-ng",
          isk: "isk-arab-af",
          "isk-cyrl": "isk-cyrl-tj",
          ism: "ism-latn-id",
          isn: "isn-latn-tz",
          iso: "iso-latn-ng",
          ist: "ist-latn-hr",
          isu: "isu-latn-cm",
          it: "it-latn-it",
          itb: "itb-latn-ph",
          itd: "itd-latn-id",
          ite: "ite-latn-bo",
          iti: "iti-latn-ph",
          itk: "itk-hebr-it",
          itl: "itl-cyrl-ru",
          itm: "itm-latn-ng",
          ito: "ito-latn-bo",
          itr: "itr-latn-pg",
          its: "its-latn-ng",
          itt: "itt-latn-ph",
          itv: "itv-latn-ph",
          itw: "itw-latn-ng",
          itx: "itx-latn-id",
          ity: "ity-latn-ph",
          itz: "itz-latn-gt",
          iu: "iu-cans-ca",
          ium: "ium-latn-cn",
          "ium-hani": "ium-hani-cn",
          "ium-laoo": "ium-laoo-la",
          "ium-thai": "ium-thai-th",
          ivb: "ivb-latn-ph",
          ivv: "ivv-latn-ph",
          iw: "iw-hebr-il",
          iwk: "iwk-latn-ph",
          iwm: "iwm-latn-zz",
          iwo: "iwo-latn-id",
          iws: "iws-latn-zz",
          ixc: "ixc-latn-mx",
          ixl: "ixl-latn-gt",
          iya: "iya-latn-ng",
          iyo: "iyo-latn-cm",
          iyx: "iyx-latn-cg",
          izh: "izh-latn-ru",
          izi: "izi-latn-zz",
          izr: "izr-latn-ng",
          izz: "izz-latn-ng",
          ja: "ja-jpan-jp",
          jaa: "jaa-latn-br",
          jab: "jab-latn-zz",
          jac: "jac-latn-gt",
          jad: "jad-arab-gn",
          jae: "jae-latn-pg",
          jaf: "jaf-latn-ng",
          jah: "jah-latn-my",
          jaj: "jaj-latn-sb",
          jak: "jak-latn-my",
          jal: "jal-latn-id",
          jam: "jam-latn-jm",
          jan: "jan-latn-au",
          jao: "jao-latn-au",
          jaq: "jaq-latn-id",
          jar: "jar-latn-zz",
          jas: "jas-latn-nc",
          jat: "jat-arab-af",
          jau: "jau-latn-id",
          jax: "jax-latn-id",
          jay: "jay-latn-au",
          jaz: "jaz-latn-nc",
          jbe: "jbe-hebr-il",
          jbi: "jbi-latn-au",
          jbj: "jbj-latn-id",
          jbk: "jbk-latn-pg",
          jbm: "jbm-latn-ng",
          jbn: "jbn-arab-ly",
          jbo: "jbo-latn-001",
          jbr: "jbr-latn-id",
          jbt: "jbt-latn-br",
          jbu: "jbu-latn-zz",
          jbw: "jbw-latn-au",
          jct: "jct-cyrl-ua",
          "jct-latn": "jct-latn-ua",
          jda: "jda-tibt-in",
          jdg: "jdg-arab-pk",
          jdt: "jdt-cyrl-ru",
          "jdt-hebr": "jdt-hebr-ru",
          "jdt-latn": "jdt-latn-az",
          jeb: "jeb-latn-pe",
          jee: "jee-deva-np",
          jeh: "jeh-latn-vn",
          "jeh-laoo": "jeh-laoo-la",
          jei: "jei-latn-id",
          jek: "jek-latn-ci",
          jel: "jel-latn-id",
          jen: "jen-latn-zz",
          jer: "jer-latn-ng",
          jet: "jet-latn-pg",
          jeu: "jeu-latn-td",
          jgb: "jgb-latn-cd",
          jge: "jge-geor-ge",
          "jge-hebr": "jge-hebr-il",
          jgk: "jgk-latn-zz",
          jgo: "jgo-latn-cm",
          jhi: "jhi-latn-my",
          ji: "ji-hebr-ua",
          jia: "jia-latn-cm",
          jib: "jib-latn-zz",
          jic: "jic-latn-hn",
          jid: "jid-latn-ng",
          jie: "jie-latn-ng",
          jig: "jig-latn-au",
          jil: "jil-latn-pg",
          jim: "jim-latn-cm",
          jit: "jit-latn-tz",
          jiu: "jiu-latn-cn",
          jiv: "jiv-latn-ec",
          jiy: "jiy-latn-cn",
          jje: "jje-hang-kr",
          jjr: "jjr-latn-ng",
          jka: "jka-latn-id",
          jkm: "jkm-mymr-mm",
          "jkm-brai": "jkm-brai-mm",
          "jkm-latn": "jkm-latn-mm",
          jko: "jko-latn-pg",
          jku: "jku-latn-ng",
          jle: "jle-latn-sd",
          jma: "jma-latn-pg",
          jmb: "jmb-latn-ng",
          jmc: "jmc-latn-tz",
          jmd: "jmd-latn-id",
          jmi: "jmi-latn-ng",
          jml: "jml-deva-np",
          jmn: "jmn-latn-mm",
          jmr: "jmr-latn-gh",
          jms: "jms-latn-ng",
          jmw: "jmw-latn-pg",
          jmx: "jmx-latn-mx",
          jna: "jna-takr-in",
          jnd: "jnd-arab-pk",
          jng: "jng-latn-au",
          jni: "jni-latn-ng",
          jnj: "jnj-latn-et",
          "jnj-ethi": "jnj-ethi-et",
          jnl: "jnl-deva-in",
          jns: "jns-deva-in",
          "jns-latn": "jns-latn-in",
          "jns-takr": "jns-takr-in",
          job: "job-latn-cd",
          jod: "jod-latn-ci",
          jog: "jog-arab-pk",
          jor: "jor-latn-bo",
          jow: "jow-latn-ml",
          jpa: "jpa-hebr-ps",
          jpr: "jpr-hebr-il",
          jqr: "jqr-latn-pe",
          jra: "jra-latn-zz",
          jrr: "jrr-latn-ng",
          jrt: "jrt-latn-ng",
          jru: "jru-latn-ve",
          jua: "jua-latn-br",
          jub: "jub-latn-ng",
          jud: "jud-latn-ci",
          juh: "juh-latn-ng",
          jui: "jui-latn-au",
          juk: "juk-latn-ng",
          jul: "jul-deva-np",
          jum: "jum-latn-sd",
          jun: "jun-orya-in",
          juo: "juo-latn-ng",
          jup: "jup-latn-br",
          jur: "jur-latn-br",
          jut: "jut-latn-dk",
          juu: "juu-latn-ng",
          juw: "juw-latn-ng",
          juy: "juy-orya-in",
          jv: "jv-latn-id",
          jvd: "jvd-latn-id",
          jvn: "jvn-latn-sr",
          jw: "jw-latn-id",
          jwi: "jwi-latn-gh",
          jya: "jya-tibt-cn",
          jye: "jye-hebr-il",
          jyy: "jyy-latn-td",
          ka: "ka-geor-ge",
          kaa: "kaa-cyrl-uz",
          kab: "kab-latn-dz",
          kac: "kac-latn-mm",
          kad: "kad-latn-zz",
          kag: "kag-latn-my",
          kah: "kah-latn-cf",
          kai: "kai-latn-zz",
          kaj: "kaj-latn-ng",
          kak: "kak-latn-ph",
          kam: "kam-latn-ke",
          kao: "kao-latn-ml",
          kap: "kap-cyrl-ru",
          kaq: "kaq-latn-pe",
          kav: "kav-latn-br",
          kaw: "kaw-kawi-id",
          kax: "kax-latn-id",
          kay: "kay-latn-br",
          kba: "kba-latn-au",
          kbb: "kbb-latn-br",
          kbc: "kbc-latn-br",
          kbd: "kbd-cyrl-ru",
          kbe: "kbe-latn-au",
          kbh: "kbh-latn-co",
          kbi: "kbi-latn-id",
          kbj: "kbj-latn-cd",
          kbk: "kbk-latn-pg",
          kbl: "kbl-latn-td",
          kbm: "kbm-latn-zz",
          kbn: "kbn-latn-cf",
          kbo: "kbo-latn-ss",
          kbp: "kbp-latn-zz",
          kbq: "kbq-latn-zz",
          kbr: "kbr-latn-et",
          "kbr-ethi": "kbr-ethi-et",
          kbs: "kbs-latn-ga",
          kbt: "kbt-latn-pg",
          kbu: "kbu-arab-pk",
          kbv: "kbv-latn-id",
          kbw: "kbw-latn-pg",
          kbx: "kbx-latn-zz",
          kby: "kby-arab-ne",
          kbz: "kbz-latn-ng",
          kca: "kca-cyrl-ru",
          kcb: "kcb-latn-pg",
          kcc: "kcc-latn-ng",
          kcd: "kcd-latn-id",
          kce: "kce-latn-ng",
          kcf: "kcf-latn-ng",
          kcg: "kcg-latn-ng",
          kch: "kch-latn-ng",
          kci: "kci-latn-ng",
          kcj: "kcj-latn-gw",
          kck: "kck-latn-zw",
          kcl: "kcl-latn-zz",
          kcm: "kcm-latn-cf",
          kcn: "kcn-latn-ug",
          kco: "kco-latn-pg",
          kcp: "kcp-latn-sd",
          kcq: "kcq-latn-ng",
          kcs: "kcs-latn-ng",
          kct: "kct-latn-zz",
          kcu: "kcu-latn-tz",
          kcv: "kcv-latn-cd",
          kcw: "kcw-latn-cd",
          kcz: "kcz-latn-tz",
          kda: "kda-latn-au",
          kdc: "kdc-latn-tz",
          kdd: "kdd-latn-au",
          kde: "kde-latn-tz",
          kdf: "kdf-latn-pg",
          kdg: "kdg-latn-cd",
          kdh: "kdh-latn-tg",
          kdi: "kdi-latn-ug",
          kdj: "kdj-latn-ug",
          kdk: "kdk-latn-nc",
          kdl: "kdl-latn-zz",
          kdm: "kdm-latn-ng",
          kdn: "kdn-latn-zw",
          kdp: "kdp-latn-ng",
          kdq: "kdq-beng-in",
          kdr: "kdr-latn-lt",
          "kdr-cyrl": "kdr-cyrl-ua",
          kdt: "kdt-thai-th",
          kdw: "kdw-latn-id",
          kdx: "kdx-latn-ng",
          kdy: "kdy-latn-id",
          kdz: "kdz-latn-cm",
          kea: "kea-latn-cv",
          keb: "keb-latn-ga",
          kec: "kec-latn-sd",
          ked: "ked-latn-tz",
          kee: "kee-latn-us",
          kef: "kef-latn-tg",
          keg: "keg-latn-sd",
          keh: "keh-latn-pg",
          kei: "kei-latn-id",
          kek: "kek-latn-gt",
          kel: "kel-latn-cd",
          kem: "kem-latn-tl",
          ken: "ken-latn-cm",
          keo: "keo-latn-ug",
          ker: "ker-latn-td",
          kes: "kes-latn-ng",
          ket: "ket-cyrl-ru",
          keu: "keu-latn-tg",
          kew: "kew-latn-pg",
          kex: "kex-deva-in",
          "kex-gujr": "kex-gujr-in",
          key: "key-telu-in",
          kez: "kez-latn-zz",
          kfa: "kfa-knda-in",
          kfb: "kfb-deva-in",
          kfc: "kfc-telu-in",
          kfd: "kfd-knda-in",
          kfe: "kfe-taml-in",
          kff: "kff-latn-in",
          "kff-deva": "kff-deva-in",
          "kff-orya": "kff-orya-in",
          "kff-telu": "kff-telu-in",
          kfh: "kfh-mlym-in",
          kfi: "kfi-taml-in",
          "kfi-knda": "kfi-knda-in",
          kfk: "kfk-deva-in",
          "kfk-takr": "kfk-takr-in",
          kfl: "kfl-latn-cm",
          kfm: "kfm-arab-ir",
          kfn: "kfn-latn-cm",
          kfo: "kfo-latn-ci",
          kfp: "kfp-deva-in",
          kfq: "kfq-deva-in",
          kfr: "kfr-deva-in",
          kfs: "kfs-deva-in",
          kfv: "kfv-latn-in",
          kfw: "kfw-latn-in",
          kfx: "kfx-deva-in",
          "kfx-takr": "kfx-takr-in",
          kfy: "kfy-deva-in",
          kfz: "kfz-latn-bf",
          kg: "kg-latn-cd",
          kga: "kga-latn-ci",
          kgb: "kgb-latn-id",
          kge: "kge-latn-id",
          kgf: "kgf-latn-zz",
          kgj: "kgj-deva-np",
          kgk: "kgk-latn-br",
          kgl: "kgl-latn-au",
          kgm: "kgm-latn-br",
          kgo: "kgo-latn-sd",
          kgp: "kgp-latn-br",
          kgq: "kgq-latn-id",
          kgr: "kgr-latn-id",
          kgs: "kgs-latn-au",
          kgt: "kgt-latn-ng",
          kgu: "kgu-latn-pg",
          kgv: "kgv-latn-id",
          kgw: "kgw-latn-id",
          kgx: "kgx-latn-id",
          kgy: "kgy-deva-np",
          kha: "kha-latn-in",
          khb: "khb-talu-cn",
          khc: "khc-latn-id",
          khd: "khd-latn-id",
          khe: "khe-latn-id",
          khf: "khf-thai-la",
          khg: "khg-tibt-cn",
          khh: "khh-latn-id",
          khj: "khj-latn-ng",
          khl: "khl-latn-pg",
          khn: "khn-deva-in",
          khp: "khp-latn-id",
          khq: "khq-latn-ml",
          khr: "khr-latn-in",
          "khr-deva": "khr-deva-in",
          khs: "khs-latn-zz",
          kht: "kht-mymr-in",
          khu: "khu-latn-ao",
          khv: "khv-cyrl-ru",
          khw: "khw-arab-pk",
          khx: "khx-latn-cd",
          khy: "khy-latn-cd",
          khz: "khz-latn-zz",
          ki: "ki-latn-ke",
          kia: "kia-latn-td",
          kib: "kib-latn-sd",
          kic: "kic-latn-us",
          kid: "kid-latn-cm",
          kie: "kie-latn-td",
          kif: "kif-deva-np",
          kig: "kig-latn-id",
          kih: "kih-latn-pg",
          kij: "kij-latn-zz",
          kil: "kil-latn-ng",
          kim: "kim-cyrl-ru",
          kio: "kio-latn-us",
          kip: "kip-deva-np",
          kiq: "kiq-latn-id",
          kis: "kis-latn-pg",
          kit: "kit-latn-pg",
          kiu: "kiu-latn-tr",
          kiv: "kiv-latn-tz",
          kiw: "kiw-latn-zz",
          kix: "kix-latn-in",
          kiy: "kiy-latn-id",
          kiz: "kiz-latn-tz",
          kj: "kj-latn-na",
          kja: "kja-latn-id",
          kjb: "kjb-latn-gt",
          kjc: "kjc-latn-id",
          kjd: "kjd-latn-zz",
          kje: "kje-latn-id",
          kjg: "kjg-laoo-la",
          kjh: "kjh-cyrl-ru",
          kji: "kji-latn-sb",
          kjj: "kjj-latn-az",
          kjk: "kjk-latn-id",
          kjl: "kjl-deva-np",
          kjm: "kjm-latn-vn",
          kjn: "kjn-latn-au",
          kjo: "kjo-deva-in",
          kjp: "kjp-mymr-mm",
          "kjp-thai": "kjp-thai-th",
          kjq: "kjq-latn-us",
          kjr: "kjr-latn-id",
          kjs: "kjs-latn-zz",
          kjt: "kjt-thai-th",
          kju: "kju-latn-us",
          kjx: "kjx-latn-pg",
          kjy: "kjy-latn-zz",
          kk: "kk-cyrl-kz",
          "kk-af": "kk-arab-af",
          "kk-arab": "kk-arab-cn",
          "kk-cn": "kk-arab-cn",
          "kk-ir": "kk-arab-ir",
          "kk-mn": "kk-arab-mn",
          kka: "kka-latn-ng",
          kkb: "kkb-latn-id",
          kkc: "kkc-latn-zz",
          kkd: "kkd-latn-ng",
          kke: "kke-latn-gn",
          "kke-arab": "kke-arab-gn",
          kkf: "kkf-tibt-in",
          kkg: "kkg-latn-ph",
          kkh: "kkh-lana-mm",
          kki: "kki-latn-tz",
          kkj: "kkj-latn-cm",
          kkk: "kkk-latn-sb",
          kkl: "kkl-latn-id",
          kkm: "kkm-latn-ng",
          kko: "kko-latn-sd",
          kkp: "kkp-latn-au",
          kkq: "kkq-latn-cd",
          kkr: "kkr-latn-ng",
          kks: "kks-latn-ng",
          kkt: "kkt-deva-np",
          kku: "kku-latn-ng",
          kkv: "kkv-latn-id",
          kkw: "kkw-latn-cg",
          kkx: "kkx-latn-id",
          kky: "kky-latn-au",
          kkz: "kkz-latn-ca",
          kl: "kl-latn-gl",
          kla: "kla-latn-us",
          klb: "klb-latn-mx",
          klc: "klc-latn-cm",
          kld: "kld-latn-au",
          kle: "kle-deva-np",
          klf: "klf-latn-td",
          klg: "klg-latn-ph",
          klh: "klh-latn-pg",
          kli: "kli-latn-id",
          klj: "klj-arab-ir",
          klk: "klk-latn-ng",
          kll: "kll-latn-ph",
          klm: "klm-latn-pg",
          kln: "kln-latn-ke",
          klo: "klo-latn-ng",
          klp: "klp-latn-pg",
          klq: "klq-latn-zz",
          klr: "klr-deva-np",
          kls: "kls-latn-pk",
          "kls-arab": "kls-arab-pk",
          klt: "klt-latn-zz",
          klu: "klu-latn-lr",
          klv: "klv-latn-vu",
          klw: "klw-latn-id",
          klx: "klx-latn-zz",
          kly: "kly-latn-id",
          klz: "klz-latn-id",
          km: "km-khmr-kh",
          kma: "kma-latn-gh",
          kmb: "kmb-latn-ao",
          kmc: "kmc-latn-cn",
          "kmc-hani": "kmc-hani-cn",
          kmd: "kmd-latn-ph",
          kme: "kme-latn-cm",
          kmf: "kmf-latn-pg",
          kmg: "kmg-latn-pg",
          kmh: "kmh-latn-zz",
          kmi: "kmi-latn-ng",
          kmj: "kmj-deva-in",
          kmk: "kmk-latn-ph",
          kml: "kml-latn-ph",
          kmm: "kmm-latn-in",
          kmn: "kmn-latn-pg",
          kmo: "kmo-latn-zz",
          kmp: "kmp-latn-cm",
          kmq: "kmq-latn-et",
          kms: "kms-latn-zz",
          kmt: "kmt-latn-id",
          kmu: "kmu-latn-zz",
          kmv: "kmv-latn-br",
          kmw: "kmw-latn-zz",
          kmx: "kmx-latn-pg",
          kmy: "kmy-latn-ng",
          kmz: "kmz-arab-ir",
          kn: "kn-knda-in",
          kna: "kna-latn-ng",
          knb: "knb-latn-ph",
          knd: "knd-latn-id",
          kne: "kne-latn-ph",
          knf: "knf-latn-gw",
          kni: "kni-latn-ng",
          knj: "knj-latn-gt",
          knk: "knk-latn-sl",
          "knk-arab": "knk-arab-sl",
          knl: "knl-latn-id",
          knm: "knm-latn-br",
          kno: "kno-latn-sl",
          knp: "knp-latn-zz",
          knq: "knq-latn-my",
          knr: "knr-latn-pg",
          kns: "kns-latn-my",
          "kns-thai": "kns-thai-th",
          knt: "knt-latn-br",
          knu: "knu-latn-gn",
          knv: "knv-latn-pg",
          knw: "knw-latn-na",
          knx: "knx-latn-id",
          kny: "kny-latn-cd",
          knz: "knz-latn-bf",
          ko: "ko-kore-kr",
          koa: "koa-latn-pg",
          koc: "koc-latn-ng",
          kod: "kod-latn-id",
          koe: "koe-latn-ss",
          kof: "kof-latn-ng",
          kog: "kog-latn-co",
          koh: "koh-latn-cg",
          koi: "koi-cyrl-ru",
          kok: "kok-deva-in",
          kol: "kol-latn-zz",
          koo: "koo-latn-ug",
          kop: "kop-latn-pg",
          koq: "koq-latn-ga",
          kos: "kos-latn-fm",
          kot: "kot-latn-cm",
          kou: "kou-latn-td",
          kov: "kov-latn-ng",
          kow: "kow-latn-ng",
          koy: "koy-latn-us",
          koz: "koz-latn-zz",
          kpa: "kpa-latn-ng",
          kpc: "kpc-latn-co",
          kpd: "kpd-latn-id",
          kpe: "kpe-latn-lr",
          kpf: "kpf-latn-zz",
          kpg: "kpg-latn-fm",
          kph: "kph-latn-gh",
          kpi: "kpi-latn-id",
          kpj: "kpj-latn-br",
          kpk: "kpk-latn-ng",
          kpl: "kpl-latn-cd",
          kpm: "kpm-latn-vn",
          kpn: "kpn-latn-br",
          kpo: "kpo-latn-zz",
          kpq: "kpq-latn-id",
          kpr: "kpr-latn-zz",
          kps: "kps-latn-id",
          kpt: "kpt-cyrl-ru",
          kpu: "kpu-latn-id",
          kpw: "kpw-latn-pg",
          kpx: "kpx-latn-zz",
          kpy: "kpy-cyrl-ru",
          kpz: "kpz-latn-ug",
          kqa: "kqa-latn-pg",
          kqb: "kqb-latn-zz",
          kqc: "kqc-latn-pg",
          kqd: "kqd-syrc-iq",
          kqe: "kqe-latn-ph",
          kqf: "kqf-latn-zz",
          kqg: "kqg-latn-bf",
          kqh: "kqh-latn-tz",
          kqi: "kqi-latn-pg",
          kqj: "kqj-latn-pg",
          kqk: "kqk-latn-bj",
          kql: "kql-latn-pg",
          kqm: "kqm-latn-ci",
          kqn: "kqn-latn-zm",
          kqo: "kqo-latn-lr",
          kqp: "kqp-latn-td",
          kqq: "kqq-latn-br",
          kqr: "kqr-latn-my",
          kqs: "kqs-latn-zz",
          kqt: "kqt-latn-my",
          kqu: "kqu-latn-za",
          kqv: "kqv-latn-id",
          kqw: "kqw-latn-pg",
          kqx: "kqx-latn-cm",
          kqy: "kqy-ethi-zz",
          kqz: "kqz-latn-za",
          kr: "kr-latn-zz",
          kra: "kra-deva-np",
          krb: "krb-latn-us",
          krc: "krc-cyrl-ru",
          krd: "krd-latn-tl",
          kre: "kre-latn-br",
          krf: "krf-latn-vu",
          krh: "krh-latn-ng",
          kri: "kri-latn-sl",
          krj: "krj-latn-ph",
          krk: "krk-cyrl-ru",
          krl: "krl-latn-ru",
          krn: "krn-latn-lr",
          krp: "krp-latn-ng",
          krr: "krr-khmr-kh",
          krs: "krs-latn-zz",
          krt: "krt-latn-ne",
          kru: "kru-deva-in",
          krv: "krv-khmr-kh",
          krw: "krw-latn-lr",
          krx: "krx-latn-sn",
          kry: "kry-latn-az",
          krz: "krz-latn-id",
          ks: "ks-arab-in",
          ksa: "ksa-latn-ng",
          ksb: "ksb-latn-tz",
          ksc: "ksc-latn-ph",
          ksd: "ksd-latn-zz",
          kse: "kse-latn-pg",
          ksf: "ksf-latn-cm",
          ksg: "ksg-latn-sb",
          ksh: "ksh-latn-de",
          ksi: "ksi-latn-pg",
          ksj: "ksj-latn-zz",
          ksk: "ksk-latn-us",
          ksl: "ksl-latn-pg",
          ksm: "ksm-latn-ng",
          ksn: "ksn-latn-ph",
          kso: "kso-latn-ng",
          ksp: "ksp-latn-cf",
          ksq: "ksq-latn-ng",
          ksr: "ksr-latn-zz",
          kss: "kss-latn-lr",
          kst: "kst-latn-bf",
          ksu: "ksu-mymr-in",
          ksv: "ksv-latn-cd",
          ksw: "ksw-mymr-mm",
          "ksw-latn": "ksw-latn-mm",
          ksx: "ksx-latn-id",
          ksz: "ksz-deva-in",
          kta: "kta-latn-vn",
          ktb: "ktb-ethi-zz",
          ktc: "ktc-latn-ng",
          ktd: "ktd-latn-au",
          ktf: "ktf-latn-cd",
          ktg: "ktg-latn-au",
          kth: "kth-latn-td",
          kti: "kti-latn-id",
          ktj: "ktj-latn-ci",
          ktk: "ktk-latn-pg",
          ktl: "ktl-arab-ir",
          ktm: "ktm-latn-zz",
          ktn: "ktn-latn-br",
          kto: "kto-latn-zz",
          ktp: "ktp-plrd-cn",
          ktq: "ktq-latn-ph",
          ktr: "ktr-latn-my",
          kts: "kts-latn-id",
          ktt: "ktt-latn-id",
          ktu: "ktu-latn-cd",
          ktv: "ktv-latn-vn",
          ktw: "ktw-latn-us",
          ktx: "ktx-latn-br",
          kty: "kty-latn-cd",
          ktz: "ktz-latn-na",
          ku: "ku-latn-tr",
          "ku-arab": "ku-arab-iq",
          "ku-lb": "ku-arab-lb",
          "ku-yezi": "ku-yezi-ge",
          kub: "kub-latn-zz",
          kuc: "kuc-latn-id",
          kud: "kud-latn-zz",
          kue: "kue-latn-zz",
          kuf: "kuf-laoo-la",
          kug: "kug-latn-ng",
          kuh: "kuh-latn-ng",
          kui: "kui-latn-br",
          kuj: "kuj-latn-zz",
          kuk: "kuk-latn-id",
          kul: "kul-latn-ng",
          kum: "kum-cyrl-ru",
          kun: "kun-latn-zz",
          kuo: "kuo-latn-pg",
          kup: "kup-latn-zz",
          kuq: "kuq-latn-br",
          kus: "kus-latn-zz",
          kut: "kut-latn-ca",
          kuu: "kuu-latn-us",
          kuv: "kuv-latn-id",
          kuw: "kuw-latn-cf",
          kux: "kux-latn-au",
          kuy: "kuy-latn-au",
          kuz: "kuz-latn-cl",
          kv: "kv-cyrl-ru",
          kva: "kva-cyrl-ru",
          kvb: "kvb-latn-id",
          kvc: "kvc-latn-pg",
          kvd: "kvd-latn-id",
          kve: "kve-latn-my",
          kvf: "kvf-latn-td",
          kvg: "kvg-latn-zz",
          kvh: "kvh-latn-id",
          kvi: "kvi-latn-td",
          kvj: "kvj-latn-cm",
          kvl: "kvl-latn-mm",
          kvm: "kvm-latn-cm",
          kvn: "kvn-latn-co",
          kvo: "kvo-latn-id",
          kvp: "kvp-latn-id",
          kvq: "kvq-mymr-mm",
          "kvq-latn": "kvq-latn-mm",
          kvr: "kvr-latn-id",
          kvt: "kvt-mymr-mm",
          kvv: "kvv-latn-id",
          kvw: "kvw-latn-id",
          kvx: "kvx-arab-pk",
          kvy: "kvy-kali-mm",
          kvz: "kvz-latn-id",
          kw: "kw-latn-gb",
          kwa: "kwa-latn-br",
          kwb: "kwb-latn-ng",
          kwc: "kwc-latn-cg",
          kwd: "kwd-latn-sb",
          kwe: "kwe-latn-id",
          kwf: "kwf-latn-sb",
          kwg: "kwg-latn-td",
          kwh: "kwh-latn-id",
          kwi: "kwi-latn-co",
          kwj: "kwj-latn-zz",
          kwk: "kwk-latn-ca",
          kwl: "kwl-latn-ng",
          kwm: "kwm-latn-na",
          kwn: "kwn-latn-na",
          kwo: "kwo-latn-zz",
          kwp: "kwp-latn-ci",
          kwq: "kwq-latn-zz",
          kwr: "kwr-latn-id",
          kws: "kws-latn-cd",
          kwt: "kwt-latn-id",
          kwu: "kwu-latn-cm",
          kwv: "kwv-latn-td",
          kww: "kww-latn-sr",
          kwy: "kwy-latn-cd",
          kwz: "kwz-latn-ao",
          kxa: "kxa-latn-zz",
          kxb: "kxb-latn-ci",
          kxc: "kxc-ethi-zz",
          kxd: "kxd-latn-bn",
          "kxd-arab": "kxd-arab-bn",
          kxe: "kxe-latn-zz",
          kxf: "kxf-mymr-mm",
          "kxf-latn": "kxf-latn-mm",
          kxi: "kxi-latn-my",
          kxj: "kxj-latn-td",
          kxk: "kxk-mymr-mm",
          kxl: "kxl-deva-in",
          kxm: "kxm-thai-th",
          kxn: "kxn-latn-my",
          kxo: "kxo-latn-br",
          kxp: "kxp-arab-pk",
          kxq: "kxq-latn-id",
          kxr: "kxr-latn-pg",
          kxt: "kxt-latn-pg",
          kxv: "kxv-orya-in",
          "kxv-latn": "kxv-latn-in",
          "kxv-telu": "kxv-telu-in",
          kxw: "kxw-latn-zz",
          kxx: "kxx-latn-cg",
          kxy: "kxy-latn-vn",
          kxz: "kxz-latn-zz",
          ky: "ky-cyrl-kg",
          "ky-arab": "ky-arab-cn",
          "ky-cn": "ky-arab-cn",
          "ky-latn": "ky-latn-tr",
          "ky-tr": "ky-latn-tr",
          kya: "kya-latn-tz",
          kyb: "kyb-latn-ph",
          kyc: "kyc-latn-pg",
          kyd: "kyd-latn-id",
          kye: "kye-latn-zz",
          kyf: "kyf-latn-ci",
          kyg: "kyg-latn-pg",
          kyh: "kyh-latn-us",
          kyi: "kyi-latn-my",
          kyj: "kyj-latn-ph",
          kyk: "kyk-latn-ph",
          kyl: "kyl-latn-us",
          kym: "kym-latn-cf",
          kyn: "kyn-latn-ph",
          kyo: "kyo-latn-id",
          kyq: "kyq-latn-td",
          kyr: "kyr-latn-br",
          kys: "kys-latn-my",
          kyt: "kyt-latn-id",
          kyu: "kyu-kali-mm",
          "kyu-latn": "kyu-latn-mm",
          "kyu-mymr": "kyu-mymr-mm",
          kyv: "kyv-deva-np",
          kyw: "kyw-deva-in",
          "kyw-beng": "kyw-beng-in",
          "kyw-orya": "kyw-orya-in",
          kyx: "kyx-latn-zz",
          kyy: "kyy-latn-pg",
          kyz: "kyz-latn-br",
          kza: "kza-latn-bf",
          kzb: "kzb-latn-id",
          kzc: "kzc-latn-ci",
          kzd: "kzd-latn-id",
          kze: "kze-latn-pg",
          kzf: "kzf-latn-id",
          kzh: "kzh-arab-zz",
          kzi: "kzi-latn-my",
          kzj: "kzj-latn-my",
          kzk: "kzk-latn-sb",
          kzl: "kzl-latn-id",
          kzm: "kzm-latn-id",
          kzn: "kzn-latn-mw",
          kzo: "kzo-latn-ga",
          kzp: "kzp-latn-id",
          kzr: "kzr-latn-zz",
          kzs: "kzs-latn-my",
          kzt: "kzt-latn-my",
          kzu: "kzu-latn-id",
          kzv: "kzv-latn-id",
          kzw: "kzw-latn-br",
          kzx: "kzx-latn-id",
          kzy: "kzy-latn-cd",
          kzz: "kzz-latn-id",
          la: "la-latn-va",
          laa: "laa-latn-ph",
          lab: "lab-lina-gr",
          lac: "lac-latn-mx",
          lad: "lad-hebr-il",
          lae: "lae-deva-in",
          "lae-tibt": "lae-tibt-in",
          lag: "lag-latn-tz",
          lah: "lah-arab-pk",
          lai: "lai-latn-mw",
          laj: "laj-latn-ug",
          lal: "lal-latn-cd",
          lam: "lam-latn-zm",
          lan: "lan-latn-ng",
          lap: "lap-latn-td",
          laq: "laq-latn-vn",
          lar: "lar-latn-gh",
          las: "las-latn-zz",
          lau: "lau-latn-id",
          law: "law-latn-id",
          lax: "lax-latn-in",
          "lax-beng": "lax-beng-in",
          laz: "laz-latn-pg",
          lb: "lb-latn-lu",
          lbb: "lbb-latn-pg",
          lbc: "lbc-lisu-cn",
          lbe: "lbe-cyrl-ru",
          lbf: "lbf-deva-in",
          "lbf-tibt": "lbf-tibt-cn",
          lbi: "lbi-latn-cm",
          lbj: "lbj-tibt-in",
          "lbj-arab": "lbj-arab-in",
          lbl: "lbl-latn-ph",
          lbm: "lbm-deva-in",
          lbn: "lbn-latn-la",
          "lbn-laoo": "lbn-laoo-la",
          lbo: "lbo-laoo-la",
          "lbo-latn": "lbo-latn-us",
          lbq: "lbq-latn-pg",
          lbr: "lbr-deva-np",
          lbt: "lbt-latn-vn",
          lbu: "lbu-latn-zz",
          lbv: "lbv-latn-pg",
          lbw: "lbw-latn-id",
          lbx: "lbx-latn-id",
          lby: "lby-latn-au",
          lbz: "lbz-latn-au",
          lcc: "lcc-latn-id",
          lcd: "lcd-latn-id",
          lce: "lce-latn-id",
          lcf: "lcf-latn-id",
          lch: "lch-latn-ao",
          lcl: "lcl-latn-id",
          lcm: "lcm-latn-zz",
          lcp: "lcp-thai-cn",
          lcq: "lcq-latn-id",
          lcs: "lcs-latn-id",
          lda: "lda-latn-ci",
          ldb: "ldb-latn-zz",
          ldd: "ldd-latn-ng",
          ldg: "ldg-latn-ng",
          ldh: "ldh-latn-ng",
          ldi: "ldi-latn-cg",
          ldj: "ldj-latn-ng",
          ldk: "ldk-latn-ng",
          ldl: "ldl-latn-ng",
          ldm: "ldm-latn-gn",
          ldn: "ldn-latn-001",
          ldo: "ldo-latn-ng",
          ldp: "ldp-latn-ng",
          ldq: "ldq-latn-ng",
          lea: "lea-latn-cd",
          leb: "leb-latn-zm",
          lec: "lec-latn-bo",
          led: "led-latn-zz",
          lee: "lee-latn-zz",
          lef: "lef-latn-gh",
          leh: "leh-latn-zm",
          lei: "lei-latn-pg",
          lej: "lej-latn-cd",
          lek: "lek-latn-pg",
          lel: "lel-latn-cd",
          lem: "lem-latn-zz",
          len: "len-latn-hn",
          leo: "leo-latn-cm",
          lep: "lep-lepc-in",
          leq: "leq-latn-zz",
          ler: "ler-latn-pg",
          les: "les-latn-cd",
          let: "let-latn-pg",
          leu: "leu-latn-zz",
          lev: "lev-latn-id",
          lew: "lew-latn-id",
          lex: "lex-latn-id",
          ley: "ley-latn-id",
          lez: "lez-cyrl-ru",
          lfa: "lfa-latn-cm",
          lfn: "lfn-latn-001",
          "lfn-cyrl": "lfn-cyrl-001",
          lg: "lg-latn-ug",
          lga: "lga-latn-sb",
          lgb: "lgb-latn-sb",
          lgg: "lgg-latn-zz",
          lgh: "lgh-latn-vn",
          lgi: "lgi-latn-id",
          lgk: "lgk-latn-vu",
          lgl: "lgl-latn-sb",
          lgm: "lgm-latn-cd",
          lgn: "lgn-latn-et",
          lgo: "lgo-latn-ss",
          lgq: "lgq-latn-gh",
          lgr: "lgr-latn-sb",
          lgt: "lgt-latn-pg",
          lgu: "lgu-latn-sb",
          lgz: "lgz-latn-cd",
          lha: "lha-latn-vn",
          lhh: "lhh-latn-id",
          lhi: "lhi-latn-cn",
          lhm: "lhm-deva-np",
          lhn: "lhn-latn-my",
          lhs: "lhs-syrc-sy",
          lht: "lht-latn-vu",
          lhu: "lhu-latn-cn",
          li: "li-latn-nl",
          lia: "lia-latn-zz",
          lib: "lib-latn-pg",
          lic: "lic-latn-cn",
          lid: "lid-latn-zz",
          lie: "lie-latn-cd",
          lif: "lif-deva-np",
          "lif-limb": "lif-limb-in",
          lig: "lig-latn-zz",
          lih: "lih-latn-zz",
          lij: "lij-latn-it",
          lik: "lik-latn-cd",
          lil: "lil-latn-ca",
          lio: "lio-latn-id",
          lip: "lip-latn-gh",
          liq: "liq-latn-et",
          lir: "lir-latn-lr",
          lis: "lis-lisu-cn",
          liu: "liu-latn-sd",
          liv: "liv-latn-lv",
          liw: "liw-latn-id",
          lix: "lix-latn-id",
          liy: "liy-latn-cf",
          liz: "liz-latn-cd",
          lja: "lja-latn-au",
          lje: "lje-latn-id",
          lji: "lji-latn-id",
          ljl: "ljl-latn-id",
          ljp: "ljp-latn-id",
          ljw: "ljw-latn-au",
          ljx: "ljx-latn-au",
          lka: "lka-latn-tl",
          lkb: "lkb-latn-ke",
          lkc: "lkc-latn-vn",
          lkd: "lkd-latn-br",
          lke: "lke-latn-ug",
          lkh: "lkh-tibt-bt",
          lki: "lki-arab-ir",
          lkj: "lkj-latn-my",
          lkl: "lkl-latn-pg",
          lkm: "lkm-latn-au",
          lkn: "lkn-latn-vu",
          lko: "lko-latn-ke",
          lkr: "lkr-latn-ss",
          lks: "lks-latn-ke",
          lkt: "lkt-latn-us",
          lku: "lku-latn-au",
          lky: "lky-latn-ss",
          lla: "lla-latn-ng",
          llb: "llb-latn-mz",
          llc: "llc-latn-gn",
          lld: "lld-latn-it",
          lle: "lle-latn-zz",
          llf: "llf-latn-pg",
          llg: "llg-latn-id",
          lli: "lli-latn-cg",
          llj: "llj-latn-au",
          llk: "llk-latn-my",
          lll: "lll-latn-pg",
          llm: "llm-latn-id",
          lln: "lln-latn-zz",
          llp: "llp-latn-vu",
          llq: "llq-latn-id",
          llu: "llu-latn-sb",
          llx: "llx-latn-fj",
          lma: "lma-latn-gn",
          lmb: "lmb-latn-vu",
          lmc: "lmc-latn-au",
          lmd: "lmd-latn-sd",
          lme: "lme-latn-td",
          lmf: "lmf-latn-id",
          lmg: "lmg-latn-pg",
          lmh: "lmh-deva-np",
          lmi: "lmi-latn-cd",
          lmj: "lmj-latn-id",
          lmk: "lmk-latn-in",
          "lmk-mymr": "lmk-mymr-in",
          lml: "lml-latn-vu",
          lmn: "lmn-telu-in",
          lmo: "lmo-latn-it",
          lmp: "lmp-latn-zz",
          lmq: "lmq-latn-id",
          lmr: "lmr-latn-id",
          lmu: "lmu-latn-vu",
          lmv: "lmv-latn-fj",
          lmw: "lmw-latn-us",
          lmx: "lmx-latn-cm",
          lmy: "lmy-latn-id",
          ln: "ln-latn-cd",
          lna: "lna-latn-cf",
          lnb: "lnb-latn-na",
          lnd: "lnd-latn-id",
          lnh: "lnh-latn-my",
          lni: "lni-latn-pg",
          lnj: "lnj-latn-au",
          lnl: "lnl-latn-cf",
          lnm: "lnm-latn-pg",
          lnn: "lnn-latn-vu",
          lns: "lns-latn-zz",
          lnu: "lnu-latn-zz",
          lnw: "lnw-latn-au",
          lnz: "lnz-latn-cd",
          lo: "lo-laoo-la",
          loa: "loa-latn-id",
          lob: "lob-latn-bf",
          loc: "loc-latn-ph",
          loe: "loe-latn-id",
          log: "log-latn-cd",
          loh: "loh-latn-ss",
          loi: "loi-latn-ci",
          loj: "loj-latn-zz",
          lok: "lok-latn-zz",
          lol: "lol-latn-cd",
          lom: "lom-latn-lr",
          lon: "lon-latn-mw",
          loo: "loo-latn-cd",
          lop: "lop-latn-ng",
          loq: "loq-latn-cd",
          lor: "lor-latn-zz",
          los: "los-latn-zz",
          lot: "lot-latn-ss",
          "lot-arab": "lot-arab-ss",
          lou: "lou-latn-us",
          low: "low-latn-my",
          lox: "lox-latn-id",
          loy: "loy-deva-np",
          "loy-tibt": "loy-tibt-np",
          loz: "loz-latn-zm",
          lpa: "lpa-latn-vu",
          lpe: "lpe-latn-id",
          lpn: "lpn-latn-mm",
          lpo: "lpo-plrd-cn",
          "lpo-lisu": "lpo-lisu-cn",
          lpx: "lpx-latn-ss",
          lqr: "lqr-latn-ss",
          lra: "lra-latn-my",
          lrc: "lrc-arab-ir",
          lrg: "lrg-latn-au",
          lri: "lri-latn-ke",
          lrk: "lrk-arab-pk",
          lrl: "lrl-arab-ir",
          lrm: "lrm-latn-ke",
          lrn: "lrn-latn-id",
          lro: "lro-latn-sd",
          lrt: "lrt-latn-id",
          lrv: "lrv-latn-vu",
          lrz: "lrz-latn-vu",
          lsa: "lsa-arab-ir",
          lsd: "lsd-hebr-il",
          lse: "lse-latn-cd",
          lsi: "lsi-latn-mm",
          lsm: "lsm-latn-ug",
          lsr: "lsr-latn-pg",
          lss: "lss-arab-pk",
          lt: "lt-latn-lt",
          ltg: "ltg-latn-lv",
          lth: "lth-latn-ug",
          lti: "lti-latn-id",
          ltn: "ltn-latn-br",
          lto: "lto-latn-ke",
          lts: "lts-latn-ke",
          ltu: "ltu-latn-id",
          lu: "lu-latn-cd",
          lua: "lua-latn-cd",
          luc: "luc-latn-ug",
          lud: "lud-latn-ru",
          lue: "lue-latn-zm",
          luf: "luf-latn-pg",
          lui: "lui-latn-us",
          luj: "luj-latn-cd",
          luk: "luk-tibt-bt",
          lul: "lul-latn-ss",
          lum: "lum-latn-ao",
          lun: "lun-latn-zm",
          luo: "luo-latn-ke",
          lup: "lup-latn-ga",
          luq: "luq-latn-cu",
          lur: "lur-latn-id",
          lus: "lus-latn-in",
          "lus-beng": "lus-beng-bd",
          "lus-brai": "lus-brai-in",
          lut: "lut-latn-us",
          luu: "luu-deva-np",
          luv: "luv-arab-om",
          luw: "luw-latn-cm",
          luy: "luy-latn-ke",
          luz: "luz-arab-ir",
          lv: "lv-latn-lv",
          lva: "lva-latn-tl",
          lvi: "lvi-latn-la",
          lvk: "lvk-latn-sb",
          lvu: "lvu-latn-id",
          lwa: "lwa-latn-cd",
          lwe: "lwe-latn-id",
          lwg: "lwg-latn-ke",
          lwh: "lwh-latn-vn",
          lwl: "lwl-thai-th",
          lwm: "lwm-thai-cn",
          lwo: "lwo-latn-ss",
          "lwo-za": "lwo-latn-za",
          lwt: "lwt-latn-id",
          lww: "lww-latn-vu",
          lxm: "lxm-latn-pg",
          lya: "lya-tibt-bt",
          lyn: "lyn-latn-zm",
          lzh: "lzh-hans-cn",
          lzl: "lzl-latn-vu",
          lzn: "lzn-latn-mm",
          lzz: "lzz-latn-tr",
          maa: "maa-latn-mx",
          mab: "mab-latn-mx",
          mad: "mad-latn-id",
          mae: "mae-latn-ng",
          maf: "maf-latn-cm",
          mag: "mag-deva-in",
          mai: "mai-deva-in",
          maj: "maj-latn-mx",
          mak: "mak-latn-id",
          mam: "mam-latn-gt",
          man: "man-latn-gm",
          "man-gn": "man-nkoo-gn",
          "man-nkoo": "man-nkoo-gn",
          maq: "maq-latn-mx",
          mas: "mas-latn-ke",
          mat: "mat-latn-mx",
          mau: "mau-latn-mx",
          mav: "mav-latn-br",
          maw: "maw-latn-zz",
          max: "max-latn-id",
          maz: "maz-latn-mx",
          mba: "mba-latn-ph",
          mbb: "mbb-latn-ph",
          mbc: "mbc-latn-br",
          mbd: "mbd-latn-ph",
          mbf: "mbf-latn-sg",
          mbh: "mbh-latn-zz",
          mbi: "mbi-latn-ph",
          mbj: "mbj-latn-br",
          mbk: "mbk-latn-pg",
          mbl: "mbl-latn-br",
          mbm: "mbm-latn-cg",
          mbn: "mbn-latn-co",
          mbo: "mbo-latn-zz",
          mbp: "mbp-latn-co",
          mbq: "mbq-latn-zz",
          mbr: "mbr-latn-co",
          mbs: "mbs-latn-ph",
          mbt: "mbt-latn-ph",
          mbu: "mbu-latn-zz",
          mbv: "mbv-latn-gn",
          mbw: "mbw-latn-zz",
          mbx: "mbx-latn-pg",
          mby: "mby-arab-pk",
          mbz: "mbz-latn-mx",
          mca: "mca-latn-py",
          mcb: "mcb-latn-pe",
          mcc: "mcc-latn-pg",
          mcd: "mcd-latn-pe",
          mce: "mce-latn-mx",
          mcf: "mcf-latn-pe",
          mcg: "mcg-latn-ve",
          mch: "mch-latn-ve",
          mci: "mci-latn-zz",
          mcj: "mcj-latn-ng",
          mck: "mck-latn-ao",
          mcl: "mcl-latn-co",
          mcm: "mcm-latn-my",
          mcn: "mcn-latn-td",
          mco: "mco-latn-mx",
          mcp: "mcp-latn-zz",
          mcq: "mcq-latn-zz",
          mcr: "mcr-latn-zz",
          mcs: "mcs-latn-cm",
          mct: "mct-latn-cm",
          mcu: "mcu-latn-zz",
          mcv: "mcv-latn-pg",
          mcw: "mcw-latn-td",
          mcx: "mcx-latn-cf",
          mcy: "mcy-latn-pg",
          mcz: "mcz-latn-pg",
          mda: "mda-latn-zz",
          mdb: "mdb-latn-pg",
          mdc: "mdc-latn-pg",
          mdd: "mdd-latn-cm",
          mde: "mde-arab-zz",
          mdf: "mdf-cyrl-ru",
          mdg: "mdg-latn-td",
          mdh: "mdh-latn-ph",
          mdi: "mdi-latn-cd",
          mdj: "mdj-latn-zz",
          mdk: "mdk-latn-cd",
          mdm: "mdm-latn-cd",
          mdn: "mdn-latn-cf",
          mdp: "mdp-latn-cd",
          mdq: "mdq-latn-cd",
          mdr: "mdr-latn-id",
          mds: "mds-latn-pg",
          mdt: "mdt-latn-cg",
          mdu: "mdu-latn-cg",
          mdv: "mdv-latn-mx",
          mdw: "mdw-latn-cg",
          mdx: "mdx-ethi-zz",
          mdy: "mdy-ethi-et",
          "mdy-latn": "mdy-latn-et",
          mdz: "mdz-latn-br",
          mea: "mea-latn-cm",
          meb: "meb-latn-pg",
          mec: "mec-latn-au",
          med: "med-latn-zz",
          mee: "mee-latn-zz",
          meh: "meh-latn-mx",
          mej: "mej-latn-id",
          mek: "mek-latn-zz",
          mel: "mel-latn-my",
          mem: "mem-latn-au",
          men: "men-latn-sl",
          meo: "meo-latn-my",
          "meo-arab": "meo-arab-my",
          mep: "mep-latn-au",
          meq: "meq-latn-cm",
          mer: "mer-latn-ke",
          mes: "mes-latn-td",
          met: "met-latn-zz",
          meu: "meu-latn-zz",
          mev: "mev-latn-lr",
          mew: "mew-latn-ng",
          mey: "mey-latn-mr",
          "mey-arab": "mey-arab-mr",
          mez: "mez-latn-us",
          mfa: "mfa-arab-th",
          mfb: "mfb-latn-id",
          mfc: "mfc-latn-cd",
          mfd: "mfd-latn-cm",
          mfe: "mfe-latn-mu",
          mff: "mff-latn-cm",
          mfg: "mfg-latn-gn",
          "mfg-arab": "mfg-arab-gn",
          mfh: "mfh-latn-cm",
          mfi: "mfi-arab-cm",
          "mfi-latn": "mfi-latn-cm",
          mfj: "mfj-latn-cm",
          mfk: "mfk-latn-cm",
          mfl: "mfl-latn-ng",
          mfm: "mfm-latn-ng",
          mfn: "mfn-latn-zz",
          mfo: "mfo-latn-zz",
          mfp: "mfp-latn-id",
          mfq: "mfq-latn-zz",
          mfr: "mfr-latn-au",
          mft: "mft-latn-pg",
          mfu: "mfu-latn-ao",
          mfv: "mfv-latn-gw",
          mfw: "mfw-latn-pg",
          mfx: "mfx-latn-et",
          "mfx-ethi": "mfx-ethi-et",
          mfy: "mfy-latn-mx",
          mfz: "mfz-latn-ss",
          mg: "mg-latn-mg",
          mgb: "mgb-latn-td",
          mgc: "mgc-latn-ss",
          mgd: "mgd-latn-ss",
          "mgd-arab": "mgd-arab-ss",
          mge: "mge-latn-td",
          mgf: "mgf-latn-id",
          mgg: "mgg-latn-cm",
          mgh: "mgh-latn-mz",
          mgi: "mgi-latn-ng",
          mgj: "mgj-latn-ng",
          mgk: "mgk-latn-id",
          mgl: "mgl-latn-zz",
          mgm: "mgm-latn-tl",
          mgn: "mgn-latn-cf",
          mgo: "mgo-latn-cm",
          mgp: "mgp-deva-np",
          mgq: "mgq-latn-tz",
          mgr: "mgr-latn-zm",
          mgs: "mgs-latn-tz",
          mgt: "mgt-latn-pg",
          mgu: "mgu-latn-pg",
          mgv: "mgv-latn-tz",
          mgw: "mgw-latn-tz",
          mgy: "mgy-latn-tz",
          mgz: "mgz-latn-tz",
          mh: "mh-latn-mh",
          mhb: "mhb-latn-ga",
          mhc: "mhc-latn-mx",
          mhd: "mhd-latn-tz",
          mhe: "mhe-latn-my",
          mhf: "mhf-latn-pg",
          mhg: "mhg-latn-au",
          mhi: "mhi-latn-zz",
          mhj: "mhj-arab-af",
          mhk: "mhk-latn-cm",
          mhl: "mhl-latn-zz",
          mhm: "mhm-latn-mz",
          mhn: "mhn-latn-it",
          mho: "mho-latn-zm",
          mhp: "mhp-latn-id",
          mhq: "mhq-latn-us",
          mhs: "mhs-latn-id",
          mht: "mht-latn-ve",
          mhu: "mhu-latn-in",
          mhw: "mhw-latn-bw",
          mhx: "mhx-latn-mm",
          mhy: "mhy-latn-id",
          mhz: "mhz-latn-id",
          mi: "mi-latn-nz",
          mia: "mia-latn-us",
          mib: "mib-latn-mx",
          mic: "mic-latn-ca",
          mid: "mid-mand-iq",
          mie: "mie-latn-mx",
          mif: "mif-latn-zz",
          mig: "mig-latn-mx",
          mih: "mih-latn-mx",
          mii: "mii-latn-mx",
          mij: "mij-latn-cm",
          mik: "mik-latn-us",
          mil: "mil-latn-mx",
          mim: "mim-latn-mx",
          min: "min-latn-id",
          mio: "mio-latn-mx",
          mip: "mip-latn-mx",
          miq: "miq-latn-ni",
          mir: "mir-latn-mx",
          mit: "mit-latn-mx",
          miu: "miu-latn-mx",
          miw: "miw-latn-zz",
          mix: "mix-latn-mx",
          miy: "miy-latn-mx",
          miz: "miz-latn-mx",
          mjb: "mjb-latn-tl",
          mjc: "mjc-latn-mx",
          mjd: "mjd-latn-us",
          mje: "mje-latn-td",
          mjg: "mjg-latn-cn",
          mjh: "mjh-latn-tz",
          mji: "mji-latn-cn",
          mjj: "mjj-latn-pg",
          mjk: "mjk-latn-pg",
          mjl: "mjl-deva-in",
          "mjl-takr": "mjl-takr-in",
          mjm: "mjm-latn-pg",
          mjn: "mjn-latn-pg",
          mjq: "mjq-mlym-in",
          mjr: "mjr-mlym-in",
          mjs: "mjs-latn-ng",
          mjt: "mjt-deva-in",
          "mjt-beng": "mjt-beng-bd",
          mju: "mju-telu-in",
          mjv: "mjv-mlym-in",
          mjw: "mjw-latn-in",
          mjx: "mjx-latn-bd",
          "mjx-beng": "mjx-beng-bd",
          mjy: "mjy-latn-us",
          mjz: "mjz-deva-np",
          mk: "mk-cyrl-mk",
          mka: "mka-latn-ci",
          mkb: "mkb-deva-in",
          mkc: "mkc-latn-pg",
          mke: "mke-deva-in",
          mkf: "mkf-latn-ng",
          mki: "mki-arab-zz",
          mkj: "mkj-latn-fm",
          mkk: "mkk-latn-cm",
          mkl: "mkl-latn-zz",
          mkm: "mkm-thai-th",
          mkn: "mkn-latn-id",
          mko: "mko-latn-ng",
          mkp: "mkp-latn-zz",
          mkr: "mkr-latn-pg",
          mks: "mks-latn-mx",
          mkt: "mkt-latn-nc",
          mku: "mku-latn-gn",
          mkv: "mkv-latn-vu",
          mkw: "mkw-latn-zz",
          mkx: "mkx-latn-ph",
          mky: "mky-latn-id",
          mkz: "mkz-latn-tl",
          ml: "ml-mlym-in",
          mla: "mla-latn-vu",
          mlb: "mlb-latn-cm",
          mlc: "mlc-latn-vn",
          mle: "mle-latn-zz",
          mlf: "mlf-thai-la",
          "mlf-latn": "mlf-latn-la",
          mlh: "mlh-latn-pg",
          mli: "mli-latn-id",
          mlj: "mlj-latn-td",
          mlk: "mlk-latn-ke",
          mll: "mll-latn-vu",
          mln: "mln-latn-sb",
          mlo: "mlo-latn-sn",
          mlp: "mlp-latn-zz",
          mlq: "mlq-latn-sn",
          "mlq-arab": "mlq-arab-sn",
          mlr: "mlr-latn-cm",
          mls: "mls-latn-sd",
          mlu: "mlu-latn-sb",
          mlv: "mlv-latn-vu",
          mlw: "mlw-latn-cm",
          mlx: "mlx-latn-vu",
          mlz: "mlz-latn-ph",
          mma: "mma-latn-ng",
          mmb: "mmb-latn-id",
          mmc: "mmc-latn-mx",
          mmd: "mmd-latn-cn",
          "mmd-hans": "mmd-hans-cn",
          "mmd-hant": "mmd-hant-cn",
          mme: "mme-latn-vu",
          mmf: "mmf-latn-ng",
          mmg: "mmg-latn-vu",
          mmh: "mmh-latn-br",
          mmi: "mmi-latn-pg",
          mmm: "mmm-latn-vu",
          mmn: "mmn-latn-ph",
          mmo: "mmo-latn-zz",
          mmp: "mmp-latn-pg",
          mmq: "mmq-latn-pg",
          mmr: "mmr-latn-cn",
          mmt: "mmt-latn-pg",
          mmu: "mmu-latn-zz",
          mmv: "mmv-latn-br",
          mmw: "mmw-latn-vu",
          mmx: "mmx-latn-zz",
          mmy: "mmy-latn-td",
          mmz: "mmz-latn-cd",
          mn: "mn-cyrl-mn",
          "mn-cn": "mn-mong-cn",
          "mn-mong": "mn-mong-cn",
          mna: "mna-latn-zz",
          mnb: "mnb-latn-id",
          mnd: "mnd-latn-br",
          mne: "mne-latn-td",
          mnf: "mnf-latn-zz",
          mng: "mng-latn-vn",
          mnh: "mnh-latn-cd",
          mni: "mni-beng-in",
          mnj: "mnj-arab-af",
          mnl: "mnl-latn-vu",
          mnm: "mnm-latn-pg",
          mnn: "mnn-latn-vn",
          mnp: "mnp-latn-cn",
          mnq: "mnq-latn-my",
          mnr: "mnr-latn-us",
          mns: "mns-cyrl-ru",
          mnu: "mnu-latn-id",
          mnv: "mnv-latn-sb",
          mnw: "mnw-mymr-mm",
          mnx: "mnx-latn-id",
          mny: "mny-latn-mz",
          mnz: "mnz-latn-id",
          mo: "mo-latn-ro",
          moa: "moa-latn-zz",
          moc: "moc-latn-ar",
          mod: "mod-latn-us",
          moe: "moe-latn-ca",
          mog: "mog-latn-id",
          moh: "moh-latn-ca",
          moi: "moi-latn-ng",
          moj: "moj-latn-cg",
          mok: "mok-latn-id",
          mom: "mom-latn-ni",
          moo: "moo-latn-vn",
          mop: "mop-latn-bz",
          moq: "moq-latn-id",
          mor: "mor-latn-sd",
          mos: "mos-latn-bf",
          mot: "mot-latn-co",
          mou: "mou-latn-td",
          mov: "mov-latn-us",
          mow: "mow-latn-cg",
          mox: "mox-latn-zz",
          moy: "moy-latn-et",
          "moy-ethi": "moy-ethi-et",
          moz: "moz-latn-td",
          mpa: "mpa-latn-tz",
          mpb: "mpb-latn-au",
          mpc: "mpc-latn-au",
          mpd: "mpd-latn-br",
          mpe: "mpe-latn-et",
          "mpe-ethi": "mpe-ethi-et",
          mpg: "mpg-latn-td",
          mph: "mph-latn-au",
          mpi: "mpi-latn-cm",
          mpj: "mpj-latn-au",
          mpk: "mpk-latn-td",
          mpl: "mpl-latn-pg",
          mpm: "mpm-latn-mx",
          mpn: "mpn-latn-pg",
          mpo: "mpo-latn-pg",
          mpp: "mpp-latn-zz",
          mpq: "mpq-latn-br",
          mpr: "mpr-latn-sb",
          mps: "mps-latn-zz",
          mpt: "mpt-latn-zz",
          mpu: "mpu-latn-br",
          mpv: "mpv-latn-pg",
          mpw: "mpw-latn-br",
          mpx: "mpx-latn-zz",
          mpy: "mpy-latn-id",
          mpz: "mpz-thai-th",
          mqa: "mqa-latn-id",
          mqb: "mqb-latn-cm",
          mqc: "mqc-latn-id",
          mqe: "mqe-latn-pg",
          mqf: "mqf-latn-id",
          mqg: "mqg-latn-id",
          mqh: "mqh-latn-mx",
          mqi: "mqi-latn-id",
          mqj: "mqj-latn-id",
          mqk: "mqk-latn-ph",
          mql: "mql-latn-zz",
          mqm: "mqm-latn-pf",
          mqn: "mqn-latn-id",
          mqo: "mqo-latn-id",
          mqp: "mqp-latn-id",
          mqq: "mqq-latn-my",
          mqr: "mqr-latn-id",
          mqs: "mqs-latn-id",
          mqu: "mqu-latn-ss",
          mqv: "mqv-latn-pg",
          mqw: "mqw-latn-pg",
          mqx: "mqx-latn-id",
          "mqx-bugi": "mqx-bugi-id",
          mqy: "mqy-latn-id",
          mqz: "mqz-latn-pg",
          mr: "mr-deva-in",
          mra: "mra-thai-th",
          mrb: "mrb-latn-vu",
          mrc: "mrc-latn-us",
          mrd: "mrd-deva-np",
          mrf: "mrf-latn-id",
          mrg: "mrg-latn-in",
          "mrg-beng": "mrg-beng-in",
          "mrg-deva": "mrg-deva-in",
          mrh: "mrh-latn-in",
          mrj: "mrj-cyrl-ru",
          mrk: "mrk-latn-nc",
          mrl: "mrl-latn-fm",
          mrm: "mrm-latn-vu",
          mrn: "mrn-latn-sb",
          mro: "mro-mroo-bd",
          mrp: "mrp-latn-vu",
          mrq: "mrq-latn-pf",
          mrr: "mrr-deva-in",
          mrs: "mrs-latn-vu",
          mrt: "mrt-latn-ng",
          mru: "mru-latn-cm",
          mrv: "mrv-latn-pf",
          mrw: "mrw-latn-ph",
          "mrw-arab": "mrw-arab-ph",
          mrx: "mrx-latn-id",
          mry: "mry-latn-ph",
          mrz: "mrz-latn-id",
          ms: "ms-latn-my",
          "ms-cc": "ms-arab-cc",
          msb: "msb-latn-ph",
          msc: "msc-latn-gn",
          mse: "mse-latn-td",
          msf: "msf-latn-id",
          msg: "msg-latn-id",
          msh: "msh-latn-mg",
          msi: "msi-latn-my",
          msj: "msj-latn-cd",
          msk: "msk-latn-ph",
          msl: "msl-latn-id",
          msm: "msm-latn-ph",
          msn: "msn-latn-vu",
          mso: "mso-latn-id",
          msp: "msp-latn-br",
          msq: "msq-latn-nc",
          mss: "mss-latn-id",
          msu: "msu-latn-pg",
          msv: "msv-latn-cm",
          msw: "msw-latn-gw",
          msx: "msx-latn-pg",
          msy: "msy-latn-pg",
          msz: "msz-latn-pg",
          mt: "mt-latn-mt",
          mta: "mta-latn-ph",
          mtb: "mtb-latn-ci",
          mtc: "mtc-latn-zz",
          mtd: "mtd-latn-id",
          mte: "mte-latn-sb",
          mtf: "mtf-latn-zz",
          mtg: "mtg-latn-id",
          mth: "mth-latn-id",
          mti: "mti-latn-zz",
          mtj: "mtj-latn-id",
          mtk: "mtk-latn-cm",
          mtl: "mtl-latn-ng",
          mtm: "mtm-cyrl-ru",
          mtn: "mtn-latn-ni",
          mto: "mto-latn-mx",
          mtp: "mtp-latn-bo",
          mtq: "mtq-latn-vn",
          mtr: "mtr-deva-in",
          mts: "mts-latn-pe",
          mtt: "mtt-latn-vu",
          mtu: "mtu-latn-mx",
          mtv: "mtv-latn-pg",
          mtw: "mtw-latn-ph",
          mtx: "mtx-latn-mx",
          mty: "mty-latn-pg",
          mua: "mua-latn-cm",
          mub: "mub-latn-td",
          muc: "muc-latn-cm",
          mud: "mud-cyrl-ru",
          mue: "mue-latn-ec",
          mug: "mug-latn-cm",
          muh: "muh-latn-ss",
          mui: "mui-latn-id",
          muj: "muj-latn-td",
          muk: "muk-tibt-np",
          mum: "mum-latn-pg",
          muo: "muo-latn-cm",
          muq: "muq-latn-cn",
          mur: "mur-latn-zz",
          mus: "mus-latn-us",
          mut: "mut-deva-in",
          muu: "muu-latn-ke",
          muv: "muv-taml-in",
          mux: "mux-latn-pg",
          muy: "muy-latn-cm",
          muz: "muz-ethi-et",
          "muz-latn": "muz-latn-et",
          mva: "mva-latn-zz",
          mvd: "mvd-latn-id",
          mvf: "mvf-mong-cn",
          "mvf-phag": "mvf-phag-cn",
          mvg: "mvg-latn-mx",
          mvh: "mvh-latn-td",
          mvk: "mvk-latn-pg",
          mvl: "mvl-latn-au",
          mvn: "mvn-latn-zz",
          mvo: "mvo-latn-sb",
          mvp: "mvp-latn-id",
          mvq: "mvq-latn-pg",
          mvr: "mvr-latn-id",
          mvs: "mvs-latn-id",
          mvt: "mvt-latn-vu",
          mvu: "mvu-latn-td",
          mvv: "mvv-latn-my",
          mvw: "mvw-latn-tz",
          mvx: "mvx-latn-id",
          mvy: "mvy-arab-pk",
          mvz: "mvz-ethi-et",
          "mvz-arab": "mvz-arab-et",
          mwa: "mwa-latn-pg",
          mwb: "mwb-latn-pg",
          mwc: "mwc-latn-pg",
          mwe: "mwe-latn-tz",
          mwf: "mwf-latn-au",
          mwg: "mwg-latn-pg",
          mwh: "mwh-latn-pg",
          mwi: "mwi-latn-vu",
          mwk: "mwk-latn-ml",
          mwl: "mwl-latn-pt",
          mwm: "mwm-latn-td",
          mwn: "mwn-latn-zm",
          mwo: "mwo-latn-vu",
          mwp: "mwp-latn-au",
          mwq: "mwq-latn-mm",
          mwr: "mwr-deva-in",
          mws: "mws-latn-ke",
          mwt: "mwt-mymr-mm",
          "mwt-thai": "mwt-thai-th",
          mwu: "mwu-latn-ss",
          mwv: "mwv-latn-id",
          mww: "mww-hmnp-us",
          mwz: "mwz-latn-cd",
          mxa: "mxa-latn-mx",
          mxb: "mxb-latn-mx",
          mxc: "mxc-latn-zw",
          mxd: "mxd-latn-id",
          mxe: "mxe-latn-vu",
          mxf: "mxf-latn-cm",
          mxg: "mxg-latn-ao",
          mxh: "mxh-latn-cd",
          mxi: "mxi-latn-es",
          mxj: "mxj-latn-in",
          mxk: "mxk-latn-pg",
          mxl: "mxl-latn-bj",
          mxm: "mxm-latn-zz",
          mxn: "mxn-latn-id",
          mxo: "mxo-latn-zm",
          mxp: "mxp-latn-mx",
          mxq: "mxq-latn-mx",
          mxr: "mxr-latn-my",
          mxs: "mxs-latn-mx",
          mxt: "mxt-latn-mx",
          mxu: "mxu-latn-cm",
          mxv: "mxv-latn-mx",
          mxw: "mxw-latn-pg",
          mxx: "mxx-latn-ci",
          mxy: "mxy-latn-mx",
          mxz: "mxz-latn-id",
          my: "my-mymr-mm",
          myb: "myb-latn-td",
          myc: "myc-latn-cd",
          mye: "mye-latn-ga",
          myf: "myf-latn-et",
          myg: "myg-latn-cm",
          myh: "myh-latn-us",
          myj: "myj-latn-ss",
          myk: "myk-latn-zz",
          myl: "myl-latn-id",
          mym: "mym-ethi-zz",
          myp: "myp-latn-br",
          myr: "myr-latn-pe",
          myu: "myu-latn-br",
          myv: "myv-cyrl-ru",
          myw: "myw-latn-zz",
          myx: "myx-latn-ug",
          myy: "myy-latn-co",
          myz: "myz-mand-ir",
          mza: "mza-latn-mx",
          mzd: "mzd-latn-cm",
          mze: "mze-latn-pg",
          mzh: "mzh-latn-ar",
          mzi: "mzi-latn-mx",
          mzj: "mzj-latn-lr",
          mzk: "mzk-latn-zz",
          mzl: "mzl-latn-mx",
          mzm: "mzm-latn-zz",
          mzn: "mzn-arab-ir",
          mzo: "mzo-latn-br",
          mzp: "mzp-latn-zz",
          mzq: "mzq-latn-id",
          mzr: "mzr-latn-br",
          mzt: "mzt-latn-my",
          mzu: "mzu-latn-pg",
          mzv: "mzv-latn-cf",
          mzw: "mzw-latn-zz",
          mzx: "mzx-latn-gy",
          mzz: "mzz-latn-zz",
          na: "na-latn-nr",
          naa: "naa-latn-id",
          nab: "nab-latn-br",
          nac: "nac-latn-zz",
          nae: "nae-latn-id",
          naf: "naf-latn-zz",
          nag: "nag-latn-in",
          naj: "naj-latn-gn",
          nak: "nak-latn-zz",
          nal: "nal-latn-pg",
          nam: "nam-latn-au",
          nan: "nan-hans-cn",
          nao: "nao-deva-np",
          nap: "nap-latn-it",
          naq: "naq-latn-na",
          nar: "nar-latn-ng",
          nas: "nas-latn-zz",
          nat: "nat-latn-ng",
          naw: "naw-latn-gh",
          nax: "nax-latn-pg",
          nay: "nay-latn-au",
          naz: "naz-latn-mx",
          nb: "nb-latn-no",
          nba: "nba-latn-ao",
          nbb: "nbb-latn-ng",
          nbc: "nbc-latn-in",
          nbd: "nbd-latn-cd",
          nbe: "nbe-latn-in",
          nbh: "nbh-latn-ng",
          nbi: "nbi-latn-in",
          nbj: "nbj-latn-au",
          nbk: "nbk-latn-pg",
          nbm: "nbm-latn-cf",
          nbn: "nbn-latn-id",
          nbo: "nbo-latn-ng",
          nbp: "nbp-latn-ng",
          nbq: "nbq-latn-id",
          nbr: "nbr-latn-ng",
          nbt: "nbt-latn-in",
          "nbt-deva": "nbt-deva-in",
          nbu: "nbu-latn-in",
          nbv: "nbv-latn-cm",
          nbw: "nbw-latn-cd",
          nby: "nby-latn-pg",
          nca: "nca-latn-zz",
          ncb: "ncb-latn-in",
          "ncb-deva": "ncb-deva-in",
          ncc: "ncc-latn-pg",
          ncd: "ncd-deva-np",
          nce: "nce-latn-zz",
          ncf: "ncf-latn-zz",
          ncg: "ncg-latn-ca",
          nch: "nch-latn-mx",
          nci: "nci-latn-mx",
          ncj: "ncj-latn-mx",
          nck: "nck-latn-au",
          ncl: "ncl-latn-mx",
          ncm: "ncm-latn-pg",
          ncn: "ncn-latn-pg",
          nco: "nco-latn-zz",
          ncq: "ncq-laoo-la",
          "ncq-thai": "ncq-thai-la",
          ncr: "ncr-latn-cm",
          nct: "nct-latn-in",
          "nct-beng": "nct-beng-in",
          ncu: "ncu-latn-zz",
          ncx: "ncx-latn-mx",
          ncz: "ncz-latn-us",
          nd: "nd-latn-zw",
          nda: "nda-latn-cg",
          ndb: "ndb-latn-cm",
          ndc: "ndc-latn-mz",
          ndd: "ndd-latn-ng",
          ndf: "ndf-cyrl-ru",
          ndg: "ndg-latn-tz",
          ndh: "ndh-latn-tz",
          ndi: "ndi-latn-ng",
          ndj: "ndj-latn-tz",
          ndk: "ndk-latn-cd",
          ndl: "ndl-latn-cd",
          ndm: "ndm-latn-td",
          ndn: "ndn-latn-cg",
          ndp: "ndp-latn-ug",
          ndq: "ndq-latn-ao",
          ndr: "ndr-latn-ng",
          nds: "nds-latn-de",
          ndt: "ndt-latn-cd",
          ndu: "ndu-latn-cm",
          ndv: "ndv-latn-sn",
          ndw: "ndw-latn-cd",
          ndx: "ndx-latn-id",
          ndy: "ndy-latn-cf",
          "ndy-td": "ndy-latn-td",
          ndz: "ndz-latn-ss",
          ne: "ne-deva-np",
          nea: "nea-latn-id",
          neb: "neb-latn-zz",
          nec: "nec-latn-id",
          ned: "ned-latn-ng",
          nee: "nee-latn-nc",
          neg: "neg-cyrl-ru",
          neh: "neh-tibt-bt",
          nei: "nei-xsux-tr",
          nej: "nej-latn-pg",
          nek: "nek-latn-nc",
          nem: "nem-latn-nc",
          nen: "nen-latn-nc",
          neo: "neo-latn-vn",
          neq: "neq-latn-mx",
          ner: "ner-latn-id",
          net: "net-latn-pg",
          neu: "neu-latn-001",
          new: "new-deva-np",
          nex: "nex-latn-zz",
          ney: "ney-latn-ci",
          nez: "nez-latn-us",
          nfa: "nfa-latn-id",
          nfd: "nfd-latn-ng",
          nfl: "nfl-latn-sb",
          nfr: "nfr-latn-zz",
          nfu: "nfu-latn-cm",
          ng: "ng-latn-na",
          nga: "nga-latn-zz",
          ngb: "ngb-latn-zz",
          ngc: "ngc-latn-cd",
          ngd: "ngd-latn-cf",
          nge: "nge-latn-cm",
          ngg: "ngg-latn-cf",
          ngh: "ngh-latn-za",
          ngi: "ngi-latn-ng",
          ngj: "ngj-latn-cm",
          ngk: "ngk-latn-au",
          ngl: "ngl-latn-mz",
          ngm: "ngm-latn-fm",
          ngn: "ngn-latn-cm",
          ngp: "ngp-latn-tz",
          ngq: "ngq-latn-tz",
          ngr: "ngr-latn-sb",
          ngs: "ngs-latn-ng",
          ngt: "ngt-laoo-la",
          ngu: "ngu-latn-mx",
          ngv: "ngv-latn-cm",
          ngw: "ngw-latn-ng",
          ngx: "ngx-latn-ng",
          ngy: "ngy-latn-cm",
          ngz: "ngz-latn-cg",
          nha: "nha-latn-au",
          nhb: "nhb-latn-zz",
          nhc: "nhc-latn-mx",
          nhd: "nhd-latn-py",
          nhe: "nhe-latn-mx",
          nhf: "nhf-latn-au",
          nhg: "nhg-latn-mx",
          nhi: "nhi-latn-mx",
          nhk: "nhk-latn-mx",
          nhm: "nhm-latn-mx",
          nhn: "nhn-latn-mx",
          nho: "nho-latn-pg",
          nhp: "nhp-latn-mx",
          nhq: "nhq-latn-mx",
          nhr: "nhr-latn-bw",
          nht: "nht-latn-mx",
          nhu: "nhu-latn-cm",
          nhv: "nhv-latn-mx",
          nhw: "nhw-latn-mx",
          nhx: "nhx-latn-mx",
          nhy: "nhy-latn-mx",
          nhz: "nhz-latn-mx",
          nia: "nia-latn-id",
          nib: "nib-latn-pg",
          nid: "nid-latn-au",
          nie: "nie-latn-td",
          nif: "nif-latn-zz",
          nig: "nig-latn-au",
          nih: "nih-latn-tz",
          nii: "nii-latn-zz",
          nij: "nij-latn-id",
          nil: "nil-latn-id",
          nim: "nim-latn-tz",
          nin: "nin-latn-zz",
          nio: "nio-cyrl-ru",
          niq: "niq-latn-ke",
          nir: "nir-latn-id",
          nis: "nis-latn-pg",
          nit: "nit-telu-in",
          niu: "niu-latn-nu",
          niv: "niv-cyrl-ru",
          "niv-latn": "niv-latn-ru",
          niw: "niw-latn-pg",
          nix: "nix-latn-cd",
          niy: "niy-latn-zz",
          niz: "niz-latn-zz",
          nja: "nja-latn-ng",
          njb: "njb-latn-in",
          njd: "njd-latn-tz",
          njh: "njh-latn-in",
          nji: "nji-latn-au",
          njj: "njj-latn-cm",
          njl: "njl-latn-ss",
          njm: "njm-latn-in",
          njn: "njn-latn-in",
          njo: "njo-latn-in",
          njr: "njr-latn-ng",
          njs: "njs-latn-id",
          njt: "njt-latn-sr",
          nju: "nju-latn-au",
          njx: "njx-latn-cg",
          njy: "njy-latn-cm",
          njz: "njz-latn-in",
          "njz-beng": "njz-beng-in",
          nka: "nka-latn-zm",
          nkb: "nkb-latn-in",
          nkc: "nkc-latn-cm",
          nkd: "nkd-latn-in",
          nke: "nke-latn-sb",
          nkf: "nkf-latn-in",
          nkg: "nkg-latn-zz",
          nkh: "nkh-latn-in",
          nki: "nki-latn-in",
          "nki-beng": "nki-beng-in",
          nkj: "nkj-latn-id",
          nkk: "nkk-latn-vu",
          nkm: "nkm-latn-pg",
          nkn: "nkn-latn-ao",
          nko: "nko-latn-zz",
          nkq: "nkq-latn-gh",
          nkr: "nkr-latn-fm",
          nks: "nks-latn-id",
          nkt: "nkt-latn-tz",
          nku: "nku-latn-ci",
          nkv: "nkv-latn-mw",
          nkw: "nkw-latn-cd",
          nkx: "nkx-latn-ng",
          nkz: "nkz-latn-ng",
          nl: "nl-latn-nl",
          nla: "nla-latn-cm",
          nlc: "nlc-latn-id",
          nle: "nle-latn-ke",
          nlg: "nlg-latn-sb",
          nli: "nli-arab-af",
          nlj: "nlj-latn-cd",
          nlk: "nlk-latn-id",
          nlm: "nlm-arab-pk",
          nlo: "nlo-latn-cd",
          nlq: "nlq-latn-mm",
          nlu: "nlu-latn-gh",
          nlv: "nlv-latn-mx",
          nlw: "nlw-latn-au",
          nlx: "nlx-deva-in",
          nly: "nly-latn-au",
          nlz: "nlz-latn-sb",
          nma: "nma-latn-in",
          nmb: "nmb-latn-vu",
          nmc: "nmc-latn-td",
          nmd: "nmd-latn-ga",
          nme: "nme-latn-in",
          nmf: "nmf-latn-in",
          nmg: "nmg-latn-cm",
          nmh: "nmh-latn-in",
          nmi: "nmi-latn-ng",
          nmj: "nmj-latn-cf",
          nmk: "nmk-latn-vu",
          nml: "nml-latn-cm",
          nmm: "nmm-deva-np",
          "nmm-tibt": "nmm-tibt-np",
          nmn: "nmn-latn-bw",
          nmo: "nmo-latn-in",
          "nmo-beng": "nmo-beng-in",
          nmp: "nmp-latn-au",
          nmq: "nmq-latn-zw",
          nmr: "nmr-latn-cm",
          nms: "nms-latn-vu",
          nmt: "nmt-latn-fm",
          nmu: "nmu-latn-us",
          nmv: "nmv-latn-au",
          nmw: "nmw-latn-pg",
          nmx: "nmx-latn-pg",
          nmz: "nmz-latn-zz",
          nn: "nn-latn-no",
          nna: "nna-latn-au",
          nnb: "nnb-latn-cd",
          nnc: "nnc-latn-td",
          nnd: "nnd-latn-vu",
          nne: "nne-latn-ao",
          nnf: "nnf-latn-zz",
          nng: "nng-latn-in",
          "nng-beng": "nng-beng-in",
          nnh: "nnh-latn-cm",
          nni: "nni-latn-id",
          nnj: "nnj-latn-et",
          nnk: "nnk-latn-zz",
          nnl: "nnl-latn-in",
          nnm: "nnm-latn-zz",
          nnn: "nnn-latn-td",
          nnp: "nnp-wcho-in",
          nnq: "nnq-latn-tz",
          nnr: "nnr-latn-au",
          nnt: "nnt-latn-us",
          nnu: "nnu-latn-gh",
          nnv: "nnv-latn-au",
          nnw: "nnw-latn-bf",
          nny: "nny-latn-au",
          nnz: "nnz-latn-cm",
          no: "no-latn-no",
          noa: "noa-latn-co",
          noc: "noc-latn-pg",
          nod: "nod-lana-th",
          noe: "noe-deva-in",
          nof: "nof-latn-pg",
          nog: "nog-cyrl-ru",
          noh: "noh-latn-pg",
          noi: "noi-deva-in",
          noj: "noj-latn-co",
          nok: "nok-latn-us",
          nom: "nom-latn-pe",
          non: "non-runr-se",
          nop: "nop-latn-zz",
          noq: "noq-latn-cd",
          nos: "nos-yiii-cn",
          not: "not-latn-pe",
          nou: "nou-latn-zz",
          nov: "nov-latn-001",
          now: "now-latn-tz",
          noy: "noy-latn-td",
          npb: "npb-tibt-bt",
          npg: "npg-latn-mm",
          nph: "nph-latn-in",
          npl: "npl-latn-mx",
          npn: "npn-latn-pg",
          npo: "npo-latn-in",
          nps: "nps-latn-id",
          npu: "npu-latn-in",
          npx: "npx-latn-sb",
          npy: "npy-latn-id",
          nqg: "nqg-latn-bj",
          nqk: "nqk-latn-bj",
          nql: "nql-latn-ao",
          nqm: "nqm-latn-id",
          nqn: "nqn-latn-pg",
          nqo: "nqo-nkoo-gn",
          nqq: "nqq-latn-mm",
          nqt: "nqt-latn-ng",
          nqy: "nqy-latn-mm",
          nr: "nr-latn-za",
          nra: "nra-latn-ga",
          nrb: "nrb-latn-zz",
          nre: "nre-latn-in",
          nrf: "nrf-latn-je",
          nrg: "nrg-latn-vu",
          nri: "nri-latn-in",
          nrk: "nrk-latn-au",
          nrl: "nrl-latn-au",
          nrm: "nrm-latn-my",
          nrp: "nrp-latn-it",
          nru: "nru-latn-cn",
          "nru-hans": "nru-hans-cn",
          "nru-hant": "nru-hant-cn",
          nrx: "nrx-latn-au",
          nrz: "nrz-latn-pg",
          nsa: "nsa-latn-in",
          nsb: "nsb-latn-za",
          nsc: "nsc-latn-ng",
          nsd: "nsd-yiii-cn",
          nse: "nse-latn-zm",
          nsf: "nsf-yiii-cn",
          nsg: "nsg-latn-tz",
          nsh: "nsh-latn-cm",
          nsk: "nsk-cans-ca",
          nsm: "nsm-latn-in",
          nsn: "nsn-latn-zz",
          nso: "nso-latn-za",
          nsq: "nsq-latn-us",
          nss: "nss-latn-zz",
          nst: "nst-tnsa-in",
          nsu: "nsu-latn-mx",
          nsv: "nsv-yiii-cn",
          nsw: "nsw-latn-vu",
          nsx: "nsx-latn-ao",
          nsy: "nsy-latn-id",
          nsz: "nsz-latn-us",
          ntd: "ntd-latn-my",
          nte: "nte-latn-mz",
          ntg: "ntg-latn-au",
          nti: "nti-latn-bf",
          ntj: "ntj-latn-au",
          ntk: "ntk-latn-tz",
          ntm: "ntm-latn-zz",
          nto: "nto-latn-cd",
          ntp: "ntp-latn-mx",
          ntr: "ntr-latn-zz",
          ntu: "ntu-latn-sb",
          ntx: "ntx-latn-mm",
          nty: "nty-yiii-vn",
          ntz: "ntz-arab-ir",
          nua: "nua-latn-nc",
          nuc: "nuc-latn-br",
          nud: "nud-latn-pg",
          nue: "nue-latn-cd",
          nuf: "nuf-latn-cn",
          nug: "nug-latn-au",
          nuh: "nuh-latn-ng",
          nui: "nui-latn-zz",
          nuj: "nuj-latn-ug",
          nuk: "nuk-latn-ca",
          num: "num-latn-to",
          nun: "nun-latn-mm",
          nuo: "nuo-latn-vn",
          nup: "nup-latn-zz",
          nuq: "nuq-latn-pg",
          nur: "nur-latn-pg",
          nus: "nus-latn-ss",
          nut: "nut-latn-vn",
          nuu: "nuu-latn-cd",
          nuv: "nuv-latn-zz",
          nuw: "nuw-latn-fm",
          nux: "nux-latn-zz",
          nuy: "nuy-latn-au",
          nuz: "nuz-latn-mx",
          nv: "nv-latn-us",
          nvh: "nvh-latn-vu",
          nvm: "nvm-latn-pg",
          nvo: "nvo-latn-cm",
          nwb: "nwb-latn-zz",
          nwc: "nwc-newa-np",
          "nwc-brah": "nwc-brah-np",
          "nwc-deva": "nwc-deva-np",
          "nwc-sidd": "nwc-sidd-np",
          nwe: "nwe-latn-cm",
          nwg: "nwg-latn-au",
          nwi: "nwi-latn-vu",
          nwm: "nwm-latn-ss",
          nwo: "nwo-latn-au",
          nwr: "nwr-latn-pg",
          nww: "nww-latn-tz",
          nwx: "nwx-deva-np",
          nxa: "nxa-latn-tl",
          nxd: "nxd-latn-cd",
          nxe: "nxe-latn-id",
          nxg: "nxg-latn-id",
          nxi: "nxi-latn-tz",
          nxl: "nxl-latn-id",
          nxn: "nxn-latn-au",
          nxo: "nxo-latn-ga",
          nxq: "nxq-latn-cn",
          nxr: "nxr-latn-zz",
          nxx: "nxx-latn-id",
          ny: "ny-latn-mw",
          nyb: "nyb-latn-gh",
          nyc: "nyc-latn-cd",
          nyd: "nyd-latn-ke",
          nye: "nye-latn-ao",
          nyf: "nyf-latn-ke",
          nyg: "nyg-latn-cd",
          nyh: "nyh-latn-au",
          nyi: "nyi-latn-sd",
          nyj: "nyj-latn-cd",
          nyk: "nyk-latn-ao",
          nyl: "nyl-thai-th",
          nym: "nym-latn-tz",
          nyn: "nyn-latn-ug",
          nyo: "nyo-latn-ug",
          nyp: "nyp-latn-ug",
          nyq: "nyq-arab-ir",
          nyr: "nyr-latn-mw",
          nys: "nys-latn-au",
          nyt: "nyt-latn-au",
          nyu: "nyu-latn-mz",
          nyv: "nyv-latn-au",
          nyx: "nyx-latn-au",
          nyy: "nyy-latn-tz",
          nza: "nza-latn-cm",
          nzb: "nzb-latn-ga",
          nzd: "nzd-latn-cd",
          nzi: "nzi-latn-gh",
          nzk: "nzk-latn-cf",
          nzm: "nzm-latn-in",
          nzu: "nzu-latn-cg",
          nzy: "nzy-latn-td",
          nzz: "nzz-latn-ml",
          oaa: "oaa-cyrl-ru",
          oac: "oac-cyrl-ru",
          oar: "oar-syrc-sy",
          oav: "oav-geor-ge",
          obi: "obi-latn-us",
          obk: "obk-latn-ph",
          obl: "obl-latn-cm",
          obm: "obm-phnx-jo",
          obo: "obo-latn-ph",
          obr: "obr-mymr-mm",
          obt: "obt-latn-fr",
          obu: "obu-latn-ng",
          oc: "oc-latn-fr",
          oca: "oca-latn-pe",
          oco: "oco-latn-gb",
          ocu: "ocu-latn-mx",
          oda: "oda-latn-ng",
          odk: "odk-arab-pk",
          odt: "odt-latn-nl",
          odu: "odu-latn-ng",
          ofu: "ofu-latn-ng",
          ogb: "ogb-latn-ng",
          ogc: "ogc-latn-zz",
          ogg: "ogg-latn-ng",
          ogo: "ogo-latn-ng",
          ogu: "ogu-latn-ng",
          oht: "oht-xsux-tr",
          oia: "oia-latn-id",
          oie: "oie-latn-ss",
          oin: "oin-latn-pg",
          oj: "oj-cans-ca",
          ojb: "ojb-latn-ca",
          "ojb-cans": "ojb-cans-ca",
          ojc: "ojc-latn-ca",
          ojs: "ojs-cans-ca",
          ojv: "ojv-latn-sb",
          ojw: "ojw-latn-ca",
          "ojw-cans": "ojw-cans-ca",
          oka: "oka-latn-ca",
          okb: "okb-latn-ng",
          okc: "okc-latn-cd",
          okd: "okd-latn-ng",
          oke: "oke-latn-ng",
          okg: "okg-latn-au",
          oki: "oki-latn-ke",
          okk: "okk-latn-pg",
          okm: "okm-hang-kr",
          oko: "oko-hani-kr",
          okr: "okr-latn-zz",
          oks: "oks-latn-ng",
          oku: "oku-latn-cm",
          okv: "okv-latn-zz",
          okx: "okx-latn-ng",
          okz: "okz-khmr-kh",
          ola: "ola-deva-np",
          "ola-tibt": "ola-tibt-cn",
          old: "old-latn-tz",
          ole: "ole-tibt-bt",
          olk: "olk-latn-au",
          olm: "olm-latn-ng",
          olo: "olo-latn-ru",
          olr: "olr-latn-vu",
          olt: "olt-latn-lt",
          olu: "olu-latn-ao",
          om: "om-latn-et",
          oma: "oma-latn-us",
          omb: "omb-latn-vu",
          omc: "omc-latn-pe",
          omg: "omg-latn-pe",
          omi: "omi-latn-cd",
          omk: "omk-cyrl-ru",
          oml: "oml-latn-cd",
          omo: "omo-latn-pg",
          omp: "omp-mtei-in",
          omr: "omr-modi-in",
          omt: "omt-latn-ke",
          omu: "omu-latn-pe",
          omw: "omw-latn-pg",
          ona: "ona-latn-ar",
          one: "one-latn-ca",
          ong: "ong-latn-zz",
          oni: "oni-latn-id",
          onj: "onj-latn-pg",
          onk: "onk-latn-pg",
          onn: "onn-latn-zz",
          ono: "ono-latn-ca",
          onp: "onp-latn-in",
          "onp-deva": "onp-deva-in",
          onr: "onr-latn-pg",
          ons: "ons-latn-zz",
          ont: "ont-latn-pg",
          onu: "onu-latn-vu",
          onx: "onx-latn-id",
          ood: "ood-latn-us",
          oon: "oon-deva-in",
          oor: "oor-latn-za",
          opa: "opa-latn-ng",
          opk: "opk-latn-id",
          opm: "opm-latn-zz",
          opo: "opo-latn-pg",
          opt: "opt-latn-mx",
          opy: "opy-latn-br",
          or: "or-orya-in",
          ora: "ora-latn-sb",
          orc: "orc-latn-ke",
          ore: "ore-latn-pe",
          org: "org-latn-ng",
          orn: "orn-latn-my",
          oro: "oro-latn-zz",
          orr: "orr-latn-ng",
          ors: "ors-latn-my",
          ort: "ort-telu-in",
          oru: "oru-arab-zz",
          orv: "orv-cyrl-ru",
          orw: "orw-latn-br",
          orx: "orx-latn-ng",
          orz: "orz-latn-id",
          os: "os-cyrl-ge",
          osa: "osa-osge-us",
          osc: "osc-ital-it",
          "osc-latn": "osc-latn-it",
          osi: "osi-java-id",
          oso: "oso-latn-ng",
          osp: "osp-latn-es",
          ost: "ost-latn-cm",
          osu: "osu-latn-pg",
          osx: "osx-latn-de",
          ota: "ota-arab-zz",
          otb: "otb-tibt-cn",
          otd: "otd-latn-id",
          ote: "ote-latn-mx",
          oti: "oti-latn-br",
          otk: "otk-orkh-mn",
          otl: "otl-latn-mx",
          otm: "otm-latn-mx",
          otn: "otn-latn-mx",
          otq: "otq-latn-mx",
          otr: "otr-latn-sd",
          ots: "ots-latn-mx",
          ott: "ott-latn-mx",
          otu: "otu-latn-br",
          otw: "otw-latn-ca",
          otx: "otx-latn-mx",
          oty: "oty-gran-in",
          otz: "otz-latn-mx",
          oub: "oub-latn-lr",
          oue: "oue-latn-pg",
          oui: "oui-ougr-143",
          oum: "oum-latn-pg",
          ovd: "ovd-latn-se",
          owi: "owi-latn-pg",
          owl: "owl-latn-gb",
          oyd: "oyd-latn-et",
          oym: "oym-latn-br",
          oyy: "oyy-latn-pg",
          ozm: "ozm-latn-zz",
          pa: "pa-guru-in",
          "pa-arab": "pa-arab-pk",
          "pa-pk": "pa-arab-pk",
          pab: "pab-latn-br",
          pac: "pac-latn-vn",
          pad: "pad-latn-br",
          pae: "pae-latn-cd",
          paf: "paf-latn-br",
          pag: "pag-latn-ph",
          pah: "pah-latn-br",
          pai: "pai-latn-ng",
          pak: "pak-latn-br",
          pal: "pal-phli-ir",
          "pal-phlp": "pal-phlp-cn",
          pam: "pam-latn-ph",
          pao: "pao-latn-us",
          pap: "pap-latn-cw",
          paq: "paq-cyrl-tj",
          par: "par-latn-us",
          pas: "pas-latn-id",
          pau: "pau-latn-pw",
          pav: "pav-latn-br",
          paw: "paw-latn-us",
          pax: "pax-latn-br",
          pay: "pay-latn-hn",
          paz: "paz-latn-br",
          pbb: "pbb-latn-co",
          pbc: "pbc-latn-gy",
          pbe: "pbe-latn-mx",
          pbf: "pbf-latn-mx",
          pbg: "pbg-latn-ve",
          pbh: "pbh-latn-ve",
          pbi: "pbi-latn-zz",
          pbl: "pbl-latn-ng",
          pbm: "pbm-latn-mx",
          pbn: "pbn-latn-ng",
          pbo: "pbo-latn-gw",
          pbp: "pbp-latn-gn",
          pbr: "pbr-latn-tz",
          pbs: "pbs-latn-mx",
          pbt: "pbt-arab-af",
          pbv: "pbv-latn-in",
          pby: "pby-latn-pg",
          pca: "pca-latn-mx",
          pcb: "pcb-khmr-kh",
          pcc: "pcc-latn-cn",
          "pcc-hani": "pcc-hani-cn",
          pcd: "pcd-latn-fr",
          pce: "pce-mymr-mm",
          "pce-thai": "pce-thai-th",
          pcf: "pcf-mlym-in",
          pcg: "pcg-mlym-in",
          "pcg-knda": "pcg-knda-in",
          "pcg-taml": "pcg-taml-in",
          pch: "pch-deva-in",
          pci: "pci-deva-in",
          "pci-orya": "pci-orya-in",
          pcj: "pcj-telu-in",
          pck: "pck-latn-in",
          pcm: "pcm-latn-ng",
          pcn: "pcn-latn-ng",
          pcp: "pcp-latn-bo",
          pcw: "pcw-latn-ng",
          pda: "pda-latn-pg",
          pdc: "pdc-latn-us",
          pdn: "pdn-latn-id",
          pdo: "pdo-latn-id",
          pdt: "pdt-latn-ca",
          pdu: "pdu-latn-mm",
          "pdu-mymr": "pdu-mymr-mm",
          pea: "pea-latn-id",
          peb: "peb-latn-us",
          ped: "ped-latn-zz",
          pee: "pee-latn-id",
          peg: "peg-orya-in",
          pei: "pei-latn-mx",
          pek: "pek-latn-pg",
          pel: "pel-latn-id",
          pem: "pem-latn-cd",
          peo: "peo-xpeo-ir",
          pep: "pep-latn-pg",
          peq: "peq-latn-us",
          pev: "pev-latn-ve",
          pex: "pex-latn-zz",
          pey: "pey-latn-id",
          pez: "pez-latn-my",
          pfa: "pfa-latn-fm",
          pfe: "pfe-latn-cm",
          pfl: "pfl-latn-de",
          pga: "pga-latn-ss",
          pgd: "pgd-khar-pk",
          pgg: "pgg-deva-in",
          pgi: "pgi-latn-pg",
          pgk: "pgk-latn-vu",
          pgl: "pgl-ogam-ie",
          pgn: "pgn-ital-it",
          pgs: "pgs-latn-ng",
          pgu: "pgu-latn-id",
          phd: "phd-deva-in",
          phg: "phg-latn-vn",
          phh: "phh-latn-vn",
          phk: "phk-mymr-in",
          phl: "phl-arab-zz",
          phm: "phm-latn-mz",
          phn: "phn-phnx-lb",
          pho: "pho-laoo-la",
          phr: "phr-arab-pk",
          pht: "pht-thai-th",
          phv: "phv-arab-af",
          phw: "phw-deva-np",
          pi: "pi-sinh-in",
          "pi-brah": "pi-brah-in",
          "pi-deva": "pi-deva-in",
          "pi-khar": "pi-khar-in",
          "pi-khmr": "pi-khmr-in",
          "pi-mymr": "pi-mymr-in",
          "pi-thai": "pi-thai-in",
          pia: "pia-latn-mx",
          pib: "pib-latn-pe",
          pic: "pic-latn-ga",
          pid: "pid-latn-ve",
          pif: "pif-latn-fm",
          pig: "pig-latn-pe",
          pih: "pih-latn-nf",
          pij: "pij-latn-co",
          pil: "pil-latn-zz",
          pim: "pim-latn-us",
          pin: "pin-latn-pg",
          pio: "pio-latn-co",
          pip: "pip-latn-zz",
          pir: "pir-latn-br",
          pis: "pis-latn-sb",
          pit: "pit-latn-au",
          piu: "piu-latn-au",
          piv: "piv-latn-sb",
          piw: "piw-latn-tz",
          pix: "pix-latn-pg",
          piy: "piy-latn-ng",
          piz: "piz-latn-nc",
          pjt: "pjt-latn-au",
          pka: "pka-brah-in",
          pkb: "pkb-latn-ke",
          pkg: "pkg-latn-pg",
          pkh: "pkh-latn-bd",
          "pkh-deva": "pkh-deva-bd",
          pkn: "pkn-latn-au",
          pko: "pko-latn-ke",
          pkp: "pkp-latn-ck",
          pkr: "pkr-mlym-in",
          pku: "pku-latn-id",
          pl: "pl-latn-pl",
          pla: "pla-latn-zz",
          plb: "plb-latn-vu",
          plc: "plc-latn-ph",
          pld: "pld-latn-gb",
          ple: "ple-latn-id",
          plg: "plg-latn-ar",
          plh: "plh-latn-id",
          plj: "plj-latn-ng",
          plk: "plk-arab-pk",
          pll: "pll-mymr-mm",
          pln: "pln-latn-co",
          plo: "plo-latn-mx",
          plr: "plr-latn-ci",
          pls: "pls-latn-mx",
          plu: "plu-latn-br",
          plv: "plv-latn-ph",
          plw: "plw-latn-ph",
          plz: "plz-latn-my",
          pma: "pma-latn-vu",
          pmb: "pmb-latn-cd",
          pmd: "pmd-latn-au",
          pme: "pme-latn-nc",
          pmf: "pmf-latn-id",
          pmh: "pmh-brah-in",
          pmi: "pmi-latn-cn",
          pmj: "pmj-latn-cn",
          pml: "pml-latn-tn",
          pmm: "pmm-latn-cm",
          pmn: "pmn-latn-cm",
          pmo: "pmo-latn-id",
          pmq: "pmq-latn-mx",
          pmr: "pmr-latn-pg",
          pms: "pms-latn-it",
          pmt: "pmt-latn-pf",
          pmw: "pmw-latn-us",
          pmx: "pmx-latn-in",
          pmy: "pmy-latn-id",
          pmz: "pmz-latn-mx",
          pna: "pna-latn-my",
          pnc: "pnc-latn-id",
          pnd: "pnd-latn-ao",
          pne: "pne-latn-my",
          png: "png-latn-zz",
          pnh: "pnh-latn-ck",
          pni: "pni-latn-id",
          pnj: "pnj-latn-au",
          pnk: "pnk-latn-bo",
          pnl: "pnl-latn-bf",
          pnm: "pnm-latn-my",
          pnn: "pnn-latn-zz",
          pno: "pno-latn-pe",
          pnp: "pnp-latn-id",
          pnq: "pnq-latn-bf",
          pnr: "pnr-latn-pg",
          pns: "pns-latn-id",
          pnt: "pnt-grek-gr",
          pnv: "pnv-latn-au",
          pnw: "pnw-latn-au",
          pny: "pny-latn-cm",
          pnz: "pnz-latn-cf",
          poc: "poc-latn-gt",
          poe: "poe-latn-mx",
          pof: "pof-latn-cd",
          pog: "pog-latn-br",
          poh: "poh-latn-gt",
          poi: "poi-latn-mx",
          pok: "pok-latn-br",
          pom: "pom-latn-us",
          pon: "pon-latn-fm",
          poo: "poo-latn-us",
          pop: "pop-latn-nc",
          poq: "poq-latn-mx",
          pos: "pos-latn-mx",
          pot: "pot-latn-us",
          pov: "pov-latn-gw",
          pow: "pow-latn-mx",
          poy: "poy-latn-tz",
          ppa: "ppa-deva-in",
          ppe: "ppe-latn-pg",
          ppi: "ppi-latn-mx",
          ppk: "ppk-latn-id",
          ppl: "ppl-latn-sv",
          ppm: "ppm-latn-id",
          ppn: "ppn-latn-pg",
          ppo: "ppo-latn-zz",
          ppp: "ppp-latn-cd",
          ppq: "ppq-latn-pg",
          pps: "pps-latn-mx",
          ppt: "ppt-latn-pg",
          pqa: "pqa-latn-ng",
          pqm: "pqm-latn-ca",
          pra: "pra-khar-pk",
          prc: "prc-arab-af",
          prd: "prd-arab-ir",
          pre: "pre-latn-st",
          prf: "prf-latn-ph",
          prg: "prg-latn-001",
          prh: "prh-latn-ph",
          pri: "pri-latn-nc",
          prk: "prk-latn-mm",
          prm: "prm-latn-pg",
          pro: "pro-latn-fr",
          prp: "prp-gujr-in",
          prq: "prq-latn-pe",
          prr: "prr-latn-br",
          prt: "prt-thai-th",
          pru: "pru-latn-id",
          prw: "prw-latn-pg",
          prx: "prx-arab-in",
          "prx-tibt": "prx-tibt-in",
          ps: "ps-arab-af",
          psa: "psa-latn-id",
          pse: "pse-latn-id",
          psh: "psh-arab-af",
          psi: "psi-arab-af",
          psm: "psm-latn-bo",
          psn: "psn-latn-id",
          psq: "psq-latn-pg",
          pss: "pss-latn-zz",
          pst: "pst-arab-pk",
          psw: "psw-latn-vu",
          pt: "pt-latn-br",
          pta: "pta-latn-py",
          pth: "pth-latn-br",
          pti: "pti-latn-au",
          ptn: "ptn-latn-id",
          pto: "pto-latn-br",
          ptp: "ptp-latn-zz",
          ptr: "ptr-latn-vu",
          ptt: "ptt-latn-id",
          ptu: "ptu-latn-id",
          ptv: "ptv-latn-vu",
          pua: "pua-latn-mx",
          pub: "pub-latn-in",
          puc: "puc-latn-id",
          pud: "pud-latn-id",
          pue: "pue-latn-ar",
          puf: "puf-latn-id",
          pug: "pug-latn-bf",
          pui: "pui-latn-co",
          puj: "puj-latn-id",
          pum: "pum-deva-np",
          puo: "puo-latn-vn",
          pup: "pup-latn-pg",
          puq: "puq-latn-pe",
          pur: "pur-latn-br",
          put: "put-latn-id",
          puu: "puu-latn-ga",
          puw: "puw-latn-fm",
          pux: "pux-latn-pg",
          puy: "puy-latn-us",
          pwa: "pwa-latn-zz",
          pwb: "pwb-latn-ng",
          pwg: "pwg-latn-pg",
          pwm: "pwm-latn-ph",
          pwn: "pwn-latn-tw",
          pwo: "pwo-mymr-mm",
          pwr: "pwr-deva-in",
          pww: "pww-thai-th",
          pxm: "pxm-latn-mx",
          pye: "pye-latn-ci",
          pym: "pym-latn-ng",
          pyn: "pyn-latn-br",
          pyu: "pyu-latn-tw",
          "pyu-hani": "pyu-hani-tw",
          pyx: "pyx-mymr-mm",
          pyy: "pyy-latn-mm",
          pzh: "pzh-latn-tw",
          pzn: "pzn-latn-mm",
          qu: "qu-latn-pe",
          qua: "qua-latn-us",
          qub: "qub-latn-pe",
          quc: "quc-latn-gt",
          qud: "qud-latn-ec",
          quf: "quf-latn-pe",
          qug: "qug-latn-ec",
          qui: "qui-latn-us",
          quk: "quk-latn-pe",
          qul: "qul-latn-bo",
          qum: "qum-latn-gt",
          qun: "qun-latn-us",
          qup: "qup-latn-pe",
          quq: "quq-latn-es",
          qur: "qur-latn-pe",
          qus: "qus-latn-ar",
          quv: "quv-latn-gt",
          quw: "quw-latn-ec",
          qux: "qux-latn-pe",
          quy: "quy-latn-pe",
          qva: "qva-latn-pe",
          qvc: "qvc-latn-pe",
          qve: "qve-latn-pe",
          qvh: "qvh-latn-pe",
          qvi: "qvi-latn-ec",
          qvj: "qvj-latn-ec",
          qvl: "qvl-latn-pe",
          qvm: "qvm-latn-pe",
          qvn: "qvn-latn-pe",
          qvo: "qvo-latn-pe",
          qvp: "qvp-latn-pe",
          qvs: "qvs-latn-pe",
          qvw: "qvw-latn-pe",
          qvz: "qvz-latn-ec",
          qwa: "qwa-latn-pe",
          qwc: "qwc-latn-pe",
          qwh: "qwh-latn-pe",
          qwm: "qwm-latn-ru",
          "qwm-cyrl": "qwm-cyrl-ru",
          "qwm-runr": "qwm-runr-ru",
          qws: "qws-latn-pe",
          qwt: "qwt-latn-us",
          qxa: "qxa-latn-pe",
          qxc: "qxc-latn-pe",
          qxh: "qxh-latn-pe",
          qxl: "qxl-latn-ec",
          qxn: "qxn-latn-pe",
          qxo: "qxo-latn-pe",
          qxp: "qxp-latn-pe",
          qxq: "qxq-arab-ir",
          qxr: "qxr-latn-ec",
          qxt: "qxt-latn-pe",
          qxu: "qxu-latn-pe",
          qxw: "qxw-latn-pe",
          qya: "qya-latn-001",
          qyp: "qyp-latn-us",
          raa: "raa-deva-np",
          rab: "rab-deva-np",
          rac: "rac-latn-id",
          rad: "rad-latn-vn",
          raf: "raf-deva-np",
          rag: "rag-latn-ke",
          rah: "rah-beng-in",
          "rah-latn": "rah-latn-in",
          rai: "rai-latn-zz",
          raj: "raj-deva-in",
          rak: "rak-latn-pg",
          ram: "ram-latn-br",
          ran: "ran-latn-id",
          rao: "rao-latn-zz",
          rap: "rap-latn-cl",
          rar: "rar-latn-ck",
          rav: "rav-deva-np",
          raw: "raw-latn-mm",
          rax: "rax-latn-ng",
          ray: "ray-latn-pf",
          raz: "raz-latn-id",
          rbb: "rbb-mymr-mm",
          rbk: "rbk-latn-ph",
          rbl: "rbl-latn-ph",
          rbp: "rbp-latn-au",
          rcf: "rcf-latn-re",
          rdb: "rdb-arab-ir",
          rea: "rea-latn-pg",
          reb: "reb-latn-id",
          ree: "ree-latn-my",
          reg: "reg-latn-tz",
          rei: "rei-orya-in",
          "rei-telu": "rei-telu-in",
          rej: "rej-latn-id",
          rel: "rel-latn-zz",
          rem: "rem-latn-pe",
          ren: "ren-latn-vn",
          res: "res-latn-zz",
          ret: "ret-latn-id",
          rey: "rey-latn-bo",
          rga: "rga-latn-vu",
          rgn: "rgn-latn-it",
          rgr: "rgr-latn-pe",
          rgs: "rgs-latn-vn",
          rgu: "rgu-latn-id",
          rhg: "rhg-rohg-mm",
          rhp: "rhp-latn-pg",
          ria: "ria-latn-in",
          rif: "rif-latn-ma",
          ril: "ril-latn-mm",
          rim: "rim-latn-tz",
          rin: "rin-latn-ng",
          rir: "rir-latn-id",
          rit: "rit-latn-au",
          riu: "riu-latn-id",
          rjg: "rjg-latn-id",
          rji: "rji-deva-np",
          rjs: "rjs-deva-np",
          rka: "rka-khmr-kh",
          rkb: "rkb-latn-br",
          rkh: "rkh-latn-ck",
          rki: "rki-mymr-mm",
          rkm: "rkm-latn-bf",
          rkt: "rkt-beng-bd",
          rkw: "rkw-latn-au",
          rm: "rm-latn-ch",
          rma: "rma-latn-ni",
          rmb: "rmb-latn-au",
          rmc: "rmc-latn-sk",
          rmd: "rmd-latn-dk",
          rme: "rme-latn-gb",
          rmf: "rmf-latn-fi",
          rmg: "rmg-latn-no",
          rmh: "rmh-latn-id",
          rmi: "rmi-armn-am",
          rmk: "rmk-latn-pg",
          rml: "rml-latn-pl",
          "rml-cyrl": "rml-cyrl-by",
          rmm: "rmm-latn-id",
          rmn: "rmn-latn-rs",
          "rmn-cyrl": "rmn-cyrl-bg",
          "rmn-grek": "rmn-grek-gr",
          rmo: "rmo-latn-ch",
          rmp: "rmp-latn-pg",
          rmq: "rmq-latn-es",
          rmt: "rmt-arab-ir",
          rmu: "rmu-latn-se",
          rmw: "rmw-latn-gb",
          rmx: "rmx-latn-vn",
          rmz: "rmz-mymr-in",
          rn: "rn-latn-bi",
          rna: "rna-latn-zz",
          rnd: "rnd-latn-cd",
          rng: "rng-latn-mz",
          rnl: "rnl-latn-in",
          rnn: "rnn-latn-id",
          rnr: "rnr-latn-au",
          rnw: "rnw-latn-tz",
          ro: "ro-latn-ro",
          rob: "rob-latn-id",
          roc: "roc-latn-vn",
          rod: "rod-latn-ng",
          roe: "roe-latn-pg",
          rof: "rof-latn-tz",
          rog: "rog-latn-vn",
          rol: "rol-latn-ph",
          rom: "rom-latn-ro",
          "rom-cyrl": "rom-cyrl-ro",
          roo: "roo-latn-zz",
          rop: "rop-latn-au",
          ror: "ror-latn-id",
          rou: "rou-latn-td",
          row: "row-latn-id",
          rpn: "rpn-latn-vu",
          rpt: "rpt-latn-pg",
          rri: "rri-latn-sb",
          rro: "rro-latn-zz",
          rrt: "rrt-latn-au",
          rsk: "rsk-cyrl-rs",
          rtc: "rtc-latn-mm",
          rth: "rth-latn-id",
          rtm: "rtm-latn-fj",
          rtw: "rtw-deva-in",
          ru: "ru-cyrl-ru",
          rub: "rub-latn-ug",
          ruc: "ruc-latn-ug",
          rue: "rue-cyrl-ua",
          ruf: "ruf-latn-tz",
          rug: "rug-latn-sb",
          rui: "rui-latn-tz",
          ruk: "ruk-latn-ng",
          ruo: "ruo-latn-hr",
          rup: "rup-latn-ro",
          "rup-grek": "rup-grek-gr",
          ruq: "ruq-latn-gr",
          rut: "rut-cyrl-ru",
          "rut-latn": "rut-latn-az",
          ruu: "ruu-latn-my",
          ruy: "ruy-latn-ng",
          ruz: "ruz-latn-ng",
          rw: "rw-latn-rw",
          rwa: "rwa-latn-pg",
          rwk: "rwk-latn-tz",
          rwl: "rwl-latn-tz",
          rwm: "rwm-latn-ug",
          rwo: "rwo-latn-zz",
          rwr: "rwr-deva-in",
          rxd: "rxd-latn-au",
          rxw: "rxw-latn-au",
          ryu: "ryu-kana-jp",
          sa: "sa-deva-in",
          saa: "saa-latn-td",
          sab: "sab-latn-pa",
          sac: "sac-latn-us",
          sad: "sad-latn-tz",
          sae: "sae-latn-br",
          saf: "saf-latn-gh",
          sah: "sah-cyrl-ru",
          saj: "saj-latn-id",
          sak: "sak-latn-ga",
          sam: "sam-samr-ps",
          "sam-hebr": "sam-hebr-ps",
          "sam-syrc": "sam-syrc-ps",
          sao: "sao-latn-id",
          saq: "saq-latn-ke",
          sar: "sar-latn-bo",
          sas: "sas-latn-id",
          sat: "sat-olck-in",
          sau: "sau-latn-id",
          sav: "sav-latn-sn",
          saw: "saw-latn-id",
          sax: "sax-latn-vu",
          say: "say-latn-ng",
          saz: "saz-saur-in",
          sba: "sba-latn-zz",
          sbb: "sbb-latn-sb",
          sbc: "sbc-latn-pg",
          sbd: "sbd-latn-bf",
          sbe: "sbe-latn-zz",
          sbg: "sbg-latn-id",
          sbh: "sbh-latn-pg",
          sbi: "sbi-latn-pg",
          sbj: "sbj-latn-td",
          sbk: "sbk-latn-tz",
          sbl: "sbl-latn-ph",
          sbm: "sbm-latn-tz",
          sbn: "sbn-arab-pk",
          sbo: "sbo-latn-my",
          sbp: "sbp-latn-tz",
          sbq: "sbq-latn-pg",
          sbr: "sbr-latn-id",
          sbs: "sbs-latn-na",
          sbt: "sbt-latn-id",
          sbu: "sbu-tibt-in",
          "sbu-deva": "sbu-deva-in",
          sbv: "sbv-latn-it",
          sbw: "sbw-latn-ga",
          sbx: "sbx-latn-id",
          sby: "sby-latn-zm",
          sbz: "sbz-latn-cf",
          sc: "sc-latn-it",
          scb: "scb-latn-vn",
          sce: "sce-latn-cn",
          "sce-arab": "sce-arab-cn",
          scf: "scf-latn-pa",
          scg: "scg-latn-id",
          sch: "sch-latn-in",
          sci: "sci-latn-lk",
          sck: "sck-deva-in",
          scl: "scl-arab-zz",
          scn: "scn-latn-it",
          sco: "sco-latn-gb",
          scp: "scp-deva-np",
          scs: "scs-latn-ca",
          "scs-cans": "scs-cans-ca",
          sct: "sct-laoo-la",
          scu: "scu-takr-in",
          scv: "scv-latn-ng",
          scw: "scw-latn-ng",
          scx: "scx-grek-it",
          sd: "sd-arab-pk",
          "sd-deva": "sd-deva-in",
          "sd-in": "sd-deva-in",
          "sd-khoj": "sd-khoj-in",
          "sd-sind": "sd-sind-in",
          sda: "sda-latn-id",
          sdb: "sdb-arab-iq",
          sdc: "sdc-latn-it",
          sde: "sde-latn-ng",
          sdf: "sdf-arab-iq",
          sdg: "sdg-arab-af",
          sdh: "sdh-arab-ir",
          sdj: "sdj-latn-cg",
          sdk: "sdk-latn-pg",
          sdn: "sdn-latn-it",
          sdo: "sdo-latn-my",
          sdq: "sdq-latn-id",
          sds: "sds-arab-tn",
          sdu: "sdu-latn-id",
          sdx: "sdx-latn-my",
          se: "se-latn-no",
          sea: "sea-latn-my",
          seb: "seb-latn-ci",
          sec: "sec-latn-ca",
          sed: "sed-latn-vn",
          see: "see-latn-us",
          sef: "sef-latn-ci",
          seg: "seg-latn-tz",
          seh: "seh-latn-mz",
          sei: "sei-latn-mx",
          sej: "sej-latn-pg",
          sek: "sek-latn-ca",
          "sek-cans": "sek-cans-ca",
          sel: "sel-cyrl-ru",
          sen: "sen-latn-bf",
          seo: "seo-latn-pg",
          sep: "sep-latn-bf",
          seq: "seq-latn-bf",
          ser: "ser-latn-us",
          ses: "ses-latn-ml",
          set: "set-latn-id",
          seu: "seu-latn-id",
          sev: "sev-latn-ci",
          sew: "sew-latn-pg",
          sey: "sey-latn-ec",
          sez: "sez-latn-mm",
          sfe: "sfe-latn-ph",
          sfm: "sfm-plrd-cn",
          sfw: "sfw-latn-gh",
          sg: "sg-latn-cf",
          sga: "sga-ogam-ie",
          sgb: "sgb-latn-ph",
          sgc: "sgc-latn-ke",
          sgd: "sgd-latn-ph",
          sge: "sge-latn-id",
          sgh: "sgh-cyrl-tj",
          "sgh-arab": "sgh-arab-af",
          "sgh-latn": "sgh-latn-tj",
          sgi: "sgi-latn-cm",
          sgj: "sgj-deva-in",
          sgm: "sgm-latn-ke",
          sgp: "sgp-latn-in",
          sgr: "sgr-arab-ir",
          sgs: "sgs-latn-lt",
          sgt: "sgt-tibt-bt",
          sgu: "sgu-latn-id",
          sgw: "sgw-ethi-zz",
          sgy: "sgy-arab-af",
          sgz: "sgz-latn-zz",
          sha: "sha-latn-ng",
          shb: "shb-latn-br",
          shc: "shc-latn-cd",
          shd: "shd-arab-pk",
          she: "she-latn-et",
          shg: "shg-latn-bw",
          shh: "shh-latn-us",
          shi: "shi-tfng-ma",
          shj: "shj-latn-sd",
          shk: "shk-latn-zz",
          shm: "shm-arab-ir",
          shn: "shn-mymr-mm",
          sho: "sho-latn-ng",
          shp: "shp-latn-pe",
          shq: "shq-latn-zm",
          shr: "shr-latn-cd",
          shs: "shs-latn-ca",
          sht: "sht-latn-us",
          shu: "shu-arab-zz",
          shv: "shv-arab-om",
          shw: "shw-latn-sd",
          shy: "shy-latn-dz",
          "shy-arab": "shy-arab-dz",
          "shy-tfng": "shy-tfng-dz",
          shz: "shz-latn-ml",
          si: "si-sinh-lk",
          sia: "sia-cyrl-ru",
          sib: "sib-latn-my",
          sid: "sid-latn-et",
          sie: "sie-latn-zm",
          sif: "sif-latn-bf",
          sig: "sig-latn-zz",
          sih: "sih-latn-nc",
          sii: "sii-latn-in",
          sij: "sij-latn-pg",
          sik: "sik-latn-br",
          sil: "sil-latn-zz",
          sim: "sim-latn-zz",
          sip: "sip-tibt-in",
          siq: "siq-latn-pg",
          sir: "sir-latn-ng",
          sis: "sis-latn-us",
          siu: "siu-latn-pg",
          siv: "siv-latn-pg",
          siw: "siw-latn-pg",
          six: "six-latn-pg",
          siy: "siy-arab-ir",
          siz: "siz-arab-eg",
          sja: "sja-latn-co",
          sjb: "sjb-latn-id",
          sjd: "sjd-cyrl-ru",
          sje: "sje-latn-se",
          sjg: "sjg-latn-td",
          sjl: "sjl-latn-in",
          sjm: "sjm-latn-ph",
          sjp: "sjp-deva-in",
          "sjp-beng": "sjp-beng-in",
          sjr: "sjr-latn-zz",
          sjt: "sjt-cyrl-ru",
          sju: "sju-latn-se",
          sjw: "sjw-latn-us",
          sk: "sk-latn-sk",
          ska: "ska-latn-us",
          skb: "skb-thai-th",
          skc: "skc-latn-zz",
          skd: "skd-latn-us",
          ske: "ske-latn-vu",
          skf: "skf-latn-br",
          skg: "skg-latn-mg",
          skh: "skh-latn-id",
          ski: "ski-latn-id",
          skj: "skj-deva-np",
          skm: "skm-latn-pg",
          skn: "skn-latn-ph",
          sko: "sko-latn-id",
          skp: "skp-latn-my",
          skq: "skq-latn-bf",
          skr: "skr-arab-pk",
          sks: "sks-latn-zz",
          skt: "skt-latn-cd",
          sku: "sku-latn-vu",
          skv: "skv-latn-id",
          skw: "skw-latn-gy",
          skx: "skx-latn-id",
          sky: "sky-latn-sb",
          skz: "skz-latn-id",
          sl: "sl-latn-si",
          slc: "slc-latn-co",
          sld: "sld-latn-zz",
          slg: "slg-latn-id",
          slh: "slh-latn-us",
          sli: "sli-latn-pl",
          slj: "slj-latn-br",
          sll: "sll-latn-zz",
          slm: "slm-latn-ph",
          sln: "sln-latn-us",
          slp: "slp-latn-id",
          slq: "slq-arab-ir",
          slr: "slr-latn-cn",
          slu: "slu-latn-id",
          slw: "slw-latn-pg",
          slx: "slx-latn-cd",
          sly: "sly-latn-id",
          slz: "slz-latn-id",
          sm: "sm-latn-ws",
          sma: "sma-latn-se",
          smb: "smb-latn-pg",
          smc: "smc-latn-pg",
          smd: "smd-latn-ao",
          smf: "smf-latn-pg",
          smg: "smg-latn-pg",
          smh: "smh-yiii-cn",
          smj: "smj-latn-se",
          smk: "smk-latn-ph",
          sml: "sml-latn-ph",
          smn: "smn-latn-fi",
          smp: "smp-samr-il",
          smq: "smq-latn-zz",
          smr: "smr-latn-id",
          sms: "sms-latn-fi",
          smt: "smt-latn-in",
          smu: "smu-khmr-kh",
          smw: "smw-latn-id",
          smx: "smx-latn-cd",
          smy: "smy-arab-ir",
          smz: "smz-latn-pg",
          sn: "sn-latn-zw",
          snb: "snb-latn-my",
          snc: "snc-latn-zz",
          sne: "sne-latn-my",
          snf: "snf-latn-sn",
          sng: "sng-latn-cd",
          "sng-brai": "sng-brai-cd",
          sni: "sni-latn-pe",
          snj: "snj-latn-cf",
          snk: "snk-latn-ml",
          snl: "snl-latn-ph",
          snm: "snm-latn-ug",
          snn: "snn-latn-co",
          sno: "sno-latn-us",
          snp: "snp-latn-zz",
          snq: "snq-latn-ga",
          snr: "snr-latn-pg",
          sns: "sns-latn-vu",
          snu: "snu-latn-id",
          snv: "snv-latn-my",
          snw: "snw-latn-gh",
          snx: "snx-latn-zz",
          sny: "sny-latn-zz",
          snz: "snz-latn-pg",
          so: "so-latn-so",
          soa: "soa-tavt-th",
          "soa-thai": "soa-thai-th",
          sob: "sob-latn-id",
          soc: "soc-latn-cd",
          sod: "sod-latn-cd",
          soe: "soe-latn-cd",
          sog: "sog-sogd-uz",
          soi: "soi-deva-np",
          sok: "sok-latn-zz",
          sol: "sol-latn-pg",
          soo: "soo-latn-cd",
          sop: "sop-latn-cd",
          soq: "soq-latn-zz",
          sor: "sor-latn-td",
          sos: "sos-latn-bf",
          sou: "sou-thai-th",
          sov: "sov-latn-pw",
          sow: "sow-latn-pg",
          sox: "sox-latn-cm",
          soy: "soy-latn-zz",
          soz: "soz-latn-tz",
          spb: "spb-latn-id",
          spc: "spc-latn-ve",
          spd: "spd-latn-zz",
          spe: "spe-latn-pg",
          spg: "spg-latn-my",
          spi: "spi-latn-id",
          spk: "spk-latn-pg",
          spl: "spl-latn-zz",
          spm: "spm-latn-pg",
          spn: "spn-latn-py",
          spo: "spo-latn-us",
          spp: "spp-latn-ml",
          spq: "spq-latn-pe",
          spr: "spr-latn-id",
          sps: "sps-latn-zz",
          spt: "spt-tibt-in",
          spv: "spv-orya-in",
          sq: "sq-latn-al",
          sqa: "sqa-latn-ng",
          sqh: "sqh-latn-ng",
          sqm: "sqm-latn-cf",
          sqo: "sqo-arab-ir",
          sqq: "sqq-laoo-la",
          sqt: "sqt-arab-ye",
          "sqt-latn": "sqt-latn-ye",
          squ: "squ-latn-ca",
          sr: "sr-cyrl-rs",
          "sr-me": "sr-latn-me",
          "sr-ro": "sr-latn-ro",
          "sr-ru": "sr-latn-ru",
          "sr-tr": "sr-latn-tr",
          sra: "sra-latn-pg",
          srb: "srb-sora-in",
          sre: "sre-latn-id",
          srf: "srf-latn-pg",
          srg: "srg-latn-ph",
          srh: "srh-arab-cn",
          sri: "sri-latn-co",
          srk: "srk-latn-my",
          srl: "srl-latn-id",
          srm: "srm-latn-sr",
          srn: "srn-latn-sr",
          sro: "sro-latn-it",
          srq: "srq-latn-bo",
          srr: "srr-latn-sn",
          srs: "srs-latn-ca",
          srt: "srt-latn-id",
          sru: "sru-latn-br",
          srv: "srv-latn-ph",
          srw: "srw-latn-id",
          srx: "srx-deva-in",
          sry: "sry-latn-pg",
          srz: "srz-arab-ir",
          ss: "ss-latn-za",
          ssb: "ssb-latn-ph",
          ssc: "ssc-latn-tz",
          ssd: "ssd-latn-zz",
          sse: "sse-latn-ph",
          "sse-arab": "sse-arab-ph",
          ssf: "ssf-latn-tw",
          ssg: "ssg-latn-zz",
          ssh: "ssh-arab-ae",
          ssj: "ssj-latn-pg",
          ssl: "ssl-latn-gh",
          ssm: "ssm-latn-my",
          ssn: "ssn-latn-ke",
          sso: "sso-latn-pg",
          ssq: "ssq-latn-id",
          sss: "sss-laoo-la",
          "sss-thai": "sss-thai-th",
          sst: "sst-latn-pg",
          ssu: "ssu-latn-pg",
          ssv: "ssv-latn-vu",
          ssx: "ssx-latn-pg",
          ssy: "ssy-latn-er",
          ssz: "ssz-latn-pg",
          st: "st-latn-za",
          sta: "sta-latn-zm",
          stb: "stb-latn-ph",
          ste: "ste-latn-id",
          stf: "stf-latn-pg",
          stg: "stg-latn-vn",
          sth: "sth-latn-ie",
          sti: "sti-latn-vn",
          "sti-kh": "sti-latn-kh",
          stj: "stj-latn-bf",
          stk: "stk-latn-zz",
          stl: "stl-latn-nl",
          stm: "stm-latn-pg",
          stn: "stn-latn-sb",
          sto: "sto-latn-ca",
          stp: "stp-latn-mx",
          stq: "stq-latn-de",
          str: "str-latn-ca",
          sts: "sts-arab-af",
          stt: "stt-latn-vn",
          stv: "stv-ethi-et",
          "stv-arab": "stv-arab-et",
          stw: "stw-latn-fm",
          sty: "sty-cyrl-ru",
          su: "su-latn-id",
          sua: "sua-latn-zz",
          sub: "sub-latn-cd",
          suc: "suc-latn-ph",
          sue: "sue-latn-zz",
          sug: "sug-latn-pg",
          sui: "sui-latn-pg",
          suj: "suj-latn-tz",
          suk: "suk-latn-tz",
          suo: "suo-latn-pg",
          suq: "suq-latn-et",
          "suq-ethi": "suq-ethi-et",
          sur: "sur-latn-zz",
          sus: "sus-latn-gn",
          sut: "sut-latn-ni",
          suv: "suv-latn-in",
          "suv-beng": "suv-beng-in",
          "suv-deva": "suv-deva-in",
          suw: "suw-latn-tz",
          suy: "suy-latn-br",
          suz: "suz-deva-np",
          sv: "sv-latn-se",
          sva: "sva-geor-ge",
          "sva-cyrl": "sva-cyrl-ge",
          "sva-latn": "sva-latn-ge",
          svb: "svb-latn-pg",
          svc: "svc-latn-vc",
          sve: "sve-latn-id",
          svm: "svm-latn-it",
          svs: "svs-latn-sb",
          sw: "sw-latn-tz",
          swb: "swb-arab-yt",
          swc: "swc-latn-cd",
          swf: "swf-latn-cd",
          swg: "swg-latn-de",
          swi: "swi-hani-cn",
          swj: "swj-latn-ga",
          swk: "swk-latn-mw",
          swm: "swm-latn-pg",
          swo: "swo-latn-br",
          swp: "swp-latn-zz",
          swq: "swq-latn-cm",
          swr: "swr-latn-id",
          sws: "sws-latn-id",
          swt: "swt-latn-id",
          swu: "swu-latn-id",
          swv: "swv-deva-in",
          sww: "sww-latn-vu",
          swx: "swx-latn-br",
          swy: "swy-latn-td",
          sxb: "sxb-latn-ke",
          sxe: "sxe-latn-ga",
          sxn: "sxn-latn-id",
          sxr: "sxr-latn-tw",
          sxs: "sxs-latn-ng",
          sxu: "sxu-latn-de",
          "sxu-runr": "sxu-runr-de",
          sxw: "sxw-latn-zz",
          sya: "sya-latn-id",
          syb: "syb-latn-ph",
          syc: "syc-syrc-tr",
          syi: "syi-latn-ga",
          syk: "syk-latn-ng",
          syl: "syl-beng-bd",
          sym: "sym-latn-bf",
          syn: "syn-syrc-ir",
          syo: "syo-latn-kh",
          syr: "syr-syrc-iq",
          sys: "sys-latn-td",
          syw: "syw-deva-np",
          syx: "syx-latn-ga",
          sza: "sza-latn-my",
          szb: "szb-latn-id",
          szc: "szc-latn-my",
          szd: "szd-latn-my",
          szg: "szg-latn-cd",
          szl: "szl-latn-pl",
          szn: "szn-latn-id",
          szp: "szp-latn-id",
          szv: "szv-latn-cm",
          szw: "szw-latn-id",
          szy: "szy-latn-tw",
          ta: "ta-taml-in",
          taa: "taa-latn-us",
          tab: "tab-cyrl-ru",
          tac: "tac-latn-mx",
          tad: "tad-latn-id",
          tae: "tae-latn-br",
          taf: "taf-latn-br",
          tag: "tag-latn-sd",
          taj: "taj-deva-np",
          tak: "tak-latn-ng",
          tal: "tal-latn-zz",
          tan: "tan-latn-zz",
          tao: "tao-latn-tw",
          tap: "tap-latn-cd",
          taq: "taq-latn-zz",
          tar: "tar-latn-mx",
          tas: "tas-latn-vn",
          tau: "tau-latn-us",
          tav: "tav-latn-co",
          taw: "taw-latn-pg",
          tax: "tax-latn-td",
          tay: "tay-latn-tw",
          "tay-hans": "tay-hans-tw",
          "tay-hant": "tay-hant-tw",
          taz: "taz-latn-sd",
          tba: "tba-latn-br",
          tbc: "tbc-latn-zz",
          tbd: "tbd-latn-zz",
          tbe: "tbe-latn-sb",
          tbf: "tbf-latn-zz",
          tbg: "tbg-latn-zz",
          tbh: "tbh-latn-au",
          tbi: "tbi-latn-sd",
          tbj: "tbj-latn-pg",
          tbk: "tbk-tagb-ph",
          "tbk-hano": "tbk-hano-ph",
          "tbk-latn": "tbk-latn-ph",
          tbl: "tbl-latn-ph",
          tbm: "tbm-latn-cd",
          tbn: "tbn-latn-co",
          tbo: "tbo-latn-zz",
          tbp: "tbp-latn-id",
          tbs: "tbs-latn-pg",
          tbt: "tbt-latn-cd",
          tbu: "tbu-latn-mx",
          tbv: "tbv-latn-pg",
          tbw: "tbw-latn-ph",
          tbx: "tbx-latn-pg",
          tby: "tby-latn-id",
          tbz: "tbz-latn-zz",
          tca: "tca-latn-br",
          tcb: "tcb-latn-us",
          tcc: "tcc-latn-tz",
          tcd: "tcd-latn-gh",
          tce: "tce-latn-ca",
          tcf: "tcf-latn-mx",
          tcg: "tcg-latn-id",
          tch: "tch-latn-tc",
          tci: "tci-latn-zz",
          tck: "tck-latn-ga",
          tcm: "tcm-latn-id",
          tcn: "tcn-tibt-np",
          tco: "tco-mymr-mm",
          tcp: "tcp-latn-mm",
          tcq: "tcq-latn-id",
          tcs: "tcs-latn-au",
          tcu: "tcu-latn-mx",
          tcw: "tcw-latn-mx",
          tcx: "tcx-taml-in",
          tcy: "tcy-knda-in",
          tcz: "tcz-latn-in",
          tda: "tda-tfng-ne",
          "tda-arab": "tda-arab-ne",
          "tda-latn": "tda-latn-ne",
          tdb: "tdb-deva-in",
          "tdb-beng": "tdb-beng-in",
          "tdb-kthi": "tdb-kthi-in",
          tdc: "tdc-latn-co",
          tdd: "tdd-tale-cn",
          tde: "tde-latn-ml",
          tdg: "tdg-deva-np",
          tdh: "tdh-deva-np",
          tdi: "tdi-latn-id",
          tdj: "tdj-latn-id",
          tdk: "tdk-latn-ng",
          tdl: "tdl-latn-ng",
          tdm: "tdm-latn-gy",
          tdn: "tdn-latn-id",
          tdo: "tdo-latn-ng",
          tdq: "tdq-latn-ng",
          tdr: "tdr-latn-vn",
          tds: "tds-latn-id",
          tdt: "tdt-latn-tl",
          tdu: "tdu-latn-my",
          tdv: "tdv-latn-ng",
          tdx: "tdx-latn-mg",
          tdy: "tdy-latn-ph",
          te: "te-telu-in",
          tea: "tea-latn-my",
          teb: "teb-latn-ec",
          tec: "tec-latn-ke",
          ted: "ted-latn-zz",
          tee: "tee-latn-mx",
          teg: "teg-latn-ga",
          teh: "teh-latn-ar",
          tei: "tei-latn-pg",
          tek: "tek-latn-cd",
          tem: "tem-latn-sl",
          ten: "ten-latn-co",
          teo: "teo-latn-ug",
          tep: "tep-latn-mx",
          teq: "teq-latn-sd",
          ter: "ter-latn-br",
          tes: "tes-java-id",
          tet: "tet-latn-tl",
          teu: "teu-latn-ug",
          tev: "tev-latn-id",
          tew: "tew-latn-us",
          tex: "tex-latn-ss",
          tey: "tey-latn-sd",
          tfi: "tfi-latn-zz",
          tfn: "tfn-latn-us",
          tfo: "tfo-latn-id",
          tfr: "tfr-latn-pa",
          tft: "tft-latn-id",
          tg: "tg-cyrl-tj",
          "tg-arab": "tg-arab-pk",
          "tg-pk": "tg-arab-pk",
          tga: "tga-latn-ke",
          tgb: "tgb-latn-my",
          tgc: "tgc-latn-zz",
          tgd: "tgd-latn-ng",
          tge: "tge-deva-np",
          tgf: "tgf-tibt-bt",
          tgh: "tgh-latn-tt",
          tgi: "tgi-latn-pg",
          tgj: "tgj-latn-in",
          tgn: "tgn-latn-ph",
          tgo: "tgo-latn-zz",
          tgp: "tgp-latn-vu",
          tgq: "tgq-latn-my",
          tgs: "tgs-latn-vu",
          tgt: "tgt-latn-ph",
          "tgt-hano": "tgt-hano-ph",
          "tgt-tagb": "tgt-tagb-ph",
          tgu: "tgu-latn-zz",
          tgv: "tgv-latn-br",
          tgw: "tgw-latn-ci",
          tgx: "tgx-latn-ca",
          tgy: "tgy-latn-ss",
          tgz: "tgz-latn-au",
          th: "th-thai-th",
          thd: "thd-latn-au",
          the: "the-deva-np",
          thf: "thf-deva-np",
          thh: "thh-latn-mx",
          thi: "thi-tale-la",
          thk: "thk-latn-ke",
          thl: "thl-deva-np",
          thm: "thm-thai-th",
          thp: "thp-latn-ca",
          "thp-dupl": "thp-dupl-ca",
          thq: "thq-deva-np",
          thr: "thr-deva-np",
          ths: "ths-deva-np",
          tht: "tht-latn-ca",
          thu: "thu-latn-ss",
          thv: "thv-latn-dz",
          "thv-arab": "thv-arab-dz",
          "thv-tfng": "thv-tfng-dz",
          thy: "thy-latn-ng",
          thz: "thz-latn-ne",
          "thz-tfng": "thz-tfng-ne",
          ti: "ti-ethi-et",
          tic: "tic-latn-sd",
          tif: "tif-latn-zz",
          tig: "tig-ethi-er",
          tih: "tih-latn-my",
          tii: "tii-latn-cd",
          tij: "tij-deva-np",
          tik: "tik-latn-zz",
          til: "til-latn-us",
          tim: "tim-latn-zz",
          tin: "tin-cyrl-ru",
          tio: "tio-latn-zz",
          tip: "tip-latn-id",
          tiq: "tiq-latn-bf",
          tis: "tis-latn-ph",
          tit: "tit-latn-co",
          tiu: "tiu-latn-ph",
          tiv: "tiv-latn-ng",
          tiw: "tiw-latn-au",
          tix: "tix-latn-us",
          tiy: "tiy-latn-ph",
          tja: "tja-latn-lr",
          tjg: "tjg-latn-id",
          tji: "tji-latn-cn",
          tjj: "tjj-latn-au",
          tjl: "tjl-mymr-mm",
          tjn: "tjn-latn-ci",
          tjo: "tjo-arab-dz",
          tjp: "tjp-latn-au",
          tjs: "tjs-latn-cn",
          tju: "tju-latn-au",
          tjw: "tjw-latn-au",
          tk: "tk-latn-tm",
          tka: "tka-latn-br",
          tkb: "tkb-deva-in",
          tkd: "tkd-latn-tl",
          tke: "tke-latn-mz",
          tkf: "tkf-latn-br",
          tkg: "tkg-latn-mg",
          tkl: "tkl-latn-tk",
          tkp: "tkp-latn-sb",
          tkq: "tkq-latn-ng",
          tkr: "tkr-latn-az",
          tks: "tks-arab-ir",
          tkt: "tkt-deva-np",
          tku: "tku-latn-mx",
          tkv: "tkv-latn-pg",
          tkw: "tkw-latn-sb",
          tkx: "tkx-latn-id",
          tkz: "tkz-latn-vn",
          tl: "tl-latn-ph",
          tla: "tla-latn-mx",
          tlb: "tlb-latn-id",
          tlc: "tlc-latn-mx",
          tld: "tld-latn-id",
          tlf: "tlf-latn-zz",
          tlg: "tlg-latn-id",
          tli: "tli-latn-us",
          "tli-cyrl": "tli-cyrl-us",
          tlj: "tlj-latn-ug",
          tlk: "tlk-latn-id",
          tll: "tll-latn-cd",
          tlm: "tlm-latn-vu",
          tln: "tln-latn-id",
          tlp: "tlp-latn-mx",
          tlq: "tlq-latn-mm",
          tlr: "tlr-latn-sb",
          tls: "tls-latn-vu",
          tlt: "tlt-latn-id",
          tlu: "tlu-latn-id",
          tlv: "tlv-latn-id",
          tlx: "tlx-latn-zz",
          tly: "tly-latn-az",
          tma: "tma-latn-td",
          tmb: "tmb-latn-vu",
          tmc: "tmc-latn-td",
          tmd: "tmd-latn-pg",
          tme: "tme-latn-br",
          tmf: "tmf-latn-py",
          tmg: "tmg-latn-id",
          tmh: "tmh-latn-ne",
          tmi: "tmi-latn-vu",
          tmj: "tmj-latn-id",
          tmk: "tmk-deva-np",
          tml: "tml-latn-id",
          tmm: "tmm-latn-vn",
          tmn: "tmn-latn-id",
          tmo: "tmo-latn-my",
          tmq: "tmq-latn-pg",
          tmr: "tmr-syrc-il",
          tmt: "tmt-latn-vu",
          tmu: "tmu-latn-id",
          tmv: "tmv-latn-cd",
          tmw: "tmw-latn-my",
          tmy: "tmy-latn-zz",
          tmz: "tmz-latn-ve",
          tn: "tn-latn-za",
          tna: "tna-latn-bo",
          tnb: "tnb-latn-co",
          tnc: "tnc-latn-co",
          tnd: "tnd-latn-co",
          tng: "tng-latn-td",
          tnh: "tnh-latn-zz",
          tni: "tni-latn-id",
          tnk: "tnk-latn-vu",
          tnl: "tnl-latn-vu",
          tnm: "tnm-latn-id",
          tnn: "tnn-latn-vu",
          tno: "tno-latn-bo",
          tnp: "tnp-latn-vu",
          tnq: "tnq-latn-pr",
          tnr: "tnr-latn-sn",
          tns: "tns-latn-pg",
          tnt: "tnt-latn-id",
          tnv: "tnv-cakm-bd",
          tnw: "tnw-latn-id",
          tnx: "tnx-latn-sb",
          tny: "tny-latn-tz",
          to: "to-latn-to",
          tob: "tob-latn-ar",
          toc: "toc-latn-mx",
          tod: "tod-latn-gn",
          tof: "tof-latn-zz",
          tog: "tog-latn-mw",
          toh: "toh-latn-mz",
          toi: "toi-latn-zm",
          toj: "toj-latn-mx",
          tok: "tok-latn-001",
          tol: "tol-latn-us",
          tom: "tom-latn-id",
          too: "too-latn-mx",
          top: "top-latn-mx",
          toq: "toq-latn-zz",
          tor: "tor-latn-cd",
          tos: "tos-latn-mx",
          tou: "tou-latn-vn",
          tov: "tov-arab-ir",
          tow: "tow-latn-us",
          tox: "tox-latn-pw",
          toy: "toy-latn-id",
          toz: "toz-latn-cm",
          tpa: "tpa-latn-pg",
          tpc: "tpc-latn-mx",
          tpe: "tpe-latn-bd",
          "tpe-beng": "tpe-beng-bd",
          tpf: "tpf-latn-id",
          tpg: "tpg-latn-id",
          tpi: "tpi-latn-pg",
          tpj: "tpj-latn-py",
          tpk: "tpk-latn-br",
          tpl: "tpl-latn-mx",
          tpm: "tpm-latn-zz",
          tpn: "tpn-latn-br",
          tpp: "tpp-latn-mx",
          tpr: "tpr-latn-br",
          tpt: "tpt-latn-mx",
          tpu: "tpu-khmr-kh",
          tpv: "tpv-latn-mp",
          tpx: "tpx-latn-mx",
          tpy: "tpy-latn-br",
          tpz: "tpz-latn-zz",
          tqb: "tqb-latn-br",
          tql: "tql-latn-vu",
          tqm: "tqm-latn-pg",
          tqn: "tqn-latn-us",
          tqo: "tqo-latn-zz",
          tqp: "tqp-latn-pg",
          tqt: "tqt-latn-mx",
          tqu: "tqu-latn-sb",
          tqw: "tqw-latn-us",
          tr: "tr-latn-tr",
          tra: "tra-arab-af",
          trb: "trb-latn-pg",
          trc: "trc-latn-mx",
          tre: "tre-latn-id",
          trf: "trf-latn-tt",
          trg: "trg-hebr-il",
          trh: "trh-latn-pg",
          tri: "tri-latn-sr",
          trj: "trj-latn-td",
          trl: "trl-latn-gb",
          trm: "trm-arab-af",
          trn: "trn-latn-bo",
          tro: "tro-latn-in",
          trp: "trp-latn-in",
          "trp-beng": "trp-beng-in",
          trq: "trq-latn-mx",
          trr: "trr-latn-pe",
          trs: "trs-latn-mx",
          trt: "trt-latn-id",
          tru: "tru-latn-tr",
          trv: "trv-latn-tw",
          trw: "trw-arab-pk",
          trx: "trx-latn-my",
          try: "try-latn-in",
          trz: "trz-latn-br",
          ts: "ts-latn-za",
          tsa: "tsa-latn-cg",
          tsb: "tsb-latn-et",
          tsc: "tsc-latn-mz",
          tsd: "tsd-grek-gr",
          tsf: "tsf-deva-np",
          tsg: "tsg-latn-ph",
          tsh: "tsh-latn-cm",
          tsi: "tsi-latn-ca",
          tsj: "tsj-tibt-bt",
          tsl: "tsl-latn-vn",
          tsp: "tsp-latn-bf",
          tsr: "tsr-latn-vu",
          tst: "tst-latn-ml",
          tsu: "tsu-latn-tw",
          tsv: "tsv-latn-ga",
          tsw: "tsw-latn-zz",
          tsx: "tsx-latn-pg",
          tsz: "tsz-latn-mx",
          tt: "tt-cyrl-ru",
          ttb: "ttb-latn-ng",
          ttc: "ttc-latn-gt",
          ttd: "ttd-latn-zz",
          tte: "tte-latn-zz",
          ttf: "ttf-latn-cm",
          tth: "tth-laoo-la",
          tti: "tti-latn-id",
          ttj: "ttj-latn-ug",
          ttk: "ttk-latn-co",
          ttl: "ttl-latn-zm",
          ttm: "ttm-latn-ca",
          ttn: "ttn-latn-id",
          tto: "tto-laoo-la",
          ttp: "ttp-latn-id",
          ttr: "ttr-latn-zz",
          tts: "tts-thai-th",
          ttt: "ttt-latn-az",
          ttu: "ttu-latn-pg",
          ttv: "ttv-latn-pg",
          ttw: "ttw-latn-my",
          tty: "tty-latn-id",
          tua: "tua-latn-pg",
          tub: "tub-latn-us",
          tuc: "tuc-latn-pg",
          tud: "tud-latn-br",
          tue: "tue-latn-co",
          tuf: "tuf-latn-co",
          tug: "tug-latn-td",
          tuh: "tuh-latn-zz",
          tui: "tui-latn-cm",
          tuj: "tuj-latn-id",
          tul: "tul-latn-zz",
          tum: "tum-latn-mw",
          tun: "tun-latn-us",
          tuo: "tuo-latn-br",
          tuq: "tuq-latn-zz",
          tus: "tus-latn-ca",
          tuu: "tuu-latn-us",
          tuv: "tuv-latn-ke",
          tux: "tux-latn-br",
          tuy: "tuy-latn-ke",
          tuz: "tuz-latn-bf",
          tva: "tva-latn-sb",
          tvd: "tvd-latn-zz",
          tve: "tve-latn-id",
          tvk: "tvk-latn-vu",
          tvl: "tvl-latn-tv",
          tvm: "tvm-latn-id",
          tvn: "tvn-mymr-mm",
          tvo: "tvo-latn-id",
          tvs: "tvs-latn-ke",
          tvt: "tvt-latn-in",
          tvu: "tvu-latn-zz",
          tvw: "tvw-latn-id",
          tvx: "tvx-latn-tw",
          twa: "twa-latn-us",
          twb: "twb-latn-ph",
          twd: "twd-latn-nl",
          twe: "twe-latn-id",
          twf: "twf-latn-us",
          twg: "twg-latn-id",
          twh: "twh-latn-zz",
          twl: "twl-latn-mz",
          twm: "twm-deva-in",
          twn: "twn-latn-cm",
          two: "two-latn-bw",
          twp: "twp-latn-pg",
          twq: "twq-latn-ne",
          twr: "twr-latn-mx",
          twt: "twt-latn-br",
          twu: "twu-latn-id",
          tww: "tww-latn-pg",
          twx: "twx-latn-mz",
          twy: "twy-latn-id",
          txa: "txa-latn-my",
          txe: "txe-latn-id",
          txg: "txg-tang-cn",
          txi: "txi-latn-br",
          txj: "txj-latn-ng",
          txm: "txm-latn-id",
          txn: "txn-latn-id",
          txo: "txo-toto-in",
          txq: "txq-latn-id",
          txs: "txs-latn-id",
          txt: "txt-latn-id",
          txu: "txu-latn-br",
          txx: "txx-latn-my",
          txy: "txy-latn-mg",
          ty: "ty-latn-pf",
          tya: "tya-latn-zz",
          tye: "tye-latn-ng",
          tyh: "tyh-latn-vn",
          tyi: "tyi-latn-cg",
          tyj: "tyj-latn-vn",
          tyl: "tyl-latn-vn",
          tyn: "tyn-latn-id",
          typ: "typ-latn-au",
          tyr: "tyr-tavt-vn",
          tys: "tys-latn-vn",
          tyt: "tyt-latn-vn",
          "tyt-tavt": "tyt-tavt-vn",
          tyu: "tyu-latn-bw",
          tyv: "tyv-cyrl-ru",
          tyx: "tyx-latn-cg",
          tyy: "tyy-latn-ng",
          tyz: "tyz-latn-vn",
          tzh: "tzh-latn-mx",
          tzj: "tzj-latn-gt",
          tzl: "tzl-latn-001",
          tzm: "tzm-latn-ma",
          tzn: "tzn-latn-id",
          tzo: "tzo-latn-mx",
          tzx: "tzx-latn-pg",
          uam: "uam-latn-br",
          uar: "uar-latn-pg",
          uba: "uba-latn-ng",
          ubi: "ubi-latn-td",
          ubl: "ubl-latn-ph",
          ubr: "ubr-latn-pg",
          ubu: "ubu-latn-zz",
          uda: "uda-latn-ng",
          ude: "ude-cyrl-ru",
          udg: "udg-mlym-in",
          udi: "udi-aghb-ru",
          udj: "udj-latn-id",
          udl: "udl-latn-cm",
          udm: "udm-cyrl-ru",
          udu: "udu-latn-sd",
          ues: "ues-latn-id",
          ufi: "ufi-latn-pg",
          ug: "ug-arab-cn",
          "ug-cyrl": "ug-cyrl-kz",
          "ug-kz": "ug-cyrl-kz",
          "ug-mn": "ug-cyrl-mn",
          uga: "uga-ugar-sy",
          ugb: "ugb-latn-au",
          uge: "uge-latn-sb",
          ugh: "ugh-cyrl-ru",
          ugo: "ugo-thai-th",
          uha: "uha-latn-ng",
          uhn: "uhn-latn-id",
          uis: "uis-latn-pg",
          uiv: "uiv-latn-cm",
          uji: "uji-latn-ng",
          uk: "uk-cyrl-ua",
          uka: "uka-latn-id",
          ukg: "ukg-latn-pg",
          ukh: "ukh-latn-cf",
          uki: "uki-orya-in",
          ukk: "ukk-latn-mm",
          ukp: "ukp-latn-ng",
          ukq: "ukq-latn-ng",
          uku: "uku-latn-ng",
          ukv: "ukv-latn-ss",
          ukw: "ukw-latn-ng",
          uky: "uky-latn-au",
          ula: "ula-latn-ng",
          ulb: "ulb-latn-ng",
          ulc: "ulc-cyrl-ru",
          ule: "ule-latn-ar",
          ulf: "ulf-latn-id",
          uli: "uli-latn-fm",
          ulk: "ulk-latn-au",
          ulm: "ulm-latn-id",
          uln: "uln-latn-pg",
          ulu: "ulu-latn-id",
          ulw: "ulw-latn-ni",
          uma: "uma-latn-us",
          umb: "umb-latn-ao",
          umd: "umd-latn-au",
          umg: "umg-latn-au",
          umi: "umi-latn-my",
          umm: "umm-latn-ng",
          umn: "umn-latn-mm",
          umo: "umo-latn-br",
          ump: "ump-latn-au",
          umr: "umr-latn-au",
          ums: "ums-latn-id",
          una: "una-latn-pg",
          und: "en-latn-us",
          "und-002": "en-latn-ng",
          "und-003": "en-latn-us",
          "und-005": "pt-latn-br",
          "und-009": "en-latn-au",
          "und-011": "en-latn-ng",
          "und-013": "es-latn-mx",
          "und-014": "sw-latn-tz",
          "und-015": "ar-arab-eg",
          "und-017": "sw-latn-cd",
          "und-018": "en-latn-za",
          "und-019": "en-latn-us",
          "und-021": "en-latn-us",
          "und-029": "es-latn-cu",
          "und-030": "zh-hans-cn",
          "und-034": "hi-deva-in",
          "und-035": "id-latn-id",
          "und-039": "it-latn-it",
          "und-053": "en-latn-au",
          "und-054": "en-latn-pg",
          "und-057": "en-latn-gu",
          "und-061": "sm-latn-ws",
          "und-142": "zh-hans-cn",
          "und-143": "uz-latn-uz",
          "und-145": "ar-arab-sa",
          "und-150": "ru-cyrl-ru",
          "und-151": "ru-cyrl-ru",
          "und-154": "en-latn-gb",
          "und-155": "de-latn-de",
          "und-202": "en-latn-ng",
          "und-419": "es-latn-419",
          "und-ad": "ca-latn-ad",
          "und-adlm": "ff-adlm-gn",
          "und-ae": "ar-arab-ae",
          "und-af": "fa-arab-af",
          "und-aghb": "udi-aghb-ru",
          "und-ahom": "aho-ahom-in",
          "und-al": "sq-latn-al",
          "und-am": "hy-armn-am",
          "und-ao": "pt-latn-ao",
          "und-aq": "und-latn-aq",
          "und-ar": "es-latn-ar",
          "und-arab": "ar-arab-eg",
          "und-arab-cc": "ms-arab-cc",
          "und-arab-cn": "ug-arab-cn",
          "und-arab-gb": "ur-arab-gb",
          "und-arab-id": "ms-arab-id",
          "und-arab-in": "ur-arab-in",
          "und-arab-kh": "cja-arab-kh",
          "und-arab-mm": "rhg-arab-mm",
          "und-arab-mn": "kk-arab-mn",
          "und-arab-mu": "ur-arab-mu",
          "und-arab-ng": "ha-arab-ng",
          "und-arab-pk": "ur-arab-pk",
          "und-arab-tg": "apd-arab-tg",
          "und-arab-th": "mfa-arab-th",
          "und-arab-tj": "fa-arab-tj",
          "und-arab-tr": "apc-arab-tr",
          "und-arab-yt": "swb-arab-yt",
          "und-armi": "arc-armi-ir",
          "und-armn": "hy-armn-am",
          "und-as": "sm-latn-as",
          "und-at": "de-latn-at",
          "und-avst": "ae-avst-ir",
          "und-aw": "nl-latn-aw",
          "und-ax": "sv-latn-ax",
          "und-az": "az-latn-az",
          "und-ba": "bs-latn-ba",
          "und-bali": "ban-bali-id",
          "und-bamu": "bax-bamu-cm",
          "und-bass": "bsq-bass-lr",
          "und-batk": "bbc-batk-id",
          "und-bd": "bn-beng-bd",
          "und-be": "nl-latn-be",
          "und-beng": "bn-beng-bd",
          "und-bf": "fr-latn-bf",
          "und-bg": "bg-cyrl-bg",
          "und-bh": "ar-arab-bh",
          "und-bhks": "sa-bhks-in",
          "und-bi": "rn-latn-bi",
          "und-bj": "fr-latn-bj",
          "und-bl": "fr-latn-bl",
          "und-bn": "ms-latn-bn",
          "und-bo": "es-latn-bo",
          "und-bopo": "zh-bopo-tw",
          "und-bq": "pap-latn-bq",
          "und-br": "pt-latn-br",
          "und-brah": "pka-brah-in",
          "und-brai": "fr-brai-fr",
          "und-bt": "dz-tibt-bt",
          "und-bugi": "bug-bugi-id",
          "und-buhd": "bku-buhd-ph",
          "und-bv": "und-latn-bv",
          "und-by": "be-cyrl-by",
          "und-cakm": "ccp-cakm-bd",
          "und-cans": "iu-cans-ca",
          "und-cari": "xcr-cari-tr",
          "und-cd": "sw-latn-cd",
          "und-cf": "fr-latn-cf",
          "und-cg": "fr-latn-cg",
          "und-ch": "de-latn-ch",
          "und-cham": "cjm-cham-vn",
          "und-cher": "chr-cher-us",
          "und-chrs": "xco-chrs-uz",
          "und-ci": "fr-latn-ci",
          "und-cl": "es-latn-cl",
          "und-cm": "fr-latn-cm",
          "und-cn": "zh-hans-cn",
          "und-co": "es-latn-co",
          "und-copt": "cop-copt-eg",
          "und-cp": "und-latn-cp",
          "und-cpmn": "und-cpmn-cy",
          "und-cpmn-cy": "und-cpmn-cy",
          "und-cprt": "grc-cprt-cy",
          "und-cr": "es-latn-cr",
          "und-cu": "es-latn-cu",
          "und-cv": "pt-latn-cv",
          "und-cw": "pap-latn-cw",
          "und-cy": "el-grek-cy",
          "und-cyrl": "ru-cyrl-ru",
          "und-cyrl-al": "mk-cyrl-al",
          "und-cyrl-ba": "sr-cyrl-ba",
          "und-cyrl-ge": "ab-cyrl-ge",
          "und-cyrl-gr": "mk-cyrl-gr",
          "und-cyrl-md": "uk-cyrl-md",
          "und-cyrl-ro": "bg-cyrl-ro",
          "und-cyrl-sk": "uk-cyrl-sk",
          "und-cyrl-tr": "kbd-cyrl-tr",
          "und-cyrl-xk": "sr-cyrl-xk",
          "und-cz": "cs-latn-cz",
          "und-de": "de-latn-de",
          "und-deva": "hi-deva-in",
          "und-deva-bt": "ne-deva-bt",
          "und-deva-fj": "hif-deva-fj",
          "und-deva-mu": "bho-deva-mu",
          "und-deva-pk": "btv-deva-pk",
          "und-diak": "dv-diak-mv",
          "und-dj": "aa-latn-dj",
          "und-dk": "da-latn-dk",
          "und-do": "es-latn-do",
          "und-dogr": "doi-dogr-in",
          "und-dupl": "fr-dupl-fr",
          "und-dz": "ar-arab-dz",
          "und-ea": "es-latn-ea",
          "und-ec": "es-latn-ec",
          "und-ee": "et-latn-ee",
          "und-eg": "ar-arab-eg",
          "und-egyp": "egy-egyp-eg",
          "und-eh": "ar-arab-eh",
          "und-elba": "sq-elba-al",
          "und-elym": "arc-elym-ir",
          "und-er": "ti-ethi-er",
          "und-es": "es-latn-es",
          "und-et": "am-ethi-et",
          "und-ethi": "am-ethi-et",
          "und-eu": "en-latn-ie",
          "und-ez": "de-latn-ez",
          "und-fi": "fi-latn-fi",
          "und-fo": "fo-latn-fo",
          "und-fr": "fr-latn-fr",
          "und-ga": "fr-latn-ga",
          "und-ge": "ka-geor-ge",
          "und-geor": "ka-geor-ge",
          "und-gf": "fr-latn-gf",
          "und-gh": "ak-latn-gh",
          "und-gl": "kl-latn-gl",
          "und-glag": "cu-glag-bg",
          "und-gn": "fr-latn-gn",
          "und-gong": "wsg-gong-in",
          "und-gonm": "esg-gonm-in",
          "und-goth": "got-goth-ua",
          "und-gp": "fr-latn-gp",
          "und-gq": "es-latn-gq",
          "und-gr": "el-grek-gr",
          "und-gran": "sa-gran-in",
          "und-grek": "el-grek-gr",
          "und-grek-tr": "bgx-grek-tr",
          "und-gs": "und-latn-gs",
          "und-gt": "es-latn-gt",
          "und-gujr": "gu-gujr-in",
          "und-guru": "pa-guru-in",
          "und-gw": "pt-latn-gw",
          "und-hanb": "zh-hanb-tw",
          "und-hang": "ko-hang-kr",
          "und-hani": "zh-hani-cn",
          "und-hano": "hnn-hano-ph",
          "und-hans": "zh-hans-cn",
          "und-hant": "zh-hant-tw",
          "und-hant-ca": "yue-hant-ca",
          "und-hebr": "he-hebr-il",
          "und-hebr-se": "yi-hebr-se",
          "und-hebr-ua": "yi-hebr-ua",
          "und-hebr-us": "yi-hebr-us",
          "und-hira": "ja-hira-jp",
          "und-hk": "zh-hant-hk",
          "und-hluw": "hlu-hluw-tr",
          "und-hm": "und-latn-hm",
          "und-hmng": "hnj-hmng-la",
          "und-hmnp": "hnj-hmnp-us",
          "und-hn": "es-latn-hn",
          "und-hr": "hr-latn-hr",
          "und-ht": "ht-latn-ht",
          "und-hu": "hu-latn-hu",
          "und-hung": "hu-hung-hu",
          "und-ic": "es-latn-ic",
          "und-id": "id-latn-id",
          "und-il": "he-hebr-il",
          "und-in": "hi-deva-in",
          "und-iq": "ar-arab-iq",
          "und-ir": "fa-arab-ir",
          "und-is": "is-latn-is",
          "und-it": "it-latn-it",
          "und-ital": "ett-ital-it",
          "und-jamo": "ko-jamo-kr",
          "und-java": "jv-java-id",
          "und-jo": "ar-arab-jo",
          "und-jp": "ja-jpan-jp",
          "und-jpan": "ja-jpan-jp",
          "und-kali": "eky-kali-mm",
          "und-kana": "ja-kana-jp",
          "und-kawi": "kaw-kawi-id",
          "und-ke": "sw-latn-ke",
          "und-kg": "ky-cyrl-kg",
          "und-kh": "km-khmr-kh",
          "und-khar": "pra-khar-pk",
          "und-khmr": "km-khmr-kh",
          "und-khoj": "sd-khoj-in",
          "und-kits": "zkt-kits-cn",
          "und-km": "ar-arab-km",
          "und-knda": "kn-knda-in",
          "und-kore": "ko-kore-kr",
          "und-kp": "ko-kore-kp",
          "und-kr": "ko-kore-kr",
          "und-kthi": "bho-kthi-in",
          "und-kw": "ar-arab-kw",
          "und-kz": "ru-cyrl-kz",
          "und-la": "lo-laoo-la",
          "und-lana": "nod-lana-th",
          "und-laoo": "lo-laoo-la",
          "und-laoo-au": "hnj-laoo-au",
          "und-laoo-cn": "hnj-laoo-cn",
          "und-laoo-fr": "hnj-laoo-fr",
          "und-laoo-gf": "hnj-laoo-gf",
          "und-laoo-mm": "hnj-laoo-mm",
          "und-laoo-sr": "hnj-laoo-sr",
          "und-laoo-th": "hnj-laoo-th",
          "und-laoo-us": "hnj-laoo-us",
          "und-laoo-vn": "hnj-laoo-vn",
          "und-latn-af": "tk-latn-af",
          "und-latn-am": "ku-latn-am",
          "und-latn-cn": "za-latn-cn",
          "und-latn-cy": "tr-latn-cy",
          "und-latn-dz": "fr-latn-dz",
          "und-latn-et": "en-latn-et",
          "und-latn-ge": "ku-latn-ge",
          "und-latn-ir": "tk-latn-ir",
          "und-latn-km": "fr-latn-km",
          "und-latn-ma": "fr-latn-ma",
          "und-latn-mk": "sq-latn-mk",
          "und-latn-mm": "kac-latn-mm",
          "und-latn-mo": "pt-latn-mo",
          "und-latn-mr": "fr-latn-mr",
          "und-latn-ru": "krl-latn-ru",
          "und-latn-sy": "fr-latn-sy",
          "und-latn-tn": "fr-latn-tn",
          "und-latn-tw": "trv-latn-tw",
          "und-latn-ua": "pl-latn-ua",
          "und-lb": "ar-arab-lb",
          "und-lepc": "lep-lepc-in",
          "und-li": "de-latn-li",
          "und-limb": "lif-limb-in",
          "und-lina": "lab-lina-gr",
          "und-linb": "grc-linb-gr",
          "und-lisu": "lis-lisu-cn",
          "und-lk": "si-sinh-lk",
          "und-ls": "st-latn-ls",
          "und-lt": "lt-latn-lt",
          "und-lu": "fr-latn-lu",
          "und-lv": "lv-latn-lv",
          "und-ly": "ar-arab-ly",
          "und-lyci": "xlc-lyci-tr",
          "und-lydi": "xld-lydi-tr",
          "und-ma": "ar-arab-ma",
          "und-mahj": "hi-mahj-in",
          "und-maka": "mak-maka-id",
          "und-mand": "myz-mand-ir",
          "und-mani": "xmn-mani-cn",
          "und-marc": "bo-marc-cn",
          "und-mc": "fr-latn-mc",
          "und-md": "ro-latn-md",
          "und-me": "sr-latn-me",
          "und-medf": "dmf-medf-ng",
          "und-mend": "men-mend-sl",
          "und-merc": "xmr-merc-sd",
          "und-mero": "xmr-mero-sd",
          "und-mf": "fr-latn-mf",
          "und-mg": "mg-latn-mg",
          "und-mk": "mk-cyrl-mk",
          "und-ml": "bm-latn-ml",
          "und-mlym": "ml-mlym-in",
          "und-mm": "my-mymr-mm",
          "und-mn": "mn-cyrl-mn",
          "und-mo": "zh-hant-mo",
          "und-modi": "mr-modi-in",
          "und-mong": "mn-mong-cn",
          "und-mq": "fr-latn-mq",
          "und-mr": "ar-arab-mr",
          "und-mroo": "mro-mroo-bd",
          "und-mt": "mt-latn-mt",
          "und-mtei": "mni-mtei-in",
          "und-mu": "mfe-latn-mu",
          "und-mult": "skr-mult-pk",
          "und-mv": "dv-thaa-mv",
          "und-mx": "es-latn-mx",
          "und-my": "ms-latn-my",
          "und-mymr": "my-mymr-mm",
          "und-mymr-in": "kht-mymr-in",
          "und-mymr-th": "mnw-mymr-th",
          "und-mz": "pt-latn-mz",
          "und-na": "af-latn-na",
          "und-nagm": "unr-nagm-in",
          "und-nand": "sa-nand-in",
          "und-narb": "xna-narb-sa",
          "und-nbat": "arc-nbat-jo",
          "und-nc": "fr-latn-nc",
          "und-ne": "ha-latn-ne",
          "und-newa": "new-newa-np",
          "und-ni": "es-latn-ni",
          "und-nkoo": "man-nkoo-gn",
          "und-nl": "nl-latn-nl",
          "und-no": "nb-latn-no",
          "und-np": "ne-deva-np",
          "und-nshu": "zhx-nshu-cn",
          "und-ogam": "sga-ogam-ie",
          "und-olck": "sat-olck-in",
          "und-om": "ar-arab-om",
          "und-orkh": "otk-orkh-mn",
          "und-orya": "or-orya-in",
          "und-osge": "osa-osge-us",
          "und-osma": "so-osma-so",
          "und-ougr": "oui-ougr-143",
          "und-pa": "es-latn-pa",
          "und-palm": "arc-palm-sy",
          "und-pauc": "ctd-pauc-mm",
          "und-pe": "es-latn-pe",
          "und-perm": "kv-perm-ru",
          "und-pf": "fr-latn-pf",
          "und-pg": "tpi-latn-pg",
          "und-ph": "fil-latn-ph",
          "und-phag": "lzh-phag-cn",
          "und-phli": "pal-phli-ir",
          "und-phlp": "pal-phlp-cn",
          "und-phnx": "phn-phnx-lb",
          "und-pk": "ur-arab-pk",
          "und-pl": "pl-latn-pl",
          "und-plrd": "hmd-plrd-cn",
          "und-pm": "fr-latn-pm",
          "und-pr": "es-latn-pr",
          "und-prti": "xpr-prti-ir",
          "und-ps": "ar-arab-ps",
          "und-pt": "pt-latn-pt",
          "und-pw": "pau-latn-pw",
          "und-py": "gn-latn-py",
          "und-qa": "ar-arab-qa",
          "und-qo": "en-latn-dg",
          "und-re": "fr-latn-re",
          "und-rjng": "rej-rjng-id",
          "und-ro": "ro-latn-ro",
          "und-rohg": "rhg-rohg-mm",
          "und-rs": "sr-cyrl-rs",
          "und-ru": "ru-cyrl-ru",
          "und-runr": "non-runr-se",
          "und-rw": "rw-latn-rw",
          "und-sa": "ar-arab-sa",
          "und-samr": "smp-samr-il",
          "und-sarb": "xsa-sarb-ye",
          "und-saur": "saz-saur-in",
          "und-sc": "fr-latn-sc",
          "und-sd": "ar-arab-sd",
          "und-se": "sv-latn-se",
          "und-sgnw": "ase-sgnw-us",
          "und-shaw": "en-shaw-gb",
          "und-shrd": "sa-shrd-in",
          "und-si": "sl-latn-si",
          "und-sidd": "sa-sidd-in",
          "und-sind": "sd-sind-in",
          "und-sinh": "si-sinh-lk",
          "und-sj": "nb-latn-sj",
          "und-sk": "sk-latn-sk",
          "und-sm": "it-latn-sm",
          "und-sn": "fr-latn-sn",
          "und-so": "so-latn-so",
          "und-sogd": "sog-sogd-uz",
          "und-sogo": "sog-sogo-uz",
          "und-sora": "srb-sora-in",
          "und-soyo": "cmg-soyo-mn",
          "und-sr": "nl-latn-sr",
          "und-st": "pt-latn-st",
          "und-sund": "su-sund-id",
          "und-sv": "es-latn-sv",
          "und-sy": "ar-arab-sy",
          "und-sylo": "syl-sylo-bd",
          "und-syrc": "syr-syrc-iq",
          "und-tagb": "tbw-tagb-ph",
          "und-takr": "doi-takr-in",
          "und-tale": "tdd-tale-cn",
          "und-talu": "khb-talu-cn",
          "und-taml": "ta-taml-in",
          "und-tang": "txg-tang-cn",
          "und-tavt": "blt-tavt-vn",
          "und-td": "fr-latn-td",
          "und-telu": "te-telu-in",
          "und-tf": "fr-latn-tf",
          "und-tfng": "zgh-tfng-ma",
          "und-tg": "fr-latn-tg",
          "und-tglg": "fil-tglg-ph",
          "und-th": "th-thai-th",
          "und-thaa": "dv-thaa-mv",
          "und-thai": "th-thai-th",
          "und-thai-cn": "lcp-thai-cn",
          "und-thai-kh": "kdt-thai-kh",
          "und-thai-la": "kdt-thai-la",
          "und-tibt": "bo-tibt-cn",
          "und-tirh": "mai-tirh-in",
          "und-tj": "tg-cyrl-tj",
          "und-tk": "tkl-latn-tk",
          "und-tl": "pt-latn-tl",
          "und-tm": "tk-latn-tm",
          "und-tn": "ar-arab-tn",
          "und-tnsa": "nst-tnsa-in",
          "und-to": "to-latn-to",
          "und-toto": "txo-toto-in",
          "und-tr": "tr-latn-tr",
          "und-tv": "tvl-latn-tv",
          "und-tw": "zh-hant-tw",
          "und-tz": "sw-latn-tz",
          "und-ua": "uk-cyrl-ua",
          "und-ug": "sw-latn-ug",
          "und-ugar": "uga-ugar-sy",
          "und-uy": "es-latn-uy",
          "und-uz": "uz-latn-uz",
          "und-va": "it-latn-va",
          "und-vaii": "vai-vaii-lr",
          "und-ve": "es-latn-ve",
          "und-vith": "sq-vith-al",
          "und-vn": "vi-latn-vn",
          "und-vu": "bi-latn-vu",
          "und-wara": "hoc-wara-in",
          "und-wcho": "nnp-wcho-in",
          "und-wf": "fr-latn-wf",
          "und-ws": "sm-latn-ws",
          "und-xk": "sq-latn-xk",
          "und-xpeo": "peo-xpeo-ir",
          "und-xsux": "akk-xsux-iq",
          "und-ye": "ar-arab-ye",
          "und-yezi": "ku-yezi-ge",
          "und-yiii": "ii-yiii-cn",
          "und-yt": "fr-latn-yt",
          "und-zanb": "cmg-zanb-mn",
          "und-zw": "sn-latn-zw",
          une: "une-latn-ng",
          ung: "ung-latn-au",
          uni: "uni-latn-pg",
          unk: "unk-latn-br",
          unm: "unm-latn-us",
          unn: "unn-latn-au",
          unr: "unr-beng-in",
          "unr-deva": "unr-deva-np",
          "unr-np": "unr-deva-np",
          unu: "unu-latn-pg",
          unx: "unx-beng-in",
          unz: "unz-latn-id",
          uok: "uok-latn-zz",
          uon: "uon-latn-tw",
          upi: "upi-latn-pg",
          upv: "upv-latn-vu",
          ur: "ur-arab-pk",
          ura: "ura-latn-pe",
          urb: "urb-latn-br",
          urc: "urc-latn-au",
          ure: "ure-latn-bo",
          urf: "urf-latn-au",
          urg: "urg-latn-pg",
          urh: "urh-latn-ng",
          uri: "uri-latn-zz",
          urk: "urk-thai-th",
          urm: "urm-latn-pg",
          urn: "urn-latn-id",
          uro: "uro-latn-pg",
          urp: "urp-latn-br",
          urr: "urr-latn-vu",
          urt: "urt-latn-zz",
          uru: "uru-latn-br",
          urv: "urv-latn-pg",
          urw: "urw-latn-zz",
          urx: "urx-latn-pg",
          ury: "ury-latn-id",
          urz: "urz-latn-br",
          usa: "usa-latn-zz",
          ush: "ush-arab-pk",
          usi: "usi-latn-bd",
          "usi-beng": "usi-beng-bd",
          usk: "usk-latn-cm",
          usp: "usp-latn-gt",
          uss: "uss-latn-ng",
          usu: "usu-latn-pg",
          uta: "uta-latn-ng",
          ute: "ute-latn-us",
          uth: "uth-latn-zz",
          utp: "utp-latn-sb",
          utr: "utr-latn-zz",
          utu: "utu-latn-pg",
          uum: "uum-grek-ge",
          "uum-cyrl": "uum-cyrl-ge",
          uur: "uur-latn-vu",
          uve: "uve-latn-nc",
          uvh: "uvh-latn-zz",
          uvl: "uvl-latn-zz",
          uwa: "uwa-latn-au",
          uya: "uya-latn-ng",
          uz: "uz-latn-uz",
          "uz-af": "uz-arab-af",
          "uz-arab": "uz-arab-af",
          "uz-cn": "uz-cyrl-cn",
          uzs: "uzs-arab-af",
          vaa: "vaa-taml-in",
          vae: "vae-latn-cf",
          vaf: "vaf-arab-ir",
          vag: "vag-latn-zz",
          vah: "vah-deva-in",
          vai: "vai-vaii-lr",
          vaj: "vaj-latn-na",
          val: "val-latn-pg",
          vam: "vam-latn-pg",
          van: "van-latn-zz",
          vao: "vao-latn-vu",
          vap: "vap-latn-in",
          var: "var-latn-mx",
          vas: "vas-deva-in",
          "vas-gujr": "vas-gujr-in",
          vau: "vau-latn-cd",
          vav: "vav-deva-in",
          "vav-gujr": "vav-gujr-in",
          vay: "vay-deva-np",
          vbb: "vbb-latn-id",
          vbk: "vbk-latn-ph",
          ve: "ve-latn-za",
          vec: "vec-latn-it",
          vem: "vem-latn-ng",
          veo: "veo-latn-us",
          vep: "vep-latn-ru",
          ver: "ver-latn-ng",
          vgr: "vgr-arab-pk",
          vi: "vi-latn-vn",
          vic: "vic-latn-sx",
          vid: "vid-latn-tz",
          vif: "vif-latn-cg",
          vig: "vig-latn-bf",
          vil: "vil-latn-ar",
          vin: "vin-latn-tz",
          vit: "vit-latn-ng",
          viv: "viv-latn-zz",
          vka: "vka-latn-au",
          vkj: "vkj-latn-td",
          vkk: "vkk-latn-id",
          vkl: "vkl-latn-id",
          vkm: "vkm-latn-br",
          vkn: "vkn-latn-ng",
          vko: "vko-latn-id",
          vkp: "vkp-latn-in",
          "vkp-deva": "vkp-deva-in",
          vkt: "vkt-latn-id",
          vku: "vku-latn-au",
          vkz: "vkz-latn-ng",
          vlp: "vlp-latn-vu",
          vls: "vls-latn-be",
          vma: "vma-latn-au",
          vmb: "vmb-latn-au",
          vmc: "vmc-latn-mx",
          vmd: "vmd-knda-in",
          vme: "vme-latn-id",
          vmf: "vmf-latn-de",
          vmg: "vmg-latn-pg",
          vmh: "vmh-arab-ir",
          vmi: "vmi-latn-au",
          vmj: "vmj-latn-mx",
          vmk: "vmk-latn-mz",
          vml: "vml-latn-au",
          vmm: "vmm-latn-mx",
          vmp: "vmp-latn-mx",
          vmq: "vmq-latn-mx",
          vmr: "vmr-latn-mz",
          vms: "vms-latn-id",
          vmu: "vmu-latn-au",
          vmw: "vmw-latn-mz",
          vmx: "vmx-latn-mx",
          vmy: "vmy-latn-mx",
          vmz: "vmz-latn-mx",
          vnk: "vnk-latn-sb",
          vnm: "vnm-latn-vu",
          vnp: "vnp-latn-vu",
          vo: "vo-latn-001",
          vor: "vor-latn-ng",
          vot: "vot-latn-ru",
          vra: "vra-latn-vu",
          vro: "vro-latn-ee",
          vrs: "vrs-latn-sb",
          vrt: "vrt-latn-vu",
          vto: "vto-latn-id",
          vum: "vum-latn-ga",
          vun: "vun-latn-tz",
          vut: "vut-latn-zz",
          vwa: "vwa-latn-cn",
          "vwa-mymr": "vwa-mymr-cn",
          wa: "wa-latn-be",
          waa: "waa-latn-us",
          wab: "wab-latn-pg",
          wac: "wac-latn-us",
          wad: "wad-latn-id",
          wae: "wae-latn-ch",
          waf: "waf-latn-br",
          wag: "wag-latn-pg",
          wah: "wah-latn-id",
          wai: "wai-latn-id",
          waj: "waj-latn-zz",
          wal: "wal-ethi-et",
          wam: "wam-latn-us",
          wan: "wan-latn-zz",
          wap: "wap-latn-gy",
          waq: "waq-latn-au",
          war: "war-latn-ph",
          was: "was-latn-us",
          wat: "wat-latn-pg",
          wau: "wau-latn-br",
          wav: "wav-latn-ng",
          waw: "waw-latn-br",
          wax: "wax-latn-pg",
          way: "way-latn-sr",
          waz: "waz-latn-pg",
          wba: "wba-latn-ve",
          wbb: "wbb-latn-id",
          wbe: "wbe-latn-id",
          wbf: "wbf-latn-bf",
          wbh: "wbh-latn-tz",
          wbi: "wbi-latn-tz",
          wbj: "wbj-latn-tz",
          wbk: "wbk-arab-af",
          wbl: "wbl-latn-pk",
          "wbl-arab": "wbl-arab-af",
          "wbl-cyrl": "wbl-cyrl-tj",
          wbm: "wbm-latn-cn",
          wbp: "wbp-latn-au",
          wbq: "wbq-telu-in",
          wbr: "wbr-deva-in",
          wbt: "wbt-latn-au",
          wbv: "wbv-latn-au",
          wbw: "wbw-latn-id",
          wca: "wca-latn-br",
          wci: "wci-latn-zz",
          wdd: "wdd-latn-ga",
          wdg: "wdg-latn-pg",
          wdj: "wdj-latn-au",
          wdk: "wdk-latn-au",
          wdt: "wdt-latn-ca",
          wdu: "wdu-latn-au",
          wdy: "wdy-latn-au",
          wec: "wec-latn-ci",
          wed: "wed-latn-pg",
          weg: "weg-latn-au",
          weh: "weh-latn-cm",
          wei: "wei-latn-pg",
          wem: "wem-latn-bj",
          weo: "weo-latn-id",
          wep: "wep-latn-de",
          wer: "wer-latn-zz",
          wes: "wes-latn-cm",
          wet: "wet-latn-id",
          weu: "weu-latn-mm",
          wew: "wew-latn-id",
          wfg: "wfg-latn-id",
          wga: "wga-latn-au",
          wgb: "wgb-latn-pg",
          wgg: "wgg-latn-au",
          wgi: "wgi-latn-zz",
          wgo: "wgo-latn-id",
          wgu: "wgu-latn-au",
          wgy: "wgy-latn-au",
          wha: "wha-latn-id",
          whg: "whg-latn-zz",
          whk: "whk-latn-id",
          whu: "whu-latn-id",
          wib: "wib-latn-zz",
          wic: "wic-latn-us",
          wie: "wie-latn-au",
          wif: "wif-latn-au",
          wig: "wig-latn-au",
          wih: "wih-latn-au",
          wii: "wii-latn-pg",
          wij: "wij-latn-au",
          wik: "wik-latn-au",
          wil: "wil-latn-au",
          wim: "wim-latn-au",
          win: "win-latn-us",
          wir: "wir-latn-br",
          wiu: "wiu-latn-zz",
          wiv: "wiv-latn-zz",
          wiy: "wiy-latn-us",
          wja: "wja-latn-zz",
          wji: "wji-latn-zz",
          wka: "wka-latn-tz",
          wkd: "wkd-latn-id",
          wkr: "wkr-latn-au",
          wkw: "wkw-latn-au",
          wky: "wky-latn-au",
          wla: "wla-latn-pg",
          wlg: "wlg-latn-au",
          wlh: "wlh-latn-tl",
          wli: "wli-latn-id",
          wlm: "wlm-latn-gb",
          wlo: "wlo-arab-id",
          wlr: "wlr-latn-vu",
          wls: "wls-latn-wf",
          wlu: "wlu-latn-au",
          wlv: "wlv-latn-ar",
          wlw: "wlw-latn-id",
          wlx: "wlx-latn-gh",
          wma: "wma-latn-ng",
          wmb: "wmb-latn-au",
          wmc: "wmc-latn-pg",
          wmd: "wmd-latn-br",
          wme: "wme-deva-np",
          wmh: "wmh-latn-tl",
          wmi: "wmi-latn-au",
          wmm: "wmm-latn-id",
          wmn: "wmn-latn-nc",
          wmo: "wmo-latn-zz",
          wms: "wms-latn-id",
          wmt: "wmt-latn-au",
          wmw: "wmw-latn-mz",
          "wmw-arab": "wmw-arab-mz",
          wmx: "wmx-latn-pg",
          wnb: "wnb-latn-pg",
          wnc: "wnc-latn-zz",
          wnd: "wnd-latn-au",
          wne: "wne-arab-pk",
          wng: "wng-latn-id",
          wni: "wni-arab-km",
          wnk: "wnk-latn-id",
          wnm: "wnm-latn-au",
          wnn: "wnn-latn-au",
          wno: "wno-latn-id",
          wnp: "wnp-latn-pg",
          wnu: "wnu-latn-zz",
          wnw: "wnw-latn-us",
          wny: "wny-latn-au",
          wo: "wo-latn-sn",
          woa: "woa-latn-au",
          wob: "wob-latn-zz",
          woc: "woc-latn-pg",
          wod: "wod-latn-id",
          woe: "woe-latn-fm",
          wof: "wof-latn-gm",
          "wof-arab": "wof-arab-gm",
          wog: "wog-latn-pg",
          woi: "woi-latn-id",
          wok: "wok-latn-cm",
          wom: "wom-latn-ng",
          won: "won-latn-cd",
          woo: "woo-latn-id",
          wor: "wor-latn-id",
          wos: "wos-latn-zz",
          wow: "wow-latn-id",
          wpc: "wpc-latn-ve",
          wrb: "wrb-latn-au",
          wrg: "wrg-latn-au",
          wrh: "wrh-latn-au",
          wri: "wri-latn-au",
          wrk: "wrk-latn-au",
          wrl: "wrl-latn-au",
          wrm: "wrm-latn-au",
          wro: "wro-latn-au",
          wrp: "wrp-latn-id",
          wrr: "wrr-latn-au",
          wrs: "wrs-latn-zz",
          wru: "wru-latn-id",
          wrv: "wrv-latn-pg",
          wrw: "wrw-latn-au",
          wrx: "wrx-latn-id",
          wrz: "wrz-latn-au",
          wsa: "wsa-latn-id",
          wsg: "wsg-gong-in",
          wsi: "wsi-latn-vu",
          wsk: "wsk-latn-zz",
          wsr: "wsr-latn-pg",
          wss: "wss-latn-gh",
          wsu: "wsu-latn-br",
          wsv: "wsv-arab-af",
          wtf: "wtf-latn-pg",
          wth: "wth-latn-au",
          wti: "wti-latn-et",
          wtk: "wtk-latn-pg",
          wtm: "wtm-deva-in",
          wtw: "wtw-latn-id",
          "wtw-bugi": "wtw-bugi-id",
          wua: "wua-latn-au",
          wub: "wub-latn-au",
          wud: "wud-latn-tg",
          wul: "wul-latn-id",
          wum: "wum-latn-ga",
          wun: "wun-latn-tz",
          wur: "wur-latn-au",
          wut: "wut-latn-pg",
          wuu: "wuu-hans-cn",
          wuv: "wuv-latn-zz",
          wux: "wux-latn-au",
          wuy: "wuy-latn-id",
          wwa: "wwa-latn-zz",
          wwb: "wwb-latn-au",
          wwo: "wwo-latn-vu",
          wwr: "wwr-latn-au",
          www: "www-latn-cm",
          wxw: "wxw-latn-au",
          wyb: "wyb-latn-au",
          wyi: "wyi-latn-au",
          wym: "wym-latn-pl",
          wyn: "wyn-latn-us",
          wyr: "wyr-latn-br",
          wyy: "wyy-latn-fj",
          xaa: "xaa-latn-es",
          xab: "xab-latn-ng",
          xai: "xai-latn-br",
          xaj: "xaj-latn-br",
          xak: "xak-latn-ve",
          xal: "xal-cyrl-ru",
          xam: "xam-latn-za",
          xan: "xan-ethi-et",
          xao: "xao-latn-vn",
          xar: "xar-latn-pg",
          xas: "xas-cyrl-ru",
          xat: "xat-latn-br",
          xau: "xau-latn-id",
          xav: "xav-latn-br",
          xaw: "xaw-latn-us",
          xay: "xay-latn-id",
          xbb: "xbb-latn-au",
          xbd: "xbd-latn-au",
          xbe: "xbe-latn-au",
          xbg: "xbg-latn-au",
          xbi: "xbi-latn-zz",
          xbj: "xbj-latn-au",
          xbm: "xbm-latn-fr",
          xbn: "xbn-latn-my",
          xbp: "xbp-latn-au",
          xbr: "xbr-latn-id",
          xbw: "xbw-latn-br",
          xby: "xby-latn-au",
          xch: "xch-latn-us",
          xco: "xco-chrs-uz",
          xcr: "xcr-cari-tr",
          xda: "xda-latn-au",
          xdk: "xdk-latn-au",
          xdo: "xdo-latn-ao",
          xdq: "xdq-cyrl-ru",
          xdy: "xdy-latn-id",
          xed: "xed-latn-cm",
          xeg: "xeg-latn-za",
          xem: "xem-latn-id",
          xer: "xer-latn-br",
          xes: "xes-latn-zz",
          xet: "xet-latn-br",
          xeu: "xeu-latn-pg",
          xgb: "xgb-latn-ci",
          xgd: "xgd-latn-au",
          xgg: "xgg-latn-au",
          xgi: "xgi-latn-au",
          xgm: "xgm-latn-au",
          xgu: "xgu-latn-au",
          xgw: "xgw-latn-au",
          xh: "xh-latn-za",
          xhe: "xhe-arab-pk",
          xhm: "xhm-khmr-kh",
          xhv: "xhv-latn-vn",
          xii: "xii-latn-za",
          xin: "xin-latn-gt",
          xir: "xir-latn-br",
          xis: "xis-orya-in",
          xiy: "xiy-latn-br",
          xjb: "xjb-latn-au",
          xjt: "xjt-latn-au",
          xka: "xka-arab-pk",
          xkb: "xkb-latn-bj",
          xkc: "xkc-arab-ir",
          xkd: "xkd-latn-id",
          xke: "xke-latn-id",
          xkg: "xkg-latn-ml",
          xkj: "xkj-arab-ir",
          xkl: "xkl-latn-id",
          xkn: "xkn-latn-id",
          xkp: "xkp-arab-ir",
          xkq: "xkq-latn-id",
          xkr: "xkr-latn-br",
          xks: "xks-latn-id",
          xkt: "xkt-latn-gh",
          xku: "xku-latn-cg",
          xkv: "xkv-latn-bw",
          xkw: "xkw-latn-id",
          xkx: "xkx-latn-pg",
          xky: "xky-latn-my",
          xkz: "xkz-latn-bt",
          xla: "xla-latn-zz",
          xlc: "xlc-lyci-tr",
          xld: "xld-lydi-tr",
          xly: "xly-elym-ir",
          xma: "xma-latn-so",
          xmb: "xmb-latn-cm",
          xmc: "xmc-latn-mz",
          xmd: "xmd-latn-cm",
          xmf: "xmf-geor-ge",
          xmg: "xmg-latn-cm",
          xmh: "xmh-latn-au",
          xmj: "xmj-latn-cm",
          xmm: "xmm-latn-id",
          xmn: "xmn-mani-cn",
          xmo: "xmo-latn-br",
          xmp: "xmp-latn-au",
          xmq: "xmq-latn-au",
          xmr: "xmr-merc-sd",
          xmt: "xmt-latn-id",
          xmu: "xmu-latn-au",
          xmv: "xmv-latn-mg",
          xmw: "xmw-latn-mg",
          xmx: "xmx-latn-id",
          xmy: "xmy-latn-au",
          xmz: "xmz-latn-id",
          xna: "xna-narb-sa",
          xnb: "xnb-latn-tw",
          xni: "xni-latn-au",
          xnj: "xnj-latn-tz",
          xnk: "xnk-latn-au",
          xnm: "xnm-latn-au",
          xnn: "xnn-latn-ph",
          xnq: "xnq-latn-mz",
          xnr: "xnr-deva-in",
          xnt: "xnt-latn-us",
          xnu: "xnu-latn-au",
          xny: "xny-latn-au",
          xnz: "xnz-latn-eg",
          "xnz-arab": "xnz-arab-eg",
          xoc: "xoc-latn-ng",
          xod: "xod-latn-id",
          xog: "xog-latn-ug",
          xoi: "xoi-latn-pg",
          xok: "xok-latn-br",
          xom: "xom-latn-sd",
          "xom-ethi": "xom-ethi-et",
          xon: "xon-latn-zz",
          xoo: "xoo-latn-br",
          xop: "xop-latn-pg",
          xor: "xor-latn-br",
          xow: "xow-latn-pg",
          xpa: "xpa-latn-au",
          xpb: "xpb-latn-au",
          xpd: "xpd-latn-au",
          xpf: "xpf-latn-au",
          xpg: "xpg-grek-tr",
          xph: "xph-latn-au",
          xpi: "xpi-ogam-gb",
          xpj: "xpj-latn-au",
          xpk: "xpk-latn-br",
          xpl: "xpl-latn-au",
          xpm: "xpm-cyrl-ru",
          xpn: "xpn-latn-br",
          xpo: "xpo-latn-mx",
          xpq: "xpq-latn-us",
          xpr: "xpr-prti-ir",
          xpt: "xpt-latn-au",
          xpv: "xpv-latn-au",
          xpw: "xpw-latn-au",
          xpx: "xpx-latn-au",
          xpz: "xpz-latn-au",
          xra: "xra-latn-br",
          xrb: "xrb-latn-zz",
          xrd: "xrd-latn-au",
          xre: "xre-latn-br",
          xrg: "xrg-latn-au",
          xri: "xri-latn-br",
          xrm: "xrm-cyrl-ru",
          xrn: "xrn-cyrl-ru",
          xrr: "xrr-latn-it",
          xru: "xru-latn-au",
          xrw: "xrw-latn-pg",
          xsa: "xsa-sarb-ye",
          xsb: "xsb-latn-ph",
          xse: "xse-latn-id",
          xsh: "xsh-latn-ng",
          xsi: "xsi-latn-zz",
          xsm: "xsm-latn-zz",
          xsn: "xsn-latn-ng",
          xsp: "xsp-latn-pg",
          xsq: "xsq-latn-mz",
          xsr: "xsr-deva-np",
          xss: "xss-cyrl-ru",
          xsu: "xsu-latn-ve",
          xsy: "xsy-latn-tw",
          xta: "xta-latn-mx",
          xtb: "xtb-latn-mx",
          xtc: "xtc-latn-sd",
          xtd: "xtd-latn-mx",
          xte: "xte-latn-id",
          xth: "xth-latn-au",
          xti: "xti-latn-mx",
          xtj: "xtj-latn-mx",
          xtl: "xtl-latn-mx",
          xtm: "xtm-latn-mx",
          xtn: "xtn-latn-mx",
          xtp: "xtp-latn-mx",
          xts: "xts-latn-mx",
          xtt: "xtt-latn-mx",
          xtu: "xtu-latn-mx",
          xtv: "xtv-latn-au",
          xtw: "xtw-latn-br",
          xty: "xty-latn-mx",
          xub: "xub-taml-in",
          "xub-knda": "xub-knda-in",
          "xub-mlym": "xub-mlym-in",
          xud: "xud-latn-au",
          xuj: "xuj-taml-in",
          xul: "xul-latn-au",
          xum: "xum-latn-it",
          "xum-ital": "xum-ital-it",
          xun: "xun-latn-au",
          xuo: "xuo-latn-td",
          xut: "xut-latn-au",
          xuu: "xuu-latn-na",
          xve: "xve-ital-it",
          xvi: "xvi-arab-af",
          xvn: "xvn-latn-es",
          xvo: "xvo-latn-it",
          xvs: "xvs-latn-it",
          xwa: "xwa-latn-br",
          xwd: "xwd-latn-au",
          xwe: "xwe-latn-zz",
          xwj: "xwj-latn-au",
          xwk: "xwk-latn-au",
          xwl: "xwl-latn-bj",
          xwo: "xwo-cyrl-ru",
          xwr: "xwr-latn-id",
          xwt: "xwt-latn-au",
          xww: "xww-latn-au",
          xxb: "xxb-latn-gh",
          xxk: "xxk-latn-id",
          xxm: "xxm-latn-au",
          xxr: "xxr-latn-br",
          xxt: "xxt-latn-id",
          xya: "xya-latn-au",
          xyb: "xyb-latn-au",
          xyj: "xyj-latn-au",
          xyk: "xyk-latn-au",
          xyl: "xyl-latn-br",
          xyt: "xyt-latn-au",
          xyy: "xyy-latn-au",
          xzh: "xzh-marc-cn",
          xzp: "xzp-latn-mx",
          yaa: "yaa-latn-pe",
          yab: "yab-latn-br",
          yac: "yac-latn-id",
          yad: "yad-latn-pe",
          yae: "yae-latn-ve",
          yaf: "yaf-latn-cd",
          yag: "yag-latn-cl",
          yai: "yai-cyrl-tj",
          yaj: "yaj-latn-cf",
          yak: "yak-latn-us",
          yal: "yal-latn-gn",
          "yal-arab": "yal-arab-gn",
          yam: "yam-latn-zz",
          yan: "yan-latn-ni",
          yao: "yao-latn-mz",
          yap: "yap-latn-fm",
          yaq: "yaq-latn-mx",
          yar: "yar-latn-ve",
          yas: "yas-latn-zz",
          yat: "yat-latn-zz",
          yau: "yau-latn-ve",
          yav: "yav-latn-cm",
          yaw: "yaw-latn-br",
          yax: "yax-latn-ao",
          yay: "yay-latn-zz",
          yaz: "yaz-latn-zz",
          yba: "yba-latn-zz",
          ybb: "ybb-latn-cm",
          ybe: "ybe-latn-cn",
          "ybe-ougr": "ybe-ougr-cn",
          ybh: "ybh-deva-np",
          ybi: "ybi-deva-np",
          ybj: "ybj-latn-ng",
          ybl: "ybl-latn-ng",
          ybm: "ybm-latn-pg",
          ybn: "ybn-latn-br",
          ybo: "ybo-latn-pg",
          ybx: "ybx-latn-pg",
          yby: "yby-latn-zz",
          ycl: "ycl-latn-cn",
          ycn: "ycn-latn-co",
          yda: "yda-latn-au",
          yde: "yde-latn-pg",
          ydg: "ydg-arab-pk",
          ydk: "ydk-latn-pg",
          yea: "yea-mlym-in",
          "yea-knda": "yea-knda-in",
          yec: "yec-latn-de",
          yee: "yee-latn-pg",
          yei: "yei-latn-cm",
          yej: "yej-grek-il",
          yel: "yel-latn-cd",
          yer: "yer-latn-zz",
          yes: "yes-latn-ng",
          yet: "yet-latn-id",
          yeu: "yeu-telu-in",
          yev: "yev-latn-pg",
          yey: "yey-latn-bw",
          yga: "yga-latn-au",
          ygi: "ygi-latn-au",
          ygl: "ygl-latn-pg",
          ygm: "ygm-latn-pg",
          ygp: "ygp-plrd-cn",
          ygr: "ygr-latn-zz",
          ygu: "ygu-latn-au",
          ygw: "ygw-latn-zz",
          yhd: "yhd-hebr-il",
          yi: "yi-hebr-001",
          yia: "yia-latn-au",
          yig: "yig-yiii-cn",
          yih: "yih-hebr-de",
          yii: "yii-latn-au",
          yij: "yij-latn-au",
          yil: "yil-latn-au",
          yim: "yim-latn-in",
          yir: "yir-latn-id",
          yis: "yis-latn-pg",
          yiv: "yiv-yiii-cn",
          yka: "yka-latn-ph",
          "yka-arab": "yka-arab-ph",
          ykg: "ykg-cyrl-ru",
          yki: "yki-latn-id",
          ykk: "ykk-latn-pg",
          ykm: "ykm-latn-pg",
          yko: "yko-latn-zz",
          ykr: "ykr-latn-pg",
          yky: "yky-latn-cf",
          yla: "yla-latn-pg",
          ylb: "ylb-latn-pg",
          yle: "yle-latn-zz",
          ylg: "ylg-latn-zz",
          yli: "yli-latn-id",
          yll: "yll-latn-zz",
          ylr: "ylr-latn-au",
          ylu: "ylu-latn-pg",
          yly: "yly-latn-nc",
          ymb: "ymb-latn-pg",
          yme: "yme-latn-pe",
          ymg: "ymg-latn-cd",
          ymk: "ymk-latn-mz",
          "ymk-arab": "ymk-arab-mz",
          yml: "yml-latn-zz",
          ymm: "ymm-latn-so",
          ymn: "ymn-latn-id",
          ymo: "ymo-latn-pg",
          ymp: "ymp-latn-pg",
          yna: "yna-plrd-cn",
          ynd: "ynd-latn-au",
          yng: "yng-latn-cd",
          ynk: "ynk-cyrl-ru",
          ynl: "ynl-latn-pg",
          ynq: "ynq-latn-ng",
          yns: "yns-latn-cd",
          ynu: "ynu-latn-co",
          yo: "yo-latn-ng",
          yob: "yob-latn-pg",
          yog: "yog-latn-ph",
          yoi: "yoi-jpan-jp",
          yok: "yok-latn-us",
          yol: "yol-latn-gb",
          yom: "yom-latn-cd",
          yon: "yon-latn-zz",
          yot: "yot-latn-ng",
          yoy: "yoy-thai-th",
          yra: "yra-latn-pg",
          yrb: "yrb-latn-zz",
          yre: "yre-latn-zz",
          yrk: "yrk-cyrl-ru",
          yrl: "yrl-latn-br",
          yrm: "yrm-latn-au",
          yro: "yro-latn-br",
          yrs: "yrs-latn-id",
          yrw: "yrw-latn-pg",
          yry: "yry-latn-au",
          ysd: "ysd-yiii-cn",
          ysn: "ysn-yiii-cn",
          ysp: "ysp-yiii-cn",
          ysr: "ysr-cyrl-ru",
          yss: "yss-latn-zz",
          ysy: "ysy-plrd-cn",
          ytw: "ytw-latn-pg",
          yty: "yty-latn-au",
          yua: "yua-latn-mx",
          yub: "yub-latn-au",
          yuc: "yuc-latn-us",
          yud: "yud-hebr-il",
          yue: "yue-hant-hk",
          "yue-cn": "yue-hans-cn",
          "yue-hans": "yue-hans-cn",
          yuf: "yuf-latn-us",
          yug: "yug-cyrl-ru",
          yui: "yui-latn-co",
          yuj: "yuj-latn-zz",
          yul: "yul-latn-cf",
          yum: "yum-latn-us",
          yun: "yun-latn-ng",
          yup: "yup-latn-co",
          yuq: "yuq-latn-bo",
          yur: "yur-latn-us",
          yut: "yut-latn-zz",
          yuw: "yuw-latn-zz",
          yux: "yux-cyrl-ru",
          yuz: "yuz-latn-bo",
          yva: "yva-latn-id",
          yvt: "yvt-latn-ve",
          ywa: "ywa-latn-pg",
          ywg: "ywg-latn-au",
          ywn: "ywn-latn-br",
          ywq: "ywq-plrd-cn",
          "ywq-yiii": "ywq-yiii-cn",
          ywr: "ywr-latn-au",
          ywu: "ywu-plrd-cn",
          "ywu-yiii": "ywu-yiii-cn",
          yww: "yww-latn-au",
          yxa: "yxa-latn-au",
          yxg: "yxg-latn-au",
          yxl: "yxl-latn-au",
          yxm: "yxm-latn-au",
          yxu: "yxu-latn-au",
          yxy: "yxy-latn-au",
          yyr: "yyr-latn-au",
          yyu: "yyu-latn-pg",
          za: "za-latn-cn",
          zaa: "zaa-latn-mx",
          zab: "zab-latn-mx",
          zac: "zac-latn-mx",
          zad: "zad-latn-mx",
          zae: "zae-latn-mx",
          zaf: "zaf-latn-mx",
          zag: "zag-latn-sd",
          zah: "zah-latn-ng",
          zaj: "zaj-latn-tz",
          zak: "zak-latn-tz",
          zam: "zam-latn-mx",
          zao: "zao-latn-mx",
          zap: "zap-latn-mx",
          zaq: "zaq-latn-mx",
          zar: "zar-latn-mx",
          zas: "zas-latn-mx",
          zat: "zat-latn-mx",
          zau: "zau-tibt-in",
          "zau-arab": "zau-arab-in",
          zav: "zav-latn-mx",
          zaw: "zaw-latn-mx",
          zax: "zax-latn-mx",
          zay: "zay-latn-et",
          "zay-ethi": "zay-ethi-et",
          zaz: "zaz-latn-ng",
          zba: "zba-arab-001",
          zbc: "zbc-latn-my",
          zbe: "zbe-latn-my",
          zbt: "zbt-latn-id",
          zbu: "zbu-latn-ng",
          zbw: "zbw-latn-my",
          zca: "zca-latn-mx",
          zch: "zch-hani-cn",
          zdj: "zdj-arab-km",
          zea: "zea-latn-nl",
          zeg: "zeg-latn-pg",
          zeh: "zeh-hani-cn",
          zen: "zen-tfng-mr",
          "zen-arab": "zen-arab-mr",
          zga: "zga-latn-tz",
          zgb: "zgb-hani-cn",
          zgh: "zgh-tfng-ma",
          zgm: "zgm-hani-cn",
          zgn: "zgn-hani-cn",
          zgr: "zgr-latn-pg",
          zh: "zh-hans-cn",
          "zh-au": "zh-hant-au",
          "zh-bn": "zh-hant-bn",
          "zh-bopo": "zh-bopo-tw",
          "zh-gb": "zh-hant-gb",
          "zh-gf": "zh-hant-gf",
          "zh-hanb": "zh-hanb-tw",
          "zh-hant": "zh-hant-tw",
          "zh-hk": "zh-hant-hk",
          "zh-id": "zh-hant-id",
          "zh-mo": "zh-hant-mo",
          "zh-pa": "zh-hant-pa",
          "zh-pf": "zh-hant-pf",
          "zh-ph": "zh-hant-ph",
          "zh-sr": "zh-hant-sr",
          "zh-th": "zh-hant-th",
          "zh-tw": "zh-hant-tw",
          "zh-us": "zh-hant-us",
          "zh-vn": "zh-hant-vn",
          zhd: "zhd-hani-cn",
          "zhd-latn": "zhd-latn-vn",
          zhi: "zhi-latn-ng",
          zhn: "zhn-latn-cn",
          "zhn-hani": "zhn-hani-cn",
          zhw: "zhw-latn-cm",
          zhx: "zhx-nshu-cn",
          zia: "zia-latn-zz",
          zik: "zik-latn-pg",
          zil: "zil-latn-gn",
          zim: "zim-latn-td",
          zin: "zin-latn-tz",
          ziw: "ziw-latn-tz",
          ziz: "ziz-latn-ng",
          zka: "zka-latn-id",
          zkb: "zkb-cyrl-ru",
          zkd: "zkd-latn-mm",
          zko: "zko-cyrl-ru",
          zkp: "zkp-latn-br",
          zkt: "zkt-kits-cn",
          zku: "zku-latn-au",
          zkz: "zkz-cyrl-ru",
          zla: "zla-latn-cd",
          zlj: "zlj-hani-cn",
          "zlj-latn": "zlj-latn-cn",
          zlm: "zlm-latn-tg",
          zln: "zln-hani-cn",
          zlq: "zlq-hani-cn",
          zma: "zma-latn-au",
          zmb: "zmb-latn-cd",
          zmc: "zmc-latn-au",
          zmd: "zmd-latn-au",
          zme: "zme-latn-au",
          zmf: "zmf-latn-cd",
          zmg: "zmg-latn-au",
          zmh: "zmh-latn-pg",
          zmi: "zmi-latn-my",
          zmj: "zmj-latn-au",
          zmk: "zmk-latn-au",
          zml: "zml-latn-au",
          zmm: "zmm-latn-au",
          zmn: "zmn-latn-ga",
          zmo: "zmo-latn-sd",
          zmp: "zmp-latn-cd",
          zmq: "zmq-latn-cd",
          zmr: "zmr-latn-au",
          zms: "zms-latn-cd",
          zmt: "zmt-latn-au",
          zmu: "zmu-latn-au",
          zmv: "zmv-latn-au",
          zmw: "zmw-latn-cd",
          zmx: "zmx-latn-cg",
          zmy: "zmy-latn-au",
          zmz: "zmz-latn-cd",
          zna: "zna-latn-td",
          zne: "zne-latn-zz",
          zng: "zng-latn-vn",
          znk: "znk-latn-au",
          zns: "zns-latn-ng",
          zoc: "zoc-latn-mx",
          zoh: "zoh-latn-mx",
          zom: "zom-latn-in",
          zoo: "zoo-latn-mx",
          zoq: "zoq-latn-mx",
          zor: "zor-latn-mx",
          zos: "zos-latn-mx",
          zpa: "zpa-latn-mx",
          zpb: "zpb-latn-mx",
          zpc: "zpc-latn-mx",
          zpd: "zpd-latn-mx",
          zpe: "zpe-latn-mx",
          zpf: "zpf-latn-mx",
          zpg: "zpg-latn-mx",
          zph: "zph-latn-mx",
          zpi: "zpi-latn-mx",
          zpj: "zpj-latn-mx",
          zpk: "zpk-latn-mx",
          zpl: "zpl-latn-mx",
          zpm: "zpm-latn-mx",
          zpn: "zpn-latn-mx",
          zpo: "zpo-latn-mx",
          zpp: "zpp-latn-mx",
          zpq: "zpq-latn-mx",
          zpr: "zpr-latn-mx",
          zps: "zps-latn-mx",
          zpt: "zpt-latn-mx",
          zpu: "zpu-latn-mx",
          zpv: "zpv-latn-mx",
          zpw: "zpw-latn-mx",
          zpx: "zpx-latn-mx",
          zpy: "zpy-latn-mx",
          zpz: "zpz-latn-mx",
          zqe: "zqe-hani-cn",
          "zqe-latn": "zqe-latn-cn",
          zrn: "zrn-latn-td",
          zro: "zro-latn-ec",
          zrp: "zrp-hebr-fr",
          zrs: "zrs-latn-id",
          zsa: "zsa-latn-pg",
          zsr: "zsr-latn-mx",
          zsu: "zsu-latn-pg",
          zte: "zte-latn-mx",
          ztg: "ztg-latn-mx",
          ztl: "ztl-latn-mx",
          ztm: "ztm-latn-mx",
          ztn: "ztn-latn-mx",
          ztp: "ztp-latn-mx",
          ztq: "ztq-latn-mx",
          zts: "zts-latn-mx",
          ztt: "ztt-latn-mx",
          ztu: "ztu-latn-mx",
          ztx: "ztx-latn-mx",
          zty: "zty-latn-mx",
          zu: "zu-latn-za",
          zua: "zua-latn-ng",
          zuh: "zuh-latn-pg",
          zum: "zum-arab-om",
          zun: "zun-latn-us",
          zuy: "zuy-latn-cm",
          zyg: "zyg-hani-cn",
          zyj: "zyj-latn-cn",
          "zyj-hani": "zyj-hani-cn",
          zyn: "zyn-hani-cn",
          zyp: "zyp-latn-mm",
          zza: "zza-latn-tr",
          zzj: "zzj-hani-cn",
        },
        hd = {}.hasOwnProperty;
      function Ll(Y) {
        const { language: U, script: K, region: Q } = Y;
        let q;
        var ee, fe;
        return (
          K && Q && (q = Zi[ip({ language: U, script: K, region: Q })])
            ? ((Y.script = void 0), (Y.region = void 0))
            : K && (q = Zi[ip({ language: U, script: K })])
            ? (Y.script = void 0)
            : Q && (q = Zi[ip({ language: U, region: Q })])
            ? (Y.region = void 0)
            : U && (q = Zi[U]),
          q &&
            ((Y.language = void 0),
            (ee = Y),
            (fe = xl(q)),
            ee.language || (ee.language = fe.language),
            ee.script || (ee.script = fe.script),
            ee.region || (ee.region = fe.region),
            fe.variants && ee.variants.push(...fe.variants)),
          ip(Y)
        );
      }
      function Ja(Y, U) {
        const K = U || {},
          Q = xl(String(Y || "").toLowerCase(), K),
          q = ip(Q);
        if (!q) return q;
        let ee = -1;
        for (; ++ee < Od.length; ) {
          let fe = Od[ee].from;
          fe.slice(0, 4) === "und-" &&
            Q.language &&
            (fe = Q.language + fe.slice(3)),
            ap(q, fe).length > 0 && Rl(Q, fe, Od[ee].to);
        }
        for (ee = -1; ++ee < Uc.length; )
          Lo(Q, Uc[ee].from.field, Uc[ee].from.value) &&
            Ps(Q, Uc[ee].to.field, Uc[ee].to.value);
        if (
          ((function (fe) {
            Ll(fe);
            const { language: ve, script: ne, region: Te } = fe;
            if (!ve) return fe;
            const _e = ip({ language: ve, script: ne, region: Te });
            _e === Ll(xl(ve))
              ? ((fe.script = void 0), (fe.region = void 0))
              : Te && _e === Ll(xl(ve + "-" + Te))
              ? (fe.script = void 0)
              : ne && _e === Ll(xl(ve + "-" + ne)) && (fe.region = void 0);
          })(Q),
          Q.variants.sort(),
          Q.extensions.sort(Fm),
          K.warning)
        ) {
          let fe;
          for (fe in Wv)
            if (hd.call(Wv, fe)) {
              const ve = Wv[fe],
                ne = Q[fe];
              if (ne && hd.call(ve, ne)) {
                const Te = ve[ne];
                K.warning(
                  "Deprecated " +
                    fe +
                    " `" +
                    ne +
                    "`, expected one of `" +
                    Te.join("`, `") +
                    "`",
                  -1,
                  7
                );
              }
            }
        }
        return (
          Q.script &&
            (Q.script = Q.script.charAt(0).toUpperCase() + Q.script.slice(1)),
          Q.region && (Q.region = Q.region.toUpperCase()),
          ip(Q)
        );
      }
      function Rl(Y, U, K) {
        const Q = xl(U),
          q = xl(K),
          ee = [],
          fe = Q.language;
        let ve;
        for (ve in Q)
          if (hd.call(Q, ve)) {
            const ne = Q[ve];
            ne && Lo(Y, ve, ne) && ee.push(ve);
          }
        for (ve in q)
          if (hd.call(q, ve)) {
            const ne = q[ve];
            fe &&
              ne &&
              (ee.includes(ve) || !Y[ve]) &&
              Ps(Y, ve, ve === "language" && ne === "und" ? fe : ne);
          }
      }
      function Lo(Y, U, K) {
        let Q,
          q = !1;
        if (K) {
          const ee = Y[U];
          if (((Q = ee), Array.isArray(ee))) {
            Q = [];
            let fe = -1;
            for (; ++fe < ee.length; ) {
              const ve = ee[fe];
              K.includes(ve) ? (q = !0) : Q.push(ve);
            }
          } else ee === K && ((Q = null), (q = !0));
          Y[U] = Q;
        }
        return q;
      }
      function Ps(Y, U, K) {
        const Q = Y[U];
        if (Array.isArray(Q)) {
          const q = Array.isArray(K) ? K : [K];
          let ee = -1;
          for (; ++ee < q.length; ) {
            const fe = q[ee];
            Q.includes(fe) || Q.push(fe);
          }
        } else Y[U] = K;
      }
      function Fm(Y, U) {
        return Y.singleton > U.singleton
          ? 1
          : Y.singleton < U.singleton
          ? -1
          : 0;
      }
      function ny() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K, Q, q, ee, fe, ve, ne, Te, _e, se, le;
        function me(Ie) {
          if (
            !(
              Ie &&
              Ie.currentRepresentation &&
              Ie.currentRepresentation.mediaInfo &&
              Ie.currentRepresentation.mediaInfo.type
            )
          )
            return;
          const Ue = Ie.currentRepresentation.mediaInfo.type;
          ne[Ue] = Ie.currentRepresentation;
        }
        function we(Ie, Ue) {
          return Ie && q[Ue] && q[Ue][Ie] ? q[Ue][Ie].list : [];
        }
        function Me(Ie, Ue) {
          return Ie && q[Ue] && q[Ue][Ie] ? q[Ue][Ie].current : null;
        }
        function Oe(Ie) {
          let Ue =
            arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
          if (!Ie || !Ie.streamInfo) return;
          const at = Ie.type,
            ft = Ie.streamInfo.id,
            Rt = Me(at, ft);
          if (
            q[ft] &&
            q[ft][at] &&
            ((q[ft][at].current = Ie),
            q[ft][at].current &&
              ((at !== P.default.TEXT && !Fe(Ie, Rt)) ||
                (at === P.default.TEXT && Ie.isFragmented)) &&
              U.trigger(
                G.default.CURRENT_TRACK_CHANGED,
                {
                  oldMediaInfo: Rt,
                  newMediaInfo: Ie,
                  switchMode: ee.get().streaming.trackSwitchMode[at],
                  options: Ue,
                },
                { streamId: ft }
              ),
            !Ue.hasOwnProperty("noSettingsSave") || !Ue.noSettingsSave)
          ) {
            let an = (function (tn) {
              const fn = {
                lang: tn.lang,
                viewpoint: tn.viewpoint,
                roles: tn.roles,
                accessibility: tn.accessibility,
                audioChannelConfiguration: tn.audioChannelConfiguration,
                codec: tn.codec,
              };
              return fn.lang ||
                fn.viewpoint ||
                (fn.role && fn.role.length > 0) ||
                (fn.accessibility && fn.accessibility.length > 0) ||
                (fn.audioChannelConfiguration &&
                  fn.audioChannelConfiguration.length > 0)
                ? fn
                : null;
            })(Ie);
            if (!an || !q[ft][at].storeLastSettings) return;
            an.roles && ((an.role = an.roles[0]), delete an.roles),
              an.accessibility && (an.accessibility = an.accessibility[0]),
              an.audioChannelConfiguration &&
                (an.audioChannelConfiguration =
                  an.audioChannelConfiguration[0]),
              (ve[at] = an),
              le.setSavedMediaSettings(at, an);
          }
        }
        function Ge(Ie, Ue) {
          Ie && Ue && (fe[Ie] = Ue);
        }
        function $e(Ie) {
          return Ie ? fe[Ie] : null;
        }
        function Fe(Ie, Ue) {
          if (!Ie && !Ue) return !0;
          if (!Ie || !Ue) return !1;
          const at = Ie.id === Ue.id,
            ft = JSON.stringify(Ie.viewpoint) === JSON.stringify(Ue.viewpoint),
            Rt = Ie.lang === Ue.lang,
            an = Ie.codec === Ue.codec,
            tn = JSON.stringify(Ie.roles) === JSON.stringify(Ue.roles),
            fn =
              JSON.stringify(Ie.accessibility) ===
              JSON.stringify(Ue.accessibility),
            nr =
              JSON.stringify(Ie.audioChannelConfiguration) ===
              JSON.stringify(Ue.audioChannelConfiguration);
          return at && an && ft && Rt && tn && fn && nr;
        }
        function qe() {
          (q = {}),
            (ve = {}),
            (ne = {}),
            (fe = { audio: null, video: null, text: null }),
            U.off(S.default.REPRESENTATION_SWITCH, me, K);
        }
        function Re(Ie, Ue, at) {
          let ft = [];
          return (
            Ie.forEach(function (Rt) {
              Ue(at, Rt) && ft.push(Rt);
            }),
            ft.length !== 0
              ? ft
              : (Q.info(
                  "Filter-Function (" +
                    Ue.name +
                    ") resulted in no tracks; setting ignored"
                ),
                Ie)
          );
        }
        function be(Ie, Ue) {
          try {
            return !Ie.lang || Ie.lang instanceof RegExp
              ? Ue.lang.match(Ie.lang)
              : Ue.lang !== "" && ap(Ue.lang, Ja(Ie.lang)).length > 0;
          } catch {
            return !1;
          }
        }
        function Se(Ie, Ue) {
          return (
            Ie.index === void 0 || Ie.index === null || Ue.index === Ie.index
          );
        }
        function ke(Ie, Ue) {
          return Ie.id === void 0 || Ie.id === null || Ue.id === Ie.id;
        }
        function he(Ie, Ue) {
          return (
            !Ie.viewpoint ||
            !!Ue.viewpoint.filter(function (at) {
              return Ke(at, Ie.viewpoint);
            })[0]
          );
        }
        function rt(Ie, Ue) {
          let at =
            arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
          return (
            !Ie.role ||
            !!Ue.roles.filter(function (ft) {
              return Ke(ft, Ie.role);
            })[0] ||
            (Ue.type === P.default.AUDIO && at)
          );
        }
        function Ze(Ie, Ue) {
          let at;
          return (
            (at = Ie.accessibility
              ? !!Ue.accessibility.filter(function (ft) {
                  return Ke(ft, Ie.accessibility);
                })[0]
              : !Ue.accessibility.length),
            at
          );
        }
        function nt(Ie, Ue) {
          return (
            !Ie.audioChannelConfiguration ||
            !!Ue.audioChannelConfiguration.filter(function (at) {
              return Ke(at, Ie.audioChannelConfiguration);
            })[0]
          );
        }
        function vt(Ie, Ue) {
          return !Ie.codec || Ie.codec === Ue.codec;
        }
        function ce(Ie) {
          let Ue = 0,
            at = [];
          return (
            Ie.forEach((ft) => {
              isNaN(ft.selectionPriority) ||
                (ft.selectionPriority > Ue
                  ? ((Ue = ft.selectionPriority), (at = [ft]))
                  : ft.selectionPriority === Ue && at.push(ft));
            }),
            at
          );
        }
        function Ve(Ie) {
          let Ue,
            at = 0,
            ft = [];
          return (
            Ie.forEach(function (Rt) {
              (Ue = Math.max.apply(
                Math,
                Rt.bitrateList.map(function (an) {
                  return an.bandwidth;
                })
              )),
                Ue > at ? ((at = Ue), (ft = [Rt])) : Ue === at && ft.push(Rt);
            }),
            ft
          );
        }
        function je(Ie) {
          let Ue,
            at = 1 / 0,
            ft = [];
          return (
            Ie.forEach(function (Rt) {
              (Ue =
                Rt.bitrateList.reduce(function (tn, fn) {
                  const nr = Math.max(1, fn.width * fn.height);
                  return tn + fn.bandwidth / nr;
                }, 0) / Rt.bitrateList.length),
                Ue < at ? ((at = Ue), (ft = [Rt])) : Ue === at && ft.push(Rt);
            }),
            ft
          );
        }
        function it(Ie) {
          let Ue,
            at = 0,
            ft = [];
          return (
            Ie.forEach(function (Rt) {
              (Ue = Rt.representationCount),
                Ue > at ? ((at = Ue), (ft = [Rt])) : Ue === at && ft.push(Rt);
            }),
            ft
          );
        }
        function Qe(Ie, Ue) {
          if (Ie === P.default.TEXT)
            return (function (Rt) {
              if (!Rt || Rt.length === 0) return null;
              const an = Rt.filter(
                (tn) =>
                  !(tn && tn.roles && tn.roles.length > 0) ||
                  tn.roles.every(
                    (fn) =>
                      fn.schemeIdUri !== P.default.DASH_ROLE_SCHEME_ID ||
                      fn.value !== I.default.FORCED_SUBTITLE
                  )
              );
              return an.length > 0 ? an[0] : Rt[0];
            })(Ue);
          let at;
          const ft = Te.getCustomInitialTrackSelectionFunction();
          if (
            ((at = (function (Rt) {
              try {
                let an;
                return (
                  (an = (function (tn) {
                    try {
                      const fn = tn.filter((nr) => {
                        const Bn = nr.type;
                        return nr.bitrateList.some((wr) => {
                          const hr = _e.getAbrBitrateParameter(
                              "maxBitrate",
                              Bn
                            ),
                            pi = _e.getAbrBitrateParameter("minBitrate", Bn);
                          return !(
                            (hr > -1 && wr.bandwidth > 1e3 * hr) ||
                            (pi > -1 && wr.bandwidth < 1e3 * pi)
                          );
                        });
                      });
                      return fn.length > 0 ? fn : tn;
                    } catch (fn) {
                      return Q.error(fn), tn;
                    }
                  })(Rt)),
                  (an = (function (tn) {
                    try {
                      if (!ee.get().streaming.abr.limitBitrateByPortal)
                        return tn;
                      const { elementWidth: fn } = se.getVideoElementSize(),
                        nr = tn.filter(
                          (Bn) =>
                            Bn.type !== P.default.VIDEO ||
                            Bn.bitrateList.some((wr) => wr.width <= fn)
                        );
                      return nr.length > 0 ? nr : tn;
                    } catch (fn) {
                      return Q.error(fn), tn;
                    }
                  })(an)),
                  an
                );
              } catch (an) {
                return Q.error(an), Rt;
              }
            })(Ue)),
            ft && typeof ft == "function")
          )
            at = ft(at);
          else if (ne[Ie])
            at = (function (Rt, an) {
              if (!Rt || Rt.length === 0 || !an || !ne[an]) return Rt;
              const tn = ne[an].bandwidth;
              if (!tn || isNaN(tn)) return Rt;
              let fn = { min: NaN, track: null };
              return (
                Rt.forEach((nr) => {
                  nr.bitrateList.forEach((Bn) => {
                    const wr = Math.abs(Bn.bandwidth - tn);
                    (isNaN(fn.min) || wr < fn.min) &&
                      ((fn.min = wr), (fn.track = nr));
                  });
                }),
                fn.track ? [fn.track] : Rt
              );
            })(at, Ie);
          else {
            let Rt = ee.get().streaming.selectionModeForInitialTrack;
            switch (Rt) {
              case P.default.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:
                at = (function (an) {
                  let tn = ce(an);
                  return (
                    tn.length > 1 && (tn = je(tn)),
                    tn.length > 1 && (tn = Ve(tn)),
                    tn.length > 1 && (tn = it(tn)),
                    tn
                  );
                })(at);
                break;
              case P.default.TRACK_SELECTION_MODE_HIGHEST_BITRATE:
                at = (function (an) {
                  let tn = Ve(an);
                  return tn.length > 1 && (tn = it(tn)), tn;
                })(at);
                break;
              case P.default.TRACK_SELECTION_MODE_FIRST_TRACK:
                at = We(at);
                break;
              case P.default.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY:
                at = (function (an) {
                  let tn = je(an);
                  return tn.length > 1 && (tn = Ve(tn)), tn;
                })(at);
                break;
              case P.default.TRACK_SELECTION_MODE_WIDEST_RANGE:
                at = (function (an) {
                  let tn = it(an);
                  return tn.length > 1 && (tn = Ve(an)), tn;
                })(at);
                break;
              default:
                Q.warn(
                  `Track selection mode ${Rt} is not supported. Falling back to TRACK_SELECTION_MODE_FIRST_TRACK`
                ),
                  (at = We(at));
            }
          }
          return at.length > 0 ? at[0] : Ue[0];
        }
        function We(Ie) {
          return Ie[0];
        }
        function Ke(Ie, Ue) {
          return (
            !(!Ie || !Ue) &&
            JSON.stringify({ schemeIdUri: Ie.schemeIdUri, value: Ie.value }) ===
              JSON.stringify({ schemeIdUri: Ue.schemeIdUri, value: Ue.value })
          );
        }
        return (
          (K = {
            addTrack: function (Ie) {
              if (!Ie) return;
              const Ue = Ie.type;
              if (
                (at = Ue) !== P.default.AUDIO &&
                at !== P.default.VIDEO &&
                at !== P.default.TEXT &&
                at !== P.default.IMAGE
              )
                return;
              var at;
              let ft = Ie.streamInfo.id;
              q[ft] ||
                (q[ft] = (function () {
                  const an =
                    ee.get().streaming
                      .saveLastMediaSettingsForCurrentStreamingSession;
                  return {
                    audio: { list: [], storeLastSettings: an, current: null },
                    video: { list: [], storeLastSettings: an, current: null },
                    text: { list: [], storeLastSettings: an, current: null },
                    image: { list: [], storeLastSettings: an, current: null },
                  };
                })());
              const Rt = q[ft][Ue].list;
              for (let an = 0, tn = Rt.length; an < tn; ++an)
                if (Fe(Rt[an], Ie)) return;
              Rt.push(Ie);
            },
            areTracksEqual: Fe,
            clearDataForStream: function (Ie) {
              q[Ie] && delete q[Ie];
            },
            getCurrentTrackFor: Me,
            getInitialSettings: $e,
            getTracksFor: we,
            getTracksWithHighestSelectionPriority: ce,
            getTracksWithHighestBitrate: Ve,
            getTracksWithHighestEfficiency: je,
            getTracksWithWidestRange: it,
            initialize: function () {
              U.on(S.default.REPRESENTATION_SWITCH, me, K);
            },
            isCurrentTrack: function (Ie) {
              if (!Ie) return !1;
              const Ue = Ie.type,
                at = Ie.streamInfo.id;
              return q[at] && q[at][Ue] && Fe(q[at][Ue].current, Ie);
            },
            matchSettings: function (Ie, Ue) {
              let at =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
              try {
                let ft = !1;
                if (Ie.lang) {
                  if (Ie.lang instanceof RegExp) ft = Ue.lang.match(Ie.lang);
                  else if (Ue.lang !== "") {
                    const Bn = Ja(Ie.lang);
                    Bn && (ft = ap(Ue.lang, Bn).length > 0);
                  }
                } else ft = !0;
                const Rt =
                    Ie.index === void 0 ||
                    Ie.index === null ||
                    Ue.index === Ie.index,
                  an =
                    !Ie.viewpoint ||
                    !!Ue.viewpoint.filter(function (Bn) {
                      return Ke(Bn, Ie.viewpoint);
                    })[0],
                  tn =
                    !Ie.role ||
                    !!Ue.roles.filter(function (Bn) {
                      return Ke(Bn, Ie.role);
                    })[0];
                let fn =
                    !Ie.accessibility ||
                    !!Ue.accessibility.filter(function (Bn) {
                      return Ke(Bn, Ie.accessibility);
                    })[0],
                  nr =
                    !Ie.audioChannelConfiguration ||
                    !!Ue.audioChannelConfiguration.filter(function (Bn) {
                      return Ke(Bn, Ie.audioChannelConfiguration);
                    })[0];
                return (
                  ft &&
                  Rt &&
                  an &&
                  (tn || (Ue.type === P.default.AUDIO && at)) &&
                  fn &&
                  nr
                );
              } catch {
                return !1;
              }
            },
            matchSettingsAccessibility: Ze,
            matchSettingsAudioChannelConfig: nt,
            matchSettingsIndex: Se,
            matchSettingsLang: be,
            matchSettingsRole: rt,
            matchSettingsViewPoint: he,
            reset: qe,
            saveTextSettingsDisabled: function () {
              le.setSavedMediaSettings(P.default.TEXT, null);
            },
            selectInitialTrack: Qe,
            setConfig: function (Ie) {
              Ie &&
                (Ie.domStorage && (le = Ie.domStorage),
                Ie.settings && (ee = Ie.settings),
                Ie.customParametersModel && (Te = Ie.customParametersModel),
                Ie.mediaPlayerModel && (_e = Ie.mediaPlayerModel),
                Ie.videoModel && (se = Ie.videoModel));
            },
            setInitialMediaSettingsForType: function (Ie, Ue) {
              let at = ve[Ie] || $e(Ie);
              const ft = we(Ie, Ue.id);
              let Rt = [];
              (at && Object.keys(at).length !== 0) ||
                ((at = le.getSavedMediaSettings(Ie)),
                at && delete at.codec,
                Ge(Ie, at)),
                ft &&
                  ft.length !== 0 &&
                  (at &&
                    ((Rt = Array.from(ft)),
                    Q.info(
                      "Filtering " +
                        Rt.length +
                        " " +
                        Ie +
                        " tracks based on settings"
                    ),
                    (Rt = Re(Rt, ke, at)),
                    (Rt = Re(Rt, be, at)),
                    (Rt = Re(Rt, Se, at)),
                    (Rt = Re(Rt, he, at)),
                    (Ie === P.default.AUDIO && ve[Ie]) || (Rt = Re(Rt, rt, at)),
                    (Rt = Re(Rt, Ze, at)),
                    (Rt = Re(Rt, nt, at)),
                    (Rt = Re(Rt, vt, at)),
                    Q.info(
                      "Filtering " +
                        Ie +
                        " tracks ended, found " +
                        Rt.length +
                        " matching track(s)."
                    )),
                  Rt.length === 0
                    ? Oe(Qe(Ie, ft))
                    : Rt.length > 1
                    ? Oe(Qe(Ie, Rt))
                    : Oe(Rt[0]));
            },
            setInitialSettings: Ge,
            setTrack: Oe,
          }),
          (Q = (0, E.default)(Y).getInstance().getLogger(K)),
          qe(),
          K
        );
      }
      ny.__dashjs_factory_name = "MediaController";
      const tc = H.default.getSingletonFactory(ny);
      H.default.updateSingletonFactory(ny.__dashjs_factory_name, tc);
      var yg = tc;
      const Hr = NaN;
      class Jl {
        constructor(U, K) {
          (this.data = { baseUrls: U || null, selectedIdx: K || Hr }),
            (this.children = []);
        }
      }
      function n_() {
        let Y, U, K, Q;
        const q = this.context,
          ee = (0, jr.default)(q).getInstance();
        function fe(_e, se, le) {
          const me = ve(le);
          _e[se]
            ? ee.areEqual(me, _e[se].data.baseUrls) ||
              ((_e[se].data.baseUrls = me), (_e[se].data.selectedIdx = Hr))
            : (_e[se] = new Jl(me));
        }
        function ve(_e) {
          let se = K.getBaseURLsFromElement(_e);
          const le = Q.getSynthesizedBaseUrlElements(se);
          return le && le.length > 0 && (se = se.concat(le)), se;
        }
        function ne(_e, se) {
          const le = se || U;
          _e(le.data), le.children && le.children.forEach((me) => ne(_e, me));
        }
        function Te() {
          U = new Jl();
        }
        return (
          (Y = {
            reset: Te,
            update: function (_e) {
              (function (se) {
                (function () {
                  if (
                    !K ||
                    !K.hasOwnProperty("getBaseURLsFromElement") ||
                    !K.hasOwnProperty("getRepresentationSortFunction")
                  )
                    throw new Error(
                      "setConfig function has to be called previously"
                    );
                })();
                const le = ve(se);
                ee.areEqual(le, U.data.baseUrls) ||
                  ((U.data.baseUrls = le), (U.data.selectedIdx = Hr)),
                  se &&
                    se.Period &&
                    se.Period.forEach((me, we) => {
                      fe(U.children, we, me),
                        me.AdaptationSet &&
                          me.AdaptationSet.forEach((Me, Oe) => {
                            fe(U.children[we].children, Oe, Me),
                              Me.Representation &&
                                Me.Representation.sort(
                                  K.getRepresentationSortFunction()
                                ).forEach((Ge, $e) => {
                                  fe(
                                    U.children[we].children[Oe].children,
                                    $e,
                                    Ge
                                  );
                                });
                          });
                    });
              })(_e);
            },
            getForPath: function (_e) {
              let se = U;
              const le = [se.data];
              return (
                _e &&
                  _e.forEach((me) => {
                    (se = se.children[me]), se && le.push(se.data);
                  }),
                le.filter((me) => me.baseUrls.length)
              );
            },
            invalidateSelectedIndexes: function (_e) {
              ne((se) => {
                isNaN(se.selectedIdx) ||
                  (_e === se.baseUrls[se.selectedIdx].serviceLocation &&
                    (se.selectedIdx = Hr));
              });
            },
            setConfig: function (_e) {
              _e.adapter && (K = _e.adapter),
                _e.contentSteeringController &&
                  (Q = _e.contentSteeringController);
            },
            getBaseUrls: function (_e) {
              return ve(_e);
            },
          }),
          Te(),
          Y
        );
      }
      n_.__dashjs_factory_name = "BaseURLTreeModel";
      var Zh = H.default.getClassFactory(n_);
      function l2(Y) {
        let U;
        const K = (Y = Y || {}).blacklistController;
        return (
          (U = {
            select: function (Q) {
              return (
                Q &&
                (function (q) {
                  let ee,
                    fe,
                    ve = 0,
                    ne = [],
                    Te = 0;
                  if (
                    ((fe = q
                      .sort(function (_e, se) {
                        let le = _e.dvbPriority - se.dvbPriority;
                        return isNaN(le) ? 0 : le;
                      })
                      .filter(function (_e, se, le) {
                        return (
                          !se ||
                          (le[0].dvbPriority &&
                            _e.dvbPriority &&
                            le[0].dvbPriority === _e.dvbPriority)
                        );
                      })),
                    fe.length)
                  )
                    return (
                      fe.length > 1 &&
                        (fe.forEach((_e) => {
                          (ve += _e.dvbWeight), ne.push(ve);
                        }),
                        (ee = Math.floor(Math.random() * (ve - 1))),
                        ne.every((_e, se) => ((Te = se), !(ee < _e)))),
                      fe[Te]
                    );
                })(
                  (function (q) {
                    let ee = [];
                    return q
                      .filter(function (fe) {
                        return (
                          !K.contains(fe.serviceLocation) ||
                          (fe.dvbPriority && ee.push(fe.dvbPriority), !1)
                        );
                      })
                      .filter(function (fe) {
                        return (
                          !ee.length ||
                          !fe.dvbPriority ||
                          ee.indexOf(fe.dvbPriority) === -1
                        );
                      });
                  })(Q)
                )
              );
            },
          }),
          U
        );
      }
      l2.__dashjs_factory_name = "DVBSelector";
      var Kv = H.default.getClassFactory(l2);
      function op(Y) {
        let U;
        const K = (Y = Y || {}).blacklistController;
        return (
          (U = {
            select: function (Q) {
              let q,
                ee = 0;
              return (
                Q &&
                  Q.some(
                    (fe, ve) => ((ee = ve), !K.contains(fe.serviceLocation))
                  ) &&
                  (q = Q[ee]),
                q
              );
            },
          }),
          U
        );
      }
      op.__dashjs_factory_name = "BasicSelector";
      var r_ = H.default.getClassFactory(op);
      function Gd() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K,
          Q,
          q,
          ee = [];
        function fe() {
          let ne =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : [],
            Te =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : [],
            _e = 0,
            se = NaN;
          for (; _e < ne.length; ) {
            const le = ne[_e],
              me = Te.findIndex(
                (we) => we.serviceLocation && we.serviceLocation === le
              );
            if (me !== -1 && !q.contains(Te[me].serviceLocation)) {
              se = me;
              break;
            }
            _e += 1;
          }
          return se;
        }
        function ve(ne) {
          const Te = Q.getCurrentSteeringResponseData();
          if (!Te) return;
          const _e = ne.entry,
            se = setTimeout(() => {
              q.remove(_e), ee.splice(ee.indexOf(se, 1));
            }, 1e3 * Te.ttl);
          ee.push(se);
        }
        return (
          (K = {
            selectBaseUrlIndex: function (ne) {
              let Te = NaN;
              if (isNaN(ne.selectedIdx)) {
                const se = Q.getSteeringDataFromManifest();
                se &&
                  se.defaultServiceLocationArray.length > 0 &&
                  (Te = fe(se.defaultServiceLocationArray, ne.baseUrls));
              }
              const _e = Q.getCurrentSteeringResponseData();
              return (
                ne.baseUrls &&
                  ne.baseUrls.length &&
                  _e &&
                  _e.pathwayPriority &&
                  _e.pathwayPriority.length &&
                  (Te = fe(_e.pathwayPriority, ne.baseUrls)),
                Te
              );
            },
            setConfig: function (ne) {
              ne.blacklistController && (q = ne.blacklistController),
                ne.contentSteeringController &&
                  (Q = ne.contentSteeringController),
                U.on(ne.addBlacklistEventName, ve, K);
            },
            reset: function () {
              ee.forEach((ne) => clearTimeout(ne)), (ee = []);
            },
          }),
          (Q = Vv(Y).getInstance()),
          K
        );
      }
      Gd.__dashjs_factory_name = "ContentSteeringSelector";
      var i_ = H.default.getClassFactory(Gd);
      function ry() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance(),
          K = (0, ue.default)(Y).getInstance();
        let Q, q, ee, fe, ve, ne;
        function Te() {
          ve.reset(), q.reset();
        }
        return (
          (Q = {
            chooseSelector: function (_e) {
              (0, Wt.checkParameterType)(_e, "boolean"), (ne = _e ? fe : ee);
            },
            select: function (_e) {
              if (!_e) return;
              if (K.get().streaming.applyContentSteering) {
                const le = ve.selectBaseUrlIndex(_e);
                isNaN(le) || le === -1 || (_e.selectedIdx = le);
              }
              if (!isNaN(_e.selectedIdx)) return _e.baseUrls[_e.selectedIdx];
              let se = ne.select(_e.baseUrls);
              return se
                ? ((_e.selectedIdx = _e.baseUrls.indexOf(se)), se)
                : (U.trigger(G.default.URL_RESOLUTION_FAILED, {
                    error: new ot.default(
                      de.URL_RESOLUTION_FAILED_GENERIC_ERROR_CODE,
                      de.URL_RESOLUTION_FAILED_GENERIC_ERROR_MESSAGE
                    ),
                  }),
                  void (ne === ee && Te()));
            },
            reset: Te,
            setConfig: function (_e) {
              _e.selector && (ne = _e.selector),
                _e.contentSteeringSelector && (ve = _e.contentSteeringSelector);
            },
          }),
          (q = Hv(Y).create({
            updateEventName:
              G.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,
            addBlacklistEventName:
              G.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,
          })),
          (ee = r_(Y).create({ blacklistController: q })),
          (fe = Kv(Y).create({ blacklistController: q })),
          (ve = i_(Y).create()),
          ve.setConfig({
            blacklistController: q,
            addBlacklistEventName:
              G.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_ADD,
          }),
          (ne = ee),
          Q
        );
      }
      ry.__dashjs_factory_name = "BaseURLSelector";
      var Ka = H.default.getClassFactory(ry);
      function Io() {
        let Y, U;
        const K = this.context,
          Q = (0, X.default)(K).getInstance(),
          q = ar(K).getInstance();
        let ee, fe, ve;
        function ne(_e) {
          ee.update(_e),
            fe.chooseSelector(U.getIsDVB(_e)),
            Q.trigger(S.default.BASE_URLS_UPDATED, { baseUrls: Te(_e) });
        }
        function Te(_e) {
          return ee.getBaseUrls(_e);
        }
        return (
          (Y = {
            reset: function () {
              ee.reset(), fe.reset();
            },
            initialize: function (_e) {
              ee.setConfig({ adapter: U, contentSteeringController: ve }),
                ne(_e);
            },
            resolve: function (_e) {
              const se = ee.getForPath(_e).reduce((le, me) => {
                const we = fe.select(me);
                return we
                  ? (q.isRelative(we.url)
                      ? (le.url = q.resolve(we.url, le.url))
                      : ((le.url = we.url),
                        (le.serviceLocation = we.serviceLocation)),
                    (le.availabilityTimeOffset = we.availabilityTimeOffset),
                    (le.availabilityTimeComplete = we.availabilityTimeComplete),
                    (le.queryParams = we.queryParams),
                    le)
                  : new Ot();
              }, new Ot());
              if (!q.isRelative(se.url)) return se;
            },
            setConfig: function (_e) {
              _e.baseURLTreeModel && (ee = _e.baseURLTreeModel),
                _e.baseURLSelector && (fe = _e.baseURLSelector),
                _e.adapter && (U = _e.adapter),
                _e.contentSteeringController &&
                  (ve = _e.contentSteeringController);
            },
            getBaseUrls: Te,
            update: ne,
          }),
          (ee = Zh(K).create()),
          (fe = Ka(K).create()),
          Q.on(
            G.default.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED,
            function (_e) {
              ee.invalidateSelectedIndexes(_e.entry);
            },
            Y
          ),
          Y
        );
      }
      Io.__dashjs_factory_name = "BaseURLController";
      var Um = H.default.getClassFactory(Io),
        ms = class extends De {
          constructor(Y, U) {
            super(),
              (this.url = Y || null),
              (this.type = U || null),
              (this.mediaType = P.default.STREAM),
              (this.responseType = "");
          }
        };
      function sp(Y) {
        Y = Y || {};
        const U = this.context,
          K = (0, X.default)(U).getInstance();
        let Q,
          q = Wh(U).create({
            errHandler: Y.errHandler,
            dashMetrics: Y.dashMetrics,
            mediaPlayerModel: Y.mediaPlayerModel,
            errors: de,
          });
        return (
          (Q = {
            load: function (ee, fe, ve) {
              const ne = function (Te, _e) {
                (fe.resolved = !0),
                  (fe.resolvedContent = Te || null),
                  K.trigger(G.default.XLINK_ELEMENT_LOADED, {
                    element: fe,
                    resolveObject: ve,
                    error:
                      Te || _e
                        ? null
                        : new ot.default(
                            de.XLINK_LOADER_LOADING_FAILURE_ERROR_CODE,
                            de.XLINK_LOADER_LOADING_FAILURE_ERROR_MESSAGE + ee
                          ),
                  });
              };
              if (ee === "urn:mpeg:dash:resolve-to-zero:2013") ne(null, !0);
              else {
                const Te = new ms(ee, F.HTTPRequest.XLINK_EXPANSION_TYPE);
                q.load({
                  request: Te,
                  success: function (_e) {
                    ne(_e);
                  },
                  error: function () {
                    ne(null);
                  },
                });
              }
            },
            reset: function () {
              q && (q.abort(), (q = null));
            },
          }),
          Q
        );
      }
      sp.__dashjs_factory_name = "XlinkLoader";
      var mh = H.default.getClassFactory(sp);
      const yc = "onLoad";
      function Bm(Y) {
        Y = Y || {};
        let U = this.context,
          K = (0, X.default)(U).getInstance();
        const Q = ar(U).getInstance();
        let q, ee, fe, ve;
        function ne(me, we, Me) {
          let Oe,
            Ge,
            $e = {};
          ($e.elements = me),
            ($e.type = we),
            ($e.resolveType = Me),
            $e.elements.length === 0 && _e($e);
          for (let Fe = 0; Fe < $e.elements.length; Fe++)
            (Oe = $e.elements[Fe]),
              (Ge = Q.isHTTPURL(Oe.url)
                ? Oe.url
                : Oe.originalContent.BaseURL + Oe.url),
              ve.load(Ge, Oe, $e);
        }
        function Te(me) {
          let we,
            Me,
            Oe = "";
          if (
            ((we = me.element), (Me = me.resolveObject), we.resolvedContent)
          ) {
            let Ge = 0;
            we.resolvedContent.indexOf("<?xml") === 0 &&
              (Ge = we.resolvedContent.indexOf("?>") + 2),
              (Oe =
                we.resolvedContent.substr(0, Ge) +
                "<response>" +
                we.resolvedContent.substr(Ge) +
                "</response>"),
              (we.resolvedContent = ee.parseXml(Oe).response);
          }
          (function (Ge) {
            let $e, Fe;
            for ($e = 0; $e < Ge.elements.length; $e++)
              if (((Fe = Ge.elements[$e]), Fe.resolved === !1)) return !1;
            return !0;
          })(Me) && _e(Me);
        }
        function _e(me) {
          let we,
            Me,
            Oe = [];
          if (
            ((function (Ge) {
              let $e,
                Fe,
                qe,
                Re,
                be,
                Se,
                ke = [];
              for (Re = Ge.elements.length - 1; Re >= 0; Re--) {
                if (
                  (($e = Ge.elements[Re]), (Fe = $e.type), $e.resolvedContent)
                ) {
                  if ($e.resolvedContent)
                    for (be = 0; be < $e.resolvedContent[Fe].length; be++)
                      (qe = $e.resolvedContent[Fe][be]), ke.push(qe);
                } else
                  delete $e.originalContent["xlink:actuate"],
                    delete $e.originalContent["xlink:href"],
                    ke.push($e.originalContent);
                for (
                  $e.parentElement[Fe].splice($e.index, 1), Se = 0;
                  Se < ke.length;
                  Se++
                )
                  $e.parentElement[Fe].splice($e.index + Se, 0, ke[Se]);
                ke = [];
              }
              Ge.elements.length > 0 && ee.getIron().run(fe);
            })(me),
            me.resolveType === "onActuate" &&
              K.trigger(G.default.XLINK_READY, { manifest: fe }),
            me.resolveType === yc)
          )
            switch (me.type) {
              case I.default.PERIOD:
                for (we = 0; we < fe[I.default.PERIOD].length; we++)
                  (Me = fe[I.default.PERIOD][we]),
                    Me.hasOwnProperty(I.default.ADAPTATION_SET) &&
                      (Oe = Oe.concat(
                        se(
                          Me[I.default.ADAPTATION_SET],
                          Me,
                          I.default.ADAPTATION_SET,
                          yc
                        )
                      )),
                    Me.hasOwnProperty(I.default.EVENT_STREAM) &&
                      (Oe = Oe.concat(
                        se(
                          Me[I.default.EVENT_STREAM],
                          Me,
                          I.default.EVENT_STREAM,
                          yc
                        )
                      ));
                ne(Oe, I.default.ADAPTATION_SET, yc);
                break;
              case I.default.ADAPTATION_SET:
                K.trigger(G.default.XLINK_READY, { manifest: fe });
            }
        }
        function se(me, we, Me, Oe) {
          let Ge,
            $e,
            Fe,
            qe = [];
          for ($e = me.length - 1; $e >= 0; $e--)
            (Ge = me[$e]),
              Ge.hasOwnProperty("xlink:href") &&
                Ge["xlink:href"] === "urn:mpeg:dash:resolve-to-zero:2013" &&
                me.splice($e, 1);
          for ($e = 0; $e < me.length; $e++)
            (Ge = me[$e]),
              Ge.hasOwnProperty("xlink:href") &&
                Ge.hasOwnProperty("xlink:actuate") &&
                Ge["xlink:actuate"] === Oe &&
                ((Fe = le(Ge["xlink:href"], we, Me, $e, Oe, Ge)), qe.push(Fe));
          return qe;
        }
        function le(me, we, Me, Oe, Ge, $e) {
          return {
            url: me,
            parentElement: we,
            type: Me,
            index: Oe,
            resolveType: Ge,
            originalContent: $e,
            resolvedContent: null,
            resolved: !1,
          };
        }
        return (
          (q = {
            resolveManifestOnLoad: function (me) {
              let we;
              (fe = me),
                fe.Period
                  ? ((we = se(fe.Period, fe, I.default.PERIOD, yc)),
                    ne(we, I.default.PERIOD, yc))
                  : K.trigger(G.default.XLINK_READY, { manifest: fe });
            },
            setParser: function (me) {
              me && (ee = me);
            },
            reset: function () {
              K.off(G.default.XLINK_ELEMENT_LOADED, Te, q),
                ve && (ve.reset(), (ve = null));
            },
          }),
          K.on(G.default.XLINK_ELEMENT_LOADED, Te, q),
          (ve = mh(U).create({
            errHandler: Y.errHandler,
            dashMetrics: Y.dashMetrics,
            mediaPlayerModel: Y.mediaPlayerModel,
            settings: Y.settings,
          })),
          q
        );
      }
      Bm.__dashjs_factory_name = "XlinkController";
      var Hm = H.default.getClassFactory(Bm);
      function Uu(Y) {
        function U(q, ee) {
          for (let fe in q) ee.hasOwnProperty(fe) || (ee[fe] = q[fe]);
        }
        function K(q, ee, fe) {
          for (let ve = 0, ne = q.length; ve < ne; ++ve) {
            const Te = q[ve];
            if (ee[Te.name])
              if (fe[Te.name]) {
                if (Te.merge) {
                  const _e = ee[Te.name],
                    se = fe[Te.name];
                  typeof _e == "object" && typeof se == "object"
                    ? U(_e, se)
                    : (fe[Te.name] = _e + se);
                }
              } else fe[Te.name] = ee[Te.name];
          }
        }
        function Q(q, ee) {
          for (let fe = 0, ve = q.children.length; fe < ve; ++fe) {
            const ne = q.children[fe],
              Te = ee[ne.name];
            if (Te)
              for (let _e = 0, se = Te.length; _e < se; ++_e) {
                const le = Te[_e];
                K(q.properties, ee, le), Q(ne, le);
              }
          }
        }
        return {
          run: function (q) {
            if (q === null || typeof q != "object") return q;
            if (q.Period && "period" in Y) {
              const ee = Y.period,
                fe = q.Period;
              for (let ve = 0, ne = fe.length; ve < ne; ++ve) {
                const Te = fe[ve];
                if ((Q(ee, Te), "adaptationset" in Y)) {
                  const _e = Te.AdaptationSet;
                  if (_e) {
                    const se = Y.adaptationset;
                    for (let le = 0, me = _e.length; le < me; ++le)
                      Q(se, _e[le]);
                  }
                }
              }
            }
            return q;
          },
        };
      }
      Uu.__dashjs_factory_name = "ObjectIron";
      var u2 = H.default.getClassFactory(Uu),
        Zv = class {
          constructor(Y, U) {
            (this._test = Y), (this._converter = U);
          }
          get test() {
            return this._test;
          }
          get converter() {
            return this._converter;
          }
        };
      const a_ =
        /^([-])?P(([\d.]*)Y)?(([\d.]*)M)?(([\d.]*)D)?T?(([\d.]*)H)?(([\d.]*)M)?(([\d.]*)S)?/;
      var Yh = class extends Zv {
        constructor() {
          super(
            (Y, U, K) => {
              const Q = [
                  I.default.MIN_BUFFER_TIME,
                  I.default.MEDIA_PRESENTATION_DURATION,
                  I.default.MINIMUM_UPDATE_PERIOD,
                  I.default.TIMESHIFT_BUFFER_DEPTH,
                  I.default.MAX_SEGMENT_DURATION,
                  I.default.MAX_SUBSEGMENT_DURATION,
                  I.default.SUGGESTED_PRESENTATION_DELAY,
                  I.default.START,
                  P.default.START_TIME,
                  I.default.DURATION,
                ],
                q = Q.length;
              for (let ee = 0; ee < q; ee++) if (U === Q[ee]) return a_.test(K);
              return !1;
            },
            (Y) => {
              const U = a_.exec(Y);
              let K =
                31536e3 * parseFloat(U[3] || 0) +
                2592e3 * parseFloat(U[5] || 0) +
                86400 * parseFloat(U[7] || 0) +
                3600 * parseFloat(U[9] || 0) +
                60 * parseFloat(U[11] || 0) +
                parseFloat(U[13] || 0);
              return U[1] !== void 0 && (K = -K), K;
            }
          );
        }
      };
      const Xm =
        /^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(?::([0-9]*)(\.[0-9]*)?)?(?:([+-])([0-9]{2})(?::?)([0-9]{2}))?/;
      var Yv = class extends Zv {
        constructor() {
          super(
            (Y, U, K) => Xm.test(K),
            (Y) => {
              const U = Xm.exec(Y);
              let K;
              if (
                ((K = Date.UTC(
                  parseInt(U[1], 10),
                  parseInt(U[2], 10) - 1,
                  parseInt(U[3], 10),
                  parseInt(U[4], 10),
                  parseInt(U[5], 10),
                  (U[6] && parseInt(U[6], 10)) || 0,
                  (U[7] && 1e3 * parseFloat(U[7])) || 0
                )),
                U[9] && U[10])
              ) {
                const Q = 60 * parseInt(U[9], 10) + parseInt(U[10], 10);
                K += (U[8] === "+" ? -1 : 1) * Q * 60 * 1e3;
              }
              return new Date(K);
            }
          );
        }
      };
      const nc = /^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/,
        qa = [I.default.ID];
      var Vm = class extends Zv {
          constructor() {
            super(
              (Y, U, K) => nc.test(K) && qa.indexOf(U) === -1,
              (Y) => parseFloat(Y)
            );
          }
        },
        ia = class extends Zv {
          constructor() {
            super(
              (Y, U) => {
                const K = {
                  [I.default.ADAPTATION_SET]: [I.default.LANG],
                  [I.default.REPRESENTATION]: [I.default.LANG],
                  [I.default.CONTENT_COMPONENT]: [I.default.LANG],
                  [I.default.LABEL]: [I.default.LANG],
                  [I.default.GROUP_LABEL]: [I.default.LANG],
                };
                if (K.hasOwnProperty(Y)) {
                  let Q = K[Y];
                  return Q !== void 0 && Q.indexOf(U) >= 0;
                }
                return !1;
              },
              (Y) => Ja(Y) || String(Y)
            );
          }
        },
        Vr = class {
          constructor(Y, U, K) {
            (this._name = Y || ""),
              (this._properties = []),
              (this._children = K || []),
              Array.isArray(U) &&
                U.forEach((Q) => {
                  this._properties.push(
                    new (class {
                      constructor(q) {
                        var ee;
                        (this._name = q),
                          (this._merge =
                            (ee = q) &&
                            ee.length &&
                            ee.charAt(0) === ee.charAt(0).toUpperCase());
                      }
                      get name() {
                        return this._name;
                      }
                      get merge() {
                        return this._merge;
                      }
                    })(Q)
                  );
                });
          }
          get name() {
            return this._name;
          }
          get children() {
            return this._children;
          }
          get properties() {
            return this._properties;
          }
        },
        Qh = class extends Vr {
          constructor() {
            const Y = [
              I.default.PROFILES,
              I.default.WIDTH,
              I.default.HEIGHT,
              I.default.SAR,
              I.default.FRAMERATE,
              I.default.AUDIO_SAMPLING_RATE,
              I.default.MIME_TYPE,
              I.default.SEGMENT_PROFILES,
              I.default.CODECS,
              I.default.MAXIMUM_SAP_PERIOD,
              I.default.START_WITH_SAP,
              I.default.MAX_PLAYOUT_RATE,
              I.default.CODING_DEPENDENCY,
              I.default.SCAN_TYPE,
              I.default.FRAME_PACKING,
              I.default.AUDIO_CHANNEL_CONFIGURATION,
              I.default.CONTENT_PROTECTION,
              I.default.INBAND_EVENT_STREAM,
            ];
            super(I.default.ADAPTATION_SET, Y, [
              new Vr(I.default.REPRESENTATION, Y, [
                new Vr(I.default.SUB_REPRESENTATION, Y),
              ]),
            ]);
          }
        },
        Bu = class extends Vr {
          constructor() {
            const Y = [
              I.default.SEGMENT_BASE,
              I.default.SEGMENT_TEMPLATE,
              I.default.SEGMENT_LIST,
            ];
            super(I.default.PERIOD, Y, [
              new Vr(I.default.ADAPTATION_SET, Y, [
                new Vr(I.default.REPRESENTATION, Y),
              ]),
            ]);
          }
        };
      const ql = {
        "&amp;": "&",
        "&gt;": ">",
        "&lt;": "<",
        "&quot;": '"',
        "&apos;": "'",
      };
      function c2(Y, U) {
        const K = U.split(/(&[#a-zA-Z0-9]+;)/);
        if (K.length <= 1) return U;
        for (let Q = 1; Q < K.length; Q += 2) {
          const q = K[Q];
          if (q.charAt(1) === "#") {
            let ee;
            (ee =
              q.charAt(2) === "x"
                ? parseInt(q.substring(3, q.length - 1), 16)
                : parseInt(q.substring(2, q.length - 1), 10)),
              !isNaN(ee) &&
                ee >= 0 &&
                ee <= 1114111 &&
                (K[Q] = String.fromCodePoint(ee));
          } else Y.hasOwnProperty(q) && (K[Q] = Y[q]);
        }
        return K.join("");
      }
      function o_(Y, U) {
        var K = (U = U || {}).pos || 0,
          Q = !!U.keepComments,
          q = !!U.keepWhitespace,
          ee = U.attrMatchers || [],
          fe = U.nodesAsArray || [],
          ve = "<",
          ne = "<".charCodeAt(0),
          Te = ">",
          _e = ">".charCodeAt(0),
          se = "-".charCodeAt(0),
          le = "/".charCodeAt(0),
          me = "!".charCodeAt(0),
          we = "'".charCodeAt(0),
          Me = '"'.charCodeAt(0),
          Oe = "[".charCodeAt(0),
          Ge = "]".charCodeAt(0);
        function $e(rt, Ze) {
          for (var nt = []; Y[K]; )
            if (Y.charCodeAt(K) == ne) {
              if (Y.charCodeAt(K + 1) === le) {
                var vt = K + 2;
                if (
                  ((K = Y.indexOf(Te, K)), Y.substring(vt, K).indexOf(rt) == -1)
                ) {
                  var ce = Y.substring(0, K).split(`
`);
                  throw new Error(
                    `Unexpected close tag
Line: ` +
                      (ce.length - 1) +
                      `
Column: ` +
                      (ce[ce.length - 1].length + 1) +
                      `
Char: ` +
                      Y[K]
                  );
                }
                return K + 1 && (K += 1), nt;
              }
              if (Y.charCodeAt(K + 1) === me) {
                if (Y.charCodeAt(K + 2) == se) {
                  const Ke = K;
                  for (
                    ;
                    K !== -1 &&
                    (Y.charCodeAt(K) !== _e ||
                      Y.charCodeAt(K - 1) != se ||
                      Y.charCodeAt(K - 2) != se ||
                      K == -1);

                  )
                    K = Y.indexOf(Te, K + 1);
                  K === -1 && (K = Y.length),
                    Q && nt.push(Y.substring(Ke, K + 1));
                } else {
                  if (
                    Y.charCodeAt(K + 2) === Oe &&
                    Y.charCodeAt(K + 8) === Oe &&
                    Y.substr(K + 3, 5).toLowerCase() === "cdata"
                  ) {
                    var Ve = Y.indexOf("]]>", K);
                    Ve == -1
                      ? (nt.push(Y.substr(K + 9)), (K = Y.length))
                      : (nt.push(Y.substring(K + 9, Ve)), (K = Ve + 3));
                    continue;
                  }
                  {
                    const Ke = K + 1;
                    K += 2;
                    for (
                      var je = !1;
                      (Y.charCodeAt(K) !== _e || je === !0) && Y[K];

                    )
                      Y.charCodeAt(K) === Oe
                        ? (je = !0)
                        : je === !0 && Y.charCodeAt(K) === Ge && (je = !1),
                        K++;
                    nt.push(Y.substring(Ke, K));
                  }
                }
                K++;
                continue;
              }
              var it = Se();
              if (
                (nt.push(it),
                it.tagName[0] === "?" &&
                  (nt.push(...it.children), (it.children = [])),
                Ze)
              ) {
                let Ke = it.tagName;
                fe.indexOf(Ke) !== -1
                  ? (Ze[Ke] || (Ze[Ke] = []), Ze[Ke].push(it))
                  : (Ze[Ke] = it);
              }
            } else {
              var Qe =
                ((We = K),
                (K = Y.indexOf(ve, K) - 1) == -2 && (K = Y.length),
                c2(ql, Y.slice(We, K + 1)));
              q || (Qe = Qe.trim()), Ze ? (Ze.__text = Qe) : nt.push(Qe), K++;
            }
          var We;
          return nt;
        }
        function Fe(rt, Ze, nt) {
          if (rt === "S") return parseInt(nt);
          let vt = c2(ql, nt);
          return (
            ee.forEach((ce) => {
              ce.test(rt, Ze, nt) && (vt = ce.converter(nt));
            }),
            vt
          );
        }
        var qe = `\r
	>/= `;
        function Re() {
          for (var rt = K; qe.indexOf(Y[K]) === -1 && Y[K]; ) K++;
          return Y.slice(rt, K);
        }
        var be = U.noChildNodes || ["img", "br", "input", "meta", "link", "hr"];
        function Se() {
          K++;
          const rt = Re();
          let Ze = [],
            nt = { tagName: rt },
            vt = nt.tagName.indexOf(":");
          for (
            vt !== -1 &&
            ((nt.__prefix = nt.tagName.substr(0, vt)),
            (nt.tagName = nt.tagName.substr(vt + 1)));
            Y.charCodeAt(K) !== _e && Y[K];

          ) {
            var ce = Y.charCodeAt(K);
            if ((ce > 64 && ce < 91) || (ce > 96 && ce < 123)) {
              for (
                var Ve = Re(), je = Y.charCodeAt(K);
                je &&
                je !== we &&
                je !== Me &&
                !((je > 64 && je < 91) || (je > 96 && je < 123)) &&
                je !== _e;

              )
                K++, (je = Y.charCodeAt(K));
              if (je === we || je === Me) {
                var it =
                  ((Qe = Y[K]),
                  (We = K + 1),
                  (K = Y.indexOf(Qe, We)),
                  Y.slice(We, K));
                if (K === -1) return nt;
              } else (it = null), K--;
              (it = Fe(nt.tagName, Ve, it)), (nt[Ve] = it);
            }
            K++;
          }
          var Qe, We;
          if (Y.charCodeAt(K - 1) !== le)
            if (rt == "script") {
              var Ke = K + 1;
              (K = Y.indexOf("</script>", K)),
                (Ze = [Y.slice(Ke, K)]),
                (K += 9);
            } else
              rt == "style"
                ? ((Ke = K + 1),
                  (K = Y.indexOf("</style>", K)),
                  (Ze = [Y.slice(Ke, K)]),
                  (K += 8))
                : be.indexOf(rt) === -1
                ? (K++, (Ze = $e(rt, nt)))
                : K++;
          else K++;
          return (nt.__children = Ze), nt;
        }
        var ke,
          he = null;
        if (U.attrValue !== void 0)
          for (
            U.attrName = U.attrName || "id", he = [];
            (ke = new RegExp(
              "\\s" + U.attrName + `\\s*=['"]` + U.attrValue + `['"]`
            ).exec(Y)),
              (K = ke ? ke.index : -1) !== -1;

          )
            (K = Y.lastIndexOf("<", K)) !== -1 && he.push(Se()),
              (Y = Y.substr(K)),
              (K = 0);
        else he = U.parseNode ? Se() : $e("");
        return (
          U.filter && (he = Bi(he, U.filter)),
          U.simplify
            ? vu(Array.isArray(he) ? he : [he])
            : (U.setPos && (he.pos = K), he)
        );
      }
      function vu(Y) {
        var U = {};
        if (!Y.length) return "";
        if (Y.length === 1 && typeof Y[0] == "string") return Y[0];
        for (var K in (Y.forEach(function (Q) {
          if (typeof Q == "object") {
            U[Q.tagName] || (U[Q.tagName] = []);
            var q = vu(Q.children);
            U[Q.tagName].push(q),
              Object.keys(Q.attributes).length &&
                typeof q != "string" &&
                (q._attributes = Q.attributes);
          }
        }),
        U))
          U[K].length == 1 && (U[K] = U[K][0]);
        return U;
      }
      function Bi(Y, U) {
        let K =
            arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0,
          Q =
            arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "";
        var q = [];
        return (
          Y.forEach(function (ee, fe) {
            if (
              (typeof ee == "object" && U(ee, fe, K, Q) && q.push(ee),
              ee.children)
            ) {
              var ve = Bi(
                ee.children,
                U,
                K + 1,
                (Q ? Q + "." : "") + fe + "." + ee.tagName
              );
              q = q.concat(ve);
            }
          }),
          q
        );
      }
      const s_ = [
        I.default.PERIOD,
        I.default.BASE_URL,
        I.default.ADAPTATION_SET,
        I.default.REPRESENTATION,
        I.default.CONTENT_PROTECTION,
        I.default.ROLE,
        I.default.ACCESSIBILITY,
        I.default.AUDIO_CHANNEL_CONFIGURATION,
        I.default.CONTENT_COMPONENT,
        I.default.ESSENTIAL_PROPERTY,
        I.default.LABEL,
        I.default.S,
        I.default.SEGMENT_URL,
        I.default.EVENT,
        I.default.EVENT_STREAM,
        I.default.LOCATION,
        I.default.SERVICE_DESCRIPTION,
        I.default.SUPPLEMENTAL_PROPERTY,
        I.default.METRICS,
        I.default.REPORTING,
        I.default.PATCH_LOCATION,
        I.default.REPLACE,
        I.default.ADD,
        I.default.REMOVE,
        I.default.UTC_TIMING,
        I.default.INBAND_EVENT_STREAM,
        I.default.PRODUCER_REFERENCE_TIME,
        I.default.CONTENT_STEERING,
      ];
      function l_(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.debug;
        let Q, q, ee, fe;
        function ve(ne) {
          try {
            let Te = o_(ne, {
                parseNode: !0,
                attrMatchers: ee,
                nodesAsArray: s_,
              }),
              _e = {};
            if (Te.tagName.toLowerCase().indexOf("xml") !== -1)
              for (let se in Te) {
                if (Array.isArray(Te[se])) {
                  _e[se] = Te[se][0];
                  break;
                }
                if (typeof Te[se] == "object") {
                  _e[se] = Te[se];
                  break;
                }
              }
            else (_e[Te.tagName] = Te), delete Te.tagName;
            return _e;
          } catch {
            return null;
          }
        }
        return (
          (Q = {
            getIron: function () {
              return fe;
            },
            parseXml: ve,
            parse: function (ne) {
              let Te;
              const _e = window.performance.now();
              if (((Te = ve(ne)), !Te))
                throw new Error("failed to parse the manifest");
              Te.Patch
                ? ((Te = Te.Patch),
                  Te.add && Te.add.forEach((le) => fe.run(le)),
                  Te.replace && Te.replace.forEach((le) => fe.run(le)))
                : ((Te = Te.MPD), fe.run(Te));
              const se = window.performance.now();
              return (
                q.info("Parsing complete: " + (se - _e).toPrecision(3) + "ms"),
                (Te.protocol = "DASH"),
                Te
              );
            },
          }),
          (q = K.getLogger(Q)),
          (ee = [new Yh(), new Yv(), new Vm(), new ia()]),
          (fe = u2(U).create({ adaptationset: new Qh(), period: new Bu() })),
          Q
        );
      }
      l_.__dashjs_factory_name = "DashParser";
      var d2 = H.default.getClassFactory(l_);
      function u_(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.debug,
          Q = Y.settings,
          q = (0, X.default)(U).getInstance(),
          ee = ar(U).getInstance();
        let fe,
          ve,
          ne,
          Te,
          _e,
          se = Y.mssHandler,
          le = Y.errHandler;
        function me(we) {
          q.trigger(G.default.INTERNAL_MANIFEST_LOADED, {
            manifest: we.manifest,
          });
        }
        return (
          (fe = {
            load: function (we) {
              let Me =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : null,
                Oe =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : null;
              const Ge = new Date(),
                $e = new ms(we, F.HTTPRequest.MPD_TYPE);
              Me && ($e.serviceLocation = Me),
                Oe && ($e.queryParams = Oe),
                $e.startDate || ($e.startDate = Ge),
                q.trigger(G.default.MANIFEST_LOADING_STARTED, { request: $e }),
                ne.load({
                  request: $e,
                  success: function (Fe, qe, Re) {
                    if (!Te) return;
                    let be, Se, ke;
                    if (
                      (Re && Re !== we
                        ? ((Se = ee.parseBaseUrl(Re)), (be = Re))
                        : (ee.isRelative(we) &&
                            (we = ee.resolve(we, window.location.href)),
                          (Se = ee.parseBaseUrl(we))),
                      qe != "No Content")
                    )
                      if (
                        (_e === null &&
                          (_e = (function (he) {
                            let rt = null;
                            return he.indexOf("SmoothStreamingMedia") > -1
                              ? (se &&
                                  ((rt = se.createMssParser()),
                                  se.createMssFragmentProcessor(),
                                  se.registerEvents()),
                                rt)
                              : he.indexOf("MPD") > -1 ||
                                he.indexOf("Patch") > -1
                              ? d2(U).create({ debug: K })
                              : rt;
                          })(Fe)),
                        _e !== null)
                      ) {
                        Te.setParser(_e);
                        try {
                          ke = _e.parse(Fe);
                        } catch {
                          return void q.trigger(
                            G.default.INTERNAL_MANIFEST_LOADED,
                            {
                              manifest: null,
                              error: new ot.default(
                                de.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,
                                de.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE +
                                  `${we}`
                              ),
                            }
                          );
                        }
                        if (ke) {
                          if (
                            ((ke.url = be || we),
                            ke.originalUrl || (ke.originalUrl = ke.url),
                            Q &&
                              Q.get().streaming
                                .enableManifestDurationMismatchFix &&
                              ke.mediaPresentationDuration &&
                              ke.Period.length > 1)
                          ) {
                            const he = ke.Period.reduce(
                              (rt, Ze) => rt + Ze.duration,
                              0
                            );
                            !isNaN(he) &&
                              ke.mediaPresentationDuration > he &&
                              (ve.warn(
                                "Media presentation duration greater than duration of all periods. Setting duration to total period duration"
                              ),
                              (ke.mediaPresentationDuration = he));
                          }
                          (ke.baseUri = Se),
                            (ke.loadedTime = new Date()),
                            Te.resolveManifestOnLoad(ke),
                            q.trigger(G.default.ORIGINAL_MANIFEST_LOADED, {
                              originalManifest: Fe,
                            });
                        } else
                          q.trigger(G.default.INTERNAL_MANIFEST_LOADED, {
                            manifest: null,
                            error: new ot.default(
                              de.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,
                              de.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE +
                                `${we}`
                            ),
                          });
                      } else
                        q.trigger(G.default.INTERNAL_MANIFEST_LOADED, {
                          manifest: null,
                          error: new ot.default(
                            de.MANIFEST_LOADER_PARSING_FAILURE_ERROR_CODE,
                            de.MANIFEST_LOADER_PARSING_FAILURE_ERROR_MESSAGE +
                              `${we}`
                          ),
                        });
                    else
                      q.trigger(G.default.INTERNAL_MANIFEST_LOADED, {
                        manifest: null,
                      });
                  },
                  error: function (Fe, qe, Re) {
                    q.trigger(G.default.INTERNAL_MANIFEST_LOADED, {
                      manifest: null,
                      error: new ot.default(
                        de.MANIFEST_LOADER_LOADING_FAILURE_ERROR_CODE,
                        de.MANIFEST_LOADER_LOADING_FAILURE_ERROR_MESSAGE +
                          `${we}, ${Re}`
                      ),
                    });
                  },
                });
            },
            reset: function () {
              q.off(G.default.XLINK_READY, me, fe),
                se && se.reset(),
                Te && (Te.reset(), (Te = null)),
                ne && (ne.abort(), (ne = null));
            },
          }),
          (ve = K.getLogger(fe)),
          q.on(G.default.XLINK_READY, me, fe),
          (ne = Wh(U).create({
            errHandler: Y.errHandler,
            dashMetrics: Y.dashMetrics,
            mediaPlayerModel: Y.mediaPlayerModel,
            urlUtils: ee,
            constants: P.default,
            dashConstants: I.default,
            errors: de,
            requestTimeout: Y.settings.get().streaming.manifestRequestTimeout,
          })),
          (Te = Hm(U).create({
            errHandler: le,
            dashMetrics: Y.dashMetrics,
            mediaPlayerModel: Y.mediaPlayerModel,
            settings: Y.settings,
          })),
          (_e = null),
          fe
        );
      }
      u_.__dashjs_factory_name = "ManifestLoader";
      var c_ = H.default.getClassFactory(u_);
      function d_() {
        let Y;
        const U = this.context,
          K = (0, X.default)(U).getInstance();
        return (
          (Y = {
            error: function (Q) {
              K.trigger(G.default.ERROR, { error: Q });
            },
          }),
          Y
        );
      }
      d_.__dashjs_factory_name = "ErrorHandler";
      var ys = H.default.getSingletonFactory(d_),
        iy = n(559);
      function eu() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K, Q, q, ee, fe, ve, ne;
        function Te(me, we, Me) {
          const Oe = se(me, we, Me);
          return q.isCodecSupportedBasedOnTestedConfigurations(Oe, me);
        }
        function _e(me, we, Me, Oe, Ge) {
          const $e = se(me, we, Me),
            Fe = JSON.stringify($e);
          Oe.has(Fe) || (Oe.add(Fe), Ge.push($e));
        }
        function se(me, we, Me) {
          let Oe = null;
          switch (me) {
            case P.default.VIDEO:
              Oe = (function (Fe, qe) {
                let Re = {
                  codec: qe,
                  width: Fe.width || null,
                  height: Fe.height || null,
                  framerate: Fe.frameRate || null,
                  bitrate: Fe.bandwidth || null,
                  isSupported: !0,
                };
                ee.get().streaming.capabilities
                  .filterVideoColorimetryEssentialProperties &&
                  Object.assign(
                    Re,
                    (function (ke) {
                      let he = {
                        colorGamut: null,
                        transferFunction: null,
                        isSupported: !0,
                      };
                      for (const rt of ke.EssentialProperty || [])
                        rt.schemeIdUri ===
                          P.default.COLOUR_PRIMARIES_SCHEME_ID_URI &&
                        ["1", "5", "6", "7"].includes(rt.value.toString())
                          ? (he.colorGamut =
                              P.default.MEDIA_CAPABILITIES_API.COLORGAMUT.SRGB)
                          : rt.schemeIdUri ===
                              P.default.COLOUR_PRIMARIES_SCHEME_ID_URI &&
                            ["11", "12"].includes(rt.value.toString())
                          ? (he.colorGamut =
                              P.default.MEDIA_CAPABILITIES_API.COLORGAMUT.P3)
                          : rt.schemeIdUri ===
                              P.default.COLOUR_PRIMARIES_SCHEME_ID_URI &&
                            ["9"].includes(rt.value.toString())
                          ? (he.colorGamut =
                              P.default.MEDIA_CAPABILITIES_API.COLORGAMUT.REC2020)
                          : rt.schemeIdUri ===
                              P.default.COLOUR_PRIMARIES_SCHEME_ID_URI &&
                            ["2"].includes(rt.value.toString())
                          ? (he.colorGamut = null)
                          : rt.schemeIdUri ===
                              P.default.COLOUR_PRIMARIES_SCHEME_ID_URI &&
                            (he.isSupported = !1),
                          rt.schemeIdUri ===
                            P.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI &&
                          ["1", "6", "13", "14", "15"].includes(
                            rt.value.toString()
                          )
                            ? (he.transferFunction =
                                P.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.SRGB)
                            : rt.schemeIdUri ===
                                P.default
                                  .TRANSFER_CHARACTERISTICS_SCHEME_ID_URI &&
                              ["16"].includes(rt.value.toString())
                            ? (he.transferFunction =
                                P.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.PQ)
                            : rt.schemeIdUri ===
                                P.default
                                  .TRANSFER_CHARACTERISTICS_SCHEME_ID_URI &&
                              ["18"].includes(rt.value.toString())
                            ? (he.transferFunction =
                                P.default.MEDIA_CAPABILITIES_API.TRANSFERFUNCTION.HLG)
                            : rt.schemeIdUri ===
                                P.default
                                  .TRANSFER_CHARACTERISTICS_SCHEME_ID_URI &&
                              ["2"].includes(rt.value.toString())
                            ? (he.transferFunction = null)
                            : rt.schemeIdUri ===
                                P.default
                                  .TRANSFER_CHARACTERISTICS_SCHEME_ID_URI &&
                              (he.isSupported = !1);
                      return he;
                    })(Fe)
                  );
                let be = Re.isSupported;
                ee.get().streaming.capabilities
                  .filterHDRMetadataFormatEssentialProperties &&
                  Object.assign(
                    Re,
                    (function (ke) {
                      let he = { isSupported: !0, hdrMetadataType: null };
                      for (const rt of ke.EssentialProperty || [])
                        rt.schemeIdUri ===
                          P.default.HDR_METADATA_FORMAT_SCHEME_ID_URI &&
                        rt.value ===
                          P.default.HDR_METADATA_FORMAT_VALUES.ST2094_10
                          ? (he.hdrMetadataType =
                              P.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_10)
                          : rt.schemeIdUri ===
                              P.default.HDR_METADATA_FORMAT_SCHEME_ID_URI &&
                            rt.value ===
                              P.default.HDR_METADATA_FORMAT_VALUES.SL_HDR2
                          ? (he.hdrMetadataType =
                              P.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SLHDR2)
                          : rt.schemeIdUri ===
                              P.default.HDR_METADATA_FORMAT_SCHEME_ID_URI &&
                            rt.value ===
                              P.default.HDR_METADATA_FORMAT_VALUES.ST2094_40
                          ? (he.hdrMetadataType =
                              P.default.MEDIA_CAPABILITIES_API.HDR_METADATATYPE.SMPTE_ST_2094_40)
                          : rt.schemeIdUri ===
                              P.default.HDR_METADATA_FORMAT_SCHEME_ID_URI &&
                            (he.isSupported = !1);
                      return he;
                    })(Fe)
                  );
                let Se = Re.isSupported;
                return (be && Se) || (Re.isSupported = !1), Re;
              })(we, Me);
              break;
            case P.default.AUDIO:
              Oe = (function (Fe, qe) {
                const Re = Fe.audioSamplingRate || null;
                return {
                  codec: qe,
                  bitrate: Fe.bandwidth || null,
                  samplerate: Re,
                  isSupported: !0,
                };
              })(we, Me);
              break;
            default:
              return Oe;
          }
          return (
            ($e = Oe),
            (Ge = we) &&
              Ge[I.default.CONTENT_PROTECTION] &&
              Ge[I.default.CONTENT_PROTECTION].length > 0 &&
              ($e.keySystemsMetadata =
                ve.getSupportedKeySystemMetadataFromContentProtection(
                  Ge[I.default.CONTENT_PROTECTION]
                )),
            $e
          );
          var Ge, $e;
        }
        function le(me) {
          if (!me || me.length === 0) return !0;
          let we = 0;
          for (; we < me.length; ) {
            if (!q.supportsEssentialProperty(me[we]))
              return (
                ne.debug(
                  "[Stream] EssentialProperty not supported: " +
                    me[we].schemeIdUri
                ),
                !1
              );
            we += 1;
          }
          return !0;
        }
        return (
          (K = {
            setConfig: function (me) {
              me &&
                (me.adapter && (Q = me.adapter),
                me.capabilities && (q = me.capabilities),
                me.settings && (ee = me.settings),
                me.protectionController && (ve = me.protectionController),
                me.customParametersModel && (fe = me.customParametersModel));
            },
            filterUnsupportedFeatures: function (me) {
              return new Promise((we) => {
                const Me = [P.default.VIDEO, P.default.AUDIO],
                  Oe = [];
                Me.forEach((Ge) => {
                  (function ($e, Fe) {
                    if (!$e || !$e.Period || $e.Period.length === 0) return [];
                    const qe = new Set(),
                      Re = [];
                    return (
                      $e.Period.forEach((be) => {
                        be.AdaptationSet.forEach((Se) => {
                          Q.getIsTypeOf(Se, Fe) &&
                            Se.Representation.forEach((ke, he) => {
                              const rt = Q.getCodec(Se, he, !1);
                              _e(Fe, ke, rt, qe, Re);
                              const Ze = Q.getSupplementalCodecs(ke);
                              Ze.length > 0 && _e(Fe, ke, Ze[0], qe, Re);
                            });
                        });
                      }),
                      Re
                    );
                  })(me, Ge).forEach(($e) => {
                    Oe.push(q.runCodecSupportCheck($e, Ge));
                  });
                }),
                  Promise.allSettled(Oe)
                    .then(() => {
                      return (
                        Me.forEach(($e) => {
                          var Fe, qe;
                          (Fe = $e),
                            (qe = me) &&
                              qe.Period &&
                              qe.Period.length !== 0 &&
                              qe.Period.forEach((Re) => {
                                var be, Se;
                                (Se = Fe),
                                  (be = Re) &&
                                    be.AdaptationSet &&
                                    be.AdaptationSet.length !== 0 &&
                                    (be.AdaptationSet = be.AdaptationSet.filter(
                                      (ke) => {
                                        var he, rt;
                                        Q.getIsTypeOf(ke, Se) &&
                                          ((rt = Se),
                                          (he = ke).Representation &&
                                            he.Representation.length !== 0 &&
                                            (he.Representation =
                                              he.Representation.filter(
                                                (nt, vt) => {
                                                  const ce = Q.getCodec(
                                                      he,
                                                      vt,
                                                      !1
                                                    ),
                                                    Ve = Te(rt, nt, ce);
                                                  let je = (function (it, Qe) {
                                                    let We = !1;
                                                    const Ke =
                                                      Q.getSupplementalCodecs(
                                                        it
                                                      );
                                                    return (
                                                      Ke.length > 0 &&
                                                        (Ke.length > 1 &&
                                                          ne.warn(
                                                            "[CapabilitiesFilter] Multiple supplemental codecs not supported; using the first in list"
                                                          ),
                                                        (We = Te(
                                                          Qe,
                                                          it,
                                                          Ke[0]
                                                        ))),
                                                      We
                                                    );
                                                  })(nt, rt);
                                                  return (
                                                    je &&
                                                      (ne.debug(
                                                        `[CapabilitiesFilter] Codec supported. Upgrading codecs string of Representation with ID ${nt.id}`
                                                      ),
                                                      (nt.codecs =
                                                        nt[
                                                          I.default.SUPPLEMENTAL_CODECS
                                                        ])),
                                                    Ve ||
                                                      je ||
                                                      ne.warn(
                                                        `[CapabilitiesFilter] Codec ${ce} not supported. Removing Representation with ID ${nt.id}`
                                                      ),
                                                    Ve || je
                                                  );
                                                }
                                              )));
                                        const Ze =
                                          ke.Representation &&
                                          ke.Representation.length > 0;
                                        return (
                                          Ze ||
                                            (U.trigger(
                                              G.default
                                                .ADAPTATION_SET_REMOVED_NO_CAPABILITIES,
                                              { adaptationSet: ke }
                                            ),
                                            ne.warn(
                                              `[CapabilitiesFilter] AdaptationSet with ID ${
                                                ke.id ? ke.id : "undefined"
                                              } and codec ${
                                                ke.codecs
                                                  ? ke.codecs
                                                  : "undefined"
                                              } has been removed because of no supported Representation`
                                            )),
                                          Ze
                                        );
                                      }
                                    ));
                              });
                        }),
                        ee.get().streaming.capabilities
                          .filterUnsupportedEssentialProperties &&
                          (Ge = me) &&
                          Ge.Period &&
                          Ge.Period.length !== 0 &&
                          Ge.Period.forEach(($e) => {
                            $e.AdaptationSet = $e.AdaptationSet.filter(
                              (Fe) =>
                                !Fe.Representation ||
                                Fe.Representation.length === 0 ||
                                (!!le(
                                  Q.getEssentialPropertiesForAdaptationSet(Fe)
                                ) &&
                                  ((Fe.Representation =
                                    Fe.Representation.filter((qe) =>
                                      le(
                                        Q.getEssentialPropertiesForRepresentation(
                                          qe
                                        )
                                      )
                                    )),
                                  Fe.Representation &&
                                    Fe.Representation.length > 0))
                            );
                          }),
                        (function ($e) {
                          if (!$e || !$e.Period || $e.Period.length === 0)
                            return Promise.resolve();
                          const Fe = [];
                          return (
                            $e.Period.forEach((qe) => {
                              var Re;
                              Fe.push(
                                ((Re = qe),
                                new Promise((be) => {
                                  if (
                                    !Re ||
                                    !Re.AdaptationSet ||
                                    Re.AdaptationSet.length === 0
                                  )
                                    return void be();
                                  const Se = [];
                                  Re.AdaptationSet.forEach((ke) => {
                                    var he;
                                    Se.push(
                                      ((he = ke),
                                      new Promise((rt) => {
                                        if (
                                          !he.Representation ||
                                          he.Representation.length === 0
                                        )
                                          return void rt();
                                        const Ze = [];
                                        he.Representation.forEach((nt) => {
                                          Ze.push(
                                            (function (vt) {
                                              const ce = [],
                                                Ve =
                                                  fe.getCustomCapabilitiesFilters();
                                              return (
                                                Ve && Ve.length !== 0
                                                  ? Ve.forEach((je) => {
                                                      ce.push(
                                                        new Promise((it) =>
                                                          it(je(vt))
                                                        )
                                                      );
                                                    })
                                                  : ce.push(
                                                      Promise.resolve(!0)
                                                    ),
                                                Promise.all(ce)
                                              );
                                            })(nt)
                                          );
                                        }),
                                          Promise.all(Ze)
                                            .then((nt) => {
                                              (he.Representation =
                                                he.Representation.filter(
                                                  (vt, ce) => {
                                                    let Ve = nt[ce].every(
                                                      (je) => je
                                                    );
                                                    return (
                                                      Ve ||
                                                        ne.debug(
                                                          "[Stream] Representation " +
                                                            vt.id +
                                                            " has been removed because of unsupported CustomFilter"
                                                        ),
                                                      Ve
                                                    );
                                                  }
                                                )),
                                                rt();
                                            })
                                            .catch((nt) => {
                                              ne.warn(
                                                "[Stream] at least one promise rejected in CustomFilter with error: ",
                                                nt
                                              ),
                                                rt();
                                            });
                                      }))
                                    );
                                  }),
                                    Promise.all(Se)
                                      .then(() => {
                                        (Re.AdaptationSet =
                                          Re.AdaptationSet.filter(
                                            (ke) =>
                                              ke.Representation &&
                                              ke.Representation.length > 0
                                          )),
                                          be();
                                      })
                                      .catch(() => {
                                        be();
                                      });
                                }))
                              );
                            }),
                            Promise.all(Fe)
                          );
                        })(me)
                      );
                      var Ge;
                    })
                    .then(() => {
                      we();
                    })
                    .catch((Ge) => {
                      ne.error(Ge), we();
                    });
              });
            },
          }),
          (ne = (0, E.default)(Y).getInstance().getLogger(K)),
          K
        );
      }
      eu.__dashjs_factory_name = "CapabilitiesFilter";
      var Bc = H.default.getSingletonFactory(eu);
      function lp() {
        let Y, U;
        return (
          (Y = {
            initialize: function (K) {
              if (
                ((U = new (class {
                  constructor() {
                    (this.t = null),
                      (this.xywh = null),
                      (this.track = null),
                      (this.id = null),
                      (this.s = null),
                      (this.r = null);
                  }
                })()),
                !K)
              )
                return null;
              const Q = K.indexOf("#");
              if (Q !== -1) {
                const q = K.substr(Q + 1).split("&");
                for (let ee = 0, fe = q.length; ee < fe; ++ee) {
                  const ve = q[ee],
                    ne = ve.indexOf("=");
                  if (ne !== -1) {
                    const Te = ve.substring(0, ne);
                    U.hasOwnProperty(Te) && (U[Te] = ve.substr(ne + 1));
                  }
                }
              }
            },
            getURIFragmentData: function () {
              return U;
            },
          }),
          Y
        );
      }
      lp.__dashjs_factory_name = "URIFragmentModel";
      var zm = H.default.getSingletonFactory(lp);
      function Jh() {
        let Y,
          U,
          K = this.context,
          Q = (0, X.default)(K).getInstance();
        return (
          (Y = {
            getValue: function () {
              return U;
            },
            setValue: function (q) {
              (U = q), q && Q.trigger(G.default.MANIFEST_LOADED, { data: q });
            },
          }),
          Y
        );
      }
      Jh.__dashjs_factory_name = "ManifestModel";
      var h_ = H.default.getSingletonFactory(Jh);
      function Qv() {
        let Y, U, K, Q;
        const q = this.context,
          ee = (0, ue.default)(q).getInstance();
        function fe(se, le) {
          return isNaN(se)
            ? 0
            : se > 0
            ? (le &&
                U.warn(
                  "Supplied minimum playback rate is a positive value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."
                ),
              0)
            : se < -0.5
            ? (le &&
                U.warn(
                  "Supplied minimum playback rate is out of range and will be limited to -0.5: -50% playback speed."
                ),
              -0.5)
            : se;
        }
        function ve(se, le) {
          return isNaN(se)
            ? 0
            : se < 0
            ? (le &&
                U.warn(
                  "Supplied maximum playback rate is a negative value when it should be negative or 0. The supplied rate will not be applied and set to 0: 100% playback speed."
                ),
              0)
            : se > 1
            ? (le &&
                U.warn(
                  "Supplied maximum playback rate is out of range and will be limited to 1: 200% playback speed."
                ),
              1)
            : se;
        }
        function ne() {
          const se = Te(),
            le = K.getLiveDelay();
          return !isNaN(le) && le > 0 ? Math.min(se, le) : se;
        }
        function Te() {
          return ee.get().streaming.buffer.bufferTimeDefault > 0
            ? ee.get().streaming.buffer.bufferTimeDefault
            : _e()
            ? 20
            : 12;
        }
        function _e() {
          return ee.get().streaming.buffer.fastSwitchEnabled !== null
            ? ee.get().streaming.buffer.fastSwitchEnabled
            : !K.getLowLatencyModeEnabled();
        }
        return (
          (Y = {
            getCatchupMaxDrift: function () {
              if (
                !isNaN(ee.get().streaming.liveCatchup.maxDrift) &&
                ee.get().streaming.liveCatchup.maxDrift >= 0
              )
                return ee.get().streaming.liveCatchup.maxDrift;
              const se = Q.getServiceDescriptionSettings();
              return se &&
                se.liveCatchup &&
                !isNaN(se.liveCatchup.maxDrift) &&
                se.liveCatchup.maxDrift >= 0
                ? se.liveCatchup.maxDrift
                : 12;
            },
            getCatchupModeEnabled: function () {
              return ee.get().streaming.liveCatchup.enabled !== null
                ? ee.get().streaming.liveCatchup.enabled
                : K.getInitialCatchupModeActivated();
            },
            getBufferTimeDefault: ne,
            getBufferTimeDefaultUnadjusted: Te,
            getFastSwitchEnabled: _e,
            getInitialBufferLevel: function () {
              const se = ee.get().streaming.buffer.initialBufferLevel;
              return isNaN(se) || se < 0 ? 0 : Math.min(ne(), se);
            },
            getRetryAttemptsForType: function (se) {
              const le = isNaN(
                ee.get().streaming.retryAttempts.lowLatencyMultiplyFactor
              )
                ? 5
                : ee.get().streaming.retryAttempts.lowLatencyMultiplyFactor;
              return K.getLowLatencyModeEnabled()
                ? ee.get().streaming.retryAttempts[se] * le
                : ee.get().streaming.retryAttempts[se];
            },
            getRetryIntervalsForType: function (se) {
              const le = isNaN(
                ee.get().streaming.retryIntervals.lowLatencyReductionFactor
              )
                ? 10
                : ee.get().streaming.retryIntervals.lowLatencyReductionFactor;
              return K.getLowLatencyModeEnabled()
                ? ee.get().streaming.retryIntervals[se] / le
                : ee.get().streaming.retryIntervals[se];
            },
            getCatchupPlaybackRates: function (se) {
              const le = ee.get().streaming.liveCatchup.playbackRate;
              if (!isNaN(le.min) || !isNaN(le.max))
                return { min: fe(le.min, se), max: ve(le.max, se) };
              const me = Q.getServiceDescriptionSettings();
              if (
                me &&
                me.liveCatchup &&
                (!isNaN(me.liveCatchup.playbackRate.min) ||
                  !isNaN(me.liveCatchup.playbackRate.max))
              ) {
                const we = me.liveCatchup.playbackRate;
                return { min: fe(we.min, se), max: ve(we.max, se) };
              }
              return { min: -0.5, max: 0.5 };
            },
            getAbrBitrateParameter: function (se, le) {
              try {
                const me = ee.get().streaming.abr[se][le];
                if (!isNaN(me) && me !== -1) return me;
                const we = Q.getServiceDescriptionSettings();
                return we && we[se] && !isNaN(we[se][le]) ? we[se][le] : -1;
              } catch {
                return -1;
              }
            },
            setConfig: function (se) {
              se.playbackController && (K = se.playbackController),
                se.serviceDescriptionController &&
                  (Q = se.serviceDescriptionController);
            },
            reset: function () {},
          }),
          (U = (0, E.default)(q).getInstance().getLogger(Y)),
          Y
        );
      }
      Qv.__dashjs_factory_name = "MediaPlayerModel";
      var nA = H.default.getSingletonFactory(Qv);
      const vg = { DEFAULT: 0.5, STRONG: 1, WEAK: 0 };
      function tu(Y, U, K, Q) {
        let q, ee, fe, ve, ne;
        return (
          (ee = Y === void 0 ? null : Y),
          (fe = (function (Te) {
            let _e = vg.DEFAULT;
            return (
              (Te !== vg.DEFAULT && Te !== vg.STRONG && Te !== vg.WEAK) ||
                (_e = Te),
              _e
            );
          })(K)),
          (ve = U === void 0 ? null : U),
          (ne = Q === void 0 ? null : Q),
          (q = { representation: ee, reason: ve, rule: ne, priority: fe }),
          q
        );
      }
      tu.__dashjs_factory_name = "SwitchRequest";
      const ws = H.default.getClassFactory(tu);
      (ws.NO_CHANGE = null),
        (ws.PRIORITY = vg),
        H.default.updateClassFactory(tu.__dashjs_factory_name, ws);
      var eo = ws;
      function jm(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.dashMetrics;
        let Q, q;
        return (
          (Q = {
            getSwitchRequest: function (ee) {
              try {
                const fe = eo(U).create();
                fe.rule = this.getClassName();
                const ve = ee.getMediaInfo(),
                  ne = ee.getMediaType(),
                  Te = K.getCurrentBufferState(ne),
                  _e = ee.getScheduleController(),
                  se = ee.getAbrController(),
                  le = ee.getStreamInfo(),
                  me = le ? le.id : null,
                  we = le && le.manifestInfo ? le.manifestInfo.isDynamic : null,
                  Me = ee.getThroughputController(),
                  Oe = Me.getSafeAverageThroughput(ne),
                  Ge = Me.getAverageLatency(ne);
                return (
                  isNaN(Oe) ||
                    !Te ||
                    (se.getAbandonmentStateFor(me, ne) === O.ALLOW_LOAD &&
                      (Te.state === O.BUFFER_LOADED || we) &&
                      ((fe.representation =
                        se.getOptimalRepresentationForBitrate(ve, Oe, !0)),
                      (fe.reason = {
                        throughput: Oe,
                        latency: Ge,
                        message: `[ThroughputRule]: Switching to Representation with bitrate ${
                          fe.representation
                            ? fe.representation.bitrateInKbit
                            : "n/a"
                        } kbit/s. Throughput: ${Oe}`,
                      }),
                      _e.setTimeToLoadDelay(0))),
                  fe
                );
              } catch (fe) {
                return q.error(fe), eo(U).create();
              }
            },
            reset: function () {},
          }),
          (q = (0, E.default)(U).getInstance().getLogger(Q)),
          Q
        );
      }
      jm.__dashjs_factory_name = "ThroughputRule";
      var f_ = H.default.getClassFactory(jm);
      function p_(Y) {
        Y = Y || {};
        const U = this.context,
          K = (0, X.default)(U).getInstance(),
          Q = Y.dashMetrics,
          q = (0, ue.default)(U).getInstance();
        let ee, fe, ve;
        function ne() {
          const se =
            q.get().streaming.abr.rules.insufficientBufferRule.parameters
              .segmentIgnoreCount;
          (ve = {}),
            (ve[P.default.VIDEO] = { ignoreCount: se }),
            (ve[P.default.AUDIO] = { ignoreCount: se });
        }
        function Te() {
          ne();
        }
        function _e(se) {
          isNaN(se.startTime) ||
            (se.mediaType !== P.default.AUDIO &&
              se.mediaType !== P.default.VIDEO) ||
            (ve[se.mediaType].ignoreCount > 0 &&
              ve[se.mediaType].ignoreCount--);
        }
        return (
          (ee = {
            getSwitchRequest: function (se) {
              const le = eo(U).create();
              if (
                ((le.rule = this.getClassName()),
                !se || !se.hasOwnProperty("getMediaType"))
              )
                return le;
              const me = se.getMediaType(),
                we = Q.getCurrentBufferState(me),
                Me = se.getRepresentation().fragmentDuration;
              if (
                ((Oe = se.getScheduleController().getPlaybackController()),
                (Ge = me),
                ($e = Me),
                !(
                  !Oe.getLowLatencyModeEnabled() &&
                  ve[Ge].ignoreCount <= 0 &&
                  $e
                ))
              )
                return le;
              var Oe, Ge, $e;
              const Fe = se.getMediaInfo(),
                qe = se.getAbrController();
              if (we && we.state === O.BUFFER_EMPTY)
                fe.debug("[" + me + "] Switch to index 0; buffer is empty."),
                  (le.representation = qe.getOptimalRepresentationForBitrate(
                    Fe,
                    0,
                    !0
                  )),
                  (le.reason = {
                    message:
                      "[InsufficientBufferRule]: Switching to lowest Representation because buffer is empty",
                  });
              else {
                const Re = se.getThroughputController(),
                  be = Q.getCurrentBufferLevel(me),
                  Se =
                    (Re.getAverageThroughput(me, null, NaN) *
                      q.get().streaming.abr.rules.insufficientBufferRule
                        .parameters.throughputSafetyFactor *
                      be) /
                    Me;
                if (isNaN(Se) || Se <= 0) return le;
                (le.representation = qe.getOptimalRepresentationForBitrate(
                  Fe,
                  Se,
                  !0
                )),
                  (le.reason = {
                    message:
                      "[InsufficientBufferRule]: Limiting maximum bitrate to avoid a buffer underrun.",
                    bitrate: Se,
                  });
              }
              return le;
            },
            reset: function () {
              ne(),
                K.off(S.default.PLAYBACK_SEEKING, Te, ee),
                K.off(G.default.BYTES_APPENDED_END_FRAGMENT, _e, ee);
            },
          }),
          (fe = (0, E.default)(U).getInstance().getLogger(ee)),
          ne(),
          K.on(S.default.PLAYBACK_SEEKING, Te, ee),
          K.on(G.default.BYTES_APPENDED_END_FRAGMENT, _e, ee),
          ee
        );
      }
      p_.__dashjs_factory_name = "InsufficientBufferRule";
      var g_ = H.default.getClassFactory(p_);
      function m_(Y) {
        const U = (Y = Y || {}).mediaPlayerModel,
          K = Y.dashMetrics,
          Q = this.context,
          q = (0, ue.default)(Q).getInstance();
        let ee, fe, ve;
        function ne() {
          ve = {};
        }
        return (
          (ee = {
            shouldAbandon: function (Te) {
              const _e = eo(Q).create();
              _e.rule = this.getClassName();
              try {
                if (!Te) return _e;
                const se = Te.getCurrentRequest();
                if (!isNaN(se.index)) {
                  if (se.firstByteDate === null || ve.hasOwnProperty(se.index))
                    return _e;
                  const le = U.getBufferTimeDefault(),
                    me = Te.getMediaType();
                  if (K.getCurrentBufferLevel(me) > le) return _e;
                  const we = Date.now() - se.firstByteDate.getTime();
                  if (
                    se.traces.length >=
                      q.get().streaming.abr.rules.abandonRequestsRule.parameters
                        .minThroughputSamplesThreshold &&
                    we >
                      q.get().streaming.abr.rules.abandonRequestsRule.parameters
                        .minSegmentDownloadTimeThresholdInMs &&
                    se.bytesLoaded < se.bytesTotal
                  )
                    return (function (Me, Oe, Ge) {
                      const $e = Me.getMediaInfo(),
                        Fe = Me.getMediaType(),
                        qe =
                          Oe.traces.reduce((rt, Ze) => rt + Ze.b[0], 0) -
                          Oe.traces[0].b[0],
                        Re = Math.max(
                          Oe.traces.reduce((rt, Ze) => rt + Ze.d, 0) -
                            Oe.traces[0].d,
                          1
                        ),
                        be = Math.round((8 * qe) / Re),
                        Se = Number((8 * Oe.bytesTotal) / be / 1e3).toFixed(2),
                        ke = Me.getRepresentation(),
                        he = Me.getAbrController();
                      if (
                        Se <
                          Oe.duration *
                            q.get().streaming.abr.rules.abandonRequestsRule
                              .parameters.abandonDurationMultiplier ||
                        he.isPlayingAtLowestQuality(ke)
                      )
                        return Ge;
                      if (!ve.hasOwnProperty(Oe.index)) {
                        const rt = Me.getAbrController(),
                          Ze = Oe.bytesTotal - Oe.bytesLoaded,
                          nt = rt.getOptimalRepresentationForBitrate(
                            $e,
                            be,
                            !0
                          ),
                          vt = Oe.representation;
                        Ze >
                          (Oe.bytesTotal * nt.bitrateInKbit) /
                            vt.bitrateInKbit &&
                          ((Ge.representation = nt),
                          (Ge.reason = {
                            throughputInKbit: be,
                            message: `[AbandonRequestRule][${Fe} is asking to abandon and switch to quality to ${nt.absoluteIndex}. The measured bandwidth was ${be} kbit/s`,
                          }),
                          (ve[Oe.index] = !0));
                      }
                      return Ge;
                    })(Te, se, _e);
                }
                return _e;
              } catch (se) {
                return fe.error(se), _e;
              }
            },
            reset: ne,
          }),
          (fe = (0, E.default)(Q).getInstance().getLogger(ee)),
          ne(),
          ee
        );
      }
      m_.__dashjs_factory_name = "AbandonRequestsRule";
      var y_ = H.default.getClassFactory(m_);
      function v_() {
        const Y = this.context,
          U = (0, ue.default)(Y).getInstance();
        let K;
        return (
          (K = {
            getSwitchRequest: function (Q) {
              const q = eo(Y).create();
              if (
                ((q.rule = this.getClassName()),
                !Q || !Q.hasOwnProperty("getDroppedFramesHistory"))
              )
                return q;
              const ee = Q.getDroppedFramesHistory();
              if (!ee) return q;
              const fe = Q.getStreamInfo().id,
                ve = Q.getMediaInfo(),
                ne = Q.getAbrController(),
                Te = ee.getFrameHistory(fe);
              if (!Te || Object.keys(Te).length === 0) return q;
              let _e = 0,
                se = 0;
              const le = ne.getPossibleVoRepresentationsFilteredBySettings(
                ve,
                !0
              );
              let me = null;
              for (let we = 1; we < le.length; we++) {
                const Me = le[we];
                if (
                  Me &&
                  Te[Me.id] &&
                  ((_e = Te[Me.id].droppedVideoFrames),
                  (se = Te[Me.id].totalVideoFrames),
                  se >
                    U.get().streaming.abr.rules.droppedFramesRule.parameters
                      .minimumSampleSize &&
                    _e / se >
                      U.get().streaming.abr.rules.droppedFramesRule.parameters
                        .droppedFramesPercentageThreshold)
                ) {
                  me = le[we - 1];
                  break;
                }
              }
              return (
                me &&
                  ((q.representation = me),
                  (q.reason = {
                    droppedFrames: _e,
                    message: `[DroppedFramesRule]: Switching to index ${me.absoluteIndex}. Dropped Frames: ${_e}, Total Frames: ${se}`,
                  })),
                q
              );
            },
          }),
          K
        );
      }
      v_.__dashjs_factory_name = "DroppedFramesRule";
      var h2 = H.default.getClassFactory(v_);
      function b_() {
        const Y = this.context,
          U = (0, ue.default)(Y).getInstance();
        let K;
        return (
          (K = {
            getSwitchRequest: function (Q) {
              const q = eo(Y).create();
              if (((q.rule = this.getClassName()), !Q)) return q;
              const ee = Q.getStreamInfo().id,
                fe = Q.getMediaType(),
                ve = Q ? Q.getSwitchRequestHistory() : null,
                ne = ve ? ve.getSwitchRequests(ee, fe) : {},
                Te = Q.getAbrController(),
                _e = Q.getMediaInfo(),
                se = Te.getPossibleVoRepresentationsFilteredBySettings(_e, !0);
              let le = 0,
                me = 0;
              for (let we = 0; we < se.length; we++) {
                const Me = se[we];
                if (
                  Me &&
                  ne[Me.id] &&
                  ((le += ne[Me.id].drops),
                  (me += ne[Me.id].noDrops),
                  le + me >=
                    U.get().streaming.abr.rules.switchHistoryRule.parameters
                      .sampleSize &&
                    le / me >
                      U.get().streaming.abr.rules.switchHistoryRule.parameters
                        .switchPercentageThreshold)
                ) {
                  (q.representation =
                    we > 0 && ne[Me.id].drops > 0 ? se[we - 1] : Me),
                    (q.reason = {
                      drops: le,
                      noDrops: me,
                      message: `[SwitchHistoryRule]: Switch to index: ${
                        q.representation.absoluteIndex
                      } samples: ${le + me} drops:  ${le}`,
                    });
                  break;
                }
              }
              return q;
            },
          }),
          K
        );
      }
      b_.__dashjs_factory_name = "SwitchHistoryRule";
      var __ = H.default.getClassFactory(b_);
      const Nd = "BOLA_STATE_ONE_BITRATE",
        up = "BOLA_STATE_STARTUP",
        Ao = "BOLA_STATE_STEADY",
        A = 10;
      function C(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.dashMetrics,
          Q = Y.mediaPlayerModel,
          q = (0, X.default)(U).getInstance(),
          ee = EP(U).getInstance();
        let fe, ve, ne;
        function Te(Se) {
          const ke = Se.mediaType,
            he = Se.streamId,
            rt = ke === P.default.AUDIO ? [P.default.AUDIO] : ne[he];
          for (const Ze in rt)
            ne[he] &&
              ne[he].hasOwnProperty(Ze) &&
              ne[he][Ze].state === Ao &&
              (ne[he][Ze].placeholderBuffer = 0);
        }
        function _e(Se) {
          const ke = Se.streamId;
          for (const he in ne[ke])
            if (ne[ke].hasOwnProperty(he)) {
              const rt = ne[ke][he];
              rt.state !== Nd && ((rt.state = up), se(rt));
            }
        }
        function se(Se) {
          (Se.placeholderBuffer = 0),
            (Se.mostAdvancedSegmentStart = NaN),
            (Se.lastSegmentWasReplacement = !1),
            (Se.lastSegmentStart = NaN),
            (Se.lastSegmentDurationS = NaN),
            (Se.lastSegmentRequestTimeMs = NaN),
            (Se.lastSegmentFinishTimeMs = NaN);
        }
        function le(Se) {
          try {
            if (
              Se &&
              Se.metric === O.HTTP_REQUEST &&
              Se.value &&
              Se.value.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE &&
              Se.value.trace &&
              Se.value.trace.length
            ) {
              const ke =
                ne[Se.value._streamId] && ne[Se.value._streamId][Se.mediaType]
                  ? ne[Se.value._streamId][Se.mediaType]
                  : null;
              ke &&
                ke.state !== Nd &&
                ((ke.lastSegmentRequestTimeMs = Se.value.trequest.getTime()),
                (ke.lastSegmentFinishTimeMs = Se.value._tfinish.getTime()),
                me(ke, Se.mediaType));
            }
          } catch (ke) {
            ve.error(ke);
          }
        }
        function me(Se, ke) {
          if (
            !isNaN(Se.lastSegmentStart) &&
            !isNaN(Se.lastSegmentRequestTimeMs) &&
            !isNaN(Se.placeholderBuffer)
          ) {
            if (
              ((Se.placeholderBuffer *= 0.99),
              !isNaN(Se.lastSegmentFinishTimeMs))
            ) {
              const he =
                  K.getCurrentBufferLevel(ke) +
                  0.001 *
                    (Se.lastSegmentFinishTimeMs - Se.lastSegmentRequestTimeMs),
                rt = Ge(Se, Se.currentRepresentation),
                Ze = Math.max(0, rt - he);
              Se.placeholderBuffer = Math.min(Ze, Se.placeholderBuffer);
            }
            Se.lastSegmentWasReplacement &&
              !isNaN(Se.lastSegmentDurationS) &&
              (Se.placeholderBuffer += Se.lastSegmentDurationS),
              (Se.lastSegmentStart = NaN),
              (Se.lastSegmentRequestTimeMs = NaN);
          }
        }
        function we(Se) {
          if (Se && ne[Se.streamId] && ne[Se.streamId][Se.mediaType]) {
            const ke = ne[Se.streamId][Se.mediaType];
            ke &&
              ke.state !== Nd &&
              (ke.currentRepresentation = Se.newRepresentation);
          }
        }
        function Me(Se, ke, he) {
          const rt = he.reduce((vt, ce, Ve) => (ce > he[vt] ? Ve : vt), 0);
          if (rt === 0) return null;
          const Ze = Math.max(Se, A + 2 * ke.length),
            nt = (he[rt] - 1) / (Ze / A - 1);
          return { gp: nt, Vp: A / nt };
        }
        function Oe(Se, ke) {
          const he = Q.getBufferTimeDefault();
          if (Se.bufferTimeDefault !== he) {
            const rt = Me(he, Se.representations, Se.utilities);
            if (rt.Vp !== Se.Vp || rt.gp !== Se.gp) {
              const Ze = K.getCurrentBufferLevel(ke);
              let nt = Ze + Se.placeholderBuffer;
              (nt -= A),
                (nt *= rt.Vp / Se.Vp),
                (nt += A),
                (Se.bufferTimeDefault = he),
                (Se.Vp = rt.Vp),
                (Se.gp = rt.gp),
                (Se.placeholderBuffer = Math.max(0, nt - Ze));
            }
          }
        }
        function Ge(Se, ke) {
          return Se.Vp * (Se.utilities[ke.absoluteIndex] + Se.gp);
        }
        function $e(Se) {
          if (
            Se &&
            Se.chunk &&
            Se.chunk.representation.mediaInfo &&
            ne[Se.streamId]
          ) {
            const ke = ne[Se.streamId][Se.chunk.representation.mediaInfo.type];
            if (ke && ke.state !== Nd) {
              const he = Se.chunk.start;
              isNaN(ke.mostAdvancedSegmentStart) ||
              he > ke.mostAdvancedSegmentStart
                ? ((ke.mostAdvancedSegmentStart = he),
                  (ke.lastSegmentWasReplacement = !1))
                : (ke.lastSegmentWasReplacement = !0),
                (ke.lastSegmentStart = he),
                (ke.lastSegmentDurationS = Se.chunk.duration),
                (ke.currentRepresentation = Se.chunk.representation),
                me(ke, Se.chunk.representation.mediaInfo.type);
            }
          }
        }
        function Fe() {
          be();
        }
        function qe(Se, ke) {
          const he = ke.absoluteIndex,
            rt = ke.bandwidth,
            Ze = Se.utilities[he];
          let nt = 0;
          for (let vt = he - 1; vt >= 0; --vt)
            if (Se.utilities[vt] < Se.utilities[he]) {
              const ce = Se.representations[vt].bandwidth,
                Ve = Se.utilities[vt],
                je = Se.Vp * (Se.gp + (rt * Ve - ce * Ze) / (rt - ce));
              nt = Math.max(nt, je);
            }
          return nt;
        }
        function Re(Se) {
          if (Se && ne[Se.streamId]) {
            const ke = ne[Se.streamId][Se.mediaType];
            if (ke && ke.state !== Nd) {
              const he = K.getCurrentBufferLevel(Se.mediaType);
              let rt;
              rt =
                ke.currentRepresentation.absoluteIndex > 0
                  ? qe(ke, ke.currentRepresentation)
                  : A;
              const Ze = Math.max(0, rt - he);
              ke.placeholderBuffer = Math.min(ke.placeholderBuffer, Ze);
            }
          }
        }
        function be() {
          ne = {};
        }
        return (
          (fe = {
            getSwitchRequest: function (Se) {
              try {
                const ke = eo(U).create();
                Se.getScheduleController().setTimeToLoadDelay(0),
                  (ke.rule = this.getClassName()),
                  (ke.reason = ke.reason || {});
                const he = (function (rt) {
                  const Ze = rt.getMediaType(),
                    nt = rt.getStreamInfo().id;
                  ne[nt] || ((ne = {}), (ne[nt] = {}));
                  let vt = ne[nt][Ze];
                  return (
                    vt
                      ? vt.state !== Nd && Oe(vt, Ze)
                      : ((vt = (function (ce) {
                          const Ve = {},
                            je = ce.getMediaInfo(),
                            it =
                              ee.getPossibleVoRepresentationsFilteredBySettings(
                                je,
                                !0
                              );
                          let Qe = it
                            .map((Ie) => Ie.bandwidth)
                            .map((Ie) => Math.log(Ie));
                          Qe = Qe.map((Ie) => Ie - Qe[0] + 1);
                          const We = Q.getBufferTimeDefault(),
                            Ke = Me(We, it, Qe);
                          return (
                            Ke
                              ? ((Ve.state = up),
                                (Ve.representations = it),
                                (Ve.utilities = Qe),
                                (Ve.bufferTimeDefault = We),
                                (Ve.Vp = Ke.Vp),
                                (Ve.gp = Ke.gp),
                                (Ve.currentRepresentation = null),
                                se(Ve))
                              : (Ve.state = Nd),
                            Ve
                          );
                        })(rt)),
                        (ne[nt][Ze] = vt)),
                    vt
                  );
                })(Se);
                switch (((ke.reason.state = he.state), he.state)) {
                  case Nd:
                    break;
                  case up:
                    (function (rt, Ze, nt) {
                      const vt = Ze.getMediaType(),
                        ce =
                          Ze.getThroughputController().getSafeAverageThroughput(
                            vt
                          );
                      if (isNaN(ce)) return;
                      const Ve = Ze.getMediaInfo(),
                        je = ee.getOptimalRepresentationForBitrate(Ve, ce, !0),
                        it = K.getCurrentBufferLevel(vt);
                      (rt.representation = je),
                        (rt.reason.throughput = ce),
                        (nt.placeholderBuffer = Math.max(0, qe(nt, je) - it)),
                        (nt.currentRepresentation = je),
                        !isNaN(nt.lastSegmentDurationS) &&
                          it >= nt.lastSegmentDurationS &&
                          (nt.state = Ao);
                    })(ke, Se, he);
                    break;
                  case Ao:
                    (function (rt, Ze, nt) {
                      const vt = Ze.getMediaType(),
                        ce = Ze.getThroughputController(),
                        Ve = Ze.getMediaInfo(),
                        je = ce.getSafeAverageThroughput(vt),
                        it = Ze.getScheduleController();
                      (function (Ue, at) {
                        const ft = Date.now();
                        if (isNaN(Ue.lastSegmentFinishTimeMs)) {
                          if (!isNaN(Ue.lastCallTimeMs)) {
                            const Rt = 0.001 * (ft - Ue.lastCallTimeMs);
                            Ue.placeholderBuffer += Math.max(0, Rt);
                          }
                        } else {
                          const Rt = 0.001 * (ft - Ue.lastSegmentFinishTimeMs);
                          Ue.placeholderBuffer += Math.max(0, Rt);
                        }
                        (Ue.lastCallTimeMs = ft),
                          (Ue.lastSegmentStart = NaN),
                          (Ue.lastSegmentRequestTimeMs = NaN),
                          (Ue.lastSegmentFinishTimeMs = NaN),
                          Oe(Ue, at);
                      })(nt, vt);
                      const Qe = K.getCurrentBufferLevel(vt);
                      let We = (function (Ue, at) {
                        const ft = Ue.representations.length;
                        let Rt = NaN,
                          an = NaN;
                        for (let tn = 0; tn < ft; ++tn) {
                          let fn =
                            (Ue.Vp * (Ue.utilities[tn] - 1 + Ue.gp) - at) /
                            Ue.representations[tn].bandwidth;
                          (isNaN(an) || fn >= an) && ((an = fn), (Rt = tn));
                        }
                        return Ue.representations[Rt];
                      })(nt, Qe + nt.placeholderBuffer);
                      const Ke = ee.getOptimalRepresentationForBitrate(
                        Ve,
                        je,
                        !0
                      );
                      We.absoluteIndex >
                        nt.currentRepresentation.absoluteIndex &&
                        We.absoluteIndex > Ke.absoluteIndex &&
                        (We =
                          Ke.absoluteIndex >
                          nt.currentRepresentation.absoluteIndex
                            ? Ke
                            : nt.currentRepresentation);
                      let Ie = Math.max(
                        0,
                        Qe + nt.placeholderBuffer - Ge(nt, We)
                      );
                      Ie <= nt.placeholderBuffer
                        ? ((nt.placeholderBuffer -= Ie), (Ie = 0))
                        : ((Ie -= nt.placeholderBuffer),
                          (nt.placeholderBuffer = 0),
                          ee.isPlayingAtTopQuality(We)
                            ? (Ie = 0)
                            : it.setTimeToLoadDelay(1e3 * Ie)),
                        (rt.representation = We),
                        (rt.reason.throughput = je),
                        (rt.reason.bufferLevel = Qe),
                        (rt.reason.placeholderBuffer = nt.placeholderBuffer),
                        (rt.reason.delay = Ie),
                        (nt.currentRepresentation = We);
                    })(ke, Se, he);
                    break;
                  default:
                    (function (rt, Ze, nt) {
                      ve.debug("BOLA ABR rule invoked in bad state.");
                      const vt = Ze.getMediaInfo(),
                        ce = Ze.getMediaType(),
                        Ve =
                          Ze.getThroughputController().getSafeAverageThroughput(
                            ce
                          );
                      (rt.representation =
                        ee.getOptimalRepresentationForBitrate(vt, Ve, !0)),
                        (rt.reason.state = nt.state),
                        (rt.reason.throughput = Ve),
                        (nt.state = up),
                        se(nt);
                    })(ke, Se, he);
                }
                return ke;
              } catch (ke) {
                return ve.error(ke), eo(U).create();
              }
            },
            handleNewMediaInfo: function (Se) {
              Se &&
                Se.streamInfo &&
                Se.type &&
                ne[Se.streamInfo.id] &&
                ne[Se.streamInfo.id][Se.type] &&
                delete ne[Se.streamInfo.id][Se.type];
            },
            reset: function () {
              be(),
                q.off(S.default.BUFFER_EMPTY, Te, fe),
                q.off(S.default.PLAYBACK_SEEKING, _e, fe),
                q.off(S.default.METRIC_ADDED, le, fe),
                q.off(S.default.QUALITY_CHANGE_REQUESTED, we, fe),
                q.off(S.default.FRAGMENT_LOADING_ABANDONED, Re, fe),
                q.off(G.default.MEDIA_FRAGMENT_LOADED, $e, fe),
                q.off(G.default.SETTING_UPDATED_MAX_BITRATE, Fe, fe),
                q.off(G.default.SETTING_UPDATED_MIN_BITRATE, Fe, fe);
            },
          }),
          (ve = (0, E.default)(U).getInstance().getLogger(fe)),
          be(),
          q.on(S.default.BUFFER_EMPTY, Te, fe),
          q.on(S.default.PLAYBACK_SEEKING, _e, fe),
          q.on(S.default.METRIC_ADDED, le, fe),
          q.on(S.default.QUALITY_CHANGE_REQUESTED, we, fe),
          q.on(S.default.FRAGMENT_LOADING_ABANDONED, Re, fe),
          q.on(G.default.MEDIA_FRAGMENT_LOADED, $e, fe),
          q.on(G.default.SETTING_UPDATED_MAX_BITRATE, Fe, fe),
          q.on(G.default.SETTING_UPDATED_MIN_BITRATE, Fe, fe),
          fe
        );
      }
      C.__dashjs_factory_name = "BolaRule";
      var V = H.default.getClassFactory(C);
      const j = "L2A_STATE_ONE_BITRATE",
        ae = "L2A_STATE_STARTUP",
        ge = "L2A_STATE_STEADY",
        Ee = Math.pow(4, 0.99);
      function Le(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.dashMetrics,
          Q = (0, X.default)(U).getInstance();
        let q, ee, fe, ve;
        function ne(Me) {
          (Me.placeholderBuffer = 0),
            (Me.mostAdvancedSegmentStart = NaN),
            (Me.lastSegmentWasReplacement = !1),
            (Me.lastSegmentStart = NaN),
            (Me.lastSegmentDurationS = NaN),
            (Me.lastSegmentRequestTimeMs = NaN),
            (Me.lastSegmentFinishTimeMs = NaN),
            (Me.lastSegmentUrl = "");
        }
        function Te() {
          for (const Me in ee)
            if (ee.hasOwnProperty(Me)) {
              const Oe = ee[Me];
              Oe.state !== j && ((Oe.state = ae), ne(Oe));
            }
        }
        function _e(Me) {
          if (
            Me &&
            Me.chunk &&
            Me.chunk.representation &&
            Me.chunk.representation.mediaInfo
          ) {
            const Oe = ee[Me.chunk.representation.mediaInfo.type],
              Ge = fe[Me.chunk.representation.mediaInfo.type];
            if (Oe && Oe.state !== j) {
              const $e = Me.chunk.start;
              isNaN(Oe.mostAdvancedSegmentStart) ||
              $e > Oe.mostAdvancedSegmentStart
                ? ((Oe.mostAdvancedSegmentStart = $e),
                  (Oe.lastSegmentWasReplacement = !1))
                : (Oe.lastSegmentWasReplacement = !0),
                (Oe.lastSegmentStart = $e),
                (Oe.lastSegmentDurationS = Me.chunk.duration),
                (Oe.currentRepresentation = Me.chunk.representation),
                le(Oe, Ge);
            }
          }
        }
        function se(Me) {
          if (
            Me &&
            Me.metric === O.HTTP_REQUEST &&
            Me.value &&
            Me.value.type === F.HTTPRequest.MEDIA_SEGMENT_TYPE &&
            Me.value.trace &&
            Me.value.trace.length
          ) {
            const Oe = ee[Me.mediaType],
              Ge = fe[Me.mediaType];
            Oe &&
              Oe.state !== j &&
              ((Oe.lastSegmentRequestTimeMs = Me.value.trequest.getTime()),
              (Oe.lastSegmentFinishTimeMs = Me.value._tfinish.getTime()),
              le(Oe, Ge));
          }
        }
        function le(Me, Oe) {
          isNaN(Me.lastSegmentStart) ||
            isNaN(Me.lastSegmentRequestTimeMs) ||
            ((Oe.segment_request_start_s = 0.001 * Me.lastSegmentRequestTimeMs),
            (Oe.segment_download_finish_s = 0.001 * Me.lastSegmentFinishTimeMs),
            (Me.lastSegmentStart = NaN),
            (Me.lastSegmentRequestTimeMs = NaN));
        }
        function me(Me, Oe) {
          if (Me.length !== Oe.length) return -1;
          let Ge = 0;
          for (let $e = 0; $e < Me.length; $e++) Ge += Me[$e] * Oe[$e];
          return Ge;
        }
        function we() {
          (ee = {}), (fe = {});
        }
        return (
          (q = {
            getSwitchRequest: function (Me) {
              try {
                const Oe = eo(U).create();
                Oe.rule = this.getClassName();
                const Ge = Me.getMediaType(),
                  $e = Me.getScheduleController();
                if (((Oe.reason = Oe.reason || {}), Ge === P.default.AUDIO))
                  return Oe;
                $e.setTimeToLoadDelay(0);
                const Fe = (function (qe) {
                  const Re = qe.getMediaType();
                  let be = ee[Re];
                  return (
                    be ||
                      ((be = (function (Se) {
                        const ke = {},
                          he = Se.getMediaInfo();
                        return (
                          (ke.state = ae),
                          (ke.currentRepresentation = null),
                          (rt = he) &&
                            rt.type &&
                            ((fe[rt.type] = {}),
                            (fe[rt.type].w = []),
                            (fe[rt.type].prev_w = []),
                            (fe[rt.type].Q = 0),
                            (fe[rt.type].segment_request_start_s = 0),
                            (fe[rt.type].segment_download_finish_s = 0),
                            (fe[rt.type].B_target = 1.5)),
                          ne(ke),
                          ke
                        );
                        var rt;
                      })(qe)),
                      (ee[Re] = be)),
                    be
                  );
                })(Me);
                if (!fe[Ge]) return Oe;
                switch (((Oe.reason.state = Fe.state), Fe.state)) {
                  case j:
                    break;
                  case ae:
                    (function (qe, Re, be) {
                      const Se = qe.getMediaInfo(),
                        ke = qe.getMediaType(),
                        he = qe
                          .getThroughputController()
                          .getSafeAverageThroughput(ke);
                      if (isNaN(he)) return Re;
                      const rt = qe.getAbrController(),
                        Ze = rt.getOptimalRepresentationForBitrate(Se, he, !0),
                        nt = K.getCurrentBufferLevel(ke, !0),
                        vt = fe[ke],
                        ce = rt.getPossibleVoRepresentationsFilteredBySettings(
                          Se,
                          !0
                        );
                      if (
                        ((Re.representation = Ze),
                        (Re.reason.throughput = he),
                        (be.currentRepresentation = Ze),
                        !isNaN(be.lastSegmentDurationS) && nt >= vt.B_target)
                      ) {
                        (be.state = ge), (vt.Q = Ee);
                        for (let Ve = 0; Ve < ce.length; ++Ve)
                          ce[Ve].id === be.currentRepresentation.id
                            ? (vt.prev_w[Ve] = 1)
                            : (vt.prev_w[Ve] = 0);
                      }
                    })(Me, Oe, Fe);
                    break;
                  case ge:
                    (function (qe, Re, be) {
                      let Se = [];
                      const ke = qe.getThroughputController(),
                        he = qe.getMediaType();
                      let rt = ke.getAverageThroughput(
                          he,
                          P.default.THROUGHPUT_CALCULATION_MODES
                            .ARITHMETIC_MEAN,
                          1
                        ),
                        Ze = K.getCurrentHttpRequest(he),
                        nt = null;
                      const vt = fe[he];
                      if (
                        (rt < 1 && (rt = 1),
                        Ze.url === be.lastSegmentUrl ||
                          Ze.type === F.HTTPRequest.INIT_SEGMENT_TYPE)
                      )
                        nt = be.currentRepresentation;
                      else {
                        let ce = be.lastSegmentDurationS,
                          Ve = 1;
                        const je = qe.getAbrController(),
                          it = qe.getMediaInfo(),
                          Qe =
                            je.getPossibleVoRepresentationsFilteredBySettings(
                              it,
                              !0
                            );
                        let We = qe.getVideoModel().getPlaybackRate();
                        const Ke = Math.max(Math.pow(4, 1), Ee * Math.sqrt(4));
                        for (let ft = 0; ft < Qe.length; ++ft) {
                          const Rt = Qe[ft];
                          We * Rt.bitrateInKbit > rt && (Ve = -1),
                            (vt.w[ft] =
                              vt.prev_w[ft] +
                              Ve *
                                (ce / (2 * Ke)) *
                                ((vt.Q + Ee) * ((We * Rt.bitrateInKbit) / rt)));
                        }
                        vt.w = (function (ft) {
                          const Rt = ft.length;
                          let an = !1,
                            tn = [];
                          for (let hr = 0; hr < Rt; ++hr) tn[hr] = ft[hr];
                          let fn = ft.sort(function (hr, pi) {
                              return pi - hr;
                            }),
                            nr = 0,
                            Bn = 0,
                            wr = [];
                          for (let hr = 0; hr < Rt - 1; ++hr)
                            if (
                              ((nr += fn[hr]),
                              (Bn = (nr - 1) / (hr + 1)),
                              Bn >= fn[hr + 1])
                            ) {
                              an = !0;
                              break;
                            }
                          an || (Bn = (nr + fn[Rt - 1] - 1) / Rt);
                          for (let hr = 0; hr < Rt; ++hr)
                            wr[hr] = Math.max(tn[hr] - Bn, 0);
                          return wr;
                        })(vt.w);
                        for (let ft = 0; ft < Qe.length; ++ft)
                          (Se[ft] = vt.w[ft] - vt.prev_w[ft]),
                            (vt.prev_w[ft] = vt.w[ft]);
                        const Ie = Qe.map((ft) => ft.bandwidth);
                        vt.Q = Math.max(
                          0,
                          vt.Q -
                            ce +
                            ce * We * ((me(Ie, vt.prev_w) + me(Ie, Se)) / rt)
                        );
                        let Ue = [];
                        for (let ft = 0; ft < Ie.length; ++ft)
                          Ue[ft] = Math.abs(Ie[ft] - me(vt.w, Ie));
                        const at = Ue.indexOf(Math.min(...Ue));
                        (nt = je.getRepresentationByAbsoluteIndex(at, it, !0)),
                          nt.absoluteIndex >
                            be.currentRepresentation.absoluteIndex &&
                            Ie[be.currentRepresentation.absoluteIndex + 1] <=
                              rt &&
                            (nt = je.getRepresentationByAbsoluteIndex(
                              be.currentRepresentation.absoluteIndex + 1,
                              it,
                              !0
                            )),
                          nt.bitrateInKbit >= rt &&
                            (vt.Q = 2 * Math.max(Ee, vt.Q)),
                          (be.lastSegmentUrl = Ze.url);
                      }
                      (Re.representation = nt),
                        (be.currentRepresentation = Re.representation);
                    })(Me, Oe, Fe);
                    break;
                  default:
                    (function (qe, Re, be) {
                      const Se = qe.getAbrController(),
                        ke = qe.getMediaInfo(),
                        he = qe.getMediaType(),
                        rt = qe
                          .getThroughputController()
                          .getSafeAverageThroughput(he);
                      (Re.representation =
                        Se.getOptimalRepresentationForBitrate(ke, rt, !0)),
                        (Re.reason.throughput = rt),
                        (be.state = ae),
                        ne(be);
                    })(Me, Oe, Fe);
                }
                return Oe;
              } catch (Oe) {
                return ve.error(Oe), eo(U).create();
              }
            },
            reset: function () {
              we(),
                Q.off(G.default.PLAYBACK_SEEKING, Te, q),
                Q.off(G.default.MEDIA_FRAGMENT_LOADED, _e, q),
                Q.off(G.default.METRIC_ADDED, se, q);
            },
          }),
          (ve = (0, E.default)(U).getInstance().getLogger(q)),
          we(),
          Q.on(G.default.PLAYBACK_SEEKING, Te, q),
          Q.on(G.default.MEDIA_FRAGMENT_LOADED, _e, q),
          Q.on(G.default.METRIC_ADDED, se, q),
          q
        );
      }
      Le.__dashjs_factory_name = "L2ARule";
      var et = H.default.getClassFactory(Le);
      function yt() {
        const Y = this.context;
        let U, K, Q, q, ee, fe, ve, ne, Te;
        function _e() {
          (Q = null),
            (q = 1),
            (ee = 100),
            (fe = 0),
            (ve = null),
            (ne = null),
            (Te = "dynamic_weight_selection");
        }
        function se() {
          let Oe = 0;
          if (Q)
            for (let Ge = 0; Ge < Q.length; Ge++) {
              let $e = Q[Ge];
              $e.state.throughput > Oe && (Oe = $e.state.throughput);
            }
          return Oe;
        }
        function le(Oe, Ge, $e) {
          let Fe = Oe.map((qe, Re) => $e[Re] * Math.pow(qe - Ge[Re], 2)).reduce(
            (qe, Re) => qe + Re
          );
          return (Fe < 0 ? -1 : 1) * Math.sqrt(Math.abs(Fe));
        }
        function me(Oe, Ge) {
          return le(
            [
              Oe.state.throughput,
              Oe.state.latency,
              Oe.state.rebuffer,
              Oe.state.switch,
            ],
            [
              Ge.state.throughput,
              Ge.state.latency,
              Ge.state.rebuffer,
              Ge.state.switch,
            ],
            [1, 1, 1, 1]
          );
        }
        function we(Oe, Ge) {
          for (let $e = 0; $e < Q.length; $e++) {
            let Fe = Q[$e],
              qe = 0.1;
            const Re = me(Fe, Oe);
            Me(
              Fe,
              Ge,
              Math.exp((-1 * Math.pow(Re, 2)) / (2 * Math.pow(qe, 2)))
            );
          }
        }
        function Me(Oe, Ge, $e) {
          let Fe = Oe.state,
            qe = [0.01, 0.01, 0.01, 0.01];
          (Fe.throughput =
            Fe.throughput + (Ge[0] - Fe.throughput) * qe[0] * $e),
            (Fe.latency = Fe.latency + (Ge[1] - Fe.latency) * qe[1] * $e),
            (Fe.rebuffer = Fe.rebuffer + (Ge[2] - Fe.rebuffer) * qe[2] * $e),
            (Fe.switch = Fe.switch + (Ge[3] - Fe.switch) * qe[3] * $e);
        }
        return (
          (U = {
            getNextQuality: function (Oe, Ge, $e, Fe, qe, Re, be, Se) {
              let ke = Fe,
                he = $e;
              (function (Qe, We) {
                if (!Q) {
                  Q = [];
                  const Ke = We.getPossibleVoRepresentationsFilteredBySettings(
                      Qe,
                      !0
                    ),
                    Ie = Ke.map((Ue) => Ue.bandwidth);
                  (fe = Math.min(...Ie)),
                    (q = (function (Ue) {
                      const at = Ue.map((ft) => Math.pow(ft, 2)).reduce(
                        (ft, Rt) => ft + Rt
                      );
                      return Math.sqrt(at);
                    })(Ie)),
                    Ke.forEach((Ue) => {
                      let at = {
                        representation: Ue,
                        state: {
                          throughput: Ue.bandwidth / q,
                          latency: 0,
                          rebuffer: 0,
                          switch: 0,
                        },
                      };
                      Q.push(at);
                    }),
                    (ne = (function (Ue) {
                      let at = [],
                        ft = (function (nr) {
                          let Bn = [];
                          for (let wr = 0; wr < nr; wr++) {
                            let hr = [
                              Math.random() * se(),
                              Math.random(),
                              Math.random(),
                              Math.random(),
                            ];
                            Bn.push(hr);
                          }
                          return Bn;
                        })(Math.pow(Ue.length, 2));
                      at.push(ft[0]);
                      let Rt = [1, 1, 1, 1];
                      for (let nr = 1; nr < Ue.length; nr++) {
                        let Bn = null,
                          wr = null;
                        for (let hr = 0; hr < ft.length; hr++) {
                          let pi = ft[hr],
                            Rn = null;
                          for (let $r = 0; $r < at.length; $r++) {
                            let ni = le(pi, at[$r], Rt);
                            (Rn === null || ni < Rn) && (Rn = ni);
                          }
                          (wr === null || Rn > wr) && ((Bn = pi), (wr = Rn));
                        }
                        at.push(Bn);
                      }
                      let an = null,
                        tn = null;
                      for (let nr = 0; nr < at.length; nr++) {
                        let Bn = 0;
                        for (let wr = 0; wr < at.length; wr++)
                          nr !== wr && (Bn += le(at[nr], at[wr], Rt));
                        (an === null || Bn > an) && ((an = Bn), (tn = nr));
                      }
                      let fn = [];
                      for (fn.push(at[tn]), at.splice(tn, 1); at.length > 0; ) {
                        let nr = null,
                          Bn = null;
                        for (let wr = 0; wr < at.length; wr++) {
                          let hr = le(fn[0], at[wr], Rt);
                          (nr === null || hr < nr) && ((nr = hr), (Bn = wr));
                        }
                        fn.push(at[Bn]), at.splice(Bn, 1);
                      }
                      return fn;
                    })(Q));
                }
              })(Ge, Oe);
              let rt = $e / q;
              rt > 1 && (rt = se()), (Fe /= ee);
              let Ze = Q.find((Qe) => Qe.representation.id === be.id),
                nt =
                  (Ze.representation.bandwidth * Se.getSegmentDuration()) / he,
                vt = Math.max(0, nt - qe);
              if (qe - nt < Se.getMinBuffer())
                return (
                  K.debug(
                    `Buffer is low for bitrate= ${Ze.representation.bandwidth} downloadTime=${nt} currentBuffer=${qe} rebuffer=${vt}`
                  ),
                  (function (Qe, We) {
                    let Ke = 0,
                      Ie = Qe;
                    if (Q)
                      for (let Ue = 0; Ue < Q.length; Ue++) {
                        let at = Q[Ue];
                        at.representation.bandwidth <
                          Qe.representation.bandwidth &&
                          at.representation.bandwidth > Ke &&
                          We > at.representation.bandwidth &&
                          ((Ke = at.representation.bandwidth), (Ie = at));
                      }
                    return Ie;
                  })(Ze, he).representation
                );
              switch (Te) {
                case "manual_weight_selection":
                  ve = [0.4, 0.4, 0.4, 0.4];
                  break;
                case "random_weight_selection":
                  ve = (function (Qe) {
                    let We = [],
                      Ke = Math.sqrt(2 / Qe);
                    for (let Ie = 0; Ie < 4; Ie++) We.push(Math.random() * Ke);
                    return (ve = We), ve;
                  })(Q.length);
                  break;
                default:
                  (function (Qe, We, Ke, Ie, Ue, at) {
                    ve || (ve = ne[ne.length - 1]);
                    let ft = Qe.findWeightVector(Q, We, Ke, Ie, Ue, at);
                    ft !== null && ft !== -1 && (ve = ft);
                  })(Se, ke, qe, vt, he, Re);
              }
              let ce = null,
                Ve = null,
                je = null;
              for (let Qe = 0; Qe < Q.length; Qe++) {
                let We = Q[Qe],
                  Ke = We.state,
                  Ie = [Ke.throughput, Ke.latency, Ke.rebuffer, Ke.switch],
                  Ue = ve.slice(),
                  at = Se.getNextBufferWithBitrate(
                    We.representation.bandwidth,
                    qe,
                    he
                  ),
                  ft = at < Se.getMinBuffer();
                ft &&
                  K.debug(
                    `Buffer is low for bitrate=${We.representation.bandwidth} downloadTime=${nt} currentBuffer=${qe} nextBuffer=${at}`
                  ),
                  (We.representation.bandwidth > $e - 1e4 || ft) &&
                    We.representation.bandwidth !== fe &&
                    (Ue[0] = 100);
                let Rt = le(Ie, [rt, 0, 0, 0], Ue);
                (ce === null || Rt < ce) &&
                  ((ce = Rt), (Ve = We.representation), (je = We));
              }
              let it =
                Math.abs(
                  Ze.representation.bandwidth - je.representation.bandwidth
                ) / q;
              return we(Ze, [rt, Fe, vt, it]), we(je, [rt, 0, 0, it]), Ve;
            },
            reset: function () {
              _e();
            },
          }),
          (K = (0, E.default)(Y).getInstance().getLogger(U)),
          _e(),
          U
        );
      }
      yt.__dashjs_factory_name = "LearningAbrController";
      var Bt = H.default.getClassFactory(yt);
      function mn() {
        let Y, U, K, Q, q;
        function ee() {
          (U = null), (K = null), (Q = null), (q = null);
        }
        function fe(ne, Te, _e, se) {
          let le = new (class {
            constructor() {
              (this.type = null),
                (this.lastBitrate = null),
                (this.weights = {}),
                (this.weights.bitrateReward = null),
                (this.weights.bitrateSwitchPenalty = null),
                (this.weights.rebufferPenalty = null),
                (this.weights.latencyPenalty = null),
                (this.weights.playbackSpeedPenalty = null),
                (this.bitrateWSum = 0),
                (this.bitrateSwitchWSum = 0),
                (this.rebufferWSum = 0),
                (this.latencyWSum = 0),
                (this.playbackSpeedWSum = 0),
                (this.totalQoe = 0);
            }
          })();
          return (
            (le.type = ne),
            (le.weights.bitrateReward = Te || 1),
            (le.weights.bitrateSwitchPenalty = 1),
            (le.weights.rebufferPenalty = _e || 1e3),
            (le.weights.latencyPenalty = []),
            le.weights.latencyPenalty.push({
              threshold: 1.1,
              penalty: 0.05 * se,
            }),
            le.weights.latencyPenalty.push({
              threshold: 1e8,
              penalty: 0.1 * _e,
            }),
            (le.weights.playbackSpeedPenalty = se || 200),
            le
          );
        }
        function ve(ne, Te, _e, se, le) {
          (le.bitrateWSum += le.weights.bitrateReward * ne),
            le.lastBitrate &&
              (le.bitrateSwitchWSum +=
                le.weights.bitrateSwitchPenalty *
                Math.abs(ne - le.lastBitrate)),
            (le.lastBitrate = ne),
            (le.rebufferWSum += le.weights.rebufferPenalty * Te);
          for (let me = 0; me < le.weights.latencyPenalty.length; me++) {
            let we = le.weights.latencyPenalty[me];
            if (_e <= we.threshold) {
              le.latencyWSum += we.penalty * _e;
              break;
            }
          }
          (le.playbackSpeedWSum +=
            le.weights.playbackSpeedPenalty * Math.abs(1 - se)),
            (le.totalQoe =
              le.bitrateWSum -
              le.bitrateSwitchWSum -
              le.rebufferWSum -
              le.latencyWSum -
              le.playbackSpeedWSum);
        }
        return (
          (Y = {
            setupPerSegmentQoe: function (ne, Te, _e) {
              (U = fe("segment", ne, Te, _e)), (K = ne), (Q = Te), (q = _e);
            },
            logSegmentMetrics: function (ne, Te, _e, se) {
              U && ve(ne, Te, _e, se, U);
            },
            getPerSegmentQoe: function () {
              return U;
            },
            calculateSingleUseQoe: function (ne, Te, _e, se) {
              let le = null;
              return (
                K && Q && q && (le = fe("segment", K, Q, q)),
                le ? (ve(ne, Te, _e, se, le), le.totalQoe) : 0
              );
            },
            reset: function () {
              ee();
            },
          }),
          ee(),
          Y
        );
      }
      mn.__dashjs_factory_name = "LoLpQoeEvaluator";
      var Yn = H.default.getClassFactory(mn);
      function zr(Y) {
        let U,
          K,
          Q,
          q,
          ee = Y.targetLatency,
          fe = Y.bufferMin,
          ve = Y.segmentDuration,
          ne = Y.qoeEvaluator;
        function Te() {
          return ve;
        }
        function _e(se, le) {
          const me = Te();
          let we;
          return (we = le > me ? se - me : se + me - le), we;
        }
        return (
          (U = {
            getMinBuffer: function () {
              return fe;
            },
            getSegmentDuration: Te,
            getNextBufferWithBitrate: function (se, le, me) {
              return _e(le, (se * ve) / me);
            },
            getNextBuffer: _e,
            findWeightVector: function (se, le, me, we, Me, Oe) {
              let Ge = null,
                $e = null,
                Fe = null,
                qe = Math.abs(le - q);
              return (
                se.forEach((Re) => {
                  Q.forEach((be) => {
                    be[0];
                    let Se,
                      ke = be[1],
                      he = be[2],
                      rt = (be[3], (Re.representation.bandwidth * ve) / Me),
                      Ze = _e(me, rt);
                    Se = he === 0 ? 10 : 1 / he;
                    let nt = Se * Math.max(1e-5, rt - Ze);
                    Se = ke === 0 ? 10 : 1 / ke;
                    let vt = Se * Re.state.latency,
                      ce = ne.calculateSingleUseQoe(
                        Re.representation.bandwidth,
                        nt,
                        vt,
                        Oe
                      );
                    var Ve;
                    (Ge === null || ce > Ge) &&
                      ((Ve = Ze), !(le > ee + qe) && Ve >= fe) &&
                      ((Ge = ce),
                      ($e = be),
                      (Fe = Re.representation.bandwidth));
                  });
                }),
                $e === null && Fe === null && ($e = -1),
                (q = le),
                $e
              );
            },
          }),
          (K = [0.2, 0.4, 0.6, 0.8, 1]),
          (Q = (function (se) {
            let le = se.map(function (we) {
                return [we];
              }),
              me = function (we, Me, Oe) {
                if (Oe === Me) return we;
                let Ge = we.length;
                for (let $e = 0; $e < Ge; $e++) {
                  let Fe = we.shift();
                  for (let qe = 0; qe < se.length; qe++)
                    we.push(Fe.concat(se[qe]));
                }
                return me(we, Me, Oe + 1);
              };
            return me(le, 4, 1);
          })(K)),
          (q = 0),
          U
        );
      }
      zr.__dashjs_factory_name = "LoLpWeightSelector";
      var Zr = H.default.getClassFactory(zr);
      function fi(Y) {
        let U,
          K,
          Q,
          q,
          ee = (Y = Y || {}).dashMetrics,
          fe = this.context;
        return (
          (K = {
            getSwitchRequest: function (ve) {
              try {
                let ne = eo(fe).create();
                ne.rule = this.getClassName();
                let Te = ve.getMediaInfo().type,
                  _e = ve.getAbrController();
                const se = ve.getStreamInfo();
                let le = ve.getRepresentation();
                const me = ve.getMediaInfo(),
                  we = ee.getCurrentBufferState(Te),
                  Me = ve.getScheduleController(),
                  Oe = ee.getCurrentBufferLevel(Te, !0),
                  Ge = Me.getPlaybackController();
                let $e = Ge.getCurrentLiveLatency();
                if (Te === P.default.AUDIO) return ne;
                $e || ($e = 0);
                const Fe = Ge.getPlaybackRate(),
                  qe = ve
                    .getThroughputController()
                    .getSafeAverageThroughput(Te);
                if (
                  (U.debug(`Throughput ${Math.round(qe)} kbps`),
                  isNaN(qe) ||
                    !we ||
                    _e.getAbandonmentStateFor(se.id, Te) === O.ABANDON_LOAD)
                )
                  return ne;
                let Re = _e
                    .getPossibleVoRepresentationsFilteredBySettings(me, !0)
                    .map((ce) => ce.bandwidth),
                  be = ve.getRepresentation().fragmentDuration,
                  Se = Math.min(...Re) / 1e3,
                  ke = Math.max(...Re) / 1e3,
                  he = le.bandwidth / 1e3,
                  rt = ee.getCurrentHttpRequest(Te, !0),
                  Ze = (rt.tresponse.getTime() - rt.trequest.getTime()) / 1e3,
                  nt = Ze > be ? Ze - be : 0;
                q.setupPerSegmentQoe(be, ke, Se),
                  q.logSegmentMetrics(he, nt, $e, Fe);
                let vt = Zr(fe).create({
                  targetLatency: 1.5,
                  bufferMin: 0.3,
                  segmentDuration: be,
                  qoeEvaluator: q,
                });
                return (
                  (ne.representation = Q.getNextQuality(
                    _e,
                    me,
                    1e3 * qe,
                    $e,
                    Oe,
                    Fe,
                    le,
                    vt
                  )),
                  (ne.reason = { throughput: qe, latency: $e }),
                  (ne.priority = eo.PRIORITY.STRONG),
                  Me.setTimeToLoadDelay(0),
                  ne
                );
              } catch (ne) {
                throw ne;
              }
            },
            reset: function () {
              Q.reset(), q.reset();
            },
          }),
          (U = (0, E.default)(fe).getInstance().getLogger(K)),
          (Q = Bt(fe).create()),
          (q = Yn(fe).create()),
          K
        );
      }
      fi.__dashjs_factory_name = "LoLPRule";
      var Pi = H.default.getClassFactory(fi);
      function ta(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.mediaPlayerModel,
          Q = Y.customParametersModel,
          q = Y.dashMetrics,
          ee = Y.settings,
          fe = (0, X.default)(U).getInstance();
        let ve, ne, Te, _e;
        function se() {
          Object.values(P.default.QUALITY_SWITCH_RULES).forEach((Ge) => {
            ne = le(Ge, ne);
          });
          let Oe = Object.values(P.default.ABANDON_FRAGMENT_RULES);
          Oe.forEach((Ge) => {
            Te = le(Ge, Te);
          }),
            Q.getAbrCustomRules().forEach(function (Ge) {
              Ge.type === P.default.RULES_TYPES.QUALITY_SWITCH_RULES &&
                ne.push(Ge.rule(U).create()),
                Ge.type === P.default.RULES_TYPES.ABANDON_FRAGMENT_RULES &&
                  Oe.push(Ge.rule(U).create());
            }),
            ne.length === 0 &&
              (ne.push(
                V(U).create({
                  dashMetrics: q,
                  mediaPlayerModel: K,
                  settings: ee,
                })
              ),
              ne.push(f_(U).create({ dashMetrics: q })));
        }
        function le(Oe, Ge) {
          const $e = Oe.charAt(0).toLowerCase() + Oe.slice(1);
          return !ee.get().streaming.abr.rules[$e].active ||
            ((Fe = Oe), Ge.filter((qe) => qe.getClassName() === Fe).length > 0)
            ? ee.get().streaming.abr.rules[$e].active
              ? Ge
              : (function (qe, Re) {
                  return qe.filter((be) => be.getClassName() !== Re);
                })(Ge, Oe)
            : (Ge.push(
                (function (qe) {
                  switch (qe) {
                    case P.default.QUALITY_SWITCH_RULES.BOLA_RULE:
                      return V(U).create({
                        dashMetrics: q,
                        mediaPlayerModel: K,
                        settings: ee,
                      });
                    case P.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE:
                      return f_(U).create({ dashMetrics: q });
                    case P.default.QUALITY_SWITCH_RULES
                      .INSUFFICIENT_BUFFER_RULE:
                      return g_(U).create({ dashMetrics: q, settings: ee });
                    case P.default.QUALITY_SWITCH_RULES.SWITCH_HISTORY_RULE:
                      return __(U).create();
                    case P.default.QUALITY_SWITCH_RULES.DROPPED_FRAMES_RULE:
                      return h2(U).create();
                    case P.default.QUALITY_SWITCH_RULES.LEARN_TO_ADAPT_RULE:
                      return et(U).create({ dashMetrics: q, settings: ee });
                    case P.default.QUALITY_SWITCH_RULES.LOL_PLUS_RULE:
                      return Pi(U).create({ dashMetrics: q });
                    case P.default.ABANDON_FRAGMENT_RULES.ABANDON_REQUEST_RULE:
                      return y_(U).create({
                        dashMetrics: q,
                        mediaPlayerModel: K,
                        settings: ee,
                      });
                  }
                })(Oe)
              ),
              Ge);
          var Fe;
        }
        function me(Oe) {
          return Oe.filter((Ge) => Ge.representation !== eo.NO_CHANGE);
        }
        function we(Oe) {
          const Ge = {};
          let $e,
            Fe,
            qe,
            Re = null;
          if (Oe.length !== 0) {
            for (
              Ge[eo.PRIORITY.STRONG] = null,
                Ge[eo.PRIORITY.WEAK] = null,
                Ge[eo.PRIORITY.DEFAULT] = null,
                $e = 0,
                Fe = Oe.length;
              $e < Fe;
              $e += 1
            )
              (qe = Oe[$e]),
                qe.representation !== eo.NO_CHANGE &&
                  (Ge[qe.priority] === null ||
                    (Ge[qe.priority].representation !== eo.NO_CHANGE &&
                      qe.representation.bitrateInKbit <
                        Ge[qe.priority].representation.bitrateInKbit)) &&
                  (Ge[qe.priority] = qe);
            return (
              Ge[eo.PRIORITY.WEAK] &&
                Ge[eo.PRIORITY.WEAK].representation !== eo.NO_CHANGE &&
                (Re = Ge[eo.PRIORITY.WEAK]),
              Ge[eo.PRIORITY.DEFAULT] &&
                Ge[eo.PRIORITY.DEFAULT].representation !== eo.NO_CHANGE &&
                (Re = Ge[eo.PRIORITY.DEFAULT]),
              Ge[eo.PRIORITY.STRONG] &&
                Ge[eo.PRIORITY.STRONG].representation !== eo.NO_CHANGE &&
                (Re = Ge[eo.PRIORITY.STRONG]),
              Re
            );
          }
        }
        function Me() {
          se();
        }
        return (
          (ve = {
            clearDataForStream: function (Oe) {
              [ne, Te].forEach((Ge) => {
                Ge &&
                  Ge.length &&
                  Ge.forEach(
                    ($e) =>
                      $e.clearDataForStream &&
                      typeof $e.clearDataForStream == "function" &&
                      $e.clearDataForStream(Oe)
                  );
              });
            },
            getAbandonFragmentRules: function () {
              return Te;
            },
            getBestPossibleSwitchRequest: function (Oe) {
              return (
                (Oe &&
                  we(
                    me(
                      ne
                        .filter((Ge) => {
                          const $e = Ge.getClassName();
                          if (
                            $e !== P.default.QUALITY_SWITCH_RULES.BOLA_RULE &&
                            $e !==
                              P.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE
                          )
                            return !0;
                          const Fe = Oe.getMediaType();
                          return (
                            (_e[Fe] &&
                              $e ===
                                P.default.QUALITY_SWITCH_RULES.BOLA_RULE) ||
                            (!_e[Fe] &&
                              $e ===
                                P.default.QUALITY_SWITCH_RULES.THROUGHPUT_RULE)
                          );
                        })
                        .map((Ge) => Ge.getSwitchRequest(Oe))
                    )
                  )) ||
                eo(U).create()
              );
            },
            getBolaState: function (Oe) {
              return _e[Oe];
            },
            getMinSwitchRequest: we,
            getQualitySwitchRules: function () {
              return ne;
            },
            handleNewMediaInfo: function (Oe) {
              ne.forEach(
                (Ge) => Ge.handleNewMediaInfo && Ge.handleNewMediaInfo(Oe)
              ),
                Te.forEach(
                  (Ge) => Ge.handleNewMediaInfo && Ge.handleNewMediaInfo(Oe)
                );
            },
            initialize: function () {
              (ne = []),
                (Te = []),
                (_e = {}),
                se(),
                fe.on(G.default.SETTING_UPDATED_ABR_ACTIVE_RULES, Me, ve);
            },
            reset: function () {
              [ne, Te].forEach((Oe) => {
                Oe && Oe.length && Oe.forEach((Ge) => Ge.reset && Ge.reset());
              }),
                (ne = []),
                (Te = []),
                (_e = {}),
                fe.off(G.default.SETTING_UPDATED_ABR_ACTIVE_RULES, Me, ve);
            },
            setBolaState: function (Oe, Ge) {
              _e[Oe] = Ge;
            },
            shouldAbandonFragment: function (Oe) {
              if (!Oe) return eo(U).create();
              const Ge = we(me(Te.map(($e) => $e.shouldAbandon(Oe))));
              return Ge && (Ge.reason.forceAbandon = !0), Ge || eo(U).create();
            },
          }),
          ve
        );
      }
      ta.__dashjs_factory_name = "ABRRulesCollection";
      const Ji = H.default.getClassFactory(ta);
      H.default.updateSingletonFactory(ta.__dashjs_factory_name, Ji);
      var bo = Ji;
      function Oo(Y) {
        let U;
        const K = (Y = Y || {}).abrController,
          Q = Y.throughputController,
          q = Y.switchRequestHistory,
          ee = Y.droppedFramesHistory,
          fe = Y.currentRequest,
          ve = Y.streamProcessor
            ? Y.streamProcessor.getScheduleController()
            : null,
          ne = Y.streamProcessor ? Y.streamProcessor.getRepresentation() : null,
          Te = Y.videoModel ? Y.videoModel : null;
        function _e() {
          return ne ? ne.mediaInfo : null;
        }
        return (
          (U = {
            getAbrController: function () {
              return K;
            },
            getCurrentRequest: function () {
              return fe;
            },
            getDroppedFramesHistory: function () {
              return ee;
            },
            getMediaInfo: _e,
            getMediaType: function () {
              const se = _e();
              return se ? se.type : null;
            },
            getRepresentation: function () {
              return ne;
            },
            getScheduleController: function () {
              return ve;
            },
            getStreamInfo: function () {
              const se = _e();
              return se ? se.streamInfo : null;
            },
            getSwitchRequestHistory: function () {
              return q;
            },
            getThroughputController: function () {
              return Q;
            },
            getVideoModel: function () {
              return Te;
            },
          }),
          U
        );
      }
      Oo.__dashjs_factory_name = "RulesContext";
      var Do = H.default.getClassFactory(Oo);
      function sl() {
        let Y = {},
          U = {};
        const K = this.context,
          Q = (0, ue.default)(K).getInstance();
        return {
          clearForStream: function (q) {
            delete Y[q], delete U[q];
          },
          getSwitchRequests: function (q, ee) {
            return q != null && ee != null && Y[q] && Y[q][ee] ? Y[q][ee] : {};
          },
          push: function (q) {
            const ee = q.currentRepresentation,
              fe = q.newRepresentation;
            if (
              ee.mediaInfo.streamInfo.id !== fe.mediaInfo.streamInfo.id ||
              fe.mediaInfo.id !== ee.mediaInfo.id
            )
              return;
            const ve = ee.mediaInfo.streamInfo.id;
            var ne;
            Y[ve] || ((Y[(ne = ve)] = {}), (U[ne] = {}));
            const Te = ee.mediaInfo.type;
            Y[ve][Te] ||
              (function (Oe, Ge) {
                (Y[Oe][Ge] = {}), (U[Oe][Ge] = []);
              })(ve, Te);
            const _e = q.currentRepresentation.id;
            Y[ve][Te][_e] ||
              (function (Oe, Ge, $e) {
                Y[Oe][Ge][$e] = { noDrops: 0, drops: 0, dropSize: 0 };
              })(ve, Te, _e);
            let se =
                q.newRepresentation.absoluteIndex -
                q.currentRepresentation.absoluteIndex,
              le = se < 0 ? 1 : 0,
              me = le ? -se : 0,
              we = le ? 0 : 1;
            (Y[ve][Te][q.currentRepresentation.id].drops += le),
              (Y[ve][Te][q.currentRepresentation.id].dropSize += me),
              (Y[ve][Te][q.currentRepresentation.id].noDrops += we),
              U[ve][Te].push({
                id: q.currentRepresentation.id,
                noDrop: we,
                drop: le,
                dropSize: me,
              });
            const Me = (function (Oe, Ge) {
              return U[Oe][Ge].length >
                Q.get().streaming.abr.rules.switchHistoryRule.parameters
                  .sampleSize
                ? U[Oe][Ge].shift()
                : null;
            })(ve, Te);
            Me &&
              (function (Oe, Ge, $e) {
                (Y[Oe][Ge][$e.id].drops -= $e.drop),
                  (Y[Oe][Ge][$e.id].dropSize -= $e.dropSize),
                  (Y[Oe][Ge][$e.id].noDrops -= $e.noDrop);
              })(ve, Te, Me);
          },
          reset: function () {
            (Y = {}), (U = {});
          },
        };
      }
      sl.__dashjs_factory_name = "SwitchRequestHistory";
      var vc = H.default.getClassFactory(sl);
      function yh() {
        let Y = {},
          U = {},
          K = {};
        return {
          clearForStream: function (Q) {
            delete Y[Q], delete U[Q], delete K[Q];
          },
          getFrameHistory: function (Q) {
            return Y[Q];
          },
          push: function (Q, q, ee) {
            if (!q) return;
            var fe;
            Y[Q] || ((Y[(fe = Q)] = []), (U[fe] = 0), (K[fe] = 0));
            let ve = ee && ee.droppedVideoFrames ? ee.droppedVideoFrames : 0,
              ne = ee && ee.totalVideoFrames ? ee.totalVideoFrames : 0,
              Te = ve - U[Q];
            U[Q] = ve;
            let _e = ne - K[Q];
            K[Q] = ne;
            const se = Y[Q];
            se[q]
              ? ((se[q].droppedVideoFrames += Te),
                (se[q].totalVideoFrames += _e))
              : (se[q] = { droppedVideoFrames: Te, totalVideoFrames: _e });
          },
          reset: function () {
            (Y = {}), (U = {}), (K = {});
          },
        };
      }
      yh.__dashjs_factory_name = "DroppedFramesHistory";
      var bg = H.default.getClassFactory(yh);
      function _g() {
        const Y = this.context,
          U = (0, E.default)(Y).getInstance(),
          K = (0, X.default)(Y).getInstance();
        let Q,
          q,
          ee,
          fe,
          ve,
          ne,
          Te,
          _e,
          se,
          le,
          me,
          we,
          Me,
          Oe,
          Ge,
          $e,
          Fe,
          qe,
          Re,
          be;
        function Se() {
          (Te = {}),
            (ne = {}),
            Fe && Fe.reset(),
            $e && $e.reset(),
            (Ge = void 0),
            (Fe = void 0),
            ($e = void 0),
            clearTimeout(_e),
            (_e = null);
        }
        function ke(je) {
          let it = he(
            je,
            !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1]
          );
          return (
            (it = (function (Qe) {
              try {
                return (function (We) {
                  try {
                    if (
                      !be.get().streaming.cmsd.enabled ||
                      !be.get().streaming.cmsd.abr.applyMb
                    )
                      return We;
                    const Ke = We.filter((Ie) => {
                      const Ue = Ie.mediaInfo.type;
                      let at = Me.getMaxBitrate(Ue);
                      if (Ue !== P.default.VIDEO || at < 0) return !0;
                      const ft = Ie.mediaInfo.streamInfo.id;
                      return (
                        (at -=
                          ne[ft][P.default.AUDIO].getRepresentation()
                            .bitrateInKbit || 0),
                        Ie.bitrateInKbit <= at
                      );
                    });
                    return Ke.length > 0 ? Ke : We;
                  } catch (Ke) {
                    return q.error(Ke), We;
                  }
                })(
                  (Qe = (function (We) {
                    try {
                      if (!be.get().streaming.abr.limitBitrateByPortal)
                        return We;
                      const { elementWidth: Ke } = le.getVideoElementSize(),
                        Ie = We.filter(
                          (Ue) =>
                            Ue.mediaInfo.type !== P.default.VIDEO ||
                            Ue.width <= Ke
                        );
                      return Ie.length > 0 ? Ie : We;
                    } catch (Ke) {
                      return q.error(Ke), We;
                    }
                  })(
                    (Qe = (function (We) {
                      try {
                        const Ke = We.filter((Ie) => {
                          const Ue = Ie.mediaInfo.type,
                            at = Ie.bitrateInKbit,
                            ft = me.getAbrBitrateParameter("maxBitrate", Ue),
                            Rt = me.getAbrBitrateParameter("minBitrate", Ue);
                          return !(
                            (ft > -1 && at > ft) ||
                            (Rt > -1 && at < Rt)
                          );
                        });
                        return Ke.length > 0 ? Ke : We;
                      } catch (Ke) {
                        return q.error(Ke), We;
                      }
                    })(Qe))
                  ))
                );
              } catch (We) {
                return q.error(We), Qe;
              }
            })(it)),
            it
          );
        }
        function he(je, it) {
          let Qe = [];
          if (!je) return Qe;
          return (
            (function (Ue) {
              try {
                const at = [];
                if (
                  (Ue && at.push(Ue),
                  !be.get().streaming.abr
                    .enableSupplementalPropertyAdaptationSetSwitching ||
                    !Ue.adaptationSetSwitchingCompatibleIds ||
                    Ue.adaptationSetSwitchingCompatibleIds.length === 0)
                )
                  return at;
                const ft = ne[Ue.streamInfo.id][Ue.type]
                  .getAllMediaInfos()
                  .filter((Rt) =>
                    Ue.adaptationSetSwitchingCompatibleIds.includes(Rt.id)
                  );
                return at.concat(ft);
              } catch {
                return [Ue];
              }
            })(je).forEach((Ue) => {
              let at = se.getVoRepresentations(Ue);
              at && at.length > 0 && (Qe = Qe.concat(at));
            }),
            (Qe = (function (Ue) {
              let at = null;
              return (
                Ue.filter(
                  (ft) => (
                    at || (at = ft.mediaInfo),
                    !isNaN(ft.qualityRanking) &&
                      se.areMediaInfosEqual(at, ft.mediaInfo)
                  )
                ).length === Ue.length
              );
            })((Ke = Qe))
              ? ((Ie = Ke).sort(
                  (Ue, at) => at.qualityRanking - Ue.qualityRanking
                ),
                Ie)
              : (function (Ue) {
                  return (
                    Ue.sort((at, ft) =>
                      se.areMediaInfosEqual(at.mediaInfo, ft.mediaInfo)
                        ? isNaN(at.pixelsPerSecond) ||
                          isNaN(ft.pixelsPerSecond) ||
                          at.pixelsPerSecond === ft.pixelsPerSecond
                          ? at.bandwidth - ft.bandwidth
                          : at.pixelsPerSecond - ft.pixelsPerSecond
                        : isNaN(at.pixelsPerSecond) ||
                          isNaN(ft.pixelsPerSecond) ||
                          at.pixelsPerSecond === ft.pixelsPerSecond
                        ? isNaN(at.bitsPerPixel) || isNaN(ft.bitsPerPixel)
                          ? at.bandwidth - ft.bandwidth
                          : ft.bitsPerPixel - at.bitsPerPixel
                        : at.pixelsPerSecond - ft.pixelsPerSecond
                    ),
                    Ue
                  );
                })(Ke)),
            Qe.forEach((Ue, at) => {
              Ue.absoluteIndex = at;
            }),
            (Qe = Qe.filter((Ue) => {
              const at = !!it || se.areMediaInfosEqual(Ue.mediaInfo, je),
                ft = !Ue || !Ue.mediaInfo || ve.areKeyIdsUsable(Ue.mediaInfo);
              return at && ft;
            })),
            Qe
          );
          var Ke, Ie;
        }
        function rt(je) {
          const it = je.request.mediaType,
            Qe = je.streamId;
          if (
            !(
              it &&
              Qe &&
              ne[Qe] &&
              be.get().streaming.abr.autoSwitchBitrate[it]
            )
          )
            return;
          const We = ne[Qe][it];
          if (!We) return;
          const Ke = Do(Y).create({
              abrController: Q,
              streamProcessor: We,
              currentRequest: je.request,
              throughputController: qe,
              adapter: se,
              videoModel: le,
            }),
            Ie = ee.shouldAbandonFragment(Ke);
          Ie &&
            Ie.representation !== eo.NO_CHANGE &&
            (function (Ue, at, ft, Rt, an) {
              if (
                Rt.getFragmentModel().getRequests({
                  state: $t.FRAGMENT_MODEL_LOADING,
                  index: Ue.request.index,
                })[0]
              ) {
                const nr =
                  ((fn = ft), Te[(tn = at)] && Te[tn][fn] ? Te[tn][fn] : null);
                nr && (nr.state = O.ABANDON_LOAD),
                  $e.reset(),
                  vt(
                    ft,
                    fe.getActiveStreamInfo(),
                    an.representation,
                    an.reason
                  ),
                  clearTimeout(_e),
                  (_e = setTimeout(() => {
                    nr && (Te[at][ft].state = O.ALLOW_LOAD), (_e = null);
                  }, be.get().streaming.abandonLoadTimeout));
              }
              var tn, fn;
            })(je, Qe, it, We, Ie);
        }
        function Ze(je) {
          je.mediaType === P.default.VIDEO &&
            (Ge !== void 0 && Fe.push(je.streamId, Ge, le.getPlaybackQuality()),
            (Ge = je.newRepresentation.id));
        }
        function nt(je) {
          !Ve() ||
            je.metric !== O.BUFFER_LEVEL ||
            (je.mediaType !== P.default.AUDIO &&
              je.mediaType !== P.default.VIDEO) ||
            (function (it, Qe) {
              try {
                const We = me.getBufferTimeDefault(),
                  Ke = We,
                  Ie = 0.5 * We,
                  Ue = ee.getBolaState(it),
                  at = Qe >= (Ue ? Ie : Ke);
                ee.setBolaState(it, at),
                  at !== Ue &&
                    (at
                      ? q.info(
                          "[" +
                            it +
                            "] switching from throughput to buffer occupancy ABR rule (buffer: " +
                            Qe.toFixed(3) +
                            ")."
                        )
                      : q.info(
                          "[" +
                            it +
                            "] switching from buffer occupancy to throughput ABR rule (buffer: " +
                            Qe.toFixed(3) +
                            ")."
                        ));
              } catch (We) {
                q.error(We);
              }
            })(je.mediaType, 0.001 * je.value.level);
        }
        function vt(je, it, Qe) {
          let We =
            arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
          if (!(it && it.id && je && ne && ne[it.id] && ne[it.id][je] && Qe))
            return;
          const Ke = ne[it.id][je].getRepresentation();
          (Ke && Qe.id === Ke.id) || ce(Ke, Qe, We);
        }
        function ce(je, it, Qe) {
          const We = it.mediaInfo.streamInfo.id,
            Ke = it.mediaInfo.type;
          if (Ke && ne[We] && ne[We][Ke]) {
            const Ie = ne[We][Ke].getStreamInfo(),
              Ue = Re.getCurrentBufferLevel(Ke),
              at =
                je !== null &&
                !se.areMediaInfosEqual(je.mediaInfo, it.mediaInfo),
              ft = je ? je.bitrateInKbit : 0;
            q.info(
              `[AbrController]: Switching quality in period ${We} for media type ${Ke}. Switch from bitrate ${ft} to bitrate ${it.bitrateInKbit}. Current buffer level: ${Ue}. Reason:` +
                (Qe ? JSON.stringify(Qe) : "/")
            ),
              K.trigger(
                G.default.QUALITY_CHANGE_REQUESTED,
                {
                  oldRepresentation: je,
                  newRepresentation: it,
                  reason: Qe,
                  streamInfo: Ie,
                  mediaType: Ke,
                  isAdaptationSetSwitch: at,
                },
                { streamId: Ie.id, mediaType: Ke }
              );
            const Rt = qe.getAverageThroughput(Ke);
            isNaN(Rt) || Oe.setSavedBitrateSettings(Ke, Rt);
          }
        }
        function Ve() {
          return (
            be.get().streaming.abr.rules.bolaRule.active &&
            be.get().streaming.abr.rules.throughputRule.active
          );
        }
        return (
          (Q = {
            checkPlaybackQuality: function (je, it) {
              try {
                if (!(je && ne && ne[it] && ne[it][je])) return !1;
                if (Fe) {
                  const at = le.getPlaybackQuality();
                  at && Fe.push(it, Ge, at);
                }
                if (!be.get().streaming.abr.autoSwitchBitrate[je]) return !1;
                const Qe = ne[it][je],
                  We = Qe.getRepresentation(),
                  Ke = Do(Y).create({
                    abrController: Q,
                    throughputController: qe,
                    switchRequestHistory: $e,
                    droppedFramesHistory: Fe,
                    streamProcessor: Qe,
                    adapter: se,
                    videoModel: le,
                  }),
                  Ie = ee.getBestPossibleSwitchRequest(Ke);
                if (!Ie || !Ie.representation) return !1;
                let Ue = Ie.representation;
                return (
                  $e.push({ currentRepresentation: We, newRepresentation: Ue }),
                  Ue.id !== We.id &&
                    (Te[it][je].state === O.ALLOW_LOAD ||
                      Ue.absoluteIndex < We.absoluteIndex) &&
                    (ce(We, Ue, Ie.reason), !0)
                );
              } catch (Qe) {
                return q.error(Qe), !1;
              }
            },
            clearDataForStream: function (je) {
              Fe && Fe.clearForStream(je),
                ne[je] && delete ne[je],
                $e && $e.clearForStream(je),
                Te[je] && delete Te[je],
                ee.clearDataForStream(je);
            },
            getAbandonmentStateFor: function (je, it) {
              return Te[je] && Te[je][it] ? Te[je][it].state : null;
            },
            getInitialBitrateFor: function (je) {
              if (je === P.default.TEXT) return NaN;
              let it = me.getAbrBitrateParameter("initialBitrate", je);
              if (it > 0) return it;
              let Qe = NaN;
              if (
                (Oe &&
                  Oe.hasOwnProperty("getSavedBitrateSettings") &&
                  (Qe = Oe.getSavedBitrateSettings(je)),
                !isNaN(Qe))
              )
                return Qe;
              const We = qe.getAverageThroughput(je);
              return !isNaN(We) && We > 0
                ? We
                : je === P.default.VIDEO
                ? 1e3
                : 100;
            },
            getOptimalRepresentationForBitrate: function (je, it) {
              const Qe = ke(
                je,
                !(arguments.length > 2 && arguments[2] !== void 0) ||
                  arguments[2]
              );
              if (!Qe || Qe.length === 0) return null;
              const We = Qe.reduce((Ie, Ue) =>
                Ie.bandwidth < Ue.bandwidth ? Ie : Ue
              );
              if (it <= 0) return We;
              const Ke = Qe.filter((Ie) => Ie.bitrateInKbit <= it);
              return Ke && Ke.length !== 0
                ? Ke.reduce((Ie, Ue) =>
                    Ue.absoluteIndex > Ie.absoluteIndex ? Ue : Ie
                  )
                : We;
            },
            getPossibleVoRepresentations: function (je) {
              return he(
                je,
                !(arguments.length > 1 && arguments[1] !== void 0) ||
                  arguments[1]
              );
            },
            getPossibleVoRepresentationsFilteredBySettings: ke,
            getRepresentationByAbsoluteIndex: function (je, it) {
              let Qe =
                !(arguments.length > 2 && arguments[2] !== void 0) ||
                arguments[2];
              return isNaN(je) || je < 0
                ? null
                : ke(it, Qe).find((We) => We.absoluteIndex === je);
            },
            handleNewMediaInfo: function (je) {
              ee.handleNewMediaInfo(je);
            },
            initialize: function () {
              (Fe = bg(Y).create()),
                ($e = vc(Y).create()),
                (ee = bo(Y).create({
                  dashMetrics: Re,
                  customParametersModel: we,
                  mediaPlayerModel: me,
                  settings: be,
                })),
                ee.initialize(),
                K.on(S.default.QUALITY_CHANGE_RENDERED, Ze, Q),
                K.on(S.default.METRIC_ADDED, nt, Q),
                K.on(G.default.LOADING_PROGRESS, rt, Q);
            },
            isPlayingAtLowestQuality: function (je) {
              return ke(je.mediaInfo, !0)[0].id === je.id;
            },
            isPlayingAtTopQuality: function (je) {
              if (!je) return !0;
              const it = ke(je.mediaInfo, !0);
              return it[it.length - 1].id === je.id;
            },
            registerStreamType: function (je, it) {
              const Qe = it.getStreamInfo().id;
              ne[Qe] || (ne[Qe] = {}),
                (ne[Qe][je] = it),
                Te[Qe] || (Te[Qe] = {}),
                (Te[Qe][je] = {}),
                (Te[Qe][je].state = O.ALLOW_LOAD),
                ee.getBolaState(je) === void 0 &&
                  ee.setBolaState(
                    je,
                    be.get().streaming.abr.rules.bolaRule.active && !Ve()
                  );
            },
            reset: function () {
              Se(),
                K.off(S.default.QUALITY_CHANGE_RENDERED, Ze, Q),
                K.off(S.default.METRIC_ADDED, nt, Q),
                K.off(G.default.LOADING_PROGRESS, rt, Q),
                ee && ee.reset();
            },
            setConfig: function (je) {
              je &&
                (je.streamController && (fe = je.streamController),
                je.throughputController && (qe = je.throughputController),
                je.domStorage && (Oe = je.domStorage),
                je.mediaPlayerModel && (me = je.mediaPlayerModel),
                je.customParametersModel && (we = je.customParametersModel),
                je.cmsdModel && (Me = je.cmsdModel),
                je.dashMetrics && (Re = je.dashMetrics),
                je.adapter && (se = je.adapter),
                je.videoModel && (le = je.videoModel),
                je.settings && (be = je.settings),
                je.capabilities && (ve = je.capabilities));
            },
            setPlaybackQuality: vt,
            setWindowResizeEventCalled: function (je) {},
            unRegisterStreamType: function (je, it) {
              try {
                ne[je] && ne[je][it] && delete ne[je][it],
                  Te[je] && Te[je][it] && delete Te[je][it];
              } catch {}
            },
          }),
          (q = U.getLogger(Q)),
          Se(),
          Q
        );
      }
      _g.__dashjs_factory_name = "AbrController";
      const rA = H.default.getSingletonFactory(_g);
      H.default.updateSingletonFactory(_g.__dashjs_factory_name, rA);
      var EP = rA;
      const KO = new Map([
        [P.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA, "loadedmetadata"],
        [P.default.VIDEO_ELEMENT_READY_STATES.HAVE_CURRENT_DATA, "loadeddata"],
        [P.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA, "canplay"],
        [
          P.default.VIDEO_ELEMENT_READY_STATES.HAVE_ENOUGH_DATA,
          "canplaythrough",
        ],
      ]);
      function SP() {
        let Y, U, K, Q, q, ee, fe, ve, ne, Te, _e;
        const se = this.context,
          le = (0, X.default)(se).getInstance(),
          me = [];
        function we(he) {
          Q &&
            (arguments.length > 1 && arguments[1] !== void 0 && arguments[1]
              ? (Q.playbackRate = he)
              : ke(
                  P.default.VIDEO_ELEMENT_READY_STATES.HAVE_FUTURE_DATA,
                  () => {
                    Q.playbackRate = he;
                  }
                ));
        }
        function Me() {
          return me.length > 0;
        }
        function Oe() {
          if (Q && Me() && Q.playbackRate === 0) {
            const he = document.createEvent("Event");
            he.initEvent("waiting", !0, !1), Q.dispatchEvent(he);
          }
        }
        function Ge(he, rt) {
          Q && Q.addEventListener(he, rt);
        }
        function $e(he, rt) {
          Q && Q.removeEventListener(he, rt);
        }
        function Fe() {
          return Q ? Q.readyState : NaN;
        }
        function qe() {
          return Q ? Q.buffered : null;
        }
        function Re() {
          return Q ? Q.clientWidth : NaN;
        }
        function be() {
          return Q ? Q.clientHeight : NaN;
        }
        function Se(he, rt, Ze, nt, vt) {
          if (Q) {
            for (let ce = 0; ce < Q.textTracks.length; ce++)
              if (
                Q.textTracks[ce].kind === he &&
                (!rt || Q.textTracks[ce].label == rt) &&
                Q.textTracks[ce].language === Ze &&
                Q.textTracks[ce].isTTML === nt &&
                Q.textTracks[ce].isEmbedded === vt
              )
                return Q.textTracks[ce];
          }
          return null;
        }
        function ke(he, rt) {
          return he === P.default.VIDEO_ELEMENT_READY_STATES.HAVE_NOTHING ||
            Fe() >= he
            ? (rt(), null)
            : (function (Ze, nt) {
                const vt = () => {
                  $e(Ze, vt), nt(Ze);
                };
                return Ge(Ze, vt), { func: vt, event: Ze };
              })(KO.get(he), rt);
        }
        return (
          (Y = {
            addEventListener: Ge,
            addTextTrack: function (he, rt, Ze, nt, vt) {
              if (!Q) return null;
              let ce = Se(he, rt, Ze, nt, vt);
              return (
                ce ||
                  ((ce = Q.addTextTrack(he, rt, Ze)),
                  (ce.isEmbedded = vt),
                  (ce.isTTML = nt)),
                ce
              );
            },
            appendChild: function (he) {
              Q &&
                (Q.appendChild(he),
                he.isTTML !== void 0 &&
                  ((Q.textTracks[Q.textTracks.length - 1].isTTML = he.isTTML),
                  (Q.textTracks[Q.textTracks.length - 1].isEmbedded =
                    he.isEmbedded)));
            },
            getBufferRange: qe,
            getClientHeight: be,
            getClientWidth: Re,
            getElement: function () {
              return Q;
            },
            getEnded: function () {
              return Q ? Q.ended : null;
            },
            getPlaybackQuality: function () {
              if (!Q) return null;
              let he =
                  "webkitDroppedFrameCount" in Q &&
                  "webkitDecodedFrameCount" in Q,
                rt = null;
              return (
                "getVideoPlaybackQuality" in Q
                  ? (rt = Q.getVideoPlaybackQuality())
                  : he &&
                    (rt = {
                      droppedVideoFrames: Q.webkitDroppedFrameCount,
                      totalVideoFrames:
                        Q.webkitDroppedFrameCount + Q.webkitDecodedFrameCount,
                      creationTime: new Date(),
                    }),
                rt
              );
            },
            getPlaybackRate: function () {
              return Q ? Q.playbackRate : null;
            },
            getPlayedRanges: function () {
              return Q ? Q.played : null;
            },
            getReadyState: Fe,
            getSource: function () {
              return Q ? Q.src : null;
            },
            getTTMLRenderingDiv: function () {
              return ve;
            },
            getTextTrack: Se,
            getTextTracks: function () {
              return Q ? Q.textTracks : [];
            },
            getTime: function () {
              return Q ? (isNaN(q) ? Q.currentTime : q) : null;
            },
            getVideoElementSize: function () {
              const he =
                K.get().streaming.abr.usePixelRatioInLimitBitrateByPortal &&
                window.hasOwnProperty("devicePixelRatio")
                  ? window.devicePixelRatio
                  : 1;
              return { elementWidth: Re() * he, elementHeight: be() * he };
            },
            getVideoHeight: function () {
              return Q ? Q.videoHeight : NaN;
            },
            getVideoRelativeOffsetLeft: function () {
              if (Q) {
                const he = Q.parentNode.host || Q.parentNode;
                return he
                  ? Q.getBoundingClientRect().left -
                      he.getBoundingClientRect().left
                  : NaN;
              }
              return NaN;
            },
            getVideoRelativeOffsetTop: function () {
              if (Q) {
                const he = Q.parentNode.host || Q.parentNode;
                return he
                  ? Q.getBoundingClientRect().top -
                      he.getBoundingClientRect().top
                  : NaN;
              }
              return NaN;
            },
            getVideoWidth: function () {
              return Q ? Q.videoWidth : NaN;
            },
            getVttRenderingDiv: function () {
              return ne;
            },
            initialize: function () {
              le.on(G.default.PLAYBACK_PLAYING, Oe, this);
            },
            isPaused: function () {
              return Q ? Q.paused : null;
            },
            isSeeking: function () {
              return Q ? Q.seeking || !isNaN(q) : null;
            },
            isStalled: Me,
            pause: function () {
              Q && (Q.pause(), (Q.autoplay = !1));
            },
            play: function () {
              if (Q) {
                Q.autoplay = !0;
                const he = Q.play();
                he &&
                  he.catch &&
                  typeof Promise < "u" &&
                  he.catch((rt) => {
                    rt.name === "NotAllowedError" &&
                      le.trigger(G.default.PLAYBACK_NOT_ALLOWED),
                      U.warn(
                        `Caught pending play exception - continuing (${rt})`
                      );
                  });
              }
            },
            removeChild: function (he) {
              Q && Q.removeChild(he);
            },
            removeEventListener: $e,
            reset: function () {
              clearTimeout(_e),
                le.off(G.default.PLAYBACK_PLAYING, Oe, this),
                (me.length = 0);
            },
            setConfig: function (he) {
              he && he.settings && (K = he.settings);
            },
            setCurrentTime: function (he, rt) {
              Q &&
                (ee && ee.func && ee.event && $e(ee.event, ee.func),
                (q = he),
                (ee = ke(
                  P.default.VIDEO_ELEMENT_READY_STATES.HAVE_METADATA,
                  () => {
                    if (Q)
                      if (Q.currentTime !== q)
                        try {
                          (q = rt
                            ? (function (Ze) {
                                const nt = qe();
                                let vt = Ze,
                                  ce = 9999999999;
                                if (nt)
                                  for (let Ve = 0; Ve < nt.length; Ve++) {
                                    const je = nt.start(Ve),
                                      it = nt.end(Ve),
                                      Qe = Math.abs(je - Ze),
                                      We = Math.abs(it - Ze);
                                    if (Ze >= je && Ze <= it) return Ze;
                                    Qe < ce && ((ce = Qe), (vt = je)),
                                      We < ce && ((ce = We), (vt = it));
                                  }
                                return vt;
                              })(q)
                            : q),
                            isNaN(q) || (Q.currentTime = q),
                            (q = NaN);
                        } catch (Ze) {
                          Q.readyState === 0 &&
                            Ze.code === Ze.INVALID_STATE_ERR &&
                            (_e = setTimeout(function () {
                              (Q.currentTime = q), (q = NaN);
                            }, 400));
                        }
                      else q = NaN;
                  }
                )));
            },
            setDisableRemotePlayback: function (he) {
              Q && (Q.disableRemotePlayback = he);
            },
            setElement: function (he) {
              if (!(he == null || (he && /^(VIDEO|AUDIO)$/i.test(he.nodeName))))
                throw "element is not video or audio DOM type!";
              (Q = he), Q && (Q.preload = "auto");
            },
            setPlaybackRate: we,
            setSource: function (he) {
              Q && (he ? (Q.src = he) : (Q.removeAttribute("src"), Q.load()));
            },
            setStallState: function (he, rt) {
              var Ze;
              (Ze = he),
                rt
                  ? (function (nt) {
                      if (
                        nt !== null &&
                        Q &&
                        !Q.seeking &&
                        me.indexOf(nt) === -1 &&
                        (me.push(nt),
                        K.get().streaming.buffer.syntheticStallEvents.enabled &&
                          Q &&
                          me.length === 1 &&
                          (K.get().streaming.buffer.syntheticStallEvents
                            .ignoreReadyState ||
                            Fe() >=
                              P.default.VIDEO_ELEMENT_READY_STATES
                                .HAVE_FUTURE_DATA))
                      ) {
                        (Te = Q.playbackRate), we(0, !0);
                        const vt = document.createEvent("Event");
                        vt.initEvent("waiting", !0, !1), Q.dispatchEvent(vt);
                      }
                    })(Ze)
                  : (function (nt) {
                      let vt = me.indexOf(nt);
                      if (
                        nt !== null &&
                        (vt !== -1 && me.splice(vt, 1),
                        K.get().streaming.buffer.syntheticStallEvents.enabled &&
                          Q &&
                          !Me())
                      ) {
                        const ce = () => {
                          if (
                            (we(
                              Te || 1,
                              K.get().streaming.buffer.syntheticStallEvents
                                .ignoreReadyState
                            ),
                            !Q.paused)
                          ) {
                            const Ve = document.createEvent("Event");
                            Ve.initEvent("playing", !0, !1),
                              Q.dispatchEvent(Ve);
                          }
                        };
                        K.get().streaming.buffer.syntheticStallEvents
                          .ignoreReadyState
                          ? ce()
                          : (fe && fe.func && fe.event && $e(fe.event, fe.func),
                            (fe = ke(
                              P.default.VIDEO_ELEMENT_READY_STATES
                                .HAVE_FUTURE_DATA,
                              ce
                            )));
                      }
                    })(Ze);
            },
            setTTMLRenderingDiv: function (he) {
              (ve = he),
                (ve.style.position = "absolute"),
                (ve.style.display = "flex"),
                (ve.style.overflow = "hidden"),
                (ve.style.pointerEvents = "none"),
                (ve.style.top = 0),
                (ve.style.left = 0);
            },
            setVttRenderingDiv: function (he) {
              ne = he;
            },
            waitForReadyState: ke,
          }),
          (U = (0, E.default)(se).getInstance().getLogger(Y)),
          (K = (0, ue.default)(se).getInstance()),
          (q = NaN),
          Y
        );
      }
      SP.__dashjs_factory_name = "VideoModel";
      var ZO = H.default.getSingletonFactory(SP);
      const RP = [
          { oldKey: "dashjs_vbitrate", newKey: "dashjs_video_bitrate" },
          { oldKey: "dashjs_abitrate", newKey: "dashjs_audio_bitrate" },
          { oldKey: "dashjs_vsettings", newKey: "dashjs_video_settings" },
          { oldKey: "dashjs_asettings", newKey: "dashjs_audio_settings" },
        ],
        T_ = "dashjs_?_bitrate",
        AP = "dashjs_?_settings",
        qh = "localStorage",
        YO = "lastBitrate",
        wP = "lastMediaSettings";
      function iA(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.settings;
        let Q, q, ee;
        function fe(_e) {
          if (ee !== void 0) return ee;
          let se;
          ee = !1;
          try {
            typeof window < "u" && (se = window[_e]);
          } catch (le) {
            return q.warn("DOMStorage access denied: " + le.message), ee;
          }
          if (!se || (_e !== qh && _e !== "sessionStorage")) return ee;
          try {
            se.setItem("1", "1"), se.removeItem("1"), (ee = !0);
          } catch (le) {
            q.warn(
              "DOMStorage is supported, but cannot be used: " + le.message
            );
          }
          return ee;
        }
        function ve() {
          return Math.round(new Date().getTime() / 6e5) * 6e5;
        }
        function ne(_e, se) {
          return fe(_e) && K.get().streaming[se + "CachingInfo"].enabled;
        }
        function Te() {
          if (!K) throw new Error(P.default.MISSING_CONFIG_ERROR);
        }
        return (
          (Q = {
            getSavedBitrateSettings: function (_e) {
              if ((Te(), !K.get().streaming.lastBitrateCachingInfo.enabled))
                return NaN;
              let se = NaN;
              if (ne(qh, YO)) {
                const le = T_.replace(/\?/, _e);
                try {
                  const me = JSON.parse(localStorage.getItem(le)) || {},
                    we =
                      new Date().getTime() - parseInt(me.timestamp, 10) >=
                        K.get().streaming.lastBitrateCachingInfo.ttl || !1,
                    Me = parseFloat(me.bitrate);
                  isNaN(Me) || we
                    ? we && localStorage.removeItem(le)
                    : ((se = Me),
                      q.debug("Last saved bitrate for " + _e + " was " + Me));
                } catch {
                  return null;
                }
              }
              return se;
            },
            setSavedBitrateSettings: function (_e, se) {
              if (ne(qh, YO) && se) {
                const le = T_.replace(/\?/, _e);
                try {
                  localStorage.setItem(
                    le,
                    JSON.stringify({ bitrate: se.toFixed(3), timestamp: ve() })
                  );
                } catch (me) {
                  q.error(me.message);
                }
              }
            },
            getSavedMediaSettings: function (_e) {
              if (
                (Te(), !K.get().streaming.lastMediaSettingsCachingInfo.enabled)
              )
                return null;
              let se = null;
              if (ne(qh, wP)) {
                const le = AP.replace(/\?/, _e);
                try {
                  const me = JSON.parse(localStorage.getItem(le)) || {},
                    we =
                      new Date().getTime() - parseInt(me.timestamp, 10) >=
                        K.get().streaming.lastMediaSettingsCachingInfo.ttl ||
                      !1;
                  (se = me.settings),
                    we && (localStorage.removeItem(le), (se = null));
                } catch {
                  return null;
                }
              }
              return se;
            },
            setSavedMediaSettings: function (_e, se) {
              if (ne(qh, wP)) {
                const le = AP.replace(/\?/, _e);
                try {
                  localStorage.setItem(
                    le,
                    JSON.stringify({ settings: se, timestamp: ve() })
                  );
                } catch (me) {
                  q.error(me.message);
                }
              }
            },
          }),
          (q = (0, E.default)(U).getInstance().getLogger(Q)),
          fe(qh) &&
            RP.forEach((_e) => {
              const se = localStorage.getItem(_e.oldKey);
              if (se) {
                localStorage.removeItem(_e.oldKey);
                try {
                  localStorage.setItem(_e.newKey, se);
                } catch (le) {
                  q.error(le.message);
                }
              }
            }),
          Q
        );
      }
      iA.__dashjs_factory_name = "DOMStorage";
      var QO = H.default.getSingletonFactory(iA),
        JO = n(8986);
      function kP() {
        const Y = this.context;
        let U, K, Q, q, ee, fe, ve, ne, Te, _e, se, le;
        function me(Ge, $e, Fe, qe) {
          let Re = null;
          const be = Ge ? le.resolve(Ge.path) : null,
            Se = qe || {
              init: !0,
              url: be ? be.url : void 0,
              range: { start: 0, end: 1500 },
              searching: !1,
              bytesLoaded: 0,
              bytesToLoad: 1500,
              mediaType: $e,
              representation: Ge,
            };
          K.debug("Start searching for initialization.");
          const ke = Oe(Se);
          ve.load({
            request: ke,
            success: function (he) {
              if (
                ((Se.bytesLoaded = Se.range.end),
                (Re = q.findInitRange(he)),
                !Re)
              )
                return (
                  (Se.range.end = Se.bytesLoaded + Se.bytesToLoad),
                  me(Ge, $e, Fe, Se)
                );
              (Ge.range = Re), Fe(Ge);
            },
            error: function () {
              Fe(Ge);
            },
          }),
            K.debug("Perform init search: " + Se.url);
        }
        function we(Ge, $e, Fe, qe, Re, be) {
          if (Fe && (Fe.start === void 0 || Fe.end === void 0)) {
            const vt = Fe ? Fe.toString().split("-") : null;
            Fe = vt
              ? { start: parseFloat(vt[0]), end: parseFloat(vt[1]) }
              : null;
          }
          Re = Re || Me;
          let Se = null,
            ke = null;
          const he = !!Fe,
            rt = Ge ? le.resolve(Ge.path) : null,
            Ze = {
              init: !1,
              url: rt ? rt.url : void 0,
              range: he ? Fe : { start: 0, end: 1500 },
              searching: !he,
              bytesLoaded: be ? be.bytesLoaded : 0,
              bytesToLoad: 1500,
              mediaType: $e,
              representation: Ge,
            },
            nt = Oe(Ze);
          ve.load({
            request: nt,
            success: function (vt) {
              const ce = Ze.bytesToLoad,
                Ve = vt.byteLength;
              if (
                ((Ze.bytesLoaded = Ze.range.end - Ze.range.start),
                (Se = q.parse(vt)),
                (ke = Se.getBox("sidx")),
                ke && ke.isComplete)
              ) {
                const je = ke.references;
                let it, Qe;
                if (
                  (je != null &&
                    je.length > 0 &&
                    (it = je[0].reference_type === 1),
                  it)
                ) {
                  let We, Ke, Ie, Ue, at;
                  K.debug("Initiate multiple SIDX load."),
                    (Ze.range.end = Ze.range.start + ke.size);
                  let ft = [],
                    Rt = 0,
                    an = (ke.offset || Ze.range.start) + ke.size;
                  const tn = function (fn) {
                    fn
                      ? ((ft = ft.concat(fn)),
                        Rt++,
                        Rt >= Ke &&
                          (ft.sort(function (nr, Bn) {
                            return nr.startTime - Bn.startTime < 0 ? -1 : 0;
                          }),
                          Re(ft, Ge, qe)))
                      : Re(null, Ge, qe);
                  };
                  for (We = 0, Ke = je.length; We < Ke; We++)
                    (Ie = an),
                      (Ue = an + je[We].referenced_size - 1),
                      (an += je[We].referenced_size),
                      (at = { start: Ie, end: Ue }),
                      we(Ge, $e, at, qe, tn, Ze);
                } else
                  K.debug(
                    "Parsing segments from SIDX. representation " +
                      $e +
                      " - id: " +
                      Ge.id +
                      " for range : " +
                      Ze.range.start +
                      " - " +
                      Ze.range.end
                  ),
                    (Qe = (function (We, Ke) {
                      const Ie = We.references,
                        Ue = Ie.length,
                        at = We.timescale;
                      let ft = We.earliest_presentation_time,
                        Rt =
                          Ke.range.start +
                          We.offset +
                          We.first_offset +
                          We.size;
                      const an = [];
                      let tn, fn, nr, Bn;
                      for (let wr = 0; wr < Ue; wr++)
                        (nr = Ie[wr].subsegment_duration),
                          (Bn = Ie[wr].referenced_size),
                          (tn = new Tr()),
                          (tn.duration = nr),
                          (tn.startTime = ft),
                          (tn.timescale = at),
                          (fn = Rt + Bn - 1),
                          (tn.mediaRange = Rt + "-" + fn),
                          an.push(tn),
                          (ft += nr),
                          (Rt += Bn);
                      return an;
                    })(ke, Ze)),
                    Re(Qe, Ge, qe);
              } else {
                if (ke)
                  (Ze.range.start = ke.offset || Ze.range.start),
                    (Ze.range.end = Ze.range.start + (ke.size || ce));
                else {
                  if (Ve < Ze.bytesLoaded) return void Re(null, Ge, qe);
                  {
                    const je = Se.getLastBox();
                    je && je.size
                      ? ((Ze.range.start = je.offset + je.size),
                        (Ze.range.end = Ze.range.start + ce))
                      : (Ze.range.end += ce);
                  }
                }
                we(Ge, $e, Ze.range, qe, null, Ze);
              }
            },
            error: function () {
              Re(null, Ge, qe);
            },
          }),
            K.debug(
              `Perform SIDX load for type ${$e} : ${Ze.url} with range ${Ze.range.start} - ${Ze.range.end}`
            );
        }
        function Me(Ge, $e, Fe) {
          Fe({
            segments: Ge,
            representation: $e,
            error: Ge
              ? void 0
              : new ot.default(
                  ne.SEGMENT_BASE_LOADER_ERROR_CODE,
                  ne.SEGMENT_BASE_LOADER_ERROR_MESSAGE
                ),
          });
        }
        function Oe(Ge) {
          if (!Ge.url) return;
          const $e = new De();
          return $e.setInfo(Ge), $e;
        }
        return (
          (U = {
            setConfig: function (Ge) {
              Ge.baseURLController && (le = Ge.baseURLController),
                Ge.dashMetrics && (ee = Ge.dashMetrics),
                Ge.mediaPlayerModel && (fe = Ge.mediaPlayerModel),
                Ge.errHandler && (Q = Ge.errHandler),
                Ge.boxParser && (q = Ge.boxParser),
                Ge.debug && (K = Ge.debug.getLogger(U)),
                Ge.errors && (ne = Ge.errors),
                Ge.urlUtils && (se = Ge.urlUtils),
                Ge.constants && (Te = Ge.constants),
                Ge.dashConstants && (_e = Ge.dashConstants);
            },
            initialize: function () {
              ve = Wh(Y).create({
                errHandler: Q,
                dashMetrics: ee,
                mediaPlayerModel: fe,
                boxParser: q,
                errors: ne,
                urlUtils: se,
                constants: Te,
                dashConstants: _e,
              });
            },
            loadInitialization: function (Ge, $e) {
              return new Promise((Fe) => {
                me(Ge, $e, Fe);
              });
            },
            loadSegments: function (Ge, $e, Fe) {
              return new Promise((qe) => {
                we(Ge, $e, Fe, qe);
              });
            },
            reset: function () {
              ve && (ve.abort(), (ve = null));
            },
          }),
          U
        );
      }
      kP.__dashjs_factory_name = "SegmentBaseLoader";
      var qO = H.default.getSingletonFactory(kP);
      function IP(Y) {
        let U;
        Y = Y || {};
        let K = new DataView(Y.data),
          Q = 0;
        function q(fe, ve) {
          let ne,
            Te,
            _e = !0,
            se = 0;
          if (
            (ve === void 0 && (ve = !1),
            fe.tag > 16777215
              ? (K.getUint32(Q) !== fe.tag && (_e = !1), (se = 4))
              : fe.tag > 65535
              ? ((ne = K.getUint16(Q)),
                (Te = K.getUint8(Q + 2)),
                256 * ne + Te !== fe.tag && (_e = !1),
                (se = 3))
              : fe.tag > 255
              ? (K.getUint16(Q) !== fe.tag && (_e = !1), (se = 2))
              : (K.getUint8(Q) !== fe.tag && (_e = !1), (se = 1)),
            !_e && fe.required && !ve)
          )
            throw new Error("required tag not found");
          return _e && (Q += se), _e;
        }
        function ee(fe) {
          let ve = 1,
            ne = 128,
            Te = -1,
            _e = 0,
            se = K.getUint8(Q),
            le = 0;
          for (le = 0; le < 8; le += 1) {
            if ((se & ne) === ne) {
              (_e = fe === void 0 ? se & ~ne : se), (Te = le);
              break;
            }
            ne >>= 1;
          }
          for (le = 0; le < Te; le += 1, ve += 1)
            _e = (_e << 8) | (255 & K.getUint8(Q + ve));
          return (Q += ve), _e;
        }
        return (
          (U = {
            getPos: function () {
              return Q;
            },
            setPos: function (fe) {
              Q = fe;
            },
            consumeTag: q,
            consumeTagAndSize: function (fe, ve) {
              let ne = q(fe, ve);
              return ne && ee(), ne;
            },
            parseTag: function (fe) {
              let ve;
              return q(fe), (ve = ee()), U[fe.parse](ve);
            },
            skipOverElement: function (fe, ve) {
              let ne,
                Te = q(fe, ve);
              return Te && ((ne = ee()), (Q += ne)), Te;
            },
            getMatroskaCodedNum: ee,
            getMatroskaFloat: function (fe) {
              let ve;
              switch (fe) {
                case 4:
                  (ve = K.getFloat32(Q)), (Q += 4);
                  break;
                case 8:
                  (ve = K.getFloat64(Q)), (Q += 8);
              }
              return ve;
            },
            getMatroskaUint: function (fe) {
              if (fe > 4)
                return (function (ne) {
                  const Te = Math.floor(Number.MAX_SAFE_INTEGER / 256);
                  let _e = 0;
                  for (let se = 0; se < ne; se += 1) {
                    if (_e > Te)
                      throw new Error("Value exceeds safe integer limit");
                    _e *= 256;
                    const le = K.getUint8(Q + se);
                    if (_e > Number.MAX_SAFE_INTEGER - le)
                      throw new Error("Value exceeds safe integer limit");
                    _e += le;
                  }
                  return (Q += ne), _e;
                })(fe);
              let ve = 0;
              for (let ne = 0; ne < fe; ne += 1)
                (ve <<= 8), (ve |= 255 & K.getUint8(Q + ne));
              return (Q += fe), ve >>> 0;
            },
            moreData: function () {
              return Q < K.byteLength;
            },
          }),
          U
        );
      }
      IP.__dashjs_factory_name = "EBMLParser";
      var E_ = H.default.getClassFactory(IP);
      function S_() {
        const Y = this.context;
        let U, K, Q, q, ee, fe, ve, ne, Te;
        function _e(se) {
          const le = new De();
          return le.setInfo(se), le;
        }
        return (
          (U = {
            setConfig: function (se) {
              if (
                !(
                  se.baseURLController &&
                  se.dashMetrics &&
                  se.mediaPlayerModel &&
                  se.errHandler
                )
              )
                throw new Error(P.default.MISSING_CONFIG_ERROR);
              (Te = se.baseURLController),
                (ee = se.dashMetrics),
                (fe = se.mediaPlayerModel),
                (q = se.errHandler),
                (ne = se.errors),
                (K = se.debug.getLogger(U));
            },
            initialize: function () {
              ve = Wh(Y).create({
                errHandler: q,
                dashMetrics: ee,
                mediaPlayerModel: fe,
                errors: ne,
              });
            },
            loadInitialization: function (se, le) {
              return new Promise((me) => {
                let we = null,
                  Me = se ? Te.resolve(se.path) : null,
                  Oe = se ? se.range.split("-") : null,
                  Ge = {
                    range: {
                      start: Oe ? parseFloat(Oe[0]) : null,
                      end: Oe ? parseFloat(Oe[1]) : null,
                    },
                    request: we,
                    url: Me ? Me.url : void 0,
                    init: !0,
                    mediaType: le,
                  };
                K.info("Start loading initialization."),
                  (we = _e(Ge)),
                  ve.load({
                    request: we,
                    success: function () {
                      me(se);
                    },
                    error: function () {
                      me(se);
                    },
                  }),
                  K.debug("Perform init load: " + Ge.url);
              });
            },
            loadSegments: function (se, le, me) {
              return new Promise((we) => {
                let Me = null,
                  Oe = se ? Te.resolve(se.path) : null,
                  Ge = Oe ? Oe.url : void 0;
                (Me = _e({
                  bytesLoaded: 0,
                  bytesToLoad: 8192,
                  range: { start: 0, end: 8192 },
                  request: Me,
                  url: Ge,
                  init: !1,
                  mediaType: le,
                  representation: se,
                })),
                  K.debug("Parsing ebml header"),
                  ve.load({
                    request: Me,
                    success: function ($e) {
                      (function (Fe, qe, Re, be) {
                        if (!Fe || Fe.byteLength === 0) return void be(null);
                        let Se,
                          ke,
                          he,
                          rt,
                          Ze = E_(Y).create({ data: Fe }),
                          nt = Re ? Re.split("-") : null,
                          vt = null,
                          ce = {
                            url: qe,
                            range: {
                              start: nt ? parseFloat(nt[0]) : null,
                              end: nt ? parseFloat(nt[1]) : null,
                            },
                            request: vt,
                          };
                        for (
                          K.debug("Parse EBML header: " + ce.url),
                            Ze.skipOverElement(Q.EBML),
                            Ze.consumeTag(Q.Segment),
                            he = Ze.getMatroskaCodedNum(),
                            he += Ze.getPos(),
                            rt = Ze.getPos();
                          Ze.moreData() &&
                          !Ze.consumeTagAndSize(Q.Segment.Info, !0);

                        )
                          if (
                            !(
                              Ze.skipOverElement(Q.Segment.SeekHead, !0) ||
                              Ze.skipOverElement(Q.Segment.Tracks, !0) ||
                              Ze.skipOverElement(Q.Segment.Cues, !0) ||
                              Ze.skipOverElement(Q.Void, !0)
                            )
                          )
                            throw new Error("no valid top level element found");
                        for (; Se === void 0; ) {
                          let Ve = Ze.getMatroskaCodedNum(!0),
                            je = Ze.getMatroskaCodedNum();
                          Ve === Q.Segment.Info.Duration.tag
                            ? (Se = Ze[Q.Segment.Info.Duration.parse](je))
                            : Ze.setPos(Ze.getPos() + je);
                        }
                        (vt = _e(ce)),
                          ve.load({
                            request: vt,
                            success: function (Ve) {
                              (ke = (function (je, it, Qe, We) {
                                let Ke, Ie, Ue, at, ft, Rt, an, tn;
                                for (
                                  Ie = (function (fn) {
                                    let nr,
                                      Bn,
                                      wr = [],
                                      hr = E_(Y).create({ data: fn });
                                    for (
                                      hr.consumeTagAndSize(Q.Segment.Cues);
                                      hr.moreData() &&
                                      hr.consumeTagAndSize(
                                        Q.Segment.Cues.CuePoint,
                                        !0
                                      );

                                    ) {
                                      for (
                                        nr = {},
                                          nr.CueTime = hr.parseTag(
                                            Q.Segment.Cues.CuePoint.CueTime
                                          ),
                                          nr.CueTracks = [];
                                        hr.moreData() &&
                                        hr.consumeTag(
                                          Q.Segment.Cues.CuePoint
                                            .CueTrackPositions,
                                          !0
                                        );

                                      ) {
                                        const pi = hr.getMatroskaCodedNum(),
                                          Rn = hr.getPos();
                                        if (
                                          ((Bn = {}),
                                          (Bn.Track = hr.parseTag(
                                            Q.Segment.Cues.CuePoint
                                              .CueTrackPositions.CueTrack
                                          )),
                                          Bn.Track === 0)
                                        )
                                          throw new Error(
                                            "Cue track cannot be 0"
                                          );
                                        (Bn.ClusterPosition = hr.parseTag(
                                          Q.Segment.Cues.CuePoint
                                            .CueTrackPositions
                                            .CueClusterPosition
                                        )),
                                          nr.CueTracks.push(Bn),
                                          hr.setPos(Rn + pi);
                                      }
                                      if (nr.CueTracks.length === 0)
                                        throw new Error(
                                          "Mandatory cuetrack not found"
                                        );
                                      wr.push(nr);
                                    }
                                    if (wr.length === 0)
                                      throw new Error(
                                        "mandatory cuepoint not found"
                                      );
                                    return wr;
                                  })(je),
                                    Ue = [],
                                    ft = 0,
                                    Rt = Ie.length;
                                  ft < Rt;
                                  ft += 1
                                )
                                  (at = new Tr()),
                                    (Ke = 0),
                                    (Ke =
                                      ft < Ie.length - 1
                                        ? Ie[ft + 1].CueTime - Ie[ft].CueTime
                                        : We - Ie[ft].CueTime),
                                    (at.duration = Ke),
                                    (at.startTime = Ie[ft].CueTime),
                                    (at.timescale = 1e3),
                                    (an =
                                      Ie[ft].CueTracks[0].ClusterPosition + it),
                                    (tn =
                                      ft < Ie.length - 1
                                        ? Ie[ft + 1].CueTracks[0]
                                            .ClusterPosition +
                                          it -
                                          1
                                        : Qe - 1),
                                    (at.mediaRange = an + "-" + tn),
                                    Ue.push(at);
                                return (
                                  K.debug(
                                    "Parsed cues: " + Ue.length + " cues."
                                  ),
                                  Ue
                                );
                              })(Ve, rt, he, Se)),
                                be(ke);
                            },
                            error: function () {
                              K.error("Download Error: Cues " + ce.url),
                                be(null);
                            },
                          }),
                          K.debug(
                            "Perform cues load: " +
                              ce.url +
                              " bytes=" +
                              ce.range.start +
                              "-" +
                              ce.range.end
                          );
                      })($e, Ge, me, function (Fe) {
                        we({
                          segments: Fe,
                          representation: se,
                          error: Fe
                            ? void 0
                            : new ot.default(
                                ne.SEGMENT_BASE_LOADER_ERROR_CODE,
                                ne.SEGMENT_BASE_LOADER_ERROR_MESSAGE
                              ),
                        });
                      });
                    },
                    error: function () {
                      we({
                        representation: se,
                        error: new ot.default(
                          ne.SEGMENT_BASE_LOADER_ERROR_CODE,
                          ne.SEGMENT_BASE_LOADER_ERROR_MESSAGE
                        ),
                      });
                    },
                  });
              });
            },
            reset: function () {
              ve && (ve.abort(), (ve = null));
            },
          }),
          (Q = {
            EBML: { tag: 440786851, required: !0 },
            Segment: {
              tag: 408125543,
              required: !0,
              SeekHead: { tag: 290298740, required: !0 },
              Info: {
                tag: 357149030,
                required: !0,
                TimecodeScale: {
                  tag: 2807729,
                  required: !0,
                  parse: "getMatroskaUint",
                },
                Duration: {
                  tag: 17545,
                  required: !0,
                  parse: "getMatroskaFloat",
                },
              },
              Tracks: { tag: 374648427, required: !0 },
              Cues: {
                tag: 475249515,
                required: !0,
                CuePoint: {
                  tag: 187,
                  required: !0,
                  CueTime: { tag: 179, required: !0, parse: "getMatroskaUint" },
                  CueTrackPositions: {
                    tag: 183,
                    required: !0,
                    CueTrack: {
                      tag: 247,
                      required: !0,
                      parse: "getMatroskaUint",
                    },
                    CueClusterPosition: {
                      tag: 241,
                      required: !0,
                      parse: "getMatroskaUint",
                    },
                  },
                },
              },
            },
            Void: { tag: 236, required: !0 },
          }),
          U
        );
      }
      S_.__dashjs_factory_name = "WebmSegmentBaseLoader";
      var eG = H.default.getSingletonFactory(S_);
      function DP(Y) {
        Y = Y || {};
        const U = this.context,
          K = Y.eventBus,
          Q = Y.events,
          q = Y.dashMetrics,
          ee = Y.mediaPlayerModel,
          fe = Y.errHandler,
          ve = Y.baseURLController,
          ne = Y.debug,
          Te = Y.boxParser,
          _e = Y.errors;
        let se, le, me;
        function we(Me) {
          return (Me ? Me.split("/")[1] : "").toLowerCase() === "webm";
        }
        return (
          (se = {
            initialize: function () {
              le.initialize(), me.initialize();
            },
            getSegmentBaseInitSegment: function (Me) {
              return we(Me.representation.mimeType)
                ? me.loadInitialization(Me.representation, Me.mediaType)
                : le.loadInitialization(Me.representation, Me.mediaType);
            },
            getSegmentList: function (Me) {
              return we(Me.mimeType)
                ? me.loadSegments(
                    Me.representation,
                    Me.mediaType,
                    Me.representation ? Me.representation.indexRange : null
                  )
                : le.loadSegments(
                    Me.representation,
                    Me.mediaType,
                    Me.representation ? Me.representation.indexRange : null
                  );
            },
            reset: function () {
              le.reset(), me.reset();
            },
          }),
          (le = qO(U).getInstance()),
          (me = eG(U).getInstance()),
          le.setConfig({
            baseURLController: ve,
            dashMetrics: q,
            mediaPlayerModel: ee,
            errHandler: fe,
            eventBus: K,
            events: Q,
            errors: _e,
            debug: ne,
            boxParser: Te,
          }),
          me.setConfig({
            baseURLController: ve,
            dashMetrics: q,
            mediaPlayerModel: ee,
            errHandler: fe,
            eventBus: K,
            events: Q,
            errors: _e,
            debug: ne,
          }),
          se
        );
      }
      DP.__dashjs_factory_name = "SegmentBaseController";
      var tG = H.default.getSingletonFactory(DP),
        aA = class {
          constructor() {
            (this.accessibility = null),
              (this.adaptationSetSwitchingCompatibleIds = []),
              (this.audioChannelConfiguration = null),
              (this.bitrateList = null),
              (this.codec = null),
              (this.contentProtection = null),
              (this.essentialProperties = []),
              (this.id = null),
              (this.index = null),
              (this.isEmbedded = null),
              (this.isFragmented = null),
              (this.isText = !1),
              (this.labels = null),
              (this.lang = null),
              (this.mimeType = null),
              (this.normalizedKeyIds = new Set()),
              (this.representationCount = 0),
              (this.roles = null),
              (this.segmentAlignment = !1),
              (this.selectionPriority = 1),
              (this.streamInfo = null),
              (this.subSegmentAlignment = !1),
              (this.supplementalProperties = []),
              (this.type = null),
              (this.viewpoint = null);
          }
        },
        oA = class {
          constructor() {
            (this.id = null),
              (this.index = null),
              (this.start = NaN),
              (this.duration = NaN),
              (this.manifestInfo = null),
              (this.isLast = !0),
              (this.isEncrypted = !1);
          }
        };
      function R_() {
        let Y, U;
        const K = this.context;
        return (
          (Y = {
            getIsPatch: function (Q) {
              return (Q && Q.hasOwnProperty(I.default.ORIGINAL_MPD_ID)) || !1;
            },
            getMpdId: function (Q) {
              return (Q && Q[I.default.ORIGINAL_MPD_ID]) || null;
            },
            getOriginalPublishTime: function (Q) {
              return Q && Q.hasOwnProperty(I.default.ORIGINAL_PUBLISH_TIME)
                ? new Date(Q[I.default.ORIGINAL_PUBLISH_TIME])
                : null;
            },
            getPatchOperations: function (Q) {
              return Q
                ? (Q.__children || [])
                    .map((q) => {
                      const ee = q.tagName;
                      if (ee !== "add" && ee !== "remove" && ee !== "replace")
                        return (
                          U.warn(`Ignoring node of invalid action: ${ee}`), null
                        );
                      let fe = q.sel;
                      if (ee === "add" && q.type) {
                        if (!q.type.startsWith("@"))
                          return (
                            U.warn(
                              `Ignoring add action for prefixed namespace declaration: ${q.type}=${q.__text}`
                            ),
                            null
                          );
                        fe = `${fe}/${q.type}`;
                      }
                      let ve = new (class {
                        constructor(_e) {
                          (this.valid = _e[0] == "/"),
                            (this.path = _e
                              .split("/")
                              .filter((se) => se.length !== 0)
                              .map((se) => {
                                let le = { name: se },
                                  me = se.indexOf("[");
                                if (me != -1) {
                                  le.name = se.substring(0, me);
                                  let we = se.substring(me + 1, se.length - 1);
                                  this.valid =
                                    this.valid && we.indexOf("[") == -1;
                                  let Me = we.indexOf("=");
                                  Me != -1
                                    ? ((le.attribute = {
                                        name: we.substring(1, Me),
                                        value: we.substring(Me + 1),
                                      }),
                                      ["'", '"'].indexOf(
                                        le.attribute.value[0]
                                      ) != -1 &&
                                        (le.attribute.value =
                                          le.attribute.value.substring(
                                            1,
                                            le.attribute.value.length - 1
                                          )))
                                    : (le.position = parseInt(we, 10) - 1);
                                }
                                return le;
                              }));
                        }
                        isValid() {
                          return this.valid;
                        }
                        findsElement() {
                          return !this.findsAttribute();
                        }
                        findsAttribute() {
                          return this.path[
                            this.path.length - 1
                          ].name.startsWith("@");
                        }
                        findsTextReplace() {
                          return (
                            this.path[this.path.length - 1].name === "text()"
                          );
                        }
                        getMpdTarget(_e, se) {
                          let le = null,
                            me = _e,
                            we = 1,
                            Me = "MPD";
                          for (; we < this.path.length && me !== null; ) {
                            le = me;
                            let Oe = this.path[we];
                            if (
                              ((Me = Oe.name),
                              we !== this.path.length - 1 ||
                                (!Me.startsWith("@") && Me !== "text()"))
                            ) {
                              let Ge = le[Me] || [];
                              if (
                                (Ge.length === 0 && le[Me] && Ge.push(le[Me]),
                                Oe.position)
                              )
                                me = Ge[Oe.position] || null;
                              else if (Oe.attribute) {
                                let $e = Oe.attribute;
                                me =
                                  Ge.filter(
                                    (Fe) => Fe[$e.name] == $e.value
                                  )[0] || null;
                              } else me = Array.isArray(Ge) ? Ge[0] : Ge;
                            }
                            we++;
                          }
                          return me === null
                            ? null
                            : Me.startsWith("@")
                            ? { name: Me.substring(1), leaf: me, target: me }
                            : Me === "text()"
                            ? { name: "__text", leaf: me, target: me }
                            : { name: Me, leaf: me, target: se ? le : me };
                        }
                      })(fe);
                      if (!ve.isValid())
                        return (
                          U.warn(
                            `Ignoring action with invalid selector: ${ee} - ${fe}`
                          ),
                          null
                        );
                      let ne = null;
                      ve.findsAttribute() || ve.findsTextReplace()
                        ? (ne = q.__text || "")
                        : ee !== "remove" &&
                          (ne = q.__children.reduce((_e, se) => {
                            let le = se.tagName;
                            return (
                              le !== "#text" &&
                                ((_e[le] = _e[le] || []), _e[le].push(se)),
                              _e
                            );
                          }, {}));
                      let Te = new (class {
                        constructor(_e, se, le) {
                          (this.action = _e),
                            (this.xpath = se),
                            (this.value = le),
                            (this.position = null);
                        }
                        getMpdTarget(_e) {
                          let se =
                            this.action === "remove" ||
                            this.action === "replace" ||
                            this.position === "before" ||
                            this.position === "after";
                          return this.xpath.getMpdTarget(_e, se);
                        }
                      })(ee, ve, ne);
                      return ee === "add" && (Te.position = q.pos), Te;
                    })
                    .filter((q) => !!q)
                : [];
            },
            getPublishTime: function (Q) {
              return Q && Q.hasOwnProperty(I.default.PUBLISH_TIME)
                ? new Date(Q[I.default.PUBLISH_TIME])
                : null;
            },
          }),
          (U = (0, E.default)(K).getInstance().getLogger(Y)),
          Y
        );
      }
      R_.__dashjs_factory_name = "PatchManifestModel";
      var A_ = H.default.getSingletonFactory(R_);
      function Fd(Y) {
        let U = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
        if (typeof TextDecoder < "u") {
          const ne = new TextDecoder("utf-8").decode(Y);
          if (U) {
            const Te = ne.indexOf("\0");
            return Te !== -1 ? ne.substring(0, Te) : ne;
          }
          return ne.replace(/\0/g, "");
        }
        const K = Y.length;
        let Q,
          q,
          ee,
          fe = "",
          ve = 0;
        for (; ve < K; ) {
          if (((Q = Y[ve++]), Q === 0 && U)) return fe;
          if (Q !== 0 && Q !== 3)
            switch (Q >> 4) {
              case 0:
              case 1:
              case 2:
              case 3:
              case 4:
              case 5:
              case 6:
              case 7:
                fe += String.fromCharCode(Q);
                break;
              case 12:
              case 13:
                (q = Y[ve++]),
                  (fe += String.fromCharCode(((31 & Q) << 6) | (63 & q)));
                break;
              case 14:
                (q = Y[ve++]),
                  (ee = Y[ve++]),
                  (fe += String.fromCharCode(
                    ((15 & Q) << 12) | ((63 & q) << 6) | (63 & ee)
                  ));
            }
        }
        return fe;
      }
      function Jv(Y) {
        return (function (U, K, Q, q) {
          const ee = (fe = U) instanceof ArrayBuffer ? fe : fe.buffer;
          var fe;
          let ve = 1;
          "BYTES_PER_ELEMENT" in q && (ve = q.BYTES_PER_ELEMENT);
          const ne =
              (le = U) &&
              le.buffer instanceof ArrayBuffer &&
              le.byteLength !== void 0 &&
              le.byteOffset !== void 0
                ? U.byteOffset
                : 0,
            Te = (ne + U.byteLength) / ve,
            _e = (ne + K) / ve,
            se = Math.floor(Math.max(0, Math.min(_e, Te)));
          var le;
          return new q(
            ee,
            se,
            Math.floor(Math.min(se + Math.max(Q, 0), Te)) - se
          );
        })(
          Y,
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
          arguments.length > 2 && arguments[2] !== void 0
            ? arguments[2]
            : 1 / 0,
          Uint8Array
        );
      }
      function f2(Y) {
        return Y.type === "PRIV"
          ? (function (U) {
              if (U.size < 2) return;
              const K = Fd(U.data, !0),
                Q = new Uint8Array(U.data.subarray(K.length + 1));
              return { key: U.type, info: K, data: Q.buffer };
            })(Y)
          : Y.type[0] === "W"
          ? (function (U) {
              if (U.type === "WXXX") {
                if (U.size < 2) return;
                let Q = 1;
                const q = Fd(U.data.subarray(Q), !0);
                Q += q.length + 1;
                const ee = Fd(U.data.subarray(Q));
                return { key: U.type, info: q, data: ee };
              }
              const K = Fd(U.data);
              return { key: U.type, info: "", data: K };
            })(Y)
          : Y.type === "APIC"
          ? (function (U) {
              const K = {
                key: U.type,
                description: "",
                data: "",
                mimeType: null,
                pictureType: null,
              };
              if (U.size < 2) return;
              if (U.data[0] !== 3)
                return void console.log(
                  "Ignore frame with unrecognized character encoding"
                );
              const Q = U.data.subarray(1).indexOf(0);
              if (Q === -1) return;
              const q = Fd(Jv(U.data, 1, Q)),
                ee = U.data[2 + Q],
                fe = U.data.subarray(3 + Q).indexOf(0);
              if (fe === -1) return;
              const ve = Fd(Jv(U.data, 3 + Q, fe));
              let ne;
              return (
                (ne =
                  q === "-->"
                    ? Fd(Jv(U.data, 4 + Q + fe))
                    : (Te = U.data.subarray(4 + Q + fe)) instanceof ArrayBuffer
                    ? Te
                    : Te.byteOffset == 0 &&
                      Te.byteLength == Te.buffer.byteLength
                    ? Te.buffer
                    : new Uint8Array(Te).buffer),
                (K.mimeType = q),
                (K.pictureType = ee),
                (K.description = ve),
                (K.data = ne),
                K
              );
              var Te;
            })(Y)
          : (function (U) {
              if (U.size < 2) return;
              if (U.type === "TXXX") {
                let Q = 1;
                const q = Fd(U.data.subarray(Q), !0);
                Q += q.length + 1;
                const ee = Fd(U.data.subarray(Q));
                return { key: U.type, info: q, data: ee };
              }
              const K = Fd(U.data.subarray(1));
              return { key: U.type, info: "", data: K };
            })(Y);
      }
      function w_(Y, U) {
        let K = 0;
        return (
          (K = (127 & Y[U]) << 21),
          (K |= (127 & Y[U + 1]) << 14),
          (K |= (127 & Y[U + 2]) << 7),
          (K |= 127 & Y[U + 3]),
          K
        );
      }
      function sA(Y) {
        const U = String.fromCharCode(Y[0], Y[1], Y[2], Y[3]),
          K = w_(Y, 4);
        return { type: U, size: K, data: Y.subarray(10, 10 + K) };
      }
      function PP(Y, U) {
        return (
          U + 10 <= Y.length &&
          Y[U] === 51 &&
          Y[U + 1] === 68 &&
          Y[U + 2] === 73 &&
          Y[U + 3] < 255 &&
          Y[U + 4] < 255 &&
          Y[U + 6] < 128 &&
          Y[U + 7] < 128 &&
          Y[U + 8] < 128 &&
          Y[U + 9] < 128
        );
      }
      function nG(Y, U) {
        return (
          U + 10 <= Y.length &&
          Y[U] === 73 &&
          Y[U + 1] === 68 &&
          Y[U + 2] === 51 &&
          Y[U + 3] < 255 &&
          Y[U + 4] < 255 &&
          Y[U + 6] < 128 &&
          Y[U + 7] < 128 &&
          Y[U + 8] < 128 &&
          Y[U + 9] < 128
        );
      }
      function lA() {
        let Y, U, K, Q, q, ee;
        const fe = this.context;
        function ve(Re, be) {
          const Se = be ? be.index : 0,
            ke = U.getAdaptationsForType(Q[Se].mpd.manifest, Se, Re);
          if (!ke || ke.length === 0) return null;
          if (ke.length > 1 && be) {
            for (let rt = 0, Ze = ke.length; rt < Ze; rt++)
              if (
                ((he = ke[rt]),
                U.getRolesForAdaptation(he).filter(function (nt) {
                  return nt.value === I.default.MAIN;
                })[0])
              )
                return ke[rt];
          }
          var he;
          return ke[0];
        }
        function ne(Re, be, Se, ke, he, rt) {
          let Ze,
            nt,
            vt,
            ce,
            Ve,
            je,
            it = [];
          if (!ke || ke.length === 0) return [];
          const Qe = U.getAdaptationsForPeriod(be);
          for (ce = 0, je = ke.length; ce < je; ce++)
            if (
              ((Ze = ke[ce]),
              (vt = U.getIndexForAdaptation(Ze, Re, Se.index)),
              (nt = Me(Qe[vt])),
              rt)
            ) {
              let We = nt.accessibility.length;
              for (Ve = 0; Ve < We; Ve++) {
                if (!nt) continue;
                let Ke = nt.accessibility[Ve];
                if (Ke.schemeIdUri === q.ACCESSIBILITY_CEA608_SCHEME)
                  if (Ke.value && Ke.value !== "") {
                    let Ie = Ke.value.split(";");
                    if (Ie[0].substring(0, 2) === "CC")
                      for (Ve = 0; Ve < Ie.length; Ve++)
                        nt || (nt = Me.call(this, Qe[vt])),
                          Oe(nt, Ie[Ve].substring(0, 3), Ie[Ve].substring(4)),
                          it.push(nt),
                          (nt = null);
                    else
                      for (Ve = 0; Ve < Ie.length; Ve++)
                        nt || (nt = Me.call(this, Qe[vt])),
                          Oe(nt, "CC" + (Ve + 1), Ie[Ve]),
                          it.push(nt),
                          (nt = null);
                  } else Oe(nt, q.CC1, "eng"), it.push(nt), (nt = null);
              }
            } else
              he === q.IMAGE
                ? ((nt.type = q.IMAGE), it.push(nt), (nt = null))
                : nt && it.push(nt);
          return it;
        }
        function Te(Re) {
          const be = _e(Re);
          return U.getRegularPeriods(be);
        }
        function _e(Re) {
          const be = le(Re);
          return U.getMpd(be);
        }
        function se() {
          Q = [];
        }
        function le(Re) {
          return Re || (Q.length > 0 ? Q[0].mpd.manifest : null);
        }
        function me(Re) {
          try {
            const be = we(Re.streamInfo, Q),
              Se = U.getAdaptationsForPeriod(be);
            return Re && Re.streamInfo && Re.streamInfo.id !== void 0 && Se
              ? Se[Re.index]
              : null;
          } catch {
            return null;
          }
        }
        function we(Re, be) {
          const Se = be.length;
          for (let ke = 0; ke < Se; ke++) {
            let he = be[ke];
            if (Re && Re.id === he.id) return he;
          }
          return null;
        }
        function Me(Re) {
          if (!Re) return null;
          let be = new aA();
          const Se =
            Re.period.mpd.manifest.Period[Re.period.index].AdaptationSet[
              Re.index
            ];
          return (
            (be.id = Re.id),
            (be.index = Re.index),
            (be.type = Re.type),
            (be.streamInfo = Ge(Re.period)),
            (be.representationCount = U.getRepresentationCount(Se)),
            (be.labels = U.getLabelsForAdaptation(Se)),
            (be.lang = U.getLanguageForAdaptation(Se)),
            (be.segmentAlignment = U.getSegmentAlignment(Se)),
            (be.subSegmentAlignment = U.getSubSegmentAlignment(Se)),
            (be.viewpoint = U.getViewpointForAdaptation(Se)),
            (be.accessibility = U.getAccessibilityForAdaptation(Se)),
            be.accessibility.filter(function (ke) {
              if (
                ke.schemeIdUri &&
                ke.schemeIdUri.search("cea-608") >= 0 &&
                ee !== void 0
              )
                return !0;
            })[0] && (be.embeddedCaptions = !0),
            (be.audioChannelConfiguration =
              U.getAudioChannelConfigurationForAdaptation(Se)),
            be.audioChannelConfiguration.length === 0 &&
              Se.Representation &&
              Se.Representation.length > 0 &&
              (be.audioChannelConfiguration =
                U.getAudioChannelConfigurationForRepresentation(
                  Se.Representation[0]
                )),
            (be.roles = U.getRolesForAdaptation(Se)),
            (be.codec = U.getCodec(Se)),
            (be.mimeType = U.getMimeType(Se)),
            (be.contentProtection = U.getContentProtectionByAdaptation(Se)),
            (be.bitrateList = U.getBitrateListForAdaptation(Se)),
            (be.selectionPriority = U.getSelectionPriority(Se)),
            be.contentProtection &&
              be.contentProtection.length > 0 &&
              ((be.contentProtection = (function (ke, he) {
                if (!ke || !ke.length || !he) return ke;
                const rt = U.getContentProtectionByManifest(he);
                if (!rt || !rt.length) return ke;
                const Ze = rt.reduce(
                  (nt, vt) => (vt.refId && nt.set(vt.refId, vt), nt),
                  new Map()
                );
                return ke.map((nt) => {
                  if (nt.ref) {
                    const vt = Ze.get(nt.ref);
                    vt && nt.mergeAttributesFromReference(vt);
                  }
                  return nt;
                });
              })(be.contentProtection, Re.period.mpd.manifest)),
              (be.contentProtection = (function (ke) {
                const he = ke
                  .map((rt) => rt.cencDefaultKid)
                  .filter((rt) => rt !== null);
                if (he.length) {
                  const rt = he[0];
                  ke.forEach((Ze) => {
                    Ze.keyId = rt;
                  });
                }
                return ke;
              })(be.contentProtection)),
              (be.normalizedKeyIds = (function (ke) {
                const he = new Set();
                return (
                  ke.forEach((rt) => {
                    rt.cencDefaultKid &&
                      typeof rt.cencDefaultKid == "string" &&
                      he.add(rt.cencDefaultKid.replace(/-/g, "").toLowerCase());
                  }),
                  he
                );
              })(be.contentProtection))),
            (be.isText = U.getIsText(Se)),
            (be.essentialProperties =
              U.getCombinedEssentialPropertiesForAdaptationSet(Se)),
            (be.supplementalProperties =
              U.getCombinedSupplementalPropertiesForAdaptationSet(Se)),
            (be.isFragmented = U.getIsFragmented(Se)),
            (be.isEmbedded = !1),
            (be.adaptationSetSwitchingCompatibleIds = (function (ke) {
              if (!ke || !ke.supplementalProperties) return [];
              let he = [];
              const rt = ke.supplementalProperties.filter(
                (Ze) =>
                  Ze.schemeIdUri ===
                  I.default.ADAPTATION_SET_SWITCHING_SCHEME_ID_URI
              );
              return (
                rt &&
                  rt.length > 0 &&
                  (he = rt[0].value
                    .toString()
                    .split(",")
                    .map((Ze) => Ze)),
                he
              );
            })(be)),
            be
          );
        }
        function Oe(Re, be, Se) {
          (Re.id = be),
            (Re.index = 100 + parseInt(be.substring(2, 3))),
            (Re.type = q.TEXT),
            (Re.codec = "cea-608-in-SEI"),
            (Re.isEmbedded = !0),
            (Re.isFragmented = !1),
            (Re.lang = Ja(Se)),
            (Re.roles = [
              { schemeIdUri: "urn:mpeg:dash:role:2011", value: "caption" },
            ]);
        }
        function Ge(Re) {
          let be = new oA();
          return (
            (be.id = Re.id),
            (be.index = Re.index),
            (be.start = Re.start),
            (be.duration = Re.duration),
            (be.manifestInfo = (function (Se) {
              let ke = new (class {
                constructor() {
                  (this.dvrWindowSize = NaN),
                    (this.loadedTime = null),
                    (this.availableFrom = null),
                    (this.minBufferTime = NaN),
                    (this.duration = NaN),
                    (this.isDynamic = !1),
                    (this.maxFragmentDuration = null),
                    (this.serviceDescriptions = []),
                    (this.protocol = null);
                }
              })();
              return (
                (ke.dvrWindowSize = Se.timeShiftBufferDepth),
                (ke.loadedTime = Se.manifest.loadedTime),
                (ke.availableFrom = Se.availabilityStartTime),
                (ke.minBufferTime = Se.manifest.minBufferTime),
                (ke.maxFragmentDuration = Se.maxSegmentDuration),
                (ke.duration = U.getDuration(Se.manifest)),
                (ke.isDynamic = U.getIsDynamic(Se.manifest)),
                (ke.serviceDescriptions = U.getServiceDescriptions(
                  Se.manifest
                )),
                (ke.protocol = Se.manifest.protocol),
                ke
              );
            })(Re.mpd)),
            (be.isLast =
              Re.mpd.manifest.Period.length === 1 ||
              Math.abs(be.start + be.duration - be.manifestInfo.duration) < 1),
            (be.isEncrypted = Re.isEncrypted),
            be
          );
        }
        function $e() {
          if (!q)
            throw new Error("setConfig function has to be called previously");
        }
        function Fe(Re) {
          return Q.length > 0 ? Q[0].mpd.manifest.Period[Re] : null;
        }
        function qe(Re, be, Se) {
          let ke, he, rt, Ze, nt, vt;
          if (Re) {
            for (he = Re.AdaptationSet, nt = 0; nt < he.length; nt += 1)
              for (
                ke = he[nt], Ze = ke.Representation, vt = 0;
                vt < Ze.length;
                vt += 1
              )
                if (((rt = Ze[vt]), be === rt.id)) return Se ? vt : rt;
          }
          return null;
        }
        return (
          (Y = {
            applyPatchToManifest: function (Re, be) {
              K.getPatchOperations(be).forEach((Se) => {
                let ke = Se.getMpdTarget(Re);
                if (ke === null) return;
                let { name: he, target: rt, leaf: Ze } = ke;
                if (Se.xpath.findsAttribute() || he === "__text") {
                  switch (Se.action) {
                    case "add":
                    case "replace":
                      rt[he] = Se.value;
                      break;
                    case "remove":
                      delete rt[he];
                  }
                  return;
                }
                let nt = (rt[he] || []).indexOf(Ze),
                  vt = Se.position === "prepend" || Se.position === "before";
                if (Se.action === "remove" || Se.action === "replace")
                  if (Array.isArray(rt[he])) {
                    if (nt != -1) {
                      let ce = rt[he];
                      ce.splice(nt, 1),
                        ce.length > 0 ? (rt[he] = ce) : delete rt[he];
                    }
                  } else delete rt[he];
                (Se.action !== "add" && Se.action !== "replace") ||
                  Object.keys(Se.value).forEach((ce) => {
                    let Ve = Se.value[ce],
                      je = rt[ce] || [];
                    if (
                      (je.length === 0 && rt[ce] && je.push(rt[ce]),
                      je.length === 0)
                    )
                      je = Ve;
                    else {
                      let it = je.length;
                      (it =
                        ce == he && nt != -1
                          ? nt +
                            (vt ? 0 : 1) +
                            (Se.action === "replace" ? -1 : 0)
                          : vt
                          ? 0
                          : je.length),
                        je.splice.apply(je, [it, 0].concat(Ve));
                    }
                    rt[ce] = je;
                  });
              });
            },
            areMediaInfosEqual: function (Re, be) {
              if (!Re || !be) return !1;
              const Se = Re.id === be.id,
                ke = Re.codec === be.codec,
                he =
                  JSON.stringify(Re.viewpoint) === JSON.stringify(be.viewpoint),
                rt = Re.lang === be.lang,
                Ze = JSON.stringify(Re.roles) === JSON.stringify(be.roles),
                nt =
                  JSON.stringify(Re.accessibility) ===
                  JSON.stringify(be.accessibility),
                vt =
                  JSON.stringify(Re.audioChannelConfiguration) ===
                  JSON.stringify(be.audioChannelConfiguration);
              return Se && ke && he && rt && Ze && nt && vt;
            },
            getAllMediaInfoForType: function (Re, be, Se) {
              let ke = Q,
                he = Se,
                rt = [];
              if (he) $e(), (ke = Te(he));
              else {
                if (!(Q.length > 0)) return rt;
                he = Q[0].mpd.manifest;
              }
              const Ze = we(Re, ke);
              let nt = U.getAdaptationsForType(he, Re ? Re.index : null, be);
              return (
                (rt = ne(he, Ze, Re, nt, be)),
                be === q.TEXT &&
                  ((nt = U.getAdaptationsForType(
                    he,
                    Re ? Re.index : null,
                    q.VIDEO
                  )),
                  (rt = rt.concat(ne(he, Ze, Re, nt, be, !0)))),
                rt
              );
            },
            getAvailabilityStartTime: function (Re) {
              const be = _e(Re);
              return U.getAvailabilityStartTime(be);
            },
            getBandwidthForRepresentation: function (Re, be) {
              let Se;
              return (Se = qe(Fe(be), Re)), Se ? Se.bandwidth : null;
            },
            getBaseURLsFromElement: function (Re) {
              return U.getBaseURLsFromElement(Re);
            },
            getCodec: function (Re, be, Se) {
              return U.getCodec(Re, be, Se);
            },
            getContentSteering: function (Re) {
              return U.getContentSteering(Re);
            },
            getDuration: function (Re) {
              const be = le(Re);
              return U.getDuration(be);
            },
            getEssentialPropertiesForAdaptationSet: function (Re) {
              try {
                return U.getEssentialPropertiesForRepresentation(Re);
              } catch {
                return [];
              }
            },
            getEssentialPropertiesForRepresentation: function (Re) {
              try {
                return U.getEssentialPropertiesForRepresentation(Re);
              } catch {
                return [];
              }
            },
            getEvent: function (Re, be, Se, ke) {
              try {
                if (!Re || !be || isNaN(Se) || !ke) return null;
                const he = Re.scheme_id_uri,
                  rt = Re.value;
                if (!be[he + "/" + rt]) return null;
                const Ze = new Si(),
                  nt = Re.timescale || 1,
                  vt = ke.adaptation.period.start,
                  ce = be[he + "/" + rt],
                  Ve = isNaN(ke.presentationTimeOffset)
                    ? isNaN(ce.presentationTimeOffset)
                      ? 0
                      : ce.presentationTimeOffset
                    : ke.presentationTimeOffset;
                let je,
                  it = Re.presentation_time_delta / nt;
                je = Re.version === 0 ? vt + Se - Ve + it : vt - Ve + it;
                const Qe = Re.event_duration / nt,
                  We = Re.id,
                  Ke = Re.message_data;
                return (
                  (Ze.eventStream = ce),
                  (Ze.eventStream.value = rt),
                  (Ze.eventStream.timescale = nt),
                  (Ze.duration = Qe),
                  (Ze.id = We),
                  (Ze.calculatedPresentationTime = je),
                  (Ze.messageData = Ke),
                  (Ze.presentationTimeDelta = it),
                  (Ze.parsedMessageData =
                    he === P.default.ID3_SCHEME_ID_URI
                      ? (function (Ie) {
                          let Ue = 0;
                          const at = [];
                          for (; nG(Ie, Ue); ) {
                            const ft = w_(Ie, Ue + 6);
                            (Ie[Ue + 5] >> 6) & 1 && (Ue += 10), (Ue += 10);
                            const Rt = Ue + ft;
                            for (; Ue + 10 < Rt; ) {
                              const an = sA(Ie.subarray(Ue)),
                                tn = f2(an);
                              tn && at.push(tn), (Ue += an.size + 10);
                            }
                            PP(Ie, Ue) && (Ue += 10);
                          }
                          return at;
                        })(Ke)
                      : null),
                  Ze
                );
              } catch {
                return null;
              }
            },
            getEventsFor: function (Re, be, Se) {
              let ke = [];
              if (Q.length > 0) {
                const he = Q[0].mpd.manifest;
                if (Re instanceof oA) {
                  const rt = we(Re, Q);
                  ke = U.getEventsForPeriod(rt);
                } else if (Re instanceof aA) {
                  const rt = we(Se, Q);
                  ke = U.getEventStreamForAdaptationSet(he, me(Re), rt);
                } else if (Re instanceof Wa) {
                  const rt = we(Se, Q);
                  ke = U.getEventStreamForRepresentation(he, be, rt);
                }
              }
              return ke;
            },
            getIndexForRepresentation: function (Re, be) {
              return (function (Se, ke) {
                const he = qe(Se, ke, !0);
                return he !== null ? he : -1;
              })(Fe(be), Re);
            },
            getIsDVB: function (Re) {
              return U.hasProfile(Re, "urn:dvb:dash:profile:dvb-dash:2014");
            },
            getIsDynamic: function (Re) {
              const be = le(Re);
              return U.getIsDynamic(be);
            },
            getIsPatch: function (Re) {
              return K.getIsPatch(Re);
            },
            getIsTextTrack: function (Re) {
              return U.getIsText(Re);
            },
            getIsTypeOf: function (Re, be) {
              return U.getIsTypeOf(Re, be);
            },
            getLocation: function (Re) {
              return U.getLocation(Re);
            },
            getMainAdaptationForType: ve,
            getManifestUpdatePeriod: function (Re) {
              let be =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 0;
              return U.getManifestUpdatePeriod(Re, be);
            },
            getMediaInfoForType: function (Re, be) {
              if (Q.length === 0 || !Re) return null;
              let Se = we(Re, Q);
              if (!Se) return null;
              const ke = U.getAdaptationsForPeriod(Se);
              let he = ve(be, Re);
              return he
                ? Me(
                    ke[U.getIndexForAdaptation(he, Q[0].mpd.manifest, Re.index)]
                  )
                : null;
            },
            getMpd: _e,
            getPatchLocation: function (Re) {
              const be = U.getPatchLocation(Re),
                Se = U.getPublishTime(Re);
              return be && be.length !== 0 && Se
                ? be.filter(
                    (ke) =>
                      isNaN(ke.ttl) ||
                      Se.getTime() + ke.ttl > new Date().getTime()
                  )
                : [];
            },
            getPeriodById: function (Re) {
              if (!Re || Q.length === 0) return null;
              const be = Q.filter((Se) => Se.id === Re);
              return be && be.length > 0 ? be[0] : null;
            },
            getProducerReferenceTimes: function (Re, be) {
              let Se, ke;
              const he = we(Re, Q);
              return (
                (Se = be ? be.id : null),
                Q.length > 0 &&
                  he &&
                  (ke = Se
                    ? U.getAdaptationForId(Se, Q[0].mpd.manifest, he.index)
                    : U.getAdaptationForIndex(
                        be ? be.index : null,
                        Q[0].mpd.manifest,
                        he.index
                      )),
                ke ? U.getProducerReferenceTimesForAdaptation(ke) : []
              );
            },
            getPublishTime: function (Re) {
              return U.getPublishTime(Re);
            },
            getRealAdaptation: function (Re, be) {
              let Se, ke;
              const he = we(Re, Q);
              return (
                (Se = be ? be.id : null),
                Q.length > 0 &&
                  he &&
                  (ke = Se
                    ? U.getAdaptationForId(Se, Q[0].mpd.manifest, he.index)
                    : U.getAdaptationForIndex(
                        be ? be.index : null,
                        Q[0].mpd.manifest,
                        he.index
                      )),
                ke
              );
            },
            getRealPeriodByIndex: function (Re) {
              return U.getRealPeriodForIndex(Re, Q[0].mpd.manifest);
            },
            getRegularPeriods: Te,
            getRepresentationSortFunction: function () {
              return U.getRepresentationSortFunction();
            },
            getStreamsInfo: function (Re, be) {
              const Se = [];
              let ke = Q;
              if ((Re && ($e(), (ke = Te(Re))), ke.length > 0)) {
                (!be || be > ke.length) && (be = ke.length);
                for (let he = 0; he < be; he++) Se.push(Ge(ke[he]));
              }
              return Se;
            },
            getSuggestedPresentationDelay: function () {
              const Re = Q.length > 0 ? Q[0].mpd : null;
              return U.getSuggestedPresentationDelay(Re);
            },
            getSupplementalCodecs: function (Re) {
              const be = Re[I.default.SUPPLEMENTAL_CODECS];
              return be
                ? be
                    .split(" ")
                    .map((Se) => Re.mimeType + ';codecs="' + Se + '"')
                : [];
            },
            getUTCTimingSources: function () {
              const Re = le();
              return U.getUTCTimingSources(Re);
            },
            getVoRepresentations: function (Re) {
              let be;
              const Se = me(Re);
              return (be = U.getRepresentationsForAdaptation(Se, Re)), be;
            },
            isPatchValid: function (Re, be) {
              let Se = U.getId(Re),
                ke = K.getMpdId(be),
                he = U.getPublishTime(Re),
                rt = K.getPublishTime(be),
                Ze = K.getOriginalPublishTime(be);
              return !!(
                Se &&
                ke &&
                Se == ke &&
                he &&
                Ze &&
                he.getTime() == Ze.getTime() &&
                rt &&
                he.getTime() < rt.getTime()
              );
            },
            reset: se,
            setConfig: function (Re) {
              Re &&
                (Re.constants && (q = Re.constants),
                Re.cea608parser && (ee = Re.cea608parser),
                Re.errHandler && U.setConfig({ errHandler: Re.errHandler }),
                Re.BASE64 && U.setConfig({ BASE64: Re.BASE64 }));
            },
            updatePeriods: function (Re) {
              if (!Re) return null;
              $e(), (Q = Te(Re));
            },
          }),
          (U = Fr(fe).getInstance()),
          (K = A_(fe).getInstance()),
          se(),
          Y
        );
      }
      lA.__dashjs_factory_name = "DashAdapter";
      var ay = H.default.getSingletonFactory(lA);
      class MP {
        static round10(U, K) {
          return (
            (Q = "round"),
            (q = U),
            (ee = K) === void 0 || +ee == 0
              ? Math[Q](q)
              : ((ee = +ee),
                (q = +q) === null ||
                isNaN(q) ||
                typeof ee != "number" ||
                ee % 1 != 0
                  ? NaN
                  : ((q = q.toString().split("e")),
                    +(
                      (q = (q = Math[Q](
                        +(q[0] + "e" + (q[1] ? +q[1] - ee : -ee))
                      ))
                        .toString()
                        .split("e"))[0] +
                      "e" +
                      (q[1] ? +q[1] + ee : ee)
                    )))
          );
          var Q, q, ee;
        }
      }
      class rG {
        constructor() {
          (this.mediaType = null),
            (this.type = null),
            (this.requestTime = null),
            (this.fetchTime = null),
            (this.availabilityStartTime = null),
            (this.presentationStartTime = 0),
            (this.clientTimeOffset = 0),
            (this.currentTime = null),
            (this.buffered = null),
            (this.latency = 0),
            (this.streamInfo = []),
            (this.representationInfo = []);
        }
      }
      class iG {
        constructor() {
          (this.id = null),
            (this.index = null),
            (this.start = null),
            (this.duration = null);
        }
      }
      class CP {
        constructor() {
          (this.id = null),
            (this.index = null),
            (this.mediaType = null),
            (this.presentationTimeOffset = null),
            (this.startNumber = null);
        }
      }
      function uA(Y) {
        const U = (Y = Y || {}).settings;
        let K,
          Q,
          q = this.context,
          ee = (0, X.default)(q).getInstance();
        function fe() {
          ee.trigger(G.default.METRICS_CHANGED);
        }
        function ve(me) {
          ee.trigger(G.default.METRIC_CHANGED, { mediaType: me }), fe();
        }
        function ne(me, we, Me) {
          ee.trigger(G.default.METRIC_UPDATED, {
            mediaType: me,
            metric: we,
            value: Me,
          }),
            ve(me);
        }
        function Te(me, we, Me) {
          ee.trigger(G.default.METRIC_ADDED, {
            mediaType: me,
            metric: we,
            value: Me,
          }),
            ve(me);
        }
        function _e(me, we) {
          let Me = null;
          return (
            me &&
              (Q.hasOwnProperty(me)
                ? (Me = Q[me])
                : we ||
                  ((Me = new (class {
                    constructor() {
                      (this.TcpList = []),
                        (this.HttpList = []),
                        (this.RepSwitchList = []),
                        (this.BufferLevel = []),
                        (this.BufferState = []),
                        (this.PlayList = []),
                        (this.DroppedFrames = []),
                        (this.SchedulingInfo = []),
                        (this.DVRInfo = []),
                        (this.ManifestUpdate = []),
                        (this.RequestsQueue = null),
                        (this.DVBErrors = []);
                    }
                  })()),
                  (Q[me] = Me))),
            Me
          );
        }
        function se(me, we, Me) {
          let Oe = _e(me);
          Oe !== null &&
            (Oe[we].push(Me),
            Oe[we].length > U.get().streaming.metrics.maxListDepth &&
              Oe[we].shift());
        }
        function le(me, we, Me) {
          se(me, we, Me), Te(me, we, Me);
        }
        return (
          (K = {
            addBufferLevel: function (me, we, Me) {
              let Oe = new (class {
                constructor() {
                  (this.t = null), (this.level = null);
                }
              })();
              (Oe.t = we), (Oe.level = Me), le(me, O.BUFFER_LEVEL, Oe);
            },
            addBufferState: function (me, we, Me) {
              let Oe = new (class {
                constructor() {
                  (this.target = null), (this.state = O.BUFFER_EMPTY);
                }
              })();
              (Oe.target = Me), (Oe.state = we), le(me, O.BUFFER_STATE, Oe);
            },
            addDVBErrors: function (me) {
              le(P.default.STREAM, O.DVB_ERRORS, me);
            },
            addDVRInfo: function (me, we, Me, Oe) {
              let Ge = new (class {
                constructor() {
                  (this.time = null),
                    (this.range = null),
                    (this.manifestInfo = null);
                }
              })();
              (Ge.time = we),
                (Ge.range = Oe),
                (Ge.manifestInfo = Me),
                le(me, O.DVR_INFO, Ge);
            },
            addDroppedFrames: function (me, we) {
              let Me = new (class {
                  constructor() {
                    (this.time = null), (this.droppedFrames = null);
                  }
                })(),
                Oe = _e(me).DroppedFrames;
              we &&
                ((Me.time = we.creationTime),
                (Me.droppedFrames = we.droppedVideoFrames),
                (Oe.length > 0 && Oe[Oe.length - 1] == Me) ||
                  le(me, O.DROPPED_FRAMES, Me));
            },
            addHttpRequest: function me(we, Me, Oe, Ge) {
              let $e = new F.HTTPRequest();
              Me.url &&
                Me.url !== we.url &&
                (me(
                  {
                    mediaType: we.mediaType,
                    type: we.type,
                    url: we.url,
                    quality: we.quality,
                    serviceLocation: null,
                    range: we.range,
                    startDate: we.startDate,
                    firstByteDate: null,
                    endDate: null,
                    duration: we.duration,
                    fileLoaderType: we.fileLoaderType,
                    resourceTimingValues: we.resourceTimingValues,
                  },
                  { url: null, status: null, headers: null },
                  null,
                  Ge
                ),
                ($e.actualurl = Me.url)),
                ($e.tcpid = null),
                ($e.type = we.type),
                ($e.url = we.url),
                ($e.range = we.range || null),
                ($e.trequest = we.startDate),
                ($e.tresponse = we.firstByteDate),
                ($e.responsecode = Me.status),
                ($e.cmsd = Ge),
                ($e._tfinish = we.endDate),
                ($e._stream = we.mediaType),
                ($e._mediaduration = we.duration),
                ($e._quality = we.quality),
                ($e._responseHeaders = "");
              for (const Fe in Me.headers)
                $e._responseHeaders +=
                  Fe +
                  ": " +
                  Me.headers[Fe] +
                  `\r
`;
              ($e._serviceLocation = we.serviceLocation || null),
                ($e._fileLoaderType = we.fileLoaderType),
                ($e._resourceTimingValues = we.resourceTimingValues),
                ($e._streamId =
                  we &&
                  we.representation &&
                  we.representation.mediaInfo &&
                  we.representation.mediaInfo.streamInfo
                    ? we.representation.mediaInfo.streamInfo.id
                    : null),
                Oe
                  ? Oe.forEach((Fe) => {
                      (function (qe, Re, be, Se) {
                        let ke = new F.HTTPRequestTrace();
                        (ke.s = Re),
                          (ke.d = be),
                          (ke.b = Se),
                          qe.trace.push(ke),
                          qe.interval || (qe.interval = 0),
                          (qe.interval += be);
                      })($e, Fe.s, Fe.d, Fe.b, Fe.t);
                    })
                  : (delete $e.interval, delete $e.trace),
                le(we.mediaType, O.HTTP_REQUEST, $e);
            },
            addManifestUpdate: function (me, we, Me, Oe) {
              let Ge = new rG();
              (Ge.mediaType = me),
                (Ge.type = we),
                (Ge.requestTime = Me),
                (Ge.fetchTime = Oe),
                se(P.default.STREAM, O.MANIFEST_UPDATE, Ge),
                Te(me, O.MANIFEST_UPDATE, Ge);
            },
            addManifestUpdateRepresentationInfo: function (me, we, Me) {
              if (me && me.representationInfo) {
                const Oe = new CP();
                (Oe.id = we ? we.id : null),
                  (Oe.index = we ? we.index : null),
                  (Oe.mediaType = Me),
                  (Oe.startNumber = we ? we.startNumber : null),
                  (Oe.presentationTimeOffset = we
                    ? we.presentationTimeOffset
                    : null),
                  me.representationInfo.push(Oe),
                  ne(me.mediaType, O.MANIFEST_UPDATE_TRACK_INFO, me);
              }
            },
            addManifestUpdateStreamInfo: function (me, we, Me, Oe, Ge) {
              if (me) {
                let $e = new iG();
                ($e.id = we),
                  ($e.index = Me),
                  ($e.start = Oe),
                  ($e.duration = Ge),
                  me.streamInfo.push($e),
                  ne(me.mediaType, O.MANIFEST_UPDATE_STREAM_INFO, me);
              }
            },
            addPlayList: function (me) {
              me.trace && Array.isArray(me.trace)
                ? me.trace.forEach((we) => {
                    we.hasOwnProperty("subreplevel") &&
                      !we.subreplevel &&
                      delete we.subreplevel;
                  })
                : delete me.trace,
                le(P.default.STREAM, O.PLAY_LIST, me);
            },
            addRepresentationSwitch: function (me, we, Me, Oe, Ge) {
              let $e = new (class {
                constructor() {
                  (this.t = null),
                    (this.mt = null),
                    (this.to = null),
                    (this.lto = null);
                }
              })();
              ($e.t = we),
                ($e.mt = Me),
                ($e.to = Oe),
                Ge ? ($e.lto = Ge) : delete $e.lto,
                le(me, O.TRACK_SWITCH, $e);
            },
            addRequestsQueue: function (me, we, Me) {
              let Oe = new (class {
                constructor() {
                  (this.loadingRequests = []), (this.executedRequests = []);
                }
              })();
              (Oe.loadingRequests = we),
                (Oe.executedRequests = Me),
                (_e(me).RequestsQueue = Oe),
                Te(me, O.REQUESTS_QUEUE, Oe);
            },
            addSchedulingInfo: function (me, we, Me, Oe, Ge, $e, Fe, qe, Re) {
              let be = new (class {
                constructor() {
                  (this.mediaType = null),
                    (this.t = null),
                    (this.type = null),
                    (this.startTime = null),
                    (this.availabilityStartTime = null),
                    (this.duration = null),
                    (this.bandwidth = null),
                    (this.range = null),
                    (this.state = null);
                }
              })();
              (be.mediaType = me),
                (be.t = we),
                (be.type = Me),
                (be.startTime = Oe),
                (be.availabilityStartTime = Ge),
                (be.duration = $e),
                (be.bandwidth = Fe),
                (be.range = qe),
                (be.state = Re),
                le(me, O.SCHEDULING_INFO, be);
            },
            clearAllCurrentMetrics: function () {
              (Q = {}), fe();
            },
            clearCurrentMetricsForType: function (me) {
              delete Q[me], ve(me);
            },
            getMetricsFor: _e,
            updateManifestUpdateInfo: function (me, we) {
              if (me) {
                for (let Me in we) me[Me] = we[Me];
                ne(me.mediaType, O.MANIFEST_UPDATE, me);
              }
            },
          }),
          (Q = {}),
          K
        );
      }
      uA.__dashjs_factory_name = "MetricsModel";
      var c7 = H.default.getSingletonFactory(uA);
      function $P(Y) {
        Y = Y || {};
        const U = this.context;
        let K,
          Q,
          q,
          ee,
          fe = Y.metricsModel;
        function ve(_e) {
          const se = fe.getMetricsFor(_e, !0);
          if (!se) return null;
          const le = se.HttpList;
          let me,
            we = null;
          if (!le || le.length <= 0) return null;
          for (me = le.length - 1; me >= 0; ) {
            if (le[me].responsecode) {
              we = le[me];
              break;
            }
            me--;
          }
          return we;
        }
        function ne(_e) {
          const se = fe.getMetricsFor(_e, !0);
          return se && se.HttpList ? se.HttpList : [];
        }
        function Te(_e, se) {
          if (!_e) return null;
          const le = _e[se];
          return le && le.length !== 0 ? le[le.length - 1] : null;
        }
        return (
          (K = {
            getCurrentRepresentationSwitch: function (_e) {
              return Te(fe.getMetricsFor(_e, !0), O.TRACK_SWITCH);
            },
            getCurrentBufferState: function (_e) {
              return Te(fe.getMetricsFor(_e, !0), O.BUFFER_STATE);
            },
            getCurrentBufferLevel: function (_e) {
              const se = Te(fe.getMetricsFor(_e, !0), O.BUFFER_LEVEL);
              return se ? MP.round10(se.level / 1e3, -3) : 0;
            },
            getCurrentHttpRequest: ve,
            getHttpRequests: ne,
            getCurrentDroppedFrames: function () {
              return Te(
                fe.getMetricsFor(P.default.VIDEO, !0),
                O.DROPPED_FRAMES
              );
            },
            getCurrentSchedulingInfo: function (_e) {
              return Te(fe.getMetricsFor(_e, !0), O.SCHEDULING_INFO);
            },
            getCurrentDVRInfo: function (_e) {
              return Te(
                _e
                  ? fe.getMetricsFor(_e, !0)
                  : fe.getMetricsFor(P.default.VIDEO, !0) ||
                      fe.getMetricsFor(P.default.AUDIO, !0),
                O.DVR_INFO
              );
            },
            getCurrentManifestUpdate: function () {
              return Te(fe.getMetricsFor(P.default.STREAM), O.MANIFEST_UPDATE);
            },
            getLatestFragmentRequestHeaderValueByID: function (_e, se) {
              if (!se) return null;
              let le = {},
                me = ve(_e);
              me && (le = sn.default.parseHttpHeaders(me._responseHeaders));
              const we = le[se.toLowerCase()];
              return we === void 0 ? null : we;
            },
            getLatestMPDRequestHeaderValueByID: function (_e) {
              if (!_e) return null;
              let se,
                le,
                me,
                we = {};
              for (se = ne(P.default.STREAM), me = se.length - 1; me >= 0; me--)
                if (((le = se[me]), le.type === F.HTTPRequest.MPD_TYPE)) {
                  we = sn.default.parseHttpHeaders(le._responseHeaders);
                  break;
                }
              const Me = we[_e.toLowerCase()];
              return Me === void 0 ? null : Me;
            },
            addRepresentationSwitch: function (_e, se, le, me, we) {
              fe.addRepresentationSwitch(_e, se, le, me, we);
            },
            addDVRInfo: function (_e, se, le, me) {
              fe.addDVRInfo(_e, se, le, me);
            },
            updateManifestUpdateInfo: function (_e) {
              const se = this.getCurrentManifestUpdate();
              fe.updateManifestUpdateInfo(se, _e);
            },
            addManifestUpdateStreamInfo: function (_e) {
              if (_e) {
                const se = this.getCurrentManifestUpdate();
                fe.addManifestUpdateStreamInfo(
                  se,
                  _e.id,
                  _e.index,
                  _e.start,
                  _e.duration
                );
              }
            },
            addManifestUpdateRepresentationInfo: function (_e, se) {
              if (_e) {
                const le = this.getCurrentManifestUpdate();
                fe.addManifestUpdateRepresentationInfo(le, _e, se);
              }
            },
            addManifestUpdate: function (_e) {
              fe.addManifestUpdate(
                P.default.STREAM,
                _e.type,
                _e.startDate,
                _e.endDate
              );
            },
            addHttpRequest: function (_e, se, le, me, we, Me) {
              const Oe = { status: le, headers: me, url: se };
              fe.addHttpRequest(_e, Oe, we, Me);
            },
            addSchedulingInfo: function (_e, se) {
              fe.addSchedulingInfo(
                _e.mediaType,
                new Date(),
                _e.type,
                _e.startTime,
                _e.availabilityStartTime,
                _e.duration,
                _e.bandwidth,
                _e.range,
                se
              );
            },
            addRequestsQueue: function (_e, se, le) {
              fe.addRequestsQueue(_e, se, le);
            },
            addBufferLevel: function (_e, se, le) {
              fe.addBufferLevel(_e, se, le);
            },
            addBufferState: function (_e, se, le) {
              fe.addBufferState(_e, se, le);
            },
            addDroppedFrames: function (_e) {
              fe.addDroppedFrames(P.default.VIDEO, _e);
            },
            addPlayList: function () {
              ee && (fe.addPlayList(ee), (ee = null));
            },
            addDVBErrors: function (_e) {
              fe.addDVBErrors(_e);
            },
            createPlaylistMetrics: function (_e, se) {
              (ee = new ye()),
                (ee.start = new Date()),
                (ee.mstart = _e),
                (ee.starttype = se);
            },
            createPlaylistTraceMetrics: function (_e, se, le) {
              Q === !0 &&
                ((Q = !1),
                (q = new Gn()),
                (q.representationid = _e),
                (q.start = new Date()),
                (q.mstart = se),
                (q.playbackspeed = le !== null ? le.toString() : null));
            },
            updatePlayListTraceMetrics: function (_e) {
              if (q) for (let se in q) q[se] = _e[se];
            },
            pushPlayListTraceMetrics: function (_e, se) {
              if (Q === !1 && ee && q && q.start) {
                const le = q.start;
                (q.duration = _e.getTime() - le.getTime()),
                  (q.stopreason = se),
                  ee.trace.push(q),
                  (Q = !0);
              }
            },
            clearAllCurrentMetrics: function () {
              fe.clearAllCurrentMetrics();
            },
          }),
          (fe = fe || c7(U).getInstance({ settings: Y.settings })),
          (Q = !0),
          (q = null),
          (ee = null),
          K
        );
      }
      $P.__dashjs_factory_name = "DashMetrics";
      var aG = H.default.getSingletonFactory($P);
      function xP() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance(),
          K = (0, ue.default)(Y).getInstance();
        let Q, q, ee, fe;
        function ve(Ge) {
          fe = Ge;
        }
        function ne(Ge, $e, Fe, qe) {
          let Re,
            be = $e.adaptation.period.mpd;
          const Se = be.availabilityStartTime;
          if (qe)
            Re =
              Fe && be.timeShiftBufferDepth !== Number.POSITIVE_INFINITY
                ? new Date(Se.getTime() + 1e3 * (Ge + be.timeShiftBufferDepth))
                : be.availabilityEndTime;
          else if (Fe) {
            const ke = $e.availabilityTimeOffset;
            Re = new Date(Se.getTime() + 1e3 * (Ge - ke));
          } else Re = Se;
          return Re;
        }
        function Te(Ge, $e) {
          return (
            (Ge.getTime() - $e.mpd.availabilityStartTime.getTime() + 1e3 * fe) /
            1e3
          );
        }
        function _e(Ge, $e) {
          return Ge + ($e.adaptation.period.start - $e.presentationTimeOffset);
        }
        function se(Ge) {
          const $e = { start: NaN, end: NaN },
            Fe = Ge[0].getAdapter().getRegularPeriods()[0],
            qe = Te(new Date(), Fe);
          if (!Ge || Ge.length === 0) return { range: $e, now: qe };
          Ge.forEach((be) => {
            let Se = be.getCurrentRepresentationForType(P.default.VIDEO);
            if (
              (Se || (Se = be.getCurrentRepresentationForType(P.default.AUDIO)),
              !Se)
            ) {
              const he = be.getAdapter(),
                rt =
                  he.getMediaInfoForType(be.getStreamInfo(), P.default.VIDEO) ||
                  he.getMediaInfoForType(be.getStreamInfo(), P.default.AUDIO);
              Se = he.getVoRepresentations(rt)[0];
            }
            let ke = { start: NaN, end: NaN };
            if (Se)
              if (Se.segmentInfoType === I.default.SEGMENT_TIMELINE)
                ke = (function (he) {
                  const rt =
                      he.adaptation.period.mpd.manifest.Period[
                        he.adaptation.period.index
                      ].AdaptationSet[he.adaptation.index],
                    Ze = q.getRepresentationFor(he.index, rt),
                    nt = Ze.SegmentTemplate || Ze.SegmentList,
                    vt = nt.SegmentTimeline,
                    ce = nt.timescale,
                    Ve = vt.S,
                    je = { start: 0, end: 0 },
                    it = Ve[0].t,
                    Qe = !isNaN(it),
                    We = Qe ? it : 0;
                  let Ke,
                    Ie,
                    Ue,
                    at,
                    ft = 0;
                  for (
                    Qe && (je.start = _e(We / ce, he)), Ue = 0, at = Ve.length;
                    Ue < at;
                    Ue++
                  )
                    (Ke = Ve[Ue]),
                      (Ie = 0),
                      Ke.hasOwnProperty("r") && (Ie = Ke.r),
                      (ft += Ke.d * (1 + Ie));
                  return (je.end = _e((We + ft) / ce, he)), je;
                })(Se);
              else {
                const he = Se.adaptation.period;
                (ke.start = he.start),
                  (ke.end = Math.max(qe, he.start + he.duration));
              }
            !isNaN(ke.start) &&
              (isNaN($e.start) || $e.start > ke.start) &&
              ($e.start = ke.start),
              !isNaN(ke.end) &&
                (isNaN($e.end) || $e.end < ke.end) &&
                ($e.end = ke.end);
          }),
            ($e.end = Math.min(qe, $e.end));
          const Re = me(Ge, $e.end, !0);
          return (
            ($e.end = isNaN(Re) ? $e.end : Re),
            ($e.start =
              Fe &&
              Fe.mpd &&
              Fe.mpd.timeShiftBufferDepth &&
              !isNaN(Fe.mpd.timeShiftBufferDepth) &&
              !isNaN($e.end)
                ? Math.max($e.end - Fe.mpd.timeShiftBufferDepth, $e.start)
                : $e.start),
            ($e.start = me(Ge, $e.start)),
            { range: $e, now: qe }
          );
        }
        function le(Ge, $e) {
          ee = Ge - $e.end;
        }
        function me(Ge, $e) {
          let Fe =
            arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
          try {
            let qe = 0,
              Re = !1,
              be = NaN;
            for (; !Re && qe < Ge.length; ) {
              const Se = Ge[qe].getStreamInfo();
              Se.start <= $e &&
              (!isFinite(Se.duration) || Se.start + Se.duration >= $e)
                ? ((be = $e), (Re = !0))
                : !Fe && Se.start > $e && (isNaN(be) || Se.start < be)
                ? (be = Se.start)
                : Fe &&
                  Se.start + Se.duration < $e &&
                  (isNaN(be) || Se.start + Se.duration > be) &&
                  (be = Se.start + Se.duration),
                (qe += 1);
            }
            return be;
          } catch {
            return $e;
          }
        }
        function we(Ge) {
          Ge.offset === void 0 || isNaN(Ge.offset) || ve(Ge.offset / 1e3);
        }
        function Me() {
          (fe = 0), (ee = 0);
        }
        function Oe() {
          U.off(G.default.UPDATE_TIME_SYNC_OFFSET, we, this), Me();
        }
        return (
          (Q = {
            initialize: function () {
              Me(), U.on(G.default.UPDATE_TIME_SYNC_OFFSET, we, this);
            },
            getClientTimeOffset: function () {
              return fe;
            },
            setClientTimeOffset: ve,
            getClientReferenceTime: function () {
              return Date.now() - 1e3 * ee + 1e3 * fe;
            },
            calcAvailabilityStartTimeFromPresentationTime: function (
              Ge,
              $e,
              Fe
            ) {
              return ne(Ge, $e, Fe);
            },
            calcAvailabilityEndTimeFromPresentationTime: function (Ge, $e, Fe) {
              return ne(Ge, $e, Fe, !0);
            },
            calcPresentationTimeFromWallTime: Te,
            calcPresentationTimeFromMediaTime: _e,
            calcPeriodRelativeTimeFromMpdRelativeTime: function (Ge, $e) {
              return $e - Ge.adaptation.period.start;
            },
            calcMediaTimeFromPresentationTime: function (Ge, $e) {
              return (
                Ge - $e.adaptation.period.start + $e.presentationTimeOffset
              );
            },
            calcWallTimeForSegment: function (Ge, $e) {
              let Fe, qe, Re;
              return (
                $e &&
                  ((Fe =
                    Ge.representation.adaptation.period.mpd
                      .suggestedPresentationDelay),
                  (qe = Ge.presentationStartTime + Fe),
                  (Re = new Date(
                    Ge.availabilityStartTime.getTime() + 1e3 * qe
                  ))),
                Re
              );
            },
            calcTimeShiftBufferWindow: function (Ge, $e) {
              if (!$e)
                return (function (Fe) {
                  const qe = { start: NaN, end: NaN };
                  let Re = 0,
                    be = NaN;
                  return (
                    Fe.forEach((Se) => {
                      const ke = Se.getStreamInfo();
                      (Re += ke.duration),
                        (isNaN(be) || ke.start < be) && (be = ke.start);
                    }),
                    (qe.start = be),
                    (qe.end = be + Re),
                    qe
                  );
                })(Ge);
              if (K.get().streaming.timeShiftBuffer.calcFromSegmentTimeline) {
                const Fe = se(Ge);
                return le(Fe.now, Fe.range), Fe.range;
              }
              return (function (Fe) {
                const qe = { start: NaN, end: NaN };
                if (!Fe || Fe.length === 0) return qe;
                const Re = Fe[0].getAdapter().getRegularPeriods()[0],
                  be = Te(new Date(), Re),
                  Se = Re.mpd.timeShiftBufferDepth,
                  ke = isNaN(Se) ? 0 : be - Se;
                if (
                  ((qe.start = me(Fe, ke)),
                  (qe.end =
                    !isNaN(qe.start) && be < qe.start ? be : me(Fe, be, !0)),
                  !isNaN(Se) && qe.end < be - Se && (qe.end = NaN),
                  K.get().streaming.timeShiftBuffer.fallbackToSegmentTimeline)
                ) {
                  const he = se(Fe);
                  if (he.range.end < qe.start)
                    return (
                      U.trigger(S.default.CONFORMANCE_VIOLATION, {
                        level: gg.LEVELS.WARNING,
                        event: gg.EVENTS.INVALID_DVR_WINDOW,
                      }),
                      le(he.now, he.range),
                      he.range
                    );
                }
                return qe;
              })(Ge);
            },
            reset: Oe,
          }),
          (q = Fr(Y).getInstance()),
          Oe(),
          Q
        );
      }
      xP.__dashjs_factory_name = "TimelineConverter";
      var vh,
        oy,
        k_,
        sy,
        Wm,
        oG = H.default.getSingletonFactory(xP),
        ef = {};
      (vh = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),
        (oy = function (Y) {
          for (var U = 0, K = [], Q = 0 | (Y.length / 3); 0 < Q--; ) {
            var q = (Y[U] << 16) + (Y[U + 1] << 8) + Y[U + 2];
            (U += 3),
              K.push(vh.charAt(63 & (q >> 18))),
              K.push(vh.charAt(63 & (q >> 12))),
              K.push(vh.charAt(63 & (q >> 6))),
              K.push(vh.charAt(63 & q));
          }
          return (
            Y.length - U == 2
              ? ((q = (Y[U] << 16) + (Y[U + 1] << 8)),
                K.push(vh.charAt(63 & (q >> 18))),
                K.push(vh.charAt(63 & (q >> 12))),
                K.push(vh.charAt(63 & (q >> 6))),
                K.push("="))
              : Y.length - U == 1 &&
                ((q = Y[U] << 16),
                K.push(vh.charAt(63 & (q >> 18))),
                K.push(vh.charAt(63 & (q >> 12))),
                K.push("==")),
            K.join("")
          );
        }),
        (k_ = (function () {
          for (var Y = [], U = 0; U < 64; ++U) Y[vh.charCodeAt(U)] = U;
          return (Y["=".charCodeAt(0)] = 0), Y;
        })()),
        (sy = function (Y) {
          for (var U = 0, K = [], Q = 0 | (Y.length / 4); 0 < Q--; ) {
            var q =
              (k_[Y.charCodeAt(U)] << 18) +
              (k_[Y.charCodeAt(U + 1)] << 12) +
              (k_[Y.charCodeAt(U + 2)] << 6) +
              k_[Y.charCodeAt(U + 3)];
            K.push(255 & (q >> 16)),
              K.push(255 & (q >> 8)),
              K.push(255 & q),
              (U += 4);
          }
          return (
            K &&
              (Y.charAt(U - 2) == "="
                ? (K.pop(), K.pop())
                : Y.charAt(U - 1) == "=" && K.pop()),
            K
          );
        }),
        (Wm = {
          encode: function (Y) {
            for (var U = [], K = 0; K < Y.length; ++K) U.push(Y.charCodeAt(K));
            return U;
          },
          decode: function (Y) {
            for (var U = 0; U < s.length; ++U) a[U] = String.fromCharCode(a[U]);
            return a.join("");
          },
        }),
        (ef.decodeArray = function (Y) {
          var U = sy(Y);
          return new Uint8Array(U);
        }),
        (ef.encodeASCII = function (Y) {
          var U = Wm.encode(Y);
          return oy(U);
        }),
        (ef.decodeASCII = function (Y) {
          var U = sy(Y);
          return Wm.decode(U);
        }),
        (ef.encode = function (Y) {
          var U = (function (K) {
            for (var Q = [], q = 0; q < K.length; ++q) {
              var ee = K.charCodeAt(q);
              ee < 128
                ? Q.push(ee)
                : ee < 2048
                ? (Q.push(192 | (ee >> 6)), Q.push(128 | (63 & ee)))
                : ee < 65536
                ? (Q.push(224 | (ee >> 12)),
                  Q.push(128 | (63 & (ee >> 6))),
                  Q.push(128 | (63 & ee)))
                : (Q.push(240 | (ee >> 18)),
                  Q.push(128 | (63 & (ee >> 12))),
                  Q.push(128 | (63 & (ee >> 6))),
                  Q.push(128 | (63 & ee)));
            }
            return Q;
          })(Y);
          return oy(U);
        }),
        (ef.decode = function (Y) {
          return (function (U) {
            for (var K = [], Q = 0; Q < U.length; ) {
              var q = U[Q++];
              q < 128 ||
                (q < 224
                  ? ((q = (31 & q) << 6), (q |= 63 & U[Q++]))
                  : q < 240
                  ? ((q = (15 & q) << 12),
                    (q |= (63 & U[Q++]) << 6),
                    (q |= 63 & U[Q++]))
                  : ((q = (7 & q) << 18),
                    (q |= (63 & U[Q++]) << 12),
                    (q |= (63 & U[Q++]) << 6),
                    (q |= 63 & U[Q++]))),
                K.push(String.fromCharCode(q));
            }
            return K.join("");
          })(sy(Y));
        }),
        typeof exports < "u" &&
          ((exports.decode = ef.decode),
          (exports.decodeArray = ef.decodeArray),
          (exports.encode = ef.encode),
          (exports.encodeASCII = ef.encodeASCII));
      var tf = ef,
        cA = class extends aA {
          constructor() {
            super(),
              (this.captionData = null),
              (this.label = null),
              (this.defaultTrack = !1),
              (this.kind = null),
              (this.isFragmented = !1),
              (this.isEmbedded = !1),
              (this.isTTML = null);
          }
        },
        sG = n(7377);
      function LP() {
        let Y,
          U = 0;
        function K(ne) {
          let Te = "";
          for (let _e = 0; _e < ne.length; ++_e) Te += ne[_e].uchar;
          return Te.length - Te.replace(/^\s+/, "").length;
        }
        function Q(ne) {
          return (
            "left: " +
            3.125 * ne.x +
            "%; top: " +
            6.66 * ne.y1 +
            "%; width: " +
            (100 - 3.125 * ne.x) +
            "%; height: " +
            6.66 * Math.max(ne.y2 - 1 - ne.y1, 1) +
            "%; align-items: flex-start; overflow: visible; -webkit-writing-mode: horizontal-tb;"
          );
        }
        function q(ne) {
          return ne === "red"
            ? "rgb(255, 0, 0)"
            : ne === "green"
            ? "rgb(0, 255, 0)"
            : ne === "blue"
            ? "rgb(0, 0, 255)"
            : ne === "cyan"
            ? "rgb(0, 255, 255)"
            : ne === "magenta"
            ? "rgb(255, 0, 255)"
            : ne === "yellow"
            ? "rgb(255, 255, 0)"
            : ne === "white"
            ? "rgb(255, 255, 255)"
            : ne === "black"
            ? "rgb(0, 0, 0)"
            : ne;
        }
        function ee(ne, Te) {
          const _e = ne.videoHeight / 15;
          return Te
            ? "font-size: " +
                _e +
                "px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; color: " +
                (Te.foreground ? q(Te.foreground) : "rgb(255, 255, 255)") +
                "; font-style: " +
                (Te.italics ? "italic" : "normal") +
                "; text-decoration: " +
                (Te.underline ? "underline" : "none") +
                "; white-space: pre; background-color: " +
                (Te.background ? q(Te.background) : "transparent") +
                ";"
            : "font-size: " +
                _e +
                "px; font-family: Menlo, Consolas, 'Cutive Mono', monospace; justify-content: flex-start; text-align: left; color: rgb(255, 255, 255); font-style: normal; white-space: pre; line-height: normal; font-weight: normal; text-decoration: none; width: 100%; display: flex;";
        }
        function fe(ne) {
          return ne.replace(/^\s+/g, "");
        }
        function ve(ne) {
          return ne.replace(/\s+$/g, "");
        }
        return (
          (Y = {
            createHTMLCaptionsFromScreen: function (ne, Te, _e, se) {
              let le = null,
                me = null,
                we = !1,
                Me = -1,
                Oe = { start: Te, end: _e, spans: [] },
                Ge = "style_cea608_white_black";
              const $e = {},
                Fe = {},
                qe = [];
              let Re, be;
              for (Re = 0; Re < 15; ++Re) {
                const ke = se.rows[Re];
                let he = "",
                  rt = null;
                if (ke.isEmpty() === !1) {
                  const Ze = K(ke.chars);
                  le === null && (le = { x: Ze, y1: Re, y2: Re + 1, p: [] }),
                    Ze !== Me &&
                      we &&
                      (le.p.push(Oe),
                      (Oe = { start: Te, end: _e, spans: [] }),
                      (le.y2 = Re),
                      (le.name = "region_" + le.x + "_" + le.y1 + "_" + le.y2),
                      $e.hasOwnProperty(le.name) === !1
                        ? (qe.push(le), ($e[le.name] = le))
                        : ((me = $e[le.name]), me.p.contat(le.p)),
                      (le = { x: Ze, y1: Re, y2: Re + 1, p: [] }));
                  for (let nt = 0; nt < ke.chars.length; ++nt) {
                    const vt = ke.chars[nt],
                      ce = vt.penState;
                    if (rt === null || !ce.equals(rt)) {
                      he.trim().length > 0 &&
                        (Oe.spans.push({ name: Ge, line: he, row: Re }),
                        (he = ""));
                      let Ve =
                        "style_cea608_" + ce.foreground + "_" + ce.background;
                      ce.underline && (Ve += "_underline"),
                        ce.italics && (Ve += "_italics"),
                        Fe.hasOwnProperty(Ve) ||
                          (Fe[Ve] = JSON.parse(JSON.stringify(ce))),
                        (rt = ce),
                        (Ge = Ve);
                    }
                    he += vt.uchar;
                  }
                  he.trim().length > 0 &&
                    Oe.spans.push({ name: Ge, line: he, row: Re }),
                    (we = !0),
                    (Me = Ze);
                } else
                  (we = !1),
                    (Me = -1),
                    le &&
                      (le.p.push(Oe),
                      (Oe = { start: Te, end: _e, spans: [] }),
                      (le.y2 = Re),
                      (le.name = "region_" + le.x + "_" + le.y1 + "_" + le.y2),
                      $e.hasOwnProperty(le.name) === !1
                        ? (qe.push(le), ($e[le.name] = le))
                        : ((me = $e[le.name]), me.p.contat(le.p)),
                      (le = null));
              }
              le &&
                (le.p.push(Oe),
                (le.y2 = Re + 1),
                (le.name = "region_" + le.x + "_" + le.y1 + "_" + le.y2),
                $e.hasOwnProperty(le.name) === !1
                  ? (qe.push(le), ($e[le.name] = le))
                  : ((me = $e[le.name]), me.p.contat(le.p)),
                (le = null));
              const Se = [];
              for (Re = 0; Re < qe.length; ++Re) {
                const ke = qe[Re],
                  he = "sub_cea608_" + U++,
                  rt = document.createElement("div");
                rt.id = he;
                const Ze = Q(ke);
                rt.style.cssText =
                  "position: absolute; margin: 0; display: flex; box-sizing: border-box; pointer-events: none;" +
                  Ze;
                const nt = document.createElement("div");
                (nt.className = "paragraph bodyStyle"),
                  (nt.style.cssText = ee(ne));
                const vt = document.createElement("div");
                (vt.className = "cueUniWrapper"),
                  (vt.style.cssText = "unicode-bidi: normal; direction: ltr;");
                for (let Ve = 0; Ve < ke.p.length; ++Ve) {
                  const je = ke.p[Ve];
                  let it = 0;
                  for (be = 0; be < je.spans.length; ++be) {
                    let Qe = je.spans[be];
                    if (Qe.line.length > 0) {
                      if (be !== 0 && it != Qe.row) {
                        const Ue = document.createElement("br");
                        (Ue.className = "lineBreak"), vt.appendChild(Ue);
                      }
                      let We = !1;
                      it === Qe.row && (We = !0), (it = Qe.row);
                      const Ke = Fe[Qe.name],
                        Ie = document.createElement("span");
                      (Ie.className =
                        "spanPadding " + Qe.name + " customSpanColor"),
                        (Ie.style.cssText = ee(ne, Ke)),
                        be !== 0 && We
                          ? be === je.spans.length - 1
                            ? (Ie.textContent = ve(Qe.line))
                            : (Ie.textContent = Qe.line)
                          : je.spans.length > 1 &&
                            be < je.spans.length - 1 &&
                            Qe.row === je.spans[be + 1].row
                          ? (Ie.textContent = fe(Qe.line))
                          : (Ie.textContent = Qe.line.trim()),
                        vt.appendChild(Ie);
                    }
                  }
                }
                nt.appendChild(vt), rt.appendChild(nt);
                const ce = { bodyStyle: ["%", 90] };
                for (const Ve in Fe)
                  Fe.hasOwnProperty(Ve) && (ce[Ve] = ["%", 90]);
                Se.push({
                  type: "html",
                  start: Te,
                  end: _e,
                  cueHTMLElement: rt,
                  cueID: he,
                  cellResolution: [32, 15],
                  isFromCEA608: !0,
                  fontSize: ce,
                  lineHeight: {},
                  linePadding: {},
                });
              }
              return Se;
            },
          }),
          Y
        );
      }
      LP.__dashjs_factory_name = "EmbeddedTextHtmlRender";
      var rc = H.default.getSingletonFactory(LP);
      function lG(Y, U, K) {
        const Q = [];
        for (let q = U; q < K; q++)
          q + 2 < K &&
          Y.getUint8(q) === 0 &&
          Y.getUint8(q + 1) === 0 &&
          Y.getUint8(q + 2) === 3
            ? (Q.push(0), Q.push(0), (q += 2))
            : Q.push(Y.getUint8(q));
        return new DataView(new Uint8Array(Q).buffer);
      }
      function bc(Y, U, K, Q) {
        return (
          !(Y !== 4 || U < 8) &&
          K.getUint8(Q) === 181 &&
          K.getUint16(Q + 1) === 49 &&
          K.getUint32(Q + 3) === 1195456820 &&
          K.getUint8(Q + 7) === 3
        );
      }
      function p2(Y, U) {
        return (127 & Y) > 0 || (127 & U) > 0;
      }
      function uG(Y, U) {
        let K = 0;
        for (; K < Y.byteLength; ) {
          let q,
            ee = 0,
            fe = 0;
          do ee += q = Y.getUint8(K++);
          while (q === 255);
          do fe += q = Y.getUint8(K++);
          while (q === 255);
          if (bc(ee, fe, Y, K)) {
            const ve = K + 10,
              ne = ve + 3 * (31 & Y.getUint8(ve - 2));
            for (let Te = ve; Te < ne; Te += 3) {
              const _e = Y.getUint8(Te);
              if (4 & _e) {
                const se = 3 & _e;
                if ((Q = se) === 0 || Q === 1) {
                  const le = Y.getUint8(Te + 1),
                    me = Y.getUint8(Te + 2);
                  p2(le, me) && U[se].push(le, me);
                }
              }
            }
          }
          K += fe;
        }
        var Q;
      }
      function cG(Y, U, K) {
        let Q = 0,
          q = 0;
        const ee = [[], []];
        for (
          let fe = U;
          fe < U + K - 5 &&
          ((Q = Y.getUint32(fe)),
          (q = 31 & Y.getUint8(fe + 4)),
          !(fe + 5 + Q > U + K));
          fe++
        )
          q === 6 &&
            fe + 5 + Q <= Y.byteLength &&
            uG(lG(Y, fe + 5, fe + 5 + Q), ee),
            (fe += Q + 3);
        return ee;
      }
      function OP(Y) {
        const U = Y.errHandler,
          K = Y.manifestModel,
          Q = Y.mediaController,
          q = Y.videoModel,
          ee = Y.textTracks,
          fe = Y.vttParser,
          ve = Y.vttCustomRenderingParser,
          ne = Y.ttmlParser,
          Te = Y.streamInfo,
          _e = Y.settings,
          se = this.context,
          le = (0, X.default)(se).getInstance();
        let me,
          we,
          Me,
          Oe,
          Ge,
          $e,
          Fe,
          qe,
          Re,
          be,
          Se,
          ke,
          he,
          rt,
          Ze,
          nt,
          vt,
          ce = !1;
        function Ve() {
          ($e = null),
            (qe = NaN),
            (Re = []),
            (be = null),
            (Fe = !1),
            (Ge = []),
            (Oe = null);
        }
        function je(ft) {
          const Rt = {};
          (Rt[I.default.SUBTITLE] = "subtitles"),
            (Rt[I.default.CAPTION] = "captions"),
            (Rt[I.default.FORCED_SUBTITLE] = "subtitles");
          const an = new cA();
          for (let fn in ft) an[fn] = ft[fn];
          var tn;
          (an.defaultTrack = (function (fn) {
            let nr = !1;
            return (
              ke.length > 1 && fn.isEmbedded
                ? (nr = fn.id && fn.id === P.default.CC1)
                : ke.length === 1
                ? fn.id &&
                  typeof fn.id == "string" &&
                  fn.id.substring(0, 2) === "CC" &&
                  (nr = !0)
                : ke.length === 0 && (nr = fn.index === Ge[0].index),
              nr
            );
          })(ft)),
            (an.isTTML =
              ((tn = ft).codec && tn.codec.search(P.default.STPP) >= 0) ||
              (tn.mimeType && tn.mimeType.search(P.default.TTML) >= 0)),
            (an.kind = (function (fn, nr) {
              let Bn =
                fn.roles && fn.roles.length > 0
                  ? nr[fn.roles[0].value]
                  : nr.caption;
              return (
                (Bn = Object.values(nr).includes(Bn) ? Bn : nr.caption), Bn
              );
            })(ft, Rt)),
            ee.addTextTrackInfo(an);
        }
        function it(ft) {
          const Rt = ft.chunk;
          Rt.representation.mediaInfo.embeddedCaptions && We(Rt.bytes, Rt);
        }
        function Qe(ft) {
          Se = ft;
        }
        function We(ft, Rt) {
          const an = Rt.representation.mediaInfo,
            tn = an.type,
            fn = an.mimeType,
            nr = an.codec || fn;
          nr
            ? an.codec.indexOf("application/mp4") !== -1
              ? (function (Bn, wr, hr) {
                  let pi, Rn;
                  if (wr.segmentType === "InitializationSegment")
                    (Fe = !0), (qe = Me.getMediaTimescaleFromMoov(Bn));
                  else {
                    if (!Fe) return;
                    (Rn = Me.getSamplesInfo(Bn)),
                      (pi = Rn.sampleList),
                      pi.length > 0 && (be = pi[0].cts - wr.start * qe),
                      hr.search(P.default.STPP) >= 0
                        ? (function ($r, ni, Fi) {
                            let Xi, Hi;
                            for (
                              Oe = Oe !== null ? Oe : Ue(Fi), Xi = 0;
                              Xi < ni.length;
                              Xi++
                            ) {
                              const jt = ni[Xi],
                                An = jt.cts,
                                pn = Ie(),
                                Mn = pn + An / qe,
                                Zt = Mn + jt.duration / qe;
                              me.buffered.add(Mn, Zt);
                              const Fn = new DataView(
                                $r,
                                jt.offset,
                                jt.subSizes[0]
                              );
                              let Hn = fh.Utils.dataViewToString(
                                Fn,
                                P.default.UTF8
                              );
                              const Sr = [];
                              let fr = jt.offset + jt.subSizes[0];
                              for (Hi = 1; Hi < jt.subSizes.length; Hi++) {
                                const Lr = new Uint8Array(
                                    $r,
                                    fr,
                                    jt.subSizes[Hi]
                                  ),
                                  Jt = String.fromCharCode.apply(null, Lr);
                                Sr.push(Jt), (fr += jt.subSizes[Hi]);
                              }
                              try {
                                const Lr = K.getValue().ttmlTimeIsRelative
                                    ? An / qe
                                    : 0,
                                  Jt = Oe.parse(
                                    Hn,
                                    Lr,
                                    An / qe,
                                    (An + jt.duration) / qe,
                                    Sr
                                  );
                                ee.addCaptions(Se, pn, Jt);
                              } catch (Lr) {
                                $e.removeExecutedRequestsBeforeTime(),
                                  this.remove(),
                                  we.error("TTML parser error: " + Lr.message);
                              }
                            }
                          })(Bn, pi, hr)
                        : (function ($r, ni) {
                            let Fi, Xi, Hi;
                            const jt = [];
                            for (Fi = 0; Fi < ni.length; Fi++) {
                              const An = ni[Fi];
                              An.cts -= be;
                              const pn = Ie() + An.cts / qe,
                                Mn = pn + An.duration / qe;
                              me.buffered.add(pn, Mn);
                              const Zt = $r.slice(
                                  An.offset,
                                  An.offset + An.size
                                ),
                                Fn = fh.parseBuffer(Zt);
                              for (Xi = 0; Xi < Fn.boxes.length; Xi++) {
                                const Hn = Fn.boxes[Xi];
                                if (
                                  (we.debug("VTT box1: " + Hn.type),
                                  Hn.type !== "vtte" && Hn.type === "vttc")
                                ) {
                                  we.debug(
                                    "VTT vttc boxes.length = " + Hn.boxes.length
                                  );
                                  let Sr = { styles: {} };
                                  for (Hi = 0; Hi < Hn.boxes.length; Hi++) {
                                    const fr = Hn.boxes[Hi];
                                    if (
                                      (we.debug("VTT box2: " + fr.type),
                                      fr.type === "payl")
                                    )
                                      (Sr.start = An.cts / qe),
                                        (Sr.end = (An.cts + An.duration) / qe),
                                        (Sr.data = fr.cue_text);
                                    else if (
                                      fr.type === "sttg" &&
                                      fr.settings &&
                                      fr.settings !== ""
                                    )
                                      try {
                                        const Lr = fr.settings.split(" ");
                                        Sr.styles = fe.getCaptionStyles(Lr);
                                      } catch {}
                                  }
                                  Sr &&
                                    Sr.data &&
                                    (jt.push(Sr),
                                    we.debug(
                                      `VTT  ${Sr.start} - ${Sr.end} :  ${Sr.data}`
                                    ));
                                }
                              }
                            }
                            jt.length > 0 && ee.addCaptions(Se, 0, jt);
                          })(Bn, pi);
                  }
                })(ft, Rt, nr)
              : tn === P.default.VIDEO
              ? (function (Bn, wr) {
                  let hr, pi;
                  if (wr.segmentType === F.HTTPRequest.INIT_SEGMENT_TYPE)
                    he === 0 && (he = Me.getMediaTimescaleFromMoov(Bn));
                  else if (
                    wr.segmentType === F.HTTPRequest.MEDIA_SEGMENT_TYPE
                  ) {
                    if (he === 0)
                      return void we.warn(
                        "CEA-608: No timescale for embeddedTextTrack yet"
                      );
                    pi = Me.getSamplesInfo(Bn);
                    const Hi = pi.lastSequenceNumber,
                      jt = Math.trunc(wr.start),
                      An = Math.trunc(wr.end);
                    if (
                      (nt[0] ||
                        nt[1] ||
                        (function () {
                          let pn;
                          for (let Mn = 0; Mn < ke.length; Mn++) {
                            if (
                              ((pn = ee.getTrackIdxForId(ke[Mn].id)), pn === -1)
                            )
                              return void we.warn(
                                "CEA-608: data before track is ready."
                              );
                            const Zt = Ke(pn);
                            nt[Mn] = new N(Mn + 1, { newCue: Zt }, null);
                          }
                        })(),
                      he)
                    ) {
                      if (
                        ((Rn = rt),
                        ($r = Hi),
                        (ni = pi.numSequences),
                        (Fi = Ze),
                        (Xi = jt),
                        Rn !== null &&
                          $r !== null &&
                          Fi !== null &&
                          Xi !== null &&
                          ($r === Rn ? Fi !== Xi : $r !== Rn + ni))
                      )
                        for (hr = 0; hr < nt.length; hr++)
                          nt[hr] && nt[hr].reset();
                      const pn = (function (Mn, Zt) {
                        if (Zt.length === 0) return null;
                        const Fn = { splits: [], fields: [[], []] },
                          Hn = new DataView(Mn);
                        for (let Sr = 0; Sr < Zt.length; Sr++) {
                          const fr = Zt[Sr],
                            Lr = cG(Hn, fr.offset, fr.size);
                          let Jt = null,
                            Cn = 0;
                          for (let rr = 0; rr < 2; rr++)
                            if (Lr[rr].length > 0) {
                              fr.cts !== Jt ? (Cn = 0) : (Cn += 1);
                              const Er = Ie();
                              Fn.fields[rr].push([
                                fr.cts + Er * he,
                                Lr[rr],
                                Cn,
                              ]),
                                (Jt = fr.cts);
                            }
                        }
                        return (
                          Fn.fields.forEach(function (Sr) {
                            Sr.sort(function (fr, Lr) {
                              return fr[0] === Lr[0]
                                ? fr[2] - Lr[2]
                                : fr[0] - Lr[0];
                            });
                          }),
                          Fn
                        );
                      })(Bn, pi.sampleList);
                      for (let Mn = 0; Mn < nt.length; Mn++) {
                        const Zt = pn.fields[Mn],
                          Fn = nt[Mn];
                        if (Fn)
                          for (hr = 0; hr < Zt.length; hr++)
                            Fn.addData(Zt[hr][0] / he, Zt[hr][1]);
                      }
                      (rt = Hi), (Ze = An);
                    }
                  }
                  var Rn, $r, ni, Fi, Xi;
                })(ft, Rt)
              : (function (Bn, wr, hr) {
                  let pi, Rn;
                  const $r = new DataView(Bn, 0, Bn.byteLength);
                  Rn = fh.Utils.dataViewToString($r, P.default.UTF8);
                  try {
                    (pi = Ue(hr).parse(Rn, 0)),
                      ee.addCaptions(ee.getCurrentTrackIdx(), 0, pi),
                      me.buffered && me.buffered.add(wr.start, wr.end);
                  } catch (ni) {
                    U.error(
                      new ot.default(
                        de.TIMED_TEXT_ERROR_ID_PARSE_CODE,
                        de.TIMED_TEXT_ERROR_MESSAGE_PARSE + ni.message,
                        Rn
                      )
                    );
                  }
                })(ft, Rt, nr)
            : we.error("No text type defined");
        }
        function Ke(ft) {
          return function (Rt, an, tn) {
            let fn;
            (fn = q.getTTMLRenderingDiv()
              ? vt.createHTMLCaptionsFromScreen(q.getElement(), Rt, an, tn)
              : [
                  { start: Rt, end: an, data: tn.getDisplayText(), styles: {} },
                ]),
              fn && ee.addCaptions(ft, 0, fn);
          };
        }
        function Ie() {
          return isNaN(me.timestampOffset) ? 0 : me.timestampOffset;
        }
        function Ue(ft) {
          let Rt;
          return (
            ft.search(P.default.VTT) >= 0
              ? (Rt =
                  _e.get().streaming.text.webvtt.customRenderingEnabled && ve
                    ? ve
                    : fe)
              : (ft.search(P.default.TTML) >= 0 ||
                  ft.search(P.default.STPP) >= 0) &&
                (Rt = ne),
            Rt
          );
        }
        function at(ft) {
          ke.forEach(function (Rt) {
            const an = ee.getTrackIdxForId(Rt.id);
            an >= 0 && ee.deleteCuesFromTrackIdx(an, ft.from, ft.to);
          });
        }
        return (
          (me = {
            initialize: function () {
              ce ||
                ((ke = []),
                (Se = null),
                (he = 0),
                (nt = []),
                (rt = null),
                (Ze = null),
                (ce = !0),
                (vt = rc(se).getInstance()),
                le.on(G.default.VIDEO_CHUNK_RECEIVED, it, me),
                le.on(G.default.BUFFER_CLEARED, at, me));
            },
            addMediaInfos: function (ft, Rt, an) {
              if (
                ((Ge = Ge.concat(Rt)),
                ft === P.default.TEXT &&
                  Rt[0].isFragmented &&
                  !Rt[0].isEmbedded)
              ) {
                ($e = an),
                  (me.buffered = (0, sG.default)(se).create()),
                  (Re = Q.getTracksFor(P.default.TEXT, Te.id).filter(
                    (fn) => fn.isFragmented
                  ));
                const tn = Q.getCurrentTrackFor(P.default.TEXT, Te.id);
                for (let fn = 0; fn < Re.length; fn++)
                  if (Re[fn] === tn) {
                    Qe(fn);
                    break;
                  }
              }
              for (let tn = 0; tn < Rt.length; tn++) je(Rt[tn]);
            },
            resetMediaInfos: function () {
              Ge = [];
            },
            getStreamId: function () {
              return Te.id;
            },
            append: We,
            abort: function () {},
            addEmbeddedTrack: function (ft) {
              if (ce && ft)
                if (ft.id === P.default.CC1 || ft.id === P.default.CC3) {
                  for (let Rt = 0; Rt < ke.length; Rt++)
                    if (ke[Rt].id === ft.id) return;
                  ke.push(ft);
                } else we.warn("Embedded track " + ft.id + " not supported!");
            },
            resetEmbedded: function () {
              le.off(G.default.VIDEO_CHUNK_RECEIVED, it, me),
                le.off(G.default.BUFFER_CLEARED, at, me),
                ee && ee.deleteAllTextTracks(),
                (ce = !1),
                (ke = []),
                (nt = [null, null]),
                (rt = null),
                (Ze = null);
            },
            getConfig: function () {
              return { fragmentModel: $e, fragmentedTracks: Re, videoModel: q };
            },
            setCurrentFragmentedTrackIdx: Qe,
            remove: function (ft, Rt) {
              ft === void 0 &&
                ft === Rt &&
                ((ft = me.buffered.start(0)),
                (Rt = me.buffered.end(me.buffered.length - 1))),
                me.buffered.remove(ft, Rt),
                ee.deleteCuesFromTrackIdx(Se, ft, Rt);
            },
            reset: function () {
              Ve(), (Ge = []), (Me = null);
            },
          }),
          (we = (0, E.default)(se).getInstance().getLogger(me)),
          (Me = Ia(se).getInstance()),
          Ve(),
          me
        );
      }
      OP.__dashjs_factory_name = "TextSourceBuffer";
      var dA = H.default.getClassFactory(OP),
        g2 = n(7640);
      const GP = [
        "text",
        "align",
        "fontSize",
        "id",
        "isd",
        "line",
        "lineAlign",
        "lineHeight",
        "linePadding",
        "position",
        "positionAlign",
        "region",
        "size",
        "snapToLines",
        "vertical",
      ];
      function qv(Y) {
        const U = this.context,
          K = (0, X.default)(U).getInstance(),
          Q = Y.videoModel,
          q = Y.streamInfo,
          ee = Y.settings;
        let fe,
          ve,
          ne,
          Te,
          _e,
          se,
          le,
          me,
          we,
          Me,
          Oe,
          Ge,
          $e,
          Fe,
          qe,
          Re,
          be,
          Se,
          ke,
          he;
        function rt(jt) {
          const An = jt.kind,
            pn = jt.id !== void 0 ? jt.id : jt.lang,
            Mn = jt.lang,
            Zt = jt.isTTML,
            Fn = jt.isEmbedded;
          return Q.addTextTrack(An, pn, Mn, Zt, Fn);
        }
        function Ze(jt, An, pn, Mn, Zt, Fn) {
          let Hn = 0,
            Sr = 0;
          jt / An > pn / Mn
            ? ((Sr = An), (Hn = (Sr / Mn) * pn))
            : ((Hn = jt), (Sr = (Hn / pn) * Mn));
          let fr = 0,
            Lr = 0,
            Jt = 0,
            Cn = 0;
          return (
            Hn / Sr > Zt
              ? ((Cn = Sr), (Jt = Sr * Zt))
              : ((Jt = Hn), (Cn = Hn / Zt)),
            (fr = (jt - Jt) / 2),
            (Lr = (An - Cn) / 2),
            Fn
              ? { x: fr + 0.1 * Jt, y: Lr + 0.1 * Cn, w: 0.8 * Jt, h: 0.8 * Cn }
              : { x: fr, y: Lr, w: Jt, h: Cn }
          );
        }
        function nt(jt, An) {
          const pn = Q.getClientWidth(),
            Mn = Q.getClientHeight(),
            Zt = Q.getVideoWidth(),
            Fn = Q.getVideoHeight(),
            Hn = Q.getVideoRelativeOffsetTop(),
            Sr = Q.getVideoRelativeOffsetLeft();
          if (Zt !== 0 && Fn !== 0) {
            let fr = Zt / Fn,
              Lr = !1;
            jt.isFromCEA608 && ((fr = 3.5 / 3), (Lr = !0));
            const Jt = Ze.call(this, pn, Mn, Zt, Fn, fr, Lr),
              Cn = Jt.w,
              rr = Jt.h,
              Er = Jt.x,
              gn = Jt.y;
            if (Cn != we || rr != Me || Er != le || gn != me || An) {
              if (((le = Er + Sr), (me = gn + Hn), (we = Cn), (Me = rr), Oe)) {
                const Vt = Oe.style;
                Vt &&
                  ((Vt.left = le + "px"),
                  (Vt.top = me + "px"),
                  (Vt.width = we + "px"),
                  (Vt.height = Me + "px"),
                  (Vt.zIndex = (Fe && document[Fe]) || qe ? be : null),
                  K.trigger(S.default.CAPTION_CONTAINER_RESIZE));
              }
              const ct = jt.activeCues;
              if (ct) {
                const Vt = ct.length;
                for (let kn = 0; kn < Vt; ++kn) {
                  const zt = ct[kn];
                  zt.scaleCue(zt);
                }
              }
            }
          }
        }
        function vt(jt) {
          const An = we,
            pn = Me;
          let Mn, Zt, Fn, Hn, Sr;
          if (jt.cellResolution) {
            const fr = [An / jt.cellResolution[0], pn / jt.cellResolution[1]];
            if (jt.linePadding) {
              for (Mn in jt.linePadding)
                if (jt.linePadding.hasOwnProperty(Mn)) {
                  Zt = (jt.linePadding[Mn] * fr[0]).toString();
                  const Lr = document.getElementsByClassName("spanPadding");
                  for (let Jt = 0; Jt < Lr.length; Jt++)
                    (Lr[Jt].style.cssText = Lr[Jt].style.cssText.replace(
                      /(padding-left\s*:\s*)[\d.,]+(?=\s*px)/gi,
                      "$1" + Zt
                    )),
                      (Lr[Jt].style.cssText = Lr[Jt].style.cssText.replace(
                        /(padding-right\s*:\s*)[\d.,]+(?=\s*px)/gi,
                        "$1" + Zt
                      ));
                }
            }
            if (jt.fontSize) {
              for (Mn in jt.fontSize)
                if (jt.fontSize.hasOwnProperty(Mn)) {
                  jt.fontSize[Mn][0] === "%"
                    ? (Fn = jt.fontSize[Mn][1] / 100)
                    : jt.fontSize[Mn][0] === "c" && (Fn = jt.fontSize[Mn][1]),
                    (Zt = (Fn * fr[1]).toString()),
                    (Sr =
                      Mn !== "defaultFontSize"
                        ? document.getElementsByClassName(Mn)
                        : document.getElementsByClassName("paragraph"));
                  for (let Lr = 0; Lr < Sr.length; Lr++)
                    Sr[Lr].style.cssText = Sr[Lr].style.cssText.replace(
                      /(font-size\s*:\s*)[\d.,]+(?=\s*px)/gi,
                      "$1" + Zt
                    );
                }
              if (jt.lineHeight) {
                for (Mn in jt.lineHeight)
                  if (jt.lineHeight.hasOwnProperty(Mn)) {
                    jt.lineHeight[Mn][0] === "%"
                      ? (Hn = jt.lineHeight[Mn][1] / 100)
                      : jt.fontSize[Mn][0] === "c" &&
                        (Hn = jt.lineHeight[Mn][1]),
                      (Zt = (Hn * fr[1]).toString()),
                      (Sr = document.getElementsByClassName(Mn));
                    for (let Lr = 0; Lr < Sr.length; Lr++)
                      Sr[Lr].style.cssText = Sr[Lr].style.cssText.replace(
                        /(line-height\s*:\s*)[\d.,]+(?=\s*px)/gi,
                        "$1" + Zt
                      );
                  }
              }
            }
          }
          if (jt.isd) {
            let fr = document.getElementById(jt.cueID);
            fr && Oe.removeChild(fr), Ve(jt);
          }
        }
        function ce(jt, An) {
          const pn = /^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/,
            Mn = /^#(.*)$/;
          if (pn.test(An)) {
            const Zt = pn.exec(An),
              Fn = parseInt(Zt[4], 10) - 1;
            return "data:image/png;base64," + btoa(jt.images[Fn]);
          }
          if (Mn.test(An)) {
            const Zt = Mn.exec(An)[1];
            return "data:image/png;base64," + jt.embeddedImages[Zt];
          }
          return An;
        }
        function Ve(jt) {
          if (Oe) {
            Hi.call(this);
            const An = document.createElement("div");
            Oe.appendChild(An),
              (Re = (0, g2.renderHTML)(
                jt.isd,
                An,
                function (pn) {
                  return ce(jt, pn);
                },
                Oe.clientHeight,
                Oe.clientWidth,
                ee.get().streaming.text.imsc.displayForcedOnlyMode,
                function (pn) {
                  ve.info("renderCaption :", pn);
                },
                Re,
                ee.get().streaming.text.imsc.enableRollUp
              )),
              (An.id = jt.cueID),
              K.trigger(S.default.CAPTION_RENDERED, {
                captionDiv: An,
                currentTrackIdx: se,
              });
          }
        }
        function je(jt, An) {
          return !!An && An.endTime >= jt.startTime;
        }
        function it(jt, An) {
          return (
            !!ee.get().streaming.text.extendSegmentedCues &&
            !!(function (pn, Mn, Zt) {
              for (let Fn = 0; Fn < Zt.length; Fn++) {
                const Hn = Zt[Fn];
                if (JSON.stringify(pn[Hn]) !== JSON.stringify(Mn[Hn]))
                  return !1;
              }
              return !0;
            })(An, jt, GP) &&
            ((An.endTime = Math.max(An.endTime, jt.endTime)), !0)
          );
        }
        function Qe(jt, An) {
          An &&
            An.forEach((pn) => {
              pn.kind && pn.kind === "image" && (pn.src = ce(jt, pn.src)),
                Qe(jt, pn.contents);
            });
        }
        function We(jt, An, pn) {
          const Mn = nr(jt),
            Zt = ee.get().streaming.text.dispatchForManualRendering;
          if (Mn && Array.isArray(pn) && pn.length !== 0)
            for (let Fn = 0; Fn < pn.length; Fn++) {
              let Hn = null;
              const Sr = pn[Fn];
              (Mn.cellResolution = Sr.cellResolution),
                (Mn.isFromCEA608 = Sr.isFromCEA608),
                isNaN(Sr.start) ||
                  isNaN(Sr.end) ||
                  (Zt
                    ? (Hn = Ke(Sr, An))
                    : Rt(Sr) && Oe
                    ? (Hn = at(Sr, An, Mn))
                    : Sr.data && (Hn = ft(Sr, An, Mn)));
              try {
                if (Hn) {
                  if (!hr(Mn, Hn))
                    if (ee.get().streaming.text.webvtt.customRenderingEnabled)
                      Mn.manualCueList || (Mn.manualCueList = []),
                        Mn.manualCueList.push(Hn);
                    else {
                      let Lr;
                      Mn.cues &&
                        Mn.cues.length !== 0 &&
                        (Lr = Mn.cues[Mn.cues.length - 1]),
                        je(Hn, Lr)
                          ? it(Hn, Lr) ||
                            (Lr.isd && (Lr.onexit = function () {}),
                            Mn.mode !== P.default.TEXT_DISABLED &&
                              Mn.addCue(Hn))
                          : Mn.mode !== P.default.TEXT_DISABLED &&
                            Mn.addCue(Hn);
                    }
                  const fr = ee.get().streaming.buffer.bufferToKeep;
                  Rn(Mn, 0, Q.getTime() - fr);
                } else
                  ve.error(
                    "Impossible to display subtitles. You might have missed setting a TTML rendering div via player.attachTTMLRenderingDiv(TTMLRenderingDiv)"
                  );
              } catch (fr) {
                throw ($r(Mn), Mn.addCue(Hn), fr);
              }
            }
        }
        function Ke(jt, An) {
          let pn = an(jt, An);
          return (
            (pn.onenter = function () {
              Rt(jt) && he && he.cueID !== pn.cueID && Ue(he),
                delete pn.type,
                (he = pn),
                Ie(pn);
            }),
            (pn.onexit = function () {
              Ue(pn), (he = null);
            }),
            pn
          );
        }
        function Ie(jt) {
          K.trigger(S.default.CUE_ENTER, jt);
        }
        function Ue(jt) {
          K.trigger(S.default.CUE_EXIT, { cueID: jt.cueID });
        }
        function at(jt, An, pn) {
          const Mn = this;
          let Zt = an(jt, An);
          return (
            (Oe.style.left = le + "px"),
            (Oe.style.top = me + "px"),
            (Oe.style.width = we + "px"),
            (Oe.style.height = Me + "px"),
            (Zt.onenter = function () {
              pn.mode === P.default.TEXT_SHOWING &&
                (this.isd
                  ? (ke ? requestAnimationFrame(() => Ve(this)) : Ve(this),
                    ve.debug("Cue enter id:" + this.cueID))
                  : (Oe.appendChild(this.cueHTMLElement),
                    vt.call(Mn, this),
                    K.trigger(S.default.CAPTION_RENDERED, {
                      captionDiv: this.cueHTMLElement,
                      currentTrackIdx: se,
                    })));
            }),
            (Zt.onexit = function () {
              if (Oe) {
                const Fn = Oe.childNodes;
                for (let Hn = 0; Hn < Fn.length; ++Hn)
                  Fn[Hn].id === this.cueID &&
                    (ve.debug("Cue exit id:" + Fn[Hn].id),
                    Oe.removeChild(Fn[Hn]),
                    --Hn);
              }
            }),
            Zt
          );
        }
        function ft(jt, An, pn) {
          let Mn = an(jt, An);
          if (((Mn.isActive = !1), jt.styles))
            try {
              jt.styles.align !== void 0 &&
                "align" in Mn &&
                (Mn.align = jt.styles.align),
                jt.styles.line !== void 0 &&
                  "line" in Mn &&
                  (Mn.line = jt.styles.line),
                jt.styles.snapToLines !== void 0 &&
                  "snapToLines" in Mn &&
                  (Mn.snapToLines = jt.styles.snapToLines),
                jt.styles.position !== void 0 &&
                  "position" in Mn &&
                  (Mn.position = jt.styles.position),
                jt.styles.size !== void 0 &&
                  "size" in Mn &&
                  (Mn.size = jt.styles.size);
            } catch (Zt) {
              ve.error(Zt);
            }
          return (
            (Mn.onenter = function () {
              pn.mode === P.default.TEXT_SHOWING &&
                K.trigger(S.default.CAPTION_RENDERED, { currentTrackIdx: se });
            }),
            Mn
          );
        }
        function Rt(jt) {
          return jt.type === "html";
        }
        function an(jt, An) {
          return Rt(jt)
            ? (function (pn, Mn) {
                let Zt = new ne(pn.start + Mn, pn.end + Mn, "");
                return (
                  (Zt.cueHTMLElement = pn.cueHTMLElement),
                  (Zt.isd = pn.isd),
                  (Zt.images = pn.images),
                  (Zt.embeddedImages = pn.embeddedImages),
                  (Zt.cueID = pn.cueID),
                  (Zt.scaleCue = vt.bind(self)),
                  (Zt.cellResolution = pn.cellResolution),
                  (Zt.lineHeight = pn.lineHeight),
                  (Zt.linePadding = pn.linePadding),
                  (Zt.fontSize = pn.fontSize),
                  Zt.isd && Qe(Zt, Zt.isd.contents),
                  Zt
                );
              })(jt, An)
            : (function (pn, Mn) {
                let Zt = new ne(pn.start - Mn, pn.end - Mn, pn.data);
                return (Zt.cueID = `${Zt.startTime}_${Zt.endTime}`), Zt;
              })(jt, An);
        }
        function tn(jt) {
          if (Ge) {
            const An = Ge.childNodes;
            for (let pn = 0; pn < An.length; ++pn)
              An[pn].id === jt.cueID && (Ge.removeChild(An[pn]), --pn);
          }
        }
        function fn() {
          const jt = Q.getTextTracks(),
            An = [];
          for (const pn of jt)
            pn.manualMode === P.default.TEXT_SHOWING && An.push(pn);
          return An;
        }
        function nr(jt) {
          return jt >= 0 && Te[jt]
            ? Q.getTextTrack(
                Te[jt].kind,
                Te[jt].id,
                Te[jt].lang,
                Te[jt].isTTML,
                Te[jt].isEmbedded
              )
            : null;
        }
        function Bn(jt) {
          if (jt === se) return;
          se = jt;
          const An = nr(se);
          wr.call(this, An),
            $e && (clearInterval($e), ($e = null)),
            An &&
              An.renderingType === "html" &&
              (nt.call(this, An, !0),
              window.ResizeObserver
                ? ((Se = new window.ResizeObserver(() => {
                    nt.call(this, An, !0);
                  })),
                  Se.observe(Q.getElement()))
                : ($e = setInterval(nt.bind(this, An), 500)));
        }
        function wr(jt) {
          Hi.call(this),
            jt && jt.renderingType === "html" ? Fi.call(this) : Xi.call(this);
        }
        function hr(jt, An) {
          if (!jt.cues) return !1;
          for (let pn = 0; pn < jt.cues.length; pn++)
            if (
              jt.cues[pn].startTime === An.startTime &&
              jt.cues[pn].endTime === An.endTime
            )
              return !0;
          return !1;
        }
        function pi(jt, An, pn) {
          let Mn =
            !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3];
          return (
            !!jt &&
            (isNaN(An) || (Mn ? jt.startTime : jt.endTime) >= An) &&
            (isNaN(pn) || (Mn ? jt.endTime : jt.startTime) <= pn)
          );
        }
        function Rn(jt, An, pn) {
          if (!(pn < An) && jt && (jt.cues || jt.manualCueList)) {
            const Mn = jt.cues && jt.cues.length > 0 ? "native" : "custom",
              Zt = Mn === "native" ? jt.cues : jt.manualCueList;
            if (!Zt || Zt.length === 0) return;
            for (let Fn = Zt.length - 1; Fn >= 0; Fn--)
              pi(Zt[Fn], An, pn, !0) &&
                !ni(Zt[Fn]) &&
                (Mn === "native"
                  ? jt.removeCue(Zt[Fn])
                  : (tn(Zt[Fn]), delete jt.manualCueList[Fn]));
          }
        }
        function $r(jt, An, pn) {
          let Mn =
            !(arguments.length > 3 && arguments[3] !== void 0) || arguments[3];
          if (jt && (jt.cues || jt.manualCueList)) {
            const Zt = jt.cues && jt.cues.length > 0 ? "native" : "custom",
              Fn = Zt === "native" ? jt.cues : jt.manualCueList;
            if (!Fn || Fn.length === 0) return;
            for (let Hn = Fn.length - 1; Hn >= 0; Hn--)
              pi(Fn[Hn], An, pn, Mn) &&
                (Zt === "native"
                  ? (Fn[Hn].onexit && Fn[Hn].onexit(), jt.removeCue(Fn[Hn]))
                  : (tn(Fn[Hn]), delete jt.manualCueList[Hn]));
          }
        }
        function ni(jt) {
          const An = Q.getTime();
          return An >= jt.startTime && An <= jt.endTime;
        }
        function Fi() {
          let jt = document.getElementById("native-cue-style");
          if (jt) return;
          (jt = document.createElement("style")),
            (jt.id = "native-cue-style"),
            document.head.appendChild(jt);
          const An = jt.sheet,
            pn = Q.getElement();
          try {
            pn &&
              (pn.id
                ? An.insertRule(
                    "#" + pn.id + "::cue {background: transparent}",
                    0
                  )
                : pn.classList.length !== 0
                ? An.insertRule(
                    "." + pn.className + "::cue {background: transparent}",
                    0
                  )
                : An.insertRule("video::cue {background: transparent}", 0));
          } catch (Mn) {
            ve.info("" + Mn.message);
          }
        }
        function Xi() {
          const jt = document.getElementById("native-cue-style");
          jt && document.head.removeChild(jt);
        }
        function Hi() {
          if (Oe) for (; Oe.firstChild; ) Oe.removeChild(Oe.firstChild);
        }
        return (
          (fe = {
            addCaptions: We,
            addTextTrackInfo: function (jt) {
              Te.push(jt);
            },
            createTracks: function () {
              Te.sort(function (An, pn) {
                return An.index - pn.index;
              }),
                (Oe = Q.getTTMLRenderingDiv()),
                (Ge = Q.getVttRenderingDiv());
              let jt = -1;
              for (let An = 0; An < Te.length; An++) {
                const pn = rt(Te[An]);
                _e.push(pn),
                  Te[An].defaultTrack && ((pn.default = !0), (jt = An));
                const Mn = nr(An);
                Mn &&
                  ((Mn.mode = P.default.TEXT_SHOWING),
                  Oe && (Te[An].isTTML || Te[An].isEmbedded)
                    ? (Mn.renderingType = "html")
                    : (Mn.renderingType = "default")),
                  We(An, 0, Te[An].captionData),
                  K.trigger(S.default.TEXT_TRACK_ADDED);
              }
              if ((Bn.call(this, jt), jt >= 0)) {
                let An = function () {
                  const pn = nr(jt);
                  pn && pn.renderingType === "html" && nt.call(this, pn, !0),
                    K.off(S.default.PLAYBACK_METADATA_LOADED, An, this);
                };
                K.on(S.default.PLAYBACK_METADATA_LOADED, An, this);
                for (let pn = 0; pn < Te.length; pn++) {
                  const Mn = nr(pn);
                  if (Mn) {
                    const Zt =
                      ee.get().streaming.text.dispatchForManualRendering;
                    (Mn.mode =
                      pn !== jt || Zt
                        ? P.default.TEXT_HIDDEN
                        : P.default.TEXT_SHOWING),
                      (Mn.manualMode =
                        pn === jt
                          ? P.default.TEXT_SHOWING
                          : P.default.TEXT_HIDDEN);
                  }
                }
              }
              K.trigger(G.default.TEXT_TRACKS_QUEUE_INITIALIZED, {
                index: se,
                tracks: Te,
                streamId: q.id,
              });
            },
            deleteAllTextTracks: function () {
              const jt = _e ? _e.length : 0;
              for (let An = 0; An < jt; An++) {
                const pn = nr(An);
                pn && $r.call(this, pn, q.start, q.start + q.duration, !1);
              }
              (_e = []),
                (Te = []),
                $e && (clearInterval($e), ($e = null)),
                Se && Q && (Se.unobserve(Q.getElement()), (Se = null)),
                (se = -1),
                Hi.call(this);
            },
            deleteCuesFromTrackIdx: function (jt, An, pn) {
              const Mn = nr(jt);
              Mn && $r(Mn, An, pn);
            },
            disableManualTracks: function () {
              const jt = fn();
              if (jt && jt.length > 0) {
                const An = jt[0].manualCueList;
                An &&
                  An.length > 0 &&
                  An.forEach((pn) => {
                    if (pn.isActive) {
                      if (
                        ((pn.isActive = !1),
                        ee.get().streaming.text.dispatchForManualRendering)
                      )
                        Ue(pn);
                      else if (Ge) {
                        const Mn = Ge.childNodes;
                        for (let Zt = 0; Zt < Mn.length; ++Zt)
                          Mn[Zt].id === pn.cueID &&
                            (Ge.removeChild(Mn[Zt]), --Zt);
                      }
                    }
                  });
              }
            },
            getCurrentTrackIdx: function () {
              return se;
            },
            getCurrentTextTrackInfo: function () {
              return Te[se];
            },
            getStreamId: function () {
              return q.id;
            },
            getTextTrackInfos: function () {
              return Te;
            },
            getTrackIdxForId: function (jt) {
              let An = -1;
              for (let pn = 0; pn < Te.length; pn++)
                if (Te[pn].id === jt) {
                  An = pn;
                  break;
                }
              return An;
            },
            initialize: function () {
              typeof window < "u" &&
                typeof navigator < "u" &&
                ((ne = window.VTTCue || window.TextTrackCue),
                (Te = []),
                (_e = []),
                (se = -1),
                (le = 0),
                (me = 0),
                (we = 0),
                (Me = 0),
                (Oe = null),
                (Ge = null),
                ($e = null),
                (qe = !1),
                (be = 2147483647),
                (Re = null),
                (ke = "requestAnimationFrame" in window),
                document.fullscreenElement !== void 0
                  ? (Fe = "fullscreenElement")
                  : document.webkitIsFullScreen !== void 0
                  ? (Fe = "webkitIsFullScreen")
                  : document.msFullscreenElement
                  ? (Fe = "msFullscreenElement")
                  : document.mozFullScreen && (Fe = "mozFullScreen"));
            },
            manualCueProcessing: function (jt) {
              const An = fn();
              if (An && An.length > 0) {
                const pn = An[0].manualCueList;
                pn &&
                  pn.length > 0 &&
                  pn.forEach((Mn) => {
                    Mn.startTime <= jt && Mn.endTime >= jt && !Mn.isActive
                      ? ((Mn.isActive = !0),
                        ee.get().streaming.text.dispatchForManualRendering
                          ? Ie(Mn)
                          : WebVTT.processCues(window, [Mn], Ge, Mn.cueID))
                      : Mn.isActive &&
                        (Mn.startTime > jt || Mn.endTime < jt) &&
                        ((Mn.isActive = !1),
                        ee.get().streaming.text.dispatchForManualRendering
                          ? Ue(Mn)
                          : tn(Mn));
                  });
              }
            },
            setCurrentTrackIdx: Bn,
            setModeForTrackIdx: function (jt, An) {
              const pn = nr(jt);
              pn && pn.mode !== An && (pn.mode = An),
                pn && pn.manualMode !== An && (pn.manualMode = An);
            },
          }),
          (ve = (0, E.default)(U).getInstance().getLogger(fe)),
          fe
        );
      }
      qv.__dashjs_factory_name = "TextTracks";
      var hA = H.default.getClassFactory(qv);
      function I_() {
        const Y = this.context;
        let U, K, Q, q, ee, fe;
        function ve(se) {
          const le = se.split(":"),
            me = le.length - 1;
          return (
            (se = 60 * parseInt(le[me - 1], 10) + parseFloat(le[me])),
            me === 2 && (se += 3600 * parseInt(le[0], 10)),
            se
          );
        }
        function ne(se) {
          const le = se.split(q),
            me = le[1].split(fe);
          return (
            me.shift(),
            (le[1] = me[0]),
            me.shift(),
            { cuePoints: le, styles: Te(me) }
          );
        }
        function Te(se) {
          const le = {};
          return (
            se.forEach(function (me) {
              if (me.split(/:/).length > 1) {
                let we = me.split(/:/)[1],
                  Me = !1;
                we &&
                  we.search(/%/) != -1 &&
                  ((Me = !0), (we = parseInt(we.replace(/%/, ""), 10))),
                  (me.match(/align/) || me.match(/A/)) && (le.align = we),
                  (me.match(/line/) || me.match(/L/)) &&
                    ((le.line = we === "auto" ? we : parseInt(we, 10)),
                    Me && (le.snapToLines = !1)),
                  (me.match(/position/) || me.match(/P/)) && (le.position = we),
                  (me.match(/size/) || me.match(/S/)) && (le.size = we);
              }
            }),
            le
          );
        }
        function _e(se, le) {
          let me,
            we = le,
            Me = "",
            Oe = "";
          for (; se[we] !== "" && we < se.length; ) we++;
          if (((me = we - le), me > 1))
            for (let Ge = 0; Ge < me; Ge++) {
              if (((Oe = se[le + Ge]), Oe.match(q))) {
                Me = "";
                break;
              }
              (Me += Oe),
                Ge !== me - 1 &&
                  (Me += `
`);
            }
          else (Oe = se[le]), Oe.match(q) || (Me = Oe);
          return Me;
        }
        return (
          (U = {
            parse: function (se) {
              const le = [];
              let me, we;
              if (!se) return le;
              (me = (se = se.split(Q)).length), (we = -1);
              for (let Me = 0; Me < me; Me++) {
                let Oe = se[Me];
                if (Oe.length > 0 && Oe !== "WEBVTT" && Oe.match(q)) {
                  const Ge = ne(Oe),
                    $e = Ge.cuePoints,
                    Fe = Ge.styles,
                    qe = _e(se, Me + 1),
                    Re = ve($e[0].replace(ee, "")),
                    be = ve($e[1].replace(ee, ""));
                  !isNaN(Re) && !isNaN(be) && Re >= we && be > Re
                    ? qe !== ""
                      ? ((we = Re),
                        le.push({ start: Re, end: be, data: qe, styles: Fe }))
                      : K.error("Skipping cue due to empty/malformed cue text")
                    : K.error("Skipping cue due to incorrect cue timing");
                }
              }
              return le;
            },
            getCaptionStyles: Te,
          }),
          (K = (0, E.default)(Y).getInstance().getLogger(U)),
          (Q = /(?:\r\n|\r|\n)/gm),
          (q = /-->/),
          (ee = /(^[\s]+|[\s]+$)/g),
          (fe = /\s\b/g),
          U
        );
      }
      I_.__dashjs_factory_name = "VTTParser";
      var fA = H.default.getSingletonFactory(I_);
      function NP() {
        let Y, U;
        return (
          (Y = {
            parse: function (K) {
              let Q = [];
              return (
                (U.oncue = function (q) {
                  (q.start = q.startTime),
                    (q.end = q.endTime),
                    (q.data = q.text),
                    (q.styles = {
                      align: q.align,
                      line: q.line,
                      position: q.position,
                      size: q.size,
                    }),
                    Q.push(q);
                }),
                U.parse(K),
                Q
              );
            },
          }),
          (function () {
            try {
              window &&
                window.WebVTT &&
                window.WebVTT.Parser &&
                (U = new window.WebVTT.Parser(
                  window,
                  window.vttjs,
                  window.WebVTT.StringDecoder()
                ));
            } catch {}
          })(),
          Y
        );
      }
      NP.__dashjs_factory_name = "VttCustomRenderingParser";
      var dG = H.default.getSingletonFactory(NP);
      function D_() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K,
          Q,
          q = 0;
        function ee() {
          const fe = "cue_TTML_" + q;
          return q++, fe;
        }
        return (
          (K = {
            parse: function (fe, ve, ne, Te, _e) {
              let se = "";
              const le = [];
              let me, we, Me;
              const Oe = {},
                Ge = {};
              let $e = "",
                Fe = "",
                qe = {
                  onOpenTag: function (Se, ke, he) {
                    if (
                      (he[" imagetype"] &&
                        !he[" imageType"] &&
                        (U.trigger(S.default.CONFORMANCE_VIOLATION, {
                          level: gg.LEVELS.ERROR,
                          event: gg.EVENTS.NON_COMPLIANT_SMPTE_IMAGE_ATTRIBUTE,
                        }),
                        (he[" imageType"] = he[" imagetype"])),
                      ke === "image" &&
                        (Se ===
                          "http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt" ||
                          Se ===
                            "http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"))
                    ) {
                      if (!he[" imageType"] || he[" imageType"].value !== "PNG")
                        return void Q.warn(
                          "smpte-tt imageType != PNG. Discarded"
                        );
                      $e = he["http://www.w3.org/XML/1998/namespace id"].value;
                    }
                  },
                  onCloseTag: function () {
                    $e && (Ge[$e] = Fe.trim()), (Fe = ""), ($e = "");
                  },
                  onText: function (Se) {
                    $e && (Fe += Se);
                  },
                };
              if (!fe) throw ((se = "no ttml data to parse"), new Error(se));
              (Oe.data = fe), U.trigger(G.default.TTML_TO_PARSE, Oe);
              let Re = (0, g2.fromXML)(
                Oe.data,
                function (Se) {
                  se = Se;
                },
                qe
              );
              U.trigger(G.default.TTML_PARSED, {
                ttmlString: Oe.data,
                ttmlDoc: Re,
              });
              const be = Re.getMediaTimeEvents();
              for (Me = 0; Me < be.length; Me++) {
                let Se = (0, g2.generateISD)(Re, be[Me], function (ke) {
                  se = ke;
                });
                Se.contents.some((ke) => ke.contents.length) &&
                  ((me = be[Me] + ve),
                  (we = be[Me + 1] + ve),
                  me < we &&
                    le.push({
                      start: me,
                      end: we,
                      type: "html",
                      cueID: ee(),
                      isd: Se,
                      images: _e,
                      embeddedImages: Ge,
                    }));
              }
              if (se !== "") throw (Q.error(se), new Error(se));
              return le;
            },
          }),
          (Q = (0, E.default)(Y).getInstance().getLogger(K)),
          K
        );
      }
      D_.__dashjs_factory_name = "TTMLParser";
      var cp = H.default.getSingletonFactory(D_);
      function m2(Y) {
        let U = this.context;
        const K = (0, X.default)(U).getInstance(),
          Q = ar(U).getInstance(),
          q = Y.adapter,
          ee = Y.baseURLController;
        let fe, ve, ne;
        function Te(le, me) {
          let we,
            Me,
            Oe = !1;
          if (ee.resolve()) {
            const Fe = q.getVoRepresentations(le);
            Fe && Fe.length > 0 && (we = ee.resolve(Fe[0].path).url);
          }
          const Ge = le.essentialProperties.filter(
              (Fe) =>
                Fe.schemeIdUri &&
                Fe.schemeIdUri === P.default.FONT_DOWNLOAD_DVB_SCHEME
            ),
            $e = le.supplementalProperties.filter(
              (Fe) =>
                Fe.schemeIdUri &&
                Fe.schemeIdUri === P.default.FONT_DOWNLOAD_DVB_SCHEME
            );
          Ge.length > 0 ? ((Oe = !0), (Me = Ge)) : (Me = $e),
            Me.forEach((Fe) => {
              if (
                (qe = Fe).value &&
                parseInt(qe.value) === 1 &&
                qe.dvbUrl &&
                qe.dvbUrl.length > 0 &&
                qe.dvbFontFamily &&
                qe.dvbFontFamily.length > 0 &&
                qe.dvbMimeType &&
                (qe.dvbMimeType === P.default.OFF_MIMETYPE ||
                  qe.dvbMimeType === P.default.WOFF_MIMETYPE)
              ) {
                let Se =
                  ((Re = Fe.dvbUrl),
                  (be = we),
                  Q.isPathAbsolute(Re)
                    ? Re
                    : Q.isRelative(Re)
                    ? be
                      ? Q.resolve(Re, be)
                      : Q.resolve(Re)
                    : Re);
                ne.push({
                  fontFamily: Fe.dvbFontFamily,
                  url: Se,
                  mimeType: Fe.dvbMimeType,
                  trackId: le.id,
                  streamId: me,
                  isEssential: Oe,
                  status: "unloaded",
                  fontFace: new FontFace(Fe.dvbFontFamily, `url(${Se})`, {
                    display: "swap",
                  }),
                });
              }
              var qe, Re, be;
            });
        }
        function _e(le, me) {
          const we = ne[le];
          ne[le] = { ...we, status: me };
        }
        function se() {
          ne = [];
        }
        return (
          (fe = {
            addFontsFromTracks: function (le, me) {
              if (le && Array.isArray(le) && me)
                for (let we = 0; we < le.length; we++) Te(le[we], me);
            },
            downloadFonts: function () {
              for (let le = 0; le < ne.length; le++) {
                let me = ne[le];
                document.fonts.add(me.fontFace),
                  K.trigger(S.default.DVB_FONT_DOWNLOAD_ADDED, me),
                  me.fontFace.load().then(
                    () => {
                      _e(le, "loaded"),
                        K.trigger(S.default.DVB_FONT_DOWNLOAD_COMPLETE, me);
                    },
                    (we) => {
                      _e(le, "error"),
                        ve.debug("Font download error: ", we),
                        K.trigger(S.default.DVB_FONT_DOWNLOAD_FAILED, me);
                    }
                  );
              }
            },
            getFonts: function () {
              return ne;
            },
            getFontsForTrackId: function (le) {
              return ne.filter((me) => me.trackId && me.trackId === le);
            },
            reset: function () {
              (function () {
                for (const le of ne) {
                  let me = document.fonts.delete(le.fontFace);
                  ve.debug(
                    `Removal of fontFamily: ${le.fontFamily} was ${
                      me ? "successful" : "unsuccessful"
                    }`
                  );
                }
              })(),
                se();
            },
          }),
          (ve = (0, E.default)(U).getInstance().getLogger(fe)),
          se(),
          fe
        );
      }
      m2.__dashjs_factory_name = "DVBFonts";
      var hG = H.default.getClassFactory(m2);
      function P_(Y) {
        let U = this.context;
        const K = Y.adapter,
          Q = Y.errHandler,
          q = Y.manifestModel,
          ee = Y.mediaController,
          fe = Y.baseURLController,
          ve = Y.videoModel,
          ne = Y.settings;
        let Te, _e, se, le, me, we, Me, Oe, Ge, $e, Fe, qe, Re, be;
        function Se(We) {
          if (
            (be.error(
              `Could not download ${
                We.isEssential ? "an essential" : "a"
              } font - fontFamily: ${We.fontFamily}, url: ${We.url}`
            ),
            We.isEssential)
          ) {
            let Ke = le[We.streamId].getTrackIdxForId(We.trackId);
            le[We.streamId].setModeForTrackIdx(Ke, P.default.TEXT_DISABLED);
          }
        }
        function ke(We) {
          if (
            (be.debug(
              `Successfully downloaded ${
                We.isEssential ? "an essential" : "a"
              } font - fontFamily: ${We.fontFamily}, url: ${We.url}`
            ),
            We.isEssential)
          ) {
            let Ke = le[We.streamId].getTrackIdxForId(We.trackId);
            Ke === le[We.streamId].getCurrentTrackIdx()
              ? le[We.streamId].setModeForTrackIdx(Ke, P.default.TEXT_SHOWING)
              : le[We.streamId].setModeForTrackIdx(Ke, P.default.TEXT_HIDDEN);
          }
        }
        function he(We) {
          let Ke = We.tracks,
            Ie = We.index;
          const Ue = We.streamId;
          if ((ne.get().streaming.text.defaultEnabled === !1 && !vt()) || qe)
            ce(Ue, -1);
          else {
            const at = ee.getCurrentTrackFor(P.default.TEXT, Ue);
            if (at) {
              const ft = {
                lang: at.lang,
                role: at.roles[0],
                index: at.index,
                codec: at.codec,
                accessibility: at.accessibility[0],
              };
              Ke.some((Rt, an) => {
                if (ee.matchSettings(ft, Rt)) return ce(Ue, an), (Ie = an), !0;
              });
            }
            Ge = !1;
          }
          (_e[Ue].lastEnabledIndex = Ie),
            Oe.trigger(S.default.TEXT_TRACKS_ADDED, {
              enabled: vt(),
              index: Ie,
              tracks: Ke,
              streamId: Ue,
            }),
            (Fe = !0),
            Re.addFontsFromTracks(Ke, Ue),
            Re.getFonts().forEach((at) => {
              if (at.isEssential) {
                let ft = le[at.streamId].getTrackIdxForId(at.trackId);
                le[at.streamId].setModeForTrackIdx(ft, P.default.TEXT_DISABLED);
              }
            }),
            Re.downloadFonts();
        }
        function rt(We) {
          try {
            const Ke = We.streamId;
            if (!le[Ke] || isNaN(We.time)) return;
            le[Ke].manualCueProcessing(We.time);
          } catch {}
        }
        function Ze(We) {
          try {
            const Ke = We.streamId;
            if (!le[Ke]) return;
            le[Ke].disableManualTracks();
          } catch {}
        }
        function nt(We) {
          try {
            if (
              !We ||
              !We.mediaType ||
              We.mediaType !== P.default.AUDIO ||
              !We.currentMediaInfo
            )
              return;
            const Ke = le[We.streamId].getCurrentTextTrackInfo();
            let Ie = NaN;
            Ge
              ? (Ie = Ve(We.streamId))
              : je(Ke) &&
                We.currentMediaInfo.lang &&
                We.currentMediaInfo.lang !== Ke.lang &&
                ((Ie = Ve(We.streamId)), isNaN(Ie) && (Ie = -1)),
              isNaN(Ie) || ce(We.streamId, Ie);
          } catch (Ke) {
            be.error(Ke);
          }
        }
        function vt() {
          let We = !0;
          return Ge && !$e && (We = !1), We;
        }
        function ce(We, Ke) {
          (Ge = Ke === -1), Ge && ee && ee.saveTextSettingsDisabled();
          let Ie = it(We);
          if (Ie === Ke || !le[We]) return;
          le[We].disableManualTracks();
          let Ue = le[We].getCurrentTextTrackInfo(),
            at = Ue
              ? ve.getTextTrack(
                  Ue.kind,
                  Ue.id,
                  Ue.lang,
                  Ue.isTTML,
                  Ue.isEmbedded
                )
              : null;
          at &&
            at.mode !== P.default.TEXT_DISABLED &&
            le[We].setModeForTrackIdx(Ie, P.default.TEXT_HIDDEN),
            le[We].setCurrentTrackIdx(Ke),
            (Ue = le[We].getCurrentTextTrackInfo());
          const ft = ne.get().streaming.text.dispatchForManualRendering;
          if (
            (Ue &&
              !ft &&
              Ue.mode !== P.default.TEXT_DISABLED &&
              le[We].setModeForTrackIdx(Ke, P.default.TEXT_SHOWING),
            Ue && Ue.isFragmented && !Ue.isEmbedded)
          )
            (function (tn, fn, nr) {
              if (!se[tn]) return;
              let Bn = se[tn].getConfig().fragmentedTracks;
              for (let wr = 0; wr < Bn.length; wr++) {
                let hr = Bn[wr];
                if (
                  fn.lang === hr.lang &&
                  (hr.id ? fn.id === hr.id : fn.index === hr.index)
                ) {
                  let pi = ee.getCurrentTrackFor(P.default.TEXT, tn);
                  (hr.id ? pi.id !== hr.id : pi.index !== hr.index)
                    ? (le[tn].deleteCuesFromTrackIdx(nr),
                      se[tn].setCurrentFragmentedTrackIdx(wr))
                    : nr === -1 &&
                      Oe.trigger(
                        G.default.SET_FRAGMENTED_TEXT_AFTER_DISABLED,
                        {},
                        { streamId: tn, mediaType: P.default.TEXT }
                      );
                }
              }
            })(We, Ue, Ie);
          else if (Ue && !Ue.isFragmented)
            (Rt = We),
              (an = Ue),
              Oe.trigger(
                G.default.SET_NON_FRAGMENTED_TEXT,
                { currentTrackInfo: an },
                { streamId: Rt, mediaType: P.default.TEXT }
              );
          else if (!Ue && Ge) {
            const tn = Ve(We);
            return void (isNaN(tn) || ce(We, tn));
          }
          var Rt, an;
          ee.setTrack(Ue);
        }
        function Ve(We) {
          const Ke = le[We].getTextTrackInfos().filter(
            (at, ft) => (
              (at._indexToSelect = ft),
              !!(at && at.roles && at.roles.length > 0) && je(at)
            )
          );
          if (!Ke || Ke.length <= 0) return NaN;
          const Ie = ee.getCurrentTrackFor(P.default.AUDIO, We);
          if (!Ie) return NaN;
          const Ue = Ke.find((at) => Ie.lang === at.lang);
          return Ue ? Ue._indexToSelect : NaN;
        }
        function je(We) {
          return (
            !(!We || !We.roles || We.roles.length === 0) &&
            We.roles.some(
              (Ke) =>
                Ke.schemeIdUri === P.default.DASH_ROLE_SCHEME_ID &&
                Ke.value === I.default.FORCED_SUBTITLE
            )
          );
        }
        function it(We) {
          return le[We].getCurrentTrackIdx();
        }
        function Qe() {
          (se = {}), (le = {}), (_e = {}), (Ge = !0), (Fe = !1), (qe = !1);
        }
        return (
          (Te = {
            addEmbeddedTrack: function (We, Ke) {
              const Ie = We.id;
              se[Ie] && se[Ie].addEmbeddedTrack(Ke);
            },
            addMediaInfosToBuffer: function (We, Ke, Ie) {
              let Ue =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : null;
              const at = We.id;
              se[at] && se[at].addMediaInfos(Ke, Ie, Ue);
            },
            createTracks: function (We) {
              const Ke = We.id;
              le[Ke] && le[Ke].createTracks();
            },
            deactivateStream: function (We) {
              if (!We) return;
              const Ke = We.id;
              se[Ke] && se[Ke].resetMediaInfos(),
                le[Ke] && le[Ke].deleteAllTextTracks();
            },
            enableForcedTextStreaming: function (We) {
              return (0, Wt.checkParameterType)(We, "boolean"), ($e = We), !0;
            },
            enableText: function (We, Ke) {
              return (
                (0, Wt.checkParameterType)(Ke, "boolean"),
                vt() !== Ke &&
                  (Ke && ce(We, _e[We].lastEnabledIndex),
                  Ke ||
                    ((_e[We].lastEnabledIndex = it(We)),
                    Fe ? ce(We, -1) : (qe = !0))),
                !0
              );
            },
            getAllTracksAreDisabled: function () {
              return Ge;
            },
            getCurrentTrackIdx: it,
            getTextSourceBuffer: function (We) {
              const Ke = We.id;
              if (se && se[Ke]) return se[Ke];
            },
            initialize: function () {
              (Re = hG(U).create({ adapter: K, baseURLController: fe })),
                Oe.on(G.default.TEXT_TRACKS_QUEUE_INITIALIZED, he, Te),
                Oe.on(G.default.DVB_FONT_DOWNLOAD_FAILED, Se, Te),
                Oe.on(G.default.DVB_FONT_DOWNLOAD_COMPLETE, ke, Te),
                Oe.on(G.default.MEDIAINFO_UPDATED, nt, Te),
                ne.get().streaming.text.webvtt.customRenderingEnabled &&
                  (Oe.on(G.default.PLAYBACK_TIME_UPDATED, rt, Te),
                  Oe.on(G.default.PLAYBACK_SEEKING, Ze, Te));
            },
            initializeForStream: function (We) {
              const Ke = We.id,
                Ie = hA(U).create({
                  videoModel: ve,
                  settings: ne,
                  streamInfo: We,
                });
              Ie.initialize(), (le[Ke] = Ie);
              const Ue = dA(U).create({
                errHandler: Q,
                adapter: K,
                dvbFonts: Re,
                manifestModel: q,
                mediaController: ee,
                videoModel: ve,
                textTracks: Ie,
                vttParser: me,
                vttCustomRenderingParser: we,
                ttmlParser: Me,
                streamInfo: We,
                settings: ne,
              });
              Ue.initialize(),
                (se[Ke] = Ue),
                (_e[Ke] = {}),
                (_e[Ke].lastEnabledIndex = -1);
            },
            isTextEnabled: vt,
            reset: function () {
              Object.keys(se).forEach((We) => {
                se[We].resetEmbedded(), se[We].reset();
              }),
                Re.reset(),
                Qe(),
                Oe.off(G.default.TEXT_TRACKS_QUEUE_INITIALIZED, he, Te),
                Oe.off(G.default.DVB_FONT_DOWNLOAD_FAILED, Se, Te),
                Oe.off(G.default.DVB_FONT_DOWNLOAD_COMPLETE, ke, Te),
                Oe.off(G.default.MEDIAINFO_UPDATED, nt, Te),
                ne.get().streaming.text.webvtt.customRenderingEnabled &&
                  (Oe.off(G.default.PLAYBACK_TIME_UPDATED, rt, Te),
                  Oe.off(G.default.PLAYBACK_SEEKING, Ze, Te));
            },
            setTextTrack: ce,
            clearDataForStream: function (We) {
              se[We] && (se[We].resetEmbedded(), se[We].reset(), delete se[We]),
                le[We] && (le[We].deleteAllTextTracks(), delete le[We]),
                _e[We] && delete _e[We];
            },
          }),
          ($e = !1),
          (Fe = !1),
          (qe = !1),
          (me = fA(U).getInstance()),
          (we = dG(U).getInstance()),
          (Me = cp(U).getInstance()),
          (Oe = (0, X.default)(U).getInstance()),
          (be = (0, E.default)(U).getInstance().getLogger(Te)),
          Qe(),
          Te
        );
      }
      P_.__dashjs_factory_name = "TextController";
      var y2 = H.default.getClassFactory(P_);
      function fG(Y) {
        Y = Y || {};
        const U = this.context,
          K = (0, E.default)(U).getInstance(),
          Q = Y.settings,
          q = (0, X.default)(U).getInstance();
        let ee, fe, ve, ne, Te, _e;
        function se() {
          return navigator &&
            navigator.connection &&
            !isNaN(navigator.connection.downlink) &&
            navigator.connection.downlink > 0
            ? 1e3 * navigator.connection.downlink
            : NaN;
        }
        function le(Me, Oe, Ge, $e) {
          const Fe = Math.pow(0.5, Ge / $e.fast);
          Me.fastEstimate = (1 - Fe) * Oe + Fe * Me.fastEstimate;
          const qe = Math.pow(0.5, Ge / $e.slow);
          (Me.slowEstimate = (1 - qe) * Oe + qe * Me.slowEstimate),
            (Me.totalWeight += Ge);
        }
        function me() {
          (ee = {}), (fe = {}), (ve = {}), (ne = {});
        }
        const we = {
          addEntry: function (Me, Oe) {
            try {
              if (!(Me && Oe && Oe.trace && Oe.trace.length)) return;
              (ee[(Ge = Me)] = ee[Ge] || []),
                (fe[Ge] = fe[Ge] || []),
                (ve[Ge] = ve[Ge] || {
                  fastEstimate: 0,
                  slowEstimate: 0,
                  totalWeight: 0,
                }),
                (ne[Ge] = ne[Ge] || {
                  fastEstimate: 0,
                  slowEstimate: 0,
                  totalWeight: 0,
                });
              const $e = Oe.tresponse.getTime() - Oe.trequest.getTime() || 1;
              let Fe = (function (qe, Re) {
                return qe._fileLoaderType &&
                  qe._fileLoaderType === P.default.FILE_LOADER_TYPES.FETCH
                  ? (function (be) {
                      const Se = be.trace.reduce((rt, Ze) => rt + Ze.b[0], 0),
                        ke = be.trace.reduce((rt, Ze) => rt + Ze.d, 0);
                      let he = NaN;
                      return (
                        Q.get().streaming.abr.throughput
                          .useNetworkInformationApi.fetch && (he = se()),
                        isNaN(he) && (he = Math.round((8 * Se) / ke)),
                        { downloadedBytes: Se, value: he, downloadTimeInMs: ke }
                      );
                    })(qe)
                  : (function (be, Se) {
                      let ke = NaN,
                        he = NaN,
                        rt = !1;
                      if (
                        Q.get().streaming.abr.throughput.useResourceTimingApi &&
                        be._resourceTimingValues
                      )
                        (ke = be._resourceTimingValues.transferSize),
                          (he =
                            be._resourceTimingValues.responseEnd -
                            be._resourceTimingValues.responseStart),
                          (rt = !0);
                      else {
                        if (be.trace.length <= 1)
                          return { throughput: NaN, downloadTimeInMs: NaN };
                        (ke =
                          be.trace.reduce((nt, vt) => nt + vt.b[0], 0) -
                          be.trace[0].b[0]),
                          (he = Math.max(
                            be.trace.reduce((nt, vt) => nt + vt.d, 0) -
                              be.trace[0].d,
                            1
                          ));
                      }
                      let Ze = NaN;
                      if (
                        (!rt &&
                          Q.get().streaming.abr.throughput
                            .useNetworkInformationApi.xhr &&
                          (Ze = se()),
                        isNaN(Ze))
                      ) {
                        const nt = Q.get().streaming.abr.throughput
                          .useDeadTimeLatency
                          ? he
                          : he + Se;
                        Ze = Math.round((8 * ke) / nt);
                      }
                      return {
                        downloadedBytes: ke,
                        value: Ze,
                        downloadTimeInMs: he,
                      };
                    })(qe, Re);
              })(Oe, $e);
              if (
                ((Fe.latencyInMs = $e), isNaN(Fe.value) || !isFinite(Fe.value))
              )
                return;
              if (Oe.cmsd) {
                const qe =
                  Oe.cmsd.dynamic && Oe.cmsd.dynamic.etp
                    ? Oe.cmsd.dynamic.etp
                    : null;
                if (qe) {
                  const Re = Q.get().streaming.cmsd.abr.etpWeightRatio;
                  Re > 0 &&
                    Re <= 1 &&
                    (Fe.value = Fe.value * (1 - Re) + qe * Re);
                }
              }
              if (
                (function (qe, Re, be) {
                  return Q.get().streaming.abr.throughput
                    .useResourceTimingApi && be._resourceTimingValues
                    ? be._resourceTimingValues.transferSize === 0 &&
                        be._resourceTimingValues.decodedBodySize > 0
                    : !isNaN(Re) &&
                        (qe === P.default.VIDEO
                          ? Re <
                            Q.get().streaming.cacheLoadThresholds[
                              P.default.VIDEO
                            ]
                          : qe === P.default.AUDIO
                          ? Re <
                            Q.get().streaming.cacheLoadThresholds[
                              P.default.AUDIO
                            ]
                          : void 0);
                })(Me, Oe._tfinish.getTime() - Oe.trequest.getTime(), Oe)
              )
                return void _e.debug(
                  `${Me} Assuming segment ${Oe.url} came from cache, ignoring it for throughput calculation`
                );
              _e.debug(`Added throughput entry for ${Me}: ${Fe.value} kbit/s`),
                (Fe.serviceLocation = Oe._serviceLocation),
                ee[Me].push(Fe),
                fe[Me].push({ value: $e }),
                (function (qe) {
                  ee[qe].length >
                    Q.get().streaming.abr.throughput.sampleSettings
                      .maxMeasurementsToKeep && ee[qe].shift(),
                    fe[qe].length >
                      Q.get().streaming.abr.throughput.sampleSettings
                        .maxMeasurementsToKeep && fe[qe].shift();
                })(Me),
                q.trigger(S.default.THROUGHPUT_MEASUREMENT_STORED, {
                  throughputValues: Fe,
                }),
                Oe.type !== F.HTTPRequest.MPD_TYPE &&
                  (le(
                    ve[Me],
                    Fe.value,
                    Q.get().streaming.abr.throughput.ewma
                      .weightDownloadTimeMultiplicationFactor *
                      Fe.downloadTimeInMs,
                    Te.bandwidthHalfLife
                  ),
                  le(ne[Me], $e, 1, Te.latencyHalfLife));
            } catch ($e) {
              _e.error($e);
            }
            var Ge;
          },
          getThroughputDict: function (Me) {
            return Me ? ee[Me] : ee;
          },
          getEwmaThroughputDict: function (Me) {
            return Me ? ve[Me] : ve;
          },
          getEwmaLatencyDict: function (Me) {
            return Me ? ne[Me] : ne;
          },
          getEwmaHalfLife: function () {
            return Te;
          },
          getLatencyDict: function (Me) {
            return Me ? fe[Me] : fe;
          },
          reset: me,
        };
        return (
          (_e = K.getLogger(we)),
          (Te = {
            bandwidthHalfLife: {
              fast: Q.get().streaming.abr.throughput.ewma
                .throughputFastHalfLifeSeconds,
              slow: Q.get().streaming.abr.throughput.ewma
                .throughputSlowHalfLifeSeconds,
            },
            latencyHalfLife: {
              fast: Q.get().streaming.abr.throughput.ewma
                .latencyFastHalfLifeCount,
              slow: Q.get().streaming.abr.throughput.ewma
                .latencySlowHalfLifeCount,
            },
          }),
          me(),
          we
        );
      }
      fG.__dashjs_factory_name = "ThroughputModel";
      var d7 = H.default.getClassFactory(fG);
      function pG() {
        const Y = this.context,
          U = (0, X.default)(Y).getInstance();
        let K, Q, q;
        function ee() {
          performance.clearResourceTimings();
        }
        function fe(Fe) {
          Fe.metric !== O.HTTP_REQUEST ||
            !Fe.value ||
            (Fe.value.type !== F.HTTPRequest.MPD_TYPE &&
              (Fe.value.type !== F.HTTPRequest.MEDIA_SEGMENT_TYPE ||
                (Fe.mediaType !== P.default.AUDIO &&
                  Fe.mediaType !== P.default.VIDEO))) ||
            K.addEntry(Fe.mediaType, Fe.value);
        }
        function ve(Fe, qe) {
          let Re,
            be =
              arguments.length > 2 && arguments[2] !== void 0
                ? arguments[2]
                : null,
            Se =
              arguments.length > 3 && arguments[3] !== void 0
                ? arguments[3]
                : NaN,
            ke = null,
            he = K.getEwmaHalfLife(),
            rt = null,
            Ze = !0;
          switch (
            (be ||
              (be = q.get().streaming.abr.throughput.averageCalculationMode),
            Fe)
          ) {
            case P.default.THROUGHPUT_TYPES.BANDWIDTH:
              (ke =
                be === P.default.THROUGHPUT_CALCULATION_MODES.EWMA
                  ? K.getEwmaThroughputDict(qe)
                  : K.getThroughputDict(qe)),
                (rt = he.bandwidthHalfLife),
                (Ze = !0),
                (Se = isNaN(Se)
                  ? Q.getIsDynamic()
                    ? q.get().streaming.abr.throughput.sampleSettings.live
                    : q.get().streaming.abr.throughput.sampleSettings.vod
                  : Se);
              break;
            case P.default.THROUGHPUT_TYPES.LATENCY:
              (ke =
                be === P.default.THROUGHPUT_CALCULATION_MODES.EWMA
                  ? K.getEwmaLatencyDict(qe)
                  : K.getLatencyDict(qe)),
                (rt = he.latencyHalfLife),
                (Ze = !1),
                (Se = isNaN(Se)
                  ? q.get().streaming.abr.throughput.sampleSettings
                      .averageLatencySampleAmount
                  : Se);
          }
          if (!ke || ke.length === 0) return NaN;
          switch (be) {
            case P.default.THROUGHPUT_CALCULATION_MODES.ARITHMETIC_MEAN:
              return (Re = ne(ke, Se, Fe)), Te(ke, Re);
            case P.default.THROUGHPUT_CALCULATION_MODES
              .BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:
              return (Re = ne(ke, Se, Fe)), _e(ke, Re);
            case P.default.THROUGHPUT_CALCULATION_MODES
              .DATE_WEIGHTED_ARITHMETIC_MEAN:
              return (Re = ne(ke, Se, Fe)), se(ke, Re);
            case P.default.THROUGHPUT_CALCULATION_MODES.HARMONIC_MEAN:
              return (Re = ne(ke, Se, Fe)), le(ke, Re);
            case P.default.THROUGHPUT_CALCULATION_MODES
              .BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:
              return (Re = ne(ke, Se, Fe)), me(ke, Re);
            case P.default.THROUGHPUT_CALCULATION_MODES
              .DATE_WEIGHTED_HARMONIC_MEAN:
              return (Re = ne(ke, Se, Fe)), we(ke, Re);
            case P.default.THROUGHPUT_CALCULATION_MODES.EWMA:
              return Me(ke, rt, Ze);
            case P.default.THROUGHPUT_CALCULATION_MODES.ZLEMA:
              return (Re = ne(ke, Se, Fe)), Oe(ke, Re);
          }
        }
        function ne(Fe, qe, Re) {
          if (Fe) {
            if (qe >= Fe.length) qe = Fe.length;
            else if (
              Re === P.default.THROUGHPUT_TYPES.BANDWIDTH &&
              q.get().streaming.abr.throughput.sampleSettings
                .enableSampleSizeAdjustment
            )
              for (let be = 1; be < qe; ++be) {
                const Se =
                  Fe[Fe.length - be].value / Fe[Fe.length - be - 1].value;
                if (
                  (Se >=
                    q.get().streaming.abr.throughput.sampleSettings
                      .increaseScale ||
                    Se <=
                      q.get().streaming.abr.throughput.sampleSettings
                        .decreaseScale) &&
                  (qe += 1) === Fe.length
                )
                  break;
              }
          } else qe = 0;
          return qe;
        }
        function Te(Fe, qe) {
          let Re = Fe;
          return qe !== 0 && Re && Re.length !== 0
            ? ((Re = Re.slice(-qe)),
              Re.reduce((be, Se) => be + Se.value, 0) / Re.length)
            : NaN;
        }
        function _e(Fe, qe) {
          let Re = Fe;
          if (qe === 0 || !Re || Re.length === 0) return NaN;
          Re = Re.slice(-qe);
          let be = 0;
          return (
            Re.reduce((Se, ke) => {
              let he = Math.sqrt(ke.downloadedBytes);
              return (be += he), Se + ke.value * he;
            }, 0) / be
          );
        }
        function se(Fe, qe) {
          let Re = Fe;
          if (qe === 0 || !Re || Re.length === 0) return NaN;
          Re = Re.slice(-qe);
          let be = 0;
          return (
            Re.reduce((Se, ke, he) => {
              let rt = he + 1;
              return (be += rt), Se + ke.value * rt;
            }, 0) / be
          );
        }
        function le(Fe, qe) {
          let Re = Fe;
          if (qe === 0 || !Re || Re.length === 0) return NaN;
          Re = Re.slice(-qe);
          const be = Re.reduce((Se, ke) => Se + 1 / ke.value, 0);
          return Re.length / be;
        }
        function me(Fe, qe) {
          let Re = Fe;
          if (qe === 0 || !Re || Re.length === 0) return NaN;
          Re = Re.slice(-qe);
          let be = 0;
          const Se = Re.reduce((ke, he) => {
            let rt = Math.sqrt(he.downloadedBytes);
            return (be += rt), ke + (1 / he.value) * rt;
          }, 0);
          return be / Se;
        }
        function we(Fe, qe) {
          let Re = Fe;
          if (qe === 0 || !Re || Re.length === 0) return NaN;
          Re = Re.slice(-qe);
          let be = 0;
          const Se = Re.reduce((ke, he, rt) => {
            let Ze = rt + 1;
            return (be += Ze), ke + (1 / he.value) * Ze;
          }, 0);
          return be / Se;
        }
        function Me(Fe, qe) {
          let Re =
            !(arguments.length > 2 && arguments[2] !== void 0) || arguments[2];
          if (!Fe || Fe.totalWeight <= 0) return NaN;
          const be =
              Fe.fastEstimate / (1 - Math.pow(0.5, Fe.totalWeight / qe.fast)),
            Se =
              Fe.slowEstimate / (1 - Math.pow(0.5, Fe.totalWeight / qe.slow));
          return Re ? Math.min(be, Se) : Math.max(be, Se);
        }
        function Oe(Fe, qe) {
          if (qe === 0 || !Fe || Fe.length === 0) return NaN;
          let Re = Fe.slice(-qe).map((he) => he.value),
            be = 2 / (Re.length + 1),
            Se = Re[Re.length - 1],
            ke = Re[Re.length - 1];
          for (let he = 0; he < Re.length; he++)
            (Se = be * Re[he] + (1 - be) * Se), (ke = be * Se + (1 - be) * ke);
          return ke;
        }
        function Ge(Fe) {
          let qe =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : null,
            Re =
              arguments.length > 2 && arguments[2] !== void 0
                ? arguments[2]
                : NaN;
          const be = ve(P.default.THROUGHPUT_TYPES.BANDWIDTH, Fe, qe, Re);
          return Math.round(be);
        }
        const $e = {
          getArithmeticMean: Te,
          getAverageLatency: function (Fe) {
            let qe =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : null,
              Re =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : NaN;
            const be = ve(P.default.THROUGHPUT_TYPES.LATENCY, Fe, qe, Re);
            return Math.round(be);
          },
          getAverageThroughput: Ge,
          getByteSizeWeightedArithmeticMean: _e,
          getByteSizeWeightedHarmonicMean: me,
          getDateWeightedArithmeticMean: se,
          getDateWeightedHarmonicMean: we,
          getEwma: Me,
          getHarmonicMean: le,
          getRawThroughputData: function (Fe) {
            return Fe ? K.getThroughputDict(Fe) : [];
          },
          getSafeAverageThroughput: function (Fe) {
            let qe = Ge(
              Fe,
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : null,
              arguments.length > 2 && arguments[2] !== void 0
                ? arguments[2]
                : NaN
            );
            return (
              isNaN(qe) ||
                (qe *= q.get().streaming.abr.throughput.bandwidthSafetyFactor),
              qe
            );
          },
          getZlema: Oe,
          initialize: function () {
            (K = d7(Y).create({ settings: q })),
              U.on(S.default.METRIC_ADDED, fe, $e),
              performance &&
                performance.addEventListener("resourcetimingbufferfull", ee);
          },
          reset: function () {
            K.reset(),
              U.off(S.default.METRIC_ADDED, fe, $e),
              performance &&
                performance.removeEventListener("resourcetimingbufferfull", ee);
          },
          setConfig: function (Fe) {
            Fe.settings && (q = Fe.settings),
              Fe.playbackController && (Q = Fe.playbackController);
          },
        };
        return $e;
      }
      pG.__dashjs_factory_name = "ThroughputController";
      var gG = H.default.getSingletonFactory(pG);
      function Km() {
        const Y =
            "You must first call initialize() and set a source before calling this method",
          U =
            "You must first call initialize() and set a valid source and view before calling this method",
          K =
            "You must first call attachView() to set the video element before calling this method",
          Q =
            "You must first call attachSource() with a valid source before calling this method",
          q = "MediaPlayer not initialized!",
          ee = this.context,
          fe = (0, X.default)(ee).getInstance();
        let ve = (0, ue.default)(ee).getInstance();
        const ne = (0, E.default)(ee).getInstance({ settings: ve });
        let Te,
          _e,
          se,
          le,
          me,
          we,
          Me,
          Oe,
          Ge,
          $e,
          Fe,
          qe,
          Re,
          be,
          Se,
          ke,
          he,
          rt,
          Ze,
          nt,
          vt,
          ce,
          Ve,
          je,
          it,
          Qe,
          We,
          Ke,
          Ie,
          Ue,
          at,
          ft,
          Rt,
          an,
          tn,
          fn,
          nr,
          Bn,
          wr,
          hr,
          pi;
        function Rn() {
          fr(null),
            Hn(null),
            (le = null),
            Se && (Se.reset(), (Se = null)),
            ke && (ke.reset(), (ke = null)),
            vt && vt.reset(),
            ve.reset(),
            rt && (rt.reset(), (rt = null));
        }
        function $r() {
          return !!se && !!nr.getElement();
        }
        function ni() {
          return (0, JO.getVersionString)();
        }
        function Fi() {
          if (!Me) throw U;
          return Ie.isPaused();
        }
        function Xi() {
          if (!Me) throw U;
          return Ie.getIsDynamic();
        }
        function Hi(ct) {
          const Vt =
            Qe && Qe.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO;
          let kn = Rt.getCurrentDVRInfo(Vt);
          return kn ? jt(kn.range.start + ct, kn) : 0;
        }
        function jt(ct, Vt) {
          let kn = Ie.getOriginalLiveDelay();
          return ct > Vt.range.end - kn && (ct = Vt.range.end - kn), ct;
        }
        function An() {
          let ct =
            arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
          if (!Me) throw U;
          let Vt = Fn().currentTime;
          return ct !== "" && (Vt = Qe.getTimeRelativeToStreamId(Vt, ct)), Vt;
        }
        function pn(ct) {
          (0, Wt.checkParameterType)(ct, "boolean"), (Oe = ct);
        }
        function Mn() {
          vt.restoreDefaultUTCTimingSources();
        }
        function Zt() {
          return Rt;
        }
        function Fn() {
          if (!nr.getElement()) throw K;
          return nr.getElement();
        }
        function Hn(ct) {
          if (!me) throw q;
          nr.setElement(ct),
            ct &&
              (rr(),
              (function () {
                if (ke || typeof dashjs > "u") return;
                let Vt = dashjs.MetricsReporting;
                typeof Vt == "function" &&
                  (ke = Vt(ee)
                    .create()
                    .createMetricsReporting({
                      debug: ne,
                      eventBus: fe,
                      mediaElement: Fn(),
                      adapter: Ze,
                      dashMetrics: Rt,
                      mediaPlayerModel: nt,
                      events: G.default,
                      constants: P.default,
                      metricsConstants: O,
                    }));
              })(),
              (function () {
                if (he || typeof dashjs > "u") return;
                let Vt = dashjs.MssHandler;
                typeof Vt == "function" &&
                  (de.extend(Vt.errors),
                  (he = Vt(ee).create({
                    eventBus: fe,
                    mediaPlayerModel: nt,
                    dashMetrics: Rt,
                    manifestModel: an,
                    playbackController: Ie,
                    streamController: Qe,
                    protectionController: Se,
                    baseURLController: Ve,
                    errHandler: ce,
                    events: G.default,
                    constants: P.default,
                    debug: ne,
                    initSegmentType: F.HTTPRequest.INIT_SEGMENT_TYPE,
                    BASE64: tf,
                    ISOBoxer: fh,
                    settings: ve,
                  })));
              })(),
              Qe && Qe.switchToVideoElement(Ge)),
            Me && Jt(),
            gn(Ge);
        }
        function Sr(ct) {
          if (!we) throw Y;
          let Vt = Qe.getActiveStreamInfo();
          return Vt
            ? be
                .getTracksFor(ct, Vt.id)
                .filter((kn) => !Se || Se.areKeyIdsUsable(kn.normalizedKeyIds))
            : [];
        }
        function fr(ct) {
          let Vt =
            arguments.length > 1 && arguments[1] !== void 0
              ? arguments[1]
              : NaN;
          if (!me) throw q;
          typeof ct == "string" && Bn.initialize(ct),
            Vt == null && (Vt = NaN),
            isNaN(Vt) || (Vt = Math.max(0, Vt)),
            (Ge = Vt),
            (se = ct),
            (we || Me) && Jt(),
            $r() && gn(Ge);
        }
        function Lr() {
          if (!we) throw Y;
          let ct = Qe.getActiveStreamInfo();
          return ct ? Qe.getStreamById(ct.id) : null;
        }
        function Jt() {
          (Me = !1),
            (we = !1),
            Ze.reset(),
            Qe.reset(),
            Ke.reset(),
            ft.reset(),
            Ie.reset(),
            Ue.reset(),
            at.reset(),
            $e.reset(),
            Fe.reset(),
            be.reset(),
            hr.reset(),
            Se &&
              (ve.get().streaming.protection.keepProtectionMediaKeys
                ? Se.stop()
                : (Se.reset(), (Se = null), rr())),
            We.reset(),
            tn.reset(),
            fn.reset();
        }
        function Cn() {
          return c_(ee).create({
            debug: ne,
            errHandler: ce,
            dashMetrics: Rt,
            mediaPlayerModel: nt,
            mssHandler: he,
            settings: ve,
          });
        }
        function rr() {
          if (Se) return Se;
          if (typeof dashjs > "u") return null;
          let ct = dashjs.Protection;
          if (typeof ct == "function") {
            let Vt = ct(ee).create();
            return (
              G.default.extend(ct.events),
              S.default.extend(ct.events, { publicOnly: !0 }),
              de.extend(ct.errors),
              (Se = Vt.createProtectionSystem({
                debug: ne,
                errHandler: ce,
                videoModel: nr,
                customParametersModel: vt,
                capabilities: je,
                eventBus: fe,
                events: G.default,
                BASE64: tf,
                constants: P.default,
                cmcdModel: tn,
                settings: ve,
              })),
              je || (je = (0, iy.default)(ee).getInstance()),
              je.setProtectionController(Se),
              Se
            );
          }
          return null;
        }
        function Er() {
          if (!me) throw q;
          if (rt) return rt;
          if (typeof dashjs > "u") return null;
          let ct = dashjs.OfflineController;
          if (typeof ct == "function") {
            G.default.extend(ct.events),
              S.default.extend(ct.events, { publicOnly: !0 }),
              de.extend(ct.errors);
            const Vt = Cn(),
              kn = Yb(ee).create();
            return (
              kn.setConfig({
                manifestModel: an,
                adapter: Ze,
                manifestLoader: Vt,
                errHandler: ce,
                contentSteeringController: at,
              }),
              (rt = ct(ee).create({
                debug: ne,
                manifestUpdater: kn,
                baseURLController: Ve,
                manifestLoader: Vt,
                manifestModel: an,
                mediaPlayerModel: nt,
                abrController: $e,
                playbackController: Ie,
                adapter: Ze,
                errHandler: ce,
                dashMetrics: Rt,
                timelineConverter: Re,
                segmentBaseController: hr,
                schemeLoaderFactory: qe,
                eventBus: fe,
                events: G.default,
                errors: de,
                constants: P.default,
                settings: ve,
                dashConstants: I.default,
                urlUtils: ar(ee).getInstance(),
              })),
              rt
            );
          }
          return null;
        }
        function gn() {
          let ct =
            arguments.length > 0 && arguments[0] !== void 0
              ? arguments[0]
              : NaN;
          rt && rt.resetRecords(),
            !we &&
              se &&
              ((we = !0),
              _e.info("Streaming Initialized"),
              (function () {
                const Vt = Cn();
                Qe || (Qe = mu(ee).getInstance()),
                  We ||
                    (We = y2(ee).create({
                      errHandler: ce,
                      manifestModel: an,
                      adapter: Ze,
                      mediaController: be,
                      baseURLController: Ve,
                      videoModel: nr,
                      settings: ve,
                    })),
                  it.setConfig({
                    capabilities: je,
                    customParametersModel: vt,
                    adapter: Ze,
                    settings: ve,
                    protectionController: Se,
                    manifestModel: an,
                    errHandler: ce,
                  }),
                  Qe.setConfig({
                    capabilities: je,
                    capabilitiesFilter: it,
                    manifestLoader: Vt,
                    manifestModel: an,
                    mediaPlayerModel: nt,
                    customParametersModel: vt,
                    protectionController: Se,
                    textController: We,
                    adapter: Ze,
                    dashMetrics: Rt,
                    errHandler: ce,
                    timelineConverter: Re,
                    videoModel: nr,
                    playbackController: Ie,
                    serviceDescriptionController: Ue,
                    contentSteeringController: at,
                    abrController: $e,
                    throughputController: Fe,
                    mediaController: be,
                    settings: ve,
                    baseURLController: Ve,
                    uriFragmentModel: Bn,
                    segmentBaseController: hr,
                  }),
                  Ke.setConfig({
                    settings: ve,
                    playbackController: Ie,
                    streamController: Qe,
                    videoModel: nr,
                    timelineConverter: Re,
                    adapter: Ze,
                  }),
                  Ie.setConfig({
                    streamController: Qe,
                    serviceDescriptionController: Ue,
                    dashMetrics: Rt,
                    adapter: Ze,
                    videoModel: nr,
                    timelineConverter: Re,
                    settings: ve,
                  }),
                  ft.setConfig({
                    streamController: Qe,
                    playbackController: Ie,
                    mediaPlayerModel: nt,
                    videoModel: nr,
                    settings: ve,
                  }),
                  Fe.setConfig({ settings: ve, playbackController: Ie }),
                  $e.setConfig({
                    streamController: Qe,
                    capabilities: je,
                    domStorage: wr,
                    mediaPlayerModel: nt,
                    customParametersModel: vt,
                    throughputController: Fe,
                    cmsdModel: fn,
                    dashMetrics: Rt,
                    adapter: Ze,
                    videoModel: nr,
                    settings: ve,
                  }),
                  tn.setConfig({
                    abrController: $e,
                    dashMetrics: Rt,
                    playbackController: Ie,
                    serviceDescriptionController: Ue,
                    throughputController: Fe,
                  }),
                  pi.setConfig({ serviceDescriptionController: Ue }),
                  fn.setConfig({}),
                  be.initialize(),
                  Fe.initialize(),
                  $e.initialize(),
                  Qe.initialize(Oe, le),
                  We.initialize(),
                  Ke.initialize(),
                  ft.initialize(),
                  tn.initialize(Oe),
                  fn.initialize(),
                  at.initialize(),
                  hr.initialize();
              })(),
              typeof se == "string"
                ? Qe.load(se, ct)
                : Qe.loadWithManifest(se, ct)),
            !Me &&
              $r() &&
              ((Me = !0),
              fe.trigger(S.default.PLAYBACK_INITIALIZED),
              _e.info("Playback Initialized"));
        }
        return (
          (Te = {
            addABRCustomRule: function (ct, Vt, kn) {
              vt.addAbrCustomRule(ct, Vt, kn);
            },
            addRequestInterceptor: function (ct) {
              vt.addRequestInterceptor(ct);
            },
            addResponseInterceptor: function (ct) {
              vt.addResponseInterceptor(ct);
            },
            addUTCTimingSource: function (ct, Vt) {
              vt.addUTCTimingSource(ct, Vt);
            },
            attachProtectionController: function (ct) {
              Se = ct;
            },
            attachSource: fr,
            attachTTMLRenderingDiv: function (ct) {
              if (!nr.getElement()) throw K;
              nr.setTTMLRenderingDiv(ct);
            },
            attachView: Hn,
            attachVttRenderingDiv: function (ct) {
              if (!nr.getElement()) throw K;
              nr.setVttRenderingDiv(ct);
            },
            clearDefaultUTCTimingSources: function () {
              vt.clearDefaultUTCTimingSources();
            },
            convertToTimeCode: function (ct) {
              ct = Math.max(ct, 0);
              let Vt = Math.floor(ct / 3600),
                kn = Math.floor((ct % 3600) / 60),
                zt = Math.floor((ct % 3600) % 60);
              return (
                (Vt === 0
                  ? ""
                  : Vt < 10
                  ? "0" + Vt.toString() + ":"
                  : Vt.toString() + ":") +
                (kn < 10 ? "0" + kn.toString() : kn.toString()) +
                ":" +
                (zt < 10 ? "0" + zt.toString() : zt.toString())
              );
            },
            destroy: function () {
              Rn(), H.default.deleteSingletonInstances(ee);
            },
            duration: function () {
              if (!Me) throw U;
              let ct = Fn().duration;
              if (Ie.getIsDynamic()) {
                const Vt =
                  Qe && Qe.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO;
                let kn = Rt.getCurrentDVRInfo(Vt);
                ct = kn ? kn.range.end - kn.range.start : 0;
              }
              return ct;
            },
            enableForcedTextStreaming: function (ct) {
              return (
                !(!Qe.getActiveStreamInfo() || !We) &&
                We.enableForcedTextStreaming(ct)
              );
            },
            enableText: function (ct) {
              const Vt = Qe.getActiveStreamInfo();
              return !(!Vt || !We) && We.enableText(Vt.id, ct);
            },
            extend: function (ct, Vt, kn) {
              H.default.extend(ct, Vt, kn, ee);
            },
            formatUTC: function (ct, Vt, kn) {
              let zt =
                arguments.length > 3 && arguments[3] !== void 0 && arguments[3];
              const zn = new Date(1e3 * ct),
                Rr = zn.toLocaleDateString(Vt),
                vi = zn.toLocaleTimeString(Vt, { hour12: kn });
              return zt ? vi + " " + Rr : vi;
            },
            getABRCustomRules: function () {
              return vt.getAbrCustomRules();
            },
            getActiveStream: Lr,
            getAutoPlay: function () {
              return Oe;
            },
            getAvailableBaseUrls: function () {
              const ct = an.getValue();
              return ct ? Ve.getBaseUrls(ct) : [];
            },
            getAvailableLocations: function () {
              const ct = an.getValue();
              if (!ct) return [];
              const Vt = Ze.getLocation(ct),
                kn = at.getSynthesizedLocationElements(Vt);
              return Vt.concat(kn);
            },
            getAverageLatency: function () {
              let ct =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : P.default.VIDEO,
                Vt =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : null,
                kn =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : NaN;
              return Fe ? Fe.getAverageLatency(ct, Vt, kn) : 0;
            },
            getAverageThroughput: function () {
              let ct =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : P.default.VIDEO,
                Vt =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : null,
                kn =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : NaN;
              return Fe ? Fe.getAverageThroughput(ct, Vt, kn) : 0;
            },
            getBufferLength: function (ct) {
              const Vt = [P.default.VIDEO, P.default.AUDIO, P.default.TEXT];
              if (ct)
                return Vt.indexOf(ct) !== -1
                  ? Zt().getCurrentBufferLevel(ct) || NaN
                  : (_e.warn("getBufferLength requested for invalid type"),
                    NaN);
              {
                const kn = Vt.map((zt) =>
                  Sr(zt).length > 0
                    ? Zt().getCurrentBufferLevel(zt)
                    : Number.MAX_VALUE
                ).reduce((zt, zn) => Math.min(zt, zn));
                return kn === Number.MAX_VALUE ? NaN : kn;
              }
            },
            getCurrentLiveLatency: function () {
              if (!me) throw q;
              return Me ? Ie.getCurrentLiveLatency() : NaN;
            },
            getCurrentRepresentationForType: function (ct) {
              if (!we) throw Y;
              if (
                ct !== P.default.IMAGE &&
                ct !== P.default.VIDEO &&
                ct !== P.default.AUDIO
              )
                return null;
              const Vt = Lr();
              if (!Vt) return null;
              if (ct === P.default.IMAGE) {
                const kn = Vt.getThumbnailController();
                return kn ? kn.getCurrentTrack() : -1;
              }
              return Vt.getCurrentRepresentationForType(ct);
            },
            getCurrentSteeringResponseData: function () {
              if (at) return at.getCurrentSteeringResponseData();
            },
            getCurrentTextTrackIndex: function () {
              let ct = NaN;
              const Vt = Qe.getActiveStreamInfo();
              if (Vt && We) return (ct = We.getCurrentTrackIdx(Vt.id)), ct;
            },
            getCurrentTrackFor: function (ct) {
              if (!we) throw Y;
              let Vt = Qe.getActiveStreamInfo();
              return Vt ? be.getCurrentTrackFor(ct, Vt.id) : null;
            },
            getDashAdapter: function () {
              return Ze;
            },
            getDashMetrics: Zt,
            getDebug: function () {
              return ne;
            },
            getDvrSeekOffset: Hi,
            getDvrWindow: function () {
              if (!Me) throw U;
              const ct =
                Qe && Qe.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO;
              let Vt = Rt.getCurrentDVRInfo(ct);
              if (!Vt) return {};
              let kn = 0;
              const zt = Ie.getIsDynamic();
              return (
                zt && (kn = Vt.manifestInfo.availableFrom.getTime() / 1e3),
                {
                  start: Vt.range.start,
                  end: Vt.range.end,
                  startAsUtc: zt ? kn + Vt.range.start : NaN,
                  endAsUtc: zt ? kn + Vt.range.end : NaN,
                  size: Vt.range.end - Vt.range.start,
                }
              );
            },
            getInitialMediaSettingsFor: function (ct) {
              if (!me) throw q;
              return be.getInitialSettings(ct);
            },
            getLowLatencyModeEnabled: function () {
              if (!Me) throw U;
              return Ie.getLowLatencyModeEnabled();
            },
            getManifest: function () {
              return an.getValue();
            },
            getOfflineController: function () {
              return Er();
            },
            getPlaybackRate: function () {
              return Fn().playbackRate;
            },
            getProtectionController: function () {
              return rr();
            },
            getRawThroughputData: function () {
              let ct =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : P.default.VIDEO;
              return Fe ? Fe.getRawThroughputData(ct) : [];
            },
            getRepresentationsByType: function (ct) {
              let Vt =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : null;
              if (!we) throw Y;
              let kn = Vt ? Qe.getStreamById(Vt) : Lr();
              return kn ? kn.getRepresentationsByType(ct) : [];
            },
            getSafeAverageThroughput: function () {
              let ct =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : P.default.VIDEO,
                Vt =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : null,
                kn =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : NaN;
              return Fe ? Fe.getSafeAverageThroughput(ct, Vt, kn) : 0;
            },
            getSettings: function () {
              return ve.get();
            },
            getSource: function () {
              if (!se) throw Q;
              return se;
            },
            getStreamsFromManifest: function (ct) {
              if (!we) throw Y;
              return Ze.getStreamsInfo(ct);
            },
            getTTMLRenderingDiv: function () {
              return nr ? nr.getTTMLRenderingDiv() : null;
            },
            getTargetLiveDelay: function () {
              if (!Me) throw U;
              return Ie.getOriginalLiveDelay();
            },
            getTracksFor: Sr,
            getTracksForTypeFromManifest: function (ct, Vt, kn) {
              if (!we) throw Y;
              return (kn = kn || Ze.getStreamsInfo(Vt, 1)[0])
                ? Ze.getAllMediaInfoForType(kn, ct, Vt)
                : [];
            },
            getVersion: ni,
            getVideoElement: Fn,
            getVolume: function () {
              return Fn().volume;
            },
            getXHRWithCredentialsForType: function (ct) {
              return vt.getXHRWithCredentialsForType(ct);
            },
            initialize: function (ct, Vt, kn) {
              let zt =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : NaN;
              je ||
                ((je = (0, iy.default)(ee).getInstance()),
                je.setConfig({ settings: ve, protectionController: Se })),
                ce || (ce = ys(ee).getInstance()),
                je.supportsMediaSource()
                  ? (me ||
                      ((me = !0),
                      (Re = oG(ee).getInstance()),
                      Fe || (Fe = gG(ee).getInstance()),
                      $e || ($e = EP(ee).getInstance()),
                      qe || (qe = e2(ee).getInstance()),
                      Ie || (Ie = W(ee).getInstance()),
                      be || (be = yg(ee).getInstance()),
                      Qe || (Qe = mu(ee).getInstance()),
                      Ke || (Ke = o2(ee).getInstance()),
                      ft || (ft = As(ee).getInstance()),
                      Ue || (Ue = Qa(ee).getInstance()),
                      at || (at = Vv(ee).getInstance()),
                      it || (it = Bc(ee).getInstance()),
                      (Ze = ay(ee).getInstance()),
                      (an = h_(ee).getInstance()),
                      (tn = Gb(ee).getInstance()),
                      (fn = Bb(ee).getInstance()),
                      (pi = dg(ee).getInstance()),
                      (Rt = aG(ee).getInstance({ settings: ve })),
                      (wr = QO(ee).getInstance({ settings: ve })),
                      Ze.setConfig({
                        constants: P.default,
                        cea608parser: new N(),
                        errHandler: ce,
                        BASE64: tf,
                      }),
                      Ve || (Ve = Um(ee).create()),
                      Ve.setConfig({
                        adapter: Ze,
                        contentSteeringController: at,
                      }),
                      Ue.setConfig({ adapter: Ze }),
                      hr ||
                        (hr = tG(ee).getInstance({
                          dashMetrics: Rt,
                          mediaPlayerModel: nt,
                          errHandler: ce,
                          baseURLController: Ve,
                          events: G.default,
                          eventBus: fe,
                          debug: ne,
                          boxParser: Ia(ee).getInstance(),
                          errors: de,
                        })),
                      be.setConfig({
                        domStorage: wr,
                        settings: ve,
                        mediaPlayerModel: nt,
                        customParametersModel: vt,
                        videoModel: nr,
                      }),
                      nt.setConfig({
                        playbackController: Ie,
                        serviceDescriptionController: Ue,
                      }),
                      at.setConfig({
                        adapter: Ze,
                        errHandler: ce,
                        dashMetrics: Rt,
                        mediaPlayerModel: nt,
                        manifestModel: an,
                        serviceDescriptionController: Ue,
                        throughputController: Fe,
                        eventBus: fe,
                      }),
                      Mn(),
                      pn(kn === void 0 || kn),
                      Er()),
                    ct && Hn(ct),
                    Vt && fr(Vt, zt),
                    _e.info(
                      "[dash.js " + ni() + "] MediaPlayer has been initialized"
                    ))
                  : ce.error(
                      new ot.default(
                        de.CAPABILITY_MEDIASOURCE_ERROR_CODE,
                        de.CAPABILITY_MEDIASOURCE_ERROR_MESSAGE
                      )
                    );
            },
            isDynamic: Xi,
            isMuted: function () {
              return Fn().muted;
            },
            isPaused: Fi,
            isReady: $r,
            isSeeking: function () {
              if (!Me) throw U;
              return Ie.isSeeking();
            },
            isTextEnabled: function () {
              const ct = Qe.getActiveStreamInfo();
              return !(!ct || !We) && We.isTextEnabled(ct);
            },
            off: function (ct, Vt, kn) {
              fe.off(ct, Vt, kn);
            },
            on: function (ct, Vt, kn, zt) {
              fe.on(ct, Vt, kn, zt);
            },
            pause: function () {
              if (!Me) throw U;
              Ie.pause();
            },
            play: function () {
              if (!Me) throw U;
              (!Oe || (Fi() && Me)) && Ie.play(!0);
            },
            preload: function () {
              if (!nr.getElement() && !we) {
                if (!se) throw Q;
                gn(Ge);
              }
            },
            provideThumbnail: function (ct, Vt) {
              if (typeof Vt != "function") return;
              if (ct < 0) return void Vt(null);
              const kn = Ie.getIsDynamic() ? Hi(ct) : ct,
                zt = Qe.getStreamForTime(kn);
              if (zt === null) return void Vt(null);
              const zn = zt.getThumbnailController();
              if (zn) return zn.provide(kn, Vt);
              Vt(null);
            },
            refreshManifest: function (ct) {
              if (!me) throw q;
              if (!$r()) return ct(null, Q);
              let Vt = this;
              if (typeof ct == "function") {
                const kn = function (zt) {
                  fe.off(G.default.INTERNAL_MANIFEST_LOADED, kn, Vt),
                    zt.error ? ct(null, zt.error) : ct(zt.manifest);
                };
                fe.on(G.default.INTERNAL_MANIFEST_LOADED, kn, Vt);
              }
              Qe.refreshManifest();
            },
            registerCustomCapabilitiesFilter: function (ct) {
              vt.registerCustomCapabilitiesFilter(ct);
            },
            registerLicenseRequestFilter: function (ct) {
              vt.registerLicenseRequestFilter(ct);
            },
            registerLicenseResponseFilter: function (ct) {
              vt.registerLicenseResponseFilter(ct);
            },
            removeABRCustomRule: function (ct) {
              vt.removeAbrCustomRule(ct);
            },
            removeAllABRCustomRule: function () {
              vt.removeAllAbrCustomRule();
            },
            removeRequestInterceptor: function (ct) {
              vt.removeRequestInterceptor(ct);
            },
            removeResponseInterceptor: function (ct) {
              vt.removeResponseInterceptor(ct);
            },
            removeUTCTimingSource: function (ct, Vt) {
              vt.removeUTCTimingSource(ct, Vt);
            },
            reset: Rn,
            resetCustomInitialTrackSelectionFunction: function () {
              vt.resetCustomInitialTrackSelectionFunction(null);
            },
            resetSettings: function () {
              ve.reset();
            },
            restoreDefaultUTCTimingSources: Mn,
            retrieveManifest: function (ct, Vt) {
              let kn = Cn(),
                zt = this;
              const zn = function (Rr) {
                Rr.error ? Vt(null, Rr.error) : Vt(Rr.manifest),
                  fe.off(G.default.INTERNAL_MANIFEST_LOADED, zn, zt),
                  kn.reset();
              };
              fe.on(G.default.INTERNAL_MANIFEST_LOADED, zn, zt),
                Bn.initialize(ct),
                kn.load(ct);
            },
            seek: function (ct) {
              if (!Me) throw U;
              if (((0, Wt.checkParameterType)(ct, "number"), isNaN(ct)))
                throw P.default.BAD_ARGUMENT_ERROR;
              ct < 0 && (ct = 0);
              let Vt = Ie.getIsDynamic() ? Hi(ct) : ct;
              const kn = Fn();
              !Ie.getIsDynamic() &&
                kn.duration &&
                (Vt = Math.min(kn.duration, Vt)),
                Ie.seek(Vt, !1, !1, !0);
            },
            seekToOriginalLive: function () {
              Me && Xi() && Ie.seekToOriginalLive();
            },
            seekToPresentationTime: function (ct) {
              if (!Me) throw U;
              if (((0, Wt.checkParameterType)(ct, "number"), isNaN(ct)))
                throw P.default.BAD_ARGUMENT_ERROR;
              ct < 0 && (ct = 0);
              const Vt = Fn();
              if (
                (!Ie.getIsDynamic() &&
                  Vt.duration &&
                  (ct = Math.min(Vt.duration, ct)),
                Ie.getIsDynamic())
              ) {
                const kn =
                  Qe && Qe.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO;
                let zt = Rt.getCurrentDVRInfo(kn);
                if (!zt) return;
                (ct = jt(ct, zt)) < zt.range.start && (ct = zt.range.start);
              }
              Ie.seek(ct, !1, !1, !0);
            },
            setAutoPlay: pn,
            setConfig: function (ct) {
              ct &&
                (ct.capabilities && (je = ct.capabilities),
                ct.capabilitiesFilter && (it = ct.capabilitiesFilter),
                ct.streamController && (Qe = ct.streamController),
                ct.textController && (We = ct.textController),
                ct.gapController && (Ke = ct.gapController),
                ct.throughputController && (Fe = ct.throughputController),
                ct.playbackController && (Ie = ct.playbackController),
                ct.serviceDescriptionController &&
                  (Ue = ct.serviceDescriptionController),
                ct.contentSteeringController &&
                  (at = ct.contentSteeringController),
                ct.clientDataReportingController &&
                  (pi = ct.clientDataReportingController),
                ct.catchupController && (ft = ct.catchupController),
                ct.mediaPlayerModel && (nt = ct.mediaPlayerModel),
                ct.customParametersModel && (vt = ct.customParametersModel),
                ct.abrController && ($e = ct.abrController),
                ct.schemeLoaderFactory && (qe = ct.schemeLoaderFactory),
                ct.mediaController && (be = ct.mediaController),
                ct.settings && (ve = ct.settings),
                ct.dashMetrics && (Rt = ct.dashMetrics));
            },
            setCurrentTrack: function (ct) {
              let Vt =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
              if (!we) throw Y;
              !Se || Se.areKeyIdsUsable(ct.normalizedKeyIds)
                ? be.setTrack(ct, { noSettingsSave: Vt })
                : _e.error(
                    `Can not switch to track with index ${ct.index} because key is not usable`
                  );
            },
            setCustomInitialTrackSelectionFunction: function (ct) {
              vt.setCustomInitialTrackSelectionFunction(ct);
            },
            setInitialMediaSettingsFor: function (ct, Vt) {
              if (!me) throw q;
              let kn = (function (zt) {
                const zn = ve.get().streaming.defaultSchemeIdUri;
                let Rr = {};
                function vi(na, Ri, Da) {
                  let Fs = {};
                  if (Ri) {
                    if (Ri instanceof Array)
                      throw "Array type not supported for settings!";
                    return (
                      Ri instanceof Object
                        ? ((Fs.schemeIdUri = Ri.schemeIdUri
                            ? Ri.schemeIdUri
                            : ""),
                          (Fs.value = Ri.value ? Ri.value : ""))
                        : ((Fs.schemeIdUri = Da),
                          (Fs.value = Ri),
                          _e.warn(
                            "No schemeIdUri provided for " +
                              na +
                              ', using default "' +
                              Da +
                              '"'
                          )),
                      Fs
                    );
                  }
                  return null;
                }
                return (
                  zt.lang && (Rr.lang = zt.lang),
                  isNaN(zt.index) || (Rr.index = zt.index),
                  zt.viewpoint &&
                    (Rr.viewpoint = vi(
                      "viewpoint",
                      zt.viewpoint,
                      zn.viewpoint
                    )),
                  zt.audioChannelConfiguration &&
                    (Rr.audioChannelConfiguration = vi(
                      "audioChannelConfiguration",
                      zt.audioChannelConfiguration,
                      zn.audioChannelConfiguration
                    )),
                  zt.role && (Rr.role = vi("role", zt.role, zn.role)),
                  zt.accessibility &&
                    (Rr.accessibility = vi(
                      "accessibility",
                      zt.accessibility,
                      zn.accessibility
                    )),
                  Rr
                );
              })(Vt);
              be.setInitialSettings(ct, kn);
            },
            setMute: function (ct) {
              (0, Wt.checkParameterType)(ct, "boolean"), (Fn().muted = ct);
            },
            setPlaybackRate: function (ct) {
              Fn().playbackRate = ct;
            },
            setProtectionData: function (ct) {
              (le = ct), Qe && Qe.setProtectionData(le);
            },
            setRepresentationForTypeById: function (ct, Vt) {
              let kn =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
              if (
                ct !== P.default.IMAGE &&
                ct !== P.default.VIDEO &&
                ct !== P.default.AUDIO
              )
                return;
              if (!we) throw Y;
              const zt = Lr();
              if (zt)
                if (ct === P.default.IMAGE) {
                  const zn = zt.getThumbnailController();
                  zn && zn.setTrackById(Vt);
                } else {
                  const zn = zt.getRepresentationForTypeById(ct, Vt);
                  zn &&
                    $e.setPlaybackQuality(ct, Qe.getActiveStreamInfo(), zn, {
                      forceReplace: kn,
                    });
                }
            },
            setRepresentationForTypeByIndex: function (ct, Vt) {
              let kn =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
              if (
                ct !== P.default.IMAGE &&
                ct !== P.default.VIDEO &&
                ct !== P.default.AUDIO
              )
                return;
              if (!we) throw Y;
              const zt = Lr();
              if (zt)
                if (ct === P.default.IMAGE) {
                  const zn = zt.getThumbnailController();
                  zn && zn.setTrackByIndex(Vt);
                } else {
                  const zn = zt.getRepresentationForTypeByIndex(ct, Vt);
                  zn &&
                    $e.setPlaybackQuality(ct, Qe.getActiveStreamInfo(), zn, {
                      forceReplace: kn,
                    });
                }
            },
            setTextTrack: function (ct) {
              if (!Me) throw U;
              const Vt = Qe.getActiveStreamInfo();
              Vt && We && We.setTextTrack(Vt.id, ct);
            },
            setVolume: function (ct) {
              if (typeof ct != "number" || isNaN(ct) || ct < 0 || ct > 1)
                throw P.default.BAD_ARGUMENT_ERROR;
              Fn().volume = ct;
            },
            setXHRWithCredentialsForType: function (ct, Vt) {
              vt.setXHRWithCredentialsForType(ct, Vt);
            },
            time: An,
            timeAsUTC: function () {
              if (!Me) throw U;
              if (!Ie.getIsDynamic() || An() < 0) return NaN;
              const ct =
                Qe && Qe.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO;
              let Vt,
                kn,
                zt = Rt.getCurrentDVRInfo(ct);
              return zt
                ? ((Vt = zt.manifestInfo.availableFrom.getTime() / 1e3),
                  (kn = Vt + An()),
                  kn)
                : 0;
            },
            timeInDvrWindow: function () {
              if (!Me) throw U;
              if (!Ie.getIsDynamic()) return An();
              let ct = Fn().currentTime;
              const Vt =
                Qe && Qe.hasVideoTrack() ? P.default.VIDEO : P.default.AUDIO;
              let kn = Rt.getCurrentDVRInfo(Vt);
              return (
                (ct =
                  kn === null || ct === 0
                    ? 0
                    : Math.max(0, ct - kn.range.start)),
                ct
              );
            },
            trigger: function (ct, Vt, kn) {
              fe.trigger(ct, Vt, kn);
            },
            triggerSteeringRequest: function () {
              if (at) return at.loadSteeringData();
            },
            unregisterCustomCapabilitiesFilter: function (ct) {
              vt.unregisterCustomCapabilitiesFilter(ct);
            },
            unregisterLicenseRequestFilter: function (ct) {
              vt.unregisterLicenseRequestFilter(ct);
            },
            unregisterLicenseResponseFilter: function (ct) {
              vt.unregisterLicenseResponseFilter(ct);
            },
            updateSettings: function (ct) {
              ve.update(ct);
            },
            updateSource: function (ct) {
              (se = ct), Qe.load(se);
            },
          }),
          (_e = ne.getLogger(Te)),
          (me = !1),
          (Me = !1),
          (we = !1),
          (Oe = !0),
          (Ge = NaN),
          (Se = null),
          (rt = null),
          (le = null),
          (Ze = null),
          (hr = null),
          G.default.extend(S.default),
          (nt = nA(ee).getInstance()),
          (vt = (0, Hb.default)(ee).getInstance()),
          (nr = ZO(ee).getInstance()),
          (Bn = zm(ee).getInstance()),
          Te
        );
      }
      Km.__dashjs_factory_name = "MediaPlayer";
      const v2 = H.default.getClassFactory(Km);
      (v2.events = S.default),
        (v2.errors = de),
        H.default.updateClassFactory(Km.__dashjs_factory_name, v2);
      var Zm = v2;
    },
    1191: function (t, e, n) {
      n.r(e);
      var r = n(7252);
      class i extends r.default {
        constructor() {
          super(),
            (this.AST_IN_FUTURE = "astInFuture"),
            (this.BASE_URLS_UPDATED = "baseUrlsUpdated"),
            (this.BUFFER_EMPTY = "bufferStalled"),
            (this.BUFFER_LOADED = "bufferLoaded"),
            (this.BUFFER_LEVEL_STATE_CHANGED = "bufferStateChanged"),
            (this.BUFFER_LEVEL_UPDATED = "bufferLevelUpdated"),
            (this.DVB_FONT_DOWNLOAD_ADDED = "dvbFontDownloadAdded"),
            (this.DVB_FONT_DOWNLOAD_COMPLETE = "dvbFontDownloadComplete"),
            (this.DVB_FONT_DOWNLOAD_FAILED = "dvbFontDownloadFailed"),
            (this.DYNAMIC_TO_STATIC = "dynamicToStatic"),
            (this.ERROR = "error"),
            (this.FRAGMENT_LOADING_COMPLETED = "fragmentLoadingCompleted"),
            (this.FRAGMENT_LOADING_PROGRESS = "fragmentLoadingProgress"),
            (this.FRAGMENT_LOADING_STARTED = "fragmentLoadingStarted"),
            (this.FRAGMENT_LOADING_ABANDONED = "fragmentLoadingAbandoned"),
            (this.LOG = "log"),
            (this.MANIFEST_LOADING_STARTED = "manifestLoadingStarted"),
            (this.MANIFEST_LOADING_FINISHED = "manifestLoadingFinished"),
            (this.MANIFEST_LOADED = "manifestLoaded"),
            (this.METRICS_CHANGED = "metricsChanged"),
            (this.METRIC_CHANGED = "metricChanged"),
            (this.METRIC_ADDED = "metricAdded"),
            (this.METRIC_UPDATED = "metricUpdated"),
            (this.PERIOD_SWITCH_STARTED = "periodSwitchStarted"),
            (this.PERIOD_SWITCH_COMPLETED = "periodSwitchCompleted"),
            (this.QUALITY_CHANGE_REQUESTED = "qualityChangeRequested"),
            (this.QUALITY_CHANGE_RENDERED = "qualityChangeRendered"),
            (this.NEW_TRACK_SELECTED = "newTrackSelected"),
            (this.TRACK_CHANGE_RENDERED = "trackChangeRendered"),
            (this.STREAM_INITIALIZING = "streamInitializing"),
            (this.STREAM_UPDATED = "streamUpdated"),
            (this.STREAM_ACTIVATED = "streamActivated"),
            (this.STREAM_DEACTIVATED = "streamDeactivated"),
            (this.STREAM_INITIALIZED = "streamInitialized"),
            (this.STREAM_TEARDOWN_COMPLETE = "streamTeardownComplete"),
            (this.TEXT_TRACKS_ADDED = "allTextTracksAdded"),
            (this.TEXT_TRACK_ADDED = "textTrackAdded"),
            (this.CUE_ENTER = "cueEnter"),
            (this.CUE_EXIT = "cueExit"),
            (this.THROUGHPUT_MEASUREMENT_STORED =
              "throughputMeasurementStored"),
            (this.TTML_PARSED = "ttmlParsed"),
            (this.TTML_TO_PARSE = "ttmlToParse"),
            (this.CAPTION_RENDERED = "captionRendered"),
            (this.CAPTION_CONTAINER_RESIZE = "captionContainerResize"),
            (this.CAN_PLAY = "canPlay"),
            (this.CAN_PLAY_THROUGH = "canPlayThrough"),
            (this.PLAYBACK_ENDED = "playbackEnded"),
            (this.PLAYBACK_ERROR = "playbackError"),
            (this.PLAYBACK_INITIALIZED = "playbackInitialized"),
            (this.PLAYBACK_NOT_ALLOWED = "playbackNotAllowed"),
            (this.PLAYBACK_METADATA_LOADED = "playbackMetaDataLoaded"),
            (this.PLAYBACK_LOADED_DATA = "playbackLoadedData"),
            (this.PLAYBACK_PAUSED = "playbackPaused"),
            (this.PLAYBACK_PLAYING = "playbackPlaying"),
            (this.PLAYBACK_PROGRESS = "playbackProgress"),
            (this.PLAYBACK_RATE_CHANGED = "playbackRateChanged"),
            (this.PLAYBACK_SEEKED = "playbackSeeked"),
            (this.PLAYBACK_SEEKING = "playbackSeeking"),
            (this.PLAYBACK_STALLED = "playbackStalled"),
            (this.PLAYBACK_STARTED = "playbackStarted"),
            (this.PLAYBACK_TIME_UPDATED = "playbackTimeUpdated"),
            (this.PLAYBACK_VOLUME_CHANGED = "playbackVolumeChanged"),
            (this.PLAYBACK_WAITING = "playbackWaiting"),
            (this.MANIFEST_VALIDITY_CHANGED = "manifestValidityChanged"),
            (this.EVENT_MODE_ON_START = "eventModeOnStart"),
            (this.EVENT_MODE_ON_RECEIVE = "eventModeOnReceive"),
            (this.CONFORMANCE_VIOLATION = "conformanceViolation"),
            (this.REPRESENTATION_SWITCH = "representationSwitch"),
            (this.ADAPTATION_SET_REMOVED_NO_CAPABILITIES =
              "adaptationSetRemovedNoCapabilities"),
            (this.CONTENT_STEERING_REQUEST_COMPLETED =
              "contentSteeringRequestCompleted"),
            (this.INBAND_PRFT = "inbandPrft"),
            (this.MANAGED_MEDIA_SOURCE_START_STREAMING =
              "managedMediaSourceStartStreaming"),
            (this.MANAGED_MEDIA_SOURCE_END_STREAMING =
              "managedMediaSourceEndStreaming");
        }
      }
      let o = new i();
      e.default = o;
    },
    5212: function (t, e, n) {
      n.r(e),
        (e.default = {
          STREAM: "stream",
          VIDEO: "video",
          AUDIO: "audio",
          TEXT: "text",
          MUXED: "muxed",
          IMAGE: "image",
          STPP: "stpp",
          TTML: "ttml",
          VTT: "vtt",
          WVTT: "wvtt",
          CONTENT_STEERING: "contentSteering",
          LIVE_CATCHUP_MODE_DEFAULT: "liveCatchupModeDefault",
          LIVE_CATCHUP_MODE_LOLP: "liveCatchupModeLoLP",
          MOVING_AVERAGE_SLIDING_WINDOW: "slidingWindow",
          MOVING_AVERAGE_EWMA: "ewma",
          BAD_ARGUMENT_ERROR: "Invalid Arguments",
          MISSING_CONFIG_ERROR: "Missing config parameter(s)",
          TRACK_SWITCH_MODE_ALWAYS_REPLACE: "alwaysReplace",
          TRACK_SWITCH_MODE_NEVER_REPLACE: "neverReplace",
          TRACK_SELECTION_MODE_FIRST_TRACK: "firstTrack",
          TRACK_SELECTION_MODE_HIGHEST_BITRATE: "highestBitrate",
          TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY: "highestEfficiency",
          TRACK_SELECTION_MODE_WIDEST_RANGE: "widestRange",
          TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY:
            "highestSelectionPriority",
          CMCD_QUERY_KEY: "CMCD",
          CMCD_MODE_QUERY: "query",
          CMCD_MODE_HEADER: "header",
          CMCD_AVAILABLE_KEYS: [
            "br",
            "d",
            "ot",
            "tb",
            "bl",
            "dl",
            "mtp",
            "nor",
            "nrr",
            "su",
            "bs",
            "rtp",
            "cid",
            "pr",
            "sf",
            "sid",
            "st",
            "v",
          ],
          CMCD_V2_AVAILABLE_KEYS: ["msd", "ltc"],
          CMCD_AVAILABLE_REQUESTS: [
            "segment",
            "mpd",
            "xlink",
            "steering",
            "other",
          ],
          INITIALIZE: "initialize",
          TEXT_SHOWING: "showing",
          TEXT_HIDDEN: "hidden",
          TEXT_DISABLED: "disabled",
          ACCESSIBILITY_CEA608_SCHEME: "urn:scte:dash:cc:cea-608:2015",
          CC1: "CC1",
          CC3: "CC3",
          UTF8: "utf-8",
          SCHEME_ID_URI: "schemeIdUri",
          START_TIME: "starttime",
          SERVICE_DESCRIPTION_DVB_LL_SCHEME:
            "urn:dvb:dash:lowlatency:scope:2019",
          SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME:
            "urn:dvb:dash:lowlatency:critical:2019",
          CTA_5004_2023_SCHEME: "urn:mpeg:dash:cta-5004:2023",
          THUMBNAILS_SCHEME_ID_URIS: [
            "http://dashif.org/thumbnail_tile",
            "http://dashif.org/guidelines/thumbnail_tile",
          ],
          FONT_DOWNLOAD_DVB_SCHEME: "urn:dvb:dash:fontdownload:2014",
          COLOUR_PRIMARIES_SCHEME_ID_URI: "urn:mpeg:mpegB:cicp:ColourPrimaries",
          URL_QUERY_INFO_SCHEME: "urn:mpeg:dash:urlparam:2014",
          EXT_URL_QUERY_INFO_SCHEME: "urn:mpeg:dash:urlparam:2016",
          MATRIX_COEFFICIENTS_SCHEME_ID_URI:
            "urn:mpeg:mpegB:cicp:MatrixCoefficients",
          TRANSFER_CHARACTERISTICS_SCHEME_ID_URI:
            "urn:mpeg:mpegB:cicp:TransferCharacteristics",
          HDR_METADATA_FORMAT_SCHEME_ID_URI: "urn:dvb:dash:hdr-dmi",
          HDR_METADATA_FORMAT_VALUES: {
            ST2094_10: "ST2094-10",
            SL_HDR2: "SL-HDR2",
            ST2094_40: "ST2094-40",
          },
          MEDIA_CAPABILITIES_API: {
            COLORGAMUT: { SRGB: "srgb", P3: "p3", REC2020: "rec2020" },
            TRANSFERFUNCTION: { SRGB: "srgb", PQ: "pq", HLG: "hlg" },
            HDR_METADATATYPE: {
              SMPTE_ST_2094_10: "smpteSt2094-10",
              SLHDR2: "slhdr2",
              SMPTE_ST_2094_40: "smpteSt2094-40",
            },
          },
          XML: "XML",
          ARRAY_BUFFER: "ArrayBuffer",
          DVB_REPORTING_URL: "dvb:reportingUrl",
          DVB_PROBABILITY: "dvb:probability",
          OFF_MIMETYPE: "application/font-sfnt",
          WOFF_MIMETYPE: "application/font-woff",
          VIDEO_ELEMENT_READY_STATES: {
            HAVE_NOTHING: 0,
            HAVE_METADATA: 1,
            HAVE_CURRENT_DATA: 2,
            HAVE_FUTURE_DATA: 3,
            HAVE_ENOUGH_DATA: 4,
          },
          FILE_LOADER_TYPES: { FETCH: "fetch_loader", XHR: "xhr_loader" },
          THROUGHPUT_TYPES: {
            LATENCY: "throughput_type_latency",
            BANDWIDTH: "throughput_type_bandwidth",
          },
          THROUGHPUT_CALCULATION_MODES: {
            EWMA: "throughputCalculationModeEwma",
            ZLEMA: "throughputCalculationModeZlema",
            ARITHMETIC_MEAN: "throughputCalculationModeArithmeticMean",
            BYTE_SIZE_WEIGHTED_ARITHMETIC_MEAN:
              "throughputCalculationModeByteSizeWeightedArithmeticMean",
            DATE_WEIGHTED_ARITHMETIC_MEAN:
              "throughputCalculationModeDateWeightedArithmeticMean",
            HARMONIC_MEAN: "throughputCalculationModeHarmonicMean",
            BYTE_SIZE_WEIGHTED_HARMONIC_MEAN:
              "throughputCalculationModeByteSizeWeightedHarmonicMean",
            DATE_WEIGHTED_HARMONIC_MEAN:
              "throughputCalculationModeDateWeightedHarmonicMean",
          },
          LOW_LATENCY_DOWNLOAD_TIME_CALCULATION_MODE: {
            MOOF_PARSING: "lowLatencyDownloadTimeCalculationModeMoofParsing",
            DOWNLOADED_DATA:
              "lowLatencyDownloadTimeCalculationModeDownloadedData",
            AAST: "lowLatencyDownloadTimeCalculationModeAast",
          },
          RULES_TYPES: {
            QUALITY_SWITCH_RULES: "qualitySwitchRules",
            ABANDON_FRAGMENT_RULES: "abandonFragmentRules",
          },
          QUALITY_SWITCH_RULES: {
            BOLA_RULE: "BolaRule",
            THROUGHPUT_RULE: "ThroughputRule",
            INSUFFICIENT_BUFFER_RULE: "InsufficientBufferRule",
            SWITCH_HISTORY_RULE: "SwitchHistoryRule",
            DROPPED_FRAMES_RULE: "DroppedFramesRule",
            LEARN_TO_ADAPT_RULE: "L2ARule",
            LOL_PLUS_RULE: "LoLPRule",
          },
          ABANDON_FRAGMENT_RULES: {
            ABANDON_REQUEST_RULE: "AbandonRequestsRule",
          },
          ID3_SCHEME_ID_URI: "https://aomedia.org/emsg/ID3",
          COMMON_ACCESS_TOKEN_HEADER: "common-access-token",
          DASH_ROLE_SCHEME_ID: "urn:mpeg:dash:role:2011",
          CODEC_FAMILIES: {
            MP3: "mp3",
            AAC: "aac",
            AC3: "ac3",
            EC3: "ec3",
            DTSX: "dtsx",
            DTSC: "dtsc",
            AVC: "avc",
            HEVC: "hevc",
          },
        });
    },
    2861: function (t, e, n) {
      n.r(e),
        (e.default = {
          CLEARKEY_KEYSTEM_STRING: "org.w3.clearkey",
          WIDEVINE_KEYSTEM_STRING: "com.widevine.alpha",
          PLAYREADY_KEYSTEM_STRING: "com.microsoft.playready",
          PLAYREADY_RECOMMENDATION_KEYSTEM_STRING:
            "com.microsoft.playready.recommendation",
          WIDEVINE_UUID: "edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",
          PLAYREADY_UUID: "9a04f079-9840-4286-ab92-e65be0885f95",
          CLEARKEY_UUID: "e2719d58-a985-b3c9-781a-b030af78d30e",
          W3C_CLEARKEY_UUID: "1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",
          INITIALIZATION_DATA_TYPE_CENC: "cenc",
          INITIALIZATION_DATA_TYPE_KEYIDS: "keyids",
          INITIALIZATION_DATA_TYPE_WEBM: "webm",
          ENCRYPTION_SCHEME_CENC: "cenc",
          ENCRYPTION_SCHEME_CBCS: "cbcs",
          MEDIA_KEY_MESSAGE_TYPES: {
            LICENSE_REQUEST: "license-request",
            LICENSE_RENEWAL: "license-renewal",
            LICENSE_RELEASE: "license-release",
            INDIVIDUALIZATION_REQUEST: "individualization-request",
          },
          ROBUSTNESS_STRINGS: {
            WIDEVINE: {
              SW_SECURE_CRYPTO: "SW_SECURE_CRYPTO",
              SW_SECURE_DECODE: "SW_SECURE_DECODE",
              HW_SECURE_CRYPTO: "HW_SECURE_CRYPTO",
              HW_SECURE_DECODE: "HW_SECURE_DECODE",
              HW_SECURE_ALL: "HW_SECURE_ALL",
            },
          },
          MEDIA_KEY_STATUSES: {
            USABLE: "usable",
            EXPIRED: "expired",
            RELEASED: "released",
            OUTPUT_RESTRICTED: "output-restricted",
            OUTPUT_DOWNSCALED: "output-downscaled",
            STATUS_PENDING: "status-pending",
            INTERNAL_ERROR: "internal-error",
          },
        });
    },
    4469: function (t, e, n) {
      n.r(e),
        n.d(e, {
          default: function () {
            return de;
          },
        });
      class r {
        constructor() {
          (this.mpdurl = null),
            (this.errorcode = null),
            (this.terror = null),
            (this.url = null),
            (this.ipaddress = null),
            (this.servicelocation = null);
        }
      }
      (r.SSL_CONNECTION_FAILED_PREFIX = "SSL"),
        (r.DNS_RESOLUTION_FAILED = "C00"),
        (r.HOST_UNREACHABLE = "C01"),
        (r.CONNECTION_REFUSED = "C02"),
        (r.CONNECTION_ERROR = "C03"),
        (r.CORRUPT_MEDIA_ISOBMFF = "M00"),
        (r.CORRUPT_MEDIA_OTHER = "M01"),
        (r.BASE_URL_CHANGED = "F00"),
        (r.BECAME_REPORTER = "S00");
      var i = r,
        o = n(913),
        l = n(138);
      function u(ue) {
        let Z, ie;
        const Ne = (ue = ue || {}).eventBus,
          Pe = ue.dashMetrics,
          kt = ue.metricsConstants,
          Gt = ue.events;
        function B(Lt) {
          let ln = new i();
          if (ie) {
            for (const Ln in Lt) Lt.hasOwnProperty(Ln) && (ln[Ln] = Lt[Ln]);
            ln.mpdurl || (ln.mpdurl = ie.originalUrl || ie.url),
              ln.terror || (ln.terror = new Date()),
              Pe.addDVBErrors(ln);
          }
        }
        function re(Lt) {
          Lt.error || (ie = Lt.manifest);
        }
        function Ae(Lt) {
          B({ errorcode: i.BASE_URL_CHANGED, servicelocation: Lt.entry });
        }
        function lt() {
          B({ errorcode: i.BECAME_REPORTER });
        }
        function Et(Lt) {
          var ln;
          Lt.metric === kt.HTTP_REQUEST &&
            ((ln = Lt.value).responsecode === 0 ||
              ln.responsecode == null ||
              ln.responsecode >= 400 ||
              ln.responsecode < 100 ||
              ln.responsecode >= 600) &&
            B({
              errorcode: ln.responsecode || i.CONNECTION_ERROR,
              url: ln.url,
              terror: ln.tresponse,
              servicelocation: ln._serviceLocation,
            });
        }
        function St(Lt) {
          let ln;
          switch (Lt.error ? Lt.error.code : 0) {
            case MediaError.MEDIA_ERR_NETWORK:
              ln = i.CONNECTION_ERROR;
              break;
            case MediaError.MEDIA_ERR_DECODE:
              ln = i.CORRUPT_MEDIA_OTHER;
              break;
            default:
              return;
          }
          B({ errorcode: ln });
        }
        return (
          (Z = {
            initialize: function () {
              Ne.on(Gt.MANIFEST_UPDATED, re, Z),
                Ne.on(Gt.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED, Ae, Z),
                Ne.on(Gt.METRIC_ADDED, Et, Z),
                Ne.on(Gt.METRIC_UPDATED, Et, Z),
                Ne.on(Gt.PLAYBACK_ERROR, St, Z),
                Ne.on(o.default.BECAME_REPORTING_PLAYER, lt, Z);
            },
            reset: function () {
              Ne.off(Gt.MANIFEST_UPDATED, re, Z),
                Ne.off(Gt.SERVICE_LOCATION_BASE_URL_BLACKLIST_CHANGED, Ae, Z),
                Ne.off(Gt.METRIC_ADDED, Et, Z),
                Ne.off(Gt.METRIC_UPDATED, Et, Z),
                Ne.off(Gt.PLAYBACK_ERROR, St, Z),
                Ne.off(o.default.BECAME_REPORTING_PLAYER, lt, Z);
            },
          }),
          Z
        );
      }
      u.__dashjs_factory_name = "DVBErrorsTranslator";
      var c = l.default.getSingletonFactory(u),
        d = n(7377);
      function h(ue) {
        ue = ue || {};
        let Z,
          ie,
          Ne = !1,
          Pe = this.context,
          kt = ue.mediaElement;
        return (
          (Z = {
            initialize: function (Gt) {
              Gt &&
                Gt.length &&
                (Gt.forEach((B) => {
                  let re = B.starttime,
                    Ae = re + B.duration;
                  ie.add(re, Ae);
                }),
                (Ne = !!Gt[0]._useWallClockTime));
            },
            reset: function () {
              ie.clear();
            },
            isEnabled: function () {
              let Gt,
                B = ie.length;
              if (!B) return !0;
              Gt = Ne ? new Date().getTime() / 1e3 : kt.currentTime;
              for (let re = 0; re < B; re += 1) {
                let Ae = ie.start(re),
                  lt = ie.end(re);
                if (Ae <= Gt && Gt < lt) return !0;
              }
              return !1;
            },
          }),
          (ie = (0, d.default)(Pe).create()),
          Z
        );
      }
      h.__dashjs_factory_name = "RangeController";
      var f = l.default.getClassFactory(h);
      function p() {
        return {
          serialise: function ue(Z) {
            let ie,
              Ne,
              Pe = [],
              kt = [];
            for (ie in Z)
              if (Z.hasOwnProperty(ie) && ie.indexOf("_") !== 0) {
                if (
                  ((Ne = Z[ie]), Ne == null && (Ne = ""), Array.isArray(Ne))
                ) {
                  if (!Ne.length) continue;
                  (kt = []),
                    Ne.forEach(function (Gt) {
                      let B =
                        Object.prototype.toString.call(Gt).slice(8, -1) !==
                        "Object";
                      kt.push(B ? Gt : ue(Gt));
                    }),
                    (Ne = kt.map(encodeURIComponent).join(","));
                } else
                  typeof Ne == "string"
                    ? (Ne = encodeURIComponent(Ne))
                    : Ne instanceof Date
                    ? (Ne = Ne.toISOString())
                    : typeof Ne == "number" && (Ne = Math.round(Ne));
                Pe.push(ie + "=" + Ne);
              }
            return Pe.join("&");
          },
        };
      }
      p.__dashjs_factory_name = "MetricSerialiser";
      var g = l.default.getSingletonFactory(p);
      function y() {
        let ue,
          Z,
          ie,
          Ne = window.crypto || window.msCrypto,
          Pe = Uint32Array,
          kt = Math.pow(2, 8 * Pe.BYTES_PER_ELEMENT) - 1;
        function Gt() {
          Ne && (ue || (ue = new Pe(10)), Ne.getRandomValues(ue), (Z = 0));
        }
        return (
          (ie = {
            random: function (B, re) {
              let Ae;
              return (
                B || (B = 0),
                re || (re = 1),
                Ne
                  ? (Z === ue.length && Gt(), (Ae = ue[Z] / kt), (Z += 1))
                  : (Ae = Math.random()),
                Ae * (re - B) + B
              );
            },
          }),
          Gt(),
          ie
        );
      }
      y.__dashjs_factory_name = "RNG";
      var v = l.default.getSingletonFactory(y),
        b = n(1926);
      function w(ue) {
        let Z;
        ue = ue || {};
        let ie,
          Ne,
          Pe,
          kt,
          Gt,
          B,
          re,
          Ae = this.context,
          lt = [];
        const Et = ue.metricsConstants;
        function St() {
          (kt = !1), (Gt = !1), (B = null), (re = null);
        }
        return (
          (Z = {
            report: function (Lt, ln) {
              Array.isArray(ln) || (ln = [ln]),
                Gt &&
                  re.isEnabled() &&
                  ln.forEach(function (Ln) {
                    let Tr = ie.serialise(Ln);
                    Lt !== Et.DVB_ERRORS && (Tr = `metricname=${Lt}&${Tr}`),
                      (Tr = `${B}?${Tr}`),
                      (function (sr, hi, Ra) {
                        let En = new XMLHttpRequest();
                        En.withCredentials = Ne.getXHRWithCredentialsForType(
                          Et.HTTP_REQUEST_DVB_REPORTING_TYPE
                        );
                        const Zn = function () {
                          let on = lt.indexOf(En);
                          on !== -1 &&
                            (lt.splice(on, 1),
                            !(En.status >= 200 && En.status < 300) &&
                              Ra &&
                              Ra());
                        };
                        lt.push(En);
                        try {
                          En.open("GET", sr),
                            (En.onloadend = Zn),
                            (En.onerror = Zn),
                            En.send();
                        } catch {
                          En.onerror();
                        }
                      })(Tr, 0, function () {
                        Gt = !1;
                      });
                  });
            },
            initialize: function (Lt, ln) {
              let Ln;
              if (((re = ln), (B = Lt.dvbReportingUrl), !B))
                throw new Error(
                  "required parameter missing (dvb:reportingUrl)"
                );
              kt ||
                ((Ln = Lt.dvbProbability),
                Ln && (Ln === 1e3 || Ln / 1e3 >= Pe.random()) && (Gt = !0),
                (kt = !0));
            },
            reset: function () {
              St();
            },
          }),
          (ie = g(Ae).getInstance()),
          (Pe = v(Ae).getInstance()),
          (Ne = (0, b.default)(Ae).getInstance()),
          St(),
          Z
        );
      }
      w.__dashjs_factory_name = "DVBReporting";
      var k = l.default.getClassFactory(w);
      function D(ue) {
        ue = ue || {};
        const Z = { "urn:dvb:dash:reporting:2014": k },
          ie = this.context;
        let Ne;
        const Pe = ue.debug ? ue.debug.getLogger(Ne) : {},
          kt = ue.metricsConstants,
          Gt = ue.mediaPlayerModel || {};
        return (
          (Ne = {
            create: function (B, re) {
              let Ae;
              try {
                (Ae = Z[B.schemeIdUri](ie).create({
                  metricsConstants: kt,
                  mediaPlayerModel: Gt,
                })),
                  Ae.initialize(B, re);
              } catch (lt) {
                (Ae = null),
                  Pe.error(
                    `ReportingFactory: could not create Reporting with schemeIdUri ${B.schemeIdUri} (${lt.message})`
                  );
              }
              return Ae;
            },
            register: function (B, re) {
              Z[B] = re;
            },
            unregister: function (B) {
              delete Z[B];
            },
          }),
          Ne
        );
      }
      D.__dashjs_factory_name = "ReportingFactory";
      var $ = l.default.getSingletonFactory(D);
      function N(ue) {
        let Z,
          ie = [];
        const Ne = $(this.context).getInstance(ue);
        return (
          (Z = {
            initialize: function (Pe, kt) {
              Pe.some((Gt) => {
                let B = Ne.create(Gt, kt);
                if (B) return ie.push(B), !0;
              });
            },
            reset: function () {
              ie.forEach((Pe) => Pe.reset()), (ie = []);
            },
            report: function (Pe, kt) {
              ie.forEach((Gt) => Gt.report(Pe, kt));
            },
          }),
          Z
        );
      }
      N.__dashjs_factory_name = "ReportingController";
      var P = l.default.getClassFactory(N);
      function I() {
        return {
          reconstructFullMetricName: function (ue, Z, ie) {
            let Ne = ue;
            return (
              Z &&
                ((Ne += "(" + Z),
                ie && ie.length && (Ne += "," + ie),
                (Ne += ")")),
              Ne
            );
          },
          validateN: function (ue) {
            if (!ue) throw new Error("missing n");
            if (isNaN(ue)) throw new Error("n is NaN");
            if (ue < 0) throw new Error("n must be positive");
            return ue;
          },
        };
      }
      I.__dashjs_factory_name = "HandlerHelpers";
      var O = l.default.getSingletonFactory(I);
      function X(ue) {
        let Z, ie, Ne, Pe, kt, Gt;
        ue = ue || {};
        let B = this.context,
          re = O(B).getInstance(),
          Ae = [];
        const lt = ue.metricsConstants;
        function Et() {
          let St = (function () {
            try {
              return Object.keys(Ae)
                .map((Lt) => Ae[Lt])
                .reduce((Lt, ln) => (Lt.level < ln.level ? Lt : ln));
            } catch {
              return;
            }
          })();
          St && Gt !== St.t && ((Gt = St.t), ie.report(Pe, St));
        }
        return (
          (Z = {
            initialize: function (St, Lt, ln) {
              Lt &&
                ((Ne = re.validateN(ln)),
                (ie = Lt),
                (Pe = re.reconstructFullMetricName(St, ln)),
                (kt = setInterval(Et, Ne)));
            },
            reset: function () {
              clearInterval(kt),
                (kt = null),
                (Ne = 0),
                (ie = null),
                (Gt = null);
            },
            handleNewMetric: function (St, Lt, ln) {
              St === lt.BUFFER_LEVEL && (Ae[ln] = Lt);
            },
          }),
          Z
        );
      }
      X.__dashjs_factory_name = "BufferLevelHandler";
      var G = l.default.getClassFactory(X),
        H = l.default.getClassFactory(function (ue) {
          let Z,
            ie,
            Ne = (ue = ue || {}).eventBus;
          const Pe = ue.metricsConstants;
          function kt() {
            Ne.off(o.default.METRICS_INITIALISATION_COMPLETE, kt, this),
              Ne.trigger(o.default.BECAME_REPORTING_PLAYER);
          }
          return (
            (Z = {
              initialize: function (Gt, B) {
                B &&
                  ((ie = B),
                  Ne.on(o.default.METRICS_INITIALISATION_COMPLETE, kt, this));
              },
              reset: function () {
                ie = null;
              },
              handleNewMetric: function (Gt, B) {
                Gt === Pe.DVB_ERRORS && ie && ie.report(Gt, B);
              },
            }),
            Z
          );
        });
      function E(ue) {
        let Z, ie, Ne, Pe, kt, Gt;
        ue = ue || {};
        let B = [],
          re = O(this.context).getInstance();
        const Ae = ue.metricsConstants;
        function lt() {
          var Et = B;
          Et.length && ie && ie.report(kt, Et), (B = []);
        }
        return (
          (Z = {
            initialize: function (Et, St, Lt, ln) {
              St &&
                ((Ne = re.validateN(Lt)),
                (ie = St),
                ln && ln.length && (Pe = ln),
                (kt = re.reconstructFullMetricName(Et, Lt, ln)),
                (Gt = setInterval(lt, Ne)));
            },
            reset: function () {
              clearInterval(Gt),
                (Gt = null),
                (Ne = null),
                (Pe = null),
                (B = []),
                (ie = null);
            },
            handleNewMetric: function (Et, St) {
              Et === Ae.HTTP_REQUEST && ((Pe && Pe !== St.type) || B.push(St));
            },
          }),
          Z
        );
      }
      E.__dashjs_factory_name = "HttpListHandler";
      var S = l.default.getClassFactory(E);
      function L() {
        let ue, Z, ie;
        return (
          (ue = {
            initialize: function (Ne, Pe) {
              (Z = Ne), (ie = Pe);
            },
            reset: function () {
              (ie = null), (Z = void 0);
            },
            handleNewMetric: function (Ne, Pe) {
              Ne === Z && ie && ie.report(Z, Pe);
            },
          }),
          ue
        );
      }
      L.__dashjs_factory_name = "GenericMetricHandler";
      var W = l.default.getClassFactory(L);
      function F(ue) {
        let Z;
        const ie = (ue = ue || {}).debug ? ue.debug.getLogger(Z) : {};
        let Ne = /([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/;
        const Pe = this.context;
        let kt = {
          BufferLevel: G,
          DVBErrors: H,
          HttpList: S,
          PlayList: W,
          RepSwitchList: W,
          TcpList: W,
        };
        return (
          (Z = {
            create: function (Gt, B) {
              var re,
                Ae = Gt.match(Ne);
              if (Ae) {
                try {
                  (re = kt[Ae[1]](Pe).create({
                    eventBus: ue.eventBus,
                    metricsConstants: ue.metricsConstants,
                  })).initialize(Ae[1], B, Ae[3], Ae[5]);
                } catch (lt) {
                  (re = null),
                    ie.error(
                      `MetricsHandlerFactory: Could not create handler for type ${Ae[1]} with args ${Ae[3]}, ${Ae[5]} (${lt.message})`
                    );
                }
                return re;
              }
            },
            register: function (Gt, B) {
              kt[Gt] = B;
            },
            unregister: function (Gt) {
              delete kt[Gt];
            },
          }),
          Z
        );
      }
      F.__dashjs_factory_name = "MetricsHandlerFactory";
      var oe = l.default.getSingletonFactory(F);
      function De(ue) {
        ue = ue || {};
        let Z,
          ie = [];
        const Ne = this.context,
          Pe = ue.eventBus,
          kt = ue.events;
        let Gt = oe(Ne).getInstance({
          debug: ue.debug,
          eventBus: ue.eventBus,
          metricsConstants: ue.metricsConstants,
        });
        function B(re) {
          ie.forEach((Ae) => {
            Ae.handleNewMetric(re.metric, re.value, re.mediaType);
          });
        }
        return (
          (Z = {
            initialize: function (re, Ae) {
              re.split(",").forEach((lt, Et, St) => {
                let Lt;
                if (lt.indexOf("(") !== -1 && lt.indexOf(")") === -1) {
                  let ln = St[Et + 1];
                  ln &&
                    ln.indexOf("(") === -1 &&
                    ln.indexOf(")") !== -1 &&
                    ((lt += "," + ln), delete St[Et + 1]);
                }
                (Lt = Gt.create(lt, Ae)), Lt && ie.push(Lt);
              }),
                Pe.on(kt.METRIC_ADDED, B, Z),
                Pe.on(kt.METRIC_UPDATED, B, Z);
            },
            reset: function () {
              Pe.off(kt.METRIC_ADDED, B, Z),
                Pe.off(kt.METRIC_UPDATED, B, Z),
                ie.forEach((re) => re.reset()),
                (ie = []);
            },
          }),
          Z
        );
      }
      De.__dashjs_factory_name = "MetricsHandlersController";
      var Xe = l.default.getClassFactory(De);
      function ze(ue) {
        let Z, ie, Ne, Pe;
        ue = ue || {};
        let kt = this.context;
        function Gt() {
          Z && Z.reset(), ie && ie.reset(), Ne && Ne.reset();
        }
        return (
          (Pe = {
            initialize: function (B) {
              try {
                (Ne = f(kt).create({ mediaElement: ue.mediaElement })),
                  Ne.initialize(B.Range),
                  (ie = P(kt).create({
                    debug: ue.debug,
                    metricsConstants: ue.metricsConstants,
                    mediaPlayerModel: ue.mediaPlayerModel,
                  })),
                  ie.initialize(B.Reporting, Ne),
                  (Z = Xe(kt).create({
                    debug: ue.debug,
                    eventBus: ue.eventBus,
                    metricsConstants: ue.metricsConstants,
                    events: ue.events,
                  })),
                  Z.initialize(B.metrics, ie);
              } catch (re) {
                throw (Gt(), re);
              }
            },
            reset: Gt,
          }),
          Pe
        );
      }
      ze.__dashjs_factory_name = "MetricsController";
      var ht = l.default.getClassFactory(ze);
      function gt(ue) {
        let Z,
          ie = (ue = ue || {}).adapter;
        const Ne = ue.constants;
        return (
          (Z = {
            getMetrics: function (Pe) {
              let kt = [];
              return (
                Pe &&
                  Pe.Metrics &&
                  Pe.Metrics.forEach((Gt) => {
                    var B = new (class {
                        constructor() {
                          (this.metrics = ""),
                            (this.Range = []),
                            (this.Reporting = []);
                        }
                      })(),
                      re = ie.getIsDynamic(Pe);
                    Gt.hasOwnProperty("metrics") &&
                      ((B.metrics = Gt.metrics),
                      Gt.Range &&
                        Gt.Range.forEach((Ae) => {
                          var lt = new (class {
                            constructor() {
                              (this.starttime = 0),
                                (this.duration = 1 / 0),
                                (this._useWallClockTime = !1);
                            }
                          })();
                          (lt.starttime = (function (Et, St, Lt) {
                            let ln,
                              Ln,
                              Tr = 0;
                            return (
                              St
                                ? (Tr = ie.getAvailabilityStartTime(Et) / 1e3)
                                : ((ln = ie.getRegularPeriods(Et)),
                                  ln.length && (Tr = ln[0].start)),
                              (Ln = Tr),
                              Lt &&
                                Lt.hasOwnProperty(Ne.START_TIME) &&
                                (Ln += Lt.starttime),
                              Ln
                            );
                          })(Pe, re, Ae)),
                            Ae.hasOwnProperty("duration")
                              ? (lt.duration = Ae.duration)
                              : (lt.duration = ie.getDuration(Pe)),
                            (lt._useWallClockTime = re),
                            B.Range.push(lt);
                        }),
                      Gt.Reporting &&
                        (Gt.Reporting.forEach((Ae) => {
                          var lt = new (class {
                            constructor() {
                              (this.schemeIdUri = ""),
                                (this.value = ""),
                                (this.dvbReportingUrl = ""),
                                (this.dvbProbability = 1e3);
                            }
                          })();
                          Ae.hasOwnProperty(Ne.SCHEME_ID_URI) &&
                            ((lt.schemeIdUri = Ae.schemeIdUri),
                            Ae.hasOwnProperty("value") && (lt.value = Ae.value),
                            Ae.hasOwnProperty(Ne.DVB_REPORTING_URL) &&
                              (lt.dvbReportingUrl = Ae[Ne.DVB_REPORTING_URL]),
                            Ae.hasOwnProperty(Ne.DVB_PROBABILITY) &&
                              (lt.dvbProbability = Ae[Ne.DVB_PROBABILITY]),
                            B.Reporting.push(lt));
                        }),
                        kt.push(B)));
                  }),
                kt
              );
            },
          }),
          Z
        );
      }
      gt.__dashjs_factory_name = "ManifestParsing";
      var pt = l.default.getSingletonFactory(gt);
      function $t(ue) {
        let Z;
        ue = ue || {};
        let ie = {},
          Ne = this.context,
          Pe = ue.eventBus;
        const kt = ue.events;
        function Gt(re) {
          if (re.error) return;
          let Ae = Object.keys(ie);
          pt(Ne)
            .getInstance({ adapter: ue.adapter, constants: ue.constants })
            .getMetrics(re.manifest)
            .forEach((lt) => {
              const Et = JSON.stringify(lt);
              if (ie.hasOwnProperty(Et)) Ae.splice(Et, 1);
              else
                try {
                  let St = ht(Ne).create(ue);
                  St.initialize(lt), (ie[Et] = St);
                } catch {}
            }),
            Ae.forEach((lt) => {
              ie[lt].reset(), delete ie[lt];
            }),
            Pe.trigger(o.default.METRICS_INITIALISATION_COMPLETE);
        }
        function B() {
          Object.keys(ie).forEach((re) => {
            ie[re].reset();
          }),
            (ie = {});
        }
        return (
          (Z = {
            reset: function () {
              Pe.off(kt.MANIFEST_UPDATED, Gt, Z),
                Pe.off(kt.STREAM_TEARDOWN_COMPLETE, B, Z);
            },
          }),
          Pe.on(kt.MANIFEST_UPDATED, Gt, Z),
          Pe.on(kt.STREAM_TEARDOWN_COMPLETE, B, Z),
          Z
        );
      }
      $t.__dashjs_factory_name = "MetricsCollectionController";
      var ot = l.default.getClassFactory($t);
      function tt() {
        let ue,
          Z,
          ie = this.context;
        return (
          (ue = {
            createMetricsReporting: function (Ne) {
              return (
                (Z = c(ie).getInstance({
                  eventBus: Ne.eventBus,
                  dashMetrics: Ne.dashMetrics,
                  metricsConstants: Ne.metricsConstants,
                  events: Ne.events,
                })),
                Z.initialize(),
                ot(ie).create(Ne)
              );
            },
            getReportingFactory: function () {
              return $(ie).getInstance();
            },
            getMetricsHandlerFactory: function () {
              return oe(ie).getInstance();
            },
          }),
          ue
        );
      }
      tt.__dashjs_factory_name = "MetricsReporting";
      const He = dashjs.FactoryMaker.getClassFactory(tt);
      (He.events = o.default),
        dashjs.FactoryMaker.updateClassFactory(tt.__dashjs_factory_name, He);
      var de = He;
    },
    913: function (t, e, n) {
      n.r(e);
      var r = n(7252);
      class i extends r.default {
        constructor() {
          super(),
            (this.METRICS_INITIALISATION_COMPLETE =
              "internal_metricsReportingInitialized"),
            (this.BECAME_REPORTING_PLAYER = "internal_becameReportingPlayer"),
            (this.CMCD_DATA_GENERATED = "cmcdDataGenerated");
        }
      }
      let o = new i();
      e.default = o;
    },
    1926: function (t, e, n) {
      n.r(e);
      var r = n(5717),
        i = n(138),
        o = n(8261),
        l = n(656),
        u = n(5212);
      function c() {
        let d, h, f, p, g, y, v, b, w, k;
        const D = this.context,
          $ = (0, o.default)(D).getInstance();
        function N() {
          (p = []),
            (g = []),
            (y = []),
            (v = []),
            (b = []),
            (k = []),
            (w = null),
            (h = []);
        }
        function P(G, H) {
          let E = -1;
          G.some((S, L) => {
            if (S === H) return (E = L), !0;
          }),
            E < 0 || G.splice(E, 1);
        }
        function I(G) {
          let H;
          for (H = 0; H < k.length; H++) if (k[H].rulename === G) return H;
          return -1;
        }
        function O(G, H) {
          X(G, H);
          let E = new r.default();
          (E.schemeIdUri = G), (E.value = H), h.push(E);
        }
        function X(G, H) {
          (0, l.checkParameterType)(G, "string"),
            (0, l.checkParameterType)(H, "string"),
            h.forEach(function (E, S) {
              E.schemeIdUri === G && E.value === H && h.splice(S, 1);
            });
        }
        return (
          (d = {
            addAbrCustomRule: function (G, H, E) {
              if (
                typeof G != "string" ||
                (G !== u.default.RULES_TYPES.ABANDON_FRAGMENT_RULES &&
                  G !== u.default.RULES_TYPES.QUALITY_SWITCH_RULES) ||
                typeof H != "string"
              )
                throw u.default.BAD_ARGUMENT_ERROR;
              let S = I(H);
              S === -1
                ? k.push({ type: G, rulename: H, rule: E })
                : ((k[S].type = G), (k[S].rule = E));
            },
            addRequestInterceptor: function (G) {
              p.push(G);
            },
            addResponseInterceptor: function (G) {
              g.push(G);
            },
            addUTCTimingSource: O,
            clearDefaultUTCTimingSources: function () {
              h = [];
            },
            getAbrCustomRules: function () {
              return k;
            },
            getCustomCapabilitiesFilters: function () {
              return b;
            },
            getCustomInitialTrackSelectionFunction: function () {
              return w;
            },
            getLicenseRequestFilters: function () {
              return y;
            },
            getLicenseResponseFilters: function () {
              return v;
            },
            getRequestInterceptors: function () {
              return p;
            },
            getResponseInterceptors: function () {
              return g;
            },
            getUTCTimingSources: function () {
              return h;
            },
            getXHRWithCredentialsForType: function (G) {
              const H = f[G];
              return H === void 0 ? f.default : H;
            },
            registerCustomCapabilitiesFilter: function (G) {
              b.push(G);
            },
            registerLicenseRequestFilter: function (G) {
              y.push(G);
            },
            registerLicenseResponseFilter: function (G) {
              v.push(G);
            },
            removeAbrCustomRule: function (G) {
              if (G) {
                let H = I(G);
                H !== -1 && k.splice(H, 1);
              } else k = [];
            },
            removeAllAbrCustomRule: function () {
              k = [];
            },
            removeRequestInterceptor: function (G) {
              P(p, G);
            },
            removeResponseInterceptor: function (G) {
              P(g, G);
            },
            removeUTCTimingSource: X,
            reset: function () {
              N();
            },
            resetCustomInitialTrackSelectionFunction: function () {
              w = null;
            },
            restoreDefaultUTCTimingSources: function () {
              let G = $.get().streaming.utcSynchronization.defaultTimingSource;
              O(G.scheme, G.value);
            },
            setConfig: function () {},
            setCustomInitialTrackSelectionFunction: function (G) {
              w = G;
            },
            setXHRWithCredentialsForType: function G(H, E) {
              H
                ? (f[H] = !!E)
                : Object.keys(f).forEach((S) => {
                    G(S, E);
                  });
            },
            unregisterCustomCapabilitiesFilter: function (G) {
              P(b, G);
            },
            unregisterLicenseRequestFilter: function (G) {
              P(y, G);
            },
            unregisterLicenseResponseFilter: function (G) {
              P(v, G);
            },
          }),
          (f = { default: !1 }),
          N(),
          d
        );
      }
      (c.__dashjs_factory_name = "CustomParametersModel"),
        (e.default = i.default.getSingletonFactory(c));
    },
    3888: function (t, e, n) {
      n.r(e),
        n.d(e, {
          default: function () {
            return Zn;
          },
        });
      var r = n(8854),
        i = n(2861);
      const o = { prefixes: ["clearkey", "dashif", "ck"] };
      class l {
        static findMp4ProtectionElement(rn) {
          let It = null;
          for (let wt = 0; wt < rn.length; ++wt) {
            let Mt = rn[wt];
            Mt.schemeIdUri &&
              Mt.schemeIdUri.toLowerCase() ===
                r.default.MP4_PROTECTION_SCHEME &&
              Mt.value &&
              (Mt.value.toLowerCase() === i.default.ENCRYPTION_SCHEME_CENC ||
                Mt.value.toLowerCase() === i.default.ENCRYPTION_SCHEME_CBCS) &&
              (It = Mt);
          }
          return It;
        }
        static getPSSHData(rn) {
          let It = 8,
            wt = new DataView(rn),
            Mt = wt.getUint8(It);
          return (
            (It += 20),
            Mt > 0 && (It += 4 + 16 * wt.getUint32(It)),
            (It += 4),
            rn.slice(It)
          );
        }
        static getPSSHForKeySystem(rn, It) {
          let wt = l.parsePSSHList(It);
          return rn && wt.hasOwnProperty(rn.uuid.toLowerCase())
            ? wt[rn.uuid.toLowerCase()]
            : null;
        }
        static parseInitDataFromContentProtection(rn, It) {
          return "pssh" in rn && rn.pssh
            ? ((rn.pssh.__text = rn.pssh.__text
                .replace(/\r?\n|\r/g, "")
                .replace(/\s+/g, "")),
              It.decodeArray(rn.pssh.__text).buffer)
            : null;
        }
        static parsePSSHList(rn) {
          if (rn == null) return [];
          let It = new DataView(rn.buffer || rn),
            wt = {},
            Mt = 0;
          for (;;) {
            let Wt,
              Ft,
              un,
              Yt,
              Qt,
              Sn,
              ar = Mt;
            if (Mt >= It.buffer.byteLength) break;
            if (
              ((Wt = It.getUint32(Mt)),
              (Ft = Mt + Wt),
              (Mt += 4),
              It.getUint32(Mt) === 1886614376)
            )
              if (((Mt += 4), (un = It.getUint8(Mt)), un === 0 || un === 1)) {
                for (Mt++, Mt += 3, Yt = "", Qt = 0; Qt < 4; Qt++)
                  (Sn = It.getUint8(Mt + Qt).toString(16)),
                    (Yt += Sn.length === 1 ? "0" + Sn : Sn);
                for (Mt += 4, Yt += "-", Qt = 0; Qt < 2; Qt++)
                  (Sn = It.getUint8(Mt + Qt).toString(16)),
                    (Yt += Sn.length === 1 ? "0" + Sn : Sn);
                for (Mt += 2, Yt += "-", Qt = 0; Qt < 2; Qt++)
                  (Sn = It.getUint8(Mt + Qt).toString(16)),
                    (Yt += Sn.length === 1 ? "0" + Sn : Sn);
                for (Mt += 2, Yt += "-", Qt = 0; Qt < 2; Qt++)
                  (Sn = It.getUint8(Mt + Qt).toString(16)),
                    (Yt += Sn.length === 1 ? "0" + Sn : Sn);
                for (Mt += 2, Yt += "-", Qt = 0; Qt < 6; Qt++)
                  (Sn = It.getUint8(Mt + Qt).toString(16)),
                    (Yt += Sn.length === 1 ? "0" + Sn : Sn);
                (Mt += 6),
                  (Yt = Yt.toLowerCase()),
                  (Mt += 4),
                  (wt[Yt] = It.buffer.slice(ar, Ft)),
                  (Mt = Ft);
              } else Mt = Ft;
            else Mt = Ft;
          }
          return wt;
        }
        static getLicenseServerUrlFromMediaInfo(rn, It) {
          try {
            if (!rn || rn.length === 0) return null;
            let wt = 0,
              Mt = null;
            for (; wt < rn.length && !Mt; ) {
              const Wt = rn[wt];
              if (
                Wt &&
                Wt.contentProtection &&
                Wt.contentProtection.length > 0
              ) {
                const Ft = Wt.contentProtection.filter(
                  (un) => un.schemeIdUri && un.schemeIdUri === It
                );
                if (Ft && Ft.length > 0) {
                  let un = 0;
                  for (; un < Ft.length && !Mt; ) {
                    const Yt = Ft[un];
                    Yt.laUrl &&
                      Yt.laUrl.__prefix &&
                      o.prefixes.includes(Yt.laUrl.__prefix) &&
                      Yt.laUrl.__text &&
                      (Mt = Yt.laUrl.__text),
                      (un += 1);
                  }
                }
              }
              wt += 1;
            }
            return Mt;
          } catch {
            return null;
          }
        }
        static hexKidToBufferSource(rn) {
          const It = rn.replace(/-/g, "");
          return new Uint8Array(
            It.match(/[\da-f]{2}/gi).map(function (wt) {
              return parseInt(wt, 16);
            })
          ).buffer;
        }
      }
      var u = l,
        c = class {
          constructor(on, rn) {
            (this.contentType = on), (this.robustness = rn);
          }
        },
        d = class {
          constructor(on, rn, It, wt, Mt, Wt) {
            (this.initDataTypes =
              Wt && Wt.length > 0
                ? Wt
                : [i.default.INITIALIZATION_DATA_TYPE_CENC]),
              on && on.length && (this.audioCapabilities = on),
              rn && rn.length && (this.videoCapabilities = rn),
              (this.distinctiveIdentifier = It),
              (this.persistentState = wt),
              (this.sessionTypes = Mt);
          }
        },
        h = n(1923),
        f = n(1944),
        p = n(7568),
        g = n(7263),
        y = n(5212),
        v = n(138);
      function b(on) {
        const rn = (on = on || {}).BASE64,
          It = on.cmcdModel,
          wt = on.constants,
          Mt = on.customParametersModel,
          Wt = on.debug,
          Ft = on.eventBus,
          un = on.events,
          Yt = on.protectionKeyController,
          Qt = on.settings;
        let Sn,
          ar,
          ye,
          Gn,
          Ht,
          yr,
          T,
          Jn,
          pr,
          Ut,
          Dt,
          Kt,
          vn = on.protectionModel,
          st = [];
        function Xt() {
          if (
            !(
              Ft &&
              Ft.hasOwnProperty("on") &&
              Yt &&
              Yt.hasOwnProperty(
                "getSupportedKeySystemMetadataFromContentProtection"
              )
            )
          )
            throw new Error("Missing config parameter(s)");
        }
        function qn(cn, ir) {
          Dt || Gn
            ? Dt && cr()
            : (function (jr, Yr) {
                if (Gn) return;
                var Qi;
                Gn = !0;
                const Wa = (function (ka) {
                  const Fr = [];
                  for (let Wr = 0; Wr < ka.length; Wr++) {
                    const si = Ui(ka[Wr]);
                    Fr.push({
                      ks: ka[Wr].ks,
                      configs: [si],
                      protData: ka[Wr].protData,
                    });
                  }
                  return Fr;
                })(
                  (jr = (Qi = jr).sort(
                    (ka, Fr) =>
                      (Sn &&
                      Sn[ka.ks.systemString] &&
                      Sn[ka.ks.systemString].priority >= 0
                        ? Sn[ka.ks.systemString].priority
                        : Qi.length) -
                      (Sn &&
                      Sn[Fr.ks.systemString] &&
                      Sn[Fr.ks.systemString].priority >= 0
                        ? Sn[Fr.ks.systemString].priority
                        : Qi.length)
                  ))
                );
                let Ni;
                vn.requestKeySystemAccess(Wa)
                  .then(
                    (ka) => (
                      (Ni = ka.data),
                      (function (Fr) {
                        let Wr =
                          Fr && Fr.selectedSystemString
                            ? Fr.selectedSystemString
                            : Fr.keySystem.systemString;
                        return (
                          T.info(
                            "DRM: KeySystem Access Granted for system string (" +
                              Wr +
                              ")!  Selecting key system..."
                          ),
                          vn.selectKeySystem(Fr)
                        );
                      })(Ni)
                    )
                  )
                  .then((ka) => {
                    (function (Fr, Wr) {
                      (Dt = Fr),
                        (Gn = !1),
                        Ft.trigger(un.KEY_SYSTEM_SELECTED, { data: Wr });
                      const si = Ye(Dt);
                      si &&
                        si.serverCertificate &&
                        si.serverCertificate.length > 0 &&
                        vn.setServerCertificate(
                          rn.decodeArray(si.serverCertificate).buffer
                        ),
                        cr();
                    })(ka, Ni);
                  })
                  .catch((ka) => {
                    var Fr;
                    (Fr = ka),
                      (Dt = null),
                      (Gn = !1),
                      Yr ||
                        Ft.trigger(un.KEY_SYSTEM_SELECTED, {
                          data: null,
                          error: new f.default(
                            h.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,
                            h.default.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE +
                              "Error selecting key system! -- " +
                              Fr.error
                          ),
                        });
                  });
              })(cn, ir);
        }
        function cr() {
          let cn;
          for (let jr = 0; jr < pr.length; jr++)
            for (cn = 0; cn < pr[jr].length; cn++)
              if (Dt === pr[jr][cn].ks) {
                (ir = pr[jr][cn]),
                  Yt.isClearKey(Dt) &&
                    (function (Yr) {
                      if (
                        Yr.protData &&
                        Yr.protData.hasOwnProperty("clearkeys") &&
                        Object.keys(Yr.protData.clearkeys).length !== 0
                      ) {
                        const Qi = { kids: Object.keys(Yr.protData.clearkeys) };
                        Yr.initData = new TextEncoder().encode(
                          JSON.stringify(Qi)
                        );
                      }
                    })(ir),
                  ir.sessionId ? Je(ir) : ir.initData !== null && sn(ir);
                break;
              }
          var ir;
          pr = [];
        }
        function Ui(cn) {
          const ir = cn.protData,
            jr = [],
            Yr = [],
            Qi =
              ir && ir.initDataTypes && ir.initDataTypes.length > 0
                ? ir.initDataTypes
                : [i.default.INITIALIZATION_DATA_TYPE_CENC],
            Wa =
              ir && ir.audioRobustness && ir.audioRobustness.length > 0
                ? ir.audioRobustness
                : Ut,
            Ni =
              ir && ir.videoRobustness && ir.videoRobustness.length > 0
                ? ir.videoRobustness
                : Ut,
            ka = cn.sessionType,
            Fr =
              ir && ir.distinctiveIdentifier
                ? ir.distinctiveIdentifier
                : "optional",
            Wr =
              ir && ir.persistentState
                ? ir.persistentState
                : ka === "temporary"
                ? "optional"
                : "required";
          return (
            Jn.forEach((si) => {
              si.type === wt.AUDIO
                ? jr.push(new c(si.codec, Wa))
                : si.type === wt.VIDEO && Yr.push(new c(si.codec, Ni));
            }),
            new d(jr, Yr, Fr, Wr, [ka], Qi)
          );
        }
        function Je(cn) {
          Xt(), vn.loadKeySession(cn);
        }
        function sn(cn) {
          if (
            cn &&
            (function (jr) {
              if (!jr) return !1;
              try {
                const Yr = vn.getSessionTokens();
                for (let Qi = 0; Qi < Yr.length; Qi++)
                  if (Yr[Qi].getKeyId() === jr) return !0;
                return !1;
              } catch {
                return !1;
              }
            })(cn.keyId)
          )
            return;
          const ir = u.getPSSHForKeySystem(Dt, cn ? cn.initData : null);
          if (ir) {
            if (Ct(ir)) return;
            try {
              (cn.initData = ir), vn.createKeySession(cn);
            } catch (jr) {
              Ft.trigger(un.KEY_SESSION_CREATED, {
                data: null,
                error: new f.default(
                  h.default.KEY_SESSION_CREATED_ERROR_CODE,
                  h.default.KEY_SESSION_CREATED_ERROR_MESSAGE + jr.message
                ),
              });
            }
          } else
            cn && cn.initData
              ? vn.createKeySession(cn)
              : Ft.trigger(un.KEY_SESSION_CREATED, {
                  data: null,
                  error: new f.default(
                    h.default.KEY_SESSION_CREATED_ERROR_CODE,
                    h.default.KEY_SESSION_CREATED_ERROR_MESSAGE +
                      "Selected key system is " +
                      (Dt ? Dt.systemString : null) +
                      ".  needkey/encrypted event contains no initData corresponding to that key system!"
                  ),
                });
        }
        function Ye(cn) {
          if (cn) {
            const ir = cn.systemString;
            if (Sn) return ir in Sn ? Sn[ir] : null;
          }
          return null;
        }
        function Ct(cn) {
          if (!cn) return !1;
          try {
            const ir = vn.getAllInitData();
            for (let jr = 0; jr < ir.length; jr++)
              if (Yt.initDataEquals(cn, ir[jr]))
                return (
                  T.debug(
                    "DRM: Ignoring initData because we have already seen it!"
                  ),
                  !0
                );
            return !1;
          } catch {
            return !1;
          }
        }
        function At(cn) {
          Xt(),
            cn
              ? (vn.setMediaElement(cn), Ft.on(un.NEED_KEY, ut, ar))
              : cn === null &&
                (vn.setMediaElement(cn), Ft.off(un.NEED_KEY, ut, ar));
        }
        function Pn(cn) {
          T.debug("DRM: onKeyMessage");
          const ir = cn.data;
          Ft.trigger(un.KEY_MESSAGE, { data: ir });
          const jr = ir.messageType
              ? ir.messageType
              : i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,
            Yr = ir.message,
            Qi = ir.sessionToken,
            Wa = Ye(Dt),
            Ni = Yt.getLicenseServerModelInstance(Dt, Wa, jr),
            ka = { sessionToken: Qi, messageType: jr };
          if (Yr && Yr.byteLength !== 0) {
            if (!Ni)
              return (
                T.debug(
                  "DRM: License server request not required for this message (type = " +
                    cn.data.messageType +
                    ").  Session ID = " +
                    Qi.getSessionId()
                ),
                void Xn(ka)
              );
            if (Yt.isClearKey(Dt)) {
              const Fr = Yt.processClearKeyLicenseRequest(Dt, Wa, Yr);
              if (Fr && Fr.keyPairs && Fr.keyPairs.length > 0)
                return (
                  T.debug(
                    "DRM: ClearKey license request handled by application!"
                  ),
                  Xn(ka),
                  void vn.updateKeySession(Qi, Fr)
                );
            }
            (function (Fr, Wr, si) {
              const ma = Fr.sessionToken,
                Aa = Fr.messageType
                  ? Fr.messageType
                  : i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST,
                Sl = { sessionToken: ma, messageType: Aa },
                Ki = Dt ? Dt.systemString : null;
              let Ro = (function (No, Ks, ud, ec, Yl) {
                let ol = null;
                const jh = ec.message;
                if (No && No.serverURL) {
                  const Nu = No.serverURL;
                  typeof Nu == "string" && Nu !== ""
                    ? (ol = Nu)
                    : typeof Nu == "object" &&
                      Nu.hasOwnProperty(Ks) &&
                      (ol = Nu[Ks]);
                } else if (No && No.laURL && No.laURL !== "") ol = No.laURL;
                else if (
                  ((ol = u.getLicenseServerUrlFromMediaInfo(
                    Jn,
                    Dt.schemeIdURI
                  )),
                  !ol && !Yt.isClearKey(Dt))
                ) {
                  const Nu = u.getPSSHData(ud.initData);
                  (ol = Dt.getLicenseServerURLFromInitData(Nu)),
                    ol || (ol = ec.laURL);
                }
                return (ol = Yl.getServerURLFromMessage(ol, jh, Ks)), ol;
              })(si, Aa, ma, Fr, Wr);
              if (!Ro)
                return void Xn(
                  Sl,
                  new f.default(
                    h.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,
                    h.default.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE
                  )
                );
              const Xo = {};
              let Ns = !1;
              si && Ot(Xo, si.httpRequestHeaders);
              const Gu = Fr.message;
              Ot(Xo, Dt.getRequestHeadersFromMessage(Gu)),
                Object.keys(Xo).forEach((No) => {
                  No.toLowerCase() === "authorization" && (Ns = !0);
                }),
                si &&
                  typeof si.withCredentials == "boolean" &&
                  (Ns = si.withCredentials);
              const zh = function (No) {
                  if (vn)
                    if (No.status >= 200 && No.status <= 299) {
                      const Ks = g.default.parseHttpHeaders(
                        No.getAllResponseHeaders
                          ? No.getAllResponseHeaders()
                          : null
                      );
                      let ud = new (class {
                        constructor(ec, Yl, ol) {
                          (this.url = ec),
                            (this.headers = Yl),
                            (this.data = ol);
                        }
                      })(No.responseURL, Ks, No.response);
                      gr(Mt.getLicenseResponseFilters(), ud).then(() => {
                        const ec = Wr.getLicenseMessage(ud.data, Ki, Aa);
                        ec !== null
                          ? (Xn(Sl), vn.updateKeySession(ma, ec))
                          : _n(No, Sl, Ki, Aa, Wr);
                      });
                    } else _n(No, Sl, Ki, Aa, Wr);
                },
                j0 = function (No) {
                  Xn(
                    Sl,
                    new f.default(
                      h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,
                      h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE +
                        Ki +
                        ' update, XHR aborted. status is "' +
                        No.statusText +
                        '" (' +
                        No.status +
                        "), readyState is " +
                        No.readyState
                    )
                  );
                },
                Ws = function (No) {
                  Xn(
                    Sl,
                    new f.default(
                      h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,
                      h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE +
                        Ki +
                        ' update, XHR error. status is "' +
                        No.statusText +
                        '" (' +
                        No.status +
                        "), readyState is " +
                        No.readyState
                    )
                  );
                },
                W0 = Dt.getLicenseRequestFromMessage(Gu),
                Mm = Wr.getHTTPMethod(Aa),
                ps = Wr.getResponseType(Ki, Aa),
                rs = si && !isNaN(si.httpTimeout) ? si.httpTimeout : 8e3,
                ug = ma.getSessionId() || null;
              let Cm = new (class {
                constructor(No, Ks, ud, ec, Yl, ol, jh, Nu) {
                  (this.url = No),
                    (this.method = Ks),
                    (this.responseType = ud),
                    (this.headers = ec),
                    (this.withCredentials = Yl),
                    (this.messageType = ol),
                    (this.sessionId = jh),
                    (this.data = Nu);
                }
              })(Ro, Mm, ps, Xo, Ns, Aa, ug, W0);
              const $m = isNaN(
                Qt.get().streaming.retryAttempts[p.HTTPRequest.LICENSE]
              )
                ? 3
                : Qt.get().streaming.retryAttempts[p.HTTPRequest.LICENSE];
              gr(Mt.getLicenseRequestFilters(), Cm).then(() => {
                wn(Cm, $m, rs, zh, j0, Ws);
              });
            })(ir, Ni, Wa);
          } else
            Xn(
              ka,
              new f.default(
                h.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,
                h.default.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE
              )
            );
        }
        function Xn(cn) {
          let ir =
            arguments.length > 1 && arguments[1] !== void 0
              ? arguments[1]
              : null;
          Ft.trigger(un.LICENSE_REQUEST_COMPLETE, { data: cn, error: ir });
        }
        function wn(cn, ir, jr, Yr, Qi, Wa) {
          const Ni = new XMLHttpRequest(),
            ka = It.getCmcdParametersFromManifest();
          if (
            It.isCmcdEnabled() &&
            (ka.mode ? ka.mode : Qt.get().streaming.cmcd.mode) ===
              y.default.CMCD_MODE_QUERY
          ) {
            const Wr = It.getQueryParameter({
              url: cn.url,
              type: p.HTTPRequest.LICENSE,
            });
            Wr &&
              (cn.url = g.default.addAdditionalQueryParameterToUrl(cn.url, [
                Wr,
              ]));
          }
          Ni.open(cn.method, cn.url, !0),
            (Ni.responseType = cn.responseType),
            (Ni.withCredentials = cn.withCredentials),
            jr > 0 && (Ni.timeout = jr);
          for (const Wr in cn.headers) Ni.setRequestHeader(Wr, cn.headers[Wr]);
          if (
            It.isCmcdEnabled() &&
            (ka.mode ? ka.mode : Qt.get().streaming.cmcd.mode) ===
              y.default.CMCD_MODE_HEADER
          ) {
            const Wr = It.getHeaderParameters({
              url: cn.url,
              type: p.HTTPRequest.LICENSE,
            });
            if (Wr)
              for (const si in Wr) {
                let ma = Wr[si];
                ma && Ni.setRequestHeader(si, ma);
              }
          }
          const Fr = function () {
            ir--;
            const Wr = isNaN(
              Qt.get().streaming.retryIntervals[p.HTTPRequest.LICENSE]
            )
              ? 1e3
              : Qt.get().streaming.retryIntervals[p.HTTPRequest.LICENSE];
            Ht = setTimeout(function () {
              wn(cn, ir, jr, Yr, Qi, Wa);
            }, Wr);
          };
          (Ni.onload = function () {
            (yr = null),
              (this.status >= 200 && this.status <= 299) || ir <= 0
                ? Yr(this)
                : (T.warn(
                    "License request failed (" +
                      this.status +
                      "). Retrying it... Pending retries: " +
                      ir
                  ),
                  Fr());
          }),
            (Ni.ontimeout = Ni.onerror =
              function () {
                (yr = null),
                  ir <= 0
                    ? Wa(this)
                    : (T.warn(
                        "License request network request failed . Retrying it... Pending retries: " +
                          ir
                      ),
                      Fr());
              }),
            (Ni.onabort = function () {
              Qi(this);
            }),
            Ft.trigger(un.LICENSE_REQUEST_SENDING, {
              url: cn.url,
              headers: cn.headers,
              payload: cn.data,
              sessionId: cn.sessionId,
            }),
            (yr = Ni),
            Ni.send(cn.data);
        }
        function Vn() {
          yr &&
            ((yr.onloadend = yr.onerror = yr.onprogress = void 0),
            yr.abort(),
            (yr = null)),
            Ht && (clearTimeout(Ht), (Ht = null));
        }
        function Ot(cn, ir) {
          if (ir) for (const jr in ir) cn[jr] = ir[jr];
        }
        function _n(cn, ir, jr, Yr, Qi) {
          let Wa = "NONE",
            Ni = null;
          cn.response &&
            ((Wa = Qi.getErrorResponse(cn.response, jr, Yr)),
            (Ni = {
              serverResponse: cn.response || null,
              responseCode: cn.status || null,
              responseText: cn.statusText || null,
            })),
            Xn(
              ir,
              new f.default(
                h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,
                h.default.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE +
                  jr +
                  ' update, XHR complete. status is "' +
                  cn.statusText +
                  '" (' +
                  cn.status +
                  "), readyState is " +
                  cn.readyState +
                  ".  Response is " +
                  Wa,
                Ni
              )
            );
        }
        function gr(cn, ir) {
          return cn
            ? cn.reduce((jr, Yr) => jr.then(() => Yr(ir)), Promise.resolve())
            : Promise.resolve();
        }
        function ut(cn, ir) {
          if (!Qt.get().streaming.protection.ignoreEmeEncryptedEvent) {
            if (
              (T.debug("DRM: onNeedKey"),
              cn.key.initDataType !== i.default.INITIALIZATION_DATA_TYPE_CENC)
            )
              return void T.warn(
                "DRM:  Only 'cenc' initData is supported!  Ignoring initData of type: " +
                  cn.key.initDataType
              );
            if (
              Jn.length === 0 &&
              (T.warn(
                "DRM: onNeedKey called before initializeForMedia, wait until initialized"
              ),
              (ir = ir === void 0 ? 1 : ir + 1) < 5)
            )
              return void st.push(
                setTimeout(() => {
                  ut(cn, ir);
                }, 500)
              );
            let Yr = cn.key.initData;
            if ((ArrayBuffer.isView(Yr) && (Yr = Yr.buffer), Dt)) {
              const Wa = u.getPSSHForKeySystem(Dt, Yr);
              if (Wa && Ct(Wa)) return;
            }
            T.debug(
              "DRM: initData:",
              String.fromCharCode.apply(null, new Uint8Array(Yr))
            );
            const Qi = Yt.getSupportedKeySystemsFromSegmentPssh(Yr, Sn, Kt);
            if (Qi.length === 0)
              return void T.debug(
                "DRM: Received needkey event with initData, but we don't support any of the key systems!"
              );
            (jr = Qi), pr.push(jr), qn(jr, !1);
          }
          var jr;
        }
        function Si(cn) {
          const ir = vn.getSessionTokens();
          if (ir && ir.length > 0) {
            const jr = ir.filter((Yr) => [...cn].includes(Yr.normalizedKeyId));
            if (
              jr.some((Yr) => !Yr.hasTriggeredKeyStatusMapUpdate) ||
              jr.length === 0
            )
              return !1;
          }
          return (
            !Qt.get().streaming.protection.ignoreKeyStatuses &&
            cn &&
            cn.size > 0 &&
            ye &&
            ye.size > 0
          );
        }
        return (
          (ar = {
            areKeyIdsExpired: function (cn) {
              try {
                return (
                  !!Si(cn) &&
                  [...cn].every(
                    (ir) => ye.get(ir) === i.default.MEDIA_KEY_STATUSES.EXPIRED
                  )
                );
              } catch (ir) {
                return T.error(ir), !1;
              }
            },
            areKeyIdsUsable: function (cn) {
              try {
                return (
                  !Si(cn) ||
                  [...cn].some((ir) => {
                    const jr = ye.get(ir);
                    return (
                      jr &&
                      jr !== i.default.MEDIA_KEY_STATUSES.INTERNAL_ERROR &&
                      jr !== i.default.MEDIA_KEY_STATUSES.OUTPUT_RESTRICTED
                    );
                  })
                );
              } catch (ir) {
                return T.error(ir), !0;
              }
            },
            clearMediaInfoArray: function () {
              Jn = [];
            },
            closeKeySession: function (cn) {
              Xt(), vn.closeKeySession(cn);
            },
            createKeySession: sn,
            getKeySystems: function () {
              return Yt ? Yt.getKeySystems() : [];
            },
            getSupportedKeySystemMetadataFromContentProtection: function (cn) {
              return (
                Xt(),
                Yt.getSupportedKeySystemMetadataFromContentProtection(
                  cn,
                  Sn,
                  Kt
                )
              );
            },
            handleKeySystemFromManifest: function () {
              if (!Jn || Jn.length === 0) return;
              let cn = [];
              Jn.forEach((ir) => {
                const jr =
                  Yt.getSupportedKeySystemMetadataFromContentProtection(
                    ir.contentProtection,
                    Sn,
                    Kt
                  );
                jr.length > 0 && (cn.length === 0 && (cn = jr), pr.push(jr));
              }),
                cn && cn.length > 0 && qn(cn, !0);
            },
            initializeForMedia: function (cn) {
              if (!cn)
                throw new Error("mediaInfo can not be null or undefined");
              Xt(), Jn.push(cn);
            },
            loadKeySession: Je,
            removeKeySession: function (cn) {
              Xt(), vn.removeKeySession(cn);
            },
            reset: function () {
              Ft.off(un.INTERNAL_KEY_MESSAGE, Pn, ar),
                Xt(),
                Vn(),
                At(null),
                (Dt = null),
                (Gn = !1),
                (ye = new Map()),
                vn && (vn.reset(), (vn = null)),
                st.forEach((cn) => clearTimeout(cn)),
                (st = []),
                (Jn = []),
                (pr = []);
            },
            setKeySystems: function (cn) {
              Yt && Yt.setKeySystems(cn);
            },
            setMediaElement: At,
            setProtectionData: function (cn) {
              (Sn = cn), Yt.setProtectionData(cn);
            },
            setRobustnessLevel: function (cn) {
              Ut = cn;
            },
            setServerCertificate: function (cn) {
              Xt(), vn.setServerCertificate(cn);
            },
            setSessionType: function (cn) {
              Kt = cn;
            },
            stop: function () {
              Vn(), vn && vn.stop();
            },
            updateKeyStatusesMap: function (cn) {
              try {
                if (!cn || !cn.sessionToken || !cn.parsedKeyStatuses) return;
                cn.sessionToken.hasTriggeredKeyStatusMapUpdate = !0;
                const ir = cn.parsedKeyStatuses,
                  jr = g.default.parseUserAgent(),
                  Yr =
                    jr &&
                    jr.browser &&
                    jr.browser.name &&
                    jr.browser.name.toLowerCase() === "edge";
                ir.forEach((Qi) => {
                  Yr &&
                    Dt.uuid === i.default.PLAYREADY_UUID &&
                    Qi.keyId &&
                    Qi.keyId.byteLength === 16 &&
                    (function (Ni) {
                      const ka = g.default.bufferSourceToDataView(Ni),
                        Fr = ka.getUint32(0, !0),
                        Wr = ka.getUint16(4, !0),
                        si = ka.getUint16(6, !0);
                      ka.setUint32(0, Fr, !1),
                        ka.setUint16(4, Wr, !1),
                        ka.setUint16(6, si, !1);
                    })(Qi.keyId);
                  const Wa = g.default.bufferSourceToHex(Qi.keyId).slice(0, 32);
                  Wa && Wa !== "" && ye.set(Wa, Qi.status);
                }),
                  Ft.trigger(un.KEY_STATUSES_MAP_UPDATED, { keyStatusMap: ye });
              } catch (ir) {
                T.error(ir);
              }
            },
          }),
          (T = Wt.getLogger(ar)),
          (pr = []),
          (Jn = []),
          (Kt = "temporary"),
          (Ut = ""),
          (yr = null),
          (Ht = null),
          (ye = new Map()),
          Ft.on(un.INTERNAL_KEY_MESSAGE, Pn, ar),
          ar
        );
      }
      b.__dashjs_factory_name = "ProtectionController";
      var w = v.default.getClassFactory(b),
        k = class {
          constructor(on, rn) {
            (this.keyID = on), (this.key = rn);
          }
        },
        D = class {
          constructor(on, rn) {
            if (rn && rn !== "persistent" && rn !== "temporary")
              throw new Error(
                "Invalid ClearKey key set type!  Must be one of 'persistent' or 'temporary'"
              );
            (this.keyPairs = on), (this.type = rn);
          }
          toJWK() {
            let on,
              rn = this.keyPairs.length,
              It = { keys: [] };
            for (on = 0; on < rn; on++) {
              let un = {
                kty: "oct",
                alg: "A128KW",
                kid: this.keyPairs[on].keyID,
                k: this.keyPairs[on].key,
              };
              It.keys.push(un);
            }
            this.type && (It.type = this.type);
            let wt = JSON.stringify(It);
            const Mt = wt.length;
            let Wt = new ArrayBuffer(Mt),
              Ft = new Uint8Array(Wt);
            for (on = 0; on < Mt; on++) Ft[on] = wt.charCodeAt(on);
            return Wt;
          }
        };
      const $ = i.default.CLEARKEY_UUID,
        N = i.default.CLEARKEY_KEYSTEM_STRING,
        P = "urn:uuid:" + $;
      function I(on) {
        let rn;
        const It = (on = on || {}).BASE64;
        return (
          (rn = {
            uuid: $,
            schemeIdURI: P,
            systemString: N,
            getInitData: function (wt, Mt) {
              try {
                let Wt = u.parseInitDataFromContentProtection(wt, It);
                if (!Wt && Mt) {
                  const Ft = {
                    kids: [
                      (function (un) {
                        try {
                          let Yt = un.replace(/-/g, "");
                          return (
                            (Yt = btoa(
                              Yt.match(/\w{2}/g)
                                .map((Qt) =>
                                  String.fromCharCode(parseInt(Qt, 16))
                                )
                                .join("")
                            )),
                            Yt.replace(/=/g, "")
                              .replace(/\//g, "_")
                              .replace(/\+/g, "-")
                          );
                        } catch {
                          return null;
                        }
                      })(Mt.cencDefaultKid),
                    ],
                  };
                  Wt = new TextEncoder().encode(JSON.stringify(Ft));
                }
                return Wt;
              } catch {
                return null;
              }
            },
            getRequestHeadersFromMessage: function () {
              return { "Content-Type": "application/json" };
            },
            getLicenseRequestFromMessage: function (wt) {
              return JSON.stringify(
                JSON.parse(String.fromCharCode.apply(null, new Uint8Array(wt)))
              );
            },
            getLicenseServerURLFromInitData: function () {
              return null;
            },
            getCDMData: function () {
              return null;
            },
            getClearKeysFromProtectionData: function (wt, Mt) {
              let Wt = null;
              if (wt) {
                const Ft = JSON.parse(
                    String.fromCharCode.apply(null, new Uint8Array(Mt))
                  ),
                  un = [];
                for (let Yt = 0; Yt < Ft.kids.length; Yt++) {
                  const Qt = Ft.kids[Yt],
                    Sn =
                      wt.clearkeys && wt.clearkeys.hasOwnProperty(Qt)
                        ? wt.clearkeys[Qt]
                        : null;
                  if (!Sn)
                    throw new Error(
                      "DRM: ClearKey keyID (" + Qt + ") is not known!"
                    );
                  un.push(new k(Qt, Sn));
                }
                Wt = new D(un);
              }
              return Wt;
            },
          }),
          rn
        );
      }
      I.__dashjs_factory_name = "KeySystemClearKey";
      var O = v.default.getSingletonFactory(I);
      const X = i.default.W3C_CLEARKEY_UUID,
        G = i.default.CLEARKEY_KEYSTEM_STRING,
        H = "urn:uuid:" + X;
      function E(on) {
        let rn;
        const It = on.BASE64,
          wt = on.debug.getLogger(rn);
        return (
          (rn = {
            uuid: X,
            schemeIdURI: H,
            systemString: G,
            getInitData: function (Mt) {
              return u.parseInitDataFromContentProtection(Mt, It);
            },
            getRequestHeadersFromMessage: function () {
              return null;
            },
            getLicenseRequestFromMessage: function (Mt) {
              return new Uint8Array(Mt);
            },
            getLicenseServerURLFromInitData: function () {
              return null;
            },
            getCDMData: function () {
              return null;
            },
            getClearKeysFromProtectionData: function (Mt, Wt) {
              let Ft = null;
              if (Mt) {
                const un = JSON.parse(
                    String.fromCharCode.apply(null, new Uint8Array(Wt))
                  ),
                  Yt = [];
                for (let Qt = 0; Qt < un.kids.length; Qt++) {
                  const Sn = un.kids[Qt],
                    ar =
                      Mt.clearkeys && Mt.clearkeys.hasOwnProperty(Sn)
                        ? Mt.clearkeys[Sn]
                        : null;
                  if (!ar)
                    throw new Error(
                      "DRM: ClearKey keyID (" + Sn + ") is not known!"
                    );
                  Yt.push(new k(Sn, ar));
                }
                (Ft = new D(Yt)),
                  wt.warn(
                    "ClearKey schemeIdURI is using W3C Common PSSH systemID (1077efec-c0b2-4d02-ace3-3c1e52e2fb4b) in Content Protection. See DASH-IF IOP v4.1 section 7.6.2.4"
                  );
              }
              return Ft;
            },
          }),
          rn
        );
      }
      E.__dashjs_factory_name = "KeySystemW3CClearKey";
      var S = v.default.getSingletonFactory(E);
      const L = i.default.WIDEVINE_UUID,
        W = i.default.WIDEVINE_KEYSTEM_STRING,
        F = "urn:uuid:" + L;
      function oe(on) {
        let rn;
        const It = (on = on || {}).BASE64;
        return (
          (rn = {
            uuid: L,
            schemeIdURI: F,
            systemString: W,
            getInitData: function (wt) {
              return u.parseInitDataFromContentProtection(wt, It);
            },
            getRequestHeadersFromMessage: function () {
              return null;
            },
            getLicenseRequestFromMessage: function (wt) {
              return new Uint8Array(wt);
            },
            getLicenseServerURLFromInitData: function () {
              return null;
            },
            getCDMData: function () {
              return null;
            },
          }),
          rn
        );
      }
      oe.__dashjs_factory_name = "KeySystemWidevine";
      var De = v.default.getSingletonFactory(oe);
      const Xe = i.default.PLAYREADY_UUID,
        ze = i.default.PLAYREADY_KEYSTEM_STRING,
        ht = "urn:uuid:" + Xe;
      function gt(on) {
        let rn,
          It = "utf-16";
        const wt = (on = on || {}).BASE64,
          Mt = on.settings;
        function Wt() {
          if (
            !wt ||
            !wt.hasOwnProperty("decodeArray") ||
            !wt.hasOwnProperty("decodeArray")
          )
            throw new Error("Missing config parameter(s)");
        }
        return (
          (rn = {
            uuid: Xe,
            schemeIdURI: ht,
            systemString: ze,
            getInitData: function (Ft) {
              const un = new Uint8Array([112, 115, 115, 104, 0, 0, 0, 0]),
                Yt = new Uint8Array([
                  154, 4, 240, 121, 152, 64, 66, 134, 171, 146, 230, 91, 224,
                  136, 95, 149,
                ]);
              let Qt,
                Sn,
                ar,
                ye,
                Gn,
                Ht = 0,
                yr = null;
              if ((Wt(), !Ft)) return null;
              if ("pssh" in Ft && Ft.pssh)
                return u.parseInitDataFromContentProtection(Ft, wt);
              if ("pro" in Ft && Ft.pro) yr = wt.decodeArray(Ft.pro.__text);
              else {
                if (!("prheader" in Ft) || !Ft.prheader) return null;
                yr = wt.decodeArray(Ft.prheader.__text);
              }
              return (
                (Qt = yr.length),
                (Sn = 4 + un.length + Yt.length + 4 + Qt),
                (ar = new ArrayBuffer(Sn)),
                (ye = new Uint8Array(ar)),
                (Gn = new DataView(ar)),
                Gn.setUint32(Ht, Sn),
                (Ht += 4),
                ye.set(un, Ht),
                (Ht += un.length),
                ye.set(Yt, Ht),
                (Ht += Yt.length),
                Gn.setUint32(Ht, Qt),
                (Ht += 4),
                ye.set(yr, Ht),
                (Ht += Qt),
                ye.buffer
              );
            },
            getRequestHeadersFromMessage: function (Ft) {
              let un, Yt;
              const Qt = {},
                Sn = new DOMParser();
              if (
                Mt &&
                Mt.get().streaming.protection.detectPlayreadyMessageFormat &&
                It === "utf-16" &&
                Ft &&
                Ft.byteLength % 2 == 1
              )
                return (Qt["Content-Type"] = "text/xml; charset=utf-8"), Qt;
              const ar =
                It === "utf-16" ? new Uint16Array(Ft) : new Uint8Array(Ft);
              (un = String.fromCharCode.apply(null, ar)),
                (Yt = Sn.parseFromString(un, "application/xml"));
              const ye = Yt.getElementsByTagName("name"),
                Gn = Yt.getElementsByTagName("value");
              for (let Ht = 0; Ht < ye.length; Ht++)
                Qt[ye[Ht].childNodes[0].nodeValue] =
                  Gn[Ht].childNodes[0].nodeValue;
              return (
                Qt.hasOwnProperty("Content") &&
                  ((Qt["Content-Type"] = Qt.Content), delete Qt.Content),
                Qt.hasOwnProperty("Content-Type") ||
                  (Qt["Content-Type"] = "text/xml; charset=utf-8"),
                Qt
              );
            },
            getLicenseRequestFromMessage: function (Ft) {
              let un = null;
              const Yt = new DOMParser();
              if (
                Mt &&
                Mt.get().streaming.protection.detectPlayreadyMessageFormat &&
                It === "utf-16" &&
                Ft &&
                Ft.byteLength % 2 == 1
              )
                return Ft;
              const Qt =
                It === "utf-16" ? new Uint16Array(Ft) : new Uint8Array(Ft);
              Wt();
              const Sn = String.fromCharCode.apply(null, Qt),
                ar = Yt.parseFromString(Sn, "application/xml");
              if (!ar.getElementsByTagName("PlayReadyKeyMessage")[0]) return Ft;
              {
                const ye =
                  ar.getElementsByTagName("Challenge")[0].childNodes[0]
                    .nodeValue;
                ye && (un = wt.decode(ye));
              }
              return un;
            },
            getLicenseServerURLFromInitData: function (Ft) {
              if (Ft) {
                const un = new DataView(Ft),
                  Yt = un.getUint16(4, !0);
                let Qt = 6;
                const Sn = new DOMParser();
                for (let ar = 0; ar < Yt; ar++) {
                  const ye = un.getUint16(Qt, !0);
                  Qt += 2;
                  const Gn = un.getUint16(Qt, !0);
                  if (((Qt += 2), ye !== 1)) {
                    Qt += Gn;
                    continue;
                  }
                  const Ht = Ft.slice(Qt, Qt + Gn),
                    yr = String.fromCharCode.apply(null, new Uint16Array(Ht)),
                    T = Sn.parseFromString(yr, "application/xml");
                  if (T.getElementsByTagName("LA_URL")[0]) {
                    const Jn =
                      T.getElementsByTagName("LA_URL")[0].childNodes[0]
                        .nodeValue;
                    if (Jn) return Jn;
                  }
                  if (T.getElementsByTagName("LUI_URL")[0]) {
                    const Jn =
                      T.getElementsByTagName("LUI_URL")[0].childNodes[0]
                        .nodeValue;
                    if (Jn) return Jn;
                  }
                }
              }
              return null;
            },
            getCDMData: function (Ft) {
              let un, Yt, Qt, Sn;
              if ((Wt(), !Ft)) return null;
              for (un = [], Sn = 0; Sn < Ft.length; ++Sn)
                un.push(Ft.charCodeAt(Sn)), un.push(0);
              for (
                un = String.fromCharCode.apply(null, un),
                  un = wt.encode(un),
                  Yt =
                    '<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="false"><CustomData encoding="base64encoded">%CUSTOMDATA%</CustomData></LicenseAcquisition></PlayReadyCDMData>'.replace(
                      "%CUSTOMDATA%",
                      un
                    ),
                  Qt = [],
                  Sn = 0;
                Sn < Yt.length;
                ++Sn
              )
                Qt.push(Yt.charCodeAt(Sn)), Qt.push(0);
              return new Uint8Array(Qt).buffer;
            },
            setPlayReadyMessageFormat: function (Ft) {
              if (Ft !== "utf-8" && Ft !== "utf-16")
                throw new Error(
                  'Specified message format is not one of "utf-8" or "utf-16"'
                );
              It = Ft;
            },
          }),
          rn
        );
      }
      gt.__dashjs_factory_name = "KeySystemPlayReady";
      var pt = v.default.getSingletonFactory(gt);
      function $t(on) {
        const rn = (on = on || {}).BASE64,
          It = {};
        let wt;
        return (
          (It[i.default.WIDEVINE_KEYSTEM_STRING] = {
            responseType: "json",
            getLicenseMessage: function (Mt) {
              return rn.decodeArray(Mt.license);
            },
            getErrorResponse: function (Mt) {
              return Mt;
            },
          }),
          (It[i.default.PLAYREADY_KEYSTEM_STRING] = {
            responseType: "arraybuffer",
            getLicenseMessage: function (Mt) {
              return Mt;
            },
            getErrorResponse: function (Mt) {
              return String.fromCharCode.apply(null, new Uint8Array(Mt));
            },
          }),
          (wt = {
            getServerURLFromMessage: function (Mt) {
              return Mt;
            },
            getHTTPMethod: function () {
              return "POST";
            },
            getResponseType: function (Mt) {
              return It[Mt].responseType;
            },
            getLicenseMessage: function (Mt, Wt) {
              return (
                (function () {
                  if (!rn || !rn.hasOwnProperty("decodeArray"))
                    throw new Error("Missing config parameter(s)");
                })(),
                It[Wt].getLicenseMessage(Mt)
              );
            },
            getErrorResponse: function (Mt, Wt) {
              return It[Wt].getErrorResponse(Mt);
            },
          }),
          wt
        );
      }
      $t.__dashjs_factory_name = "DRMToday";
      var ot = v.default.getSingletonFactory($t);
      function tt() {
        let on;
        const rn = "http://schemas.xmlsoap.org/soap/envelope/";
        function It(Wt) {
          const Ft = String.fromCharCode.apply(null, new Uint8Array(Wt));
          return decodeURIComponent(escape(Ft));
        }
        function wt(Wt) {
          if (window.DOMParser) {
            const Ft = It(Wt),
              un = new window.DOMParser().parseFromString(Ft, "text/xml"),
              Yt = un ? un.getElementsByTagNameNS(rn, "Envelope")[0] : null,
              Qt = Yt ? Yt.getElementsByTagNameNS(rn, "Body")[0] : null;
            if (Qt && Qt.getElementsByTagNameNS(rn, "Fault")[0]) return null;
          }
          return Wt;
        }
        function Mt(Wt) {
          let Ft = "",
            un = "",
            Yt = "",
            Qt = -1,
            Sn = -1;
          if (window.DOMParser) {
            const ye = It(Wt),
              Gn = new window.DOMParser().parseFromString(ye, "text/xml"),
              Ht = Gn ? Gn.getElementsByTagNameNS(rn, "Envelope")[0] : null,
              yr = Ht ? Ht.getElementsByTagNameNS(rn, "Body")[0] : null,
              T = yr ? yr.getElementsByTagNameNS(rn, "Fault")[0] : null,
              Jn = T ? T.getElementsByTagName("detail")[0] : null,
              pr = Jn ? Jn.getElementsByTagName("Exception")[0] : null;
            let Ut = null;
            if (T === null) return ye;
            (Ut = T.getElementsByTagName("faultstring")[0].firstChild),
              (Ft = Ut ? Ut.nodeValue : null),
              pr !== null &&
                ((Ut = pr.getElementsByTagName("StatusCode")[0]),
                (un = Ut ? Ut.firstChild.nodeValue : null),
                (Ut = pr.getElementsByTagName("Message")[0]),
                (Yt = Ut ? Ut.firstChild.nodeValue : null),
                (Qt = Yt ? Yt.lastIndexOf("[") + 1 : -1),
                (Sn = Yt ? Yt.indexOf("]") : -1),
                (Yt = Yt ? Yt.substring(Qt, Sn) : ""));
          }
          let ar = `code: ${un}, name: ${Ft}`;
          return Yt && (ar += `, message: ${Yt}`), ar;
        }
        return (
          (on = {
            getServerURLFromMessage: function (Wt) {
              return Wt;
            },
            getHTTPMethod: function () {
              return "POST";
            },
            getResponseType: function () {
              return "arraybuffer";
            },
            getLicenseMessage: function (Wt) {
              return wt.call(this, Wt);
            },
            getErrorResponse: function (Wt) {
              return Mt.call(this, Wt);
            },
          }),
          on
        );
      }
      tt.__dashjs_factory_name = "PlayReady";
      var He = v.default.getSingletonFactory(tt);
      function de() {
        let on;
        return (
          (on = {
            getServerURLFromMessage: function (rn) {
              return rn;
            },
            getHTTPMethod: function () {
              return "POST";
            },
            getResponseType: function () {
              return "arraybuffer";
            },
            getLicenseMessage: function (rn) {
              return rn;
            },
            getErrorResponse: function (rn) {
              return String.fromCharCode.apply(null, new Uint8Array(rn));
            },
          }),
          on
        );
      }
      de.__dashjs_factory_name = "Widevine";
      var ue = v.default.getSingletonFactory(de);
      function Z() {
        let on;
        return (
          (on = {
            getServerURLFromMessage: function (rn) {
              return rn;
            },
            getHTTPMethod: function () {
              return "POST";
            },
            getResponseType: function () {
              return "json";
            },
            getLicenseMessage: function (rn) {
              if (!rn.hasOwnProperty("keys")) return null;
              let It = [];
              for (let wt = 0; wt < rn.keys.length; wt++) {
                let Mt = rn.keys[wt],
                  Wt = Mt.kid.replace(/=/g, ""),
                  Ft = Mt.k.replace(/=/g, "");
                It.push(new k(Wt, Ft));
              }
              return new D(It);
            },
            getErrorResponse: function (rn) {
              return String.fromCharCode.apply(null, new Uint8Array(rn));
            },
          }),
          on
        );
      }
      Z.__dashjs_factory_name = "ClearKey";
      var ie = v.default.getSingletonFactory(Z),
        Ne = class {
          constructor(on) {
            (this.ks = on.ks),
              (this.keyId = on.keyId),
              (this.initData = on.initData),
              (this.protData = on.protData),
              (this.cdmData = on.cdmData),
              (this.sessionId = on.sessionId),
              (this.sessionType = on.sessionType);
          }
        };
      function Pe() {
        let on,
          rn,
          It,
          wt,
          Mt,
          Wt,
          Ft,
          un,
          Yt = this.context;
        function Qt(ye, Gn) {
          return Gn && ye in Gn ? Gn[ye] : null;
        }
        function Sn(ye, Gn) {
          return ye && ye.sessionId
            ? ye.sessionId
            : Gn && Gn.sessionId
            ? Gn.sessionId
            : null;
        }
        function ar(ye, Gn) {
          return ye && ye.sessionType ? ye.sessionType : Gn;
        }
        return (
          (on = {
            getKeySystemBySystemString: function (ye) {
              for (let Gn = 0; Gn < wt.length; Gn++)
                if (wt[Gn].systemString === ye) return wt[Gn];
              return null;
            },
            getKeySystems: function () {
              return wt;
            },
            getLicenseServerModelInstance: function (ye, Gn, Ht) {
              if (
                Ht === i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_RELEASE ||
                Ht ===
                  i.default.MEDIA_KEY_MESSAGE_TYPES.INDIVIDUALIZATION_REQUEST
              )
                return null;
              let yr = null;
              return (
                Gn && Gn.hasOwnProperty("drmtoday")
                  ? (yr = ot(Yt).getInstance({ BASE64: Mt }))
                  : ye.systemString === i.default.WIDEVINE_KEYSTEM_STRING
                  ? (yr = ue(Yt).getInstance())
                  : ye.systemString === i.default.PLAYREADY_KEYSTEM_STRING
                  ? (yr = He(Yt).getInstance())
                  : ye.systemString === i.default.CLEARKEY_KEYSTEM_STRING &&
                    (yr = ie(Yt).getInstance()),
                yr
              );
            },
            getSupportedKeySystemMetadataFromContentProtection: function (
              ye,
              Gn,
              Ht
            ) {
              let yr,
                T,
                Jn,
                pr,
                Ut = [];
              if (!ye || !ye.length) return Ut;
              const Dt = u.findMp4ProtectionElement(ye);
              for (Jn = 0; Jn < wt.length; Jn++) {
                T = wt[Jn];
                const Kt = Qt(T.systemString, Gn);
                for (pr = 0; pr < ye.length; pr++)
                  if (
                    ((yr = ye[pr]),
                    yr.schemeIdUri.toLowerCase() === T.schemeIdURI)
                  ) {
                    let vn = T.getInitData(yr, Dt);
                    const st = new Ne({
                      ks: wt[Jn],
                      keyId: yr.keyId,
                      initData: vn,
                      protData: Kt,
                      cdmData: T.getCDMData(Kt ? Kt.cdmData : null),
                      sessionId: Sn(Kt, yr),
                      sessionType: ar(Kt, Ht),
                    });
                    Kt ? Ut.unshift(st) : Ut.push(st);
                  }
              }
              return Ut;
            },
            getSupportedKeySystemsFromSegmentPssh: function (ye, Gn, Ht) {
              let yr,
                T,
                Jn = [],
                pr = u.parsePSSHList(ye);
              for (let Ut = 0; Ut < wt.length; ++Ut) {
                (yr = wt[Ut]), (T = yr.systemString);
                const Dt = Qt(T, Gn);
                yr.uuid in pr &&
                  Jn.push({
                    ks: yr,
                    initData: pr[yr.uuid],
                    protData: Dt,
                    cdmData: yr.getCDMData(Dt ? Dt.cdmData : null),
                    sessionId: Sn(Dt),
                    sessionType: ar(Dt, Ht),
                  });
              }
              return Jn;
            },
            initDataEquals: function (ye, Gn) {
              if (ye.byteLength === Gn.byteLength) {
                let Ht = new Uint8Array(ye),
                  yr = new Uint8Array(Gn);
                for (let T = 0; T < Ht.length; T++)
                  if (Ht[T] !== yr[T]) return !1;
                return !0;
              }
              return !1;
            },
            initialize: function () {
              let ye;
              (wt = []),
                (ye = pt(Yt).getInstance({ BASE64: Mt, settings: Wt })),
                wt.push(ye),
                (ye = De(Yt).getInstance({ BASE64: Mt })),
                wt.push(ye),
                (ye = O(Yt).getInstance({ BASE64: Mt })),
                wt.push(ye),
                (Ft = ye),
                (ye = S(Yt).getInstance({ BASE64: Mt, debug: rn })),
                wt.push(ye),
                (un = ye);
            },
            isClearKey: function (ye) {
              return ye === Ft || ye === un;
            },
            processClearKeyLicenseRequest: function (ye, Gn, Ht) {
              try {
                return ye.getClearKeysFromProtectionData(Gn, Ht);
              } catch {
                return (
                  It.error("Failed to retrieve clearkeys from ProtectionData"),
                  null
                );
              }
            },
            setConfig: function (ye) {
              ye &&
                (ye.debug && ((rn = ye.debug), (It = rn.getLogger(on))),
                ye.BASE64 && (Mt = ye.BASE64),
                ye.settings && (Wt = ye.settings));
            },
            setKeySystems: function (ye) {
              wt = ye;
            },
            setProtectionData: function (ye) {
              for (var Gn, Ht, yr = 0; yr < wt.length; yr++) {
                var T = wt[yr];
                T.hasOwnProperty("init") &&
                  T.init(
                    ((Gn = T.systemString),
                    (Ht = void 0),
                    (Ht = null),
                    ye && (Ht = Gn in ye ? ye[Gn] : null),
                    Ht)
                  );
              }
            },
          }),
          on
        );
      }
      Pe.__dashjs_factory_name = "ProtectionKeyController";
      var kt = v.default.getSingletonFactory(Pe),
        Gt = n(445),
        B = class {
          constructor(on, rn) {
            (this.initData = on), (this.initDataType = rn);
          }
        },
        re = class {
          constructor(on, rn, It, wt) {
            (this.sessionToken = on),
              (this.message = rn),
              (this.defaultURL = It),
              (this.messageType =
                wt || i.default.MEDIA_KEY_MESSAGE_TYPES.LICENSE_REQUEST);
          }
        },
        Ae = class {
          constructor(on, rn) {
            (this.keySystem = on),
              (this.ksConfiguration = rn),
              (this.nativeMediaKeySystemAccessObject = null),
              (this.selectedSystemString = null);
          }
        };
      const lt = {};
      function Et(on) {
        on = on || {};
        const rn = this.context,
          It = on.eventBus,
          wt = on.events,
          Mt = on.debug;
        let Wt, Ft, un, Yt, Qt, Sn, ar, ye;
        function Gn(Ut, Dt, Kt, vn) {
          if (
            navigator.requestMediaKeySystemAccess === void 0 ||
            typeof navigator.requestMediaKeySystemAccess != "function"
          ) {
            const sn = "Insecure origins are not allowed";
            return (
              It.trigger(wt.KEY_SYSTEM_ACCESS_COMPLETE, { error: sn }),
              void vn({ error: sn })
            );
          }
          const st =
              Ut[Dt].protData && Ut[Dt].protData.systemStringPriority
                ? Ut[Dt].protData.systemStringPriority
                : null,
            Xt = Ut[Dt].configs,
            qn = Ut[Dt].ks;
          let cr = qn.systemString;
          var Ui, Je;
          ((Ui = st || (lt[cr] ? lt[cr] : [cr])),
          (Je = Xt),
          new Promise((sn, Ye) => {
            Ht(Ui, Je, 0, sn, Ye);
          }))
            .then((sn) => {
              const Ye =
                  sn &&
                  sn.nativeMediaKeySystemAccessObject &&
                  typeof sn.nativeMediaKeySystemAccessObject.getConfiguration ==
                    "function"
                    ? sn.nativeMediaKeySystemAccessObject.getConfiguration()
                    : null,
                Ct = new Ae(qn, Ye);
              (Ct.selectedSystemString = sn.selectedSystemString),
                (Ct.nativeMediaKeySystemAccessObject =
                  sn.nativeMediaKeySystemAccessObject),
                It.trigger(wt.KEY_SYSTEM_ACCESS_COMPLETE, { data: Ct }),
                Kt({ data: Ct });
            })
            .catch((sn) => {
              if (Dt + 1 < Ut.length) Gn(Ut, Dt + 1, Kt, vn);
              else {
                const Ye = "Key system access denied! ";
                It.trigger(wt.KEY_SYSTEM_ACCESS_COMPLETE, {
                  error: Ye + sn.message,
                }),
                  vn({ error: Ye + sn.message });
              }
            });
        }
        function Ht(Ut, Dt, Kt, vn, st) {
          const Xt = Ut[Kt];
          Ft.debug(`Requesting key system access for system string ${Xt}`),
            navigator
              .requestMediaKeySystemAccess(Xt, Dt)
              .then((qn) => {
                vn({
                  nativeMediaKeySystemAccessObject: qn,
                  selectedSystemString: Xt,
                });
              })
              .catch((qn) => {
                Kt + 1 < Ut.length ? Ht(Ut, Dt, Kt + 1, vn, st) : st(qn);
              });
        }
        function yr(Ut) {
          if (!Ut || !Ut.session) return Promise.resolve;
          const Dt = Ut.session;
          return (
            Dt.removeEventListener("keystatuseschange", Ut),
            Dt.removeEventListener("message", Ut),
            Dt.close()
          );
        }
        function T(Ut) {
          for (let Dt = 0; Dt < Sn.length; Dt++)
            if (Sn[Dt] === Ut) {
              Sn.splice(Dt, 1);
              break;
            }
        }
        function Jn(Ut, Dt) {
          const Kt = {
            session: Ut,
            keyId: Dt.keyId,
            normalizedKeyId:
              Dt && Dt.keyId && typeof Dt.keyId == "string"
                ? Dt.keyId.replace(/-/g, "").toLowerCase()
                : "",
            initData: Dt.initData,
            sessionId: Dt.sessionId,
            sessionType: Dt.sessionType,
            hasTriggeredKeyStatusMapUpdate: !1,
            handleEvent: function (vn) {
              switch (vn.type) {
                case "keystatuseschange":
                  this._onKeyStatusesChange(vn);
                  break;
                case "message":
                  this._onKeyMessage(vn);
              }
            },
            _onKeyStatusesChange: function (vn) {
              It.trigger(wt.KEY_STATUSES_CHANGED, { data: this });
              const st = [];
              vn.target.keyStatuses.forEach(function () {
                st.push(pr(arguments));
              }),
                It.trigger(wt.INTERNAL_KEY_STATUSES_CHANGED, {
                  parsedKeyStatuses: st,
                  sessionToken: Kt,
                });
            },
            _onKeyMessage: function (vn) {
              let st = ArrayBuffer.isView(vn.message)
                ? vn.message.buffer
                : vn.message;
              It.trigger(wt.INTERNAL_KEY_MESSAGE, {
                data: new re(this, st, void 0, vn.messageType),
              });
            },
            getKeyId: function () {
              return this.keyId;
            },
            getSessionId: function () {
              return Ut.sessionId;
            },
            getSessionType: function () {
              return this.sessionType;
            },
            getExpirationTime: function () {
              return Ut.expiration;
            },
            getKeyStatuses: function () {
              return Ut.keyStatuses;
            },
            getUsable: function () {
              let vn = !1;
              return (
                Ut.keyStatuses.forEach(function () {
                  pr(arguments).status ===
                    i.default.MEDIA_KEY_STATUSES.USABLE && (vn = !0);
                }),
                vn
              );
            },
          };
          return (
            Ut.addEventListener("keystatuseschange", Kt),
            Ut.addEventListener("message", Kt),
            Ut.closed.then(() => {
              T(Kt),
                Ft.debug(
                  "DRM: Session closed.  SessionID = " + Kt.getSessionId()
                ),
                It.trigger(wt.KEY_SESSION_CLOSED, { data: Kt.getSessionId() });
            }),
            Sn.push(Kt),
            Kt
          );
        }
        function pr(Ut) {
          let Dt, Kt;
          return (
            Ut &&
              Ut.length > 0 &&
              (Ut[0] &&
                (typeof Ut[0] == "string" ? (Dt = Ut[0]) : (Kt = Ut[0])),
              Ut[1] &&
                (typeof Ut[1] == "string" ? (Dt = Ut[1]) : (Kt = Ut[1]))),
            { status: Dt, keyId: Kt }
          );
        }
        return (
          (Wt = {
            closeKeySession: function (Ut) {
              yr(Ut).catch(function (Dt) {
                T(Ut),
                  It.trigger(wt.KEY_SESSION_CLOSED, {
                    data: null,
                    error:
                      "Error closing session (" +
                      Ut.getSessionId() +
                      ") " +
                      Dt.name,
                  });
              });
            },
            createKeySession: function (Ut) {
              if (!un || !Qt)
                throw new Error(
                  "Can not create sessions until you have selected a key system"
                );
              const Dt = Qt.createSession(Ut.sessionType),
                Kt = Jn(Dt, Ut),
                vn =
                  un.systemString === i.default.CLEARKEY_KEYSTEM_STRING &&
                  (Ut.initData || (Ut.protData && Ut.protData.clearkeys))
                    ? i.default.INITIALIZATION_DATA_TYPE_KEYIDS
                    : i.default.INITIALIZATION_DATA_TYPE_CENC;
              Dt.generateRequest(vn, Ut.initData)
                .then(function () {
                  Ft.debug(
                    "DRM: Session created.  SessionID = " + Kt.getSessionId()
                  ),
                    It.trigger(wt.KEY_SESSION_CREATED, { data: Kt });
                })
                .catch(function (st) {
                  T(Kt),
                    It.trigger(wt.KEY_SESSION_CREATED, {
                      data: null,
                      error: new f.default(
                        h.default.KEY_SESSION_CREATED_ERROR_CODE,
                        h.default.KEY_SESSION_CREATED_ERROR_MESSAGE +
                          "Error generating key request -- " +
                          st.name
                      ),
                    });
                });
            },
            getAllInitData: function () {
              const Ut = [];
              for (let Dt = 0; Dt < Sn.length; Dt++)
                Sn[Dt].initData && Ut.push(Sn[Dt].initData);
              return Ut;
            },
            getSessionTokens: function () {
              return Sn;
            },
            loadKeySession: function (Ut) {
              if (!un || !Qt)
                throw new Error(
                  "Can not load sessions until you have selected a key system"
                );
              const Dt = Ut.sessionId;
              for (let st = 0; st < Sn.length; st++)
                if (Dt === Sn[st].sessionId)
                  return void Ft.warn(
                    "DRM: Ignoring session ID because we have already seen it!"
                  );
              const Kt = Qt.createSession(Ut.sessionType),
                vn = Jn(Kt, Ut);
              (vn.hasTriggeredKeyStatusMapUpdate = !0),
                Kt.load(Dt)
                  .then(function (st) {
                    st
                      ? (Ft.debug(
                          "DRM: Session loaded.  SessionID = " +
                            vn.getSessionId()
                        ),
                        It.trigger(wt.KEY_SESSION_CREATED, { data: vn }))
                      : (T(vn),
                        It.trigger(wt.KEY_SESSION_CREATED, {
                          data: null,
                          error: new f.default(
                            h.default.KEY_SESSION_CREATED_ERROR_CODE,
                            h.default.KEY_SESSION_CREATED_ERROR_MESSAGE +
                              "Could not load session! Invalid Session ID (" +
                              Dt +
                              ")"
                          ),
                        }));
                  })
                  .catch(function (st) {
                    T(vn),
                      It.trigger(wt.KEY_SESSION_CREATED, {
                        data: null,
                        error: new f.default(
                          h.default.KEY_SESSION_CREATED_ERROR_CODE,
                          h.default.KEY_SESSION_CREATED_ERROR_MESSAGE +
                            "Could not load session (" +
                            Dt +
                            ")! " +
                            st.name
                        ),
                      });
                  });
            },
            removeKeySession: function (Ut) {
              Ut.session.remove().then(
                function () {
                  Ft.debug(
                    "DRM: Session removed.  SessionID = " + Ut.getSessionId()
                  ),
                    It.trigger(wt.KEY_SESSION_REMOVED, {
                      data: Ut.getSessionId(),
                    });
                },
                function (Dt) {
                  It.trigger(wt.KEY_SESSION_REMOVED, {
                    data: null,
                    error:
                      "Error removing session (" +
                      Ut.getSessionId() +
                      "). " +
                      Dt.name,
                  });
                }
              );
            },
            requestKeySystemAccess: function (Ut) {
              return new Promise((Dt, Kt) => {
                Gn(Ut, 0, Dt, Kt);
              });
            },
            reset: function () {
              const Ut = Sn.length;
              let Dt;
              if (Ut !== 0) {
                const vn = function (st) {
                  T(st),
                    Sn.length === 0 &&
                      (Yt
                        ? (Yt.removeEventListener("encrypted", ar),
                          Yt.setMediaKeys(null).then(function () {
                            It.trigger(wt.TEARDOWN_COMPLETE);
                          }))
                        : It.trigger(wt.TEARDOWN_COMPLETE));
                };
                for (let st = 0; st < Ut; st++)
                  (Dt = Sn[st]), (Kt = Dt), yr(Dt), vn(Kt);
              } else It.trigger(wt.TEARDOWN_COMPLETE);
              var Kt;
            },
            selectKeySystem: function (Ut) {
              return new Promise((Dt, Kt) => {
                Ut.nativeMediaKeySystemAccessObject
                  .createMediaKeys()
                  .then(
                    (vn) => (
                      (un = Ut.keySystem),
                      (Qt = vn),
                      Yt ? Yt.setMediaKeys(Qt) : Promise.resolve()
                    )
                  )
                  .then(() => {
                    Dt(un);
                  })
                  .catch(function () {
                    Kt({
                      error:
                        "Error selecting keys system (" +
                        Ut.keySystem.systemString +
                        ")! Could not create MediaKeys -- TODO",
                    });
                  });
              });
            },
            setMediaElement: function (Ut) {
              Yt !== Ut &&
                (Yt &&
                  (Yt.removeEventListener("encrypted", ar),
                  Yt.setMediaKeys && Yt.setMediaKeys(null)),
                (Yt = Ut),
                Yt &&
                  (Yt.addEventListener("encrypted", ar),
                  Yt.setMediaKeys && Qt && Yt.setMediaKeys(Qt)));
            },
            setServerCertificate: function (Ut) {
              return new Promise((Dt, Kt) => {
                Qt.setServerCertificate(Ut)
                  .then(function () {
                    Ft.info(
                      "DRM: License server certificate successfully updated."
                    ),
                      It.trigger(wt.SERVER_CERTIFICATE_UPDATED),
                      Dt();
                  })
                  .catch((vn) => {
                    Kt(vn),
                      It.trigger(wt.SERVER_CERTIFICATE_UPDATED, {
                        error: new f.default(
                          h.default.SERVER_CERTIFICATE_UPDATED_ERROR_CODE,
                          h.default.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE +
                            vn.name
                        ),
                      });
                  });
              });
            },
            stop: function () {
              let Ut;
              for (let Dt = 0; Dt < Sn.length; Dt++)
                (Ut = Sn[Dt]), Ut.getUsable() || (yr(Ut), T(Ut));
            },
            updateKeySession: function (Ut, Dt) {
              const Kt = Ut.session;
              ye.isClearKey(un) && (Dt = Dt.toJWK()),
                Kt.update(Dt)
                  .then(() => {
                    It.trigger(wt.KEY_SESSION_UPDATED);
                  })
                  .catch(function (vn) {
                    It.trigger(wt.KEY_ERROR, {
                      error: new f.default(
                        h.default.MEDIA_KEYERR_CODE,
                        "Error sending update() message! " + vn.name,
                        Ut
                      ),
                    });
                  });
            },
          }),
          (Ft = Mt.getLogger(Wt)),
          (un = null),
          (Yt = null),
          (Qt = null),
          (Sn = []),
          (ye = kt(rn).getInstance()),
          (ar = {
            handleEvent: function (Ut) {
              if (Ut.type === "encrypted" && Ut.initData) {
                let Dt = ArrayBuffer.isView(Ut.initData)
                  ? Ut.initData.buffer
                  : Ut.initData;
                It.trigger(wt.NEED_KEY, { key: new B(Dt, Ut.initDataType) });
              }
            },
          }),
          Wt
        );
      }
      (lt[i.default.PLAYREADY_KEYSTEM_STRING] = [
        i.default.PLAYREADY_KEYSTEM_STRING,
        i.default.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING,
      ]),
        (lt[i.default.WIDEVINE_KEYSTEM_STRING] = [
          i.default.WIDEVINE_KEYSTEM_STRING,
        ]),
        (lt[i.default.CLEARKEY_KEYSTEM_STRING] = [
          i.default.CLEARKEY_KEYSTEM_STRING,
        ]),
        (Et.__dashjs_factory_name = "DefaultProtectionModel");
      var St = v.default.getClassFactory(Et);
      function Lt(on) {
        on = on || {};
        const rn = this.context,
          It = on.eventBus,
          wt = on.events,
          Mt = on.debug,
          Wt = on.api;
        let Ft, un, Yt, Qt, Sn, ar, ye, Gn, Ht;
        function yr() {
          try {
            for (let pr = 0; pr < ye.length; pr++) T(ye[pr]);
            Yt && Yt.removeEventListener(Wt.needkey, Gn),
              It.trigger(wt.TEARDOWN_COMPLETE);
          } catch (pr) {
            It.trigger(wt.TEARDOWN_COMPLETE, {
              error:
                "Error tearing down key sessions and MediaKeys! -- " +
                pr.message,
            });
          }
        }
        function T(pr) {
          const Ut = pr.session;
          Ut.removeEventListener(Wt.error, pr),
            Ut.removeEventListener(Wt.message, pr),
            Ut.removeEventListener(Wt.ready, pr),
            Ut.removeEventListener(Wt.close, pr);
          for (let Dt = 0; Dt < ye.length; Dt++)
            if (ye[Dt] === pr) {
              ye.splice(Dt, 1);
              break;
            }
          Ut[Wt.release]();
        }
        function Jn() {
          let pr = null;
          const Ut = function () {
            Yt.removeEventListener("loadedmetadata", pr),
              Yt[Wt.setMediaKeys](Sn),
              It.trigger(wt.VIDEO_ELEMENT_SELECTED);
          };
          Yt.readyState >= 1
            ? Ut()
            : ((pr = Ut.bind(this)), Yt.addEventListener("loadedmetadata", pr));
        }
        return (
          (Ft = {
            getAllInitData: function () {
              const pr = [];
              for (let Ut = 0; Ut < ye.length; Ut++) pr.push(ye[Ut].initData);
              return pr;
            },
            getSessionTokens: function () {
              return ye;
            },
            requestKeySystemAccess: function (pr) {
              return new Promise((Ut, Dt) => {
                let Kt = !1;
                for (let vn = 0; vn < pr.length; vn++) {
                  const st = pr[vn].ks.systemString,
                    Xt = pr[vn].configs;
                  let qn = null,
                    cr = null;
                  for (let Ui = 0; Ui < Xt.length; Ui++) {
                    const Je = Xt[Ui].audioCapabilities,
                      sn = Xt[Ui].videoCapabilities;
                    if (Je && Je.length !== 0) {
                      qn = [];
                      for (let Pn = 0; Pn < Je.length; Pn++)
                        window[Wt.MediaKeys].isTypeSupported(
                          st,
                          Je[Pn].contentType
                        ) && qn.push(Je[Pn]);
                    }
                    if (sn && sn.length !== 0) {
                      cr = [];
                      for (let Pn = 0; Pn < sn.length; Pn++)
                        window[Wt.MediaKeys].isTypeSupported(
                          st,
                          sn[Pn].contentType
                        ) && cr.push(sn[Pn]);
                    }
                    if (
                      (!qn && !cr) ||
                      (qn && qn.length === 0) ||
                      (cr && cr.length === 0)
                    )
                      continue;
                    Kt = !0;
                    const Ye = new d(qn, cr),
                      Ct = Ht.getKeySystemBySystemString(st),
                      At = new Ae(Ct, Ye);
                    It.trigger(wt.KEY_SYSTEM_ACCESS_COMPLETE, { data: At }),
                      Ut({ data: At });
                    break;
                  }
                }
                if (!Kt) {
                  const vn =
                    "Key system access denied! -- No valid audio/video content configurations detected!";
                  It.trigger(wt.KEY_SYSTEM_ACCESS_COMPLETE, { error: vn }),
                    Dt({ error: vn });
                }
              });
            },
            selectKeySystem: function (pr) {
              return new Promise((Ut, Dt) => {
                try {
                  (Sn = pr.mediaKeys =
                    new window[Wt.MediaKeys](pr.keySystem.systemString)),
                    (Qt = pr.keySystem),
                    (ar = pr),
                    Yt && Jn(),
                    Ut(Qt);
                } catch {
                  Dt({
                    error:
                      "Error selecting keys system (" +
                      Qt.systemString +
                      ")! Could not create MediaKeys -- TODO",
                  });
                }
              });
            },
            setMediaElement: function (pr) {
              Yt !== pr &&
                (Yt && Yt.removeEventListener(Wt.needkey, Gn),
                (Yt = pr),
                Yt && (Yt.addEventListener(Wt.needkey, Gn), Sn && Jn()));
            },
            createKeySession: function (pr) {
              if (!Qt || !Sn || !ar)
                throw new Error(
                  "Can not create sessions until you have selected a key system"
                );
              let Ut = null;
              if (
                (ar.ksConfiguration.videoCapabilities &&
                  ar.ksConfiguration.videoCapabilities.length > 0 &&
                  (Ut = ar.ksConfiguration.videoCapabilities[0]),
                Ut === null &&
                  ar.ksConfiguration.audioCapabilities &&
                  ar.ksConfiguration.audioCapabilities.length > 0 &&
                  (Ut = ar.ksConfiguration.audioCapabilities[0]),
                Ut === null)
              )
                throw new Error(
                  "Can not create sessions for unknown content types."
                );
              const Dt = Ut.contentType,
                Kt = Sn.createSession(
                  Dt,
                  new Uint8Array(pr.initData),
                  pr.cdmData ? new Uint8Array(pr.cdmData) : null
                ),
                vn = {
                  session: Kt,
                  keyId: (st = pr).keyId,
                  normalizedKeyId:
                    st && st.keyId && typeof st.keyId == "string"
                      ? st.keyId.replace(/-/g, "").toLowerCase()
                      : "",
                  initData: st.initData,
                  hasTriggeredKeyStatusMapUpdate: !1,
                  getKeyId: function () {
                    return this.keyId;
                  },
                  getSessionId: function () {
                    return this.session.sessionId;
                  },
                  getExpirationTime: function () {
                    return NaN;
                  },
                  getSessionType: function () {
                    return "temporary";
                  },
                  getKeyStatuses: function () {
                    return { size: 0, has: () => !1, get: () => {} };
                  },
                  handleEvent: function (Xt) {
                    switch (Xt.type) {
                      case Wt.error:
                        let qn = "KeyError";
                        It.trigger(wt.KEY_ERROR, {
                          error: new f.default(
                            h.default.MEDIA_KEYERR_CODE,
                            qn,
                            this
                          ),
                        });
                        break;
                      case Wt.message:
                        let cr = ArrayBuffer.isView(Xt.message)
                          ? Xt.message.buffer
                          : Xt.message;
                        It.trigger(wt.INTERNAL_KEY_MESSAGE, {
                          data: new re(this, cr, Xt.destinationURL),
                        });
                        break;
                      case Wt.ready:
                        un.debug("DRM: Key added."), It.trigger(wt.KEY_ADDED);
                        break;
                      case Wt.close:
                        un.debug(
                          "DRM: Session closed.  SessionID = " +
                            this.getSessionId()
                        ),
                          It.trigger(wt.KEY_SESSION_CLOSED, {
                            data: this.getSessionId(),
                          });
                    }
                  },
                };
              var st;
              Kt.addEventListener(Wt.error, vn),
                Kt.addEventListener(Wt.message, vn),
                Kt.addEventListener(Wt.ready, vn),
                Kt.addEventListener(Wt.close, vn),
                ye.push(vn),
                un.debug(
                  "DRM: Session created.  SessionID = " + vn.getSessionId()
                ),
                It.trigger(wt.KEY_SESSION_CREATED, { data: vn });
            },
            updateKeySession: function (pr, Ut) {
              const Dt = pr.session;
              Ht.isClearKey(Qt)
                ? Dt.update(new Uint8Array(Ut.toJWK()))
                : Dt.update(new Uint8Array(Ut)),
                It.trigger(wt.KEY_SESSION_UPDATED);
            },
            closeKeySession: T,
            setServerCertificate: function () {},
            loadKeySession: function () {},
            removeKeySession: function () {},
            stop: yr,
            reset: yr,
          }),
          (un = Mt.getLogger(Ft)),
          (Yt = null),
          (Qt = null),
          (Sn = null),
          (ar = null),
          (ye = []),
          (Ht = kt(rn).getInstance()),
          (Gn = {
            handleEvent: function (pr) {
              if (pr.type === Wt.needkey && pr.initData) {
                const Ut = ArrayBuffer.isView(pr.initData)
                  ? pr.initData.buffer
                  : pr.initData;
                It.trigger(wt.NEED_KEY, {
                  key: new B(Ut, i.default.INITIALIZATION_DATA_TYPE_CENC),
                });
              }
            },
          }),
          Ft
        );
      }
      Lt.__dashjs_factory_name = "ProtectionModel_3Feb2014";
      var ln = v.default.getClassFactory(Lt);
      function Ln(on) {
        on = on || {};
        const rn = this.context,
          It = on.eventBus,
          wt = on.events,
          Mt = on.debug,
          Wt = on.api,
          Ft = on.errHandler;
        let un, Yt, Qt, Sn, ar, ye, Gn, Ht, yr;
        function T() {
          Qt && Ut();
          for (let Dt = 0; Dt < Gn.length; Dt++) Jn(Gn[Dt]);
          It.trigger(wt.TEARDOWN_COMPLETE);
        }
        function Jn(Dt) {
          try {
            Qt[Wt.cancelKeyRequest](Sn.systemString, Dt.sessionId);
          } catch (Kt) {
            It.trigger(wt.KEY_SESSION_CLOSED, {
              data: null,
              error:
                "Error closing session (" + Dt.sessionId + ") " + Kt.message,
            });
          }
        }
        function pr(Dt, Kt) {
          if (Kt && Dt) {
            const vn = Dt.length;
            for (let st = 0; st < vn; st++)
              if (Dt[st].sessionId == Kt) return Dt[st];
            return null;
          }
          return null;
        }
        function Ut() {
          Qt.removeEventListener(Wt.keyerror, yr),
            Qt.removeEventListener(Wt.needkey, yr),
            Qt.removeEventListener(Wt.keymessage, yr),
            Qt.removeEventListener(Wt.keyadded, yr);
        }
        return (
          (un = {
            getAllInitData: function () {
              const Dt = [];
              for (let Kt = 0; Kt < ye.length; Kt++) Dt.push(ye[Kt].initData);
              for (let Kt = 0; Kt < Gn.length; Kt++) Dt.push(Gn[Kt].initData);
              return Dt;
            },
            getSessionTokens: function () {
              return Gn.concat(ye);
            },
            requestKeySystemAccess: function (Dt) {
              return new Promise((Kt, vn) => {
                let st = Qt;
                st || (st = document.createElement("video"));
                let Xt = !1;
                for (let qn = 0; qn < Dt.length; qn++) {
                  const cr = Dt[qn].ks.systemString,
                    Ui = Dt[qn].configs;
                  let Je = null,
                    sn = null;
                  for (let Ye = 0; Ye < Ui.length; Ye++) {
                    const Ct = Ui[Ye].videoCapabilities;
                    if (Ct && Ct.length !== 0) {
                      sn = [];
                      for (let wn = 0; wn < Ct.length; wn++)
                        st.canPlayType(Ct[wn].contentType, cr) !== "" &&
                          sn.push(Ct[wn]);
                    }
                    if (!sn || Je || (sn && sn.length === 0)) continue;
                    Xt = !0;
                    const At = new d(Je, sn),
                      Pn = ar.getKeySystemBySystemString(cr),
                      Xn = new Ae(Pn, At);
                    It.trigger(wt.KEY_SYSTEM_ACCESS_COMPLETE, { data: Xn }),
                      Kt({ data: Xn });
                    break;
                  }
                }
                if (!Xt) {
                  const qn =
                    "Key system access denied! -- No valid audio/video content configurations detected!";
                  It.trigger(wt.KEY_SYSTEM_ACCESS_COMPLETE, { error: qn }),
                    vn({ error: qn });
                }
              });
            },
            selectKeySystem: function (Dt) {
              return (Sn = Dt.keySystem), Promise.resolve(Sn);
            },
            setMediaElement: function (Dt) {
              if (Qt !== Dt) {
                if (Qt) {
                  Ut();
                  for (var Kt = 0; Kt < Gn.length; Kt++) Jn(Gn[Kt]);
                  Gn = [];
                }
                (Qt = Dt),
                  Qt &&
                    (Qt.addEventListener(Wt.keyerror, yr),
                    Qt.addEventListener(Wt.needkey, yr),
                    Qt.addEventListener(Wt.keymessage, yr),
                    Qt.addEventListener(Wt.keyadded, yr),
                    It.trigger(wt.VIDEO_ELEMENT_SELECTED));
              }
            },
            createKeySession: function (Dt) {
              if (!Sn)
                throw new Error(
                  "Can not create sessions until you have selected a key system"
                );
              if (Ht || Gn.length === 0) {
                const Kt = {
                  sessionId: null,
                  keyId: Dt.keyId,
                  normalizedKeyId:
                    Dt && Dt.keyId && typeof Dt.keyId == "string"
                      ? Dt.keyId.replace(/-/g, "").toLowerCase()
                      : "",
                  initData: Dt.initData,
                  hasTriggeredKeyStatusMapUpdate: !1,
                  getKeyId: function () {
                    return this.keyId;
                  },
                  getSessionId: function () {
                    return this.sessionId;
                  },
                  getExpirationTime: function () {
                    return NaN;
                  },
                  getSessionType: function () {
                    return "temporary";
                  },
                  getKeyStatuses: function () {
                    return { size: 0, has: () => !1, get: () => {} };
                  },
                };
                return (
                  ye.push(Kt),
                  Qt[Wt.generateKeyRequest](
                    Sn.systemString,
                    new Uint8Array(Dt.initData)
                  ),
                  Kt
                );
              }
              throw new Error("Multiple sessions not allowed!");
            },
            updateKeySession: function (Dt, Kt) {
              const vn = Dt.sessionId;
              if (ar.isClearKey(Sn))
                for (let st = 0; st < Kt.keyPairs.length; st++)
                  Qt[Wt.addKey](
                    Sn.systemString,
                    Kt.keyPairs[st].key,
                    Kt.keyPairs[st].keyID,
                    vn
                  );
              else
                Qt[Wt.addKey](
                  Sn.systemString,
                  new Uint8Array(Kt),
                  new Uint8Array(Dt.initData),
                  vn
                );
              It.trigger(wt.KEY_SESSION_UPDATED);
            },
            closeKeySession: Jn,
            setServerCertificate: function () {},
            loadKeySession: function () {},
            removeKeySession: function () {},
            stop: T,
            reset: T,
          }),
          (Yt = Mt.getLogger(un)),
          (Qt = null),
          (Sn = null),
          (ye = []),
          (Gn = []),
          (ar = kt(rn).getInstance()),
          (yr = {
            handleEvent: function (Dt) {
              let Kt = null;
              switch (Dt.type) {
                case Wt.needkey:
                  let vn = ArrayBuffer.isView(Dt.initData)
                    ? Dt.initData.buffer
                    : Dt.initData;
                  It.trigger(wt.NEED_KEY, {
                    key: new B(vn, i.default.INITIALIZATION_DATA_TYPE_CENC),
                  });
                  break;
                case Wt.keyerror:
                  if (
                    ((Kt = pr(Gn, Dt.sessionId)),
                    Kt || (Kt = pr(ye, Dt.sessionId)),
                    Kt)
                  ) {
                    let st = h.default.MEDIA_KEYERR_CODE,
                      Xt = "";
                    switch (Dt.errorCode.code) {
                      case 1:
                        (st = h.default.MEDIA_KEYERR_UNKNOWN_CODE),
                          (Xt +=
                            "MEDIA_KEYERR_UNKNOWN - " +
                            h.default.MEDIA_KEYERR_UNKNOWN_MESSAGE);
                        break;
                      case 2:
                        (st = h.default.MEDIA_KEYERR_CLIENT_CODE),
                          (Xt +=
                            "MEDIA_KEYERR_CLIENT - " +
                            h.default.MEDIA_KEYERR_CLIENT_MESSAGE);
                        break;
                      case 3:
                        (st = h.default.MEDIA_KEYERR_SERVICE_CODE),
                          (Xt +=
                            "MEDIA_KEYERR_SERVICE - " +
                            h.default.MEDIA_KEYERR_SERVICE_MESSAGE);
                        break;
                      case 4:
                        (st = h.default.MEDIA_KEYERR_OUTPUT_CODE),
                          (Xt +=
                            "MEDIA_KEYERR_OUTPUT - " +
                            h.default.MEDIA_KEYERR_OUTPUT_MESSAGE);
                        break;
                      case 5:
                        (st = h.default.MEDIA_KEYERR_HARDWARECHANGE_CODE),
                          (Xt +=
                            "MEDIA_KEYERR_HARDWARECHANGE - " +
                            h.default.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE);
                        break;
                      case 6:
                        (st = h.default.MEDIA_KEYERR_DOMAIN_CODE),
                          (Xt +=
                            "MEDIA_KEYERR_DOMAIN - " +
                            h.default.MEDIA_KEYERR_DOMAIN_MESSAGE);
                    }
                    (Xt += "  System Code = " + Dt.systemCode),
                      It.trigger(wt.KEY_ERROR, {
                        error: new f.default(st, Xt, Kt),
                      });
                  } else Yt.error("No session token found for key error");
                  break;
                case Wt.keyadded:
                  (Kt = pr(Gn, Dt.sessionId)),
                    Kt || (Kt = pr(ye, Dt.sessionId)),
                    Kt
                      ? (Yt.debug("DRM: Key added."),
                        It.trigger(wt.KEY_ADDED, { data: Kt }))
                      : Yt.debug("No session token found for key added");
                  break;
                case Wt.keymessage:
                  if (
                    ((Ht = Dt.sessionId !== null && Dt.sessionId !== void 0),
                    Ht
                      ? ((Kt = pr(Gn, Dt.sessionId)),
                        !Kt &&
                          ye.length > 0 &&
                          ((Kt = ye.shift()),
                          Gn.push(Kt),
                          (Kt.sessionId = Dt.sessionId),
                          It.trigger(wt.KEY_SESSION_CREATED, { data: Kt })))
                      : ye.length > 0 &&
                        ((Kt = ye.shift()),
                        Gn.push(Kt),
                        ye.length !== 0 &&
                          Ft.error(
                            new f.default(
                              h.default.MEDIA_KEY_MESSAGE_ERROR_CODE,
                              h.default.MEDIA_KEY_MESSAGE_ERROR_MESSAGE
                            )
                          )),
                    Kt)
                  ) {
                    let st = ArrayBuffer.isView(Dt.message)
                      ? Dt.message.buffer
                      : Dt.message;
                    (Kt.keyMessage = st),
                      It.trigger(wt.INTERNAL_KEY_MESSAGE, {
                        data: new re(Kt, st, Dt.defaultURL),
                      });
                  } else Yt.warn("No session token found for key message");
              }
            },
          }),
          un
        );
      }
      Ln.__dashjs_factory_name = "ProtectionModel_01b";
      var Tr = v.default.getClassFactory(Ln);
      const sr = [
          {
            generateKeyRequest: "generateKeyRequest",
            addKey: "addKey",
            cancelKeyRequest: "cancelKeyRequest",
            needkey: "needkey",
            keyerror: "keyerror",
            keyadded: "keyadded",
            keymessage: "keymessage",
          },
          {
            generateKeyRequest: "webkitGenerateKeyRequest",
            addKey: "webkitAddKey",
            cancelKeyRequest: "webkitCancelKeyRequest",
            needkey: "webkitneedkey",
            keyerror: "webkitkeyerror",
            keyadded: "webkitkeyadded",
            keymessage: "webkitkeymessage",
          },
        ],
        hi = [
          {
            setMediaKeys: "setMediaKeys",
            MediaKeys: "MediaKeys",
            release: "close",
            needkey: "needkey",
            error: "keyerror",
            message: "keymessage",
            ready: "keyadded",
            close: "keyclose",
          },
          {
            setMediaKeys: "msSetMediaKeys",
            MediaKeys: "MSMediaKeys",
            release: "close",
            needkey: "msneedkey",
            error: "mskeyerror",
            message: "mskeymessage",
            ready: "mskeyadded",
            close: "mskeyclose",
          },
        ];
      function Ra() {
        let on;
        const rn = this.context;
        function It(wt, Mt) {
          for (let Wt = 0; Wt < Mt.length; Wt++) {
            const Ft = Mt[Wt];
            if (typeof wt[Ft[Object.keys(Ft)[0]]] == "function") return Ft;
          }
          return null;
        }
        return (
          (on = {
            createProtectionSystem: function (wt) {
              let Mt = null;
              const Wt = kt(rn).getInstance();
              Wt.setConfig({
                debug: wt.debug,
                BASE64: wt.BASE64,
                settings: wt.settings,
              }),
                Wt.initialize();
              let Ft = (function (un) {
                const Yt = un.debug,
                  Qt = Yt.getLogger(on),
                  Sn = un.eventBus,
                  ar = un.errHandler,
                  ye = un.videoModel ? un.videoModel.getElement() : null;
                return (ye && ye.onencrypted === void 0) ||
                  (ye && ye.mediaKeys === void 0)
                  ? It(ye, hi)
                    ? (Qt.info(
                        "EME detected on this user agent! (ProtectionModel_3Feb2014)"
                      ),
                      ln(rn).create({
                        debug: Yt,
                        eventBus: Sn,
                        events: un.events,
                        api: It(ye, hi),
                      }))
                    : It(ye, sr)
                    ? (Qt.info(
                        "EME detected on this user agent! (ProtectionModel_01b)"
                      ),
                      Tr(rn).create({
                        debug: Yt,
                        eventBus: Sn,
                        errHandler: ar,
                        events: un.events,
                        api: It(ye, sr),
                      }))
                    : (Qt.warn(
                        "No supported version of EME detected on this user agent! - Attempts to play encrypted content will fail!"
                      ),
                      null)
                  : (Qt.info(
                      "EME detected on this user agent! (DefaultProtectionModel"
                    ),
                    St(rn).create({
                      debug: Yt,
                      eventBus: Sn,
                      events: un.events,
                    }));
              })(wt);
              return (
                Ft &&
                  ((Mt = w(rn).create({
                    BASE64: wt.BASE64,
                    cmcdModel: wt.cmcdModel,
                    constants: wt.constants,
                    customParametersModel: wt.customParametersModel,
                    debug: wt.debug,
                    eventBus: wt.eventBus,
                    events: wt.events,
                    protectionKeyController: Wt,
                    protectionModel: Ft,
                    settings: wt.settings,
                  })),
                  wt.capabilities.setEncryptedMediaSupported(!0)),
                Mt
              );
            },
          }),
          on
        );
      }
      Ra.__dashjs_factory_name = "Protection";
      const En = dashjs.FactoryMaker.getClassFactory(Ra);
      (En.events = Gt.default),
        (En.errors = h.default),
        dashjs.FactoryMaker.updateClassFactory(Ra.__dashjs_factory_name, En);
      var Zn = En;
    },
    445: function (t, e, n) {
      n.r(e);
      var r = n(7252);
      class i extends r.default {
        constructor() {
          super(),
            (this.INTERNAL_KEY_MESSAGE = "internalKeyMessage"),
            (this.INTERNAL_KEY_STATUSES_CHANGED = "internalkeyStatusesChanged"),
            (this.KEY_ADDED = "public_keyAdded"),
            (this.KEY_ERROR = "public_keyError"),
            (this.KEY_MESSAGE = "public_keyMessage"),
            (this.KEY_SESSION_CLOSED = "public_keySessionClosed"),
            (this.KEY_SESSION_CREATED = "public_keySessionCreated"),
            (this.KEY_SESSION_REMOVED = "public_keySessionRemoved"),
            (this.KEY_STATUSES_CHANGED = "public_keyStatusesChanged"),
            (this.KEY_STATUSES_MAP_UPDATED = "keyStatusesMapUpdated"),
            (this.KEY_SYSTEM_ACCESS_COMPLETE =
              "public_keySystemAccessComplete"),
            (this.KEY_SYSTEM_SELECTED = "public_keySystemSelected"),
            (this.LICENSE_REQUEST_COMPLETE = "public_licenseRequestComplete"),
            (this.LICENSE_REQUEST_SENDING = "public_licenseRequestSending"),
            (this.NEED_KEY = "needkey"),
            (this.PROTECTION_CREATED = "public_protectioncreated"),
            (this.PROTECTION_DESTROYED = "public_protectiondestroyed"),
            (this.SERVER_CERTIFICATE_UPDATED = "serverCertificateUpdated"),
            (this.TEARDOWN_COMPLETE = "protectionTeardownComplete"),
            (this.VIDEO_ELEMENT_SELECTED = "videoElementSelected"),
            (this.KEY_SESSION_UPDATED = "public_keySessionUpdated");
        }
      }
      let o = new i();
      e.default = o;
    },
    1923: function (t, e, n) {
      n.r(e);
      var r = n(8748);
      class i extends r.default {
        constructor() {
          super(),
            (this.MEDIA_KEYERR_CODE = 100),
            (this.MEDIA_KEYERR_UNKNOWN_CODE = 101),
            (this.MEDIA_KEYERR_CLIENT_CODE = 102),
            (this.MEDIA_KEYERR_SERVICE_CODE = 103),
            (this.MEDIA_KEYERR_OUTPUT_CODE = 104),
            (this.MEDIA_KEYERR_HARDWARECHANGE_CODE = 105),
            (this.MEDIA_KEYERR_DOMAIN_CODE = 106),
            (this.MEDIA_KEY_MESSAGE_ERROR_CODE = 107),
            (this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE = 108),
            (this.SERVER_CERTIFICATE_UPDATED_ERROR_CODE = 109),
            (this.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE = 110),
            (this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE = 111),
            (this.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE = 112),
            (this.KEY_SESSION_CREATED_ERROR_CODE = 113),
            (this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE = 114),
            (this.MEDIA_KEYERR_UNKNOWN_MESSAGE =
              "An unspecified error occurred. This value is used for errors that don't match any of the other codes."),
            (this.MEDIA_KEYERR_CLIENT_MESSAGE =
              "The Key System could not be installed or updated."),
            (this.MEDIA_KEYERR_SERVICE_MESSAGE =
              "The message passed into update indicated an error from the license service."),
            (this.MEDIA_KEYERR_OUTPUT_MESSAGE =
              "There is no available output device with the required characteristics for the content protection system."),
            (this.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE =
              "A hardware configuration change caused a content protection error."),
            (this.MEDIA_KEYERR_DOMAIN_MESSAGE =
              "An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain."),
            (this.MEDIA_KEY_MESSAGE_ERROR_MESSAGE =
              "Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!"),
            (this.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE =
              "DRM: Empty key message from CDM"),
            (this.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE =
              "Error updating server certificate -- "),
            (this.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE =
              "DRM: KeyStatusChange error! -- License has expired"),
            (this.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE =
              "DRM: No license server URL specified!"),
            (this.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE =
              "DRM: KeySystem Access Denied! -- "),
            (this.KEY_SESSION_CREATED_ERROR_MESSAGE =
              "DRM: unable to create session! --"),
            (this.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE =
              "DRM: licenser error! --");
        }
      }
      let o = new i();
      e.default = o;
    },
    559: function (t, e, n) {
      n.r(e),
        n.d(e, {
          supportsMediaSource: function () {
            return c;
          },
        });
      var r = n(138),
        i = n(5212),
        o = n(2861),
        l = n(7393),
        u = n(649);
      function c() {
        let h = "ManagedMediaSource" in window,
          f = "WebKitMediaSource" in window,
          p = "MediaSource" in window;
        return h || f || p;
      }
      function d() {
        let h, f, p, g, y, v;
        const b = this.context,
          w = (0, l.default)(b).getInstance();
        function k(P, I) {
          let O;
          I === i.default.VIDEO
            ? (O = (function (S) {
                const L = { video: {} };
                return (
                  S &&
                    (S.width && (L.video.width = S.width),
                    S.height && (L.video.height = S.height),
                    S.framerate &&
                      (L.video.framerate = parseFloat(S.framerate)),
                    S.hdrMetadataType &&
                      (L.video.hdrMetadataType = S.hdrMetadataType),
                    S.colorGamut && (L.video.colorGamut = S.colorGamut),
                    S.transferFunction &&
                      (L.video.transferFunction = S.transferFunction)),
                  L
                );
              })(P))
            : I === i.default.AUDIO &&
              (O = (function (S) {
                const L = { audio: {} };
                return S.samplerate && (L.audio.samplerate = S.samplerate), L;
              })(P)),
            (O[I].contentType = P.codec),
            (O[I].bitrate = parseInt(P.bitrate)),
            (O.type = "media-source");
          let X = P.codec;
          return (
            P.width &&
              P.height &&
              (X += ';width="' + P.width + '";height="' + P.height + '"'),
            (O.mediaSourceCodecString = X),
            (G = O),
            (E = I),
            (H = P) && H.keySystemsMetadata && H.keySystemsMetadata.length !== 0
              ? H.keySystemsMetadata.map((S) => {
                  const L = { ...G };
                  if (S.ks) {
                    (L.keySystemConfiguration = {}),
                      S.ks.systemString &&
                        (L.keySystemConfiguration.keySystem =
                          S.ks.systemString);
                    let W = "";
                    S.ks.systemString === o.default.WIDEVINE_KEYSTEM_STRING &&
                      (W =
                        o.default.ROBUSTNESS_STRINGS.WIDEVINE.SW_SECURE_CRYPTO);
                    const F = S.protData,
                      oe =
                        F && F.audioRobustness && F.audioRobustness.length > 0
                          ? F.audioRobustness
                          : W,
                      De =
                        F && F.videoRobustness && F.videoRobustness.length > 0
                          ? F.videoRobustness
                          : W;
                    E === i.default.AUDIO
                      ? (L.keySystemConfiguration[E] = { robustness: oe })
                      : E === i.default.VIDEO &&
                        (L.keySystemConfiguration[E] = { robustness: De });
                  }
                  return L;
                })
              : [G]
          );
          var G, H, E;
        }
        function D(P) {
          if (g && g.length !== 0 && P)
            return g.find((I) => {
              const O = $(P, I, i.default.AUDIO),
                X = $(P, I, i.default.VIDEO),
                G = $(P, I, "keySystemConfiguration");
              return O && X && G;
            });
        }
        function $(P, I, O) {
          return (
            (!P[O] && !I[O]) || (!(!P[O] || !I[O]) && w.areEqual(P[O], I[O]))
          );
        }
        function N(P, I) {
          return (
            (P = P.filter(
              (O) =>
                !(
                  O.schemeIdUri &&
                  I.some((X) => X.schemeIdUri === O.schemeIdUri)
                )
            )).push(...I),
            P
          );
        }
        return (
          (h = {
            areKeyIdsExpired: function (P) {
              return (
                !!(
                  p &&
                  P &&
                  P.normalizedKeyIds &&
                  P.normalizedKeyIds.size !== 0
                ) && p.areKeyIdsExpired(P.normalizedKeyIds)
              );
            },
            areKeyIdsUsable: function (P) {
              return (
                !(
                  p &&
                  P &&
                  P.normalizedKeyIds &&
                  P.normalizedKeyIds.size !== 0
                ) || p.areKeyIdsUsable(P.normalizedKeyIds)
              );
            },
            isCodecSupportedBasedOnTestedConfigurations: function (P, I) {
              if (!P || !P.codec || P.isSupported === !1) return !1;
              const O = k(P, I)
                .map((X) => D(X))
                .filter((X) => X != null);
              return (
                !(O && O.length > 0) ||
                O.some((X) => X && X.decodingInfo && X.decodingInfo.supported)
              );
            },
            isProtectionCompatible: function (P, I) {
              return !I || !(!P.isEncrypted && I.isEncrypted);
            },
            runCodecSupportCheck: function (P, I) {
              if (I !== i.default.AUDIO && I !== i.default.VIDEO)
                return Promise.resolve();
              const O = k(P, I);
              return (
                (X = P),
                (G = I),
                f.get().streaming.capabilities.useMediaCapabilitiesApi &&
                navigator.mediaCapabilities &&
                navigator.mediaCapabilities.decodingInfo &&
                ((X.codec && G === i.default.AUDIO) ||
                  (G === i.default.VIDEO &&
                    X.codec &&
                    X.width &&
                    X.height &&
                    X.bitrate &&
                    X.framerate))
                  ? (function (H) {
                      return new Promise((E) => {
                        if (!H || H.length === 0) return void E();
                        const S = H.map((L) => {
                          return (
                            (W = L),
                            new Promise((F) => {
                              D(W)
                                ? F()
                                : navigator.mediaCapabilities
                                    .decodingInfo(W)
                                    .then((oe) => {
                                      (W.decodingInfo = oe), g.push(W), F();
                                    })
                                    .catch((oe) => {
                                      (W.decodingInfo = { supported: !1 }),
                                        g.push(W),
                                        v.error(oe),
                                        F();
                                    });
                            })
                          );
                          var W;
                        });
                        Promise.allSettled(S)
                          .then(() => {
                            E();
                          })
                          .catch((L) => {
                            v.error(L), E();
                          });
                      });
                    })(O)
                  : ((function (H) {
                      if (!H || !H.length) return;
                      const E = H[0];
                      if (D(E)) return;
                      let S = { supported: !1 };
                      (("ManagedMediaSource" in window &&
                        ManagedMediaSource.isTypeSupported(
                          E.mediaSourceCodecString
                        )) ||
                        ("MediaSource" in window &&
                          MediaSource.isTypeSupported(
                            E.mediaSourceCodecString
                          )) ||
                        ("WebKitMediaSource" in window &&
                          WebKitMediaSource.isTypeSupported(
                            E.mediaSourceCodecString
                          ))) &&
                        (S.supported = !0),
                        (E.decodingInfo = S),
                        g.push(E);
                    })(O),
                    Promise.resolve())
              );
              var X, G;
            },
            setConfig: function (P) {
              P &&
                (P.settings && (f = P.settings),
                P.protectionController && (p = P.protectionController));
            },
            setEncryptedMediaSupported: function (P) {
              y = P;
            },
            setProtectionController: function (P) {
              p = P;
            },
            supportsChangeType: function () {
              return (
                !!window.SourceBuffer &&
                !!SourceBuffer.prototype &&
                !!SourceBuffer.prototype.changeType
              );
            },
            supportsEncryptedMedia: function () {
              return y;
            },
            supportsEssentialProperty: function (P) {
              let I =
                f.get().streaming.capabilities.supportedEssentialProperties;
              f.get().streaming.capabilities.useMediaCapabilitiesApi &&
                f.get().streaming.capabilities
                  .filterVideoColorimetryEssentialProperties &&
                (I = N(I, [
                  { schemeIdUri: i.default.COLOUR_PRIMARIES_SCHEME_ID_URI },
                  { schemeIdUri: i.default.MATRIX_COEFFICIENTS_SCHEME_ID_URI },
                  {
                    schemeIdUri:
                      i.default.TRANSFER_CHARACTERISTICS_SCHEME_ID_URI,
                  },
                ])),
                f.get().streaming.capabilities.useMediaCapabilitiesApi &&
                  f.get().streaming.capabilities
                    .filterHDRMetadataFormatEssentialProperties &&
                  (I = N(I, [
                    {
                      schemeIdUri: i.default.HDR_METADATA_FORMAT_SCHEME_ID_URI,
                    },
                  ]));
              try {
                return P.inArray(I);
              } catch {
                return !0;
              }
            },
            supportsMediaSource: c,
          }),
          (y = !1),
          (g = []),
          (v = (0, u.default)(b).getInstance().getLogger(h)),
          h
        );
      }
      (d.__dashjs_factory_name = "Capabilities"),
        (e.default = r.default.getSingletonFactory(d));
    },
    7377: function (t, e, n) {
      n.r(e);
      var r = n(138),
        i = n(656);
      function o() {
        return {
          customTimeRangeArray: [],
          length: 0,
          add: function (l, u) {
            let c;
            for (
              c = 0;
              c < this.customTimeRangeArray.length &&
              l > this.customTimeRangeArray[c].start;
              c++
            );
            for (
              this.customTimeRangeArray.splice(c, 0, { start: l, end: u }),
                c = 0;
              c < this.customTimeRangeArray.length - 1;
              c++
            )
              this.mergeRanges(c, c + 1) && c--;
            this.length = this.customTimeRangeArray.length;
          },
          clear: function () {
            (this.customTimeRangeArray = []), (this.length = 0);
          },
          remove: function (l, u) {
            for (let c = 0; c < this.customTimeRangeArray.length; c++)
              if (
                l <= this.customTimeRangeArray[c].start &&
                u >= this.customTimeRangeArray[c].end
              )
                this.customTimeRangeArray.splice(c, 1), c--;
              else {
                if (
                  l > this.customTimeRangeArray[c].start &&
                  u < this.customTimeRangeArray[c].end
                ) {
                  this.customTimeRangeArray.splice(c + 1, 0, {
                    start: u,
                    end: this.customTimeRangeArray[c].end,
                  }),
                    (this.customTimeRangeArray[c].end = l);
                  break;
                }
                l > this.customTimeRangeArray[c].start &&
                l < this.customTimeRangeArray[c].end
                  ? (this.customTimeRangeArray[c].end = l)
                  : u > this.customTimeRangeArray[c].start &&
                    u < this.customTimeRangeArray[c].end &&
                    (this.customTimeRangeArray[c].start = u);
              }
            this.length = this.customTimeRangeArray.length;
          },
          mergeRanges: function (l, u) {
            let c = this.customTimeRangeArray[l],
              d = this.customTimeRangeArray[u];
            return c.start <= d.start && d.start <= c.end && c.end <= d.end
              ? ((c.end = d.end), this.customTimeRangeArray.splice(u, 1), !0)
              : d.start <= c.start && c.start <= d.end && d.end <= c.end
              ? ((c.start = d.start),
                this.customTimeRangeArray.splice(u, 1),
                !0)
              : d.start <= c.start && c.start <= d.end && c.end <= d.end
              ? (this.customTimeRangeArray.splice(l, 1), !0)
              : c.start <= d.start &&
                d.start <= c.end &&
                d.end <= c.end &&
                (this.customTimeRangeArray.splice(u, 1), !0);
          },
          start: function (l) {
            return (
              (0, i.checkInteger)(l),
              l >= this.customTimeRangeArray.length || l < 0
                ? NaN
                : this.customTimeRangeArray[l].start
            );
          },
          end: function (l) {
            return (
              (0, i.checkInteger)(l),
              l >= this.customTimeRangeArray.length || l < 0
                ? NaN
                : this.customTimeRangeArray[l].end
            );
          },
        };
      }
      (o.__dashjs_factory_name = "CustomTimeRanges"),
        (e.default = r.default.getClassFactory(o));
    },
    7393: function (t, e, n) {
      n.r(e);
      var r = n(138),
        i = n(7316);
      function o() {
        let l;
        return (
          (l = {
            areEqual: function (u, c) {
              return i(u, c);
            },
          }),
          l
        );
      }
      (o.__dashjs_factory_name = "ObjectUtils"),
        (e.default = r.default.getSingletonFactory(o));
    },
    656: function (t, e, n) {
      n.r(e),
        n.d(e, {
          checkInteger: function () {
            return o;
          },
          checkIsVideoOrAudioType: function () {
            return u;
          },
          checkParameterType: function () {
            return i;
          },
          checkRange: function () {
            return l;
          },
        });
      var r = n(5212);
      function i(c, d) {
        if (typeof c !== d) throw r.default.BAD_ARGUMENT_ERROR;
      }
      function o(c) {
        if (c === null || isNaN(c) || c % 1 != 0)
          throw r.default.BAD_ARGUMENT_ERROR + " : argument is not an integer";
      }
      function l(c, d, h) {
        if (c < d || c > h)
          throw r.default.BAD_ARGUMENT_ERROR + " : argument out of range";
      }
      function u(c) {
        if (
          typeof c != "string" ||
          (c !== r.default.AUDIO && c !== r.default.VIDEO)
        )
          throw r.default.BAD_ARGUMENT_ERROR;
      }
    },
    1944: function (t, e, n) {
      n.r(e),
        (e.default = class {
          constructor(r, i, o) {
            (this.code = r || null),
              (this.message = i || null),
              (this.data = o || null);
          }
        });
    },
    7568: function (t, e, n) {
      n.r(e),
        n.d(e, {
          HTTPRequest: function () {
            return r;
          },
          HTTPRequestTrace: function () {
            return i;
          },
        });
      class r {
        constructor() {
          (this.tcpid = null),
            (this.type = null),
            (this.url = null),
            (this.actualurl = null),
            (this.range = null),
            (this.trequest = null),
            (this.tresponse = null),
            (this.responsecode = null),
            (this.interval = null),
            (this.trace = []),
            (this.cmsd = null),
            (this._stream = null),
            (this._tfinish = null),
            (this._mediaduration = null),
            (this._quality = null),
            (this._responseHeaders = null),
            (this._serviceLocation = null),
            (this._fileLoaderType = null),
            (this._resourceTimingValues = null);
        }
      }
      class i {
        constructor() {
          (this.s = null), (this.d = null), (this.b = []);
        }
      }
      (r.GET = "GET"),
        (r.HEAD = "HEAD"),
        (r.MPD_TYPE = "MPD"),
        (r.XLINK_EXPANSION_TYPE = "XLinkExpansion"),
        (r.INIT_SEGMENT_TYPE = "InitializationSegment"),
        (r.INDEX_SEGMENT_TYPE = "IndexSegment"),
        (r.MEDIA_SEGMENT_TYPE = "MediaSegment"),
        (r.BITSTREAM_SWITCHING_SEGMENT_TYPE = "BitstreamSwitchingSegment"),
        (r.MSS_FRAGMENT_INFO_SEGMENT_TYPE = "FragmentInfoSegment"),
        (r.DVB_REPORTING_TYPE = "DVBReporting"),
        (r.LICENSE = "license"),
        (r.CONTENT_STEERING_TYPE = "ContentSteering"),
        (r.OTHER_TYPE = "other");
    },
  },
  gAe = {};
/*! For license information please see dash.all.min.js.LICENSE.txt */ function wd(
  t
) {
  var e = gAe[t];
  if (e !== void 0) return e.exports;
  var n = (gAe[t] = { exports: {} });
  return GLn[t].call(n.exports, n, n.exports, wd), n.exports;
}
(wd.amdO = {}),
  (wd.d = function (t, e) {
    for (var n in e)
      wd.o(e, n) &&
        !wd.o(t, n) &&
        Object.defineProperty(t, n, { enumerable: !0, get: e[n] });
  }),
  (wd.g = (function () {
    if (typeof globalThis == "object") return globalThis;
    try {
      return this || new Function("return this")();
    } catch {
      if (typeof window == "object") return window;
    }
  })()),
  (wd.o = function (t, e) {
    return Object.prototype.hasOwnProperty.call(t, e);
  }),
  (wd.r = function (t) {
    typeof Symbol < "u" &&
      Symbol.toStringTag &&
      Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }),
      Object.defineProperty(t, "__esModule", { value: !0 });
  });
var E0 = {};
wd.r(E0),
  wd.d(E0, {
    Constants: function () {
      return dWe.default;
    },
    Debug: function () {
      return cWe.default;
    },
    MediaPlayer: function () {
      return NLn.MediaPlayer;
    },
    MediaPlayerFactory: function () {
      return uWe;
    },
    MetricsReporting: function () {
      return sWe.default;
    },
    Protection: function () {
      return lWe.default;
    },
    default: function () {
      return ULn;
    },
    supportsMediaSource: function () {
      return hWe.supportsMediaSource;
    },
  });
var NLn = wd(5393),
  sWe = wd(4469),
  lWe = wd(3888),
  FLn = wd(5849);
let mAe,
  YF = (function () {
    const t = "application/dash+xml";
    let e;
    function n(i, o, l) {
      if (!i || !/^VIDEO$/i.test(i.nodeName)) return null;
      if (i._dashjs_player) return i._dashjs_player;
      let u,
        c = i.id || i.name || "video element";
      if (
        !(o =
          o ||
          [].slice.call(i.querySelectorAll("source")).filter(function (d) {
            return d.type == t;
          })[0]) &&
        i.src
      )
        (o = document.createElement("source")).src = i.src;
      else if (!o && !i.src) return null;
      return (
        (l = l || {}),
        (u = (0, FLn.default)(l).create()),
        u.initialize(i, o.src, i.autoplay),
        e || (e = u.getDebug().getLogger()),
        e.debug(
          "Converted " + c + " to dash.js player and added content: " + o.src
        ),
        (i._dashjs_player = u),
        u
      );
    }
    function r(i) {
      return /^VIDEO$/i.test(i.nodeName) ? i : r(i.parentNode);
    }
    return {
      create: n,
      createAll: function (i, o) {
        let l = [];
        i = i || "[data-dashjs-player]";
        let u = (o = o || document).querySelectorAll(i);
        for (let d = 0; d < u.length; d++) {
          let h = n(u[d], null);
          l.push(h);
        }
        let c = o.querySelectorAll('source[type="' + t + '"]');
        for (let d = 0; d < c.length; d++) {
          let h = n(r(c[d]), null);
          l.push(h);
        }
        return l;
      },
    };
  })();
!(
  typeof window < "u" &&
  window &&
  window.dashjs &&
  window.dashjs.skipAutoCreate
) &&
  typeof window < "u" &&
  window &&
  window.addEventListener &&
  (window.document.readyState === "complete"
    ? window.dashjs
      ? YF.createAll()
      : (mAe = window.setInterval(function () {
          window.dashjs && (window.clearInterval(mAe), YF.createAll());
        }, 500))
    : window.addEventListener("load", function t() {
        window.removeEventListener("load", t), YF.createAll();
      }));
var uWe = YF,
  cWe = wd(649),
  dWe = wd(5212),
  hWe = wd(559);
(dashjs.Protection = lWe.default),
  (dashjs.MetricsReporting = sWe.default),
  (dashjs.MediaPlayerFactory = uWe),
  (dashjs.Debug = cWe.default),
  (dashjs.supportsMediaSource = hWe.supportsMediaSource),
  (dashjs.Constants = dWe.default);
var ULn = dashjs;
(E0 = E0.default).Constants, E0.Debug;
E0.MediaPlayer;
E0.MediaPlayerFactory,
  E0.MetricsReporting,
  E0.Protection,
  E0.default,
  E0.supportsMediaSource;
Os.PluginDashJs;
function yAe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function vAe(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? yAe(Object(n), !0).forEach(function (r) {
          Ei(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : yAe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Ip() {
  Ip = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = E.iterator[S.method];
    if (L === void 0) {
      if (((S.delegate = null), S.method === "throw")) {
        if (
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")
        )
          return f;
        (S.method = "throw"),
          (S.arg = new TypeError(
            "The iterator does not provide a 'throw' method"
          ));
      }
      return f;
    }
    var W = h(L, E.iterator, S.arg);
    if (W.type === "throw")
      return (S.method = "throw"), (S.arg = W.arg), (S.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((S[E.resultName] = F.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : F
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function bAe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function Ak(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        bAe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        bAe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function bl(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function _Ae(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function _l(t, e, n) {
  return (
    e && _Ae(t.prototype, e),
    n && _Ae(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Ei(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function Wf(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && fWe(t, e);
}
function Gh(t) {
  return (Gh = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function fWe(t, e) {
  return (fWe = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function BLn() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function mi(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function HLn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return mi(t);
}
function Kf(t) {
  var e = BLn();
  return function () {
    var n,
      r = Gh(t);
    if (e) {
      var i = Gh(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return HLn(this, n);
  };
}
function XLn(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = Gh(t)) !== null; );
  return t;
}
function Bp() {
  return (
    (Bp =
      typeof Reflect < "u" && Reflect.get
        ? Reflect.get.bind()
        : function (t, e, n) {
            var r = XLn(t, e);
            if (r) {
              var i = Object.getOwnPropertyDescriptor(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    Bp.apply(this, arguments)
  );
}
function VLn(t, e) {
  return jLn(t) || KLn(t, e) || gWe(t, e) || YLn();
}
function pWe(t) {
  return zLn(t) || WLn(t) || gWe(t) || ZLn();
}
function zLn(t) {
  if (Array.isArray(t)) return Qne(t);
}
function jLn(t) {
  if (Array.isArray(t)) return t;
}
function WLn(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function KLn(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o = [],
      l = !0,
      u = !1;
    try {
      for (
        n = n.call(t);
        !(l = (r = n.next()).done) && (o.push(r.value), !e || o.length !== e);
        l = !0
      );
    } catch (c) {
      (u = !0), (i = c);
    } finally {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw i;
      }
    }
    return o;
  }
}
function gWe(t, e) {
  if (t) {
    if (typeof t == "string") return Qne(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? Qne(t, e)
        : void 0
    );
  }
}
function Qne(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function ZLn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function YLn() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var _4 = function (t) {
    return t && t.Math == Math && t;
  },
  ja =
    _4(typeof globalThis == "object" && globalThis) ||
    _4(typeof window == "object" && window) ||
    _4(typeof self == "object" && self) ||
    _4(typeof tI == "object" && tI) ||
    (function () {
      return this;
    })() ||
    Function("return this")(),
  mWe = { exports: {} },
  QLn = !1,
  TAe = ja,
  JLn = Object.defineProperty,
  Wue = function (t, e) {
    try {
      JLn(TAe, t, { value: e, configurable: !0, writable: !0 });
    } catch {
      TAe[t] = e;
    }
    return e;
  },
  qLn = ja,
  e5n = Wue,
  EAe = "__core-js_shared__",
  t5n = qLn[EAe] || e5n(EAe, {}),
  Kue = t5n,
  SAe = Kue;
(mWe.exports = function (t, e) {
  return SAe[t] || (SAe[t] = e !== void 0 ? e : {});
})("versions", []).push({
  version: "3.26.1",
  mode: "global",
  copyright: "© 2014-2022 Denis Pushkarev (zloirock.ru)",
  license: "https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",
  source: "https://github.com/zloirock/core-js",
});
var Q_,
  QF,
  LD = mWe.exports,
  aa = function (t) {
    try {
      return !!t();
    } catch {
      return !0;
    }
  },
  n5n = aa,
  L5 = !n5n(function () {
    var t = function () {}.bind();
    return typeof t != "function" || t.hasOwnProperty("prototype");
  }),
  yWe = L5,
  vWe = Function.prototype,
  Jne = vWe.call,
  r5n = yWe && vWe.bind.bind(Jne, Jne),
  Fa = yWe
    ? r5n
    : function (t) {
        return function () {
          return Jne.apply(t, arguments);
        };
      },
  Tb = function (t) {
    return t == null;
  },
  i5n = Tb,
  a5n = TypeError,
  F0 = function (t) {
    if (i5n(t)) throw a5n("Can't call method on " + t);
    return t;
  },
  o5n = F0,
  s5n = Object,
  id = function (t) {
    return s5n(o5n(t));
  },
  l5n = Fa,
  u5n = id,
  c5n = l5n({}.hasOwnProperty),
  pu =
    Object.hasOwn ||
    function (t, e) {
      return c5n(u5n(t), e);
    },
  d5n = Fa,
  h5n = 0,
  f5n = Math.random(),
  p5n = d5n((1).toString),
  O5 = function (t) {
    return "Symbol(" + (t === void 0 ? "" : t) + ")_" + p5n(++h5n + f5n, 36);
  },
  qne = typeof document == "object" && document.all,
  g5n = qne === void 0 && qne !== void 0,
  bWe = { all: qne, IS_HTMLDDA: g5n },
  _We = bWe,
  m5n = _We.all,
  Ss = _We.IS_HTMLDDA
    ? function (t) {
        return typeof t == "function" || t === m5n;
      }
    : function (t) {
        return typeof t == "function";
      },
  pK = ja,
  y5n = Ss,
  v5n = function (t) {
    return y5n(t) ? t : void 0;
  },
  _m = function (t, e) {
    return arguments.length < 2 ? v5n(pK[t]) : pK[t] && pK[t][e];
  },
  b5n = _m,
  Eb = b5n("navigator", "userAgent") || "",
  TWe = ja,
  gK = Eb,
  RAe = TWe.process,
  AAe = TWe.Deno,
  wAe = (RAe && RAe.versions) || (AAe && AAe.version),
  kAe = wAe && wAe.v8;
kAe && (QF = (Q_ = kAe.split("."))[0] > 0 && Q_[0] < 4 ? 1 : +(Q_[0] + Q_[1])),
  !QF &&
    gK &&
    (!(Q_ = gK.match(/Edge\/(\d+)/)) || Q_[1] >= 74) &&
    (Q_ = gK.match(/Chrome\/(\d+)/)) &&
    (QF = +Q_[1]);
var DR = QF,
  IAe = DR,
  _5n = aa,
  OD =
    !!Object.getOwnPropertySymbols &&
    !_5n(function () {
      var t = Symbol();
      return (
        !String(t) ||
        !(Object(t) instanceof Symbol) ||
        (!Symbol.sham && IAe && IAe < 41)
      );
    }),
  T5n = OD,
  EWe = T5n && !Symbol.sham && typeof Symbol.iterator == "symbol",
  E5n = ja,
  S5n = LD,
  DAe = pu,
  R5n = O5,
  PAe = OD,
  SWe = EWe,
  gM = S5n("wks"),
  CS = E5n.Symbol,
  MAe = CS && CS.for,
  A5n = SWe ? CS : (CS && CS.withoutSetter) || R5n,
  Gs = function (t) {
    if (!DAe(gM, t) || (!PAe && typeof gM[t] != "string")) {
      var e = "Symbol." + t;
      PAe && DAe(CS, t)
        ? (gM[t] = CS[t])
        : (gM[t] = SWe && MAe ? MAe(e) : A5n(e));
    }
    return gM[t];
  },
  w5n = Gs,
  k5n = w5n("toStringTag"),
  RWe = {};
RWe[k5n] = "z";
var Zue = String(RWe) === "[object z]",
  Cu = {},
  I5n = aa,
  Tl = !I5n(function () {
    return (
      Object.defineProperty({}, 1, {
        get: function () {
          return 7;
        },
      })[1] != 7
    );
  }),
  CAe = Ss,
  AWe = bWe,
  D5n = AWe.all,
  $u = AWe.IS_HTMLDDA
    ? function (t) {
        return typeof t == "object" ? t !== null : CAe(t) || t === D5n;
      }
    : function (t) {
        return typeof t == "object" ? t !== null : CAe(t);
      },
  P5n = ja,
  $Ae = $u,
  ere = P5n.document,
  M5n = $Ae(ere) && $Ae(ere.createElement),
  NB = function (t) {
    return M5n ? ere.createElement(t) : {};
  },
  C5n = Tl,
  $5n = aa,
  x5n = NB,
  wWe =
    !C5n &&
    !$5n(function () {
      return (
        Object.defineProperty(x5n("div"), "a", {
          get: function () {
            return 7;
          },
        }).a != 7
      );
    }),
  L5n = Tl,
  O5n = aa,
  kWe =
    L5n &&
    O5n(function () {
      return (
        Object.defineProperty(function () {}, "prototype", {
          value: 42,
          writable: !1,
        }).prototype != 42
      );
    }),
  G5n = $u,
  N5n = String,
  F5n = TypeError,
  Yu = function (t) {
    if (G5n(t)) return t;
    throw F5n(N5n(t) + " is not an object");
  },
  U5n = L5,
  T4 = Function.prototype.call,
  zs = U5n
    ? T4.bind(T4)
    : function () {
        return T4.apply(T4, arguments);
      },
  B5n = Fa,
  Sb = B5n({}.isPrototypeOf),
  H5n = _m,
  X5n = Ss,
  V5n = Sb,
  z5n = EWe,
  j5n = Object,
  GD = z5n
    ? function (t) {
        return typeof t == "symbol";
      }
    : function (t) {
        var e = H5n("Symbol");
        return X5n(e) && V5n(e.prototype, j5n(t));
      },
  W5n = String,
  PR = function (t) {
    try {
      return W5n(t);
    } catch {
      return "Object";
    }
  },
  K5n = Ss,
  Z5n = PR,
  Y5n = TypeError,
  U0 = function (t) {
    if (K5n(t)) return t;
    throw Y5n(Z5n(t) + " is not a function");
  },
  Q5n = U0,
  J5n = Tb,
  ND = function (t, e) {
    var n = t[e];
    return J5n(n) ? void 0 : Q5n(n);
  },
  mK = zs,
  yK = Ss,
  vK = $u,
  q5n = TypeError,
  eOn = function (t, e) {
    var n, r;
    if (
      (e === "string" && yK((n = t.toString)) && !vK((r = mK(n, t)))) ||
      (yK((n = t.valueOf)) && !vK((r = mK(n, t)))) ||
      (e !== "string" && yK((n = t.toString)) && !vK((r = mK(n, t))))
    )
      return r;
    throw q5n("Can't convert object to primitive value");
  },
  tOn = zs,
  xAe = $u,
  LAe = GD,
  nOn = ND,
  rOn = eOn,
  iOn = Gs,
  aOn = TypeError,
  oOn = iOn("toPrimitive"),
  Yue = function (t, e) {
    if (!xAe(t) || LAe(t)) return t;
    var n,
      r = nOn(t, oOn);
    if (r) {
      if (
        (e === void 0 && (e = "default"), (n = tOn(r, t, e)), !xAe(n) || LAe(n))
      )
        return n;
      throw aOn("Can't convert object to primitive value");
    }
    return e === void 0 && (e = "number"), rOn(t, e);
  },
  sOn = Yue,
  lOn = GD,
  G5 = function (t) {
    var e = sOn(t, "string");
    return lOn(e) ? e : e + "";
  },
  uOn = Tl,
  cOn = wWe,
  dOn = kWe,
  E4 = Yu,
  OAe = G5,
  hOn = TypeError,
  bK = Object.defineProperty,
  fOn = Object.getOwnPropertyDescriptor,
  _K = "enumerable",
  TK = "configurable",
  EK = "writable";
Cu.f = uOn
  ? dOn
    ? function (t, e, n) {
        if (
          (E4(t),
          (e = OAe(e)),
          E4(n),
          typeof t == "function" &&
            e === "prototype" &&
            "value" in n &&
            EK in n &&
            !n[EK])
        ) {
          var r = fOn(t, e);
          r &&
            r[EK] &&
            ((t[e] = n.value),
            (n = {
              configurable: TK in n ? n[TK] : r[TK],
              enumerable: _K in n ? n[_K] : r[_K],
              writable: !1,
            }));
        }
        return bK(t, e, n);
      }
    : bK
  : function (t, e, n) {
      if ((E4(t), (e = OAe(e)), E4(n), cOn))
        try {
          return bK(t, e, n);
        } catch {}
      if ("get" in n || "set" in n) throw hOn("Accessors not supported");
      return "value" in n && (t[e] = n.value), t;
    };
var IWe = { exports: {} },
  tre = Tl,
  pOn = pu,
  DWe = Function.prototype,
  gOn = tre && Object.getOwnPropertyDescriptor,
  Que = pOn(DWe, "name"),
  mOn = Que && function () {}.name === "something",
  yOn = Que && (!tre || (tre && gOn(DWe, "name").configurable)),
  FD = { EXISTS: Que, PROPER: mOn, CONFIGURABLE: yOn },
  vOn = Fa,
  bOn = Ss,
  nre = Kue,
  _On = vOn(Function.toString);
bOn(nre.inspectSource) ||
  (nre.inspectSource = function (t) {
    return _On(t);
  });
var v8,
  sL,
  b8,
  Jue = nre.inspectSource,
  TOn = ja,
  EOn = Ss,
  GAe = TOn.WeakMap,
  SOn = EOn(GAe) && /native code/.test(String(GAe)),
  MR = function (t, e) {
    return {
      enumerable: !(1 & t),
      configurable: !(2 & t),
      writable: !(4 & t),
      value: e,
    };
  },
  ROn = Tl,
  AOn = Cu,
  wOn = MR,
  Rb = ROn
    ? function (t, e, n) {
        return AOn.f(t, e, wOn(1, n));
      }
    : function (t, e, n) {
        return (t[e] = n), t;
      },
  kOn = LD,
  IOn = O5,
  NAe = kOn("keys"),
  FB = function (t) {
    return NAe[t] || (NAe[t] = IOn(t));
  },
  N5 = {},
  DOn = SOn,
  PWe = ja,
  POn = $u,
  MOn = Rb,
  SK = pu,
  RK = Kue,
  COn = FB,
  $On = N5,
  FAe = "Object already initialized",
  rre = PWe.TypeError,
  xOn = PWe.WeakMap,
  LOn = function (t) {
    return b8(t) ? sL(t) : v8(t, {});
  },
  OOn = function (t) {
    return function (e) {
      var n;
      if (!POn(e) || (n = sL(e)).type !== t)
        throw rre("Incompatible receiver, " + t + " required");
      return n;
    };
  };
if (DOn || RK.state) {
  var Ay = RK.state || (RK.state = new xOn());
  (Ay.get = Ay.get),
    (Ay.has = Ay.has),
    (Ay.set = Ay.set),
    (v8 = function (t, e) {
      if (Ay.has(t)) throw rre(FAe);
      return (e.facade = t), Ay.set(t, e), e;
    }),
    (sL = function (t) {
      return Ay.get(t) || {};
    }),
    (b8 = function (t) {
      return Ay.has(t);
    });
} else {
  var sw = COn("state");
  ($On[sw] = !0),
    (v8 = function (t, e) {
      if (SK(t, sw)) throw rre(FAe);
      return (e.facade = t), MOn(t, sw, e), e;
    }),
    (sL = function (t) {
      return SK(t, sw) ? t[sw] : {};
    }),
    (b8 = function (t) {
      return SK(t, sw);
    });
}
var Tm = { set: v8, get: sL, has: b8, enforce: LOn, getterFor: OOn },
  GOn = aa,
  NOn = Ss,
  S4 = pu,
  ire = Tl,
  FOn = FD.CONFIGURABLE,
  UOn = Jue,
  MWe = Tm,
  BOn = MWe.enforce,
  HOn = MWe.get,
  JF = Object.defineProperty,
  XOn =
    ire &&
    !GOn(function () {
      return JF(function () {}, "length", { value: 8 }).length !== 8;
    }),
  VOn = String(String).split("String"),
  zOn = (IWe.exports = function (t, e, n) {
    String(e).slice(0, 7) === "Symbol(" &&
      (e = "[" + String(e).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"),
      n && n.getter && (e = "get " + e),
      n && n.setter && (e = "set " + e),
      (!S4(t, "name") || (FOn && t.name !== e)) &&
        (ire ? JF(t, "name", { value: e, configurable: !0 }) : (t.name = e)),
      XOn &&
        n &&
        S4(n, "arity") &&
        t.length !== n.arity &&
        JF(t, "length", { value: n.arity });
    try {
      n && S4(n, "constructor") && n.constructor
        ? ire && JF(t, "prototype", { writable: !1 })
        : t.prototype && (t.prototype = void 0);
    } catch {}
    var r = BOn(t);
    return (
      S4(r, "source") || (r.source = VOn.join(typeof e == "string" ? e : "")), t
    );
  });
Function.prototype.toString = zOn(function () {
  return (NOn(this) && HOn(this).source) || UOn(this);
}, "toString");
var CWe = IWe.exports,
  jOn = Ss,
  WOn = Cu,
  KOn = CWe,
  ZOn = Wue,
  ad = function (t, e, n, r) {
    r || (r = {});
    var i = r.enumerable,
      o = r.name !== void 0 ? r.name : e;
    if ((jOn(n) && KOn(n, o, r), r.global)) i ? (t[e] = n) : ZOn(e, n);
    else {
      try {
        r.unsafe ? t[e] && (i = !0) : delete t[e];
      } catch {}
      i
        ? (t[e] = n)
        : WOn.f(t, e, {
            value: n,
            enumerable: !1,
            configurable: !r.nonConfigurable,
            writable: !r.nonWritable,
          });
    }
    return t;
  },
  $We = Fa,
  YOn = $We({}.toString),
  QOn = $We("".slice),
  Ab = function (t) {
    return QOn(YOn(t), 8, -1);
  },
  JOn = Zue,
  qOn = Ss,
  qF = Ab,
  eGn = Gs,
  tGn = eGn("toStringTag"),
  nGn = Object,
  rGn =
    qF(
      (function () {
        return arguments;
      })()
    ) == "Arguments",
  iGn = function (t, e) {
    try {
      return t[e];
    } catch {}
  },
  wb = JOn
    ? qF
    : function (t) {
        var e, n, r;
        return t === void 0
          ? "Undefined"
          : t === null
          ? "Null"
          : typeof (n = iGn((e = nGn(t)), tGn)) == "string"
          ? n
          : rGn
          ? qF(e)
          : (r = qF(e)) == "Object" && qOn(e.callee)
          ? "Arguments"
          : r;
      },
  aGn = Zue,
  oGn = wb,
  sGn = aGn
    ? {}.toString
    : function () {
        return "[object " + oGn(this) + "]";
      },
  lGn = Zue,
  uGn = ad,
  cGn = sGn;
lGn || uGn(Object.prototype, "toString", cGn, { unsafe: !0 });
var xWe = {
    CSSRuleList: 0,
    CSSStyleDeclaration: 0,
    CSSValueList: 0,
    ClientRectList: 0,
    DOMRectList: 0,
    DOMStringList: 0,
    DOMTokenList: 1,
    DataTransferItemList: 0,
    FileList: 0,
    HTMLAllCollection: 0,
    HTMLCollection: 0,
    HTMLFormElement: 0,
    HTMLSelectElement: 0,
    MediaList: 0,
    MimeTypeArray: 0,
    NamedNodeMap: 0,
    NodeList: 1,
    PaintRequestList: 0,
    Plugin: 0,
    PluginArray: 0,
    SVGLengthList: 0,
    SVGNumberList: 0,
    SVGPathSegList: 0,
    SVGPointList: 0,
    SVGStringList: 0,
    SVGTransformList: 0,
    SourceBufferList: 0,
    StyleSheetList: 0,
    TextTrackCueList: 0,
    TextTrackList: 0,
    TouchList: 0,
  },
  dGn = NB,
  AK = dGn("span").classList,
  UAe = AK && AK.constructor && AK.constructor.prototype,
  LWe = UAe === Object.prototype ? void 0 : UAe,
  hGn = Ab,
  fGn = Fa,
  qS = function (t) {
    if (hGn(t) === "Function") return fGn(t);
  },
  pGn = U0,
  gGn = L5,
  mGn = qS(qS.bind),
  Av = function (t, e) {
    return (
      pGn(t),
      e === void 0
        ? t
        : gGn
        ? mGn(t, e)
        : function () {
            return t.apply(e, arguments);
          }
    );
  },
  yGn = Fa,
  vGn = aa,
  bGn = Ab,
  wK = Object,
  _Gn = yGn("".split),
  UD = vGn(function () {
    return !wK("z").propertyIsEnumerable(0);
  })
    ? function (t) {
        return bGn(t) == "String" ? _Gn(t, "") : wK(t);
      }
    : wK,
  TGn = Math.ceil,
  EGn = Math.floor,
  OWe =
    Math.trunc ||
    function (t) {
      var e = +t;
      return (e > 0 ? EGn : TGn)(e);
    },
  SGn = OWe,
  Em = function (t) {
    var e = +t;
    return e != e || e === 0 ? 0 : SGn(e);
  },
  RGn = Em,
  AGn = Math.min,
  B0 = function (t) {
    return t > 0 ? AGn(RGn(t), 9007199254740991) : 0;
  },
  wGn = B0,
  od = function (t) {
    return wGn(t.length);
  },
  kGn = Ab,
  BD =
    Array.isArray ||
    function (t) {
      return kGn(t) == "Array";
    },
  IGn = Fa,
  DGn = aa,
  GWe = Ss,
  PGn = wb,
  MGn = _m,
  CGn = Jue,
  NWe = function () {},
  $Gn = [],
  FWe = MGn("Reflect", "construct"),
  que = /^\s*(?:class|function)\b/,
  xGn = IGn(que.exec),
  LGn = !que.exec(NWe),
  mM = function (t) {
    if (!GWe(t)) return !1;
    try {
      return FWe(NWe, $Gn, t), !0;
    } catch {
      return !1;
    }
  },
  UWe = function (t) {
    if (!GWe(t)) return !1;
    switch (PGn(t)) {
      case "AsyncFunction":
      case "GeneratorFunction":
      case "AsyncGeneratorFunction":
        return !1;
    }
    try {
      return LGn || !!xGn(que, CGn(t));
    } catch {
      return !0;
    }
  };
UWe.sham = !0;
var UB =
    !FWe ||
    DGn(function () {
      var t;
      return (
        mM(mM.call) ||
        !mM(Object) ||
        !mM(function () {
          t = !0;
        }) ||
        t
      );
    })
      ? UWe
      : mM,
  BAe = BD,
  OGn = UB,
  GGn = $u,
  NGn = Gs,
  FGn = NGn("species"),
  HAe = Array,
  UGn = function (t) {
    var e;
    return (
      BAe(t) &&
        ((e = t.constructor),
        ((OGn(e) && (e === HAe || BAe(e.prototype))) ||
          (GGn(e) && (e = e[FGn]) === null)) &&
          (e = void 0)),
      e === void 0 ? HAe : e
    );
  },
  BGn = UGn,
  ece = function (t, e) {
    return new (BGn(t))(e === 0 ? 0 : e);
  },
  HGn = Av,
  XGn = Fa,
  VGn = UD,
  zGn = id,
  jGn = od,
  WGn = ece,
  XAe = XGn([].push),
  J_ = function (t) {
    var e = t == 1,
      n = t == 2,
      r = t == 3,
      i = t == 4,
      o = t == 6,
      l = t == 7,
      u = t == 5 || o;
    return function (c, d, h, f) {
      for (
        var p,
          g,
          y = zGn(c),
          v = VGn(y),
          b = HGn(d, h),
          w = jGn(v),
          k = 0,
          D = f || WGn,
          $ = e ? D(c, w) : n || l ? D(c, 0) : void 0;
        w > k;
        k++
      )
        if ((u || k in v) && ((g = b((p = v[k]), k, y)), t))
          if (e) $[k] = g;
          else if (g)
            switch (t) {
              case 3:
                return !0;
              case 5:
                return p;
              case 6:
                return k;
              case 2:
                XAe($, p);
            }
          else
            switch (t) {
              case 4:
                return !1;
              case 7:
                XAe($, p);
            }
      return o ? -1 : r || i ? i : $;
    };
  },
  sh = {
    forEach: J_(0),
    map: J_(1),
    filter: J_(2),
    some: J_(3),
    every: J_(4),
    find: J_(5),
    findIndex: J_(6),
    filterReject: J_(7),
  },
  KGn = aa,
  ME = function (t, e) {
    var n = [][t];
    return (
      !!n &&
      KGn(function () {
        n.call(
          null,
          e ||
            function () {
              return 1;
            },
          1
        );
      })
    );
  },
  ZGn = sh.forEach,
  YGn = ME,
  QGn = YGn("forEach"),
  are = QGn
    ? [].forEach
    : function (t) {
        return ZGn(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
  VAe = ja,
  zAe = xWe,
  JGn = LWe,
  kK = are,
  qGn = Rb,
  BWe = function (t) {
    if (t && t.forEach !== kK)
      try {
        qGn(t, "forEach", kK);
      } catch {
        t.forEach = kK;
      }
  };
for (var IK in zAe) zAe[IK] && BWe(VAe[IK] && VAe[IK].prototype);
BWe(JGn);
var kb = {},
  F5 = {},
  HWe = {}.propertyIsEnumerable,
  XWe = Object.getOwnPropertyDescriptor,
  e3n = XWe && !HWe.call({ 1: 2 }, 1);
F5.f = e3n
  ? function (t) {
      var e = XWe(this, t);
      return !!e && e.enumerable;
    }
  : HWe;
var t3n = UD,
  n3n = F0,
  Sm = function (t) {
    return t3n(n3n(t));
  },
  r3n = Tl,
  i3n = zs,
  a3n = F5,
  o3n = MR,
  s3n = Sm,
  l3n = G5,
  u3n = pu,
  c3n = wWe,
  jAe = Object.getOwnPropertyDescriptor;
kb.f = r3n
  ? jAe
  : function (t, e) {
      if (((t = s3n(t)), (e = l3n(e)), c3n))
        try {
          return jAe(t, e);
        } catch {}
      if (u3n(t, e)) return o3n(!i3n(a3n.f, t, e), t[e]);
    };
var CE = {},
  d3n = Em,
  h3n = Math.max,
  f3n = Math.min,
  $E = function (t, e) {
    var n = d3n(t);
    return n < 0 ? h3n(n + e, 0) : f3n(n, e);
  },
  p3n = Sm,
  g3n = $E,
  m3n = od,
  WAe = function (t) {
    return function (e, n, r) {
      var i,
        o = p3n(e),
        l = m3n(o),
        u = g3n(r, l);
      if (t && n != n) {
        for (; l > u; ) if ((i = o[u++]) != i) return !0;
      } else
        for (; l > u; u++) if ((t || u in o) && o[u] === n) return t || u || 0;
      return !t && -1;
    };
  },
  U5 = { includes: WAe(!0), indexOf: WAe(!1) },
  y3n = Fa,
  DK = pu,
  v3n = Sm,
  b3n = U5.indexOf,
  _3n = N5,
  KAe = y3n([].push),
  VWe = function (t, e) {
    var n,
      r = v3n(t),
      i = 0,
      o = [];
    for (n in r) !DK(_3n, n) && DK(r, n) && KAe(o, n);
    for (; e.length > i; ) DK(r, (n = e[i++])) && (~b3n(o, n) || KAe(o, n));
    return o;
  },
  tce = [
    "constructor",
    "hasOwnProperty",
    "isPrototypeOf",
    "propertyIsEnumerable",
    "toLocaleString",
    "toString",
    "valueOf",
  ],
  T3n = VWe,
  E3n = tce,
  S3n = E3n.concat("length", "prototype");
CE.f =
  Object.getOwnPropertyNames ||
  function (t) {
    return T3n(t, S3n);
  };
var B5 = {};
B5.f = Object.getOwnPropertySymbols;
var R3n = _m,
  A3n = Fa,
  w3n = CE,
  k3n = B5,
  I3n = Yu,
  D3n = A3n([].concat),
  P3n =
    R3n("Reflect", "ownKeys") ||
    function (t) {
      var e = w3n.f(I3n(t)),
        n = k3n.f;
      return n ? D3n(e, n(t)) : e;
    },
  ZAe = pu,
  M3n = P3n,
  C3n = kb,
  $3n = Cu,
  zWe = function (t, e, n) {
    for (var r = M3n(e), i = $3n.f, o = C3n.f, l = 0; l < r.length; l++) {
      var u = r[l];
      ZAe(t, u) || (n && ZAe(n, u)) || i(t, u, o(e, u));
    }
  },
  x3n = aa,
  L3n = Ss,
  O3n = /#|\.prototype\./,
  H5 = function (t, e) {
    var n = N3n[G3n(t)];
    return n == U3n || (n != F3n && (L3n(e) ? x3n(e) : !!e));
  },
  G3n = (H5.normalize = function (t) {
    return String(t).replace(O3n, ".").toLowerCase();
  }),
  N3n = (H5.data = {}),
  F3n = (H5.NATIVE = "N"),
  U3n = (H5.POLYFILL = "P"),
  BB = H5,
  PK = ja,
  B3n = kb.f,
  H3n = Rb,
  X3n = ad,
  V3n = Wue,
  z3n = zWe,
  j3n = BB,
  Di = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u = t.target,
      c = t.global,
      d = t.stat;
    if ((n = c ? PK : d ? PK[u] || V3n(u, {}) : (PK[u] || {}).prototype))
      for (r in e) {
        if (
          ((o = e[r]),
          (i = t.dontCallGetSet ? (l = B3n(n, r)) && l.value : n[r]),
          !j3n(c ? r : u + (d ? "." : "#") + r, t.forced) && i !== void 0)
        ) {
          if (typeof o == typeof i) continue;
          z3n(o, i);
        }
        (t.sham || (i && i.sham)) && H3n(o, "sham", !0), X3n(n, r, o, t);
      }
  },
  HB = {},
  W3n = G5,
  K3n = Cu,
  Z3n = MR,
  X5 = function (t, e, n) {
    var r = W3n(e);
    r in t ? K3n.f(t, r, Z3n(0, n)) : (t[r] = n);
  },
  YAe = $E,
  Y3n = od,
  Q3n = X5,
  J3n = Array,
  q3n = Math.max,
  V5 = function (t, e, n) {
    for (
      var r = Y3n(t),
        i = YAe(e, r),
        o = YAe(n === void 0 ? r : n, r),
        l = J3n(q3n(o - i, 0)),
        u = 0;
      i < o;
      i++, u++
    )
      Q3n(l, u, t[i]);
    return (l.length = u), l;
  },
  e4n = Ab,
  t4n = Sm,
  jWe = CE.f,
  n4n = V5,
  WWe =
    typeof window == "object" && window && Object.getOwnPropertyNames
      ? Object.getOwnPropertyNames(window)
      : [],
  r4n = function (t) {
    try {
      return jWe(t);
    } catch {
      return n4n(WWe);
    }
  };
HB.f = function (t) {
  return WWe && e4n(t) == "Window" ? r4n(t) : jWe(t4n(t));
};
var i4n = Di,
  a4n = aa,
  o4n = HB.f,
  s4n = a4n(function () {
    return !Object.getOwnPropertyNames(1);
  });
i4n({ target: "Object", stat: !0, forced: s4n }, { getOwnPropertyNames: o4n });
var l4n = wb,
  u4n = String,
  Qu = function (t) {
    if (l4n(t) === "Symbol")
      throw TypeError("Cannot convert a Symbol value to a string");
    return u4n(t);
  },
  c4n = Yu,
  nce = function () {
    var t = c4n(this),
      e = "";
    return (
      t.hasIndices && (e += "d"),
      t.global && (e += "g"),
      t.ignoreCase && (e += "i"),
      t.multiline && (e += "m"),
      t.dotAll && (e += "s"),
      t.unicode && (e += "u"),
      t.unicodeSets && (e += "v"),
      t.sticky && (e += "y"),
      e
    );
  },
  rce = aa,
  d4n = ja,
  ice = d4n.RegExp,
  ace = rce(function () {
    var t = ice("a", "y");
    return (t.lastIndex = 2), t.exec("abcd") != null;
  }),
  h4n =
    ace ||
    rce(function () {
      return !ice("a", "y").sticky;
    }),
  f4n =
    ace ||
    rce(function () {
      var t = ice("^r", "gy");
      return (t.lastIndex = 2), t.exec("str") != null;
    }),
  KWe = { BROKEN_CARET: f4n, MISSED_STICKY: h4n, UNSUPPORTED_Y: ace },
  oce = {},
  p4n = VWe,
  g4n = tce,
  z5 =
    Object.keys ||
    function (t) {
      return p4n(t, g4n);
    },
  m4n = Tl,
  y4n = kWe,
  v4n = Cu,
  b4n = Yu,
  _4n = Sm,
  T4n = z5;
oce.f =
  m4n && !y4n
    ? Object.defineProperties
    : function (t, e) {
        b4n(t);
        for (var n, r = _4n(e), i = T4n(e), o = i.length, l = 0; o > l; )
          v4n.f(t, (n = i[l++]), r[n]);
        return t;
      };
var R4,
  E4n = _m,
  ZWe = E4n("document", "documentElement"),
  S4n = Yu,
  R4n = oce,
  QAe = tce,
  A4n = N5,
  w4n = ZWe,
  k4n = NB,
  I4n = FB,
  JAe = ">",
  qAe = "<",
  ore = "prototype",
  sre = "script",
  YWe = I4n("IE_PROTO"),
  MK = function () {},
  QWe = function (t) {
    return qAe + sre + JAe + t + qAe + "/" + sre + JAe;
  },
  ewe = function (t) {
    t.write(QWe("")), t.close();
    var e = t.parentWindow.Object;
    return (t = null), e;
  },
  D4n = function () {
    var t,
      e = k4n("iframe"),
      n = "java" + sre + ":";
    return (
      (e.style.display = "none"),
      w4n.appendChild(e),
      (e.src = String(n)),
      (t = e.contentWindow.document).open(),
      t.write(QWe("document.F=Object")),
      t.close(),
      t.F
    );
  },
  e6 = function () {
    try {
      R4 = new ActiveXObject("htmlfile");
    } catch {}
    e6 =
      typeof document < "u"
        ? document.domain && R4
          ? ewe(R4)
          : D4n()
        : ewe(R4);
    for (var t = QAe.length; t--; ) delete e6[ore][QAe[t]];
    return e6();
  };
A4n[YWe] = !0;
var CR =
    Object.create ||
    function (t, e) {
      var n;
      return (
        t !== null
          ? ((MK[ore] = S4n(t)), (n = new MK()), (MK[ore] = null), (n[YWe] = t))
          : (n = e6()),
        e === void 0 ? n : R4n.f(n, e)
      );
    },
  P4n = aa,
  M4n = ja,
  C4n = M4n.RegExp,
  $4n = P4n(function () {
    var t = C4n(".", "s");
    return !(
      t.dotAll &&
      t.exec(`
`) &&
      t.flags === "s"
    );
  }),
  x4n = aa,
  L4n = ja,
  O4n = L4n.RegExp,
  G4n = x4n(function () {
    var t = O4n("(?<a>b)", "g");
    return t.exec("b").groups.a !== "b" || "b".replace(t, "$<a>c") !== "bc";
  }),
  wk = zs,
  XB = Fa,
  N4n = Qu,
  F4n = nce,
  U4n = KWe,
  B4n = LD,
  H4n = CR,
  X4n = Tm.get,
  V4n = $4n,
  z4n = G4n,
  j4n = B4n("native-string-replace", String.prototype.replace),
  _8 = RegExp.prototype.exec,
  lre = _8,
  W4n = XB("".charAt),
  K4n = XB("".indexOf),
  Z4n = XB("".replace),
  CK = XB("".slice),
  ure = (function () {
    var t = /a/,
      e = /b*/g;
    return (
      wk(_8, t, "a"), wk(_8, e, "a"), t.lastIndex !== 0 || e.lastIndex !== 0
    );
  })(),
  JWe = U4n.BROKEN_CARET,
  cre = /()??/.exec("")[1] !== void 0,
  Y4n = ure || cre || JWe || V4n || z4n;
Y4n &&
  (lre = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = this,
      d = X4n(c),
      h = N4n(t),
      f = d.raw;
    if (f)
      return (
        (f.lastIndex = c.lastIndex),
        (e = wk(lre, f, h)),
        (c.lastIndex = f.lastIndex),
        e
      );
    var p = d.groups,
      g = JWe && c.sticky,
      y = wk(F4n, c),
      v = c.source,
      b = 0,
      w = h;
    if (
      (g &&
        ((y = Z4n(y, "y", "")),
        K4n(y, "g") === -1 && (y += "g"),
        (w = CK(h, c.lastIndex)),
        c.lastIndex > 0 &&
          (!c.multiline ||
            (c.multiline &&
              W4n(h, c.lastIndex - 1) !==
                `
`)) &&
          ((v = "(?: " + v + ")"), (w = " " + w), b++),
        (n = new RegExp("^(?:" + v + ")", y))),
      cre && (n = new RegExp("^" + v + "$(?!\\s)", y)),
      ure && (r = c.lastIndex),
      (i = wk(_8, g ? n : c, w)),
      g
        ? i
          ? ((i.input = CK(i.input, b)),
            (i[0] = CK(i[0], b)),
            (i.index = c.lastIndex),
            (c.lastIndex += i[0].length))
          : (c.lastIndex = 0)
        : ure && i && (c.lastIndex = c.global ? i.index + i[0].length : r),
      cre &&
        i &&
        i.length > 1 &&
        wk(j4n, i[0], n, function () {
          for (o = 1; o < arguments.length - 2; o++)
            arguments[o] === void 0 && (i[o] = void 0);
        }),
      i && p)
    )
      for (i.groups = l = H4n(null), o = 0; o < p.length; o++)
        l[(u = p[o])[0]] = i[u[1]];
    return i;
  });
var lL = lre,
  Q4n = Di;
Q4n({ target: "RegExp", proto: !0, forced: /./.exec !== lL }, { exec: lL });
var J4n = Di,
  twe = zs,
  q4n = Ss,
  nwe = Yu,
  eNn = Qu,
  tNn = (function () {
    var t = !1,
      e = /[ac]/;
    return (
      (e.exec = function () {
        return (t = !0), /./.exec.apply(this, arguments);
      }),
      e.test("abc") === !0 && t
    );
  })(),
  nNn = /./.test;
J4n(
  { target: "RegExp", proto: !0, forced: !tNn },
  {
    test: function (t) {
      var e = nwe(this),
        n = eNn(t),
        r = e.exec;
      if (!q4n(r)) return twe(nNn, e, n);
      var i = twe(r, e, n);
      return i !== null && (nwe(i), !0);
    },
  }
);
var rNn = L5,
  qWe = Function.prototype,
  rwe = qWe.apply,
  iwe = qWe.call,
  xE =
    (typeof Reflect == "object" && Reflect.apply) ||
    (rNn
      ? iwe.bind(rwe)
      : function () {
          return iwe.apply(rwe, arguments);
        }),
  awe = qS,
  owe = ad,
  iNn = lL,
  swe = aa,
  eKe = Gs,
  aNn = Rb,
  oNn = eKe("species"),
  $K = RegExp.prototype,
  sce = function (t, e, n, r) {
    var i = eKe(t),
      o = !swe(function () {
        var d = {};
        return (
          (d[i] = function () {
            return 7;
          }),
          ""[t](d) != 7
        );
      }),
      l =
        o &&
        !swe(function () {
          var d = !1,
            h = /a/;
          return (
            t === "split" &&
              (((h = {}).constructor = {}),
              (h.constructor[oNn] = function () {
                return h;
              }),
              (h.flags = ""),
              (h[i] = /./[i])),
            (h.exec = function () {
              return (d = !0), null;
            }),
            h[i](""),
            !d
          );
        });
    if (!o || !l || n) {
      var u = awe(/./[i]),
        c = e(i, ""[t], function (d, h, f, p, g) {
          var y = awe(d),
            v = h.exec;
          return v === iNn || v === $K.exec
            ? o && !g
              ? { done: !0, value: u(h, f, p) }
              : { done: !0, value: y(f, h, p) }
            : { done: !1 };
        });
      owe(String.prototype, t, c[0]), owe($K, i, c[1]);
    }
    r && aNn($K[i], "sham", !0);
  },
  lce = Fa,
  sNn = Em,
  lNn = Qu,
  uNn = F0,
  cNn = lce("".charAt),
  lwe = lce("".charCodeAt),
  dNn = lce("".slice),
  uwe = function (t) {
    return function (e, n) {
      var r,
        i,
        o = lNn(uNn(e)),
        l = sNn(n),
        u = o.length;
      return l < 0 || l >= u
        ? t
          ? ""
          : void 0
        : (r = lwe(o, l)) < 55296 ||
          r > 56319 ||
          l + 1 === u ||
          (i = lwe(o, l + 1)) < 56320 ||
          i > 57343
        ? t
          ? cNn(o, l)
          : r
        : t
        ? dNn(o, l, l + 2)
        : i - 56320 + ((r - 55296) << 10) + 65536;
    };
  },
  uce = { codeAt: uwe(!1), charAt: uwe(!0) },
  hNn = uce.charAt,
  cce = function (t, e, n) {
    return e + (n ? hNn(t, e).length : 1);
  },
  dce = Fa,
  fNn = id,
  pNn = Math.floor,
  xK = dce("".charAt),
  gNn = dce("".replace),
  LK = dce("".slice),
  mNn = /\$([$&'`]|\d{1,2}|<[^>]*>)/g,
  yNn = /\$([$&'`]|\d{1,2})/g,
  vNn = function (t, e, n, r, i, o) {
    var l = n + t.length,
      u = r.length,
      c = yNn;
    return (
      i !== void 0 && ((i = fNn(i)), (c = mNn)),
      gNn(o, c, function (d, h) {
        var f;
        switch (xK(h, 0)) {
          case "$":
            return "$";
          case "&":
            return t;
          case "`":
            return LK(e, 0, n);
          case "'":
            return LK(e, l);
          case "<":
            f = i[LK(h, 1, -1)];
            break;
          default:
            var p = +h;
            if (p === 0) return d;
            if (p > u) {
              var g = pNn(p / 10);
              return g === 0
                ? d
                : g <= u
                ? r[g - 1] === void 0
                  ? xK(h, 1)
                  : r[g - 1] + xK(h, 1)
                : d;
            }
            f = r[p - 1];
        }
        return f === void 0 ? "" : f;
      })
    );
  },
  cwe = zs,
  bNn = Yu,
  _Nn = Ss,
  TNn = Ab,
  ENn = lL,
  SNn = TypeError,
  hce = function (t, e) {
    var n = t.exec;
    if (_Nn(n)) {
      var r = cwe(n, t, e);
      return r !== null && bNn(r), r;
    }
    if (TNn(t) === "RegExp") return cwe(ENn, t, e);
    throw SNn("RegExp#exec called on incompatible receiver");
  },
  RNn = xE,
  dwe = zs,
  VB = Fa,
  ANn = sce,
  wNn = aa,
  kNn = Yu,
  INn = Ss,
  DNn = Tb,
  PNn = Em,
  MNn = B0,
  lw = Qu,
  CNn = F0,
  $Nn = cce,
  xNn = ND,
  LNn = vNn,
  ONn = hce,
  GNn = Gs,
  dre = GNn("replace"),
  NNn = Math.max,
  FNn = Math.min,
  UNn = VB([].concat),
  OK = VB([].push),
  hwe = VB("".indexOf),
  fwe = VB("".slice),
  BNn = function (t) {
    return t === void 0 ? t : String(t);
  },
  HNn = "a".replace(/./, "$0") === "$0",
  pwe = !!/./[dre] && /./[dre]("a", "$0") === "",
  XNn = !wNn(function () {
    var t = /./;
    return (
      (t.exec = function () {
        var e = [];
        return (e.groups = { a: "7" }), e;
      }),
      "".replace(t, "$<a>") !== "7"
    );
  });
ANn(
  "replace",
  function (t, e, n) {
    var r = pwe ? "$" : "$0";
    return [
      function (i, o) {
        var l = CNn(this),
          u = DNn(i) ? void 0 : xNn(i, dre);
        return u ? dwe(u, i, l, o) : dwe(e, lw(l), i, o);
      },
      function (i, o) {
        var l = kNn(this),
          u = lw(i);
        if (typeof o == "string" && hwe(o, r) === -1 && hwe(o, "$<") === -1) {
          var c = n(e, l, u, o);
          if (c.done) return c.value;
        }
        var d = INn(o);
        d || (o = lw(o));
        var h = l.global;
        if (h) {
          var f = l.unicode;
          l.lastIndex = 0;
        }
        for (var p = []; ; ) {
          var g = ONn(l, u);
          if (g === null || (OK(p, g), !h)) break;
          lw(g[0]) === "" && (l.lastIndex = $Nn(u, MNn(l.lastIndex), f));
        }
        for (var y = "", v = 0, b = 0; b < p.length; b++) {
          for (
            var w = lw((g = p[b])[0]),
              k = NNn(FNn(PNn(g.index), u.length), 0),
              D = [],
              $ = 1;
            $ < g.length;
            $++
          )
            OK(D, BNn(g[$]));
          var N = g.groups;
          if (d) {
            var P = UNn([w], D, k, u);
            N !== void 0 && OK(P, N);
            var I = lw(RNn(o, void 0, P));
          } else I = LNn(w, u, k, D, N, o);
          k >= v && ((y += fwe(u, v, k) + I), (v = k + w.length));
        }
        return y + fwe(u, v);
      },
    ];
  },
  !XNn || !HNn || pwe
);
var VNn = aa,
  zNn = Gs,
  jNn = DR,
  WNn = zNn("species"),
  j5 = function (t) {
    return (
      jNn >= 51 ||
      !VNn(function () {
        var e = [];
        return (
          ((e.constructor = {})[WNn] = function () {
            return { foo: 1 };
          }),
          e[t](Boolean).foo !== 1
        );
      })
    );
  },
  KNn = Di,
  ZNn = sh.filter,
  YNn = j5,
  QNn = YNn("filter");
KNn(
  { target: "Array", proto: !0, forced: !QNn },
  {
    filter: function (t) {
      return ZNn(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var uL,
  uw,
  gwe,
  GK,
  JNn = Ab,
  qNn = ja,
  W5 = JNn(qNn.process) == "process",
  eFn = Ss,
  tFn = String,
  nFn = TypeError,
  rFn = function (t) {
    if (typeof t == "object" || eFn(t)) return t;
    throw nFn("Can't set " + tFn(t) + " as a prototype");
  },
  iFn = Fa,
  aFn = Yu,
  oFn = rFn,
  HD =
    Object.setPrototypeOf ||
    ("__proto__" in {}
      ? (function () {
          var t,
            e = !1,
            n = {};
          try {
            (t = iFn(
              Object.getOwnPropertyDescriptor(Object.prototype, "__proto__").set
            ))(n, []),
              (e = n instanceof Array);
          } catch {}
          return function (r, i) {
            return aFn(r), oFn(i), e ? t(r, i) : (r.__proto__ = i), r;
          };
        })()
      : void 0),
  sFn = Cu.f,
  lFn = pu,
  uFn = Gs,
  mwe = uFn("toStringTag"),
  LE = function (t, e, n) {
    t && !n && (t = t.prototype),
      t && !lFn(t, mwe) && sFn(t, mwe, { configurable: !0, value: e });
  },
  cFn = _m,
  dFn = Cu,
  hFn = Gs,
  fFn = Tl,
  ywe = hFn("species"),
  zB = function (t) {
    var e = cFn(t),
      n = dFn.f;
    fFn &&
      e &&
      !e[ywe] &&
      n(e, ywe, {
        configurable: !0,
        get: function () {
          return this;
        },
      });
  },
  pFn = Sb,
  gFn = TypeError,
  $R = function (t, e) {
    if (pFn(e, t)) return t;
    throw gFn("Incorrect invocation");
  },
  mFn = UB,
  yFn = PR,
  vFn = TypeError,
  tKe = function (t) {
    if (mFn(t)) return t;
    throw vFn(yFn(t) + " is not a constructor");
  },
  vwe = Yu,
  bFn = tKe,
  _Fn = Tb,
  TFn = Gs,
  EFn = TFn("species"),
  K5 = function (t, e) {
    var n,
      r = vwe(t).constructor;
    return r === void 0 || _Fn((n = vwe(r)[EFn])) ? e : bFn(n);
  },
  SFn = Fa,
  xR = SFn([].slice),
  RFn = TypeError,
  jB = function (t, e) {
    if (t < e) throw RFn("Not enough arguments");
    return t;
  },
  AFn = Eb,
  nKe = /(?:ipad|iphone|ipod).*applewebkit/i.test(AFn),
  Hp = ja,
  wFn = xE,
  kFn = Av,
  bwe = Ss,
  IFn = pu,
  DFn = aa,
  _we = ZWe,
  PFn = xR,
  Twe = NB,
  MFn = jB,
  CFn = nKe,
  $Fn = W5,
  hre = Hp.setImmediate,
  fre = Hp.clearImmediate,
  xFn = Hp.process,
  NK = Hp.Dispatch,
  LFn = Hp.Function,
  Ewe = Hp.MessageChannel,
  OFn = Hp.String,
  FK = 0,
  O$ = {},
  Swe = "onreadystatechange";
try {
  uL = Hp.location;
} catch {}
var fce = function (t) {
    if (IFn(O$, t)) {
      var e = O$[t];
      delete O$[t], e();
    }
  },
  UK = function (t) {
    return function () {
      fce(t);
    };
  },
  Rwe = function (t) {
    fce(t.data);
  },
  Awe = function (t) {
    Hp.postMessage(OFn(t), uL.protocol + "//" + uL.host);
  };
(hre && fre) ||
  ((hre = function (t) {
    MFn(arguments.length, 1);
    var e = bwe(t) ? t : LFn(t),
      n = PFn(arguments, 1);
    return (
      (O$[++FK] = function () {
        wFn(e, void 0, n);
      }),
      uw(FK),
      FK
    );
  }),
  (fre = function (t) {
    delete O$[t];
  }),
  $Fn
    ? (uw = function (t) {
        xFn.nextTick(UK(t));
      })
    : NK && NK.now
    ? (uw = function (t) {
        NK.now(UK(t));
      })
    : Ewe && !CFn
    ? ((GK = (gwe = new Ewe()).port2),
      (gwe.port1.onmessage = Rwe),
      (uw = kFn(GK.postMessage, GK)))
    : Hp.addEventListener &&
      bwe(Hp.postMessage) &&
      !Hp.importScripts &&
      uL &&
      uL.protocol !== "file:" &&
      !DFn(Awe)
    ? ((uw = Awe), Hp.addEventListener("message", Rwe, !1))
    : (uw =
        Swe in Twe("script")
          ? function (t) {
              _we.appendChild(Twe("script"))[Swe] = function () {
                _we.removeChild(this), fce(t);
              };
            }
          : function (t) {
              setTimeout(UK(t), 0);
            }));
var yM,
  lS,
  G$,
  Jw,
  BK,
  HK,
  XK,
  wwe,
  rKe = { set: hre, clear: fre },
  GFn = Eb,
  NFn = ja,
  FFn = /ipad|iphone|ipod/i.test(GFn) && NFn.Pebble !== void 0,
  UFn = Eb,
  BFn = /web0s(?!.*chrome)/i.test(UFn),
  eR = ja,
  kwe = Av,
  HFn = kb.f,
  VK = rKe.set,
  XFn = nKe,
  VFn = FFn,
  zFn = BFn,
  zK = W5,
  Iwe = eR.MutationObserver || eR.WebKitMutationObserver,
  Dwe = eR.document,
  Pwe = eR.process,
  A4 = eR.Promise,
  Mwe = HFn(eR, "queueMicrotask"),
  iKe = Mwe && Mwe.value;
iKe ||
  ((yM = function () {
    var t, e;
    for (zK && (t = Pwe.domain) && t.exit(); lS; ) {
      (e = lS.fn), (lS = lS.next);
      try {
        e();
      } catch (n) {
        throw (lS ? Jw() : (G$ = void 0), n);
      }
    }
    (G$ = void 0), t && t.enter();
  }),
  XFn || zK || zFn || !Iwe || !Dwe
    ? !VFn && A4 && A4.resolve
      ? (((XK = A4.resolve(void 0)).constructor = A4),
        (wwe = kwe(XK.then, XK)),
        (Jw = function () {
          wwe(yM);
        }))
      : zK
      ? (Jw = function () {
          Pwe.nextTick(yM);
        })
      : ((VK = kwe(VK, eR)),
        (Jw = function () {
          VK(yM);
        }))
    : ((BK = !0),
      (HK = Dwe.createTextNode("")),
      new Iwe(yM).observe(HK, { characterData: !0 }),
      (Jw = function () {
        HK.data = BK = !BK;
      })));
var jFn =
    iKe ||
    function (t) {
      var e = { fn: t, next: void 0 };
      G$ && (G$.next = e), lS || ((lS = e), Jw()), (G$ = e);
    },
  WFn = ja,
  KFn = function (t, e) {
    var n = WFn.console;
    n && n.error && (arguments.length == 1 ? n.error(t) : n.error(t, e));
  },
  pce = function (t) {
    try {
      return { error: !1, value: t() };
    } catch (e) {
      return { error: !0, value: e };
    }
  },
  aKe = function () {
    (this.head = null), (this.tail = null);
  };
aKe.prototype = {
  add: function (t) {
    var e = { item: t, next: null };
    this.head ? (this.tail.next = e) : (this.head = e), (this.tail = e);
  },
  get: function () {
    var t = this.head;
    if (t)
      return (
        (this.head = t.next), this.tail === t && (this.tail = null), t.item
      );
  },
};
var ZFn = aKe,
  YFn = ja,
  Z5 = YFn.Promise,
  oKe = typeof Deno == "object" && Deno && typeof Deno.version == "object",
  QFn = oKe,
  JFn = W5,
  qFn =
    !QFn && !JFn && typeof window == "object" && typeof document == "object",
  e6n = ja,
  N$ = Z5,
  t6n = Ss,
  n6n = BB,
  r6n = Jue,
  i6n = Gs,
  a6n = qFn,
  o6n = oKe,
  jK = DR;
N$ && N$.prototype;
var s6n = i6n("species"),
  sKe = !1,
  lKe = t6n(e6n.PromiseRejectionEvent),
  l6n = n6n("Promise", function () {
    var t = r6n(N$),
      e = t !== String(N$);
    if (!e && jK === 66) return !0;
    if (!jK || jK < 51 || !/native code/.test(t)) {
      var n = new N$(function (i) {
          i(1);
        }),
        r = function (i) {
          i(
            function () {},
            function () {}
          );
        };
      if (
        (((n.constructor = {})[s6n] = r),
        !(sKe = n.then(function () {}) instanceof r))
      )
        return !0;
    }
    return !e && (a6n || o6n) && !lKe;
  }),
  Y5 = { CONSTRUCTOR: l6n, REJECTION_EVENT: lKe, SUBCLASSING: sKe },
  XD = {},
  Cwe = U0,
  u6n = TypeError,
  c6n = function (t) {
    var e, n;
    (this.promise = new t(function (r, i) {
      if (e !== void 0 || n !== void 0) throw u6n("Bad Promise constructor");
      (e = r), (n = i);
    })),
      (this.resolve = Cwe(e)),
      (this.reject = Cwe(n));
  };
XD.f = function (t) {
  return new c6n(t);
};
var WK,
  $we,
  d6n,
  xwe,
  h6n = Di,
  T8 = W5,
  uE = ja,
  aD = zs,
  Lwe = ad,
  Owe = HD,
  f6n = LE,
  p6n = zB,
  g6n = U0,
  t6 = Ss,
  m6n = $u,
  y6n = $R,
  v6n = K5,
  uKe = rKe.set,
  gce = jFn,
  b6n = KFn,
  _6n = pce,
  T6n = ZFn,
  cKe = Tm,
  E8 = Z5,
  mce = Y5,
  dKe = XD,
  S8 = "Promise",
  hKe = mce.CONSTRUCTOR,
  E6n = mce.REJECTION_EVENT,
  S6n = mce.SUBCLASSING,
  KK = cKe.getterFor(S8),
  R6n = cKe.set,
  qw = E8 && E8.prototype,
  kk = E8,
  w4 = qw,
  fKe = uE.TypeError,
  pre = uE.document,
  yce = uE.process,
  gre = dKe.f,
  A6n = gre,
  w6n = !!(pre && pre.createEvent && uE.dispatchEvent),
  pKe = "unhandledrejection",
  k6n = "rejectionhandled",
  Gwe = 0,
  gKe = 1,
  I6n = 2,
  vce = 1,
  mKe = 2,
  yKe = function (t) {
    var e;
    return !(!m6n(t) || !t6((e = t.then))) && e;
  },
  vKe = function (t, e) {
    var n,
      r,
      i,
      o = e.value,
      l = e.state == gKe,
      u = l ? t.ok : t.fail,
      c = t.resolve,
      d = t.reject,
      h = t.domain;
    try {
      u
        ? (l || (e.rejection === mKe && P6n(e), (e.rejection = vce)),
          u === !0
            ? (n = o)
            : (h && h.enter(), (n = u(o)), h && (h.exit(), (i = !0))),
          n === t.promise
            ? d(fKe("Promise-chain cycle"))
            : (r = yKe(n))
            ? aD(r, n, c, d)
            : c(n))
        : d(o);
    } catch (f) {
      h && !i && h.exit(), d(f);
    }
  },
  bKe = function (t, e) {
    t.notified ||
      ((t.notified = !0),
      gce(function () {
        for (var n, r = t.reactions; (n = r.get()); ) vKe(n, t);
        (t.notified = !1), e && !t.rejection && D6n(t);
      }));
  },
  _Ke = function (t, e, n) {
    var r, i;
    w6n
      ? (((r = pre.createEvent("Event")).promise = e),
        (r.reason = n),
        r.initEvent(t, !1, !0),
        uE.dispatchEvent(r))
      : (r = { promise: e, reason: n }),
      !E6n && (i = uE["on" + t])
        ? i(r)
        : t === pKe && b6n("Unhandled promise rejection", n);
  },
  D6n = function (t) {
    aD(uKe, uE, function () {
      var e,
        n = t.facade,
        r = t.value;
      if (
        Nwe(t) &&
        ((e = _6n(function () {
          T8 ? yce.emit("unhandledRejection", r, n) : _Ke(pKe, n, r);
        })),
        (t.rejection = T8 || Nwe(t) ? mKe : vce),
        e.error)
      )
        throw e.value;
    });
  },
  Nwe = function (t) {
    return t.rejection !== vce && !t.parent;
  },
  P6n = function (t) {
    aD(uKe, uE, function () {
      var e = t.facade;
      T8 ? yce.emit("rejectionHandled", e) : _Ke(k6n, e, t.value);
    });
  },
  Ik = function (t, e, n) {
    return function (r) {
      t(e, r, n);
    };
  },
  dI = function (t, e, n) {
    t.done ||
      ((t.done = !0), n && (t = n), (t.value = e), (t.state = I6n), bKe(t, !0));
  },
  mre = function (t, e, n) {
    if (!t.done) {
      (t.done = !0), n && (t = n);
      try {
        if (t.facade === e) throw fKe("Promise can't be resolved itself");
        var r = yKe(e);
        r
          ? gce(function () {
              var i = { done: !1 };
              try {
                aD(r, e, Ik(mre, i, t), Ik(dI, i, t));
              } catch (o) {
                dI(i, o, t);
              }
            })
          : ((t.value = e), (t.state = gKe), bKe(t, !1));
      } catch (i) {
        dI({ done: !1 }, i, t);
      }
    }
  };
if (
  hKe &&
  ((w4 = (kk = function (t) {
    y6n(this, w4), g6n(t), aD(WK, this);
    var e = KK(this);
    try {
      t(Ik(mre, e), Ik(dI, e));
    } catch (n) {
      dI(e, n);
    }
  }).prototype),
  ((WK = function (t) {
    R6n(this, {
      type: S8,
      done: !1,
      notified: !1,
      parent: !1,
      reactions: new T6n(),
      rejection: !1,
      state: Gwe,
      value: void 0,
    });
  }).prototype = Lwe(w4, "then", function (t, e) {
    var n = KK(this),
      r = gre(v6n(this, kk));
    return (
      (n.parent = !0),
      (r.ok = !t6(t) || t),
      (r.fail = t6(e) && e),
      (r.domain = T8 ? yce.domain : void 0),
      n.state == Gwe
        ? n.reactions.add(r)
        : gce(function () {
            vKe(r, n);
          }),
      r.promise
    );
  })),
  ($we = function () {
    var t = new WK(),
      e = KK(t);
    (this.promise = t), (this.resolve = Ik(mre, e)), (this.reject = Ik(dI, e));
  }),
  (dKe.f = gre =
    function (t) {
      return t === kk || t === d6n ? new $we(t) : A6n(t);
    }),
  t6(E8) && qw !== Object.prototype)
) {
  (xwe = qw.then),
    S6n ||
      Lwe(
        qw,
        "then",
        function (t, e) {
          var n = this;
          return new kk(function (r, i) {
            aD(xwe, n, r, i);
          }).then(t, e);
        },
        { unsafe: !0 }
      );
  try {
    delete qw.constructor;
  } catch {}
  Owe && Owe(qw, w4);
}
h6n({ global: !0, constructor: !0, wrap: !0, forced: hKe }, { Promise: kk }),
  f6n(kk, S8, !1),
  p6n(S8);
var Q5 = {},
  M6n = Gs,
  C6n = Q5,
  $6n = M6n("iterator"),
  x6n = Array.prototype,
  bce = function (t) {
    return t !== void 0 && (C6n.Array === t || x6n[$6n] === t);
  },
  L6n = wb,
  Fwe = ND,
  O6n = Tb,
  G6n = Q5,
  N6n = Gs,
  F6n = N6n("iterator"),
  J5 = function (t) {
    if (!O6n(t)) return Fwe(t, F6n) || Fwe(t, "@@iterator") || G6n[L6n(t)];
  },
  U6n = zs,
  B6n = U0,
  H6n = Yu,
  X6n = PR,
  V6n = J5,
  z6n = TypeError,
  WB = function (t, e) {
    var n = arguments.length < 2 ? V6n(t) : e;
    if (B6n(n)) return H6n(U6n(n, t));
    throw z6n(X6n(t) + " is not iterable");
  },
  j6n = zs,
  Uwe = Yu,
  W6n = ND,
  TKe = function (t, e, n) {
    var r, i;
    Uwe(t);
    try {
      if (!(r = W6n(t, "return"))) {
        if (e === "throw") throw n;
        return n;
      }
      r = j6n(r, t);
    } catch (o) {
      (i = !0), (r = o);
    }
    if (e === "throw") throw n;
    if (i) throw r;
    return Uwe(r), n;
  },
  K6n = Av,
  Z6n = zs,
  Y6n = Yu,
  Q6n = PR,
  J6n = bce,
  q6n = od,
  Bwe = Sb,
  eUn = WB,
  tUn = J5,
  Hwe = TKe,
  nUn = TypeError,
  n6 = function (t, e) {
    (this.stopped = t), (this.result = e);
  },
  Xwe = n6.prototype,
  KB = function (t, e, n) {
    var r,
      i,
      o,
      l,
      u,
      c,
      d,
      h = n && n.that,
      f = !(!n || !n.AS_ENTRIES),
      p = !(!n || !n.IS_RECORD),
      g = !(!n || !n.IS_ITERATOR),
      y = !(!n || !n.INTERRUPTED),
      v = K6n(e, h),
      b = function (k) {
        return r && Hwe(r, "normal", k), new n6(!0, k);
      },
      w = function (k) {
        return f
          ? (Y6n(k), y ? v(k[0], k[1], b) : v(k[0], k[1]))
          : y
          ? v(k, b)
          : v(k);
      };
    if (p) r = t.iterator;
    else if (g) r = t;
    else {
      if (!(i = tUn(t))) throw nUn(Q6n(t) + " is not iterable");
      if (J6n(i)) {
        for (o = 0, l = q6n(t); l > o; o++)
          if ((u = w(t[o])) && Bwe(Xwe, u)) return u;
        return new n6(!1);
      }
      r = eUn(t, i);
    }
    for (c = p ? t.next : r.next; !(d = Z6n(c, r)).done; ) {
      try {
        u = w(d.value);
      } catch (k) {
        Hwe(r, "throw", k);
      }
      if (typeof u == "object" && u && Bwe(Xwe, u)) return u;
    }
    return new n6(!1);
  },
  rUn = Gs,
  EKe = rUn("iterator"),
  SKe = !1;
try {
  var iUn = 0,
    Vwe = {
      next: function () {
        return { done: !!iUn++ };
      },
      return: function () {
        SKe = !0;
      },
    };
  (Vwe[EKe] = function () {
    return this;
  }),
    Array.from(Vwe, function () {
      throw 2;
    });
} catch {}
var ZB = function (t, e) {
    if (!e && !SKe) return !1;
    var n = !1;
    try {
      var r = {};
      (r[EKe] = function () {
        return {
          next: function () {
            return { done: (n = !0) };
          },
        };
      }),
        t(r);
    } catch {}
    return n;
  },
  aUn = Z5,
  oUn = ZB,
  sUn = Y5.CONSTRUCTOR,
  RKe =
    sUn ||
    !oUn(function (t) {
      aUn.all(t).then(void 0, function () {});
    }),
  lUn = Di,
  uUn = zs,
  cUn = U0,
  dUn = XD,
  hUn = pce,
  fUn = KB,
  pUn = RKe;
lUn(
  { target: "Promise", stat: !0, forced: pUn },
  {
    all: function (t) {
      var e = this,
        n = dUn.f(e),
        r = n.resolve,
        i = n.reject,
        o = hUn(function () {
          var l = cUn(e.resolve),
            u = [],
            c = 0,
            d = 1;
          fUn(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              uUn(l, e, h).then(function (g) {
                p || ((p = !0), (u[f] = g), --d || r(u));
              }, i);
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var gUn = Di,
  mUn = Y5.CONSTRUCTOR,
  yre = Z5,
  yUn = _m,
  vUn = Ss,
  bUn = ad,
  zwe = yre && yre.prototype;
if (
  (gUn(
    { target: "Promise", proto: !0, forced: mUn, real: !0 },
    {
      catch: function (t) {
        return this.then(void 0, t);
      },
    }
  ),
  vUn(yre))
) {
  var jwe = yUn("Promise").prototype.catch;
  zwe.catch !== jwe && bUn(zwe, "catch", jwe, { unsafe: !0 });
}
var _Un = Di,
  TUn = zs,
  EUn = U0,
  SUn = XD,
  RUn = pce,
  AUn = KB,
  wUn = RKe;
_Un(
  { target: "Promise", stat: !0, forced: wUn },
  {
    race: function (t) {
      var e = this,
        n = SUn.f(e),
        r = n.reject,
        i = RUn(function () {
          var o = EUn(e.resolve);
          AUn(t, function (l) {
            TUn(o, e, l).then(n.resolve, r);
          });
        });
      return i.error && r(i.value), n.promise;
    },
  }
);
var kUn = Di,
  IUn = zs,
  DUn = XD,
  PUn = Y5.CONSTRUCTOR;
kUn(
  { target: "Promise", stat: !0, forced: PUn },
  {
    reject: function (t) {
      var e = DUn.f(this);
      return IUn(e.reject, void 0, t), e.promise;
    },
  }
);
var MUn = Yu,
  CUn = $u,
  $Un = XD,
  AKe = function (t, e) {
    if ((MUn(t), CUn(e) && e.constructor === t)) return e;
    var n = $Un.f(t);
    return (0, n.resolve)(e), n.promise;
  },
  xUn = Di,
  LUn = _m,
  OUn = Y5.CONSTRUCTOR,
  GUn = AKe;
LUn("Promise"),
  xUn(
    { target: "Promise", stat: !0, forced: OUn },
    {
      resolve: function (t) {
        return GUn(this, t);
      },
    }
  );
var NUn = TypeError,
  FUn = 9007199254740991,
  wKe = function (t) {
    if (t > FUn) throw NUn("Maximum allowed index exceeded");
    return t;
  },
  UUn = Di,
  BUn = aa,
  HUn = BD,
  XUn = $u,
  VUn = id,
  zUn = od,
  Wwe = wKe,
  Kwe = X5,
  jUn = ece,
  WUn = j5,
  KUn = Gs,
  ZUn = DR,
  kKe = KUn("isConcatSpreadable"),
  YUn =
    ZUn >= 51 ||
    !BUn(function () {
      var t = [];
      return (t[kKe] = !1), t.concat()[0] !== t;
    }),
  QUn = WUn("concat"),
  JUn = function (t) {
    if (!XUn(t)) return !1;
    var e = t[kKe];
    return e !== void 0 ? !!e : HUn(t);
  },
  qUn = !YUn || !QUn;
UUn(
  { target: "Array", proto: !0, arity: 1, forced: qUn },
  {
    concat: function (t) {
      var e,
        n,
        r,
        i,
        o,
        l = VUn(this),
        u = jUn(l, 0),
        c = 0;
      for (e = -1, r = arguments.length; e < r; e++)
        if (JUn((o = e === -1 ? l : arguments[e])))
          for (i = zUn(o), Wwe(c + i), n = 0; n < i; n++, c++)
            n in o && Kwe(u, c, o[n]);
        else Wwe(c + 1), Kwe(u, c++, o);
      return (u.length = c), u;
    },
  }
);
var e8n = Di,
  R8 = Z5,
  t8n = aa,
  Zwe = _m,
  Ywe = Ss,
  n8n = K5,
  Qwe = AKe,
  r8n = ad,
  vre = R8 && R8.prototype,
  i8n =
    !!R8 &&
    t8n(function () {
      vre.finally.call({ then: function () {} }, function () {});
    });
if (
  (e8n(
    { target: "Promise", proto: !0, real: !0, forced: i8n },
    {
      finally: function (t) {
        var e = n8n(this, Zwe("Promise")),
          n = Ywe(t);
        return this.then(
          n
            ? function (r) {
                return Qwe(e, t()).then(function () {
                  return r;
                });
              }
            : t,
          n
            ? function (r) {
                return Qwe(e, t()).then(function () {
                  throw r;
                });
              }
            : t
        );
      },
    }
  ),
  Ywe(R8))
) {
  var Jwe = Zwe("Promise").prototype.finally;
  vre.finally !== Jwe && r8n(vre, "finally", Jwe, { unsafe: !0 });
}
var a8n = Ss,
  o8n = $u,
  qwe = HD,
  _ce = function (t, e, n) {
    var r, i;
    return (
      qwe &&
        a8n((r = e.constructor)) &&
        r !== n &&
        o8n((i = r.prototype)) &&
        i !== n.prototype &&
        qwe(t, i),
      t
    );
  },
  s8n = Fa,
  IKe = s8n((1).valueOf),
  YB = `	
\v\f\r                　\u2028\u2029\uFEFF`,
  l8n = Fa,
  u8n = F0,
  c8n = Qu,
  d8n = YB,
  eke = l8n("".replace),
  A8 = "[" + d8n + "]",
  h8n = RegExp("^" + A8 + A8 + "*"),
  f8n = RegExp(A8 + A8 + "*$"),
  ZK = function (t) {
    return function (e) {
      var n = c8n(u8n(e));
      return 1 & t && (n = eke(n, h8n, "")), 2 & t && (n = eke(n, f8n, "")), n;
    };
  },
  QB = { start: ZK(1), end: ZK(2), trim: ZK(3) },
  p8n = Tl,
  Tce = ja,
  DKe = Fa,
  g8n = BB,
  m8n = ad,
  tke = pu,
  y8n = _ce,
  v8n = Sb,
  b8n = GD,
  PKe = Yue,
  _8n = aa,
  T8n = CE.f,
  E8n = kb.f,
  S8n = Cu.f,
  R8n = IKe,
  A8n = QB.trim,
  bre = "Number",
  vT = Tce[bre],
  YK = vT.prototype,
  w8n = Tce.TypeError,
  k8n = DKe("".slice),
  k4 = DKe("".charCodeAt),
  I8n = function (t) {
    var e = PKe(t, "number");
    return typeof e == "bigint" ? e : D8n(e);
  },
  D8n = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c,
      d = PKe(t, "number");
    if (b8n(d)) throw w8n("Cannot convert a Symbol value to a number");
    if (typeof d == "string" && d.length > 2) {
      if (((d = A8n(d)), (e = k4(d, 0)) === 43 || e === 45)) {
        if ((n = k4(d, 2)) === 88 || n === 120) return NaN;
      } else if (e === 48) {
        switch (k4(d, 1)) {
          case 66:
          case 98:
            (r = 2), (i = 49);
            break;
          case 79:
          case 111:
            (r = 8), (i = 55);
            break;
          default:
            return +d;
        }
        for (l = (o = k8n(d, 2)).length, u = 0; u < l; u++)
          if ((c = k4(o, u)) < 48 || c > i) return NaN;
        return parseInt(o, r);
      }
    }
    return +d;
  };
if (g8n(bre, !vT(" 0o1") || !vT("0b1") || vT("+0x1"))) {
  for (
    var I4,
      cw = function (t) {
        var e = arguments.length < 1 ? 0 : vT(I8n(t)),
          n = this;
        return v8n(YK, n) &&
          _8n(function () {
            R8n(n);
          })
          ? y8n(Object(e), n, cw)
          : e;
      },
      nke = p8n
        ? T8n(vT)
        : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(
            ","
          ),
      QK = 0;
    nke.length > QK;
    QK++
  )
    tke(vT, (I4 = nke[QK])) && !tke(cw, I4) && S8n(cw, I4, E8n(vT, I4));
  (cw.prototype = YK),
    (YK.constructor = cw),
    m8n(Tce, bre, cw, { constructor: !0 });
}
var MKe = ja,
  P8n = aa,
  M8n = Fa,
  C8n = Qu,
  $8n = QB.trim,
  x8n = YB,
  L8n = M8n("".charAt),
  w8 = MKe.parseFloat,
  rke = MKe.Symbol,
  ike = rke && rke.iterator,
  O8n =
    1 / w8(x8n + "-0") != -1 / 0 ||
    (ike &&
      !P8n(function () {
        w8(Object(ike));
      })),
  _re = O8n
    ? function (t) {
        var e = $8n(C8n(t)),
          n = w8(e);
        return n === 0 && L8n(e, 0) == "-" ? -0 : n;
      }
    : w8,
  G8n = Di,
  ake = _re;
G8n(
  { target: "Number", stat: !0, forced: Number.parseFloat != ake },
  { parseFloat: ake }
);
var N8n = Di;
N8n(
  { target: "Number", stat: !0 },
  {
    isNaN: function (t) {
      return t != t;
    },
  }
);
var F8n = Di,
  U8n = sh.map,
  B8n = j5,
  H8n = B8n("map");
F8n(
  { target: "Array", proto: !0, forced: !H8n },
  {
    map: function (t) {
      return U8n(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var X8n = id,
  oke = $E,
  V8n = od,
  Ece = function (t) {
    for (
      var e = X8n(this),
        n = V8n(e),
        r = arguments.length,
        i = oke(r > 1 ? arguments[1] : void 0, n),
        o = r > 2 ? arguments[2] : void 0,
        l = o === void 0 ? n : oke(o, n);
      l > i;

    )
      e[i++] = t;
    return e;
  },
  z8n = Gs,
  j8n = CR,
  W8n = Cu.f,
  Tre = z8n("unscopables"),
  Ere = Array.prototype;
Ere[Tre] == null && W8n(Ere, Tre, { configurable: !0, value: j8n(null) });
var q5 = function (t) {
    Ere[Tre][t] = !0;
  },
  K8n = Di,
  Z8n = Ece,
  Y8n = q5;
K8n({ target: "Array", proto: !0 }, { fill: Z8n }), Y8n("fill");
var k8,
  Q8n =
    "data:video/webm;base64, ",
  J8n =
    "data:video/mp4;base64,  ",
  JK = function () {
    return (
      typeof navigator < "u" &&
      parseFloat(
        (
          "" +
          (/CPU.*OS ([0-9_]{3,4})[0-9_]{0,1}|(CPU like).*AppleWebKit.*Mobile/i.exec(
            navigator.userAgent
          ) || [0, ""])[1]
        )
          .replace("undefined", "3_2")
          .replace("_", ".")
          .replace("_", "")
      ) < 10 &&
      !window.MSStream
    );
  },
  qK = function () {
    return "wakeLock" in navigator;
  },
  q8n = (function () {
    function t() {
      var e = this;
      bl(this, t),
        (this.enabled = !1),
        qK()
          ? ((this._wakeLock = null),
            (this.handleVisibilityChange = function () {
              e._wakeLock !== null && e.visible && e.enable();
            }),
            document.addEventListener(
              "visibilitychange",
              this.handleVisibilityChange
            ),
            document.addEventListener(
              "fullscreenchange",
              this.handleVisibilityChange
            ))
          : JK()
          ? (this.noSleepTimer = null)
          : ((this.noSleepVideo = document.createElement("video")),
            this.noSleepVideo.setAttribute("playsinline", ""),
            this._addSourceToVideo(this.noSleepVideo, "mp4", J8n),
            this._addSourceToVideo(this.noSleepVideo, "webm", Q8n),
            this.noSleepVideo.addEventListener("loadedmetadata", function () {
              e.noSleepVideo &&
                (e.noSleepVideo.duration <= 1
                  ? e.noSleepVideo.setAttribute("loop", "")
                  : ((e.onTimeupdate = function () {
                      e.noSleepVideo.currentTime > 0.5 &&
                        (e.noSleepVideo.currentTime = Math.random());
                    }),
                    e.noSleepVideo.addEventListener(
                      "timeupdate",
                      e.onTimeupdate
                    )));
            }));
    }
    return (
      _l(t, [
        {
          key: "_addSourceToVideo",
          value: function (e, n, r) {
            var i = document.createElement("source");
            (i.src = r), (i.type = "video/".concat(n)), e.appendChild(i);
          },
        },
        {
          key: "visible",
          get: function () {
            return document.visibilityState === "visible";
          },
        },
        {
          key: "isEnabled",
          get: function () {
            return this.enabled;
          },
        },
        {
          key: "enable",
          value: function () {
            var e,
              n = this;
            if (qK() && this.visible)
              return navigator.wakeLock
                .request("screen")
                .then(function (i) {
                  (n._wakeLock = i),
                    (n.enabled = !0),
                    n._wakeLock.addEventListener("release", function () {});
                })
                .catch(function () {
                  n.enabled = !1;
                });
            if (JK())
              return (
                this.disable(),
                console.warn(`
        NoSleep enabled for older iOS devices. This can interrupt
        active or long-running network requests from completing successfully.
        See https://github.com/richtr/NoSleep.js/issues/15 for more details.
      `),
                (this.noSleepTimer = window.setInterval(function () {
                  document.hidden ||
                    ((window.location.href =
                      window.location.href.split("#")[0]),
                    window.setTimeout(window.stop, 0));
                }, 15e3)),
                (this.enabled = !0),
                Promise.resolve()
              );
            if ((e = this.noSleepVideo) !== null && e !== void 0 && e.paused) {
              var r = this.noSleepVideo.play();
              return (
                r &&
                r
                  .then(function (i) {
                    return (n.enabled = !0), i;
                  })
                  .catch(function (i) {
                    console.log("noSleep: ", i.message), (n.enabled = !1);
                  })
              );
            }
          },
        },
        {
          key: "disable",
          value: function () {
            qK()
              ? (this._wakeLock && this._wakeLock.release(),
                (this._wakeLock = null))
              : JK()
              ? this.noSleepTimer &&
                (console.warn(`
          NoSleep now disabled for older iOS devices.
        `),
                window.clearInterval(this.noSleepTimer),
                (this.noSleepTimer = null))
              : this.noSleepVideo.pause(),
              (this.enabled = !1);
          },
        },
        {
          key: "toPlay",
          value: function () {
            if (this.noSleepVideo && this.noSleepVideo.paused) {
              var e = performance.now();
              this.lastTs || (this.lastTs = e),
                e - this.lastTs > 1e4 && (this.enable(), (this.lastTs = e));
            }
          },
        },
        {
          key: "destroy",
          value: function () {
            this.disable(),
              this.handleVisibilityChange &&
                (document.removeEventListener(
                  "visibilitychange",
                  this.handleVisibilityChange
                ),
                document.removeEventListener(
                  "fullscreenchange",
                  this.handleVisibilityChange
                )),
              this.onTimeupdate &&
                this.noSleepVideo.removeEventListener(
                  "timeupdate",
                  this.onTimeupdate
                ),
              (this.noSleepVideo = null);
          },
        },
      ]),
      t
    );
  })();
function CKe() {
  if (!document.querySelector("#hackAudioPP")) {
    var t = document.createElement("div");
    (t.innerHTML = "<audio id='hackAudioPP'></audio>"),
      document.body.appendChild(t);
    var e = t.children.item(0);
    (e.controls = !1),
      (e.preload = "auto"),
      (e.innerHTML = "<source src=".concat(
        "data:audio/mpeg;base64,//uQxAAAAAAAAAAAAAAAAAAAAAAAWGluZwAAAA8AAAACAAACcQCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA//////////////////////////////////////////////////////////////////8AAABhTEFNRTMuMTAwA8MAAAAAAAAAABQgJAUHQQAB9AAAAnGMHkkIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//sQxAADgnABGiAAQBCqgCRMAAgEAH///////////////7+n/9FTuQsQH//////2NG0jWUGlio5gLQTOtIoeR2WX////X4s9Atb/JRVCbBUpeRUq//////////////////9RUi0f2jn/+xDECgPCjAEQAABN4AAANIAAAAQVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",
        ' type="audio/mpeg"></source>'
      )),
      (e.muted = !0),
      (e.loop = !0),
      e.play().catch(function () {});
  }
}
function $Ke() {
  var t = k8 || (k8 = document.querySelector("#hackAudioPP"));
  t
    ? (t.paused === !1 && t.muted === !1) ||
      ((t.muted = !1),
      t.play().catch(function (e) {
        console.log("bgAudio: ", e.message);
      }))
    : CKe();
}
function e9n() {
  var t = k8 || (k8 = document.querySelector("#hackAudioPP"));
  t && t.pause();
}
var $S,
  ske,
  lke,
  t9n = aa,
  xKe = !t9n(function () {
    function t() {}
    return (
      (t.prototype.constructor = null),
      Object.getPrototypeOf(new t()) !== t.prototype
    );
  }),
  n9n = pu,
  r9n = Ss,
  i9n = id,
  a9n = FB,
  o9n = xKe,
  uke = a9n("IE_PROTO"),
  Sre = Object,
  s9n = Sre.prototype,
  eO = o9n
    ? Sre.getPrototypeOf
    : function (t) {
        var e = i9n(t);
        if (n9n(e, uke)) return e[uke];
        var n = e.constructor;
        return r9n(n) && e instanceof n
          ? n.prototype
          : e instanceof Sre
          ? s9n
          : null;
      },
  l9n = aa,
  u9n = Ss,
  c9n = $u,
  cke = eO,
  d9n = ad,
  h9n = Gs,
  Rre = h9n("iterator"),
  LKe = !1;
[].keys &&
  ("next" in (lke = [].keys())
    ? (ske = cke(cke(lke))) !== Object.prototype && ($S = ske)
    : (LKe = !0));
var f9n =
  !c9n($S) ||
  l9n(function () {
    var t = {};
    return $S[Rre].call(t) !== t;
  });
f9n && ($S = {}),
  u9n($S[Rre]) ||
    d9n($S, Rre, function () {
      return this;
    });
var OKe = { IteratorPrototype: $S, BUGGY_SAFARI_ITERATORS: LKe },
  p9n = OKe.IteratorPrototype,
  g9n = CR,
  m9n = MR,
  y9n = LE,
  v9n = Q5,
  b9n = function () {
    return this;
  },
  GKe = function (t, e, n, r) {
    var i = e + " Iterator";
    return (
      (t.prototype = g9n(p9n, { next: m9n(+!r, n) })),
      y9n(t, i, !1),
      (v9n[i] = b9n),
      t
    );
  },
  _9n = Di,
  T9n = zs,
  NKe = FD,
  E9n = Ss,
  S9n = GKe,
  dke = eO,
  hke = HD,
  R9n = LE,
  A9n = Rb,
  eZ = ad,
  w9n = Gs,
  k9n = Q5,
  FKe = OKe,
  I9n = NKe.PROPER,
  D9n = NKe.CONFIGURABLE,
  fke = FKe.IteratorPrototype,
  D4 = FKe.BUGGY_SAFARI_ITERATORS,
  vM = w9n("iterator"),
  pke = "keys",
  bM = "values",
  gke = "entries",
  P9n = function () {
    return this;
  },
  Sce = function (t, e, n, r, i, o, l) {
    S9n(n, e, r);
    var u,
      c,
      d,
      h = function (w) {
        if (w === i && v) return v;
        if (!D4 && w in g) return g[w];
        switch (w) {
          case pke:
          case bM:
          case gke:
            return function () {
              return new n(this, w);
            };
        }
        return function () {
          return new n(this);
        };
      },
      f = e + " Iterator",
      p = !1,
      g = t.prototype,
      y = g[vM] || g["@@iterator"] || (i && g[i]),
      v = (!D4 && y) || h(i),
      b = (e == "Array" && g.entries) || y;
    if (
      (b &&
        (u = dke(b.call(new t()))) !== Object.prototype &&
        u.next &&
        (dke(u) !== fke && (hke ? hke(u, fke) : E9n(u[vM]) || eZ(u, vM, P9n)),
        R9n(u, f, !0)),
      I9n &&
        i == bM &&
        y &&
        y.name !== bM &&
        (D9n
          ? A9n(g, "name", bM)
          : ((p = !0),
            (v = function () {
              return T9n(y, this);
            }))),
      i)
    )
      if (((c = { values: h(bM), keys: o ? v : h(pke), entries: h(gke) }), l))
        for (d in c) (D4 || p || !(d in g)) && eZ(g, d, c[d]);
      else _9n({ target: e, proto: !0, forced: D4 || p }, c);
    return g[vM] !== v && eZ(g, vM, v, { name: i }), (k9n[e] = v), c;
  },
  Rce = function (t, e) {
    return { value: t, done: e };
  },
  M9n = Sm,
  tZ = q5,
  mke = Q5,
  UKe = Tm,
  C9n = Cu.f,
  $9n = Sce,
  yke = Rce,
  x9n = Tl,
  BKe = "Array Iterator",
  L9n = UKe.set,
  O9n = UKe.getterFor(BKe),
  HKe = $9n(
    Array,
    "Array",
    function (t, e) {
      L9n(this, { type: BKe, target: M9n(t), index: 0, kind: e });
    },
    function () {
      var t = O9n(this),
        e = t.target,
        n = t.kind,
        r = t.index++;
      return !e || r >= e.length
        ? ((t.target = void 0), yke(void 0, !0))
        : yke(n == "keys" ? r : n == "values" ? e[r] : [r, e[r]], !1);
    },
    "values"
  ),
  vke = (mke.Arguments = mke.Array);
if ((tZ("keys"), tZ("values"), tZ("entries"), x9n && vke.name !== "values"))
  try {
    C9n(vke, "name", { value: "values" });
  } catch {}
var $f,
  hI,
  I8,
  Are = { exports: {} },
  XKe = typeof ArrayBuffer < "u" && typeof DataView < "u",
  G9n = XKe,
  Ace = Tl,
  Fh = ja,
  VKe = Ss,
  JB = $u,
  cE = pu,
  wce = wb,
  N9n = PR,
  F9n = Rb,
  wre = ad,
  U9n = Cu.f,
  B9n = Sb,
  qB = eO,
  VD = HD,
  H9n = Gs,
  X9n = O5,
  zKe = Tm,
  jKe = zKe.enforce,
  V9n = zKe.get,
  D8 = Fh.Int8Array,
  kre = D8 && D8.prototype,
  bke = Fh.Uint8ClampedArray,
  _ke = bke && bke.prototype,
  cv = D8 && qB(D8),
  k0 = kre && qB(kre),
  z9n = Object.prototype,
  kce = Fh.TypeError,
  Tke = H9n("toStringTag"),
  Ire = X9n("TYPED_ARRAY_TAG"),
  P8 = "TypedArrayConstructor",
  q1 = G9n && !!VD && wce(Fh.opera) !== "Opera",
  WKe = !1,
  eb = {
    Int8Array: 1,
    Uint8Array: 1,
    Uint8ClampedArray: 1,
    Int16Array: 2,
    Uint16Array: 2,
    Int32Array: 4,
    Uint32Array: 4,
    Float32Array: 4,
    Float64Array: 8,
  },
  Ice = { BigInt64Array: 8, BigUint64Array: 8 },
  j9n = function (t) {
    if (!JB(t)) return !1;
    var e = wce(t);
    return e === "DataView" || cE(eb, e) || cE(Ice, e);
  },
  KKe = function (t) {
    var e = qB(t);
    if (JB(e)) {
      var n = V9n(e);
      return n && cE(n, P8) ? n[P8] : KKe(e);
    }
  },
  ZKe = function (t) {
    if (!JB(t)) return !1;
    var e = wce(t);
    return cE(eb, e) || cE(Ice, e);
  },
  W9n = function (t) {
    if (ZKe(t)) return t;
    throw kce("Target is not a typed array");
  },
  K9n = function (t) {
    if (VKe(t) && (!VD || B9n(cv, t))) return t;
    throw kce(N9n(t) + " is not a typed array constructor");
  },
  Z9n = function (t, e, n, r) {
    if (Ace) {
      if (n)
        for (var i in eb) {
          var o = Fh[i];
          if (o && cE(o.prototype, t))
            try {
              delete o.prototype[t];
            } catch {
              try {
                o.prototype[t] = e;
              } catch {}
            }
        }
      (k0[t] && !n) || wre(k0, t, n ? e : (q1 && kre[t]) || e, r);
    }
  },
  Y9n = function (t, e, n) {
    var r, i;
    if (Ace) {
      if (VD) {
        if (n) {
          for (r in eb)
            if ((i = Fh[r]) && cE(i, t))
              try {
                delete i[t];
              } catch {}
        }
        if (cv[t] && !n) return;
        try {
          return wre(cv, t, n ? e : (q1 && cv[t]) || e);
        } catch {}
      }
      for (r in eb) !(i = Fh[r]) || (i[t] && !n) || wre(i, t, e);
    }
  };
for ($f in eb)
  (I8 = (hI = Fh[$f]) && hI.prototype) ? (jKe(I8)[P8] = hI) : (q1 = !1);
for ($f in Ice) (I8 = (hI = Fh[$f]) && hI.prototype) && (jKe(I8)[P8] = hI);
if (
  (!q1 || !VKe(cv) || cv === Function.prototype) &&
  ((cv = function () {
    throw kce("Incorrect invocation");
  }),
  q1)
)
  for ($f in eb) Fh[$f] && VD(Fh[$f], cv);
if ((!q1 || !k0 || k0 === z9n) && ((k0 = cv.prototype), q1))
  for ($f in eb) Fh[$f] && VD(Fh[$f].prototype, k0);
if ((q1 && qB(_ke) !== k0 && VD(_ke, k0), Ace && !cE(k0, Tke)))
  for ($f in ((WKe = !0),
  U9n(k0, Tke, {
    get: function () {
      return JB(this) ? this[Ire] : void 0;
    },
  }),
  eb))
    Fh[$f] && F9n(Fh[$f], Ire, $f);
var Rs = {
    NATIVE_ARRAY_BUFFER_VIEWS: q1,
    TYPED_ARRAY_TAG: WKe && Ire,
    aTypedArray: W9n,
    aTypedArrayConstructor: K9n,
    exportTypedArrayMethod: Z9n,
    exportTypedArrayStaticMethod: Y9n,
    getTypedArrayConstructor: KKe,
    isView: j9n,
    isTypedArray: ZKe,
    TypedArray: cv,
    TypedArrayPrototype: k0,
  },
  YKe = ja,
  nZ = aa,
  Q9n = ZB,
  J9n = Rs.NATIVE_ARRAY_BUFFER_VIEWS,
  q9n = YKe.ArrayBuffer,
  L2 = YKe.Int8Array,
  QKe =
    !J9n ||
    !nZ(function () {
      L2(1);
    }) ||
    !nZ(function () {
      new L2(-1);
    }) ||
    !Q9n(function (t) {
      new L2(), new L2(null), new L2(1.5), new L2(t);
    }, !0) ||
    nZ(function () {
      return new L2(new q9n(2), 1, void 0).length !== 1;
    }),
  eBn = ad,
  Dce = function (t, e, n) {
    for (var r in e) eBn(t, r, e[r], n);
    return t;
  },
  tBn = Em,
  nBn = B0,
  rBn = RangeError,
  JKe = function (t) {
    if (t === void 0) return 0;
    var e = tBn(t),
      n = nBn(e);
    if (e !== n) throw rBn("Wrong length or index");
    return n;
  },
  iBn = Array,
  aBn = Math.abs,
  E1 = Math.pow,
  oBn = Math.floor,
  sBn = Math.log,
  lBn = Math.LN2,
  uBn = function (t, e, n) {
    var r,
      i,
      o,
      l = iBn(n),
      u = 8 * n - e - 1,
      c = (1 << u) - 1,
      d = c >> 1,
      h = e === 23 ? E1(2, -24) - E1(2, -77) : 0,
      f = t < 0 || (t === 0 && 1 / t < 0) ? 1 : 0,
      p = 0;
    for (
      (t = aBn(t)) != t || t === 1 / 0
        ? ((i = t != t ? 1 : 0), (r = c))
        : ((r = oBn(sBn(t) / lBn)),
          t * (o = E1(2, -r)) < 1 && (r--, (o *= 2)),
          (t += r + d >= 1 ? h / o : h * E1(2, 1 - d)) * o >= 2 &&
            (r++, (o /= 2)),
          r + d >= c
            ? ((i = 0), (r = c))
            : r + d >= 1
            ? ((i = (t * o - 1) * E1(2, e)), (r += d))
            : ((i = t * E1(2, d - 1) * E1(2, e)), (r = 0)));
      e >= 8;

    )
      (l[p++] = 255 & i), (i /= 256), (e -= 8);
    for (r = (r << e) | i, u += e; u > 0; )
      (l[p++] = 255 & r), (r /= 256), (u -= 8);
    return (l[--p] |= 128 * f), l;
  },
  cBn = function (t, e) {
    var n,
      r = t.length,
      i = 8 * r - e - 1,
      o = (1 << i) - 1,
      l = o >> 1,
      u = i - 7,
      c = r - 1,
      d = t[c--],
      h = 127 & d;
    for (d >>= 7; u > 0; ) (h = 256 * h + t[c--]), (u -= 8);
    for (n = h & ((1 << -u) - 1), h >>= -u, u += e; u > 0; )
      (n = 256 * n + t[c--]), (u -= 8);
    if (h === 0) h = 1 - l;
    else {
      if (h === o) return n ? NaN : d ? -1 / 0 : 1 / 0;
      (n += E1(2, e)), (h -= l);
    }
    return (d ? -1 : 1) * n * E1(2, h - e);
  },
  dBn = { pack: uBn, unpack: cBn },
  eH = ja,
  Pce = Fa,
  rZ = Tl,
  hBn = XKe,
  qKe = FD,
  Eke = Rb,
  Ske = Dce,
  iZ = aa,
  P4 = $R,
  fBn = Em,
  pBn = B0,
  M8 = JKe,
  eZe = dBn,
  gBn = eO,
  Rke = HD,
  mBn = CE.f,
  yBn = Cu.f,
  vBn = Ece,
  bBn = V5,
  Ake = LE,
  tZe = Tm,
  _Bn = qKe.PROPER,
  wke = qKe.CONFIGURABLE,
  oD = tZe.get,
  kke = tZe.set,
  C8 = "ArrayBuffer",
  nZe = "DataView",
  fI = "prototype",
  TBn = "Wrong length",
  rZe = "Wrong index",
  Fg = eH[C8],
  h0 = Fg,
  dw = h0 && h0[fI],
  $1 = eH[nZe],
  O2 = $1 && $1[fI],
  Ike = Object.prototype,
  EBn = eH.Array,
  $8 = eH.RangeError,
  SBn = Pce(vBn),
  RBn = Pce([].reverse),
  iZe = eZe.pack,
  Dke = eZe.unpack,
  Pke = function (t) {
    return [255 & t];
  },
  Mke = function (t) {
    return [255 & t, (t >> 8) & 255];
  },
  Cke = function (t) {
    return [255 & t, (t >> 8) & 255, (t >> 16) & 255, (t >> 24) & 255];
  },
  $ke = function (t) {
    return (t[3] << 24) | (t[2] << 16) | (t[1] << 8) | t[0];
  },
  ABn = function (t) {
    return iZe(t, 23, 4);
  },
  wBn = function (t) {
    return iZe(t, 52, 8);
  },
  M4 = function (t, e) {
    yBn(t[fI], e, {
      get: function () {
        return oD(this)[e];
      },
    });
  },
  q_ = function (t, e, n, r) {
    var i = M8(n),
      o = oD(t);
    if (i + e > o.byteLength) throw $8(rZe);
    var l = oD(o.buffer).bytes,
      u = i + o.byteOffset,
      c = bBn(l, u, u + e);
    return r ? c : RBn(c);
  },
  eT = function (t, e, n, r, i, o) {
    var l = M8(n),
      u = oD(t);
    if (l + e > u.byteLength) throw $8(rZe);
    for (
      var c = oD(u.buffer).bytes, d = l + u.byteOffset, h = r(+i), f = 0;
      f < e;
      f++
    )
      c[d + f] = h[o ? f : e - f - 1];
  };
if (hBn) {
  var xke = _Bn && Fg.name !== C8;
  if (
    iZ(function () {
      Fg(1);
    }) &&
    iZ(function () {
      new Fg(-1);
    }) &&
    !iZ(function () {
      return (
        new Fg(), new Fg(1.5), new Fg(NaN), Fg.length != 1 || (xke && !wke)
      );
    })
  )
    xke && wke && Eke(Fg, "name", C8);
  else {
    (h0 = function (t) {
      return P4(this, dw), new Fg(M8(t));
    })[fI] = dw;
    for (var aZ, Lke = mBn(Fg), Oke = 0; Lke.length > Oke; )
      (aZ = Lke[Oke++]) in h0 || Eke(h0, aZ, Fg[aZ]);
    dw.constructor = h0;
  }
  Rke && gBn(O2) !== Ike && Rke(O2, Ike);
  var C4 = new $1(new h0(2)),
    Gke = Pce(O2.setInt8);
  C4.setInt8(0, 2147483648),
    C4.setInt8(1, 2147483649),
    (!C4.getInt8(0) && C4.getInt8(1)) ||
      Ske(
        O2,
        {
          setInt8: function (t, e) {
            Gke(this, t, (e << 24) >> 24);
          },
          setUint8: function (t, e) {
            Gke(this, t, (e << 24) >> 24);
          },
        },
        { unsafe: !0 }
      );
} else
  (dw = (h0 = function (t) {
    P4(this, dw);
    var e = M8(t);
    kke(this, { bytes: SBn(EBn(e), 0), byteLength: e }),
      rZ || (this.byteLength = e);
  })[fI]),
    (O2 = ($1 = function (t, e, n) {
      P4(this, O2), P4(t, dw);
      var r = oD(t).byteLength,
        i = fBn(e);
      if (i < 0 || i > r) throw $8("Wrong offset");
      if (i + (n = n === void 0 ? r - i : pBn(n)) > r) throw $8(TBn);
      kke(this, { buffer: t, byteLength: n, byteOffset: i }),
        rZ || ((this.buffer = t), (this.byteLength = n), (this.byteOffset = i));
    })[fI]),
    rZ &&
      (M4(h0, "byteLength"),
      M4($1, "buffer"),
      M4($1, "byteLength"),
      M4($1, "byteOffset")),
    Ske(O2, {
      getInt8: function (t) {
        return (q_(this, 1, t)[0] << 24) >> 24;
      },
      getUint8: function (t) {
        return q_(this, 1, t)[0];
      },
      getInt16: function (t) {
        var e = q_(this, 2, t, arguments.length > 1 ? arguments[1] : void 0);
        return (((e[1] << 8) | e[0]) << 16) >> 16;
      },
      getUint16: function (t) {
        var e = q_(this, 2, t, arguments.length > 1 ? arguments[1] : void 0);
        return (e[1] << 8) | e[0];
      },
      getInt32: function (t) {
        return $ke(
          q_(this, 4, t, arguments.length > 1 ? arguments[1] : void 0)
        );
      },
      getUint32: function (t) {
        return (
          $ke(q_(this, 4, t, arguments.length > 1 ? arguments[1] : void 0)) >>>
          0
        );
      },
      getFloat32: function (t) {
        return Dke(
          q_(this, 4, t, arguments.length > 1 ? arguments[1] : void 0),
          23
        );
      },
      getFloat64: function (t) {
        return Dke(
          q_(this, 8, t, arguments.length > 1 ? arguments[1] : void 0),
          52
        );
      },
      setInt8: function (t, e) {
        eT(this, 1, t, Pke, e);
      },
      setUint8: function (t, e) {
        eT(this, 1, t, Pke, e);
      },
      setInt16: function (t, e) {
        eT(this, 2, t, Mke, e, arguments.length > 2 ? arguments[2] : void 0);
      },
      setUint16: function (t, e) {
        eT(this, 2, t, Mke, e, arguments.length > 2 ? arguments[2] : void 0);
      },
      setInt32: function (t, e) {
        eT(this, 4, t, Cke, e, arguments.length > 2 ? arguments[2] : void 0);
      },
      setUint32: function (t, e) {
        eT(this, 4, t, Cke, e, arguments.length > 2 ? arguments[2] : void 0);
      },
      setFloat32: function (t, e) {
        eT(this, 4, t, ABn, e, arguments.length > 2 ? arguments[2] : void 0);
      },
      setFloat64: function (t, e) {
        eT(this, 8, t, wBn, e, arguments.length > 2 ? arguments[2] : void 0);
      },
    });
Ake(h0, C8), Ake($1, nZe);
var Mce = { ArrayBuffer: h0, DataView: $1 },
  kBn = $u,
  IBn = Math.floor,
  DBn =
    Number.isInteger ||
    function (t) {
      return !kBn(t) && isFinite(t) && IBn(t) === t;
    },
  PBn = Em,
  MBn = RangeError,
  CBn = function (t) {
    var e = PBn(t);
    if (e < 0) throw MBn("The argument can't be less than 0");
    return e;
  },
  $Bn = CBn,
  xBn = RangeError,
  aZe = function (t, e) {
    var n = $Bn(t);
    if (n % e) throw xBn("Wrong offset");
    return n;
  },
  LBn = wb,
  OBn = Fa,
  GBn = OBn("".slice),
  NBn = function (t) {
    return GBn(LBn(t), 0, 3) === "Big";
  },
  FBn = Yue,
  UBn = TypeError,
  oZe = function (t) {
    var e = FBn(t, "number");
    if (typeof e == "number") throw UBn("Can't convert number to bigint");
    return BigInt(e);
  },
  BBn = Av,
  HBn = zs,
  XBn = tKe,
  VBn = id,
  zBn = od,
  jBn = WB,
  WBn = J5,
  KBn = bce,
  ZBn = NBn,
  YBn = Rs.aTypedArrayConstructor,
  QBn = oZe,
  JBn = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c,
      d = XBn(this),
      h = VBn(t),
      f = arguments.length,
      p = f > 1 ? arguments[1] : void 0,
      g = p !== void 0,
      y = WBn(h);
    if (y && !KBn(y))
      for (c = (u = jBn(h, y)).next, h = []; !(l = HBn(c, u)).done; )
        h.push(l.value);
    for (
      g && f > 2 && (p = BBn(p, arguments[2])),
        n = zBn(h),
        r = new (YBn(d))(n),
        i = ZBn(r),
        e = 0;
      n > e;
      e++
    )
      (o = g ? p(h[e], e) : h[e]), (r[e] = i ? QBn(o) : +o);
    return r;
  },
  Nke = Di,
  sZe = ja,
  Fke = zs,
  qBn = Tl,
  eHn = QKe,
  zD = Rs,
  lZe = Mce,
  Uke = $R,
  tHn = MR,
  _M = Rb,
  nHn = DBn,
  rHn = B0,
  Bke = JKe,
  oZ = aZe,
  uZe = G5,
  TM = pu,
  iHn = wb,
  Dre = $u,
  aHn = GD,
  oHn = CR,
  sHn = Sb,
  $4 = HD,
  lHn = CE.f,
  Hke = JBn,
  uHn = sh.forEach,
  cHn = zB,
  cZe = Cu,
  dZe = kb,
  Cce = Tm,
  dHn = _ce,
  Pre = Cce.get,
  hHn = Cce.set,
  fHn = Cce.enforce,
  $ce = cZe.f,
  pHn = dZe.f,
  gHn = Math.round,
  sZ = sZe.RangeError,
  hZe = lZe.ArrayBuffer,
  mHn = hZe.prototype,
  yHn = lZe.DataView,
  x4 = zD.NATIVE_ARRAY_BUFFER_VIEWS,
  Xke = zD.TYPED_ARRAY_TAG,
  Vke = zD.TypedArray,
  EM = zD.TypedArrayPrototype,
  vHn = zD.aTypedArrayConstructor,
  Mre = zD.isTypedArray,
  L4 = "BYTES_PER_ELEMENT",
  lZ = "Wrong length",
  zke = function (t, e) {
    vHn(t);
    for (var n = 0, r = e.length, i = new t(r); r > n; ) i[n] = e[n++];
    return i;
  },
  O4 = function (t, e) {
    $ce(t, e, {
      get: function () {
        return Pre(this)[e];
      },
    });
  },
  jke = function (t) {
    var e;
    return (
      sHn(mHn, t) || (e = iHn(t)) == "ArrayBuffer" || e == "SharedArrayBuffer"
    );
  },
  fZe = function (t, e) {
    return Mre(t) && !aHn(e) && e in t && nHn(+e) && e >= 0;
  },
  Wke = function (t, e) {
    return (e = uZe(e)), fZe(t, e) ? tHn(2, t[e]) : pHn(t, e);
  },
  Kke = function (t, e, n) {
    return (
      (e = uZe(e)),
      !(fZe(t, e) && Dre(n) && TM(n, "value")) ||
      TM(n, "get") ||
      TM(n, "set") ||
      n.configurable ||
      (TM(n, "writable") && !n.writable) ||
      (TM(n, "enumerable") && !n.enumerable)
        ? $ce(t, e, n)
        : ((t[e] = n.value), t)
    );
  };
qBn
  ? (x4 ||
      ((dZe.f = Wke),
      (cZe.f = Kke),
      O4(EM, "buffer"),
      O4(EM, "byteOffset"),
      O4(EM, "byteLength"),
      O4(EM, "length")),
    Nke(
      { target: "Object", stat: !0, forced: !x4 },
      { getOwnPropertyDescriptor: Wke, defineProperty: Kke }
    ),
    (Are.exports = function (t, e, n) {
      var r = t.match(/\d+$/)[0] / 8,
        i = t + (n ? "Clamped" : "") + "Array",
        o = "get" + t,
        l = "set" + t,
        u = sZe[i],
        c = u,
        d = c && c.prototype,
        h = {},
        f = function (g, y) {
          $ce(g, y, {
            get: function () {
              return (function (v, b) {
                var w = Pre(v);
                return w.view[o](b * r + w.byteOffset, !0);
              })(this, y);
            },
            set: function (v) {
              return (function (b, w, k) {
                var D = Pre(b);
                n && (k = (k = gHn(k)) < 0 ? 0 : k > 255 ? 255 : 255 & k),
                  D.view[l](w * r + D.byteOffset, k, !0);
              })(this, y, v);
            },
            enumerable: !0,
          });
        };
      x4
        ? eHn &&
          ((c = e(function (g, y, v, b) {
            return (
              Uke(g, d),
              dHn(
                Dre(y)
                  ? jke(y)
                    ? b !== void 0
                      ? new u(y, oZ(v, r), b)
                      : v !== void 0
                      ? new u(y, oZ(v, r))
                      : new u(y)
                    : Mre(y)
                    ? zke(c, y)
                    : Fke(Hke, c, y)
                  : new u(Bke(y)),
                g,
                c
              )
            );
          })),
          $4 && $4(c, Vke),
          uHn(lHn(u), function (g) {
            g in c || _M(c, g, u[g]);
          }),
          (c.prototype = d))
        : ((c = e(function (g, y, v, b) {
            Uke(g, d);
            var w,
              k,
              D,
              $ = 0,
              N = 0;
            if (Dre(y)) {
              if (!jke(y)) return Mre(y) ? zke(c, y) : Fke(Hke, c, y);
              (w = y), (N = oZ(v, r));
              var P = y.byteLength;
              if (b === void 0) {
                if (P % r || (k = P - N) < 0) throw sZ(lZ);
              } else if ((k = rHn(b) * r) + N > P) throw sZ(lZ);
              D = k / r;
            } else (D = Bke(y)), (w = new hZe((k = D * r)));
            for (
              hHn(g, {
                buffer: w,
                byteOffset: N,
                byteLength: k,
                length: D,
                view: new yHn(w),
              });
              $ < D;

            )
              f(g, $++);
          })),
          $4 && $4(c, Vke),
          (d = c.prototype = oHn(EM))),
        d.constructor !== c && _M(d, "constructor", c),
        (fHn(d).TypedArrayConstructor = c),
        Xke && _M(d, Xke, i);
      var p = c != u;
      (h[i] = c),
        Nke({ global: !0, constructor: !0, forced: p, sham: !x4 }, h),
        L4 in c || _M(c, L4, r),
        L4 in d || _M(d, L4, r),
        cHn(i);
    }))
  : (Are.exports = function () {});
var OE = Are.exports,
  bHn = OE;
bHn("Uint8", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var pZe = Rs,
  _Hn = od,
  THn = Em,
  EHn = pZe.aTypedArray,
  SHn = pZe.exportTypedArrayMethod;
SHn("at", function (t) {
  var e = EHn(this),
    n = _Hn(e),
    r = THn(t),
    i = r >= 0 ? r : n + r;
  return i < 0 || i >= n ? void 0 : e[i];
});
var Zke = PR,
  RHn = TypeError,
  xce = function (t, e) {
    if (!delete t[e])
      throw RHn("Cannot delete property " + Zke(e) + " of " + Zke(t));
  },
  AHn = id,
  uZ = $E,
  wHn = od,
  kHn = xce,
  IHn = Math.min,
  DHn =
    [].copyWithin ||
    function (t, e) {
      var n = AHn(this),
        r = wHn(n),
        i = uZ(t, r),
        o = uZ(e, r),
        l = arguments.length > 2 ? arguments[2] : void 0,
        u = IHn((l === void 0 ? r : uZ(l, r)) - o, r - i),
        c = 1;
      for (
        o < i && i < o + u && ((c = -1), (o += u - 1), (i += u - 1));
        u-- > 0;

      )
        o in n ? (n[i] = n[o]) : kHn(n, i), (i += c), (o += c);
      return n;
    },
  PHn = Fa,
  gZe = Rs,
  MHn = DHn,
  CHn = PHn(MHn),
  $Hn = gZe.aTypedArray,
  xHn = gZe.exportTypedArrayMethod;
xHn("copyWithin", function (t, e) {
  return CHn($Hn(this), t, e, arguments.length > 2 ? arguments[2] : void 0);
});
var mZe = Rs,
  LHn = sh.every,
  OHn = mZe.aTypedArray,
  GHn = mZe.exportTypedArrayMethod;
GHn("every", function (t) {
  return LHn(OHn(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var yZe = Rs,
  NHn = Ece,
  FHn = oZe,
  UHn = wb,
  BHn = zs,
  HHn = Fa,
  XHn = aa,
  VHn = yZe.aTypedArray,
  zHn = yZe.exportTypedArrayMethod,
  jHn = HHn("".slice),
  WHn = XHn(function () {
    var t = 0;
    return (
      new Int8Array(2).fill({
        valueOf: function () {
          return t++;
        },
      }),
      t !== 1
    );
  });
zHn(
  "fill",
  function (t) {
    var e = arguments.length;
    VHn(this);
    var n = jHn(UHn(this), 0, 3) === "Big" ? FHn(t) : +t;
    return BHn(
      NHn,
      this,
      n,
      e > 1 ? arguments[1] : void 0,
      e > 2 ? arguments[2] : void 0
    );
  },
  WHn
);
var KHn = od,
  ZHn = function (t, e) {
    for (var n = 0, r = KHn(e), i = new t(r); r > n; ) i[n] = e[n++];
    return i;
  },
  vZe = Rs,
  YHn = K5,
  QHn = vZe.aTypedArrayConstructor,
  JHn = vZe.getTypedArrayConstructor,
  tH = function (t) {
    return QHn(YHn(t, JHn(t)));
  },
  qHn = ZHn,
  e7n = tH,
  t7n = function (t, e) {
    return qHn(e7n(t), e);
  },
  bZe = Rs,
  n7n = sh.filter,
  r7n = t7n,
  i7n = bZe.aTypedArray,
  a7n = bZe.exportTypedArrayMethod;
a7n("filter", function (t) {
  var e = n7n(i7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
  return r7n(this, e);
});
var _Ze = Rs,
  o7n = sh.find,
  s7n = _Ze.aTypedArray,
  l7n = _Ze.exportTypedArrayMethod;
l7n("find", function (t) {
  return o7n(s7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var TZe = Rs,
  u7n = sh.findIndex,
  c7n = TZe.aTypedArray,
  d7n = TZe.exportTypedArrayMethod;
d7n("findIndex", function (t) {
  return u7n(c7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var h7n = Av,
  f7n = UD,
  p7n = id,
  g7n = od,
  Yke = function (t) {
    var e = t == 1;
    return function (n, r, i) {
      for (var o, l = p7n(n), u = f7n(l), c = h7n(r, i), d = g7n(u); d-- > 0; )
        if (c((o = u[d]), d, l))
          switch (t) {
            case 0:
              return o;
            case 1:
              return d;
          }
      return e ? -1 : void 0;
    };
  },
  EZe = { findLast: Yke(0), findLastIndex: Yke(1) },
  SZe = Rs,
  m7n = EZe.findLast,
  y7n = SZe.aTypedArray,
  v7n = SZe.exportTypedArrayMethod;
v7n("findLast", function (t) {
  return m7n(y7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var RZe = Rs,
  b7n = EZe.findLastIndex,
  _7n = RZe.aTypedArray,
  T7n = RZe.exportTypedArrayMethod;
T7n("findLastIndex", function (t) {
  return b7n(_7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var AZe = Rs,
  E7n = sh.forEach,
  S7n = AZe.aTypedArray,
  R7n = AZe.exportTypedArrayMethod;
R7n("forEach", function (t) {
  E7n(S7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var wZe = Rs,
  A7n = U5.includes,
  w7n = wZe.aTypedArray,
  k7n = wZe.exportTypedArrayMethod;
k7n("includes", function (t) {
  return A7n(w7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var kZe = Rs,
  I7n = U5.indexOf,
  D7n = kZe.aTypedArray,
  P7n = kZe.exportTypedArrayMethod;
P7n("indexOf", function (t) {
  return I7n(D7n(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var M7n = ja,
  C7n = aa,
  Lce = Fa,
  IZe = Rs,
  Oce = HKe,
  $7n = Gs,
  Gce = $7n("iterator"),
  Qke = M7n.Uint8Array,
  x7n = Lce(Oce.values),
  L7n = Lce(Oce.keys),
  O7n = Lce(Oce.entries),
  Cre = IZe.aTypedArray,
  G4 = IZe.exportTypedArrayMethod,
  ek = Qke && Qke.prototype,
  N4 = !C7n(function () {
    ek[Gce].call([1]);
  }),
  Jke =
    !!ek && ek.values && ek[Gce] === ek.values && ek.values.name === "values",
  qke = function () {
    return x7n(Cre(this));
  };
G4(
  "entries",
  function () {
    return O7n(Cre(this));
  },
  N4
),
  G4(
    "keys",
    function () {
      return L7n(Cre(this));
    },
    N4
  ),
  G4("values", qke, N4 || !Jke, { name: "values" }),
  G4(Gce, qke, N4 || !Jke, { name: "values" });
var DZe = Rs,
  G7n = Fa,
  N7n = DZe.aTypedArray,
  F7n = DZe.exportTypedArrayMethod,
  U7n = G7n([].join);
F7n("join", function (t) {
  return U7n(N7n(this), t);
});
var B7n = xE,
  H7n = Sm,
  X7n = Em,
  V7n = od,
  z7n = ME,
  j7n = Math.min,
  $re = [].lastIndexOf,
  PZe = !!$re && 1 / [1].lastIndexOf(1, -0) < 0,
  W7n = z7n("lastIndexOf"),
  K7n = PZe || !W7n,
  xre = K7n
    ? function (t) {
        if (PZe) return B7n($re, this, arguments) || 0;
        var e = H7n(this),
          n = V7n(e),
          r = n - 1;
        for (
          arguments.length > 1 && (r = j7n(r, X7n(arguments[1]))),
            r < 0 && (r = n + r);
          r >= 0;
          r--
        )
          if (r in e && e[r] === t) return r || 0;
        return -1;
      }
    : $re,
  MZe = Rs,
  Z7n = xE,
  Y7n = xre,
  Q7n = MZe.aTypedArray,
  J7n = MZe.exportTypedArrayMethod;
J7n("lastIndexOf", function (t) {
  var e = arguments.length;
  return Z7n(Y7n, Q7n(this), e > 1 ? [t, arguments[1]] : [t]);
});
var CZe = Rs,
  q7n = sh.map,
  eXn = tH,
  tXn = CZe.aTypedArray,
  nXn = CZe.exportTypedArrayMethod;
nXn("map", function (t) {
  return q7n(
    tXn(this),
    t,
    arguments.length > 1 ? arguments[1] : void 0,
    function (e, n) {
      return new (eXn(e))(n);
    }
  );
});
var rXn = U0,
  iXn = id,
  aXn = UD,
  oXn = od,
  sXn = TypeError,
  eIe = function (t) {
    return function (e, n, r, i) {
      rXn(n);
      var o = iXn(e),
        l = aXn(o),
        u = oXn(o),
        c = t ? u - 1 : 0,
        d = t ? -1 : 1;
      if (r < 2)
        for (;;) {
          if (c in l) {
            (i = l[c]), (c += d);
            break;
          }
          if (((c += d), t ? c < 0 : u <= c))
            throw sXn("Reduce of empty array with no initial value");
        }
      for (; t ? c >= 0 : u > c; c += d) c in l && (i = n(i, l[c], c, o));
      return i;
    };
  },
  Nce = { left: eIe(!1), right: eIe(!0) },
  $Ze = Rs,
  lXn = Nce.left,
  uXn = $Ze.aTypedArray,
  cXn = $Ze.exportTypedArrayMethod;
cXn("reduce", function (t) {
  var e = arguments.length;
  return lXn(uXn(this), t, e, e > 1 ? arguments[1] : void 0);
});
var xZe = Rs,
  dXn = Nce.right,
  hXn = xZe.aTypedArray,
  fXn = xZe.exportTypedArrayMethod;
fXn("reduceRight", function (t) {
  var e = arguments.length;
  return dXn(hXn(this), t, e, e > 1 ? arguments[1] : void 0);
});
var LZe = Rs,
  pXn = LZe.aTypedArray,
  gXn = LZe.exportTypedArrayMethod,
  mXn = Math.floor;
gXn("reverse", function () {
  for (var t, e = this, n = pXn(e).length, r = mXn(n / 2), i = 0; i < r; )
    (t = e[i]), (e[i++] = e[--n]), (e[n] = t);
  return e;
});
var OZe = ja,
  GZe = zs,
  Fce = Rs,
  yXn = od,
  vXn = aZe,
  bXn = id,
  NZe = aa,
  _Xn = OZe.RangeError,
  Lre = OZe.Int8Array,
  tIe = Lre && Lre.prototype,
  FZe = tIe && tIe.set,
  TXn = Fce.aTypedArray,
  EXn = Fce.exportTypedArrayMethod,
  Ore = !NZe(function () {
    var t = new Uint8ClampedArray(2);
    return GZe(FZe, t, { length: 1, 0: 3 }, 1), t[1] !== 3;
  }),
  SXn =
    Ore &&
    Fce.NATIVE_ARRAY_BUFFER_VIEWS &&
    NZe(function () {
      var t = new Lre(2);
      return t.set(1), t.set("2", 1), t[0] !== 0 || t[1] !== 2;
    });
EXn(
  "set",
  function (t) {
    TXn(this);
    var e = vXn(arguments.length > 1 ? arguments[1] : void 0, 1),
      n = bXn(t);
    if (Ore) return GZe(FZe, this, n, e);
    var r = this.length,
      i = yXn(n),
      o = 0;
    if (i + e > r) throw _Xn("Wrong length");
    for (; o < i; ) this[e + o] = n[o++];
  },
  !Ore || SXn
);
var UZe = Rs,
  RXn = tH,
  AXn = aa,
  wXn = xR,
  kXn = UZe.aTypedArray,
  IXn = UZe.exportTypedArrayMethod,
  DXn = AXn(function () {
    new Int8Array(1).slice();
  });
IXn(
  "slice",
  function (t, e) {
    for (
      var n = wXn(kXn(this), t, e),
        r = RXn(this),
        i = 0,
        o = n.length,
        l = new r(o);
      o > i;

    )
      l[i] = n[i++];
    return l;
  },
  DXn
);
var BZe = Rs,
  PXn = sh.some,
  MXn = BZe.aTypedArray,
  CXn = BZe.exportTypedArrayMethod;
CXn("some", function (t) {
  return PXn(MXn(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var nIe = V5,
  $Xn = Math.floor,
  Gre = function (t, e) {
    var n = t.length,
      r = $Xn(n / 2);
    return n < 8
      ? xXn(t, e)
      : LXn(t, Gre(nIe(t, 0, r), e), Gre(nIe(t, r), e), e);
  },
  xXn = function (t, e) {
    for (var n, r, i = t.length, o = 1; o < i; ) {
      for (r = o, n = t[o]; r && e(t[r - 1], n) > 0; ) t[r] = t[--r];
      r !== o++ && (t[r] = n);
    }
    return t;
  },
  LXn = function (t, e, n, r) {
    for (var i = e.length, o = n.length, l = 0, u = 0; l < i || u < o; )
      t[l + u] =
        l < i && u < o
          ? r(e[l], n[u]) <= 0
            ? e[l++]
            : n[u++]
          : l < i
          ? e[l++]
          : n[u++];
    return t;
  },
  Uce = Gre,
  OXn = Eb,
  rIe = OXn.match(/firefox\/(\d+)/i),
  HZe = !!rIe && +rIe[1],
  GXn = Eb,
  XZe = /MSIE|Trident/.test(GXn),
  NXn = Eb,
  iIe = NXn.match(/AppleWebKit\/(\d+)\./),
  VZe = !!iIe && +iIe[1],
  FXn = ja,
  UXn = qS,
  Nre = aa,
  BXn = U0,
  HXn = Uce,
  zZe = Rs,
  aIe = HZe,
  XXn = XZe,
  oIe = DR,
  sIe = VZe,
  VXn = zZe.aTypedArray,
  zXn = zZe.exportTypedArrayMethod,
  cL = FXn.Uint16Array,
  pI = cL && UXn(cL.prototype.sort),
  jXn = !(
    !pI ||
    (Nre(function () {
      pI(new cL(2), null);
    }) &&
      Nre(function () {
        pI(new cL(2), {});
      }))
  ),
  lIe =
    !!pI &&
    !Nre(function () {
      if (oIe) return oIe < 74;
      if (aIe) return aIe < 67;
      if (XXn) return !0;
      if (sIe) return sIe < 602;
      var t,
        e,
        n = new cL(516),
        r = Array(516);
      for (t = 0; t < 516; t++)
        (e = t % 4), (n[t] = 515 - t), (r[t] = t - 2 * e + 3);
      for (
        pI(n, function (i, o) {
          return ((i / 4) | 0) - ((o / 4) | 0);
        }),
          t = 0;
        t < 516;
        t++
      )
        if (n[t] !== r[t]) return !0;
    }),
  WXn = function (t) {
    return function (e, n) {
      return t !== void 0
        ? +t(e, n) || 0
        : n != n
        ? -1
        : e != e
        ? 1
        : e === 0 && n === 0
        ? 1 / e > 0 && 1 / n < 0
          ? 1
          : -1
        : e > n;
    };
  };
zXn(
  "sort",
  function (t) {
    return t !== void 0 && BXn(t), lIe ? pI(this, t) : HXn(VXn(this), WXn(t));
  },
  !lIe || jXn
);
var jZe = Rs,
  KXn = B0,
  uIe = $E,
  ZXn = tH,
  YXn = jZe.aTypedArray,
  QXn = jZe.exportTypedArrayMethod;
QXn("subarray", function (t, e) {
  var n = YXn(this),
    r = n.length,
    i = uIe(t, r);
  return new (ZXn(n))(
    n.buffer,
    n.byteOffset + i * n.BYTES_PER_ELEMENT,
    KXn((e === void 0 ? r : uIe(e, r)) - i)
  );
});
var JXn = ja,
  qXn = xE,
  WZe = Rs,
  Fre = aa,
  cIe = xR,
  x8 = JXn.Int8Array,
  dIe = WZe.aTypedArray,
  eVn = WZe.exportTypedArrayMethod,
  KZe = [].toLocaleString,
  tVn =
    !!x8 &&
    Fre(function () {
      KZe.call(new x8(1));
    }),
  nVn =
    Fre(function () {
      return [1, 2].toLocaleString() != new x8([1, 2]).toLocaleString();
    }) ||
    !Fre(function () {
      x8.prototype.toLocaleString.call([1, 2]);
    });
eVn(
  "toLocaleString",
  function () {
    return qXn(KZe, tVn ? cIe(dIe(this)) : dIe(this), cIe(arguments));
  },
  nVn
);
var rVn = Rs.exportTypedArrayMethod,
  iVn = aa,
  aVn = ja,
  oVn = Fa,
  hIe = aVn.Uint8Array,
  sVn = (hIe && hIe.prototype) || {},
  L8 = [].toString,
  lVn = oVn([].join);
iVn(function () {
  L8.call({});
}) &&
  (L8 = function () {
    return lVn(this);
  });
var uVn = sVn.toString != L8;
rVn("toString", L8, uVn);
var cVn = (function () {
    function t() {
      var e = this;
      bl(this, t);
      try {
        var n = /xgd=(\d)/.exec(document.cookie);
        (this._status = !!n), (this._level = n && n[1]);
      } catch {
        this._status = !1;
      }
      ["group", "groupEnd", "log", "warn", "error"].forEach(function (r) {
        e[r] = function (i, o, l, u, c, d, h, f, p, g) {
          var y;
          if (e._status) {
            var v = i,
              b = [o, l, u, c, d, h, f, p, g].filter(function (w) {
                return w !== void 0;
              });
            (y = console)[r].apply(y, ["[" + v + "]:"].concat(pWe(b)));
          }
        };
      });
    }
    return (
      _l(t, [
        {
          key: "enable",
          get: function () {
            return this._status;
          },
        },
        {
          key: "long",
          get: function () {
            return this._level === "2";
          },
        },
      ]),
      t
    );
  })(),
  hn = new cVn();
function dVn(t, e) {
  var n = Date.now(),
    r = null,
    i = !0;
  return function () {
    for (var o = arguments.length, l = new Array(o), u = 0; u < o; u++)
      l[u] = arguments[u];
    var c = Date.now();
    i && ((n = Date.now()), (i = !1), t.apply(void 0, l)),
      c - n > e
        ? ((n = c), t.apply(void 0, l))
        : (r && window.clearTimeout(r),
          (r = setTimeout(function () {
            t.apply(void 0, l);
          }, e)));
  };
}
function fIe(t, e) {
  if (t && e) {
    var n = new Uint8Array(t.byteLength + e.byteLength + 11);
    (n[0] = 1),
      (n[1] = t[1]),
      (n[2] = t[2]),
      (n[3] = t[3]),
      (n[4] = 255),
      (n[5] = 225);
    var r = 6;
    return (
      n.set(
        new Uint8Array([(t.byteLength >>> 8) & 255, 255 & t.byteLength]),
        r
      ),
      (r += 2),
      n.set(t, r),
      (n[(r += t.byteLength)] = 1),
      r++,
      n.set(
        new Uint8Array([(e.byteLength >>> 8) & 255, 255 & e.byteLength]),
        r
      ),
      (r += 2),
      n.set(e, r),
      n
    );
  }
}
function hVn() {
  var t,
    e,
    n = new Promise(function (r, i) {
      (t = r), (e = i);
    });
  return (n.resolve = t), (n.reject = e), n;
}
var pIe = Tl,
  fVn = Fa,
  pVn = zs,
  gVn = aa,
  cZ = z5,
  mVn = B5,
  yVn = F5,
  vVn = id,
  bVn = UD,
  hw = Object.assign,
  gIe = Object.defineProperty,
  _Vn = fVn([].concat),
  ZZe =
    !hw ||
    gVn(function () {
      if (
        pIe &&
        hw(
          { b: 1 },
          hw(
            gIe({}, "a", {
              enumerable: !0,
              get: function () {
                gIe(this, "b", { value: 3, enumerable: !1 });
              },
            }),
            { b: 2 }
          )
        ).b !== 1
      )
        return !0;
      var t = {},
        e = {},
        n = Symbol(),
        r = "abcdefghijklmnopqrst";
      return (
        (t[n] = 7),
        r.split("").forEach(function (i) {
          e[i] = i;
        }),
        hw({}, t)[n] != 7 || cZ(hw({}, e)).join("") != r
      );
    })
      ? function (t, e) {
          for (
            var n = vVn(t), r = arguments.length, i = 1, o = mVn.f, l = yVn.f;
            r > i;

          )
            for (
              var u,
                c = bVn(arguments[i++]),
                d = o ? _Vn(cZ(c), o(c)) : cZ(c),
                h = d.length,
                f = 0;
              h > f;

            )
              (u = d[f++]), (pIe && !pVn(l, c, u)) || (n[u] = c[u]);
          return n;
        }
      : hw,
  TVn = Di,
  mIe = ZZe;
TVn(
  { target: "Object", stat: !0, arity: 2, forced: Object.assign !== mIe },
  { assign: mIe }
);
var tO = "xg-video",
  nH = !1;
try {
  nH =
    WebAssembly &&
    WebAssembly.validate(
      new Uint8Array([
        0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10,
        1, 8, 0, 65, 0, 253, 15, 253, 98, 11,
      ])
    );
} catch {}
var Ure = {
  preloadDecoder: !1,
  reuseWasmDecoder: !0,
  reuseMseForAudio: !1,
  preciseSeek: 0,
  h264WithWebcodec: !0,
  lowDecodeThreshold: 100,
  wasmFallbackToAsm: !1,
  audioWithMse: !0,
  canUseThreadMode: !1,
  disabledWhenErrorOccur: !0,
  disabledDuration: 43200,
  evaluateVVCount: 0,
  disabledByLowdecodePrecent: 0.5,
  maxDecodeOnceWasm: nH ? 6 : 8,
  maxDecodeOnceFirstTime: 8,
  maxDecodeOnceWebcodec: 20,
};
function O8() {
  return tO;
}
function EVn(t) {
  tO = t;
}
function SVn(t) {
  Ure = Object.assign({}, Ure, t);
}
function Ru() {
  return Ure;
}
function YZe() {
  var t = typeof customElements < "u" && customElements.get(tO);
  return t
    ? {
        H264_DECODER_URL: t.h264Url,
        ASM_H264_DECODER_URL: t.h264AsmUrl,
        H265_DECODER_URL: t.h265Url,
        H265_THREAD_DECODER_URL: t.h265ThreadUrl,
        H265_SIMD_DECODER_URL: t.h265SimdUrl,
        ASM_H265_DECODER_URL: t.h265AsmUrl,
      }
    : {};
}
function QZe() {
  if (typeof customElements > "u") return !1;
  var t = customElements.get(tO);
  return nH && !(t == null || !t.h265SimdUrl);
}
function Bce() {
  if (typeof customElements > "u") return !1;
  var t = customElements.get(tO);
  return !!window.SharedArrayBuffer && !(t == null || !t.h265ThreadUrl);
}
var EC = !1;
try {
  var F4, dZ;
  EC =
    ((F4 = localStorage) === null ||
    F4 === void 0 ||
    (dZ = F4.getItem) === null ||
    dZ === void 0
      ? void 0
      : dZ.call(F4, "_sds")) === "1";
} catch {}
function RVn() {
  if (typeof customElements > "u") return !1;
  if (EC) return !0;
  var t = !1,
    e = !1;
  try {
    var n = new (window.AudioContext || window.webkitAudioContext)();
    n.close(), (n = null), (t = !0);
  } catch {}
  try {
    for (
      var r = document.createElement("canvas"),
        i = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"],
        o = 0;
      o < i.length;
      o++
    ) {
      var l = r.getContext(i[o]);
      if (l) {
        (l = null), (r = null), (e = !0);
        break;
      }
    }
    (EC = t && e && !!WebAssembly), localStorage.setItem("_sds", EC ? 1 : 0);
  } catch {}
  return EC;
}
function AVn() {
  return { simd: nH, thread: Bce(), nbCpu: navigator.hardwareConcurrency };
}
var G8 = 0,
  Hce = 0,
  Bre = 0,
  hZ = !1;
function wVn() {
  G8++;
}
function kVn() {
  return G8;
}
function IVn() {
  Hce++;
}
function DVn() {
  return Hce;
}
function PVn() {
  return Bre;
}
function MVn() {
  return (
    !!hZ ||
    (Ru().evaluateVVCount !== 0 &&
      (G8 === Ru().evaluateVVCount && (Bre = Hce / G8),
      Bre >= Ru().disabledByLowdecodePrecent && (hZ = !0),
      hZ))
  );
}
function fZ(t) {
  localStorage.setItem("xgv_dis", t),
    t === 2 && localStorage.setItem("xgv_dist", new Date().getTime());
}
function CVn() {
  if (MVn() === !0) return !0;
  var t = localStorage.getItem("xgv_dis");
  if (!t) return !1;
  if (t === "1") return !0;
  if (t === "2") {
    var e = localStorage.getItem("xgv_dist") || 0;
    if (
      ((e = Number(e)),
      (new Date().getTime() - e) / 1e3 < Ru().disabledDuration)
    )
      return !0;
    JZe();
  }
}
function JZe() {
  localStorage.removeItem("xgv_dist"), localStorage.removeItem("xgv_dis");
}
var $Vn = ja,
  xVn = $Vn.isFinite,
  LVn =
    Number.isFinite ||
    function (t) {
      return typeof t == "number" && xVn(t);
    },
  OVn = Di,
  GVn = LVn;
OVn({ target: "Number", stat: !0 }, { isFinite: GVn });
var NVn = Di,
  yIe = BD,
  FVn = UB,
  UVn = $u,
  vIe = $E,
  BVn = od,
  HVn = Sm,
  XVn = X5,
  VVn = Gs,
  zVn = j5,
  jVn = xR,
  WVn = zVn("slice"),
  KVn = VVn("species"),
  pZ = Array,
  ZVn = Math.max;
NVn(
  { target: "Array", proto: !0, forced: !WVn },
  {
    slice: function (t, e) {
      var n,
        r,
        i,
        o = HVn(this),
        l = BVn(o),
        u = vIe(t, l),
        c = vIe(e === void 0 ? l : e, l);
      if (
        yIe(o) &&
        ((n = o.constructor),
        ((FVn(n) && (n === pZ || yIe(n.prototype))) ||
          (UVn(n) && (n = n[KVn]) === null)) &&
          (n = void 0),
        n === pZ || n === void 0)
      )
        return jVn(o, u, c);
      for (
        r = new (n === void 0 ? pZ : n)(ZVn(c - u, 0)), i = 0;
        u < c;
        u++, i++
      )
        u in o && XVn(r, i, o[u]);
      return (r.length = i), r;
    },
  }
);
var Wi = {
    WAITING: 0,
    CANPLAY: 1,
    PLAY: 2,
    PLAYING: 3,
    PAUSE: 4,
    SEEKING: 5,
    SEEKED: 6,
    LOADEDDATA: 7,
    LOADEDMETADATA: 8,
    TIMEUPDATE: 9,
    DURATION_CHANGE: 10,
    VOLUME_CHANGE: 11,
    PROGRESS: 12,
    ERROR: 13,
    ENDED: 14,
    RESIZE: 15,
    LOADSTART: 16,
    DECODE_FPS: 17,
    LOW_DECODE: 18,
    LARGE_AV_GAP: 19,
    FIRST_FRAME: 20,
  },
  bIe = [
    "waiting",
    "canplay",
    "play",
    "playing",
    "pause",
    "seeking",
    "seeked",
    "loadeddata",
    "loadedmetadata",
    "timeupdate",
    "durationchange",
    "volumechange",
    "progress",
    "error",
    "ended",
    "resize",
    "loadstart",
    "decodefps",
    "lowdecode",
    "largeavgap",
    "firstframe",
  ],
  yn = {
    AUDIO: {
      AUDIO_READY: "audio_ready",
      AUDIO_NOT_ALLOWED_AUTOPLAY: "audio_not_allowed_autoplay",
      AUDIO_WAITING: "audio_waiting",
      AUDIO_SYNC_DTS: "audio_sync_dts",
    },
    VIDEO: {
      VIDEO_DECODER_INIT: "video_decode_init",
      VIDEO_READY: "video_ready",
      VIDEO_WAITING: "video_waiting",
      AUTO_RUN: "auto_run",
      DECODE_LOW_FPS: "decode_low_fps",
      UPDATE_VIDEO_FILLTYPE: "update_video_filltype",
      UPDATE_VIDEO_COVER_POSITION: "update_video_cover_position",
    },
    TIMELINE: {
      PLAY_EVENT: "play_event",
      SET_METADATA: "set_metadata",
      APPEND_CHUNKS: "append_chunks",
      START_RENDER: "start_render",
      DO_PLAY: "do_play",
      DO_PAUSE: "do_pause",
      DO_SEEK: "do_seek",
      SET_PLAYBACKRATE: "set_playbackrate",
      SYNC_DTS: "sync_dts",
      RESET_BASE_DTS: "reset_base_dts",
      UPDATE_VOLUME: "update_volume",
      SINGLE_TRACK: "single_track",
      DESTROY: "destroy",
      READY: "ready",
      UPDATE_GL_OPTIONS: "update_gl_options",
      SET_VIDEO_DURATION: "set_video_duration",
      SET_PLAY_MODE: "set_play_mode",
      UPDATE_CAPABILITY_LEVEL: "update_capability_level",
      INNER_DEGRADE: "inner_degrade",
      ADJUST_SEEK_TIME: "adjust_seek_time",
      CHASE_FRAME: "chase_frame",
      END_OF_STREAM: "end_of_stream",
      UPDATE_SEGMENT_END: "update_segment_end",
    },
    VIDEO_EVENTS: Wi,
    DECODE_EVENTS: {
      INIT: "init",
      READY: "decoderready",
      REMUX: "remux",
      INIT_FAILED: "initfailed",
      DATAREADY: "dataReady",
      PLAY_FAILED: "playfailed",
      FRAGMENT_END: "fragmentEnd",
      APPEND_VIDEO: "appendVideo",
      FIRST_FRAME: "firstFrame",
      DECODED: "decoded",
      RENDE_END: "rendeEnd",
      CHASE_VIDEO_FRAME: "chaseVideoFrame",
      CHASE_VIDEO_FRAME_END: "chaseVideoFrameEnd",
      CHASE_AUDIO_FRAME: "chaseAudioFrame",
      INIT_SEGMENT: "initSegment",
      MEDIA_SEGMENT: "mediaSegment",
      FRAME_MAX_COUNY: "frameMaxCount",
      FRAME_MIN_COUNY: "frameMinCount",
    },
  },
  Xce = (function (t) {
    Wf(n, Pl);
    var e = Kf(n);
    function n(r, i) {
      var o;
      return (
        bl(this, n),
        ((o = e.call(this))._config = r),
        (o._parent = i),
        (o._meta = null),
        (o._ready = !1),
        (o._isLive = !0),
        (o._innerDegrade = !1),
        (o._singleTrack = -1),
        o
      );
    }
    return (
      _l(n, [
        {
          key: "analyse",
          get: function () {
            return this._parent.analyse;
          },
        },
        {
          key: "isLive",
          get: function () {
            return this._isLive;
          },
        },
        {
          key: "innerDegrade",
          get: function () {
            return this._innerDegrade;
          },
        },
        {
          key: "noAudio",
          get: function () {
            return this._singleTrack === 1 || this._singleTrack === 2;
          },
        },
        {
          key: "noVideo",
          get: function () {
            return this._singleTrack === 3;
          },
        },
        {
          key: "duration",
          get: function () {
            return this._timeRange.duration;
          },
          set: function (r) {
            this._timeRange && (this._timeRange.duration = r);
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            var r = this;
            this._parent.on(
              yn.TIMELINE.APPEND_CHUNKS,
              this._appendChunk.bind(this)
            ),
              this._parent.on(
                yn.TIMELINE.RESET_BASE_DTS,
                this._resetDts.bind(this)
              ),
              this._parent.on(
                yn.TIMELINE.START_RENDER,
                this._startRender.bind(this)
              ),
              this._parent.on(yn.TIMELINE.DO_PLAY, this._doPlay.bind(this)),
              this._parent.on(yn.TIMELINE.DO_PAUSE, this._doPause.bind(this)),
              this._parent.on(yn.TIMELINE.DO_SEEK, this._doSeek.bind(this)),
              this._parent.on(yn.TIMELINE.DESTROY, this._destroy.bind(this)),
              this._parent.on(
                yn.TIMELINE.CHASE_FRAME,
                this._doChaseFrame.bind(this)
              ),
              this._parent.on(yn.TIMELINE.SINGLE_TRACK, function (i) {
                r._singleTrack = i;
              }),
              this._parent.on(yn.TIMELINE.SET_PLAY_MODE, function (i) {
                r._isLive = i === "LIVE";
              }),
              this._parent.on(yn.TIMELINE.INNER_DEGRADE, function () {
                r._innerDegrade = !0;
              }),
              this._parent.on(yn.TIMELINE.SET_VIDEO_DURATION, function (i) {
                r.duration = i;
              });
          },
        },
      ]),
      n
    );
  })(),
  YVn = Di,
  qZe = Fa,
  QVn = U0,
  JVn = id,
  _Ie = od,
  qVn = xce,
  TIe = Qu,
  Vce = aa,
  ezn = Uce,
  tzn = ME,
  EIe = HZe,
  nzn = XZe,
  SIe = DR,
  RIe = VZe,
  CT = [],
  AIe = qZe(CT.sort),
  rzn = qZe(CT.push),
  izn = Vce(function () {
    CT.sort(void 0);
  }),
  azn = Vce(function () {
    CT.sort(null);
  }),
  ozn = tzn("sort"),
  eYe = !Vce(function () {
    if (SIe) return SIe < 70;
    if (!(EIe && EIe > 3)) {
      if (nzn) return !0;
      if (RIe) return RIe < 603;
      var t,
        e,
        n,
        r,
        i = "";
      for (t = 65; t < 76; t++) {
        switch (((e = String.fromCharCode(t)), t)) {
          case 66:
          case 69:
          case 70:
          case 72:
            n = 3;
            break;
          case 68:
          case 71:
            n = 4;
            break;
          default:
            n = 2;
        }
        for (r = 0; r < 47; r++) CT.push({ k: e + r, v: n });
      }
      for (
        CT.sort(function (o, l) {
          return l.v - o.v;
        }),
          r = 0;
        r < CT.length;
        r++
      )
        (e = CT[r].k.charAt(0)), i.charAt(i.length - 1) !== e && (i += e);
      return i !== "DGBEFHACIJK";
    }
  }),
  szn = izn || !azn || !ozn || !eYe,
  lzn = function (t) {
    return function (e, n) {
      return n === void 0
        ? -1
        : e === void 0
        ? 1
        : t !== void 0
        ? +t(e, n) || 0
        : TIe(e) > TIe(n)
        ? 1
        : -1;
    };
  };
YVn(
  { target: "Array", proto: !0, forced: szn },
  {
    sort: function (t) {
      t !== void 0 && QVn(t);
      var e = JVn(this);
      if (eYe) return t === void 0 ? AIe(e) : AIe(e, t);
      var n,
        r,
        i = [],
        o = _Ie(e);
      for (r = 0; r < o; r++) r in e && rzn(i, e[r]);
      for (ezn(i, lzn(t)), n = _Ie(i), r = 0; r < n; ) e[r] = i[r++];
      for (; r < o; ) qVn(e, r++);
      return e;
    },
  }
);
var gZ = 0.5,
  uzn = (function () {
    function t(e) {
      bl(this, t),
        (this.TAG = "AudioTimeRange"),
        (this._parent = e),
        (this._buffers = []),
        (this._duration = 0),
        (this._baseDts = 0),
        (this._lastBuffer = null);
    }
    return (
      _l(t, [
        {
          key: "isLive",
          get: function () {
            return this._parent.isLive;
          },
        },
        {
          key: "duration",
          get: function () {
            return this._duration;
          },
          set: function (e) {
            this._duration = e;
          },
        },
        {
          key: "buffered",
          get: function () {
            var e = this;
            if (this.isLive)
              return {
                length: this._duration ? 1 : 0,
                start: function () {
                  return 0;
                },
                end: function () {
                  return e._duration;
                },
              };
            var n = this._mergeBufferRanges();
            return {
              length: n.length,
              start: function (r) {
                var i = n[r];
                return i ? i.start : 0;
              },
              end: function (r) {
                var i = n[r];
                return i ? i.end : 1 / 0;
              },
            };
          },
        },
        {
          key: "resetDts",
          value: function (e) {
            this._baseDts = e;
          },
        },
        {
          key: "_transitionSamples",
          value: function (e) {
            for (
              var n = e.numberOfChannels, r = e.length, i = 512, o = 0;
              o < n;
              o++
            ) {
              for (var l = e.getChannelData(o), u = 0; u < i; u++)
                l[u] = (l[u] * u) / i;
              for (var c = r - i; c < r; c++) l[c] = (l[c] * (r - c)) / i;
            }
          },
        },
        {
          key: "append",
          value: function (e, n, r, i) {
            this._baseDts === -1 && (this._baseDts = r),
              this._transitionSamples(e);
            var o = (r - this._baseDts) / 1e3,
              l = o + n,
              u = {
                start: o,
                end: l,
                startDts: r,
                source: e,
                duration: n,
                delay: i,
              };
            if (
              (hn.log(
                this.TAG,
                "add new buffer range, startDts:"
                  .concat(r, ", [")
                  .concat(u.start, " , ")
                  .concat(u.end, "]")
              ),
              !this._buffers.filter(function (c) {
                return c.start === o;
              }).length)
            )
              return (
                this._buffers.push(u),
                this.isLive && (this._duration = l),
                u.start
              );
            console.error("音频重复");
          },
        },
        {
          key: "deletePassed",
          value: function (e) {
            return (
              (this._buffers = this._buffers.filter(function (n) {
                return n.start >= e;
              })),
              this._buffers[0]
            );
          },
        },
        {
          key: "canSeek",
          value: function (e) {
            var n = this._buffers[this._buffers.length - 1];
            return !!n && !(n.start < e);
          },
        },
        {
          key: "_mergeBufferRanges",
          value: function () {
            var e = this._buffers.slice().sort(function (u, c) {
                return u.start > c.start ? 1 : -1;
              }),
              n = e.length,
              r = [];
            if (!n) return r;
            for (
              var i = { start: e[0].start, end: e[0].end }, o = 1;
              o < n;
              o++
            ) {
              var l = e[o];
              Math.abs(i.end - l.start) < gZ
                ? (i.end = l.end)
                : (r.push(i), (i = { start: l.start, end: l.end }));
            }
            return r.push(i), r;
          },
        },
        {
          key: "getBuffer",
          value: function (e) {
            if (this.isLive) return this._buffers.shift();
            var n = this._buffers.filter(function (r) {
              return r.start < e + gZ && r.end > e + gZ;
            })[0];
            return (
              hn.log(
                this.TAG,
                "get audio buffer , currentTime:"
                  .concat(e, " ,buffer:[")
                  .concat(n && n.start, " , ")
                  .concat(n && n.end, "]")
              ),
              e !== 0 || n ? n : this._buffers[0]
            );
          },
        },
        {
          key: "hasBuffer",
          value: function () {
            var e;
            return !((e = this._buffers) === null || e === void 0 || !e.length);
          },
        },
      ]),
      t
    );
  })(),
  czn = [
    -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -7552, -7296, -8064,
    -7808, -6528, -6272, -7040, -6784, -2752, -2624, -3008, -2880, -2240, -2112,
    -2496, -2368, -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392,
    -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944, -30208,
    -29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008, -10496,
    -12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, -16128, -15616,
    -13056, -12544, -14080, -13568, -344, -328, -376, -360, -280, -264, -312,
    -296, -472, -456, -504, -488, -408, -392, -440, -424, -88, -72, -120, -104,
    -24, -8, -56, -40, -216, -200, -248, -232, -152, -136, -184, -168, -1376,
    -1312, -1504, -1440, -1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952,
    -1632, -1568, -1760, -1696, -688, -656, -752, -720, -560, -528, -624, -592,
    -944, -912, -1008, -976, -816, -784, -880, -848, 5504, 5248, 6016, 5760,
    4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784,
    2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904,
    3264, 3136, 3520, 3392, 22016, 20992, 24064, 23040, 17920, 16896, 19968,
    18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008, 10496,
    12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056,
    12544, 14080, 13568, 344, 328, 376, 360, 280, 264, 312, 296, 472, 456, 504,
    488, 408, 392, 440, 424, 88, 72, 120, 104, 24, 8, 56, 40, 216, 200, 248,
    232, 152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184,
    1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688, 656, 752, 720, 560,
    528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848,
  ],
  dzn = [
    -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932,
    -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996, -15484,
    -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876,
    -10364, -9852, -9340, -8828, -8316, -7932, -7676, -7420, -7164, -6908,
    -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092,
    -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620,
    -2492, -2364, -2236, -2108, -1980, -1884, -1820, -1756, -1692, -1628, -1564,
    -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876,
    -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492,
    -460, -428, -396, -372, -356, -340, -324, -308, -292, -276, -260, -244,
    -228, -212, -196, -180, -164, -148, -132, -120, -112, -104, -96, -88, -80,
    -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124, 31100, 30076, 29052,
    28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788,
    16764, 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388,
    10876, 10364, 9852, 9340, 8828, 8316, 7932, 7676, 7420, 7164, 6908, 6652,
    6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900, 3772,
    3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236,
    2108, 1980, 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308,
    1244, 1180, 1116, 1052, 988, 924, 876, 844, 812, 780, 748, 716, 684, 652,
    620, 588, 556, 524, 492, 460, 428, 396, 372, 356, 340, 324, 308, 292, 276,
    260, 244, 228, 212, 196, 180, 164, 148, 132, 120, 112, 104, 96, 88, 80, 72,
    64, 56, 48, 40, 32, 24, 16, 8, 0,
  ],
  hzn = new Uint8Array([
    1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241, 161,
    10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
    90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
    90, 94,
  ]);
function fzn(t, e) {
  var n = ((7 & t[0]) << 1) | (t[1] >>> 7);
  return n !== e ? n : e;
}
function pzn(t, e) {
  var n = t.sampleRateIndex,
    r = t.channelCount;
  n = fzn(t.config, n);
  var i = new Uint8Array(7);
  (i[0] = 255),
    (i[1] = 240),
    (i[1] = 1 | i[1]),
    (i[2] = 64),
    (i[2] = i[2] | (60 & (n << 2))),
    (i[2] = i[2] | (1 & (r >> 2))),
    (i[3] = 192 & (r << 6));
  var o = e.byteLength + 7;
  return (
    (i[3] = i[3] | (3 & (o >> 11))),
    (i[4] = 255 & (o >> 3)),
    (i[5] = 224 & (o << 5)),
    (i[5] = 31 | i[5]),
    (i[6] = 252),
    i
  );
}
function gzn(t, e) {
  var n = new Uint8Array(e.data.byteLength + 7),
    r = pzn(t, e.data);
  return n.set(r), n.set(e.data, 7), n;
}
function mzn(t) {
  for (
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0,
      n = 0,
      r = 0,
      i = t.length;
    r < i;
    r++
  )
    (e && r % e == 0) || (n += t[r].byteLength);
  for (var o = new Uint8Array(n), l = 0, u = 0, c = t.length; u < c; u++)
    (e && u % e == 0) || (o.set(t[u], l), (l += t[u].byteLength));
  return o;
}
function yzn(t) {
  for (var e = new Uint8Array(2 * t.length), n = 0, r = 0; n < t.length; ) {
    var i = czn[t[n]];
    if (i === void 0) throw new Error("can not decode g711 alaw data!");
    (e[r] = 255 & i), (e[r + 1] = i >> 8), (n += 1), (r += 2);
  }
  return e;
}
function vzn(t) {
  for (var e = new Uint8Array(2 * t.length), n = 0, r = 0; n < t.length; ) {
    var i = dzn[t[n]];
    if (i === void 0) throw new Error("can not decode g711 ulaw data!");
    (e[r] = 255 & i), (e[r + 1] = i >> 8), (n += 1), (r += 2);
  }
  return e;
}
function bzn(t, e) {
  if (e === "g7110a") return yzn(t);
  if (e === "g7110m") return vzn(t);
  throw new Error("no supported format=".concat(e, " for g711"));
}
function _zn(t, e, n) {
  return t / e / n;
}
function Tzn(t) {
  return t >= 32768 ? -(65536 - t) / 32768 : t / 32767;
}
function Ezn(t, e, n, r, i) {
  for (
    var o = _zn(e.byteLength, n, i),
      l = t.createBuffer(n, o, r),
      u = new DataView(e),
      c = 0;
    c < n;
    c++
  )
    for (var d = l.getChannelData(c), h = void 0, f = 0; f < o; f++)
      (h = u.getUint16(f * (2 * n) + 2 * c, !0)), (d[f] = Tzn(h));
  return { audioBuffer: l, duration: o / r };
}
function Szn(t) {
  var e = t[0].dts,
    n = t.filter(function (i) {
      return i.dts === e;
    }).length;
  if (!(n <= 1)) for (var r = 0; r < n; r++) t[r].data = hzn;
}
var SM = {
    decodeG711: bzn,
    createAudioBufferFromPcm: Ezn,
    packageAACToAdts: gzn,
    concatAdts: mzn,
    checkRefillFrame: Szn,
  },
  Rzn = 3,
  Azn = {
    INIT_AUDIO_ERR: "create new AudioContext error",
    DECODE_ERR: "audio data decode error",
  },
  wzn = (function (t) {
    Wf(i, Xce);
    var e,
      n,
      r = Kf(i);
    function i(o, l) {
      var u;
      return (
        bl(this, i),
        Ei(mi((u = r.call(this, o, l))), "doPause", u._doPause),
        (u.TAG = "AudioRender"),
        (u._timeRange = new uzn(mi(u))),
        (u._lastTimeLineTime = 0),
        (u._sampleQueue = []),
        (u._source = null),
        (u._audioCanAutoplay = !0),
        (u._lastBuffer = null),
        (u._inDecoding = !1),
        (u._endOfStream = !1),
        (u._delay = 0),
        (u._isSourceBufferEnd = -1),
        (u._onSourceBufferEnded = u._onSourceBufferEnded.bind(mi(u))),
        u._initAudioCtx(o.volume || 0.6),
        u._bindEvents(),
        u
      );
    }
    return (
      _l(i, [
        {
          key: "baseDts",
          get: function () {
            return this._timeRange._baseDts;
          },
        },
        {
          key: "currentTime",
          get: function () {
            return this._audioCtx
              ? this._lastTimeLineTime + this._audioCtx.currentTime
              : 0;
          },
        },
        {
          key: "preloadTime",
          get: function () {
            return this.isLive ? 1 : 0;
          },
        },
        {
          key: "timescale",
          get: function () {
            return 1e3;
          },
        },
        {
          key: "buffered",
          get: function () {
            return this._timeRange.buffered;
          },
        },
        {
          key: "ctxState",
          get: function () {
            return this._audioCtx.state;
          },
        },
        {
          key: "audioCanAutoplay",
          get: function () {
            return this._audioCanAutoplay;
          },
        },
        {
          key: "resume",
          value: function () {
            if (this._audioCtx && this._audioCtx.state === "suspended")
              return this._audioCtx.resume().catch(function (o) {});
          },
        },
        {
          key: "canSeek",
          value: function (o) {
            return this._timeRange.canSeek(o);
          },
        },
        {
          key: "_assembleErr",
          value: function (o) {
            var l = new Error(o);
            return (l.code = Rzn), l;
          },
        },
        {
          key: "_emitTimelineEvents",
          value: function (o, l, u) {
            var c, d;
            (c = this._parent) === null ||
              c === void 0 ||
              (d = c.emit) === null ||
              d === void 0 ||
              d.call(c, o, l, u);
          },
        },
        {
          key: "_initAudioCtx",
          value: function (o) {
            var l = this;
            hn.log(this.TAG, "init audioCtx");
            var u = window.AudioContext || window.webkitAudioContext;
            return (
              (this._audioCtx = new u()),
              this._audioCtx
                ? ((this._gainNode = this._audioCtx.createGain()),
                  (this._gainNode.gain.value = o),
                  this._gainNode.connect(this._audioCtx.destination),
                  (this._audioCanAutoplay = this._audioCtx.state === "running"),
                  hn.log(this.TAG, "webAudio state:", this._audioCtx.state),
                  CKe(),
                  this._bindAudioCtxEvent(),
                  this._audioCtx.suspend())
                : (hn.warn(this.TAG, "create webaudio error!"),
                  void setTimeout(function () {
                    l._emitTimelineEvents(
                      yn.TIMELINE.PLAY_EVENT,
                      Wi.ERROR,
                      l._assembleErr(Azn.INIT_AUDIO_ERR)
                    );
                  }))
            );
          },
        },
        {
          key: "_bindAudioCtxEvent",
          value: function () {
            var o = this;
            (this._onStateChange = function () {
              o._audioCtx &&
                o._audioCtx.state === "running" &&
                o._ready &&
                o._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.PLAYING);
            }),
              this._audioCtx.addEventListener(
                "statechange",
                this._onStateChange
              );
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            var o = this;
            Bp(Gh(i.prototype), "_bindEvents", this).call(this),
              this._parent.on(
                yn.DECODE_EVENTS.CHASE_AUDIO_FRAME,
                this._doChaseFrame.bind(this)
              ),
              this._parent.on(yn.TIMELINE.UPDATE_VOLUME, function (l) {
                o._gainNode &&
                  ((o._gainNode.gain.value = Number.isFinite(l) ? l : 1),
                  o._emitTimelineEvents(
                    yn.TIMELINE.PLAY_EVENT,
                    Wi.VOLUME_CHANGE
                  ));
              }),
              this._parent.on(yn.TIMELINE.END_OF_STREAM, function () {
                var l;
                (o._endOfStream = !0),
                  o.noAudio ||
                    ((l = o._timeRange) !== null &&
                      l !== void 0 &&
                      l.hasBuffer()) ||
                    o == null ||
                    o._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.ENDED);
              });
          },
        },
        {
          key: "_appendChunk",
          value: function (o, l) {
            if (!this.noAudio) {
              this._meta ||
                ((this._meta = l),
                hn.warn(this.TAG, "audio set metadata", this._meta));
              var u = l.samples;
              if (u.length)
                if (
                  ((this._sampleQueue = this._sampleQueue.concat(u)),
                  (l.samples = []),
                  this._meta.codecType === "aac")
                ) {
                  if (this._inDecoding) return;
                  this._decodeAACWrapper();
                } else this._decodeG711();
            }
          },
        },
        {
          key: "_resetDts",
          value: function (o, l) {
            l !== "video" && this._timeRange.resetDts(o);
          },
        },
        {
          key: "_doPlay",
          value: function () {
            this.noAudio ||
              this._parent.seeking ||
              (this._source || !this.currentTime
                ? this.resume()
                : this._startRender());
          },
        },
        {
          key: "_doPause",
          value: function () {
            this.noAudio || this._audioCtx.suspend();
          },
        },
        {
          key: "_reInitAudioCtx",
          value: function (o) {
            var l = this;
            if (
              ((this._lastTimeLineTime = o),
              (this._lastBuffer = null),
              (this._lastAudioBufferInfo = null),
              (this._delay = 0),
              !this._ready || !this._audioCtx.currentTime)
            )
              return Promise.resolve();
            var u = this._gainNode.gain.value;
            return this._audioCtx.close().then(function () {
              return (
                l._audioCtx.removeEventListener(
                  "statechange",
                  l._onStateChange
                ),
                (l._audioCtx = null),
                l._source &&
                  l._source.removeEventListener(
                    "ended",
                    l._onSourceBufferEnded
                  ),
                (l._source = null),
                l._initAudioCtx(u)
              );
            });
          },
        },
        {
          key: "_doSeek",
          value: function (o) {
            var l = this;
            this._reInitAudioCtx(o)
              .then(function () {
                l._getAudioBuffer(!0);
              })
              .catch(function (u) {});
          },
        },
        {
          key: "_doChaseFrame",
          value: function (o) {
            var l = this,
              u = o.position,
              c = this._timeRange.deletePassed(u);
            c &&
              (hn.log(
                this.TAG,
                "_doChaseFrame",
                "startTime:",
                c.start,
                "buffeLength:",
                this.buffered.end(0) - c.start
              ),
              this._reInitAudioCtx(c.start)
                .then(function () {
                  l._startRender(),
                    l._emitTimelineEvents(
                      yn.TIMELINE.PLAY_EVENT,
                      Wi.TIMEUPDATE
                    );
                })
                .catch(function (d) {}));
          },
        },
        {
          key: "_decodeAACWrapper",
          value:
            ((n = Ak(
              Ip().mark(function o() {
                var l, u, c, d, h, f, p, g, y, v;
                return Ip().wrap(
                  function (b) {
                    for (;;)
                      switch ((b.prev = b.next)) {
                        case 0:
                          if (
                            ((l = this._sampleQueue.length),
                            (u = this._sampleQueue[0]),
                            (c = this._sampleQueue[l - 1]),
                            !((d = (c.dts - u.dts) / this.timescale) < 1))
                          ) {
                            b.next = 6;
                            break;
                          }
                          return b.abrupt("return");
                        case 6:
                          for (
                            h = parseInt(d / 3 - 1) || 1,
                              f = parseInt(l / h),
                              p = [],
                              g = 0;
                            g < h;
                            g++
                          )
                            g < h - 1
                              ? p.push(
                                  this._sampleQueue.slice(g * f, (g + 1) * f)
                                )
                              : p.push(this._sampleQueue.slice(g * f));
                          return (
                            (this._sampleQueue = []),
                            (this._inDecoding = !0),
                            (b.prev = 12),
                            (b.next = 15),
                            this._decodeCycle(p)
                          );
                        case 15:
                          this._isLive ||
                            ((y = this._timeRange._buffers),
                            (v = y[y.length - 1]) &&
                              this._emitTimelineEvents(
                                yn.TIMELINE.UPDATE_SEGMENT_END,
                                v.end
                              )),
                            (b.next = 21);
                          break;
                        case 18:
                          (b.prev = 18),
                            (b.t0 = b.catch(12)),
                            this._emitTimelineEvents(
                              yn.TIMELINE.PLAY_EVENT,
                              Wi.ERROR,
                              this._assembleErr(
                                "ERROR_MSG.DECODE_ERR:".concat(
                                  b.t0 && b.t0.message
                                )
                              )
                            );
                        case 21:
                          this._inDecoding = !1;
                        case 22:
                        case "end":
                          return b.stop();
                      }
                  },
                  o,
                  this,
                  [[12, 18]]
                );
              })
            )),
            function () {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "_decodeCycle",
          value:
            ((e = Ak(
              Ip().mark(function o(l) {
                var u;
                return Ip().wrap(
                  function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          if ((u = l.shift())) {
                            c.next = 3;
                            break;
                          }
                          return c.abrupt("return");
                        case 3:
                          return (c.next = 5), this._decodeAAC(u);
                        case 5:
                          return (c.next = 7), this._decodeCycle(l);
                        case 7:
                        case "end":
                          return c.stop();
                      }
                  },
                  o,
                  this
                );
              })
            )),
            function (o) {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "_decodeAAC",
          value: function (o) {
            var l = this,
              u = o[0],
              c = 0;
            SM.checkRefillFrame(o);
            var d = o.map(function (f) {
                return SM.packageAACToAdts(l._meta, f);
              }),
              h = SM.concatAdts(d, 0);
            return new Promise(function (f, p) {
              var g = l._audioCtx.decodeAudioData(
                h.buffer,
                function (y) {
                  if (l._timeRange) {
                    if (l._lastAudioBufferInfo && l.isLive) {
                      var v = l._lastAudioBufferInfo,
                        b = v.dts + v.duration;
                      (c = u.dts - b) > 1 &&
                        ((l._timeRange._duration += c / 1e3),
                        hn.log(
                          l.TAG,
                          "_decodeAAC",
                          "audio data dts is not continue, last end dts:",
                          b,
                          ",now start Dts:",
                          u.dts,
                          "delay:",
                          c
                        ));
                    }
                    l._lastAudioBufferInfo = {
                      duration: Math.floor(1e3 * y.duration),
                      dts: u.dts,
                    };
                    var w = l._timeRange.append(y, y.duration, u.dts, c / 1e3);
                    if (!l._ready) {
                      var k = Math.abs(w + y.duration - l.currentTime) < 0.5;
                      (l.isLive || !k) &&
                        ((l._ready = !0),
                        hn.log(l.TAG, "_decodeAAC", "set ready true start=", w),
                        l.emit(yn.AUDIO.AUDIO_READY, w));
                    }
                    l._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.PROGRESS),
                      l._emitTimelineEvents(
                        yn.TIMELINE.PLAY_EVENT,
                        Wi.DURATION_CHANGE
                      ),
                      f();
                  }
                },
                p
              );
              g.catch && g.catch(p);
            });
          },
        },
        {
          key: "_decodeG711",
          value: function () {
            var o = this._sampleQueue.length,
              l = this._sampleQueue[0];
            if (
              !((this._sampleQueue[o - 1].dts - l.dts) / this.timescale < 0.5)
            ) {
              var u = this._sampleQueue.reduce(function (N, P) {
                  return (N += P.data.byteLength);
                }, 0),
                c = new Uint8Array(u),
                d = 0,
                h = 0;
              this._sampleQueue.forEach(function (N, P) {
                P === 0 && (d = N.dts),
                  c.set(N.data, h),
                  (h += N.data.byteLength);
              }),
                (this._sampleQueue = []);
              try {
                var f = this._meta,
                  p = f.codecType,
                  g = f.channelCount,
                  y = f.sampleSize,
                  v = f.sampleRate,
                  b = SM.decodeG711(c, p),
                  w = SM.createAudioBufferFromPcm(
                    this._audioCtx,
                    b.buffer,
                    g,
                    v,
                    y / 8
                  ),
                  k = w.audioBuffer,
                  D = w.duration,
                  $ = this._timeRange.append(k, D, d, 0);
                this._ready ||
                  ((this._ready = !0),
                  hn.log(this.TAG, "_decodeG711", "set ready true"),
                  this.emit(yn.AUDIO.AUDIO_READY, $)),
                  this._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.PROGRESS),
                  this._emitTimelineEvents(
                    yn.TIMELINE.PLAY_EVENT,
                    Wi.DURATION_CHANGE
                  );
              } catch (N) {
                this._emitTimelineEvents(
                  yn.TIMELINE.PLAY_EVENT,
                  Wi.ERROR,
                  this._assembleErr(
                    "ERROR_MSG.DECODE_ERR:".concat(N && N.message)
                  )
                );
              }
            }
          },
        },
        {
          key: "_onSourceBufferEnded",
          value: function () {
            (this._isSourceBufferEnd = !0),
              hn.long &&
                hn.log(
                  this.TAG,
                  "source play end! currentTime:"
                    .concat(this.currentTime, " , duration:")
                    .concat(this.duration)
                ),
              this._startRender();
          },
        },
        {
          key: "_ajustSeekTime",
          value: function (o) {
            var l = this._timeRange.getBuffer(o, 0);
            l &&
              (hn.log(this.TAG, "ajust seek time to:", l.start),
              (this._lastTimeLineTime = l.start));
          },
        },
        {
          key: "_getAudioBuffer",
          value: function (o) {
            var l = this;
            if (this._timeRange) {
              var u = this._timeRange.getBuffer(
                this._lastBuffer ? this._lastBuffer.end : this.currentTime,
                0
              );
              return u
                ? o
                  ? (this._ajustSeekTime(u.start),
                    void this.emit(yn.AUDIO.AUDIO_READY))
                  : u
                : (this._endOfStream || !this._isLive) &&
                  this.currentTime - this.duration > -0.5
                ? (this._emitTimelineEvents(
                    yn.TIMELINE.PLAY_EVENT,
                    Wi.TIMEUPDATE
                  ),
                  void this._emitTimelineEvents(
                    yn.TIMELINE.PLAY_EVENT,
                    Wi.ENDED
                  ))
                : ((this._ready = !1),
                  this._audioCtx.suspend(),
                  this.emit(yn.AUDIO.AUDIO_WAITING),
                  void (
                    o &&
                    (this._onAudioReady ||
                      (this._onAudioReady = function (c) {
                        l._ajustSeekTime(c);
                      }),
                    this.removeListener(
                      yn.AUDIO.AUDIO_READY,
                      this._onAudioReady
                    ),
                    this.once(yn.AUDIO.AUDIO_READY, this._onAudioReady))
                  ));
            }
          },
        },
        {
          key: "_startRender",
          value: function (o) {
            if (!this.noAudio) {
              if (
                o === "video" &&
                this.isLive &&
                this._ready &&
                !this._isSourceBufferEnd
              )
                return (
                  console.log(
                    this.TAG,
                    "_startRender, audio currentTime",
                    this.currentTime,
                    "from:",
                    o,
                    "_isSourceBufferEnd:",
                    this._isSourceBufferEnd,
                    "ready:",
                    this._ready
                  ),
                  void this._doPlay()
                );
              var l = this._getAudioBuffer();
              if (l) {
                this._audioCtx.state === "suspended" &&
                  (this._audioCtx.resume().catch(function (c) {}), $Ke()),
                  (this._lastBuffer = l),
                  (this._source = null);
                var u = this._audioCtx.createBufferSource();
                (u.buffer = l.source),
                  (u.loop = !1),
                  (this._source = u),
                  u.addEventListener("ended", this._onSourceBufferEnded),
                  u.connect(this._gainNode),
                  l.delay && l.delay > 0.001 && (this._delay += l.delay),
                  (this.startDts = l.startDts);
                try {
                  (this._isSourceBufferEnd = !1), u.start();
                } catch {}
                l.startDts &&
                  this._emitTimelineEvents(yn.TIMELINE.SYNC_DTS, l.startDts);
              }
            }
          },
        },
        {
          key: "_destroy",
          value: function () {
            hn.log(this.TAG, "destroy audio..."),
              this._source &&
                this._source.removeEventListener(
                  "ended",
                  this._onSourceBufferEnded
                ),
              this._audioCtx &&
                this.ctxState !== "closed" &&
                this._audioCtx.close(),
              (this._audioCtx = null),
              (this._sampleQueue = null),
              (this._timeRange = null),
              (this._parent = null),
              this.removeAllListeners();
          },
        },
      ]),
      i
    );
  })(),
  kzn = Di,
  Izn = sh.findIndex,
  Dzn = q5,
  mZ = "findIndex",
  wIe = !0;
mZ in [] &&
  Array(1)[mZ](function () {
    wIe = !1;
  }),
  kzn(
    { target: "Array", proto: !0, forced: wIe },
    {
      findIndex: function (t) {
        return Izn(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
    }
  ),
  Dzn(mZ);
var Pzn = Tl,
  Mzn = BD,
  Czn = TypeError,
  $zn = Object.getOwnPropertyDescriptor,
  xzn =
    Pzn &&
    !(function () {
      if (this !== void 0) return !0;
      try {
        Object.defineProperty([], "length", { writable: !1 }).length = 1;
      } catch (t) {
        return t instanceof TypeError;
      }
    })(),
  Lzn = xzn
    ? function (t, e) {
        if (Mzn(t) && !$zn(t, "length").writable)
          throw Czn("Cannot set read only .length");
        return (t.length = e);
      }
    : function (t, e) {
        return (t.length = e);
      },
  Ozn = Di,
  Gzn = id,
  Nzn = $E,
  Fzn = Em,
  Uzn = od,
  Bzn = Lzn,
  Hzn = wKe,
  Xzn = ece,
  Vzn = X5,
  yZ = xce,
  zzn = j5,
  jzn = zzn("splice"),
  Wzn = Math.max,
  Kzn = Math.min;
Ozn(
  { target: "Array", proto: !0, forced: !jzn },
  {
    splice: function (t, e) {
      var n,
        r,
        i,
        o,
        l,
        u,
        c = Gzn(this),
        d = Uzn(c),
        h = Nzn(t, d),
        f = arguments.length;
      for (
        f === 0
          ? (n = r = 0)
          : f === 1
          ? ((n = 0), (r = d - h))
          : ((n = f - 2), (r = Kzn(Wzn(Fzn(e), 0), d - h))),
          Hzn(d + n - r),
          i = Xzn(c, r),
          o = 0;
        o < r;
        o++
      )
        (l = h + o) in c && Vzn(i, o, c[l]);
      if (((i.length = r), n < r)) {
        for (o = h; o < d - r; o++)
          (u = o + n), (l = o + r) in c ? (c[u] = c[l]) : yZ(c, u);
        for (o = d; o > d - r + n; o--) yZ(c, o - 1);
      } else if (n > r)
        for (o = d - r; o > h; o--)
          (u = o + n - 1), (l = o + r - 1) in c ? (c[u] = c[l]) : yZ(c, u);
      for (o = 0; o < n; o++) c[o + h] = arguments[o + 2];
      return Bzn(c, d - r + n), i;
    },
  }
);
var Zzn = Di,
  Yzn = id,
  tYe = z5,
  Qzn = aa,
  Jzn = Qzn(function () {
    tYe(1);
  });
Zzn(
  { target: "Object", stat: !0, forced: Jzn },
  {
    keys: function (t) {
      return tYe(Yzn(t));
    },
  }
);
var qzn = uce.charAt,
  ejn = Qu,
  nYe = Tm,
  tjn = Sce,
  kIe = Rce,
  rYe = "String Iterator",
  njn = nYe.set,
  rjn = nYe.getterFor(rYe);
tjn(
  String,
  "String",
  function (t) {
    njn(this, { type: rYe, string: ejn(t), index: 0 });
  },
  function () {
    var t,
      e = rjn(this),
      n = e.string,
      r = e.index;
    return r >= n.length
      ? kIe(void 0, !0)
      : ((t = qzn(n, r)), (e.index += t.length), kIe(t, !1));
  }
);
var IIe = ja,
  iYe = xWe,
  ijn = LWe,
  SC = HKe,
  vZ = Rb,
  aYe = Gs,
  bZ = aYe("iterator"),
  DIe = aYe("toStringTag"),
  _Z = SC.values,
  oYe = function (t, e) {
    if (t) {
      if (t[bZ] !== _Z)
        try {
          vZ(t, bZ, _Z);
        } catch {
          t[bZ] = _Z;
        }
      if ((t[DIe] || vZ(t, DIe, e), iYe[e])) {
        for (var n in SC)
          if (t[n] !== SC[n])
            try {
              vZ(t, n, SC[n]);
            } catch {
              t[n] = SC[n];
            }
      }
    }
  };
for (var TZ in iYe) oYe(IIe[TZ] && IIe[TZ].prototype, TZ);
function nO(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function PIe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function rO(t, e, n) {
  return (
    e && PIe(t.prototype, e),
    n && PIe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function _p(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function ajn(t, e) {
  return sjn(t) || ujn(t, e) || sYe(t, e) || djn();
}
function wy(t) {
  return ojn(t) || ljn(t) || sYe(t) || cjn();
}
function ojn(t) {
  if (Array.isArray(t)) return Hre(t);
}
function sjn(t) {
  if (Array.isArray(t)) return t;
}
function ljn(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function ujn(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o = [],
      l = !0,
      u = !1;
    try {
      for (
        n = n.call(t);
        !(l = (r = n.next()).done) && (o.push(r.value), !e || o.length !== e);
        l = !0
      );
    } catch (c) {
      (u = !0), (i = c);
    } finally {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw i;
      }
    }
    return o;
  }
}
function sYe(t, e) {
  if (t) {
    if (typeof t == "string") return Hre(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? Hre(t, e)
        : void 0
    );
  }
}
function Hre(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function cjn() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function djn() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
oYe(ijn, "DOMTokenList");
var hjn = Di,
  fjn = U5.includes,
  pjn = aa,
  gjn = q5,
  mjn = pjn(function () {
    return !Array(1).includes();
  });
hjn(
  { target: "Array", proto: !0, forced: mjn },
  {
    includes: function (t) {
      return fjn(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
),
  gjn("includes");
var yjn = $u,
  vjn = Ab,
  bjn = Gs,
  _jn = bjn("match"),
  lYe = function (t) {
    var e;
    return yjn(t) && ((e = t[_jn]) !== void 0 ? !!e : vjn(t) == "RegExp");
  },
  Tjn = lYe,
  Ejn = TypeError,
  uYe = function (t) {
    if (Tjn(t)) throw Ejn("The method doesn't accept regular expressions");
    return t;
  },
  Sjn = Gs,
  Rjn = Sjn("match"),
  cYe = function (t) {
    var e = /./;
    try {
      "/./"[t](e);
    } catch {
      try {
        return (e[Rjn] = !1), "/./"[t](e);
      } catch {}
    }
    return !1;
  },
  Ajn = Di,
  wjn = Fa,
  kjn = uYe,
  Ijn = F0,
  MIe = Qu,
  Djn = cYe,
  Pjn = wjn("".indexOf);
Ajn(
  { target: "String", proto: !0, forced: !Djn("includes") },
  {
    includes: function (t) {
      return !!~Pjn(
        MIe(Ijn(this)),
        MIe(kjn(t)),
        arguments.length > 1 ? arguments[1] : void 0
      );
    },
  }
);
var r6 = { VIDEO: "video", AUDIO: "audio", METADATA: "metadata" },
  CIe = { AVC: "avc", HEVC: "hevc" },
  Mjn = zs,
  Cjn = pu,
  $jn = Sb,
  xjn = nce,
  $Ie = RegExp.prototype,
  Ljn = function (t) {
    var e = t.flags;
    return e !== void 0 || "flags" in $Ie || Cjn(t, "flags") || !$jn($Ie, t)
      ? e
      : Mjn(xjn, t);
  },
  Ojn = FD.PROPER,
  Gjn = ad,
  Njn = Yu,
  xIe = Qu,
  Fjn = aa,
  Ujn = Ljn,
  zce = "toString",
  Bjn = RegExp.prototype,
  dYe = Bjn[zce],
  Hjn = Fjn(function () {
    return dYe.call({ source: "a", flags: "b" }) != "/a/b";
  }),
  Xjn = Ojn && dYe.name != zce;
(Hjn || Xjn) &&
  Gjn(
    RegExp.prototype,
    zce,
    function () {
      var t = Njn(this);
      return "/" + xIe(t.source) + "/" + xIe(Ujn(t));
    },
    { unsafe: !0 }
  );
var Vjn = Tl,
  zjn = FD.EXISTS,
  hYe = Fa,
  jjn = Cu.f,
  fYe = Function.prototype,
  Wjn = hYe(fYe.toString),
  pYe = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,
  Kjn = hYe(pYe.exec),
  Zjn = "name";
Vjn &&
  !zjn &&
  jjn(fYe, Zjn, {
    configurable: !0,
    get: function () {
      try {
        return Kjn(pYe, Wjn(this))[1];
      } catch {
        return "";
      }
    },
  });
var Yjn = Di,
  Qjn = Fa,
  Jjn = UD,
  qjn = Sm,
  eWn = ME,
  tWn = Qjn([].join),
  nWn = Jjn != Object,
  rWn = eWn("join", ",");
function Yg() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  e = e.filter(Boolean);
  var r = new Uint8Array(
      e.reduce(function (o, l) {
        return o + l.byteLength;
      }, 0)
    ),
    i = 0;
  return (
    e.forEach(function (o) {
      r.set(o, i), (i += o.byteLength);
    }),
    r
  );
}
function LIe(t) {
  if (!Array.isArray(t)) {
    for (var e = [], n = "", r = 0; r < t.length; r++)
      r % 2 && ((n = t[r - 1] + t[r]), e.push(parseInt(n, 16)), (n = ""));
    return e;
  }
  return t.map(function (i) {
    return parseInt(i, 16);
  });
}
Yjn(
  { target: "Array", proto: !0, forced: nWn || !rWn },
  {
    join: function (t) {
      return tWn(qjn(this), t === void 0 ? "," : t);
    },
  }
);
var OIe = CWe,
  iWn = Cu,
  gYe = function (t, e, n) {
    return (
      n.get && OIe(n.get, e, { getter: !0 }),
      n.set && OIe(n.set, e, { setter: !0 }),
      iWn.f(t, e, n)
    );
  },
  aWn = ja,
  oWn = Tl,
  sWn = gYe,
  lWn = nce,
  uWn = aa,
  mYe = aWn.RegExp,
  yYe = mYe.prototype,
  cWn =
    oWn &&
    uWn(function () {
      var t = !0;
      try {
        mYe(".", "d");
      } catch {
        t = !1;
      }
      var e = {},
        n = "",
        r = t ? "dgimsy" : "gimsy",
        i = function (u, c) {
          Object.defineProperty(e, u, {
            get: function () {
              return (n += c), !0;
            },
          });
        },
        o = {
          dotAll: "s",
          global: "g",
          ignoreCase: "i",
          multiline: "m",
          sticky: "y",
        };
      for (var l in (t && (o.hasIndices = "d"), o)) i(l, o[l]);
      return (
        Object.getOwnPropertyDescriptor(yYe, "flags").get.call(e) !== r ||
        n !== r
      );
    });
cWn && sWn(yYe, "flags", { configurable: !0, get: lWn });
var dWn = Em,
  hWn = Qu,
  fWn = F0,
  pWn = RangeError,
  vYe = function (t) {
    var e = hWn(fWn(this)),
      n = "",
      r = dWn(t);
    if (r < 0 || r == 1 / 0) throw pWn("Wrong number of repetitions");
    for (; r > 0; (r >>>= 1) && (e += e)) 1 & r && (n += e);
    return n;
  },
  bYe = Fa,
  gWn = B0,
  GIe = Qu,
  mWn = vYe,
  yWn = F0,
  vWn = bYe(mWn),
  bWn = bYe("".slice),
  _Wn = Math.ceil,
  NIe = function (t) {
    return function (e, n, r) {
      var i,
        o,
        l = GIe(yWn(e)),
        u = gWn(n),
        c = l.length,
        d = r === void 0 ? " " : GIe(r);
      return u <= c || d == ""
        ? l
        : ((o = vWn(d, _Wn((i = u - c) / d.length))).length > i &&
            (o = bWn(o, 0, i)),
          t ? l + o : o + l);
    };
  },
  TWn = { start: NIe(!1), end: NIe(!0) },
  EWn = Eb,
  SWn = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(
    EWn
  ),
  RWn = Di,
  AWn = TWn.start,
  wWn = SWn;
RWn(
  { target: "String", proto: !0, forced: wWn },
  {
    padStart: function (t) {
      return AWn(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var kWn = Di,
  IWn = sh.find,
  DWn = q5,
  EZ = "find",
  FIe = !0;
EZ in [] &&
  Array(1)[EZ](function () {
    FIe = !1;
  }),
  kWn(
    { target: "Array", proto: !0, forced: FIe },
    {
      find: function (t) {
        return IWn(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
    }
  ),
  DWn(EZ);
var PWn = Yu,
  MWn = TKe,
  CWn = function (t, e, n, r) {
    try {
      return r ? e(PWn(n)[0], n[1]) : e(n);
    } catch (i) {
      MWn(t, "throw", i);
    }
  },
  $Wn = Av,
  xWn = zs,
  LWn = id,
  OWn = CWn,
  GWn = bce,
  NWn = UB,
  FWn = od,
  UIe = X5,
  UWn = WB,
  BWn = J5,
  BIe = Array,
  _Ye = function (t) {
    var e = LWn(t),
      n = NWn(this),
      r = arguments.length,
      i = r > 1 ? arguments[1] : void 0,
      o = i !== void 0;
    o && (i = $Wn(i, r > 2 ? arguments[2] : void 0));
    var l,
      u,
      c,
      d,
      h,
      f,
      p = BWn(e),
      g = 0;
    if (!p || (this === BIe && GWn(p)))
      for (l = FWn(e), u = n ? new this(l) : BIe(l); l > g; g++)
        (f = o ? i(e[g], g) : e[g]), UIe(u, g, f);
    else
      for (
        h = (d = UWn(e, p)).next, u = n ? new this() : [];
        !(c = xWn(h, d)).done;
        g++
      )
        (f = o ? OWn(d, i, [c.value, g], !0) : c.value), UIe(u, g, f);
    return (u.length = g), u;
  },
  HWn = Di,
  XWn = _Ye,
  VWn = ZB,
  zWn = !VWn(function (t) {
    Array.from(t);
  });
HWn({ target: "Array", stat: !0, forced: zWn }, { from: XWn });
var jWn = Di,
  WWn = ja,
  KWn = Mce,
  ZWn = zB,
  jce = "ArrayBuffer",
  HIe = KWn[jce],
  YWn = WWn[jce];
function QWn(t) {
  for (
    var e = 0, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
    i < n;
    i++
  )
    r[i - 1] = arguments[i];
  r.forEach(function (u) {
    e += u.length;
  });
  var o = new t(e),
    l = 0;
  return (
    r.forEach(function (u) {
      o.set(u, l), (l += u.length);
    }),
    o
  );
}
jWn({ global: !0, constructor: !0, forced: YWn !== HIe }, { ArrayBuffer: HIe }),
  ZWn(jce);
var Zd = (function () {
    function t() {
      nO(this, t), (this.buffer = new Uint8Array(0));
    }
    return (
      rO(
        t,
        [
          {
            key: "write",
            value: function () {
              for (
                var e = this, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              r.forEach(function (o) {
                o
                  ? (e.buffer = QWn(Uint8Array, e.buffer, o))
                  : window.console.warn(o);
              });
            },
          },
        ],
        [
          {
            key: "writeUint16",
            value: function (e) {
              return new Uint8Array([(e >> 8) & 255, 255 & e]);
            },
          },
          {
            key: "writeUint32",
            value: function (e) {
              return new Uint8Array([
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ]);
            },
          },
        ]
      ),
      t
    );
  })(),
  XIe = Math.pow(2, 32) - 1,
  Oa = (function () {
    function t() {
      nO(this, t);
    }
    return (
      rO(t, null, [
        {
          key: "box",
          value: function (e) {
            for (
              var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
              i < n;
              i++
            )
              r[i - 1] = arguments[i];
            var o =
                8 +
                (r = r.filter(Boolean)).reduce(function (c, d) {
                  return c + d.byteLength;
                }, 0),
              l = new Uint8Array(o);
            (l[0] = (o >> 24) & 255),
              (l[1] = (o >> 16) & 255),
              (l[2] = (o >> 8) & 255),
              (l[3] = 255 & o),
              l.set(e, 4);
            var u = 8;
            return (
              r.forEach(function (c) {
                l.set(c, u), (u += c.byteLength);
              }),
              l
            );
          },
        },
        {
          key: "ftyp",
          value: function (e) {
            return e.find(function (n) {
              return n.type === r6.VIDEO && n.codecType === CIe.HEVC;
            })
              ? t.FTYPHEV1
              : t.FTYPAVC1;
          },
        },
        {
          key: "initSegment",
          value: function (e) {
            return Yg(t.ftyp(e), t.moov(e));
          },
        },
        {
          key: "pssh",
          value: function (e) {
            var n = new Uint8Array(
              [1, 0, 0, 0].concat(
                [
                  16, 119, 239, 236, 192, 178, 77, 2, 172, 227, 60, 30, 82, 226,
                  251, 75,
                ],
                [0, 0, 0, 1],
                LIe(e.kid),
                [0, 0, 0, 0]
              )
            );
            return t.box(t.types.pssh, n);
          },
        },
        {
          key: "moov",
          value: function (e) {
            if (e[0].useEME && (e[0].encv || e[0].enca)) {
              e[0].pssh || (e[0].pssh = { kid: e[0].kid });
              var n = this.pssh(e[0].pssh);
              return t.box.apply(
                t,
                [
                  t.types.moov,
                  t.mvhd(
                    e[0].mvhdDurtion || e[0].duration,
                    e[0].mvhdTimecale || e[0].timescale
                  ),
                  t.mvex(e),
                ].concat(
                  wy(
                    e.map(function (r) {
                      return t.trak(r);
                    })
                  ),
                  [n]
                )
              );
            }
            return t.box.apply(
              t,
              [
                t.types.moov,
                t.mvhd(
                  e[0].mvhdDurtion || e[0].duration,
                  e[0].mvhdTimecale || e[0].timescale
                ),
              ].concat(
                wy(
                  e.map(function (r) {
                    return t.trak(r);
                  })
                ),
                [t.mvex(e)]
              )
            );
          },
        },
        {
          key: "mvhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mvhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                1,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                255,
                255,
                255,
                255,
              ])
            );
          },
        },
        {
          key: "trak",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.tkhdDuration || 0, e.width, e.height),
              t.mdia(e)
            );
          },
        },
        {
          key: "tkhd",
          value: function (e, n) {
            var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0,
              i =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : 0;
            return t.box(
              t.types.tkhd,
              new Uint8Array([
                0,
                0,
                0,
                7,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
                (i >> 8) & 255,
                255 & i,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "mdia",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minf(e)
            );
          },
        },
        {
          key: "mdhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mdhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                85,
                196,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "hdlr",
          value: function (e) {
            return t.box(t.types.hdlr, t.HDLR_TYPES[e]);
          },
        },
        {
          key: "minf",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === r6.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stbl(e)
            );
          },
        },
        {
          key: "stbl",
          value: function (e) {
            var n = [];
            return (
              e && e.ext && e.ext.stss && n.push(t.stss(e.ext.stss.entries)),
              t.box(
                t.types.stbl,
                t.stsd(e),
                t.STTS,
                n[0],
                t.STSC,
                t.STSZ,
                t.STCO
              )
            );
          },
        },
        {
          key: "stsd",
          value: function (e) {
            var n;
            return (
              (n =
                e.type === "audio"
                  ? e.useEME && e.enca
                    ? t.enca(e)
                    : t.mp4a(e)
                  : e.useEME && e.encv
                  ? t.encv(e)
                  : t.avc1hev1(e)),
              t.box(t.types.stsd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]), n)
            );
          },
        },
        {
          key: "enca",
          value: function (e) {
            var n = e.enca.channelCount,
              r = e.enca.sampleRate,
              i = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                n,
                0,
                16,
                0,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
              ]),
              o = t.esds(e.config),
              l = t.sinf(e.enca);
            return t.box(t.types.enca, i, o, l);
          },
        },
        {
          key: "encv",
          value: function (e) {
            var n,
              r,
              i = e.sps.length > 0 ? e.sps[0] : [],
              o = e.pps.length > 0 ? e.pps[0] : [],
              l = e.width,
              u = e.height,
              c = e.sarRatio[0],
              d = e.sarRatio[1],
              h = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (l >> 8) & 255,
                255 & l,
                (u >> 8) & 255,
                255 & u,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                18,
                100,
                97,
                105,
                108,
                121,
                109,
                111,
                116,
                105,
                111,
                110,
                47,
                104,
                108,
                115,
                46,
                106,
                115,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              f = new Uint8Array(
                (n = (r = [
                  1,
                  i[1],
                  i[2],
                  i[3],
                  255,
                  225,
                  (i.length >>> 8) & 255,
                  255 & i.length,
                ]).concat
                  .apply(r, wy(i))
                  .concat([
                    1,
                    (o.length >>> 8) & 255,
                    255 & o.length,
                  ])).concat.apply(n, wy(o))
              ),
              p = new Uint8Array([0, 0, 88, 57, 0, 15, 200, 192, 0, 4, 86, 72]),
              g = t.sinf(e.encv),
              y = new Uint8Array([
                c >> 24,
                (c >> 16) & 255,
                (c >> 8) & 255,
                255 & c,
                d >> 24,
                (d >> 16) & 255,
                (d >> 8) & 255,
                255 & d,
              ]);
            return t.box(
              t.types.encv,
              h,
              t.box(t.types.avcC, f),
              t.box(t.types.btrt, p),
              g,
              t.box(t.types.pasp, y)
            );
          },
        },
        {
          key: "schi",
          value: function (e) {
            var n = new Uint8Array([]),
              r = t.tenc(e);
            return t.box(t.types.schi, n, r);
          },
        },
        {
          key: "tenc",
          value: function (e) {
            var n = new Uint8Array(
              [
                0,
                0,
                0,
                0,
                0,
                0,
                255 & e.default_IsEncrypted,
                255 & e.default_IV_size,
              ].concat(LIe(e.default_KID))
            );
            return t.box(t.types.tenc, n);
          },
        },
        {
          key: "sinf",
          value: function (e) {
            var n = new Uint8Array([]),
              r = new Uint8Array([
                e.data_format.charCodeAt(0),
                e.data_format.charCodeAt(1),
                e.data_format.charCodeAt(2),
                e.data_format.charCodeAt(3),
              ]),
              i = new Uint8Array([0, 0, 0, 0, 99, 101, 110, 99, 0, 1, 0, 0]),
              o = t.schi(e);
            return t.box(
              t.types.sinf,
              n,
              t.box(t.types.frma, r),
              t.box(t.types.schm, i),
              o
            );
          },
        },
        {
          key: "avc1hev1",
          value: function (e) {
            var n = e.codecType === CIe.HEVC,
              r = n ? t.types.hvc1 : t.types.avc1,
              i = n ? t.hvcC(e) : t.avcC(e),
              o = [
                new Uint8Array([
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  (e.width >> 8) & 255,
                  255 & e.width,
                  (e.height >> 8) & 255,
                  255 & e.height,
                  0,
                  72,
                  0,
                  0,
                  0,
                  72,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  24,
                  17,
                  17,
                ]),
                i,
              ];
            return (
              n
                ? o.push(t.box(t.types.fiel, new Uint8Array([1, 0])))
                : e.sarRatio &&
                  e.sarRatio.length > 1 &&
                  o.push(t.pasp(e.sarRatio)),
              t.box.apply(t, [r].concat(o))
            );
          },
        },
        {
          key: "avcC",
          value: function (e) {
            var n,
              r,
              i,
              o = [],
              l = [];
            return (
              e.sps.forEach(function (u) {
                (i = u.byteLength),
                  o.push((i >>> 8) & 255),
                  o.push(255 & i),
                  o.push.apply(o, wy(u));
              }),
              e.pps.forEach(function (u) {
                (i = u.byteLength),
                  l.push((i >>> 8) & 255),
                  l.push(255 & i),
                  l.push.apply(l, wy(u));
              }),
              t.box(
                t.types.avcC,
                new Uint8Array(
                  (n = (r = [
                    1,
                    o[3],
                    o[4],
                    o[5],
                    255,
                    224 | e.sps.length,
                  ]).concat
                    .apply(r, o)
                    .concat([e.pps.length])).concat.apply(n, l)
                )
              )
            );
          },
        },
        {
          key: "hvcC",
          value: function (e) {
            var n = e.hvcC;
            if (n instanceof ArrayBuffer || n instanceof Uint8Array) return n;
            var r,
              i = e.vps,
              o = e.sps,
              l = e.pps;
            if (n) {
              var u = n.generalProfileCompatibilityFlags,
                c = n.generalConstraintIndicatorFlags,
                d = (i.length && 1) + (o.length && 1) + (l.length && 1);
              r = [
                1,
                (n.generalProfileSpace << 6) |
                  (n.generalTierFlag << 5) |
                  n.generalProfileIdc,
                u >>> 24,
                u >>> 16,
                u >>> 8,
                u,
                c[0],
                c[1],
                c[2],
                c[3],
                c[4],
                c[5],
                n.generalLevelIdc,
                240,
                0,
                252,
                252 | n.chromaFormatIdc,
                248 | n.bitDepthLumaMinus8,
                248 | n.bitDepthChromaMinus8,
                0,
                0,
                (n.numTemporalLayers << 3) | (n.temporalIdNested << 2) | 3,
                d,
              ];
              var h = function (f) {
                var p;
                r.push(f.length >> 8, f.length), (p = r).push.apply(p, wy(f));
              };
              i.length && (r.push(160, 0, i.length), i.forEach(h)),
                o.length && (r.push(161, 0, o.length), o.forEach(h)),
                l.length && (r.push(162, 0, l.length), l.forEach(h));
            } else
              r = [
                1, 1, 96, 0, 0, 0, 144, 0, 0, 0, 0, 0, 93, 240, 0, 252, 253,
                248, 248, 0, 0, 15, 3, 160, 0, 1, 0, 24, 64, 1, 12, 1, 255, 255,
                1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0, 0, 3, 0, 93, 153, 152, 9,
                161, 0, 1, 0, 45, 66, 1, 1, 1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0,
                0, 3, 0, 93, 160, 2, 128, 128, 45, 22, 89, 153, 164, 147, 43,
                154, 128, 128, 128, 130, 0, 0, 3, 0, 2, 0, 0, 3, 0, 50, 16, 162,
                0, 1, 0, 7, 68, 1, 193, 114, 180, 98, 64,
              ];
            return t.box(t.types.hvcC, new Uint8Array(r));
          },
        },
        {
          key: "pasp",
          value: function (e) {
            var n = ajn(e, 2),
              r = n[0],
              i = n[1];
            return t.box(
              t.types.pasp,
              new Uint8Array([
                r >> 24,
                (r >> 16) & 255,
                (r >> 8) & 255,
                255 & r,
                i >> 24,
                (i >> 16) & 255,
                (i >> 8) & 255,
                255 & i,
              ])
            );
          },
        },
        {
          key: "mp4a",
          value: function (e) {
            return t.box(
              t.types.mp4a,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                e.channelCount,
                0,
                16,
                0,
                0,
                0,
                0,
                (e.sampleRate >> 8) & 255,
                255 & e.sampleRate,
                0,
                0,
              ]),
              e.config.length ? t.esds(e.config) : void 0
            );
          },
        },
        {
          key: "esds",
          value: function (e) {
            var n = e.length;
            return t.box(
              t.types.esds,
              new Uint8Array(
                [
                  0,
                  0,
                  0,
                  0,
                  3,
                  23 + n,
                  0,
                  0,
                  0,
                  4,
                  15 + n,
                  64,
                  21,
                  0,
                  6,
                  0,
                  0,
                  0,
                  218,
                  192,
                  0,
                  0,
                  218,
                  192,
                  5,
                ]
                  .concat([n])
                  .concat(e)
                  .concat([6, 1, 2])
              )
            );
          },
        },
        {
          key: "mvex",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.mvex].concat(
                wy(
                  e.map(function (n) {
                    return t.trex(n.id);
                  })
                )
              )
            );
          },
        },
        {
          key: "trex",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                1,
              ])
            );
          },
        },
        {
          key: "trex1",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                2,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "trex2",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                4,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "moof",
          value: function (e) {
            return t.box.apply(
              t,
              [
                t.types.moof,
                t.mfhd(e[0].samples ? e[0].samples[0].gopId : 0),
              ].concat(
                wy(
                  e.map(function (n) {
                    return t.traf(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "mfhd",
          value: function (e) {
            return t.box(
              t.types.mfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "traf",
          value: function (e) {
            var n = t.tfhd(e.id),
              r = t.tfdt(e, e.baseMediaDecodeTime),
              i = 0;
            if (
              (e.isVideo &&
                e.videoSenc &&
                e.videoSenc.forEach(function (I) {
                  (i += 8),
                    I.subsamples &&
                      I.subsamples.length &&
                      ((i += 2), (i += 6 * I.subsamples.length));
                }),
              (e.videoSencLength = i),
              e.useEME && (e.isVideoEncryption || e.isAudioEncryption))
            ) {
              if (e.isVideoEncryption) {
                if (e.isVideo) {
                  var o = t.saiz(e),
                    l = t.saio(e),
                    u = t.trun1(e),
                    c = t.senc(e);
                  return t.box(t.types.traf, n, r, o, l, u, c);
                }
                if (e.isAudioEncryption) {
                  var d = t.sbgp(),
                    h = t.saiz(e),
                    f = t.saio(e),
                    p = t.senc(e),
                    g = t.trun1(e);
                  return t.box(t.types.traf, n, r, d, h, f, p, g);
                }
                var y = t.sbgp(),
                  v = t.trun1(e);
                return t.box(t.types.traf, n, r, y, v);
              }
              if (e.isVideo) {
                var b = t.trun1(e);
                return t.box(t.types.traf, n, r, b);
              }
              var w = t.sbgp(),
                k = t.saiz(e),
                D = t.saio(e),
                $ = t.senc(e),
                N = t.trun1(e);
              return t.box(t.types.traf, n, r, w, k, D, $, N);
            }
            var P = t.sdtp(e);
            return t.box(
              t.types.traf,
              n,
              r,
              P,
              t.trun(e.samples, P.byteLength + 76)
            );
          },
        },
        {
          key: "sdtp",
          value: function (e) {
            var n = new Zd();
            return (
              e.samples.forEach(function (r) {
                n.write(
                  new Uint8Array(e.isVideo ? [r.keyframe ? 32 : 16] : [16])
                );
              }),
              t.box(t.types.sdtp, this.extension(0, 0), n.buffer)
            );
          },
        },
        {
          key: "trun1",
          value: function (e) {
            var n = new Zd(),
              r = Zd.writeUint32(e.samples.length),
              i = null;
            if (e.isVideo) {
              var o = e.videoSencLength;
              (i = Zd.writeUint32(16 * e.samples.length + o + 149)),
                !e.isVideoEncryption &&
                  e.isAudioEncryption &&
                  (i = Zd.writeUint32(16 * e.samples.length + 92));
            } else {
              var l = 12 * e.samples.length + 124;
              e.isAudioEncryption &&
                (l = 12 * e.samples.length + 8 * e.audioSenc.length + 177),
                (i = Zd.writeUint32(l));
            }
            return (
              e.samples.forEach(function (u) {
                n.write(Zd.writeUint32(u.duration)),
                  n.write(Zd.writeUint32(u.size)),
                  n.write(Zd.writeUint32(u.keyframe ? 33554432 : 65536)),
                  e.isVideo && n.write(Zd.writeUint32(u.cts ? u.cts : 0));
              }),
              t.box(t.types.trun, this.extension(0, e.flags), r, i, n.buffer)
            );
          },
        },
        {
          key: "senc",
          value: function (e) {
            var n = new Zd(),
              r = e.samples.length,
              i = e.isVideo ? 16 : 8,
              o = e.isVideo ? 2 : 0,
              l = [],
              u = 0;
            return (
              e.isVideo
                ? ((l = e.videoSenc), (u = e.videoSencLength))
                : (l = e.audioSenc),
              (u = u || i * r),
              n.write(
                Zd.writeUint32(16 + u),
                t.types.senc,
                this.extension(0, o)
              ),
              n.write(Zd.writeUint32(r)),
              l.forEach(function (c) {
                for (var d = 0; d < c.InitializationVector.length; d++)
                  n.write(new Uint8Array([c.InitializationVector[d]]));
                c.subsamples &&
                  c.subsamples.length &&
                  (n.write(Zd.writeUint16(c.subsamples.length)),
                  c.subsamples.forEach(function (h) {
                    n.write(Zd.writeUint16(h.BytesOfClearData)),
                      n.write(Zd.writeUint32(h.BytesOfProtectedData));
                  }));
              }),
              n.buffer
            );
          },
        },
        {
          key: "saio",
          value: function (e) {
            var n = 12 * e.samples.length + 141;
            !e.isVideo && e.isAudioEncryption && (n = 149);
            var r = new Uint8Array([
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              0,
              0,
              0,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
            return t.box(t.types.saio, r);
          },
        },
        {
          key: "saiz",
          value: function (e) {
            var n = e.samples.length,
              r = new Uint8Array([
                0,
                0,
                0,
                0,
                16,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
              ]);
            return t.box(t.types.saiz, r);
          },
        },
        {
          key: "sbgp",
          value: function () {
            var e = new Uint8Array([
              114, 111, 108, 108, 0, 0, 0, 1, 0, 0, 1, 25, 0, 0, 0, 1,
            ]);
            return t.box(t.types.sbgp, this.extension(0, 0), e);
          },
        },
        {
          key: "extension",
          value: function (e, n) {
            return new Uint8Array([
              e,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
          },
        },
        {
          key: "tfhd",
          value: function (e) {
            return t.box(
              t.types.tfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "tfdt",
          value: function (e, n) {
            var r = Math.floor(n / (XIe + 1)),
              i = Math.floor(n % (XIe + 1));
            return e.useEME && (e.isVideoEncryption || e.isAudioEncryption)
              ? t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                )
              : t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    1,
                    0,
                    0,
                    0,
                    r >> 24,
                    (r >> 16) & 255,
                    (r >> 8) & 255,
                    255 & r,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                );
          },
        },
        {
          key: "trun",
          value: function (e, n) {
            var r = e.length,
              i = 12 + 16 * r;
            n += 8 + i;
            var o = new Uint8Array(i);
            o.set(
              [
                0,
                0,
                15,
                1,
                (r >>> 24) & 255,
                (r >>> 16) & 255,
                (r >>> 8) & 255,
                255 & r,
                (n >>> 24) & 255,
                (n >>> 16) & 255,
                (n >>> 8) & 255,
                255 & n,
              ],
              0
            );
            for (var l = 0; l < r; l++) {
              var u = e[l],
                c = u.duration,
                d = u.size,
                h = u.flag,
                f = h === void 0 ? {} : h,
                p = u.cts,
                g = p === void 0 ? 0 : p;
              o.set(
                [
                  (c >>> 24) & 255,
                  (c >>> 16) & 255,
                  (c >>> 8) & 255,
                  255 & c,
                  (d >>> 24) & 255,
                  (d >>> 16) & 255,
                  (d >>> 8) & 255,
                  255 & d,
                  (f.isLeading << 2) |
                    (f.dependsOn === null || f.dependsOn === void 0
                      ? 1
                      : f.dependsOn),
                  (f.isDependedOn << 6) |
                    (f.hasRedundancy << 4) |
                    (f.paddingValue << 1) |
                    (f.isNonSyncSample === null || f.isNonSyncSample === void 0
                      ? 1
                      : f.isNonSyncSample),
                  61440 & f.degradationPriority,
                  15 & f.degradationPriority,
                  (g >>> 24) & 255,
                  (g >>> 16) & 255,
                  (g >>> 8) & 255,
                  255 & g,
                ],
                12 + 16 * l
              );
            }
            return t.box(t.types.trun, o);
          },
        },
        {
          key: "moovMP4",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.moov, t.mvhd(e[0].duration, e[0].timescale)].concat(
                wy(
                  e.map(function (n) {
                    return t.trackMP4(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "trackMP4",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.duration, e.width, e.height),
              t.mdiaMP4(e)
            );
          },
        },
        {
          key: "mdiaMP4",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minfMP4(e)
            );
          },
        },
        {
          key: "minfMP4",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === r6.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stblMP4(e)
            );
          },
        },
        {
          key: "stblMP4",
          value: function (e) {
            var n = e.ext,
              r = [
                t.stsd(e),
                t.stts(n.stts),
                t.stsc(n.stsc),
                t.stsz(n.stsz),
                t.stco(n.stco),
              ];
            return (
              n.stss.length && r.push(t.stss(n.stss)),
              n.ctts.length && r.push(t.ctts(n.ctts)),
              t.box.apply(t, [t.types.stbl].concat(r))
            );
          },
        },
        {
          key: "stts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.stts,
                Yg(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsc",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(12 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.firstChunk,
                  u = o.samplesPerChunk,
                  c = o.sampleDescIndex;
                r.set(
                  [
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    c >> 24,
                    (c >> 16) & 255,
                    (c >> 8) & 255,
                    255 & c,
                  ],
                  i
                ),
                  (i += 12);
              }),
              t.box(
                t.types.stsc,
                Yg(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsz",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stsz,
                Yg(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stco",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stco,
                Yg(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stss",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stss,
                Yg(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "ctts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.ctts,
                Yg(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "styp",
          value: function () {
            return t.box(
              t.types.styp,
              new Uint8Array([
                109, 115, 100, 104, 0, 0, 0, 0, 109, 115, 100, 104, 109, 115,
                105, 120,
              ])
            );
          },
        },
        {
          key: "sidx",
          value: function (e) {
            var n = e.timescale,
              r = e.samples[0].duration,
              i = r * e.samples.length,
              o = e.samples[0].sampleOffset * r,
              l = 8;
            e.samples.forEach(function (f) {
              l += f.size;
            });
            var u = 0;
            if (e.isVideo) {
              var c,
                d = 0;
              e.videoSenc && (c = e.videoSenc),
                e.isVideo &&
                  c.forEach(function (f) {
                    (d += 8),
                      f.subsamples &&
                        f.subsamples.length &&
                        ((d += 2), (d += 6 * f.subsamples.length));
                  }),
                (e.videoSencLength = d),
                (u = l + 141 + 16 * e.samples.length + d),
                e.useEME &&
                  e.isAudioEncryption &&
                  !e.isVideoEncryption &&
                  (u = l + 16 * e.samples.length + 84);
            } else
              (u = l + 116 + 12 * e.samples.length),
                e.useEME &&
                  e.isAudioEncryption &&
                  (u =
                    l + 169 + 12 * e.samples.length + 8 * e.audioSenc.length);
            var h = new Uint8Array([
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              255 & e.id,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
              (o >> 24) & 255,
              (o >> 16) & 255,
              (o >> 8) & 255,
              255 & o,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              (u >> 16) & 255,
              (u >> 8) & 255,
              255 & u,
              (i >> 24) & 255,
              (i >> 16) & 255,
              (i >> 8) & 255,
              255 & i,
              144,
              0,
              0,
              0,
            ]);
            return t.box(t.types.sidx, h);
          },
        },
        {
          key: "mdat",
          value: function (e) {
            return t.box(t.types.mdat, e);
          },
        },
      ]),
      t
    );
  })();
_p(
  Oa,
  "types",
  [
    "avc1",
    "avcC",
    "hvc1",
    "hvcC",
    "dinf",
    "dref",
    "esds",
    "ftyp",
    "hdlr",
    "mdat",
    "mdhd",
    "mdia",
    "mfhd",
    "minf",
    "moof",
    "moov",
    "mp4a",
    "mvex",
    "mvhd",
    "pasp",
    "stbl",
    "stco",
    "stsc",
    "stsd",
    "stsz",
    "stts",
    "tfdt",
    "tfhd",
    "traf",
    "trak",
    "trex",
    "tkhd",
    "vmhd",
    "smhd",
    "ctts",
    "stss",
    "styp",
    "pssh",
    "sidx",
    "sbgp",
    "saiz",
    "saio",
    "senc",
    "trun",
    "encv",
    "enca",
    "sinf",
    "btrt",
    "frma",
    "tenc",
    "schm",
    "schi",
    "mehd",
    "fiel",
    "sdtp",
  ].reduce(function (t, e) {
    return (
      (t[e] = [
        e.charCodeAt(0),
        e.charCodeAt(1),
        e.charCodeAt(2),
        e.charCodeAt(3),
      ]),
      t
    );
  }, Object.create(null))
),
  _p(Oa, "HDLR_TYPES", {
    video: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
    audio: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
  }),
  _p(
    Oa,
    "FTYPAVC1",
    Oa.box(
      Oa.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 97, 118, 99, 49,
      ])
    )
  ),
  _p(
    Oa,
    "FTYPHEV1",
    Oa.box(
      Oa.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 104, 101, 118, 49,
      ])
    )
  ),
  _p(
    Oa,
    "DINF",
    Oa.box(
      Oa.types.dinf,
      Oa.box(
        Oa.types.dref,
        new Uint8Array([
          0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1,
        ])
      )
    )
  ),
  _p(
    Oa,
    "VMHD",
    Oa.box(Oa.types.vmhd, new Uint8Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  _p(
    Oa,
    "SMHD",
    Oa.box(Oa.types.smhd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  _p(Oa, "StblTable", new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0])),
  _p(Oa, "STTS", Oa.box(Oa.types.stts, Oa.StblTable)),
  _p(Oa, "STSC", Oa.box(Oa.types.stsc, Oa.StblTable)),
  _p(
    Oa,
    "STSZ",
    Oa.box(Oa.types.stsz, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  _p(Oa, "STCO", Oa.box(Oa.types.stco, Oa.StblTable));
var TYe = (function () {
  function t(e, n) {
    nO(this, t),
      (this.name = e || ""),
      (this._prefix = "[".concat(this.name, "]")),
      (t.disabled = n);
  }
  return (
    rO(
      t,
      [
        {
          key: "debug",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).debug.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "log",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).log.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "warn",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).warn.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "error",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).error.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "table",
          value: function () {
            var e;
            t.disabled ||
              (console.group(this._prefix),
              (e = console).table.apply(e, arguments),
              console.groupEnd());
          },
        },
      ],
      [
        {
          key: "enable",
          value: function () {
            t.disabled = !1;
          },
        },
        {
          key: "disable",
          value: function () {
            t.disabled = !0;
          },
        },
      ]
    ),
    t
  );
})();
_p(TYe, "disabled", !0);
var JWn = (function () {
    function t(e, n, r) {
      nO(this, t), (this.videoTrack = e), (this.audioTrack = n);
      var i = /Chrome\/([^.]+)/.exec(navigator.userAgent);
      (this.forceFirstIDR = i && Number(i[1]) < 50),
        (this.log = new TYe("FMP4Remuxer", !r || !r.openLog || !r.openLog));
    }
    return (
      rO(t, [
        {
          key: "remux",
          value: function () {
            var e,
              n,
              r,
              i,
              o,
              l =
                arguments.length > 0 && arguments[0] !== void 0 && arguments[0],
              u =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : {},
              c = this.videoTrack,
              d = this.audioTrack,
              h = c.exist(),
              f = d.exist(),
              p = [];
            return (
              l &&
                (u && u.initMerge
                  ? (h && p.push(this.videoTrack),
                    f && p.push(this.audioTrack),
                    (r = Oa.initSegment(p)))
                  : (h && (e = Oa.initSegment([this.videoTrack])),
                    f && (n = Oa.initSegment([this.audioTrack])))),
              h && c.hasSample() && (i = this._remuxVideo()),
              f && d.hasSample() && (o = this._remuxAudio()),
              (c.samples = []),
              (d.samples = []),
              {
                initSegment: r,
                videoInitSegment: e,
                audioInitSegment: n,
                videoSegment: i,
                audioSegment: o,
              }
            );
          },
        },
        {
          key: "_remuxVideo",
          value: function () {
            var e = this.videoTrack;
            this.forceFirstIDR &&
              (e.samples[0].flag = { dependsOn: 2, isNonSyncSample: 0 });
            var n = e.samples,
              r = 0;
            n.forEach(function (p) {
              (r += p.units.reduce(function (g, y) {
                return g + y.byteLength;
              }, 0)),
                (r += 4 * p.units.length);
            });
            for (
              var i,
                o = new Uint8Array(r),
                l = new DataView(o.buffer),
                u = function (p, g, y, v) {
                  v = n[p];
                  var b = 0;
                  v.units.forEach(function (w) {
                    l.setUint32(y, w.byteLength),
                      (y += 4),
                      o.set(w, y),
                      (y += w.byteLength),
                      (b += 4 + w.byteLength);
                  }),
                    (v.size = b),
                    (h = y),
                    (i = v);
                },
                c = 0,
                d = n.length,
                h = 0;
              c < d;
              c++
            )
              u(c, 0, h, i);
            var f = Oa.mdat(o);
            return Yg(Oa.moof([e]), f);
          },
        },
        {
          key: "_remuxAudio",
          value: function () {
            var e = this.audioTrack,
              n = new Uint8Array(
                e.samples.reduce(function (i, o) {
                  return i + o.size;
                }, 0)
              );
            e.samples.reduce(function (i, o) {
              return n.set(o.data, i), i + o.size;
            }, 0);
            var r = Oa.mdat(n);
            return Yg(Oa.moof([e]), r);
          },
        },
        {
          key: "reset",
          value: function () {
            this.videoTrack.reset(), this.audioTrack.reset();
          },
        },
      ]),
      t
    );
  })(),
  qWn = (function () {
    function t(e, n) {
      nO(this, t), (this.videoTrack = e), (this.audioTrack = n);
    }
    return (
      rO(t, [
        {
          key: "remux",
          value: function (e, n) {
            (this.videoTrack = e || this.videoTrack),
              (this.audioTrack = n || this.audioTrack);
            var r,
              i,
              o =
                (e == null ? void 0 : e.exist()) &&
                (e == null ? void 0 : e.hasSample()),
              l =
                (n == null ? void 0 : n.exist()) &&
                (n == null ? void 0 : n.hasSample());
            return (
              o && l
                ? (r = this._remuxMix(e, n))
                : o
                ? (r = this._remuxTrack(e))
                : l && (i = this._remuxTrack(n)),
              e && (e.samples = []),
              n && (n.samples = []),
              { videoSegment: r, audioSegment: i }
            );
          },
        },
        {
          key: "_remuxMix",
          value: function (e, n) {
            var r = Oa.ftyp([e, n]),
              i = this._remuxData(e, r.byteLength + 8),
              o = i.mdatData,
              l = i.chunkOffset,
              u = this._remuxData(n, l).mdatData,
              c = Oa.mdat(Yg(o, u)),
              d = Oa.moovMP4([e, n]);
            return (
              (e.ext = void 0),
              (n.ext = void 0),
              (e.samples = []),
              (n.samples = []),
              Yg(r, c, d)
            );
          },
        },
        {
          key: "_remuxTrack",
          value: function (e) {
            var n = Oa.ftyp([e]),
              r = this._remuxData(e, n.byteLength + 8).mdatData,
              i = Oa.mdat(r),
              o = Oa.moovMP4([e]);
            return (e.ext = void 0), (e.samples = []), Yg(n, i, o);
          },
        },
        {
          key: "_remuxData",
          value: function (e, n) {
            var r = e.type === r6.VIDEO,
              i = e.samples,
              o = 0;
            r
              ? i.forEach(function (v) {
                  (o += v.units.reduce(function (b, w) {
                    return b + w.byteLength;
                  }, 0)),
                    (o += 4 * v.units.length);
                })
              : (o = i.reduce(function (v, b) {
                  return v + b.size;
                }, 0));
            for (
              var l,
                u = new Uint8Array(o),
                c = new DataView(u.buffer),
                d = (e.ext = {
                  stts: [],
                  stsc: [],
                  stsz: [],
                  stco: [],
                  stss: [],
                  ctts: [],
                }),
                h = 0,
                f = 0,
                p = i.length,
                g = 0;
              g < p;
              g++
            ) {
              f += (l = i[g]).duration;
              var y = r ? 0 : l.size;
              r
                ? l.units.forEach(function (v) {
                    c.setUint32(h, v.byteLength),
                      (h += 4),
                      u.set(v, h),
                      (h += v.byteLength),
                      (y += 4 + v.byteLength);
                  })
                : (u.set(l.data, h), (h += y)),
                (l.size = y),
                d.stsz.push(y),
                r && this._fillCttsSamples(d.ctts, l.cts),
                this._fillSttsSamples(d.stts, l, i[g + 1]),
                this._fillStcoSamples(d.stco, g, 1, n),
                (n += y),
                r && l.keyframe && d.stss.push(g + 1);
            }
            return (
              (e.duration = f),
              this._fillStscSamples(d.stsc, p, 1),
              { mdatData: u, chunkOffset: n }
            );
          },
        },
        {
          key: "_fillSttsSamples",
          value: function (e, n, r) {
            var i = e[e.length - 1];
            r
              ? i && i.value === n.duration
                ? i.count++
                : e.push({ value: n.duration, count: 1 })
              : i
              ? i.count++
              : e.push({ value: 40, count: 1 });
          },
        },
        {
          key: "_fillCttsSamples",
          value: function (e, n) {
            var r = e[e.length - 1];
            r && r.value === n ? r.count++ : e.push({ value: n, count: 1 });
          },
        },
        {
          key: "_fillStcoSamples",
          value: function (e, n, r, i) {
            n % r || e.push(i);
          },
        },
        {
          key: "_fillStscSamples",
          value: function (e, n, r) {
            if (n <= r)
              e.push({ firstChunk: 1, samplesPerChunk: n, sampleDescIndex: 1 });
            else {
              var i = Math.floor(n / r),
                o = n % r;
              e.push({ firstChunk: 1, samplesPerChunk: r, sampleDescIndex: 1 }),
                o &&
                  e.push({
                    firstChunk: i + 1,
                    samplesPerChunk: o,
                    sampleDescIndex: 1,
                  });
            }
          },
        },
      ]),
      t
    );
  })();
function Q2() {
  Q2 = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = E.iterator[S.method];
    if (L === void 0) {
      if (((S.delegate = null), S.method === "throw")) {
        if (
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")
        )
          return f;
        (S.method = "throw"),
          (S.arg = new TypeError(
            "The iterator does not provide a 'throw' method"
          ));
      }
      return f;
    }
    var W = h(L, E.iterator, S.arg);
    if (W.type === "throw")
      return (S.method = "throw"), (S.arg = W.arg), (S.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((S[E.resultName] = F.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : F
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function VIe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function SZ(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        VIe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        VIe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function rH(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function zIe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function iH(t, e, n) {
  return (
    e && zIe(t.prototype, e),
    n && zIe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function iu(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function eKn(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && aH(t, e);
}
function N8(t) {
  return (N8 = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function aH(t, e) {
  return (aH = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function EYe() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function SYe(t, e, n) {
  return (SYe = EYe()
    ? Reflect.construct.bind()
    : function (r, i, o) {
        var l = [null];
        l.push.apply(l, i);
        var u = new (Function.bind.apply(r, l))();
        return o && aH(u, o.prototype), u;
      }).apply(null, arguments);
}
function tKn(t) {
  return Function.toString.call(t).indexOf("[native code]") !== -1;
}
function Xre(t) {
  var e = typeof Map == "function" ? new Map() : void 0;
  return (
    (Xre = function (n) {
      if (n === null || !tKn(n)) return n;
      if (typeof n != "function")
        throw new TypeError(
          "Super expression must either be null or a function"
        );
      if (e !== void 0) {
        if (e.has(n)) return e.get(n);
        e.set(n, r);
      }
      function r() {
        return SYe(n, arguments, N8(this).constructor);
      }
      return (
        (r.prototype = Object.create(n.prototype, {
          constructor: {
            value: r,
            enumerable: !1,
            writable: !0,
            configurable: !0,
          },
        })),
        aH(r, n)
      );
    }),
    Xre(t)
  );
}
function nKn(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function rKn(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return nKn(t);
}
function iKn(t) {
  var e = EYe();
  return function () {
    var n,
      r = N8(t);
    if (e) {
      var i = N8(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return rKn(this, n);
  };
}
var aKn = aa,
  oKn = Gs,
  sKn = QLn,
  lKn = oKn("iterator"),
  RYe = !aKn(function () {
    var t = new URL("b?a=1&b=2&c=3", "http://a"),
      e = t.searchParams,
      n = "";
    return (
      (t.pathname = "c%20d"),
      e.forEach(function (r, i) {
        e.delete("b"), (n += i + r);
      }),
      (sKn && !t.toJSON) ||
        !e.sort ||
        t.href !== "http://a/c%20d?a=1&c=3" ||
        e.get("c") !== "3" ||
        String(new URLSearchParams("?a=1")) !== "a=1" ||
        !e[lKn] ||
        new URL("https://a@b").username !== "a" ||
        new URLSearchParams(new URLSearchParams("a=b")).get("a") !== "b" ||
        new URL("http://тест").host !== "xn--e1aybc" ||
        new URL("http://a#б").hash !== "#%D0%B1" ||
        n !== "a1c3" ||
        new URL("http://x", void 0).host !== "x"
    );
  }),
  LR = Fa,
  RZ = 2147483647,
  F$ = 36,
  AYe = 1,
  Vre = 26,
  uKn = 38,
  cKn = 700,
  dKn = 72,
  hKn = 128,
  fKn = "-",
  pKn = /[^\0-\u007E]/,
  wYe = /[.\u3002\uFF0E\uFF61]/g,
  jIe = "Overflow: input needs wider integers to process",
  AZ = F$ - AYe,
  WIe = RangeError,
  gKn = LR(wYe.exec),
  Dk = Math.floor,
  wZ = String.fromCharCode,
  KIe = LR("".charCodeAt),
  kYe = LR([].join),
  $T = LR([].push),
  mKn = LR("".replace),
  yKn = LR("".split),
  vKn = LR("".toLowerCase),
  bKn = function (t) {
    for (var e = [], n = 0, r = t.length; n < r; ) {
      var i = KIe(t, n++);
      if (i >= 55296 && i <= 56319 && n < r) {
        var o = KIe(t, n++);
        (64512 & o) == 56320
          ? $T(e, ((1023 & i) << 10) + (1023 & o) + 65536)
          : ($T(e, i), n--);
      } else $T(e, i);
    }
    return e;
  },
  ZIe = function (t) {
    return t + 22 + 75 * (t < 26);
  },
  _Kn = function (t, e, n) {
    var r = 0;
    for (t = n ? Dk(t / cKn) : t >> 1, t += Dk(t / e); t > (AZ * Vre) >> 1; )
      (t = Dk(t / AZ)), (r += F$);
    return Dk(r + ((AZ + 1) * t) / (t + uKn));
  },
  TKn = function (t) {
    var e,
      n,
      r = [],
      i = (t = bKn(t)).length,
      o = hKn,
      l = 0,
      u = dKn;
    for (e = 0; e < t.length; e++) (n = t[e]) < 128 && $T(r, wZ(n));
    var c = r.length,
      d = c;
    for (c && $T(r, fKn); d < i; ) {
      var h = RZ;
      for (e = 0; e < t.length; e++) (n = t[e]) >= o && n < h && (h = n);
      var f = d + 1;
      if (h - o > Dk((RZ - l) / f)) throw WIe(jIe);
      for (l += (h - o) * f, o = h, e = 0; e < t.length; e++) {
        if ((n = t[e]) < o && ++l > RZ) throw WIe(jIe);
        if (n == o) {
          for (var p = l, g = F$; ; ) {
            var y = g <= u ? AYe : g >= u + Vre ? Vre : g - u;
            if (p < y) break;
            var v = p - y,
              b = F$ - y;
            $T(r, wZ(ZIe(y + (v % b)))), (p = Dk(v / b)), (g += F$);
          }
          $T(r, wZ(ZIe(p))), (u = _Kn(l, f, d == c)), (l = 0), d++;
        }
      }
      l++, o++;
    }
    return kYe(r, "");
  },
  EKn = function (t) {
    var e,
      n,
      r = [],
      i = yKn(mKn(vKn(t), wYe, "."), ".");
    for (e = 0; e < i.length; e++)
      (n = i[e]), $T(r, gKn(pKn, n) ? "xn--" + TKn(n) : n);
    return kYe(r, ".");
  },
  kZ = Di,
  sD = ja,
  U4 = zs,
  bv = Fa,
  SKn = Tl,
  YIe = RYe,
  QIe = ad,
  RKn = Dce,
  AKn = LE,
  wKn = GKe,
  Wce = Tm,
  IYe = $R,
  IZ = Ss,
  kKn = pu,
  IKn = Av,
  DKn = wb,
  PKn = Yu,
  DYe = $u,
  wp = Qu,
  MKn = CR,
  JIe = MR,
  zre = WB,
  CKn = J5,
  fw = jB,
  $Kn = Gs,
  xKn = Uce,
  LKn = $Kn("iterator"),
  dL = "URLSearchParams",
  PYe = dL + "Iterator",
  MYe = Wce.set,
  a0 = Wce.getterFor(dL),
  OKn = Wce.getterFor(PYe),
  GKn = Object.getOwnPropertyDescriptor,
  Kce = function (t) {
    if (!SKn) return sD[t];
    var e = GKn(sD, t);
    return e && e.value;
  },
  qIe = Kce("fetch"),
  F8 = Kce("Request"),
  U$ = Kce("Headers"),
  DZ = F8 && F8.prototype,
  eDe = U$ && U$.prototype,
  NKn = sD.RegExp,
  FKn = sD.TypeError,
  CYe = sD.decodeURIComponent,
  UKn = sD.encodeURIComponent,
  BKn = bv("".charAt),
  tDe = bv([].join),
  ES = bv([].push),
  jre = bv("".replace),
  HKn = bv([].shift),
  nDe = bv([].splice),
  rDe = bv("".split),
  XKn = bv("".slice),
  VKn = /\+/g,
  iDe = Array(4),
  zKn = function (t) {
    return (
      iDe[t - 1] || (iDe[t - 1] = NKn("((?:%[\\da-f]{2}){" + t + "})", "gi"))
    );
  },
  jKn = function (t) {
    try {
      return CYe(t);
    } catch {
      return t;
    }
  },
  aDe = function (t) {
    var e = jre(t, VKn, " "),
      n = 4;
    try {
      return CYe(e);
    } catch {
      for (; n; ) e = jre(e, zKn(n--), jKn);
      return e;
    }
  },
  WKn = /[!'()~]|%20/g,
  KKn = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
  },
  ZKn = function (t) {
    return KKn[t];
  },
  oDe = function (t) {
    return jre(UKn(t), WKn, ZKn);
  },
  PZ = wKn(
    function (t, e) {
      MYe(this, { type: PYe, iterator: zre(a0(t).entries), kind: e });
    },
    "Iterator",
    function () {
      var t = OKn(this),
        e = t.kind,
        n = t.iterator.next(),
        r = n.value;
      return (
        n.done ||
          (n.value =
            e === "keys" ? r.key : e === "values" ? r.value : [r.key, r.value]),
        n
      );
    },
    !0
  ),
  $Ye = function (t) {
    (this.entries = []),
      (this.url = null),
      t !== void 0 &&
        (DYe(t)
          ? this.parseObject(t)
          : this.parseQuery(
              typeof t == "string" ? (BKn(t, 0) === "?" ? XKn(t, 1) : t) : wp(t)
            ));
  };
$Ye.prototype = {
  type: dL,
  bindURL: function (t) {
    (this.url = t), this.update();
  },
  parseObject: function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = CKn(t);
    if (c)
      for (n = (e = zre(t, c)).next; !(r = U4(n, e)).done; ) {
        if (
          ((o = (i = zre(PKn(r.value))).next),
          (l = U4(o, i)).done || (u = U4(o, i)).done || !U4(o, i).done)
        )
          throw FKn("Expected sequence with length 2");
        ES(this.entries, { key: wp(l.value), value: wp(u.value) });
      }
    else
      for (var d in t)
        kKn(t, d) && ES(this.entries, { key: d, value: wp(t[d]) });
  },
  parseQuery: function (t) {
    if (t)
      for (var e, n, r = rDe(t, "&"), i = 0; i < r.length; )
        (e = r[i++]).length &&
          ((n = rDe(e, "=")),
          ES(this.entries, { key: aDe(HKn(n)), value: aDe(tDe(n, "=")) }));
  },
  serialize: function () {
    for (var t, e = this.entries, n = [], r = 0; r < e.length; )
      (t = e[r++]), ES(n, oDe(t.key) + "=" + oDe(t.value));
    return tDe(n, "&");
  },
  update: function () {
    (this.entries.length = 0), this.parseQuery(this.url.query);
  },
  updateURL: function () {
    this.url && this.url.update();
  },
};
var U8 = function () {
    IYe(this, RC),
      MYe(this, new $Ye(arguments.length > 0 ? arguments[0] : void 0));
  },
  RC = U8.prototype;
if (
  (RKn(
    RC,
    {
      append: function (t, e) {
        fw(arguments.length, 2);
        var n = a0(this);
        ES(n.entries, { key: wp(t), value: wp(e) }), n.updateURL();
      },
      delete: function (t) {
        fw(arguments.length, 1);
        for (var e = a0(this), n = e.entries, r = wp(t), i = 0; i < n.length; )
          n[i].key === r ? nDe(n, i, 1) : i++;
        e.updateURL();
      },
      get: function (t) {
        fw(arguments.length, 1);
        for (var e = a0(this).entries, n = wp(t), r = 0; r < e.length; r++)
          if (e[r].key === n) return e[r].value;
        return null;
      },
      getAll: function (t) {
        fw(arguments.length, 1);
        for (
          var e = a0(this).entries, n = wp(t), r = [], i = 0;
          i < e.length;
          i++
        )
          e[i].key === n && ES(r, e[i].value);
        return r;
      },
      has: function (t) {
        fw(arguments.length, 1);
        for (var e = a0(this).entries, n = wp(t), r = 0; r < e.length; )
          if (e[r++].key === n) return !0;
        return !1;
      },
      set: function (t, e) {
        fw(arguments.length, 1);
        for (
          var n,
            r = a0(this),
            i = r.entries,
            o = !1,
            l = wp(t),
            u = wp(e),
            c = 0;
          c < i.length;
          c++
        )
          (n = i[c]).key === l &&
            (o ? nDe(i, c--, 1) : ((o = !0), (n.value = u)));
        o || ES(i, { key: l, value: u }), r.updateURL();
      },
      sort: function () {
        var t = a0(this);
        xKn(t.entries, function (e, n) {
          return e.key > n.key ? 1 : -1;
        }),
          t.updateURL();
      },
      forEach: function (t) {
        for (
          var e,
            n = a0(this).entries,
            r = IKn(t, arguments.length > 1 ? arguments[1] : void 0),
            i = 0;
          i < n.length;

        )
          r((e = n[i++]).value, e.key, this);
      },
      keys: function () {
        return new PZ(this, "keys");
      },
      values: function () {
        return new PZ(this, "values");
      },
      entries: function () {
        return new PZ(this, "entries");
      },
    },
    { enumerable: !0 }
  ),
  QIe(RC, LKn, RC.entries, { name: "entries" }),
  QIe(
    RC,
    "toString",
    function () {
      return a0(this).serialize();
    },
    { enumerable: !0 }
  ),
  AKn(U8, dL),
  kZ({ global: !0, constructor: !0, forced: !YIe }, { URLSearchParams: U8 }),
  !YIe && IZ(U$))
) {
  var YKn = bv(eDe.has),
    QKn = bv(eDe.set),
    sDe = function (t) {
      if (DYe(t)) {
        var e,
          n = t.body;
        if (DKn(n) === dL)
          return (
            (e = t.headers ? new U$(t.headers) : new U$()),
            YKn(e, "content-type") ||
              QKn(
                e,
                "content-type",
                "application/x-www-form-urlencoded;charset=UTF-8"
              ),
            MKn(t, { body: JIe(0, wp(n)), headers: JIe(0, e) })
          );
      }
      return t;
    };
  if (
    (IZ(qIe) &&
      kZ(
        { global: !0, enumerable: !0, dontCallGetSet: !0, forced: !0 },
        {
          fetch: function (t) {
            return qIe(t, arguments.length > 1 ? sDe(arguments[1]) : {});
          },
        }
      ),
    IZ(F8))
  ) {
    var MZ = function (t) {
      return (
        IYe(this, DZ), new F8(t, arguments.length > 1 ? sDe(arguments[1]) : {})
      );
    };
    (DZ.constructor = MZ),
      (MZ.prototype = DZ),
      kZ(
        { global: !0, constructor: !0, dontCallGetSet: !0, forced: !0 },
        { Request: MZ }
      );
  }
}
var $g,
  JKn = { URLSearchParams: U8, getState: a0 },
  qKn = Di,
  Zce = Tl,
  eZn = RYe,
  Yce = ja,
  lDe = Av,
  Rm = Fa,
  B4 = ad,
  xg = gYe,
  tZn = $R,
  Wre = pu,
  Qce = ZZe,
  pw = _Ye,
  n0 = V5,
  nZn = uce.codeAt,
  rZn = EKn,
  y1 = Qu,
  iZn = LE,
  aZn = jB,
  xYe = JKn,
  LYe = Tm,
  oZn = LYe.set,
  B8 = LYe.getterFor("URL"),
  sZn = xYe.URLSearchParams,
  lZn = xYe.getState,
  RM = Yce.URL,
  Kre = Yce.TypeError,
  H8 = Yce.parseInt,
  uZn = Math.floor,
  uDe = Math.pow,
  nm = Rm("".charAt),
  S0 = Rm(/./.exec),
  AC = Rm([].join),
  cZn = Rm((1).toString),
  dZn = Rm([].pop),
  tk = Rm([].push),
  cDe = Rm("".replace),
  hZn = Rm([].shift),
  fZn = Rm("".split),
  B$ = Rm("".slice),
  X8 = Rm("".toLowerCase),
  pZn = Rm([].unshift),
  gZn = "Invalid authority",
  CZ = "Invalid scheme",
  G2 = "Invalid host",
  dDe = "Invalid port",
  OYe = /[a-z]/i,
  mZn = /[\d+-.a-z]/i,
  Zre = /\d/,
  yZn = /^0x/i,
  vZn = /^[0-7]+$/,
  bZn = /^\d+$/,
  GYe = /^[\da-f]+$/i,
  _Zn = /[\0\t\n\r #%/:<>?@[\\\]^|]/,
  TZn = /[\0\t\n\r #/:<>?@[\\\]^|]/,
  EZn = /^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,
  SZn = /[\t\n\r]/g,
  RZn = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = fZn(t, ".");
    if ((c.length && c[c.length - 1] == "" && c.length--, (e = c.length) > 4))
      return t;
    for (n = [], r = 0; r < e; r++) {
      if ((i = c[r]) == "") return t;
      if (
        ((o = 10),
        i.length > 1 &&
          nm(i, 0) == "0" &&
          ((o = S0(yZn, i) ? 16 : 8), (i = B$(i, o == 8 ? 1 : 2))),
        i === "")
      )
        l = 0;
      else {
        if (!S0(o == 10 ? bZn : o == 8 ? vZn : GYe, i)) return t;
        l = H8(i, o);
      }
      tk(n, l);
    }
    for (r = 0; r < e; r++)
      if (((l = n[r]), r == e - 1)) {
        if (l >= uDe(256, 5 - e)) return null;
      } else if (l > 255) return null;
    for (u = dZn(n), r = 0; r < n.length; r++) u += n[r] * uDe(256, 3 - r);
    return u;
  },
  AZn = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = [0, 0, 0, 0, 0, 0, 0, 0],
      d = 0,
      h = null,
      f = 0,
      p = function () {
        return nm(t, f);
      };
    if (p() == ":") {
      if (nm(t, 1) != ":") return;
      (f += 2), (h = ++d);
    }
    for (; p(); ) {
      if (d == 8) return;
      if (p() != ":") {
        for (e = n = 0; n < 4 && S0(GYe, p()); )
          (e = 16 * e + H8(p(), 16)), f++, n++;
        if (p() == ".") {
          if (n == 0 || ((f -= n), d > 6)) return;
          for (r = 0; p(); ) {
            if (((i = null), r > 0)) {
              if (!(p() == "." && r < 4)) return;
              f++;
            }
            if (!S0(Zre, p())) return;
            for (; S0(Zre, p()); ) {
              if (((o = H8(p(), 10)), i === null)) i = o;
              else {
                if (i == 0) return;
                i = 10 * i + o;
              }
              if (i > 255) return;
              f++;
            }
            (c[d] = 256 * c[d] + i), (++r != 2 && r != 4) || d++;
          }
          if (r != 4) return;
          break;
        }
        if (p() == ":") {
          if ((f++, !p())) return;
        } else if (p()) return;
        c[d++] = e;
      } else {
        if (h !== null) return;
        f++, (h = ++d);
      }
    }
    if (h !== null)
      for (l = d - h, d = 7; d != 0 && l > 0; )
        (u = c[d]), (c[d--] = c[h + l - 1]), (c[h + --l] = u);
    else if (d != 8) return;
    return c;
  },
  wZn = function (t) {
    for (var e = null, n = 1, r = null, i = 0, o = 0; o < 8; o++)
      t[o] !== 0
        ? (i > n && ((e = r), (n = i)), (r = null), (i = 0))
        : (r === null && (r = o), ++i);
    return i > n && ((e = r), (n = i)), e;
  },
  AM = function (t) {
    var e, n, r, i;
    if (typeof t == "number") {
      for (e = [], n = 0; n < 4; n++) pZn(e, t % 256), (t = uZn(t / 256));
      return AC(e, ".");
    }
    if (typeof t == "object") {
      for (e = "", r = wZn(t), n = 0; n < 8; n++)
        (i && t[n] === 0) ||
          (i && (i = !1),
          r === n
            ? ((e += n ? ":" : "::"), (i = !0))
            : ((e += cZn(t[n], 16)), n < 7 && (e += ":")));
      return "[" + e + "]";
    }
    return t;
  },
  i6 = {},
  NYe = Qce({}, i6, { " ": 1, '"': 1, "<": 1, ">": 1, "`": 1 }),
  FYe = Qce({}, NYe, { "#": 1, "?": 1, "{": 1, "}": 1 }),
  $Z = Qce({}, FYe, {
    "/": 1,
    ":": 1,
    ";": 1,
    "=": 1,
    "@": 1,
    "[": 1,
    "\\": 1,
    "]": 1,
    "^": 1,
    "|": 1,
  }),
  tT = function (t, e) {
    var n = nZn(t, 0);
    return n > 32 && n < 127 && !Wre(e, t) ? t : encodeURIComponent(t);
  },
  H4 = { ftp: 21, file: null, http: 80, https: 443, ws: 80, wss: 443 },
  wC = function (t, e) {
    var n;
    return (
      t.length == 2 &&
      S0(OYe, nm(t, 0)) &&
      ((n = nm(t, 1)) == ":" || (!e && n == "|"))
    );
  },
  hDe = function (t) {
    var e;
    return (
      t.length > 1 &&
      wC(B$(t, 0, 2)) &&
      (t.length == 2 ||
        (e = nm(t, 2)) === "/" ||
        e === "\\" ||
        e === "?" ||
        e === "#")
    );
  },
  kZn = function (t) {
    return t === "." || X8(t) === "%2e";
  },
  IZn = function (t) {
    return (
      (t = X8(t)) === ".." || t === "%2e." || t === ".%2e" || t === "%2e%2e"
    );
  },
  xZ = {},
  fDe = {},
  LZ = {},
  pDe = {},
  gDe = {},
  OZ = {},
  mDe = {},
  yDe = {},
  X4 = {},
  V4 = {},
  GZ = {},
  NZ = {},
  FZ = {},
  UZ = {},
  vDe = {},
  BZ = {},
  gw = {},
  ky = {},
  bDe = {},
  N2 = {},
  d1 = {},
  Jce = function (t, e, n) {
    var r,
      i,
      o,
      l = y1(t);
    if (e) {
      if ((i = this.parse(l))) throw Kre(i);
      this.searchParams = null;
    } else {
      if ((n !== void 0 && (r = new Jce(n, !0)), (i = this.parse(l, null, r))))
        throw Kre(i);
      (o = lZn(new sZn())).bindURL(this), (this.searchParams = o);
    }
  };
Jce.prototype = {
  type: "URL",
  parse: function (t, e, n) {
    var r,
      i,
      o,
      l,
      u = this,
      c = e || xZ,
      d = 0,
      h = "",
      f = !1,
      p = !1,
      g = !1;
    for (
      t = y1(t),
        e ||
          ((u.scheme = ""),
          (u.username = ""),
          (u.password = ""),
          (u.host = null),
          (u.port = null),
          (u.path = []),
          (u.query = null),
          (u.fragment = null),
          (u.cannotBeABaseURL = !1),
          (t = cDe(t, EZn, ""))),
        t = cDe(t, SZn, ""),
        r = pw(t);
      d <= r.length;

    ) {
      switch (((i = r[d]), c)) {
        case xZ:
          if (!i || !S0(OYe, i)) {
            if (e) return CZ;
            c = LZ;
            continue;
          }
          (h += X8(i)), (c = fDe);
          break;
        case fDe:
          if (i && (S0(mZn, i) || i == "+" || i == "-" || i == ".")) h += X8(i);
          else {
            if (i != ":") {
              if (e) return CZ;
              (h = ""), (c = LZ), (d = 0);
              continue;
            }
            if (
              e &&
              (u.isSpecial() != Wre(H4, h) ||
                (h == "file" && (u.includesCredentials() || u.port !== null)) ||
                (u.scheme == "file" && !u.host))
            )
              return;
            if (((u.scheme = h), e))
              return void (
                u.isSpecial() &&
                H4[u.scheme] == u.port &&
                (u.port = null)
              );
            (h = ""),
              u.scheme == "file"
                ? (c = UZ)
                : u.isSpecial() && n && n.scheme == u.scheme
                ? (c = pDe)
                : u.isSpecial()
                ? (c = yDe)
                : r[d + 1] == "/"
                ? ((c = gDe), d++)
                : ((u.cannotBeABaseURL = !0), tk(u.path, ""), (c = bDe));
          }
          break;
        case LZ:
          if (!n || (n.cannotBeABaseURL && i != "#")) return CZ;
          if (n.cannotBeABaseURL && i == "#") {
            (u.scheme = n.scheme),
              (u.path = n0(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (u.cannotBeABaseURL = !0),
              (c = d1);
            break;
          }
          c = n.scheme == "file" ? UZ : OZ;
          continue;
        case pDe:
          if (i != "/" || r[d + 1] != "/") {
            c = OZ;
            continue;
          }
          (c = X4), d++;
          break;
        case gDe:
          if (i == "/") {
            c = V4;
            break;
          }
          c = ky;
          continue;
        case OZ:
          if (((u.scheme = n.scheme), i == $g))
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = n0(n.path)),
              (u.query = n.query);
          else if (i == "/" || (i == "\\" && u.isSpecial())) c = mDe;
          else if (i == "?")
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = n0(n.path)),
              (u.query = ""),
              (c = N2);
          else {
            if (i != "#") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (u.path = n0(n.path)),
                u.path.length--,
                (c = ky);
              continue;
            }
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = n0(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (c = d1);
          }
          break;
        case mDe:
          if (!u.isSpecial() || (i != "/" && i != "\\")) {
            if (i != "/") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (c = ky);
              continue;
            }
            c = V4;
          } else c = X4;
          break;
        case yDe:
          if (((c = X4), i != "/" || nm(h, d + 1) != "/")) continue;
          d++;
          break;
        case X4:
          if (i != "/" && i != "\\") {
            c = V4;
            continue;
          }
          break;
        case V4:
          if (i == "@") {
            f && (h = "%40" + h), (f = !0), (o = pw(h));
            for (var y = 0; y < o.length; y++) {
              var v = o[y];
              if (v != ":" || g) {
                var b = tT(v, $Z);
                g ? (u.password += b) : (u.username += b);
              } else g = !0;
            }
            h = "";
          } else if (
            i == $g ||
            i == "/" ||
            i == "?" ||
            i == "#" ||
            (i == "\\" && u.isSpecial())
          ) {
            if (f && h == "") return gZn;
            (d -= pw(h).length + 1), (h = ""), (c = GZ);
          } else h += i;
          break;
        case GZ:
        case NZ:
          if (e && u.scheme == "file") {
            c = BZ;
            continue;
          }
          if (i != ":" || p) {
            if (
              i == $g ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial())
            ) {
              if (u.isSpecial() && h == "") return G2;
              if (e && h == "" && (u.includesCredentials() || u.port !== null))
                return;
              if ((l = u.parseHost(h))) return l;
              if (((h = ""), (c = gw), e)) return;
              continue;
            }
            i == "[" ? (p = !0) : i == "]" && (p = !1), (h += i);
          } else {
            if (h == "") return G2;
            if ((l = u.parseHost(h))) return l;
            if (((h = ""), (c = FZ), e == NZ)) return;
          }
          break;
        case FZ:
          if (!S0(Zre, i)) {
            if (
              i == $g ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial()) ||
              e
            ) {
              if (h != "") {
                var w = H8(h, 10);
                if (w > 65535) return dDe;
                (u.port = u.isSpecial() && w === H4[u.scheme] ? null : w),
                  (h = "");
              }
              if (e) return;
              c = gw;
              continue;
            }
            return dDe;
          }
          h += i;
          break;
        case UZ:
          if (((u.scheme = "file"), i == "/" || i == "\\")) c = vDe;
          else {
            if (!n || n.scheme != "file") {
              c = ky;
              continue;
            }
            if (i == $g)
              (u.host = n.host), (u.path = n0(n.path)), (u.query = n.query);
            else if (i == "?")
              (u.host = n.host),
                (u.path = n0(n.path)),
                (u.query = ""),
                (c = N2);
            else {
              if (i != "#") {
                hDe(AC(n0(r, d), "")) ||
                  ((u.host = n.host), (u.path = n0(n.path)), u.shortenPath()),
                  (c = ky);
                continue;
              }
              (u.host = n.host),
                (u.path = n0(n.path)),
                (u.query = n.query),
                (u.fragment = ""),
                (c = d1);
            }
          }
          break;
        case vDe:
          if (i == "/" || i == "\\") {
            c = BZ;
            break;
          }
          n &&
            n.scheme == "file" &&
            !hDe(AC(n0(r, d), "")) &&
            (wC(n.path[0], !0) ? tk(u.path, n.path[0]) : (u.host = n.host)),
            (c = ky);
          continue;
        case BZ:
          if (i == $g || i == "/" || i == "\\" || i == "?" || i == "#") {
            if (!e && wC(h)) c = ky;
            else if (h == "") {
              if (((u.host = ""), e)) return;
              c = gw;
            } else {
              if ((l = u.parseHost(h))) return l;
              if ((u.host == "localhost" && (u.host = ""), e)) return;
              (h = ""), (c = gw);
            }
            continue;
          }
          h += i;
          break;
        case gw:
          if (u.isSpecial()) {
            if (((c = ky), i != "/" && i != "\\")) continue;
          } else if (e || i != "?")
            if (e || i != "#") {
              if (i != $g && ((c = ky), i != "/")) continue;
            } else (u.fragment = ""), (c = d1);
          else (u.query = ""), (c = N2);
          break;
        case ky:
          if (
            i == $g ||
            i == "/" ||
            (i == "\\" && u.isSpecial()) ||
            (!e && (i == "?" || i == "#"))
          ) {
            if (
              (IZn(h)
                ? (u.shortenPath(),
                  i == "/" || (i == "\\" && u.isSpecial()) || tk(u.path, ""))
                : kZn(h)
                ? i == "/" || (i == "\\" && u.isSpecial()) || tk(u.path, "")
                : (u.scheme == "file" &&
                    !u.path.length &&
                    wC(h) &&
                    (u.host && (u.host = ""), (h = nm(h, 0) + ":")),
                  tk(u.path, h)),
              (h = ""),
              u.scheme == "file" && (i == $g || i == "?" || i == "#"))
            )
              for (; u.path.length > 1 && u.path[0] === ""; ) hZn(u.path);
            i == "?"
              ? ((u.query = ""), (c = N2))
              : i == "#" && ((u.fragment = ""), (c = d1));
          } else h += tT(i, FYe);
          break;
        case bDe:
          i == "?"
            ? ((u.query = ""), (c = N2))
            : i == "#"
            ? ((u.fragment = ""), (c = d1))
            : i != $g && (u.path[0] += tT(i, i6));
          break;
        case N2:
          e || i != "#"
            ? i != $g &&
              (i == "'" && u.isSpecial()
                ? (u.query += "%27")
                : (u.query += i == "#" ? "%23" : tT(i, i6)))
            : ((u.fragment = ""), (c = d1));
          break;
        case d1:
          i != $g && (u.fragment += tT(i, NYe));
      }
      d++;
    }
  },
  parseHost: function (t) {
    var e, n, r;
    if (nm(t, 0) == "[") {
      if (nm(t, t.length - 1) != "]" || !(e = AZn(B$(t, 1, -1)))) return G2;
      this.host = e;
    } else if (this.isSpecial()) {
      if (((t = rZn(t)), S0(_Zn, t) || (e = RZn(t)) === null)) return G2;
      this.host = e;
    } else {
      if (S0(TZn, t)) return G2;
      for (e = "", n = pw(t), r = 0; r < n.length; r++) e += tT(n[r], i6);
      this.host = e;
    }
  },
  cannotHaveUsernamePasswordPort: function () {
    return !this.host || this.cannotBeABaseURL || this.scheme == "file";
  },
  includesCredentials: function () {
    return this.username != "" || this.password != "";
  },
  isSpecial: function () {
    return Wre(H4, this.scheme);
  },
  shortenPath: function () {
    var t = this.path,
      e = t.length;
    !e || (this.scheme == "file" && e == 1 && wC(t[0], !0)) || t.length--;
  },
  serialize: function () {
    var t = this,
      e = t.scheme,
      n = t.username,
      r = t.password,
      i = t.host,
      o = t.port,
      l = t.path,
      u = t.query,
      c = t.fragment,
      d = e + ":";
    return (
      i !== null
        ? ((d += "//"),
          t.includesCredentials() && (d += n + (r ? ":" + r : "") + "@"),
          (d += AM(i)),
          o !== null && (d += ":" + o))
        : e == "file" && (d += "//"),
      (d += t.cannotBeABaseURL ? l[0] : l.length ? "/" + AC(l, "/") : ""),
      u !== null && (d += "?" + u),
      c !== null && (d += "#" + c),
      d
    );
  },
  setHref: function (t) {
    var e = this.parse(t);
    if (e) throw Kre(e);
    this.searchParams.update();
  },
  getOrigin: function () {
    var t = this.scheme,
      e = this.port;
    if (t == "blob")
      try {
        return new lD(t.path[0]).origin;
      } catch {
        return "null";
      }
    return t != "file" && this.isSpecial()
      ? t + "://" + AM(this.host) + (e !== null ? ":" + e : "")
      : "null";
  },
  getProtocol: function () {
    return this.scheme + ":";
  },
  setProtocol: function (t) {
    this.parse(y1(t) + ":", xZ);
  },
  getUsername: function () {
    return this.username;
  },
  setUsername: function (t) {
    var e = pw(y1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.username = "";
      for (var n = 0; n < e.length; n++) this.username += tT(e[n], $Z);
    }
  },
  getPassword: function () {
    return this.password;
  },
  setPassword: function (t) {
    var e = pw(y1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.password = "";
      for (var n = 0; n < e.length; n++) this.password += tT(e[n], $Z);
    }
  },
  getHost: function () {
    var t = this.host,
      e = this.port;
    return t === null ? "" : e === null ? AM(t) : AM(t) + ":" + e;
  },
  setHost: function (t) {
    this.cannotBeABaseURL || this.parse(t, GZ);
  },
  getHostname: function () {
    var t = this.host;
    return t === null ? "" : AM(t);
  },
  setHostname: function (t) {
    this.cannotBeABaseURL || this.parse(t, NZ);
  },
  getPort: function () {
    var t = this.port;
    return t === null ? "" : y1(t);
  },
  setPort: function (t) {
    this.cannotHaveUsernamePasswordPort() ||
      ((t = y1(t)) == "" ? (this.port = null) : this.parse(t, FZ));
  },
  getPathname: function () {
    var t = this.path;
    return this.cannotBeABaseURL ? t[0] : t.length ? "/" + AC(t, "/") : "";
  },
  setPathname: function (t) {
    this.cannotBeABaseURL || ((this.path = []), this.parse(t, gw));
  },
  getSearch: function () {
    var t = this.query;
    return t ? "?" + t : "";
  },
  setSearch: function (t) {
    (t = y1(t)) == ""
      ? (this.query = null)
      : (nm(t, 0) == "?" && (t = B$(t, 1)),
        (this.query = ""),
        this.parse(t, N2)),
      this.searchParams.update();
  },
  getSearchParams: function () {
    return this.searchParams.facade;
  },
  getHash: function () {
    var t = this.fragment;
    return t ? "#" + t : "";
  },
  setHash: function (t) {
    (t = y1(t)) != ""
      ? (nm(t, 0) == "#" && (t = B$(t, 1)),
        (this.fragment = ""),
        this.parse(t, d1))
      : (this.fragment = null);
  },
  update: function () {
    this.query = this.searchParams.serialize() || null;
  },
};
var lD = function (t) {
    var e = tZn(this, Ah),
      n = aZn(arguments.length, 1) > 1 ? arguments[1] : void 0,
      r = oZn(e, new Jce(t, !1, n));
    Zce ||
      ((e.href = r.serialize()),
      (e.origin = r.getOrigin()),
      (e.protocol = r.getProtocol()),
      (e.username = r.getUsername()),
      (e.password = r.getPassword()),
      (e.host = r.getHost()),
      (e.hostname = r.getHostname()),
      (e.port = r.getPort()),
      (e.pathname = r.getPathname()),
      (e.search = r.getSearch()),
      (e.searchParams = r.getSearchParams()),
      (e.hash = r.getHash()));
  },
  Ah = lD.prototype,
  Lg = function (t, e) {
    return {
      get: function () {
        return B8(this)[t]();
      },
      set:
        e &&
        function (n) {
          return B8(this)[e](n);
        },
      configurable: !0,
      enumerable: !0,
    };
  };
if (
  (Zce &&
    (xg(Ah, "href", Lg("serialize", "setHref")),
    xg(Ah, "origin", Lg("getOrigin")),
    xg(Ah, "protocol", Lg("getProtocol", "setProtocol")),
    xg(Ah, "username", Lg("getUsername", "setUsername")),
    xg(Ah, "password", Lg("getPassword", "setPassword")),
    xg(Ah, "host", Lg("getHost", "setHost")),
    xg(Ah, "hostname", Lg("getHostname", "setHostname")),
    xg(Ah, "port", Lg("getPort", "setPort")),
    xg(Ah, "pathname", Lg("getPathname", "setPathname")),
    xg(Ah, "search", Lg("getSearch", "setSearch")),
    xg(Ah, "searchParams", Lg("getSearchParams")),
    xg(Ah, "hash", Lg("getHash", "setHash"))),
  B4(
    Ah,
    "toJSON",
    function () {
      return B8(this).serialize();
    },
    { enumerable: !0 }
  ),
  B4(
    Ah,
    "toString",
    function () {
      return B8(this).serialize();
    },
    { enumerable: !0 }
  ),
  RM)
) {
  var _De = RM.createObjectURL,
    TDe = RM.revokeObjectURL;
  _De && B4(lD, "createObjectURL", lDe(_De, RM)),
    TDe && B4(lD, "revokeObjectURL", lDe(TDe, RM));
}
function wM() {
  var t,
    e,
    n = new Promise(function (r, i) {
      (t = r), (e = i);
    });
  return (
    (n.used = !1),
    (n.resolve = function () {
      return (n.used = !0), t.apply(void 0, arguments);
    }),
    (n.reject = function () {
      return (n.used = !0), e.apply(void 0, arguments);
    }),
    n
  );
}
function Yy() {
  try {
    return parseInt(performance.now(), 10);
  } catch {
    return new Date().getTime();
  }
}
iZn(lD, "URL"),
  qKn({ global: !0, constructor: !0, forced: !eZn, sham: !Zce }, { URL: lD });
var nT,
  kM = (function () {
    function t() {
      rH(this, t);
    }
    return (
      iH(t, null, [
        {
          key: "start",
          value: function (e) {
            return e && e.length
              ? (e.length === 1 && e.end(0) - e.start(0) < 1e-6) ||
                (e.length === 1 && e.start(0) < 0)
                ? 0
                : e.start(0)
              : 0;
          },
        },
        {
          key: "end",
          value: function (e) {
            return e && e.length
              ? e.length === 1 && e.end(0) - e.start(0) < 1e-6
                ? 0
                : e.end(e.length - 1)
              : 0;
          },
        },
        {
          key: "get",
          value: function (e) {
            if (e)
              try {
                return e.buffered;
              } catch {}
          },
        },
        {
          key: "buffers",
          value: function (e, n) {
            if (!e || !e.length) return [];
            for (var r = [], i = 0, o = e.length; i < o; i++) {
              var l = r.length;
              if (l && n) {
                var u = r[l - 1],
                  c = u[1];
                if (e.start(i) - c <= n) {
                  var d = e.end(i);
                  d > c && (u[1] = d);
                } else r.push([e.start(i), e.end(i)]);
              } else r.push([e.start(i), e.end(i)]);
            }
            return r;
          },
        },
        {
          key: "totalLength",
          value: function (e) {
            return e && e.length
              ? e.reduce(function (n, r) {
                  return n + (r[1] - r[0]);
                }, 0)
              : 0;
          },
        },
        {
          key: "info",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 0,
              r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0;
            if (!e || !e.length) return { start: 0, end: 0, buffers: [] };
            for (
              var i = 0,
                o = 0,
                l = 0,
                u = 0,
                c = 0,
                d = 0,
                h = 0,
                f = t.buffers(e, r),
                p = 0,
                g = f.length;
              p < g;
              p++
            ) {
              var y = f[p];
              if (n + r >= y[0] && n < y[1]) (i = y[0]), (o = y[1]), (l = p);
              else {
                if (n + r < y[0]) {
                  (u = y[0]), (c = y[1]);
                  break;
                }
                n + r > y[1] && ((d = y[0]), (h = y[1]));
              }
            }
            return {
              start: i,
              end: o,
              index: l,
              buffers: f,
              nextStart: u,
              nextEnd: c,
              prevStart: d,
              prevEnd: h,
              currentTime: n,
              behind: n - i,
              remaining: o ? o - n : 0,
              length: t.totalLength && t.totalLength(f),
            };
          },
        },
      ]),
      t
    );
  })(),
  Vu = {
    MANIFEST: "manifest",
    NETWORK: "network",
    NETWORK_TIMEOUT: "network_timeout",
    DEMUX: "demux",
    REMUX: "remux",
    MEDIA: "media",
    DRM: "drm",
    OTHER: "other",
    SUB_TYPES: {
      FLV: "FLV",
      HLS: "HLS",
      MP4: "MP4",
      FMP4: "FMP4",
      MSE_ADD_SB: "MSE_ADD_SB",
      MSE_APPEND_BUFFER: "MSE_APPEND_BUFFER",
      MSE_OTHER: "MSE_OTHER",
      MSE_FULL: "MSE_FULL",
      OPTION: "OPTION",
    },
  },
  HZ =
    (iu((nT = {}), Vu.MANIFEST, { HLS: 1100 }),
    iu(nT, Vu.NETWORK, 2100),
    iu(nT, Vu.NETWORK_TIMEOUT, 2101),
    iu(nT, Vu.DEMUX, { FLV: 3100, HLS: 3200, MP4: 3300, FMP4: 3400 }),
    iu(nT, Vu.REMUX, { FMP4: 4100, MP4: 4200 }),
    iu(nT, Vu.MEDIA, {
      MSE_ADD_SB: 5200,
      MSE_APPEND_BUFFER: 5201,
      MSE_OTHER: 5202,
      MSE_FULL: 5203,
    }),
    iu(nT, Vu.OTHER, 8e3),
    nT),
  z4 = (function (t) {
    eKn(n, Xre(Error));
    var e = iKn(n);
    function n(r, i, o, l, u) {
      var c;
      return (
        rH(this, n),
        ((c = e.call(this, u || (o == null ? void 0 : o.message))).errorType =
          r === Vu.NETWORK_TIMEOUT ? Vu.NETWORK : r),
        (c.originError = o),
        (c.ext = l),
        (c.errorCode = HZ[r][i] || HZ[r]),
        (c.errorMessage = c.message),
        c.errorCode ||
          ((c.errorType = Vu.OTHER), (c.errorCode = HZ[c.errorType])),
        c
      );
    }
    return (
      iH(n, null, [
        {
          key: "create",
          value: function (r, i, o, l, u) {
            return r instanceof n
              ? r
              : (r instanceof Error && ((o = r), (r = "")),
                r || (r = Vu.OTHER),
                new n(r, i, o, l, u));
          },
        },
        {
          key: "network",
          value: function (r) {
            var i;
            return new n(
              r != null && r.isTimeout ? Vu.NETWORK_TIMEOUT : Vu.NETWORK,
              r,
              null,
              {
                url: r == null ? void 0 : r.url,
                response: r == null ? void 0 : r.response,
                httpCode:
                  r == null || (i = r.response) === null || i === void 0
                    ? void 0
                    : i.status,
              }
            );
          },
        },
      ]),
      n
    );
  })(),
  DZn = typeof window < "u",
  Yre = (function () {
    function t(e) {
      rH(this, t),
        (this.name = e || ""),
        (this._prefix = "[".concat(this.name, "]"));
    }
    return (
      iH(
        t,
        [
          {
            key: "debug",
            value: function () {
              var e;
              if (!t.disabled) {
                for (
                  var n = arguments.length, r = new Array(n), i = 0;
                  i < n;
                  i++
                )
                  r[i] = arguments[i];
                (e = console).debug.apply(e, [this._prefix, Yy()].concat(r));
              }
            },
          },
          {
            key: "log",
            value: function () {
              var e;
              if (!t.disabled) {
                for (
                  var n = arguments.length, r = new Array(n), i = 0;
                  i < n;
                  i++
                )
                  r[i] = arguments[i];
                (e = console).log.apply(e, [this._prefix, Yy()].concat(r));
              }
            },
          },
          {
            key: "warn",
            value: function () {
              var e;
              if (!t.disabled) {
                for (
                  var n = arguments.length, r = new Array(n), i = 0;
                  i < n;
                  i++
                )
                  r[i] = arguments[i];
                (e = console).warn.apply(e, [this._prefix, Yy()].concat(r));
              }
            },
          },
          {
            key: "error",
            value: function () {
              var e;
              if (!t.disabled) {
                for (
                  var n = arguments.length, r = new Array(n), i = 0;
                  i < n;
                  i++
                )
                  r[i] = arguments[i];
                (e = console).error.apply(e, [this._prefix, Yy()].concat(r));
              }
            },
          },
          {
            key: "table",
            value: function () {
              var e;
              t.disabled ||
                (console.group(this._prefix),
                (e = console).table.apply(e, arguments),
                console.groupEnd());
            },
          },
        ],
        [
          {
            key: "enable",
            value: function () {
              t.disabled = !1;
            },
          },
          {
            key: "disable",
            value: function () {
              t.disabled = !0;
            },
          },
        ]
      ),
      t
    );
  })();
function PZn() {
  try {
    return DZn ? window.MediaSource : null;
  } catch {}
}
iu(Yre, "disabled", !0);
var j4 = PZn(),
  EDe = { APPEND: "appendBuffer", REMOVE: "removeBuffer" },
  Qre = (function () {
    function t(i, o) {
      var l = this;
      rH(this, t),
        iu(this, "media", null),
        iu(this, "mediaSource", null),
        iu(this, "_openPromise", wM()),
        iu(this, "_queue", Object.create(null)),
        iu(this, "_sourceBuffer", Object.create(null)),
        iu(this, "_mseFullFlag", {}),
        iu(this, "_st", 0),
        iu(this, "_opst", 0),
        iu(this, "_logger", null),
        iu(this, "_config", null),
        iu(this, "_url", null),
        iu(this, "_onSBUpdateEnd", function (u) {
          var c = l._queue[u];
          if (c) {
            var d = c.shift();
            if (d) {
              var h = Yy() - l._opst;
              l._logger.debug("UpdateEnd", d.opName, h, d.context),
                d.promise.resolve({
                  name: d.opName,
                  context: d.context,
                  costtime: h,
                }),
                l._startQueue(u);
            }
          }
        }),
        iu(this, "_onSBUpdateError", function (u, c) {
          var d = l._queue[u];
          if (d) {
            var h = d[0];
            h &&
              (l._logger.error("UpdateError", u, h.opName, h.context),
              h.promise.reject(
                new z4(Vu.MEDIA, Vu.SUB_TYPES.MSE_APPEND_BUFFER, c)
              ));
          }
        }),
        (this._config = Object.assign(t.getDefaultConfig(), o)),
        i && this.bindMedia(i),
        (this._logger = new Yre("MSE")),
        this._config.openLog && Yre.enable();
    }
    var e, n, r;
    return (
      iH(
        t,
        [
          {
            key: "isOpened",
            get: function () {
              var i;
              return (
                ((i = this.mediaSource) === null || i === void 0
                  ? void 0
                  : i.readyState) === "open"
              );
            },
          },
          {
            key: "url",
            get: function () {
              return this._url;
            },
          },
          {
            key: "duration",
            get: function () {
              var i;
              return (
                ((i = this.mediaSource) === null || i === void 0
                  ? void 0
                  : i.duration) || -1
              );
            },
          },
          {
            key: "isEnded",
            get: function () {
              return (
                !!this.mediaSource && this.mediaSource.readyState === "ended"
              );
            },
          },
          {
            key: "isFull",
            value: function (i) {
              return i ? this._mseFullFlag[i] : this._mseFullFlag[t.VIDEO];
            },
          },
          {
            key: "updateDuration",
            value: function (i) {
              var o = this;
              return this.mediaSource && this.mediaSource.duration > i
                ? Promise.resolve()
                : this._enqueueBlockingOp(function () {
                    o.isEnded
                      ? o._logger.debug("[debug mse] setDuration ended")
                      : o.mediaSource &&
                        ((o.mediaSource.duration = i),
                        o._logger.debug("[debug mse] setDuration"));
                  }, "updateDuration");
            },
          },
          {
            key: "open",
            value: function () {
              var i = this;
              if (
                this._openPromise.used &&
                !this.isOpened &&
                this.mediaSource
              ) {
                var o = this.mediaSource;
                o.addEventListener("sourceopen", function l() {
                  var u = Yy() - i._st;
                  i._logger.debug("MSE OPEN", u),
                    o.removeEventListener("sourceopen", l),
                    i._openPromise.resolve({ costtime: u });
                }),
                  (this._openPromise = wM());
              }
              return this._openPromise;
            },
          },
          {
            key: "bindMedia",
            value:
              ((r = SZ(
                Q2().mark(function i(o) {
                  var l,
                    u,
                    c = this;
                  return Q2().wrap(
                    function (d) {
                      for (;;)
                        switch ((d.prev = d.next)) {
                          case 0:
                            if (!this.mediaSource && !this.media) {
                              d.next = 3;
                              break;
                            }
                            return (d.next = 3), this.unbindMedia();
                          case 3:
                            if (o && j4) {
                              d.next = 5;
                              break;
                            }
                            throw new Error(
                              "Param media or MediaSource does not exist"
                            );
                          case 5:
                            return (
                              (this.media = o),
                              (l = this.mediaSource = new j4()),
                              (this._st = Yy()),
                              (u = function h() {
                                var f = Yy() - c._st;
                                c._logger.debug("MSE OPEN"),
                                  l.removeEventListener("sourceopen", h),
                                  URL.revokeObjectURL(o.src),
                                  c._openPromise.resolve({ costtime: f });
                              }),
                              l.addEventListener("sourceopen", u),
                              (this._url = URL.createObjectURL(l)),
                              (o.src = this._url),
                              d.abrupt("return", this._openPromise)
                            );
                          case 13:
                          case "end":
                            return d.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function (i) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "unbindMedia",
            value:
              ((n = SZ(
                Q2().mark(function i() {
                  var o,
                    l,
                    u,
                    c = this;
                  return Q2().wrap(
                    function (d) {
                      for (;;)
                        switch ((d.prev = d.next)) {
                          case 0:
                            if (
                              (this._openPromise.used ||
                                this._openPromise.resolve(),
                              (o = this.mediaSource))
                            ) {
                              if (
                                (Object.keys(this._queue).forEach(function (h) {
                                  var f = c._queue[h];
                                  f &&
                                    f.forEach(function (p) {
                                      return p.promise.resolve;
                                    });
                                }),
                                (l =
                                  !!this.media && this.media.readyState >= 1),
                                (u = o.readyState === "open"),
                                l && u)
                              )
                                try {
                                  o.endOfStream();
                                } catch {}
                              Object.keys(this._sourceBuffer).forEach(function (
                                h
                              ) {
                                try {
                                  o.removeSourceBuffer(c._sourceBuffer[h]);
                                } catch {}
                              });
                            }
                            if (this.media) {
                              this.media.removeAttribute("src");
                              try {
                                this.media.load();
                              } catch {}
                              this.media = null;
                            }
                            (this.mediaSource = null),
                              (this._openPromise = wM()),
                              (this._queue = Object.create(null)),
                              (this._sourceBuffer = Object.create(null));
                          case 8:
                          case "end":
                            return d.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "createSource",
            value: function (i, o) {
              if (!this._sourceBuffer[i] && this.mediaSource) {
                var l;
                try {
                  l = this._sourceBuffer[i] =
                    this.mediaSource.addSourceBuffer(o);
                } catch (u) {
                  throw new z4(Vu.MEDIA, Vu.SUB_TYPES.MSE_ADD_SB, u);
                }
                (l.mimeType = o),
                  l.addEventListener(
                    "updateend",
                    this._onSBUpdateEnd.bind(this, i)
                  ),
                  l.addEventListener(
                    "error",
                    this._onSBUpdateError.bind(this, i)
                  );
              }
            },
          },
          {
            key: "changeType",
            value: function (i, o) {
              var l = this,
                u = this._sourceBuffer[i];
              return this.mediaSource &&
                u &&
                u.mimeType !== o &&
                typeof u.changeType == "function"
                ? this._enqueueOp(i, function () {
                    u.changeType(o), (u.mimeType = o), l._onSBUpdateEnd(i);
                  })
                : Promise.resolve();
            },
          },
          {
            key: "createOrChangeSource",
            value: function (i, o) {
              return this.createSource(i, o), this.changeType(i, o);
            },
          },
          {
            key: "append",
            value: function (i, o, l) {
              var u = this;
              return o && o.byteLength && this._sourceBuffer[i]
                ? this._enqueueOp(
                    i,
                    function () {
                      var c;
                      u.mediaSource &&
                        (u._logger.debug("MSE APPEND START", l),
                        (u._opst = Yy()),
                        (c = u._sourceBuffer[i]) === null ||
                          c === void 0 ||
                          c.appendBuffer(o));
                    },
                    EDe.APPEND,
                    l
                  )
                : Promise.resolve();
            },
          },
          {
            key: "remove",
            value: function (i, o, l, u) {
              var c = this,
                d = !1;
              return (
                this._mseFullFlag[i] && (d = !0),
                this._enqueueOp(
                  i,
                  function () {
                    if (c.mediaSource) {
                      var h = c._sourceBuffer[i];
                      o >= l || !h
                        ? c._onSBUpdateEnd(i)
                        : ((c._opst = Yy()),
                          c._logger.debug("MSE REMOVE START", i, o, l, u),
                          h.remove(o, l));
                    }
                  },
                  EDe.REMOVE,
                  u,
                  d
                )
              );
            },
          },
          {
            key: "clearBuffer",
            value: function (i, o) {
              var l,
                u = this;
              return (
                Object.keys(this._sourceBuffer).forEach(function (c) {
                  l = u._enqueueOp(c, function () {
                    if (u.mediaSource) {
                      var d = u._sourceBuffer[c];
                      u._logger.debug("MSE clearBuffer START", c, i, o),
                        d.remove(i, o);
                    }
                  });
                }),
                l
              );
            },
          },
          {
            key: "clearAllBuffer",
            value: function () {
              var i,
                o = this;
              return (
                Object.keys(this._sourceBuffer).forEach(function (l) {
                  i = o._enqueueOp(l, function () {
                    if (o.mediaSource) {
                      var u = o._sourceBuffer[l];
                      o._logger.debug("MSE clearAllBuffer START", l),
                        u.remove(0, kM.end(kM.get(u)));
                    }
                  });
                }),
                i
              );
            },
          },
          {
            key: "clearOpQueues",
            value: function (i) {
              var o;
              this._logger.debug("MSE clearOpQueue START");
              var l = this._queue[i];
              if (l && l[i] && !(l.length < 5)) {
                var u = [];
                l.forEach(function (c) {
                  c.context && c.context.isinit && u.push(c);
                }),
                  (this._queue[i] = l.slice(0, 2)),
                  u.length > 0 && (o = this._queue[i]).push.apply(o, u);
              }
            },
          },
          {
            key: "endOfStream",
            value: function (i) {
              var o = this;
              return this.mediaSource && this.mediaSource.readyState === "open"
                ? this._enqueueBlockingOp(function () {
                    var l = o.mediaSource;
                    l &&
                      l.readyState === "open" &&
                      (o._logger.debug("MSE endOfStream START"),
                      i ? l.endOfStream(i) : l.endOfStream());
                  }, "endOfStream")
                : Promise.resolve();
            },
          },
          {
            key: "setLiveSeekableRange",
            value: function (i, o) {
              var l = this.mediaSource;
              i < 0 ||
                o < i ||
                l == null ||
                !l.setLiveSeekableRange ||
                l.readyState !== "open" ||
                l.setLiveSeekableRange(i, o);
            },
          },
          {
            key: "getSourceBuffer",
            value: function (i) {
              return this._sourceBuffer[i];
            },
          },
          {
            key: "buffered",
            value: function (i) {
              return kM.get(this._sourceBuffer[i]);
            },
          },
          {
            key: "bufferStart",
            value: function (i) {
              return kM.start(this.buffered(i));
            },
          },
          {
            key: "bufferEnd",
            value: function (i) {
              return kM.end(this.buffered(i));
            },
          },
          {
            key: "_enqueueOp",
            value: function (i, o, l, u, c) {
              var d = this;
              if (!this.mediaSource) return Promise.resolve();
              var h = (this._queue[i] = this._queue[i] || []),
                f = { exec: o, promise: wM(), opName: l, context: u };
              return (
                c
                  ? (h.splice(0, 0, f),
                    (this._mseFullFlag[i] = !1),
                    this._startQueue(i))
                  : h.push(f),
                this.isOpened
                  ? h.length === 1 && this._startQueue(i)
                  : this._openPromise.then(function () {
                      h.length === 1 && d._startQueue(i);
                    }),
                f.promise
              );
            },
          },
          {
            key: "_enqueueBlockingOp",
            value:
              ((e = SZ(
                Q2().mark(function i(o, l) {
                  var u,
                    c,
                    d = this;
                  return Q2().wrap(
                    function (h) {
                      for (;;)
                        switch ((h.prev = h.next)) {
                          case 0:
                            if (this.mediaSource) {
                              h.next = 2;
                              break;
                            }
                            return h.abrupt("return", Promise.resolve());
                          case 2:
                            if ((u = Object.keys(this._sourceBuffer)).length) {
                              h.next = 5;
                              break;
                            }
                            return h.abrupt("return", o());
                          case 5:
                            return (
                              (c = []),
                              u.forEach(function (f) {
                                var p = d._queue[f],
                                  g = wM();
                                c.push(g),
                                  p.push({
                                    exec: function () {
                                      return g.resolve();
                                    },
                                    promise: g,
                                    opName: l,
                                  }),
                                  p.length === 1 && d._startQueue(f);
                              }),
                              h.abrupt(
                                "return",
                                Promise.all(c).then(function () {
                                  try {
                                    return o();
                                  } finally {
                                    u.forEach(function (f) {
                                      var p = d._queue[f],
                                        g = d._sourceBuffer[f];
                                      p == null || p.shift(),
                                        (g && g.updating) || d._startQueue(f);
                                    });
                                  }
                                })
                              )
                            );
                          case 8:
                          case "end":
                            return h.stop();
                        }
                    },
                    i,
                    this
                  );
                })
              )),
              function (i, o) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_startQueue",
            value: function (i) {
              var o = this._queue[i];
              if (o) {
                var l = o[0];
                if (l && !this._mseFullFlag[i])
                  try {
                    l.exec();
                  } catch (u) {
                    u &&
                    u.message &&
                    u.message.indexOf("SourceBuffer is full") >= 0
                      ? ((this._mseFullFlag[i] = !0),
                        this._logger.error(
                          "[MSE error],  context,",
                          l.context,
                          " ,name,",
                          l.opName,
                          ",err,SourceBuffer is full"
                        ),
                        l.promise.reject(
                          new z4(Vu.MEDIA, Vu.SUB_TYPES.MSE_FULL, u)
                        ))
                      : (this._logger.error(u),
                        l.promise.reject(
                          new z4(Vu.MEDIA, Vu.SUB_TYPES.MSE_OTHER, u)
                        ),
                        o.shift(),
                        this._startQueue(i));
                  }
              }
            },
          },
          {
            key: "setTimeoffset",
            value: function (i, o, l) {
              var u = this;
              return this._enqueueOp(
                i,
                function () {
                  o < 0 && (o += 0.001),
                    (u._sourceBuffer[i].timestampOffset = o),
                    u._onSBUpdateEnd(i);
                },
                "setTimeoffset",
                l
              );
            },
          },
          {
            key: "abort",
            value: function (i, o) {
              var l = this;
              return this.isOpened
                ? this._enqueueOp(
                    i,
                    function () {
                      l._sourceBuffer[i].abort(), l._onSBUpdateEnd(i);
                    },
                    "abort",
                    o
                  )
                : Promise.resolve();
            },
          },
        ],
        [
          {
            key: "getDefaultConfig",
            value: function () {
              return { openLog: !1 };
            },
          },
          {
            key: "isSupported",
            value: function () {
              var i =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
              if (!j4) return !1;
              try {
                return j4.isTypeSupported(i);
              } catch (o) {
                return this._logger.error(i, o), !1;
              }
            },
          },
        ]
      ),
      t
    );
  })();
iu(Qre, "VIDEO", "video"), iu(Qre, "AUDIO", "audio");
var MZn = Di,
  UYe = _m,
  BYe = xE,
  CZn = zs,
  iO = Fa,
  HYe = aa,
  $Zn = BD,
  xZn = Ss,
  LZn = $u,
  SDe = GD,
  XYe = xR,
  OZn = OD,
  ZT = UYe("JSON", "stringify"),
  W4 = iO(/./.exec),
  RDe = iO("".charAt),
  GZn = iO("".charCodeAt),
  NZn = iO("".replace),
  FZn = iO((1).toString),
  UZn = /[\uD800-\uDFFF]/g,
  ADe = /^[\uD800-\uDBFF]$/,
  wDe = /^[\uDC00-\uDFFF]$/,
  kDe =
    !OZn ||
    HYe(function () {
      var t = UYe("Symbol")();
      return (
        ZT([t]) != "[null]" || ZT({ a: t }) != "{}" || ZT(Object(t)) != "{}"
      );
    }),
  IDe = HYe(function () {
    return (
      ZT("\uDF06\uD834") !== '"\\udf06\\ud834"' || ZT("\uDEAD") !== '"\\udead"'
    );
  }),
  BZn = function (t, e) {
    var n = XYe(arguments),
      r = e;
    if ((LZn(e) || t !== void 0) && !SDe(t))
      return (
        $Zn(e) ||
          (e = function (i, o) {
            if ((xZn(r) && (o = CZn(r, this, i, o)), !SDe(o))) return o;
          }),
        (n[1] = e),
        BYe(ZT, null, n)
      );
  },
  HZn = function (t, e, n) {
    var r = RDe(n, e - 1),
      i = RDe(n, e + 1);
    return (W4(ADe, t) && !W4(wDe, i)) || (W4(wDe, t) && !W4(ADe, r))
      ? "\\u" + FZn(GZn(t, 0), 16)
      : t;
  };
ZT &&
  MZn(
    { target: "JSON", stat: !0, arity: 3, forced: kDe || IDe },
    {
      stringify: function (t, e, n) {
        var r = XYe(arguments),
          i = BYe(kDe ? BZn : ZT, null, r);
        return IDe && typeof i == "string" ? NZn(i, UZn, HZn) : i;
      },
    }
  );
var XZn = Di,
  VZn = aa,
  zZn = id,
  VYe = eO,
  jZn = xKe,
  WZn = VZn(function () {
    VYe(1);
  });
XZn(
  { target: "Object", stat: !0, forced: WZn, sham: !jZn },
  {
    getPrototypeOf: function (t) {
      return VYe(zZn(t));
    },
  }
);
var KZn = FD.PROPER,
  ZZn = aa,
  DDe = YB,
  PDe = "​᠎",
  YZn = function (t) {
    return ZZn(function () {
      return !!DDe[t]() || PDe[t]() !== PDe || (KZn && DDe[t].name !== t);
    });
  },
  QZn = Di,
  JZn = QB.trim,
  qZn = YZn;
QZn(
  { target: "String", proto: !0, forced: qZn("trim") },
  {
    trim: function () {
      return JZn(this);
    },
  }
);
var zYe = { exports: {} },
  eYn = aa,
  tYn = eYn(function () {
    if (typeof ArrayBuffer == "function") {
      var t = new ArrayBuffer(8);
      Object.isExtensible(t) && Object.defineProperty(t, "a", { value: 8 });
    }
  }),
  nYn = aa,
  rYn = $u,
  iYn = Ab,
  MDe = tYn,
  a6 = Object.isExtensible,
  aYn = nYn(function () {
    a6(1);
  }),
  oYn =
    aYn || MDe
      ? function (t) {
          return (
            !!rYn(t) && (!MDe || iYn(t) != "ArrayBuffer") && (!a6 || a6(t))
          );
        }
      : a6,
  sYn = aa,
  lYn = !sYn(function () {
    return Object.isExtensible(Object.preventExtensions({}));
  }),
  uYn = Di,
  cYn = Fa,
  dYn = N5,
  hYn = $u,
  qce = pu,
  fYn = Cu.f,
  CDe = CE,
  pYn = HB,
  ede = oYn,
  gYn = O5,
  mYn = lYn,
  jYe = !1,
  tb = gYn("meta"),
  yYn = 0,
  tde = function (t) {
    fYn(t, tb, { value: { objectID: "O" + yYn++, weakData: {} } });
  },
  vYn = function (t, e) {
    if (!hYn(t))
      return typeof t == "symbol" ? t : (typeof t == "string" ? "S" : "P") + t;
    if (!qce(t, tb)) {
      if (!ede(t)) return "F";
      if (!e) return "E";
      tde(t);
    }
    return t[tb].objectID;
  },
  bYn = function (t, e) {
    if (!qce(t, tb)) {
      if (!ede(t)) return !0;
      if (!e) return !1;
      tde(t);
    }
    return t[tb].weakData;
  },
  _Yn = function (t) {
    return mYn && jYe && ede(t) && !qce(t, tb) && tde(t), t;
  },
  TYn = function () {
    (EYn.enable = function () {}), (jYe = !0);
    var t = CDe.f,
      e = cYn([].splice),
      n = {};
    (n[tb] = 1),
      t(n).length &&
        ((CDe.f = function (r) {
          for (var i = t(r), o = 0, l = i.length; o < l; o++)
            if (i[o] === tb) {
              e(i, o, 1);
              break;
            }
          return i;
        }),
        uYn(
          { target: "Object", stat: !0, forced: !0 },
          { getOwnPropertyNames: pYn.f }
        ));
  },
  EYn = (zYe.exports = {
    enable: TYn,
    fastKey: vYn,
    getWeakData: bYn,
    onFreeze: _Yn,
  });
dYn[tb] = !0;
var WYe = zYe.exports,
  SYn = Di,
  RYn = ja,
  AYn = Fa,
  $De = BB,
  wYn = ad,
  kYn = WYe,
  IYn = KB,
  DYn = $R,
  PYn = Ss,
  MYn = Tb,
  XZ = $u,
  VZ = aa,
  CYn = ZB,
  $Yn = LE,
  xYn = _ce,
  LYn = function (t, e, n) {
    var r = t.indexOf("Map") !== -1,
      i = t.indexOf("Weak") !== -1,
      o = r ? "set" : "add",
      l = RYn[t],
      u = l && l.prototype,
      c = l,
      d = {},
      h = function (b) {
        var w = AYn(u[b]);
        wYn(
          u,
          b,
          b == "add"
            ? function (k) {
                return w(this, k === 0 ? 0 : k), this;
              }
            : b == "delete"
            ? function (k) {
                return !(i && !XZ(k)) && w(this, k === 0 ? 0 : k);
              }
            : b == "get"
            ? function (k) {
                return i && !XZ(k) ? void 0 : w(this, k === 0 ? 0 : k);
              }
            : b == "has"
            ? function (k) {
                return !(i && !XZ(k)) && w(this, k === 0 ? 0 : k);
              }
            : function (k, D) {
                return w(this, k === 0 ? 0 : k, D), this;
              }
        );
      };
    if (
      $De(
        t,
        !PYn(l) ||
          !(
            i ||
            (u.forEach &&
              !VZ(function () {
                new l().entries().next();
              }))
          )
      )
    )
      (c = n.getConstructor(e, t, r, o)), kYn.enable();
    else if ($De(t, !0)) {
      var f = new c(),
        p = f[o](i ? {} : -0, 1) != f,
        g = VZ(function () {
          f.has(1);
        }),
        y = CYn(function (b) {
          new l(b);
        }),
        v =
          !i &&
          VZ(function () {
            for (var b = new l(), w = 5; w--; ) b[o](w, w);
            return !b.has(-0);
          });
      y ||
        (((c = e(function (b, w) {
          DYn(b, u);
          var k = xYn(new l(), b, c);
          return MYn(w) || IYn(w, k[o], { that: k, AS_ENTRIES: r }), k;
        })).prototype = u),
        (u.constructor = c)),
        (g || v) && (h("delete"), h("has"), r && h("get")),
        (v || p) && h(o),
        i && u.clear && delete u.clear;
    }
    return (
      (d[t] = c),
      SYn({ global: !0, constructor: !0, forced: c != l }, d),
      $Yn(c, t),
      i || n.setStrong(c, t, r),
      c
    );
  },
  OYn = Cu.f,
  GYn = CR,
  xDe = Dce,
  NYn = Av,
  FYn = $R,
  UYn = Tb,
  BYn = KB,
  HYn = Sce,
  LDe = Rce,
  XYn = zB,
  IM = Tl,
  ODe = WYe.fastKey,
  KYe = Tm,
  GDe = KYe.set,
  zZ = KYe.getterFor,
  VYn = {
    getConstructor: function (t, e, n, r) {
      var i = t(function (d, h) {
          FYn(d, o),
            GDe(d, {
              type: e,
              index: GYn(null),
              first: void 0,
              last: void 0,
              size: 0,
            }),
            IM || (d.size = 0),
            UYn(h) || BYn(h, d[r], { that: d, AS_ENTRIES: n });
        }),
        o = i.prototype,
        l = zZ(e),
        u = function (d, h, f) {
          var p,
            g,
            y = l(d),
            v = c(d, h);
          return (
            v
              ? (v.value = f)
              : ((y.last = v =
                  {
                    index: (g = ODe(h, !0)),
                    key: h,
                    value: f,
                    previous: (p = y.last),
                    next: void 0,
                    removed: !1,
                  }),
                y.first || (y.first = v),
                p && (p.next = v),
                IM ? y.size++ : d.size++,
                g !== "F" && (y.index[g] = v)),
            d
          );
        },
        c = function (d, h) {
          var f,
            p = l(d),
            g = ODe(h);
          if (g !== "F") return p.index[g];
          for (f = p.first; f; f = f.next) if (f.key == h) return f;
        };
      return (
        xDe(o, {
          clear: function () {
            for (var d = l(this), h = d.index, f = d.first; f; )
              (f.removed = !0),
                f.previous && (f.previous = f.previous.next = void 0),
                delete h[f.index],
                (f = f.next);
            (d.first = d.last = void 0), IM ? (d.size = 0) : (this.size = 0);
          },
          delete: function (d) {
            var h = this,
              f = l(h),
              p = c(h, d);
            if (p) {
              var g = p.next,
                y = p.previous;
              delete f.index[p.index],
                (p.removed = !0),
                y && (y.next = g),
                g && (g.previous = y),
                f.first == p && (f.first = g),
                f.last == p && (f.last = y),
                IM ? f.size-- : h.size--;
            }
            return !!p;
          },
          forEach: function (d) {
            for (
              var h,
                f = l(this),
                p = NYn(d, arguments.length > 1 ? arguments[1] : void 0);
              (h = h ? h.next : f.first);

            )
              for (p(h.value, h.key, this); h && h.removed; ) h = h.previous;
          },
          has: function (d) {
            return !!c(this, d);
          },
        }),
        xDe(
          o,
          n
            ? {
                get: function (d) {
                  var h = c(this, d);
                  return h && h.value;
                },
                set: function (d, h) {
                  return u(this, d === 0 ? 0 : d, h);
                },
              }
            : {
                add: function (d) {
                  return u(this, (d = d === 0 ? 0 : d), d);
                },
              }
        ),
        IM &&
          OYn(o, "size", {
            get: function () {
              return l(this).size;
            },
          }),
        i
      );
    },
    setStrong: function (t, e, n) {
      var r = e + " Iterator",
        i = zZ(e),
        o = zZ(r);
      HYn(
        t,
        e,
        function (l, u) {
          GDe(this, { type: r, target: l, state: i(l), kind: u, last: void 0 });
        },
        function () {
          for (var l = o(this), u = l.kind, c = l.last; c && c.removed; )
            c = c.previous;
          return l.target && (l.last = c = c ? c.next : l.state.first)
            ? LDe(
                u == "keys"
                  ? c.key
                  : u == "values"
                  ? c.value
                  : [c.key, c.value],
                !1
              )
            : ((l.target = void 0), LDe(void 0, !0));
        },
        n ? "entries" : "values",
        !n,
        !0
      ),
        XYn(e);
    },
  },
  NDe = 3,
  ZYe = { "mp4a.40.5": 1, "mp4a.40.2": 2 },
  jZ = 0.05,
  zYn = (function () {
    function t() {
      bl(this, t),
        Ei(this, "_queue", []),
        typeof document < "u" &&
          (this._tempMedia = document.createElement("video"));
    }
    return (
      _l(t, [
        {
          key: "tempMedia",
          get: function () {
            return this._tempMedia;
          },
        },
        {
          key: "hasCached",
          get: function () {
            return (
              this._queue.findIndex(function (e) {
                return e.codec === 1;
              }) !== -1 &&
              this._queue.findIndex(function (e) {
                return e.codec === 2;
              }) !== -1
            );
          },
        },
        {
          key: "getCachedMedia",
          value: function (e) {
            var n = this._queue.findIndex(function (r) {
              return r.codec === e;
            });
            return n !== -1 ? this._queue.splice(n, 1)[0] : null;
          },
        },
        {
          key: "cacheMedia",
          value: function (e) {
            var n = e.codec,
              r = e.media,
              i = e.mse,
              o = ZYe[n];
            if (
              ((this._queue = this._queue.filter(function (l) {
                var u;
                return (
                  l.mse && !l.mse.isOpened && l.mse.unbindMedia(),
                  (u = l.mse) === null || u === void 0 ? void 0 : u.isOpened
                );
              })),
              !n ||
                this._queue.filter(function (l) {
                  return l.codec === o;
                }).length > 2)
            )
              return (
                i == null || i.endOfStream(),
                void (i == null || i.unbindMedia())
              );
            this._queue.push({ codec: o, media: r, mse: i });
          },
        },
      ]),
      t
    );
  })(),
  DM = new zYn(),
  FDe = (function (t) {
    Wf(o, Xce);
    var e,
      n,
      r,
      i = Kf(o);
    function o(l, u) {
      var c;
      return (
        bl(this, o),
        Ei(mi((c = i.call(this, l, u))), "_media", void 0),
        Ei(mi(c), "_isTempMedia", !1),
        Ei(mi(c), "_mse", void 0),
        Ei(mi(c), "_remuxer", null),
        Ei(mi(c), "_codec", ""),
        Ei(mi(c), "_sourceCreated", !1),
        Ei(mi(c), "_needInitSegment", !0),
        Ei(mi(c), "_seekNoSideEffect", !1),
        Ei(mi(c), "_startRendered", !1),
        Ei(mi(c), "_firstTimeAppendedBuffer", !1),
        Ei(mi(c), "_sampleQueue", []),
        Ei(mi(c), "_inProcessing", !1),
        Ei(mi(c), "_duration", 0),
        Ei(mi(c), "_mediaCache", DM),
        Ei(mi(c), "_resetDts", function () {}),
        Ei(mi(c), "_onCanplay", function () {
          c._ready || ((c._ready = !0), c.emit(yn.AUDIO.AUDIO_READY));
        }),
        Ei(mi(c), "_onPlaying", function () {
          c._parent.ready &&
            ((c._audioCanAutoplay = !0),
            c._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.PLAYING));
        }),
        Ei(mi(c), "_onWaiting", function () {
          if (!c._seekNoSideEffect) {
            try {
              for (
                var d,
                  h = c._media.buffered,
                  f = c._media.currentTime,
                  p = 0,
                  g = 0,
                  y = h.length;
                g < y;
                g++
              )
                h.start(g) < f && h.end(g) > f && (p = h.end(g) - f);
              if (Math.abs(p) > 0.5) return;
              if (Math.abs(c._media.duration - c._media.currentTime) < 0.3)
                return (
                  c._reuseMse || c._mse.endOfStream(),
                  void (
                    (d = mi(c)) === null ||
                    d === void 0 ||
                    d._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.ENDED)
                  )
                );
            } catch {}
            (c._ready = !1), c.emit(yn.AUDIO.AUDIO_WAITING);
          }
        }),
        Ei(mi(c), "_onSeeked", function () {
          c._seekNoSideEffect || c._isLive
            ? (c._seekNoSideEffect = !1)
            : (hn.log(c.TAG, "seeked"),
              c._ready ||
                (c._media.pause(),
                (c._ready = !0),
                c.emit(yn.AUDIO.AUDIO_READY)));
        }),
        Ei(mi(c), "_onProgress", function () {
          if (c._media.readyState <= 1) {
            var d = c._getBufferGap();
            d > 0 &&
              d < 1 &&
              ((c._media.currentTime += d + jZ),
              hn.warn(c.TAG, "progress, gap=", d));
          }
          c._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.PROGRESS),
            c._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.DURATION_CHANGE);
        }),
        Ei(mi(c), "_onEnded", function () {
          var d;
          hn.log(c.TAG, "ended!"),
            (d = mi(c)) === null ||
              d === void 0 ||
              d._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.ENDED);
        }),
        Ei(mi(c), "_onOnceProgress", function () {
          if (c._media.buffered.length) {
            var d = c._media.buffered.start(0);
            d &&
              ((c._media.currentTime = d + jZ), hn.log(c.TAG, "start gap:", d)),
              c._media.removeEventListener("progress", c._onOnceProgress);
          }
        }),
        Ei(mi(c), "_onError", function () {
          var d;
          c._emitTimelineEvents(
            yn.TIMELINE.PLAY_EVENT,
            Wi.ERROR,
            c._assembleErr(
              "audio error: ".concat(
                (d = c._media.error) === null || d === void 0
                  ? void 0
                  : d.message
              ),
              NDe
            )
          );
        }),
        Ei(mi(c), "_appendChunk", function (d, h) {
          if (!c.noAudio && h.samples.length) {
            if (
              (c._codec ||
                (h.objectType !== 2 && h.objectType !== 5
                  ? (c._codec = "mp4a.40.5")
                  : (c._codec = h.codec),
                c._isTempMedia && c._switchMedia(c._codec)),
              h.samples.forEach(function (f) {
                (f.baseMediaDecodeTime = h.baseMediaDecodeTime),
                  c._sampleQueue.push(f);
              }),
              (h.samples = []),
              !c._meta)
            )
              return (
                (c._meta = vAe(
                  vAe({}, h),
                  {},
                  {
                    exist: function () {
                      return !0;
                    },
                    hasSample: function () {
                      return !0;
                    },
                    samples: [],
                  }
                )),
                hn.warn(c.TAG, "audio set metadata", c._meta),
                void c._doAppendWrapper()
              );
            c._meta.sampleRate !== h.sampleRate &&
              (hn.warn(
                c.TAG,
                "discontinue: "
                  .concat(c._meta.sampleRate, " -> ")
                  .concat(h.sampleRate)
              ),
              (c._needInitSegment = !0),
              Object.keys(h).forEach(function (f) {
                c._meta[f] = h[f];
              })),
              !c._inProcessing && c._sampleQueue.length && c._doAppendWrapper();
          }
        }),
        Ei(
          mi(c),
          "_doAppend",
          (function () {
            var d = Ak(
              Ip().mark(function h(f) {
                var p, g, y;
                return Ip().wrap(function (v) {
                  for (;;)
                    switch ((v.prev = v.next)) {
                      case 0:
                        if (
                          (c._remuxer ||
                            (c._remuxer = new JWn(
                              {
                                samples: [],
                                exist: function () {
                                  return !1;
                                },
                              },
                              f
                            )),
                          (p = f.samples),
                          c._sourceCreated)
                        ) {
                          v.next = 12;
                          break;
                        }
                        return (
                          c.analyse.addAudioMseOpenStart(),
                          (v.next = 6),
                          c._mse.open()
                        );
                      case 6:
                        (c._sourceCreated = !0),
                          hn.log(c.TAG, "video/mp4;codecs=".concat(c._codec)),
                          c._mse.createSource(
                            f.type,
                            "video/mp4;codecs=".concat(c._codec)
                          ),
                          c.analyse.addAudioMseOpend(),
                          hn.log(c.TAG, "sb created!"),
                          c._checkAutoPlay();
                      case 12:
                        if (
                          ((g = c._remuxer.remux(c._needInitSegment)),
                          !c._needInitSegment || g.audioInitSegment)
                        ) {
                          v.next = 15;
                          break;
                        }
                        return v.abrupt("return");
                      case 15:
                        return (
                          (c._needInitSegment = !1),
                          (y = []),
                          g.audioInitSegment &&
                            y.push(c._mse.append(f.type, g.audioInitSegment)),
                          g.audioSegment &&
                            y.push(c._mse.append(f.type, g.audioSegment)),
                          v.abrupt(
                            "return",
                            Promise.all(y)
                              .then(function () {
                                return p[p.length - 1].dts / 1e3;
                              })
                              .then(function () {
                                c._firstTimeAppendedBuffer ||
                                  ((c._firstTimeAppendedBuffer = !0),
                                  c.analyse.addAudioFirstTimeAppended());
                              })
                          )
                        );
                      case 20:
                      case "end":
                        return v.stop();
                    }
                }, h);
              })
            );
            return function (h) {
              return d.apply(this, arguments);
            };
          })()
        ),
        Ei(mi(c), "_doPlay", function () {
          c._media.play().catch(function () {});
        }),
        Ei(mi(c), "_doPause", function () {
          c._media.pause();
        }),
        Ei(mi(c), "_doSeek", function (d) {
          (c._ready = !1), (c._media.currentTime = d);
        }),
        Ei(mi(c), "_doChaseFrame", function (d) {
          var h = d.position;
          (c._seekNoSideEffect = !0), (c._media.currentTime = h);
        }),
        Ei(mi(c), "_startRender", function () {
          hn.log(c.TAG, "start render"),
            (c._startRendered = !0),
            c._media.play().catch(function () {});
        }),
        (c.TAG = "AudioMseRender"),
        (c._reuseMse = Ru().reuseMseForAudio),
        c._initMedia(),
        c
      );
    }
    return (
      _l(
        o,
        [
          {
            key: "isMse",
            get: function () {
              return !0;
            },
          },
          {
            key: "media",
            get: function () {
              return this._media;
            },
          },
          {
            key: "currentTime",
            get: function () {
              return this._media.currentTime;
            },
          },
          {
            key: "buffered",
            get: function () {
              return this._media.buffered;
            },
          },
          {
            key: "duration",
            get: function () {
              return Number.isNaN(this._media.duration)
                ? 1 / 0
                : this._media.duration;
            },
            set: function (l) {
              (this._duration = l), this._updateDuration(l);
            },
          },
          {
            key: "audioCanAutoplay",
            get: function () {
              return this._audioCanAutoplay || this.noAudio;
            },
          },
          {
            key: "_initMedia",
            value: function () {
              if (!this._reuseMse || !DM.hasCached)
                return (
                  hn.log(this.TAG, "init media and mse directly"),
                  (this._media = document.createElement("video")),
                  (this._media.autoplay = !0),
                  (this._mse = new Qre()),
                  this._bindEvents(),
                  this._bindMediaEvents(),
                  void this._mse.bindMedia(this._media)
                );
              hn.log(this.TAG, "bind media temporary"),
                (this._media = DM.tempMedia),
                this._bindEvents(),
                (this._isTempMedia = !0);
            },
          },
          {
            key: "_switchMedia",
            value: function (l) {
              var u = this._media,
                c = DM.getCachedMedia(ZYe[l]);
              c
                ? (hn.warn(
                    this.TAG,
                    "switch to cached media for audio play! codec=".concat(l)
                  ),
                  (this._media = c.media),
                  (this._mse = c.mse),
                  this._bindMediaEvents(),
                  this._updateDuration(this._duration),
                  (this._media.currentTime = jZ),
                  (this._sourceCreated = !0),
                  (this._audioCanAutoplay = !0),
                  this.analyse.addAudioMseOpend())
                : this._initMedia(),
                (this._media.volume = u.volume),
                (this._media.playbackRate = u.playbackRate),
                (this._isTempMedia = !1);
            },
          },
          {
            key: "_getBufferGap",
            value: function () {
              for (var l = this.buffered, u = 0, c = l.length; u < c; u++)
                if (!(l.end(u) < this.currentTime))
                  return l.start(u) - this.currentTime;
              return 0;
            },
          },
          {
            key: "canSeek",
            value: function () {
              return !0;
            },
          },
          {
            key: "resume",
            value: function () {
              return this._media.play();
            },
          },
          {
            key: "pause",
            value: function () {
              return this._media.pause();
            },
          },
          {
            key: "seekNoSideEffect",
            value: function (l) {
              this._doChaseFrame(l);
            },
          },
          { key: "dump", value: function () {} },
          {
            key: "_emitTimelineEvents",
            value: function (l, u, c) {
              var d, h;
              (d = this._parent) === null ||
                d === void 0 ||
                (h = d.emit) === null ||
                h === void 0 ||
                h.call(d, l, u, c);
            },
          },
          {
            key: "_assembleErr",
            value: function (l, u) {
              var c = new Error(l);
              return (c.code = 3), (c.subCode = u), c;
            },
          },
          {
            key: "_bindEvents",
            value: function () {
              var l = this;
              Bp(Gh(o.prototype), "_bindEvents", this).call(this),
                this._parent.on(
                  yn.DECODE_EVENTS.CHASE_AUDIO_FRAME,
                  this._doChaseFrame
                ),
                this._parent.on(yn.TIMELINE.UPDATE_VOLUME, function (u) {
                  (l._media.volume = u),
                    l._emitTimelineEvents(
                      yn.TIMELINE.PLAY_EVENT,
                      Wi.VOLUME_CHANGE
                    );
                }),
                this._parent.on(yn.TIMELINE.END_OF_STREAM, function () {
                  var u;
                  l.reuseMseForAudio ||
                    (u = l._mse) === null ||
                    u === void 0 ||
                    u.endOfStream();
                }),
                this._parent.on(yn.TIMELINE.SET_PLAYBACKRATE, function (u) {
                  hn.log(l.TAG, "change playbackrate, ", u),
                    (l._media.playbackRate = u);
                });
            },
          },
          {
            key: "_bindMediaEvents",
            value: function () {
              this._media.addEventListener("canplay", this._onCanplay),
                this._media.addEventListener("playing", this._onPlaying),
                this._media.addEventListener("waiting", this._onWaiting),
                this._media.addEventListener("seeked", this._onSeeked),
                this._media.addEventListener("progress", this._onProgress),
                this._media.addEventListener("ended", this._onEnded),
                this._media.addEventListener("progress", this._onOnceProgress),
                this._media.addEventListener("error", this._onError);
            },
          },
          {
            key: "_updateDuration",
            value:
              ((r = Ak(
                Ip().mark(function l(u) {
                  return Ip().wrap(
                    function (c) {
                      for (;;)
                        switch ((c.prev = c.next)) {
                          case 0:
                            if (!this._mse) {
                              c.next = 7;
                              break;
                            }
                            if (this._mse.isOpened) {
                              c.next = 4;
                              break;
                            }
                            return (c.next = 4), this._mse.open();
                          case 4:
                            return (c.next = 6), this._mse.updateDuration(u);
                          case 6:
                            hn.log(this.TAG, "update duration", u);
                          case 7:
                          case "end":
                            return c.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function (l) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "_doAppendWrapper",
            value:
              ((n = Ak(
                Ip().mark(function l() {
                  var u;
                  return Ip().wrap(
                    function (c) {
                      for (;;)
                        switch ((c.prev = c.next)) {
                          case 0:
                            return (
                              (this._meta.samples = this._sampleQueue.slice()),
                              (this._meta.baseMediaDecodeTime =
                                this._meta.samples[0].baseMediaDecodeTime),
                              (this._sampleQueue = []),
                              (c.prev = 3),
                              (this._inProcessing = !0),
                              (c.next = 7),
                              this._doAppend(this._meta)
                            );
                          case 7:
                            if (
                              ((u = c.sent),
                              this.isLive &&
                                this._emitTimelineEvents(
                                  yn.TIMELINE.UPDATE_SEGMENT_END,
                                  u
                                ),
                              (this._inProcessing = !1),
                              !this._sampleQueue.length)
                            ) {
                              c.next = 13;
                              break;
                            }
                            return (c.next = 13), this._doAppendWrapper();
                          case 13:
                            c.next = 18;
                            break;
                          case 15:
                            (c.prev = 15),
                              (c.t0 = c.catch(3)),
                              this._emitTimelineEvents(
                                yn.TIMELINE.PLAY_EVENT,
                                Wi.ERROR,
                                this._assembleErr(
                                  "audio error: ".concat(
                                    c.t0 === null || c.t0 === void 0
                                      ? void 0
                                      : c.t0.message
                                  ),
                                  NDe
                                )
                              );
                          case 18:
                          case "end":
                            return c.stop();
                        }
                    },
                    l,
                    this,
                    [[3, 15]]
                  );
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_checkAutoPlay",
            value: function () {
              var l = this;
              this._media.addEventListener("canplay", function u() {
                var c = l._media.volume;
                l._media.volume = Math.min(c, 0.1);
                var d = l._media.play();
                (d = d.then ? d : Promise.reject())
                  .then(function () {
                    hn.log(l.TAG, "auto play by checkAutoPlay!"),
                      (l._audioCanAutoplay = !0);
                  })
                  .catch(function () {
                    hn.warn(l.TAG, "can’t auto play!"),
                      (l._audioCanAutoplay = !1),
                      l.emit(yn.AUDIO.AUDIO_NOT_ALLOWED_AUTOPLAY);
                  })
                  .finally(function () {
                    (l._media.volume = c),
                      l._startRendered ||
                        (l._media.pause(),
                        hn.log(l.TAG, "auto paused by checkAutoPlay!")),
                      l._media.removeEventListener("canplay", u);
                  });
              });
            },
          },
          {
            key: "_destroy",
            value:
              ((e = Ak(
                Ip().mark(function l() {
                  var u, c, d;
                  return Ip().wrap(
                    function (h) {
                      for (;;)
                        switch ((h.prev = h.next)) {
                          case 0:
                            if (
                              (hn.log(this.TAG, "destroy audio render"),
                              (this._remuxer = null),
                              this.removeAllListeners(),
                              this._media.removeEventListener(
                                "canplay",
                                this._onCanplay
                              ),
                              this._media.removeEventListener(
                                "playing",
                                this._onPlaying
                              ),
                              this._media.removeEventListener(
                                "waiting",
                                this._onWaiting
                              ),
                              this._media.removeEventListener(
                                "seeked",
                                this._onSeeked
                              ),
                              this._media.removeEventListener(
                                "progress",
                                this._onProgress
                              ),
                              this._media.removeEventListener(
                                "ended",
                                this._onEnded
                              ),
                              this._media.removeEventListener(
                                "progress",
                                this._onOnceProgress
                              ),
                              this._media.removeEventListener(
                                "error",
                                this._onError
                              ),
                              this._reuseMse)
                            ) {
                              h.next = 17;
                              break;
                            }
                            return (
                              (u = this._mse) === null ||
                                u === void 0 ||
                                u.endOfStream(),
                              (h.next = 15),
                              (c = this._mse) === null || c === void 0
                                ? void 0
                                : c.unbindMedia()
                            );
                          case 15:
                            h.next = 20;
                            break;
                          case 17:
                            (d = this._mse) === null ||
                              d === void 0 ||
                              d.clearAllBuffer(),
                              DM.cacheMedia({
                                codec: this._codec,
                                media: this._media,
                                mse: this._mse,
                              }),
                              hn.log(
                                this.TAG,
                                "cache media for audio play, codec=",
                                this._codec
                              );
                          case 20:
                            this._meta && (this._meta.duration = 0),
                              (this._mse = null),
                              (this._media = null);
                          case 23:
                          case "end":
                            return h.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return (
                Ru().audioWithMse &&
                !!window.MediaSource &&
                window.MediaSource.isTypeSupported(
                  'video/mp4; codecs="mp4a.40.5"'
                )
              );
            },
          },
        ]
      ),
      o
    );
  })(),
  WZ = 0.1,
  jYn = 1,
  WYn = (function () {
    function t(e) {
      bl(this, t),
        (this.TAG = "VideoTimeRange"),
        (this._parent = e),
        (this._baseDts = 0),
        (this._lastDuration = 0),
        (this._duration = 0),
        (this._bitrate = 0),
        (this._totalSize = 0),
        (this._buffers = []),
        (this._currentFrameQueue = []),
        (this._frameIndexInQueue = 0),
        (this._delayEstimateList = []),
        (this._keyframeQueue = []);
    }
    return (
      _l(t, [
        {
          key: "isLive",
          get: function () {
            return this._parent.isLive;
          },
        },
        {
          key: "baseDts",
          get: function () {
            return this._baseDts;
          },
        },
        {
          key: "duration",
          get: function () {
            return this._duration;
          },
          set: function (e) {
            this._duration = e;
          },
        },
        {
          key: "buffered",
          get: function () {
            var e = this;
            if (this.isLive)
              return {
                length: this._duration ? 1 : 0,
                start: function () {
                  return 0;
                },
                end: function () {
                  return e._duration;
                },
              };
            var n = this._mergeBufferRanges();
            return {
              length: n.length,
              start: function (r) {
                var i = n[r];
                return i ? i.start : 0;
              },
              end: function (r) {
                var i = n[r];
                return i ? i.end : 1 / 0;
              },
            };
          },
        },
        {
          key: "bufferStart",
          get: function () {
            var e;
            return (
              ((e = this._buffers[0]) === null || e === void 0
                ? void 0
                : e.start) || 0
            );
          },
        },
        {
          key: "frameLength",
          get: function () {
            return this._currentFrameQueue.length;
          },
        },
        {
          key: "keyFrameLength",
          get: function () {
            return this._keyframeQueue.length;
          },
        },
        {
          key: "totalSize",
          get: function () {
            return this._totalSize;
          },
        },
        {
          key: "bitrate",
          get: function () {
            return this._bitrate;
          },
          set: function (e) {
            this._bitrate = e;
          },
        },
        {
          key: "lastDuration",
          get: function () {
            return this._lastDuration;
          },
        },
        {
          key: "frames",
          get: function () {
            return this._currentFrameQueue;
          },
        },
        {
          key: "getCurrentTime",
          value: function (e) {
            return this._lastDuration + (e - this._baseDts) / 1e3;
          },
        },
        {
          key: "resetDts",
          value: function (e) {
            this._baseDts = e;
          },
        },
        {
          key: "_mergeBufferRanges",
          value: function () {
            var e = this._buffers.sort(function (u, c) {
                return u.start > c.start ? 1 : -1;
              }),
              n = e.length,
              r = [];
            if (!n) return r;
            for (
              var i = { start: e[0].start, end: e[0].end }, o = 1;
              o < n;
              o++
            ) {
              var l = e[o];
              Math.abs(i.end - l.start) < WZ
                ? (i.end = l.end)
                : (r.push(i), (i = { start: l.start, end: l.end }));
            }
            return r.push(i), r;
          },
        },
        {
          key: "_caclBaseDts",
          value: function (e) {
            this._baseDts === -1 &&
              e &&
              ((this._baseDts = e.dts),
              hn.log(
                this.TAG,
                "set baseDts: ",
                this._baseDts,
                "frame len:",
                this._currentFrameQueue.length
              ));
          },
        },
        {
          key: "_updateDuration",
          value: function (e) {
            for (var n = e.length, r = e[n - 1], i = 0; i < n; i++) {
              var o = e[i];
              if (o && o.options && o.options.meta) {
                var l =
                  e[i - 1] ||
                  this._currentFrameQueue[this._currentFrameQueue.length - 1];
                l
                  ? (this._lastDuration += (l.dts - this._baseDts) / 1e3)
                  : (this._lastDuration = this._duration),
                  hn.log(
                    this.TAG,
                    "updateBaseDts,record lastDuration:",
                    this._lastDuration
                  ),
                  (this._baseDts = o.dts);
                break;
              }
            }
            r &&
              (this._duration =
                (r.dts - this._baseDts) / 1e3 + this._lastDuration);
          },
        },
        {
          key: "_estimateBitRate",
          value: function (e) {
            var n = e.length;
            if (n <= 2) {
              if (
                ((this._delayEstimateList = this._delayEstimateList.concat(e)),
                (n = this._delayEstimateList.length) <= 30)
              )
                return;
              (e = this._delayEstimateList), (this._delayEstimateList = []);
            }
            for (var r = 0, i = 0; i < n; i++) {
              var o = e[i];
              r += o.data
                ? o.data.length
                : o.units.reduce(function (u, c) {
                    return u + c.byteLength;
                  }, 0);
            }
            this._totalSize += r;
            var l = r / (e[n - 1].dts - e[0].dts);
            this._bitrate = parseInt(8e3 * l);
          },
        },
        {
          key: "_beforeAppendVodBuffer",
          value: function (e) {
            var n = this;
            if (e.length) {
              for (var r = [], i = [], o = 0, l = e.length; o < l; o++)
                e[o].keyframe && (r.push(i), (i = [])), i.push(e[o]);
              i.length && r.push(i),
                r.forEach(function (u) {
                  return n._appendVodBuffer(u);
                });
            }
          },
        },
        {
          key: "_appendVodBuffer",
          value: function (e) {
            if (e.length) {
              var n = e[0],
                r = e[e.length - 1],
                i = (n.dts - this._baseDts) / 1e3,
                o = (r.dts - this._baseDts) / 1e3;
              hn.enable &&
                hn.log(
                  this.TAG,
                  "add new buffer range [".concat(i, " , ").concat(o, "]")
                ),
                this._buffers.filter(function (l) {
                  return i >= l.start && o <= l.end;
                }).length ||
                  (this._buffers.push({
                    start: i,
                    end: o,
                    duartion: o - i,
                    frames: e.slice(),
                  }),
                  this._buffers.sort(function (l, u) {
                    return l.start > u.start ? 1 : -1;
                  }),
                  this._afterAppendVodBuffer());
            }
          },
        },
        {
          key: "_afterAppendVodBuffer",
          value: function () {
            if (
              this._buffers.filter(function (u) {
                var c;
                return !(
                  (c = u.frames[0]) !== null &&
                  c !== void 0 &&
                  c.keyframe
                );
              }).length
            ) {
              for (
                var e = this._buffers,
                  n = this._buffers.length,
                  r = [],
                  i = this._buffers[0],
                  o = 1;
                o < n;
                o++
              ) {
                var l;
                (l = e[o].frames[0]) !== null && l !== void 0 && l.keyframe
                  ? (r.push(i), (i = e[o]))
                  : ((i.frames = i.frames.concat(e[o].frames)),
                    (i.end = e[o].end),
                    (i.duartion = i.end - i.start));
              }
              r.push(i), (this._buffers = r);
            }
          },
        },
        {
          key: "_recordKeyframes",
          value: function (e) {
            var n = this;
            e.forEach(function (r) {
              if (r.keyframe) {
                var i = (r.dts - n._baseDts) / 1e3;
                n._keyframeQueue.push({ position: i, frame: r });
              }
            }),
              (this._keyframeQueue = this._keyframeQueue.sort(function (r, i) {
                return r.position > i.position ? 1 : -1;
              })),
              this.isLive &&
                this._keyframeQueue.length > 40 &&
                this._keyframeQueue.splice(0, 20);
          },
        },
        {
          key: "toAnnexBNalu",
          value: function (e) {
            e.forEach(function (n) {
              var r = n.units;
              if (r) {
                var i = r.reduce(function (u, c) {
                    return u + 4 + c.byteLength;
                  }, 0),
                  o = new Uint8Array(i),
                  l = 0;
                r.forEach(function (u) {
                  o.set([0, 0, 0, 1], l),
                    (l += 4),
                    o.set(u, l),
                    (l += u.byteLength);
                }),
                  (n.units = null),
                  (n.data = o);
              }
            });
          },
        },
        {
          key: "append",
          value: function (e, n, r) {
            r && this.toAnnexBNalu(e),
              this._caclBaseDts(e[0]),
              n && this._updateDuration(e),
              this._estimateBitRate(e),
              this._recordKeyframes(e),
              this.isLive
                ? (this._currentFrameQueue = this._currentFrameQueue.concat(e))
                : this._beforeAppendVodBuffer(e);
          },
        },
        {
          key: "updateSegmentEnd",
          value: function (e) {
            var n = this._buffers[this._buffers.length - 1];
            n &&
              (Math.abs(n.end - e) < 0.5 ||
                ((n.end = e),
                (n.duartion = e - n.start),
                hn.log(this.TAG, "video data lack, reset end:", e)));
          },
        },
        {
          key: "getFrame",
          value: function () {
            var e,
              n =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 0;
            return this.isLive
              ? this._currentFrameQueue.shift()
              : (e = this._currentFrameQueue[this._frameIndexInQueue])
              ? (this._frameIndexInQueue++, e)
              : !(e = this._currentFrameQueue[--this._frameIndexInQueue]) ||
                !this.switchBuffer(
                  (e.dts - this._baseDts) / 1e3,
                  this._frameIndexInQueue++,
                  n
                )
              ? void 0
              : this.getFrame(++n);
          },
        },
        {
          key: "getFramesForPreciseSeek",
          value: function (e) {
            return this._currentFrameQueue.filter(function (n) {
              return n.dts <= e;
            });
          },
        },
        {
          key: "updateFrameIndexForPreciseSeek",
          value: function (e) {
            this._frameIndexInQueue = e;
          },
        },
        {
          key: "switchBuffer",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 0;
            if (
              !(
                (arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0) >= 20
              )
            ) {
              e = e || this.bufferStart;
              var r = this._buffers.filter(function (o) {
                return o.start < e + WZ && o.end >= e + WZ;
              })[0];
              if (!r) {
                var i = this._buffers.find(function (o) {
                  return o.start >= e;
                });
                return i && i.start - e < jYn
                  ? ((this._currentFrameQueue = i.frames.slice(0)),
                    (this._frameIndexInQueue = 0),
                    i)
                  : void 0;
              }
              return r.frames[0].dts >= e
                ? ((this._currentFrameQueue = r.frames.slice(0)),
                  (this._frameIndexInQueue = 0),
                  hn.log(
                    this.TAG,
                    "switch video buffer, time:"
                      .concat(e, " , buffer:[")
                      .concat(r.start, " , ")
                      .concat(r.end, "], index=0")
                  ),
                  r)
                : r.frames.length > n
                ? ((this._currentFrameQueue = r.frames.slice(0)),
                  hn.log(
                    this.TAG,
                    "switch video buffer, in the same gop and more frame got, time:"
                      .concat(e, " , buffer:[")
                      .concat(r.start, " , ")
                      .concat(r.end, "], index=")
                      .concat(n)
                  ),
                  r)
                : void hn.log(
                    this.TAG,
                    "switch video buffer, in the same gop and no more frame got, time:"
                      .concat(e, " , buffer:[")
                      .concat(r.start, " , ")
                      .concat(r.end, "], index=")
                      .concat(n)
                  );
            }
          },
        },
        {
          key: "getSeekStartPosition",
          value: function (e) {
            var n,
              r =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 2;
            if (
              (this._keyframeQueue.forEach(function (i) {
                i.position <= e && (n = i);
              }),
              n)
            )
              return e - n.position < r ? n : void 0;
          },
        },
        {
          key: "nextFrame",
          value: function () {
            return this._currentFrameQueue[0];
          },
        },
        {
          key: "deletePassed",
          value: function (e) {
            this._currentFrameQueue = this._currentFrameQueue.filter(function (
              n
            ) {
              return n.dts >= e;
            });
          },
        },
        {
          key: "getDtsOfTime",
          value: function (e) {
            var n = e - this._lastDuration;
            return this._baseDts + 1e3 * n;
          },
        },
        {
          key: "clean",
          value: function () {
            this._currentFrameQueue = [];
          },
        },
        {
          key: "destroy",
          value: function () {
            (this._currentFrameQueue = []), (this._buffers = []);
          },
        },
      ]),
      t
    );
  })();
function o6(t) {
  var e;
  !((e = t.buffer) === null || e === void 0) && e.close && t.buffer.close();
}
var KYn = (function () {
    function t(e) {
      bl(this, t),
        (this.TAG = "FrameQueue"),
        (this._parent = e),
        (this._lastGopId = 0),
        (this._frames = []);
    }
    return (
      _l(t, [
        {
          key: "currentTimeDts",
          get: function () {
            return this._parent.preciseVideoDts;
          },
        },
        {
          key: "length",
          get: function () {
            return this._frames.length;
          },
        },
        {
          key: "frames",
          get: function () {
            return this._frames;
          },
        },
        {
          key: "append",
          value: function (e) {
            e.info ? this._frames.push(e) : o6(e);
          },
        },
        {
          key: "appendVodFrame",
          value: function (e) {
            this._frames.push(e);
          },
        },
        {
          key: "nextFrame",
          value: function () {
            var e = this._frames.length;
            return (
              this._parent.noAudio === 1 &&
                e > 3 &&
                (this._frames = this._frames.slice(e - 2)),
              this._frames[0]
            );
          },
        },
        {
          key: "shift",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 0,
              n = this._frames.shift();
            return this.deletePassed(e), n;
          },
        },
        {
          key: "deletePassed",
          value: function (e) {
            this._frames = this._frames.filter(function (n) {
              return !!(n.info && n.info.dts > e) || (o6(n), !1);
            });
          },
        },
        {
          key: "empty",
          value: function () {
            this._frames.forEach(function (e) {
              return o6(e);
            }),
              (this._frames = []);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.empty(), (this._lastGopId = 0);
          },
        },
      ]),
      t
    );
  })(),
  ZYn = OE;
ZYn("Float32", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var YYn = (function () {
    function t() {
      bl(this, t), Ei(this, "_queue", []), Ei(this, "TAG", "FrameRenderCache");
    }
    return (
      _l(t, [
        {
          key: "cacheCvs",
          value: function (e) {
            this._queue.push(e), hn.log(this.TAG, "cache canvas!");
          },
        },
        {
          key: "getCachedCvs",
          value: function () {
            var e = this._queue.pop();
            return e && hn.log(this.TAG, "get cached canvas!"), e;
          },
        },
      ]),
      t
    );
  })(),
  Jre = new YYn(),
  YYe = (function () {
    function t(e, n) {
      bl(this, t),
        (this.TAG = "FrameRender"),
        (this.configs = Object.assign({}, e)),
        (this.parent = n),
        (this.canvas = this.configs.canvas),
        (this.canvas.glInstance = this),
        (this.meta = Object.assign({}, this.configs.meta)),
        (this.frameRenderCache = Jre),
        this._initMeta(),
        this._initContextGL(),
        this.contextGL &&
          (this._initProgram(), this._initBuffers(), this._initTextures());
    }
    return (
      _l(t, [
        {
          key: "_initMeta",
          value: function () {
            (this.chroma = this.meta.chromaFormat),
              (this.height = this.meta.height),
              (this.width = this.meta.width),
              (this.canvas.width === this.meta.width &&
                this.canvas.height === this.meta.height) ||
                ((this.canvas.width = this.meta.width),
                (this.canvas.height = this.meta.height),
                this.parent.emitResizeEvent());
          },
        },
        {
          key: "_initContextGL",
          value: function () {
            if (this.configs.type !== "2d") {
              for (
                var e = this.canvas,
                  n = null,
                  r = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"],
                  i = 0;
                !n && i < r.length;

              ) {
                var o = r[i];
                try {
                  (n = e.getContext(o, this.configs.glCtxOptions)),
                    hn.log("FrameRender", "use=", o, this.configs.glCtxOptions);
                  break;
                } catch {
                  n = null;
                }
                (n && typeof n.getParameter == "function") || (n = null), ++i;
              }
              this.contextGL = n;
            } else this.ctx = this.canvas.getContext("2d");
          },
        },
        {
          key: "_initProgram",
          value: function () {
            var e = this.contextGL,
              n = [
                "attribute vec4 vertexPos;",
                "attribute vec4 texturePos;",
                "attribute vec4 uTexturePos;",
                "attribute vec4 vTexturePos;",
                "varying vec2 textureCoord;",
                "varying vec2 uTextureCoord;",
                "varying vec2 vTextureCoord;",
                "void main()",
                "{",
                "  gl_Position = vertexPos;",
                "  textureCoord = texturePos.xy;",
                "  uTextureCoord = uTexturePos.xy;",
                "  vTextureCoord = vTexturePos.xy;",
                "}",
              ].join(`
`),
              r = [
                "precision highp float;",
                "varying highp vec2 textureCoord;",
                "varying highp vec2 uTextureCoord;",
                "varying highp vec2 vTextureCoord;",
                "uniform sampler2D ySampler;",
                "uniform sampler2D uSampler;",
                "uniform sampler2D vSampler;",
                "uniform mat4 YUV2RGB;",
                "void main(void) {",
                "  highp float y = texture2D(ySampler,  textureCoord).r;",
                "  highp float u = texture2D(uSampler,  uTextureCoord).r;",
                "  highp float v = texture2D(vSampler,  vTextureCoord).r;",
                "  gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;",
                "}",
              ].join(`
`),
              i = e.createShader(e.VERTEX_SHADER);
            e.shaderSource(i, n),
              e.compileShader(i),
              e.getShaderParameter(i, e.COMPILE_STATUS) ||
                console.log(
                  "Vertex shader failed to compile: " + e.getShaderInfoLog(i)
                );
            var o = e.createShader(e.FRAGMENT_SHADER);
            e.shaderSource(o, r),
              e.compileShader(o),
              e.getShaderParameter(o, e.COMPILE_STATUS) ||
                console.log(
                  "Fragment shader failed to compile: " + e.getShaderInfoLog(o)
                );
            var l = e.createProgram();
            e.attachShader(l, i),
              e.attachShader(l, o),
              e.linkProgram(l),
              e.getProgramParameter(l, e.LINK_STATUS) ||
                console.log(
                  "Program failed to compile: " + e.getProgramInfoLog(l)
                ),
              e.useProgram(l);
            var u = e.getUniformLocation(l, "YUV2RGB");
            e.uniformMatrix4fv(
              u,
              !1,
              [
                1.16438, 0, 1.59603, -0.87079, 1.16438, -0.39176, -0.81297,
                0.52959, 1.16438, 2.01723, 0, -1.08139, 0, 0, 0, 1,
              ]
            ),
              (this.shaderProgram = l);
          },
        },
        {
          key: "_initBuffers",
          value: function () {
            var e = this.contextGL,
              n = this.shaderProgram,
              r = e.createBuffer();
            e.bindBuffer(e.ARRAY_BUFFER, r),
              e.bufferData(
                e.ARRAY_BUFFER,
                new Float32Array([1, 1, -1, 1, 1, -1, -1, -1]),
                e.STATIC_DRAW
              );
            var i = e.getAttribLocation(n, "vertexPos");
            e.enableVertexAttribArray(i),
              e.vertexAttribPointer(i, 2, e.FLOAT, !1, 0, 0);
            var o = e.createBuffer();
            e.bindBuffer(e.ARRAY_BUFFER, o),
              e.bufferData(
                e.ARRAY_BUFFER,
                new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]),
                e.STATIC_DRAW
              );
            var l = e.getAttribLocation(n, "texturePos");
            e.enableVertexAttribArray(l),
              e.vertexAttribPointer(l, 2, e.FLOAT, !1, 0, 0),
              (this.texturePosBuffer = o);
            var u = e.createBuffer();
            e.bindBuffer(e.ARRAY_BUFFER, u),
              e.bufferData(
                e.ARRAY_BUFFER,
                new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]),
                e.STATIC_DRAW
              );
            var c = e.getAttribLocation(n, "uTexturePos");
            e.enableVertexAttribArray(c),
              e.vertexAttribPointer(c, 2, e.FLOAT, !1, 0, 0),
              (this.uTexturePosBuffer = u);
            var d = e.createBuffer();
            e.bindBuffer(e.ARRAY_BUFFER, d),
              e.bufferData(
                e.ARRAY_BUFFER,
                new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]),
                e.STATIC_DRAW
              );
            var h = e.getAttribLocation(n, "vTexturePos");
            e.enableVertexAttribArray(h),
              e.vertexAttribPointer(h, 2, e.FLOAT, !1, 0, 0),
              (this.vTexturePosBuffer = d);
          },
        },
        {
          key: "_initTextures",
          value: function () {
            var e = this.contextGL,
              n = this.shaderProgram,
              r = this._initTexture(),
              i = e.getUniformLocation(n, "ySampler");
            e.uniform1i(i, 0), (this.yTextureRef = r);
            var o = this._initTexture(),
              l = e.getUniformLocation(n, "uSampler");
            e.uniform1i(l, 1), (this.uTextureRef = o);
            var u = this._initTexture(),
              c = e.getUniformLocation(n, "vSampler");
            e.uniform1i(c, 2),
              (this.vTextureRef = u),
              e.pixelStorei(e.UNPACK_ALIGNMENT, 1);
          },
        },
        {
          key: "_initTexture",
          value: function () {
            var e = this.contextGL,
              n = e.createTexture();
            return (
              e.bindTexture(e.TEXTURE_2D, n),
              e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MAG_FILTER, e.NEAREST),
              e.texParameteri(e.TEXTURE_2D, e.TEXTURE_MIN_FILTER, e.NEAREST),
              e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_S, e.CLAMP_TO_EDGE),
              e.texParameteri(e.TEXTURE_2D, e.TEXTURE_WRAP_T, e.CLAMP_TO_EDGE),
              e.bindTexture(e.TEXTURE_2D, null),
              n
            );
          },
        },
        {
          key: "_drawPictureGL",
          value: function (e, n, r, i, o) {
            var l = i * r,
              u = (o * r) / 2;
            (this.chroma !== 444 && this.chroma !== 422) || (u *= 2);
            var c = {
              yData: (e = new Uint8Array(e)).subarray(0, l),
              uData: e.subarray(l, l + u),
              vData: e.subarray(l + u, l + u + u),
            };
            this._drawPictureGL420(c, n, r, i, o);
          },
        },
        {
          key: "_drawPictureGL420",
          value: function (e, n, r, i, o) {
            var l = this.contextGL,
              u = this.texturePosBuffer,
              c = this.uTexturePosBuffer,
              d = this.vTexturePosBuffer,
              h = this.yTextureRef,
              f = this.uTextureRef,
              p = this.vTextureRef,
              g = e.yData,
              y = e.uData,
              v = e.vData,
              b = i,
              w = r,
              k = o,
              D = r / 2;
            (this.chroma !== 422 && this.chroma !== 444) || (D = r);
            var $ = o,
              N = D,
              P = this.canvas.width / this.width,
              I = this.canvas.height / this.height,
              O = 0,
              X = 0,
              G = this.canvas.width,
              H = this.canvas.height;
            P < I
              ? ((H = (this.height * this.canvas.width) / this.width),
                (X = parseInt(
                  (this.canvas.height -
                    (this.height * this.canvas.width) / this.width) /
                    2
                )))
              : ((G = (this.width * this.canvas.height) / this.height),
                (O = parseInt(
                  (this.canvas.width -
                    (this.width * this.canvas.height) / this.height) /
                    2
                ))),
              l.viewport(O, X, G, H);
            var E = new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]);
            l.bindBuffer(l.ARRAY_BUFFER, u),
              l.bufferData(l.ARRAY_BUFFER, E, l.DYNAMIC_DRAW);
            var S = new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]);
            l.bindBuffer(l.ARRAY_BUFFER, c),
              l.bufferData(l.ARRAY_BUFFER, S, l.DYNAMIC_DRAW);
            var L = new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]);
            l.bindBuffer(l.ARRAY_BUFFER, d),
              l.bufferData(l.ARRAY_BUFFER, L, l.DYNAMIC_DRAW),
              l.activeTexture(l.TEXTURE0),
              l.bindTexture(l.TEXTURE_2D, h),
              l.texImage2D(
                l.TEXTURE_2D,
                0,
                l.LUMINANCE,
                b,
                w,
                0,
                l.LUMINANCE,
                l.UNSIGNED_BYTE,
                g
              ),
              l.activeTexture(l.TEXTURE1),
              l.bindTexture(l.TEXTURE_2D, f),
              l.texImage2D(
                l.TEXTURE_2D,
                0,
                l.LUMINANCE,
                k,
                D,
                0,
                l.LUMINANCE,
                l.UNSIGNED_BYTE,
                y
              ),
              l.activeTexture(l.TEXTURE2),
              l.bindTexture(l.TEXTURE_2D, p),
              l.texImage2D(
                l.TEXTURE_2D,
                0,
                l.LUMINANCE,
                $,
                N,
                0,
                l.LUMINANCE,
                l.UNSIGNED_BYTE,
                v
              ),
              l.drawArrays(l.TRIANGLE_STRIP, 0, 4);
          },
        },
        {
          key: "_drawPicture2d",
          value: function (e) {
            if (e && this.canvas) {
              this.ctx || (this.ctx = this.canvas.getContext("2d"));
              var n = e.displayWidth || e.width,
                r = e.displayHeight || e.height;
              (this.canvas.height === r && this.canvas.width === n) ||
                ((this.canvas.height = r), (this.canvas.width = n));
              try {
                this.ctx.drawImage(e.dom || e, 0, 0, n, r);
              } catch (i) {
                console.error(
                  this.TAG,
                  "_drawPicture2d",
                  e,
                  e.dom,
                  i,
                  i.message
                );
              }
            }
          },
        },
        {
          key: "_resize",
          value: function (e, n) {
            (this.width === e && this.height === n) ||
              ((this.width = e),
              (this.height = n),
              (this.canvas.width = e),
              (this.canvas.height = n),
              this.parent.emitResizeEvent());
          },
        },
        {
          key: "render",
          value: function (e, n, r, i, o) {
            this._resize(n, r),
              this.contextGL
                ? this._drawPictureGL(e, n, r, i, o)
                : this._drawPicture2d(e);
          },
        },
        {
          key: "resetMeta",
          value: function (e) {
            this.meta = Object.assign({}, e);
          },
        },
        {
          key: "updateBind",
          value: function (e, n) {
            (this.parent = e), this.resetMeta(n);
          },
        },
        {
          key: "destroy",
          value: function (e) {
            (this.parent = null),
              (this.canvas.style.display = "none"),
              e &&
                (this.contextGL &&
                  this.contextGL.clear(
                    this.contextGL.DEPTH_BUFFER_BIT |
                      this.contextGL.COLOR_BUFFER_BIT
                  ),
                Jre.cacheCvs(this.canvas));
          },
        },
      ]),
      t
    );
  })(),
  KZ = 5,
  QYn = (function () {
    function t(e) {
      bl(this, t),
        Ei(this, "_lowDecodeThreshold", Ru().lowDecodeThreshold / KZ),
        (this.TAG = "DecodeEstimate"),
        (this._needEstimate = !0),
        (this._parent = e),
        (this._lastDecodeDot = 0),
        (this._lastDecodeCost = 0),
        (this._lastFrameDts = 0),
        (this._dtsDeltas = []),
        (this._decodeCosts = []),
        (this._lowDecodeQueue = []),
        (this._fps = 0),
        (this._decodeFps = 0),
        (this._gopLength = 0),
        (this._webcodec = !1);
    }
    return (
      _l(t, [
        {
          key: "fps",
          get: function () {
            return this._fps;
          },
        },
        {
          key: "decodeFps",
          get: function () {
            return this._decodeFps;
          },
        },
        {
          key: "decodeCost",
          get: function () {
            return this._lastDecodeCost;
          },
        },
        {
          key: "gopLength",
          get: function () {
            return this._gopLength;
          },
        },
        {
          key: "webcodec",
          set: function (e) {
            this._webcodec = e;
          },
        },
        {
          key: "updateGopCount",
          value: function () {
            this._gopLength++;
          },
        },
        {
          key: "needEstimateFps",
          value: function () {
            this._needEstimate = !0;
          },
        },
        {
          key: "addDecodeInfo",
          value: function () {
            var e =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : { dts: 0 };
            this._estimateDecodeFps(e), this._estimateFps(e);
          },
        },
        {
          key: "resetDecodeDot",
          value: function (e) {
            this._lastDecodeDot = e || 0;
          },
        },
        {
          key: "reset",
          value: function () {
            (this._decodeCosts = []), (this._lowDecodeQueue = []);
          },
        },
        {
          key: "_estimateFps",
          value: function (e) {
            if (this._needEstimate)
              if (this._lastFrameDts) {
                var n = e.dts - this._lastFrameDts;
                if (((this._lastFrameDts = e.dts), !(Math.abs(n) > 200))) {
                  this._dtsDeltas.push(n);
                  var r = this._dtsDeltas.length;
                  r < KZ ||
                    ((this._fps = Math.ceil(
                      1e3 / this._avg(this._dtsDeltas, r)
                    )),
                    hn.log(this.TAG, "estimate fps:", this._fps),
                    (this._needEstimate = !1));
                }
              } else this._lastFrameDts = e.dts;
          },
        },
        {
          key: "_estimateDecodeFps",
          value: function (e) {
            if (this._lastDecodeDot) {
              var n = performance.now(),
                r = n - this._lastDecodeDot;
              (this._lastDecodeDot = n),
                (e.cost = r),
                (this._lastDecodeCost = r),
                this._decodeCosts.push(r);
              var i = this._decodeCosts.length;
              if (!(i < KZ)) {
                var o = this._avg(this._decodeCosts, i);
                (this._decodeFps = Math.floor(1e3 / o)),
                  (this._decodeCosts = []),
                  this._lowDecodeDetect();
              }
            } else this._lastDecodeDot = performance.now();
          },
        },
        {
          key: "_avg",
          value: function (e, n) {
            var r = e.reduce(function (i, o) {
              return (i += o);
            }, 0);
            return Math.floor(r / n) || 1;
          },
        },
        {
          key: "_lowDecodeDetect",
          value: function () {
            this._decodeFps
              ? (this._decodeFps <
                this._fps * this._parent.playbackRate + (this.webcodec ? 0 : 3)
                  ? this._lowDecodeQueue.push(this._decodeFps)
                  : this._lowDecodeQueue.pop(),
                this._lowDecodeQueue.length > this._lowDecodeThreshold &&
                  ((this._lowDecodeQueue = []),
                  hn.log(this.TAG, "解码效率过低,应该降级"),
                  this._parent.emit(yn.VIDEO.DECODE_LOW_FPS)))
              : this._parent.emit(yn.VIDEO.DECODE_LOW_FPS);
          },
        },
      ]),
      t
    );
  })(),
  JYn = `
    var timer;

    function initTimer (interval) {
      destroy()
      clearInterval(timer);
      timer = setInterval(() => {
          self.postMessage({type: 'NEXT_TICK'});
      }, interval)
    }

    function destroy () {
      clearInterval(timer);
    }

    self.onmessage = function (e) {
      var {type,interval} = e.data;
      switch (type) {
          case 'START':
            initTimer(interval);
            break;
          case 'DESTROY':
            destroy();
            break;
      }
    }
`,
  UDe = [],
  qYn = (function () {
    function t(e) {
      var n = this;
      bl(this, t),
        Ei(this, "_doTask", function () {
          var i;
          (i = n._task) === null || i === void 0 || i.call(n);
        }),
        (this._task = e);
      var r = new Blob([JYn], { type: "application/javascript" });
      (this._worker = UDe.pop() || new Worker(URL.createObjectURL(r))),
        this._bindEvent();
    }
    return (
      _l(t, [
        {
          key: "_bindEvent",
          value: function () {
            this._worker.addEventListener("message", this._doTask);
          },
        },
        {
          key: "start",
          value: function (e) {
            (e = parseInt(e)) < 10 && (e = 10),
              e > 60 ? (e = 60) : e > 25 && (e = 25),
              this._worker.postMessage({ type: "START", interval: e });
          },
        },
        {
          key: "stop",
          value: function () {
            this._worker.postMessage({ type: "DESTROY" });
          },
        },
        {
          key: "destroy",
          value: function () {
            this._worker &&
              (this._worker.postMessage({ type: "DESTROY" }),
              this._worker.removeEventListener("message", this._doTask),
              UDe.push(this._worker),
              hn.log("TickTimer", "unbind timer event"),
              (this._worker = null),
              (this._task = null));
          },
        },
      ]),
      t
    );
  })(),
  eQn = 0,
  BDe = 1,
  tQn = 2,
  nQn = 3,
  rQn = 4,
  iQn = 3,
  QYe = (function (t) {
    Wf(n, Xce);
    var e = Kf(n);
    function n(r, i) {
      var o;
      return (
        bl(this, n),
        ((o = e.call(this, r, i))._timeRange = new WYn(mi(o))),
        (o._decodeEstimate = new QYn(mi(o))),
        (o._frameQueue = new KYn(mi(o))),
        (o._lastTimeupdate = 0),
        (o._renderCost = 0),
        (o._canAutoPlay = !0),
        (o._videoDecode = !1),
        (o._inSeeking = !1),
        (o._frameRender = null),
        (o._configuration = null),
        (o._render = o._render.bind(mi(o))),
        (o._tickTimer = new qYn(o._render)),
        o._initCanvas(r),
        o._bindEvents(),
        o
      );
    }
    return (
      _l(n, [
        {
          key: "canAutoPlay",
          get: function () {
            return this._canAutoPlay;
          },
        },
        {
          key: "canvas",
          get: function () {
            return this._canvas;
          },
        },
        {
          key: "timescale",
          get: function () {
            return 1e3;
          },
        },
        {
          key: "fps",
          get: function () {
            return (
              this._decodeEstimate.fps ||
              (this._meta && this._meta.fpsNum / this._meta.fpsDen) ||
              24
            );
          },
        },
        {
          key: "decodeFps",
          get: function () {
            return this._decodeEstimate.decodeFps;
          },
        },
        {
          key: "decodeCost",
          get: function () {
            return this._decodeEstimate.decodeCost;
          },
        },
        {
          key: "renderCost",
          get: function () {
            return this._renderCost;
          },
        },
        {
          key: "totalSize",
          get: function () {
            return this._timeRange.totalSize;
          },
        },
        {
          key: "bitrate",
          get: function () {
            return this._timeRange.bitrate;
          },
          set: function (r) {
            this._timeRange.bitrate = r;
          },
        },
        {
          key: "gopLength",
          get: function () {
            return this._decodeEstimate.gopLength;
          },
        },
        {
          key: "is540p",
          get: function () {
            return this._canvas.height < 720;
          },
        },
        {
          key: "buffered",
          get: function () {
            return this._timeRange.buffered;
          },
        },
        {
          key: "inSeeking",
          get: function () {
            return this._inSeeking;
          },
        },
        {
          key: "interval",
          get: function () {
            return Math.floor(1e3 / this.fps / this.playbackRate);
          },
        },
        {
          key: "playbackRate",
          get: function () {
            return this._playbackRate || 1;
          },
        },
        {
          key: "baseDts",
          get: function () {
            return this._timeRange.baseDts;
          },
        },
        {
          key: "currentTime",
          get: function () {
            return this._timeRange.getCurrentTime(this.preciseVideoDts);
          },
        },
        {
          key: "timelinePosition",
          get: function () {
            return this._parent.timelinePosition;
          },
        },
        {
          key: "lastTimelinePosition",
          get: function () {
            return this._lastTimelinePosition || 0;
          },
          set: function (r) {
            this._lastTimelinePosition = r;
          },
        },
        {
          key: "audioSyncDts",
          get: function () {
            return this._audioDts || this.baseDts;
          },
          set: function (r) {
            this._audioDts = r;
          },
        },
        {
          key: "preciseVideoDts",
          get: function () {
            return (
              this.audioSyncDts +
              Math.floor(
                1e3 * (this.timelinePosition - this.lastTimelinePosition)
              )
            );
          },
        },
        {
          key: "readyState",
          get: function () {
            var r = this._frameQueue.length || (this.currentTime ? 1 : 0);
            return r ? (r >= 8 ? rQn : r >= 4 ? nQn : r >= 2 ? tQn : BDe) : eQn;
          },
        },
        {
          key: "isHevc",
          get: function () {
            return (this._meta || {}).codec === "hev1.1.6.L93.B0";
          },
        },
        {
          key: "videoDecode",
          get: function () {
            return this._videoDecode;
          },
        },
        {
          key: "decoderMode",
          get: function () {
            var r;
            return (r = this._decodeController) === null || r === void 0
              ? void 0
              : r.decoderMode;
          },
        },
        {
          key: "configuration",
          get: function () {
            var r, i;
            return (
              this._configuration ||
                (this._configuration =
                  this._meta.configuration ||
                  fIe(
                    (r = this._meta) === null || r === void 0
                      ? void 0
                      : r.sps[0],
                    (i = this._meta) === null || i === void 0
                      ? void 0
                      : i.pps[0]
                  )),
              this._configuration
            );
          },
          set: function (r) {
            this._configuration = r.configuration || fIe(r.sps[0], r.pps[0]);
          },
        },
        {
          key: "setSeekingStatus",
          value: function (r) {
            this._inSeeking = r;
          },
        },
        {
          key: "getDtsOfTime",
          value: function (r) {
            return this._timeRange.getDtsOfTime(r);
          },
        },
        {
          key: "updateReady",
          value: function () {
            this._whenReady();
          },
        },
        {
          key: "forceRender",
          value: function () {
            this._render(!0);
          },
        },
        {
          key: "getSeekStartPosition",
          value: function (r, i) {
            return this._timeRange.getSeekStartPosition(r, i);
          },
        },
        {
          key: "canSeek",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "emitResizeEvent",
          value: function () {
            this == null ||
              this._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.RESIZE);
          },
        },
        {
          key: "_assembleErr",
          value: function (r, i) {
            var o = new Error(r);
            return (o.code = iQn), (o.subCode = i), o;
          },
        },
        {
          key: "_emitTimelineEvents",
          value: function (r, i, o) {
            var l;
            (l = this._parent) === null || l === void 0 || l.emit(r, i, o);
          },
        },
        {
          key: "_initCanvas",
          value: function (r) {
            r.canvas
              ? (this._canvas = r.canvas)
              : (this._canvas =
                  Jre.getCachedCvs() || document.createElement("canvas")),
              (this._canvas.style.margin = "auto"),
              (this._canvas.style.position = "absolute"),
              (this._canvas.style.pointerEvents = "none");
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            var r = this;
            Bp(Gh(n.prototype), "_bindEvents", this).call(this);
            var i = function (o) {
              var l = o.width,
                u = o.height,
                c =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : 0,
                d =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : 0,
                h = r._canvas,
                f = h.width,
                p = h.height,
                g = (u * f) / p,
                y = (l * p) / f,
                v = l - g,
                b = u - y,
                w = v * c + "px",
                k = b * d + "px";
              (r._canvas.style.left = w),
                (r._canvas.style.top = k),
                hn.warn(
                  r.TAG,
                  "cvsWidth="
                    .concat(f, ", cvsHeight=")
                    .concat(p, ", scaleCvsWidth=")
                    .concat(g, ", scaleCvsHeight=")
                    .concat(y)
                ),
                hn.warn(
                  r.TAG,
                  "cover position: deltaX="
                    .concat(v, ", deltaY=")
                    .concat(b, ", width=")
                    .concat(l, ", height=")
                    .concat(u, ", pX=")
                    .concat(w, ", pY=")
                    .concat(k)
                );
            };
            this._parent.on(yn.VIDEO.UPDATE_VIDEO_FILLTYPE, function (o, l) {
              var u = l.width,
                c = l.height,
                d = r._canvas,
                h = d.width,
                f = d.height,
                p = !u || u / c > h / f;
              if (
                (hn.warn(
                  r.TAG,
                  "UPDATE_VIDEO_FILLTYPE isGapX =",
                  p,
                  "type =",
                  o,
                  h,
                  f,
                  u,
                  c
                ),
                (r._canvas.style.maxWidth = "initial"),
                (r._canvas.style.maxHeight = "initial"),
                o === "cover")
              )
                return p
                  ? ((r._canvas.style.left = 0),
                    (r._canvas.style.top = 0),
                    (r._canvas.style.height = "auto"),
                    (r._canvas.style.width = "100%"),
                    void i({ width: u, height: c }, 0, 0.5))
                  : ((r._canvas.style.left = 0),
                    (r._canvas.style.top = 0),
                    (r._canvas.style.width = "auto"),
                    (r._canvas.style.height = "100%"),
                    void i({ width: u, height: c }, 0.5, 0));
              if (o === "fill")
                return (
                  (r._canvas.style.width = "100%"),
                  void (r._canvas.style.height = "100%")
                );
              (r._canvas.style.top = 0),
                (r._canvas.style.bottom = 0),
                (r._canvas.style.left = 0),
                (r._canvas.style.right = 0),
                (r._canvas.style.maxWidth = "100%"),
                (r._canvas.style.maxHeight = "100%"),
                (r._canvas.style.width = "initial"),
                (r._canvas.style.height = "initial"),
                h < u &&
                  f < c &&
                  (h / u > f / c
                    ? (r._canvas.style.width = "100%")
                    : (r._canvas.style.height = "100%"));
            }),
              this._parent.on(yn.VIDEO.UPDATE_VIDEO_COVER_POSITION, i),
              this._parent.on(yn.TIMELINE.SYNC_DTS, function (o) {
                var l,
                  u = r._frameQueue.nextFrame(),
                  c = u && u.info && u.info.dts;
                if (
                  ((r.lastTimelinePosition = r.timelinePosition), r.noAudio)
                ) {
                  var d = r._timeRange.nextFrame();
                  o = o || c || (d && d.dts) || 0;
                }
                if (
                  ((r.audioSyncDts = o),
                  c &&
                    c - o > 500 &&
                    r._emitTimelineEvents(
                      yn.TIMELINE.PLAY_EVENT,
                      Wi.LARGE_AV_GAP,
                      {
                        aDts: o,
                        vDts: c,
                        frameLength: r._frameQueue.length,
                        currentTime: r._parent.currentTime,
                        duration: r._parent.duration,
                      }
                    ),
                  hn.log(
                    r.TAG,
                    "audio current buffer play finish, next buffer dts=",
                    o,
                    "currentTime:",
                    r._parent.currentTime,
                    "preciseVideoDts:",
                    r.preciseVideoDts,
                    "next video frame dts:",
                    c,
                    "frame length:",
                    r._frameQueue.length
                  ),
                  !(
                    r._isLive ||
                    ((l = r._parent) !== null && l !== void 0 && l.seeking)
                  ))
                ) {
                  var h = r._timeRange.nextFrame();
                  if (h) {
                    var f = (h.dts - h.baseDts) / 1e3;
                    r._parent.currentTime - f > 1 &&
                      (hn.warn(r.TAG, "丢帧!"),
                      r.ajustSeekTime(r._parent.currentTime));
                  }
                }
              }),
              this._parent.on(yn.TIMELINE.UPDATE_GL_OPTIONS, function (o) {
                r._config.glCtxOptions = o;
              }),
              this._parent.on(
                yn.TIMELINE.UPDATE_SEGMENT_END,
                this._updateSegmentEnd.bind(this)
              ),
              this.on(yn.VIDEO.AUTO_RUN, this._startRender.bind(this)),
              this._parent.on(yn.TIMELINE.SET_PLAYBACKRATE, function (o) {
                (r._playbackRate = o), r._startRender();
              });
          },
        },
        {
          key: "ajustSeekTime",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "_resetDts",
          value: function (r, i) {
            i !== "audio" && this._timeRange.resetDts(r);
          },
        },
        {
          key: "_setMetadata",
          value: function (r, i) {
            if (r !== "audio") {
              hn.warn(this.TAG, "video set metadata"), (this._meta = i);
              var o = i && i.frameRate && i.frameRate.fps;
              o
                ? hn.log(this.TAG, "detect fps:", o)
                : hn.warn(this.TAG, "no detect fps,start estimate"),
                this._initDecoder();
            }
          },
        },
        {
          key: "_initDecoder",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "_whenDecoderReady",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "_appendChunk",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "_startDecode",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "_receiveFrame",
          value: function (r, i) {
            if (this._parent && this._timeRange) {
              var o = r.info || {};
              if (
                (this._decodeEstimate.addDecodeInfo(o),
                !this._isLive &&
                  ((o.output || o.keyframe) &&
                    (this.setSeekingStatus(!1),
                    hn.warn(this.TAG, "set seeking status=", !1)),
                  this.inSeeking))
              )
                return hn.log(this.TAG, "drop frame"), void o6(r);
              this._isLive
                ? this._frameQueue.append(r)
                : this._frameQueue.appendVodFrame(r),
                i && i(),
                this._ready || (this.readyState >= BDe && this._whenReady());
            }
          },
        },
        {
          key: "_startRender",
          value: function () {
            hn.log(this.TAG, "start render"),
              this._tickTimer.start(this.interval);
          },
        },
        {
          key: "_render",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "_updateSegmentEnd",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "_whenReady",
          value: function () {
            (this._ready = !0),
              this.emit(yn.VIDEO.VIDEO_READY),
              this.noAudio &&
                this._emitTimelineEvents(yn.TIMELINE.PLAY_EVENT, Wi.PLAYING);
          },
        },
        {
          key: "_doPlay",
          value: function () {
            this._tickTimer.start();
          },
        },
        {
          key: "_doPause",
          value: function () {
            this._tickTimer.stop();
          },
        },
        {
          key: "_doSeek",
          value: function () {
            (this._ready = !1), this._frameQueue.destroy();
          },
        },
        {
          key: "_doChaseFrame",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "destroy",
          value: function (r) {
            var i, o, l, u;
            (i = this._tickTimer) === null || i === void 0 || i.destroy(),
              (o = this._timeRange) === null || o === void 0 || o.destroy(),
              (l = this._frameQueue) === null || l === void 0 || l.destroy(),
              (u = this._frameRender) === null || u === void 0 || u.destroy(r),
              (this._tickTimer = null),
              (this._canvas = null),
              (this._timeRange = null),
              (this._frameQueue = null),
              (this._frameRender = null),
              (this._decodeEstimate = null),
              (this._parent = null),
              this.removeAllListeners();
          },
        },
      ]),
      n
    );
  })(),
  aQn = 2,
  oQn = 45,
  sQn = 25,
  lQn = 720,
  HDe = 30,
  XDe = 15,
  uQn = (function (t) {
    Wf(n, Pl);
    var e = Kf(n);
    function n(r) {
      var i;
      return (
        bl(this, n),
        ((i = e.call(this)).TAG = "VideoDecoder"),
        (i._video = i._createVideo()),
        (i._IsInDecoding = !1),
        (i._fps = 0),
        (i._framId = null),
        (i._screenShotNum = 0),
        (i._allPicNum = 0),
        (i._currentBlob = null),
        (i._basePTS = 0),
        (i._totleTime = 0),
        (i._isVideoONRun = !0),
        (i.firstEmit = !1),
        (i.ptsArray = []),
        (i._currentCanvasHeight = 0),
        (i._canvasList = []),
        (i._realFrameDuration = sQn),
        (i._maxVideoHeight = r.maxVideoHeight || lQn),
        (i._minFPSTime = 0),
        (i._maxFPSTime = 0),
        (i._playFailed = !1),
        (i._isPhoneSafari = !1),
        i._createCanvasList(),
        i._bindEvents(),
        i
      );
    }
    return (
      _l(n, [
        {
          key: "_createCanvasList",
          value: function () {
            (this._canvas = document.createElement("canvas")),
              (this._ctx = this._canvas.getContext("2d", { alpha: !1 }));
            for (var r = 0; r < oQn; r++) {
              var i = this._createCanvas(),
                o = i.dom,
                l = i.ctx;
              this._canvasList.push({ dom: o, ctx: l });
            }
          },
        },
        {
          key: "_createCanvas",
          value: function () {
            var r = document.createElement("canvas"),
              i = r.getContext("2d");
            return { dom: r, ctx: i };
          },
        },
        {
          key: "_createVideo",
          value: function () {
            var r = document.createElement("video");
            return (
              r.setAttribute("muted", !0),
              r.setAttribute("autoplay", !0),
              r.setAttribute("controls", !0),
              r.setAttribute("webkit-playsinline", !0),
              r.setAttribute("playsinline", !0),
              r.setAttribute("x5-video-player-type", "h5"),
              r.setAttribute("x5-video-player-type", "h5-page"),
              (r.style.position = "absolute"),
              r
            );
          },
        },
        {
          key: "_initVideo",
          value: function (r, i) {
            if (r.blobUrl && r.dts !== void 0) {
              var o = r.blobUrl;
              (this._currentBlob = o),
                (this._basePTS = r.dts),
                (this._currentDuration = r.duration);
              try {
                hn.log(this.TAG, "_initVideo, basePTS:", r.dts),
                  this._setVideoSrc(o, i),
                  this._video.paused && this._videoPlay("_initVideo");
              } catch (l) {
                console.error(this.TAG, "_initVideo, load error", l);
              }
            } else
              console.error(
                this.TAG,
                "_initVideo",
                "input info is error, blobUrl:",
                r.blobUrl,
                "dts:",
                r.dts
              );
          },
        },
        {
          key: "_setVideoSrc",
          value: function (r, i) {
            try {
              var o = this._video;
              (o.src = r), o.load(), (o.playbackRate = aQn);
            } catch (l) {
              console.error(this.TAG, "_setVideoSrc", l);
            }
          },
        },
        {
          key: "_videoPlay",
          value: function (r) {
            var i = this,
              o = this._video;
            if (
              (hn.log(this.TAG, "_videoPlay, video is pause:", o.paused, r),
              o && o.paused)
            ) {
              var l = o.play();
              l !== void 0 &&
                l
                  .then(function () {
                    (i._playFailed = !1), hn.log(i.TAG, "_videoPlay success");
                  })
                  .catch(function (u) {
                    console.error(i.TAG, "_videoPlay failed,", u.message),
                      (i._playFailed = !0),
                      i.emit(yn.DECODE_EVENTS.PLAY_FAILED, i.firstEmit);
                  });
            }
          },
        },
        {
          key: "_removeEvents",
          value: function () {
            var r = this._video;
            r.removeEventListener("playing", this._onPlaying.bind(this)),
              r.removeEventListener("ended", this._onEnded.bind(this)),
              r.removeEventListener("error", this._onError.bind(this)),
              r.removeEventListener(
                "loadeddata",
                this._onLoadeddata.bind(this)
              ),
              r.removeEventListener(
                "timeupdate",
                this._onTimeUpdate.bind(this)
              );
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            var r = this,
              i = this._video;
            i
              ? (document.addEventListener(
                  "visibilitychange",
                  this._onVisibilityChange.bind(this)
                ),
                i.addEventListener("playing", this._onPlaying.bind(this)),
                i.addEventListener("ended", this._onEnded.bind(this)),
                i.addEventListener("error", this._onError.bind(this)),
                i.addEventListener("loadeddata", this._onLoadeddata.bind(this)),
                i.addEventListener("timeupdate", this._onTimeUpdate.bind(this)),
                i.addEventListener("pause", function () {
                  hn.log(
                    "on pause, currentTime, duration:",
                    r._vCurrentTime,
                    r._vDuration
                  );
                }),
                this.on("outputresolutionchange", this._onChange.bind(this)),
                this.on("fpsreduce", function (o) {
                  r._adaptFrameDuration(o);
                }))
              : console.error(this.TAG, "_bindEvents");
          },
        },
        {
          key: "_onTimeUpdate",
          value: function () {
            this._lastCurrentTime = this._vCurrentTime;
          },
        },
        {
          key: "_onVisibilityChange",
          value: function () {
            this._isVideoONRun = document.visibilityState === "visible";
          },
        },
        {
          key: "_onChange",
          value: function (r, i) {
            (this._width = r), (this._height = i);
          },
        },
        {
          key: "_onPlaying",
          value: function () {
            this._IsInDecoding &&
              (console.warn(
                this.TAG,
                "_onPlaying",
                "last video not correct end"
              ),
              this._framId &&
                (window.cancelAnimationFrame(this._framId),
                (this._framId = null))),
              hn.log(
                this.TAG,
                "_onPlaying, video duration:",
                this._vDuration,
                "currentTime:",
                this._vCurrentTime,
                "_lastPts:",
                this._lastPts
              ),
              (this._isInDecoding = !0),
              (this._lastCurrentTime = this._vCurrentTime),
              (this.ptsArray = []),
              this.playingTime || (this.playingTime = !0),
              this._getFrame();
          },
        },
        {
          key: "_onEnded",
          value: function (r, i) {
            hn.log(
              this.TAG,
              "_onEnded",
              "current fmp4 duration is:",
              this._vDuration,
              "_isInDecoding:",
              this._isInDecoding,
              "_lastPts:",
              this._lastPts,
              "_realFrameDuration:",
              this._realFrameDuration,
              "from:",
              i
            ),
              this._isInDecoding &&
                ((this._isInDecoding = !1),
                (this._lastMp4Duration = Math.min(
                  this._vDuration,
                  this._vCurrentTime
                )),
                this._framId &&
                  (hn.log(this.TAG, "_onEnded", "cancelAnimationFrame"),
                  window.cancelAnimationFrame(this._framId),
                  (this._framId = null)),
                (this._decodeFPS = parseInt(
                  this._screenShotNum / (this._vDuration / 1e3)
                )),
                this.emit(
                  "fps",
                  this._screenShotNum,
                  this._totleTime,
                  this._vDuration,
                  this._metaFPS,
                  {
                    height: this._currentCanvasHeight,
                    relHeight: this._video.videoHeight,
                  }
                ),
                hn.log("_timePerFrame", this._totleTime / this._screenShotNum),
                (this._timePerFrame = this._totleTime / this._screenShotNum),
                (this._screenShotNum = 0),
                (this._allPicNum = 0),
                (this._totleTime = 0),
                this._currentBlob &&
                  (URL.revokeObjectURL(this._currentBlob),
                  (this._currentBlob = null),
                  (this._basePTS = 0)),
                this.emit(
                  yn.DECODE_EVENTS.FRAGMENT_END,
                  this._decodeFPS,
                  this._video.duration
                ));
          },
        },
        {
          key: "_onError",
          value: function () {
            this._isInDecoding = !1;
            var r = this._video;
            console.error("video error:", r.error.code, r.error.message),
              this.emit("error", r.error, this.firstEmit);
          },
        },
        {
          key: "_onLoadeddata",
          value: function () {
            var r = this,
              i = this._video;
            (i.currentTime = 0.001),
              this.firstEmit ||
                (this._playFailed
                  ? ((i.style.visibility = "hidden"),
                    this.emit(yn.DECODE_EVENTS.APPEND_VIDEO, i),
                    setTimeout(function () {
                      hn.log(
                        r.TAG,
                        "onloadeddata, setTimeout firstEmit:",
                        r.firstEmit
                      ),
                        r._getFirstFrame();
                    }, 40))
                  : (hn.log(
                      this.TAG,
                      "onloadeddata, firstEmit:",
                      this.firstEmit
                    ),
                    this._getFirstFrame()));
          },
        },
        {
          key: "_getFirstFrame",
          value: function () {
            this.firstTime = Date.now();
            var r = this._vCurrentTime,
              i = this._basePTS + r,
              o = this._getImageData(i).imageData;
            (this.firstEmit = !0),
              this.emit(yn.DECODE_EVENTS.FIRST_FRAME, o, i);
          },
        },
        {
          key: "_getFrame",
          value: function () {
            var r = this._video,
              i = r.videoWidth,
              o = r.videoHeight;
            if ((this._allPicNum++, this._isInDecoding)) {
              if (i || o) {
                var l = this._vCurrentTime,
                  u = this._basePTS + l;
                if (
                  (this.ptsArray.push(u),
                  this._lastCurrentTime &&
                    this._lastCurrentTime === this._vDuration &&
                    (hn.log(
                      this.TAG,
                      "_getFrame, video ended, lastCurrentTime",
                      this._lastCurrentTime,
                      "duration:",
                      this._vDuration,
                      "isInDecoding:",
                      this._isInDecoding
                    ),
                    this._onEnded(null, "getFrame")),
                  this._lastPts && u <= this._lastPts)
                )
                  return void (this._framId = window.requestAnimationFrame(
                    this._getFrame.bind(this)
                  ));
                if (
                  this._lastPts &&
                  u - this._lastPts < this._realFrameDuration
                )
                  return void (this._framId = window.requestAnimationFrame(
                    this._getFrame.bind(this)
                  ));
                this._screenShotNum++;
                var c,
                  d = null,
                  h = Date.now();
                try {
                  d = (c = this._getImageData(u)).imageData;
                } catch (p) {
                  console.error(p, c, this._canvasList.length);
                }
                this._lastPts = u;
                var f = Date.now() - h;
                return (
                  (this._totleTime += f),
                  this.emit(yn.DECODE_EVENTS.DECODED, d, u),
                  void (this._framId = window.requestAnimationFrame(
                    this._getFrame.bind(this)
                  ))
                );
              }
              this._framId = window.requestAnimationFrame(
                this._getFrame.bind(this)
              );
            } else
              this._framId &&
                (window.cancelAnimationFrame(this._framId),
                (this._framId = null));
          },
        },
        {
          key: "_getImageData",
          value: function () {
            var r,
              i = this._video,
              o = i.videoWidth,
              l = i.videoHeight,
              u = o,
              c = l;
            this._width &&
              this._height &&
              ((u = this._width), (c = this._height)),
              c > this._maxVideoHeight &&
                ((c = this._maxVideoHeight), (u = parseInt(c * (o / l)))),
              (r = this._canvasList.shift()) ||
                (console.warn(
                  this.TAG,
                  "_getImageData, _canvansList length is 0"
                ),
                (r = this._createCanvas())),
              (r.width = u),
              (r.height = c);
            var d = r.dom,
              h = r.ctx;
            if (((this._currentCanvasHeight = c), !d)) return { imageData: r };
            d.width !== u && ((d.width = u), (d.height = c));
            try {
              l && o && u && c && h.drawImage(i, 0, 0, o, l, 0, 0, u, c);
            } catch (f) {
              console.error(this.TAG, "_getImageData, drawImage:", f);
            }
            return { imageData: r };
          },
        },
        {
          key: "_adaptFrameDuration",
          value: function (r) {
            r < XDe ? this._minFPSTime++ : (this._minFPSTime = 0),
              r > HDe ? this._maxFPSTime++ : (this._maxFPSTime = 0),
              this._minFPSTime > 0 &&
                this._decodeFPS < XDe &&
                ((this._realFrameDuration -= this._timePerFrame),
                this._realFrameDuration < 15 && (this._realFrameDuration = 15),
                (this._minFPSTime = 0)),
              this._maxFPSTime > 0 &&
                this._decodeFPS > HDe &&
                ((this._realFrameDuration += this._timePerFrame),
                (this._maxFPSTime = 0));
          },
        },
        {
          key: "_vDuration",
          get: function () {
            return parseInt(1e3 * this._video.duration);
          },
        },
        {
          key: "_vCurrentTime",
          get: function () {
            return parseInt(1e3 * this._video.currentTime);
          },
        },
        {
          key: "_reset",
          value: function () {
            (this._isInDecoding = !1),
              (this._lastPts = 0),
              (this._screenShotNum = 0),
              (this._allPicNum = 0),
              (this._totleTime = 0);
          },
        },
        {
          key: "reStartDecode",
          value: function () {
            this._video.pause(), this._reset();
            var r = this._currentBlob,
              i = this._basePTS;
            this._framId &&
              (window.cancelAnimationFrame(this._framId),
              (this._framId = null)),
              this._initVideo({ blobUrl: r, dts: i });
          },
        },
        {
          key: "doSeek",
          value: function (r) {
            if (this._isInDecoding) {
              if (r <= 0) return;
              var i =
                this._vCurrentTime / 1e3 + r >= this._vDuration / 1e3
                  ? this._vDuration / 1e3
                  : this._vCurrentTime / 1e3 + 1;
              console.error("doSeek", i), (this._video.currentTime = i);
            }
          },
        },
        {
          key: "pause",
          value: function () {
            this._isInDecoding && this._video.pause();
          },
        },
        {
          key: "play",
          value: function () {
            if (this._isInDecoding && this._video.paused)
              return (
                hn.log("video play", this._vCurrentTime), this._video.play()
              );
          },
        },
        {
          key: "startDecode",
          value: function (r, i, o) {
            this._initVideo(r, o), (this._metaFPS = i);
          },
        },
        {
          key: "stopDecode",
          value: function () {
            this._video.paused || (this._video.pause(), this._reset());
          },
        },
        {
          key: "canPlayType",
          value: function (r) {
            return this._video.canPlayType(r);
          },
        },
        {
          key: "destroy",
          value: function () {
            (this._isInDecoding = !1),
              window.cancelAnimationFrame(this._framId),
              this._video.pause(),
              this._removeEvents();
          },
        },
        {
          key: "videoWidth",
          get: function () {
            return this._video ? this._video.videoWidth : 0;
          },
        },
        {
          key: "videoHeight",
          get: function () {
            return this._video ? this._video.videoHeight : 0;
          },
        },
      ]),
      n
    );
  })(),
  VDe = 40,
  cQn = 25,
  dQn = 20,
  hQn = [
    { base: 720, level: 1 },
    { base: 540, level: 2 },
    { base: 360, level: 3 },
    { base: 280, level: 4 },
  ],
  fQn = (function (t) {
    Wf(n, Pl);
    var e = Kf(n);
    function n(r, i) {
      var o;
      return (
        bl(this, n),
        ((o = e.call(this)).TAG = "VideoDecoderController"),
        (o._decoder = new uQn(r)),
        (o._remux = new qWn()),
        o._bindEvents(),
        (o._isInit = !1),
        (o._isDataReady = !1),
        (o._ready = !1),
        (o._blobURLList = []),
        (o._isInDecoding = !1),
        (o._mediaSegmentReady = !1),
        (o._parent = i),
        (o._isDecodePause = !1),
        (o._playSuccess = !0),
        (o._isVideoOnRun = !0),
        (o._startDts = 0),
        (o._fDuration = 0),
        (o._minFPSTime = 0),
        (o._lastPts = 0),
        (o._frameLengthPerFragment = 0),
        (o._gopBufferLength = 0),
        (o._maxGopDuration = 0),
        (o._minGopDuration = 0),
        (o._currentLevel = -1),
        (o._endLevel = r.endLevel || 2),
        (o.currentFragmentDuration = 0),
        (o._handleKeyFrameVideo = o._handleKeyFrameVideo.bind(mi(o))),
        o
      );
    }
    return (
      _l(n, [
        {
          key: "_bindEvents",
          value: function () {
            var r = this;
            document.addEventListener(
              "visibilitychange",
              this._onVisibilityChange.bind(this)
            ),
              this._decoder.on(
                yn.DECODE_EVENTS.APPEND_VIDEO,
                this._onAppendVideo.bind(this)
              ),
              this._decoder.on(
                yn.DECODE_EVENTS.PLAY_FAILED,
                this._onPlayFailed.bind(this)
              ),
              this._decoder.on("error", this._onError.bind(this)),
              this._decoder.on(
                yn.DECODE_EVENTS.DECODED,
                this._onDecoded.bind(this)
              ),
              this._decoder.on(
                yn.DECODE_EVENTS.FIRST_FRAME,
                this._onFirstFrame.bind(this)
              ),
              this._decoder.on(
                yn.DECODE_EVENTS.FRAGMENT_END,
                this._onFragmentEnd.bind(this)
              ),
              this._decoder.on("fps", function () {
                for (
                  var i = arguments.length, o = new Array(i), l = 0;
                  l < i;
                  l++
                )
                  o[l] = arguments[l];
                var u = [r._metaFPS].concat(o, [r._frameLengthPerFragment]);
                r.emit.apply(r, ["fps"].concat(pWe(u)));
              }),
              this.on("keyFrame", this._handleKeyFrameVideo);
          },
        },
        {
          key: "_onRemuxed",
          value: function (r) {
            var i = {
              blobUrl: this._createBlobURL(r),
              dts: this.currentFragmentDts,
              duration: this.currentFragmentDuration,
              frameDuration: Math.floor(1e3 / this._metaFPS),
            };
            this._recordGopDuration(this.currentFragmentDuration),
              this._pushBlob(i),
              hn.log(
                this.TAG,
                "_onRemuxed",
                "maxgopduration:",
                this._maxGopDuration,
                "_gopBufferLength:",
                this._gopBufferLength
              ),
              !this._isDataReady &&
                this._gopBufferLength >= this._maxGopDuration &&
                this._checkDataReady();
          },
        },
        {
          key: "_onPlayFailed",
          value: function (r) {
            (this._isInDecoding = !1),
              this._parent.emit(yn.DECODE_EVENTS.PLAY_FAILED, r);
          },
        },
        {
          key: "_onAppendVideo",
          value: function (r) {
            this._parent.emit(yn.DECODE_EVENTS.APPEND_VIDEO, r);
          },
        },
        {
          key: "_onVisibilityChange",
          value: function () {
            this._isVideoOnRun = document.visibilityState === "visible";
          },
        },
        {
          key: "_onDecoded",
          value: function (r, i) {
            this._frameLengthPerFragment++;
            var o = this._buildFrameInfo(r, i);
            this._parent.emit(yn.DECODE_EVENTS.DECODED, o), (this._lastPts = i);
          },
        },
        {
          key: "_onFirstFrame",
          value: function (r, i) {
            var o = this._buildFrameInfo(r, i);
            this._parent.emit(yn.DECODE_EVENTS.FIRST_FRAME, o);
          },
        },
        {
          key: "_onFragmentEnd",
          value: function (r, i) {
            var o = this;
            hn.log(
              this.TAG,
              "_onFragmentEnd ,_isDecodePause:",
              this._isDecodePause,
              "decodeFPS:",
              r
            ),
              r && this._reduceResolution(r),
              (this._isInDecoding = !1),
              (this._inDecodeId = -1),
              (this._currentInfo = null),
              (this._frameLengthPerFragment = 0),
              this._getBlobLength() && !this._isDecodePause
                ? this.startDecode()
                : (this.loadNextHandle = setInterval(function () {
                    o._getBlobLength() &&
                      !o._isDecodePause &&
                      o._isVideoOnRun &&
                      !o._isInDecoding &&
                      (hn.log(
                        o.TAG,
                        "_onFragmentEnd, setInterval start next mp4 decode"
                      ),
                      o.startDecode(),
                      clearInterval(o.loadNextHandle));
                  }));
          },
        },
        {
          key: "_onError",
          value: function (r, i) {
            (this._isInDecoding = !1), this._parent.emit("error", r, i);
          },
        },
        {
          key: "_checkReady",
          value: function () {
            this._isDataReady &&
              this._isInit &&
              ((this.ready = !0),
              hn.log(this.TAG, "checkReady trigger ready"),
              this._parent.emit(yn.DECODE_EVENTS.READY));
          },
        },
        {
          key: "_checkDataReady",
          value: function () {
            (this._isDataReady = !0), this._checkReady();
          },
        },
        {
          key: "_reduceResolution",
          value: function (r) {
            if (
              (hn.log(
                this.TAG,
                "_reduceResolution",
                "currentLevel:",
                this._currentLevel,
                "endLevel:",
                this._endLevel
              ),
              this._videoHeight > 720 &&
                (hn.log(
                  this.TAG,
                  "_reduceResolution",
                  "trigger DECODE_LOW_FPS"
                ),
                this._parent.emit(yn.VIDEO.DECODE_LOW_FPS)),
              r && r < dQn
                ? (this._minFPSTime++, this._decoder.emit("fpsreduce", r))
                : (this._minFPSTime = 0),
              this._currentLevel >= this._endLevel)
            )
              return (
                hn.log(
                  this.TAG,
                  "_reduceResolution",
                  "trigger DECODE_LOW_FPS",
                  this._currentLevel,
                  this._endLevel
                ),
                void this._parent.emit(yn.VIDEO.DECODE_LOW_FPS)
              );
            if (this._minFPSTime > 2) {
              var i,
                o = this._videoWidth,
                l = this._videoHeight;
              if ((i = this._findLevel(l, this._currentLevel))) {
                if (((this._currentLevel = i.level), this._currentLevel === 4))
                  return (
                    hn.log(
                      this.TAG,
                      "_reduceResolution",
                      "trigger DECODE_LOW_FPS, _currentLevel: ",
                      this._currentLevel
                    ),
                    void this._parent.emit(yn.VIDEO.DECODE_LOW_FPS)
                  );
                (this.width = i.base * (o / l)),
                  (this.height = i.base),
                  this._decoder.emit(
                    "outputresolutionchange",
                    this.width,
                    this.height
                  );
              }
              this._minFPSTime = 0;
            }
          },
        },
        {
          key: "_findLevel",
          value: function (r, i) {
            return hQn.find(function (o) {
              return o.base < r && o.level > i;
            });
          },
        },
        {
          key: "_buildFrameInfo",
          value: function (r, i) {
            try {
              var o = r.width,
                l = r.height;
              return {
                msg: "DECODED",
                width: o,
                height: l,
                buffer: r,
                yLinesize: o,
                uvLinesize: o / 2,
                info: {
                  baseDts: void 0,
                  dts: i,
                  gopId: 0,
                  isGop: void 0,
                  key: !1,
                  pts: i,
                },
                type: "rgb",
              };
            } catch (u) {
              hn.log(this.TAG, u);
            }
          },
        },
        {
          key: "_pushBlob",
          value: function (r) {
            hn.log("push blob", r.dts, r.duration),
              r && r.duration && (this._gopBufferLength += r.duration),
              this._blobURLList.push(r);
          },
        },
        {
          key: "_shiftBlob",
          value: function () {
            var r = this._blobURLList.shift();
            return r && r.duration && (this._gopBufferLength -= r.duration), r;
          },
        },
        {
          key: "_filterBlob",
          value: function (r) {
            var i = this;
            this._blobURLList = this._blobURLList.filter(function (o) {
              return (
                o.dts < r &&
                  (URL.revokeObjectURL(o.blobUrl),
                  o.duration && (i._gopBufferLength -= o.duration)),
                o.dts >= r
              );
            });
          },
        },
        {
          key: "_emptyBlobList",
          value: function () {
            (this._blobURLList = []), (this._gopBufferLength = 0);
          },
        },
        {
          key: "_getBlobLength",
          value: function () {
            return this._blobURLList.length;
          },
        },
        {
          key: "_handleKeyFrameVideo",
          value: function (r) {
            try {
              var i = this._parent._timeRange.frames || [];
              if ((this._parent._timeRange.clean(), !i.length)) return;
              var o = i[0].dts,
                l = i[i.length - 1].dts,
                u = o - this.endDts;
              hn.log(
                this.TAG,
                "_handleKeyFrameVideo",
                "startDts:",
                o,
                "endDts:",
                l,
                "samples length:",
                i.length
              ),
                this.endDts &&
                  u > Math.floor(1e3 / this._metaFPS) + 1 &&
                  hn.log(
                    this.TAG,
                    "_handleKeyFrame, keyFrame dts:",
                    o,
                    "sample length:",
                    i.length,
                    "endDts:",
                    l,
                    "delay:",
                    u
                  );
              var c = l - o;
              if ((this._fDuration || (this._fDuration = c), c < 1500))
                return void hn.log(
                  this.TAG,
                  "_handleKeyFrame gopDuration :",
                  c,
                  "sample length:",
                  i.length,
                  "gopStartDts:",
                  o,
                  "gopEndDts:",
                  l
                );
              if (
                (this.firstDts || (this.firstDts = i[0].dts),
                (this.currentFragmentDts = i[0].dts),
                (this.currentFragmentDuration = this._getFragmentDuration(i)),
                (this.endDts = l),
                this.currentFragmentDts < this._startDts)
              )
                return (
                  console.warn(
                    this.TAG,
                    "_handleKeyFrameVideo",
                    "currentFragmentDts < this._startDts",
                    this.currentFragmentDts,
                    this._startDts
                  ),
                  void (i = [])
                );
              this.startRemux(i), (i = []);
            } catch (d) {
              console.error(this.TAG, "_handleKeyFrameVideo", d);
            }
          },
        },
        {
          key: "_getFragmentDuration",
          value: function (r) {
            var i = 0,
              o = 0;
            return (
              r[0].keyframe ||
                console.error(
                  this.TAG,
                  "_getFragmentDuration",
                  "gop firstFrame is not keyframe"
                ),
              r.forEach(function (l, u) {
                l.keyframe && u && ((i += r[u - 1].dts - r[o].dts), (o = u));
              }),
              (i += r[r.length - 1].dts - r[o].dts)
            );
          },
        },
        {
          key: "_createBlobURL",
          value: function (r) {
            if (r) {
              var i = new window.Blob([r.buffer], { type: "video/mp4" });
              return window.URL.createObjectURL(i);
            }
          },
        },
        {
          key: "_recordGopDuration",
          value: function (r) {
            var i = r;
            this._minGopDuration || (this._minGopDuration = i),
              i > this._maxGopDuration && (this._maxGopDuration = i),
              i < this._minGopDuration && (this._minGopDuration = i);
          },
        },
        {
          key: "checkMaxFrames",
          value: function (r) {
            typeof r == "number" &&
              ((this._isDecodePause = r > VDe),
              this._playSuccess &&
                this._isDecodePause &&
                this._decoder.pause());
          },
        },
        {
          key: "checkMinFrames",
          value: function (r) {
            var i = this;
            if (
              typeof r == "number" &&
              ((this._isDecodePause = !(r < cQn)), !this._isDecodePause)
            ) {
              var o = this._decoder.play();
              o !== void 0
                ? o
                    .then(function () {
                      i._playSuccess = !0;
                    })
                    .catch(function () {
                      i._playSuccess = !1;
                    })
                : setTimeout(function () {
                    i._playSuccess = !0;
                  }, 20);
            }
          },
        },
        {
          key: "frameRendend",
          value: function (r) {
            if (r.dom) {
              if (
                ((r.dom.width = 0),
                (r.dom.height = 0),
                this._decoder._canvasList.length > VDe)
              )
                return;
              this._decoder._canvasList.push(r);
            } else hn.error(this.TAG, "_onRendend", "imageObj. is error", r);
          },
        },
        {
          key: "checkValidBlob",
          value: function (r) {
            this._filterBlob(r);
          },
        },
        {
          key: "chaseVideoFrame",
          value: function (r) {
            hn.log(this.TAG, r, r.frame.dts, this.currentFragmentDts);
            var i = r.frame.dts;
            if (((this._startDts = i), i === this.currentFragmentDts)) {
              if (
                (hn.log(
                  this.TAG,
                  "_onChaseFrame",
                  "_inDecodeId:",
                  this._inDecodeId,
                  "currentFragmentDts:",
                  this.currentFragmentDts
                ),
                this._inDecodeId > 0 && this._inDecodeId < i)
              )
                return (
                  hn.log(
                    this.TAG,
                    "_onChaseFrame, _inDecodeId > 0 && _inDecodeId < startDts, _inDecodeId:",
                    this._inDecodeId,
                    "startDts:",
                    i
                  ),
                  this.stopDecode(),
                  this._filterBlob(i),
                  void this.startDecode()
                );
              if (this._inDecodeId === i)
                return (
                  hn.log(
                    this.TAG,
                    "_onChaseFrame, _inDecodeId === startDts, startDts:",
                    i
                  ),
                  this.stopDecode(),
                  void this.reStrartDecode(this._currentInfo)
                );
              this._inDecodeId === -1 &&
                (hn.log(this.TAG, "_onChaseFrame", "_inDecodeId==-1"),
                this.startDecode());
            }
            i > this.currentFragmentDts &&
              (hn.log(
                this.TAG,
                "_onChaseFrame, startDts > currentFragmentDts, startDts:",
                i,
                "currentFragmentDts:",
                this.currentFragmentDts
              ),
              this.stopDecode(),
              this._emptyBlobList()),
              i < this.currentFragmentDts &&
                (hn.log(
                  this.TAG,
                  "_onChaseFrame, startDts < currentFragmentDts, startDts:",
                  i,
                  "currentFragmentDts:",
                  this.currentFragmentDts
                ),
                i > this._inDecodeId &&
                  (this._filterBlob(i), this.stopDecode(), this.startDecode()));
          },
        },
        {
          key: "init",
          value: function (r) {
            this._isInit ||
              ((this._metaFPS = r.fpsNum / r.fpsDen || 25),
              (this._videoWidth = r.width),
              (this._videoHeight = r.height),
              (this._width = this._videoWidth),
              (this._height = this._videoHeight),
              (this._frameDuration = parseInt(1e3 / this._metaFPS)),
              (this._isInit = !0),
              hn.log("".concat(this.TAG, " has inited")),
              (this._isInit = !0),
              this._checkReady());
          },
        },
        {
          key: "reStrartDecode",
          value: function (r) {
            if (r)
              try {
                hn.log(this.TAG, "reStrartDecode"),
                  (this._isInDecoding = !0),
                  (this._inDecodeId = r.dts),
                  (this._currentInfo = r),
                  this._decoder.startDecode(r, this._metaFPS, this._startTime),
                  (this._startTime = 0);
              } catch (i) {
                console.error("load error", i);
              }
          },
        },
        {
          key: "stopDecode",
          value: function () {
            (this._isInDecoding = !1),
              (this._inDecodeId = -1),
              (this._currentInfo = null),
              (this._frameLengthPerFragment = 0),
              this._decoder.stopDecode();
          },
        },
        {
          key: "startDecode",
          value: function () {
            if (this._isInDecoding)
              hn.log(this.TAG, "startDecode", "this decoder is in decoding");
            else {
              var r = this._getBlobLength();
              if (this._decoder && r) {
                hn.log(this.TAG, "startDecode", "blob url length:", r);
                var i = this._shiftBlob() || {};
                try {
                  hn.log(this.TAG, "startDecode", i.dts, i.duration),
                    (this._isInDecoding = !0),
                    (this._inDecodeId = i.dts),
                    (this._currentInfo = i),
                    this._decoder.startDecode(i, this._metaFPS);
                } catch (o) {
                  console.error(this.TAG, "startDecode", "load error", o);
                }
              }
            }
          },
        },
        {
          key: "canSeek",
          value: function (r) {
            var i = r.frame.dts;
            return (
              !!(this.currentFragmentDts >= i && this._isInDecoding) &&
              this._inDecodeId !== i &&
              this._inDecodeId < i
            );
          },
        },
        {
          key: "startRemux",
          value: function (r) {
            if ((hn.log("startRemux samples length:", r.length), r.length)) {
              var i = this._parent._meta;
              i.samples = r;
              var o = this._remux.remux(i).videoSegment;
              this._onRemuxed(o);
            } else console.error("frame length is 0");
          },
        },
        {
          key: "canPlayType",
          value: function (r) {
            if (this._decoder)
              try {
                return this._decoder.canPlayType(
                  'video/mp4;codecs="' + r.codec + '"'
                );
              } catch (i) {
                console.error(i);
              }
          },
        },
        {
          key: "destroy",
          value: function () {
            (this._blobURLList = []), this._decoder.destroy();
          },
        },
        {
          key: "empty",
          value: function () {
            if ((hn.log("empty"), this._decoder)) {
              var r = this._decoder._canvasList;
              return (
                hn.log(this.TAG, "empty >>>>>>>>>>>>>>>>>>length:", r.length),
                r.forEach(function (i) {
                  i.dom &&
                    (hn.log("clear >>>>>>>>>>>>>>>>>>"),
                    (i.dom.width = 0),
                    (i.dom.height = 0),
                    (i.dom = null));
                }),
                r.length
              );
            }
          },
        },
        {
          key: "isIDLE",
          get: function () {
            return (
              hn.log(
                this.TAG,
                "isIDEL",
                "blob length:",
                this._getBlobLength(),
                "_isInDecoding:",
                this._isInDecoding,
                "isVideoOnRun:",
                this._isVideoOnRun,
                "_isDecodePause",
                this._isDecodePause
              ),
              !this._getBlobLength() &&
                !this._isInDecoding &&
                this._isVideoOnRun
            );
          },
        },
        {
          key: "ready",
          get: function () {
            return this._ready;
          },
          set: function (r) {
            this._ready = r;
          },
        },
        {
          key: "remux",
          get: function () {
            return this._remux;
          },
        },
        {
          key: "isInit",
          get: function () {
            return this._isInit;
          },
        },
      ]),
      n
    );
  })(),
  pQn = (function (t) {
    Wf(n, QYe);
    var e = Kf(n);
    function n(r, i) {
      var o;
      return (
        bl(this, n),
        ((o = e.call(this, r, i)).TAG = "VideoRenderFromVideo"),
        (o._videoDecodeController = new fQn(r, mi(o))),
        (o._canAutoPlay = !0),
        (o._videoDecode = r.videoDecode),
        (o._chaseToFrame = null),
        o
      );
    }
    return (
      _l(n, [
        {
          key: "videoDecode",
          get: function () {
            return this._videoDecode;
          },
          set: function (r) {
            this._videoDecode = r;
          },
        },
        {
          key: "_bindEvents",
          value: function () {
            var r = this;
            Bp(Gh(n.prototype), "_bindEvents", this).call(this),
              this.on("keyFrame", this._onKeyFrame.bind(this)),
              this.on(yn.DECODE_EVENTS.READY, this._onReady.bind(this)),
              this.on(yn.DECODE_EVENTS.DECODED, this._onDecoded.bind(this)),
              this.on(
                yn.DECODE_EVENTS.PLAY_FAILED,
                this._onPlayFailed.bind(this)
              ),
              this.on("error", this._onError.bind(this)),
              this.on(
                yn.DECODE_EVENTS.APPEND_VIDEO,
                this._onAppendVideo.bind(this)
              ),
              this.on(
                yn.DECODE_EVENTS.FIRST_FRAME,
                this._onFirstFrame.bind(this)
              ),
              this._parent.on(
                yn.DECODE_EVENTS.CHASE_VIDEO_FRAME,
                this._onChaseVideoFrame.bind(this)
              ),
              this._parent.on(
                yn.TIMELINE.SYNC_DTS,
                this._onTimeLineSyncDTS.bind(this)
              ),
              window.addEventListener("unload", function () {
                r._empty();
              });
          },
        },
        {
          key: "_onTimeLineSyncDTS",
          value: function (r) {
            this._videoDecodeController.checkValidBlob(r);
          },
        },
        {
          key: "_onChaseVideoFrame",
          value: function (r) {
            this._doChaseVideoFrame(r);
          },
        },
        {
          key: "_onAppendVideo",
          value: function (r) {
            try {
              this._parent._parent.appendChild(r);
            } catch (i) {
              cosole.error(this.TAG, "onAppendVideo", i);
            }
          },
        },
        {
          key: "_onKeyFrame",
          value: function () {
            hn.log(this.TAG, "_onKeyFrame,  keyframe"),
              this._videoDecodeController.emit("keyFrame");
          },
        },
        {
          key: "_onError",
          value: function (r, i) {
            console.error(this.TAG, "decoder error", r, i),
              i ||
                this._emitTimelineEvents(
                  yn.TIMELINE.PLAY_EVENT,
                  Wi.ERROR,
                  this._assembleErr(r && r.message)
                );
          },
        },
        {
          key: "_onReady",
          value: function () {
            if (!this._frameRender) {
              var r = Object.assign(this._config, {
                meta: this._meta,
                canvas: this._canvas,
                type: "2d",
              });
              try {
                this._frameRender = new YYe(r, this);
              } catch (i) {
                this._emitTimelineEvents(
                  yn.TIMELINE.PLAY_EVENT,
                  Wi.ERROR,
                  this._assembleErr(i && i.message)
                );
              }
            }
            this._startDecode();
          },
        },
        {
          key: "_onFirstFrame",
          value: function (r) {
            hn.log(this.TAG, "onFirstFrame"),
              this._receiveFrame(r),
              (this._firstFrame = !0);
          },
        },
        {
          key: "_onDecoded",
          value: function (r) {
            var i = this;
            this._inChaseFrame
              ? (this.chaseFrameAfter++,
                this.chaseFrameAfter === 1 &&
                  this._chaseToFrame &&
                  (this._parent.emit(
                    yn.DECODE_EVENTS.CHASE_VIDEO_FRAME_END,
                    this._chaseToFrame
                  ),
                  this._frameQueue.length &&
                    this._frameQueue.frames.forEach(function (o) {
                      i._videoDecodeController.frameRendend(o.buffer);
                    }),
                  this._frameQueue.empty(),
                  this._videoDecodeController.checkMinFrames(
                    this._frameQueue.length
                  ),
                  this._timeRange.deletePassed(this._chaseToFrame.frame.dts),
                  (this._inChaseFrame = !1),
                  (this._chaseToFrame = null),
                  console.warn(this.TAG, "onDecoded", "_inChaseFrame end")))
              : (this.chaseFrameAfter = 0),
              this._receiveFrame(r);
          },
        },
        {
          key: "_onPlayFailed",
          value: function (r) {
            console.warn(
              this.TAG,
              "onPlayFailed, this._ready:",
              this._ready,
              ",firstEmit:",
              r,
              ",frame length:",
              this._frameQueue.length
            ),
              this._ready || r || this._whenReady(),
              (this._canAutoPlay = !1);
          },
        },
        {
          key: "canSeek",
          value: function (r) {
            return this._videoDecodeController.canSeek(r);
          },
        },
        {
          key: "_initDecoder",
          value: function () {
            this._isInit ||
              (hn.log(this.TAG, "_initDecoder"),
              this._videoDecodeController.isInit ||
                this._videoDecodeController.init(this._meta),
              (this._isInit = !0));
          },
        },
        {
          key: "_receiveFrame",
          value: function (r) {
            Bp(Gh(n.prototype), "_receiveFrame", this).call(this, r),
              this._videoDecodeController.checkMaxFrames(
                this._frameQueue._frames.length
              );
          },
        },
        {
          key: "_setMetadata",
          value: function (r) {
            hn.warn(this.TAG, "video set metadata", r), (this._meta = r);
            var i = r.fpsNum / r.fpsDen;
            i
              ? hn.log(this.TAG, "detect fps:", i)
              : hn.warn(this.TAG, "no detect fps,start estimate"),
              this._initDecoder(r);
          },
        },
        {
          key: "_doChaseVideoFrame",
          value: function (r) {
            (this._inChaseFrame = !0),
              (this._chaseToFrame = r),
              this._videoDecodeController.chaseVideoFrame(r);
          },
        },
        {
          key: "_appendChunk",
          value: function (r) {
            this._meta || this._setMetadata(r);
            for (var i = r.samples.slice(), o = i.length, l = 0; l < o; l++) {
              var u = i.shift();
              u.keyframe && this.emit("keyFrame"),
                this._timeRange.append([u], this.noAudio, !1);
            }
          },
        },
        {
          key: "_startDecode",
          value: function () {
            this._videoDecodeController.startDecode();
          },
        },
        {
          key: "_checkToDecode",
          value: function () {
            this._startDecode();
          },
        },
        {
          key: "_startRender",
          value: function () {
            hn.log(this.TAG, "_startRender interval", this.interval),
              this._tickTimer.start(this.interval);
          },
        },
        {
          key: "_render",
          value: function (r) {
            var i = this,
              o = this._frameQueue.nextFrame(),
              l = this.preciseVideoDts;
            if (o && this._timeRange) {
              var u = o.info;
              if (!u)
                return this._frameQueue.shift(), void console.error("not info");
              this._renderDts = u.dts;
              var c = u.dts - l;
              if (c < -150) {
                this.lastPrecise;
                var d = this._frameQueue.frames,
                  h = this._getDeleteFrames(d, l),
                  f = h.deleteFrames,
                  p = h.useFrames;
                return (
                  d.splice(0),
                  p.forEach(function (b) {
                    d.push(b);
                  }),
                  f.forEach(function (b) {
                    i._videoDecodeController.frameRendend(b.buffer);
                  }),
                  this._videoDecodeController.emit(
                    "renderDelay",
                    c,
                    this._frameQueue._frames.length
                  ),
                  void this._videoDecodeController.checkMinFrames(
                    this._frameQueue.length
                  )
                );
              }
              if (!(!r && c > 30 && c < 6e4)) {
                Math.abs(this._lastTimeupdate - u.dts) > 250 &&
                  (this._emitTimelineEvents(
                    yn.TIMELINE.PLAY_EVENT,
                    Wi.TIMEUPDATE
                  ),
                  (this._lastTimeupdate = u.dts)),
                  hn.long &&
                    hn.log(
                      this.TAG,
                      "render delay:"
                        .concat(c, " , timelinePosition:")
                        .concat(l, " , dts:")
                        .concat(u.dts, " , cost:")
                        .concat(u.cost, " , gopID:")
                        .concat(u.gopId, " , rest:")
                        .concat(this._frameQueue.length, ", buffer frame:")
                        .concat(this._timeRange.frameLength)
                    );
                var g = performance.now();
                this._frameRender.render(
                  o.buffer,
                  o.width,
                  o.height,
                  o.yLinesize,
                  o.uvLinesize
                ),
                  this.hasFirstFrame ||
                    r ||
                    ((this.hasFirstFrame = !0),
                    this._parent.emit(yn.TIMELINE.PLAY_EVENT, "firstframe")),
                  this._videoDecodeController.frameRendend(o.buffer),
                  this._frameQueue.shift(),
                  this._videoDecodeController.checkMinFrames(
                    this._frameQueue.length
                  ),
                  this._videoDecodeController.emit(
                    "renderDelay",
                    c,
                    this._frameQueue._frames.length
                  ),
                  (this._renderCost = performance.now() - g),
                  r ||
                    (this.lastTime && (this.lastPrecise, this.lastTime),
                    (this.lastFrameinfo = u.dts),
                    (this.lastPrecise = l),
                    (this.lastTime = Date.now()),
                    (this.lastAudioTime =
                      this._parent.audioRender.currentTime));
              }
            } else {
              if (
                (this._videoDecodeController.checkMinFrames(
                  this._frameQueue._frames.length
                ),
                this._parent._paused)
              )
                return;
              if (!this._firstFrame)
                return void hn.log(
                  this.TAG,
                  "_render",
                  "not first frame return"
                );
              var y = this._videoDecodeController;
              if (
                (hn.log(
                  this.TAG,
                  ",lack frame, _inDecoding:",
                  this._videoDecodeController._isInDecoding,
                  this._videoDecodeController._isDecodePause,
                  ",_frameQueue.length:",
                  this._frameQueue.length
                ),
                !this._frameQueue.length && y.isIDLE)
              ) {
                this._ready = !1;
                var v = this._parent.audioRender;
                console.warn(
                  this.TAG,
                  "trigger video waiting vdecode, preciseVideoDts:",
                  l,
                  v.currentTime,
                  v.duration,
                  v.buffered.end(0),
                  v.baseDts
                ),
                  this.emit(yn.VIDEO.VIDEO_WAITING);
              }
              this._checkToDecode();
            }
          },
        },
        { key: "_updateSegmentEnd", value: function () {} },
        {
          key: "_destroy",
          value: function (r) {
            this._empty(),
              Bp(Gh(n.prototype), "destroy", this).call(this, r),
              this._videoDecodeController.destroy();
          },
        },
        {
          key: "_doPause",
          value: function () {
            hn.log(this.TAG, ">>>>>>>>doPause"), this._tickTimer.stop();
          },
        },
        {
          key: "_getDeleteFrames",
          value: function (r, i) {
            var o = [],
              l = [];
            return (
              r.forEach(function (u) {
                u.info && u.info.dts > i
                  ? l.push(u)
                  : u.info && u.info.dts <= i && o.push(u);
              }),
              { deleteFrames: o, useFrames: l }
            );
          },
        },
        {
          key: "_empty",
          value: function () {
            this._videoDecodeController &&
              (this._videoDecodeController.empty(),
              this._frameQueue.frames.forEach(function (r) {
                r.buffer &&
                  r.buffer.dom &&
                  ((r.buffer.dom.width = 0),
                  (r.buffer.dom.height = 0),
                  (r.buffer.dom = null));
              }));
          },
        },
      ]),
      n
    );
  })(),
  JYe = (function (t) {
    Wf(n, Pl);
    var e = Kf(n);
    function n(r) {
      var i;
      return (
        bl(this, n),
        Ei(mi((i = e.call(this))), "_parent", null),
        Ei(mi(i), "_decoderReady", !1),
        Ei(mi(i), "_inDecoding", !1),
        Ei(mi(i), "_toDecodeFirstframe", !0),
        Ei(mi(i), "_id", new Date().getMilliseconds()),
        Ei(mi(i), "_workerErrorCallback", null),
        Ei(mi(i), "_workerMessageCallback", null),
        Ei(mi(i), "_decoderWorker", null),
        (i._parent = r),
        i
      );
    }
    return (
      _l(n, [
        {
          key: "analyse",
          get: function () {
            return this._parent.analyse;
          },
        },
        {
          key: "inDecoding",
          get: function () {
            return this._inDecoding;
          },
        },
        {
          key: "decoderMode",
          get: function () {
            return this._decoderMode;
          },
        },
        {
          key: "decoderReady",
          get: function () {
            return this._decoderReady;
          },
        },
        {
          key: "needToDecode",
          get: function () {
            return this._inDecoding ? 0 : this._continueDecodeThreshold;
          },
        },
        {
          key: "maxDecodeOnce",
          get: function () {
            return this._maxDecodeOnce;
          },
        },
        {
          key: "meta",
          get: function () {
            var r;
            return (r = this._parent) === null || r === void 0
              ? void 0
              : r._meta;
          },
          set: function (r) {
            this._parent && (this._parent._meta = r);
          },
        },
        {
          key: "init",
          value: function (r, i) {
            (this._workerMessageCallback = r),
              (this._workerErrorCallback = i),
              this._initWorker();
          },
        },
        {
          key: "_initWorker",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "checkToDecode",
          value: function (r) {
            this.webcodec
              ? r <= this.needToDecode && this.doDecode()
              : !this._inDecoding && r <= this.needToDecode && this.doDecode();
          },
        },
        {
          key: "doDecode",
          value: function () {
            var r = this,
              i = this._getFramesToDecode();
            i &&
              i.length &&
              this.meta &&
              (this._toDecodeFirstframe &&
                ((this._toDecodeFirstframe = !1),
                this.analyse.addFirstFrameToDecode()),
              this._avccpushed ||
                this._initDecoderWithConfiguration(
                  this._decoderWorker,
                  this.meta
                ),
              hn.enable &&
                hn.log(this.TAG, "doDecode ".concat(i.length, " frames")),
              i.forEach(function (o) {
                r._doDecodeInternal(o);
              }),
              (this._inDecoding = !0),
              this._decoderWorker.postMessage({ msg: "finish_flag" }));
          },
        },
        {
          key: "preciseSeek",
          value: function (r) {
            var i,
              o,
              l,
              u,
              c = this,
              d = 1e3 * r,
              h =
                (i = this._parent) === null ||
                i === void 0 ||
                (o = i._timeRange) === null ||
                o === void 0
                  ? void 0
                  : o.getFramesForPreciseSeek(d),
              f = h.length;
            f < this.maxDecodeOnce
              ? this.doDecode()
              : ((l = this._parent) === null ||
                  l === void 0 ||
                  (u = l._timeRange) === null ||
                  u === void 0 ||
                  u.updateFrameIndexForPreciseSeek(f),
                hn.enable &&
                  hn.log(
                    this.TAG,
                    "doDecode ".concat(h.length, " frames for precise seek")
                  ),
                h.forEach(function (p, g) {
                  c._doDecodeInternal(p, !0, g >= f - 6);
                }),
                (this._inDecoding = !0),
                this._decoderWorker.postMessage({ msg: "finish_flag" }));
          },
        },
        {
          key: "_getFramesToDecode",
          value: function () {
            var r = this._parent,
              i = r._timeRange,
              o = r._decodeEstimate;
            if (this._decoderReady && i) {
              var l = i.frameLength;
              if (l) {
                var u = this._toDecodeFirstframe
                  ? Ru().maxDecodeOnceFirstTime
                  : this.maxDecodeOnce;
                l === 1 && o.resetDecodeDot(performance.now());
                for (var c = []; u > 0; ) {
                  var d = i && i.getFrame();
                  if (!d) break;
                  c.push(d),
                    d.gopId && d.gopId - 1 == 0 && o.updateGopCount(),
                    u--;
                }
                return c;
              }
            }
          },
        },
        {
          key: "_doDecodeInternal",
          value: function (r, i, o) {
            r != null &&
              r.meta &&
              ((this.meta = r.meta),
              hn.warn(this.TAG, "detect metadata! flush decoder"),
              this._initDecoderWithConfiguration(this.__decoderWorker, r.meta));
            var l = {
              dts: r.dts,
              pts: r.pts || r.dts + r.cts,
              keyframe: r.keyframe,
              gopId: r.gopId,
              id: this._id,
            };
            i && ((l.preciseSeek = !0), (l.output = o));
            var u = r.data.slice();
            this._decoderWorker.postMessage(
              { msg: "decode", data: u, info: l },
              [u.buffer]
            );
          },
        },
        {
          key: "_initDecoderWithConfiguration",
          value: function () {
            throw new Error("need override by children");
          },
        },
        {
          key: "flushDecoder",
          value: function () {
            this._decoderWorker.postMessage({ msg: "flush" });
          },
        },
        {
          key: "destroy",
          value: function () {
            throw new Error("need override by children");
          },
        },
      ]),
      n
    );
  })(),
  qYe =
    "IWZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBlPW51bGwsdD1bXSxzPTAsYT0hMTtzZWxmLmFkZEV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLChmdW5jdGlvbihvKXtzd2l0Y2goby5kYXRhLm1zZyl7Y2FzZSJjb25maWd1cmF0aW9uIjplPW5ldyBzZWxmLlZpZGVvRGVjb2Rlcih7b3V0cHV0OmZ1bmN0aW9uKG8pe2E9ITAscyYmY2xlYXJUaW1lb3V0KHMpO3ZhciBuPXQuc2hpZnQoKTtuP3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERUQiLHdpZHRoOm8uZGlzcGxheVdpZHRoLGhlaWdodDpvLmRpc3BsYXlIZWlnaHQsaW5mbzpuLGJ1ZmZlcjpvfSxbb10pOm8uY2xvc2UoKSxlLmRlY29kZVF1ZXVlU2l6ZT09PXQubGVuZ3RoJiZzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJCQVRDSF9GSU5JU0hfRkxBRyJ9KX0sZXJyb3I6ZnVuY3Rpb24oZSl7Y29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IixlKSwiQ29kZWMgcmVjbGFpbWVkIGR1ZSB0byBpbmFjdGl2aXR5LiIhPT1lLm1lc3NhZ2UmJnNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZTplJiZlLm1lc3NhZ2V9KX19KSxzZWxmLlZpZGVvRGVjb2Rlci5pc0NvbmZpZ1N1cHBvcnRlZChvLmRhdGEuZGF0YSkudGhlbigoZnVuY3Rpb24odCl7dC5zdXBwb3J0ZWQmJihlLmNvbmZpZ3VyZShvLmRhdGEuZGF0YSksY29uc29sZS5sb2coIltXZWJjb2RlY1dvcmtlcl06IiwiaXNDb25maWdTdXBwb3J0ZWQiLHQpKX0pKS50aGVuKChmdW5jdGlvbigpe3NlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkRFQ09ERVJfUkVBRFkifSkscz1zZXRUaW1lb3V0KChmdW5jdGlvbigpe2F8fHNlbGYucG9zdE1lc3NhZ2Uoe3R5cGU6IkZBSUxFRCIsbWVzc2FnZToibm8gZnJhbWUgb3V0cHV0In0pfSksMmUzKX0pKS5jYXRjaCgoZnVuY3Rpb24oZSl7c2VsZi5wb3N0TWVzc2FnZSh7dHlwZToiRkFJTEVEIixtZXNzYWdlOmUmJmUubWVzc2FnZX0pfSkpO2JyZWFrO2Nhc2UiZGVjb2RlIjp2YXIgbj1vLmRhdGEuZGF0YSxpPW8uZGF0YS5pbmZvO3QucHVzaChpKTt2YXIgZD1uLmJ5dGVMZW5ndGgtNCxjPW5ldyBEYXRhVmlldyhuZXcgQXJyYXlCdWZmZXIoNCkpO2Muc2V0VWludDMyKDAsZCwhMSksbi5zZXQobmV3IFVpbnQ4QXJyYXkoYy5idWZmZXIpLDApLGkua2V5ZnJhbWUmJmUuZmx1c2goKTt2YXIgcj1uZXcgc2VsZi5FbmNvZGVkVmlkZW9DaHVuayh7dHlwZTppLmtleWZyYW1lPyJrZXkiOiJkZWx0YSIsdGltZXN0YW1wOmkucHRzLGRhdGE6bn0pO2UuZGVjb2RlKHIpO2JyZWFrO2Nhc2UiZGVzdHJveSI6ZSYmKGUuZmx1c2goKSxlLmNsb3NlKCkpLGNsZWFyVGltZW91dChzKTticmVhaztjYXNlImNoZWNrRGVjb2RlIjpzZWxmLnBvc3RNZXNzYWdlKHt0eXBlOiJDSEVDS19UT19ERUNPREUiLGRhdGE6MD09PU1hdGguYWJzKGUuZGVjb2RlUXVldWVTaXplLXQubGVuZ3RoKX0pfX0pKX0oKTsK",
  zDe =
    typeof window < "u" &&
    window.Blob &&
    new Blob([atob(qYe)], { type: "text/javascript;charset=utf-8" });
function gQn() {
  var t = zDe && (window.URL || window.webkitURL).createObjectURL(zDe);
  try {
    return t
      ? new Worker(t, {})
      : new Worker("data:application/javascript;base64," + qYe, {
          type: "module",
        });
  } finally {
    t && (window.URL || window.webkitURL).revokeObjectURL(t);
  }
}
var jDe = Ru().maxDecodeOnceWebcodec,
  WDe = (function (t) {
    Wf(n, JYe);
    var e = Kf(n);
    function n() {
      var r;
      bl(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        Ei(
          mi((r = e.call.apply(e, [this].concat(o)))),
          "TAG",
          "WebCodecController"
        ),
        Ei(mi(r), "_decoderMode", 5),
        Ei(mi(r), "_maxDecodeOnce", jDe),
        Ei(mi(r), "_continueDecodeThreshold", jDe / 2),
        Ei(mi(r), "_avccpushed", !1),
        r
      );
    }
    return (
      _l(
        n,
        [
          {
            key: "webcodec",
            get: function () {
              return !0;
            },
          },
          {
            key: "needToDecode",
            get: function () {
              return this._inDecoding
                ? (this._checkToDecode(), 0)
                : this._continueDecodeThreshold;
            },
          },
          {
            key: "_initWorker",
            value: function () {
              var r = this;
              hn.log(this.TAG, "start init webcodec worker");
              var i = new gQn();
              (i.onMessage = function (o) {
                var l, u;
                switch (o.data.type) {
                  case "DECODER_READY":
                    hn.log(r.TAG, "webcodec worker ready "),
                      (r._decoderReady = !0),
                      r._workerMessageCallback({ type: "DECODER_READY" });
                    break;
                  case "DECODED":
                    if (
                      ((r._inDecoding = !0),
                      ((l = o.data) === null ||
                      l === void 0 ||
                      (u = l.info) === null ||
                      u === void 0
                        ? void 0
                        : u.id) !== r._id)
                    )
                      return;
                    r._workerMessageCallback({
                      type: "RECEIVE_FRAME",
                      data: o.data,
                    });
                    break;
                  case "BATCH_FINISH_FLAG":
                    if (((r._inDecoding = !1), !r._workerMessageCallback))
                      return;
                    r._workerMessageCallback({ type: "BATCH_FINISH" });
                    break;
                  case "CHECK_TO_DECODE":
                    r._inDecoding = o.data.data;
                    break;
                  case "FAILED":
                    r._whenError(o.data.message);
                }
              }),
                (i.onError = function (o) {
                  var l,
                    u,
                    c =
                      (l = r._parent) === null ||
                      l === void 0 ||
                      (u = l._parent) === null ||
                      u === void 0
                        ? void 0
                        : u._parent;
                  c && c.removeChild(c.querySelector("canvas")),
                    r._whenError(o.message);
                }),
                i.addEventListener("message", i.onMessage),
                i.addEventListener("error", i.onError),
                (this._decoderWorker = i),
                this._initDecoderWithConfiguration(
                  i,
                  this._parent.configuration
                );
            },
          },
          {
            key: "_whenError",
            value: function (r) {
              (n.canUse = !1), this._workerErrorCallback(r);
            },
          },
          {
            key: "_initDecoderWithConfiguration",
            value: function (r, i) {
              r.postMessage({
                msg: "configuration",
                data: {
                  codec: this._parent._meta.codec,
                  codedHeight: this._parent._meta.height,
                  codedWidth: this._parent._meta.width,
                  description: i,
                },
              }),
                (this._avccpushed = !0);
            },
          },
          {
            key: "_checkToDecode",
            value: function () {
              this._decoderWorker.postMessage({ msg: "checkDecode" });
            },
          },
          {
            key: "destroy",
            value: function () {
              var r = this._decoderWorker;
              r.removeEventListener("message", r.onMessage),
                r.removeEventListener("error", r.onError),
                r.postMessage({ msg: "destroy" }),
                r.terminate(),
                (this._decoderWorker = null);
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return (
                Ru().h264WithWebcodec &&
                !!window.VideoDecoder &&
                n.canUse !== !1
              );
            },
          },
        ]
      ),
      n
    );
  })(),
  eQe =
    " ",
  KDe =
    typeof window < "u" &&
    window.Blob &&
    new Blob([atob(eQe)], { type: "text/javascript;charset=utf-8" });
function qre() {
  var t = KDe && (window.URL || window.webkitURL).createObjectURL(KDe);
  try {
    return t
      ? new Worker(t, {})
      : new Worker("data:application/javascript;base64," + eQe, {
          type: "module",
        });
  } finally {
    t && (window.URL || window.webkitURL).revokeObjectURL(t);
  }
}
var tQe =
    " ",
  ZDe =
    typeof window < "u" &&
    window.Blob &&
    new Blob([atob(tQe)], { type: "text/javascript;charset=utf-8" });
function nQe() {
  var t = ZDe && (window.URL || window.webkitURL).createObjectURL(ZDe);
  try {
    return t
      ? new Worker(t, {})
      : new Worker("data:application/javascript;base64," + tQe, {
          type: "module",
        });
  } finally {
    t && (window.URL || window.webkitURL).revokeObjectURL(t);
  }
}
var rQe =
    " ",
  YDe =
    typeof window < "u" &&
    window.Blob &&
    new Blob([atob(rQe)], { type: "text/javascript;charset=utf-8" });
function iQe() {
  var t = YDe && (window.URL || window.webkitURL).createObjectURL(YDe);
  try {
    return t
      ? new Worker(t, {})
      : new Worker("data:application/javascript;base64," + rQe, {
          type: "module",
        });
  } finally {
    t && (window.URL || window.webkitURL).revokeObjectURL(t);
  }
}
var mQn = (function () {
    function t() {
      bl(this, t),
        Ei(this, "_queue", []),
        Ei(this, "_pendingDecoder", null),
        Ei(this, "TAG", "DecoderCache");
    }
    return (
      _l(t, [
        {
          key: "genDecoder",
          value: function (e) {
            return this._initDecoder(e);
          },
        },
        {
          key: "_initDecoder",
          value: function (e) {
            var n = this,
              r = Ru(),
              i = r.preloadDecoder,
              o = r.maxDecodeOnceWasm;
            e = e || i;
            var l,
              u,
              c = YZe(),
              d = c.H264_DECODER_URL,
              h = c.H265_SIMD_DECODER_URL,
              f = c.H265_DECODER_URL,
              p = c.H265_THREAD_DECODER_URL,
              g = 1;
            if (
              (e === "h265" &&
                (QZe()
                  ? ((l = new qre()), (u = h), (g = 2))
                  : Bce() && Ru().canUseThreadMode
                  ? ((l = new nQe()), (u = p), (g = 1))
                  : ((l = new qre()), (u = f), (g = 3))),
              e === "h264" && ((l = new iQe()), (u = d), (g = 3)),
              !l)
            )
              return Promise.resolve();
            var y = hVn();
            l.postMessage({ msg: "preload", batchDecodeCount: o, url: u }),
              (this._pendingDecoder = l),
              (l.id = Date.now() + parseInt(1e3 * Math.random())),
              (l.isHevc = e === "h265"),
              (l.using = !1),
              (l.ready = !1),
              hn.log(
                this.TAG,
                "start init decoder worker, id=",
                l.id,
                "hevc=",
                l.isHevc,
                "mode=",
                g
              );
            var v = function w(k) {
                n._pendingDecoder = null;
                var D = k.data.msg;
                switch (
                  ((D !== "DECODER_READY" && D !== "INIT_FAILED") ||
                    (l.removeEventListener("message", w),
                    l.removeEventListener("error", b)),
                  D)
                ) {
                  case "DECODER_READY":
                    hn.log(
                      n.TAG,
                      "decoder worker inited!, id=",
                      l.id,
                      "cost:",
                      k.data.cost
                    ),
                      (l.ready = !0),
                      l.using || n._queue.push(l),
                      y.resolve();
                    break;
                  case "INIT_FAILED":
                    hn.log(n.TAG, "decoder worker init failed!", k.data.log),
                      y.reject(k.data.log);
                }
              },
              b = function w(k) {
                l.removeEventListener("message", v),
                  l.removeEventListener("error", w),
                  y.reject(k == null ? void 0 : k.message);
              };
            return (
              l.addEventListener("message", v),
              l.addEventListener("error", b),
              y
            );
          },
        },
        {
          key: "cacheDecoder",
          value: function (e) {
            (e.using = !1),
              (e.ready = !0),
              e.id || (e.id = Date.now() + parseInt(1e3 * Math.random())),
              this._queue.push(e),
              hn.log(this.TAG, "cache decoder, id=", e.id),
              Ru().preloadDecoder === "h265" &&
                this._queue.filter(function (n) {
                  return !n.using && n.isHevc;
                }).length === 1 &&
                this.genDecoder("h265");
          },
        },
        {
          key: "getCachedDecoder",
          value: function (e) {
            var n,
              r = this._queue.findIndex(function (i) {
                return !i.using && i.isHevc === e;
              });
            if (
              (r !== -1 && (n = this._queue.splice(r, 1)[0]),
              !n &&
                this._pendingDecoder &&
                ((n = this._pendingDecoder), (this._pendingDecoder = null)),
              n)
            )
              return (
                (n.using = !0),
                hn.warn(
                  this.TAG,
                  "get cached decoder, id="
                    .concat(n.id, ", ready=")
                    .concat(n.ready)
                ),
                n
              );
          },
        },
      ]),
      t
    );
  })(),
  hL = new mQn(),
  ZZ = Ru().maxDecodeOnceWasm,
  yQn = (function (t) {
    Wf(n, JYe);
    var e = Kf(n);
    function n() {
      var r;
      bl(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        Ei(
          mi((r = e.call.apply(e, [this].concat(o)))),
          "TAG",
          "WasmController"
        ),
        Ei(mi(r), "_avccpushed", !1),
        Ei(mi(r), "_maxDecodeOnce", ZZ),
        Ei(mi(r), "_continueDecodeThreshold", ZZ / 2),
        Ei(mi(r), "_wasmInitCost", 0),
        Ei(mi(r), "_threadSupported", Bce() && Ru().canUseThreadMode),
        Ei(mi(r), "_simdSuppported", QZe()),
        Ei(mi(r), "_decoderMode", window.WebAssembly ? 3 : 4),
        r
      );
    }
    return (
      _l(n, [
        {
          key: "wasmInitCost",
          get: function () {
            var r;
            return (r = this._decoderWorker) === null || r === void 0
              ? void 0
              : r._wasmInitCost;
          },
        },
        {
          key: "isHevc",
          get: function () {
            var r;
            return (r = this._parent) === null || r === void 0
              ? void 0
              : r.isHevc;
          },
        },
        {
          key: "_selectDecodeWorker",
          value: function () {
            this.analyse.addWasmInit();
            var r,
              i = YZe(),
              o = i.H264_DECODER_URL,
              l = i.H265_DECODER_URL,
              u = i.H265_THREAD_DECODER_URL,
              c = i.H265_SIMD_DECODER_URL,
              d = i.ASM_H264_DECODER_URL,
              h = i.ASM_H265_DECODER_URL;
            return (
              hn.log(
                this.TAG,
                "start init wasm worker:",
                performance.now(),
                "hevc:",
                this.isHevc,
                "decoderMode:",
                this._decoderMode
              ),
              this.isHevc
                ? (r =
                    this._decoderMode === 1
                      ? u
                      : this._decoderMode === 2
                      ? c
                      : this._decoderMode === 3
                      ? l
                      : h)
                  ? {
                      decoder: this._decoderMode === 1 ? new nQe() : new qre(),
                      url: r,
                    }
                  : void this._workerErrorCallback(
                      "no found decoder url, decodeMode:".concat(
                        this._decoderMode
                      )
                    )
                : (r = this._decoderMode === 4 ? d : o)
                ? { decoder: new iQe(), url: r }
                : void this._workerErrorCallback(
                    "no found decoder url, decodeMode:".concat(
                      this._decoderMode
                    )
                  )
            );
          },
        },
        {
          key: "_initWorker",
          value: function () {
            this.isHevc &&
              (this._threadSupported && (this._decoderMode = 1),
              this._simdSuppported && (this._decoderMode = 2)),
              this._initDecodeWorkerInternal();
          },
        },
        {
          key: "_initDecodeWorkerInternal",
          value: function () {
            var r = hL.getCachedDecoder(this.isHevc);
            if (r)
              return (
                hn.warn(this.TAG, "select decoder from cache"),
                this.analyse.addWasmInit(),
                (this._avccpushed = !1),
                this._bindWorkerEvent(r),
                (this._decoderWorker = r),
                void (
                  r.ready &&
                  ((this._decoderReady = !0),
                  this._initDecoderWithConfiguration(r, this.meta),
                  this._workerMessageCallback({
                    type: "DECODER_READY",
                    data: r,
                  }),
                  hn.log(this.TAG, "decoder ready!"))
                )
              );
            var i = this._selectDecodeWorker() || {},
              o = i.decoder,
              l = i.url;
            o &&
              ((this._avccpushed = !1),
              this._bindWorkerEvent(o),
              (o.isHevc = this.isHevc),
              o.postMessage({
                msg: "init",
                meta: this.meta,
                batchDecodeCount: ZZ,
                url: l,
              }),
              (this._decoderWorker = o));
          },
        },
        {
          key: "_bindWorkerEvent",
          value: function (r) {
            var i = this,
              o = function (l, u) {
                hn.log(i.TAG, "worker failed: ", l, u),
                  i._terminateWorker(r),
                  (i._decoderWorker = null),
                  Ru().wasmFallbackToAsm === !1 || i._decoderMode === 4
                    ? i._workerErrorCallback(l)
                    : ((i._decoderMode =
                        i._decoderMode === 1 || i._decoderMode === 2 ? 3 : 4),
                      i._initDecodeWorkerInternal());
              };
            (r._onMessage = function (l) {
              var u, c;
              switch (l.data.msg) {
                case "DECODER_READY":
                  if (
                    (hn.log(i.TAG, "wasm worker ready!", "cost:", l.data.cost),
                    (i._decoderReady = !0),
                    (r._wasmInitCost = parseInt(l.data.cost)),
                    !i.meta)
                  )
                    return;
                  i._avccpushed || i._initDecoderWithConfiguration(r, i.meta),
                    i.emit(yn.VIDEO.VIDEO_DECODER_INIT, r),
                    i._workerMessageCallback({
                      type: "DECODER_READY",
                      data: r,
                    });
                  break;
                case "DECODED":
                  if (
                    ((i._inDecoding = !0),
                    ((u = l.data) === null ||
                    u === void 0 ||
                    (c = u.info) === null ||
                    c === void 0
                      ? void 0
                      : c.id) !== i._id)
                  )
                    return;
                  i._workerMessageCallback({
                    type: "RECEIVE_FRAME",
                    data: l.data,
                  });
                  break;
                case "BATCH_FINISH_FLAG":
                  if (((i._inDecoding = !1), !i._workerMessageCallback)) return;
                  i._workerMessageCallback({ type: "BATCH_FINISH" });
                  break;
                case "INIT_FAILED":
                  o(l.data.log, 1);
              }
            }),
              (r._onError = function (l) {
                o(l.message, 2);
              }),
              r.addEventListener("message", r._onMessage),
              r.addEventListener("error", r._onError);
          },
        },
        {
          key: "_initDecoderWithConfiguration",
          value: function (r, i) {
            hn.log(this.TAG, "init decoder with configuration"),
              (this._avccpushed = !0),
              r.postMessage({ msg: "updatemeta", meta: i });
            var o = [
                i.rawVps || i.vps[0],
                i.rawSps || i.sps[0],
                i.rawPps || i.pps[0],
              ].filter(Boolean),
              l = o.reduce(function (d, h) {
                return d + (h.byteLength + 4);
              }, 0),
              u = new Uint8Array(l),
              c = 0;
            o.forEach(function (d) {
              u.set([0, 0, 0, 1], c),
                (c += 4),
                u.set(d, c),
                (c += d.byteLength);
            }),
              r.postMessage({ msg: "initDecoder", data: u });
          },
        },
        {
          key: "destroy",
          value: function () {
            if (this._decoderWorker)
              return Ru().reuseWasmDecoder
                ? (this._offWorkerBind(this._decoderWorker),
                  void hL.cacheDecoder(this._decoderWorker))
                : void this._terminateWorker(this._decoderWorker);
          },
        },
        {
          key: "_offWorkerBind",
          value: function (r) {
            r.removeEventListener("message", r._onMessage),
              r.removeEventListener("error", r._onError),
              r.postMessage({ msg: "flush" }),
              (r._onMessage = null),
              (r._onError = null),
              hn.log(this.TAG, "flush decoder and unbind worker event");
          },
        },
        {
          key: "_terminateWorker",
          value: function (r) {
            this._offWorkerBind(r),
              r.postMessage({ msg: "destroy" }),
              r.terminate(),
              hn.log(this.TAG, "destroy decoder worker");
          },
        },
      ]),
      n
    );
  })(),
  vQn = 1,
  bQn = 2,
  QDe = (function (t) {
    Wf(n, QYe);
    var e = Kf(n);
    function n() {
      var r;
      bl(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        Ei(
          mi((r = e.call.apply(e, [this].concat(o)))),
          "TAG",
          "VideoRenderWithDecoder"
        ),
        Ei(mi(r), "_hideRenderFlag", 0),
        Ei(mi(r), "_recentMeta", null),
        Ei(mi(r), "_inChaseFrame", !1),
        Ei(mi(r), "_decoderErrorCallback", function (u) {
          r._emitTimelineEvents(
            yn.TIMELINE.PLAY_EVENT,
            Wi.ERROR,
            r._assembleErr(u, vQn)
          );
        }),
        Ei(mi(r), "_decoderMessageCallback", function (u) {
          var c,
            d,
            h,
            f = u.type,
            p = u.data;
          switch (f) {
            case "DECODER_READY":
              if ((r.analyse.addWasmReady(), !r._frameRender)) {
                var g = Object.assign(r._config, {
                  meta: r._meta,
                  canvas: r._canvas,
                  type: r._decodeController.webcodec ? "2d" : "",
                });
                try {
                  r._canvas.glInstance
                    ? ((r._frameRender = r._canvas.glInstance),
                      r._frameRender.updateBind(mi(r), r._meta),
                      hn.warn(r.TAG, "reuse canvas and context"))
                    : ((r._frameRender = new YYe(g, mi(r))),
                      hn.log(r.TAG, "create frameRender with config", g));
                } catch (y) {
                  r._emitTimelineEvents(
                    yn.TIMELINE.PLAY_EVENT,
                    Wi.ERROR,
                    r._assembleErr(y && y.message, bQn)
                  );
                }
              }
              r._startDecode();
              break;
            case "RECEIVE_FRAME":
              if (
                r._inChaseFrame &&
                ((c = r._decodeController) === null ||
                  c === void 0 ||
                  !c.webcodec)
              )
                return;
              r._receiveFrame(p);
              break;
            case "BATCH_FINISH":
              (d = mi(r)) === null ||
                d === void 0 ||
                d._decodeEstimate.resetDecodeDot(),
                r._inChaseFrame &&
                  ((r._inChaseFrame = !1), r._frameQueue.empty()),
                r._ready ||
                  r.inSeeking ||
                  (h = r._decodeController) === null ||
                  h === void 0 ||
                  !h.decoderReady ||
                  r._startDecode();
          }
        }),
        r
      );
    }
    return (
      _l(n, [
        {
          key: "wasmInitCost",
          get: function () {
            var r;
            return (r = this._decodeController) === null || r === void 0
              ? void 0
              : r.wasmInitCost;
          },
        },
        {
          key: "hevcThread",
          get: function () {
            return this.decodeMode === 1;
          },
        },
        {
          key: "lowlatency",
          get: function () {
            return this._parent.lowlatency;
          },
        },
        {
          key: "nextFrameTime",
          get: function () {
            var r = this._frameQueue.nextFrame();
            return ((r && r.info && r.info.dts) || 0) / 1e3;
          },
        },
        {
          key: "ajustSeekTime",
          value: function (r, i) {
            var o;
            hn.log(this.TAG, "ajust seek time: ", r),
              this._frameQueue.empty(),
              (o = this._decodeController) === null ||
                o === void 0 ||
                o.flushDecoder(),
              this._switchVideoBuffer(r, i);
          },
        },
        {
          key: "canSeek",
          value: function () {
            return !0;
          },
        },
        {
          key: "_appendChunk",
          value: function (r) {
            var i;
            if (!this.noVideo && this._timeRange) {
              if (this._meta) {
                if (
                  this._recentMeta.width !== r.width ||
                  this._recentMeta.height !== r.height
                ) {
                  hn.warn(
                    this.TAG,
                    "metadata changed! width: "
                      .concat(this._recentMeta.width, " -> ")
                      .concat(r.width, ", height: ")
                      .concat(this._recentMeta.height, " -> ")
                      .concat(r.height)
                  );
                  var o = r.samples[0];
                  o &&
                    (this._recentMeta = o.meta =
                      Object.assign({}, r, { samples: null }));
                }
              } else {
                this._emitTimelineEvents(
                  yn.TIMELINE.PLAY_EVENT,
                  Wi.LOADEDMETADATA
                ),
                  (this._recentMeta = this._meta =
                    Object.assign({}, r, { samples: null })),
                  hn.warn(
                    this.TAG,
                    "video set metadata",
                    this._meta,
                    "configuration:",
                    this.configuration
                  );
                var l = r.fpsNum / r.fpsDen;
                l
                  ? hn.log(this.TAG, "detect fps:", l)
                  : hn.warn(this.TAG, "no detect fps,start estimate"),
                  this._selectDecoder(),
                  this._initDecoder();
              }
              if (
                (this._timeRange.append(
                  r.samples,
                  this._isLive && this.noAudio,
                  !this.videoDecode
                ),
                (r.samples = []),
                !this.inSeeking)
              ) {
                var u;
                this.isLive ||
                  this._timeRange.frameLength ||
                  this._switchVideoBuffer(this._parent.currentTime),
                  !this._ready &&
                    (i = this._decodeController) !== null &&
                    i !== void 0 &&
                    i.decoderReady &&
                    ((!this.noAudio &&
                      (u = this._decodeController) !== null &&
                      u !== void 0 &&
                      u.inDecoding) ||
                      this._startDecode()),
                  this.noAudio &&
                    this._emitTimelineEvents(
                      yn.TIMELINE.PLAY_EVENT,
                      Wi.DURATION_CHANGE
                    );
              }
            }
          },
        },
        {
          key: "_selectDecoder",
          value: function () {
            if (!this.isHevc && WDe.isSupported())
              return (
                (this._decodeController = new WDe(this)),
                void (this._decodeEstimate.webcodec = !0)
              );
            this._decodeController = new yQn(this);
          },
        },
        {
          key: "_initDecoder",
          value: function () {
            var r;
            (r = this._decodeController) === null ||
              r === void 0 ||
              r.init(this._decoderMessageCallback, this._decoderErrorCallback);
          },
        },
        {
          key: "_startDecode",
          value: function () {
            var r;
            (r = this._decodeController) === null ||
              r === void 0 ||
              r.doDecode();
          },
        },
        {
          key: "_switchVideoBuffer",
          value: function (r, i) {
            var o = this._timeRange.switchBuffer(r);
            if (o) {
              var l;
              if (
                (this.noAudio &&
                  this._parent.emit(
                    yn.TIMELINE.SYNC_DTS,
                    this.getDtsOfTime(o.start)
                  ),
                i)
              )
                return void (
                  (l = this._decodeController) === null ||
                  l === void 0 ||
                  l.preciseSeek(r)
                );
              this._startDecode(i);
            }
          },
        },
        {
          key: "_checkToDecode",
          value: function () {
            var r;
            this.inSeeking ||
              (r = this._decodeController) === null ||
              r === void 0 ||
              r.checkToDecode(this._frameQueue.length);
          },
        },
        {
          key: "_render",
          value: function (r) {
            var i;
            if (!this.noVideo) {
              var o = this._frameQueue && this._frameQueue.nextFrame();
              if (o) {
                var l = o.info;
                if (!l)
                  return (
                    this._frameQueue.shift(), void console.error("not info")
                  );
                this._renderDts = l.dts;
                var u = l.dts - this.preciseVideoDts;
                if (!(!r && u > 0 && u < 6e4)) {
                  this._frameQueue.shift(this.preciseVideoDts),
                    Math.abs(this._lastTimeupdate - l.dts) > 250 &&
                      (this._emitTimelineEvents(
                        yn.TIMELINE.PLAY_EVENT,
                        Wi.TIMEUPDATE,
                        { pts: l.originPts / 90 }
                      ),
                      (this._lastTimeupdate = l.dts)),
                    hn.long &&
                      hn.log(
                        this.TAG,
                        "render delay:"
                          .concat(u, " , timelinePosition:")
                          .concat(this.preciseVideoDts, " , dts:")
                          .concat(l.dts, " , cost:")
                          .concat(l.cost, " , gopID:")
                          .concat(l.gopId, " , rest:")
                          .concat(this._frameQueue.length, ", buffer frame:")
                          .concat(this._timeRange.frameLength)
                      );
                  var c = performance.now();
                  this._hideRenderFlag++,
                    (document.visibilityState === "visible" ||
                      this._hideRenderFlag % 15) &&
                      this._frameRender.render(
                        o.buffer,
                        o.width,
                        o.height,
                        o.yLinesize,
                        o.uvLinesize
                      ),
                    (i = this._decodeController) !== null &&
                      i !== void 0 &&
                      i.webcodec &&
                      o.buffer.close(),
                    (this._renderCost = performance.now() - c),
                    this._checkToDecode();
                }
              } else {
                var d;
                if (
                  (hn.log(
                    this.TAG,
                    "lack frame, ",
                    "inDecoding:",
                    (d = this._decodeController) === null || d === void 0
                      ? void 0
                      : d.inDecoding
                  ),
                  this._checkToDecode(),
                  this.noAudio)
                ) {
                  var h;
                  if (
                    !this.isLive &&
                    Math.abs(this.currentTime - this.duration) < 0.5
                  )
                    return (
                      this == null ||
                        this._emitTimelineEvents(
                          yn.TIMELINE.PLAY_EVENT,
                          Wi.TIMEUPDATE
                        ),
                      this == null ||
                        this._emitTimelineEvents(
                          yn.TIMELINE.PLAY_EVENT,
                          Wi.ENDED
                        ),
                      void (
                        (h = this._timeRange) === null ||
                        h === void 0 ||
                        h.clean()
                      )
                    );
                  this._timeRange.frameLength ||
                    ((this._ready = !1), this.emit(yn.VIDEO.VIDEO_WAITING));
                }
              }
            }
          },
        },
        {
          key: "_updateSegmentEnd",
          value: function (r) {
            var i;
            (i = this._timeRange) === null ||
              i === void 0 ||
              i.updateSegmentEnd(r);
          },
        },
        {
          key: "_doChaseFrame",
          value: function (r) {
            var i = r.frame;
            (this._inChaseFrame = !0),
              this._timeRange.deletePassed(i.dts),
              this._frameQueue.empty(),
              this.noAudio && this._parent.emit(yn.TIMELINE.SYNC_DTS, i.dts);
          },
        },
        {
          key: "_destroy",
          value: function (r) {
            var i;
            hn.log(this.TAG, "destroy video render"),
              Bp(Gh(n.prototype), "destroy", this).call(this, r),
              (i = this._decodeController) === null ||
                i === void 0 ||
                i.destroy(),
              (this._decodeController = null);
          },
        },
      ]),
      n
    );
  })(),
  PM = 0.1,
  _Qn = (function (t) {
    Wf(n, Pl);
    var e = Kf(n);
    function n(r, i) {
      var o;
      return (
        bl(this, n),
        ((o = e.call(this)).TAG = "TimeLine"),
        (o._parent = i),
        (o._seeking = !1),
        (o.audioRender = FDe.isSupported()
          ? new FDe(r, mi(o))
          : new wzn(r, mi(o))),
        (o.videoRender = new QDe(r, mi(o))),
        (o._readyStatus = { audio: !1, video: !1 }),
        (o._paused = !0),
        (o._switchToMultiWorker = !1),
        (o._lowdecodeEmited = !1),
        (o._startPlayed = !1),
        (o._emitReady = !1),
        (o._lastSeekTime = 1e-4),
        (o._singleTrack = -1),
        o._bindEvent(),
        (o._decodeVideo = r.video),
        o
      );
    }
    return (
      _l(n, [
        {
          key: "analyse",
          get: function () {
            return this._parent.analyse;
          },
        },
        {
          key: "ready",
          get: function () {
            return this._readyStatus.video && this._readyStatus.audio;
          },
        },
        {
          key: "played",
          get: function () {
            var r = this;
            return {
              length: this.currentTime ? 1 : 0,
              start: function () {
                return 0;
              },
              end: function () {
                return r.currentTime;
              },
            };
          },
        },
        {
          key: "noAudio",
          get: function () {
            return this._singleTrack === 1 || this._singleTrack === 2;
          },
        },
        {
          key: "isLive",
          get: function () {
            return this._parent.live;
          },
        },
        {
          key: "seeking",
          get: function () {
            return this._seeking;
          },
        },
        {
          key: "decodeFps",
          get: function () {
            return this.videoRender.decodeFps;
          },
        },
        {
          key: "decodeCost",
          get: function () {
            return this.videoRender.decodeCost;
          },
        },
        {
          key: "renderCost",
          get: function () {
            return this.videoRender.renderCost;
          },
        },
        {
          key: "wasmInitCost",
          get: function () {
            return this.videoRender.wasmInitCost;
          },
        },
        {
          key: "fps",
          get: function () {
            return this.videoRender.fps;
          },
        },
        {
          key: "totalSize",
          get: function () {
            return this.videoRender.totalSize;
          },
        },
        {
          key: "bitrate",
          get: function () {
            return this.videoRender.bitrate;
          },
        },
        {
          key: "gopLength",
          get: function () {
            return this.videoRender.gopLength;
          },
        },
        {
          key: "currentTime",
          get: function () {
            return this.noAudio
              ? this.paused
                ? this.videoRender.nextFrameTime
                : this.videoRender.currentTime
              : this.audioRender.currentTime;
          },
        },
        {
          key: "timelinePosition",
          get: function () {
            return this.noAudio
              ? performance.now() / 1e3
              : this.audioRender.currentTime;
          },
        },
        {
          key: "canvas",
          get: function () {
            return this.videoRender.canvas;
          },
        },
        {
          key: "readyState",
          get: function () {
            return this.videoRender.readyState;
          },
        },
        {
          key: "buffered",
          get: function () {
            var r = this;
            return this.noAudio
              ? this.videoRender.buffered
              : this.isLive
              ? this.audioRender.buffered
              : {
                  length: this.audioRender.buffered.length,
                  start: function (i) {
                    return Math.max(
                      r.audioRender.buffered.start(i),
                      r.videoRender.buffered.start(i)
                    );
                  },
                  end: function (i) {
                    return Math.min(
                      r.audioRender.buffered.end(i),
                      r.videoRender.buffered.end(i)
                    );
                  },
                };
          },
        },
        {
          key: "duration",
          get: function () {
            return this.noAudio
              ? this.videoRender.duration
              : this.isLive
              ? this.audioRender.duration
              : Math.min(this.audioRender.duration, this.videoRender.duration);
          },
        },
        {
          key: "paused",
          get: function () {
            return this._paused;
          },
          set: function (r) {
            this._paused = r;
          },
        },
        {
          key: "lowlatency",
          get: function () {
            return this._parent.lowlatency;
          },
        },
        {
          key: "decoderMode",
          get: function () {
            return this.videoRender.decoderMode;
          },
        },
        {
          key: "currentAudioCanAutoplay",
          get: function () {
            return this.audioRender.audioCanAutoplay;
          },
        },
        {
          key: "_getController",
          value: function (r, i) {
            return r ? new pQn(i, this) : new QDe(i, this);
          },
        },
        {
          key: "_checkInBuffer",
          value: function () {
            for (var r = this.buffered, i = 0, o = r.length; i < o; i++)
              if (
                r.start(i) <= this.currentTime + PM &&
                r.end(i) >= this.currentTime
              )
                return !0;
            return !1;
          },
        },
        {
          key: "_resetReadyStatus",
          value: function () {
            (this._readyStatus.audio = !1), (this._readyStatus.video = !1);
          },
        },
        {
          key: "_bindEvent",
          value: function () {
            var r = this;
            this.on(yn.DECODE_EVENTS.REMUX, function (i) {
              r.videoRender.setRemux(i);
            }),
              this.on(yn.DECODE_EVENTS.CHASE_VIDEO_FRAME_END, function (i) {
                r.emit(yn.DECODE_EVENTS.CHASE_AUDIO_FRAME, i);
              }),
              this.audioRender.on(yn.AUDIO.AUDIO_READY, function () {
                hn.log(r.TAG, "audio ready! seeking=", r._seeking),
                  r._seeking &&
                    setTimeout(function () {
                      try {
                        var i = r.videoRender.getSeekStartPosition(
                          r.currentTime,
                          1 / 0
                        );
                        if (r.audioRender.isMse && i)
                          return Ru().preciseSeek > r.duration &&
                            r.currentTime > PM
                            ? (r.audioRender.seekNoSideEffect({
                                position: r.currentTime + PM,
                              }),
                              void r.videoRender.ajustSeekTime(
                                r.currentTime,
                                !0
                              ))
                            : (r.audioRender.seekNoSideEffect({
                                position: i.position + PM,
                              }),
                              void r.videoRender.ajustSeekTime(i.position));
                        r.videoRender.ajustSeekTime(r.currentTime);
                      } catch {}
                    }, 10),
                  r._readyStatus.video && r._startRender(),
                  (r._readyStatus.audio = !0),
                  r._startPlayed || r.analyse.addAudioReady();
              }),
              this.audioRender.on(
                yn.AUDIO.AUDIO_NOT_ALLOWED_AUTOPLAY,
                function () {
                  r._emitReady && r.pause();
                }
              ),
              this.audioRender.on(yn.AUDIO.AUDIO_WAITING, function () {
                !r.noAudio &&
                  r.currentTime &&
                  (hn.warn(
                    r.TAG,
                    "lack data, audio waiting,currentTime:",
                    r.currentTime
                  ),
                  r.emit(yn.TIMELINE.PLAY_EVENT, Wi.TIMEUPDATE),
                  r.emit(yn.TIMELINE.PLAY_EVENT, Wi.WAITING),
                  r.emit(yn.TIMELINE.DO_PAUSE),
                  (r._readyStatus.audio = !1));
              }),
              this.videoRender.on(yn.VIDEO.VIDEO_WAITING, function () {
                hn.warn(r.TAG, "lack data, video waiting"),
                  r.emit(yn.TIMELINE.PLAY_EVENT, Wi.WAITING),
                  r.emit(yn.TIMELINE.DO_PAUSE),
                  (r._readyStatus.video = !1);
              }),
              this.videoRender.on(yn.VIDEO.VIDEO_READY, function () {
                hn.log(r.TAG, "video ready!"),
                  r._startPlayed || r.analyse.addVideoReady(),
                  r._readyStatus.audio && r._startRender("video"),
                  (r._readyStatus.video = !0);
              }),
              this.videoRender.on(yn.VIDEO.DECODE_LOW_FPS, function () {
                r.currentTime < 2 ||
                  (r.analyse.increaseLowDecodeCount(),
                  r._lowdecodeEmited || (IVn(), (r._lowdecodeEmited = !0)),
                  r.emit(yn.TIMELINE.PLAY_EVENT, Wi.LOW_DECODE));
              }),
              this.on(yn.TIMELINE.SINGLE_TRACK, function (i) {
                (r._singleTrack = i),
                  (i !== 1 && i !== 2) || (r._readyStatus.audio = !0),
                  i === 3 && (r._readyStatus.video = !0),
                  r.emit(yn.TIMELINE.SYNC_DTS, 0);
              }),
              this.on(yn.TIMELINE.DESTROY, function () {
                r.removeAllListeners(),
                  (r.videoRender = null),
                  (r.audioRender = null);
              }),
              this.on(yn.TIMELINE.DO_PLAY, function () {
                r.emit(yn.TIMELINE.START_RENDER),
                  (r._paused = !1),
                  (r._lastSeekTime = 1e-4),
                  r.noAudio && r.emit(yn.TIMELINE.SYNC_DTS, 0);
              });
          },
        },
        {
          key: "_startRender",
          value: function (r) {
            if (!this._parent.error && this.videoRender) {
              if (
                (this.noAudio && this.emit(yn.TIMELINE.SYNC_DTS, 0),
                this.videoRender.forceRender(),
                !this.isLive &&
                  this._paused &&
                  this.seeking &&
                  this._checkInBuffer())
              )
                return (
                  hn.log(this.TAG, "set seeking = false"),
                  (this._seeking = !1),
                  this.emit(yn.TIMELINE.PLAY_EVENT, Wi.SEEKED),
                  void hn.groupEnd()
                );
              this._startPlayed ||
                (this.analyse.addFirstframe(),
                this.emit(yn.TIMELINE.PLAY_EVENT, Wi.LOADEDDATA),
                this.emit(yn.TIMELINE.PLAY_EVENT, Wi.FIRST_FRAME),
                (this._startPlayed = !0)),
                hn.log(this.TAG, "emit canplay"),
                this.emit(yn.TIMELINE.PLAY_EVENT, Wi.CANPLAY),
                this._parent.autoplay
                  ? (hn.warn(
                      this.TAG,
                      "startRender: time=",
                      this.currentTime,
                      "paused:",
                      this.paused,
                      "seeking:",
                      this.seeking
                    ),
                    this.emit(yn.TIMELINE.START_RENDER, r))
                  : ((this._parent.autoplay = !0),
                    this.emit(yn.TIMELINE.PLAY_EVENT, Wi.PAUSE)),
                this.emit(yn.TIMELINE.READY),
                (this._emitReady = !0),
                this._seeking &&
                  this._checkInBuffer() &&
                  (hn.log(this.TAG, "set seeking = false"),
                  (this._seeking = !1),
                  this.emit(yn.TIMELINE.PLAY_EVENT, Wi.SEEKED),
                  hn.groupEnd());
            }
          },
        },
        {
          key: "_checkHlsTracks",
          value: function (r) {
            if (!(r != null && r.samples[0])) {
              if (!this.buffered.length) {
                var i = new Error("lack video sample");
                (i.code = 3), this.emit(yn.TIMELINE.PLAY_EVENT, Wi.ERROR, i);
              }
              return !1;
            }
            return !0;
          },
        },
        {
          key: "appendBuffer",
          value: function (r, i) {
            this.emit(yn.TIMELINE.APPEND_CHUNKS, r, i),
              this.noAudio &&
                this._seeking &&
                this.videoRender.ajustSeekTime(this.currentTime);
          },
        },
        {
          key: "play",
          value: function () {
            var r = this;
            return new Promise(function (i, o) {
              var l = r.currentAudioCanAutoplay;
              r.noAudio
                ? (l = !0)
                : r.audioRender &&
                  r.audioRender
                    .resume()
                    .then(function () {
                      if (
                        (hn.log(
                          r.TAG,
                          "audio render resumed, pause status: "
                            .concat(r._paused, ", audioCanAutoplay:")
                            .concat(r.currentAudioCanAutoplay)
                        ),
                        r._paused || !r.currentAudioCanAutoplay)
                      )
                        return (l = !1), void r.emit(yn.TIMELINE.DO_PAUSE);
                      l = !0;
                    })
                    .catch(function () {}),
                setTimeout(
                  function () {
                    return (
                      hn.log(
                        r.TAG,
                        "play() timer done, resumed="
                          .concat(l, ", paused=")
                          .concat(r.paused)
                      ),
                      l
                        ? r.videoRender && !r.videoRender.canAutoPlay
                          ? (console.warn("video render an't autoplay"),
                            r.pause(),
                            void i())
                          : ((r._paused = !1), void i())
                        : r.paused
                        ? void 0
                        : (hn.log(r.TAG, "audioCtx can't autoplay"),
                          r.pause(),
                          void o({ name: "NotAllowedError" }))
                    );
                  },
                  r.audioRender.isMse ? 10 : 60
                );
            });
          },
        },
        {
          key: "pause",
          value: function () {
            this._paused ||
              (!this.ready && !this._seeking) ||
              (this.emit(yn.TIMELINE.DO_PAUSE),
              (this._paused = !0),
              this.emit(yn.TIMELINE.PLAY_EVENT, Wi.PAUSE));
          },
        },
        {
          key: "seek",
          value: function (r) {
            var i = this;
            if ((this._seeking && hn.groupEnd(), this.isLive)) {
              if (
                this.currentTime < PM ||
                !this.currentAudioCanAutoplay ||
                this.paused
              )
                return;
              var o = this.videoRender.getSeekStartPosition(
                r,
                this._parent.preloadTime + 1
              );
              if (o) {
                if (o.position < this.currentTime) return;
                var l = this.audioRender.canSeek(o.position),
                  u = this.videoRender.canSeek(o);
                if (!l || !u)
                  return void hn.log(
                    this.TAG,
                    "seek, !!!!!!!!!can not seek, audioCanSeek:",
                    l,
                    "videoCanSeek:",
                    u
                  );
                hn.warn(
                  this.TAG,
                  "seek, chase frame to time: ",
                  o.position,
                  "currentTime:",
                  this.currentTime,
                  "duration:",
                  this.duration
                ),
                  this.videoRender.videoDecode
                    ? (this.audioRender.doPause(),
                      (o.position = o.position - 1.5),
                      this.emit(yn.DECODE_EVENTS.CHASE_VIDEO_FRAME, o))
                    : this.emit(yn.TIMELINE.CHASE_FRAME, o);
              }
            } else
              this._lastSeekTime !== r &&
                ((r && Math.abs(this._lastSeekTime - r) <= 0.2) ||
                  ((this._lastSeekTime = r),
                  r >= this.duration && (r = this.duration - 1),
                  r < 0 && (r = 0),
                  hn.group(
                    this.TAG,
                    "start seek to:".concat(r, ", set seeking status=true")
                  ),
                  (this._seeking = !0),
                  this.videoRender.setSeekingStatus(!0),
                  this.noAudio
                    ? (this.emit(
                        yn.TIMELINE.SYNC_DTS,
                        this.videoRender.getDtsOfTime(r)
                      ),
                      this.videoRender.ajustSeekTime(r))
                    : this._resetReadyStatus(),
                  this.emit(yn.TIMELINE.DO_SEEK, r),
                  new Promise(function (c) {
                    i.emit(yn.TIMELINE.PLAY_EVENT, Wi.SEEKING), c();
                  })));
          },
        },
      ]),
      n
    );
  })(),
  TQn = Tl,
  aQe = Fa,
  EQn = z5,
  SQn = Sm,
  RQn = F5.f,
  AQn = aQe(RQn),
  wQn = aQe([].push),
  JDe = function (t) {
    return function (e) {
      for (var n, r = SQn(e), i = EQn(r), o = i.length, l = 0, u = []; o > l; )
        (n = i[l++]), (TQn && !AQn(r, n)) || wQn(u, t ? [n, r[n]] : r[n]);
      return u;
    };
  },
  oQe = { entries: JDe(!0), values: JDe(!1) },
  kQn = Di,
  IQn = oQe.entries;
kQn(
  { target: "Object", stat: !0 },
  {
    entries: function (t) {
      return IQn(t);
    },
  }
);
var DQn = Di,
  nde = Fa,
  PQn = Em,
  MQn = IKe,
  CQn = vYe,
  qDe = aa,
  $Qn = RangeError,
  sQe = String,
  lQe = Math.floor,
  eie = nde(CQn),
  ePe = nde("".slice),
  MM = nde((1).toFixed),
  Pk = function (t, e, n) {
    return e === 0 ? n : e % 2 == 1 ? Pk(t, e - 1, n * t) : Pk(t * t, e / 2, n);
  },
  xQn = function (t) {
    for (var e = 0, n = t; n >= 4096; ) (e += 12), (n /= 4096);
    for (; n >= 2; ) (e += 1), (n /= 2);
    return e;
  },
  mw = function (t, e, n) {
    for (var r = -1, i = n; ++r < 6; )
      (i += e * t[r]), (t[r] = i % 1e7), (i = lQe(i / 1e7));
  },
  YZ = function (t, e) {
    for (var n = 6, r = 0; --n >= 0; )
      (r += t[n]), (t[n] = lQe(r / e)), (r = (r % e) * 1e7);
  },
  tPe = function (t) {
    for (var e = 6, n = ""; --e >= 0; )
      if (n !== "" || e === 0 || t[e] !== 0) {
        var r = sQe(t[e]);
        n = n === "" ? r : n + eie("0", 7 - r.length) + r;
      }
    return n;
  },
  LQn =
    qDe(function () {
      return (
        MM(8e-5, 3) !== "0.000" ||
        MM(0.9, 0) !== "1" ||
        MM(1.255, 2) !== "1.25" ||
        MM(0xde0b6b3a7640080, 0) !== "1000000000000000128"
      );
    }) ||
    !qDe(function () {
      MM({});
    });
DQn(
  { target: "Number", proto: !0, forced: LQn },
  {
    toFixed: function (t) {
      var e,
        n,
        r,
        i,
        o = MQn(this),
        l = PQn(t),
        u = [0, 0, 0, 0, 0, 0],
        c = "",
        d = "0";
      if (l < 0 || l > 20) throw $Qn("Incorrect fraction digits");
      if (o != o) return "NaN";
      if (o <= -1e21 || o >= 1e21) return sQe(o);
      if ((o < 0 && ((c = "-"), (o = -o)), o > 1e-21))
        if (
          ((n =
            (e = xQn(o * Pk(2, 69, 1)) - 69) < 0
              ? o * Pk(2, -e, 1)
              : o / Pk(2, e, 1)),
          (n *= 4503599627370496),
          (e = 52 - e) > 0)
        ) {
          for (mw(u, 0, n), r = l; r >= 7; ) mw(u, 1e7, 0), (r -= 7);
          for (mw(u, Pk(10, r, 1), 0), r = e - 1; r >= 23; )
            YZ(u, 1 << 23), (r -= 23);
          YZ(u, 1 << r), mw(u, 1, 1), YZ(u, 2), (d = tPe(u));
        } else mw(u, 0, n), mw(u, 1 << -e, 0), (d = tPe(u) + eie("0", l));
      return (d =
        l > 0
          ? c +
            ((i = d.length) <= l
              ? "0." + eie("0", l - i) + d
              : ePe(d, 0, i - l) + "." + ePe(d, i - l))
          : c + d);
    },
  }
);
var bd = {
    FIRST_DATA: 1,
    AUDIO_MSE_OPEN_START: 2,
    AUDIO_MSE_OPEND: 3,
    AUDIO_FIRSTTIME_APPENDED: 4,
    AUDIO_READY: 5,
    WASM_WORKER_INIT: 6,
    WASM_WORKER_READY: 7,
    FIRST_FRAME_TODECODE: 8,
    VIDEO_READY: 9,
    FIRST_FRAME: 10,
    WAITIGN: 11,
    SEEKING: 12,
    SEEKED: 13,
  },
  OQn = Object.entries(bd),
  GQn = (function () {
    function t() {
      bl(this, t), Ei(this, "_dot", []), Ei(this, "_currentLowDecodeCount", 0);
    }
    return (
      _l(t, [
        {
          key: "getBootStats",
          value: function () {
            var e,
              n =
                ((e = this._dot[0]) === null || e === void 0
                  ? void 0
                  : e.dot) || 0;
            return this._dot.map(function (r) {
              return {
                action: OQn.filter(function (i) {
                  return i[1] === r.action;
                })[0][1],
                dot: parseInt(r.dot - n),
              };
            });
          },
        },
        {
          key: "getStats",
          value: function (e) {
            var n,
              r = this.getBootStats();
            return {
              bootStats: r,
              bitrate: Math.abs(e.bitrate / 1e3),
              decodeFps: e.decodeFps,
              fps: e.fps,
              playbackRate: e.playbackRate,
              firstframe:
                (n = r.filter(function (i) {
                  return i.action === 10;
                })[0]) === null || n === void 0
                  ? void 0
                  : n.dot,
              width: e.videoWidth,
              height: e.videoHeight,
              decoderMode: e.decoderMode,
              vv: kVn(),
              lowdecodeVV: DVn(),
              h265FailureRate: Number((100 * PVn()).toFixed(2)),
              currentLowDecodeCount: this._currentLowDecodeCount,
            };
          },
        },
        {
          key: "seekElapses",
          value: function () {
            for (
              var e = this.getBootStats(), n = [], r = 0, i = 0, o = e.length;
              i < o;
              i++
            ) {
              var l = e[i];
              l.action === bd.SEEKING && (r = l.dot),
                l.action === bd.SEEKED && n.push(l.dot - r);
            }
            return n;
          },
        },
        {
          key: "addFirstData",
          value: function () {
            this._dot.push({ action: bd.FIRST_DATA, dot: this._getTimestap() });
          },
        },
        {
          key: "addAudioBoundMedia",
          value: function () {
            this._dot.push({
              action: bd.AUDIO_BOUND_MEDIA,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addAudioMseOpenStart",
          value: function () {
            this._dot.push({
              action: bd.AUDIO_MSE_OPEN_START,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addAudioMseOpend",
          value: function () {
            this._dot.push({
              action: bd.AUDIO_MSE_OPEND,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addAudioFirstTimeAppended",
          value: function () {
            this._dot.push({
              action: bd.AUDIO_FIRSTTIME_APPENDED,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addAudioReady",
          value: function () {
            this._dot.push({
              action: bd.AUDIO_READY,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addWasmInit",
          value: function () {
            this._dot.push({
              action: bd.WASM_WORKER_INIT,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addWasmReady",
          value: function () {
            this._dot.push({
              action: bd.WASM_WORKER_READY,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addFirstFrameToDecode",
          value: function () {
            this._dot.push({
              action: bd.FIRST_FRAME_TODECODE,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addVideoReady",
          value: function () {
            this._dot.push({
              action: bd.VIDEO_READY,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addFirstframe",
          value: function () {
            this._dot.push({
              action: bd.FIRST_FRAME,
              dot: this._getTimestap(),
            });
          },
        },
        {
          key: "addWaiting",
          value: function () {
            this._dot.push({ action: bd.WAITIGN, dot: this._getTimestap() });
          },
        },
        {
          key: "addSeeking",
          value: function () {
            this._dot.push({ action: bd.SEEKING, dot: this._getTimestap() });
          },
        },
        {
          key: "addSeeked",
          value: function () {
            this._dot.push({ action: bd.SEEKED, dot: this._getTimestap() });
          },
        },
        {
          key: "_getTimestap",
          value: function () {
            return performance.now();
          },
        },
        {
          key: "increaseLowDecodeCount",
          value: function () {
            this._currentLowDecodeCount++;
          },
        },
        {
          key: "reset",
          value: function () {
            (this._currentLowDecodeCount = 0), (this._dot = []);
          },
        },
      ]),
      t
    );
  })(),
  NQn = "7",
  yw = { LOW_LATENCY: 1, NO_AUDIO: 2, NO_VIDEO: 3 },
  FQn = typeof HTMLElement < "u" ? HTMLElement : function () {},
  H$ = (function (t) {
    Wf(n, FQn);
    var e = Kf(n);
    function n() {
      var r;
      return (
        bl(this, n),
        ((r = e.call(this)).TAG = "XGVideo"),
        r._proxyProps(),
        (r._isLive = !0),
        (r._vMeta = null),
        (r._aMeta = null),
        (r._resizeObserver = null),
        (r._eventsBackup = []),
        (r._hevc = Ru().preloadDecoder === "h265"),
        r._hevc || (r._degradeVideo = document.createElement("video")),
        (r._debounceSeek = dVn(r._seek.bind(mi(r)), 300)),
        (r._onTouchEnd = r._onTouchEnd.bind(mi(r))),
        (r.analyse = new GQn()),
        r
      );
    }
    return (
      _l(
        n,
        [
          {
            key: "_proxyProps",
            value: function () {
              var r = this;
              Object.getOwnPropertyNames(n.prototype).forEach(function (i) {
                if (/^__/.test(i)) {
                  var o = i.replace("__", "");
                  Object.defineProperty(r, o, {
                    get: function () {
                      try {
                        return this[i];
                      } catch {}
                      return 0;
                    },
                    set: function (l) {
                      try {
                        this[i] = l;
                      } catch {}
                    },
                  });
                }
              });
            },
          },
          {
            key: "addEventListener",
            value: function (r, i, o) {
              Bp(Gh(n.prototype), "addEventListener", this).call(this, r, i, o),
                this._degradeVideo && this._eventsBackup.push([r, i, o]);
            },
          },
          {
            key: "removeEventListener",
            value: function (r, i, o) {
              Bp(Gh(n.prototype), "removeEventListener", this).call(
                this,
                r,
                i,
                o
              ),
                this._degradeVideo &&
                  (this._eventsBackup = this._eventsBackup.filter(function (l) {
                    return !(
                      l.eventName === r &&
                      l.handler === i &&
                      l.capture === o
                    );
                  }));
            },
          },
          {
            key: "setAttribute",
            value: function (r, i) {
              var o;
              Bp(Gh(n.prototype), "setAttribute", this).call(this, r, i),
                r !== "src" &&
                  ((o = this._degradeVideo) === null ||
                    o === void 0 ||
                    o.setAttribute(r, i));
            },
          },
          {
            key: "_init",
            value: function () {
              this.analyse.reset(),
                (this.timeline = new _Qn(
                  {
                    volume: this.volume,
                    canvas: this.querySelector("canvas"),
                    videoContext: this.videoContext,
                    videoDecode: this.videoDecode,
                    maxVideoHeight: this.getAttribute("maxVideoHeight"),
                    endLevel: parseInt(this.getAttribute("endLevel")),
                  },
                  this
                )),
                hn.log(this.TAG, "timeline init"),
                (this._noSleep = new q8n()),
                (this._logFirstFrame = !1),
                (this._playRequest = null),
                (this._degradeVideoUserGestured = !1),
                this._bindEvents(),
                this._vMeta &&
                  !this.videoDecode &&
                  this.setVideoMeta(this._vMeta),
                this._glCtxOptions && (this.glCtxOptions = this._glCtxOptions),
                this.timeline &&
                  (this.innerDegrade &&
                    this.timeline.emit(yn.TIMELINE.INNER_DEGRADE),
                  this.timeline.emit(
                    yn.TIMELINE.SET_PLAY_MODE,
                    this._isLive ? "LIVE" : "VOD"
                  ),
                  this.timeline.emit(
                    yn.TIMELINE.SET_PLAYBACKRATE,
                    this.playbackRate
                  ),
                  (this.muted = this.muted));
            },
          },
          {
            key: "_bindEvents",
            value: function () {
              var r = this;
              this.timeline.on(yn.TIMELINE.PLAY_EVENT, function (i, o) {
                var l;
                if (
                  (i === Wi.LOADEDDATA &&
                    (r.querySelector("canvas") ||
                      (hn.log(r.TAG, "_bindEvents, appendChild canvas"),
                      r.appendChild(r.canvas)),
                    (r.canvas.style.display = "block"),
                    (l = r.timeline) === null ||
                      l === void 0 ||
                      l.emit(yn.TIMELINE.SET_PLAYBACKRATE, r.playbackRate)),
                  (i !== Wi.LOADEDMETADATA && i !== Wi.RESIZE) ||
                    Promise.resolve().then(function () {
                      r.updateVideoPostion();
                    }),
                  i === Wi.ERROR)
                ) {
                  if (
                    (hn.warn(
                      r.TAG,
                      "detect error:",
                      o == null ? void 0 : o.message
                    ),
                    r.pause(),
                    r._disabled(!0),
                    r.innerDegrade || r.decoderMode === 5)
                  )
                    return (
                      (r.degradeInfo = {
                        decodeFps: r.decodeFps,
                        bitrate: r.bitrate,
                        wasmInitCost: r.wasmInitCost,
                        fps: r.fps,
                        url: r.src,
                        msg: o == null ? void 0 : o.message,
                        decoderMode: r.decoderMode,
                      }),
                      void r._innerDispatchEvent("lowdecode")
                    );
                  r._err = o;
                }
                if (i === Wi.LOW_DECODE)
                  return (
                    r._disabled(),
                    (r.degradeInfo = {
                      decodeFps: r.decodeFps,
                      bitrate: r.bitrate,
                      wasmInitCost: r.wasmInitCost,
                      fps: r.fps,
                      url: r.src,
                      decoderMode: r.decoderMode,
                    }),
                    void r._innerDispatchEvent(bIe[i], r.degradeInfo)
                  );
                if (
                  (i === Wi.LARGE_AV_GAP && (r.unsyncInfo = o), i === Wi.ENDED)
                ) {
                  if (r.paused) return;
                  r.pause();
                }
                i === Wi.PROGRESS && r._noSleep.toPlay(),
                  i === Wi.WAITING && r.analyse.addWaiting(),
                  i === Wi.SEEKING && r.analyse.addSeeking(),
                  i === Wi.SEEKED && r.analyse.addSeeked(),
                  r._innerDispatchEvent(bIe[i], o);
              });
            },
          },
          {
            key: "_disabled",
            value: function (r) {
              (this.innerDegrade || r) &&
                (r
                  ? Ru().disabledWhenErrorOccur && fZ(1)
                  : Ru().evaluateVVCount ||
                    (this.decodeFps / this.fps <= 0.6 && this.bitrate < 2e6
                      ? fZ(1)
                      : fZ(2)));
            },
          },
          {
            key: "degrade",
            value: function (r) {
              var i = this;
              this.querySelector("canvas")
                ? this.replaceChild(this._degradeVideo, this.canvas)
                : this.appendChild(this._degradeVideo),
                this.destroy(),
                this._eventsBackup.forEach(function (o) {
                  var l,
                    u = VLn(o, 3),
                    c = u[0],
                    d = u[1],
                    h = u[2];
                  Bp(Gh(n.prototype), "removeEventListener", i).call(
                    i,
                    c,
                    d,
                    h
                  ),
                    (l = i._degradeVideo) === null ||
                      l === void 0 ||
                      l.addEventListener(c, d, h);
                }),
                (this._eventsBackup = []),
                r &&
                  ((this._degradeVideo.muted = !1),
                  (this._degradeVideo.src = r),
                  this._degradeVideo.load());
            },
          },
          {
            key: "disconnectedCallback",
            value: function () {
              hn.log(this.TAG, "video disconnected"),
                document.removeEventListener("touchend", this._onTouchEnd, !0),
                this.destroy(!0),
                this._resizeObserver && this._resizeObserver.disconnect(this);
            },
          },
          {
            key: "connectedCallback",
            value: function () {
              var r = this;
              hn.log(
                this.TAG,
                "video connected to document",
                performance.now()
              ),
                this.timeline || this._init(),
                (this.style.width = "100%"),
                (this.style.height = "100%"),
                (this.style.position = "absolute"),
                (this.style.left = "0px"),
                (this.style.top = "0px"),
                document.addEventListener("touchend", this._onTouchEnd, !0),
                ResizeObserver &&
                  ((this._resizeObserver = new ResizeObserver(function (i) {
                    var o;
                    (o = r.timeline) !== null &&
                      o !== void 0 &&
                      o.ready &&
                      r.updateVideoPostion();
                  })),
                  this._resizeObserver.observe(this));
            },
          },
          {
            key: "_onTouchEnd",
            value: function () {
              $Ke(),
                this._degradeVideoInteract(),
                this._noSleep && this._noSleep.enable();
            },
          },
          {
            key: "_degradeVideoInteract",
            value: function () {
              var r = this;
              if (
                this._degradeVideo &&
                (this.innerDegrade === 1 || this.innerDegrade === 3)
              ) {
                if (this._degradeVideoUserGestured) return;
                var i = this._degradeVideo.play();
                i &&
                  i
                    .then(function () {
                      r._degradeVideo.pause(),
                        (r._degradeVideoUserGestured = !0);
                    })
                    .catch(function (o) {
                      console.log("degrade video: ", o.message);
                    });
              }
            },
          },
          {
            key: "play",
            value: function (r) {
              var i = this;
              if (this.timeline) {
                hn.log(
                  this.TAG,
                  "play() called, ready:"
                    .concat(this.timeline.ready, ", paused:")
                    .concat(this.timeline.paused, ", force:")
                    .concat(r)
                ),
                  this._degradeVideoInteract();
                var o = 0;
                if ((this.timeline.ready && this.timeline.paused) || r) {
                  if (((r = r || this._isLive), (this._playRequest = null), !r))
                    return (
                      this.timeline.emit(yn.TIMELINE.DO_PLAY),
                      this._innerDispatchEvent("play"),
                      Promise.resolve()
                    );
                  this.destroy(),
                    this._init(),
                    (o = setTimeout(function () {
                      try {
                        i._innerDispatchEvent("waiting");
                      } catch {}
                    }, 300));
                }
                return this._playRequest ||
                  !this.timeline.ready ||
                  this.timeline.paused
                  ? (hn.log(this.TAG, "request play!"),
                    (this._playRequest =
                      this._playRequest ||
                      new Promise(function (l, u) {
                        (i.timeline._paused = !1),
                          i._innerDispatchEvent("play"),
                          i._noSleep.enable(),
                          i.timeline.once("ready", function () {
                            hn.log(i.TAG, "timeline emit ready"),
                              clearTimeout(o),
                              i.timeline
                                .play()
                                .then(l)
                                .catch(u)
                                .finally(function () {
                                  i._playRequest = null;
                                });
                          });
                      })),
                    (this.autoplay = !0),
                    this._playRequest)
                  : Promise.resolve();
              }
            },
          },
          {
            key: "pause",
            value: function () {
              (this._playRequest = null),
                this.timeline && this.timeline.pause();
              try {
                this._noSleep.disable(), e9n();
              } catch {}
            },
          },
          { key: "load", value: function () {} },
          {
            key: "appendBuffer",
            value: function (r, i) {
              if (this.timeline && !this._err) {
                if (!this._logFirstFrame) {
                  var o = r && r.samples[0],
                    l = i && i.samples[0];
                  if (!o && !l) return;
                  if (o || l) {
                    var u =
                        (r == null ? void 0 : r.duration) /
                        ((r == null ? void 0 : r.formatTimescale) || 1 / 0),
                      c =
                        (i == null ? void 0 : i.duration) /
                        ((i == null ? void 0 : i.formatTimescale) || 1 / 0);
                    hn.warn(
                      this.TAG,
                      "video firstDts:"
                        .concat(o && o.dts, " , audio firstDts:")
                        .concat(l && l.dts, " videoTrack.duration=")
                        .concat(u, ", audioTrack.duration=")
                        .concat(c)
                    ),
                      (this._logFirstFrame = !0),
                      (u || c) &&
                        (this.setPlayMode("VOD"),
                        this.timeline.emit(
                          yn.TIMELINE.SET_PLAY_MODE,
                          this._isLive ? "LIVE" : "VOD"
                        ),
                        (this.duration = Math.min(u || c, c || u))),
                      this.analyse.addFirstData();
                  }
                  this.lowlatency &&
                    (hn.warn(this.TAG, "single track! type=", yw.LOW_LATENCY),
                    this.timeline.emit(
                      yn.TIMELINE.SINGLE_TRACK,
                      yw.LOW_LATENCY
                    )),
                    i.exist() ||
                      (hn.warn(this.TAG, "single track! type=", yw.NO_AUDIO),
                      this.timeline.emit(
                        yn.TIMELINE.SINGLE_TRACK,
                        yw.NO_AUDIO
                      )),
                    r.exist() ||
                      (hn.warn(this.TAG, "single track! type=", yw.NO_VIDEO),
                      this.timeline.emit(
                        yn.TIMELINE.SINGLE_TRACK,
                        yw.NO_VIDEO
                      ));
                }
                r.formatTimescale &&
                  r.samples.forEach(function (d) {
                    (d.dts = Math.floor((d.dts / r.formatTimescale) * 1e3)),
                      (d.pts = Math.floor((d.pts / r.formatTimescale) * 1e3));
                  }),
                  i.formatTimescale &&
                    i.samples.forEach(function (d) {
                      (d.dts = Math.floor((d.dts / i.formatTimescale) * 1e3)),
                        (d.pts = Math.floor((d.pts / i.formatTimescale) * 1e3));
                    }),
                  this.timeline.appendBuffer(r, i);
              }
            },
          },
          {
            key: "setAudioMeta",
            value: function (r) {
              (this._aMeta = r),
                this.timeline.emit(yn.TIMELINE.SET_METADATA, "audio", r);
            },
          },
          {
            key: "setVideoMeta",
            value: function (r) {
              (!this._isLive && this._vMeta) ||
                (this.timeline.emit(yn.TIMELINE.SET_METADATA, "video", r),
                (this._vMeta = r));
            },
          },
          {
            key: "setDecodeMode",
            value: function (r) {
              this.setAttribute("decodeMode", r);
            },
          },
          {
            key: "setPlayMode",
            value: function (r) {
              this._isLive = r === "LIVE";
            },
          },
          {
            key: "endOfStream",
            value: function () {
              var r;
              this.currentTime &&
                ((r = this.timeline) === null ||
                  r === void 0 ||
                  r.emit(yn.TIMELINE.END_OF_STREAM));
            },
          },
          {
            key: "updateVideoPostion",
            value: function () {
              var r;
              (r = this.timeline) === null ||
                r === void 0 ||
                r.emit(
                  yn.VIDEO.UPDATE_VIDEO_FILLTYPE,
                  this.xgfillType,
                  this.containerLayout
                );
            },
          },
          {
            key: "_innerDispatchEvent",
            value: function (r, i) {
              this.dispatchEvent(new CustomEvent(r, { detail: i }));
            },
          },
          {
            key: "destroy",
            value: function (r) {
              this.timeline &&
                (this._noSleep.destroy(),
                hn.log(this.TAG, "call destroy"),
                this.timeline.emit(yn.TIMELINE.DESTROY, r),
                this.querySelector("video") &&
                  this.removeChild(this.querySelector("video")),
                (this.timeline = null),
                (this._err = null),
                (this._noSleep = null),
                (this._eventsBackup = null));
            },
          },
          {
            key: "updateObjectPosition",
            value: function (r, i) {
              this.timeline.emit(
                yn.VIDEO.UPDATE_VIDEO_COVER_POSITION,
                this.containerLayout,
                r,
                i
              ),
                this._degradeVideo &&
                  (this._degradeVideo.style.objectPosition = ""
                    .concat(100 * r, "% ")
                    .concat(100 * i, "%"));
            },
          },
          {
            key: "setVideoDecode",
            value: function () {
              hn.log(this.TAG, "set videoDecode", this.videoDecode),
                this.videoDecode &&
                  this.timeline &&
                  this.timeline.videoRender &&
                  (this.timeline.videoRender.videoDecode = this.videoDecode);
            },
          },
          {
            key: "live",
            get: function () {
              return this._isLive;
            },
          },
          {
            key: "lowlatency",
            get: function () {
              return this.getAttribute("lowlatency") === "true";
            },
            set: function (r) {
              this.setAttribute("lowlatency", r);
            },
          },
          {
            key: "autoplay",
            get: function () {
              return this.getAttribute("autoplay") === "true";
            },
            set: function (r) {
              this.setAttribute("autoplay", r);
            },
          },
          {
            key: "__canvas",
            get: function () {
              return this.timeline.canvas;
            },
          },
          {
            key: "__ended",
            get: function () {
              return Math.abs(this.currentTime - this.duration) < 0.5;
            },
          },
          {
            key: "__width",
            get: function () {
              return this.getAttribute("width") || this.videoWidth;
            },
            set: function (r) {
              var i = typeof r == "number" ? "".concat(r, "px") : r;
              this.setAttribute("width", i), (this.canvas.width = r);
            },
          },
          {
            key: "__height",
            get: function () {
              return this.getAttribute("height");
            },
            set: function (r) {
              var i = typeof r == "number" ? "".concat(r, "px") : r;
              this.setAttribute("height", i), (this.canvas.height = r);
            },
          },
          {
            key: "__videoWidth",
            get: function () {
              return this.canvas.width;
            },
          },
          {
            key: "__videoHeight",
            get: function () {
              return this.canvas.height;
            },
          },
          {
            key: "__volume",
            get: function () {
              return Number(this.getAttribute("volume"));
            },
            set: function (r) {
              r <= 0 && (r = 0),
                r >= 1 && (r = 1),
                this.setAttribute("volume", r),
                this.muted || this.timeline.emit(yn.TIMELINE.UPDATE_VOLUME, r);
            },
          },
          {
            key: "__muted",
            get: function () {
              return this.getAttribute("muted") === "true";
            },
            set: function (r) {
              this.setAttribute("muted", r),
                this._degradeVideoInteract(),
                this._noSleep.enable(),
                this.timeline.emit(
                  yn.TIMELINE.UPDATE_VOLUME,
                  r ? 0 : this.volume
                );
            },
          },
          {
            key: "__currentTime",
            get: function () {
              if (!this.timeline) return 0;
              var r = this.timeline.currentTime,
                i = this.timeline.duration;
              return Math.min(r, i);
            },
            set: function (r) {
              this._debounceSeek(r);
            },
          },
          {
            key: "_seek",
            value: function (r) {
              this.timeline &&
                (this.buffered.length || this.play(),
                this.paused && !this._isLive && r === 0 && this.play(),
                this.timeline.seek(Number(r)));
            },
          },
          {
            key: "__duration",
            get: function () {
              return this._isLive ? 1 / 0 : this.timeline.duration;
            },
            set: function (r) {
              this.timeline.emit(yn.TIMELINE.SET_VIDEO_DURATION, r),
                this._innerDispatchEvent("durationchange");
            },
          },
          {
            key: "__seeking",
            get: function () {
              return this.timeline.seeking;
            },
          },
          {
            key: "__paused",
            get: function () {
              return this.timeline.paused;
            },
          },
          {
            key: "__fps",
            get: function () {
              return this.timeline.fps;
            },
          },
          {
            key: "__decodeFps",
            get: function () {
              return this.timeline.decodeFps;
            },
          },
          {
            key: "__decodeCost",
            get: function () {
              return parseInt(this.timeline.decodeCost);
            },
          },
          {
            key: "__renderCost",
            get: function () {
              return this.timeline.renderCost;
            },
          },
          {
            key: "__wasmInitCost",
            get: function () {
              return this.timeline.wasmInitCost;
            },
          },
          {
            key: "__totalSize",
            get: function () {
              return this.timeline.totalSize;
            },
          },
          {
            key: "__bitrate",
            get: function () {
              return this.timeline.bitrate;
            },
          },
          {
            key: "__gopLength",
            get: function () {
              return this.timeline.gopLength;
            },
          },
          {
            key: "__readyState",
            get: function () {
              return this.timeline.readyState;
            },
          },
          {
            key: "__buffered",
            get: function () {
              return this.timeline.buffered;
            },
          },
          {
            key: "__decoderMode",
            get: function () {
              return this.timeline.decoderMode;
            },
          },
          {
            key: "src",
            get: function () {
              return this.getAttribute("src") || "";
            },
            set: function (r) {
              hn.log(this.TAG, "set src ", r),
                this.setAttribute("src", r),
                (this._vMeta = null),
                this.play(!0),
                this.timeline || this._init(),
                this._innerDispatchEvent("loadstart"),
                wVn();
            },
          },
          {
            key: "currentSrc",
            get: function () {
              return this.getAttribute("src") || "";
            },
          },
          {
            key: "playbackRate",
            get: function () {
              return parseFloat(this.getAttribute("playbackrate") || 1);
            },
            set: function (r) {
              var i;
              this.setAttribute("playbackrate", r),
                (i = this.timeline) === null ||
                  i === void 0 ||
                  i.emit(yn.TIMELINE.SET_PLAYBACKRATE, r);
            },
          },
          {
            key: "networkState",
            get: function () {
              return 1;
            },
          },
          {
            key: "preloadTime",
            get: function () {
              var r = this.getAttribute("preloadtime");
              if (r) {
                var i = Number.parseFloat(r);
                if (i > 0 && !Number.isNaN(i)) return i;
              }
              return 1 / 0;
            },
            set: function (r) {
              r && Number(r) > 0 && this.setAttribute("preloadtime", r);
            },
          },
          {
            key: "innerDegrade",
            get: function () {
              var r = this.getAttribute("innerdegrade");
              return parseInt(r);
            },
          },
          {
            key: "__glCtxOptions",
            set: function (r) {
              (this._glCtxOptions = r),
                this.timeline.emit(yn.TIMELINE.UPDATE_GL_OPTIONS, r);
            },
          },
          {
            key: "__error",
            get: function () {
              return this._err;
            },
            set: function (r) {
              this.timeline.emit(yn.TIMELINE.PLAY_EVENT, Wi.ERROR, r);
            },
          },
          {
            key: "degradeVideo",
            get: function () {
              return this._degradeVideo;
            },
          },
          {
            key: "degradeInfo",
            get: function () {
              return this._deradeInfo;
            },
            set: function (r) {
              this._deradeInfo = r;
            },
          },
          {
            key: "unsyncInfo",
            get: function () {
              return this._unsyncInfo;
            },
            set: function (r) {
              this._unsyncInfo = r;
            },
          },
          {
            key: "xgfillType",
            get: function () {
              return this.parentNode.getAttribute("data-xgfill");
            },
          },
          {
            key: "containerLayout",
            get: function () {
              var r = this.parentNode;
              return { width: r.clientWidth, height: r.clientHeight };
            },
          },
          {
            key: "videoDecode",
            get: function () {
              return this.getAttribute("decodeMode") === NQn;
            },
          },
          {
            key: "audioMedia",
            get: function () {
              var r, i;
              return (r = this.timeline) === null ||
                r === void 0 ||
                (i = r.audioRender) === null ||
                i === void 0
                ? void 0
                : i.media;
            },
          },
          {
            key: "getStats",
            value: function () {
              return this.analyse.getStats(this);
            },
          },
          {
            key: "getSeekElapses",
            value: function () {
              return this.analyse.seekElapses();
            },
          },
          {
            key: "dump",
            value: function () {
              var r = this.buffered;
              return (
                console.log(r),
                new Array(r.length).fill(0).map(function (i, o) {
                  return [r.start(o), r.end(o)];
                })
              );
            },
          },
        ],
        [
          {
            key: "version",
            get: function () {
              return "0.1.16";
            },
          },
          {
            key: "init",
            value: function (r) {
              var i = r.h264Url,
                o = r.h264AsmUrl,
                l = r.h265AsmUrl,
                u = r.h265Url,
                c = r.h265ThreadUrl,
                d = r.h265SimdUrl;
              (n.h264Url = i),
                (n.h265Url = u),
                (n.h265AsmUrl = l),
                (n.h264AsmUrl = o),
                (n.h265ThreadUrl = c),
                (n.h265SimdUrl = d);
            },
          },
          {
            key: "getDecodeCapacity",
            value: function () {
              return Ru();
            },
          },
          {
            key: "getDeviceCapacity",
            value: function () {
              return AVn();
            },
          },
          {
            key: "setDecodeCapacity",
            value: function (r) {
              SVn(r), r.preloadDecoder && hL.genDecoder().catch(function () {});
            },
          },
          {
            key: "genDecoder",
            value: function (r) {
              return hL.genDecoder(r);
            },
          },
          {
            key: "cleanDisabled",
            value: function () {
              JZe();
            },
          },
          {
            key: "isSupported",
            value: function () {
              return !!RVn() && CVn() === !1;
            },
          },
        ]
      ),
      n
    );
  })();
Ei(H$, "decoderCache", hL);
var UQn =
    "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder.js",
  BQn =
    "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/decoder/1.1.1/h264/decoder_asm.js",
  HQn =
    "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_1656041798666.js",
  XQn =
    "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/main/decoder.js",
  VQn =
    "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/base/decoder.js",
  zQn =
    "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/codec/high/decoder_asm.js";
H$.init({
  h264Url: UQn,
  h264AsmUrl: BQn,
  h265Url: VQn,
  h265SimdUrl: HQn,
  h265ThreadUrl: XQn,
  h265AsmUrl: zQn,
}),
  (H$.setEleName = function (t) {
    EVn(t);
    var e = (function (n) {
      Wf(i, H$);
      var r = Kf(i);
      function i() {
        return bl(this, i), r.apply(this, arguments);
      }
      return _l(i);
    })();
    customElements.get(O8()) || customElements.define(O8(), e);
  });
try {
  customElements.get(O8()) || customElements.define(O8(), H$);
} catch {}
Os.PluginXgvideo;
var jQn = ((t) => (
    (t.widevine = "com.widevine.alpha"),
    (t.fairplay = "com.apple.fps.1_0"),
    (t.playready = "com.microsoft.playready"),
    t
  ))(jQn || {}),
  WQn = ((t) => (
    (t[(t.UNSUPPORTED = 7101)] = "UNSUPPORTED"),
    (t[(t.RECORD = 7102)] = "RECORD"),
    (t[(t.NOMEDIAKEY = 7103)] = "NOMEDIAKEY"),
    (t[(t.NOKEYSESSION = 7104)] = "NOKEYSESSION"),
    (t[(t.GENERATEREQUESTFAIL = 7105)] = "GENERATEREQUESTFAIL"),
    (t[(t.LACKSERVERCERTIFICATEPATH = 7106)] = "LACKSERVERCERTIFICATEPATH"),
    (t[(t.LACKSERVERPROCESSSPCPATH = 7107)] = "LACKSERVERPROCESSSPCPATH"),
    (t[(t.LICENSEFAIL = 7108)] = "LICENSEFAIL"),
    (t[(t.KEYERROR = 7109)] = "KEYERROR"),
    (t[(t.CERTFAIL = 7110)] = "CERTFAIL"),
    t
  ))(WQn || {});
Os.PluginDrm;
Os.PluginAbr;
const KQn =
    /ANGLE\s+\((?:[^,]+,\s+)?([^,/]+)?(?:[^,]*)(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  ZQn = /ANGLE\s+\((?:[^,]+,\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  YQn =
    /ANGLE\s+\((?:[^,]+,\s+)?(?:[^:]+:\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)?/,
  X$ = "OpenGL Engine",
  xS = "Unknow",
  QQn = 4318,
  JQn = 32902,
  qQn = 4098;
var Rf = ((t) => (
  (t.CpuDeriver = "CpuDeriver"),
  (t.Intel = "Intel"),
  (t.Nvidia = "NVIDIA"),
  (t.Amd = "AMD"),
  (t.Apple = "Apple"),
  (t.Adreno = "Adreno"),
  (t[(t.Unknow = xS)] = "Unknow"),
  t
))(Rf || {});
function tie(t) {
  return t === "NVIDIA" ? QQn : t === "AMD" ? qQn : t === "Intel" ? JQn : 0;
}
function eJn(t, e) {
  let n,
    r = xS,
    i = xS,
    o = xS;
  return (
    (t !== "Intel" && t !== "NVIDIA") || (n = KQn.exec(e)),
    (t !== "AMD" && t !== "Adreno") || (n = ZQn.exec(e)),
    t === "Apple" && (n = YQn.exec(e)),
    n != null && n[1] && (r = n[1].replace(/(AMD|NVIDIA)/, "").trim()),
    n != null && n[2] && (o = n[2].trim()),
    (r = r.split("(0x00")[0].trim()),
    (i = t === "Intel" ? (r = r.split(X$)[0].trim()) : r.split(X$)[0].trim()),
    { vendor: t, vendorId: tie(t), model: r, backupModel: i, api: o }
  );
}
function tJn(t) {
  const e = /(SwiftShader|Intel|NVIDIA|AMD|Radeon|Apple|Adreno)/.exec(t);
  return e
    ? e[0] === "Radeon"
      ? "AMD"
      : e[0] === "SwiftShader"
      ? "CpuDeriver"
      : e[0]
    : Rf.Unknow;
}
function nJn(t) {
  const e = tJn(t);
  return e === Rf.Unknow || e === "CpuDeriver"
    ? { vendor: e, vendorId: 0, model: t, backupModel: t, api: xS }
    : /^ANGLE/.test(t)
    ? eJn(e, t)
    : e === "Intel"
    ? {
        vendor: e,
        vendorId: tie(e),
        model: t.split(X$)[0].trim(),
        backupModel: t.split(X$)[0].trim(),
        api: xS,
      }
    : {
        vendor: e,
        vendorId: tie(e),
        model: t.replace(/(AMD|NVIDIA)/, "").trim(),
        backupModel: t
          .split(X$)[0]
          .replace(/(AMD|NVIDIA)/, "")
          .trim(),
        api: xS,
      };
}
function rJn() {
  try {
    let t = localStorage.getItem("g_ven") || "";
    if (t) return t;
    let e;
    const n = document.createElement("canvas").getContext("webgl");
    if (n)
      return (
        (e = n.getExtension("WEBGL_debug_renderer_info")),
        (t = e ? n.getParameter(e.UNMASKED_RENDERER_WEBGL) : ""),
        t && localStorage.setItem("g_ven", t),
        t
      );
  } catch {}
  return "";
}
function iJn(t, e) {
  let n;
  return (
    (n =
      e === Rf.Intel
        ? t
            .split(
              `
`
            )
            .map((r) => `Intel(R) ${r}`)
        : t.split(`
`)),
    n.map((r) => r.split("|"))
  );
}
function aJn(t, e) {
  let n = t.filter((i) => i[0] === e.model);
  n.length || (n = t.filter((i) => i[0] === e.backupModel)),
    n.length ||
      e.vendor !== Rf.Intel ||
      /^Intel(R)/.test(e.model) ||
      (n = t.filter((i) => i[0] === "Intel(R) " + e.model));
  let r = "-1";
  if (n.length) {
    const i = n[0][1];
    r = i === "-1" ? "0" : i;
  }
  return parseInt(r);
}
function oJn(t) {
  return t === 0 ? 0 : t === -1 ? -1 : parseFloat(Math.log2(t).toFixed(2));
}
const sJn = `Arc(TM) A770M Graphics|995
Arc(TM) A770 Graphics|983
Arc(TM) A770 Graphics|969
Arc(TM) A580 Graphics|944
Arc(TM) A730M Graphics|822
Arc(TM) A750 Graphics|768
Arc(TM) A750 Graphics|768
Arc(TM) A550M Graphics|660
Arc(TM) A550M Graphics|634
Xe Graphics ReleaseInternal|561
Arc(TM) A770M Graphics|498
Arc(TM) A380 Graphics|473
Arc(TM) A380 Graphics|468
Arc(TM) A370M Graphics|342
Arc(TM) A370M Graphics|341
Xe Graphics|319
HD Graphics 630 GT2|309
Arc(TM) A350M Graphics|284
Iris(R) Xe MAX Graphics|214
Iris(R) Xe Graphics RI|205
Iris(R) Xe Graphics ReleaseInternal|181
Iris(R) Xe Graphics|180
Gen12 Desktop Graphics Controller|179
Iris(R) Xe Graphics|178
Iris(R) Xe MAX Graphics|168
Corporation Iris Xe Graphics|167
Corporation TigerLake-LP GT2 [Iris Xe Graphics]|162
Xe Graphics|158
Arc(TM) A350M Graphics|156
Corporation TigerLake GT2 [Iris Xe Graphics]|149
UHD Graphics 770|138
UHD Graphics ReleaseInternal|137
Iris(R) Pro Graphics P580|137
Iris(R) Plus Graphics|132
Iris Plus Graphics|127
Iris(R) Pro Graphics 580|126
UHD Graphics 770|125
UHD Graphics 750|125
Radeong 0.4 on AMD TONGA (DRM 3.1.0, LLVM 3.9.0)|123
Corporation Iris Plus Graphics G7|123
Iris(R) Plus Graphics|122
Iris(R) Plus Graphics 940|121
Iris(R) Plus Graphics 650|121
Iris(R) Plus Graphics 655|121
Iris(R) Plus Graphics 655|121
HD Graphics P4600|120
Iris(TM) Pro Graphics 6200|120
Iris(R) Plus Graphics|118
Iris(R) Plus Graphics 650|116
Iris(R) Plus Graphics 655|115
Iris(R) Pro Graphics 580|114
Corporation Iris Pro Graphics 580|114
Iris(R) Plus Graphics 645|113
Iris(TM) Pro Graphics 6200|113
Iris(TM) Pro Graphics P580|113
Corporation Iris Plus Graphics 655|112
Arc(TM) Graphics RI|111
Iris(R) Plus Graphics 655|111
Iris(R) Plus Graphics 655|110
Iris(R) Plus Graphics|110
UHD Graphics|110
Iris Plus Graphics 655|108
Iris(R) Plus Graphics 650|108
Iris(R) Plus Graphics 650|108
Iris(TM) Pro Graphics 580|108
Iris(TM) Pro Graphics 6200|107
Iris Graphics 6100|107
Iris(TM) Pro Graphics 6200|107
Iris(R) Plus Graphics 645|106
UHD Graphics 730|106
Iris(TM) Pro Graphics 6200|103
Iris Pro Graphics 580|102
Corporation Iris Pro Graphics 6200|102
Iris(R) Plus Graphics gfx-driver-user-comp_media-21486 DC ReleaseInternal|101
Iris(R) Pro Graphics 580|101
Iris Plus Graphics 645|101
UHD Graphics 750|100
Iris(TM) Pro Graphics 580|99
Iris(TM) Graphics 550|99
Iris(TM) Pro Graphics P6300|99
Iris(R) Plus Graphics 650|99
Iris(TM) Pro Graphics 5200|98
Iris(R) Graphics 550|97
Iris(R) Plus Graphics|97
Iris(R) Plus Graphics 650|96
Iris(R) Plus Graphics 655|96
Iris(R) Graphics 550|96
Iris(R) Plus Graphics 645|95
Iris Plus Graphics 650|95
Iris(R) Graphics 550|95
Iris Graphics 550|93
Iris(R) Plus Graphics 650|93
Iris(R) Pro Graphics 580|93
Iris(TM) Plus Graphics 650|91
Iris(TM) Graphics 550|91
Iris(R) Plus Graphics 640|89
Iris(TM) Plus Graphics 650|88
Iris(TM) Pro Graphics P6300|88
Iris(TM) Plus Graphics 650|88
Iris(TM) Graphics 550|87
UHD Graphics 730|87
Corporation Iris Plus Graphics 650|87
Iris(TM) Pro Graphics 5200|86
Corporation CometLake-H GT2 [UHD Graphics]|86
Iris(R) Graphics 540|86
UHD Graphics P630|86
UHD Graphics 630|85
Iris(TM) Graphics 540|85
Iris(TM) Plus Graphics 640|84
Iris(TM) Graphics 540|84
UHD Graphics 630|84
UHD Graphics 630|83
UHD Graphics P630|83
Iris(TM) Plus Graphics 640|83
UHD Graphics 630|83
UHD Graphics 630|83
Iris Plus Graphics 640|83
Iris(TM) Graphics 540|82
UHD Graphics 630|82
UHD Graphics 630|82
Iris(TM) Pro Graphics 5200|81
UHD Graphics 630|81
HD Graphics 630|81
UHD Graphics 630|81
UHD Graphics 630|81
UHD Graphics 630|80
UHD Graphics 630|80
UHD Graphics 630|80
Iris Pro Graphics 6200|80
UHD Graphics 630|80
Iris Graphics 540|80
HD Graphics 630|80
Iris(TM) Graphics 540|80
Iris(TM) Pro Graphics 5200|79
UHD Graphics 630|79
UHD Graphics 630|79
UHD Graphics 630|79
Iris Graphics 540|79
UHD Graphics 630|79
UHD Graphics|78
Corporation Sky Lake Integrated Graphics|78
Iris(TM) Pro Graphics 6200|78
Corporation WhiskeyLake-U GT2 [UHD Graphics 620]|78
Radeong 0.4 on AMD BONAIRE (DRM 2.43.0, LLVM 3.8.0)|78
UHD Graphics 710|78
UHD Graphics 630|78
UHD Graphics P630|77
UHD Graphics 630|77
UHD Graphics 630 (Desktop 9 Series)|77
UHD Graphics 630|77
Coffee Lake UHD Graphics|77
Iris(TM) Pro Graphics 5200|77
UHD Graphics 630|76
Iris(R) Plus Graphics 640|76
Iris(TM) Pro Graphics 5200|76
UHD Graphics 630|76
UHD Graphics|76
UHD Graphics 630|76
Iris(TM) Pro Graphics 5200|75
UHD Graphics 630|75
UHD Graphics P630|75
HD Graphics P530|75
HD Graphics 630|75
Iris(TM) Pro Graphics 5200|75
UHD Graphics 630|75
Iris(TM) Pro Graphics 5200|75
HD Graphics 620|74
UHD Graphics 630|74
HD Graphics 630|74
HD Graphics 630|74
Coffee Lake HD Graphics|74
UHD Graphics 630|74
Iris(TM) Graphics 540|74
UHD 630|74
Iris(R) Graphics 540|73
UHD Graphics 620|73
Iris Graphics 6200|73
Corporation CoffeeLake-H GT2 [UHD Graphics 630]|73
UHD Graphics 630 (Desktop)|73
HD Graphics ICL RVP|73
UHD Graphics 630|73
HD Graphics 630|72
Iris Pro|72
KBL Unknown|72
UHD Graphics 630|72
Iris(TM) Pro Graphics 5200|72
HD Graphics 530|72
Corporation UHD Graphics 630 (Desktop 9 Series)|72
Radeon Pro Vega 16|72
Iris(TM) Graphics 540|72
Iris(R) Graphics 540|72
UHD Graphics 630|71
HD Graphics 630|71
Iris(TM) Pro Graphics 5200|71
UHD Graphics 630|71
Iris Pro|71
CometLake UHD Graphics 630|71
HD Graphics 630|71
UHD Graphics|71
Iris(TM) Plus Graphics 640|71
UHD Graphics|71
Corporation UHD Graphics|70
Iris Pro Graphics 6200|70
Iris(R) Graphics 540|70
Graphics|70
UHD Graphics 630|70
HD Graphics ICL RVP BigSur|70
UHD Graphics ReleaseInternal|70
HD Graphics 530|70
UHD Graphics 630|70
UHD Graphics|70
UHD Graphics gfx-driver-user-comp_core-23599|70
UHD Graphics 630|69
UHD Graphics|69
Iris(TM) Pro Graphics 5200|69
Corporation Iris Plus Graphics G1 (Ice Lake)|69
HD Graphics 630|69
HD Graphics 630|69
Iris(R) Plus Graphics|69
Iris(TM) Pro Graphics 5200|69
UHD Graphics 620|69
UHD Graphics|69
Iris(R) Plus Graphics 640|69
Iris Pro Graphics 6200|69
HD Graphics 630|69
UHD Graphics 630 (Mobile)|68
Iris(TM) Pro Graphics 5200|68
Corporation UHD Graphics 630 (Desktop)|68
HD Graphics 630|68
UHD Graphics 630|68
UHD Graphics 620|68
UHD Graphics 630|68
Iris(TM) Plus Graphics 640|68
UHD Graphics|67
Iris Pro Graphics 580|67
Iris(TM) Graphics 540|67
UHD Graphics 620|67
Iris(TM) Pro Graphics 5200|67
UHD Graphics|66
HD Graphics P530|66
Corporation UHD Graphics 630 (Mobile)|66
Iris(R) Plus Graphics 640|66
UHD Graphics 630|66
Iris(R) Plus Graphics 640|65
HD Graphics 630|65
HD 530|65
UHD Graphics 620|65
SKL Unknown|65
HD Graphics 630|64
Iris(TM) Graphics 540|64
Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2)|64
UHD Graphics 630|64
HD Graphics 530|63
HD Graphics 530|63
HD Graphics 530|63
Mesa Intel(R) HD Graphics 530 (SKL GT2)|63
UHD Graphics|63
HD Graphics 530|63
Iris Graphics 550|63
HD Graphics 530|63
Iris Plus Graphics 655|63
HD Graphics 630|63
UHD Graphics, Gen11 LP|63
Corporation 8th Gen Core Processor Gaussian Mixture Model|63
UHD Graphics 630|63
Iris(TM) Graphics 650|63
Iris(R) Plus Graphics 640|62
HD Graphics 530|62
Mesa DRI Intel(R) Iris Graphics 540 (Skylake GT3e)|62
Iris(R) Plus Graphics|61
Iris(TM) Pro Graphics 5200|61
Iris Pro|61
HD Graphics 620|61
UHD Graphics 620|61
UHD Graphics 630|61
UHD Graphics|61
HD Graphics 530|60
Iris Plus Graphics G1|60
Iris(TM) Pro Graphics 5200|60
Iris Plus Graphics 650|60
UHD Graphics|60
HD Graphics 620|60
UHD Graphics 620|60
UHD Graphics 630|60
Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2)|60
UHD Graphics 620|60
HD Graphics 630|60
HD Graphics 630|59
Iris Graphics 540|59
Iris Plus Graphics 640|59
CoffeeLake-H GT2 [UHD Graphics 630]|59
HD Graphics 630|59
UHD Graphics|59
HD Graphics 620|59
UHD Graphics 620|59
HD Graphics 630|59
Corporation UHD Graphics 620 (Whiskey Lake)|59
Iris(R) Plus Graphics 650|59
UHD Graphics 620|59
Mesa Intel(R) HD Graphics 520 (SKL GT2)|58
HD Graphics 630|58
HD Graphics P530|58
Iris(TM) Plus Graphics 640|58
Corporation HD Graphics 630|58
UHD Graphics 620|58
UHD Graphics 630|58
HD Graphics P630|58
Mesa DRI Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)|58
Corporation CometLake-S GT2 [UHD Graphics 630]|58
HD Graphics 530|58
Iris Graphics 540|58
HD Graphics 530|58
Corporation Device|58
HD Graphics CFL CRB|57
HD Graphics 620 macOS Edition|57
HD Graphics 530|57
Mesa DRI Intel(R) HD Graphics 520 (SKL GT2)|57
Iris Pro Graphics|56
Iris(TM) Pro Graphics 5200|56
Iris(R) Plus Graphics 655|56
Coffee Lake UHD Graphics|56
Iris(TM) Graphics 640|55
Iris Pro|55
UHD Graphics 630|55
UHD Graphics 620|55
HD Graphics 530|55
HD Graphics 520|54
HD Graphics 530|54
UHD Graphics 620|54
HD Graphics 530|54
Corporation UHD Graphics 620|54
UHD Graphics|54
Iris Plus Graphics G7|54
Corporation Skylake GT2 [HD Graphics 520]|53
UHD Graphics 630|53
HD Graphics 630|53
Corporation HD Graphics 530|53
UHD Graphics 617|53
HD Graphics 520|52
HD Graphics 620|52
HD Graphics 620|52
HD Graphics 620|52
HD Graphics 620|52
HD Graphics 630|52
HD Graphics 630|52
HD Graphics 5600|51
HD Graphics 530|51
HD Graphics 630|51
UHD Graphics 615|51
Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)|51
HD Graphics 630|50
HD Graphics 620|50
UHD Graphics|50
HD Graphics P4600/P4700|50
HD Graphics 520|50
HD Graphics 530|50
HD Graphics 620|50
HD Graphics 530|50
Corporation HD Graphics 620|50
HD Graphics 530|50
UHD Graphics 620|49
UHD Graphics 620|49
HD Graphics 530|49
Iris(TM) Graphics 6100|49
HD Graphics 4600|49
HD Graphics 630|49
UHD Graphics 617|49
UHD Graphics RI|48
HD Graphics 520|48
UHD Graphics 617|48
HD Graphics 5600|48
HD Graphics 620|48
UHD Graphics, Gen11 LP|47
UHD Graphics 617|47
Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)|47
HD Graphics 615|47
UHD Graphics RI|47
HD Graphics 630|47
HD Graphics 4600|46
HD Graphics 520|46
Corporation Skylake GT2 [HD Graphics 520]|46
HD Graphics 520|46
Corporation Device|46
HD Graphics 4600|46
HD Graphics 615|45
HD Graphics 4600|45
Iris(TM) Graphics 6100|45
HD Graphics 615|45
UHD Graphics 615|45
HD Graphics 630 GT2|45
HD Graphics 4600|45
HD Graphics 630|45
Iris(TM) Graphics 6100|45
HD Graphics 4600|45
HD Graphics 620|45
Iris(TM) Graphics 6100|45
HD Graphics 520|45
HD Graphics 4600|45
Iris(TM) Graphics 540|44
HD Graphics 530|44
HD Graphics 4600|44
Iris(TM) Graphics 5100|44
Kabylake HD Graphics ULT GT2|44
Iris Graphics 6100|44
UHD Graphics 630|44
HD Graphics 520|44
HD Graphics KBL CRB|44
HD Graphics 530 (Skylake GT2)|44
Corporation HD Graphics 620|44
HD Graphics 515|44
UHD Graphics|44
UHD Graphics 620|44
Iris(TM) Pro Graphics P580|43
UHD Graphics 615|43
HD Graphics 4600|43
HD Graphics 4600|43
Corporation Skylake Integrated Graphics|43
HD Graphics 530|43
UHD Graphics 615|43
UHD Graphics 630|43
HD Graphics 615|42
HD Graphics 620|42
HD Graphics 4600|42
HD Graphics 615|42
HD Graphics 4600|42
HD Graphics 4600|42
Mesa DRI Intel(R) Kabylake GT2|42
HD Graphics 620|42
Corporation HD Graphics 6000|42
UHD Graphics 615|42
HD Graphics 4600|41
Corporation HD Graphics 520|41
HD Graphics P4600/P4700|41
Corporation, Series Chipset Iris Plus Graphics 655|41
HD Graphics 4600|41
Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2)|41
HD Graphics 4600|41
Iris(TM) Graphics 640|41
HD Graphics 4600|41
HD Graphics 630|40
Iris(TM) Graphics 5100|40
Iris(TM) Graphics 6100|40
UHD Graphics 610|40
HD Graphics 4600|40
HD Graphics 4600|40
UHD Graphics 615|40
UHD Graphics 610|40
HD Graphics 530|40
UHD Graphics 605|40
HD Graphics 615|40
HD Graphics 4600|40
UHD Graphics 615|40
HD Graphics 505|39
PHDGD Ivy 4|39
Unknown|39
Iris(TM) Graphics 5100|39
Iris|39
Corporation Iris Graphics 6100|39
HD Graphics 6000|39
Iris(TM) Graphics 5100|39
HD Graphics 615|39
HD Graphics 5500|39
Skylake GT2 [HD Graphics 520]|39
Corporation Broadwell-U Integrated Graphics|38
HD Graphics 615|38
HD Graphics 5500|38
HD Graphics 4600|38
Mesa DRI Intel(R) HD Graphics P4000 (IVB GT2)|38
HD Graphics 4600|38
HD Graphics 615|38
Corporation HD Graphics 610|38
HD Graphics 4600|38
HD Graphics 4600|38
Iris(TM) Graphics 5100|38
Iris Graphics 6100|38
HD Graphics 515|38
HD Graphics 6000|38
UHD Graphics, Gen11 LP|38
Iris(TM) Graphics 5100|38
HD Graphics 4600|37
HD Graphics 610|37
HD Graphics 4600|37
HD Graphics 515|37
HD Graphics 4600|37
HD Graphics 4600|37
Iris Graphics P580|37
Iris(TM) Pro Graphics P6300|37
HD Graphics 5500|37
HD Graphics 4600|37
Iris Graphics 6100|37
UHD Graphics 610|37
HD Graphics 4600|37
HD Graphics 4600|37
UHD Graphics 610|37
HD Graphics 530|37
HD Graphics 5500|37
HD Graphics 515|36
HD Graphics P4600/P4700|36
HD Graphics 515|36
HD Graphics 4600|36
UHD Graphics 615|36
Iris Graphics 6100|36
HD Graphics 4600|36
HD Graphics 4600|36
HD Graphics 4600|36
HD Graphics 520|36
HD Graphics 520|36
HD Graphics 5500|36
Corporation HD Graphics 5500|35
Iris|35
HD5500 Graphics PG7|35
HD Graphics 515|35
Iris|35
Graphics gfx-driver-user-feature_dg1_poweron-27723 DCH ReleaseInternal|35
HD Graphics 615|35
HD Graphics P630|35
HD Graphics 510|35
HD Graphics 6000|35
HD Graphics 5000|35
Corporation HD Graphics 5300|35
HD Graphics 6000|35
HD Graphics 4600|35
HD5500 Broadwell PG7|35
Graphics HD 4600|35
HD Graphics 6000|35
HD Graphics 510|34
HD Graphics 610|34
HD Graphics 4600|34
HD Graphics Family (PHDGD Skylake v2.9)|34
Corporation Device|34
HD Graphics 610|34
UHD Graphics 610|34
HD Graphics 5300|34
HD Graphics 5000|34
HD Graphics 4600|34
UHD Graphics 610|33
HD Graphics 4600|33
UHD Graphics 620|33
Corporation UHD Graphics 615|33
HD Graphics 5000|33
Kabylake HD Graphics ULX GT2|33
HD Graphics 620|33
UHD Graphics 615|33
HD Graphics 4600|33
HD Graphics 5500|33
HD Graphics 515|33
UHD Graphics|33
HD Graphics 4600|33
HD Graphics 520|33
HD Graphics 6000|33
HD Graphics 615|33
HD Graphics KBL CRB|33
HD Graphics 4600|33
UHD Graphics 610|33
Iris Graphics 6100|33
HD Graphics 515|33
Iris|32
Iris|32
HD Graphics 5000|32
Iris|32
HD Graphics 5000|32
Iris(TM) Graphics 5100|32
HD Graphics 4600|32
HD Graphics 4600|32
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|32
HD Graphics 5500 (PHDGD Skylake v2.9)|32
HD Graphics 610|32
HD Graphics 6000|31
HD Graphics 5500|31
Iris|31
HD Graphics 6000|31
UHD Graphics 610|31
HD Graphics 510|31
HD Graphics|31
HD Graphics 6000|31
HD Graphics 4400|31
HD Graphics 5000|31
HD Graphics 4600|30
HD Graphics 515|30
HD Graphics 5600|30
HD Graphics 4600|30
HD Graphics 4400|30
HD Graphics 530|30
GeForce GTX 960|30
UHD Graphics 610|30
GeForce GTX 960|30
HD Graphics 510|30
HD Graphics 6000|30
Corporation HD Graphics 515|30
HD Graphics 610|29
HD Graphics 510|29
HD Graphics 5000|29
HD Graphics 4600|29
Iris(TM) Pro Graphics 6200|29
HD Graphics 510|29
HD Graphics 5000|29
HD Graphics 6000|29
Iris|29
HD Graphics 4400|29
HD Graphics 4400|29
HD Graphics 4000|29
HD Graphics 510|29
HD Graphics 5000|29
HD Graphics 4400|28
HD Graphics 610|28
HD Graphics 5300|28
HD Graphics 510|28
HD Graphics|28
HD Graphics 610|28
HD Graphics 4400|28
HD Graphics 610|28
HD Graphics 4600|28
HD Graphics 4600|28
HD Graphics 5000|28
HD Graphics 4400|28
HD Graphics 4400|28
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|28
HD Graphics 4400|28
HD Graphics 5300|28
HD Graphics 5000|28
UHD Graphics 605|28
HD Graphics 4400|28
HD Graphics 5500|28
HD Graphics 4000|28
HD Graphics 4400|27
HD Graphics 615|27
HD Graphics Family(PHDGD Skylake v2.0)|27
HD Graphics 4400|27
HD Graphics 4400|27
HD Graphics 610|27
Corporation HD Graphics 510|27
Iris|27
HD Graphics 520|27
HD Graphics 5000|27
HD Graphics 5300|27
HD Graphics 6000|27
HD Graphics 4000|27
HD Graphics 610|27
HD Graphics 5000|27
HD Graphics 4600|27
Mesa DRI Intel(R) HD Graphics 505 (Broxton)|27
HD Graphics 5500|27
HD Graphics|27
HD Graphics 5000|26
UHD Graphics 600|26
HD Graphics 4600|26
Mesa DRI Intel(R) Haswell Mobile|26
HD Graphics 4000|26
HD Graphics 5300|26
Iris(TM) Graphics 540|26
HD Graphics 4000|26
HD Graphics 4600|26
HD Graphics|26
HD Graphics 4400|26
HD Graphics 4600|26
HD Graphics 6000|26
Corporation Celeron N3350/Pentium N4200/Atom E3900 Series Integrated Graphics Controller|26
HD Graphics 530|26
HD Graphics 5500|25
Broxton-P HD Graphics|25
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|25
HD 4000|25
HD Graphics 4400|25
HD Graphics 4600|25
HD Graphics 5500|25
HD 4000|25
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|25
Corporation HD Graphics|25
HD Graphics 4400|25
Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2)|25
HD Graphics 4400|25
HD Graphics|25
UHD Graphics 600|24
Arc(TM) Graphics|24
HD Graphics 4600|24
HD Graphics 5300|24
HD Graphics 4400|24
HD Graphics 4400|24
HD Graphics 4400|24
HD Graphics 4000|24
UHD Graphics 605|24
HD Graphics 5000|23
Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|23
UHD Graphics, LKF|23
UHD Graphics 605|23
HD Graphics 4400|23
HD Graphics 4400|23
HD Graphics 4000|23
HD Graphics 4400|23
Mesa DRI Intel(R) Ivybridge Desktop|23
0x496e74656c2048442047726170686963000732034343|23
HD Graphics 5300|22
HD Graphics 615|22
Kabylake HD Graphics ULX GT2|22
HD Graphics 5300|22
HD Graphics|22
HD Graphics|22
HD Graphics 4000|22
HD Graphics|22
HD Graphics 515|22
HD Graphics|22
HD Graphics 5300|22
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|22
HD Graphics 5300|22
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|22
HD Graphics 4000|21
UHD Graphics 605|21
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21
HD Graphics 4400|21
HD Graphics|21
HD Graphics 4400|21
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21
HD Graphics|21
HD Graphics 5300|21
HD Graphics 4400|21
HD Graphics 5300|21
HD Graphics P4600/P4700|21
HD Graphics|21
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|21
Corporation UHD Graphics 605|20
UHD Graphics 600|20
HD Graphics 4000|20
HD Graphics|20
UHD Graphics 600 Universal|20
HD Graphics 4600|20
HD Graphics 500|20
UHD Graphics 600|20
HD Graphics|20
HD Graphics 5000|20
HD Graphics 4400|20
HD Graphics 5300|19
HD Graphics 4000|19
Mesa DRI Intel(R) Sandybridge Mobile|19
HD Graphics 505|19
HD Graphics 4000|19
HD Graphics 4400|19
UHD Graphics 600|19
HD Graphics 3000|19
HD Graphics 615|19
HD Graphics|19
Corporation Atom/Celeron/Pentium Processor N4200/N3350/E3900 Series Integrated Graphics Controller|19
HD Graphics 4000|19
HD Graphics|19
UHD Graphics 600|19
HD Graphics|19
Corporation Haswell-ULT Integrated Graphics Controller|19
HD Graphics 4400|19
Corporation GeminiLake [UHD Graphics 600]|19
HD Graphics 4000|18
HD Graphics|18
HD Graphics|18
HD Graphics 500|18
HD Graphics 4000|18
CherryView HD Graphics|17
Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|17
Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|17
Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller|17
UHD Graphics 600|17
UHD Graphics 600|17
Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller|16
HD Graphics|16
UHD Graphics 600|16
HD Graphics|16
HD Graphics 5000 (Android)|16
HD Graphics|16
UHD Graphics 600|16
HD Graphics|16
HD Graphics, Gen10|16
HD Graphics (PHDGD IvyDrive 3.0)|16
HD Graphics|15
UHD Graphics 600|15
Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller|15
HD Graphics 500|15
HD Graphics 505|15
HD Graphics|15
Corporation 3rd Gen Core processor Graphics Controller|15
HD Graphics 4400|15
HD Graphics|14
HD Graphics|14
HD Graphics|14
HD Graphics 505|14
HD Graphics|14
HD Graphics|14
HD Graphics|14
HD Graphics|13
HD Graphics 530|13
HD Graphics 500|13
Corporation 3rd Gen Core processor Graphics Controller|13
HD Graphics 4400|12
HD Graphics 5500|12
HD Graphics|12
HD Graphics|12
Corporation HD Graphics 500|12
HD Graphics 500|12
3rd Gen Core processor Graphics Controller|12
HD Graphics|11
Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers|11
Corporation 2nd Gen Core Processor Family Integrated Graphics Controller|11
HD Graphics 510|11
HD Graphics 4600 (PHDGD Skylake v2.9)|9
Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display|8
Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display|8
Mesa DRI Intel(R) Bay Trail|8
UHD Graphics, Gen12 LP ReleaseInternal|5
Corporation D3D12 (Intel(R) UHD Graphics 630)|3
HD Graphics 3000|2
(PE64) Intel(R) 4th Generation Haswell HD Graphics Family|-1
4 Series Internal Chipset|-1
7 Series/C216 Chipset Family MEI Controller #1|-1
B43 Express Chipset|-1
CometLake-S GT2 [UHD Graphics 630]|-1
HD Graphics 5500|-1
HD Graphics 620|-1
G35 Express Chipset Family|-1
G41 Express Chipset|-1
G45/G43 Express Chipset|-1
Graphics Media Accelerator HD|-1
HD Graphics (PHDGD Omega 5.0)|-1
HD Graphics 4400|-1
HD Graphics P3000|-1
HD Graphics P3000 (PHDGD Omega 5.0)|-1
IncrediblE HD Graphics 3000|-1
Iris Pro Graphics 5200|-1
Mesa DRI Intel(R) HD Graphics (CHV)|-1
Mesa DRI Intel(R) Ivybridge Mobile|-1
Mobile Intel(R) 4 Series Express Chipset Family|-1
Mobile Intel(R) 965 Express Chipset Family|-1
Mobile Intel(R) HD Graphics|-1
PHDGD Quantic C3|-1
Q45/Q43 Express Chipset|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.7.0)|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 3.9.0 / 4.9.0-rc1+, LLVM 4.0.0)|-1
Radeong 0.4 on AMD FIJI (DRM 3.2.0 / 4.7.0-rc5+, LLVM 4.0.0)|-1
UHD Graphics, Gen12 LP ReleaseInternal|-1`;
function lJn() {
  return sJn;
}
const uJn = `
GeForce RTX 4090|1950
GeForce RTX 4090 Laptop GPU|1791
GeForce RTX 4070 Ti|1517
GeForce RTX 3090 Ti|1465
GeForce RTX 4080|1426
GeForce RTX 4060 Laptop GPU|1408
GeForce RTX 3080 Ti Laptop GPU|1394
GeForce RTX 3080|1325
GeForce RTX 3080 Ti|1298
RTX A5500 Laptop GPU|1242
GeForce RTX 3090|1235
GeForce RTX 3070 Ti|1229
GeForce RTX 3070|1228
GeForce RTX 3060 Ti|1166
GeForce RTX 3080 Laptop GPU|1139
RTX A4000 Laptop GPU|1126
GeForce RTX 2080 Ti|1120
GeForce RTX 3070 Laptop GPU|1077
TITAN V|1070
GeForce RTX 2080 SUPER|1063
Quadro RTX 8000|1054
RTX A6000|1046
TITAN RTX|1046
GeForce RTX 3070 Ti Laptop GPU|1033
RTX A5000 Laptop GPU|1027
GeForce RTX 4090 Laptop GPU|1024
GeForce RTX 3060|1015
TITAN X (Pascal)|1008
TITAN Xp|995
GeForce GTX 1080 Ti|992
GeForce RTX 4070 Laptop GPU|989
GeForce RTX 4090|982
GeForce RTX 2070 SUPER|981
GeForce RTX 4080|975
GeForce RTX 3060|970
GeForce RTX 2080|970
GeForce RTX 4080 Laptop GPU|968
GeForce RTX 3060 Laptop GPU|913
GeForce RTX 2060 SUPER|890
GeForce RTX 4060 Laptop GPU|882
GeForce RTX 2070|879
GeForce RTX 2080 Super with Max-Q Design|868
GeForce RTX 2080 with Max-Q Design|868
Quadro RTX 5000|867
GeForce RTX 3080 Ti Laptop GPU|861
Quadro RTX 5000 with Max-Q Design|843
Asus GeForce GTX 1080|841
GeForce GTX 1080|841
GeForce RTX 2070 Super with Max-Q Design|837
RTX A3000 Laptop GPU|835
Quadro RTX 4000 with Max-Q Design|833
GeForce RTX 3070 Ti Laptop GPU|827
Quadro RTX 4000|817
RTX A6000|814
GeForce GTX 1070 Ti|785
GeForce RTX 4070 Ti|784
GeForce RTX 4050 Laptop GPU|784
RTX A5500 Laptop GPU|783
TITAN Xp COLLECTORS EDITION|771
GeForce RTX 2070 with Max-Q Design|765
GeForce RTX 3050|760
GeForce RTX 2060|757
GeForce GTX 980 Ti|755
Quadro P6000|753
GeForce GTX 1080|747
Quadro RTX 6000|744
GeForce GTX 1070|742
RTX A4000|739
GeForce RTX 3090|737
GeForce RTX 3080 Ti|733
GeForce GTX 1080 Ti|729
Quadro P4200|711
GeForce GTX 1080 with Max-Q Design|707
GeForce RTX 3060 Lite Hash Rate|705
EIZO MED-XN83|704
GeForce RTX 3080 Ti|701
GeForce GTX 1660 SUPER|701
TITAN Xp|700
EVGA GeForce GTX 1070|698
GeForce RTX 3090 Ti|696
Quadro GV100|695
Quadro P4000|695
GeForce GTX 1660 Ti|694
GeForce RTX 3070 Ti|690
RTX 6000 Ada Generation|687
GeForce RTX 3070|687
Quadro RTX 8000|685
RTX A2000 12GB|683
GeForce RTX 2080|679
GeForce GTX TITAN X|679
Quadro M6000 24GB|676
GeForce GTX 1660 SUPER|674
TITAN V|673
Quadro RTX 3000|672
Graphics Device|672
RTX A5000|669
GeForce RTX 3090|669
TITAN Xp COLLECTORS EDITION|669
GeForce GTX 1070 A17|668
GeForce RTX 3080 Laptop GPU|667
RTX A4500 Embedded GPU|663
RTX A5000 Laptop GPU|663
GeForce RTX 3080|658
GeForce RTX 3050 Ti Laptop GPU|657
GeForce GTX 1070 with Max-Q Design|656
GeForce RTX 3060 Ti|656
Quadro P4200 with Max-Q Design|651
GeForce RTX 3080|651
GeForce RTX 2080 SUPER|650
GeForce GTX 1070 Ti|648
GeForce GTX 1070 with MaxQ Design|642
RTX A3000 Laptop GPU|641
GeForce RTX 3070 Laptop GPU|641
GeForce GTX 1070|640
GA104GL [RTX A4000]|639
GeForce GTX 980 Ti|637
GeForce RTX 2070 Mobile / Max-Q Refresh|637
RTX A4000 Laptop GPU|634
GeForce RTX 3060|633
Microsoft Virtual Render Driver|633
GeForce RTX 3050 Laptop GPU|631
RTX A2000|629
GeForce RTX 2070 Mobile / Max-Q|626
GeForce RTX 3070|625
Quadro P5000|625
Quadro P4000|621
GeForce RTX 3060 Laptop GPU|621
GeForce RTX 2060 with Max-Q Design|618
GV102|614
GeForce RTX 2070 SUPER|612
GeForce GTX 1660|606
GeForce RTX 2070|604
GeForce GTX 1660 Ti with Max-Q Design|601
GeForce GTX TITAN X|598
RTX A2000 8GB Laptop GPU|598
GeForce GTX TITAN Xp|595
GeForce GTX 980|593
GeForce RTX 2080 SUPER|591
GTX 1060 HL|589
Tesla T4|589
GRID P4-1Q|585
RTX A4000|581
GeForce RTX 2080 Ti|577
GeForce RTX 2080 Super with Max-Q Design|576
Quadro RTX 4000 Mobile / Max-Q|576
TU102 [TITAN RTX]|574
GeForce GTX 1060 with Max-Q Design|571
GeForce RTX 2070 SUPER|570
GeForce GTX 1060 6GB|570
GeForce RTX 2080 Mobile|568
GeForce RTX 2060|568
Quadro P3200|565
P106-100|564
GRID V100DX-1Q|564
RTX A2000|562
GeForce RTX 2080 Ti Rev. A|561
GeForce RTX 2080 Rev. A|559
GV100 [TITAN V]|557
GeForce RTX 2080|556
GeForce GTX 1650 SUPER|554
P106-100 Custom|553
GeForce RTX 2070 Super with Max-Q Design|553
GV100|553
GeForce RTX 2070 Mobile|550
GP102 [TITAN X]|548
RTX A2000 12GB|546
GeForce GTX 1060 5GB|542
MSI GeForce GTX 1060|542
GeForce RTX 2060 SUPER|542
GRID T4-1Q|539
Quadro RTX 5000 Mobile / Max-Q|538
GeForce RTX 3050|538
GeForce GTX 1060 3GB|538
Quadro RTX 5000 with Max-Q Design|537
Quadro M6000|536
RTX A2000 Laptop GPU|536
GeForce GTX 1660 SUPER|533
A10-2B|530
TITAN X (Pascal)|530
Quadro P5000|527
GeForce RTX 2070|526
GeForce GTX 1080|525
GeForce RTX 2060 Mobile|524
PNY GeForce GTX 980|524
GeForce GTX 1080 Mobile|523
GeForce RTX 2060 SUPER|520
GeForce GTX 780 Ti|518
RTX A4500|516
GeForce RTX 2060 Rev. A|515
MSI GeForce GTX 980|515
Quadro P3200 with Max-Q Design|513
GeForce RTX 2070 with Max-Q Design|513
GeForce RTX 3050 Ti Laptop GPU|510
Quadro RTX 3000 Mobile / Max-Q|509
GeForce GTX 1660 SUPER|508
Quadro RTX 4000|508
GeForce GTX 1060|506
GeForce RTX 2080 with Max-Q Design|505
GeForce GTX 1080 Ti|505
GeForce GTX 1660 Ti Rev. A|504
GeForce GTX 1660 Ti Mobile|504
GeForce RTX 3050 Laptop GPU|503
GeForce RTX 2060|503
Quadro RTX 4000 with Max-Q Design|500
EIZO MED-XN83|499
GeForce GTX 970|499
GeForce GTX 1080|495
GeForce GTX 1070 Ti|492
GeForce GTX 980|491
A100-PCIE-40GB|489
GeForce GTX 1070|487
GeForce GTX 1660 Ti|487
Quadro P2200|485
GeForce GTX TITAN Black|484
TITAN Xp COLLECTORS EDITION|483
TITAN RTX|482
Quadro P5200|482
GeForce GTX 1060 with Max-Q Design|480
RTX A1000 Laptop GPU|479
GeForce GTX 1060 6GB|479
Quadro RTX 5000|475
TITAN V|475
GRID P100-4Q|474
EVGA GeForce GTX 970|472
GeForce GTX 1650 SUPER|471
GeForce GTX 1650 Ti|470
Quadro RTX 3000|470
Quadro M5000|469
Quadro RTX 3000 with Max-Q Design|468
GeForce GTX 980 Ti|467
GeForce GTX TITAN|467
Quadro P4200|466
GeForce GTX 1070 with Max-Q Design|466
Quadro M5000|466
GeForce GTX 1080 Ti|466
Tesla M60|462
GeForce GTX 1660|457
GeForce GTX 1660|455
GeForce RTX 2050|453
GeForce GTX 1060|453
GeForce RTX 2060 with Max-Q Design|453
Quadro P3200 with Max-Q Design|452
Quadro P4000|450
GeForce GTX 1060 3GB|449
GeForce GTX 1070|448
GeForce GTX 1060 6GB Rev. 2|447
Gigabyte GeForce GTX 780 Ti|447
TITAN Xp|444
GeForce GTX 980M|440
A10-4Q|439
GeForce GTX 1080 with Max-Q Design|437
GeForce GTX 1650 SUPER|435
Quadro P5000|435
Quadro P3000|434
RTX A6000|434
GeForce GTX 1060 3GB|433
GeForce GTX 1070 Ti|432
GeForce GTX 780|432
GeForce GTX 1060 Mobile|432
Gigabyte GeForce GTX 970|431
GeForce GTX TITAN Z|431
Quadro K6000|429
GeForce GTX 1650|425
GeForce GTX 970|421
Tesla K20m|420
Quadro GV100|419
Quadro P4000|419
Quadro P3200|417
GTX 1060 HL|415
RTX A2000 Laptop GPU|415
GeForce GTX 780 by St3Phl3|414
P102-100|412
T1200 Laptop GPU|412
GeForce GTX 780 Ti|411
GeForce GTX 1060 6GB|408
GeForce GTX 1650 Ti with Max-Q Design|407
Quadro T2000 with Max-Q Design|407
Quadro P2000|406
Quadro P2200|406
GeForce RTX 2060 Max-Q|405
GeForce GTX 1650 Ti Mobile|403
GeForce GTX 1060 Mobile 6GB|403
GeForce GTX 1060 with Max-Q Design|401
GeForce GTX 980|398
GeForce RTX 2070 Rev. A|397
GeForce GTX TITAN X|397
Tesla T4|395
Quadro P6000|394
GeForce GTX 1060 3GB|394
Quadro M5000|393
GeForce GTX 1060 with Max-Q Design|392
PNY GeForce GTX 970|392
Quadro T2000|391
Quadro T1000 with Max-Q Design|391
GRID P40-8Q|390
GeForce GTX 780 Rev. 2|389
Quadro GP100|387
GeForce GTX 980|387
P104-100|387
GeForce GTX 1650 Ti|386
GRID P40-4Q|384
GeForce GTX 780 Ti|383
Device|383
TU117M|381
Quadro P2000|380
Quadro RTX 6000|379
GeForce GTX 1070 Mobile|378
Quadro T1000|377
GeForce RTX 3070 Mobile / Max-Q|376
GeForce GTX 1060|376
GRID V100-1Q|375
GeForce GTX 780 Rev. 2|372
GeForce RTX 2050|370
GeForce GTX 770|370
GeForce GTX 970|368
GeForce GTX 1650 Ti|368
GRID T4-2B4|368
Asus GeForce GTX 780|366
P106-100|365
Quadro RTX 8000|365
GeForce GTX TITAN Black|365
GRID RTX6000-2Q|365
GeForce GTX TITAN Black|363
Quadro M4000|363
GeForce GTX 1060 6GB|362
Quadro P5000|361
GeForce GTX 1650|361
Quadro M5500|361
GeForce GTX 780|360
GeForce GTX 780|360
GeForce GTX 980M|358
GeForce GTX 1650|358
GeForce GTX 1050 Ti|357
Quadro P3200 Mobile|357
GeForce GTX 1650 with Max-Q Design|356
Tesla T4|356
Quadro P2000|356
GeForce GTX TITAN|355
GeForce GTX 970|355
GeForce GTX 980 Ti|354
GeForce GTX 1660 Ti with Max-Q Design|354
GeForce GTX 780 Rev. 2|352
GRID P4-4Q|351
GeForce GTX TITAN X|351
T1200 Laptop GPU|350
GRID T4-8Q|350
GeForce GTX 1060|349
GeForce GTX 1050 Ti with Max-Q Design|348
GeForce GTX 970M|346
T1000 8GB|346
GeForce RTX 3080 Mobile / Max-Q 8GB/16GB|346
GeForce GTX 780 Ti|346
GeForce GTX 680|346
GeForce GTX 1660 Ti|345
GeForce GTX 780|345
Quadro M6000|344
GRID T4-16Q|344
GeForce RTX 2080 Ti|344
GRID T4-1B|343
Quadro K5200|342
Quadro P2200|341
T1000 8GB|341
Tesla K80|341
Quadro T2000 Mobile / Max-Q|338
TU107|337
GeForce GTX 780 Mac|336
GeForce GTX TITAN|336
GeForce GTX 980M|335
GRID P40-2Q|335
EVGA GeForce GTX 780|334
GeForce GTX TITAN Z|334
TITAN X (Pascal)|332
GeForce GTX 960|331
Tesla P40|331
GeForce GTX 1650 Ti with Max-Q Design|330
Tesla P40|330
GeForce GTX 1060se 3GB|329
GeForce GTX 1650 Mobile / Max-Q|329
Quadro T2000 with Max-Q Design|328
T1000|327
RTX A5500|326
A40-8Q|326
GeForce RTX 3060 Mobile / Max-Q|326
GeForce GTX 690|326
Tesla V100-SXM2-16GB|326
Quadro M5000|325
A16-2B|323
GeForce GTX 1050 Ti with Max-Q Design|321
GeForce GTX 1050 Ti Mobile|321
GeForce GTX 980M|319
Quadro M3000M|318
GeForce GTX 1650 with Max-Q Design|318
GeForce GTX 670|316
Quadro P3000|316
T600 Laptop GPU|315
Quadro T1000 with Max-Q Design|313
Tesla K80|312
Tesla K20m|311
GeForce GTX 770|311
Tesla P100-PCIE-16GB|311
Quadro M5000M|311
Tesla K80|309
EVGA GeForce GTX 1070|309
Quadro T1000|309
GeForce GTX 1050 Ti|309
GeForce GTX TITAN Z|308
Quadro T2000|308
Quadro M6000 24GB|308
GeForce GTX 760 Ti|308
GeForce RTX 2080 SUPER Mobile / Max-Q|308
GeForce GTX 1050 Ti|307
Quadro P2000|304
Quadro P6000|304
GeForce GTX 770 Mac Edition|303
MSi GeForce GTX 1050 Ti|303
A40|303
T600|303
P106-090|302
P106-090|301
Quadro K5200|300
GeForce GTX 770|299
GeForce GTX 680|299
GeForce GTX TITAN|299
GeForce GTX 680|297
GRID M60-4Q|296
Quadro M4000|296
GRID M60-2Q|295
GeForce GTX 760|294
GRID V100DX-16Q|293
Quadro RTX 6000/8000|293
GeForce GTX 770|293
GP104|292
GeForce GTX 780 Rev. 2|290
GeForce GTX 1050 Ti|288
GeForce GTX 950|288
EVGA GeForce GTX 1050 Ti|288
GeForce GTX 1650 with Max-Q Design|286
GeForce GTX 880M|285
%NVIDIA_DEV.13D7.0580.1028%|283
GP104GL|283
Gigabyte GeForce GTX 960|282
Quadro K5200|281
GeForce GTX 660 Ti|281
GeForce GTX 670|281
Quadro M4000|280
GeForce GTX 580|280
MSi GeForce GTX 960|280
Tesla M6|278
PNY GeForce GTX 680|278
T500|277
GeForce GTX 1050|276
GeForce GTX 1050 Ti with Max-Q Design|276
GeForce GTX 690|276
GeForce GTX 680|276
GeForce GTX 670|275
GeForce GTX 760 Ti|274
GeForce GTX 1050 3GB|272
GeForce GTX 880M|272
Tesla M60|272
Asus GeForce GTX 960|271
Quadro M4000|269
T600|268
Tesla K20m|268
GeForce GTX 760|268
GP102 [TITAN Xp]|267
GeForce GTX 960|267
GeForce GTX 670|265
Quadro T1000 Mobile|265
GeForce GTX 1050|264
Tesla M60|264
EVGA GeForce GTX 1080 Ti|263
GeForce GTX 970M|263
GeForce GTX 780M|262
GeForce GTX 690|262
Asus GeForce GTX 770|261
GeForce GTX 1070 with MaxQ Design|261
EVGA GeForce GTX 960|261
GeForce GTX 960|260
GRID T4-2Q|259
GeForce GTX 970M|259
GeForce GTX 960|259
Quadro M3000M|258
GeForce GTX 1060se 3GB|257
Tesla K10|257
Quadro M3000M|257
Quadro M2200|256
GeForce GTX 690|255
GeForce GTX 760|254
GeForce GTX 880M|254
Quadro K4200|253
Quadro P2000 with Max-Q Design|253
T550 Laptop GPU|253
Quadro K5200|252
MSI GeForce GTX 760|250
GeForce GTX 580|249
GeForce GTX 780M Mac Edition|249
GeForce GTX 570|249
Tesla V100-PCIE-16GB|248
GeForce GTX880M|248
GeForce GTX 760|247
GeForce GTX 570 Rev. 2|247
Asus GeForce GTX 670|246
GeForce GTX 580|246
GeForce GTX 1050|245
Tesla P4|244
GeForce GTX 680MX|244
GeForce GTX 480|242
GeForce GTX 1050|242
Quadro 7000|241
Quadro M4000M|241
GeForce GTX 1050 Mobile|240
GeForce GTX 660|240
GeForce GTX 760 (192-bit)|239
Quadro K5000|239
GeForce GTX 760 OEM|238
GeForce GTX 660 Ti|238
GeForce GTX 775M Mac Edition|238
GeForce GTX 965M|237
GeForce GTX 870M|236
GeForce GTX 950|236
GeForce GTX 560 Ti 448 Cores|236
GeForce GTX 780M|236
Quadro P2000 with Max-Q Design|234
MSI GeForce GTX 980 TI|234
GRID K2|233
GeForce GTX 1060 6GB OpenGL Engine|233
PNY GeForce GTX 1060|233
EVGA GeForce GTX 980|232
GRID RTX6000P-6Q|232
GeForce GTX 950|232
GeForce GTX 950|232
GeForce GTX 590|231
GeForce GTX 1070 OpenGL Engine|231
TITAN X (Pascal)|229
GeForce GTX 1050 with Max-Q Design|229
GeForce GTX TITAN Black|228
Quadro K4200|227
GeForce GTX 660 OEM|227
GeForce MX450|225
GeForce GTX 1050 with Max-Q Design|225
Quadro P1000|225
Graphics Device|225
Quadro M2000|222
GeForce GTX 1630|222
Quadro M4000M|221
Quadro K5100M|221
EVGA GeForce GTX 760|221
GeForce GTX 1070 Ti|221
GeForce GTX 660 Ti|220
GeForce GTX 570|220
GeForce GTX 660 Ti|219
Quadro K6000|219
GeForce GTX 570 Rev. 2|219
GeForce GTX 1050 with Max-Q Design|219
Tesla M40|218
GeForce GTX 680M|217
GeForce GTX 780M by Nick[D]vB|217
Asus GeForce GTX 980 TI|217
GeForce GTX 1060 3GB|217
Graphics Device|217
GeForce GTX 570 Rev. 2|216
GeForce GTX 1060 3GB OpenGL Engine|216
GeForce GTX 660|215
Point of View GeForce GTX 660 Ti|214
Gigabyte GeForce GTX 980|214
Quadro K5000|213
Quadro P1000|213
GeForce GTX 480|213
GeForce MX450|212
Quadro K4200|211
GRID K280Q|211
Asus GeForce GTX 760|210
Quadro P1000|210
GeForce GTX 680MX|209
GeForce GTX 1060 6GB|209
GeForce GTX 660|209
GeForce GTX 750 Ti|208
GeForce GTX 780M Mac Edition|208
GeForce GTX 775M Mac Edition|208
GRID K520|208
Quadro M2200|207
GRID M60-8Q|207
GRID K2|207
GeForce GTX 775M Mac Edition|206
GeForce GTX 560 Ti 448 Cores|205
GeForce GTX 760 (192-bit)|205
Quadro K5000|205
Gigabyte GeForce GTX 980 TI|204
GeForce GTX 780M Mac Edition|204
Asus GeForce GTX 660|204
GRID M60-1B|202
GeForce GTX 650 Ti BOOST|202
GeForce GTX 480|202
GeForce GTX 960M|201
GeForce GTX 660 OEM|201
GeForce GTX 780 Ti|201
Quadro K5000|201
GeForce GTX 780M Mac Edition|201
GeForce GTX 870M|200
GeForce GTX 680MX|200
GeForce GTX 680MX|199
Quadro P1000|198
Tesla P100 PCIe 16GB|198
Quadro K5100M|198
GeForce GTX 470|198
Quadro P620|197
Asus GeForce GTX 780|197
Quadro 6000|196
Quadro M1200|195
Quadro K2200|195
GeForce GTX 590|195
Quadro M2000M|194
Quadro M4000 OpenGL Engine|194
GeForce GTX 870M|194
GeForce GTX 1070|194
EVGA GeForce GTX 750 Ti|194
Zotac GeForce GTX 680|193
Quadro RTX 3000 with Max-Q Design|193
T400|193
Quadro M2200|193
Quadro K4100M by nikey22|192
GRID K2|192
GTX 865M by iMacGFX|191
Quadro M2000|191
GeForce GTX 980M|190
GeForce GTX 560 Ti|190
Palit GeForce GTX 660|190
GRID K260Q|189
GRID M10-2Q|189
GeForce GTX 660|189
GeForce GTX 965M|189
GeForce GTX 650 Ti BOOST|188
GeForce GTX 675MX Mac Edition|188
Quadro K5100M by nikey22|187
GeForce GTX 680M|187
Zotac GeForce GTX 660|186
GeForce GTX 650 Ti BOOST|186
GeForce GTX 760 (192-bit)|185
GRID M60-1Q|184
Gigabyte GeForce GTX 960|184
Quadro M2000M Special Edition|184
GeForce GTX 560 Ti|184
Inno3D GeForce GTX660|183
GeForce GTX 1060|183
GeForce GTX 675MX Mac Edition|182
Quadro P600|181
GeForce GTX 1080|181
GeForce GTX 675MX Mac Edition|181
Quadro P620|180
GK104 Board - 20530501|180
Ashley|180
Quadro M2000|179
GeForce GTX 860M|179
MSi GeForce GTX 1050 Ti|179
Asus GeForce GTX 750 Ti|178
GeForce GTX 750 Ti|178
GeForce GTX 750 Ti|177
EVGA GeForce GTX 980 TI|177
Asus GeForce GTX 770|177
GeForce GTX 760 OEM|176
GeForce GTX 750|176
Quadro P2000 Mobile|176
Quadro K4100M|175
T400 4GB|174
GeForce GTX 1080 Ti OpenGL Engine|174
Quadro K5000M|173
GeForce GTX 960A|173
GeForce GTX 560 Ti|172
Tesla M10|172
GeForce GTX 1080 Ti|172
GRID RTX6000P-6|172
GK104 Board - 2051b502|172
GeForce GTX 770M|172
GeForce GTX 960M|172
GeForce GTX 970|172
GRID M10-2Q|171
GeForce GTX 560 Ti OEM|171
MSi GeForce GTX 970|171
GK104GL [GRID K2]|171
GeForce GTX 470|170
GeForce GTX 560 Ti|170
TITAN Xp|170
GeForce GTX 870M|170
GeForce MX350|169
MSi GeForce GTX 580|169
GeForce GTX 960M|169
EVGA GeForce GTX 760|169
Quadro K4000M|169
T400|169
GeForce MX350|168
GeForce GTX 470|168
GeForce GTX 560|167
Quadro 6000|167
GeForce GTX 1050 Ti OpenGL Engine|167
Quadro M1200|167
Gigabyte GeForce GTX 970|166
GeForce GT 1030|166
GeForce GTX780M by nikey22|166
GeForce GTX870M by nikey22|166
Tesla V100-PCIE-32GB|165
Quadro K2200|165
Quadro M1000M|165
Quadro K2200|165
Asus GeForce GTX 970|164
GeForce GTX 750 Ti|164
Quadro M2000M|164
GeForce GTX 1050|164
GeForce GTX 1050 Ti|163
Quadro K5000|163
Graphics Device|162
GeForce MX250|162
T500|161
EVGA GeForce GTX 570|161
Quadro M2000M|161
Quadro K1200|159
GeForce GTX 860M|159
GeForce GTX 770M|159
Quadro M1200|158
GeForce GTX 675MX|158
GeForce MX330|158
Quadro K2200M|157
Quadro K4000|157
GeForce GTX 690|157
GeForce GTX 860M|157
MSi GeForce GTX 670|156
Quadro K2200|156
Quadro K4100M|156
GeForce GTX 770M by Nick[D]vB|155
Tesla V100-SXM2-32GB|155
GeForce GTX 1080 OpenGL Engine|155
Gigabyte GeForce GTX 670|155
EVGA GeForce GTX 960|155
GeForce GTX 750|155
GeForce Pre-Release TITAN X (Pascal) OpenGL Engine|154
GeForce GTX TITAN Xp|154
Asus GeForce GTX 950|154
Quadro K4100M|153
GeForce GTX 960|153
GeForce GTX 770M|153
GeForce MX330|153
Quadro M2200 Mobile|153
GeForce MX250|153
GeForce Pre-Release TITAN Xp OpenGL Engine|153
Quadro P600|153
Quadro M620|152
GeForce GTX 1070 Ti OpenGL Engine|152
GeForce GTX 770|152
GeForce GT 1030|152
Tesla C2070|152
GeForce GTX 650 Ti|152
GRID K240Q|151
GeForce GTX 480 OpenGL Engine|151
GeForce GTX 750|151
GeForce GTX TITAN|151
GeForce GTX 760 (192-bit)|151
GeForce GTX 560|151
GeForce GT 1030|151
Quadro K5000M|151
Quadro P1000 Mobile|151
Zotac GeForce GTX 660|151
GeForce GTX 460 v2|150
GRID GTX P40-6|150
MSi GeForce GTX 660|149
GeForce GTX 780M|149
MSI GeForce GTX 760|149
P106-090|149
GeForce GTX 950A|149
GeForce MX150|149
Asus GeForce GTX 1060|149
Unknown|149
GeForce GTX 980 Ti|148
GRID T4-4Q|148
GeForce GTX 465|147
Colorful GeForce GTX 960|147
Gigabyte GeForce GTX 750|147
Quadro M1000M|147
GeForce GTX 780 Mac|147
GeForce GTX 460|146
MSi GeForce GTX 960|146
GeForce GTX 560|146
Quadro K4000|145
GeForce GTX 970M|145
Quadro M1000M|145
Unknown|145
GeForce GTX 980|144
GeForce GTX 950|144
GeForce GTX 675M|144
Zotac GeForce GTX 960|144
GeForce Pre-Release Graphics Device|144
GeForce GTX 670 OpenGL Engine|143
Quadro K4000|143
EVGA GeForce GTX 580|143
GeForce GTX 950M|143
GeForce GTX TITAN Black OpenGL Engine|142
GeForce GTX 760|142
Quadro 5000|142
MSI GeForce GTX 570 HD|142
GeForce Pre-Release TITAN Xp COLLECTORS EDITION OpenGL E|142
GeForce GTX 1050 OpenGL Engine|142
GeForce GTX TITAN X|142
GeForce GTX 880M|141
GV-N660OC-2GD|141
GeForce GTX 750|141
Quadro M5000M|140
GeForce GTX 970 OpenGL Engine|140
GeForce GTX 675MX|140
Asus GeForce GTX 760|140
Quadro P5000 OpenGL Engine|139
GeForce GTX 580|139
GeForce GTX 675MX|139
Zotac GeForce GTX 750|139
Quadro K1200|139
GeForce MX150|139
GeForce GTX 650 Ti|139
Quadro K1200|139
GeForce GTX 980 Ti OpenGL Engine|139
GeForce GTX 580M|138
Asus GeForce GTX 580|138
GeForce GTX 770 OpenGL Engine|138
GeForce GT 1010|138
GeForce GTX 780 Rev. 2|138
Quadro P2000 OpenGL Engine|138
GeForce MX250|138
Quadro K4000|137
GeForce GTX 460 v2|137
GeForce GTX 770M|137
Gigabyte GeForce GTX 570 HD|136
GeForce GTX 465|136
GeForce GTX 460 v2|136
GeForce GTX 670|136
GeForce GTX 590 OpenGL Engine|136
GeForce GTX 780|135
GeForce GTX TITAN Black|135
GeForce GTX 660 Ti|135
Zotac GeForce GTX 560 Ti|134
GeForce GTX 880M OpenGL Engine|134
GeForce GTX 650 Ti|134
GeForce GTX 760 OpenGL Engine|134
null Graphics Device|134
Quadro M620|133
GeForce GTX 780M Mac Edition|133
GeForce MX150|132
Asus GeForce GTX 570 HD|132
GeForce GTX 775M OpenGL Engine|132
GeForce GTX 850M|132
Asus GeForce GTX 570|132
Quadro K6000 OpenGL Engine|131
GeForce GTX 850M|131
GeForce GTX 460|131
GeForce GTX 950A|130
GeForce GTX 780M OpenGL Engine|130
Point of View GeForce GTX 660 Ti|130
GeForce GTX 775M Mac Edition|130
EVGA GeForce GTX 650 Ti|130
EVGA GeForce GTX 750 Ti|129
GeForce GTX 460|129
Quadro P520|129
Gainward GeForce GTX 570|129
Asus GeForce GTX 750 Ti|129
Quadro K3100M|128
Quadro K2200|128
Asus GeForce GTX 560 Ti|127
GeForce GTX 680|127
GeForce GTX 680 OpenGL Engine|127
GeForce GTX 950M|127
GRID V100-2B|127
Gigabyte GeForce GTX 660 Ti|127
N15E-GT|126
Quadro K1200|126
GeForce GTX 650 Ti|126
Gigabyte GeForce GTX 770|126
GeForce GTX 660|126
Quadro 5000|125
GeForce GT 1030|125
GeForce GTX 950M|125
GeForce GTX 765M|125
Quadro M5000|125
Gigabyte GeForce GTX 560 Ti|125
GeForce GTX 580M|125
Quadro M2000|124
GeForce GTX 850M|124
GeForce GTX 570 OpenGL Engine|123
Gainward GeForce GTX 750 Ti|123
Quadro K2200M|123
GeForce GTX 780M Mac Edition|123
GeForce GTX 680MX OpenGL Engine|123
Quadro K4200|123
GeForce GTX 460 OEM|122
GeForce GTX 670MX|122
MSi GeForce GTX 560 Ti|122
GeForce GTX 460 SE|122
Quadro M4000|122
GeForce GTX880M OpenGL Engine|122
Quadro P620|121
GeForce GTX 560 SE|121
GeForce GTX880M by nikey22|121
GeForce GTX 555|121
GeForce GTX 965M OpenGL Engine|121
GeForce GTX 850A|121
Quadro K5000 OpenGL Engine|120
GeForce GTX 580 OpenGL Engine|120
Quadro K3100M|120
GeForce GTX 650 Ti BOOST|119
GeForce GTX 570M|119
GeForce GTX 675MX OpenGL Engine|119
GeForce GTX 775M Mac Edition|119
Zotac GeForce GTX 1050 Ti|118
GeForce GTX 965M|117
Quadro M600M|117
GeForce GTX 780M by Nick[D]vB|117
GeForce GTX 460 SE|117
GeForce GTX 555|116
GeForce GTX 670M|116
Quadro K3000M|116
GeForce GTX 780 Ti OpenGL Engine|116
Quadro K4000M|115
GeForce GTX 860M|115
Asus GeForce GTX 660|115
Tesla C2075|114
GeForce GTX 675MX Mac Edition|114
Zotac GeForce GTX 770|114
Gigabyte GeForce GTX 750 Ti|114
GeForce MX330|114
GeForce GT 1030|113
GeForce GTX TITAN OpenGL Engine|113
GeForce GTX 590|113
Quadro K620|113
GeForce GTX 780M|112
GeForce GTX 560 Ti|112
Quadro 6000|112
EVGA GeForce GTX 560 Ti|112
Asus GeForce GTX 960|112
Quadro K5000|112
Point of View GeForce GTX 470|111
PNY GeForce GTX 580|111
GeForce GTX 770M|111
GeForce GT 120|111
MSi GeForce GTX 660|111
Gigabyte GeForce GTX 560|111
GeForce GTX 680MX|110
GeForce 945M|110
GeForce GTX 765M|110
GeForce GTX 950 OpenGL Engine|110
GeForce Pre-Release Tesla C2075 OpenGL Engine|109
GeForce GTX 550 Ti|109
GeForce GTX 765M|108
PNY GeForce GTX 750|108
GeForce GTX 560 Ti 448 Cores|108
Quadro P500|108
GeForce GTX 670MX|108
GeForce GTX 680MX|107
GeForce GTX 460 SE|107
GeForce GTX 675MX Mac Edition|107
GeForce GTX 770M OpenGL Engine|107
GeForce 945M|107
GeForce GTX 675MX|107
PNY GeForce GTX 570 HD|106
GeForce GTX 745|106
GeForce MX230|106
GeForce GTX 670MX|106
GeForce 845M|106
Quadro K3100M OpenGL Engine|105
Quadro P2000|105
GeForce MX570 A|105
GeForce GTX 750 Ti|104
GeForce GTX 660 OEM|104
Quadro M600M|104
GeForce GTX 750|104
GeForce GTX 645|104
GP108|104
Quadro P520|104
Zotac GeForce GTX 460|103
Chip Model|103
GeForce GTX 670M|103
Quadro T1000|103
GeForce GTX 670M|103
GeForce GTX 650|103
Zotac GeForce GTX 750|102
GeForce GTX 460 OpenGL Engine|102
GeForce GTX 860M OpenGL Engine|102
Quadro 4000|102
Asus GeForce GTX 480|102
Zotac GeForce GTX 650 Ti|102
GeForce GT 755M|101
GF100 Board - 10220000|101
GeForce GTX 470M|101
GeForce GTX 570 Rev. 2|101
GeForce GTX 775M by iDopt Mac|101
GeForce GTX 765M by Nick[D]vB|101
GeForce GTX 570|101
GeForce GTX 645|101
GeForce GTX 550 Ti|100
GeForce GTX 760M|100
GeForce GT 1030 OpenGL Engine|100
GeForce GTX 650|100
Quadro P400|100
GeForce GTX 480|99
EVGA GeForce GTX 650|99
EVGA GeForce GTX 560|99
GeForce MX130|99
GeForce MX130|98
Asus GeForce GTX 460|98
Elitegroup GeForce GTX 460|98
Tesla V100-SXM2-32GB|98
GeForce GT 755M|98
GeForce GTX 760 Ti OpenGL Engine|98
Quadro P520|97
GeForce GT 755M Mac Edition|97
GeForce GTX 1060 5GB|97
Palit GeForce GTX 650 Ti|97
MSi GeForce GTX 460|96
GeForce GTX 650|96
Gigabyte GeForce GTX 580|96
Gigabyte GeForce GTX 460|96
GeForce GTX 745|96
EVGA GeForce GTX 550 Ti|96
GeForce GTX 465|96
GeForce GTX 460 SE|96
GeForce GTX 765M|96
GeForce GT 755M Mac Edition|96
Quadro M520|95
Quadro K620|95
T1000|95
GeForce GTX 745|95
Quadro K620|95
GeForce GT 755M|94
GeForce GTX 660 Ti OpenGL Engine|94
Quadro K3000M|94
Quadro K4000|94
Quadro K4000 OpenGL Engine|94
GeForce GTX 560|94
GeForce GTX 650 Ti OpenGL Engine|94
Zotac GeForce GTX 560|94
Asus GeForce GTX 560|93
GeForce GTX 650 Ti|93
GeForce GPU|92
GeForce GTX 460|92
MSi GeForce GTX 650 Ti|92
GeForce GTX 645|92
Gigabyte GeForce GTX 760|92
GeForce GTX 660M|92
GeForce GTS 450|92
GeForce GTX 765M|92
Quadro K2000D|92
Quadro K2000|91
GeForce GT 740|91
GeForce GTX 650|91
GRID M6-0B|91
HP Quadro K620|91
GeForce MX130|91
Quadro K3000M by ST3PHL3|91
Quadro 4000|90
GeForce MX230|90
Quadro K620|90
Quadro K2100M by Nick[D]vB|90
Quadro K3000M by nikey22|89
GeForce GT 650M OpenGL Engine|89
Quadro 4000|89
Quadro K3000M|88
GeForce GTX 660M|88
Quadro K6000|87
GeForce GT 755M Mac Edition|87
Palit GeForce GTX 650|87
Quadro P500|87
GeForce GTX 570M|86
Gainward GeForce GTX 460|86
GeForce GTX 950M|86
Quadro K2000D|86
GeForce GTX 650 Ti BOOST|86
Quadro K2100M|86
GeForce GTX 470|85
Quadro K2000|85
Quadro K2000|85
GeForce GT 750M Mac Edition|85
GeForce GTX 745|85
GRID K220Q|85
GeForce GTX 750 OpenGL Engine|85
Quadro 5000M|84
Quadro P400|84
GeForce GTS 450|84
GeForce GT 640 Rev. 2|84
GeForce GTX 660M Mac Edition|84
Quadro P400|84
Asus GeForce GTX 560 SE|84
PNY GeForce GTX 460|83
GeForce GT 640 Rev. 2|83
GeForce GTS 450 Rev. 2|83
GeForce GTS 450|83
GeForce GTS 450 Rev. 2|83
GeForce GTX 645|82
GeForce GPU|82
GeForce GTX 560M|82
Quadro K3000M|82
Quadro K2100M by nikey22|82
Gigabyte GeForce GTX 750|82
GeForce GT 740|82
GeForce GT 750M Mac Edition|82
GeForce GTX 765M OpenGL Engine|82
GeForce GTX 645 OpenGL Engine|82
Quadro K620|81
GeForce GTX 550 Ti OpenGL Engine|81
Quadro 4000M|81
PNY GeForce GTX 550 Ti|81
GeForce MX110|80
GeForce GTX 760M|80
MSi GeForce GTX 745|80
Quadro K2100M OpenGL Engine|80
Quadro K2000|80
Quadro 5000|80
Quadro K620 OpenGL Engine|80
MSi GeForce GTX 745|80
GeForce GT 755M OpenGL Engine|80
GeForce GTX 660M|79
Gigabyte GeForce GTX 550 Ti|79
MSi GeForce GTX 650|79
GeForce GTX 560M|79
Quadro P400|78
Quadro K2100M|78
Quadro K2100M|78
Zotac GeForce GTX 1050 Ti|78
Quadro 3000M|77
GeForce 940A|77
GeForce GTX 460M|77
GeForce GTX 550 Ti|77
GeForce GT 545|77
GeForce GT 650M Mac Edition|77
GeForce 940MX|76
GeForce GTX 650 OEM|76
GeForce GTX 550 Ti|76
GeForce GT 755M Mac Edition|76
GeForce GT 740 OpenGL Engine|75
Gainward GeForce GTX 550 Ti|75
Quadro K1200|75
GeForce GT 650M Mac Edition|75
EVGA GeForce GTX 650|75
GeForce GT 750M Mac Edition|74
GeForce GTX 745|73
GeForce GTX 555|73
GeForce GTX 650|73
Gainward GeForce GTS 450|73
GeForce GT 650M|73
GeForce GT 755M Mac Edition|73
GeForce GTX 460M|72
GeForce 930A|72
GeForce 930MX|72
GeForce 940MX|72
GeForce MX110|72
GeForce GT 750M Mac Edition|72
Quadro 2000|72
GeForce 845M|71
Quadro 2000D|71
GeForce GT 640 Rev. 2|71
GeForce MX110|71
GeForce GT 1010|71
GeForce GT 545|71
Quadro K1200 OpenGL Engine|71
GeForce 940MX|71
GeForce GTX 650 OpenGL Engine|71
EVGA GeForce GTX 650 Ti BOOST|71
Quadro K2100M|70
GeForce GT 1010|70
Quadro M500M|70
GeForce GT 650M Mac Edition|70
GeForce GT 640 OEM|70
Quadro K2000D|70
Quadro K2000 OpenGL Engine|70
GeForce GT 750M Mac Edition|70
GeForce GT 650M|69
Quadro K1100M by Nick[D]vB|69
GeForce GT 650M|69
GeForce 940M|69
GeForce GT 650M|69
Quadro 4000|69
GeForce GT 650M Mac Edition|69
GeForce GT 745M|69
Gainward GeForce GTX 560 Ti|68
GeForce 920MX|68
Quadro M520|68
GeForce GT 640|68
GeForce 840M|68
GeForce 9800 GTX / 9800 GTX+|68
GeForce GTX 770M by Nick[D]vB|67
Zotac GeForce GTX 650|67
Asus GeForce GTX 550 Ti|67
GeForce GT 750M|67
Quadro K3100M by nikey22|67
GeForce GT 750M|67
GeForce GTX 760 (192-bit) OpenGL Engine|67
HP Quadro 4000|67
Quadro K2000|67
GeForce GTS 450 Rev. 2|67
GeForce 930MX|67
GeForce GTX 660M Mac Edition|66
GeForce GTX 570|66
GeForce GT 750M|66
GeForce GT 650M Mac Edition|66
GeForce GT 650M OpenGL Engine|65
GeForce GTX 660M OpenGL Engine|65
GeForce 930M|65
Palit GeForce GTX 650|65
GeForce GTX 760M|65
GeForce GT 650M Mac Edition|65
GeForce 940M|65
GeForce GT 750M Mac Edition|64
GeForce 940M|64
GeForce GT 740|63
GeForce 930MX|63
Quadro 3000M|63
GeForce GT 730|63
Quadro K1100M|63
GeForce GT 750M|63
GeForce 840M|63
GeForce GT 640 OEM|63
GeForce 840M|63
GeForce GT 640 Rev. 2|62
GeForce GTS 450|62
Quadro 2000|62
GeForce GT 745M|62
GeForce GT 740|62
GeForce GT 640|62
Quadro 2000|62
GeForce GTX 660M Mac Edition|62
Quadro K1100M OpenGL Engine|62
Quadro K2000M|62
GeForce GTX 680MX OpenGL Engine|61
EVGA GeForce GT 730|61
Quadro 2000D|61
GeForce 840A|61
MSi GeForce GTX 660 Ti|61
Quadro K1100M|61
GeForce GT 645M|61
GeForce GTX 780M OpenGL Engine|61
HP GeForce GT 730|61
Quadro K5000M OpenGL Engine|61
EVGA GeForce GT 640|61
GeForce 920MX|60
Quadro M500M|60
Quadro K620M|60
GeForce 930M|60
GeForce 930A|60
GeForce GT 640 OEM|60
GeForce GT 640|60
Quadro 2000M|60
GeForce GT 640|60
GeForce GT 640M Mac Edition|60
GeForce GT 640M Mac Edition|60
GeForce GT 640M Mac Edition|59
GeForce GT 645M|59
GeForce 930M|59
Gigabyte GeForce GTX 650 Ti|59
GeForce GT 640 OEM|59
GeForce 830M|59
Asus GeForce GT 640|58
MSI GeForce GTX 1070|58
GeForce GT 555M|58
Quadro K2000M|58
Quadro K1100M|57
GeForce GT 650M Mac Edition|57
Quadro K2000M by Nick[D]vB|57
EVGA GeForce GTX 650 Ti|57
GeForce GT 640M|56
GeForce GT 650M Mac Edition|56
GeForce GT 445M|56
GeForce 830A|56
GeForce 9800 GT|56
Asus GeForce GTS 450|55
GeForce 830M|55
GeForce 920MX|55
Quadro 2000|55
EVGA GeForce GT 545|54
Quadro K2000M|54
GeForce GT 650M Mac Edition|54
GeForce GTX 280|54
GeForce GT 640|53
Quadro FX 2800M|53
Quadro 3000M OpenGL Engine|53
GeForce GT 740|53
null GeForce 920A|53
GeForce GT 640M Mac Edition|52
GeForce GT 635|52
Graphics Device|52
GeForce GT 640M|52
GeForce GTX 660M Mac Edition|52
Quadro 2000M|52
Quadro 5010M|52
GeForce GTS 250|52
GeForce GT 445M|51
GeForce GT 640M OpenGL Engine|51
GeForce GT 640M|50
EVGA GeForce GT 740|50
GeForce GT 640M Mac Edition|50
GeForce 730A|50
GeForce 920M|49
HP Quadro 2000|49
GeForce GT 730M|49
null GeForce 920A|49
GeForce GT 555M|49
GeForce GT 640M LE|49
GeForce GT 730M|49
GeForce GT 730M|48
GeForce GT 640M Mac Edition|48
Quadro K2000M OpenGL Engine|48
GeForce GT 640M LE|48
GeForce GT 740M|47
GeForce GTX 460M|47
GeForce GT 440|47
GeForce GT 440|46
GeForce GT 640M Mac Edition|46
Quadro P400|46
GeForce GT 730|46
Dell Quadro 2000M|45
GeForce GT 740M|45
GeForce GT 740M|45
GeForce GTS 450 Rev. 2|45
GeForce 920M|45
GeForce 920M|45
GeForce 910M|44
GeForce GTX 680M|44
GeForce GT 730|44
Quadro 2000M|44
GeForce GT 635|43
GeForce GT 720 OpenGL Engine|43
GeForce GT 635|43
Quadro K5200 OpenGL Engine|43
Zotac GeForce GTX 650|43
GeForce GT 440|43
GeForce GT 435M|42
GeForce GT 735M|42
Gainward GeForce GT 630|42
Quadro 1000M|42
GeForce 820M|41
GeForce GTX 680M OpenGL Engine|41
MSI GeForce GT 635|41
GeForce 820A|41
Tesla M10|41
Asus GeForce GT 440|40
Asus GeForce GT 630|40
GeForce GT 820M|40
GeForce 910M|40
GeForce GT 820M|40
GeForce GT 730|40
GeForce GT 550M|40
GeForce GT 430|40
GeForce GT 540M|39
Asus GeForce GT 720|39
GeForce GT 630|39
GeForce GT 530|39
GeForce GT 635M|39
GeForce GT 620M/630M/635M/640M LE|39
NVS 5400M|39
Quadro K600|39
Quadro K610M|39
Asus GeForce GT 730|39
GeForce GT 630|39
GeForce GT 440|39
GeForce GT 630M|38
GeForce 820M|38
Quadro K420|38
Quadro K610M|38
GeForce GT 625M|38
Quadro K1000M|38
NVS 5200M|38
GRID K1|38
Quadro K600|38
Quadro K420|38
GeForce GT 630|38
Quadro K600|37
Quadro 600|37
HP Quadro 600|37
Quadro K1000M|37
Quadro K610M|37
GRID K180Q|37
GRID K160Q|37
GeForce GT 635M|37
Gigabyte GeForce GT 440|37
GeForce 820M|37
GeForce GT 530|37
GeForce GT 540M|37
GeForce GT 630 OEM|37
Quadro K610M by Nick[D]vB|37
NVS 510|37
GeForce GT 630M|37
Quadro 1000M|37
GeForce GT 540M|37
GeForce GT 530|37
Quadro K1100M|37
Quadro K620M|37
Quadro 1000M|36
GeForce GT 730|36
GeForce 820M|36
GeForce GT 430|36
GRID K1|36
GeForce GT 525M|36
NVS 5200M|36
NVS 510|36
Zotac GeForce GT 430|36
Quadro K600|36
Asus GeForce GT 730|36
HP Quadro K4000|35
GeForce GT 755M Mac Edition|35
GeForce GT 630|35
NVS 5400M|35
NVS 5400M|35
GeForce GT 640 OpenGL Engine|35
GeForce GT 625M|35
GeForce GT 630|35
GeForce GT 430|35
Quadro K600 OpenGL Engine|35
Quadro K1000M|35
Zotac GeForce GT 630|35
Gigabyte GeForce GT 630|35
GRID K140Q vGPU|35
GeForce GT 710M|35
GeForce GT 620M|35
GeForce GT 720M|34
GeForce 710M|34
Quadro 1000M,|34
Quadro K510M|34
GeForce 9400 GT|34
Quadro K1000M|34
GeForce GT 635M|34
Quadro K420|34
GRID K180Q|34
Asus GeForce GT 430|34
Quadro K4100M|34
Gigabyte GeForce GT 730|34
GeForce GT 620M|34
GeForce GT 525M|34
Quadro K420|34
Dell NVS 5200M|34
GeForce 710A|34
GeForce GT 425M|33
GeForce GT 710B|33
GeForce GT 525M|33
Quadro 600|33
GeForce GT 620M|33
Quadro K600|33
Quadro 600|33
GeForce 610M/710M/810M/820M / GT 620M/625M/630M/720M|33
MSI GeForce GT 730|33
GeForce GT 710|33
GeForce GT 435M|33
NVS 510|33
Asus GeForce GT 710|33
NVS 510|32
GeForce 710M|32
GeForce GT 720M|32
GeForce GT 730A|32
GeForce GT 710M|32
GIGABYTE GeForce GTX 660|31
EVGA GeForce GT 710|31
GeForce GT 710|31
GeForce GT 710|31
GeForce GT 425M|31
GeForce GT 720|31
EVGA GeForce GT 710|31
Quadro K1000M by Nick[D]vB|31
Asus GeForce GT 710|31
GeForce GT 720|31
GeForce GT 420M|30
GeForce GT 710|30
null Graphics Device|30
GeForce GT 240|30
GeForce 810M|29
GeForce GT 720M|29
GeForce GT 710|29
Quadro 600|29
GeForce 810M|29
GeForce GT 420M|28
Quadro 410|28
GeForce GTX 660M|28
MSI GeForce GT 710|28
GeForce GT 720|28
GeForce GT 735M|27
GeForce GT 720|27
GeForce GT 720|27
GeForce GT 630 OpenGL Engine|27
Quadro 410|27
GeForce GT 330M|26
GeForce GT 420M|26
GeForce GT 430|26
GeForce 615|25
GeForce GTX 760A|25
Toshiba GeForce GT 525M|25
GeForce GT 520MX|25
GeForce GT 620|25
GeForce GT 625|25
GeForce GT 710|24
Quadro NVS 4200M|24
GeForce 840A|24
GeForce 610M|24
GeForce 800M|24
GeForce GT 420|24
GeForce 705M|23
GeForce GT 705|23
GeForce 800M|23
GeForce 610M|23
GeForce GT 620 OEM|23
GeForce GT 625|23
GeForce GT 420|23
Quadro NVS 4200M|23
GeForce GT 520M|22
NVS 4200M|22
GeForce GT 620 OEM|22
NVS 5200M|22
GeForce GT 620 OEM|22
GeForce GT 620|22
GeForce GT 705|21
GeForce GT 620|21
GeForce GT 630 Rev. 2|21
Quadro NVS 4200M|21
GeForce GT 520M|20
GTX 980M SLI|20
GeForce GT 620|20
GeForce GT 520M|20
GeForce GT 520|19
GeForce 410M|19
GeForce 730A|19
GeForce GT 520|19
GeForce GT 610|19
Asus GeForce GT 610|19
NVS 310|18
GeForce 410M|18
NVS 315|18
GeForce 605|18
GeForce GT 610|18
GeForce GT 520|17
GeForce MX550|17
NVS 4200M|17
NVS 315|17
NVS 310|17
GeForce 410M|17
Palit GeForce GTX 660|17
GeForce 605|17
NVS 310|17
GeForce GT 415M|17
Zotac GeForce GT 610|17
GeForce GTX 675M|17
GeForce GT 610|16
Quadro 4000M|16
PNY GeForce GT 610|16
GeForce GT 610|16
GeForce 510|15
MSi GeForce GT 610|15
GeForce GT 735M|15
GeForce GT 520|15
GeForce 510|15
GeForce GT 320M|14
GeForce 9600M GT|14
GeForce GTX 570M|14
Corporation D3D12 (NVIDIA GeForce RTX 3080 Ti)|13
GeForce 510|13
Quadro FX 1800M|12
Asus GeForce GT 520|12
GeForce GT 705|12
MSi GeForce GT 630|11
Quadro 3000M|10
Gigabyte GeForce GT 610|10
Pegatron GeForce GT 420|9
GeForce 210|8
GeForce 9300 / nForce 730i|7
NVS 3100M|7
GeForce 8600 GT|5
GeForce 8400 GS Rev. 3|4
GeForce 8400 GS|3
GeForce 9600 GT|2
GeForce GT 550M|-1
GeForce 8600 GTS|-1
GeForce GT 520MX|-1
EVGA GeForce GTX 460|-1
EVGA GeForce GTX 970|-1
GP106|-1
GRID P4-2B|-1
Gainward GeForce GTX 650|-1
GeForce 210|-1
GeForce 310|-1
GeForce 310M|-1
GeForce 315|-1
GeForce 315M|-1
GeForce 320M|-1
GeForce 405|-1
GeForce 610M|-1
GeForce 820A|-1
GeForce 8300 GS|-1
GeForce 8400 GS|-1
GeForce 8400 GS Rev. 2|-1
GeForce 8400 GS Rev. 3|-1
GeForce 8400M GS|-1
GeForce 8400M GT|-1
GeForce 8500 GT|-1
GeForce 8600 GT|-1
GeForce 8600M GS|-1
GeForce 8600M GT|-1
GeForce 8700M GT|-1
GeForce 8800 GT|-1
GeForce 8800 GTS|-1
GeForce 8800 GTS 512|-1
GeForce 8800 GTX|-1
GeForce 8800M GTX|-1
GeForce 9200M GE|-1
GeForce 9200M GS|-1
GeForce 9300 / nForce 730i|-1
GeForce 9300 GE|-1
GeForce 9300 GS|-1
GeForce 9300M GS|-1
GeForce 9400|-1
GeForce 9400M|-1
GeForce 9500 GT|-1
GeForce 9500M GS|-1
GeForce 9600 GS|-1
GeForce 9600 GSO|-1
GeForce 9600 GSO 512|-1
GeForce 9600 GT|-1
GeForce 9600M GS|-1
GeForce 9600M GT|-1
GeForce 9600M GT / GeForce GT 220M|-1
GeForce 9800 GT|-1
GeForce 9800 GTX+|-1
GeForce 9800 GTX/9800 GTX+|-1
GeForce 9800M GTS|-1
GeForce G 103M|-1
GeForce G 105M|-1
GeForce G105M|-1
GeForce G205M|-1
GeForce G210|-1
GeForce G210M|-1
GeForce GT 120|-1
GeForce GT 120M|-1
GeForce GT 130|-1
GeForce GT 130M|-1
GeForce GT 220|-1
GeForce GT 220M|-1
GeForce GT 230|-1
GeForce GT 230M|-1
GeForce GT 240|-1
GeForce GT 240M|-1
GeForce GT 240M|-1
GeForce GT 320|-1
GeForce GT 320M|-1
GeForce GT 325M|-1
GeForce GT 330|-1
GeForce GT 330M|-1
GeForce GT 335M|-1
GeForce GT 435M|-1
GeForce GT 520M|-1
GeForce GT 525M|-1
GeForce GT 555M/635M|-1
GeForce GTS 240|-1
GeForce GTS 250|-1
GeForce GTS 360M|-1
GeForce GTX 1180|-1
GeForce GTX 260|-1
GeForce GTX 260M|-1
GeForce GTX 275|-1
GeForce GTX 280|-1
GeForce GTX 285|-1
GeForce GTX 295|-1
GeForce GTX 560 SE|-1
GeForce GTX 750 v2|-1
GeForce RTX T10-16|-1
GeForce RTX T10-8|-1
Gigabyte GeForce GTX 1050 Ti|-1
ION|-1
MSI GeForce GT 710|-1
NVS 300|-1
NVS 3100M|-1
NVS 4200M|-1
NVS 5100M|-1
Palit GTX 680 JetStream|-1
Quadro FX 1700|-1
Quadro FX 1700M|-1
Quadro FX 1800|-1
Quadro FX 1800M|-1
Quadro FX 2700M|-1
Quadro FX 2800M|-1
Quadro FX 3600M|-1
Quadro FX 360M|-1
Quadro FX 370|-1
Quadro FX 3700|-1
Quadro FX 3700M|-1
Quadro FX 380 LP|-1
Quadro FX 3800|-1
Quadro FX 3800M|-1
Quadro FX 4600|-1
Quadro FX 4800|-1
Quadro FX 4800|-1
Quadro FX 5600|-1
Quadro FX 570M|-1
Quadro FX 580|-1
Quadro FX 770M|-1
Quadro FX 880M|-1
Quadro K1100M by Nick[D]vB|-1
Quadro K2000D|-1
Quadro K2000M|-1
Quadro K2100M by Nick[D]vB|-1
Quadro NVS 135M|-1
Quadro NVS 140M|-1
Quadro NVS 160M|-1
Quadro NVS 290|-1
Quadro NVS 295|-1
Quadro NVS 4200M|-1
Quadro P4000 OpenGL Engine|-1
Sony GeForce 410M|-1
Zotac GeForce GTX 780|-1
`;
function cJn() {
  return uJn;
}
const dJn = `
Radeon RX 7900 XT|2202
Radeon RX 7900 XT|1968
RX 6800 XT|1957
Radeon RX 6900 XT (XTXH)|1930
Radeon RX 6900XT|1925
Radeon PRO W6900X|1889
RX 6900 XT|1852
Radeon RX 6900|1814
Radeon RX 7900 XTX|1773
RX6800|1695
FreddyVGA|1603
Radeon PRO W6800|1564
Radeon RX 7900 XTX|1437
Radeon RX 6950 XT|1376
Radeon RX 6800 XT|1358
Radeon RX 6750 XT|1310
Radeon(TM) RX 6850M XT|1294
Radeon RX 6700|1285
Radeon RX 6900 XT|1269
Sapphire Nitro+ RX 6800|1262
Radeon PRO W6800X|1255
Radeon PRO W6800X Duo|1218
Radeon RX 6700|1214
Radeon RX 6800 XT|1183
Sapphire Nitro Radeon RX6650XT|1180
Radeon(TM) RX 6750 XT|1166
Radeon RX 6800|1163
Radeon RX 6900 XT|1162
ASRock RX 6650 XT Phantom Gaming|1161
Radeon Navi23|1139
Radeon RX 6650 XT|1132
Radeon RX 6950 XT|1130
Radeon 6800|1121
Radeon RX 6700 XT|1110
Radeon Pro W6600X|1101
Radeon RX 6700M|1081
Radeon RX 6800M|1078
Radeon RX 5700 XT PJM|1060
Radeon RX 6800|1054
Radeon RX 6600 XT|1037
Radeon RX 6600 XT|1031
ASUS RX 6600XT macOS Edition|1021
Radeon RX 6800M|1016
Radeon Pro Vega II Duo|1015
Radeon RX 5700 Series|961
Radeon RX 6800/6800 XT / 6900 XT|961
Radeon RX 6600 XT|958
Radeon Pro Vega II|956
Radeon RX 6650 XT|951
Navi 10 5700 XT|947
Radeon Pro Vega II|947
Radeon RX 5700 Series|946
Radeon Pro W5700X|934
Radeon RX 6600|929
ASUS Radeon RX 5700 XT|926
Radeon Pro W5700X|917
Radeon Pro 5700 XT|917
Radeon RX 6900 XT|915
Radeon RX 5700 XT|911
Radeon Pro W5700|895
Radeon RX 6600/6600 XT/6600M|889
Radeon RX 6750 XT|883
Radeon RX 6600|874
Radeon RX 5700|855
Radeon RX 5700 XT 50th Anniversary|854
Radeon VII|851
Radeon RX 5700 XT 50th Anniversary|845
Radeon PRO W6800|837
Radeon Pro Vega 64|824
Radeon Navi10|822
Radeon RX 5600 XT|816
Radeon RX 6600M|803
Radeon RX 6800S|791
Radeon Pro 5700 XT|781
Radeon RX Vega 64 8GB|775
Radeon Pro 5700|768
Radeon Vega Frontier Edition|767
Radeon RX Vega|766
Radeon RX Vega 56/64|765
Radeon(TM) RX Vega|756
Radeon Pro Vega 64X|745
Radeon RX 5600 XT|744
Radeon PRO W6600|744
Radeon Vega 64 LC|735
Radeon RX Vega 64.1|732
Radeon RX 6600M|728
Radeon Pro 5700|714
Radeon Vega Frontier Edition|707
Radeon Vega Frontier|704
Radeon Vega FE|701
Radeon RX 5700 XT|691
Radeon Pro Vega 64|673
Radeon Vega 64|667
Radeon VII|663
Radeon Pro WX9100|656
Sapphire Radeon RX Vega 64 8GB|654
Radeon(TM) PRO W6600M|654
Radeon RX 5700 XT 50th Anniversary|652
Radeon RX 5700|640
Radeon Pro W5700|640
Radeon(TM) Pro WX 9100|635
Radeon RX Vega 56|628
Radeon RX Vega 56|623
Radeon Pro 5500 XT|622
Radeon RX 5600 OEM/5600 XT / 5700/5700 XT|621
Radeon RX 5500|618
Radeon RX 5500 XT|617
Radeon Vega Frontier Edition|617
Radeon RX 5500M Series|613
RX xxx|613
Radeon Pro Vega 64X|611
Radeon RX Vega 64|610
Radeon RX 5600 XT|610
Radeon Pro Vega 64|605
Radeon RX 6500 XT|603
Radeon Vega|602
Radeon Pro W5500|601
Radeon RX 5600M|600
Radeon Pro Vega 56|598
Radeon Pro Vega 64|594
Radeon Pro 5600M|593
Radeon Pro Vega 48|592
Radeon Pro Vega II Duo|590
Radeon RX 590 Series|589
Radeon RX Vega 56 8GB|589
Radeon Pro 5600M|589
Radeon Pro WX 9100|588
Radeon Pro 5300|584
Radeon(TM) R9 Fury Series|579
Radeon RX 6800 XT 16GB|567
Radeon Pro 5600M|567
Radeon Pro W5500X|564
Radeon(TM) RX 5500M|559
Radeon HD 7870|556
Radeon Pro W5500|554
Radeon RX 5500M|550
Radeon R9 290X Series|549
66AF:F0|548
Radeon Pro 5500 XT|547
Radeon RX 580 Series|547
Radeon RX 5500XT|547
Radeon(TM) RX 580X|546
Radeon Pro 5500 XT|545
Radeon(TM) Pro W5500M|544
Radeon Pro W5500X|544
Radeon Pro W5500|541
RadeonT RX 5300|537
Radeon(TM) RX 570 Graphics|524
Radeon Pro 5300|522
Radeon(TM) RX 6500M|521
Radeon RX Vega M GL|520
ASUS Radeon RX 570 Series|519
ASUS Radeon RX 580 Series|518
Radeon(TM) RX 580|518
Radeon(TM) Pro V7350x2|518
Radeon(TM) RX 480 Graphics|516
Radeon(TM) RX 570 Graphics|515
Radeon RX 6400|513
Radeon Pro 580X|513
Radeon(TM) R9 390 Series|503
Radeon Pro 5300|500
Radeon RX 580 2048SP|500
Radeon PRO W6400|500
Radeon RX 570 Series|499
Radeon PRO W6800X Duo|497
Radeon Pro 580|494
Radeon RX 5500 XT|493
Radeon RX 6400|487
Radeon Pro 580|485
Radeon(TM) Pro WX 7100 Graphics|485
Radeon(TM) R9 290X|478
Sapphire Radeon RX 580 Pulse|477
Radeon RX 6700/6700 XT / 6800M|476
Radeon(TM) RX 580|475
Radeon RX 6700S|475
Radeon R9 290X|470
Radeon(TM) RX 470 Graphics|469
Radeon R9 FURY / NANO Series|468
Radeon Embedded E9560|467
Kamen Rider Black RX|466
Radeon(TM) E9550|464
Radeon(TM) RX 580 Graphics|463
Radeon RX Vega 56/64|463
Radeon(TM) RX 480|462
Radeon RX 6800 XT|462
Radeon RX 470 Series|461
Radeon RX480|456
66AF:F1|455
Radeon Pro 480/575|455
Radeon Embedded E9560|450
Radeon FURY|450
Radeon RX 5600 OEM/5600 XT / 5700/5700 XT|447
Radeon RX 6600 XT|446
Radeon HD 6800 Series|445
Radeon Pro 570X|444
Radeon(TM) RX 470 Graphics|443
Radeon Pro 575X|443
Radeon RX 470/480/570/570X/580/580X/590|443
Radeon RX 6600|443
Radeon RX Vega M GH Graphics|441
RX 580|440
Radeon RX 570|440
Radeon Pro 570|440
Radeon RX 590|437
Radeon(TM) RX 470 Series|435
Radeon RX 6900 XT|435
Radeon FURY X|434
RX 590|431
Radeon Pro 5500M|430
???|430
Radeon(TM) RX 570|430
Radeon RX 580|429
Radeon HD 8xxx|426
Radeon R9 290|425
Radeon Pro 5500M|420
Radeon Pro 580X|420
Radeon RX 6700 XT|420
Radeon RX 480|419
Radeon R9 290/390|418
Radeon Pro 580X|416
Radeon(TM) Pro Duo|414
Ellesmere Radeon RX 570|411
Radeon R9-290X|411
Radeon Pro 580|411
Radeon R9 200 Series|406
Radeon RX 570|406
Radeon Pro 470/570|404
Radeon RX 6800M|404
Radeon RX 5300M|400
Radeon RX 580 Series (POLARIS10, DRM 3.40.0, 5.11.9-141-tkg-pds, LLVM 11.1.0)|399
Radeon Pro 5300M|399
Radeon R9 285|398
Radeon RX 470|393
Radeon Pro 575|392
Radeon Pro 575X|391
Radeon Pro WX 7100|387
Radeon RX 6700M|386
Radeon RX 470/480/570/570X/580/580X/590|382
Radeon PRO W6600|376
Radeon Polaris|374
Radeon RX 6500 XT|374
Radeon Pro Vega 20|371
Radeon HD 7970|370
Radeon Pro Vega 16|370
Radeon RX 6800|369
Radeon Pro Vega 64 OpenGL Engine|369
Radeon(TM) R9 380 Series|367
Radeon RX 5700XT|366
FirePro W8100|366
Radeon Pro Vega 64|365
Radeon Pro 570|365
Radeon Pro 570X|363
Radeon Pro Vega 64 OpenGL Engine|362
Radeon R9 280x|362
Radeon R9 380|362
Radeon R9 280x|361
Radeon R9 280x|360
Radeon Pro Vega 56|360
R9 280X Dual-X|359
Radeon Pro Vega 56 OpenGL Engine|356
Radeon HD 7970|355
Radeon HD 7970X/8970/R9 280X|354
Radeon R9 285|353
Radeon R9 380X|352
Radeon RX 480|352
Radeon RX 5700 XT Series|350
ASUS Radeon RX 470 Series|350
Radeon Pro Vega 64|349
Radeon R9 200 / HD 7900 Series|346
ASUS Radeon RX 470 Series|346
Radeon Vega 56|346
Radeon RX 580 Series (AMD POLARIS10 / DRM 3.15.0 / 4.12.0-1-amd64, LLVM 4.0.1)|343
Radeon Pro Vega 20|343
R9 380|341
Radeon HD 7970|338
Radeon RX 5700 XT|336
Radeon D700|336
Asus Radeon R9 280|334
Radeon R9 285|334
Radeon R9 M395X|332
Radeon RX 5600 XT|332
PowerColor Radeon R9 280|330
Radeon R9 280|329
FirePro W7100 Graphics Adapter|328
Radeon R9 M295X Mac Edition|327
ASUS Radeon RX 5700|327
Radeon R9 380|326
Radeon Pro Vega 16|325
Radeon R9 290X|325
Radeon RX5600|324
ASUS Radeon RX 5500 XT|323
Radeon R9 280|323
Radeon HD 7950/8950 / R9 280|321
Radeon R9 M395|319
Radeon RX 6800/6800 XT / 6900 XT|318
FirePro D700 (FireGL V)|318
Radeon RX 5500/5500M / Pro 5500M|318
MSI Radeon RX 6600 XT Gaming X|318
FirePro W8000|315
Radeon HD 7950|315
Radeon Pro W5700|315
FirePro W7170M|314
Radeon PRO W6800|314
Radeon RX 5500|313
Radeon RX 580 Special Edition|312
RadeonT RX 5500M|311
Radeon R9 M395 (Bootcamp XG edition by bootcampdrivers.com)|311
Radeon R9 360|309
Radeon Pro WX 7100|307
Radeon Pro WX 7100 Mobile|307
Radeon RX 5700 XT 50th Anniversary|307
R9 xxx|303
Radeon RX 5700XT|302
Radeon PRO W6400|301
Radeon(TM) R9 370 Series|301
Radeon RX 470/480/570/570X/580/580X/590|300
Radeon(TM) PRO W6600M|298
Radeon HD 8950|298
Radeon R9 M395X|297
Radeon R9 M395X|296
RX Vega 64|296
Radeon RX Vega 11 Graphics|295
Radeon Pro 270X|294
Radeon RX 580 2048SP|290
Radeon HD 7950|290
Video Controller (VGA Compatible)|290
Radeon(TM) R7 370 Series Graphics|290
Radeon HD 7950|290
Asus Radeon R9 270X|289
Radeon RX 580X Series|288
Radeon(TM) RX 5500M|285
Radeon R9 270X|285
RX xxx|285
ASUS R7 265 Series|281
Radeon(TM) R9 270|280
731F:C1|280
Radeon R9 M395X|279
Radeon(TM) R7 370 Series|279
Radeon Pro V520 MxGPU|278
Radeon R9 M395|277
FirePro D700|277
Radeon R9 270X|277
Radeon(TM) R9 200 Series|276
Radeon RX 5700|275
Radeong 0.4 on AMD POLARIS10 (DRM 3.8.0 / 4.9.11-1-ARCH, LLVM 3.9.1)|274
Radeon HD 7870 XT|274
Radeon R9 390X|272
Radeon(TM) RX 570 Graphics|272
Radeon HD 7870 GHz Edition|271
Radeon R9 390|270
FirePro D700|269
Radeon R9 M395|268
Radeon R9 270|268
Radeon RX 5700 / 5700 XT|267
ASUS R7 370 Series|267
FirePro W7000|266
Radeon(TM) Pro V7350x2|266
Radeon(TM) RX 470 Series|266
Radeon RX Vega 64 OpenGL Engine|266
Radeon RX 5500M|265
Radeon HD 7950/8950 OEM / R9 280|265
Radeon Vega Frontier Edition OpenGL Engine|265
Radeon 7950 x2|263
Radeon R9 270|263
Radeon VII|263
Radeon HD 7xxx|262
Video Controller (VGA Compatible)|262
Radeon(TM) RX 570|261
Radeon RX 5500 XT|261
Radeon R9 M295X|261
FirePro W7000 (FireGL V) Graphics Adapter|260
Radeon R9 M390|260
Radeon HD 7870 GHz Edition|260
Radeon R9 M390 (Bootcamp edition by bootcampdrivers.com)|260
Radeon R9 370|259
Metal|259
Radeon HD 7870|259
Radeon RX 470/570|258
Radeon(TM) R9 370|257
Radeon(TM) RX 460|257
Radeon RX 560 Series|256
Radeon R9 290|255
Radeon(TM) RX 560 Series|255
Radeon RX 5300M|254
FirePro W7000|254
Radeon R9 290X|253
67EF:E7|253
Radeon HD 7850|253
Radeon(TM) RX 460 Graphics|253
MSI Radeon RX 580|251
Radeon R9 290/390|250
FirePro W8100 (FireGL V)|249
Radeon Pro WX 9100 OpenGL Engine|248
Radeon(TM) RX 560|247
Radeon(TM) RX 560 Series|247
Radeon Pro Vega II Duo|247
Radeon HD 7970M|246
Radeon R9 290|245
Radeon RX 5600M|245
FirePro D300|245
Radeon(TM) RX 5600M Series|244
Radeon RX 590 Series|244
Radeon R7 370 Series|244
Radeon(TM) RX 560|243
FirePro D300|243
Radeon R9 390|243
Radeon RX 470/480/570/570X/580/580X|243
FirePro D300|243
Radeon(TM) R7 370 Series|242
Radeon R9 M390|241
Radeon RX 560X Series|241
FirePro D300|241
Radeon RX 560|240
Radeon R9 M290X|240
Gigabyte Vega 64 macOS Edition|239
Radeon Pro 580|238
Radeon Pro WX 4100|236
Radeon Pro WX 7100 OpenGL Engine|236
Radeon HD - FirePro D300|235
FirePro D500|234
Radeon Pro 580 OpenGL Engine|234
Radeon(TM) E9260|234
Radeon Pro WX 2100|233
FirePro D500|232
FirePro D500|232
Radeon(TM) RX 6500 XT|232
Radeon Pro 580X|231
Radeon HD 7850|231
Radeon Pro 575|231
Radeon Pro Vega 64X|231
ASUS R9 270 Series|230
Radeon Pro 450|230
Radeon(TM) RX 560 Graphics|230
Radeon R9 M290|229
Radeon Pro 560X|228
Radeon Pro 480/575|228
Pitcairn PRO Radeon HD 7850|228
ASUS Radeon RX 5700 XT|227
Radeon HD 7870|227
Radeon(TM) Pro WX 5100 Graphics|226
Radeon R9 370X|225
Radeon(TM) RX 480|224
Radeon HD7970M|224
FirePro S9000 (FireGL V)|223
Radeon RX 550 640SP / RX 560/560X|222
MSI / AMD RX 560 4G|222
Radeon RX 570 OpenGL Engine|222
MSI RX650|222
RX 480|221
MSI / AMD RX 560|221
Baffin AMD Radeon RX 560|221
MSI Baffin RX650|220
Radeon Pro 5700 XT|220
Radeon Pro 570|220
Radeon Pro 575 OpenGL Engine|219
Asus Radeon R9 270X|219
Radeon RX RX 560|218
Radeon RX 560 [Baffin]|218
RX 460|218
Radeon R9 370X|218
Radeon(TM) Pro WX 4100|217
ASUS R9 390 Series|217
Radeon Pro 5600M|217
R9 xxx|217
Radeon HD 7870 Series|217
Radeon Pro RX 560|216
R9 280X Dual-X|215
Radeon Pro 570 OpenGL Engine|214
RX 560|213
Radeon Pro WX 5100|213
FirePro D700|213
Radeon(TM) R9 390 Series|213
Radeon RX 480|212
Radeon RX 560|212
Radeon RX 5500/5500M / Pro 5500M|212
Radeon RX 550 640SP / RX 560/560X|211
Radeon R9 FURY / NANO Series|211
Sapphire Radeon RX 560|211
Radeon RX 460|210
Radeon RX550/550 Series|210
inc. Radeon RX 480|209
Radeon(TM) RX 550|208
Radeon R9 M290X|206
Radeon Pro 560 (Bootcamp XG edition by bootcampdrivers.com)|206
Radeon RX460|206
Radeon RX 550 Series|205
Custom GPU 0405|204
Radeon(TM) RX 460|204
ASUS AMD Radeon R9-990X|204
Radeon Pro 555X|203
Radeon RX 460/560|203
Radeon HD 7970X/8970/R9 280X|202
ASUS Radeon RX 550 Series|201
Radeon HD 8950|201
FirePro D500 (FireGL V)|201
RX 5700XT|200
Radeon 550 Series|200
Radeon HD 8470 + 7660D Dual Graphics|200
Radeon HD 7990|200
Radeon RX 560X|199
Radeon RX Vega|199
Radeon HD 7950 Series|198
Radeon(TM) RX 540|197
Radeon HD 6970|197
Radeon HD 7970/8970 / R9 280X|197
Radeon Navi14|197
Radeon Pro 560|197
Radeon RX 550|197
Radeon R9 285|196
Radeon Pro W5500|195
Radeon Pro Vega 56|195
Radeon Pro 460|195
Radeon RX 470/480|194
Radeon PRO Graphics|194
Radeon(TM) RX550|194
Radeon Pro 560X|193
Radeon Pro 570X|192
66AF:F1|192
Radeon RX Vega M GH|190
Radeon R9 M280X|190
Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X|189
Radeon R9 280,|188
Custom GPU 0405|188
Radeon HD 7790|187
Radeon(TM) RX 480 Graphics|187
Radeon Pro 455|186
Radeon R9 260|186
Radeon RX 580 Series|186
Radeon HD 7950/8950 OEM / R9 280|186
Radeon R9 290X|185
Radeon R9 M290X|184
Radeon(TM) R9 370 Series|184
Radeon Pro 555|184
Radeon R7 260X|184
Radeon HD 6950|183
FirePro W5000|183
Radeon(TM) R9 390X|182
R9 270X Devil|182
Radeon(TM) RX 470 Graphics (AMD POLARIS10 / DRM 3.23.0 / 4.15.0-1-MANJARO, LLVM 5.0.0)|182
Radeon R9 380|182
Radeon(TM) Pro WX 9100|182
Radeon(TM) R7 360 Series|181
Radeon RX 570 Series|181
Radeon(TM) R9 M470X|181
Radeon(TM) R7 360 Series|181
Radeon RX480|180
Radeon R7 200 Series|180
Radeon Pro WX 4150|180
Radeon Pro WX 4100|179
Radeon HD 8xxx|179
ASUS R9 295X2 Series|179
Radeon R9 390X|178
Radeon HD 5870|176
Radeon Pro 560|176
Radeon RX 580 OpenGL Engine|175
Radeon HD 8950|175
FirePro V(FireGL V) Graphics Adapter|175
ASUS Radeon RX 580 Series|174
Radeon Pro WX 4100|174
Radeon Pro 460|173
Radeon HD 2600 XT|173
Radeon Pro WX 4100|172
Radeon HD 8280|172
Radeon Pro 575|171
Radeon Pro 555X|171
Radeon Pro WX 4130/4150|170
Radeon RX Vega M GH Graphics|170
FirePro W5100|170
Radeon(TM) PRO WX 8200|169
Radeon Vega Frontier Edition|169
Radeon Pro 555X|168
FirePro D700|168
Radeon HD 6990|167
Radeon RX 470 OpenGL Engine|167
Radeon HD 7870 XT|167
Radeon RX 580|167
Radeon Polaris|167
FirePro V8800 (FireGL V)|166
Radeon RX 550|165
Radeon HD 6900 Series|165
FirePro W9100 (FireGL V)|164
RX 580|163
Radeon(TM) RX 580X|163
Radeon RX 550|163
Radeon HD 6870|163
Radeon R9 M395X OpenGL Engine|163
Radeon(TM) R9 360|163
Radeon(TM) HD 8490|162
Radeon R9 M295X|162
Radeon HD 7970M|162
Radeon R9 M380|161
FirePro W5100 (FireGL V) Graphics Adapter|161
ASUS HD7850 Series|161
FirePro M6100 FireGL V|161
Radeon Pro 455|160
Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X|160
Radeon R9 M395X|159
Radeon RX 560X|159
Radeon Pro 555|158
RadeonT RX 560X|158
Radeon Pro Vega 48|158
ASUS Radeon RX Vega|158
Radeon Pro WX 9100|158
Radeon Pro Vega 64|157
Powered By QiongB A9999999999|157
Radeon(TM) Pro Duo|157
FirePro D700|157
Radeon Pro WX 7100|156
Radeon RX 460|156
Radeon HD - FirePro D700 OpenGL Engine|156
Radeon R9 M290X|156
Radeon R9 M395 OpenGL Engine|155
Radeon Pro SSG|155
FirePro D300|155
ASUS R9 380 Series|155
Radeon(TM) R9 Series|153
Radeon RX 470/480/570/580|153
FirePro W8000|153
Cezanne|153
Radeon(TM) Graphics|153
FirePro D300|153
Radeon(TM) R9 Fury Series|153
Radeon R9 M395|152
Radeon RX 570|152
Radeon R9 270X Series|152
Radeon Pro 5300M|152
R9 xxx|152
Radeon Pro 555|152
FirePro D500|151
Radeon HD 5850|151
FirePro D300|150
Radeon(TM) R9 290X|150
66AF:F0|149
Radeon(TM) RX 560|149
Radeon R9 M290|148
Radeon Instinct MI25 MxGPU|148
FirePro V7800 (FireGL) Graphics Adapter|148
Radeon(TM) R9 M470|147
Advanced Micro Devices, Inc. [AMD/ATI] Fiji [Radeon R9 FURY / NANO Series]|147
Radeon HD 5870 Series|147
Radeon(TM) E9550|147
Radeon HD 7850|147
Radeon HD 7770|147
Radeon Pro Vega 20|146
Radeon R9 290/390|146
Radeon Pro 450|146
Radeon RX 560X Series|146
Radeon HD 6850|146
Radeon R9 270 1024SP|145
ASUS R9 280X Series|145
Radeon Pro 450|145
Radeon(TM) R9 390 Series|145
FirePro V7900 (FireGL V)|145
Radeon R9 370X|145
Radeon(TM) RX 560 Series|144
ASUS R7 250X|144
Radeon RX 480 OpenGL Engine|144
Radeon R9 290X|144
Radeon RX 550X|144
Radeon(TM) RX 580|144
ASUS Radeon(TM) RX 470 Series|143
Baffin Radeon RX 560|143
Radeon R9 M295X (Bootcamp edition by bootcampdrivers.com)|143
Radeon R9 M295X Mac Edition|143
Radeon R7 Series / HD 9000 Series|142
Advanced Micro Devices [AMD] nee ATI Device|142
Radeon(TM) Pro WX 7100 Graphics|142
Radeon RX 640|142
FirePro D500|141
Radeon HD 7900 Series|141
Radeon R9 290|141
Radeon R7 250X|141
Radeon(TM) RX Vega|140
Radeon 630 Series|140
FirePro W8100 Graphic Adapter|140
Radeon R9 FURY / NANO Series|140
Radeon R9 M390|140
Radeon Pro WX 3100|140
Radeon R9 290|140
Radeon(TM) R9 370|140
FirePro V7900|139
Radeon HD 7970|139
Radeon HD - FirePro D500 OpenGL Engine|139
Radeon HD - FirePro D300 OpenGL Engine|139
Radeon Pro 580|139
Radeon HD 7770|139
Radeon HD - FirePro D500 OpenGL Engine|139
Radeon 540/540X/550/550X / RX 540X/550/550X|138
FirePro S9050|138
Radeon(TM) RX 480 Graphics|138
Radeon(TM) R9 M390X|137
Radeon Vega 64|137
Radeon(TM) Graphics|137
Tonga PRO GL [FirePro W7100]|136
HD7950 Martin Ver.|136
Radeon HD 7990|135
Radeon R9 280x|135
Radeon RX550/550 Series|135
HD7950 MARTIN REV.|134
Radeon RX560|134
Radeon R7 250X Series|134
Radeon R9 M390 OpenGL Engine|134
ASUS R7 250X|134
Radeon HD6870|134
Radeon R9 270X|134
Radeon Pro 5500 XT|134
Radeon(TM) RX 480|133
Radeon R9 270|133
ASUS HD7970 Series|133
Radeon RX 540|133
Radeon 500 Series|132
Radeon HD 5970|132
Radeon HD 7770 GHz Edition|132
Radeon HD 5870|132
Radeon 540X Series|132
Radeon HD 6870 Series|132
Radeon(TM) RX 470 Graphics|132
Radeon HD - FirePro D300 OpenGL Engine|132
Radeon HD 7xxx|131
Radeon HD 5970|131
RadeonT 540X|131
Radeon R7 Graphics + R7 350 Dual Graphics|131
Radeon R9 M295X Mac Edition / R9 380X|131
Firepro M5100|131
Radeon(TM) R9 M375X|131
Radeon R9 280x|130
Radeon(TM) RX 560X|130
Radeon HD 6990|130
Radeon Pro 5500M|130
Radeon Pro WX 5100 OpenGL Engine|129
Radeon R9 M395X (Bootcamp edition by bootcampdrivers.com)|129
Radeon R9 M380|128
FirePro W5170M|128
Radeon R9 280|128
FirePro W5000 (FireGL V)|128
Radeon(TM) RX 5600M Series|128
Radeon RX 560D|128
FirePro D500 (FireGL V)|128
Radeon(TM) Pro WX 5100 Graphics|128
Radeon(TM) RX Vega 11 Graphics|128
Radeon HD 7970|127
Radeon R9 370|127
Radeon HD 7770|127
Radeon R9 M395X|126
Radeon HD 7660D|126
Radeon HD 8970|126
Radeon R9 200 Series|126
Radeon Pro WX 3200 Series|126
Radeon HD 7800 Series|125
Radeon R9 285/380|125
Radeon R9 270X|124
FirePro W2100|124
FirePro W7170M|124
Radeon HD 7870 GHz Edition|123
Radeong 0.4 on AMD TONGA (DRM 3.1.0, LLVM 3.9.0)|123
Radeon RX 460|123
Radeon HD 5970 Series|123
Radeon R9 M380|122
Radeon R9 M395|122
Asus Radeon R9 280|122
Radeon HD 6850 Series|122
Radeon(TM) RX 540|122
Radeon HD 6900 Series|122
Device|122
67DF:C4|121
Radeon HD 6950|121
FirePro D300 (FireGL V)|121
Radeon RX 570|121
Radeon HD 5850 Series|121
Radeon HD 7870 XT|121
Radeon HD 7950|121
FirePro V7800 (FireGL) Graphics Adapter|121
Radeon HD 6850|121
Radeon HD 7950|120
Radeon HD 7870 GHz Edition|120
Radeon R7 370 / R9 270X/370X|120
Radeon HD 6870|120
Radeon Pro V340|120
ASUS Radeon RX 570 Series|119
Radeon(TM) R7 370 Series Graphics|119
Radeon(TM) RX 580 Graphics|119
Radeon(TM) RX 470 Graphics|119
Radeon HD 5870|119
Radeon HD 7950/8950 / R9 280|119
Radeon HD 6790|119
Radeon(TM) RX580|119
ASUS ARES2|119
Radeon(TM) R9 380 Series|118
Radeon HD 7750|118
Radeon Pro 560X|118
Radeon R7 250E|118
Radeon 550 Series|118
Radeon RX 560|118
Radeon Pro WX 5100|117
Radeon R7 370 / R9 270X/370|117
Radeon HD 7800 Series|117
FirePro W5000 (FireGL V) Graphics Adapter|117
Radeon HD 7750 Series|116
Radeon HD 5870|116
Radeon R7 450|115
FirePro R5000|115
Radeon R7 370 Series|115
FirePro W9100|114
Radeon R7 370 / R9 270/370|114
Radeon(TM) 540 Graphics|114
Radeon HD 6510 Series|114
Radeon(TM) R7 370 Series|113
Sapphire Radeon HD6870|113
Firepro M5100|113
Radeon(TM) RX 550|113
Radeon(TM) Pro Duo|113
Radeon 540/540X/550/550X / RX 540X/550/550X|113
Radeon Pro 570|112
Radeon R9 280|112
FirePro D700 (FireGL V)|112
(ATI) FirePro M6000 (FireGL V) Mobility Pro Graphics|112
Renoir|112
Radeon 540X Series (POLARIS12, DRM 3.40.0, 5.10.56-1-MANJARO, LLVM 12.0.1)|112
Radeon HD 6970|112
Radeon HD 8770|112
Radeon Pro WX3200 Graphics|112
Radeon(TM) R9 270|111
Radeon R9 270X|111
Radeon R9 285|111
Radeon HD 7800M Series|111
Radeon(TM) R7 370 Series|111
Radeon HD 7870M Series|111
Radeon Pro 450/550|110
Radeon HD 7000 series|110
Radeon HD 7870|110
Radeon Pro 555X|110
Radeon RX590 GME|109
FirePro S10000|109
Radeon HD 7870M|109
Radeon HD 5800 Series|109
Radeon HD 6970M|108
ASUS HD7770 Series|108
Radeon(TM) R9 M360|108
Radeon(TM) RX 550X|107
Radeon R9 285|107
Radeon HD 6900M Series|107
Radeon HD 7870 GHz Edition|107
FirePro S7000|107
Radeon R9 M370X|106
Radeon Pro WX 4100|106
Radeon HD 6800 Series|106
Radeon HD 7750|106
Radeon Pro 455 OpenGL Engine|106
ASUS R7 370 Series|106
Radeon Pro 560|105
Radeon HD 6870|105
FirePro D300 (FireGL V)|105
Radeon HD 6970M|105
Radeon HD 7850|105
Radeon(TM) R9 200 Series|104
ASUS HD7750 Series|104
Radeon HD 6970M OpenGL Engine|104
Asus Radeon R7 250|104
Radeon R7 370 / R9 270X/370|104
Radeon R9 M395X (Bootcamp XG edition by bootcampdrivers.com)|103
Radeon(TM) RX 560|103
Radeon RX Vega|103
Radeon(TM) Pro W5500M|103
Radeon R9 270|103
Radeon Pro 560X|103
Radeon HD 5850|103
FirePro S7150|103
Radeon(TM) RX 580|103
Radeon(TM) R9 370 Series|103
ASUS Radeon(TM) RX 480 Series|102
Radeon Graphics Processor|102
Radeon R9 M370X|102
FirePro W7100|102
Radeon R9 M370X|101
Radeon Pro 460 OpenGL Engine|101
Radeon RX 580 Series|101
Radeon 500 Series|100
Radeon Pro 555|100
Radeon(TM) Pro WX 4100|100
Asus Radeon R7 260X|100
Radeon(TM) RX Vega 10 Graphics|100
Radeon HD 7790|99
Radeon Pro 450 OpenGL Engine|99
Radeon HD 7790/8770 / R7 360 / R9 260/360|99
FirePro M4000 Mobility Pro Graphics|99
Radeon HD 7970M|99
Radeon R9 M270X|99
Radeon RX 550|98
Radeon HD 6850|98
Radeon(TM) RX 460|98
Radeon(TM) RX Vega11 Graphics|98
Radeon(TM) RX 460 Graphics|98
Radeon Pro 460|97
Radeon HD 7800 Series|97
Matrox C680 PCIe x16|97
Radeon(TM) RX 550|97
Radeon HD 5770|96
Radeon HD 8670D + 7700 Dual Graphics|96
Radeon HD 7790|96
Radeon 630 Series|96
Radeon RX 560 Series|96
Firepro M6100|95
Radeon HD 6700 Series|95
67EF:E7|95
Radeon(TM) Vega 10 Graphics|95
Radeon HD 6900M Series|94
Radeon Pro 455|94
FirePro M4000|94
Radeon R9 260|94
FirePro W7000|94
Radeon Instinct MI25|93
Radeon HD 8870M|93
Radeon(TM) Vega 11 Graphics|93
Radeon Pro 450|93
FirePro W5000|92
Radeon HD 6770|92
Radeon(TM) RX560|92
Radeon(TM) Graphics|91
ASUS Radeon(TM) RX 460 Series|91
Radeon(TM) Vega 8 Graphics|91
Radeon(TM) Graphics|91
FirePro W5100 Graphics Adapter|90
Radeon(TM) Pro WX Series|90
Renoir|90
STRATO XT (6646)|89
Radeon(TM) Pro WX 4150 Graphics|89
Radeon E8870MXM|89
Radeon HD 8970M|89
FirePro M6100 FireGL V|89
Radeon HD 7770|89
FirePro W5100 (FireGL V) Graphics Adapter|89
Radeon HD 6970M|89
Radeon Pro 460|88
Radeon RX Vega 8 Graphics|88
Radeon HD 7700 Series|88
Radeon(TM) R9 M360|88
ASUS R7 265 Series|88
Radeon RX Vega M GL Graphics|88
ASUS Radeon RX 550 Series|88
Radeon R7 360 / R9 360|88
Radeon HD 6950|86
Radeon HD 6790|86
Radeon Pro WX 2100|86
ASUS Radeon RX 560 Series|86
Radeon HD 5750|86
Radeon(TM) RX 640|86
Radeon HD 8870M|85
Radeon R7 260X|85
Radeon Pro WX 7100|85
Radeon(TM) R7 360 Series|85
Radeon Infoshock™ RX 460 Graphics|85
FirePro W5170M|85
Radeon R9 M295X|85
FirePro W8100|85
Radeon HD 6750|85
FirePro W5170M|85
FirePro V5800 (FireGL) Graphics Adapter|84
ASUS R7 250X|84
67E8:00|84
Radeon(TM) RX 550X|84
Radeon(TM) R7 350|84
Radeon(TM) E9260|84
Radeon Sky 500|84
Radeon R9 M270X|83
Radeon(TM) R9 350|83
Radeon(TM) RX Vega 11 Graphics|83
Firepro M6100|83
Radeon R9 360|82
FirePro V7900|82
FirePro V5800 (FireGL V)|82
Radeon HD 8830M|82
Radeon Pro 450|82
Radeon HD 8950|82
6980:00|82
FirePro W5100 (FireGL V)|81
Radeon E8870|81
Radeon HD 7750 Series|81
Radeon HD 7850 / R7 265 / R9 270 1024SP|81
FirePro™ W4190M|80
Radeon HD 5770|80
Radeon(TM) R7 360 Series|80
FirePro M5100 FireGL V|80
Radeon RX 470/480/580|80
Radeon(TM) RX 460 Graphics|79
Radeon HD 6700 Series|79
Mobility Radeon HD 5870|79
Radeon R9 255|79
Radeon 535 Series|79
Radeon R9 M380 OpenGL Engine|78
Radeon(TM) RX 550|78
Radeon R9 M380|78
Radeon R7 250X|78
Saphire Radeon RX 580|78
Radeong 0.4 on AMD BONAIRE (DRM 2.43.0, LLVM 3.8.0)|78
Radeon HD 5000|78
Radeon HD 5770|77
Radeon RX 460|77
FirePro W4300|77
Radeon 530 Series|77
Radeon(TM) 540X|77
Radeon R9 M370X OpenGL Engine|77
FirePro V5900 (FireGL V)|77
Radeon Pro WX 4100|77
SAPPHIRE HD 5770|77
Radeon Pro WX 3100|76
FirePro W5100|76
Radeon(TM) Pro Graphics|76
Radeon Pro WX 3100|76
67FF:C8|76
Radeon(TM) HD8970M|76
Firepro M5100|76
Radeon(TM) R9 M375X|75
Radeon 550X Series|75
Radeon R9 M390|75
Radeon(TM) Vega 9 Graphics|75
FirePro V5900 (FireGL V) Graphics Adapter|74
Radeon HD 8570|74
Radeon(TM) RX 475M|74
Radeon HD 6770|74
Radeon RX 550 Series|74
Radeon RX 550|74
FirePro M4000|74
Radeon RX 460/560D / Pro 450/455/460/560|74
Radeon Pro 560|74
Radeon Vega Series / Radeon Vega Mobile Series|74
Radeon Pro 455|74
Radeon HD 7870M Series|74
Radeon(TM) R7 430|74
Radeon 620 Series|73
Radeon HD 7770 GHz Edition|73
Radeon HD 7770|73
Radeon(TM) R9 360 Series|73
Radeon HD 7770/8760 / R7 250X|73
Radeon(TM) 530|73
15DD Graphics|73
Radeon RX Vega M GL Graphics|73
Radeon(TM) R9 380|72
Radeon(TM) 530 series|72
Radeon R7 200 Series|72
Embedded Radeon E9171|72
Radeon Pro WX3200 Graphics|71
Radeon HD 8800M Series|71
Radeon R9 M375|70
Radeon HD 5770|70
Radeon Pro 555|70
Radeon R7 250E|70
Radeon HD 7750|70
Radeon Pro 555X|70
Radeon(TM) Vega 8 Mobile Graphics|70
Radeon(TM) R9 M380|69
Radeon R7 260X/360|69
Barco MXRT 7600 (WDDM)|69
Radeon(TM) Vega 10 Graphics|69
Radeon HD 7750|69
Radeon R9 M370X|69
Radeon(TM) R2E Graphics|69
Radeon R9™ M370X|68
FirePro V4900 (FireGL V)|68
Radeon(TM) RX Vega11 Graphics|68
Radeon HD 5770|68
Radeon(TM) Renoir Graphics D1|68
Radeon HD 7600 Series|67
Radeon R5 340|67
Radeon(TM) Vega 9 Graphics|67
FirePro W4100 (FireGL V) Graphics Adapter|67
694E:C0|67
694C:C0|67
Radeon R7 250|66
Radeon HD 6750|66
RAVEN (DRM 3.36.0, 5.6.5-AMD, LLVM 9.0.1)|66
FirePro W600|66
Radeon R9 255|66
Radeon RX 470|66
Radeon(TM) R7 250|66
FirePro V5900|65
Radeon(TM) 530|65
Radeon Pro WX Vega M GL Graphics|65
Radeon RX 470/480|65
Radeon HD 5750|65
Radeon R7 260X|65
FirePro V5900 (FireGL V) Graphics Adapter|65
FirePro W4100 Graphics Adapter|65
Radeon HD 6700 Green Edition|65
Radeon R9 M370X|65
Radeon(TM) R7 350X|64
Radeon(TM) R7 350X|64
Radeon HD 7670|64
Radeon R9 M200X Series|64
Radeon R9 M370X|64
Radeon HD 6670|63
Radeon(TM) HD 8350|63
Radeon 530X Series|63
Radeon(TM) R9 360|63
Radeon(TM) Pro WX 4150 Graphics|63
67EF:C5|63
Radeon R7 Graphics + R5 340 Dual Graphics|62
Radeon HD 5670|62
Radeon RX 470/570|62
Radeon 530 Series|62
Radeon R7 250 Series|62
Radeon R7 430|62
Radeon HD 6750 Graphics|62
Radeon(TM) R9 M385X|62
Radeon(TM) Vega 10 Mobile Graphics|62
FirePro V5900 (FireGL V)|61
FirePro V5800 (FireGL V)|61
Radeon(TM) Vega 8 Graphics|61
FirePro V4800 (FireGL V)|61
Radeon HD 7600 Series|61
Radeon(TM) Vega 6 Graphics|61
Radeon(TM) R9 200 Series|61
Radeon HD 8850M|61
Radeon RX460|61
Radeon R7 M460|61
Radeon RX 640 Series|60
Radeon 530|60
Radeon HD 5600/5700|60
Radeon HD 5750 Series|60
Radeon R7 Graphics + R7 200 Dual Graphics|60
Radeon R7 450|60
FirePro V4900|60
Firepro W6150M|60
ASUS R7 250 Series|60
Radeon(TM) RX 560 Graphics|60
Radeon(TM) R7 M370|59
FirePro M4000 Mobility Pro Graphics|59
Radeon R5 430|59
Radeon R9 M275X|59
FirePro V5800 (FireGL) Graphics Adapter|59
Mobility Radeon HD 5870|59
Radeon(TM) R9 M385X|58
Radeon HD 7750M|58
Radeon HD 5670|58
Radeon HD 8850M|58
Radeon HD 7700M Series|58
Radeon HD 8670D + R7 200 Dual Graphics|58
Radeon R7 Series / HD 9000 Series|57
Radeon HD 6730M/6770M|57
Radeon(TM) 625|57
Radeon(TM) R9 M385|57
Radeon HD 5870M|56
Radeon 610 Series|56
FirePro W4100|56
FirePro M6000 Mobility Pro Graphics|56
Radeon RX 540 Series|56
Radeon R7 240|56
Radeon HD 7560D + HD 7700 Dual Graphics|56
Radeon R9 M370X (Bootcamp XG edition by bootcampdrivers.com)|56
FirePro V4900 (ATI FireGL)|55
Radeon(TM) R7 M350|55
FirePro M6000 Mobility Pro Graphics|55
67FF:08|55
Radeon HD 5750|55
Radeon HD 7570|55
Radeon(TM) Vega 11 Graphics|55
Radeon R7 M460|55
Radeon HD 5750 OpenGL Engine|55
Radeon(TM) R7 M370|55
Radeon HD 6730M/6770M/7690M XT|55
Radeon E8860|55
Radeon HD 8790M|54
Radeon HD 6770M|54
Radeon R7 M440|54
Radeon(TM) R7 350|54
Radeon(TM) R7 350X|54
Radeon HD 7870 XT|54
Radeon HD 7800M Series|54
Radeon 520|54
Radeon R7 M370|53
FirePro W4150M FireGL V|53
(ATI) FirePro M4000 (FireGL V) Mobility Pro Graphics|53
Radeon R9 M200X Series|53
Radeon HD 6700M/7700M/7900M Series|53
Radeon(TM) 620|53
Picasso|53
Radeon(TM) RX Vega 10 Graphics|53
67EF:CF|53
Radeon(TM) Vega 3 Graphics|53
Radeon R7 250|53
FirePro W4190M|53
Radeon(TM) Vega 8 Graphics|53
694C:C0|52
Radeon HD 5670 Series|52
Radeon(TM) RX Vega 11 Graphics|52
Radeon HD 6770M OpenGL Engine|52
Radeon(TM) M535DX|52
FirePro V4800 (FireGL V)|52
Radeon R7 350 Series|52
Barco MXRT 5600 (WDDM)|51
Radeon 630|51
FirePro V4900 (FireGL V)|51
FirePro V4900 (FireGL V) Graphics Adapter|51
Radeon(TM) Vega 3 Mobile Graphics|51
Radeon 535 Series|51
Radeon R7 Graphics|51
Radeon HD 5670|51
FirePro W4170M|50
Radeon HD 8700M Series|50
Radeon HD 8670 / R7 250/350|50
Picasso|50
FirePro V4800 (FireGL) Graphics Adapter|50
Mobility Radeon HD 5850|49
OPAL XT/GL (6604)|49
Radeon R5 M335|49
Matrox C900 PCIe x16|49
Radeon HD 7670|49
Radeon HD 6750M|49
Radeon(TM) 535|49
Radeon 540X Series|49
Radeon R9 M275|49
Radeon(TM) RX 640|49
Radeon HD 5700 Series|48
Radeon R5 M230 Series|48
Firepro M6100|48
Radeon(TM) R9 M375|48
Radeon R5 430|48
Radeon(TM) R7 250|47
Radeon R9 M265X|47
Radeon HD 6730M/6770M|47
Radeon HD 8670D|47
Radeon R5 340|47
Radeon 520|47
Radeon(TM) 520|47
FirePro V (FireGL V) Graphics Adapter|47
FirePro M5100 FireGL V|46
Radeon HD 6670|46
Radeon R7 M260X|46
Radeon HD 8550|46
FirePro M4150|46
Radeon HD 6670|46
Radeon HD 7700 Series|46
FirePro M4170|46
Radeon HD 7570|46
Radeon HD 8670D + HD 6670 Dual Graphics|45
699F:C1|45
Radeon R7 Graphics|45
Radeon(TM) R7 M340|45
FirePro W4170M (FireGL V)|45
Radeon(TM) HD 8500M/8700M|45
Radeon R7 M340|44
FirePro M5950|44
Radeon HD 8570D + R7 240 Dual Graphics|44
Radeon HD 6770M|44
Radeon HD 7730M|44
Radeon HD 8790M|44
Radeon HD 7750|44
Radeon HD 8690A|44
Mobility Radeon HD 5730 / 6570M|44
Radeon R9 A375|44
Radeon(TM) R8 M445DX|43
FirePro V (FireGL V) Graphics Adapter|43
Radeon HD 7750/8740 / R7 250E|43
FirePro V3900|43
Radeon HD 7600A Series|43
Radeon(TM) R7 200 Series Graphics|43
Radeon R7 Graphics|43
Radeon HD 6770M|43
Radeon R7 M260 Series|43
Radeon R7 M360|43
Radeon HD 8970M|43
Radeon(TM) Vega 6 Graphics|43
Radeon HD 8570|42
Radeon R7 M440|42
Radeon HD 8670A/8670M/8750M|42
Mobility Radeon HD 5850|42
Radeon HD 8750M|42
Embedded Radeon E9173|42
Radeon(TM) R7 M440|42
Radeon HD 8730M|42
Radeon R7 240 + HD 8570D Dual Graphics|42
FirePro V3900|42
Radeon(TM) 535DX|42
Radeon(TM) 520|42
Radeon(TM) Vega 8 Mobile Graphics|42
Radeon(TM) Vega 8 Graphics|42
Radeon(TM) Vega 2 Graphics|42
Radeon(TM) R9 M375|42
Radeon(TM) R8 M445DX|41
Radeon HD 6750M|41
RadeonT 540X|41
Radeon(TM) 530|41
Radeon HD 7560D + HD 6670 Dual Graphics|41
Radeon R7 240|41
Radeon(TM) R7 M360|41
Radeon R9 M280X|41
Radeon HD 7520G + HD 7600M Dual Graphics|41
Radeon(TM) R7 M445|41
Radeon Vega 8 Mobile|40
Radeon(TM) R9 255|40
Radeon R7 M260X|40
Radeon R8 M535DX|40
Radeon R7 240/340|40
Radeon(TM) R9 M375|40
Radeon(TM) R7 Graphics|40
Radeon(TM) R5 M420|40
Radeon HD 6750M|40
Radeon R9 M265X|40
Radeon R7 M340|40
Radeon HD 6570|40
Radeon HD 7500/7600 Series|39
Radeon R7 430|39
FirePro W2100|39
Radeon HD 7730M|39
Radeon HD 8670D|39
Radeon R5 M255|39
Radeon HD 7560D + HD 6570 Dual Graphics|39
Radeon RX Vega|39
Radeon R7 240 Series|39
Radeon(TM) R7 M445|39
Radeon HD 6800M Series|39
Radeon HD 8690M|39
Radeon HD 7660D + HD 6570 Dual Graphics|39
Radeon R7 M370|39
Radeon(TM) HD 6650M|38
Radeon R5 M435|38
Radeon HD 6500 Series|38
Radeon R7 Graphics|38
FirePro M7820|38
Radeon(TM) R8 M445DX Graphics|38
Radeon HD 5570|38
Radeon HD 8650G + 8750M Dual Graphics|38
Radeon HD 8670A/8670M/8750M|38
Radeon HD 6650M|38
Radeon R7 M260 Series|38
Radeon HD 7660G + 7600M Dual Graphics|38
Radeon HD 7600M Series|38
Radeon HD 7670M|37
Radeon. HD 7670M|37
Radeon(TM) R7 M265|37
Mobility Radeon HD 5000|37
Radeon HD 7500M/7600M Series|37
Radeon R5/R6/R7 Graphics|37
Radeon R7 M270|37
Radeon HD 8650G + HD 7600M Dual Graphics|37
Firepro M5100|37
Radeon HD 7730M|37
Radeon HD 8570D|37
Radeon(TM) HD 7650A Graphics|37
Radeon R7 Graphics|37
Radeon(TM) RX Vega 10 Graphics|37
Radeon HD 7600A Series|36
Radeon R7 M270|36
Radeon HD 7660D + HD 6670 Dual Graphics|36
Radeon HD 7570M/HD 7670M Graphics|36
Radeon 6600M and 6700M Series|36
Radeon R7 Graphics + R7 200 Dual Graphics|36
Radeon HD 7570 Series|36
Radeon HD 8750M|36
Radeon HD 6550D|36
FirePro M5950|36
Radeon HD 7660G + 7600M Dual Graphics|36
Radeon HD 6550D|36
Radeon HD 7600M/7700M Series|36
Radeon(TM) Vega 3 Graphics|36
Radeon(TM) 625|36
Mobility Radeon HD 5570|36
Radeon HD8730|36
Radeon(TM) R9 M380|36
Radeon(TM) R5 240|36
Radeon HD 7650M|35
Radeon HD 7560D|35
Radeon HD 8690M|35
Radeon HD 8650G + 8750M Dual Graphics|35
Radeon HD 8650G + HD 8750M Dual Graphics|35
Radeon HD 8650G + HD 8570M Dual Graphics|35
Radeon HD 6570|35
Radeon HD 7650M|35
Radeon HD 6630M/6650M/6750M/7670M/7690M|35
Radeon HD 6500 Series|35
Radeon(TM) 520|35
Radeon HD 8570D|35
Radeon HD 7600M Series|35
Radeon R7 Graphics|35
Radeon HD 7660G + 8670M Dual Graphics|35
Radeon R7 200 Series|35
Radeon HD 6630M/6650M/6750M/7670M/7690M|35
Radeon R7 M265|35
Radeon HD 8650G + HD 8750M Dual Graphics|35
Radeon HD 8650G + 8670M Dual Graphics|35
Radeon R7 Graphics|34
Radeon HD 6630M Series|34
Radeon(TM) 520|34
Radeon HD 7660D|34
ASUS R7 240 Series|34
Radeon R9 M280X|34
Radeon(TM) R5 340|34
Radeon HD 8550G + 8600/8700M Dual Graphics|34
Radeon R7 Graphics|34
Radeon(TM) HD 8500M/8700M|34
Radeon HD 7660G + HD 7600M Dual Graphics|34
Radeon HD 7670M|34
Radeon(TM) R5 M430|34
Radeon HD 8650G + 8500M Dual Graphics|34
Radeon(TM) R5 340X|34
Radeon(TM) R5 230 series|34
Radeon HD 8550|34
FirePro W2100 (FireGL V)|34
Firepro M4100 FireGL V|34
Radeon HD 6550D|34
Radeon HD 6630M|34
Radeon(TM) R9 M375|34
Radeon HD 5670 OpenGL Engine|33
Radeon HD 5670|33
Radeon R7 Graphics|33
Radeon HD 7660G|33
Radeon HD 5570|33
Radeon HD 7550M/7650M Graphics|33
Radeon HD 7660D|33
Radeon HD 7560D|33
Radeon HD 7560D|33
Radeon R5 M445 Series|33
Radeon R5 M315|33
Radeon HD 8570D|33
Radeon R7 M265|33
Radeon HD 7640G + HD 7500/7600 Dual Graphics|33
Radeon R7 Graphics|33
Radeon HD 8500M Series|33
Mobility Radeon HD 5000|33
Radeon(TM) R7 M360|33
Firepro M4100|33
Radeon(TM) Vega 10 Graphics|32
Radeon HD 7500M/7600M Series|32
Radeon HD 8550G + HD 8600/8700M Dual Graphics|32
Radeon HD 7660G|32
Radeon HD 7350|32
Radeon HD 8470D + HD 6450 Dual Graphics|32
Radeon R7 Graphics|32
Radeon HD 8730M|32
Radeon HD 7640G + HD 7400M Dual Graphics|32
Radeon HD 8690A|32
Radeon HD 8650G + 8600/8700M Dual Graphics|32
Radeon R7|32
Radeon(TM) Vega 11 Graphics|32
Radeon(TM) Vega 8 Graphics|32
Radeon R5 M200 Series|32
Radeon(TM) R5 M335|32
Radeon(TM) R5 M430|32
Radeon HD 8550G + HD 8570M Dual Graphics|32
Radeon HD 7650M Series|32
Radeon R7 250 Series|32
Radeon(TM) R7 M460|32
Radeon HD 6550D|32
Radeon HD 7660G + HD 7600M Dual Graphics|32
Radeon(TM) Vega 3 Graphics|32
Radeon HD 8470D|32
Radeon R8 M365DX|31
Madison [Mobility Radeon HD 5650/5750 / 6530M/6550M]|31
Radeon HD 6630M/6650M/6750M/7670M/7690M|31
Radeon R7 Graphics|31
Radeon E6760|31
Radeon R7 Graphics|31
Radeon(TM) Vega 8 Graphics|31
Radeon(TM) R5 M330|31
Radeon HD 8670A/8670M/8690M|31
Radeon R7 A360|31
Radeon HD 8650G + HD 8600M Dual Graphics|31
Radeon R5 M200 / HD 8500M Series|31
Radeon(TM) R8 M435DX|30
Radeon HD 7640G + HD 7670M Dual Graphics|30
Radeon(TM) Vega 10 Mobile Graphics|30
Radeon R7 Graphics|30
Radeon Pro 450/550|30
Radeon HD 8800M Series|30
Radeon HD 8470D|30
Radeon HD 7660D|30
Radeon HD 8610G + HD 8600M Dual Graphics|30
Radeon HD 7660G + 7670M Dual Graphics|30
Radeon(TM) Vega 8 Mobile Graphics|30
Radeon 610 Series|30
Radeon(TM) R5 M330|30
Radeon HD 7660G|30
Radeon HD 7640G|30
Radeon R8 M365DX|30
Radeon HD 8550G|29
Radeon HD 7540D|29
Radeon HD 7640G|29
Radeon HD 8650G|29
Radeon(TM) R7 Graphics|29
Radeon(TM) RX Vega 11 Graphics|29
Radeon HD 6650M|29
Radeon HD 7660G|29
Radeon 6600M and 6700M Series|29
Radeon HD 7640G + HD 7400M Dual Graphics|29
Radeon(TM) R5 340X|29
Radeon R5 435|29
Radeon HD 6500M/5600/5700 Series|29
Firepro M4100 FireGL V|29
Radeon R7 Graphics|29
Radeon(TM) 535|29
Radeon R7 240 Series|29
Radeon(TM) R7|29
Radeon HD 8550G + 8500M Dual Graphics|28
Radeon(TM) 530|28
Radeon HD 5650 Series|28
Radeon HD 7570M|28
Radeon HD 7570M|28
ASUS R7 240 Series|28
Radeon HD 6570|28
Radeon(TM) Vega 8 Graphics|28
Radeon E8860|28
Radeon(TM) 530 series|28
Radeon(TM) R5 M315|28
Radeon HD 5500 Series|28
Radeon HD 8610G + HD 8670M Dual Graphics|28
Radeon(TM) R6|28
Radeon R9 M275X|28
Radeon HD 8550G + R5 M230 Dual Graphics|28
Radeon HD 8470D|28
Radeon HD 8670D|28
Radeon HD 7620G|28
Radeon(TM) R8 M350DX|28
Radeon HD 8470D|27
Radeon(TM) R8 M445DX|27
Radeon(TM) R7 Graphics|27
Radeon(TM) R5 Graphics|27
Radeon(TM) R7 M340|27
Radeon(TM) R6 Graphics|27
Radeon R6 Graphics|27
Radeon R5 M230 Series|27
Radeon HD 8650G|27
Radeon HD 7480D|27
Radeon(TM) R8 M445DX Graphics|27
Radeon(TM) R6 Graphics|27
Radeon R7 Graphics|27
Radeon R6|27
Radeon R5 M255|27
Radeon(TM) Vega 3 Graphics|27
Radeon 550X|27
Radeon(TM) Vega 3 Graphics|27
Radeon HD 7500/7600 Series|27
Radeon HD 8650G|27
Radeon HD 5500 Series|27
Radeon HD 7610M|27
Radeon Instinct MI25 MxGPU|27
Radeon(TM) HD8530M|27
Radeon R7 M260|27
Radeon(TM) R8 M445DX|27
Radeon R7 Graphics|26
Radeon HD 8500M|26
Radeon(TM) R7 M260DX|26
Radeon HD 8410G|26
Radeon HD 8670A/8670M/8690M|26
Radeon(TM) R7 M360|26
Radeon(TM) R7 M360|26
Radeon HD 8670D|26
Radeon R9 M275|26
Radeon HD 7640G|26
Radeon(TM) R7 Graphics|26
MxGPU|26
Radeon HD 8370D|26
Radeon HD 6620G|25
Radeon HD 7560D|25
Radeon HD 8570 / R5 430 / R7 240/340 / Radeon 520|25
Radeon R4 Graphics|25
Radeon R6 Graphics|25
Radeon R7 Graphics|25
Radeon(TM) 535DX|25
Radeon(TM) 540 Graphics|25
Radeon(TM) R5 M330|25
Radeon HD 6530D|25
Radeon R6 Graphics|25
Radeon HD 8510G|25
Radeon HD 6620G|25
Radeon R7 M360|24
Radeon(TM) R6 Graphics|24
Radeon R7 M260|24
Radeon HD 8610G + HD 8600M Dual Graphics|24
Radeon(TM) R6 Graphics|24
Radeon R5 M200 / HD 8500M Series|24
Radeon R7 Graphics|24
Radeon HD 7600G|24
Radeon R7 Graphics|24
Radeon HD 6620G|24
Radeon R5 M330|24
Radeon(TM) R5 240|24
Radeon(TM) HD 6620G|24
FirePro V3800 (FireGL V)|24
Radeon HD 6520G|24
Radeon R7 Graphics|24
Radeon HD 7520G|24
Radeon(TM) R6 Graphics|24
Radeon(TM) R7 M260|24
Radeon RX 540 Series|24
Radeon(TM) R5 M320|24
Radeon HD 8500M|23
Radeon R5 M230|23
Radeon HD 8670M|23
Radeon HD 8550G + HD 8750M Dual Graphics|23
Radeon HD 8600M Series (HAINAN, DRM 3.40.0, 5.11.13-arch1-1, LLVM 11.1.0)|23
Radeon HD 8550G|23
Radeon R5 M240|23
Radeon R5 M240 Series|23
Radeon HD 7540D|23
Radeon(TM) R5 M430|23
Radeon R5 Graphics|23
Radeon(TM) R5 M430|23
Radeon R6 Graphics|23
Radeon HD 7520G|23
Radeon R7 Graphics|23
Radeon HD 8610G|22
FirePro 3800 (FireGL) Graphics Adapter|22
Radeon HD 7570M/HD 7670M Graphics|22
Radeon HD 7480D|22
Radeon(TM) R7 Graphics|22
Radeon HD 8650G + HD 8600M Dual Graphics|22
Radeon(TM) Vega 6 Graphics|22
Radeon R7 Graphics|22
Radeon R5 Graphics|22
Radeon HD 7660G + HD 8600M Dual Graphics|22
FirePro M2000|22
Radeon R7 Graphics|22
Radeon HD 7870M|22
Radeon R5 M335|22
Radeon R5|22
Radeon HD 8500M Series|22
Radeon(TM) HD 8490|22
Radeon HD 8670M|22
Radeon HD 7660G + HD 7670M Dual Graphics|22
Radeon 7500M/7600M Series|22
Radeon R5 Graphics|21
Radeon(TM) R4 Graphics|21
Radeon HD 8490|21
Radeon HD 8490|21
Radeon R7 Graphics|21
Radeon HD 8570M|21
Radeon(TM) R5 M320|21
Radeon R2|21
Radeon HD 6530D|21
Radeon(TM) HD 6470M|21
MxGPU|21
Radeon HD 7000 series|21
Radeon HD 7470|21
Radeon(TM) R8 M350DX|21
Radeon R7 Graphics|21
Radeon HD 7520G + HD 7400M Dual Graphics|21
Radeon(TM) R5 M335|21
Radeon HD 7400G|21
Radeon HD 7640G + HD 8500M Dual Graphics|21
Radeon HD 7000 series|21
Radeon(TM) R5 Graphics|20
Radeon(TM) R7 M520 (R17M-M1-30)|20
Radeon HD 8470|20
Radeon HD 7480D|20
Radeon HD 6400M/7400M Series|20
Radeon(TM) R3 Graphics|20
Radeon R6 M255DX|20
Radeon HD 8370D|20
Radeon R5 Graphics|20
Radeon R7 Graphics|20
Radeon HD 6410D|20
Radeon(TM) R5 Graphics|20
Radeon R5 M330|20
Radeon R7 M260DX|20
Radeon(TM) R5 Graphics|20
Radeon HD 7480D|20
Radeon HD 6470M|20
Radeon Hybrid (Blocked)|20
Radeon(TM) R7 Graphics|20
Radeon(TM) R6 M340DX|20
Radeon R5 235|20
Radeon HD 7520G|19
Radeon(TM) R6 M255DX|19
Radeon R5 M240|19
Radeon(TM) R3 Graphics|19
Radeon R7E Graphics|19
Radeon R5 M200 Series|19
Radeon HD 7470|19
Radeon HD 7640G + 8500M Dual Graphics|19
Radeon(TM) R5 M330|19
Radeon HD 6470M|19
Radeon R3 Graphics|19
Radeon HD 8400E|19
Radeon HD 7640G + HD 8570M Dual Graphics|19
Radeon HD 8400|19
Radeon HD 8400 / R3 Series|19
Radeon R5 Graphics|19
Radeon(TM) R7 M265|19
Radeon R5 M230|19
Radeon R5 Graphics|19
Radeon HD 7620G|19
Radeon R5 Graphics|19
Radeon(TM) HD 6470M|19
Radeon HD 7480D|18
Radeon R7 Graphics|18
Radeon(TM) R5 Graphics|18
Radeon HD 8550G|18
Radeon HD 8370D|18
Radeon R5 Graphics|18
Radeon(TM) HD 7450|18
Radeon HD 6530D|18
Radeon HD 8570M|18
Radeon R6 Graphics|18
Radeon HD 7650A|18
Radeon HD 8450G|18
Radeon HD 8550G + R5 M230 Dual Graphics|18
Radeon HD 7640G + 7470M Dual Graphics|18
Radeon HD 8370D|18
Radeon HD 7400M Series|18
Radeon HD 8670D + R5 200 Dual Graphics|17
Radeon HD 7500G|17
Radeon HD 7790|17
Radeon HD 7450M|17
Radeon(TM) HD 7450A Graphics|17
Radeon(TM) R5 Graphics|17
Radeon(TM) R6 Graphics|17
Radeon(TM) R4 Graphics|17
Radeon HD 8650G + HD 8500M Dual Graphics|17
Radeon HD 7400M Series|17
Radeon HD 8450G|17
Radeon HD 6520G|17
Radeon HD 8470D|17
Radeon(TM) R5 Graphics|17
Radeon(TM) R4E Graphics|17
Radeon HD 8330|17
Radeon HD 8400|17
Radeon(TM) HD 8510G|17
Radeon(TM) R5 Graphics|17
Radeon HD 8650G|17
Radeon HD 6490M|17
Radeon R7 Graphics|16
Radeon HD 6400 Series|16
Radeon HD 8510G|16
Radeon HD 7400 Series|16
Radeon HD 7400 Series|16
Radeon(TM) HD 8510G|16
Radeon HD 6370D|16
Radeon HD 7420G|16
Radeon HD 7520G + HD 7600M Dual Graphics|16
Radeon R9 260|16
Radeon HD 7640G + 7600M Dual Graphics|16
Radeon HD 7470M|16
Radeon(TM) R2 Graphics|16
RADEON HD 6450|16
Radeon(TM) R1E Graphics|16
Radeon R5 Graphics|16
Radeon HD 7420G|16
Radeon(TM) R4 Graphics|16
Radeon(TM) R4 Graphics|16
Radeon(TM) R4 Graphics|16
Radeon HD 7480D|16
Radeon HD 6490M|15
RADEON HD 6450|15
Radeon(TM) HD 8610G|15
Radeon(TM) HD 8610G|15
Radeon HD 8610G + 8600M Dual Graphics|15
Radeon HD 7350|15
Radeon(TM) HD 6480G|15
Radeon HD 8650G + 8600M Dual Graphics|15
Radeon HD 8570D|15
Radeon HD 6370M|15
Mobility Radeon HD 5000 Series|15
Radeon R2 Graphics|15
Radeon HD 8240 / R3 Series|15
Radeon HD 8650G + R5 M200 Dual Graphics|15
Radeon HD 8400E|15
Radeon(TM) R4 Graphics|15
Radeon R5 Graphics|15
Radeon HD 8610G|15
Radeon HD 8650G + HD 8500M Dual Graphics|15
Radeon(TM) R7 M260|15
ASUS EAH6450 Series|15
Radeon R3 Graphics|15
Radeon(TM) R6 M340DX|15
Radeon R6E Graphics|15
Radeon R5 Graphics|15
Radeon R2 Series|14
Radeon HD 6450/7450/8450/R5 230|14
Radeon HD 8200 / R3 Series|14
Radeon(TM) R3 Graphics|14
Radeon R5 230|14
Radeon(TM) HD 8510G|14
Radeon(TM) R4 Graphics|14
Radeon R5 M435|14
Radeon HD 8240|14
ASUS R5 230 Series|14
FirePro M2000|14
Radeon HD 7500G|14
Radeon HD 7450|14
RADEON HD 6450|14
Radeon HD 8400E|14
RADEON HD 6350|14
Radeon HD 6480G|14
Radeon(TM) R5E Graphics|14
CARRIZO 9874|14
Mobility Radeon HD 5000 Series|14
Radeon HD 6630M|14
Radeon HD 6370M|14
Radeon HD 8400 / R3 Series|14
Radeon(TM) R2 Graphics|14
ASUS EAH6450 Series|14
Radeon HD 7470M|13
Mobility Radeon HD 5470|13
Mobility Radeon HD 5400 Series|13
Radeon(TM) R5E Graphics|13
Radeon(TM) R2 Graphics|13
Radeon HD 6540|13
Radeon HD 7450|13
Radeon HD 5450|13
Radeon HD 8600M Series|13
Radeon HD 8400 / R3 Series|13
Kaveri|13
Radeon(TM) HD 6480G|13
Radeon HD 5400 Series|13
Radeon HD 8330|13
RADEON HD 6350|13
Radeon R4/R5 Graphics|13
Radeon HD 7600G +™ HD Dual Graphics|13
Radeon R3 Graphics|13
ASUS R5 230 Series|13
Radeon(TM) R7 Graphics|13
Radeon HD 7620G|13
Radeon HD 8250|13
Radeon(TM) R7 Graphics|12
Radeon HD 6450/7450/8450 / R5 230|12
Radeon HD 6480G|12
Radeon(TM) R7 Graphics|12
Radeon HD 5450 Series|12
Radeon HD 8400 / R3 Series|12
Radeon(TM) HD 6400 Series|12
Radeon(TM) R4 Graphics|12
RADEON HD5450|12
Radeon R5 Graphics|12
Radeon R5 Graphics|12
Radeon(TM) R6 Graphics|12
Radeon(TM) R4 Graphics|12
Radeon(TM) R2 Graphics|12
Radeon HD 8210|12
Radeon R5 230|12
Radeon R3 Graphics|12
FirePro 2270|12
Radeon(TM) R2E Graphics|12
Radeon HD 8400 / R3 Series|12
Radeon HD 8350G|12
Radeon HD 8400|12
Radeon R2 Graphics|12
Radeon HD 8210 Graphics|12
Radeon E6460|12
Radeon(TM) HD 8280E|12
Radeon R2 Graphics|11
Radeon HD 8450G + HD 8750M Dual Graphics|11
Radeon HD 8330|11
Radeon HD 5470|11
Radeon HD 7600G + 7500M/7600M Dual Graphics|11
Radeon R5 220|11
Radeon HD 8200 / R3 Series|11
Radeon HD 8240|11
Radeon HD 8400 / R3 Series|11
Radeon HD 8200 / R3 Series|11
Radeon HD 5450|11
Radeon(TM) 620|11
Radeon(TM) Vega 8 Mobile Graphics|11
Radeon HD 6530D|11
Radeon(TM) HD 6520G|11
Radeon HD 6300M Series|11
ASUS EAH5450|11
Radeon R5 220|11
Radeon HD 8250|11
Radeon HD 7340|11
Radeon HD 7340M|11
Radeon HD 8210|11
Radeon HD 7700 Series|10
Radeon HD 6380G|10
Radeon HD 5400 Series|10
Radeon HD 8240|10
Radeon HD 7640G + 7670M Dual Graphics|10
Radeon(TM) R6 Graphics|10
ASUS EAH5450 Series|10
Radeon HD 6320|10
Radeon HD 7340G|10
Radeon HD 6410D|10
Radeon HD 7340|10
Radeon HD 6320|10
Radeon(TM) R2 Graphics|10
Radeon HD 8180|9
Mobility Radeon HD 5430|9
Radeon R2 Graphics|9
Radeon R2 Series|9
Radeon HD 8210|9
FirePro 2270|9
Radeon R2E Graphics|9
Radeon HD 7340|9
Radeon HD 6320|9
Radeon HD 7310|9
Radeon HD 6310|9
Radeon R7 Graphics|9
Radeon HD 7310|8
Radeon HD 8250|8
Radeon HD 8180|8
Radeon HD 6630M|8
Radeon HD 6230|8
Radeon HD 6320|8
Radeon HD 6400M Series|8
Radeon HD 7290 Graphics|7
Radeon HD 6290|7
Radeon HD 6310|7
Radeon HD 8180|7
ASUS EAH5450 Series|7
Radeon(TM) R2 Graphics|6
Radeon HD 6310|6
Radeon HD 7500G|6
Radeon HD 8240 / R3 Series|6
Radeon HD 6250|6
Radeon HD 6380G|6
Radeon HD 6300M Series|5
Radeon HD 7310|5
Radeon R3 Graphics|5
Radeon(TM) R6 Graphics|5
Radeon HD 6250|5
Radeon HD 6290|5
Radeon HD 6250|5
Radeon HD 7290 Graphics|4
Radeon HD 5000/6000/7350/8350 Series|3
Radeon RX Vega 56 OpenGL Engine|-1
FirePro V4800 (FireGL) Graphics Adapter|-1
Radeon HD 7670M|-1
Radeon HD 8570D|-1
7340:C5|-1
Radeon HD 8550G|-1
Radeon R5 Graphics|-1
ASUS R7 360 Series|-1
Bonaire [FirePro W5100]|-1
Radeon HD 6380G|-1
Radeon R7 Graphics|-1
FireGL V8650|-1
FirePro S7150|-1
FirePro V3900 (FireGL V)|-1
FirePro V7800 (FireGL V)|-1
FirePro W4100 Graphics Adapter|-1
FirePro W4170M (FireGL V)|-1
Gigabyte Radeon RX 580|-1
Mobility FireGL V5700|-1
Mobility Radeon 4100|-1
Mobility Radeon HD 2400|-1
Mobility Radeon HD 2400 XT|-1
Mobility Radeon HD 2600|-1
Mobility Radeon HD 2600 XT|-1
Mobility Radeon HD 3200|-1
Mobility Radeon HD 3400 Series|-1
Mobility Radeon HD 3430|-1
Mobility Radeon HD 3470|-1
Mobility Radeon HD 3650|-1
Mobility Radeon HD 4200 Series|-1
Mobility Radeon HD 4250|-1
Mobility Radeon HD 4300 Series|-1
Mobility Radeon HD 4500 Series|-1
Mobility Radeon HD 4500/5100 Series|-1
Mobility Radeon HD 4650|-1
Mobility Radeon HD 4670|-1
Mobility Radeon HD 4850|-1
R9 270X Devil|-1
RX 560X|-1
Radeon|-1
Radeon(TM) HD8530M|-1
Radeon 3000|-1
Radeon 3100 Graphics|-1
Radeon HD 2400 PRO|-1
Radeon HD 2400 XT|-1
Radeon HD 2600 Pro|-1
Radeon HD 2600 XT|-1
Radeon HD 2900 GT|-1
Radeon HD 3200 Graphics|-1
Radeon HD 3300|-1
Radeon HD 3450|-1
Radeon HD 3470|-1
Radeon HD 3600 Series|-1
Radeon HD 3650|-1
Radeon HD 3850|-1
Radeon HD 3870|-1
Radeon HD 3870 X2|-1
Radeon HD 4200|-1
Radeon HD 4250|-1
Radeon HD 4290|-1
Radeon HD 4300/4500 Series|-1
Radeon HD 4550|-1
Radeon HD 4600 Series|-1
Radeon HD 4650|-1
Radeon HD 4670|-1
Radeon HD 4830|-1
Radeon HD 4850|-1
Radeon HD 4870|-1
Radeon HD 4890|-1
Radeon HD 5670 640SP Edition|-1
Radeon HD 5800 Series|-1
Radeon HD 5850|-1
Radeon HD 6490M|-1
Radeon HD 6730M/6770M|-1
Radeon HD 6750|-1
Radeon HD 6800M Series|-1
Radeon HD 7540D + HD 6670 Dual Graphics|-1
Radeon HD 7700M Series|-1
Radeon HD 7800 Series|-1
Radeon HD 8350|-1
Radeon HD 8370D|-1
Radeon HD 8600/8700M|-1
Radeon Pro WX Vega M GL Graphics|-1
Radeon R5 200 Series|-1
Radeon R7 A370|-1
Radeon R9 200 Series|-1
Radeon R9 290X/390X|-1
Radeon R9 380X|-1
Radeon RX 480|-1
Radeon RX 550X|-1
Radeon RX 6650M|-1
Radeon RX6600XT|-1
Radeon(TM) R8 M435DX|-1
Radeon(TM) R9 290X|-1
Radeon(TM) RX540|-1
inc. Radeon HD 7970|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.7.0)|-1
Radeong 0.4 on AMD CAPE VERDE (DRM 3.9.0 / 4.9.0-rc1+, LLVM 4.0.0)|-1
Radeong 0.4 on AMD FIJI (DRM 3.2.0 / 4.7.0-rc5+, LLVM 4.0.0)|-1
Radeong 0.4 on AMD TAHITI (DRM 2.43.0, LLVM 3.9.0)|-1
`;
function hJn() {
  return dJn;
}
function fJn(t) {
  return t === Rf.Intel
    ? lJn()
    : t === Rf.Nvidia
    ? cJn()
    : t === Rf.Amd
    ? hJn()
    : "";
}
let QZ = [],
  JZ = [],
  qZ = [];
function pJn(t) {
  if (t === Rf.Intel && QZ.length) return QZ;
  if (t === Rf.Nvidia && JZ.length) return JZ;
  if (t === Rf.Amd && qZ.length) return qZ;
  try {
    const e = iJn(fJn(t), t);
    return (
      t === Rf.Intel && (QZ = e),
      t === Rf.Nvidia && (JZ = e),
      t === Rf.Amd && (qZ = e),
      e
    );
  } catch {}
  return [];
}
function gJn(t) {
  return t ? oJn(aJn(pJn(t.vendor), t)) : 0;
}
let eY = "",
  nPe = class uQe {
    static getGPUVendor() {
      return eY || ((eY = rJn()), eY);
    }
    static parseVendor(e) {
      try {
        const n = nJn(e || uQe.getGPUVendor());
        return { ...n, score: gJn(n) };
      } catch {}
      return null;
    }
  };
var tY =
  typeof globalThis < "u"
    ? globalThis
    : typeof window < "u"
    ? window
    : typeof global < "u"
    ? global
    : typeof self < "u"
    ? self
    : {};
function Sa(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default")
    ? t.default
    : t;
}
var K4 = function (t) {
    return t && t.Math == Math && t;
  },
  Ml =
    K4(typeof globalThis == "object" && globalThis) ||
    K4(typeof window == "object" && window) ||
    K4(typeof self == "object" && self) ||
    K4(typeof tY == "object" && tY) ||
    (function () {
      return this;
    })() ||
    tY ||
    Function("return this")(),
  Yo = function (t) {
    try {
      return !!t();
    } catch {
      return !0;
    }
  },
  mJn = Yo,
  aO = !mJn(function () {
    var t = function () {}.bind();
    return typeof t != "function" || t.hasOwnProperty("prototype");
  }),
  yJn = aO,
  cQe = Function.prototype,
  rPe = cQe.apply,
  iPe = cQe.call,
  oO =
    (typeof Reflect == "object" && Reflect.apply) ||
    (yJn
      ? iPe.bind(rPe)
      : function () {
          return iPe.apply(rPe, arguments);
        }),
  dQe = aO,
  hQe = Function.prototype,
  nie = hQe.call,
  vJn = dQe && hQe.bind.bind(nie, nie),
  ls = dQe
    ? vJn
    : function (t) {
        return function () {
          return nie.apply(t, arguments);
        };
      },
  fQe = ls,
  bJn = fQe({}.toString),
  _Jn = fQe("".slice),
  Ib = function (t) {
    return _Jn(bJn(t), 8, -1);
  },
  TJn = Ib,
  EJn = ls,
  V8 = function (t) {
    if (TJn(t) === "Function") return EJn(t);
  },
  rie = typeof document == "object" && document.all,
  SJn = rie === void 0 && rie !== void 0,
  pQe = { all: rie, IS_HTMLDDA: SJn },
  gQe = pQe,
  RJn = gQe.all,
  Wl = gQe.IS_HTMLDDA
    ? function (t) {
        return typeof t == "function" || t === RJn;
      }
    : function (t) {
        return typeof t == "function";
      },
  GE = {},
  AJn = Yo,
  Ju = !AJn(function () {
    return (
      Object.defineProperty({}, 1, {
        get: function () {
          return 7;
        },
      })[1] != 7
    );
  }),
  wJn = aO,
  Z4 = Function.prototype.call,
  Kl = wJn
    ? Z4.bind(Z4)
    : function () {
        return Z4.apply(Z4, arguments);
      },
  oH = {},
  mQe = {}.propertyIsEnumerable,
  yQe = Object.getOwnPropertyDescriptor,
  kJn = yQe && !mQe.call({ 1: 2 }, 1);
oH.f = kJn
  ? function (t) {
      var e = yQe(this, t);
      return !!e && e.enumerable;
    }
  : mQe;
var rT,
  s6,
  NE = function (t, e) {
    return {
      enumerable: !(1 & t),
      configurable: !(2 & t),
      writable: !(4 & t),
      value: e,
    };
  },
  IJn = ls,
  DJn = Yo,
  PJn = Ib,
  nY = Object,
  MJn = IJn("".split),
  sH = DJn(function () {
    return !nY("z").propertyIsEnumerable(0);
  })
    ? function (t) {
        return PJn(t) == "String" ? MJn(t, "") : nY(t);
      }
    : nY,
  jD = function (t) {
    return t == null;
  },
  CJn = jD,
  $Jn = TypeError,
  WD = function (t) {
    if (CJn(t)) throw $Jn("Can't call method on " + t);
    return t;
  },
  xJn = sH,
  LJn = WD,
  wv = function (t) {
    return xJn(LJn(t));
  },
  aPe = Wl,
  vQe = pQe,
  OJn = vQe.all,
  mc = vQe.IS_HTMLDDA
    ? function (t) {
        return typeof t == "object" ? t !== null : aPe(t) || t === OJn;
      }
    : function (t) {
        return typeof t == "object" ? t !== null : aPe(t);
      },
  js = {},
  rY = js,
  iY = Ml,
  GJn = Wl,
  oPe = function (t) {
    return GJn(t) ? t : void 0;
  },
  Dd = function (t, e) {
    return arguments.length < 2
      ? oPe(rY[t]) || oPe(iY[t])
      : (rY[t] && rY[t][e]) || (iY[t] && iY[t][e]);
  },
  NJn = ls,
  xu = NJn({}.isPrototypeOf),
  lH = (typeof navigator < "u" && String(navigator.userAgent)) || "",
  bQe = Ml,
  aY = lH,
  sPe = bQe.process,
  lPe = bQe.Deno,
  uPe = (sPe && sPe.versions) || (lPe && lPe.version),
  cPe = uPe && uPe.v8;
cPe && (s6 = (rT = cPe.split("."))[0] > 0 && rT[0] < 4 ? 1 : +(rT[0] + rT[1])),
  !s6 &&
    aY &&
    (!(rT = aY.match(/Edge\/(\d+)/)) || rT[1] >= 74) &&
    (rT = aY.match(/Chrome\/(\d+)/)) &&
    (s6 = +rT[1]);
var uD = s6,
  dPe = uD,
  FJn = Yo,
  UJn = Ml,
  BJn = UJn.String,
  KD =
    !!Object.getOwnPropertySymbols &&
    !FJn(function () {
      var t = Symbol();
      return (
        !BJn(t) ||
        !(Object(t) instanceof Symbol) ||
        (!Symbol.sham && dPe && dPe < 41)
      );
    }),
  HJn = KD,
  _Qe = HJn && !Symbol.sham && typeof Symbol.iterator == "symbol",
  XJn = Dd,
  VJn = Wl,
  zJn = xu,
  jJn = _Qe,
  WJn = Object,
  sO = jJn
    ? function (t) {
        return typeof t == "symbol";
      }
    : function (t) {
        var e = XJn("Symbol");
        return VJn(e) && zJn(e.prototype, WJn(t));
      },
  KJn = String,
  OR = function (t) {
    try {
      return KJn(t);
    } catch {
      return "Object";
    }
  },
  ZJn = Wl,
  YJn = OR,
  QJn = TypeError,
  sd = function (t) {
    if (ZJn(t)) return t;
    throw QJn(YJn(t) + " is not a function");
  },
  JJn = sd,
  qJn = jD,
  rde = function (t, e) {
    var n = t[e];
    return qJn(n) ? void 0 : JJn(n);
  },
  oY = Kl,
  sY = Wl,
  lY = mc,
  eqn = TypeError,
  tqn = function (t, e) {
    var n, r;
    if (
      (e === "string" && sY((n = t.toString)) && !lY((r = oY(n, t)))) ||
      (sY((n = t.valueOf)) && !lY((r = oY(n, t)))) ||
      (e !== "string" && sY((n = t.toString)) && !lY((r = oY(n, t))))
    )
      return r;
    throw eqn("Can't convert object to primitive value");
  },
  TQe = { exports: {} },
  EQe = !0,
  hPe = Ml,
  nqn = Object.defineProperty,
  rqn = function (t, e) {
    try {
      nqn(hPe, t, { value: e, configurable: !0, writable: !0 });
    } catch {
      hPe[t] = e;
    }
    return e;
  },
  iqn = Ml,
  aqn = rqn,
  fPe = "__core-js_shared__",
  oqn = iqn[fPe] || aqn(fPe, {}),
  ide = oqn,
  pPe = ide;
(TQe.exports = function (t, e) {
  return pPe[t] || (pPe[t] = e !== void 0 ? e : {});
})("versions", []).push({
  version: "3.31.1",
  mode: "pure",
  copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)",
  license: "https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",
  source: "https://github.com/zloirock/core-js",
});
var ZD = TQe.exports,
  sqn = WD,
  lqn = Object,
  tg = function (t) {
    return lqn(sqn(t));
  },
  uqn = ls,
  cqn = tg,
  dqn = uqn({}.hasOwnProperty),
  qu =
    Object.hasOwn ||
    function (t, e) {
      return dqn(cqn(t), e);
    },
  hqn = ls,
  fqn = 0,
  pqn = Math.random(),
  gqn = hqn((1).toString),
  uH = function (t) {
    return "Symbol(" + (t === void 0 ? "" : t) + ")_" + gqn(++fqn + pqn, 36);
  },
  mqn = Ml,
  yqn = ZD,
  gPe = qu,
  vqn = uH,
  bqn = KD,
  _qn = _Qe,
  Mk = mqn.Symbol,
  uY = yqn("wks"),
  Tqn = _qn ? Mk.for || Mk : (Mk && Mk.withoutSetter) || vqn,
  il = function (t) {
    return (
      gPe(uY, t) || (uY[t] = bqn && gPe(Mk, t) ? Mk[t] : Tqn("Symbol." + t)),
      uY[t]
    );
  },
  Eqn = Kl,
  mPe = mc,
  yPe = sO,
  Sqn = rde,
  Rqn = tqn,
  Aqn = il,
  wqn = TypeError,
  kqn = Aqn("toPrimitive"),
  Iqn = function (t, e) {
    if (!mPe(t) || yPe(t)) return t;
    var n,
      r = Sqn(t, kqn);
    if (r) {
      if (
        (e === void 0 && (e = "default"), (n = Eqn(r, t, e)), !mPe(n) || yPe(n))
      )
        return n;
      throw wqn("Can't convert object to primitive value");
    }
    return e === void 0 && (e = "number"), Rqn(t, e);
  },
  Dqn = Iqn,
  Pqn = sO,
  cH = function (t) {
    var e = Dqn(t, "string");
    return Pqn(e) ? e : e + "";
  },
  Mqn = Ml,
  vPe = mc,
  iie = Mqn.document,
  Cqn = vPe(iie) && vPe(iie.createElement),
  ade = function (t) {
    return Cqn ? iie.createElement(t) : {};
  },
  $qn = Ju,
  xqn = Yo,
  Lqn = ade,
  SQe =
    !$qn &&
    !xqn(function () {
      return (
        Object.defineProperty(Lqn("div"), "a", {
          get: function () {
            return 7;
          },
        }).a != 7
      );
    }),
  Oqn = Ju,
  Gqn = Kl,
  Nqn = oH,
  Fqn = NE,
  Uqn = wv,
  Bqn = cH,
  Hqn = qu,
  Xqn = SQe,
  bPe = Object.getOwnPropertyDescriptor;
GE.f = Oqn
  ? bPe
  : function (t, e) {
      if (((t = Uqn(t)), (e = Bqn(e)), Xqn))
        try {
          return bPe(t, e);
        } catch {}
      if (Hqn(t, e)) return Fqn(!Gqn(Nqn.f, t, e), t[e]);
    };
var Vqn = Yo,
  zqn = Wl,
  jqn = /#|\.prototype\./,
  lO = function (t, e) {
    var n = Kqn[Wqn(t)];
    return n == Yqn || (n != Zqn && (zqn(e) ? Vqn(e) : !!e));
  },
  Wqn = (lO.normalize = function (t) {
    return String(t).replace(jqn, ".").toLowerCase();
  }),
  Kqn = (lO.data = {}),
  Zqn = (lO.NATIVE = "N"),
  Yqn = (lO.POLYFILL = "P"),
  RQe = lO,
  Qqn = sd,
  Jqn = aO,
  qqn = V8(V8.bind),
  Pd = function (t, e) {
    return (
      Qqn(t),
      e === void 0
        ? t
        : Jqn
        ? qqn(t, e)
        : function () {
            return t.apply(e, arguments);
          }
    );
  },
  Zf = {},
  eer = Ju,
  ter = Yo,
  AQe =
    eer &&
    ter(function () {
      return (
        Object.defineProperty(function () {}, "prototype", {
          value: 42,
          writable: !1,
        }).prototype != 42
      );
    }),
  ner = mc,
  rer = String,
  ier = TypeError,
  lh = function (t) {
    if (ner(t)) return t;
    throw ier(rer(t) + " is not an object");
  },
  aer = Ju,
  oer = SQe,
  ser = AQe,
  Y4 = lh,
  _Pe = cH,
  ler = TypeError,
  cY = Object.defineProperty,
  uer = Object.getOwnPropertyDescriptor,
  dY = "enumerable",
  hY = "configurable",
  fY = "writable";
Zf.f = aer
  ? ser
    ? function (t, e, n) {
        if (
          (Y4(t),
          (e = _Pe(e)),
          Y4(n),
          typeof t == "function" &&
            e === "prototype" &&
            "value" in n &&
            fY in n &&
            !n[fY])
        ) {
          var r = uer(t, e);
          r &&
            r[fY] &&
            ((t[e] = n.value),
            (n = {
              configurable: hY in n ? n[hY] : r[hY],
              enumerable: dY in n ? n[dY] : r[dY],
              writable: !1,
            }));
        }
        return cY(t, e, n);
      }
    : cY
  : function (t, e, n) {
      if ((Y4(t), (e = _Pe(e)), Y4(n), oer))
        try {
          return cY(t, e, n);
        } catch {}
      if ("get" in n || "set" in n) throw ler("Accessors not supported");
      return "value" in n && (t[e] = n.value), t;
    };
var cer = Ju,
  der = Zf,
  her = NE,
  Db = cer
    ? function (t, e, n) {
        return der.f(t, e, her(1, n));
      }
    : function (t, e, n) {
        return (t[e] = n), t;
      },
  Q4 = Ml,
  fer = oO,
  per = V8,
  ger = Wl,
  mer = GE.f,
  yer = RQe,
  vw = js,
  ver = Pd,
  bw = Db,
  TPe = qu,
  ber = function (t) {
    var e = function (n, r, i) {
      if (this instanceof e) {
        switch (arguments.length) {
          case 0:
            return new t();
          case 1:
            return new t(n);
          case 2:
            return new t(n, r);
        }
        return new t(n, r, i);
      }
      return fer(t, this, arguments);
    };
    return (e.prototype = t.prototype), e;
  },
  di = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f = t.target,
      p = t.global,
      g = t.stat,
      y = t.proto,
      v = p ? Q4 : g ? Q4[f] : (Q4[f] || {}).prototype,
      b = p ? vw : vw[f] || bw(vw, f, {})[f],
      w = b.prototype;
    for (o in e)
      (r =
        !(n = yer(p ? o : f + (g ? "." : "#") + o, t.forced)) &&
        v &&
        TPe(v, o)),
        (u = b[o]),
        r && (c = t.dontCallGetSet ? (h = mer(v, o)) && h.value : v[o]),
        (l = r && c ? c : e[o]),
        (r && typeof u == typeof l) ||
          ((d =
            t.bind && r
              ? ver(l, Q4)
              : t.wrap && r
              ? ber(l)
              : y && ger(l)
              ? per(l)
              : l),
          (t.sham || (l && l.sham) || (u && u.sham)) && bw(d, "sham", !0),
          bw(b, o, d),
          y &&
            (TPe(vw, (i = f + "Prototype")) || bw(vw, i, {}),
            bw(vw[i], o, l),
            t.real && w && (n || !w[o]) && bw(w, o, l)));
  },
  _er = Ib,
  GR =
    Array.isArray ||
    function (t) {
      return _er(t) == "Array";
    },
  Ter = Math.ceil,
  Eer = Math.floor,
  Ser =
    Math.trunc ||
    function (t) {
      var e = +t;
      return (e > 0 ? Eer : Ter)(e);
    },
  Rer = Ser,
  dH = function (t) {
    var e = +t;
    return e != e || e === 0 ? 0 : Rer(e);
  },
  Aer = dH,
  wer = Math.min,
  ker = function (t) {
    return t > 0 ? wer(Aer(t), 9007199254740991) : 0;
  },
  Ier = ker,
  H0 = function (t) {
    return Ier(t.length);
  },
  Der = TypeError,
  Per = 9007199254740991,
  ode = function (t) {
    if (t > Per) throw Der("Maximum allowed index exceeded");
    return t;
  },
  Mer = cH,
  Cer = Zf,
  $er = NE,
  YD = function (t, e, n) {
    var r = Mer(e);
    r in t ? Cer.f(t, r, $er(0, n)) : (t[r] = n);
  },
  xer = il,
  Ler = xer("toStringTag"),
  wQe = {};
wQe[Ler] = "z";
var sde = String(wQe) === "[object z]",
  Oer = sde,
  Ger = Wl,
  l6 = Ib,
  Ner = il,
  Fer = Ner("toStringTag"),
  Uer = Object,
  Ber =
    l6(
      (function () {
        return arguments;
      })()
    ) == "Arguments",
  Her = function (t, e) {
    try {
      return t[e];
    } catch {}
  },
  FE = Oer
    ? l6
    : function (t) {
        var e, n, r;
        return t === void 0
          ? "Undefined"
          : t === null
          ? "Null"
          : typeof (n = Her((e = Uer(t)), Fer)) == "string"
          ? n
          : Ber
          ? l6(e)
          : (r = l6(e)) == "Object" && Ger(e.callee)
          ? "Arguments"
          : r;
      },
  Xer = ls,
  Ver = Wl,
  aie = ide,
  zer = Xer(Function.toString);
Ver(aie.inspectSource) ||
  (aie.inspectSource = function (t) {
    return zer(t);
  });
var kQe = aie.inspectSource,
  jer = ls,
  Wer = Yo,
  IQe = Wl,
  Ker = FE,
  Zer = Dd,
  Yer = kQe,
  DQe = function () {},
  Qer = [],
  PQe = Zer("Reflect", "construct"),
  lde = /^\s*(?:class|function)\b/,
  Jer = jer(lde.exec),
  qer = !lde.exec(DQe),
  CM = function (t) {
    if (!IQe(t)) return !1;
    try {
      return PQe(DQe, Qer, t), !0;
    } catch {
      return !1;
    }
  },
  MQe = function (t) {
    if (!IQe(t)) return !1;
    switch (Ker(t)) {
      case "AsyncFunction":
      case "GeneratorFunction":
      case "AsyncGeneratorFunction":
        return !1;
    }
    try {
      return qer || !!Jer(lde, Yer(t));
    } catch {
      return !0;
    }
  };
MQe.sham = !0;
var hH =
    !PQe ||
    Wer(function () {
      var t;
      return (
        CM(CM.call) ||
        !CM(Object) ||
        !CM(function () {
          t = !0;
        }) ||
        t
      );
    })
      ? MQe
      : CM,
  EPe = GR,
  etr = hH,
  ttr = mc,
  ntr = il,
  rtr = ntr("species"),
  SPe = Array,
  itr = function (t) {
    var e;
    return (
      EPe(t) &&
        ((e = t.constructor),
        ((etr(e) && (e === SPe || EPe(e.prototype))) ||
          (ttr(e) && (e = e[rtr]) === null)) &&
          (e = void 0)),
      e === void 0 ? SPe : e
    );
  },
  atr = itr,
  ude = function (t, e) {
    return new (atr(t))(e === 0 ? 0 : e);
  },
  otr = Yo,
  str = il,
  ltr = uD,
  utr = str("species"),
  uO = function (t) {
    return (
      ltr >= 51 ||
      !otr(function () {
        var e = [];
        return (
          ((e.constructor = {})[utr] = function () {
            return { foo: 1 };
          }),
          e[t](Boolean).foo !== 1
        );
      })
    );
  },
  ctr = di,
  dtr = Yo,
  htr = GR,
  ftr = mc,
  ptr = tg,
  gtr = H0,
  RPe = ode,
  APe = YD,
  mtr = ude,
  ytr = uO,
  vtr = il,
  btr = uD,
  CQe = vtr("isConcatSpreadable"),
  _tr =
    btr >= 51 ||
    !dtr(function () {
      var t = [];
      return (t[CQe] = !1), t.concat()[0] !== t;
    }),
  Ttr = function (t) {
    if (!ftr(t)) return !1;
    var e = t[CQe];
    return e !== void 0 ? !!e : htr(t);
  },
  Etr = !_tr || !ytr("concat");
ctr(
  { target: "Array", proto: !0, arity: 1, forced: Etr },
  {
    concat: function (t) {
      var e,
        n,
        r,
        i,
        o,
        l = ptr(this),
        u = mtr(l, 0),
        c = 0;
      for (e = -1, r = arguments.length; e < r; e++)
        if (Ttr((o = e === -1 ? l : arguments[e])))
          for (i = gtr(o), RPe(c + i), n = 0; n < i; n++, c++)
            n in o && APe(u, c, o[n]);
        else RPe(c + 1), APe(u, c++, o);
      return (u.length = c), u;
    },
  }
);
var Str = FE,
  Rtr = String,
  ng = function (t) {
    if (Str(t) === "Symbol")
      throw TypeError("Cannot convert a Symbol value to a string");
    return Rtr(t);
  },
  fH = {},
  Atr = dH,
  wtr = Math.max,
  ktr = Math.min,
  cO = function (t, e) {
    var n = Atr(t);
    return n < 0 ? wtr(n + e, 0) : ktr(n, e);
  },
  Itr = wv,
  Dtr = cO,
  Ptr = H0,
  wPe = function (t) {
    return function (e, n, r) {
      var i,
        o = Itr(e),
        l = Ptr(o),
        u = Dtr(r, l);
      if (t && n != n) {
        for (; l > u; ) if ((i = o[u++]) != i) return !0;
      } else
        for (; l > u; u++) if ((t || u in o) && o[u] === n) return t || u || 0;
      return !t && -1;
    };
  },
  cde = { includes: wPe(!0), indexOf: wPe(!1) },
  dO = {},
  Mtr = ls,
  pY = qu,
  Ctr = wv,
  $tr = cde.indexOf,
  xtr = dO,
  kPe = Mtr([].push),
  $Qe = function (t, e) {
    var n,
      r = Ctr(t),
      i = 0,
      o = [];
    for (n in r) !pY(xtr, n) && pY(r, n) && kPe(o, n);
    for (; e.length > i; ) pY(r, (n = e[i++])) && (~$tr(o, n) || kPe(o, n));
    return o;
  },
  dde = [
    "constructor",
    "hasOwnProperty",
    "isPrototypeOf",
    "propertyIsEnumerable",
    "toLocaleString",
    "toString",
    "valueOf",
  ],
  Ltr = $Qe,
  Otr = dde,
  pH =
    Object.keys ||
    function (t) {
      return Ltr(t, Otr);
    },
  Gtr = Ju,
  Ntr = AQe,
  Ftr = Zf,
  Utr = lh,
  Btr = wv,
  Htr = pH;
fH.f =
  Gtr && !Ntr
    ? Object.defineProperties
    : function (t, e) {
        Utr(t);
        for (var n, r = Btr(e), i = Htr(e), o = i.length, l = 0; o > l; )
          Ftr.f(t, (n = i[l++]), r[n]);
        return t;
      };
var J4,
  Xtr = Dd,
  xQe = Xtr("document", "documentElement"),
  Vtr = ZD,
  ztr = uH,
  IPe = Vtr("keys"),
  gH = function (t) {
    return IPe[t] || (IPe[t] = ztr(t));
  },
  jtr = lh,
  Wtr = fH,
  DPe = dde,
  Ktr = dO,
  Ztr = xQe,
  Ytr = ade,
  Qtr = gH,
  PPe = ">",
  MPe = "<",
  oie = "prototype",
  sie = "script",
  LQe = Qtr("IE_PROTO"),
  gY = function () {},
  OQe = function (t) {
    return MPe + sie + PPe + t + MPe + "/" + sie + PPe;
  },
  CPe = function (t) {
    t.write(OQe("")), t.close();
    var e = t.parentWindow.Object;
    return (t = null), e;
  },
  Jtr = function () {
    var t,
      e = Ytr("iframe"),
      n = "java" + sie + ":";
    return (
      (e.style.display = "none"),
      Ztr.appendChild(e),
      (e.src = String(n)),
      (t = e.contentWindow.document).open(),
      t.write(OQe("document.F=Object")),
      t.close(),
      t.F
    );
  },
  u6 = function () {
    try {
      J4 = new ActiveXObject("htmlfile");
    } catch {}
    u6 =
      typeof document < "u"
        ? document.domain && J4
          ? CPe(J4)
          : Jtr()
        : CPe(J4);
    for (var t = DPe.length; t--; ) delete u6[oie][DPe[t]];
    return u6();
  };
Ktr[LQe] = !0;
var UE =
    Object.create ||
    function (t, e) {
      var n;
      return (
        t !== null
          ? ((gY[oie] = jtr(t)), (n = new gY()), (gY[oie] = null), (n[LQe] = t))
          : (n = u6()),
        e === void 0 ? n : Wtr.f(n, e)
      );
    },
  hO = {},
  qtr = $Qe,
  enr = dde,
  tnr = enr.concat("length", "prototype");
hO.f =
  Object.getOwnPropertyNames ||
  function (t) {
    return qtr(t, tnr);
  };
var hde = {},
  $Pe = cO,
  nnr = H0,
  rnr = YD,
  inr = Array,
  anr = Math.max,
  fde = function (t, e, n) {
    for (
      var r = nnr(t),
        i = $Pe(e, r),
        o = $Pe(n === void 0 ? r : n, r),
        l = inr(anr(o - i, 0)),
        u = 0;
      i < o;
      i++, u++
    )
      rnr(l, u, t[i]);
    return (l.length = u), l;
  },
  onr = Ib,
  snr = wv,
  GQe = hO.f,
  lnr = fde,
  NQe =
    typeof window == "object" && window && Object.getOwnPropertyNames
      ? Object.getOwnPropertyNames(window)
      : [],
  unr = function (t) {
    try {
      return GQe(t);
    } catch {
      return lnr(NQe);
    }
  };
hde.f = function (t) {
  return NQe && onr(t) == "Window" ? unr(t) : GQe(snr(t));
};
var fO = {};
fO.f = Object.getOwnPropertySymbols;
var cnr = Db,
  BE = function (t, e, n, r) {
    return r && r.enumerable ? (t[e] = n) : cnr(t, e, n), t;
  },
  dnr = Zf,
  pO = function (t, e, n) {
    return dnr.f(t, e, n);
  },
  gO = {},
  hnr = il;
gO.f = hnr;
var z8,
  fL,
  j8,
  xPe = js,
  fnr = qu,
  pnr = gO,
  gnr = Zf.f,
  Lu = function (t) {
    var e = xPe.Symbol || (xPe.Symbol = {});
    fnr(e, t) || gnr(e, t, { value: pnr.f(t) });
  },
  mnr = Kl,
  ynr = Dd,
  vnr = il,
  bnr = BE,
  FQe = function () {
    var t = ynr("Symbol"),
      e = t && t.prototype,
      n = e && e.valueOf,
      r = vnr("toPrimitive");
    e &&
      !e[r] &&
      bnr(
        e,
        r,
        function (i) {
          return mnr(n, this);
        },
        { arity: 1 }
      );
  },
  _nr = sde,
  Tnr = FE,
  Enr = _nr
    ? {}.toString
    : function () {
        return "[object " + Tnr(this) + "]";
      },
  Snr = sde,
  Rnr = Zf.f,
  Anr = Db,
  wnr = qu,
  knr = Enr,
  Inr = il,
  LPe = Inr("toStringTag"),
  Pb = function (t, e, n, r) {
    if (t) {
      var i = n ? t : t.prototype;
      wnr(i, LPe) || Rnr(i, LPe, { configurable: !0, value: e }),
        r && !Snr && Anr(i, "toString", knr);
    }
  },
  Dnr = Ml,
  Pnr = Wl,
  OPe = Dnr.WeakMap,
  Mnr = Pnr(OPe) && /native code/.test(String(OPe)),
  Cnr = Mnr,
  UQe = Ml,
  $nr = mc,
  xnr = Db,
  mY = qu,
  yY = ide,
  Lnr = gH,
  Onr = dO,
  GPe = "Object already initialized",
  lie = UQe.TypeError,
  Gnr = UQe.WeakMap,
  Nnr = function (t) {
    return j8(t) ? fL(t) : z8(t, {});
  },
  Fnr = function (t) {
    return function (e) {
      var n;
      if (!$nr(e) || (n = fL(e)).type !== t)
        throw lie("Incompatible receiver, " + t + " required");
      return n;
    };
  };
if (Cnr || yY.state) {
  var Iy = yY.state || (yY.state = new Gnr());
  (Iy.get = Iy.get),
    (Iy.has = Iy.has),
    (Iy.set = Iy.set),
    (z8 = function (t, e) {
      if (Iy.has(t)) throw lie(GPe);
      return (e.facade = t), Iy.set(t, e), e;
    }),
    (fL = function (t) {
      return Iy.get(t) || {};
    }),
    (j8 = function (t) {
      return Iy.has(t);
    });
} else {
  var _w = Lnr("state");
  (Onr[_w] = !0),
    (z8 = function (t, e) {
      if (mY(t, _w)) throw lie(GPe);
      return (e.facade = t), xnr(t, _w, e), e;
    }),
    (fL = function (t) {
      return mY(t, _w) ? t[_w] : {};
    }),
    (j8 = function (t) {
      return mY(t, _w);
    });
}
var HE = { set: z8, get: fL, has: j8, enforce: Nnr, getterFor: Fnr },
  Unr = Pd,
  Bnr = ls,
  Hnr = sH,
  Xnr = tg,
  Vnr = H0,
  znr = ude,
  NPe = Bnr([].push),
  iT = function (t) {
    var e = t == 1,
      n = t == 2,
      r = t == 3,
      i = t == 4,
      o = t == 6,
      l = t == 7,
      u = t == 5 || o;
    return function (c, d, h, f) {
      for (
        var p,
          g,
          y = Xnr(c),
          v = Hnr(y),
          b = Unr(d, h),
          w = Vnr(v),
          k = 0,
          D = f || znr,
          $ = e ? D(c, w) : n || l ? D(c, 0) : void 0;
        w > k;
        k++
      )
        if ((u || k in v) && ((g = b((p = v[k]), k, y)), t))
          if (e) $[k] = g;
          else if (g)
            switch (t) {
              case 3:
                return !0;
              case 5:
                return p;
              case 6:
                return k;
              case 2:
                NPe($, p);
            }
          else
            switch (t) {
              case 4:
                return !1;
              case 7:
                NPe($, p);
            }
      return o ? -1 : r || i ? i : $;
    };
  },
  NR = {
    forEach: iT(0),
    map: iT(1),
    filter: iT(2),
    some: iT(3),
    every: iT(4),
    find: iT(5),
    findIndex: iT(6),
    filterReject: iT(7),
  },
  q4 = di,
  pde = Ml,
  gde = Kl,
  jnr = ls,
  gI = Ju,
  Tw = KD,
  Wnr = Yo,
  Qc = qu,
  Knr = xu,
  uie = lh,
  mH = wv,
  mde = cH,
  Znr = ng,
  cie = NE,
  pL = UE,
  BQe = pH,
  Ynr = hO,
  HQe = hde,
  Qnr = fO,
  XQe = GE,
  VQe = Zf,
  Jnr = fH,
  zQe = oH,
  FPe = BE,
  qnr = pO,
  yde = ZD,
  err = gH,
  jQe = dO,
  UPe = uH,
  trr = il,
  nrr = gO,
  rrr = Lu,
  irr = FQe,
  arr = Pb,
  WQe = HE,
  yH = NR.forEach,
  Af = err("hidden"),
  W8 = "Symbol",
  gL = "prototype",
  orr = WQe.set,
  BPe = WQe.getterFor(W8),
  I0 = Object[gL],
  Ck = pde.Symbol,
  c6 = Ck && Ck[gL],
  srr = pde.TypeError,
  vY = pde.QObject,
  KQe = XQe.f,
  uS = VQe.f,
  ZQe = HQe.f,
  lrr = zQe.f,
  YQe = jnr([].push),
  nb = yde("symbols"),
  mO = yde("op-symbols"),
  urr = yde("wks"),
  bY = !vY || !vY[gL] || !vY[gL].findChild,
  die =
    gI &&
    Wnr(function () {
      return (
        pL(
          uS({}, "a", {
            get: function () {
              return uS(this, "a", { value: 7 }).a;
            },
          })
        ).a != 7
      );
    })
      ? function (t, e, n) {
          var r = KQe(I0, e);
          r && delete I0[e], uS(t, e, n), r && t !== I0 && uS(I0, e, r);
        }
      : uS,
  _Y = function (t, e) {
    var n = (nb[t] = pL(c6));
    return (
      orr(n, { type: W8, tag: t, description: e }), gI || (n.description = e), n
    );
  },
  K8 = function (t, e, n) {
    t === I0 && K8(mO, e, n), uie(t);
    var r = mde(e);
    return (
      uie(n),
      Qc(nb, r)
        ? (n.enumerable
            ? (Qc(t, Af) && t[Af][r] && (t[Af][r] = !1),
              (n = pL(n, { enumerable: cie(0, !1) })))
            : (Qc(t, Af) || uS(t, Af, cie(1, {})), (t[Af][r] = !0)),
          die(t, r, n))
        : uS(t, r, n)
    );
  },
  hie = function (t, e) {
    uie(t);
    var n = mH(e),
      r = BQe(n).concat(JQe(n));
    return (
      yH(r, function (i) {
        (gI && !gde(QQe, n, i)) || K8(t, i, n[i]);
      }),
      t
    );
  },
  crr = function (t, e) {
    return e === void 0 ? pL(t) : hie(pL(t), e);
  },
  QQe = function (t) {
    var e = mde(t),
      n = gde(lrr, this, e);
    return (
      !(this === I0 && Qc(nb, e) && !Qc(mO, e)) &&
      (!(n || !Qc(this, e) || !Qc(nb, e) || (Qc(this, Af) && this[Af][e])) || n)
    );
  },
  HPe = function (t, e) {
    var n = mH(t),
      r = mde(e);
    if (n !== I0 || !Qc(nb, r) || Qc(mO, r)) {
      var i = KQe(n, r);
      return (
        !i || !Qc(nb, r) || (Qc(n, Af) && n[Af][r]) || (i.enumerable = !0), i
      );
    }
  },
  XPe = function (t) {
    var e = ZQe(mH(t)),
      n = [];
    return (
      yH(e, function (r) {
        Qc(nb, r) || Qc(jQe, r) || YQe(n, r);
      }),
      n
    );
  },
  JQe = function (t) {
    var e = t === I0,
      n = ZQe(e ? mO : mH(t)),
      r = [];
    return (
      yH(n, function (i) {
        !Qc(nb, i) || (e && !Qc(I0, i)) || YQe(r, nb[i]);
      }),
      r
    );
  };
Tw ||
  (FPe(
    (c6 = (Ck = function () {
      if (Knr(c6, this)) throw srr("Symbol is not a constructor");
      var t =
          arguments.length && arguments[0] !== void 0
            ? Znr(arguments[0])
            : void 0,
        e = UPe(t),
        n = function (r) {
          this === I0 && gde(n, mO, r),
            Qc(this, Af) && Qc(this[Af], e) && (this[Af][e] = !1),
            die(this, e, cie(1, r));
        };
      return gI && bY && die(I0, e, { configurable: !0, set: n }), _Y(e, t);
    })[gL]),
    "toString",
    function () {
      return BPe(this).tag;
    }
  ),
  FPe(Ck, "withoutSetter", function (t) {
    return _Y(UPe(t), t);
  }),
  (zQe.f = QQe),
  (VQe.f = K8),
  (Jnr.f = hie),
  (XQe.f = HPe),
  (Ynr.f = HQe.f = XPe),
  (Qnr.f = JQe),
  (nrr.f = function (t) {
    return _Y(trr(t), t);
  }),
  gI &&
    qnr(c6, "description", {
      configurable: !0,
      get: function () {
        return BPe(this).description;
      },
    })),
  q4(
    { global: !0, constructor: !0, wrap: !0, forced: !Tw, sham: !Tw },
    { Symbol: Ck }
  ),
  yH(BQe(urr), function (t) {
    rrr(t);
  }),
  q4(
    { target: W8, stat: !0, forced: !Tw },
    {
      useSetter: function () {
        bY = !0;
      },
      useSimple: function () {
        bY = !1;
      },
    }
  ),
  q4(
    { target: "Object", stat: !0, forced: !Tw, sham: !gI },
    {
      create: crr,
      defineProperty: K8,
      defineProperties: hie,
      getOwnPropertyDescriptor: HPe,
    }
  ),
  q4({ target: "Object", stat: !0, forced: !Tw }, { getOwnPropertyNames: XPe }),
  irr(),
  arr(Ck, W8),
  (jQe[Af] = !0);
var drr = KD,
  qQe = drr && !!Symbol.for && !!Symbol.keyFor,
  hrr = di,
  frr = Dd,
  prr = qu,
  grr = ng,
  eJe = ZD,
  mrr = qQe,
  TY = eJe("string-to-symbol-registry"),
  yrr = eJe("symbol-to-string-registry");
hrr(
  { target: "Symbol", stat: !0, forced: !mrr },
  {
    for: function (t) {
      var e = grr(t);
      if (prr(TY, e)) return TY[e];
      var n = frr("Symbol")(e);
      return (TY[e] = n), (yrr[n] = e), n;
    },
  }
);
var vrr = di,
  brr = qu,
  _rr = sO,
  Trr = OR,
  Err = ZD,
  Srr = qQe,
  VPe = Err("symbol-to-string-registry");
vrr(
  { target: "Symbol", stat: !0, forced: !Srr },
  {
    keyFor: function (t) {
      if (!_rr(t)) throw TypeError(Trr(t) + " is not a symbol");
      if (brr(VPe, t)) return VPe[t];
    },
  }
);
var Rrr = ls,
  yO = Rrr([].slice),
  Arr = ls,
  zPe = GR,
  wrr = Wl,
  jPe = Ib,
  krr = ng,
  WPe = Arr([].push),
  Irr = function (t) {
    if (wrr(t)) return t;
    if (zPe(t)) {
      for (var e = t.length, n = [], r = 0; r < e; r++) {
        var i = t[r];
        typeof i == "string"
          ? WPe(n, i)
          : (typeof i != "number" &&
              jPe(i) != "Number" &&
              jPe(i) != "String") ||
            WPe(n, krr(i));
      }
      var o = n.length,
        l = !0;
      return function (u, c) {
        if (l) return (l = !1), c;
        if (zPe(this)) return c;
        for (var d = 0; d < o; d++) if (n[d] === u) return c;
      };
    }
  },
  Drr = di,
  tJe = Dd,
  nJe = oO,
  Prr = Kl,
  vO = ls,
  rJe = Yo,
  KPe = Wl,
  ZPe = sO,
  iJe = yO,
  Mrr = Irr,
  Crr = KD,
  $rr = String,
  YT = tJe("JSON", "stringify"),
  eN = vO(/./.exec),
  YPe = vO("".charAt),
  xrr = vO("".charCodeAt),
  Lrr = vO("".replace),
  Orr = vO((1).toString),
  Grr = /[\uD800-\uDFFF]/g,
  QPe = /^[\uD800-\uDBFF]$/,
  JPe = /^[\uDC00-\uDFFF]$/,
  qPe =
    !Crr ||
    rJe(function () {
      var t = tJe("Symbol")();
      return (
        YT([t]) != "[null]" || YT({ a: t }) != "{}" || YT(Object(t)) != "{}"
      );
    }),
  eMe = rJe(function () {
    return (
      YT("\uDF06\uD834") !== '"\\udf06\\ud834"' || YT("\uDEAD") !== '"\\udead"'
    );
  }),
  Nrr = function (t, e) {
    var n = iJe(arguments),
      r = Mrr(e);
    if (KPe(r) || (t !== void 0 && !ZPe(t)))
      return (
        (n[1] = function (i, o) {
          if ((KPe(r) && (o = Prr(r, this, $rr(i), o)), !ZPe(o))) return o;
        }),
        nJe(YT, null, n)
      );
  },
  Frr = function (t, e, n) {
    var r = YPe(n, e - 1),
      i = YPe(n, e + 1);
    return (eN(QPe, t) && !eN(JPe, i)) || (eN(JPe, t) && !eN(QPe, r))
      ? "\\u" + Orr(xrr(t, 0), 16)
      : t;
  };
YT &&
  Drr(
    { target: "JSON", stat: !0, arity: 3, forced: qPe || eMe },
    {
      stringify: function (t, e, n) {
        var r = iJe(arguments),
          i = nJe(qPe ? Nrr : YT, null, r);
        return eMe && typeof i == "string" ? Lrr(i, Grr, Frr) : i;
      },
    }
  );
var Urr = di,
  Brr = KD,
  Hrr = Yo,
  aJe = fO,
  Xrr = tg,
  Vrr =
    !Brr ||
    Hrr(function () {
      aJe.f(1);
    });
Urr(
  { target: "Object", stat: !0, forced: Vrr },
  {
    getOwnPropertySymbols: function (t) {
      var e = aJe.f;
      return e ? e(Xrr(t)) : [];
    },
  }
);
var zrr = Lu;
zrr("asyncIterator");
var jrr = Lu;
jrr("hasInstance");
var Wrr = Lu;
Wrr("isConcatSpreadable");
var Krr = Lu;
Krr("iterator");
var Zrr = Lu;
Zrr("match");
var Yrr = Lu;
Yrr("matchAll");
var Qrr = Lu;
Qrr("replace");
var Jrr = Lu;
Jrr("search");
var qrr = Lu;
qrr("species");
var eir = Lu;
eir("split");
var tir = Lu,
  nir = FQe;
tir("toPrimitive"), nir();
var rir = Dd,
  iir = Lu,
  air = Pb;
iir("toStringTag"), air(rir("Symbol"), "Symbol");
var oir = Lu;
oir("unscopables");
var sir = Ml,
  lir = Pb;
lir(sir.JSON, "JSON", !0);
var LS,
  tMe,
  nMe,
  uir = js,
  cir = uir.Symbol,
  QD = {},
  fie = Ju,
  dir = qu,
  oJe = Function.prototype,
  hir = fie && Object.getOwnPropertyDescriptor,
  vde = dir(oJe, "name"),
  fir = vde && function () {}.name === "something",
  pir = vde && (!fie || (fie && hir(oJe, "name").configurable)),
  sJe = { EXISTS: vde, PROPER: fir, CONFIGURABLE: pir },
  gir = Yo,
  lJe = !gir(function () {
    function t() {}
    return (
      (t.prototype.constructor = null),
      Object.getPrototypeOf(new t()) !== t.prototype
    );
  }),
  mir = qu,
  yir = Wl,
  vir = tg,
  bir = gH,
  _ir = lJe,
  rMe = bir("IE_PROTO"),
  pie = Object,
  Tir = pie.prototype,
  bO = _ir
    ? pie.getPrototypeOf
    : function (t) {
        var e = vir(t);
        if (mir(e, rMe)) return e[rMe];
        var n = e.constructor;
        return yir(n) && e instanceof n
          ? n.prototype
          : e instanceof pie
          ? Tir
          : null;
      },
  Eir = Yo,
  Sir = Wl,
  Rir = mc,
  Air = UE,
  iMe = bO,
  wir = BE,
  kir = il,
  gie = kir("iterator"),
  uJe = !1;
[].keys &&
  ("next" in (nMe = [].keys())
    ? (tMe = iMe(iMe(nMe))) !== Object.prototype && (LS = tMe)
    : (uJe = !0));
var Iir =
  !Rir(LS) ||
  Eir(function () {
    var t = {};
    return LS[gie].call(t) !== t;
  });
Sir((LS = Iir ? {} : Air(LS))[gie]) ||
  wir(LS, gie, function () {
    return this;
  });
var cJe = { IteratorPrototype: LS, BUGGY_SAFARI_ITERATORS: uJe },
  Dir = cJe.IteratorPrototype,
  Pir = UE,
  Mir = NE,
  Cir = Pb,
  $ir = QD,
  xir = function () {
    return this;
  },
  dJe = function (t, e, n, r) {
    var i = e + " Iterator";
    return (
      (t.prototype = Pir(Dir, { next: Mir(+!r, n) })),
      Cir(t, i, !1, !0),
      ($ir[i] = xir),
      t
    );
  },
  Lir = ls,
  Oir = sd,
  Gir = function (t, e, n) {
    try {
      return Lir(Oir(Object.getOwnPropertyDescriptor(t, e)[n]));
    } catch {}
  },
  Nir = Wl,
  Fir = String,
  Uir = TypeError,
  Bir = function (t) {
    if (typeof t == "object" || Nir(t)) return t;
    throw Uir("Can't set " + Fir(t) + " as a prototype");
  },
  Hir = Gir,
  Xir = lh,
  Vir = Bir,
  hJe =
    Object.setPrototypeOf ||
    ("__proto__" in {}
      ? (function () {
          var t,
            e = !1,
            n = {};
          try {
            (t = Hir(Object.prototype, "__proto__", "set"))(n, []),
              (e = n instanceof Array);
          } catch {}
          return function (r, i) {
            return Xir(r), Vir(i), e ? t(r, i) : (r.__proto__ = i), r;
          };
        })()
      : void 0),
  zir = di,
  jir = Kl,
  Wir = sJe,
  Kir = dJe,
  Zir = bO,
  Yir = Pb,
  aMe = BE,
  Qir = il,
  oMe = QD,
  Jir = cJe,
  qir = Wir.PROPER,
  tN = Jir.BUGGY_SAFARI_ITERATORS,
  EY = Qir("iterator"),
  sMe = "keys",
  nN = "values",
  lMe = "entries",
  ear = function () {
    return this;
  },
  bde = function (t, e, n, r, i, o, l) {
    Kir(n, e, r);
    var u,
      c,
      d,
      h = function (w) {
        if (w === i && v) return v;
        if (!tN && w in g) return g[w];
        switch (w) {
          case sMe:
          case nN:
          case lMe:
            return function () {
              return new n(this, w);
            };
        }
        return function () {
          return new n(this);
        };
      },
      f = e + " Iterator",
      p = !1,
      g = t.prototype,
      y = g[EY] || g["@@iterator"] || (i && g[i]),
      v = (!tN && y) || h(i),
      b = (e == "Array" && g.entries) || y;
    if (
      (b &&
        (u = Zir(b.call(new t()))) !== Object.prototype &&
        u.next &&
        (Yir(u, f, !0, !0), (oMe[f] = ear)),
      qir &&
        i == nN &&
        y &&
        y.name !== nN &&
        ((p = !0),
        (v = function () {
          return jir(y, this);
        })),
      i)
    )
      if (((c = { values: h(nN), keys: o ? v : h(sMe), entries: h(lMe) }), l))
        for (d in c) (tN || p || !(d in g)) && aMe(g, d, c[d]);
      else zir({ target: e, proto: !0, forced: tN || p }, c);
    return l && g[EY] !== v && aMe(g, EY, v, { name: i }), (oMe[e] = v), c;
  },
  _de = function (t, e) {
    return { value: t, done: e };
  },
  tar = wv,
  uMe = QD,
  fJe = HE;
Zf.f;
var nar = bde,
  cMe = _de,
  pJe = "Array Iterator",
  rar = fJe.set,
  iar = fJe.getterFor(pJe);
nar(
  Array,
  "Array",
  function (t, e) {
    rar(this, { type: pJe, target: tar(t), index: 0, kind: e });
  },
  function () {
    var t = iar(this),
      e = t.target,
      n = t.kind,
      r = t.index++;
    return !e || r >= e.length
      ? ((t.target = void 0), cMe(void 0, !0))
      : cMe(n == "keys" ? r : n == "values" ? e[r] : [r, e[r]], !1);
  },
  "values"
),
  (uMe.Arguments = uMe.Array);
var aar = {
    CSSRuleList: 0,
    CSSStyleDeclaration: 0,
    CSSValueList: 0,
    ClientRectList: 0,
    DOMRectList: 0,
    DOMStringList: 0,
    DOMTokenList: 1,
    DataTransferItemList: 0,
    FileList: 0,
    HTMLAllCollection: 0,
    HTMLCollection: 0,
    HTMLFormElement: 0,
    HTMLSelectElement: 0,
    MediaList: 0,
    MimeTypeArray: 0,
    NamedNodeMap: 0,
    NodeList: 1,
    PaintRequestList: 0,
    Plugin: 0,
    PluginArray: 0,
    SVGLengthList: 0,
    SVGNumberList: 0,
    SVGPathSegList: 0,
    SVGPointList: 0,
    SVGStringList: 0,
    SVGTransformList: 0,
    SourceBufferList: 0,
    StyleSheetList: 0,
    TextTrackCueList: 0,
    TextTrackList: 0,
    TouchList: 0,
  },
  oar = aar,
  sar = Ml,
  lar = FE,
  uar = Db,
  dMe = QD,
  car = il,
  hMe = car("toStringTag");
for (var SY in oar) {
  var fMe = sar[SY],
    RY = fMe && fMe.prototype;
  RY && lar(RY) !== hMe && uar(RY, hMe, SY), (dMe[SY] = dMe.Array);
}
var dar = cir,
  har = dar,
  far = il,
  par = Zf.f,
  pMe = far("metadata"),
  gMe = Function.prototype;
gMe[pMe] === void 0 && par(gMe, pMe, { value: null });
var gar = Lu;
gar("dispose");
var mar = Lu;
mar("metadata");
var yar = har,
  bar = yar,
  _ar = Lu;
_ar("asyncDispose");
var Tar = Dd,
  Ear = ls,
  Tde = Tar("Symbol"),
  Sar = Tde.keyFor,
  Rar = Ear(Tde.prototype.valueOf),
  gJe =
    Tde.isRegisteredSymbol ||
    function (t) {
      try {
        return Sar(Rar(t)) !== void 0;
      } catch {
        return !1;
      }
    },
  Aar = di,
  war = gJe;
Aar({ target: "Symbol", stat: !0 }, { isRegisteredSymbol: war });
for (
  var kar = ZD,
    mMe = Dd,
    Iar = ls,
    Dar = sO,
    Par = il,
    rN = mMe("Symbol"),
    yMe = rN.isWellKnownSymbol,
    mJe = mMe("Object", "getOwnPropertyNames"),
    Mar = Iar(rN.prototype.valueOf),
    vMe = kar("wks"),
    AY = 0,
    bMe = mJe(rN),
    Car = bMe.length;
  AY < Car;
  AY++
)
  try {
    var _Me = bMe[AY];
    Dar(rN[_Me]) && Par(_Me);
  } catch {}
var yJe = function (t) {
    if (yMe && yMe(t)) return !0;
    try {
      for (var e = Mar(t), n = 0, r = mJe(vMe), i = r.length; n < i; n++)
        if (vMe[r[n]] == e) return !0;
    } catch {}
    return !1;
  },
  $ar = di,
  xar = yJe;
$ar({ target: "Symbol", stat: !0, forced: !0 }, { isWellKnownSymbol: xar });
var Lar = Lu;
Lar("matcher");
var Oar = Lu;
Oar("observable");
var Gar = di,
  Nar = gJe;
Gar(
  { target: "Symbol", stat: !0, name: "isRegisteredSymbol" },
  { isRegistered: Nar }
);
var Far = di,
  Uar = yJe;
Far(
  { target: "Symbol", stat: !0, name: "isWellKnownSymbol", forced: !0 },
  { isWellKnown: Uar }
);
var Bar = Lu;
Bar("metadataKey");
var Har = Lu;
Har("patternMatch");
var Xar = Lu;
Xar("replaceAll");
var Var = bar,
  zar = Var,
  jar = zar,
  $k = Sa(jar),
  Ede = ls,
  War = dH,
  Kar = ng,
  Zar = WD,
  Yar = Ede("".charAt),
  TMe = Ede("".charCodeAt),
  Qar = Ede("".slice),
  EMe = function (t) {
    return function (e, n) {
      var r,
        i,
        o = Kar(Zar(e)),
        l = War(n),
        u = o.length;
      return l < 0 || l >= u
        ? t
          ? ""
          : void 0
        : (r = TMe(o, l)) < 55296 ||
          r > 56319 ||
          l + 1 === u ||
          (i = TMe(o, l + 1)) < 56320 ||
          i > 57343
        ? t
          ? Yar(o, l)
          : r
        : t
        ? Qar(o, l, l + 2)
        : i - 56320 + ((r - 55296) << 10) + 65536;
    };
  },
  vJe = { codeAt: EMe(!1), charAt: EMe(!0) },
  Jar = vJe.charAt,
  qar = ng,
  bJe = HE,
  eor = bde,
  SMe = _de,
  _Je = "String Iterator",
  tor = bJe.set,
  nor = bJe.getterFor(_Je);
eor(
  String,
  "String",
  function (t) {
    tor(this, { type: _Je, string: qar(t), index: 0 });
  },
  function () {
    var t,
      e = nor(this),
      n = e.string,
      r = e.index;
    return r >= n.length
      ? SMe(void 0, !0)
      : ((t = Jar(n, r)), (e.index += t.length), SMe(t, !1));
  }
);
var ror = gO,
  ior = ror.f("iterator"),
  aor = ior,
  oor = aor,
  sor = oor,
  lor = sor,
  uor = lor,
  cor = uor,
  dor = cor,
  hor = Sa(dor);
function ed(t) {
  return (ed =
    typeof $k == "function" && typeof hor == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof $k == "function" &&
            e.constructor === $k &&
            e !== $k.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
var por = di,
  gor = tg,
  TJe = pH,
  mor = Yo,
  yor = mor(function () {
    TJe(1);
  });
por(
  { target: "Object", stat: !0, forced: yor },
  {
    keys: function (t) {
      return TJe(gor(t));
    },
  }
);
var vor = js,
  bor = vor.Object.keys,
  _or = bor,
  Tor = _or,
  Eor = Tor,
  Sor = Eor,
  Ror = Sor,
  Aor = Ror,
  EJe = Aor,
  wor = Sa(EJe),
  kor = js,
  Ior = kor.Object.getOwnPropertySymbols,
  Dor = Ior,
  Por = Dor,
  Mor = Por,
  Cor = Mor,
  $or = Cor,
  xor = $or,
  Lor = xor,
  RMe = Sa(Lor),
  Oor = di,
  Gor = NR.filter,
  Nor = uO,
  For = Nor("filter");
Oor(
  { target: "Array", proto: !0, forced: !For },
  {
    filter: function (t) {
      return Gor(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Uor = js,
  ld = function (t) {
    return Uor[t + "Prototype"];
  },
  Bor = ld,
  Hor = Bor("Array").filter,
  Xor = xu,
  Vor = Hor,
  wY = Array.prototype,
  zor = function (t) {
    var e = t.filter;
    return t === wY || (Xor(wY, t) && e === wY.filter) ? Vor : e;
  },
  jor = zor,
  Wor = jor,
  Kor = Wor,
  Zor = Kor,
  Yor = Zor,
  Qor = Yor,
  SJe = Qor,
  Jor = Sa(SJe),
  RJe = { exports: {} },
  qor = di,
  esr = Yo,
  tsr = wv,
  AJe = GE.f,
  wJe = Ju,
  nsr =
    !wJe ||
    esr(function () {
      AJe(1);
    });
qor(
  { target: "Object", stat: !0, forced: nsr, sham: !wJe },
  {
    getOwnPropertyDescriptor: function (t, e) {
      return AJe(tsr(t), e);
    },
  }
);
var rsr = js,
  kJe = rsr.Object,
  isr = (RJe.exports = function (t, e) {
    return kJe.getOwnPropertyDescriptor(t, e);
  });
kJe.getOwnPropertyDescriptor.sham && (isr.sham = !0);
var asr = RJe.exports,
  osr = asr,
  ssr = osr,
  lsr = ssr,
  usr = lsr,
  csr = usr,
  dsr = csr,
  hsr = dsr,
  Sde = Sa(hsr),
  fsr = Ju,
  psr = GR,
  gsr = TypeError,
  msr = Object.getOwnPropertyDescriptor,
  ysr =
    fsr &&
    !(function () {
      if (this !== void 0) return !0;
      try {
        Object.defineProperty([], "length", { writable: !1 }).length = 1;
      } catch (t) {
        return t instanceof TypeError;
      }
    })(),
  IJe = ysr
    ? function (t, e) {
        if (psr(t) && !msr(t, "length").writable)
          throw gsr("Cannot set read only .length");
        return (t.length = e);
      }
    : function (t, e) {
        return (t.length = e);
      },
  vsr = di,
  bsr = tg,
  _sr = H0,
  Tsr = IJe,
  Esr = ode,
  Ssr = Yo,
  Rsr = Ssr(function () {
    return [].push.call({ length: 4294967296 }, 1) !== 4294967297;
  }),
  Asr = function () {
    try {
      Object.defineProperty([], "length", { writable: !1 }).push();
    } catch (t) {
      return t instanceof TypeError;
    }
  },
  wsr = Rsr || !Asr();
vsr(
  { target: "Array", proto: !0, arity: 1, forced: wsr },
  {
    push: function (t) {
      var e = bsr(this),
        n = _sr(e),
        r = arguments.length;
      Esr(n + r);
      for (var i = 0; i < r; i++) (e[n] = arguments[i]), n++;
      return Tsr(e, n), n;
    },
  }
);
var ksr = ld,
  Isr = ksr("Array").push,
  Dsr = xu,
  Psr = Isr,
  kY = Array.prototype,
  Msr = function (t) {
    var e = t.push;
    return t === kY || (Dsr(kY, t) && e === kY.push) ? Psr : e;
  },
  Csr = Msr,
  $sr = Csr,
  xsr = $sr,
  Lsr = xsr,
  Osr = Lsr,
  Gsr = Osr,
  Nsr = Gsr,
  Z8 = Sa(Nsr),
  Fsr = Yo,
  vH = function (t, e) {
    var n = [][t];
    return (
      !!n &&
      Fsr(function () {
        n.call(
          null,
          e ||
            function () {
              return 1;
            },
          1
        );
      })
    );
  },
  Usr = NR.forEach,
  Bsr = vH,
  Hsr = Bsr("forEach"),
  AMe = Hsr
    ? [].forEach
    : function (t) {
        return Usr(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
  Xsr = di;
Xsr(
  { target: "Array", proto: !0, forced: [].forEach != AMe },
  { forEach: AMe }
);
var Vsr = ld,
  zsr = Vsr("Array").forEach,
  jsr = zsr,
  Wsr = jsr,
  Ksr = FE,
  Zsr = qu,
  Ysr = xu,
  Qsr = Wsr,
  IY = Array.prototype,
  Jsr = { DOMTokenList: !0, NodeList: !0 },
  qsr = function (t) {
    var e = t.forEach;
    return t === IY || (Ysr(IY, t) && e === IY.forEach) || Zsr(Jsr, Ksr(t))
      ? Qsr
      : e;
  },
  elr = qsr,
  tlr = elr,
  nlr = tlr,
  rlr = nlr,
  DJe = rlr,
  V$ = Sa(DJe),
  ilr = Dd,
  alr = ls,
  olr = hO,
  slr = fO,
  llr = lh,
  ulr = alr([].concat),
  PJe =
    ilr("Reflect", "ownKeys") ||
    function (t) {
      var e = olr.f(llr(t)),
        n = slr.f;
      return n ? ulr(e, n(t)) : e;
    },
  clr = di,
  dlr = Ju,
  hlr = PJe,
  flr = wv,
  plr = GE,
  glr = YD;
clr(
  { target: "Object", stat: !0, sham: !dlr },
  {
    getOwnPropertyDescriptors: function (t) {
      for (
        var e, n, r = flr(t), i = plr.f, o = hlr(r), l = {}, u = 0;
        o.length > u;

      )
        (n = i(r, (e = o[u++]))) !== void 0 && glr(l, e, n);
      return l;
    },
  }
);
var mlr = js,
  ylr = mlr.Object.getOwnPropertyDescriptors,
  vlr = ylr,
  blr = vlr,
  _lr = blr,
  Tlr = _lr,
  Elr = Tlr,
  Slr = Elr,
  Rlr = Slr,
  wMe = Sa(Rlr),
  MJe = { exports: {} },
  Alr = di,
  wlr = Ju,
  kMe = fH.f;
Alr(
  {
    target: "Object",
    stat: !0,
    forced: Object.defineProperties !== kMe,
    sham: !wlr,
  },
  { defineProperties: kMe }
);
var klr = js,
  CJe = klr.Object,
  Ilr = (MJe.exports = function (t, e) {
    return CJe.defineProperties(t, e);
  });
CJe.defineProperties.sham && (Ilr.sham = !0);
var Dlr = MJe.exports,
  Plr = Dlr,
  Mlr = Plr,
  Clr = Mlr,
  $lr = Clr,
  xlr = $lr,
  Llr = xlr,
  Olr = Llr,
  Glr = Sa(Olr),
  $Je = { exports: {} },
  Nlr = di,
  Flr = Ju,
  IMe = Zf.f;
Nlr(
  {
    target: "Object",
    stat: !0,
    forced: Object.defineProperty !== IMe,
    sham: !Flr,
  },
  { defineProperty: IMe }
);
var Ulr = js,
  xJe = Ulr.Object,
  Blr = ($Je.exports = function (t, e, n) {
    return xJe.defineProperty(t, e, n);
  });
xJe.defineProperty.sham && (Blr.sham = !0);
var Hlr = $Je.exports,
  Xlr = Hlr,
  Vlr = Xlr,
  zlr = Vlr,
  jlr = zlr,
  Wlr = jlr,
  Klr = Wlr,
  LJe = Klr,
  tR = Sa(LJe),
  Zlr = gO,
  Ylr = Zlr.f("toPrimitive"),
  Qlr = Ylr,
  Jlr = Qlr,
  qlr = Jlr,
  eur = qlr,
  tur = eur,
  nur = tur,
  rur = nur,
  iur = Sa(rur);
function aur(t, e) {
  if (ed(t) !== "object" || t === null) return t;
  var n = t[iur];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (ed(r) !== "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function OJe(t) {
  var e = aur(t, "string");
  return ed(e) === "symbol" ? e : String(e);
}
function da(t, e, n) {
  return (
    (e = OJe(e)) in t
      ? tR(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 })
      : (t[e] = n),
    t
  );
}
function DMe(t, e) {
  var n = wor(t);
  if (RMe) {
    var r = RMe(t);
    e &&
      (r = Jor(r).call(r, function (i) {
        return Sde(t, i).enumerable;
      })),
      Z8(n).apply(n, r);
  }
  return n;
}
function fs(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n,
      r,
      i = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? V$((n = DMe(Object(i), !0))).call(n, function (o) {
          da(t, o, i[o]);
        })
      : wMe
      ? Glr(t, wMe(i))
      : V$((r = DMe(Object(i)))).call(r, function (o) {
          tR(t, o, Sde(i, o));
        });
  }
  return t;
}
var our = di,
  sur = Ju,
  lur = UE;
our({ target: "Object", stat: !0, sham: !sur }, { create: lur });
var uur = js,
  cur = uur.Object,
  dur = function (t, e) {
    return cur.create(t, e);
  },
  hur = dur,
  fur = hur,
  pur = fur,
  gur = pur,
  mur = gur,
  yur = mur,
  vur = yur,
  d6 = Sa(vur),
  bur = di,
  _ur = Yo,
  Tur = tg,
  GJe = bO,
  Eur = lJe,
  Sur = _ur(function () {
    GJe(1);
  });
bur(
  { target: "Object", stat: !0, forced: Sur, sham: !Eur },
  {
    getPrototypeOf: function (t) {
      return GJe(Tur(t));
    },
  }
);
var Rur = js,
  Aur = Rur.Object.getPrototypeOf,
  wur = Aur,
  kur = wur,
  Iur = kur,
  Dur = Iur,
  Pur = Dur,
  Mur = Pur,
  Cur = Mur,
  z$ = Sa(Cur),
  $ur = di,
  xur = hJe;
$ur({ target: "Object", stat: !0 }, { setPrototypeOf: xur });
var Lur = js,
  Our = Lur.Object.setPrototypeOf,
  Gur = Our,
  Nur = Gur,
  Fur = Nur,
  Uur = Fur,
  Bur = Uur,
  Hur = Bur,
  Xur = Hur,
  mL = Sa(Xur),
  PMe = qu,
  Vur = PJe,
  zur = GE,
  jur = Zf,
  Wur = function (t, e, n) {
    for (var r = Vur(e), i = jur.f, o = zur.f, l = 0; l < r.length; l++) {
      var u = r[l];
      PMe(t, u) || (n && PMe(n, u)) || i(t, u, o(e, u));
    }
  },
  Kur = mc,
  Zur = Db,
  Yur = function (t, e) {
    Kur(e) && "cause" in e && Zur(t, "cause", e.cause);
  },
  Qur = ls,
  NJe = Error,
  Jur = Qur("".replace),
  qur = String(NJe("zxcasd").stack),
  FJe = /\n\s*at [^:]*:[^\n]*/,
  ecr = FJe.test(qur),
  tcr = function (t, e) {
    if (ecr && typeof t == "string" && !NJe.prepareStackTrace)
      for (; e--; ) t = Jur(t, FJe, "");
    return t;
  },
  ncr = Yo,
  rcr = NE,
  icr = !ncr(function () {
    var t = Error("a");
    return (
      !("stack" in t) ||
      (Object.defineProperty(t, "stack", rcr(1, 7)), t.stack !== 7)
    );
  }),
  acr = Db,
  ocr = tcr,
  scr = icr,
  MMe = Error.captureStackTrace,
  lcr = function (t, e, n, r) {
    scr && (MMe ? MMe(t, e) : acr(t, "stack", ocr(n, r)));
  },
  ucr = il,
  ccr = QD,
  dcr = ucr("iterator"),
  hcr = Array.prototype,
  UJe = function (t) {
    return t !== void 0 && (ccr.Array === t || hcr[dcr] === t);
  },
  fcr = FE,
  CMe = rde,
  pcr = jD,
  gcr = QD,
  mcr = il,
  ycr = mcr("iterator"),
  bH = function (t) {
    if (!pcr(t)) return CMe(t, ycr) || CMe(t, "@@iterator") || gcr[fcr(t)];
  },
  vcr = Kl,
  bcr = sd,
  _cr = lh,
  Tcr = OR,
  Ecr = bH,
  Scr = TypeError,
  Rde = function (t, e) {
    var n = arguments.length < 2 ? Ecr(t) : e;
    if (bcr(n)) return _cr(vcr(n, t));
    throw Scr(Tcr(t) + " is not iterable");
  },
  Rcr = Kl,
  $Me = lh,
  Acr = rde,
  BJe = function (t, e, n) {
    var r, i;
    $Me(t);
    try {
      if (!(r = Acr(t, "return"))) {
        if (e === "throw") throw n;
        return n;
      }
      r = Rcr(r, t);
    } catch (o) {
      (i = !0), (r = o);
    }
    if (e === "throw") throw n;
    if (i) throw r;
    return $Me(r), n;
  },
  wcr = Pd,
  kcr = Kl,
  Icr = lh,
  Dcr = OR,
  Pcr = UJe,
  Mcr = H0,
  xMe = xu,
  Ccr = Rde,
  $cr = bH,
  LMe = BJe,
  xcr = TypeError,
  h6 = function (t, e) {
    (this.stopped = t), (this.result = e);
  },
  OMe = h6.prototype,
  X0 = function (t, e, n) {
    var r,
      i,
      o,
      l,
      u,
      c,
      d,
      h = n && n.that,
      f = !(!n || !n.AS_ENTRIES),
      p = !(!n || !n.IS_RECORD),
      g = !(!n || !n.IS_ITERATOR),
      y = !(!n || !n.INTERRUPTED),
      v = wcr(e, h),
      b = function (k) {
        return r && LMe(r, "normal", k), new h6(!0, k);
      },
      w = function (k) {
        return f
          ? (Icr(k), y ? v(k[0], k[1], b) : v(k[0], k[1]))
          : y
          ? v(k, b)
          : v(k);
      };
    if (p) r = t.iterator;
    else if (g) r = t;
    else {
      if (!(i = $cr(t))) throw xcr(Dcr(t) + " is not iterable");
      if (Pcr(i)) {
        for (o = 0, l = Mcr(t); l > o; o++)
          if ((u = w(t[o])) && xMe(OMe, u)) return u;
        return new h6(!1);
      }
      r = Ccr(t, i);
    }
    for (c = p ? t.next : r.next; !(d = kcr(c, r)).done; ) {
      try {
        u = w(d.value);
      } catch (k) {
        LMe(r, "throw", k);
      }
      if (typeof u == "object" && u && xMe(OMe, u)) return u;
    }
    return new h6(!1);
  },
  Lcr = ng,
  Ocr = function (t, e) {
    return t === void 0 ? (arguments.length < 2 ? "" : e) : Lcr(t);
  },
  Gcr = di,
  Ncr = xu,
  Fcr = bO,
  Y8 = hJe,
  Ucr = Wur,
  HJe = UE,
  DY = Db,
  PY = NE,
  Bcr = Yur,
  Hcr = lcr,
  Xcr = X0,
  Vcr = Ocr,
  zcr = il,
  jcr = zcr("toStringTag"),
  Q8 = Error,
  Wcr = [].push,
  cD = function (t, e) {
    var n,
      r = Ncr(MY, this);
    Y8
      ? (n = Y8(Q8(), r ? Fcr(this) : MY))
      : ((n = r ? this : HJe(MY)), DY(n, jcr, "Error")),
      e !== void 0 && DY(n, "message", Vcr(e)),
      Hcr(n, cD, n.stack, 1),
      arguments.length > 2 && Bcr(n, arguments[2]);
    var i = [];
    return Xcr(t, Wcr, { that: i }), DY(n, "errors", i), n;
  };
Y8 ? Y8(cD, Q8) : Ucr(cD, Q8, { name: !0 });
var MY = (cD.prototype = HJe(Q8.prototype, {
  constructor: PY(1, cD),
  message: PY(1, ""),
  name: PY(1, "AggregateError"),
}));
Gcr({ global: !0, constructor: !0, arity: 2 }, { AggregateError: cD });
var yL,
  Ew,
  GMe,
  CY,
  Kcr = Ib,
  _O = typeof process < "u" && Kcr(process) == "process",
  Zcr = Dd,
  Ycr = pO,
  Qcr = il,
  Jcr = Ju,
  NMe = Qcr("species"),
  XJe = function (t) {
    var e = Zcr(t);
    Jcr &&
      e &&
      !e[NMe] &&
      Ycr(e, NMe, {
        configurable: !0,
        get: function () {
          return this;
        },
      });
  },
  qcr = xu,
  edr = TypeError,
  TO = function (t, e) {
    if (qcr(e, t)) return t;
    throw edr("Incorrect invocation");
  },
  tdr = hH,
  ndr = OR,
  rdr = TypeError,
  Ade = function (t) {
    if (tdr(t)) return t;
    throw rdr(ndr(t) + " is not a constructor");
  },
  FMe = lh,
  idr = Ade,
  adr = jD,
  odr = il,
  sdr = odr("species"),
  VJe = function (t, e) {
    var n,
      r = FMe(t).constructor;
    return r === void 0 || adr((n = FMe(r)[sdr])) ? e : idr(n);
  },
  ldr = TypeError,
  _H = function (t, e) {
    if (t < e) throw ldr("Not enough arguments");
    return t;
  },
  udr = lH,
  zJe = /(?:ipad|iphone|ipod).*applewebkit/i.test(udr),
  Xp = Ml,
  cdr = oO,
  ddr = Pd,
  UMe = Wl,
  hdr = qu,
  jJe = Yo,
  BMe = xQe,
  fdr = yO,
  HMe = ade,
  pdr = _H,
  gdr = zJe,
  mdr = _O,
  mie = Xp.setImmediate,
  yie = Xp.clearImmediate,
  ydr = Xp.process,
  $Y = Xp.Dispatch,
  vdr = Xp.Function,
  XMe = Xp.MessageChannel,
  bdr = Xp.String,
  xY = 0,
  j$ = {},
  VMe = "onreadystatechange";
jJe(function () {
  yL = Xp.location;
});
var wde = function (t) {
    if (hdr(j$, t)) {
      var e = j$[t];
      delete j$[t], e();
    }
  },
  LY = function (t) {
    return function () {
      wde(t);
    };
  },
  zMe = function (t) {
    wde(t.data);
  },
  jMe = function (t) {
    Xp.postMessage(bdr(t), yL.protocol + "//" + yL.host);
  };
(mie && yie) ||
  ((mie = function (t) {
    pdr(arguments.length, 1);
    var e = UMe(t) ? t : vdr(t),
      n = fdr(arguments, 1);
    return (
      (j$[++xY] = function () {
        cdr(e, void 0, n);
      }),
      Ew(xY),
      xY
    );
  }),
  (yie = function (t) {
    delete j$[t];
  }),
  mdr
    ? (Ew = function (t) {
        ydr.nextTick(LY(t));
      })
    : $Y && $Y.now
    ? (Ew = function (t) {
        $Y.now(LY(t));
      })
    : XMe && !gdr
    ? ((CY = (GMe = new XMe()).port2),
      (GMe.port1.onmessage = zMe),
      (Ew = ddr(CY.postMessage, CY)))
    : Xp.addEventListener &&
      UMe(Xp.postMessage) &&
      !Xp.importScripts &&
      yL &&
      yL.protocol !== "file:" &&
      !jJe(jMe)
    ? ((Ew = jMe), Xp.addEventListener("message", zMe, !1))
    : (Ew =
        VMe in HMe("script")
          ? function (t) {
              BMe.appendChild(HMe("script"))[VMe] = function () {
                BMe.removeChild(this), wde(t);
              };
            }
          : function (t) {
              setTimeout(LY(t), 0);
            }));
var WJe = { set: mie, clear: yie },
  KJe = function () {
    (this.head = null), (this.tail = null);
  };
KJe.prototype = {
  add: function (t) {
    var e = { item: t, next: null },
      n = this.tail;
    n ? (n.next = e) : (this.head = e), (this.tail = e);
  },
  get: function () {
    var t = this.head;
    if (t) return (this.head = t.next) === null && (this.tail = null), t.item;
  },
};
var Sw,
  OY,
  GY,
  NY,
  WMe,
  ZJe = KJe,
  _dr = lH,
  Tdr = /ipad|iphone|ipod/i.test(_dr) && typeof Pebble < "u",
  Edr = lH,
  Sdr = /web0s(?!.*chrome)/i.test(Edr),
  nR = Ml,
  KMe = Pd,
  Rdr = GE.f,
  FY = WJe.set,
  Adr = ZJe,
  wdr = zJe,
  kdr = Tdr,
  Idr = Sdr,
  UY = _O,
  ZMe = nR.MutationObserver || nR.WebKitMutationObserver,
  YMe = nR.document,
  QMe = nR.process,
  iN = nR.Promise,
  JMe = Rdr(nR, "queueMicrotask"),
  vie = JMe && JMe.value;
if (!vie) {
  var aN = new Adr(),
    oN = function () {
      var t, e;
      for (UY && (t = QMe.domain) && t.exit(); (e = aN.get()); )
        try {
          e();
        } catch (n) {
          throw (aN.head && Sw(), n);
        }
      t && t.enter();
    };
  wdr || UY || Idr || !ZMe || !YMe
    ? !kdr && iN && iN.resolve
      ? (((NY = iN.resolve(void 0)).constructor = iN),
        (WMe = KMe(NY.then, NY)),
        (Sw = function () {
          WMe(oN);
        }))
      : UY
      ? (Sw = function () {
          QMe.nextTick(oN);
        })
      : ((FY = KMe(FY, nR)),
        (Sw = function () {
          FY(oN);
        }))
    : ((OY = !0),
      (GY = YMe.createTextNode("")),
      new ZMe(oN).observe(GY, { characterData: !0 }),
      (Sw = function () {
        GY.data = OY = !OY;
      })),
    (vie = function (t) {
      aN.head || Sw(), aN.add(t);
    });
}
var Ddr = vie,
  Pdr = function (t, e) {
    try {
      arguments.length == 1 ? console.error(t) : console.error(t, e);
    } catch {}
  },
  JD = function (t) {
    try {
      return { error: !1, value: t() };
    } catch (e) {
      return { error: !0, value: e };
    }
  },
  Mdr = Ml,
  rR = Mdr.Promise,
  YJe = typeof Deno == "object" && Deno && typeof Deno.version == "object",
  Cdr = YJe,
  $dr = _O,
  xdr =
    !Cdr && !$dr && typeof window == "object" && typeof document == "object",
  Ldr = Ml,
  W$ = rR,
  Odr = Wl,
  Gdr = RQe,
  Ndr = kQe,
  Fdr = il,
  Udr = xdr,
  Bdr = YJe,
  BY = uD,
  qMe = W$ && W$.prototype,
  Hdr = Fdr("species"),
  QJe = !1,
  JJe = Odr(Ldr.PromiseRejectionEvent),
  Xdr = Gdr("Promise", function () {
    var t = Ndr(W$),
      e = t !== String(W$);
    if ((!e && BY === 66) || !qMe.catch || !qMe.finally) return !0;
    if (!BY || BY < 51 || !/native code/.test(t)) {
      var n = new W$(function (i) {
          i(1);
        }),
        r = function (i) {
          i(
            function () {},
            function () {}
          );
        };
      if (
        (((n.constructor = {})[Hdr] = r),
        !(QJe = n.then(function () {}) instanceof r))
      )
        return !0;
    }
    return !e && (Udr || Bdr) && !JJe;
  }),
  EO = { CONSTRUCTOR: Xdr, REJECTION_EVENT: JJe, SUBCLASSING: QJe },
  kv = {},
  eCe = sd,
  Vdr = TypeError,
  zdr = function (t) {
    var e, n;
    (this.promise = new t(function (r, i) {
      if (e !== void 0 || n !== void 0) throw Vdr("Bad Promise constructor");
      (e = r), (n = i);
    })),
      (this.resolve = eCe(e)),
      (this.reject = eCe(n));
  };
kv.f = function (t) {
  return new zdr(t);
};
var HY,
  tCe,
  jdr,
  Wdr = di,
  J8 = _O,
  dE = Ml,
  SO = Kl,
  Kdr = BE,
  Zdr = Pb,
  Ydr = XJe,
  Qdr = sd,
  bie = Wl,
  Jdr = mc,
  qdr = TO,
  ehr = VJe,
  qJe = WJe.set,
  kde = Ddr,
  thr = Pdr,
  nhr = JD,
  rhr = ZJe,
  eqe = HE,
  _ie = rR,
  tqe = EO,
  nqe = kv,
  f6 = "Promise",
  nCe = tqe.CONSTRUCTOR,
  ihr = tqe.REJECTION_EVENT,
  XY = eqe.getterFor(f6),
  ahr = eqe.set,
  ohr = _ie && _ie.prototype,
  $M = _ie,
  VY = ohr,
  rqe = dE.TypeError,
  Tie = dE.document,
  Ide = dE.process,
  Eie = nqe.f,
  shr = Eie,
  lhr = !!(Tie && Tie.createEvent && dE.dispatchEvent),
  iqe = "unhandledrejection",
  uhr = "rejectionhandled",
  rCe = 0,
  aqe = 1,
  chr = 2,
  Dde = 1,
  oqe = 2,
  sqe = function (t) {
    var e;
    return !(!Jdr(t) || !bie((e = t.then))) && e;
  },
  lqe = function (t, e) {
    var n,
      r,
      i,
      o = e.value,
      l = e.state == aqe,
      u = l ? t.ok : t.fail,
      c = t.resolve,
      d = t.reject,
      h = t.domain;
    try {
      u
        ? (l || (e.rejection === oqe && hhr(e), (e.rejection = Dde)),
          u === !0
            ? (n = o)
            : (h && h.enter(), (n = u(o)), h && (h.exit(), (i = !0))),
          n === t.promise
            ? d(rqe("Promise-chain cycle"))
            : (r = sqe(n))
            ? SO(r, n, c, d)
            : c(n))
        : d(o);
    } catch (f) {
      h && !i && h.exit(), d(f);
    }
  },
  uqe = function (t, e) {
    t.notified ||
      ((t.notified = !0),
      kde(function () {
        for (var n, r = t.reactions; (n = r.get()); ) lqe(n, t);
        (t.notified = !1), e && !t.rejection && dhr(t);
      }));
  },
  cqe = function (t, e, n) {
    var r, i;
    lhr
      ? (((r = Tie.createEvent("Event")).promise = e),
        (r.reason = n),
        r.initEvent(t, !1, !0),
        dE.dispatchEvent(r))
      : (r = { promise: e, reason: n }),
      !ihr && (i = dE["on" + t])
        ? i(r)
        : t === iqe && thr("Unhandled promise rejection", n);
  },
  dhr = function (t) {
    SO(qJe, dE, function () {
      var e,
        n = t.facade,
        r = t.value;
      if (
        iCe(t) &&
        ((e = nhr(function () {
          J8 ? Ide.emit("unhandledRejection", r, n) : cqe(iqe, n, r);
        })),
        (t.rejection = J8 || iCe(t) ? oqe : Dde),
        e.error)
      )
        throw e.value;
    });
  },
  iCe = function (t) {
    return t.rejection !== Dde && !t.parent;
  },
  hhr = function (t) {
    SO(qJe, dE, function () {
      var e = t.facade;
      J8 ? Ide.emit("rejectionHandled", e) : cqe(uhr, e, t.value);
    });
  },
  xk = function (t, e, n) {
    return function (r) {
      t(e, r, n);
    };
  },
  mI = function (t, e, n) {
    t.done ||
      ((t.done = !0), n && (t = n), (t.value = e), (t.state = chr), uqe(t, !0));
  },
  Sie = function (t, e, n) {
    if (!t.done) {
      (t.done = !0), n && (t = n);
      try {
        if (t.facade === e) throw rqe("Promise can't be resolved itself");
        var r = sqe(e);
        r
          ? kde(function () {
              var i = { done: !1 };
              try {
                SO(r, e, xk(Sie, i, t), xk(mI, i, t));
              } catch (o) {
                mI(i, o, t);
              }
            })
          : ((t.value = e), (t.state = aqe), uqe(t, !1));
      } catch (i) {
        mI({ done: !1 }, i, t);
      }
    }
  };
nCe &&
  ((VY = ($M = function (t) {
    qdr(this, VY), Qdr(t), SO(HY, this);
    var e = XY(this);
    try {
      t(xk(Sie, e), xk(mI, e));
    } catch (n) {
      mI(e, n);
    }
  }).prototype),
  ((HY = function (t) {
    ahr(this, {
      type: f6,
      done: !1,
      notified: !1,
      parent: !1,
      reactions: new rhr(),
      rejection: !1,
      state: rCe,
      value: void 0,
    });
  }).prototype = Kdr(VY, "then", function (t, e) {
    var n = XY(this),
      r = Eie(ehr(this, $M));
    return (
      (n.parent = !0),
      (r.ok = !bie(t) || t),
      (r.fail = bie(e) && e),
      (r.domain = J8 ? Ide.domain : void 0),
      n.state == rCe
        ? n.reactions.add(r)
        : kde(function () {
            lqe(r, n);
          }),
      r.promise
    );
  })),
  (tCe = function () {
    var t = new HY(),
      e = XY(t);
    (this.promise = t), (this.resolve = xk(Sie, e)), (this.reject = xk(mI, e));
  }),
  (nqe.f = Eie =
    function (t) {
      return t === $M || t === jdr ? new tCe(t) : shr(t);
    })),
  Wdr({ global: !0, constructor: !0, wrap: !0, forced: nCe }, { Promise: $M }),
  Zdr($M, f6, !1, !0),
  Ydr(f6);
var fhr = il,
  dqe = fhr("iterator"),
  hqe = !1;
try {
  var phr = 0,
    aCe = {
      next: function () {
        return { done: !!phr++ };
      },
      return: function () {
        hqe = !0;
      },
    };
  (aCe[dqe] = function () {
    return this;
  }),
    Array.from(aCe, function () {
      throw 2;
    });
} catch {}
var fqe = function (t, e) {
    if (!e && !hqe) return !1;
    var n = !1;
    try {
      var r = {};
      (r[dqe] = function () {
        return {
          next: function () {
            return { done: (n = !0) };
          },
        };
      }),
        t(r);
    } catch {}
    return n;
  },
  ghr = rR,
  mhr = fqe,
  yhr = EO.CONSTRUCTOR,
  TH =
    yhr ||
    !mhr(function (t) {
      ghr.all(t).then(void 0, function () {});
    }),
  vhr = di,
  bhr = Kl,
  _hr = sd,
  Thr = kv,
  Ehr = JD,
  Shr = X0,
  Rhr = TH;
vhr(
  { target: "Promise", stat: !0, forced: Rhr },
  {
    all: function (t) {
      var e = this,
        n = Thr.f(e),
        r = n.resolve,
        i = n.reject,
        o = Ehr(function () {
          var l = _hr(e.resolve),
            u = [],
            c = 0,
            d = 1;
          Shr(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              bhr(l, e, h).then(function (g) {
                p || ((p = !0), (u[f] = g), --d || r(u));
              }, i);
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var Ahr = di,
  whr = EO.CONSTRUCTOR;
rR && rR.prototype,
  Ahr(
    { target: "Promise", proto: !0, forced: whr, real: !0 },
    {
      catch: function (t) {
        return this.then(void 0, t);
      },
    }
  );
var khr = di,
  Ihr = Kl,
  Dhr = sd,
  Phr = kv,
  Mhr = JD,
  Chr = X0,
  $hr = TH;
khr(
  { target: "Promise", stat: !0, forced: $hr },
  {
    race: function (t) {
      var e = this,
        n = Phr.f(e),
        r = n.reject,
        i = Mhr(function () {
          var o = Dhr(e.resolve);
          Chr(t, function (l) {
            Ihr(o, e, l).then(n.resolve, r);
          });
        });
      return i.error && r(i.value), n.promise;
    },
  }
);
var xhr = di,
  Lhr = Kl,
  Ohr = kv,
  Ghr = EO.CONSTRUCTOR;
xhr(
  { target: "Promise", stat: !0, forced: Ghr },
  {
    reject: function (t) {
      var e = Ohr.f(this);
      return Lhr(e.reject, void 0, t), e.promise;
    },
  }
);
var Nhr = lh,
  Fhr = mc,
  Uhr = kv,
  pqe = function (t, e) {
    if ((Nhr(t), Fhr(e) && e.constructor === t)) return e;
    var n = Uhr.f(t);
    return (0, n.resolve)(e), n.promise;
  },
  Bhr = di,
  Hhr = Dd,
  Xhr = EQe,
  Vhr = rR,
  zhr = EO.CONSTRUCTOR,
  jhr = pqe,
  Whr = Hhr("Promise"),
  Khr = !zhr;
Bhr(
  { target: "Promise", stat: !0, forced: Xhr },
  {
    resolve: function (t) {
      return jhr(Khr && this === Whr ? Vhr : this, t);
    },
  }
);
var Zhr = di,
  Yhr = Kl,
  Qhr = sd,
  Jhr = kv,
  qhr = JD,
  efr = X0,
  tfr = TH;
Zhr(
  { target: "Promise", stat: !0, forced: tfr },
  {
    allSettled: function (t) {
      var e = this,
        n = Jhr.f(e),
        r = n.resolve,
        i = n.reject,
        o = qhr(function () {
          var l = Qhr(e.resolve),
            u = [],
            c = 0,
            d = 1;
          efr(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              Yhr(l, e, h).then(
                function (g) {
                  p ||
                    ((p = !0),
                    (u[f] = { status: "fulfilled", value: g }),
                    --d || r(u));
                },
                function (g) {
                  p ||
                    ((p = !0),
                    (u[f] = { status: "rejected", reason: g }),
                    --d || r(u));
                }
              );
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var nfr = di,
  rfr = Kl,
  ifr = sd,
  afr = Dd,
  ofr = kv,
  sfr = JD,
  lfr = X0,
  ufr = TH,
  oCe = "No one promise resolved";
nfr(
  { target: "Promise", stat: !0, forced: ufr },
  {
    any: function (t) {
      var e = this,
        n = afr("AggregateError"),
        r = ofr.f(e),
        i = r.resolve,
        o = r.reject,
        l = sfr(function () {
          var u = ifr(e.resolve),
            c = [],
            d = 0,
            h = 1,
            f = !1;
          lfr(t, function (p) {
            var g = d++,
              y = !1;
            h++,
              rfr(u, e, p).then(
                function (v) {
                  y || f || ((f = !0), i(v));
                },
                function (v) {
                  y || f || ((y = !0), (c[g] = v), --h || o(new n(c, oCe)));
                }
              );
          }),
            --h || o(new n(c, oCe));
        });
      return l.error && o(l.value), r.promise;
    },
  }
);
var cfr = di,
  Rie = rR,
  dfr = Yo,
  hfr = Dd,
  ffr = Wl,
  pfr = VJe,
  sCe = pqe,
  gfr = Rie && Rie.prototype,
  mfr =
    !!Rie &&
    dfr(function () {
      gfr.finally.call({ then: function () {} }, function () {});
    });
cfr(
  { target: "Promise", proto: !0, real: !0, forced: mfr },
  {
    finally: function (t) {
      var e = pfr(this, hfr("Promise")),
        n = ffr(t);
      return this.then(
        n
          ? function (r) {
              return sCe(e, t()).then(function () {
                return r;
              });
            }
          : t,
        n
          ? function (r) {
              return sCe(e, t()).then(function () {
                throw r;
              });
            }
          : t
      );
    },
  }
);
var yfr = js,
  vfr = yfr.Promise,
  bfr = vfr,
  _fr = bfr,
  Tfr = _fr,
  Efr = Tfr,
  Sfr = di,
  Rfr = kv;
Sfr(
  { target: "Promise", stat: !0, forced: !0 },
  {
    withResolvers: function () {
      var t = Rfr.f(this);
      return { promise: t.promise, resolve: t.resolve, reject: t.reject };
    },
  }
);
var Afr = di,
  wfr = kv,
  kfr = JD;
Afr(
  { target: "Promise", stat: !0, forced: !0 },
  {
    try: function (t) {
      var e = wfr.f(this),
        n = kfr(t);
      return (n.error ? e.reject : e.resolve)(n.value), e.promise;
    },
  }
);
var Ifr = Efr,
  Dfr = Ifr,
  gqe = Dfr,
  Pde = Sa(gqe),
  Pfr = di,
  Mfr = ls,
  Cfr = GR,
  $fr = Mfr([].reverse),
  lCe = [1, 2];
Pfr(
  { target: "Array", proto: !0, forced: String(lCe) === String(lCe.reverse()) },
  {
    reverse: function () {
      return Cfr(this) && (this.length = this.length), $fr(this);
    },
  }
);
var xfr = ld,
  Lfr = xfr("Array").reverse,
  Ofr = xu,
  Gfr = Lfr,
  zY = Array.prototype,
  Nfr = function (t) {
    var e = t.reverse;
    return t === zY || (Ofr(zY, t) && e === zY.reverse) ? Gfr : e;
  },
  Ffr = Nfr,
  Ufr = Ffr,
  Bfr = Ufr,
  Hfr = Bfr,
  Xfr = Hfr,
  Vfr = Xfr,
  mqe = Vfr,
  zfr = Sa(mqe),
  jfr = di,
  uCe = GR,
  Wfr = hH,
  Kfr = mc,
  cCe = cO,
  Zfr = H0,
  Yfr = wv,
  Qfr = YD,
  Jfr = il,
  qfr = uO,
  epr = yO,
  tpr = qfr("slice"),
  npr = Jfr("species"),
  jY = Array,
  rpr = Math.max;
jfr(
  { target: "Array", proto: !0, forced: !tpr },
  {
    slice: function (t, e) {
      var n,
        r,
        i,
        o = Yfr(this),
        l = Zfr(o),
        u = cCe(t, l),
        c = cCe(e === void 0 ? l : e, l);
      if (
        uCe(o) &&
        ((n = o.constructor),
        ((Wfr(n) && (n === jY || uCe(n.prototype))) ||
          (Kfr(n) && (n = n[npr]) === null)) &&
          (n = void 0),
        n === jY || n === void 0)
      )
        return epr(o, u, c);
      for (
        r = new (n === void 0 ? jY : n)(rpr(c - u, 0)), i = 0;
        u < c;
        u++, i++
      )
        u in o && Qfr(r, i, o[u]);
      return (r.length = i), r;
    },
  }
);
var ipr = ld,
  apr = ipr("Array").slice,
  opr = xu,
  spr = apr,
  WY = Array.prototype,
  lpr = function (t) {
    var e = t.slice;
    return t === WY || (opr(WY, t) && e === WY.slice) ? spr : e;
  },
  upr = lpr,
  cpr = upr,
  dpr = cpr,
  hpr = dpr,
  fpr = hpr,
  ppr = fpr,
  yqe = ppr,
  gpr = Sa(yqe);
function wc() {
  wc = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      tR ||
      function (H, E, S) {
        H[E] = S.value;
      },
    i = typeof $k == "function" ? $k : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(H, E, S) {
    return (
      tR(H, E, { value: S, enumerable: !0, configurable: !0, writable: !0 }),
      H[E]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (E, S, L) {
      return (E[S] = L);
    };
  }
  function d(H, E, S, L) {
    var W = E && E.prototype instanceof p ? E : p,
      F = d6(W.prototype),
      oe = new O(L || []);
    return r(F, "_invoke", { value: $(H, S, oe) }), F;
  }
  function h(H, E, S) {
    try {
      return { type: "normal", arg: H.call(E, S) };
    } catch (L) {
      return { type: "throw", arg: L };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = z$ && z$(z$(X([])));
  b && b !== e && n.call(b, o) && (v = b);
  var w = (y.prototype = p.prototype = d6(v));
  function k(H) {
    var E;
    V$((E = ["next", "throw", "return"])).call(E, function (S) {
      c(H, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function D(H, E) {
    function S(W, F, oe, De) {
      var Xe = h(H[W], H, F);
      if (Xe.type !== "throw") {
        var ze = Xe.arg,
          ht = ze.value;
        return ht && ed(ht) == "object" && n.call(ht, "__await")
          ? E.resolve(ht.__await).then(
              function (gt) {
                S("next", gt, oe, De);
              },
              function (gt) {
                S("throw", gt, oe, De);
              }
            )
          : E.resolve(ht).then(
              function (gt) {
                (ze.value = gt), oe(ze);
              },
              function (gt) {
                return S("throw", gt, oe, De);
              }
            );
      }
      De(Xe.arg);
    }
    var L;
    r(this, "_invoke", {
      value: function (W, F) {
        function oe() {
          return new E(function (De, Xe) {
            S(W, F, De, Xe);
          });
        }
        return (L = L ? L.then(oe, oe) : oe());
      },
    });
  }
  function $(H, E, S) {
    var L = "suspendedStart";
    return function (W, F) {
      if (L === "executing") throw new Error("Generator is already running");
      if (L === "completed") {
        if (W === "throw") throw F;
        return { value: void 0, done: !0 };
      }
      for (S.method = W, S.arg = F; ; ) {
        var oe = S.delegate;
        if (oe) {
          var De = N(oe, S);
          if (De) {
            if (De === f) continue;
            return De;
          }
        }
        if (S.method === "next") S.sent = S._sent = S.arg;
        else if (S.method === "throw") {
          if (L === "suspendedStart") throw ((L = "completed"), S.arg);
          S.dispatchException(S.arg);
        } else S.method === "return" && S.abrupt("return", S.arg);
        L = "executing";
        var Xe = h(H, E, S);
        if (Xe.type === "normal") {
          if (((L = S.done ? "completed" : "suspendedYield"), Xe.arg === f))
            continue;
          return { value: Xe.arg, done: S.done };
        }
        Xe.type === "throw" &&
          ((L = "completed"), (S.method = "throw"), (S.arg = Xe.arg));
      }
    };
  }
  function N(H, E) {
    var S = E.method,
      L = H.iterator[S];
    if (L === void 0)
      return (
        (E.delegate = null),
        (S === "throw" &&
          H.iterator.return &&
          ((E.method = "return"),
          (E.arg = void 0),
          N(H, E),
          E.method === "throw")) ||
          (S !== "return" &&
            ((E.method = "throw"),
            (E.arg = new TypeError(
              "The iterator does not provide a '" + S + "' method"
            )))),
        f
      );
    var W = h(L, H.iterator, E.arg);
    if (W.type === "throw")
      return (E.method = "throw"), (E.arg = W.arg), (E.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((E[H.resultName] = F.value),
          (E.next = H.nextLoc),
          E.method !== "return" && ((E.method = "next"), (E.arg = void 0)),
          (E.delegate = null),
          f)
        : F
      : ((E.method = "throw"),
        (E.arg = new TypeError("iterator result is not an object")),
        (E.delegate = null),
        f);
  }
  function P(H) {
    var E,
      S = { tryLoc: H[0] };
    1 in H && (S.catchLoc = H[1]),
      2 in H && ((S.finallyLoc = H[2]), (S.afterLoc = H[3])),
      Z8((E = this.tryEntries)).call(E, S);
  }
  function I(H) {
    var E = H.completion || {};
    (E.type = "normal"), delete E.arg, (H.completion = E);
  }
  function O(H) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      V$(H).call(H, P, this),
      this.reset(!0);
  }
  function X(H) {
    if (H) {
      var E = H[o];
      if (E) return E.call(H);
      if (typeof H.next == "function") return H;
      if (!isNaN(H.length)) {
        var S = -1,
          L = function W() {
            for (; ++S < H.length; )
              if (n.call(H, S)) return (W.value = H[S]), (W.done = !1), W;
            return (W.value = void 0), (W.done = !0), W;
          };
        return (L.next = L);
      }
    }
    return { next: G };
  }
  function G() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(w, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (H) {
      var E = typeof H == "function" && H.constructor;
      return (
        !!E && (E === g || (E.displayName || E.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (H) {
      return (
        mL ? mL(H, y) : ((H.__proto__ = y), c(H, u, "GeneratorFunction")),
        (H.prototype = d6(w)),
        H
      );
    }),
    (t.awrap = function (H) {
      return { __await: H };
    }),
    k(D.prototype),
    c(D.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = D),
    (t.async = function (H, E, S, L, W) {
      W === void 0 && (W = Pde);
      var F = new D(d(H, E, S, L), W);
      return t.isGeneratorFunction(E)
        ? F
        : F.next().then(function (oe) {
            return oe.done ? oe.value : F.next();
          });
    }),
    k(w),
    c(w, u, "Generator"),
    c(w, o, function () {
      return this;
    }),
    c(w, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (H) {
      var E = Object(H),
        S = [];
      for (var L in E) Z8(S).call(S, L);
      return (
        zfr(S).call(S),
        function W() {
          for (; S.length; ) {
            var F = S.pop();
            if (F in E) return (W.value = F), (W.done = !1), W;
          }
          return (W.done = !0), W;
        }
      );
    }),
    (t.values = X),
    (O.prototype = {
      constructor: O,
      reset: function (H) {
        var E;
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          V$((E = this.tryEntries)).call(E, I),
          !H)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+gpr(S).call(S, 1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var H = this.tryEntries[0].completion;
        if (H.type === "throw") throw H.arg;
        return this.rval;
      },
      dispatchException: function (H) {
        if (this.done) throw H;
        var E = this;
        function S(Xe, ze) {
          return (
            (F.type = "throw"),
            (F.arg = H),
            (E.next = Xe),
            ze && ((E.method = "next"), (E.arg = void 0)),
            !!ze
          );
        }
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L],
            F = W.completion;
          if (W.tryLoc === "root") return S("end");
          if (W.tryLoc <= this.prev) {
            var oe = n.call(W, "catchLoc"),
              De = n.call(W, "finallyLoc");
            if (oe && De) {
              if (this.prev < W.catchLoc) return S(W.catchLoc, !0);
              if (this.prev < W.finallyLoc) return S(W.finallyLoc);
            } else if (oe) {
              if (this.prev < W.catchLoc) return S(W.catchLoc, !0);
            } else {
              if (!De)
                throw new Error("try statement without catch or finally");
              if (this.prev < W.finallyLoc) return S(W.finallyLoc);
            }
          }
        }
      },
      abrupt: function (H, E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (
            L.tryLoc <= this.prev &&
            n.call(L, "finallyLoc") &&
            this.prev < L.finallyLoc
          ) {
            var W = L;
            break;
          }
        }
        W &&
          (H === "break" || H === "continue") &&
          W.tryLoc <= E &&
          E <= W.finallyLoc &&
          (W = null);
        var F = W ? W.completion : {};
        return (
          (F.type = H),
          (F.arg = E),
          W
            ? ((this.method = "next"), (this.next = W.finallyLoc), f)
            : this.complete(F)
        );
      },
      complete: function (H, E) {
        if (H.type === "throw") throw H.arg;
        return (
          H.type === "break" || H.type === "continue"
            ? (this.next = H.arg)
            : H.type === "return"
            ? ((this.rval = this.arg = H.arg),
              (this.method = "return"),
              (this.next = "end"))
            : H.type === "normal" && E && (this.next = E),
          f
        );
      },
      finish: function (H) {
        for (var E = this.tryEntries.length - 1; E >= 0; --E) {
          var S = this.tryEntries[E];
          if (S.finallyLoc === H)
            return this.complete(S.completion, S.afterLoc), I(S), f;
        }
      },
      catch: function (H) {
        for (var E = this.tryEntries.length - 1; E >= 0; --E) {
          var S = this.tryEntries[E];
          if (S.tryLoc === H) {
            var L = S.completion;
            if (L.type === "throw") {
              var W = L.arg;
              I(S);
            }
            return W;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (H, E, S) {
        return (
          (this.delegate = { iterator: X(H), resultName: E, nextLoc: S }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function dCe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Pde.resolve(c).then(r, i);
}
function x1(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Pde(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        dCe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        dCe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function $o(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function hCe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      tR(t, OJe(r.key), r);
  }
}
function xo(t, e, n) {
  return (
    e && hCe(t.prototype, e),
    n && hCe(t, n),
    tR(t, "prototype", { writable: !1 }),
    t
  );
}
var mpr = gqe,
  Gf = Sa(mpr),
  ypr = DJe,
  Dc = Sa(ypr),
  vpr = EJe,
  Mf = Sa(vpr),
  Aie = js,
  bpr = oO;
Aie.JSON || (Aie.JSON = { stringify: JSON.stringify });
var _pr = function (t, e, n) {
    return bpr(Aie.JSON.stringify, null, arguments);
  },
  Tpr = _pr,
  Epr = Tpr,
  Spr = Epr,
  Rpr = Spr,
  Apr = Rpr,
  wpr = Apr,
  kpr = wpr,
  Ipr = kpr,
  QT = Sa(Ipr),
  fCe = Ju,
  Dpr = ls,
  Ppr = Kl,
  Mpr = Yo,
  KY = pH,
  Cpr = fO,
  $pr = oH,
  xpr = tg,
  Lpr = sH,
  Rw = Object.assign,
  pCe = Object.defineProperty,
  Opr = Dpr([].concat),
  vqe =
    !Rw ||
    Mpr(function () {
      if (
        fCe &&
        Rw(
          { b: 1 },
          Rw(
            pCe({}, "a", {
              enumerable: !0,
              get: function () {
                pCe(this, "b", { value: 3, enumerable: !1 });
              },
            }),
            { b: 2 }
          )
        ).b !== 1
      )
        return !0;
      var t = {},
        e = {},
        n = Symbol(),
        r = "abcdefghijklmnopqrst";
      return (
        (t[n] = 7),
        r.split("").forEach(function (i) {
          e[i] = i;
        }),
        Rw({}, t)[n] != 7 || KY(Rw({}, e)).join("") != r
      );
    })
      ? function (t, e) {
          for (
            var n = xpr(t), r = arguments.length, i = 1, o = Cpr.f, l = $pr.f;
            r > i;

          )
            for (
              var u,
                c = Lpr(arguments[i++]),
                d = o ? Opr(KY(c), o(c)) : KY(c),
                h = d.length,
                f = 0;
              h > f;

            )
              (u = d[f++]), (fCe && !Ppr(l, c, u)) || (n[u] = c[u]);
          return n;
        }
      : Rw,
  Gpr = di,
  gCe = vqe;
Gpr(
  { target: "Object", stat: !0, arity: 2, forced: Object.assign !== gCe },
  { assign: gCe }
);
var Npr = js,
  Fpr = Npr.Object.assign,
  Upr = Fpr,
  Bpr = Upr,
  Hpr = Bpr,
  Xpr = Hpr,
  Vpr = Xpr,
  zpr = Vpr,
  jpr = zpr,
  Wpr = jpr,
  iR = Sa(Wpr),
  Kpr = ld,
  Zpr = Kpr("Array").concat,
  Ypr = xu,
  Qpr = Zpr,
  ZY = Array.prototype,
  Jpr = function (t) {
    var e = t.concat;
    return t === ZY || (Ypr(ZY, t) && e === ZY.concat) ? Qpr : e;
  },
  qpr = Jpr,
  egr = qpr,
  tgr = egr,
  ngr = tgr,
  rgr = ngr,
  igr = rgr,
  agr = igr,
  ogr = agr,
  eh = Sa(ogr),
  sgr = SJe,
  K$ = Sa(sgr),
  lgr = di,
  ugr = NR.map,
  cgr = uO,
  dgr = cgr("map");
lgr(
  { target: "Array", proto: !0, forced: !dgr },
  {
    map: function (t) {
      return ugr(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var hgr = ld,
  fgr = hgr("Array").map,
  pgr = xu,
  ggr = fgr,
  YY = Array.prototype,
  mgr = function (t) {
    var e = t.map;
    return t === YY || (pgr(YY, t) && e === YY.map) ? ggr : e;
  },
  ygr = mgr,
  vgr = ygr,
  bgr = vgr,
  _gr = bgr,
  Tgr = _gr,
  Egr = Tgr,
  Sgr = Egr,
  Rgr = Sgr,
  Qy = Sa(Rgr),
  Agr = di,
  wgr = cde.includes,
  kgr = Yo,
  Igr = kgr(function () {
    return !Array(1).includes();
  });
Agr(
  { target: "Array", proto: !0, forced: Igr },
  {
    includes: function (t) {
      return wgr(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Dgr = ld,
  Pgr = Dgr("Array").includes,
  Mgr = mc,
  Cgr = Ib,
  $gr = il,
  xgr = $gr("match"),
  Lgr = function (t) {
    var e;
    return Mgr(t) && ((e = t[xgr]) !== void 0 ? !!e : Cgr(t) == "RegExp");
  },
  Ogr = Lgr,
  Ggr = TypeError,
  Ngr = function (t) {
    if (Ogr(t)) throw Ggr("The method doesn't accept regular expressions");
    return t;
  },
  Fgr = il,
  Ugr = Fgr("match"),
  Bgr = function (t) {
    var e = /./;
    try {
      "/./"[t](e);
    } catch {
      try {
        return (e[Ugr] = !1), "/./"[t](e);
      } catch {}
    }
    return !1;
  },
  Hgr = di,
  Xgr = ls,
  Vgr = Ngr,
  zgr = WD,
  mCe = ng,
  jgr = Bgr,
  Wgr = Xgr("".indexOf);
Hgr(
  { target: "String", proto: !0, forced: !jgr("includes") },
  {
    includes: function (t) {
      return !!~Wgr(
        mCe(zgr(this)),
        mCe(Vgr(t)),
        arguments.length > 1 ? arguments[1] : void 0
      );
    },
  }
);
var Kgr = ld,
  Zgr = Kgr("String").includes,
  yCe = xu,
  Ygr = Pgr,
  Qgr = Zgr,
  QY = Array.prototype,
  JY = String.prototype,
  Jgr = function (t) {
    var e = t.includes;
    return t === QY || (yCe(QY, t) && e === QY.includes)
      ? Ygr
      : typeof t == "string" || t === JY || (yCe(JY, t) && e === JY.includes)
      ? Qgr
      : e;
  },
  qgr = Jgr,
  emr = qgr,
  tmr = emr,
  nmr = tmr,
  rmr = nmr,
  imr = rmr,
  amr = imr,
  omr = amr,
  dD = Sa(omr);
function bqe(t, e) {
  try {
    (typeof window > "u" ? "undefined" : ed(window)) === "object" &&
      window.localStorage &&
      window.localStorage.setItem(t, e);
  } catch {}
}
function _qe(t) {
  try {
    return (typeof window > "u" ? "undefined" : ed(window)) === "object" &&
      window.localStorage
      ? window.localStorage.getItem(t)
      : null;
  } catch {
    return null;
  }
}
function smr(t) {
  return t.replace(/[A-Z]/g, function (e) {
    return "_".concat(e.toLowerCase());
  });
}
function lmr(t) {
  if (!t || Object.prototype.toString.call(t) !== "[object Object]") return {};
  var e = {};
  for (var n in t)
    Object.prototype.hasOwnProperty.call(t, n) && (e[smr(n)] = t[n]);
  return e;
}
var umr = di,
  cmr = ls,
  Tqe = Date,
  dmr = cmr(Tqe.prototype.getTime);
umr(
  { target: "Date", stat: !0 },
  {
    now: function () {
      return dmr(new Tqe());
    },
  }
);
var hmr = js,
  fmr = hmr.Date.now,
  pmr = fmr,
  gmr = pmr,
  mmr = gmr,
  ymr = mmr,
  vmr = ymr,
  bmr = vmr,
  _mr = bmr,
  Tmr = _mr,
  aR = Sa(Tmr),
  To = (function (t) {
    return (t.VOD = "VOD"), (t.LIVE = "LIVE"), t;
  })(To || {}),
  Mde = (function (t) {
    return (t.CN = "cn"), (t.SG = "sg"), (t.US = "us"), t;
  })(Mde || {}),
  p6 = (function (t) {
    return (t.MP4 = "mp4"), (t.DASH = "dash"), t;
  })(p6 || {}),
  Eqe = (function (t) {
    return (
      (t.h265 = "h265"),
      (t.adaptRange = "adaptRange"),
      (t.preload = "preload"),
      t
    );
  })(Eqe || {}),
  Emr = { info: 3, warn: 2, error: 1 },
  Cde = (function () {
    function t(e, n) {
      var r = this;
      $o(this, t),
        da(this, "logger", void 0),
        da(this, "level", void 0),
        da(this, "customLogger", void 0),
        (this.level = n == null ? void 0 : n.level),
        (this.customLogger = n == null ? void 0 : n.logger),
        (this.logger = function (i, o) {
          var l, u, c, d;
          try {
            d = "1.1.0-rc.0";
          } catch {
            d = "--";
          }
          for (
            var h,
              f,
              p,
              g,
              y,
              v,
              b,
              w,
              k,
              D,
              $,
              N = eh((l = eh((u = "[".concat(e, "]["))).call(u, d, "]["))).call(
                l,
                o,
                "]"
              ),
              P = arguments.length,
              I = new Array(P > 2 ? P - 2 : 0),
              O = 2;
            O < P;
            O++
          )
            I[O - 2] = arguments[O];
          if (r.customLogger)
            return i === "info"
              ? r.customLogger.info
                ? (g = r.customLogger).info.apply(g, eh((y = [N])).call(y, I))
                : (v = (b = r.customLogger).log) === null || v === void 0
                ? void 0
                : v.call.apply(v, eh((w = [b, N])).call(w, I))
              : (h = (f = r.customLogger)[i]) === null || h === void 0
              ? void 0
              : h.call.apply(h, eh((p = [f, N])).call(p, I));
          (((c = r.level) !== null && c !== void 0 ? c : 1) >= Emr[i] ||
            (typeof window < "u" && r._checkOpenLog())) &&
            ((k = window.console) === null ||
              k === void 0 ||
              (D = k[i]) === null ||
              D === void 0 ||
              D.call.apply(D, eh(($ = [k, N])).call($, I)));
        });
    }
    return (
      xo(t, [
        {
          key: "update",
          value: function (e) {
            var n = e || {},
              r = n.logger,
              i = n.level;
            this.updateLevel(i), this.updateLogger(r);
          },
        },
        {
          key: "info",
          value: function (e) {
            for (
              var n,
                r = arguments.length,
                i = new Array(r > 1 ? r - 1 : 0),
                o = 1;
              o < r;
              o++
            )
              i[o - 1] = arguments[o];
            this.logger.apply(this, eh((n = ["info", e])).call(n, i));
          },
        },
        {
          key: "warn",
          value: function (e) {
            for (
              var n,
                r = arguments.length,
                i = new Array(r > 1 ? r - 1 : 0),
                o = 1;
              o < r;
              o++
            )
              i[o - 1] = arguments[o];
            this.logger.apply(this, eh((n = ["warn", e])).call(n, i));
          },
        },
        {
          key: "error",
          value: function (e) {
            for (
              var n,
                r = arguments.length,
                i = new Array(r > 1 ? r - 1 : 0),
                o = 1;
              o < r;
              o++
            )
              i[o - 1] = arguments[o];
            this.logger.apply(this, eh((n = ["error", e])).call(n, i));
          },
        },
        {
          key: "updateLevel",
          value: function (e) {
            ed(e) !== void 0 && (this.level = e);
          },
        },
        {
          key: "updateLogger",
          value: function (e) {
            e && (this.customLogger = e);
          },
        },
        {
          key: "_checkOpenLog",
          value: function () {
            try {
              return !!window.localStorage.getItem("VESTRATEGY_LOG");
            } catch {
              return !1;
            }
          },
        },
      ]),
      t
    );
  })(),
  sN = {
    DEVICE_INFO: "VESTRATEGY_DEVICE_INFO",
    DEVICE_INFO_LIVE: "VESTRATEGY_DEVICE_INFO_LIVE",
  },
  lN = {
    SERVICE_CONFIG: "STRATEGY_SERVICE_CONFIG",
    SERVICE_CONFIG_LIVE: "STRATEGY_SERVICE_CONFIG_LIVE",
  },
  uN = new Cde("VeStrategy"),
  Smr = (function () {
    function t(n, r) {
      $o(this, t),
        da(this, "initStrategyConfig", void 0),
        da(this, "serviceStrategyConfigLoader", void 0),
        da(this, "serviceStrategyConfig", void 0),
        da(this, "appConfig", void 0),
        da(this, "videoType", void 0),
        (this.videoType = n.type || To.VOD),
        (this.initStrategyConfig = n.strategies),
        (this.appConfig = n),
        (this.serviceStrategyConfigLoader = r),
        uN.update(n.log);
    }
    var e;
    return (
      xo(t, [
        {
          key: "getInitStrategyConfig",
          value: function () {
            return this.initStrategyConfig;
          },
        },
        {
          key: "getServiceStrategyConfig",
          value: function () {
            if (this.serviceStrategyConfig) return this.serviceStrategyConfig;
            try {
              var n = _qe(
                To.LIVE === this.videoType
                  ? lN.SERVICE_CONFIG_LIVE
                  : lN.SERVICE_CONFIG
              );
              n && (this.serviceStrategyConfig = JSON.parse(n));
            } catch {}
            return this.serviceStrategyConfig;
          },
        },
        {
          key: "fetchStrategyConfig",
          value:
            ((e = x1(
              wc().mark(function n() {
                var r;
                return wc().wrap(
                  function (i) {
                    for (;;)
                      switch ((i.prev = i.next)) {
                        case 0:
                          if (this.needFetchStrategyConfig()) {
                            i.next = 3;
                            break;
                          }
                          return (
                            uN.info("UseLocalStrategyConfig"),
                            i.abrupt("return")
                          );
                        case 3:
                          if (
                            ((i.prev = 3), !this.serviceStrategyConfigLoader)
                          ) {
                            i.next = 8;
                            break;
                          }
                          return (
                            (i.next = 7),
                            this.serviceStrategyConfigLoader.fetch()
                          );
                        case 7:
                          r = i.sent;
                        case 8:
                          i.next = 13;
                          break;
                        case 10:
                          (i.prev = 10),
                            (i.t0 = i.catch(3)),
                            uN.warn(
                              "FetchStrategyConfigError",
                              QT({
                                message:
                                  i.t0 === null || i.t0 === void 0
                                    ? void 0
                                    : i.t0.message,
                                name:
                                  i.t0 === null || i.t0 === void 0
                                    ? void 0
                                    : i.t0.name,
                              })
                            );
                        case 13:
                          bqe(
                            To.LIVE === this.videoType
                              ? lN.SERVICE_CONFIG_LIVE
                              : lN.SERVICE_CONFIG,
                            QT(r)
                          ),
                            uN.info("ServiceStrategyConfig", r),
                            (this.serviceStrategyConfig = r || void 0);
                        case 16:
                        case "end":
                          return i.stop();
                      }
                  },
                  n,
                  this,
                  [[3, 10]]
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        { key: "updateStrategyConfig", value: function () {} },
        { key: "getStrategyConfig", value: function () {} },
        { key: "getStrategyConfigByName", value: function () {} },
        {
          key: "getAppConfig",
          value: function () {
            return this.appConfig;
          },
        },
        {
          key: "needFetchStrategyConfig",
          value: function () {
            var n;
            return (
              this.getServiceStrategyConfig(),
              !this.serviceStrategyConfig ||
                !this.serviceStrategyConfig.use_local_cache ||
                !!(
                  this.serviceStrategyConfig.local_cache_expired_at &&
                  aR() > this.serviceStrategyConfig.local_cache_expired_at
                ) ||
                this.serviceStrategyConfig.cache_key !==
                  ((n = this.serviceStrategyConfigLoader) === null ||
                  n === void 0
                    ? void 0
                    : n.getCacheKey())
            );
          },
        },
      ]),
      t
    );
  })(),
  Sqe = ls,
  Rmr = sd,
  Amr = mc,
  wmr = qu,
  vCe = yO,
  kmr = aO,
  Rqe = Function,
  Imr = Sqe([].concat),
  Dmr = Sqe([].join),
  qY = {},
  Pmr = function (t, e, n) {
    if (!wmr(qY, e)) {
      for (var r = [], i = 0; i < e; i++) r[i] = "a[" + i + "]";
      qY[e] = Rqe("C,a", "return new C(" + Dmr(r, ",") + ")");
    }
    return qY[e](t, n);
  },
  Aqe = kmr
    ? Rqe.bind
    : function (t) {
        var e = Rmr(this),
          n = e.prototype,
          r = vCe(arguments, 1),
          i = function () {
            var o = Imr(r, vCe(arguments));
            return this instanceof i ? Pmr(e, o.length, o) : e.apply(t, o);
          };
        return Amr(n) && (i.prototype = n), i;
      },
  Mmr = di,
  bCe = Aqe;
Mmr(
  { target: "Function", proto: !0, forced: Function.bind !== bCe },
  { bind: bCe }
);
var Cmr = ld,
  $mr = Cmr("Function").bind,
  xmr = xu,
  Lmr = $mr,
  eQ = Function.prototype,
  Omr = function (t) {
    var e = t.bind;
    return t === eQ || (xmr(eQ, t) && e === eQ.bind) ? Lmr : e;
  },
  Gmr = Omr,
  Nmr = Gmr,
  Fmr = Nmr,
  Umr = Fmr,
  Bmr = Umr,
  Hmr = Bmr,
  Xmr = Hmr,
  vL = Sa(Xmr);
function $de(t, e) {
  var n;
  return ($de = mL
    ? vL((n = mL)).call(n)
    : function (r, i) {
        return (r.__proto__ = i), r;
      })(t, e);
}
function rg(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = d6(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    tR(t, "prototype", { writable: !1 }),
    e && $de(t, e);
}
var Vmr = di,
  zmr = Dd,
  tQ = oO,
  jmr = Aqe,
  _Ce = Ade,
  Wmr = lh,
  TCe = mc,
  Kmr = UE,
  wqe = Yo,
  xde = zmr("Reflect", "construct"),
  Zmr = Object.prototype,
  Ymr = [].push,
  kqe = wqe(function () {
    function t() {}
    return !(xde(function () {}, [], t) instanceof t);
  }),
  Iqe = !wqe(function () {
    xde(function () {});
  }),
  ECe = kqe || Iqe;
Vmr(
  { target: "Reflect", stat: !0, forced: ECe, sham: ECe },
  {
    construct: function (t, e) {
      _Ce(t), Wmr(e);
      var n = arguments.length < 3 ? t : _Ce(arguments[2]);
      if (Iqe && !kqe) return xde(t, e, n);
      if (t == n) {
        switch (e.length) {
          case 0:
            return new t();
          case 1:
            return new t(e[0]);
          case 2:
            return new t(e[0], e[1]);
          case 3:
            return new t(e[0], e[1], e[2]);
          case 4:
            return new t(e[0], e[1], e[2], e[3]);
        }
        var r = [null];
        return tQ(Ymr, r, e), new (tQ(jmr, t, r))();
      }
      var i = n.prototype,
        o = Kmr(TCe(i) ? i : Zmr),
        l = tQ(t, o, e);
      return TCe(l) ? l : o;
    },
  }
);
var Qmr = js,
  Jmr = Qmr.Reflect.construct,
  qmr = Jmr,
  e0r = qmr,
  t0r = e0r,
  n0r = t0r,
  r0r = n0r,
  i0r = r0r,
  a0r = i0r,
  Z$ = Sa(a0r);
function hE(t) {
  var e;
  return (hE = mL
    ? vL((e = z$)).call(e)
    : function (n) {
        return n.__proto__ || z$(n);
      })(t);
}
function Dqe() {
  if (typeof Reflect > "u" || !Z$ || Z$.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(Z$(Boolean, [], function () {})), !0;
  } catch {
    return !1;
  }
}
function Lk(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function o0r(t, e) {
  if (e && (ed(e) === "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return Lk(t);
}
function ig(t) {
  var e = Dqe();
  return function () {
    var n,
      r = hE(t);
    if (e) {
      var i = hE(this).constructor;
      n = Z$(r, arguments, i);
    } else n = r.apply(this, arguments);
    return o0r(this, n);
  };
}
var s0r = LJe,
  hD = Sa(s0r),
  l0r = hD,
  u0r = function (t, e, n) {
    return e in t
      ? l0r(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  SCe = function (t, e, n) {
    return u0r(t, ed(e) !== "symbol" ? e + "" : e, n), n;
  },
  RO = (function () {
    function t(e) {
      $o(this, t),
        SCe(this, "options"),
        SCe(this, "scores"),
        (this.options = e),
        (this.scores = []),
        this._init();
    }
    return (
      xo(t, [
        {
          key: "_init",
          value: function () {
            var e,
              n = this;
            Dc((e = Mf(this.options.plugins))).call(e, function (r) {
              var i = n.options.plugins[r];
              i.ignore ||
                (i.cls && (i.instance = new i.cls(i)),
                i.instance &&
                  n.scores.push(
                    new Gf(function (o) {
                      i.instance.getScore().then(function (l) {
                        o({ key: r, factor: i.factor, val: l });
                      });
                    })
                  ));
            });
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Gf(function (n) {
              Gf.all(e.scores)
                .then(function (r) {
                  var i = {},
                    o = 0,
                    l = 0;
                  Dc(r).call(r, function (d) {
                    var h = d.factor;
                    d.val.score > 0 && (l += h);
                  }),
                    (l = l === 0 ? 1 : l);
                  for (var u = 0; u < r.length; u++) {
                    var c = r[u];
                    (o += (c.factor / l) * c.val.score), (i[c.key] = c.val);
                  }
                  (i.score = o), n(i);
                })
                .catch(console.log);
            });
          },
        },
      ]),
      t
    );
  })(),
  c0r = (function (t) {
    rg(n, RO);
    var e = ig(n);
    function n(r) {
      return $o(this, n), e.call(this, r);
    }
    return xo(n);
  })(),
  d0r = (function (t) {
    rg(n, RO);
    var e = ig(n);
    function n(r) {
      return $o(this, n), e.call(this, r);
    }
    return xo(n);
  })(),
  h0r = (function (t) {
    rg(n, RO);
    var e = ig(n);
    function n(r) {
      return $o(this, n), e.call(this, r);
    }
    return xo(n);
  })(),
  f0r = hD,
  p0r = function (t, e, n) {
    return e in t
      ? f0r(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  g0r = function (t, e, n) {
    return p0r(t, ed(e) !== "symbol" ? e + "" : e, n), n;
  },
  m0r = (function (t) {
    rg(n, RO);
    var e = ig(n);
    function n() {
      var r;
      return (
        $o(this, n), (r = e.apply(this, arguments)), g0r(Lk(r), "_player"), r
      );
    }
    return (
      xo(n, [
        {
          key: "setPlayer",
          value: function (r, i) {
            var o,
              l,
              u = this;
            r &&
              ((this._player = r),
              r.on("timeupdate", function c() {
                if (r.video && r.video.getVideoPlaybackQuality) {
                  if (l) {
                    if (aR() - o > 1e3)
                      try {
                        r.off("timeupdate", c);
                        var d = r.video.getVideoPlaybackQuality();
                        localStorage.setItem(
                          "player_".concat(i, "_fps"),
                          d.totalVideoFrames - l + ""
                        );
                      } catch {}
                  } else if (u.bufferLength > 1) {
                    var h = r.video.getVideoPlaybackQuality();
                    (l = h.totalVideoFrames), (o = aR());
                  }
                } else r.off("timeupdate", c);
              }));
          },
        },
        {
          key: "bufferLength",
          get: function () {
            var r = this._player.getBufferedRange();
            if (!this._player.video) return 0;
            var i = this._player.video.currentTime,
              o = r[1] - Math.max(r[0], i);
            return Math.max(0, o);
          },
        },
      ]),
      n
    );
  })(),
  y0r = di,
  v0r = Math.log,
  b0r = Math.LN2;
y0r(
  { target: "Math", stat: !0 },
  {
    log2: function (t) {
      return v0r(t) / b0r;
    },
  }
);
var _0r = js,
  T0r = _0r.Math.log2,
  E0r = T0r,
  S0r = E0r,
  R0r = S0r,
  A0r = R0r,
  w0r = A0r,
  k0r = w0r,
  I0r = k0r,
  D0r = I0r,
  Pqe = Sa(D0r),
  P0r = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, [
        {
          key: "getScore",
          value: function () {
            return new Gf(function (e) {
              var n = navigator.hardwareConcurrency,
                r = 0;
              if (n > 0) {
                var i = Pqe(n);
                r =
                  i <= 2
                    ? 3 * i
                    : i <= 3
                    ? 1.6 * (i - 2) + 6
                    : 0.523 * (i - 3) + 7.6;
              }
              e({ score: r, origin: n });
            });
          },
        },
      ]),
      t
    );
  })(),
  M0r = new P0r(),
  C0r = Math.log,
  $0r = Math.LOG10E,
  x0r =
    Math.log10 ||
    function (t) {
      return C0r(t) * $0r;
    },
  L0r = di,
  O0r = x0r;
L0r({ target: "Math", stat: !0 }, { log10: O0r });
var G0r = js,
  N0r = G0r.Math.log10,
  F0r = N0r,
  U0r = F0r,
  B0r = U0r,
  H0r = B0r,
  X0r = H0r,
  V0r = X0r,
  z0r = V0r,
  j0r = z0r,
  W0r = Sa(j0r),
  K0r = hD,
  Z0r = function (t, e, n) {
    return e in t
      ? K0r(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  RCe = function (t, e, n) {
    return Z0r(t, ed(e) !== "symbol" ? e + "" : e, n), n;
  },
  Y0r = (function () {
    function t() {
      $o(this, t),
        RCe(this, "_worker"),
        RCe(this, "_getScoreCallback", function () {});
    }
    return (
      xo(t, [
        {
          key: "getScore",
          value: function () {
            return new Gf(function (e) {
              try {
                var n = new Image();
                (n.src =
                  "//lf6-cdn-tos.douyinstatic.com/obj/venus/pc-theme/spring/20230411-162827.jpeg"),
                  (n.onload = function () {
                    var r = aR();
                    typeof n.decode == "function"
                      ? n.decode().then(function () {
                          var i = 1e3 / (aR() - r),
                            o = 0;
                          if (i > 0) {
                            var l = W0r(i);
                            o =
                              l <= 1
                                ? 6 * l
                                : l <= 2
                                ? 1.6 * (l - 1) + 6
                                : 2.4 * (l - 2) + 7.6;
                          }
                          e({ score: o, origin: i });
                        })
                      : e({ score: 0, origin: -1 });
                  });
              } catch {
                e({ score: 0, origin: -1 });
              }
            });
          },
        },
      ]),
      t
    );
  })(),
  Q0r = new Y0r(),
  J0r = tg,
  ACe = cO,
  q0r = H0,
  eyr = function (t) {
    for (
      var e = J0r(this),
        n = q0r(e),
        r = arguments.length,
        i = ACe(r > 1 ? arguments[1] : void 0, n),
        o = r > 2 ? arguments[2] : void 0,
        l = o === void 0 ? n : ACe(o, n);
      l > i;

    )
      e[i++] = t;
    return e;
  },
  tyr = di,
  nyr = eyr;
tyr({ target: "Array", proto: !0 }, { fill: nyr });
var ryr = ld,
  iyr = ryr("Array").fill,
  ayr = xu,
  oyr = iyr,
  nQ = Array.prototype,
  syr = function (t) {
    var e = t.fill;
    return t === nQ || (ayr(nQ, t) && e === nQ.fill) ? oyr : e;
  },
  lyr = syr,
  uyr = lyr,
  cyr = uyr,
  dyr = cyr,
  hyr = dyr,
  fyr = hyr,
  pyr = fyr,
  gyr = pyr,
  myr = Sa(gyr),
  yyr = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, [
        {
          key: "_getOrigin",
          value: function () {
            var e = new Uint8Array(3686400);
            myr(e).call(e, 8);
            var n = performance.now();
            return 1e3 / (performance.now() - n);
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Gf(function (n) {
              n({ score: 0, origin: e._getOrigin() });
            });
          },
        },
      ]),
      t
    );
  })(),
  vyr = new yyr(),
  byr = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, [
        {
          key: "getScore",
          value: function () {
            return new Gf(function (e) {
              e({ score: 0, origin: navigator.deviceMemory });
            });
          },
        },
      ]),
      t
    );
  })(),
  _yr = new byr(),
  Tyr = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, [
        {
          key: "getScore",
          value: function () {
            return new Gf(function (e) {
              var n,
                r =
                  (n = navigator == null ? void 0 : navigator.connection) ==
                  null
                    ? void 0
                    : n.downlink,
                i = 0;
              r > 0 &&
                r < 1e6 &&
                (i =
                  r < 1
                    ? 60 * r
                    : r < 5
                    ? 0.4 * (r - 1) + 6.01
                    : 0.02 * (r - 5) + 7.61),
                e({ score: i, origin: r });
            });
          },
        },
      ]),
      t
    );
  })(),
  Eyr = new Tyr(),
  Syr = sd,
  Ryr = tg,
  Ayr = sH,
  wyr = H0,
  kyr = TypeError,
  wCe = function (t) {
    return function (e, n, r, i) {
      Syr(n);
      var o = Ryr(e),
        l = Ayr(o),
        u = wyr(o),
        c = t ? u - 1 : 0,
        d = t ? -1 : 1;
      if (r < 2)
        for (;;) {
          if (c in l) {
            (i = l[c]), (c += d);
            break;
          }
          if (((c += d), t ? c < 0 : u <= c))
            throw kyr("Reduce of empty array with no initial value");
        }
      for (; t ? c >= 0 : u > c; c += d) c in l && (i = n(i, l[c], c, o));
      return i;
    };
  },
  Iyr = { left: wCe(!1), right: wCe(!0) },
  Dyr = di,
  Pyr = Iyr.left,
  Myr = vH,
  Cyr = _O,
  $yr = !Cyr && uD > 79 && uD < 83,
  xyr = $yr || !Myr("reduce");
Dyr(
  { target: "Array", proto: !0, forced: xyr },
  {
    reduce: function (t) {
      var e = arguments.length;
      return Pyr(this, t, e, e > 1 ? arguments[1] : void 0);
    },
  }
);
var Lyr = ld,
  Oyr = Lyr("Array").reduce,
  Gyr = xu,
  Nyr = Oyr,
  rQ = Array.prototype,
  Fyr = function (t) {
    var e = t.reduce;
    return t === rQ || (Gyr(rQ, t) && e === rQ.reduce) ? Nyr : e;
  },
  Uyr = Fyr,
  Byr = Uyr,
  Hyr = Byr,
  Xyr = Hyr,
  Vyr = Xyr,
  zyr = Vyr,
  jyr = zyr,
  Wyr = jyr,
  Kyr = Sa(Wyr),
  Zyr = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, [
        {
          key: "_getBandwidth",
          value: function () {
            var e;
            if (!performance.getEntries) return -1;
            var n = K$((e = performance.getEntries())).call(e, function (i) {
                var o = i.initiatorType,
                  l = i.decodedBodySize;
                return o === "img" && l > 0;
              }),
              r = Kyr(n).call(
                n,
                function (i, o) {
                  return (
                    i +
                    (1e3 * o.decodedBodySize) /
                      (o.responseEnd - o.responseStart)
                  );
                },
                0
              );
            return n.length ? r / n.length / 1024 : 0;
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Gf(function (n, r) {
              try {
                var i = e._getBandwidth(),
                  o = 0;
                i > 0 &&
                  i < 1e6 &&
                  (o =
                    i < 1
                      ? 60 * performance_speed
                      : i < 5
                      ? 0.4 * (performance_speed - 1) + 6.01
                      : 0.02 * (performance_speed - 5) + 7.61),
                  n({ score: o, origin: i });
              } catch {
                n({ score: 0, origin: -1 });
              }
            });
          },
        },
      ]),
      t
    );
  })(),
  Yyr = new Zyr(),
  Lde = (function (t) {
    return (t.H264 = "h264"), (t.H265 = "h265"), t;
  })(Lde || {}),
  Qyr = hD,
  Jyr = function (t, e, n) {
    return e in t
      ? Qyr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n })
      : (t[e] = n);
  },
  kCe = function (t, e, n) {
    return Jyr(t, ed(e) !== "symbol" ? e + "" : e, n), n;
  },
  Mqe = (function () {
    function t(e) {
      $o(this, t), kCe(this, "_origin"), kCe(this, "_codec"), (this._codec = e);
    }
    return (
      xo(t, [
        {
          key: "_getOrigin",
          value: function () {
            try {
              var e =
                localStorage.getItem("player_".concat(this._codec, "_fps")) ||
                -1;
              return Number(e);
            } catch {
              return -1;
            }
          },
        },
        {
          key: "getScore",
          value: function () {
            var e = this;
            return new Gf(function (n) {
              var r = e._origin || e._getOrigin(),
                i = 0;
              r > 0 &&
                r <= 120 &&
                (i =
                  r <= 30
                    ? 0.2 * r
                    : r <= 60
                    ? 0.0533 * (r - 30) + 6
                    : 0.04 * (r - 60) + 7.6),
                n({ score: i, origin: r });
            });
          },
        },
      ]),
      t
    );
  })(),
  qyr = (function (t) {
    rg(n, Mqe);
    var e = ig(n);
    function n(r) {
      return $o(this, n), e.call(this, r);
    }
    return xo(n);
  })(),
  evr = new qyr(Lde.H264),
  tvr = (function (t) {
    rg(n, Mqe);
    var e = ig(n);
    function n(r) {
      return $o(this, n), e.call(this, r);
    }
    return xo(n);
  })(),
  nvr = new tvr(Lde.H265),
  rvr = {
    plugins: {
      cpu: {
        cls: c0r,
        factor: 8,
        plugins: {
          cpu_core_number: { factor: 4, instance: M0r },
          decodeImg: { factor: 3, instance: Q0r },
        },
      },
      memory: {
        cls: d0r,
        factor: 0,
        plugins: {
          copy: { factor: 5, instance: vyr },
          usage: { factor: 5, instance: _yr },
        },
      },
      net: {
        cls: h0r,
        factor: 9,
        plugins: {
          downlink: { factor: 5, instance: Eyr },
          performance: { factor: 4, instance: Yyr },
        },
      },
      render: {
        cls: m0r,
        factor: 0,
        plugins: {
          avc: { factor: 5, instance: evr },
          hevc: { factor: 5, instance: nvr },
        },
      },
    },
  },
  ivr = (function (t) {
    rg(n, RO);
    var e = ig(n);
    function n(r) {
      return $o(this, n), e.call(this, iR({}, rvr, r));
    }
    return (
      xo(n, [
        {
          key: "setPlayer",
          value: function (r, i) {
            var o, l;
            (o = this.options.plugins.render) != null &&
              o.instance &&
              ((l = this.options.plugins.render) == null ||
                l.instance.setPlayer(r, i));
          },
        },
      ]),
      n
    );
  })(),
  EH = `	
\v\f\r                　\u2028\u2029\uFEFF`,
  avr = ls,
  ovr = WD,
  svr = ng,
  wie = EH,
  ICe = avr("".replace),
  lvr = RegExp("^[" + wie + "]+"),
  uvr = RegExp("(^|[^" + wie + "])[" + wie + "]+$"),
  iQ = function (t) {
    return function (e) {
      var n = svr(ovr(e));
      return (
        1 & t && (n = ICe(n, lvr, "")), 2 & t && (n = ICe(n, uvr, "$1")), n
      );
    };
  },
  Ode = { start: iQ(1), end: iQ(2), trim: iQ(3) },
  cvr = sJe.PROPER,
  dvr = Yo,
  DCe = EH,
  PCe = "​᠎",
  hvr = function (t) {
    return dvr(function () {
      return !!DCe[t]() || PCe[t]() !== PCe || (cvr && DCe[t].name !== t);
    });
  },
  fvr = di,
  pvr = Ode.trim,
  gvr = hvr;
fvr(
  { target: "String", proto: !0, forced: gvr("trim") },
  {
    trim: function () {
      return pvr(this);
    },
  }
);
var mvr = ld,
  yvr = mvr("String").trim,
  vvr = xu,
  bvr = yvr,
  aQ = String.prototype,
  _vr = function (t) {
    var e = t.trim;
    return typeof t == "string" || t === aQ || (vvr(aQ, t) && e === aQ.trim)
      ? bvr
      : e;
  },
  Tvr = _vr,
  Evr = Tvr,
  Svr = Evr,
  Rvr = Svr,
  Avr = Rvr,
  wvr = Avr,
  kvr = wvr,
  Ivr = kvr,
  xT = Sa(Ivr),
  Dvr =
    /ANGLE\s+\((?:[^,]+,\s+)?([^,/]+)?(?:[^,]*)(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  Pvr = /ANGLE\s+\((?:[^,]+,\s+)?([^,]+)?(?:[,\s]+)(Direct\S+|OpenGL[\d.\s]+)/,
  Y$ = "OpenGL Engine",
  L1 = "Unknow",
  Mvr = 4318,
  Cvr = 32902,
  $vr = 4098,
  rm = (function (t) {
    return (
      (t.CpuDeriver = "CpuDeriver"),
      (t.Intel = "Intel"),
      (t.Nvidia = "NVIDIA"),
      (t.Amd = "AMD"),
      (t.Apple = "Apple"),
      (t[(t.Unknow = L1)] = "Unknow"),
      t
    );
  })(rm || {});
function kie(t) {
  return t === "NVIDIA" ? Mvr : t === "AMD" ? $vr : t === "Intel" ? Cvr : 0;
}
function xvr(t, e) {
  var n,
    r,
    i,
    o,
    l,
    u = L1,
    c = L1,
    d = L1;
  return (
    (t !== "Intel" && t !== "NVIDIA") || (n = Dvr.exec(e)),
    (t !== "AMD" && t !== "Apple") || (n = Pvr.exec(e)),
    n != null &&
      n[1] &&
      n != null &&
      n[2] &&
      ((u = xT((r = n[1].replace(/(AMD|NVIDIA)/, ""))).call(r)),
      (d = xT((i = n[2])).call(i))),
    (c =
      t === "Intel"
        ? (u = xT((o = u.split(Y$)[0])).call(o))
        : xT((l = u.split(Y$)[0])).call(l)),
    { vendor: t, vendorId: kie(t), model: u, backupModel: c, api: d }
  );
}
function Lvr(t) {
  var e = /(SwiftShader|Intel|NVIDIA|AMD|Radeon|Apple)/.exec(t);
  return e
    ? e[0] === "Radeon"
      ? "AMD"
      : e[0] === "SwiftShader"
      ? "CpuDeriver"
      : e[0]
    : rm.Unknow;
}
function Ovr(t) {
  var e,
    n,
    r,
    i,
    o = Lvr(t);
  return o === rm.Unknow || o === "CpuDeriver"
    ? { vendor: o, vendorId: 0, model: L1, backupModel: L1, api: L1 }
    : /^ANGLE/.test(t)
    ? xvr(o, t)
    : o === "Intel"
    ? {
        vendor: o,
        vendorId: kie(o),
        model: xT((r = t.split(Y$)[0])).call(r),
        backupModel: xT((i = t.split(Y$)[0])).call(i),
        api: L1,
      }
    : {
        vendor: o,
        vendorId: kie(o),
        model: xT((e = t.replace(/(AMD|NVIDIA)/, ""))).call(e),
        backupModel: xT((n = t.split(Y$)[0].replace(/(AMD|NVIDIA)/, ""))).call(
          n
        ),
        api: L1,
      };
}
var Cqe = Ml,
  Gvr = Yo,
  Nvr = ls,
  Fvr = ng,
  Uvr = Ode.trim,
  MCe = EH,
  Q$ = Cqe.parseInt,
  CCe = Cqe.Symbol,
  $Ce = CCe && CCe.iterator,
  $qe = /^[+-]?0x/i,
  Bvr = Nvr($qe.exec),
  Hvr =
    Q$(MCe + "08") !== 8 ||
    Q$(MCe + "0x16") !== 22 ||
    ($Ce &&
      !Gvr(function () {
        Q$(Object($Ce));
      })),
  xCe = Hvr
    ? function (t, e) {
        var n = Uvr(Fvr(t));
        return Q$(n, e >>> 0 || (Bvr($qe, n) ? 16 : 10));
      }
    : Q$,
  Xvr = di;
Xvr({ global: !0, forced: parseInt != xCe }, { parseInt: xCe });
var Vvr = js,
  zvr = Vvr.parseInt,
  jvr = zvr,
  Wvr = jvr,
  Kvr = Wvr,
  Zvr = Kvr,
  Yvr = Zvr,
  Qvr = Yvr,
  Jvr = Qvr,
  qvr = Jvr,
  q8 = Sa(qvr),
  xqe = Ml,
  e1r = Yo,
  t1r = ls,
  n1r = ng,
  r1r = Ode.trim,
  i1r = EH,
  a1r = t1r("".charAt),
  e9 = xqe.parseFloat,
  LCe = xqe.Symbol,
  OCe = LCe && LCe.iterator,
  o1r =
    1 / e9(i1r + "-0") != -1 / 0 ||
    (OCe &&
      !e1r(function () {
        e9(Object(OCe));
      })),
  GCe = o1r
    ? function (t) {
        var e = r1r(n1r(t)),
          n = e9(e);
        return n === 0 && a1r(e, 0) == "-" ? -0 : n;
      }
    : e9,
  s1r = di;
s1r({ global: !0, forced: parseFloat != GCe }, { parseFloat: GCe });
var l1r = js,
  u1r = l1r.parseFloat,
  c1r = u1r,
  d1r = c1r,
  h1r = d1r,
  f1r = h1r,
  p1r = f1r,
  g1r = p1r,
  m1r = g1r,
  y1r = m1r,
  v1r = Sa(y1r),
  NCe = "g_ven";
function b1r() {
  try {
    var t = localStorage.getItem(NCe) || "";
    if (t) return t;
    var e,
      n = document.createElement("canvas").getContext("webgl");
    if (n)
      return (
        (t = (e = n.getExtension("WEBGL_debug_renderer_info"))
          ? n.getParameter(e.UNMASKED_RENDERER_WEBGL)
          : "") && localStorage.setItem(NCe, t),
        t
      );
  } catch {}
  return "";
}
function _1r(t, e) {
  var n, r;
  return (
    (n =
      e === rm.Intel
        ? Qy(
            (r = t.split(`
`))
          ).call(r, function (i) {
            return "Intel(R) ".concat(i);
          })
        : t.split(`
`)),
    Qy(n).call(n, function (i) {
      return i.split("|");
    })
  );
}
function T1r(t, e) {
  var n = K$(t).call(t, function (o) {
    return o[0] === e.model;
  });
  n.length ||
    (n = K$(t).call(t, function (o) {
      return o[0] === e.backupModel;
    })),
    n.length ||
      e.vendor !== rm.Intel ||
      /^Intel(R)/.test(e.model) ||
      (n = K$(t).call(t, function (o) {
        return o[0] === "Intel(R) " + e.model;
      }));
  var r = "-1";
  if (n.length) {
    var i = n[0][1];
    r = i === "-1" ? "0" : i;
  }
  return q8(r);
}
function E1r(t) {
  return t === 0 ? 0 : t === -1 ? -1 : v1r(Pqe(t).toFixed(2));
}
var oQ = {
    AMD_PATH: "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_am.txt",
    INTEL_PATH:
      "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_int.txt",
    NVIDIA_PATH:
      "https://sf1-cdn-tos.huoshanstatic.com/obj/media-fe/db/_nvi.txt",
  },
  sQ = [],
  lQ = [],
  uQ = [];
function S1r(t) {
  return Lqe.apply(this, arguments);
}
function Lqe() {
  return (Lqe = x1(
    wc().mark(function t(e) {
      var n, r, i;
      return wc().wrap(
        function (o) {
          for (;;)
            switch ((o.prev = o.next)) {
              case 0:
                if (e !== rm.Intel) {
                  o.next = 4;
                  break;
                }
                if (!sQ.length) {
                  o.next = 3;
                  break;
                }
                return o.abrupt("return", sQ);
              case 3:
                n = oQ.INTEL_PATH;
              case 4:
                if (e !== rm.Nvidia) {
                  o.next = 8;
                  break;
                }
                if (!lQ.length) {
                  o.next = 7;
                  break;
                }
                return o.abrupt("return", lQ);
              case 7:
                n = oQ.NVIDIA_PATH;
              case 8:
                if (e !== rm.Amd) {
                  o.next = 12;
                  break;
                }
                if (!uQ.length) {
                  o.next = 11;
                  break;
                }
                return o.abrupt("return", uQ);
              case 11:
                n = oQ.AMD_PATH;
              case 12:
                if (n) {
                  o.next = 14;
                  break;
                }
                return o.abrupt("return", Gf.resolve([]));
              case 14:
                return (
                  (o.prev = 14),
                  (o.next = 17),
                  fetch(n).then(function (l) {
                    return l.text();
                  })
                );
              case 17:
                return (
                  (r = o.sent),
                  (i = _1r(r, e)),
                  e === rm.Intel && (sQ = i),
                  e === rm.Nvidia && (lQ = i),
                  e === rm.Amd && (uQ = i),
                  o.abrupt("return", i)
                );
              case 25:
                (o.prev = 25), (o.t0 = o.catch(14));
              case 27:
                return o.abrupt("return", []);
              case 28:
              case "end":
                return o.stop();
            }
        },
        t,
        null,
        [[14, 25]]
      );
    })
  )).apply(this, arguments);
}
function R1r(t) {
  return t
    ? S1r(t.vendor)
        .then(function (e) {
          return T1r(e, t);
        })
        .then(E1r)
    : Gf.resolve(0);
}
var FCe = "";
function A1r() {
  return FCe || (FCe = b1r());
}
function Oqe(t) {
  var e;
  try {
    e = Ovr(t || w1r.getGPUVendor());
  } catch {
    return null;
  }
  return e;
}
var w1r = (function () {
  function t() {
    $o(this, t);
  }
  return (
    xo(t, null, [
      {
        key: "getGPUVendor",
        value: function () {
          return A1r();
        },
      },
      {
        key: "parseVendorAsync",
        value: function (e) {
          var n = Oqe(e);
          return n
            ? R1r(n)
                .then(function (r) {
                  return fs(fs({}, n || {}), {}, { score: r });
                })
                .catch(function () {
                  return null;
                })
            : Gf.resolve(null);
        },
      },
    ]),
    t
  );
})();
function k1r() {
  var t = !1;
  if (typeof MediaSource > "u" || !MediaSource.isTypeSupported) return t;
  if (
    (t =
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"') ||
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"') ||
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"') ||
      MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))
  ) {
    var e = Oqe();
    t = !!e && e.vendor !== rm.CpuDeriver;
  }
  return t;
}
var I1r = mqe,
  D1r = Sa(I1r),
  P1r = yqe,
  M1r = Sa(P1r),
  C1r = di,
  $1r = NR.find,
  UCe = "find",
  BCe = !0;
UCe in [] &&
  Array(1)[UCe](function () {
    BCe = !1;
  }),
  C1r(
    { target: "Array", proto: !0, forced: BCe },
    {
      find: function (t) {
        return $1r(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
    }
  );
var x1r = ld,
  L1r = x1r("Array").find,
  O1r = xu,
  G1r = L1r,
  cQ = Array.prototype,
  N1r = function (t) {
    var e = t.find;
    return t === cQ || (O1r(cQ, t) && e === cQ.find) ? G1r : e;
  },
  F1r = N1r,
  U1r = F1r,
  B1r = U1r,
  H1r = B1r,
  X1r = H1r,
  V1r = X1r,
  z1r = V1r,
  j1r = z1r,
  jy = Sa(j1r),
  W1r = di,
  K1r = NR.some,
  Z1r = vH,
  Y1r = Z1r("some");
W1r(
  { target: "Array", proto: !0, forced: !Y1r },
  {
    some: function (t) {
      return K1r(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Q1r = ld,
  J1r = Q1r("Array").some,
  q1r = xu,
  ebr = J1r,
  dQ = Array.prototype,
  tbr = function (t) {
    var e = t.some;
    return t === dQ || (q1r(dQ, t) && e === dQ.some) ? ebr : e;
  },
  nbr = tbr,
  rbr = nbr,
  ibr = rbr,
  abr = ibr,
  obr = abr,
  sbr = obr,
  lbr = sbr,
  ubr = lbr,
  xM = Sa(ubr),
  cbr = di,
  dbr = V8,
  hbr = cde.indexOf,
  fbr = vH,
  Iie = dbr([].indexOf),
  Gqe = !!Iie && 1 / Iie([1], 1, -0) < 0,
  pbr = Gqe || !fbr("indexOf");
cbr(
  { target: "Array", proto: !0, forced: pbr },
  {
    indexOf: function (t) {
      var e = arguments.length > 1 ? arguments[1] : void 0;
      return Gqe ? Iie(this, t, e) || 0 : hbr(this, t, e);
    },
  }
);
var gbr = ld,
  mbr = gbr("Array").indexOf,
  ybr = xu,
  vbr = mbr,
  hQ = Array.prototype,
  bbr = function (t) {
    var e = t.indexOf;
    return t === hQ || (ybr(hQ, t) && e === hQ.indexOf) ? vbr : e;
  },
  _br = bbr,
  Tbr = _br,
  Ebr = Tbr,
  Sbr = Ebr,
  Rbr = Sbr,
  Abr = Rbr,
  wbr = Abr,
  kbr = wbr,
  Ibr = Sa(kbr),
  HCe = OR,
  Dbr = TypeError,
  Pbr = function (t, e) {
    if (!delete t[e])
      throw Dbr("Cannot delete property " + HCe(e) + " of " + HCe(t));
  },
  Mbr = di,
  Cbr = tg,
  $br = cO,
  xbr = dH,
  Lbr = H0,
  Obr = IJe,
  Gbr = ode,
  Nbr = ude,
  Fbr = YD,
  fQ = Pbr,
  Ubr = uO,
  Bbr = Ubr("splice"),
  Hbr = Math.max,
  Xbr = Math.min;
Mbr(
  { target: "Array", proto: !0, forced: !Bbr },
  {
    splice: function (t, e) {
      var n,
        r,
        i,
        o,
        l,
        u,
        c = Cbr(this),
        d = Lbr(c),
        h = $br(t, d),
        f = arguments.length;
      for (
        f === 0
          ? (n = r = 0)
          : f === 1
          ? ((n = 0), (r = d - h))
          : ((n = f - 2), (r = Xbr(Hbr(xbr(e), 0), d - h))),
          Gbr(d + n - r),
          i = Nbr(c, r),
          o = 0;
        o < r;
        o++
      )
        (l = h + o) in c && Fbr(i, o, c[l]);
      if (((i.length = r), n < r)) {
        for (o = h; o < d - r; o++)
          (u = o + n), (l = o + r) in c ? (c[u] = c[l]) : fQ(c, u);
        for (o = d; o > d - r + n; o--) fQ(c, o - 1);
      } else if (n > r)
        for (o = d - r; o > h; o--)
          (u = o + n - 1), (l = o + r - 1) in c ? (c[u] = c[l]) : fQ(c, u);
      for (o = 0; o < n; o++) c[o + h] = arguments[o + 2];
      return Obr(c, d - r + n), i;
    },
  }
);
var Vbr = ld,
  zbr = Vbr("Array").splice,
  jbr = xu,
  Wbr = zbr,
  pQ = Array.prototype,
  Kbr = function (t) {
    var e = t.splice;
    return t === pQ || (jbr(pQ, t) && e === pQ.splice) ? Wbr : e;
  },
  Zbr = Kbr,
  Ybr = Zbr,
  Qbr = Ybr,
  Jbr = Qbr,
  qbr = Jbr,
  e_r = qbr,
  t_r = e_r,
  n_r = t_r,
  Die = Sa(n_r),
  r_r = {
    "Amazon Silk": "amazon_silk",
    "Android Browser": "android",
    Bada: "bada",
    BlackBerry: "blackberry",
    Chrome: "chrome",
    Chromium: "chromium",
    Electron: "electron",
    Epiphany: "epiphany",
    Firefox: "firefox",
    Focus: "focus",
    Generic: "generic",
    "Google Search": "google_search",
    Googlebot: "googlebot",
    "Internet Explorer": "ie",
    "K-Meleon": "k_meleon",
    Maxthon: "maxthon",
    "Microsoft Edge": "edge",
    "MZ Browser": "mz",
    "NAVER Whale Browser": "naver",
    Opera: "opera",
    "Opera Coast": "opera_coast",
    PhantomJS: "phantomjs",
    Puffin: "puffin",
    QupZilla: "qupzilla",
    QQ: "qq",
    QQLite: "qqlite",
    Safari: "safari",
    Sailfish: "sailfish",
    "Samsung Internet for Android": "samsung_internet",
    SeaMonkey: "seamonkey",
    Sleipnir: "sleipnir",
    Swing: "swing",
    Tizen: "tizen",
    "UC Browser": "uc",
    Vivaldi: "vivaldi",
    "WebOS Browser": "webos",
    WeChat: "wechat",
    "Yandex Browser": "yandex",
    Roku: "roku",
  },
  Nqe = {
    amazon_silk: "Amazon Silk",
    android: "Android Browser",
    bada: "Bada",
    blackberry: "BlackBerry",
    chrome: "Chrome",
    chromium: "Chromium",
    electron: "Electron",
    epiphany: "Epiphany",
    firefox: "Firefox",
    focus: "Focus",
    generic: "Generic",
    googlebot: "Googlebot",
    google_search: "Google Search",
    ie: "Internet Explorer",
    k_meleon: "K-Meleon",
    maxthon: "Maxthon",
    edge: "Microsoft Edge",
    mz: "MZ Browser",
    naver: "NAVER Whale Browser",
    opera: "Opera",
    opera_coast: "Opera Coast",
    phantomjs: "PhantomJS",
    puffin: "Puffin",
    qupzilla: "QupZilla",
    qq: "QQ Browser",
    qqlite: "QQ Browser Lite",
    safari: "Safari",
    sailfish: "Sailfish",
    samsung_internet: "Samsung Internet for Android",
    seamonkey: "SeaMonkey",
    sleipnir: "Sleipnir",
    swing: "Swing",
    tizen: "Tizen",
    uc: "UC Browser",
    vivaldi: "Vivaldi",
    webos: "WebOS Browser",
    wechat: "WeChat",
    yandex: "Yandex Browser",
  },
  Xu = { tablet: "tablet", mobile: "mobile", desktop: "desktop", tv: "tv" },
  wh = {
    WindowsPhone: "Windows Phone",
    Windows: "Windows",
    MacOS: "macOS",
    iOS: "iOS",
    Android: "Android",
    WebOS: "WebOS",
    BlackBerry: "BlackBerry",
    Bada: "Bada",
    Tizen: "Tizen",
    Linux: "Linux",
    ChromeOS: "Chrome OS",
    PlayStation4: "PlayStation 4",
    Roku: "Roku",
  },
  bT = {
    EdgeHTML: "EdgeHTML",
    Blink: "Blink",
    Trident: "Trident",
    Presto: "Presto",
    Gecko: "Gecko",
    WebKit: "WebKit",
  },
  Pr = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, null, [
        {
          key: "getFirstMatch",
          value: function (e, n) {
            var r = n.match(e);
            return (r && r.length > 0 && r[1]) || "";
          },
        },
        {
          key: "getSecondMatch",
          value: function (e, n) {
            var r = n.match(e);
            return (r && r.length > 1 && r[2]) || "";
          },
        },
        {
          key: "matchAndReturnConst",
          value: function (e, n, r) {
            if (e.test(n)) return r;
          },
        },
        {
          key: "getWindowsVersionName",
          value: function (e) {
            switch (e) {
              case "NT":
                return "NT";
              case "XP":
              case "NT 5.1":
                return "XP";
              case "NT 5.0":
                return "2000";
              case "NT 5.2":
                return "2003";
              case "NT 6.0":
                return "Vista";
              case "NT 6.1":
                return "7";
              case "NT 6.2":
                return "8";
              case "NT 6.3":
                return "8.1";
              case "NT 10.0":
                return "10";
              default:
                return;
            }
          },
        },
        {
          key: "getMacOSVersionName",
          value: function (e) {
            var n,
              r,
              i = Qy((n = Die((r = e.split("."))).call(r, 0, 2))).call(
                n,
                function (o) {
                  return q8(o, 10) || 0;
                }
              );
            if ((i.push(0), i[0] === 10))
              switch (i[1]) {
                case 5:
                  return "Leopard";
                case 6:
                  return "Snow Leopard";
                case 7:
                  return "Lion";
                case 8:
                  return "Mountain Lion";
                case 9:
                  return "Mavericks";
                case 10:
                  return "Yosemite";
                case 11:
                  return "El Capitan";
                case 12:
                  return "Sierra";
                case 13:
                  return "High Sierra";
                case 14:
                  return "Mojave";
                case 15:
                  return "Catalina";
                default:
                  return;
              }
          },
        },
        {
          key: "getAndroidVersionName",
          value: function (e) {
            var n,
              r,
              i = Qy((n = Die((r = e.split("."))).call(r, 0, 2))).call(
                n,
                function (o) {
                  return q8(o, 10) || 0;
                }
              );
            if ((i.push(0), !(i[0] === 1 && i[1] < 5)))
              return i[0] === 1 && i[1] < 6
                ? "Cupcake"
                : i[0] === 1 && i[1] >= 6
                ? "Donut"
                : i[0] === 2 && i[1] < 2
                ? "Eclair"
                : i[0] === 2 && i[1] === 2
                ? "Froyo"
                : i[0] === 2 && i[1] > 2
                ? "Gingerbread"
                : i[0] === 3
                ? "Honeycomb"
                : i[0] === 4 && i[1] < 1
                ? "Ice Cream Sandwich"
                : i[0] === 4 && i[1] < 4
                ? "Jelly Bean"
                : i[0] === 4 && i[1] >= 4
                ? "KitKat"
                : i[0] === 5
                ? "Lollipop"
                : i[0] === 6
                ? "Marshmallow"
                : i[0] === 7
                ? "Nougat"
                : i[0] === 8
                ? "Oreo"
                : i[0] === 9
                ? "Pie"
                : void 0;
          },
        },
        {
          key: "getVersionPrecision",
          value: function (e) {
            return e.split(".").length;
          },
        },
        {
          key: "compareVersions",
          value: function (e, n) {
            var r =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2],
              i = t.getVersionPrecision(e),
              o = t.getVersionPrecision(n),
              l = Math.max(i, o),
              u = 0,
              c = Qy(t).call(t, [e, n], function (d) {
                var h,
                  f = l - t.getVersionPrecision(d),
                  p = d + new Array(f + 1).join(".0");
                return D1r(
                  (h = Qy(t).call(t, p.split("."), function (g) {
                    return new Array(20 - g.length).join("0") + g;
                  }))
                ).call(h);
              });
            for (r && (u = l - Math.min(i, o)), l -= 1; l >= u; ) {
              if (c[0][l] > c[1][l]) return 1;
              if (c[0][l] === c[1][l]) {
                if (l === u) return 0;
                l -= 1;
              } else if (c[0][l] < c[1][l]) return -1;
            }
          },
        },
        {
          key: "map",
          value: function (e, n) {
            var r,
              i = [];
            if (Qy(Array.prototype)) return Qy(Array.prototype).call(e, n);
            for (r = 0; r < e.length; r += 1) i.push(n(e[r]));
            return i;
          },
        },
        {
          key: "find",
          value: function (e, n) {
            var r, i;
            if (jy(Array.prototype)) return jy(Array.prototype).call(e, n);
            for (r = 0, i = e.length; r < i; r += 1) {
              var o = e[r];
              if (n(o, r)) return o;
            }
          },
        },
        {
          key: "assign",
          value: function (e) {
            for (
              var n,
                r,
                i,
                o = e,
                l = arguments.length,
                u = new Array(l > 1 ? l - 1 : 0),
                c = 1;
              c < l;
              c++
            )
              u[c - 1] = arguments[c];
            if (iR) return iR.apply(Object, eh((i = [e])).call(i, u));
            var d = function () {
              var h = u[n];
              if (ed(h) === "object" && h !== null) {
                var f = Mf(h);
                Dc(f).call(f, function (p) {
                  o[p] = h[p];
                });
              }
            };
            for (n = 0, r = u.length; n < r; n += 1) d();
            return e;
          },
        },
        {
          key: "getBrowserAlias",
          value: function (e) {
            return r_r[e];
          },
        },
        {
          key: "getBrowserTypeByAlias",
          value: function (e) {
            return Nqe[e] || "";
          },
        },
      ]),
      t
    );
  })(),
  Qs = /version\/(\d+(\.?_?\d+)+)/i,
  i_r = [
    {
      test: [/googlebot/i],
      describe: function (t) {
        var e = { name: "Googlebot" },
          n =
            Pr.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/opera/i],
      describe: function (t) {
        var e = { name: "Opera" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/opr\/|opios/i],
      describe: function (t) {
        var e = { name: "Opera" },
          n =
            Pr.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/SamsungBrowser/i],
      describe: function (t) {
        var e = { name: "Samsung Internet for Android" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/Whale/i],
      describe: function (t) {
        var e = { name: "NAVER Whale Browser" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/MZBrowser/i],
      describe: function (t) {
        var e = { name: "MZ Browser" },
          n =
            Pr.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/focus/i],
      describe: function (t) {
        var e = { name: "Focus" },
          n =
            Pr.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/swing/i],
      describe: function (t) {
        var e = { name: "Swing" },
          n =
            Pr.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/coast/i],
      describe: function (t) {
        var e = { name: "Opera Coast" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/opt\/\d+(?:.?_?\d+)+/i],
      describe: function (t) {
        var e = { name: "Opera Touch" },
          n =
            Pr.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/yabrowser/i],
      describe: function (t) {
        var e = { name: "Yandex Browser" },
          n =
            Pr.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/ucbrowser/i],
      describe: function (t) {
        var e = { name: "UC Browser" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/Maxthon|mxios/i],
      describe: function (t) {
        var e = { name: "Maxthon" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/epiphany/i],
      describe: function (t) {
        var e = { name: "Epiphany" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/puffin/i],
      describe: function (t) {
        var e = { name: "Puffin" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/sleipnir/i],
      describe: function (t) {
        var e = { name: "Sleipnir" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/k-meleon/i],
      describe: function (t) {
        var e = { name: "K-Meleon" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/micromessenger/i],
      describe: function (t) {
        var e = { name: "WeChat" },
          n =
            Pr.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/qqbrowser/i],
      describe: function (t) {
        var e = {
            name: /qqbrowserlite/i.test(t) ? "QQ Browser Lite" : "QQ Browser",
          },
          n =
            Pr.getFirstMatch(
              /(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,
              t
            ) || Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/msie|trident/i],
      describe: function (t) {
        var e = { name: "Internet Explorer" },
          n = Pr.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/\sedg\//i],
      describe: function (t) {
        var e = { name: "Microsoft Edge" },
          n = Pr.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/edg([ea]|ios)/i],
      describe: function (t) {
        var e = { name: "Microsoft Edge" },
          n = Pr.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/vivaldi/i],
      describe: function (t) {
        var e = { name: "Vivaldi" },
          n = Pr.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/seamonkey/i],
      describe: function (t) {
        var e = { name: "SeaMonkey" },
          n = Pr.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/sailfish/i],
      describe: function (t) {
        var e = { name: "Sailfish" },
          n = Pr.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/silk/i],
      describe: function (t) {
        var e = { name: "Amazon Silk" },
          n = Pr.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/phantom/i],
      describe: function (t) {
        var e = { name: "PhantomJS" },
          n = Pr.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/slimerjs/i],
      describe: function (t) {
        var e = { name: "SlimerJS" },
          n = Pr.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
      describe: function (t) {
        var e = { name: "BlackBerry" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/(web|hpw)[o0]s/i],
      describe: function (t) {
        var e = { name: "WebOS Browser" },
          n =
            Pr.getFirstMatch(Qs, t) ||
            Pr.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/bada/i],
      describe: function (t) {
        var e = { name: "Bada" },
          n = Pr.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/tizen/i],
      describe: function (t) {
        var e = { name: "Tizen" },
          n =
            Pr.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/qupzilla/i],
      describe: function (t) {
        var e = { name: "QupZilla" },
          n =
            Pr.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/firefox|iceweasel|fxios/i],
      describe: function (t) {
        var e = { name: "Firefox" },
          n = Pr.getFirstMatch(
            /(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,
            t
          );
        return n && (e.version = n), e;
      },
    },
    {
      test: [/electron/i],
      describe: function (t) {
        var e = { name: "Electron" },
          n = Pr.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/MiuiBrowser/i],
      describe: function (t) {
        var e = { name: "Miui" },
          n = Pr.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/chromium/i],
      describe: function (t) {
        var e = { name: "Chromium" },
          n =
            Pr.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, t) ||
            Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/chrome|crios|crmo/i],
      describe: function (t) {
        var e = { name: "Chrome" },
          n = Pr.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/GSA/i],
      describe: function (t) {
        var e = { name: "Google Search" },
          n = Pr.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: function (t) {
        var e = !t.test(/like android/i),
          n = t.test(/android/i);
        return e && n;
      },
      describe: function (t) {
        var e = { name: "Android Browser" },
          n = Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/playstation 4/i],
      describe: function (t) {
        var e = { name: "PlayStation 4" },
          n = Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/safari|applewebkit/i],
      describe: function (t) {
        var e = { name: "Safari" },
          n = Pr.getFirstMatch(Qs, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/.*/i],
      describe: function (t) {
        var e =
          t.search("\\(") !== -1 ? /^(.*)\/(.*)[ \t]\((.*)/ : /^(.*)\/(.*) /;
        return {
          name: Pr.getFirstMatch(e, t),
          version: Pr.getSecondMatch(e, t),
        };
      },
    },
  ],
  a_r = [
    {
      test: [/Roku\/DVP/],
      describe: function (t) {
        var e = Pr.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, t);
        return { name: wh.Roku, version: e };
      },
    },
    {
      test: [/windows phone/i],
      describe: function (t) {
        var e = Pr.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, t);
        return { name: wh.WindowsPhone, version: e };
      },
    },
    {
      test: [/windows /i],
      describe: function (t) {
        var e = Pr.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, t),
          n = Pr.getWindowsVersionName(e);
        return { name: wh.Windows, version: e, versionName: n };
      },
    },
    {
      test: [/Macintosh(.*?) FxiOS(.*?)\//],
      describe: function (t) {
        var e = { name: wh.iOS },
          n = Pr.getSecondMatch(/(Version\/)(\d[\d.]+)/, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/macintosh/i],
      describe: function (t) {
        var e = Pr.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, t).replace(
            /[_\s]/g,
            "."
          ),
          n = Pr.getMacOSVersionName(e),
          r = { name: wh.MacOS, version: e };
        return n && (r.versionName = n), r;
      },
    },
    {
      test: [/(ipod|iphone|ipad)/i],
      describe: function (t) {
        var e = Pr.getFirstMatch(
          /os (\d+([_\s]\d+)*) like mac os x/i,
          t
        ).replace(/[_\s]/g, ".");
        return { name: wh.iOS, version: e };
      },
    },
    {
      test: function (t) {
        var e = !t.test(/like android/i),
          n = t.test(/android/i);
        return e && n;
      },
      describe: function (t) {
        var e = Pr.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, t),
          n = Pr.getAndroidVersionName(e),
          r = { name: wh.Android, version: e };
        return n && (r.versionName = n), r;
      },
    },
    {
      test: [/(web|hpw)[o0]s/i],
      describe: function (t) {
        var e = Pr.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, t),
          n = { name: wh.WebOS };
        return e && e.length && (n.version = e), n;
      },
    },
    {
      test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
      describe: function (t) {
        var e =
          Pr.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, t) ||
          Pr.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, t) ||
          Pr.getFirstMatch(/\bbb(\d+)/i, t);
        return { name: wh.BlackBerry, version: e };
      },
    },
    {
      test: [/bada/i],
      describe: function (t) {
        var e = Pr.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, t);
        return { name: wh.Bada, version: e };
      },
    },
    {
      test: [/tizen/i],
      describe: function (t) {
        var e = Pr.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, t);
        return { name: wh.Tizen, version: e };
      },
    },
    {
      test: [/linux/i],
      describe: function () {
        return { name: wh.Linux };
      },
    },
    {
      test: [/CrOS/],
      describe: function () {
        return { name: wh.ChromeOS };
      },
    },
    {
      test: [/PlayStation 4/],
      describe: function (t) {
        var e = Pr.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, t);
        return { name: wh.PlayStation4, version: e };
      },
    },
  ],
  o_r = [
    {
      test: [/googlebot/i],
      describe: function () {
        return { type: "bot", vendor: "Google" };
      },
    },
    {
      test: [/huawei/i],
      describe: function (t) {
        var e = Pr.getFirstMatch(/(can-l01)/i, t) && "Nova",
          n = { type: Xu.mobile, vendor: "Huawei" };
        return e && (n.model = e), n;
      },
    },
    {
      test: [/nexus\s*(?:7|8|9|10).*/i],
      describe: function () {
        return { type: Xu.tablet, vendor: "Nexus" };
      },
    },
    {
      test: [/ipad/i],
      describe: function () {
        return { type: Xu.tablet, vendor: "Apple", model: "iPad" };
      },
    },
    {
      test: [/Macintosh(.*?) FxiOS(.*?)\//],
      describe: function () {
        return { type: Xu.tablet, vendor: "Apple", model: "iPad" };
      },
    },
    {
      test: [/kftt build/i],
      describe: function () {
        return { type: Xu.tablet, vendor: "Amazon", model: "Kindle Fire HD 7" };
      },
    },
    {
      test: [/silk/i],
      describe: function () {
        return { type: Xu.tablet, vendor: "Amazon" };
      },
    },
    {
      test: [/tablet(?! pc)/i],
      describe: function () {
        return { type: Xu.tablet };
      },
    },
    {
      test: function (t) {
        var e = t.test(/ipod|iphone/i),
          n = t.test(/like (ipod|iphone)/i);
        return e && !n;
      },
      describe: function (t) {
        var e = Pr.getFirstMatch(/(ipod|iphone)/i, t);
        return { type: Xu.mobile, vendor: "Apple", model: e };
      },
    },
    {
      test: [/nexus\s*[0-6].*/i, /galaxy nexus/i],
      describe: function () {
        return { type: Xu.mobile, vendor: "Nexus" };
      },
    },
    {
      test: [/[^-]mobi/i],
      describe: function () {
        return { type: Xu.mobile };
      },
    },
    {
      test: function (t) {
        return t.getBrowserName(!0) === "blackberry";
      },
      describe: function () {
        return { type: Xu.mobile, vendor: "BlackBerry" };
      },
    },
    {
      test: function (t) {
        return t.getBrowserName(!0) === "bada";
      },
      describe: function () {
        return { type: Xu.mobile };
      },
    },
    {
      test: function (t) {
        return t.getBrowserName() === "windows phone";
      },
      describe: function () {
        return { type: Xu.mobile, vendor: "Microsoft" };
      },
    },
    {
      test: function (t) {
        var e = Number(String(t.getOSVersion()).split(".")[0]);
        return t.getOSName(!0) === "android" && e >= 3;
      },
      describe: function () {
        return { type: Xu.tablet };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "android";
      },
      describe: function () {
        return { type: Xu.mobile };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "macos";
      },
      describe: function () {
        return { type: Xu.desktop, vendor: "Apple" };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "windows";
      },
      describe: function () {
        return { type: Xu.desktop };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "linux";
      },
      describe: function () {
        return { type: Xu.desktop };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "playstation 4";
      },
      describe: function () {
        return { type: Xu.tv };
      },
    },
    {
      test: function (t) {
        return t.getOSName(!0) === "roku";
      },
      describe: function () {
        return { type: Xu.tv };
      },
    },
  ],
  s_r = [
    {
      test: function (t) {
        return t.getBrowserName(!0) === "microsoft edge";
      },
      describe: function (t) {
        if (/\sedg\//i.test(t)) return { name: bT.Blink };
        var e = Pr.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, t);
        return { name: bT.EdgeHTML, version: e };
      },
    },
    {
      test: [/trident/i],
      describe: function (t) {
        var e = { name: bT.Trident },
          n = Pr.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: function (t) {
        return t.test(/presto/i);
      },
      describe: function (t) {
        var e = { name: bT.Presto },
          n = Pr.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: function (t) {
        var e = t.test(/gecko/i),
          n = t.test(/like gecko/i);
        return e && !n;
      },
      describe: function (t) {
        var e = { name: bT.Gecko },
          n = Pr.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
    {
      test: [/(apple)?webkit\/537\.36/i],
      describe: function () {
        return { name: bT.Blink };
      },
    },
    {
      test: [/(apple)?webkit/i],
      describe: function (t) {
        var e = { name: bT.WebKit },
          n = Pr.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, t);
        return n && (e.version = n), e;
      },
    },
  ],
  XCe = (function () {
    function t(e) {
      var n = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
      if (($o(this, t), e == null || e === ""))
        throw new Error("UserAgent parameter can't be empty");
      (this._ua = e), (this.parsedResult = {}), n !== !0 && this.parse();
    }
    return (
      xo(t, [
        {
          key: "getUA",
          value: function () {
            return this._ua;
          },
        },
        {
          key: "test",
          value: function (e) {
            return e.test(this._ua);
          },
        },
        {
          key: "parseBrowser",
          value: function () {
            var e = this;
            this.parsedResult.browser = {};
            var n = jy(Pr).call(Pr, i_r, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return xM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.browser = n.describe(this.getUA())),
              this.parsedResult.browser
            );
          },
        },
        {
          key: "getBrowser",
          value: function () {
            return this.parsedResult.browser
              ? this.parsedResult.browser
              : this.parseBrowser();
          },
        },
        {
          key: "getBrowserName",
          value: function (e) {
            return e
              ? String(this.getBrowser().name).toLowerCase() || ""
              : this.getBrowser().name || "";
          },
        },
        {
          key: "getBrowserVersion",
          value: function () {
            return this.getBrowser().version;
          },
        },
        {
          key: "getOS",
          value: function () {
            return this.parsedResult.os ? this.parsedResult.os : this.parseOS();
          },
        },
        {
          key: "parseOS",
          value: function () {
            var e = this;
            this.parsedResult.os = {};
            var n = jy(Pr).call(Pr, a_r, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return xM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.os = n.describe(this.getUA())),
              this.parsedResult.os
            );
          },
        },
        {
          key: "getOSName",
          value: function (e) {
            var n = this.getOS().name;
            return e ? String(n).toLowerCase() || "" : n || "";
          },
        },
        {
          key: "getOSVersion",
          value: function () {
            return this.getOS().version;
          },
        },
        {
          key: "getPlatform",
          value: function () {
            return this.parsedResult.platform
              ? this.parsedResult.platform
              : this.parsePlatform();
          },
        },
        {
          key: "getPlatformType",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0 && arguments[0],
              n = this.getPlatform().type;
            return e ? String(n).toLowerCase() || "" : n || "";
          },
        },
        {
          key: "parsePlatform",
          value: function () {
            var e = this;
            this.parsedResult.platform = {};
            var n = jy(Pr).call(Pr, o_r, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return xM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.platform = n.describe(this.getUA())),
              this.parsedResult.platform
            );
          },
        },
        {
          key: "getEngine",
          value: function () {
            return this.parsedResult.engine
              ? this.parsedResult.engine
              : this.parseEngine();
          },
        },
        {
          key: "getEngineName",
          value: function (e) {
            return e
              ? String(this.getEngine().name).toLowerCase() || ""
              : this.getEngine().name || "";
          },
        },
        {
          key: "parseEngine",
          value: function () {
            var e = this;
            this.parsedResult.engine = {};
            var n = jy(Pr).call(Pr, s_r, function (r) {
              if (typeof r.test == "function") return r.test(e);
              var i;
              if (r.test instanceof Array)
                return xM((i = r.test)).call(i, function (o) {
                  return e.test(o);
                });
              throw new Error("Browser's test function is not valid");
            });
            return (
              n && (this.parsedResult.engine = n.describe(this.getUA())),
              this.parsedResult.engine
            );
          },
        },
        {
          key: "parse",
          value: function () {
            return (
              this.parseBrowser(),
              this.parseOS(),
              this.parsePlatform(),
              this.parseEngine(),
              this
            );
          },
        },
        {
          key: "getResult",
          value: function () {
            return Pr.assign({}, this.parsedResult);
          },
        },
        {
          key: "satisfies",
          value: function (e) {
            var n = this,
              r = {},
              i = 0,
              o = {},
              l = 0,
              u = Mf(e);
            if (
              (Dc(u).call(u, function (v) {
                var b = e[v];
                typeof b == "string"
                  ? ((o[v] = b), (l += 1))
                  : ed(b) === "object" && ((r[v] = b), (i += 1));
              }),
              i > 0)
            ) {
              var c = Mf(r),
                d = jy(Pr).call(Pr, c, function (v) {
                  return n.isOS(v);
                });
              if (d) {
                var h = this.satisfies(r[d]);
                if (h !== void 0) return h;
              }
              var f = jy(Pr).call(Pr, c, function (v) {
                return n.isPlatform(v);
              });
              if (f) {
                var p = this.satisfies(r[f]);
                if (p !== void 0) return p;
              }
            }
            if (l > 0) {
              var g = Mf(o),
                y = jy(Pr).call(Pr, g, function (v) {
                  return n.isBrowser(v, !0);
                });
              if (y !== void 0) return this.compareVersion(o[y]);
            }
          },
        },
        {
          key: "isBrowser",
          value: function (e) {
            var n =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1],
              r = this.getBrowserName().toLowerCase(),
              i = e.toLowerCase(),
              o = Pr.getBrowserTypeByAlias(i);
            return n && o && (i = o.toLowerCase()), i === r;
          },
        },
        {
          key: "compareVersion",
          value: function (e) {
            var n = [0],
              r = e,
              i = !1,
              o = this.getBrowserVersion();
            if (typeof o == "string")
              return (
                e[0] === ">" || e[0] === "<"
                  ? ((r = e.substr(1)),
                    e[1] === "=" ? ((i = !0), (r = e.substr(2))) : (n = []),
                    e[0] === ">" ? n.push(1) : n.push(-1))
                  : e[0] === "="
                  ? (r = e.substr(1))
                  : e[0] === "~" && ((i = !0), (r = e.substr(1))),
                Ibr(n).call(n, Pr.compareVersions(o, r, i)) > -1
              );
          },
        },
        {
          key: "isOS",
          value: function (e) {
            return this.getOSName(!0) === String(e).toLowerCase();
          },
        },
        {
          key: "isPlatform",
          value: function (e) {
            return this.getPlatformType(!0) === String(e).toLowerCase();
          },
        },
        {
          key: "isEngine",
          value: function (e) {
            return this.getEngineName(!0) === String(e).toLowerCase();
          },
        },
        {
          key: "is",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
            return this.isBrowser(e, n) || this.isOS(e) || this.isPlatform(e);
          },
        },
        {
          key: "some",
          value: function () {
            var e = this,
              n =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : [];
            return xM(n).call(n, function (r) {
              return e.is(r);
            });
          },
        },
      ]),
      t
    );
  })(),
  l_r = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, null, [
        {
          key: "getParser",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
            if (typeof e != "string")
              throw new Error("UserAgent should be a string");
            return new XCe(e, n);
          },
        },
        {
          key: "parse",
          value: function (e) {
            return new XCe(e).getResult();
          },
        },
        {
          key: "BROWSER_MAP",
          get: function () {
            return Nqe;
          },
        },
        {
          key: "ENGINE_MAP",
          get: function () {
            return bT;
          },
        },
        {
          key: "OS_MAP",
          get: function () {
            return wh;
          },
        },
        {
          key: "PLATFORMS_MAP",
          get: function () {
            return Xu;
          },
        },
      ]),
      t
    );
  })(),
  u_r = (function () {
    function t(n) {
      $o(this, t),
        da(this, "featureList", void 0),
        da(this, "videoType", void 0),
        (this.videoType = n.type || To.VOD),
        (this.featureList = fs(
          fs(
            fs(
              fs(
                { deviceId: n == null ? void 0 : n.deviceId },
                this.initSync()
              ),
              this.getGPUInfo()
            ),
            this.getLocalDeviceMarkInfo()
          ),
          this.getH265FeatureList()
        ));
    }
    var e;
    return (
      xo(t, [
        {
          key: "initSync",
          value: function () {
            return fs({}, this.getBrowserInfo());
          },
        },
        {
          key: "updateFeatureList",
          value: function (n) {
            return (this.featureList = fs(fs({}, this.featureList), n));
          },
        },
        {
          key: "getFeatureList",
          value: function () {
            return this.featureList;
          },
        },
        {
          key: "getH265FeatureList",
          value: function () {
            return { isHevcSupported: k1r() };
          },
        },
        {
          key: "getLocalDeviceMarkInfo",
          value: function () {
            var n = _qe(
                this.videoType === To.LIVE
                  ? sN.DEVICE_INFO_LIVE
                  : sN.DEVICE_INFO
              ),
              r = { cpuScore: -1, netScore: -1, renderScore: -1 };
            if (!n) return r;
            try {
              var i = JSON.parse(n);
              return {
                cpuScore: i.cpuScore,
                netScore: i.netScore,
                renderScore: i.renderScore,
              };
            } catch {}
            return r;
          },
        },
        {
          key: "getDeviceMarkInfoAsync",
          value:
            ((e = x1(
              wc().mark(function n() {
                var r, i, o, l, u, c;
                return wc().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return (r = new ivr({})), (d.next = 3), r.getScore();
                        case 3:
                          if (((d.t0 = d.sent), d.t0)) {
                            d.next = 6;
                            break;
                          }
                          d.t0 = {};
                        case 6:
                          return (
                            (i = d.t0),
                            (o = i.cpu),
                            (l = i.net),
                            (u = i.render),
                            (c = {
                              cpuScore: (o == null ? void 0 : o.score) || -1,
                              netScore: (l == null ? void 0 : l.score) || -1,
                              renderScore: (u == null ? void 0 : u.score) || -1,
                            }),
                            bqe(
                              this.videoType === To.LIVE
                                ? sN.DEVICE_INFO_LIVE
                                : sN.DEVICE_INFO,
                              QT(c)
                            ),
                            this.updateFeatureList(c),
                            d.abrupt("return", c)
                          );
                        case 14:
                        case "end":
                          return d.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "getBrowserInfo",
          value: function () {
            var n = l_r.getParser(navigator.userAgent);
            return {
              browserVersion: n.getBrowserVersion(),
              browserName: n.getBrowserName(),
              cpuCore: navigator.hardwareConcurrency,
              osName: n.getOSName(),
              osVersion: n.getOSVersion(),
              platformType: n.getPlatformType(),
              engineName: n.getEngineName(),
            };
          },
        },
        {
          key: "getGPUInfo",
          value: function () {
            try {
              var n = nPe.parseVendor(),
                r = nPe.getGPUVendor(),
                i = dD(r).call(r, "SwiftShader");
              return {
                gpuScore: (n == null ? void 0 : n.score) || -1,
                isCloseGPU: i,
              };
            } catch {
              return { gpuScore: -1, isCloseGPU: !1 };
            }
          },
        },
      ]),
      t
    );
  })(),
  Fqe = { exports: {} },
  c_r = Yo,
  d_r = c_r(function () {
    if (typeof ArrayBuffer == "function") {
      var t = new ArrayBuffer(8);
      Object.isExtensible(t) && Object.defineProperty(t, "a", { value: 8 });
    }
  }),
  h_r = Yo,
  f_r = mc,
  p_r = Ib,
  VCe = d_r,
  g6 = Object.isExtensible,
  g_r = h_r(function () {
    g6(1);
  }),
  m_r =
    g_r || VCe
      ? function (t) {
          return (
            !!f_r(t) && (!VCe || p_r(t) != "ArrayBuffer") && (!g6 || g6(t))
          );
        }
      : g6,
  y_r = Yo,
  v_r = !y_r(function () {
    return Object.isExtensible(Object.preventExtensions({}));
  }),
  b_r = di,
  __r = ls,
  T_r = dO,
  E_r = mc,
  Gde = qu,
  S_r = Zf.f,
  zCe = hO,
  R_r = hde,
  Nde = m_r,
  A_r = uH,
  w_r = v_r,
  Uqe = !1,
  rb = A_r("meta"),
  k_r = 0,
  Fde = function (t) {
    S_r(t, rb, { value: { objectID: "O" + k_r++, weakData: {} } });
  },
  I_r = function (t, e) {
    if (!E_r(t))
      return typeof t == "symbol" ? t : (typeof t == "string" ? "S" : "P") + t;
    if (!Gde(t, rb)) {
      if (!Nde(t)) return "F";
      if (!e) return "E";
      Fde(t);
    }
    return t[rb].objectID;
  },
  D_r = function (t, e) {
    if (!Gde(t, rb)) {
      if (!Nde(t)) return !0;
      if (!e) return !1;
      Fde(t);
    }
    return t[rb].weakData;
  },
  P_r = function (t) {
    return w_r && Uqe && Nde(t) && !Gde(t, rb) && Fde(t), t;
  },
  M_r = function () {
    (C_r.enable = function () {}), (Uqe = !0);
    var t = zCe.f,
      e = __r([].splice),
      n = {};
    (n[rb] = 1),
      t(n).length &&
        ((zCe.f = function (r) {
          for (var i = t(r), o = 0, l = i.length; o < l; o++)
            if (i[o] === rb) {
              e(i, o, 1);
              break;
            }
          return i;
        }),
        b_r(
          { target: "Object", stat: !0, forced: !0 },
          { getOwnPropertyNames: R_r.f }
        ));
  },
  C_r = (Fqe.exports = {
    enable: M_r,
    fastKey: I_r,
    getWeakData: D_r,
    onFreeze: P_r,
  });
T_r[rb] = !0;
var Bqe = Fqe.exports,
  $_r = di,
  x_r = Ml,
  L_r = Bqe,
  O_r = Yo,
  G_r = Db,
  N_r = X0,
  F_r = TO,
  U_r = Wl,
  B_r = mc,
  H_r = Pb,
  X_r = Zf.f,
  V_r = NR.forEach,
  z_r = Ju,
  Hqe = HE,
  j_r = Hqe.set,
  W_r = Hqe.getterFor,
  K_r = function (t, e, n) {
    var r,
      i = t.indexOf("Map") !== -1,
      o = t.indexOf("Weak") !== -1,
      l = i ? "set" : "add",
      u = x_r[t],
      c = u && u.prototype,
      d = {};
    if (
      z_r &&
      U_r(u) &&
      (o ||
        (c.forEach &&
          !O_r(function () {
            new u().entries().next();
          })))
    ) {
      var h = (r = e(function (p, g) {
          j_r(F_r(p, h), { type: t, collection: new u() }),
            g != null && N_r(g, p[l], { that: p, AS_ENTRIES: i });
        })).prototype,
        f = W_r(t);
      V_r(
        [
          "add",
          "clear",
          "delete",
          "forEach",
          "get",
          "has",
          "set",
          "keys",
          "values",
          "entries",
        ],
        function (p) {
          var g = p == "add" || p == "set";
          !(p in c) ||
            (o && p == "clear") ||
            G_r(h, p, function (y, v) {
              var b = f(this).collection;
              if (!g && o && !B_r(y)) return p == "get" && void 0;
              var w = b[p](y === 0 ? 0 : y, v);
              return g ? this : w;
            });
        }
      ),
        o ||
          X_r(h, "size", {
            configurable: !0,
            get: function () {
              return f(this).collection.size;
            },
          });
    } else (r = n.getConstructor(e, t, i, l)), L_r.enable();
    return (
      H_r(r, t, !1, !0),
      (d[t] = r),
      $_r({ global: !0, forced: !0 }, d),
      o || n.setStrong(r, t, i),
      r
    );
  },
  Z_r = BE,
  Xqe = function (t, e, n) {
    for (var r in e) n && n.unsafe && t[r] ? (t[r] = e[r]) : Z_r(t, r, e[r], n);
    return t;
  },
  Y_r = UE,
  Q_r = pO,
  jCe = Xqe,
  J_r = Pd,
  q_r = TO,
  eTr = jD,
  tTr = X0,
  nTr = bde,
  WCe = _de,
  rTr = XJe,
  LM = Ju,
  KCe = Bqe.fastKey,
  Vqe = HE,
  ZCe = Vqe.set,
  gQ = Vqe.getterFor,
  iTr = {
    getConstructor: function (t, e, n, r) {
      var i = t(function (d, h) {
          q_r(d, o),
            ZCe(d, {
              type: e,
              index: Y_r(null),
              first: void 0,
              last: void 0,
              size: 0,
            }),
            LM || (d.size = 0),
            eTr(h) || tTr(h, d[r], { that: d, AS_ENTRIES: n });
        }),
        o = i.prototype,
        l = gQ(e),
        u = function (d, h, f) {
          var p,
            g,
            y = l(d),
            v = c(d, h);
          return (
            v
              ? (v.value = f)
              : ((y.last = v =
                  {
                    index: (g = KCe(h, !0)),
                    key: h,
                    value: f,
                    previous: (p = y.last),
                    next: void 0,
                    removed: !1,
                  }),
                y.first || (y.first = v),
                p && (p.next = v),
                LM ? y.size++ : d.size++,
                g !== "F" && (y.index[g] = v)),
            d
          );
        },
        c = function (d, h) {
          var f,
            p = l(d),
            g = KCe(h);
          if (g !== "F") return p.index[g];
          for (f = p.first; f; f = f.next) if (f.key == h) return f;
        };
      return (
        jCe(o, {
          clear: function () {
            for (var d = l(this), h = d.index, f = d.first; f; )
              (f.removed = !0),
                f.previous && (f.previous = f.previous.next = void 0),
                delete h[f.index],
                (f = f.next);
            (d.first = d.last = void 0), LM ? (d.size = 0) : (this.size = 0);
          },
          delete: function (d) {
            var h = this,
              f = l(h),
              p = c(h, d);
            if (p) {
              var g = p.next,
                y = p.previous;
              delete f.index[p.index],
                (p.removed = !0),
                y && (y.next = g),
                g && (g.previous = y),
                f.first == p && (f.first = g),
                f.last == p && (f.last = y),
                LM ? f.size-- : h.size--;
            }
            return !!p;
          },
          forEach: function (d) {
            for (
              var h,
                f = l(this),
                p = J_r(d, arguments.length > 1 ? arguments[1] : void 0);
              (h = h ? h.next : f.first);

            )
              for (p(h.value, h.key, this); h && h.removed; ) h = h.previous;
          },
          has: function (d) {
            return !!c(this, d);
          },
        }),
        jCe(
          o,
          n
            ? {
                get: function (d) {
                  var h = c(this, d);
                  return h && h.value;
                },
                set: function (d, h) {
                  return u(this, d === 0 ? 0 : d, h);
                },
              }
            : {
                add: function (d) {
                  return u(this, (d = d === 0 ? 0 : d), d);
                },
              }
        ),
        LM &&
          Q_r(o, "size", {
            configurable: !0,
            get: function () {
              return l(this).size;
            },
          }),
        i
      );
    },
    setStrong: function (t, e, n) {
      var r = e + " Iterator",
        i = gQ(e),
        o = gQ(r);
      nTr(
        t,
        e,
        function (l, u) {
          ZCe(this, { type: r, target: l, state: i(l), kind: u, last: void 0 });
        },
        function () {
          for (var l = o(this), u = l.kind, c = l.last; c && c.removed; )
            c = c.previous;
          return l.target && (l.last = c = c ? c.next : l.state.first)
            ? WCe(
                u == "keys"
                  ? c.key
                  : u == "values"
                  ? c.value
                  : [c.key, c.value],
                !1
              )
            : ((l.target = void 0), WCe(void 0, !0));
        },
        n ? "entries" : "values",
        !n,
        !0
      ),
        rTr(e);
    },
  },
  aTr = K_r,
  oTr = iTr;
aTr(
  "Map",
  function (t) {
    return function () {
      return t(this, arguments.length ? arguments[0] : void 0);
    };
  },
  oTr
);
var sTr = js,
  lTr = sTr.Map,
  uTr = lTr,
  cTr = uTr,
  dTr = cTr,
  hTr = dTr,
  fTr = Pd,
  pTr = Kl,
  gTr = sd,
  mTr = Ade,
  yTr = jD,
  YCe = X0,
  QCe = [].push,
  vTr = function (t) {
    var e,
      n,
      r,
      i,
      o = arguments.length,
      l = o > 1 ? arguments[1] : void 0;
    return (
      mTr(this),
      (e = l !== void 0) && gTr(l),
      yTr(t)
        ? new this()
        : ((n = []),
          e
            ? ((r = 0),
              (i = fTr(l, o > 2 ? arguments[2] : void 0)),
              YCe(t, function (u) {
                pTr(QCe, n, i(u, r++));
              }))
            : YCe(t, QCe, { that: n }),
          new this(n))
    );
  },
  bTr = di,
  _Tr = vTr;
bTr({ target: "Map", stat: !0, forced: !0 }, { from: _Tr });
var TTr = yO,
  ETr = function () {
    return new this(TTr(arguments));
  },
  STr = di,
  RTr = ETr;
STr({ target: "Map", stat: !0, forced: !0 }, { of: RTr });
var ATr = OR,
  Yf = function (t) {
    if (
      typeof t == "object" &&
      "size" in t &&
      "has" in t &&
      "get" in t &&
      "set" in t &&
      "delete" in t &&
      "entries" in t
    )
      return t;
    throw TypeError(ATr(t) + " is not a map");
  },
  wTr = function (t, e) {
    return e == 1
      ? function (n, r) {
          return n[t](r);
        }
      : function (n, r, i) {
          return n[t](r, i);
        };
  },
  kTr = Dd,
  cN = wTr,
  JCe = kTr("Map"),
  Mb = {
    Map: JCe,
    set: cN("set", 2),
    get: cN("get", 1),
    has: cN("has", 1),
    remove: cN("delete", 1),
    proto: JCe.prototype,
  },
  ITr = di,
  DTr = Yf,
  PTr = Mb.remove;
ITr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    deleteAll: function () {
      for (
        var t, e = DTr(this), n = !0, r = 0, i = arguments.length;
        r < i;
        r++
      )
        (t = PTr(e, arguments[r])), (n = n && t);
      return !!n;
    },
  }
);
var MTr = di,
  CTr = Yf,
  Ude = Mb,
  $Tr = Ude.get,
  xTr = Ude.has,
  qCe = Ude.set;
MTr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    emplace: function (t, e) {
      var n,
        r,
        i = CTr(this);
      return xTr(i, t)
        ? ((n = $Tr(i, t)),
          "update" in e && ((n = e.update(n, t, i)), qCe(i, t, n)),
          n)
        : ((r = e.insert(t, i)), qCe(i, t, r), r);
    },
  }
);
var LTr = Kl,
  OTr = function (t, e, n) {
    for (var r, i, o = n || t.next; !(r = LTr(o, t)).done; )
      if ((i = e(r.value)) !== void 0) return i;
  },
  GTr = OTr,
  Iv = function (t, e, n) {
    return n
      ? GTr(t.entries(), function (r) {
          return e(r[1], r[0]);
        })
      : t.forEach(e);
  },
  NTr = di,
  FTr = Pd,
  UTr = Yf,
  BTr = Iv;
NTr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    every: function (t) {
      var e = UTr(this),
        n = FTr(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        BTr(
          e,
          function (r, i) {
            if (!n(r, i, e)) return !1;
          },
          !0
        ) !== !1
      );
    },
  }
);
var HTr = di,
  XTr = Pd,
  VTr = Yf,
  zqe = Mb,
  zTr = Iv,
  jTr = zqe.Map,
  WTr = zqe.set;
HTr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    filter: function (t) {
      var e = VTr(this),
        n = XTr(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new jTr();
      return (
        zTr(e, function (i, o) {
          n(i, o, e) && WTr(r, o, i);
        }),
        r
      );
    },
  }
);
var KTr = di,
  ZTr = Pd,
  YTr = Yf,
  QTr = Iv;
KTr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    find: function (t) {
      var e = YTr(this),
        n = ZTr(t, arguments.length > 1 ? arguments[1] : void 0),
        r = QTr(
          e,
          function (i, o) {
            if (n(i, o, e)) return { value: i };
          },
          !0
        );
      return r && r.value;
    },
  }
);
var JTr = di,
  qTr = Pd,
  eEr = Yf,
  tEr = Iv;
JTr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    findKey: function (t) {
      var e = eEr(this),
        n = qTr(t, arguments.length > 1 ? arguments[1] : void 0),
        r = tEr(
          e,
          function (i, o) {
            if (n(i, o, e)) return { key: o };
          },
          !0
        );
      return r && r.key;
    },
  }
);
var nEr = di,
  rEr = ls,
  iEr = sd,
  aEr = WD,
  oEr = X0,
  SH = Mb,
  sEr = SH.Map,
  lEr = SH.has,
  uEr = SH.get,
  cEr = SH.set,
  dEr = rEr([].push);
nEr(
  { target: "Map", stat: !0, forced: !0 },
  {
    groupBy: function (t, e) {
      aEr(t), iEr(e);
      var n = new sEr(),
        r = 0;
      return (
        oEr(t, function (i) {
          var o = e(i, r++);
          lEr(n, o) ? dEr(uEr(n, o), i) : cEr(n, o, [i]);
        }),
        n
      );
    },
  }
);
var hEr = function (t, e) {
    return t === e || (t != t && e != e);
  },
  fEr = di,
  pEr = hEr,
  gEr = Yf,
  mEr = Iv;
fEr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    includes: function (t) {
      return (
        mEr(
          gEr(this),
          function (e) {
            if (pEr(e, t)) return !0;
          },
          !0
        ) === !0
      );
    },
  }
);
var yEr = di,
  vEr = Kl,
  bEr = X0,
  _Er = Wl,
  e$e = sd,
  TEr = Mb.Map;
yEr(
  { target: "Map", stat: !0, forced: !0 },
  {
    keyBy: function (t, e) {
      var n = new (_Er(this) ? this : TEr)();
      e$e(e);
      var r = e$e(n.set);
      return (
        bEr(t, function (i) {
          vEr(r, n, e(i), i);
        }),
        n
      );
    },
  }
);
var EEr = di,
  SEr = Yf,
  REr = Iv;
EEr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    keyOf: function (t) {
      var e = REr(
        SEr(this),
        function (n, r) {
          if (n === t) return { key: r };
        },
        !0
      );
      return e && e.key;
    },
  }
);
var AEr = di,
  wEr = Pd,
  kEr = Yf,
  jqe = Mb,
  IEr = Iv,
  DEr = jqe.Map,
  PEr = jqe.set;
AEr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    mapKeys: function (t) {
      var e = kEr(this),
        n = wEr(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new DEr();
      return (
        IEr(e, function (i, o) {
          PEr(r, n(i, o, e), i);
        }),
        r
      );
    },
  }
);
var MEr = di,
  CEr = Pd,
  $Er = Yf,
  Wqe = Mb,
  xEr = Iv,
  LEr = Wqe.Map,
  OEr = Wqe.set;
MEr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    mapValues: function (t) {
      var e = $Er(this),
        n = CEr(t, arguments.length > 1 ? arguments[1] : void 0),
        r = new LEr();
      return (
        xEr(e, function (i, o) {
          OEr(r, o, n(i, o, e));
        }),
        r
      );
    },
  }
);
var GEr = di,
  NEr = Yf,
  FEr = X0,
  UEr = Mb.set;
GEr(
  { target: "Map", proto: !0, real: !0, arity: 1, forced: !0 },
  {
    merge: function (t) {
      for (var e = NEr(this), n = arguments.length, r = 0; r < n; )
        FEr(
          arguments[r++],
          function (i, o) {
            UEr(e, i, o);
          },
          { AS_ENTRIES: !0 }
        );
      return e;
    },
  }
);
var BEr = di,
  HEr = sd,
  XEr = Yf,
  VEr = Iv,
  zEr = TypeError;
BEr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    reduce: function (t) {
      var e = XEr(this),
        n = arguments.length < 2,
        r = n ? void 0 : arguments[1];
      if (
        (HEr(t),
        VEr(e, function (i, o) {
          n ? ((n = !1), (r = i)) : (r = t(r, i, o, e));
        }),
        n)
      )
        throw zEr("Reduce of empty map with no initial value");
      return r;
    },
  }
);
var jEr = di,
  WEr = Pd,
  KEr = Yf,
  ZEr = Iv;
jEr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    some: function (t) {
      var e = KEr(this),
        n = WEr(t, arguments.length > 1 ? arguments[1] : void 0);
      return (
        ZEr(
          e,
          function (r, i) {
            if (n(r, i, e)) return !0;
          },
          !0
        ) === !0
      );
    },
  }
);
var YEr = di,
  t$e = sd,
  QEr = Yf,
  Bde = Mb,
  JEr = TypeError,
  qEr = Bde.get,
  e2r = Bde.has,
  t2r = Bde.set;
YEr(
  { target: "Map", proto: !0, real: !0, forced: !0 },
  {
    update: function (t, e) {
      var n = QEr(this),
        r = arguments.length;
      t$e(e);
      var i = e2r(n, t);
      if (!i && r < 3) throw JEr("Updating absent value");
      var o = i ? qEr(n, t) : t$e(r > 2 ? arguments[2] : void 0)(t, n);
      return t2r(n, t, e(o, t, n)), n;
    },
  }
);
var dN = Kl,
  mQ = sd,
  hN = Wl,
  n2r = lh,
  r2r = TypeError,
  Kqe = function (t, e) {
    var n,
      r = n2r(this),
      i = mQ(r.get),
      o = mQ(r.has),
      l = mQ(r.set),
      u = arguments.length > 2 ? arguments[2] : void 0;
    if (!hN(e) && !hN(u)) throw r2r("At least one callback required");
    return (
      dN(o, r, t)
        ? ((n = dN(i, r, t)), hN(e) && ((n = e(n)), dN(l, r, t, n)))
        : hN(u) && ((n = u()), dN(l, r, t, n)),
      n
    );
  },
  i2r = di,
  a2r = Kqe;
i2r({ target: "Map", proto: !0, real: !0, forced: !0 }, { upsert: a2r });
var o2r = di,
  s2r = Kqe;
o2r(
  { target: "Map", proto: !0, real: !0, name: "upsert", forced: !0 },
  { updateOrInsert: s2r }
);
var l2r = hTr,
  u2r = l2r,
  c2r = u2r,
  d2r = c2r,
  Zqe = Sa(d2r),
  h2r = lh,
  f2r = BJe,
  p2r = function (t, e, n, r) {
    try {
      return r ? e(h2r(n)[0], n[1]) : e(n);
    } catch (i) {
      f2r(t, "throw", i);
    }
  },
  g2r = Pd,
  m2r = Kl,
  y2r = tg,
  v2r = p2r,
  b2r = UJe,
  _2r = hH,
  T2r = H0,
  n$e = YD,
  E2r = Rde,
  S2r = bH,
  r$e = Array,
  Yqe = function (t) {
    var e = y2r(t),
      n = _2r(this),
      r = arguments.length,
      i = r > 1 ? arguments[1] : void 0,
      o = i !== void 0;
    o && (i = g2r(i, r > 2 ? arguments[2] : void 0));
    var l,
      u,
      c,
      d,
      h,
      f,
      p = S2r(e),
      g = 0;
    if (!p || (this === r$e && b2r(p)))
      for (l = T2r(e), u = n ? new this(l) : r$e(l); l > g; g++)
        (f = o ? i(e[g], g) : e[g]), n$e(u, g, f);
    else
      for (
        h = (d = E2r(e, p)).next, u = n ? new this() : [];
        !(c = m2r(h, d)).done;
        g++
      )
        (f = o ? v2r(d, i, [c.value, g], !0) : c.value), n$e(u, g, f);
    return (u.length = g), u;
  },
  R2r = di,
  A2r = Yqe,
  w2r = fqe,
  k2r = !w2r(function (t) {
    Array.from(t);
  });
R2r({ target: "Array", stat: !0, forced: k2r }, { from: A2r });
var I2r = js,
  D2r = I2r.Array.from,
  P2r = D2r,
  M2r = P2r,
  C2r = M2r,
  $2r = C2r,
  x2r = $2r,
  L2r = x2r,
  O2r = L2r,
  G2r = O2r,
  Qqe = Sa(G2r),
  N2r = ld,
  F2r = N2r("Array").values,
  U2r = F2r,
  B2r = U2r,
  H2r = FE,
  X2r = qu,
  V2r = xu,
  z2r = B2r,
  yQ = Array.prototype,
  j2r = { DOMTokenList: !0, NodeList: !0 },
  W2r = function (t) {
    var e = t.values;
    return t === yQ || (V2r(yQ, t) && e === yQ.values) || X2r(j2r, H2r(t))
      ? z2r
      : e;
  },
  K2r = W2r,
  Z2r = K2r,
  Y2r = Z2r,
  Q2r = Y2r,
  J2r = Q2r,
  q2r = J2r,
  uc = Sa(q2r),
  eSr = (function () {
    function t(e) {
      $o(this, t),
        da(this, "ctx", void 0),
        da(this, "strategyMap", new Zqe()),
        (this.ctx = e);
    }
    return (
      xo(t, [
        {
          key: "registerStrategy",
          value: function (e) {
            var n;
            return !(
              e == null ||
              (n = e.Strategy) === null ||
              n === void 0 ||
              !n.strategyName ||
              (this.strategyMap.get(e.Strategy.strategyName) ||
                this.strategyMap.set(e.Strategy.strategyName, {
                  inst: new e.Strategy({
                    ctx: this.ctx,
                    config: e.config,
                    strategyName: e.Strategy.strategyName,
                    strategyCenter: this,
                  }),
                }),
              0)
            );
          },
        },
        {
          key: "getStrategyInstByName",
          value: function (e) {
            var n;
            return e &&
              (n = this.strategyMap.get(e)) !== null &&
              n !== void 0 &&
              n.inst
              ? this.strategyMap.get(e).inst
              : null;
          },
        },
        {
          key: "getStrategyList",
          value: function () {
            var e, n;
            return Qy((e = Qqe(uc((n = this.strategyMap)).call(n)))).call(
              e,
              function (r) {
                return r.inst;
              }
            );
          },
        },
        {
          key: "getStrategyByName",
          value: function (e) {
            return e && this.strategyMap.get(e)
              ? this.strategyMap.get(e)
              : null;
          },
        },
        { key: "registerAlgorithm", value: function () {} },
        { key: "getStrategyInstByNameAsync", value: function () {} },
        { key: "loadStrategySrcAsync", value: function () {} },
      ]),
      t
    );
  })(),
  tSr = (function () {
    function t(e) {
      $o(this, t), da(this, "inst", void 0), (this.inst = e.inst);
    }
    return (
      xo(t, [
        {
          key: "getInst",
          value: function () {
            return this.inst;
          },
        },
        {
          key: "getPlayerConfig",
          value: function () {
            var e;
            return (e = this.inst) === null || e === void 0
              ? void 0
              : e.playerConfig;
          },
        },
        {
          key: "getStrategyConfig",
          value: function () {
            var e;
            return (e = this.inst) === null || e === void 0
              ? void 0
              : e.strategyConfig;
          },
        },
      ]),
      t
    );
  })(),
  nSr = (function () {
    function t() {
      $o(this, t), da(this, "players", void 0), (this.players = new Zqe());
    }
    return (
      xo(t, [
        {
          key: "get",
          value: function (e) {
            return this.players.get(e);
          },
        },
        {
          key: "addPlayer",
          value: function (e, n) {
            return !(
              !e ||
              this.players.get(e) ||
              (this.players.set(e, new tSr(n)), 0)
            );
          },
        },
        {
          key: "getPlayerList",
          value: function () {
            var e;
            return Qqe(uc((e = this.players)).call(e));
          },
        },
        {
          key: "removePlayer",
          value: function (e) {
            return !(!e || !this.players.get(e) || (this.players.delete(e), 0));
          },
        },
      ]),
      t
    );
  })();
(function () {
  function t(e) {
    $o(this, t),
      da(this, "strategyCenter", void 0),
      da(this, "ctx", void 0),
      da(this, "config", void 0),
      da(this, "player", void 0),
      da(this, "strategyName", void 0),
      (this.ctx = e.ctx),
      (this.config = e.config),
      (this.strategyName = e.strategyName),
      (this.strategyCenter = e.strategyCenter),
      (this.player = null);
  }
  xo(t, [
    {
      key: "getStrategyConfig",
      value: function () {
        return this.config;
      },
    },
    {
      key: "setPlayerInst",
      value: function (e) {
        this.player = e.getInst();
      },
    },
    { key: "beforePlayerCreate", value: function (e) {} },
    { key: "onPlayerEvent", value: function (e, n) {} },
    { key: "onGlobalEvent", value: function (e, n) {} },
  ]);
})();
var rSr = (function () {
    function t(e) {
      $o(this, t),
        da(this, "tracker", void 0),
        da(this, "_tea", void 0),
        da(this, "ctx", void 0),
        da(this, "options", void 0),
        (this.ctx = e.cxt),
        (this.options = e),
        this.initTracker(e),
        this.bindABVersion();
    }
    return (
      xo(t, [
        {
          key: "bindTrackerABVersion",
          value: function (e) {
            var n,
              r,
              i,
              o = this;
            !this._tea &&
              e &&
              (n = this.options) !== null &&
              n !== void 0 &&
              (n = n.trackInfo) !== null &&
              n !== void 0 &&
              n.enableABVersion &&
              ((this._tea = e),
              (r = this._tea) === null ||
                r === void 0 ||
                (i = r.filterEvent) === null ||
                i === void 0 ||
                i.call(r, function (l) {
                  var u, c;
                  return (
                    l == null ||
                      (u = l[0]) === null ||
                      u === void 0 ||
                      (u = u.events) === null ||
                      u === void 0 ||
                      (c = Dc(u)) === null ||
                      c === void 0 ||
                      c.call(u, function (d) {
                        var h,
                          f,
                          p,
                          g = (
                            ((h = o.ctx) === null ||
                            h === void 0 ||
                            (h = h.dataCenter) === null ||
                            h === void 0
                              ? void 0
                              : h.getServiceStrategyConfig()) || {}
                          ).libra_ab_version;
                        !g ||
                          !d ||
                          ((f = d.ab_sdk_version) !== null &&
                            f !== void 0 &&
                            dD(f).call(f, g)) ||
                          (d.ab_sdk_version = d.ab_sdk_version
                            ? eh((p = "".concat(d.ab_sdk_version, ","))).call(
                                p,
                                g
                              )
                            : "".concat(g));
                      }),
                    l
                  );
                }));
          },
        },
        {
          key: "track",
          value: function (e, n) {
            var r, i;
            typeof this.tracker == "function"
              ? this.tracker(e, n)
              : (r = this.tracker) === null ||
                r === void 0 ||
                (i = r.event) === null ||
                i === void 0 ||
                i.call(r, e, n);
          },
        },
        {
          key: "initTracker",
          value: function (e) {
            var n, r;
            if (
              dD((n = [To.LIVE, To.VOD])).call(n, e.type) &&
              (r = e.trackInfo) !== null &&
              r !== void 0 &&
              r.Collector &&
              typeof window < "u"
            ) {
              var i = "__vestrategy_".concat(e.type, "_tracker__");
              if (!window[i]) {
                (this.tracker = window[i] =
                  new e.trackInfo.Collector("".concat(e.type, "_tracker"))),
                  this.tracker.init({
                    app_id: e.appId,
                    channel: e.channel || Mde.CN,
                    log: !1,
                    disable_sdk_monitor: !0,
                  });
                var o = fs(
                  {
                    play_type: e.type === To.VOD ? 0 : 1,
                    line_app_id: e.lineAppId,
                    line_user_id: e.lineUserId,
                  },
                  lmr(this.ctx.featureCenter.getFeatureList())
                );
                return (
                  this.tracker.config(
                    fs(
                      fs({}, o),
                      {},
                      { user_unique_id: e.lineUserId, disable_auto_pv: !0 }
                    )
                  ),
                  void this.tracker.start()
                );
              }
              this.tracker = window[i];
            }
          },
        },
        {
          key: "bindABVersion",
          value: function () {
            var e,
              n,
              r = this;
            this.tracker &&
              ((e = this.tracker) === null ||
                e === void 0 ||
                (n = e.filterEvent) === null ||
                n === void 0 ||
                n.call(e, function (i) {
                  var o, l;
                  return (
                    i == null ||
                      (o = i[0]) === null ||
                      o === void 0 ||
                      (o = o.events) === null ||
                      o === void 0 ||
                      (l = Dc(o)) === null ||
                      l === void 0 ||
                      l.call(o, function (u) {
                        var c,
                          d = (
                            ((c = r.ctx) === null ||
                            c === void 0 ||
                            (c = c.dataCenter) === null ||
                            c === void 0
                              ? void 0
                              : c.getServiceStrategyConfig()) || {}
                          ).libra_ab_version;
                        d && u && (u.ab_sdk_version = "".concat(d));
                      }),
                    i
                  );
                }));
          },
        },
      ]),
      t
    );
  })(),
  iSr = di,
  aSr = GR;
iSr({ target: "Array", stat: !0 }, { isArray: aSr });
var Aw,
  oSr = js,
  sSr = oSr.Array.isArray,
  lSr = sSr,
  uSr = lSr,
  cSr = uSr,
  dSr = cSr,
  hSr = dSr,
  fSr = hSr,
  pSr = fSr,
  gSr = pSr,
  I1 = Sa(gSr),
  mSr = (function (t) {
    return (
      (t.Equal = "＝"),
      (t.NotEqual = "≠"),
      (t.Greater = ">"),
      (t.GreaterOrEqual = "≥"),
      (t.Less = "<"),
      (t.LessOrEqual = "≤"),
      t
    );
  })(mSr || {});
da((Aw = {}), "＝", {
  validate: function (t, e) {
    var n;
    return I1(uc(t)) ? dD((n = uc(t))).call(n, e) : uc(t) === e;
  },
}),
  da(Aw, "≠", {
    validate: function (t, e) {
      var n;
      return I1(uc(t)) ? !dD((n = uc(t))).call(n, e) : uc(t) !== e;
    },
  }),
  da(Aw, ">", {
    validate: function (t, e) {
      return !I1(uc(t)) && typeof uc(t) != "boolean" && e > uc(t);
    },
  }),
  da(Aw, "≥", {
    validate: function (t, e) {
      return !I1(uc(t)) && typeof uc(t) != "boolean" && e >= uc(t);
    },
  }),
  da(Aw, "<", {
    validate: function (t, e) {
      return !I1(uc(t)) && typeof uc(t) != "boolean" && e < uc(t);
    },
  }),
  da(Aw, "≤", {
    validate: function (t, e) {
      return !I1(uc(t)) && typeof uc(t) != "boolean" && e <= uc(t);
    },
  });
var vQ = new Cde("VeStrategy-BasePlugin"),
  bQ = (function (t) {
    rg(n, hm);
    var e = ig(n);
    function n(r) {
      var i, o, l, u, c;
      $o(this, n),
        da(Lk((c = e.call(this, r))), "ctx", void 0),
        da(Lk(c), "strategyCenter", void 0),
        da(Lk(c), "videoType", void 0),
        da(Lk(c), "playerLogEventHandler", function (h, f) {
          var p, g;
          return typeof h == "string"
            ? (p = c.ctx) === null ||
              p === void 0 ||
              (p = p.tracker) === null ||
              p === void 0 ||
              (g = p.track) === null ||
              g === void 0
              ? void 0
              : g.call(p, h, f)
            : I1(h)
            ? Dc(h).call(h, function (y) {
                var v,
                  b,
                  w = y.eventName,
                  k = y.params;
                (v = c.ctx) === null ||
                  v === void 0 ||
                  (v = v.tracker) === null ||
                  v === void 0 ||
                  (b = v.track) === null ||
                  b === void 0 ||
                  b.call(v, w, k);
              })
            : void 0;
        }),
        (c.ctx = r.config.ctx),
        (c.videoType = r.config.videoType),
        (c.strategyCenter = r.config.strategyCenter),
        vQ.update(
          (i = c.ctx) === null ||
            i === void 0 ||
            (i = i.dataCenter) === null ||
            i === void 0 ||
            (i = i.getAppConfig()) === null ||
            i === void 0
            ? void 0
            : i.log
        );
      var d = {
        playerId: c.player.playerId,
        playerConfig: null,
        strategyConfig: null,
        strategyCenter: c.strategyCenter,
      };
      return (
        hD(d, "playerConfig", {
          get: function () {
            return c.playerConfig;
          },
        }),
        hD(d, "strategyConfig", {
          get: function () {
            return r.config.strategyConfig;
          },
        }),
        c.player.playerId &&
          c.ctx.playerManager.addPlayer(c.player.playerId, { inst: d }),
        (o = c.strategyCenter) === null ||
          o === void 0 ||
          (l = o.getStrategyList) === null ||
          l === void 0 ||
          Dc((u = l.call(o))).call(u, function (h) {
            var f, p;
            h == null ||
              (f = h.setPlayerInst) === null ||
              f === void 0 ||
              f.call(h, c.ctx.playerManager.get(c.player.playerId)),
              h == null ||
                (p = h.onBasePluginCreated) === null ||
                p === void 0 ||
                p.call(h, c.ctx.playerManager.get(c.player.playerId));
          }),
        vQ.info("BasePluginInit", r.config),
        c
      );
    }
    return (
      xo(
        n,
        [
          {
            key: "afterPlayerInit",
            value: function () {
              var r, i, o;
              this.player.on("abLog", this.playerLogEventHandler),
                this.videoType === To.VOD &&
                  ((r = this.ctx) === null ||
                    r === void 0 ||
                    (r = r.tracker) === null ||
                    r === void 0 ||
                    (i = r.bindTrackerABVersion) === null ||
                    i === void 0 ||
                    i.call(
                      r,
                      (o = this.player) === null ||
                        o === void 0 ||
                        (o = o.vodLogger) === null ||
                        o === void 0
                        ? void 0
                        : o.tracker
                    )),
                this.videoType,
                To.LIVE;
            },
          },
          {
            key: "patchEvent",
            value: function (r, i) {
              var o,
                l,
                u,
                c,
                d = this;
              (o = this.strategyCenter) === null ||
                o === void 0 ||
                (l = o.getStrategyList) === null ||
                l === void 0 ||
                Dc((u = l.call(o))).call(u, function (h) {
                  var f;
                  h == null ||
                    (f = h.onPlayerEvent) === null ||
                    f === void 0 ||
                    f.call(h, r, { playerInst: h, options: i });
                }),
                (c = this.ctx.playerManager.getPlayerList()) === null ||
                  c === void 0 ||
                  Dc(c).call(c, function (h) {
                    var f, p, g;
                    (h == null ||
                    (f = h.getInst) === null ||
                    f === void 0 ||
                    (f = f.call(h)) === null ||
                    f === void 0
                      ? void 0
                      : f.playerId) !== d.player.playerId &&
                      (h == null ||
                        (p = h.getInst) === null ||
                        p === void 0 ||
                        (p = p.call(h)) === null ||
                        p === void 0 ||
                        (p = p.strategyCenter) === null ||
                        p === void 0 ||
                        (g = p.getStrategyList) === null ||
                        g === void 0 ||
                        (g = g.call(p)) === null ||
                        g === void 0 ||
                        Dc(g).call(g, function (y) {
                          var v;
                          y == null ||
                            (v = y.onGlobalEvent) === null ||
                            v === void 0 ||
                            v.call(y, r, { playerInst: h, options: i });
                        }));
                  });
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r = this;
              this.on(BF, function (i) {
                r.patchEvent(BF, i), vQ.info("Event", BF);
              });
            },
          },
          {
            key: "destroy",
            value: function () {
              this.ctx.playerManager.removePlayer(this.player.playerId),
                this.player.off("abLog", this.playerLogEventHandler);
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "veStrategyBasePlugin";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { text: "策略基础插件" };
            },
          },
        ]
      ),
      n
    );
  })(),
  ySr = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(t, [
        {
          key: "apply",
          value: function (e, n) {
            var r,
              i,
              o = this,
              l = n || {},
              u = l.plugins,
              c = l.pluginConfiguration,
              d = l.result;
            return (
              e &&
              (u != null && u.length && I1(e.presets)
                ? e.presets.unshift(
                    xo(function h() {
                      $o(this, h), da(this, "plugins", u);
                    })
                  )
                : u != null &&
                  u.length &&
                  I1(e.plugins) &&
                  (e.plugins = eh(u).call(u, e.plugins)),
              u != null &&
                u.length &&
                c &&
                Dc((i = Mf(c))).call(i, function (h) {
                  e[h] = c[h];
                }),
              d &&
                Dc((r = Mf(d))).call(r, function (h) {
                  h === Eqe.adaptRange && o.adaptRange(e, d[h]);
                }),
              e)
            );
          },
        },
        {
          key: "_findConfig",
          value: function (e, n) {
            var r;
            return jy((r = Mf(e))).call(r, function (i) {
              return (i == null ? void 0 : i.toLowerCase()) === n;
            });
          },
        },
        {
          key: "adaptRange",
          value: function (e, n) {
            var r, i;
            if (
              n == null ||
              !n.enable ||
              !e ||
              n == null ||
              !n._vtype ||
              !dD((r = [p6.MP4, p6.DASH])).call(r, n._vtype)
            )
              return e;
            var o = this._findConfig(
              e,
              n._vtype === p6.MP4 ? "mp4encryptplayer" : "dashplugin"
            );
            return (
              o &&
                e[o] &&
                n.options &&
                (e[o].adaptRange = fs(
                  fs(
                    {},
                    (i = e[o].adaptRange) !== null && i !== void 0 ? i : {}
                  ),
                  n.options
                )),
              e
            );
          },
        },
      ]),
      t
    );
  })(),
  vSr = Yo,
  bSr = il,
  _Sr = Ju,
  i$e = EQe,
  TSr = bSr("iterator"),
  Hde = !vSr(function () {
    var t = new URL("b?a=1&b=2&c=3", "http://a"),
      e = t.searchParams,
      n = new URLSearchParams("a=1&a=2"),
      r = "";
    return (
      (t.pathname = "c%20d"),
      e.forEach(function (i, o) {
        e.delete("b"), (r += o + i);
      }),
      n.delete("a", 2),
      (i$e && (!t.toJSON || !n.has("a", 1) || n.has("a", 2))) ||
        (!e.size && (i$e || !_Sr)) ||
        !e.sort ||
        t.href !== "http://a/c%20d?a=1&c=3" ||
        e.get("c") !== "3" ||
        String(new URLSearchParams("?a=1")) !== "a=1" ||
        !e[TSr] ||
        new URL("https://a@b").username !== "a" ||
        new URLSearchParams(new URLSearchParams("a=b")).get("a") !== "b" ||
        new URL("http://тест").host !== "xn--e1aybc" ||
        new URL("http://a#б").hash !== "#%D0%B1" ||
        r !== "a1c3" ||
        new URL("http://x", void 0).host !== "x"
    );
  }),
  a$e = fde,
  ESr = Math.floor,
  Pie = function (t, e) {
    var n = t.length,
      r = ESr(n / 2);
    return n < 8
      ? SSr(t, e)
      : RSr(t, Pie(a$e(t, 0, r), e), Pie(a$e(t, r), e), e);
  },
  SSr = function (t, e) {
    for (var n, r, i = t.length, o = 1; o < i; ) {
      for (r = o, n = t[o]; r && e(t[r - 1], n) > 0; ) t[r] = t[--r];
      r !== o++ && (t[r] = n);
    }
    return t;
  },
  RSr = function (t, e, n, r) {
    for (var i = e.length, o = n.length, l = 0, u = 0; l < i || u < o; )
      t[l + u] =
        l < i && u < o
          ? r(e[l], n[u]) <= 0
            ? e[l++]
            : n[u++]
          : l < i
          ? e[l++]
          : n[u++];
    return t;
  },
  ASr = Pie,
  _Q = di,
  fD = Ml,
  fN = Kl,
  _v = ls,
  Ok = Ju,
  o$e = Hde,
  s$e = BE,
  wSr = pO,
  kSr = Xqe,
  ISr = Pb,
  DSr = dJe,
  Xde = HE,
  Jqe = TO,
  TQ = Wl,
  PSr = qu,
  MSr = Pd,
  CSr = FE,
  $Sr = lh,
  qqe = mc,
  Ph = ng,
  xSr = UE,
  l$e = NE,
  Mie = Rde,
  LSr = bH,
  ww = _H,
  OSr = il,
  GSr = ASr,
  NSr = OSr("iterator"),
  bL = "URLSearchParams",
  eet = bL + "Iterator",
  tet = Xde.set,
  Xg = Xde.getterFor(bL),
  FSr = Xde.getterFor(eet),
  USr = Object.getOwnPropertyDescriptor,
  Vde = function (t) {
    if (!Ok) return fD[t];
    var e = USr(fD, t);
    return e && e.value;
  },
  u$e = Vde("fetch"),
  t9 = Vde("Request"),
  J$ = Vde("Headers"),
  EQ = t9 && t9.prototype,
  c$e = J$ && J$.prototype,
  BSr = fD.RegExp,
  HSr = fD.TypeError,
  net = fD.decodeURIComponent,
  XSr = fD.encodeURIComponent,
  VSr = _v("".charAt),
  d$e = _v([].join),
  SS = _v([].push),
  Cie = _v("".replace),
  zSr = _v([].shift),
  h$e = _v([].splice),
  f$e = _v("".split),
  jSr = _v("".slice),
  WSr = /\+/g,
  p$e = Array(4),
  KSr = function (t) {
    return (
      p$e[t - 1] || (p$e[t - 1] = BSr("((?:%[\\da-f]{2}){" + t + "})", "gi"))
    );
  },
  ZSr = function (t) {
    try {
      return net(t);
    } catch {
      return t;
    }
  },
  g$e = function (t) {
    var e = Cie(t, WSr, " "),
      n = 4;
    try {
      return net(e);
    } catch {
      for (; n; ) e = Cie(e, KSr(n--), ZSr);
      return e;
    }
  },
  YSr = /[!'()~]|%20/g,
  QSr = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
  },
  JSr = function (t) {
    return QSr[t];
  },
  m$e = function (t) {
    return Cie(XSr(t), YSr, JSr);
  },
  SQ = DSr(
    function (t, e) {
      tet(this, { type: eet, iterator: Mie(Xg(t).entries), kind: e });
    },
    "Iterator",
    function () {
      var t = FSr(this),
        e = t.kind,
        n = t.iterator.next(),
        r = n.value;
      return (
        n.done ||
          (n.value =
            e === "keys" ? r.key : e === "values" ? r.value : [r.key, r.value]),
        n
      );
    },
    !0
  ),
  ret = function (t) {
    (this.entries = []),
      (this.url = null),
      t !== void 0 &&
        (qqe(t)
          ? this.parseObject(t)
          : this.parseQuery(
              typeof t == "string" ? (VSr(t, 0) === "?" ? jSr(t, 1) : t) : Ph(t)
            ));
  };
ret.prototype = {
  type: bL,
  bindURL: function (t) {
    (this.url = t), this.update();
  },
  parseObject: function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = LSr(t);
    if (c)
      for (n = (e = Mie(t, c)).next; !(r = fN(n, e)).done; ) {
        if (
          ((o = (i = Mie($Sr(r.value))).next),
          (l = fN(o, i)).done || (u = fN(o, i)).done || !fN(o, i).done)
        )
          throw HSr("Expected sequence with length 2");
        SS(this.entries, { key: Ph(l.value), value: Ph(u.value) });
      }
    else
      for (var d in t)
        PSr(t, d) && SS(this.entries, { key: d, value: Ph(t[d]) });
  },
  parseQuery: function (t) {
    if (t)
      for (var e, n, r = f$e(t, "&"), i = 0; i < r.length; )
        (e = r[i++]).length &&
          ((n = f$e(e, "=")),
          SS(this.entries, { key: g$e(zSr(n)), value: g$e(d$e(n, "=")) }));
  },
  serialize: function () {
    for (var t, e = this.entries, n = [], r = 0; r < e.length; )
      (t = e[r++]), SS(n, m$e(t.key) + "=" + m$e(t.value));
    return d$e(n, "&");
  },
  update: function () {
    (this.entries.length = 0), this.parseQuery(this.url.query);
  },
  updateURL: function () {
    this.url && this.url.update();
  },
};
var n9 = function () {
    Jqe(this, nk);
    var t = tet(this, new ret(arguments.length > 0 ? arguments[0] : void 0));
    Ok || (this.size = t.entries.length);
  },
  nk = n9.prototype;
if (
  (kSr(
    nk,
    {
      append: function (t, e) {
        var n = Xg(this);
        ww(arguments.length, 2),
          SS(n.entries, { key: Ph(t), value: Ph(e) }),
          Ok || this.length++,
          n.updateURL();
      },
      delete: function (t) {
        for (
          var e = Xg(this),
            n = ww(arguments.length, 1),
            r = e.entries,
            i = Ph(t),
            o = n < 2 ? void 0 : arguments[1],
            l = o === void 0 ? o : Ph(o),
            u = 0;
          u < r.length;

        ) {
          var c = r[u];
          if (c.key !== i || (l !== void 0 && c.value !== l)) u++;
          else if ((h$e(r, u, 1), l !== void 0)) break;
        }
        Ok || (this.size = r.length), e.updateURL();
      },
      get: function (t) {
        var e = Xg(this).entries;
        ww(arguments.length, 1);
        for (var n = Ph(t), r = 0; r < e.length; r++)
          if (e[r].key === n) return e[r].value;
        return null;
      },
      getAll: function (t) {
        var e = Xg(this).entries;
        ww(arguments.length, 1);
        for (var n = Ph(t), r = [], i = 0; i < e.length; i++)
          e[i].key === n && SS(r, e[i].value);
        return r;
      },
      has: function (t) {
        for (
          var e = Xg(this).entries,
            n = ww(arguments.length, 1),
            r = Ph(t),
            i = n < 2 ? void 0 : arguments[1],
            o = i === void 0 ? i : Ph(i),
            l = 0;
          l < e.length;

        ) {
          var u = e[l++];
          if (u.key === r && (o === void 0 || u.value === o)) return !0;
        }
        return !1;
      },
      set: function (t, e) {
        var n = Xg(this);
        ww(arguments.length, 1);
        for (
          var r, i = n.entries, o = !1, l = Ph(t), u = Ph(e), c = 0;
          c < i.length;
          c++
        )
          (r = i[c]).key === l &&
            (o ? h$e(i, c--, 1) : ((o = !0), (r.value = u)));
        o || SS(i, { key: l, value: u }),
          Ok || (this.size = i.length),
          n.updateURL();
      },
      sort: function () {
        var t = Xg(this);
        GSr(t.entries, function (e, n) {
          return e.key > n.key ? 1 : -1;
        }),
          t.updateURL();
      },
      forEach: function (t) {
        for (
          var e,
            n = Xg(this).entries,
            r = MSr(t, arguments.length > 1 ? arguments[1] : void 0),
            i = 0;
          i < n.length;

        )
          r((e = n[i++]).value, e.key, this);
      },
      keys: function () {
        return new SQ(this, "keys");
      },
      values: function () {
        return new SQ(this, "values");
      },
      entries: function () {
        return new SQ(this, "entries");
      },
    },
    { enumerable: !0 }
  ),
  s$e(nk, NSr, nk.entries, { name: "entries" }),
  s$e(
    nk,
    "toString",
    function () {
      return Xg(this).serialize();
    },
    { enumerable: !0 }
  ),
  Ok &&
    wSr(nk, "size", {
      get: function () {
        return Xg(this).entries.length;
      },
      configurable: !0,
      enumerable: !0,
    }),
  ISr(n9, bL),
  _Q({ global: !0, constructor: !0, forced: !o$e }, { URLSearchParams: n9 }),
  !o$e && TQ(J$))
) {
  var qSr = _v(c$e.has),
    eRr = _v(c$e.set),
    y$e = function (t) {
      if (qqe(t)) {
        var e,
          n = t.body;
        if (CSr(n) === bL)
          return (
            (e = t.headers ? new J$(t.headers) : new J$()),
            qSr(e, "content-type") ||
              eRr(
                e,
                "content-type",
                "application/x-www-form-urlencoded;charset=UTF-8"
              ),
            xSr(t, { body: l$e(0, Ph(n)), headers: l$e(0, e) })
          );
      }
      return t;
    };
  if (
    (TQ(u$e) &&
      _Q(
        { global: !0, enumerable: !0, dontCallGetSet: !0, forced: !0 },
        {
          fetch: function (t) {
            return u$e(t, arguments.length > 1 ? y$e(arguments[1]) : {});
          },
        }
      ),
    TQ(t9))
  ) {
    var RQ = function (t) {
      return (
        Jqe(this, EQ), new t9(t, arguments.length > 1 ? y$e(arguments[1]) : {})
      );
    };
    (EQ.constructor = RQ),
      (RQ.prototype = EQ),
      _Q(
        { global: !0, constructor: !0, dontCallGetSet: !0, forced: !0 },
        { Request: RQ }
      );
  }
}
var Og,
  tRr = { URLSearchParams: n9, getState: Xg },
  FR = ls,
  AQ = 2147483647,
  q$ = 36,
  iet = 1,
  $ie = 26,
  nRr = 38,
  rRr = 700,
  iRr = 72,
  aRr = 128,
  oRr = "-",
  sRr = /[^\0-\u007E]/,
  aet = /[.\u3002\uFF0E\uFF61]/g,
  v$e = "Overflow: input needs wider integers to process",
  wQ = q$ - iet,
  b$e = RangeError,
  lRr = FR(aet.exec),
  Gk = Math.floor,
  kQ = String.fromCharCode,
  _$e = FR("".charCodeAt),
  oet = FR([].join),
  LT = FR([].push),
  uRr = FR("".replace),
  cRr = FR("".split),
  dRr = FR("".toLowerCase),
  hRr = function (t) {
    for (var e = [], n = 0, r = t.length; n < r; ) {
      var i = _$e(t, n++);
      if (i >= 55296 && i <= 56319 && n < r) {
        var o = _$e(t, n++);
        (64512 & o) == 56320
          ? LT(e, ((1023 & i) << 10) + (1023 & o) + 65536)
          : (LT(e, i), n--);
      } else LT(e, i);
    }
    return e;
  },
  T$e = function (t) {
    return t + 22 + 75 * (t < 26);
  },
  fRr = function (t, e, n) {
    var r = 0;
    for (t = n ? Gk(t / rRr) : t >> 1, t += Gk(t / e); t > (wQ * $ie) >> 1; )
      (t = Gk(t / wQ)), (r += q$);
    return Gk(r + ((wQ + 1) * t) / (t + nRr));
  },
  pRr = function (t) {
    var e,
      n,
      r = [],
      i = (t = hRr(t)).length,
      o = aRr,
      l = 0,
      u = iRr;
    for (e = 0; e < t.length; e++) (n = t[e]) < 128 && LT(r, kQ(n));
    var c = r.length,
      d = c;
    for (c && LT(r, oRr); d < i; ) {
      var h = AQ;
      for (e = 0; e < t.length; e++) (n = t[e]) >= o && n < h && (h = n);
      var f = d + 1;
      if (h - o > Gk((AQ - l) / f)) throw b$e(v$e);
      for (l += (h - o) * f, o = h, e = 0; e < t.length; e++) {
        if ((n = t[e]) < o && ++l > AQ) throw b$e(v$e);
        if (n == o) {
          for (var p = l, g = q$; ; ) {
            var y = g <= u ? iet : g >= u + $ie ? $ie : g - u;
            if (p < y) break;
            var v = p - y,
              b = q$ - y;
            LT(r, kQ(T$e(y + (v % b)))), (p = Gk(v / b)), (g += q$);
          }
          LT(r, kQ(T$e(p))), (u = fRr(l, f, d == c)), (l = 0), d++;
        }
      }
      l++, o++;
    }
    return oet(r, "");
  },
  gRr = function (t) {
    var e,
      n,
      r = [],
      i = cRr(uRr(dRr(t), aet, "."), ".");
    for (e = 0; e < i.length; e++)
      (n = i[e]), LT(r, lRr(sRr, n) ? "xn--" + pRr(n) : n);
    return oet(r, ".");
  },
  mRr = di,
  zde = Ju,
  yRr = Hde,
  jde = Ml,
  E$e = Pd,
  Am = ls,
  pN = BE,
  Gg = pO,
  vRr = TO,
  xie = qu,
  Wde = vqe,
  kw = Yqe,
  r0 = fde,
  bRr = vJe.codeAt,
  _Rr = gRr,
  v1 = ng,
  TRr = Pb,
  ERr = _H,
  set = tRr,
  uet = HE,
  SRr = uet.set,
  r9 = uet.getterFor("URL"),
  RRr = set.URLSearchParams,
  ARr = set.getState,
  OM = jde.URL,
  Lie = jde.TypeError,
  i9 = jde.parseInt,
  wRr = Math.floor,
  S$e = Math.pow,
  im = Am("".charAt),
  R0 = Am(/./.exec),
  kC = Am([].join),
  kRr = Am((1).toString),
  IRr = Am([].pop),
  rk = Am([].push),
  IQ = Am("".replace),
  DRr = Am([].shift),
  PRr = Am("".split),
  ex = Am("".slice),
  a9 = Am("".toLowerCase),
  MRr = Am([].unshift),
  CRr = "Invalid authority",
  DQ = "Invalid scheme",
  F2 = "Invalid host",
  R$e = "Invalid port",
  cet = /[a-z]/i,
  $Rr = /[\d+-.a-z]/i,
  Oie = /\d/,
  xRr = /^0x/i,
  LRr = /^[0-7]+$/,
  ORr = /^\d+$/,
  det = /^[\da-f]+$/i,
  GRr = /[\0\t\n\r #%/:<>?@[\\\]^|]/,
  NRr = /[\0\t\n\r #/:<>?@[\\\]^|]/,
  FRr = /^[\u0000-\u0020]+/,
  URr = /(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,
  BRr = /[\t\n\r]/g,
  HRr = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = PRr(t, ".");
    if ((c.length && c[c.length - 1] == "" && c.length--, (e = c.length) > 4))
      return t;
    for (n = [], r = 0; r < e; r++) {
      if ((i = c[r]) == "") return t;
      if (
        ((o = 10),
        i.length > 1 &&
          im(i, 0) == "0" &&
          ((o = R0(xRr, i) ? 16 : 8), (i = ex(i, o == 8 ? 1 : 2))),
        i === "")
      )
        l = 0;
      else {
        if (!R0(o == 10 ? ORr : o == 8 ? LRr : det, i)) return t;
        l = i9(i, o);
      }
      rk(n, l);
    }
    for (r = 0; r < e; r++)
      if (((l = n[r]), r == e - 1)) {
        if (l >= S$e(256, 5 - e)) return null;
      } else if (l > 255) return null;
    for (u = IRr(n), r = 0; r < n.length; r++) u += n[r] * S$e(256, 3 - r);
    return u;
  },
  XRr = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c = [0, 0, 0, 0, 0, 0, 0, 0],
      d = 0,
      h = null,
      f = 0,
      p = function () {
        return im(t, f);
      };
    if (p() == ":") {
      if (im(t, 1) != ":") return;
      (f += 2), (h = ++d);
    }
    for (; p(); ) {
      if (d == 8) return;
      if (p() != ":") {
        for (e = n = 0; n < 4 && R0(det, p()); )
          (e = 16 * e + i9(p(), 16)), f++, n++;
        if (p() == ".") {
          if (n == 0 || ((f -= n), d > 6)) return;
          for (r = 0; p(); ) {
            if (((i = null), r > 0)) {
              if (!(p() == "." && r < 4)) return;
              f++;
            }
            if (!R0(Oie, p())) return;
            for (; R0(Oie, p()); ) {
              if (((o = i9(p(), 10)), i === null)) i = o;
              else {
                if (i == 0) return;
                i = 10 * i + o;
              }
              if (i > 255) return;
              f++;
            }
            (c[d] = 256 * c[d] + i), (++r != 2 && r != 4) || d++;
          }
          if (r != 4) return;
          break;
        }
        if (p() == ":") {
          if ((f++, !p())) return;
        } else if (p()) return;
        c[d++] = e;
      } else {
        if (h !== null) return;
        f++, (h = ++d);
      }
    }
    if (h !== null)
      for (l = d - h, d = 7; d != 0 && l > 0; )
        (u = c[d]), (c[d--] = c[h + l - 1]), (c[h + --l] = u);
    else if (d != 8) return;
    return c;
  },
  VRr = function (t) {
    for (var e = null, n = 1, r = null, i = 0, o = 0; o < 8; o++)
      t[o] !== 0
        ? (i > n && ((e = r), (n = i)), (r = null), (i = 0))
        : (r === null && (r = o), ++i);
    return i > n && ((e = r), (n = i)), e;
  },
  GM = function (t) {
    var e, n, r, i;
    if (typeof t == "number") {
      for (e = [], n = 0; n < 4; n++) MRr(e, t % 256), (t = wRr(t / 256));
      return kC(e, ".");
    }
    if (typeof t == "object") {
      for (e = "", r = VRr(t), n = 0; n < 8; n++)
        (i && t[n] === 0) ||
          (i && (i = !1),
          r === n
            ? ((e += n ? ":" : "::"), (i = !0))
            : ((e += kRr(t[n], 16)), n < 7 && (e += ":")));
      return "[" + e + "]";
    }
    return t;
  },
  m6 = {},
  het = Wde({}, m6, { " ": 1, '"': 1, "<": 1, ">": 1, "`": 1 }),
  fet = Wde({}, het, { "#": 1, "?": 1, "{": 1, "}": 1 }),
  PQ = Wde({}, fet, {
    "/": 1,
    ":": 1,
    ";": 1,
    "=": 1,
    "@": 1,
    "[": 1,
    "\\": 1,
    "]": 1,
    "^": 1,
    "|": 1,
  }),
  aT = function (t, e) {
    var n = bRr(t, 0);
    return n > 32 && n < 127 && !xie(e, t) ? t : encodeURIComponent(t);
  },
  gN = { ftp: 21, file: null, http: 80, https: 443, ws: 80, wss: 443 },
  IC = function (t, e) {
    var n;
    return (
      t.length == 2 &&
      R0(cet, im(t, 0)) &&
      ((n = im(t, 1)) == ":" || (!e && n == "|"))
    );
  },
  A$e = function (t) {
    var e;
    return (
      t.length > 1 &&
      IC(ex(t, 0, 2)) &&
      (t.length == 2 ||
        (e = im(t, 2)) === "/" ||
        e === "\\" ||
        e === "?" ||
        e === "#")
    );
  },
  zRr = function (t) {
    return t === "." || a9(t) === "%2e";
  },
  jRr = function (t) {
    return (
      (t = a9(t)) === ".." || t === "%2e." || t === ".%2e" || t === "%2e%2e"
    );
  },
  MQ = {},
  w$e = {},
  CQ = {},
  k$e = {},
  I$e = {},
  $Q = {},
  D$e = {},
  P$e = {},
  mN = {},
  yN = {},
  xQ = {},
  LQ = {},
  OQ = {},
  GQ = {},
  M$e = {},
  NQ = {},
  Iw = {},
  Dy = {},
  C$e = {},
  U2 = {},
  h1 = {},
  Kde = function (t, e, n) {
    var r,
      i,
      o,
      l = v1(t);
    if (e) {
      if ((i = this.parse(l))) throw Lie(i);
      this.searchParams = null;
    } else {
      if ((n !== void 0 && (r = new Kde(n, !0)), (i = this.parse(l, null, r))))
        throw Lie(i);
      (o = ARr(new RRr())).bindURL(this), (this.searchParams = o);
    }
  };
Kde.prototype = {
  type: "URL",
  parse: function (t, e, n) {
    var r,
      i,
      o,
      l,
      u = this,
      c = e || MQ,
      d = 0,
      h = "",
      f = !1,
      p = !1,
      g = !1;
    for (
      t = v1(t),
        e ||
          ((u.scheme = ""),
          (u.username = ""),
          (u.password = ""),
          (u.host = null),
          (u.port = null),
          (u.path = []),
          (u.query = null),
          (u.fragment = null),
          (u.cannotBeABaseURL = !1),
          (t = IQ(t, FRr, "")),
          (t = IQ(t, URr, "$1"))),
        t = IQ(t, BRr, ""),
        r = kw(t);
      d <= r.length;

    ) {
      switch (((i = r[d]), c)) {
        case MQ:
          if (!i || !R0(cet, i)) {
            if (e) return DQ;
            c = CQ;
            continue;
          }
          (h += a9(i)), (c = w$e);
          break;
        case w$e:
          if (i && (R0($Rr, i) || i == "+" || i == "-" || i == ".")) h += a9(i);
          else {
            if (i != ":") {
              if (e) return DQ;
              (h = ""), (c = CQ), (d = 0);
              continue;
            }
            if (
              e &&
              (u.isSpecial() != xie(gN, h) ||
                (h == "file" && (u.includesCredentials() || u.port !== null)) ||
                (u.scheme == "file" && !u.host))
            )
              return;
            if (((u.scheme = h), e))
              return void (
                u.isSpecial() &&
                gN[u.scheme] == u.port &&
                (u.port = null)
              );
            (h = ""),
              u.scheme == "file"
                ? (c = GQ)
                : u.isSpecial() && n && n.scheme == u.scheme
                ? (c = k$e)
                : u.isSpecial()
                ? (c = P$e)
                : r[d + 1] == "/"
                ? ((c = I$e), d++)
                : ((u.cannotBeABaseURL = !0), rk(u.path, ""), (c = C$e));
          }
          break;
        case CQ:
          if (!n || (n.cannotBeABaseURL && i != "#")) return DQ;
          if (n.cannotBeABaseURL && i == "#") {
            (u.scheme = n.scheme),
              (u.path = r0(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (u.cannotBeABaseURL = !0),
              (c = h1);
            break;
          }
          c = n.scheme == "file" ? GQ : $Q;
          continue;
        case k$e:
          if (i != "/" || r[d + 1] != "/") {
            c = $Q;
            continue;
          }
          (c = mN), d++;
          break;
        case I$e:
          if (i == "/") {
            c = yN;
            break;
          }
          c = Dy;
          continue;
        case $Q:
          if (((u.scheme = n.scheme), i == Og))
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = r0(n.path)),
              (u.query = n.query);
          else if (i == "/" || (i == "\\" && u.isSpecial())) c = D$e;
          else if (i == "?")
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = r0(n.path)),
              (u.query = ""),
              (c = U2);
          else {
            if (i != "#") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (u.path = r0(n.path)),
                u.path.length--,
                (c = Dy);
              continue;
            }
            (u.username = n.username),
              (u.password = n.password),
              (u.host = n.host),
              (u.port = n.port),
              (u.path = r0(n.path)),
              (u.query = n.query),
              (u.fragment = ""),
              (c = h1);
          }
          break;
        case D$e:
          if (!u.isSpecial() || (i != "/" && i != "\\")) {
            if (i != "/") {
              (u.username = n.username),
                (u.password = n.password),
                (u.host = n.host),
                (u.port = n.port),
                (c = Dy);
              continue;
            }
            c = yN;
          } else c = mN;
          break;
        case P$e:
          if (((c = mN), i != "/" || im(h, d + 1) != "/")) continue;
          d++;
          break;
        case mN:
          if (i != "/" && i != "\\") {
            c = yN;
            continue;
          }
          break;
        case yN:
          if (i == "@") {
            f && (h = "%40" + h), (f = !0), (o = kw(h));
            for (var y = 0; y < o.length; y++) {
              var v = o[y];
              if (v != ":" || g) {
                var b = aT(v, PQ);
                g ? (u.password += b) : (u.username += b);
              } else g = !0;
            }
            h = "";
          } else if (
            i == Og ||
            i == "/" ||
            i == "?" ||
            i == "#" ||
            (i == "\\" && u.isSpecial())
          ) {
            if (f && h == "") return CRr;
            (d -= kw(h).length + 1), (h = ""), (c = xQ);
          } else h += i;
          break;
        case xQ:
        case LQ:
          if (e && u.scheme == "file") {
            c = NQ;
            continue;
          }
          if (i != ":" || p) {
            if (
              i == Og ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial())
            ) {
              if (u.isSpecial() && h == "") return F2;
              if (e && h == "" && (u.includesCredentials() || u.port !== null))
                return;
              if ((l = u.parseHost(h))) return l;
              if (((h = ""), (c = Iw), e)) return;
              continue;
            }
            i == "[" ? (p = !0) : i == "]" && (p = !1), (h += i);
          } else {
            if (h == "") return F2;
            if ((l = u.parseHost(h))) return l;
            if (((h = ""), (c = OQ), e == LQ)) return;
          }
          break;
        case OQ:
          if (!R0(Oie, i)) {
            if (
              i == Og ||
              i == "/" ||
              i == "?" ||
              i == "#" ||
              (i == "\\" && u.isSpecial()) ||
              e
            ) {
              if (h != "") {
                var w = i9(h, 10);
                if (w > 65535) return R$e;
                (u.port = u.isSpecial() && w === gN[u.scheme] ? null : w),
                  (h = "");
              }
              if (e) return;
              c = Iw;
              continue;
            }
            return R$e;
          }
          h += i;
          break;
        case GQ:
          if (((u.scheme = "file"), i == "/" || i == "\\")) c = M$e;
          else {
            if (!n || n.scheme != "file") {
              c = Dy;
              continue;
            }
            if (i == Og)
              (u.host = n.host), (u.path = r0(n.path)), (u.query = n.query);
            else if (i == "?")
              (u.host = n.host),
                (u.path = r0(n.path)),
                (u.query = ""),
                (c = U2);
            else {
              if (i != "#") {
                A$e(kC(r0(r, d), "")) ||
                  ((u.host = n.host), (u.path = r0(n.path)), u.shortenPath()),
                  (c = Dy);
                continue;
              }
              (u.host = n.host),
                (u.path = r0(n.path)),
                (u.query = n.query),
                (u.fragment = ""),
                (c = h1);
            }
          }
          break;
        case M$e:
          if (i == "/" || i == "\\") {
            c = NQ;
            break;
          }
          n &&
            n.scheme == "file" &&
            !A$e(kC(r0(r, d), "")) &&
            (IC(n.path[0], !0) ? rk(u.path, n.path[0]) : (u.host = n.host)),
            (c = Dy);
          continue;
        case NQ:
          if (i == Og || i == "/" || i == "\\" || i == "?" || i == "#") {
            if (!e && IC(h)) c = Dy;
            else if (h == "") {
              if (((u.host = ""), e)) return;
              c = Iw;
            } else {
              if ((l = u.parseHost(h))) return l;
              if ((u.host == "localhost" && (u.host = ""), e)) return;
              (h = ""), (c = Iw);
            }
            continue;
          }
          h += i;
          break;
        case Iw:
          if (u.isSpecial()) {
            if (((c = Dy), i != "/" && i != "\\")) continue;
          } else if (e || i != "?")
            if (e || i != "#") {
              if (i != Og && ((c = Dy), i != "/")) continue;
            } else (u.fragment = ""), (c = h1);
          else (u.query = ""), (c = U2);
          break;
        case Dy:
          if (
            i == Og ||
            i == "/" ||
            (i == "\\" && u.isSpecial()) ||
            (!e && (i == "?" || i == "#"))
          ) {
            if (
              (jRr(h)
                ? (u.shortenPath(),
                  i == "/" || (i == "\\" && u.isSpecial()) || rk(u.path, ""))
                : zRr(h)
                ? i == "/" || (i == "\\" && u.isSpecial()) || rk(u.path, "")
                : (u.scheme == "file" &&
                    !u.path.length &&
                    IC(h) &&
                    (u.host && (u.host = ""), (h = im(h, 0) + ":")),
                  rk(u.path, h)),
              (h = ""),
              u.scheme == "file" && (i == Og || i == "?" || i == "#"))
            )
              for (; u.path.length > 1 && u.path[0] === ""; ) DRr(u.path);
            i == "?"
              ? ((u.query = ""), (c = U2))
              : i == "#" && ((u.fragment = ""), (c = h1));
          } else h += aT(i, fet);
          break;
        case C$e:
          i == "?"
            ? ((u.query = ""), (c = U2))
            : i == "#"
            ? ((u.fragment = ""), (c = h1))
            : i != Og && (u.path[0] += aT(i, m6));
          break;
        case U2:
          e || i != "#"
            ? i != Og &&
              (i == "'" && u.isSpecial()
                ? (u.query += "%27")
                : (u.query += i == "#" ? "%23" : aT(i, m6)))
            : ((u.fragment = ""), (c = h1));
          break;
        case h1:
          i != Og && (u.fragment += aT(i, het));
      }
      d++;
    }
  },
  parseHost: function (t) {
    var e, n, r;
    if (im(t, 0) == "[") {
      if (im(t, t.length - 1) != "]" || !(e = XRr(ex(t, 1, -1)))) return F2;
      this.host = e;
    } else if (this.isSpecial()) {
      if (((t = _Rr(t)), R0(GRr, t) || (e = HRr(t)) === null)) return F2;
      this.host = e;
    } else {
      if (R0(NRr, t)) return F2;
      for (e = "", n = kw(t), r = 0; r < n.length; r++) e += aT(n[r], m6);
      this.host = e;
    }
  },
  cannotHaveUsernamePasswordPort: function () {
    return !this.host || this.cannotBeABaseURL || this.scheme == "file";
  },
  includesCredentials: function () {
    return this.username != "" || this.password != "";
  },
  isSpecial: function () {
    return xie(gN, this.scheme);
  },
  shortenPath: function () {
    var t = this.path,
      e = t.length;
    !e || (this.scheme == "file" && e == 1 && IC(t[0], !0)) || t.length--;
  },
  serialize: function () {
    var t = this,
      e = t.scheme,
      n = t.username,
      r = t.password,
      i = t.host,
      o = t.port,
      l = t.path,
      u = t.query,
      c = t.fragment,
      d = e + ":";
    return (
      i !== null
        ? ((d += "//"),
          t.includesCredentials() && (d += n + (r ? ":" + r : "") + "@"),
          (d += GM(i)),
          o !== null && (d += ":" + o))
        : e == "file" && (d += "//"),
      (d += t.cannotBeABaseURL ? l[0] : l.length ? "/" + kC(l, "/") : ""),
      u !== null && (d += "?" + u),
      c !== null && (d += "#" + c),
      d
    );
  },
  setHref: function (t) {
    var e = this.parse(t);
    if (e) throw Lie(e);
    this.searchParams.update();
  },
  getOrigin: function () {
    var t = this.scheme,
      e = this.port;
    if (t == "blob")
      try {
        return new pD(t.path[0]).origin;
      } catch {
        return "null";
      }
    return t != "file" && this.isSpecial()
      ? t + "://" + GM(this.host) + (e !== null ? ":" + e : "")
      : "null";
  },
  getProtocol: function () {
    return this.scheme + ":";
  },
  setProtocol: function (t) {
    this.parse(v1(t) + ":", MQ);
  },
  getUsername: function () {
    return this.username;
  },
  setUsername: function (t) {
    var e = kw(v1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.username = "";
      for (var n = 0; n < e.length; n++) this.username += aT(e[n], PQ);
    }
  },
  getPassword: function () {
    return this.password;
  },
  setPassword: function (t) {
    var e = kw(v1(t));
    if (!this.cannotHaveUsernamePasswordPort()) {
      this.password = "";
      for (var n = 0; n < e.length; n++) this.password += aT(e[n], PQ);
    }
  },
  getHost: function () {
    var t = this.host,
      e = this.port;
    return t === null ? "" : e === null ? GM(t) : GM(t) + ":" + e;
  },
  setHost: function (t) {
    this.cannotBeABaseURL || this.parse(t, xQ);
  },
  getHostname: function () {
    var t = this.host;
    return t === null ? "" : GM(t);
  },
  setHostname: function (t) {
    this.cannotBeABaseURL || this.parse(t, LQ);
  },
  getPort: function () {
    var t = this.port;
    return t === null ? "" : v1(t);
  },
  setPort: function (t) {
    this.cannotHaveUsernamePasswordPort() ||
      ((t = v1(t)) == "" ? (this.port = null) : this.parse(t, OQ));
  },
  getPathname: function () {
    var t = this.path;
    return this.cannotBeABaseURL ? t[0] : t.length ? "/" + kC(t, "/") : "";
  },
  setPathname: function (t) {
    this.cannotBeABaseURL || ((this.path = []), this.parse(t, Iw));
  },
  getSearch: function () {
    var t = this.query;
    return t ? "?" + t : "";
  },
  setSearch: function (t) {
    (t = v1(t)) == ""
      ? (this.query = null)
      : (im(t, 0) == "?" && (t = ex(t, 1)),
        (this.query = ""),
        this.parse(t, U2)),
      this.searchParams.update();
  },
  getSearchParams: function () {
    return this.searchParams.facade;
  },
  getHash: function () {
    var t = this.fragment;
    return t ? "#" + t : "";
  },
  setHash: function (t) {
    (t = v1(t)) != ""
      ? (im(t, 0) == "#" && (t = ex(t, 1)),
        (this.fragment = ""),
        this.parse(t, h1))
      : (this.fragment = null);
  },
  update: function () {
    this.query = this.searchParams.serialize() || null;
  },
};
var pD = function (t) {
    var e = vRr(this, kh),
      n = ERr(arguments.length, 1) > 1 ? arguments[1] : void 0,
      r = SRr(e, new Kde(t, !1, n));
    zde ||
      ((e.href = r.serialize()),
      (e.origin = r.getOrigin()),
      (e.protocol = r.getProtocol()),
      (e.username = r.getUsername()),
      (e.password = r.getPassword()),
      (e.host = r.getHost()),
      (e.hostname = r.getHostname()),
      (e.port = r.getPort()),
      (e.pathname = r.getPathname()),
      (e.search = r.getSearch()),
      (e.searchParams = r.getSearchParams()),
      (e.hash = r.getHash()));
  },
  kh = pD.prototype,
  Ng = function (t, e) {
    return {
      get: function () {
        return r9(this)[t]();
      },
      set:
        e &&
        function (n) {
          return r9(this)[e](n);
        },
      configurable: !0,
      enumerable: !0,
    };
  };
if (
  (zde &&
    (Gg(kh, "href", Ng("serialize", "setHref")),
    Gg(kh, "origin", Ng("getOrigin")),
    Gg(kh, "protocol", Ng("getProtocol", "setProtocol")),
    Gg(kh, "username", Ng("getUsername", "setUsername")),
    Gg(kh, "password", Ng("getPassword", "setPassword")),
    Gg(kh, "host", Ng("getHost", "setHost")),
    Gg(kh, "hostname", Ng("getHostname", "setHostname")),
    Gg(kh, "port", Ng("getPort", "setPort")),
    Gg(kh, "pathname", Ng("getPathname", "setPathname")),
    Gg(kh, "search", Ng("getSearch", "setSearch")),
    Gg(kh, "searchParams", Ng("getSearchParams")),
    Gg(kh, "hash", Ng("getHash", "setHash"))),
  pN(
    kh,
    "toJSON",
    function () {
      return r9(this).serialize();
    },
    { enumerable: !0 }
  ),
  pN(
    kh,
    "toString",
    function () {
      return r9(this).serialize();
    },
    { enumerable: !0 }
  ),
  OM)
) {
  var $$e = OM.createObjectURL,
    x$e = OM.revokeObjectURL;
  $$e && pN(pD, "createObjectURL", E$e($$e, OM)),
    x$e && pN(pD, "revokeObjectURL", E$e(x$e, OM));
}
TRr(pD, "URL"),
  mRr({ global: !0, constructor: !0, forced: !yRr, sham: !zde }, { URL: pD });
var WRr = di,
  KRr = Dd,
  ZRr = Yo,
  YRr = _H,
  L$e = ng,
  QRr = Hde,
  pet = KRr("URL"),
  JRr =
    QRr &&
    ZRr(function () {
      pet.canParse();
    });
WRr(
  { target: "URL", stat: !0, forced: !JRr },
  {
    canParse: function (t) {
      var e = YRr(arguments.length, 1),
        n = L$e(t),
        r = e < 2 || arguments[1] === void 0 ? void 0 : L$e(arguments[1]);
      try {
        return !!new pet(n, r);
      } catch {
        return !1;
      }
    },
  }
);
var qRr = js,
  eAr = qRr.URL,
  tAr = eAr,
  nAr = tAr,
  rAr = nAr,
  iAr = rAr,
  aAr = iAr,
  oAr = aAr,
  sAr = oAr,
  lAr = sAr,
  uAr = Sa(lAr),
  O$e = qu,
  cAr = function (t) {
    return t !== void 0 && (O$e(t, "value") || O$e(t, "writable"));
  },
  dAr = di,
  hAr = Kl,
  fAr = mc,
  pAr = lh,
  gAr = cAr,
  mAr = GE,
  yAr = bO;
function get(t, e) {
  var n,
    r,
    i = arguments.length < 3 ? t : arguments[2];
  return pAr(t) === i
    ? t[e]
    : (n = mAr.f(t, e))
    ? gAr(n)
      ? n.value
      : n.get === void 0
      ? void 0
      : hAr(n.get, i)
    : fAr((r = yAr(t)))
    ? get(r, e, i)
    : void 0;
}
dAr({ target: "Reflect", stat: !0 }, { get });
var vAr = js,
  bAr = vAr.Reflect.get,
  _Ar = bAr,
  TAr = _Ar,
  EAr = TAr,
  SAr = EAr,
  RAr = SAr,
  AAr = RAr,
  wAr = AAr,
  G$e = Sa(wAr);
function kAr(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = hE(t)) !== null; );
  return t;
}
function gD() {
  var t;
  return (
    (gD =
      typeof Reflect < "u" && G$e
        ? vL((t = G$e)).call(t)
        : function (e, n, r) {
            var i = kAr(e, n);
            if (i) {
              var o = Sde(i, n);
              return o.get ? o.get.call(arguments.length < 3 ? e : r) : o.value;
            }
          }),
    gD.apply(this, arguments)
  );
}
function met(t, e, n) {
  var r;
  return (met = Dqe()
    ? vL((r = Z$)).call(r)
    : function (i, o, l) {
        var u = [null];
        Z8(u).apply(u, o);
        var c = new (vL(Function).apply(i, u))();
        return l && $de(c, l.prototype), c;
      }).apply(null, arguments);
}
var IAr = di,
  FQ = Ml;
IAr({ global: !0, forced: FQ.globalThis !== FQ }, { globalThis: FQ });
var UQ,
  BQ,
  HQ,
  XQ,
  Dw,
  yet,
  DAr = Ml,
  PAr = DAr,
  MAr = PAr,
  CAr = MAr,
  $Ar = CAr,
  xAr = $Ar,
  LAr = xAr,
  OAr = LAr,
  GAr = OAr,
  N$e = Sa(GAr),
  F$e =
    ((UQ = N$e !== void 0 ? N$e : void 0) === null || UQ === void 0
      ? void 0
      : UQ.crypto) ||
    ((BQ = typeof global < "u" ? global : void 0) === null || BQ === void 0
      ? void 0
      : BQ.crypto) ||
    ((HQ = typeof window < "u" ? window : void 0) === null || HQ === void 0
      ? void 0
      : HQ.crypto) ||
    ((XQ = typeof self < "u" ? self : void 0) === null || XQ === void 0
      ? void 0
      : XQ.crypto) ||
    ((Dw = typeof frames < "u" ? frames : void 0) === null ||
    Dw === void 0 ||
    (Dw = Dw[0]) === null ||
    Dw === void 0
      ? void 0
      : Dw.crypto);
yet = F$e
  ? function (t) {
      for (var e = [], n = 0; n < t; n += 4)
        e.push(F$e.getRandomValues(new Uint32Array(1))[0]);
      return new fE(e, t);
    }
  : function (t) {
      for (
        var e,
          n = [],
          r = function (l) {
            var u = l,
              c = 987654321,
              d = 4294967295;
            return function () {
              var h =
                (((c = (36969 * (65535 & c) + (c >> 16)) & d) << 16) +
                  (u = (18e3 * (65535 & u) + (u >> 16)) & d)) &
                d;
              return (
                (h /= 4294967296), (h += 0.5) * (Math.random() > 0.5 ? 1 : -1)
              );
            };
          },
          i = 0;
        i < t;
        i += 4
      ) {
        var o = r(4294967296 * (e || Math.random()));
        (e = 987654071 * o()), n.push((4294967296 * o()) | 0);
      }
      return new fE(n, t);
    };
var RH = (function () {
    function t() {
      $o(this, t);
    }
    return (
      xo(
        t,
        [
          {
            key: "mixIn",
            value: function (e) {
              return iR(this, e);
            },
          },
          {
            key: "clone",
            value: function () {
              var e = new this.constructor();
              return iR(e, this), e;
            },
          },
        ],
        [
          {
            key: "create",
            value: function () {
              for (
                var e = arguments.length, n = new Array(e), r = 0;
                r < e;
                r++
              )
                n[r] = arguments[r];
              return met(this, n);
            },
          },
        ]
      ),
      t
    );
  })(),
  fE = (function (t) {
    rg(n, RH);
    var e = ig(n);
    function n() {
      var r,
        i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [],
        o =
          arguments.length > 1 && arguments[1] !== void 0
            ? arguments[1]
            : 4 * i.length;
      $o(this, n), (r = e.call(this));
      var l = i;
      if (
        (l instanceof ArrayBuffer && (l = new Uint8Array(l)),
        (l instanceof Int8Array ||
          l instanceof Uint8ClampedArray ||
          l instanceof Int16Array ||
          l instanceof Uint16Array ||
          l instanceof Int32Array ||
          l instanceof Uint32Array ||
          l instanceof Float32Array ||
          l instanceof Float64Array) &&
          (l = new Uint8Array(l.buffer, l.byteOffset, l.byteLength)),
        l instanceof Uint8Array)
      ) {
        for (var u = l.byteLength, c = [], d = 0; d < u; d += 1)
          c[d >>> 2] |= l[d] << (24 - (d % 4) * 8);
        (r.words = c), (r.sigBytes = u);
      } else (r.words = i), (r.sigBytes = o);
      return r;
    }
    return (
      xo(n, [
        {
          key: "toString",
          value: function () {
            return (
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : NAr
            ).stringify(this);
          },
        },
        {
          key: "concat",
          value: function (r) {
            var i = this.words,
              o = r.words,
              l = this.sigBytes,
              u = r.sigBytes;
            if ((this.clamp(), l % 4))
              for (var c = 0; c < u; c += 1) {
                var d = (o[c >>> 2] >>> (24 - (c % 4) * 8)) & 255;
                i[(l + c) >>> 2] |= d << (24 - ((l + c) % 4) * 8);
              }
            else for (var h = 0; h < u; h += 4) i[(l + h) >>> 2] = o[h >>> 2];
            return (this.sigBytes += u), this;
          },
        },
        {
          key: "clamp",
          value: function () {
            var r = this.words,
              i = this.sigBytes;
            (r[i >>> 2] &= 4294967295 << (32 - (i % 4) * 8)),
              (r.length = Math.ceil(i / 4));
          },
        },
        {
          key: "clone",
          value: function () {
            var r,
              i = gD(hE(n.prototype), "clone", this).call(this);
            return (i.words = M1r((r = this.words)).call(r, 0)), i;
          },
        },
      ]),
      n
    );
  })();
da(fE, "random", yet);
var NAr = {
    stringify: function (t) {
      for (var e = t.words, n = t.sigBytes, r = [], i = 0; i < n; i += 1) {
        var o = (e[i >>> 2] >>> (24 - (i % 4) * 8)) & 255;
        r.push((o >>> 4).toString(16)), r.push((15 & o).toString(16));
      }
      return r.join("");
    },
    parse: function (t) {
      for (var e = t.length, n = [], r = 0; r < e; r += 2)
        n[r >>> 3] |= q8(t.substr(r, 2), 16) << (24 - (r % 8) * 4);
      return new fE(n, e / 2);
    },
  },
  U$e = {
    stringify: function (t) {
      for (var e = t.words, n = t.sigBytes, r = [], i = 0; i < n; i += 1) {
        var o = (e[i >>> 2] >>> (24 - (i % 4) * 8)) & 255;
        r.push(String.fromCharCode(o));
      }
      return r.join("");
    },
    parse: function (t) {
      for (var e = t.length, n = [], r = 0; r < e; r += 1)
        n[r >>> 2] |= (255 & t.charCodeAt(r)) << (24 - (r % 4) * 8);
      return new fE(n, e);
    },
  },
  vet = {
    stringify: function (t) {
      try {
        return decodeURIComponent(escape(U$e.stringify(t)));
      } catch {
        throw new Error("Malformed UTF-8 data");
      }
    },
    parse: function (t) {
      return U$e.parse(unescape(encodeURIComponent(t)));
    },
  },
  FAr = (function (t) {
    rg(n, RH);
    var e = ig(n);
    function n() {
      var r;
      return $o(this, n), ((r = e.call(this))._minBufferSize = 0), r;
    }
    return (
      xo(n, [
        {
          key: "reset",
          value: function () {
            (this._data = new fE()), (this._nDataBytes = 0);
          },
        },
        {
          key: "_append",
          value: function (r) {
            var i,
              o = r;
            typeof o == "string" && (o = vet.parse(o)),
              eh((i = this._data)).call(i, o),
              (this._nDataBytes += o.sigBytes);
          },
        },
        {
          key: "_process",
          value: function (r) {
            var i,
              o = this._data,
              l = this.blockSize,
              u = o.words,
              c = o.sigBytes,
              d = c / (4 * l),
              h =
                (d = r
                  ? Math.ceil(d)
                  : Math.max((0 | d) - this._minBufferSize, 0)) * l,
              f = Math.min(4 * h, c);
            if (h) {
              for (var p = 0; p < h; p += l) this._doProcessBlock(u, p);
              (i = Die(u).call(u, 0, h)), (o.sigBytes -= f);
            }
            return new fE(i, f);
          },
        },
        {
          key: "clone",
          value: function () {
            var r = gD(hE(n.prototype), "clone", this).call(this);
            return (r._data = this._data.clone()), r;
          },
        },
      ]),
      n
    );
  })(),
  Zde = (function (t) {
    rg(n, FAr);
    var e = ig(n);
    function n(r) {
      var i;
      return (
        $o(this, n),
        ((i = e.call(this)).blockSize = 16),
        (i.cfg = iR(new RH(), r)),
        i.reset(),
        i
      );
    }
    return (
      xo(
        n,
        [
          {
            key: "reset",
            value: function () {
              gD(hE(n.prototype), "reset", this).call(this), this._doReset();
            },
          },
          {
            key: "update",
            value: function (r) {
              return this._append(r), this._process(), this;
            },
          },
          {
            key: "finalize",
            value: function (r) {
              return r && this._append(r), this._doFinalize();
            },
          },
        ],
        [
          {
            key: "_createHelper",
            value: function (r) {
              return function (i, o) {
                return new r(o).finalize(i);
              };
            },
          },
          {
            key: "_createHmacHelper",
            value: function (r) {
              return function (i, o) {
                return new UAr(r, o).finalize(i);
              };
            },
          },
        ]
      ),
      n
    );
  })(),
  UAr = (function (t) {
    rg(n, RH);
    var e = ig(n);
    function n(r, i) {
      var o;
      $o(this, n), (o = e.call(this));
      var l = new r();
      o._hasher = l;
      var u = i;
      typeof u == "string" && (u = vet.parse(u));
      var c = l.blockSize,
        d = 4 * c;
      u.sigBytes > d && (u = l.finalize(i)), u.clamp();
      var h = u.clone();
      o._oKey = h;
      var f = u.clone();
      o._iKey = f;
      for (var p = h.words, g = f.words, y = 0; y < c; y += 1)
        (p[y] ^= 1549556828), (g[y] ^= 909522486);
      return (h.sigBytes = d), (f.sigBytes = d), o.reset(), o;
    }
    return (
      xo(n, [
        {
          key: "reset",
          value: function () {
            var r = this._hasher;
            r.reset(), r.update(this._iKey);
          },
        },
        {
          key: "update",
          value: function (r) {
            return this._hasher.update(r), this;
          },
        },
        {
          key: "finalize",
          value: function (r) {
            var i,
              o = this._hasher,
              l = o.finalize(r);
            return (
              o.reset(), o.finalize(eh((i = this._oKey.clone())).call(i, l))
            );
          },
        },
      ]),
      n
    );
  })(),
  B2 = [],
  bet = (function (t) {
    rg(n, Zde);
    var e = ig(n);
    function n() {
      return $o(this, n), e.apply(this, arguments);
    }
    return (
      xo(n, [
        {
          key: "_doReset",
          value: function () {
            this._hash = new fE([
              1732584193, 4023233417, 2562383102, 271733878, 3285377520,
            ]);
          },
        },
        {
          key: "_doProcessBlock",
          value: function (r, i) {
            for (
              var o = this._hash.words,
                l = o[0],
                u = o[1],
                c = o[2],
                d = o[3],
                h = o[4],
                f = 0;
              f < 80;
              f += 1
            ) {
              if (f < 16) B2[f] = 0 | r[i + f];
              else {
                var p = B2[f - 3] ^ B2[f - 8] ^ B2[f - 14] ^ B2[f - 16];
                B2[f] = (p << 1) | (p >>> 31);
              }
              var g = ((l << 5) | (l >>> 27)) + h + B2[f];
              (g +=
                f < 20
                  ? 1518500249 + ((u & c) | (~u & d))
                  : f < 40
                  ? 1859775393 + (u ^ c ^ d)
                  : f < 60
                  ? ((u & c) | (u & d) | (c & d)) - 1894007588
                  : (u ^ c ^ d) - 899497514),
                (h = d),
                (d = c),
                (c = (u << 30) | (u >>> 2)),
                (u = l),
                (l = g);
            }
            (o[0] = (o[0] + l) | 0),
              (o[1] = (o[1] + u) | 0),
              (o[2] = (o[2] + c) | 0),
              (o[3] = (o[3] + d) | 0),
              (o[4] = (o[4] + h) | 0);
          },
        },
        {
          key: "_doFinalize",
          value: function () {
            var r = this._data,
              i = r.words,
              o = 8 * this._nDataBytes,
              l = 8 * r.sigBytes;
            return (
              (i[l >>> 5] |= 128 << (24 - (l % 32))),
              (i[14 + (((l + 64) >>> 9) << 4)] = Math.floor(o / 4294967296)),
              (i[15 + (((l + 64) >>> 9) << 4)] = o),
              (r.sigBytes = 4 * i.length),
              this._process(),
              this._hash
            );
          },
        },
        {
          key: "clone",
          value: function () {
            var r = gD(hE(n.prototype), "clone", this).call(this);
            return (r._hash = this._hash.clone()), r;
          },
        },
      ]),
      n
    );
  })();
Zde._createHelper(bet);
var Gie,
  BAr = Zde._createHmacHelper(bet);
function HAr(t, e, n) {
  function r(b, w) {
    var k = parseInt(b.slice(w, w + 2), 16);
    return k >>> 7
      ? k >>> 6 == 2
        ? ((k = (63 & k) << 8), [2, (k += parseInt(b.slice(w + 2, w + 4), 16))])
        : ((k = (63 & k) << 16),
          [3, (k += parseInt(b.slice(w + 2, w + 6), 16))])
      : [1, k];
  }
  var i,
    o = 0,
    l = [],
    u = [];
  for (i = 0; i < 4; ++i)
    o += (3 & parseInt(t.slice(8 + 2 * i, 10 + 2 * i), 16)) << (2 * i);
  var c = parseInt(t.slice(16, 24), 16),
    d = 2 * parseInt(t.slice(32, 40), 16);
  for (i = 40; i < d + 40; i += 2) l.push(parseInt(t.slice(i, i + 2), 16));
  var h = d + 40,
    f = parseInt(t.slice(h, h + 4), 16);
  for (h += 4, i = 0; i < f; ++i) {
    var p = r(t, h);
    h += 2 * p[0];
    for (var g = "", y = 0; y < p[1]; ++y) {
      var v = r(t, h);
      (g += String.fromCharCode(o ^ v[1])), (h += 2 * v[0]);
    }
    u.push(g);
  }
  return (
    (e.p = null),
    (function b(w, k, D, $, N) {
      var P,
        I,
        O,
        X,
        G,
        H = -1,
        E = [],
        S = null,
        L = [k];
      for (I = Math.min(k.length, D), O = 0; O < I; ++O) L.push(k[O]);
      L.p = $;
      for (var W = []; ; )
        try {
          switch (l[w++]) {
            case 17:
              E[++H] = null;
              break;
            case 19:
              (P = ((P = ((P = l[w++]) << 8) + l[w++]) << 8) + l[w++]),
                (E[++H] = (P << 8) + l[w++]);
              break;
            case 54:
              (P = (l[w] << 8) + l[w + 1]), (w += 2), (E[++H] = u[P]);
              break;
            case 55:
              E[++H] = void 0;
              break;
            case 31:
              (P = (l[w] << 8) + l[w + 1]),
                (w += 2),
                (H = H - P + 1),
                (I = E.slice(H, H + P)),
                (E[H] = I);
              break;
            case 24:
              for (I = l[w++], O = l[w++], X = L; I > 0; --I) X = X.p;
              E[++H] = X[O];
              break;
            case 73:
              (P = (l[w] << 8) + l[w + 1]),
                (w += 2),
                (I = u[P]),
                (E[H] = E[H][I]);
              break;
            case 4:
              for (I = l[w++], O = l[w++], X = L; I > 0; --I) X = X.p;
              X[O] = E[H--];
              break;
            case 6:
              (P = l[w++]),
                (I = E[H--]),
                ((O = function F() {
                  var oe = F._v;
                  return (0, F._u)(oe[0], arguments, oe[1], oe[2], this);
                })._v = [I, P, L]),
                (O._u = b),
                (E[++H] = O);
              break;
            case 13:
              for (I = E[H--], O = null; (X = W.pop()); )
                if (X[0] === 2 || X[0] === 3) {
                  O = X;
                  break;
                }
              if (O) (w = O[2]), (O[0] = 0), W.push(O);
              else {
                if (!S) return I;
                (w = S[1]),
                  (N = S[2]),
                  (L = S[3]),
                  (W = S[4]),
                  (E[++H] = I),
                  (S = S[0]);
              }
              break;
            case 2:
              (H -= P = l[w++]),
                (O = E.slice(H + 1, H + P + 1)),
                (I = E[H--]),
                (X = E[H--]),
                I._u === b
                  ? ((I = I._v),
                    (S = [S, w, N, L, W]),
                    (w = I[0]),
                    X == null &&
                      (X = (function () {
                        return this;
                      })()),
                    (N = X),
                    ((L = [O].concat(O)).length = Math.min(I[1], P) + 1),
                    (L.p = I[2]),
                    (W = []))
                  : ((G = I.apply(X, O)), (E[++H] = G));
              break;
            case 71:
              (I = E[H]), (E[++H] = I);
              break;
            default:
              throw new Error("ioe");
          }
        } catch (F) {
          for (; (P = W.pop()) && !P[0]; );
          if (!P) {
            e: for (; S; ) {
              for (I = S[4]; (P = I.pop()); ) if (P[0]) break e;
              S = S[0];
            }
            if (!S) throw F;
            (w = S[1]), (N = S[2]), (L = S[3]), (W = S[4]), (S = S[0]);
          }
          (I = P[0]) === 1
            ? ((w = P[2]), (P[0] = 0), W.push(P), (E[++H] = F))
            : I === 2
            ? ((w = P[2]), (P[0] = 0), W.push(P))
            : ((w = P[3]), (P[0] = 2), W.push(P), (E[++H] = F));
        }
    })(c, [], 0, e, n)
  );
}
HAr(
  "504B0101ffa623b500000028b621a6fe00000034111802001800011800021800031800041f000447490000360001020136000202024749000302000d13000000000604040101370d00040411141215015d204a4c11170b190e161308421a1213014a090a4a0d4b4a110c4c15431542110b1f080f14280f0912151c",
  {
    get 0() {
      return BAr;
    },
    get 1() {
      return Gie;
    },
    set 1(t) {
      Gie = t;
    },
  },
  void 0
);
var XAr = (function () {
    function t(e, n) {
      var r,
        i =
          arguments.length > 2 && arguments[2] !== void 0
            ? arguments[2]
            : Mde.CN;
      $o(this, t),
        da(this, "appId", void 0),
        da(this, "ctx", void 0),
        da(this, "host", void 0),
        da(this, "needSignature", !0),
        da(this, "region", void 0),
        da(this, "scene", void 0),
        da(this, "ext", void 0),
        (this.scene = ((r = {}), da(r, To.LIVE, 1), da(r, To.VOD, 0), r)[
          n.videoType
        ]),
        (this.ext = fs({}, this.getConfigType(n.strategies))),
        (this.appId = e),
        (this.ctx = n),
        (this.region = i),
        (this.host = this.getHostByRegion());
    }
    return (
      xo(t, [
        {
          key: "getConfigType",
          value: function (e) {
            var n;
            if (!e) return {};
            var r = {};
            return (
              Dc((n = Mf(e))).call(n, function (i) {
                var o = e[i];
                o &&
                  (r["".concat(i, "_id")] =
                    ed(o) === "object" && o.configId ? o.configId : "default");
              }),
              r
            );
          },
        },
        {
          key: "getCacheKey",
          value: function () {
            return QT([
              this.appId,
              this.ctx.cacheKey,
              this.ctx.featureCenter.getH265FeatureList().isHevcSupported,
              this.ctx.featureCenter.getBrowserInfo(),
              this.ctx.featureCenter.getFeatureList().deviceId,
            ]);
          },
        },
        {
          key: "fetch",
          value: (function (e) {
            function n() {
              return e.apply(this, arguments);
            }
            return (
              (n.toString = function () {
                return e.toString();
              }),
              n
            );
          })(
            x1(
              wc().mark(function e() {
                var n, r, i, o, l, u, c;
                return wc().wrap(
                  function (d) {
                    for (;;)
                      switch ((d.prev = d.next)) {
                        case 0:
                          return (
                            (d.prev = 0),
                            (d.next = 3),
                            fetch(this.generateUrl(), { mode: "cors" })
                          );
                        case 3:
                          if ((n = d.sent).ok) {
                            d.next = 6;
                            break;
                          }
                          throw new Error("Network response was not OK");
                        case 6:
                          return (d.next = 8), n.json();
                        case 8:
                          return (
                            (r = d.sent),
                            (i = r.data),
                            (o = i.custom_settings.web),
                            (l = i.general_settings),
                            (u = l.use_local_cache),
                            (c = l.local_cache_expire),
                            d.abrupt(
                              "return",
                              fs(
                                fs({}, o),
                                {},
                                {
                                  use_local_cache: u,
                                  local_cache_expired_at:
                                    c > 0 ? aR() + 1e3 * c : void 0,
                                  cache_key: this.getCacheKey(),
                                }
                              )
                            )
                          );
                        case 17:
                          throw ((d.prev = 17), (d.t0 = d.catch(0)), d.t0);
                        case 20:
                        case "end":
                          return d.stop();
                      }
                  },
                  e,
                  this,
                  [[0, 17]]
                );
              })
            )
          ),
        },
        {
          key: "getHostByRegion",
          value: function () {
            var e;
            return (
              ((e = {
                sg: { settingsHost: "vod-settings.byteplusvod.com" },
                us: { settingsHost: "vod-settings.byteplusvod.com" },
              }[this.region]) === null || e === void 0
                ? void 0
                : e.settingsHost) || "vod-settings.byteplusvod.com"
            );
          },
        },
        {
          key: "generateSearchParams",
          value: function (e) {
            if (
              (e.searchParams.set("module", "web"),
              e.searchParams.set("aid", String(this.appId)),
              e.searchParams.set("region", this.region),
              e.searchParams.set(
                "web_support_hardware_decode_bytevc1",
                String(
                  this.ctx.featureCenter.getH265FeatureList().isHevcSupported
                )
              ),
              e.searchParams.set(
                "web_os",
                this.ctx.featureCenter.getBrowserInfo().osName
              ),
              e.searchParams.set(
                "web_os_version",
                this.ctx.featureCenter.getBrowserInfo().osVersion
              ),
              e.searchParams.set(
                "web_platform",
                this.ctx.featureCenter.getBrowserInfo().platformType
              ),
              e.searchParams.set(
                "web_browser",
                this.ctx.featureCenter.getBrowserInfo().browserName
              ),
              e.searchParams.set(
                "web_browser_version",
                this.ctx.featureCenter.getBrowserInfo().browserVersion
              ),
              e.searchParams.set(
                "web_cpu_core",
                String(this.ctx.featureCenter.getBrowserInfo().cpuCore)
              ),
              e.searchParams.set("web_scene", String(this.scene)),
              e.searchParams.set("web_ext", QT(this.ext)),
              e.searchParams.set(
                "device_id",
                this.ctx.featureCenter.getFeatureList().deviceId
              ),
              this.needSignature)
            ) {
              var n = aR();
              e.searchParams.set("timestamp", String(n));
              var r = Gie(
                this.appId,
                this.ctx.featureCenter.getFeatureList().deviceId,
                this.ctx.featureCenter.getBrowserInfo().browserName,
                n
              );
              e.searchParams.set("signature", r);
            }
            return e;
          },
        },
        {
          key: "generateUrl",
          value: function () {
            return this.generateSearchParams(
              new uAr("https://".concat(this.host, "/vod/settings/v1"))
            );
          },
        },
      ]),
      t
    );
  })(),
  Th = new Cde("VeStrategy"),
  VAr = da({}, To.VOD, ySr),
  B$e = (function () {
    function t(l) {
      $o(this, t),
        da(this, "ctx", void 0),
        da(this, "configPreparePromise", void 0),
        da(this, "isStrategyStarted", !1);
      var u = new u_r(l),
        c = new Smr(
          l,
          new XAr(l.appId, {
            featureCenter: u,
            cacheKey: l.cacheKey,
            strategies: l.strategies,
            videoType: l.type || To.VOD,
          })
        );
      Th.update(l.log),
        (this.ctx = {
          dataCenter: c,
          featureCenter: u,
          playerManager: new nSr(),
          tracker: new rSr({
            trackInfo: l.tracker,
            type: l.type || To.VOD,
            lineAppId: l.appId,
            lineUserId: l.deviceId,
            appId: (l.type, To.VOD, -1),
            channel: l.region,
            cxt: { dataCenter: c, featureCenter: u },
          }),
        }),
        this.prepare(!0);
    }
    var e, n, r, i, o;
    return (
      xo(
        t,
        [
          {
            key: "start",
            value:
              ((o = x1(
                wc().mark(function l() {
                  var u,
                    c = this;
                  return wc().wrap(
                    function (d) {
                      for (;;)
                        switch ((d.prev = d.next)) {
                          case 0:
                            if (!this.isStrategyStarted) {
                              d.next = 2;
                              break;
                            }
                            return d.abrupt("return");
                          case 2:
                            if (
                              ((this.isStrategyStarted = !0),
                              Th.info("Start"),
                              this.ctx.tracker.track("strategy_start", {}),
                              this.ctx.featureCenter.getFeatureList().deviceId)
                            ) {
                              d.next = 13;
                              break;
                            }
                            return (d.next = 8), this.getTeaToken();
                          case 8:
                            if (((d.t0 = d.sent), d.t0)) {
                              d.next = 11;
                              break;
                            }
                            d.t0 = {};
                          case 11:
                            (u = d.t0),
                              this.ctx.featureCenter.updateFeatureList({
                                deviceId: u.user_unique_id || u.web_id || "",
                              });
                          case 13:
                            return (
                              (this.configPreparePromise =
                                this.ctx.dataCenter.fetchStrategyConfig()),
                              this.configPreparePromise.then(function () {
                                return c.prepare(!1);
                              }),
                              d.abrupt("return", this.configPreparePromise)
                            );
                          case 16:
                          case "end":
                            return d.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function () {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "updateFeatures",
            value:
              ((i = x1(
                wc().mark(function l(u) {
                  var c, d, h;
                  return wc().wrap(
                    function (f) {
                      for (;;)
                        switch ((f.prev = f.next)) {
                          case 0:
                            if (
                              u &&
                              (c = this.ctx) !== null &&
                              c !== void 0 &&
                              (c = c.featureCenter) !== null &&
                              c !== void 0 &&
                              c.updateFeatureList
                            ) {
                              f.next = 2;
                              break;
                            }
                            return f.abrupt("return");
                          case 2:
                            if (
                              ((h =
                                (d =
                                  this.ctx.featureCenter.getFeatureList()) ===
                                  null || d === void 0
                                  ? void 0
                                  : d.deviceId),
                              this.ctx.featureCenter.updateFeatureList(
                                fs({}, u)
                              ),
                              !u.deviceId || u.deviceId === h)
                            ) {
                              f.next = 6;
                              break;
                            }
                            return f.abrupt("return", this.reloadConfig());
                          case 6:
                          case "end":
                            return f.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function (l) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "reloadConfig",
            value:
              ((r = x1(
                wc().mark(function l() {
                  return wc().wrap(
                    function (u) {
                      for (;;)
                        switch ((u.prev = u.next)) {
                          case 0:
                            return (
                              (this.configPreparePromise =
                                this.ctx.dataCenter.fetchStrategyConfig()),
                              u.abrupt("return", this.configPreparePromise)
                            );
                          case 2:
                          case "end":
                            return u.stop();
                        }
                    },
                    l,
                    this
                  );
                })
              )),
              function () {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "getTeaToken",
            value:
              ((n = x1(
                wc().mark(function l() {
                  var u = this;
                  return wc().wrap(function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          return c.abrupt(
                            "return",
                            new Gf(function (d) {
                              var h, f, p;
                              if (
                                typeof ((h = u.ctx.tracker) === null ||
                                h === void 0 ||
                                (h = h.tracker) === null ||
                                h === void 0
                                  ? void 0
                                  : h.getToken) == "function"
                              )
                                return u.ctx.tracker.tracker.getToken(function (
                                  y
                                ) {
                                  return d(y);
                                });
                              var g = (
                                ((f = u.ctx.tracker) === null ||
                                f === void 0 ||
                                (f = f.tracker) === null ||
                                f === void 0 ||
                                (p = f.getConfig) === null ||
                                p === void 0
                                  ? void 0
                                  : p.call(f)) || {}
                              ).user;
                              return d(g === void 0 ? {} : g);
                            })
                          );
                        case 1:
                        case "end":
                          return c.stop();
                      }
                  }, l);
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "prepare",
            value: function (l) {
              var u,
                c = this,
                d = this.ctx.dataCenter.getInitStrategyConfig() || {},
                h = this.ctx.dataCenter.getServiceStrategyConfig() || {};
              Dc((u = Mf(d))).call(u, function (f) {
                var p, g, y, v, b, w, k;
                (!((p = d[f]) === null || p === void 0) && p.disabled) ||
                  (!(h == null || (g = h[f]) === null || g === void 0) &&
                    g.disabled) ||
                  (y = d[f]) === null ||
                  y === void 0 ||
                  (y = y.Strategy) === null ||
                  y === void 0 ||
                  (v =
                    y[l ? "prepareBeforeStarted" : "prepareAfterStarted"]) ===
                    null ||
                  v === void 0 ||
                  v.call(y, {
                    ctx: c.ctx,
                    Strategy:
                      (b = d[f]) === null || b === void 0 ? void 0 : b.Strategy,
                    config: fs(
                      fs(
                        {},
                        (w = d[f]) === null || w === void 0 ? void 0 : w.config
                      ),
                      h == null || (k = h[f]) === null || k === void 0
                        ? void 0
                        : k.config
                    ),
                  });
              });
            },
          },
        ],
        [
          {
            key: "init",
            value: function (l) {
              var u;
              if (
                (Th.update(l == null ? void 0 : l.log),
                l != null && l.appId && l.strategies)
              ) {
                var c = {};
                Dc((u = Mf(l.strategies))).call(u, function (h) {
                  var f, p;
                  (f = l.strategies) !== null &&
                    f !== void 0 &&
                    f[h] &&
                    ed(
                      (p = l.strategies) === null || p === void 0
                        ? void 0
                        : p[h]
                    ) === "object" &&
                    (c[h] = l.strategies[h]);
                });
                var d = fs(
                  fs({}, l),
                  {},
                  { strategies: c, type: l.type || To.VOD }
                );
                if (
                  (Th.info("Init", d), d.type === To.VOD || d.type === To.LIVE)
                )
                  return d.type === To.VOD
                    ? ((t._vodInst = t._vodInst || new t(d)),
                      t._vodInst.ctx.tracker.track("strategy_init", {}),
                      t._vodInst)
                    : ((t._liveInst = t._liveInst || new t(d)),
                      t._liveInst.ctx.tracker.track("strategy_init", {}),
                      t._liveInst);
                Th.error("Init Invalid Strategy Type=".concat(l.type));
              } else Th.error("Init without appId or strategies", l);
            },
          },
          {
            key: "bootstrap",
            value: function (l) {
              var u;
              return (u = t.init(l)) === null || u === void 0
                ? void 0
                : u.start();
            },
          },
          {
            key: "inst",
            value: function () {
              var l =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : To.VOD;
              return l === To.VOD
                ? t._vodInst
                : l === To.LIVE
                ? t._liveInst
                : null;
            },
          },
          {
            key: "recLive",
            value: function (l, u) {
              return t.rec(l, u, To.LIVE);
            },
          },
          {
            key: "recAsync",
            value:
              ((e = x1(
                wc().mark(function l(u, c) {
                  var d,
                    h,
                    f = arguments;
                  return wc().wrap(function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (
                            ((d =
                              f.length > 2 && f[2] !== void 0 ? f[2] : To.VOD),
                            (h = t.inst(d || To.VOD)),
                            Th.info("recAsync", h, c, d),
                            h != null && h.configPreparePromise)
                          ) {
                            p.next = 6;
                            break;
                          }
                          return (
                            Th.error("VeStrategyNotInitOrStart"),
                            p.abrupt("return", {
                              plugins: [],
                              pluginConfiguration: {},
                              result: {},
                            })
                          );
                        case 6:
                          return (p.next = 8), h.configPreparePromise;
                        case 8:
                          return p.abrupt("return", t.rec(u, c, d));
                        case 9:
                        case "end":
                          return p.stop();
                      }
                  }, l);
                })
              )),
              function (l, u) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "rec",
            value: function (l, u) {
              var c =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : To.VOD;
              try {
                return t._rec(l, u, c);
              } catch {
                var d;
                Th.error("VeStrategyRecError");
                var h = t.inst(c);
                return (
                  h == null ||
                    (d = h.ctx) === null ||
                    d === void 0 ||
                    (d = d.tracker) === null ||
                    d === void 0 ||
                    d.track("strategy_js_error", {
                      type: c,
                      option: QT(l ?? {}),
                      common_config: QT(u ?? {}),
                    }),
                  { plugins: [], pluginConfiguration: {}, result: {} }
                );
              }
            },
          },
          {
            key: "reportABInfo",
            value: function (l) {
              var u,
                c,
                d =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : To.VOD;
              To.VOD !== d
                ? To.LIVE !== d ||
                  (u = t._liveInst) === null ||
                  u === void 0 ||
                  (u = u.ctx) === null ||
                  u === void 0 ||
                  (u = u.tracker) === null ||
                  u === void 0 ||
                  u.bindTrackerABVersion(l)
                : (c = t._vodInst) === null ||
                  c === void 0 ||
                  (c = c.ctx) === null ||
                  c === void 0 ||
                  (c = c.tracker) === null ||
                  c === void 0 ||
                  c.bindTrackerABVersion(l);
            },
          },
          {
            key: "getServiceConfig",
            value: function () {
              var l,
                u,
                c =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : To.VOD;
              return To.VOD === c
                ? ((l = t._vodInst) === null ||
                  l === void 0 ||
                  (l = l.ctx) === null ||
                  l === void 0 ||
                  (l = l.dataCenter) === null ||
                  l === void 0
                    ? void 0
                    : l.getServiceStrategyConfig()) || {}
                : (To.LIVE === c &&
                    ((u = t._liveInst) === null ||
                    u === void 0 ||
                    (u = u.ctx) === null ||
                    u === void 0 ||
                    (u = u.dataCenter) === null ||
                    u === void 0
                      ? void 0
                      : u.getServiceStrategyConfig())) ||
                    {};
            },
          },
          {
            key: "apply",
            value: function (l, u, c) {
              var d;
              if (!l || !u) return l;
              if (
                ((c == null ? void 0 : c.type) || To.VOD) === To.VOD &&
                (d = t._vodInst) !== null &&
                d !== void 0 &&
                d.ctx
              ) {
                var h,
                  f =
                    (c == null ? void 0 : c.Adapter) ||
                    ((h = t._vodInst.ctx.dataCenter.getAppConfig()) === null ||
                    h === void 0 ||
                    (h = h.adapter) === null ||
                    h === void 0
                      ? void 0
                      : h.Adapter) ||
                    VAr[To.VOD];
                return f && (l = new f().apply(l, u)), l;
              }
              return l;
            },
          },
          {
            key: "_rec",
            value: function (l, u) {
              var c,
                d,
                h,
                f,
                p,
                g,
                y,
                v =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : To.VOD,
                b = t.inst(v || To.VOD);
              if ((Th.info("rec", b, u, v), !b))
                return (
                  Th.error("VeStrategyNotInit"),
                  { plugins: [], pluginConfiguration: {}, result: {} }
                );
              var w = {
                  plugins: [bQ],
                  pluginConfiguration: da({}, bQ.pluginName, {}),
                  result: {},
                  strategyPluginKeys: bQ.pluginName,
                },
                k = new eSr(b.ctx),
                D = b.ctx.dataCenter.getServiceStrategyConfig() || {},
                $ = b.ctx.dataCenter.getInitStrategyConfig() || {};
              Dc((c = Mf($))).call(c, function (I) {
                var O,
                  X = $[I],
                  G = D[I],
                  H = l == null ? void 0 : l[I];
                if (
                  (X != null && X.disabled) ||
                  (G != null && G.disabled) ||
                  (H != null && H.disabled)
                )
                  Th.warn("StrategyDisabled", X, G, H);
                else {
                  var E,
                    S,
                    L = fs(
                      fs(fs({}, X), H),
                      {},
                      {
                        config: iR(
                          {},
                          X == null ? void 0 : X.config,
                          G == null ? void 0 : G.config,
                          H == null ? void 0 : H.config
                        ),
                      }
                    );
                  ((O = L.Strategy) === null || O === void 0
                    ? void 0
                    : O.strategyName) === I
                    ? k.registerStrategy(L)
                    : Th.warn(
                        "StrategyNameIllegal",
                        eh(
                          (E = "".concat(
                            (S = L.Strategy) === null || S === void 0
                              ? void 0
                              : S.strategyName,
                            "!=="
                          ))
                        ).call(E, I)
                      );
                }
              }),
                Dc((d = k.getStrategyList())).call(d, function (I) {
                  var O, X, G;
                  try {
                    var H;
                    G = (I == null ||
                    (H = I.getRecommendation) === null ||
                    H === void 0
                      ? void 0
                      : H.call(I, u)) || {
                      plugins: [],
                      pluginConfiguration: {},
                      result: {},
                    };
                  } catch (E) {
                    return (
                      Th.error("StrategyRecommendError", E),
                      void b.ctx.tracker.track("strategy_exe_error", {
                        strategy_name: I == null ? void 0 : I.strategyName,
                      })
                    );
                  }
                  (w.plugins = eh((O = w.plugins)).call(O, G.plugins || [])),
                    (w.pluginConfiguration = fs(
                      fs({}, w.pluginConfiguration),
                      G.pluginConfiguration
                    )),
                    (w.result = fs(
                      fs({}, w.result),
                      {},
                      da(
                        {},
                        I.strategyName,
                        fs(
                          {
                            _strategyConfig:
                              (X = I.getStrategyConfig) === null || X === void 0
                                ? void 0
                                : X.call(I),
                          },
                          G.result
                        )
                      )
                    ));
                });
              var N = b.ctx.dataCenter.getAppConfig();
              Dc((h = Mf(w.pluginConfiguration))).call(h, function (I) {
                w.pluginConfiguration[I] = fs(
                  fs({}, w.pluginConfiguration[I]),
                  {},
                  {
                    ctx: b.ctx,
                    strategyCenter: k,
                    videoType: N == null ? void 0 : N.type,
                  }
                );
              }),
                Th.info("StrategyRecommendResult", w);
              var P = (f = w.result) !== null && f !== void 0 ? f : {};
              return (
                (w.strategyKeys = K$((p = Mf(P)))
                  .call(p, function (I) {
                    var O;
                    return (
                      ed(P[I]) === "object" &&
                      ((O = P[I]) === null || O === void 0 ? void 0 : O.enable)
                    );
                  })
                  .join("|")),
                (w.strategyPluginKeys =
                  (g = w.plugins) === null ||
                  g === void 0 ||
                  (y = Qy(g)) === null ||
                  y === void 0 ||
                  (y = y.call(g, function (I) {
                    return I == null ? void 0 : I.pluginName;
                  })) === null ||
                  y === void 0
                    ? void 0
                    : y.join("|")),
                b.ctx.tracker.track("strategy_rec_info", {
                  strategy_keys: w.strategyKeys,
                  strategy_plugin_keys: w.strategyPluginKeys,
                  strategy_info: QT(w.result),
                }),
                w
              );
            },
          },
        ]
      ),
      t
    );
  })();
da(B$e, "_vodInst", void 0), da(B$e, "_liveInst", void 0);
Os.StrategyBase;
function _et(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
var VQ =
  typeof globalThis < "u"
    ? globalThis
    : typeof window < "u"
    ? window
    : typeof global < "u"
    ? global
    : typeof self < "u"
    ? self
    : {};
function Cb(t) {
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default")
    ? t.default
    : t;
}
var Tet = { exports: {} },
  vN = function (t) {
    return t && t.Math == Math && t;
  },
  ag =
    vN(typeof globalThis == "object" && globalThis) ||
    vN(typeof window == "object" && window) ||
    vN(typeof self == "object" && self) ||
    vN(typeof VQ == "object" && VQ) ||
    (function () {
      return this;
    })() ||
    VQ ||
    Function("return this")(),
  Md = function (t) {
    try {
      return !!t();
    } catch {
      return !0;
    }
  },
  zAr = Md,
  AO = !zAr(function () {
    var t = function () {}.bind();
    return typeof t != "function" || t.hasOwnProperty("prototype");
  }),
  jAr = AO,
  Eet = Function.prototype,
  H$e = Eet.apply,
  X$e = Eet.call,
  Yde =
    (typeof Reflect == "object" && Reflect.apply) ||
    (jAr
      ? X$e.bind(H$e)
      : function () {
          return X$e.apply(H$e, arguments);
        }),
  Ret = AO,
  Aet = Function.prototype,
  Nie = Aet.call,
  WAr = Ret && Aet.bind.bind(Nie, Nie),
  Lc = Ret
    ? WAr
    : function (t) {
        return function () {
          return Nie.apply(t, arguments);
        };
      },
  wet = Lc,
  KAr = wet({}.toString),
  ZAr = wet("".slice),
  qD = function (t) {
    return ZAr(KAr(t), 8, -1);
  },
  YAr = qD,
  QAr = Lc,
  Fie = function (t) {
    if (YAr(t) === "Function") return QAr(t);
  },
  Uie = typeof document == "object" && document.all,
  JAr = Uie === void 0 && Uie !== void 0,
  ket = { all: Uie, IS_HTMLDDA: JAr },
  Iet = ket,
  qAr = Iet.all,
  uh = Iet.IS_HTMLDDA
    ? function (t) {
        return typeof t == "function" || t === qAr;
      }
    : function (t) {
        return typeof t == "function";
      },
  Qde = {},
  ewr = Md,
  Dv = !ewr(function () {
    return (
      Object.defineProperty({}, 1, {
        get: function () {
          return 7;
        },
      })[1] != 7
    );
  }),
  twr = AO,
  bN = Function.prototype.call,
  UR = twr
    ? bN.bind(bN)
    : function () {
        return bN.apply(bN, arguments);
      },
  Jde = {},
  Det = {}.propertyIsEnumerable,
  Pet = Object.getOwnPropertyDescriptor,
  nwr = Pet && !Det.call({ 1: 2 }, 1);
Jde.f = nwr
  ? function (t) {
      var e = Pet(this, t);
      return !!e && e.enumerable;
    }
  : Det;
var oT,
  y6,
  wO = function (t, e) {
    return {
      enumerable: !(1 & t),
      configurable: !(2 & t),
      writable: !(4 & t),
      value: e,
    };
  },
  rwr = Lc,
  iwr = Md,
  awr = qD,
  zQ = Object,
  owr = rwr("".split),
  Met = iwr(function () {
    return !zQ("z").propertyIsEnumerable(0);
  })
    ? function (t) {
        return awr(t) == "String" ? owr(t, "") : zQ(t);
      }
    : zQ,
  Cet = function (t) {
    return t == null;
  },
  swr = Cet,
  lwr = TypeError,
  qde = function (t) {
    if (swr(t)) throw lwr("Can't call method on " + t);
    return t;
  },
  uwr = Met,
  cwr = qde,
  BR = function (t) {
    return uwr(cwr(t));
  },
  V$e = uh,
  $et = ket,
  dwr = $et.all,
  Pv = $et.IS_HTMLDDA
    ? function (t) {
        return typeof t == "object" ? t !== null : V$e(t) || t === dwr;
      }
    : function (t) {
        return typeof t == "object" ? t !== null : V$e(t);
      },
  Mv = {},
  jQ = Mv,
  WQ = ag,
  hwr = uh,
  z$e = function (t) {
    return hwr(t) ? t : void 0;
  },
  Cv = function (t, e) {
    return arguments.length < 2
      ? z$e(jQ[t]) || z$e(WQ[t])
      : (jQ[t] && jQ[t][e]) || (WQ[t] && WQ[t][e]);
  },
  fwr = Lc,
  ehe = fwr({}.isPrototypeOf),
  pwr = (typeof navigator < "u" && String(navigator.userAgent)) || "",
  xet = ag,
  KQ = pwr,
  j$e = xet.process,
  W$e = xet.Deno,
  K$e = (j$e && j$e.versions) || (W$e && W$e.version),
  Z$e = K$e && K$e.v8;
Z$e && (y6 = (oT = Z$e.split("."))[0] > 0 && oT[0] < 4 ? 1 : +(oT[0] + oT[1])),
  !y6 &&
    KQ &&
    (!(oT = KQ.match(/Edge\/(\d+)/)) || oT[1] >= 74) &&
    (oT = KQ.match(/Chrome\/(\d+)/)) &&
    (y6 = +oT[1]);
var the = y6,
  Y$e = the,
  gwr = Md,
  mwr = ag,
  ywr = mwr.String,
  eP =
    !!Object.getOwnPropertySymbols &&
    !gwr(function () {
      var t = Symbol();
      return (
        !ywr(t) ||
        !(Object(t) instanceof Symbol) ||
        (!Symbol.sham && Y$e && Y$e < 41)
      );
    }),
  vwr = eP,
  Let = vwr && !Symbol.sham && typeof Symbol.iterator == "symbol",
  bwr = Cv,
  _wr = uh,
  Twr = ehe,
  Ewr = Let,
  Swr = Object,
  kO = Ewr
    ? function (t) {
        return typeof t == "symbol";
      }
    : function (t) {
        var e = bwr("Symbol");
        return _wr(e) && Twr(e.prototype, Swr(t));
      },
  Rwr = String,
  nhe = function (t) {
    try {
      return Rwr(t);
    } catch {
      return "Object";
    }
  },
  Awr = uh,
  wwr = nhe,
  kwr = TypeError,
  AH = function (t) {
    if (Awr(t)) return t;
    throw kwr(wwr(t) + " is not a function");
  },
  Iwr = AH,
  Dwr = Cet,
  Pwr = function (t, e) {
    var n = t[e];
    return Dwr(n) ? void 0 : Iwr(n);
  },
  ZQ = UR,
  YQ = uh,
  QQ = Pv,
  Mwr = TypeError,
  Cwr = function (t, e) {
    var n, r;
    if (
      (e === "string" && YQ((n = t.toString)) && !QQ((r = ZQ(n, t)))) ||
      (YQ((n = t.valueOf)) && !QQ((r = ZQ(n, t)))) ||
      (e !== "string" && YQ((n = t.toString)) && !QQ((r = ZQ(n, t))))
    )
      return r;
    throw Mwr("Can't convert object to primitive value");
  },
  Oet = { exports: {} },
  Q$e = ag,
  $wr = Object.defineProperty,
  xwr = function (t, e) {
    try {
      $wr(Q$e, t, { value: e, configurable: !0, writable: !0 });
    } catch {
      Q$e[t] = e;
    }
    return e;
  },
  Lwr = ag,
  Owr = xwr,
  J$e = "__core-js_shared__",
  Gwr = Lwr[J$e] || Owr(J$e, {}),
  rhe = Gwr,
  q$e = rhe;
(Oet.exports = function (t, e) {
  return q$e[t] || (q$e[t] = e !== void 0 ? e : {});
})("versions", []).push({
  version: "3.31.1",
  mode: "pure",
  copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)",
  license: "https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",
  source: "https://github.com/zloirock/core-js",
});
var tP = Oet.exports,
  Nwr = qde,
  Fwr = Object,
  nP = function (t) {
    return Fwr(Nwr(t));
  },
  Uwr = Lc,
  Bwr = nP,
  Hwr = Uwr({}.hasOwnProperty),
  og =
    Object.hasOwn ||
    function (t, e) {
      return Hwr(Bwr(t), e);
    },
  Xwr = Lc,
  Vwr = 0,
  zwr = Math.random(),
  jwr = Xwr((1).toString),
  ihe = function (t) {
    return "Symbol(" + (t === void 0 ? "" : t) + ")_" + jwr(++Vwr + zwr, 36);
  },
  Wwr = ag,
  Kwr = tP,
  exe = og,
  Zwr = ihe,
  Ywr = eP,
  Qwr = Let,
  Nk = Wwr.Symbol,
  JQ = Kwr("wks"),
  Jwr = Qwr ? Nk.for || Nk : (Nk && Nk.withoutSetter) || Zwr,
  Bh = function (t) {
    return (
      exe(JQ, t) || (JQ[t] = Ywr && exe(Nk, t) ? Nk[t] : Jwr("Symbol." + t)),
      JQ[t]
    );
  },
  qwr = UR,
  txe = Pv,
  nxe = kO,
  ekr = Pwr,
  tkr = Cwr,
  nkr = Bh,
  rkr = TypeError,
  ikr = nkr("toPrimitive"),
  akr = function (t, e) {
    if (!txe(t) || nxe(t)) return t;
    var n,
      r = ekr(t, ikr);
    if (r) {
      if (
        (e === void 0 && (e = "default"), (n = qwr(r, t, e)), !txe(n) || nxe(n))
      )
        return n;
      throw rkr("Can't convert object to primitive value");
    }
    return e === void 0 && (e = "number"), tkr(t, e);
  },
  okr = akr,
  skr = kO,
  wH = function (t) {
    var e = okr(t, "string");
    return skr(e) ? e : e + "";
  },
  lkr = ag,
  rxe = Pv,
  Bie = lkr.document,
  ukr = rxe(Bie) && rxe(Bie.createElement),
  Get = function (t) {
    return ukr ? Bie.createElement(t) : {};
  },
  ckr = Dv,
  dkr = Md,
  hkr = Get,
  Net =
    !ckr &&
    !dkr(function () {
      return (
        Object.defineProperty(hkr("div"), "a", {
          get: function () {
            return 7;
          },
        }).a != 7
      );
    }),
  fkr = Dv,
  pkr = UR,
  gkr = Jde,
  mkr = wO,
  ykr = BR,
  vkr = wH,
  bkr = og,
  _kr = Net,
  ixe = Object.getOwnPropertyDescriptor;
Qde.f = fkr
  ? ixe
  : function (t, e) {
      if (((t = ykr(t)), (e = vkr(e)), _kr))
        try {
          return ixe(t, e);
        } catch {}
      if (bkr(t, e)) return mkr(!pkr(gkr.f, t, e), t[e]);
    };
var Tkr = Md,
  Ekr = uh,
  Skr = /#|\.prototype\./,
  IO = function (t, e) {
    var n = Akr[Rkr(t)];
    return n == kkr || (n != wkr && (Ekr(e) ? Tkr(e) : !!e));
  },
  Rkr = (IO.normalize = function (t) {
    return String(t).replace(Skr, ".").toLowerCase();
  }),
  Akr = (IO.data = {}),
  wkr = (IO.NATIVE = "N"),
  kkr = (IO.POLYFILL = "P"),
  Ikr = IO,
  Dkr = AH,
  Pkr = AO,
  Mkr = Fie(Fie.bind),
  Fet = function (t, e) {
    return (
      Dkr(t),
      e === void 0
        ? t
        : Pkr
        ? Mkr(t, e)
        : function () {
            return t.apply(e, arguments);
          }
    );
  },
  V0 = {},
  Ckr = Dv,
  $kr = Md,
  Uet =
    Ckr &&
    $kr(function () {
      return (
        Object.defineProperty(function () {}, "prototype", {
          value: 42,
          writable: !1,
        }).prototype != 42
      );
    }),
  xkr = Pv,
  Lkr = String,
  Okr = TypeError,
  rP = function (t) {
    if (xkr(t)) return t;
    throw Okr(Lkr(t) + " is not an object");
  },
  Gkr = Dv,
  Nkr = Net,
  Fkr = Uet,
  _N = rP,
  axe = wH,
  Ukr = TypeError,
  qQ = Object.defineProperty,
  Bkr = Object.getOwnPropertyDescriptor,
  eJ = "enumerable",
  tJ = "configurable",
  nJ = "writable";
V0.f = Gkr
  ? Fkr
    ? function (t, e, n) {
        if (
          (_N(t),
          (e = axe(e)),
          _N(n),
          typeof t == "function" &&
            e === "prototype" &&
            "value" in n &&
            nJ in n &&
            !n[nJ])
        ) {
          var r = Bkr(t, e);
          r &&
            r[nJ] &&
            ((t[e] = n.value),
            (n = {
              configurable: tJ in n ? n[tJ] : r[tJ],
              enumerable: eJ in n ? n[eJ] : r[eJ],
              writable: !1,
            }));
        }
        return qQ(t, e, n);
      }
    : qQ
  : function (t, e, n) {
      if ((_N(t), (e = axe(e)), _N(n), Nkr))
        try {
          return qQ(t, e, n);
        } catch {}
      if ("get" in n || "set" in n) throw Ukr("Accessors not supported");
      return "value" in n && (t[e] = n.value), t;
    };
var Hkr = Dv,
  Xkr = V0,
  Vkr = wO,
  DO = Hkr
    ? function (t, e, n) {
        return Xkr.f(t, e, Vkr(1, n));
      }
    : function (t, e, n) {
        return (t[e] = n), t;
      },
  TN = ag,
  zkr = Yde,
  jkr = Fie,
  Wkr = uh,
  Kkr = Qde.f,
  Zkr = Ikr,
  Pw = Mv,
  Ykr = Fet,
  Mw = DO,
  oxe = og,
  Qkr = function (t) {
    var e = function (n, r, i) {
      if (this instanceof e) {
        switch (arguments.length) {
          case 0:
            return new t();
          case 1:
            return new t(n);
          case 2:
            return new t(n, r);
        }
        return new t(n, r, i);
      }
      return zkr(t, this, arguments);
    };
    return (e.prototype = t.prototype), e;
  },
  Cd = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f = t.target,
      p = t.global,
      g = t.stat,
      y = t.proto,
      v = p ? TN : g ? TN[f] : (TN[f] || {}).prototype,
      b = p ? Pw : Pw[f] || Mw(Pw, f, {})[f],
      w = b.prototype;
    for (o in e)
      (r =
        !(n = Zkr(p ? o : f + (g ? "." : "#") + o, t.forced)) &&
        v &&
        oxe(v, o)),
        (u = b[o]),
        r && (c = t.dontCallGetSet ? (h = Kkr(v, o)) && h.value : v[o]),
        (l = r && c ? c : e[o]),
        (r && typeof u == typeof l) ||
          ((d =
            t.bind && r
              ? Ykr(l, TN)
              : t.wrap && r
              ? Qkr(l)
              : y && Wkr(l)
              ? jkr(l)
              : l),
          (t.sham || (l && l.sham) || (u && u.sham)) && Mw(d, "sham", !0),
          Mw(b, o, d),
          y &&
            (oxe(Pw, (i = f + "Prototype")) || Mw(Pw, i, {}),
            Mw(Pw[i], o, l),
            t.real && w && (n || !w[o]) && Mw(w, o, l)));
  },
  Jkr = Cd,
  qkr = Dv,
  sxe = V0.f;
Jkr(
  {
    target: "Object",
    stat: !0,
    forced: Object.defineProperty !== sxe,
    sham: !qkr,
  },
  { defineProperty: sxe }
);
var eIr = Mv,
  Bet = eIr.Object,
  tIr = (Tet.exports = function (t, e, n) {
    return Bet.defineProperty(t, e, n);
  });
Bet.defineProperty.sham && (tIr.sham = !0);
var nIr = Tet.exports,
  rIr = nIr,
  iIr = rIr,
  aIr = iIr,
  oIr = aIr,
  sIr = oIr,
  lIr = sIr,
  uIr = lIr,
  kH = Cb(uIr),
  cIr = qD,
  ahe =
    Array.isArray ||
    function (t) {
      return cIr(t) == "Array";
    },
  dIr = Math.ceil,
  hIr = Math.floor,
  fIr =
    Math.trunc ||
    function (t) {
      var e = +t;
      return (e > 0 ? hIr : dIr)(e);
    },
  pIr = fIr,
  ohe = function (t) {
    var e = +t;
    return e != e || e === 0 ? 0 : pIr(e);
  },
  gIr = ohe,
  mIr = Math.min,
  yIr = function (t) {
    return t > 0 ? mIr(gIr(t), 9007199254740991) : 0;
  },
  vIr = yIr,
  IH = function (t) {
    return vIr(t.length);
  },
  bIr = TypeError,
  _Ir = 9007199254740991,
  TIr = function (t) {
    if (t > _Ir) throw bIr("Maximum allowed index exceeded");
    return t;
  },
  EIr = wH,
  SIr = V0,
  RIr = wO,
  Het = function (t, e, n) {
    var r = EIr(e);
    r in t ? SIr.f(t, r, RIr(0, n)) : (t[r] = n);
  },
  AIr = Bh,
  wIr = AIr("toStringTag"),
  Xet = {};
Xet[wIr] = "z";
var she = String(Xet) === "[object z]",
  kIr = she,
  IIr = uh,
  v6 = qD,
  DIr = Bh,
  PIr = DIr("toStringTag"),
  MIr = Object,
  CIr =
    v6(
      (function () {
        return arguments;
      })()
    ) == "Arguments",
  $Ir = function (t, e) {
    try {
      return t[e];
    } catch {}
  },
  DH = kIr
    ? v6
    : function (t) {
        var e, n, r;
        return t === void 0
          ? "Undefined"
          : t === null
          ? "Null"
          : typeof (n = $Ir((e = MIr(t)), PIr)) == "string"
          ? n
          : CIr
          ? v6(e)
          : (r = v6(e)) == "Object" && IIr(e.callee)
          ? "Arguments"
          : r;
      },
  xIr = Lc,
  LIr = uh,
  Hie = rhe,
  OIr = xIr(Function.toString);
LIr(Hie.inspectSource) ||
  (Hie.inspectSource = function (t) {
    return OIr(t);
  });
var GIr = Hie.inspectSource,
  NIr = Lc,
  FIr = Md,
  Vet = uh,
  UIr = DH,
  BIr = Cv,
  HIr = GIr,
  zet = function () {},
  XIr = [],
  jet = BIr("Reflect", "construct"),
  lhe = /^\s*(?:class|function)\b/,
  VIr = NIr(lhe.exec),
  zIr = !lhe.exec(zet),
  NM = function (t) {
    if (!Vet(t)) return !1;
    try {
      return jet(zet, XIr, t), !0;
    } catch {
      return !1;
    }
  },
  Wet = function (t) {
    if (!Vet(t)) return !1;
    switch (UIr(t)) {
      case "AsyncFunction":
      case "GeneratorFunction":
      case "AsyncGeneratorFunction":
        return !1;
    }
    try {
      return zIr || !!VIr(lhe, HIr(t));
    } catch {
      return !0;
    }
  };
Wet.sham = !0;
var Ket =
    !jet ||
    FIr(function () {
      var t;
      return (
        NM(NM.call) ||
        !NM(Object) ||
        !NM(function () {
          t = !0;
        }) ||
        t
      );
    })
      ? Wet
      : NM,
  lxe = ahe,
  jIr = Ket,
  WIr = Pv,
  KIr = Bh,
  ZIr = KIr("species"),
  uxe = Array,
  YIr = function (t) {
    var e;
    return (
      lxe(t) &&
        ((e = t.constructor),
        ((jIr(e) && (e === uxe || lxe(e.prototype))) ||
          (WIr(e) && (e = e[ZIr]) === null)) &&
          (e = void 0)),
      e === void 0 ? uxe : e
    );
  },
  QIr = YIr,
  Zet = function (t, e) {
    return new (QIr(t))(e === 0 ? 0 : e);
  },
  JIr = Md,
  qIr = Bh,
  eDr = the,
  tDr = qIr("species"),
  nDr = function (t) {
    return (
      eDr >= 51 ||
      !JIr(function () {
        var e = [];
        return (
          ((e.constructor = {})[tDr] = function () {
            return { foo: 1 };
          }),
          e[t](Boolean).foo !== 1
        );
      })
    );
  },
  rDr = Cd,
  iDr = Md,
  aDr = ahe,
  oDr = Pv,
  sDr = nP,
  lDr = IH,
  cxe = TIr,
  dxe = Het,
  uDr = Zet,
  cDr = nDr,
  dDr = Bh,
  hDr = the,
  Yet = dDr("isConcatSpreadable"),
  fDr =
    hDr >= 51 ||
    !iDr(function () {
      var t = [];
      return (t[Yet] = !1), t.concat()[0] !== t;
    }),
  pDr = function (t) {
    if (!oDr(t)) return !1;
    var e = t[Yet];
    return e !== void 0 ? !!e : aDr(t);
  },
  gDr = !fDr || !cDr("concat");
rDr(
  { target: "Array", proto: !0, arity: 1, forced: gDr },
  {
    concat: function (t) {
      var e,
        n,
        r,
        i,
        o,
        l = sDr(this),
        u = uDr(l, 0),
        c = 0;
      for (e = -1, r = arguments.length; e < r; e++)
        if (pDr((o = e === -1 ? l : arguments[e])))
          for (i = lDr(o), cxe(c + i), n = 0; n < i; n++, c++)
            n in o && dxe(u, c, o[n]);
        else cxe(c + 1), dxe(u, c++, o);
      return (u.length = c), u;
    },
  }
);
var mDr = DH,
  yDr = String,
  PO = function (t) {
    if (mDr(t) === "Symbol")
      throw TypeError("Cannot convert a Symbol value to a string");
    return yDr(t);
  },
  uhe = {},
  vDr = ohe,
  bDr = Math.max,
  _Dr = Math.min,
  Qet = function (t, e) {
    var n = vDr(t);
    return n < 0 ? bDr(n + e, 0) : _Dr(n, e);
  },
  TDr = BR,
  EDr = Qet,
  SDr = IH,
  hxe = function (t) {
    return function (e, n, r) {
      var i,
        o = TDr(e),
        l = SDr(o),
        u = EDr(r, l);
      if (t && n != n) {
        for (; l > u; ) if ((i = o[u++]) != i) return !0;
      } else
        for (; l > u; u++) if ((t || u in o) && o[u] === n) return t || u || 0;
      return !t && -1;
    };
  },
  RDr = { includes: hxe(!0), indexOf: hxe(!1) },
  PH = {},
  ADr = Lc,
  rJ = og,
  wDr = BR,
  kDr = RDr.indexOf,
  IDr = PH,
  fxe = ADr([].push),
  Jet = function (t, e) {
    var n,
      r = wDr(t),
      i = 0,
      o = [];
    for (n in r) !rJ(IDr, n) && rJ(r, n) && fxe(o, n);
    for (; e.length > i; ) rJ(r, (n = e[i++])) && (~kDr(o, n) || fxe(o, n));
    return o;
  },
  che = [
    "constructor",
    "hasOwnProperty",
    "isPrototypeOf",
    "propertyIsEnumerable",
    "toLocaleString",
    "toString",
    "valueOf",
  ],
  DDr = Jet,
  PDr = che,
  qet =
    Object.keys ||
    function (t) {
      return DDr(t, PDr);
    },
  MDr = Dv,
  CDr = Uet,
  $Dr = V0,
  xDr = rP,
  LDr = BR,
  ODr = qet;
uhe.f =
  MDr && !CDr
    ? Object.defineProperties
    : function (t, e) {
        xDr(t);
        for (var n, r = LDr(e), i = ODr(e), o = i.length, l = 0; o > l; )
          $Dr.f(t, (n = i[l++]), r[n]);
        return t;
      };
var EN,
  GDr = Cv,
  NDr = GDr("document", "documentElement"),
  FDr = tP,
  UDr = ihe,
  pxe = FDr("keys"),
  MH = function (t) {
    return pxe[t] || (pxe[t] = UDr(t));
  },
  BDr = rP,
  HDr = uhe,
  gxe = che,
  XDr = PH,
  VDr = NDr,
  zDr = Get,
  jDr = MH,
  mxe = ">",
  yxe = "<",
  Xie = "prototype",
  Vie = "script",
  ett = jDr("IE_PROTO"),
  iJ = function () {},
  ttt = function (t) {
    return yxe + Vie + mxe + t + yxe + "/" + Vie + mxe;
  },
  vxe = function (t) {
    t.write(ttt("")), t.close();
    var e = t.parentWindow.Object;
    return (t = null), e;
  },
  WDr = function () {
    var t,
      e = zDr("iframe"),
      n = "java" + Vie + ":";
    return (
      (e.style.display = "none"),
      VDr.appendChild(e),
      (e.src = String(n)),
      (t = e.contentWindow.document).open(),
      t.write(ttt("document.F=Object")),
      t.close(),
      t.F
    );
  },
  b6 = function () {
    try {
      EN = new ActiveXObject("htmlfile");
    } catch {}
    b6 =
      typeof document < "u"
        ? document.domain && EN
          ? vxe(EN)
          : WDr()
        : vxe(EN);
    for (var t = gxe.length; t--; ) delete b6[Xie][gxe[t]];
    return b6();
  };
XDr[ett] = !0;
var MO =
    Object.create ||
    function (t, e) {
      var n;
      return (
        t !== null
          ? ((iJ[Xie] = BDr(t)), (n = new iJ()), (iJ[Xie] = null), (n[ett] = t))
          : (n = b6()),
        e === void 0 ? n : HDr.f(n, e)
      );
    },
  dhe = {},
  KDr = Jet,
  ZDr = che,
  YDr = ZDr.concat("length", "prototype");
dhe.f =
  Object.getOwnPropertyNames ||
  function (t) {
    return KDr(t, YDr);
  };
var ntt = {},
  bxe = Qet,
  QDr = IH,
  JDr = Het,
  qDr = Array,
  ePr = Math.max,
  tPr = function (t, e, n) {
    for (
      var r = QDr(t),
        i = bxe(e, r),
        o = bxe(n === void 0 ? r : n, r),
        l = qDr(ePr(o - i, 0)),
        u = 0;
      i < o;
      i++, u++
    )
      JDr(l, u, t[i]);
    return (l.length = u), l;
  },
  nPr = qD,
  rPr = BR,
  rtt = dhe.f,
  iPr = tPr,
  itt =
    typeof window == "object" && window && Object.getOwnPropertyNames
      ? Object.getOwnPropertyNames(window)
      : [],
  aPr = function (t) {
    try {
      return rtt(t);
    } catch {
      return iPr(itt);
    }
  };
ntt.f = function (t) {
  return itt && nPr(t) == "Window" ? aPr(t) : rtt(rPr(t));
};
var hhe = {};
hhe.f = Object.getOwnPropertySymbols;
var oPr = DO,
  CH = function (t, e, n, r) {
    return r && r.enumerable ? (t[e] = n) : oPr(t, e, n), t;
  },
  sPr = V0,
  lPr = function (t, e, n) {
    return sPr.f(t, e, n);
  },
  CO = {},
  uPr = Bh;
CO.f = uPr;
var o9,
  _L,
  s9,
  _xe = Mv,
  cPr = og,
  dPr = CO,
  hPr = V0.f,
  Ou = function (t) {
    var e = _xe.Symbol || (_xe.Symbol = {});
    cPr(e, t) || hPr(e, t, { value: dPr.f(t) });
  },
  fPr = UR,
  pPr = Cv,
  gPr = Bh,
  mPr = CH,
  att = function () {
    var t = pPr("Symbol"),
      e = t && t.prototype,
      n = e && e.valueOf,
      r = gPr("toPrimitive");
    e &&
      !e[r] &&
      mPr(
        e,
        r,
        function (i) {
          return fPr(n, this);
        },
        { arity: 1 }
      );
  },
  yPr = she,
  vPr = DH,
  bPr = yPr
    ? {}.toString
    : function () {
        return "[object " + vPr(this) + "]";
      },
  _Pr = she,
  TPr = V0.f,
  EPr = DO,
  SPr = og,
  RPr = bPr,
  APr = Bh,
  Txe = APr("toStringTag"),
  $O = function (t, e, n, r) {
    if (t) {
      var i = n ? t : t.prototype;
      SPr(i, Txe) || TPr(i, Txe, { configurable: !0, value: e }),
        r && !_Pr && EPr(i, "toString", RPr);
    }
  },
  wPr = ag,
  kPr = uh,
  Exe = wPr.WeakMap,
  IPr = kPr(Exe) && /native code/.test(String(Exe)),
  DPr = IPr,
  ott = ag,
  PPr = Pv,
  MPr = DO,
  aJ = og,
  oJ = rhe,
  CPr = MH,
  $Pr = PH,
  Sxe = "Object already initialized",
  zie = ott.TypeError,
  xPr = ott.WeakMap,
  LPr = function (t) {
    return s9(t) ? _L(t) : o9(t, {});
  },
  OPr = function (t) {
    return function (e) {
      var n;
      if (!PPr(e) || (n = _L(e)).type !== t)
        throw zie("Incompatible receiver, " + t + " required");
      return n;
    };
  };
if (DPr || oJ.state) {
  var Py = oJ.state || (oJ.state = new xPr());
  (Py.get = Py.get),
    (Py.has = Py.has),
    (Py.set = Py.set),
    (o9 = function (t, e) {
      if (Py.has(t)) throw zie(Sxe);
      return (e.facade = t), Py.set(t, e), e;
    }),
    (_L = function (t) {
      return Py.get(t) || {};
    }),
    (s9 = function (t) {
      return Py.has(t);
    });
} else {
  var Cw = CPr("state");
  ($Pr[Cw] = !0),
    (o9 = function (t, e) {
      if (aJ(t, Cw)) throw zie(Sxe);
      return (e.facade = t), MPr(t, Cw, e), e;
    }),
    (_L = function (t) {
      return aJ(t, Cw) ? t[Cw] : {};
    }),
    (s9 = function (t) {
      return aJ(t, Cw);
    });
}
var fhe = { set: o9, get: _L, has: s9, enforce: LPr, getterFor: OPr },
  GPr = Fet,
  NPr = Lc,
  FPr = Met,
  UPr = nP,
  BPr = IH,
  HPr = Zet,
  Rxe = NPr([].push),
  sT = function (t) {
    var e = t == 1,
      n = t == 2,
      r = t == 3,
      i = t == 4,
      o = t == 6,
      l = t == 7,
      u = t == 5 || o;
    return function (c, d, h, f) {
      for (
        var p,
          g,
          y = UPr(c),
          v = FPr(y),
          b = GPr(d, h),
          w = BPr(v),
          k = 0,
          D = f || HPr,
          $ = e ? D(c, w) : n || l ? D(c, 0) : void 0;
        w > k;
        k++
      )
        if ((u || k in v) && ((g = b((p = v[k]), k, y)), t))
          if (e) $[k] = g;
          else if (g)
            switch (t) {
              case 3:
                return !0;
              case 5:
                return p;
              case 6:
                return k;
              case 2:
                Rxe($, p);
            }
          else
            switch (t) {
              case 4:
                return !1;
              case 7:
                Rxe($, p);
            }
      return o ? -1 : r || i ? i : $;
    };
  },
  XPr = {
    forEach: sT(0),
    map: sT(1),
    filter: sT(2),
    some: sT(3),
    every: sT(4),
    find: sT(5),
    findIndex: sT(6),
    filterReject: sT(7),
  },
  SN = Cd,
  phe = ag,
  ghe = UR,
  VPr = Lc,
  yI = Dv,
  $w = eP,
  zPr = Md,
  Jc = og,
  jPr = ehe,
  jie = rP,
  $H = BR,
  mhe = wH,
  WPr = PO,
  Wie = wO,
  TL = MO,
  stt = qet,
  KPr = dhe,
  ltt = ntt,
  ZPr = hhe,
  utt = Qde,
  ctt = V0,
  YPr = uhe,
  dtt = Jde,
  Axe = CH,
  QPr = lPr,
  yhe = tP,
  JPr = MH,
  htt = PH,
  wxe = ihe,
  qPr = Bh,
  eMr = CO,
  tMr = Ou,
  nMr = att,
  rMr = $O,
  ftt = fhe,
  xH = XPr.forEach,
  wf = JPr("hidden"),
  l9 = "Symbol",
  EL = "prototype",
  iMr = ftt.set,
  kxe = ftt.getterFor(l9),
  D0 = Object[EL],
  Fk = phe.Symbol,
  _6 = Fk && Fk[EL],
  aMr = phe.TypeError,
  sJ = phe.QObject,
  ptt = utt.f,
  cS = ctt.f,
  gtt = ltt.f,
  oMr = dtt.f,
  mtt = VPr([].push),
  ib = yhe("symbols"),
  xO = yhe("op-symbols"),
  sMr = yhe("wks"),
  lJ = !sJ || !sJ[EL] || !sJ[EL].findChild,
  Kie =
    yI &&
    zPr(function () {
      return (
        TL(
          cS({}, "a", {
            get: function () {
              return cS(this, "a", { value: 7 }).a;
            },
          })
        ).a != 7
      );
    })
      ? function (t, e, n) {
          var r = ptt(D0, e);
          r && delete D0[e], cS(t, e, n), r && t !== D0 && cS(D0, e, r);
        }
      : cS,
  uJ = function (t, e) {
    var n = (ib[t] = TL(_6));
    return (
      iMr(n, { type: l9, tag: t, description: e }), yI || (n.description = e), n
    );
  },
  u9 = function (t, e, n) {
    t === D0 && u9(xO, e, n), jie(t);
    var r = mhe(e);
    return (
      jie(n),
      Jc(ib, r)
        ? (n.enumerable
            ? (Jc(t, wf) && t[wf][r] && (t[wf][r] = !1),
              (n = TL(n, { enumerable: Wie(0, !1) })))
            : (Jc(t, wf) || cS(t, wf, Wie(1, {})), (t[wf][r] = !0)),
          Kie(t, r, n))
        : cS(t, r, n)
    );
  },
  Zie = function (t, e) {
    jie(t);
    var n = $H(e),
      r = stt(n).concat(vtt(n));
    return (
      xH(r, function (i) {
        (yI && !ghe(ytt, n, i)) || u9(t, i, n[i]);
      }),
      t
    );
  },
  lMr = function (t, e) {
    return e === void 0 ? TL(t) : Zie(TL(t), e);
  },
  ytt = function (t) {
    var e = mhe(t),
      n = ghe(oMr, this, e);
    return (
      !(this === D0 && Jc(ib, e) && !Jc(xO, e)) &&
      (!(n || !Jc(this, e) || !Jc(ib, e) || (Jc(this, wf) && this[wf][e])) || n)
    );
  },
  Ixe = function (t, e) {
    var n = $H(t),
      r = mhe(e);
    if (n !== D0 || !Jc(ib, r) || Jc(xO, r)) {
      var i = ptt(n, r);
      return (
        !i || !Jc(ib, r) || (Jc(n, wf) && n[wf][r]) || (i.enumerable = !0), i
      );
    }
  },
  Dxe = function (t) {
    var e = gtt($H(t)),
      n = [];
    return (
      xH(e, function (r) {
        Jc(ib, r) || Jc(htt, r) || mtt(n, r);
      }),
      n
    );
  },
  vtt = function (t) {
    var e = t === D0,
      n = gtt(e ? xO : $H(t)),
      r = [];
    return (
      xH(n, function (i) {
        !Jc(ib, i) || (e && !Jc(D0, i)) || mtt(r, ib[i]);
      }),
      r
    );
  };
$w ||
  (Axe(
    (_6 = (Fk = function () {
      if (jPr(_6, this)) throw aMr("Symbol is not a constructor");
      var t =
          arguments.length && arguments[0] !== void 0
            ? WPr(arguments[0])
            : void 0,
        e = wxe(t),
        n = function (r) {
          this === D0 && ghe(n, xO, r),
            Jc(this, wf) && Jc(this[wf], e) && (this[wf][e] = !1),
            Kie(this, e, Wie(1, r));
        };
      return yI && lJ && Kie(D0, e, { configurable: !0, set: n }), uJ(e, t);
    })[EL]),
    "toString",
    function () {
      return kxe(this).tag;
    }
  ),
  Axe(Fk, "withoutSetter", function (t) {
    return uJ(wxe(t), t);
  }),
  (dtt.f = ytt),
  (ctt.f = u9),
  (YPr.f = Zie),
  (utt.f = Ixe),
  (KPr.f = ltt.f = Dxe),
  (ZPr.f = vtt),
  (eMr.f = function (t) {
    return uJ(qPr(t), t);
  }),
  yI &&
    QPr(_6, "description", {
      configurable: !0,
      get: function () {
        return kxe(this).description;
      },
    })),
  SN(
    { global: !0, constructor: !0, wrap: !0, forced: !$w, sham: !$w },
    { Symbol: Fk }
  ),
  xH(stt(sMr), function (t) {
    tMr(t);
  }),
  SN(
    { target: l9, stat: !0, forced: !$w },
    {
      useSetter: function () {
        lJ = !0;
      },
      useSimple: function () {
        lJ = !1;
      },
    }
  ),
  SN(
    { target: "Object", stat: !0, forced: !$w, sham: !yI },
    {
      create: lMr,
      defineProperty: u9,
      defineProperties: Zie,
      getOwnPropertyDescriptor: Ixe,
    }
  ),
  SN({ target: "Object", stat: !0, forced: !$w }, { getOwnPropertyNames: Dxe }),
  nMr(),
  rMr(Fk, l9),
  (htt[wf] = !0);
var uMr = eP,
  btt = uMr && !!Symbol.for && !!Symbol.keyFor,
  cMr = Cd,
  dMr = Cv,
  hMr = og,
  fMr = PO,
  _tt = tP,
  pMr = btt,
  cJ = _tt("string-to-symbol-registry"),
  gMr = _tt("symbol-to-string-registry");
cMr(
  { target: "Symbol", stat: !0, forced: !pMr },
  {
    for: function (t) {
      var e = fMr(t);
      if (hMr(cJ, e)) return cJ[e];
      var n = dMr("Symbol")(e);
      return (cJ[e] = n), (gMr[n] = e), n;
    },
  }
);
var mMr = Cd,
  yMr = og,
  vMr = kO,
  bMr = nhe,
  _Mr = tP,
  TMr = btt,
  Pxe = _Mr("symbol-to-string-registry");
mMr(
  { target: "Symbol", stat: !0, forced: !TMr },
  {
    keyFor: function (t) {
      if (!vMr(t)) throw TypeError(bMr(t) + " is not a symbol");
      if (yMr(Pxe, t)) return Pxe[t];
    },
  }
);
var EMr = Lc,
  Ttt = EMr([].slice),
  SMr = Lc,
  Mxe = ahe,
  RMr = uh,
  Cxe = qD,
  AMr = PO,
  $xe = SMr([].push),
  wMr = function (t) {
    if (RMr(t)) return t;
    if (Mxe(t)) {
      for (var e = t.length, n = [], r = 0; r < e; r++) {
        var i = t[r];
        typeof i == "string"
          ? $xe(n, i)
          : (typeof i != "number" &&
              Cxe(i) != "Number" &&
              Cxe(i) != "String") ||
            $xe(n, AMr(i));
      }
      var o = n.length,
        l = !0;
      return function (u, c) {
        if (l) return (l = !1), c;
        if (Mxe(this)) return c;
        for (var d = 0; d < o; d++) if (n[d] === u) return c;
      };
    }
  },
  kMr = Cd,
  Ett = Cv,
  Stt = Yde,
  IMr = UR,
  LO = Lc,
  Rtt = Md,
  xxe = uh,
  Lxe = kO,
  Att = Ttt,
  DMr = wMr,
  PMr = eP,
  MMr = String,
  JT = Ett("JSON", "stringify"),
  RN = LO(/./.exec),
  Oxe = LO("".charAt),
  CMr = LO("".charCodeAt),
  $Mr = LO("".replace),
  xMr = LO((1).toString),
  LMr = /[\uD800-\uDFFF]/g,
  Gxe = /^[\uD800-\uDBFF]$/,
  Nxe = /^[\uDC00-\uDFFF]$/,
  Fxe =
    !PMr ||
    Rtt(function () {
      var t = Ett("Symbol")();
      return (
        JT([t]) != "[null]" || JT({ a: t }) != "{}" || JT(Object(t)) != "{}"
      );
    }),
  Uxe = Rtt(function () {
    return (
      JT("\uDF06\uD834") !== '"\\udf06\\ud834"' || JT("\uDEAD") !== '"\\udead"'
    );
  }),
  OMr = function (t, e) {
    var n = Att(arguments),
      r = DMr(e);
    if (xxe(r) || (t !== void 0 && !Lxe(t)))
      return (
        (n[1] = function (i, o) {
          if ((xxe(r) && (o = IMr(r, this, MMr(i), o)), !Lxe(o))) return o;
        }),
        Stt(JT, null, n)
      );
  },
  GMr = function (t, e, n) {
    var r = Oxe(n, e - 1),
      i = Oxe(n, e + 1);
    return (RN(Gxe, t) && !RN(Nxe, i)) || (RN(Nxe, t) && !RN(Gxe, r))
      ? "\\u" + xMr(CMr(t, 0), 16)
      : t;
  };
JT &&
  kMr(
    { target: "JSON", stat: !0, arity: 3, forced: Fxe || Uxe },
    {
      stringify: function (t, e, n) {
        var r = Att(arguments),
          i = Stt(Fxe ? OMr : JT, null, r);
        return Uxe && typeof i == "string" ? $Mr(i, LMr, GMr) : i;
      },
    }
  );
var NMr = Cd,
  FMr = eP,
  UMr = Md,
  wtt = hhe,
  BMr = nP,
  HMr =
    !FMr ||
    UMr(function () {
      wtt.f(1);
    });
NMr(
  { target: "Object", stat: !0, forced: HMr },
  {
    getOwnPropertySymbols: function (t) {
      var e = wtt.f;
      return e ? e(BMr(t)) : [];
    },
  }
);
var XMr = Ou;
XMr("asyncIterator");
var VMr = Ou;
VMr("hasInstance");
var zMr = Ou;
zMr("isConcatSpreadable");
var jMr = Ou;
jMr("iterator");
var WMr = Ou;
WMr("match");
var KMr = Ou;
KMr("matchAll");
var ZMr = Ou;
ZMr("replace");
var YMr = Ou;
YMr("search");
var QMr = Ou;
QMr("species");
var JMr = Ou;
JMr("split");
var qMr = Ou,
  eCr = att;
qMr("toPrimitive"), eCr();
var tCr = Cv,
  nCr = Ou,
  rCr = $O;
nCr("toStringTag"), rCr(tCr("Symbol"), "Symbol");
var iCr = Ou;
iCr("unscopables");
var aCr = ag,
  oCr = $O;
oCr(aCr.JSON, "JSON", !0);
var OS,
  Bxe,
  Hxe,
  sCr = Mv,
  lCr = sCr.Symbol,
  LH = {},
  Yie = Dv,
  uCr = og,
  ktt = Function.prototype,
  cCr = Yie && Object.getOwnPropertyDescriptor,
  vhe = uCr(ktt, "name"),
  dCr = vhe && function () {}.name === "something",
  hCr = vhe && (!Yie || (Yie && cCr(ktt, "name").configurable)),
  fCr = { EXISTS: vhe, PROPER: dCr, CONFIGURABLE: hCr },
  pCr = Md,
  Itt = !pCr(function () {
    function t() {}
    return (
      (t.prototype.constructor = null),
      Object.getPrototypeOf(new t()) !== t.prototype
    );
  }),
  gCr = og,
  mCr = uh,
  yCr = nP,
  vCr = MH,
  bCr = Itt,
  Xxe = vCr("IE_PROTO"),
  Qie = Object,
  _Cr = Qie.prototype,
  bhe = bCr
    ? Qie.getPrototypeOf
    : function (t) {
        var e = yCr(t);
        if (gCr(e, Xxe)) return e[Xxe];
        var n = e.constructor;
        return mCr(n) && e instanceof n
          ? n.prototype
          : e instanceof Qie
          ? _Cr
          : null;
      },
  TCr = Md,
  ECr = uh,
  SCr = Pv,
  RCr = MO,
  Vxe = bhe,
  ACr = CH,
  wCr = Bh,
  Jie = wCr("iterator"),
  Dtt = !1;
[].keys &&
  ("next" in (Hxe = [].keys())
    ? (Bxe = Vxe(Vxe(Hxe))) !== Object.prototype && (OS = Bxe)
    : (Dtt = !0));
var kCr =
  !SCr(OS) ||
  TCr(function () {
    var t = {};
    return OS[Jie].call(t) !== t;
  });
ECr((OS = kCr ? {} : RCr(OS))[Jie]) ||
  ACr(OS, Jie, function () {
    return this;
  });
var Ptt = { IteratorPrototype: OS, BUGGY_SAFARI_ITERATORS: Dtt },
  ICr = Ptt.IteratorPrototype,
  DCr = MO,
  PCr = wO,
  MCr = $O,
  CCr = LH,
  $Cr = function () {
    return this;
  },
  xCr = function (t, e, n, r) {
    var i = e + " Iterator";
    return (
      (t.prototype = DCr(ICr, { next: PCr(+!r, n) })),
      MCr(t, i, !1, !0),
      (CCr[i] = $Cr),
      t
    );
  },
  LCr = Lc,
  OCr = AH,
  GCr = function (t, e, n) {
    try {
      return LCr(OCr(Object.getOwnPropertyDescriptor(t, e)[n]));
    } catch {}
  },
  NCr = uh,
  FCr = String,
  UCr = TypeError,
  BCr = function (t) {
    if (typeof t == "object" || NCr(t)) return t;
    throw UCr("Can't set " + FCr(t) + " as a prototype");
  },
  HCr = GCr,
  XCr = rP,
  VCr = BCr,
  zCr =
    Object.setPrototypeOf ||
    ("__proto__" in {}
      ? (function () {
          var t,
            e = !1,
            n = {};
          try {
            (t = HCr(Object.prototype, "__proto__", "set"))(n, []),
              (e = n instanceof Array);
          } catch {}
          return function (r, i) {
            return XCr(r), VCr(i), e ? t(r, i) : (r.__proto__ = i), r;
          };
        })()
      : void 0),
  jCr = Cd,
  WCr = UR,
  KCr = fCr,
  ZCr = xCr,
  YCr = bhe,
  QCr = $O,
  zxe = CH,
  JCr = Bh,
  jxe = LH,
  qCr = Ptt,
  e$r = KCr.PROPER,
  AN = qCr.BUGGY_SAFARI_ITERATORS,
  dJ = JCr("iterator"),
  Wxe = "keys",
  wN = "values",
  Kxe = "entries",
  t$r = function () {
    return this;
  },
  Mtt = function (t, e, n, r, i, o, l) {
    ZCr(n, e, r);
    var u,
      c,
      d,
      h = function (w) {
        if (w === i && v) return v;
        if (!AN && w in g) return g[w];
        switch (w) {
          case Wxe:
          case wN:
          case Kxe:
            return function () {
              return new n(this, w);
            };
        }
        return function () {
          return new n(this);
        };
      },
      f = e + " Iterator",
      p = !1,
      g = t.prototype,
      y = g[dJ] || g["@@iterator"] || (i && g[i]),
      v = (!AN && y) || h(i),
      b = (e == "Array" && g.entries) || y;
    if (
      (b &&
        (u = YCr(b.call(new t()))) !== Object.prototype &&
        u.next &&
        (QCr(u, f, !0, !0), (jxe[f] = t$r)),
      e$r &&
        i == wN &&
        y &&
        y.name !== wN &&
        ((p = !0),
        (v = function () {
          return WCr(y, this);
        })),
      i)
    )
      if (((c = { values: h(wN), keys: o ? v : h(Wxe), entries: h(Kxe) }), l))
        for (d in c) (AN || p || !(d in g)) && zxe(g, d, c[d]);
      else jCr({ target: e, proto: !0, forced: AN || p }, c);
    return l && g[dJ] !== v && zxe(g, dJ, v, { name: i }), (jxe[e] = v), c;
  },
  Ctt = function (t, e) {
    return { value: t, done: e };
  },
  n$r = BR,
  Zxe = LH,
  $tt = fhe;
V0.f;
var r$r = Mtt,
  Yxe = Ctt,
  xtt = "Array Iterator",
  i$r = $tt.set,
  a$r = $tt.getterFor(xtt);
r$r(
  Array,
  "Array",
  function (t, e) {
    i$r(this, { type: xtt, target: n$r(t), index: 0, kind: e });
  },
  function () {
    var t = a$r(this),
      e = t.target,
      n = t.kind,
      r = t.index++;
    return !e || r >= e.length
      ? ((t.target = void 0), Yxe(void 0, !0))
      : Yxe(n == "keys" ? r : n == "values" ? e[r] : [r, e[r]], !1);
  },
  "values"
),
  (Zxe.Arguments = Zxe.Array);
var o$r = {
    CSSRuleList: 0,
    CSSStyleDeclaration: 0,
    CSSValueList: 0,
    ClientRectList: 0,
    DOMRectList: 0,
    DOMStringList: 0,
    DOMTokenList: 1,
    DataTransferItemList: 0,
    FileList: 0,
    HTMLAllCollection: 0,
    HTMLCollection: 0,
    HTMLFormElement: 0,
    HTMLSelectElement: 0,
    MediaList: 0,
    MimeTypeArray: 0,
    NamedNodeMap: 0,
    NodeList: 1,
    PaintRequestList: 0,
    Plugin: 0,
    PluginArray: 0,
    SVGLengthList: 0,
    SVGNumberList: 0,
    SVGPathSegList: 0,
    SVGPointList: 0,
    SVGStringList: 0,
    SVGTransformList: 0,
    SourceBufferList: 0,
    StyleSheetList: 0,
    TextTrackCueList: 0,
    TextTrackList: 0,
    TouchList: 0,
  },
  s$r = o$r,
  l$r = ag,
  u$r = DH,
  c$r = DO,
  Qxe = LH,
  d$r = Bh,
  Jxe = d$r("toStringTag");
for (var hJ in s$r) {
  var qxe = l$r[hJ],
    fJ = qxe && qxe.prototype;
  fJ && u$r(fJ) !== Jxe && c$r(fJ, Jxe, hJ), (Qxe[hJ] = Qxe.Array);
}
var h$r = lCr,
  f$r = h$r,
  p$r = Bh,
  g$r = V0.f,
  eLe = p$r("metadata"),
  tLe = Function.prototype;
tLe[eLe] === void 0 && g$r(tLe, eLe, { value: null });
var m$r = Ou;
m$r("dispose");
var y$r = Ou;
y$r("metadata");
var v$r = f$r,
  b$r = v$r,
  _$r = Ou;
_$r("asyncDispose");
var T$r = Cv,
  E$r = Lc,
  _he = T$r("Symbol"),
  S$r = _he.keyFor,
  R$r = E$r(_he.prototype.valueOf),
  Ltt =
    _he.isRegisteredSymbol ||
    function (t) {
      try {
        return S$r(R$r(t)) !== void 0;
      } catch {
        return !1;
      }
    },
  A$r = Cd,
  w$r = Ltt;
A$r({ target: "Symbol", stat: !0 }, { isRegisteredSymbol: w$r });
for (
  var k$r = tP,
    nLe = Cv,
    I$r = Lc,
    D$r = kO,
    P$r = Bh,
    kN = nLe("Symbol"),
    rLe = kN.isWellKnownSymbol,
    Ott = nLe("Object", "getOwnPropertyNames"),
    M$r = I$r(kN.prototype.valueOf),
    iLe = k$r("wks"),
    pJ = 0,
    aLe = Ott(kN),
    C$r = aLe.length;
  pJ < C$r;
  pJ++
)
  try {
    var oLe = aLe[pJ];
    D$r(kN[oLe]) && P$r(oLe);
  } catch {}
var Gtt = function (t) {
    if (rLe && rLe(t)) return !0;
    try {
      for (var e = M$r(t), n = 0, r = Ott(iLe), i = r.length; n < i; n++)
        if (iLe[r[n]] == e) return !0;
    } catch {}
    return !1;
  },
  $$r = Cd,
  x$r = Gtt;
$$r({ target: "Symbol", stat: !0, forced: !0 }, { isWellKnownSymbol: x$r });
var L$r = Ou;
L$r("matcher");
var O$r = Ou;
O$r("observable");
var G$r = Cd,
  N$r = Ltt;
G$r(
  { target: "Symbol", stat: !0, name: "isRegisteredSymbol" },
  { isRegistered: N$r }
);
var F$r = Cd,
  U$r = Gtt;
F$r(
  { target: "Symbol", stat: !0, name: "isWellKnownSymbol", forced: !0 },
  { isWellKnown: U$r }
);
var B$r = Ou;
B$r("metadataKey");
var H$r = Ou;
H$r("patternMatch");
var X$r = Ou;
X$r("replaceAll");
var V$r = b$r,
  z$r = V$r,
  j$r = z$r,
  IN = Cb(j$r),
  The = Lc,
  W$r = ohe,
  K$r = PO,
  Z$r = qde,
  Y$r = The("".charAt),
  sLe = The("".charCodeAt),
  Q$r = The("".slice),
  lLe = function (t) {
    return function (e, n) {
      var r,
        i,
        o = K$r(Z$r(e)),
        l = W$r(n),
        u = o.length;
      return l < 0 || l >= u
        ? t
          ? ""
          : void 0
        : (r = sLe(o, l)) < 55296 ||
          r > 56319 ||
          l + 1 === u ||
          (i = sLe(o, l + 1)) < 56320 ||
          i > 57343
        ? t
          ? Y$r(o, l)
          : r
        : t
        ? Q$r(o, l, l + 2)
        : i - 56320 + ((r - 55296) << 10) + 65536;
    };
  },
  J$r = { codeAt: lLe(!1), charAt: lLe(!0) },
  q$r = J$r.charAt,
  exr = PO,
  Ntt = fhe,
  txr = Mtt,
  uLe = Ctt,
  Ftt = "String Iterator",
  nxr = Ntt.set,
  rxr = Ntt.getterFor(Ftt);
txr(
  String,
  "String",
  function (t) {
    nxr(this, { type: Ftt, string: exr(t), index: 0 });
  },
  function () {
    var t,
      e = rxr(this),
      n = e.string,
      r = e.index;
    return r >= n.length
      ? uLe(void 0, !0)
      : ((t = q$r(n, r)), (e.index += t.length), uLe(t, !1));
  }
);
var ixr = CO,
  axr = ixr.f("iterator"),
  oxr = axr,
  sxr = oxr,
  lxr = sxr,
  uxr = lxr,
  cxr = uxr,
  dxr = cxr,
  hxr = dxr,
  fxr = Cb(hxr);
function SL(t) {
  return (SL =
    typeof IN == "function" && typeof fxr == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof IN == "function" &&
            e.constructor === IN &&
            e !== IN.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
var pxr = CO,
  gxr = pxr.f("toPrimitive"),
  mxr = gxr,
  yxr = mxr,
  vxr = yxr,
  bxr = vxr,
  _xr = bxr,
  Txr = _xr,
  Exr = Txr,
  Sxr = Cb(Exr);
function Rxr(t, e) {
  if (SL(t) !== "object" || t === null) return t;
  var n = t[Sxr];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (SL(r) !== "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function Utt(t) {
  var e = Rxr(t, "string");
  return SL(e) === "symbol" ? e : String(e);
}
function cLe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      kH(t, Utt(r.key), r);
  }
}
function Btt(t, e, n) {
  return (
    e && cLe(t.prototype, e),
    n && cLe(t, n),
    kH(t, "prototype", { writable: !1 }),
    t
  );
}
var Axr = Cd,
  wxr = Dv,
  kxr = MO;
Axr({ target: "Object", stat: !0, sham: !wxr }, { create: kxr });
var Ixr = Mv,
  Dxr = Ixr.Object,
  Pxr = function (t, e) {
    return Dxr.create(t, e);
  },
  Mxr = Pxr,
  Cxr = Mxr,
  $xr = Cxr,
  xxr = $xr,
  Lxr = xxr,
  Oxr = Lxr,
  Gxr = Oxr,
  Nxr = Cb(Gxr),
  Fxr = Cd,
  Uxr = zCr;
Fxr({ target: "Object", stat: !0 }, { setPrototypeOf: Uxr });
var Bxr = Mv,
  Hxr = Bxr.Object.setPrototypeOf,
  Xxr = Hxr,
  Vxr = Xxr,
  zxr = Vxr,
  jxr = zxr,
  Wxr = jxr,
  Kxr = Wxr,
  Zxr = Kxr,
  qie = Cb(Zxr),
  Htt = Lc,
  Yxr = AH,
  Qxr = Pv,
  Jxr = og,
  dLe = Ttt,
  qxr = AO,
  Xtt = Function,
  eLr = Htt([].concat),
  tLr = Htt([].join),
  gJ = {},
  nLr = function (t, e, n) {
    if (!Jxr(gJ, e)) {
      for (var r = [], i = 0; i < e; i++) r[i] = "a[" + i + "]";
      gJ[e] = Xtt("C,a", "return new C(" + tLr(r, ",") + ")");
    }
    return gJ[e](t, n);
  },
  Vtt = qxr
    ? Xtt.bind
    : function (t) {
        var e = Yxr(this),
          n = e.prototype,
          r = dLe(arguments, 1),
          i = function () {
            var o = eLr(r, dLe(arguments));
            return this instanceof i ? nLr(e, o.length, o) : e.apply(t, o);
          };
        return Qxr(n) && (i.prototype = n), i;
      },
  rLr = Cd,
  hLe = Vtt;
rLr(
  { target: "Function", proto: !0, forced: Function.bind !== hLe },
  { bind: hLe }
);
var iLr = Mv,
  aLr = function (t) {
    return iLr[t + "Prototype"];
  },
  oLr = aLr,
  sLr = oLr("Function").bind,
  lLr = ehe,
  uLr = sLr,
  mJ = Function.prototype,
  cLr = function (t) {
    var e = t.bind;
    return t === mJ || (lLr(mJ, t) && e === mJ.bind) ? uLr : e;
  },
  dLr = cLr,
  hLr = dLr,
  fLr = hLr,
  pLr = fLr,
  gLr = pLr,
  mLr = gLr,
  yLr = mLr,
  ztt = Cb(yLr);
function jtt(t, e) {
  var n;
  return (jtt = qie
    ? ztt((n = qie)).call(n)
    : function (r, i) {
        return (r.__proto__ = i), r;
      })(t, e);
}
function vLr(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Nxr(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    kH(t, "prototype", { writable: !1 }),
    e && jtt(t, e);
}
var bLr = Ket,
  _Lr = nhe,
  TLr = TypeError,
  ELr = function (t) {
    if (bLr(t)) return t;
    throw TLr(_Lr(t) + " is not a constructor");
  },
  SLr = Cd,
  RLr = Cv,
  yJ = Yde,
  ALr = Vtt,
  fLe = ELr,
  wLr = rP,
  pLe = Pv,
  kLr = MO,
  Wtt = Md,
  Ehe = RLr("Reflect", "construct"),
  ILr = Object.prototype,
  DLr = [].push,
  Ktt = Wtt(function () {
    function t() {}
    return !(Ehe(function () {}, [], t) instanceof t);
  }),
  Ztt = !Wtt(function () {
    Ehe(function () {});
  }),
  gLe = Ktt || Ztt;
SLr(
  { target: "Reflect", stat: !0, forced: gLe, sham: gLe },
  {
    construct: function (t, e) {
      fLe(t), wLr(e);
      var n = arguments.length < 3 ? t : fLe(arguments[2]);
      if (Ztt && !Ktt) return Ehe(t, e, n);
      if (t == n) {
        switch (e.length) {
          case 0:
            return new t();
          case 1:
            return new t(e[0]);
          case 2:
            return new t(e[0], e[1]);
          case 3:
            return new t(e[0], e[1], e[2]);
          case 4:
            return new t(e[0], e[1], e[2], e[3]);
        }
        var r = [null];
        return yJ(DLr, r, e), new (yJ(ALr, t, r))();
      }
      var i = n.prototype,
        o = kLr(pLe(i) ? i : ILr),
        l = yJ(t, o, e);
      return pLe(l) ? l : o;
    },
  }
);
var PLr = Mv,
  MLr = PLr.Reflect.construct,
  CLr = MLr,
  $Lr = CLr,
  xLr = $Lr,
  LLr = xLr,
  OLr = LLr,
  GLr = OLr,
  NLr = GLr,
  T6 = Cb(NLr),
  FLr = Cd,
  ULr = Md,
  BLr = nP,
  Ytt = bhe,
  HLr = Itt,
  XLr = ULr(function () {
    Ytt(1);
  });
FLr(
  { target: "Object", stat: !0, forced: XLr, sham: !HLr },
  {
    getPrototypeOf: function (t) {
      return Ytt(BLr(t));
    },
  }
);
var VLr = Mv,
  zLr = VLr.Object.getPrototypeOf,
  jLr = zLr,
  WLr = jLr,
  KLr = WLr,
  ZLr = KLr,
  YLr = ZLr,
  QLr = YLr,
  JLr = QLr,
  mLe = Cb(JLr);
function eae(t) {
  var e;
  return (eae = qie
    ? ztt((e = mLe)).call(e)
    : function (n) {
        return n.__proto__ || mLe(n);
      })(t);
}
function qLr() {
  if (typeof Reflect > "u" || !T6 || T6.sham) return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return Boolean.prototype.valueOf.call(T6(Boolean, [], function () {})), !0;
  } catch {
    return !1;
  }
}
function e5r(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function t5r(t, e) {
  if (e && (SL(e) === "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return e5r(t);
}
function n5r(t) {
  var e = qLr();
  return function () {
    var n,
      r = eae(t);
    if (e) {
      var i = eae(this).constructor;
      n = T6(r, arguments, i);
    } else n = r.apply(this, arguments);
    return t5r(this, n);
  };
}
function FM(t, e, n) {
  return (
    (e = Utt(e)) in t
      ? kH(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 })
      : (t[e] = n),
    t
  );
}
var Qtt = (function (t) {
    return (
      (t.h265 = "h265"),
      (t.adaptRange = "adaptRange"),
      (t.preload = "preload"),
      (t.rtmAdaptiveBuffer = "rtmAdaptiveBuffer"),
      t
    );
  })(Qtt || {}),
  r5r = (function () {
    function t(e) {
      _et(this, t),
        FM(this, "strategyCenter", void 0),
        FM(this, "ctx", void 0),
        FM(this, "config", void 0),
        FM(this, "player", void 0),
        FM(this, "strategyName", void 0),
        (this.ctx = e.ctx),
        (this.config = e.config),
        (this.strategyName = e.strategyName),
        (this.strategyCenter = e.strategyCenter),
        (this.player = null);
    }
    return (
      Btt(t, [
        {
          key: "getStrategyConfig",
          value: function () {
            return this.config;
          },
        },
        {
          key: "setPlayerInst",
          value: function (e) {
            this.player = e.getInst();
          },
        },
        { key: "beforePlayerCreate", value: function (e) {} },
        { key: "onPlayerEvent", value: function (e, n) {} },
        { key: "onGlobalEvent", value: function (e, n) {} },
      ]),
      t
    );
  })();
(function (t) {
  vLr(n, r5r);
  var e = n5r(n);
  function n() {
    return _et(this, n), e.apply(this, arguments);
  }
  return (
    Btt(
      n,
      [
        {
          key: "getRecommendation",
          value: function () {
            return { result: this.config };
          },
        },
      ],
      [
        {
          key: "strategyName",
          get: function () {
            return Qtt.rtmAdaptiveBuffer;
          },
        },
      ]
    ),
    n
  );
})();
Os.StrategyRtmAdaptiveBuffer;
var She = "ad_start",
  RL = "ad_play",
  Rhe = "ad_pause",
  OH = "ad_time_update",
  Ahe = "ad_skipped",
  whe = "ad_error",
  khe = "ad_complete",
  Jtt = "ad_all_completed",
  Ihe = "ima_sdk_load_start",
  qtt = "ima_sdk_load_success",
  Dhe = "ima_sdk_load_error",
  ent = "ima_ad_loader_ready",
  tae = "ima_ad_manager_ready",
  i5r = "ima_ad_ended",
  a5r = "ima_ad_skipped",
  tnt = "ima_ad_complete",
  nnt = "ima_all_ads_completed",
  nae = "ima_ad_error",
  o5r = "ima_ad_seeking",
  s5r = "ima_ad_seeked",
  c9 = "ima_ad_loaded",
  rnt = "ima_ad_break_ready",
  Phe = "ima_content_pause_requested",
  Mhe = "ima_content_resume_requested",
  tx = "ima_ready_to_play",
  l5r = Object.freeze({
    __proto__: null,
    AD_ALL_COMPLETED: Jtt,
    AD_COMPLETE: khe,
    AD_ERROR: whe,
    AD_PAUSE: Rhe,
    AD_PLAY: RL,
    AD_SKIPPED: Ahe,
    AD_START: She,
    AD_TIME_UPDATE: OH,
    IMA_AD_BREAK_READY: rnt,
    IMA_AD_COMPLETE: tnt,
    IMA_AD_ENDED: i5r,
    IMA_AD_ERROR: nae,
    IMA_AD_LOADED: c9,
    IMA_AD_LOADER_READY: ent,
    IMA_AD_MANAGER_READY: tae,
    IMA_AD_SEEKED: s5r,
    IMA_AD_SEEKING: o5r,
    IMA_AD_SKIPPED: a5r,
    IMA_ALL_ADS_COMPLETED: nnt,
    IMA_CONTENT_PAUSE_REQUESTED: Phe,
    IMA_CONTENT_RESUME_REQUESTED: Mhe,
    IMA_READY_TO_PLAY: tx,
    IMA_SDK_LOAD_ERROR: Dhe,
    IMA_SDK_LOAD_START: Ihe,
    IMA_SDK_LOAD_SUCCESS: qtt,
  });
function u5r(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o,
      l,
      u = [],
      c = !0,
      d = !1;
    try {
      if (((o = (n = n.call(t)).next), e === 0)) {
        if (Object(n) !== n) return;
        c = !1;
      } else
        for (
          ;
          !(c = (r = o.call(n)).done) && (u.push(r.value), u.length !== e);
          c = !0
        );
    } catch (h) {
      (d = !0), (i = h);
    } finally {
      try {
        if (!c && n.return != null && ((l = n.return()), Object(l) !== l))
          return;
      } finally {
        if (d) throw i;
      }
    }
    return u;
  }
}
function yLe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function vLe(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? yLe(Object(n), !0).forEach(function (r) {
          Vg(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : yLe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function D1() {
  D1 = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = S.method,
      W = E.iterator[L];
    if (W === void 0)
      return (
        (S.delegate = null),
        (L === "throw" &&
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")) ||
          (L !== "return" &&
            ((S.method = "throw"),
            (S.arg = new TypeError(
              "The iterator does not provide a '" + L + "' method"
            )))),
        f
      );
    var F = h(W, E.iterator, S.arg);
    if (F.type === "throw")
      return (S.method = "throw"), (S.arg = F.arg), (S.delegate = null), f;
    var oe = F.arg;
    return oe
      ? oe.done
        ? ((S[E.resultName] = oe.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : oe
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function int(t) {
  return (int =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function bLe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function E6(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        bLe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        bLe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function HR(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function _Le(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, ont(r.key), r);
  }
}
function XR(t, e, n) {
  return (
    e && _Le(t.prototype, e),
    n && _Le(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Vg(t, e, n) {
  return (
    (e = ont(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function iP(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && ant(t, e);
}
function oR(t) {
  return (oR = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function ant(t, e) {
  return (ant = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function c5r() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function hf(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function d5r(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return hf(t);
}
function aP(t) {
  var e = c5r();
  return function () {
    var n,
      r = oR(t);
    if (e) {
      var i = oR(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return d5r(this, n);
  };
}
function h5r(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = oR(t)) !== null; );
  return t;
}
function AL() {
  return (
    (AL =
      typeof Reflect < "u" && Reflect.get
        ? Reflect.get.bind()
        : function (t, e, n) {
            var r = h5r(t, e);
            if (r) {
              var i = Object.getOwnPropertyDescriptor(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    AL.apply(this, arguments)
  );
}
function DC(t, e) {
  return f5r(t) || u5r(t, e) || p5r(t, e) || g5r();
}
function f5r(t) {
  if (Array.isArray(t)) return t;
}
function p5r(t, e) {
  if (t) {
    if (typeof t == "string") return TLe(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? TLe(t, e)
        : void 0
    );
  }
}
function TLe(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function g5r() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function m5r(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function ont(t) {
  var e = m5r(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
function ELe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function d9(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? ELe(Object(n), !0).forEach(function (r) {
          Nl(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : ELe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function P0(t) {
  return (P0 =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function wm(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function SLe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, unt(r.key), r);
  }
}
function km(t, e, n) {
  return (
    e && SLe(t.prototype, e),
    n && SLe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function Nl(t, e, n) {
  return (
    (e = unt(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function $b(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && snt(t, e);
}
function Wp(t) {
  return (Wp = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function snt(t, e) {
  return (snt = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function y5r() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function Go(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function v5r(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return Go(t);
}
function xb(t) {
  var e = y5r();
  return function () {
    var n,
      r = Wp(t);
    if (e) {
      var i = Wp(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return v5r(this, n);
  };
}
function b5r(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = Wp(t)) !== null; );
  return t;
}
function $0() {
  return (
    ($0 =
      typeof Reflect < "u" && Reflect.get
        ? Reflect.get.bind()
        : function (t, e, n) {
            var r = b5r(t, e);
            if (r) {
              var i = Object.getOwnPropertyDescriptor(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    $0.apply(this, arguments)
  );
}
function lnt(t) {
  return _5r(t) || T5r(t) || E5r(t) || S5r();
}
function _5r(t) {
  if (Array.isArray(t)) return rae(t);
}
function T5r(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function E5r(t, e) {
  if (t) {
    if (typeof t == "string") return rae(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? rae(t, e)
        : void 0
    );
  }
}
function rae(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function S5r() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function R5r(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function unt(t) {
  var e = R5r(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
var A5r =
    typeof window < "u" &&
    window.location &&
    window.location.href.indexOf("xgplayerdebugger=1") > -1,
  vJ = {
    info: "color: #525252; background-color: #90ee90;",
    error: "color: #525252; background-color: red;",
    warn: "color: #525252; background-color: yellow; ",
  },
  bJ = "%c[xgplayer]",
  qT = {
    config: { debug: A5r ? 3 : 0 },
    logInfo: function (t) {
      for (
        var e, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
        i < n;
        i++
      )
        r[i - 1] = arguments[i];
      this.config.debug >= 3 &&
        (e = console).log.apply(e, [bJ, vJ.info, t].concat(r));
    },
    logWarn: function (t) {
      for (
        var e, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
        i < n;
        i++
      )
        r[i - 1] = arguments[i];
      this.config.debug >= 1 &&
        (e = console).warn.apply(e, [bJ, vJ.warn, t].concat(r));
    },
    logError: function (t) {
      var e;
      if (!(this.config.debug < 1)) {
        for (
          var n = this.config.debug >= 2 ? "trace" : "error",
            r = arguments.length,
            i = new Array(r > 1 ? r - 1 : 0),
            o = 1;
          o < r;
          o++
        )
          i[o - 1] = arguments[o];
        (e = console)[n].apply(e, [bJ, vJ.error, t].concat(i));
      }
    },
  },
  w5r = (function () {
    function t(e) {
      wm(this, t), (this.bufferedList = e);
    }
    return (
      km(t, [
        {
          key: "start",
          value: function (e) {
            return this.bufferedList[e].start;
          },
        },
        {
          key: "end",
          value: function (e) {
            return this.bufferedList[e].end;
          },
        },
        {
          key: "length",
          get: function () {
            return this.bufferedList.length;
          },
        },
      ]),
      t
    );
  })(),
  dn = {};
function k5r(t, e) {
  for (var n = 0, r = e.length; n < r; n++) if (t.indexOf(e[n]) > -1) return !0;
  return !1;
}
(dn.createDom = function () {
  var t =
      arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "div",
    e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
    n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
    r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "",
    i = document.createElement(t);
  return (
    (i.className = r),
    (i.innerHTML = e),
    Object.keys(n).forEach(function (o) {
      var l = o,
        u = n[o];
      t === "video" || t === "audio" || t === "live-video"
        ? u && i.setAttribute(l, u)
        : i.setAttribute(l, u);
    }),
    i
  );
}),
  (dn.createDomFromHtml = function (t) {
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
      n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
    try {
      var r = document.createElement("div");
      r.innerHTML = t;
      var i = r.children;
      return (
        (r = null),
        i.length > 0
          ? ((i = i[0]),
            n && dn.addClass(i, n),
            e &&
              Object.keys(e).forEach(function (o) {
                i.setAttribute(o, e[o]);
              }),
            i)
          : null
      );
    } catch (o) {
      return qT.logError("util.createDomFromHtml", o), null;
    }
  }),
  (dn.hasClass = function (t, e) {
    if (!t || !e) return !1;
    try {
      return Array.prototype.some.call(t.classList, function (r) {
        return r === e;
      });
    } catch {
      var n =
        t.className && P0(t.className) === "object"
          ? t.getAttribute("class")
          : t.className;
      return n && !!n.match(new RegExp("(\\s|^)" + e + "(\\s|$)"));
    }
  }),
  (dn.addClass = function (t, e) {
    if (t && e)
      try {
        e.replace(/(^\s+|\s+$)/g, "")
          .split(/\s+/g)
          .forEach(function (n) {
            n && t.classList.add(n);
          });
      } catch {
        dn.hasClass(t, e) ||
          (t.className && P0(t.className) === "object"
            ? t.setAttribute("class", t.getAttribute("class") + " " + e)
            : (t.className += " " + e));
      }
  }),
  (dn.removeClass = function (t, e) {
    if (t && e)
      try {
        e.replace(/(^\s+|\s+$)/g, "")
          .split(/\s+/g)
          .forEach(function (n) {
            n && t.classList.remove(n);
          });
      } catch {
        dn.hasClass(t, e) &&
          e.split(/\s+/g).forEach(function (r) {
            var i = new RegExp("(\\s|^)" + r + "(\\s|$)");
            t.className && P0(t.className) === "object"
              ? t.setAttribute("class", t.getAttribute("class").replace(i, " "))
              : (t.className = t.className.replace(i, " "));
          });
      }
  }),
  (dn.toggleClass = function (t, e) {
    t &&
      e.split(/\s+/g).forEach(function (n) {
        dn.hasClass(t, n) ? dn.removeClass(t, n) : dn.addClass(t, n);
      });
  }),
  (dn.classNames = function () {
    for (
      var t = arguments,
        e = [],
        n = function (i) {
          dn.typeOf(t[i]) === "String"
            ? e.push(t[i])
            : dn.typeOf(t[i]) === "Object" &&
              Object.keys(t[i]).map(function (o) {
                t[i][o] && e.push(o);
              });
        },
        r = 0;
      r < arguments.length;
      r++
    )
      n(r);
    return e.join(" ");
  }),
  (dn.findDom = function () {
    var t,
      e =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : document,
      n = arguments.length > 1 ? arguments[1] : void 0;
    try {
      t = e.querySelector(n);
    } catch (r) {
      qT.logError("util.findDom", r),
        n.indexOf("#") === 0 && (t = e.getElementById(n.slice(1)));
    }
    return t;
  }),
  (dn.getCss = function (t, e) {
    return t.currentStyle
      ? t.currentStyle[e]
      : document.defaultView.getComputedStyle(t, !1)[e];
  }),
  (dn.padStart = function (t, e, n) {
    for (
      var r = String(n),
        i = e >> 0,
        o = Math.ceil(i / r.length),
        l = [],
        u = String(t);
      o--;

    )
      l.push(r);
    return l.join("").substring(0, i - u.length) + u;
  }),
  (dn.format = function (t) {
    if (window.isNaN(t)) return "";
    t = Math.round(t);
    var e = dn.padStart(Math.floor(t / 3600), 2, 0),
      n = dn.padStart(Math.floor((t - 3600 * e) / 60), 2, 0),
      r = dn.padStart(Math.floor(t - 3600 * e - 60 * n), 2, 0);
    return (e === "00" ? [n, r] : [e, n, r]).join(":");
  }),
  (dn.event = function (t) {
    if (t.touches) {
      var e = t.touches[0] || t.changedTouches[0];
      (t.clientX = e.clientX || 0),
        (t.clientY = e.clientY || 0),
        (t.offsetX = e.pageX - e.target.offsetLeft),
        (t.offsetY = e.pageY - e.target.offsetTop);
    }
    t._target = t.target || t.srcElement;
  }),
  (dn.typeOf = function (t) {
    return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0];
  }),
  (dn.deepCopy = function (t, e) {
    if (dn.typeOf(e) === "Object" && dn.typeOf(t) === "Object")
      return (
        Object.keys(e).forEach(function (n) {
          dn.typeOf(e[n]) !== "Object" || e[n] instanceof Node
            ? dn.typeOf(e[n]) === "Array"
              ? (t[n] = dn.typeOf(t[n]) === "Array" ? t[n].concat(e[n]) : e[n])
              : (t[n] = e[n])
            : t[n] === void 0 || t[n] === void 0
            ? (t[n] = e[n])
            : dn.deepCopy(t[n], e[n]);
        }),
        t
      );
  }),
  (dn.deepMerge = function (t, e) {
    return (
      Object.keys(e).map(function (n) {
        var r;
        dn.typeOf(e[n]) === "Array" && dn.typeOf(t[n]) === "Array"
          ? dn.typeOf(t[n]) === "Array" && (r = t[n]).push.apply(r, lnt(e[n]))
          : dn.typeOf(t[n]) !== dn.typeOf(e[n]) ||
            t[n] === null ||
            dn.typeOf(t[n]) !== "Object" ||
            e[n] instanceof window.Node
          ? e[n] !== null && (t[n] = e[n])
          : dn.deepMerge(t[n], e[n]);
      }),
      t
    );
  }),
  (dn.getBgImage = function (t) {
    var e = (t.currentStyle || window.getComputedStyle(t, null))
      .backgroundImage;
    if (!e || e === "none") return "";
    var n = document.createElement("a");
    return (n.href = e.replace(/url\("|"\)/g, "")), n.href;
  }),
  (dn.copyDom = function (t) {
    if (t && t.nodeType === 1) {
      var e = document.createElement(t.tagName);
      return (
        Array.prototype.forEach.call(t.attributes, function (n) {
          e.setAttribute(n.name, n.value);
        }),
        t.innerHTML && (e.innerHTML = t.innerHTML),
        e
      );
    }
    return "";
  }),
  (dn.setInterval = function (t, e, n, r) {
    t._interval[e] || (t._interval[e] = window.setInterval(n.bind(t), r));
  }),
  (dn.clearInterval = function (t, e) {
    clearInterval(t._interval[e]), (t._interval[e] = null);
  }),
  (dn.setTimeout = function (t, e, n) {
    t._timers || (t._timers = []);
    var r = setTimeout(function () {
      e(), dn.clearTimeout(t, r);
    }, n);
    return t._timers.push(r), r;
  }),
  (dn.clearTimeout = function (t, e) {
    var n = t._timers;
    if (dn.typeOf(n) === "Array") {
      for (var r = 0; r < n.length; r++)
        if (n[r] === e) {
          n.splice(r, 1), clearTimeout(e);
          break;
        }
    } else clearTimeout(e);
  }),
  (dn.clearAllTimers = function (t) {
    var e = t._timers;
    dn.typeOf(e) === "Array" &&
      (e.map(function (n) {
        clearTimeout(n);
      }),
      (t._timerIds = []));
  }),
  (dn.createImgBtn = function (t, e, n, r) {
    var i,
      o,
      l,
      u = dn.createDom("xg-".concat(t), "", {}, "xgplayer-".concat(t, "-img"));
    return (
      (u.style.backgroundImage = 'url("'.concat(e, '")')),
      n &&
        r &&
        (["px", "rem", "em", "pt", "dp", "vw", "vh", "vm", "%"].every(function (
          c
        ) {
          return (
            !(n.indexOf(c) > -1 && r.indexOf(c) > -1) ||
            ((i = parseFloat(n.slice(0, n.indexOf(c)).trim())),
            (o = parseFloat(r.slice(0, r.indexOf(c)).trim())),
            (l = c),
            !1)
          );
        }),
        (u.style.width = "".concat(i).concat(l)),
        (u.style.height = "".concat(o).concat(l)),
        (u.style.backgroundSize = ""
          .concat(i)
          .concat(l, " ")
          .concat(o)
          .concat(l)),
        (u.style.margin =
          t === "start"
            ? "-"
                .concat(o / 2)
                .concat(l, " auto auto -")
                .concat(i / 2)
                .concat(l)
            : "auto 5px auto 5px")),
      u
    );
  }),
  (dn.Hex2RGBA = function (t, e) {
    var n = [];
    if (/^\#[0-9A-F]{3}$/i.test(t)) {
      var r = "#";
      t.replace(/[0-9A-F]/gi, function (i) {
        r += i + i;
      }),
        (t = r);
    }
    return /^#[0-9A-F]{6}$/i.test(t)
      ? (t.replace(/[0-9A-F]{2}/gi, function (i) {
          n.push(parseInt(i, 16));
        }),
        "rgba(".concat(n.join(","), ", ").concat(e, ")"))
      : "rgba(255, 255, 255, 0.1)";
  }),
  (dn.getFullScreenEl = function () {
    return (
      document.fullscreenElement ||
      document.webkitFullscreenElement ||
      document.mozFullScreenElement ||
      document.msFullscreenElement
    );
  }),
  (dn.checkIsFunction = function (t) {
    return t && typeof t == "function";
  }),
  (dn.checkIsObject = function (t) {
    return t !== null && P0(t) === "object";
  }),
  (dn.hide = function (t) {
    t.style.display = "none";
  }),
  (dn.show = function (t, e) {
    t.style.display = e || "block";
  }),
  (dn.isUndefined = function (t) {
    if (t == null) return !0;
  }),
  (dn.isNotNull = function (t) {
    return t != null;
  }),
  (dn.setStyleFromCsstext = function (t, e) {
    e &&
      (dn.typeOf(e) === "String"
        ? e
            .replace(/\s+/g, "")
            .split(";")
            .map(function (n) {
              if (n) {
                var r = n.split(":");
                r.length > 1 && (t.style[r[0]] = r[1]);
              }
            })
        : Object.keys(e).map(function (n) {
            t.style[n] = e[n];
          }));
  }),
  (dn.filterStyleFromText = function (t) {
    var e =
        arguments.length > 1 && arguments[1] !== void 0
          ? arguments[1]
          : [
              "width",
              "height",
              "top",
              "left",
              "bottom",
              "right",
              "position",
              "z-index",
              "padding",
              "margin",
              "transform",
            ],
      n = t.style.cssText;
    if (!n) return {};
    var r = n.replace(/\s+/g, "").split(";"),
      i = {},
      o = {};
    return (
      r.map(function (l) {
        if (l) {
          var u = l.split(":");
          u.length > 1 && (k5r(u[0], e) ? (i[u[0]] = u[1]) : (o[u[0]] = u[1]));
        }
      }),
      t.setAttribute("style", ""),
      Object.keys(o).map(function (l) {
        t.style[l] = o[l];
      }),
      i
    );
  }),
  (dn.getStyleFromCsstext = function (t) {
    var e = t.style.cssText;
    if (!e) return {};
    var n = e.replace(/\s+/g, "").split(";"),
      r = {};
    return (
      n.map(function (i) {
        if (i) {
          var o = i.split(":");
          o.length > 1 && (r[o[0]] = o[1]);
        }
      }),
      r
    );
  }),
  (dn.preloadImg = function (t) {
    var e =
        arguments.length > 1 && arguments[1] !== void 0
          ? arguments[1]
          : function () {},
      n =
        arguments.length > 2 && arguments[2] !== void 0
          ? arguments[2]
          : function () {};
    if (t) {
      var r = new window.Image();
      (r.onload = function (i) {
        (r = null), e && e(i);
      }),
        (r.onerror = function (i) {
          (r = null), n && n(i);
        }),
        (r.src = t);
    }
  }),
  (dn.stopPropagation = function (t) {
    t && t.stopPropagation();
  }),
  (dn.scrollTop = function () {
    return (
      window.pageYOffset ||
      document.documentElement.scrollTop ||
      document.body.scrollTop ||
      0
    );
  }),
  (dn.scrollLeft = function () {
    return (
      window.pageXOffset ||
      document.documentElement.scrollLeft ||
      document.body.scrollLeft ||
      0
    );
  }),
  (dn.checkTouchSupport = function () {
    return "ontouchstart" in window;
  }),
  (dn.getBuffered2 = function (t) {
    for (
      var e =
          arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.5,
        n = [],
        r = 0;
      r < t.length;
      r++
    )
      n.push({ start: t.start(r) < 0.5 ? 0 : t.start(r), end: t.end(r) });
    n.sort(function (c, d) {
      var h = c.start - d.start;
      return h || d.end - c.end;
    });
    var i = [];
    if (e)
      for (var o = 0; o < n.length; o++) {
        var l = i.length;
        if (l) {
          var u = i[l - 1].end;
          n[o].start - u < e
            ? n[o].end > u && (i[l - 1].end = n[o].end)
            : i.push(n[o]);
        } else i.push(n[o]);
      }
    else i = n;
    return new w5r(i);
  }),
  (dn.getEventPos = function (t) {
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
    return (
      t.touches && t.touches.length > 0 && (t = t.touches[0]),
      {
        x: t.x / e,
        y: t.y / e,
        clientX: t.clientX / e,
        clientY: t.clientY / e,
        offsetX: t.offsetX / e,
        offsetY: t.offsetY / e,
        pageX: t.pageX / e,
        pageY: t.pageY / e,
      }
    );
  }),
  (dn.requestAnimationFrame = function (t) {
    var e =
      window.requestAnimationFrame ||
      window.webkitRequestAnimationFrame ||
      window.mozRequestAnimationFrame ||
      window.oRequestAnimationFrame ||
      window.msRequestAnimationFrame;
    if (e) return e(t);
  }),
  (dn.getHostFromUrl = function (t) {
    if (dn.typeOf(t) !== "String") return "";
    var e = t.split("/"),
      n = "";
    return e.length > 3 && e[2] && (n = e[2]), n;
  }),
  (dn.cancelAnimationFrame = function (t) {
    var e =
      window.cancelAnimationFrame ||
      window.mozCancelAnimationFrame ||
      window.cancelRequestAnimationFrame;
    e && e(t);
  }),
  (dn.isMSE = function (t) {
    return (
      t.media && (t = t.media),
      !!(t && t instanceof HTMLMediaElement) &&
        (/^blob/.test(t.currentSrc) || /^blob/.test(t.src))
    );
  }),
  (dn.isBlob = function (t) {
    return typeof t == "string" && /^blob/.test(t);
  }),
  (dn.generateSessionId = function () {
    var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0,
      e = new Date().getTime();
    try {
      t = parseInt(t);
    } catch {
      t = 0;
    }
    return (
      (e += t),
      window.performance &&
        typeof window.performance.now == "function" &&
        (e += parseInt(window.performance.now())),
      "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (n) {
        var r = (e + 16 * Math.random()) % 16 | 0;
        return (
          (e = Math.floor(e / 16)), (n === "x" ? r : (3 & r) | 8).toString(16)
        );
      })
    );
  }),
  (dn.createEvent = function (t) {
    var e;
    return (
      typeof window.Event == "function"
        ? (e = new Event(t))
        : (e = document.createEvent("Event")).initEvent(t, !0, !0),
      e
    );
  }),
  (dn.adjustTimeByDuration = function (t, e, n) {
    return e && t && (t > e || (n && t < e)) ? e : t;
  }),
  (dn.createPositionBar = function (t, e) {
    var n = dn.createDom("xg-bar", "", { "data-index": -1 }, t);
    return e.appendChild(n), n;
  }),
  (dn.getTransformStyle = function () {
    var t =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : { x: 0, y: 0, scale: 1, rotate: 0 },
      e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "",
      n = {
        scale: "".concat(t.scale || 1),
        translate: "".concat(t.x || 0, "%, ").concat(t.y || 0, "%"),
        rotate: "".concat(t.rotate || 0, "deg"),
      };
    return (
      Object.keys(n).forEach(function (r) {
        var i = new RegExp("".concat(r, "\\([^\\(]+\\)"), "g"),
          o = "".concat(r, "(").concat(n[r], ")");
        i.test(e)
          ? ((i.lastIndex = -1), (e = e.replace(i, o)))
          : (e += "".concat(o, " "));
      }),
      e
    );
  }),
  (dn.convertDeg = function (t) {
    return Math.abs(t) <= 1 ? 360 * t : t % 360;
  }),
  (dn.getIndexByTime = function (t, e) {
    var n = e.length,
      r = -1;
    if (n < 1) return r;
    if (t <= e[0].end || n < 2) r = 0;
    else if (t > e[n - 1].end) r = n - 1;
    else
      for (var i = 1; i < n; i++)
        if (t > e[i - 1].end && t <= e[i].end) {
          r = i;
          break;
        }
    return r;
  }),
  (dn.getOffsetCurrentTime = function (t, e) {
    var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : -1,
      r = -1;
    if ((r = n >= 0 && n < e.length ? n : dn.getIndexByTime(t, e)) < 0)
      return -1;
    var i = e.length,
      o = e[r],
      l = o.start,
      u = o.end,
      c = o.cTime,
      d = o.offset;
    return t < l ? c : t >= l && t <= u ? t - d : t > u && r >= i - 1 ? u : -1;
  }),
  (dn.getCurrentTimeByOffset = function (t, e) {
    var n = -1;
    if (!e || e.length < 0) return t;
    for (var r = 0; r < e.length; r++)
      if (t <= e[r].duration) {
        n = r;
        break;
      }
    if (n !== -1) {
      var i = e[n].start;
      return n - 1 < 0 ? i + t : i + (t - e[n - 1].duration);
    }
    return t;
  });
var RLe = { android: /(Android)\s([\d.]+)/, ios: /(Version)\/([\d.]+)/ },
  I5r = [
    "avc1.42E01E, mp4a.40.2",
    "avc1.58A01E, mp4a.40.2",
    "avc1.4D401E, mp4a.40.2",
    "avc1.64001E, mp4a.40.2",
    "avc1.42E01E",
    "mp4v.20.8",
    "mp4v.20.8, mp4a.40.2",
    "mp4v.20.240, mp4a.40.2",
  ],
  x0 = {
    get device() {
      return x0.os.isPc ? "pc" : "mobile";
    },
    get browser() {
      if (typeof navigator > "u") return "";
      var t = navigator.userAgent.toLowerCase(),
        e = {
          ie: /rv:([\d.]+)\) like gecko/,
          firefox: /firefox\/([\d.]+)/,
          chrome: /chrome\/([\d.]+)/,
          opera: /opera.([\d.]+)/,
          safari: /version\/([\d.]+).*safari/,
        };
      return [].concat(
        Object.keys(e).filter(function (n) {
          return e[n].test(t);
        })
      )[0];
    },
    get os() {
      if (typeof navigator > "u") return {};
      var t = navigator.userAgent,
        e = /(?:Windows Phone)/.test(t),
        n = /(?:SymbianOS)/.test(t) || e,
        r = /(?:Tizen)/gi.test(t),
        i = /(?:Web0S)/gi.test(t),
        o = /(?:Android)/.test(t),
        l = /(?:Firefox)/.test(t),
        u =
          /(?:iPad|PlayBook)/.test(t) ||
          (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1),
        c = u || (o && !/(?:Mobile)/.test(t)) || (l && /(?:Tablet)/.test(t)),
        d = /(?:iPhone)/.test(t) && !c;
      return {
        isTablet: c,
        isPhone: d,
        isIpad: u,
        isIos: d || u,
        isAndroid: o,
        isPc: !(d || o || n || c),
        isSymbian: n,
        isWindowsPhone: e,
        isFireFox: l,
        isTizen: r,
        isWebOS: i,
      };
    },
    get osVersion() {
      if (typeof navigator > "u") return 0;
      var t = navigator.userAgent,
        e = "",
        n = (e = /(?:iPhone)|(?:iPad|PlayBook)/.test(t) ? RLe.ios : RLe.android)
          ? e.exec(t)
          : [];
      if (n && n.length >= 3) {
        var r = n[2].split(".");
        return r.length > 0 ? parseInt(r[0]) : 0;
      }
      return 0;
    },
    get isWeixin() {
      return typeof navigator > "u"
        ? !1
        : !!/(micromessenger)\/([\d.]+)/.exec(
            navigator.userAgent.toLocaleLowerCase()
          );
    },
    isSupportMP4: function () {
      var t = { isSupport: !1, mime: "" };
      if (typeof document > "u") return t;
      if (this.supportResult) return this.supportResult;
      var e = document.createElement("video");
      return (
        typeof e.canPlayType == "function" &&
          I5r.map(function (n) {
            e.canPlayType('video/mp4; codecs="'.concat(n, '"')) ===
              "probably" && ((t.isSupport = !0), (t.mime += "||".concat(n)));
          }),
        (this.supportResult = t),
        (e = null),
        t
      );
    },
    isMSESupport: function () {
      var t =
        arguments.length > 0 && arguments[0] !== void 0
          ? arguments[0]
          : 'video/mp4; codecs="avc1.42E01E,mp4a.40.2"';
      if (typeof MediaSource > "u" || !MediaSource) return !1;
      try {
        return MediaSource.isTypeSupported(t);
      } catch (e) {
        return this._logger.error(t, e), !1;
      }
    },
    isHevcSupported: function () {
      return (
        !(typeof MediaSource > "u" || !MediaSource.isTypeSupported) &&
        (MediaSource.isTypeSupported('video/mp4;codecs="hev1.1.6.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.2.4.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.3.E.L120.90"') ||
          MediaSource.isTypeSupported('video/mp4;codecs="hev1.4.10.L120.90"'))
      );
    },
    probeConfigSupported: function (t) {
      var e = { supported: !1, smooth: !1, powerEfficient: !1 };
      if (!t || typeof navigator > "u") return Promise.resolve(e);
      if (
        navigator.mediaCapabilities &&
        navigator.mediaCapabilities.decodingInfo
      )
        return navigator.mediaCapabilities.decodingInfo(t);
      var n = t.video || {},
        r = t.audio || {};
      try {
        var i = MediaSource.isTypeSupported(n.contentType),
          o = MediaSource.isTypeSupported(r.contentType);
        return Promise.resolve({
          supported: i && o,
          smooth: !1,
          powerEfficient: !1,
        });
      } catch {
        return Promise.resolve(e);
      }
    },
  },
  iae = "play",
  h9 = "ended",
  aae = "pause",
  D5r = "error",
  S6 = "seeked",
  cnt = "timeupdate",
  dnt = "durationchange",
  oae = "volumechange",
  P5r = "loadeddata",
  M5r = "progress",
  Che = "emptied",
  ALe = "autoplay_started",
  C5r = "fullscreen_change",
  $5r = "cssFullscreen_change",
  sae = "video_resize";
function DN(t, e, n) {
  for (
    var r = arguments.length, i = new Array(r > 3 ? r - 3 : 0), o = 3;
    o < r;
    o++
  )
    i[o - 3] = arguments[o];
  var l = e.call.apply(e, [t].concat(i));
  n &&
    typeof n == "function" &&
    (l && l.then
      ? l.then(function () {
          for (var u = arguments.length, c = new Array(u), d = 0; d < u; d++)
            c[d] = arguments[d];
          n.call.apply(n, [t].concat(c));
        })
      : n.call.apply(n, [t].concat(i)));
}
function wLe(t, e) {
  var n =
    arguments.length > 2 && arguments[2] !== void 0
      ? arguments[2]
      : { pre: null, next: null };
  return (
    this.__hooks || (this.__hooks = {}),
    !this.__hooks[t] && (this.__hooks[t] = null),
    function () {
      var r = arguments,
        i = this;
      if (n.pre)
        try {
          var o;
          (o = n.pre).call.apply(
            o,
            [this].concat(Array.prototype.slice.call(arguments))
          );
        } catch (u) {
          throw (
            ((u.message = "[pluginName: "
              .concat(this.pluginName, ":")
              .concat(t, ":pre error] >> ")
              .concat(u.message)),
            u)
          );
        }
      if (this.__hooks && this.__hooks[t])
        try {
          var l = O5r(this, t, e);
          l
            ? l.then
              ? l
                  .then(function (u) {
                    u !== !1 && DN.apply(void 0, [i, e, n.next].concat(lnt(r)));
                  })
                  .catch(function (u) {
                    throw u;
                  })
              : DN.apply(
                  void 0,
                  [this, e, n.next].concat(
                    Array.prototype.slice.call(arguments)
                  )
                )
            : l === void 0 &&
              DN.apply(
                void 0,
                [this, e, n.next].concat(Array.prototype.slice.call(arguments))
              );
        } catch (u) {
          throw (
            ((u.message = "[pluginName: "
              .concat(this.pluginName, ":")
              .concat(t, "] >> ")
              .concat(u.message)),
            u)
          );
        }
      else
        DN.apply(
          void 0,
          [this, e, n.next].concat(Array.prototype.slice.call(arguments))
        );
    }.bind(this)
  );
}
function hnt(t, e) {
  var n = this.__hooks;
  if (!n || !Array.isArray(n[t])) return -1;
  for (var r = n[t], i = 0; i < r.length; i++) if (r[i] === e) return i;
  return -1;
}
function kLe(t, e) {
  var n = this.__hooks;
  if (n)
    return n.hasOwnProperty(t)
      ? (Array.isArray(n[t]) || (n[t] = []),
        hnt.call(this, t, e) === -1 && n[t].push(e),
        !0)
      : (console.warn("has no supported hook which name [".concat(t, "]")), !1);
}
function ILe(t, e) {
  var n = this.__hooks;
  if (n)
    if (Array.isArray(n[t])) {
      var r = n[t],
        i = hnt.call(this, t, e);
      i !== -1 && r.splice(i, 1);
    } else n[t] && (n[t] = null);
}
function x5r(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  (t.__hooks = {}),
    e &&
      e.map(function (n) {
        t.__hooks[n] = null;
      }),
    Object.defineProperty(t, "hooks", {
      get: function () {
        return (
          t.__hooks &&
          Object.keys(t.__hooks).map(function (n) {
            if (t.__hooks[n]) return n;
          })
        );
      },
    });
}
function L5r(t) {
  t.__hooks = null;
}
function O5r(t, e, n) {
  for (
    var r = arguments.length, i = new Array(r > 3 ? r - 3 : 0), o = 3;
    o < r;
    o++
  )
    i[o - 3] = arguments[o];
  if (t.__hooks && Array.isArray(t.__hooks[e])) {
    var l = t.__hooks[e],
      u = -1;
    return function c(d, h, f) {
      for (
        var p = arguments.length, g = new Array(p > 3 ? p - 3 : 0), y = 3;
        y < p;
        y++
      )
        g[y - 3] = arguments[y];
      if ((u++, l.length === 0 || u === l.length))
        return f.call.apply(f, [d, d].concat(g));
      var v = l[u],
        b = v.call.apply(v, [d, d].concat(g));
      return b && b.then
        ? b
            .then(function (w) {
              return w === !1 ? null : c.apply(void 0, [d, h, f].concat(g));
            })
            .catch(function (w) {
              console.warn("[runHooks]".concat(h, " reject"), w.message);
            })
        : b !== !1
        ? c.apply(void 0, [d, h, f].concat(g))
        : void 0;
    }.apply(void 0, [t, e, n].concat(i));
  }
  return n.call.apply(n, [t, t].concat(i));
}
function _J(t, e) {
  qT.logError(
    "["
      .concat(t, "] event or callback cant be undefined or null when call ")
      .concat(e)
  );
}
var G5r = (function () {
    function t(e) {
      wm(this, t),
        dn.checkIsFunction(this.beforeCreate) && this.beforeCreate(e),
        x5r(this),
        (this.__args = e),
        (this.__events = {}),
        (this.__onceEvents = {}),
        (this.config = e.config || {}),
        (this.player = null),
        (this.playerConfig = {}),
        (this.pluginName = ""),
        this.__init(e);
    }
    return (
      km(
        t,
        [
          { key: "beforeCreate", value: function (e) {} },
          { key: "afterCreate", value: function () {} },
          { key: "beforePlayerInit", value: function () {} },
          { key: "onPluginsReady", value: function () {} },
          { key: "afterPlayerInit", value: function () {} },
          { key: "destroy", value: function () {} },
          {
            key: "__init",
            value: function (e) {
              (this.player = e.player),
                (this.playerConfig = e.player && e.player.config),
                (this.pluginName = e.pluginName
                  ? e.pluginName.toLowerCase()
                  : this.constructor.pluginName.toLowerCase()),
                (this.logger = e.player && e.player.logger);
            },
          },
          {
            key: "updateLang",
            value: function (e) {
              e || (e = this.lang);
            },
          },
          {
            key: "lang",
            get: function () {
              return this.player.lang;
            },
          },
          {
            key: "i18n",
            get: function () {
              return this.player.i18n;
            },
          },
          {
            key: "i18nKeys",
            get: function () {
              return this.player.i18nKeys;
            },
          },
          {
            key: "domEventType",
            get: function () {
              var e = dn.checkTouchSupport() ? "touch" : "mouse";
              return (
                !this.playerConfig ||
                  (this.playerConfig.domEventType !== "touch" &&
                    this.playerConfig.domEventType !== "mouse") ||
                  (e = this.playerConfig.domEventType),
                e
              );
            },
          },
          {
            key: "on",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? ((this.__events[e] = n), this.player.on(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      (r.__events[i] = n), r.player.on(i, n);
                    })
                : _J(this.pluginName, "plugin.on(event, callback)");
            },
          },
          {
            key: "once",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? ((this.__onceEvents[e] = n), this.player.once(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      (r.__onceEvents[i] = n), r.player.once(e, n);
                    })
                : _J(this.pluginName, "plugin.once(event, callback)");
            },
          },
          {
            key: "off",
            value: function (e, n) {
              var r = this;
              e && n && this.player
                ? typeof e == "string"
                  ? (delete this.__events[e], this.player.off(e, n))
                  : Array.isArray(e) &&
                    e.forEach(function (i) {
                      delete r.__events[e], r.player.off(i, n);
                    })
                : _J(this.pluginName, "plugin.off(event, callback)");
            },
          },
          {
            key: "offAll",
            value: function () {
              var e = this;
              ["__events", "__onceEvents"].forEach(function (n) {
                Object.keys(e[n]).forEach(function (r) {
                  e[n][r] && e.off(r, e[n][r]), r && delete e[n][r];
                });
              }),
                (this.__events = {}),
                (this.__onceEvents = {});
            },
          },
          {
            key: "emit",
            value: function (e) {
              var n;
              if (this.player) {
                for (
                  var r = arguments.length,
                    i = new Array(r > 1 ? r - 1 : 0),
                    o = 1;
                  o < r;
                  o++
                )
                  i[o - 1] = arguments[o];
                (n = this.player).emit.apply(n, [e].concat(i));
              }
            },
          },
          {
            key: "emitUserAction",
            value: function (e, n) {
              var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : {};
              if (this.player) {
                var i = d9(d9({}, r), {}, { pluginName: this.pluginName });
                this.player.emitUserAction(e, n, i);
              }
            },
          },
          {
            key: "hook",
            value: function (e, n) {
              return wLe.call.apply(
                wLe,
                [this].concat(Array.prototype.slice.call(arguments))
              );
            },
          },
          {
            key: "useHooks",
            value: function (e, n) {
              for (
                var r = arguments.length,
                  i = new Array(r > 2 ? r - 2 : 0),
                  o = 2;
                o < r;
                o++
              )
                i[o - 2] = arguments[o];
              return kLe.call.apply(
                kLe,
                [this].concat(Array.prototype.slice.call(arguments))
              );
            },
          },
          {
            key: "removeHooks",
            value: function (e, n) {
              for (
                var r = arguments.length,
                  i = new Array(r > 2 ? r - 2 : 0),
                  o = 2;
                o < r;
                o++
              )
                i[o - 2] = arguments[o];
              return ILe.call.apply(
                ILe,
                [this].concat(Array.prototype.slice.call(arguments))
              );
            },
          },
          {
            key: "registerPlugin",
            value: function (e) {
              var n =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                r =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : "";
              if (this.player)
                return (
                  r && (n.pluginName = r),
                  this.player.registerPlugin({ plugin: e, options: n })
                );
            },
          },
          {
            key: "getPlugin",
            value: function (e) {
              return this.player ? this.player.getPlugin(e) : null;
            },
          },
          {
            key: "__destroy",
            value: function () {
              var e = this,
                n = this.player,
                r = this.pluginName;
              this.offAll(),
                dn.clearAllTimers(this),
                dn.checkIsFunction(this.destroy) && this.destroy(),
                [
                  "player",
                  "playerConfig",
                  "pluginName",
                  "logger",
                  "__args",
                  "__hooks",
                ].map(function (i) {
                  e[i] = null;
                }),
                n.unRegisterPlugin(r),
                L5r(this);
            },
          },
        ],
        [
          {
            key: "defineGetterOrSetter",
            value: function (e, n) {
              for (var r in n)
                Object.prototype.hasOwnProperty.call(n, r) &&
                  Object.defineProperty(e, r, n[r]);
            },
          },
          {
            key: "defineMethod",
            value: function (e, n) {
              for (var r in n)
                Object.prototype.hasOwnProperty.call(n, r) &&
                  typeof n[r] == "function" &&
                  Object.defineProperty(e, r, {
                    configurable: !0,
                    value: n[r],
                  });
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {};
            },
          },
          {
            key: "pluginName",
            get: function () {
              return "pluginName";
            },
          },
        ]
      ),
      t
    );
  })(),
  N5r = { CONTROLS: "controls", ROOT: "root" },
  XE = {
    ROOT: "root",
    ROOT_LEFT: "rootLeft",
    ROOT_RIGHT: "rootRight",
    ROOT_TOP: "rootTop",
    CONTROLS_LEFT: "controlsLeft",
    CONTROLS_RIGTH: "controlsRight",
    CONTROLS_RIGHT: "controlsRight",
    CONTROLS_CENTER: "controlsCenter",
    CONTROLS: "controls",
  },
  DLe = { ICON_DISABLE: "xg-icon-disable", ICON_HIDE: "xg-icon-hide" };
function TJ(t) {
  return !!t && t.indexOf && /^(?:http|data:|\/)/.test(t);
}
function F5r(t, e) {
  return P0(t) === "object" && t.class && typeof t.class == "string"
    ? "".concat(e, " ").concat(t.class)
    : e;
}
function U5r(t, e) {
  return (
    P0(t) === "object" &&
      t.attr &&
      P0(t.attr) === "object" &&
      Object.keys(t.attr).map(function (n) {
        e[n] = t.attr[n];
      }),
    e
  );
}
function PLe(t, e) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "",
    r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {},
    i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "",
    o = null;
  if (t instanceof window.Element)
    return (
      dn.addClass(t, n),
      Object.keys(r).map(function (l) {
        t.setAttribute(l, r[l]);
      }),
      t
    );
  if (TJ(t) || TJ(t.url))
    return (
      (r.src = TJ(t) ? t : t.url || ""),
      (o = dn.createDom(t.tag || "img", "", r, "xg-img ".concat(n)))
    );
  if (typeof t == "function")
    try {
      return (o = t()) instanceof window.Element
        ? (dn.addClass(o, n),
          Object.keys(r).map(function (l) {
            o.setAttribute(l, r[l]);
          }),
          o)
        : (qT.logWarn(
            "warn>>icons."
              .concat(e, " in config of plugin named [")
              .concat(i, "] is a function mast return an Element Object")
          ),
          null);
    } catch (l) {
      return qT.logError("Plugin named [".concat(i, "]:createIcon"), l), null;
    }
  return typeof t == "string"
    ? dn.createDomFromHtml(t, r, n)
    : (qT.logWarn(
        "warn>>icons."
          .concat(e, " in config of plugin named [")
          .concat(i, "] is invalid")
      ),
      null);
}
function B5r(t, e) {
  var n = e.config.icons || e.playerConfig.icons;
  Object.keys(t).map(function (r) {
    var i = t[r],
      o = i && i.class ? i.class : "",
      l = i && i.attr ? i.attr : {},
      u = null;
    n &&
      n[r] &&
      ((o = F5r(n[r], o)),
      (l = U5r(n[r], l)),
      (u = PLe(n[r], r, o, l, e.pluginName))),
      !u && i && (u = PLe(i.icon ? i.icon : i, l, o, {}, e.pluginName)),
      (e.icons[r] = u);
  });
}
function H5r(t, e) {
  Object.keys(t).map(function (n) {
    Object.defineProperty(e.langText, n, {
      get: function () {
        var r = e.lang,
          i = e.i18n;
        return i[n] ? i[n] : (t[n] && t[n][r]) || "";
      },
    });
  });
}
var oP = (function (t) {
    $b(n, G5r);
    var e = xb(n);
    function n() {
      var r,
        i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      return wm(this, n), ((r = e.call(this, i)).__delegates = []), r;
    }
    return (
      km(
        n,
        [
          {
            key: "__init",
            value: function (r) {
              if (($0(Wp(n.prototype), "__init", this).call(this, r), r.root)) {
                var i = r.root,
                  o = null;
                (this.icons = {}),
                  (this.root = null),
                  (this.parent = null),
                  (this.extraEls = []),
                  B5r(this.registerIcons() || {}, this),
                  (this.langText = {}),
                  H5r(this.registerLanguageTexts() || {}, this);
                var l = "";
                try {
                  l = this.render();
                } catch (d) {
                  throw (
                    (qT.logError(
                      "Plugin:".concat(this.pluginName, ":render"),
                      d
                    ),
                    new Error(
                      "Plugin:"
                        .concat(this.pluginName, ":render:")
                        .concat(d.message)
                    ))
                  );
                }
                if (l)
                  (o = n.insert(l, i, r.index)).setAttribute(
                    "data-index",
                    r.index
                  );
                else {
                  if (!r.tag) return;
                  (o = dn.createDom(r.tag, "", r.attr, r.name)).setAttribute(
                    "data-index",
                    r.index
                  ),
                    i.appendChild(o);
                }
                (this.root = o), (this.parent = i);
                var u = this.config.attr || {},
                  c = this.config.style || {};
                this.setAttr(u),
                  this.setStyle(c),
                  this.config.index &&
                    this.root.setAttribute("data-index", this.config.index),
                  this.__registerChildren();
              }
            },
          },
          {
            key: "__registerChildren",
            value: function () {
              var r = this;
              if (this.root) {
                this._children = [];
                var i = this.children();
                i &&
                  P0(i) === "object" &&
                  Object.keys(i).length > 0 &&
                  Object.keys(i).map(function (o) {
                    var l,
                      u,
                      c = o,
                      d = i[c],
                      h = { root: r.root };
                    typeof d == "function"
                      ? ((l = r.config[c] || {}), (u = d))
                      : P0(d) === "object" &&
                        typeof d.plugin == "function" &&
                        ((l = d.options
                          ? dn.deepCopy(r.config[c] || {}, d.options)
                          : r.config[c] || {}),
                        (u = d.plugin)),
                      (h.config = l),
                      l.index !== void 0 && (h.index = l.index),
                      l.root && (h.root = l.root),
                      r.registerPlugin(u, h, c);
                  });
              }
            },
          },
          {
            key: "updateLang",
            value: function (r) {
              r || (r = this.lang);
              var i = this.root,
                o = this.i18n,
                l = this.langText;
              i &&
                (function u(c, d) {
                  for (var h = 0; h < c.children.length; h++)
                    c.children[h].children.length > 0
                      ? u(c.children[h], d)
                      : d(c.children[h]);
                })(i, function (u) {
                  var c = u.getAttribute && u.getAttribute("lang-key");
                  if (c) {
                    var d = o[c.toUpperCase()] || l[c];
                    d && (u.innerHTML = typeof d == "function" ? d(r) : d);
                  }
                });
            },
          },
          {
            key: "lang",
            get: function () {
              return this.player.lang;
            },
          },
          {
            key: "changeLangTextKey",
            value: function (r) {
              var i =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : "",
                o = this.i18n || {},
                l = this.langText;
              r.setAttribute && r.setAttribute("lang-key", i);
              var u = o[i] || l[i] || "";
              u && (r.innerHTML = u);
            },
          },
          {
            key: "plugins",
            value: function () {
              return this._children;
            },
          },
          {
            key: "disable",
            value: function () {
              (this.config.disable = !0),
                dn.addClass(this.find(".xgplayer-icon"), DLe.ICON_DISABLE);
            },
          },
          {
            key: "enable",
            value: function () {
              (this.config.disable = !1),
                dn.removeClass(this.find(".xgplayer-icon"), DLe.ICON_DISABLE);
            },
          },
          {
            key: "children",
            value: function () {
              return {};
            },
          },
          {
            key: "registerPlugin",
            value: function (r) {
              var i =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                o =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : "";
              i.root = i.root || this.root;
              var l = $0(Wp(n.prototype), "registerPlugin", this).call(
                this,
                r,
                i,
                o
              );
              return this._children.push(l), l;
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return {};
            },
          },
          {
            key: "registerLanguageTexts",
            value: function () {
              return {};
            },
          },
          {
            key: "find",
            value: function (r) {
              if (this.root) return this.root.querySelector(r);
            },
          },
          {
            key: "bind",
            value: function (r, i, o) {
              var l = this;
              if (arguments.length < 3 && typeof i == "function")
                Array.isArray(r)
                  ? r.forEach(function (c) {
                      l.bindEL(c, i);
                    })
                  : this.bindEL(r, i);
              else {
                var u = n.delegate.call(this, this.root, r, i, o);
                this.__delegates = this.__delegates.concat(u);
              }
            },
          },
          {
            key: "unbind",
            value: function (r, i) {
              var o = this;
              if (arguments.length < 3 && typeof i == "function")
                Array.isArray(r)
                  ? r.forEach(function (c) {
                      o.unbindEL(c, i);
                    })
                  : this.unbindEL(r, i);
              else
                for (
                  var l = "".concat(r, "_").concat(i), u = 0;
                  u < this.__delegates.length;
                  u++
                )
                  if (this.__delegates[u].key === l) {
                    this.__delegates[u].destroy(),
                      this.__delegates.splice(u, 1);
                    break;
                  }
            },
          },
          {
            key: "setStyle",
            value: function (r, i) {
              var o = this;
              if (this.root)
                return dn.typeOf(r) === "String"
                  ? (this.root.style[r] = i)
                  : void (
                      dn.typeOf(r) === "Object" &&
                      Object.keys(r).map(function (l) {
                        o.root.style[l] = r[l];
                      })
                    );
            },
          },
          {
            key: "setAttr",
            value: function (r, i) {
              var o = this;
              if (this.root)
                return dn.typeOf(r) === "String"
                  ? this.root.setAttribute(r, i)
                  : void (
                      dn.typeOf(r) === "Object" &&
                      Object.keys(r).map(function (l) {
                        o.root.setAttribute(l, r[l]);
                      })
                    );
            },
          },
          {
            key: "setHtml",
            value: function (r, i) {
              this.root &&
                ((this.root.innerHTML = r), typeof i == "function" && i());
            },
          },
          {
            key: "bindEL",
            value: function (r, i) {
              var o =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
              this.root &&
                "on".concat(r) in this.root &&
                typeof i == "function" &&
                this.root.addEventListener(r, i, o);
            },
          },
          {
            key: "unbindEL",
            value: function (r, i) {
              var o =
                arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
              this.root &&
                "on".concat(r) in this.root &&
                typeof i == "function" &&
                this.root.removeEventListener(r, i, o);
            },
          },
          {
            key: "show",
            value: function (r) {
              if (this.root)
                return (
                  (this.root.style.display = r !== void 0 ? r : "block"),
                  window
                    .getComputedStyle(this.root, null)
                    .getPropertyValue("display") === "none"
                    ? (this.root.style.display = "block")
                    : void 0
                );
            },
          },
          {
            key: "hide",
            value: function () {
              this.root && (this.root.style.display = "none");
            },
          },
          {
            key: "appendChild",
            value: function (r, i) {
              if (!this.root) return null;
              if (
                arguments.length < 2 &&
                arguments[0] instanceof window.Element
              )
                return this.root.appendChild(arguments[0]);
              if (!(i && i instanceof window.Element)) return null;
              try {
                return typeof r == "string"
                  ? this.find(r).appendChild(i)
                  : r.appendChild(i);
              } catch (o) {
                return qT.logError("Plugin:appendChild", o), null;
              }
            },
          },
          {
            key: "render",
            value: function () {
              return "";
            },
          },
          { key: "destroy", value: function () {} },
          {
            key: "__destroy",
            value: function () {
              var r = this,
                i = this.player;
              this.__delegates.map(function (o) {
                o.destroy();
              }),
                (this.__delegates = []),
                this._children instanceof Array &&
                  (this._children.map(function (o) {
                    i.unRegisterPlugin(o.pluginName);
                  }),
                  (this._children = null)),
                this.root &&
                  (this.root.hasOwnProperty("remove")
                    ? this.root.remove()
                    : this.root.parentNode &&
                      this.root.parentNode.removeChild(this.root)),
                $0(Wp(n.prototype), "__destroy", this).call(this),
                (this.icons = {}),
                ["root", "parent"].map(function (o) {
                  r[o] = null;
                }),
                (this.extraEls = []);
            },
          },
        ],
        [
          {
            key: "insert",
            value: function (r, i) {
              var o =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : 0,
                l = i.children.length,
                u = Number(o),
                c = r instanceof window.Node;
              if (l) {
                for (var d = 0, h = null, f = ""; d < l; d++) {
                  h = i.children[d];
                  var p = Number(h.getAttribute("data-index"));
                  if (p >= u) {
                    f = "beforebegin";
                    break;
                  }
                  p < u && (f = "afterend");
                }
                return (
                  c
                    ? f === "afterend"
                      ? i.appendChild(r)
                      : i.insertBefore(r, h)
                    : h.insertAdjacentHTML(f, r),
                  f === "afterend"
                    ? i.children[i.children.length - 1]
                    : i.children[d]
                );
              }
              return (
                c ? i.appendChild(r) : i.insertAdjacentHTML("beforeend", r),
                i.children[i.children.length - 1]
              );
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {};
            },
          },
          {
            key: "delegate",
            value: function (r, i, o, l) {
              var u =
                  arguments.length > 4 &&
                  arguments[4] !== void 0 &&
                  arguments[4],
                c = [];
              if (r instanceof window.Node && typeof l == "function")
                if (Array.isArray(o))
                  o.forEach(function (h) {
                    var f = uSe(r, i, h, l, u);
                    (f.key = "".concat(i, "_").concat(h)), c.push(f);
                  });
                else {
                  var d = uSe(r, i, o, l, u);
                  (d.key = "".concat(i, "_").concat(o)), c.push(d);
                }
              return c;
            },
          },
          {
            key: "ROOT_TYPES",
            get: function () {
              return N5r;
            },
          },
          {
            key: "POSITIONS",
            get: function () {
              return XE;
            },
          },
        ]
      ),
      n
    );
  })(),
  Pp = {
    DEFAULT: "xgplayer",
    DEFAULT_SKIN: "xgplayer-skin-default",
    ENTER: "xgplayer-is-enter",
    PAUSED: "xgplayer-pause",
    PLAYING: "xgplayer-playing",
    ENDED: "xgplayer-ended",
    CANPLAY: "xgplayer-canplay",
    LOADING: "xgplayer-isloading",
    ERROR: "xgplayer-is-error",
    REPLAY: "xgplayer-replay",
    NO_START: "xgplayer-nostart",
    ACTIVE: "xgplayer-active",
    INACTIVE: "xgplayer-inactive",
    FULLSCREEN: "xgplayer-is-fullscreen",
    CSS_FULLSCREEN: "xgplayer-is-cssfullscreen",
    ROTATE_FULLSCREEN: "xgplayer-rotate-fullscreen",
    PARENT_ROTATE_FULLSCREEN: "xgplayer-rotate-parent",
    PARENT_FULLSCREEN: "xgplayer-fullscreen-parent",
    INNER_FULLSCREEN: "xgplayer-fullscreen-inner",
    NO_CONTROLS: "no-controls",
    FLEX_CONTROLS: "flex-controls",
    CONTROLS_FOLLOW: "controls-follow",
    CONTROLS_AUTOHIDE: "controls-autohide",
    TOP_BAR_AUTOHIDE: "top-bar-autohide",
    NOT_ALLOW_AUTOPLAY: "not-allow-autoplay",
    SEEKING: "seeking",
    PC: "xgplayer-pc",
    MOBILE: "xgplayer-mobile",
    MINI: "xgplayer-mini",
  },
  PN = {
    INITIAL: 1,
    READY: 2,
    ATTACHING: 3,
    ATTACHED: 4,
    NOTALLOW: 5,
    RUNNING: 6,
    ENDED: 7,
    DESTROYED: 8,
  };
function $he(t, e, n) {
  try {
    return ' <div class="xg-tips '
      .concat(n ? "hide" : " ", '" lang-key="')
      .concat(
        t.i18nKeys[e],
        `">
    `
      )
      .concat(
        t.i18n[e],
        `
    </div>`
      );
  } catch {
    return '<div class="xg-tips hide"></div>';
  }
}
var xhe = (function (t) {
  $b(n, oP);
  var e = xb(n);
  function n() {
    var r;
    wm(this, n);
    for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
      o[l] = arguments[l];
    return (
      Nl(
        Go((r = e.call.apply(e, [this].concat(o)))),
        "_onMouseenter",
        function (u) {
          r.emit("icon_mouseenter", { pluginName: r.pluginName });
        }
      ),
      Nl(Go(r), "_onMouseLeave", function (u) {
        r.emit("icon_mouseleave", { pluginName: r.pluginName });
      }),
      r
    );
  }
  return (
    km(n, [
      {
        key: "afterCreate",
        value: function () {
          this.bind("mouseenter", this._onMouseenter),
            this.bind("mouseleave", this._onMouseLeave),
            this.config.disable && this.disable();
        },
      },
      {
        key: "destroy",
        value: function () {
          this.unbind("mouseenter", this._onMouseenter),
            this.unbind("mouseleave", this._onMouseLeave);
        },
      },
    ]),
    n
  );
})();
function X5r() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">
  <path fill="#fff" transform="scale(1.3, 1.3)" class='path_full' d="M9,10v1a.9.9,0,0,1-1,1,.9.9,0,0,1-1-1V9A.9.9,0,0,1,8,8h2a.9.9,0,0,1,1,1,.9.9,0,0,1-1,1Zm6,4V13a1,1,0,0,1,2,0v2a.9.9,0,0,1-1,1H14a1,1,0,0,1,0-2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function V5r() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="31" height="40" viewBox="0 -5 31 40">
  <path fill="#fff" transform="scale(1.3, 1.3)" d="M9,10V9a.9.9,0,0,1,1-1,.9.9,0,0,1,1,1v2a.9.9,0,0,1-1,1H8a.9.9,0,0,1-1-1,.9.9,0,0,1,1-1Zm6,4v1a1,1,0,0,1-2,0V13a.9.9,0,0,1,1-1h2a1,1,0,0,1,0,2Zm3-7H6V17H18Zm2,0V17a2,2,0,0,1-2,2H6a2,2,0,0,1-2-2V7A2,2,0,0,1,6,5H18A2,2,0,0,1,20,7Z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var z5r = (function (t) {
  $b(n, xhe);
  var e = xb(n);
  function n() {
    return wm(this, n), e.apply(this, arguments);
  }
  return (
    km(
      n,
      [
        {
          key: "beforeCreate",
          value: function (r) {
            typeof r.player.config.cssFullscreen == "boolean" &&
              (r.config.disable = !r.player.config.cssFullscreen);
          },
        },
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            $0(Wp(n.prototype), "afterCreate", this).call(this),
              this.config.disable ||
                (this.config.target &&
                  (this.playerConfig.fullscreenTarget = this.config.target),
                this.initIcons(),
                this.on($5r, function (i) {
                  r.animate(i);
                }),
                (this.btnClick = this.btnClick.bind(this)),
                (this.handleCssFullscreen = this.hook(
                  "cssFullscreen_change",
                  this.btnClick,
                  {
                    pre: function (i) {
                      i.preventDefault(), i.stopPropagation();
                    },
                  }
                )),
                this.bind(["click", "touchend"], this.handleCssFullscreen));
          },
        },
        {
          key: "initIcons",
          value: function () {
            var r = this.icons,
              i = this.find(".xgplayer-icon");
            i.appendChild(r.cssFullscreen), i.appendChild(r.exitCssFullscreen);
          },
        },
        {
          key: "btnClick",
          value: function (r) {
            r.preventDefault(), r.stopPropagation();
            var i = this.player.isCssfullScreen;
            this.emitUserAction(r, "switch_cssfullscreen", {
              cssfullscreen: i,
            }),
              i
                ? this.player.exitCssFullscreen()
                : this.player.getCssFullscreen();
          },
        },
        {
          key: "animate",
          value: function (r) {
            this.root &&
              (r
                ? this.setAttr("data-state", "full")
                : this.setAttr("data-state", "normal"),
              this.switchTips(r));
          },
        },
        {
          key: "switchTips",
          value: function (r) {
            var i = this.i18nKeys,
              o = this.find(".xg-tips");
            o &&
              this.changeLangTextKey(
                o,
                r ? i.EXITCSSFULLSCREEN_TIPS : i.CSSFULLSCREEN_TIPS
              );
          },
        },
        {
          key: "registerIcons",
          value: function () {
            return {
              cssFullscreen: { icon: X5r, class: "xg-get-cssfull" },
              exitCssFullscreen: { icon: V5r, class: "xg-exit-cssfull" },
            };
          },
        },
        {
          key: "destroy",
          value: function () {
            $0(Wp(n.prototype), "destroy", this).call(this),
              this.unbind(["click", "touchend"], this.btnClick);
          },
        },
        {
          key: "render",
          value: function () {
            if (!this.config.disable)
              return `<xg-icon class='xgplayer-cssfullscreen'>
    <div class="xgplayer-icon">
    </div>
    `.concat(
                $he(this, "CSSFULLSCREEN_TIPS", this.playerConfig.isHideTips),
                `
    </xg-icon>`
              );
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "cssFullscreen";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return {
              position: XE.CONTROLS_RIGHT,
              index: 1,
              disable: !1,
              target: null,
            };
          },
        },
      ]
    ),
    n
  );
})();
function j5r() {
  return new DOMParser().parseFromString(
    `<svg width="32px" height="40px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
        <path d="M11.2374369,14 L17.6187184,7.61871843 C17.9604272,7.27700968 17.9604272,6.72299032 17.6187184,6.38128157 C17.2770097,6.03957281 16.7229903,6.03957281 16.3812816,6.38128157 L9.38128157,13.3812816 C9.03957281,13.7229903 9.03957281,14.2770097 9.38128157,14.6187184 L16.3812816,21.6187184 C16.7229903,21.9604272 17.2770097,21.9604272 17.6187184,21.6187184 C17.9604272,21.2770097 17.9604272,20.7229903 17.6187184,20.3812816 L11.2374369,14 L11.2374369,14 Z" fill="#FFFFFF"></path>
    </g>
</svg>`,
    "image/svg+xml"
  ).firstChild;
}
var W5r = (function (t) {
  $b(n, oP);
  var e = xb(n);
  function n() {
    return wm(this, n), e.apply(this, arguments);
  }
  return (
    km(
      n,
      [
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            this.initIcons(),
              (this.onClick = function (i) {
                i.preventDefault(), i.stopPropagation(), r.config.onClick(i);
              }),
              this.bind(["click", "touchend"], this.onClick);
          },
        },
        {
          key: "registerIcons",
          value: function () {
            return { screenBack: { icon: j5r, class: "xg-fullscreen-back" } };
          },
        },
        {
          key: "initIcons",
          value: function () {
            var r = this.icons;
            this.appendChild(this.root, r.screenBack);
          },
        },
        {
          key: "show",
          value: function () {
            dn.addClass(this.root, "show");
          },
        },
        {
          key: "hide",
          value: function () {
            dn.removeClass(this.root, "show");
          },
        },
        {
          key: "render",
          value: function () {
            return `<xg-icon class="xgplayer-back">
    </xg-icon>`;
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "topbackicon";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return { position: XE.ROOT_TOP, index: 0 };
          },
        },
      ]
    ),
    n
  );
})();
function K5r() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598 214h212v212h-84v-128h-128v-84zM726 726v-128h84v212h-212v-84h128zM214 426v-212h212v84h-128v128h-84zM298 598v128h128v84h-212v-212h84z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function Z5r() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="2 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var Y5r = (function (t) {
  $b(n, xhe);
  var e = xb(n);
  function n() {
    var r;
    wm(this, n);
    for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
      o[l] = arguments[l];
    return (
      Nl(
        Go((r = e.call.apply(e, [this].concat(o)))),
        "_onOrientationChange",
        function (u) {
          r.player.fullscreen &&
            r.config.rotateFullscreen &&
            (window.orientation === 90 || window.orientation === -90
              ? r.player.setRotateDeg(0)
              : r.player.setRotateDeg(90));
        }
      ),
      r
    );
  }
  return (
    km(
      n,
      [
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            $0(Wp(n.prototype), "afterCreate", this).call(this);
            var i = this.config,
              o = this.playerConfig;
            if (!i.disable) {
              i.target &&
                (this.playerConfig.fullscreenTarget = this.config.target);
              var l = dn.getFullScreenEl();
              o.fullscreenTarget === l &&
                this.player.getFullscreen().catch(function (u) {}),
                this.initIcons(),
                (this.handleFullscreen = this.hook(
                  "fullscreenChange",
                  this.toggleFullScreen,
                  {
                    pre: function (u) {
                      var c = r.player.fullscreen;
                      r.emitUserAction(u, "switch_fullscreen", {
                        prop: "fullscreen",
                        from: c,
                        to: !c,
                      });
                    },
                  }
                )),
                this.bind(
                  ".xgplayer-fullscreen",
                  ["touchend", "click"],
                  this.handleFullscreen
                ),
                this.on(C5r, function (u) {
                  var c = r.find(".xg-tips");
                  c &&
                    r.changeLangTextKey(
                      c,
                      u
                        ? r.i18nKeys.EXITFULLSCREEN_TIPS
                        : r.i18nKeys.FULLSCREEN_TIPS
                    ),
                    r.animate(u);
                }),
                this.config.needBackIcon &&
                  (this.topBackIcon = this.player.registerPlugin({
                    plugin: W5r,
                    options: {
                      config: {
                        onClick: function (u) {
                          r.handleFullscreen(u);
                        },
                      },
                    },
                  })),
                x0.device === "mobile" &&
                  window.addEventListener(
                    "orientationchange",
                    this._onOrientationChange
                  );
            }
          },
        },
        {
          key: "registerIcons",
          value: function () {
            return {
              fullscreen: { icon: K5r, class: "xg-get-fullscreen" },
              exitFullscreen: { icon: Z5r, class: "xg-exit-fullscreen" },
            };
          },
        },
        {
          key: "destroy",
          value: function () {
            $0(Wp(n.prototype), "destroy", this).call(this),
              this.unbind(
                ".xgplayer-icon",
                x0.device === "mobile" ? "touchend" : "click",
                this.handleFullscreen
              ),
              x0.device === "mobile" &&
                window.removeEventListener(
                  "orientationchange",
                  this._onOrientationChange
                );
          },
        },
        {
          key: "initIcons",
          value: function () {
            var r = this.icons;
            this.appendChild(".xgplayer-icon", r.fullscreen),
              this.appendChild(".xgplayer-icon", r.exitFullscreen);
          },
        },
        {
          key: "toggleFullScreen",
          value: function (r) {
            r instanceof Event && (r.preventDefault(), r.stopPropagation());
            var i = this.player,
              o = this.config;
            o.useCssFullscreen === !0 ||
            (typeof o.useCssFullscreen == "function" && o.useCssFullscreen())
              ? (i.fullscreen ? i.exitCssFullscreen() : i.getCssFullscreen(),
                this.animate(i.fullscreen))
              : o.rotateFullscreen
              ? (i.fullscreen
                  ? i.exitRotateFullscreen()
                  : i.getRotateFullscreen(),
                this.animate(i.fullscreen))
              : o.switchCallback && typeof o.switchCallback == "function"
              ? o.switchCallback(i.fullscreen)
              : i.fullscreen
              ? (i.exitFullscreen(),
                o.useScreenOrientation && this.unlockScreen())
              : (i.getFullscreen().catch(function (l) {}),
                o.useScreenOrientation &&
                  i.aspectRatio > 1 &&
                  this.lockScreen(o.lockOrientationType));
          },
        },
        {
          key: "animate",
          value: function (r) {
            r
              ? this.setAttr("data-state", "full")
              : this.setAttr("data-state", "normal"),
              this.topBackIcon &&
                (r
                  ? (this.topBackIcon.show(), this.hide())
                  : (this.topBackIcon.hide(), this.show()));
          },
        },
        {
          key: "render",
          value: function () {
            if (!this.config.disable)
              return `<xg-icon class="xgplayer-fullscreen">
    <div class="xgplayer-icon">
    </div>
    `.concat(
                $he(this, "FULLSCREEN_TIPS", this.playerConfig.isHideTips),
                `
    </xg-icon>`
              );
          },
        },
        {
          key: "lockScreen",
          value: function (r) {
            try {
              screen.orientation.lock(r).catch(function (i) {});
            } catch {}
          },
        },
        {
          key: "unlockScreen",
          value: function () {
            try {
              screen.orientation.unlock().catch(function (r) {});
            } catch {}
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "fullscreen";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return {
              position: XE.CONTROLS_RIGHT,
              index: 0,
              useCssFullscreen: !1,
              rotateFullscreen: !1,
              useScreenOrientation: !1,
              lockOrientationType: "landscape",
              switchCallback: null,
              target: null,
              disable: !1,
              needBackIcon: !1,
            };
          },
        },
      ]
    ),
    n
  );
})();
function Q5r() {
  return new DOMParser().parseFromString(
    `<svg class="play" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M576,363L810,512L576,661zM342,214L576,363L576,661L342,810z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function J5r() {
  return new DOMParser().parseFromString(
    `<svg class="pause" xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="3 -4 28 40">
  <path fill="#fff" transform="scale(0.0320625 0.0320625)" d="M598,214h170v596h-170v-596zM256 810v-596h170v596h-170z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var fnt = (function (t) {
    $b(n, xhe);
    var e = xb(n);
    function n() {
      var r;
      wm(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        Nl(
          Go((r = e.call.apply(e, [this].concat(o)))),
          "btnClick",
          function (u) {
            u.preventDefault(), u.stopPropagation();
            var c = Go(r).player;
            return (
              r.emitUserAction(u, "switch_play_pause", {
                prop: "paused",
                from: c.paused,
                to: !c.paused,
              }),
              c.ended
                ? c.replay()
                : c.paused
                ? (c.play(), r.animate(!1))
                : (c.pause(), r.animate(!0)),
              !1
            );
          }
        ),
        r
      );
    }
    return (
      km(
        n,
        [
          {
            key: "afterCreate",
            value: function () {
              $0(Wp(n.prototype), "afterCreate", this).call(this),
                this.config.disable ||
                  (this.initIcons(),
                  this.bind(["touchend", "click"], this.btnClick),
                  this.listenEvents(),
                  this.animate(!0));
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this,
                i = this.player;
              this.on([iae, aae, D5r, Che], function () {
                r.animate(i.paused);
              });
            },
          },
          {
            key: "registerIcons",
            value: function () {
              return {
                play: { icon: Q5r, class: "xg-icon-play" },
                pause: { icon: J5r, class: "xg-icon-pause" },
              };
            },
          },
          {
            key: "initIcons",
            value: function () {
              var r = this.icons;
              this.appendChild(".xgplayer-icon", r.play),
                this.appendChild(".xgplayer-icon", r.pause);
            },
          },
          {
            key: "animate",
            value: function (r) {
              if (this.player) {
                var i = this.i18nKeys,
                  o = this.find(".xg-tips");
                r
                  ? (this.setAttr("data-state", "pause"),
                    o && this.changeLangTextKey(o, i.PLAY_TIPS))
                  : (this.setAttr("data-state", "play"),
                    o && this.changeLangTextKey(o, i.PAUSE_TIPS));
              }
            },
          },
          {
            key: "destroy",
            value: function () {
              $0(Wp(n.prototype), "destroy", this).call(this),
                this.unbind(["touchend", "click"], this.btnClick);
            },
          },
          {
            key: "render",
            value: function () {
              if (!this.config.disable)
                return `<xg-icon class="xgplayer-play">
    <div class="xgplayer-icon">
    </div>
    `.concat(
                  $he(this, "PLAY_TIPS", this.playerConfig.isHideTips),
                  `
    </xg-icon>`
                );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "play";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { position: XE.CONTROLS_LEFT, index: 0, disable: !1 };
            },
          },
        ]
      ),
      n
    );
  })(),
  q5r = [
    {
      tag: "xg-cache",
      className: "xgplayer-progress-cache",
      styleKey: "cachedColor",
    },
    {
      tag: "xg-played",
      className: "xgplayer-progress-played",
      styleKey: "playedColor",
    },
  ],
  eOr = (function () {
    function t(e) {
      wm(this, t),
        (this.fragments = e.fragments || []),
        this.fragments.length === 0 && this.fragments.push({ percent: 1 }),
        (this._callBack = e.actionCallback),
        (this.fragConfig = {
          fragFocusClass: e.fragFocusClass || "inner-focus-point",
          fragAutoFocus: !!e.fragAutoFocus,
          fragClass: e.fragClass || "",
        }),
        (this.style = e.style || {
          playedColor: "",
          cachedColor: "",
          progressColor: "",
        }),
        (this.duration = 0),
        (this.cachedIndex = 0),
        (this.playedIndex = 0),
        (this.focusIndex = -1);
    }
    return (
      km(t, [
        {
          key: "updateDuration",
          value: function (e) {
            var n = this;
            this.duration = e;
            var r = 0,
              i = this.fragments;
            this.fragments = i.map(function (o) {
              return (
                (o.start = parseInt(r, 10)),
                (o.end = parseInt(r + o.percent * n.duration, 10)),
                (o.duration = parseInt(o.percent * n.duration, 10)),
                (r += o.percent * n.duration),
                o
              );
            });
          },
        },
        {
          key: "updateProgress",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : "played",
              n =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : { newIndex: 0, curIndex: 0, millisecond: 0 },
              r = this.progressList,
              i = this.fragments;
            if (!(r.length < 1)) {
              var o = n.newIndex,
                l = n.curIndex,
                u = n.millisecond;
              o !== l &&
                r.map(function (h, f) {
                  f < o
                    ? (h[e].style.width = "100%")
                    : f > o && (h[e].style.width = 0);
                });
              var c = i[o],
                d = u === 0 ? 0 : (u - c.start) / c.duration;
              r[o][e].style.width = d < 0 ? 0 : "".concat(100 * d, "%");
            }
          },
        },
        {
          key: "updateFocus",
          value: function (e) {
            if (this.fragConfig.fragAutoFocus && !(this.fragments.length < 2)) {
              if (e) {
                var n = this.findIndex(1e3 * e.currentTime, this.focusIndex);
                if (n >= 0 && n !== this.focusIndex) {
                  this.focusIndex > -1 && this.unHightLight(this.focusIndex),
                    this.setHightLight(n);
                  var r = {
                    index: n,
                    preIndex: this.focusIndex,
                    fragment: this.fragments[this.focusIndex],
                  };
                  (this.focusIndex = n), this._callBack && this._callBack(r);
                }
              } else if (this.focusIndex > -1) {
                this.unHightLight(this.focusIndex);
                var i = {
                  index: -1,
                  preIndex: this.focusIndex,
                  fragment: null,
                };
                this._callBack && this._callBack(i), (this.focusIndex = -1);
              }
            }
          },
        },
        {
          key: "update",
          value: function () {
            var e =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : { cached: 0, played: 0 },
              n = arguments.length > 1 ? arguments[1] : void 0;
            if (!this.duration || parseInt(1e3 * n, 10) !== this.duration) {
              if (!n && n !== 0) return;
              this.updateDuration(parseInt(1e3 * n, 10));
            }
            var r = this.playedIndex,
              i = this.cachedIndex;
            if (dn.typeOf(e.played) !== "Undefined") {
              var o = this.findIndex(1e3 * e.played, r);
              if (o < 0) return;
              this.updateProgress("played", {
                newIndex: o,
                curIndex: r,
                millisecond: parseInt(1e3 * e.played, 10),
              }),
                (this.playedIndex = o);
            }
            if (dn.typeOf(e.cached) !== "Undefined") {
              var l = this.findIndex(1e3 * e.cached, i);
              if (l < 0) return;
              this.updateProgress("cached", {
                newIndex: l,
                curIndex: i,
                millisecond: parseInt(1e3 * e.cached, 10),
              }),
                (this.cachedIndex = l);
            }
          },
        },
        {
          key: "findIndex",
          value: function (e, n) {
            var r = this.fragments;
            if (!r || r.length === 0) return -1;
            if (r.length === 1) return 0;
            if (n > -1 && n < r.length && e > r[n].start && e < r[n].end)
              return n;
            if (e > r[r.length - 1].start) return r.length - 1;
            for (var i = 0; i < r.length; i++)
              if (e > r[i].start && e <= r[i].end) {
                n = i;
                break;
              }
            return n;
          },
        },
        {
          key: "findHightLight",
          value: function () {
            for (var e = this.root.children, n = 0; n < e.length; n++)
              if (dn.hasClass(e[n], this.fragConfig.fragFocusClass))
                return { dom: e[n], pos: e[n].getBoundingClientRect() };
          },
        },
        {
          key: "findFragment",
          value: function (e) {
            var n = this.root.children;
            return e < 0 || e >= n.length
              ? null
              : { dom: n[e], pos: n[e].getBoundingClientRect() };
          },
        },
        {
          key: "unHightLight",
          value: function () {
            for (var e = this.root.children, n = 0; n < e.length; n++)
              dn.removeClass(e[n], this.fragConfig.fragFocusClass);
          },
        },
        {
          key: "setHightLight",
          value: function (e) {
            var n = this.root.children;
            if (e < n.length)
              return (
                dn.addClass(n[e], this.fragConfig.fragFocusClass),
                { dom: n[e], pos: n[e].getBoundingClientRect() }
              );
          },
        },
        {
          key: "destroy",
          value: function () {
            (this.progressList = null),
              (this.fragments = null),
              (this.root.innerHTML = "");
          },
        },
        {
          key: "reset",
          value: function (e) {
            var n = this;
            if (
              (Object.keys(this.fragConfig).forEach(function (i) {
                e[i] !== void 0 && (n.fragConfig[i] = e[i]);
              }),
              e.fragments)
            ) {
              if (
                ((this.fragments =
                  e.fragments.length === 0 ? [{ percent: 1 }] : e.fragments),
                this.updateDuration(this.duration),
                (this.playedIndex = 0),
                (this.cachedIndex = 0),
                this.root)
              )
                for (var r = this.root.children; r.length > 0; )
                  this.root.removeChild(r[0]);
              this.render();
            }
          },
        },
        {
          key: "render",
          value: function () {
            var e = this,
              n = this.style.progressColor;
            if (
              (this.root ||
                (this.root = dn.createDom(
                  "xg-inners",
                  "",
                  {},
                  "progress-list"
                )),
              this.fragments)
            ) {
              var r = this.fragConfig,
                i = r.fragClass,
                o = r.fragFocusClass;
              this.progressList = this.fragments.map(function (l) {
                var u = dn.createDom(
                  "xg-inner",
                  "",
                  {
                    style: n
                      ? "background:".concat(n, "; flex: ").concat(l.percent)
                      : "flex: ".concat(l.percent),
                  },
                  ""
                    .concat(l.isFocus ? o : "", " xgplayer-progress-inner ")
                    .concat(i)
                );
                return (
                  e.root.appendChild(u),
                  q5r.forEach(function (c) {
                    u.appendChild(
                      dn.createDom(
                        c.tag,
                        "",
                        {
                          style: c.styleKey
                            ? "background: ".concat(
                                e.style[c.styleKey],
                                "; width:0;"
                              )
                            : "width:0;",
                        },
                        c.className
                      )
                    );
                  }),
                  { cached: u.children[0], played: u.children[1] }
                );
              });
            }
            return this.root;
          },
        },
      ]),
      t
    );
  })(),
  MLe = { POINT: "inner-focus-point", HIGHLIGHT: "inner-focus-highlight" },
  pnt = (function (t) {
    $b(n, oP);
    var e = xb(n);
    function n(r) {
      var i;
      return (
        wm(this, n),
        Nl(Go((i = e.call(this, r))), "onMoveOnly", function (o, l) {
          var u = Go(i),
            c = u.pos,
            d = u.config,
            h = u.player,
            f = l;
          if (o) {
            dn.event(o);
            var p = dn.getEventPos(o, h.zoom),
              g = h.rotateDeg === 90 ? p.clientY : p.clientX;
            if (c.moving && Math.abs(c.x - g) < d.miniMoveStep) return;
            (c.moving = !0), (c.x = g), (f = i.computeTime(o, g));
          }
          i.triggerCallbacks("dragmove", f, o), i._updateInnerFocus(f);
        }),
        Nl(Go(i), "onBodyClick", function (o) {
          i.pos.isLocked &&
            ((i.pos.isLocked = !1), o.preventDefault(), o.stopPropagation());
        }),
        Nl(Go(i), "_mouseDownHandler", function (o, l) {
          (i._state.time = l.currentTime),
            i.updateWidth(l.currentTime, l.seekTime, l.percent, 0),
            i._updateInnerFocus(l);
        }),
        Nl(Go(i), "_mouseUpHandler", function (o, l) {
          Go(i).pos.moving &&
            i.updateWidth(l.currentTime, l.seekTime, l.percent, 2);
        }),
        Nl(Go(i), "_mouseMoveHandler", function (o, l) {
          var u = Go(i),
            c = u._state,
            d = u.pos,
            h = u.config,
            f = u.player;
          c.time < l.currentTime ? (l.forward = !0) : (l.forward = !1),
            (c.time = l.currentTime),
            d.isDown &&
              !d.moving &&
              ((d.moving = !0),
              h.isPauseMoving && f.pause(),
              i.triggerCallbacks("dragstart", l, o),
              i.emitUserAction("drag", "dragstart", l)),
            i.updateWidth(l.currentTime, l.seekTime, l.percent, 1),
            i.triggerCallbacks("dragmove", l, o),
            i._updateInnerFocus(l);
        }),
        Nl(Go(i), "onMouseDown", function (o) {
          var l = Go(i),
            u = l._state,
            c = l.player,
            d = l.pos,
            h = l.config,
            f = l.playerConfig,
            p = dn.getEventPos(o, c.zoom),
            g = c.rotateDeg === 90 ? p.clientY : p.clientX;
          if (
            !(
              c.isMini ||
              h.closeMoveSeek ||
              (!f.allowSeekAfterEnded && c.ended)
            )
          ) {
            if (c.duration || c.isPlaying) {
              o.stopPropagation(),
                i.focus(),
                dn.checkIsFunction(f.disableSwipeHandler) &&
                  f.disableSwipeHandler(),
                dn.checkIsFunction(h.onMoveStart) && h.onMoveStart(),
                dn.event(o),
                (d.x = g),
                (d.isDown = !0),
                (d.moving = !1),
                (u.prePlayTime = c.currentTime),
                c.focus({ autoHide: !1 }),
                (i.isProgressMoving = !0),
                dn.addClass(i.progressBtn, "active");
              var y = i.computeTime(o, g);
              return (
                (y.prePlayTime = u.prePlayTime),
                i._mouseDownHandlerHook(o, y),
                o.type === "touchstart"
                  ? (i.root.addEventListener("touchmove", i.onMouseMove),
                    i.root.addEventListener("touchend", i.onMouseUp),
                    i.root.addEventListener("touchcancel", i.onMouseUp))
                  : (i.unbind("mousemove", i.onMoveOnly),
                    document.addEventListener("mousemove", i.onMouseMove, !1),
                    document.addEventListener("mouseup", i.onMouseUp, !1)),
                !0
              );
            }
            c.play();
          }
        }),
        Nl(Go(i), "onMouseUp", function (o) {
          var l = Go(i),
            u = l.player,
            c = l.config,
            d = l.pos,
            h = l.playerConfig,
            f = l._state;
          if (d) {
            o.stopPropagation(),
              o.preventDefault(),
              dn.checkIsFunction(h.enableSwipeHandler) &&
                h.enableSwipeHandler(),
              dn.checkIsFunction(c.onMoveEnd) && c.onMoveEnd(),
              dn.event(o),
              dn.removeClass(i.progressBtn, "active");
            var p = i.computeTime(o, d.x);
            (p.prePlayTime = f.prePlayTime),
              d.moving
                ? (i.triggerCallbacks("dragend", p, o),
                  i.emitUserAction("drag", "dragend", p))
                : (i.triggerCallbacks("click", p, o),
                  i.emitUserAction("click", "click", p)),
              i._mouseUpHandlerHook(o, p),
              (d.moving = !1),
              (d.isDown = !1),
              (d.x = 0),
              (d.y = 0),
              (d.isLocked = !0),
              (f.prePlayTime = 0),
              (f.time = 0);
            var g = o.type;
            g === "touchend" || g === "touchcancel"
              ? (i.root.removeEventListener("touchmove", i.onMouseMove),
                i.root.removeEventListener("touchend", i.onMouseUp),
                i.root.removeEventListener("touchcancel", i.onMouseUp),
                i.blur())
              : (document.removeEventListener("mousemove", i.onMouseMove, !1),
                document.removeEventListener("mouseup", i.onMouseUp, !1),
                d.isEnter
                  ? h.isMobileSimulateMode !== "mobile" &&
                    i.bind("mousemove", i.onMoveOnly)
                  : i.onMouseLeave(o)),
              dn.setTimeout(
                Go(i),
                function () {
                  i.resetSeekState();
                },
                1
              ),
              u.focus();
          }
        }),
        Nl(Go(i), "onMouseMove", function (o) {
          var l = Go(i),
            u = l._state,
            c = l.pos,
            d = l.player,
            h = l.config;
          dn.checkTouchSupport() && o.preventDefault(), dn.event(o);
          var f = dn.getEventPos(o, d.zoom),
            p = d.rotateDeg === 90 ? f.clientY : f.clientX,
            g = Math.abs(c.x - p);
          if (
            !(
              (c.moving && g < h.miniMoveStep) ||
              (!c.moving && g < h.miniStartStep)
            )
          ) {
            c.x = p;
            var y = i.computeTime(o, p);
            (y.prePlayTime = u.prePlayTime), i._mouseMoveHandlerHook(o, y);
          }
        }),
        Nl(Go(i), "onMouseOut", function (o) {
          i.triggerCallbacks("mouseout", null, o);
        }),
        Nl(Go(i), "onMouseOver", function (o) {
          i.triggerCallbacks("mouseover", null, o);
        }),
        Nl(Go(i), "onMouseEnter", function (o) {
          var l = Go(i),
            u = l.player,
            c = l.pos;
          if (
            !(
              c.isDown ||
              c.isEnter ||
              u.isMini ||
              (!u.config.allowSeekAfterEnded && u.ended)
            )
          ) {
            (c.isEnter = !0),
              i.bind("mousemove", i.onMoveOnly),
              i.bind("mouseleave", i.onMouseLeave),
              dn.event(o);
            var d = dn.getEventPos(o, u.zoom),
              h = u.rotateDeg === 90 ? d.clientY : d.clientX,
              f = i.computeTime(o, h);
            i.triggerCallbacks("mouseenter", f, o), i.focus();
          }
        }),
        Nl(Go(i), "onMouseLeave", function (o) {
          i.triggerCallbacks("mouseleave", null, o),
            i.unlock(),
            i._updateInnerFocus(null);
        }),
        Nl(Go(i), "onVideoResize", function () {
          var o = i.pos,
            l = o.x,
            u = o.isDown;
          if (o.isEnter && !u) {
            var c = i.computeTime(null, l);
            i.onMoveOnly(null, c);
          }
        }),
        (i.useable = !1),
        (i.isProgressMoving = !1),
        (i.__dragCallBacks = []),
        (i._state = { now: -1, direc: 0, time: 0, prePlayTime: -1 }),
        (i._disableBlur = !1),
        typeof i.config.isDragingSeek == "boolean" &&
          (console.warn(
            "[XGPLAYER] 'isDragingSeek' is deprecated, please use 'isDraggingSeek' instead"
          ),
          (i.config.isDraggingSeek = i.config.isDragingSeek)),
        i
      );
    }
    return (
      km(
        n,
        [
          {
            key: "offsetDuration",
            get: function () {
              return (
                this.playerConfig.customDuration ||
                this.player.offsetDuration ||
                this.player.duration
              );
            },
          },
          {
            key: "duration",
            get: function () {
              return this.playerConfig.customDuration || this.player.duration;
            },
          },
          {
            key: "timeOffset",
            get: function () {
              return this.playerConfig.timeOffset || 0;
            },
          },
          {
            key: "currentTime",
            get: function () {
              var r = this.player,
                i = r.offsetCurrentTime,
                o = r.currentTime;
              return i >= 0 ? i : o + this.timeOffset;
            },
          },
          {
            key: "changeState",
            value: function () {
              var r =
                !(arguments.length > 0 && arguments[0] !== void 0) ||
                arguments[0];
              this.useable = r;
            },
          },
          {
            key: "show",
            value: function (r) {
              this.root && (this.root.style.display = "flex");
            },
          },
          {
            key: "_initInner",
            value: function () {
              var r = this,
                i =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : [],
                o =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {};
              (i && i.length !== 0) || (i = [{ percent: 1 }]);
              var l = d9(
                d9({ fragments: i }, o),
                {},
                {
                  actionCallback: function (u) {
                    r.emitUserAction("fragment_focus", "fragment_focus", u);
                  },
                }
              );
              this.innerList
                ? this.innerList.reset(l)
                : ((this.innerList = new eOr(l)),
                  this.outer.insertBefore(
                    this.innerList.render(),
                    this.outer.children[0]
                  ),
                  [
                    "findHightLight",
                    "unHightLight",
                    "setHightLight",
                    "findFragment",
                  ].map(function (u) {
                    r[u] = r.innerList[u].bind(r.innerList);
                  }));
            },
          },
          {
            key: "_updateInnerFocus",
            value: function (r) {
              this.innerList && this.innerList.updateFocus(r);
            },
          },
          {
            key: "afterCreate",
            value: function () {
              if (!this.config.disable && !this.playerConfig.isLive) {
                (this.pos = {
                  x: 0,
                  y: 0,
                  moving: !1,
                  isDown: !1,
                  isEnter: !1,
                  isLocked: !1,
                }),
                  (this.outer = this.find("xg-outer"));
                var r = this.config,
                  i = r.fragFocusClass,
                  o = r.fragAutoFocus,
                  l = r.fragClass;
                this._initInner(this.config.fragments, {
                  fragFocusClass: i,
                  fragAutoFocus: o,
                  fragClass: l,
                  style: this.playerConfig.commonStyle || {},
                }),
                  x0.device === "mobile" &&
                    ((this.config.isDraggingSeek = !1), (this.isMobile = !0)),
                  (this.progressBtn = this.find(".xgplayer-progress-btn")),
                  this.listenEvents(),
                  this.bindDomEvents(),
                  this.initCustomStyle();
              }
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this;
              this.on(dnt, function () {
                r.onMouseLeave();
              }),
                this.on(cnt, function () {
                  r.onTimeupdate();
                }),
                this.on(S6, function () {
                  r.onTimeupdate(), r.onCacheUpdate();
                }),
                this.on(M5r, function () {
                  r.onCacheUpdate();
                }),
                this.on(h9, function () {
                  r.onCacheUpdate(!0), r.onTimeupdate(!0), (r._state.now = 0);
                }),
                this.on(Che, function () {
                  r.onReset();
                }),
                this.on(sae, function () {
                  r.onVideoResize();
                });
            },
          },
          {
            key: "setConfig",
            value: function (r) {
              var i = this,
                o = null;
              Object.keys(r).forEach(function (l) {
                (i.config[l] = r[l]), l === "fragments" && (o = r[l]);
              }),
                o && this._initInner(o, r);
            },
          },
          {
            key: "initCustomStyle",
            value: function () {
              var r = (this.playerConfig || {}).commonStyle.sliderBtnStyle,
                i = this.progressBtn;
              r &&
                (typeof r == "string"
                  ? (i.style.boxShadow = r)
                  : P0(r) === "object" &&
                    Object.keys(r).map(function (o) {
                      i.style[o] = r[o];
                    }));
            },
          },
          {
            key: "triggerCallbacks",
            value: function (r, i, o) {
              this.__dragCallBacks.length > 0 &&
                this.__dragCallBacks.map(function (l) {
                  if (l && l.handler && l.type === r)
                    try {
                      l.handler(i, o);
                    } catch (u) {
                      console.error(
                        "[XGPLAYER][triggerCallbacks] ".concat(l, " error"),
                        u
                      );
                    }
                });
            },
          },
          {
            key: "addCallBack",
            value: function (r, i) {
              i &&
                typeof i == "function" &&
                this.__dragCallBacks.push({ type: r, handler: i });
            },
          },
          {
            key: "removeCallBack",
            value: function (r, i) {
              var o = this.__dragCallBacks,
                l = -1;
              o.map(function (u, c) {
                u && u.type === r && u.handler === i && (l = c);
              }),
                l > -1 && o.splice(l, 1);
            },
          },
          {
            key: "unlock",
            value: function () {
              var r = this.player,
                i = this.pos;
              (i.isEnter = !1),
                (i.isLocked = !1),
                r.isMini ||
                  (this.unbind("mousemove", this.onMoveOnly),
                  i.isDown
                    ? this.unbind("mouseleave", this.onMouseLeave)
                    : this.blur());
            },
          },
          {
            key: "bindDomEvents",
            value: function () {
              var r = this.player.config;
              (this._mouseDownHandlerHook = this.hook(
                "dragstart",
                this._mouseDownHandler
              )),
                (this._mouseUpHandlerHook = this.hook(
                  "dragend",
                  this._mouseUpHandler
                )),
                (this._mouseMoveHandlerHook = this.hook(
                  "drag",
                  this._mouseMoveHandler
                )),
                (this.domEventType !== "touch" &&
                  this.domEventType !== "compatible") ||
                  this.root.addEventListener("touchstart", this.onMouseDown),
                (this.domEventType !== "mouse" &&
                  this.domEventType !== "compatible") ||
                  (this.bind("mousedown", this.onMouseDown),
                  r.isMobileSimulateMode !== "mobile" &&
                    this.bind("mouseenter", this.onMouseEnter),
                  this.bind("mouseover", this.onMouseOver),
                  this.bind("mouseout", this.onMouseOut),
                  this.player.root.addEventListener(
                    "click",
                    this.onBodyClick,
                    !0
                  ));
            },
          },
          {
            key: "focus",
            value: function () {
              this.player.controls.pauseAutoHide(),
                dn.addClass(this.root, "active");
            },
          },
          {
            key: "blur",
            value: function () {
              this._disableBlur ||
                (this.player.controls.recoverAutoHide(),
                dn.removeClass(this.root, "active"));
            },
          },
          {
            key: "disableBlur",
            value: function () {
              this._disableBlur = !0;
            },
          },
          {
            key: "enableBlur",
            value: function () {
              this._disableBlur = !1;
            },
          },
          {
            key: "updateWidth",
            value: function (r, i, o, l) {
              var u = this.config,
                c = this.player;
              if (!u.isCloseClickSeek || l !== 0) {
                var d = (i =
                  i >= c.duration
                    ? c.duration - u.endedDiff
                    : Number(i).toFixed(1));
                this.updatePercent(o),
                  this.updateTime(r),
                  (l !== 1 ||
                    (u.isDraggingSeek && c.config.mediaType !== "audio")) &&
                    ((this._state.now = d),
                    (this._state.direc = d > c.currentTime ? 0 : 1),
                    c.seek(d));
              }
            },
          },
          {
            key: "computeTime",
            value: function (r, i) {
              var o,
                l,
                u = this.player,
                c = this.root.getBoundingClientRect(),
                d = c.width,
                h = c.height,
                f = c.top,
                p = c.left,
                g = i;
              u.rotateDeg === 90 ? ((o = h), (l = f)) : ((o = d), (l = p));
              var y = g - l,
                v = (y = y > o ? o : y < 0 ? 0 : y) / o;
              (v = v < 0 ? 0 : v > 1 ? 1 : v),
                Number.isNaN(v) &&
                  (v = this.player.currentTime / this.offsetDuration);
              var b = parseInt(v * this.offsetDuration * 1e3, 10) / 1e3;
              return {
                percent: v,
                currentTime: b,
                seekTime: dn.getCurrentTimeByOffset(b, u.timeSegments),
                offset: y,
                width: o,
                left: l,
                e: r,
              };
            },
          },
          {
            key: "updateTime",
            value: function (r) {
              var i = this.player,
                o = this.duration;
              r > o ? (r = o) : r < 0 && (r = 0);
              var l = i.plugins.time;
              l && l.updateTime(r);
            },
          },
          {
            key: "resetSeekState",
            value: function () {
              this.isProgressMoving = !1;
              var r = this.player.plugins.time;
              r && r.resetActive();
            },
          },
          {
            key: "updatePercent",
            value: function (r, i) {
              if (((this.isProgressMoving = !0), !this.config.disable)) {
                (r = r > 1 ? 1 : r < 0 ? 0 : r),
                  (this.progressBtn.style.left = "".concat(100 * r, "%")),
                  this.innerList.update(
                    { played: r * this.offsetDuration },
                    this.offsetDuration
                  );
                var o = this.player.plugins.miniprogress;
                o &&
                  o.update(
                    { played: r * this.offsetDuration },
                    this.offsetDuration
                  );
              }
            },
          },
          {
            key: "onTimeupdate",
            value: function (r) {
              var i = this.player,
                o = this._state,
                l = this.offsetDuration;
              if (
                !((i.isSeeking && i.media.seeking) || this.isProgressMoving) &&
                i.hasStart
              ) {
                if (o.now > -1) {
                  var u =
                    parseInt(1e3 * o.now, 10) -
                    parseInt(1e3 * i.currentTime, 10);
                  if ((o.direc === 0 && u > 300) || (o.direc === 1 && u > -300))
                    return void (o.now = -1);
                  o.now = -1;
                }
                var c = this.currentTime;
                (c = dn.adjustTimeByDuration(c, l, r)),
                  this.innerList.update({ played: c }, l),
                  (this.progressBtn.style.left = "".concat((c / l) * 100, "%"));
              }
            },
          },
          {
            key: "onCacheUpdate",
            value: function (r) {
              var i = this.player,
                o = this.duration;
              if (i) {
                var l = i.bufferedPoint.end;
                (l = dn.adjustTimeByDuration(l, o, r)),
                  this.innerList.update({ cached: l }, o);
              }
            },
          },
          {
            key: "onReset",
            value: function () {
              this.innerList.update({ played: 0, cached: 0 }, 0),
                (this.progressBtn.style.left = "0%");
            },
          },
          {
            key: "destroy",
            value: function () {
              var r = this.player;
              (this.thumbnailPlugin = null),
                this.innerList.destroy(),
                (this.innerList = null);
              var i = this.domEventType;
              (i !== "touch" && i !== "compatible") ||
                (this.root.removeEventListener("touchstart", this.onMouseDown),
                this.root.removeEventListener("touchmove", this.onMouseMove),
                this.root.removeEventListener("touchend", this.onMouseUp),
                this.root.removeEventListener("touchcancel", this.onMouseUp)),
                (i !== "mouse" && i !== "compatible") ||
                  (this.unbind("mousedown", this.onMouseDown),
                  this.unbind("mouseenter", this.onMouseEnter),
                  this.unbind("mousemove", this.onMoveOnly),
                  this.unbind("mouseleave", this.onMouseLeave),
                  document.removeEventListener(
                    "mousemove",
                    this.onMouseMove,
                    !1
                  ),
                  document.removeEventListener("mouseup", this.onMouseUp, !1),
                  r.root.removeEventListener("click", this.onBodyClick, !0));
            },
          },
          {
            key: "render",
            value: function () {
              if (!this.config.disable && !this.playerConfig.isLive) {
                var r = this.player.controls
                  ? this.player.controls.config.mode
                  : "";
                return `
    <xg-progress class="xgplayer-progress `.concat(
                  r === "bottom" ? "xgplayer-progress-bottom" : "",
                  `">
      <xg-outer class="xgplayer-progress-outer">
        <xg-progress-btn class="xgplayer-progress-btn"></xg-progress-btn>
      </xg-outer>
    </xg-progress>
    `
                );
              }
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "progress";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                position: XE.CONTROLS_CENTER,
                index: 0,
                disable: !1,
                isDraggingSeek: !0,
                closeMoveSeek: !1,
                isPauseMoving: !1,
                isCloseClickSeek: !1,
                fragments: [{ percent: 1 }],
                fragFocusClass: MLe.POINT,
                fragClass: "",
                fragAutoFocus: !1,
                miniMoveStep: 5,
                miniStartStep: 2,
                onMoveStart: function () {},
                onMoveEnd: function () {},
                endedDiff: 0.2,
              };
            },
          },
          {
            key: "FRAGMENT_FOCUS_CLASS",
            get: function () {
              return MLe;
            },
          },
        ]
      ),
      n
    );
  })(),
  gnt = (function (t) {
    $b(n, oP);
    var e = xb(n);
    function n(r) {
      var i;
      return wm(this, n), ((i = e.call(this, r)).isActiving = !1), i;
    }
    return (
      km(
        n,
        [
          {
            key: "duration",
            get: function () {
              var r = this.player,
                i = r.offsetDuration,
                o = r.duration;
              return this.playerConfig.customDuration || i || o;
            },
          },
          {
            key: "currentTime",
            get: function () {
              var r = this.player,
                i = r.offsetCurrentTime,
                o = r.currentTime;
              return i >= 0 ? i : o;
            },
          },
          {
            key: "timeOffset",
            get: function () {
              return this.playerConfig.timeOffset || 0;
            },
          },
          {
            key: "afterCreate",
            value: function () {
              var r = this.player.controls.config.mode;
              (this.mode = r === "flex" ? "flex" : "normal"),
                this.config.disable ||
                  (this.mode === "flex" &&
                    (this.createCenterTime(),
                    (this.root.style.display = "none")),
                  (this.durationDom = this.find(".time-duration")),
                  (this.timeDom = this.find(".time-current")),
                  this.listenEvents());
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this;
              this.on([dnt, S6, cnt], function (i) {
                i.eventName === "durationchange" && (r.isActiving = !1),
                  r.onTimeUpdate();
              }),
                this.on(h9, function () {
                  r.onTimeUpdate(!0);
                }),
                this.on(Che, function () {
                  r.onReset();
                });
            },
          },
          {
            key: "show",
            value: function (r) {
              if (this.mode === "flex")
                return (
                  this.centerCurDom &&
                    (this.centerCurDom.style.display = "block"),
                  void (
                    this.centerDurDom &&
                    (this.centerDurDom.style.display = "block")
                  )
                );
              this.root.style.display = "block";
            },
          },
          {
            key: "hide",
            value: function () {
              if (this.mode === "flex")
                return (
                  this.centerCurDom &&
                    (this.centerCurDom.style.display = "none"),
                  void (
                    this.centerDurDom &&
                    (this.centerDurDom.style.display = "none")
                  )
                );
              this.root.style.display = "none";
            },
          },
          {
            key: "onTimeUpdate",
            value: function (r) {
              var i = this.player,
                o = this.config,
                l = this.duration;
              if (!o.disable && !this.isActiving && i.hasStart) {
                var u = this.currentTime + this.timeOffset;
                (u = dn.adjustTimeByDuration(u, l, r)),
                  this.mode === "flex"
                    ? ((this.centerCurDom.innerHTML = this.minWidthTime(
                        dn.format(u)
                      )),
                      l !== 1 / 0 &&
                        l > 0 &&
                        (this.centerDurDom.innerHTML = dn.format(l)))
                    : ((this.timeDom.innerHTML = this.minWidthTime(
                        dn.format(u)
                      )),
                      l !== 1 / 0 &&
                        l > 0 &&
                        (this.durationDom.innerHTML = dn.format(l)));
              }
            },
          },
          {
            key: "onReset",
            value: function () {
              this.mode === "flex"
                ? ((this.centerCurDom.innerHTML = this.minWidthTime(
                    dn.format(0)
                  )),
                  (this.centerDurDom.innerHTML = dn.format(0)))
                : ((this.timeDom.innerHTML = this.minWidthTime(dn.format(0))),
                  (this.durationDom.innerHTML = dn.format(0)));
            },
          },
          {
            key: "createCenterTime",
            value: function () {
              var r = this.player;
              if (r.controls && r.controls.center) {
                var i = r.controls.center;
                (this.centerCurDom = dn.createDom(
                  "xg-icon",
                  "00:00",
                  {},
                  "xgplayer-time xg-time-left"
                )),
                  (this.centerDurDom = dn.createDom(
                    "xg-icon",
                    "00:00",
                    {},
                    "xgplayer-time xg-time-right"
                  )),
                  i.children.length > 0
                    ? i.insertBefore(this.centerCurDom, i.children[0])
                    : i.appendChild(this.centerCurDom),
                  i.appendChild(this.centerDurDom),
                  (this.extraEls = [this.centerCurDom, this.centerDurDom]);
              }
            },
          },
          {
            key: "afterPlayerInit",
            value: function () {
              var r = this.config;
              this.duration === 1 / 0 || this.playerConfig.isLive
                ? (dn.hide(this.durationDom),
                  dn.hide(this.timeDom),
                  dn.hide(this.find(".time-separator")),
                  dn.show(this.find(".time-live-tag")))
                : dn.hide(this.find(".time-live-tag")),
                r.hide ? this.hide() : this.show();
            },
          },
          {
            key: "changeLiveState",
            value: function (r) {
              r
                ? (dn.hide(this.durationDom),
                  dn.hide(this.timeDom),
                  dn.hide(this.find(".time-separator")),
                  dn.show(this.find(".time-live-tag")))
                : (dn.hide(this.find(".time-live-tag")),
                  dn.show(this.find(".time-separator")),
                  dn.show(this.durationDom),
                  dn.show(this.timeDom));
            },
          },
          {
            key: "updateTime",
            value: function (r) {
              (this.isActiving = !0),
                (!r && r !== 0) ||
                  r > this.duration ||
                  (this.mode !== "flex"
                    ? (this.timeDom.innerHTML = this.minWidthTime(dn.format(r)))
                    : (this.centerCurDom.innerHTML = this.minWidthTime(
                        dn.format(r)
                      )));
            },
          },
          {
            key: "minWidthTime",
            value: function (r) {
              return r
                .split(":")
                .map(function (i) {
                  return '<span class="time-min-width">'.concat(i, "</span>");
                })
                .join(":");
            },
          },
          {
            key: "resetActive",
            value: function () {
              var r = this,
                i = this.player,
                o = function () {
                  r.isActiving = !1;
                };
              this.off(S6, o),
                i.isSeeking && i.media.seeking
                  ? this.once(S6, o)
                  : (this.isActiving = !1);
            },
          },
          {
            key: "destroy",
            value: function () {
              var r = this.player.controls.center;
              this.centerCurDom && r.removeChild(this.centerCurDom),
                (this.centerCurDom = null),
                this.centerDurDom && r.removeChild(this.centerDurDom),
                (this.centerDurDom = null);
            },
          },
          {
            key: "render",
            value: function () {
              if (!this.config.disable)
                return `<xg-icon class="xgplayer-time">
    <span class="time-current">00:00</span>
    <span class="time-separator">/</span>
    <span class="time-duration">00:00</span>
    <span class="time-live-tag">`.concat(
                  this.i18n.LIVE_TIP,
                  `</span>
    </xg-icon>`
                );
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "time";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return { position: XE.CONTROLS_LEFT, index: 2, disable: !1 };
            },
          },
        ]
      ),
      n
    );
  })();
function tOr() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M940.632 837.632l-72.192-72.192c65.114-64.745 105.412-154.386 105.412-253.44s-40.299-188.695-105.396-253.424l-0.016-0.016 72.192-72.192c83.639 83.197 135.401 198.37 135.401 325.632s-51.762 242.434-135.381 325.612l-0.020 0.020zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function nOr() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021zM795.648 693.248l-72.704-72.704c27.756-27.789 44.921-66.162 44.921-108.544s-17.165-80.755-44.922-108.546l0.002 0.002 72.704-72.704c46.713 46.235 75.639 110.363 75.639 181.248s-28.926 135.013-75.617 181.227l-0.021 0.021z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
function rOr() {
  return new DOMParser().parseFromString(
    `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="40" viewBox="0 -10 28 40">
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M358.4 358.4h-204.8v307.2h204.8l256 256v-819.2l-256 256z"></path>
  <path fill="#fff" transform="scale(0.0220625 0.0220625)" d="M920.4 439.808l-108.544-109.056-72.704 72.704 109.568 108.544-109.056 108.544 72.704 72.704 108.032-109.568 108.544 109.056 72.704-72.704-109.568-108.032 109.056-108.544-72.704-72.704-108.032 109.568z"></path>
</svg>
`,
    "image/svg+xml"
  ).firstChild;
}
var iOr = (function (t) {
  $b(n, oP);
  var e = xb(n);
  function n() {
    var r;
    wm(this, n);
    for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
      o[l] = arguments[l];
    return (
      Nl(
        Go((r = e.call.apply(e, [this].concat(o)))),
        "onBarMousedown",
        function (u) {
          var c = Go(r).player,
            d = r.find(".xgplayer-bar");
          dn.event(u);
          var h = d.getBoundingClientRect(),
            f = dn.getEventPos(u, c.zoom),
            p = h.height - (f.clientY - h.top);
          if (((f.h = p), (f.barH = h.height), (r.pos = f), !(p < -2)))
            return (
              r.updateVolumePos(p, u),
              document.addEventListener("mouseup", r.onBarMouseUp),
              (r._d.isStart = !0),
              !1
            );
        }
      ),
      Nl(Go(r), "onBarMouseMove", function (u) {
        var c = Go(r)._d;
        if (c.isStart) {
          var d = Go(r),
            h = d.pos,
            f = d.player;
          u.preventDefault(), u.stopPropagation(), dn.event(u);
          var p = dn.getEventPos(u, f.zoom);
          c.isMoving = !0;
          var g = h.h - p.clientY + h.clientY;
          g > h.barH || r.updateVolumePos(g, u);
        }
      }),
      Nl(Go(r), "onBarMouseUp", function (u) {
        dn.event(u), document.removeEventListener("mouseup", r.onBarMouseUp);
        var c = Go(r)._d;
        (c.isStart = !1), (c.isMoving = !1);
      }),
      Nl(Go(r), "onMouseenter", function (u) {
        (r._d.isActive = !0),
          r.focus(),
          r.emit("icon_mouseenter", { pluginName: r.pluginName });
      }),
      Nl(Go(r), "onMouseleave", function (u) {
        (r._d.isActive = !1),
          r.unFocus(100, !1, u),
          r.emit("icon_mouseleave", { pluginName: r.pluginName });
      }),
      Nl(Go(r), "onVolumeChange", function (u) {
        if (r.player) {
          var c = r.player,
            d = c.muted,
            h = c.volume;
          r._d.isMoving ||
            ((r.find(".xgplayer-drag").style.height =
              d || h === 0 ? "4px" : "".concat(100 * h, "%")),
            r.config.showValueLabel && r.updateVolumeValue()),
            r.animate(d, h);
        }
      }),
      r
    );
  }
  return (
    km(
      n,
      [
        {
          key: "registerIcons",
          value: function () {
            return {
              volumeSmall: { icon: nOr, class: "xg-volume-small" },
              volumeLarge: { icon: tOr, class: "xg-volume" },
              volumeMuted: { icon: rOr, class: "xg-volume-mute" },
            };
          },
        },
        {
          key: "afterCreate",
          value: function () {
            var r = this;
            if (
              ((this._timerId = null),
              (this._d = { isStart: !1, isMoving: !1, isActive: !1 }),
              !this.config.disable)
            ) {
              this.initIcons();
              var i = this.playerConfig,
                o = i.commonStyle,
                l = i.volume;
              o.volumeColor &&
                (this.find(".xgplayer-drag").style.backgroundColor =
                  o.volumeColor),
                (this.changeMutedHandler = this.hook(
                  "mutedChange",
                  function (u) {
                    r.changeMuted(u);
                  },
                  {
                    pre: function (u) {
                      u.preventDefault(), u.stopPropagation();
                    },
                  }
                )),
                (this._onMouseenterHandler = this.hook(
                  "mouseenter",
                  this.onMouseenter
                )),
                (this._onMouseleaveHandler = this.hook(
                  "mouseleave",
                  this.onMouseleave
                )),
                x0.device !== "mobile" &&
                  this.playerConfig.isMobileSimulateMode !== "mobile" &&
                  (this.bind("mouseenter", this._onMouseenterHandler),
                  this.bind(["blur", "mouseleave"], this._onMouseleaveHandler),
                  this.bind(
                    ".xgplayer-slider",
                    "mousedown",
                    this.onBarMousedown
                  ),
                  this.bind(
                    ".xgplayer-slider",
                    "mousemove",
                    this.onBarMouseMove
                  ),
                  this.bind(".xgplayer-slider", "mouseup", this.onBarMouseUp)),
                this.bind(
                  ".xgplayer-icon",
                  ["touchend", "click"],
                  this.changeMutedHandler
                ),
                this.on(oae, this.onVolumeChange),
                this.once(P5r, this.onVolumeChange),
                dn.typeOf(l) !== "Number" &&
                  (this.player.volume = this.config.default),
                this.onVolumeChange();
            }
          },
        },
        {
          key: "updateVolumePos",
          value: function (r, i) {
            var o = this.player,
              l = this.find(".xgplayer-drag"),
              u = this.find(".xgplayer-bar");
            if (u && l) {
              var c = parseInt(
                (r / u.getBoundingClientRect().height) * 1e3,
                10
              );
              l.style.height = "".concat(r, "px");
              var d = Math.max(Math.min(c / 1e3, 1), 0),
                h = { volume: { from: o.volume, to: d } };
              o.muted && (h.muted = { from: !0, to: !1 }),
                this.emitUserAction(i, "change_volume", {
                  muted: o.muted,
                  volume: o.volume,
                  props: h,
                }),
                (o.volume = Math.max(Math.min(c / 1e3, 1), 0)),
                o.muted && (o.muted = !1),
                this.config.showValueLabel && this.updateVolumeValue();
            }
          },
        },
        {
          key: "updateVolumeValue",
          value: function () {
            var r = this.player,
              i = r.volume,
              o = r.muted,
              l = this.find(".xgplayer-value-label"),
              u = Math.max(Math.min(i, 1), 0);
            l.innerText = o ? 0 : Math.round(100 * u);
          },
        },
        {
          key: "focus",
          value: function () {
            this.player.focus({ autoHide: !1 }),
              this._timerId &&
                (dn.clearTimeout(this, this._timerId), (this._timerId = null)),
              dn.addClass(this.root, "slide-show");
          },
        },
        {
          key: "unFocus",
          value: function () {
            var r = this,
              i =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : 100,
              o =
                !(arguments.length > 1 && arguments[1] !== void 0) ||
                arguments[1],
              l = arguments.length > 2 ? arguments[2] : void 0,
              u = this._d,
              c = this.player;
            u.isActive ||
              (this._timerId &&
                (dn.clearTimeout(this, this._timerId), (this._timerId = null)),
              (this._timerId = dn.setTimeout(
                this,
                function () {
                  u.isActive ||
                    (o ? c.blur() : c.focus(),
                    dn.removeClass(r.root, "slide-show"),
                    u.isStart && r.onBarMouseUp(l)),
                    (r._timerId = null);
                },
                i
              )));
          },
        },
        {
          key: "changeMuted",
          value: function (r) {
            r && r.stopPropagation();
            var i = this.player;
            this._d.isStart && this.onBarMouseUp(r),
              this.emitUserAction(r, "change_muted", {
                muted: i.muted,
                volume: i.volume,
                props: { muted: { from: i.muted, to: !i.muted } },
              }),
              i.volume > 0 && (i.muted = !i.muted),
              i.volume < 0.01 && (i.volume = this.config.miniVolume);
          },
        },
        {
          key: "animate",
          value: function (r, i) {
            r || i === 0
              ? this.setAttr("data-state", "mute")
              : i < 0.5 && this.icons.volumeSmall
              ? this.setAttr("data-state", "small")
              : this.setAttr("data-state", "normal");
          },
        },
        {
          key: "initIcons",
          value: function () {
            var r = this.icons;
            this.appendChild(".xgplayer-icon", r.volumeSmall),
              this.appendChild(".xgplayer-icon", r.volumeLarge),
              this.appendChild(".xgplayer-icon", r.volumeMuted);
          },
        },
        {
          key: "destroy",
          value: function () {
            this._timerId &&
              (dn.clearTimeout(this, this._timerId), (this._timerId = null)),
              this.unbind("mouseenter", this.onMouseenter),
              this.unbind(["blur", "mouseleave"], this.onMouseleave),
              this.unbind(".xgplayer-slider", "mousedown", this.onBarMousedown),
              this.unbind(".xgplayer-slider", "mousemove", this.onBarMouseMove),
              this.unbind(".xgplayer-slider", "mouseup", this.onBarMouseUp),
              document.removeEventListener("mouseup", this.onBarMouseUp),
              this.unbind(
                ".xgplayer-icon",
                x0.device === "mobile" ? "touchend" : "click",
                this.changeMutedHandler
              );
          },
        },
        {
          key: "render",
          value: function () {
            if (!this.config.disable) {
              var r = this.config.default || this.player.volume,
                i = this.config.showValueLabel;
              return `
    <xg-icon class="xgplayer-volume" data-state="normal">
      <div class="xgplayer-icon">
      </div>
      <xg-slider class="xgplayer-slider">
        `
                .concat(
                  i
                    ? '<div class="xgplayer-value-label">'.concat(
                        100 * r,
                        "</div>"
                      )
                    : "",
                  `
        <div class="xgplayer-bar">
          <xg-drag class="xgplayer-drag" style="height: `
                )
                .concat(
                  100 * r,
                  `%"></xg-drag>
        </div>
      </xg-slider>
    </xg-icon>`
                );
            }
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "volume";
          },
        },
        {
          key: "defaultConfig",
          get: function () {
            return {
              position: XE.CONTROLS_RIGHT,
              index: 1,
              disable: !1,
              showValueLabel: !1,
              default: 0.6,
              miniVolume: 0.2,
            };
          },
        },
      ]
    ),
    n
  );
})();
function f9(t) {
  return (f9 =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function aOr(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function CLe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, mnt(r.key), r);
  }
}
function oOr(t, e, n) {
  return (
    e && CLe(t.prototype, e),
    n && CLe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function sOr(t, e, n) {
  return (
    (e = mnt(e)) in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function lOr(t, e) {
  if (typeof t != "object" || t === null) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (typeof r != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function mnt(t) {
  var e = lOr(t, "string");
  return typeof e == "symbol" ? e : String(e);
}
var MN = { DEBUG: 1, LOG: 2, WARN: 3, ERROR: 4 },
  uOr = 204800,
  cOr = ["Boolean", "Number", "String", "Undefined", "Null", "Date", "Object"],
  GH = (function () {
    function t(e, n) {
      aOr(this, t),
        (this.name = e || ""),
        (this._prefix = "[".concat(this.name, "]")),
        (this.logCacheLevel = (n == null ? void 0 : n.logCacheLevel) || 3),
        (this.logMaxSize = (n == null ? void 0 : n.logMaxSize) || uOr),
        (this.logSize = 0),
        (this.logTextArray = []);
    }
    return (
      oOr(
        t,
        [
          {
            key: "debug",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [MN.DEBUG].concat(r)),
                t.disabled ||
                  (e = console).debug.apply(
                    e,
                    ["[".concat(UM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "log",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [MN.LOG].concat(r)),
                t.disabled ||
                  (e = console).log.apply(
                    e,
                    ["[".concat(UM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "warn",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [MN.WARN].concat(r)),
                t.disabled ||
                  (e = console).warn.apply(
                    e,
                    ["[".concat(UM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "error",
            value: function () {
              for (
                var e, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              this.logCache.apply(this, [MN.ERROR].concat(r)),
                t.disabled ||
                  (e = console).error.apply(
                    e,
                    ["[".concat(UM(), "]"), this._prefix].concat(r)
                  );
            },
          },
          {
            key: "logCache",
            value: function (e) {
              if (!(e < this.logCacheLevel)) {
                var n = "";
                try {
                  for (
                    var r = arguments.length,
                      i = new Array(r > 1 ? r - 1 : 0),
                      o = 1;
                    o < r;
                    o++
                  )
                    i[o - 1] = arguments[o];
                  var l = i.map(function (c) {
                    return ynt(c);
                  });
                  n = "[".concat(UM(), "]") + this._prefix + JSON.stringify(l);
                } catch {
                  return;
                }
                if (
                  (e >= this.logCacheLevel &&
                    ((this.logSize += n.length), this.logTextArray.push(n)),
                  this.logSize > this.logMaxSize)
                ) {
                  var u = this.logTextArray.shift();
                  this.logSize -= u.length;
                }
              }
            },
          },
          {
            key: "getLogCache",
            value: function () {
              var e = this.logTextArray.join(`
`);
              return this.reset(), e;
            },
          },
          {
            key: "reset",
            value: function () {
              (this.logTextArray = []), (this.logSize = 0);
            },
          },
          {
            key: "table",
            value: function () {
              var e;
              t.disabled ||
                (console.group(this._prefix),
                (e = console).table.apply(e, arguments),
                console.groupEnd());
            },
          },
          {
            key: "setLogLevel",
            value: function (e) {
              this.logCacheLevel = e;
            },
          },
        ],
        [
          {
            key: "enable",
            value: function () {
              t.disabled = !1;
            },
          },
          {
            key: "disable",
            value: function () {
              t.disabled = !0;
            },
          },
        ]
      ),
      t
    );
  })();
function UM() {
  return new Date().toLocaleString();
}
function dOr(t) {
  if (f9(t) !== "object") return t;
  var e = Object.prototype.toString.call(t).slice(8, -1);
  switch (e) {
    case "Array":
    case "Uint8Array":
    case "ArrayBuffer":
      return e + "[" + t.length + "]";
    case "Object":
      return "{}";
    default:
      return e;
  }
}
function ynt(t, e, n) {
  n || (n = 1), e || (e = 2);
  var r = {};
  if (!t || f9(t) !== "object") return t;
  var i = Object.prototype.toString.call(t).slice(8, -1);
  if (!cOr.includes(i)) return i;
  if (!(n > e)) {
    for (var o in t)
      Object.prototype.hasOwnProperty.call(t, o) &&
        (n === e
          ? (r[o] = dOr(t[o]))
          : f9(t[o]) === "object"
          ? (r[o] = ynt(t[o], e, n + 1))
          : (r[o] = t[o]));
    return r;
  }
}
function hOr() {
  var t,
    e,
    n = new Promise(function (r, i) {
      (t = r), (e = i);
    });
  return (
    (n.used = !1),
    (n.resolve = function () {
      return (n.used = !0), t.apply(void 0, arguments);
    }),
    (n.reject = function () {
      return (n.used = !0), e.apply(void 0, arguments);
    }),
    n
  );
}
sOr(GH, "disabled", !0);
var fOr = new Blob(
    [
      new Uint8Array([
        255, 227, 24, 196, 0, 0, 0, 3, 72, 1, 64, 0, 0, 4, 132, 16, 31, 227,
        192, 225, 76, 255, 67, 12, 255, 221, 27, 255, 228, 97, 73, 63, 255, 195,
        131, 69, 192, 232, 223, 255, 255, 207, 102, 239, 255, 255, 255, 101,
        158, 206, 70, 20, 59, 255, 254, 95, 70, 149, 66, 4, 16, 128, 0, 2, 2,
        32, 240, 138, 255, 36, 106, 183, 255, 227, 24, 196, 59, 11, 34, 62, 80,
        49, 135, 40, 0, 253, 29, 191, 209, 200, 141, 71, 7, 255, 252, 152, 74,
        15, 130, 33, 185, 6, 63, 255, 252, 195, 70, 203, 86, 53, 15, 255, 255,
        247, 103, 76, 121, 64, 32, 47, 255, 34, 227, 194, 209, 138, 76, 65, 77,
        69, 51, 46, 57, 55, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
        255, 227, 24, 196, 73, 13, 153, 210, 100, 81, 135, 56, 0, 170, 170, 170,
        170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
        170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
        170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
        170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170,
      ]),
    ],
    { type: "audio/mpeg" }
  ),
  pOr = new Blob(
    [
      new Uint8Array([
        0, 0, 0, 28, 102, 116, 121, 112, 105, 115, 111, 109, 0, 0, 2, 0, 105,
        115, 111, 109, 105, 115, 111, 50, 109, 112, 52, 49, 0, 0, 0, 8, 102,
        114, 101, 101, 0, 0, 2, 239, 109, 100, 97, 116, 33, 16, 5, 32, 164, 27,
        255, 192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 55, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 112, 33, 16, 5, 32, 164, 27, 255, 192, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55,
        167, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        112, 0, 0, 2, 194, 109, 111, 111, 118, 0, 0, 0, 108, 109, 118, 104, 100,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 232, 0, 0, 0, 47, 0, 1, 0,
        0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 3, 0, 0, 1, 236, 116, 114, 97, 107, 0, 0, 0, 92, 116, 107,
        104, 100, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
        0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 101, 100,
        116, 115, 0, 0, 0, 28, 101, 108, 115, 116, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
        0, 47, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 100, 109, 100, 105, 97, 0, 0, 0,
        32, 109, 100, 104, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172,
        68, 0, 0, 8, 0, 85, 196, 0, 0, 0, 0, 0, 45, 104, 100, 108, 114, 0, 0, 0,
        0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0, 0, 0, 1, 15,
        109, 105, 110, 102, 0, 0, 0, 16, 115, 109, 104, 100, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 36, 100, 105, 110, 102, 0, 0, 0, 28, 100, 114, 101, 102,
        0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1, 0,
        0, 0, 211, 115, 116, 98, 108, 0, 0, 0, 103, 115, 116, 115, 100, 0, 0, 0,
        0, 0, 0, 0, 1, 0, 0, 0, 87, 109, 112, 52, 97, 0, 0, 0, 0, 0, 0, 0, 1, 0,
        0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 16, 0, 0, 0, 0, 172, 68, 0, 0, 0, 0, 0,
        51, 101, 115, 100, 115, 0, 0, 0, 0, 3, 128, 128, 128, 34, 0, 2, 0, 4,
        128, 128, 128, 20, 64, 21, 0, 0, 0, 0, 1, 244, 0, 0, 1, 243, 249, 5,
        128, 128, 128, 2, 18, 16, 6, 128, 128, 128, 1, 2, 0, 0, 0, 24, 115, 116,
        116, 115, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 4, 0, 0, 0, 0, 28,
        115, 116, 115, 99, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0,
        0, 1, 0, 0, 0, 28, 115, 116, 115, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        2, 0, 0, 1, 115, 0, 0, 1, 116, 0, 0, 0, 20, 115, 116, 99, 111, 0, 0, 0,
        0, 0, 0, 0, 1, 0, 0, 0, 44, 0, 0, 0, 98, 117, 100, 116, 97, 0, 0, 0, 90,
        109, 101, 116, 97, 0, 0, 0, 0, 0, 0, 0, 33, 104, 100, 108, 114, 0, 0, 0,
        0, 0, 0, 0, 0, 109, 100, 105, 114, 97, 112, 112, 108, 0, 0, 0, 0, 0, 0,
        0, 0, 0, 0, 0, 0, 45, 105, 108, 115, 116, 0, 0, 0, 37, 169, 116, 111,
        111, 0, 0, 0, 29, 100, 97, 116, 97, 0, 0, 0, 1, 0, 0, 0, 0, 76, 97, 118,
        102, 53, 54, 46, 52, 48, 46, 49, 48, 49,
      ]),
    ],
    { type: "video/mp4" }
  );
function vnt(t) {
  return Object.assign({ muted: !1, timeout: 250, inline: !1 }, t);
}
function bnt(t, e) {
  var n = t.muted,
    r = t.timeout,
    i = t.inline,
    o = e(),
    l = o.element,
    u = o.source,
    c = void 0,
    d = void 0,
    h = void 0;
  return (
    (l.muted = n),
    n === !0 && l.setAttribute("muted", "muted"),
    i === !0 && l.setAttribute("playsinline", "playsinline"),
    (l.src = u),
    new Promise(function (f) {
      (c = l.play()),
        (d = setTimeout(function () {
          h(!1, new Error("Timeout " + r + " ms has been reached"));
        }, r)),
        (h = function (p) {
          var g =
            arguments.length > 1 && arguments[1] !== void 0
              ? arguments[1]
              : null;
          l.remove(),
            (l.srcObject = null),
            clearTimeout(d),
            f({ result: p, error: g });
        }),
        c !== void 0
          ? c
              .then(function () {
                return h(!0);
              })
              .catch(function (p) {
                return h(!1, p);
              })
          : h(!0);
    })
  );
}
function gOr(t) {
  return bnt((t = vnt(t)), function () {
    return {
      element: document.createElement("video"),
      source: URL.createObjectURL(pOr),
    };
  });
}
function mOr(t) {
  return bnt((t = vnt(t)), function () {
    return {
      element: document.createElement("audio"),
      source: URL.createObjectURL(fOr),
    };
  });
}
var $Le = { audio: mOr, video: gOr },
  EJ = new GH("AdsPluginBaseAdManager"),
  yOr = (function (t) {
    iP(n, OVe.EventEmitter);
    var e = aP(n);
    function n() {
      var r,
        i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      return (
        HR(this, n),
        ((r = e.call(this)).options = i),
        (r.config = i.config || {}),
        (r.plugin = i.plugin),
        (r.player = i.plugin.player),
        (r.mediaElement = r.player.media || r.player.video),
        (r.isLinearAdRunning = !1),
        (r._shouldBlockVideoContent = !1),
        (r._isAdPaused = !0),
        (r._isMediaEnded = !1),
        (r.context = { currentTime: 0, duration: 0 }),
        r
      );
    }
    return (
      XR(n, [
        {
          key: "currentTime",
          get: function () {
            return this.context.currentTime;
          },
        },
        {
          key: "duration",
          get: function () {
            return this.context.duration;
          },
        },
        {
          key: "paused",
          get: function () {
            return this._isAdPaused;
          },
        },
        {
          key: "shouldBlockVideoContent",
          get: function () {
            return (
              !x0.os.isTizen &&
              !x0.os.isWebOS &&
              (this.isLinearAdRunning || this._shouldBlockVideoContent)
            );
          },
          set: function (r) {
            this._shouldBlockVideoContent = r;
          },
        },
        {
          key: "updateConfig",
          value: function () {
            var r =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : {};
            r
              ? (this.config = vLe(vLe({}, this.config), r))
              : EJ.warn("config is empty");
          },
        },
        {
          key: "isFullScreen",
          value: function () {
            return !!this.player.fullscreen;
          },
        },
        {
          key: "destroy",
          value: function () {
            this.removeAllListeners();
          },
        },
        {
          key: "tryContentPlay",
          value: function () {
            var r = this.player,
              i = r.play();
            i !== void 0 && i && i.then
              ? i
                  .then(function () {
                    EJ.log("content play"),
                      r.removeClass(Pp.NOT_ALLOW_AUTOPLAY),
                      r.addClass(Pp.PLAYING),
                      r.state < PN.RUNNING &&
                        (r.setState(PN.RUNNING), r.emit(ALe));
                  })
                  .catch(function (o) {
                    if (
                      (EJ.error("content play error", o),
                      r.media && r.media.error)
                    )
                      return r.onError(), void r.removeClass(Pp.ENTER);
                  })
              : r.state < PN.RUNNING &&
                (r.setState(PN.RUNNING),
                r.removeClass(Pp.NOT_ALLOW_AUTOPLAY),
                r.removeClass(Pp.NO_START),
                r.removeClass(Pp.ENTER),
                r.addClass(Pp.PLAYING),
                r.emit(ALe));
          },
        },
      ]),
      n
    );
  })(),
  H2 = new GH("AdsPluginImaAdManager"),
  SJ = "xgplayer-ads-playing",
  vOr = (function (t) {
    iP(o, yOr);
    var e,
      n,
      r,
      i = aP(o);
    function o() {
      var l,
        u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      return (
        HR(this, o),
        Vg(hf((l = i.call(this, u))), "_onMediaEnded", function () {
          var c;
          l.isLinearAdRunning ||
            ((l._isMediaEnded = !0),
            (c = l.adsLoader) === null || c === void 0 || c.contentComplete());
        }),
        Vg(hf(l), "_onMediaResize", function () {
          var c,
            d = hf(l).player,
            h = l.isFullScreen()
              ? google.ima.ViewMode.FULLSCREEN
              : google.ima.ViewMode.NORMAL;
          (c = l.adsManager) === null ||
            c === void 0 ||
            c.resize(d.sizeInfo.width, d.sizeInfo.height, h);
        }),
        Vg(hf(l), "_onMediaPlay", function () {
          l._mediaPlayed = !0;
        }),
        Vg(hf(l), "_onMediaPause", function () {
          l._mediaPlayed = !1;
        }),
        Vg(hf(l), "_onMediaVolumeChange", function () {
          var c;
          (c = l.adsManager) === null ||
            c === void 0 ||
            c.setVolume(l.player.muted ? 0 : l.player.volume);
        }),
        Vg(hf(l), "_onAdsManagerLoaded", function (c) {
          var d = new google.ima.AdsRenderingSettings();
          (d.restoreCustomPlaybackStateOnAdBreakComplete = !0),
            (d.enablePreloading = !0);
          var h = (l.adsManager = c.getAdsManager(l.mediaElement, d));
          H2.log("AdManager Loaded", h);
          var f = h.getCuePoints();
          f.length && H2.log("cuePoints", f),
            l._initAdsManagerEventListeners(),
            l.player.emit(tae, { adsManager: h });
        }),
        Vg(hf(l), "_onAdsManagerAdError", function (c) {
          l._handleAdError(c.getError()), l._resumeContent();
        }),
        Vg(hf(l), "_onAdsLoaderAdError", function (c) {
          l._handleAdError(c.getError());
        }),
        Vg(hf(l), "_handleAdError", function (c) {
          var d, h, f;
          H2.log("AdError", c),
            (l.shouldBlockVideoContent = !1),
            (l.isLinearAdRunning = !1),
            (d = l.adsManager) === null || d === void 0 || d.destroy(),
            (h = l.plugin) === null || h === void 0 || h.emit(nae, c),
            (f = l.plugin) === null || f === void 0 || f.emit(whe, c);
        }),
        Vg(hf(l), "onAdEvent", function (c) {
          var d,
            h = hf(l).player,
            f = c == null ? void 0 : c.getAd(),
            p =
              (c == null ? void 0 : c.getAdData()) ||
              (f == null ? void 0 : f.data),
            g = !1;
          switch (c == null ? void 0 : c.type) {
            case google.ima.AdEvent.Type.AD_BREAK_READY:
              l.player.emit(rnt, { ad: f });
              break;
            case google.ima.AdEvent.Type.LOADED:
              var y = (p || {}).adPodInfo,
                v = (y == null ? void 0 : y.podIndex) === 0;
              (g = !0),
                v &&
                  (f.isLinear()
                    ? (l.shouldBlockVideoContent = !0)
                    : ((l.shouldBlockVideoContent = !1), l.tryContentPlay())),
                l.emit(c9, { ad: f, isPreroll: v }),
                l.plugin.emit(c9, { ad: f, isPreroll: v });
              break;
            case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:
              if (l._resumeCallback && !l._resumeCallback().canResume) break;
              l._resumeContent(), l.emit(Mhe, { ad: f });
              break;
            case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:
              (l.isLinearAdRunning = !0),
                (l.shouldBlockVideoContent = !0),
                dn.addClass(l.player.root, SJ),
                h == null || h.pause(),
                l.emit(Phe, { ad: f });
              break;
            case google.ima.AdEvent.Type.STARTED:
              l.plugin.emit(She, { ad: f }),
                f.isLinear() &&
                  ((l._isAdPaused = !1), l.plugin.emit(RL, { ad: f }));
              break;
            case google.ima.AdEvent.Type.RESUMED:
              (l._isAdPaused = !1), l.plugin.emit(RL, { ad: f });
              break;
            case google.ima.AdEvent.Type.PAUSED:
              (l._isAdPaused = !0), l.plugin.emit(Rhe, { ad: f });
              break;
            case google.ima.AdEvent.Type.SKIPPED:
              l.plugin.emit(Ahe, { ad: f });
              break;
            case google.ima.AdEvent.Type.AD_PROGRESS:
              var b = c.getAdData(),
                w = b.currentTime,
                k = b.duration;
              Object.assign(l.context, { currentTime: w, duration: k }),
                l.plugin.emit(OH, { ad: f });
              break;
            case google.ima.AdEvent.Type.COMPLETE:
              var D = (p || {}).adPodInfo,
                $ = !1;
              f != null &&
                f.isLinear() &&
                (D && ($ = D.adPosition < D.totalAds), clearInterval(d)),
                l.plugin.emit(tnt, { ad: f, hasNextInPod: $ }),
                l.plugin.emit(khe, { ad: f, hasNextInPod: $ });
              break;
            case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:
              f != null && f.isLinear() && clearInterval(d),
                l.plugin.emit(nnt, { ad: f }),
                l.player.emit(Jtt, { ad: f });
              break;
            default:
              f != null && f.isLinear() && clearInterval(d);
          }
          H2.log(
            "AdEvent",
            c == null ? void 0 : c.type,
            g
              ? JSON.stringify((c == null ? void 0 : c.getAdData()) || {})
              : c == null
              ? void 0
              : c.getAd()
          );
        }),
        (l.displayContainer = null),
        (l.adsLoader = null),
        (l.adsManager = null),
        (l._resumeCallback = null),
        l
      );
    }
    return (
      XR(o, [
        {
          key: "init",
          value:
            ((r = E6(
              D1().mark(function l() {
                return D1().wrap(
                  function (u) {
                    for (;;)
                      switch ((u.prev = u.next)) {
                        case 0:
                          return (
                            (this.shouldBlockVideoContent = !!(
                              this.config.adTagUrl ||
                              this.config.adsResponse ||
                              this.config.adsRequest
                            )),
                            (u.prev = 1),
                            this.emit(Ihe),
                            (u.next = 5),
                            this._loadIMASdk()
                          );
                        case 5:
                          this.emit(qtt), (u.next = 14);
                          break;
                        case 8:
                          return (
                            (u.prev = 8),
                            (u.t0 = u.catch(1)),
                            H2.error(
                              "google.ima sdk is not loaded, due to error",
                              (u.t0 === null || u.t0 === void 0
                                ? void 0
                                : u.t0.message) || u.t0
                            ),
                            this.emit(Dhe),
                            (this.shouldBlockVideoContent = !1),
                            u.abrupt("return")
                          );
                        case 14:
                          this._initConfig(),
                            this._initMediaEvents(),
                            this._initContainer(),
                            this._initLoader(),
                            this._initAdsRequest();
                        case 19:
                        case "end":
                          return u.stop();
                      }
                  },
                  l,
                  this,
                  [[1, 8]]
                );
              })
            )),
            function () {
              return r.apply(this, arguments);
            }),
        },
        {
          key: "destroy",
          value: function () {
            AL(oR(o.prototype), "destroy", this).call(this),
              this.reset(),
              this.displayContainer.destroy(),
              this._removeMediaEvents(),
              this._destroyLoader();
          },
        },
        {
          key: "resumeCallback",
          set: function (l) {
            this._resumeCallback = l;
          },
        },
        {
          key: "_initConfig",
          value: function () {
            var l = this.config.locale;
            l && google.ima.settings.setLocale(l);
          },
        },
        {
          key: "_loadIMASdk",
          value: function () {
            var l = this;
            return new Promise(function (u, c) {
              if (typeof google < "u" && google.ima) u();
              else {
                var d = document.createElement("script"),
                  h = setTimeout(function () {
                    c(new Error("google.ima sdk load timeout"));
                  }, l.config.loadSdkTimeout || 3e3);
                (d.src =
                  "https://imasdk.googleapis.com/js/sdkloader/ima3".concat(
                    l.config.debug ? "_debug" : "",
                    ".js"
                  )),
                  (d.onload = function () {
                    clearTimeout(h), u();
                  }),
                  (d.onerror = function (f) {
                    clearTimeout(h), c(f == null ? void 0 : f.message);
                  }),
                  document.head.appendChild(d);
              }
            });
          },
        },
        {
          key: "_initMediaEvents",
          value: function () {
            var l = this.player;
            l.on(sae, this._onMediaResize),
              l.on(h9, this._onMediaEnded),
              l.on(iae, this._onMediaPlay),
              l.on(aae, this._onMediaPause),
              l.on(oae, this._onMediaVolumeChange);
          },
        },
        {
          key: "_removeMediaEvents",
          value: function () {
            var l = this.player;
            l.off(sae, this._onMediaResize),
              l.off(h9, this._onMediaEnded),
              l.off(iae, this._onMediaPlay),
              l.off(aae, this._onMediaPause),
              l.off(oae, this._onMediaVolumeChange);
          },
        },
        {
          key: "_initContainer",
          value: function () {
            var l = this.options.displayContainer;
            this.displayContainer = new google.ima.AdDisplayContainer(
              l,
              this.mediaElement
            );
          },
        },
        {
          key: "_initLoader",
          value: function () {
            var l = (this.adsLoader = new google.ima.AdsLoader(
              this.displayContainer
            ));
            l.addEventListener(
              google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
              this._onAdsManagerLoaded,
              !1
            ),
              l.addEventListener(
                google.ima.AdErrorEvent.Type.AD_ERROR,
                this._onAdsLoaderAdError,
                !1
              ),
              this.player.emit(ent, { adsLoader: l });
          },
        },
        {
          key: "_destroyLoader",
          value: function () {
            var l = this.adsLoader;
            l ||
              (l.removeEventListener(
                google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,
                this._onAdsManagerLoaded,
                !1
              ),
              l.removeEventListener(
                google.ima.AdErrorEvent.Type.AD_ERROR,
                this._onAdsLoaderAdError,
                !1
              ));
          },
        },
        {
          key: "_initAdsRequest",
          value:
            ((n = E6(
              D1().mark(function l() {
                var u,
                  c,
                  d,
                  h,
                  f = this;
                return D1().wrap(
                  function (p) {
                    for (;;)
                      switch ((p.prev = p.next)) {
                        case 0:
                          if (
                            ((u = this.config),
                            (c = u.adsRequest),
                            (d = u.adsResponse),
                            (h = u.adTagUrl),
                            !(c || d || h))
                          ) {
                            p.next = 9;
                            break;
                          }
                          return (p.next = 4), this._checkAutoplaySupport();
                        case 4:
                          this.requestAds(),
                            this.player.once(tae, function () {
                              f.autoplayAllowed
                                ? f.playAds()
                                : f.player.useHooks("play", function g() {
                                    return (
                                      f.playAds(),
                                      f.player.removeHooks("play", g),
                                      !1
                                    );
                                  }),
                                f.emit(tx);
                            }),
                            this.player.once(nae, function () {
                              f.emit(tx);
                            }),
                            (p.next = 10);
                          break;
                        case 9:
                          this.emit(tx);
                        case 10:
                        case "end":
                          return p.stop();
                      }
                  },
                  l,
                  this
                );
              })
            )),
            function () {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "playAds",
          value: function () {
            try {
              this._onMediaVolumeChange(),
                this.displayContainerInitialized ||
                  (this.displayContainer.initialize(),
                  (this.displayContainerInitialized = !0));
              var l = this.player,
                u = this.isFullScreen()
                  ? google.ima.ViewMode.FULLSCREEN
                  : google.ima.ViewMode.NORMAL;
              this.adsManager.init(l.sizeInfo.width, l.sizeInfo.height, u),
                this.adsManager.start();
            } catch (c) {
              this._handleAdError(c), this._resumeContent();
            }
          },
        },
        {
          key: "_initAdsManagerEventListeners",
          value: function () {
            var l = this,
              u = this.adsManager;
            u.addEventListener(
              google.ima.AdErrorEvent.Type.AD_ERROR,
              this._onAdsManagerAdError
            ),
              [
                "LOADED",
                "STARTED",
                "RESUMED",
                "PAUSED",
                "COMPLETE",
                "ALL_ADS_COMPLETED",
                "CONTENT_PAUSE_REQUESTED",
                "CONTENT_RESUME_REQUESTED",
                "VOLUME_CHANGED",
                "VOLUME_MUTED",
                "AD_METADATA",
                "AD_CAN_PLAY",
                "AD_PROGRESS",
                "AD_BUFFERING",
                "CLICK",
                "VIDEO_CLICKED",
                "VIDEO_ICON_CLICKED",
                "FIRST_QUARTILE",
                "MIDPOINT",
                "THIRD_QUARTILE",
                "SKIPPED",
                "USER_CLOSE",
                "AD_BREAK_READY",
                "AD_BREAK_FETCH_ERROR",
              ].forEach(function (c) {
                u.addEventListener(google.ima.AdEvent.Type[c], l.onAdEvent);
              });
          },
        },
        {
          key: "_resumeContent",
          value: function () {
            var l;
            (this.isLinearAdRunning = !1),
              (this.shouldBlockVideoContent = !1),
              dn.removeClass(this.player.root, SJ),
              this._isMediaEnded ||
                (l = this.player) === null ||
                l === void 0 ||
                l.play();
          },
        },
        {
          key: "reset",
          value: function () {
            var l, u;
            (this.isLinearAdRunning = !1),
              (l = this.adsManager) === null || l === void 0 || l.destroy(),
              (this.adsManager = null),
              (u = this.adsLoader) === null ||
                u === void 0 ||
                u.contentComplete(),
              dn.removeClass(this.player.root, SJ);
          },
        },
        {
          key: "requestAds",
          value: function () {
            var l,
              u = this.config,
              c = u.adsRequest,
              d = u.adsResponse,
              h = u.adTagUrl,
              f = this.player,
              p = new google.ima.AdsRequest();
            (p.linearAdSlotWidth = f.sizeInfo.width),
              (p.linearAdSlotHeight = f.sizeInfo.height),
              (p.nonLinearAdSlotWidth = f.sizeInfo.width),
              (p.nonLinearAdSlotHeight = f.sizeInfo.height),
              p.setAdWillAutoPlay(this.autoplayAllowed),
              p.setAdWillPlayMuted(this.autoplayRequiresMuted),
              h
                ? (p.adTagUrl = h)
                : d
                ? (p.adsResponse = d)
                : c &&
                  int(c) === "object" &&
                  Object.keys(c).forEach(function (g) {
                    p[g] = c[g];
                  }),
              H2.log("requestAds", JSON.stringify(p)),
              (l = this.adsLoader) === null || l === void 0 || l.requestAds(p);
          },
        },
        {
          key: "pause",
          value: function () {
            var l;
            return (l = this.adsManager) === null || l === void 0
              ? void 0
              : l.pause();
          },
        },
        {
          key: "play",
          value: function () {
            var l;
            return (l = this.adsManager) === null || l === void 0
              ? void 0
              : l.resume();
          },
        },
        {
          key: "skip",
          value: function () {
            var l;
            return (l = this.adsManager) === null || l === void 0
              ? void 0
              : l.skip();
          },
        },
        {
          key: "updateConfig",
          value: function (l) {
            AL(oR(o.prototype), "updateConfig", this).call(this, l),
              this._initConfig();
          },
        },
        {
          key: "_checkAutoplaySupport",
          value:
            ((e = E6(
              D1().mark(function l() {
                var u, c, d, h, f, p;
                return D1().wrap(
                  function (g) {
                    for (;;)
                      switch ((g.prev = g.next)) {
                        case 0:
                          return (
                            (u = this.player.config.autoplay),
                            (c = x0.os.isTizen || x0.os.isWebOS),
                            (g.next = 5),
                            Promise.all([
                              u
                                ? c ||
                                  $Le
                                    .video({ timeout: 800 })
                                    .then(function (y) {
                                      return y.result;
                                    })
                                : Promise.resolve(!1),
                              u && this.player.config.autoplayMuted
                                ? c ||
                                  $Le
                                    .video({ timeout: 800, muted: !0 })
                                    .then(function (y) {
                                      return y.result;
                                    })
                                : Promise.resolve(!1),
                            ])
                          );
                        case 5:
                          (d = g.sent),
                            (h = DC(d, 2)),
                            (f = h[0]),
                            (p = h[1]),
                            (this.autoplayAllowed = f || p),
                            (this.autoplayRequiresMuted = !f && p),
                            H2.log(
                              "checkAutoplaySupport",
                              this.autoplayAllowed,
                              this.autoplayRequiresMuted
                            );
                        case 12:
                        case "end":
                          return g.stop();
                      }
                  },
                  l,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
      ]),
      o
    );
  })(),
  xw = { START: "xgplayer-ad-start", UI_SHOW: "xgplayer-ad-show-ui" },
  bOr = (function (t) {
    iP(n, fnt);
    var e = aP(n);
    function n() {
      var r;
      HR(this, n);
      for (var i = arguments.length, o = new Array(i), l = 0; l < i; l++)
        o[l] = arguments[l];
      return (
        Vg(
          hf((r = e.call.apply(e, [this].concat(o)))),
          "btnClick",
          function (u) {
            u.preventDefault(), u.stopPropagation();
            var c = r.getAdPlugin();
            return (
              c.paused ? (c.play(), r.animate(!1)) : (c.pause(), r.animate(!0)),
              !1
            );
          }
        ),
        r
      );
    }
    return (
      XR(
        n,
        [
          {
            key: "getAdPlugin",
            value: function () {
              return this.player.getPlugin("ad");
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this;
              this.on([Rhe], function () {
                r.animate(!0);
              }),
                this.on(RL, function () {
                  r.animate(!1);
                });
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "adPlay";
            },
          },
        ]
      ),
      n
    );
  })(),
  _Or = (function (t) {
    iP(n, pnt);
    var e = aP(n);
    function n() {
      return HR(this, n), e.apply(this, arguments);
    }
    return (
      XR(
        n,
        [
          {
            key: "getAdPlugin",
            value: function () {
              return this.player.getPlugin("ad");
            },
          },
          {
            key: "duration",
            get: function () {
              var r = this.getAdPlugin();
              return (r == null ? void 0 : r.duration) || 0;
            },
          },
          {
            key: "offsetDuration",
            get: function () {
              return this.duration;
            },
          },
          {
            key: "timeOffset",
            get: function () {
              return 0;
            },
          },
          {
            key: "currentTime",
            get: function () {
              var r = this.getAdPlugin();
              return (r == null ? void 0 : r.currentTime) || 0;
            },
          },
          {
            key: "afterCreate",
            value: function () {
              Object.assign(this.config, {
                isCloseClickSeek: !0,
                isDraggingSeek: !0,
                closeMoveSeek: !0,
              }),
                AL(oR(n.prototype), "afterCreate", this).call(this);
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this;
              this.on(OH, function () {
                r.onTimeupdate();
              });
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "adProgress";
            },
          },
        ]
      ),
      n
    );
  })(),
  TOr = (function (t) {
    iP(n, gnt);
    var e = aP(n);
    function n() {
      return HR(this, n), e.apply(this, arguments);
    }
    return (
      XR(
        n,
        [
          {
            key: "getAdPlugin",
            value: function () {
              return this.player.getPlugin("ad");
            },
          },
          {
            key: "duration",
            get: function () {
              var r = this.getAdPlugin();
              return (r == null ? void 0 : r.duration) || 0;
            },
          },
          {
            key: "currentTime",
            get: function () {
              var r = this.getAdPlugin();
              return (r == null ? void 0 : r.currentTime) || 0;
            },
          },
          {
            key: "listenEvents",
            value: function () {
              var r = this;
              this.on([OH], function (i) {
                r.onTimeUpdate();
              });
            },
          },
        ],
        [
          {
            key: "pluginName",
            get: function () {
              return "adTime";
            },
          },
        ]
      ),
      n
    );
  })(),
  EOr = (function () {
    function t(e, n) {
      HR(this, t);
      var r = n.player,
        i = n.plugin;
      (this.player = r),
        (this.config = e),
        (this.adPlugin = i),
        (this.adUIPlugins = []),
        (this.fragment = document.createDocumentFragment()),
        (this.controlsPos = null),
        (this.decoratedAdPluginList = [
          [fnt, bOr],
          [gnt, TOr],
          [pnt, _Or],
          [iOr, null],
          [z5r, null],
          [Y5r, null],
        ]),
        this.init(),
        this.initEvents();
    }
    return (
      XR(t, [
        {
          key: "init",
          value: function () {
            var e = this.player,
              n = this.adUIPlugins,
              r = this.fragment;
            this.decoratedAdPluginList.forEach(function (i) {
              var o = DC(i, 2),
                l = o[0],
                u = o[1],
                c = e.getPlugin(l.pluginName);
              if (c) {
                var d,
                  h = null;
                u &&
                  !e.getPlugin(u.pluginName) &&
                  (e.registerPlugin(u),
                  (h = e.getPlugin(u.pluginName)),
                  r.appendChild(h.root),
                  (d = h.extraEls) !== null &&
                    d !== void 0 &&
                    d.length &&
                    h.extraEls.forEach(function (f) {
                      r.appendChild(f);
                    })),
                  n.push([c, h]);
              }
            });
          },
        },
        {
          key: "destroy",
          value: function () {
            (this.fragment = null),
              (this.adUIPlugins = []),
              (this.decoratedAdPluginList = []),
              (this.adPlugin = null),
              (this.player = null);
          },
        },
        {
          key: "initEvents",
          value: function () {
            var e = this,
              n = this.adPlugin,
              r = this.player;
            n.on(RL, function () {
              [
                Pp.NO_START,
                Pp.PAUSED,
                Pp.ENDED,
                Pp.ERROR,
                Pp.REPLAY,
                Pp.LOADING,
              ].forEach(function (i) {
                r.removeClass(i);
              });
            }),
              n.on(She, function () {
                e.showAdContainer();
              }),
              n.on(khe, function (i) {
                i.hasNextInPod || e.hideAdContainer();
              }),
              n.on(Ahe, function () {
                e.hideAdContainer();
              }),
              n.on(whe, function () {
                e.hideAdContainer();
              });
          },
        },
        {
          key: "showAdContainer",
          value: function () {
            var e = this.player;
            dn.hasClass(e.root, xw.START) || dn.addClass(e.root, xw.START);
          },
        },
        {
          key: "hideAdContainer",
          value: function () {
            var e = this.player;
            dn.hasClass(e.root, xw.START) && dn.removeClass(e.root, xw.START);
          },
        },
        {
          key: "showAdUI",
          value: function () {
            var e = this.player,
              n = this.config,
              r = this.adUIPlugins,
              i = this.fragment;
            r.forEach(function (l) {
              var u = DC(l, 2),
                c = u[0],
                d = u[1];
              if (d) {
                var h = d.root,
                  f = d.extraEls,
                  p = c.root,
                  g = c.extraEls;
                i.contains(h) && i.removeChild(h),
                  Array.isArray(f) &&
                    f.length &&
                    f.forEach(function (y, v) {
                      i.contains(y) && i.removeChild(y);
                      var b = g == null ? void 0 : g[v];
                      b != null &&
                        b.parentNode &&
                        (b.parentNode.insertBefore(y, b), i.appendChild(b));
                    }),
                  p.parentNode.insertBefore(h, p),
                  i.appendChild(p);
              }
            }),
              this._getNonAdPlugin()
                .filter(function (l) {
                  return !!l.root;
                })
                .forEach(function (l) {
                  var u = l.root;
                  l.__adStub__ ||
                    (l.__adStub__ = dn.createDom("xg-ad-stub", "", {})),
                    u.parentNode.insertBefore(l.__adStub__, u),
                    i.appendChild(u);
                });
            var o = e.getPlugin("start");
            o && o.hide(),
              n.controls === !1 && e.controls && this.hideControls(),
              this.showAdContainer(),
              e.addClass(xw.UI_SHOW);
          },
        },
        {
          key: "hideAdUI",
          value: function () {
            var e,
              n = this.player,
              r = this.config,
              i = this.adUIPlugins,
              o = this.fragment;
            i.forEach(function (d) {
              var h = DC(d, 2),
                f = h[0],
                p = h[1];
              if (p) {
                var g = p.root,
                  y = p.extraEls,
                  v = f.root,
                  b = f.extraEls;
                o.contains(v) && o.removeChild(v),
                  o.contains(g) ||
                    (g.parentNode.insertBefore(v, g), o.appendChild(g)),
                  Array.isArray(b) &&
                    b != null &&
                    b.length &&
                    b.forEach(function (w, k) {
                      o.contains(w) && o.removeChild(w);
                      var D = y == null ? void 0 : y[k];
                      D &&
                        D.parentNode &&
                        (D.parentNode.insertBefore(w, D), o.appendChild(D));
                    });
              }
            }),
              this._getNonAdPlugin()
                .filter(function (d) {
                  return !!d.root;
                })
                .forEach(function (d) {
                  var h,
                    f,
                    p = d.root;
                  o.contains(p) && o.removeChild(p),
                    (h = d.__adStub__) === null ||
                      h === void 0 ||
                      (f = h.parentNode) === null ||
                      f === void 0 ||
                      f.insertBefore(p, d.__adStub__);
                }),
              r.controls === !1 &&
                o.contains(
                  (e = n.controls) === null || e === void 0 ? void 0 : e.root
                ) &&
                this.showControls();
            var l = n.getPlugin("start");
            if (l) {
              var u = l.config.disableAnimate,
                c = l.config.isShowPause;
              u ||
                ((l.config.disableAnimate = !0), (l.config.isShowPause = !1)),
                n.once("play", function () {
                  setTimeout(function () {
                    (l.config.disableAnimate = u),
                      (l.config.disableAnimate = c);
                  }, 10);
                });
            }
            n.removeClass(xw.UI_SHOW);
          },
        },
        {
          key: "hideControls",
          value: function () {
            var e = this.player,
              n = this.config,
              r = this.fragment;
            if (n.controls === !1 && e.controls) {
              var i = e.controls.root,
                o = i.parentElement,
                l = i.previousSibling,
                u = i.nextSibling;
              (this.controlsPos = {
                parentNode: o,
                previousSibling: l,
                nextSibling: u,
              }),
                r.appendChild(e.controls.root);
            }
          },
        },
        {
          key: "showControls",
          value: function () {
            var e = this.player,
              n = this.config,
              r = this.fragment;
            if (n.controls === !1 && e.controls) {
              if (!this.controlsPos) return;
              var i = e.controls.root;
              r.contains(i) && r.removeChild(i);
              var o = this.controlsPos,
                l = o.parentNode,
                u = o.previousSibling,
                c = o.nextSibling;
              l &&
                (c
                  ? l.insertBefore(i, c)
                  : u
                  ? l.insertBefore(i, u.nextSibling)
                  : l.appendChild(i)),
                (this.controlsPos = null);
            }
          },
        },
        {
          key: "_getNonAdPlugin",
          value: function () {
            var e,
              n = this.player,
              r = this.decoratedAdPluginList,
              i = [];
            return (
              r.forEach(function (o) {
                var l = DC(o, 2),
                  u = l[0],
                  c = l[1];
                i.push(u.pluginName.toLowerCase()),
                  c && i.push(c.pluginName.toLowerCase());
              }),
              (
                ((e = n.controls) === null || e === void 0
                  ? void 0
                  : e.plugins()) || []
              ).filter(function (o) {
                return i.indexOf(o.pluginName.toLowerCase()) === -1;
              })
            );
          },
        },
      ]),
      t
    );
  })(),
  RJ = new GH("AdsPlugin");
(function (t) {
  iP(r, oP);
  var e,
    n = aP(r);
  function r() {
    return HR(this, r), n.apply(this, arguments);
  }
  return (
    XR(
      r,
      [
        {
          key: "version",
          get: function () {
            return "3.0.23-rc.5";
          },
        },
        {
          key: "paused",
          get: function () {
            var i, o;
            return !(
              (i = this.csManager) === null ||
              i === void 0 ||
              !i.isLinearAdRunning ||
              (o = this.csManager) === null ||
              o === void 0 ||
              !o.paused
            );
          },
        },
        {
          key: "currentTime",
          get: function () {
            var i;
            return (
              ((i = this.csManager) === null || i === void 0
                ? void 0
                : i.currentTime) || 0
            );
          },
        },
        {
          key: "duration",
          get: function () {
            var i;
            return (
              ((i = this.csManager) === null || i === void 0
                ? void 0
                : i.duration) || 0
            );
          },
        },
        {
          key: "afterCreate",
          value: function () {
            var i = this.config;
            RJ.log(
              "plugin afterCreate, config: ".concat(JSON.stringify(i || {}))
            ),
              (this.csManager = void 0),
              this._blockContentPlay();
          },
        },
        {
          key: "beforePlayerInit",
          value: function () {
            switch (
              (RJ.log("plugin beforePlayerInit"),
              (this.initPromise = hOr()),
              (this.uiManager = new EOr(this.config, {
                plugin: this,
                player: this.player,
              })),
              this.config.adType)
            ) {
              case "ima":
              case "google-ima":
                this._initClientSideAd();
            }
            return this.initPromise;
          },
        },
        {
          key: "render",
          value: function () {
            return dn.createDom("xg-ad", "", {}, "xgplayer-ads");
          },
        },
        {
          key: "_initClientSideAd",
          value: function () {
            switch (this.config.adType) {
              case "ima":
              case "google-ima":
                this._initImaAd();
            }
          },
        },
        {
          key: "_initImaAd",
          value:
            ((e = E6(
              D1().mark(function i() {
                var o = this;
                return D1().wrap(
                  function (l) {
                    for (;;)
                      switch ((l.prev = l.next)) {
                        case 0:
                          return (
                            (this.csManager = new vOr({
                              plugin: this,
                              config: this.config.ima,
                              displayContainer: this.root,
                            })),
                            this.csManager.once(Ihe, function () {
                              o.uiManager.showAdContainer();
                            }),
                            this.csManager.on(Dhe, function () {
                              o.uiManager.hideAdContainer();
                            }),
                            this.csManager.once(c9, function (u) {
                              u.isPreroll || o.uiManager.hideAdContainer();
                            }),
                            this.csManager.once(tx, function () {
                              var u;
                              (u = o.initPromise) === null ||
                                u === void 0 ||
                                u.resolve();
                            }),
                            this.csManager.on(Phe, function () {
                              o.uiManager.showAdUI();
                            }),
                            this.csManager.on(Mhe, function () {
                              o.uiManager.hideAdUI();
                            }),
                            (l.next = 9),
                            this.csManager.init()
                          );
                        case 9:
                          return l.abrupt("return", this.csManager);
                        case 10:
                        case "end":
                          return l.stop();
                      }
                  },
                  i,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "requestAds",
          value: function () {
            var i;
            (i = this.csManager) === null || i === void 0 || i.requestAds();
          },
        },
        {
          key: "playAds",
          value: function () {
            var i;
            (i = this.csManager) === null || i === void 0 || i.playAds();
          },
        },
        {
          key: "pause",
          value: function () {
            var i;
            (i = this.csManager) === null || i === void 0 || i.pause();
          },
        },
        {
          key: "play",
          value: function () {
            var i;
            (i = this.csManager) === null || i === void 0 || i.play();
          },
        },
        {
          key: "destroy",
          value: function () {
            var i, o;
            this.offAll(),
              (i = this.csManager) === null || i === void 0 || i.destroy(),
              (o = this.uiManager) === null || o === void 0 || o.destroy();
          },
        },
        {
          key: "reset",
          value: function () {
            var i;
            (i = this.csManager) === null || i === void 0 || i.reset();
          },
        },
        {
          key: "updateConfig",
          value: function (i) {
            var o;
            (o = this.csManager) === null || o === void 0 || o.updateConfig(i);
          },
        },
        {
          key: "_blockContentPlay",
          value: function () {
            var i = this,
              o = this.player;
            o.on("play", function () {
              var l;
              (l = i.csManager) !== null &&
                l !== void 0 &&
                l.shouldBlockVideoContent &&
                (RJ.log("block content play"), o.pause());
            });
          },
        },
      ],
      [
        {
          key: "pluginName",
          get: function () {
            return "ad";
          },
        },
      ]
    ),
    r
  );
})();
var Lhe = {},
  vI = {},
  Ohe = {};
(function (t) {
  Object.defineProperty(t, "__esModule", { value: !0 }),
    (t.shiftThirtyTwoBits =
      t.THIRTY_TWO_BIT_MULTIPLIER =
      t.bytesToUUID =
        void 0),
    (t.bytesToUUID = (e) => {
      if (e.length !== 16)
        throw new Error(`scte35-js Uint8Array uuid bad size: ${e.length}`);
      return [].map
        .call(e, (n, r) => {
          const i = (n <= 15 ? "0" : "") + n.toString(16);
          return r >= 4 && r <= 10 && r % 2 == 0 ? "-" + i : i;
        })
        .join("");
    }),
    (t.THIRTY_TWO_BIT_MULTIPLIER = Math.pow(2, 32)),
    (t.shiftThirtyTwoBits = (e) => e * t.THIRTY_TWO_BIT_MULTIPLIER);
})(Ohe),
  Object.defineProperty(vI, "__esModule", { value: !0 }),
  (vI.parseDescriptor = vI.SegmentationMessage = void 0);
const SOr = Ohe;
var xLe;
(function (t) {
  (t[(t.RESTRICT_GROUP_0 = 0)] = "RESTRICT_GROUP_0"),
    (t[(t.RESTRICT_GROUP_1 = 1)] = "RESTRICT_GROUP_1"),
    (t[(t.RESTRICT_GROUP_2 = 2)] = "RESTRICT_GROUP_2"),
    (t[(t.NONE = 3)] = "NONE");
})(xLe || (vI.SegmentationMessage = xLe = {}));
const ROr = (t) => {
    const e = {};
    let n = 0;
    for (
      e.spliceDescriptorTag = t.getUint8(n++),
        e.descriptorLength = t.getUint8(n++),
        e.identifier = "";
      e.identifier.length < 4;

    )
      e.identifier += String.fromCharCode(t.getUint8(n++));
    return e;
  },
  AOr = (t) => {
    const e = ROr(t);
    let n = 6;
    if (e.spliceDescriptorTag === 0)
      (n = e.descriptorLength + 2),
        console.warn(
          "scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.AVAIL_DESCRIPTOR"
        );
    else if (e.spliceDescriptorTag === 1)
      (n = e.descriptorLength + 2),
        console.warn(
          "scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.DTMF_DESCRIPTOR"
        );
    else if (e.spliceDescriptorTag === 2) {
      const r = e;
      if (
        ((r.segmentationEventId = t.getUint32(n)),
        (n += 4),
        (r.segmentationEventCancelIndicator = !!(128 & t.getUint8(n++))),
        !r.segmentationEventCancelIndicator)
      ) {
        const i = t.getUint8(n++);
        (r.programSegmentationFlag = !!(128 & i)),
          (r.segmentationDurationFlag = !!(64 & i)),
          (r.deliveryNotRestrictedFlag = !!(32 & i)),
          r.deliveryNotRestrictedFlag ||
            ((r.webDeliveryAllowedFlag = !!(16 & i)),
            (r.noRegionalBlackoutFlag = !!(8 & i)),
            (r.archiveAllowedFlag = !!(4 & i)),
            (r.deviceRestrictions = 3 & i)),
          r.programSegmentationFlag ||
            ((r.componentCount = t.getUint8(n++)),
            console.warn(
              "scte35-js TODO: segmentationDescriptor.componentCount: " +
                r.componentCount
            ),
            (n += 6 * r.componentCount)),
          r.segmentationDurationFlag &&
            ((r.segmentationDuration = SOr.shiftThirtyTwoBits(t.getUint8(n++))),
            (r.segmentationDuration += t.getUint32(n)),
            (n += 4)),
          (r.segmentationUpidType = t.getUint8(n++)),
          (r.segmentationUpidLength = t.getUint8(n++));
        let o = r.segmentationUpidLength;
        for (r.segmentationUpid = new Uint8Array(o); o >= 0; )
          o--, (r.segmentationUpid[o] = t.getUint8(n + o));
        (n += r.segmentationUpidLength),
          (r.segmentationTypeId = t.getUint8(n++)),
          (r.segmentNum = t.getUint8(n++)),
          (r.segmentsExpected = t.getUint8(n++)),
          n < e.descriptorLength + 2 &&
            (r.segmentationTypeId === 52 || r.segmentationTypeId === 54) &&
            ((r.subSegmentNum = t.getUint8(n++)),
            (r.subSegmentsExpected = t.getUint8(n++)));
      }
    } else
      e.spliceDescriptorTag === 3
        ? ((n = e.descriptorLength + 2),
          console.warn(
            "scte35-js TODO: support spliceDescriptorTag: SpliceDescriptorTag.TIME_DESCRIPTOR"
          ))
        : (console.error(
            `scte35-js Unrecognized spliceDescriptorTag ${e.spliceDescriptorTag}`
          ),
          (n = e.descriptorLength + 2));
    return (
      n !== e.descriptorLength + 2 &&
        console.error(
          `scte35-js Error reading descriptor offset @${n} of ${
            e.descriptorLength + 2
          }`
        ),
      e
    );
  };
vI.parseDescriptor = AOr;
var _nt = {},
  R6 = {};
(R6.byteLength = IOr), (R6.toByteArray = POr), (R6.fromByteArray = $Or);
for (
  var ov = [],
    jg = [],
    wOr = typeof Uint8Array < "u" ? Uint8Array : Array,
    AJ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
    Lw = 0,
    kOr = AJ.length;
  Lw < kOr;
  ++Lw
)
  (ov[Lw] = AJ[Lw]), (jg[AJ.charCodeAt(Lw)] = Lw);
function Tnt(t) {
  var e = t.length;
  if (e % 4 > 0)
    throw new Error("Invalid string. Length must be a multiple of 4");
  var n = t.indexOf("=");
  return n === -1 && (n = e), [n, n === e ? 0 : 4 - (n % 4)];
}
function IOr(t) {
  var e = Tnt(t),
    n = e[0],
    r = e[1];
  return (3 * (n + r)) / 4 - r;
}
function DOr(t, e, n) {
  return (3 * (e + n)) / 4 - n;
}
function POr(t) {
  var e,
    n,
    r = Tnt(t),
    i = r[0],
    o = r[1],
    l = new wOr(DOr(t, i, o)),
    u = 0,
    c = o > 0 ? i - 4 : i;
  for (n = 0; n < c; n += 4)
    (e =
      (jg[t.charCodeAt(n)] << 18) |
      (jg[t.charCodeAt(n + 1)] << 12) |
      (jg[t.charCodeAt(n + 2)] << 6) |
      jg[t.charCodeAt(n + 3)]),
      (l[u++] = (e >> 16) & 255),
      (l[u++] = (e >> 8) & 255),
      (l[u++] = 255 & e);
  return (
    o === 2 &&
      ((e = (jg[t.charCodeAt(n)] << 2) | (jg[t.charCodeAt(n + 1)] >> 4)),
      (l[u++] = 255 & e)),
    o === 1 &&
      ((e =
        (jg[t.charCodeAt(n)] << 10) |
        (jg[t.charCodeAt(n + 1)] << 4) |
        (jg[t.charCodeAt(n + 2)] >> 2)),
      (l[u++] = (e >> 8) & 255),
      (l[u++] = 255 & e)),
    l
  );
}
function MOr(t) {
  return (
    ov[(t >> 18) & 63] + ov[(t >> 12) & 63] + ov[(t >> 6) & 63] + ov[63 & t]
  );
}
function COr(t, e, n) {
  for (var r, i = [], o = e; o < n; o += 3)
    (r =
      ((t[o] << 16) & 16711680) + ((t[o + 1] << 8) & 65280) + (255 & t[o + 2])),
      i.push(MOr(r));
  return i.join("");
}
function $Or(t) {
  for (
    var e, n = t.length, r = n % 3, i = [], o = 16383, l = 0, u = n - r;
    l < u;
    l += o
  )
    i.push(COr(t, l, l + o > u ? u : l + o));
  return (
    r === 1
      ? ((e = t[n - 1]), i.push(ov[e >> 2] + ov[(e << 4) & 63] + "=="))
      : r === 2 &&
        ((e = (t[n - 2] << 8) + t[n - 1]),
        i.push(ov[e >> 10] + ov[(e >> 4) & 63] + ov[(e << 2) & 63] + "=")),
    i.join("")
  );
}
(jg["-".charCodeAt(0)] = 62), (jg["_".charCodeAt(0)] = 63);
var xOr = {
  read: function (t, e, n, r, i) {
    var o,
      l,
      u = 8 * i - r - 1,
      c = (1 << u) - 1,
      d = c >> 1,
      h = -7,
      f = n ? i - 1 : 0,
      p = n ? -1 : 1,
      g = t[e + f];
    for (
      f += p, o = g & ((1 << -h) - 1), g >>= -h, h += u;
      h > 0;
      o = 256 * o + t[e + f], f += p, h -= 8
    );
    for (
      l = o & ((1 << -h) - 1), o >>= -h, h += r;
      h > 0;
      l = 256 * l + t[e + f], f += p, h -= 8
    );
    if (o === 0) o = 1 - d;
    else {
      if (o === c) return l ? NaN : (1 / 0) * (g ? -1 : 1);
      (l += Math.pow(2, r)), (o -= d);
    }
    return (g ? -1 : 1) * l * Math.pow(2, o - r);
  },
  write: function (t, e, n, r, i, o) {
    var l,
      u,
      c,
      d = 8 * o - i - 1,
      h = (1 << d) - 1,
      f = h >> 1,
      p = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
      g = r ? 0 : o - 1,
      y = r ? 1 : -1,
      v = e < 0 || (e === 0 && 1 / e < 0) ? 1 : 0;
    for (
      e = Math.abs(e),
        isNaN(e) || e === 1 / 0
          ? ((u = isNaN(e) ? 1 : 0), (l = h))
          : ((l = Math.floor(Math.log(e) / Math.LN2)),
            e * (c = Math.pow(2, -l)) < 1 && (l--, (c *= 2)),
            (e += l + f >= 1 ? p / c : p * Math.pow(2, 1 - f)) * c >= 2 &&
              (l++, (c /= 2)),
            l + f >= h
              ? ((u = 0), (l = h))
              : l + f >= 1
              ? ((u = (e * c - 1) * Math.pow(2, i)), (l += f))
              : ((u = e * Math.pow(2, f - 1) * Math.pow(2, i)), (l = 0)));
      i >= 8;
      t[n + g] = 255 & u, g += y, u /= 256, i -= 8
    );
    for (
      l = (l << i) | u, d += i;
      d > 0;
      t[n + g] = 255 & l, g += y, l /= 256, d -= 8
    );
    t[n + g - y] |= 128 * v;
  },
};
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */ (function (t) {
  const e = R6,
    n = xOr,
    r =
      typeof Symbol == "function" && typeof Symbol.for == "function"
        ? Symbol.for("nodejs.util.inspect.custom")
        : null;
  (t.Buffer = l),
    (t.SlowBuffer = function (B) {
      return +B != B && (B = 0), l.alloc(+B);
    }),
    (t.INSPECT_MAX_BYTES = 50);
  const i = 2147483647;
  function o(B) {
    if (B > i)
      throw new RangeError(
        'The value "' + B + '" is invalid for option "size"'
      );
    const re = new Uint8Array(B);
    return Object.setPrototypeOf(re, l.prototype), re;
  }
  function l(B, re, Ae) {
    if (typeof B == "number") {
      if (typeof re == "string")
        throw new TypeError(
          'The "string" argument must be of type string. Received type number'
        );
      return d(B);
    }
    return u(B, re, Ae);
  }
  function u(B, re, Ae) {
    if (typeof B == "string")
      return (function (St, Lt) {
        if (
          ((typeof Lt == "string" && Lt !== "") || (Lt = "utf8"),
          !l.isEncoding(Lt))
        )
          throw new TypeError("Unknown encoding: " + Lt);
        const ln = 0 | g(St, Lt);
        let Ln = o(ln);
        const Tr = Ln.write(St, Lt);
        return Tr !== ln && (Ln = Ln.slice(0, Tr)), Ln;
      })(B, re);
    if (ArrayBuffer.isView(B))
      return (function (St) {
        if (ie(St, Uint8Array)) {
          const Lt = new Uint8Array(St);
          return f(Lt.buffer, Lt.byteOffset, Lt.byteLength);
        }
        return h(St);
      })(B);
    if (B == null)
      throw new TypeError(
        "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " +
          typeof B
      );
    if (
      ie(B, ArrayBuffer) ||
      (B && ie(B.buffer, ArrayBuffer)) ||
      (typeof SharedArrayBuffer < "u" &&
        (ie(B, SharedArrayBuffer) || (B && ie(B.buffer, SharedArrayBuffer))))
    )
      return f(B, re, Ae);
    if (typeof B == "number")
      throw new TypeError(
        'The "value" argument must not be of type number. Received type number'
      );
    const lt = B.valueOf && B.valueOf();
    if (lt != null && lt !== B) return l.from(lt, re, Ae);
    const Et = (function (St) {
      if (l.isBuffer(St)) {
        const Lt = 0 | p(St.length),
          ln = o(Lt);
        return ln.length === 0 || St.copy(ln, 0, 0, Lt), ln;
      }
      if (St.length !== void 0)
        return typeof St.length != "number" || Ne(St.length) ? o(0) : h(St);
      if (St.type === "Buffer" && Array.isArray(St.data)) return h(St.data);
    })(B);
    if (Et) return Et;
    if (
      typeof Symbol < "u" &&
      Symbol.toPrimitive != null &&
      typeof B[Symbol.toPrimitive] == "function"
    )
      return l.from(B[Symbol.toPrimitive]("string"), re, Ae);
    throw new TypeError(
      "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " +
        typeof B
    );
  }
  function c(B) {
    if (typeof B != "number")
      throw new TypeError('"size" argument must be of type number');
    if (B < 0)
      throw new RangeError(
        'The value "' + B + '" is invalid for option "size"'
      );
  }
  function d(B) {
    return c(B), o(B < 0 ? 0 : 0 | p(B));
  }
  function h(B) {
    const re = B.length < 0 ? 0 : 0 | p(B.length),
      Ae = o(re);
    for (let lt = 0; lt < re; lt += 1) Ae[lt] = 255 & B[lt];
    return Ae;
  }
  function f(B, re, Ae) {
    if (re < 0 || B.byteLength < re)
      throw new RangeError('"offset" is outside of buffer bounds');
    if (B.byteLength < re + (Ae || 0))
      throw new RangeError('"length" is outside of buffer bounds');
    let lt;
    return (
      (lt =
        re === void 0 && Ae === void 0
          ? new Uint8Array(B)
          : Ae === void 0
          ? new Uint8Array(B, re)
          : new Uint8Array(B, re, Ae)),
      Object.setPrototypeOf(lt, l.prototype),
      lt
    );
  }
  function p(B) {
    if (B >= i)
      throw new RangeError(
        "Attempt to allocate Buffer larger than maximum size: 0x" +
          i.toString(16) +
          " bytes"
      );
    return 0 | B;
  }
  function g(B, re) {
    if (l.isBuffer(B)) return B.length;
    if (ArrayBuffer.isView(B) || ie(B, ArrayBuffer)) return B.byteLength;
    if (typeof B != "string")
      throw new TypeError(
        'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' +
          typeof B
      );
    const Ae = B.length,
      lt = arguments.length > 2 && arguments[2] === !0;
    if (!lt && Ae === 0) return 0;
    let Et = !1;
    for (;;)
      switch (re) {
        case "ascii":
        case "latin1":
        case "binary":
          return Ae;
        case "utf8":
        case "utf-8":
          return de(B).length;
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return 2 * Ae;
        case "hex":
          return Ae >>> 1;
        case "base64":
          return ue(B).length;
        default:
          if (Et) return lt ? -1 : de(B).length;
          (re = ("" + re).toLowerCase()), (Et = !0);
      }
  }
  function y(B, re, Ae) {
    let lt = !1;
    if (
      ((re === void 0 || re < 0) && (re = 0),
      re > this.length ||
        ((Ae === void 0 || Ae > this.length) && (Ae = this.length), Ae <= 0) ||
        (Ae >>>= 0) <= (re >>>= 0))
    )
      return "";
    for (B || (B = "utf8"); ; )
      switch (B) {
        case "hex":
          return E(this, re, Ae);
        case "utf8":
        case "utf-8":
          return O(this, re, Ae);
        case "ascii":
          return G(this, re, Ae);
        case "latin1":
        case "binary":
          return H(this, re, Ae);
        case "base64":
          return I(this, re, Ae);
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return S(this, re, Ae);
        default:
          if (lt) throw new TypeError("Unknown encoding: " + B);
          (B = (B + "").toLowerCase()), (lt = !0);
      }
  }
  function v(B, re, Ae) {
    const lt = B[re];
    (B[re] = B[Ae]), (B[Ae] = lt);
  }
  function b(B, re, Ae, lt, Et) {
    if (B.length === 0) return -1;
    if (
      (typeof Ae == "string"
        ? ((lt = Ae), (Ae = 0))
        : Ae > 2147483647
        ? (Ae = 2147483647)
        : Ae < -2147483648 && (Ae = -2147483648),
      Ne((Ae = +Ae)) && (Ae = Et ? 0 : B.length - 1),
      Ae < 0 && (Ae = B.length + Ae),
      Ae >= B.length)
    ) {
      if (Et) return -1;
      Ae = B.length - 1;
    } else if (Ae < 0) {
      if (!Et) return -1;
      Ae = 0;
    }
    if ((typeof re == "string" && (re = l.from(re, lt)), l.isBuffer(re)))
      return re.length === 0 ? -1 : w(B, re, Ae, lt, Et);
    if (typeof re == "number")
      return (
        (re &= 255),
        typeof Uint8Array.prototype.indexOf == "function"
          ? Et
            ? Uint8Array.prototype.indexOf.call(B, re, Ae)
            : Uint8Array.prototype.lastIndexOf.call(B, re, Ae)
          : w(B, [re], Ae, lt, Et)
      );
    throw new TypeError("val must be string, number or Buffer");
  }
  function w(B, re, Ae, lt, Et) {
    let St,
      Lt = 1,
      ln = B.length,
      Ln = re.length;
    if (
      lt !== void 0 &&
      ((lt = String(lt).toLowerCase()) === "ucs2" ||
        lt === "ucs-2" ||
        lt === "utf16le" ||
        lt === "utf-16le")
    ) {
      if (B.length < 2 || re.length < 2) return -1;
      (Lt = 2), (ln /= 2), (Ln /= 2), (Ae /= 2);
    }
    function Tr(sr, hi) {
      return Lt === 1 ? sr[hi] : sr.readUInt16BE(hi * Lt);
    }
    if (Et) {
      let sr = -1;
      for (St = Ae; St < ln; St++)
        if (Tr(B, St) === Tr(re, sr === -1 ? 0 : St - sr)) {
          if ((sr === -1 && (sr = St), St - sr + 1 === Ln)) return sr * Lt;
        } else sr !== -1 && (St -= St - sr), (sr = -1);
    } else
      for (Ae + Ln > ln && (Ae = ln - Ln), St = Ae; St >= 0; St--) {
        let sr = !0;
        for (let hi = 0; hi < Ln; hi++)
          if (Tr(B, St + hi) !== Tr(re, hi)) {
            sr = !1;
            break;
          }
        if (sr) return St;
      }
    return -1;
  }
  function k(B, re, Ae, lt) {
    Ae = Number(Ae) || 0;
    const Et = B.length - Ae;
    lt ? (lt = Number(lt)) > Et && (lt = Et) : (lt = Et);
    const St = re.length;
    let Lt;
    for (lt > St / 2 && (lt = St / 2), Lt = 0; Lt < lt; ++Lt) {
      const ln = parseInt(re.substr(2 * Lt, 2), 16);
      if (Ne(ln)) return Lt;
      B[Ae + Lt] = ln;
    }
    return Lt;
  }
  function D(B, re, Ae, lt) {
    return Z(de(re, B.length - Ae), B, Ae, lt);
  }
  function $(B, re, Ae, lt) {
    return Z(
      (function (Et) {
        const St = [];
        for (let Lt = 0; Lt < Et.length; ++Lt) St.push(255 & Et.charCodeAt(Lt));
        return St;
      })(re),
      B,
      Ae,
      lt
    );
  }
  function N(B, re, Ae, lt) {
    return Z(ue(re), B, Ae, lt);
  }
  function P(B, re, Ae, lt) {
    return Z(
      (function (Et, St) {
        let Lt, ln, Ln;
        const Tr = [];
        for (let sr = 0; sr < Et.length && !((St -= 2) < 0); ++sr)
          (Lt = Et.charCodeAt(sr)),
            (ln = Lt >> 8),
            (Ln = Lt % 256),
            Tr.push(Ln),
            Tr.push(ln);
        return Tr;
      })(re, B.length - Ae),
      B,
      Ae,
      lt
    );
  }
  function I(B, re, Ae) {
    return re === 0 && Ae === B.length
      ? e.fromByteArray(B)
      : e.fromByteArray(B.slice(re, Ae));
  }
  function O(B, re, Ae) {
    Ae = Math.min(B.length, Ae);
    const lt = [];
    let Et = re;
    for (; Et < Ae; ) {
      const St = B[Et];
      let Lt = null,
        ln = St > 239 ? 4 : St > 223 ? 3 : St > 191 ? 2 : 1;
      if (Et + ln <= Ae) {
        let Ln, Tr, sr, hi;
        switch (ln) {
          case 1:
            St < 128 && (Lt = St);
            break;
          case 2:
            (Ln = B[Et + 1]),
              (192 & Ln) == 128 &&
                ((hi = ((31 & St) << 6) | (63 & Ln)), hi > 127 && (Lt = hi));
            break;
          case 3:
            (Ln = B[Et + 1]),
              (Tr = B[Et + 2]),
              (192 & Ln) == 128 &&
                (192 & Tr) == 128 &&
                ((hi = ((15 & St) << 12) | ((63 & Ln) << 6) | (63 & Tr)),
                hi > 2047 && (hi < 55296 || hi > 57343) && (Lt = hi));
            break;
          case 4:
            (Ln = B[Et + 1]),
              (Tr = B[Et + 2]),
              (sr = B[Et + 3]),
              (192 & Ln) == 128 &&
                (192 & Tr) == 128 &&
                (192 & sr) == 128 &&
                ((hi =
                  ((15 & St) << 18) |
                  ((63 & Ln) << 12) |
                  ((63 & Tr) << 6) |
                  (63 & sr)),
                hi > 65535 && hi < 1114112 && (Lt = hi));
        }
      }
      Lt === null
        ? ((Lt = 65533), (ln = 1))
        : Lt > 65535 &&
          ((Lt -= 65536),
          lt.push(((Lt >>> 10) & 1023) | 55296),
          (Lt = 56320 | (1023 & Lt))),
        lt.push(Lt),
        (Et += ln);
    }
    return (function (St) {
      const Lt = St.length;
      if (Lt <= X) return String.fromCharCode.apply(String, St);
      let ln = "",
        Ln = 0;
      for (; Ln < Lt; )
        ln += String.fromCharCode.apply(String, St.slice(Ln, (Ln += X)));
      return ln;
    })(lt);
  }
  (t.kMaxLength = i),
    (l.TYPED_ARRAY_SUPPORT = (function () {
      try {
        const B = new Uint8Array(1),
          re = {
            foo: function () {
              return 42;
            },
          };
        return (
          Object.setPrototypeOf(re, Uint8Array.prototype),
          Object.setPrototypeOf(B, re),
          B.foo() === 42
        );
      } catch {
        return !1;
      }
    })()),
    l.TYPED_ARRAY_SUPPORT ||
      typeof console > "u" ||
      typeof console.error != "function" ||
      console.error(
        "This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
      ),
    Object.defineProperty(l.prototype, "parent", {
      enumerable: !0,
      get: function () {
        if (l.isBuffer(this)) return this.buffer;
      },
    }),
    Object.defineProperty(l.prototype, "offset", {
      enumerable: !0,
      get: function () {
        if (l.isBuffer(this)) return this.byteOffset;
      },
    }),
    (l.poolSize = 8192),
    (l.from = function (B, re, Ae) {
      return u(B, re, Ae);
    }),
    Object.setPrototypeOf(l.prototype, Uint8Array.prototype),
    Object.setPrototypeOf(l, Uint8Array),
    (l.alloc = function (B, re, Ae) {
      return (function (lt, Et, St) {
        return (
          c(lt),
          lt <= 0
            ? o(lt)
            : Et !== void 0
            ? typeof St == "string"
              ? o(lt).fill(Et, St)
              : o(lt).fill(Et)
            : o(lt)
        );
      })(B, re, Ae);
    }),
    (l.allocUnsafe = function (B) {
      return d(B);
    }),
    (l.allocUnsafeSlow = function (B) {
      return d(B);
    }),
    (l.isBuffer = function (B) {
      return B != null && B._isBuffer === !0 && B !== l.prototype;
    }),
    (l.compare = function (B, re) {
      if (
        (ie(B, Uint8Array) && (B = l.from(B, B.offset, B.byteLength)),
        ie(re, Uint8Array) && (re = l.from(re, re.offset, re.byteLength)),
        !l.isBuffer(B) || !l.isBuffer(re))
      )
        throw new TypeError(
          'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
        );
      if (B === re) return 0;
      let Ae = B.length,
        lt = re.length;
      for (let Et = 0, St = Math.min(Ae, lt); Et < St; ++Et)
        if (B[Et] !== re[Et]) {
          (Ae = B[Et]), (lt = re[Et]);
          break;
        }
      return Ae < lt ? -1 : lt < Ae ? 1 : 0;
    }),
    (l.isEncoding = function (B) {
      switch (String(B).toLowerCase()) {
        case "hex":
        case "utf8":
        case "utf-8":
        case "ascii":
        case "latin1":
        case "binary":
        case "base64":
        case "ucs2":
        case "ucs-2":
        case "utf16le":
        case "utf-16le":
          return !0;
        default:
          return !1;
      }
    }),
    (l.concat = function (B, re) {
      if (!Array.isArray(B))
        throw new TypeError('"list" argument must be an Array of Buffers');
      if (B.length === 0) return l.alloc(0);
      let Ae;
      if (re === void 0)
        for (re = 0, Ae = 0; Ae < B.length; ++Ae) re += B[Ae].length;
      const lt = l.allocUnsafe(re);
      let Et = 0;
      for (Ae = 0; Ae < B.length; ++Ae) {
        let St = B[Ae];
        if (ie(St, Uint8Array))
          Et + St.length > lt.length
            ? (l.isBuffer(St) || (St = l.from(St)), St.copy(lt, Et))
            : Uint8Array.prototype.set.call(lt, St, Et);
        else {
          if (!l.isBuffer(St))
            throw new TypeError('"list" argument must be an Array of Buffers');
          St.copy(lt, Et);
        }
        Et += St.length;
      }
      return lt;
    }),
    (l.byteLength = g),
    (l.prototype._isBuffer = !0),
    (l.prototype.swap16 = function () {
      const B = this.length;
      if (B % 2 != 0)
        throw new RangeError("Buffer size must be a multiple of 16-bits");
      for (let re = 0; re < B; re += 2) v(this, re, re + 1);
      return this;
    }),
    (l.prototype.swap32 = function () {
      const B = this.length;
      if (B % 4 != 0)
        throw new RangeError("Buffer size must be a multiple of 32-bits");
      for (let re = 0; re < B; re += 4)
        v(this, re, re + 3), v(this, re + 1, re + 2);
      return this;
    }),
    (l.prototype.swap64 = function () {
      const B = this.length;
      if (B % 8 != 0)
        throw new RangeError("Buffer size must be a multiple of 64-bits");
      for (let re = 0; re < B; re += 8)
        v(this, re, re + 7),
          v(this, re + 1, re + 6),
          v(this, re + 2, re + 5),
          v(this, re + 3, re + 4);
      return this;
    }),
    (l.prototype.toString = function () {
      const B = this.length;
      return B === 0
        ? ""
        : arguments.length === 0
        ? O(this, 0, B)
        : y.apply(this, arguments);
    }),
    (l.prototype.toLocaleString = l.prototype.toString),
    (l.prototype.equals = function (B) {
      if (!l.isBuffer(B)) throw new TypeError("Argument must be a Buffer");
      return this === B || l.compare(this, B) === 0;
    }),
    (l.prototype.inspect = function () {
      let B = "";
      const re = t.INSPECT_MAX_BYTES;
      return (
        (B = this.toString("hex", 0, re)
          .replace(/(.{2})/g, "$1 ")
          .trim()),
        this.length > re && (B += " ... "),
        "<Buffer " + B + ">"
      );
    }),
    r && (l.prototype[r] = l.prototype.inspect),
    (l.prototype.compare = function (B, re, Ae, lt, Et) {
      if (
        (ie(B, Uint8Array) && (B = l.from(B, B.offset, B.byteLength)),
        !l.isBuffer(B))
      )
        throw new TypeError(
          'The "target" argument must be one of type Buffer or Uint8Array. Received type ' +
            typeof B
        );
      if (
        (re === void 0 && (re = 0),
        Ae === void 0 && (Ae = B ? B.length : 0),
        lt === void 0 && (lt = 0),
        Et === void 0 && (Et = this.length),
        re < 0 || Ae > B.length || lt < 0 || Et > this.length)
      )
        throw new RangeError("out of range index");
      if (lt >= Et && re >= Ae) return 0;
      if (lt >= Et) return -1;
      if (re >= Ae) return 1;
      if (this === B) return 0;
      let St = (Et >>>= 0) - (lt >>>= 0),
        Lt = (Ae >>>= 0) - (re >>>= 0);
      const ln = Math.min(St, Lt),
        Ln = this.slice(lt, Et),
        Tr = B.slice(re, Ae);
      for (let sr = 0; sr < ln; ++sr)
        if (Ln[sr] !== Tr[sr]) {
          (St = Ln[sr]), (Lt = Tr[sr]);
          break;
        }
      return St < Lt ? -1 : Lt < St ? 1 : 0;
    }),
    (l.prototype.includes = function (B, re, Ae) {
      return this.indexOf(B, re, Ae) !== -1;
    }),
    (l.prototype.indexOf = function (B, re, Ae) {
      return b(this, B, re, Ae, !0);
    }),
    (l.prototype.lastIndexOf = function (B, re, Ae) {
      return b(this, B, re, Ae, !1);
    }),
    (l.prototype.write = function (B, re, Ae, lt) {
      if (re === void 0) (lt = "utf8"), (Ae = this.length), (re = 0);
      else if (Ae === void 0 && typeof re == "string")
        (lt = re), (Ae = this.length), (re = 0);
      else {
        if (!isFinite(re))
          throw new Error(
            "Buffer.write(string, encoding, offset[, length]) is no longer supported"
          );
        (re >>>= 0),
          isFinite(Ae)
            ? ((Ae >>>= 0), lt === void 0 && (lt = "utf8"))
            : ((lt = Ae), (Ae = void 0));
      }
      const Et = this.length - re;
      if (
        ((Ae === void 0 || Ae > Et) && (Ae = Et),
        (B.length > 0 && (Ae < 0 || re < 0)) || re > this.length)
      )
        throw new RangeError("Attempt to write outside buffer bounds");
      lt || (lt = "utf8");
      let St = !1;
      for (;;)
        switch (lt) {
          case "hex":
            return k(this, B, re, Ae);
          case "utf8":
          case "utf-8":
            return D(this, B, re, Ae);
          case "ascii":
          case "latin1":
          case "binary":
            return $(this, B, re, Ae);
          case "base64":
            return N(this, B, re, Ae);
          case "ucs2":
          case "ucs-2":
          case "utf16le":
          case "utf-16le":
            return P(this, B, re, Ae);
          default:
            if (St) throw new TypeError("Unknown encoding: " + lt);
            (lt = ("" + lt).toLowerCase()), (St = !0);
        }
    }),
    (l.prototype.toJSON = function () {
      return {
        type: "Buffer",
        data: Array.prototype.slice.call(this._arr || this, 0),
      };
    });
  const X = 4096;
  function G(B, re, Ae) {
    let lt = "";
    Ae = Math.min(B.length, Ae);
    for (let Et = re; Et < Ae; ++Et) lt += String.fromCharCode(127 & B[Et]);
    return lt;
  }
  function H(B, re, Ae) {
    let lt = "";
    Ae = Math.min(B.length, Ae);
    for (let Et = re; Et < Ae; ++Et) lt += String.fromCharCode(B[Et]);
    return lt;
  }
  function E(B, re, Ae) {
    const lt = B.length;
    (!re || re < 0) && (re = 0), (!Ae || Ae < 0 || Ae > lt) && (Ae = lt);
    let Et = "";
    for (let St = re; St < Ae; ++St) Et += Pe[B[St]];
    return Et;
  }
  function S(B, re, Ae) {
    const lt = B.slice(re, Ae);
    let Et = "";
    for (let St = 0; St < lt.length - 1; St += 2)
      Et += String.fromCharCode(lt[St] + 256 * lt[St + 1]);
    return Et;
  }
  function L(B, re, Ae) {
    if (B % 1 != 0 || B < 0) throw new RangeError("offset is not uint");
    if (B + re > Ae)
      throw new RangeError("Trying to access beyond buffer length");
  }
  function W(B, re, Ae, lt, Et, St) {
    if (!l.isBuffer(B))
      throw new TypeError('"buffer" argument must be a Buffer instance');
    if (re > Et || re < St)
      throw new RangeError('"value" argument is out of bounds');
    if (Ae + lt > B.length) throw new RangeError("Index out of range");
  }
  function F(B, re, Ae, lt, Et) {
    $t(re, lt, Et, B, Ae, 7);
    let St = Number(re & BigInt(4294967295));
    (B[Ae++] = St),
      (St >>= 8),
      (B[Ae++] = St),
      (St >>= 8),
      (B[Ae++] = St),
      (St >>= 8),
      (B[Ae++] = St);
    let Lt = Number((re >> BigInt(32)) & BigInt(4294967295));
    return (
      (B[Ae++] = Lt),
      (Lt >>= 8),
      (B[Ae++] = Lt),
      (Lt >>= 8),
      (B[Ae++] = Lt),
      (Lt >>= 8),
      (B[Ae++] = Lt),
      Ae
    );
  }
  function oe(B, re, Ae, lt, Et) {
    $t(re, lt, Et, B, Ae, 7);
    let St = Number(re & BigInt(4294967295));
    (B[Ae + 7] = St),
      (St >>= 8),
      (B[Ae + 6] = St),
      (St >>= 8),
      (B[Ae + 5] = St),
      (St >>= 8),
      (B[Ae + 4] = St);
    let Lt = Number((re >> BigInt(32)) & BigInt(4294967295));
    return (
      (B[Ae + 3] = Lt),
      (Lt >>= 8),
      (B[Ae + 2] = Lt),
      (Lt >>= 8),
      (B[Ae + 1] = Lt),
      (Lt >>= 8),
      (B[Ae] = Lt),
      Ae + 8
    );
  }
  function De(B, re, Ae, lt, Et, St) {
    if (Ae + lt > B.length) throw new RangeError("Index out of range");
    if (Ae < 0) throw new RangeError("Index out of range");
  }
  function Xe(B, re, Ae, lt, Et) {
    return (
      (re = +re),
      (Ae >>>= 0),
      Et || De(B, 0, Ae, 4),
      n.write(B, re, Ae, lt, 23, 4),
      Ae + 4
    );
  }
  function ze(B, re, Ae, lt, Et) {
    return (
      (re = +re),
      (Ae >>>= 0),
      Et || De(B, 0, Ae, 8),
      n.write(B, re, Ae, lt, 52, 8),
      Ae + 8
    );
  }
  (l.prototype.slice = function (B, re) {
    const Ae = this.length;
    (B = ~~B) < 0 ? (B += Ae) < 0 && (B = 0) : B > Ae && (B = Ae),
      (re = re === void 0 ? Ae : ~~re) < 0
        ? (re += Ae) < 0 && (re = 0)
        : re > Ae && (re = Ae),
      re < B && (re = B);
    const lt = this.subarray(B, re);
    return Object.setPrototypeOf(lt, l.prototype), lt;
  }),
    (l.prototype.readUintLE = l.prototype.readUIntLE =
      function (B, re, Ae) {
        (B >>>= 0), (re >>>= 0), Ae || L(B, re, this.length);
        let lt = this[B],
          Et = 1,
          St = 0;
        for (; ++St < re && (Et *= 256); ) lt += this[B + St] * Et;
        return lt;
      }),
    (l.prototype.readUintBE = l.prototype.readUIntBE =
      function (B, re, Ae) {
        (B >>>= 0), (re >>>= 0), Ae || L(B, re, this.length);
        let lt = this[B + --re],
          Et = 1;
        for (; re > 0 && (Et *= 256); ) lt += this[B + --re] * Et;
        return lt;
      }),
    (l.prototype.readUint8 = l.prototype.readUInt8 =
      function (B, re) {
        return (B >>>= 0), re || L(B, 1, this.length), this[B];
      }),
    (l.prototype.readUint16LE = l.prototype.readUInt16LE =
      function (B, re) {
        return (
          (B >>>= 0), re || L(B, 2, this.length), this[B] | (this[B + 1] << 8)
        );
      }),
    (l.prototype.readUint16BE = l.prototype.readUInt16BE =
      function (B, re) {
        return (
          (B >>>= 0), re || L(B, 2, this.length), (this[B] << 8) | this[B + 1]
        );
      }),
    (l.prototype.readUint32LE = l.prototype.readUInt32LE =
      function (B, re) {
        return (
          (B >>>= 0),
          re || L(B, 4, this.length),
          (this[B] | (this[B + 1] << 8) | (this[B + 2] << 16)) +
            16777216 * this[B + 3]
        );
      }),
    (l.prototype.readUint32BE = l.prototype.readUInt32BE =
      function (B, re) {
        return (
          (B >>>= 0),
          re || L(B, 4, this.length),
          16777216 * this[B] +
            ((this[B + 1] << 16) | (this[B + 2] << 8) | this[B + 3])
        );
      }),
    (l.prototype.readBigUInt64LE = kt(function (B) {
      ot((B >>>= 0), "offset");
      const re = this[B],
        Ae = this[B + 7];
      (re !== void 0 && Ae !== void 0) || tt(B, this.length - 8);
      const lt = re + 256 * this[++B] + 65536 * this[++B] + this[++B] * 2 ** 24,
        Et = this[++B] + 256 * this[++B] + 65536 * this[++B] + Ae * 2 ** 24;
      return BigInt(lt) + (BigInt(Et) << BigInt(32));
    })),
    (l.prototype.readBigUInt64BE = kt(function (B) {
      ot((B >>>= 0), "offset");
      const re = this[B],
        Ae = this[B + 7];
      (re !== void 0 && Ae !== void 0) || tt(B, this.length - 8);
      const lt = re * 2 ** 24 + 65536 * this[++B] + 256 * this[++B] + this[++B],
        Et = this[++B] * 2 ** 24 + 65536 * this[++B] + 256 * this[++B] + Ae;
      return (BigInt(lt) << BigInt(32)) + BigInt(Et);
    })),
    (l.prototype.readIntLE = function (B, re, Ae) {
      (B >>>= 0), (re >>>= 0), Ae || L(B, re, this.length);
      let lt = this[B],
        Et = 1,
        St = 0;
      for (; ++St < re && (Et *= 256); ) lt += this[B + St] * Et;
      return (Et *= 128), lt >= Et && (lt -= Math.pow(2, 8 * re)), lt;
    }),
    (l.prototype.readIntBE = function (B, re, Ae) {
      (B >>>= 0), (re >>>= 0), Ae || L(B, re, this.length);
      let lt = re,
        Et = 1,
        St = this[B + --lt];
      for (; lt > 0 && (Et *= 256); ) St += this[B + --lt] * Et;
      return (Et *= 128), St >= Et && (St -= Math.pow(2, 8 * re)), St;
    }),
    (l.prototype.readInt8 = function (B, re) {
      return (
        (B >>>= 0),
        re || L(B, 1, this.length),
        128 & this[B] ? -1 * (255 - this[B] + 1) : this[B]
      );
    }),
    (l.prototype.readInt16LE = function (B, re) {
      (B >>>= 0), re || L(B, 2, this.length);
      const Ae = this[B] | (this[B + 1] << 8);
      return 32768 & Ae ? 4294901760 | Ae : Ae;
    }),
    (l.prototype.readInt16BE = function (B, re) {
      (B >>>= 0), re || L(B, 2, this.length);
      const Ae = this[B + 1] | (this[B] << 8);
      return 32768 & Ae ? 4294901760 | Ae : Ae;
    }),
    (l.prototype.readInt32LE = function (B, re) {
      return (
        (B >>>= 0),
        re || L(B, 4, this.length),
        this[B] | (this[B + 1] << 8) | (this[B + 2] << 16) | (this[B + 3] << 24)
      );
    }),
    (l.prototype.readInt32BE = function (B, re) {
      return (
        (B >>>= 0),
        re || L(B, 4, this.length),
        (this[B] << 24) | (this[B + 1] << 16) | (this[B + 2] << 8) | this[B + 3]
      );
    }),
    (l.prototype.readBigInt64LE = kt(function (B) {
      ot((B >>>= 0), "offset");
      const re = this[B],
        Ae = this[B + 7];
      (re !== void 0 && Ae !== void 0) || tt(B, this.length - 8);
      const lt =
        this[B + 4] + 256 * this[B + 5] + 65536 * this[B + 6] + (Ae << 24);
      return (
        (BigInt(lt) << BigInt(32)) +
        BigInt(re + 256 * this[++B] + 65536 * this[++B] + this[++B] * 2 ** 24)
      );
    })),
    (l.prototype.readBigInt64BE = kt(function (B) {
      ot((B >>>= 0), "offset");
      const re = this[B],
        Ae = this[B + 7];
      (re !== void 0 && Ae !== void 0) || tt(B, this.length - 8);
      const lt = (re << 24) + 65536 * this[++B] + 256 * this[++B] + this[++B];
      return (
        (BigInt(lt) << BigInt(32)) +
        BigInt(this[++B] * 2 ** 24 + 65536 * this[++B] + 256 * this[++B] + Ae)
      );
    })),
    (l.prototype.readFloatLE = function (B, re) {
      return (B >>>= 0), re || L(B, 4, this.length), n.read(this, B, !0, 23, 4);
    }),
    (l.prototype.readFloatBE = function (B, re) {
      return (B >>>= 0), re || L(B, 4, this.length), n.read(this, B, !1, 23, 4);
    }),
    (l.prototype.readDoubleLE = function (B, re) {
      return (B >>>= 0), re || L(B, 8, this.length), n.read(this, B, !0, 52, 8);
    }),
    (l.prototype.readDoubleBE = function (B, re) {
      return (B >>>= 0), re || L(B, 8, this.length), n.read(this, B, !1, 52, 8);
    }),
    (l.prototype.writeUintLE = l.prototype.writeUIntLE =
      function (B, re, Ae, lt) {
        (B = +B),
          (re >>>= 0),
          (Ae >>>= 0),
          !lt && W(this, B, re, Ae, Math.pow(2, 8 * Ae) - 1, 0);
        let Et = 1,
          St = 0;
        for (this[re] = 255 & B; ++St < Ae && (Et *= 256); )
          this[re + St] = (B / Et) & 255;
        return re + Ae;
      }),
    (l.prototype.writeUintBE = l.prototype.writeUIntBE =
      function (B, re, Ae, lt) {
        (B = +B),
          (re >>>= 0),
          (Ae >>>= 0),
          !lt && W(this, B, re, Ae, Math.pow(2, 8 * Ae) - 1, 0);
        let Et = Ae - 1,
          St = 1;
        for (this[re + Et] = 255 & B; --Et >= 0 && (St *= 256); )
          this[re + Et] = (B / St) & 255;
        return re + Ae;
      }),
    (l.prototype.writeUint8 = l.prototype.writeUInt8 =
      function (B, re, Ae) {
        return (
          (B = +B),
          (re >>>= 0),
          Ae || W(this, B, re, 1, 255, 0),
          (this[re] = 255 & B),
          re + 1
        );
      }),
    (l.prototype.writeUint16LE = l.prototype.writeUInt16LE =
      function (B, re, Ae) {
        return (
          (B = +B),
          (re >>>= 0),
          Ae || W(this, B, re, 2, 65535, 0),
          (this[re] = 255 & B),
          (this[re + 1] = B >>> 8),
          re + 2
        );
      }),
    (l.prototype.writeUint16BE = l.prototype.writeUInt16BE =
      function (B, re, Ae) {
        return (
          (B = +B),
          (re >>>= 0),
          Ae || W(this, B, re, 2, 65535, 0),
          (this[re] = B >>> 8),
          (this[re + 1] = 255 & B),
          re + 2
        );
      }),
    (l.prototype.writeUint32LE = l.prototype.writeUInt32LE =
      function (B, re, Ae) {
        return (
          (B = +B),
          (re >>>= 0),
          Ae || W(this, B, re, 4, 4294967295, 0),
          (this[re + 3] = B >>> 24),
          (this[re + 2] = B >>> 16),
          (this[re + 1] = B >>> 8),
          (this[re] = 255 & B),
          re + 4
        );
      }),
    (l.prototype.writeUint32BE = l.prototype.writeUInt32BE =
      function (B, re, Ae) {
        return (
          (B = +B),
          (re >>>= 0),
          Ae || W(this, B, re, 4, 4294967295, 0),
          (this[re] = B >>> 24),
          (this[re + 1] = B >>> 16),
          (this[re + 2] = B >>> 8),
          (this[re + 3] = 255 & B),
          re + 4
        );
      }),
    (l.prototype.writeBigUInt64LE = kt(function (B, re = 0) {
      return F(this, B, re, BigInt(0), BigInt("0xffffffffffffffff"));
    })),
    (l.prototype.writeBigUInt64BE = kt(function (B, re = 0) {
      return oe(this, B, re, BigInt(0), BigInt("0xffffffffffffffff"));
    })),
    (l.prototype.writeIntLE = function (B, re, Ae, lt) {
      if (((B = +B), (re >>>= 0), !lt)) {
        const ln = Math.pow(2, 8 * Ae - 1);
        W(this, B, re, Ae, ln - 1, -ln);
      }
      let Et = 0,
        St = 1,
        Lt = 0;
      for (this[re] = 255 & B; ++Et < Ae && (St *= 256); )
        B < 0 && Lt === 0 && this[re + Et - 1] !== 0 && (Lt = 1),
          (this[re + Et] = (((B / St) >> 0) - Lt) & 255);
      return re + Ae;
    }),
    (l.prototype.writeIntBE = function (B, re, Ae, lt) {
      if (((B = +B), (re >>>= 0), !lt)) {
        const ln = Math.pow(2, 8 * Ae - 1);
        W(this, B, re, Ae, ln - 1, -ln);
      }
      let Et = Ae - 1,
        St = 1,
        Lt = 0;
      for (this[re + Et] = 255 & B; --Et >= 0 && (St *= 256); )
        B < 0 && Lt === 0 && this[re + Et + 1] !== 0 && (Lt = 1),
          (this[re + Et] = (((B / St) >> 0) - Lt) & 255);
      return re + Ae;
    }),
    (l.prototype.writeInt8 = function (B, re, Ae) {
      return (
        (B = +B),
        (re >>>= 0),
        Ae || W(this, B, re, 1, 127, -128),
        B < 0 && (B = 255 + B + 1),
        (this[re] = 255 & B),
        re + 1
      );
    }),
    (l.prototype.writeInt16LE = function (B, re, Ae) {
      return (
        (B = +B),
        (re >>>= 0),
        Ae || W(this, B, re, 2, 32767, -32768),
        (this[re] = 255 & B),
        (this[re + 1] = B >>> 8),
        re + 2
      );
    }),
    (l.prototype.writeInt16BE = function (B, re, Ae) {
      return (
        (B = +B),
        (re >>>= 0),
        Ae || W(this, B, re, 2, 32767, -32768),
        (this[re] = B >>> 8),
        (this[re + 1] = 255 & B),
        re + 2
      );
    }),
    (l.prototype.writeInt32LE = function (B, re, Ae) {
      return (
        (B = +B),
        (re >>>= 0),
        Ae || W(this, B, re, 4, 2147483647, -2147483648),
        (this[re] = 255 & B),
        (this[re + 1] = B >>> 8),
        (this[re + 2] = B >>> 16),
        (this[re + 3] = B >>> 24),
        re + 4
      );
    }),
    (l.prototype.writeInt32BE = function (B, re, Ae) {
      return (
        (B = +B),
        (re >>>= 0),
        Ae || W(this, B, re, 4, 2147483647, -2147483648),
        B < 0 && (B = 4294967295 + B + 1),
        (this[re] = B >>> 24),
        (this[re + 1] = B >>> 16),
        (this[re + 2] = B >>> 8),
        (this[re + 3] = 255 & B),
        re + 4
      );
    }),
    (l.prototype.writeBigInt64LE = kt(function (B, re = 0) {
      return F(
        this,
        B,
        re,
        -BigInt("0x8000000000000000"),
        BigInt("0x7fffffffffffffff")
      );
    })),
    (l.prototype.writeBigInt64BE = kt(function (B, re = 0) {
      return oe(
        this,
        B,
        re,
        -BigInt("0x8000000000000000"),
        BigInt("0x7fffffffffffffff")
      );
    })),
    (l.prototype.writeFloatLE = function (B, re, Ae) {
      return Xe(this, B, re, !0, Ae);
    }),
    (l.prototype.writeFloatBE = function (B, re, Ae) {
      return Xe(this, B, re, !1, Ae);
    }),
    (l.prototype.writeDoubleLE = function (B, re, Ae) {
      return ze(this, B, re, !0, Ae);
    }),
    (l.prototype.writeDoubleBE = function (B, re, Ae) {
      return ze(this, B, re, !1, Ae);
    }),
    (l.prototype.copy = function (B, re, Ae, lt) {
      if (!l.isBuffer(B)) throw new TypeError("argument should be a Buffer");
      if (
        (Ae || (Ae = 0),
        lt || lt === 0 || (lt = this.length),
        re >= B.length && (re = B.length),
        re || (re = 0),
        lt > 0 && lt < Ae && (lt = Ae),
        lt === Ae || B.length === 0 || this.length === 0)
      )
        return 0;
      if (re < 0) throw new RangeError("targetStart out of bounds");
      if (Ae < 0 || Ae >= this.length)
        throw new RangeError("Index out of range");
      if (lt < 0) throw new RangeError("sourceEnd out of bounds");
      lt > this.length && (lt = this.length),
        B.length - re < lt - Ae && (lt = B.length - re + Ae);
      const Et = lt - Ae;
      return (
        this === B && typeof Uint8Array.prototype.copyWithin == "function"
          ? this.copyWithin(re, Ae, lt)
          : Uint8Array.prototype.set.call(B, this.subarray(Ae, lt), re),
        Et
      );
    }),
    (l.prototype.fill = function (B, re, Ae, lt) {
      if (typeof B == "string") {
        if (
          (typeof re == "string"
            ? ((lt = re), (re = 0), (Ae = this.length))
            : typeof Ae == "string" && ((lt = Ae), (Ae = this.length)),
          lt !== void 0 && typeof lt != "string")
        )
          throw new TypeError("encoding must be a string");
        if (typeof lt == "string" && !l.isEncoding(lt))
          throw new TypeError("Unknown encoding: " + lt);
        if (B.length === 1) {
          const St = B.charCodeAt(0);
          ((lt === "utf8" && St < 128) || lt === "latin1") && (B = St);
        }
      } else
        typeof B == "number"
          ? (B &= 255)
          : typeof B == "boolean" && (B = Number(B));
      if (re < 0 || this.length < re || this.length < Ae)
        throw new RangeError("Out of range index");
      if (Ae <= re) return this;
      let Et;
      if (
        ((re >>>= 0),
        (Ae = Ae === void 0 ? this.length : Ae >>> 0),
        B || (B = 0),
        typeof B == "number")
      )
        for (Et = re; Et < Ae; ++Et) this[Et] = B;
      else {
        const St = l.isBuffer(B) ? B : l.from(B, lt),
          Lt = St.length;
        if (Lt === 0)
          throw new TypeError(
            'The value "' + B + '" is invalid for argument "value"'
          );
        for (Et = 0; Et < Ae - re; ++Et) this[Et + re] = St[Et % Lt];
      }
      return this;
    });
  const ht = {};
  function gt(B, re, Ae) {
    ht[B] = class extends Ae {
      constructor() {
        super(),
          Object.defineProperty(this, "message", {
            value: re.apply(this, arguments),
            writable: !0,
            configurable: !0,
          }),
          (this.name = `${this.name} [${B}]`),
          this.stack,
          delete this.name;
      }
      get code() {
        return B;
      }
      set code(lt) {
        Object.defineProperty(this, "code", {
          configurable: !0,
          enumerable: !0,
          value: lt,
          writable: !0,
        });
      }
      toString() {
        return `${this.name} [${B}]: ${this.message}`;
      }
    };
  }
  function pt(B) {
    let re = "",
      Ae = B.length;
    const lt = B[0] === "-" ? 1 : 0;
    for (; Ae >= lt + 4; Ae -= 3) re = `_${B.slice(Ae - 3, Ae)}${re}`;
    return `${B.slice(0, Ae)}${re}`;
  }
  function $t(B, re, Ae, lt, Et, St) {
    if (B > Ae || B < re) {
      const Lt = typeof re == "bigint" ? "n" : "";
      let ln;
      throw (
        ((ln =
          St > 3
            ? re === 0 || re === BigInt(0)
              ? `>= 0${Lt} and < 2${Lt} ** ${8 * (St + 1)}${Lt}`
              : `>= -(2${Lt} ** ${8 * (St + 1) - 1}${Lt}) and < 2 ** ${
                  8 * (St + 1) - 1
                }${Lt}`
            : `>= ${re}${Lt} and <= ${Ae}${Lt}`),
        new ht.ERR_OUT_OF_RANGE("value", ln, B))
      );
    }
    (function (Lt, ln, Ln) {
      ot(ln, "offset"),
        (Lt[ln] !== void 0 && Lt[ln + Ln] !== void 0) ||
          tt(ln, Lt.length - (Ln + 1));
    })(lt, Et, St);
  }
  function ot(B, re) {
    if (typeof B != "number")
      throw new ht.ERR_INVALID_ARG_TYPE(re, "number", B);
  }
  function tt(B, re, Ae) {
    throw Math.floor(B) !== B
      ? (ot(B, Ae), new ht.ERR_OUT_OF_RANGE(Ae || "offset", "an integer", B))
      : re < 0
      ? new ht.ERR_BUFFER_OUT_OF_BOUNDS()
      : new ht.ERR_OUT_OF_RANGE(
          Ae || "offset",
          `>= ${Ae ? 1 : 0} and <= ${re}`,
          B
        );
  }
  gt(
    "ERR_BUFFER_OUT_OF_BOUNDS",
    function (B) {
      return B
        ? `${B} is outside of buffer bounds`
        : "Attempt to access memory outside buffer bounds";
    },
    RangeError
  ),
    gt(
      "ERR_INVALID_ARG_TYPE",
      function (B, re) {
        return `The "${B}" argument must be of type number. Received type ${typeof re}`;
      },
      TypeError
    ),
    gt(
      "ERR_OUT_OF_RANGE",
      function (B, re, Ae) {
        let lt = `The value of "${B}" is out of range.`,
          Et = Ae;
        return (
          Number.isInteger(Ae) && Math.abs(Ae) > 2 ** 32
            ? (Et = pt(String(Ae)))
            : typeof Ae == "bigint" &&
              ((Et = String(Ae)),
              (Ae > BigInt(2) ** BigInt(32) ||
                Ae < -(BigInt(2) ** BigInt(32))) &&
                (Et = pt(Et)),
              (Et += "n")),
          (lt += ` It must be ${re}. Received ${Et}`),
          lt
        );
      },
      RangeError
    );
  const He = /[^+/0-9A-Za-z-_]/g;
  function de(B, re) {
    let Ae;
    re = re || 1 / 0;
    const lt = B.length;
    let Et = null;
    const St = [];
    for (let Lt = 0; Lt < lt; ++Lt) {
      if (((Ae = B.charCodeAt(Lt)), Ae > 55295 && Ae < 57344)) {
        if (!Et) {
          if (Ae > 56319) {
            (re -= 3) > -1 && St.push(239, 191, 189);
            continue;
          }
          if (Lt + 1 === lt) {
            (re -= 3) > -1 && St.push(239, 191, 189);
            continue;
          }
          Et = Ae;
          continue;
        }
        if (Ae < 56320) {
          (re -= 3) > -1 && St.push(239, 191, 189), (Et = Ae);
          continue;
        }
        Ae = 65536 + (((Et - 55296) << 10) | (Ae - 56320));
      } else Et && (re -= 3) > -1 && St.push(239, 191, 189);
      if (((Et = null), Ae < 128)) {
        if ((re -= 1) < 0) break;
        St.push(Ae);
      } else if (Ae < 2048) {
        if ((re -= 2) < 0) break;
        St.push((Ae >> 6) | 192, (63 & Ae) | 128);
      } else if (Ae < 65536) {
        if ((re -= 3) < 0) break;
        St.push((Ae >> 12) | 224, ((Ae >> 6) & 63) | 128, (63 & Ae) | 128);
      } else {
        if (!(Ae < 1114112)) throw new Error("Invalid code point");
        if ((re -= 4) < 0) break;
        St.push(
          (Ae >> 18) | 240,
          ((Ae >> 12) & 63) | 128,
          ((Ae >> 6) & 63) | 128,
          (63 & Ae) | 128
        );
      }
    }
    return St;
  }
  function ue(B) {
    return e.toByteArray(
      (function (re) {
        if ((re = (re = re.split("=")[0]).trim().replace(He, "")).length < 2)
          return "";
        for (; re.length % 4 != 0; ) re += "=";
        return re;
      })(B)
    );
  }
  function Z(B, re, Ae, lt) {
    let Et;
    for (Et = 0; Et < lt && !(Et + Ae >= re.length || Et >= B.length); ++Et)
      re[Et + Ae] = B[Et];
    return Et;
  }
  function ie(B, re) {
    return (
      B instanceof re ||
      (B != null &&
        B.constructor != null &&
        B.constructor.name != null &&
        B.constructor.name === re.name)
    );
  }
  function Ne(B) {
    return B != B;
  }
  const Pe = (function () {
    const B = "0123456789abcdef",
      re = new Array(256);
    for (let Ae = 0; Ae < 16; ++Ae) {
      const lt = 16 * Ae;
      for (let Et = 0; Et < 16; ++Et) re[lt + Et] = B[Ae] + B[Et];
    }
    return re;
  })();
  function kt(B) {
    return typeof BigInt > "u" ? Gt : B;
  }
  function Gt() {
    throw new Error("BigInt not supported");
  }
})(_nt),
  Object.defineProperty(Lhe, "__esModule", { value: !0 });
Lhe.SCTE35 = void 0;
const LOr = vI,
  wJ = Ohe,
  OOr = _nt;
class GOr {
  constructor() {
    this.buffer = OOr.Buffer;
  }
  parseFromB64(e) {
    const n = Uint8Array.from(
      this.parseBase64(e)
        .split("")
        .map((r) => r.charCodeAt(0))
    );
    return this.parseSCTE35Data(n);
  }
  parseFromHex(e) {
    const n = e.match(/[a-f\d]{2}/gi) || [],
      r = Uint8Array.from(n.map((i) => parseInt(i, 16)));
    return this.parseSCTE35Data(r);
  }
  parseBase64(e) {
    return this.buffer.from(e, "base64").toString("binary");
  }
  spliceEvent(e, n, r) {
    let i = 0;
    if (
      ((e.spliceEventId = n.getUint32(i)),
      (i += 4),
      (e.spliceEventCancelIndicator = !!(128 & n.getUint8(i++))),
      e.spliceEventCancelIndicator)
    )
      return i;
    let o = n.getUint8(i++);
    if (
      ((e.outOfNetworkIndicator = !!(128 & o)),
      (e.programSpliceFlag = !!(64 & o)),
      (e.durationFlag = !!(32 & o)),
      r === 5 && (e.spliceImmediateFlag = !!(16 & o)),
      e.programSpliceFlag)
    )
      if (r !== 5 || e.spliceImmediateFlag)
        r === 4 && ((e.utcSpliceTime = n.getUint32(i)), (i += 4));
      else {
        const l = this.timeSignal(new DataView(n.buffer, n.byteOffset + i, 5));
        (e.spliceTime = l), i++, l.specified && (i += 4);
      }
    else if (((e.componentCount = n.getUint8(i++)), r === 4)) {
      const l = [];
      for (; l.length !== e.componentCount; )
        l.push({
          componentTag: n.getUint8(i++),
          utcSpliceTime: n.getUint32(i),
        }),
          (i += 4);
      e.utcSpliceComponents = l;
    } else console.warn("scte35-js TODO: support splice_insert");
    return (
      e.durationFlag &&
        ((o = n.getUint8(i++)),
        (e.breakDuration = {
          autoReturn: !!(128 & o),
          duration: (1 & o ? wJ.THIRTY_TWO_BIT_MULTIPLIER : 0) + n.getUint32(i),
        }),
        (i += 4)),
      (e.uniqueProgramId = n.getUint16(i)),
      (i += 2),
      (e.available = n.getUint8(i++)),
      (e.expected = n.getUint8(i++)),
      i
    );
  }
  spliceSchedule(e) {
    const n = {};
    (n.spliceCount = e.getUint8(0)), (n.spliceEvents = []);
    let r = 1;
    for (; n.spliceEvents.length !== n.spliceCount; ) {
      const i = {};
      (r += this.spliceEvent(i, new DataView(e.buffer, e.byteOffset + r), 4)),
        n.spliceEvents.push(i);
    }
    return (
      r !== e.byteLength &&
        console.error(
          `scte35-js Bad read splice_schedule actual: ${r} expected: ${e.byteLength}`
        ),
      n
    );
  }
  spliceInsert(e) {
    const n = {},
      r = this.spliceEvent(n, e, 5);
    return (
      r !== e.byteLength &&
        console.error(
          `scte35-js Bad read splice_insert actual: ${r} expected: ${e.byteLength}`
        ),
      n
    );
  }
  timeSignal(e) {
    const n = {},
      r = e.getUint8(0);
    return (
      (n.specified = !!(128 & r)),
      n.specified &&
        ((n.pts = 1 & r ? wJ.THIRTY_TWO_BIT_MULTIPLIER : 0),
        (n.pts += e.getUint32(1))),
      n
    );
  }
  privateCommand(e) {
    const n = {},
      r = e.getUint32(0),
      i = new Uint8Array(e.buffer, e.byteOffset + 4, e.byteLength - 4);
    return (n.identifier = r), n.identifier && (n.rawData = i), n;
  }
  parseSCTE35Data(e) {
    const n = {},
      r = new DataView(e.buffer);
    let i = 0;
    n.tableId = r.getUint8(i++);
    let o = r.getUint8(i++);
    if (
      ((n.selectionSyntaxIndicator = !!(128 & o)),
      (n.privateIndicator = !!(64 & o)),
      (n.sectionLength = ((15 & o) << 8) + r.getUint8(i++)),
      n.sectionLength + 3 !== e.byteLength)
    )
      throw new Error(
        `Binary read error sectionLength: ${n.sectionLength} + 3 !== data.length: ${e.byteLength}`
      );
    if (
      ((n.protocolVersion = r.getUint8(i++)),
      (o = r.getUint8(i++)),
      (n.encryptedPacket = !!(128 & o)),
      (n.encryptedAlgorithm = (126 & o) >> 1),
      n.encryptedPacket &&
        console.error(
          `scte35-js splice_info_section encrypted_packet ${n.encryptedAlgorithm} not supported`
        ),
      (n.ptsAdjustment = 1 & o ? wJ.THIRTY_TWO_BIT_MULTIPLIER : 0),
      (n.ptsAdjustment += r.getUint32(i)),
      (i += 4),
      (n.cwIndex = r.getUint8(i++)),
      (n.tier = r.getUint8(i++) << 4),
      (o = r.getUint8(i++)),
      (n.tier += (240 & o) >> 4),
      (n.spliceCommandLength = ((15 & o) << 8) + r.getUint8(i++)),
      (n.spliceCommandType = r.getUint8(i++)),
      n.spliceCommandLength === 4095)
    )
      if (n.spliceCommandType === 6) {
        const l = 128 & r.getUint8(i);
        n.spliceCommandLength = l ? 5 : 1;
      } else if (n.spliceCommandType === 0) n.spliceCommandLength = 0;
      else if (n.spliceCommandType === 5) {
        let l = i;
        if (((l += 4), !(128 & r.getUint8(l++)))) {
          const u = r.getUint8(l++),
            c = 16 & u,
            d = 32 & u,
            h = 64 & u;
          if ((h && !c && (l += 5), !h)) {
            const f = r.getUint8(l++);
            (l += f), (l += c ? 0 : 5 * f);
          }
          d && (l += 5), (l += 4), (n.spliceCommandLength = l - i);
        }
      } else
        console.error(
          "scte35-js Unspecified length not supported in this context"
        );
    if (n.spliceCommandType !== 0) {
      const l = new DataView(e.buffer, i, n.spliceCommandLength);
      n.spliceCommandType === 4
        ? (n.spliceCommand = this.spliceSchedule(l))
        : n.spliceCommandType === 5
        ? (n.spliceCommand = this.spliceInsert(l))
        : n.spliceCommandType === 6
        ? (n.spliceCommand = this.timeSignal(l))
        : n.spliceCommandType === 255 &&
          (n.spliceCommand = this.privateCommand(l));
    }
    if (
      ((i += n.spliceCommandLength),
      (n.descriptorLoopLength = r.getUint16(i)),
      (i += 2),
      n.descriptorLoopLength)
    ) {
      let l = n.descriptorLoopLength;
      n.descriptors = [];
      try {
        for (; l; ) {
          const u = new DataView(e.buffer, i, l),
            c = LOr.parseDescriptor(u);
          (l -= c.descriptorLength + 2),
            (i += c.descriptorLength + 2),
            n.descriptors.push(c);
        }
      } catch (u) {
        console.error(
          `scte35-js Error reading descriptor @ ${i}, ignoring remaining bytes: ${l} in loop.`
        ),
          console.error(u),
          (i += l),
          (l = 0);
      }
    }
    return (
      (n.crc = r.getUint32(i)),
      (i += 4),
      i !== r.byteLength &&
        console.error(
          `scte35-js Bad SCTE35 read - remaining data: ${e.slice(i).join(", ")}`
        ),
      n
    );
  }
}
Lhe.SCTE35 = GOr;
var NOr = ((t) => (
  (t.START = "start"),
  (t.FIRST_QUARTILE = "firstQuartile"),
  (t.MIDPOINT = "midpoint"),
  (t.THIRD_QUARTILE = "thirdQuartile"),
  (t.COMPLETE = "complete"),
  (t.CLICK = "click"),
  (t.IMPRESSION = "impression"),
  (t.RESUME = "resume"),
  (t.PAUSE = "pause"),
  (t.ERROR = "error"),
  t
))(NOr || {});
({ ...l5r });
var FOr = ((t) => (
  (t.START = "start"),
  (t.FIRST_QUARTILE = "firstQuartile"),
  (t.MIDPOINT = "midpoint"),
  (t.THIRD_QUARTILE = "thirdQuartile"),
  (t.COMPLETE = "complete"),
  t
))(FOr || {});
function Ghe() {
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
  return {
    id: t.id || null,
    adId: t.adId || null,
    sequence: t.sequence || null,
    apiFramework: t.apiFramework || null,
    universalAdIds: [],
    creativeExtensions: [],
  };
}
const UOr = [
  "ADCATEGORIES",
  "ADCOUNT",
  "ADPLAYHEAD",
  "ADSERVINGID",
  "ADTYPE",
  "APIFRAMEWORKS",
  "APPBUNDLE",
  "ASSETURI",
  "BLOCKEDADCATEGORIES",
  "BREAKMAXADLENGTH",
  "BREAKMAXADS",
  "BREAKMAXDURATION",
  "BREAKMINADLENGTH",
  "BREAKMINDURATION",
  "BREAKPOSITION",
  "CLICKPOS",
  "CLICKTYPE",
  "CLIENTUA",
  "CONTENTID",
  "CONTENTPLAYHEAD",
  "CONTENTURI",
  "DEVICEIP",
  "DEVICEUA",
  "DOMAIN",
  "EXTENSIONS",
  "GDPRCONSENT",
  "IFA",
  "IFATYPE",
  "INVENTORYSTATE",
  "LATLONG",
  "LIMITADTRACKING",
  "MEDIAMIME",
  "MEDIAPLAYHEAD",
  "OMIDPARTNER",
  "PAGEURL",
  "PLACEMENTTYPE",
  "PLAYERCAPABILITIES",
  "PLAYERSIZE",
  "PLAYERSTATE",
  "PODSEQUENCE",
  "REGULATIONS",
  "SERVERSIDE",
  "SERVERUA",
  "TRANSACTIONID",
  "UNIVERSALADID",
  "VASTVERSIONS",
  "VERIFICATIONVENDORS",
];
function LLe(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
    n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const r = [],
    i = Snt(t);
  !e.ERRORCODE ||
    n.isCustomCode ||
    /^[0-9]{3}$/.test(e.ERRORCODE) ||
    (e.ERRORCODE = 900),
    (e.CACHEBUSTING = wnt(Math.round(1e8 * Math.random()))),
    (e.TIMESTAMP = new Date().toISOString()),
    (e.RANDOM = e.random = e.CACHEBUSTING);
  for (const o in e) e[o] = Ant(e[o]);
  for (const o in i) {
    const l = i[o];
    typeof l == "string" && r.push(Ent(l, e));
  }
  return r;
}
function Ent(t, e) {
  const n = (t = OLe(t, e)).match(/[^[\]]+(?=])/g);
  if (!n) return t;
  let r = n.filter((i) => UOr.indexOf(i) > -1);
  return r.length === 0
    ? t
    : ((r = r.reduce((i, o) => ((i[o] = -1), i), {})), OLe(t, r));
}
function OLe(t, e) {
  let n = t;
  for (const r in e) {
    const i = e[r];
    n = n.replace(new RegExp("(?:\\[|%%)(".concat(r, ")(?:\\]|%%)"), "g"), i);
  }
  return n;
}
function Snt(t) {
  return Array.isArray(t)
    ? t.map((e) => (e && e.hasOwnProperty("url") ? e.url : e))
    : t;
}
function GLe(t) {
  return /^(https?:\/\/|\/\/)/.test(t);
}
function NLe(t, e) {
  for (let n = 0; n < e.length; n++) if (Rnt(e[n], t)) return !0;
  return !1;
}
function Rnt(t, e) {
  if (t && e) {
    const n = Object.getOwnPropertyNames(t),
      r = Object.getOwnPropertyNames(e);
    return n.length === r.length && t.id === e.id && t.url === e.url;
  }
  return !1;
}
function Ant(t) {
  return encodeURIComponent(t).replace(/[!'()*]/g, (e) =>
    "%".concat(e.charCodeAt(0).toString(16))
  );
}
function wnt(t) {
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 8;
  return t.toString().padStart(e, "0");
}
const bI = {
  track: function (t, e, n) {
    LLe(t, e, n).forEach((r) => {
      typeof window < "u" && window !== null && (new Image().src = r);
    });
  },
  resolveURLTemplates: LLe,
  extractURLsFromTemplates: Snt,
  filterUrlTemplates: function (t) {
    return t.reduce(
      (e, n) => {
        const r = n.url || n;
        return GLe(r) ? e.validUrls.push(r) : e.invalidUrls.push(r), e;
      },
      { validUrls: [], invalidUrls: [] }
    );
  },
  containsTemplateObject: NLe,
  isTemplateObjectEqual: Rnt,
  encodeURIComponentRFC3986: Ant,
  replaceUrlMacros: Ent,
  isNumeric: function (t) {
    return !isNaN(parseFloat(t)) && isFinite(t);
  },
  flatten: function t(e) {
    return e.reduce((n, r) => n.concat(Array.isArray(r) ? t(r) : r), []);
  },
  joinArrayOfUniqueTemplateObjs: function () {
    let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [],
      e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    const n = Array.isArray(t) ? t : [],
      r = Array.isArray(e) ? e : [];
    return n.concat(r).reduce((i, o) => (NLe(o, i) || i.push(o), i), []);
  },
  isValidTimeValue: function (t) {
    return Number.isFinite(t) && t >= -2;
  },
  addLeadingZeros: wnt,
  isValidUrl: GLe,
  isBrowserEnvironment: function () {
    return typeof window < "u";
  },
  formatMacrosValues: function (t) {
    return typeof t != "object" ? t : JSON.stringify(t);
  },
};
function FLe(t) {
  return ["true", "TRUE", "True", "1"].includes(t);
}
function BOr(t) {
  if (t == null) return -1;
  if (bI.isNumeric(t)) return parseInt(t);
  const e = t.split(":");
  if (e.length !== 3) return -1;
  const n = e[2].split(".");
  let r = parseInt(n[0]);
  n.length === 2 && (r += parseFloat("0.".concat(n[1])));
  const i = parseInt(60 * e[1]),
    o = parseInt(60 * e[0] * 60);
  return isNaN(o) || isNaN(i) || isNaN(r) || i > 3600 || r > 60
    ? -1
    : o + i + r;
}
const tr = {
  childByName: function (t, e) {
    return Array.from(t.childNodes).find((n) => n.nodeName === e);
  },
  childrenByName: function (t, e) {
    return Array.from(t.childNodes).filter((n) => n.nodeName === e);
  },
  resolveVastAdTagURI: function (t, e) {
    if (!e) return t;
    if (t.startsWith("//")) {
      const { protocol: n } = location;
      return "".concat(n).concat(t);
    }
    if (!t.includes("://")) {
      const n = e.slice(0, e.lastIndexOf("/"));
      return "".concat(n, "/").concat(t);
    }
    return t;
  },
  parseBoolean: FLe,
  parseNodeText: function (t) {
    return t && (t.textContent || t.text || "").trim();
  },
  copyNodeAttribute: function (t, e, n) {
    const r = e.getAttribute(t);
    r && n.setAttribute(t, r);
  },
  parseAttributes: function (t) {
    return Array.from(t.attributes).reduce(
      (e, n) => ((e[n.nodeName] = n.nodeValue), e),
      {}
    );
  },
  parseDuration: BOr,
  splitVAST: function (t) {
    const e = [];
    let n = null;
    return (
      t.forEach((r, i) => {
        if (
          (r.sequence && (r.sequence = parseInt(r.sequence, 10)),
          r.sequence > 1)
        ) {
          const o = t[i - 1];
          if (o && o.sequence === r.sequence - 1) return void (n && n.push(r));
          delete r.sequence;
        }
        (n = [r]), e.push(n);
      }),
      e
    );
  },
  assignAttributes: function (t, e) {
    t &&
      Array.from(t).forEach((n) => {
        let { nodeName: r, nodeValue: i } = n;
        if (r && i && e.hasOwnProperty(r)) {
          let o = i;
          typeof e[r] == "boolean" && (o = FLe(o)), (e[r] = o);
        }
      });
  },
  mergeWrapperAdData: function (t, e) {
    var n;
    (t.errorURLTemplates = e.errorURLTemplates.concat(t.errorURLTemplates)),
      (t.impressionURLTemplates = e.impressionURLTemplates.concat(
        t.impressionURLTemplates
      )),
      (t.extensions = e.extensions.concat(t.extensions)),
      e.viewableImpression.length > 0 &&
        (t.viewableImpression = [
          ...t.viewableImpression,
          ...e.viewableImpression,
        ]),
      (t.followAdditionalWrappers = e.followAdditionalWrappers),
      (t.allowMultipleAds = e.allowMultipleAds),
      (t.fallbackOnNoAd = e.fallbackOnNoAd);
    const r = (e.creatives || []).filter((u) => u && u.type === "companion"),
      i = r.reduce(
        (u, c) => (
          (c.variations || []).forEach((d) => {
            (d.companionClickTrackingURLTemplates || []).forEach((h) => {
              bI.containsTemplateObject(h, u) || u.push(h);
            });
          }),
          u
        ),
        []
      );
    t.creatives = r.concat(t.creatives);
    const o =
        e.videoClickTrackingURLTemplates &&
        e.videoClickTrackingURLTemplates.length,
      l =
        e.videoCustomClickURLTemplates && e.videoCustomClickURLTemplates.length;
    if (
      (t.creatives.forEach((u) => {
        if (e.trackingEvents && e.trackingEvents[u.type])
          for (const c in e.trackingEvents[u.type]) {
            const d = e.trackingEvents[u.type][c];
            Array.isArray(u.trackingEvents[c]) || (u.trackingEvents[c] = []),
              (u.trackingEvents[c] = u.trackingEvents[c].concat(d));
          }
        u.type === "linear" &&
          (o &&
            (u.videoClickTrackingURLTemplates =
              u.videoClickTrackingURLTemplates.concat(
                e.videoClickTrackingURLTemplates
              )),
          l &&
            (u.videoCustomClickURLTemplates =
              u.videoCustomClickURLTemplates.concat(
                e.videoCustomClickURLTemplates
              )),
          !e.videoClickThroughURLTemplate ||
            (u.videoClickThroughURLTemplate !== null &&
              u.videoClickThroughURLTemplate !== void 0) ||
            (u.videoClickThroughURLTemplate = e.videoClickThroughURLTemplate)),
          u.type === "companion" &&
            i.length &&
            (u.variations || []).forEach((c) => {
              c.companionClickTrackingURLTemplates =
                bI.joinArrayOfUniqueTemplateObjs(
                  c.companionClickTrackingURLTemplates,
                  i
                );
            });
      }),
      e.adVerifications &&
        (t.adVerifications = t.adVerifications.concat(e.adVerifications)),
      e.blockedAdCategories &&
        (t.blockedAdCategories = t.blockedAdCategories.concat(
          e.blockedAdCategories
        )),
      (n = e.creatives) !== null && n !== void 0 && n.length)
    ) {
      const u = e.creatives.filter((c) => {
        var d;
        return (
          ((d = c.icons) === null || d === void 0 ? void 0 : d.length) &&
          !c.mediaFiles.length
        );
      });
      u.length && (t.creatives = t.creatives.concat(u));
    }
  },
};
function HOr(t, e) {
  const n = (function () {
    let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    const { id: i, adId: o, sequence: l, apiFramework: u } = Ghe(r);
    return {
      id: i,
      adId: o,
      sequence: l,
      apiFramework: u,
      type: "companion",
      required: null,
      variations: [],
    };
  })(e);
  return (
    (n.required = t.getAttribute("required") || null),
    (n.variations = tr.childrenByName(t, "Companion").map((r) => {
      const i = (function () {
        let u =
          arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
        return {
          id: u.id || null,
          adType: "companionAd",
          width: u.width || 0,
          height: u.height || 0,
          assetWidth: u.assetWidth || null,
          assetHeight: u.assetHeight || null,
          expandedWidth: u.expandedWidth || null,
          expandedHeight: u.expandedHeight || null,
          apiFramework: u.apiFramework || null,
          adSlotId: u.adSlotId || null,
          pxratio: u.pxratio || "1",
          renderingMode: u.renderingMode || "default",
          staticResources: [],
          htmlResources: [],
          iframeResources: [],
          adParameters: null,
          altText: null,
          companionClickThroughURLTemplate: null,
          companionClickTrackingURLTemplates: [],
          trackingEvents: {},
        };
      })(tr.parseAttributes(r));
      (i.htmlResources = tr.childrenByName(r, "HTMLResource").reduce((u, c) => {
        const d = tr.parseNodeText(c);
        return d ? u.concat(d) : u;
      }, [])),
        (i.iframeResources = tr
          .childrenByName(r, "IFrameResource")
          .reduce((u, c) => {
            const d = tr.parseNodeText(c);
            return d ? u.concat(d) : u;
          }, [])),
        (i.staticResources = tr
          .childrenByName(r, "StaticResource")
          .reduce((u, c) => {
            const d = tr.parseNodeText(c);
            return d
              ? u.concat({
                  url: d,
                  creativeType: c.getAttribute("creativeType") || null,
                })
              : u;
          }, [])),
        (i.altText = tr.parseNodeText(tr.childByName(r, "AltText")) || null);
      const o = tr.childByName(r, "TrackingEvents");
      o &&
        tr.childrenByName(o, "Tracking").forEach((u) => {
          const c = u.getAttribute("event"),
            d = tr.parseNodeText(u);
          c &&
            d &&
            (Array.isArray(i.trackingEvents[c]) || (i.trackingEvents[c] = []),
            i.trackingEvents[c].push(d));
        }),
        (i.companionClickTrackingURLTemplates = tr
          .childrenByName(r, "CompanionClickTracking")
          .map((u) => ({
            id: u.getAttribute("id") || null,
            url: tr.parseNodeText(u),
          }))),
        (i.companionClickThroughURLTemplate =
          tr.parseNodeText(tr.childByName(r, "CompanionClickThrough")) || null);
      const l = tr.childByName(r, "AdParameters");
      return (
        l &&
          (i.adParameters = {
            value: tr.parseNodeText(l),
            xmlEncoded: l.getAttribute("xmlEncoded") || null,
          }),
        i
      );
    })),
    n
  );
}
function XOr(t, e) {
  let n;
  const r = (function () {
    let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    const { id: d, adId: h, sequence: f, apiFramework: p } = Ghe(c);
    return {
      id: d,
      adId: h,
      sequence: f,
      apiFramework: p,
      type: "linear",
      duration: 0,
      skipDelay: null,
      mediaFiles: [],
      mezzanine: null,
      interactiveCreativeFile: null,
      closedCaptionFiles: [],
      videoClickThroughURLTemplate: null,
      videoClickTrackingURLTemplates: [],
      videoCustomClickURLTemplates: [],
      adParameters: null,
      icons: [],
      trackingEvents: {},
    };
  })(e);
  r.duration = tr.parseDuration(
    tr.parseNodeText(tr.childByName(t, "Duration"))
  );
  const i = t.getAttribute("skipoffset");
  if (i == null) r.skipDelay = null;
  else if (i.charAt(i.length - 1) === "%" && r.duration !== -1) {
    const c = parseInt(i, 10);
    r.skipDelay = r.duration * (c / 100);
  } else r.skipDelay = tr.parseDuration(i);
  const o = tr.childByName(t, "VideoClicks");
  if (o) {
    const c = tr.childByName(o, "ClickThrough");
    (r.videoClickThroughURLTemplate = c
      ? { id: c.getAttribute("id") || null, url: tr.parseNodeText(c) }
      : null),
      tr.childrenByName(o, "ClickTracking").forEach((d) => {
        r.videoClickTrackingURLTemplates.push({
          id: d.getAttribute("id") || null,
          url: tr.parseNodeText(d),
        });
      }),
      tr.childrenByName(o, "CustomClick").forEach((d) => {
        r.videoCustomClickURLTemplates.push({
          id: d.getAttribute("id") || null,
          url: tr.parseNodeText(d),
        });
      });
  }
  const l = tr.childByName(t, "AdParameters");
  l &&
    (r.adParameters = {
      value: tr.parseNodeText(l),
      xmlEncoded: l.getAttribute("xmlEncoded") || null,
    }),
    tr.childrenByName(t, "TrackingEvents").forEach((c) => {
      tr.childrenByName(c, "Tracking").forEach((d) => {
        let h = d.getAttribute("event");
        const f = tr.parseNodeText(d);
        if (h && f) {
          if (h === "progress") {
            if (((n = d.getAttribute("offset")), !n)) return;
            h =
              n.charAt(n.length - 1) === "%"
                ? "progress-".concat(n)
                : "progress-".concat(Math.round(tr.parseDuration(n)));
          }
          Array.isArray(r.trackingEvents[h]) || (r.trackingEvents[h] = []),
            r.trackingEvents[h].push(f);
        }
      });
    }),
    tr.childrenByName(t, "MediaFiles").forEach((c) => {
      tr.childrenByName(c, "MediaFile").forEach((g) => {
        r.mediaFiles.push(
          (function (y) {
            const v = {
              id: null,
              fileURL: null,
              fileSize: 0,
              deliveryType: "progressive",
              mimeType: null,
              mediaType: null,
              codec: null,
              bitrate: 0,
              minBitrate: 0,
              maxBitrate: 0,
              width: 0,
              height: 0,
              apiFramework: null,
              scalable: null,
              maintainAspectRatio: null,
            };
            (v.id = y.getAttribute("id")),
              (v.fileURL = tr.parseNodeText(y)),
              (v.deliveryType = y.getAttribute("delivery")),
              (v.codec = y.getAttribute("codec")),
              (v.mimeType = y.getAttribute("type")),
              (v.mediaType = y.getAttribute("mediaType") || "2D"),
              (v.apiFramework = y.getAttribute("apiFramework")),
              (v.fileSize = parseInt(y.getAttribute("fileSize") || 0)),
              (v.bitrate = parseInt(y.getAttribute("bitrate") || 0)),
              (v.minBitrate = parseInt(y.getAttribute("minBitrate") || 0)),
              (v.maxBitrate = parseInt(y.getAttribute("maxBitrate") || 0)),
              (v.width = parseInt(y.getAttribute("width") || 0)),
              (v.height = parseInt(y.getAttribute("height") || 0));
            const b = y.getAttribute("scalable");
            b && typeof b == "string" && (v.scalable = tr.parseBoolean(b));
            const w = y.getAttribute("maintainAspectRatio");
            return (
              w &&
                typeof w == "string" &&
                (v.maintainAspectRatio = tr.parseBoolean(w)),
              v
            );
          })(g)
        );
      });
      const d = tr.childByName(c, "InteractiveCreativeFile");
      d &&
        (r.interactiveCreativeFile = (function (g) {
          const y = (function () {
            let v =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : {};
            return {
              type: v.type || null,
              apiFramework: v.apiFramework || null,
              variableDuration: tr.parseBoolean(v.variableDuration),
              fileURL: null,
            };
          })(tr.parseAttributes(g));
          return (y.fileURL = tr.parseNodeText(g)), y;
        })(d));
      const h = tr.childByName(c, "ClosedCaptionFiles");
      h &&
        tr.childrenByName(h, "ClosedCaptionFile").forEach((g) => {
          const y = (function () {
            let v =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : {};
            return {
              type: v.type || null,
              language: v.language || null,
              fileURL: null,
            };
          })(tr.parseAttributes(g));
          (y.fileURL = tr.parseNodeText(g)), r.closedCaptionFiles.push(y);
        });
      const f = tr.childByName(c, "Mezzanine"),
        p = (function (g, y) {
          const v = {};
          let b = !1;
          return (
            ["delivery", "type", "width", "height"].forEach((w) => {
              g && g.getAttribute(w) ? (v[w] = g.getAttribute(w)) : (b = !0);
            }),
            b ? null : v
          );
        })(f);
      if (p) {
        const g = {
          id: null,
          fileURL: null,
          delivery: null,
          codec: null,
          type: null,
          width: 0,
          height: 0,
          fileSize: 0,
          mediaType: "2D",
        };
        (g.id = f.getAttribute("id")),
          (g.fileURL = tr.parseNodeText(f)),
          (g.delivery = p.delivery),
          (g.codec = f.getAttribute("codec")),
          (g.type = p.type),
          (g.width = parseInt(p.width, 10)),
          (g.height = parseInt(p.height, 10)),
          (g.fileSize = parseInt(f.getAttribute("fileSize"), 10)),
          (g.mediaType = f.getAttribute("mediaType") || "2D"),
          (r.mezzanine = g);
      }
    });
  const u = tr.childByName(t, "Icons");
  return (
    u &&
      tr.childrenByName(u, "Icon").forEach((c) => {
        r.icons.push(
          (function (d) {
            const h = {
              program: null,
              height: 0,
              width: 0,
              xPosition: 0,
              yPosition: 0,
              apiFramework: null,
              offset: null,
              duration: 0,
              type: null,
              staticResource: null,
              htmlResource: null,
              iframeResource: null,
              pxratio: "1",
              iconClickThroughURLTemplate: null,
              iconClickTrackingURLTemplates: [],
              iconViewTrackingURLTemplate: null,
              iconClickFallbackImages: [],
            };
            var f;
            (h.program = d.getAttribute("program")),
              (h.height = parseInt(d.getAttribute("height") || 0)),
              (h.width = parseInt(d.getAttribute("width") || 0)),
              (h.xPosition =
                ((f = d.getAttribute("xPosition")),
                ["left", "right"].indexOf(f) !== -1 ? f : parseInt(f || 0))),
              (h.yPosition = (function (g) {
                return ["top", "bottom"].indexOf(g) !== -1
                  ? g
                  : parseInt(g || 0);
              })(d.getAttribute("yPosition"))),
              (h.apiFramework = d.getAttribute("apiFramework")),
              (h.pxratio = d.getAttribute("pxratio") || "1"),
              (h.offset = tr.parseDuration(d.getAttribute("offset"))),
              (h.duration = tr.parseDuration(d.getAttribute("duration"))),
              tr.childrenByName(d, "HTMLResource").forEach((g) => {
                (h.type = g.getAttribute("creativeType") || "text/html"),
                  (h.htmlResource = tr.parseNodeText(g));
              }),
              tr.childrenByName(d, "IFrameResource").forEach((g) => {
                (h.type = g.getAttribute("creativeType") || 0),
                  (h.iframeResource = tr.parseNodeText(g));
              }),
              tr.childrenByName(d, "StaticResource").forEach((g) => {
                (h.type = g.getAttribute("creativeType") || 0),
                  (h.staticResource = tr.parseNodeText(g));
              });
            const p = tr.childByName(d, "IconClicks");
            if (p) {
              (h.iconClickThroughURLTemplate = tr.parseNodeText(
                tr.childByName(p, "IconClickThrough")
              )),
                tr.childrenByName(p, "IconClickTracking").forEach((y) => {
                  h.iconClickTrackingURLTemplates.push({
                    id: y.getAttribute("id") || null,
                    url: tr.parseNodeText(y),
                  });
                });
              const g = tr.childByName(p, "IconClickFallbackImages");
              g &&
                tr.childrenByName(g, "IconClickFallbackImage").forEach((y) => {
                  h.iconClickFallbackImages.push({
                    url: tr.parseNodeText(y) || null,
                    width: y.getAttribute("width") || null,
                    height: y.getAttribute("height") || null,
                  });
                });
            }
            return (
              (h.iconViewTrackingURLTemplate = tr.parseNodeText(
                tr.childByName(d, "IconViewTracking")
              )),
              h
            );
          })(c)
        );
      }),
    r
  );
}
function VOr(t, e) {
  const n = (function () {
    let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    const { id: i, adId: o, sequence: l, apiFramework: u } = Ghe(r);
    return {
      id: i,
      adId: o,
      sequence: l,
      apiFramework: u,
      type: "nonlinear",
      variations: [],
      trackingEvents: {},
    };
  })(e);
  return (
    tr.childrenByName(t, "TrackingEvents").forEach((r) => {
      let i, o;
      tr.childrenByName(r, "Tracking").forEach((l) => {
        (i = l.getAttribute("event")),
          (o = tr.parseNodeText(l)),
          i &&
            o &&
            (Array.isArray(n.trackingEvents[i]) || (n.trackingEvents[i] = []),
            n.trackingEvents[i].push(o));
      });
    }),
    tr.childrenByName(t, "NonLinear").forEach((r) => {
      const i = {
        id: null,
        width: 0,
        height: 0,
        expandedWidth: 0,
        expandedHeight: 0,
        scalable: !0,
        maintainAspectRatio: !0,
        minSuggestedDuration: 0,
        apiFramework: "static",
        adType: "nonLinearAd",
        type: null,
        staticResource: null,
        htmlResource: null,
        iframeResource: null,
        nonlinearClickThroughURLTemplate: null,
        nonlinearClickTrackingURLTemplates: [],
        adParameters: null,
      };
      (i.id = r.getAttribute("id") || null),
        (i.width = r.getAttribute("width")),
        (i.height = r.getAttribute("height")),
        (i.expandedWidth = r.getAttribute("expandedWidth")),
        (i.expandedHeight = r.getAttribute("expandedHeight")),
        (i.scalable = tr.parseBoolean(r.getAttribute("scalable"))),
        (i.maintainAspectRatio = tr.parseBoolean(
          r.getAttribute("maintainAspectRatio")
        )),
        (i.minSuggestedDuration = tr.parseDuration(
          r.getAttribute("minSuggestedDuration")
        )),
        (i.apiFramework = r.getAttribute("apiFramework")),
        tr.childrenByName(r, "HTMLResource").forEach((l) => {
          (i.type = l.getAttribute("creativeType") || "text/html"),
            (i.htmlResource = tr.parseNodeText(l));
        }),
        tr.childrenByName(r, "IFrameResource").forEach((l) => {
          (i.type = l.getAttribute("creativeType") || 0),
            (i.iframeResource = tr.parseNodeText(l));
        }),
        tr.childrenByName(r, "StaticResource").forEach((l) => {
          (i.type = l.getAttribute("creativeType") || 0),
            (i.staticResource = tr.parseNodeText(l));
        });
      const o = tr.childByName(r, "AdParameters");
      o &&
        (i.adParameters = {
          value: tr.parseNodeText(o),
          xmlEncoded: o.getAttribute("xmlEncoded") || null,
        }),
        (i.nonlinearClickThroughURLTemplate = tr.parseNodeText(
          tr.childByName(r, "NonLinearClickThrough")
        )),
        tr.childrenByName(r, "NonLinearClickTracking").forEach((l) => {
          i.nonlinearClickTrackingURLTemplates.push({
            id: l.getAttribute("id") || null,
            url: tr.parseNodeText(l),
          });
        }),
        n.variations.push(i);
    }),
    n
  );
}
function ULe(t) {
  const e = [];
  return (
    t.forEach((n) => {
      const r = knt(n);
      r && e.push(r);
    }),
    e
  );
}
function knt(t) {
  if (t.nodeName === "#comment") return null;
  const e = { name: null, value: null, attributes: {}, children: [] },
    n = t.attributes,
    r = t.childNodes;
  if (((e.name = t.nodeName), t.attributes)) {
    for (const o in n)
      if (n.hasOwnProperty(o)) {
        const l = n[o];
        l.nodeName && l.nodeValue && (e.attributes[l.nodeName] = l.nodeValue);
      }
  }
  for (const o in r)
    if (r.hasOwnProperty(o)) {
      const l = knt(r[o]);
      l && e.children.push(l);
    }
  if (
    e.children.length === 0 ||
    (e.children.length === 1 &&
      ["#cdata-section", "#text"].indexOf(e.children[0].name) >= 0)
  ) {
    const o = tr.parseNodeText(t);
    o !== "" && (e.value = o), (e.children = []);
  }
  return (i = e).value === null &&
    Object.keys(i.attributes).length === 0 &&
    i.children.length === 0
    ? null
    : e;
  var i;
}
function zOr(t) {
  return (
    t.getAttribute("AdID") ||
    t.getAttribute("adID") ||
    t.getAttribute("adId") ||
    null
  );
}
const A6 = {
  Wrapper: { subElements: ["VASTAdTagURI", "Impression"] },
  BlockedAdCategories: { attributes: ["authority"] },
  InLine: {
    subElements: [
      "AdSystem",
      "AdTitle",
      "Impression",
      "AdServingId",
      "Creatives",
    ],
  },
  Category: { attributes: ["authority"] },
  Pricing: { attributes: ["model", "currency"] },
  Verification: {
    oneOfinLineResources: ["JavaScriptResource", "ExecutableResource"],
    attributes: ["vendor"],
  },
  UniversalAdId: { attributes: ["idRegistry"] },
  JavaScriptResource: { attributes: ["apiFramework", "browserOptional"] },
  ExecutableResource: { attributes: ["apiFramework", "type"] },
  Tracking: { attributes: ["event"] },
  Creatives: { subElements: ["Creative"] },
  Creative: { subElements: ["UniversalAdId"] },
  Linear: { subElements: ["MediaFiles", "Duration"] },
  MediaFiles: { subElements: ["MediaFile"] },
  MediaFile: { attributes: ["delivery", "type", "width", "height"] },
  Mezzanine: { attributes: ["delivery", "type", "width", "height"] },
  NonLinear: {
    oneOfinLineResources: ["StaticResource", "IFrameResource", "HTMLResource"],
    attributes: ["width", "height"],
  },
  Companion: {
    oneOfinLineResources: ["StaticResource", "IFrameResource", "HTMLResource"],
    attributes: ["width", "height"],
  },
  StaticResource: { attributes: ["creativeType"] },
  Icons: { subElements: ["Icon"] },
  Icon: {
    oneOfinLineResources: ["StaticResource", "IFrameResource", "HTMLResource"],
  },
};
function BLe(t, e) {
  if (!A6[t.nodeName] || !A6[t.nodeName].attributes) return;
  const n = A6[t.nodeName].attributes.filter((r) => !t.getAttribute(r));
  n.length > 0 &&
    wL(
      { name: t.nodeName, parentName: t.parentNode.nodeName, attributes: n },
      e
    );
}
function HLe(t, e, n) {
  const r = A6[t.nodeName],
    i = !n && t.nodeName !== "Wrapper";
  if (r && !i) {
    if (r.subElements) {
      const o = r.subElements.filter((l) => !tr.childByName(t, l));
      o.length > 0 &&
        wL(
          {
            name: t.nodeName,
            parentName: t.parentNode.nodeName,
            subElements: o,
          },
          e
        );
    }
    n &&
      r.oneOfinLineResources &&
      (r.oneOfinLineResources.some((o) => tr.childByName(t, o)) ||
        wL(
          {
            name: t.nodeName,
            parentName: t.parentNode.nodeName,
            oneOfResources: r.oneOfinLineResources,
          },
          e
        ));
  }
}
function XLe(t) {
  return t.children && t.children.length !== 0;
}
function wL(t, e) {
  let {
      name: n,
      parentName: r,
      attributes: i,
      subElements: o,
      oneOfResources: l,
    } = t,
    u = "Element '".concat(n, "'");
  (u += i
    ? " missing required attribute(s) '".concat(i.join(", "), "' ")
    : o
    ? " missing required sub element(s) '".concat(o.join(", "), "' ")
    : l
    ? " must provide one of the following '".concat(l.join(", "), "' ")
    : " is empty"),
    e("VAST-warning", { message: u, parentElement: r, specVersion: 4.1 });
}
const jOr = {
  verifyRequiredValues: function t(e, n, r) {
    if (e && e.nodeName)
      if ((e.nodeName === "InLine" && (r = !0), BLe(e, n), XLe(e))) {
        HLe(e, n, r);
        for (let i = 0; i < e.children.length; i++) t(e.children[i], n, r);
      } else
        tr.parseNodeText(e).length === 0 &&
          wL({ name: e.nodeName, parentName: e.parentNode.nodeName }, n);
  },
  hasSubElements: XLe,
  emitMissingValueWarning: wL,
  verifyRequiredAttributes: BLe,
  verifyRequiredSubElements: HLe,
};
function WOr(t, e) {
  let { allowMultipleAds: n, followAdditionalWrappers: r } =
    arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  const i = Array.from(t.childNodes).filter((o) => {
    const l = o.nodeName.toLowerCase();
    return l === "inline" || (r !== !1 && l === "wrapper");
  });
  for (const o of i) {
    if (
      (tr.copyNodeAttribute("id", t, o),
      tr.copyNodeAttribute("sequence", t, o),
      tr.copyNodeAttribute("adType", t, o),
      o.nodeName === "Wrapper")
    )
      return { ad: ZOr(o, e), type: "WRAPPER" };
    if (o.nodeName === "InLine")
      return { ad: KOr(o, e, { allowMultipleAds: n }), type: "INLINE" };
    const l = o.nodeName.toLowerCase();
    e("VAST-warning", {
      message: "<".concat(
        o.nodeName,
        l === "inline"
          ? "> must be written <InLine>"
          : "> must be written <Wrapper>"
      ),
      wrongNode: o,
    });
  }
}
function KOr(t, e) {
  let { allowMultipleAds: n } =
    arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
  return n === !1 && t.getAttribute("sequence") ? null : Int(t, e);
}
function Int(t, e) {
  let n = [];
  e && jOr.verifyRequiredValues(t, e);
  const r = Array.from(t.childNodes),
    i = (function () {
      let o =
        arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
      return {
        id: o.id || null,
        sequence: o.sequence || null,
        adType: o.adType || null,
        adServingId: null,
        categories: [],
        expires: null,
        viewableImpression: [],
        system: null,
        title: null,
        description: null,
        advertiser: null,
        pricing: null,
        survey: null,
        errorURLTemplates: [],
        impressionURLTemplates: [],
        creatives: [],
        extensions: [],
        adVerifications: [],
        blockedAdCategories: [],
        followAdditionalWrappers: !0,
        allowMultipleAds: !1,
        fallbackOnNoAd: null,
      };
    })(tr.parseAttributes(t));
  return (
    r.forEach((o) => {
      switch (o.nodeName) {
        case "Error":
          i.errorURLTemplates.push(tr.parseNodeText(o));
          break;
        case "Impression":
          i.impressionURLTemplates.push({
            id: o.getAttribute("id") || null,
            url: tr.parseNodeText(o),
          });
          break;
        case "Creatives":
          i.creatives = (function (l) {
            const u = [];
            return (
              l.forEach((c) => {
                const d = {
                    id: c.getAttribute("id") || null,
                    adId: zOr(c),
                    sequence: c.getAttribute("sequence") || null,
                    apiFramework: c.getAttribute("apiFramework") || null,
                  },
                  h = [];
                let f;
                tr.childrenByName(c, "UniversalAdId").forEach((g) => {
                  const y = {
                    idRegistry: g.getAttribute("idRegistry") || "unknown",
                    value: tr.parseNodeText(g),
                  };
                  h.push(y);
                });
                const p = tr.childByName(c, "CreativeExtensions");
                p && (f = ULe(tr.childrenByName(p, "CreativeExtension")));
                for (const g in c.childNodes) {
                  const y = c.childNodes[g];
                  let v;
                  switch (y.nodeName) {
                    case "Linear":
                      v = XOr(y, d);
                      break;
                    case "NonLinearAds":
                      v = VOr(y, d);
                      break;
                    case "CompanionAds":
                      v = HOr(y, d);
                  }
                  v &&
                    (h && (v.universalAdIds = h),
                    f && (v.creativeExtensions = f),
                    u.push(v));
                }
              }),
              u
            );
          })(tr.childrenByName(o, "Creative"));
          break;
        case "Extensions": {
          const l = tr.childrenByName(o, "Extension");
          (i.extensions = ULe(l)),
            i.adVerifications.length ||
              (n = (function (u) {
                let c = null,
                  d = [];
                return (
                  u.some((h) => (c = tr.childByName(h, "AdVerifications"))),
                  c && (d = VLe(tr.childrenByName(c, "Verification"))),
                  d
                );
              })(l));
          break;
        }
        case "AdVerifications":
          i.adVerifications = VLe(tr.childrenByName(o, "Verification"));
          break;
        case "AdSystem":
          i.system = {
            value: tr.parseNodeText(o),
            version: o.getAttribute("version") || null,
          };
          break;
        case "AdTitle":
          i.title = tr.parseNodeText(o);
          break;
        case "AdServingId":
          i.adServingId = tr.parseNodeText(o);
          break;
        case "Category":
          i.categories.push({
            authority: o.getAttribute("authority") || null,
            value: tr.parseNodeText(o),
          });
          break;
        case "Expires":
          i.expires = parseInt(tr.parseNodeText(o), 10);
          break;
        case "ViewableImpression":
          i.viewableImpression.push(
            (function (l) {
              const u = (c, d) => {
                const h = tr.parseNodeText(d);
                return h && c.push(h), c;
              };
              return {
                id: l.getAttribute("id") || null,
                viewable: tr.childrenByName(l, "Viewable").reduce(u, []),
                notViewable: tr.childrenByName(l, "NotViewable").reduce(u, []),
                viewUndetermined: tr
                  .childrenByName(l, "ViewUndetermined")
                  .reduce(u, []),
              };
            })(o)
          );
          break;
        case "Description":
          i.description = tr.parseNodeText(o);
          break;
        case "Advertiser":
          i.advertiser = {
            id: o.getAttribute("id") || null,
            value: tr.parseNodeText(o),
          };
          break;
        case "Pricing":
          i.pricing = {
            value: tr.parseNodeText(o),
            model: o.getAttribute("model") || null,
            currency: o.getAttribute("currency") || null,
          };
          break;
        case "Survey":
          i.survey = {
            value: tr.parseNodeText(o),
            type: o.getAttribute("type") || null,
          };
          break;
        case "BlockedAdCategories":
          i.blockedAdCategories.push({
            authority: o.getAttribute("authority") || null,
            value: tr.parseNodeText(o),
          });
      }
    }),
    n.length && (i.adVerifications = i.adVerifications.concat(n)),
    i
  );
}
function ZOr(t, e) {
  const n = Int(t, e),
    r = t.getAttribute("followAdditionalWrappers"),
    i = t.getAttribute("allowMultipleAds"),
    o = t.getAttribute("fallbackOnNoAd");
  (n.followAdditionalWrappers = !r || tr.parseBoolean(r)),
    (n.allowMultipleAds = !!i && tr.parseBoolean(i)),
    (n.fallbackOnNoAd = o ? tr.parseBoolean(o) : null);
  let l = tr.childByName(t, "VASTAdTagURI");
  if (
    (l
      ? (n.nextWrapperURL = tr.parseNodeText(l))
      : ((l = tr.childByName(t, "VASTAdTagURL")),
        l && (n.nextWrapperURL = tr.parseNodeText(tr.childByName(l, "URL")))),
    n.creatives.forEach((u) => {
      if (["linear", "nonlinear"].includes(u.type)) {
        if (u.trackingEvents) {
          n.trackingEvents || (n.trackingEvents = {}),
            n.trackingEvents[u.type] || (n.trackingEvents[u.type] = {});
          for (const c in u.trackingEvents) {
            const d = u.trackingEvents[c];
            Array.isArray(n.trackingEvents[u.type][c]) ||
              (n.trackingEvents[u.type][c] = []),
              d.forEach((h) => {
                n.trackingEvents[u.type][c].push(h);
              });
          }
        }
        u.videoClickTrackingURLTemplates &&
          (Array.isArray(n.videoClickTrackingURLTemplates) ||
            (n.videoClickTrackingURLTemplates = []),
          u.videoClickTrackingURLTemplates.forEach((c) => {
            n.videoClickTrackingURLTemplates.push(c);
          })),
          u.videoClickThroughURLTemplate &&
            (n.videoClickThroughURLTemplate = u.videoClickThroughURLTemplate),
          u.videoCustomClickURLTemplates &&
            (Array.isArray(n.videoCustomClickURLTemplates) ||
              (n.videoCustomClickURLTemplates = []),
            u.videoCustomClickURLTemplates.forEach((c) => {
              n.videoCustomClickURLTemplates.push(c);
            }));
      }
    }),
    n.nextWrapperURL)
  )
    return n;
}
function VLe(t) {
  const e = [];
  return (
    t.forEach((n) => {
      const r = {
          resource: null,
          vendor: null,
          browserOptional: !1,
          apiFramework: null,
          type: null,
          parameters: null,
          trackingEvents: {},
        },
        i = Array.from(n.childNodes);
      tr.assignAttributes(n.attributes, r),
        i.forEach((l) => {
          let { nodeName: u, textContent: c, attributes: d } = l;
          switch (u) {
            case "JavaScriptResource":
            case "ExecutableResource":
              (r.resource = c.trim()), tr.assignAttributes(d, r);
              break;
            case "VerificationParameters":
              r.parameters = c.trim();
          }
        });
      const o = tr.childByName(n, "TrackingEvents");
      o &&
        tr.childrenByName(o, "Tracking").forEach((l) => {
          const u = l.getAttribute("event"),
            c = tr.parseNodeText(l);
          u &&
            c &&
            (Array.isArray(r.trackingEvents[u]) || (r.trackingEvents[u] = []),
            r.trackingEvents[u].push(c));
        }),
        e.push(r);
    }),
    e
  );
}
class YOr {
  constructor() {
    this._handlers = [];
  }
  on(e, n) {
    if (typeof n != "function")
      throw new TypeError(
        "The handler argument must be of type Function. Received type ".concat(
          typeof n
        )
      );
    if (!e)
      throw new TypeError(
        "The event argument must be of type String. Received type ".concat(
          typeof e
        )
      );
    return this._handlers.push({ event: e, handler: n }), this;
  }
  once(e, n) {
    return this.on(
      e,
      (function (r, i, o) {
        const l = { fired: !1, wrapFn: void 0 };
        function u() {
          l.fired ||
            (r.off(i, l.wrapFn), (l.fired = !0), o.bind(r)(...arguments));
        }
        return (l.wrapFn = u), u;
      })(this, e, n)
    );
  }
  off(e, n) {
    return (
      (this._handlers = this._handlers.filter(
        (r) => r.event !== e || r.handler !== n
      )),
      this
    );
  }
  emit(e) {
    for (
      var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
      i < n;
      i++
    )
      r[i - 1] = arguments[i];
    let o = !1;
    return (
      this._handlers.forEach((l) => {
        l.event === "*" && ((o = !0), l.handler(e, ...r)),
          l.event === e && ((o = !0), l.handler(...r));
      }),
      o
    );
  }
  removeAllListeners(e) {
    return e
      ? ((this._handlers = this._handlers.filter((n) => n.event !== e)), this)
      : ((this._handlers = []), this);
  }
  listenerCount(e) {
    return this._handlers.filter((n) => n.event === e).length;
  }
  listeners(e) {
    return this._handlers.reduce(
      (n, r) => (r.event === e && n.push(r.handler), n),
      []
    );
  }
  eventNames() {
    return this._handlers.map((e) => e.event);
  }
}
let zLe = 0,
  lae = 0;
const QOr = (t, e) => {
    !t || !e || t <= 0 || e <= 0 || (lae = (lae * zLe + (8 * t) / e) / ++zLe);
  },
  JOr = { ERRORCODE: 900, extensions: [] },
  jLe = "VAST response version not supported";
class qOr extends YOr {
  constructor() {
    let { fetcher: e } =
      arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    super(),
      (this.maxWrapperDepth = null),
      (this.rootErrorURLTemplates = []),
      (this.errorURLTemplates = []),
      (this.remainingAds = []),
      (this.parsingOptions = {}),
      (this.fetcher = e || null);
  }
  trackVastError(e, n) {
    for (
      var r = arguments.length, i = new Array(r > 2 ? r - 2 : 0), o = 2;
      o < r;
      o++
    )
      i[o - 2] = arguments[o];
    this.emit("VAST-error", Object.assign({}, JOr, n, ...i)), bI.track(e, n);
  }
  getErrorURLTemplates() {
    return this.rootErrorURLTemplates.concat(this.errorURLTemplates);
  }
  getEstimatedBitrate() {
    return lae;
  }
  initParsingStatus() {
    let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
    (this.maxWrapperDepth = e.wrapperLimit || 10),
      (this.parsingOptions = { allowMultipleAds: e.allowMultipleAds }),
      (this.rootURL = ""),
      this.resetParsingStatus(),
      QOr(e.byteLength, e.requestDuration);
  }
  resetParsingStatus() {
    (this.errorURLTemplates = []),
      (this.rootErrorURLTemplates = []),
      (this.vastVersion = null);
  }
  getRemainingAds(e) {
    if (this.remainingAds.length === 0)
      return Promise.reject(
        new Error("No more ads are available for the given VAST")
      );
    const n = e ? bI.flatten(this.remainingAds) : this.remainingAds.shift();
    return (
      (this.errorURLTemplates = []),
      this.resolveAds(n, { wrapperDepth: 0, url: this.rootURL }).then((r) =>
        this.buildVASTResponse(r)
      )
    );
  }
  parseVAST(e) {
    let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
    return (
      this.initParsingStatus(n),
      (n.isRootVAST = !0),
      this.parse(e, n).then((r) => this.buildVASTResponse(r))
    );
  }
  buildVASTResponse(e) {
    const n = (function (r) {
      let { ads: i, errorURLTemplates: o, version: l } = r;
      return { ads: i || [], errorURLTemplates: o || [], version: l || null };
    })({
      ads: e,
      errorURLTemplates: this.getErrorURLTemplates(),
      version: this.vastVersion,
    });
    return this.completeWrapperResolving(n), n;
  }
  parseVastXml(e, n) {
    let {
      isRootVAST: r = !1,
      url: i = null,
      wrapperDepth: o = 0,
      allowMultipleAds: l,
      followAdditionalWrappers: u,
    } = n;
    if (!e || !e.documentElement || e.documentElement.nodeName !== "VAST") {
      var c;
      this.emit("VAST-ad-parsed", { type: "ERROR", url: i, wrapperDepth: o });
      const p =
        (e == null || (c = e.documentElement) === null || c === void 0
          ? void 0
          : c.nodeName) === "VideoAdServingTemplate";
      throw new Error(p ? jLe : "Invalid VAST XMLDocument");
    }
    const d = [],
      h = e.documentElement.childNodes,
      f = e.documentElement.getAttribute("version");
    r && f && (this.vastVersion = f);
    for (const p in h) {
      const g = h[p];
      if (g.nodeName === "Error") {
        const y = tr.parseNodeText(g);
        r ? this.rootErrorURLTemplates.push(y) : this.errorURLTemplates.push(y);
      } else if (g.nodeName === "Ad") {
        if (this.vastVersion && parseFloat(this.vastVersion) < 3) l = !0;
        else if (l === !1 && d.length > 1) break;
        const y = WOr(g, this.emit.bind(this), {
          allowMultipleAds: l,
          followAdditionalWrappers: u,
        });
        y.ad
          ? (d.push(y.ad),
            this.emit("VAST-ad-parsed", {
              type: y.type,
              url: i,
              wrapperDepth: o,
              adIndex: d.length - 1,
              vastVersion: f,
            }))
          : this.trackVastError(this.getErrorURLTemplates(), {
              ERRORCODE: 101,
            });
      }
    }
    return d;
  }
  parse(e) {
    let {
        url: n = null,
        resolveAll: r = !0,
        wrapperSequence: i = null,
        previousUrl: o = null,
        wrapperDepth: l = 0,
        isRootVAST: u = !1,
        followAdditionalWrappers: c,
        allowMultipleAds: d,
      } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
      h = [];
    this.vastVersion && parseFloat(this.vastVersion) < 3 && u && (d = !0);
    try {
      h = this.parseVastXml(e, {
        isRootVAST: u,
        url: n,
        wrapperDepth: l,
        allowMultipleAds: d,
        followAdditionalWrappers: c,
      });
    } catch (f) {
      return Promise.reject(f);
    }
    return (
      h.length === 1 && i != null && (h[0].sequence = i),
      r === !1 &&
        ((this.remainingAds = tr.splitVAST(h)),
        (h = this.remainingAds.shift())),
      this.resolveAds(h, { wrapperDepth: l, previousUrl: o, url: n })
    );
  }
  resolveAds() {
    let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [],
      {
        wrapperDepth: n,
        previousUrl: r,
        url: i,
      } = arguments.length > 1 ? arguments[1] : void 0;
    const o = [];
    return (
      (r = i),
      e.forEach((l) => {
        const u = this.resolveWrappers(l, n, r);
        o.push(u);
      }),
      Promise.all(o).then((l) => bI.flatten(l))
    );
  }
  resolveWrappers(e, n, r) {
    const i = { ...e };
    return new Promise((o) => {
      var l;
      if ((n++, !i.nextWrapperURL)) return delete i.nextWrapperURL, o(i);
      if (!this.fetcher)
        return (
          (i.VASTAdTagURI = i.nextWrapperURL), delete i.nextWrapperURL, o(i)
        );
      if (n >= this.maxWrapperDepth)
        return (i.errorCode = 302), delete i.nextWrapperURL, o(i);
      i.nextWrapperURL = tr.resolveVastAdTagURI(i.nextWrapperURL, r);
      const u =
          (l = this.parsingOptions.allowMultipleAds) !== null && l !== void 0
            ? l
            : i.allowMultipleAds,
        c = i.sequence;
      this.fetcher
        .fetchVAST({
          url: i.nextWrapperURL,
          emitter: this.emit.bind(this),
          maxWrapperDepth: this.maxWrapperDepth,
        })
        .then((d) =>
          this.parse(d, {
            url: i.nextWrapperURL,
            previousUrl: r,
            wrapperSequence: c,
            wrapperDepth: n,
            followAdditionalWrappers: i.followAdditionalWrappers,
            allowMultipleAds: u,
          }).then((h) => {
            if ((delete i.nextWrapperURL, h.length === 0))
              return (i.creatives = []), o(i);
            h.forEach((f) => {
              f && tr.mergeWrapperAdData(f, i);
            }),
              o(h);
          })
        )
        .catch((d) => {
          (i.errorCode = d.message === jLe ? 102 : 301),
            (i.errorMessage = d.message),
            o(i);
        });
    });
  }
  completeWrapperResolving(e) {
    if (e.ads.length === 0)
      this.trackVastError(e.errorURLTemplates, { ERRORCODE: 303 });
    else
      for (let n = e.ads.length - 1; n >= 0; n--) {
        const r = e.ads[n],
          i = !r.creatives.some((o) => {
            var l;
            return (
              ((l = o.mediaFiles) === null || l === void 0
                ? void 0
                : l.length) > 0
            );
          });
        (!r.errorCode && !i) ||
          r.VASTAdTagURI ||
          (this.trackVastError(
            r.errorURLTemplates.concat(e.errorURLTemplates),
            { ERRORCODE: r.errorCode || 303 },
            { ERRORMESSAGE: r.errorMessage || "" },
            { extensions: r.extensions },
            { system: r.system }
          ),
          e.ads.splice(n, 1));
      }
  }
}
new qOr();
function WLe(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function kf(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? WLe(Object(n), !0).forEach(function (r) {
          cs(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : WLe(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Ya() {
  Ya = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = E.iterator[S.method];
    if (L === void 0) {
      if (((S.delegate = null), S.method === "throw")) {
        if (
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")
        )
          return f;
        (S.method = "throw"),
          (S.arg = new TypeError(
            "The iterator does not provide a 'throw' method"
          ));
      }
      return f;
    }
    var W = h(L, E.iterator, S.arg);
    if (W.type === "throw")
      return (S.method = "throw"), (S.arg = W.arg), (S.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((S[E.resultName] = F.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : F
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function mD(t) {
  return (mD =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function KLe(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function Eu(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        KLe(o, r, i, l, u, "next", c);
      }
      function u(c) {
        KLe(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function Hh(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function ZLe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function Xh(t, e, n) {
  return (
    e && ZLe(t.prototype, e),
    n && ZLe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function cs(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function sP(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && Dnt(t, e);
}
function uae(t) {
  return (uae = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function Dnt(t, e) {
  return (Dnt = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function eGr() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function _o(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function tGr(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return _o(t);
}
function lP(t) {
  var e = eGr();
  return function () {
    var n,
      r = uae(t);
    if (e) {
      var i = uae(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return tGr(this, n);
  };
}
function nGr(t) {
  return rGr(t) || iGr(t) || aGr(t) || oGr();
}
function rGr(t) {
  if (Array.isArray(t)) return cae(t);
}
function iGr(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function aGr(t, e) {
  if (t) {
    if (typeof t == "string") return cae(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? cae(t, e)
        : void 0
    );
  }
}
function cae(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function oGr() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var dae = ja,
  sGr = xE,
  lGr = Ss,
  uGr = Eb,
  cGr = xR,
  dGr = jB,
  hGr = /MSIE .\./.test(uGr),
  fGr = dae.Function,
  YLe = function (t) {
    return hGr
      ? function (e, n) {
          var r = dGr(arguments.length, 1) > 2,
            i = lGr(e) ? e : fGr(e),
            o = r ? cGr(arguments, 2) : void 0;
          return t(
            r
              ? function () {
                  sGr(i, this, o);
                }
              : i,
            n
          );
        }
      : t;
  },
  Pnt = { setTimeout: YLe(dae.setTimeout), setInterval: YLe(dae.setInterval) },
  pGr = Di,
  gGr = ja,
  QLe = Pnt.setInterval;
pGr(
  { global: !0, bind: !0, forced: gGr.setInterval !== QLe },
  { setInterval: QLe }
);
var mGr = Di,
  yGr = ja,
  JLe = Pnt.setTimeout;
mGr(
  { global: !0, bind: !0, forced: yGr.setTimeout !== JLe },
  { setTimeout: JLe }
);
var vGr = Di,
  bGr = sh.every,
  _Gr = ME,
  TGr = _Gr("every");
vGr(
  { target: "Array", proto: !0, forced: !TGr },
  {
    every: function (t) {
      return bGr(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var EGr = Di,
  SGr = qS,
  RGr = U5.indexOf,
  AGr = ME,
  hae = SGr([].indexOf),
  qLe = !!hae && 1 / hae([1], 1, -0) < 0,
  wGr = AGr("indexOf");
EGr(
  { target: "Array", proto: !0, forced: qLe || !wGr },
  {
    indexOf: function (t) {
      var e = arguments.length > 1 ? arguments[1] : void 0;
      return qLe ? hae(this, t, e) || 0 : RGr(this, t, e);
    },
  }
);
var Mnt = Fa,
  kGr = U0,
  IGr = $u,
  DGr = pu,
  e5e = xR,
  PGr = L5,
  Cnt = Function,
  MGr = Mnt([].concat),
  CGr = Mnt([].join),
  kJ = {},
  $Gr = function (t, e, n) {
    if (!DGr(kJ, e)) {
      for (var r = [], i = 0; i < e; i++) r[i] = "a[" + i + "]";
      kJ[e] = Cnt("C,a", "return new C(" + CGr(r, ",") + ")");
    }
    return kJ[e](t, n);
  },
  xGr = PGr
    ? Cnt.bind
    : function (t) {
        var e = kGr(this),
          n = e.prototype,
          r = e5e(arguments, 1),
          i = function () {
            var o = MGr(r, e5e(arguments));
            return this instanceof i ? $Gr(e, o.length, o) : e.apply(t, o);
          };
        return IGr(n) && (i.prototype = n), i;
      },
  LGr = Di,
  t5e = xGr;
LGr(
  { target: "Function", proto: !0, forced: Function.bind !== t5e },
  { bind: t5e }
);
var OGr = Di;
OGr(
  { target: "Array", proto: !0, forced: [].forEach != are },
  { forEach: are }
);
var $nt = Fa,
  GGr = ad,
  Nhe = Date.prototype,
  n5e = "Invalid Date",
  xnt = "toString",
  NGr = $nt(Nhe[xnt]),
  FGr = $nt(Nhe.getTime);
String(new Date(NaN)) != n5e &&
  GGr(Nhe, xnt, function () {
    var t = FGr(this);
    return t == t ? NGr(this) : n5e;
  });
var Lnt = ja,
  UGr = aa,
  BGr = Fa,
  HGr = Qu,
  XGr = QB.trim,
  r5e = YB,
  nx = Lnt.parseInt,
  i5e = Lnt.Symbol,
  a5e = i5e && i5e.iterator,
  Ont = /^[+-]?0x/i,
  VGr = BGr(Ont.exec),
  zGr =
    nx(r5e + "08") !== 8 ||
    nx(r5e + "0x16") !== 22 ||
    (a5e &&
      !UGr(function () {
        nx(Object(a5e));
      })),
  o5e = zGr
    ? function (t, e) {
        var n = XGr(HGr(t));
        return nx(n, e >>> 0 || (VGr(Ont, n) ? 16 : 10));
      }
    : nx,
  jGr = Di;
function WGr(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function s5e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function KGr(t, e, n) {
  return (
    e && s5e(t.prototype, e),
    n && s5e(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function ZGr(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function YGr(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && Gnt(t, e);
}
function fae(t) {
  return (fae = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function Gnt(t, e) {
  return (Gnt = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function QGr() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function w6(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function JGr(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return w6(t);
}
function qGr(t) {
  var e = QGr();
  return function () {
    var n,
      r = fae(t);
    if (e) {
      var i = fae(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return JGr(this, n);
  };
}
jGr({ global: !0, forced: parseInt != o5e }, { parseInt: o5e });
var CN = function (t) {
    return t && t.Math == Math && t;
  },
  ns =
    CN(typeof globalThis == "object" && globalThis) ||
    CN(typeof window == "object" && window) ||
    CN(typeof self == "object" && self) ||
    CN(typeof tI == "object" && tI) ||
    (function () {
      return this;
    })() ||
    tI ||
    Function("return this")(),
  uP = {},
  Ho = function (t) {
    try {
      return !!t();
    } catch {
      return !0;
    }
  },
  e3r = Ho,
  Vh = !e3r(function () {
    return (
      Object.defineProperty({}, 1, {
        get: function () {
          return 7;
        },
      })[1] != 7
    );
  }),
  t3r = Ho,
  OO = !t3r(function () {
    var t = function () {}.bind();
    return typeof t != "function" || t.hasOwnProperty("prototype");
  }),
  n3r = OO,
  $N = Function.prototype.call,
  ch = n3r
    ? $N.bind($N)
    : function () {
        return $N.apply($N, arguments);
      },
  Nnt = {},
  Fnt = {}.propertyIsEnumerable,
  Unt = Object.getOwnPropertyDescriptor,
  r3r = Unt && !Fnt.call({ 1: 2 }, 1);
Nnt.f = r3r
  ? function (t) {
      var e = Unt(this, t);
      return !!e && e.enumerable;
    }
  : Fnt;
var lT,
  k6,
  GO = function (t, e) {
    return {
      enumerable: !(1 & t),
      configurable: !(2 & t),
      writable: !(4 & t),
      value: e,
    };
  },
  Bnt = OO,
  Hnt = Function.prototype,
  pae = Hnt.call,
  i3r = Bnt && Hnt.bind.bind(pae, pae),
  us = Bnt
    ? i3r
    : function (t) {
        return function () {
          return pae.apply(t, arguments);
        };
      },
  Xnt = us,
  a3r = Xnt({}.toString),
  o3r = Xnt("".slice),
  VR = function (t) {
    return o3r(a3r(t), 8, -1);
  },
  s3r = us,
  l3r = Ho,
  u3r = VR,
  IJ = Object,
  c3r = s3r("".split),
  Fhe = l3r(function () {
    return !IJ("z").propertyIsEnumerable(0);
  })
    ? function (t) {
        return u3r(t) == "String" ? c3r(t, "") : IJ(t);
      }
    : IJ,
  cP = function (t) {
    return t == null;
  },
  d3r = cP,
  h3r = TypeError,
  NO = function (t) {
    if (d3r(t)) throw h3r("Can't call method on " + t);
    return t;
  },
  f3r = Fhe,
  p3r = NO,
  VE = function (t) {
    return f3r(p3r(t));
  },
  gae = typeof document == "object" && document.all,
  g3r = gae === void 0 && gae !== void 0,
  Vnt = { all: gae, IS_HTMLDDA: g3r },
  znt = Vnt,
  m3r = znt.all,
  Zl = znt.IS_HTMLDDA
    ? function (t) {
        return typeof t == "function" || t === m3r;
      }
    : function (t) {
        return typeof t == "function";
      },
  l5e = Zl,
  jnt = Vnt,
  y3r = jnt.all,
  Oc = jnt.IS_HTMLDDA
    ? function (t) {
        return typeof t == "object" ? t !== null : l5e(t) || t === y3r;
      }
    : function (t) {
        return typeof t == "object" ? t !== null : l5e(t);
      },
  DJ = ns,
  v3r = Zl,
  b3r = function (t) {
    return v3r(t) ? t : void 0;
  },
  zE = function (t, e) {
    return arguments.length < 2 ? b3r(DJ[t]) : DJ[t] && DJ[t][e];
  },
  _3r = us,
  zR = _3r({}.isPrototypeOf),
  jE = (typeof navigator < "u" && String(navigator.userAgent)) || "",
  Wnt = ns,
  PJ = jE,
  u5e = Wnt.process,
  c5e = Wnt.Deno,
  d5e = (u5e && u5e.versions) || (c5e && c5e.version),
  h5e = d5e && d5e.v8;
h5e && (k6 = (lT = h5e.split("."))[0] > 0 && lT[0] < 4 ? 1 : +(lT[0] + lT[1])),
  !k6 &&
    PJ &&
    (!(lT = PJ.match(/Edge\/(\d+)/)) || lT[1] >= 74) &&
    (lT = PJ.match(/Chrome\/(\d+)/)) &&
    (k6 = +lT[1]);
var FO = k6,
  f5e = FO,
  T3r = Ho,
  E3r = ns,
  S3r = E3r.String,
  Knt =
    !!Object.getOwnPropertySymbols &&
    !T3r(function () {
      var t = Symbol();
      return (
        !S3r(t) ||
        !(Object(t) instanceof Symbol) ||
        (!Symbol.sham && f5e && f5e < 41)
      );
    }),
  R3r = Knt,
  Znt = R3r && !Symbol.sham && typeof Symbol.iterator == "symbol",
  A3r = zE,
  w3r = Zl,
  k3r = zR,
  I3r = Znt,
  D3r = Object,
  NH = I3r
    ? function (t) {
        return typeof t == "symbol";
      }
    : function (t) {
        var e = A3r("Symbol");
        return w3r(e) && k3r(e.prototype, D3r(t));
      },
  P3r = String,
  dP = function (t) {
    try {
      return P3r(t);
    } catch {
      return "Object";
    }
  },
  M3r = Zl,
  C3r = dP,
  $3r = TypeError,
  Im = function (t) {
    if (M3r(t)) return t;
    throw $3r(C3r(t) + " is not a function");
  },
  x3r = Im,
  L3r = cP,
  Uhe = function (t, e) {
    var n = t[e];
    return L3r(n) ? void 0 : x3r(n);
  },
  MJ = ch,
  CJ = Zl,
  $J = Oc,
  O3r = TypeError,
  G3r = function (t, e) {
    var n, r;
    if (
      (e === "string" && CJ((n = t.toString)) && !$J((r = MJ(n, t)))) ||
      (CJ((n = t.valueOf)) && !$J((r = MJ(n, t)))) ||
      (e !== "string" && CJ((n = t.toString)) && !$J((r = MJ(n, t))))
    )
      return r;
    throw O3r("Can't convert object to primitive value");
  },
  Ynt = { exports: {} },
  N3r = !1,
  p5e = ns,
  F3r = Object.defineProperty,
  Bhe = function (t, e) {
    try {
      F3r(p5e, t, { value: e, configurable: !0, writable: !0 });
    } catch {
      p5e[t] = e;
    }
    return e;
  },
  U3r = ns,
  B3r = Bhe,
  g5e = "__core-js_shared__",
  H3r = U3r[g5e] || B3r(g5e, {}),
  Hhe = H3r,
  m5e = Hhe;
(Ynt.exports = function (t, e) {
  return m5e[t] || (m5e[t] = e !== void 0 ? e : {});
})("versions", []).push({
  version: "3.31.1",
  mode: "global",
  copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)",
  license: "https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",
  source: "https://github.com/zloirock/core-js",
});
var Qnt = Ynt.exports,
  X3r = NO,
  V3r = Object,
  $v = function (t) {
    return V3r(X3r(t));
  },
  z3r = us,
  j3r = $v,
  W3r = z3r({}.hasOwnProperty),
  dh =
    Object.hasOwn ||
    function (t, e) {
      return W3r(j3r(t), e);
    },
  K3r = us,
  Z3r = 0,
  Y3r = Math.random(),
  Q3r = K3r((1).toString),
  FH = function (t) {
    return "Symbol(" + (t === void 0 ? "" : t) + ")_" + Q3r(++Z3r + Y3r, 36);
  },
  J3r = ns,
  q3r = Qnt,
  y5e = dh,
  e4r = FH,
  t4r = Knt,
  n4r = Znt,
  Uk = J3r.Symbol,
  xJ = q3r("wks"),
  r4r = n4r ? Uk.for || Uk : (Uk && Uk.withoutSetter) || e4r,
  Gc = function (t) {
    return (
      y5e(xJ, t) || (xJ[t] = t4r && y5e(Uk, t) ? Uk[t] : r4r("Symbol." + t)),
      xJ[t]
    );
  },
  i4r = ch,
  v5e = Oc,
  b5e = NH,
  a4r = Uhe,
  o4r = G3r,
  s4r = Gc,
  l4r = TypeError,
  u4r = s4r("toPrimitive"),
  Xhe = function (t, e) {
    if (!v5e(t) || b5e(t)) return t;
    var n,
      r = a4r(t, u4r);
    if (r) {
      if (
        (e === void 0 && (e = "default"), (n = i4r(r, t, e)), !v5e(n) || b5e(n))
      )
        return n;
      throw l4r("Can't convert object to primitive value");
    }
    return e === void 0 && (e = "number"), o4r(t, e);
  },
  c4r = Xhe,
  d4r = NH,
  UH = function (t) {
    var e = c4r(t, "string");
    return d4r(e) ? e : e + "";
  },
  h4r = ns,
  _5e = Oc,
  mae = h4r.document,
  f4r = _5e(mae) && _5e(mae.createElement),
  BH = function (t) {
    return f4r ? mae.createElement(t) : {};
  },
  p4r = Vh,
  g4r = Ho,
  m4r = BH,
  Jnt =
    !p4r &&
    !g4r(function () {
      return (
        Object.defineProperty(m4r("div"), "a", {
          get: function () {
            return 7;
          },
        }).a != 7
      );
    }),
  y4r = Vh,
  v4r = ch,
  b4r = Nnt,
  _4r = GO,
  T4r = VE,
  E4r = UH,
  S4r = dh,
  R4r = Jnt,
  T5e = Object.getOwnPropertyDescriptor;
uP.f = y4r
  ? T5e
  : function (t, e) {
      if (((t = T4r(t)), (e = E4r(e)), R4r))
        try {
          return T5e(t, e);
        } catch {}
      if (S4r(t, e)) return _4r(!v4r(b4r.f, t, e), t[e]);
    };
var sg = {},
  A4r = Vh,
  w4r = Ho,
  qnt =
    A4r &&
    w4r(function () {
      return (
        Object.defineProperty(function () {}, "prototype", {
          value: 42,
          writable: !1,
        }).prototype != 42
      );
    }),
  k4r = Oc,
  I4r = String,
  D4r = TypeError,
  Qf = function (t) {
    if (k4r(t)) return t;
    throw D4r(I4r(t) + " is not an object");
  },
  P4r = Vh,
  M4r = Jnt,
  C4r = qnt,
  xN = Qf,
  E5e = UH,
  $4r = TypeError,
  LJ = Object.defineProperty,
  x4r = Object.getOwnPropertyDescriptor,
  OJ = "enumerable",
  GJ = "configurable",
  NJ = "writable";
sg.f = P4r
  ? C4r
    ? function (t, e, n) {
        if (
          (xN(t),
          (e = E5e(e)),
          xN(n),
          typeof t == "function" &&
            e === "prototype" &&
            "value" in n &&
            NJ in n &&
            !n[NJ])
        ) {
          var r = x4r(t, e);
          r &&
            r[NJ] &&
            ((t[e] = n.value),
            (n = {
              configurable: GJ in n ? n[GJ] : r[GJ],
              enumerable: OJ in n ? n[OJ] : r[OJ],
              writable: !1,
            }));
        }
        return LJ(t, e, n);
      }
    : LJ
  : function (t, e, n) {
      if ((xN(t), (e = E5e(e)), xN(n), M4r))
        try {
          return LJ(t, e, n);
        } catch {}
      if ("get" in n || "set" in n) throw $4r("Accessors not supported");
      return "value" in n && (t[e] = n.value), t;
    };
var L4r = Vh,
  O4r = sg,
  G4r = GO,
  WE = L4r
    ? function (t, e, n) {
        return O4r.f(t, e, G4r(1, n));
      }
    : function (t, e, n) {
        return (t[e] = n), t;
      },
  ert = { exports: {} },
  yae = Vh,
  N4r = dh,
  trt = Function.prototype,
  F4r = yae && Object.getOwnPropertyDescriptor,
  Vhe = N4r(trt, "name"),
  U4r = Vhe && function () {}.name === "something",
  B4r = Vhe && (!yae || (yae && F4r(trt, "name").configurable)),
  HH = { EXISTS: Vhe, PROPER: U4r, CONFIGURABLE: B4r },
  H4r = us,
  X4r = Zl,
  vae = Hhe,
  V4r = H4r(Function.toString);
X4r(vae.inspectSource) ||
  (vae.inspectSource = function (t) {
    return V4r(t);
  });
var p9,
  kL,
  g9,
  zhe = vae.inspectSource,
  z4r = ns,
  j4r = Zl,
  S5e = z4r.WeakMap,
  W4r = j4r(S5e) && /native code/.test(String(S5e)),
  K4r = Qnt,
  Z4r = FH,
  R5e = K4r("keys"),
  jhe = function (t) {
    return R5e[t] || (R5e[t] = Z4r(t));
  },
  XH = {},
  Y4r = W4r,
  nrt = ns,
  Q4r = Oc,
  J4r = WE,
  FJ = dh,
  UJ = Hhe,
  q4r = jhe,
  eNr = XH,
  A5e = "Object already initialized",
  bae = nrt.TypeError,
  tNr = nrt.WeakMap,
  nNr = function (t) {
    return g9(t) ? kL(t) : p9(t, {});
  },
  rNr = function (t) {
    return function (e) {
      var n;
      if (!Q4r(e) || (n = kL(e)).type !== t)
        throw bae("Incompatible receiver, " + t + " required");
      return n;
    };
  };
if (Y4r || UJ.state) {
  var My = UJ.state || (UJ.state = new tNr());
  (My.get = My.get),
    (My.has = My.has),
    (My.set = My.set),
    (p9 = function (t, e) {
      if (My.has(t)) throw bae(A5e);
      return (e.facade = t), My.set(t, e), e;
    }),
    (kL = function (t) {
      return My.get(t) || {};
    }),
    (g9 = function (t) {
      return My.has(t);
    });
} else {
  var Ow = q4r("state");
  (eNr[Ow] = !0),
    (p9 = function (t, e) {
      if (FJ(t, Ow)) throw bae(A5e);
      return (e.facade = t), J4r(t, Ow, e), e;
    }),
    (kL = function (t) {
      return FJ(t, Ow) ? t[Ow] : {};
    }),
    (g9 = function (t) {
      return FJ(t, Ow);
    });
}
var KE = { set: p9, get: kL, has: g9, enforce: nNr, getterFor: rNr },
  Whe = us,
  iNr = Ho,
  aNr = Zl,
  LN = dh,
  _ae = Vh,
  oNr = HH.CONFIGURABLE,
  sNr = zhe,
  rrt = KE,
  lNr = rrt.enforce,
  uNr = rrt.get,
  w5e = String,
  I6 = Object.defineProperty,
  cNr = Whe("".slice),
  dNr = Whe("".replace),
  hNr = Whe([].join),
  fNr =
    _ae &&
    !iNr(function () {
      return I6(function () {}, "length", { value: 8 }).length !== 8;
    }),
  pNr = String(String).split("String"),
  gNr = (ert.exports = function (t, e, n) {
    cNr(w5e(e), 0, 7) === "Symbol(" &&
      (e = "[" + dNr(w5e(e), /^Symbol\(([^)]*)\)/, "$1") + "]"),
      n && n.getter && (e = "get " + e),
      n && n.setter && (e = "set " + e),
      (!LN(t, "name") || (oNr && t.name !== e)) &&
        (_ae ? I6(t, "name", { value: e, configurable: !0 }) : (t.name = e)),
      fNr &&
        n &&
        LN(n, "arity") &&
        t.length !== n.arity &&
        I6(t, "length", { value: n.arity });
    try {
      n && LN(n, "constructor") && n.constructor
        ? _ae && I6(t, "prototype", { writable: !1 })
        : t.prototype && (t.prototype = void 0);
    } catch {}
    var r = lNr(t);
    return (
      LN(r, "source") || (r.source = hNr(pNr, typeof e == "string" ? e : "")), t
    );
  });
Function.prototype.toString = gNr(function () {
  return (aNr(this) && uNr(this).source) || sNr(this);
}, "toString");
var irt = ert.exports,
  mNr = Zl,
  yNr = sg,
  vNr = irt,
  bNr = Bhe,
  z0 = function (t, e, n, r) {
    r || (r = {});
    var i = r.enumerable,
      o = r.name !== void 0 ? r.name : e;
    if ((mNr(n) && vNr(n, o, r), r.global)) i ? (t[e] = n) : bNr(e, n);
    else {
      try {
        r.unsafe ? t[e] && (i = !0) : delete t[e];
      } catch {}
      i
        ? (t[e] = n)
        : yNr.f(t, e, {
            value: n,
            enumerable: !1,
            configurable: !r.nonConfigurable,
            writable: !r.nonWritable,
          });
    }
    return t;
  },
  jR = {},
  _Nr = Math.ceil,
  TNr = Math.floor,
  ENr =
    Math.trunc ||
    function (t) {
      var e = +t;
      return (e > 0 ? TNr : _Nr)(e);
    },
  SNr = ENr,
  Lb = function (t) {
    var e = +t;
    return e != e || e === 0 ? 0 : SNr(e);
  },
  RNr = Lb,
  ANr = Math.max,
  wNr = Math.min,
  WR = function (t, e) {
    var n = RNr(t);
    return n < 0 ? ANr(n + e, 0) : wNr(n, e);
  },
  kNr = Lb,
  INr = Math.min,
  hP = function (t) {
    return t > 0 ? INr(kNr(t), 9007199254740991) : 0;
  },
  DNr = hP,
  lg = function (t) {
    return DNr(t.length);
  },
  PNr = VE,
  MNr = WR,
  CNr = lg,
  k5e = function (t) {
    return function (e, n, r) {
      var i,
        o = PNr(e),
        l = CNr(o),
        u = MNr(r, l);
      if (t && n != n) {
        for (; l > u; ) if ((i = o[u++]) != i) return !0;
      } else
        for (; l > u; u++) if ((t || u in o) && o[u] === n) return t || u || 0;
      return !t && -1;
    };
  },
  VH = { includes: k5e(!0), indexOf: k5e(!1) },
  $Nr = us,
  BJ = dh,
  xNr = VE,
  LNr = VH.indexOf,
  ONr = XH,
  I5e = $Nr([].push),
  art = function (t, e) {
    var n,
      r = xNr(t),
      i = 0,
      o = [];
    for (n in r) !BJ(ONr, n) && BJ(r, n) && I5e(o, n);
    for (; e.length > i; ) BJ(r, (n = e[i++])) && (~LNr(o, n) || I5e(o, n));
    return o;
  },
  Khe = [
    "constructor",
    "hasOwnProperty",
    "isPrototypeOf",
    "propertyIsEnumerable",
    "toLocaleString",
    "toString",
    "valueOf",
  ],
  GNr = art,
  NNr = Khe,
  FNr = NNr.concat("length", "prototype");
jR.f =
  Object.getOwnPropertyNames ||
  function (t) {
    return GNr(t, FNr);
  };
var ort = {};
ort.f = Object.getOwnPropertySymbols;
var UNr = zE,
  BNr = us,
  HNr = jR,
  XNr = ort,
  VNr = Qf,
  zNr = BNr([].concat),
  jNr =
    UNr("Reflect", "ownKeys") ||
    function (t) {
      var e = HNr.f(VNr(t)),
        n = XNr.f;
      return n ? zNr(e, n(t)) : e;
    },
  D5e = dh,
  WNr = jNr,
  KNr = uP,
  ZNr = sg,
  YNr = function (t, e, n) {
    for (var r = WNr(e), i = ZNr.f, o = KNr.f, l = 0; l < r.length; l++) {
      var u = r[l];
      D5e(t, u) || (n && D5e(n, u)) || i(t, u, o(e, u));
    }
  },
  QNr = Ho,
  JNr = Zl,
  qNr = /#|\.prototype\./,
  UO = function (t, e) {
    var n = tFr[eFr(t)];
    return n == rFr || (n != nFr && (JNr(e) ? QNr(e) : !!e));
  },
  eFr = (UO.normalize = function (t) {
    return String(t).replace(qNr, ".").toLowerCase();
  }),
  tFr = (UO.data = {}),
  nFr = (UO.NATIVE = "N"),
  rFr = (UO.POLYFILL = "P"),
  zH = UO,
  HJ = ns,
  iFr = uP.f,
  aFr = WE,
  oFr = z0,
  sFr = Bhe,
  lFr = YNr,
  uFr = zH,
  El = function (t, e) {
    var n,
      r,
      i,
      o,
      l,
      u = t.target,
      c = t.global,
      d = t.stat;
    if ((n = c ? HJ : d ? HJ[u] || sFr(u, {}) : (HJ[u] || {}).prototype))
      for (r in e) {
        if (
          ((o = e[r]),
          (i = t.dontCallGetSet ? (l = iFr(n, r)) && l.value : n[r]),
          !uFr(c ? r : u + (d ? "." : "#") + r, t.forced) && i !== void 0)
        ) {
          if (typeof o == typeof i) continue;
          lFr(o, i);
        }
        (t.sham || (i && i.sham)) && aFr(o, "sham", !0), oFr(n, r, o, t);
      }
  },
  cFr = OO,
  srt = Function.prototype,
  P5e = srt.apply,
  M5e = srt.call,
  fP =
    (typeof Reflect == "object" && Reflect.apply) ||
    (cFr
      ? M5e.bind(P5e)
      : function () {
          return M5e.apply(P5e, arguments);
        }),
  dFr = typeof Bun == "function" && Bun && typeof Bun.version == "string",
  hFr = us,
  pP = hFr([].slice),
  fFr = TypeError,
  lrt = function (t, e) {
    if (t < e) throw fFr("Not enough arguments");
    return t;
  },
  urt = ns,
  pFr = fP,
  gFr = Zl,
  mFr = dFr,
  yFr = jE,
  vFr = pP,
  bFr = lrt,
  _Fr = urt.Function,
  TFr =
    /MSIE .\./.test(yFr) ||
    (mFr &&
      (function () {
        var t = urt.Bun.version.split(".");
        return (
          t.length < 3 || (t[0] == 0 && (t[1] < 3 || (t[1] == 3 && t[2] == 0)))
        );
      })()),
  crt = function (t, e) {
    var n = e ? 2 : 1;
    return TFr
      ? function (r, i) {
          var o = bFr(arguments.length, 1) > n,
            l = gFr(r) ? r : _Fr(r),
            u = o ? vFr(arguments, n) : [],
            c = o
              ? function () {
                  pFr(l, this, u);
                }
              : l;
          return e ? t(c, i) : t(c);
        }
      : t;
  },
  EFr = El,
  drt = ns,
  SFr = crt,
  C5e = SFr(drt.setInterval, !0);
EFr(
  { global: !0, bind: !0, forced: drt.setInterval !== C5e },
  { setInterval: C5e }
);
var RFr = El,
  hrt = ns,
  AFr = crt,
  $5e = AFr(hrt.setTimeout, !0);
function wFr(t, e, n) {
  var r;
  return function () {
    var i = this,
      o = arguments,
      l = n && !r;
    clearTimeout(r),
      (r = setTimeout(function () {
        (r = null), n || t.apply(i, o);
      }, e)),
      l && t.apply(i, o);
  };
}
function KR(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function IL(t) {
  return (IL =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function kFr(t, e) {
  if (IL(t) != "object" || !t) return t;
  var n = t[Symbol.toPrimitive];
  if (n !== void 0) {
    var r = n.call(t, e || "default");
    if (IL(r) != "object") return r;
    throw new TypeError("@@toPrimitive must return a primitive value.");
  }
  return (e === "string" ? String : Number)(t);
}
function IFr(t) {
  var e = kFr(t, "string");
  return IL(e) == "symbol" ? e : e + "";
}
function x5e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, IFr(r.key), r);
  }
}
function ZR(t, e, n) {
  return (
    e && x5e(t.prototype, e),
    n && x5e(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
RFr(
  { global: !0, bind: !0, forced: hrt.setTimeout !== $5e },
  { setTimeout: $5e }
);
var DFr = Gc,
  PFr = DFr("toStringTag"),
  frt = {};
frt[PFr] = "z";
var Zhe = String(frt) === "[object z]",
  MFr = Zhe,
  CFr = Zl,
  D6 = VR,
  $Fr = Gc,
  xFr = $Fr("toStringTag"),
  LFr = Object,
  OFr =
    D6(
      (function () {
        return arguments;
      })()
    ) == "Arguments",
  GFr = function (t, e) {
    try {
      return t[e];
    } catch {}
  },
  ZE = MFr
    ? D6
    : function (t) {
        var e, n, r;
        return t === void 0
          ? "Undefined"
          : t === null
          ? "Null"
          : typeof (n = GFr((e = LFr(t)), xFr)) == "string"
          ? n
          : OFr
          ? D6(e)
          : (r = D6(e)) == "Object" && CFr(e.callee)
          ? "Arguments"
          : r;
      },
  NFr = Zhe,
  FFr = ZE,
  UFr = NFr
    ? {}.toString
    : function () {
        return "[object " + FFr(this) + "]";
      },
  BFr = Zhe,
  HFr = z0,
  XFr = UFr;
BFr || HFr(Object.prototype, "toString", XFr, { unsafe: !0 });
var VFr = VR,
  jH = typeof process < "u" && VFr(process) == "process",
  zFr = us,
  jFr = Im,
  WFr = function (t, e, n) {
    try {
      return zFr(jFr(Object.getOwnPropertyDescriptor(t, e)[n]));
    } catch {}
  },
  KFr = Zl,
  ZFr = String,
  YFr = TypeError,
  QFr = function (t) {
    if (typeof t == "object" || KFr(t)) return t;
    throw YFr("Can't set " + ZFr(t) + " as a prototype");
  },
  JFr = WFr,
  qFr = Qf,
  e6r = QFr,
  gP =
    Object.setPrototypeOf ||
    ("__proto__" in {}
      ? (function () {
          var t,
            e = !1,
            n = {};
          try {
            (t = JFr(Object.prototype, "__proto__", "set"))(n, []),
              (e = n instanceof Array);
          } catch {}
          return function (r, i) {
            return qFr(r), e6r(i), e ? t(r, i) : (r.__proto__ = i), r;
          };
        })()
      : void 0),
  t6r = sg.f,
  n6r = dh,
  r6r = Gc,
  L5e = r6r("toStringTag"),
  BO = function (t, e, n) {
    t && !n && (t = t.prototype),
      t && !n6r(t, L5e) && t6r(t, L5e, { configurable: !0, value: e });
  },
  O5e = irt,
  i6r = sg,
  HO = function (t, e, n) {
    return (
      n.get && O5e(n.get, e, { getter: !0 }),
      n.set && O5e(n.set, e, { setter: !0 }),
      i6r.f(t, e, n)
    );
  },
  a6r = zE,
  o6r = HO,
  s6r = Gc,
  l6r = Vh,
  G5e = s6r("species"),
  Yhe = function (t) {
    var e = a6r(t);
    l6r &&
      e &&
      !e[G5e] &&
      o6r(e, G5e, {
        configurable: !0,
        get: function () {
          return this;
        },
      });
  },
  u6r = zR,
  c6r = TypeError,
  XO = function (t, e) {
    if (u6r(e, t)) return t;
    throw c6r("Incorrect invocation");
  },
  d6r = us,
  h6r = Ho,
  prt = Zl,
  f6r = ZE,
  p6r = zE,
  g6r = zhe,
  grt = function () {},
  m6r = [],
  mrt = p6r("Reflect", "construct"),
  Qhe = /^\s*(?:class|function)\b/,
  y6r = d6r(Qhe.exec),
  v6r = !Qhe.exec(grt),
  BM = function (t) {
    if (!prt(t)) return !1;
    try {
      return mrt(grt, m6r, t), !0;
    } catch {
      return !1;
    }
  },
  yrt = function (t) {
    if (!prt(t)) return !1;
    switch (f6r(t)) {
      case "AsyncFunction":
      case "GeneratorFunction":
      case "AsyncGeneratorFunction":
        return !1;
    }
    try {
      return v6r || !!y6r(Qhe, g6r(t));
    } catch {
      return !0;
    }
  };
yrt.sham = !0;
var DL,
  Gw,
  N5e,
  XJ,
  Jhe =
    !mrt ||
    h6r(function () {
      var t;
      return (
        BM(BM.call) ||
        !BM(Object) ||
        !BM(function () {
          t = !0;
        }) ||
        t
      );
    })
      ? yrt
      : BM,
  b6r = Jhe,
  _6r = dP,
  T6r = TypeError,
  qhe = function (t) {
    if (b6r(t)) return t;
    throw T6r(_6r(t) + " is not a constructor");
  },
  F5e = Qf,
  E6r = qhe,
  S6r = cP,
  R6r = Gc,
  A6r = R6r("species"),
  efe = function (t, e) {
    var n,
      r = F5e(t).constructor;
    return r === void 0 || S6r((n = F5e(r)[A6r])) ? e : E6r(n);
  },
  w6r = VR,
  k6r = us,
  PL = function (t) {
    if (w6r(t) === "Function") return k6r(t);
  },
  I6r = Im,
  D6r = OO,
  P6r = PL(PL.bind),
  mP = function (t, e) {
    return (
      I6r(t),
      e === void 0
        ? t
        : D6r
        ? P6r(t, e)
        : function () {
            return t.apply(e, arguments);
          }
    );
  },
  M6r = zE,
  vrt = M6r("document", "documentElement"),
  C6r = jE,
  brt = /(?:ipad|iphone|ipod).*applewebkit/i.test(C6r),
  Vp = ns,
  $6r = fP,
  x6r = mP,
  U5e = Zl,
  L6r = dh,
  _rt = Ho,
  B5e = vrt,
  O6r = pP,
  H5e = BH,
  G6r = lrt,
  N6r = brt,
  F6r = jH,
  Tae = Vp.setImmediate,
  Eae = Vp.clearImmediate,
  U6r = Vp.process,
  VJ = Vp.Dispatch,
  B6r = Vp.Function,
  X5e = Vp.MessageChannel,
  H6r = Vp.String,
  zJ = 0,
  rx = {},
  V5e = "onreadystatechange";
_rt(function () {
  DL = Vp.location;
});
var tfe = function (t) {
    if (L6r(rx, t)) {
      var e = rx[t];
      delete rx[t], e();
    }
  },
  jJ = function (t) {
    return function () {
      tfe(t);
    };
  },
  z5e = function (t) {
    tfe(t.data);
  },
  j5e = function (t) {
    Vp.postMessage(H6r(t), DL.protocol + "//" + DL.host);
  };
(Tae && Eae) ||
  ((Tae = function (t) {
    G6r(arguments.length, 1);
    var e = U5e(t) ? t : B6r(t),
      n = O6r(arguments, 1);
    return (
      (rx[++zJ] = function () {
        $6r(e, void 0, n);
      }),
      Gw(zJ),
      zJ
    );
  }),
  (Eae = function (t) {
    delete rx[t];
  }),
  F6r
    ? (Gw = function (t) {
        U6r.nextTick(jJ(t));
      })
    : VJ && VJ.now
    ? (Gw = function (t) {
        VJ.now(jJ(t));
      })
    : X5e && !N6r
    ? ((XJ = (N5e = new X5e()).port2),
      (N5e.port1.onmessage = z5e),
      (Gw = x6r(XJ.postMessage, XJ)))
    : Vp.addEventListener &&
      U5e(Vp.postMessage) &&
      !Vp.importScripts &&
      DL &&
      DL.protocol !== "file:" &&
      !_rt(j5e)
    ? ((Gw = j5e), Vp.addEventListener("message", z5e, !1))
    : (Gw =
        V5e in H5e("script")
          ? function (t) {
              B5e.appendChild(H5e("script"))[V5e] = function () {
                B5e.removeChild(this), tfe(t);
              };
            }
          : function (t) {
              setTimeout(jJ(t), 0);
            }));
var Trt = { set: Tae, clear: Eae },
  Ert = function () {
    (this.head = null), (this.tail = null);
  };
Ert.prototype = {
  add: function (t) {
    var e = { item: t, next: null },
      n = this.tail;
    n ? (n.next = e) : (this.head = e), (this.tail = e);
  },
  get: function () {
    var t = this.head;
    if (t) return (this.head = t.next) === null && (this.tail = null), t.item;
  },
};
var Nw,
  WJ,
  KJ,
  ZJ,
  W5e,
  Srt = Ert,
  X6r = jE,
  V6r = /ipad|iphone|ipod/i.test(X6r) && typeof Pebble < "u",
  z6r = jE,
  j6r = /web0s(?!.*chrome)/i.test(z6r),
  sR = ns,
  K5e = mP,
  W6r = uP.f,
  YJ = Trt.set,
  K6r = Srt,
  Z6r = brt,
  Y6r = V6r,
  Q6r = j6r,
  QJ = jH,
  Z5e = sR.MutationObserver || sR.WebKitMutationObserver,
  Y5e = sR.document,
  Q5e = sR.process,
  ON = sR.Promise,
  J5e = W6r(sR, "queueMicrotask"),
  Sae = J5e && J5e.value;
if (!Sae) {
  var GN = new K6r(),
    NN = function () {
      var t, e;
      for (QJ && (t = Q5e.domain) && t.exit(); (e = GN.get()); )
        try {
          e();
        } catch (n) {
          throw (GN.head && Nw(), n);
        }
      t && t.enter();
    };
  Z6r || QJ || Q6r || !Z5e || !Y5e
    ? !Y6r && ON && ON.resolve
      ? (((ZJ = ON.resolve(void 0)).constructor = ON),
        (W5e = K5e(ZJ.then, ZJ)),
        (Nw = function () {
          W5e(NN);
        }))
      : QJ
      ? (Nw = function () {
          Q5e.nextTick(NN);
        })
      : ((YJ = K5e(YJ, sR)),
        (Nw = function () {
          YJ(NN);
        }))
    : ((WJ = !0),
      (KJ = Y5e.createTextNode("")),
      new Z5e(NN).observe(KJ, { characterData: !0 }),
      (Nw = function () {
        KJ.data = WJ = !WJ;
      })),
    (Sae = function (t) {
      GN.head || Nw(), GN.add(t);
    });
}
var J6r = Sae,
  q6r = function (t, e) {
    try {
      arguments.length == 1 ? console.error(t) : console.error(t, e);
    } catch {}
  },
  nfe = function (t) {
    try {
      return { error: !1, value: t() };
    } catch (e) {
      return { error: !0, value: e };
    }
  },
  eUr = ns,
  WH = eUr.Promise,
  Rrt = typeof Deno == "object" && Deno && typeof Deno.version == "object",
  tUr = Rrt,
  nUr = jH,
  rUr =
    !tUr && !nUr && typeof window == "object" && typeof document == "object",
  iUr = ns,
  ix = WH,
  aUr = Zl,
  oUr = zH,
  sUr = zhe,
  lUr = Gc,
  uUr = rUr,
  cUr = Rrt,
  JJ = FO;
ix && ix.prototype;
var dUr = lUr("species"),
  Art = !1,
  wrt = aUr(iUr.PromiseRejectionEvent),
  hUr = oUr("Promise", function () {
    var t = sUr(ix),
      e = t !== String(ix);
    if (!e && JJ === 66) return !0;
    if (!JJ || JJ < 51 || !/native code/.test(t)) {
      var n = new ix(function (i) {
          i(1);
        }),
        r = function (i) {
          i(
            function () {},
            function () {}
          );
        };
      if (
        (((n.constructor = {})[dUr] = r),
        !(Art = n.then(function () {}) instanceof r))
      )
        return !0;
    }
    return !e && (uUr || cUr) && !wrt;
  }),
  VO = { CONSTRUCTOR: hUr, REJECTION_EVENT: wrt, SUBCLASSING: Art },
  yP = {},
  q5e = Im,
  fUr = TypeError,
  pUr = function (t) {
    var e, n;
    (this.promise = new t(function (r, i) {
      if (e !== void 0 || n !== void 0) throw fUr("Bad Promise constructor");
      (e = r), (n = i);
    })),
      (this.resolve = q5e(e)),
      (this.reject = q5e(n));
  };
yP.f = function (t) {
  return new pUr(t);
};
var qJ,
  eOe,
  gUr,
  tOe,
  mUr = El,
  m9 = jH,
  pE = ns,
  yD = ch,
  nOe = z0,
  rOe = gP,
  yUr = BO,
  vUr = Yhe,
  bUr = Im,
  P6 = Zl,
  _Ur = Oc,
  TUr = XO,
  EUr = efe,
  krt = Trt.set,
  rfe = J6r,
  SUr = q6r,
  RUr = nfe,
  AUr = Srt,
  Irt = KE,
  y9 = WH,
  ife = VO,
  Drt = yP,
  v9 = "Promise",
  Prt = ife.CONSTRUCTOR,
  wUr = ife.REJECTION_EVENT,
  kUr = ife.SUBCLASSING,
  eq = Irt.getterFor(v9),
  IUr = Irt.set,
  ik = y9 && y9.prototype,
  Bk = y9,
  FN = ik,
  Mrt = pE.TypeError,
  Rae = pE.document,
  afe = pE.process,
  Aae = Drt.f,
  DUr = Aae,
  PUr = !!(Rae && Rae.createEvent && pE.dispatchEvent),
  Crt = "unhandledrejection",
  MUr = "rejectionhandled",
  iOe = 0,
  $rt = 1,
  CUr = 2,
  ofe = 1,
  xrt = 2,
  Lrt = function (t) {
    var e;
    return !(!_Ur(t) || !P6((e = t.then))) && e;
  },
  Ort = function (t, e) {
    var n,
      r,
      i,
      o = e.value,
      l = e.state == $rt,
      u = l ? t.ok : t.fail,
      c = t.resolve,
      d = t.reject,
      h = t.domain;
    try {
      u
        ? (l || (e.rejection === xrt && xUr(e), (e.rejection = ofe)),
          u === !0
            ? (n = o)
            : (h && h.enter(), (n = u(o)), h && (h.exit(), (i = !0))),
          n === t.promise
            ? d(Mrt("Promise-chain cycle"))
            : (r = Lrt(n))
            ? yD(r, n, c, d)
            : c(n))
        : d(o);
    } catch (f) {
      h && !i && h.exit(), d(f);
    }
  },
  Grt = function (t, e) {
    t.notified ||
      ((t.notified = !0),
      rfe(function () {
        for (var n, r = t.reactions; (n = r.get()); ) Ort(n, t);
        (t.notified = !1), e && !t.rejection && $Ur(t);
      }));
  },
  Nrt = function (t, e, n) {
    var r, i;
    PUr
      ? (((r = Rae.createEvent("Event")).promise = e),
        (r.reason = n),
        r.initEvent(t, !1, !0),
        pE.dispatchEvent(r))
      : (r = { promise: e, reason: n }),
      !wUr && (i = pE["on" + t])
        ? i(r)
        : t === Crt && SUr("Unhandled promise rejection", n);
  },
  $Ur = function (t) {
    yD(krt, pE, function () {
      var e,
        n = t.facade,
        r = t.value;
      if (
        aOe(t) &&
        ((e = RUr(function () {
          m9 ? afe.emit("unhandledRejection", r, n) : Nrt(Crt, n, r);
        })),
        (t.rejection = m9 || aOe(t) ? xrt : ofe),
        e.error)
      )
        throw e.value;
    });
  },
  aOe = function (t) {
    return t.rejection !== ofe && !t.parent;
  },
  xUr = function (t) {
    yD(krt, pE, function () {
      var e = t.facade;
      m9 ? afe.emit("rejectionHandled", e) : Nrt(MUr, e, t.value);
    });
  },
  Hk = function (t, e, n) {
    return function (r) {
      t(e, r, n);
    };
  },
  _I = function (t, e, n) {
    t.done ||
      ((t.done = !0), n && (t = n), (t.value = e), (t.state = CUr), Grt(t, !0));
  },
  wae = function (t, e, n) {
    if (!t.done) {
      (t.done = !0), n && (t = n);
      try {
        if (t.facade === e) throw Mrt("Promise can't be resolved itself");
        var r = Lrt(e);
        r
          ? rfe(function () {
              var i = { done: !1 };
              try {
                yD(r, e, Hk(wae, i, t), Hk(_I, i, t));
              } catch (o) {
                _I(i, o, t);
              }
            })
          : ((t.value = e), (t.state = $rt), Grt(t, !1));
      } catch (i) {
        _I({ done: !1 }, i, t);
      }
    }
  };
if (
  Prt &&
  ((FN = (Bk = function (t) {
    TUr(this, FN), bUr(t), yD(qJ, this);
    var e = eq(this);
    try {
      t(Hk(wae, e), Hk(_I, e));
    } catch (n) {
      _I(e, n);
    }
  }).prototype),
  ((qJ = function (t) {
    IUr(this, {
      type: v9,
      done: !1,
      notified: !1,
      parent: !1,
      reactions: new AUr(),
      rejection: !1,
      state: iOe,
      value: void 0,
    });
  }).prototype = nOe(FN, "then", function (t, e) {
    var n = eq(this),
      r = Aae(EUr(this, Bk));
    return (
      (n.parent = !0),
      (r.ok = !P6(t) || t),
      (r.fail = P6(e) && e),
      (r.domain = m9 ? afe.domain : void 0),
      n.state == iOe
        ? n.reactions.add(r)
        : rfe(function () {
            Ort(r, n);
          }),
      r.promise
    );
  })),
  (eOe = function () {
    var t = new qJ(),
      e = eq(t);
    (this.promise = t), (this.resolve = Hk(wae, e)), (this.reject = Hk(_I, e));
  }),
  (Drt.f = Aae =
    function (t) {
      return t === Bk || t === gUr ? new eOe(t) : DUr(t);
    }),
  P6(y9) && ik !== Object.prototype)
) {
  (tOe = ik.then),
    kUr ||
      nOe(
        ik,
        "then",
        function (t, e) {
          var n = this;
          return new Bk(function (r, i) {
            yD(tOe, n, r, i);
          }).then(t, e);
        },
        { unsafe: !0 }
      );
  try {
    delete ik.constructor;
  } catch {}
  rOe && rOe(ik, FN);
}
mUr({ global: !0, constructor: !0, wrap: !0, forced: Prt }, { Promise: Bk }),
  yUr(Bk, v9, !1),
  vUr(v9);
var zO = {},
  LUr = Gc,
  OUr = zO,
  GUr = LUr("iterator"),
  NUr = Array.prototype,
  Frt = function (t) {
    return t !== void 0 && (OUr.Array === t || NUr[GUr] === t);
  },
  FUr = ZE,
  oOe = Uhe,
  UUr = cP,
  BUr = zO,
  HUr = Gc,
  XUr = HUr("iterator"),
  sfe = function (t) {
    if (!UUr(t)) return oOe(t, XUr) || oOe(t, "@@iterator") || BUr[FUr(t)];
  },
  VUr = ch,
  zUr = Im,
  jUr = Qf,
  WUr = dP,
  KUr = sfe,
  ZUr = TypeError,
  Urt = function (t, e) {
    var n = arguments.length < 2 ? KUr(t) : e;
    if (zUr(n)) return jUr(VUr(n, t));
    throw ZUr(WUr(t) + " is not iterable");
  },
  YUr = ch,
  sOe = Qf,
  QUr = Uhe,
  JUr = function (t, e, n) {
    var r, i;
    sOe(t);
    try {
      if (!(r = QUr(t, "return"))) {
        if (e === "throw") throw n;
        return n;
      }
      r = YUr(r, t);
    } catch (o) {
      (i = !0), (r = o);
    }
    if (e === "throw") throw n;
    if (i) throw r;
    return sOe(r), n;
  },
  qUr = mP,
  e8r = ch,
  t8r = Qf,
  n8r = dP,
  r8r = Frt,
  i8r = lg,
  lOe = zR,
  a8r = Urt,
  o8r = sfe,
  uOe = JUr,
  s8r = TypeError,
  M6 = function (t, e) {
    (this.stopped = t), (this.result = e);
  },
  cOe = M6.prototype,
  KH = function (t, e, n) {
    var r,
      i,
      o,
      l,
      u,
      c,
      d,
      h = n && n.that,
      f = !(!n || !n.AS_ENTRIES),
      p = !(!n || !n.IS_RECORD),
      g = !(!n || !n.IS_ITERATOR),
      y = !(!n || !n.INTERRUPTED),
      v = qUr(e, h),
      b = function (k) {
        return r && uOe(r, "normal", k), new M6(!0, k);
      },
      w = function (k) {
        return f
          ? (t8r(k), y ? v(k[0], k[1], b) : v(k[0], k[1]))
          : y
          ? v(k, b)
          : v(k);
      };
    if (p) r = t.iterator;
    else if (g) r = t;
    else {
      if (!(i = o8r(t))) throw s8r(n8r(t) + " is not iterable");
      if (r8r(i)) {
        for (o = 0, l = i8r(t); l > o; o++)
          if ((u = w(t[o])) && lOe(cOe, u)) return u;
        return new M6(!1);
      }
      r = a8r(t, i);
    }
    for (c = p ? t.next : r.next; !(d = e8r(c, r)).done; ) {
      try {
        u = w(d.value);
      } catch (k) {
        uOe(r, "throw", k);
      }
      if (typeof u == "object" && u && lOe(cOe, u)) return u;
    }
    return new M6(!1);
  },
  l8r = Gc,
  Brt = l8r("iterator"),
  Hrt = !1;
try {
  var u8r = 0,
    dOe = {
      next: function () {
        return { done: !!u8r++ };
      },
      return: function () {
        Hrt = !0;
      },
    };
  (dOe[Brt] = function () {
    return this;
  }),
    Array.from(dOe, function () {
      throw 2;
    });
} catch {}
var lfe = function (t, e) {
    if (!e && !Hrt) return !1;
    var n = !1;
    try {
      var r = {};
      (r[Brt] = function () {
        return {
          next: function () {
            return { done: (n = !0) };
          },
        };
      }),
        t(r);
    } catch {}
    return n;
  },
  c8r = WH,
  d8r = lfe,
  h8r = VO.CONSTRUCTOR,
  Xrt =
    h8r ||
    !d8r(function (t) {
      c8r.all(t).then(void 0, function () {});
    }),
  f8r = El,
  p8r = ch,
  g8r = Im,
  m8r = yP,
  y8r = nfe,
  v8r = KH,
  b8r = Xrt;
f8r(
  { target: "Promise", stat: !0, forced: b8r },
  {
    all: function (t) {
      var e = this,
        n = m8r.f(e),
        r = n.resolve,
        i = n.reject,
        o = y8r(function () {
          var l = g8r(e.resolve),
            u = [],
            c = 0,
            d = 1;
          v8r(t, function (h) {
            var f = c++,
              p = !1;
            d++,
              p8r(l, e, h).then(function (g) {
                p || ((p = !0), (u[f] = g), --d || r(u));
              }, i);
          }),
            --d || r(u);
        });
      return o.error && i(o.value), n.promise;
    },
  }
);
var _8r = El,
  T8r = VO.CONSTRUCTOR,
  kae = WH,
  E8r = zE,
  S8r = Zl,
  R8r = z0,
  hOe = kae && kae.prototype;
if (
  (_8r(
    { target: "Promise", proto: !0, forced: T8r, real: !0 },
    {
      catch: function (t) {
        return this.then(void 0, t);
      },
    }
  ),
  S8r(kae))
) {
  var fOe = E8r("Promise").prototype.catch;
  hOe.catch !== fOe && R8r(hOe, "catch", fOe, { unsafe: !0 });
}
var A8r = El,
  w8r = ch,
  k8r = Im,
  I8r = yP,
  D8r = nfe,
  P8r = KH,
  M8r = Xrt;
A8r(
  { target: "Promise", stat: !0, forced: M8r },
  {
    race: function (t) {
      var e = this,
        n = I8r.f(e),
        r = n.reject,
        i = D8r(function () {
          var o = k8r(e.resolve);
          P8r(t, function (l) {
            w8r(o, e, l).then(n.resolve, r);
          });
        });
      return i.error && r(i.value), n.promise;
    },
  }
);
var C8r = El,
  $8r = ch,
  x8r = yP,
  L8r = VO.CONSTRUCTOR;
C8r(
  { target: "Promise", stat: !0, forced: L8r },
  {
    reject: function (t) {
      var e = x8r.f(this);
      return $8r(e.reject, void 0, t), e.promise;
    },
  }
);
var O8r = Qf,
  G8r = Oc,
  N8r = yP,
  F8r = function (t, e) {
    if ((O8r(t), G8r(e) && e.constructor === t)) return e;
    var n = N8r.f(t);
    return (0, n.resolve)(e), n.promise;
  },
  U8r = El,
  B8r = zE,
  H8r = VO.CONSTRUCTOR,
  X8r = F8r;
B8r("Promise"),
  U8r(
    { target: "Promise", stat: !0, forced: H8r },
    {
      resolve: function (t) {
        return X8r(this, t);
      },
    }
  );
var vD = (function () {
    function t() {
      var e, n;
      KR(this, t);
      var r = new Promise(function (i, o) {
        (e = i), (n = o);
      });
      return (r.resolve = e), (r.reject = n), r;
    }
    return (
      ZR(t, [
        { key: "resolve", value: function (e) {} },
        { key: "reject", value: function (e) {} },
      ]),
      t
    );
  })(),
  V8r = El,
  z8r = us,
  Vrt = Date,
  j8r = z8r(Vrt.prototype.getTime);
V8r(
  { target: "Date", stat: !0 },
  {
    now: function () {
      return j8r(new Vrt());
    },
  }
);
var zrt = us,
  W8r = z0,
  ufe = Date.prototype,
  pOe = "Invalid Date",
  jrt = "toString",
  K8r = zrt(ufe[jrt]),
  Z8r = zrt(ufe.getTime);
String(new Date(NaN)) != pOe &&
  W8r(ufe, jrt, function () {
    var t = Z8r(this);
    return t == t ? K8r(this) : pOe;
  });
var Y8r = (function () {
    function t() {
      KR(this, t);
    }
    return (
      ZR(t, null, [
        {
          key: "install",
          value: function () {
            if (
              ((window.requestAnimationFrame =
                window.requestAnimationFrame ||
                window.webkitRequestAnimationFrame ||
                window.mozRequestAnimationFrame),
              (window.cancelAnimationFrame =
                window.cancelAnimationFrame ||
                window.webkitCancelAnimationFrame ||
                window.mozCancelAnimationFrame ||
                window.cancelRequestAnimationFrame ||
                window.webkitCancelRequestAnimationFrame ||
                window.mozCancelRequestAnimationFrame),
              !window.requestAnimationFrame)
            ) {
              var e = Date.now();
              window.requestAnimationFrame = function (n) {
                var r = Date.now(),
                  i = Math.max(16.7 - (r - e), 0),
                  o = setTimeout(n, i);
                return (e = r + i), o;
              };
            }
            window.cancelAnimationFrame ||
              (window.cancelAnimationFrame = function (n) {
                clearTimeout(n);
              });
          },
        },
      ]),
      t
    );
  })(),
  Wrt = us,
  Q8r = Im,
  J8r = Oc,
  q8r = dh,
  gOe = pP,
  e9r = OO,
  Krt = Function,
  t9r = Wrt([].concat),
  n9r = Wrt([].join),
  tq = {},
  r9r = function (t, e, n) {
    if (!q8r(tq, e)) {
      for (var r = [], i = 0; i < e; i++) r[i] = "a[" + i + "]";
      tq[e] = Krt("C,a", "return new C(" + n9r(r, ",") + ")");
    }
    return tq[e](t, n);
  },
  Zrt = e9r
    ? Krt.bind
    : function (t) {
        var e = Q8r(this),
          n = e.prototype,
          r = gOe(arguments, 1),
          i = function () {
            var o = t9r(r, gOe(arguments));
            return this instanceof i ? r9r(e, o.length, o) : e.apply(t, o);
          };
        return J8r(n) && (i.prototype = n), i;
      },
  i9r = El,
  mOe = Zrt;
i9r(
  { target: "Function", proto: !0, forced: Function.bind !== mOe },
  { bind: mOe }
);
var yOe = (function () {
    function t() {
      KR(this, t),
        (this.fps = 0),
        (this.isStoped = !0),
        (this.ticks = []),
        (this.isSupport = !0),
        (this.maxFps = 0),
        (this.step = this._step.bind(this)),
        (this.rafId = null);
    }
    return (
      ZR(
        t,
        [
          {
            key: "_step",
            value: function (e) {
              var n = this.ticks;
              if ((n.unshift(e), n.length > 10)) {
                var r = n.pop();
                r &&
                  ((this.fps = Math.floor(1e4 / (e - r))),
                  this.updateFpsInfo());
              }
              this.isStoped ||
                (this.rafId = window.requestAnimationFrame(this.step));
            },
          },
          {
            key: "updateFpsInfo",
            value: function () {
              this.fps > this.maxFps && (this.maxFps = this.fps);
            },
          },
          {
            key: "start",
            value: function () {
              window.requestAnimationFrame !== void 0 &&
                ((this.isStoped = !1),
                (this.rafId = window.requestAnimationFrame(this.step)));
            },
          },
          {
            key: "stop",
            value: function () {
              window.cancelAnimationFrame(this.rafId), (this.isStoped = !0);
            },
          },
        ],
        [
          {
            key: "install",
            value: function () {
              Y8r.install();
            },
          },
        ]
      ),
      t
    );
  })(),
  a9r = ZE,
  o9r = String,
  YE = function (t) {
    if (a9r(t) === "Symbol")
      throw TypeError("Cannot convert a Symbol value to a string");
    return o9r(t);
  },
  s9r = Qf,
  l9r = function () {
    var t = s9r(this),
      e = "";
    return (
      t.hasIndices && (e += "d"),
      t.global && (e += "g"),
      t.ignoreCase && (e += "i"),
      t.multiline && (e += "m"),
      t.dotAll && (e += "s"),
      t.unicode && (e += "u"),
      t.unicodeSets && (e += "v"),
      t.sticky && (e += "y"),
      e
    );
  },
  Yrt = {},
  u9r = art,
  c9r = Khe,
  Qrt =
    Object.keys ||
    function (t) {
      return u9r(t, c9r);
    },
  d9r = Vh,
  h9r = qnt,
  f9r = sg,
  p9r = Qf,
  g9r = VE,
  m9r = Qrt;
Yrt.f =
  d9r && !h9r
    ? Object.defineProperties
    : function (t, e) {
        p9r(t);
        for (var n, r = g9r(e), i = m9r(e), o = i.length, l = 0; o > l; )
          f9r.f(t, (n = i[l++]), r[n]);
        return t;
      };
var UN,
  y9r = Qf,
  v9r = Yrt,
  vOe = Khe,
  b9r = XH,
  _9r = vrt,
  T9r = BH,
  E9r = jhe,
  bOe = ">",
  _Oe = "<",
  Iae = "prototype",
  Dae = "script",
  Jrt = E9r("IE_PROTO"),
  nq = function () {},
  qrt = function (t) {
    return _Oe + Dae + bOe + t + _Oe + "/" + Dae + bOe;
  },
  TOe = function (t) {
    t.write(qrt("")), t.close();
    var e = t.parentWindow.Object;
    return (t = null), e;
  },
  S9r = function () {
    var t,
      e = T9r("iframe"),
      n = "java" + Dae + ":";
    return (
      (e.style.display = "none"),
      _9r.appendChild(e),
      (e.src = String(n)),
      (t = e.contentWindow.document).open(),
      t.write(qrt("document.F=Object")),
      t.close(),
      t.F
    );
  },
  C6 = function () {
    try {
      UN = new ActiveXObject("htmlfile");
    } catch {}
    C6 =
      typeof document < "u"
        ? document.domain && UN
          ? TOe(UN)
          : S9r()
        : TOe(UN);
    for (var t = vOe.length; t--; ) delete C6[Iae][vOe[t]];
    return C6();
  };
b9r[Jrt] = !0;
var jO =
    Object.create ||
    function (t, e) {
      var n;
      return (
        t !== null
          ? ((nq[Iae] = y9r(t)), (n = new nq()), (nq[Iae] = null), (n[Jrt] = t))
          : (n = C6()),
        e === void 0 ? n : v9r.f(n, e)
      );
    },
  R9r = Ho,
  ZH = function (t, e) {
    var n = [][t];
    return (
      !!n &&
      R9r(function () {
        n.call(
          null,
          e ||
            function () {
              return 1;
            },
          1
        );
      })
    );
  },
  A9r = Gc,
  w9r = jO,
  k9r = sg.f,
  Pae = A9r("unscopables"),
  Mae = Array.prototype;
Mae[Pae] == null && k9r(Mae, Pae, { configurable: !0, value: w9r(null) });
var GS,
  EOe,
  SOe,
  I9r = function (t) {
    Mae[Pae][t] = !0;
  },
  D9r = Ho,
  P9r = !D9r(function () {
    function t() {}
    return (
      (t.prototype.constructor = null),
      Object.getPrototypeOf(new t()) !== t.prototype
    );
  }),
  M9r = dh,
  C9r = Zl,
  $9r = $v,
  x9r = jhe,
  L9r = P9r,
  ROe = x9r("IE_PROTO"),
  Cae = Object,
  O9r = Cae.prototype,
  YH = L9r
    ? Cae.getPrototypeOf
    : function (t) {
        var e = $9r(t);
        if (M9r(e, ROe)) return e[ROe];
        var n = e.constructor;
        return C9r(n) && e instanceof n
          ? n.prototype
          : e instanceof Cae
          ? O9r
          : null;
      },
  G9r = Ho,
  N9r = Zl,
  F9r = Oc,
  AOe = YH,
  U9r = z0,
  B9r = Gc,
  $ae = B9r("iterator"),
  eit = !1;
[].keys &&
  ("next" in (SOe = [].keys())
    ? (EOe = AOe(AOe(SOe))) !== Object.prototype && (GS = EOe)
    : (eit = !0));
var H9r =
  !F9r(GS) ||
  G9r(function () {
    var t = {};
    return GS[$ae].call(t) !== t;
  });
H9r && (GS = {}),
  N9r(GS[$ae]) ||
    U9r(GS, $ae, function () {
      return this;
    });
var tit = { IteratorPrototype: GS, BUGGY_SAFARI_ITERATORS: eit },
  X9r = tit.IteratorPrototype,
  V9r = jO,
  z9r = GO,
  j9r = BO,
  W9r = zO,
  K9r = function () {
    return this;
  },
  Z9r = function (t, e, n, r) {
    var i = e + " Iterator";
    return (
      (t.prototype = V9r(X9r, { next: z9r(+!r, n) })),
      j9r(t, i, !1),
      (W9r[i] = K9r),
      t
    );
  },
  Y9r = El,
  Q9r = ch,
  nit = HH,
  J9r = Zl,
  q9r = Z9r,
  wOe = YH,
  kOe = gP,
  eBr = BO,
  tBr = WE,
  rq = z0,
  nBr = Gc,
  rBr = zO,
  rit = tit,
  iBr = nit.PROPER,
  aBr = nit.CONFIGURABLE,
  IOe = rit.IteratorPrototype,
  BN = rit.BUGGY_SAFARI_ITERATORS,
  HM = nBr("iterator"),
  DOe = "keys",
  XM = "values",
  POe = "entries",
  oBr = function () {
    return this;
  },
  cfe = function (t, e, n, r, i, o, l) {
    q9r(n, e, r);
    var u,
      c,
      d,
      h = function (w) {
        if (w === i && v) return v;
        if (!BN && w in g) return g[w];
        switch (w) {
          case DOe:
          case XM:
          case POe:
            return function () {
              return new n(this, w);
            };
        }
        return function () {
          return new n(this);
        };
      },
      f = e + " Iterator",
      p = !1,
      g = t.prototype,
      y = g[HM] || g["@@iterator"] || (i && g[i]),
      v = (!BN && y) || h(i),
      b = (e == "Array" && g.entries) || y;
    if (
      (b &&
        (u = wOe(b.call(new t()))) !== Object.prototype &&
        u.next &&
        (wOe(u) !== IOe && (kOe ? kOe(u, IOe) : J9r(u[HM]) || rq(u, HM, oBr)),
        eBr(u, f, !0)),
      iBr &&
        i == XM &&
        y &&
        y.name !== XM &&
        (aBr
          ? tBr(g, "name", XM)
          : ((p = !0),
            (v = function () {
              return Q9r(y, this);
            }))),
      i)
    )
      if (((c = { values: h(XM), keys: o ? v : h(DOe), entries: h(POe) }), l))
        for (d in c) (BN || p || !(d in g)) && rq(g, d, c[d]);
      else Y9r({ target: e, proto: !0, forced: BN || p }, c);
    return g[HM] !== v && rq(g, HM, v, { name: i }), (rBr[e] = v), c;
  },
  dfe = function (t, e) {
    return { value: t, done: e };
  },
  sBr = VE,
  iq = I9r,
  MOe = zO,
  iit = KE,
  lBr = sg.f,
  uBr = cfe,
  COe = dfe,
  cBr = Vh,
  ait = "Array Iterator",
  dBr = iit.set,
  hBr = iit.getterFor(ait),
  oit = uBr(
    Array,
    "Array",
    function (t, e) {
      dBr(this, { type: ait, target: sBr(t), index: 0, kind: e });
    },
    function () {
      var t = hBr(this),
        e = t.target,
        n = t.kind,
        r = t.index++;
      return !e || r >= e.length
        ? ((t.target = void 0), COe(void 0, !0))
        : COe(n == "keys" ? r : n == "values" ? e[r] : [r, e[r]], !1);
    },
    "values"
  ),
  $Oe = (MOe.Arguments = MOe.Array);
if ((iq("keys"), iq("values"), iq("entries"), cBr && $Oe.name !== "values"))
  try {
    lBr($Oe, "name", { value: "values" });
  } catch {}
var sit = typeof ArrayBuffer < "u" && typeof DataView < "u",
  fBr = z0,
  lit = function (t, e, n) {
    for (var r in e) fBr(t, r, e[r], n);
    return t;
  },
  pBr = Lb,
  gBr = hP,
  mBr = RangeError,
  uit = function (t) {
    if (t === void 0) return 0;
    var e = pBr(t),
      n = gBr(e);
    if (e !== n) throw mBr("Wrong length or index");
    return n;
  },
  yBr = Array,
  vBr = Math.abs,
  S1 = Math.pow,
  bBr = Math.floor,
  _Br = Math.log,
  TBr = Math.LN2,
  EBr = function (t, e, n) {
    var r,
      i,
      o,
      l = yBr(n),
      u = 8 * n - e - 1,
      c = (1 << u) - 1,
      d = c >> 1,
      h = e === 23 ? S1(2, -24) - S1(2, -77) : 0,
      f = t < 0 || (t === 0 && 1 / t < 0) ? 1 : 0,
      p = 0;
    for (
      (t = vBr(t)) != t || t === 1 / 0
        ? ((i = t != t ? 1 : 0), (r = c))
        : ((r = bBr(_Br(t) / TBr)),
          t * (o = S1(2, -r)) < 1 && (r--, (o *= 2)),
          (t += r + d >= 1 ? h / o : h * S1(2, 1 - d)) * o >= 2 &&
            (r++, (o /= 2)),
          r + d >= c
            ? ((i = 0), (r = c))
            : r + d >= 1
            ? ((i = (t * o - 1) * S1(2, e)), (r += d))
            : ((i = t * S1(2, d - 1) * S1(2, e)), (r = 0)));
      e >= 8;

    )
      (l[p++] = 255 & i), (i /= 256), (e -= 8);
    for (r = (r << e) | i, u += e; u > 0; )
      (l[p++] = 255 & r), (r /= 256), (u -= 8);
    return (l[--p] |= 128 * f), l;
  },
  SBr = function (t, e) {
    var n,
      r = t.length,
      i = 8 * r - e - 1,
      o = (1 << i) - 1,
      l = o >> 1,
      u = i - 7,
      c = r - 1,
      d = t[c--],
      h = 127 & d;
    for (d >>= 7; u > 0; ) (h = 256 * h + t[c--]), (u -= 8);
    for (n = h & ((1 << -u) - 1), h >>= -u, u += e; u > 0; )
      (n = 256 * n + t[c--]), (u -= 8);
    if (h === 0) h = 1 - l;
    else {
      if (h === o) return n ? NaN : d ? -1 / 0 : 1 / 0;
      (n += S1(2, e)), (h -= l);
    }
    return (d ? -1 : 1) * n * S1(2, h - e);
  },
  RBr = { pack: EBr, unpack: SBr },
  ABr = $v,
  xOe = WR,
  wBr = lg,
  cit = function (t) {
    for (
      var e = ABr(this),
        n = wBr(e),
        r = arguments.length,
        i = xOe(r > 1 ? arguments[1] : void 0, n),
        o = r > 2 ? arguments[2] : void 0,
        l = o === void 0 ? n : xOe(o, n);
      l > i;

    )
      e[i++] = t;
    return e;
  },
  kBr = UH,
  IBr = sg,
  DBr = GO,
  dit = function (t, e, n) {
    var r = kBr(e);
    r in t ? IBr.f(t, r, DBr(0, n)) : (t[r] = n);
  },
  LOe = WR,
  PBr = lg,
  MBr = dit,
  CBr = Array,
  $Br = Math.max,
  hfe = function (t, e, n) {
    for (
      var r = PBr(t),
        i = LOe(e, r),
        o = LOe(n === void 0 ? r : n, r),
        l = CBr($Br(o - i, 0)),
        u = 0;
      i < o;
      i++, u++
    )
      MBr(l, u, t[i]);
    return (l.length = u), l;
  },
  QH = ns,
  ffe = us,
  aq = Vh,
  xBr = sit,
  hit = HH,
  OOe = WE,
  LBr = HO,
  GOe = lit,
  oq = Ho,
  HN = XO,
  OBr = Lb,
  GBr = hP,
  b9 = uit,
  fit = RBr,
  NBr = YH,
  NOe = gP,
  FBr = jR.f,
  UBr = cit,
  BBr = hfe,
  FOe = BO,
  pfe = KE,
  HBr = hit.PROPER,
  UOe = hit.CONFIGURABLE,
  TI = "ArrayBuffer",
  JH = "DataView",
  EI = "prototype",
  XBr = "Wrong length",
  pit = "Wrong index",
  BOe = pfe.getterFor(TI),
  ax = pfe.getterFor(JH),
  HOe = pfe.set,
  Ug = QH[TI],
  f0 = Ug,
  Fw = f0 && f0[EI],
  O1 = QH[JH],
  X2 = O1 && O1[EI],
  XOe = Object.prototype,
  VBr = QH.Array,
  _9 = QH.RangeError,
  zBr = ffe(UBr),
  jBr = ffe([].reverse),
  git = fit.pack,
  VOe = fit.unpack,
  zOe = function (t) {
    return [255 & t];
  },
  jOe = function (t) {
    return [255 & t, (t >> 8) & 255];
  },
  WOe = function (t) {
    return [255 & t, (t >> 8) & 255, (t >> 16) & 255, (t >> 24) & 255];
  },
  KOe = function (t) {
    return (t[3] << 24) | (t[2] << 16) | (t[1] << 8) | t[0];
  },
  WBr = function (t) {
    return git(t, 23, 4);
  },
  KBr = function (t) {
    return git(t, 52, 8);
  },
  XN = function (t, e, n) {
    LBr(t[EI], e, {
      configurable: !0,
      get: function () {
        return n(this)[e];
      },
    });
  },
  uT = function (t, e, n, r) {
    var i = ax(t),
      o = b9(n),
      l = !!r;
    if (o + e > i.byteLength) throw _9(pit);
    var u = i.bytes,
      c = o + i.byteOffset,
      d = BBr(u, c, c + e);
    return l ? d : jBr(d);
  },
  cT = function (t, e, n, r, i, o) {
    var l = ax(t),
      u = b9(n),
      c = r(+i),
      d = !!o;
    if (u + e > l.byteLength) throw _9(pit);
    for (var h = l.bytes, f = u + l.byteOffset, p = 0; p < e; p++)
      h[f + p] = c[d ? p : e - p - 1];
  };
if (xBr) {
  var ZOe = HBr && Ug.name !== TI;
  if (
    oq(function () {
      Ug(1);
    }) &&
    oq(function () {
      new Ug(-1);
    }) &&
    !oq(function () {
      return (
        new Ug(), new Ug(1.5), new Ug(NaN), Ug.length != 1 || (ZOe && !UOe)
      );
    })
  )
    ZOe && UOe && OOe(Ug, "name", TI);
  else {
    (f0 = function (t) {
      return HN(this, Fw), new Ug(b9(t));
    })[EI] = Fw;
    for (var sq, YOe = FBr(Ug), QOe = 0; YOe.length > QOe; )
      (sq = YOe[QOe++]) in f0 || OOe(f0, sq, Ug[sq]);
    Fw.constructor = f0;
  }
  NOe && NBr(X2) !== XOe && NOe(X2, XOe);
  var VN = new O1(new f0(2)),
    JOe = ffe(X2.setInt8);
  VN.setInt8(0, 2147483648),
    VN.setInt8(1, 2147483649),
    (!VN.getInt8(0) && VN.getInt8(1)) ||
      GOe(
        X2,
        {
          setInt8: function (t, e) {
            JOe(this, t, (e << 24) >> 24);
          },
          setUint8: function (t, e) {
            JOe(this, t, (e << 24) >> 24);
          },
        },
        { unsafe: !0 }
      );
} else
  (Fw = (f0 = function (t) {
    HN(this, Fw);
    var e = b9(t);
    HOe(this, { type: TI, bytes: zBr(VBr(e), 0), byteLength: e }),
      aq || ((this.byteLength = e), (this.detached = !1));
  })[EI]),
    (X2 = (O1 = function (t, e, n) {
      HN(this, X2), HN(t, Fw);
      var r = BOe(t),
        i = r.byteLength,
        o = OBr(e);
      if (o < 0 || o > i) throw _9("Wrong offset");
      if (o + (n = n === void 0 ? i - o : GBr(n)) > i) throw _9(XBr);
      HOe(this, {
        type: JH,
        buffer: t,
        byteLength: n,
        byteOffset: o,
        bytes: r.bytes,
      }),
        aq || ((this.buffer = t), (this.byteLength = n), (this.byteOffset = o));
    })[EI]),
    aq &&
      (XN(f0, "byteLength", BOe),
      XN(O1, "buffer", ax),
      XN(O1, "byteLength", ax),
      XN(O1, "byteOffset", ax)),
    GOe(X2, {
      getInt8: function (t) {
        return (uT(this, 1, t)[0] << 24) >> 24;
      },
      getUint8: function (t) {
        return uT(this, 1, t)[0];
      },
      getInt16: function (t) {
        var e = uT(this, 2, t, arguments.length > 1 && arguments[1]);
        return (((e[1] << 8) | e[0]) << 16) >> 16;
      },
      getUint16: function (t) {
        var e = uT(this, 2, t, arguments.length > 1 && arguments[1]);
        return (e[1] << 8) | e[0];
      },
      getInt32: function (t) {
        return KOe(uT(this, 4, t, arguments.length > 1 && arguments[1]));
      },
      getUint32: function (t) {
        return KOe(uT(this, 4, t, arguments.length > 1 && arguments[1])) >>> 0;
      },
      getFloat32: function (t) {
        return VOe(uT(this, 4, t, arguments.length > 1 && arguments[1]), 23);
      },
      getFloat64: function (t) {
        return VOe(uT(this, 8, t, arguments.length > 1 && arguments[1]), 52);
      },
      setInt8: function (t, e) {
        cT(this, 1, t, zOe, e);
      },
      setUint8: function (t, e) {
        cT(this, 1, t, zOe, e);
      },
      setInt16: function (t, e) {
        cT(this, 2, t, jOe, e, arguments.length > 2 && arguments[2]);
      },
      setUint16: function (t, e) {
        cT(this, 2, t, jOe, e, arguments.length > 2 && arguments[2]);
      },
      setInt32: function (t, e) {
        cT(this, 4, t, WOe, e, arguments.length > 2 && arguments[2]);
      },
      setUint32: function (t, e) {
        cT(this, 4, t, WOe, e, arguments.length > 2 && arguments[2]);
      },
      setFloat32: function (t, e) {
        cT(this, 4, t, WBr, e, arguments.length > 2 && arguments[2]);
      },
      setFloat64: function (t, e) {
        cT(this, 8, t, KBr, e, arguments.length > 2 && arguments[2]);
      },
    });
FOe(f0, TI), FOe(O1, JH);
var mit = { ArrayBuffer: f0, DataView: O1 },
  ZBr = El,
  gfe = PL,
  YBr = Ho,
  yit = mit,
  qOe = Qf,
  eGe = WR,
  QBr = hP,
  JBr = efe,
  mfe = yit.ArrayBuffer,
  xae = yit.DataView,
  vit = xae.prototype,
  tGe = gfe(mfe.prototype.slice),
  qBr = gfe(vit.getUint8),
  eHr = gfe(vit.setUint8),
  tHr = YBr(function () {
    return !new mfe(2).slice(1, void 0).byteLength;
  });
ZBr(
  { target: "ArrayBuffer", proto: !0, unsafe: !0, forced: tHr },
  {
    slice: function (t, e) {
      if (tGe && e === void 0) return tGe(qOe(this), t);
      for (
        var n = qOe(this).byteLength,
          r = eGe(t, n),
          i = eGe(e === void 0 ? n : e, n),
          o = new (JBr(this, mfe))(QBr(i - r)),
          l = new xae(this),
          u = new xae(o),
          c = 0;
        r < i;

      )
        eHr(u, c++, qBr(l, r++));
      return o;
    },
  }
);
var xf,
  SI,
  T9,
  Lae = { exports: {} },
  nHr = sit,
  yfe = Vh,
  Uh = ns,
  bit = Zl,
  qH = Oc,
  gE = dh,
  vfe = ZE,
  rHr = dP,
  iHr = WE,
  Oae = z0,
  aHr = HO,
  oHr = zR,
  e7 = YH,
  vP = gP,
  sHr = Gc,
  lHr = FH,
  _it = KE,
  Tit = _it.enforce,
  uHr = _it.get,
  E9 = Uh.Int8Array,
  Gae = E9 && E9.prototype,
  nGe = Uh.Uint8ClampedArray,
  rGe = nGe && nGe.prototype,
  dv = E9 && e7(E9),
  M0 = Gae && e7(Gae),
  cHr = Object.prototype,
  bfe = Uh.TypeError,
  iGe = sHr("toStringTag"),
  Nae = lHr("TYPED_ARRAY_TAG"),
  S9 = "TypedArrayConstructor",
  ab = nHr && !!vP && vfe(Uh.opera) !== "Opera",
  Eit = !1,
  ob = {
    Int8Array: 1,
    Uint8Array: 1,
    Uint8ClampedArray: 1,
    Int16Array: 2,
    Uint16Array: 2,
    Int32Array: 4,
    Uint32Array: 4,
    Float32Array: 4,
    Float64Array: 8,
  },
  _fe = { BigInt64Array: 8, BigUint64Array: 8 },
  dHr = function (t) {
    if (!qH(t)) return !1;
    var e = vfe(t);
    return e === "DataView" || gE(ob, e) || gE(_fe, e);
  },
  Sit = function (t) {
    var e = e7(t);
    if (qH(e)) {
      var n = uHr(e);
      return n && gE(n, S9) ? n[S9] : Sit(e);
    }
  },
  Rit = function (t) {
    if (!qH(t)) return !1;
    var e = vfe(t);
    return gE(ob, e) || gE(_fe, e);
  },
  hHr = function (t) {
    if (Rit(t)) return t;
    throw bfe("Target is not a typed array");
  },
  fHr = function (t) {
    if (bit(t) && (!vP || oHr(dv, t))) return t;
    throw bfe(rHr(t) + " is not a typed array constructor");
  },
  pHr = function (t, e, n, r) {
    if (yfe) {
      if (n)
        for (var i in ob) {
          var o = Uh[i];
          if (o && gE(o.prototype, t))
            try {
              delete o.prototype[t];
            } catch {
              try {
                o.prototype[t] = e;
              } catch {}
            }
        }
      (M0[t] && !n) || Oae(M0, t, n ? e : (ab && Gae[t]) || e, r);
    }
  },
  gHr = function (t, e, n) {
    var r, i;
    if (yfe) {
      if (vP) {
        if (n) {
          for (r in ob)
            if ((i = Uh[r]) && gE(i, t))
              try {
                delete i[t];
              } catch {}
        }
        if (dv[t] && !n) return;
        try {
          return Oae(dv, t, n ? e : (ab && dv[t]) || e);
        } catch {}
      }
      for (r in ob) !(i = Uh[r]) || (i[t] && !n) || Oae(i, t, e);
    }
  };
for (xf in ob)
  (T9 = (SI = Uh[xf]) && SI.prototype) ? (Tit(T9)[S9] = SI) : (ab = !1);
for (xf in _fe) (T9 = (SI = Uh[xf]) && SI.prototype) && (Tit(T9)[S9] = SI);
if (
  (!ab || !bit(dv) || dv === Function.prototype) &&
  ((dv = function () {
    throw bfe("Incorrect invocation");
  }),
  ab)
)
  for (xf in ob) Uh[xf] && vP(Uh[xf], dv);
if ((!ab || !M0 || M0 === cHr) && ((M0 = dv.prototype), ab))
  for (xf in ob) Uh[xf] && vP(Uh[xf].prototype, M0);
if ((ab && e7(rGe) !== M0 && vP(rGe, M0), yfe && !gE(M0, iGe)))
  for (xf in ((Eit = !0),
  aHr(M0, iGe, {
    configurable: !0,
    get: function () {
      return qH(this) ? this[Nae] : void 0;
    },
  }),
  ob))
    Uh[xf] && iHr(Uh[xf], Nae, xf);
var al = {
    NATIVE_ARRAY_BUFFER_VIEWS: ab,
    TYPED_ARRAY_TAG: Eit && Nae,
    aTypedArray: hHr,
    aTypedArrayConstructor: fHr,
    exportTypedArrayMethod: pHr,
    exportTypedArrayStaticMethod: gHr,
    getTypedArrayConstructor: Sit,
    isView: dHr,
    isTypedArray: Rit,
    TypedArray: dv,
    TypedArrayPrototype: M0,
  },
  Ait = ns,
  lq = Ho,
  mHr = lfe,
  yHr = al.NATIVE_ARRAY_BUFFER_VIEWS,
  vHr = Ait.ArrayBuffer,
  V2 = Ait.Int8Array,
  bHr =
    !yHr ||
    !lq(function () {
      V2(1);
    }) ||
    !lq(function () {
      new V2(-1);
    }) ||
    !mHr(function (t) {
      new V2(), new V2(null), new V2(1.5), new V2(t);
    }, !0) ||
    lq(function () {
      return new V2(new vHr(2), 1, void 0).length !== 1;
    }),
  _Hr = Oc,
  THr = Math.floor,
  EHr =
    Number.isInteger ||
    function (t) {
      return !_Hr(t) && isFinite(t) && THr(t) === t;
    },
  SHr = Lb,
  RHr = RangeError,
  AHr = function (t) {
    var e = SHr(t);
    if (e < 0) throw RHr("The argument can't be less than 0");
    return e;
  },
  wHr = AHr,
  kHr = RangeError,
  wit = function (t, e) {
    var n = wHr(t);
    if (n % e) throw kHr("Wrong offset");
    return n;
  },
  IHr = ZE,
  DHr = function (t) {
    var e = IHr(t);
    return e == "BigInt64Array" || e == "BigUint64Array";
  },
  PHr = Xhe,
  MHr = TypeError,
  kit = function (t) {
    var e = PHr(t, "number");
    if (typeof e == "number") throw MHr("Can't convert number to bigint");
    return BigInt(e);
  },
  CHr = mP,
  $Hr = ch,
  xHr = qhe,
  LHr = $v,
  OHr = lg,
  GHr = Urt,
  NHr = sfe,
  FHr = Frt,
  UHr = DHr,
  BHr = al.aTypedArrayConstructor,
  HHr = kit,
  XHr = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c,
      d = xHr(this),
      h = LHr(t),
      f = arguments.length,
      p = f > 1 ? arguments[1] : void 0,
      g = p !== void 0,
      y = NHr(h);
    if (y && !FHr(y))
      for (c = (u = GHr(h, y)).next, h = []; !(l = $Hr(c, u)).done; )
        h.push(l.value);
    for (
      g && f > 2 && (p = CHr(p, arguments[2])),
        n = OHr(h),
        r = new (BHr(d))(n),
        i = UHr(r),
        e = 0;
      n > e;
      e++
    )
      (o = g ? p(h[e], e) : h[e]), (r[e] = i ? HHr(o) : +o);
    return r;
  },
  VHr = VR,
  Iit =
    Array.isArray ||
    function (t) {
      return VHr(t) == "Array";
    },
  aGe = Iit,
  zHr = Jhe,
  jHr = Oc,
  WHr = Gc,
  KHr = WHr("species"),
  oGe = Array,
  ZHr = function (t) {
    var e;
    return (
      aGe(t) &&
        ((e = t.constructor),
        ((zHr(e) && (e === oGe || aGe(e.prototype))) ||
          (jHr(e) && (e = e[KHr]) === null)) &&
          (e = void 0)),
      e === void 0 ? oGe : e
    );
  },
  YHr = ZHr,
  QHr = function (t, e) {
    return new (YHr(t))(e === 0 ? 0 : e);
  },
  JHr = mP,
  qHr = us,
  e7r = Fhe,
  t7r = $v,
  n7r = lg,
  r7r = QHr,
  sGe = qHr([].push),
  dT = function (t) {
    var e = t == 1,
      n = t == 2,
      r = t == 3,
      i = t == 4,
      o = t == 6,
      l = t == 7,
      u = t == 5 || o;
    return function (c, d, h, f) {
      for (
        var p,
          g,
          y = t7r(c),
          v = e7r(y),
          b = JHr(d, h),
          w = n7r(v),
          k = 0,
          D = f || r7r,
          $ = e ? D(c, w) : n || l ? D(c, 0) : void 0;
        w > k;
        k++
      )
        if ((u || k in v) && ((g = b((p = v[k]), k, y)), t))
          if (e) $[k] = g;
          else if (g)
            switch (t) {
              case 3:
                return !0;
              case 5:
                return p;
              case 6:
                return k;
              case 2:
                sGe($, p);
            }
          else
            switch (t) {
              case 4:
                return !1;
              case 7:
                sGe($, p);
            }
      return o ? -1 : r || i ? i : $;
    };
  },
  xv = {
    forEach: dT(0),
    map: dT(1),
    filter: dT(2),
    some: dT(3),
    every: dT(4),
    find: dT(5),
    findIndex: dT(6),
    filterReject: dT(7),
  },
  i7r = Zl,
  a7r = Oc,
  lGe = gP,
  Tfe = function (t, e, n) {
    var r, i;
    return (
      lGe &&
        i7r((r = e.constructor)) &&
        r !== n &&
        a7r((i = r.prototype)) &&
        i !== n.prototype &&
        lGe(t, i),
      t
    );
  },
  uGe = El,
  Dit = ns,
  cGe = ch,
  o7r = Vh,
  s7r = bHr,
  bP = al,
  Pit = mit,
  dGe = XO,
  l7r = GO,
  VM = WE,
  u7r = EHr,
  c7r = hP,
  hGe = uit,
  uq = wit,
  Mit = UH,
  zM = dh,
  d7r = ZE,
  Fae = Oc,
  h7r = NH,
  f7r = jO,
  p7r = zR,
  zN = gP,
  g7r = jR.f,
  fGe = XHr,
  m7r = xv.forEach,
  y7r = Yhe,
  v7r = HO,
  Cit = sg,
  $it = uP,
  Efe = KE,
  b7r = Tfe,
  Uae = Efe.get,
  _7r = Efe.set,
  T7r = Efe.enforce,
  xit = Cit.f,
  E7r = $it.f,
  S7r = Math.round,
  cq = Dit.RangeError,
  Lit = Pit.ArrayBuffer,
  R7r = Lit.prototype,
  A7r = Pit.DataView,
  jN = bP.NATIVE_ARRAY_BUFFER_VIEWS,
  pGe = bP.TYPED_ARRAY_TAG,
  gGe = bP.TypedArray,
  jM = bP.TypedArrayPrototype,
  w7r = bP.aTypedArrayConstructor,
  Bae = bP.isTypedArray,
  WN = "BYTES_PER_ELEMENT",
  dq = "Wrong length",
  mGe = function (t, e) {
    w7r(t);
    for (var n = 0, r = e.length, i = new t(r); r > n; ) i[n] = e[n++];
    return i;
  },
  KN = function (t, e) {
    v7r(t, e, {
      configurable: !0,
      get: function () {
        return Uae(this)[e];
      },
    });
  },
  yGe = function (t) {
    var e;
    return (
      p7r(R7r, t) || (e = d7r(t)) == "ArrayBuffer" || e == "SharedArrayBuffer"
    );
  },
  Oit = function (t, e) {
    return Bae(t) && !h7r(e) && e in t && u7r(+e) && e >= 0;
  },
  vGe = function (t, e) {
    return (e = Mit(e)), Oit(t, e) ? l7r(2, t[e]) : E7r(t, e);
  },
  bGe = function (t, e, n) {
    return (
      (e = Mit(e)),
      !(Oit(t, e) && Fae(n) && zM(n, "value")) ||
      zM(n, "get") ||
      zM(n, "set") ||
      n.configurable ||
      (zM(n, "writable") && !n.writable) ||
      (zM(n, "enumerable") && !n.enumerable)
        ? xit(t, e, n)
        : ((t[e] = n.value), t)
    );
  };
o7r
  ? (jN ||
      (($it.f = vGe),
      (Cit.f = bGe),
      KN(jM, "buffer"),
      KN(jM, "byteOffset"),
      KN(jM, "byteLength"),
      KN(jM, "length")),
    uGe(
      { target: "Object", stat: !0, forced: !jN },
      { getOwnPropertyDescriptor: vGe, defineProperty: bGe }
    ),
    (Lae.exports = function (t, e, n) {
      var r = t.match(/\d+/)[0] / 8,
        i = t + (n ? "Clamped" : "") + "Array",
        o = "get" + t,
        l = "set" + t,
        u = Dit[i],
        c = u,
        d = c && c.prototype,
        h = {},
        f = function (g, y) {
          xit(g, y, {
            get: function () {
              return (function (v, b) {
                var w = Uae(v);
                return w.view[o](b * r + w.byteOffset, !0);
              })(this, y);
            },
            set: function (v) {
              return (function (b, w, k) {
                var D = Uae(b);
                n && (k = (k = S7r(k)) < 0 ? 0 : k > 255 ? 255 : 255 & k),
                  D.view[l](w * r + D.byteOffset, k, !0);
              })(this, y, v);
            },
            enumerable: !0,
          });
        };
      jN
        ? s7r &&
          ((c = e(function (g, y, v, b) {
            return (
              dGe(g, d),
              b7r(
                Fae(y)
                  ? yGe(y)
                    ? b !== void 0
                      ? new u(y, uq(v, r), b)
                      : v !== void 0
                      ? new u(y, uq(v, r))
                      : new u(y)
                    : Bae(y)
                    ? mGe(c, y)
                    : cGe(fGe, c, y)
                  : new u(hGe(y)),
                g,
                c
              )
            );
          })),
          zN && zN(c, gGe),
          m7r(g7r(u), function (g) {
            g in c || VM(c, g, u[g]);
          }),
          (c.prototype = d))
        : ((c = e(function (g, y, v, b) {
            dGe(g, d);
            var w,
              k,
              D,
              $ = 0,
              N = 0;
            if (Fae(y)) {
              if (!yGe(y)) return Bae(y) ? mGe(c, y) : cGe(fGe, c, y);
              (w = y), (N = uq(v, r));
              var P = y.byteLength;
              if (b === void 0) {
                if (P % r || (k = P - N) < 0) throw cq(dq);
              } else if ((k = c7r(b) * r) + N > P) throw cq(dq);
              D = k / r;
            } else (D = hGe(y)), (w = new Lit((k = D * r)));
            for (
              _7r(g, {
                buffer: w,
                byteOffset: N,
                byteLength: k,
                length: D,
                view: new A7r(w),
              });
              $ < D;

            )
              f(g, $++);
          })),
          zN && zN(c, gGe),
          (d = c.prototype = f7r(jM))),
        d.constructor !== c && VM(d, "constructor", c),
        (T7r(d).TypedArrayConstructor = c),
        pGe && VM(d, pGe, i);
      var p = c != u;
      (h[i] = c),
        uGe({ global: !0, constructor: !0, forced: p, sham: !jN }, h),
        WN in c || VM(c, WN, r),
        WN in d || VM(d, WN, r),
        y7r(i);
    }))
  : (Lae.exports = function () {});
var k7r = Lae.exports,
  _Ge = dP,
  I7r = TypeError,
  Git = function (t, e) {
    if (!delete t[e])
      throw I7r("Cannot delete property " + _Ge(e) + " of " + _Ge(t));
  },
  D7r = $v,
  hq = WR,
  P7r = lg,
  M7r = Git,
  C7r = Math.min,
  $7r =
    [].copyWithin ||
    function (t, e) {
      var n = D7r(this),
        r = P7r(n),
        i = hq(t, r),
        o = hq(e, r),
        l = arguments.length > 2 ? arguments[2] : void 0,
        u = C7r((l === void 0 ? r : hq(l, r)) - o, r - i),
        c = 1;
      for (
        o < i && i < o + u && ((c = -1), (o += u - 1), (i += u - 1));
        u-- > 0;

      )
        o in n ? (n[i] = n[o]) : M7r(n, i), (i += c), (o += c);
      return n;
    },
  x7r = us,
  Nit = al,
  L7r = $7r,
  O7r = x7r(L7r),
  G7r = Nit.aTypedArray,
  N7r = Nit.exportTypedArrayMethod;
N7r("copyWithin", function (t, e) {
  return O7r(G7r(this), t, e, arguments.length > 2 ? arguments[2] : void 0);
});
var Fit = al,
  F7r = xv.every,
  U7r = Fit.aTypedArray,
  B7r = Fit.exportTypedArrayMethod;
B7r("every", function (t) {
  return F7r(U7r(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var Uit = al,
  H7r = cit,
  X7r = kit,
  V7r = ZE,
  z7r = ch,
  j7r = us,
  W7r = Ho,
  K7r = Uit.aTypedArray,
  Z7r = Uit.exportTypedArrayMethod,
  Y7r = j7r("".slice),
  Q7r = W7r(function () {
    var t = 0;
    return (
      new Int8Array(2).fill({
        valueOf: function () {
          return t++;
        },
      }),
      t !== 1
    );
  });
Z7r(
  "fill",
  function (t) {
    var e = arguments.length;
    K7r(this);
    var n = Y7r(V7r(this), 0, 3) === "Big" ? X7r(t) : +t;
    return z7r(
      H7r,
      this,
      n,
      e > 1 ? arguments[1] : void 0,
      e > 2 ? arguments[2] : void 0
    );
  },
  Q7r
);
var J7r = lg,
  q7r = function (t, e) {
    for (var n = 0, r = J7r(e), i = new t(r); r > n; ) i[n] = e[n++];
    return i;
  },
  Bit = al,
  eXr = efe,
  tXr = Bit.aTypedArrayConstructor,
  nXr = Bit.getTypedArrayConstructor,
  t7 = function (t) {
    return tXr(eXr(t, nXr(t)));
  },
  rXr = q7r,
  iXr = t7,
  aXr = function (t, e) {
    return rXr(iXr(t), e);
  },
  Hit = al,
  oXr = xv.filter,
  sXr = aXr,
  lXr = Hit.aTypedArray,
  uXr = Hit.exportTypedArrayMethod;
uXr("filter", function (t) {
  var e = oXr(lXr(this), t, arguments.length > 1 ? arguments[1] : void 0);
  return sXr(this, e);
});
var Xit = al,
  cXr = xv.find,
  dXr = Xit.aTypedArray,
  hXr = Xit.exportTypedArrayMethod;
hXr("find", function (t) {
  return cXr(dXr(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var Vit = al,
  fXr = xv.findIndex,
  pXr = Vit.aTypedArray,
  gXr = Vit.exportTypedArrayMethod;
gXr("findIndex", function (t) {
  return fXr(pXr(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var zit = al,
  mXr = xv.forEach,
  yXr = zit.aTypedArray,
  vXr = zit.exportTypedArrayMethod;
vXr("forEach", function (t) {
  mXr(yXr(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var jit = al,
  bXr = VH.includes,
  _Xr = jit.aTypedArray,
  TXr = jit.exportTypedArrayMethod;
TXr("includes", function (t) {
  return bXr(_Xr(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var Wit = al,
  EXr = VH.indexOf,
  SXr = Wit.aTypedArray,
  RXr = Wit.exportTypedArrayMethod;
RXr("indexOf", function (t) {
  return EXr(SXr(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var AXr = ns,
  wXr = Ho,
  Sfe = us,
  Kit = al,
  Rfe = oit,
  kXr = Gc,
  Afe = kXr("iterator"),
  TGe = AXr.Uint8Array,
  IXr = Sfe(Rfe.values),
  DXr = Sfe(Rfe.keys),
  PXr = Sfe(Rfe.entries),
  Hae = Kit.aTypedArray,
  ZN = Kit.exportTypedArrayMethod,
  ak = TGe && TGe.prototype,
  YN = !wXr(function () {
    ak[Afe].call([1]);
  }),
  EGe =
    !!ak && ak.values && ak[Afe] === ak.values && ak.values.name === "values",
  SGe = function () {
    return IXr(Hae(this));
  };
ZN(
  "entries",
  function () {
    return PXr(Hae(this));
  },
  YN
),
  ZN(
    "keys",
    function () {
      return DXr(Hae(this));
    },
    YN
  ),
  ZN("values", SGe, YN || !EGe, { name: "values" }),
  ZN(Afe, SGe, YN || !EGe, { name: "values" });
var Zit = al,
  MXr = us,
  CXr = Zit.aTypedArray,
  $Xr = Zit.exportTypedArrayMethod,
  xXr = MXr([].join);
$Xr("join", function (t) {
  return xXr(CXr(this), t);
});
var LXr = fP,
  OXr = VE,
  GXr = Lb,
  NXr = lg,
  FXr = ZH,
  UXr = Math.min,
  Xae = [].lastIndexOf,
  Yit = !!Xae && 1 / [1].lastIndexOf(1, -0) < 0,
  BXr = FXr("lastIndexOf"),
  HXr = Yit || !BXr,
  XXr = HXr
    ? function (t) {
        if (Yit) return LXr(Xae, this, arguments) || 0;
        var e = OXr(this),
          n = NXr(e),
          r = n - 1;
        for (
          arguments.length > 1 && (r = UXr(r, GXr(arguments[1]))),
            r < 0 && (r = n + r);
          r >= 0;
          r--
        )
          if (r in e && e[r] === t) return r || 0;
        return -1;
      }
    : Xae,
  Qit = al,
  VXr = fP,
  zXr = XXr,
  jXr = Qit.aTypedArray,
  WXr = Qit.exportTypedArrayMethod;
WXr("lastIndexOf", function (t) {
  var e = arguments.length;
  return VXr(zXr, jXr(this), e > 1 ? [t, arguments[1]] : [t]);
});
var Jit = al,
  KXr = xv.map,
  ZXr = t7,
  YXr = Jit.aTypedArray,
  QXr = Jit.exportTypedArrayMethod;
QXr("map", function (t) {
  return KXr(
    YXr(this),
    t,
    arguments.length > 1 ? arguments[1] : void 0,
    function (e, n) {
      return new (ZXr(e))(n);
    }
  );
});
var JXr = Im,
  qXr = $v,
  eVr = Fhe,
  tVr = lg,
  nVr = TypeError,
  RGe = function (t) {
    return function (e, n, r, i) {
      JXr(n);
      var o = qXr(e),
        l = eVr(o),
        u = tVr(o),
        c = t ? u - 1 : 0,
        d = t ? -1 : 1;
      if (r < 2)
        for (;;) {
          if (c in l) {
            (i = l[c]), (c += d);
            break;
          }
          if (((c += d), t ? c < 0 : u <= c))
            throw nVr("Reduce of empty array with no initial value");
        }
      for (; t ? c >= 0 : u > c; c += d) c in l && (i = n(i, l[c], c, o));
      return i;
    };
  },
  qit = { left: RGe(!1), right: RGe(!0) },
  eat = al,
  rVr = qit.left,
  iVr = eat.aTypedArray,
  aVr = eat.exportTypedArrayMethod;
aVr("reduce", function (t) {
  var e = arguments.length;
  return rVr(iVr(this), t, e, e > 1 ? arguments[1] : void 0);
});
var tat = al,
  oVr = qit.right,
  sVr = tat.aTypedArray,
  lVr = tat.exportTypedArrayMethod;
lVr("reduceRight", function (t) {
  var e = arguments.length;
  return oVr(sVr(this), t, e, e > 1 ? arguments[1] : void 0);
});
var nat = al,
  uVr = nat.aTypedArray,
  cVr = nat.exportTypedArrayMethod,
  dVr = Math.floor;
cVr("reverse", function () {
  for (var t, e = this, n = uVr(e).length, r = dVr(n / 2), i = 0; i < r; )
    (t = e[i]), (e[i++] = e[--n]), (e[n] = t);
  return e;
});
var rat = ns,
  iat = ch,
  wfe = al,
  hVr = lg,
  fVr = wit,
  pVr = $v,
  aat = Ho,
  gVr = rat.RangeError,
  Vae = rat.Int8Array,
  AGe = Vae && Vae.prototype,
  oat = AGe && AGe.set,
  mVr = wfe.aTypedArray,
  yVr = wfe.exportTypedArrayMethod,
  zae = !aat(function () {
    var t = new Uint8ClampedArray(2);
    return iat(oat, t, { length: 1, 0: 3 }, 1), t[1] !== 3;
  }),
  vVr =
    zae &&
    wfe.NATIVE_ARRAY_BUFFER_VIEWS &&
    aat(function () {
      var t = new Vae(2);
      return t.set(1), t.set("2", 1), t[0] !== 0 || t[1] !== 2;
    });
yVr(
  "set",
  function (t) {
    mVr(this);
    var e = fVr(arguments.length > 1 ? arguments[1] : void 0, 1),
      n = pVr(t);
    if (zae) return iat(oat, this, n, e);
    var r = this.length,
      i = hVr(n),
      o = 0;
    if (i + e > r) throw gVr("Wrong length");
    for (; o < i; ) this[e + o] = n[o++];
  },
  !zae || vVr
);
var sat = al,
  bVr = t7,
  _Vr = Ho,
  TVr = pP,
  EVr = sat.aTypedArray,
  SVr = sat.exportTypedArrayMethod,
  RVr = _Vr(function () {
    new Int8Array(1).slice();
  });
SVr(
  "slice",
  function (t, e) {
    for (
      var n = TVr(EVr(this), t, e),
        r = bVr(this),
        i = 0,
        o = n.length,
        l = new r(o);
      o > i;

    )
      l[i] = n[i++];
    return l;
  },
  RVr
);
var lat = al,
  AVr = xv.some,
  wVr = lat.aTypedArray,
  kVr = lat.exportTypedArrayMethod;
kVr("some", function (t) {
  return AVr(wVr(this), t, arguments.length > 1 ? arguments[1] : void 0);
});
var wGe = hfe,
  IVr = Math.floor,
  jae = function (t, e) {
    var n = t.length,
      r = IVr(n / 2);
    return n < 8
      ? DVr(t, e)
      : PVr(t, jae(wGe(t, 0, r), e), jae(wGe(t, r), e), e);
  },
  DVr = function (t, e) {
    for (var n, r, i = t.length, o = 1; o < i; ) {
      for (r = o, n = t[o]; r && e(t[r - 1], n) > 0; ) t[r] = t[--r];
      r !== o++ && (t[r] = n);
    }
    return t;
  },
  PVr = function (t, e, n, r) {
    for (var i = e.length, o = n.length, l = 0, u = 0; l < i || u < o; )
      t[l + u] =
        l < i && u < o
          ? r(e[l], n[u]) <= 0
            ? e[l++]
            : n[u++]
          : l < i
          ? e[l++]
          : n[u++];
    return t;
  },
  uat = jae,
  MVr = jE,
  kGe = MVr.match(/firefox\/(\d+)/i),
  cat = !!kGe && +kGe[1],
  CVr = jE,
  dat = /MSIE|Trident/.test(CVr),
  $Vr = jE,
  IGe = $Vr.match(/AppleWebKit\/(\d+)\./),
  hat = !!IGe && +IGe[1],
  xVr = ns,
  LVr = PL,
  Wae = Ho,
  OVr = Im,
  GVr = uat,
  fat = al,
  DGe = cat,
  NVr = dat,
  PGe = FO,
  MGe = hat,
  FVr = fat.aTypedArray,
  UVr = fat.exportTypedArrayMethod,
  ML = xVr.Uint16Array,
  RI = ML && LVr(ML.prototype.sort),
  BVr = !(
    !RI ||
    (Wae(function () {
      RI(new ML(2), null);
    }) &&
      Wae(function () {
        RI(new ML(2), {});
      }))
  ),
  CGe =
    !!RI &&
    !Wae(function () {
      if (PGe) return PGe < 74;
      if (DGe) return DGe < 67;
      if (NVr) return !0;
      if (MGe) return MGe < 602;
      var t,
        e,
        n = new ML(516),
        r = Array(516);
      for (t = 0; t < 516; t++)
        (e = t % 4), (n[t] = 515 - t), (r[t] = t - 2 * e + 3);
      for (
        RI(n, function (i, o) {
          return ((i / 4) | 0) - ((o / 4) | 0);
        }),
          t = 0;
        t < 516;
        t++
      )
        if (n[t] !== r[t]) return !0;
    }),
  HVr = function (t) {
    return function (e, n) {
      return t !== void 0
        ? +t(e, n) || 0
        : n != n
        ? -1
        : e != e
        ? 1
        : e === 0 && n === 0
        ? 1 / e > 0 && 1 / n < 0
          ? 1
          : -1
        : e > n;
    };
  };
UVr(
  "sort",
  function (t) {
    return t !== void 0 && OVr(t), CGe ? RI(this, t) : GVr(FVr(this), HVr(t));
  },
  !CGe || BVr
);
var pat = al,
  XVr = hP,
  $Ge = WR,
  VVr = t7,
  zVr = pat.aTypedArray,
  jVr = pat.exportTypedArrayMethod;
jVr("subarray", function (t, e) {
  var n = zVr(this),
    r = n.length,
    i = $Ge(t, r);
  return new (VVr(n))(
    n.buffer,
    n.byteOffset + i * n.BYTES_PER_ELEMENT,
    XVr((e === void 0 ? r : $Ge(e, r)) - i)
  );
});
var WVr = ns,
  KVr = fP,
  gat = al,
  Kae = Ho,
  xGe = pP,
  R9 = WVr.Int8Array,
  LGe = gat.aTypedArray,
  ZVr = gat.exportTypedArrayMethod,
  mat = [].toLocaleString,
  YVr =
    !!R9 &&
    Kae(function () {
      mat.call(new R9(1));
    }),
  QVr =
    Kae(function () {
      return [1, 2].toLocaleString() != new R9([1, 2]).toLocaleString();
    }) ||
    !Kae(function () {
      R9.prototype.toLocaleString.call([1, 2]);
    });
ZVr(
  "toLocaleString",
  function () {
    return KVr(mat, YVr ? xGe(LGe(this)) : LGe(this), xGe(arguments));
  },
  QVr
);
var JVr = al.exportTypedArrayMethod,
  qVr = Ho,
  ezr = ns,
  tzr = us,
  OGe = ezr.Uint8Array,
  nzr = (OGe && OGe.prototype) || {},
  A9 = [].toString,
  rzr = tzr([].join);
qVr(function () {
  A9.call({});
}) &&
  (A9 = function () {
    return rzr(this);
  });
var izr = nzr.toString != A9;
JVr("toString", A9, izr);
var kfe = us,
  azr = Lb,
  ozr = YE,
  szr = NO,
  lzr = kfe("".charAt),
  GGe = kfe("".charCodeAt),
  uzr = kfe("".slice),
  NGe = function (t) {
    return function (e, n) {
      var r,
        i,
        o = ozr(szr(e)),
        l = azr(n),
        u = o.length;
      return l < 0 || l >= u
        ? t
          ? ""
          : void 0
        : (r = GGe(o, l)) < 55296 ||
          r > 56319 ||
          l + 1 === u ||
          (i = GGe(o, l + 1)) < 56320 ||
          i > 57343
        ? t
          ? lzr(o, l)
          : r
        : t
        ? uzr(o, l, l + 2)
        : i - 56320 + ((r - 55296) << 10) + 65536;
    };
  },
  czr = { codeAt: NGe(!1), charAt: NGe(!0) },
  Ife = `	
\v\f\r                　\u2028\u2029\uFEFF`,
  dzr = us,
  hzr = NO,
  fzr = YE,
  Zae = Ife,
  FGe = dzr("".replace),
  pzr = RegExp("^[" + Zae + "]+"),
  gzr = RegExp("(^|[^" + Zae + "])[" + Zae + "]+$"),
  fq = function (t) {
    return function (e) {
      var n = fzr(hzr(e));
      return (
        1 & t && (n = FGe(n, pzr, "")), 2 & t && (n = FGe(n, gzr, "$1")), n
      );
    };
  },
  Dfe = { start: fq(1), end: fq(2), trim: fq(3) },
  mzr = xv.forEach,
  yzr = ZH,
  vzr = yzr("forEach"),
  Yae = vzr
    ? [].forEach
    : function (t) {
        return mzr(this, t, arguments.length > 1 ? arguments[1] : void 0);
      },
  bzr = El;
bzr(
  { target: "Array", proto: !0, forced: [].forEach != Yae },
  { forEach: Yae }
);
var yat = {
    CSSRuleList: 0,
    CSSStyleDeclaration: 0,
    CSSValueList: 0,
    ClientRectList: 0,
    DOMRectList: 0,
    DOMStringList: 0,
    DOMTokenList: 1,
    DataTransferItemList: 0,
    FileList: 0,
    HTMLAllCollection: 0,
    HTMLCollection: 0,
    HTMLFormElement: 0,
    HTMLSelectElement: 0,
    MediaList: 0,
    MimeTypeArray: 0,
    NamedNodeMap: 0,
    NodeList: 1,
    PaintRequestList: 0,
    Plugin: 0,
    PluginArray: 0,
    SVGLengthList: 0,
    SVGNumberList: 0,
    SVGPathSegList: 0,
    SVGPointList: 0,
    SVGStringList: 0,
    SVGTransformList: 0,
    SourceBufferList: 0,
    StyleSheetList: 0,
    TextTrackCueList: 0,
    TextTrackList: 0,
    TouchList: 0,
  },
  _zr = BH,
  pq = _zr("span").classList,
  UGe = pq && pq.constructor && pq.constructor.prototype,
  vat = UGe === Object.prototype ? void 0 : UGe,
  BGe = ns,
  HGe = yat,
  Tzr = vat,
  gq = Yae,
  Ezr = WE,
  bat = function (t) {
    if (t && t.forEach !== gq)
      try {
        Ezr(t, "forEach", gq);
      } catch {
        t.forEach = gq;
      }
  };
for (var mq in HGe) HGe[mq] && bat(BGe[mq] && BGe[mq].prototype);
bat(Tzr);
var Szr = (function () {
    function t() {
      KR(this, t), (this.timeID = null), (this.func = null);
    }
    return (
      ZR(t, [
        {
          key: "repeat",
          value: function (e, n) {
            (this.timeID = 1), this.repeatInterval(e, n);
          },
        },
        {
          key: "repeatInterval",
          value: function (e, n) {
            var r = this;
            this.timeID &&
              (this.func === null && (this.func = e),
              this.func === e &&
                (this.timeID && clearTimeout(this.timeID),
                (this.timeID = null),
                (this.timeID = setTimeout(function () {
                  e(), r.repeatInterval(e, n);
                }, n))));
          },
        },
        {
          key: "clear",
          value: function () {
            clearTimeout(this.timeID), (this.timeID = null);
          },
        },
      ]),
      t
    );
  })(),
  Rzr = Szr,
  Azr = El,
  wzr = PL,
  kzr = VH.indexOf,
  Izr = ZH,
  Qae = wzr([].indexOf),
  _at = !!Qae && 1 / Qae([1], 1, -0) < 0,
  Dzr = _at || !Izr("indexOf");
Azr(
  { target: "Array", proto: !0, forced: Dzr },
  {
    indexOf: function (t) {
      var e = arguments.length > 1 ? arguments[1] : void 0;
      return _at ? Qae(this, t, e) || 0 : kzr(this, t, e);
    },
  }
);
var XGe = Czr();
function Pzr() {
  try {
    return (
      typeof localStorage < "u" &&
      "setItem" in localStorage &&
      !!localStorage.setItem
    );
  } catch {
    return !1;
  }
}
function Mzr() {
  var t = "_localstorage_support_test";
  try {
    return localStorage.setItem(t, !0), localStorage.removeItem(t), !1;
  } catch {
    return !0;
  }
}
function Czr() {
  return Pzr && !Mzr();
}
var $zr = {
    length: XGe ? localStorage.length : 0,
    clear: function (t) {
      try {
        for (var e = localStorage.length - 1; e >= 0; e--) {
          var n = localStorage.key(e);
          n.indexOf(t) === 0 && localStorage.removeItem(n);
        }
      } catch {}
    },
    getItem: function (t) {
      try {
        return localStorage.getItem(t);
      } catch {
        return null;
      }
    },
    key: function (t) {
      try {
        return localStorage.key(t);
      } catch {
        return null;
      }
    },
    setItem: function (t, e) {
      try {
        localStorage.setItem(t, e);
      } catch {}
    },
    removeItem: function (t) {
      try {
        localStorage.removeItem(t);
      } catch {}
    },
    isSupport: XGe,
  },
  Jae = $zr,
  dS = { VIDEO: "video", AUDIO: "audio" },
  WM = { APPEND: "appendBuffer", REMOVE: "removeBuffer" },
  Jy = {
    MSE_ERROR: "mse_error",
    UPDATE_END: "updateend",
    MSE_OPEN: "mse_open",
    MSE_OPEN_DONE: "mse_open_done",
  },
  VGe = (function (t) {
    YGr(n, Pl);
    var e = qGr(n);
    function n(r, i) {
      var o;
      return (
        WGr(this, n),
        ((o = e.call(this)).mediaSource = new window.MediaSource(r)),
        (o.url = window.URL.createObjectURL(o.mediaSource)),
        (o.queue = []),
        (o._hasDestroyed = !1),
        (o._onSourceOpen = o._onSourceOpen.bind(w6(o))),
        (o._onSourceBufferError = o._onSourceBufferError.bind(w6(o))),
        (o._onSourceBufferUpdateEnd = o._onSourceBufferUpdateEnd.bind(w6(o))),
        (o._mseStart = Uw()),
        (o._appendStart = -1),
        o.mediaSource.addEventListener("sourceopen", o._onSourceOpen),
        (o.opQueues = {}),
        (o.sourceBuffers = {}),
        (o.updateHanders = {}),
        (o.errorHandlers = {}),
        (o.logger = i || function () {}),
        (o._sourceOpenDonePromise = new vD()),
        (o._mseAppendFlag = !1),
        (o._mseOpenTime = -1),
        (o.mseFullFlag = {}),
        o
      );
    }
    return (
      KGr(
        n,
        [
          {
            key: "init",
            value: function () {
              var r =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : ZGr({}, dS.VIDEO, {
                      mimeType: "video/mp4",
                      codec: 'video/mp4; codecs="avc1.64001E, mp4a.40.5"',
                    });
              return (this.contentTypes = r), this._sourceOpenDonePromise;
            },
          },
          {
            key: "_onSourceOpen",
            value: function () {
              var r = this;
              (this._mseOpenTime = Uw() - this._mseStart),
                console.log("[mseOpen]==> costtime", this._mseOpenTime),
                this.mediaSource.removeEventListener(
                  "sourceopen",
                  this._onSourceOpen
                ),
                this.emit(Jy.MSE_OPEN, { costtime: this._mseOpenTime });
              for (
                var i = Object.keys(this.contentTypes), o = 0;
                o < i.length;
                o++
              )
                try {
                  (function () {
                    var l = i[o],
                      u = r.contentTypes[l].codec,
                      c = r.mediaSource.addSourceBuffer(u),
                      d = function () {
                        return r._onSourceBufferError(l);
                      };
                    c.addEventListener("error", d);
                    var h = function () {
                      return r._onSourceBufferUpdateEnd(l);
                    };
                    c.addEventListener("updateend", h),
                      (r.updateHanders = {}),
                      (r.sourceBuffers[l] = c),
                      (r.opQueues[l] = []),
                      (r.updateHanders[l] = h),
                      (r.errorHandlers[l] = d);
                  })();
                } catch (l) {
                  (l.errtype = "open_error"), this.emit(Jy.MSE_ERROR, l);
                }
              this.logger(
                "[debug mse] mse init ready, readyState",
                this.mediaSource.readyState
              ),
                (this._mseAppendFlag = !0),
                this.emit(Jy.MSE_OPEN_DONE, {
                  costtime: Uw() - this._mseStart,
                }),
                this._sourceOpenDonePromise.resolve();
            },
          },
          {
            key: "ready",
            get: function () {
              return this._mseAppendFlag;
            },
          },
          {
            key: "_onSourceBufferError",
            value: function (r) {
              if (!this._hasDestroyed) {
                this.logger(
                  "[debug mse] sourceBuffer error, contentType",
                  r,
                  "readyState",
                  this.mediaSource.readyState
                );
                var i = this.opQueues[r][0];
                this.emit(Jy.MSE_ERROR, {
                  errtype: "append_error",
                  name: i.name,
                  context: i.context,
                });
              }
            },
          },
          {
            key: "_onSourceBufferUpdateEnd",
            value: function (r) {
              if (!this._hasDestroyed) {
                var i = this.opQueues[r][0];
                i &&
                  (this.emit(Jy.UPDATE_END, {
                    name: i.name,
                    context: i.context,
                    costtime: Uw() - this._appendStart,
                  }),
                  this.pop(r));
              }
            },
          },
          {
            key: "state",
            get: function () {
              return this.mediaSource.readyState;
            },
          },
          {
            key: "duration",
            get: function () {
              return this.mediaSource.duration;
            },
          },
          {
            key: "setDuration",
            value: function (r) {
              var i = this;
              this.mediaSource.duration > r ||
                this.enqueueBlockOp(function () {
                  i.ended()
                    ? i.logger("[debug mse] setDuration ended")
                    : (i.logger("[debug mse] setDuration"),
                      (i.mediaSource.duration = r));
                }, "setDuration");
            },
          },
          {
            key: "appendBuffer",
            value: function (r, i, o) {
              var l = this;
              return this.enqueueOp(
                r,
                function () {
                  return l._append(r, i, o);
                },
                WM.APPEND,
                o
              );
            },
          },
          {
            key: "_append",
            value: function (r, i, o) {
              (this._appendStart = Uw()),
                this.logger("[real appendBuffer],  context,", o),
                this.sourceBuffers[r].appendBuffer(i);
            },
          },
          {
            key: "enqueueOp",
            value: function (r, i, o, l) {
              var u = this;
              if (!this._hasDestroyed) {
                var c = { handler: i, context: l, name: o };
                return (
                  this._mseAppendFlag
                    ? this._enQueue(r, c)
                    : this._sourceOpenDonePromise.then(function () {
                        u._hasDestroyed || u._enQueue(r, c);
                      }),
                  c.p
                );
              }
            },
          },
          {
            key: "_enQueue",
            value: function (r, i) {
              this.opQueues[r] || (this.opQueues[r] = []),
                this.mseFullFlag[r] && i.name === WM.REMOVE
                  ? (this.opQueues[r].splice(0, 0, i),
                    (this.mseFullFlag[r] = !1),
                    this.handleOp(r))
                  : (this.opQueues[r].push(i),
                    this.opQueues[r].length === 1 && this.handleOp(r));
            },
          },
          {
            key: "enqueueBlockOp",
            value: function (r, i) {
              var o = this;
              this._hasDestroyed ||
                this._sourceOpenDonePromise.then(function () {
                  if (!o._hasDestroyed) {
                    for (
                      var l = [],
                        u = Object.keys(o.contentTypes),
                        c = function (h) {
                          var f = u[h],
                            p = new vD(),
                            g = {
                              handler: function () {
                                return p.resolve();
                              },
                              p,
                              name: i,
                            };
                          o.opQueues[f] || (o.opQueues[f] = []),
                            o.opQueues[f].push(g),
                            l.push(p),
                            o.opQueues[f].length === 1 && g.handler();
                        },
                        d = 0;
                      d < u.length;
                      d++
                    )
                      c(d);
                    Promise.all(l)
                      .then(function () {
                        try {
                          r();
                        } catch (p) {
                          console.log(p);
                        } finally {
                          for (var h = 0; h < u.length; h++) {
                            var f = u[h];
                            o.pop(f);
                          }
                        }
                      })
                      .catch(function (h) {
                        console.log("waiting cath", h);
                      });
                  }
                });
            },
          },
          {
            key: "isFull",
            value: function (r) {
              return r ? this.mseFullFlag[r] : this.mseFullFlag[dS.VIDEO];
            },
          },
          {
            key: "handleOp",
            value: function (r) {
              if (!this._hasDestroyed) {
                var i = this.opQueues[r][0];
                if (i && !this.mseFullFlag[r])
                  try {
                    i.handler();
                  } catch (o) {
                    o && o.message.indexOf("SourceBuffer is full") >= 0
                      ? ((this.mseFullFlag[r] = !0),
                        this.logger(
                          "[MSE error],  context,",
                          i.context,
                          ",name,",
                          i.name,
                          ",err,SourceBuffer is full"
                        ))
                      : this.pop(r),
                      this.emit(Jy.MSE_ERROR, {
                        errtype: "append_error",
                        context: i.context,
                        errMsg: o ? o.message : null,
                      });
                  }
              }
            },
          },
          {
            key: "pop",
            value: function (r) {
              this._hasDestroyed ||
                (this.opQueues[r].shift(), this.handleOp(r));
            },
          },
          {
            key: "clearOpqueues",
            value: function (r) {
              var i,
                o = [];
              if (
                (this.opQueues[r].map(function (u) {
                  u.context.isinit && o.push(u);
                }),
                this.opQueues &&
                  this.opQueues[r] &&
                  this.opQueues[r].length > 1)
              )
                if (
                  this.opQueues[r][0].name === WM.APPEND ||
                  this.opQueues[r][0].name === WM.REMOVE
                )
                  this.logger(
                    "[debug mse] clearOpqueues, left:",
                    1,
                    ", len,",
                    this.opQueues[r].length
                  ),
                    (this.opQueues[r] = this.opQueues[r].slice(0, 1));
                else {
                  var l = Math.min(
                    this.opQueues[r].length,
                    Object.keys(this.contentTypes).length
                  );
                  this.logger(
                    "[debug mse] clearOpqueues, left:",
                    l,
                    ", len,",
                    this.opQueues[r].length
                  ),
                    (this.opQueues[r] = this.opQueues[r].slice(0, l));
                }
              o.length > 0 && (i = this.opQueues[r]).push.apply(i, o);
            },
          },
          {
            key: "removeBuffer",
            value: function (r, i, o, l) {
              var u = this;
              return this.enqueueOp(
                r,
                function () {
                  return u._remove(r, i, o, l);
                },
                WM.REMOVE,
                l
              );
            },
          },
          {
            key: "_remove",
            value: function (r, i, o, l) {
              o <= i
                ? this._onSourceBufferUpdateEnd(r)
                : (this.logger("[debug mse],real removeBuffer,  context,", l),
                  (this._appendStart = Uw()),
                  this.sourceBuffers[r].remove(i, o));
            },
          },
          {
            key: "endOfStream",
            value: function () {
              var r = this;
              this._hasDestroyed ||
                this.ended() ||
                this.enqueueBlockOp(function () {
                  r._hasDestroyed ||
                    r.ended() ||
                    (r.logger("[debug mse] endOfStream"),
                    r.mediaSource.endOfStream());
                }, "endOfStream");
            },
          },
          {
            key: "ended",
            value: function () {
              return (
                !!this.mediaSource && this.mediaSource.readyState === "ended"
              );
            },
          },
          {
            key: "isMediaSourceOpen",
            value: function () {
              return (
                !!this.mediaSource && this.mediaSource.readyState === "open"
              );
            },
          },
          {
            key: "abort",
            value: function (r) {
              var i = this;
              return this.isMediaSourceOpen()
                ? this.enqueueOp(
                    r,
                    function () {
                      i.sourceBuffers[r].abort(), i._onSourceBufferUpdateEnd(r);
                    },
                    "abort"
                  )
                : Promise.resolve();
            },
          },
          {
            key: "reuse",
            value: function (r, i) {
              for (
                var o = Object.keys(this.contentTypes), l = 0;
                l < o.length;
                l++
              ) {
                var u = o[l];
                this.removeBuffer(u, r, i, { start: r, end: i });
              }
            },
          },
          {
            key: "_forceAbort",
            value: function () {
              try {
                for (
                  var r = Object.keys(this.contentTypes), i = 0;
                  i < r.length;
                  i++
                ) {
                  var o = r[i];
                  this.sourceBuffers[o].abort();
                }
              } catch {
                console.log("forceAbort error");
              }
            },
          },
          {
            key: "destroy",
            value: function () {
              if (
                (this.logger("[debug mse] destroy execute"),
                !this._hasDestroyed)
              ) {
                this._forceAbort(),
                  (this._hasDestroyed = !0),
                  window.URL.revokeObjectURL(this.url),
                  this.mediaSource &&
                    (this.mediaSource.removeEventListener(
                      "sourceclose",
                      this._onMediaSourceClose
                    ),
                    this.mediaSource.removeEventListener(
                      "sourceopen",
                      this._onSourceOpen
                    ));
                for (
                  var r = Object.keys(this.contentTypes), i = 0;
                  i < r.length;
                  i++
                ) {
                  var o = r[i],
                    l = this.sourceBuffers[o];
                  if (l) {
                    var u = this.errorHandlers[o];
                    l.removeEventListener("error", u);
                    var c = this.updateHanders[o];
                    l.removeEventListener("updateend", c);
                  }
                }
                (this.opQueues = {}), (this.sourceBuffers = {});
              }
            },
          },
          {
            key: "buffered",
            value: function (r) {
              return this.sourceBuffers[r] && this.sourceBuffers[r].buffered;
            },
          },
          {
            key: "sourceBuffer",
            value: function (r) {
              return this.sourceBuffers[r];
            },
          },
          {
            key: "removeSourceBuffer",
            value: function (r) {
              var i = this.sourceBuffer(r);
              if (i) {
                this.mediaSource.removeSourceBuffer(i);
                var o = this.errorHandlers[r];
                i.removeEventListener("error", o);
                var l = this.updateHanders[r];
                i.removeEventListener("updateend", l),
                  delete this.errorHandlers[r],
                  delete this.sourceBuffers[r],
                  delete this.updateHanders[r];
              }
            },
          },
          {
            key: "setTimeoffset",
            value: function (r, i) {
              var o = this;
              return this.enqueueOp(
                r,
                function () {
                  i < 0 && (i += 0.001),
                    (o.sourceBuffers[r].timestampOffset = i),
                    o._onSourceBufferUpdateEnd(r);
                },
                "setTimeoffset"
              );
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function (r) {
              return (
                window.MediaSource && window.MediaSource.isTypeSupported(r)
              );
            },
          },
        ]
      ),
      n
    );
  })(),
  Uw = function () {
    try {
      return parseInt(performance.now(), 10);
    } catch {
      return new Date().getTime();
    }
  },
  xzr = Di,
  Pfe = qS,
  Lzr = aa,
  Tat = Mce,
  zGe = Yu,
  jGe = $E,
  Ozr = B0,
  Gzr = K5,
  Mfe = Tat.ArrayBuffer,
  qae = Tat.DataView,
  Eat = qae.prototype,
  WGe = Pfe(Mfe.prototype.slice),
  Nzr = Pfe(Eat.getUint8),
  Fzr = Pfe(Eat.setUint8),
  Uzr = Lzr(function () {
    return !new Mfe(2).slice(1, void 0).byteLength;
  });
xzr(
  { target: "ArrayBuffer", proto: !0, unsafe: !0, forced: Uzr },
  {
    slice: function (t, e) {
      if (WGe && e === void 0) return WGe(zGe(this), t);
      for (
        var n = zGe(this).byteLength,
          r = jGe(t, n),
          i = jGe(e === void 0 ? n : e, n),
          o = new (Gzr(this, Mfe))(Ozr(i - r)),
          l = new qae(this),
          u = new qae(o),
          c = 0;
        r < i;

      )
        Fzr(u, c++, Nzr(l, r++));
      return o;
    },
  }
);
var Bzr = LYn,
  Hzr = VYn;
Bzr(
  "Map",
  function (t) {
    return function () {
      return t(this, arguments.length ? arguments[0] : void 0);
    };
  },
  Hzr
);
var eoe = {};
Object.defineProperty(eoe, "__esModule", { value: !0 }),
  (eoe.default = function (t) {
    for (
      var e = 0, n = arguments.length, r = Array(n > 1 ? n - 1 : 0), i = 1;
      i < n;
      i++
    )
      r[i - 1] = arguments[i];
    var o = !0,
      l = !1,
      u = void 0;
    try {
      for (var c, d = r[Symbol.iterator](); !(o = (c = d.next()).done); o = !0)
        e += c.value.length;
    } catch (k) {
      (l = !0), (u = k);
    } finally {
      try {
        !o && d.return && d.return();
      } finally {
        if (l) throw u;
      }
    }
    var h = new t(e),
      f = 0,
      p = !0,
      g = !1,
      y = void 0;
    try {
      for (
        var v, b = r[Symbol.iterator]();
        !(p = (v = b.next()).done);
        p = !0
      ) {
        var w = v.value;
        h.set(w, f), (f += w.length);
      }
    } catch (k) {
      (g = !0), (y = k);
    } finally {
      try {
        !p && b.return && b.return();
      } finally {
        if (g) throw y;
      }
    }
    return h;
  });
var Xzr = eoe,
  Vzr = zzr(Xzr);
function zzr(t) {
  return t && t.__esModule ? t : { default: t };
}
var jzr = Vzr.default,
  Xk = xD(jzr);
function Dm(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function KGe(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function Pm(t, e, n) {
  return (
    e && KGe(t.prototype, e),
    n && KGe(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function ei(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function Wzr(t, e) {
  return Zzr(t) || Qzr(t, e) || Sat(t, e) || qzr();
}
function zg(t) {
  return Kzr(t) || Yzr(t) || Sat(t) || Jzr();
}
function Kzr(t) {
  if (Array.isArray(t)) return toe(t);
}
function Zzr(t) {
  if (Array.isArray(t)) return t;
}
function Yzr(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function Qzr(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o = [],
      l = !0,
      u = !1;
    try {
      for (
        n = n.call(t);
        !(l = (r = n.next()).done) && (o.push(r.value), !e || o.length !== e);
        l = !0
      );
    } catch (c) {
      (u = !0), (i = c);
    } finally {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw i;
      }
    }
    return o;
  }
}
function Sat(t, e) {
  if (t) {
    if (typeof t == "string") return toe(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? toe(t, e)
        : void 0
    );
  }
}
function toe(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function Jzr() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function qzr() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
var AI = { VIDEO: "video", AUDIO: "audio", METADATA: "metadata" },
  w9 = { AVC: "avc", HEVC: "hevc" },
  k9 = { AAC: "aac", G711PCMA: "g7110a", G711PCMU: "g7110m" },
  ejr = (function () {
    function t() {
      Dm(this, t),
        ei(this, "id", 1),
        ei(this, "type", AI.VIDEO),
        ei(this, "codecType", w9.AVC),
        ei(this, "pid", -1),
        ei(this, "hvcC", void 0),
        ei(this, "codec", ""),
        ei(this, "timescale", 0),
        ei(this, "formatTimescale", 0),
        ei(this, "sequenceNumber", 0),
        ei(this, "baseMediaDecodeTime", 0),
        ei(this, "baseDts", 0),
        ei(this, "duration", 0),
        ei(this, "warnings", []),
        ei(this, "samples", []),
        ei(this, "pps", []),
        ei(this, "sps", []),
        ei(this, "vps", []),
        ei(this, "fpsNum", 0),
        ei(this, "fpsDen", 0),
        ei(this, "sarRatio", []),
        ei(this, "width", 0),
        ei(this, "height", 0),
        ei(this, "nalUnitSize", 4),
        ei(this, "present", !1),
        ei(this, "isVideoEncryption", !1),
        ei(this, "isAudioEncryption", !1),
        ei(this, "kid", null),
        ei(this, "pssh", null),
        ei(this, "ext", void 0);
    }
    return (
      Pm(t, [
        {
          key: "reset",
          value: function () {
            (this.sequenceNumber =
              this.width =
              this.height =
              this.fpsDen =
              this.fpsNum =
              this.duration =
              this.baseMediaDecodeTime =
              this.timescale =
                0),
              (this.codec = ""),
              (this.present = !1),
              (this.pid = -1),
              (this.pps = []),
              (this.sps = []),
              (this.vps = []),
              (this.sarRatio = []),
              (this.samples = []),
              (this.warnings = []),
              (this.hvcC = null);
          },
        },
        {
          key: "exist",
          value: function () {
            return !!(this.pps.length && this.sps.length && this.codec);
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !!this.samples.length;
          },
        },
      ]),
      t
    );
  })(),
  tjr = (function () {
    function t() {
      Dm(this, t),
        ei(this, "id", 2),
        ei(this, "type", AI.AUDIO),
        ei(this, "codecType", k9.AAC),
        ei(this, "pid", -1),
        ei(this, "codec", ""),
        ei(this, "sequenceNumber", 0),
        ei(this, "sampleDuration", 0),
        ei(this, "timescale", 0),
        ei(this, "formatTimescale", 0),
        ei(this, "baseMediaDecodeTime", 0),
        ei(this, "duration", 0),
        ei(this, "warnings", []),
        ei(this, "samples", []),
        ei(this, "baseDts", 0),
        ei(this, "sampleSize", 16),
        ei(this, "sampleRate", 0),
        ei(this, "channelCount", 0),
        ei(this, "objectType", 0),
        ei(this, "sampleRateIndex", 0),
        ei(this, "config", []),
        ei(this, "present", !1),
        ei(this, "isVideoEncryption", !1),
        ei(this, "isAudioEncryption", !1),
        ei(this, "kid", null),
        ei(this, "ext", void 0);
    }
    return (
      Pm(t, [
        {
          key: "reset",
          value: function () {
            (this.sequenceNumber = 0),
              (this.timescale = 0),
              (this.sampleDuration = 0),
              (this.sampleRate = 0),
              (this.channelCount = 0),
              (this.baseMediaDecodeTime = 0),
              (this.present = !1),
              (this.pid = -1),
              (this.codec = ""),
              (this.samples = []),
              (this.config = []),
              (this.warnings = []);
          },
        },
        {
          key: "exist",
          value: function () {
            return !!(
              this.sampleRate &&
              this.channelCount &&
              this.codec &&
              this.codecType === k9.AAC
            );
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !!this.samples.length;
          },
        },
      ]),
      t
    );
  })(),
  ZGe = (function () {
    function t(e, n, r) {
      Dm(this, t),
        ei(this, "flag", {}),
        ei(this, "keyframe", !1),
        ei(this, "gopId", 0),
        ei(this, "duration", 0),
        ei(this, "size", 0),
        ei(this, "units", []),
        ei(this, "chromaFormat", 420),
        (this.originPts = this.pts = e),
        (this.originDts = this.dts = n),
        r && (this.units = r);
    }
    return (
      Pm(t, [
        {
          key: "cts",
          get: function () {
            return this.pts - this.dts;
          },
        },
        {
          key: "setToKeyframe",
          value: function () {
            (this.keyframe = !0),
              (this.flag.dependsOn = 2),
              (this.flag.isNonSyncSample = 0);
          },
        },
      ]),
      t
    );
  })(),
  YGe = Pm(function t(e, n, r, i) {
    Dm(this, t),
      ei(this, "duration", 1024),
      ei(this, "flag", { dependsOn: 2, isNonSyncSample: 0 }),
      ei(this, "keyframe", !0),
      (this.originPts = this.pts = this.dts = e),
      (this.data = n),
      (this.size = n.byteLength),
      (this.sampleOffset = i),
      r && (this.duration = r);
  }),
  njr = (function () {
    function t() {
      Dm(this, t),
        ei(this, "id", 3),
        ei(this, "type", AI.METADATA),
        ei(this, "timescale", 0),
        ei(this, "flvScriptSamples", []),
        ei(this, "seiSamples", []);
    }
    return (
      Pm(t, [
        {
          key: "exist",
          value: function () {
            return !(
              (!this.flvScriptSamples.length && !this.seiSamples.length) ||
              !this.timescale
            );
          },
        },
        {
          key: "reset",
          value: function () {
            (this.timescale = 0),
              (this.flvScriptSamples = []),
              (this.seiSamples = []);
          },
        },
        {
          key: "hasSample",
          value: function () {
            return !(!this.flvScriptSamples.length && !this.seiSamples.length);
          },
        },
      ]),
      t
    );
  })(),
  Cfe = typeof window < "u",
  Rat = Cfe && navigator.userAgent.toLocaleLowerCase(),
  rjr = Cfe && Rat.includes("firefox"),
  ijr = Cfe && Rat.includes("android"),
  PC = (function () {
    function t() {
      Dm(this, t);
    }
    return (
      Pm(t, null, [
        {
          key: "getRateIndexByRate",
          value: function (e) {
            return t.FREQ.indexOf(e);
          },
        },
        {
          key: "parseADTS",
          value: function (e, n) {
            for (
              var r = e.length, i = 0;
              i + 2 < r && (e[i] !== 255 || (246 & e[i + 1]) != 240);

            )
              i++;
            if (!(i >= r)) {
              var o = i,
                l = [],
                u = (60 & e[i + 2]) >>> 2,
                c = t.FREQ[u];
              if (!c) throw new Error("Invalid sampling index: ".concat(u));
              for (
                var d,
                  h,
                  f = 1 + ((192 & e[i + 2]) >>> 6),
                  p = ((1 & e[i + 2]) << 2) | ((192 & e[i + 3]) >>> 6),
                  g = t._getConfig(u, p, f),
                  y = g.config,
                  v = g.codec,
                  b = 0,
                  w = t.getFrameDuration(c);
                i + 7 < r;

              )
                if (e[i] === 255 && (246 & e[i + 1]) == 240) {
                  if (
                    r - i <
                    (h =
                      ((3 & e[i + 3]) << 11) |
                      (e[i + 4] << 3) |
                      ((224 & e[i + 5]) >> 5))
                  )
                    break;
                  (d = 2 * (1 & ~e[i + 1])),
                    l.push({
                      pts: n + b * w,
                      data: e.subarray(i + 7 + d, i + h),
                    }),
                    b++,
                    (i += h);
                } else i++;
              return {
                skip: o,
                remaining: i >= r ? void 0 : e.subarray(i),
                frames: l,
                samplingFrequencyIndex: u,
                sampleRate: c,
                objectType: f,
                channelCount: p,
                codec: v,
                config: y,
                originCodec: "mp4a.40.".concat(f),
              };
            }
          },
        },
        {
          key: "parseAudioSpecificConfig",
          value: function (e) {
            if (e.length) {
              var n = e[0] >>> 3,
                r = ((7 & e[0]) << 1) | (e[1] >>> 7),
                i = (120 & e[1]) >>> 3,
                o = t.FREQ[r];
              if (!o) throw new Error("Invalid sampling index: ".concat(r));
              var l = t._getConfig(r, i, n);
              return {
                samplingFrequencyIndex: r,
                sampleRate: o,
                objectType: n,
                channelCount: i,
                config: l.config,
                codec: l.codec,
                originCodec: "mp4a.40.".concat(n),
              };
            }
          },
        },
        {
          key: "getFrameDuration",
          value: function (e) {
            return (
              (1024 *
                (arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : 9e4)) /
              e
            );
          },
        },
        {
          key: "_getConfig",
          value: function (e, n, r) {
            var i,
              o,
              l = [];
            return (
              rjr
                ? e >= 6
                  ? ((i = 5), (o = e - 3))
                  : ((i = 2), (o = e))
                : ijr
                ? ((i = 2), (o = e))
                : ((i = r === 2 || r === 5 ? r : 5),
                  (o = e),
                  e >= 6 ? (o = e - 3) : n === 1 && ((i = 2), (o = e))),
              (l[0] = i << 3),
              (l[0] |= (14 & e) >> 1),
              (l[1] = (1 & e) << 7),
              (l[1] |= n << 3),
              i === 5 &&
                ((l[1] |= (14 & o) >> 1),
                (l[2] = (1 & o) << 7),
                (l[2] |= 8),
                (l[3] = 0)),
              { config: l, codec: "mp4a.40.".concat(i) }
            );
          },
        },
        {
          key: "getSilentFrame",
          value: function (e, n) {
            if (e === "mp4a.40.2") {
              if (n === 1) return new Uint8Array([0, 200, 0, 128, 35, 128]);
              if (n === 2)
                return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
              if (n === 3)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142,
                ]);
              if (n === 4)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128,
                  8, 2, 56,
                ]);
              if (n === 5)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 56,
                ]);
              if (n === 6)
                return new Uint8Array([
                  0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4,
                  153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224,
                ]);
            } else {
              if (n === 1)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6,
                  241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 2)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
              if (n === 3)
                return new Uint8Array([
                  1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0,
                  6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
                  90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94,
                ]);
            }
          },
        },
      ]),
      t
    );
  })();
function p0() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  e = e.filter(Boolean);
  var r = new Uint8Array(
      e.reduce(function (o, l) {
        return o + l.byteLength;
      }, 0)
    ),
    i = 0;
  return (
    e.forEach(function (o) {
      r.set(o, i), (i += o.byteLength);
    }),
    r
  );
}
ei(
  PC,
  "FREQ",
  [
    96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3,
    7350,
  ]
);
var ajr = Math.pow(2, 32);
function cl(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (t[e] << 8) + (t[e + 1] || 0);
}
function ojr(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (t[e] << 16) + (t[e + 1] << 8) + (t[e + 2] || 0);
}
function yi(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return (
    ((t[e] << 24) >>> 0) + (t[e + 1] << 16) + (t[e + 2] << 8) + (t[e + 3] || 0)
  );
}
function hT(t) {
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
  return yi(t, e) * ajr + yi(t, e + 4);
}
function sjr(t) {
  for (var e, n = "avc1.", r = 0; r < 3; r++)
    (e = t[r].toString(16)).length < 2 && (e = "0".concat(e)), (n += e);
  return n;
}
function ljr(t) {
  var e = "";
  if (
    (t.forEach(function (i) {
      e += ujr(i);
    }),
    e.length <= 32)
  )
    for (var n = 32 - e.length, r = 0; r < n; r++) e += "0";
  return e;
}
function QGe(t) {
  if (!Array.isArray(t)) {
    for (var e = [], n = "", r = 0; r < t.length; r++)
      r % 2 && ((n = t[r - 1] + t[r]), e.push(parseInt(n, 16)), (n = ""));
    return e;
  }
  return t.map(function (i) {
    return parseInt(i, 16);
  });
}
function ujr(t) {
  return ("0" + Number(t).toString(16)).slice(-2).toUpperCase();
}
var u0 = (function () {
  function t() {
    Dm(this, t);
  }
  return (
    Pm(t, null, [
      {
        key: "findBox",
        value: function (e, n) {
          var r =
              arguments.length > 2 && arguments[2] !== void 0
                ? arguments[2]
                : 0,
            i = [];
          if (!e) return i;
          for (var o = 0, l = "", u = 0; e.length > 7; ) {
            if (
              ((o = yi(e)),
              (l = String.fromCharCode.apply(null, e.subarray(4, 8))),
              (u = 8),
              o === 1 ? ((o = hT(e, 8)), (u += 8)) : o || (o = e.length),
              !n[0] || l === n[0])
            ) {
              var c = e.subarray(0, o);
              if (!(n.length < 2))
                return t.findBox(c.subarray(u), n.slice(1), r + u);
              i.push({ start: r, size: o, headerSize: u, type: l, data: c });
            }
            (r += o), (e = e.subarray(o));
          }
          return i;
        },
      },
      {
        key: "tfhd",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            n.trackId = yi(r);
            var i = 4,
              o = 1 & n.flags,
              l = 2 & n.flags,
              u = 8 & n.flags,
              c = 16 & n.flags,
              d = 32 & n.flags;
            o && ((i += 4), (n.baseDataOffset = yi(r, i)), (i += 4)),
              l && ((n.sampleDescriptionIndex = yi(r, i)), (i += 4)),
              u && ((n.defaultSampleDuration = yi(r, i)), (i += 4)),
              c && ((n.defaultSampleSize = yi(r, i)), (i += 4)),
              d && (n.defaultSampleFlags = yi(r, i));
          });
        },
      },
      {
        key: "sidx",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = 0;
            (n.reference_ID = yi(r, i)),
              (i += 4),
              (n.timescale = yi(r, i)),
              (i += 4),
              n.version === 0
                ? ((n.earliest_presentation_time = yi(r, i)),
                  (i += 4),
                  (n.first_offset = yi(r, i)),
                  (i += 4))
                : ((n.earliest_presentation_time = hT(r, i)),
                  (i += 8),
                  (n.first_offset = hT(r, i)),
                  (i += 8)),
              (i += 2),
              (n.references = []);
            var o = cl(r, i);
            i += 2;
            for (var l = 0; l < o; l++) {
              var u = {};
              n.references.push(u);
              var c = yi(r, i);
              (i += 4),
                (u.reference_type = (c >> 31) & 1),
                (u.referenced_size = 2147483647 & c),
                (u.subsegment_duration = yi(r, i)),
                (c = yi(r, (i += 4))),
                (i += 4),
                (u.starts_with_SAP = (c >> 31) & 1),
                (u.SAP_type = (c >> 28) & 7),
                (u.SAP_delta_time = 268435455 & c);
            }
          });
        },
      },
      {
        key: "moov",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.mvhd = t.mvhd(t.findBox(r, ["mvhd"], i)[0])),
              (n.trak = t.findBox(r, ["trak"], i).map(function (o) {
                return t.trak(o);
              })),
              (n.pssh = t.pssh(t.findBox(r, ["pssh"], i)[0]));
          });
        },
      },
      {
        key: "mvhd",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = 0;
            n.version === 1
              ? ((n.timescale = yi(r, 16)), (n.duration = hT(r, 20)), (i += 28))
              : ((n.timescale = yi(r, 8)), (n.duration = yi(r, 12)), (i += 16)),
              (n.nextTrackId = yi(r, i + 76));
          });
        },
      },
      {
        key: "trak",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.tkhd = t.tkhd(t.findBox(r, ["tkhd"], i)[0])),
              (n.mdia = t.mdia(t.findBox(r, ["mdia"], i)[0]));
          });
        },
      },
      {
        key: "tkhd",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = 0;
            n.version === 1
              ? ((n.trackId = yi(r, 16)), (n.duration = hT(r, 24)), (i += 32))
              : ((n.trackId = yi(r, 8)), (n.duration = yi(r, 16)), (i += 20)),
              (n.width = yi(r, i + 52)),
              (n.height = yi(r, i + 56));
          });
        },
      },
      {
        key: "mdia",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.mdhd = t.mdhd(t.findBox(r, ["mdhd"], i)[0])),
              (n.hdlr = t.hdlr(t.findBox(r, ["hdlr"], i)[0])),
              (n.minf = t.minf(t.findBox(r, ["minf"], i)[0]));
          });
        },
      },
      {
        key: "mdhd",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = 0;
            n.version === 1
              ? ((n.timescale = yi(r, 16)), (n.duration = hT(r, 20)), (i += 28))
              : ((n.timescale = yi(r, 8)), (n.duration = yi(r, 12)), (i += 16));
            var o = cl(r, i);
            n.language = String.fromCharCode(
              96 + ((o >> 10) & 31),
              96 + ((o >> 5) & 31),
              96 + (31 & o)
            );
          });
        },
      },
      {
        key: "hdlr",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            n.version === 0 &&
              (n.handlerType = String.fromCharCode.apply(
                null,
                r.subarray(4, 8)
              ));
          });
        },
      },
      {
        key: "minf",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.vmhd = t.vmhd(t.findBox(r, ["vmhd"], i)[0])),
              (n.smhd = t.smhd(t.findBox(r, ["smhd"], i)[0])),
              (n.stbl = t.stbl(t.findBox(r, ["stbl"], i)[0]));
          });
        },
      },
      {
        key: "vmhd",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            (n.graphicsmode = cl(r)),
              (n.opcolor = [cl(r, 2), cl(r, 4), cl(r, 6)]);
          });
        },
      },
      {
        key: "smhd",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            n.balance = cl(r);
          });
        },
      },
      {
        key: "stbl",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.stsd = t.stsd(t.findBox(r, ["stsd"], i)[0])),
              (n.stts = t.stts(t.findBox(r, ["stts"], i)[0])),
              (n.ctts = t.ctts(t.findBox(r, ["ctts"], i)[0])),
              (n.stsc = t.stsc(t.findBox(r, ["stsc"], i)[0])),
              (n.stsz = t.stsz(t.findBox(r, ["stsz"], i)[0])),
              (n.stco = t.stco(t.findBox(r, ["stco"], i)[0])),
              n.stco ||
                ((n.co64 = t.co64(t.findBox(r, ["co64"], i)[0])),
                (n.stco = n.co64)),
              (n.stss = t.stss(t.findBox(r, ["stss"], i)[0])),
              (n.senc = t.senc(t.findBox(r, ["senc"], i)[0]));
          });
        },
      },
      {
        key: "senc",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = 0,
              o = yi(r, i);
            (i += 4), (n.samples = []);
            for (var l = 0; l < o; l++) {
              var u = {};
              if (
                ((u.InitializationVector = [
                  r[i],
                  r[i + 1],
                  r[i + 2],
                  r[i + 3],
                  r[i + 4],
                  r[i + 5],
                  r[i + 6],
                  r[i + 7],
                ]),
                (i += 8),
                2 & n.flags)
              ) {
                u.subsamples = [];
                var c = cl(r, i);
                i += 2;
                for (var d = 0; d < c; d++) {
                  var h = {};
                  (h.BytesOfClearData = cl(r, i)),
                    (i += 2),
                    (h.BytesOfProtectedData = yi(r, i)),
                    (i += 4),
                    u.subsamples.push(h);
                }
              }
              n.samples.push(u);
            }
          });
        },
      },
      {
        key: "pssh",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            for (var i = [], o = [], l = 0, u = 0; u < 16; u++)
              o.push(yq(r[l + u]));
            if (((l += 16), n.version > 0)) {
              var c = yi(r, l);
              l += 4;
              for (var d = 0; d < ("" + c).length; d++)
                for (var h = 0; h < 16; h++) {
                  var f = r[l];
                  (l += 1), i.push(yq(f));
                }
            }
            var p = yi(r, l);
            (n.data_size = p),
              (l += 4),
              (n.kid = i),
              (n.system_id = o),
              (n.buffer = r);
          });
        },
      },
      {
        key: "stsd",
        value: function (e) {
          return uo(e, !0, function (n, r, i) {
            (n.entryCount = yi(r)),
              (n.entries = t
                .findBox(r.subarray(4), [], i + 4)
                .map(function (o) {
                  switch (o.type) {
                    case "avc1":
                    case "avc2":
                    case "avc3":
                    case "avc4":
                      return t.avc1(o);
                    case "hvc1":
                    case "hev1":
                      return t.hvc1(o);
                    case "mp4a":
                      return t.mp4a(o);
                    case "alaw":
                    case "ulaw":
                      return t.alaw(o);
                    case "enca":
                      return uo(o, !1, function (l, u, c) {
                        (l.channelCount = cl(u, 16)),
                          (l.samplesize = cl(u, 18)),
                          (l.sampleRate = yi(u, 24) / 65536),
                          (u = u.subarray(28)),
                          (l.sinf = t.sinf(t.findBox(u, ["sinf"], c)[0])),
                          (l.esds = t.esds(t.findBox(u, ["esds"], c)[0]));
                      });
                    case "encv":
                      return uo(o, !1, function (l, u, c) {
                        (l.width = cl(u, 24)),
                          (l.height = cl(u, 26)),
                          (l.horizresolution = yi(u, 28)),
                          (l.vertresolution = yi(u, 32)),
                          (u = u.subarray(78)),
                          (l.sinf = t.sinf(t.findBox(u, ["sinf"], c)[0])),
                          (l.avcC = t.avcC(t.findBox(u, ["avcC"], c)[0])),
                          (l.hvcC = t.hvcC(t.findBox(u, ["hvcC"], c)[0])),
                          (l.pasp = t.pasp(t.findBox(u, ["pasp"], c)[0]));
                      });
                  }
                })
                .filter(Boolean));
          });
        },
      },
      {
        key: "tenc",
        value: function (e) {
          return uo(e, !1, function (n, r) {
            var i = 6;
            (n.default_IsEncrypted = r[i]),
              (i += 1),
              (n.default_IV_size = r[i]),
              (i += 1),
              (n.default_KID = []);
            for (var o = 0; o < 16; o++) n.default_KID.push(yq(r[i])), (i += 1);
          });
        },
      },
      {
        key: "schi",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            n.tenc = t.tenc(t.findBox(r, ["tenc"], i)[0]);
          });
        },
      },
      {
        key: "sinf",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.schi = t.schi(t.findBox(r, ["schi"], i)[0])),
              (n.frma = t.frma(t.findBox(r, ["frma"], i)[0]));
          });
        },
      },
      {
        key: "frma",
        value: function (e) {
          return uo(e, !1, function (n, r) {
            n.data_format = "";
            for (var i = 0; i < 4; i++)
              n.data_format += String.fromCharCode(r[i]);
          });
        },
      },
      {
        key: "avc1",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            var o = qGe(n, r),
              l = r.subarray(o);
            (i += o),
              (n.avcC = t.avcC(t.findBox(l, ["avcC"], i)[0])),
              (n.pasp = t.pasp(t.findBox(l, ["pasp"], i)[0]));
          });
        },
      },
      {
        key: "avcC",
        value: function (e) {
          return uo(e, !1, function (n, r) {
            (n.configurationVersion = r[0]),
              (n.AVCProfileIndication = r[1]),
              (n.profileCompatibility = r[2]),
              (n.AVCLevelIndication = r[3]),
              (n.codec = sjr([r[1], r[2], r[3]])),
              (n.lengthSizeMinusOne = 3 & r[4]),
              (n.spsLength = 31 & r[5]),
              (n.sps = []);
            for (var i = 6, o = 0; o < n.spsLength; o++) {
              var l = cl(r, i);
              (i += 2), n.sps.push(r.subarray(i, i + l)), (i += l);
            }
            (n.ppsLength = r[i]), (i += 1), (n.pps = []);
            for (var u = 0; u < n.ppsLength; u++) {
              var c = cl(r, i);
              (i += 2), n.pps.push(r.subarray(i, (i += c))), (i += c);
            }
          });
        },
      },
      {
        key: "hvc1",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            var o = qGe(n, r),
              l = r.subarray(o);
            (i += o),
              (n.hvcC = t.hvcC(t.findBox(l, ["hvcC"], i)[0])),
              (n.pasp = t.pasp(t.findBox(l, ["pasp"], i)[0]));
          });
        },
      },
      {
        key: "hvcC",
        value: function (e) {
          return uo(e, !1, function (n, r) {
            (n.data = e.data),
              (n.codec = "hev1.1.6.L93.B0"),
              (n.configurationVersion = r[0]);
            var i = r[1];
            (n.generalProfileSpace = i >> 6),
              (n.generalTierFlag = (32 & i) >> 5),
              (n.generalProfileIdc = 31 & i),
              (n.generalProfileCompatibility = yi(r, 2)),
              (n.generalConstraintIndicatorFlags = r.subarray(6, 12)),
              (n.generalLevelIdc = r[12]),
              (n.avgFrameRate = cl(r, 19)),
              (n.numOfArrays = r[22]),
              (n.vps = []),
              (n.sps = []),
              (n.pps = []);
            for (
              var o = 23, l = 0, u = 0, c = 0, d = 0;
              d < n.numOfArrays;
              d++
            ) {
              (l = 63 & r[o]), (u = cl(r, o + 1)), (o += 3);
              for (var h, f = [], p = 0; p < u; p++)
                (c = cl(r, o)),
                  (o += 2),
                  f.push(r.subarray(o, o + c)),
                  (o += c);
              if (l === 32) (h = n.vps).push.apply(h, f);
              else if (l === 33) {
                var g;
                (g = n.sps).push.apply(g, f);
              } else if (l === 34) {
                var y;
                (y = n.pps).push.apply(y, f);
              }
            }
          });
        },
      },
      {
        key: "pasp",
        value: function (e) {
          return uo(e, !1, function (n, r) {
            (n.hSpacing = yi(r)), (n.vSpacing = yi(r, 4));
          });
        },
      },
      {
        key: "mp4a",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            var o = e3e(n, r);
            n.esds = t.esds(t.findBox(r.subarray(o), ["esds"], i + o)[0]);
          });
        },
      },
      {
        key: "esds",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            n.codec = "mp4a.";
            for (var i = 0, o = 0, l = 0, u = 0; r.length; ) {
              for (u = r[(i = 0)], o = r[i + 1], i += 2; 128 & o; )
                (l = (127 & o) << 7), (o = r[i]), (i += 1);
              if (((l += 127 & o), u === 3)) r = r.subarray(i + 3);
              else {
                if (u !== 4) {
                  if (u === 5) {
                    var c = (n.config = r.subarray(i, i + l)),
                      d = (248 & c[0]) >> 3;
                    return (
                      d === 31 &&
                        c.length >= 2 &&
                        (d = 32 + ((7 & c[0]) << 3) + ((224 & c[1]) >> 5)),
                      (n.objectType = d),
                      (n.codec += d.toString(16)),
                      void (
                        n.codec[n.codec.length - 1] === "." &&
                        (n.codec = n.codec.substring(0, n.codec.length - 1))
                      )
                    );
                  }
                  return void (
                    n.codec[n.codec.length - 1] === "." &&
                    (n.codec = n.codec.substring(0, n.codec.length - 1))
                  );
                }
                (n.codec += (r[i].toString(16) + ".").padStart(3, "0")),
                  (r = r.subarray(i + 13));
              }
            }
          });
        },
      },
      {
        key: "alaw",
        value: function (e) {
          return uo(e, !1, function (n, r) {
            e3e(n, r);
          });
        },
      },
      {
        key: "stts",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            for (var i = yi(r), o = [], l = 4, u = 0; u < i; u++)
              o.push({ count: yi(r, l), delta: yi(r, l + 4) }), (l += 8);
            (n.entryCount = i), (n.entries = o);
          });
        },
      },
      {
        key: "ctts",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = yi(r),
              o = [],
              l = 4;
            if (n.version === 1)
              for (var u = 0; u < i; u++)
                o.push({ count: yi(r, l), offset: yi(r, l + 4) }), (l += 8);
            else
              for (var c = 0; c < i; c++)
                o.push({ count: yi(r, l), offset: -(1 + ~yi(r, l + 4)) }),
                  (l += 8);
            (n.entryCount = i), (n.entries = o);
          });
        },
      },
      {
        key: "stsc",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            for (var i = yi(r), o = [], l = 4, u = 0; u < i; u++)
              o.push({
                firstChunk: yi(r, l),
                samplesPerChunk: yi(r, l + 4),
                sampleDescriptionIndex: yi(r, l + 8),
              }),
                (l += 12);
            (n.entryCount = i), (n.entries = o);
          });
        },
      },
      {
        key: "stsz",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = yi(r),
              o = yi(r, 4),
              l = [];
            if (!i)
              for (var u = 8, c = 0; c < o; c++) l.push(yi(r, u)), (u += 4);
            (n.sampleSize = i), (n.sampleCount = o), (n.entrySizes = l);
          });
        },
      },
      {
        key: "stco",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            for (var i = yi(r), o = [], l = 4, u = 0; u < i; u++)
              o.push(yi(r, l)), (l += 4);
            (n.entryCount = i), (n.entries = o);
          });
        },
      },
      {
        key: "co64",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            for (var i = yi(r), o = [], l = 4, u = 0; u < i; u++)
              o.push(hT(r, l)), (l += 8);
            (n.entryCount = i), (n.entries = o);
          });
        },
      },
      {
        key: "stss",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            for (var i = yi(r), o = [], l = 4, u = 0; u < i; u++)
              o.push(yi(r, l)), (l += 4);
            (n.entryCount = i), (n.entries = o);
          });
        },
      },
      {
        key: "moof",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.mfhd = t.mfhd(t.findBox(r, ["mfhd"], i)[0])),
              (n.traf = t.findBox(r, ["traf"], i).map(function (o) {
                return t.traf(o);
              }));
          });
        },
      },
      {
        key: "mfhd",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            n.sequenceNumber = yi(r);
          });
        },
      },
      {
        key: "traf",
        value: function (e) {
          return uo(e, !1, function (n, r, i) {
            (n.tfhd = t.tfhd(t.findBox(r, ["tfhd"], i)[0])),
              (n.tfdt = t.tfdt(t.findBox(r, ["tfdt"], i)[0])),
              (n.trun = t.trun(t.findBox(r, ["trun"], i)[0]));
          });
        },
      },
      {
        key: "trun",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            var i = n.version,
              o = n.flags,
              l = r.length,
              u = (n.sampleCount = yi(r)),
              c = 4;
            if (
              (l > c && 1 & o && ((n.dataOffset = -(1 + ~yi(r, c))), (c += 4)),
              l > c && 4 & o && ((n.firstSampleFlags = yi(r, c)), (c += 4)),
              (n.samples = []),
              l > c)
            )
              for (var d, h = 0; h < u; h++)
                (d = {}),
                  256 & o && ((d.duration = yi(r, c)), (c += 4)),
                  512 & o && ((d.size = yi(r, c)), (c += 4)),
                  1024 & o && ((d.flags = yi(r, c)), (c += 4)),
                  2048 & o &&
                    ((d.cts = i ? -(1 + ~yi(r, c + 4)) : yi(r, c)), (c += 4)),
                  n.samples.push(d);
          });
        },
      },
      {
        key: "tfdt",
        value: function (e) {
          return uo(e, !0, function (n, r) {
            n.version === 1
              ? (n.baseMediaDecodeTime = hT(r))
              : (n.baseMediaDecodeTime = yi(r));
          });
        },
      },
      {
        key: "probe",
        value: function (e) {
          return !!t.findBox(e, ["ftyp"]);
        },
      },
      {
        key: "parseSampleFlags",
        value: function (e) {
          return {
            isLeading: (12 & e[0]) >>> 2,
            dependsOn: 3 & e[0],
            isDependedOn: (192 & e[1]) >>> 6,
            hasRedundancy: (48 & e[1]) >>> 4,
            paddingValue: (14 & e[1]) >>> 1,
            isNonSyncSample: 1 & e[1],
            degradationPriority: (e[2] << 8) | e[3],
          };
        },
      },
      {
        key: "moovToTrack",
        value: function (e, n, r) {
          var i,
            o,
            l = e.trak;
          if (l && l.length) {
            var u = l.find(function (B) {
                var re, Ae;
                return (
                  ((re = B.mdia) === null ||
                  re === void 0 ||
                  (Ae = re.hdlr) === null ||
                  Ae === void 0
                    ? void 0
                    : Ae.handlerType) === "vide"
                );
              }),
              c = l.find(function (B) {
                var re, Ae;
                return (
                  ((re = B.mdia) === null ||
                  re === void 0 ||
                  (Ae = re.hdlr) === null ||
                  Ae === void 0
                    ? void 0
                    : Ae.handlerType) === "soun"
                );
              });
            if (u && n) {
              var d,
                h,
                f,
                p,
                g,
                y,
                v,
                b = n,
                w = (d = u.tkhd) === null || d === void 0 ? void 0 : d.trackId;
              w != null && (b.id = u.tkhd.trackId),
                (b.tkhdDuration = u.tkhd.duration),
                (b.mvhdDurtion = e.mvhd.duration),
                (b.mvhdTimecale = e.mvhd.timescale),
                (b.timescale = b.formatTimescale = u.mdia.mdhd.timescale),
                (b.duration =
                  u.mdia.mdhd.duration ||
                  (b.mvhdDurtion / b.mvhdTimecale) * b.timescale);
              var k,
                D,
                $,
                N,
                P,
                I,
                O,
                X,
                G = u.mdia.minf.stbl.stsd.entries[0];
              if (
                ((b.width = G.width),
                (b.height = G.height),
                G.pasp && (b.sarRatio = [G.pasp.hSpacing, G.pasp.vSpacing]),
                G.hvcC)
              )
                (b.codecType = w9.HEVC),
                  (b.codec = G.hvcC.codec),
                  (b.vps = G.hvcC.vps),
                  (b.sps = G.hvcC.sps),
                  (b.pps = G.hvcC.pps),
                  (b.hvcC = G.hvcC.data);
              else {
                if (!G.avcC) throw new Error("unknown video stsd entry");
                (b.codec = G.avcC.codec),
                  (b.sps = G.avcC.sps),
                  (b.pps = G.avcC.pps);
              }
              (b.present = !0),
                (b.ext = {}),
                (b.ext.stss =
                  (h = u.mdia) === null ||
                  h === void 0 ||
                  (f = h.minf) === null ||
                  f === void 0 ||
                  (p = f.stbl) === null ||
                  p === void 0
                    ? void 0
                    : p.stss),
                (b.ext.ctts =
                  (g = u.mdia) === null ||
                  g === void 0 ||
                  (y = g.minf) === null ||
                  y === void 0 ||
                  (v = y.stbl) === null ||
                  v === void 0
                    ? void 0
                    : v.ctts),
                G &&
                  G.type === "encv" &&
                  ((b.isVideoEncryption = !0),
                  (G.default_KID =
                    (k = G.sinf) === null ||
                    k === void 0 ||
                    (D = k.schi) === null ||
                    D === void 0
                      ? void 0
                      : D.tenc.default_KID),
                  (G.default_IsEncrypted =
                    ($ = G.sinf) === null ||
                    $ === void 0 ||
                    (N = $.schi) === null ||
                    N === void 0
                      ? void 0
                      : N.tenc.default_IsEncrypted),
                  (G.default_IV_size =
                    (P = G.sinf) === null ||
                    P === void 0 ||
                    (I = P.schi) === null ||
                    I === void 0
                      ? void 0
                      : I.tenc.default_IV_size),
                  (b.videoSenc =
                    u.mdia.minf.stbl.senc && u.mdia.minf.stbl.senc.samples),
                  (G.data_format =
                    (O = G.sinf) === null ||
                    O === void 0 ||
                    (X = O.frma) === null ||
                    X === void 0
                      ? void 0
                      : X.data_format),
                  (b.useEME = e.useEME),
                  (b.kidValue = e.kidValue),
                  (b.pssh = e.pssh),
                  (b.encv = G));
            }
            if (c && r) {
              var H,
                E,
                S,
                L,
                W,
                F,
                oe,
                De,
                Xe,
                ze = r,
                ht = (H = c.tkhd) === null || H === void 0 ? void 0 : H.trackId;
              ht != null && (ze.id = c.tkhd.trackId),
                (ze.tkhdDuration = c.tkhd.duration),
                (ze.mvhdDurtion = e.mvhd.duration),
                (ze.mvhdTimecale = e.mvhd.timescale),
                (ze.timescale = ze.formatTimescale = c.mdia.mdhd.timescale),
                (ze.duration =
                  c.mdia.mdhd.duration ||
                  (ze.mvhdDurtion / ze.mvhdTimecale) * ze.timescale);
              var gt,
                pt,
                $t,
                ot,
                tt,
                He,
                de,
                ue,
                Z = c.mdia.minf.stbl.stsd.entries[0];
              switch (
                ((ze.sampleSize = Z.sampleSize),
                (ze.sampleRate = Z.sampleRate),
                (ze.channelCount = Z.channelCount),
                (ze.present = !0),
                Z.type)
              ) {
                case "alaw":
                  (ze.codecType = ze.codec = k9.G711PCMA),
                    (ze.sampleRate = 8e3);
                  break;
                case "ulaw":
                  (ze.codecType = ze.codec = k9.G711PCMU),
                    (ze.sampleRate = 8e3);
                  break;
                default:
                  (ze.sampleDuration = PC.getFrameDuration(
                    ze.sampleRate,
                    ze.timescale
                  )),
                    (ze.sampleRateIndex = PC.getRateIndexByRate(ze.sampleRate)),
                    (ze.objectType =
                      ((i = Z.esds) === null || i === void 0
                        ? void 0
                        : i.objectType) || 2),
                    Z.esds && (ze.config = Array.from(Z.esds.config)),
                    (ze.codec =
                      ((o = Z.esds) === null || o === void 0
                        ? void 0
                        : o.codec) || "mp4a.40.2");
              }
              (ze.sampleDuration = PC.getFrameDuration(
                ze.sampleRate,
                ze.timescale
              )),
                (ze.objectType =
                  ((E = Z.esds) === null || E === void 0
                    ? void 0
                    : E.objectType) || 2),
                Z.esds &&
                  (Z.esds.config
                    ? (ze.config = Array.from(Z.esds.config))
                    : console.warn("esds config is null")),
                (ze.codec =
                  ((S = Z.esds) === null || S === void 0 ? void 0 : S.codec) ||
                  "mp4a.40.2"),
                (ze.sampleRateIndex = PC.getRateIndexByRate(ze.sampleRate)),
                (ze.ext = {}),
                (ze.ext.stss =
                  (L = c.mdia) === null ||
                  L === void 0 ||
                  (W = L.minf) === null ||
                  W === void 0 ||
                  (F = W.stbl) === null ||
                  F === void 0
                    ? void 0
                    : F.stss),
                (ze.ext.ctts =
                  (oe = c.mdia) === null ||
                  oe === void 0 ||
                  (De = oe.minf) === null ||
                  De === void 0 ||
                  (Xe = De.stbl) === null ||
                  Xe === void 0
                    ? void 0
                    : Xe.ctts),
                (ze.present = !0),
                Z &&
                  Z.type === "enca" &&
                  ((ze.isAudioEncryption = !0),
                  (Z.data_format =
                    (gt = Z.sinf) === null ||
                    gt === void 0 ||
                    (pt = gt.frma) === null ||
                    pt === void 0
                      ? void 0
                      : pt.data_format),
                  (Z.default_KID =
                    ($t = Z.sinf) === null ||
                    $t === void 0 ||
                    (ot = $t.schi) === null ||
                    ot === void 0
                      ? void 0
                      : ot.tenc.default_KID),
                  (Z.default_IsEncrypted =
                    (tt = Z.sinf) === null ||
                    tt === void 0 ||
                    (He = tt.schi) === null ||
                    He === void 0
                      ? void 0
                      : He.tenc.default_IsEncrypted),
                  (Z.default_IV_size =
                    (de = Z.sinf) === null ||
                    de === void 0 ||
                    (ue = de.schi) === null ||
                    ue === void 0
                      ? void 0
                      : ue.tenc.default_IV_size),
                  (ze.audioSenc =
                    c.mdia.minf.stbl.senc && c.mdia.minf.stbl.senc.samples),
                  (ze.useEME = e.useEME),
                  (ze.kidValue = e.kidValue),
                  (ze.enca = Z));
            }
            if (
              (r && (r.isVideoEncryption = !!n && n.isVideoEncryption),
              n && (n.isAudioEncryption = !!r && r.isAudioEncryption),
              (n != null && n.encv) || (r != null && r.enca))
            ) {
              var ie,
                Ne,
                Pe =
                  n == null || (ie = n.encv) === null || ie === void 0
                    ? void 0
                    : ie.default_KID,
                kt =
                  r == null || (Ne = r.enca) === null || Ne === void 0
                    ? void 0
                    : Ne.default_KID,
                Gt = Pe || kt ? (Pe || kt).join("") : null;
              n && (n.kid = Gt), r && (r.kid = Gt);
            }
            return (
              n && (n.flags = 3841),
              r && (r.flags = 1793),
              { videoTrack: n, audioTrack: r }
            );
          }
        },
      },
      {
        key: "evaluateDefaultDuration",
        value: function (e, n, r) {
          var i,
            o =
              n == null || (i = n.samples) === null || i === void 0
                ? void 0
                : i.length;
          return o ? (((1024 * o) / n.timescale) * e.timescale) / r : 1024;
        },
      },
      {
        key: "moofToSamples",
        value: function (e, n, r) {
          var i = {};
          return (
            e.mfhd &&
              (n && (n.sequenceNumber = e.mfhd.sequenceNumber),
              r && (r.sequenceNumber = e.mfhd.sequenceNumber)),
            e.traf.forEach(function (o) {
              var l = o.tfhd,
                u = o.tfdt,
                c = o.trun;
              if (l && c) {
                u &&
                  (n &&
                    n.id === l.trackId &&
                    (n.baseMediaDecodeTime = u.baseMediaDecodeTime),
                  r &&
                    r.id === l.trackId &&
                    (r.baseMediaDecodeTime = u.baseMediaDecodeTime));
                var d = l.defaultSampleSize || 0,
                  h =
                    l.defaultSampleDuration ||
                    t.evaluateDefaultDuration(
                      n,
                      r,
                      c.samples.length || c.sampleCount
                    ),
                  f = c.dataOffset || 0,
                  p = 0,
                  g = -1;
                if (!c.samples.length && c.sampleCount) {
                  i[l.trackId] = [];
                  for (var y = 0; y < c.sampleCount; y++)
                    i[l.trackId].push({
                      offset: f,
                      dts: p,
                      duration: h,
                      size: d,
                    }),
                      (p += h),
                      (f += d);
                } else
                  i[l.trackId] = c.samples.map(function (v, b) {
                    return (
                      (v = {
                        offset: f,
                        dts: p,
                        pts: p + (v.cts || 0),
                        duration: v.duration || h,
                        size: v.size || d,
                        gopId: g,
                        keyframe:
                          b === 0 ||
                          (v.flags !== null &&
                            v.flags !== void 0 &&
                            (65536 & v.flags) >>> 0 != 65536),
                      }).keyframe && (g++, (v.gopId = g)),
                      (p += v.duration),
                      (f += v.size),
                      v
                    );
                  });
              }
            }),
            i
          );
        },
      },
      {
        key: "moovToSamples",
        value: function (e) {
          var n = e.trak;
          if (n && n.length) {
            var r = n.find(function (X) {
                var G, H;
                return (
                  ((G = X.mdia) === null ||
                  G === void 0 ||
                  (H = G.hdlr) === null ||
                  H === void 0
                    ? void 0
                    : H.handlerType) === "vide"
                );
              }),
              i = n.find(function (X) {
                var G, H;
                return (
                  ((G = X.mdia) === null ||
                  G === void 0 ||
                  (H = G.hdlr) === null ||
                  H === void 0
                    ? void 0
                    : H.handlerType) === "soun"
                );
              });
            if (r || i) {
              var o, l;
              if (r) {
                var u,
                  c,
                  d =
                    (u = r.mdia) === null ||
                    u === void 0 ||
                    (c = u.minf) === null ||
                    c === void 0
                      ? void 0
                      : c.stbl;
                if (!d) return;
                var h = d.stts,
                  f = d.stsc,
                  p = d.stsz,
                  g = d.stco,
                  y = d.stss,
                  v = d.ctts;
                if (!(h && f && p && g && y)) return;
                o = JGe(h, f, p, g, v, y);
              }
              if (i) {
                var b,
                  w,
                  k,
                  D =
                    (b = i.mdia) === null ||
                    b === void 0 ||
                    (w = b.minf) === null ||
                    w === void 0
                      ? void 0
                      : w.stbl;
                if (!D) return;
                var $ =
                    (k = i.mdia.mdhd) === null || k === void 0
                      ? void 0
                      : k.timescale,
                  N = D.stts,
                  P = D.stsc,
                  I = D.stsz,
                  O = D.stco;
                if (!($ && N && P && I && O)) return;
                l = JGe(N, P, I, O);
              }
              return { videoSamples: o, audioSamples: l };
            }
          }
        },
      },
    ]),
    t
  );
})();
function JGe(t, e, n, r, i, o) {
  var l,
    u,
    c,
    d = [],
    h = i == null ? void 0 : i.entries,
    f = e.entries,
    p = r.entries,
    g = n.entrySizes,
    y = o == null ? void 0 : o.entries;
  y &&
    ((l = {}),
    y.forEach(function (I) {
      l[I - 1] = !0;
    })),
    h &&
      ((u = []),
      h.forEach(function (I) {
        for (var O = I.count, X = I.offset, G = 0; G < O; G++) u.push(X);
      }));
  var v = -1,
    b = 0,
    w = 0,
    k = 0,
    D = 0,
    $ = 0,
    N = f[0].samplesPerChunk,
    P = f[1] ? f[1].firstChunk - 1 : 1 / 0;
  return (
    t.entries.forEach(function (I) {
      for (var O = I.count, X = I.delta, G = 0; G < O; G++)
        (c = {
          dts: b,
          duration: X,
          size: g[w] || n.sampleSize,
          offset: p[k] + $,
          index: w,
        }),
          y && ((c.keyframe = l[w]), c.keyframe && v++, (c.gopId = v)),
          u && w < u.length && (c.pts = c.dts + u[w]),
          d.push(c),
          (b += X),
          ++w < N
            ? ($ += c.size)
            : (k++,
              ($ = 0),
              k >= P && (D++, (P = f[D + 1] ? f[D + 1].firstChunk - 1 : 1 / 0)),
              (N += f[D].samplesPerChunk));
    }),
    d
  );
}
function qGe(t, e) {
  return (
    (t.dataReferenceIndex = cl(e, 6)),
    (t.width = cl(e, 24)),
    (t.height = cl(e, 26)),
    (t.horizresolution = yi(e, 28)),
    (t.vertresolution = yi(e, 32)),
    (t.frameCount = cl(e, 40)),
    (t.depth = cl(e, 74)),
    78
  );
}
function e3e(t, e) {
  return (
    (t.dataReferenceIndex = cl(e, 6)),
    (t.channelCount = cl(e, 16)),
    (t.sampleSize = cl(e, 18)),
    (t.sampleRate = yi(e, 24) / 65536),
    28
  );
}
function uo(t, e, n) {
  if (t) {
    if (t.size !== t.data.length)
      throw new Error("box ".concat(t.type, " size !== data.length"));
    var r = {
      start: t.start,
      size: t.size,
      headerSize: t.headerSize,
      type: t.type,
    };
    return (
      e &&
        ((r.version = t.data[t.headerSize]),
        (r.flags = ojr(t.data, t.headerSize + 1)),
        (r.headerSize += 4)),
      n(r, t.data.subarray(r.headerSize), r.start + r.headerSize),
      r
    );
  }
}
var cjr = function (t, e, n) {
    for (
      var r = String(n),
        i = e >> 0,
        o = Math.ceil(i / r.length),
        l = [],
        u = String(t);
      o--;

    )
      l.push(r);
    return l.join("").substring(0, i - u.length) + u;
  },
  yq = function () {
    for (var t = [], e = arguments.length, n = new Array(e), r = 0; r < e; r++)
      n[r] = arguments[r];
    return (
      n.forEach(function (i) {
        t.push(cjr(Number(i).toString(16), 2, 0));
      }),
      t[0]
    );
  },
  jc = (function () {
    function t() {
      Dm(this, t), (this.buffer = new Uint8Array(0));
    }
    return (
      Pm(
        t,
        [
          {
            key: "write",
            value: function () {
              for (
                var e = this, n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              r.forEach(function (o) {
                o
                  ? (e.buffer = Xk(Uint8Array, e.buffer, o))
                  : window.console.warn(o);
              });
            },
          },
        ],
        [
          {
            key: "writeUint16",
            value: function (e) {
              return new Uint8Array([(e >> 8) & 255, 255 & e]);
            },
          },
          {
            key: "writeUint32",
            value: function (e) {
              return new Uint8Array([
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ]);
            },
          },
        ]
      ),
      t
    );
  })(),
  t3e = Math.pow(2, 32) - 1,
  Ga = (function () {
    function t() {
      Dm(this, t);
    }
    return (
      Pm(t, null, [
        {
          key: "box",
          value: function (e) {
            for (
              var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
              i < n;
              i++
            )
              r[i - 1] = arguments[i];
            var o =
                8 +
                (r = r.filter(Boolean)).reduce(function (c, d) {
                  return c + d.byteLength;
                }, 0),
              l = new Uint8Array(o);
            (l[0] = (o >> 24) & 255),
              (l[1] = (o >> 16) & 255),
              (l[2] = (o >> 8) & 255),
              (l[3] = 255 & o),
              l.set(e, 4);
            var u = 8;
            return (
              r.forEach(function (c) {
                l.set(c, u), (u += c.byteLength);
              }),
              l
            );
          },
        },
        {
          key: "ftyp",
          value: function (e) {
            return e.find(function (n) {
              return n.type === AI.VIDEO && n.codecType === w9.HEVC;
            })
              ? t.FTYPHEV1
              : t.FTYPAVC1;
          },
        },
        {
          key: "initSegment",
          value: function (e) {
            return p0(t.ftyp(e), t.moov(e));
          },
        },
        {
          key: "pssh",
          value: function (e) {
            var n = new Uint8Array(
              [1, 0, 0, 0].concat(
                [
                  16, 119, 239, 236, 192, 178, 77, 2, 172, 227, 60, 30, 82, 226,
                  251, 75,
                ],
                [0, 0, 0, 1],
                QGe(e.kid),
                [0, 0, 0, 0]
              )
            );
            return t.box(t.types.pssh, n);
          },
        },
        {
          key: "moov",
          value: function (e) {
            if (e[0].useEME && (e[0].encv || e[0].enca)) {
              e[0].pssh || (e[0].pssh = { kid: e[0].kid });
              var n = this.pssh(e[0].pssh);
              return t.box.apply(
                t,
                [
                  t.types.moov,
                  t.mvhd(
                    e[0].mvhdDurtion || e[0].duration,
                    e[0].mvhdTimecale || e[0].timescale
                  ),
                  t.mvex(e),
                ].concat(
                  zg(
                    e.map(function (r) {
                      return t.trak(r);
                    })
                  ),
                  [n]
                )
              );
            }
            return t.box.apply(
              t,
              [
                t.types.moov,
                t.mvhd(
                  e[0].mvhdDurtion || e[0].duration,
                  e[0].mvhdTimecale || e[0].timescale
                ),
              ].concat(
                zg(
                  e.map(function (r) {
                    return t.trak(r);
                  })
                ),
                [t.mvex(e)]
              )
            );
          },
        },
        {
          key: "mvhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mvhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                1,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                255,
                255,
                255,
                255,
              ])
            );
          },
        },
        {
          key: "trak",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.tkhdDuration || 0, e.width, e.height),
              t.mdia(e)
            );
          },
        },
        {
          key: "tkhd",
          value: function (e, n) {
            var r =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : 0,
              i =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : 0;
            return t.box(
              t.types.tkhd,
              new Uint8Array([
                0,
                0,
                0,
                7,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                64,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
                (i >> 8) & 255,
                255 & i,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "mdia",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minf(e)
            );
          },
        },
        {
          key: "mdhd",
          value: function (e) {
            var n =
              arguments.length > 1 && arguments[1] !== void 0
                ? arguments[1]
                : 9e4;
            return t.box(
              t.types.mdhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
                (e >> 24) & 255,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                85,
                196,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "hdlr",
          value: function (e) {
            return t.box(t.types.hdlr, t.HDLR_TYPES[e]);
          },
        },
        {
          key: "minf",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === AI.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stbl(e)
            );
          },
        },
        {
          key: "stbl",
          value: function (e) {
            var n = [];
            return (
              e && e.ext && e.ext.stss && n.push(t.stss(e.ext.stss.entries)),
              t.box(
                t.types.stbl,
                t.stsd(e),
                t.STTS,
                n[0],
                t.STSC,
                t.STSZ,
                t.STCO
              )
            );
          },
        },
        {
          key: "stsd",
          value: function (e) {
            var n;
            return (
              (n =
                e.type === "audio"
                  ? e.useEME && e.enca
                    ? t.enca(e)
                    : t.mp4a(e)
                  : e.useEME && e.encv
                  ? t.encv(e)
                  : t.avc1hev1(e)),
              t.box(t.types.stsd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]), n)
            );
          },
        },
        {
          key: "enca",
          value: function (e) {
            var n = e.enca.channelCount,
              r = e.enca.sampleRate,
              i = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                n,
                0,
                16,
                0,
                0,
                0,
                0,
                (r >> 8) & 255,
                255 & r,
                0,
                0,
              ]),
              o = t.esds(e.config),
              l = t.sinf(e.enca);
            return t.box(t.types.enca, i, o, l);
          },
        },
        {
          key: "encv",
          value: function (e) {
            var n,
              r,
              i = e.sps.length > 0 ? e.sps[0] : [],
              o = e.pps.length > 0 ? e.pps[0] : [],
              l = e.width,
              u = e.height,
              c = e.sarRatio[0],
              d = e.sarRatio[1],
              h = new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                (l >> 8) & 255,
                255 & l,
                (u >> 8) & 255,
                255 & u,
                0,
                72,
                0,
                0,
                0,
                72,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                18,
                100,
                97,
                105,
                108,
                121,
                109,
                111,
                116,
                105,
                111,
                110,
                47,
                104,
                108,
                115,
                46,
                106,
                115,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                24,
                17,
                17,
              ]),
              f = new Uint8Array(
                (n = (r = [
                  1,
                  i[1],
                  i[2],
                  i[3],
                  255,
                  225,
                  (i.length >>> 8) & 255,
                  255 & i.length,
                ]).concat
                  .apply(r, zg(i))
                  .concat([
                    1,
                    (o.length >>> 8) & 255,
                    255 & o.length,
                  ])).concat.apply(n, zg(o))
              ),
              p = new Uint8Array([0, 0, 88, 57, 0, 15, 200, 192, 0, 4, 86, 72]),
              g = t.sinf(e.encv),
              y = new Uint8Array([
                c >> 24,
                (c >> 16) & 255,
                (c >> 8) & 255,
                255 & c,
                d >> 24,
                (d >> 16) & 255,
                (d >> 8) & 255,
                255 & d,
              ]);
            return t.box(
              t.types.encv,
              h,
              t.box(t.types.avcC, f),
              t.box(t.types.btrt, p),
              g,
              t.box(t.types.pasp, y)
            );
          },
        },
        {
          key: "schi",
          value: function (e) {
            var n = new Uint8Array([]),
              r = t.tenc(e);
            return t.box(t.types.schi, n, r);
          },
        },
        {
          key: "tenc",
          value: function (e) {
            var n = new Uint8Array(
              [
                0,
                0,
                0,
                0,
                0,
                0,
                255 & e.default_IsEncrypted,
                255 & e.default_IV_size,
              ].concat(QGe(e.default_KID))
            );
            return t.box(t.types.tenc, n);
          },
        },
        {
          key: "sinf",
          value: function (e) {
            var n = new Uint8Array([]),
              r = new Uint8Array([
                e.data_format.charCodeAt(0),
                e.data_format.charCodeAt(1),
                e.data_format.charCodeAt(2),
                e.data_format.charCodeAt(3),
              ]),
              i = new Uint8Array([0, 0, 0, 0, 99, 101, 110, 99, 0, 1, 0, 0]),
              o = t.schi(e);
            return t.box(
              t.types.sinf,
              n,
              t.box(t.types.frma, r),
              t.box(t.types.schm, i),
              o
            );
          },
        },
        {
          key: "avc1hev1",
          value: function (e) {
            var n = e.codecType === w9.HEVC,
              r = n ? t.types.hvc1 : t.types.avc1,
              i = n ? t.hvcC(e) : t.avcC(e),
              o = [
                new Uint8Array([
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  (e.width >> 8) & 255,
                  255 & e.width,
                  (e.height >> 8) & 255,
                  255 & e.height,
                  0,
                  72,
                  0,
                  0,
                  0,
                  72,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  1,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  0,
                  24,
                  17,
                  17,
                ]),
                i,
              ];
            return (
              n
                ? o.push(t.box(t.types.fiel, new Uint8Array([1, 0])))
                : e.sarRatio &&
                  e.sarRatio.length > 1 &&
                  o.push(t.pasp(e.sarRatio)),
              t.box.apply(t, [r].concat(o))
            );
          },
        },
        {
          key: "avcC",
          value: function (e) {
            var n,
              r,
              i,
              o = [],
              l = [];
            return (
              e.sps.forEach(function (u) {
                (i = u.byteLength),
                  o.push((i >>> 8) & 255),
                  o.push(255 & i),
                  o.push.apply(o, zg(u));
              }),
              e.pps.forEach(function (u) {
                (i = u.byteLength),
                  l.push((i >>> 8) & 255),
                  l.push(255 & i),
                  l.push.apply(l, zg(u));
              }),
              t.box(
                t.types.avcC,
                new Uint8Array(
                  (n = (r = [
                    1,
                    o[3],
                    o[4],
                    o[5],
                    255,
                    224 | e.sps.length,
                  ]).concat
                    .apply(r, o)
                    .concat([e.pps.length])).concat.apply(n, l)
                )
              )
            );
          },
        },
        {
          key: "hvcC",
          value: function (e) {
            var n = e.hvcC;
            if (n instanceof ArrayBuffer || n instanceof Uint8Array) return n;
            var r,
              i = e.vps,
              o = e.sps,
              l = e.pps;
            if (n) {
              var u = n.generalProfileCompatibilityFlags,
                c = n.generalConstraintIndicatorFlags,
                d = (i.length && 1) + (o.length && 1) + (l.length && 1);
              r = [
                1,
                (n.generalProfileSpace << 6) |
                  (n.generalTierFlag << 5) |
                  n.generalProfileIdc,
                u >>> 24,
                u >>> 16,
                u >>> 8,
                u,
                c[0],
                c[1],
                c[2],
                c[3],
                c[4],
                c[5],
                n.generalLevelIdc,
                240,
                0,
                252,
                252 | n.chromaFormatIdc,
                248 | n.bitDepthLumaMinus8,
                248 | n.bitDepthChromaMinus8,
                0,
                0,
                (n.numTemporalLayers << 3) | (n.temporalIdNested << 2) | 3,
                d,
              ];
              var h = function (f) {
                var p;
                r.push(f.length >> 8, f.length), (p = r).push.apply(p, zg(f));
              };
              i.length && (r.push(160, 0, i.length), i.forEach(h)),
                o.length && (r.push(161, 0, o.length), o.forEach(h)),
                l.length && (r.push(162, 0, l.length), l.forEach(h));
            } else
              r = [
                1, 1, 96, 0, 0, 0, 144, 0, 0, 0, 0, 0, 93, 240, 0, 252, 253,
                248, 248, 0, 0, 15, 3, 160, 0, 1, 0, 24, 64, 1, 12, 1, 255, 255,
                1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0, 0, 3, 0, 93, 153, 152, 9,
                161, 0, 1, 0, 45, 66, 1, 1, 1, 96, 0, 0, 3, 0, 144, 0, 0, 3, 0,
                0, 3, 0, 93, 160, 2, 128, 128, 45, 22, 89, 153, 164, 147, 43,
                154, 128, 128, 128, 130, 0, 0, 3, 0, 2, 0, 0, 3, 0, 50, 16, 162,
                0, 1, 0, 7, 68, 1, 193, 114, 180, 98, 64,
              ];
            return t.box(t.types.hvcC, new Uint8Array(r));
          },
        },
        {
          key: "pasp",
          value: function (e) {
            var n = Wzr(e, 2),
              r = n[0],
              i = n[1];
            return t.box(
              t.types.pasp,
              new Uint8Array([
                r >> 24,
                (r >> 16) & 255,
                (r >> 8) & 255,
                255 & r,
                i >> 24,
                (i >> 16) & 255,
                (i >> 8) & 255,
                255 & i,
              ])
            );
          },
        },
        {
          key: "mp4a",
          value: function (e) {
            return t.box(
              t.types.mp4a,
              new Uint8Array([
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                e.channelCount,
                0,
                16,
                0,
                0,
                0,
                0,
                (e.sampleRate >> 8) & 255,
                255 & e.sampleRate,
                0,
                0,
              ]),
              e.config.length ? t.esds(e.config) : void 0
            );
          },
        },
        {
          key: "esds",
          value: function (e) {
            var n = e.length;
            return t.box(
              t.types.esds,
              new Uint8Array(
                [
                  0,
                  0,
                  0,
                  0,
                  3,
                  23 + n,
                  0,
                  0,
                  0,
                  4,
                  15 + n,
                  64,
                  21,
                  0,
                  6,
                  0,
                  0,
                  0,
                  218,
                  192,
                  0,
                  0,
                  218,
                  192,
                  5,
                ]
                  .concat([n])
                  .concat(e)
                  .concat([6, 1, 2])
              )
            );
          },
        },
        {
          key: "mvex",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.mvex].concat(
                zg(
                  e.map(function (n) {
                    return t.trex(n.id);
                  })
                )
              )
            );
          },
        },
        {
          key: "trex",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                1,
              ])
            );
          },
        },
        {
          key: "trex1",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                2,
                0,
                0,
                0,
                0,
                0,
                0,
                1,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "trex2",
          value: function (e) {
            return t.box(
              t.types.trex,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
                0,
                0,
                0,
                1,
                0,
                0,
                4,
                0,
                0,
                0,
                0,
                0,
                2,
                0,
                0,
                0,
              ])
            );
          },
        },
        {
          key: "moof",
          value: function (e) {
            return t.box.apply(
              t,
              [
                t.types.moof,
                t.mfhd(e[0].samples ? e[0].samples[0].gopId : 0),
              ].concat(
                zg(
                  e.map(function (n) {
                    return t.traf(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "mfhd",
          value: function (e) {
            return t.box(
              t.types.mfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "traf",
          value: function (e) {
            var n = t.tfhd(e.id),
              r = t.tfdt(e, e.baseMediaDecodeTime);
            if (e.useEME && (e.isVideoEncryption || e.isAudioEncryption)) {
              if (e.isVideoEncryption) {
                if (e.id === 1) {
                  var i = t.saiz(e),
                    o = t.saio(e),
                    l = t.trun1(e),
                    u = t.senc(e);
                  return t.box(t.types.traf, n, r, i, o, l, u);
                }
                if (e.isAudioEncryption) {
                  var c = t.sbgp(),
                    d = t.saiz(e),
                    h = t.saio(e),
                    f = t.senc(e),
                    p = t.trun1(e);
                  return t.box(t.types.traf, n, r, c, d, h, f, p);
                }
                var g = t.sbgp(),
                  y = t.trun1(e);
                return t.box(t.types.traf, n, r, g, y);
              }
              if (e.id === 1) {
                var v = t.trun1(e);
                return t.box(t.types.traf, n, r, v);
              }
              var b = t.sbgp(),
                w = t.saiz(e),
                k = t.saio(e),
                D = t.senc(e),
                $ = t.trun1(e);
              return t.box(t.types.traf, n, r, b, w, k, D, $);
            }
            var N = t.sdtp(e);
            return t.box(
              t.types.traf,
              n,
              r,
              N,
              t.trun(e.samples, N.byteLength + 76)
            );
          },
        },
        {
          key: "sdtp",
          value: function (e) {
            var n = new jc();
            return (
              e.samples.forEach(function (r) {
                n.write(
                  new Uint8Array(e.id === 1 ? [r.keyframe ? 32 : 16] : [16])
                );
              }),
              t.box(t.types.sdtp, this.extension(0, 0), n.buffer)
            );
          },
        },
        {
          key: "trun1",
          value: function (e) {
            var n = new jc(),
              r = jc.writeUint32(e.samples.length),
              i = null;
            if (e.id === 1) {
              var o = e.videoSencLength;
              (i = jc.writeUint32(16 * e.samples.length + o + 149)),
                !e.isVideoEncryption &&
                  e.isAudioEncryption &&
                  (i = jc.writeUint32(16 * e.samples.length + 92));
            } else {
              var l = 12 * e.samples.length + 124;
              e.isAudioEncryption &&
                (l = 12 * e.samples.length + 8 * e.audioSenc.length + 177),
                (i = jc.writeUint32(l));
            }
            return (
              e.samples.forEach(function (u) {
                n.write(jc.writeUint32(u.duration)),
                  n.write(jc.writeUint32(u.size)),
                  n.write(jc.writeUint32(u.keyframe ? 33554432 : 65536)),
                  e.id === 1 && n.write(jc.writeUint32(u.cts ? u.cts : 0));
              }),
              t.box(t.types.trun, this.extension(0, e.flags), r, i, n.buffer)
            );
          },
        },
        {
          key: "senc",
          value: function (e) {
            var n = new jc(),
              r = e.samples.length,
              i = e.id === 1 ? 16 : 8,
              o = e.id === 1 ? 2 : 0,
              l = [],
              u = 0;
            return (
              e.id === 1
                ? ((l = e.videoSenc), (u = e.videoSencLength))
                : (l = e.audioSenc),
              (u = u || i * r),
              n.write(
                jc.writeUint32(16 + u),
                t.types.senc,
                this.extension(0, o)
              ),
              n.write(jc.writeUint32(r)),
              l.forEach(function (c) {
                for (var d = 0; d < c.InitializationVector.length; d++)
                  n.write(new Uint8Array([c.InitializationVector[d]]));
                c.subsamples &&
                  c.subsamples.length &&
                  (n.write(jc.writeUint16(c.subsamples.length)),
                  c.subsamples.forEach(function (h) {
                    n.write(jc.writeUint16(h.BytesOfClearData)),
                      n.write(jc.writeUint32(h.BytesOfProtectedData));
                  }));
              }),
              n.buffer
            );
          },
        },
        {
          key: "saio",
          value: function (e) {
            var n = 12 * e.samples.length + 141;
            e.id === 2 && e.isAudioEncryption && (n = 149);
            var r = new Uint8Array([
              1,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              0,
              0,
              0,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
            return t.box(t.types.saio, r);
          },
        },
        {
          key: "saiz",
          value: function (e) {
            var n = e.samples.length,
              r = new Uint8Array([
                0,
                0,
                0,
                0,
                16,
                (n >> 24) & 255,
                (n >> 16) & 255,
                (n >> 8) & 255,
                255 & n,
              ]);
            return t.box(t.types.saiz, r);
          },
        },
        {
          key: "sbgp",
          value: function () {
            var e = new Uint8Array([
              114, 111, 108, 108, 0, 0, 0, 1, 0, 0, 1, 25, 0, 0, 0, 1,
            ]);
            return t.box(t.types.sbgp, this.extension(0, 0), e);
          },
        },
        {
          key: "extension",
          value: function (e, n) {
            return new Uint8Array([
              e,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
            ]);
          },
        },
        {
          key: "tfhd",
          value: function (e) {
            return t.box(
              t.types.tfhd,
              new Uint8Array([
                0,
                0,
                0,
                0,
                e >> 24,
                (e >> 16) & 255,
                (e >> 8) & 255,
                255 & e,
              ])
            );
          },
        },
        {
          key: "tfdt",
          value: function (e, n) {
            var r = Math.floor(n / (t3e + 1)),
              i = Math.floor(n % (t3e + 1));
            return e.useEME && (e.isVideoEncryption || e.isAudioEncryption)
              ? t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                )
              : t.box(
                  t.types.tfdt,
                  new Uint8Array([
                    1,
                    0,
                    0,
                    0,
                    r >> 24,
                    (r >> 16) & 255,
                    (r >> 8) & 255,
                    255 & r,
                    i >> 24,
                    (i >> 16) & 255,
                    (i >> 8) & 255,
                    255 & i,
                  ])
                );
          },
        },
        {
          key: "trun",
          value: function (e, n) {
            var r = e.length,
              i = 12 + 16 * r;
            n += 8 + i;
            var o = new Uint8Array(i);
            o.set(
              [
                0,
                0,
                15,
                1,
                (r >>> 24) & 255,
                (r >>> 16) & 255,
                (r >>> 8) & 255,
                255 & r,
                (n >>> 24) & 255,
                (n >>> 16) & 255,
                (n >>> 8) & 255,
                255 & n,
              ],
              0
            );
            for (var l = 0; l < r; l++) {
              var u = e[l],
                c = u.duration,
                d = u.size,
                h = u.flag,
                f = h === void 0 ? {} : h,
                p = u.cts,
                g = p === void 0 ? 0 : p;
              o.set(
                [
                  (c >>> 24) & 255,
                  (c >>> 16) & 255,
                  (c >>> 8) & 255,
                  255 & c,
                  (d >>> 24) & 255,
                  (d >>> 16) & 255,
                  (d >>> 8) & 255,
                  255 & d,
                  (f.isLeading << 2) |
                    (f.dependsOn === null || f.dependsOn === void 0
                      ? 1
                      : f.dependsOn),
                  (f.isDependedOn << 6) |
                    (f.hasRedundancy << 4) |
                    (f.paddingValue << 1) |
                    (f.isNonSyncSample === null || f.isNonSyncSample === void 0
                      ? 1
                      : f.isNonSyncSample),
                  61440 & f.degradationPriority,
                  15 & f.degradationPriority,
                  (g >>> 24) & 255,
                  (g >>> 16) & 255,
                  (g >>> 8) & 255,
                  255 & g,
                ],
                12 + 16 * l
              );
            }
            return t.box(t.types.trun, o);
          },
        },
        {
          key: "moovMP4",
          value: function (e) {
            return t.box.apply(
              t,
              [t.types.moov, t.mvhd(e[0].duration, e[0].timescale)].concat(
                zg(
                  e.map(function (n) {
                    return t.trackMP4(n);
                  })
                )
              )
            );
          },
        },
        {
          key: "trackMP4",
          value: function (e) {
            return t.box(
              t.types.trak,
              t.tkhd(e.id, e.duration, e.width, e.height),
              t.mdiaMP4(e)
            );
          },
        },
        {
          key: "mdiaMP4",
          value: function (e) {
            return t.box(
              t.types.mdia,
              t.mdhd(e.duration, e.timescale),
              t.hdlr(e.type),
              t.minfMP4(e)
            );
          },
        },
        {
          key: "minfMP4",
          value: function (e) {
            return t.box(
              t.types.minf,
              e.type === AI.VIDEO ? t.VMHD : t.SMHD,
              t.DINF,
              t.stblMP4(e)
            );
          },
        },
        {
          key: "stblMP4",
          value: function (e) {
            var n = e.ext,
              r = [
                t.stsd(e),
                t.stts(n.stts),
                t.stsc(n.stsc),
                t.stsz(n.stsz),
                t.stco(n.stco),
              ];
            return (
              n.stss.length && r.push(t.stss(n.stss)),
              n.ctts.length && r.push(t.ctts(n.ctts)),
              t.box.apply(t, [t.types.stbl].concat(r))
            );
          },
        },
        {
          key: "stts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.stts,
                p0(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsc",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(12 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.firstChunk,
                  u = o.samplesPerChunk,
                  c = o.sampleDescIndex;
                r.set(
                  [
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    c >> 24,
                    (c >> 16) & 255,
                    (c >> 8) & 255,
                    255 & c,
                  ],
                  i
                ),
                  (i += 12);
              }),
              t.box(
                t.types.stsc,
                p0(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stsz",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stsz,
                p0(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stco",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stco,
                p0(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "stss",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(4 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                r.set([o >> 24, (o >> 16) & 255, (o >> 8) & 255, 255 & o], i),
                  (i += 4);
              }),
              t.box(
                t.types.stss,
                p0(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "ctts",
          value: function (e) {
            var n = e.length,
              r = new Uint8Array(8 * n),
              i = 0;
            return (
              e.forEach(function (o) {
                var l = o.value,
                  u = o.count;
                r.set(
                  [
                    u >> 24,
                    (u >> 16) & 255,
                    (u >> 8) & 255,
                    255 & u,
                    l >> 24,
                    (l >> 16) & 255,
                    (l >> 8) & 255,
                    255 & l,
                  ],
                  i
                ),
                  (i += 8);
              }),
              t.box(
                t.types.ctts,
                p0(
                  new Uint8Array([
                    0,
                    0,
                    0,
                    0,
                    n >> 24,
                    (n >> 16) & 255,
                    (n >> 8) & 255,
                    255 & n,
                  ]),
                  r
                )
              )
            );
          },
        },
        {
          key: "styp",
          value: function () {
            return t.box(
              t.types.styp,
              new Uint8Array([
                109, 115, 100, 104, 0, 0, 0, 0, 109, 115, 100, 104, 109, 115,
                105, 120,
              ])
            );
          },
        },
        {
          key: "sidx",
          value: function (e) {
            var n = e.timescale,
              r = e.samples[0].duration,
              i = r * e.samples.length,
              o = e.samples[0].sampleOffset * r,
              l = 8;
            e.samples.forEach(function (f) {
              l += f.size;
            });
            var u = 0;
            if (e.id === 1) {
              var c,
                d = 0;
              e.videoSenc && (c = e.videoSenc),
                e.id === 1 &&
                  c.forEach(function (f) {
                    (d += 8),
                      f.subsamples &&
                        f.subsamples.length &&
                        ((d += 2), (d += 6 * f.subsamples.length));
                  }),
                (e.videoSencLength = d),
                (u = l + 141 + 16 * e.samples.length + d),
                e.useEME &&
                  e.isAudioEncryption &&
                  !e.isVideoEncryption &&
                  (u = l + 16 * e.samples.length + 84);
            } else
              (u = l + 116 + 12 * e.samples.length),
                e.useEME &&
                  e.isAudioEncryption &&
                  (u =
                    l + 169 + 12 * e.samples.length + 8 * e.audioSenc.length);
            var h = new Uint8Array([
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              255 & e.id,
              (n >> 24) & 255,
              (n >> 16) & 255,
              (n >> 8) & 255,
              255 & n,
              (o >> 24) & 255,
              (o >> 16) & 255,
              (o >> 8) & 255,
              255 & o,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              1,
              0,
              (u >> 16) & 255,
              (u >> 8) & 255,
              255 & u,
              (i >> 24) & 255,
              (i >> 16) & 255,
              (i >> 8) & 255,
              255 & i,
              144,
              0,
              0,
              0,
            ]);
            return t.box(t.types.sidx, h);
          },
        },
        {
          key: "mdat",
          value: function (e) {
            return t.box(t.types.mdat, e);
          },
        },
      ]),
      t
    );
  })();
ei(
  Ga,
  "types",
  [
    "avc1",
    "avcC",
    "hvc1",
    "hvcC",
    "dinf",
    "dref",
    "esds",
    "ftyp",
    "hdlr",
    "mdat",
    "mdhd",
    "mdia",
    "mfhd",
    "minf",
    "moof",
    "moov",
    "mp4a",
    "mvex",
    "mvhd",
    "pasp",
    "stbl",
    "stco",
    "stsc",
    "stsd",
    "stsz",
    "stts",
    "tfdt",
    "tfhd",
    "traf",
    "trak",
    "trex",
    "tkhd",
    "vmhd",
    "smhd",
    "ctts",
    "stss",
    "styp",
    "pssh",
    "sidx",
    "sbgp",
    "saiz",
    "saio",
    "senc",
    "trun",
    "encv",
    "enca",
    "sinf",
    "btrt",
    "frma",
    "tenc",
    "schm",
    "schi",
    "mehd",
    "fiel",
    "sdtp",
  ].reduce(function (t, e) {
    return (
      (t[e] = [
        e.charCodeAt(0),
        e.charCodeAt(1),
        e.charCodeAt(2),
        e.charCodeAt(3),
      ]),
      t
    );
  }, Object.create(null))
),
  ei(Ga, "HDLR_TYPES", {
    video: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
    audio: new Uint8Array([
      0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0,
    ]),
  }),
  ei(
    Ga,
    "FTYPAVC1",
    Ga.box(
      Ga.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 97, 118, 99, 49,
      ])
    )
  ),
  ei(
    Ga,
    "FTYPHEV1",
    Ga.box(
      Ga.types.ftyp,
      new Uint8Array([
        105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 104, 101, 118, 49,
      ])
    )
  ),
  ei(
    Ga,
    "DINF",
    Ga.box(
      Ga.types.dinf,
      Ga.box(
        Ga.types.dref,
        new Uint8Array([
          0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1,
        ])
      )
    )
  ),
  ei(
    Ga,
    "VMHD",
    Ga.box(Ga.types.vmhd, new Uint8Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  ei(
    Ga,
    "SMHD",
    Ga.box(Ga.types.smhd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  ei(Ga, "StblTable", new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0])),
  ei(Ga, "STTS", Ga.box(Ga.types.stts, Ga.StblTable)),
  ei(Ga, "STSC", Ga.box(Ga.types.stsc, Ga.StblTable)),
  ei(
    Ga,
    "STSZ",
    Ga.box(Ga.types.stsz, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]))
  ),
  ei(Ga, "STCO", Ga.box(Ga.types.stco, Ga.StblTable));
var $fe = (function () {
  function t(e, n) {
    Dm(this, t),
      (this.name = e || ""),
      (this._prefix = "[".concat(this.name, "]")),
      (t.disabled = n);
  }
  return (
    Pm(
      t,
      [
        {
          key: "debug",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).debug.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "log",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).log.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "warn",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).warn.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "error",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).error.apply(e, [this._prefix].concat(r));
            }
          },
        },
        {
          key: "table",
          value: function () {
            var e;
            t.disabled ||
              (console.group(this._prefix),
              (e = console).table.apply(e, arguments),
              console.groupEnd());
          },
        },
      ],
      [
        {
          key: "enable",
          value: function () {
            t.disabled = !1;
          },
        },
        {
          key: "disable",
          value: function () {
            t.disabled = !0;
          },
        },
      ]
    ),
    t
  );
})();
ei($fe, "disabled", !0);
var djr = (function () {
    function t(e, n, r) {
      Dm(this, t), (this.videoTrack = e), (this.audioTrack = n);
      var i = /Chrome\/([^.]+)/.exec(navigator.userAgent);
      (this.forceFirstIDR = i && Number(i[1]) < 50),
        (this.log = new $fe("FMP4Remuxer", !r || !r.openLog || !r.openLog));
    }
    return (
      Pm(t, [
        {
          key: "remux",
          value: function () {
            var e,
              n,
              r,
              i,
              o,
              l =
                arguments.length > 0 && arguments[0] !== void 0 && arguments[0],
              u =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : {},
              c = this.videoTrack,
              d = this.audioTrack,
              h = c.exist(),
              f = d.exist(),
              p = [];
            return (
              l &&
                (u && u.initMerge
                  ? (h && p.push(this.videoTrack),
                    f && p.push(this.audioTrack),
                    (r = Ga.initSegment(p)))
                  : (h && (e = Ga.initSegment([this.videoTrack])),
                    f && (n = Ga.initSegment([this.audioTrack])))),
              h && c.hasSample() && (i = this._remuxVideo()),
              f && d.hasSample() && (o = this._remuxAudio()),
              (c.samples = []),
              (d.samples = []),
              {
                initSegment: r,
                videoInitSegment: e,
                audioInitSegment: n,
                videoSegment: i,
                audioSegment: o,
              }
            );
          },
        },
        {
          key: "_remuxVideo",
          value: function () {
            var e = this.videoTrack;
            this.forceFirstIDR &&
              (e.samples[0].flag = { dependsOn: 2, isNonSyncSample: 0 });
            var n = e.samples,
              r = 0;
            n.forEach(function (p) {
              (r += p.units.reduce(function (g, y) {
                return g + y.byteLength;
              }, 0)),
                (r += 4 * p.units.length);
            });
            for (
              var i,
                o = new Uint8Array(r),
                l = new DataView(o.buffer),
                u = function (p, g, y, v) {
                  v = n[p];
                  var b = 0;
                  v.units.forEach(function (w) {
                    l.setUint32(y, w.byteLength),
                      (y += 4),
                      o.set(w, y),
                      (y += w.byteLength),
                      (b += 4 + w.byteLength);
                  }),
                    (v.size = b),
                    (h = y),
                    (i = v);
                },
                c = 0,
                d = n.length,
                h = 0;
              c < d;
              c++
            )
              u(c, 0, h, i);
            var f = Ga.mdat(o);
            return e.isVideoEncryption || e.isAudioEncryption
              ? p0(Ga.styp(), Ga.sidx(e), Ga.moof([e]), f)
              : p0(Ga.moof([e]), f);
          },
        },
        {
          key: "_remuxAudio",
          value: function () {
            var e = this.audioTrack,
              n = new Uint8Array(
                e.samples.reduce(function (i, o) {
                  return i + o.size;
                }, 0)
              );
            e.samples.reduce(function (i, o) {
              return n.set(o.data, i), i + o.size;
            }, 0);
            var r = Ga.mdat(n);
            return e.isVideoEncryption || e.isAudioEncryption
              ? p0(Ga.styp(), Ga.sidx(e), Ga.moof([e]), r)
              : p0(Ga.moof([e]), r);
          },
        },
        {
          key: "reset",
          value: function () {
            this.videoTrack.reset(), this.audioTrack.reset();
          },
        },
      ]),
      t
    );
  })(),
  noe = {
    decryptWordArray: function (t, e, n) {
      var r = pne.parse(e),
        i = pne.parse(ljr(n)),
        o = Kp.create(new Uint8Array(t)),
        l = tIn.decrypt(DB.create({ ciphertext: o }), r, {
          iv: i,
          mode: bC,
          padding: nIn,
        });
      return noe.wordArrayToUint8Array(l);
    },
    wordArrayToUint8Array: function (t) {
      for (
        var e = t.sigBytes, n = t.words, r = new Uint8Array(e), i = 0, o = 0;
        i !== e;

      ) {
        var l = n[o++];
        if (
          ((r[i++] = (4278190080 & l) >>> 24),
          i === e ||
            ((r[i++] = (16711680 & l) >>> 16), i === e) ||
            ((r[i++] = (65280 & l) >>> 8), i === e))
        )
          break;
        r[i++] = 255 & l;
      }
      return r;
    },
  },
  n3e = 20,
  hjr = (function () {
    function t(e, n, r, i) {
      var o = this;
      Dm(this, t),
        ei(this, "_videoSamples", []),
        ei(this, "_audioSamples", []),
        ei(this, "_lastRemainBuffer", []),
        ei(this, "_lastRemainBufferStartPos", 0),
        (this.videoTrack = new ejr()),
        (this.audioTrack = new tjr()),
        (this.metadataTrack = r || new njr()),
        (this.log = new $fe("MP4Demuxer", !i || !i.openLog || !i.openLog)),
        e &&
          e.forEach(function (l) {
            var u;
            (u = o._videoSamples).push.apply(u, zg(l.frames));
          }),
        n &&
          n.forEach(function (l) {
            var u;
            (u = o._audioSamples).push.apply(u, zg(l.frames));
          });
    }
    return (
      Pm(
        t,
        [
          {
            key: "parseSamples",
            value: function (e) {
              if (!e) throw new Error("moov is required");
              if (
                (this.videoTrack.codec ||
                  this.audioTrack.codec ||
                  (u0.moovToTrack(e, this.videoTrack, this.audioTrack),
                  (this.videoSenc = this.videoTrack.videoSenc),
                  (this.audioSenc = this.audioTrack.audioSenc)),
                !this._audioSamples.length && !this._videoSamples.length)
              ) {
                var n = u0.moovToSamples(e);
                if (!n) throw new Error("cannot parse samples from moov box");
                (this._videoSamples = n.videoSamples || []),
                  (this._audioSamples = n.audioSamples || []);
              }
            },
          },
          {
            key: "demux",
            value: function (e, n, r, i, o) {
              this.parseSamples(o);
              var l,
                u,
                c,
                d = this.videoTrack,
                h = this.audioTrack;
              if (((d.samples = []), (h.samples = []), r)) {
                for (var f, p = 0, g = r[0], y = r[1]; g <= y; g++) {
                  if (!(l = this._videoSamples[g]))
                    throw new Error("cannot found video frame #".concat(g));
                  (c = l.offset - n),
                    (u = e.subarray(c, c + l.size)),
                    ((f = new ZGe(l.pts || l.dts, l.dts)).duration =
                      l.duration),
                    (f.gopId = l.gopId),
                    l.keyframe && f.setToKeyframe();
                  for (var v = 0, b = u.length - 1; v < b; )
                    (p = yi(u, v)),
                      (v += 4),
                      f.units.push(u.subarray(v, v + p)),
                      (v += p);
                  d.samples.push(f);
                }
                d.baseMediaDecodeTime = d.samples[0].dts;
              }
              if (i) {
                for (var w = i[0], k = i[1]; w <= k; w++) {
                  if (!(l = this._audioSamples[w]))
                    throw new Error("cannot found video frame #".concat(w));
                  (c = l.offset - n),
                    (u = e.subarray(c, c + l.size)),
                    h.samples.push(new YGe(l.dts, u, l.duration));
                }
                h.baseMediaDecodeTime = h.samples[0].dts;
              }
              return {
                videoTrack: d,
                audioTrack: h,
                metadataTrack: this.metadataTrack,
              };
            },
          },
          {
            key: "demuxPart",
            value: function (e, n, r, i, o, l, u) {
              if (
                (this.parseSamples(o),
                (this.videoTrack.useEME = l),
                (this.audioTrack.useEME = l),
                this._lastRemainBuffer &&
                  this._lastRemainBuffer.byteLength > 0 &&
                  n > this._lastRemainBufferStartPos &&
                  n <=
                    this._lastRemainBufferStartPos +
                      this._lastRemainBuffer.byteLength)
              )
                for (var c = 0; c < n3e; )
                  try {
                    var d = this._lastRemainBuffer.subarray(
                        0,
                        n - this._lastRemainBufferStartPos
                      ),
                      h = new Uint8Array(e.byteLength + d.byteLength);
                    h.set(d, 0),
                      h.set(new Uint8Array(e), d.byteLength),
                      (e = h),
                      (n -= d.byteLength),
                      (this._lastRemainBuffer = null),
                      (this._lastRemainBufferStartPos = 0);
                    break;
                  } catch (H) {
                    if (!(c < n3e))
                      throw new Error(
                        "new Uint8Array error:," + H.errorMessage
                      );
                    c++;
                  }
              var f,
                p,
                g,
                y = this.videoTrack,
                v = this.audioTrack;
              (y.samples = []),
                (v.samples = []),
                (y.videoSenc = null),
                (v.audioSenc = null);
              var b = 0,
                w = 0;
              if (this._videoSamples.length > 0 && r.length > 0) {
                for (var k, D = e.byteLength + n, $ = r[0]; $ <= r[1]; $++) {
                  if (!(f = this._videoSamples[$]))
                    throw new Error("cannot found video frame #".concat($));
                  f.offset >= n &&
                    f.offset + f.size <= D &&
                    ((b = (g = f.offset - n) + f.size),
                    (p = e.subarray(g, b)),
                    ((k = new ZGe(f.pts || f.dts, f.dts)).duration =
                      f.duration),
                    (k.gopId = f.gopId),
                    (k.sampleOffset = f.index),
                    f.keyframe && k.setToKeyframe(),
                    (k.data = p),
                    (k.size = f.size),
                    y.samples.push(k));
                }
                y.samples.length > 0 &&
                  ((y.gopId = y.samples[0].gopId),
                  (y.baseMediaDecodeTime = y.samples[0].dts),
                  (y.startPts = y.samples[0].pts / y.timescale),
                  (y.endPts =
                    y.samples[y.samples.length - 1].pts / y.timescale),
                  this.videoSenc &&
                    ((y.videoSenc = this.videoSenc.slice(
                      y.samples[0].sampleOffset,
                      y.samples[0].sampleOffset + y.samples.length
                    )),
                    (y.kidValue = u)));
              }
              if (this._audioSamples.length > 0 && i.length > 0) {
                for (var N = i[0]; N <= i[1]; N++) {
                  if (!(f = this._audioSamples[N]))
                    throw new Error("cannot found video frame #".concat(N));
                  f.offset >= n &&
                    f.offset + f.size <= e.byteLength + n &&
                    ((w = (g = f.offset - n) + f.size),
                    (p = e.subarray(g, w)),
                    v.samples.push(new YGe(f.dts, p, f.duration, f.index)));
                }
                v.samples.length > 0 &&
                  ((v.gopId = v.samples[0].gopId || y.gopId),
                  (v.baseMediaDecodeTime = v.samples[0].dts),
                  (v.startPts = v.samples[0].pts / v.timescale),
                  (v.endPts =
                    v.samples[v.samples.length - 1].pts / v.timescale),
                  this.audioSenc &&
                    ((v.audioSenc = this.audioSenc.slice(
                      v.samples[0].sampleOffset,
                      v.samples[0].sampleOffset + v.samples.length
                    )),
                    (v.kidValue = u)));
              }
              this.decoderData(y, v);
              for (var P = 0, I = 0; I < y.samples.length; I++)
                for (
                  var O = 0, X = y.samples[I].data, G = X.length - 1;
                  O < G;

                )
                  (P = yi(X, O)),
                    (O += 4),
                    y.samples[I].units.push(X.subarray(O, O + P)),
                    (O += P);
              return (
                (this._lastRemainBuffer = e.subarray(Math.max(b, w))),
                this._lastRemainBuffer.byteLength > 0
                  ? (this._lastRemainBufferStartPos =
                      n + e.byteLength - this._lastRemainBuffer.byteLength)
                  : (this._lastRemainBufferStartPos = 0),
                {
                  videoTrack: y,
                  audioTrack: v,
                  metadataTrack: this.metadataTrack,
                }
              );
            },
          },
          {
            key: "reset",
            value: function () {
              (this._videoSamples = []),
                (this._audioSamples = []),
                (this._lastRemainBuffer = null),
                (this._lastRemainBufferStartPos = 0),
                this.videoTrack.reset(),
                this.audioTrack.reset(),
                this.metadataTrack.reset();
            },
          },
          {
            key: "decoderData",
            value: function (e, n) {
              if (!e.useEME && !n.useEME) {
                if (e.videoSenc && e.id === 1) {
                  var r = e.kidValue,
                    i = e.videoSenc;
                  e.samples.forEach(function (u, c) {
                    var d = i[c],
                      h = u.data,
                      f = [],
                      p = [],
                      g = d.InitializationVector;
                    if (d.subsamples && d.subsamples.length)
                      d.subsamples.forEach(function (k) {
                        var D = k.BytesOfClearData + k.BytesOfProtectedData,
                          $ = h.slice(0, D);
                        f.push($.slice(0, k.BytesOfClearData)),
                          p.push($.slice(k.BytesOfClearData)),
                          (h = h.slice(D));
                      });
                    else {
                      var y = u.size;
                      f.push(h.slice(0, 0)),
                        p.push(h.slice(0, y)),
                        (h = h.slice(y));
                    }
                    var v = new jc();
                    v.write.apply(v, p);
                    var b = noe.decryptWordArray(v.buffer, r, g),
                      w = new jc();
                    f.forEach(function (k, D) {
                      var $ = p[D].length,
                        N = b.slice(0, $);
                      w.write(k), w.write(N), (b = b.slice($));
                    }),
                      (e.samples[c].data = w.buffer);
                  });
                }
                if (n.audioSenc && n.id === 2) {
                  var o = n.kidValue,
                    l = n.audioSenc;
                  n.samples.forEach(function (u, c) {
                    var d = l[c],
                      h = noe.decryptWordArray(
                        u.data,
                        o,
                        d.InitializationVector
                      );
                    n.samples[c].data = h;
                  });
                }
              }
            },
          },
        ],
        [
          {
            key: "probe",
            value: function (e) {
              return u0.probe(e);
            },
          },
        ]
      ),
      t
    );
  })(),
  ox = "3.0.0-alpha.36-3",
  Rc = {
    416: -499899,
    401: -499898,
    403: -499897,
    404: -499896,
    timeout: -499895,
    "4xx": -499894,
    "5xx": -499893,
    networkError: -499892,
    contentError: -499891,
    mse: -499971,
    mseOpen: -499972,
    mseAppend: -499973,
    boxsError: -499980,
    moovError: -499981,
    notH264: -499982,
    mdatError: -499983,
    mdhdError: -499984,
    metaError: -499985,
    muxError: -499986,
    h265Error: -499987,
    noneURL: -499988,
    other: -499989,
    other1: -499990,
    waitTimeout: -499791,
    onWaitInBufferRange: -499792,
  },
  g0 = {
    network: 1003,
    format: 1005,
    runtime: 1002,
    other: 9999,
    demux: 1006,
    remux: 1007,
  };
function fjr(t) {
  var e = 0;
  switch (t) {
    case 0:
      e = 0;
      break;
    case -1:
      e = Rc.networkError;
      break;
    case -2:
      e = Rc.timeout;
      break;
    case -3:
      e = Rc.contentError;
      break;
    default:
      e = t < 500 ? Rc[t] || t["4xx"] : Rc[t] || t["5xx"];
  }
  return e;
}
var Aat = Xh(function t(e, n, r) {
    Hh(this, t);
    var i = 0,
      o = 0;
    r && r.range && r.range.length > 1 && ((i = r.range[0]), (o = r.range[1]));
    var l = fjr(n);
    return {
      errorCode: l,
      errorType: e,
      errorTypeCode: g0[e],
      errorMessage:
        (r == null ? void 0 : r.httpText) || (r == null ? void 0 : r.message),
      url: r == null ? void 0 : r.url,
      httpCode: n,
      version: ox,
      rangeStart: i,
      rangeEnd: o,
      ext: r,
      mediaError: {
        code: l,
        message:
          (r == null ? void 0 : r.httpText) || (r == null ? void 0 : r.message),
      },
    };
  }),
  r3e = Xh(function t(e, n, r) {
    return (
      Hh(this, t),
      {
        errorCode: n,
        errorType: e,
        errorTypeCode: g0[e],
        version: ox,
        errorMessage: r.msg,
        ext: r,
        mediaError: { code: n, message: r.msg },
      }
    );
  }),
  pjr = Di,
  gjr = BD;
pjr({ target: "Array", stat: !0 }, { isArray: gjr });
var mjr = zs,
  yjr = sce,
  vjr = Yu,
  bjr = Tb,
  _jr = B0,
  vq = Qu,
  Tjr = F0,
  Ejr = ND,
  Sjr = cce,
  i3e = hce;
yjr("match", function (t, e, n) {
  return [
    function (r) {
      var i = Tjr(this),
        o = bjr(r) ? void 0 : Ejr(r, t);
      return o ? mjr(o, r, i) : new RegExp(r)[t](vq(i));
    },
    function (r) {
      var i = vjr(this),
        o = vq(r),
        l = n(e, i, o);
      if (l.done) return l.value;
      if (!i.global) return i3e(i, o);
      var u = i.unicode;
      i.lastIndex = 0;
      for (var c, d = [], h = 0; (c = i3e(i, o)) !== null; ) {
        var f = vq(c[0]);
        (d[h] = f),
          f === "" && (i.lastIndex = Sjr(o, _jr(i.lastIndex), u)),
          h++;
      }
      return h === 0 ? null : d;
    },
  ];
});
var Kr = {};
function a3e(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function roe(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? a3e(Object(n), !0).forEach(function (r) {
          ff(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : a3e(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Js() {
  Js = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = E.iterator[S.method];
    if (L === void 0) {
      if (((S.delegate = null), S.method === "throw")) {
        if (
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")
        )
          return f;
        (S.method = "throw"),
          (S.arg = new TypeError(
            "The iterator does not provide a 'throw' method"
          ));
      }
      return f;
    }
    var W = h(L, E.iterator, S.arg);
    if (W.type === "throw")
      return (S.method = "throw"), (S.arg = W.arg), (S.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((S[E.resultName] = F.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : F
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function o3e(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function vp(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        o3e(o, r, i, l, u, "next", c);
      }
      function u(c) {
        o3e(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function xfe(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function s3e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function Lfe(t, e, n) {
  return (
    e && s3e(t.prototype, e),
    n && s3e(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function ff(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function Rjr(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && wat(t, e);
}
function ioe(t) {
  return (ioe = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function wat(t, e) {
  return (wat = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function Ajr() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function wjr(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = Object.keys(t);
  for (r = 0; r < o.length; r++) (n = o[r]), e.indexOf(n) >= 0 || (i[n] = t[n]);
  return i;
}
function kjr(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = wjr(t, e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        e.indexOf(n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
function Tp(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function Ijr(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return Tp(t);
}
function Djr(t) {
  var e = Ajr();
  return function () {
    var n,
      r = ioe(t);
    if (e) {
      var i = ioe(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return Ijr(this, n);
  };
}
function Pjr(t, e) {
  return $jr(t) || Ljr(t, e) || kat(t, e) || Gjr();
}
function Mjr(t) {
  return Cjr(t) || xjr(t) || kat(t) || Ojr();
}
function Cjr(t) {
  if (Array.isArray(t)) return aoe(t);
}
function $jr(t) {
  if (Array.isArray(t)) return t;
}
function xjr(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function Ljr(t, e) {
  var n =
    t == null
      ? null
      : (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (n != null) {
    var r,
      i,
      o = [],
      l = !0,
      u = !1;
    try {
      for (
        n = n.call(t);
        !(l = (r = n.next()).done) && (o.push(r.value), !e || o.length !== e);
        l = !0
      );
    } catch (c) {
      (u = !0), (i = c);
    } finally {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw i;
      }
    }
    return o;
  }
}
function kat(t, e) {
  if (t) {
    if (typeof t == "string") return aoe(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? aoe(t, e)
        : void 0
    );
  }
}
function aoe(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function Ojr() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Gjr() {
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function l3e(t, e) {
  var n = Object.keys(t);
  if (Object.getOwnPropertySymbols) {
    var r = Object.getOwnPropertySymbols(t);
    e &&
      (r = r.filter(function (i) {
        return Object.getOwnPropertyDescriptor(t, i).enumerable;
      })),
      n.push.apply(n, r);
  }
  return n;
}
function ooe(t) {
  for (var e = 1; e < arguments.length; e++) {
    var n = arguments[e] != null ? arguments[e] : {};
    e % 2
      ? l3e(Object(n), !0).forEach(function (r) {
          sa(t, r, n[r]);
        })
      : Object.getOwnPropertyDescriptors
      ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n))
      : l3e(Object(n)).forEach(function (r) {
          Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
        });
  }
  return t;
}
function Gp() {
  Gp = function () {
    return t;
  };
  var t = {},
    e = Object.prototype,
    n = e.hasOwnProperty,
    r =
      Object.defineProperty ||
      function (E, S, L) {
        E[S] = L.value;
      },
    i = typeof Symbol == "function" ? Symbol : {},
    o = i.iterator || "@@iterator",
    l = i.asyncIterator || "@@asyncIterator",
    u = i.toStringTag || "@@toStringTag";
  function c(E, S, L) {
    return (
      Object.defineProperty(E, S, {
        value: L,
        enumerable: !0,
        configurable: !0,
        writable: !0,
      }),
      E[S]
    );
  }
  try {
    c({}, "");
  } catch {
    c = function (S, L, W) {
      return (S[L] = W);
    };
  }
  function d(E, S, L, W) {
    var F = S && S.prototype instanceof p ? S : p,
      oe = Object.create(F.prototype),
      De = new X(W || []);
    return r(oe, "_invoke", { value: N(E, L, De) }), oe;
  }
  function h(E, S, L) {
    try {
      return { type: "normal", arg: E.call(S, L) };
    } catch (W) {
      return { type: "throw", arg: W };
    }
  }
  t.wrap = d;
  var f = {};
  function p() {}
  function g() {}
  function y() {}
  var v = {};
  c(v, o, function () {
    return this;
  });
  var b = Object.getPrototypeOf,
    w = b && b(b(G([])));
  w && w !== e && n.call(w, o) && (v = w);
  var k = (y.prototype = p.prototype = Object.create(v));
  function D(E) {
    ["next", "throw", "return"].forEach(function (S) {
      c(E, S, function (L) {
        return this._invoke(S, L);
      });
    });
  }
  function $(E, S) {
    function L(F, oe, De, Xe) {
      var ze = h(E[F], E, oe);
      if (ze.type !== "throw") {
        var ht = ze.arg,
          gt = ht.value;
        return gt && typeof gt == "object" && n.call(gt, "__await")
          ? S.resolve(gt.__await).then(
              function (pt) {
                L("next", pt, De, Xe);
              },
              function (pt) {
                L("throw", pt, De, Xe);
              }
            )
          : S.resolve(gt).then(
              function (pt) {
                (ht.value = pt), De(ht);
              },
              function (pt) {
                return L("throw", pt, De, Xe);
              }
            );
      }
      Xe(ze.arg);
    }
    var W;
    r(this, "_invoke", {
      value: function (F, oe) {
        function De() {
          return new S(function (Xe, ze) {
            L(F, oe, Xe, ze);
          });
        }
        return (W = W ? W.then(De, De) : De());
      },
    });
  }
  function N(E, S, L) {
    var W = "suspendedStart";
    return function (F, oe) {
      if (W === "executing") throw new Error("Generator is already running");
      if (W === "completed") {
        if (F === "throw") throw oe;
        return { value: void 0, done: !0 };
      }
      for (L.method = F, L.arg = oe; ; ) {
        var De = L.delegate;
        if (De) {
          var Xe = P(De, L);
          if (Xe) {
            if (Xe === f) continue;
            return Xe;
          }
        }
        if (L.method === "next") L.sent = L._sent = L.arg;
        else if (L.method === "throw") {
          if (W === "suspendedStart") throw ((W = "completed"), L.arg);
          L.dispatchException(L.arg);
        } else L.method === "return" && L.abrupt("return", L.arg);
        W = "executing";
        var ze = h(E, S, L);
        if (ze.type === "normal") {
          if (((W = L.done ? "completed" : "suspendedYield"), ze.arg === f))
            continue;
          return { value: ze.arg, done: L.done };
        }
        ze.type === "throw" &&
          ((W = "completed"), (L.method = "throw"), (L.arg = ze.arg));
      }
    };
  }
  function P(E, S) {
    var L = E.iterator[S.method];
    if (L === void 0) {
      if (((S.delegate = null), S.method === "throw")) {
        if (
          E.iterator.return &&
          ((S.method = "return"),
          (S.arg = void 0),
          P(E, S),
          S.method === "throw")
        )
          return f;
        (S.method = "throw"),
          (S.arg = new TypeError(
            "The iterator does not provide a 'throw' method"
          ));
      }
      return f;
    }
    var W = h(L, E.iterator, S.arg);
    if (W.type === "throw")
      return (S.method = "throw"), (S.arg = W.arg), (S.delegate = null), f;
    var F = W.arg;
    return F
      ? F.done
        ? ((S[E.resultName] = F.value),
          (S.next = E.nextLoc),
          S.method !== "return" && ((S.method = "next"), (S.arg = void 0)),
          (S.delegate = null),
          f)
        : F
      : ((S.method = "throw"),
        (S.arg = new TypeError("iterator result is not an object")),
        (S.delegate = null),
        f);
  }
  function I(E) {
    var S = { tryLoc: E[0] };
    1 in E && (S.catchLoc = E[1]),
      2 in E && ((S.finallyLoc = E[2]), (S.afterLoc = E[3])),
      this.tryEntries.push(S);
  }
  function O(E) {
    var S = E.completion || {};
    (S.type = "normal"), delete S.arg, (E.completion = S);
  }
  function X(E) {
    (this.tryEntries = [{ tryLoc: "root" }]),
      E.forEach(I, this),
      this.reset(!0);
  }
  function G(E) {
    if (E) {
      var S = E[o];
      if (S) return S.call(E);
      if (typeof E.next == "function") return E;
      if (!isNaN(E.length)) {
        var L = -1,
          W = function F() {
            for (; ++L < E.length; )
              if (n.call(E, L)) return (F.value = E[L]), (F.done = !1), F;
            return (F.value = void 0), (F.done = !0), F;
          };
        return (W.next = W);
      }
    }
    return { next: H };
  }
  function H() {
    return { value: void 0, done: !0 };
  }
  return (
    (g.prototype = y),
    r(k, "constructor", { value: y, configurable: !0 }),
    r(y, "constructor", { value: g, configurable: !0 }),
    (g.displayName = c(y, u, "GeneratorFunction")),
    (t.isGeneratorFunction = function (E) {
      var S = typeof E == "function" && E.constructor;
      return (
        !!S && (S === g || (S.displayName || S.name) === "GeneratorFunction")
      );
    }),
    (t.mark = function (E) {
      return (
        Object.setPrototypeOf
          ? Object.setPrototypeOf(E, y)
          : ((E.__proto__ = y), c(E, u, "GeneratorFunction")),
        (E.prototype = Object.create(k)),
        E
      );
    }),
    (t.awrap = function (E) {
      return { __await: E };
    }),
    D($.prototype),
    c($.prototype, l, function () {
      return this;
    }),
    (t.AsyncIterator = $),
    (t.async = function (E, S, L, W, F) {
      F === void 0 && (F = Promise);
      var oe = new $(d(E, S, L, W), F);
      return t.isGeneratorFunction(S)
        ? oe
        : oe.next().then(function (De) {
            return De.done ? De.value : oe.next();
          });
    }),
    D(k),
    c(k, u, "Generator"),
    c(k, o, function () {
      return this;
    }),
    c(k, "toString", function () {
      return "[object Generator]";
    }),
    (t.keys = function (E) {
      var S = Object(E),
        L = [];
      for (var W in S) L.push(W);
      return (
        L.reverse(),
        function F() {
          for (; L.length; ) {
            var oe = L.pop();
            if (oe in S) return (F.value = oe), (F.done = !1), F;
          }
          return (F.done = !0), F;
        }
      );
    }),
    (t.values = G),
    (X.prototype = {
      constructor: X,
      reset: function (E) {
        if (
          ((this.prev = 0),
          (this.next = 0),
          (this.sent = this._sent = void 0),
          (this.done = !1),
          (this.delegate = null),
          (this.method = "next"),
          (this.arg = void 0),
          this.tryEntries.forEach(O),
          !E)
        )
          for (var S in this)
            S.charAt(0) === "t" &&
              n.call(this, S) &&
              !isNaN(+S.slice(1)) &&
              (this[S] = void 0);
      },
      stop: function () {
        this.done = !0;
        var E = this.tryEntries[0].completion;
        if (E.type === "throw") throw E.arg;
        return this.rval;
      },
      dispatchException: function (E) {
        if (this.done) throw E;
        var S = this;
        function L(ze, ht) {
          return (
            (oe.type = "throw"),
            (oe.arg = E),
            (S.next = ze),
            ht && ((S.method = "next"), (S.arg = void 0)),
            !!ht
          );
        }
        for (var W = this.tryEntries.length - 1; W >= 0; --W) {
          var F = this.tryEntries[W],
            oe = F.completion;
          if (F.tryLoc === "root") return L("end");
          if (F.tryLoc <= this.prev) {
            var De = n.call(F, "catchLoc"),
              Xe = n.call(F, "finallyLoc");
            if (De && Xe) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            } else if (De) {
              if (this.prev < F.catchLoc) return L(F.catchLoc, !0);
            } else {
              if (!Xe)
                throw new Error("try statement without catch or finally");
              if (this.prev < F.finallyLoc) return L(F.finallyLoc);
            }
          }
        }
      },
      abrupt: function (E, S) {
        for (var L = this.tryEntries.length - 1; L >= 0; --L) {
          var W = this.tryEntries[L];
          if (
            W.tryLoc <= this.prev &&
            n.call(W, "finallyLoc") &&
            this.prev < W.finallyLoc
          ) {
            var F = W;
            break;
          }
        }
        F &&
          (E === "break" || E === "continue") &&
          F.tryLoc <= S &&
          S <= F.finallyLoc &&
          (F = null);
        var oe = F ? F.completion : {};
        return (
          (oe.type = E),
          (oe.arg = S),
          F
            ? ((this.method = "next"), (this.next = F.finallyLoc), f)
            : this.complete(oe)
        );
      },
      complete: function (E, S) {
        if (E.type === "throw") throw E.arg;
        return (
          E.type === "break" || E.type === "continue"
            ? (this.next = E.arg)
            : E.type === "return"
            ? ((this.rval = this.arg = E.arg),
              (this.method = "return"),
              (this.next = "end"))
            : E.type === "normal" && S && (this.next = S),
          f
        );
      },
      finish: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.finallyLoc === E)
            return this.complete(L.completion, L.afterLoc), O(L), f;
        }
      },
      catch: function (E) {
        for (var S = this.tryEntries.length - 1; S >= 0; --S) {
          var L = this.tryEntries[S];
          if (L.tryLoc === E) {
            var W = L.completion;
            if (W.type === "throw") {
              var F = W.arg;
              O(L);
            }
            return F;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (E, S, L) {
        return (
          (this.delegate = { iterator: G(E), resultName: S, nextLoc: L }),
          this.method === "next" && (this.arg = void 0),
          f
        );
      },
    }),
    t
  );
}
function Iat(t) {
  return (Iat =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function u3e(t, e, n, r, i, o, l) {
  try {
    var u = t[o](l),
      c = u.value;
  } catch (d) {
    return void n(d);
  }
  u.done ? e(c) : Promise.resolve(c).then(r, i);
}
function wI(t) {
  return function () {
    var e = this,
      n = arguments;
    return new Promise(function (r, i) {
      var o = t.apply(e, n);
      function l(c) {
        u3e(o, r, i, l, u, "next", c);
      }
      function u(c) {
        u3e(o, r, i, l, u, "throw", c);
      }
      l(void 0);
    });
  };
}
function _P(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function c3e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function TP(t, e, n) {
  return (
    e && c3e(t.prototype, e),
    n && c3e(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
function sa(t, e, n) {
  return (
    e in t
      ? Object.defineProperty(t, e, {
          value: n,
          enumerable: !0,
          configurable: !0,
          writable: !0,
        })
      : (t[e] = n),
    t
  );
}
function n7(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && r7(t, e);
}
function bD(t) {
  return (bD = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
function r7(t, e) {
  return (r7 = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function Dat() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
function Pat(t, e, n) {
  return (Pat = Dat()
    ? Reflect.construct.bind()
    : function (r, i, o) {
        var l = [null];
        l.push.apply(l, i);
        var u = new (Function.bind.apply(r, l))();
        return o && r7(u, o.prototype), u;
      }).apply(null, arguments);
}
function Njr(t) {
  return Function.toString.call(t).indexOf("[native code]") !== -1;
}
function soe(t) {
  var e = typeof Map == "function" ? new Map() : void 0;
  return (
    (soe = function (n) {
      if (n === null || !Njr(n)) return n;
      if (typeof n != "function")
        throw new TypeError(
          "Super expression must either be null or a function"
        );
      if (e !== void 0) {
        if (e.has(n)) return e.get(n);
        e.set(n, r);
      }
      function r() {
        return Pat(n, arguments, bD(this).constructor);
      }
      return (
        (r.prototype = Object.create(n.prototype, {
          constructor: {
            value: r,
            enumerable: !1,
            writable: !0,
            configurable: !0,
          },
        })),
        r7(r, n)
      );
    }),
    soe(t)
  );
}
function Fjr(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = {},
    o = Object.keys(t);
  for (r = 0; r < o.length; r++) (n = o[r]), e.indexOf(n) >= 0 || (i[n] = t[n]);
  return i;
}
function Ujr(t, e) {
  if (t == null) return {};
  var n,
    r,
    i = Fjr(t, e);
  if (Object.getOwnPropertySymbols) {
    var o = Object.getOwnPropertySymbols(t);
    for (r = 0; r < o.length; r++)
      (n = o[r]),
        e.indexOf(n) >= 0 ||
          (Object.prototype.propertyIsEnumerable.call(t, n) && (i[n] = t[n]));
  }
  return i;
}
function fa(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function Bjr(t, e) {
  if (e && (typeof e == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return fa(t);
}
function i7(t) {
  var e = Dat();
  return function () {
    var n,
      r = bD(t);
    if (e) {
      var i = bD(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return Bjr(this, n);
  };
}
function Hjr(t, e) {
  for (; !Object.prototype.hasOwnProperty.call(t, e) && (t = bD(t)) !== null; );
  return t;
}
function loe() {
  return (
    (loe =
      typeof Reflect < "u" && Reflect.get
        ? Reflect.get.bind()
        : function (t, e, n) {
            var r = Hjr(t, e);
            if (r) {
              var i = Object.getOwnPropertyDescriptor(r, e);
              return i.get ? i.get.call(arguments.length < 3 ? t : n) : i.value;
            }
          }),
    loe.apply(this, arguments)
  );
}
function Xjr(t, e) {
  if (t) {
    if (typeof t == "string") return d3e(t, e);
    var n = Object.prototype.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? d3e(t, e)
        : void 0
    );
  }
}
function d3e(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = new Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function Vjr(t, e) {
  var n = (typeof Symbol < "u" && t[Symbol.iterator]) || t["@@iterator"];
  if (!n) {
    if (
      Array.isArray(t) ||
      (n = Xjr(t)) ||
      (e && t && typeof t.length == "number")
    ) {
      n && (t = n);
      var r = 0,
        i = function () {};
      return {
        s: i,
        n: function () {
          return r >= t.length ? { done: !0 } : { done: !1, value: t[r++] };
        },
        e: function (c) {
          throw c;
        },
        f: i,
      };
    }
    throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
  }
  var o,
    l = !0,
    u = !1;
  return {
    s: function () {
      n = n.call(t);
    },
    n: function () {
      var c = n.next();
      return (l = c.done), c;
    },
    e: function (c) {
      (u = !0), (o = c);
    },
    f: function () {
      try {
        l || n.return == null || n.return();
      } finally {
        if (u) throw o;
      }
    },
  };
}
function zjr() {
  var t,
    e,
    n = new Promise(function (r, i) {
      (t = r), (e = i);
    });
  return (
    (n.used = !1),
    (n.resolve = function () {
      return (n.used = !0), t.apply(void 0, arguments);
    }),
    (n.reject = function () {
      return (n.used = !0), e.apply(void 0, arguments);
    }),
    n
  );
}
function QN() {
  try {
    return parseInt(performance.now(), 10);
  } catch {
    return new Date().getTime();
  }
}
(Kr.findBox = function (t, e) {
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
  if (t.type !== e) {
    if (t && t.subBox) {
      var r = t.subBox.filter(function (i) {
        return i.type === e;
      });
      r.length
        ? r.forEach(function (i) {
            return n.push(i);
          })
        : t.subBox.forEach(function (i) {
            return Kr.findBox(i, e, n);
          });
    }
  } else n.push(t);
  return (n = [].concat(n)).length > 1 ? n : n[0];
}),
  (Kr.padStart = function (t, e, n) {
    for (
      var r = String(n),
        i = e >> 0,
        o = Math.ceil(i / r.length),
        l = [],
        u = String(t);
      o--;

    )
      l.push(r);
    return l.join("").substring(0, i - u.length) + u;
  }),
  (Kr.toHex = function () {
    for (var t = [], e = arguments.length, n = new Array(e), r = 0; r < e; r++)
      n[r] = arguments[r];
    return (
      n.forEach(function (i) {
        t.push(Kr.padStart(Number(i).toString(16), 2, 0));
      }),
      t
    );
  }),
  (Kr.sum = function () {
    for (var t = 0, e = arguments.length, n = new Array(e), r = 0; r < e; r++)
      n[r] = arguments[r];
    return (
      n.forEach(function (i) {
        t += i;
      }),
      t
    );
  }),
  (Kr.StringToArrayBuffer = function (t) {
    for (
      var e = new ArrayBuffer(t.length), n = new Uint8Array(e), r = 0;
      r < t.length;
      r++
    )
      n[r] = t.charCodeAt(r);
    return e;
  }),
  (Kr.fromHex = function (t) {
    for (var e = new Uint8Array(t.length / 2), n = 0; n < t.length; n += 2)
      e[n / 2] = window.parseInt(t.substr(n, 2), 16);
    return e;
  }),
  (Kr.fromCharCode = function (t) {
    for (var e = "", n = 0; n < t.length; n += 16e3) {
      var r = t.subarray(n, n + 16e3);
      e += String.fromCharCode.apply(null, r);
    }
    return e;
  }),
  (Kr.ArrayBufferToString = function (t) {
    for (var e = "", n = new Uint8Array(t), r = 0; r < n.length; r++)
      e += String.fromCharCode(n[r]);
    return e;
  }),
  (Kr.Base64ToHex = function (t) {
    for (
      var e = window.atob(t.replace(/-/g, "+").replace(/_/g, "/")),
        n = "",
        r = 0;
      r < e.length;
      r++
    )
      n += ("0" + e.charCodeAt(r).toString(16)).substr(-2);
    return n;
  }),
  (Kr.toBase64 = function (t, e) {
    var n = Kr.fromCharCode(t);
    e = e === void 0 || e;
    var r = window.btoa(n).replace(/\+/g, "-").replace(/\//g, "_");
    return e ? r : r.replace(/=*$/, "");
  }),
  (Kr.toUTF8 = function (t) {
    for (
      var e = encodeURIComponent(t),
        n = unescape(e),
        r = new Uint8Array(n.length),
        i = 0;
      i < n.length;
      ++i
    )
      r[i] = n.charCodeAt(i);
    return r.buffer;
  }),
  (Kr.bufferToString = function (t) {
    return ("0" + Number(t).toString(16)).slice(-2).toUpperCase();
  }),
  (Kr.strToBuf = function (t) {
    for (var e = [], n = 0; n < t.length; n += 2)
      e.push(parseInt(t[n] + t[n + 1], 16));
    return new Uint8Array(e);
  }),
  (Kr.formatIV = function (t) {
    var e = "";
    if (
      (t.forEach(function (i) {
        e += Kr.bufferToString(i);
      }),
      e.length <= 32)
    )
      for (var n = 32 - e.length, r = 0; r < n; r++) e += "0";
    return e;
  }),
  (Kr.str2hex = function (t) {
    if (t === "") return "";
    for (var e = [], n = 0; n < t.length; n++) e.push(t.charCodeAt(n));
    return e;
  }),
  (Kr.parse = function (t) {
    if (!Array.isArray(t)) {
      for (var e = [], n = "", r = 0; r < t.length; r++)
        r % 2 && ((n = t[r - 1] + t[r]), e.push(parseInt(n, 16)), (n = ""));
      return e;
    }
    return t.map(function (i) {
      return parseInt(i, 16);
    });
  }),
  (Kr.generateUniqueKey = function (t) {
    var e = t.vid;
    t.start, t.end;
    var n = t.mediaType,
      r = t.definition;
    return (
      t.preloadTime,
      (n = n || "video"),
      (r = r || "0"),
      e ? "".concat(e, "#").concat(n, "#").concat(r, "#mp4") : null
    );
  }),
  (Kr.validateFragment = function (t) {
    var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
    if (t instanceof ArrayBuffer) {
      try {
        if (e.length === 2) {
          var n = e[1] - e[0] + 1;
          if (t.byteLength !== n) return;
        }
      } catch (r) {
        return console.error(r), !1;
      }
      return !0;
    }
    return !1;
  }),
  (Kr.typeOf = function (t) {
    return Object.prototype.toString.call(t).match(/([^\s.*]+)(?=]$)/g)[0];
  }),
  (Kr.getBufferSplits = function (t, e) {
    var n =
      arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 5e5;
    if (e - t - n < n / 2 || !e) return [[t, e]];
    for (var r = []; t < e; ) {
      var i = t + n;
      (i > e || e - i < n / 2) && (i = e), r.push([t, i]), (t = i + 1);
    }
    return r;
  }),
  (Kr.nowTime = function () {
    try {
      return parseInt(performance.now(), 10);
    } catch {
      return new Date().getTime();
    }
  }),
  (Kr.extUrl = function (t, e) {
    try {
      var n = t.indexOf("?");
      return (
        n < 0
          ? Object.keys(e).map(function (r, i) {
              t +=
                i === 0
                  ? "?".concat(r, "=").concat(e[r])
                  : "&".concat(r, "=").concat(e[r]);
            })
          : Object.keys(e).map(function (r, i) {
              n === t.length - 1
                ? (t += "".concat(r, "=").concat(e[r]))
                : (t += "&".concat(r, "=").concat(e[r]));
            }),
        t
      );
    } catch {
      return t;
    }
  }),
  (Kr.getFileSize = function (t, e) {
    try {
      return t && e ? parseInt((e * t) / 8, 10) : 0;
    } catch {
      return 0;
    }
  }),
  (Kr.hashVal = function (t) {
    var e,
      n = 0;
    if (t.length === 0) return n;
    for (e = 0; e < t.length; e++)
      (n = (n << 5) - n + t.charCodeAt(e)), (n |= 0);
    return n;
  }),
  (Kr.getFileSize = function (t, e) {
    try {
      return t && e ? parseInt((e * t) / 8, 10) : 0;
    } catch {
      return 0;
    }
  }),
  (Kr.concatData = function (t, e) {
    var n = [],
      r = 0;
    t && n.push(t),
      e && n.push(e),
      n.every(function (l) {
        return l && (r += l.byteLength), !0;
      });
    var i = new Uint8Array(r),
      o = 0;
    return (
      n.every(function (l) {
        return l && (i.set(l, o), (o += l.byteLength)), !0;
      }),
      i
    );
  }),
  (Kr.getFragRange = function (t, e, n) {
    var r = t < e.length ? e[t] : null,
      i = t < n.length ? n[t] : null,
      o = 0,
      l = 0;
    return (
      t === e.length - 1 && (o = -1),
      t === n.length - 1 && (l = -1),
      [
        Math.min(
          (r == null ? void 0 : r.range[0]) || 1 / 0,
          (i == null ? void 0 : i.range[0]) || 1 / 0
        ),
        Math.max(
          (r == null ? void 0 : r.range[1]) + o || 0,
          (i == null ? void 0 : i.range[1]) + l || 0
        ),
      ]
    );
  });
var I9 = (function () {
  function t(e) {
    _P(this, t),
      (this.name = e || ""),
      (this._prefix = "[".concat(this.name, "]"));
  }
  return (
    TP(
      t,
      [
        {
          key: "debug",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).debug.apply(e, [this._prefix, QN()].concat(r));
            }
          },
        },
        {
          key: "log",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).log.apply(e, [this._prefix, QN()].concat(r));
            }
          },
        },
        {
          key: "warn",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).warn.apply(e, [this._prefix, QN()].concat(r));
            }
          },
        },
        {
          key: "error",
          value: function () {
            var e;
            if (!t.disabled) {
              for (
                var n = arguments.length, r = new Array(n), i = 0;
                i < n;
                i++
              )
                r[i] = arguments[i];
              (e = console).error.apply(e, [this._prefix, QN()].concat(r));
            }
          },
        },
        {
          key: "table",
          value: function () {
            var e;
            t.disabled ||
              (console.group(this._prefix),
              (e = console).table.apply(e, arguments),
              console.groupEnd());
          },
        },
      ],
      [
        {
          key: "enable",
          value: function () {
            t.disabled = !1;
          },
        },
        {
          key: "disable",
          value: function () {
            t.disabled = !0;
          },
        },
      ]
    ),
    t
  );
})();
sa(I9, "disabled", !0);
var RS = { FETCH: "fetch", XHR: "xhr" },
  D9 = { ARRAY_BUFFER: "arraybuffer", TEXT: "text", JSON: "json" },
  sv = (function (t) {
    n7(n, soe(Error));
    var e = i7(n);
    function n(r, i, o, l) {
      var u;
      return (
        _P(this, n),
        sa(fa((u = e.call(this, l))), "retryCount", 0),
        sa(fa(u), "isTimeout", !1),
        sa(fa(u), "loaderType", RS.FETCH),
        sa(fa(u), "startTime", 0),
        sa(fa(u), "endTime", 0),
        (u.url = r),
        (u.request = i),
        (u.response = o),
        u
      );
    }
    return TP(n);
  })(),
  Mat = Object.prototype.toString;
function jjr(t) {
  return t !== null && Iat(t) === "object";
}
function h3e(t) {
  if (Mat.call(t) !== "[object Object]") return !1;
  var e = Object.getPrototypeOf(t);
  return e === null || e === Object.prototype;
}
function Wjr(t) {
  return Mat.call(t) === "[object Date]";
}
function Cat(t) {
  if (
    t &&
    t[0] !== null &&
    t[0] !== void 0 &&
    (t[0] !== 0 || (t[1] !== null && t[1] !== void 0))
  ) {
    var e = "bytes=" + t[0] + "-";
    return t[1] && (e += t[1]), e;
  }
}
function f3e(t) {
  return encodeURIComponent(t)
    .replace(/%3A/gi, ":")
    .replace(/%24/g, "$")
    .replace(/%2C/gi, ",")
    .replace(/%20/g, "+")
    .replace(/%5B/gi, "[")
    .replace(/%5D/gi, "]");
}
function $at(t, e) {
  if (t) {
    if (!e) return t;
    var n,
      r = Object.keys(e)
        .map(function (o) {
          if ((n = e[o]) != null)
            return (
              Array.isArray(n) ? (o += "[]") : (n = [n]),
              n
                .map(function (l) {
                  return (
                    Wjr(l)
                      ? (l = l.toISOString())
                      : jjr(l) && (l = JSON.stringify(l)),
                    "".concat(f3e(o), "=").concat(f3e(l))
                  );
                })
                .join("&")
            );
        })
        .filter(Boolean)
        .join("&");
    if (r) {
      var i = t.indexOf("#");
      i !== -1 && (t = t.slice(0, i)),
        (t += (t.indexOf("?") === -1 ? "?" : "&") + r);
    }
    return t;
  }
}
function uoe(t, e, n, r, i, o, l, u, c, d, h) {
  return (
    (i = i != null ? parseFloat(i) : null),
    (r = parseInt(r || "0", 10)),
    Number.isNaN(r) && (r = 0),
    {
      data: t,
      done: e,
      option: {
        range: c,
        vid: d,
        index: u,
        contentLength: r,
        age: i,
        startTime: o,
        firstByteTime: l,
        endTime: Date.now(),
        priOptions: h,
      },
      response: n,
    }
  );
}
function coe(t, e) {
  return Math.round((8 * t * 1e3) / e / 1024);
}
var lR = {
    ERROR: "error",
    TTFB: "core.ttfb",
    LOAD_START: "core.loadstart",
    LOAD_RESPONSE_HEADERS: "core.loadresponseheaders",
    LOAD_COMPLETE: "core.loadcomplete",
    LOAD_RETRY: "core.loadretry",
    SOURCEBUFFER_CREATED: "core.sourcebuffercreated",
    ANALYZE_DURATION_EXCEEDED: "core.analyzedurationexceeded",
    REMOVE_BUFFER: "core.removebuffer",
    BUFFEREOS: "core.buffereos",
    KEYFRAME: "core.keyframe",
    METADATA_PARSED: "core.metadataparsed",
    SEI: "core.sei",
    SEI_IN_TIME: "core.seiintime",
    FLV_SCRIPT_DATA: "core.flvscriptdata",
    LOWDECODE: "core.lowdecode",
    SWITCH_URL_SUCCESS: "core.switchurlsuccess",
    SWITCH_URL_FAILED: "core.switchurlfailed",
    SPEED: "core.speed",
    HLS_MANIFEST_LOADED: "core.hlsmanifestloaded",
    HLS_LEVEL_LOADED: "core.hlslevelloaded",
    STREAM_EXCEPTION: "core.streamexception",
    LARGE_AV_FIRST_FRAME_GAP_DETECT: "LARGE_AV_FIRST_FRAME_GAP_DETECT",
    LARGE_VIDEO_DTS_GAP_DETECT: "LARGE_VIDEO_DTS_GAP_DETECT",
    LARGE_AUDIO_DTS_GAP_DETECT: "LARGE_AUDIO_DTS_GAP_DETECT",
    AUDIO_GAP_DETECT: "AUDIO_GAP_DETECT",
    AUDIO_OVERLAP_DETECT: "AUDIO_OVERLAP_DETECT",
    MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT:
      "MAX_DTS_DELTA_WITH_NEXT_SEGMENT_DETECT",
    REAL_TIME_SPEED: "real_time_speed",
  },
  p3e = 2097152,
  doe = (function (t) {
    n7(r, Pl);
    var e,
      n = i7(r);
    function r() {
      var i;
      return (
        _P(this, r),
        sa(fa((i = n.call(this))), "_abortController", null),
        sa(fa(i), "_timeoutTimer", null),
        sa(fa(i), "_reader", null),
        sa(fa(i), "_response", null),
        sa(fa(i), "_aborted", !1),
        sa(fa(i), "_index", -1),
        sa(fa(i), "_range", null),
        sa(fa(i), "_receivedLength", 0),
        sa(fa(i), "_running", !1),
        sa(fa(i), "_logger", null),
        sa(fa(i), "_vid", ""),
        sa(fa(i), "_onProcessMinLen", 0),
        sa(fa(i), "_onCancel", null),
        sa(fa(i), "_priOptions", null),
        i
      );
    }
    return (
      TP(
        r,
        [
          {
            key: "load",
            value: function (i) {
              var o,
                l = this,
                u = i.url,
                c = i.vid,
                d = i.timeout,
                h = i.responseType,
                f = i.onProgress,
                p = i.index,
                g = i.onTimeout,
                y = i.onCancel,
                v = i.range,
                b = i.transformResponse,
                w = i.request,
                k = i.params,
                D = i.logger,
                $ = i.method,
                N = i.headers,
                P = i.body,
                I = i.mode,
                O = i.credentials,
                X = i.cache,
                G = i.redirect,
                H = i.referrer,
                E = i.referrerPolicy,
                S = i.onProcessMinLen,
                L = i.priOptions;
              (this._logger = D),
                (this._aborted = !1),
                (this._onProcessMinLen = S),
                (this._onCancel = y),
                (this._abortController =
                  typeof AbortController < "u" && new AbortController()),
                (this._running = !0),
                (this._index = p),
                (this._range = v || [0, 0]),
                (this._vid = c || u),
                (this._priOptions = L || {});
              var W = {
                  method: $,
                  headers: N,
                  body: P,
                  mode: I,
                  credentials: O,
                  cache: X,
                  redirect: G,
                  referrer: H,
                  referrerPolicy: E,
                  signal:
                    (o = this._abortController) === null || o === void 0
                      ? void 0
                      : o.signal,
                },
                F = !1;
              clearTimeout(this._timeoutTimer), (u = $at(u, k));
              var oe = Cat(v);
              oe &&
                ((N = w
                  ? w.headers
                  : (W.headers = W.headers || new Headers())) instanceof Headers
                  ? N.append("Range", oe)
                  : (N.Range = oe)),
                d &&
                  (this._timeoutTimer = setTimeout(function () {
                    if (((F = !0), l.cancel(), g)) {
                      var Xe = new sv(u, W, null, "timeout");
                      (Xe.isTimeout = !0), g(Xe, l._index);
                    }
                  }, d));
              var De = Date.now();
              return (
                this._logger.debug(
                  "[fetch load start], index,",
                  p,
                  ",range,",
                  v
                ),
                new Promise(function (Xe, ze) {
                  fetch(w || u, w ? void 0 : W)
                    .then(
                      (function () {
                        var ht = wI(
                          Gp().mark(function gt(pt) {
                            var $t, ot, tt, He;
                            return Gp().wrap(function (de) {
                              for (;;)
                                switch ((de.prev = de.next)) {
                                  case 0:
                                    if (
                                      (clearTimeout(l._timeoutTimer),
                                      (l._response = pt),
                                      !l._aborted && l._running)
                                    ) {
                                      de.next = 4;
                                      break;
                                    }
                                    return de.abrupt("return");
                                  case 4:
                                    if ((b && (pt = b(pt, u) || pt), pt.ok)) {
                                      de.next = 7;
                                      break;
                                    }
                                    throw new sv(
                                      u,
                                      W,
                                      pt,
                                      "bad network response"
                                    );
                                  case 7:
                                    if ((($t = Date.now()), h !== D9.TEXT)) {
                                      de.next = 15;
                                      break;
                                    }
                                    return (de.next = 11), pt.text();
                                  case 11:
                                    (ot = de.sent),
                                      (l._running = !1),
                                      (de.next = 37);
                                    break;
                                  case 15:
                                    if (h !== D9.JSON) {
                                      de.next = 22;
                                      break;
                                    }
                                    return (de.next = 18), pt.json();
                                  case 18:
                                    (ot = de.sent),
                                      (l._running = !1),
                                      (de.next = 37);
                                    break;
                                  case 22:
                                    if (!f) {
                                      de.next = 29;
                                      break;
                                    }
                                    return (
                                      (l.resolve = Xe),
                                      (l.reject = ze),
                                      l._loadChunk(pt, f, De, $t),
                                      de.abrupt("return")
                                    );
                                  case 29:
                                    return (de.next = 31), pt.arrayBuffer();
                                  case 31:
                                    (ot = de.sent),
                                      (ot = new Uint8Array(ot)),
                                      (l._running = !1),
                                      (tt = Date.now() - De),
                                      (He = coe(ot.byteLength, tt)),
                                      l.emit(lR.REAL_TIME_SPEED, { speed: He });
                                  case 37:
                                    l._logger.debug(
                                      "[fetch load end], index,",
                                      p,
                                      ",range,",
                                      v
                                    ),
                                      Xe(
                                        uoe(
                                          ot,
                                          !0,
                                          pt,
                                          pt.headers.get("Content-Length"),
                                          pt.headers.get("age"),
                                          De,
                                          $t,
                                          p,
                                          v,
                                          l._vid,
                                          l._priOptions
                                        )
                                      );
                                  case 39:
                                  case "end":
                                    return de.stop();
                                }
                            }, gt);
                          })
                        );
                        return function (gt) {
                          return ht.apply(this, arguments);
                        };
                      })()
                    )
                    .catch(function (ht) {
                      clearTimeout(l._timeoutTimer),
                        (l._running = !1),
                        (l._aborted && !F) ||
                          (((ht =
                            ht instanceof sv
                              ? ht
                              : new sv(
                                  u,
                                  W,
                                  null,
                                  JSON.stringify(ht)
                                )).startTime = De),
                          (ht.endTime = Date.now()),
                          (ht.isTimeout = F),
                          ze(ht));
                    });
                })
              );
            },
          },
          {
            key: "cancel",
            value:
              ((e = wI(
                Gp().mark(function i() {
                  return Gp().wrap(
                    function (o) {
                      for (;;)
                        switch ((o.prev = o.next)) {
                          case 0:
                            if (!this._aborted) {
                              o.next = 2;
                              break;
                            }
                            return o.abrupt("return");
                          case 2:
                            if (
                              ((this._aborted = !0),
                              (this._running = !1),
                              !this._response)
                            ) {
                              o.next = 14;
                              break;
                            }
                            if (((o.prev = 5), !this._reader)) {
                              o.next = 9;
                              break;
                            }
                            return (o.next = 9), this._reader.cancel();
                          case 9:
                            o.next = 13;
                            break;
                          case 11:
                            (o.prev = 11), (o.t0 = o.catch(5));
                          case 13:
                            this._response = this._reader = null;
                          case 14:
                            if (this._abortController) {
                              try {
                                this._abortController.abort();
                              } catch {}
                              this._abortController = null;
                            }
                            this._onCancel && this._onCancel(this._index);
                          case 16:
                          case "end":
                            return o.stop();
                        }
                    },
                    i,
                    this,
                    [[5, 11]]
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_loadChunk",
            value: function (i, o, l, u) {
              var c = this;
              if (!i.body || !i.body.getReader)
                return (
                  (this._running = !1),
                  void this.reject(
                    sv(
                      i.url,
                      "",
                      i,
                      "onProgress of bad response.body.getReader"
                    )
                  )
                );
              this._onProcessMinLen > 0 &&
                ((this._cache = new Uint8Array(p3e)), (this._writeIdx = 0));
              var d,
                h,
                f,
                p = (this._reader = i.body.getReader()),
                g = (function () {
                  var y = wI(
                    Gp().mark(function v() {
                      var b, w, k, D, $, N;
                      return Gp().wrap(
                        function (P) {
                          for (;;)
                            switch ((P.prev = P.next)) {
                              case 0:
                                return (
                                  (h = Date.now()),
                                  (P.prev = 1),
                                  (P.next = 4),
                                  p.read()
                                );
                              case 4:
                                (d = P.sent), (f = Date.now()), (P.next = 13);
                                break;
                              case 8:
                                return (
                                  (P.prev = 8),
                                  (P.t0 = P.catch(1)),
                                  (f = Date.now()),
                                  c._aborted ||
                                    ((c._running = !1), c.reject(P.t0)),
                                  P.abrupt("return")
                                );
                              case 13:
                                if (
                                  ((b = c._range[0] + c._receivedLength),
                                  !c._aborted)
                                ) {
                                  P.next = 18;
                                  break;
                                }
                                return (
                                  (c._running = !1),
                                  o(
                                    void 0,
                                    !1,
                                    {
                                      range: [b, b],
                                      vid: c._vid,
                                      index: c._index,
                                      startTime: h,
                                      endTime: f,
                                      priOptions: c._priOptions,
                                    },
                                    i
                                  ),
                                  P.abrupt("return")
                                );
                              case 18:
                                (w = d.value ? d.value.byteLength : 0),
                                  (c._receivedLength += w),
                                  c._logger.debug(
                                    "【fetchLoader,onProgress call】,task,",
                                    c._range,
                                    ", start,",
                                    b,
                                    ", end,",
                                    c._range[0] + c._receivedLength,
                                    ", done,",
                                    d.done
                                  ),
                                  c._onProcessMinLen > 0
                                    ? c._writeIdx + w >= c._onProcessMinLen ||
                                      d.done
                                      ? ((k = new Uint8Array(
                                          c._writeIdx + w
                                        )).set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        w > 0 && k.set(d.value, c._writeIdx),
                                        (c._writeIdx = 0),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress enough】,done,",
                                          d.done,
                                          ",len,",
                                          k.byteLength,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : w > 0 && c._writeIdx + w < p3e
                                      ? (c._cache.set(d.value, c._writeIdx),
                                        (c._writeIdx += w),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress cache】,len,",
                                          w,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                      : w > 0 &&
                                        ((D = new Uint8Array(
                                          c._writeIdx + w + 2048
                                        )),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra start】,size,",
                                          c._writeIdx + w + 2048,
                                          ", datalen,",
                                          w,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ),
                                        D.set(
                                          c._cache.slice(0, c._writeIdx),
                                          0
                                        ),
                                        w > 0 && D.set(d.value, c._writeIdx),
                                        (c._writeIdx += w),
                                        delete c._cache,
                                        (c._cache = D),
                                        c._logger.debug(
                                          "【fetchLoader,onProgress extra end】,len,",
                                          w,
                                          ", writeIdx,",
                                          c._writeIdx
                                        ))
                                    : (k = d.value),
                                  ((k && k.byteLength > 0) || d.done) &&
                                    o(
                                      k,
                                      d.done,
                                      {
                                        range: [
                                          c._range[0] +
                                            c._receivedLength -
                                            (k ? k.byteLength : 0),
                                          c._range[0] + c._receivedLength,
                                        ],
                                        vid: c._vid,
                                        index: c._index,
                                        startTime: h,
                                        endTime: f,
                                        priOptions: c._priOptions,
                                      },
                                      i
                                    ),
                                  ($ = Date.now() - l),
                                  (N = coe(c._receivedLength, $)),
                                  c.emit(lR.REAL_TIME_SPEED, { speed: N }),
                                  d.done
                                    ? ((c._running = !1),
                                      c._logger.debug(
                                        "[fetchLoader onProgress end],task,",
                                        c._range,
                                        ",done,",
                                        d.done
                                      ),
                                      c.resolve(
                                        uoe(
                                          d,
                                          !0,
                                          i,
                                          i.headers.get("Content-Length"),
                                          i.headers.get("age"),
                                          h,
                                          u,
                                          c._index,
                                          c._range,
                                          c._vid,
                                          c._priOptions
                                        )
                                      ))
                                    : g();
                              case 27:
                              case "end":
                                return P.stop();
                            }
                        },
                        v,
                        null,
                        [[1, 8]]
                      );
                    })
                  );
                  return function () {
                    return y.apply(this, arguments);
                  };
                })();
              g();
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (i) {
              this._running = i;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return !(typeof fetch > "u");
            },
          },
        ]
      ),
      r
    );
  })();
function Kjr(t) {
  return ooe(
    {
      loaderType: RS.FETCH,
      retry: 0,
      retryDelay: 0,
      timeout: 0,
      request: null,
      onTimeout: void 0,
      onProgress: void 0,
      onRetryError: void 0,
      transformRequest: void 0,
      transformResponse: void 0,
      transformError: void 0,
      responseType: D9.TEXT,
      range: void 0,
      url: "",
      params: void 0,
      method: "GET",
      headers: {},
      body: void 0,
      mode: void 0,
      credentials: void 0,
      cache: void 0,
      redirect: void 0,
      referrer: void 0,
      referrerPolicy: void 0,
      integrity: void 0,
      onProcessMinLen: 0,
    },
    t
  );
}
var Zjr = (function (t) {
    n7(n, Pl);
    var e = i7(n);
    function n() {
      var r;
      return (
        _P(this, n),
        sa(fa((r = e.call(this))), "_xhr", null),
        sa(fa(r), "_aborted", !1),
        sa(fa(r), "_timeoutTimer", null),
        sa(fa(r), "_range", null),
        sa(fa(r), "_receivedLength", 0),
        sa(fa(r), "_url", null),
        sa(fa(r), "_onProgress", null),
        sa(fa(r), "_index", -1),
        sa(fa(r), "_headers", null),
        sa(fa(r), "_currentChunkSizeKB", 384),
        sa(fa(r), "_timeout", null),
        sa(fa(r), "_xhr", null),
        sa(fa(r), "_withCredentials", null),
        sa(fa(r), "_startTime", -1),
        sa(fa(r), "_loadCompleteResolve", null),
        sa(fa(r), "_loadCompleteReject", null),
        sa(fa(r), "_runing", !1),
        sa(fa(r), "_logger", !1),
        sa(fa(r), "_vid", ""),
        sa(fa(r), "_responseType", void 0),
        sa(fa(r), "_credentials", void 0),
        sa(fa(r), "_method", void 0),
        sa(fa(r), "_transformResponse", void 0),
        sa(fa(r), "_firstRtt", void 0),
        sa(fa(r), "_subRangeStartTime", void 0),
        sa(fa(r), "_onCancel", null),
        sa(fa(r), "_priOptions", null),
        r
      );
    }
    return (
      TP(
        n,
        [
          {
            key: "load",
            value: function (r) {
              var i = this;
              clearTimeout(this._timeoutTimer),
                (this._logger = r.logger),
                (this._range = r.range || [0, 0]),
                (this._onProgress = r.onProgress),
                (this._index = r.index),
                (this._headers = r.headers),
                (this._withCredentials =
                  r.credentials === "include" ||
                  r.credentials === "same-origin"),
                (this._timeout = r.timeout || null),
                (this._runing = !0),
                (this._vid = r.vid || r.url),
                (this._responseType = r.responseType),
                (this._firstRtt = -1),
                (this._onTimeout = r.onTimeout),
                (this._onCancel = r.onCancel),
                (this._request = r.request),
                (this._credentials = r.credentials),
                (this._priOptions = r.priOptions || {}),
                this._logger.debug("【xhrLoader task】, range", this._range),
                (this._url = $at(r.url, r.params));
              var o = Date.now();
              return new Promise(function (l, u) {
                (i._loadCompleteResolve = l),
                  (i._loadCompleteReject = u),
                  i._startLoad();
              }).catch(function (l) {
                if (
                  (clearTimeout(i._timeoutTimer), (i._runing = !1), !i._aborted)
                )
                  throw (
                    (((l =
                      l instanceof sv
                        ? l
                        : new sv(i._url, i._request)).startTime = o),
                    (l.endTime = Date.now()),
                    l)
                  );
              });
            },
          },
          {
            key: "_startLoad",
            value: function () {
              var r = null;
              if (this._range && this._range.length > 1)
                if (this._onProgress) {
                  (this._subRangeStartTime = Date.now()), (this._firstRtt = -1);
                  var i = 1024 * this._currentChunkSizeKB,
                    o = this._range[0] + this._receivedLength,
                    l = this._range[1];
                  i < this._range[1] - o && (l = o + i),
                    (r = [o, l]),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", SubRange, ",
                      r
                    );
                } else
                  (r = this._range),
                    this._logger.debug(
                      "[xhr_loader->],tast :",
                      this._range,
                      ", allRange, ",
                      r
                    );
              this._internalOpen(r);
            },
          },
          {
            key: "_internalOpen",
            value: function (r) {
              var i = this;
              try {
                this._startTime = Date.now();
                var o = (this._xhr = new XMLHttpRequest());
                o.open(this._method || "GET", this._url, !0),
                  (o.responseType = this._responseType),
                  this._timeout && (o.timeout = this._timeout),
                  (o.withCredentials = this._credentials),
                  (o.onload = this._onLoad.bind(this)),
                  (o.onreadystatechange = this._onReadyStatechange.bind(this)),
                  (o.onerror = function (c) {
                    i._running = !1;
                    var d = new sv(
                      i._url,
                      i._request,
                      { status: 0 },
                      "onerror"
                    );
                    i._loadCompleteReject(d);
                  }),
                  (o.ontimeout = function (c) {
                    i.cancel();
                    var d = new sv(
                      i._url,
                      i._request,
                      { status: 408 },
                      "timeout"
                    );
                    i._onTimeout &&
                      ((d.isTimeout = !0), i._onTimeout(d, i._index)),
                      i._loadCompleteReject(d);
                  });
                var l = Cat(r),
                  u = null;
                l && ((u = this._headers || {}).Range = l),
                  u &&
                    Object.keys(u).forEach(function (c) {
                      o.setRequestHeader(c, u[c]);
                    }),
                  this._logger.debug(
                    "[xhr.send->] tast,",
                    this._range,
                    ",load sub range, ",
                    r
                  ),
                  o.send();
              } catch (c) {
                this._loadCompleteReject(c);
              }
            },
          },
          {
            key: "_onReadyStatechange",
            value: function (r) {
              r.target.readyState === 2 &&
                this._firstRtt < 0 &&
                (this._firstRtt = Date.now());
            },
          },
          {
            key: "_onLoad",
            value: function (r) {
              var i = r.target.status;
              if (i < 200 || i > 299)
                return this._loadCompleteReject(
                  new sv(
                    this._url,
                    null,
                    ooe(ooe({}, r.target.response), {}, { status: i }),
                    "bad response,status:" + i
                  )
                );
              var o,
                l = null,
                u = !1;
              if (this._responseType === D9.ARRAY_BUFFER) {
                var c = new Uint8Array(r.target.response);
                if (
                  ((o = this._range[0] + this._receivedLength),
                  c && c.byteLength > 0)
                ) {
                  this._receivedLength += c.byteLength;
                  var d = Date.now() - this._subRangeStartTime,
                    h = coe(this._receivedLength, d);
                  this.emit(lR.REAL_TIME_SPEED, { speed: h });
                }
                (l = c),
                  (u = !(
                    this._range.length > 1 &&
                    this._range[1] &&
                    this._receivedLength < this._range[1] - this._range[0]
                  )),
                  this._logger.debug(
                    "[xhr load done->], tast :",
                    this._range,
                    ", start",
                    o,
                    "end ",
                    this._range[0] + this._receivedLength,
                    ",dataLen,",
                    c ? c.byteLength : 0,
                    ",receivedLength",
                    this._receivedLength,
                    ",index,",
                    this._index,
                    ", done,",
                    u
                  );
              } else (u = !0), (l = r.target.response);
              var f = {
                ok: i >= 200 && i < 300,
                status: i,
                statusText: this._xhr.statusText,
                url: this._xhr.responseURL,
                headers: this._getHeaders(this._xhr),
                body: this._xhr.response,
              };
              this._transformResponse &&
                (f = this._transformResponse(f, this._url) || f),
                this._onProgress &&
                  this._onProgress(
                    l,
                    u,
                    {
                      index: this._index,
                      vid: this._vid,
                      range: [o, this._range[0] + this._receivedLength],
                      startTime: this._startTime,
                      endTime: Date.now(),
                      priOptions: this._priOptions,
                    },
                    f
                  ),
                u
                  ? ((this._runing = !1),
                    this._loadCompleteResolve &&
                      this._loadCompleteResolve(
                        uoe(
                          this._onProgress ? null : l,
                          u,
                          f,
                          f.headers["content-length"],
                          f.headers.age,
                          this._startTime,
                          -1,
                          this._index,
                          this._range,
                          this._vid,
                          this._priOptions
                        )
                      ))
                  : this._startLoad();
            },
          },
          {
            key: "cancel",
            value: function () {
              if (!this._aborted)
                return (
                  (this._aborted = !0),
                  (this._runing = !1),
                  loe(bD(n.prototype), "removeAllListeners", this).call(this),
                  this._onCancel && this._onCancel(this._index),
                  this._xhr ? this._xhr.abort() : void 0
                );
            },
          },
          {
            key: "receiveLen",
            get: function () {
              return this._receivedLength;
            },
          },
          {
            key: "running",
            get: function () {
              return this._running;
            },
            set: function (r) {
              this._running = r;
            },
          },
          {
            key: "_getHeaders",
            value: function (r) {
              var i,
                o = {},
                l = Vjr(
                  r.getAllResponseHeaders().trim().split(`\r
`)
                );
              try {
                for (l.s(); !(i = l.n()).done; ) {
                  var u = i.value.split(": ");
                  o[u[0].toLowerCase()] = u.slice(1).join(": ");
                }
              } catch (c) {
                l.e(c);
              } finally {
                l.f();
              }
              return o;
            },
          },
        ],
        [
          {
            key: "isSupported",
            value: function () {
              return typeof XMLHttpRequest < "u";
            },
          },
        ]
      ),
      n
    );
  })(),
  Yjr = ["retry", "retryDelay", "onRetryError", "transformError"],
  Qjr = (function () {
    function t(n, r) {
      _P(this, t),
        (this.promise = zjr()),
        (this.alive = !!r.onProgress),
        !r.logger && (r.logger = new I9("Loader")),
        (this._loaderType = n),
        (this._loader = n === RS.FETCH ? new doe() : new Zjr()),
        (this._config = r),
        (this._retryCount = 0),
        (this._retryTimer = null),
        (this._canceled = !1),
        (this._logger = r.logger);
    }
    var e;
    return (
      TP(t, [
        {
          key: "exec",
          value: function () {
            var n = this,
              r = this._config,
              i = r.retry,
              o = r.retryDelay,
              l = r.onRetryError,
              u = r.transformError,
              c = Ujr(r, Yjr),
              d = (function () {
                var h = wI(
                  Gp().mark(function f() {
                    var p, g;
                    return Gp().wrap(
                      function (y) {
                        for (;;)
                          switch ((y.prev = y.next)) {
                            case 0:
                              return (
                                (y.prev = 0), (y.next = 3), n._loader.load(c)
                              );
                            case 3:
                              (p = y.sent), n.promise.resolve(p), (y.next = 28);
                              break;
                            case 7:
                              if (
                                ((y.prev = 7),
                                (y.t0 = y.catch(0)),
                                (n._loader.running = !1),
                                n._logger.debug(
                                  "[task request catch err]",
                                  y.t0
                                ),
                                !n._canceled)
                              ) {
                                y.next = 13;
                                break;
                              }
                              return y.abrupt("return");
                            case 13:
                              if (
                                !(
                                  y.t0.response &&
                                  y.t0.response.status >= 400 &&
                                  y.t0.response.status <= 599
                                )
                              ) {
                                y.next = 16;
                                break;
                              }
                              return n.promise.reject(y.t0), y.abrupt("return");
                            case 16:
                              if (
                                ((y.t0.loaderType = n._loaderType),
                                (y.t0.retryCount = n._retryCount),
                                (g = y.t0),
                                u && (g = u(g) || g),
                                l &&
                                  n._retryCount > 0 &&
                                  l(g, n._retryCount, i),
                                n._retryCount++,
                                !(n._retryCount <= i))
                              ) {
                                y.next = 27;
                                break;
                              }
                              return (
                                clearTimeout(n._retryTimer),
                                n._logger.debug(
                                  "[task request setTimeout],retry",
                                  n._retryCount,
                                  ",retry range,",
                                  c.range
                                ),
                                (n._retryTimer = setTimeout(d, o)),
                                y.abrupt("return")
                              );
                            case 27:
                              n.promise.reject(g);
                            case 28:
                            case "end":
                              return y.stop();
                          }
                      },
                      f,
                      null,
                      [[0, 7]]
                    );
                  })
                );
                return function () {
                  return h.apply(this, arguments);
                };
              })();
            return d(), this.promise;
          },
        },
        {
          key: "cancel",
          value:
            ((e = wI(
              Gp().mark(function n() {
                return Gp().wrap(
                  function (r) {
                    for (;;)
                      switch ((r.prev = r.next)) {
                        case 0:
                          return (
                            clearTimeout(this._retryTimer),
                            (this._canceled = !0),
                            (this._loader.running = !1),
                            r.abrupt("return", this._loader.cancel())
                          );
                        case 4:
                        case "end":
                          return r.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "running",
          get: function () {
            return this._loader && this._loader.running;
          },
        },
        {
          key: "loader",
          get: function () {
            return this._loader;
          },
        },
      ]),
      t
    );
  })();
function g3e() {
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
    e[n] = arguments[n];
  if ((e = e.filter(Boolean)).length < 2) return e[0];
  var r = new Uint8Array(
      e.reduce(function (o, l) {
        return o + l.byteLength;
      }, 0)
    ),
    i = 0;
  return (
    e.forEach(function (o) {
      r.set(o, i), (i += o.byteLength);
    }),
    r
  );
}
function Jjr() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
  return new Promise(function (e) {
    return setTimeout(e, t);
  });
}
var qjr = (function (t) {
  n7(r, Pl);
  var e,
    n = i7(r);
  function r(i) {
    var o;
    return (
      _P(this, r),
      sa(fa((o = n.call(this, i))), "type", RS.FETCH),
      sa(fa(o), "_queue", []),
      sa(fa(o), "_alive", []),
      sa(fa(o), "_currentTask", null),
      sa(fa(o), "_config", void 0),
      (o._config = Kjr(i)),
      (o._config.loaderType !== RS.XHR && doe.isSupported()) ||
        (o.type = RS.XHR),
      (o.log = i.logger),
      o
    );
  }
  return (
    TP(
      r,
      [
        {
          key: "isFetch",
          value: function () {
            return this.type === RS.FETCH;
          },
        },
        {
          key: "load",
          value: function (i) {
            var o = this,
              l =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : {};
            typeof i != "string" && i
              ? (l = i)
              : (l.url = i || l.url || this._config.url),
              (l = Object.assign({}, this._config, l)).params &&
                (l.params = Object.assign({}, l.params)),
              l.headers &&
                h3e(l.headers) &&
                (l.headers = Object.assign({}, l.headers)),
              l.body && h3e(l.body) && (l.body = Object.assign({}, l.body)),
              l.transformRequest && (l = l.transformRequest(l) || l),
              (l.logger = this.log);
            var u = new Qjr(this.type, l);
            return (
              u.loader.on(lR.REAL_TIME_SPEED, function (c) {
                o.emit(lR.REAL_TIME_SPEED, c);
              }),
              this._queue.push(u),
              this._queue.length !== 1 ||
                (this._currentTask && this._currentTask.running) ||
                this._processTask(),
              u.promise
            );
          },
        },
        {
          key: "cancel",
          value:
            ((e = wI(
              Gp().mark(function i() {
                var o;
                return Gp().wrap(
                  function (l) {
                    for (;;)
                      switch ((l.prev = l.next)) {
                        case 0:
                          return (
                            (o = this._queue
                              .map(function (u) {
                                return u.cancel();
                              })
                              .concat(
                                this._alive.map(function (u) {
                                  return u.cancel();
                                })
                              )),
                            this._currentTask &&
                              o.push(this._currentTask.cancel()),
                            (this._queue = []),
                            (this._alive = []),
                            (l.next = 6),
                            Promise.all(o)
                          );
                        case 6:
                          return (l.next = 8), Jjr();
                        case 8:
                        case "end":
                          return l.stop();
                      }
                  },
                  i,
                  this
                );
              })
            )),
            function () {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "_processTask",
          value: function () {
            var i = this;
            (this._currentTask = this._queue.shift()),
              this._currentTask &&
                (this._currentTask.alive && this._alive.push(this._currentTask),
                this._currentTask
                  .exec()
                  .catch(function (o) {})
                  .finally(function () {
                    i._processTask();
                  }));
          },
        },
      ],
      [
        {
          key: "isFetchSupport",
          value: function () {
            return doe.isSupported();
          },
        },
      ]
    ),
    r
  );
})();
function eWr(t) {
  return roe(
    {
      vid: "",
      moovEnd: 8e4,
      segmentDuration: 2,
      maxDownloadInfoSize: 30,
      responseType: "arraybuffer",
      cache: null,
    },
    t
  );
}
var JN = Lfe(function t(e, n) {
    xfe(this, t), (this.type = "file"), (this.message = e), (this.data = n);
  }),
  tWr = (function () {
    function t() {
      xfe(this, t), ff(this, "_data", Object.create(null));
    }
    return (
      Lfe(t, [
        {
          key: "set",
          value: function (e, n) {
            this._data[e] = n;
          },
        },
        {
          key: "get",
          value: function (e) {
            return this._data[e];
          },
        },
        {
          key: "clear",
          value: function () {
            this._data = Object.create(null);
          },
        },
      ]),
      t
    );
  })();
function m3e(t, e) {
  var n = t.trak;
  if (n && n.length) {
    var r = n.find(function (E) {
        var S, L;
        return (
          ((S = E.mdia) === null ||
          S === void 0 ||
          (L = S.hdlr) === null ||
          L === void 0
            ? void 0
            : L.handlerType) === "vide"
        );
      }),
      i = n.find(function (E) {
        var S, L;
        return (
          ((S = E.mdia) === null ||
          S === void 0 ||
          (L = S.hdlr) === null ||
          L === void 0
            ? void 0
            : L.handlerType) === "soun"
        );
      });
    if (r || i) {
      var o,
        l = [],
        u = [];
      if (r) {
        var c,
          d,
          h,
          f =
            (c = r.mdia) === null ||
            c === void 0 ||
            (d = c.minf) === null ||
            d === void 0
              ? void 0
              : d.stbl;
        if (!f) return;
        var p =
            (h = r.mdia.mdhd) === null || h === void 0 ? void 0 : h.timescale,
          g = f.stts,
          y = f.stsc,
          v = f.stsz,
          b = f.stco,
          w = f.stss,
          k = f.ctts;
        if (!(p && g && y && v && b && w)) return;
        o = (l = y3e(e, p, g, y, v, b, w, k)).map(function (E) {
          return E.duration;
        });
      }
      if (i) {
        var D,
          $,
          N,
          P =
            (D = i.mdia) === null ||
            D === void 0 ||
            ($ = D.minf) === null ||
            $ === void 0
              ? void 0
              : $.stbl;
        if (!P) return;
        var I =
            (N = i.mdia.mdhd) === null || N === void 0 ? void 0 : N.timescale,
          O = P.stts,
          X = P.stsc,
          G = P.stsz,
          H = P.stco;
        if (!(I && O && X && G && H)) return;
        u = y3e(e, I, O, X, G, H, null, null, o);
      }
      return { videoSegments: l, audioSegments: u };
    }
  }
}
function y3e(t, e, n, r, i, o, l, u, c) {
  var d,
    h,
    f,
    p,
    g = [],
    y = [],
    v = [],
    b = r.entries,
    w = o.entries,
    k = i.entrySizes,
    D = l == null ? void 0 : l.entries,
    $ = u == null ? void 0 : u.entries;
  $ &&
    ((d = []),
    $.forEach(function (tt) {
      for (var He = tt.count, de = tt.offset, ue = 0; ue < He; ue++) d.push(de);
    })),
    D &&
      ((h = {}),
      D.forEach(function (tt) {
        h[tt - 1] = !0;
      }));
  var N = 0,
    P = 0,
    I = 0,
    O = 0,
    X = 0,
    G = b[0].samplesPerChunk,
    H = b[1] ? b[1].firstChunk - 1 : 1 / 0,
    E = 0,
    S = -1;
  n.entries.forEach(function (tt) {
    var He = tt.count,
      de = tt.delta;
    p = de;
    for (var ue = 0; ue < He; ue++)
      (f = {
        dts: E,
        startTime: N,
        duration: p,
        size: k[P] || i.sampleSize,
        offset: w[I] + X,
        index: P,
      }),
        D &&
          ((f.keyframe = h[P]),
          f.keyframe
            ? (S++, y.push([f]), v.push(f.duration))
            : (y[y.length - 1].push(f), (v[y.length - 1] += f.duration)),
          (f.gopId = S)),
        d && P < d.length && (f.pts = E + d[P]),
        P === 0 && (f.pts = 0),
        g.push(f),
        (N += p),
        (E += de),
        ++P < G
          ? (X += f.size)
          : (I++,
            (X = 0),
            I >= H && (O++, (H = b[O + 1] ? b[O + 1].firstChunk - 1 : 1 / 0)),
            (G += b[O].samplesPerChunk));
  });
  var L = g.length;
  if (L && (!l || g[0].keyframe)) {
    var W,
      F = [],
      oe = [],
      De = 0,
      Xe = function (tt) {
        var He;
        (W = oe[oe.length - 1]),
          F.push({
            index: F.length,
            startTime:
              ((He = F[F.length - 1]) === null || He === void 0
                ? void 0
                : He.endTime) || oe[0].startTime / e,
            endTime: (W.startTime + W.duration) / e,
            duration: tt,
            range: [oe[0].offset, W.offset + W.size],
            frames: oe,
          }),
          (De = 0),
          (oe = []);
      };
    if (l)
      for (var ze = t * e, ht = 0, gt = y.length; ht < gt; ht++) {
        var pt;
        (De += v[ht]),
          (pt = oe).push.apply(pt, Mjr(y[ht])),
          ht + 1 < gt ? (ht === 0 || De > ze) && Xe(De / e) : Xe(De / e);
      }
    else
      for (var $t = (c = c || [])[0] || t, ot = 0; ot < L; ot++)
        oe.push(g[ot]),
          (De += g[ot].duration),
          (ot + 1 >= L || De / e >= $t) &&
            (Xe(De / e), ($t = c[F.length] || t));
    return F;
  }
}
function v3e(t) {
  var e = "",
    n = "",
    r = 0,
    i = 0,
    o = 0,
    l = 0,
    u = 0,
    c = 0,
    d = 0;
  t.mvhd && (u = t.mvhd.duration / t.mvhd.timescale);
  var h = t.trak;
  if (h) {
    var f,
      p,
      g,
      y,
      v,
      b,
      w,
      k,
      D,
      $,
      N,
      P,
      I,
      O,
      X,
      G,
      H,
      E = h.find(function (W) {
        var F, oe;
        return (
          ((F = W.mdia) === null ||
          F === void 0 ||
          (oe = F.hdlr) === null ||
          oe === void 0
            ? void 0
            : oe.handlerType) === "vide"
        );
      }),
      S = h.find(function (W) {
        var F, oe;
        return (
          ((F = W.mdia) === null ||
          F === void 0 ||
          (oe = F.hdlr) === null ||
          oe === void 0
            ? void 0
            : oe.handlerType) === "soun"
        );
      }),
      L = null;
    return (
      E &&
        (L =
          (p = E.mdia) === null ||
          p === void 0 ||
          (g = p.minf) === null ||
          g === void 0 ||
          (y = g.stbl) === null ||
          y === void 0
            ? void 0
            : y.stsd.entries[0]) &&
        ((r = L.width),
        (i = L.height),
        (c =
          (v = E.mdia) === null ||
          v === void 0 ||
          (b = v.mdhd) === null ||
          b === void 0
            ? void 0
            : b.timescale),
        (e =
          (w = L.avcC || L.hvcC) === null || w === void 0 ? void 0 : w.codec),
        L.type === "encv" &&
          (f =
            (k = L.sinf) === null ||
            k === void 0 ||
            (D = k.schi) === null ||
            D === void 0
              ? void 0
              : D.tenc.default_KID)),
      S &&
        (L =
          ($ = S.mdia) === null ||
          $ === void 0 ||
          (N = $.minf) === null ||
          N === void 0 ||
          (P = N.stbl) === null ||
          P === void 0
            ? void 0
            : P.stsd.entries[0]) &&
        ((o = L.channelCount),
        (l = L.sampleRate),
        (n = (I = L.esds) === null || I === void 0 ? void 0 : I.codec),
        (d =
          (O = S.mdia) === null ||
          O === void 0 ||
          (X = O.mdhd) === null ||
          X === void 0
            ? void 0
            : X.timescale),
        L.type === "enca" &&
          (f =
            f ||
            ((G = L.sinf) === null ||
            G === void 0 ||
            (H = G.schi) === null ||
            H === void 0
              ? void 0
              : H.tenc.default_KID))),
      {
        kid: f ? f.join("") : null,
        videoCodec: e,
        audioCodec: n,
        width: r,
        height: i,
        videoTimescale: c,
        audioChannelCount: o,
        audioSampleRate: l,
        duration: u,
        audioTimescale: d,
        moov: t,
      }
    );
  }
}
function b3e(t) {
  return typeof t == "number" && !Number.isNaN(t);
}
var nWr = ["vid", "cache"],
  xat = (function (t) {
    Rjr(g, Pl);
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h,
      f,
      p = Djr(g);
    function g(y) {
      var v;
      xfe(this, g),
        ff(Tp((v = p.call(this))), "vid", ""),
        ff(Tp(v), "url", ""),
        ff(Tp(v), "meta", {}),
        ff(Tp(v), "downloadInfo", []),
        ff(Tp(v), "videoSegments", []),
        ff(Tp(v), "audioSegments", []),
        ff(Tp(v), "cache", null),
        ff(Tp(v), "_currentSegmentIndex", -1),
        ff(Tp(v), "_currentLoadingSegmentIndex", -1),
        ff(Tp(v), "buffer", void 0),
        ff(Tp(v), "_error", void 0),
        ff(Tp(v), "_transformError", function ($) {
          return $;
        }),
        (v._config = eWr(y));
      var b = v._config,
        w = b.vid,
        k = b.cache,
        D = kjr(b, nWr);
      return (
        (v.cache = k || new tWr()),
        (v.vid = w || D.url),
        (v.url = D.url),
        (D.transformError = v._transformError),
        (v.logger = new I9("MP4Loader_" + v.vid)),
        y.openLog && I9.enable(),
        (D.logger = v.logger),
        (v._loader = new qjr(D)),
        v._loader.on(lR.REAL_TIME_SPEED, function ($) {
          v.emit(lR.REAL_TIME_SPEED, $);
        }),
        v
      );
    }
    return (
      Lfe(g, [
        {
          key: "isMetaLoaded",
          get: function () {
            return this.videoSegments.length || this.audioSegments.length;
          },
        },
        {
          key: "setCurrentSegment",
          value: function (y) {
            b3e(y) && (this._currentSegmentIndex = y);
          },
        },
        {
          key: "isLastSegment",
          value: function (y) {
            var v, b;
            return (
              !!b3e(y) &&
              y ===
                (((v = this.videoSegments[this.videoSegments.length - 1]) ===
                  null || v === void 0
                  ? void 0
                  : v.index) ||
                  ((b = this.audioSegments[this.audioSegments.length - 1]) ===
                    null || b === void 0
                    ? void 0
                    : b.index) ||
                  0)
            );
          },
        },
        {
          key: "isSegmentLoading",
          value: function (y) {
            return y === this._currentLoadingSegmentIndex;
          },
        },
        {
          key: "changeUrl",
          value:
            ((f = vp(
              Js().mark(function y(v) {
                var b,
                  w,
                  k,
                  D = arguments;
                return Js().wrap(
                  function ($) {
                    for (;;)
                      switch (($.prev = $.next)) {
                        case 0:
                          return (
                            (b = D.length > 1 && D[1] !== void 0 ? D[1] : v),
                            (w = D.length > 2 ? D[2] : void 0),
                            (k = D.length > 3 ? D[3] : void 0),
                            ($.next = 5),
                            this.reset(k)
                          );
                        case 5:
                          v && (this.url = v),
                            b && (this.vid = b),
                            w && (this._config.moovEnd = w);
                        case 8:
                        case "end":
                          return $.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y) {
              return f.apply(this, arguments);
            }),
        },
        {
          key: "getOrLoadMeta",
          value:
            ((h = vp(
              Js().mark(function y(v) {
                return Js().wrap(
                  function (b) {
                    for (;;)
                      switch ((b.prev = b.next)) {
                        case 0:
                          if (this.isMetaLoaded) {
                            b.next = 3;
                            break;
                          }
                          return (b.next = 3), this.loadMeta(v);
                        case 3:
                          return b.abrupt("return", this.meta);
                        case 4:
                        case "end":
                          return b.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y) {
              return h.apply(this, arguments);
            }),
        },
        {
          key: "loadMetaProcess",
          value:
            ((d = vp(
              Js().mark(function y(v, b, w, k) {
                var D,
                  $,
                  N,
                  P,
                  I = this;
                return Js().wrap(
                  function (O) {
                    for (;;)
                      switch ((O.prev = O.next)) {
                        case 0:
                          return (
                            (D = Pjr(b, 2)),
                            ($ = D[0]),
                            (N = D[1]),
                            (this._error = !1),
                            this.logger.debug(
                              "[loadMetaProcess start], range,",
                              [$, N]
                            ),
                            (P = (function () {
                              var X = vp(
                                Js().mark(function G(H, E, S) {
                                  var L, W, F, oe, De, Xe, ze, ht;
                                  return Js().wrap(function (gt) {
                                    for (;;)
                                      switch ((gt.prev = gt.next)) {
                                        case 0:
                                          if (
                                            (I.meta &&
                                              S != null &&
                                              S.range &&
                                              S.range.length > 0 &&
                                              S.range[1] >= N &&
                                              ((E = !0),
                                              I.logger.debug(
                                                "[loadMetaProcess],data done,setstate true,[",
                                                $,
                                                N,
                                                "]"
                                              )),
                                            E &&
                                              S != null &&
                                              S.range &&
                                              S.range.length > 0 &&
                                              S.range[1] < N &&
                                              ((E = !1),
                                              I.logger.debug(
                                                "[loadMetaProcess],data not done,setstate false,[",
                                                $,
                                                N,
                                                "]"
                                              )),
                                            I.logger.debug(
                                              "[loadMetaProcess],task,[",
                                              $,
                                              N,
                                              "], range,",
                                              S.range,
                                              ",dataLen,",
                                              H ? H.byteLength : void 0,
                                              ", state,",
                                              E,
                                              ",err,",
                                              I._error
                                            ),
                                            !I._error &&
                                              H &&
                                              H.byteLength > 0 &&
                                              w(H, E, S),
                                            !I.meta.moov && !I._error)
                                          ) {
                                            gt.next = 6;
                                            break;
                                          }
                                          return gt.abrupt("return");
                                        case 6:
                                          if (!(H && H.byteLength > 0)) {
                                            gt.next = 44;
                                            break;
                                          }
                                          if (
                                            ((I.buffer = g3e(I.buffer, H)),
                                            (L = u0.findBox(I.buffer, [
                                              "moov",
                                            ])[0]))
                                          ) {
                                            gt.next = 23;
                                            break;
                                          }
                                          if (
                                            ((W = u0.findBox(I.buffer, [
                                              "mdat",
                                            ])[0]),
                                            !E)
                                          ) {
                                            gt.next = 23;
                                            break;
                                          }
                                          if (W) {
                                            gt.next = 18;
                                            break;
                                          }
                                          return (
                                            (I._error = !0),
                                            w(null, E, S, {
                                              err: "cannot find moov or mdat box",
                                            }),
                                            gt.abrupt("return")
                                          );
                                        case 18:
                                          return (
                                            (F = W.start + W.size),
                                            (gt.next = 21),
                                            I.loadData([F, ""], v, k)
                                          );
                                        case 21:
                                          (oe = gt.sent) &&
                                            (L = u0.findBox(oe.data, [
                                              "moov",
                                            ])[0]);
                                        case 23:
                                          if (
                                            !(L && E && L.size > L.data.length)
                                          ) {
                                            gt.next = 27;
                                            break;
                                          }
                                          return (
                                            I.logger.debug(
                                              "[loadMetaProcess],moov not all, range,",
                                              S.range[1],
                                              ",dataLen,",
                                              I.buffer.byteLength,
                                              ", state,",
                                              E
                                            ),
                                            (gt.next = 27),
                                            I.loadMetaProcess(
                                              v,
                                              [
                                                S.range[1],
                                                L.start + L.size - 1,
                                              ],
                                              w
                                            )
                                          );
                                        case 27:
                                          if (
                                            !(L && L.size <= L.data.length) ||
                                            I.meta.moov
                                          ) {
                                            gt.next = 44;
                                            break;
                                          }
                                          if ((De = u0.moov(L))) {
                                            gt.next = 33;
                                            break;
                                          }
                                          return (
                                            (I._error = !0),
                                            w(null, E, S, {
                                              err: "cannot parse moov box",
                                            }),
                                            gt.abrupt("return")
                                          );
                                        case 33:
                                          if (
                                            (Xe = m3e(
                                              De,
                                              I._config.segmentDuration
                                            ))
                                          ) {
                                            gt.next = 38;
                                            break;
                                          }
                                          return (
                                            (I._error = !0),
                                            w(null, E, S, {
                                              err: "cannot parse segments",
                                            }),
                                            gt.abrupt("return")
                                          );
                                        case 38:
                                          (I.meta = v3e(De)),
                                            (ze = Xe.videoSegments),
                                            (ht = Xe.audioSegments),
                                            (I.videoSegments = ze),
                                            (I.audioSegments = ht),
                                            I.logger.debug(
                                              "[loadMetaProcess] moov ok"
                                            ),
                                            w(void 0, E, {
                                              meta: {
                                                meta: I.meta,
                                                videoSegments: ze,
                                                audioSegments: ht,
                                              },
                                            });
                                        case 44:
                                        case "end":
                                          return gt.stop();
                                      }
                                  }, G);
                                })
                              );
                              return function (G, H, E) {
                                return X.apply(this, arguments);
                              };
                            })()),
                            (O.next = 6),
                            this.loadData(
                              [$, N || this._config.moovEnd],
                              v,
                              roe({ onProgress: P }, k)
                            )
                          );
                        case 6:
                        case "end":
                          return O.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y, v, b, w) {
              return d.apply(this, arguments);
            }),
        },
        {
          key: "loadMeta",
          value:
            ((c = vp(
              Js().mark(function y(v, b, w) {
                var k, D, $, N, P, I, O, X, G;
                return Js().wrap(
                  function (H) {
                    for (;;)
                      switch ((H.prev = H.next)) {
                        case 0:
                          return (
                            (k = []),
                            this.logger.debug("[loadMeta start]"),
                            (H.next = 4),
                            this.loadData([0, b || this._config.moovEnd], v, w)
                          );
                        case 4:
                          if ((D = H.sent)) {
                            H.next = 7;
                            break;
                          }
                          return H.abrupt("return");
                        case 7:
                          if (
                            (k.push(D), ($ = u0.findBox(D.data, ["moov"])[0]))
                          ) {
                            H.next = 23;
                            break;
                          }
                          if ((N = u0.findBox(D.data, ["mdat"])[0])) {
                            H.next = 13;
                            break;
                          }
                          throw new JN("cannot find moov or mdat box", D.data);
                        case 13:
                          return (
                            (P = N.start + N.size),
                            (H.next = 16),
                            this.loadData([P], v, w)
                          );
                        case 16:
                          if ((D = H.sent)) {
                            H.next = 19;
                            break;
                          }
                          return H.abrupt("return");
                        case 19:
                          if (
                            (k.push(D),
                            ($ = u0.findBox(D.data, ["moov"], P)[0]))
                          ) {
                            H.next = 23;
                            break;
                          }
                          throw new JN("cannot find moov box", D.data);
                        case 23:
                          if (!($.size > $.data.length)) {
                            H.next = 31;
                            break;
                          }
                          return (
                            (H.next = 26),
                            this.loadData(
                              [D.data.length, $.start + $.size - 1],
                              v,
                              w
                            )
                          );
                        case 26:
                          if ((D = H.sent)) {
                            H.next = 29;
                            break;
                          }
                          return H.abrupt("return");
                        case 29:
                          k.push(D), ($.data = g3e($.data, D.data));
                        case 31:
                          if ((I = u0.moov($))) {
                            H.next = 34;
                            break;
                          }
                          throw new JN("cannot parse moov box", $.data);
                        case 34:
                          if ((O = m3e(I, this._config.segmentDuration))) {
                            H.next = 37;
                            break;
                          }
                          throw new JN("cannot parse segments", $.data);
                        case 37:
                          return (
                            (this.meta = v3e(I)),
                            (X = O.videoSegments),
                            (G = O.audioSegments),
                            (this.videoSegments = X),
                            (this.audioSegments = G),
                            this.logger.debug("[load moov end!!!!!]"),
                            H.abrupt("return", {
                              meta: this.meta,
                              videoSegments: X,
                              audioSegments: G,
                              responses: k,
                            })
                          );
                        case 43:
                        case "end":
                          return H.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y, v, b) {
              return c.apply(this, arguments);
            }),
        },
        {
          key: "getSegmentByTime",
          value: function (y) {
            var v, b;
            return (
              this.videoSegments.length
                ? (v = this.videoSegments.find(function (w) {
                    return w.startTime <= y && w.endTime > y;
                  })) && (b = this.audioSegments[v.index])
                : (b = this.audioSegments.find(function (w) {
                    return w.startTime <= y && w.endTime > y;
                  })),
              { video: v, audio: b }
            );
          },
        },
        {
          key: "loadSegmentByTime",
          value:
            ((u = vp(
              Js().mark(function y(v, b) {
                var w,
                  k,
                  D,
                  $,
                  N,
                  P = arguments;
                return Js().wrap(
                  function (I) {
                    for (;;)
                      switch ((I.prev = I.next)) {
                        case 0:
                          if (
                            ((w = !(P.length > 2 && P[2] !== void 0) || P[2]),
                            (k = P.length > 3 && P[3] !== void 0 ? P[3] : {}),
                            this.isMetaLoaded)
                          ) {
                            I.next = 5;
                            break;
                          }
                          return (I.next = 5), this.loadMeta(b);
                        case 5:
                          return (
                            (D = this.getSegmentByTime(v)),
                            ($ = D.video),
                            (N = D.audio),
                            I.abrupt("return", this._loadSegment($, N, b, w, k))
                          );
                        case 7:
                        case "end":
                          return I.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y, v) {
              return u.apply(this, arguments);
            }),
        },
        {
          key: "loadNextSegment",
          value:
            ((l = vp(
              Js().mark(function y(v) {
                var b,
                  w,
                  k,
                  D,
                  $ = arguments;
                return Js().wrap(
                  function (N) {
                    for (;;)
                      switch ((N.prev = N.next)) {
                        case 0:
                          if (
                            ((b = !($.length > 1 && $[1] !== void 0) || $[1]),
                            (w = $.length > 2 && $[2] !== void 0 ? $[2] : {}),
                            this.isMetaLoaded)
                          ) {
                            N.next = 5;
                            break;
                          }
                          return (N.next = 5), this.loadMeta();
                        case 5:
                          return (
                            (k =
                              this.videoSegments[
                                this._currentSegmentIndex + 1
                              ]),
                            (D =
                              this.audioSegments[
                                this._currentSegmentIndex + 1
                              ]),
                            N.abrupt("return", this._loadSegment(k, D, v, b, w))
                          );
                        case 8:
                        case "end":
                          return N.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y) {
              return l.apply(this, arguments);
            }),
        },
        {
          key: "preload",
          value:
            ((o = vp(
              Js().mark(function y(v) {
                var b,
                  w,
                  k,
                  D,
                  $,
                  N,
                  P,
                  I = this;
                return Js().wrap(
                  function (O) {
                    for (;;)
                      switch ((O.prev = O.next)) {
                        case 0:
                          if (this.isMetaLoaded) {
                            O.next = 3;
                            break;
                          }
                          return (O.next = 3), this.loadMeta(!0);
                        case 3:
                          if (v && !(v < 0)) {
                            O.next = 5;
                            break;
                          }
                          return O.abrupt("return");
                        case 5:
                          if (
                            ((b = this.getSegmentByTime(v)),
                            (w = b.video),
                            (k = b.audio),
                            (D = Math.max(
                              (w == null ? void 0 : w.index) || 0,
                              (k == null ? void 0 : k.index) || 0
                            )))
                          ) {
                            O.next = 9;
                            break;
                          }
                          return O.abrupt("return");
                        case 9:
                          return (
                            ($ = this.videoSegments.slice(0, D)),
                            (N = this.audioSegments.slice(0, D)),
                            (P = (function () {
                              var X = vp(
                                Js().mark(function G(H) {
                                  return Js().wrap(function (E) {
                                    for (;;)
                                      switch ((E.prev = E.next)) {
                                        case 0:
                                          if (!(H > D)) {
                                            E.next = 2;
                                            break;
                                          }
                                          return E.abrupt("return");
                                        case 2:
                                          return (
                                            (E.next = 4),
                                            I._loadSegment($[H], N[H], !0, !1)
                                          );
                                        case 4:
                                          return (E.next = 6), P(H + 1);
                                        case 6:
                                        case "end":
                                          return E.stop();
                                      }
                                  }, G);
                                })
                              );
                              return function (G) {
                                return X.apply(this, arguments);
                              };
                            })()),
                            (O.next = 14),
                            P(0)
                          );
                        case 14:
                        case "end":
                          return O.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y) {
              return o.apply(this, arguments);
            }),
        },
        {
          key: "cancel",
          value: function () {
            return this._loader.cancel();
          },
        },
        {
          key: "reset",
          value:
            ((i = vp(
              Js().mark(function y() {
                var v = arguments;
                return Js().wrap(
                  function (b) {
                    for (;;)
                      switch ((b.prev = b.next)) {
                        case 0:
                          if (v.length > 0 && v[0] !== void 0 && v[0]) {
                            b.next = 5;
                            break;
                          }
                          return (
                            this.logger.debug(
                              "[MP4loader reset func call loader.cancel]"
                            ),
                            (b.next = 5),
                            this._loader.cancel()
                          );
                        case 5:
                          (this.vid = this.url = ""),
                            (this.meta = {}),
                            (this.downloadInfo = []),
                            (this.videoSegments = []),
                            (this.audioSegments = []),
                            (this._currentSegmentIndex = -1),
                            (this._currentLoadingSegmentIndex = -1);
                        case 12:
                        case "end":
                          return b.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function () {
              return i.apply(this, arguments);
            }),
        },
        {
          key: "destroy",
          value:
            ((r = vp(
              Js().mark(function y() {
                return Js().wrap(
                  function (v) {
                    for (;;)
                      switch ((v.prev = v.next)) {
                        case 0:
                          return (v.next = 2), this.reset();
                        case 2:
                          this.cache.clear();
                        case 3:
                        case "end":
                          return v.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function () {
              return r.apply(this, arguments);
            }),
        },
        {
          key: "_loadSegment",
          value:
            ((n = vp(
              Js().mark(function y(v, b, w, k, D) {
                var $, N;
                return Js().wrap(
                  function (P) {
                    for (;;)
                      switch ((P.prev = P.next)) {
                        case 0:
                          if (v || b) {
                            P.next = 2;
                            break;
                          }
                          return P.abrupt("return");
                        case 2:
                          return (
                            ($ =
                              (v == null ? void 0 : v.index) ||
                              (b == null ? void 0 : b.index) ||
                              0),
                            (this._currentLoadingSegmentIndex = $),
                            (P.prev = 4),
                            (P.next = 7),
                            this.loadData(
                              [
                                Math.min(
                                  (v == null ? void 0 : v.range[0]) || 1 / 0,
                                  (b == null ? void 0 : b.range[0]) || 1 / 0
                                ),
                                Math.max(
                                  (v == null ? void 0 : v.range[1]) || 0,
                                  (b == null ? void 0 : b.range[1]) || 0
                                ),
                              ],
                              w,
                              D
                            )
                          );
                        case 7:
                          N = P.sent;
                        case 8:
                          return (
                            (P.prev = 8),
                            (this._currentLoadingSegmentIndex = -1),
                            P.finish(8)
                          );
                        case 11:
                          if (N) {
                            P.next = 13;
                            break;
                          }
                          return P.abrupt("return");
                        case 13:
                          return (
                            k && (this._currentSegmentIndex = $),
                            (N.video = v),
                            (N.audio = b),
                            P.abrupt("return", N)
                          );
                        case 17:
                        case "end":
                          return P.stop();
                      }
                  },
                  y,
                  this,
                  [[4, , 8, 11]]
                );
              })
            )),
            function (y, v, b, w, k) {
              return n.apply(this, arguments);
            }),
        },
        {
          key: "loadData",
          value:
            ((e = vp(
              Js().mark(function y(v, b, w) {
                var k, D, $;
                return Js().wrap(
                  function (N) {
                    for (;;)
                      switch ((N.prev = N.next)) {
                        case 0:
                          return (
                            (k = this._getCacheKey(v)),
                            (N.next = 3),
                            this.cache.get(k)
                          );
                        case 3:
                          if ((D = N.sent)) {
                            N.next = 10;
                            break;
                          }
                          return (
                            (N.next = 7),
                            this._loader.load(
                              this.url,
                              roe({ range: v, vid: this.vid }, w)
                            )
                          );
                        case 7:
                          ($ = N.sent), (N.next = 11);
                          break;
                        case 10:
                          $ = {
                            data: D,
                            state: !0,
                            options: { fromCache: !0, range: v, vid: this.vid },
                          };
                        case 11:
                          if ($) {
                            N.next = 13;
                            break;
                          }
                          return N.abrupt("return");
                        case 13:
                          return (
                            D ||
                              ($.data &&
                                this.downloadInfo.push({
                                  startTime: $.startTime,
                                  endTime: $.endTime,
                                  size: $.data.byteLength,
                                  range: v,
                                }),
                              this.downloadInfo &&
                                this.downloadInfo.length >
                                  this._config.maxDownloadInfoSize &&
                                (this.downloadInfo = this.downloadInfo.slice(
                                  -this._config.maxDownloadInfoSize
                                ))),
                            N.abrupt("return", $)
                          );
                        case 16:
                        case "end":
                          return N.stop();
                      }
                  },
                  y,
                  this
                );
              })
            )),
            function (y, v, b) {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "_getCacheKey",
          value: function (y) {
            return (this.vid || this.url) + ":" + y;
          },
        },
      ]),
      g
    );
  })(),
  rWr = oWr(),
  Lat = MC();
function iWr() {
  try {
    return (
      typeof localStorage < "u" &&
      "setItem" in window.localStorage &&
      !!window.localStorage.setItem
    );
  } catch {
    return !1;
  }
}
function aWr() {
  var t = "_localstorage_support_test";
  try {
    return (
      window.localStorage.setItem(t, !0), window.localStorage.removeItem(t), !1
    );
  } catch {
    return !0;
  }
}
function MC() {
  if (rWr)
    try {
      return !!window.localStorage.getItem("playerlog");
    } catch {
      return !1;
    }
  return !1;
}
function oWr() {
  return iWr() && !aWr();
}
function ks(t) {
  for (
    var e, n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1;
    i < n;
    i++
  )
    r[i - 1] = arguments[i];
  Lat &&
    console.log &&
    (e = console).log.apply(e, ["[logger]", Kr.nowTime(), t].concat(r));
}
var sWr = xE,
  KM = zs,
  Ofe = Fa,
  lWr = sce,
  uWr = Yu,
  cWr = Tb,
  dWr = lYe,
  _3e = F0,
  hWr = K5,
  fWr = cce,
  pWr = B0,
  bq = Qu,
  gWr = ND,
  T3e = V5,
  E3e = hce,
  mWr = lL,
  yWr = KWe,
  vWr = aa,
  Bw = yWr.UNSUPPORTED_Y,
  S3e = 4294967295,
  bWr = Math.min,
  Oat = [].push,
  _Wr = Ofe(/./.exec),
  Hw = Ofe(Oat),
  ZM = Ofe("".slice),
  TWr = !vWr(function () {
    var t = /(?:)/,
      e = t.exec;
    t.exec = function () {
      return e.apply(this, arguments);
    };
    var n = "ab".split(t);
    return n.length !== 2 || n[0] !== "a" || n[1] !== "b";
  });
lWr(
  "split",
  function (t, e, n) {
    var r;
    return (
      (r =
        "abbc".split(/(b)*/)[1] == "c" ||
        "test".split(/(?:)/, -1).length != 4 ||
        "ab".split(/(?:ab)*/).length != 2 ||
        ".".split(/(.?)(.?)/).length != 4 ||
        ".".split(/()()/).length > 1 ||
        "".split(/.?/).length
          ? function (i, o) {
              var l = bq(_3e(this)),
                u = o === void 0 ? S3e : o >>> 0;
              if (u === 0) return [];
              if (i === void 0) return [l];
              if (!dWr(i)) return KM(e, l, i, u);
              for (
                var c,
                  d,
                  h,
                  f = [],
                  p =
                    (i.ignoreCase ? "i" : "") +
                    (i.multiline ? "m" : "") +
                    (i.unicode ? "u" : "") +
                    (i.sticky ? "y" : ""),
                  g = 0,
                  y = new RegExp(i.source, p + "g");
                (c = KM(mWr, y, l)) &&
                !(
                  (d = y.lastIndex) > g &&
                  (Hw(f, ZM(l, g, c.index)),
                  c.length > 1 && c.index < l.length && sWr(Oat, f, T3e(c, 1)),
                  (h = c[0].length),
                  (g = d),
                  f.length >= u)
                );

              )
                y.lastIndex === c.index && y.lastIndex++;
              return (
                g === l.length
                  ? (!h && _Wr(y, "")) || Hw(f, "")
                  : Hw(f, ZM(l, g)),
                f.length > u ? T3e(f, 0, u) : f
              );
            }
          : "0".split(void 0, 0).length
          ? function (i, o) {
              return i === void 0 && o === 0 ? [] : KM(e, this, i, o);
            }
          : e),
      [
        function (i, o) {
          var l = _3e(this),
            u = cWr(i) ? void 0 : gWr(i, t);
          return u ? KM(u, i, l, o) : KM(r, bq(l), i, o);
        },
        function (i, o) {
          var l = uWr(this),
            u = bq(i),
            c = n(r, l, u, o, r !== e);
          if (c.done) return c.value;
          var d = hWr(l, RegExp),
            h = l.unicode,
            f =
              (l.ignoreCase ? "i" : "") +
              (l.multiline ? "m" : "") +
              (l.unicode ? "u" : "") +
              (Bw ? "g" : "y"),
            p = new d(Bw ? "^(?:" + l.source + ")" : l, f),
            g = o === void 0 ? S3e : o >>> 0;
          if (g === 0) return [];
          if (u.length === 0) return E3e(p, u) === null ? [u] : [];
          for (var y = 0, v = 0, b = []; v < u.length; ) {
            p.lastIndex = Bw ? 0 : v;
            var w,
              k = E3e(p, Bw ? ZM(u, v) : u);
            if (
              k === null ||
              (w = bWr(pWr(p.lastIndex + (Bw ? v : 0)), u.length)) === y
            )
              v = fWr(u, v, h);
            else {
              if ((Hw(b, ZM(u, y, v)), b.length === g)) return b;
              for (var D = 1; D <= k.length - 1; D++)
                if ((Hw(b, k[D]), b.length === g)) return b;
              v = y = w;
            }
          }
          return Hw(b, ZM(u, y)), b;
        },
      ]
    );
  },
  !TWr,
  Bw
);
var R3e = {
  "x-cache": "x_cache",
  "x-response-sinfo": "server_ip",
  "x-response-cinfo": "x-response-cinfo",
};
function EWr(t) {
  var e = {};
  return (
    Object.keys(R3e).forEach(function (n) {
      var r = R3e[n];
      t && t.get && t.get(n) && (e[r] = t.get(n));
    }),
    e
  );
}
var qN = [
  { range: [0, 90], size: 614400 },
  { range: [90, 120], size: 1228800 },
  { range: [120, Number.MAX_VALUE], size: 2048e3 },
];
function Gat(t, e, n) {
  var r = n > 51200 ? Math.min(n, e) : e;
  if (!t) return r;
  for (var i = 0; i < qN.length; i++)
    if (t >= qN[i].range[0] && t < qN[i].range[1]) {
      r = Math.min(Math.max(r, qN[i].size), n > 0 ? n : e);
      break;
    }
  return r;
}
var Nat =
    " ",
  A3e =
    typeof window < "u" &&
    window.Blob &&
    new Blob([atob(Nat)], { type: "text/javascript;charset=utf-8" });
function SWr() {
  var t = A3e && (window.URL || window.webkitURL).createObjectURL(A3e);
  try {
    return t
      ? new Worker(t, {})
      : new Worker("data:application/javascript;base64," + Nat, {
          type: "module",
        });
  } finally {
    t && (window.URL || window.webkitURL).revokeObjectURL(t);
  }
}
var RWr = (function (t) {
    sP(n, Pl);
    var e = lP(n);
    function n(r) {
      var i;
      return (
        Hh(this, n),
        ((i = e.call(this)).openlog = r.openLog),
        (i.codecType = r.codecType),
        (i.supportHevc = r.supportHevc),
        (i.worker = new SWr()),
        (i.worker.onmessage = function (o) {
          i.emit(o.data.method, o.data);
        }),
        i.worker.postMessage({
          method: "init",
          id: r.id || 0,
          args: {
            openlog: i.openlog,
            supportHevc: i.supportHevc,
            codecType: i.codecType,
          },
        }),
        i
      );
    }
    return (
      Xh(n, [
        {
          key: "transmux",
          value: function (r, i, o, l, u, c, d, h, f) {
            var p = i.buffer;
            this.worker &&
              this.worker.postMessage(
                {
                  method: "transmux",
                  id: r,
                  buffer: p,
                  args: {
                    start: o,
                    videoIdx: l,
                    audioIdx: u,
                    moov: c,
                    useEME: d,
                    kidValue: h,
                    context: f,
                  },
                },
                [p]
              );
          },
        },
        {
          key: "reset",
          value: function () {
            this.worker && this.worker.postMessage({ method: "reset" });
          },
        },
        {
          key: "destroy",
          value: function () {
            this.worker && this.worker.terminate();
          },
        },
      ]),
      n
    );
  })(),
  qs = {
    ERROR: "error",
    META_READY: "metaReady",
    MOOV_READY: "moovReady",
    MOOV_REQ_PROGRESS: "moov_request_Progress",
    TASK_PROGRESS: "progress_event",
    REMOVE_URL: "remove_url",
    FRAGMENT: "fragment",
    UPDATEEME: "updateEME",
    CHANGE_URL: "chaneg_url",
  },
  CC = (function (t) {
    sP(f, Pl);
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c,
      d,
      h = lP(f);
    function f(p, g, y, v) {
      var b,
        w = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : [],
        k = arguments.length > 7 ? arguments[7] : void 0,
        D = arguments.length > 8 ? arguments[8] : void 0;
      if (
        (Hh(this, f),
        cs(
          _o((b = h.call(this))),
          "onprogressDataArrive",
          (function () {
            var $ = Eu(
              Ya().mark(function N(P, I, O) {
                var X;
                return Ya().wrap(function (G) {
                  for (;;)
                    switch ((G.prev = G.next)) {
                      case 0:
                        P &&
                          P.byteLength > 0 &&
                          ((X = b.timeRange[O.index].range) &&
                            O.range[1] >= X[1] &&
                            !I &&
                            (I = !0),
                          b.log(
                            "[mp4.loadFragment onprogressDataArrive ] receive data, >>> index,",
                            O.index,
                            ",range,",
                            JSON.stringify(O.range),
                            ", dataLen,",
                            P.byteLength
                          ),
                          b._mux(P, O.range[0], O.index, I)),
                          I &&
                            ((b.timeRange[O.index].downloaded = !0),
                            (b.bufferLoadedPos = -1),
                            b.log(
                              "[FragLoadDowned],fragmentIdx,",
                              O.index,
                              ",rangeEnd,",
                              O.range[1]
                            ));
                      case 2:
                      case "end":
                        return G.stop();
                    }
                }, N);
              })
            );
            return function (N, P, I) {
              return $.apply(this, arguments);
            };
          })()
        ),
        (b.timeRecord = {
          startMuxTime: -1,
          startLoadTime: -1,
          newMP4Time: Kr.nowTime(),
          startLoadMetaTime: -1,
        }),
        (b.url = p),
        (b.backUrl = w || []),
        (b._bitRate = g),
        (b.options = f.getDefaultConfig()),
        Object.keys(y).map(function ($) {
          y[$] !== void 0 && y[$] !== null && (b.options[$] = y[$]);
        }),
        (b.timeRange = []),
        (b.firstFrameTime = k || {}),
        (b._logTag = D || ""),
        (b.CHUNK_SIZE = Gat(y.duration, b.options.chunkSize, y.fileSize)),
        (b.player = v),
        (b.bufferLoaded = new Uint8Array(0)),
        (b.bufferLoadedPos = 0),
        (b.meta = null),
        (b.preloadCache = null),
        (b.videoTrak = null),
        (b.audioTrak = null),
        (b.canDownload = !0),
        (b._loadSuccessCallBack = null),
        (b._isPending = !1),
        (b._metaLoading = !1),
        (b.MP4Loader = new xat(
          kf(
            kf(
              {
                segmentDuration: y.segmentDuration,
                url: p,
                vid: y.vid + "-" + g,
                retry: y.retryCount || 2,
                retryDelay: y.retryDelay || 1e3,
                timeout: 3e3,
              },
              y.reqOptions
            ),
            {},
            { openLog: MC() }
          )
        )),
        (b.MP4Demuxer = null),
        (b.FMP4Remuxer = null),
        (b._needInitSegment = !0),
        (b._bitRateInfoMap = new Map()),
        (b._switchBitRate = !1),
        (b._segmentToBitRateMap = new Map()),
        (b.useEME = !1),
        (b.kidValue = null),
        (b.enableWorker =
          y.enableWorker && (y.codecType !== "h265" || y.supportHevc)),
        b.enableWorker && typeof Worker < "u")
      )
        try {
          (b.workerSequence = 0),
            (b.transmuxerWorkerControl = new RWr({
              id: b.workerSequence,
              codecType: y.codecType,
              supportHevc: b.options.supportHevc,
              openLog: MC(),
            })),
            b.transmuxerWorkerControl.on("transmux", function ($) {
              var N = $.args;
              b.log(
                "[transmuxerworker end] ,range, ",
                JSON.stringify(N.range),
                ",dataLen,",
                N.buffer.byteLength,
                N.context
              ),
                b.firstFrameTime.firstmux < 0 &&
                  b.timeRecord.startMuxTime > 0 &&
                  (b.firstFrameTime.firstmux =
                    Kr.nowTime() - b.timeRecord.startMuxTime),
                b._loadSuccessCallBack && b._loadSuccessCallBack(N);
            });
        } catch ($) {
          b.log("Error in worker:", $),
            (b.enableWorker = !1),
            (b.transmuxerWorkerControl = null);
        }
      return (
        b.enableWorker || ((b.MP4Demuxer = null), (b.FMP4Remuxer = null)),
        (b.seekTime = -1),
        b
      );
    }
    return (
      Xh(
        f,
        [
          {
            key: "changeBitRate",
            value:
              ((d = Eu(
                Ya().mark(function p(g) {
                  return Ya().wrap(
                    function (y) {
                      for (;;)
                        switch ((y.prev = y.next)) {
                          case 0:
                            if (g.bitrate === this._bitRate) {
                              y.next = 9;
                              break;
                            }
                            return (
                              (this.url = g.url),
                              (this._bitRate = g.bitrate),
                              (this.backUrl = g.backupURL),
                              (y.next = 6),
                              this.MP4Loader.changeUrl(
                                this.url,
                                this.options.vid + "-" + this._bitRate,
                                this.CHUNK_SIZE
                              )
                            );
                          case 6:
                            this.emit(qs.CHANGE_URL, this.url),
                              (this._switchBitRate = !0),
                              this.log(
                                "[switchBitrate] changeUrl, bitRate,",
                                this._bitRate,
                                this.url
                              );
                          case 9:
                          case "end":
                            return y.stop();
                        }
                    },
                    p,
                    this
                  );
                })
              )),
              function (p) {
                return d.apply(this, arguments);
              }),
          },
          {
            key: "_getByPreload",
            value: function (p, g, y, v) {
              try {
                if (p && p.byteLength >= g) {
                  var b = {
                    endTime: new Date().getTime(),
                    startTime: new Date().getTime(),
                    index: v,
                    range: [],
                    vid: this.options.vid,
                    from: "local",
                  };
                  if (y <= p.byteLength) {
                    var w = p.slice(g, y);
                    return (
                      (b.range = [g, y]),
                      (b.state = !0),
                      { buffer: w, context: b, state: !0 }
                    );
                  }
                  var k = p.byteLength - 1,
                    D = p.slice(g, k);
                  return (
                    (b.range = [g, k]), { context: b, buffer: D, state: !1 }
                  );
                }
                return null;
              } catch ($) {
                return console.error("[MP4] _getByPreload", g, y, $), null;
              }
            },
          },
          {
            key: "log",
            value: function (p) {
              for (
                var g = this.options,
                  y =
                    g && g.vid
                      ? "[MP4]"
                          .concat(this._logTag, " ")
                          .concat(g.vid, " ")
                          .concat(p)
                      : "[MP4]".concat(this._logTag, " ").concat(p),
                  v = arguments.length,
                  b = new Array(v > 1 ? v - 1 : 0),
                  w = 1;
                w < v;
                w++
              )
                b[w - 1] = arguments[w];
              ks.apply(void 0, [y].concat(b));
            },
          },
          {
            key: "errorHandler",
            value:
              ((c = Eu(
                Ya().mark(function p(g, y) {
                  var v,
                    b,
                    w,
                    k,
                    D,
                    $,
                    N,
                    P,
                    I,
                    O = arguments;
                  return Ya().wrap(
                    function (X) {
                      for (;;)
                        switch ((X.prev = X.next)) {
                          case 0:
                            if (
                              ((v =
                                O.length > 2 && O[2] !== void 0 ? O[2] : {}),
                              (b = g.response),
                              (w = g.message),
                              (k = this.options ? this.options.vid : ""),
                              (D = null),
                              (this._isPending = !0),
                              !b)
                            ) {
                              X.next = 33;
                              break;
                            }
                            if (
                              (($ = EWr(b.headers)),
                              (D = new Aat("network", b.status, {
                                httpText: b.httpText,
                                message: w,
                                url: b.url,
                                headers: $,
                              })),
                              console.log(
                                "[MP4] ["
                                  .concat(k, "] errorHandler error state:[")
                                  .concat(y, "], _isPending:[")
                                  .concat(this._isPending, "] "),
                                D
                              ),
                              !(this.backUrl && this.backUrl.length > 0))
                            ) {
                              X.next = 29;
                              break;
                            }
                            if (
                              (console.log(
                                "[MP4] [".concat(
                                  k,
                                  "] errorHandler start backUpUrl retry"
                                ),
                                this.backUrl.length,
                                this.backUrl
                              ),
                              (N = this.backUrl.shift()),
                              this.update(N),
                              (this._isPending = !1),
                              !this.MP4Loader)
                            ) {
                              X.next = 18;
                              break;
                            }
                            return (
                              (X.next = 17),
                              this.MP4Loader.changeUrl(
                                this.url,
                                this.url + "-" + this._bitRate,
                                this.CHUNK_SIZE
                              )
                            );
                          case 17:
                            this.emit(qs.CHANGE_URL, this.url);
                          case 18:
                            if (
                              (this.emit(qs.TASK_PROGRESS, {
                                type: "error",
                                error: g,
                              }),
                              y !== "getMetaInfo")
                            ) {
                              X.next = 24;
                              break;
                            }
                            return this.getMetaInfo(), X.abrupt("return");
                          case 24:
                            if (y !== "loadFragment") {
                              X.next = 29;
                              break;
                            }
                            if (((P = v.index), (I = v.range), !P || !I)) {
                              X.next = 29;
                              break;
                            }
                            return this.loadFragment(P, I), X.abrupt("return");
                          case 29:
                            console.log(
                              "[MP4] [".concat(
                                k,
                                "] errorHandler backUpUrl is null emit error"
                              )
                            ),
                              this.emit(qs.ERROR, D),
                              (X.next = 36);
                            break;
                          case 33:
                            console.log(
                              "[MP4] [".concat(k, "] errorHandler,"),
                              g
                            ),
                              (D = g),
                              this.emit(qs.ERROR, D);
                          case 36:
                          case "end":
                            return X.stop();
                        }
                    },
                    p,
                    this
                  );
                })
              )),
              function (p, g) {
                return c.apply(this, arguments);
              }),
          },
          {
            key: "init",
            value:
              ((u = Eu(
                Ya().mark(function p(g) {
                  var y, v, b, w, k, D, $, N;
                  return Ya().wrap(
                    function (P) {
                      for (;;)
                        switch ((P.prev = P.next)) {
                          case 0:
                            if (!this.url) {
                              P.next = 3;
                              break;
                            }
                            return (
                              (P.next = 3),
                              this.MP4Loader.changeUrl(
                                this.url,
                                this.options.vid + "-" + this._bitRate,
                                this.CHUNK_SIZE
                              )
                            );
                          case 3:
                            if (
                              (this.emit(qs.CHANGE_URL, this.url),
                              (this.meta = null),
                              (y = g.meta),
                              (v = g.mediaSegList),
                              (b = g.buffer),
                              (w = g.fileSize),
                              (k = g.initSeg),
                              (D = g.bitrate),
                              !y || !y.ext)
                            ) {
                              P.next = 21;
                              break;
                            }
                            (this.meta = y),
                              (this._bitRate = D),
                              (this.videoTrak = y.ext.videoTrak),
                              (this.audioTrak = y.ext.audioTrak),
                              (this.timeRange = this.getTimeRange()),
                              v
                                ? (this.preloadCache = {
                                    segList: v || [],
                                    initSeg: k,
                                  })
                                : b &&
                                  ((this.size = w), (this.bufferLoaded = b)),
                              ($ = {
                                meta: y,
                                videoSegments: y.ext.videoTrak,
                                audioSegments: y.ext.audioTrak,
                                bufferLoaded: b || null,
                              }),
                              this._bitRateInfoMap.set(this._bitRate, $),
                              (N = new Date().getTime()),
                              setTimeout(function () {
                                console.log(
                                  ">>>>metaReady setTimeout",
                                  new Date().getTime() - N
                                );
                              }),
                              console.log(">>>>metaReady", Kr.nowTime()),
                              this.emit(qs.META_READY, this.meta),
                              (P.next = 23);
                            break;
                          case 21:
                            return (P.next = 23), this.getMetaInfo();
                          case 23:
                          case "end":
                            return P.stop();
                        }
                    },
                    p,
                    this
                  );
                })
              )),
              function (p) {
                return u.apply(this, arguments);
              }),
          },
          {
            key: "getTimeRange",
            value: function () {
              for (
                var p = [], g = null, y = 0;
                this.videoTrak && y < this.videoTrak.length;
                y++
              )
                (g = {
                  startTime: this.videoTrak[y].startTime,
                  endTime: this.videoTrak[y].endTime,
                  downloaded: !1,
                  isLoading: !1,
                }),
                  p.push(g);
              if (this.audioTrak && this.audioTrak.length > p.length)
                for (var v = p.length; v < this.audioTrak.length; v++)
                  (g = {
                    startTime: Math.max(
                      this.audioTrak[v].startTime,
                      g ? g.endTime : 0
                    ),
                    endTime: Math.max(
                      this.audioTrak[v].endTime,
                      g ? g.endTime : 0
                    ),
                    downloaded: !1,
                    isLoading: !1,
                  }),
                    p.push(g);
              return p;
            },
          },
          {
            key: "getMetaInfo",
            value:
              ((l = Eu(
                Ya().mark(function p() {
                  var g,
                    y,
                    v,
                    b,
                    w = this,
                    k = arguments;
                  return Ya().wrap(
                    function (D) {
                      for (;;)
                        switch ((D.prev = D.next)) {
                          case 0:
                            return (
                              (g = !(k.length > 0 && k[0] !== void 0) || k[0]),
                              (D.prev = 1),
                              (y = Kr.nowTime()),
                              (this._metaLoading = !0),
                              this.log(
                                "getMetaInfo start, bitRate,",
                                this._bitRate
                              ),
                              (this.bufferLoaded = new Uint8Array(0)),
                              (v = 0),
                              (b = (function () {
                                var $ = Eu(
                                  Ya().mark(function N(P, I, O, X) {
                                    var G, H;
                                    return Ya().wrap(function (E) {
                                      for (;;)
                                        switch ((E.prev = E.next)) {
                                          case 0:
                                            if (
                                              (w.log(
                                                "getMetaInfo onProgressHandle, dataLen,",
                                                P ? P.byteLength : -1,
                                                ", state,",
                                                I,
                                                ",range,",
                                                JSON.stringify(O.range)
                                              ),
                                              !X)
                                            ) {
                                              E.next = 7;
                                              break;
                                            }
                                            return (
                                              (E.next = 4), w.cancelLoading()
                                            );
                                          case 4:
                                            return (
                                              (G = new r3e(
                                                g0.demux,
                                                Rc.metaError,
                                                { msg: JSON.stringify(X) }
                                              )),
                                              w.errorHandler(G, "getMetaInfo"),
                                              E.abrupt("return")
                                            );
                                          case 7:
                                            P &&
                                              O.range[0] === v &&
                                              ((w.bufferLoaded = Xk(
                                                Uint8Array,
                                                w.bufferLoaded,
                                                new Uint8Array(P)
                                              )),
                                              (v += P.byteLength)),
                                              O.meta &&
                                                !w.meta &&
                                                ((w.firstFrameTime.metaload =
                                                  Kr.nowTime() - y),
                                                (H = O.meta),
                                                (w.videoTrak = H.videoSegments),
                                                (w.audioTrak = H.audioSegments),
                                                (w.timeRange =
                                                  w.getTimeRange()),
                                                (w.meta = kf(
                                                  kf({}, H.meta),
                                                  {},
                                                  {
                                                    ext: {
                                                      videoTrak: w.videoTrak,
                                                      audioTrak: w.audioTrak,
                                                    },
                                                  }
                                                )),
                                                (H.bufferLoaded =
                                                  w.bufferLoaded),
                                                w._bitRateInfoMap.set(
                                                  w._bitRate,
                                                  H
                                                ),
                                                w.log(
                                                  "meta reach, bitRate,",
                                                  w._bitRate
                                                ),
                                                g &&
                                                  w.emit(
                                                    qs.META_READY,
                                                    w.meta
                                                  )),
                                              w.meta &&
                                                I &&
                                                (w.log("[getMetaInfo req end]"),
                                                (w._metaLoading = !1)),
                                              w.meta &&
                                                (P || I) &&
                                                (w.log(
                                                  "emit moov_req_progress"
                                                ),
                                                w.emit(qs.MOOV_REQ_PROGRESS));
                                          case 11:
                                          case "end":
                                            return E.stop();
                                        }
                                    }, N);
                                  })
                                );
                                return function (N, P, I, O) {
                                  return $.apply(this, arguments);
                                };
                              })()),
                              (D.next = 10),
                              this.MP4Loader.loadMetaProcess(
                                this.MP4Loader.cache,
                                [0, this.CHUNK_SIZE],
                                b
                              )
                            );
                          case 10:
                            D.next = 16;
                            break;
                          case 12:
                            (D.prev = 12),
                              (D.t0 = D.catch(1)),
                              console.error(
                                "[MP4] trigger errorHandler getMetaInfo",
                                D.t0
                              ),
                              this.errorHandler(D.t0, "getMetaInfo");
                          case 16:
                          case "end":
                            return D.stop();
                        }
                    },
                    p,
                    this,
                    [[1, 12]]
                  );
                })
              )),
              function () {
                return l.apply(this, arguments);
              }),
          },
          {
            key: "getFragmentIdx",
            value: function (p) {
              var g, y;
              if (this.videoTrak.length) {
                if (
                  ((g = this.videoTrak.find(function (b) {
                    return b.startTime <= p && b.endTime > p;
                  })),
                  (y = this.audioTrak.find(function (b) {
                    return b.startTime <= p && b.endTime > p;
                  })),
                  g && y)
                )
                  return Math.min(g.index, y.index);
                if (g || y) return g ? g.index : y.index;
                var v = Number.MAX_VALUE;
                return (
                  this.videoTrak &&
                    this.videoTrak.length > 0 &&
                    (v = this.videoTrak.length - 1),
                  this.audioTrak &&
                    this.audioTrak.length > 0 &&
                    (v = Math.min(this.audioTrak.length - 1, v)),
                  v
                );
              }
              return (y = this.audioTrak.find(function (b) {
                return b.startTime <= p && b.endTime > p;
              }))
                ? y.index
                : 0;
            },
          },
          {
            key: "_checkHasMeta",
            value:
              ((o = Eu(
                Ya().mark(function p() {
                  var g, y;
                  return Ya().wrap(
                    function (v) {
                      for (;;)
                        switch ((v.prev = v.next)) {
                          case 0:
                            if ((g = this._bitRateInfoMap.get(this._bitRate))) {
                              v.next = 19;
                              break;
                            }
                            return (
                              this.log(
                                "[ABR], need load InitSegment, bitRate, ",
                                this._bitRate
                              ),
                              (this._metaLoading = !0),
                              (v.next = 6),
                              this.MP4Loader.loadMeta(
                                this.MP4Loader.cache,
                                Math.round(this.CHUNK_SIZE / 2)
                              )
                            );
                          case 6:
                            return (
                              (y = v.sent),
                              (this._metaLoading = !1),
                              (this.videoTrak = y.videoSegments),
                              (this.audioTrak = y.audioSegments),
                              (this.meta = kf(
                                kf({}, y.meta),
                                {},
                                {
                                  ext: {
                                    videoTrak: this.videoTrak,
                                    audioTrak: this.audioTrak,
                                  },
                                }
                              )),
                              this.emit(qs.UPDATEEME, this.meta),
                              (this.timeRange = this.getTimeRange()),
                              (this.bufferLoaded = new Uint8Array(0)),
                              (y.bufferLoaded = this.bufferLoaded),
                              this._bitRateInfoMap.set(this._bitRate, y),
                              v.abrupt("return", !0)
                            );
                          case 19:
                            return (
                              this.log(
                                "[ABR], not need load InitSegment, bitRate, ",
                                this._bitRate
                              ),
                              (this.videoTrak = g.videoSegments),
                              (this.audioTrak = g.audioSegments),
                              (this.meta = g.meta),
                              this.emit(qs.UPDATEEME, this.meta),
                              (this.timeRange = this.getTimeRange()),
                              (this.bufferLoaded = new Uint8Array(0)),
                              v.abrupt("return", !0)
                            );
                          case 27:
                          case "end":
                            return v.stop();
                        }
                    },
                    p,
                    this
                  );
                })
              )),
              function () {
                return o.apply(this, arguments);
              }),
          },
          {
            key: "resetFragmentLoadState",
            value: function (p) {
              for (var g = 0; g < this.timeRange.length; g++)
                g < p
                  ? ((this.timeRange[g].downloaded = !0),
                    (this.timeRange[g].isLoading = !0))
                  : ((this.timeRange[g].downloaded = !1),
                    (this.timeRange[g].isLoading = !1));
            },
          },
          {
            key: "getFragRange",
            value: function (p) {
              var g,
                y,
                v,
                b,
                w = null;
              this.videoTrak &&
                (w =
                  p < this.videoTrak.length
                    ? this.videoTrak[p]
                    : this.videoTrak[this.videoTrak.length - 1]);
              var k = null;
              this.audioTrak &&
                (k =
                  p < this.audioTrak.length
                    ? this.audioTrak[p]
                    : this.audioTrak[this.audioTrak.length - 1]);
              var D = 0,
                $ = 0;
              this.videoTrak && p >= this.videoTrak.length - 1 && (D = -1),
                this.audioTrak && p >= this.audioTrak.length - 1 && ($ = -1);
              var N = [
                Math.min(
                  ((g = w) === null || g === void 0 ? void 0 : g.range[0]) ||
                    1 / 0,
                  ((y = k) === null || y === void 0 ? void 0 : y.range[0]) ||
                    1 / 0
                ),
                Math.max(
                  ((v = w) === null || v === void 0 ? void 0 : v.range[1]) +
                    D || 0,
                  ((b = k) === null || b === void 0 ? void 0 : b.range[1]) +
                    $ || 0
                ),
              ];
              return (
                p < this.timeRange.length && (this.timeRange[p].range = N), N
              );
            },
          },
          {
            key: "load",
            value:
              ((i = Eu(
                Ya().mark(function p(g, y) {
                  var v, b, w, k;
                  return Ya().wrap(
                    function (D) {
                      for (;;)
                        switch ((D.prev = D.next)) {
                          case 0:
                            if (
                              ((this._loadSuccessCallBack = y),
                              !this._switchBitRate || this._metaLoading)
                            ) {
                              D.next = 11;
                              break;
                            }
                            return (
                              this.log(
                                "[switchBitrate], switch bitRate start load, bitRate,",
                                this._bitRate,
                                ", time,",
                                g >= this.videoTrak.length
                                  ? this.audioTrak[g].startTime
                                  : this.videoTrak[g].startTime,
                                ", fragIndex,",
                                g
                              ),
                              (D.next = 5),
                              this._checkHasMeta()
                            );
                          case 5:
                            (v = D.sent),
                              this.resetFragmentLoadState(g),
                              this.log(
                                "[switchBitrate], reset timerange state,",
                                g
                              ),
                              (this._needInitSegment = !0),
                              this.resetTansmuxer(),
                              v && (this._switchBitRate = !1);
                          case 11:
                            if (!this._switchBitRate || !this._metaLoading) {
                              D.next = 13;
                              break;
                            }
                            return D.abrupt("return");
                          case 13:
                            (b = this.getFragRange(g)),
                              (w = this.getFragmentFromCache(g, b))
                                ? (this.log(
                                    "[mp4.load], segment ,",
                                    g,
                                    "Data In Cache",
                                    JSON.stringify(b),
                                    ", needInit,",
                                    this._needInitSegment
                                  ),
                                  (this.timeRange[g].downloaded = !0),
                                  (this.timeRange[g].isLoading = !1),
                                  (this._needInitSegment = !1),
                                  this._loadSuccessCallBack &&
                                    this._loadSuccessCallBack(w))
                                : (this.log(
                                    "loadFragment,",
                                    g,
                                    ",bitRate,",
                                    this._bitRate,
                                    ",range,",
                                    JSON.stringify(b)
                                  ),
                                  this.seekTime > 0
                                    ? ((k = this.getSubRange(
                                        g,
                                        this.seekTime,
                                        b
                                      )),
                                      this.loadFragment(g, k),
                                      (this.seekTime = -1))
                                    : this.loadFragment(g, b));
                          case 16:
                          case "end":
                            return D.stop();
                        }
                    },
                    p,
                    this
                  );
                })
              )),
              function (p, g) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "getSubRange",
            value: function (p, g, y) {
              var v = y[0],
                b = y[0],
                w = 1,
                k = !1;
              if (
                (this.log(">>>>>getSubRange time,", g, JSON.stringify(y)),
                this.videoTrak)
              ) {
                var D =
                    p < this.videoTrak.length
                      ? this.videoTrak[p]
                      : this.videoTrak[this.videoTrak.length - 1],
                  $ = D.frames.filter(AWr),
                  N = this.meta.videoTimescale,
                  P = $[0].startTime / N;
                this.log(
                  ">>>>>getSubRange video, startTime,",
                  D.startTime,
                  ",endTime,",
                  D.endTime
                );
                for (var I = 0; I < $.length; I++)
                  this.log(
                    ">>>>>getSubRange video keyFrameList, startTime,",
                    $[I].startTime / N,
                    ",range,",
                    $[I].offset
                  );
                for (; w < $.length; w++) {
                  var O = $[w].startTime / N;
                  if (P <= g && g < O && y[0] < $[w - 1].offset) {
                    (v = $[w - 1].offset),
                      (k = !0),
                      this.log(
                        ">>>>>getSubRange video end, startTime,",
                        P,
                        ",endTime,",
                        O,
                        ",startRange,",
                        v,
                        ", keyFrameIndex,",
                        w - 1
                      );
                    break;
                  }
                  P = O;
                }
                !k &&
                  P <= g &&
                  g < D.endTime + 0.8 &&
                  ((v = $[w - 1].offset),
                  this.log(
                    ">>>>>getSubRange video last, startTime,",
                    P,
                    ",endTime,",
                    D.endTime,
                    ",startRange,",
                    v
                  ));
              }
              if (((w = 1), this.audioTrak)) {
                var X =
                    p < this.audioTrak.length
                      ? this.audioTrak[p]
                      : this.audioTrak[this.audioTrak.length - 1],
                  G = X.frames,
                  H = this.meta.audioTimescale;
                w = Math.floor((g * H - G[0].startTime) / X.frames[0].duration);
                for (
                  var E =
                    (w = Math.min(G.length - 1, w)) > 0
                      ? G[w - 1].startTime / H
                      : G[0].startTime / H;
                  w >= 0 && w < G.length;

                )
                  if (w > 0 && E > g) E = G[(w -= 1)].startTime / H;
                  else {
                    var S = (G[w].startTime + G[w].duration) / H;
                    if (E <= g && g < S && y[0] < G[w].offset) {
                      (b = G[w].offset),
                        (k = !0),
                        this.log(
                          ">>>>>getSubRange audio end, startTime,",
                          E,
                          ",endTime,",
                          S,
                          ",startRange,",
                          b,
                          ", index,",
                          w
                        );
                      break;
                    }
                    (E = S), w++;
                  }
              }
              var L = [Math.min(b, v), y[1]];
              return (
                this.log(
                  ">>>>>getSubRange finalRange ",
                  JSON.stringify(L),
                  ",oldRange,",
                  JSON.stringify(y)
                ),
                L
              );
            },
          },
          {
            key: "getFragmentFromCache",
            value: function (p, g) {
              var y = this.preloadCache;
              if (!y || !y.segList) return null;
              for (
                var v = -1, b = y.segList, w = y.initSeg, k = 0;
                k < b.length;
                k++
              )
                if (b[k].index === p) {
                  v = k;
                  break;
                }
              if (v < 0) return null;
              var D = b[v];
              if (
                (console.log(
                  ">>>>preloadCache",
                  v,
                  D,
                  D.range,
                  g[1],
                  D.range[1] >= g[1]
                ),
                D.range[1] >= g[1])
              ) {
                var $ = [
                  this.timeRange[p].startTime,
                  this.timeRange[p].endTime,
                ];
                return {
                  buffer: D.buffer,
                  range: g,
                  context: {
                    range: g,
                    fragIndex: p,
                    state: !0,
                    timeRange: [$[0], $[1]],
                  },
                  state: !0,
                  initSeg: this._needInitSegment ? w : void 0,
                };
              }
              return null;
            },
          },
          {
            key: "_mux",
            value: function (p, g, y, v) {
              this.firstFrameTime.firstmux < 0 &&
                this.timeRecord.startMuxTime < 0 &&
                ((this.timeRecord.startMuxTime = Kr.nowTime()),
                (this.firstFrameTime.startMuxTime =
                  Kr.nowTime() - this.timeRecord.startLoadTime));
              var b = this.getSamplesRange(y, "video"),
                w = this.getSamplesRange(y, "audio"),
                k = [g, g + p.byteLength];
              if (this.transmuxerWorkerControl) {
                var D = { range: k, state: v, fragIndex: y };
                this.log(
                  "[transmuxerworker start] ,range, ",
                  JSON.stringify(k),
                  ",dataLen,",
                  p.byteLength,
                  D
                ),
                  this.transmuxerWorkerControl.transmux(
                    this.workerSequence,
                    p,
                    g,
                    b,
                    w,
                    this.meta.moov,
                    this.useEME,
                    this.kidValue,
                    D
                  );
              } else
                try {
                  this.MP4Demuxer ||
                    (this.MP4Demuxer = new hjr(
                      this.videoTrak,
                      this.audioTrak,
                      null,
                      { openLog: MC() }
                    ));
                  var $,
                    N = this.MP4Demuxer.demuxPart(
                      p,
                      g,
                      b,
                      w,
                      this.meta.moov,
                      this.useEME,
                      this.kidValue
                    );
                  this.FMP4Remuxer ||
                    (this.checkCodecH265() && !this.options.supportHevc) ||
                    (this.FMP4Remuxer = new djr(
                      this.MP4Demuxer.videoTrack,
                      this.MP4Demuxer.audioTrack,
                      { openLog: MC() }
                    )),
                    this.log(
                      "[mux], videoTimeRange,",
                      N.videoTrack
                        ? [N.videoTrack.startPts, N.videoTrack.endPts]
                        : null,
                      ",audioTimeRange,",
                      N.audioTrack
                        ? [N.audioTrack.startPts, N.audioTrack.endPts]
                        : null
                    );
                  var P = [
                    Math.min(N.videoTrack.startPts, N.audioTrack.startPts),
                    Math.max(N.videoTrack.endPts, N.audioTrack.endPts),
                  ];
                  if (this.FMP4Remuxer) {
                    var I = this.FMP4Remuxer.remux(this._needInitSegment, {
                      initMerge: !0,
                      range: k,
                    });
                    I.initSegment && (this._needInitSegment = !1),
                      ($ = {
                        buffer: Kr.concatData(I.audioSegment, I.videoSegment),
                        range: k,
                        state: v,
                        context: { range: k, fragIndex: y, timeRange: P },
                        initSeg: I.initSegment,
                      });
                  } else
                    $ = {
                      videoTrack: N.videoTrack,
                      audioTrack: N.audioTrack,
                      buffer: null,
                      range: k,
                      state: v,
                      context: { range: k, fragIndex: y, timeRange: P },
                    };
                  this.firstFrameTime.firstmux < 0 &&
                    this.timeRecord.startMuxTime > 0 &&
                    (this.firstFrameTime.firstmux =
                      Kr.nowTime() - this.timeRecord.startMuxTime),
                    this._loadSuccessCallBack && this._loadSuccessCallBack($);
                } catch (X) {
                  console.error("mux err:", X);
                  var O = new r3e(g0.remux, Rc.muxError, {
                    msg: JSON.stringify(X),
                  });
                  this.errorHandler(O, "mux", {
                    fragIndex: y,
                    range: [g, g + p.byteLength],
                  });
                }
            },
          },
          {
            key: "getSamplesRange",
            value: function (p, g) {
              var y = [];
              switch (g) {
                case "video":
                  if (this.videoTrak && p < this.videoTrak.length) {
                    var v = this.videoTrak[p].frames;
                    y.push(v[0].index), y.push(v[v.length - 1].index);
                  }
                  break;
                case "audio":
                  if (this.audioTrak && p < this.audioTrak.length) {
                    var b = this.audioTrak[p].frames;
                    y.push(b[0].index), y.push(b[b.length - 1].index);
                  }
                  break;
                default:
                  console.warn("[getSamplesRange] type ", g, " is invalid");
              }
              return y;
            },
          },
          {
            key: "loadFragment",
            value:
              ((r = Eu(
                Ya().mark(function p(g, y) {
                  var v, b, w, k;
                  return Ya().wrap(
                    function (D) {
                      for (;;)
                        switch ((D.prev = D.next)) {
                          case 0:
                            if (
                              !this._isPending &&
                              y !== [0, 0] &&
                              !this.timeRange[g].isLoading
                            ) {
                              D.next = 2;
                              break;
                            }
                            return D.abrupt("return");
                          case 2:
                            if (
                              (this.log(
                                "[MP4.loadFragment] ,fragIndex,",
                                g,
                                ",range ",
                                y,
                                ",len ,",
                                y[1] - y[0],
                                ", bufferLoaded_Len,",
                                this.bufferLoaded.byteLength
                              ),
                              this._segmentToBitRateMap.set(g, this._bitRate),
                              this.timeRecord.startLoadTime < 0 &&
                                (this.timeRecord.startLoadTime = Kr.nowTime()),
                              !(
                                y.length >= 2 &&
                                y[1] &&
                                y[1] > 0 &&
                                y[1] <= this.bufferLoaded.byteLength
                              ))
                            ) {
                              D.next = 15;
                              break;
                            }
                            (this.timeRange[g].isLoading = !0),
                              (v = Math.max(y[0], this.bufferLoadedPos)),
                              (b = new Uint8Array(
                                this.bufferLoaded.slice(v, y[1])
                              )),
                              this.log(
                                "[mp4.loadFragment] has all data: ",
                                v,
                                y[1]
                              ),
                              (this.timeRange[g].downloaded = !0),
                              (this.bufferLoadedPos = -1),
                              this._mux(b, v, g, !0),
                              (D.next = 38);
                            break;
                          case 15:
                            if (
                              !(
                                y.length >= 2 &&
                                y[0] &&
                                y[0] <= this.bufferLoaded.byteLength
                              )
                            ) {
                              D.next = 27;
                              break;
                            }
                            if (this.timeRange[g].isLoading) {
                              D.next = 25;
                              break;
                            }
                            if (
                              ((w = Math.max(y[0], this.bufferLoadedPos)),
                              !(
                                (k = new Uint8Array(
                                  this.bufferLoaded.slice(w, y[1])
                                )).byteLength > 0
                              ))
                            ) {
                              D.next = 24;
                              break;
                            }
                            return (
                              (this.bufferLoadedPos = w + k.byteLength),
                              this.log(
                                "[mp4.loadFragment] has part data: ",
                                w,
                                w + k.byteLength
                              ),
                              this._mux(k, w, g, y[1] <= this.bufferLoadedPos),
                              D.abrupt("return")
                            );
                          case 24:
                            if (
                              !this._metaLoading &&
                              !this.timeRange[g].isLoading
                            )
                              try {
                                this.log(
                                  "[mp4.loadFragment] ready to load part data >>> ",
                                  this.bufferLoaded.byteLength,
                                  y[1]
                                ),
                                  (this.timeRange[g].isLoading = !0),
                                  this.MP4Loader.loadData(
                                    [this.bufferLoaded.byteLength, y[1]],
                                    this.MP4Loader.cache,
                                    {
                                      index: g,
                                      onProgress: this.onprogressDataArrive,
                                      onProcessMinLen:
                                        this.options.onProcessMinLen,
                                    }
                                  );
                              } catch ($) {
                                this.errorHandler($, "MP4Loader.loadData", {
                                  range: [this.bufferLoaded.byteLength, y[1]],
                                  fragIndex: g,
                                });
                              }
                          case 25:
                            D.next = 38;
                            break;
                          case 27:
                            if (
                              (this._metaLoading &&
                                !(y[0] >= this.CHUNK_SIZE)) ||
                              this.timeRange[g].isLoading
                            ) {
                              D.next = 38;
                              break;
                            }
                            return (
                              (this.timeRange[g].isLoading = !0),
                              this.log(
                                "[mp4.loadFragment],ready to load all data ,segmentIdx, ",
                                g,
                                ",range >>> ",
                                JSON.stringify(y)
                              ),
                              (D.prev = 30),
                              (D.next = 33),
                              this.MP4Loader.loadData(y, this.MP4Loader.cache, {
                                index: g,
                                onProgress: this.onprogressDataArrive,
                                onProcessMinLen: this.options.onProcessMinLen,
                              })
                            );
                          case 33:
                            D.next = 38;
                            break;
                          case 35:
                            (D.prev = 35),
                              (D.t0 = D.catch(30)),
                              this.errorHandler(D.t0, "MP4Loader.loadData", {
                                range: y,
                                fragIndex: g,
                              });
                          case 38:
                          case "end":
                            return D.stop();
                        }
                    },
                    p,
                    this,
                    [[30, 35]]
                  );
                })
              )),
              function (p, g) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "loadAllFragmentData",
            value:
              ((n = Eu(
                Ya().mark(function p(g, y, v) {
                  var b, w, k;
                  return Ya().wrap(
                    function (D) {
                      for (;;)
                        switch ((D.prev = D.next)) {
                          case 0:
                            if (!this.hasDestroyed) {
                              D.next = 2;
                              break;
                            }
                            return D.abrupt("return");
                          case 2:
                            return (
                              (b = this.getFragRange(g)),
                              (D.prev = 3),
                              (D.next = 6),
                              this.MP4Loader.loadData(b, this.MP4Loader.cache, {
                                index: g,
                              })
                            );
                          case 6:
                            if (
                              ((w = D.sent),
                              this.log(
                                "loadAllFragmentData after",
                                JSON.stringify(b),
                                w
                              ),
                              w && w.data)
                            ) {
                              D.next = 11;
                              break;
                            }
                            return (
                              v(new Error("response null")), D.abrupt("return")
                            );
                          case 11:
                            (k = w.data),
                              (this._loadSuccessCallBack = y),
                              this._mux(k, b[0], g, !0),
                              (D.next = 20);
                            break;
                          case 16:
                            (D.prev = 16),
                              (D.t0 = D.catch(3)),
                              console.error(
                                "[MP4] loadAllFragmentData error",
                                D.t0
                              ),
                              v(D.t0);
                          case 20:
                          case "end":
                            return D.stop();
                        }
                    },
                    p,
                    this,
                    [[3, 16]]
                  );
                })
              )),
              function (p, g, y) {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "cancelLoading",
            value:
              ((e = Eu(
                Ya().mark(function p() {
                  return Ya().wrap(
                    function (g) {
                      for (;;)
                        switch ((g.prev = g.next)) {
                          case 0:
                            return (g.next = 2), this.MP4Loader;
                          case 2:
                            if (((g.t0 = g.sent), !g.t0)) {
                              g.next = 5;
                              break;
                            }
                            this.MP4Loader.cancel();
                          case 5:
                          case "end":
                            return g.stop();
                        }
                    },
                    p,
                    this
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "update",
            value: function (p) {
              this.url = p;
            },
          },
          {
            key: "getDataBitRate",
            value: function (p) {
              return this._segmentToBitRateMap.get(p);
            },
          },
          {
            key: "checkCodecH265",
            value: function () {
              return (
                this.meta &&
                (this.meta.videoCodec.indexOf("hvc1") > -1 ||
                  this.meta.videoCodec.indexOf("hev1") > -1)
              );
            },
          },
          {
            key: "destroy",
            value: function () {
              this.hasDestroyed ||
                (this.resetTansmuxer(),
                this.transmuxerWorkerControl &&
                  this.transmuxerWorkerControl.destroy(),
                (this.size = 0),
                (this._isPending = !1),
                (this._metaLoading = !1),
                (this.bufferLoadedPos = 0),
                (this.bufferLoaded = new Uint8Array(0)),
                this._bitRateInfoMap.clear(),
                this._segmentToBitRateMap.clear(),
                this.MP4Loader &&
                  (this.MP4Loader.cancel(), this.MP4Loader.destroy()),
                (this.hasDestroyed = !0));
            },
          },
          {
            key: "resetTansmuxer",
            value: function () {
              this.MP4Demuxer && this.MP4Demuxer.reset(),
                (this.MP4Demuxer = null),
                this.FMP4Remuxer && this.FMP4Remuxer.reset(),
                (this.FMP4Remuxer = null),
                this.transmuxerWorkerControl &&
                  this.transmuxerWorkerControl.reset();
            },
          },
        ],
        [
          {
            key: "getDefaultConfig",
            value: function () {
              return {
                onProcessMinLen: 5120,
                xhrSetup: null,
                chunkSize: 8e5,
                loadSize: 800,
                isCache: !1,
                playerId: "",
                vid: "",
                ext: {},
              };
            },
          },
        ]
      ),
      f
    );
  })();
function AWr(t) {
  if (t.keyframe) return t;
}
var Np = (function () {
    function t() {
      var e, n;
      Hh(this, t);
      var r = new Promise(function (i, o) {
        (e = i), (n = o);
      });
      return (
        (r.resolve = function (i) {
          e(i), (r.state = "fulfilled");
        }),
        (r.reject = function (i) {
          n(i), (r.state = "rejected"), (r.isBreak = i === "DESTROYED");
        }),
        (r.state = "pending"),
        r
      );
    }
    return (
      Xh(t, [
        { key: "resolve", value: function (e) {} },
        { key: "reject", value: function (e) {} },
      ]),
      t
    );
  })(),
  wWr = Xh(function t() {
    var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
      n = e.url,
      r = e.method,
      i = r === void 0 ? "GET" : r,
      o = e.type,
      l = o === void 0 ? "arraybuffer" : o,
      u = e.data,
      c = u === void 0 ? {} : u;
    return (
      Hh(this, t),
      new Promise(function (d, h) {
        var f = new window.XMLHttpRequest(),
          p = i.toUpperCase(),
          g = [];
        if (
          (l && (f.responseType = l),
          Object.keys(c).map(function (y) {
            g.push("k=".concat(c[y]));
          }),
          p === "GET")
        )
          f.open(p, "".concat(n, "?").concat(g.join("&"))), f.send();
        else {
          if (p !== "POST")
            throw new Error("xhr ".concat(p, " is not supported"));
          f.open(p, n, !0),
            f.setRequestHeader("Content-Type", "application/json"),
            f.send(JSON.stringify(c));
        }
        (f.onload = function () {
          f.status === 200 || f.status === 206 ? d(f) : h(f);
        }),
          (f.onerror = function () {
            h(f);
          });
      })
    );
  });
function Fat(t, e, n) {
  var r = new Np();
  return (
    new wWr({
      type: "json",
      method: "POST",
      url: n,
      data: {
        drm_type: "22",
        license_request: [{ vid: t, kids: [].concat(e) }],
      },
    })
      .then(function (i) {
        var o = i.response;
        if (o) {
          var l = o.play_licenses[t][e];
          r.resolve(l);
        } else r.reject();
      })
      .catch(function () {
        r.reject();
      }),
    r
  );
}
function kWr() {
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "",
    e = arguments.length > 1 ? arguments[1] : void 0,
    n = arguments.length > 2 ? arguments[2] : void 0,
    r = arguments.length > 3 ? arguments[3] : void 0,
    i = new Np();
  if (n) {
    ks("[getKeyValue]>before openBox");
    var o = r.awManager.openBox(n);
    if ((ks("[getKeyValue]>after openBox: ", o), e)) {
      var l = { clearKeys: {} };
      (l.clearKeys[e] = o), i.resolve(l);
    } else i.resolve(o);
  } else {
    var u = Fat(t, e, r.config.getLicenseUrl);
    (u.id = "requestPromise"),
      r._addPendingPromise(u),
      u
        .then(function (c) {
          if ((r._removePendingPromise(u), r.awManager)) {
            ks("[getKeyValue]>before openBox");
            var d = r.awManager.openBox(c);
            ks("[getKeyValue]>after openBox: ", d);
            var h = { clearKeys: {} };
            (h.clearKeys[e] = d), i.resolve(h);
          } else i.reject({ errDes: "awManager not exist, player destroyed" }), ks("[getKeyValue]>awManager not exist, player destroyed");
        })
        .catch(function (c) {
          i.reject(c), ks("[getKeyValue]>requestPromise reject");
        });
  }
  return i;
}
var IWr = {
    playBtnClick: function (t, e, n, r) {
      t.paused || (t.waitingMoreBuffer && (t.waitingMoreBuffer = !1)),
        r.call(t, e, n);
    },
  },
  DWr = {
    waiting: function (t, e) {
      var n = t.player,
        r = t.eventName;
      (n.waitingMoreBuffer = !0), e(r, t);
    },
    play: function (t, e) {
      var n = t.player,
        r = t.eventName;
      n.waitingMoreBuffer || e(r, t);
    },
    pause: function (t, e) {
      var n = t.player,
        r = t.eventName;
      n.waitingMoreBuffer || e(r, t);
    },
    seeking: function (t, e) {
      var n = t.player,
        r = t.eventName;
      (n.isSeekingStart = !0), e(r, t);
    },
    progress: function (t, e) {
      ks(">>>>progress");
      var n = t.player,
        r = t.eventName;
      if (n.waitingMoreBuffer) {
        var i = n.getBufferedRange(n.buffered2);
        (i[0] === 0 && i[1] === 0) ||
          (n.inWaitingStart === void 0 || n.isSeekingStart
            ? (ks("progress 起播或seek结束"),
              i[1] - n.currentTime >= (n.config.canplayWaterLevel || 1) ||
              i[1] > n.duration - 1
                ? (ks("progress 出起播水位"), n.play())
                : (ks("progress 未出起播水位"), n.emit("waiting")))
            : (ks("progress video卡顿结束"),
              i[1] - n.currentTime >= (n.config.bufferWaterLevel || 5) ||
              i[1] > n.duration - 1
                ? (ks("progress 出卡顿水位"), n.play())
                : (ks("progress 未出卡顿水位"), n.emit("waiting"))));
      }
      e(r, t);
    },
    playing: function (t, e) {
      var n = t.player,
        r = t.eventName;
      ks("playing");
      var i = n.getBufferedRange(n.buffered2);
      if (i[0] === 0 && i[1] === 0)
        return (
          ks("playing 当前播放时刻没有缓存 未出水位"),
          (n.waitingMoreBuffer = !0),
          n.pause(),
          void e.call("waiting", t)
        );
      n.inWaitingStart === void 0 || n.isSeekingStart
        ? (ks("playing 起播或seek结束"),
          i[1] - n.currentTime >= (n.config.canplayWaterLevel || 1) ||
          i[1] > n.duration - 1
            ? (ks("playing 出起播水位"),
              (n.waitingMoreBuffer = !1),
              (n.isSeekingStart = !1),
              e(r, t))
            : (ks("playing 未出起播水位"),
              (n.waitingMoreBuffer = !0),
              n.pause(),
              e.call("waiting", t)))
        : (ks("playing video卡顿结束"),
          i[1] - n.currentTime >= (n.config.bufferWaterLevel || 5) ||
          i[1] > n.duration - 1
            ? (ks("playing 出卡顿水位"), (n.waitingMoreBuffer = !1), e(r, t))
            : (ks("playing 未出卡顿水位"),
              (n.waitingMoreBuffer = !0),
              n.pause(),
              e.call("waiting", t)));
    },
  };
function PWr(t, e, n, r) {
  t.once(r, function i() {
    t.off(e, n), t.off(r, i);
  });
}
function MWr(t, e, n, r) {
  r
    ? (t.on(e, n), PWr(t, e, n, r))
    : t.on(e, function (i) {
        n(i);
      });
}
var CWr = (function (t) {
    sP(n, Pl);
    var e = lP(n);
    function n(r) {
      var i;
      return (
        Hh(this, n),
        ((i = e.call(this)).drm = r),
        (i.KEYSYSTEM_TYPE = ""),
        (i.keys = {}),
        i.drm.clearKeys &&
          ((i.KEYSYSTEM_TYPE = "org.w3.clearkey"), (i.keys = i.drm.clearKeys)),
        (i.options = []),
        (i.ensurePromise = void 0),
        i
      );
    }
    return (
      Xh(n, [
        {
          key: "updateDrm",
          value: function (r) {
            (this.drm = r), (this.keys = this.drm.clearKeys);
          },
        },
        {
          key: "setOptions",
          value: function () {
            var r = [
                { contentType: 'video/mp4; codecs="avc1.42E01E"' },
                { contentType: 'video/webm; codecs="vp8"' },
              ],
              i = { videoCapabilities: r },
              o = {
                videoCapabilities: r,
                persistentState: "required",
                sessionTypes: ["persistent-license"],
              };
            this.options = [o, i];
          },
        },
        { key: "bail", value: function (r) {} },
        {
          key: "UpdateSessionFunc",
          value: function (r) {
            var i = this;
            return function (o) {
              var l = [],
                u = [];
              Object.keys(r).forEach(function (h) {
                var f = r[h],
                  p = Kr.fromHex(h),
                  g = Kr.fromHex(f),
                  y = {
                    kty: "oct",
                    kid: Kr.toBase64(p, !1),
                    k: Kr.toBase64(g, !1),
                  };
                l.push(y), u.push(y.kid);
              });
              var c = { keys: l },
                d = JSON.stringify(c);
              o.target
                .update(Kr.StringToArrayBuffer(d))
                .then(function () {}, i.bail(" MediaKeySession update failed"));
            };
          },
        },
        { key: "KeysChange", value: function (r) {} },
        {
          key: "EnsureMediaKeysCreated",
          value: function (r, i, o) {
            return (
              this.ensurePromise ||
                (this.ensurePromise = navigator
                  .requestMediaKeySystemAccess(i, o)
                  .then(function (l) {
                    return l.createMediaKeys();
                  }, this.bail(" Failed to request key system access."))
                  .then(function (l) {
                    return r.setMediaKeys(l);
                  }, this.bail(" failed to create MediaKeys object"))),
              this.ensurePromise
            );
          },
        },
        {
          key: "SetupEME",
          value: function (r, i) {
            var o = this;
            (r.sessions = []),
              MWr(this, "encrypted", function () {
                var l = JSON.stringify({
                    kids: ["0123456789abcdef0123456789abcdef"],
                  }),
                  u = new Uint8Array(Kr.toUTF8(l));
                o.EnsureMediaKeysCreated(r, o.KEYSYSTEM_TYPE, o.options)
                  .then(function () {
                    var c = r.mediaKeys.createSession();
                    return (
                      r.sessions.push(c),
                      c.addEventListener(
                        "message",
                        o.UpdateSessionFunc(o.keys)
                      ),
                      c.addEventListener("keystatuseschange", o.KeysChange),
                      c.generateRequest("keyids", u.buffer)
                    );
                  }, o.bail(" failed to ensure MediaKeys on HTMLMediaElement"))
                  .then(function () {}, o.bail(" Failed to generate request."));
              });
          },
        },
      ]),
      n
    );
  })(),
  $Wr = (function () {
    function t() {
      Hh(this, t), (this.queue = []);
    }
    return (
      Xh(t, [
        {
          key: "push",
          value: function (e) {
            this.queue.push(e);
          },
        },
        {
          key: "startup",
          value: function () {
            return Promise.all(this.queue);
          },
        },
        {
          key: "destroy",
          value: function () {
            this.queue = [];
          },
        },
      ]),
      t
    );
  })(),
  xWr = Di;
xWr(
  { target: "Array", proto: !0, forced: xre !== [].lastIndexOf },
  { lastIndexOf: xre }
);
var LWr = Di,
  OWr = aa,
  GWr = Sm,
  Uat = kb.f,
  Bat = Tl,
  NWr = OWr(function () {
    Uat(1);
  }),
  FWr = !Bat || NWr;
LWr(
  { target: "Object", stat: !0, forced: FWr, sham: !Bat },
  {
    getOwnPropertyDescriptor: function (t, e) {
      return Uat(GWr(t), e);
    },
  }
);
var UWr = Di,
  BWr = Tl,
  w3e = Cu.f;
UWr(
  {
    target: "Object",
    stat: !0,
    forced: Object.defineProperty !== w3e,
    sham: !BWr,
  },
  { defineProperty: w3e }
);
var HWr = OE;
HWr("Int8", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var XWr = OE;
XWr("Int16", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var VWr = OE;
VWr("Int32", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var zWr = OE;
zWr("Uint16", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var jWr = OE;
jWr("Uint32", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var WWr = OE;
WWr("Float64", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var KWr = Di,
  ZWr = aa,
  k3e = Math.imul,
  YWr = ZWr(function () {
    return k3e(4294967295, 5) != -5 || k3e.length != 2;
  });
KWr(
  { target: "Math", stat: !0, forced: YWr },
  {
    imul: function (t, e) {
      var n = 65535,
        r = +t,
        i = +e,
        o = n & r,
        l = n & i;
      return (
        0 |
        (o * l + ((((n & (r >>> 16)) * l + o * (n & (i >>> 16))) << 16) >>> 0))
      );
    },
  }
);
var QWr =
    Math.sign ||
    function (t) {
      var e = +t;
      return e == 0 || e != e ? e : e < 0 ? -1 : 1;
    },
  JWr = QWr,
  qWr = Math.abs,
  a7 = Math.pow,
  hoe = a7(2, -52),
  $6 = a7(2, -23),
  eKr = a7(2, 127) * (2 - $6),
  _q = a7(2, -126),
  tKr = function (t) {
    return t + 1 / hoe - 1 / hoe;
  },
  nKr =
    Math.fround ||
    function (t) {
      var e,
        n,
        r = +t,
        i = qWr(r),
        o = JWr(r);
      return i < _q
        ? o * tKr(i / _q / $6) * _q * $6
        : (n = (e = (1 + $6 / hoe) * i) - (e - i)) > eKr || n != n
        ? o * (1 / 0)
        : o * n;
    },
  rKr = Di,
  iKr = nKr;
rKr({ target: "Math", stat: !0 }, { fround: iKr });
var aKr = Di,
  oKr = Math.floor,
  sKr = Math.log,
  lKr = Math.LOG2E;
aKr(
  { target: "Math", stat: !0 },
  {
    clz32: function (t) {
      var e = t >>> 0;
      return e ? 31 - oKr(sKr(e + 0.5) * lKr) : 32;
    },
  }
);
var uKr = Di,
  cKr = OWe;
uKr({ target: "Math", stat: !0 }, { trunc: cKr });
var dKr = Di,
  Hat = qS,
  hKr = kb.f,
  fKr = B0,
  I3e = Qu,
  pKr = uYe,
  gKr = F0,
  mKr = cYe,
  D3e = Hat("".startsWith),
  yKr = Hat("".slice),
  vKr = Math.min,
  Xat = mKr("startsWith"),
  bKr =
    !Xat &&
    !!(function () {
      var t = hKr(String.prototype, "startsWith");
      return t && !t.writable;
    })();
dKr(
  { target: "String", proto: !0, forced: !bKr && !Xat },
  {
    startsWith: function (t) {
      var e = I3e(gKr(this));
      pKr(t);
      var n = fKr(vKr(arguments.length > 1 ? arguments[1] : void 0, e.length)),
        r = I3e(t);
      return D3e ? D3e(e, r, n) : yKr(e, n, n + r.length) === r;
    },
  }
);
var _Kr = (function () {
    var t =
      typeof document < "u" && document.currentScript
        ? document.currentScript.src
        : void 0;
    return function (e) {
      var n,
        r = (e = e || {}) !== void 0 ? e : {},
        i = {};
      for (n in r) r.hasOwnProperty(n) && (i[n] = r[n]);
      var o = !0;
      if (r.ENVIRONMENT)
        throw new Error(
          "Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)"
        );
      var l,
        u = "";
      if (
        (document.currentScript && (u = document.currentScript.src),
        t && (u = t),
        (u =
          u.indexOf("blob:") !== 0 ? u.substr(0, u.lastIndexOf("/") + 1) : ""),
        (typeof window > "u" ? "undefined" : mD(window)) !== "object" &&
          typeof importScripts != "function")
      )
        throw new Error(
          "not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)"
        );
      var c,
        d = r.print || console.log.bind(console),
        h = r.printErr || console.warn.bind(console);
      for (n in i) i.hasOwnProperty(n) && (r[n] = i[n]);
      function f(It) {
        f.shown || (f.shown = {}), f.shown[It] || ((f.shown[It] = 1), h(It));
      }
      (i = null),
        r.arguments && r.arguments,
        Object.getOwnPropertyDescriptor(r, "arguments") ||
          Object.defineProperty(r, "arguments", {
            configurable: !0,
            get: function () {
              tt("Module.arguments has been replaced with plain arguments_");
            },
          }),
        r.thisProgram && r.thisProgram,
        Object.getOwnPropertyDescriptor(r, "thisProgram") ||
          Object.defineProperty(r, "thisProgram", {
            configurable: !0,
            get: function () {
              tt("Module.thisProgram has been replaced with plain thisProgram");
            },
          }),
        r.quit && r.quit,
        Object.getOwnPropertyDescriptor(r, "quit") ||
          Object.defineProperty(r, "quit", {
            configurable: !0,
            get: function () {
              tt("Module.quit has been replaced with plain quit_");
            },
          }),
        b(
          r.memoryInitializerPrefixURL === void 0,
          "Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"
        ),
        b(
          r.pthreadMainPrefixURL === void 0,
          "Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"
        ),
        b(
          r.cdInitializerPrefixURL === void 0,
          "Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"
        ),
        b(
          r.filePackagePrefixURL === void 0,
          "Module.filePackagePrefixURL option was removed, use Module.locateFile instead"
        ),
        b(
          r.read === void 0,
          "Module.read option was removed (modify read_ in JS)"
        ),
        b(
          r.readAsync === void 0,
          "Module.readAsync option was removed (modify readAsync in JS)"
        ),
        b(
          r.readBinary === void 0,
          "Module.readBinary option was removed (modify readBinary in JS)"
        ),
        b(
          r.setWindowTitle === void 0,
          "Module.setWindowTitle option was removed (modify setWindowTitle in JS)"
        ),
        Object.getOwnPropertyDescriptor(r, "read") ||
          Object.defineProperty(r, "read", {
            configurable: !0,
            get: function () {
              tt("Module.read has been replaced with plain read_");
            },
          }),
        Object.getOwnPropertyDescriptor(r, "readAsync") ||
          Object.defineProperty(r, "readAsync", {
            configurable: !0,
            get: function () {
              tt("Module.readAsync has been replaced with plain readAsync");
            },
          }),
        Object.getOwnPropertyDescriptor(r, "readBinary") ||
          Object.defineProperty(r, "readBinary", {
            configurable: !0,
            get: function () {
              tt("Module.readBinary has been replaced with plain readBinary");
            },
          }),
        (En = function () {
          tt(
            "cannot use the stack before compiled code is ready to run, and has provided stack access"
          );
        }),
        r.wasmBinary && (c = r.wasmBinary),
        Object.getOwnPropertyDescriptor(r, "wasmBinary") ||
          Object.defineProperty(r, "wasmBinary", {
            configurable: !0,
            get: function () {
              tt("Module.wasmBinary has been replaced with plain wasmBinary");
            },
          }),
        r.noExitRuntime && r.noExitRuntime,
        Object.getOwnPropertyDescriptor(r, "noExitRuntime") ||
          Object.defineProperty(r, "noExitRuntime", {
            configurable: !0,
            get: function () {
              tt(
                "Module.noExitRuntime has been replaced with plain noExitRuntime"
              );
            },
          });
      var p,
        g = {
          Memory: function (It) {
            return {
              buffer: new ArrayBuffer(65536 * It.initial),
              grow: function (wt) {
                var Mt = this.buffer,
                  Wt = on(wt);
                return b(this.buffer !== Mt), Wt;
              },
            };
          },
          Table: function (It) {
            var wt = new Array(It.initial);
            return (
              (wt.grow = function (Mt) {
                wt.length >= 1 &&
                  tt(
                    "Unable to grow wasm table. Use a higher value for RESERVED_FUNCTION_POINTERS or set ALLOW_TABLE_GROWTH."
                  ),
                  wt.push(null);
              }),
              (wt.set = function (Mt, Wt) {
                wt[Mt] = Wt;
              }),
              (wt.get = function (Mt) {
                return wt[Mt];
              }),
              wt
            );
          },
          Module: function (It) {
            return {};
          },
          Instance: function (It, wt) {
            var Mt,
              Wt =
                ((Mt = y),
                (function (Ft, un, Yt) {
                  var Qt = un.memory,
                    Sn = Mt,
                    ar = new Ft.Int8Array(Yt);
                  new Ft.Int16Array(Yt);
                  var ye = new Ft.Int32Array(Yt),
                    Gn = new Ft.Uint8Array(Yt);
                  new Ft.Uint16Array(Yt);
                  var Ht = new Ft.Uint32Array(Yt);
                  new Ft.Float32Array(Yt), new Ft.Float64Array(Yt);
                  var yr = Ft.Math.imul;
                  Ft.Math.fround,
                    Ft.Math.abs,
                    Ft.Math.clz32,
                    Ft.Math.min,
                    Ft.Math.max,
                    Ft.Math.floor,
                    Ft.Math.ceil,
                    Ft.Math.sqrt,
                    un.abort,
                    Ft.NaN,
                    Ft.Infinity;
                  var T = un.emscripten_memcpy_big,
                    Jn = un.emscripten_resize_heap,
                    pr = un.__unlock,
                    Ut = un.__lock,
                    Dt = 9744;
                  function Kt(Je) {
                    var sn,
                      Ye = 0;
                    return (
                      (sn = Ui()),
                      (Je = ((Ye = ye[388]) + Je) | 0) >>> 0 <=
                        (sn << 16) >>> 0 || Jn(0 | Je)
                        ? ((ye[388] = Je), Ye)
                        : ((ye[256] = 48), -1)
                    );
                  }
                  function vn(Je) {
                    var sn,
                      Ye = 0,
                      Ct = 0,
                      At = 0,
                      Pn = 0,
                      Xn = 0,
                      wn = 0,
                      Vn = 0,
                      Ot = 0,
                      _n = 0,
                      gr = 0,
                      ut = 0,
                      Si = 0;
                    Dt = sn = (Dt - 16) | 0;
                    e: {
                      t: {
                        n: {
                          i: {
                            a: {
                              l: {
                                r: {
                                  o: {
                                    c: {
                                      s: {
                                        u: {
                                          if ((Je |= 0) >>> 0 <= 244) {
                                            if (
                                              3 &
                                              (Ye =
                                                (Xn = ye[261]) >>>
                                                (Je =
                                                  (wn =
                                                    Je >>> 0 < 11
                                                      ? 16
                                                      : (Je + 11) & -8) >>> 3))
                                            ) {
                                              (Je =
                                                ((Ye =
                                                  ye[
                                                    (1092 +
                                                      (Pn =
                                                        (Ct =
                                                          (Je +
                                                            (1 & (-1 ^ Ye))) |
                                                          0) << 3)) >>
                                                      2
                                                  ]) +
                                                  8) |
                                                0),
                                                (0 |
                                                  (At = ye[(Ye + 8) >> 2])) !=
                                                (0 | (Pn = (Pn + 1084) | 0))
                                                  ? ((ye[(At + 12) >> 2] = Pn),
                                                    (ye[(Pn + 8) >> 2] = At))
                                                  : ((ut = 1044),
                                                    (Si = cr(Ct) & Xn),
                                                    (ye[ut >> 2] = Si)),
                                                (Ct <<= 3),
                                                (ye[(Ye + 4) >> 2] = 3 | Ct),
                                                (ye[
                                                  (4 + (Ye = (Ye + Ct) | 0)) >>
                                                    2
                                                ] = 1 | ye[(Ye + 4) >> 2]);
                                              break e;
                                            }
                                            if (
                                              wn >>> 0 <=
                                              (Ot = ye[263]) >>> 0
                                            )
                                              break u;
                                            if (Ye) {
                                              (Ct = Ye =
                                                ((Je =
                                                  (((0 -
                                                    (Je =
                                                      ((0 - (Ct = 2 << Je)) |
                                                        Ct) &
                                                      (Ye << Je))) &
                                                    Je) -
                                                    1) |
                                                  0) >>>
                                                  12) &
                                                16),
                                                (Ct |= Ye =
                                                  ((Je >>>= Ye) >>> 5) & 8),
                                                (Ct |= Ye =
                                                  ((Je >>>= Ye) >>> 2) & 4),
                                                (Ye =
                                                  ye[
                                                    (1092 +
                                                      (At =
                                                        (Ct =
                                                          (((Ct |= Ye =
                                                            ((Je >>>= Ye) >>>
                                                              1) &
                                                            2) |
                                                            (Ye =
                                                              ((Je >>>= Ye) >>>
                                                                1) &
                                                              1)) +
                                                            (Je >>> Ye)) |
                                                          0) << 3)) >>
                                                      2
                                                  ]),
                                                (0 |
                                                  (Je = ye[(Ye + 8) >> 2])) !=
                                                (0 | (At = (At + 1084) | 0))
                                                  ? ((ye[(Je + 12) >> 2] = At),
                                                    (ye[(At + 8) >> 2] = Je))
                                                  : ((Xn = cr(Ct) & Xn),
                                                    (ye[261] = Xn)),
                                                (Je = (Ye + 8) | 0),
                                                (ye[(Ye + 4) >> 2] = 3 | wn),
                                                (Pn = ((Ct <<= 3) - wn) | 0),
                                                (ye[
                                                  (4 + (Vn = (Ye + wn) | 0)) >>
                                                    2
                                                ] = 1 | Pn),
                                                (ye[(Ye + Ct) >> 2] = Pn),
                                                Ot &&
                                                  ((Ye =
                                                    (1084 +
                                                      ((Ct = Ot >>> 3) << 3)) |
                                                    0),
                                                  (At = ye[266]),
                                                  (Ct = 1 << Ct) & Xn
                                                    ? (Ct = ye[(Ye + 8) >> 2])
                                                    : ((ye[261] = Ct | Xn),
                                                      (Ct = Ye)),
                                                  (ye[(Ye + 8) >> 2] = At),
                                                  (ye[(Ct + 12) >> 2] = At),
                                                  (ye[(At + 12) >> 2] = Ye),
                                                  (ye[(At + 8) >> 2] = Ct)),
                                                (ye[266] = Vn),
                                                (ye[263] = Pn);
                                              break e;
                                            }
                                            if (!(gr = ye[262])) break u;
                                            for (
                                              Ct = Ye =
                                                ((Je =
                                                  ((gr & (0 - gr)) - 1) | 0) >>>
                                                  12) &
                                                16,
                                                Ct |= Ye =
                                                  ((Je >>>= Ye) >>> 5) & 8,
                                                Ct |= Ye =
                                                  ((Je >>>= Ye) >>> 2) & 4,
                                                Ye =
                                                  ye[
                                                    (1348 +
                                                      ((((Ct |= Ye =
                                                        ((Je >>>= Ye) >>> 1) &
                                                        2) |
                                                        (Ye =
                                                          ((Je >>>= Ye) >>> 1) &
                                                          1)) +
                                                        (Je >>> Ye)) <<
                                                        2)) >>
                                                      2
                                                  ],
                                                At =
                                                  ((-8 & ye[(Ye + 4) >> 2]) -
                                                    wn) |
                                                  0,
                                                Ct = Ye;
                                              (Je = ye[(Ct + 16) >> 2]) ||
                                              (Je = ye[(Ct + 20) >> 2]);

                                            )
                                              (At = (Ct =
                                                (Pn =
                                                  ((-8 & ye[(Je + 4) >> 2]) -
                                                    wn) |
                                                  0) >>>
                                                  0 <
                                                At >>> 0)
                                                ? Pn
                                                : At),
                                                (Ye = Ct ? Je : Ye),
                                                (Ct = Je);
                                            if (
                                              ((_n = ye[(Ye + 24) >> 2]),
                                              (0 | (Pn = ye[(Ye + 12) >> 2])) !=
                                                (0 | Ye))
                                            ) {
                                              (Je = ye[(Ye + 8) >> 2]),
                                                (ye[(Je + 12) >> 2] = Pn),
                                                (ye[(Pn + 8) >> 2] = Je);
                                              break t;
                                            }
                                            if (
                                              !(Je =
                                                ye[(Ct = (Ye + 20) | 0) >> 2])
                                            ) {
                                              if (!(Je = ye[(Ye + 16) >> 2]))
                                                break s;
                                              Ct = (Ye + 16) | 0;
                                            }
                                            for (
                                              ;
                                              (Vn = Ct),
                                                (Pn = Je),
                                                (Je =
                                                  ye[
                                                    (Ct = (Je + 20) | 0) >> 2
                                                  ]) ||
                                                  ((Ct = (Pn + 16) | 0),
                                                  (Je = ye[(Pn + 16) >> 2]));

                                            );
                                            ye[Vn >> 2] = 0;
                                            break t;
                                          }
                                          if (
                                            ((wn = -1),
                                            !(Je >>> 0 > 4294967231) &&
                                              ((wn = -8 & (Ye = (Je + 11) | 0)),
                                              (Ot = ye[262])))
                                          ) {
                                            (Ct = (0 - wn) | 0),
                                              (Xn = 0),
                                              (Ye >>>= 8) &&
                                                ((Xn = 31),
                                                wn >>> 0 > 16777215 ||
                                                  (Xn =
                                                    (28 +
                                                      (((Je =
                                                        ((((Xn =
                                                          (Ye <<= At =
                                                            ((Ye + 1048320) >>>
                                                              16) &
                                                            8) <<
                                                          (Je =
                                                            ((Ye + 520192) >>>
                                                              16) &
                                                            4)) <<
                                                          (Ye =
                                                            ((Xn + 245760) >>>
                                                              16) &
                                                            2)) >>>
                                                          15) -
                                                          (Ye | Je | At)) |
                                                        0) <<
                                                        1) |
                                                        ((wn >>> (Je + 21)) &
                                                          1))) |
                                                    0));
                                            d: {
                                              f: {
                                                if (
                                                  (At =
                                                    ye[(1348 + (Xn << 2)) >> 2])
                                                )
                                                  for (
                                                    Ye =
                                                      wn <<
                                                      ((0 | Xn) == 31
                                                        ? 0
                                                        : (25 - (Xn >>> 1)) |
                                                          0),
                                                      Je = 0;
                                                    ;

                                                  ) {
                                                    if (
                                                      !(
                                                        (Vn =
                                                          ((-8 &
                                                            ye[(At + 4) >> 2]) -
                                                            wn) |
                                                          0) >>>
                                                          0 >=
                                                          Ct >>> 0 ||
                                                        ((Pn = At), (Ct = Vn))
                                                      )
                                                    ) {
                                                      (Ct = 0), (Je = At);
                                                      break f;
                                                    }
                                                    if (
                                                      ((Vn =
                                                        ye[(At + 20) >> 2]),
                                                      (At =
                                                        ye[
                                                          (16 +
                                                            ((((Ye >>> 29) &
                                                              4) +
                                                              At) |
                                                              0)) >>
                                                            2
                                                        ]),
                                                      (Je = Vn
                                                        ? (0 | Vn) == (0 | At)
                                                          ? Je
                                                          : Vn
                                                        : Je),
                                                      (Ye <<= (0 | At) != 0),
                                                      !At)
                                                    )
                                                      break;
                                                  }
                                                else Je = 0;
                                                if (!(Je | Pn)) {
                                                  if (
                                                    !(Je =
                                                      ((0 - (Je = 2 << Xn)) |
                                                        Je) &
                                                      Ot)
                                                  )
                                                    break u;
                                                  (At = Ye =
                                                    ((Je =
                                                      ((Je & (0 - Je)) - 1) |
                                                      0) >>>
                                                      12) &
                                                    16),
                                                    (At |= Ye =
                                                      ((Je >>>= Ye) >>> 5) & 8),
                                                    (At |= Ye =
                                                      ((Je >>>= Ye) >>> 2) & 4),
                                                    (Je =
                                                      ye[
                                                        (1348 +
                                                          ((((At |= Ye =
                                                            ((Je >>>= Ye) >>>
                                                              1) &
                                                            2) |
                                                            (Ye =
                                                              ((Je >>>= Ye) >>>
                                                                1) &
                                                              1)) +
                                                            (Je >>> Ye)) <<
                                                            2)) >>
                                                          2
                                                      ]);
                                                }
                                                if (!Je) break d;
                                              }
                                              for (
                                                ;
                                                (Ct = (Ye =
                                                  (At =
                                                    ((-8 & ye[(Je + 4) >> 2]) -
                                                      wn) |
                                                    0) >>>
                                                    0 <
                                                  Ct >>> 0)
                                                  ? At
                                                  : Ct),
                                                  (Pn = Ye ? Je : Pn),
                                                  (Je =
                                                    (Ye = ye[(Je + 16) >> 2]) ||
                                                    ye[(Je + 20) >> 2]);

                                              );
                                            }
                                            if (
                                              !(
                                                !Pn |
                                                (Ct >>> 0 >=
                                                  (ye[263] - wn) >>> 0)
                                              )
                                            ) {
                                              if (
                                                ((Vn = ye[(Pn + 24) >> 2]),
                                                (0 | Pn) !=
                                                  (0 |
                                                    (Ye = ye[(Pn + 12) >> 2])))
                                              ) {
                                                (Je = ye[(Pn + 8) >> 2]),
                                                  (ye[(Je + 12) >> 2] = Ye),
                                                  (ye[(Ye + 8) >> 2] = Je);
                                                break n;
                                              }
                                              if (
                                                !(Je =
                                                  ye[(At = (Pn + 20) | 0) >> 2])
                                              ) {
                                                if (!(Je = ye[(Pn + 16) >> 2]))
                                                  break c;
                                                At = (Pn + 16) | 0;
                                              }
                                              for (
                                                ;
                                                (Xn = At),
                                                  (Ye = Je),
                                                  (Je =
                                                    ye[
                                                      (At = (Je + 20) | 0) >> 2
                                                    ]) ||
                                                    ((At = (Ye + 16) | 0),
                                                    (Je = ye[(Ye + 16) >> 2]));

                                              );
                                              ye[Xn >> 2] = 0;
                                              break n;
                                            }
                                          }
                                        }
                                        if ((Ye = ye[263]) >>> 0 >= wn >>> 0) {
                                          (Je = ye[266]),
                                            (Ct = (Ye - wn) | 0) >>> 0 >= 16
                                              ? ((ye[263] = Ct),
                                                (At = (Je + wn) | 0),
                                                (ye[266] = At),
                                                (ye[(At + 4) >> 2] = 1 | Ct),
                                                (ye[(Je + Ye) >> 2] = Ct),
                                                (ye[(Je + 4) >> 2] = 3 | wn))
                                              : ((ye[266] = 0),
                                                (ye[263] = 0),
                                                (ye[(Je + 4) >> 2] = 3 | Ye),
                                                (ye[
                                                  (4 + (Ye = (Je + Ye) | 0)) >>
                                                    2
                                                ] = 1 | ye[(Ye + 4) >> 2])),
                                            (Je = (Je + 8) | 0);
                                          break e;
                                        }
                                        if ((At = ye[264]) >>> 0 > wn >>> 0) {
                                          (Ye = (At - wn) | 0),
                                            (ye[264] = Ye),
                                            (Ct = ((Je = ye[267]) + wn) | 0),
                                            (ye[267] = Ct),
                                            (ye[(Ct + 4) >> 2] = 1 | Ye),
                                            (ye[(Je + 4) >> 2] = 3 | wn),
                                            (Je = (Je + 8) | 0);
                                          break e;
                                        }
                                        if (
                                          ((Je = 0),
                                          (Ct = Pn = (wn + 47) | 0),
                                          ye[379]
                                            ? (Ye = ye[381])
                                            : ((ye[382] = -1),
                                              (ye[383] = -1),
                                              (ye[380] = 4096),
                                              (ye[381] = 4096),
                                              (ye[379] =
                                                ((sn + 12) & -16) ^ 1431655768),
                                              (ye[384] = 0),
                                              (ye[372] = 0),
                                              (Ye = 4096)),
                                          (Ct =
                                            (Xn = (Ct + Ye) | 0) &
                                            (Vn = (0 - Ye) | 0)) >>>
                                            0 <=
                                            wn >>> 0 ||
                                            ((Ye = ye[371]) &&
                                              ((_n =
                                                ((Ot = ye[369]) + Ct) | 0) >>>
                                                0 <=
                                                Ot >>> 0) |
                                                (_n >>> 0 > Ye >>> 0)))
                                        )
                                          break e;
                                        if (4 & Gn[1488]) break l;
                                        u: {
                                          d: {
                                            if ((Ye = ye[267]))
                                              for (Je = 1492; ; ) {
                                                if (
                                                  ((Ot = ye[Je >> 2]) +
                                                    ye[(Je + 4) >> 2]) >>>
                                                    0 >
                                                    Ye >>> 0 &&
                                                  Ot >>> 0 <= Ye >>> 0
                                                )
                                                  break d;
                                                if (!(Je = ye[(Je + 8) >> 2]))
                                                  break;
                                              }
                                            if (
                                              (0 | (Ye = Kt(0))) == -1 ||
                                              ((Xn = Ct),
                                              (At = ((Je = ye[380]) + -1) | 0) &
                                                Ye &&
                                                (Xn =
                                                  (((Ct - Ye) | 0) +
                                                    ((Ye + At) & (0 - Je))) |
                                                  0),
                                              (Xn >>> 0 <= wn >>> 0) |
                                                (Xn >>> 0 > 2147483646)) ||
                                              ((Je = ye[371]) &&
                                                ((Vn =
                                                  ((At = ye[369]) + Xn) | 0) >>>
                                                  0 <=
                                                  At >>> 0) |
                                                  (Vn >>> 0 > Je >>> 0))
                                            )
                                              break r;
                                            if ((0 | Ye) != (0 | (Je = Kt(Xn))))
                                              break u;
                                            break a;
                                          }
                                          if (
                                            (Xn = Vn & (Xn - At)) >>> 0 >
                                            2147483646
                                          )
                                            break r;
                                          if (
                                            (0 | (Ye = Kt(Xn))) ==
                                            ((ye[Je >> 2] + ye[(Je + 4) >> 2]) |
                                              0)
                                          )
                                            break o;
                                          Je = Ye;
                                        }
                                        if (
                                          ((Ye = Je),
                                          !(
                                            ((wn + 48) >>> 0 <= Xn >>> 0) |
                                            (Xn >>> 0 > 2147483646) |
                                            ((0 | Je) == -1)
                                          ))
                                        ) {
                                          if (
                                            (Je =
                                              ((Je = ye[381]) +
                                                ((Pn - Xn) | 0)) &
                                              (0 - Je)) >>>
                                              0 >
                                            2147483646
                                          )
                                            break a;
                                          if ((0 | Kt(Je)) != -1) {
                                            Xn = (Je + Xn) | 0;
                                            break a;
                                          }
                                          Kt((0 - Xn) | 0);
                                          break r;
                                        }
                                        if ((0 | Ye) != -1) break a;
                                        break r;
                                      }
                                      Pn = 0;
                                      break t;
                                    }
                                    Ye = 0;
                                    break n;
                                  }
                                  if ((0 | Ye) != -1) break a;
                                }
                                ye[372] = 4 | ye[372];
                              }
                              if (
                                Ct >>> 0 > 2147483646 ||
                                ((Ye = Kt(Ct)) >>> 0 >= (Je = Kt(0)) >>> 0) |
                                  ((0 | Ye) == -1) |
                                  ((0 | Je) == -1) ||
                                (Xn = (Je - Ye) | 0) >>> 0 <= (wn + 40) >>> 0
                              )
                                break i;
                            }
                            (Je = (ye[369] + Xn) | 0),
                              (ye[369] = Je),
                              Je >>> 0 > Ht[370] && (ye[370] = Je);
                            a: {
                              l: {
                                r: {
                                  if ((Ct = ye[267])) {
                                    for (Je = 1492; ; ) {
                                      if (
                                        (((At = ye[Je >> 2]) +
                                          (Pn = ye[(Je + 4) >> 2])) |
                                          0) ==
                                        (0 | Ye)
                                      )
                                        break r;
                                      if (!(Je = ye[(Je + 8) >> 2])) break;
                                    }
                                    break l;
                                  }
                                  for (
                                    (Ye >>> 0 >= (Je = ye[265]) >>> 0 && Je) ||
                                      (ye[265] = Ye),
                                      Je = 0,
                                      ye[374] = Xn,
                                      ye[373] = Ye,
                                      ye[269] = -1,
                                      ye[270] = ye[379],
                                      ye[376] = 0;
                                    (At = (1084 + (Ct = Je << 3)) | 0),
                                      (ye[(Ct + 1092) >> 2] = At),
                                      (ye[(Ct + 1096) >> 2] = At),
                                      (0 | (Je = (Je + 1) | 0)) != 32;

                                  );
                                  (At =
                                    ((Je = (Xn + -40) | 0) -
                                      (Ct = (Ye + 8) & 7 ? (-8 - Ye) & 7 : 0)) |
                                    0),
                                    (ye[264] = At),
                                    (Ct = (Ye + Ct) | 0),
                                    (ye[267] = Ct),
                                    (ye[(Ct + 4) >> 2] = 1 | At),
                                    (ye[(4 + ((Je + Ye) | 0)) >> 2] = 40),
                                    (ye[268] = ye[383]);
                                  break a;
                                }
                                if (
                                  !(
                                    (8 & Gn[(Je + 12) | 0]) |
                                    (Ye >>> 0 <= Ct >>> 0) |
                                    (At >>> 0 > Ct >>> 0)
                                  )
                                ) {
                                  (ye[(Je + 4) >> 2] = Pn + Xn),
                                    (Ye =
                                      ((Je = (Ct + 8) & 7 ? (-8 - Ct) & 7 : 0) +
                                        Ct) |
                                      0),
                                    (ye[267] = Ye),
                                    (Je = ((At = (ye[264] + Xn) | 0) - Je) | 0),
                                    (ye[264] = Je),
                                    (ye[(Ye + 4) >> 2] = 1 | Je),
                                    (ye[(4 + ((Ct + At) | 0)) >> 2] = 40),
                                    (ye[268] = ye[383]);
                                  break a;
                                }
                              }
                              Ye >>> 0 < (Pn = ye[265]) >>> 0 &&
                                ((ye[265] = Ye), (Pn = 0)),
                                (At = (Ye + Xn) | 0),
                                (Je = 1492);
                              l: {
                                r: {
                                  o: {
                                    c: {
                                      s: {
                                        u: {
                                          for (;;) {
                                            if ((0 | At) != ye[Je >> 2]) {
                                              if ((Je = ye[(Je + 8) >> 2]))
                                                continue;
                                              break u;
                                            }
                                            break;
                                          }
                                          if (!(8 & Gn[(Je + 12) | 0])) break s;
                                        }
                                        for (Je = 1492; ; ) {
                                          if (
                                            (At = ye[Je >> 2]) >>> 0 <=
                                              Ct >>> 0 &&
                                            (Pn =
                                              (At + ye[(Je + 4) >> 2]) | 0) >>>
                                              0 >
                                              Ct >>> 0
                                          )
                                            break c;
                                          Je = ye[(Je + 8) >> 2];
                                        }
                                      }
                                      if (
                                        ((ye[Je >> 2] = Ye),
                                        (ye[(Je + 4) >> 2] =
                                          ye[(Je + 4) >> 2] + Xn),
                                        (ye[
                                          (4 +
                                            (_n =
                                              (((Ye + 8) & 7
                                                ? (-8 - Ye) & 7
                                                : 0) +
                                                Ye) |
                                              0)) >>
                                            2
                                        ] = 3 | wn),
                                        (Je =
                                          ((((Ye =
                                            (At +
                                              ((At + 8) & 7
                                                ? (-8 - At) & 7
                                                : 0)) |
                                            0) -
                                            _n) |
                                            0) -
                                            wn) |
                                          0),
                                        (Vn = (wn + _n) | 0),
                                        (0 | Ye) == (0 | Ct))
                                      ) {
                                        (ye[267] = Vn),
                                          (Je = (ye[264] + Je) | 0),
                                          (ye[264] = Je),
                                          (ye[(Vn + 4) >> 2] = 1 | Je);
                                        break r;
                                      }
                                      if (ye[266] == (0 | Ye)) {
                                        (ye[266] = Vn),
                                          (Je = (ye[263] + Je) | 0),
                                          (ye[263] = Je),
                                          (ye[(Vn + 4) >> 2] = 1 | Je),
                                          (ye[(Je + Vn) >> 2] = Je);
                                        break r;
                                      }
                                      if ((3 & (Ct = ye[(Ye + 4) >> 2])) == 1) {
                                        gr = -8 & Ct;
                                        s: if (Ct >>> 0 <= 255) {
                                          if (
                                            ((Pn = Ct >>> 3),
                                            (Ct = ye[(Ye + 8) >> 2]),
                                            (0 | (At = ye[(Ye + 12) >> 2])) ==
                                              (0 | Ct))
                                          ) {
                                            (ut = 1044),
                                              (Si = ye[261] & cr(Pn)),
                                              (ye[ut >> 2] = Si);
                                            break s;
                                          }
                                          (ye[(Ct + 12) >> 2] = At),
                                            (ye[(At + 8) >> 2] = Ct);
                                        } else {
                                          if (
                                            ((Ot = ye[(Ye + 24) >> 2]),
                                            (0 | (Xn = ye[(Ye + 12) >> 2])) ==
                                              (0 | Ye))
                                          )
                                            if (
                                              (wn =
                                                ye[
                                                  (At = (Ye + 20) | 0) >> 2
                                                ]) ||
                                              (wn =
                                                ye[(At = (Ye + 16) | 0) >> 2])
                                            ) {
                                              for (
                                                ;
                                                (Ct = At),
                                                  (Xn = wn),
                                                  (wn =
                                                    ye[
                                                      (At = (wn + 20) | 0) >> 2
                                                    ]) ||
                                                    ((At = (Xn + 16) | 0),
                                                    (wn = ye[(Xn + 16) >> 2]));

                                              );
                                              ye[Ct >> 2] = 0;
                                            } else Xn = 0;
                                          else
                                            (Ct = ye[(Ye + 8) >> 2]),
                                              (ye[(Ct + 12) >> 2] = Xn),
                                              (ye[(Xn + 8) >> 2] = Ct);
                                          if (Ot) {
                                            Ct = ye[(Ye + 28) >> 2];
                                            u: {
                                              if (
                                                ye[
                                                  (At =
                                                    (1348 + (Ct << 2)) | 0) >> 2
                                                ] ==
                                                (0 | Ye)
                                              ) {
                                                if (((ye[At >> 2] = Xn), Xn))
                                                  break u;
                                                (ut = 1048),
                                                  (Si = ye[262] & cr(Ct)),
                                                  (ye[ut >> 2] = Si);
                                                break s;
                                              }
                                              if (
                                                ((ye[
                                                  (Ot +
                                                    (ye[(Ot + 16) >> 2] ==
                                                    (0 | Ye)
                                                      ? 16
                                                      : 20)) >>
                                                    2
                                                ] = Xn),
                                                !Xn)
                                              )
                                                break s;
                                            }
                                            (ye[(Xn + 24) >> 2] = Ot),
                                              (Ct = ye[(Ye + 16) >> 2]) &&
                                                ((ye[(Xn + 16) >> 2] = Ct),
                                                (ye[(Ct + 24) >> 2] = Xn)),
                                              (Ct = ye[(Ye + 20) >> 2]) &&
                                                ((ye[(Xn + 20) >> 2] = Ct),
                                                (ye[(Ct + 24) >> 2] = Xn));
                                          }
                                        }
                                        (Ye = (Ye + gr) | 0),
                                          (Je = (Je + gr) | 0);
                                      }
                                      if (
                                        ((ye[(Ye + 4) >> 2] =
                                          -2 & ye[(Ye + 4) >> 2]),
                                        (ye[(Vn + 4) >> 2] = 1 | Je),
                                        (ye[(Je + Vn) >> 2] = Je),
                                        Je >>> 0 <= 255)
                                      ) {
                                        (Je =
                                          (1084 + ((Ye = Je >>> 3) << 3)) | 0),
                                          (Ct = ye[261]) & (Ye = 1 << Ye)
                                            ? (Ye = ye[(Je + 8) >> 2])
                                            : ((ye[261] = Ye | Ct), (Ye = Je)),
                                          (ye[(Je + 8) >> 2] = Vn),
                                          (ye[(Ye + 12) >> 2] = Vn),
                                          (ye[(Vn + 12) >> 2] = Je),
                                          (ye[(Vn + 8) >> 2] = Ye);
                                        break r;
                                      }
                                      if (
                                        ((Ye = 0),
                                        (At = Je >>> 8) &&
                                          ((Ye = 31),
                                          Je >>> 0 > 16777215 ||
                                            (Ye =
                                              (28 +
                                                (((Ye =
                                                  ((((wn =
                                                    (At <<= Pn =
                                                      ((At + 1048320) >>> 16) &
                                                      8) <<
                                                    (Ye =
                                                      ((At + 520192) >>> 16) &
                                                      4)) <<
                                                    (At =
                                                      ((wn + 245760) >>> 16) &
                                                      2)) >>>
                                                    15) -
                                                    (At | Ye | Pn)) |
                                                  0) <<
                                                  1) |
                                                  ((Je >>> (Ye + 21)) & 1))) |
                                              0)),
                                        (ye[((Ct = Vn) + 28) >> 2] = Ye),
                                        (ye[(Vn + 16) >> 2] = 0),
                                        (ye[(Vn + 20) >> 2] = 0),
                                        (Ct = (1348 + (Ye << 2)) | 0),
                                        (At = ye[262]) & (Pn = 1 << Ye))
                                      ) {
                                        for (
                                          At =
                                            Je <<
                                            ((0 | Ye) == 31
                                              ? 0
                                              : (25 - (Ye >>> 1)) | 0),
                                            Ye = ye[Ct >> 2];
                                          ;

                                        ) {
                                          if (
                                            ((Ct = Ye),
                                            (-8 & ye[(Ye + 4) >> 2]) ==
                                              (0 | Je))
                                          )
                                            break o;
                                          if (
                                            ((Ye = At >>> 29),
                                            (At <<= 1),
                                            !(Ye =
                                              ye[
                                                (16 +
                                                  (Pn = ((4 & Ye) + Ct) | 0)) >>
                                                  2
                                              ]))
                                          )
                                            break;
                                        }
                                        ye[(Pn + 16) >> 2] = Vn;
                                      } else
                                        (ye[262] = At | Pn), (ye[Ct >> 2] = Vn);
                                      (ye[(Vn + 24) >> 2] = Ct),
                                        (ye[(Vn + 12) >> 2] = Vn),
                                        (ye[(Vn + 8) >> 2] = Vn);
                                      break r;
                                    }
                                    for (
                                      Vn =
                                        ((Je = (Xn + -40) | 0) -
                                          (At =
                                            (Ye + 8) & 7 ? (-8 - Ye) & 7 : 0)) |
                                        0,
                                        ye[264] = Vn,
                                        At = (Ye + At) | 0,
                                        ye[267] = At,
                                        ye[(At + 4) >> 2] = 1 | Vn,
                                        ye[(4 + ((Je + Ye) | 0)) >> 2] = 40,
                                        ye[268] = ye[383],
                                        ye[
                                          ((At =
                                            (Je =
                                              (((Pn +
                                                ((Pn + -39) & 7
                                                  ? (39 - Pn) & 7
                                                  : 0)) |
                                                0) -
                                                47) |
                                              0) >>>
                                              0 <
                                            (Ct + 16) >>> 0
                                              ? Ct
                                              : Je) +
                                            4) >>
                                            2
                                        ] = 27,
                                        Je = ye[376],
                                        ye[(At + 16) >> 2] = ye[375],
                                        ye[(At + 20) >> 2] = Je,
                                        Je = ye[374],
                                        ye[(At + 8) >> 2] = ye[373],
                                        ye[(At + 12) >> 2] = Je,
                                        ye[375] = At + 8,
                                        ye[374] = Xn,
                                        ye[373] = Ye,
                                        ye[376] = 0,
                                        Je = (At + 24) | 0;
                                      (ye[(Je + 4) >> 2] = 7),
                                        (Ye = (Je + 8) | 0),
                                        (Je = (Je + 4) | 0),
                                        Ye >>> 0 < Pn >>> 0;

                                    );
                                    if ((0 | Ct) == (0 | At)) break a;
                                    if (
                                      ((ye[(At + 4) >> 2] =
                                        -2 & ye[(At + 4) >> 2]),
                                      (Pn = (At - Ct) | 0),
                                      (ye[(Ct + 4) >> 2] = 1 | Pn),
                                      (ye[At >> 2] = Pn),
                                      Pn >>> 0 <= 255)
                                    ) {
                                      (Je =
                                        (1084 + ((Ye = Pn >>> 3) << 3)) | 0),
                                        (At = ye[261]) & (Ye = 1 << Ye)
                                          ? (Ye = ye[(Je + 8) >> 2])
                                          : ((ye[261] = Ye | At), (Ye = Je)),
                                        (ye[(Je + 8) >> 2] = Ct),
                                        (ye[(Ye + 12) >> 2] = Ct),
                                        (ye[(Ct + 12) >> 2] = Je),
                                        (ye[(Ct + 8) >> 2] = Ye);
                                      break a;
                                    }
                                    if (
                                      ((ye[(Ct + 16) >> 2] = 0),
                                      (ye[(Ct + 20) >> 2] = 0),
                                      (Je = 0),
                                      (At = Pn >>> 8) &&
                                        ((Je = 31),
                                        Pn >>> 0 > 16777215 ||
                                          (Je =
                                            (28 +
                                              (((Je =
                                                ((((Vn =
                                                  (At <<= Xn =
                                                    ((At + 1048320) >>> 16) &
                                                    8) <<
                                                  (Je =
                                                    ((At + 520192) >>> 16) &
                                                    4)) <<
                                                  (At =
                                                    ((Vn + 245760) >>> 16) &
                                                    2)) >>>
                                                  15) -
                                                  (At | Je | Xn)) |
                                                0) <<
                                                1) |
                                                ((Pn >>> (Je + 21)) & 1))) |
                                            0)),
                                      (ye[((Ye = Ct) + 28) >> 2] = Je),
                                      (Ye = (1348 + (Je << 2)) | 0),
                                      (At = ye[262]) & (Xn = 1 << Je))
                                    ) {
                                      for (
                                        Je =
                                          Pn <<
                                          ((0 | Je) == 31
                                            ? 0
                                            : (25 - (Je >>> 1)) | 0),
                                          Ye = ye[Ye >> 2];
                                        ;

                                      ) {
                                        if (
                                          ((At = Ye),
                                          (0 | Pn) == (-8 & ye[(Ye + 4) >> 2]))
                                        )
                                          break l;
                                        if (
                                          ((Ye = Je >>> 29),
                                          (Je <<= 1),
                                          !(Ye =
                                            ye[
                                              (16 +
                                                (Xn = (At + (4 & Ye)) | 0)) >>
                                                2
                                            ]))
                                        )
                                          break;
                                      }
                                      (ye[(Xn + 16) >> 2] = Ct),
                                        (ye[(Ct + 24) >> 2] = At);
                                    } else
                                      (ye[262] = At | Xn),
                                        (ye[Ye >> 2] = Ct),
                                        (ye[(Ct + 24) >> 2] = Ye);
                                    (ye[(Ct + 12) >> 2] = Ct),
                                      (ye[(Ct + 8) >> 2] = Ct);
                                    break a;
                                  }
                                  (Je = ye[(Ct + 8) >> 2]),
                                    (ye[(Je + 12) >> 2] = Vn),
                                    (ye[(Ct + 8) >> 2] = Vn),
                                    (ye[(Vn + 24) >> 2] = 0),
                                    (ye[(Vn + 12) >> 2] = Ct),
                                    (ye[(Vn + 8) >> 2] = Je);
                                }
                                Je = (_n + 8) | 0;
                                break e;
                              }
                              (Je = ye[(At + 8) >> 2]),
                                (ye[(Je + 12) >> 2] = Ct),
                                (ye[(At + 8) >> 2] = Ct),
                                (ye[(Ct + 24) >> 2] = 0),
                                (ye[(Ct + 12) >> 2] = At),
                                (ye[(Ct + 8) >> 2] = Je);
                            }
                            if (!((Je = ye[264]) >>> 0 <= wn >>> 0)) {
                              (Ye = (Je - wn) | 0),
                                (ye[264] = Ye),
                                (Ct = ((Je = ye[267]) + wn) | 0),
                                (ye[267] = Ct),
                                (ye[(Ct + 4) >> 2] = 1 | Ye),
                                (ye[(Je + 4) >> 2] = 3 | wn),
                                (Je = (Je + 8) | 0);
                              break e;
                            }
                          }
                          (ye[256] = 48), (Je = 0);
                          break e;
                        }
                        n: if (Vn) {
                          Je = ye[(Pn + 28) >> 2];
                          i: {
                            if (
                              ye[(At = (1348 + (Je << 2)) | 0) >> 2] ==
                              (0 | Pn)
                            ) {
                              if (((ye[At >> 2] = Ye), Ye)) break i;
                              (Ot = cr(Je) & Ot), (ye[262] = Ot);
                              break n;
                            }
                            if (
                              ((ye[
                                (Vn +
                                  (ye[(Vn + 16) >> 2] == (0 | Pn) ? 16 : 20)) >>
                                  2
                              ] = Ye),
                              !Ye)
                            )
                              break n;
                          }
                          (ye[(Ye + 24) >> 2] = Vn),
                            (Je = ye[(Pn + 16) >> 2]) &&
                              ((ye[(Ye + 16) >> 2] = Je),
                              (ye[(Je + 24) >> 2] = Ye)),
                            (Je = ye[(Pn + 20) >> 2]) &&
                              ((ye[(Ye + 20) >> 2] = Je),
                              (ye[(Je + 24) >> 2] = Ye));
                        }
                        n: if (Ct >>> 0 <= 15)
                          (Je = (Ct + wn) | 0),
                            (ye[(Pn + 4) >> 2] = 3 | Je),
                            (ye[(4 + (Je = (Je + Pn) | 0)) >> 2] =
                              1 | ye[(Je + 4) >> 2]);
                        else if (
                          ((ye[(Pn + 4) >> 2] = 3 | wn),
                          (ye[(4 + (At = (Pn + wn) | 0)) >> 2] = 1 | Ct),
                          (ye[(Ct + At) >> 2] = Ct),
                          Ct >>> 0 <= 255)
                        )
                          (Je = (1084 + ((Ye = Ct >>> 3) << 3)) | 0),
                            (Ct = ye[261]) & (Ye = 1 << Ye)
                              ? (Ye = ye[(Je + 8) >> 2])
                              : ((ye[261] = Ye | Ct), (Ye = Je)),
                            (ye[(Je + 8) >> 2] = At),
                            (ye[(Ye + 12) >> 2] = At),
                            (ye[(At + 12) >> 2] = Je),
                            (ye[(At + 8) >> 2] = Ye);
                        else {
                          (Je = 0),
                            (wn = Ct >>> 8) &&
                              ((Je = 31),
                              Ct >>> 0 > 16777215 ||
                                (Je =
                                  (28 +
                                    (((Je =
                                      ((((Vn =
                                        (wn <<= Xn =
                                          ((wn + 1048320) >>> 16) & 8) <<
                                        (Je = ((wn + 520192) >>> 16) & 4)) <<
                                        (wn = ((Vn + 245760) >>> 16) & 2)) >>>
                                        15) -
                                        (wn | Je | Xn)) |
                                      0) <<
                                      1) |
                                      ((Ct >>> (Je + 21)) & 1))) |
                                  0)),
                            (ye[((Ye = At) + 28) >> 2] = Je),
                            (ye[(At + 16) >> 2] = 0),
                            (ye[(At + 20) >> 2] = 0),
                            (Ye = (1348 + (Je << 2)) | 0);
                          i: {
                            if ((wn = 1 << Je) & Ot) {
                              for (
                                Je =
                                  Ct <<
                                  ((0 | Je) == 31 ? 0 : (25 - (Je >>> 1)) | 0),
                                  wn = ye[Ye >> 2];
                                ;

                              ) {
                                if ((-8 & ye[((Ye = wn) + 4) >> 2]) == (0 | Ct))
                                  break i;
                                if (
                                  ((wn = Je >>> 29),
                                  (Je <<= 1),
                                  !(wn =
                                    ye[(16 + (Xn = ((4 & wn) + Ye) | 0)) >> 2]))
                                )
                                  break;
                              }
                              ye[(Xn + 16) >> 2] = At;
                            } else (ye[262] = wn | Ot), (ye[Ye >> 2] = At);
                            (ye[(At + 24) >> 2] = Ye),
                              (ye[(At + 12) >> 2] = At),
                              (ye[(At + 8) >> 2] = At);
                            break n;
                          }
                          (Je = ye[(Ye + 8) >> 2]),
                            (ye[(Je + 12) >> 2] = At),
                            (ye[(Ye + 8) >> 2] = At),
                            (ye[(At + 24) >> 2] = 0),
                            (ye[(At + 12) >> 2] = Ye),
                            (ye[(At + 8) >> 2] = Je);
                        }
                        Je = (Pn + 8) | 0;
                        break e;
                      }
                      t: if (_n) {
                        Je = ye[(Ye + 28) >> 2];
                        n: {
                          if (
                            ye[(Ct = (1348 + (Je << 2)) | 0) >> 2] ==
                            (0 | Ye)
                          ) {
                            if (((ye[Ct >> 2] = Pn), Pn)) break n;
                            (ut = 1048), (Si = cr(Je) & gr), (ye[ut >> 2] = Si);
                            break t;
                          }
                          if (
                            ((ye[
                              (_n +
                                (ye[(_n + 16) >> 2] == (0 | Ye) ? 16 : 20)) >>
                                2
                            ] = Pn),
                            !Pn)
                          )
                            break t;
                        }
                        (ye[(Pn + 24) >> 2] = _n),
                          (Je = ye[(Ye + 16) >> 2]) &&
                            ((ye[(Pn + 16) >> 2] = Je),
                            (ye[(Je + 24) >> 2] = Pn)),
                          (Je = ye[(Ye + 20) >> 2]) &&
                            ((ye[(Pn + 20) >> 2] = Je),
                            (ye[(Je + 24) >> 2] = Pn));
                      }
                      At >>> 0 <= 15
                        ? ((Je = (At + wn) | 0),
                          (ye[(Ye + 4) >> 2] = 3 | Je),
                          (ye[(4 + (Je = (Je + Ye) | 0)) >> 2] =
                            1 | ye[(Je + 4) >> 2]))
                        : ((ye[(Ye + 4) >> 2] = 3 | wn),
                          (ye[(4 + (wn = (Ye + wn) | 0)) >> 2] = 1 | At),
                          (ye[(At + wn) >> 2] = At),
                          Ot &&
                            ((Je = (1084 + ((Ct = Ot >>> 3) << 3)) | 0),
                            (Pn = ye[266]),
                            (Ct = 1 << Ct) & Xn
                              ? (Ct = ye[(Je + 8) >> 2])
                              : ((ye[261] = Ct | Xn), (Ct = Je)),
                            (ye[(Je + 8) >> 2] = Pn),
                            (ye[(Ct + 12) >> 2] = Pn),
                            (ye[(Pn + 12) >> 2] = Je),
                            (ye[(Pn + 8) >> 2] = Ct)),
                          (ye[266] = wn),
                          (ye[263] = At)),
                        (Je = (Ye + 8) | 0);
                    }
                    return (Dt = (sn + 16) | 0), 0 | Je;
                  }
                  function st(Je) {
                    var sn = 0,
                      Ye = 0,
                      Ct = 0,
                      At = 0,
                      Pn = 0,
                      Xn = 0,
                      wn = 0,
                      Vn = 0,
                      Ot = 0;
                    e: if ((Je |= 0)) {
                      Pn =
                        ((Ct = (Je + -8) | 0) +
                          (Je = -8 & (Ye = ye[(Je + -4) >> 2]))) |
                        0;
                      t: if (!(1 & Ye)) {
                        if (
                          !(3 & Ye) ||
                          (Ct = (Ct - (Ye = ye[Ct >> 2])) | 0) >>> 0 < Ht[265]
                        )
                          break e;
                        if (((Je = (Je + Ye) | 0), ye[266] == (0 | Ct))) {
                          if ((3 & (Ye = ye[(Pn + 4) >> 2])) == 3)
                            return (
                              (ye[263] = Je),
                              (ye[(Pn + 4) >> 2] = -2 & Ye),
                              (ye[(Ct + 4) >> 2] = 1 | Je),
                              void (ye[(Je + Ct) >> 2] = Je)
                            );
                        } else {
                          if (Ye >>> 0 <= 255) {
                            if (
                              ((At = ye[(Ct + 8) >> 2]),
                              (Ye >>>= 3),
                              (0 | (sn = ye[(Ct + 12) >> 2])) == (0 | At))
                            ) {
                              (Vn = 1044),
                                (Ot = ye[261] & cr(Ye)),
                                (ye[Vn >> 2] = Ot);
                              break t;
                            }
                            (ye[(At + 12) >> 2] = sn), (ye[(sn + 8) >> 2] = At);
                            break t;
                          }
                          if (
                            ((wn = ye[(Ct + 24) >> 2]),
                            (0 | Ct) == (0 | (Ye = ye[(Ct + 12) >> 2])))
                          )
                            if (
                              (sn = ye[(At = (Ct + 20) | 0) >> 2]) ||
                              (sn = ye[(At = (Ct + 16) | 0) >> 2])
                            ) {
                              for (
                                ;
                                (Xn = At),
                                  (sn = ye[(At = ((Ye = sn) + 20) | 0) >> 2]) ||
                                    ((At = (Ye + 16) | 0),
                                    (sn = ye[(Ye + 16) >> 2]));

                              );
                              ye[Xn >> 2] = 0;
                            } else Ye = 0;
                          else
                            (sn = ye[(Ct + 8) >> 2]),
                              (ye[(sn + 12) >> 2] = Ye),
                              (ye[(Ye + 8) >> 2] = sn);
                          if (!wn) break t;
                          At = ye[(Ct + 28) >> 2];
                          n: {
                            if (
                              ye[(sn = (1348 + (At << 2)) | 0) >> 2] ==
                              (0 | Ct)
                            ) {
                              if (((ye[sn >> 2] = Ye), Ye)) break n;
                              (Vn = 1048),
                                (Ot = ye[262] & cr(At)),
                                (ye[Vn >> 2] = Ot);
                              break t;
                            }
                            if (
                              ((ye[
                                (wn +
                                  (ye[(wn + 16) >> 2] == (0 | Ct) ? 16 : 20)) >>
                                  2
                              ] = Ye),
                              !Ye)
                            )
                              break t;
                          }
                          if (
                            ((ye[(Ye + 24) >> 2] = wn),
                            (sn = ye[(Ct + 16) >> 2]) &&
                              ((ye[(Ye + 16) >> 2] = sn),
                              (ye[(sn + 24) >> 2] = Ye)),
                            !(sn = ye[(Ct + 20) >> 2]))
                          )
                            break t;
                          (ye[(Ye + 20) >> 2] = sn), (ye[(sn + 24) >> 2] = Ye);
                        }
                      }
                      if (
                        !(Pn >>> 0 <= Ct >>> 0) &&
                        1 & (Ye = ye[(Pn + 4) >> 2])
                      ) {
                        t: {
                          if (!(2 & Ye)) {
                            if (ye[267] == (0 | Pn)) {
                              if (
                                ((ye[267] = Ct),
                                (Je = (ye[264] + Je) | 0),
                                (ye[264] = Je),
                                (ye[(Ct + 4) >> 2] = 1 | Je),
                                ye[266] != (0 | Ct))
                              )
                                break e;
                              return (ye[263] = 0), void (ye[266] = 0);
                            }
                            if (ye[266] == (0 | Pn))
                              return (
                                (ye[266] = Ct),
                                (Je = (ye[263] + Je) | 0),
                                (ye[263] = Je),
                                (ye[(Ct + 4) >> 2] = 1 | Je),
                                void (ye[(Je + Ct) >> 2] = Je)
                              );
                            Je = ((-8 & Ye) + Je) | 0;
                            n: if (Ye >>> 0 <= 255) {
                              if (
                                ((Ye >>>= 3),
                                (0 | (sn = ye[(Pn + 8) >> 2])) ==
                                  (0 | (At = ye[(Pn + 12) >> 2])))
                              ) {
                                (Vn = 1044),
                                  (Ot = ye[261] & cr(Ye)),
                                  (ye[Vn >> 2] = Ot);
                                break n;
                              }
                              (ye[(sn + 12) >> 2] = At),
                                (ye[(At + 8) >> 2] = sn);
                            } else {
                              if (
                                ((wn = ye[(Pn + 24) >> 2]),
                                (0 | Pn) == (0 | (Ye = ye[(Pn + 12) >> 2])))
                              )
                                if (
                                  (sn = ye[(At = (Pn + 20) | 0) >> 2]) ||
                                  (sn = ye[(At = (Pn + 16) | 0) >> 2])
                                ) {
                                  for (
                                    ;
                                    (Xn = At),
                                      (sn =
                                        ye[(At = ((Ye = sn) + 20) | 0) >> 2]) ||
                                        ((At = (Ye + 16) | 0),
                                        (sn = ye[(Ye + 16) >> 2]));

                                  );
                                  ye[Xn >> 2] = 0;
                                } else Ye = 0;
                              else
                                (sn = ye[(Pn + 8) >> 2]),
                                  (ye[(sn + 12) >> 2] = Ye),
                                  (ye[(Ye + 8) >> 2] = sn);
                              if (wn) {
                                At = ye[(Pn + 28) >> 2];
                                i: {
                                  if (
                                    ye[(sn = (1348 + (At << 2)) | 0) >> 2] ==
                                    (0 | Pn)
                                  ) {
                                    if (((ye[sn >> 2] = Ye), Ye)) break i;
                                    (Vn = 1048),
                                      (Ot = ye[262] & cr(At)),
                                      (ye[Vn >> 2] = Ot);
                                    break n;
                                  }
                                  if (
                                    ((ye[
                                      (wn +
                                        (ye[(wn + 16) >> 2] == (0 | Pn)
                                          ? 16
                                          : 20)) >>
                                        2
                                    ] = Ye),
                                    !Ye)
                                  )
                                    break n;
                                }
                                (ye[(Ye + 24) >> 2] = wn),
                                  (sn = ye[(Pn + 16) >> 2]) &&
                                    ((ye[(Ye + 16) >> 2] = sn),
                                    (ye[(sn + 24) >> 2] = Ye)),
                                  (sn = ye[(Pn + 20) >> 2]) &&
                                    ((ye[(Ye + 20) >> 2] = sn),
                                    (ye[(sn + 24) >> 2] = Ye));
                              }
                            }
                            if (
                              ((ye[(Ct + 4) >> 2] = 1 | Je),
                              (ye[(Je + Ct) >> 2] = Je),
                              ye[266] != (0 | Ct))
                            )
                              break t;
                            return void (ye[263] = Je);
                          }
                          (ye[(Pn + 4) >> 2] = -2 & Ye),
                            (ye[(Ct + 4) >> 2] = 1 | Je),
                            (ye[(Je + Ct) >> 2] = Je);
                        }
                        if (Je >>> 0 <= 255)
                          return (
                            (Ye = (1084 + ((Je >>>= 3) << 3)) | 0),
                            (sn = ye[261]) & (Je = 1 << Je)
                              ? (Je = ye[(Ye + 8) >> 2])
                              : ((ye[261] = Je | sn), (Je = Ye)),
                            (ye[(Ye + 8) >> 2] = Ct),
                            (ye[(Je + 12) >> 2] = Ct),
                            (ye[(Ct + 12) >> 2] = Ye),
                            void (ye[(Ct + 8) >> 2] = Je)
                          );
                        (ye[(Ct + 16) >> 2] = 0),
                          (ye[(Ct + 20) >> 2] = 0),
                          (sn = 0),
                          (At = Je >>> 8) &&
                            ((sn = 31),
                            Je >>> 0 > 16777215 ||
                              ((sn = At),
                              (sn <<= At = ((At + 1048320) >>> 16) & 8),
                              (sn =
                                (28 +
                                  (((sn =
                                    ((((sn <<= wn =
                                      ((sn + 520192) >>> 16) & 4) <<
                                      (Xn = ((sn + 245760) >>> 16) & 2)) >>>
                                      15) -
                                      (Xn | At | wn)) |
                                    0) <<
                                    1) |
                                    ((Je >>> (sn + 21)) & 1))) |
                                0))),
                          (ye[((Ye = Ct) + 28) >> 2] = sn),
                          (Xn = (1348 + (sn << 2)) | 0);
                        t: if ((At = ye[262]) & (Ye = 1 << sn)) {
                          (At =
                            Je << ((0 | sn) == 31 ? 0 : (25 - (sn >>> 1)) | 0)),
                            (Ye = ye[Xn >> 2]);
                          n: {
                            for (;;) {
                              if (
                                ((sn = Ye),
                                (-8 & ye[(Ye + 4) >> 2]) == (0 | Je))
                              )
                                break n;
                              if (
                                ((Ye = At >>> 29),
                                (At <<= 1),
                                !(Ye =
                                  ye[(16 + (Xn = (sn + (4 & Ye)) | 0)) >> 2]))
                              )
                                break;
                            }
                            (ye[(Xn + 16) >> 2] = Ct),
                              (ye[(Ct + 12) >> 2] = Ct),
                              (ye[(Ct + 24) >> 2] = sn),
                              (ye[(Ct + 8) >> 2] = Ct);
                            break t;
                          }
                          (Je = ye[(sn + 8) >> 2]),
                            (ye[(Je + 12) >> 2] = Ct),
                            (ye[(sn + 8) >> 2] = Ct),
                            (ye[(Ct + 24) >> 2] = 0),
                            (ye[(Ct + 12) >> 2] = sn),
                            (ye[(Ct + 8) >> 2] = Je);
                        } else
                          (ye[262] = Ye | At),
                            (ye[Xn >> 2] = Ct),
                            (ye[(Ct + 12) >> 2] = Ct),
                            (ye[(Ct + 24) >> 2] = Xn),
                            (ye[(Ct + 8) >> 2] = Ct);
                        if (((Je = (ye[269] + -1) | 0), (ye[269] = Je), !Je)) {
                          for (
                            Ct = 1500;
                            (Ct = ((Je = ye[Ct >> 2]) + 8) | 0), Je;

                          );
                          ye[269] = -1;
                        }
                      }
                    }
                  }
                  function Xt(Je) {
                    var sn,
                      Ye = 0;
                    return Ht[(Je + 20) >> 2] <= Ht[(Je + 28) >> 2] ||
                      (Sn[ye[(Je + 36) >> 2]](Je, 0, 0), ye[(Je + 20) >> 2])
                      ? ((Ye = ye[(Je + 4) >> 2]) >>> 0 <
                          (sn = ye[(Je + 8) >> 2]) >>> 0 &&
                          ((Ye = (Ye - sn) | 0),
                          Sn[ye[(Je + 40) >> 2]](Je, Ye, Ye >> 31, 1)),
                        (ye[(Je + 28) >> 2] = 0),
                        (ye[(Je + 16) >> 2] = 0),
                        (ye[(Je + 20) >> 2] = 0),
                        (ye[(Je + 4) >> 2] = 0),
                        (ye[(Je + 8) >> 2] = 0),
                        0)
                      : -1;
                  }
                  function qn(Je) {
                    for (var sn = 0, Ye = 0; (Ye = sn), Je; )
                      (Je &= Je - 1), (sn = (sn + 1) | 0);
                    return Ye;
                  }
                  function cr(Je) {
                    var sn;
                    return (
                      (((-1 >>> (sn = 31 & Je)) & -2) << sn) |
                      (((-1 << (Je = (0 - Je) & 31)) & -2) >>> Je)
                    );
                  }
                  function Ui() {
                    return (Yt.byteLength / 65536) | 0;
                  }
                  return {
                    __wasm_call_ctors: function () {},
                    malloc: vn,
                    openBox: function (Je, sn) {
                      (Je |= 0), (sn |= 0);
                      var Ye,
                        Ct,
                        At,
                        Pn = 0;
                      return (
                        (Dt = Ye = (Dt - 16) | 0),
                        (ye[(Ye + 12) >> 2] = 0),
                        (ye[(Ye + 8) >> 2] = 0),
                        (ye[(Ye + 4) >> 2] = 0),
                        (ye[Ye >> 2] = 0),
                        (function (Xn, wn, Vn, Ot, _n, gr) {
                          var ut = 0,
                            Si = 0,
                            cn = 0,
                            ir = 0,
                            jr = 0,
                            Yr = 0;
                          if (
                            ((ut =
                              ((Gn[(Xn + 2) | 0] ^
                                Gn[(Xn + 1) | 0] ^
                                Gn[0 | Xn]) <<
                                24) >>
                              24),
                            (ye[gr >> 2] = ut + -48),
                            (ut = (47 + ((wn - ut) | 0)) | 0),
                            (ye[Ot >> 2] = ut),
                            (jr = Vn),
                            (Yr = vn(ut)),
                            (ye[jr >> 2] = Yr),
                            (Si = ye[gr >> 2]),
                            (cn = vn(Si)),
                            (ye[_n >> 2] = cn),
                            (0 | Si) > 0)
                          )
                            for (ut = Si; ; ) {
                              if (
                                ((cn = (((Si - ut) | 0) + cn) | 0),
                                (Si = (((wn - Si) | 0) + Xn) | 0),
                                (ar[0 | cn] =
                                  Gn[(((wn - ut) | 0) + Xn) | 0] ^
                                  Gn[(Si + -1) | 0] ^
                                  Gn[(Si + -2) | 0]),
                                (0 | (ut = (ut + -1) | 0)) < 1)
                              ) {
                                ut = ye[Ot >> 2];
                                break;
                              }
                              (cn = ye[_n >> 2]), (Si = ye[gr >> 2]);
                            }
                          if ((0 | ut) > 0)
                            for (
                              ;
                              (wn = (ye[Vn >> 2] + ir) | 0),
                                (ir = (ir + 1) | 0),
                                (ar[0 | wn] = Gn[(ir + Xn) | 0]),
                                (0 | ir) < ye[Ot >> 2];

                            );
                        })(
                          Je,
                          sn,
                          (Ye + 12) | 0,
                          (Ye + 4) | 0,
                          (Ye + 8) | 0,
                          Ye
                        ),
                        (function (Xn, wn) {
                          var Vn = 0,
                            Ot = 0,
                            _n = 0,
                            gr = 0,
                            ut = 0,
                            Si = 0,
                            cn = 0;
                          if ((0 | wn) >= 1)
                            for (
                              _n = 85, gr = 250;
                              (Ot = qn(Vn)),
                                (ut = Gn[0 | (Si = (Xn + Vn) | 0)]),
                                (cn = Ot),
                                (Ot = 1 & Vn),
                                (ar[0 | Si] =
                                  cn +
                                  ((21 +
                                    (((ut ^ (Ot ? _n : gr)) << 24) >> 24)) |
                                    0)),
                                (gr = Ot ? gr : ut),
                                (_n = Ot ? ut : _n),
                                (0 | (Vn = (Vn + 1) | 0)) != (0 | wn);

                            );
                        })((Je = ye[(Ye + 12) >> 2]), (sn = ye[(Ye + 4) >> 2])),
                        (Ct = (function (Xn) {
                          var wn = 0;
                          return (255 & (wn = (Xn + -48) | 0)) >>> 0 <= 9
                            ? (wn << 24) >> 24
                            : ((((Xn + -97) & 255) >>> 0 < 26
                                ? (Xn + -87) | 0
                                : -1) <<
                                24) >>
                                24;
                        })(ar[0 | Je])),
                        (ye[Ye >> 2] = Ct),
                        (At = vn((Pn = (sn - Ct) | 0))),
                        (ar[(At + (Pn = (Pn + -1) | 0)) | 0] = 0),
                        (0 | Pn) >= 1 &&
                          (function (Xn, wn, Vn) {
                            var Ot,
                              _n = 0;
                            if (Vn >>> 0 >= 8192) T(0 | Xn, 0 | wn, 0 | Vn);
                            else {
                              Ot = (Xn + Vn) | 0;
                              e: if (3 & (Xn ^ wn))
                                if (Ot >>> 0 < 4) Vn = Xn;
                                else if ((_n = (Ot + -4) | 0) >>> 0 < Xn >>> 0)
                                  Vn = Xn;
                                else
                                  for (
                                    Vn = Xn;
                                    (ar[0 | Vn] = Gn[0 | wn]),
                                      (ar[(Vn + 1) | 0] = Gn[(wn + 1) | 0]),
                                      (ar[(Vn + 2) | 0] = Gn[(wn + 2) | 0]),
                                      (ar[(Vn + 3) | 0] = Gn[(wn + 3) | 0]),
                                      (wn = (wn + 4) | 0),
                                      (Vn = (Vn + 4) | 0) >>> 0 <= _n >>> 0;

                                  );
                              else {
                                t: if ((0 | Vn) < 1) Vn = Xn;
                                else if (3 & Xn)
                                  for (Vn = Xn; ; ) {
                                    if (
                                      ((ar[0 | Vn] = Gn[0 | wn]),
                                      (wn = (wn + 1) | 0),
                                      (Vn = (Vn + 1) | 0) >>> 0 >= Ot >>> 0)
                                    )
                                      break t;
                                    if (!(3 & Vn)) break;
                                  }
                                else Vn = Xn;
                                if (
                                  !(
                                    (Xn = -4 & Ot) >>> 0 < 64 ||
                                    Vn >>> 0 > (_n = (Xn + -64) | 0) >>> 0
                                  )
                                )
                                  for (
                                    ;
                                    (ye[Vn >> 2] = ye[wn >> 2]),
                                      (ye[(Vn + 4) >> 2] = ye[(wn + 4) >> 2]),
                                      (ye[(Vn + 8) >> 2] = ye[(wn + 8) >> 2]),
                                      (ye[(Vn + 12) >> 2] = ye[(wn + 12) >> 2]),
                                      (ye[(Vn + 16) >> 2] = ye[(wn + 16) >> 2]),
                                      (ye[(Vn + 20) >> 2] = ye[(wn + 20) >> 2]),
                                      (ye[(Vn + 24) >> 2] = ye[(wn + 24) >> 2]),
                                      (ye[(Vn + 28) >> 2] = ye[(wn + 28) >> 2]),
                                      (ye[(Vn + 32) >> 2] = ye[(wn + 32) >> 2]),
                                      (ye[(Vn + 36) >> 2] = ye[(wn + 36) >> 2]),
                                      (ye[(Vn + 40) >> 2] = ye[(wn + 40) >> 2]),
                                      (ye[(Vn + 44) >> 2] = ye[(wn + 44) >> 2]),
                                      (ye[(Vn + 48) >> 2] = ye[(wn + 48) >> 2]),
                                      (ye[(Vn + 52) >> 2] = ye[(wn + 52) >> 2]),
                                      (ye[(Vn + 56) >> 2] = ye[(wn + 56) >> 2]),
                                      (ye[(Vn + 60) >> 2] = ye[(wn + 60) >> 2]),
                                      (wn = (wn - -64) | 0),
                                      (Vn = (Vn - -64) | 0) >>> 0 <= _n >>> 0;

                                  );
                                if (Vn >>> 0 >= Xn >>> 0) break e;
                                for (
                                  ;
                                  (ye[Vn >> 2] = ye[wn >> 2]),
                                    (wn = (wn + 4) | 0),
                                    (Vn = (Vn + 4) | 0) >>> 0 < Xn >>> 0;

                                );
                              }
                              if (Vn >>> 0 < Ot >>> 0)
                                for (
                                  ;
                                  (ar[0 | Vn] = Gn[0 | wn]),
                                    (wn = (wn + 1) | 0),
                                    (0 | Ot) != (0 | (Vn = (Vn + 1) | 0));

                                );
                            }
                          })(At, (Je + 1) | 0, (sn + (-1 ^ Ct)) | 0),
                        st(Je),
                        st(ye[(Ye + 8) >> 2]),
                        (Dt = (Ye + 16) | 0),
                        0 | At
                      );
                    },
                    free: st,
                    __errno_location: function () {
                      return 1024;
                    },
                    fflush: function Je(sn) {
                      var Ye = 0;
                      if ((sn |= 0)) return ye[(sn + 76) >> 2], 0 | Xt(sn);
                      if (
                        (ye[260] && (Ye = Je(ye[260])),
                        Ut(1028),
                        (sn = ye[259]))
                      )
                        for (
                          ;
                          Ht[(sn + 20) >> 2] > Ht[(sn + 28) >> 2] &&
                            (Ye = Xt(sn) | Ye),
                            (sn = ye[(sn + 56) >> 2]);

                        );
                      return pr(1028), 0 | Ye;
                    },
                    setThrew: function (Je, sn) {
                      (Je |= 0),
                        (sn |= 0),
                        ye[385] || ((ye[386] = sn), (ye[385] = Je));
                    },
                    stackSave: function () {
                      return 0 | Dt;
                    },
                    stackAlloc: function (Je) {
                      return (Dt = Je = (Dt - (Je |= 0)) & -16), 0 | Je;
                    },
                    stackRestore: function (Je) {
                      Dt = Je |= 0;
                    },
                    __growWasmMemory: function (Je) {
                      return (
                        0 |
                        (function (sn) {
                          sn |= 0;
                          var Ye = 0 | Ui(),
                            Ct = (Ye + sn) | 0;
                          if (Ye < Ct && Ct < 65536) {
                            var At = new ArrayBuffer(yr(Ct, 65536)),
                              Pn = new Ft.Int8Array(At);
                            Pn.set(ar),
                              (ar = Pn),
                              (ar = new Ft.Int8Array(At)),
                              new Ft.Int16Array(At),
                              (ye = new Ft.Int32Array(At)),
                              (Gn = new Ft.Uint8Array(At)),
                              new Ft.Uint16Array(At),
                              (Ht = new Ft.Uint32Array(At)),
                              new Ft.Float32Array(At),
                              new Ft.Float64Array(At),
                              (Yt = At),
                              (Qt.buffer = At);
                          }
                          return Ye;
                        })(0 | (Je |= 0))
                      );
                    },
                  };
                })(
                  {
                    Int8Array,
                    Int16Array,
                    Int32Array,
                    Uint8Array,
                    Uint16Array,
                    Uint32Array,
                    Float32Array,
                    Float64Array,
                    NaN: NaN,
                    Infinity: 1 / 0,
                    Math,
                  },
                  kt,
                  p.buffer
                ));
            return { exports: Wt };
          },
          instantiate: function (It, wt) {
            return {
              then: function (Mt, Wt) {
                Mt({ instance: new g.Instance(new g.Module(It, wt)) });
              },
            };
          },
          RuntimeError: Error,
        };
      (c = []),
        mD(g) !== "object" &&
          tt(
            "No WebAssembly support found. Build with -s WASM=0 to target JavaScript instead."
          );
      var y = new g.Table({ initial: 1, maximum: 1, element: "anyfunc" }),
        v = !1;
      function b(It, wt) {
        It || tt("Assertion failed: " + wt);
      }
      var w = typeof TextDecoder < "u" ? new TextDecoder("utf8") : void 0;
      function k(It, wt, Mt, Wt) {
        if (!(Wt > 0)) return 0;
        for (var Ft = Mt, un = Mt + Wt - 1, Yt = 0; Yt < It.length; ++Yt) {
          var Qt = It.charCodeAt(Yt);
          if (
            (Qt >= 55296 &&
              Qt <= 57343 &&
              (Qt =
                (65536 + ((1023 & Qt) << 10)) | (1023 & It.charCodeAt(++Yt))),
            Qt <= 127)
          ) {
            if (Mt >= un) break;
            wt[Mt++] = Qt;
          } else if (Qt <= 2047) {
            if (Mt + 1 >= un) break;
            (wt[Mt++] = 192 | (Qt >> 6)), (wt[Mt++] = 128 | (63 & Qt));
          } else if (Qt <= 65535) {
            if (Mt + 2 >= un) break;
            (wt[Mt++] = 224 | (Qt >> 12)),
              (wt[Mt++] = 128 | ((Qt >> 6) & 63)),
              (wt[Mt++] = 128 | (63 & Qt));
          } else {
            if (Mt + 3 >= un) break;
            Qt >= 2097152 &&
              f(
                "Invalid Unicode code point 0x" +
                  Qt.toString(16) +
                  " encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."
              ),
              (wt[Mt++] = 240 | (Qt >> 18)),
              (wt[Mt++] = 128 | ((Qt >> 12) & 63)),
              (wt[Mt++] = 128 | ((Qt >> 6) & 63)),
              (wt[Mt++] = 128 | (63 & Qt));
          }
        }
        return (wt[Mt] = 0), Mt - Ft;
      }
      function D(It) {
        for (var wt = 0, Mt = 0; Mt < It.length; ++Mt) {
          var Wt = It.charCodeAt(Mt);
          Wt >= 55296 &&
            Wt <= 57343 &&
            (Wt = (65536 + ((1023 & Wt) << 10)) | (1023 & It.charCodeAt(++Mt))),
            Wt <= 127 ? ++wt : (wt += Wt <= 2047 ? 2 : Wt <= 65535 ? 3 : 4);
        }
        return wt;
      }
      typeof TextDecoder < "u" && new TextDecoder("utf-16le");
      var $, N, P, I, O;
      function X(It, wt) {
        return It % wt > 0 && (It += wt - (It % wt)), It;
      }
      function G(It) {
        ($ = It),
          (r.HEAP8 = N = new Int8Array(It)),
          (r.HEAP16 = new Int16Array(It)),
          (r.HEAP32 = I = new Int32Array(It)),
          (r.HEAPU8 = P = new Uint8Array(It)),
          (r.HEAPU16 = new Uint16Array(It)),
          (r.HEAPU32 = O = new Uint32Array(It)),
          (r.HEAPF32 = new Float32Array(It)),
          (r.HEAPF64 = new Float64Array(It));
      }
      var H = 1712;
      b(!0, "stack must start aligned"), b(!0, "heap must start aligned");
      var E = 8192;
      r.TOTAL_STACK &&
        b(
          E === r.TOTAL_STACK,
          "the stack size can no longer be determined at runtime"
        );
      var S = r.TOTAL_MEMORY || 65536;
      function L() {
        b((3 & H) == 0),
          (O[1 + (H >> 2)] = 34821223),
          (O[2 + (H >> 2)] = 2310721022),
          (I[0] = 1668509029);
      }
      function W() {
        var It = O[1 + (H >> 2)],
          wt = O[2 + (H >> 2)];
        (It == 34821223 && wt == 2310721022) ||
          tt(
            "Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x02135467, but received 0x" +
              wt.toString(16) +
              " " +
              It.toString(16)
          ),
          I[0] !== 1668509029 &&
            tt(
              "Runtime error: The application has corrupted its heap memory area (address zero)!"
            );
      }
      function F(It) {
        for (; It.length > 0; ) {
          var wt = It.shift();
          if (typeof wt != "function") {
            var Mt = wt.func;
            typeof Mt == "number"
              ? wt.arg === void 0
                ? r.dynCall_v(Mt)
                : r.dynCall_vi(Mt, wt.arg)
              : Mt(wt.arg === void 0 ? null : wt.arg);
          } else wt();
        }
      }
      Object.getOwnPropertyDescriptor(r, "TOTAL_MEMORY") ||
        Object.defineProperty(r, "TOTAL_MEMORY", {
          configurable: !0,
          get: function () {
            tt(
              "Module.TOTAL_MEMORY has been replaced with plain INITIAL_TOTAL_MEMORY"
            );
          },
        }),
        b(
          S >= E,
          "TOTAL_MEMORY should be larger than TOTAL_STACK, was " +
            S +
            "! (TOTAL_STACK=" +
            E +
            ")"
        ),
        b(
          typeof Int32Array < "u" &&
            typeof Float64Array < "u" &&
            Int32Array.prototype.subarray !== void 0 &&
            Int32Array.prototype.set !== void 0,
          "JS engine does not provide full typed array support"
        ),
        (p = r.wasmMemory
          ? r.wasmMemory
          : new g.Memory({ initial: S / 65536 })) && ($ = p.buffer),
        b((S = $.byteLength) % 65536 == 0),
        G($),
        (I[388] = 9904),
        (function () {
          var It = new Int16Array(1),
            wt = new Int8Array(It.buffer);
          if (((It[0] = 25459), wt[0] !== 115 || wt[1] !== 99))
            throw "Runtime error: expected the system to be little-endian!";
        })();
      var oe = [],
        De = [],
        Xe = [],
        ze = [],
        ht = !1;
      b(
        Math.imul,
        "This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
      ),
        b(
          Math.fround,
          "This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
        ),
        b(
          Math.clz32,
          "This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
        ),
        b(
          Math.trunc,
          "This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"
        );
      var gt = 0,
        pt = null,
        $t = null,
        ot = {};
      function tt(It) {
        throw (
          (r.onAbort && r.onAbort(It),
          d((It += "")),
          h(It),
          (v = !0),
          (It =
            "abort(" +
            It +
            ") at " +
            (function () {
              var wt = (function () {
                var Ft = new Error();
                if (!Ft.stack) {
                  try {
                    throw new Error(0);
                  } catch (un) {
                    Ft = un;
                  }
                  if (!Ft.stack) return "(no stack trace available)";
                }
                return Ft.stack.toString();
              })();
              return (
                r.extraStackTrace &&
                  (wt +=
                    `
` + r.extraStackTrace()),
                (Mt = wt),
                (Wt = /\b_Z[\w\d_]+/g),
                Mt.replace(Wt, function (Ft) {
                  var un,
                    Yt =
                      ((un = Ft),
                      f(
                        "warning: build with  -s DEMANGLE_SUPPORT=1  to link in libcxxabi demangling"
                      ),
                      un);
                  return Ft === Yt ? Ft : Yt + " [" + Ft + "]";
                })
              );
              var Mt, Wt;
            })()),
          new g.RuntimeError(It))
        );
      }
      (r.preloadedImages = {}), (r.preloadedAudios = {});
      var He = {
        error: function () {
          tt(
            "Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with  -s FORCE_FILESYSTEM=1"
          );
        },
        init: function () {
          He.error();
        },
        createDataFile: function () {
          He.error();
        },
        createPreloadedFile: function () {
          He.error();
        },
        createLazyFile: function () {
          He.error();
        },
        open: function () {
          He.error();
        },
        mkdev: function () {
          He.error();
        },
        registerDevice: function () {
          He.error();
        },
        analyzePath: function () {
          He.error();
        },
        loadFilesFromDB: function () {
          He.error();
        },
        ErrnoError: function () {
          He.error();
        },
      };
      (r.FS_createDataFile = He.createDataFile),
        (r.FS_createPreloadedFile = He.createPreloadedFile);
      var de = "data:application/octet-stream;base64,";
      function ue(It) {
        return String.prototype.startsWith
          ? It.startsWith(de)
          : It.indexOf(de) === 0;
      }
      var Z,
        ie = "aw.wasm";
      function Ne() {
        try {
          if (c) return new Uint8Array(c);
          var It = (function (wt) {
            if (ue(wt))
              return (function (Mt) {
                try {
                  for (
                    var Wt = Pe(Mt), Ft = new Uint8Array(Wt.length), un = 0;
                    un < Wt.length;
                    ++un
                  )
                    Ft[un] = Wt.charCodeAt(un);
                  return Ft;
                } catch {
                  throw new Error("Converting base64 string to bytes failed.");
                }
              })(wt.slice(de.length));
          })(ie);
          if (It) return It;
          if (!l) throw "both async and sync fetching of the wasm failed";
        } catch (wt) {
          tt(wt);
        }
      }
      ue(ie) || ((Z = ie), (ie = r.locateFile ? r.locateFile(Z, u) : u + Z)),
        De.push({
          func: function () {
            hi();
          },
        });
      var Pe =
          typeof atob == "function"
            ? atob
            : function (It) {
                var wt,
                  Mt,
                  Wt,
                  Ft,
                  un,
                  Yt,
                  Qt =
                    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
                  Sn = "",
                  ar = 0;
                It = It.replace(/[^A-Za-z0-9\+\/\=]/g, "");
                do
                  (wt =
                    (Qt.indexOf(It.charAt(ar++)) << 2) |
                    ((Ft = Qt.indexOf(It.charAt(ar++))) >> 4)),
                    (Mt =
                      ((15 & Ft) << 4) |
                      ((un = Qt.indexOf(It.charAt(ar++))) >> 2)),
                    (Wt = ((3 & un) << 6) | (Yt = Qt.indexOf(It.charAt(ar++)))),
                    (Sn += String.fromCharCode(wt)),
                    un !== 64 && (Sn += String.fromCharCode(Mt)),
                    Yt !== 64 && (Sn += String.fromCharCode(Wt));
                while (ar < It.length);
                return Sn;
              },
        kt = {
          __lock: function () {},
          __unlock: function () {},
          emscripten_memcpy_big: function (It, wt, Mt) {
            P.set(P.subarray(wt, wt + Mt), It);
          },
          emscripten_resize_heap: function (It) {
            var wt = N.length;
            b(It > wt);
            var Mt = 65536,
              Wt = 2147418112;
            if (It > Wt)
              return (
                h(
                  "Cannot enlarge memory, asked to go up to " +
                    It +
                    " bytes, but the limit is " +
                    Wt +
                    " bytes!"
                ),
                !1
              );
            for (var Ft = Math.max(wt, 16777216); Ft < It; )
              (Ft =
                Ft <= 536870912
                  ? X(2 * Ft, Mt)
                  : Math.min(X((3 * Ft + 2147483648) / 4, Mt), Wt)) === wt &&
                f(
                  "Cannot ask for more memory since we reached the practical limit in browsers (which is just below 2GB), so the request would have failed. Requesting only " +
                    N.length
                );
            return (function (un) {
              try {
                return (
                  p.grow((un - $.byteLength + 65535) >> 16), G(p.buffer), 1
                );
              } catch (Yt) {
                console.error(
                  "emscripten_realloc_buffer: Attempted to grow heap from " +
                    $.byteLength +
                    " bytes to " +
                    un +
                    " bytes, but got error: " +
                    Yt
                );
              }
            })(Ft)
              ? (h(
                  "Warning: Enlarging memory arrays, this is not fast! " +
                    [wt, Ft]
                ),
                !0)
              : (h(
                  "Failed to grow the heap from " +
                    wt +
                    " bytes to " +
                    Ft +
                    " bytes, not enough memory!"
                ),
                !1);
          },
          memory: p,
          table: y,
        },
        Gt = (function () {
          var It,
            wt = { env: kt, wasi_unstable: kt };
          function Mt(Yt, Qt) {
            var Sn = Yt.exports;
            (r.asm = Sn),
              (function (ar) {
                if (
                  (gt--,
                  r.monitorRunDependencies && r.monitorRunDependencies(gt),
                  ar
                    ? (b(ot[ar]), delete ot[ar])
                    : h("warning: run dependency removed without ID"),
                  gt == 0 &&
                    (pt !== null && (clearInterval(pt), (pt = null)), $t))
                ) {
                  var ye = $t;
                  ($t = null), ye();
                }
              })("wasm-instantiate");
          }
          (It = "wasm-instantiate"),
            gt++,
            r.monitorRunDependencies && r.monitorRunDependencies(gt),
            It
              ? (b(!ot[It]),
                (ot[It] = 1),
                pt === null &&
                  typeof setInterval < "u" &&
                  (pt = setInterval(function () {
                    if (v) return clearInterval(pt), void (pt = null);
                    var Yt = !1;
                    for (var Qt in ot)
                      Yt ||
                        ((Yt = !0), h("still waiting on run dependencies:")),
                        h("dependency: " + Qt);
                    Yt && h("(end of list)");
                  }, 1e4)))
              : h("warning: run dependency added without ID");
          var Wt = r;
          function Ft(Yt) {
            b(
              r === Wt,
              "the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?"
            ),
              (Wt = null),
              Mt(Yt.instance);
          }
          function un(Yt) {
            return (
              !c && o && typeof fetch == "function"
                ? fetch(ie, { credentials: "same-origin" })
                    .then(function (Qt) {
                      if (!Qt.ok)
                        throw "failed to load wasm binary file at '" + ie + "'";
                      return Qt.arrayBuffer();
                    })
                    .catch(function () {
                      return Ne();
                    })
                : new Promise(function (Qt, Sn) {
                    Qt(Ne());
                  })
            )
              .then(function (Qt) {
                return g.instantiate(Qt, wt);
              })
              .then(Yt, function (Qt) {
                h("failed to asynchronously prepare wasm: " + Qt), tt(Qt);
              });
          }
          if (r.instantiateWasm)
            try {
              return r.instantiateWasm(wt, Mt);
            } catch (Yt) {
              return (
                h("Module.instantiateWasm callback failed with error: " + Yt),
                !1
              );
            }
          return (
            (function () {
              if (
                c ||
                typeof g.instantiateStreaming != "function" ||
                ue(ie) ||
                typeof fetch != "function"
              )
                return un(Ft);
              fetch(ie, { credentials: "same-origin" }).then(function (Yt) {
                return g.instantiateStreaming(Yt, wt).then(Ft, function (Qt) {
                  h("wasm streaming compile failed: " + Qt),
                    h("falling back to ArrayBuffer instantiation"),
                    un(Ft);
                });
              });
            })(),
            {}
          );
        })(),
        B = Gt.__wasm_call_ctors;
      Gt.__wasm_call_ctors = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          B.apply(null, arguments)
        );
      };
      var re = Gt.malloc;
      Gt.malloc = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          re.apply(null, arguments)
        );
      };
      var Ae = Gt.openBox;
      Gt.openBox = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          Ae.apply(null, arguments)
        );
      };
      var lt = Gt.free;
      Gt.free = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          lt.apply(null, arguments)
        );
      };
      var Et = Gt.__errno_location;
      Gt.__errno_location = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          Et.apply(null, arguments)
        );
      };
      var St = Gt.fflush;
      Gt.fflush = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          St.apply(null, arguments)
        );
      };
      var Lt = Gt.setThrew;
      Gt.setThrew = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          Lt.apply(null, arguments)
        );
      };
      var ln = Gt.stackSave;
      Gt.stackSave = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          ln.apply(null, arguments)
        );
      };
      var Ln = Gt.stackAlloc;
      Gt.stackAlloc = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          Ln.apply(null, arguments)
        );
      };
      var Tr = Gt.stackRestore;
      Gt.stackRestore = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          Tr.apply(null, arguments)
        );
      };
      var sr = Gt.__growWasmMemory;
      (Gt.__growWasmMemory = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          sr.apply(null, arguments)
        );
      }),
        (r.asm = Gt);
      var hi = (r.___wasm_call_ctors = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.__wasm_call_ctors.apply(null, arguments)
          );
        }),
        Ra = (r._malloc = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.malloc.apply(null, arguments)
          );
        });
      (r._openBox = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          r.asm.openBox.apply(null, arguments)
        );
      }),
        (r._free = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.free.apply(null, arguments)
          );
        }),
        (r.___errno_location = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.__errno_location.apply(null, arguments)
          );
        }),
        (r._fflush = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.fflush.apply(null, arguments)
          );
        }),
        (r._setThrew = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.setThrew.apply(null, arguments)
          );
        });
      var En = (r.stackSave = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          r.asm.stackSave.apply(null, arguments)
        );
      });
      (r.stackAlloc = function () {
        return (
          b(
            ht,
            "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
          ),
          b(
            !0,
            "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
          ),
          r.asm.stackAlloc.apply(null, arguments)
        );
      }),
        (r.stackRestore = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.stackRestore.apply(null, arguments)
          );
        });
      var Zn,
        on = (r.__growWasmMemory = function () {
          return (
            b(
              ht,
              "you need to wait for the runtime to be ready (e.g. wait for main() to be called)"
            ),
            b(
              !0,
              "the runtime was exited (use NO_EXIT_RUNTIME to keep it alive after main() exits)"
            ),
            r.asm.__growWasmMemory.apply(null, arguments)
          );
        });
      function rn(It) {
        function wt() {
          Zn ||
            ((Zn = !0),
            v ||
              (W(),
              b(!ht),
              (ht = !0),
              F(De),
              W(),
              F(Xe),
              r.onRuntimeInitialized && r.onRuntimeInitialized(),
              b(
                !r._main,
                'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]'
              ),
              (function () {
                if ((W(), r.postRun))
                  for (
                    typeof r.postRun == "function" && (r.postRun = [r.postRun]);
                    r.postRun.length;

                  )
                    (Mt = r.postRun.shift()), ze.unshift(Mt);
                var Mt;
                F(ze);
              })()));
        }
        gt > 0 ||
          (L(),
          (function () {
            if (r.preRun)
              for (
                typeof r.preRun == "function" && (r.preRun = [r.preRun]);
                r.preRun.length;

              )
                (Mt = r.preRun.shift()), oe.unshift(Mt);
            var Mt;
            F(oe);
          })(),
          gt > 0 ||
            (r.setStatus
              ? (r.setStatus("Running..."),
                setTimeout(function () {
                  setTimeout(function () {
                    r.setStatus("");
                  }, 1),
                    wt();
                }, 1))
              : wt(),
            W()));
      }
      if (
        ((r.asm = Gt),
        (r.intArrayFromString = function (It, wt, Mt) {
          var Wt = Mt > 0 ? Mt : D(It) + 1,
            Ft = new Array(Wt),
            un = k(It, Ft, 0, Ft.length);
          return wt && (Ft.length = un), Ft;
        }),
        Object.getOwnPropertyDescriptor(r, "intArrayToString") ||
          (r.intArrayToString = function () {
            tt(
              "'intArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "ccall") ||
          (r.ccall = function () {
            tt(
              "'ccall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "cwrap") ||
          (r.cwrap = function () {
            tt(
              "'cwrap' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "setValue") ||
          (r.setValue = function () {
            tt(
              "'setValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "getValue") ||
          (r.getValue = function () {
            tt(
              "'getValue' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "allocate") ||
          (r.allocate = function () {
            tt(
              "'allocate' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "getMemory") ||
          (r.getMemory = function () {
            tt(
              "'getMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "AsciiToString") ||
          (r.AsciiToString = function () {
            tt(
              "'AsciiToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "stringToAscii") ||
          (r.stringToAscii = function () {
            tt(
              "'stringToAscii' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "UTF8ArrayToString") ||
          (r.UTF8ArrayToString = function () {
            tt(
              "'UTF8ArrayToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (r.UTF8ToString = function (It, wt) {
          return It
            ? (function (Mt, Wt, Ft) {
                for (var un = Wt + Ft, Yt = Wt; Mt[Yt] && !(Yt >= un); ) ++Yt;
                if (Yt - Wt > 16 && Mt.subarray && w)
                  return w.decode(Mt.subarray(Wt, Yt));
                for (var Qt = ""; Wt < Yt; ) {
                  var Sn = Mt[Wt++];
                  if (128 & Sn) {
                    var ar = 63 & Mt[Wt++];
                    if ((224 & Sn) != 192) {
                      var ye = 63 & Mt[Wt++];
                      if (
                        ((240 & Sn) == 224
                          ? (Sn = ((15 & Sn) << 12) | (ar << 6) | ye)
                          : ((248 & Sn) != 240 &&
                              f(
                                "Invalid UTF-8 leading byte 0x" +
                                  Sn.toString(16) +
                                  " encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"
                              ),
                            (Sn =
                              ((7 & Sn) << 18) |
                              (ar << 12) |
                              (ye << 6) |
                              (63 & Mt[Wt++]))),
                        Sn < 65536)
                      )
                        Qt += String.fromCharCode(Sn);
                      else {
                        var Gn = Sn - 65536;
                        Qt += String.fromCharCode(
                          55296 | (Gn >> 10),
                          56320 | (1023 & Gn)
                        );
                      }
                    } else Qt += String.fromCharCode(((31 & Sn) << 6) | ar);
                  } else Qt += String.fromCharCode(Sn);
                }
                return Qt;
              })(P, It, wt)
            : "";
        }),
        Object.getOwnPropertyDescriptor(r, "stringToUTF8Array") ||
          (r.stringToUTF8Array = function () {
            tt(
              "'stringToUTF8Array' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "stringToUTF8") ||
          (r.stringToUTF8 = function () {
            tt(
              "'stringToUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "lengthBytesUTF8") ||
          (r.lengthBytesUTF8 = function () {
            tt(
              "'lengthBytesUTF8' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "UTF16ToString") ||
          (r.UTF16ToString = function () {
            tt(
              "'UTF16ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "stringToUTF16") ||
          (r.stringToUTF16 = function () {
            tt(
              "'stringToUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "lengthBytesUTF16") ||
          (r.lengthBytesUTF16 = function () {
            tt(
              "'lengthBytesUTF16' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "UTF32ToString") ||
          (r.UTF32ToString = function () {
            tt(
              "'UTF32ToString' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "stringToUTF32") ||
          (r.stringToUTF32 = function () {
            tt(
              "'stringToUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "lengthBytesUTF32") ||
          (r.lengthBytesUTF32 = function () {
            tt(
              "'lengthBytesUTF32' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (r.allocateUTF8 = function (It) {
          var wt = D(It) + 1,
            Mt = Ra(wt);
          return Mt && k(It, N, Mt, wt), Mt;
        }),
        Object.getOwnPropertyDescriptor(r, "stackTrace") ||
          (r.stackTrace = function () {
            tt(
              "'stackTrace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "addOnPreRun") ||
          (r.addOnPreRun = function () {
            tt(
              "'addOnPreRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "addOnInit") ||
          (r.addOnInit = function () {
            tt(
              "'addOnInit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "addOnPreMain") ||
          (r.addOnPreMain = function () {
            tt(
              "'addOnPreMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "addOnExit") ||
          (r.addOnExit = function () {
            tt(
              "'addOnExit' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "addOnPostRun") ||
          (r.addOnPostRun = function () {
            tt(
              "'addOnPostRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "writeStringToMemory") ||
          (r.writeStringToMemory = function () {
            tt(
              "'writeStringToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "writeArrayToMemory") ||
          (r.writeArrayToMemory = function () {
            tt(
              "'writeArrayToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "writeAsciiToMemory") ||
          (r.writeAsciiToMemory = function () {
            tt(
              "'writeAsciiToMemory' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "addRunDependency") ||
          (r.addRunDependency = function () {
            tt(
              "'addRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "removeRunDependency") ||
          (r.removeRunDependency = function () {
            tt(
              "'removeRunDependency' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "ENV") ||
          (r.ENV = function () {
            tt(
              "'ENV' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS") ||
          (r.FS = function () {
            tt(
              "'FS' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_createFolder") ||
          (r.FS_createFolder = function () {
            tt(
              "'FS_createFolder' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_createPath") ||
          (r.FS_createPath = function () {
            tt(
              "'FS_createPath' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_createDataFile") ||
          (r.FS_createDataFile = function () {
            tt(
              "'FS_createDataFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_createPreloadedFile") ||
          (r.FS_createPreloadedFile = function () {
            tt(
              "'FS_createPreloadedFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_createLazyFile") ||
          (r.FS_createLazyFile = function () {
            tt(
              "'FS_createLazyFile' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_createLink") ||
          (r.FS_createLink = function () {
            tt(
              "'FS_createLink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_createDevice") ||
          (r.FS_createDevice = function () {
            tt(
              "'FS_createDevice' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "FS_unlink") ||
          (r.FS_unlink = function () {
            tt(
              "'FS_unlink' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "GL") ||
          (r.GL = function () {
            tt(
              "'GL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "dynamicAlloc") ||
          (r.dynamicAlloc = function () {
            tt(
              "'dynamicAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "loadDynamicLibrary") ||
          (r.loadDynamicLibrary = function () {
            tt(
              "'loadDynamicLibrary' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "loadWebAssemblyModule") ||
          (r.loadWebAssemblyModule = function () {
            tt(
              "'loadWebAssemblyModule' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "getLEB") ||
          (r.getLEB = function () {
            tt(
              "'getLEB' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "getFunctionTables") ||
          (r.getFunctionTables = function () {
            tt(
              "'getFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "alignFunctionTables") ||
          (r.alignFunctionTables = function () {
            tt(
              "'alignFunctionTables' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "registerFunctions") ||
          (r.registerFunctions = function () {
            tt(
              "'registerFunctions' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "addFunction") ||
          (r.addFunction = function () {
            tt(
              "'addFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "removeFunction") ||
          (r.removeFunction = function () {
            tt(
              "'removeFunction' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "getFuncWrapper") ||
          (r.getFuncWrapper = function () {
            tt(
              "'getFuncWrapper' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "prettyPrint") ||
          (r.prettyPrint = function () {
            tt(
              "'prettyPrint' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "makeBigInt") ||
          (r.makeBigInt = function () {
            tt(
              "'makeBigInt' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "dynCall") ||
          (r.dynCall = function () {
            tt(
              "'dynCall' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "getCompilerSetting") ||
          (r.getCompilerSetting = function () {
            tt(
              "'getCompilerSetting' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "stackSave") ||
          (r.stackSave = function () {
            tt(
              "'stackSave' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "stackRestore") ||
          (r.stackRestore = function () {
            tt(
              "'stackRestore' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "stackAlloc") ||
          (r.stackAlloc = function () {
            tt(
              "'stackAlloc' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "establishStackSpace") ||
          (r.establishStackSpace = function () {
            tt(
              "'establishStackSpace' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "print") ||
          (r.print = function () {
            tt(
              "'print' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "printErr") ||
          (r.printErr = function () {
            tt(
              "'printErr' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "getTempRet0") ||
          (r.getTempRet0 = function () {
            tt(
              "'getTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "setTempRet0") ||
          (r.setTempRet0 = function () {
            tt(
              "'setTempRet0' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "callMain") ||
          (r.callMain = function () {
            tt(
              "'callMain' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "abort") ||
          (r.abort = function () {
            tt(
              "'abort' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (r.Pointer_stringify = function (It, wt) {
          tt(
            "this function has been removed - you should use UTF8ToString(ptr, maxBytesToRead) instead!"
          );
        }),
        Object.getOwnPropertyDescriptor(r, "warnOnce") ||
          (r.warnOnce = function () {
            tt(
              "'warnOnce' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        (r.writeStackCookie = L),
        (r.checkStackCookie = W),
        (r.abortStackOverflow = function (It) {
          tt(
            "Stack overflow! Attempted to allocate " +
              It +
              " bytes on the stack, but stack has only " +
              (H - En() + It) +
              " bytes available!"
          );
        }),
        Object.getOwnPropertyDescriptor(r, "intArrayFromBase64") ||
          (r.intArrayFromBase64 = function () {
            tt(
              "'intArrayFromBase64' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "tryParseAsDataURI") ||
          (r.tryParseAsDataURI = function () {
            tt(
              "'tryParseAsDataURI' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
            );
          }),
        Object.getOwnPropertyDescriptor(r, "ALLOC_NORMAL") ||
          Object.defineProperty(r, "ALLOC_NORMAL", {
            configurable: !0,
            get: function () {
              tt(
                "'ALLOC_NORMAL' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(r, "ALLOC_STACK") ||
          Object.defineProperty(r, "ALLOC_STACK", {
            configurable: !0,
            get: function () {
              tt(
                "'ALLOC_STACK' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(r, "ALLOC_DYNAMIC") ||
          Object.defineProperty(r, "ALLOC_DYNAMIC", {
            configurable: !0,
            get: function () {
              tt(
                "'ALLOC_DYNAMIC' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(r, "ALLOC_NONE") ||
          Object.defineProperty(r, "ALLOC_NONE", {
            configurable: !0,
            get: function () {
              tt(
                "'ALLOC_NONE' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ)"
              );
            },
          }),
        Object.getOwnPropertyDescriptor(r, "calledRun") ||
          Object.defineProperty(r, "calledRun", {
            configurable: !0,
            get: function () {
              tt(
                "'calledRun' was not exported. add it to EXTRA_EXPORTED_RUNTIME_METHODS (see the FAQ). Alternatively, forcing filesystem support (-s FORCE_FILESYSTEM=1) can export this for you"
              );
            },
          }),
        (r.then = function (It) {
          if (Zn) It(r);
          else {
            var wt = r.onRuntimeInitialized;
            r.onRuntimeInitialized = function () {
              wt && wt(), It(r);
            };
          }
          return r;
        }),
        ($t = function It() {
          Zn || rn(), Zn || ($t = It);
        }),
        (r.run = rn),
        r.preInit)
      )
        for (
          typeof r.preInit == "function" && (r.preInit = [r.preInit]);
          r.preInit.length > 0;

        )
          r.preInit.pop()();
      return rn(), e;
    };
  })(),
  TKr = (function () {
    function t(e, n) {
      Hh(this, t), (this.cdnHost = e), (this.cdnBucket = n);
    }
    return (
      Xh(t, [
        {
          key: "init",
          value: function () {
            var e = new Np();
            (this.module = {
              onRuntimeInitialized: function () {
                e.resolve();
              },
              onAbort: function (r) {
                e.reject(r);
              },
            }),
              this.cdnHost && (this.module.cdnHost = this.cdnHost);
            var n = this.cdnBucket ? "-".concat(this.cdnBucket) : "";
            return (
              (this.module.cdnBucket = "media-fe".concat(n)),
              _Kr(this.module),
              e
            );
          },
        },
        {
          key: "openBox",
          value: function (e) {
            try {
              var n = window.atob(e),
                r = Kr.str2hex(n),
                i = this.module._malloc(Number(r.length));
              this.module.HEAP8.set(r, i);
              var o = this.module._openBox(Number(i), r.length),
                l = this.module.UTF8ToString(o);
              return this.module._free(i), l;
            } catch {}
          },
        },
        {
          key: "destroy",
          value: function () {
            this.module = null;
          },
        },
      ]),
      t
    );
  })(),
  EKr = Di,
  SKr = sh.some,
  RKr = ME,
  AKr = RKr("some");
EKr(
  { target: "Array", proto: !0, forced: !AKr },
  {
    some: function (t) {
      return SKr(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Gfe = {},
  wKr = Gs;
Gfe.f = wKr;
var kKr = ja,
  IKr = kKr,
  P3e = IKr,
  DKr = pu,
  PKr = Gfe,
  MKr = Cu.f,
  CKr = function (t) {
    var e = P3e.Symbol || (P3e.Symbol = {});
    DKr(e, t) || MKr(e, t, { value: PKr.f(t) });
  },
  $Kr = zs,
  xKr = _m,
  LKr = Gs,
  OKr = ad,
  GKr = function () {
    var t = xKr("Symbol"),
      e = t && t.prototype,
      n = e && e.valueOf,
      r = LKr("toPrimitive");
    e &&
      !e[r] &&
      OKr(
        e,
        r,
        function (i) {
          return $Kr(n, this);
        },
        { arity: 1 }
      );
  },
  eF = Di,
  Nfe = ja,
  Ffe = zs,
  NKr = Fa,
  kI = Tl,
  Xw = OD,
  FKr = aa,
  qc = pu,
  UKr = Sb,
  foe = Yu,
  o7 = Sm,
  Ufe = G5,
  BKr = Qu,
  poe = MR,
  CL = CR,
  Vat = z5,
  HKr = CE,
  zat = HB,
  XKr = B5,
  jat = kb,
  Wat = Cu,
  VKr = oce,
  Kat = F5,
  Tq = ad,
  Bfe = LD,
  zKr = FB,
  Zat = N5,
  M3e = O5,
  jKr = Gs,
  WKr = Gfe,
  KKr = CKr,
  ZKr = GKr,
  YKr = LE,
  Yat = Tm,
  s7 = sh.forEach,
  If = zKr("hidden"),
  P9 = "Symbol",
  $L = "prototype",
  QKr = Yat.set,
  C3e = Yat.getterFor(P9),
  um = Object[$L],
  Vk = Nfe.Symbol,
  x6 = Vk && Vk[$L],
  JKr = Nfe.TypeError,
  Eq = Nfe.QObject,
  Qat = jat.f,
  AT = Wat.f,
  Jat = zat.f,
  qKr = Kat.f,
  qat = NKr([].push),
  sb = Bfe("symbols"),
  WO = Bfe("op-symbols"),
  eZr = Bfe("wks"),
  Sq = !Eq || !Eq[$L] || !Eq[$L].findChild,
  goe =
    kI &&
    FKr(function () {
      return (
        CL(
          AT({}, "a", {
            get: function () {
              return AT(this, "a", { value: 7 }).a;
            },
          })
        ).a != 7
      );
    })
      ? function (t, e, n) {
          var r = Qat(um, e);
          r && delete um[e], AT(t, e, n), r && t !== um && AT(um, e, r);
        }
      : AT,
  Rq = function (t, e) {
    var n = (sb[t] = CL(x6));
    return (
      QKr(n, { type: P9, tag: t, description: e }), kI || (n.description = e), n
    );
  },
  M9 = function (t, e, n) {
    t === um && M9(WO, e, n), foe(t);
    var r = Ufe(e);
    return (
      foe(n),
      qc(sb, r)
        ? (n.enumerable
            ? (qc(t, If) && t[If][r] && (t[If][r] = !1),
              (n = CL(n, { enumerable: poe(0, !1) })))
            : (qc(t, If) || AT(t, If, poe(1, {})), (t[If][r] = !0)),
          goe(t, r, n))
        : AT(t, r, n)
    );
  },
  moe = function (t, e) {
    foe(t);
    var n = o7(e),
      r = Vat(n).concat(eot(n));
    return (
      s7(r, function (i) {
        (kI && !Ffe(yoe, n, i)) || M9(t, i, n[i]);
      }),
      t
    );
  },
  tZr = function (t, e) {
    return e === void 0 ? CL(t) : moe(CL(t), e);
  },
  yoe = function (t) {
    var e = Ufe(t),
      n = Ffe(qKr, this, e);
    return (
      !(this === um && qc(sb, e) && !qc(WO, e)) &&
      (!(n || !qc(this, e) || !qc(sb, e) || (qc(this, If) && this[If][e])) || n)
    );
  },
  $3e = function (t, e) {
    var n = o7(t),
      r = Ufe(e);
    if (n !== um || !qc(sb, r) || qc(WO, r)) {
      var i = Qat(n, r);
      return (
        !i || !qc(sb, r) || (qc(n, If) && n[If][r]) || (i.enumerable = !0), i
      );
    }
  },
  x3e = function (t) {
    var e = Jat(o7(t)),
      n = [];
    return (
      s7(e, function (r) {
        qc(sb, r) || qc(Zat, r) || qat(n, r);
      }),
      n
    );
  },
  eot = function (t) {
    var e = t === um,
      n = Jat(e ? WO : o7(t)),
      r = [];
    return (
      s7(n, function (i) {
        !qc(sb, i) || (e && !qc(um, i)) || qat(r, sb[i]);
      }),
      r
    );
  };
Xw ||
  (Tq(
    (x6 = (Vk = function () {
      if (UKr(x6, this)) throw JKr("Symbol is not a constructor");
      var t =
          arguments.length && arguments[0] !== void 0
            ? BKr(arguments[0])
            : void 0,
        e = M3e(t),
        n = function (r) {
          this === um && Ffe(n, WO, r),
            qc(this, If) && qc(this[If], e) && (this[If][e] = !1),
            goe(this, e, poe(1, r));
        };
      return kI && Sq && goe(um, e, { configurable: !0, set: n }), Rq(e, t);
    })[$L]),
    "toString",
    function () {
      return C3e(this).tag;
    }
  ),
  Tq(Vk, "withoutSetter", function (t) {
    return Rq(M3e(t), t);
  }),
  (Kat.f = yoe),
  (Wat.f = M9),
  (VKr.f = moe),
  (jat.f = $3e),
  (HKr.f = zat.f = x3e),
  (XKr.f = eot),
  (WKr.f = function (t) {
    return Rq(jKr(t), t);
  }),
  kI &&
    (AT(x6, "description", {
      configurable: !0,
      get: function () {
        return C3e(this).description;
      },
    }),
    Tq(um, "propertyIsEnumerable", yoe, { unsafe: !0 }))),
  eF(
    { global: !0, constructor: !0, wrap: !0, forced: !Xw, sham: !Xw },
    { Symbol: Vk }
  ),
  s7(Vat(eZr), function (t) {
    KKr(t);
  }),
  eF(
    { target: P9, stat: !0, forced: !Xw },
    {
      useSetter: function () {
        Sq = !0;
      },
      useSimple: function () {
        Sq = !1;
      },
    }
  ),
  eF(
    { target: "Object", stat: !0, forced: !Xw, sham: !kI },
    {
      create: tZr,
      defineProperty: M9,
      defineProperties: moe,
      getOwnPropertyDescriptor: $3e,
    }
  ),
  eF({ target: "Object", stat: !0, forced: !Xw }, { getOwnPropertyNames: x3e }),
  ZKr(),
  YKr(Vk, P9),
  (Zat[If] = !0);
var nZr = OD,
  tot = nZr && !!Symbol.for && !!Symbol.keyFor,
  rZr = Di,
  iZr = _m,
  aZr = pu,
  oZr = Qu,
  not = LD,
  sZr = tot,
  Aq = not("string-to-symbol-registry"),
  lZr = not("symbol-to-string-registry");
rZr(
  { target: "Symbol", stat: !0, forced: !sZr },
  {
    for: function (t) {
      var e = oZr(t);
      if (aZr(Aq, e)) return Aq[e];
      var n = iZr("Symbol")(e);
      return (Aq[e] = n), (lZr[n] = e), n;
    },
  }
);
var uZr = Di,
  cZr = pu,
  dZr = GD,
  hZr = PR,
  fZr = LD,
  pZr = tot,
  L3e = fZr("symbol-to-string-registry");
uZr(
  { target: "Symbol", stat: !0, forced: !pZr },
  {
    keyFor: function (t) {
      if (!dZr(t)) throw TypeError(hZr(t) + " is not a symbol");
      if (cZr(L3e, t)) return L3e[t];
    },
  }
);
var gZr = Di,
  mZr = OD,
  yZr = aa,
  rot = B5,
  vZr = id,
  bZr =
    !mZr ||
    yZr(function () {
      rot.f(1);
    });
gZr(
  { target: "Object", stat: !0, forced: bZr },
  {
    getOwnPropertySymbols: function (t) {
      var e = rot.f;
      return e ? e(vZr(t)) : [];
    },
  }
);
var _Zr = Di,
  TZr = Tl,
  EZr = ja,
  tF = Fa,
  SZr = pu,
  RZr = Ss,
  AZr = Sb,
  wZr = Qu,
  kZr = Cu.f,
  IZr = zWe,
  R1 = EZr.Symbol,
  z2 = R1 && R1.prototype;
if (TZr && RZr(R1) && (!("description" in z2) || R1().description !== void 0)) {
  var O3e = {},
    nF = function () {
      var t =
          arguments.length < 1 || arguments[0] === void 0
            ? void 0
            : wZr(arguments[0]),
        e = AZr(z2, this) ? new R1(t) : t === void 0 ? R1() : R1(t);
      return t === "" && (O3e[e] = !0), e;
    };
  IZr(nF, R1), (nF.prototype = z2), (z2.constructor = nF);
  var DZr = String(R1("test")) == "Symbol(test)",
    PZr = tF(z2.valueOf),
    MZr = tF(z2.toString),
    CZr = /^Symbol\((.*)\)[^)]+$/,
    $Zr = tF("".replace),
    xZr = tF("".slice);
  kZr(z2, "description", {
    configurable: !0,
    get: function () {
      var t = PZr(this);
      if (SZr(O3e, t)) return "";
      var e = MZr(t),
        n = DZr ? xZr(e, 7, -1) : $Zr(e, CZr, "$1");
      return n === "" ? void 0 : n;
    },
  }),
    _Zr({ global: !0, constructor: !0, forced: !0 }, { Symbol: nF });
}
var iot = Rs,
  LZr = QKe,
  OZr = iot.aTypedArrayConstructor,
  GZr = iot.exportTypedArrayStaticMethod;
function Hfe() {
  var t = window.navigator.userAgent,
    e = t.indexOf("MSIE "),
    n = t.indexOf("Trident/");
  return e > 0 || n > 0;
}
function NZr() {
  var t = navigator.mimeTypes,
    e = navigator.userAgent,
    n = !1;
  return (
    t &&
      e.indexOf("Chrome") > 1 &&
      (n = Object.keys(t).some(function (r) {
        return (
          !!(t[r].type && t[r].type.indexOf("360") > -1) ||
          !!(
            t[r].type &&
            t[r].type.indexOf("application/vnd.chromium.remoting-viewer") > -1
          ) ||
          !!(t[r].description && t[r].description.indexOf("360") > -1)
        );
      })),
    n
  );
}
function aot() {
  var t, e, n, r, i;
  return !(
    !navigator.requestMediaKeySystemAccess ||
    ((t = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)),
    (e = Hfe()),
    (n = NZr()),
    (r = navigator.userAgent.indexOf("Firefox") > 0),
    (i = navigator.userAgent.indexOf("Edge") > 0),
    t || e || n || r || i)
  );
}
function Xfe() {
  try {
    if (
      (typeof WebAssembly > "u" ? "undefined" : mD(WebAssembly)) === "object" &&
      typeof WebAssembly.instantiate == "function"
    ) {
      var t = new WebAssembly.Module(
        Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0)
      );
      if (t instanceof WebAssembly.Module)
        return new WebAssembly.Instance(t) instanceof WebAssembly.Instance;
    }
  } catch (e) {
    console.log(e);
  }
  return !1;
}
function oot() {
  var t = (window.MediaSource = window.MediaSource || window.WebKitMediaSource);
  return t && typeof t.isTypeSupported == "function";
}
function FZr() {
  return oot() && Xfe() && !Hfe();
}
function UZr() {
  return Xfe() && !Hfe();
}
GZr(
  "of",
  function () {
    for (var t = 0, e = arguments.length, n = new (OZr(this))(e); e > t; )
      n[t] = arguments[t++];
    return n;
  },
  LZr
);
var BZr = (function () {
    function t(e) {
      Hh(this, t), (this.onTick_ = e), (this.cancelPending_ = null);
    }
    return (
      Xh(t, [
        {
          key: "tickAfter",
          value: function (e) {
            var n = this,
              r =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : null;
            this.stop();
            var i = !0,
              o = null;
            return (
              (this.cancelPending_ = function () {
                window.clearTimeout(o), (i = !1);
              }),
              (o = window.setTimeout(function () {
                i && (n.onTick_(), r && r());
              }, 1e3 * e)),
              this
            );
          },
        },
        {
          key: "tickEvery",
          value: function (e) {
            var n = this;
            this.tickAfter(e, function () {
              n.tickEvery(e);
            });
          },
        },
        {
          key: "stop",
          value: function () {
            this.cancelPending_ &&
              (this.cancelPending_(), (this.cancelPending_ = null));
          },
        },
      ]),
      t
    );
  })(),
  HZr = Di;
HZr({ global: !0, forced: parseFloat != _re }, { parseFloat: _re });
var $C = "PRELOAD_NEXT",
  L6 = "PRELOAD_SEG_DONE",
  wT = {
    PREPARE: "PREPARE",
    IDLE: "IDLE",
    PRELOADING: "PRELOADING",
    FINISH: "FINISH",
  },
  XZr = "ONE_STEP_DONE",
  VZr = { DURATION: 0, SIZE: 1 },
  zZr = { INDEXDB: 0, MEMORY: 1 },
  rF = { FAIL: -1, SUCCESS: 0, DOWNLOADING: 1 },
  jZr = { MP4: "MP4", DASH: "DASH", HLS: "HLS" };
function sot(t) {
  return (sot =
    typeof Symbol == "function" && typeof Symbol.iterator == "symbol"
      ? function (e) {
          return typeof e;
        }
      : function (e) {
          return e &&
            typeof Symbol == "function" &&
            e.constructor === Symbol &&
            e !== Symbol.prototype
            ? "symbol"
            : typeof e;
        })(t);
}
function YR(t, e) {
  if (!(t instanceof e))
    throw new TypeError("Cannot call a class as a function");
}
function G3e(t, e) {
  for (var n = 0; n < e.length; n++) {
    var r = e[n];
    (r.enumerable = r.enumerable || !1),
      (r.configurable = !0),
      "value" in r && (r.writable = !0),
      Object.defineProperty(t, r.key, r);
  }
}
function QR(t, e, n) {
  return (
    e && G3e(t.prototype, e),
    n && G3e(t, n),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    t
  );
}
var N3e,
  F3e,
  voe = { exports: {} },
  lot = { exports: {} },
  WZr = void 0,
  uot = function (t) {
    return t !== WZr && t !== null;
  },
  KZr = uot,
  ZZr = { object: !0, function: !0, undefined: !0 },
  YZr = function (t) {
    return !!KZr(t) && hasOwnProperty.call(ZZr, typeof t);
  },
  QZr = YZr,
  JZr = function (t) {
    if (!QZr(t)) return !1;
    try {
      return !!t.constructor && t.constructor.prototype === t;
    } catch {
      return !1;
    }
  },
  qZr = JZr,
  eYr = function (t) {
    if (typeof t != "function" || !hasOwnProperty.call(t, "length")) return !1;
    try {
      if (
        typeof t.length != "number" ||
        typeof t.call != "function" ||
        typeof t.apply != "function"
      )
        return !1;
    } catch {
      return !1;
    }
    return !qZr(t);
  },
  tYr = eYr,
  nYr = /^\s*class[\s{/}]/,
  rYr = Function.prototype.toString,
  iYr = function (t) {
    return !!tYr(t) && !nYr.test(rYr.call(t));
  },
  aYr = function () {
    var t,
      e = Object.assign;
    return (
      typeof e == "function" &&
      (e((t = { foo: "raz" }), { bar: "dwa" }, { trzy: "trzy" }),
      t.foo + t.bar + t.trzy === "razdwatrzy")
    );
  };
function oYr() {
  return F3e
    ? N3e
    : ((F3e = 1),
      (N3e = function () {
        try {
          return Object.keys("primitive"), !0;
        } catch {
          return !1;
        }
      }));
}
var U3e,
  B3e,
  H3e,
  X3e,
  V3e,
  z3e,
  wq,
  j3e,
  sYr = function () {},
  lYr = sYr(),
  l7 = function (t) {
    return t !== lYr && t !== null;
  };
function uYr() {
  if (B3e) return U3e;
  B3e = 1;
  var t = l7,
    e = Object.keys;
  return (U3e = function (n) {
    return e(t(n) ? Object(n) : n);
  });
}
function cYr() {
  return X3e ? H3e : ((X3e = 1), (H3e = oYr()() ? Object.keys : uYr()));
}
function dYr() {
  if (z3e) return V3e;
  z3e = 1;
  var t = l7;
  return (V3e = function (e) {
    if (!t(e)) throw new TypeError("Cannot use null or undefined");
    return e;
  });
}
function hYr() {
  if (j3e) return wq;
  j3e = 1;
  var t = cYr(),
    e = dYr(),
    n = Math.max;
  return (
    (wq = function (r, i) {
      var o,
        l,
        u,
        c = n(arguments.length, 2);
      for (
        r = Object(e(r)),
          u = function (d) {
            try {
              r[d] = i[d];
            } catch (h) {
              o || (o = h);
            }
          },
          l = 1;
        l < c;
        ++l
      )
        t((i = arguments[l])).forEach(u);
      if (o !== void 0) throw o;
      return r;
    }),
    wq
  );
}
var kq,
  W3e,
  fYr = aYr() ? Object.assign : hYr(),
  pYr = l7,
  gYr = Array.prototype.forEach,
  mYr = Object.create,
  yYr = function (t, e) {
    var n;
    for (n in t) e[n] = t[n];
  },
  vYr = function (t) {
    var e = mYr(null);
    return (
      gYr.call(arguments, function (n) {
        pYr(n) && yYr(Object(n), e);
      }),
      e
    );
  },
  Iq = "razdwatrzy",
  bYr = function () {
    return (
      typeof Iq.contains == "function" &&
      Iq.contains("dwa") === !0 &&
      Iq.contains("foo") === !1
    );
  };
function _Yr() {
  if (W3e) return kq;
  W3e = 1;
  var t = String.prototype.indexOf;
  return (
    (kq = function (e) {
      return t.call(this, e, arguments[1]) > -1;
    }),
    kq
  );
}
var TYr = bYr() ? String.prototype.contains : _Yr(),
  O6 = uot,
  K3e = iYr,
  cot = fYr,
  dot = vYr,
  sx = TYr,
  EYr = (lot.exports = function (t, e) {
    var n, r, i, o, l;
    return (
      arguments.length < 2 || typeof t != "string"
        ? ((o = e), (e = t), (t = null))
        : (o = arguments[2]),
      O6(t)
        ? ((n = sx.call(t, "c")), (r = sx.call(t, "e")), (i = sx.call(t, "w")))
        : ((n = i = !0), (r = !1)),
      (l = { value: e, configurable: n, enumerable: r, writable: i }),
      o ? cot(dot(o), l) : l
    );
  });
EYr.gs = function (t, e, n) {
  var r, i, o, l;
  return (
    typeof t != "string"
      ? ((o = n), (n = e), (e = t), (t = null))
      : (o = arguments[3]),
    O6(e)
      ? K3e(e)
        ? O6(n)
          ? K3e(n) || ((o = n), (n = void 0))
          : (n = void 0)
        : ((o = e), (e = n = void 0))
      : (e = void 0),
    O6(t)
      ? ((r = sx.call(t, "c")), (i = sx.call(t, "e")))
      : ((r = !0), (i = !1)),
    (l = { get: e, set: n, configurable: r, enumerable: i }),
    o ? cot(dot(o), l) : l
  );
};
var SYr = lot.exports,
  RYr = function (t) {
    if (typeof t != "function") throw new TypeError(t + " is not a function");
    return t;
  };
(function (t, e) {
  var n,
    r,
    i,
    o,
    l,
    u,
    c,
    d = SYr,
    h = RYr,
    f = Function.prototype.apply,
    p = Function.prototype.call,
    g = Object.create,
    y = Object.defineProperty,
    v = Object.defineProperties,
    b = Object.prototype.hasOwnProperty,
    w = { configurable: !0, enumerable: !1, writable: !0 };
  (r = function (k, D) {
    var $, N;
    return (
      h(D),
      (N = this),
      n.call(
        this,
        k,
        ($ = function () {
          i.call(N, k, $), f.call(D, this, arguments);
        })
      ),
      ($.__eeOnceListener__ = D),
      this
    );
  }),
    (o = function (k) {
      var D, $, N, P, I;
      if (b.call(this, "__ee__") && (P = this.__ee__[k]))
        if (typeof P == "object") {
          for ($ = arguments.length, I = new Array($ - 1), D = 1; D < $; ++D)
            I[D - 1] = arguments[D];
          for (P = P.slice(), D = 0; (N = P[D]); ++D) f.call(N, this, I);
        } else
          switch (arguments.length) {
            case 1:
              p.call(P, this);
              break;
            case 2:
              p.call(P, this, arguments[1]);
              break;
            case 3:
              p.call(P, this, arguments[1], arguments[2]);
              break;
            default:
              for (
                $ = arguments.length, I = new Array($ - 1), D = 1;
                D < $;
                ++D
              )
                I[D - 1] = arguments[D];
              f.call(P, this, I);
          }
    }),
    (l = {
      on: (n = function (k, D) {
        var $;
        return (
          h(D),
          b.call(this, "__ee__")
            ? ($ = this.__ee__)
            : (($ = w.value = g(null)), y(this, "__ee__", w), (w.value = null)),
          $[k]
            ? typeof $[k] == "object"
              ? $[k].push(D)
              : ($[k] = [$[k], D])
            : ($[k] = D),
          this
        );
      }),
      once: r,
      off: (i = function (k, D) {
        var $, N, P, I;
        if ((h(D), !b.call(this, "__ee__"))) return this;
        if (!($ = this.__ee__)[k]) return this;
        if (typeof (N = $[k]) == "object")
          for (I = 0; (P = N[I]); ++I)
            (P !== D && P.__eeOnceListener__ !== D) ||
              (N.length === 2 ? ($[k] = N[I ? 0 : 1]) : N.splice(I, 1));
        else (N !== D && N.__eeOnceListener__ !== D) || delete $[k];
        return this;
      }),
      emit: o,
    }),
    (u = { on: d(n), once: d(r), off: d(i), emit: d(o) }),
    (c = v({}, u)),
    (t.exports = e =
      function (k) {
        return k == null ? g(c) : v(Object(k), u);
      }),
    (e.methods = l);
})(voe, voe.exports);
var AYr = voe.exports,
  Vfe = xD(AYr),
  wYr = Di,
  kYr = oQe.values;
wYr(
  { target: "Object", stat: !0 },
  {
    values: function (t) {
      return kYr(t);
    },
  }
);
var IYr = l7,
  DYr = { function: !0, object: !0 },
  PYr = function (t) {
    return (IYr(t) && DYr[typeof t]) || !1;
  },
  MYr = PYr,
  CYr = function (t) {
    if (!MYr(t)) throw new TypeError(t + " is not an Object");
    return t;
  },
  $Yr = CYr,
  Z3e = Object.prototype.hasOwnProperty,
  xYr = function (t) {
    var e,
      n = arguments[1];
    if (($Yr(t), n === void 0)) Z3e.call(t, "__ee__") && delete t.__ee__;
    else {
      if (!(e = Z3e.call(t, "__ee__") && t.__ee__)) return;
      e[n] && delete e[n];
    }
  },
  LYr = xD(xYr),
  OYr = 10,
  GYr = (function () {
    function t(e, n, r, i, o) {
      YR(this, t),
        Vfe(this),
        (this.state = wT.PREPARE),
        (this.options = e || {}),
        (this.logger = e.logger || function () {}),
        (this._preloadManager = n),
        (this.player = n.player);
      var l = r.handlers,
        u = r.predictInst,
        c = r.readyPromise;
      (this._predictInst = u),
        (this._handlers = l),
        (this._predictInstReadyPromise = c),
        (this._toLoadList = []),
        (this.retryCount = 0),
        (this._cachedHandler = i),
        (this._cachedDataHanlder = o),
        (this.cnt = 0);
    }
    return (
      QR(t, [
        {
          key: "start",
          value: function () {
            var e = this,
              n = new vD();
            return (
              this._handlers
                .start(this.options)
                .then(function (r) {
                  r.onObtain().then(function (i) {
                    e._predictInstReadyPromise.then(function () {
                      e._predictInst.updateMediaInfos(i);
                      var o = e._predictInst.preloadPredict(e.options),
                        l = e._predictInst.cachedData;
                      e._cachedDataHanlder(
                        Object.assign({ vid: e.options.vid }, { data: l })
                      );
                      var u = Object.assign(o, e.options);
                      r.onTransform(u).then(function (c) {
                        (e._toLoadList = c), n.resolve(c);
                      });
                    });
                  });
                })
                .catch(function (r) {
                  n.reject(new Error("preload unit start error"));
                }),
              n
            );
          },
        },
        {
          key: "preloadSeg",
          value: function () {
            var e = this;
            if (this._toLoadList.length === 0)
              return (this.state = wT.FINISH), void this.emit(L6, !0);
            this.state = "PRELOADING";
            var n = this._toLoadList.shift();
            this._handlers
              .onRequest(n, function (r) {
                var i = Object.assign({}, n.extData, r);
                e._cachedHandler(i);
              })
              .then(function () {
                (e.state = wT.IDLE), e.emit(L6);
              })
              .catch(function (r) {
                e.requestError(), e.emit(L6, !1);
              });
          },
        },
        {
          key: "requestError",
          value: function () {
            this.retryCount++,
              (this.state = wT.IDLE),
              this.retryCount >= OYr && (this.state = wT.FINISH),
              this.emit(XZr),
              this.logger("preload request error");
          },
        },
        {
          key: "cancelLoading",
          value: function () {
            this._toLoadList = [];
          },
        },
        {
          key: "destroy",
          value: function () {
            LYr(this);
          },
        },
      ]),
      t
    );
  })();
function NYr() {
  try {
    if (typeof indexedDB < "u") return indexedDB;
    if (typeof webkitIndexedDB < "u") return webkitIndexedDB;
    if (typeof mozIndexedDB < "u") return mozIndexedDB;
    if (typeof OIndexedDB < "u") return OIndexedDB;
    if (typeof msIndexedDB < "u") return msIndexedDB;
  } catch {}
}
var C9 = NYr();
function FYr() {
  try {
    if (!C9 || !C9.open) return !1;
    var t =
        typeof openDatabase < "u" &&
        /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) &&
        !/Chrome/.test(navigator.userAgent) &&
        !/BlackBerry/.test(navigator.platform),
      e =
        typeof fetch == "function" &&
        fetch.toString().indexOf("[native code") !== -1;
    return (!t || e) && typeof indexedDB < "u" && typeof IDBKeyRange < "u";
  } catch {
    return !1;
  }
}
function J2(t, e) {
  e &&
    t.then(
      function (n) {
        e(null, n);
      },
      function (n) {
        e(n);
      }
    );
}
function UYr(t, e, n) {
  typeof e == "function" && t.then(e), typeof n == "function" && t.catch(n);
}
function Dq(t) {
  return (
    typeof t != "string" &&
      (console.warn("".concat(t, " used as a key, but it is not a string.")),
      (t = String(t))),
    t
  );
}
var z1 = {},
  Pq = "readonly",
  Mq = "readwrite";
function hot(t) {
  var e = z1[t.name],
    n = {};
  (n.promise = new Promise(function (r, i) {
    (n.resolve = r), (n.reject = i);
  })),
    e.deferredOperations.push(n),
    e.dbReady
      ? (e.dbReady = e.dbReady.then(function () {
          return n.promise;
        }))
      : (e.dbReady = n.promise);
}
function BYr(t) {
  var e = z1[t.name].deferredOperations.pop();
  if (e) return e.resolve(), e.promise;
}
function HYr(t, e) {
  var n = z1[t.name].deferredOperations.pop();
  if (n) return n.reject(e), n.promise;
}
function fot(t, e) {
  return new Promise(function (n, r) {
    if (((z1[t.name] = z1[t.name] || mot()), t.db)) {
      if (!e) return n(t.db);
      hot(t), t.db.close();
    }
    var i = [t.name];
    e && i.push(t.version);
    var o = C9.open.apply(C9, i);
    e &&
      (o.onupgradeneeded = function (l) {
        var u = o.result;
        try {
          u.createObjectStore(t.storeName);
        } catch (c) {
          if (c.name !== "ConstraintError") throw c;
          console.warn(
            'The database "' +
              t.name +
              '" has been upgraded from version ' +
              l.oldVersion +
              " to version " +
              l.newVersion +
              ', but the storage "' +
              t.storeName +
              '" already exists.'
          );
        }
      }),
      (o.onerror = function (l) {
        l.preventDefault(), r(o.error);
      }),
      (o.onsuccess = function () {
        n(o.result), BYr(t);
      });
  });
}
function pot(t) {
  return fot(t, !1);
}
function zfe(t) {
  return fot(t, !0);
}
function got(t, e) {
  if (!t.db) return !0;
  var n = !t.db.objectStoreNames.contains(t.storeName),
    r = t.version < t.db.version,
    i = t.version > t.db.version;
  if (
    (r &&
      (t.version !== e &&
        console.warn(
          'The database "' +
            t.name +
            `" can't be downgraded from version ` +
            t.db.version +
            " to version " +
            t.version +
            "."
        ),
      (t.version = t.db.version)),
    i || n)
  ) {
    if (n) {
      var o = t.db.version + 1;
      o > t.version && (t.version = o);
    }
    return !0;
  }
  return !1;
}
function XYr(t) {
  hot(t);
  for (var e = z1[t.name], n = e.forages, r = 0; r < n.length; r++) {
    var i = n[r];
    i._dbInfo.db && (i._dbInfo.db.close(), (i._dbInfo.db = null));
  }
  return (
    (t.db = null),
    pot(t)
      .then(function (o) {
        return (t.db = o), got(t) ? zfe(t) : o;
      })
      .then(function (o) {
        t.db = e.db = o;
        for (var l = 0; l < n.length; l++) n[l]._dbInfo.db = o;
      })
      .catch(function (o) {
        throw (HYr(t, o), o);
      })
  );
}
function q2(t, e, n, r) {
  r === void 0 && (r = 1);
  try {
    var i = t.db.transaction(t.storeName, e);
    n(null, i);
  } catch (o) {
    if (
      r > 0 &&
      (!t.db || o.name === "InvalidStateError" || o.name === "NotFoundError")
    )
      return Promise.resolve()
        .then(function () {
          if (
            !t.db ||
            (o.name === "NotFoundError" &&
              !t.db.objectStoreNames.contains(t.storeName) &&
              t.version <= t.db.version)
          )
            return t.db && (t.version = t.db.version + 1), zfe(t);
        })
        .then(function () {
          return XYr(t).then(function () {
            q2(t, e, n, r - 1);
          });
        })
        .catch(n);
    n(o);
  }
}
function mot() {
  return { forages: [], db: null, dbReady: null, deferredOperations: [] };
}
var VYr = (function () {
    function t() {
      YR(this, t);
    }
    return (
      QR(t, [
        {
          key: "ready",
          value: function () {
            return this._ready;
          },
        },
        {
          key: "_initStorage",
          value: function (e) {
            var n = this;
            n._defaultConfig = e;
            var r = { db: null };
            if (e) for (var i in e) r[i] = e[i];
            var o = z1[r.name];
            o || ((o = mot()), (z1[r.name] = o)),
              o.forages.push(n),
              n._initReady ||
                ((n._initReady = n.ready), (n.ready = n._fullyReady));
            var l = [];
            function u() {
              return Promise.resolve();
            }
            for (var c = 0; c < o.forages.length; c++) {
              var d = o.forages[c];
              d !== n && l.push(d._initReady().catch(u));
            }
            var h = o.forages.slice(0);
            return (
              (n._ready = Promise.all(l)
                .then(function () {
                  return (r.db = o.db), pot(r);
                })
                .then(function (f) {
                  return (
                    (r.db = f), got(r, n._defaultConfig.version) ? zfe(r) : f
                  );
                })
                .then(function (f) {
                  (r.db = o.db = f), (n._dbInfo = r);
                  for (var p = 0; p < h.length; p++) {
                    var g = h[p];
                    g !== n &&
                      ((g._dbInfo.db = r.db), (g._dbInfo.version = r.version));
                  }
                })),
              n._ready
            );
          },
        },
        {
          key: "probeSupport",
          get: function () {
            return FYr();
          },
        },
        {
          key: "getItem",
          value: function (e, n) {
            var r = this;
            e = Dq(e);
            var i = new Promise(function (o, l) {
              r.ready()
                .then(function () {
                  q2(r._dbInfo, Pq, function (u, c) {
                    if (u) return l(u);
                    try {
                      var d = c.objectStore(r._dbInfo.storeName).get(e);
                      (d.onsuccess = function () {
                        var h = d.result;
                        h === void 0 && (h = null), o(h);
                      }),
                        (d.onerror = function () {
                          l(d.error);
                        });
                    } catch (h) {
                      l(h);
                    }
                  });
                })
                .catch(l);
            });
            return J2(i, n), i;
          },
        },
        {
          key: "setItem",
          value: function (e, n, r) {
            var i = this;
            e = Dq(e);
            var o = new Promise(function (l, u) {
              i.ready()
                .then(function () {
                  return i._dbInfo, n;
                })
                .then(function (c) {
                  q2(i._dbInfo, Mq, function (d, h) {
                    if (d) return u(d);
                    try {
                      var f = h.objectStore(i._dbInfo.storeName);
                      c === null && (c = void 0);
                      var p = f.put(c, e);
                      (h.oncomplete = function () {
                        c === void 0 && (c = null), l(c);
                      }),
                        (h.onabort = h.onerror =
                          function () {
                            var g = p.error ? p.error : p.transaction.error;
                            u(g);
                          });
                    } catch (g) {
                      u(g);
                    }
                  });
                })
                .catch(u);
            });
            return J2(o, r), o;
          },
        },
        {
          key: "removeItem",
          value: function (e, n) {
            var r = this;
            e = Dq(e);
            var i = new Promise(function (o, l) {
              r.ready()
                .then(function () {
                  q2(r._dbInfo, Mq, function (u, c) {
                    if (u) return l(u);
                    try {
                      var d = c.objectStore(r._dbInfo.storeName).delete(e);
                      (c.oncomplete = function () {
                        o();
                      }),
                        (c.onerror = function () {
                          l(d.error);
                        }),
                        (c.onabort = function () {
                          var h = d.error ? d.error : d.transaction.error;
                          l(h);
                        });
                    } catch (h) {
                      l(h);
                    }
                  });
                })
                .catch(l);
            });
            return J2(i, n), i;
          },
        },
        {
          key: "clear",
          value: function (e) {
            var n = this,
              r = new Promise(function (i, o) {
                n.ready()
                  .then(function () {
                    q2(n._dbInfo, Mq, function (l, u) {
                      if (l) return o(l);
                      try {
                        var c = u.objectStore(n._dbInfo.storeName).clear();
                        (u.oncomplete = function () {
                          i();
                        }),
                          (u.onabort = u.onerror =
                            function () {
                              var d = c.error ? c.error : c.transaction.error;
                              o(d);
                            });
                      } catch (d) {
                        o(d);
                      }
                    });
                  })
                  .catch(o);
              });
            return J2(r, e), r;
          },
        },
        {
          key: "length",
          value: function (e) {
            var n = this,
              r = new Promise(function (i, o) {
                n.ready()
                  .then(function () {
                    q2(n._dbInfo, Pq, function (l, u) {
                      if (l) return o(l);
                      try {
                        var c = u.objectStore(n._dbInfo.storeName).count();
                        (c.onsuccess = function () {
                          i(c.result);
                        }),
                          (c.onerror = function () {
                            o(c.error);
                          });
                      } catch (d) {
                        o(d);
                      }
                    });
                  })
                  .catch(o);
              });
            return J2(r, e), r;
          },
        },
        {
          key: "all",
          value: function (e) {
            var n = this,
              r = new Promise(function (i, o) {
                n.ready()
                  .then(function () {
                    q2(n._dbInfo, Pq, function (l, u) {
                      if (l) return o(l);
                      try {
                        var c = u.objectStore(n._dbInfo.storeName).openCursor(),
                          d = [];
                        (c.onsuccess = function () {
                          var h = c.result;
                          h
                            ? (d.push({ key: h.key, value: h.value }),
                              h.continue())
                            : i(d);
                        }),
                          (c.onerror = function () {
                            o(c.error);
                          });
                      } catch (h) {
                        o(h);
                      }
                    });
                  })
                  .catch(o);
              });
            return J2(r, e), r;
          },
        },
        {
          key: "_fullyReady",
          value: function (e) {
            var n = this,
              r = n._initReady().then(function () {
                var i = z1[n._dbInfo.name];
                if (i && i.dbReady) return i.dbReady;
              });
            return UYr(r, e, e), r;
          },
        },
      ]),
      t
    );
  })(),
  Y3e = (function () {
    function t() {
      YR(this, t);
    }
    return (
      QR(t, [
        {
          key: "_initStorage",
          value: function (e) {
            var n = e.name + "_" + e.storeName;
            return (
              (this.key = n),
              (window[n] && sot(window[n]) === "object") || (window[n] = {}),
              (this.store = window[n]),
              Promise.resolve()
            );
          },
        },
        {
          key: "getItem",
          value: function (e, n) {
            var r = this.store[e];
            return r === void 0 && (r = null), this._internalPromise(n, r);
          },
        },
        {
          key: "setItem",
          value: function (e, n, r) {
            return (this.store[e] = n), this._internalPromise(r);
          },
        },
        {
          key: "removeItem",
          value: function (e, n) {
            return delete this.store[e], this._internalPromise(n);
          },
        },
        {
          key: "clear",
          value: function (e) {
            return (
              (this.store = {}),
              (window[this.key] = {}),
              this._internalPromise(e)
            );
          },
        },
        {
          key: "length",
          value: function (e) {
            var n = Object.keys(this.store).length;
            return this._internalPromise(e, n);
          },
        },
        {
          key: "_internalPromise",
          value: function (e, n) {
            var r = n ? Promise.resolve(n) : Promise.resolve();
            return J2(r, e), r;
          },
        },
        {
          key: "all",
          value: function (e) {
            for (
              var n = [], r = Object.keys(this.store), i = 0;
              i < r.length;
              i++
            ) {
              var o = r[i];
              n.push({ key: o, value: this.store[o] });
            }
            return this._internalPromise(e, n);
          },
        },
        {
          key: "probeSupport",
          value: function () {
            return !0;
          },
        },
      ]),
      t
    );
  })(),
  Q3e = {
    description: "",
    name: "__PRE_CACHE__",
    storeName: "keyvaluepairs",
    version: 1,
  },
  J3e = "|",
  q3e = "__PRE_CACHE__KEYS",
  e4e = "$",
  zYr = 200,
  jYr = (function () {
    function t(e, n) {
      YR(this, t);
      var r = n === zZr.MEMORY ? Y3e : VYr;
      (this._driver = new r()),
        this._driver._initStorage(Q3e).catch(function () {}),
        (this._hasIdbForbidden = !1),
        (this._maxCache = !e || e <= 0 ? zYr : e),
        this.setMaxCache(this._maxCache),
        (this._allCachedKeys = {}),
        (this._allCachedTimeKeys = {}),
        this.getCachedKeysFromLocal(),
        (this._readyPromise = new vD()),
        this.init();
    }
    return (
      QR(t, [
        {
          key: "getCachedKeysFromLocal",
          value: function () {
            var e = Jae.getItem(q3e);
            if (e)
              for (var n = e.split(J3e), r = 0; r < n.length; r++) {
                var i = n[r],
                  o = this._getCacheKeyInfos(i),
                  l = o.time,
                  u = o.cachedKey;
                (this._allCachedKeys[u] = 1), (this._allCachedTimeKeys[u] = l);
              }
          },
        },
        {
          key: "_getCacheKeyInfos",
          value: function (e) {
            var n,
              r = e.split(e4e);
            return (
              r.length === 2 && ((n = r[0]), (e = r[1])),
              { time: n, cachedKey: e }
            );
          },
        },
        {
          key: "writeCachedKeysToLocal",
          value: function (e) {
            var n = [];
            (this._allCachedKeys = {}), (this._allCachedTimeKeys = {});
            for (var r = 0; r < e.length; r++) {
              var i = e[r].key,
                o = this._getCacheKeyInfos(i),
                l = o.time,
                u = o.cachedKey;
              (this._allCachedKeys[u] = 1),
                (this._allCachedTimeKeys[u] = l),
                n.push(i);
            }
            var c = n.join(J3e);
            Jae.setItem(q3e, c);
          },
        },
        {
          key: "init",
          value: function () {
            var e = this;
            this._driver
              .setItem("test", "test")
              .then(function () {})
              .catch(function () {
                e._hasIdbForbidden = !0;
              })
              .finally(function () {
                e._driver.removeItem("test").catch(function () {}),
                  e._hasIdbForbidden &&
                    ((e._driver = new Y3e()), e._driver._initStorage(Q3e)),
                  e._getAll(),
                  e._readyPromise.resolve();
              });
          },
        },
        {
          key: "_getAll",
          value: function () {
            var e = this;
            this._driver
              .all()
              .then(function (n) {
                e._cachedLength = n.length;
                var r = n.length - e._maxCache,
                  i = n;
                if (r > 0) {
                  var o = n.slice(0, r);
                  i = n.slice(r);
                  for (var l = 0; l < o.length; l++)
                    e.removeItem(o[l].key).then(function () {});
                }
                e.writeCachedKeysToLocal(i);
              })
              .catch(function () {});
          },
        },
        {
          key: "getItem",
          value: function (e, n) {
            if (!this.hasItem(e)) return Promise.resolve(!1);
            var r = this._getTimeKey(e).timeKey;
            return this._driver.getItem(r, n);
          },
        },
        {
          key: "setItem",
          value: function (e, n, r) {
            var i = this;
            this._getTimeKey(e).timeKey && this.removeItem(e);
            var o = new Date().getTime();
            (this._allCachedKeys[e] = 1), (this._allCachedTimeKeys[e] = o);
            var l = this._genTimeKey(e, o);
            return (
              (r = r
                ? function () {
                    i._getAll(), r();
                  }
                : function () {
                    i._getAll();
                  }),
              this._driver.setItem(l, n, r)
            );
          },
        },
        {
          key: "_getTimeKey",
          value: function (e) {
            var n = this._allCachedTimeKeys[e],
              r = e;
            return n && (r = this._genTimeKey(e, n)), { timeKey: r, time: n };
          },
        },
        {
          key: "_genTimeKey",
          value: function (e, n) {
            return "".concat(n).concat(e4e).concat(e);
          },
        },
        {
          key: "removeItem",
          value: function (e, n) {
            var r = this._getTimeKey(e).timeKey,
              i = this._driver.removeItem(r, n);
            return (
              delete this._allCachedKeys[e],
              delete this._allCachedTimeKeys[e],
              i
            );
          },
        },
        {
          key: "hasItem",
          value: function (e) {
            return !!this._allCachedKeys[e];
          },
        },
        {
          key: "clear",
          value: function (e) {
            return this._driver.clear(e);
          },
        },
        {
          key: "length",
          value: function (e) {
            return this._driver.length(e);
          },
        },
        {
          key: "setMaxCache",
          value: function (e) {
            typeof e == "number" && e > 0 && (this._maxCache = e);
          },
        },
      ]),
      t
    );
  })(),
  WYr = "DEFAULT",
  yot = (function () {
    function t() {
      var e =
          arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
        n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {},
        r =
          arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
      YR(this, t),
        Vfe(this),
        (this._preloadDataList = []),
        (this._currentPreloadInst = null),
        (this._dashPreloadList = []),
        (this.autoPreload = e.autoPreload || !1),
        (this._onPreloadNext = this.onPreloadNextReady.bind(this)),
        this.on($C, this._onPreloadNext),
        (this._preloaderConfigs = {}),
        this.update(e, n, r),
        (this._cacheInst = new jYr(e.preloadMaxCacheCount, e.preloadCacheType)),
        (this._preloadCacheProgress = {}),
        (this._ptag_ = !0),
        (this._cachedDatas = {});
    }
    return (
      QR(
        t,
        [
          {
            key: "_getProloaderKey",
            value: function (e) {
              return e.vtype ? e.vtype : WYr;
            },
          },
          {
            key: "update",
            value: function (e) {
              var n =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                r =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : null;
              if (!r) throw new Error("PreloaderManager predictInst is null");
              var i = this._getProloaderKey(e);
              this._preloaderConfigs[i] = {
                predictInst: r,
                readyPromise: r.init(e),
                handlers: n,
              };
            },
          },
          {
            key: "cachedDatas",
            get: function () {
              return this._cachedDatas;
            },
          },
          {
            key: "onCacheSegment",
            value: function (e) {
              var n = e.vid,
                r = e.format,
                i = e.cacheKey,
                o = e.total,
                l = e.loaded,
                u = e.isInitSegment,
                c = e.mediaType,
                d = this.getProgressCacheKey(n, r, c),
                h = this._preloadCacheProgress[d];
              h || (h = this._preloadCacheProgress[d] = {}),
                (h[i] = { total: o, loaded: l, isInitSegment: u });
            },
          },
          {
            key: "onCachePredict",
            value: function (e) {
              var n = e.vid,
                r = e.data;
              n && r && (this._cachedDatas[n] = r);
            },
          },
          {
            key: "getProgressCacheKey",
            value: function (e, n, r) {
              return "".concat(e, "-").concat(n, "-").concat(r);
            },
          },
          {
            key: "onPreloadNextReady",
            value: function () {
              this.onPreloadNext();
            },
          },
          {
            key: "onPreloadSegDone",
            value: function () {
              this.autoPreload && this.emit($C);
            },
          },
          {
            key: "onPreloadNext",
            value: function () {
              var e = this;
              if (
                this._currentPreloadInst == null &&
                this._preloadDataList.length > 0
              ) {
                if (this._preloadDataList.length > 0) {
                  var n = this._preloadDataList.shift().data;
                  if (n.payload) {
                    var r = this._getProloaderKey(n),
                      i = this._preloaderConfigs[r];
                    if (!i)
                      return void console.warn(
                        "need to set vtype, no preloader",
                        n
                      );
                    (this._currentPreloadInst = new GYr(
                      n,
                      this,
                      i,
                      function (o) {
                        e.onCacheSegment(o);
                      },
                      function (o) {
                        e.onCachePredict(o);
                      }
                    )),
                      this._currentPreloadInst.on(
                        L6,
                        this.onPreloadSegDone.bind(this)
                      ),
                      this._currentPreloadInst
                        .start()
                        .then(function () {
                          e._currentPreloadInst.preloadSeg();
                        })
                        .catch(function () {
                          e._currentPreloadInst = null;
                        });
                  }
                }
              } else
                this._currentPreloadInst != null &&
                  (this._currentPreloadInst.state === wT.IDLE
                    ? this._currentPreloadInst.preloadSeg()
                    : this._currentPreloadInst.state === wT.FINISH
                    ? (this._currentPreloadInst.destroy(),
                      (this._currentPreloadInst = null))
                    : this._currentPreloadInst.state === wT.PREPARE &&
                      (this._currentPreloadInst.cnt++,
                      this._currentPreloadInst.cnt > 2 &&
                        (this._currentPreloadInst.destroy(),
                        (this._currentPreloadInst = null))));
            },
          },
          {
            key: "addDashPreloader",
            value: function (e) {
              e &&
                e.data &&
                (this._preloadDataList.push(e),
                this.sort(this._preloadDataList),
                this.autoPreload && this.emit($C));
            },
          },
          {
            key: "_addDashPreloader",
            value: function (e) {
              e && e.data && this._preloadDataList.push(e);
            },
          },
          {
            key: "addDashPreloaderList",
            value: function () {
              var e =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : [];
              this.sort(e);
              for (var n = 0; n < e.length; n++) this._addDashPreloader(e[n]);
            },
          },
          {
            key: "sort",
            value: function (e) {
              e.sort(function (n, r) {
                return (n.order === void 0 && n.order === void 0) ||
                  n.order < r.order
                  ? -1
                  : 1;
              });
            },
          },
          {
            key: "destroy",
            value: function () {
              this.off($C, this._onPreloadNext);
            },
          },
          {
            key: "cancelLoading",
            value: function () {
              this._currentPreloadInst &&
                (this._currentPreloadInst.cancelLoading(),
                (this._currentPreloadInst = null)),
                (this._preloadDataList = []);
            },
          },
          {
            key: "preloadCacheProgress",
            value: function (e) {
              var n = e.vid,
                r = e.format,
                i = e.mediaType,
                o = e.prelaodType,
                l = e.bitrate,
                u = e.set_duration,
                c = e.set_size,
                d = e.media_type,
                h = e.start_time,
                f = this.getProgressCacheKey(n, r, i),
                p = this._preloadCacheProgress[f];
              if (p) {
                for (
                  var g = Object.values(p),
                    y = 0,
                    v = 0,
                    b = 0,
                    w = 0,
                    k = 0,
                    D = 0;
                  D < g.length;
                  D++
                ) {
                  var $ = g[D];
                  $.isInitSegment &&
                    ((y = $.total),
                    (b = $.loaded),
                    (w = $.loaded === $.total ? rF.SUCCESS : rF.DOWNLOADING)),
                    (v += $.total),
                    (k += $.loaded);
                }
                return {
                  media_type: d,
                  preload_type: o,
                  stream_bitrate: l,
                  header_size: y,
                  content_total_size: v,
                  start_time: h || -1,
                  state_info: {
                    set_duration: u,
                    set_size: c,
                    current_header_download_size: b,
                    current_content_download_size: k,
                    header_download_state: w,
                    content_download_state:
                      k === v ? rF.SUCCESS : rF.DOWNLOADING,
                  },
                };
              }
              return null;
            },
          },
          { key: "getPreloadTaskInfos", value: function () {} },
          {
            key: "getItem",
            value: function (e, n) {
              return this._cacheInst.getItem(e, n);
            },
          },
          {
            key: "setItem",
            value: function (e, n, r) {
              return this._cacheInst.setItem(e, n, r);
            },
          },
          {
            key: "removeItem",
            value: function (e, n) {
              return this.removeItem(e, n);
            },
          },
        ],
        [
          {
            key: "getInstance",
            value: function () {
              var e =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : {},
                n =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                r =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : null,
                i = t.GLOBAL_KEY + (e.globalKey ? e.globalKey : ""),
                o = window[i];
              if (o && o._ptag_) return o.update(e, n, r), o;
              var l = new t(e, n, r);
              return (window[i] = l), l;
            },
          },
        ]
      ),
      t
    );
  })();
yot.GLOBAL_KEY = "__preloadcontext__";
var KYr = (function () {
    function t(e) {
      YR(this, t),
        Vfe(this),
        (this.options = e),
        this.promisePolyfill(),
        this.before(),
        this.check(),
        (this._preloadManager = yot.getInstance(
          e,
          this.handlers,
          this.predictInst
        )),
        (this.loadingTasks = []);
    }
    return (
      QR(t, [
        {
          key: "promisePolyfill",
          value: function () {
            Promise.prototype.finally ||
              (Promise.prototype.finally = function (e) {
                var n = function (r) {
                  return Promise.resolve(e()).then(r);
                };
                return this.then(
                  function (r) {
                    return n(function () {
                      return r;
                    });
                  },
                  function (r) {
                    return n(function () {
                      return Promise.reject(r);
                    });
                  }
                );
              });
          },
        },
        {
          key: "before",
          value: function () {
            throw new Error("need");
          },
        },
        {
          key: "check",
          value: function () {
            if (!this.handlers) throw new Error("handlers null");
            if (!this.handlers.start || !this.handlers.onRequest)
              throw new Error("handlers callback null");
            if (!this.predictInst) throw new Error("predictInst null");
            if (!this.predictInst.__p__)
              throw new Error("predictInst need extends predictbase");
          },
        },
        {
          key: "preloadNext",
          value: function () {
            this._preloadManager.emit($C);
          },
        },
        {
          key: "preloadManager",
          get: function () {
            return this._preloadManager;
          },
        },
        {
          key: "start",
          value: function (e) {
            throw new Error("start need implment, return Promise");
          },
        },
        {
          key: "cancelLoading",
          value: function () {
            for (var e = 0; e < this.loadingTasks.length; e++)
              try {
                var n = this.loadingTasks[e];
                typeof n.cancel == "function" && n.cancel();
              } catch {}
            (this.loadingTasks = []), this._preloadManager.cancelLoading();
          },
        },
        {
          key: "addTasker",
          value: function (e) {
            this.loadingTasks.push(e);
          },
        },
        {
          key: "removeTasker",
          value: function (e) {
            var n = this;
            setTimeout(function () {
              for (var r = n.loadingTasks.length - 1; r > -1; r--)
                if (n.loadingTasks[r] === e) {
                  n.loadingTasks.splice(r, 1);
                  break;
                }
            });
          },
        },
        {
          key: "addDashPreloader",
          value: function (e) {
            this._preloadManager.addDashPreloader(e);
          },
        },
        {
          key: "addDashPreloaderList",
          value: function () {
            var e =
              arguments.length > 0 && arguments[0] !== void 0
                ? arguments[0]
                : [];
            this._preloadManager.addDashPreloaderList(e);
          },
        },
      ]),
      t
    );
  })(),
  ZYr = (function () {
    function t() {
      YR(this, t),
        (this.bandwidth2item = {}),
        (this._mediaInfos = null),
        (this.__p__ = !0);
    }
    return (
      QR(t, [
        {
          key: "init",
          value: function () {
            throw new Error("init func not implement, return promise");
          },
        },
        {
          key: "preloadPredict",
          value: function (e) {
            throw new Error("preloadPredict error", e);
          },
        },
        {
          key: "updateMediaInfos",
          value: function (e) {
            if (
              ((this._mediaInfos = e),
              (this.bandwidth2item = {}),
              (this.dynamic_video = e && e.dynamic_video_list),
              this.dynamic_video && this.dynamic_video.length > 0)
            )
              for (var n = 0; n < this.dynamic_video.length; n++) {
                var r = this.dynamic_video[n];
                this.bandwidth2item[r.bitrate || r.bandwidth] = r;
              }
          },
        },
        {
          key: "getIdx",
          value: function (e, n) {
            var r = 0;
            return (
              e.forEach(function (i, o) {
                i.definition === n && (r = o);
              }),
              r
            );
          },
        },
        {
          key: "cachedData",
          get: function () {
            return null;
          },
        },
      ]),
      t
    );
  })(),
  eS = jZr,
  iF = { H264: "h264", H265: "h265" },
  YYr = 1,
  j2 = VZr,
  QYr = 8e5,
  t4e = null,
  JYr = (function (t) {
    sP(n, ZYr);
    var e = lP(n);
    function n() {
      return Hh(this, n), e.apply(this, arguments);
    }
    return (
      Xh(n, [
        {
          key: "init",
          value: function () {
            return Promise.resolve();
          },
        },
        {
          key: "preloadPredict",
          value: function (r) {
            return r;
          },
        },
      ]),
      n
    );
  })(),
  ok = (function (t) {
    sP(l, KYr);
    var e,
      n,
      r,
      i,
      o = lP(l);
    function l(u, c) {
      var d;
      return (
        Hh(this, l),
        (u.vtype = eS.MP4),
        ((d = o.call(this, u)).player = c),
        (d.loadingCount = 0),
        (d._mp4 = null),
        (d._loader = null),
        (d._pendingPromise = null),
        (d.playerId = c.playerId),
        d
      );
    }
    return (
      Xh(
        l,
        [
          {
            key: "log",
            value: function (u) {
              for (
                var c = "[Preloader] ".concat(u),
                  d = arguments.length,
                  h = new Array(d > 1 ? d - 1 : 0),
                  f = 1;
                f < d;
                f++
              )
                h[f - 1] = arguments[f];
              ks.apply(void 0, [c].concat(h));
            },
          },
          {
            key: "before",
            value: function () {
              var u = this;
              (this.handlers = {
                start: function (c) {
                  var d = c.payload || [];
                  if (d.length === 0) return Promise.reject();
                  var h = c.vid,
                    f = c.vtype || eS.MP4,
                    p = c.codecType || iF.H264,
                    g = u.getUserSelectDefinition(),
                    y = u.checkCacheKey(h, d, g, f, p);
                  if (
                    (console.log(
                      "[Preloader] "
                        .concat(h, " codecType:")
                        .concat(p, " vtype:")
                        .concat(f, " hasCache:")
                        .concat(y)
                    ),
                    y || f === "MP3")
                  )
                    return Promise.reject();
                  var v = u.getInitDefinition(d, u.options.definition, g);
                  if (
                    (console.log(
                      "[Preloader] ".concat(h, " getInitDefinition"),
                      v
                    ),
                    !v)
                  )
                    return Promise.reject();
                  var b = v.definition,
                    w = c.preloadTime || u.options.preloadTime,
                    k =
                      c.preloadSize ||
                      u.options.preloadSize ||
                      Math.pow(25, 4) - 1,
                    D = l.generateUniqueKey({
                      vid: h,
                      definition: b,
                      vtype: f,
                      codecType: p,
                    });
                  ks(
                    "[Preloader] "
                      .concat(h, " start duration:")
                      .concat(v.duration, " cacheKey:")
                      .concat(D)
                  );
                  var $ = kf(
                    {
                      vid: h,
                      definition: b,
                      preloadTime: w,
                      preloadSize: k,
                      cacheKey: D,
                      codecType: p,
                      vtype: f,
                    },
                    v
                  );
                  return u.loadingCount++, u.start($);
                },
                onRequest: function (c, d) {
                  var h = c.url,
                    f = c.range,
                    p = c.extData;
                  return u.getData(h, f, p, d);
                },
              }),
                (this.loggerConfig = { logger: function () {}, openLog: !1 }),
                (this.predictInst = new JYr(this.loggerConfig));
            },
          },
          {
            key: "start",
            value: function (u) {
              var c = this,
                d = {
                  mediaInfos: {
                    dynamic_video_list: [],
                    dynamic_audio_list: [],
                  },
                  onObtain: function () {
                    var h = new Np();
                    return h.resolve(d.mediaInfos), h;
                  },
                  onTransform: function (h) {
                    var f = new Np();
                    c._pendingPromise = f;
                    var p = u.preloadTime,
                      g = u.codecType;
                    return (
                      p && (g !== iF.H265 || c.options.supportHevc)
                        ? c.loadByPreloadTime(u, f)
                        : c.loadByChunkSize(u, f),
                      f
                    );
                  },
                };
              return Promise.resolve(d);
            },
          },
          {
            key: "getInitDefinition",
            value: function (u, c) {
              var d =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : null,
                h = null;
              if (l.BitRateAdapter)
                (h = l.BitRateAdapter.getSuitableBitrate(u, d)),
                  this.log("Mp4Preloader.BitRateAdapter", h);
              else {
                for (var f = 0, p = 0; p < u.length; p++)
                  if (u[p].definition === c) {
                    f = p;
                    break;
                  }
                h = u[f];
              }
              return h || (h = u[0]), h;
            },
          },
          {
            key: "getPreLoadData",
            value: function (u) {
              var c = this,
                d = new Np();
              return (
                this.getItemSameVid(u)
                  .then(function (h) {
                    if ((c.log("getPreLoadData", h.value), h.value)) {
                      var f = h.value,
                        p = f.mediaSegList,
                        g = f.meta,
                        y = f.type,
                        v = f.buffer,
                        b = f.preloadTime,
                        w = f.vid,
                        k = f.cacheKey,
                        D = f.definition,
                        $ = f.byteLength,
                        N = f.duration,
                        P = f.fileSize,
                        I = f.from,
                        O = f.vtype,
                        X = f.codecType,
                        G = f.initSeg,
                        H = {
                          vid: w,
                          type: y,
                          vtype: O,
                          codecType: X,
                          definition: D,
                          bitrate: f.bitrate,
                          cacheKey: k,
                          duration: N || 0,
                          byteLength: $,
                          from: I,
                          meta: g,
                        };
                      y === j2.SIZE
                        ? ((H.buffer = v), (H.fileSize = P || 0))
                        : ((H.mediaSegList = p),
                          (H.preloadTime = b),
                          (H.initSeg = G)),
                        d.resolve(H);
                    } else d.resolve(null);
                  })
                  .catch(function (h) {
                    d.reject(h);
                  }),
                d
              );
            },
          },
          {
            key: "setPreLoadData",
            value:
              ((i = Eu(
                Ya().mark(function u(c, d) {
                  var h,
                    f,
                    p,
                    g,
                    y,
                    v,
                    b,
                    w,
                    k,
                    D,
                    $,
                    N,
                    P,
                    I,
                    O,
                    X,
                    G,
                    H,
                    E = this;
                  return Ya().wrap(
                    function (S) {
                      for (;;)
                        switch ((S.prev = S.next)) {
                          case 0:
                            return (
                              (h = new Np()),
                              (f = d.mediaSegList),
                              (p = d.meta),
                              (g = d.vid),
                              (y = d.definition),
                              (v = d.type),
                              (b = d.buffer),
                              (w = d.duration),
                              (k = d.byteLength),
                              (D = d.preloadTime),
                              ($ = d.preloadSize),
                              (N = d.fileSize),
                              (P = d.from),
                              (I = d.vtype),
                              (O = d.codecType),
                              (X = d.initSeg),
                              (G = d.bitrate),
                              (H = {
                                codecType: O,
                                vtype: I,
                                vid: g,
                                definition: y,
                                cacheKey: c,
                                type: v,
                                from: P,
                                meta: p,
                                fileSize: N,
                                bitrate: G,
                              }),
                              v === j2.SIZE
                                ? ((H.buffer = b),
                                  (H.byteLength = k || 0),
                                  (H.preloadSize = $ || 0),
                                  (H.fileSize = N),
                                  H.buffer &&
                                    H.buffer.byteLength > 0 &&
                                    (this.setItem(c, H), h.resolve(!0)))
                                : ((H.mediaSegList = f || []),
                                  (H.duration = w),
                                  (H.byteLength = k || 0),
                                  (H.preloadTime = D || 0),
                                  (H.initSeg = X),
                                  p && f.length === 0
                                    ? (this.setItem(c, H), h.resolve(!0))
                                    : (f.every(function (L) {
                                        return !!L.buffer && L.state;
                                      }) || h.resolve(!1),
                                      this.setItem(c, H).then(function () {
                                        E.log(
                                          "setPreLoadData1 success",
                                          c,
                                          new Date().getTime()
                                        );
                                      }),
                                      h.resolve(!0))),
                              S.abrupt("return", h)
                            );
                          case 5:
                          case "end":
                            return S.stop();
                        }
                    },
                    u,
                    this
                  );
                })
              )),
              function (u, c) {
                return i.apply(this, arguments);
              }),
          },
          {
            key: "getInitCacheData",
            value: function (u, c) {
              var d = {
                type: u,
                meta: null,
                byteLength: 0,
                fileSize: 0,
                bitrate: 0,
              };
              return (
                u === j2.DURATION
                  ? ((d.mediaSegList = []),
                    (d.initSeg = null),
                    (d.duration = 0))
                  : (d.buffer = null),
                Object.keys(c).map(function (h) {
                  d[h] = c[h];
                }),
                d
              );
            },
          },
          {
            key: "updatePreCacheData",
            value: function (u, c, d, h, f, p, g) {
              var y = u.mediaSegList;
              if (u.type === j2.SIZE || f === -1)
                return (
                  (u.buffer = Xk(
                    Uint8Array,
                    u.buffer.buffer || [],
                    new Uint8Array(c)
                  )),
                  u
                );
              for (var v = -1, b = 0; b < y.length; b++)
                if (y[b].index === f) {
                  v = b;
                  break;
                }
              var w = p || [0, 0];
              return (
                v > -1
                  ? (c &&
                      (y[v].buffer = Xk(
                        Uint8Array,
                        y[v].buffer || [],
                        new Uint8Array(c)
                      )),
                    d.length > 1 &&
                      (y[v].range.length > 1
                        ? (y[v].range[1] = d[1])
                        : (y[v].range = d)),
                    g[1] !== -1 && (h = y[v].range[1] >= g[1]),
                    (y[v].state = h))
                  : ((u.duration = w[1]),
                    y.push({
                      buffer: c,
                      range: d || [],
                      index: f,
                      totalRange: g || [],
                      timeRange: [w[0], w[1]],
                      state: h,
                    })),
                h && (u.byteLength = d[1]),
                h
              );
            },
          },
          {
            key: "checkCacheKey",
            value: function (u, c, d) {
              var h =
                  arguments.length > 3 && arguments[3] !== void 0
                    ? arguments[3]
                    : eS.MP4,
                f =
                  arguments.length > 4 && arguments[4] !== void 0
                    ? arguments[4]
                    : iF.H264;
              if (d) {
                var p = l.generateUniqueKey({
                  vid: u,
                  definition: d,
                  vtype: h,
                  codecType: f,
                });
                return this.hasItemSameVid(p) ? p : null;
              }
              for (var g = 0; g < c.length; g++) {
                var y = l.generateUniqueKey({
                  vid: u,
                  definition: c[g].definition,
                  vtype: h,
                  codecType: f,
                });
                if (this.hasItemSameVid(y)) return y;
              }
              return null;
            },
          },
          {
            key: "checkCanPreloadNext",
            value: function () {
              var u = !0;
              return (
                this.loadingCount >= YYr && (u = !1), u && this.preloadNext(), u
              );
            },
          },
          {
            key: "loadByPreloadTime",
            value: function (u, c) {
              var d = this,
                h = u.vid,
                f = u.cacheKey,
                p = u.preloadTime,
                g = u.definition,
                y = u.duration,
                v = u.bitrate,
                b = u.codecType,
                w = u.vtype,
                k = null;
              if (
                (k =
                  Kr.typeOf(u.url) === "Array"
                    ? u.url.length > 1
                      ? u.url[1].src
                      : u.url[0].src
                    : u.url)
              ) {
                k = Kr.extUrl(k, { __vid: h });
                var D =
                  p >= this.options.segmentMinDuration
                    ? this.options.segmentMinDuration
                    : p;
                this.log(
                  "loadByPreloadTime",
                  ""
                    .concat(u.cacheKey, ", definition:")
                    .concat(u.definition, ",segmentMinDuration:")
                    .concat(D),
                  u
                );
                var $ = Kr.getFileSize(v, y);
                this._mp4 = new CC(
                  k,
                  v,
                  kf(
                    {
                      segmentDuration: D,
                      codecType: this.codecType,
                      chunkSize: this.options.preloadSize,
                      duration: y,
                      fileSize: $,
                      playerId: this.playerId,
                      vid: h,
                      useUrlRange: !1,
                      retryCount: 1,
                      retryDelay: 1e3,
                      supportHevc: this.options.supportHevc,
                    },
                    this.options.reqOptions
                  ),
                  null,
                  null,
                  {},
                  [],
                  this.firstFrameTime,
                  ""
                );
                var N = this.getInitCacheData(j2.DURATION, {
                  vid: h,
                  preloadTime: p,
                  definition: g,
                  cacheKey: f,
                  codecType: b,
                  vtype: w,
                  bitrate: v || 0,
                });
                this._mp4.once("metaReady", function (P) {
                  d.log(
                    "".concat(h, " metaReady this._pendingPromise"),
                    d._pendingPromise.state
                  ),
                    (N.meta = P),
                    (N.from = 2),
                    d._mp4.cancelLoading(),
                    d.startLoadByFragments(N, u, c);
                }),
                  this._mp4.on("error", function (P) {
                    console.error(
                      "[Preloader] ".concat(h, " loadByPreloadTime error"),
                      P
                    ),
                      d._endLoadFragments();
                  }),
                  this._mp4.init({});
              } else this._endLoadFragments();
            },
          },
          {
            key: "loadByChunkSize",
            value:
              ((r = Eu(
                Ya().mark(function u(c) {
                  var d,
                    h,
                    f,
                    p,
                    g,
                    y,
                    v,
                    b,
                    w,
                    k,
                    D,
                    $,
                    N,
                    P,
                    I,
                    O,
                    X,
                    G = this;
                  return Ya().wrap(
                    function (H) {
                      for (;;)
                        switch ((H.prev = H.next)) {
                          case 0:
                            if (
                              ((d = c.vid),
                              (h = c.cacheKey),
                              (f = c.definition),
                              (p = c.duration),
                              (g = c.bitrate),
                              (y = c.codecType),
                              (v = c.vtype),
                              (b = this.options),
                              (w =
                                Kr.typeOf(c.url) === "Array"
                                  ? c.url[0].src
                                  : c.url))
                            ) {
                              H.next = 6;
                              break;
                            }
                            return this._endLoadChunk(), H.abrupt("return");
                          case 6:
                            return (
                              (w = Kr.extUrl(w, { __vid: d })),
                              (k = Kr.getFileSize(g, p)),
                              (D = Gat(p, QYr, k)),
                              this.log(
                                "".concat(d, "loadByChunkSize"),
                                c.cacheKey,
                                c.definition,
                                D,
                                c
                              ),
                              ($ = this.getInitCacheData(j2.SIZE, {
                                vid: d,
                                definition: f,
                                cacheKey: h,
                                codecType: y,
                                vtype: v,
                                fileSize: k,
                                bitrate: g || 0,
                              })),
                              (this.MP4Loader = new xat(
                                kf(
                                  kf(
                                    {
                                      url: w,
                                      retry: b.retry || 2,
                                      retryDelay: b.retryDelay || 1e3,
                                      timeout: 3e3,
                                    },
                                    b.reqOptions
                                  ),
                                  {},
                                  { segmentDuration: b.segmentDuration }
                                )
                              )),
                              (H.prev = 12),
                              (N = new Uint8Array(0)),
                              (P = 0),
                              (I = null),
                              (O = null),
                              (X = function (E, S, L) {
                                if (
                                  (E &&
                                    L.range[0] === P &&
                                    ((N = Xk(Uint8Array, N, new Uint8Array(E))),
                                    (P += E.byteLength)),
                                  L.meta)
                                ) {
                                  G.MP4Loader.cancel();
                                  var W = L.meta,
                                    F = W.videoSegments,
                                    oe = W.audioSegments;
                                  (O = kf(
                                    kf({}, W.meta),
                                    {},
                                    { ext: { videoTrak: F, audioTrak: oe } }
                                  )),
                                    ($.meta = O),
                                    ($.buffer = N),
                                    ($.byteLength = N.byteLength),
                                    G.setPreLoadData(h, $),
                                    (I = Kr.getFragRange(0, F, oe)),
                                    G.log(
                                      "".concat(h, " onProgressHandle4 meta"),
                                      S,
                                      I,
                                      P,
                                      N.byteLength
                                    ),
                                    I[0] < P && (I[0] = P),
                                    G._loadOneChunk($, I);
                                }
                              }),
                              (H.next = 20),
                              this.MP4Loader.loadMetaProcess(
                                this.MP4Loader.cache,
                                [0, D],
                                X
                              )
                            );
                          case 20:
                            H.next = 26;
                            break;
                          case 22:
                            (H.prev = 22),
                              (H.t0 = H.catch(12)),
                              console.error(
                                "[Preloader] ".concat(
                                  h,
                                  " loadByChunkSize error"
                                ),
                                H.t0
                              ),
                              this._endLoadChunk();
                          case 26:
                          case "end":
                            return H.stop();
                        }
                    },
                    u,
                    this,
                    [[12, 22]]
                  );
                })
              )),
              function (u) {
                return r.apply(this, arguments);
              }),
          },
          {
            key: "_loadOneChunk",
            value:
              ((n = Eu(
                Ya().mark(function u(c, d) {
                  var h, f, p, g, y, v, b, w;
                  return Ya().wrap(
                    function (k) {
                      for (;;)
                        switch ((k.prev = k.next)) {
                          case 0:
                            return (
                              (h = c.vid),
                              (f = c.cacheKey),
                              (p = c.buffer),
                              (k.prev = 1),
                              (k.next = 4),
                              this.MP4Loader.loadData(
                                d,
                                this.MP4Loader.cache,
                                {}
                              )
                            );
                          case 4:
                            (g = k.sent),
                              this.log("".concat(h, " _loadOneChunk"), d, g),
                              (y = g.response),
                              (v = g.data)
                                ? (this._endLoadChunk(),
                                  y &&
                                    y.headers &&
                                    (b = Kr.getFileSize(y.headers)) &&
                                    (c.fileSize = b),
                                  (w = Xk(Uint8Array, p, new Uint8Array(v))),
                                  (c.buffer = w),
                                  (c.byteLength = w.byteLength),
                                  this.log(
                                    "".concat(h, " _loadOneChunk ret"),
                                    f,
                                    w.byteLength,
                                    c
                                  ),
                                  (c.from = 4),
                                  this.setPreLoadData(f, c))
                                : this._endLoadChunk(),
                              (k.next = 14);
                            break;
                          case 10:
                            (k.prev = 10),
                              (k.t0 = k.catch(1)),
                              console.error(
                                "[Preloader] ".concat(
                                  h,
                                  " loadByChunkSize error"
                                ),
                                k.t0
                              ),
                              this._endLoadChunk();
                          case 14:
                          case "end":
                            return k.stop();
                        }
                    },
                    u,
                    this,
                    [[1, 10]]
                  );
                })
              )),
              function (u, c) {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_endLoadChunk",
            value: function () {
              this.log(
                "_endLoadChunk loadingCount:".concat(this.loadingCount),
                this._pendingPromise ? this._pendingPromise.state : null
              ),
                this._pendingPromise &&
                  (this._pendingPromise.resolve(),
                  (this._pendingPromise = null)),
                this.loadingCount > 0 && this.loadingCount--,
                this.MP4Loader &&
                  (this.MP4Loader.cancel(),
                  this.MP4Loader.destroy(),
                  (this.MP4Loader = null));
            },
          },
          {
            key: "startLoadByFragments",
            value:
              ((e = Eu(
                Ya().mark(function u(c, d, h) {
                  var f,
                    p,
                    g,
                    y,
                    v,
                    b,
                    w = this;
                  return Ya().wrap(
                    function (k) {
                      for (;;)
                        switch ((k.prev = k.next)) {
                          case 0:
                            for (
                              f = d.preloadTime,
                                p = d.vid,
                                console.log(
                                  "[Preloader] ".concat(
                                    p,
                                    " startLoadByFragments"
                                  )
                                ),
                                g = [],
                                y = 0;
                              y < this._mp4.timeRange.length;
                              y++
                            )
                              this._mp4.timeRange[y].startTime <= f &&
                                g.push(y);
                            return (
                              (v = function (D) {
                                w.log("[Preloader] _failedCallback", D),
                                  w._endLoadFragments();
                              }),
                              (b = (function () {
                                var D = Eu(
                                  Ya().mark(function $(N) {
                                    var P, I, O, X, G, H, E, S, L;
                                    return Ya().wrap(function (W) {
                                      for (;;)
                                        switch ((W.prev = W.next)) {
                                          case 0:
                                            if (w._mp4) {
                                              W.next = 2;
                                              break;
                                            }
                                            return W.abrupt("return");
                                          case 2:
                                            if (
                                              ((P = N.buffer),
                                              (I = N.context),
                                              (O = N.state),
                                              (X = N.initSeg),
                                              (G = I.fragIndex),
                                              (H = I.range),
                                              (E = I.timeRange),
                                              (S = w._mp4.getFragRange(G)),
                                              !c.initSeg &&
                                                X &&
                                                (c.initSeg = X),
                                              (L = w.updatePreCacheData(
                                                c,
                                                P,
                                                H,
                                                O,
                                                G,
                                                E,
                                                S
                                              )),
                                              console.log(
                                                "[Preloader] ".concat(
                                                  c.cacheKey,
                                                  " _successCallback"
                                                ),
                                                G,
                                                O,
                                                L,
                                                H,
                                                E,
                                                S,
                                                N
                                              ),
                                              (c.from = 3),
                                              !L)
                                            ) {
                                              W.next = 20;
                                              break;
                                            }
                                            return (
                                              (W.next = 12),
                                              w.setPreLoadData(c.cacheKey, c)
                                            );
                                          case 12:
                                            if (!(G >= g.length - 1)) {
                                              W.next = 17;
                                              break;
                                            }
                                            w.log(
                                              "".concat(
                                                c.cacheKey,
                                                " mp4.load end"
                                              ),
                                              G
                                            ),
                                              w._endLoadFragments(),
                                              (W.next = 20);
                                            break;
                                          case 17:
                                            return (
                                              w.log(
                                                "".concat(
                                                  c.cacheKey,
                                                  " mp4.load start"
                                                ),
                                                G + 1
                                              ),
                                              (W.next = 20),
                                              w._mp4.loadAllFragmentData(
                                                G + 1,
                                                b,
                                                v
                                              )
                                            );
                                          case 20:
                                          case "end":
                                            return W.stop();
                                        }
                                    }, $);
                                  })
                                );
                                return function ($) {
                                  return D.apply(this, arguments);
                                };
                              })()),
                              (k.next = 8),
                              this._mp4.loadAllFragmentData(0, b, v)
                            );
                          case 8:
                          case "end":
                            return k.stop();
                        }
                    },
                    u,
                    this
                  );
                })
              )),
              function (u, c, d) {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "_endLoadFragments",
            value: function () {
              this.log(
                "_endLoadFragments loadingCount:".concat(this.loadingCount),
                this._pendingPromise ? this._pendingPromise.state : null
              ),
                this._pendingPromise &&
                  (this._pendingPromise.resolve(),
                  (this._pendingPromise = null)),
                this.loadingCount > 0 && this.loadingCount--,
                this._mp4 && (this._mp4.destroy(), (this._mp4 = null));
            },
          },
          {
            key: "getFragment",
            value: function (u, c, d, h, f) {
              var p =
                  arguments.length > 5 && arguments[5] !== void 0
                    ? arguments[5]
                    : {},
                g = new Np();
              return (
                this.getData(u, c, p, !1).then(function (y) {
                  h.createFragment(
                    new Uint8Array(y.res),
                    c[0] - h.mdatStart,
                    d,
                    { range: c, context: y.context }
                  ).then(function (v) {
                    g.resolve(v);
                  });
                }),
                g
              );
            },
          },
          {
            key: "getPreloadUrl",
            value: function (u) {
              var c = u.url,
                d = u.range,
                h = u.definition,
                f = u.vid;
              return [
                {
                  url: c,
                  range: d,
                  extData: {
                    cacheKey: l.generateUniqueKey({
                      vid: f,
                      start: d[0],
                      end: d[1],
                      definition: h,
                    }),
                    vid: f,
                    format: "mp4",
                  },
                },
              ];
            },
          },
          {
            key: "getRangeList",
            value: function (u) {
              var c = this.allCachedKeys,
                d = { timeRange: [], contentRange: [] };
              for (var h in c)
                if (c.hasOwnProperty(h) && h.indexOf(u) > -1) {
                  var f = h.split("#");
                  f[2].indexOf("pretime") === 0
                    ? d.timeRange.push([0, parseFloat(f[2].slice(7))])
                    : d.contentRange.push([parseInt(f[2]), parseInt(f[3])]);
                }
              return d;
            },
          },
          {
            key: "hasItemSameVid",
            value: function (u) {
              if (!u) return !1;
              var c = this.allCachedKeys;
              for (var d in c)
                if (c.hasOwnProperty(d)) {
                  if (d === u) return d;
                  var h = d.split("#"),
                    f = u.split("#");
                  if (h.length >= 4 && f.length >= 4 && h[0] === f[0]) {
                    if (
                      h[2].indexOf("pretime") === 0 &&
                      f[2].indexOf("pretime") === 0
                    )
                      return d;
                    var p = [parseInt(h[2]), parseInt(h[3])],
                      g = [parseInt(f[2]), parseInt(f[3])];
                    if (g[0] >= p[0] && g[1] > g[0] && g[1] <= p[1]) return d;
                  }
                }
              return !1;
            },
          },
          {
            key: "removeOthers",
            value: function () {
              var u = this,
                c =
                  arguments.length > 0 && arguments[0] !== void 0
                    ? arguments[0]
                    : [],
                d = this.allCachedKeys;
              for (var h in d)
                d.hasOwnProperty(h) &&
                  h.split("#").length >= 1 &&
                  (function () {
                    var f = h.split("#")[0];
                    c.every(function (p) {
                      return p.split("#").length >= 1 && p.split("#")[0] !== f;
                    }) &&
                      (u.log("remove cache:".concat(h)),
                      u.cacheInst.removeItem(h));
                  })();
            },
          },
          {
            key: "getItemSameVid",
            value: function (u, c) {
              var d = this.hasItemSameVid(u);
              return (
                this.log(
                  "getItemSameVid: key:".concat(u, " checkResult:").concat(d)
                ),
                d
                  ? this.cacheInst.getItem(d, c).then(function (h) {
                      return { value: h, key: d };
                    })
                  : Promise.resolve({})
              );
            },
          },
          {
            key: "setItem",
            value: function (u, c) {
              return this.cacheInst.setItem(u, c);
            },
          },
          {
            key: "allCachedKeys",
            get: function () {
              return this.cacheInst._allCachedKeys;
            },
          },
          {
            key: "cacheInst",
            get: function () {
              return this._preloadManager._cacheInst;
            },
          },
          {
            key: "cancelPreloadByVid",
            value: function (u) {
              if (u) {
                for (
                  var c = this._preloadManager._preloadDataList, d = [], h = 0;
                  h < c.length;
                  h++
                )
                  c[h].data.vid !== u
                    ? d.push(c[h])
                    : (console.log("[Preloader] cancelPreloadByVid", u),
                      this.log("cancelPreloadByVid", u));
                this._preloadManager._preloadDataList = d;
              }
            },
          },
          {
            key: "cancelLoading",
            value: function (u) {
              this._endLoadFragments(), this._endLoadChunk();
              var c = this._preloadManager;
              if (c._currentPreloadInst) {
                var d = c._currentPreloadInst._toLoadList,
                  h = [];
                d.map(function (g) {
                  return g.playerId !== u && h.push(g), g;
                }),
                  (c._currentPreloadInst._toLoadList = h);
              }
              var f = [],
                p = [];
              c._preloadDataList.map(function (g) {
                return g.playerId !== u ? f.push(g) : p.push(g.data.vid), g;
              }),
                this.log("cancelLoading", u, p.join(",")),
                (c._preloadDataList = f);
            },
          },
          {
            key: "checkIfExistInList",
            value: function (u) {
              for (
                var c = this._preloadManager._preloadDataList, d = 0;
                d < c.length;
                d++
              )
                if (u === c[d].data.vid) return !0;
              return !1;
            },
          },
          {
            key: "addPreloader",
            value: function (u, c) {
              var d =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : "";
              if (u.data) {
                u.data.vtype || (u.data.vtype = eS.MP4);
                var h = u.data.vid,
                  f = this.checkIfExistInList(h);
                console.log(
                  "[Preloader] addPreloader checkIfExistInList",
                  h,
                  f
                ),
                  (d && h === d) ||
                    f ||
                    ((u.playerId = c), this.addDashPreloader(u));
              }
            },
          },
          {
            key: "addPreloaderList",
            value: function () {
              for (
                var u =
                    arguments.length > 0 && arguments[0] !== void 0
                      ? arguments[0]
                      : [],
                  c =
                    arguments.length > 2 && arguments[2] !== void 0
                      ? arguments[2]
                      : "",
                  d = [],
                  h = 0;
                h < u.length;
                h++
              ) {
                var f = u[h].data,
                  p = f.vid,
                  g = f.vtype,
                  y = this.checkIfExistInList(p);
                console.log(
                  "[Preloader] addPreloaderList checkIfExistInList",
                  p,
                  p === c,
                  y
                ),
                  (c && p === c) ||
                    y ||
                    (g || (u[h].data.vtype = eS.MP4), d.push(u[h]));
              }
              console.log(
                "[Preloader] addPreloaderList length is ".concat(d.length)
              ),
                this.addDashPreloaderList(d);
            },
          },
          {
            key: "setUserSelectDefinition",
            value: function (u) {
              this._preloadManager && (this._preloadManager.userDefinition = u);
            },
          },
          {
            key: "getUserSelectDefinition",
            value: function () {
              return this._preloadManager.userDefinition || null;
            },
          },
          {
            key: "destroy",
            value: function () {
              this._endLoadFragments(),
                this._endLoadChunk(),
                this.cancelLoading(this.playerId);
            },
          },
        ],
        [
          {
            key: "PRELOAD_TYPES",
            get: function () {
              return j2;
            },
          },
          {
            key: "BitRateAdapter",
            get: function () {
              return t4e;
            },
            set: function (u) {
              t4e = u;
            },
          },
          {
            key: "generateUniqueKey",
            value: function (u) {
              var c = u.vid,
                d = u.mediaType,
                h = u.definition,
                f = u.codecType,
                p = u.vtype;
              return (
                (d = d || "video"),
                (h = h || "-1"),
                (f = f || iF.H264),
                (p = p || eS.MP4),
                c
                  ? ""
                      .concat(c, "#")
                      .concat(d, "#")
                      .concat(f, "#")
                      .concat(p, "#")
                      .concat(h)
                  : null
              );
            },
          },
        ]
      ),
      l
    );
  })(),
  sk = {
    MEDIA_EXPIRED: "MEDIA_EXPIRED",
    INIT_FAIL: "INIT_FAIL",
    PARSE_ERROR: "PARSE_ERROR",
    PLAYER_LOG: "PLAYER_LOG",
    BUFFERED_RESET: "BUFFERED_RESET",
  },
  n4e = 1e4,
  qYr = Di,
  eQr = Nce.left,
  tQr = ME,
  r4e = DR,
  nQr = W5,
  rQr = tQr("reduce"),
  iQr = !nQr && r4e > 79 && r4e < 83;
qYr(
  { target: "Array", proto: !0, forced: !rQr || iQr },
  {
    reduce: function (t) {
      var e = arguments.length;
      return eQr(this, t, e, e > 1 ? arguments[1] : void 0);
    },
  }
);
var vot = (function () {
  function t(e, n) {
    Hh(this, t),
      (this.player = e),
      (this.mediaElem = e.video),
      (this.config = n),
      (this.timer = new Rzr()),
      (this.prevReadyState = this.mediaElem.readyState),
      (this.didFireLargeGap = !1),
      (this.seekingEventReceived = !1),
      (this.onWaitFunc = this._onWaiting.bind(this)),
      (this.onPlayFunc = this._onPlay.bind(this)),
      (this.isSafari =
        /(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent) &&
        !/Chrome/.test(navigator.userAgent) &&
        !/BlackBerry/.test(navigator.platform)),
      this.config.useGapJump !== !1 && this._start(),
      (this.hasPlayed = !1);
  }
  return (
    Xh(t, [
      {
        key: "_onWaiting",
        value: function () {
          this.onGapJump();
        },
      },
      {
        key: "_onPlay",
        value: function () {
          this.hasPlayed = !0;
        },
      },
      {
        key: "_start",
        value: function () {
          this.mediaElem.addEventListener("waiting", this.onWaitFunc),
            this.mediaElem.addEventListener("play", this.onPlayFunc);
        },
      },
      {
        key: "onSegmentAppend",
        value: function (e) {
          if (this.config.enableCheckBufferDiff && this.mediaElem) {
            var n = e.reduce(function (r, i) {
              return r + i.downloaded ? i[1] - i[0] : 0;
            }, 0);
            this._getBuffered(this.mediaElem.buffered).reduce(function (r, i) {
              return r + (i.end - i.start);
            }, 0) /
              n <
              0.8 &&
              (ks("onSegmentAppend detectGap"),
              this.player && this.player.emit("detectGap"));
          }
          this.onGapJump();
        },
      },
      {
        key: "onSeeking",
        value: function () {
          (this.seekingEventReceived = !0), (this.didFireLargeGap = !1);
        },
      },
      {
        key: "onGapJump",
        value: function () {
          if (this.mediaElem.readyState !== HTMLMediaElement.HAVE_NOTHING) {
            if (this.mediaElem.seeking) {
              if (!this.seekingEventReceived) return;
            } else this.seekingEventReceived = !1;
            if (
              !this.mediaElem.paused ||
              this.mediaElem.currentTime === 0 ||
              !this.hasPlayed
            ) {
              this.mediaElem.readyState !== this.prevReadyState &&
                ((this.didFireLargeGap = !1),
                (this.prevReadyState = this.mediaElem.readyState));
              var e = this.mediaElem.buffered,
                n = this.config.smallGapLimit || 0.5,
                r = this.config.gapDetectionThreshold || 0.1,
                i = this.mediaElem.currentTime,
                o = this._getIndex(e, i, r);
              if (o !== null && (o !== 0 || (e && e.length))) {
                var l = e.start(o) + 0.1;
                if (!(l > this.mediaElem.duration)) {
                  var u = l - i,
                    c = u <= n;
                  u < t.BROWSER_GAP_TOLERANCE ||
                    (c &&
                      (this.config.disableGapSetPosition !== !0 &&
                        (ks("onGapJump this.mediaElem.currentTime"),
                        (this.mediaElem.currentTime = this.isSafari
                          ? l + 0.1
                          : l)),
                      this.player && this.player.emit("detectGap"),
                      ks(
                        "gapJump gapIndex",
                        o,
                        "isGapSamll",
                        c,
                        "jumpLargeGap",
                        !1,
                        "currentTime",
                        this.mediaElem.currentTime
                      ),
                      l !== 0.08 &&
                        this.player &&
                        this.player.emit("log", {
                          type: "oneevent",
                          end_type: "gap",
                          vid: this.player.config.vid,
                          ext: { video_postion: Math.floor(1e3 * l) },
                        })));
                }
              }
            }
          }
        },
      },
      {
        key: "_getIndex",
        value: function (e, n, r) {
          if (
            !e ||
            !e.length ||
            (e.length === 1 && e.end(0) - e.start(0) < 1e-6)
          )
            return null;
          for (var i = this._getBuffered(e), o = null, l = 0; l < i.length; l++)
            if (i[l].start > n && (l === 0 || i[l - 1].end - n <= r)) {
              o = l;
              break;
            }
          return o;
        },
      },
      {
        key: "_getBuffered",
        value: function (e) {
          if (!e) return [];
          for (var n = [], r = 0; r < e.length; r++)
            n.push({ start: e.start(r), end: e.end(r) });
          return n;
        },
      },
      {
        key: "destroy",
        value: function () {
          this.mediaElem.removeEventListener("waiting", this.onWaitFunc),
            this.mediaElem.removeEventListener("play", this.onPlayFunc),
            this.timer.clear(),
            (this.timer = null);
        },
      },
    ]),
    t
  );
})();
vot.BROWSER_GAP_TOLERANCE = 0.001;
var aQr = ch,
  oQr = dh,
  sQr = zR,
  lQr = l9r,
  i4e = RegExp.prototype,
  uQr = function (t) {
    var e = t.flags;
    return e !== void 0 || "flags" in i4e || oQr(t, "flags") || !sQr(i4e, t)
      ? e
      : aQr(lQr, t);
  },
  cQr = HH.PROPER,
  dQr = z0,
  hQr = Qf,
  a4e = YE,
  fQr = Ho,
  pQr = uQr,
  jfe = "toString",
  gQr = RegExp.prototype,
  bot = gQr[jfe],
  mQr = fQr(function () {
    return bot.call({ source: "a", flags: "b" }) != "/a/b";
  }),
  yQr = cQr && bot.name != jfe;
(mQr || yQr) &&
  dQr(
    RegExp.prototype,
    jfe,
    function () {
      var t = hQr(this);
      return "/" + a4e(t.source) + "/" + a4e(pQr(t));
    },
    { unsafe: !0 }
  );
var _ot = ns,
  vQr = Ho,
  bQr = us,
  _Qr = YE,
  TQr = Dfe.trim,
  o4e = Ife,
  lx = _ot.parseInt,
  s4e = _ot.Symbol,
  l4e = s4e && s4e.iterator,
  Tot = /^[+-]?0x/i,
  EQr = bQr(Tot.exec),
  SQr =
    lx(o4e + "08") !== 8 ||
    lx(o4e + "0x16") !== 22 ||
    (l4e &&
      !vQr(function () {
        lx(Object(l4e));
      })),
  u4e = SQr
    ? function (t, e) {
        var n = TQr(_Qr(t));
        return lx(n, e >>> 0 || (EQr(Tot, n) ? 16 : 10));
      }
    : lx,
  RQr = El;
RQr({ global: !0, forced: parseInt != u4e }, { parseInt: u4e });
var Eot = { exports: {} },
  Sot = {},
  AQr = VR,
  wQr = VE,
  Rot = jR.f,
  kQr = hfe,
  Aot =
    typeof window == "object" && window && Object.getOwnPropertyNames
      ? Object.getOwnPropertyNames(window)
      : [],
  IQr = function (t) {
    try {
      return Rot(t);
    } catch {
      return kQr(Aot);
    }
  };
Sot.f = function (t) {
  return Aot && AQr(t) == "Window" ? IQr(t) : Rot(wQr(t));
};
var DQr = Ho,
  PQr = DQr(function () {
    if (typeof ArrayBuffer == "function") {
      var t = new ArrayBuffer(8);
      Object.isExtensible(t) && Object.defineProperty(t, "a", { value: 8 });
    }
  }),
  MQr = Ho,
  CQr = Oc,
  $Qr = VR,
  c4e = PQr,
  G6 = Object.isExtensible,
  xQr = MQr(function () {
    G6(1);
  }),
  LQr =
    xQr || c4e
      ? function (t) {
          return (
            !!CQr(t) && (!c4e || $Qr(t) != "ArrayBuffer") && (!G6 || G6(t))
          );
        }
      : G6,
  OQr = Ho,
  GQr = !OQr(function () {
    return Object.isExtensible(Object.preventExtensions({}));
  }),
  NQr = El,
  FQr = us,
  UQr = XH,
  BQr = Oc,
  Wfe = dh,
  HQr = sg.f,
  d4e = jR,
  XQr = Sot,
  Kfe = LQr,
  VQr = FH,
  zQr = GQr,
  wot = !1,
  lb = VQr("meta"),
  jQr = 0,
  Zfe = function (t) {
    HQr(t, lb, { value: { objectID: "O" + jQr++, weakData: {} } });
  },
  WQr = function (t, e) {
    if (!BQr(t))
      return typeof t == "symbol" ? t : (typeof t == "string" ? "S" : "P") + t;
    if (!Wfe(t, lb)) {
      if (!Kfe(t)) return "F";
      if (!e) return "E";
      Zfe(t);
    }
    return t[lb].objectID;
  },
  KQr = function (t, e) {
    if (!Wfe(t, lb)) {
      if (!Kfe(t)) return !0;
      if (!e) return !1;
      Zfe(t);
    }
    return t[lb].weakData;
  },
  ZQr = function (t) {
    return zQr && wot && Kfe(t) && !Wfe(t, lb) && Zfe(t), t;
  },
  YQr = function () {
    (QQr.enable = function () {}), (wot = !0);
    var t = d4e.f,
      e = FQr([].splice),
      n = {};
    (n[lb] = 1),
      t(n).length &&
        ((d4e.f = function (r) {
          for (var i = t(r), o = 0, l = i.length; o < l; o++)
            if (i[o] === lb) {
              e(i, o, 1);
              break;
            }
          return i;
        }),
        NQr(
          { target: "Object", stat: !0, forced: !0 },
          { getOwnPropertyNames: XQr.f }
        ));
  },
  QQr = (Eot.exports = {
    enable: YQr,
    fastKey: WQr,
    getWeakData: KQr,
    onFreeze: ZQr,
  });
UQr[lb] = !0;
var kot = Eot.exports,
  JQr = El,
  qQr = ns,
  eJr = us,
  h4e = zH,
  tJr = z0,
  nJr = kot,
  rJr = KH,
  iJr = XO,
  aJr = Zl,
  oJr = cP,
  Cq = Oc,
  $q = Ho,
  sJr = lfe,
  lJr = BO,
  uJr = Tfe,
  cJr = function (t, e, n) {
    var r = t.indexOf("Map") !== -1,
      i = t.indexOf("Weak") !== -1,
      o = r ? "set" : "add",
      l = qQr[t],
      u = l && l.prototype,
      c = l,
      d = {},
      h = function (b) {
        var w = eJr(u[b]);
        tJr(
          u,
          b,
          b == "add"
            ? function (k) {
                return w(this, k === 0 ? 0 : k), this;
              }
            : b == "delete"
            ? function (k) {
                return !(i && !Cq(k)) && w(this, k === 0 ? 0 : k);
              }
            : b == "get"
            ? function (k) {
                return i && !Cq(k) ? void 0 : w(this, k === 0 ? 0 : k);
              }
            : b == "has"
            ? function (k) {
                return !(i && !Cq(k)) && w(this, k === 0 ? 0 : k);
              }
            : function (k, D) {
                return w(this, k === 0 ? 0 : k, D), this;
              }
        );
      };
    if (
      h4e(
        t,
        !aJr(l) ||
          !(
            i ||
            (u.forEach &&
              !$q(function () {
                new l().entries().next();
              }))
          )
      )
    )
      (c = n.getConstructor(e, t, r, o)), nJr.enable();
    else if (h4e(t, !0)) {
      var f = new c(),
        p = f[o](i ? {} : -0, 1) != f,
        g = $q(function () {
          f.has(1);
        }),
        y = sJr(function (b) {
          new l(b);
        }),
        v =
          !i &&
          $q(function () {
            for (var b = new l(), w = 5; w--; ) b[o](w, w);
            return !b.has(-0);
          });
      y ||
        (((c = e(function (b, w) {
          iJr(b, u);
          var k = uJr(new l(), b, c);
          return oJr(w) || rJr(w, k[o], { that: k, AS_ENTRIES: r }), k;
        })).prototype = u),
        (u.constructor = c)),
        (g || v) && (h("delete"), h("has"), r && h("get")),
        (v || p) && h(o),
        i && u.clear && delete u.clear;
    }
    return (
      (d[t] = c),
      JQr({ global: !0, constructor: !0, forced: c != l }, d),
      lJr(c, t),
      i || n.setStrong(c, t, r),
      c
    );
  },
  dJr = jO,
  hJr = HO,
  f4e = lit,
  fJr = mP,
  pJr = XO,
  gJr = cP,
  mJr = KH,
  yJr = cfe,
  p4e = dfe,
  vJr = Yhe,
  YM = Vh,
  g4e = kot.fastKey,
  Iot = KE,
  m4e = Iot.set,
  xq = Iot.getterFor,
  bJr = {
    getConstructor: function (t, e, n, r) {
      var i = t(function (d, h) {
          pJr(d, o),
            m4e(d, {
              type: e,
              index: dJr(null),
              first: void 0,
              last: void 0,
              size: 0,
            }),
            YM || (d.size = 0),
            gJr(h) || mJr(h, d[r], { that: d, AS_ENTRIES: n });
        }),
        o = i.prototype,
        l = xq(e),
        u = function (d, h, f) {
          var p,
            g,
            y = l(d),
            v = c(d, h);
          return (
            v
              ? (v.value = f)
              : ((y.last = v =
                  {
                    index: (g = g4e(h, !0)),
                    key: h,
                    value: f,
                    previous: (p = y.last),
                    next: void 0,
                    removed: !1,
                  }),
                y.first || (y.first = v),
                p && (p.next = v),
                YM ? y.size++ : d.size++,
                g !== "F" && (y.index[g] = v)),
            d
          );
        },
        c = function (d, h) {
          var f,
            p = l(d),
            g = g4e(h);
          if (g !== "F") return p.index[g];
          for (f = p.first; f; f = f.next) if (f.key == h) return f;
        };
      return (
        f4e(o, {
          clear: function () {
            for (var d = l(this), h = d.index, f = d.first; f; )
              (f.removed = !0),
                f.previous && (f.previous = f.previous.next = void 0),
                delete h[f.index],
                (f = f.next);
            (d.first = d.last = void 0), YM ? (d.size = 0) : (this.size = 0);
          },
          delete: function (d) {
            var h = this,
              f = l(h),
              p = c(h, d);
            if (p) {
              var g = p.next,
                y = p.previous;
              delete f.index[p.index],
                (p.removed = !0),
                y && (y.next = g),
                g && (g.previous = y),
                f.first == p && (f.first = g),
                f.last == p && (f.last = y),
                YM ? f.size-- : h.size--;
            }
            return !!p;
          },
          forEach: function (d) {
            for (
              var h,
                f = l(this),
                p = fJr(d, arguments.length > 1 ? arguments[1] : void 0);
              (h = h ? h.next : f.first);

            )
              for (p(h.value, h.key, this); h && h.removed; ) h = h.previous;
          },
          has: function (d) {
            return !!c(this, d);
          },
        }),
        f4e(
          o,
          n
            ? {
                get: function (d) {
                  var h = c(this, d);
                  return h && h.value;
                },
                set: function (d, h) {
                  return u(this, d === 0 ? 0 : d, h);
                },
              }
            : {
                add: function (d) {
                  return u(this, (d = d === 0 ? 0 : d), d);
                },
              }
        ),
        YM &&
          hJr(o, "size", {
            configurable: !0,
            get: function () {
              return l(this).size;
            },
          }),
        i
      );
    },
    setStrong: function (t, e, n) {
      var r = e + " Iterator",
        i = xq(e),
        o = xq(r);
      yJr(
        t,
        e,
        function (l, u) {
          m4e(this, { type: r, target: l, state: i(l), kind: u, last: void 0 });
        },
        function () {
          for (var l = o(this), u = l.kind, c = l.last; c && c.removed; )
            c = c.previous;
          return l.target && (l.last = c = c ? c.next : l.state.first)
            ? p4e(
                u == "keys"
                  ? c.key
                  : u == "values"
                  ? c.value
                  : [c.key, c.value],
                !1
              )
            : ((l.target = void 0), p4e(void 0, !0));
        },
        n ? "entries" : "values",
        !n,
        !0
      ),
        vJr(e);
    },
  },
  _Jr = cJr,
  TJr = bJr;
_Jr(
  "Map",
  function (t) {
    return function () {
      return t(this, arguments.length ? arguments[0] : void 0);
    };
  },
  TJr
);
var EJr = czr.charAt,
  SJr = YE,
  Dot = KE,
  RJr = cfe,
  y4e = dfe,
  Pot = "String Iterator",
  AJr = Dot.set,
  wJr = Dot.getterFor(Pot);
RJr(
  String,
  "String",
  function (t) {
    AJr(this, { type: Pot, string: SJr(t), index: 0 });
  },
  function () {
    var t,
      e = wJr(this),
      n = e.string,
      r = e.index;
    return r >= n.length
      ? y4e(void 0, !0)
      : ((t = EJr(n, r)), (e.index += t.length), y4e(t, !1));
  }
);
var v4e = ns,
  Mot = yat,
  kJr = vat,
  xC = oit,
  Lq = WE,
  Cot = Gc,
  Oq = Cot("iterator"),
  b4e = Cot("toStringTag"),
  Gq = xC.values,
  $ot = function (t, e) {
    if (t) {
      if (t[Oq] !== Gq)
        try {
          Lq(t, Oq, Gq);
        } catch {
          t[Oq] = Gq;
        }
      if ((t[b4e] || Lq(t, b4e, e), Mot[e])) {
        for (var n in xC)
          if (t[n] !== xC[n])
            try {
              Lq(t, n, xC[n]);
            } catch {
              t[n] = xC[n];
            }
      }
    }
  };
for (var Nq in Mot) $ot(v4e[Nq] && v4e[Nq].prototype, Nq);
$ot(kJr, "DOMTokenList");
var IJr = ns,
  DJr = IJr,
  PJr = us,
  xot = PJr((1).valueOf),
  MJr = El,
  Lot = N3r,
  CJr = Vh,
  Oot = ns,
  Got = DJr,
  Not = us,
  $Jr = zH,
  _4e = dh,
  xJr = Tfe,
  LJr = zR,
  OJr = NH,
  Fot = Xhe,
  GJr = Ho,
  NJr = jR.f,
  FJr = uP.f,
  UJr = sg.f,
  BJr = xot,
  HJr = Dfe.trim,
  u7 = "Number",
  II = Oot[u7];
Got[u7];
var boe = II.prototype,
  XJr = Oot.TypeError,
  VJr = Not("".slice),
  aF = Not("".charCodeAt),
  zJr = function (t) {
    var e = Fot(t, "number");
    return typeof e == "bigint" ? e : jJr(e);
  },
  jJr = function (t) {
    var e,
      n,
      r,
      i,
      o,
      l,
      u,
      c,
      d = Fot(t, "number");
    if (OJr(d)) throw XJr("Cannot convert a Symbol value to a number");
    if (typeof d == "string" && d.length > 2) {
      if (((d = HJr(d)), (e = aF(d, 0)) === 43 || e === 45)) {
        if ((n = aF(d, 2)) === 88 || n === 120) return NaN;
      } else if (e === 48) {
        switch (aF(d, 1)) {
          case 66:
          case 98:
            (r = 2), (i = 49);
            break;
          case 79:
          case 111:
            (r = 8), (i = 55);
            break;
          default:
            return +d;
        }
        for (l = (o = VJr(d, 2)).length, u = 0; u < l; u++)
          if ((c = aF(o, u)) < 48 || c > i) return NaN;
        return parseInt(o, r);
      }
    }
    return +d;
  },
  _oe = $Jr(u7, !II(" 0o1") || !II("0b1") || II("+0x1")),
  WJr = function (t) {
    return (
      LJr(boe, t) &&
      GJr(function () {
        BJr(t);
      })
    );
  },
  N6 = function (t) {
    var e = arguments.length < 1 ? 0 : II(zJr(t));
    return WJr(this) ? xJr(Object(e), this, N6) : e;
  };
(N6.prototype = boe),
  _oe && !Lot && (boe.constructor = N6),
  MJr({ global: !0, constructor: !0, wrap: !0, forced: _oe }, { Number: N6 });
var KJr = function (t, e) {
  for (
    var n,
      r = CJr
        ? NJr(e)
        : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(
            ","
          ),
      i = 0;
    r.length > i;
    i++
  )
    _4e(e, (n = r[i])) && !_4e(t, n) && UJr(t, n, FJr(e, n));
};
(_oe || Lot) && KJr(Got[u7], II);
var Uot = ns,
  ZJr = Ho,
  YJr = us,
  QJr = YE,
  JJr = Dfe.trim,
  qJr = Ife,
  eqr = YJr("".charAt),
  $9 = Uot.parseFloat,
  T4e = Uot.Symbol,
  E4e = T4e && T4e.iterator,
  tqr =
    1 / $9(qJr + "-0") != -1 / 0 ||
    (E4e &&
      !ZJr(function () {
        $9(Object(E4e));
      })),
  S4e = tqr
    ? function (t) {
        var e = JJr(QJr(t)),
          n = $9(e);
        return n === 0 && eqr(e, 0) == "-" ? -0 : n;
      }
    : $9,
  nqr = El;
nqr({ global: !0, forced: parseFloat != S4e }, { parseFloat: S4e });
var rqr = k7r;
rqr("Int32", function (t) {
  return function (e, n, r) {
    return t(this, e, n, r);
  };
});
var Bot = "danger_d_speed";
function iqr(t) {
  var e = t.toString(16);
  return e.length <= 8
    ? { high: 0, low: t }
    : {
        high: parseInt(e.substr(0, e.length - 8), 16),
        low: parseInt(e.substr(e.length - 8), 16),
      };
}
var Hot = (function () {
  function t(e, n, r, i) {
    var o =
      arguments.length > 4 && arguments[4] !== void 0
        ? arguments[4]
        : { logger: function () {}, openLog: !1 };
    KR(this, t),
      (this.bitrate = n),
      (this.segment_duration = i || 5e3),
      (this.logger = o.logger),
      (this.openLog = o.openLog),
      (this.cdnHost = e.cdnHost),
      (this._loadedPromise = new vD()),
      (this._wasmPromise = new vD()),
      (this.config = e),
      (this.autoBitrateOpts = e.autoBitrateOpts || {}),
      (this.stall_penalty = this.autoBitrateOpts.stall_penalty || 11),
      (this.switch_penalty = this.autoBitrateOpts.switch_penalty || 4),
      (this.interval = this.autoBitrateOpts.interval || 1e3);
    var l = e.progressTimer || 1e3,
      u = this.autoBitrateOpts.startInterval || l;
    (this.initInterval = 0.8 * u),
      (this._prealodMethod = e.preloadmethod || 0),
      (this._videoWidth = 0),
      (this._videoHeight = 0),
      (this._hasDeviceInfoChanged = !0),
      this.updateMediaInfos(r, !1);
  }
  return (
    ZR(t, [
      {
        key: "onLoadWasm",
        value: function () {
          var e = this,
            n = (this.module = {
              onRuntimeInitialized: function () {
                e._wasmPromise.resolve();
              },
            });
          return (0, this.autoBitrateOpts.module)(n), this._wasmPromise;
        },
      },
      {
        key: "updateMediaInfos",
        value: function (e) {
          var n = this,
            r =
              !(arguments.length > 1 && arguments[1] !== void 0) ||
              arguments[1];
          (this._heightToDefitionConfig = new Map()),
            (this._bitrateToDefitionConfig = new Map()),
            e
              ? ((this.mediaInfos = e),
                this.mediaInfos.dynamic_video_list.forEach(function (i) {
                  n._heightToDefitionConfig.set(i.vheight, i),
                    n._bitrateToDefitionConfig.set(i.bitrate, i);
                }))
              : r && console.error("baseAbr mediaInfos null");
        },
      },
      {
        key: "parseMPD",
        value: function () {
          if ((this.setDebugModel(this.openLog), this.mediaInfos)) {
            this.logger("mediaInfos", this.mediaInfos);
            try {
              for (
                var e = [], n = this.mediaInfos.dynamic_video_list, r = 0;
                r < n.length;
                r++
              ) {
                var i = n[r];
                e.push({
                  stream_id: "s".concat(r),
                  bandwidth: i.bitrate || i.bandwidth,
                  width: i.vwidth || i.width,
                  height: i.vheight || i.height,
                  codec: i.codecs || i.codec_type || "h264",
                  frame_rate: Number(i.fps) || -1,
                  segment_duration: this.segment_duration,
                });
              }
              var o = { v_adaptation: e },
                l = JSON.stringify(o);
              this.module.ccall("parseMPD", "null", ["string"], [l]);
            } catch {}
          } else console.warn("mediaInfos is null");
        },
      },
      {
        key: "_getDefautSpeed",
        value: function (e) {
          var n = 0,
            r = window.navigator.connection;
          if (r && r.downlink)
            (n = (1024 * navigator.connection.downlink) / 8),
              this.logger("initSpeed connect", n);
          else
            try {
              (n = parseFloat(Jae.getItem(Bot)) || 0),
                this.logger("initSpeed connect", n);
            } catch {}
          return (
            n === 0 &&
              ((n = (e && e.historyAvspeed) || 0),
              this.logger("initSpeed history", n)),
            n
          );
        },
      },
      {
        key: "setDebugModel",
        value: function (e) {
          this.module._setDebugModel(e);
        },
      },
      {
        key: "updateBitrate",
        value: function (e) {
          this.bitrate = e;
        },
      },
      {
        key: "_updatePreloadSupplier",
        value: function (e, n) {
          this.module._updatePreloadSupplier(e, n);
        },
      },
      {
        key: "updatePreloadSupplier",
        value: function (e) {
          var n = this._getDefautSpeed();
          this._updatePreloadSupplier(n, e);
        },
      },
      {
        key: "getPreloadBitrate",
        value: function () {
          var e,
            n = null,
            r = [];
          try {
            this.logger("preloadMethod", this._prealodMethod),
              (e = this.module._getPreloadBitrate(this._prealodMethod));
            for (var i = 0; i < 5; i++)
              r.push(this.module.HEAP32[e / Int32Array.BYTES_PER_ELEMENT + i]);
            var o = {
              bitrate: r[0],
              pduration: r[1],
              preloadType: r[2],
              size: r[3],
              mediaType: r[4],
            };
            return this.logger("getPreloadBitrate", o), o;
          } catch (l) {
            (n = null), console.log("getPreloadBitrate", l);
          } finally {
            this.module._free(e);
          }
          return n;
        },
      },
      {
        key: "_updateDeviceInfo",
        value: function (e) {
          try {
            if (this._hasDeviceInfoChanged) {
              var n = window.devicePixelRatio || 1;
              this.module._updateDeviceInfo(
                this._videoWidth || Number(this.config.width),
                this._videoHeight || Number(this.config.height),
                n,
                e || -1
              );
            }
            this._hasDeviceInfoChanged = !1;
          } catch {
            console.log("_updateDeviceInfo");
          }
        },
      },
      {
        key: "preload",
        value: function (e) {
          this.parseMPD(),
            this.updatePreloadSupplier(e),
            this._updateDeviceInfo(-1);
          var n = window.devicePixelRatio || 1;
          return (
            this.logger(
              "baseAbr updateDeviceInfo width",
              this._videoWidth || Number(this.config.width),
              "height",
              this._videoHeight || Number(this.config.height),
              "dpr",
              n
            ),
            this.getPreloadBitrate()
          );
        },
      },
    ]),
    t
  );
})();
Hot.SPPED_CACHE = Bot;
var aqr = El,
  oqr = zE,
  Fq = fP,
  sqr = Zrt,
  R4e = qhe,
  lqr = Qf,
  A4e = Oc,
  uqr = jO,
  Xot = Ho,
  Yfe = oqr("Reflect", "construct"),
  cqr = Object.prototype,
  dqr = [].push,
  Vot = Xot(function () {
    function t() {}
    return !(Yfe(function () {}, [], t) instanceof t);
  }),
  zot = !Xot(function () {
    Yfe(function () {});
  }),
  w4e = Vot || zot;
function Toe(t, e) {
  (e == null || e > t.length) && (e = t.length);
  for (var n = 0, r = Array(e); n < e; n++) r[n] = t[n];
  return r;
}
function hqr(t) {
  if (Array.isArray(t)) return Toe(t);
}
function fqr(t) {
  if (
    (typeof Symbol < "u" && t[Symbol.iterator] != null) ||
    t["@@iterator"] != null
  )
    return Array.from(t);
}
function pqr(t, e) {
  if (t) {
    if (typeof t == "string") return Toe(t, e);
    var n = {}.toString.call(t).slice(8, -1);
    return (
      n === "Object" && t.constructor && (n = t.constructor.name),
      n === "Map" || n === "Set"
        ? Array.from(t)
        : n === "Arguments" ||
          /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
        ? Toe(t, e)
        : void 0
    );
  }
}
function gqr() {
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function mqr(t) {
  return hqr(t) || fqr(t) || pqr(t) || gqr();
}
function Ep(t) {
  if (t === void 0)
    throw new ReferenceError(
      "this hasn't been initialised - super() hasn't been called"
    );
  return t;
}
function jot(t, e) {
  return (jot = Object.setPrototypeOf
    ? Object.setPrototypeOf.bind()
    : function (n, r) {
        return (n.__proto__ = r), n;
      })(t, e);
}
function yqr(t, e) {
  if (typeof e != "function" && e !== null)
    throw new TypeError("Super expression must either be null or a function");
  (t.prototype = Object.create(e && e.prototype, {
    constructor: { value: t, writable: !0, configurable: !0 },
  })),
    Object.defineProperty(t, "prototype", { writable: !1 }),
    e && jot(t, e);
}
function vqr(t, e) {
  if (e && (IL(e) == "object" || typeof e == "function")) return e;
  if (e !== void 0)
    throw new TypeError(
      "Derived constructors may only return object or undefined"
    );
  return Ep(t);
}
function Eoe(t) {
  return (Eoe = Object.setPrototypeOf
    ? Object.getPrototypeOf.bind()
    : function (e) {
        return e.__proto__ || Object.getPrototypeOf(e);
      })(t);
}
aqr(
  { target: "Reflect", stat: !0, forced: w4e, sham: w4e },
  {
    construct: function (t, e) {
      R4e(t), lqr(e);
      var n = arguments.length < 3 ? t : R4e(arguments[2]);
      if (zot && !Vot) return Yfe(t, e, n);
      if (t == n) {
        switch (e.length) {
          case 0:
            return new t();
          case 1:
            return new t(e[0]);
          case 2:
            return new t(e[0], e[1]);
          case 3:
            return new t(e[0], e[1], e[2]);
          case 4:
            return new t(e[0], e[1], e[2], e[3]);
        }
        var r = [null];
        return Fq(dqr, r, e), new (Fq(sqr, t, r))();
      }
      var i = n.prototype,
        o = uqr(A4e(i) ? i : cqr),
        l = Fq(t, o, e);
      return A4e(l) ? l : o;
    },
  }
);
var bqr = El,
  _qr = $v,
  Wot = Qrt,
  Tqr = Ho,
  Eqr = Tqr(function () {
    Wot(1);
  });
bqr(
  { target: "Object", stat: !0, forced: Eqr },
  {
    keys: function (t) {
      return Wot(_qr(t));
    },
  }
);
var Sqr = El,
  Kot = us,
  Rqr = Im,
  Aqr = $v,
  k4e = lg,
  wqr = Git,
  I4e = YE,
  Qfe = Ho,
  kqr = uat,
  Iqr = ZH,
  D4e = cat,
  Dqr = dat,
  P4e = FO,
  M4e = hat,
  OT = [],
  C4e = Kot(OT.sort),
  Pqr = Kot(OT.push),
  Mqr = Qfe(function () {
    OT.sort(void 0);
  }),
  Cqr = Qfe(function () {
    OT.sort(null);
  }),
  $qr = Iqr("sort"),
  Zot = !Qfe(function () {
    if (P4e) return P4e < 70;
    if (!(D4e && D4e > 3)) {
      if (Dqr) return !0;
      if (M4e) return M4e < 603;
      var t,
        e,
        n,
        r,
        i = "";
      for (t = 65; t < 76; t++) {
        switch (((e = String.fromCharCode(t)), t)) {
          case 66:
          case 69:
          case 70:
          case 72:
            n = 3;
            break;
          case 68:
          case 71:
            n = 4;
            break;
          default:
            n = 2;
        }
        for (r = 0; r < 47; r++) OT.push({ k: e + r, v: n });
      }
      for (
        OT.sort(function (o, l) {
          return l.v - o.v;
        }),
          r = 0;
        r < OT.length;
        r++
      )
        (e = OT[r].k.charAt(0)), i.charAt(i.length - 1) !== e && (i += e);
      return i !== "DGBEFHACIJK";
    }
  }),
  xqr = Mqr || !Cqr || !$qr || !Zot,
  Lqr = function (t) {
    return function (e, n) {
      return n === void 0
        ? -1
        : e === void 0
        ? 1
        : t !== void 0
        ? +t(e, n) || 0
        : I4e(e) > I4e(n)
        ? 1
        : -1;
    };
  };
Sqr(
  { target: "Array", proto: !0, forced: xqr },
  {
    sort: function (t) {
      t !== void 0 && Rqr(t);
      var e = Aqr(this);
      if (Zot) return t === void 0 ? C4e(e) : C4e(e, t);
      var n,
        r,
        i = [],
        o = k4e(e);
      for (r = 0; r < o; r++) r in e && Pqr(i, e[r]);
      for (kqr(i, Lqr(t)), n = k4e(i), r = 0; r < n; ) e[r] = i[r++];
      for (; r < o; ) wqr(e, r++);
      return e;
    },
  }
);
var Oqr = Ho,
  Gqr = Gc,
  Nqr = FO,
  Fqr = Gqr("species"),
  Yot = function (t) {
    return (
      Nqr >= 51 ||
      !Oqr(function () {
        var e = [];
        return (
          ((e.constructor = {})[Fqr] = function () {
            return { foo: 1 };
          }),
          e[t](Boolean).foo !== 1
        );
      })
    );
  },
  Uqr = El,
  Bqr = xv.map,
  Hqr = Yot,
  Xqr = Hqr("map");
Uqr(
  { target: "Array", proto: !0, forced: !Xqr },
  {
    map: function (t) {
      return Bqr(this, t, arguments.length > 1 ? arguments[1] : void 0);
    },
  }
);
var Vqr = El,
  $4e = Iit,
  zqr = Jhe,
  jqr = Oc,
  x4e = WR,
  Wqr = lg,
  Kqr = VE,
  Zqr = dit,
  Yqr = Gc,
  Qqr = Yot,
  Jqr = pP,
  qqr = Qqr("slice"),
  eei = Yqr("species"),
  Uq = Array,
  tei = Math.max;
Vqr(
  { target: "Array", proto: !0, forced: !qqr },
  {
    slice: function (t, e) {
      var n,
        r,
        i,
        o = Kqr(this),
        l = Wqr(o),
        u = x4e(t, l),
        c = x4e(e === void 0 ? l : e, l);
      if (
        $4e(o) &&
        ((n = o.constructor),
        ((zqr(n) && (n === Uq || $4e(n.prototype))) ||
          (jqr(n) && (n = n[eei]) === null)) &&
          (n = void 0),
        n === Uq || n === void 0)
      )
        return Jqr(o, u, c);
      for (
        r = new (n === void 0 ? Uq : n)(tei(c - u, 0)), i = 0;
        u < c;
        u++, i++
      )
        u in o && Zqr(r, i, o[u]);
      return (r.length = i), r;
    },
  }
);
var nei = Lb,
  rei = YE,
  iei = NO,
  aei = RangeError,
  oei = function (t) {
    var e = rei(iei(this)),
      n = "",
      r = nei(t);
    if (r < 0 || r == 1 / 0) throw aei("Wrong number of repetitions");
    for (; r > 0; (r >>>= 1) && (e += e)) 1 & r && (n += e);
    return n;
  },
  sei = El,
  Jfe = us,
  lei = Lb,
  uei = xot,
  cei = oei,
  L4e = Ho,
  dei = RangeError,
  Qot = String,
  Jot = Math.floor,
  Soe = Jfe(cei),
  O4e = Jfe("".slice),
  QM = Jfe((1).toFixed),
  zk = function (t, e, n) {
    return e === 0 ? n : e % 2 == 1 ? zk(t, e - 1, n * t) : zk(t * t, e / 2, n);
  },
  hei = function (t) {
    for (var e = 0, n = t; n >= 4096; ) (e += 12), (n /= 4096);
    for (; n >= 2; ) (e += 1), (n /= 2);
    return e;
  },
  Vw = function (t, e, n) {
    for (var r = -1, i = n; ++r < 6; )
      (i += e * t[r]), (t[r] = i % 1e7), (i = Jot(i / 1e7));
  },
  Bq = function (t, e) {
    for (var n = 6, r = 0; --n >= 0; )
      (r += t[n]), (t[n] = Jot(r / e)), (r = (r % e) * 1e7);
  },
  G4e = function (t) {
    for (var e = 6, n = ""; --e >= 0; )
      if (n !== "" || e === 0 || t[e] !== 0) {
        var r = Qot(t[e]);
        n = n === "" ? r : n + Soe("0", 7 - r.length) + r;
      }
    return n;
  },
  fei =
    L4e(function () {
      return (
        QM(8e-5, 3) !== "0.000" ||
        QM(0.9, 0) !== "1" ||
        QM(1.255, 2) !== "1.25" ||
        QM(0xde0b6b3a7640080, 0) !== "1000000000000000128"
      );
    }) ||
    !L4e(function () {
      QM({});
    });
function pei(t) {
  var e = gei();
  return function () {
    var n,
      r = Eoe(t);
    if (e) {
      var i = Eoe(this).constructor;
      n = Reflect.construct(r, arguments, i);
    } else n = r.apply(this, arguments);
    return vqr(this, n);
  };
}
function gei() {
  if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham)
    return !1;
  if (typeof Proxy == "function") return !0;
  try {
    return (
      Boolean.prototype.valueOf.call(
        Reflect.construct(Boolean, [], function () {})
      ),
      !0
    );
  } catch {
    return !1;
  }
}
sei(
  { target: "Number", proto: !0, forced: fei },
  {
    toFixed: function (t) {
      var e,
        n,
        r,
        i,
        o = uei(this),
        l = lei(t),
        u = [0, 0, 0, 0, 0, 0],
        c = "",
        d = "0";
      if (l < 0 || l > 20) throw dei("Incorrect fraction digits");
      if (o != o) return "NaN";
      if (o <= -1e21 || o >= 1e21) return Qot(o);
      if ((o < 0 && ((c = "-"), (o = -o)), o > 1e-21))
        if (
          ((n =
            (e = hei(o * zk(2, 69, 1)) - 69) < 0
              ? o * zk(2, -e, 1)
              : o / zk(2, e, 1)),
          (n *= 4503599627370496),
          (e = 52 - e) > 0)
        ) {
          for (Vw(u, 0, n), r = l; r >= 7; ) Vw(u, 1e7, 0), (r -= 7);
          for (Vw(u, zk(10, r, 1), 0), r = e - 1; r >= 23; )
            Bq(u, 1 << 23), (r -= 23);
          Bq(u, 1 << r), Vw(u, 1, 1), Bq(u, 2), (d = G4e(u));
        } else Vw(u, 0, n), Vw(u, 1 << -e, 0), (d = G4e(u) + Soe("0", l));
      return (d =
        l > 0
          ? c +
            ((i = d.length) <= l
              ? "0." + Soe("0", l - i) + d
              : O4e(d, 0, i - l) + "." + O4e(d, i - l))
          : c + d);
    },
  }
);
var AS = {
    ABR_CHANGE: "ABR_CHANGE_A",
    ABR_UPDATE_SPEC: "ABR_UPDATE_SPEC",
    START_ABR: "START_ABR",
    UPDATE_AUTO_DESC: "UPDATE_AUTO_DESC",
    ABR_START_PROGRESS: "ABR_START_PROGRESS",
    MAX_BUFFER_CHANGE: "MAX_BUFFER_CHANGE",
  },
  N4e = 0,
  mei = 200,
  oF = { SEEK_NO: 0, SEEK_FORWARD: 1, SEEK_BACKWORD: -1 },
  Hq = { STALL_NO: 0, STALL: 1 },
  Cy = {
    PLAYBACK_BITRATE: "avg_play_bitrate",
    DOWNLOAD_BITRATE: "avg_download_bitrate",
    DOWNLOAD_NETWORK_SPEED: "avg_download_speed",
    PREDICT_NETWORK_SPEED: "avg_predict_speed",
    BUFFER_LENGTH: "avg_buffer_length",
    QOE: "avg_qoe",
  },
  F4e = (function (t) {
    yqr(n, Hot);
    var e = pei(n);
    function n(r, i, o, l, u) {
      var c,
        d =
          arguments.length > 5 && arguments[5] !== void 0
            ? arguments[5]
            : { logger: function () {}, openLog: !1 };
      KR(this, n),
        ((c = e.call(this, i, o, l, u, d)).player = r),
        (c.timerId = 0),
        (c.isOpenAutoDefi = !!c.autoBitrateOpts.isOpenAutoDefi),
        (c.onPlayrateChange = c._onPlayrateChange.bind(Ep(c))),
        (c.onPlay = c._onPlay.bind(Ep(c))),
        (c._stop = c.stop.bind(Ep(c))),
        (c._bufferRange = new Map()),
        (c._sortedBufferRange = []),
        (c._lastCheckResolutionStamp = 0),
        (c._currentDefinition = null),
        (c._isSeeking = !1),
        (c._waitingStartTime = 0),
        (c._stallCount = 0),
        (c._seekState = oF.SEEK_NO),
        (c._stallState = Hq.STALL_NO),
        (c._videoCurrentTime = 0),
        (c.listeners = [
          { evt: "playbackrateChange", handler: c.onPlayrateChange },
          { evt: "ended", handler: c._stop },
          { evt: "error", handler: c._stop },
          { evt: "timeupdate", handler: c._onTimeUpdate.bind(Ep(c)) },
          {
            evt: "addVideoBufferEnd",
            handler: c._bufferRangeUpdate.bind(Ep(c)),
          },
          { evt: "canplay", handler: c._updateAutoDesc.bind(Ep(c)) },
          { evt: "play", handler: c._onplayStart.bind(Ep(c)) },
          {
            evt: AS.MAX_BUFFER_CHANGE,
            handler: c._onMaxBufferChange.bind(Ep(c)),
          },
          { evt: "seeking", handler: c._onSeeking.bind(Ep(c)) },
          { evt: "seeked", handler: c._onSeekEnd.bind(Ep(c)) },
          { evt: "waiting", handler: c._onWaiting.bind(Ep(c)) },
          { evt: "playing", handler: c._onPlaying.bind(Ep(c)) },
        ]),
        (c._hasStart = !1),
        c.listeners.forEach(function (y) {
          var v = y.evt,
            b = y.handler;
          c.player.on(v, b);
        }),
        (c._isPaused = !1),
        (c._hasAddFrament = !1),
        (c._eventInfo = {
          local_time_ms: 0,
          internet_speed: 0,
          buffer_length: 0,
          last_bitrate: 0,
          now_bitrate: 0,
          play_speed: 1,
        }),
        (c._bitrateSet = []),
        (c._generalInfo = {}),
        (c._currentInAbr = !1),
        (c._hasCalcTimelineLog = !1),
        (c._abr_play_info = {
          start_play_time_ms: 0,
          is_hint: 0,
          playback_info: {
            internet_speed_record: [],
            play_bitrate_record: [],
            buffer_length_record: [],
            play_speed_record: [],
            qoe_record: [],
            qoe_a_record: [],
            qoe_b_record: [],
            qoe_c_record: [],
          },
        }),
        (c._abrMethod = c.autoBitrateOpts.method || 0),
        c.logger("abr: constructor"),
        (c._loopInterval = c.initInterval),
        (c._tickCount = 0),
        (c._fps = 30),
        yOe.install(),
        (c.startTime = performance.now()),
        c.logger("time abr", new Date().getTime()),
        (c._maxCacheTimeVideo =
          c.config.maxBufferLength || c.config.preloadTime || 50),
        (c._maxCacheTimeAudio = c._maxCacheTimeVideo),
        (c._prevDefinitionItem = null),
        (c._currentItem = null),
        (c._switchCount = 0),
        (c._switchBitrate = 0),
        (c._avgStatItems = {});
      for (var h = Object.keys(Cy), f = 0; f < h.length; f++) {
        var p = h[f],
          g = Cy[p];
        c._avgStatItems[g] = new yei();
      }
      return (
        (c._qoeArgs = [0, 0, 0, 0]),
        (c._abrUsed = -1),
        (c._abrAlwaysOn = 1),
        (c._prelaodInfo = null),
        (c._hasLogStartInfo = !1),
        (c._hasExecuteAbrAlgo = !1),
        (c._lastExecuteTimeInMs = 0),
        c
      );
    }
    return (
      ZR(
        n,
        [
          {
            key: "init",
            value: function (r) {
              return (
                (this._mediaList = r),
                this.isOpenAutoDefi
                  ? this.onLoadWasm()
                  : this._wasmPromise.resolve(),
                this._wasmPromise
              );
            },
          },
          {
            key: "execute",
            value: function () {
              return (
                this.listenSize(),
                this.initFps(),
                this.onWinElemSizeChange(),
                this.onPlay()
              );
            },
          },
          {
            key: "_onSeeking",
            value: function () {
              (this._isSeeking = !0),
                this.player.currentTime < this._videoCurrentTime
                  ? (this._seekState = oF.SEEK_BACKWORD)
                  : (this._seekState = oF.SEEK_FORWARD),
                this.logger("seekState", this._seekState);
            },
          },
          {
            key: "_onSeekEnd",
            value: function () {
              this._isSeeking = !1;
            },
          },
          {
            key: "_onWaiting",
            value: function () {
              var r = this;
              this._isSeeking ||
                this._waitingStartTime > 0 ||
                ((this._waitingStartTime = new Date().getTime()),
                (this._stallId = setTimeout(function () {
                  clearTimeout(r._stallId),
                    r._stallCount++,
                    (r._stallState = Hq.STALL);
                }, mei)));
            },
          },
          {
            key: "_onPlaying",
            value: function () {
              (this._waitingStartTime = 0),
                (this._stallState = Hq.STALL_NO),
                clearTimeout(this._stallId);
            },
          },
          {
            key: "initFps",
            value: function () {
              (this.fpsDetection = new yOe()),
                this.fpsDetection.start(),
                (this._fps = this.fpsDetection.fps),
                (this._hasDeviceInfoChanged = !0);
            },
          },
          {
            key: "listenSize",
            value: function () {
              (this.mediaElem = this.player.video),
                (this._onWinSizeChange = wFr(
                  this.onWinElemSizeChange.bind(this),
                  1e3,
                  !1
                )),
                window.addEventListener("resize", this._onWinSizeChange);
            },
          },
          {
            key: "onWinElemSizeChange",
            value: function () {
              if (this.mediaElem) {
                var r = this.mediaElem.getBoundingClientRect();
                (this._videoWidth = Math.floor(r.width)),
                  (this._videoHeight = Math.floor(r.height)),
                  (this._hasDeviceInfoChanged = !0);
              }
            },
          },
          {
            key: "_onMaxBufferChange",
            value: function (r) {
              var i = r.videoCacheTime,
                o = r.audioCacheTime;
              (this._maxCacheTimeAudio = o), (this._maxCacheTimeVideo = i);
            },
          },
          {
            key: "_onTimeUpdate",
            value: function (r) {
              var i =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
              if (
                this._sortedBufferRange &&
                this._sortedBufferRange.length !== 0 &&
                this._currentInAbr
              ) {
                this._videoCurrentTime = this.player.currentTime;
                var o = Date.now();
                if (
                  !(
                    o - this._lastCheckResolutionStamp < 1e3 &&
                    this._lastCheckResolutionStamp !== 0
                  ) ||
                  i
                ) {
                  this._lastCheckResolutionStamp = o;
                  for (
                    var l = this.player.currentTime,
                      u = 0,
                      c = this._sortedBufferRange.length - 1,
                      d = null;
                    u <= c;

                  ) {
                    var h = Math.floor(u + (c - u) / 2),
                      f = this._sortedBufferRange[h];
                    if (l < f.start) c = h - 1;
                    else {
                      if (!(l >= f.end)) {
                        d = f;
                        break;
                      }
                      u = h + 1;
                    }
                  }
                  if (d) {
                    var p = this._bitrateToDefitionConfig.get(d.bandwidth),
                      g = p && p.definition;
                    if ((this._currentDefinition === g && !i) || !g)
                      return void (
                        g ||
                        this.logger("error defintion, mpd配置与接口配置不一致")
                      );
                    (this._currentDefinition = g),
                      (this._prevDefinitionItem = this._currentItem),
                      (this._currentFps = p.fps),
                      (this._currentItem = p),
                      this._emitAutoDescChange(g, !1, this._currentFps, p);
                  }
                }
              }
            },
          },
          {
            key: "_emitAutoDescChange",
            value: function (r, i, o, l) {
              console.log(
                "[ABR],emitAutoDescChange, definition, ",
                r,
                ",item,",
                l,
                ",pre_item,",
                this._prevDefinitionItem
              ),
                this.player.emit(AS.UPDATE_AUTO_DESC, {
                  definition: r,
                  reset: i,
                  fps: o,
                  item: l,
                  pre_item: this._prevDefinitionItem,
                });
            },
          },
          {
            key: "_onplayStart",
            value: function () {
              (this._hasStart = !0), this.logger("onplaystart");
            },
          },
          {
            key: "_updateAutoDesc",
            value: function () {
              var r = this;
              this._currentInAbr &&
                this._currentDefinition &&
                (this._updateId = setTimeout(function () {
                  clearTimeout(r._updateId),
                    r._emitAutoDescChange(
                      r._currentDefinition,
                      !1,
                      r._currentFps,
                      r._currentItem
                    );
                }, 0));
            },
          },
          {
            key: "_bufferRangeUpdate",
            value: function (r) {
              if (r.start !== void 0) {
                this._currentItem === null && this._onTimeUpdate(null, !0);
                var i = r.start;
                (this._hasAddFrament = !0), this._bufferRange.set(i, r);
                var o = mqr(this._bufferRange.values());
                (this._sortedBufferRange = o.sort(function (l, u) {
                  return l.start - u.start;
                })),
                  this.avgStat(Cy.DOWNLOAD_BITRATE, r.bandwidth);
              }
            },
          },
          {
            key: "_onPlayrateChange",
            value: function () {
              this.module && this.updateBufferInfo();
            },
          },
          {
            key: "_onPlay",
            value: function () {
              var r = this;
              if (!this.isOpenAutoDefi) return this.logger("onPlay"), N4e;
              var i = N4e;
              try {
                this.logger("abr: loadeddata"),
                  this.updateSwitchInfo(),
                  this.parseMPD(),
                  this.updateDeviceInfo();
                var o = n.getIsPlayAutoDefi(this.autoBitrateOpts);
                if (this.isOpenAutoDefi && o) {
                  this._abrUsed = 1;
                  var l = this._getDefautSpeed(this.player);
                  (i = this._loopAbr(l)),
                    this.start(),
                    this.logger("time abr start prgress", new Date().getTime()),
                    this.logger(
                      "time abr costTime",
                      performance.now() - this.startTime
                    ),
                    this.logger("abr onplay"),
                    (this.startTimer = setTimeout(function () {
                      (r._loopInterval = r.interval),
                        clearTimeout(r.startTimer),
                        r.logger("interval change");
                    }, 5e3));
                }
              } catch (u) {
                this.logger("abr: loadeddata error", u),
                  this.logger(
                    "time abr costTime err",
                    performance.now() - this.startTime
                  );
              }
              return i;
            },
          },
          {
            key: "start",
            value: function () {
              if (
                (this.logger("abr: start"),
                (this._isPaused = !1),
                !this._hasCalcTimelineLog)
              ) {
                var r = Math.floor(100 * Math.random()) === 1;
                this._abr_play_info.is_hint = r ? 1 : 0;
              }
              (this._hasCalcTimelineLog = !0), this._loop();
            },
          },
          {
            key: "_loop",
            value: function () {
              var r = this;
              this._isPaused ||
                (clearTimeout(this.timerId),
                (this.timerId = setTimeout(function () {
                  if (
                    !r.player.paused ||
                    (!r.player.config.autoplay && !r._hasStart)
                  ) {
                    var i = r._hasAddFrament
                      ? void 0
                      : r._getDefautSpeed(r.player);
                    r._loopAbr(i);
                  }
                  r._loop();
                }, this._loopInterval)));
            },
          },
          {
            key: "updateDeviceInfo",
            value: function () {
              try {
                if (this.fpsDetection) {
                  var r = this.fpsDetection.fps;
                  r !== this._fps &&
                    ((this._fps = r), (this._hasDeviceInfoChanged = !0));
                }
                this._updateDeviceInfo(this._fps);
              } catch {}
            },
          },
          {
            key: "updateBufferInfo",
            value: function (r) {
              var i = this.player.playbackRate,
                o = this.bufferLength,
                l = r || Math.floor(this.player.downloadSpeed);
              return (
                this._tickCount < 5 &&
                  l === 0 &&
                  ((l = this._getDefautSpeed(this.player)),
                  this.logger("initSpeed fix")),
                this.logger(
                  "maxCacheTimeAudio:",
                  this._maxCacheTimeAudio,
                  "maxCacheVideoTime",
                  this._maxCacheTimeVideo,
                  "seekState",
                  this._seekState,
                  "stallState",
                  this._stallState
                ),
                this.module._updateBufferInfo(
                  i,
                  this._maxCacheTimeAudio,
                  this._maxCacheTimeVideo,
                  o,
                  o,
                  l,
                  this._seekState,
                  this.player.currentTime,
                  this._stallState
                ),
                (this._seekState = oF.SEEK_NO),
                (this._eventInfo = {
                  internet_speed: l,
                  buffer_length: o,
                  last_bitrate: this.bitrate,
                  play_speed: i,
                }),
                this.logger("playRate:", i, "buff:", o, "downloadSpeed:", l),
                { buffer: o, downloadSpeed: l }
              );
            },
          },
          {
            key: "updateSwitchInfo",
            value: function () {
              var r = new Date().getTime();
              (this._openTimeMs = r),
                (this._abr_play_info.start_play_time_ms = r);
              var i = this.player.config.preloadTime || 50,
                o = iqr(r),
                l = this.autoBitrateOpts.noStallCheckTime || 5,
                u = this.openLog;
              this.logger("openTime:", r, "this.logger", u),
                this.module._updateSwitchInfo(
                  o.low,
                  o.high,
                  l,
                  u,
                  this.stall_penalty,
                  this.switch_penalty
                );
              var c = this._mediaList.video,
                d = c.map(function (h) {
                  var f = h.bandwidth,
                    p = h.bitrate;
                  return f || p;
                });
              (this._bitrateSet = d.map(function (h, f) {
                return { bitrate: h, codecs: c[f].codecs || c[f].codec_type };
              })),
                (this._generalInfo = {
                  max_cache_time: i,
                  bitrate_set: this._bitrateSet,
                  segment_duration: this.segment_duration,
                  preload_info: {},
                  startup_info: {},
                });
            },
          },
          {
            key: "updatePreloadCacheInfo",
            value: function (r) {
              try {
                (this._prelaodInfo = r),
                  this.logger("update preloadInfo", r),
                  r &&
                    r.item_num !== r.items.length &&
                    (this.logger("preloadInfo invalid"),
                    (this._prelaodInfo = null));
              } catch (i) {
                this.logger("updatePreloadCacheInfo", i),
                  (this._prelaodInfo = null);
              }
            },
          },
          {
            key: "updatePreloadLogInfo",
            value: function (r) {
              this._generalInfo.preload_info = r || {};
            },
          },
          {
            key: "_updatePreloadInfo",
            value: function () {
              try {
                var r = this.player.getPreloadInfos();
                if (r) {
                  var i = r.preloadInfo,
                    o = r.abr;
                  this.updatePreloadLogInfo(i),
                    o && this.updatePreloadCacheInfo(i);
                }
                if (
                  (this.logger("_updatePreloadInfo preloadinfos", r),
                  this._prelaodInfo != null)
                ) {
                  var l = JSON.stringify(this._prelaodInfo);
                  this.module.ccall(
                    "updatePreloadInfo",
                    "null",
                    ["string"],
                    [l]
                  );
                } else
                  this.logger(
                    "_updatePreloadInfo preloadinfo null, no preload"
                  );
              } catch (u) {
                this.logger("_updatePreloadInfo err", u);
              }
            },
          },
          {
            key: "_loopAbr",
            value: function (r) {
              var i;
              this._tickCount++;
              var o = [];
              try {
                this.updateDeviceInfo();
                var l = this.updateBufferInfo(r),
                  u = l.downloadSpeed,
                  c = l.buffer;
                i = this.module._getPredictedBitrate(
                  this.bitrate,
                  this._abrMethod
                );
                for (var d = 0; d < 7; d++)
                  o.push(
                    this.module.HEAP32[i / Int32Array.BYTES_PER_ELEMENT + d]
                  );
                var h = o[0],
                  f = o[1] === 1;
                (this._eventInfo.now_bitrate = h),
                  (this._eventInfo.local_time_ms = new Date().getTime());
                var p = 0;
                if (h !== this.bitrate && h !== 0) {
                  var g = this.bitrate;
                  p = Math.abs(g - h);
                  for (
                    var y = [], v = this.player.video.buffered, b = 0;
                    b < v.length;
                    b++
                  )
                    y.push({ start: v.start(b), end: v.end(b) });
                  var w = this._videoWidth || Number(this.config.width),
                    k = this._videoHeight || Number(this.config.height),
                    D = new Date().getTime(),
                    $ = {
                      speed: "".concat(u, " KB/s"),
                      buffer_length: "".concat(c, " s"),
                      video_pos: this.player.currentTime,
                      all_buffers: y,
                      seek_state: this._seekState,
                      stall_state: this._stallState,
                      screen_width: w,
                      screen_height: k,
                      dpr: window && window.devicePixelRatio,
                      playbackRate: this.player.playbackRate,
                      bitrateSet: this._bitrateSet,
                      abrMethod: this._abrMethod,
                      delta: this._hasExecuteAbrAlgo
                        ? D - this._lastExecuteTimeInMs
                        : 0,
                    };
                  (this._lastExecuteTimeInMs = D),
                    (this._hasExecuteAbrAlgo = !0),
                    this.player.emit(
                      AS.ABR_CHANGE,
                      this.bitrate,
                      h,
                      f,
                      JSON.stringify($)
                    ),
                    this.logger(
                      "abr loop predicte:",
                      h,
                      "willStall:",
                      f,
                      "switchBitrate",
                      p,
                      "cur",
                      g
                    ),
                    (this.bitrate = h);
                }
                this._hasLogStartInfo ||
                  ((this._hasLogStartInfo = !0),
                  (this._generalInfo.startup_info = {
                    predict_bitrate: h,
                    download_speed: u,
                    screen_width: this._videoWidth || Number(this.config.width),
                    screen_height:
                      this._videoHeight || Number(this.config.height),
                    device_pixel_ratio: window && window.devicePixelRatio,
                    screen_fps: this._fps,
                    startup_method: this._abrMethod,
                  })),
                  this.player.emit("ABR_LOOP"),
                  this.onAbrLoop(u, o[2], p, o.slice(3));
              } catch (N) {
                this.logger("abr error", N), console.log("error", N);
              } finally {
                this.module._free(i);
              }
              return this.bitrate;
            },
          },
          {
            key: "stop",
            value: function () {
              (arguments.length > 0 &&
                arguments[0] !== void 0 &&
                arguments[0]) === !0 && (this._abrAlwaysOn = -1),
                clearTimeout(this.timerId),
                (this._isPaused = !0),
                this.logger("abr: stop");
            },
          },
          {
            key: "destroy",
            value: function () {
              var r = this;
              this._stop(),
                this.listeners.forEach(function (i) {
                  var o = i.evt,
                    l = i.handler;
                  r.player.off(o, l);
                }),
                (this.player = null),
                (this._heightToDefitionConfig = null),
                (this._bitrateToDefitionConfig = null),
                (this._bufferRange = null),
                (this._sortedBufferRange = null),
                (this.module = null),
                clearTimeout(this._stallId),
                clearTimeout(this._updateId),
                clearTimeout(this.startTimer),
                window.removeEventListener("resize", this._onWinSizeChange),
                this.fpsDetection && this.fpsDetection.stop(),
                (this.player = null);
            },
          },
          {
            key: "eventInfo",
            get: function () {
              return this._eventInfo;
            },
          },
          {
            key: "generalInfo",
            get: function () {
              return this._generalInfo;
            },
          },
          {
            key: "bufferLength",
            get: function () {
              var r = this.player.getBufferedRange(),
                i = this.player.video.currentTime,
                o = r[1] - Math.max(r[0], i);
              return (o = Math.max(0, o).toFixed(2)), parseFloat(o);
            },
          },
          {
            key: "downloadSpeed",
            get: function () {
              return Math.floor(this.player.downloadSpeed);
            },
          },
          {
            key: "nowBitrate",
            get: function () {
              return this.bitrate;
            },
          },
          {
            key: "openTimeMs",
            get: function () {
              return this._openTimeMs;
            },
          },
          {
            key: "isCurrentInAbr",
            get: function () {
              return this._currentInAbr;
            },
            set: function (r) {
              this._currentInAbr = r;
            },
          },
          {
            key: "onAbrLoop",
            value: function (r) {
              var i =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : 0,
                o =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : 0,
                l =
                  arguments.length > 3 && arguments[3] !== void 0
                    ? arguments[3]
                    : [];
              if (
                ((this._qoeArgs = l),
                this._currentItem &&
                  this.avgStat(Cy.PLAYBACK_BITRATE, this._currentItem.bitrate),
                this.avgStat(Cy.DOWNLOAD_NETWORK_SPEED, 1e3 * r * 8),
                this.avgStat(Cy.PREDICT_NETWORK_SPEED, i),
                this.avgStat(Cy.BUFFER_LENGTH, this.bufferLength),
                this.avgStat(Cy.QOE, this.getQoeRelValue(0)),
                o > 0 && (this._switchCount++, (this._switchBitrate += o)),
                this._abr_play_info.is_hint)
              ) {
                var u = this,
                  c = (new Date().getTime() - this.openTimeMs) / 1e3;
                (c = parseFloat(c.toFixed(2))),
                  this._abr_play_info.playback_info.internet_speed_record.push([
                    c,
                    u.downloadSpeed,
                  ]),
                  this._abr_play_info.playback_info.play_bitrate_record.push([
                    c,
                    u.nowBitrate,
                  ]),
                  this._abr_play_info.playback_info.buffer_length_record.push([
                    c,
                    u.bufferLength,
                  ]),
                  this._abr_play_info.playback_info.play_speed_record.push([
                    c,
                    this.player.playbackRate,
                  ]),
                  this._abr_play_info.playback_info.qoe_record.push([
                    c,
                    this.getQoeRelValue(0),
                  ]),
                  this._abr_play_info.playback_info.qoe_a_record.push([
                    c,
                    this.getQoeRelValue(1),
                  ]),
                  this._abr_play_info.playback_info.qoe_b_record.push([
                    c,
                    this.getQoeRelValue(2),
                  ]),
                  this._abr_play_info.playback_info.qoe_c_record.push([
                    c,
                    this.getQoeRelValue(3),
                  ]);
              }
            },
          },
          {
            key: "getQoeRelValue",
            value: function (r) {
              return this._qoeArgs[r] / 100;
            },
          },
          {
            key: "avgStat",
            value: function (r, i) {
              var o = this._avgStatItems[r];
              o && o.add(i);
            },
          },
          {
            key: "getAbrPlayInfo",
            value: function () {
              return this._abr_play_info;
            },
          },
          {
            key: "updateAbrMethod",
            value: function (r) {
              this._abrMethod = r;
            },
          },
          {
            key: "getAbrMethod",
            value: function () {
              return this._abrMethod;
            },
          },
          {
            key: "getAbrVVStats",
            value: function () {
              for (var r = {}, i = Object.keys(Cy), o = 0; o < i.length; o++) {
                var l = i[o],
                  u = Cy[l],
                  c = this._avgStatItems[u];
                r[u] = c.avg();
              }
              return (
                (r.switch_counts = this._switchCount),
                (r.avg_switch_bitrate =
                  this._switchCount === 0
                    ? 0
                    : this._switchBitrate / this._switchCount),
                (r.abr_qoe = this.getQoeRelValue(0)),
                (r.abr_qoe_a = this.getQoeRelValue(1)),
                (r.abr_qoe_b = this.getQoeRelValue(2)),
                (r.abr_qoe_c = this.getQoeRelValue(3)),
                (r.abr_method = this._abrMethod),
                (r.abr_used = this._abrUsed),
                (r.abr_always_on = this._abrAlwaysOn),
                this.logger("abrVVStats", r),
                r
              );
            },
          },
        ],
        [
          {
            key: "getIsPlayAutoDefi",
            value: function (r) {
              return !!r.isPlayAutoDefi;
            },
          },
        ]
      ),
      n
    );
  })(),
  yei = (function () {
    function t() {
      KR(this, t), (this.total = 0), (this.count = 0);
    }
    return (
      ZR(t, [
        {
          key: "add",
          value: function (e) {
            (this.total += e), this.count++;
          },
        },
        {
          key: "avg",
          value: function () {
            if (this.count === 0) return 0;
            var e = this.total / this.count;
            return Math.floor(e);
          },
        },
      ]),
      t
    );
  })(),
  Xq = { FIXED: "FIXED", AUTO: "AUTO" },
  vei = (function () {
    function t(n, r) {
      var i = this;
      Hh(this, t),
        cs(this, "_onAbrChange", function (l, u, c, d) {
          var h = i._pluginInst.player,
            f = i.bitrateMap[l],
            p = i.bitrateMap[u],
            g = f.definition,
            y = p && p.definition ? p.definition : g;
          console.log("[ABR] _onAbrChange ", g, y),
            g !== y &&
              (i._abrSwitchHandler(p),
              h.emit("ABR_CHANGE", {
                prev: g,
                cur: y,
                prevName: f.definitionName,
                curName: p.definitionName,
                abrInfo: d,
              }));
        }),
        cs(this, "_onAutoDescChange", function (l) {
          var u = l.definition,
            c = l.reset,
            d = l.fps,
            h = l.item;
          i.updateAutoDefiDesc(u, c, d, h);
        }),
        (this._pluginInst = n);
      var o = this._pluginInst.config.autoBitrateOpts || {};
      (this.isPlayAutoDefi = F4e.getIsPlayAutoDefi(o)),
        (this.isOpenAutoDefi = !!o.isOpenAutoDefi),
        (this.isCurrentAutoDefi = this.isOpenAutoDefi && this.isPlayAutoDefi),
        (this.bitrateMap = {}),
        (this.defiIdMap = {}),
        (this._abrSwitchHandler = r);
    }
    var e;
    return (
      Xh(t, [
        {
          key: "_destroyAbr",
          value: function () {
            var n = this._pluginInst.player;
            this.abrInstance &&
              (n && n.off(AS.UPDATE_AUTO_DESC, this._onAutoDescChange),
              this.abrInstance.destroy(),
              (this.abrInstance = null));
          },
        },
        {
          key: "init",
          value:
            ((e = Eu(
              Ya().mark(function n(r) {
                var i, o, l, u;
                return Ya().wrap(
                  function (c) {
                    for (;;)
                      switch ((c.prev = c.next)) {
                        case 0:
                          if (this.isOpenAutoDefi) {
                            c.next = 2;
                            break;
                          }
                          return c.abrupt("return", { type: Xq.FIXED });
                        case 2:
                          return (
                            (i = this._pluginInst),
                            (o = i.player),
                            (l = i.playerConfig),
                            (u = i.config),
                            o.on(AS.UPDATE_AUTO_DESC, this._onAutoDescChange),
                            (this.bitrateMap = {}),
                            (this.defiIdMap = {}),
                            (this.abrInstance = new F4e(
                              o,
                              u,
                              0,
                              {
                                dynamic_video_list: l.definition.list.concat(),
                              },
                              5e3,
                              { logger: ks, openLog: Lat }
                            )),
                            (c.next = 9),
                            this.abrInstance.init(r)
                          );
                        case 9:
                          o.on(AS.ABR_CHANGE, this._onAbrChange),
                            (this.abrInstance.isCurrentInAbr =
                              this.isCurrentAutoDefi);
                        case 11:
                        case "end":
                          return c.stop();
                      }
                  },
                  n,
                  this
                );
              })
            )),
            function (n) {
              return e.apply(this, arguments);
            }),
        },
        {
          key: "execute",
          value: function () {
            var n = this.abrInstance.execute();
            return { bitrate: n, type: n === -1 ? Xq.FIXED : Xq.AUTO };
          },
        },
        {
          key: "updateBitrate",
          value: function (n) {
            this.abrInstance && this.abrInstance.updateBitrate(n);
          },
        },
        {
          key: "enable",
          value: function () {
            this.abrInstance.start(),
              (this.isCurrentAutoDefi = !0),
              (this.abrInstance.isCurrentInAbr = !0),
              this.abrInstance._onTimeUpdate(null, !0);
          },
        },
        {
          key: "disable",
          value: function () {
            this.abrInstance &&
              (this.updateAutoDefiDesc("", !0),
              (this.isCurrentAutoDefi = !1),
              (this.abrInstance.isCurrentInAbr = !1),
              this.abrInstance.stop(!0));
          },
        },
        {
          key: "isCurrentInAbr",
          value: function () {
            return !!this.abrInstance && this.abrInstance.isCurrentInAbr;
          },
        },
        {
          key: "updateAutoDefiDesc",
          value: function (n) {
            var r =
                arguments.length > 1 && arguments[1] !== void 0 && arguments[1],
              i =
                arguments.length > 2 && arguments[2] !== void 0
                  ? arguments[2]
                  : void 0,
              o =
                arguments.length > 3 && arguments[3] !== void 0
                  ? arguments[3]
                  : null,
              l = this._pluginInst,
              u = l.player,
              c = (l.config.autoBitrateOpts || {}).autoDefiText || "auto";
            u.emit("ABR_AUTO_DESC_CHANGE", c, r ? void 0 : n, i, o);
          },
        },
        {
          key: "updateAbrCacheData",
          value: function () {
            var n = this,
              r = this._pluginInst,
              i = r.player,
              o = r.config,
              l = r.playerConfig,
              u = o.autoBitrateOpts || {},
              c = l.definition.list,
              d = !1;
            if (
              (c.forEach(function (p) {
                (n.bitrateMap[p.bitrate] = {
                  url: p.url,
                  definition: p.definition,
                  definitionName: p.text,
                }),
                  (n.defiIdMap[p.definition] = {
                    bitrate: p.bitrate,
                    definition: p.definition,
                  }),
                  (p.definition !== "auto" && p.definition !== "自动") ||
                    (d = !0);
              }),
              this.isOpenAutoDefi,
              this.isOpenAutoDefi && !d)
            ) {
              var h = u.autoDefiText || "auto",
                f = {
                  definition: "自动",
                  bitrate: i.curDefinition.bitrate,
                  text: h,
                  url: "__auto__",
                  selected: this.isPlayAutoDefi,
                  name: "自动",
                  vwidth: i.curDefinition.vwidth,
                  vheight: i.curDefinition.vheight,
                };
              l.definition.list.push(f);
            }
          },
        },
        {
          key: "destroy",
          value: function () {
            this._pluginInst.player.off(AS.ABR_CHANGE, this._onAbrChange),
              this._destroyAbr();
          },
        },
      ]),
      t
    );
  })(),
  bei = "DESTROYED",
  U4e = "real_time_speed",
  B4e = null,
  JM = null,
  Vq = null,
  zq = null,
  uf = { H264: "h264", H265: "h265" },
  zw = 0,
  fT = (function (t) {
    sP(i, hm);
    var e,
      n,
      r = lP(i);
    function i(o) {
      var l;
      return (
        Hh(this, i),
        cs(_o((l = r.call(this, o))), "_replayHook", function (u) {
          l.player.config.mediaType === "xgmse-video"
            ? l._onReplay()
            : l.useVideoLoad ||
              ((l._defInited = !1),
              l.log("replayHook ", l.playerConfig.url),
              l.player.video.load(),
              l.playerStartInit(l.playerConfig.url));
        }),
        cs(_o(l), "_retryHook", function () {
          var u = _o(l),
            c = u.player,
            d = u.playerConfig,
            h = u.config,
            f = c.currentTime;
          if (l.codecType !== uf.H265 || h.supportHevc) {
            l._defInited = !1;
            var p = l.config,
              g = p.drm,
              y = p.kid,
              v = p.secretKey,
              b = p.keyValue;
            if (g || y || v || b) l.initAwManager(), l.playerStartInit(d.url);
            else {
              if (((l.useVideoLoad = !0), Gr.typeOf(d.url) === "Array")) {
                var w = d.url.length;
                c.video.src = d.url[w - 1].src;
              } else c.video.src = d.url;
              (c.currentTime = f), c.play();
            }
          } else l.log("h265 retryHook ", d.vid), l._onDegrade("retry");
          return !1;
        }),
        cs(_o(l), "_playHook", function (u) {
          l._usePaused = !1;
        }),
        cs(_o(l), "_pauseHook", function (u) {
          l._usePaused = !0;
        }),
        cs(
          _o(l),
          "abrSwitchURL",
          (function () {
            var u = Eu(
              Ya().mark(function c(d) {
                var h, f, p, g, y, v;
                return Ya().wrap(function (b) {
                  for (;;)
                    switch ((b.prev = b.next)) {
                      case 0:
                        (h = _o(l)),
                          (f = h.playerConfig),
                          (p = f.definition.list),
                          (g = 0),
                          (y = 0);
                      case 4:
                        if (!(y < p.length)) {
                          b.next = 11;
                          break;
                        }
                        if (d.definition !== p[y].definition) {
                          b.next = 8;
                          break;
                        }
                        return (g = y), b.abrupt("break", 11);
                      case 8:
                        y++, (b.next = 4);
                        break;
                      case 11:
                        (v = l.player.curDefinition),
                          l.changeDefinition(p[g], v, !0);
                      case 13:
                      case "end":
                        return b.stop();
                    }
                }, c);
              })
            );
            return function (c) {
              return u.apply(this, arguments);
            };
          })()
        ),
        cs(_o(l), "changeDefineCanPlay", function (u, c, d, h) {
          var f = _o(l).player;
          f.ended
            ? (f.currentTime = 0)
            : (l.log(
                "[oldChangeDefinition],this._changeDefState,",
                l._changeDefState
              ),
              (f.currentTime = l._changeDefState
                ? l._changeDefState.currentTime
                : u),
              (l._changeDefState ? l._changeDefState.paused : c)
                ? f.pause()
                : f.play(),
              (l._changeDefState = null),
              f.emit(Awn, { from: d, to: h }));
        }),
        cs(_o(l), "changeDefinition", function (u, c, d) {
          var h = _o(l),
            f = h.player,
            p = h.playerConfig,
            g = h.mp4;
          if ((c || (c = f.curDefinition), l.useVideoLoad))
            return (
              u.url === "__auto__" && (u.url = f.config.definition.list[0].url),
              void Vq.call(l.player, u, c)
            );
          if (l._switchBitRateWay && !d)
            return (
              l.log("changeDefinition old"), void l.oldChangeDefinition(u, c)
            );
          var y = u.definition === "自动" || u.definition === "auto";
          if (d)
            l.log("[switchBitrate:ABR], ready to switch bitRate, ", u.bitrate);
          else {
            var v = !1;
            if (y) l._abrService && l._abrService.enable(), (v = !0);
            else if (
              (l._abrService && l._abrService.disable(),
              !u.bitrate || u.bitrate <= 0)
            )
              for (var b = 0; b < p.definition.list.length; b++)
                u.definition === p.definition.list[b].definition &&
                  (u.bitrate = p.definition.list[b].bitrate);
            f.emit(aSe, { from: c, to: u }),
              setTimeout(function () {
                l._abrService &&
                  l._abrService.updateAutoDefiDesc(
                    f.curDefinition.definition,
                    !y
                  );
              }),
              v && (u = f.curDefinition),
              l.log("[switchBitrate:CBS],switch bitRate, ", u.bitrate);
          }
          f.curDefinition = u;
          var w = f.definitionList.filter(function (k) {
            return k.definition === f.curDefinition.definition;
          });
          w.length > 0 && (u = w[0]),
            g &&
              ((l.config.keyValue = u.keyValue),
              (l.config.kid = u.kid),
              (l.config.secretKey = u.secretKey),
              (l.config.drm = u.drm),
              (l.config.getLicenseUrl = u.getLicenseUrl),
              l
                ._getLicense()
                .then(
                  Eu(
                    Ya().mark(function k() {
                      var D, $, N, P, I, O;
                      return Ya().wrap(function (X) {
                        for (;;)
                          switch ((X.prev = X.next)) {
                            case 0:
                              if (
                                ((p.url = u.url),
                                (p.backupURL = u.backupURL),
                                (D = 0),
                                ($ = !1),
                                l._abrService && l._abrService.isCurrentInAbr()
                                  ? ((N = f.getBufferedRange(f.buffered2)),
                                    (D = N[1]) < f.currentTime &&
                                      ((D = f.currentTime),
                                      l.log(
                                        "bufferRange is invaild,adjust",
                                        N,
                                        ",timeStart,",
                                        D
                                      )),
                                    l.log(
                                      "[switchBitrate:ABR],switch bufferedList, ",
                                      l.player.buffered2
                                        ? l.player.buffered2.bufferedList
                                        : null,
                                      ",curtime,",
                                      f.currentTime,
                                      ",bufferRange,",
                                      N
                                    ))
                                  : ((D = f.currentTime), ($ = !0)),
                                (P = g.getFragmentIdx(D)) < 0 &&
                                  (P = l._curLoadSegmentIdx),
                                l.log(
                                  "switchBitrate:point,",
                                  P,
                                  ",startTime,",
                                  g.timeRange[P].startTime,
                                  ",currentTime,",
                                  f.currentTime
                                ),
                                $ &&
                                  f.emit(
                                    "definitionSwitchTime",
                                    g.timeRange[P].startTime + 1
                                  ),
                                l.changeState("changeDefinition", {
                                  abr: d,
                                  fragIndex: P,
                                  startTime: g.timeRange[P].startTime,
                                  currentTime: f.currentTime,
                                }),
                                !g)
                              ) {
                                X.next = 14;
                                break;
                              }
                              return (X.next = 13), g.cancelLoading();
                            case 13:
                              g._metaLoading && (g._metaLoading = !1);
                            case 14:
                              return (
                                !(
                                  (I = f.getBufferedRange(f.buffered))[1] > 0 &&
                                  I[1] - f.currentTime > 5
                                ) ||
                                  (l._abrService &&
                                    l._abrService.isCurrentInAbr()) ||
                                  (l.mse.clearOpqueues(dS.VIDEO),
                                  l.mse.reuse(f.currentTime + 5, I[1])),
                                g.resetFragmentLoadState(P),
                                (l._curLoadSegmentIdx = P),
                                (X.next = 20),
                                l.mp4.changeBitRate(u)
                              );
                            case 20:
                              (O = {
                                width: u.width || u.vwidth,
                                height: u.height || u.vheight,
                              }),
                                f.emit("RESOLUTION_UPDATE", O);
                            case 22:
                            case "end":
                              return X.stop();
                          }
                      }, k);
                    })
                  )
                )
                .catch(function (k) {
                  console.error(k),
                    (k.errorType = "GET_LICENSE_ERROR"),
                    l.emit("error", k),
                    l.changeState("LICENSE_ERROR", { d: u.definition });
                }));
        }),
        cs(_o(l), "_onVideoError", function (u) {
          l.log("video err,", u);
        }),
        cs(_o(l), "_onPlaying", function () {
          l._waitAdjustTimeCnt > 0 &&
            l._waitInBufferTimer &&
            ((l._waitAdjustTimeCnt -= 1),
            l.log(
              "[waitInBuffer resume play], waitAdjustTimeCnt,",
              l._waitAdjustTimeCnt
            )),
            clearTimeout(l._waitInBufferTimer),
            (l._waitInBufferTimer = null),
            l.log("[Index] onPlaying, timeNow,", Kr.nowTime());
          var u = _o(l),
            c = u.mp4,
            d = u.player,
            h = l.config.resumePlayWaterLevel;
          if (c) {
            if (!l.playFlag || d.currentTime < 1) l.playFlag = !0;
            else if (
              !(c && c.meta && c.meta.duration - d.currentTime <= h) &&
              h > 0 &&
              l.playFlag
            ) {
              var f = d.getBufferedRange(d.buffered2);
              f[1] - d.currentTime < h
                ? (d.paused ||
                    (d.pause(),
                    l.log(
                      "[!!!!!buffer not rich, pause],time,",
                      Kr.nowTime(),
                      ", currentTime, ",
                      d.currentTime,
                      ", bufferEnd,",
                      f[1]
                    )),
                  clearTimeout(l.checkResumePlayTimer),
                  (l.checkResumePlayTimer = setTimeout(
                    l._onPlaying,
                    (h / 2) * 1e3
                  )))
                : d.paused &&
                  (l.log(
                    "[!!!!!buffer rich, play],time,",
                    Kr.nowTime(),
                    ", currentTime, ",
                    d.currentTime,
                    ", bufferEnd,",
                    f[1]
                  ),
                  clearTimeout(l.checkResumePlayTimer),
                  (l.checkResumePlayTimer = null),
                  d.play());
            }
          } else l.checkResumePlayTimer > 0 && (clearTimeout(l.checkResumePlayTimer), (l.checkResumePlayTimer = null), d.paused && d.play());
        }),
        cs(_o(l), "_lowDecoder", function () {
          var u =
            typeof l.player.video.getStats == "function"
              ? l.player.video.getStats()
              : null;
          l.log(
            "H265 lowdecode: ".concat(l.playerConfig.vid, " "),
            u,
            ", h265Degrade, ",
            l.config.h265Degrade
          ),
            l.config.h265Degrade && l._onDegrade();
        }),
        cs(_o(l), "_onError", function (u) {
          console.log(
            "H265 onError: ".concat(l.playerConfig.vid, " "),
            u,
            ", h265Degrade, ",
            l.config.h265Degrade
          ),
            l._onDegrade(u);
        }),
        cs(_o(l), "_onDegrade", function (u) {
          var c,
            d,
            h = _o(l),
            f = h.player,
            p = h.playerConfig,
            g = h.config;
          f.video.removeEventListener("lowdecode", l._onDegrade),
            f.video.removeEventListener("error", l._onError),
            (c = l.mp4) === null || c === void 0 || c.destroy();
          var y = f.currentTime;
          if (
            (console.log("[h265 degrade], vid,", p.vid, ",currtime,", y),
            l.emit("H265_DEGRADE", {
              reason: u ? "error" : "lowdecode",
              currentTime: y,
            }),
            g != null && g.H264Config)
          ) {
            var v = g.H264Config;
            (g.drm = (v == null ? void 0 : v.drm) || null),
              (g.getLicenseUrl =
                (v == null ? void 0 : v.getLicenseUrl) || null),
              (g.kid = (v == null ? void 0 : v.kid) || null),
              (g.keyValue = (v == null ? void 0 : v.keyValue) || null),
              (g.secretKey = (v == null ? void 0 : v.secretKey) || null),
              (g.isEncrypt = (v == null ? void 0 : v.isEncrypt) || null),
              (g.useEME = (v == null ? void 0 : v.useEME) || null);
          }
          var b = {
            mp4encryptplayer: g,
            mediaType: "video",
            codecType: uf.H264,
          };
          (p == null || (d = p.H264DefinitionList) === null || d === void 0
            ? void 0
            : d.length) > 0
            ? ((f.config.definition.list = p.H264DefinitionList),
              (f.config.url = p.H264DefinitionList[0].url),
              (f.config.defaultBitrate = p.H264DefinitionList[0].bitrate),
              (f.config.defaultDefinition = p.H264DefinitionList[0].definition),
              f.playNext(b),
              f.once("canplay", function () {
                f.currentTime = y;
              }))
            : (console.error("H265 error,degrade h264 but no h264 url"),
              l.emit("error", u));
        }),
        cs(_o(l), "_onMp4MetaReady", function (u) {
          console.log(">>>>_onMp4MetaReady", Kr.nowTime()),
            (l.firstFrameTime.metaload = l.mp4.firstFrameTime.metaload),
            (l.firstFrameTime.bitrate = l.player.curDefinition.bitrate);
          var c = l.playerConfig.vid,
            d = l._checkMetaInfo(u),
            h = l.mp4.checkCodecH265();
          if ((l.changeState("MP4_META_READY", { is265: h ? 1 : 0 }), d))
            return l.removeAndRejectInitPromise(d), void l._errorHandler(d);
          try {
            if (
              (l._initEME(l.mp4, u),
              l.codecType !== uf.H265 || l.config.supportHevc)
            ) {
              if (!(l.player.video instanceof HTMLVideoElement))
                return void console.error(
                  "".concat(l.player.config.mediaType, " is not match")
                );
              l._initMse(u);
            } else {
              if (!h || l.player.video instanceof HTMLVideoElement)
                return void console.error(
                  "[Index] "
                    .concat(c, " config_codec ")
                    .concat(l.codecType, " and meta_codec ")
                    .concat(u.videoCodec, " is not match or supportHevc is ")
                    .concat(l.config.supportHevc)
                );
              l._initH265MseProxy();
            }
            l._initPromise.resolve();
          } catch (g) {
            l.removeAndRejectInitPromise(g),
              console.error("[Index] ".concat(c, " _initEME error"), g);
            var f = new s0(l.player, {
              errorType: "runtime",
              errorTypeCode: g0.runtime,
              errorCode: Rc.other1,
              errorMessage: g == null ? void 0 : g.message,
              vid: c,
              mediaError: {
                code: Rc.other1,
                message: g == null ? void 0 : g.message,
              },
            });
            l._errorHandler(f);
          }
          if (l.mp4 && l.mp4.timeRange) {
            var p = [];
            l.mp4.timeRange.every(function (g) {
              return p.push({ startTime: g.startTime, endTime: g.endTime }), !0;
            }),
              l.emit("KEYFRAMETIME", p);
          }
          l._loadData();
        }),
        cs(_o(l), "_onMp4Error", function (u) {
          var c = l.playerConfig.vid;
          console.error("[Index] _onMp4Error", c, u),
            l.changeState("MP4_ERROR", u),
            l._initPromise &&
              l._initPromise.state === "pending" &&
              l.removeAndRejectInitPromise(u),
            l._errorHandler(u);
        }),
        cs(_o(l), "_onMp4Progress", function (u) {
          l.emit("progress_event", u);
        }),
        cs(_o(l), "_onMp4DataCallBack", function () {
          l.mse && !l.mse.ready && l.openMSE(),
            l._isMseInit && l._onTimeUpdate();
        }),
        cs(_o(l), "_updateDrmConfig", function (u) {
          var c = _o(l),
            d = c.config,
            h = c.mp4;
          u.kid && d.keyValue
            ? (d.drm = { clearKeys: cs({}, u.kid, d.keyValue) })
            : !u.kid && d.keyValue && (d.useEME = !1),
            (h.useEME = d.useEME);
          var f = d.drm;
          d.useEME ||
            (h.kidValue =
              d.keyValue ||
              (f && f.clearKeys
                ? f.clearKeys[Object.keys(f.clearKeys)[0]]
                : null)),
            l.eme && f && f.clearKeys && d.useEME && l.eme.updateDrm(f);
        }),
        cs(_o(l), "_onVideoTimeUpdate", function () {
          l.useVideoLoad ||
            l._requestTimer !== null ||
            (!l._offineLine && l._startProgress()),
            l.useVideoLoad && l.checkIfCanPreload();
        }),
        cs(_o(l), "_onBufferedReset", function (u) {
          l.mp4 && l.mp4.videoTrak && l.mp4.resetFragmentLoadState(0);
        }),
        cs(_o(l), "_onOnlineHandler", function () {
          l._offineLine = !1;
          var u = _o(l).config;
          l.log(
            "online useVideoLoad:",
            l.useVideoLoad,
            l._hasStartProgressBack
          ),
            l.useVideoLoad
              ? (l.player.src = u._mainURL)
              : (l._hasStartProgressBack && l._startProgress(),
                (l._hasStartProgressBack = !1));
        }),
        cs(_o(l), "_onOfflineHandler", function () {
          (l._offineLine = !0),
            l.log("offline, ", l._hasStartProgress),
            l._hasStartProgress &&
              (l._stopProgress(), (l._hasStartProgressBack = !0));
        }),
        cs(_o(l), "_loadDataSuccess", function (u) {
          if (!l.isDestroy && (l.mse || l.mseProxy)) {
            u.state && l._firstSegState < 0 && (l._firstSegState = 1),
              l.log(
                "[loadFragment] _loadDataSuccess ",
                JSON.stringify(u.context.range),
                ",dataLen,",
                u.buffer ? u.buffer.byteLength : 0,
                u.state
              ),
              l.firstFrameTime.startload_stmux < 0 &&
                ((l.firstFrameTime.startload_stmux =
                  l.mp4.firstFrameTime.startMuxTime),
                (l.firstFrameTime.firstmux = l.mp4.firstFrameTime.firstmux)),
              l.firstFrameTime.loadst_loadeddata < 0 &&
                (l.firstFrameTime.loaddata = Kr.nowTime() - l.loadstart);
            try {
              u.initSeg &&
                (l._appendInitSeg(u.initSeg),
                (!u.buffer || u.buffer.byteLength < 1) &&
                  (l.log("no data, must load data"), l._onTimeUpdate()));
              var c = u.buffer,
                d = u.state,
                h = u.context,
                f = u.videoTrack,
                p = u.audioTrack;
              if (
                ((l.debugInfo.loadIndx = h ? h.fragIndex : -1),
                l.mse &&
                  d &&
                  (!c || c.byteLength <= 0) &&
                  h.fragIndex === l.mp4.timeRange.length - 1)
              ) {
                var g = l.player.buffered;
                (l.bufferEndTime = g.end(g.length - 1)),
                  l._isEnded(),
                  l.log(
                    "loaded ended !!!==>>>",
                    JSON.stringify(h.range),
                    ", fragIndex,",
                    h.fragIndex,
                    ", bufferEndTime,",
                    l.bufferEndTime,
                    ",meta_duration,",
                    l.mp4.meta.duration
                  );
              }
              if (
                l.mse &&
                d &&
                h.fragIndex === l.mp4.timeRange.length - 1 &&
                (!c || c.byteLength <= 0)
              ) {
                var y = l.player.buffered;
                (l.bufferEndTime = y.end(y.length - 1)),
                  l._isEnded(),
                  l.log(
                    "load ended !!!==>>>",
                    l.playerConfig.vid,
                    JSON.stringify(h.range),
                    ", fragIndex,",
                    h.fragIndex,
                    ", bufferEndTime,",
                    l.bufferEndTime,
                    ",meta_duration,",
                    l.mp4.meta.duration
                  );
              }
              if (c && l.mse) {
                if (c && c.byteLength > 0) {
                  l._appendBuffer(dS.VIDEO, c, h, d);
                  var v = l.getDataBitRate(h.fragIndex);
                  l.player.emit("addVideoBufferEnd", {
                    start: Math.floor(h.startPts),
                    end: h.endPts,
                    bandwidth: v.bitrate,
                  });
                }
              } else if (
                l.mseProxy &&
                ((f && f.samples.length > 0) || (p && p.samples.length > 0))
              ) {
                var b = f.samples.length > 0 ? f.samples[0].sampleOffset : -1,
                  w =
                    f.samples.length > 0
                      ? f.samples[f.samples.length - 1].sampleOffset
                      : -1,
                  k = p.samples.length > 0 ? p.samples[0].sampleOffset : -1,
                  D =
                    p.samples.length > 0
                      ? p.samples[p.samples.length - 1].sampleOffset
                      : -1;
                l.log(
                  "[livevideo] appendBuffer,index,",
                  h.fragIndex,
                  ",range,",
                  JSON.stringify(u.context.range),
                  ",videoIdxRange,",
                  b,
                  "-",
                  w,
                  ",audioIdxRange,",
                  k,
                  "-",
                  D,
                  ", timeRange,",
                  h.timeRange
                ),
                  l.mseProxy.appendBuffer(f, p);
              }
            } catch (N) {
              l.changeState("APPEND_DATA_ERROR"),
                l.log("appendBuffer error", N);
              var $ = new s0(l.player, {
                errorType: "runtime",
                errorTypeCode: g0.runtime,
                errorCode: Rc.mse,
                vid: l.player.config.vid,
                errorMessage: N.message,
                mediaError: { code: Rc.mse, message: N.message },
              });
              l._errorHandler($);
            }
          }
        }),
        cs(_o(l), "_onWaiting", function () {
          var u = _o(l),
            c = u.player,
            d = u.config,
            h = u.playerConfig;
          clearTimeout(l._waitInBufferTimer), (l._waitInBufferTimer = null);
          var f = c.currentTime;
          console.log("[>>>>onWaiting],currentTime, ", f, Kr.nowTime());
          var p = c.bufferedPoint;
          p.end > 0 &&
            p.end - c.currentTime >= 2 &&
            (l._waitAdjustTimeCnt < d.waitJampBufferMaxCnt
              ? (l._waitInBufferTimer = setTimeout(function () {
                  l._waitAdjustTimeCnt++,
                    (c.currentTime = c.currentTime + 0.5),
                    l.log(
                      "[waitInBufferTimeout], waitAdjustTimeCnt,",
                      l._waitAdjustTimeCnt,
                      ",curtime,",
                      f,
                      Kr.nowTime()
                    );
                }, d.waitingInBufferTimeOut))
              : l._errorHandler(
                  new s0(l.player, {
                    errorType: "waitInBuffer",
                    errorTypeCode: g0.runtime,
                    errorCode: Rc.onWaitInBufferRange,
                    errorMessage: "onWait_in_buffer",
                    vid: h.vid,
                  })
                ));
        }),
        cs(_o(l), "_onEnded", function () {
          l.log("[player.onEnded], stopProgress"),
            l.player && l.off("waiting", l._onWaiting),
            l._stopProgress();
        }),
        cs(_o(l), "_onReplay", function () {
          var u = _o(l),
            c = u.playerConfig,
            d = u.player;
          l._reset(),
            l._init(c.url).then(
              function (h) {
                var f = h[0],
                  p = h[1];
                (d.video.src = p.url),
                  l._startProgress(),
                  (l.mp4 = f),
                  (l.mse = p),
                  l.log("_replay play"),
                  l.once("canplay", function () {
                    d.play(), l.on("waiting", l._onWaiting);
                  });
              },
              function (h) {
                l.log("_errorHandler6", h), l._errorHandler(h);
              }
            );
        }),
        cs(
          _o(l),
          "_onSeeking",
          Eu(
            Ya().mark(function u() {
              var c, d, h, f, p, g, y, v, b, w, k;
              return Ya().wrap(function (D) {
                for (;;)
                  switch ((D.prev = D.next)) {
                    case 0:
                      if (!l.useVideoLoad) {
                        D.next = 2;
                        break;
                      }
                      return D.abrupt("return");
                    case 2:
                      if (
                        ((c = _o(l)),
                        (d = c.player),
                        (h = c.mp4),
                        (f = d.currentTime),
                        l.changeState("seeking", { curTime: f }),
                        l.log(
                          "[seekTime], curTime,",
                          f,
                          ",buffer,",
                          d.buffered2.bufferedList
                        ),
                        h && h.meta)
                      ) {
                        D.next = 8;
                        break;
                      }
                      return D.abrupt("return");
                    case 8:
                      if (
                        ((l.endofstream = !1),
                        (h.bufferLoadedPos = -1),
                        (h._metaLoading = !1),
                        (p = d.bufferedPoint),
                        (g = !1),
                        (y = 0),
                        !(p.end > 0))
                      ) {
                        D.next = 23;
                        break;
                      }
                      if (
                        ((g = !0),
                        (y = h.getFragmentIdx(p.end)),
                        l._curLoadSegmentIdx !== y)
                      ) {
                        D.next = 20;
                        break;
                      }
                      return (
                        l.log(
                          "[seeking in buffered range], seek fragIndex is current load segmentIdx",
                          y
                        ),
                        D.abrupt("return")
                      );
                    case 20:
                      (h.seekTime = p.end),
                        y < 0 && (y = l._curLoadSegmentIdx),
                        l.log(
                          "[seeking in buffered range], seekTime ",
                          f,
                          ",bufferRange,",
                          p.start,
                          "-",
                          p.end,
                          ", fragIndex,",
                          y
                        );
                    case 23:
                      return (
                        g ||
                          ((h.seekTime = f),
                          (y = h.getFragmentIdx(f)) < 0 &&
                            (y = l._curLoadSegmentIdx),
                          l.log(
                            "[seekTime out buffer range], curTime,",
                            f,
                            ", Idx,",
                            y
                          ),
                          (v = _o(l)),
                          (b = v.mse) &&
                            b.isFull() &&
                            ((w = d.buffered2.bufferedList),
                            (k = w[w.length - 1]),
                            b.clearOpqueues(dS.VIDEO),
                            l._checkRemoveSourceBuffer(
                              [k.start, k.end],
                              d.currentTime,
                              !0,
                              !0
                            ))),
                        (D.next = 26),
                        h.cancelLoading()
                      );
                    case 26:
                      h.resetFragmentLoadState(y),
                        (l._curLoadSegmentIdx = y),
                        l._onTimeUpdate(),
                        l._isEnded();
                    case 30:
                    case "end":
                      return D.stop();
                  }
              }, u);
            })
          )
        ),
        (l._pendingPromises = []),
        (l._allInitPromise = new Np()),
        (l._isInit = !1),
        (l._isEventInit = !1),
        (l.playerId = l.player._pluginInfoId),
        (l.preloader = null),
        (l.gapJumpInst = null),
        l.log("playerId", l.playerId),
        (l._tickInSeconds = l.config.tickInSeconds),
        (l.awManager = null),
        (l._useVideoLoad = !1),
        (l.mse = null),
        (l.mp4 = null),
        (l.eme = null),
        (l._isMseInit = !1),
        (l._awPromise = null),
        (l._corePromise = null),
        (l._initPromise = null),
        (l._hasStartProgress = !1),
        (l._hasStartProgressBack = !1),
        (l._maxBufferLength = l.config.maxBufferLength),
        (l._minBufferLength = l.config.minBufferLength),
        (l._switchBitRateWay = l.config.switchBitRateWay),
        (l._curLoadSegmentIdx = 0),
        (l._abrService = null),
        (l._checkRemoveBufferLastTime = Kr.nowTime()),
        (l.playFlag = !1),
        (l.config.resumePlayWaterLevel = Math.min(
          l.config.minBufferLength,
          l.config.resumePlayWaterLevel
        )),
        (l.checkResumePlayTimer = null),
        (l.loadstart = -1),
        (l._loadStartEventTime = -1),
        (l._waitAdjustTimeCnt = 0),
        (l._waitInBufferTimer = null),
        (l._firstSegState = -1),
        (l.codecType = l.playerConfig.codecType
          ? l.playerConfig.codecType.toLowerCase()
          : uf.H264),
        l.playerConfig.vtype && (l._vtype = l.playerConfig.vtype.toUpperCase()),
        (l.firstFrameTime = {
          newplayer: Kr.nowTime(),
          newplayer_initkernel: -1,
          initkernel_initmp4: -1,
          initmse_sbopen: -1,
          mseopen: -1,
          initmse_sbopendone: -1,
          metaload: -1,
          metaready_mseisopen: -1,
          metaready_initsegend: -1,
          startload_stmux: -1,
          firstmux: -1,
          apcnt: 0,
          aplen: 0,
          data_ap: -1,
          loadst_loadeddata: -1,
          loaddata: -1,
          new_loadeddata: -1,
          bitrate: -1,
        }),
        (l.debugInfo = {}),
        (l.states = []),
        (l.removeVideo = null),
        (l._lastCheckTime = Kr.nowTime()),
        (l._changeDefState = null),
        (l._defInited = !1),
        (l.states = []),
        (l.preLoadData = null),
        (l.forPreloadTimeCache = null),
        (l._usePaused = !1),
        (l.endofstream = !1),
        (l.bufferEndTime = -1),
        (l.hitpreload = !1),
        window &&
          window.location.href.indexOf("playerInstance=true") > -1 &&
          (window.mp4PlayerInstanceList === void 0 &&
            (window.mp4PlayerInstanceList = []),
          window.mp4PlayerInstanceList.push(l.player)),
        l
      );
    }
    return (
      Xh(
        i,
        [
          {
            key: "afterCreate",
            value: function () {
              var o = this,
                l = this.playerConfig,
                u = this.config,
                c = this.player;
              (u.width = l.width || 0),
                (u.height = l.height || 0),
                (l.vid = l.vid || u.vid),
                VGe.isSupported('video/mp4; codecs="avc1.64001E, mp4a.40.5"') &&
                  (u.supportHevc === void 0 &&
                    mC != null &&
                    mC.isHevcSupported &&
                    mC != null &&
                    mC.isHevcSupported() &&
                    this.player.video instanceof HTMLVideoElement &&
                    (u.supportHevc = !0),
                  aot() || (u.useEME = !1),
                  this.checkConfig(),
                  u.onlyInit &&
                    ((l.autoplay = !1),
                    (l.videoInit = !1),
                    (this._hasStartProgress = !1),
                    (this._hasStartProgressBack = !1)),
                  l.useWaterLevel &&
                    (!l.userGestureEventMiddleware &&
                      (l.userGestureEventMiddleware = IWr),
                    !l.videoEventMiddleware && c.setEventsMiddleware(DWr)),
                  (this.gapJumpInst = new vot(this.player, this.playerConfig)),
                  (this.preloader = u.isOpenPreload
                    ? new ok(this.config, this, this.bitRateAdapter)
                    : null),
                  (c.preloader = this.preloader),
                  this._proxyPlayer(),
                  this.initAwManager(),
                  c.useHooks("replay", this._replayHook),
                  c.useHooks("play", this._playHook),
                  c.useHooks("pause", this._pauseHook),
                  c.useHooks("retry", this._retryHook),
                  c.video.addEventListener(
                    sk.BUFFERED_RESET,
                    this._onBufferedReset
                  ),
                  this._bindNetworkStateChange(),
                  this.on(Twn, this._onVideoTimeUpdate),
                  this.on(Swn, function () {
                    o.changeState("LOADED_DATA"),
                      o.deleteVideo(),
                      (o._firstSegState = 2),
                      o._onTimeUpdate(),
                      o._firstFrameTime();
                  }),
                  this.on(Rwn, function () {
                    o.changeState("LOAD_START"),
                      (o._loadStartEventTime = Kr.nowTime()),
                      o.codecType !== uf.H265 ||
                        o.config.supportHevc ||
                        ((o._isMseInit = !0), o._onTimeUpdate());
                  }),
                  this.on("xglog", function (d) {
                    if (d.eventType === "firstFrame") {
                      var h =
                        o.preLoadData && o.preLoadData.definition
                          ? o.preLoadData.definition
                          : -1;
                      o.codecType === uf.H264
                        ? console.log(
                            "[xgplayer-encrypt-mp4]>>>>firstFrame ",
                            o.playerConfig.vid,
                            d.fvt,
                            ", codectype: ",
                            o.codecType,
                            ", hitpreload: ",
                            o.hitpreload,
                            ", video: ",
                            o._useVideoLoad,
                            ",curPlayBitrate: ",
                            o.player.curDefinition.definition,
                            ", preloadBitrate: ",
                            h,
                            ",metaLoad, ",
                            o.firstFrameTime.metaload,
                            ", mseOpen: ",
                            o.firstFrameTime.mseopen,
                            ",appendInit: ",
                            o.firstFrameTime.metaready_initsegend
                          )
                        : console.log(
                            "[xgplayer-encrypt-mp4]>>>>firstFrame ",
                            o.playerConfig.vid,
                            d.fvt,
                            ", codectype: ",
                            o.codecType,
                            ", hitpreload: ",
                            o.hitpreload,
                            ",curPlayBitrate: ",
                            o.player.curDefinition.definition,
                            ", preloadBitrate: ",
                            h,
                            ",metaLoad, ",
                            o.firstFrameTime.metaload
                          );
                    }
                  }),
                  (c.mp4MseFlag = !0));
            },
          },
          {
            key: "_startBufferCheck",
            value: function () {
              var o = this.player;
              if (o.video) {
                var l = [];
                if (o.video.buffered) {
                  for (var u = 0, c = o.video.buffered.length; u < c; u++)
                    l.push([
                      o.video.buffered.start(u),
                      o.video.buffered.end(u),
                    ]);
                  l.toString() !== this.lastBuffer &&
                    ((this.lastBuffer = l.toString()),
                    this._onBufferReachThreshold());
                }
              }
            },
          },
          {
            key: "_onBufferReachThreshold",
            value: function () {
              var o = this.player,
                l = this.config;
              if (o.video) {
                for (
                  var u = o.video.buffered, c = 0, d = 0, h = 0;
                  h < u.length &&
                  ((c = u.start(h)),
                  (d = u.end(h)),
                  !(c <= o.video.currentTime && o.video.currentTime <= d));
                  h++
                );
                d - o.video.currentTime >= l.bufferThreshold &&
                  !this._hasTriggerBufferThreshold &&
                  ((this._hasTriggerBufferThreshold = !0),
                  o.emit("BUFFER_THRESHOLD", d - o.video.currentTime));
              }
            },
          },
          {
            key: "_startUrlExpiredCheck",
            value: function () {
              var o = this.player.config;
              o.definition &&
                o.definition.list &&
                o.definition.list.length > 0 &&
                ((this.urlExpireTimestamp =
                  o.definition.list[0].url_expire || 0),
                this._handleUrlExpire());
            },
          },
          {
            key: "checkConfig",
            value: function () {
              var o = this.playerConfig,
                l = this.config,
                u = o.defaultDefinition,
                c = o.defaultBitrate;
              if (!u) {
                var d = this.playerConfig.definition;
                u =
                  d && d.defaultDefinition ? d.defaultDefinition : l.definition;
              }
              !c && l.bitrate && (c = l.bitrate),
                (o.defaultDefinition = u),
                (o.defaultBitrate = c);
            },
          },
          {
            key: "beforePlayerInit",
            value: function () {
              var o = this.player,
                l = this;
              this._isInit ||
                (hm.defineGetterOrSetter(o, {
                  __url: {
                    get: function () {
                      return l.mse ? l.mse.url : o.config.url;
                    },
                    configurable: !0,
                  },
                  downloadSpeed: {
                    get: function () {
                      return zw / 8;
                    },
                    configurable: !0,
                  },
                  playerVersion: {
                    get: function () {
                      return ox;
                    },
                    configurable: !0,
                  },
                  menuCodeType: {
                    get: function () {
                      return l.mp4 && l.mp4.meta
                        ? l.mp4.meta.videoCodec
                        : "avc";
                    },
                    configurable: !0,
                  },
                  playerType: {
                    get: function () {
                      return "MP4";
                    },
                    configurable: !0,
                  },
                  supportMenus: {
                    get: function () {
                      return {
                        speed: o.mp4MseFlag,
                        cdn: o.mp4MseFlag,
                        resolution: o.mp4MseFlag,
                      };
                    },
                    configurable: !0,
                  },
                  CDNUrl: {
                    get: function () {
                      return l.CDNUrl;
                    },
                    configurable: !0,
                  },
                  abrInstance: {
                    get: function () {
                      return l.abrInstance;
                    },
                    configurable: !0,
                  },
                  ext: {
                    get: function () {
                      var u,
                        c,
                        d,
                        h,
                        f,
                        p,
                        g = [];
                      if (
                        (u = l.player) !== null &&
                        u !== void 0 &&
                        (c = u.video) !== null &&
                        c !== void 0 &&
                        c.buffered
                      )
                        for (
                          var y = l.player.video.buffered, v = 0, b = y.length;
                          v < b;
                          v++
                        )
                          g.push([y.start(v), y.end(v)]);
                      var w = [];
                      if (l.mse)
                        for (
                          var k = Math.min(l.opQueueLen, 5), D = 0;
                          D < k;
                          D++
                        )
                          w.push(l.mse.opQueues.video[D].context);
                      return {
                        type: "MP4",
                        usevideo: l.useVideoLoad,
                        duration:
                          (d = l.mp4) === null ||
                          d === void 0 ||
                          (h = d.meta) === null ||
                          h === void 0
                            ? void 0
                            : h.duration,
                        loadseg: {
                          loadIdx: l._curLoadSegmentIdx,
                          loadTimeRange:
                            (f = l.mp4) !== null && f !== void 0 && f.timeRange
                              ? l.mp4.timeRange[l._curLoadSegmentIdx]
                              : {},
                          waitIdx: l.debugInfo.loadIndx,
                          waitTimeRange:
                            (p = l.mp4) !== null &&
                            p !== void 0 &&
                            p.timeRange &&
                            l.debugInfo.loadIndx !== void 0
                              ? l.mp4.timeRange[l.debugInfo.loadIndx]
                              : {},
                        },
                        bufffer: g,
                        speed: l.debugInfo.speed,
                        states: l.states,
                        mseque: w,
                        url: l.playerConfig.url,
                      };
                    },
                    configurable: !0,
                  },
                }),
                (this._isInit = !0));
            },
          },
          {
            key: "destroy",
            value: function () {
              var o = this.player;
              console.log("[Index] destroy", this.playerId),
                this.preloader && this.preloader.destroy(this.playerId),
                (o.preloader = null),
                o.removeHooks("replay", this._replayHook),
                o.removeHooks("play", this._playHook),
                o.removeHooks("pause", this._pauseHook),
                o.removeHooks("retry", this._retryHook),
                this._reset(),
                this._onDestroyWasm(),
                (this.player.playNext = B4e),
                (this.player._startInit = JM),
                (this.player.changeDefinition = Vq),
                (this.player.switchURL = zq),
                this._unbindNetworkStateChange(),
                o.video &&
                  o.video.removeEventListener(
                    sk.BUFFERED_RESET,
                    this._onBufferedReset
                  ),
                this._bufferCheckTimer && clearInterval(this._bufferCheckTimer),
                this._removeBufferTimer &&
                  (clearTimeout(this._removeBufferTimer),
                  (this._removeBufferTimer = null));
            },
          },
          {
            key: "initAwManager",
            value: function () {
              var o = this,
                l = this.config;
              this.awManager ||
                (this.awManager = new TKr(l.cdnHost, l.cdnBucket));
              var u = new Np();
              if (((u.id = "aw"), (this._awPromise = u), l.isEncrypt)) {
                var c = new $Wr();
                c.push(this.awManager.init()),
                  c
                    .startup()
                    .then(function () {
                      c.destroy(), u.resolve();
                    })
                    .catch(function (d) {
                      c.destroy(), o._emitInitFail(d), u.reject();
                    });
              } else u.resolve();
            },
          },
          {
            key: "_proxyPlayer",
            value: function () {
              var o = this;
              typeof this.player.playNext == "function" &&
                (B4e = this.player.playNext),
                (this.player.playNext = function () {
                  o.playNext.apply(o, arguments);
                }),
                (JM = this.player._startInit),
                (zq = this.player.switchURL),
                (Vq = this.player.changeDefinition),
                (this.player._startInit = this.playerStartInit.bind(this)),
                (this.player.switchURL = this.switchURL.bind(this)),
                (this.player.changeDefinition =
                  this.changeDefinition.bind(this));
            },
          },
          {
            key: "getInitBitrate",
            value: function () {
              var o = this,
                l = this.player,
                u = this.config,
                c = this.playerConfig,
                d = null,
                h = l.definitionList;
              return (
                h &&
                  h.length > 0 &&
                  (h.map(function (f) {
                    var p = ok.generateUniqueKey({
                      vid: c.vid,
                      definition: f.definition || "",
                      vtype: c.vtype,
                      codecType: c.codecType,
                    });
                    (f.cacheKey = p),
                      p &&
                        !d &&
                        o.preloader &&
                        o.preloader.hasItemSameVid(p) &&
                        ((d = f).type = "preload");
                  }),
                  d &&
                    c.userSelectDefinition &&
                    u.focusUserDefinition &&
                    (console.log(
                      "[Index] getInitBitrate",
                      "preloadDefinition: "
                        .concat(d.definition, " userSelectDefinition:")
                        .concat(c.userSelectDefinition)
                    ),
                    c.userSelectDefinition !== d.definition && (d = null)),
                  !d &&
                    this.bitRateAdapter &&
                    ((this.bitRateAdapter.speed = CC.speed),
                    (d = this.getDefinitonFromAdapter(
                      h,
                      c.userSelectDefinition
                    )) && (d.type = "bitRateAdapter"))),
                (d && d.url) ||
                  (d =
                    (Gr.typeOf(c.url) === "Array" && c.url.length > 0) ||
                    (Gr.typeOf(c.url) === "String" && c.url)
                      ? {
                          url: c.url,
                          definition: c.defaultDefinition,
                          duration: c.duration || this.config.duration || 0,
                          bitrate:
                            c.defaultBitrate ||
                            this._getBitrateByDefition(c.defaultDefinition),
                          type: "default",
                        }
                      : h[h.length - 1]),
                (this.playerConfig.url = d.url),
                (d.networkSpeed = CC.speed),
                (d.fileSize = Kr.getFileSize(d.bitrate, c.duration)),
                (l.curDefinition = d),
                d
              );
            },
          },
          {
            key: "_setPlayerSrc",
            value: function (o) {
              var l = this.player;
              this._removeVideoSource(),
                Gr.typeOf(o) === "Array"
                  ? (l.video.removeAttribute("src"),
                    !l._detachSourceEvents &&
                      o.forEach(function (u) {
                        l.video.appendChild(
                          Gr.createDom("source", "", {
                            src: "".concat(u.src),
                            type: "".concat(u.type || ""),
                          })
                        );
                      }),
                    l._attachSourceEvents(l.video, o),
                    l.play())
                  : ((l.video.src = o), l.play()),
                (l.mp4MseFlag = !1),
                l.emit("playertypechange");
            },
          },
          {
            key: "_removeVideoSource",
            value: function (o) {
              var l = this.player,
                u = (o = o || l.video).children;
              if (u.length > 0)
                for (l._detachSourceEvents(o); u.length > 0; )
                  o.removeChild(u[0]);
            },
          },
          {
            key: "_getBitrateByDefition",
            value: function (o) {
              var l = this.playerConfig,
                u = 0;
              if (!l.definition || !l.definition.list) return u;
              for (var c = 0; c < l.definition.list.length; c++) {
                var d = l.definition.list[c];
                d.definition === o && (u = d.bitrate);
              }
              return u;
            },
          },
          {
            key: "_getDefinitionItem",
            value: function (o) {
              for (
                var l = this.playerConfig, u = 0;
                u < l.definition.list.length;
                u++
              ) {
                var c = l.definition.list[u];
                if (c.definition === o) return c;
              }
              return null;
            },
          },
          {
            key: "_initAbrDefinition",
            value: function () {
              var o = this.player,
                l = this.playerConfig;
              if (
                (l.definition.list.length > 0 &&
                  (o.curDefinition || (o.curDefinition = l.definition.list[0]),
                  o.curDefinition.vwidth ||
                    Object.assign(
                      o.curDefinition,
                      this._getDefinitionItem(o.curDefinition.definition)
                    ),
                  this._abrService.updateAbrCacheData()),
                this._abrService && this._abrService.isCurrentAutoDefi)
              ) {
                var u = l.definition.list.length;
                o.curDefinition = l.definition.list[u - 1];
              }
              for (var c = 0; c < l.definition.list.length; c++) {
                var d = l.definition.list[c];
                o.curDefinition.definition === d.definition
                  ? (d.selected = !0)
                  : (d.selected = !1);
              }
              console.log("resourceReady", l.definition.list.concat()),
                this.player.emit("resourceReady", l.definition.list);
              var h = o.curDefinition.bitrate;
              if (!h)
                for (var f = 0; f < l.definition.list.length; f++) {
                  var p = l.definition.list[f];
                  p.definition === o.curDefinition.definition &&
                    (h = p.bitrate);
                }
              this._abrService.updateBitrate(h);
            },
          },
          {
            key: "_initAbrService",
            value:
              ((n = Eu(
                Ya().mark(function o() {
                  var l, u;
                  return Ya().wrap(
                    function (c) {
                      for (;;)
                        switch ((c.prev = c.next)) {
                          case 0:
                            if (
                              ((l = this.playerConfig),
                              (u = this.config).autoBitrateOpts &&
                                u.autoBitrateOpts.isOpenAutoDefi)
                            ) {
                              c.next = 3;
                              break;
                            }
                            return c.abrupt("return");
                          case 3:
                            return (
                              (this._abrService = new vei(
                                this,
                                this.abrSwitchURL
                              )),
                              (c.next = 6),
                              this._abrService.init({
                                video: l.definition.list.concat(),
                              })
                            );
                          case 6:
                            this._initAbrDefinition();
                          case 7:
                          case "end":
                            return c.stop();
                        }
                    },
                    o,
                    this
                  );
                })
              )),
              function () {
                return n.apply(this, arguments);
              }),
          },
          {
            key: "_initMp4Kernel",
            value: function () {
              var o = this;
              (this.firstFrameTime.newplayer_initkernel =
                Kr.nowTime() - this.firstFrameTime.newplayer),
                this.log("[===========], initMp4Kernel,", Kr.nowTime());
              var l = this.playerConfig,
                u = this.config,
                c = new Np();
              try {
                var d = this._defInited ? null : this.getInitBitrate();
                if (
                  ((this._defInited = !0),
                  this.log("curDefinition", d),
                  this.log(
                    "[_initMp4Kernel] ".concat(l.vid, " curDefinition"),
                    d
                  ),
                  !this._handlerUrl(l.url))
                )
                  return c.reject(new Error("emptyUrl")), c;
                if (
                  u.forceVideoPlay &&
                  (this.codecType === uf.H264 || u.supportHevc)
                )
                  return (
                    (this.useVideoLoad = !0), c.reject("forceVideoPlay"), c
                  );
                var h = [];
                h.push(this._getLicense()),
                  h.push(this._checkPreloader()),
                  Promise.all(h)
                    .then(function (f) {
                      o.isDestroy && c.reject(new Error("destroy"));
                      var p = null;
                      if (
                        (f && f.length > 0 && f[1] && (p = f[1].data),
                        p ||
                          !u.needPreloadCheck ||
                          (o.codecType === uf.H265 && !u.supportHevc))
                      )
                        if (o._vtype && o._vtype === "MP3")
                          (o.useVideoLoad = !0),
                            c.reject(new Error("vtype_not_MP4"));
                        else {
                          var g = u._mainURL;
                          o._initMp4(g, p, { fileSize: d ? d.fileSize : 0 }),
                            o._initAbrService();
                        }
                      else
                        (o.useVideoLoad = !0),
                          c.reject(new Error("no_preload"));
                    })
                    .catch(function (f) {
                      console.error(f),
                        (f.errorType = "GET_LICENSE_ERROR"),
                        o.emit("error", f),
                        o.changeState("LICENSE_ERROR", {
                          d: d ? d.definition : 0,
                        }),
                        c.reject(f);
                    });
              } catch (f) {
                c.reject(f);
              }
              return c;
            },
          },
          {
            key: "playerStartInit",
            value: function (o) {
              var l = this;
              if (
                (this.log("playerStartInit", this.player.hasStart),
                !this.isDestroy)
              ) {
                if (!o || o === "__auto__" || o === "anytext") {
                  var u = this.playerConfig,
                    c = u.definition;
                  if (
                    c &&
                    c.list &&
                    c.list.length > 0 &&
                    c.defaultDefinition &&
                    (c.list.map(function (f) {
                      f.definition === c.defaultDefinition &&
                        ((u.url = f.url), (l.player.curDefinition = f));
                    }),
                    !u.url || o === "__auto__" || o === "anytext")
                  ) {
                    var d = c.list[0];
                    (o = d.url),
                      (u.url = d.url),
                      (this.player.curDefinition = d);
                  }
                }
                if (this.useVideoLoad) JM.call(this.player, o);
                else {
                  (this.player.mp4MseFlag = !0),
                    (this.bufferEndTime = -1),
                    (this._tm = new Date().getTime()),
                    this._reset();
                  var h = this.playerConfig.vid;
                  this.preloader && this.preloader.cancelPreloadByVid(h),
                    this.changeState("PLAYER_START_INIT"),
                    this._awPromise
                      .then(function () {
                        if (!l.isDestroy) {
                          l.changeState("AW_OK INIT_MP4_KERNEL");
                          var f = l._initMp4Kernel();
                          (l._initPromise = f),
                            l._addPendingPromise(l._initPromise),
                            f
                              .then(function (p) {
                                l.isDestroy ||
                                  (l.log(
                                    "[Index] _initMp4Kernel.then vid:"
                                      .concat(h, " isDestroy")
                                      .concat(l.isDestroy),
                                    p,
                                    l.mse ? l.mse.url : ""
                                  ),
                                  l.mse && (o = l.mse.url),
                                  l.changeState("PLAY_INIT_OK"),
                                  l._bindEvents(),
                                  l._startProgress());
                              })
                              .catch(function (p) {
                                var g =
                                  !!l._initPromise && l._initPromise.isBreak;
                                if (!l.isDestroy && !g)
                                  if (
                                    (console.error(
                                      "_initMp4Kernel.catch: "
                                        .concat(h, " isDestroy:")
                                        .concat(
                                          l.isDestroy,
                                          " _initPromise.isBreak:"
                                        )
                                        .concat(g),
                                      p
                                    ),
                                    p.errorCode !== -499897)
                                  ) {
                                    var y = p;
                                    y.errorCode ||
                                      ((y = new s0(l.player, {
                                        errorType: "runtime",
                                        errorTypeCode: g0.runtime,
                                        errorCode: Rc.other,
                                        vid: l.playerConfig.vid,
                                        errorMessage:
                                          p == null ? void 0 : p.message,
                                        mediaError: {
                                          code: Rc.other,
                                          message:
                                            p == null ? void 0 : p.message,
                                        },
                                      })).url = o),
                                      l.changeState("PLAY_INIT_CATCH", {
                                        c: y.errorCode,
                                        m: y.message,
                                      }),
                                      (l.player.vtype = "MP4_1"),
                                      l.player.emit(
                                        "playCatch",
                                        l.player.vtype,
                                        y
                                      );
                                  } else l._emitExpireEvent(p);
                              })
                              .finally(function () {
                                if (l._initPromise) {
                                  var p = l._initPromise.isBreak;
                                  l._initPromise &&
                                    l._removePendingPromise(l._initPromise),
                                    (l._initPromise = null),
                                    l._usePaused &&
                                      (l.playerConfig.autoplay = !1),
                                    l.codecType === uf.H265 &&
                                      Gr.typeOf(o) === "Array" &&
                                      (o = o[0].src),
                                    l.log(
                                      "_initMp4Kernel.finally:isDestroy"
                                        .concat(
                                          l.isDestroy,
                                          " _initPromise.isBreak:"
                                        )
                                        .concat(p)
                                    ),
                                    l.log(
                                      "[===========], playerStartInit,",
                                      Kr.nowTime()
                                    ),
                                    l.changeState("PLAY_INIT_FINALLY"),
                                    !l.isDestroy && !p && JM.call(l.player, o);
                                }
                              });
                        }
                      })
                      .catch(function (f) {
                        l.log("_awPromise.error", f),
                          l.changeState("PLAY_INIT_CATCH"),
                          !l.isDestroy && JM.call(l.player, o);
                      }),
                    this._abrService &&
                      this._abrService.isCurrentInAbr() &&
                      (this._abrService.enable(), this._abrService.execute());
                }
              }
            },
          },
          {
            key: "playNext",
            value: function (o) {
              var l = this.player;
              (this._defInited = !1),
                l.resetState(),
                (l._currentTime = 0),
                (l._duration = 0),
                (l.isPlaying = !1),
                (this._useVideoLoad = !1),
                l.pause(),
                this._reset(),
                o.vtype && (this._vtype = o.vtype.toUpperCase()),
                l.setConfig(o);
              var u = this.codecType;
              this.codecType = o.codecType
                ? o.codecType.toLowerCase()
                : uf.H264;
              var c = o[this.pluginName];
              c && (this.config = Object.assign(this.config, c)),
                u !== this.codecType &&
                  this.h265_h264_switch(this.playerConfig.mediaType || "video"),
                this.checkConfig(),
                this.initAwManager(),
                this.log("[Index] playNext", o),
                l.play(),
                this.emit("playnext");
            },
          },
          {
            key: "h265_h264_switch",
            value: function (o) {
              this.log("h265_switch_h264");
              var l = this.player,
                u = Gr.createDom(
                  o,
                  "",
                  this.getVideoConfig(this.playerConfig),
                  "xgplayer-".concat(o, "-img")
                );
              (this.removeVideo = l.video),
                (u.muted = l.video.muted),
                (u.volume = l.video.volume),
                (l.video = u),
                l.attachVideoEvents(l.video);
            },
          },
          {
            key: "getVideoConfig",
            value: function (o) {
              var l = Object.assign(
                {},
                {
                  controls: !1,
                  autoplay: o.autoplay,
                  playsinline: o.playsinline,
                  "x5-playsinline": o.playsinline,
                  "webkit-playsinline": o.playsinline,
                  "x5-video-player-fullscreen":
                    o["x5-video-player-fullscreen"] ||
                    o.x5VideoPlayerFullscreen,
                  "x5-video-orientation":
                    o["x5-video-orientation"] || o.x5VideoOrientation,
                  airplay: o.airplay,
                  "webkit-airplay": o.airplay,
                  tabindex: 2,
                  mediaType: o.mediaType || "video",
                },
                o.videoConfig,
                o.videoAttributes
              );
              return o.loop && (l.loop = "loop"), l;
            },
          },
          {
            key: "next",
            value: function (o) {
              this.playNext(o);
            },
          },
          {
            key: "oldChangeDefinition",
            value: function (o, l) {
              var u = this,
                c = this.config,
                d = this.player,
                h = this.playerConfig;
              d.emit(aSe, { from: l, to: o }), d.emit(Ewn);
              var f = d.definitionList.filter(function (v) {
                  return (
                    v.definition === o.definition ||
                    v.definition === Number(o.definition)
                  );
                }),
                p = d.definitionList.filter(function (v) {
                  return (
                    v.definition === l.definition ||
                    v.definition === Number(l.definition)
                  );
                });
              if ((p.length > 0 && (p[0].selected = !1), f.length > 0)) {
                ((o = f[0]).selected = !0),
                  (d.curDefinition = o),
                  this.log(
                    "[oldChangeDefinition],currentTime,",
                    d.currentTime,
                    ",from,",
                    l,
                    ",to,",
                    o
                  );
                var g = d.currentTime,
                  y = d.paused;
                this._changeDefState ||
                  ((this._changeDefState = { currentTime: g, paused: y }),
                  this.log(
                    "[oldChangeDefinition],currentTime,",
                    d.currentTime,
                    ",pause,",
                    y
                  )),
                  (c.definition = o.definition),
                  (this.config.keyValue = o.keyValue),
                  (this.config.kid = o.kid),
                  (this.config.secretKey = o.secretKey),
                  (this.config.drm = o.drm),
                  (this.config.getLicenseUrl = o.getLicenseUrl),
                  (h.url = o.url),
                  (h.backupURL = o.backupURL),
                  (h.userSelectDefinition = o.definition),
                  (h.defaultDefinition = o.definition),
                  (c.focusUserDefinition = !0),
                  (d.currentTime = 0),
                  d.pause(),
                  this._reset(),
                  (this._isMseInit = !1),
                  (this.eme = null),
                  this._handlerUrl(o.url),
                  this._changeDefineCanPlay &&
                    d.off("canplay", this._changeDefineCanPlay),
                  (this._changeDefineCanPlay = function () {
                    u.changeDefineCanPlay(g, y, l, o),
                      (u._changeDefineCanPlay = null);
                  }),
                  d.once("canplay", this._changeDefineCanPlay),
                  this.player.video.load(),
                  this.playerStartInit(h.url);
              }
            },
          },
          {
            key: "switchURL",
            value: function (o) {
              if (this.useVideoLoad) zq.call(this.player, o);
              else {
                var l = this.player,
                  u = this.playerConfig;
                (this.config.keyValue = o.keyValue),
                  (u.url = o.url),
                  (u.backupURL = o.backupURL),
                  (l.currentTime = 0),
                  l.pause(),
                  this.reset(),
                  (this._isMseInit = !1),
                  (this.eme = null),
                  this._handlerUrl(o.url),
                  l.video.removeAttribute("src"),
                  this._removeVideoSource(),
                  l.resetState();
              }
            },
          },
          {
            key: "_handlerUrl",
            value: function (o) {
              var l,
                u = this.config,
                c = this.playerConfig;
              if (!o) return !1;
              var d = [];
              if (Gr.typeOf(o) === "String")
                (l = o), c.backupURL && d.push(c.backupURL);
              else if (
                Gr.typeOf(o) === "Array" &&
                o.length > 0 &&
                ((l = o[0].src), o.length > 1)
              )
                for (var h = 1; h < o.length; h++)
                  d.push(Kr.extUrl(o[h].src, { __vid: c.vid }));
              return (
                !(!l && d.length === 0) &&
                ((u._mainURL = Kr.extUrl(l, { __vid: c.vid })),
                (u._backupURL = d),
                !0)
              );
            },
          },
          {
            key: "_firstFrameTime",
            value: function () {
              if (this.codecType === uf.H264 || this.config.supportHevc) {
                if (this.firstFrameTime.new_loadeddata < 0) {
                  (this.firstFrameTime.loadst_loadeddata =
                    Kr.nowTime() - this.loadstart),
                    (this.firstFrameTime.new_loadeddata =
                      Kr.nowTime() - this.firstFrameTime.newplayer);
                  var o = {};
                  for (var l in this.firstFrameTime)
                    Object.prototype.hasOwnProperty.call(
                      this.firstFrameTime,
                      l
                    ) &&
                      (this.log(
                        "======this.firstFrameTime======",
                        l,
                        ", ",
                        this.firstFrameTime[l]
                      ),
                      (o[l] = this.firstFrameTime[l]));
                }
              } else if (this.codecType === uf.H265) {
                var u = this.player.video.getStats(),
                  c = this.firstFrameTime.metaload,
                  d = this.firstFrameTime.startMuxTime;
                (this.firstFrameTime = u),
                  (this.firstFrameTime.metaload = c),
                  (this.firstFrameTime.startload_stmux = d),
                  (this.firstFrameTime.firstmux = this.mp4
                    ? this.mp4.firstFrameTime.firstmux
                    : -1);
                for (var h = 0; h < u.bootStats.length; h++)
                  this.firstFrameTime[u.bootStats[h].action] =
                    u.bootStats[h].dot;
                delete this.firstFrameTime.bootStats,
                  this.log(
                    "======this.firstFrameTime===>>",
                    JSON.stringify(this.firstFrameTime)
                  );
              }
            },
          },
          {
            key: "_bindEvents",
            value: function () {
              var o = this,
                l = this.config,
                u = this.player;
              this._isEventInit ||
                (this.on("seeking", this._onSeeking),
                this.on("waiting", this._onWaiting),
                this.on("ended", this._onEnded),
                this.on("error", this._onVideoError),
                this.on("playing", this._onPlaying),
                this.on("detectGap", function () {
                  l.gapDegrade && l.useEME && ((l.useEME = !1), o._replay());
                }),
                this.on("error", function (c) {
                  o.changeState("video_error", {
                    code: c.code,
                    message: c.message,
                    videoType: o.useVideoLoad,
                  });
                }),
                u.setEventsMiddleware({
                  error: function (c, d) {
                    var h = c.originalEvent;
                    o.changeState("video_error", {
                      code: h.code,
                      message: h.message,
                      videoType: o.useVideoLoad,
                    }),
                      o.log(
                        "error middleware",
                        c,
                        ",useVideoLoad,",
                        o.useVideoLoad
                      ),
                      o.useVideoLoad && d(c.eventName, h);
                  },
                })),
                (this._isEventInit = !0);
            },
          },
          {
            key: "deleteVideo",
            value: function () {
              if (this.removeVideo) {
                var o = this.removeVideo.parentNode;
                o && o.removeChild(this.removeVideo),
                  (this.removeVideo = null),
                  this.log("[_removeVideoSource]");
              }
            },
          },
          {
            key: "_unbindEvents",
            value: function () {
              this.off("seeking", this._onSeeking),
                this.off("waiting", this._onWaiting),
                this.off("ended", this._onEnded),
                this.off("playing", this._onPlaying),
                (this._isEventInit = !1);
            },
          },
          {
            key: "changeState",
            value: function (o) {
              var l =
                arguments.length > 1 && arguments[1] !== void 0
                  ? arguments[1]
                  : {};
              this._pTime || (this._pTime = Kr.nowTime());
              var u = Kr.nowTime() - this._pTime,
                c = Kr.nowTime() - this._sTime;
              this.log(">>>changeState[".concat(o, "]"), u, c, l),
                this.states.push({ state: o, t1: u, t2: c, data: l }),
                (this._pTime = Kr.nowTime());
              var d = Kr.nowTime() - this._pTime;
              (l.state = o), d && (l.t = d);
            },
          },
          {
            key: "checkIfCanPreload",
            value: function () {
              var o = this.player,
                l = this.useVideoLoad,
                u = this.config;
              if (u.isOpenPreload) {
                var c = l ? 5 : u.minBufferLength,
                  d = o.currentTime + c;
                d = d > o.duration ? o.duration : d;
                var h =
                  (l
                    ? o.getBufferedRange(o.buffered)
                    : o.getBufferedRange(o.buffered2))[1] - d;
                o.currentTime >= c &&
                  (h > 0 || Math.abs(h) < 1) &&
                  this.preloader &&
                  this.preloader.checkCanPreloadNext() &&
                  this.emit("PRELOAD_NEXT");
              }
            },
          },
          {
            key: "_getLicense",
            value: function () {
              var o = this,
                l = this.config,
                u = l.vid,
                c = l.kid,
                d = l.secretKey,
                h = new Np(),
                f = { method: "getLicense", success: 0 };
              if (c || d) {
                var p = kWr(u, c, d, this);
                (p.id = "licensePromise"),
                  this._addPendingPromise(p),
                  p
                    .then(function (g) {
                      o._removePendingPromise(p),
                        g.clearKeys
                          ? (o.config.drm = g)
                          : (o.config.keyValue = g),
                        (f.success = 1),
                        h.resolve(f);
                    })
                    .catch(function (g) {
                      o.log("licensePromise reject"),
                        (f.success = 0),
                        (f.error = g),
                        h.reject(f);
                    });
              } else (f.success = 0), h.resolve(f);
              return h;
            },
          },
          {
            key: "softDecode",
            get: function () {
              var o, l;
              return (
                ((o = this.player) === null ||
                o === void 0 ||
                (l = o.config) === null ||
                l === void 0
                  ? void 0
                  : l.mediaType) === "xg-video"
              );
            },
          },
          {
            key: "_initH265MseProxy",
            value: function () {
              this.player.video instanceof HTMLVideoElement &&
                this.h265_h264_switch(this.playerConfig.mediaType);
              var o = this.player.video;
              this.softDecode && o.setPlayMode && o.setPlayMode("VOD"),
                (this.mseProxy = o),
                this.softDecode &&
                  ((this.player.forceDegradeToVideo = function () {}),
                  this.player.video.addEventListener(
                    "lowdecode",
                    this._lowDecoder
                  ),
                  this.player.video.addEventListener("error", this._onError));
            },
          },
          {
            key: "removeAndRejectInitPromise",
            value: function (o) {
              this._initPromise &&
                (this._removePendingPromise(this._initPromise),
                this._initPromise.reject(o));
            },
          },
          {
            key: "_initMp4",
            value: function (o) {
              var l = this,
                u =
                  arguments.length > 1 && arguments[1] !== void 0
                    ? arguments[1]
                    : {},
                c =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : {};
              this.firstFrameTime.initkernel_initmp4 =
                Kr.nowTime() -
                this.firstFrameTime.newplayer -
                this.firstFrameTime.newplayer_initkernel;
              var d = this.config,
                h = this.player,
                f = this.playerConfig;
              this.mp4 &&
                (this.mp4.off(qs.META_READY, this._onMp4MetaReady),
                this.mp4.off(qs.ERROR, this._onMp4Error),
                this.mp4.off(qs.UPDATEEME, this._updateDrmConfig),
                this.mp4.off(qs.TASK_PROGRESS, this._onMp4Progress),
                this.mp4.off(qs.MOOV_REQ_PROGRESS, this._onMp4DataCallBack),
                this.mp4.destroy(),
                (this.mp4 = null)),
                this.changeState("MP4_NEW", {}),
                (this.mp4 = new CC(
                  o,
                  h.curDefinition.bitrate,
                  {
                    segmentDuration: d.segmentMinDuration,
                    enableWorker: d.enableWorker,
                    codecType: this.codecType,
                    chunkSize: d.preloadSize,
                    loadSize: 800,
                    duration: f.duration || 0,
                    fileSize: c.fileSize || 0,
                    playerId: this.playerId,
                    vid: f.vid,
                    useUrlRange: d.useUrlRange,
                    retryCount: d.retryCount,
                    retryDelay: d.retryDelay,
                    onProcessMinLen: d.onProcessMinLen,
                    supportHevc: d.supportHevc,
                    reqOptions: d.reqOptions,
                  },
                  this,
                  null,
                  u,
                  this.config._backupURL,
                  this.firstFrameTime,
                  ""
                )),
                this.mp4.once(qs.META_READY, this._onMp4MetaReady),
                this.mp4.on(qs.ERROR, this._onMp4Error),
                this.mp4.on(qs.UPDATEEME, this._updateDrmConfig),
                this.mp4.on(qs.TASK_PROGRESS, this._onMp4Progress),
                this.mp4.on(qs.MOOV_REQ_PROGRESS, this._onMp4DataCallBack),
                this.mp4.on(qs.CHANGE_URL, function (p) {
                  l.player && l.player.emit("initialUrl", { url: p });
                }),
                this.mp4.MP4Loader.on(U4e, function (p) {
                  (zw = p.speed),
                    l.debugInfo.speed || (l.debugInfo.speed = []),
                    l.debugInfo.speed.push(zw),
                    l.debugInfo.speed.length > 10 && l.debugInfo.speed.shift(),
                    l.emit(U4e, p);
                }),
                this.changeState("MP4_INIT", {}),
                this.mp4.init(u);
            },
          },
          {
            key: "_checkPreloader",
            value: function () {
              var o = this,
                l = this.playerConfig,
                u = new Np(),
                c = {
                  method: "checkPreloader",
                  success: 0,
                  type: "error",
                  cacheKey: "",
                };
              this.changeState("CHECK_PRELOAD");
              var d = this.player.curDefinition,
                h = d.cacheKey
                  ? d.cacheKey
                  : ok.generateUniqueKey({
                      vid: l.vid,
                      definition: d.definition || "",
                      vtype: l.vtype,
                      codecType: l.codecType,
                    });
              return (
                (c.cacheKey = h),
                this.preloader && h
                  ? this.preloader.getPreLoadData(h).then(function (f) {
                      console.log(">>>>check Preloader result", h, f),
                        f
                          ? ((o.preLoadData = f),
                            o.emit("PRELOAD_INFO", o.preLoadData),
                            (c.success = 1),
                            (c.data = f),
                            o.changeState("PRELOAD_OK", {
                              l: o.preLoadData.byteLength,
                              ck: h,
                            }),
                            (f.mediaSegList && f.mediaSegList.length > 0) ||
                            (f.buffer && f.buffer.byteLength > 0)
                              ? (o.hitpreload = !0)
                              : (o.hitpreload = !1),
                            u.resolve(c))
                          : ((o.preLoadData = null),
                            o.changeState("PRELOAD_ERROR", { t: 0 }),
                            (c.success = 0),
                            (c.error = new Error("none_preload")),
                            u.resolve(c));
                    })
                  : (this.changeState("PRELOAD_ERROR", { t: 2 }),
                    (c.success = 0),
                    (c.error = new Error("no_preloader")),
                    u.resolve(c)),
                u
              );
            },
          },
          {
            key: "_initEME",
            value: function (o, l) {
              var u = this.player,
                c = this.config,
                d = o.checkCodecH265();
              (c.useEME = !(c.useEME === !1 || d)),
                this._updateDrmConfig(l),
                this.log("config.useEME: ", c.useEME);
              var h = c.drm;
              !this.eme &&
                h &&
                h.clearKeys &&
                c.useEME &&
                (this.eme = new CWr(h)),
                c.useEME &&
                  this.eme &&
                  (this.eme.setOptions(
                    'video/mp4; codecs="avc1.64001E"',
                    'audio/mp4; codecs="mp4a.40.2"'
                  ),
                  this.eme.SetupEME(u.video));
            },
          },
          {
            key: "_initMse",
            value: function (o) {
              var l = this,
                u = this.playerConfig;
              this.mse && (this.mse.destroy(), (this.mse = null));
              var c,
                d = this.mp4 && this.mp4.checkCodecH265(),
                h = !!o.videoCodec,
                f = !!o.audioCodec;
              c =
                h && f
                  ? d
                    ? 'video/mp4; codecs="hev1.1.6.L93.B0, mp4a.40.5"'
                    : 'video/mp4; codecs="avc1.64001E, mp4a.40.5"'
                  : h
                  ? d
                    ? 'video/mp4; codecs="hev1.1.6.L93.B0"'
                    : 'video/mp4; codecs="avc1.64001E"'
                  : 'video/mp4; codecs="mp4a.40.5"';
              var p = cs({}, dS.VIDEO, { mimeType: "video/mp4", codec: c });
              (this.mse = new VGe(u.mediaType, this.log.bind(this))),
                this.mse.on(Jy.MSE_OPEN, function (g) {
                  (l.firstFrameTime.initmse_sbopen = g.costtime),
                    l._loadStartEventTime > 0 &&
                      (l.firstFrameTime.mseopen =
                        Kr.nowTime() - l._loadStartEventTime),
                    l.changeState("MSE_OPEN");
                }),
                this.mse.on(Jy.MSE_OPEN_DONE, function (g) {
                  (l.firstFrameTime.initmse_sbopendone = g.costtime),
                    l.changeState("MSE_OPEN_DONE"),
                    (l._isMseInit = !0),
                    l._onTimeUpdate();
                }),
                this.mse.on(Jy.MSE_ERROR, function (g) {
                  if (
                    (console.log("[MSE error]", g),
                    g && l.mse && l.mse.isFull())
                  ) {
                    var y = l.player.getBufferedRange(l.player.buffered2);
                    l._checkRemoveSourceBuffer(y, l.player.currentTime, !0);
                  } else {
                    var v = new s0(l.player, {
                      errorType: "runtime",
                      errorTypeCode: g0.runtime,
                      errorCode: Rc.mseAppend,
                      errorMessage: g.message,
                      vid: u.vid,
                      mediaError: { code: Rc.mseAppend, message: g.message },
                    });
                    l._errorHandler(v);
                  }
                }),
                this.mse.on(Jy.UPDATE_END, function (g) {
                  var y = g.context,
                    v = g.costtime;
                  if (y && y.isinit)
                    (l.firstFrameTime.metaready_initsegend = v),
                      l.log(
                        "player appendBuffer end ==>>>",
                        y || null,
                        ", costTime,",
                        v
                      ),
                      l.changeState("MSE_INITSEG_OK");
                  else if (
                    (l.log(
                      "player appendBuffer end ==>>>",
                      y || null,
                      ", costTime,",
                      v,
                      ", opt,",
                      g.name,
                      ",bufferRange,",
                      l.player.getBufferedRange()
                    ),
                    l.firstFrameTime.loadst_loadeddata < 0 &&
                      (l._firstSegState < 0 && l._onTimeUpdate(),
                      l.firstFrameTime.apcnt++,
                      (l.firstFrameTime.aplen += y ? y.dataLen : 0),
                      (l.firstFrameTime.data_ap += v),
                      l.changeState("APPEND_DATA_OK", {
                        costime: v,
                        dataLen: y ? y.dataLen : 0,
                      })),
                    l.mse &&
                      y.state &&
                      y.fragIndex === l.mp4.timeRange.length - 1)
                  ) {
                    var b = l.player.buffered;
                    (l.bufferEndTime = b.end(b.length - 1)),
                      l._isEnded(),
                      l.log(
                        "loaded ended !!!==>>>",
                        y.range,
                        ", fragIndex,",
                        y.fragIndex,
                        ", bufferEndTime,",
                        l.bufferEndTime,
                        ",meta_duration,",
                        l.mp4.meta.duration
                      );
                  }
                }),
                this.changeState("MSE_INIT"),
                this.mse.init(p);
            },
          },
          {
            key: "_appendInitSeg",
            value: function (o) {
              this.mp4 &&
                this.mse &&
                (this.changeState("MSE_INITSEG"),
                this.log(
                  "[=======ready_append_init]",
                  Kr.nowTime(),
                  ",mseDone,",
                  !!this.mse && this.mse.ready,
                  ",isopen,",
                  !!this.mse && this.mse.isMediaSourceOpen()
                ),
                !this.mse.ready && this.openMSE(),
                (this.firstFrameTime.metaready_mseisopen =
                  this.mse && this.mse.ready ? 1 : 0),
                this.mse.appendBuffer(dS.VIDEO, o, {
                  vid: this.playerConfig.vid,
                  range: null,
                  dataLen: o.byteLength,
                  isinit: !0,
                }),
                this.mp4.useEME && this.eme && this.eme.emit("encrypted"));
            },
          },
          {
            key: "_checkMetaInfo",
            value: function (o) {
              var l = null;
              return o
                ? null
                : ((l = {
                    errorCode: Rc.metaError,
                    errorMessage: "meta is null",
                    errorType: "demux",
                    errorTypeCode: g0.demux,
                  }),
                  new s0(
                    this.player,
                    kf(
                      kf({}, l),
                      {},
                      {
                        vid: this.playerConfig.vid,
                        mediaError: {
                          code: l.errorCode,
                          message: l.errorMessage,
                        },
                      }
                    )
                  ));
            },
          },
          {
            key: "_stopProgress",
            value: function () {
              (this._hasStartProgress = !1),
                this._requestTimer &&
                  (this._requestTimer.stop(), (this._requestTimer = null)),
                this._bufferBreakTimer &&
                  (clearTimeout(this._bufferBreakTimer),
                  (this._bufferBreakTimer = null),
                  (this._bufferBreakFlag = void 0));
            },
          },
          {
            key: "_bindNetworkStateChange",
            value: function () {
              window.addEventListener("online", this._onOnlineHandler),
                window.addEventListener("offline", this._onOfflineHandler);
            },
          },
          {
            key: "_unbindNetworkStateChange",
            value: function () {
              window.removeEventListener("online", this._onOnlineHandler),
                window.removeEventListener("offline", this._onOfflineHandler);
            },
          },
          {
            key: "_onSuperStart",
            value: function (o) {
              var l = this,
                u = this.player;
              ks("_onSuperStart:".concat(o), this.mse),
                (u.video.src = o),
                this.once("canplay", function () {
                  u.play(), l.on("waiting", l._onWaiting);
                });
            },
          },
          {
            key: "openMSE",
            value: function () {
              var o = this.mse;
              !o.ready &&
                o.isMediaSourceOpen() &&
                (this.log("[=======主动调用_onSourceOpen start]", Kr.nowTime()),
                o._onSourceOpen(),
                this.log(
                  "[=======主动调用_onSourceOpen, end ]",
                  Kr.nowTime(),
                  "mseDone,",
                  o.ready
                ));
            },
          },
          {
            key: "_appendBuffer",
            value: function (o, l) {
              var u =
                  arguments.length > 2 && arguments[2] !== void 0
                    ? arguments[2]
                    : {},
                c = arguments.length > 3 ? arguments[3] : void 0,
                d = this.mse,
                h = this.playerConfig.vid;
              this.log(
                "player appendBuffer start ==>>>",
                h,
                u.range,
                l.byteLength,
                ", queueLen,",
                d && d.opQueues[o] ? d.opQueues[o].length : null
              ),
                d.ready ||
                  (this.openMSE(),
                  (this.firstFrameTime.metaready_mseisopen =
                    this.mse && this.mse.ready ? 2 : -1)),
                d.appendBuffer(o, l, {
                  vid: h,
                  fragIndex: u.fragIndex,
                  range: u.range,
                  dataLen: l.byteLength,
                  state: c,
                });
            },
          },
          {
            key: "_loadData",
            value:
              ((e = Eu(
                Ya().mark(function o() {
                  return Ya().wrap(
                    function (l) {
                      for (;;)
                        switch ((l.prev = l.next)) {
                          case 0:
                            if (navigator.onLine) {
                              l.next = 2;
                              break;
                            }
                            return l.abrupt("return");
                          case 2:
                            if (this.mp4 && this._isMseInit) {
                              l.next = 5;
                              break;
                            }
                            return (
                              this.log(
                                "loadData, player.mp4 null",
                                this._isMseInit
                              ),
                              l.abrupt("return")
                            );
                          case 5:
                            return (
                              this.loadstart < 0 &&
                                (this.loadstart = Kr.nowTime()),
                              (l.prev = 6),
                              (l.next = 9),
                              this.mp4.load(
                                this._curLoadSegmentIdx,
                                this._loadDataSuccess
                              )
                            );
                          case 9:
                            l.next = 14;
                            break;
                          case 11:
                            (l.prev = 11),
                              (l.t0 = l.catch(6)),
                              console.error(
                                "[Index] _loadData error",
                                this.playerConfig.vid,
                                l.t0
                              );
                          case 14:
                          case "end":
                            return l.stop();
                        }
                    },
                    o,
                    this,
                    [[6, 11]]
                  );
                })
              )),
              function () {
                return e.apply(this, arguments);
              }),
          },
          {
            key: "getDataBitRate",
            value: function (o) {
              var l = this.mp4,
                u = this.playerConfig;
              if (!l) return 0;
              for (
                var c = l.getDataBitRate(o),
                  d = u.definition.list,
                  h = 0,
                  f = 0;
                f < d.length;
                f++
              )
                if (d[f].bitrate === c) {
                  h = d[f];
                  break;
                }
              return h;
            },
          },
          {
            key: "_loadStuckCheck",
            value: function () {
              var o = this,
                l = this.config,
                u = this.playerConfig,
                c = this.player;
              l.disableBufferBreakCheck ||
                (c.currentTime - (this._lastCurrentTime || 0) > 0.1 || c.paused
                  ? (this._bufferBreakFlag !== 1 &&
                      this._bufferBreakFlag !== 2) ||
                    (this.log("视频没有卡死,重置卡死标记"),
                    (this._bufferBreakFlag = 0),
                    clearTimeout(this._bufferBreakTimer),
                    (this._bufferBreakFlag = null))
                  : this._bufferBreakFlag ||
                    ((this._bufferBreakFlag = 1),
                    this.log(
                      "卡死计时开始! 持续".concat(n4e, "毫秒则确认卡死")
                    ),
                    (this._bufferBreakTimer = setTimeout(function () {
                      o.isDestroy ||
                        (o._bufferBreakFlag === 1 &&
                          ((o._bufferBreakFlag = 2),
                          o.log("确认卡死!!!"),
                          o._errorHandler(
                            new s0(o.player, {
                              errorType: "runtime",
                              errorTypeCode: g0.runtime,
                              errorCode: Rc.waitTimeout,
                              errorMessage: "wait_timeout",
                              vid: u.vid,
                            })
                          )),
                        (o._bufferBreakTimer = null));
                    }, n4e))),
                (this._lastCurrentTime = c.currentTime));
            },
          },
          {
            key: "_doubleCheckBuffer",
            value: function (o) {
              var l = this.player;
              if (
                !(o.startTime > l.currentTime) ||
                !l.video ||
                !l.video.buffered
              )
                return !0;
              var u = l.video.buffered;
              if (u.length === 1) return !0;
              for (var c = !1, d = 0; d < u.length; d++) {
                var h = u.start(d) - 0.5,
                  f = u.end(d) + 0.5;
                if (h <= o.startTime && o.endTime <= f) {
                  c = !0;
                  break;
                }
              }
              return c;
            },
          },
          {
            key: "_onTimeUpdate",
            value: function () {
              var o = this,
                l = this.mse,
                u = this.mp4,
                c = this.player;
              if (this.useVideoLoad) this.checkIfCanPreload();
              else if (u) {
                var d = u.timeRange;
                if (d && !(d.length < 1) && this._firstSegState !== 1) {
                  var h = c.getBufferedRange(c.buffered2);
                  if ((l || this.mseProxy) && u && u.canDownload) {
                    Kr.nowTime() - this._lastCheckTime > 1e3 &&
                      ((this._lastCheckTime = Kr.nowTime()),
                      this._loadStuckCheck(),
                      this._startUrlExpiredCheck(),
                      this._checkRemoveSourceBuffer(h, c.currentTime));
                    var f = c.paused
                      ? c.currentTime + this._minBufferLength
                      : c.currentTime + this._maxBufferLength;
                    h[1] - f < 0 &&
                      d.every(function (p, g) {
                        if (p.downloaded) {
                          if (o._doubleCheckBuffer(p)) return !0;
                          (p.downloaded = !1),
                            (p.isLoading = !1),
                            o.log(
                              "".concat(
                                g,
                                " download state error, no buffer, download again"
                              )
                            );
                        }
                        p.startTime - c.currentTime < o._maxBufferLength
                          ? ((o._curLoadSegmentIdx = g),
                            o.log(
                              "[onTimeUpdate],load index==>>>, ",
                              g,
                              ",IdxTimeRange, ",
                              p.startTime,
                              "-",
                              p.endTime,
                              ",buffEnd, ",
                              h[1],
                              ",playCurTime,",
                              c.currentTime,
                              ", bufferLen,",
                              h[1] - c.currentTime,
                              ",bufferRangeList,",
                              o.player.buffered2
                                ? o.player.buffered2.bufferedList
                                : null
                            ),
                            o._loadData())
                          : o.log(
                              "[onTimeUpdate] not load index==>>>",
                              g,
                              ",IdxTimeRange, ",
                              p.startTime,
                              "-",
                              p.endTime,
                              ",playCurTime,",
                              c.currentTime,
                              ",bufferRangeList,",
                              o.player.buffered2
                                ? o.player.buffered2.bufferedList
                                : null
                            );
                      }),
                      this.checkIfCanPreload(),
                      this.playFlag &&
                        !this._hasTriggerBufferThreshold &&
                        this._startBufferCheck(),
                      this._isEnded();
                  }
                }
              }
            },
          },
          {
            key: "_reset",
            value: function () {
              for (var o in ((this.states = []),
              (this.hitpreload = !1),
              (this._sTime = Kr.nowTime()),
              (this._usePaused = !1),
              (this._firstSegState = -1),
              (this.useVideoLoad = !1),
              (this._isMseInit = !1),
              (this.endofstream = !1),
              (this._curLoadSegmentIdx = 0),
              (this.preLoadData = null),
              (this.forPreloadTimeCache = null),
              (this.playFlag = !1),
              (this._waitAdjustTimeCnt = 0),
              this._initPromise &&
                this._initPromise.state === "pending" &&
                this._initPromise.reject("DESTROYED"),
              clearTimeout(this.checkResumePlayTimer),
              (this.checkResumePlayTimer = null),
              this._stopProgress(),
              this.mp4 &&
                (this.mp4.off(qs.META_READY, this._onMp4MetaReady),
                this.mp4.off(qs.ERROR, this._onMp4Error),
                this.mp4.off(qs.UPDATEEME, this._updateDrmConfig),
                this.mp4.off(qs.TASK_PROGRESS, this._onMp4Progress),
                this.mp4.off(qs.MOOV_REQ_PROGRESS, this._onMp4DataCallBack),
                this.mp4.destroy(),
                (this.mp4 = null)),
              this.mse && (this.mse.destroy(), (this.mse = null)),
              this.mseProxy &&
                (this.player.video.removeEventListener(
                  "lowdecode",
                  this._onDegrade
                ),
                this.player.video.removeEventListener("error", this._onError)),
              this._clearMediaKeys(),
              this._unloadVideo(),
              this._cancelPendingPromises(),
              this._abrService &&
                (this._abrService.destroy(), (this._abrService = null)),
              this.firstFrameTime))
                Object.prototype.hasOwnProperty.call(this.firstFrameTime, o) &&
                  (this.firstFrameTime[o] =
                    o === "apcnt" || o === "aplen"
                      ? 0
                      : o === "newplayer"
                      ? Kr.nowTime()
                      : -1);
              clearTimeout(this._waitInBufferTimer),
                (this._waitInBufferTimer = null),
                (this.loadstart = -1),
                (this._loadStartEventTime = -1),
                (this.startLoadData = -1);
            },
          },
          {
            key: "removeErrorUrls",
            value: function (o, l, u) {
              return (
                (o.errorCode !== -499897 && o.errorCode !== -499892) ||
                  this._emitExpireEvent(o),
                u
              );
            },
          },
          {
            key: "_errorHandler",
            value: function (o) {
              var l = this.player,
                u = this.playerConfig,
                c = this.preLoadData;
              if (l) {
                if (this.useVideoLoad)
                  return (
                    console.log("useVideoLoad final error!!!!, ", u.vid, o),
                    void this.emit("error", o)
                  );
                if (mD(o) !== "object") {
                  var d = {};
                  (d.err = o), (o = d);
                }
                var h = l.paused;
                (o.vid = u.vid),
                  (o.preloadHit = c && c.byteLength > 0 ? 1 : 0),
                  (o.preloadCached = c ? c.duration : 0),
                  (o = new s0(l, o)),
                  this.log("_errorHandle", "preState is ".concat(h), o),
                  !o.url && (o.url = l.src),
                  (this.player.vtype = "MP4_2"),
                  this.player.emit("playCatch", this.player.vtype, o),
                  o.errd &&
                    mD(o.errd) === "object" &&
                    this.mp4 &&
                    ((o.errd.url = this.mp4.url), (o.url = this.mp4.url)),
                  (o.codectype = this.codecType),
                  this.emit("DATA_REPORT", o),
                  this.mp4 &&
                    this.mp4.url &&
                    this.removeErrorUrls(o, this.mp4.url, u.url),
                  this.log("error task cancel"),
                  this.mp4 && this.mp4.cancelLoading(),
                  this._abrService && this._abrService.disable(),
                  this.mp4 && (this.mp4.canDownload = !1),
                  this.mp4 &&
                    this.mp4.bufferCache &&
                    this.mp4.bufferCache.clear(),
                  this._startDegradedPlayback(o);
              }
            },
          },
          {
            key: "_startDegradedPlayback",
            value: function (o) {
              var l = this;
              this.mp4 && (this.mp4.canDownload = !1);
              var u = this.player,
                c = this.playerConfig;
              (this.endofstream = !1),
                (this._currentTime = u.currentTime || 0),
                this.player.pause(),
                this._reset(),
                (this._replay = null),
                this.codecType === uf.H265
                  ? (console.log("h265 err,degrade use 264 play", c.vid),
                    this._onDegrade(o))
                  : this.codecType === uf.H264 &&
                    (this.config.drm
                      ? (this.config.drm &&
                          Object.keys(this.config.drm).map(function (d) {
                            l.config.drm && (o[d] = l.config.drm[d]);
                          }),
                        console.log("final error !!!!, ", c.vid, o),
                        this.emit("error", o))
                      : ((this.useVideoLoad = !0),
                        this._setPlayerSrc(c.url),
                        this.once("canplay", function () {
                          l._currentTime && (u.currentTime = l._currentTime),
                            !u.paused && u.play();
                        })));
            },
          },
          {
            key: "_startProgress",
            value: function () {
              var o = this;
              this._hasStartProgress ||
                (this._stopProgress(),
                (this._requestTimer = new BZr(function () {
                  o._requestTimer && o._onTimeUpdate();
                })),
                this._requestTimer.tickEvery(this._tickInSeconds),
                (this._hasStartProgress = !0));
            },
          },
          {
            key: "_unloadVideo",
            value: function () {
              var o = this.player;
              try {
                this.log("unloadVideo src ".concat(o.video.src)),
                  o.video &&
                    o.video.src &&
                    (o.video.removeAttribute("src"), o.video.load());
              } catch (l) {
                this.log("unloadVideo error", l);
              }
            },
          },
          {
            key: "_addPendingPromise",
            value: function (o) {
              this._pendingPromises.push(o);
            },
          },
          {
            key: "_removePendingPromise",
            value: function (o) {
              this.log("removePendingPromise", o.id);
              var l = this._pendingPromises.indexOf(o);
              l > -1 && this._pendingPromises.splice(l, 1);
            },
          },
          {
            key: "_cancelPendingPromises",
            value: function () {
              this._pendingPromises.length > 0 &&
                this._pendingPromises.forEach(function (o) {
                  o.reject(bei);
                }),
                (this._pendingPromises = []);
            },
          },
          {
            key: "_onMediaExpired",
            value: function () {
              this._stopProgress(), this.emit(sk.MEDIA_EXPIRED);
            },
          },
          {
            key: "_onDestroyWasm",
            value: function () {
              this.awManager &&
                (this.awManager.destroy(), (this.awManager = null));
            },
          },
          {
            key: "_isEnded",
            value: function () {
              var o = this.player,
                l = this.mp4,
                u = o.bufferedPoint,
                c = u ? u.end : 0;
              return (
                !this.endofstream &&
                  this.bufferEndTime > 0 &&
                  this.mse &&
                  this.bufferEndTime - o.currentTime < 0.5 &&
                  (this.log(
                    "[check player isEnded],deal mse.endOfStream, currentTime,",
                    o.currentTime,
                    ", bufferend,",
                    c,
                    ", duration,",
                    l.meta.duration
                  ),
                  (this.endofstream = !0),
                  this.mse.endOfStream()),
                !!(l && l.meta && l.meta.duration - o.currentTime < 0.5) &&
                  (this._stopProgress(),
                  this.log(
                    "[check player isEnded],stopProgress and endOfStream,currentTime, ",
                    o.currentTime,
                    ", bufferend,",
                    c,
                    ", duration,",
                    l.meta.duration
                  ),
                  this.mse && this.mse.endOfStream(),
                  !0)
              );
            },
          },
          {
            key: "_clearMediaKeys",
            value: function () {
              var o = this.player;
              o.video &&
                typeof o.video.setMediaKeys == "function" &&
                o.video.setMediaKeys(null).catch(function () {});
            },
          },
          {
            key: "_checkRemoveSourceBuffer",
            value: function (o, l, u, c) {
              var d = this,
                h = this.mse,
                f = this.mp4,
                p = this.player;
              if (
                h &&
                f &&
                p &&
                (u &&
                  (clearTimeout(this._removeBufferTimer),
                  (this._removeBufferTimer = null)),
                o || (o = p.getBufferedRange(p.buffered2)),
                l || (l = p.currentTime),
                !(
                  (!u &&
                    Kr.nowTime() - this._checkRemoveBufferLastTime <=
                      this.config.removeBufferLen) ||
                  this.endofstream
                ) &&
                  ((this._checkRemoveBufferLastTime = Kr.nowTime()),
                  o &&
                    o[0] >= 0 &&
                    (l - o[0] > this.config.removeBufferLen || h.isFull())))
              ) {
                var g = c ? o[1] : l - (h.isFull() ? 0 : 15),
                  y = f.getFragmentIdx(g);
                if (y >= 0 && (c || f.timeRange[y].startTime < l)) {
                  var v = Math.floor(Math.min(f.timeRange[y].startTime, o[1]));
                  o[0] < v
                    ? (this.log(
                        "[checkremoveSourceBuffer], remove range==>>>",
                        o[0],
                        v
                      ),
                      h.reuse(o[0], v))
                    : h.isFull() &&
                      !this._removeBufferTimer &&
                      (this.log(
                        "[after 10s, go on checkremoveSourceBuffer], currentTime==>>>",
                        l,
                        ", buffer start,",
                        o[0]
                      ),
                      (this._removeBufferTimer = setTimeout(function () {
                        d._checkRemoveSourceBuffer(null, null, !0);
                      }, 1e4)));
                }
              }
            },
          },
          {
            key: "onMediaUpdate",
            value: function (o) {
              var l = o.vid,
                u = o.kid,
                c = o.url,
                d = this.player,
                h = this.config;
              if (l === this.playerConfig.vid && u === h.kid && c) {
                (this.playerConfig.url = c), this._handlerUrl(c);
                var f = h._mainURL;
                return (
                  this.useVideoLoad
                    ? (d.src = c)
                    : this.mp4 && this.mp4.update(f),
                  !0
                );
              }
              return !1;
            },
          },
          {
            key: "enableAutoBuffer",
            value: function (o) {
              var l = this;
              if (o) {
                if (!this._allInitPromise)
                  return void this.log("player destroyed!!");
                this._allInitPromise.then(function () {
                  l.log("enableAutoBuffer true"), l._startProgress();
                });
              } else this._stopProgress(), this.log("enableAutoBuffer false");
            },
          },
          {
            key: "bitRateAdapter",
            get: function () {
              return this.player &&
                this.player.plugins &&
                this.config.needAutoBitrate
                ? this.player.plugins.bitrateselector
                : null;
            },
          },
          {
            key: "getDefinitonFromAdapter",
            value: function (o, l) {
              if (!this.bitRateAdapter) return null;
              var u = this.bitRateAdapter;
              return u.getSuitableBitrate
                ? u.getSuitableBitrate(o, l)
                : u.bitRateAdapter
                ? u.bitRateAdapter.select(o)
                : null;
            },
          },
          {
            key: "addPreloader",
            value: function () {
              var o =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : {};
              (o.playerId = this.playerId),
                this.preloader
                  ? this.preloader.addPreloader(
                      o,
                      this.playerId,
                      this.playerConfig.vid
                    )
                  : this.log("preloader has destroyed");
            },
          },
          {
            key: "addPreloaderList",
            value: function () {
              var o =
                arguments.length > 0 && arguments[0] !== void 0
                  ? arguments[0]
                  : [];
              this.preloader
                ? this.preloader.addPreloaderList(
                    o,
                    this.playerId,
                    this.playerConfig.vid
                  )
                : this.log("preloader has destroyed");
            },
          },
          {
            key: "changeUserSelectDefinition",
            value: function (o) {
              this.preloader &&
                o &&
                this.preloader.changeUserSelectDefinition(o);
            },
          },
          {
            key: "log",
            value: function (o) {
              for (
                var l = this.playerConfig,
                  u =
                    l && l.vid
                      ? "[Index]".concat(l.vid, " ").concat(o)
                      : "[Index] ".concat(o),
                  c = arguments.length,
                  d = new Array(c > 1 ? c - 1 : 0),
                  h = 1;
                h < c;
                h++
              )
                d[h - 1] = arguments[h];
              ks.apply(void 0, [u].concat(d));
            },
          },
          {
            key: "_emitInitFail",
            value: function (o) {
              this.log("initFail, reason:", o), this.emit(sk.INIT_FAIL, o);
            },
          },
          {
            key: "emitParseError",
            value: function () {
              this.log("parseError"), this.emit(sk.PARSE_ERROR);
            },
          },
          {
            key: "useVideoLoad",
            get: function () {
              return this._useVideoLoad;
            },
            set: function (o) {
              this._useVideoLoad = o;
            },
          },
          {
            key: "ready",
            get: function () {
              return this._allInitPromise;
            },
          },
          {
            key: "speed",
            get: function () {
              return parseInt(CC.speed, 10);
            },
          },
          {
            key: "version",
            get: function () {
              return ox;
            },
          },
          {
            key: "realTimeSpeed",
            get: function () {
              return zw;
            },
          },
          {
            key: "opQueueLen",
            get: function () {
              var o =
                this.mse && this.mse.opQueues ? this.mse.opQueues.video : [];
              return o ? o.length : 0;
            },
          },
          {
            key: "loadSegmentTimeRange",
            get: function () {
              if (!this.mp4) return [0, 0, 0, 0];
              var o = this.mp4.timeRange;
              if (
                o &&
                o.length > 0 &&
                this._curLoadSegmentIdx &&
                this._curLoadSegmentIdx < o.length
              ) {
                var l = o[this._curLoadSegmentIdx];
                if (l.isLoading) {
                  var u = this.mp4.getFragRange(this._curLoadSegmentIdx);
                  return [Number(l.startTime), Number(l.endTime)].concat(
                    nGr(u)
                  );
                }
              }
              return [0, 0, 0, 0];
            },
          },
          {
            key: "preloadState",
            get: function () {
              return this.preloader && this.preloader.loadingCount;
            },
          },
          {
            key: "moovSize",
            get: function () {
              return 0;
            },
          },
          {
            key: "isDestroy",
            get: function () {
              return !this.player;
            },
          },
          {
            key: "cancelPreloadTask",
            value: function () {
              this.preloader &&
                this.preloader.cancelLoading(this.player.playerId);
            },
          },
          {
            key: "CDNUrl",
            get: function () {
              var o = this.playerConfig.url,
                l = document.createElement("a");
              return (l.href = o), l.host;
            },
          },
          {
            key: "abrInstance",
            get: function () {
              return this._abrService ? this._abrService.abrInstance : null;
            },
          },
          {
            key: "_handleUrlExpire",
            value: function () {
              var o = this,
                l = this.config,
                u = this.player,
                c = u.paused;
              new Date().getTime() / 1e3 >= this.urlExpireTimestamp &&
                this.urlExpireTimestamp > 0 &&
                !c &&
                l.getServerTime &&
                ((u.serverTimeDiffPromise =
                  u.serverTimeDiffPromise ||
                  l.getServerTime().catch(function () {
                    return 0;
                  })),
                u.serverTimeDiffPromise.then(function (d) {
                  if (
                    (d && (u.serverTimeDiff = new Date().getTime() / 1e3 - d),
                    new Date().getTime() / 1e3 >=
                      o.urlExpireTimestamp + u.serverTimeDiff)
                  ) {
                    o.urlExpireTimestamp = new Date().getTime() / 1e3 + 86400;
                    var h = new Aat("network", Rc[403]);
                    o._emitExpireEvent(h);
                  }
                }));
            },
          },
          {
            key: "_emitExpireEvent",
            value: function (o) {
              var l = this.player,
                u = new Date().getTime() / 1e3;
              this.emitExpireTimestamp
                ? u - this.emitExpireTimestamp > 300 &&
                  ((this.emitExpireTimestamp = u), l.emit("MEDIA_EXPIRED", o))
                : ((this.emitExpireTimestamp = u), l.emit("MEDIA_EXPIRED", o));
            },
          },
        ],
        [
          {
            key: "registerPreloader",
            value: function (o, l) {
              (o.vtype = eS.MP4), (ok.BitRateAdapter = l), new ok(o, this);
            },
          },
          {
            key: "pluginName",
            get: function () {
              return "Mp4EncryptPlayer";
            },
          },
          {
            key: "defaultConfig",
            get: function () {
              return {
                onlyInit: !1,
                useWaterLevel: !1,
                maxBufferLength: 10,
                minBufferLength: 5,
                tickInSeconds: 0.2,
                getLicenseUrl: "",
                xhrSetup: {},
                retryCount: 1,
                retryDelay: 1e3,
                preloadCacheType: 1,
                needPreloadRangeList: !1,
                cdnHost: "",
                cdnBucket: "",
                isEncrypt: !1,
                isOpenPreload: !0,
                needPreloadCheck: !1,
                preloadTime: 0,
                preloadMaxCacheCount: 0,
                needAutoBitrate: !0,
                keyValue: null,
                drm: null,
                switchBitRateWay: !1,
                enableWorker: !1,
                bufferThreshold: 10,
                removeBufferLen: 40,
                focusUserDefinition: !1,
                resumePlayWaterLevel: 2,
                waitJampBufferMaxCnt: 3,
                waitingInBufferTimeOut: 5e3,
                h265Degrade: !1,
                forceVideoPlay: !1,
                segmentMinDuration: 2,
                supportHevc: void 0,
                H264Config: null,
              };
            },
          },
          {
            key: "speed",
            get: function () {
              return zw;
            },
          },
          {
            key: "realTimeSpeed",
            get: function () {
              return zw;
            },
          },
          {
            key: "version",
            get: function () {
              return ox;
            },
          },
        ]
      ),
      i
    );
  })();
(fT.isSupported = FZr),
  (fT.isEMESupported = aot),
  (fT.isSupportedWithXgmse = UZr),
  (fT.isMediaSourceSupported = oot),
  (fT.isWebAssemblySupported = Xfe),
  (fT.getPlayLicenses = Fat),
  (fT.CUSTOM_EVENTS = sk),
  (fT.Mp4Preloader = ok);
var qot = {};
/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/ (function (t) {
  (function () {
    var e = typeof window < "u" ? window : tI,
      n = {};
    for (var r in (function (i, o, l) {
      var u,
        c =
          typeof Object.defineProperties == "function"
            ? Object.defineProperty
            : function (m, _, R) {
                m != Array.prototype &&
                  m != Object.prototype &&
                  (m[_] = R.value);
              },
        d =
          i !== void 0 && i === this
            ? this
            : o !== void 0 && o != null
            ? o
            : this;
      function h() {
        (h = function () {}), d.Symbol || (d.Symbol = p);
      }
      var f,
        p =
          ((f = 0),
          function (m) {
            return "jscomp_symbol_" + (m || "") + f++;
          });
      function g() {
        h();
        var m = d.Symbol.iterator;
        m || (m = d.Symbol.iterator = d.Symbol("iterator")),
          typeof Array.prototype[m] != "function" &&
            c(Array.prototype, m, {
              configurable: !0,
              writable: !0,
              value: function () {
                return y(this);
              },
            }),
          (g = function () {});
      }
      function y(m) {
        var _ = 0;
        return v(function () {
          return _ < m.length ? { done: !1, value: m[_++] } : { done: !0 };
        });
      }
      function v(m) {
        return (
          g(),
          ((m = { next: m })[d.Symbol.iterator] = function () {
            return this;
          }),
          m
        );
      }
      function b(m) {
        g();
        var _ = m[Symbol.iterator];
        return _ ? _.call(m) : y(m);
      }
      function w(m, _) {
        if (_) {
          for (var R = d, M = m.split("."), x = 0; x < M.length - 1; x++) {
            var z = M[x];
            z in R || (R[z] = {}), (R = R[z]);
          }
          (z = _((x = R[(M = M[M.length - 1])]))) != x &&
            z != null &&
            c(R, M, { configurable: !0, writable: !0, value: z });
        }
      }
      function k(m) {
        return (function (_) {
          function R(x) {
            return _.next(x);
          }
          function M(x) {
            return _.throw(x);
          }
          return new Promise(function (x, z) {
            (function J(te) {
              te.done
                ? x(te.value)
                : Promise.resolve(te.value).then(R, M).then(J, z);
            })(_.next());
          });
        })(m());
      }
      w("Promise", function (m) {
        function _(J) {
          (this.h = 0), (this.l = void 0), (this.g = []);
          var te = this.i();
          try {
            J(te.resolve, te.reject);
          } catch (pe) {
            te.reject(pe);
          }
        }
        function R() {
          this.g = null;
        }
        function M(J) {
          return J instanceof _
            ? J
            : new _(function (te) {
                te(J);
              });
        }
        if (m) return m;
        (R.prototype.h = function (J) {
          this.g == null && ((this.g = []), this.j()), this.g.push(J);
        }),
          (R.prototype.j = function () {
            var J = this;
            this.i(function () {
              J.m();
            });
          });
        var x = d.setTimeout;
        (R.prototype.i = function (J) {
          x(J, 0);
        }),
          (R.prototype.m = function () {
            for (; this.g && this.g.length; ) {
              var J = this.g;
              this.g = [];
              for (var te = 0; te < J.length; ++te) {
                var pe = J[te];
                J[te] = null;
                try {
                  pe();
                } catch (xe) {
                  this.l(xe);
                }
              }
            }
            this.g = null;
          }),
          (R.prototype.l = function (J) {
            this.i(function () {
              throw J;
            });
          }),
          (_.prototype.i = function () {
            function J(xe) {
              return function (Be) {
                pe || ((pe = !0), xe.call(te, Be));
              };
            }
            var te = this,
              pe = !1;
            return { resolve: J(this.C), reject: J(this.j) };
          }),
          (_.prototype.C = function (J) {
            if (J === this)
              this.j(new TypeError("A Promise cannot resolve to itself"));
            else if (J instanceof _) this.F(J);
            else {
              e: switch (typeof J) {
                case "object":
                  var te = J != null;
                  break e;
                case "function":
                  te = !0;
                  break e;
                default:
                  te = !1;
              }
              te ? this.A(J) : this.m(J);
            }
          }),
          (_.prototype.A = function (J) {
            var te = void 0;
            try {
              te = J.then;
            } catch (pe) {
              return void this.j(pe);
            }
            typeof te == "function" ? this.J(te, J) : this.m(J);
          }),
          (_.prototype.j = function (J) {
            this.o(2, J);
          }),
          (_.prototype.m = function (J) {
            this.o(1, J);
          }),
          (_.prototype.o = function (J, te) {
            if (this.h != 0)
              throw Error(
                "Cannot settle(" +
                  J +
                  ", " +
                  te +
                  "): Promise already settled in state" +
                  this.h
              );
            (this.h = J), (this.l = te), this.u();
          }),
          (_.prototype.u = function () {
            if (this.g != null) {
              for (var J = 0; J < this.g.length; ++J) z.h(this.g[J]);
              this.g = null;
            }
          });
        var z = new R();
        return (
          (_.prototype.F = function (J) {
            var te = this.i();
            J.nc(te.resolve, te.reject);
          }),
          (_.prototype.J = function (J, te) {
            var pe = this.i();
            try {
              J.call(te, pe.resolve, pe.reject);
            } catch (xe) {
              pe.reject(xe);
            }
          }),
          (_.prototype.then = function (J, te) {
            function pe(dt, mt) {
              return typeof dt == "function"
                ? function (xt) {
                    try {
                      xe(dt(xt));
                    } catch (Nt) {
                      Be(Nt);
                    }
                  }
                : mt;
            }
            var xe,
              Be,
              bt = new _(function (dt, mt) {
                (xe = dt), (Be = mt);
              });
            return this.nc(pe(J, xe), pe(te, Be)), bt;
          }),
          (_.prototype.catch = function (J) {
            return this.then(void 0, J);
          }),
          (_.prototype.nc = function (J, te) {
            function pe() {
              switch (xe.h) {
                case 1:
                  J(xe.l);
                  break;
                case 2:
                  te(xe.l);
                  break;
                default:
                  throw Error("Unexpected state: " + xe.h);
              }
            }
            var xe = this;
            this.g == null ? z.h(pe) : this.g.push(pe);
          }),
          (_.resolve = M),
          (_.reject = function (J) {
            return new _(function (te, pe) {
              pe(J);
            });
          }),
          (_.race = function (J) {
            return new _(function (te, pe) {
              for (var xe = b(J), Be = xe.next(); !Be.done; Be = xe.next())
                M(Be.value).nc(te, pe);
            });
          }),
          (_.all = function (J) {
            var te = b(J),
              pe = te.next();
            return pe.done
              ? M([])
              : new _(function (xe, Be) {
                  function bt(xt) {
                    return function (Nt) {
                      (dt[xt] = Nt), --mt == 0 && xe(dt);
                    };
                  }
                  var dt = [],
                    mt = 0;
                  do
                    dt.push(void 0),
                      mt++,
                      M(pe.value).nc(bt(dt.length - 1), Be),
                      (pe = te.next());
                  while (!pe.done);
                });
          }),
          _
        );
      }),
        w("Promise.prototype.finally", function (m) {
          return (
            m ||
            function (_) {
              return this.then(
                function (R) {
                  return Promise.resolve(_()).then(function () {
                    return R;
                  });
                },
                function (R) {
                  return Promise.resolve(_()).then(function () {
                    throw R;
                  });
                }
              );
            }
          );
        });
      var D,
        $ =
          typeof Object.create == "function"
            ? Object.create
            : function (m) {
                function _() {}
                return (_.prototype = m), new _();
              };
      if (typeof Object.setPrototypeOf == "function") D = Object.setPrototypeOf;
      else {
        var N;
        e: {
          var P = {};
          try {
            (P.__proto__ = { a: !0 }), (N = P.a);
            break e;
          } catch {}
          N = !1;
        }
        D = N
          ? function (m, _) {
              if (((m.__proto__ = _), m.__proto__ !== _))
                throw new TypeError(m + " is not extensible");
              return m;
            }
          : null;
      }
      var I = D;
      function O(m, _) {
        if (((m.prototype = $(_.prototype)), (m.prototype.constructor = m), I))
          I(m, _);
        else
          for (var R in _)
            if (R != "prototype")
              if (Object.defineProperties) {
                var M = Object.getOwnPropertyDescriptor(_, R);
                M && Object.defineProperty(m, R, M);
              } else m[R] = _[R];
        m.Lg = _.prototype;
      }
      function X() {
        (this.l = !1),
          (this.i = null),
          (this.B = void 0),
          (this.s = 1),
          (this.h = this.j = 0),
          (this.o = this.g = null);
      }
      function G(m) {
        if (m.l) throw new TypeError("Generator is already running");
        m.l = !0;
      }
      function H(m, _) {
        (m.g = { ce: _, ne: !0 }), (m.s = m.j || m.h);
      }
      function E(m, _, R) {
        return (m.s = R), { value: _ };
      }
      function S(m) {
        m.s = 0;
      }
      function L(m, _, R) {
        (m.j = _), R != null && (m.h = R);
      }
      function W(m, _) {
        (m.j = 0), (m.h = _ || 0);
      }
      function F(m, _) {
        (m.s = _), (m.j = 0);
      }
      function oe(m) {
        m.j = 0;
        var _ = m.g.ce;
        return (m.g = null), _;
      }
      function De(m) {
        (m.o = [m.g]), (m.j = 0), (m.h = 0);
      }
      function Xe(m, _) {
        var R = m.o.splice(0)[0];
        (R = m.g = m.g || R)
          ? R.ne
            ? (m.s = m.j || m.h)
            : R.I != null && m.h < R.I
            ? ((m.s = R.I), (m.g = null))
            : (m.s = m.h)
          : (m.s = _);
      }
      function ze(m) {
        (this.g = new X()), (this.h = m);
      }
      function ht(m, _, R, M) {
        try {
          var x = _.call(m.g.i, R);
          if (!(x instanceof Object))
            throw new TypeError("Iterator result " + x + " is not an object");
          if (!x.done) return (m.g.l = !1), x;
          var z = x.value;
        } catch (J) {
          return (m.g.i = null), H(m.g, J), gt(m);
        }
        return (m.g.i = null), M.call(m.g, z), gt(m);
      }
      function gt(m) {
        for (; m.g.s; )
          try {
            var _ = m.h(m.g);
            if (_) return (m.g.l = !1), { value: _.value, done: !1 };
          } catch (R) {
            (m.g.B = void 0), H(m.g, R);
          }
        if (((m.g.l = !1), m.g.g)) {
          if (((_ = m.g.g), (m.g.g = null), _.ne)) throw _.ce;
          return { value: _.return, done: !0 };
        }
        return { value: void 0, done: !0 };
      }
      function pt(m) {
        (this.next = function (_) {
          return (
            G(m.g),
            m.g.i ? (_ = ht(m, m.g.i.next, _, m.g.m)) : (m.g.m(_), (_ = gt(m))),
            _
          );
        }),
          (this.throw = function (_) {
            return (
              G(m.g),
              m.g.i
                ? (_ = ht(m, m.g.i.throw, _, m.g.m))
                : (H(m.g, _), (_ = gt(m))),
              _
            );
          }),
          (this.return = function (_) {
            return (function (R, M) {
              G(R.g);
              var x = R.g.i;
              return x
                ? ht(
                    R,
                    "return" in x
                      ? x.return
                      : function (z) {
                          return { value: z, done: !0 };
                        },
                    M,
                    R.g.return
                  )
                : (R.g.return(M), gt(R));
            })(m, _);
          }),
          g(),
          (this[Symbol.iterator] = function () {
            return this;
          });
      }
      function $t(m, _) {
        return (pt.prototype = m.prototype), new pt(new ze(_));
      }
      function ot(m, _) {
        return Object.prototype.hasOwnProperty.call(m, _);
      }
      function tt(m, _, R) {
        m instanceof String && (m = String(m));
        for (var M = m.length, x = 0; x < M; x++) {
          var z = m[x];
          if (_.call(R, z, x, m)) return { le: x, Qe: z };
        }
        return { le: -1, Qe: void 0 };
      }
      function He(m, _, R) {
        if (m == null)
          throw new TypeError(
            "The 'this' value for String.prototype." +
              R +
              " must not be null or undefined"
          );
        if (_ instanceof RegExp)
          throw new TypeError(
            "First argument to String.prototype." +
              R +
              " must not be a regular expression"
          );
        return m + "";
      }
      (X.prototype.m = function (m) {
        this.B = m;
      }),
        (X.prototype.return = function (m) {
          (this.g = { return: m }), (this.s = this.h);
        }),
        (X.prototype.I = function (m) {
          this.s = m;
        }),
        w("Array.prototype.keys", function (m) {
          return (
            m ||
            function () {
              return (function (_, R) {
                g(), _ instanceof String && (_ += "");
                var M = 0,
                  x = {
                    next: function () {
                      if (M < _.length) {
                        var z = M++;
                        return { value: R(z, _[z]), done: !1 };
                      }
                      return (
                        (x.next = function () {
                          return { done: !0, value: void 0 };
                        }),
                        x.next()
                      );
                    },
                  };
                return (
                  (x[Symbol.iterator] = function () {
                    return x;
                  }),
                  x
                );
              })(this, function (_) {
                return _;
              });
            }
          );
        }),
        w("WeakMap", function (m) {
          function _(J) {
            if (((this.g = (z += Math.random() + 1).toString()), J)) {
              h(), g(), (J = b(J));
              for (var te; !(te = J.next()).done; )
                (te = te.value), this.set(te[0], te[1]);
            }
          }
          function R(J) {
            ot(J, x) || c(J, x, { value: {} });
          }
          function M(J) {
            var te = Object[J];
            te &&
              (Object[J] = function (pe) {
                return R(pe), te(pe);
              });
          }
          if (
            (function () {
              if (!m || !Object.seal) return !1;
              try {
                var J = Object.seal({}),
                  te = Object.seal({}),
                  pe = new m([
                    [J, 2],
                    [te, 3],
                  ]);
                return (
                  pe.get(J) == 2 &&
                  pe.get(te) == 3 &&
                  (pe.delete(J), pe.set(te, 4), !pe.has(J) && pe.get(te) == 4)
                );
              } catch {
                return !1;
              }
            })()
          )
            return m;
          var x = "$jscomp_hidden_" + Math.random();
          M("freeze"), M("preventExtensions"), M("seal");
          var z = 0;
          return (
            (_.prototype.set = function (J, te) {
              if ((R(J), !ot(J, x))) throw Error("WeakMap key fail: " + J);
              return (J[x][this.g] = te), this;
            }),
            (_.prototype.get = function (J) {
              return ot(J, x) ? J[x][this.g] : void 0;
            }),
            (_.prototype.has = function (J) {
              return ot(J, x) && ot(J[x], this.g);
            }),
            (_.prototype.delete = function (J) {
              return !(!ot(J, x) || !ot(J[x], this.g)) && delete J[x][this.g];
            }),
            _
          );
        }),
        w("Map", function (m) {
          function _() {
            var te = {};
            return (te.Na = te.next = te.head = te);
          }
          function R(te, pe) {
            var xe = te.g;
            return v(function () {
              if (xe) {
                for (; xe.head != te.g; ) xe = xe.Na;
                for (; xe.next != xe.head; )
                  return (xe = xe.next), { done: !1, value: pe(xe) };
                xe = null;
              }
              return { done: !0, value: void 0 };
            });
          }
          function M(te, pe) {
            var xe = pe && typeof pe;
            xe == "object" || xe == "function"
              ? z.has(pe)
                ? (xe = z.get(pe))
                : ((xe = "" + ++J), z.set(pe, xe))
              : (xe = "p_" + pe);
            var Be = te.h[xe];
            if (Be && ot(te.h, xe))
              for (var bt = 0; bt < Be.length; bt++) {
                var dt = Be[bt];
                if ((pe != pe && dt.key != dt.key) || pe === dt.key)
                  return { id: xe, list: Be, index: bt, ga: dt };
              }
            return { id: xe, list: Be, index: -1, ga: void 0 };
          }
          function x(te) {
            if (((this.h = {}), (this.g = _()), (this.size = 0), te)) {
              te = b(te);
              for (var pe; !(pe = te.next()).done; )
                (pe = pe.value), this.set(pe[0], pe[1]);
            }
          }
          if (
            (function () {
              if (
                !m ||
                typeof m != "function" ||
                !m.prototype.entries ||
                typeof Object.seal != "function"
              )
                return !1;
              try {
                var te = Object.seal({ x: 4 }),
                  pe = new m(b([[te, "s"]]));
                if (
                  pe.get(te) != "s" ||
                  pe.size != 1 ||
                  pe.get({ x: 4 }) ||
                  pe.set({ x: 4 }, "t") != pe ||
                  pe.size != 2
                )
                  return !1;
                var xe = pe.entries(),
                  Be = xe.next();
                return (
                  !Be.done &&
                  Be.value[0] == te &&
                  Be.value[1] == "s" &&
                  !(
                    (Be = xe.next()).done ||
                    Be.value[0].x != 4 ||
                    Be.value[1] != "t" ||
                    !xe.next().done
                  )
                );
              } catch {
                return !1;
              }
            })()
          )
            return m;
          h(), g();
          var z = new WeakMap();
          (x.prototype.set = function (te, pe) {
            var xe = M(this, te);
            return (
              xe.list || (xe.list = this.h[xe.id] = []),
              xe.ga
                ? (xe.ga.value = pe)
                : ((xe.ga = {
                    next: this.g,
                    Na: this.g.Na,
                    head: this.g,
                    key: te,
                    value: pe,
                  }),
                  xe.list.push(xe.ga),
                  (this.g.Na.next = xe.ga),
                  (this.g.Na = xe.ga),
                  this.size++),
              this
            );
          }),
            (x.prototype.delete = function (te) {
              return (
                !(!(te = M(this, te)).ga || !te.list) &&
                (te.list.splice(te.index, 1),
                te.list.length || delete this.h[te.id],
                (te.ga.Na.next = te.ga.next),
                (te.ga.next.Na = te.ga.Na),
                (te.ga.head = null),
                this.size--,
                !0)
              );
            }),
            (x.prototype.clear = function () {
              (this.h = {}), (this.g = this.g.Na = _()), (this.size = 0);
            }),
            (x.prototype.has = function (te) {
              return !!M(this, te).ga;
            }),
            (x.prototype.get = function (te) {
              return (te = M(this, te).ga) && te.value;
            }),
            (x.prototype.entries = function () {
              return R(this, function (te) {
                return [te.key, te.value];
              });
            }),
            (x.prototype.keys = function () {
              return R(this, function (te) {
                return te.key;
              });
            }),
            (x.prototype.values = function () {
              return R(this, function (te) {
                return te.value;
              });
            }),
            (x.prototype.forEach = function (te, pe) {
              for (var xe, Be = this.entries(); !(xe = Be.next()).done; )
                (xe = xe.value), te.call(pe, xe[1], xe[0], this);
            }),
            (x.prototype[Symbol.iterator] = x.prototype.entries);
          var J = 0;
          return x;
        }),
        w("Set", function (m) {
          function _(R) {
            if (((this.g = new Map()), R)) {
              R = b(R);
              for (var M; !(M = R.next()).done; ) this.add(M.value);
            }
            this.size = this.g.size;
          }
          return (function () {
            if (
              !m ||
              typeof m != "function" ||
              !m.prototype.entries ||
              typeof Object.seal != "function"
            )
              return !1;
            try {
              var R = Object.seal({ x: 4 }),
                M = new m(b([R]));
              if (
                !M.has(R) ||
                M.size != 1 ||
                M.add(R) != M ||
                M.size != 1 ||
                M.add({ x: 4 }) != M ||
                M.size != 2
              )
                return !1;
              var x = M.entries(),
                z = x.next();
              return (
                !z.done &&
                z.value[0] == R &&
                z.value[1] == R &&
                !(z = x.next()).done &&
                z.value[0] != R &&
                z.value[0].x == 4 &&
                z.value[1] == z.value[0] &&
                x.next().done
              );
            } catch {
              return !1;
            }
          })()
            ? m
            : (h(),
              g(),
              (_.prototype.add = function (R) {
                return this.g.set(R, R), (this.size = this.g.size), this;
              }),
              (_.prototype.delete = function (R) {
                return (R = this.g.delete(R)), (this.size = this.g.size), R;
              }),
              (_.prototype.clear = function () {
                this.g.clear(), (this.size = 0);
              }),
              (_.prototype.has = function (R) {
                return this.g.has(R);
              }),
              (_.prototype.entries = function () {
                return this.g.entries();
              }),
              (_.prototype.values = function () {
                return this.g.values();
              }),
              (_.prototype.keys = _.prototype.values),
              (_.prototype[Symbol.iterator] = _.prototype.values),
              (_.prototype.forEach = function (R, M) {
                var x = this;
                this.g.forEach(function (z) {
                  return R.call(M, z, z, x);
                });
              }),
              _);
        }),
        w("Array.prototype.findIndex", function (m) {
          return (
            m ||
            function (_, R) {
              return tt(this, _, R).le;
            }
          );
        }),
        w("Array.prototype.find", function (m) {
          return (
            m ||
            function (_, R) {
              return tt(this, _, R).Qe;
            }
          );
        }),
        w("String.prototype.startsWith", function (m) {
          return (
            m ||
            function (_, R) {
              for (
                var M = He(this, _, "startsWith"),
                  x = M.length,
                  z = _.length,
                  J = Math.max(0, Math.min(0 | R, M.length)),
                  te = 0;
                te < z && J < x;

              )
                if (M[J++] != _[te++]) return !1;
              return te >= z;
            }
          );
        }),
        w("Object.is", function (m) {
          return (
            m ||
            function (_, R) {
              return _ === R ? _ !== 0 || 1 / _ == 1 / R : _ != _ && R != R;
            }
          );
        }),
        w("Array.prototype.includes", function (m) {
          return (
            m ||
            function (_, R) {
              var M = this;
              M instanceof String && (M = String(M));
              var x = M.length,
                z = R || 0;
              for (0 > z && (z = Math.max(z + x, 0)); z < x; z++) {
                var J = M[z];
                if (J === _ || Object.is(J, _)) return !0;
              }
              return !1;
            }
          );
        }),
        w("String.prototype.includes", function (m) {
          return (
            m ||
            function (_, R) {
              return He(this, _, "includes").indexOf(_, R || 0) !== -1;
            }
          );
        }),
        w("Array.from", function (m) {
          return (
            m ||
            function (_, R, M) {
              g(),
                (R =
                  R ??
                  function (te) {
                    return te;
                  });
              var x = [],
                z = _[Symbol.iterator];
              if (typeof z == "function")
                for (_ = z.call(_); !(z = _.next()).done; )
                  x.push(R.call(M, z.value));
              else {
                z = _.length;
                for (var J = 0; J < z; J++) x.push(R.call(M, _[J]));
              }
              return x;
            }
          );
        });
      var de =
        typeof Object.assign == "function"
          ? Object.assign
          : function (m, _) {
              for (var R = 1; R < arguments.length; R++) {
                var M = arguments[R];
                if (M) for (var x in M) ot(M, x) && (m[x] = M[x]);
              }
              return m;
            };
      w("Object.assign", function (m) {
        return m || de;
      });
      var ue = this;
      function Z(m, _) {
        var R,
          M = m.split("."),
          x = ue;
        for (
          (M[0] in x) || !x.execScript || x.execScript("var " + M[0]);
          M.length && (R = M.shift());

        )
          M.length || _ === void 0
            ? (x = x[R] ? x[R] : (x[R] = {}))
            : (x[R] = _);
      }
      function ie(m, _) {
        function R() {}
        (R.prototype = _.prototype),
          (m.Lg = _.prototype),
          (m.prototype = new R()),
          (m.prototype.constructor = m),
          (m.Wg = function (M, x, z) {
            return _.prototype[x].apply(
              M,
              Array.prototype.slice.call(arguments, 2)
            );
          });
      }
      function Ne(m) {
        (this.i = Math.exp(Math.log(0.5) / m)), (this.h = this.g = 0);
      }
      function Pe(m, _, R) {
        var M = Math.pow(m.i, _);
        (R = R * (1 - M) + M * m.g), isNaN(R) || ((m.g = R), (m.h += _));
      }
      function kt(m) {
        return m.g / (1 - Math.pow(m.i, m.h));
      }
      function Gt() {
        (this.h = new Ne(2)), (this.i = new Ne(5)), (this.g = 0);
      }
      (ue.g = !0),
        (Gt.prototype.getBandwidthEstimate = function (m) {
          return 128e3 > this.g ? m : Math.min(kt(this.h), kt(this.i));
        });
      var B = {
        sb: 0,
        kc: function () {},
        ba: function () {},
        error: function () {},
        v: function () {},
        info: function () {},
        debug: function () {},
        K: function () {},
        O: function () {},
      };
      function re(m, _, R, M) {
        for (var x = [], z = 3; z < arguments.length; ++z)
          x[z - 3] = arguments[z];
        (this.severity = m),
          (this.category = _),
          (this.code = R),
          (this.data = x),
          (this.handled = !1);
      }
      i.console &&
        i.console.log.bind &&
        ((B.ba = console.warn.bind(console)),
        (B.kc = console.error.bind(console)),
        1 <= B.sb && (B.error = console.error.bind(console)),
        2 <= B.sb && (B.v = console.warn.bind(console)),
        3 <= B.sb && (B.info = console.info.bind(console)),
        4 <= B.sb && (B.debug = console.log.bind(console)),
        5 <= B.sb && (B.K = console.debug.bind(console)),
        6 <= B.sb && (B.O = console.debug.bind(console))),
        Z("shaka.util.Error", re),
        (re.prototype.toString = function () {
          return "shaka.util.Error " + JSON.stringify(this, null, "  ");
        }),
        (re.Severity = { RECOVERABLE: 1, CRITICAL: 2 }),
        (re.Category = {
          NETWORK: 1,
          TEXT: 2,
          MEDIA: 3,
          MANIFEST: 4,
          STREAMING: 5,
          DRM: 6,
          PLAYER: 7,
          CAST: 8,
          STORAGE: 9,
        }),
        (re.Code = {
          UNSUPPORTED_SCHEME: 1e3,
          BAD_HTTP_STATUS: 1001,
          HTTP_ERROR: 1002,
          TIMEOUT: 1003,
          MALFORMED_DATA_URI: 1004,
          REQUEST_FILTER_ERROR: 1006,
          RESPONSE_FILTER_ERROR: 1007,
          MALFORMED_TEST_URI: 1008,
          UNEXPECTED_TEST_REQUEST: 1009,
          INVALID_TEXT_HEADER: 2e3,
          INVALID_TEXT_CUE: 2001,
          UNABLE_TO_DETECT_ENCODING: 2003,
          BAD_ENCODING: 2004,
          INVALID_XML: 2005,
          INVALID_MP4_TTML: 2007,
          INVALID_MP4_VTT: 2008,
          UNABLE_TO_EXTRACT_CUE_START_TIME: 2009,
          BUFFER_READ_OUT_OF_BOUNDS: 3e3,
          JS_INTEGER_OVERFLOW: 3001,
          EBML_OVERFLOW: 3002,
          EBML_BAD_FLOATING_POINT_SIZE: 3003,
          MP4_SIDX_WRONG_BOX_TYPE: 3004,
          MP4_SIDX_INVALID_TIMESCALE: 3005,
          MP4_SIDX_TYPE_NOT_SUPPORTED: 3006,
          WEBM_CUES_ELEMENT_MISSING: 3007,
          WEBM_EBML_HEADER_ELEMENT_MISSING: 3008,
          WEBM_SEGMENT_ELEMENT_MISSING: 3009,
          WEBM_INFO_ELEMENT_MISSING: 3010,
          WEBM_DURATION_ELEMENT_MISSING: 3011,
          WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING: 3012,
          WEBM_CUE_TIME_ELEMENT_MISSING: 3013,
          MEDIA_SOURCE_OPERATION_FAILED: 3014,
          MEDIA_SOURCE_OPERATION_THREW: 3015,
          VIDEO_ERROR: 3016,
          QUOTA_EXCEEDED_ERROR: 3017,
          TRANSMUXING_FAILED: 3018,
          UNABLE_TO_GUESS_MANIFEST_TYPE: 4e3,
          DASH_INVALID_XML: 4001,
          DASH_NO_SEGMENT_INFO: 4002,
          DASH_EMPTY_ADAPTATION_SET: 4003,
          DASH_EMPTY_PERIOD: 4004,
          DASH_WEBM_MISSING_INIT: 4005,
          DASH_UNSUPPORTED_CONTAINER: 4006,
          DASH_PSSH_BAD_ENCODING: 4007,
          DASH_NO_COMMON_KEY_SYSTEM: 4008,
          DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED: 4009,
          DASH_CONFLICTING_KEY_IDS: 4010,
          UNPLAYABLE_PERIOD: 4011,
          RESTRICTIONS_CANNOT_BE_MET: 4012,
          NO_PERIODS: 4014,
          HLS_PLAYLIST_HEADER_MISSING: 4015,
          INVALID_HLS_TAG: 4016,
          HLS_INVALID_PLAYLIST_HIERARCHY: 4017,
          DASH_DUPLICATE_REPRESENTATION_ID: 4018,
          HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND: 4020,
          HLS_MASTER_PLAYLIST_NOT_PROVIDED: 4022,
          HLS_REQUIRED_ATTRIBUTE_MISSING: 4023,
          HLS_REQUIRED_TAG_MISSING: 4024,
          HLS_COULD_NOT_GUESS_CODECS: 4025,
          HLS_KEYFORMATS_NOT_SUPPORTED: 4026,
          DASH_UNSUPPORTED_XLINK_ACTUATE: 4027,
          DASH_XLINK_DEPTH_LIMIT: 4028,
          HLS_COULD_NOT_PARSE_SEGMENT_START_TIME: 4030,
          CONTENT_UNSUPPORTED_BY_BROWSER: 4032,
          CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM: 4033,
          HLS_AES_128_ENCRYPTION_NOT_SUPPORTED: 4034,
          HLS_INTERNAL_SKIP_STREAM: 4035,
          INVALID_STREAMS_CHOSEN: 5005,
          NO_RECOGNIZED_KEY_SYSTEMS: 6e3,
          REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE: 6001,
          FAILED_TO_CREATE_CDM: 6002,
          FAILED_TO_ATTACH_TO_VIDEO: 6003,
          INVALID_SERVER_CERTIFICATE: 6004,
          FAILED_TO_CREATE_SESSION: 6005,
          FAILED_TO_GENERATE_LICENSE_REQUEST: 6006,
          LICENSE_REQUEST_FAILED: 6007,
          LICENSE_RESPONSE_REJECTED: 6008,
          ENCRYPTED_CONTENT_WITHOUT_DRM_INFO: 6010,
          NO_LICENSE_SERVER_GIVEN: 6012,
          OFFLINE_SESSION_REMOVED: 6013,
          EXPIRED: 6014,
          SERVER_CERTIFICATE_REQUIRED: 6015,
          INIT_DATA_TRANSFORM_ERROR: 6016,
          LOAD_INTERRUPTED: 7e3,
          OPERATION_ABORTED: 7001,
          NO_VIDEO_ELEMENT: 7002,
          CAST_API_UNAVAILABLE: 8e3,
          NO_CAST_RECEIVERS: 8001,
          ALREADY_CASTING: 8002,
          UNEXPECTED_CAST_ERROR: 8003,
          CAST_CANCELED_BY_USER: 8004,
          CAST_CONNECTION_TIMED_OUT: 8005,
          CAST_RECEIVER_APP_UNAVAILABLE: 8006,
          STORAGE_NOT_SUPPORTED: 9e3,
          INDEXED_DB_ERROR: 9001,
          DEPRECATED_OPERATION_ABORTED: 9002,
          REQUESTED_ITEM_NOT_FOUND: 9003,
          MALFORMED_OFFLINE_URI: 9004,
          CANNOT_STORE_LIVE_OFFLINE: 9005,
          STORE_ALREADY_IN_PROGRESS: 9006,
          NO_INIT_DATA_FOR_OFFLINE: 9007,
          LOCAL_PLAYER_INSTANCE_REQUIRED: 9008,
          NEW_KEY_OPERATION_NOT_SUPPORTED: 9011,
          KEY_NOT_FOUND: 9012,
          MISSING_STORAGE_CELL: 9013,
        });
      /*
       @license
       Copyright 2008 The Closure Library Authors
       SPDX-License-Identifier: Apache-2.0
      */ var Ae =
        /^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;
      /*
       @license
       Copyright 2006 The Closure Library Authors
       SPDX-License-Identifier: Apache-2.0
      */ function lt(m) {
        var _;
        m instanceof lt
          ? (Et(this, m.Ba),
            (this.pb = m.pb),
            (this.Aa = m.Aa),
            St(this, m.Ob),
            (this.pa = m.pa),
            Lt(this, m.g.clone()),
            (this.bb = m.bb))
          : m && (_ = String(m).match(Ae))
          ? (Et(this, _[1] || "", !0),
            (this.pb = ln(_[2] || "")),
            (this.Aa = ln(_[3] || "", !0)),
            St(this, _[4]),
            (this.pa = ln(_[5] || "", !0)),
            Lt(this, _[6] || "", !0),
            (this.bb = ln(_[7] || "")))
          : (this.g = new on(null));
      }
      function Et(m, _, R) {
        (m.Ba = R ? ln(_, !0) : _), m.Ba && (m.Ba = m.Ba.replace(/:$/, ""));
      }
      function St(m, _) {
        if (_) {
          if (((_ = Number(_)), isNaN(_) || 0 > _))
            throw Error("Bad port number " + _);
          m.Ob = _;
        } else m.Ob = null;
      }
      function Lt(m, _, R) {
        _ instanceof on ? (m.g = _) : (R || (_ = Ln(_, En)), (m.g = new on(_)));
      }
      function ln(m, _) {
        return m ? (_ ? decodeURI(m) : decodeURIComponent(m)) : "";
      }
      function Ln(m, _, R) {
        return typeof m == "string"
          ? ((m = encodeURI(m).replace(_, Tr)),
            R && (m = m.replace(/%25([0-9a-fA-F]{2})/g, "%$1")),
            m)
          : null;
      }
      function Tr(m) {
        return (
          "%" +
          (((m = m.charCodeAt(0)) >> 4) & 15).toString(16) +
          (15 & m).toString(16)
        );
      }
      ((u = lt.prototype).Ba = ""),
        (u.pb = ""),
        (u.Aa = ""),
        (u.Ob = null),
        (u.pa = ""),
        (u.bb = ""),
        (u.toString = function () {
          var m = [],
            _ = this.Ba;
          if ((_ && m.push(Ln(_, sr, !0), ":"), (_ = this.Aa))) {
            m.push("//");
            var R = this.pb;
            R && m.push(Ln(R, sr, !0), "@"),
              m.push(
                encodeURIComponent(_).replace(/%25([0-9a-fA-F]{2})/g, "%$1")
              ),
              (_ = this.Ob) != null && m.push(":", String(_));
          }
          return (
            (_ = this.pa) &&
              (this.Aa && _.charAt(0) != "/" && m.push("/"),
              m.push(Ln(_, _.charAt(0) == "/" ? Ra : hi, !0))),
            (_ = this.g.toString()) && m.push("?", _),
            (_ = this.bb) && m.push("#", Ln(_, Zn)),
            m.join("")
          );
        }),
        (u.resolve = function (m) {
          var _ = this.clone();
          _.Ba === "data" && (_ = new lt());
          var R = !!m.Ba;
          R ? Et(_, m.Ba) : (R = !!m.pb),
            R ? (_.pb = m.pb) : (R = !!m.Aa),
            R ? (_.Aa = m.Aa) : (R = m.Ob != null);
          var M = m.pa;
          if (R) St(_, m.Ob);
          else if ((R = !!m.pa)) {
            if (M.charAt(0) != "/")
              if (this.Aa && !this.pa) M = "/" + M;
              else {
                var x = _.pa.lastIndexOf("/");
                x != -1 && (M = _.pa.substr(0, x + 1) + M);
              }
            if (M == ".." || M == ".") M = "";
            else if (M.indexOf("./") != -1 || M.indexOf("/.") != -1) {
              (x = M.lastIndexOf("/", 0) == 0), (M = M.split("/"));
              for (var z = [], J = 0; J < M.length; ) {
                var te = M[J++];
                te == "."
                  ? x && J == M.length && z.push("")
                  : te == ".."
                  ? ((1 < z.length || (z.length == 1 && z[0] != "")) && z.pop(),
                    x && J == M.length && z.push(""))
                  : (z.push(te), (x = !0));
              }
              M = z.join("/");
            }
          }
          return (
            R ? (_.pa = M) : (R = m.g.toString() !== ""),
            R ? Lt(_, m.g.clone()) : (R = !!m.bb),
            R && (_.bb = m.bb),
            _
          );
        }),
        (u.clone = function () {
          return new lt(this);
        });
      var sr = /[#\/\?@]/g,
        hi = /[#\?:]/g,
        Ra = /[#\?]/g,
        En = /[#\?@]/g,
        Zn = /#/g;
      function on(m) {
        this.g = m || null;
      }
      ((u = on.prototype).na = null),
        (u.qc = null),
        (u.add = function (m, _) {
          if (!this.na && ((this.na = {}), (this.qc = 0), this.g))
            for (var R = this.g.split("&"), M = 0; M < R.length; M++) {
              var x = R[M].indexOf("="),
                z = null;
              if (0 <= x) {
                var J = R[M].substring(0, x);
                z = R[M].substring(x + 1);
              } else J = R[M];
              (J = decodeURIComponent(J.replace(/\+/g, " "))),
                (z = z || ""),
                this.add(J, decodeURIComponent(z.replace(/\+/g, " ")));
            }
          return (
            (this.g = null),
            (R = this.na.hasOwnProperty(m) && this.na[m]) ||
              (this.na[m] = R = []),
            R.push(_),
            this.qc++,
            this
          );
        }),
        (u.toString = function () {
          if (this.g) return this.g;
          if (!this.na) return "";
          var m,
            _ = [];
          for (m in this.na)
            for (
              var R = encodeURIComponent(m), M = this.na[m], x = 0;
              x < M.length;
              x++
            ) {
              var z = R;
              M[x] !== "" && (z += "=" + encodeURIComponent(M[x])), _.push(z);
            }
          return (this.g = _.join("&"));
        }),
        (u.clone = function () {
          var m = new on();
          if (((m.g = this.g), this.na)) {
            var _,
              R = {};
            for (_ in this.na) R[_] = this.na[_].concat();
            (m.na = R), (m.qc = this.qc);
          }
          return m;
        });
      var rn = {
        df: function (m, _) {
          return m.reduce(
            function (R, M, x) {
              return M.catch(R.bind(null, x));
            }.bind(null, _),
            Promise.reject()
          );
        },
        Rc: function (m, _) {
          return m.concat(_);
        },
        Bc: function () {},
        Ra: function (m) {
          return m != null;
        },
      };
      function It(m, _) {
        if (_.length == 0) return m;
        var R = _.map(function (M) {
          return new lt(M);
        });
        return m
          .map(function (M) {
            return new lt(M);
          })
          .map(function (M) {
            return R.map(M.resolve.bind(M));
          })
          .reduce(rn.Rc, [])
          .map(function (M) {
            return M.toString();
          });
      }
      function wt(m, _) {
        return {
          keySystem: m,
          licenseServerUri: "",
          distinctiveIdentifierRequired: !1,
          persistentStateRequired: !1,
          audioRobustness: "",
          videoRobustness: "",
          serverCertificate: null,
          initData: _ || [],
          keyIds: [],
        };
      }
      var Mt = {
          Za: "video",
          Sb: "audio",
          za: "text",
          Ug: "image",
          Sg: "application",
        },
        Wt = 1 / 15;
      function Ft() {
        var m,
          _,
          R = new Promise(function (M, x) {
            (m = M), (_ = x);
          });
        return (R.resolve = m), (R.reject = _), R;
      }
      function un(m) {
        if (!m) return "";
        (m = new Uint8Array(m))[0] == 239 &&
          m[1] == 187 &&
          m[2] == 191 &&
          (m = m.subarray(3)),
          (m = ye(m)),
          (m = escape(m));
        try {
          return decodeURIComponent(m);
        } catch {
          throw new re(2, 2, 2004);
        }
      }
      function Yt(m, _, R) {
        if (!m) return "";
        if (!R && m.byteLength % 2 != 0)
          throw (
            (B.error("Data has an incorrect length, must be even."),
            new re(2, 2, 2004))
          );
        if (m instanceof ArrayBuffer) var M = m;
        else
          (R = new Uint8Array(m.byteLength)).set(new Uint8Array(m)),
            (M = R.buffer);
        (m = Math.floor(m.byteLength / 2)),
          (R = new Uint16Array(m)),
          (M = new DataView(M));
        for (var x = 0; x < m; x++) R[x] = M.getUint16(2 * x, _);
        return ye(R);
      }
      function Qt(m) {
        var _ = new Uint8Array(m);
        if (_[0] == 239 && _[1] == 187 && _[2] == 191) return un(_);
        if (_[0] == 254 && _[1] == 255) return Yt(_.subarray(2), !1);
        if (_[0] == 255 && _[1] == 254) return Yt(_.subarray(2), !0);
        var R = function (M, x) {
          return M.byteLength <= x || (32 <= M[x] && 126 >= M[x]);
        }.bind(null, _);
        if (
          (B.debug("Unable to find byte-order-mark, making an educated guess."),
          _[0] == 0 && _[2] == 0)
        )
          return Yt(m, !1);
        if (_[1] == 0 && _[3] == 0) return Yt(m, !0);
        if (R(0) && R(1) && R(2) && R(3)) return un(m);
        throw new re(2, 2, 2003);
      }
      function Sn(m) {
        (m = encodeURIComponent(m)), (m = unescape(m));
        for (var _ = new Uint8Array(m.length), R = 0; R < m.length; ++R)
          _[R] = m.charCodeAt(R);
        return _.buffer;
      }
      function ar(m, _) {
        for (
          var R = new Uint8Array(2 * m.length),
            M = new DataView(R.buffer),
            x = 0;
          x < m.length;
          ++x
        )
          M.setUint16(2 * x, m.charCodeAt(x), _);
        return R.buffer;
      }
      function ye(m) {
        if (!Gn) {
          for (
            var _ = function (M) {
                try {
                  var x = new Uint8Array(M);
                  return 0 < String.fromCharCode.apply(null, x).length;
                } catch {
                  return !1;
                }
              },
              R = { size: 65536 };
            0 < R.size;
            (R = { size: R.size }).size /= 2
          )
            if (_(R.size)) {
              Gn = (function (M) {
                return function (x) {
                  for (var z = "", J = 0; J < x.length; J += M.size)
                    z += String.fromCharCode.apply(
                      null,
                      x.subarray(J, J + M.size)
                    );
                  return z;
                };
              })(R);
              break;
            }
        }
        return Gn(m);
      }
      (Ft.prototype.resolve = function () {}),
        (Ft.prototype.reject = function () {}),
        Z("shaka.util.StringUtils.fromUTF8", un),
        Z("shaka.util.StringUtils.fromUTF16", Yt),
        Z("shaka.util.StringUtils.fromBytesAutoDetect", Qt),
        Z("shaka.util.StringUtils.toUTF8", Sn),
        Z("shaka.util.StringUtils.toUTF16", ar);
      var Gn = null;
      Z("shaka.util.StringUtils.resetFromCharCode", function () {
        Gn = null;
      });
      var Ht = {
        Mc: function (m, _) {
          var R = ye(m);
          return (
            (_ = _ == null || _),
            (R = i.btoa(R).replace(/\+/g, "-").replace(/\//g, "_")),
            _ ? R : R.replace(/=*$/, "")
          );
        },
      };
      function yr() {
        (this.g = new muxjs.mp4.Transmuxer({ keepOriginalTimestamps: !0 })),
          (this.h = null),
          (this.l = []),
          (this.i = []),
          (this.j = !1),
          this.g.on("data", this.o.bind(this)),
          this.g.on("done", this.m.bind(this));
      }
      function T(m, _) {
        return (
          !(
            !i.muxjs || m.toLowerCase().split(";")[0].split("/")[1] != "mp2t"
          ) &&
          (_
            ? MediaSource.isTypeSupported(Jn(_, m))
            : MediaSource.isTypeSupported(Jn("audio", m)) ||
              MediaSource.isTypeSupported(Jn("video", m)))
        );
      }
      function Jn(m, _) {
        var R = _.replace(/mp2t/i, "mp4");
        m == "audio" && (R = R.replace("video", "audio"));
        var M = /avc1\.(66|77|100)\.(\d+)/.exec(R);
        if (M) {
          var x = "avc1.",
            z = M[1],
            J = Number(M[2]);
          (x =
            (z == "66" ? x + "4200" : z == "77" ? x + "4d00" : x + "6400") +
            (J >> 4).toString(16)),
            (x += (15 & J).toString(16)),
            (R = R.replace(M[0], x));
        }
        return R;
      }
      function pr(m) {
        (this.h = m), (this.g = null);
      }
      function Ut(m) {
        (this.h = m), (this.g = null);
      }
      function Dt(m, _) {
        var R = {
          maxAttempts: 2,
          baseDelay: 1e3,
          backoffFactor: 2,
          fuzzFactor: 0.5,
          timeout: 0,
        };
        (this.o = m.maxAttempts == null ? R.maxAttempts : m.maxAttempts),
          (this.j = m.baseDelay == null ? R.baseDelay : m.baseDelay),
          (this.m = m.fuzzFactor == null ? R.fuzzFactor : m.fuzzFactor),
          (this.l =
            m.backoffFactor == null ? R.backoffFactor : m.backoffFactor),
          (this.g = 0),
          (this.h = this.j),
          (this.i = _ !== void 0 && _) && (this.g = 1);
      }
      function Kt(m) {
        return k(function _() {
          var R, M;
          return $t(_, function (x) {
            switch (x.s) {
              case 1:
                if (m.g >= m.o) {
                  if (!m.i) return x.return(Promise.reject());
                  (m.g = 1), (m.h = m.j);
                }
                return (
                  (R = m.g),
                  m.g++,
                  R == 0
                    ? x.return()
                    : ((M = m.h * (1 + (2 * Math.random() - 1) * m.m)),
                      E(
                        x,
                        new Promise(function (z) {
                          new Ut(z).V(M / 1e3);
                        }),
                        2
                      ))
                );
              case 2:
                (m.h *= m.l), S(x);
            }
          });
        });
      }
      function vn(m, _) {
        (this.promise = m), (this.se = _), (this.g = !1);
      }
      function st(m) {
        return new vn(Promise.reject(m), function () {
          return Promise.resolve();
        });
      }
      function Xt() {
        var m = Promise.reject(new re(2, 7, 7001));
        return (
          m.catch(function () {}),
          new vn(m, function () {
            return Promise.resolve();
          })
        );
      }
      function qn(m) {
        return new vn(Promise.resolve(m), function () {
          return Promise.resolve();
        });
      }
      function cr(m) {
        return new vn(m, function () {
          return m.catch(function () {});
        });
      }
      function Ui(m) {
        return new vn(
          Promise.all(
            m.map(function (_) {
              return _.promise;
            })
          ),
          function () {
            return Promise.all(
              m.map(function (_) {
                return _.abort();
              })
            );
          }
        );
      }
      function Je(m, _) {
        for (var R in (_ = _ === void 0 ? {} : _)) this[R] = _[R];
        (this.defaultPrevented = this.cancelable = this.bubbles = !1),
          (this.timeStamp =
            i.performance && i.performance.now
              ? i.performance.now()
              : Date.now()),
          (this.type = m),
          (this.isTrusted = !1),
          (this.target = this.currentTarget = null),
          (this.g = !1);
      }
      function sn() {
        this.g = {};
      }
      function Ye() {
        (this.hd = new sn()), (this.jc = this);
      }
      function Ct(m) {
        var _ = new Set();
        return (function R(M) {
          switch (typeof M) {
            case "undefined":
            case "boolean":
            case "number":
            case "string":
            case "symbol":
            case "function":
              return M;
            default:
              if (!M || (M.buffer && M.buffer.constructor == ArrayBuffer))
                return M;
              if (_.has(M)) return null;
              var x = M.constructor == Array;
              if (M.constructor != Object && !x) return null;
              _.add(M);
              var z,
                J = x ? [] : {};
              for (z in M) J[z] = R(M[z]);
              return x && (J.length = M.length), J;
          }
        })(m);
      }
      function At(m, _) {
        return (
          !(
            typeof m != "number" ||
            typeof _ != "number" ||
            !isNaN(m) ||
            !isNaN(_)
          ) || m === _
        );
      }
      function Pn(m, _) {
        var R = m.indexOf(_);
        -1 < R && m.splice(R, 1);
      }
      function Xn(m, _, R) {
        if ((R || (R = At), m.length != _.length)) return !1;
        _ = _.slice();
        for (
          var M = {}, x = (m = b(m)).next();
          !x.done;
          M = { item: M.item }, x = m.next()
        ) {
          if (
            ((M.item = x.value),
            (x = _.findIndex(
              (function (z) {
                return function (J) {
                  return R(z.item, J);
                };
              })(M)
            )) == -1)
          )
            return !1;
          (_[x] = _[_.length - 1]), _.pop();
        }
        return _.length == 0;
      }
      function wn() {
        this.g = [];
      }
      function Vn(m, _) {
        m.g.push(
          _.finally(function () {
            Pn(m.g, _);
          })
        );
      }
      function Ot(m) {
        Ye.call(this),
          (this.j = !1),
          (this.l = new wn()),
          (this.g = new Set()),
          (this.h = new Set()),
          (this.i = m || null);
      }
      Z("shaka.util.Uint8ArrayUtils.toBase64", Ht.Mc),
        (Ht.Ja = function (m) {
          m = i.atob(m.replace(/-/g, "+").replace(/_/g, "/"));
          for (var _ = new Uint8Array(m.length), R = 0; R < m.length; ++R)
            _[R] = m.charCodeAt(R);
          return _;
        }),
        Z("shaka.util.Uint8ArrayUtils.fromBase64", Ht.Ja),
        (Ht.$c = function (m) {
          for (
            var _ = new Uint8Array(m.length / 2), R = 0;
            R < m.length;
            R += 2
          )
            _[R / 2] = i.parseInt(m.substr(R, 2), 16);
          return _;
        }),
        Z("shaka.util.Uint8ArrayUtils.fromHex", Ht.$c),
        (Ht.Nc = function (m) {
          for (var _ = "", R = 0; R < m.length; ++R) {
            var M = m[R].toString(16);
            M.length == 1 && (M = "0" + M), (_ += M);
          }
          return _;
        }),
        Z("shaka.util.Uint8ArrayUtils.toHex", Ht.Nc),
        (Ht.Ha = function (m, _) {
          if (!m && !_) return !0;
          if (!m || !_ || m.length != _.length) return !1;
          for (var R = 0; R < m.length; ++R) if (m[R] != _[R]) return !1;
          return !0;
        }),
        Z("shaka.util.Uint8ArrayUtils.equal", Ht.Ha),
        (Ht.concat = function (m) {
          for (var _ = [], R = 0; R < arguments.length; ++R)
            _[R] = arguments[R];
          for (var M = (R = 0); M < _.length; ++M) R += _[M].length;
          R = new Uint8Array(R);
          for (var x = (M = 0); x < _.length; ++x)
            R.set(_[x], M), (M += _[x].length);
          return R;
        }),
        Z("shaka.util.Uint8ArrayUtils.concat", Ht.concat),
        (yr.prototype.destroy = function () {
          return this.g.dispose(), (this.g = null), Promise.resolve();
        }),
        (yr.prototype.o = function (m) {
          this.i = m.captions;
          var _ = new Uint8Array(m.data.byteLength + m.initSegment.byteLength);
          _.set(m.initSegment, 0),
            _.set(m.data, m.initSegment.byteLength),
            this.l.push(_);
        }),
        (yr.prototype.m = function () {
          var m = { data: Ht.concat.apply(null, this.l), captions: this.i };
          this.h.resolve(m), (this.j = !1);
        }),
        (pr.prototype.V = function (m) {
          var _ = this;
          this.stop();
          var R = !0,
            M = null;
          return (
            (this.g = function () {
              i.clearTimeout(M), (R = !1);
            }),
            (M = i.setTimeout(function () {
              R && _.h();
            }, 1e3 * m)),
            this
          );
        }),
        (pr.prototype.stop = function () {
          this.g && (this.g(), (this.g = null));
        }),
        Z("shaka.util.Timer", Ut),
        (Ut.prototype.Lc = function () {
          return this.stop(), this.h(), this;
        }),
        (Ut.prototype.tickNow = Ut.prototype.Lc),
        (Ut.prototype.V = function (m) {
          var _ = this;
          return (
            this.stop(),
            (this.g = new pr(function () {
              _.h();
            }).V(m)),
            this
          );
        }),
        (Ut.prototype.tickAfter = Ut.prototype.V),
        (Ut.prototype.Oa = function (m) {
          var _ = this;
          return (
            this.stop(),
            (this.g = new pr(function () {
              _.g.V(m), _.h();
            }).V(m)),
            this
          );
        }),
        (Ut.prototype.tickEvery = Ut.prototype.Oa),
        (Ut.prototype.stop = function () {
          this.g && (this.g.stop(), (this.g = null));
        }),
        (Ut.prototype.stop = Ut.prototype.stop),
        Z("shaka.util.AbortableOperation", vn),
        (vn.failed = st),
        (vn.aborted = Xt),
        (vn.completed = qn),
        (vn.notAbortable = cr),
        (vn.prototype.abort = function () {
          return (this.g = !0), this.se();
        }),
        (vn.prototype.abort = vn.prototype.abort),
        (vn.all = Ui),
        (vn.prototype.finally = function (m) {
          return (
            this.promise.then(
              function () {
                return m(!0);
              },
              function () {
                return m(!1);
              }
            ),
            this
          );
        }),
        (vn.prototype.finally = vn.prototype.finally),
        (vn.prototype.ca = function (m, _) {
          function R(te) {
            return function (pe) {
              if (x.g && te) z.reject(J);
              else {
                var xe = te ? m : _;
                xe
                  ? (M = (function (Be, bt, dt) {
                      try {
                        var mt = Be(bt);
                        return mt && mt.promise && mt.abort
                          ? (dt.resolve(mt.promise),
                            function () {
                              return mt.abort();
                            })
                          : (dt.resolve(mt),
                            function () {
                              return Promise.resolve(mt).then(
                                function () {},
                                function () {}
                              );
                            });
                      } catch (xt) {
                        return (
                          dt.reject(xt),
                          function () {
                            return Promise.resolve();
                          }
                        );
                      }
                    })(xe, pe, z))
                  : (te ? z.resolve : z.reject)(pe);
              }
            };
          }
          function M() {
            return z.reject(J), x.abort();
          }
          var x = this,
            z = new Ft(),
            J = new re(2, 7, 7001);
          return (
            this.promise.then(R(!0), R(!1)),
            new vn(z, function () {
              return M();
            })
          );
        }),
        (vn.prototype.chain = vn.prototype.ca),
        Z("shaka.util.FakeEvent", Je),
        (Je.prototype.preventDefault = function () {
          this.cancelable && (this.defaultPrevented = !0);
        }),
        (Je.prototype.stopImmediatePropagation = function () {
          this.g = !0;
        }),
        (Je.prototype.stopPropagation = function () {}),
        ((u = sn.prototype).push = function (m, _) {
          this.g.hasOwnProperty(m) ? this.g[m].push(_) : (this.g[m] = [_]);
        }),
        (u.get = function (m) {
          return (m = this.g[m]) ? m.slice() : null;
        }),
        (u.getAll = function () {
          var m,
            _ = [];
          for (m in this.g) _.push.apply(_, this.g[m]);
          return _;
        }),
        (u.remove = function (m, _) {
          var R = this.g[m];
          if (R)
            for (var M = 0; M < R.length; ++M)
              R[M] == _ && (R.splice(M, 1), --M);
        }),
        (u.forEach = function (m) {
          for (var _ in this.g) m(_, this.g[_]);
        }),
        (u.size = function () {
          return Object.keys(this.g).length;
        }),
        (Ye.prototype.addEventListener = function (m, _) {
          this.hd.push(m, _);
        }),
        (Ye.prototype.removeEventListener = function (m, _) {
          this.hd.remove(m, _);
        }),
        (Ye.prototype.dispatchEvent = function (m) {
          for (var _ = this.hd.get(m.type) || [], R = 0; R < _.length; ++R) {
            (m.target = this.jc), (m.currentTarget = this.jc);
            var M = _[R];
            try {
              M.handleEvent ? M.handleEvent(m) : M.call(this, m);
            } catch (x) {
              B.error(
                "Uncaught exception in event handler",
                x,
                x ? x.message : null,
                x ? x.stack : null
              );
            }
            if (m.g) break;
          }
          return m.defaultPrevented;
        }),
        (wn.prototype.destroy = function () {
          var m = [];
          return (
            this.g.forEach(function (_) {
              _.promise.catch(function () {}), m.push(_.abort());
            }),
            (this.g = []),
            Promise.all(m)
          );
        }),
        ie(Ot, Ye),
        Z("shaka.net.NetworkingEngine", Ot),
        (Ot.RequestType = {
          MANIFEST: 0,
          SEGMENT: 1,
          LICENSE: 2,
          APP: 3,
          TIMING: 4,
        }),
        (Ot.PluginPriority = { FALLBACK: 1, PREFERRED: 2, APPLICATION: 3 });
      var _n = {};
      function gr(m, _, R) {
        R = R || 3;
        var M = _n[m];
        (!M || R >= M.priority) && (_n[m] = { priority: R, mg: _ });
      }
      function ut(m, _) {
        return {
          uris: m,
          method: "GET",
          body: null,
          headers: {},
          allowCrossSiteCredentials: !1,
          retryParameters: _,
          licenseRequestType: null,
          sessionId: null,
        };
      }
      function Si(m, _, R, M, x, z, J) {
        var te = new lt(R.uris[x]),
          pe = te.Ba,
          xe = !1;
        pe ||
          (Et(te, (pe = (pe = location.protocol).slice(0, -1))),
          (R.uris[x] = te.toString())),
          (pe = pe.toLowerCase());
        var Be,
          bt = (pe = _n[pe]) ? pe.mg : null;
        return bt
          ? cr(Kt(M))
              .ca(function () {
                return m.j
                  ? Xt()
                  : ((Be = Date.now()),
                    bt(R.uris[x], R, _, function (dt, mt, xt) {
                      m.i && _ == 1 && (m.i(dt, mt), (xe = !0), (J.g = xt));
                    }));
              })
              .ca(
                function (dt) {
                  return (
                    dt.timeMs == null && (dt.timeMs = Date.now() - Be),
                    { response: dt, Nf: xe }
                  );
                },
                function (dt) {
                  if (dt && dt.code == 7001) throw dt;
                  if (m.j) return Xt();
                  if (dt && dt.severity == 1)
                    return (
                      m.dispatchEvent(
                        new Je("retry", { error: dt instanceof re ? dt : null })
                      ),
                      (x = (x + 1) % R.uris.length),
                      Si(m, _, R, M, x, dt, J)
                    );
                  throw dt || z;
                }
              )
          : st(new re(2, 1, 1e3, te));
      }
      function cn() {
        this.g = 0;
      }
      function ir(m, _, R) {
        vn.call(this, m, _), (this.h = R);
      }
      function jr() {}
      function Yr() {
        this.g = new sn();
      }
      function Qi(m, _, R, M) {
        (this.target = m),
          (this.type = _),
          (this.listener = R),
          (this.g = (function (x, z) {
            if (z == null) return !1;
            if (typeof z == "boolean") return z;
            var J = new Set(["passive", "capture"]);
            return (
              Object.keys(z).filter(function (te) {
                return !J.has(te);
              }),
              (function (te) {
                var pe = Wa;
                if (pe == null) {
                  pe = !1;
                  try {
                    var xe = {},
                      Be = {
                        get: function () {
                          return (pe = !0), !1;
                        },
                      };
                    Object.defineProperty(xe, "passive", Be),
                      Object.defineProperty(xe, "capture", Be),
                      (Be = function () {}),
                      te.addEventListener("test", Be, xe),
                      te.removeEventListener("test", Be, xe);
                  } catch {
                    pe = !1;
                  }
                  Wa = pe;
                }
                return pe || !1;
              })(x)
                ? z
                : z.capture || !1
            );
          })(m, M)),
          this.target.addEventListener(_, R, this.g);
      }
      (Ot.registerScheme = gr),
        (Ot.unregisterScheme = function (m) {
          delete _n[m];
        }),
        (Ot.prototype.og = function (m) {
          this.g.add(m);
        }),
        (Ot.prototype.registerRequestFilter = Ot.prototype.og),
        (Ot.prototype.Ng = function (m) {
          this.g.delete(m);
        }),
        (Ot.prototype.unregisterRequestFilter = Ot.prototype.Ng),
        (Ot.prototype.bf = function () {
          this.g.clear();
        }),
        (Ot.prototype.clearAllRequestFilters = Ot.prototype.bf),
        (Ot.prototype.pg = function (m) {
          this.h.add(m);
        }),
        (Ot.prototype.registerResponseFilter = Ot.prototype.pg),
        (Ot.prototype.Og = function (m) {
          this.h.delete(m);
        }),
        (Ot.prototype.unregisterResponseFilter = Ot.prototype.Og),
        (Ot.prototype.cf = function () {
          this.h.clear();
        }),
        (Ot.prototype.clearAllResponseFilters = Ot.prototype.cf),
        (Ot.defaultRetryParameters = function () {
          return {
            maxAttempts: 2,
            baseDelay: 1e3,
            backoffFactor: 2,
            fuzzFactor: 0.5,
            timeout: 0,
          };
        }),
        (Ot.makeRequest = ut),
        (Ot.prototype.destroy = function () {
          return (
            (this.j = !0), this.g.clear(), this.h.clear(), this.l.destroy()
          );
        }),
        (Ot.prototype.destroy = Ot.prototype.destroy),
        (Ot.prototype.request = function (m, _) {
          var R = this,
            M = new cn();
          if (this.j) {
            var x = Promise.reject(new re(2, 7, 7001));
            return (
              x.catch(function () {}),
              new ir(
                x,
                function () {
                  return Promise.resolve();
                },
                M
              )
            );
          }
          (_.method = _.method || "GET"),
            (_.headers = _.headers || {}),
            (_.retryParameters = _.retryParameters
              ? Ct(_.retryParameters)
              : {
                  maxAttempts: 2,
                  baseDelay: 1e3,
                  backoffFactor: 2,
                  fuzzFactor: 0.5,
                  timeout: 0,
                }),
            (_.uris = Ct(_.uris)),
            (x = (function (Be, bt, dt) {
              for (
                var mt = qn(void 0), xt = {}, Nt = (Be = b(Be.g)).next();
                !Nt.done;
                xt = { Gd: xt.Gd }, Nt = Be.next()
              )
                (xt.Gd = Nt.value),
                  (mt = mt.ca(
                    (function (en) {
                      return function () {
                        return en.Gd(bt, dt);
                      };
                    })(xt)
                  ));
              return mt.ca(void 0, function (en) {
                throw en && en.code == 7001 ? en : new re(2, 1, 1006, en);
              });
            })(this, m, _));
          var z = x.ca(function () {
              return Si(R, m, _, new Dt(_.retryParameters, !1), 0, null, M);
            }),
            J = z.ca(function (Be) {
              return (function (bt, dt, mt) {
                for (
                  var xt = qn(void 0), Nt = (bt = b(bt.h)).next();
                  !Nt.done;
                  Nt = bt.next()
                )
                  xt = xt.ca(Nt.value.bind(null, dt, mt.response));
                return xt.ca(
                  function () {
                    return mt;
                  },
                  function (en) {
                    if (en && en.code == 7001) throw en;
                    var Tn = 2;
                    throw (
                      (en instanceof re && (Tn = en.severity),
                      new re(Tn, 1, 1007, en))
                    );
                  }
                );
              })(R, m, Be);
            }),
            te = Date.now(),
            pe = 0;
          x.promise.then(
            function () {
              pe = Date.now() - te;
            },
            function () {}
          );
          var xe = 0;
          return (
            z.promise.then(
              function () {
                xe = Date.now();
              },
              function () {}
            ),
            (x = new ir(
              (x = J.ca(
                function (Be) {
                  var bt = Date.now() - xe,
                    dt = Be.response;
                  return (
                    (dt.timeMs += pe),
                    (dt.timeMs += bt),
                    Be.Nf ||
                      !R.i ||
                      dt.fromCache ||
                      m != 1 ||
                      R.i(dt.timeMs, dt.data.byteLength),
                    dt
                  );
                },
                function (Be) {
                  throw (Be && (Be.severity = 2), Be);
                }
              )).promise,
              x.se,
              M
            )),
            Vn(this.l, x),
            x
          );
        }),
        (Ot.prototype.request = Ot.prototype.request),
        (Ot.NumBytesRemainingClass = cn),
        O(ir, vn),
        (Ot.PendingRequest = ir),
        (ir.all = Ui),
        (ir.notAbortable = cr),
        (ir.completed = qn),
        (ir.aborted = Xt),
        (ir.failed = st),
        Z("shaka.util.IReleasable", jr),
        (jr.prototype.release = function () {}),
        Z("shaka.util.EventManager", Yr),
        (Yr.prototype.release = function () {
          this.nb(), (this.g = null);
        }),
        (Yr.prototype.release = Yr.prototype.release),
        (Yr.prototype.H = function (m, _, R, M) {
          this.g && ((m = new Qi(m, _, R, M)), this.g.push(_, m));
        }),
        (Yr.prototype.listen = Yr.prototype.H),
        (Yr.prototype.ya = function (m, _, R, M) {
          var x = this;
          this.H(
            m,
            _,
            function z(J) {
              x.ta(m, _, z), R(J);
            },
            M
          );
        }),
        (Yr.prototype.listenOnce = Yr.prototype.ya),
        (Yr.prototype.ta = function (m, _, R) {
          if (this.g)
            for (
              var M = this.g.get(_) || [], x = (M = b(M)).next();
              !x.done;
              x = M.next()
            )
              (x = x.value).target != m ||
                (R != x.listener && R) ||
                (x.ta(), this.g.remove(_, x));
        }),
        (Yr.prototype.unlisten = Yr.prototype.ta),
        (Yr.prototype.nb = function () {
          if (this.g) {
            for (
              var m = this.g.getAll(), _ = (m = b(m)).next();
              !_.done;
              _ = m.next()
            )
              _.value.ta();
            this.g.g = {};
          }
        }),
        (Yr.prototype.removeAll = Yr.prototype.nb),
        (Qi.prototype.ta = function () {
          this.target.removeEventListener(this.type, this.listener, this.g),
            (this.listener = this.target = null),
            (this.g = !1);
        }),
        (Qi.prototype.unlisten = Qi.prototype.ta);
      var Wa = void 0;
      function Ni(m) {
        return new lt((m = Qt(m))).Aa;
      }
      function ka(m, _, R) {
        function M(J) {
          new DataView(x.buffer).setUint32(z, J.byteLength, !0),
            (z += 4),
            x.set(J, z),
            (z += J.byteLength);
        }
        if (!R || !R.byteLength) throw new re(2, 6, 6015);
        (_ =
          typeof _ == "string" ? new Uint8Array(ar(_, !0)) : new Uint8Array(_)),
          (m = ar((m = Qt(m)), !0));
        var x = new Uint8Array(12 + m.byteLength + _.byteLength + R.byteLength),
          z = 0;
        return M(new Uint8Array(m)), M(_), M(new Uint8Array(R)), x;
      }
      function Fr(m, _) {
        for (var R = [], M = b(m), x = M.next(); !x.done; x = M.next())
          R.push(_(x.value));
        return R;
      }
      function Wr(m, _) {
        for (var R = b(m), M = R.next(); !M.done; M = R.next())
          if (!_(M.value)) return !1;
        return !0;
      }
      function si(m) {
        var _ = new Map();
        return (
          Object.keys(m).forEach(function (R) {
            _.set(R, m[R]);
          }),
          _
        );
      }
      function ma(m) {
        var _ = {};
        return (
          m.forEach(function (R, M) {
            _[M] = R;
          }),
          _
        );
      }
      function Aa(m, _) {
        var R = m;
        return _ && (R += '; codecs="' + _ + '"'), R;
      }
      function Sl(m) {
        return (
          (m = m.split(/ *; */)).shift(),
          (m = m.find(function (_) {
            return _.startsWith("codecs=");
          }))
            ? m.split("=")[1].replace(/^"|"$/g, "")
            : ""
        );
      }
      function Ki(m) {
        var _ = (m = m.split("."))[0];
        return m.pop(), [_, m.join(".")];
      }
      Z("shaka.util.FairPlayUtils.defaultGetContentId", Ni),
        Z("shaka.util.FairPlayUtils.initDataTransform", ka);
      var Ro = new Map()
        .set("codecs", "codecs")
        .set("frameRate", "framerate")
        .set("bandwidth", "bitrate")
        .set("width", "width")
        .set("height", "height")
        .set("channelsCount", "channels");
      function Xo() {
        return !(!i.MediaSource || !MediaSource.isTypeSupported);
      }
      function Ns(m) {
        return W0().canPlayType(m) != "";
      }
      function Gu() {
        return Ws("Tizen");
      }
      function zh() {
        return (
          !!navigator.vendor && navigator.vendor.includes("Apple") && !Gu()
        );
      }
      function j0() {
        if (!zh()) return null;
        var m = navigator.userAgent.match(/Version\/(\d+)/);
        return m || (m = navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))
          ? parseInt(m[1], 10)
          : null;
      }
      function Ws(m) {
        return (navigator.userAgent || "").includes(m);
      }
      function W0() {
        return (
          ps ||
          (Mm ||
            (Mm = new Ut(function () {
              ps = null;
            })),
          (ps =
            document.getElementsByTagName("video")[0] ||
            document.getElementsByTagName("audio")[0]) ||
            (ps = document.createElement("video")),
          Mm.V(1),
          ps)
        );
      }
      var Mm = null,
        ps = null;
      function rs(m, _) {
        var R = this;
        (_ = _ === void 0 ? 1 : _),
          (this.J = m),
          (this.C = new Set()),
          (this.m = this.o = null),
          (this.Z = !1),
          (this.P = 0),
          (this.g = null),
          (this.u = new Yr()),
          (this.h = new Map()),
          (this.F = []),
          (this.A = new Ft()),
          (this.j = null),
          (this.l = function (M) {
            R.A.reject(M), m.onError(M);
          }),
          (this.wa = new Map()),
          (this.da = new Map()),
          (this.X = new Ut(function () {
            return (function (M) {
              var x = M.wa,
                z = M.da;
              z.clear(),
                x.forEach(function (J, te) {
                  return z.set(te, J);
                }),
                (x = Array.from(z.values())),
                x.length &&
                  x.every(function (J) {
                    return J == "expired";
                  }) &&
                  M.l(new re(2, 6, 6014)),
                M.J.Dc(ma(z));
            })(R);
          })),
          (this.i = !1),
          (this.ua = new Ft()),
          (this.L = !1),
          (this.M = []),
          (this.va = !1),
          (this.ea = new Ut(function () {
            (function (M) {
              M.h.forEach(function (x, z) {
                var J = x.xd,
                  te = z.expiration;
                isNaN(te) && (te = 1 / 0),
                  te != J &&
                    (M.J.onExpirationUpdated(z.sessionId, te), (x.xd = te));
              });
            })(R);
          }).Oa(_)),
          this.A.catch(function () {});
      }
      function ug(m, _, R) {
        return (m.F = R), (m.L = 0 < R.length), Cm(m, _);
      }
      function Cm(m, _) {
        var R = (function (J) {
          if (((J = si(J.j.clearKeys)), J.size == 0)) return null;
          var te = [],
            pe = [];
          J.forEach(function (Be, bt) {
            var dt = Ht.$c(bt),
              mt = Ht.$c(Be);
            (dt = { kty: "oct", kid: Ht.Mc(dt, !1), k: Ht.Mc(mt, !1) }),
              te.push(dt),
              pe.push(dt.kid);
          }),
            (J = JSON.stringify({ keys: te }));
          var xe = JSON.stringify({ kids: pe });
          return (
            (xe = [
              { initData: new Uint8Array(Sn(xe)), initDataType: "keyids" },
            ]),
            {
              keySystem: "org.w3.clearkey",
              licenseServerUri: "data:application/json;base64," + i.btoa(J),
              distinctiveIdentifierRequired: !1,
              persistentStateRequired: !1,
              audioRobustness: "",
              videoRobustness: "",
              serverCertificate: null,
              initData: xe,
              keyIds: [],
            }
          );
        })(m);
        if (R)
          for (var M = b(_), x = M.next(); !x.done; x = M.next())
            x.value.drmInfos = [R];
        for (
          (R = _.some(function (J) {
            return 0 < J.drmInfos.length;
          })) ||
            (function (J, te) {
              var pe = [];
              te.forEach(function (bt, dt) {
                pe.push({
                  keySystem: dt,
                  licenseServerUri: bt,
                  distinctiveIdentifierRequired: !1,
                  persistentStateRequired: !1,
                  audioRobustness: "",
                  videoRobustness: "",
                  serverCertificate: null,
                  initData: [],
                  keyIds: [],
                });
              });
              for (var xe = b(J), Be = xe.next(); !Be.done; Be = xe.next())
                Be.value.drmInfos = pe;
            })(_, (x = si(m.j.servers))),
            x = (M = b(_)).next();
          !x.done;
          x = M.next()
        )
          for (var z = (x = b(x.value.drmInfos)).next(); !z.done; z = x.next())
            Gb(z.value, si(m.j.servers), si(m.j.advanced || {}));
        return (
          (x = (function (J, te) {
            for (
              var pe = new Set(), xe = b(te), Be = xe.next();
              !Be.done;
              Be = xe.next()
            ) {
              var bt = b(Be.value.drmInfos);
              for (Be = bt.next(); !Be.done; Be = bt.next()) pe.add(Be.value);
            }
            for (xe = b(pe), Be = xe.next(); !Be.done; Be = xe.next())
              Gb(Be.value, si(J.j.servers), si(J.j.advanced || {}));
            bt = J.L ? "required" : "optional";
            var dt = J.L ? ["persistent-license"] : ["temporary"];
            for (
              xe = new Map(), pe = b(pe), Be = pe.next();
              !Be.done;
              Be = pe.next()
            )
              (Be = Be.value),
                xe.set(Be.keySystem, {
                  audioCapabilities: [],
                  videoCapabilities: [],
                  distinctiveIdentifier: "optional",
                  persistentState: bt,
                  sessionTypes: dt,
                  label: Be.keySystem,
                  drmInfos: [],
                });
            for (pe = b(te), Be = pe.next(); !Be.done; Be = pe.next()) {
              (bt = (Be = Be.value).audio), (dt = Be.video);
              var mt = bt ? ol(bt) : "",
                xt = dt ? ol(dt) : "",
                Nt = b(Be.drmInfos);
              for (Be = Nt.next(); !Be.done; Be = Nt.next()) {
                Be = Be.value;
                var en = xe.get(Be.keySystem);
                en.drmInfos.push(Be),
                  Be.distinctiveIdentifierRequired &&
                    (en.distinctiveIdentifier = "required"),
                  Be.persistentStateRequired &&
                    (en.persistentState = "required"),
                  bt &&
                    (en.audioCapabilities.push({
                      robustness: Be.audioRobustness || "",
                      contentType: mt,
                    }),
                    bt.codecs.toLowerCase() == "ac-3" &&
                      Gu() &&
                      en.audioCapabilities.push({
                        robustness: Be.audioRobustness || "",
                        contentType: Aa(bt.mimeType, "ec-3"),
                      })),
                  dt &&
                    en.videoCapabilities.push({
                      robustness: Be.videoRobustness || "",
                      contentType: xt,
                    });
              }
            }
            return xe;
          })(m, _)),
          x.size
            ? ((x = jh(m, x)), R ? x : x.catch(function () {}))
            : ((m.Z = !0), Promise.resolve())
        );
      }
      function $m(m) {
        return k(function _() {
          var R;
          return $t(_, function (M) {
            switch (M.s) {
              case 1:
                if (
                  !(
                    m.o &&
                    m.g &&
                    m.g.serverCertificate &&
                    m.g.serverCertificate.length
                  )
                ) {
                  M.I(0);
                  break;
                }
                return (
                  L(M, 3),
                  E(M, m.o.setServerCertificate(m.g.serverCertificate), 5)
                );
              case 5:
                M.B ||
                  B.v(
                    "Server certificates are not supported by the key system.  The server certificate has been ignored."
                  ),
                  F(M, 0);
                break;
              case 3:
                return (
                  (R = oe(M)),
                  M.return(Promise.reject(new re(2, 6, 6004, R.message)))
                );
            }
          });
        });
      }
      function No(m) {
        var _ = m.g ? m.g.initData : [];
        return (
          _.forEach(function (R) {
            return Ks(m, R.initDataType, R.initData);
          }),
          m.F.forEach(function (R) {
            return Nu(m, R);
          }),
          _.length || m.F.length || m.A.resolve(),
          m.A
        );
      }
      function Ks(m, _, R) {
        for (var M = m.h.values(), x = (M = b(M)).next(); !x.done; x = M.next())
          if (Ht.Ha(R, x.value.initData) && !Ws("Tizen 2"))
            return void B.debug("Ignoring duplicate init data.");
        (function (z, J, te) {
          try {
            if (z.L) {
              B.K("Creating new persistent session");
              var pe = z.o.createSession("persistent-license");
            } else
              B.K("Creating new temporary session"), (pe = z.o.createSession());
          } catch (xe) {
            return void z.l(new re(2, 6, 6005, xe.message));
          }
          z.u.H(pe, "message", z.ye.bind(z)),
            z.u.H(pe, "keystatuseschange", z.we.bind(z)),
            z.h.set(pe, { initData: te, loaded: !1, xd: 1 / 0, Ga: null });
          try {
            te = z.j.initDataTransform(te, z.g);
          } catch (xe) {
            return (
              (J = xe),
              xe instanceof re || (J = new re(2, 6, 6016, xe)),
              void z.l(J)
            );
          }
          pe.generateRequest(J, te).catch(function (xe) {
            if (!z.i) {
              if ((z.h.delete(pe), xe.errorCode && xe.errorCode.systemCode)) {
                var Be = xe.errorCode.systemCode;
                0 > Be && (Be += Math.pow(2, 32)),
                  (Be = "0x" + Be.toString(16));
              }
              z.l(new re(2, 6, 6006, xe.message, xe, Be));
            }
          });
        })(m, _, R);
      }
      function ud(m) {
        return m ? m.keySystem : "";
      }
      function ec(m, _) {
        if (navigator.userAgent.match(/Edge\//)) return !0;
        if (((_ = _.toLowerCase()), Gu() && _.includes('codecs="ac-3"'))) {
          var R = _.replace("ac-3", "ec-3");
          return m.C.has(_) || m.C.has(R);
        }
        return m.C.has(_);
      }
      function Yl(m) {
        return (
          (m = Fr((m = m.h.keys()), function (_) {
            return _.sessionId;
          })),
          Array.from(m)
        );
      }
      function ol(m) {
        var _ = Aa(m.mimeType, m.codecs);
        return T(_) ? Jn(m.type, _) : _;
      }
      function jh(m, _) {
        if (_.size == 1 && _.has("")) return Promise.reject(new re(2, 6, 6e3));
        for (var R = b(_.values()), M = R.next(); !M.done; M = R.next())
          (M = M.value).audioCapabilities.length == 0 &&
            delete M.audioCapabilities,
            M.videoCapabilities.length == 0 && delete M.videoCapabilities;
        var x = (R = new Ft());
        return (
          [!0, !1].forEach(
            function (z) {
              var J = this;
              _.forEach(function (te, pe) {
                te.drmInfos.some(function (xe) {
                  return !!xe.licenseServerUri;
                }) == z &&
                  (x = x.catch(
                    function () {
                      if (!this.i)
                        return navigator.requestMediaKeySystemAccess(pe, [te]);
                    }.bind(J)
                  ));
              });
            }.bind(m)
          ),
          (x = (x = x.catch(function () {
            return Promise.reject(new re(2, 6, 6001));
          }))
            .then(
              function (z) {
                if (this.i) return Promise.reject();
                this.C.clear();
                var J = z.getConfiguration(),
                  te = J.videoCapabilities || [],
                  pe = b(J.audioCapabilities || []);
                for (J = pe.next(); !J.done; J = pe.next())
                  this.C.add(J.value.contentType.toLowerCase());
                for (J = (te = b(te)).next(); !J.done; J = te.next())
                  this.C.add(J.value.contentType.toLowerCase());
                (te = z.keySystem), (pe = []);
                var xe = [],
                  Be = [],
                  bt = [];
                return (
                  (function (dt, mt, xt, Nt, en) {
                    dt.forEach(function (Tn) {
                      if (
                        (mt.includes(Tn.licenseServerUri) ||
                          mt.push(Tn.licenseServerUri),
                        Tn.serverCertificate &&
                          (xt.some(function (Qn) {
                            return Ht.Ha(Qn, Tn.serverCertificate);
                          }) ||
                            xt.push(Tn.serverCertificate)),
                        Tn.initData &&
                          Tn.initData.forEach(function (Qn) {
                            Nt.some(function (vr) {
                              return (
                                !(!vr.keyId || vr.keyId != Qn.keyId) ||
                                (vr.initDataType == Qn.initDataType &&
                                  Ht.Ha(vr.initData, Qn.initData))
                              );
                            }) || Nt.push(Qn);
                          }),
                        Tn.keyIds)
                      )
                        for (var In = 0; In < Tn.keyIds.length; ++In)
                          en.includes(Tn.keyIds[In]) || en.push(Tn.keyIds[In]);
                    });
                  })((J = _.get(z.keySystem)).drmInfos, pe, xe, Be, bt),
                  1 < xe.length &&
                    B.v(
                      "Multiple unique server certificates found! Only the first will be used."
                    ),
                  1 < pe.length &&
                    B.v(
                      "Multiple unique license server URIs found! Only the first will be used."
                    ),
                  (this.g = {
                    keySystem: te,
                    licenseServerUri: pe[0],
                    distinctiveIdentifierRequired:
                      J.distinctiveIdentifier == "required",
                    persistentStateRequired: J.persistentState == "required",
                    audioRobustness:
                      (J.audioCapabilities
                        ? J.audioCapabilities[0].robustness
                        : "") || "",
                    videoRobustness:
                      (J.videoCapabilities
                        ? J.videoCapabilities[0].robustness
                        : "") || "",
                    serverCertificate: xe[0],
                    initData: Be,
                    keyIds: bt,
                  }),
                  this.g.licenseServerUri
                    ? z.createMediaKeys()
                    : Promise.reject(new re(2, 6, 6012, this.g.keySystem))
                );
              }.bind(m)
            )
            .then(
              function (z) {
                if (this.i) return Promise.reject();
                B.info(
                  "Created MediaKeys object for key system",
                  this.g.keySystem
                ),
                  (this.o = z),
                  (this.Z = !0);
              }.bind(m)
            )
            .catch(
              function (z) {
                if (!this.i)
                  return (
                    (this.g = null),
                    this.C.clear(),
                    z instanceof re
                      ? Promise.reject(z)
                      : Promise.reject(new re(2, 6, 6002, z.message))
                  );
              }.bind(m)
            )),
          R.reject(),
          x
        );
      }
      function Nu(m, _) {
        try {
          B.K("Attempting to load an offline session", _);
          var R = m.o.createSession("persistent-license");
        } catch (z) {
          var M = new re(2, 6, 6005, z.message);
          return m.l(M), Promise.reject(M);
        }
        m.u.H(R, "message", m.ye.bind(m)),
          m.u.H(R, "keystatuseschange", m.we.bind(m));
        var x = { initData: null, loaded: !1, xd: 1 / 0, Ga: null };
        return (
          m.h.set(R, x),
          R.load(_).then(
            function (z) {
              return this.i
                ? Promise.reject()
                : (B.O("Loaded offline session", _, z),
                  z
                    ? ((x.loaded = !0), Jf(this) && this.A.resolve(), R)
                    : (this.h.delete(R), void this.l(new re(2, 6, 6013))));
            }.bind(m),
            function (z) {
              this.i ||
                (this.h.delete(R), this.l(new re(2, 6, 6005, z.message)));
            }.bind(m)
          )
        );
      }
      function JR(m, _) {
        if (ud(_).startsWith("com.apple.fps")) {
          var R = _.serverCertificate;
          m = ka(m, Ni(m), R);
        }
        return m;
      }
      function K0(m, _) {
        var R = _.target;
        B.K(
          "Sending license request for session",
          R.sessionId,
          "of type",
          _.messageType
        );
        var M = m.h.get(R),
          x = m.g.licenseServerUri,
          z = m.j.advanced[m.g.keySystem];
        _.messageType == "individualization-request" &&
          z &&
          z.individualizationServer &&
          (x = z.individualizationServer),
          ((x = ut([x], m.j.retryParameters)).body = _.message),
          (x.method = "POST"),
          (x.licenseRequestType = _.messageType),
          (x.sessionId = R.sessionId),
          (m.g.keySystem != "com.microsoft.playready" &&
            m.g.keySystem != "com.chromecast.playready") ||
            (function (te) {
              var pe = Yt(te.body, !0, !0);
              if (pe.includes("PlayReadyKeyMessage")) {
                B.debug("Unwrapping PlayReady request.");
                for (
                  var xe = (pe = new DOMParser().parseFromString(
                      pe,
                      "application/xml"
                    )).getElementsByTagName("HttpHeader"),
                    Be = 0;
                  Be < xe.length;
                  ++Be
                )
                  te.headers[
                    xe[Be].getElementsByTagName("name")[0].textContent
                  ] = xe[Be].getElementsByTagName("value")[0].textContent;
                te.body = Ht.Ja(
                  pe.getElementsByTagName("Challenge")[0].textContent
                ).buffer;
              } else
                B.debug("PlayReady request is already unwrapped."),
                  (te.headers["Content-Type"] = "text/xml; charset=utf-8");
            })(x),
          m.g.keySystem.startsWith("com.apple.fps") &&
            m.j.fairPlayTransform &&
            (function (te) {
              var pe = new Uint8Array(te.body);
              (pe = "spc=" + Ht.Mc(pe)),
                (te.headers["Content-Type"] =
                  "application/x-www-form-urlencoded"),
                (te.body = Sn(pe));
            })(x);
        var J = Date.now();
        m.J.Ib.request(2, x)
          .promise.then(
            function (te) {
              return this.i
                ? Promise.reject()
                : (this.g.keySystem.startsWith("com.apple.fps") &&
                    this.j.fairPlayTransform &&
                    (function (pe) {
                      try {
                        var xe = un(pe.data);
                      } catch {
                        return;
                      }
                      (xe = xe.trim()),
                        xe.substr(0, 5) === "<ckc>" &&
                          xe.substr(-6) === "</ckc>" &&
                          (xe = xe.slice(5, -6));
                      try {
                        xe = JSON.parse(xe).ckc;
                      } catch {}
                      pe.data = Ht.Ja(xe).buffer;
                    })(te),
                  (this.P += (Date.now() - J) / 1e3),
                  B.K("Updating session", R.sessionId),
                  R.update(te.data).then(
                    function () {
                      var pe = this;
                      this.J.onEvent(new Je("drmsessionupdate")),
                        M &&
                          (M.Ga && M.Ga.resolve(),
                          new Ut(function () {
                            (M.loaded = !0), Jf(pe) && pe.A.resolve();
                          }).V(QE));
                    }.bind(this)
                  ));
            }.bind(m),
            function (te) {
              this.i ||
                ((te = new re(2, 6, 6007, te)),
                this.l(te),
                M && M.Ga && M.Ga.reject(te));
            }.bind(m)
          )
          .catch(
            function (te) {
              this.i ||
                ((te = new re(2, 6, 6008, te.message)),
                this.l(te),
                M && M.Ga && M.Ga.reject(te));
            }.bind(m)
          );
      }
      function $d() {
        var m = [
            { contentType: 'video/mp4; codecs="avc1.42E01E"' },
            { contentType: 'video/webm; codecs="vp8"' },
          ],
          _ = [
            {
              videoCapabilities: m,
              persistentState: "required",
              sessionTypes: ["persistent-license"],
            },
            { videoCapabilities: m },
          ],
          R = new Map();
        return (
          (m =
            "org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime"
              .split(" ")
              .map(function (M) {
                return (
                  (x = M),
                  k(function z() {
                    var J, te, pe;
                    return $t(z, function (xe) {
                      switch (xe.s) {
                        case 1:
                          return (
                            L(xe, 2),
                            E(
                              xe,
                              navigator.requestMediaKeySystemAccess(x, _),
                              4
                            )
                          );
                        case 4:
                          return (
                            (J = xe.B),
                            (pe =
                              !!(te = J.getConfiguration().sessionTypes) &&
                              te.includes("persistent-license")),
                            Ws("Tizen 3") && (pe = !1),
                            R.set(x, { persistentState: pe }),
                            E(xe, J.createMediaKeys(), 5)
                          );
                        case 5:
                          F(xe, 0);
                          break;
                        case 2:
                          oe(xe), R.set(x, null), S(xe);
                      }
                    });
                  })
                );
                var x;
              })),
          Promise.all(m).then(function () {
            return ma(R);
          })
        );
      }
      function Z0(m, _) {
        var R = _.audio,
          M = _.video;
        if (
          (R && R.encrypted && !ec(m, (R = ol(R)))) ||
          (M && M.encrypted && !ec(m, (M = ol(M))))
        )
          return !1;
        var x = ud(m.g);
        return (
          _.drmInfos.length == 0 ||
          _.drmInfos.some(function (z) {
            return z.keySystem == x;
          })
        );
      }
      function Lv(m, _) {
        if (!m.length) return _;
        if (!_.length) return m;
        for (var R = [], M = 0; M < m.length; M++)
          for (var x = 0; x < _.length; x++)
            if (m[M].keySystem == _[x].keySystem) {
              var z = m[M];
              x = _[x];
              var J = [];
              J = (J = J.concat(z.initData || [])).concat(x.initData || []);
              var te = [];
              (te = (te = te.concat(z.keyIds)).concat(x.keyIds)),
                R.push({
                  keySystem: z.keySystem,
                  licenseServerUri: z.licenseServerUri || x.licenseServerUri,
                  distinctiveIdentifierRequired:
                    z.distinctiveIdentifierRequired ||
                    x.distinctiveIdentifierRequired,
                  persistentStateRequired:
                    z.persistentStateRequired || x.persistentStateRequired,
                  videoRobustness: z.videoRobustness || x.videoRobustness,
                  audioRobustness: z.audioRobustness || x.audioRobustness,
                  serverCertificate: z.serverCertificate || x.serverCertificate,
                  initData: J,
                  keyIds: te,
                });
              break;
            }
        return R;
      }
      function Ob(m) {
        return k(function _() {
          var R;
          return $t(_, function (M) {
            if (M.s === 1)
              return (
                (R = Array.from(m.h.keys())),
                m.h.clear(),
                E(
                  M,
                  Promise.all(
                    R.map(function (x) {
                      return k(function z() {
                        return $t(z, function (J) {
                          switch (J.s) {
                            case 1:
                              return (
                                B.K("Closing session", x.sessionId),
                                L(J, 2),
                                E(
                                  J,
                                  (function (te) {
                                    return k(function pe() {
                                      var xe;
                                      return $t(pe, function (Be) {
                                        switch (Be.s) {
                                          case 1:
                                            return (
                                              (xe = new Promise(function (
                                                bt,
                                                dt
                                              ) {
                                                new Ut(dt).V(Y0);
                                              })),
                                              L(Be, 2),
                                              E(
                                                Be,
                                                Promise.race([
                                                  Promise.all([
                                                    te.close(),
                                                    te.closed,
                                                  ]),
                                                  xe,
                                                ]),
                                                4
                                              )
                                            );
                                          case 4:
                                            F(Be, 0);
                                            break;
                                          case 2:
                                            oe(Be),
                                              B.v(
                                                "Timeout waiting for session close"
                                              ),
                                              S(Be);
                                        }
                                      });
                                    });
                                  })(x),
                                  4
                                )
                              );
                            case 4:
                              F(J, 0);
                              break;
                            case 2:
                              oe(J), S(J);
                          }
                        });
                      });
                    })
                  ),
                  0
                )
              );
          });
        });
      }
      function Jf(m) {
        return Wr((m = m.h.values()), function (_) {
          return _.loaded;
        });
      }
      function Gb(m, _, R) {
        !m.keySystem ||
          (m.keySystem == "org.w3.clearkey" && m.licenseServerUri) ||
          (_.size && ((_ = _.get(m.keySystem) || ""), (m.licenseServerUri = _)),
          m.keyIds || (m.keyIds = []),
          (R = R.get(m.keySystem)) &&
            (m.distinctiveIdentifierRequired ||
              (m.distinctiveIdentifierRequired =
                R.distinctiveIdentifierRequired),
            m.persistentStateRequired ||
              (m.persistentStateRequired = R.persistentStateRequired),
            m.videoRobustness || (m.videoRobustness = R.videoRobustness),
            m.audioRobustness || (m.audioRobustness = R.audioRobustness),
            m.serverCertificate || (m.serverCertificate = R.serverCertificate)),
          i.cast &&
            i.cast.__platform__ &&
            m.keySystem == "com.microsoft.playready" &&
            (m.keySystem = "com.chromecast.playready"));
      }
      ((u = rs.prototype).destroy = function () {
        var m = this;
        return k(function _() {
          return $t(_, function (R) {
            switch (R.s) {
              case 1:
                return m.i
                  ? E(R, m.ua, 0)
                  : ((m.i = !0),
                    E(
                      R,
                      (function (M) {
                        return k(function x() {
                          return $t(x, function (z) {
                            switch (z.s) {
                              case 1:
                                return (
                                  M.u.release(),
                                  (M.u = null),
                                  M.A.reject(),
                                  M.ea.stop(),
                                  (M.ea = null),
                                  M.X.stop(),
                                  (M.X = null),
                                  E(z, Ob(M), 2)
                                );
                              case 2:
                                if (!M.m) {
                                  z.I(3);
                                  break;
                                }
                                return L(z, 4), E(z, M.m.setMediaKeys(null), 6);
                              case 6:
                                F(z, 5);
                                break;
                              case 4:
                                oe(z);
                              case 5:
                                M.m = null;
                              case 3:
                                (M.g = null),
                                  M.C.clear(),
                                  (M.o = null),
                                  (M.F = []),
                                  (M.j = null),
                                  (M.l = null),
                                  (M.J = null),
                                  S(z);
                            }
                          });
                        });
                      })(m),
                      4
                    ));
              case 4:
                m.ua.resolve(), R.I(0);
            }
          });
        });
      }),
        (u.configure = function (m) {
          this.j = m;
        }),
        (u.Ub = function (m) {
          var _ = this;
          if (!this.o)
            return (
              this.u.ya(m, "encrypted", function () {
                _.l(new re(2, 6, 6010));
              }),
              Promise.resolve()
            );
          (this.m = m),
            this.u.ya(this.m, "play", function () {
              for (var M = 0; M < _.M.length; M++) K0(_, _.M[M]);
              (_.va = !0), (_.M = []);
            }),
            "webkitCurrentPlaybackTargetIsWireless" in this.m &&
              this.u.H(
                this.m,
                "webkitcurrentplaybacktargetiswirelesschanged",
                function () {
                  return Ob(_);
                }
              ),
            (m = (m = this.m.setMediaKeys(this.o)).catch(function (M) {
              return Promise.reject(new re(2, 6, 6003, M.message));
            }));
          var R = $m(this);
          return Promise.all([m, R])
            .then(function () {
              if (_.i) return Promise.reject();
              No(_),
                _.g.initData.length ||
                  _.F.length ||
                  _.u.H(_.m, "encrypted", function (M) {
                    return Ks(_, M.initDataType, new Uint8Array(M.initData));
                  });
            })
            .catch(function (M) {
              if (!_.i) return Promise.reject(M);
            });
        }),
        (u.Xb = function () {
          for (
            var m = 1 / 0, _ = this.h.keys(), R = (_ = b(_)).next();
            !R.done;
            R = _.next()
          )
            (R = R.value),
              isNaN(R.expiration) || (m = Math.min(m, R.expiration));
          return m;
        }),
        (u.ye = function (m) {
          this.m &&
          this.j.delayLicenseRequestUntilPlayed &&
          this.m.paused &&
          !this.va
            ? this.M.push(m)
            : K0(this, m);
        }),
        (u.we = function (m) {
          (m = m.target), B.O("Key status changed for session", m.sessionId);
          var _ = this.h.get(m),
            R = !1;
          m.keyStatuses.forEach(
            function (x, z) {
              if (typeof z == "string") {
                var J = z;
                (z = x), (x = J);
              }
              if (
                this.g.keySystem == "com.microsoft.playready" &&
                z.byteLength == 16 &&
                (Ws("Trident/") || navigator.userAgent.match(/Edge?\//))
              ) {
                var te = (J = new DataView(z)).getUint32(0, !0),
                  pe = J.getUint16(4, !0),
                  xe = J.getUint16(6, !0);
                J.setUint32(0, te, !1),
                  J.setUint16(4, pe, !1),
                  J.setUint16(6, xe, !1);
              }
              this.g.keySystem == "com.microsoft.playready" &&
                x == "status-pending" &&
                (x = "usable"),
                x != "status-pending" && (_.loaded = !0),
                x == "expired" && (R = !0),
                (J = Ht.Nc(new Uint8Array(z))),
                this.wa.set(J, x);
            }.bind(this)
          );
          var M = m.expiration - Date.now();
          (0 > M || (R && 1e3 > M)) &&
            _ &&
            !_.Ga &&
            (B.debug("Session has expired", m.sessionId),
            this.h.delete(m),
            m.close().catch(function () {})),
            Jf(this) && (this.A.resolve(), this.X.V(Ov));
        });
      var Y0 = 1,
        QE = 5,
        Ov = 0.5;
      function Vo() {
        (this.g = new muxjs.mp4.CaptionParser()), (this.l = []), (this.j = {});
      }
      function cd() {}
      function Ql(m) {
        return !m || (m.length == 1 && 1e-6 > m.end(0) - m.start(0))
          ? null
          : m.length
          ? m.end(m.length - 1)
          : null;
      }
      function qf(m, _, R) {
        return (
          (R = R === void 0 ? 0 : R),
          !(
            !m ||
            !m.length ||
            (m.length == 1 && 1e-6 > m.end(0) - m.start(0)) ||
            _ > m.end(m.length - 1)
          ) && _ + R >= m.start(0)
        );
      }
      function Nb(m, _) {
        if (!m || !m.length || (m.length == 1 && 1e-6 > m.end(0) - m.start(0)))
          return 0;
        for (var R = 0, M = m.length - 1; 0 <= M && m.end(M) > _; --M)
          R += m.end(M) - Math.max(m.start(M), _);
        return R;
      }
      function xm(m) {
        if (!m) return [];
        for (var _ = [], R = 0; R < m.length; R++)
          _.push({ start: m.start(R), end: m.end(R) });
        return _;
      }
      function Cl(m, _, R) {
        (this.startTime = m),
          (this.direction = Q0),
          (this.endTime = _),
          (this.payload = R),
          (this.region = new cg()),
          (this.position = null),
          (this.positionAlign = gu),
          (this.size = 0),
          (this.textAlign = Gv),
          (this.writingMode = JE),
          (this.lineInterpretation = ep),
          (this.line = null),
          (this.lineHeight = ""),
          (this.lineAlign = Lm),
          (this.displayAlign = Nv),
          (this.fontSize =
            this.backgroundImage =
            this.backgroundColor =
            this.color =
              ""),
          (this.fontWeight = tp),
          (this.fontStyle = Bb),
          (this.fontFamily = ""),
          (this.textDecoration = []),
          (this.wrapLine = !0),
          (this.id = ""),
          (this.nestedCues = []),
          (this.spacer = !1);
      }
      (Vo.prototype.init = function (m) {
        var _ = muxjs.mp4.probe;
        (m = new Uint8Array(m)),
          (this.l = _.videoTrackIds(m)),
          (this.j = _.timescale(m)),
          this.g.init();
      }),
        (Vo.prototype.h = function (m, _) {
          var R = new Uint8Array(m);
          (R = this.g.parse(R, this.l, this.j)) && R.captions && _(R.captions),
            this.g.clearParsedCaptions();
        }),
        (Vo.prototype.i = function () {
          this.g.resetCaptionStream();
        }),
        (cd.prototype.init = function () {}),
        (cd.prototype.h = function () {}),
        (cd.prototype.i = function () {}),
        Z("shaka.text.Cue", Cl),
        (Cl.prototype.clone = function () {
          var m,
            _ = new Cl(0, 0, "");
          for (m in this)
            (_[m] = this[m]),
              _[m] && _[m].constructor == Array && (_[m] = _[m].slice());
          return _;
        });
      var gu = "auto";
      Cl.positionAlign = {
        LEFT: "line-left",
        RIGHT: "line-right",
        CENTER: "center",
        AUTO: gu,
      };
      var Gv = "center",
        hh = {
          LEFT: "left",
          RIGHT: "right",
          CENTER: Gv,
          START: "start",
          END: "end",
        };
      Cl.textAlign = hh;
      var Nv = "after",
        Fb = { BEFORE: "before", CENTER: "center", AFTER: Nv };
      Cl.displayAlign = Fb;
      var Q0 = "ltr";
      Cl.direction = {
        HORIZONTAL_LEFT_TO_RIGHT: Q0,
        HORIZONTAL_RIGHT_TO_LEFT: "rtl",
      };
      var JE = "horizontal-tb";
      Cl.writingMode = {
        HORIZONTAL_TOP_TO_BOTTOM: JE,
        VERTICAL_LEFT_TO_RIGHT: "vertical-lr",
        VERTICAL_RIGHT_TO_LEFT: "vertical-rl",
      };
      var ep = 0;
      Cl.lineInterpretation = { LINE_NUMBER: ep, PERCENTAGE: 1 };
      var Lm = "start",
        Ub = { CENTER: "center", START: Lm, END: "end" };
      Cl.lineAlign = Ub;
      var tp = 400;
      Cl.fontWeight = { NORMAL: tp, BOLD: 700 };
      var Bb = "normal",
        Hb = { NORMAL: Bb, ITALIC: "italic", OBLIQUE: "oblique" };
      function cg() {
        (this.id = ""),
          (this.regionAnchorY =
            this.regionAnchorX =
            this.viewportAnchorY =
            this.viewportAnchorX =
              0),
          (this.height = this.width = 100),
          (this.viewportAnchorUnits = this.widthUnits = this.heightUnits = J0),
          (this.scroll = xd);
      }
      (Cl.fontStyle = Hb),
        (Cl.textDecoration = {
          UNDERLINE: "underline",
          LINE_THROUGH: "lineThrough",
          OVERLINE: "overline",
        }),
        Z("shaka.text.CueRegion", cg);
      var J0 = 1;
      cg.units = { PX: 0, PERCENTAGE: J0, LINES: 2 };
      var xd = "";
      function dg(m) {
        (this.l = null),
          (this.i = m),
          (this.j = this.A = 0),
          (this.m = 1 / 0),
          (this.h = this.g = null),
          (this.u = ""),
          (this.o = new Map());
      }
      cg.scrollMode = { NONE: xd, UP: "up" };
      var Nc = {};
      function hg(m) {
        return !!(Nc[m] || (i.muxjs && m == "application/cea-608"));
      }
      function Xb(m, _) {
        _ != "application/cea-608" && (m.l = new Nc[_]());
      }
      function qE(m, _, R, M, x) {
        for (
          var z = R + " " + M, J = new Map(), te = (_ = b(_)).next();
          !te.done;
          te = _.next()
        ) {
          var pe = te.value;
          (te = pe.stream),
            J.has(te) || J.set(te, new Map()),
            J.get(te).has(z) || J.get(te).set(z, []),
            (pe.startTime += x),
            (pe.endTime += x),
            pe.startTime >= m.j &&
              pe.startTime < m.m &&
              ((pe = new Cl(pe.startTime, pe.endTime, pe.text)),
              J.get(te).get(z).push(pe),
              te == m.u && m.i.append([pe]));
        }
        for (z = (x = b(J.keys())).next(); !z.done; z = x.next())
          for (
            z = z.value,
              m.o.has(z) || m.o.set(z, new Map()),
              te = (_ = b(J.get(z).keys())).next();
            !te.done;
            te = _.next()
          )
            (te = te.value), (pe = J.get(z).get(te)), m.o.get(z).set(te, pe);
        (m.g =
          m.g == null ? Math.max(R, m.j) : Math.min(m.g, Math.max(R, m.j))),
          (m.h = Math.max(m.h, Math.min(M, m.m)));
      }
      function Vb(m, _, R) {
        (this.j = m),
          (this.l = R),
          (this.h = {}),
          (this.g = null),
          (this.i = {}),
          (this.o = new Yr()),
          (this.F = !1),
          (this.u = {}),
          (this.A = _),
          (this.C = new Ft()),
          (this.m = (function (M, x) {
            var z = new MediaSource();
            return (
              M.o.ya(z, "sourceopen", function () {
                URL.revokeObjectURL(M.J), x.resolve();
              }),
              (M.J = e2(z)),
              (M.j.src = M.J),
              z
            );
          })(this, this.C)),
          (this.J = "");
      }
      Z("shaka.text.TextEngine.registerParser", function (m, _) {
        Nc[m] = _;
      }),
        Z("shaka.text.TextEngine.unregisterParser", function (m) {
          delete Nc[m];
        }),
        (dg.prototype.destroy = function () {
          return (this.i = this.l = null), this.o.clear(), Promise.resolve();
        }),
        (dg.prototype.xc = function (m) {
          try {
            return this.l.parseMedia(new Uint8Array(m), {
              periodStart: 0,
              segmentStart: null,
              segmentEnd: 0,
            })[0].startTime;
          } catch (_) {
            throw new re(2, 2, 2009, _);
          }
        }),
        (dg.prototype.remove = function (m, _) {
          return Promise.resolve().then(
            function () {
              !this.i ||
                !this.i.remove(m, _) ||
                this.g == null ||
                _ <= this.g ||
                m >= this.h ||
                (m <= this.g && _ >= this.h
                  ? (this.g = this.h = null)
                  : m <= this.g && _ < this.h
                  ? (this.g = _)
                  : m > this.g && _ >= this.h && (this.h = m));
            }.bind(this)
          );
        });
      var e2 = i.URL.createObjectURL;
      function q0(m) {
        var _ = Aa(m.mimeType, m.codecs),
          R = (function (M) {
            var x = [M.mimeType];
            return (
              Ro.forEach(function (z, J) {
                var te = M[J];
                te && x.push(z + '="' + te + '"');
              }),
              x.join(";")
            );
          })(m);
        return hg(_) || MediaSource.isTypeSupported(R) || T(_, m.type);
      }
      function Wh(m, _) {
        m.g || (m.g = new dg(m.l)), Xb(m.g, _);
      }
      function t2(m) {
        return !m.m || m.m.readyState == "ended";
      }
      function Fc(m, _) {
        if (_ == "text") var R = m.g.g;
        else
          R =
            !(R = fg(m, _)) || (R.length == 1 && 1e-6 > R.end(0) - R.start(0))
              ? null
              : R.length == 1 && 0 > R.start(0)
              ? 0
              : R.length
              ? R.start(0)
              : null;
        return R;
      }
      function zb(m, _) {
        return _ == "text" ? m.g.h : Ql(fg(m, _));
      }
      function fg(m, _) {
        try {
          return m.h[_].buffered;
        } catch (R) {
          return (
            _ in m.h && B.error("failed to get buffered range for " + _, R),
            null
          );
        }
      }
      function n2(m, _, R, M, x, z) {
        return _ == "text"
          ? (function (J, te, pe, xe) {
              return Promise.resolve().then(
                function () {
                  if (this.l && this.i)
                    if (pe == null || xe == null)
                      this.l.parseInit(new Uint8Array(te));
                    else {
                      var Be = {
                        periodStart: this.A,
                        segmentStart: pe,
                        segmentEnd: xe,
                      };
                      (Be = this.l.parseMedia(new Uint8Array(te), Be).filter(
                        function (bt) {
                          return (
                            bt.startTime >= this.j && bt.startTime < this.m
                          );
                        }.bind(this)
                      )),
                        this.i.append(Be),
                        this.g == null && (this.g = Math.max(pe, this.j)),
                        (this.h = Math.min(xe, this.m));
                    }
                }.bind(J)
              );
            })(m.g, R, M, x)
          : m.u[_]
          ? (function (J, te) {
              (J.j = !0), (J.h = new Ft()), (J.l = []), (J.i = []);
              var pe = new Uint8Array(te);
              return (
                J.g.push(pe),
                J.g.flush(),
                J.j && J.h.reject(new re(2, 3, 3018)),
                J.h
              );
            })(m.u[_], R).then(
              function (J) {
                return (
                  this.g || Wh(this, "text/vtt"),
                  J.captions &&
                    J.captions.length &&
                    qE(this.g, J.captions, M, x, this.h.video.timestampOffset),
                  Kh(this, _, this.Me.bind(this, _, J.data.buffer))
                );
              }.bind(m)
            )
          : (z &&
              i.muxjs &&
              (m.g || Wh(m, "text/vtt"),
              M == null && x == null
                ? m.A.init(R)
                : m.A.h(R, function (J) {
                    J.length && qE(m.g, J, M, x, m.h.video.timestampOffset);
                  })),
            Kh(m, _, m.Me.bind(m, _, R)));
      }
      function Fv(m, _) {
        var R = zb(m, "video") || 0;
        (function (M, x, z) {
          if (((M.u = x), (x = M.o.get(x))))
            for (var J = b(x.keys()), te = J.next(); !te.done; te = J.next())
              (te = x.get(te.value).filter(function (pe) {
                return pe.endTime <= z;
              })) && M.i.append(te);
        })(m.g, _, R);
      }
      function r2(m, _) {
        return _ == "text"
          ? m.g
            ? (m.A.i(), m.g.remove(0, 1 / 0))
            : Promise.resolve()
          : Kh(m, _, m.Ne.bind(m, _, 0, m.m.duration));
      }
      function Kh(m, _, R) {
        if (m.F) return Promise.reject();
        if (
          ((R = { start: R, p: new Ft() }), m.i[_].push(R), m.i[_].length == 1)
        )
          try {
            R.start();
          } catch (M) {
            M.name == "QuotaExceededError"
              ? R.p.reject(new re(2, 3, 3017, _))
              : R.p.reject(new re(2, 3, 3015, M)),
              fh(m, _);
          }
        return R.p;
      }
      function i2(m, _) {
        if (m.F) return Promise.reject();
        var R,
          M = [];
        for (R in m.h) {
          var x = new Ft(),
            z = {
              start: function (J) {
                J.resolve();
              }.bind(null, x),
              p: x,
            };
          m.i[R].push(z), M.push(x), m.i[R].length == 1 && z.start();
        }
        return Promise.all(M).then(
          function () {
            try {
              _();
            } catch (pe) {
              var J = Promise.reject(new re(2, 3, 3015, pe));
            }
            for (var te in this.h) fh(this, te);
            return J;
          }.bind(m),
          function (J) {
            throw J;
          }.bind(m)
        );
      }
      function fh(m, _) {
        m.i[_].shift();
        var R = m.i[_][0];
        if (R)
          try {
            R.start();
          } catch (M) {
            R.p.reject(new re(2, 3, 3015, M)), fh(m, _);
          }
      }
      function Uv(m, _) {
        return (m = Ia(m)), (_ = Ia(_)), m.split("-")[0] == _.split("-")[0];
      }
      function gs(m, _) {
        (m = Ia(m)), (_ = Ia(_));
        var R = m.split("-"),
          M = _.split("-");
        return R[0] == M[0] && R.length == 1 && M.length == 2;
      }
      function Ia(m) {
        var _ = m.split("-");
        return (
          (m = _[0] || ""),
          (_ = _[1] || ""),
          (m = m.toLowerCase()),
          (m = Wb.get(m) || m),
          (_ = _.toUpperCase()) ? m + "-" + _ : m
        );
      }
      function jb(m) {
        return m.language
          ? Ia(m.language)
          : m.audio && m.audio.language
          ? Ia(m.audio.language)
          : m.video && m.video.language
          ? Ia(m.video.language)
          : "und";
      }
      function Bv(m, _) {
        for (
          var R = Ia(m), M = new Set(), x = b(_), z = x.next();
          !z.done;
          z = x.next()
        )
          M.add(Ia(z.value));
        for (z = (x = b(M)).next(); !z.done; z = x.next())
          if ((z = z.value) == R) return z;
        for (z = (x = b(M)).next(); !z.done; z = x.next())
          if (gs((z = z.value), R)) return z;
        for (z = (x = b(M)).next(); !z.done; z = x.next()) {
          var J = (z = z.value),
            te = R;
          if (
            ((J = Ia(J)),
            (te = Ia(te)),
            (J = J.split("-")),
            (te = te.split("-")),
            J.length == 2 && te.length == 2 && J[0] == te[0])
          )
            return z;
        }
        for (z = (M = b(M)).next(); !z.done; z = M.next())
          if (gs(R, (x = z.value))) return x;
        return null;
      }
      ((u = Vb.prototype).destroy = function () {
        var m = this;
        this.F = !0;
        var _,
          R = [];
        for (_ in this.i) {
          var M = this.i[_],
            x = M[0];
          for (
            this.i[_] = M.slice(0, 1), x && R.push(x.p.catch(rn.Bc)), x = 1;
            x < M.length;
            ++x
          )
            M[x].p.reject();
        }
        for (var z in (this.g && R.push(this.g.destroy()),
        this.l && R.push(this.l.destroy()),
        this.u))
          R.push(this.u[z].destroy());
        return Promise.all(R).then(function () {
          m.o && (m.o.release(), (m.o = null)),
            m.j && (m.j.removeAttribute("src"), m.j.load(), (m.j = null)),
            (m.m = null),
            (m.g = null),
            (m.l = null),
            (m.h = {}),
            (m.u = {}),
            (m.A = null),
            (m.i = {});
        });
      }),
        (u.init = function (m, _) {
          var R = this;
          return k(function M() {
            var x;
            return $t(M, function (z) {
              switch (z.s) {
                case 1:
                  return (x = Mt), E(z, R.C, 2);
                case 2:
                  m.forEach(function (J, te) {
                    var pe = Aa(J.mimeType, J.codecs);
                    te == x.za
                      ? Wh(R, pe)
                      : ((!_ && MediaSource.isTypeSupported(pe)) ||
                          !T(pe, te) ||
                          ((R.u[te] = new yr()), (pe = Jn(te, pe))),
                        (pe = R.m.addSourceBuffer(pe)),
                        R.o.H(pe, "error", R.Dg.bind(R, te)),
                        R.o.H(pe, "updateend", R.Lb.bind(R, te)),
                        (R.h[te] = pe),
                        (R.i[te] = []));
                  }),
                    S(z);
              }
            });
          });
        }),
        (u.bd = function (m) {
          if (
            ((m.total = xm(this.j.buffered)),
            (m.audio = xm(fg(this, "audio"))),
            (m.video = xm(fg(this, "video"))),
            (m.text = []),
            this.g)
          ) {
            var _ = this.g.g,
              R = this.g.h;
            _ != null && R != null && m.text.push({ start: _, end: R });
          }
        }),
        (u.remove = function (m, _, R) {
          return m == "text"
            ? this.g.remove(_, R)
            : Kh(this, m, this.Ne.bind(this, m, _, R));
        }),
        (u.flush = function (m) {
          return m == "text"
            ? Promise.resolve()
            : Kh(this, m, this.lf.bind(this, m));
        }),
        (u.endOfStream = function (m) {
          return i2(
            this,
            function () {
              t2(this) || (m ? this.m.endOfStream(m) : this.m.endOfStream());
            }.bind(this)
          );
        }),
        (u.Fa = function (m) {
          return i2(
            this,
            function () {
              this.m.duration = m;
            }.bind(this)
          );
        }),
        (u.ha = function () {
          return this.m.duration;
        }),
        (u.Me = function (m, _) {
          this.h[m].appendBuffer(_);
        }),
        (u.Ne = function (m, _, R) {
          R <= _ ? this.Lb(m) : this.h[m].remove(_, R);
        }),
        (u.Ve = function (m) {
          var _ = this.h[m].appendWindowStart,
            R = this.h[m].appendWindowEnd;
          this.h[m].abort(),
            (this.h[m].appendWindowStart = _),
            (this.h[m].appendWindowEnd = R),
            this.Lb(m);
        }),
        (u.lf = function (m) {
          (this.j.currentTime -= 0.001), this.Lb(m);
        }),
        (u.Cg = function (m, _) {
          0 > _ && (_ += 0.001), (this.h[m].timestampOffset = _), this.Lb(m);
        }),
        (u.zg = function (m, _, R) {
          (this.h[m].appendWindowStart = 0),
            (this.h[m].appendWindowEnd = R),
            (this.h[m].appendWindowStart = _),
            this.Lb(m);
        }),
        (u.Dg = function (m) {
          this.i[m][0].p.reject(
            new re(2, 3, 3014, this.j.error ? this.j.error.code : 0)
          );
        }),
        (u.Lb = function (m) {
          var _ = this.i[m][0];
          _ && (_.p.resolve(), fh(this, m));
        });
      var Wb = new Map([
          ["aar", "aa"],
          ["abk", "ab"],
          ["afr", "af"],
          ["aka", "ak"],
          ["alb", "sq"],
          ["amh", "am"],
          ["ara", "ar"],
          ["arg", "an"],
          ["arm", "hy"],
          ["asm", "as"],
          ["ava", "av"],
          ["ave", "ae"],
          ["aym", "ay"],
          ["aze", "az"],
          ["bak", "ba"],
          ["bam", "bm"],
          ["baq", "eu"],
          ["bel", "be"],
          ["ben", "bn"],
          ["bih", "bh"],
          ["bis", "bi"],
          ["bod", "bo"],
          ["bos", "bs"],
          ["bre", "br"],
          ["bul", "bg"],
          ["bur", "my"],
          ["cat", "ca"],
          ["ces", "cs"],
          ["cha", "ch"],
          ["che", "ce"],
          ["chi", "zh"],
          ["chu", "cu"],
          ["chv", "cv"],
          ["cor", "kw"],
          ["cos", "co"],
          ["cre", "cr"],
          ["cym", "cy"],
          ["cze", "cs"],
          ["dan", "da"],
          ["deu", "de"],
          ["div", "dv"],
          ["dut", "nl"],
          ["dzo", "dz"],
          ["ell", "el"],
          ["eng", "en"],
          ["epo", "eo"],
          ["est", "et"],
          ["eus", "eu"],
          ["ewe", "ee"],
          ["fao", "fo"],
          ["fas", "fa"],
          ["fij", "fj"],
          ["fin", "fi"],
          ["fra", "fr"],
          ["fre", "fr"],
          ["fry", "fy"],
          ["ful", "ff"],
          ["geo", "ka"],
          ["ger", "de"],
          ["gla", "gd"],
          ["gle", "ga"],
          ["glg", "gl"],
          ["glv", "gv"],
          ["gre", "el"],
          ["grn", "gn"],
          ["guj", "gu"],
          ["hat", "ht"],
          ["hau", "ha"],
          ["heb", "he"],
          ["her", "hz"],
          ["hin", "hi"],
          ["hmo", "ho"],
          ["hrv", "hr"],
          ["hun", "hu"],
          ["hye", "hy"],
          ["ibo", "ig"],
          ["ice", "is"],
          ["ido", "io"],
          ["iii", "ii"],
          ["iku", "iu"],
          ["ile", "ie"],
          ["ina", "ia"],
          ["ind", "id"],
          ["ipk", "ik"],
          ["isl", "is"],
          ["ita", "it"],
          ["jav", "jv"],
          ["jpn", "ja"],
          ["kal", "kl"],
          ["kan", "kn"],
          ["kas", "ks"],
          ["kat", "ka"],
          ["kau", "kr"],
          ["kaz", "kk"],
          ["khm", "km"],
          ["kik", "ki"],
          ["kin", "rw"],
          ["kir", "ky"],
          ["kom", "kv"],
          ["kon", "kg"],
          ["kor", "ko"],
          ["kua", "kj"],
          ["kur", "ku"],
          ["lao", "lo"],
          ["lat", "la"],
          ["lav", "lv"],
          ["lim", "li"],
          ["lin", "ln"],
          ["lit", "lt"],
          ["ltz", "lb"],
          ["lub", "lu"],
          ["lug", "lg"],
          ["mac", "mk"],
          ["mah", "mh"],
          ["mal", "ml"],
          ["mao", "mi"],
          ["mar", "mr"],
          ["may", "ms"],
          ["mkd", "mk"],
          ["mlg", "mg"],
          ["mlt", "mt"],
          ["mon", "mn"],
          ["mri", "mi"],
          ["msa", "ms"],
          ["mya", "my"],
          ["nau", "na"],
          ["nav", "nv"],
          ["nbl", "nr"],
          ["nde", "nd"],
          ["ndo", "ng"],
          ["nep", "ne"],
          ["nld", "nl"],
          ["nno", "nn"],
          ["nob", "nb"],
          ["nor", "no"],
          ["nya", "ny"],
          ["oci", "oc"],
          ["oji", "oj"],
          ["ori", "or"],
          ["orm", "om"],
          ["oss", "os"],
          ["pan", "pa"],
          ["per", "fa"],
          ["pli", "pi"],
          ["pol", "pl"],
          ["por", "pt"],
          ["pus", "ps"],
          ["que", "qu"],
          ["roh", "rm"],
          ["ron", "ro"],
          ["rum", "ro"],
          ["run", "rn"],
          ["rus", "ru"],
          ["sag", "sg"],
          ["san", "sa"],
          ["sin", "si"],
          ["slk", "sk"],
          ["slo", "sk"],
          ["slv", "sl"],
          ["sme", "se"],
          ["smo", "sm"],
          ["sna", "sn"],
          ["snd", "sd"],
          ["som", "so"],
          ["sot", "st"],
          ["spa", "es"],
          ["sqi", "sq"],
          ["srd", "sc"],
          ["srp", "sr"],
          ["ssw", "ss"],
          ["sun", "su"],
          ["swa", "sw"],
          ["swe", "sv"],
          ["tah", "ty"],
          ["tam", "ta"],
          ["tat", "tt"],
          ["tel", "te"],
          ["tgk", "tg"],
          ["tgl", "tl"],
          ["tha", "th"],
          ["tib", "bo"],
          ["tir", "ti"],
          ["ton", "to"],
          ["tsn", "tn"],
          ["tso", "ts"],
          ["tuk", "tk"],
          ["tur", "tr"],
          ["twi", "tw"],
          ["uig", "ug"],
          ["ukr", "uk"],
          ["urd", "ur"],
          ["uzb", "uz"],
          ["ven", "ve"],
          ["vie", "vi"],
          ["vol", "vo"],
          ["wel", "cy"],
          ["wln", "wa"],
          ["wol", "wo"],
          ["xho", "xh"],
          ["yid", "yi"],
          ["yor", "yo"],
          ["zha", "za"],
          ["zho", "zh"],
          ["zul", "zu"],
        ]),
        wi = {
          $d: function (m, _) {
            var R = m.periods.reduce(function (z, J) {
              return z.concat(J.variants);
            }, []);
            (R = wi.ee(R, _)), (R = wi.Lf(R)), (R = wi.jf(R));
            for (
              var M = wi.kf(R), x = (R = b(m.periods)).next();
              !x.done;
              x = R.next()
            )
              (x = x.value).variants = x.variants.filter(function (z) {
                return (
                  wi.he(z) == M ||
                  (B.debug("Dropping Variant (better codec available)", z), !1)
                );
              });
          },
          Lf: function (m) {
            for (
              var _ = new sn(), R = (m = b(m)).next();
              !R.done;
              R = m.next()
            ) {
              R = R.value;
              var M = wi.he(R);
              _.push(M, R);
            }
            return _;
          },
          jf: function (m) {
            var _ = 0,
              R = new Map(),
              M = m.size();
            return (
              m.forEach(function (x, z) {
                for (var J = b(z), te = J.next(); !te.done; te = J.next()) {
                  var pe = (te = te.value).video;
                  if (pe && pe.width && pe.height) {
                    (pe = pe.width * pe.height * (pe.frameRate || 1)),
                      R.has(pe) || R.set(pe, new sn());
                    var xe = R.get(pe);
                    xe.push(x, te), xe.size() === M && (_ = Math.max(_, pe));
                  }
                }
              }),
              _ ? R.get(_) : m
            );
          },
          kf: function (m) {
            var _ = "",
              R = 1 / 0;
            return (
              m.forEach(function (M, x) {
                for (
                  var z = 0, J = 0, te = b(x), pe = te.next();
                  !pe.done;
                  pe = te.next()
                )
                  (z += pe.value.bandwidth || 0), ++J;
                (z /= J),
                  B.debug("codecs", M, "avg bandwidth", z),
                  z < R && ((_ = M), (R = z));
              }),
              _
            );
          },
          he: function (m) {
            var _ = "";
            m.video && (_ = Ki(m.video.codecs)[0]);
            var R = "";
            return m.audio && (R = Ki(m.audio.codecs)[0]), _ + "-" + R;
          },
          rd: function (m, _, R) {
            function M(z, J, te) {
              return z >= J && z <= te;
            }
            var x = m.video;
            return !(
              (x &&
                x.width &&
                x.height &&
                (!M(x.width, _.minWidth, Math.min(_.maxWidth, R.width)) ||
                  !M(x.height, _.minHeight, Math.min(_.maxHeight, R.height)) ||
                  !M(x.width * x.height, _.minPixels, _.maxPixels))) ||
              (m &&
                m.video &&
                m.video.frameRate &&
                !M(m.video.frameRate, _.minFrameRate, _.maxFrameRate)) ||
              !M(m.bandwidth, _.minBandwidth, _.maxBandwidth)
            );
          },
          Xd: function (m, _, R) {
            var M = !1;
            return (
              m.forEach(function (x) {
                var z = x.allowedByApplication;
                (x.allowedByApplication = wi.rd(x, _, R)),
                  z != x.allowedByApplication && (M = !0);
              }),
              M
            );
          },
          filterNewPeriod: function (m, _, R, M) {
            (M.variants = M.variants.filter(function (x) {
              if (m && m.Z && !Z0(m, x))
                return (
                  B.debug(
                    "Dropping variant - not compatible with key system",
                    x
                  ),
                  !1
                );
              var z = x.audio;
              return (
                (x = x.video),
                z && !q0(z)
                  ? (B.debug(
                      "Dropping variant - audio not compatible with platform",
                      wi.fb(z)
                    ),
                    !1)
                  : (x && !q0(x)) ||
                    (Ws("Xbox One") &&
                      x &&
                      ((x.width && 1920 < x.width) ||
                        (x.height && 1080 < x.height)) &&
                      x.codecs.includes("avc1."))
                  ? (B.debug(
                      "Dropping variant - video not compatible with platform",
                      wi.fb(x)
                    ),
                    !1)
                  : z && _ && !wi.Yd(z, _)
                  ? (B.debug(
                      "Droping variant - not compatible with active audio",
                      "active audio",
                      wi.fb(_),
                      "variant.audio",
                      wi.fb(z)
                    ),
                    !1)
                  : !(x && R && !wi.Yd(x, R)) ||
                    (B.debug(
                      "Droping variant - not compatible with active video",
                      "active video",
                      wi.fb(R),
                      "variant.video",
                      wi.fb(x)
                    ),
                    !1)
              );
            })),
              (M.textStreams = M.textStreams.filter(function (x) {
                var z = hg(Aa(x.mimeType, x.codecs));
                return (
                  z ||
                    B.debug(
                      "Dropping text stream. Is not supported by the platform.",
                      x
                    ),
                  z
                );
              }));
          },
          Yd: function (m, _) {
            return (
              m.mimeType == _.mimeType &&
              m.codecs.split(".")[0] == _.codecs.split(".")[0]
            );
          },
          Oc: function (m) {
            var _ = m.audio,
              R = m.video,
              M = _ ? _.codecs : null,
              x = R ? R.codecs : null,
              z = [];
            x && z.push(x), M && z.push(M);
            var J = [];
            R && J.push(R.mimeType),
              _ && J.push(_.mimeType),
              (J = J[0] || null);
            var te = [];
            _ && te.push(_.kind), R && te.push(R.kind), (te = te[0] || null);
            var pe = new Set();
            return (
              _ &&
                _.roles.forEach(function (xe) {
                  return pe.add(xe);
                }),
              R &&
                R.roles.forEach(function (xe) {
                  return pe.add(xe);
                }),
              (m = {
                id: m.id,
                active: !1,
                type: "variant",
                bandwidth: m.bandwidth,
                language: m.language,
                label: null,
                kind: te,
                width: null,
                height: null,
                frameRate: null,
                pixelAspectRatio: null,
                mimeType: J,
                codecs: z.join(", "),
                audioCodec: M,
                videoCodec: x,
                primary: m.primary,
                roles: Array.from(pe),
                audioRoles: null,
                videoId: null,
                audioId: null,
                channelsCount: null,
                audioSamplingRate: null,
                audioBandwidth: null,
                videoBandwidth: null,
                originalVideoId: null,
                originalAudioId: null,
                originalTextId: null,
              }),
              R &&
                ((m.videoId = R.id),
                (m.originalVideoId = R.originalId),
                (m.width = R.width || null),
                (m.height = R.height || null),
                (m.frameRate = R.frameRate || null),
                (m.pixelAspectRatio = R.pixelAspectRatio || null),
                (m.videoBandwidth = R.bandwidth || null)),
              _ &&
                ((m.audioId = _.id),
                (m.originalAudioId = _.originalId),
                (m.channelsCount = _.channelsCount),
                (m.audioSamplingRate = _.audioSamplingRate),
                (m.audioBandwidth = _.bandwidth || null),
                (m.label = _.label),
                (m.audioRoles = _.roles)),
              m
            );
          },
          Kc: function (m) {
            return {
              id: m.id,
              active: !1,
              type: "text",
              bandwidth: 0,
              language: m.language,
              label: m.label,
              kind: m.kind || null,
              width: null,
              height: null,
              frameRate: null,
              pixelAspectRatio: null,
              mimeType: m.mimeType,
              codecs: m.codecs || null,
              audioCodec: null,
              videoCodec: null,
              primary: m.primary,
              roles: m.roles,
              audioRoles: null,
              videoId: null,
              audioId: null,
              channelsCount: null,
              audioSamplingRate: null,
              audioBandwidth: null,
              videoBandwidth: null,
              originalVideoId: null,
              originalAudioId: null,
              originalTextId: m.originalId,
            };
          },
          gd: function (m) {
            return m.__shaka_id || (m.__shaka_id = wi.Uf++), m.__shaka_id;
          },
          Uf: 0,
          Of: function (m) {
            var _ = wi.ke(m);
            return (
              (_.active = m.mode != "disabled"),
              (_.type = "text"),
              (_.originalTextId = m.id),
              m.kind == "captions" && (_.mimeType = "application/cea-608"),
              m.kind && (_.roles = [m.kind]),
              _
            );
          },
          je: function (m) {
            var _ = wi.ke(m);
            return (
              (_.active = m.enabled),
              (_.type = "variant"),
              (_.originalAudioId = m.id),
              m.kind == "main" && (_.primary = !0),
              m.kind && ((_.roles = [m.kind]), (_.audioRoles = [m.kind])),
              _
            );
          },
          ke: function (m) {
            return {
              id: wi.gd(m),
              active: !1,
              type: "",
              bandwidth: 0,
              language: Ia(m.language),
              label: m.label,
              kind: m.kind,
              width: null,
              height: null,
              frameRate: null,
              pixelAspectRatio: null,
              mimeType: null,
              codecs: null,
              audioCodec: null,
              videoCodec: null,
              primary: !1,
              roles: [],
              audioRoles: null,
              videoId: null,
              audioId: null,
              channelsCount: null,
              audioSamplingRate: null,
              audioBandwidth: null,
              videoBandwidth: null,
              originalVideoId: null,
              originalAudioId: null,
              originalTextId: null,
            };
          },
          Gb: function (m) {
            return m.allowedByApplication && m.allowedByKeySystem;
          },
          Bf: function (m) {
            return m.filter(function (_) {
              return wi.Gb(_);
            });
          },
          ee: function (m, _) {
            for (
              var R = m.filter(function (J) {
                  return J.audio && J.audio.channelsCount;
                }),
                M = new Map(),
                x = (R = b(R)).next();
              !x.done;
              x = R.next()
            ) {
              var z = (x = x.value).audio.channelsCount;
              M.has(z) || M.set(z, []), M.get(z).push(x);
            }
            return (R = Array.from(M.keys())).length == 0
              ? m
              : (x = R.filter(function (J) {
                  return J <= _;
                })).length
              ? M.get(Math.max.apply(null, x))
              : M.get(Math.min.apply(null, R));
          },
          Wb: function (m, _, R) {
            var M = m,
              x = m.filter(function (te) {
                return te.primary;
              });
            x.length && (M = x);
            var z = M.length ? M[0].language : "";
            if (
              ((M = M.filter(function (te) {
                return te.language == z;
              })),
              _)
            ) {
              var J = Bv(
                Ia(_),
                m.map(function (te) {
                  return te.language;
                })
              );
              J &&
                (M = m.filter(function (te) {
                  return Ia(te.language) == J;
                }));
            }
            if (R) {
              if ((m = wi.de(M, R)).length) return m;
              B.v("No exact match for the text role could be found.");
            } else if (
              (m = M.filter(function (te) {
                return te.roles.length == 0;
              })).length
            )
              return m;
            return (m = M.map(function (te) {
              return te.roles;
            }).reduce(rn.Rc, [])).length
              ? wi.de(M, m[0])
              : M;
          },
          de: function (m, _) {
            return m.filter(function (R) {
              return R.roles.includes(_);
            });
          },
          ie: function (m, _, R) {
            for (var M = 0; M < R.length; M++)
              if (R[M].audio == m && R[M].video == _) return R[M];
            return null;
          },
          Pf: function (m) {
            return m.type == "audio";
          },
          Sf: function (m) {
            return m.type == "video";
          },
          Kf: function (m) {
            var _ = [];
            return m.audio && _.push(m.audio), m.video && _.push(m.video), _;
          },
          fb: function (m) {
            return wi.Pf(m)
              ? "type=audio codecs=" +
                  m.codecs +
                  " bandwidth=" +
                  m.bandwidth +
                  " channelsCount=" +
                  m.channelsCount +
                  " audioSamplingRate=" +
                  m.audioSamplingRate
              : wi.Sf(m)
              ? "type=video codecs=" +
                m.codecs +
                " bandwidth=" +
                m.bandwidth +
                " frameRate=" +
                m.frameRate +
                " width=" +
                m.width +
                " height=" +
                m.height
              : "unexpected stream type";
          },
        };
      function zo() {
        (this.m = null),
          (this.i = !1),
          (this.h = new Gt()),
          (this.l = []),
          (this.o = !1),
          (this.g = this.j = null);
      }
      function Hv(m, _) {
        return (
          m &&
            (_ = _.filter(function (R) {
              return wi.rd(R, m, { width: 1 / 0, height: 1 / 0 });
            })),
          _.sort(function (R, M) {
            return R.bandwidth - M.bandwidth;
          })
        );
      }
      function Kb(m, _) {
        (this.g = m), (this.h = _);
      }
      function ph(m, _) {
        var R = new Kb(2, 6),
          M = Vv,
          x = M.g,
          z = R.h - x.h;
        (0 < (R.g - x.g || z) ? M.i : M.h)(M.g, R, m, _);
      }
      function qR(m, _, R, M) {
        B.ba(
          [
            R,
            "has been deprecated and will be removed in",
            _,
            ". We are currently at version",
            m,
            ". Additional information:",
            M,
          ].join(" ")
        );
      }
      function Xv(m, _, R, M) {
        B.kc(
          [
            R,
            "has been deprecated and has been removed in",
            _,
            ". We are now at version",
            m,
            ". Additional information:",
            M,
          ].join("")
        );
      }
      Z("shaka.abr.SimpleAbrManager", zo),
        (zo.prototype.stop = function () {
          (this.m = null), (this.i = !1), (this.l = []), (this.j = null);
        }),
        (zo.prototype.stop = zo.prototype.stop),
        (zo.prototype.init = function (m) {
          this.m = m;
        }),
        (zo.prototype.init = zo.prototype.init),
        (zo.prototype.chooseVariant = function () {
          var m = Hv(this.g.restrictions, this.l),
            _ = this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate);
          this.l.length &&
            !m.length &&
            (B.v(
              "No variants met the ABR restrictions. Choosing a variant by lowest bandwidth."
            ),
            (m = [(m = Hv(null, this.l))[0]]));
          for (var R = m[0] || null, M = 0; M < m.length; ++M) {
            var x = m[M],
              z = x.bandwidth / this.g.bandwidthDowngradeTarget,
              J =
                (m[M + 1] || { bandwidth: 1 / 0 }).bandwidth /
                this.g.bandwidthUpgradeTarget;
            B.O(
              "Bandwidth ranges:",
              (x.bandwidth / 1e6).toFixed(3),
              (z / 1e6).toFixed(3),
              (J / 1e6).toFixed(3)
            ),
              _ >= z && _ <= J && (R = x);
          }
          return (this.j = Date.now()), R;
        }),
        (zo.prototype.chooseVariant = zo.prototype.chooseVariant),
        (zo.prototype.enable = function () {
          this.i = !0;
        }),
        (zo.prototype.enable = zo.prototype.enable),
        (zo.prototype.disable = function () {
          this.i = !1;
        }),
        (zo.prototype.disable = zo.prototype.disable),
        (zo.prototype.segmentDownloaded = function (m, _) {
          B.O(
            "Segment downloaded:",
            "deltaTimeMs=" + m,
            "numBytes=" + _,
            "lastTimeChosenMs=" + this.j,
            "enabled=" + this.i
          );
          var R = this.h;
          if (!(16e3 > _)) {
            var M = (8e3 * _) / m,
              x = m / 1e3;
            (R.g += _), Pe(R.h, x, M), Pe(R.i, x, M);
          }
          if (this.j != null && this.i)
            e: {
              if ((B.O("Suggesting Streams..."), this.o)) {
                if (Date.now() - this.j < 1e3 * this.g.switchInterval) {
                  B.O("Still within switch interval...");
                  break e;
                }
              } else {
                if (!(128e3 <= this.h.g)) {
                  B.O("Still waiting for a good estimate...");
                  break e;
                }
                this.o = !0;
              }
              (R = this.chooseVariant()),
                (M = this.h.getBandwidthEstimate(
                  this.g.defaultBandwidthEstimate
                )),
                B.debug(
                  "Calling switch_(), bandwidth=" +
                    Math.round(M / 1e3) +
                    " kbps"
                ),
                this.m(R);
            }
        }),
        (zo.prototype.segmentDownloaded = zo.prototype.segmentDownloaded),
        (zo.prototype.getBandwidthEstimate = function () {
          return this.h.getBandwidthEstimate(this.g.defaultBandwidthEstimate);
        }),
        (zo.prototype.getBandwidthEstimate = zo.prototype.getBandwidthEstimate),
        (zo.prototype.setVariants = function (m) {
          this.l = m;
        }),
        (zo.prototype.setVariants = zo.prototype.setVariants),
        (zo.prototype.configure = function (m) {
          this.g = m;
        }),
        (zo.prototype.configure = zo.prototype.configure),
        (Kb.prototype.toString = function () {
          return "v" + this.g + "." + this.h;
        });
      var Vv = null,
        Zb =
          "ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(
            " "
          ),
        eA =
          "buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(
            " "
          ),
        ey = ["loop", "playbackRate"],
        Yb = ["pause", "play"],
        Om =
          "abrstatuschanged adaptation buffering drmsessionupdate emsg error expirationupdated largegap loading manifestparsed onstatechange onstateidle streaming textchanged texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged".split(
            " "
          ),
        np = {
          getAssetUri: 2,
          getAudioLanguages: 4,
          getAudioLanguagesAndRoles: 4,
          getBufferedInfo: 2,
          getConfiguration: 2,
          getExpiration: 2,
          getPlaybackRate: 2,
          getTextLanguages: 4,
          getTextLanguagesAndRoles: 4,
          getTextTracks: 2,
          getStats: 5,
          getVariantTracks: 2,
          isAudioOnly: 10,
          isBuffering: 1,
          isInProgress: 1,
          isLive: 10,
          isTextTrackVisible: 1,
          keySystem: 10,
          seekRange: 1,
          usingEmbeddedTextTrack: 2,
          getLoadMode: 10,
        },
        zv = { getPlayheadTimeAsDate: 1, getPresentationStartTimeAsDate: 20 },
        Qb = [["getConfiguration", "configure"]],
        pg = [["isTextTrackVisible", "setTextTrackVisibility"]],
        a2 =
          "addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay".split(
            " "
          ),
        tA = ["attach", "detach", "load", "unload"];
      function gg(m) {
        return JSON.stringify(m, function (_, R) {
          if (typeof R != "function") {
            if (R instanceof Event || R instanceof Je) {
              var M = {};
              for (z in R) {
                var x = R[z];
                x && typeof x == "object"
                  ? z == "detail" && (M[z] = x)
                  : z in Event || (M[z] = x);
              }
              return M;
            }
            if (R instanceof Error) {
              var z = new Set(["name", "message", "stack"]);
              for (M in R) z.add(M);
              for (
                M = (x = b(Object.getOwnPropertyNames(R))).next();
                !M.done;
                M = x.next()
              )
                z.add(M.value);
              for (x = {}, M = (z = b(z)).next(); !M.done; M = z.next())
                x[(M = M.value)] = R[M];
              z = { __type__: "Error", contents: x };
            } else if (R instanceof TimeRanges)
              for (
                z = {
                  __type__: "TimeRanges",
                  length: R.length,
                  start: [],
                  end: [],
                },
                  M = 0;
                M < R.length;
                ++M
              )
                z.start.push(R.start(M)), z.end.push(R.end(M));
            else
              z =
                R instanceof Uint8Array
                  ? { __type__: "Uint8Array", entries: Array.from(R) }
                  : typeof R == "number"
                  ? isNaN(R)
                    ? "NaN"
                    : isFinite(R)
                    ? R
                    : 0 > R
                    ? "-Infinity"
                    : "Infinity"
                  : R;
            return z;
          }
        });
      }
      function mg(m) {
        return JSON.parse(m, function (_, R) {
          if (R == "NaN") var M = NaN;
          else if (R == "-Infinity") M = -1 / 0;
          else if (R == "Infinity") M = 1 / 0;
          else if (R && typeof R == "object" && R.__type__ == "TimeRanges")
            M = (function (J) {
              return {
                length: J.length,
                start: function (te) {
                  return J.start[te];
                },
                end: function (te) {
                  return J.end[te];
                },
              };
            })(R);
          else if (R && typeof R == "object" && R.__type__ == "Uint8Array")
            M = new Uint8Array(R.entries);
          else if (R && typeof R == "object" && R.__type__ == "Error") {
            M = R.contents;
            var x,
              z = Error(M.message);
            for (x in M) z[x] = M[x];
            M = z;
          } else M = R;
          return M;
        });
      }
      function Ld(m, _, R, M, x, z) {
        (this.X = m),
          (this.j = new Ut(_)),
          (this.Z = R),
          (this.u = !1),
          (this.F = M),
          (this.P = x),
          (this.L = z),
          (this.h = this.m = !1),
          (this.M = ""),
          (this.o = null),
          (this.A = this.yd.bind(this)),
          (this.C = this.ag.bind(this)),
          (this.g = { video: {}, player: {} }),
          (this.J = 0),
          (this.i = {}),
          (this.l = null),
          Gm.add(this);
      }
      var $l = !1,
        mu = null;
      function yu(m) {
        for (var _ = b(Gm), R = _.next(); !R.done; R = _.next()) o2(R.value, m);
      }
      function o2(m, _) {
        B.debug("CastSender: onExistingSessionJoined");
        var R = m.L();
        (m.l = new Ft()), (m.u = !0), m.Ad(R, _);
      }
      function Jb(m) {
        for (var _ = b(Gm), R = _.next(); !R.done; R = _.next()) {
          R = R.value;
          var M = m;
          B.debug("CastSender: receiver status", M),
            ($l = M == "available"),
            R.j.Lc();
        }
      }
      function As(m) {
        var _ = mu;
        _.removeUpdateListener(m.A),
          _.removeMessageListener("urn:x-cast:com.google.shaka.v2", m.C);
      }
      function qb(m) {
        for (var _ in m.i) {
          var R = m.i[_];
          delete m.i[_], R.reject(new re(1, 7, 7e3));
        }
      }
      function rp(m, _) {
        var R = gg(_),
          M = mu;
        try {
          M.sendMessage(
            "urn:x-cast:com.google.shaka.v2",
            R,
            function () {},
            B.error
          );
        } catch (x) {
          throw (
            (B.error("Cast session sendMessage threw", x),
            (R = new re(2, 8, 8005, x)),
            m.F("player", new Je("error", { detail: R })),
            m.Bb(),
            R)
          );
        }
      }
      ((u = Ld.prototype).destroy = function () {
        return (
          Gm.delete(this),
          qb(this),
          mu && As(this),
          this.j && (this.j.stop(), (this.j = null)),
          (this.P = this.F = null),
          (this.h = this.m = !1),
          (this.C = this.A = this.l = this.i = this.g = this.o = null),
          Promise.resolve()
        );
      }),
        (u.la = function () {
          return this.h;
        }),
        (u.Dd = function () {
          return this.M;
        }),
        (u.init = function () {
          if (this.X.length)
            if (i.chrome && chrome.cast && chrome.cast.isAvailable) {
              (this.m = !0), this.j.Lc();
              var m = new chrome.cast.SessionRequest(this.X);
              (m = new chrome.cast.ApiConfig(
                m,
                yu.bind(this),
                Jb.bind(this),
                "origin_scoped"
              )),
                chrome.cast.initialize(
                  m,
                  function () {
                    B.debug("CastSender: init");
                  },
                  function (_) {
                    B.error("CastSender: init error", _);
                  }
                ),
                $l && this.j.V(0.02),
                (m = mu) && m.status != chrome.cast.SessionStatus.STOPPED
                  ? (B.debug("CastSender: re-using existing connection"),
                    o2(this, m))
                  : (mu = null);
            } else
              i.__onGCastApiAvailable || (i.__onGCastApiAvailable = e_),
                i.__onGCastApiAvailable != e_ &&
                  B.ba(
                    "A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready."
                  );
        }),
        (u.Md = function (m) {
          (this.o = m),
            this.h && rp(this, { type: "appData", appData: this.o });
        }),
        (u.cast = function (m) {
          return this.m
            ? $l
              ? this.h
                ? Promise.reject(new re(1, 8, 8002))
                : ((this.l = new Ft()),
                  chrome.cast.requestSession(
                    this.Ad.bind(this, m),
                    this.ve.bind(this)
                  ),
                  this.l)
              : Promise.reject(new re(1, 8, 8001))
            : Promise.reject(new re(1, 8, 8e3));
        }),
        (u.Bb = function () {
          if (this.h) {
            if ((qb(this), mu)) {
              As(this);
              try {
                mu.stop(
                  function () {},
                  function () {}
                );
              } catch {}
              mu = null;
            }
            this.yd();
          }
        }),
        (u.get = function (m, _) {
          if (m == "video") {
            if (Yb.includes(_)) return this.Ee.bind(this, m, _);
          } else if (m == "player") {
            if (zv[_] && !this.get("player", "isLive")()) return function () {};
            if (a2.includes(_)) return this.Ee.bind(this, m, _);
            if (tA.includes(_)) return this.rg.bind(this, m, _);
            if (np[_]) return this.Be.bind(this, m, _);
          }
          return this.Be(m, _);
        }),
        (u.set = function (m, _, R) {
          (this.g[m][_] = R),
            rp(this, { type: "set", targetName: m, property: _, value: R });
        }),
        (u.Ad = function (m, _) {
          B.debug("CastSender: onSessionInitiated"),
            (mu = _),
            _.addUpdateListener(this.A),
            _.addMessageListener("urn:x-cast:com.google.shaka.v2", this.C),
            this.yd(),
            rp(this, { type: "init", initState: m, appData: this.o }),
            this.l.resolve();
        }),
        (u.ve = function (m) {
          var _ = 8003;
          switch (m.code) {
            case "cancel":
              _ = 8004;
              break;
            case "timeout":
              _ = 8005;
              break;
            case "receiver_unavailable":
              _ = 8006;
          }
          this.l.reject(new re(2, 8, _, m));
        }),
        (u.Be = function (m, _) {
          return this.g[m][_];
        }),
        (u.Ee = function (m, _, R) {
          for (var M = [], x = 2; x < arguments.length; ++x)
            M[x - 2] = arguments[x];
          rp(this, { type: "call", targetName: m, methodName: _, args: M });
        }),
        (u.rg = function (m, _, R) {
          for (var M = [], x = 2; x < arguments.length; ++x)
            M[x - 2] = arguments[x];
          x = new Ft();
          var z = this.J.toString();
          this.J++, (this.i[z] = x);
          try {
            rp(this, {
              type: "asyncCall",
              targetName: m,
              methodName: _,
              args: M,
              id: z,
            });
          } catch (J) {
            x.reject(J);
          }
          return x;
        }),
        (u.yd = function () {
          var m = !!mu && mu.status == "connected";
          if ((B.debug("CastSender: connection status", m), this.h && !m)) {
            for (var _ in (this.P(), this.g)) this.g[_] = {};
            qb(this);
          }
          (this.M = (this.h = m) ? mu.receiver.friendlyName : ""), this.j.Lc();
        }),
        (u.ag = function (m, _) {
          var R = mg(_);
          switch ((B.O("CastSender: message", R), R.type)) {
            case "event":
              var M = R.event;
              this.F(R.targetName, new Je(M.type, M));
              break;
            case "update":
              for (var x in (M = R.update))
                for (var z in ((R = this.g[x] || {}), M[x])) R[z] = M[x][z];
              this.u && (this.Z(), (this.u = !1));
              break;
            case "asyncComplete":
              if (
                ((x = R.id),
                (R = R.error),
                (z = this.i[x]),
                delete this.i[x],
                z)
              )
                if (R) {
                  for (M in ((x = new re(R.severity, R.category, R.code)), R))
                    x[M] = R[M];
                  z.reject(x);
                } else z.resolve();
          }
        });
      var Gm = new Set();
      function e_(m) {
        if (m)
          for (var _ = (m = b(Gm)).next(); !_.done; _ = m.next())
            _.value.init();
      }
      function Qa(m, _, R) {
        var M = this;
        Ye.call(this),
          (this.i = m),
          (this.h = _),
          (this.o = this.l = this.j = this.u = this.m = null),
          (this.C = R),
          (this.A = new Map()),
          (this.g = new Ld(
            R,
            function () {
              return Zs(M);
            },
            function () {
              return gh(M);
            },
            function (x, z) {
              return t_(M, x, z);
            },
            function () {
              return s2(M);
            },
            function () {
              return Fu(M);
            }
          )),
          (function (x) {
            for (var z in (x.g.init(),
            (x.o = new Yr()),
            Zb.forEach(
              function (J) {
                this.o.H(this.i, J, this.L.bind(this));
              }.bind(x)
            ),
            Om.forEach(
              function (J) {
                this.o.H(this.h, J, this.F.bind(this));
              }.bind(x)
            ),
            (x.m = {}),
            x.i))
              Object.defineProperty(x.m, z, {
                configurable: !1,
                enumerable: !0,
                get: x.J.bind(x, z),
                set: x.M.bind(x, z),
              });
            (x.u = {}),
              ip(x, function (J) {
                Object.defineProperty(x.u, J, {
                  configurable: !1,
                  enumerable: !0,
                  get: function () {
                    return Nm(x, J);
                  },
                });
              }),
              (function (J) {
                var te = new Map();
                ip(J, function (pe, xe) {
                  if (te.has(xe)) {
                    var Be = te.get(xe);
                    pe.length < Be.length ? J.A.set(pe, Be) : J.A.set(Be, pe);
                  } else te.set(xe, pe);
                });
              })(x),
              (x.j = new Ye()),
              (x.j.jc = x.m),
              (x.l = new Ye()),
              (x.l.jc = x.u);
          })(this);
      }
      function ip(m, _) {
        function R(xe) {
          return (
            xe != "constructor" && typeof M[xe] == "function" && !x.has(xe)
          );
        }
        var M = m.h,
          x = new Set();
        for (z in M) R(z) && (x.add(z), _(z, M[z]));
        for (
          var z = Object.getPrototypeOf(M), J = Object.getPrototypeOf({});
          z && z != J;

        ) {
          for (
            var te = b(Object.getOwnPropertyNames(z)), pe = te.next();
            !pe.done;
            pe = te.next()
          )
            R((pe = pe.value)) && (x.add(pe), _(pe, M[pe]));
          z = Object.getPrototypeOf(z);
        }
      }
      function Fu(m) {
        var _ = {
          video: {},
          player: {},
          playerAfterLoad: {},
          manifest: m.h.tc(),
          startTime: null,
        };
        return (
          m.i.pause(),
          ey.forEach(
            function (R) {
              _.video[R] = this.i[R];
            }.bind(m)
          ),
          m.i.ended || (_.startTime = m.i.currentTime),
          Qb.forEach(
            function (R) {
              var M = R[1];
              (R = this.h[R[0]]()), (_.player[M] = R);
            }.bind(m)
          ),
          pg.forEach(
            function (R) {
              var M = R[1];
              (R = this.h[R[0]]()), (_.playerAfterLoad[M] = R);
            }.bind(m)
          ),
          _
        );
      }
      function Zs(m) {
        m.dispatchEvent(new Je("caststatuschanged"));
      }
      function gh(m) {
        m.j.dispatchEvent(new Je(m.m.paused ? "pause" : "play"));
      }
      function s2(m) {
        Qb.forEach(
          function (te) {
            var pe = te[1];
            (te = this.g.get("player", te[0])()), this.h[pe](te);
          }.bind(m)
        );
        var _ = m.g.get("player", "getAssetUri")(),
          R = m.g.get("video", "ended"),
          M = Promise.resolve(),
          x = m.i.autoplay,
          z = null;
        R || (z = m.g.get("video", "currentTime")),
          _ && ((m.i.autoplay = !1), (M = m.h.load(_, z)));
        var J = {};
        ey.forEach(
          function (te) {
            J[te] = this.g.get("video", te);
          }.bind(m)
        ),
          M.then(
            function () {
              m.i &&
                (ey.forEach(
                  function (te) {
                    this.i[te] = J[te];
                  }.bind(m)
                ),
                pg.forEach(
                  function (te) {
                    var pe = te[1];
                    (te = this.g.get("player", te[0])()), this.h[pe](te);
                  }.bind(m)
                ),
                (m.i.autoplay = x),
                _ && m.i.play());
            },
            function (te) {
              m.h.dispatchEvent(new Je("error", { detail: te }));
            }
          );
      }
      function Nm(m, _) {
        if ((m.A.has(_) && (_ = m.A.get(_)), _ == "addEventListener"))
          return m.l.addEventListener.bind(m.l);
        if (_ == "removeEventListener")
          return m.l.removeEventListener.bind(m.l);
        if (_ == "getMediaElement")
          return function () {
            return this.m;
          }.bind(m);
        if (_ == "getSharedConfiguration")
          return (
            B.v("Can't share configuration across a network. Returning copy."),
            m.g.get("player", "getConfiguration")
          );
        if (_ == "getNetworkingEngine")
          return (
            m.g.la() && B.v("NOTE: getNetworkingEngine() is always local!"),
            m.h.Yb.bind(m.h)
          );
        if (m.g.la()) {
          if (_ == "getManifest" || _ == "drmInfo")
            return function () {
              return B.ba(_ + "() does not work while casting!"), null;
            };
          if (_ == "getManifestUri")
            return (
              ph("getManifestUri", 'Please use "getAssetUri" instead.'),
              Nm(m, "getAssetUri")
            );
          if (_ == "attach" || _ == "detach")
            return function () {
              return (
                B.ba(_ + "() does not work while casting!"), Promise.resolve()
              );
            };
        }
        return (m.g.la() && Object.keys(m.g.g.video).length == 0 && np[_]) ||
          !m.g.la()
          ? m.h[_].bind(m.h)
          : m.g.get("player", _);
      }
      function t_(m, _, R) {
        m.g.la() &&
          (_ == "video"
            ? m.j.dispatchEvent(R)
            : _ == "player" && m.l.dispatchEvent(R));
      }
      function xl(m, _, R, M) {
        var x = this;
        Ye.call(this),
          (this.g = m),
          (this.h = _),
          (this.i = new Yr()),
          (this.L = { video: m, player: _ }),
          (this.C = R || function () {}),
          (this.M =
            M ||
            function (z) {
              return z;
            }),
          (this.F = !1),
          (this.m = !0),
          (this.l = 0),
          (this.A = !1),
          (this.u = !0),
          (this.o = this.j = null),
          (this.J = new Ut(function () {
            jv(x);
          })),
          (function (z) {
            var J = cast.receiver.CastReceiverManager.getInstance();
            (J.onSenderConnected = z.xe.bind(z)),
              (J.onSenderDisconnected = z.xe.bind(z)),
              (J.onSystemVolumeChanged = z.hf.bind(z)),
              (z.o = J.getCastMessageBus("urn:x-cast:com.google.cast.media")),
              (z.o.onMessage = z.Wf.bind(z)),
              (z.j = J.getCastMessageBus("urn:x-cast:com.google.shaka.v2")),
              (z.j.onMessage = z.fg.bind(z)),
              J.start(),
              Zb.forEach(
                function (te) {
                  this.i.H(this.g, te, this.Ce.bind(this, "video"));
                }.bind(z)
              ),
              Om.forEach(
                function (te) {
                  this.i.H(this.h, te, this.Ce.bind(this, "player"));
                }.bind(z)
              ),
              cast.__platform__ &&
              cast.__platform__.canDisplayType(
                'video/mp4; codecs="avc1.640028"; width=3840; height=2160'
              )
                ? z.h.Nd(3840, 2160)
                : z.h.Nd(1920, 1080),
              z.i.H(
                z.g,
                "loadeddata",
                function () {
                  this.A = !0;
                }.bind(z)
              ),
              z.i.H(
                z.h,
                "loading",
                function () {
                  (this.m = !1), ap(this);
                }.bind(z)
              ),
              z.i.H(
                z.g,
                "playing",
                function () {
                  (this.m = !1), ap(this);
                }.bind(z)
              ),
              z.i.H(
                z.g,
                "pause",
                function () {
                  ap(this);
                }.bind(z)
              ),
              z.i.H(
                z.h,
                "unloading",
                function () {
                  (this.m = !0), ap(this);
                }.bind(z)
              ),
              z.i.H(
                z.g,
                "ended",
                function () {
                  var te = this;
                  new Ut(function () {
                    te.g && te.g.ended && ((te.m = !0), ap(te));
                  }).V(5);
                }.bind(z)
              );
          })(this);
      }
      function ap(m) {
        Promise.resolve().then(
          function () {
            this.h &&
              (this.dispatchEvent(new Je("caststatuschanged")),
              ty(this) || Uc(this));
          }.bind(m)
        );
      }
      function jv(m) {
        m.J.V(0.5);
        var _ = { video: {}, player: {} };
        if (
          (eA.forEach(
            function (x) {
              _.video[x] = this.g[x];
            }.bind(m)
          ),
          m.h.aa())
        )
          for (var R in zv) m.l % zv[R] == 0 && (_.player[R] = m.h[R]());
        for (var M in np) m.l % np[M] == 0 && (_.player[M] = m.h[M]());
        (R =
          cast.receiver.CastReceiverManager.getInstance().getSystemVolume()) &&
          ((_.video.volume = R.level), (_.video.muted = R.muted)),
          m.A && (m.l += 1),
          Od(m, { type: "update", update: _ }, m.j),
          ty(m);
      }
      function ty(m) {
        return (
          !(!m.u || (!m.g.duration && !m.h.aa())) && (dd(m), (m.u = !1), !0)
        );
      }
      function dd(m, _) {
        _ = _ === void 0 ? 0 : _;
        var R = {
          contentId: m.h.tc(),
          streamType: m.h.aa() ? "LIVE" : "BUFFERED",
          contentType: "",
        };
        m.h.aa() || (R.duration = m.g.duration), Uc(m, _, R);
      }
      function Od(m, _, R, M) {
        m.F && ((m = gg(_)), M ? R.getCastChannel(M).send(m) : R.broadcast(m));
      }
      function Uc(m, _, R) {
        (_ = _ === void 0 ? 0 : _), (R = R === void 0 ? null : R);
        var M = m.g.playbackRate,
          x = Wv;
        (M = {
          mediaSessionId: 0,
          playbackRate: M,
          playerState: (x = m.m
            ? x.IDLE
            : m.h.jd()
            ? x.Re
            : m.g.paused
            ? x.Te
            : x.Ue),
          currentTime: m.g.currentTime,
          supportedMediaCommands: 63,
          volume: { level: m.g.volume, muted: m.g.muted },
        }),
          R && (M.media = R),
          Od(m, { requestId: _, type: "MEDIA_STATUS", status: [M] }, m.o);
      }
      ie(Qa, Ye),
        Z("shaka.cast.CastProxy", Qa),
        (Qa.prototype.destroy = function (m) {
          return (
            m && this.g.Bb(),
            this.o && (this.o.release(), (this.o = null)),
            (m = []),
            this.h && (m.push(this.h.destroy()), (this.h = null)),
            this.g && (m.push(this.g.destroy()), (this.g = null)),
            (this.u = this.m = this.i = null),
            Promise.all(m)
          );
        }),
        (Qa.prototype.destroy = Qa.prototype.destroy),
        (Qa.prototype.Mf = function () {
          return this.m;
        }),
        (Qa.prototype.getVideo = Qa.prototype.Mf),
        (Qa.prototype.Df = function () {
          return this.u;
        }),
        (Qa.prototype.getPlayer = Qa.prototype.Df),
        (Qa.prototype.Ye = function () {
          return this.g.m && $l;
        }),
        (Qa.prototype.canCast = Qa.prototype.Ye),
        (Qa.prototype.la = function () {
          return this.g.la();
        }),
        (Qa.prototype.isCasting = Qa.prototype.la),
        (Qa.prototype.Dd = function () {
          return this.g.Dd();
        }),
        (Qa.prototype.receiverName = Qa.prototype.Dd),
        (Qa.prototype.cast = function () {
          var m = Fu(this);
          return this.g.cast(m).then(
            function () {
              if (this.h) return this.h.Ud();
            }.bind(this)
          );
        }),
        (Qa.prototype.cast = Qa.prototype.cast),
        (Qa.prototype.Md = function (m) {
          this.g.Md(m);
        }),
        (Qa.prototype.setAppData = Qa.prototype.Md),
        (Qa.prototype.Kg = function () {
          var m = this.g;
          if (m.h) {
            var _ = m.L();
            chrome.cast.requestSession(m.Ad.bind(m, _), m.ve.bind(m));
          }
        }),
        (Qa.prototype.suggestDisconnect = Qa.prototype.Kg),
        (Qa.prototype.af = function (m) {
          var _ = this;
          return k(function R() {
            return $t(R, function (M) {
              switch (M.s) {
                case 1:
                  return m == _.C
                    ? M.return()
                    : ((_.C = m), _.g.Bb(), E(M, _.g.destroy(), 2));
                case 2:
                  (_.g = null),
                    (_.g = new Ld(
                      m,
                      function () {
                        return Zs(_);
                      },
                      function () {
                        return gh(_);
                      },
                      function (x, z) {
                        return t_(_, x, z);
                      },
                      function () {
                        return s2(_);
                      },
                      function () {
                        return Fu(_);
                      }
                    )),
                    _.g.init(),
                    S(M);
              }
            });
          });
        }),
        (Qa.prototype.changeReceiverId = Qa.prototype.af),
        (Qa.prototype.Bb = function () {
          this.g.Bb();
        }),
        (Qa.prototype.forceDisconnect = Qa.prototype.Bb),
        (Qa.prototype.J = function (m) {
          if (m == "addEventListener")
            return this.j.addEventListener.bind(this.j);
          if (m == "removeEventListener")
            return this.j.removeEventListener.bind(this.j);
          if (this.g.la() && Object.keys(this.g.g.video).length == 0) {
            var _ = this.i[m];
            if (typeof _ != "function") return _;
          }
          return this.g.la()
            ? this.g.get("video", m)
            : (typeof (m = this.i[m]) == "function" && (m = m.bind(this.i)), m);
        }),
        (Qa.prototype.M = function (m, _) {
          this.g.la() ? this.g.set("video", m, _) : (this.i[m] = _);
        }),
        (Qa.prototype.L = function (m) {
          this.g.la() || this.j.dispatchEvent(new Je(m.type, m));
        }),
        (Qa.prototype.F = function (m) {
          this.g.la() || this.l.dispatchEvent(m);
        }),
        ie(xl, Ye),
        Z("shaka.cast.CastReceiver", xl),
        (xl.prototype.isConnected = function () {
          return this.F;
        }),
        (xl.prototype.isConnected = xl.prototype.isConnected),
        (xl.prototype.Rf = function () {
          return this.m;
        }),
        (xl.prototype.isIdle = xl.prototype.Rf),
        (xl.prototype.destroy = function () {
          var m = this;
          return k(function _() {
            var R;
            return $t(_, function (M) {
              switch (M.s) {
                case 1:
                  return (
                    m.i && (m.i.release(), (m.i = null)),
                    (R = []),
                    m.h && (R.push(m.h.destroy()), (m.h = null)),
                    m.J && (m.J.stop(), (m.J = null)),
                    (m.g = null),
                    (m.L = null),
                    (m.C = null),
                    (m.F = !1),
                    (m.m = !0),
                    (m.j = null),
                    (m.o = null),
                    E(M, Promise.all(R), 2)
                  );
                case 2:
                  cast.receiver.CastReceiverManager.getInstance().stop(), S(M);
              }
            });
          });
        }),
        (xl.prototype.destroy = xl.prototype.destroy),
        ((u = xl.prototype).xe = function () {
          (this.l = 0),
            (this.u = !0),
            (this.F =
              cast.receiver.CastReceiverManager.getInstance().getSenders()
                .length != 0),
            ap(this);
        }),
        (u.Ce = function (m, _) {
          this.h &&
            (jv(this),
            Od(this, { type: "event", targetName: m, event: _ }, this.j));
        }),
        (u.hf = function () {
          var m =
            cast.receiver.CastReceiverManager.getInstance().getSystemVolume();
          m &&
            Od(
              this,
              {
                type: "update",
                update: { video: { volume: m.level, muted: m.muted } },
              },
              this.j
            ),
            Od(
              this,
              {
                type: "event",
                targetName: "video",
                event: { type: "volumechange" },
              },
              this.j
            );
        }),
        (u.fg = function (m) {
          var _ = mg(m.data);
          switch ((B.debug("CastReceiver: message", _), _.type)) {
            case "init":
              (this.l = 0),
                (this.A = !1),
                (this.u = !0),
                (function (J, te, pe) {
                  for (var xe in te.player) J.h[xe](te.player[xe]);
                  J.C(pe), (pe = Promise.resolve());
                  var Be = J.g.autoplay;
                  te.manifest &&
                    ((J.g.autoplay = !1),
                    (pe = J.h.load(te.manifest, te.startTime))),
                    pe.then(
                      function () {
                        if (J.h) {
                          for (var bt in te.video) J.g[bt] = te.video[bt];
                          for (var dt in te.playerAfterLoad)
                            J.h[dt](te.playerAfterLoad[dt]);
                          (J.g.autoplay = Be),
                            te.manifest && (J.g.play(), Uc(J));
                        }
                      },
                      function (bt) {
                        J.h.dispatchEvent(new Je("error", { detail: bt }));
                      }
                    );
                })(this, _.initState, _.appData),
                jv(this);
              break;
            case "appData":
              this.C(_.appData);
              break;
            case "set":
              var R = _.targetName,
                M = _.property;
              if (((_ = _.value), R == "video")) {
                var x = cast.receiver.CastReceiverManager.getInstance();
                if (M == "volume") {
                  x.setSystemVolumeLevel(_);
                  break;
                }
                if (M == "muted") {
                  x.setSystemVolumeMuted(_);
                  break;
                }
              }
              this.L[R][M] = _;
              break;
            case "call":
              (R = this.L[_.targetName])[_.methodName].apply(R, _.args);
              break;
            case "asyncCall":
              (R = _.targetName),
                (M = _.methodName),
                R == "player" && M == "load" && ((this.l = 0), (this.A = !1)),
                (x = _.id),
                (m = m.senderId);
              var z = this.L[R];
              (_ = z[M].apply(z, _.args)),
                R == "player" &&
                  M == "load" &&
                  (_ = _.then(
                    function () {
                      this.u = !0;
                    }.bind(this)
                  )),
                _.then(
                  this.Je.bind(this, m, x, null),
                  this.Je.bind(this, m, x)
                );
          }
        }),
        (u.Wf = function (m) {
          var _ = mg(m.data);
          switch ((B.debug("CastReceiver: message", _), _.type)) {
            case "PLAY":
              this.g.play(), Uc(this);
              break;
            case "PAUSE":
              this.g.pause(), Uc(this);
              break;
            case "SEEK":
              m = _.currentTime;
              var R = _.resumeState;
              m != null && (this.g.currentTime = Number(m)),
                R && R == "PLAYBACK_START"
                  ? (this.g.play(), Uc(this))
                  : R && R == "PLAYBACK_PAUSE" && (this.g.pause(), Uc(this));
              break;
            case "STOP":
              this.h.Ud().then(
                function () {
                  this.h && Uc(this);
                }.bind(this)
              );
              break;
            case "GET_STATUS":
              dd(this, Number(_.requestId));
              break;
            case "VOLUME":
              (m = (R = _.volume).level), (R = R.muted);
              var M = this.g.volume,
                x = this.g.muted;
              m != null && (this.g.volume = Number(m)),
                R != null && (this.g.muted = R),
                (M == this.g.volume && x == this.g.muted) || Uc(this);
              break;
            case "LOAD":
              (this.l = 0),
                (this.u = this.A = !1),
                (m = _.media),
                (R = _.currentTime),
                (M = this.M(m.contentId)),
                (x = _.autoplay || !0),
                this.C(m.customData),
                x && (this.g.autoplay = !0),
                this.h
                  .load(M, R)
                  .then(
                    function () {
                      this.h && dd(this);
                    }.bind(this)
                  )
                  .catch(
                    function (z) {
                      var J = "LOAD_FAILED";
                      z.category == 7 &&
                        z.code == 7e3 &&
                        (J = "LOAD_CANCELLED"),
                        Od(
                          this,
                          { requestId: Number(_.requestId), type: J },
                          this.o
                        );
                    }.bind(this)
                  );
              break;
            default:
              B.v(
                "Unrecognized message type from the generic Chromecast controller!",
                _.type
              ),
                Od(
                  this,
                  {
                    requestId: Number(_.requestId),
                    type: "INVALID_REQUEST",
                    reason: "INVALID_COMMAND",
                  },
                  this.o
                );
          }
        }),
        (u.Je = function (m, _, R) {
          this.h &&
            Od(this, { type: "asyncComplete", id: _, error: R }, this.j, m);
        });
      var Wv = { IDLE: "IDLE", Ue: "PLAYING", Re: "BUFFERING", Te: "PAUSED" };
      function Zi(m, _) {
        (this.S = m), (this.h = _ == hd), (this.g = 0);
      }
      Z("shaka.util.DataViewReader", Zi);
      var hd = 1;
      function Ll() {
        throw new re(2, 3, 3e3);
      }
      function Ja() {
        (this.i = []), (this.h = []), (this.g = !1);
      }
      function Rl(m) {
        for (var _ = tc(m); m.reader.Ca() && !m.parser.g; )
          m.parser.Fc(m.start + _, m.reader, m.partialOkay);
      }
      function Lo(m) {
        for (var _ = tc(m), R = m.reader.N(); 0 < R && !m.parser.g; --R)
          m.parser.Fc(m.start + _, m.reader, m.partialOkay);
      }
      function Ps(m) {
        return function (_) {
          m(_.reader.mb(_.reader.S.byteLength - _.reader.ka()));
        };
      }
      function Fm(m) {
        for (var _ = 0, R = 0; R < m.length; R++)
          _ = (_ << 8) | m.charCodeAt(R);
        return _;
      }
      function ny(m) {
        return String.fromCharCode(
          (m >> 24) & 255,
          (m >> 16) & 255,
          (m >> 8) & 255,
          255 & m
        );
      }
      function tc(m) {
        return 8 + (m.has64BitSize ? 8 : 0) + (m.flags != null ? 4 : 0);
      }
      function yg(m) {
        var _ = this;
        (this.g = []),
          (this.h = []),
          (this.data = []),
          new Ja()
            .box("moov", Rl)
            .ma("pssh", function (R) {
              if (1 < R.version) B.v("Unrecognized PSSH version found!");
              else {
                var M = R.reader.S;
                if (
                  ((M = new Uint8Array(M.buffer, M.byteOffset - 12, R.size)),
                  _.data.push(M),
                  _.g.push(Ht.Nc(R.reader.mb(16))),
                  0 < R.version)
                ) {
                  M = R.reader.N();
                  for (var x = 0; x < M; ++x) {
                    var z = Ht.Nc(R.reader.mb(16));
                    _.h.push(z);
                  }
                }
              }
            })
            .parse(m),
          this.data.length == 0 && B.v("No pssh box found!");
      }
      (Zi.Endianness = { Tg: 0, Vg: hd }),
        (Zi.prototype.Ca = function () {
          return this.g < this.S.byteLength;
        }),
        (Zi.prototype.hasMoreData = Zi.prototype.Ca),
        (Zi.prototype.ka = function () {
          return this.g;
        }),
        (Zi.prototype.getPosition = Zi.prototype.ka),
        (Zi.prototype.sf = function () {
          return this.S.byteLength;
        }),
        (Zi.prototype.getLength = Zi.prototype.sf),
        (Zi.prototype.ra = function () {
          try {
            var m = this.S.getUint8(this.g);
            return (this.g += 1), m;
          } catch {
            Ll();
          }
        }),
        (Zi.prototype.readUint8 = Zi.prototype.ra),
        (Zi.prototype.dc = function () {
          try {
            var m = this.S.getUint16(this.g, this.h);
            return (this.g += 2), m;
          } catch {
            Ll();
          }
        }),
        (Zi.prototype.readUint16 = Zi.prototype.dc),
        (Zi.prototype.N = function () {
          try {
            var m = this.S.getUint32(this.g, this.h);
            return (this.g += 4), m;
          } catch {
            Ll();
          }
        }),
        (Zi.prototype.readUint32 = Zi.prototype.N),
        (Zi.prototype.De = function () {
          try {
            var m = this.S.getInt32(this.g, this.h);
            return (this.g += 4), m;
          } catch {
            Ll();
          }
        }),
        (Zi.prototype.readInt32 = Zi.prototype.De),
        (Zi.prototype.Pb = function () {
          try {
            if (this.h)
              var m = this.S.getUint32(this.g, !0),
                _ = this.S.getUint32(this.g + 4, !0);
            else
              (_ = this.S.getUint32(this.g, !1)),
                (m = this.S.getUint32(this.g + 4, !1));
          } catch {
            Ll();
          }
          if (2097151 < _) throw new re(2, 3, 3001);
          return (this.g += 8), _ * Math.pow(2, 32) + m;
        }),
        (Zi.prototype.readUint64 = Zi.prototype.Pb),
        (Zi.prototype.mb = function (m) {
          this.g + m > this.S.byteLength && Ll();
          var _ = new Uint8Array(this.S.buffer, this.S.byteOffset + this.g, m);
          return (this.g += m), _;
        }),
        (Zi.prototype.readBytes = Zi.prototype.mb),
        (Zi.prototype.U = function (m) {
          this.g + m > this.S.byteLength && Ll(), (this.g += m);
        }),
        (Zi.prototype.skip = Zi.prototype.U),
        (Zi.prototype.Fe = function (m) {
          this.g < m && Ll(), (this.g -= m);
        }),
        (Zi.prototype.rewind = Zi.prototype.Fe),
        (Zi.prototype.seek = function (m) {
          (0 > m || m > this.S.byteLength) && Ll(), (this.g = m);
        }),
        (Zi.prototype.seek = Zi.prototype.seek),
        (Zi.prototype.Cd = function () {
          for (var m = this.g; this.Ca() && this.S.getUint8(this.g) != 0; )
            this.g += 1;
          return (
            (m = new Uint8Array(
              this.S.buffer,
              this.S.byteOffset + m,
              this.g - m
            )),
            (this.g += 1),
            un(m)
          );
        }),
        (Zi.prototype.readTerminatedString = Zi.prototype.Cd),
        Z("shaka.util.Mp4Parser", Ja),
        (Ja.prototype.box = function (m, _) {
          var R = Fm(m);
          return (this.i[R] = 0), (this.h[R] = _), this;
        }),
        (Ja.prototype.box = Ja.prototype.box),
        (Ja.prototype.ma = function (m, _) {
          var R = Fm(m);
          return (this.i[R] = 1), (this.h[R] = _), this;
        }),
        (Ja.prototype.fullBox = Ja.prototype.ma),
        (Ja.prototype.stop = function () {
          this.g = !0;
        }),
        (Ja.prototype.stop = Ja.prototype.stop),
        (Ja.prototype.parse = function (m, _) {
          var R = new Uint8Array(m);
          for (
            R = new Zi(new DataView(R.buffer, R.byteOffset, R.byteLength), 0),
              this.g = !1;
            R.Ca() && !this.g;

          )
            this.Fc(0, R, _);
        }),
        (Ja.prototype.parse = Ja.prototype.parse),
        (Ja.prototype.Fc = function (m, _, R) {
          var M = _.ka(),
            x = _.N(),
            z = _.N(),
            J = !1;
          switch ((B.O("Parsing MP4 box", ny(z)), x)) {
            case 0:
              x = _.S.byteLength - M;
              break;
            case 1:
              (x = _.Pb()), (J = !0);
          }
          var te = this.h[z];
          if (te) {
            var pe = null,
              xe = null;
            this.i[z] == 1 && ((pe = (xe = _.N()) >>> 24), (xe &= 16777215)),
              (z = M + x),
              R && z > _.S.byteLength && (z = _.S.byteLength),
              (z -= _.ka()),
              (_ = 0 < z ? _.mb(z) : new Uint8Array(0)),
              te({
                parser: this,
                partialOkay: R || !1,
                version: pe,
                flags: xe,
                reader: (_ = new Zi(
                  new DataView(_.buffer, _.byteOffset, _.byteLength),
                  0
                )),
                size: x,
                start: M + m,
                has64BitSize: J,
              });
          } else _.U(Math.min(M + x - _.ka(), _.S.byteLength - _.ka()));
        }),
        (Ja.prototype.parseNext = Ja.prototype.Fc),
        (Ja.children = Rl),
        (Ja.sampleDescription = Lo),
        (Ja.allData = Ps),
        (Ja.typeToString = ny),
        (Ja.headerSize = tc);
      var Hr = {
          sc: function (m, _) {
            var R = Hr.Y(m, _);
            return R.length != 1 ? null : R[0];
          },
          Yc: function (m, _, R) {
            return (m = Hr.fe(m, _, R)).length != 1 ? null : m[0];
          },
          Y: function (m, _) {
            return Array.prototype.filter.call(m.childNodes, function (R) {
              return R instanceof Element && R.tagName == _;
            });
          },
          fe: function (m, _, R) {
            return Array.prototype.filter.call(m.childNodes, function (M) {
              return (
                M instanceof Element && M.localName == R && M.namespaceURI == _
              );
            });
          },
          getAttributeNS: function (m, _, R) {
            return m.hasAttributeNS(_, R) ? m.getAttributeNS(_, R) : null;
          },
          uc: function (m) {
            return Array.prototype.every.call(m.childNodes, function (_) {
              return (
                _.nodeType == Node.TEXT_NODE ||
                _.nodeType == Node.CDATA_SECTION_NODE
              );
            })
              ? m.textContent.trim()
              : null;
          },
          R: function (m, _, R, M) {
            M = M === void 0 ? null : M;
            var x = null;
            return (m = m.getAttribute(_)) != null && (x = R(m)), x ?? M;
          },
          jg: function (m) {
            return m
              ? (/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(m) && (m += "Z"),
                (m = Date.parse(m)),
                isNaN(m) ? null : Math.floor(m / 1e3))
              : null;
          },
          Ma: function (m) {
            if (!m) return null;
            var _ =
              /^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(
                m
              );
            return _
              ? ((m =
                  31536e3 * Number(_[1] || null) +
                  2592e3 * Number(_[2] || null) +
                  86400 * Number(_[3] || null) +
                  3600 * Number(_[4] || null) +
                  60 * Number(_[5] || null) +
                  Number(_[6] || null)),
                isFinite(m) ? m : null)
              : (B.v("Invalid duration string:", m), null);
          },
          Hc: function (m) {
            var _ = /([0-9]+)-([0-9]+)/.exec(m);
            return _
              ? ((m = Number(_[1])),
                isFinite(m)
                  ? ((_ = Number(_[2])),
                    isFinite(_) ? { start: m, end: _ } : null)
                  : null)
              : null;
          },
          parseInt: function (m) {
            return (m = Number(m)) % 1 == 0 ? m : null;
          },
          Gc: function (m) {
            return (m = Number(m)) % 1 == 0 && 0 < m ? m : null;
          },
          Mb: function (m) {
            return (m = Number(m)) % 1 == 0 && 0 <= m ? m : null;
          },
          parseFloat: function (m) {
            return (m = Number(m)), isNaN(m) ? null : m;
          },
          ff: function (m) {
            var _;
            return (
              (m = (_ = m.match(/^(\d+)\/(\d+)$/))
                ? Number(_[1]) / Number(_[2])
                : Number(m)),
              isNaN(m) ? null : m
            );
          },
          Ae: function (m, _) {
            var R = new DOMParser();
            try {
              var M = R.parseFromString(m, "text/xml");
            } catch {}
            if (M && M.documentElement.tagName == _) var x = M.documentElement;
            return x && 0 < x.getElementsByTagName("parsererror").length
              ? null
              : x;
          },
          ze: function (m, _) {
            try {
              var R = un(m);
              return Hr.Ae(R, _);
            } catch {}
          },
        },
        Jl = new Map()
          .set(
            "urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b",
            "org.w3.clearkey"
          )
          .set(
            "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",
            "com.widevine.alpha"
          )
          .set(
            "urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95",
            "com.microsoft.playready"
          )
          .set(
            "urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95",
            "com.microsoft.playready"
          )
          .set(
            "urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb",
            "com.adobe.primetime"
          );
      function n_(m, _, R) {
        var M = (function (te) {
            for (
              var pe = [], xe = (te = b(te)).next();
              !xe.done;
              xe = te.next()
            )
              (xe = Kv(xe.value)) && pe.push(xe);
            return pe;
          })(m),
          x = null;
        m = [];
        var z = [],
          J = new Set(
            M.map(function (te) {
              return te.keyId;
            })
          );
        if ((J.delete(null), 1 < J.size)) throw new re(2, 4, 4010);
        if (
          (R ||
            ((z = M.filter(function (te) {
              return (
                te.Ge != "urn:mpeg:dash:mp4protection:2011" ||
                ((x = te.init || x), !1)
              );
            })).length &&
              ((m = (function (te, pe, xe) {
                for (
                  var Be = [], bt = (xe = b(xe)).next();
                  !bt.done;
                  bt = xe.next()
                ) {
                  bt = bt.value;
                  var dt = Jl.get(bt.Ge);
                  if (dt) {
                    var mt;
                    if (
                      (mt = Hr.Yc(bt.node, "urn:microsoft:playready", "pro"))
                    ) {
                      mt = Ht.Ja(mt.textContent);
                      var xt = new Uint8Array([
                          154, 4, 240, 121, 152, 64, 66, 134, 171, 146, 230, 91,
                          224, 136, 95, 149,
                        ]),
                        Nt = mt.length,
                        en = xt.length + 16 + Nt,
                        Tn = new ArrayBuffer(en),
                        In = new Uint8Array(Tn),
                        Qn = 0;
                      (Tn = new DataView(Tn)).setUint32(Qn, en),
                        (Qn += 4),
                        Tn.setUint32(Qn, 1886614376),
                        (Qn += 4),
                        Tn.setUint32(Qn, 0),
                        (Qn += 4),
                        In.set(xt, Qn),
                        (Qn += xt.length),
                        Tn.setUint32(Qn, Nt),
                        (Qn += 4),
                        In.set(mt, Qn),
                        (mt = [
                          {
                            initData: In,
                            initDataType: "cenc",
                            keyId: bt.keyId,
                          },
                        ]);
                    } else mt = null;
                    (mt = wt(dt, bt.init || te || mt)),
                      (dt = l2.get(dt)) && (mt.licenseServerUri = dt(bt)),
                      Be.push(mt);
                  } else
                    for (
                      dt = (bt = b((bt = pe(bt.node) || []))).next();
                      !dt.done;
                      dt = bt.next()
                    )
                      Be.push(dt.value);
                }
                return Be;
              })(x, _, z)),
              m.length == 0 && (m = [wt("", x)]))),
          M.length && (R || !z.length))
        )
          for (m = [], R = (_ = b(Jl.values())).next(); !R.done; R = _.next())
            (R = R.value) != "org.w3.clearkey" && m.push(wt(R, x));
        if ((J = Array.from(J)[0] || null))
          for (R = (_ = b(m)).next(); !R.done; R = _.next())
            for (M = (R = b(R.value.initData)).next(); !M.done; M = R.next())
              M.value.keyId = J;
        return { be: J, Xg: x, drmInfos: m, ge: !0 };
      }
      var Zh,
        l2 = new Map()
          .set("com.widevine.alpha", function (m) {
            return (
              ((m = Hr.Yc(m.node, "urn:microsoft", "laurl")) &&
                m.getAttribute("licenseUrl")) ||
              ""
            );
          })
          .set("com.microsoft.playready", function (m) {
            return (m = Hr.Yc(m.node, "urn:microsoft:playready", "pro")) &&
              (m = (function (_) {
                var R = 0,
                  M = new DataView(_).getUint32(R, !0);
                if (((R += 4), M !== _.byteLength))
                  return (
                    B.v("PlayReady Object with invalid length encountered."), []
                  );
                (R += 2), (M = []);
                for (var x = new DataView(_); R < _.byteLength - 1; ) {
                  var z = x.getUint16(R, !0);
                  R += 2;
                  var J = x.getUint16(R, !0);
                  R += 2;
                  var te = new Uint8Array(_, R, J);
                  M.push({ type: z, value: te }), (R += J);
                }
                return M;
              })((m = Ht.Ja(m.textContent)).buffer).filter(function (_) {
                return _.type === 1;
              })[0])
              ? ((m = Yt(m.value, !0)),
                (m = Hr.Ae(m, "WRMHEADER"))
                  ? (function (_) {
                      for (
                        var R = (_ = b(_.getElementsByTagName("DATA"))).next();
                        !R.done;
                        R = _.next()
                      )
                        for (
                          var M = (R = b(R.value.childNodes)).next();
                          !M.done;
                          M = R.next()
                        )
                          if (
                            (M = M.value) instanceof Element &&
                            M.tagName == "LA_URL"
                          )
                            return M.textContent;
                      return "";
                    })(m)
                  : "")
              : "";
          });
      function Kv(m) {
        var _ = m.getAttribute("schemeIdUri"),
          R = Hr.getAttributeNS(m, "urn:mpeg:cenc:2013", "default_KID"),
          M = Hr.fe(m, "urn:mpeg:cenc:2013", "pssh").map(Hr.uc);
        if (!_)
          return (
            B.error(
              "Missing required schemeIdUri attribute on",
              "ContentProtection element",
              m
            ),
            null
          );
        if (
          ((_ = _.toLowerCase()),
          R && (R = R.replace(/-/g, "").toLowerCase()).includes(" "))
        )
          throw new re(2, 4, 4009);
        var x = [];
        try {
          x = M.map(function (z) {
            return { initDataType: "cenc", initData: Ht.Ja(z), keyId: null };
          });
        } catch {
          throw new re(2, 4, 4007);
        }
        return { node: m, Ge: _, keyId: R, init: 0 < x.length ? x : null };
      }
      function op(m, _, R, M, x) {
        var z = { RepresentationID: _, Number: R, Bandwidth: M, Time: x };
        return m.replace(
          /\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,
          function (J, te, pe, xe) {
            if (J == "$$") return "$";
            var Be = z[te];
            if (Be == null)
              return (
                B.v(
                  "URL template does not have an available substitution for identifier",
                  '"' + te + '":',
                  m
                ),
                J
              );
            switch (
              (te == "RepresentationID" &&
                pe &&
                (B.v(
                  "URL template should not contain a width specifier for identifier",
                  '"RepresentationID":',
                  m
                ),
                (pe = void 0)),
              te == "Time" && (Be = Math.round(Be)),
              xe)
            ) {
              case void 0:
              case "d":
              case "i":
              case "u":
                J = Be.toString();
                break;
              case "o":
                J = Be.toString(8);
                break;
              case "x":
                J = Be.toString(16);
                break;
              case "X":
                J = Be.toString(16).toUpperCase();
                break;
              default:
                J = Be.toString();
            }
            return (
              (pe = i.parseInt(pe, 10) || 1),
              Array(Math.max(0, pe - J.length) + 1).join("0") + J
            );
          }
        );
      }
      function r_(m, _) {
        var R = Gd(m, _, "timescale"),
          M = 1;
        R && (M = Hr.Gc(R) || 1),
          (R = Gd(m, _, "duration")),
          (R = Hr.Gc(R || "")) && (R /= M);
        var x = Gd(m, _, "startNumber"),
          z = Number(Gd(m, _, "presentationTimeOffset")) || 0,
          J = Hr.Mb(x || "");
        (x != null && J != null) || (J = 1);
        var te = i_(m, _, "SegmentTimeline");
        if (((x = null), te)) {
          x = M;
          var pe = m.$.duration || 1 / 0;
          te = Hr.Y(te, "S");
          for (var xe = [], Be = -z, bt = 0; bt < te.length; ++bt) {
            var dt = te[bt],
              mt = Hr.R(dt, "t", Hr.Mb),
              xt = Hr.R(dt, "d", Hr.Mb),
              Nt = Hr.R(dt, "r", Hr.parseInt);
            if ((mt != null && (mt -= z), !xt)) {
              B.v(
                '"S" element must have a duration:',
                'ignoring the remaining "S" elements.',
                dt
              );
              break;
            }
            if (((mt = mt ?? Be), 0 > (Nt = Nt || 0)))
              if (bt + 1 < te.length) {
                if ((Nt = Hr.R(te[bt + 1], "t", Hr.Mb)) == null) {
                  B.v(
                    'An "S" element cannot have a negative repeat',
                    'if the next "S" element does not have a valid start time:',
                    'ignoring the remaining "S" elements.',
                    dt
                  );
                  break;
                }
                if (mt >= Nt) {
                  B.v(
                    'An "S" element cannot have a negative repeat',
                    `if its start time exceeds the next "S" element's start time:`,
                    'ignoring the remaining "S" elements.',
                    dt
                  );
                  break;
                }
                Nt = Math.ceil((Nt - mt) / xt) - 1;
              } else {
                if (1 / 0 == pe) {
                  B.v(
                    'The last "S" element cannot have a negative repeat',
                    "if the Period has an infinite duration:",
                    'ignoring the last "S" element.',
                    dt
                  );
                  break;
                }
                if (mt / x >= pe) {
                  B.v(
                    'The last "S" element cannot have a negative repeat',
                    "if its start time exceeds the Period's duration:",
                    'igoring the last "S" element.',
                    dt
                  );
                  break;
                }
                Nt = Math.ceil((pe * x - mt) / xt) - 1;
              }
            for (
              0 < xe.length &&
                mt != Be &&
                (Math.abs((mt - Be) / x) >= Wt &&
                  B.v(
                    "SegmentTimeline contains a large gap/overlap:",
                    "the content may have errors in it.",
                    dt
                  ),
                (xe[xe.length - 1].end = mt / x)),
                dt = 0;
              dt <= Nt;
              ++dt
            )
              (Be = mt + xt),
                xe.push({ start: mt / x, end: Be / x, Pg: mt }),
                (mt = Be);
          }
          x = xe;
        }
        return { timescale: M, ia: R, ob: J, sa: z / M || 0, Vd: z, W: x };
      }
      function Gd(m, _, R) {
        return [_(m.G), _(m.fa), _(m.qa)]
          .filter(rn.Ra)
          .map(function (M) {
            return M.getAttribute(R);
          })
          .reduce(function (M, x) {
            return M || x;
          });
      }
      function i_(m, _, R) {
        return [_(m.G), _(m.fa), _(m.qa)]
          .filter(rn.Ra)
          .map(function (M) {
            return Hr.sc(M, R);
          })
          .reduce(function (M, x) {
            return M || x;
          });
      }
      function ry(m, _, R, M, x, z) {
        if (
          ((z = z === void 0 ? 0 : z),
          Hr.getAttributeNS(m, "http://www.w3.org/1999/xlink", "href"))
        ) {
          var J = (function (xe, Be, bt, dt, mt, xt) {
            for (
              var Nt = Hr.getAttributeNS(
                  xe,
                  "http://www.w3.org/1999/xlink",
                  "href"
                ),
                en =
                  Hr.getAttributeNS(
                    xe,
                    "http://www.w3.org/1999/xlink",
                    "actuate"
                  ) || "onRequest",
                Tn = 0;
              Tn < xe.attributes.length;
              Tn++
            ) {
              var In = xe.attributes[Tn];
              In.namespaceURI == "http://www.w3.org/1999/xlink" &&
                (xe.removeAttributeNS(In.namespaceURI, In.localName), --Tn);
            }
            if (5 <= xt) return st(new re(2, 4, 4028));
            if (en != "onLoad") return st(new re(2, 4, 4027));
            var Qn = It([dt], [Nt]);
            return mt.request(0, ut(Qn, Be)).ca(function (vr) {
              if (!(vr = Hr.ze(vr.data, xe.tagName)))
                return st(new re(2, 4, 4001, Nt));
              for (; xe.childNodes.length; ) xe.removeChild(xe.childNodes[0]);
              for (; vr.childNodes.length; ) {
                var mr = vr.childNodes[0];
                vr.removeChild(mr), xe.appendChild(mr);
              }
              for (mr = 0; mr < vr.attributes.length; mr++) {
                var bi = vr.attributes[mr].nodeName,
                  Ur = vr.getAttribute(bi);
                xe.setAttribute(bi, Ur);
              }
              return ry(xe, Be, bt, Qn[0], mt, xt + 1);
            });
          })(m, _, R, M, x, z);
          return (
            R &&
              (J = J.ca(void 0, function () {
                return ry(m, _, R, M, x, z);
              })),
            J
          );
        }
        J = [];
        for (var te = 0; te < m.childNodes.length; te++) {
          var pe = m.childNodes[te];
          pe instanceof Element &&
            (Hr.getAttributeNS(pe, "http://www.w3.org/1999/xlink", "href") ==
            "urn:mpeg:dash:resolve-to-zero:2013"
              ? (m.removeChild(pe), --te)
              : pe.tagName != "SegmentTimeline" &&
                J.push(ry(pe, _, R, M, x, z)));
        }
        return Ui(J).ca(function () {
          return m;
        });
      }
      function Ka(m, _, R) {
        (this.i = m), (this.h = _), (this.g = R);
      }
      function Io(m, _, R, M, x, z) {
        (this.position = m),
          (this.startTime = _),
          (this.endTime = R),
          (this.i = M),
          (this.h = x),
          (this.g = z);
      }
      function Um(m, _, R, M) {
        var x,
          z = new Ja().ma("sidx", function (J) {
            x = (function (te, pe, xe, Be) {
              var bt = [];
              Be.reader.U(4);
              var dt = Be.reader.N();
              if (dt == 0)
                throw (B.error("Invalid timescale."), new re(2, 3, 3005));
              if (Be.version == 0)
                var mt = Be.reader.N(),
                  xt = Be.reader.N();
              else (mt = Be.reader.Pb()), (xt = Be.reader.Pb());
              Be.reader.U(2);
              var Nt = Be.reader.dc();
              for (te = te + Be.size + xt, xt = 0; xt < Nt; xt++) {
                var en = Be.reader.N(),
                  Tn = (2147483648 & en) >>> 31;
                en &= 2147483647;
                var In = Be.reader.N();
                if ((Be.reader.U(4), Tn == 1))
                  throw (
                    (B.error("Heirarchical SIDXs are not supported."),
                    new re(2, 3, 3006))
                  );
                bt.push(
                  new Io(
                    bt.length,
                    mt / dt - pe,
                    (mt + In) / dt - pe,
                    function () {
                      return xe;
                    },
                    te,
                    te + en - 1
                  )
                ),
                  (mt += In),
                  (te += en);
              }
              return Be.parser.stop(), bt;
            })(_, M, R, J);
          });
        if ((m && z.parse(m), x)) return x;
        throw (
          (B.error('Invalid box type, expected "sidx".'), new re(2, 3, 3004))
        );
      }
      function ms(m) {
        this.g = m;
      }
      function sp(m, _) {
        for (; m.g.length && m.g[m.g.length - 1].startTime >= _; ) m.g.pop();
        for (; m.g.length && 0 >= m.g[0].endTime; ) m.g.shift();
        if (m.g.length != 0) {
          var R = m.g[m.g.length - 1];
          m.g[m.g.length - 1] = new Io(
            R.position,
            R.startTime,
            _,
            R.i,
            R.h,
            R.g
          );
        }
      }
      function mh(m) {
        (this.h = m),
          (this.g = new Zi(m, 0)),
          Zh ||
            (Zh = [
              new Uint8Array([255]),
              new Uint8Array([127, 255]),
              new Uint8Array([63, 255, 255]),
              new Uint8Array([31, 255, 255, 255]),
              new Uint8Array([15, 255, 255, 255, 255]),
              new Uint8Array([7, 255, 255, 255, 255, 255]),
              new Uint8Array([3, 255, 255, 255, 255, 255, 255]),
              new Uint8Array([1, 255, 255, 255, 255, 255, 255, 255]),
            ]);
      }
      function yc(m) {
        var _ = Bm(m);
        if (7 < _.length) throw new re(2, 3, 3002);
        for (var R = 0, M = 0; M < _.length; M++) R = 256 * R + _[M];
        (_ = R), (R = Bm(m));
        e: {
          M = Ht.Ha;
          for (var x = 0; x < Zh.length; x++)
            if (M(R, Zh[x])) {
              M = !0;
              break e;
            }
          M = !1;
        }
        if (M) R = m.h.byteLength - m.g.ka();
        else {
          if (R.length == 8 && 224 & R[1]) throw new re(2, 3, 3001);
          for (M = R[0] & ((1 << (8 - R.length)) - 1), x = 1; x < R.length; x++)
            M = 256 * M + R[x];
          R = M;
        }
        return (
          (R = m.g.ka() + R <= m.h.byteLength ? R : m.h.byteLength - m.g.ka()),
          (M = new DataView(m.h.buffer, m.h.byteOffset + m.g.ka(), R)),
          m.g.U(R),
          new Hm(_, M)
        );
      }
      function Bm(m) {
        var _,
          R = m.g.ra();
        for (_ = 1; 8 >= _ && !(R & (1 << (8 - _))); _++);
        if (8 < _) throw new re(2, 3, 3002);
        var M = new Uint8Array(_);
        for (M[0] = R, R = 1; R < _; R++) M[R] = m.g.ra();
        return M;
      }
      function Hm(m, _) {
        (this.id = m), (this.g = _);
      }
      function Uu(m) {
        if (8 < m.g.byteLength) throw new re(2, 3, 3002);
        if (m.g.byteLength == 8 && 224 & m.g.getUint8(0))
          throw new re(2, 3, 3001);
        for (var _ = 0, R = 0; R < m.g.byteLength; R++)
          _ = 256 * _ + m.g.getUint8(R);
        return _;
      }
      function u2() {}
      function Zv(m) {
        var _ = new mh(m.g);
        if ((m = yc(_)).id != 179)
          throw (B.v("Not a CueTime element."), new re(2, 3, 3013));
        if (((m = Uu(m)), (_ = yc(_)).id != 183))
          throw (B.v("Not a CueTrackPositions element."), new re(2, 3, 3012));
        _ = new mh(_.g);
        for (var R = 0; _.Ca(); ) {
          var M = yc(_);
          if (M.id == 241) {
            R = Uu(M);
            break;
          }
        }
        return { Qg: m, qg: R };
      }
      function a_(m, _) {
        var R = i_(m, _, "Initialization");
        if (!R) return null;
        var M = m.G.xa,
          x = R.getAttribute("sourceURL");
        x && (M = It(m.G.xa, [x])), (x = 0);
        var z = null;
        return (
          (R = Hr.R(R, "range", Hr.Hc)) && ((x = R.start), (z = R.end)),
          new Ka(
            function () {
              return M;
            },
            x,
            z
          )
        );
      }
      function Yh(m, _, R, M, x, z, J, te) {
        var pe = m.presentationTimeline,
          xe = !m.zb || !m.$.ld,
          Be = m.$.start,
          bt = m.$.duration,
          dt = _,
          mt = null;
        return {
          createSegmentIndex: function () {
            var xt = [dt(M, x, z), J == "webm" ? dt(R.i(), R.h, R.g) : null];
            return (
              (dt = null),
              Promise.all(xt).then(function (Nt) {
                var en = Nt[0];
                (Nt = Nt[1] || null),
                  (en =
                    J == "mp4"
                      ? Um(en, x, M, te)
                      : new u2().parse(en, Nt, M, te)),
                  pe.Jb(en, Be),
                  (mt = new ms(en)),
                  xe && sp(mt, bt);
              })
            );
          },
          findSegmentPosition: function (xt) {
            return mt.find(xt);
          },
          getSegmentReference: function (xt) {
            return mt.get(xt);
          },
        };
      }
      function Xm(m) {
        return m.ec;
      }
      function Yv(m, _) {
        var R = a_(m, nc),
          M = (function (te) {
            return [te.G.Ua, te.fa.Ua, te.qa.Ua]
              .filter(rn.Ra)
              .map(function (pe) {
                return Hr.Y(pe, "SegmentURL");
              })
              .reduce(function (pe, xe) {
                return 0 < pe.length ? pe : xe;
              })
              .map(function (pe) {
                return (
                  pe.getAttribute("indexRange") &&
                    !te.me &&
                    ((te.me = !0),
                    B.v(
                      "We do not support the SegmentURL@indexRange attribute on SegmentList.  We only use the SegmentList@duration attribute or SegmentTimeline, which must be accurate."
                    )),
                  {
                    Tf: pe.getAttribute("media"),
                    start: (pe = Hr.R(pe, "mediaRange", Hr.Hc, {
                      start: 0,
                      end: null,
                    })).start,
                    end: pe.end,
                  }
                );
              });
          })(m),
          x = r_(m, nc),
          z = x.ob;
        z == 0 && (B.v("SegmentList@startNumber must be > 0"), (z = 1));
        var J = 0;
        if (
          (x.ia
            ? (J = x.ia * (z - 1))
            : x.W && 0 < x.W.length && (J = x.W[0].start),
          !(M = { ia: x.ia, startTime: J, ob: z, sa: x.sa, W: x.W, jb: M })
            .ia &&
            !M.W &&
            1 < M.jb.length)
        )
          throw (
            (B.v(
              "SegmentList does not contain sufficient segment information:",
              "the SegmentList specifies multiple segments,",
              "but does not specify a segment duration or timeline.",
              m.G
            ),
            new re(2, 4, 4002))
          );
        if (!M.ia && !m.$.duration && !M.W && M.jb.length == 1)
          throw (
            (B.v(
              "SegmentList does not contain sufficient segment information:",
              "the SegmentList specifies one segment,",
              "but does not specify a segment duration, period duration,",
              "or timeline.",
              m.G
            ),
            new re(2, 4, 4002))
          );
        if (M.W && M.W.length == 0)
          throw (
            (B.v(
              "SegmentList does not contain sufficient segment information:",
              "the SegmentList has an empty timeline.",
              m.G
            ),
            new re(2, 4, 4002))
          );
        return (
          (z = x = null),
          m.qa.id && m.G.id && (x = _[(z = m.qa.id + "," + m.G.id)]),
          (J = (function (te, pe, xe, Be) {
            var bt = Be.jb.length;
            Be.W &&
              Be.W.length != Be.jb.length &&
              ((bt = Math.min(Be.W.length, Be.jb.length)),
              B.v(
                "The number of items in the segment timeline and the number of segment",
                "URLs do not match, truncating",
                Be.jb.length,
                "to",
                bt
              ));
            for (var dt = [], mt = Be.startTime, xt = 0; xt < bt; xt++) {
              var Nt = Be.jb[xt],
                en = It(xe, [Nt.Tf]),
                Tn = void 0;
              (Tn = Be.ia != null ? mt + Be.ia : Be.W ? Be.W[xt].end : mt + te),
                dt.push(
                  new Io(
                    xt + pe,
                    mt,
                    Tn,
                    function (In) {
                      return In;
                    }.bind(null, en),
                    Nt.start,
                    Nt.end
                  )
                ),
                (mt = Tn);
            }
            return dt;
          })(m.$.duration, M.ob, m.G.xa, M)),
          x
            ? (x.sd(J), (z = m.presentationTimeline.$b()), x.Vc(z - m.$.start))
            : (m.presentationTimeline.Jb(J, m.$.start),
              (x = new ms(J)),
              z && m.zb && (_[z] = x)),
          (m.zb && m.$.ld) || sp(x, m.$.duration),
          {
            createSegmentIndex: Promise.resolve.bind(Promise),
            findSegmentPosition: x.find.bind(x),
            getSegmentReference: x.get.bind(x),
            initSegmentReference: R,
            sa: M.sa,
          }
        );
      }
      function nc(m) {
        return m.Ua;
      }
      function qa(m, _, R, M) {
        var x = (function (pe) {
            var xe = Gd(pe, Vm, "initialization");
            if (!xe) return null;
            var Be = pe.G.id,
              bt = pe.bandwidth || null,
              dt = pe.G.xa;
            return new Ka(
              function () {
                var mt = op(xe, Be, null, bt, null);
                return It(dt, [mt]);
              },
              0,
              null
            );
          })(m),
          z = r_(m, Vm),
          J = Gd(m, Vm, "media"),
          te = Gd(m, Vm, "index");
        if (
          ((J = (z = {
            ia: z.ia,
            timescale: z.timescale,
            ob: z.ob,
            sa: z.sa,
            Vd: z.Vd,
            W: z.W,
            qd: J,
            bc: te,
          }).bc
            ? 1
            : 0),
          (J += z.W ? 1 : 0),
          (J += z.ia ? 1 : 0) == 0)
        )
          throw (
            (B.error(
              "SegmentTemplate does not contain any segment information:",
              "the SegmentTemplate must contain either an index URL template",
              "a SegmentTimeline, or a segment duration.",
              m.G
            ),
            new re(2, 4, 4002))
          );
        if (
          (J != 1 &&
            (B.v(
              "SegmentTemplate containes multiple segment information sources:",
              "the SegmentTemplate should only contain an index URL template,",
              "a SegmentTimeline or a segment duration.",
              m.G
            ),
            z.bc
              ? (B.info("Using the index URL template by default."),
                (z.W = null))
              : B.info("Using the SegmentTimeline by default."),
            (z.ia = null)),
          !z.bc && !z.qd)
        )
          throw (
            (B.error(
              "SegmentTemplate does not contain sufficient segment information:",
              "the SegmentTemplate's media URL template is missing.",
              m.G
            ),
            new re(2, 4, 4002))
          );
        if (z.bc) {
          if ((R = m.G.mimeType.split("/")[1]) != "mp4" && R != "webm")
            throw (
              (B.error(
                "SegmentTemplate specifies an unsupported container type.",
                m.G
              ),
              new re(2, 4, 4006))
            );
          if (R == "webm" && !x)
            throw (
              (B.error(
                "SegmentTemplate does not contain sufficient segment information:",
                "the SegmentTemplate uses a WebM container,",
                "but does not contain an initialization URL template.",
                m.G
              ),
              new re(2, 4, 4005))
            );
          (M = op(z.bc, m.G.id, null, m.bandwidth || null, null)),
            (m = Yh(m, _, x, (M = It(m.G.xa, [M])), 0, null, R, z.sa));
        } else
          z.ia
            ? (M ||
                (m.presentationTimeline.ud(z.ia),
                m.presentationTimeline.vd(m.$.start)),
              (m = (function (pe, xe) {
                var Be = pe.$.duration,
                  bt = xe.ia,
                  dt = xe.ob,
                  mt = xe.timescale,
                  xt = xe.qd,
                  Nt = pe.bandwidth || null,
                  en = pe.G.id,
                  Tn = pe.G.xa;
                return {
                  createSegmentIndex: Promise.resolve.bind(Promise),
                  findSegmentPosition: function (In) {
                    return 0 > In || (Be && In >= Be)
                      ? null
                      : Math.floor(In / bt);
                  },
                  getSegmentReference: function (In) {
                    var Qn = In * bt,
                      vr = Qn + bt;
                    return (
                      Be && (vr = Math.min(vr, Be)),
                      0 > vr || (Be && Qn >= Be)
                        ? null
                        : new Io(
                            In,
                            Qn,
                            vr,
                            function () {
                              var mr = op(xt, en, In + dt, Nt, Qn * mt);
                              return It(Tn, [mr]);
                            },
                            0,
                            null
                          )
                    );
                  },
                };
              })(m, z)))
            : ((J = _ = null),
              m.qa.id && m.G.id && (_ = R[(J = m.qa.id + "," + m.G.id)]),
              (te = (function (pe, xe) {
                for (var Be = [], bt = 0; bt < xe.W.length; bt++) {
                  var dt = bt + xe.ob;
                  Be.push(
                    new Io(
                      dt,
                      xe.W[bt].start,
                      xe.W[bt].end,
                      function (mt, xt, Nt, en, Tn, In) {
                        return It(en, [(mt = op(mt, xt, Tn, Nt, In))]).map(
                          function (Qn) {
                            return Qn.toString();
                          }
                        );
                      }.bind(
                        null,
                        xe.qd,
                        pe.G.id,
                        pe.bandwidth || null,
                        pe.G.xa,
                        dt,
                        xe.W[bt].Pg + xe.Vd
                      ),
                      0,
                      null
                    )
                  );
                }
                return Be;
              })(m, z)),
              (M = !m.zb || !m.$.ld),
              _
                ? (M && sp(new ms(te), m.$.duration),
                  _.sd(te),
                  (R = m.presentationTimeline.$b()),
                  _.Vc(R - m.$.start))
                : (m.presentationTimeline.Jb(te, m.$.start),
                  (_ = new ms(te)),
                  J && m.zb && (R[J] = _)),
              M && sp(_, m.$.duration),
              (m = {
                createSegmentIndex: Promise.resolve.bind(Promise),
                findSegmentPosition: _.find.bind(_),
                getSegmentReference: _.get.bind(_),
              }));
        return {
          createSegmentIndex: m.createSegmentIndex,
          findSegmentPosition: m.findSegmentPosition,
          getSegmentReference: m.getSegmentReference,
          initSegmentReference: x,
          sa: z.sa,
        };
      }
      function Vm(m) {
        return m.gc;
      }
      Z("shaka.media.InitSegmentReference", Ka),
        (Ka.prototype.Tc = function () {
          return this.i();
        }),
        (Ka.prototype.createUris = Ka.prototype.Tc),
        (Ka.prototype.dd = function () {
          return this.h;
        }),
        (Ka.prototype.getStartByte = Ka.prototype.dd),
        (Ka.prototype.cd = function () {
          return this.g;
        }),
        (Ka.prototype.getEndByte = Ka.prototype.cd),
        Z("shaka.media.SegmentReference", Io),
        (Io.prototype.ka = function () {
          return this.position;
        }),
        (Io.prototype.getPosition = Io.prototype.ka),
        (Io.prototype.xc = function () {
          return this.startTime;
        }),
        (Io.prototype.getStartTime = Io.prototype.xc),
        (Io.prototype.qf = function () {
          return this.endTime;
        }),
        (Io.prototype.getEndTime = Io.prototype.qf),
        (Io.prototype.Tc = function () {
          return this.i();
        }),
        (Io.prototype.createUris = Io.prototype.Tc),
        (Io.prototype.dd = function () {
          return this.h;
        }),
        (Io.prototype.getStartByte = Io.prototype.dd),
        (Io.prototype.cd = function () {
          return this.g;
        }),
        (Io.prototype.getEndByte = Io.prototype.cd),
        Z("shaka.media.SegmentIndex", ms),
        (ms.prototype.destroy = function () {
          return (this.g = null), Promise.resolve();
        }),
        (ms.prototype.destroy = ms.prototype.destroy),
        (ms.prototype.find = function (m) {
          for (var _ = this.g.length - 1, R = _; 0 <= R; --R) {
            var M = this.g[R],
              x = R < _ ? this.g[R + 1].startTime : M.endTime;
            if (m >= M.startTime && m < x) return M.position;
          }
          return this.g.length && m < this.g[0].startTime
            ? this.g[0].position
            : null;
        }),
        (ms.prototype.find = ms.prototype.find),
        (ms.prototype.get = function (m) {
          return this.g.length == 0 ||
            0 > (m -= this.g[0].position) ||
            m >= this.g.length
            ? null
            : this.g[m];
        }),
        (ms.prototype.get = ms.prototype.get),
        (ms.prototype.offset = function (m) {
          for (var _ = 0; _ < this.g.length; ++_)
            (this.g[_].startTime += m), (this.g[_].endTime += m);
        }),
        (ms.prototype.offset = ms.prototype.offset),
        (ms.prototype.sd = function (m) {
          for (var _ = [], R = 0, M = 0; R < this.g.length && M < m.length; ) {
            var x = this.g[R],
              z = m[M];
            x.startTime < z.startTime
              ? (_.push(x), R++)
              : (x.startTime > z.startTime
                  ? R == 0
                    ? _.push(z)
                    : B.v("Refusing to rewrite original references on update!")
                  : (0.1 < Math.abs(x.endTime - z.endTime)
                      ? _.push(
                          new Io(
                            x.position,
                            z.startTime,
                            z.endTime,
                            z.i,
                            z.h,
                            z.g
                          )
                        )
                      : _.push(x),
                    R++),
                M++);
          }
          for (; R < this.g.length; ) _.push(this.g[R++]);
          if (_.length)
            for (R = _[_.length - 1].position + 1; M < m.length; )
              (x = new Io(
                R++,
                (x = m[M++]).startTime,
                x.endTime,
                x.i,
                x.h,
                x.g
              )),
                _.push(x);
          else _ = m;
          this.g = _;
        }),
        (ms.prototype.merge = ms.prototype.sd),
        (ms.prototype.Vc = function (m) {
          for (var _ = 0; _ < this.g.length; ++_)
            if (this.g[_].endTime > m) return void this.g.splice(0, _);
          this.g = [];
        }),
        (ms.prototype.evict = ms.prototype.Vc),
        (mh.prototype.Ca = function () {
          return this.g.Ca();
        }),
        (u2.prototype.parse = function (m, _, R, M) {
          var x;
          if (yc((_ = new mh(new DataView(_)))).id != 440786851)
            throw (B.error("Not an EBML element."), new re(2, 3, 3008));
          var z = yc(_);
          if (z.id != 408125543)
            throw (B.error("Not a Segment element."), new re(2, 3, 3009));
          for (_ = z.g.byteOffset, z = new mh(z.g), x = null; z.Ca(); ) {
            var J = yc(z);
            if (J.id == 357149030) {
              x = J;
              break;
            }
          }
          if (!x) throw (B.error("Not an Info element."), new re(2, 3, 3010));
          for (z = new mh(x.g), x = 1e6, J = null; z.Ca(); ) {
            var te = yc(z);
            if (te.id == 2807729) x = Uu(te);
            else if (te.id == 17545)
              if ((J = te).g.byteLength == 4) J = J.g.getFloat32(0);
              else {
                if (J.g.byteLength != 8) throw new re(2, 3, 3003);
                J = J.g.getFloat64(0);
              }
          }
          if (J == null) throw new re(2, 3, 3011);
          if (
            ((x = J * (z = x / 1e9)),
            (m = yc(new mh(new DataView(m)))).id != 475249515)
          )
            throw (B.error("Not a Cues element."), new re(2, 3, 3007));
          return (function (pe, xe, Be, bt, dt, mt) {
            function xt() {
              return dt;
            }
            var Nt = [];
            pe = new mh(pe.g);
            for (var en = null, Tn = null; pe.Ca(); ) {
              var In = yc(pe);
              if (In.id == 187) {
                var Qn = Zv(In);
                Qn &&
                  ((In = Be * Qn.Qg),
                  (Qn = xe + Qn.qg),
                  en != null &&
                    Nt.push(
                      new Io(Nt.length, en - mt, In - mt, xt, Tn, Qn - 1)
                    ),
                  (en = In),
                  (Tn = Qn));
              }
            }
            return (
              en != null &&
                Nt.push(new Io(Nt.length, en - mt, bt - mt, xt, Tn, null)),
              Nt
            );
          })(m, _, z, x, R, M);
        });
      var ia = {
        Nb: {},
        cc: {},
        Fd: function (m, _) {
          ia.cc[m] = _;
        },
      };
      function Vr(m, _, R) {
        (this.j = m),
          (this.Ic = _),
          (this.m = this.l = 1 / 0),
          (this.g = 1),
          (this.h = this.i = null),
          (this.u = 0),
          (this.A = !0),
          (this.o = 0),
          (this.C = R === void 0 || R);
      }
      function Qh(m, _, R, M) {
        return (
          (m = ut(m, M)),
          (_ == 0 && R == null) ||
            (m.headers.Range = R ? "bytes=" + _ + "-" + R : "bytes=" + _ + "-"),
          m
        );
      }
      function Bu() {
        var m = this;
        (this.h = this.g = null),
          (this.j = []),
          (this.i = null),
          (this.u = []),
          (this.m = 1),
          (this.A = {}),
          (this.C = 0),
          (this.F = new Ne(5)),
          (this.o = new Ut(function () {
            (function (_) {
              k(function R() {
                var M, x;
                return $t(R, function (z) {
                  switch (z.s) {
                    case 1:
                      return (
                        B.info("Updating manifest..."),
                        (M = 0),
                        L(z, 2),
                        E(z, ql(_), 4)
                      );
                    case 4:
                      (M = z.B), F(z, 3);
                      break;
                    case 2:
                      (x = oe(z)), _.h && ((x.severity = 1), _.h.onError(x));
                    case 3:
                      if (!_.h) return z.return();
                      Bi(_, M), S(z);
                  }
                });
              });
            })(m);
          })),
          (this.l = new wn());
      }
      function ql(m) {
        var _ = Date.now(),
          R = m.h.networkingEngine.request(0, ut(m.j, m.g.retryParameters));
        return (
          Vn(m.l, R),
          R.promise
            .then(function (M) {
              if (m.h)
                return (
                  M.uri && !m.j.includes(M.uri) && m.j.unshift(M.uri),
                  (function (x, z, J) {
                    if (((z = Hr.ze(z, "MPD")), !z))
                      throw new re(2, 4, 4001, J);
                    return (
                      (z = ry(
                        z,
                        x.g.retryParameters,
                        x.g.dash.xlinkFailGracefully,
                        J,
                        x.h.networkingEngine
                      )),
                      Vn(x.l, z),
                      z.promise.then(function (te) {
                        return (function (pe, xe, Be) {
                          return k(function bt() {
                            var dt,
                              mt,
                              xt,
                              Nt,
                              en,
                              Tn,
                              In,
                              Qn,
                              vr,
                              mr,
                              bi,
                              Ur,
                              Jr,
                              dr,
                              Br,
                              oi,
                              ki,
                              Or,
                              ri,
                              Yi,
                              Ba,
                              wa,
                              Po,
                              go;
                            return $t(bt, function (Pa) {
                              switch (Pa.s) {
                                case 1:
                                  (Nt = rn),
                                    (Tn = [Be]),
                                    0 <
                                      (In = (en = Hr)
                                        .Y(xe, "Location")
                                        .map(en.uc)
                                        .filter(Nt.Ra)).length &&
                                      ((Qn = It(Tn, In)), (Tn = pe.j = Qn)),
                                    (vr = en.Y(xe, "BaseURL").map(en.uc)),
                                    (mr = It(Tn, vr)),
                                    (bi = pe.g.dash.ignoreMinBufferTime),
                                    (Ur = 0),
                                    bi ||
                                      (Ur = en.R(xe, "minBufferTime", en.Ma)),
                                    (pe.C = en.R(
                                      xe,
                                      "minimumUpdatePeriod",
                                      en.Ma,
                                      -1
                                    )),
                                    (Jr = en.R(
                                      xe,
                                      "availabilityStartTime",
                                      en.jg
                                    )),
                                    (dr = en.R(
                                      xe,
                                      "timeShiftBufferDepth",
                                      en.Ma
                                    )),
                                    (Br = en.R(
                                      xe,
                                      "maxSegmentDuration",
                                      en.Ma
                                    )),
                                    (oi = xe.getAttribute("type") || "static"),
                                    (ki =
                                      pe.g.dash
                                        .ignoreSuggestedPresentationDelay),
                                    (Or = null),
                                    ki ||
                                      (Or = en.R(
                                        xe,
                                        "suggestedPresentationDelay",
                                        en.Ma
                                      )),
                                    pe.i
                                      ? (ri = pe.i.presentationTimeline)
                                      : ((Yi = Math.max(
                                          pe.g.dash.defaultPresentationDelay,
                                          1.5 * Ur
                                        )),
                                        (ri = new Vr(
                                          Jr,
                                          Or ?? Yi,
                                          pe.g.dash.autoCorrectDrift
                                        )));
                                  for (
                                    var Ha = {
                                        zb: oi != "static",
                                        presentationTimeline: ri,
                                        qa: null,
                                        $: null,
                                        fa: null,
                                        G: null,
                                        bandwidth: 0,
                                        me: !1,
                                      },
                                      zi = mr,
                                      ha = Hr.R(
                                        xe,
                                        "mediaPresentationDuration",
                                        Hr.Ma
                                      ),
                                      Xa = [],
                                      Li = 0,
                                      Ma = Hr.Y(xe, "Period"),
                                      ra = 0;
                                    ra < Ma.length;
                                    ra++
                                  ) {
                                    var mo = Ma[ra];
                                    Li = Hr.R(mo, "start", Hr.Ma, Li);
                                    var Fo = Hr.R(mo, "duration", Hr.Ma),
                                      vs = null;
                                    if (ra != Ma.length - 1) {
                                      var gd = Hr.R(Ma[ra + 1], "start", Hr.Ma);
                                      gd != null && (vs = gd - Li);
                                    } else ha != null && (vs = ha - Li);
                                    if (
                                      ((gd = Wt),
                                      vs &&
                                        Fo &&
                                        Math.abs(vs - Fo) > gd &&
                                        B.v(
                                          "There is a gap/overlap between Periods",
                                          mo
                                        ),
                                      vs == null && (vs = Fo),
                                      (mo = c2(pe, Ha, zi, {
                                        start: Li,
                                        duration: vs,
                                        node: mo,
                                        ld: vs == null || ra == Ma.length - 1,
                                      })),
                                      Xa.push(mo),
                                      (Fo = Ha.qa.id),
                                      pe.u.includes(Fo) ||
                                        (pe.u.push(Fo),
                                        pe.i &&
                                          (pe.h.filterNewPeriod(mo),
                                          pe.i.periods.push(mo))),
                                      vs == null)
                                    ) {
                                      ra != Ma.length - 1 &&
                                        B.v(
                                          "Skipping Period",
                                          ra + 1,
                                          "and any subsequent Periods:",
                                          "Period",
                                          ra + 1,
                                          "does not have a valid start time.",
                                          Xa[ra + 1]
                                        ),
                                        (Li = null);
                                      break;
                                    }
                                    Li += vs;
                                  }
                                  if (
                                    (pe.i == null && pe.h.filterAllPeriods(Xa),
                                    ha != null
                                      ? (Li != ha &&
                                          B.v(
                                            "@mediaPresentationDuration does not match the total duration of all",
                                            "Periods."
                                          ),
                                        (dt = Xa),
                                        (mt = ha),
                                        (xt = !1))
                                      : ((dt = Xa), (mt = Li), (xt = !0)),
                                    (Ba = mt),
                                    (wa = dt),
                                    ri.hc(oi == "static"),
                                    (oi != "static" && xt) ||
                                      ri.Fa(Ba || 1 / 0),
                                    ri.aa() &&
                                      !isNaN(pe.g.availabilityWindowOverride) &&
                                      (dr = pe.g.availabilityWindowOverride),
                                    dr == null && (dr = 1 / 0),
                                    ri.Pd(dr),
                                    ri.ud(Br || 1),
                                    pe.i)
                                  ) {
                                    Pa.I(0);
                                    break;
                                  }
                                  if (
                                    ((pe.i = {
                                      presentationTimeline: ri,
                                      periods: wa,
                                      offlineSessionIds: [],
                                      minBufferTime: Ur || 0,
                                    }),
                                    !ri.Pe())
                                  ) {
                                    Pa.I(0);
                                    break;
                                  }
                                  return (
                                    (Po = en.Y(xe, "UTCTiming")),
                                    E(
                                      Pa,
                                      (function (rf, bh, ac) {
                                        ac = ac.map(function (oc) {
                                          return {
                                            scheme:
                                              oc.getAttribute("schemeIdUri"),
                                            value: oc.getAttribute("value"),
                                          };
                                        });
                                        var hp = rf.g.dash.clockSyncUri;
                                        return (
                                          !ac.length &&
                                            hp &&
                                            ac.push({
                                              scheme:
                                                "urn:mpeg:dash:utc:http-head:2014",
                                              value: hp,
                                            }),
                                          rn
                                            .df(
                                              ac,
                                              function (oc) {
                                                var af = oc.scheme;
                                                switch (((oc = oc.value), af)) {
                                                  case "urn:mpeg:dash:utc:http-head:2014":
                                                  case "urn:mpeg:dash:utc:http-head:2012":
                                                    return l_(
                                                      this,
                                                      bh,
                                                      oc,
                                                      "HEAD"
                                                    );
                                                  case "urn:mpeg:dash:utc:http-xsdate:2014":
                                                  case "urn:mpeg:dash:utc:http-iso:2014":
                                                  case "urn:mpeg:dash:utc:http-xsdate:2012":
                                                  case "urn:mpeg:dash:utc:http-iso:2012":
                                                    return l_(
                                                      this,
                                                      bh,
                                                      oc,
                                                      "GET"
                                                    );
                                                  case "urn:mpeg:dash:utc:direct:2014":
                                                  case "urn:mpeg:dash:utc:direct:2012":
                                                    return (
                                                      (af = Date.parse(oc)),
                                                      isNaN(af)
                                                        ? 0
                                                        : af - Date.now()
                                                    );
                                                  case "urn:mpeg:dash:utc:http-ntp:2014":
                                                  case "urn:mpeg:dash:utc:ntp:2014":
                                                  case "urn:mpeg:dash:utc:sntp:2014":
                                                    return (
                                                      B.ba(
                                                        "NTP UTCTiming scheme is not supported"
                                                      ),
                                                      Promise.reject()
                                                    );
                                                  default:
                                                    return (
                                                      B.ba(
                                                        "Unrecognized scheme in UTCTiming element",
                                                        af
                                                      ),
                                                      Promise.reject()
                                                    );
                                                }
                                              }.bind(rf)
                                            )
                                            .catch(function () {
                                              return (
                                                B.ba(
                                                  "A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"
                                                ),
                                                0
                                              );
                                            })
                                        );
                                      })(pe, mr, Po),
                                      4
                                    )
                                  );
                                case 4:
                                  if (((go = Pa.B), !pe.h)) return Pa.return();
                                  ri.Ke(go), S(Pa);
                              }
                            });
                          });
                        })(x, te, J);
                      })
                    );
                  })(m, M.data, M.uri)
                );
            })
            .then(function () {
              var M = (Date.now() - _) / 1e3;
              return Pe(m.F, 1, M), M;
            })
        );
      }
      function c2(m, _, R, M) {
        if (
          ((_.qa = s_(M.node, null, R)),
          (_.$ = M),
          _.qa.id ||
            (B.info(
              "No Period ID given for Period with start time " +
                M.start +
                ",  Assigning a default"
            ),
            (_.qa.id = "__shaka_period_" + M.start)),
          Hr.Y(M.node, "EventStream").forEach(
            m.kg.bind(m, M.start, M.duration)
          ),
          (R = Hr.Y(M.node, "AdaptationSet")
            .map(m.ig.bind(m, _))
            .filter(rn.Ra)),
          _.zb)
        ) {
          _ = [];
          for (var x = b(R), z = x.next(); !z.done; z = x.next())
            for (var J = (z = b(z.value.tg)).next(); !J.done; J = z.next())
              _.push(J.value);
          if (_.length != new Set(_).size) throw new re(2, 4, 4018);
        }
        var te = R.filter(function (pe) {
          return !pe.Td;
        });
        if (
          (R.filter(function (pe) {
            return pe.Td;
          }).forEach(function (pe) {
            var xe = pe.Td.split(" ");
            te.forEach(function (Be) {
              xe.includes(Be.id) &&
                Be.streams.forEach(function (bt) {
                  bt.trickModeVideo = pe.streams.find(function (dt) {
                    return Ki(bt.codecs)[0] == Ki(dt.codecs)[0];
                  });
                });
            });
          }),
          (_ = o_(te, "video")),
          (x = o_(te, "audio")),
          !_.length && !x.length)
        )
          throw new re(2, 4, 4004);
        for (
          R = m.g.disableAudio,
            (x.length && !R) || (x = [null]),
            R = m.g.disableVideo,
            (_.length && !R) || (_ = [null]),
            R = [],
            z = 0;
          z < x.length;
          z++
        )
          for (J = 0; J < _.length; J++) vu(m, x[z], _[J], R);
        if (((_ = []), !m.g.disableText))
          for (m = o_(te, "text"), x = 0; x < m.length; x++)
            _.push.apply(_, m[x].streams);
        return { startTime: M.start, textStreams: _, variants: R };
      }
      function o_(m, _) {
        return m.filter(function (R) {
          return R.contentType == _;
        });
      }
      function vu(m, _, R, M) {
        if (_ || R)
          if (_ && R) {
            var x = _.drmInfos,
              z = R.drmInfos;
            if (!x.length || !z.length || 0 < Lv(x, z).length) {
              z = Lv(_.drmInfos, R.drmInfos);
              for (var J = 0; J < _.streams.length; J++)
                for (var te = 0; te < R.streams.length; te++)
                  (x =
                    (R.streams[te].bandwidth || 0) +
                    (_.streams[J].bandwidth || 0)),
                    (x = {
                      id: m.m++,
                      language: _.language,
                      primary: _.pd || R.pd,
                      audio: _.streams[J],
                      video: R.streams[te],
                      bandwidth: x,
                      drmInfos: z,
                      allowedByApplication: !0,
                      allowedByKeySystem: !0,
                    }),
                    M.push(x);
            }
          } else
            for (z = _ || R, J = 0; J < z.streams.length; J++)
              (x = z.streams[J].bandwidth || 0),
                (x = {
                  id: m.m++,
                  language: z.language || "und",
                  primary: z.pd,
                  audio: _ ? z.streams[J] : null,
                  video: R ? z.streams[J] : null,
                  bandwidth: x,
                  drmInfos: z.drmInfos,
                  allowedByApplication: !0,
                  allowedByKeySystem: !0,
                }),
                M.push(x);
      }
      function Bi(m, _) {
        0 > m.C || m.o.V(Math.max(3, m.C - _, kt(m.F)));
      }
      function s_(m, _, R) {
        (_ = _ || {
          contentType: "",
          mimeType: "",
          codecs: "",
          emsgSchemeIdUris: [],
          frameRate: void 0,
          wd: null,
          audioSamplingRate: null,
        }),
          (R = R || _.xa);
        var M = Hr.Mb,
          x = Hr.ff,
          z = Hr.Y(m, "BaseURL").map(Hr.uc),
          J = m.getAttribute("contentType") || _.contentType,
          te = m.getAttribute("mimeType") || _.mimeType,
          pe = m.getAttribute("codecs") || _.codecs;
        x = Hr.R(m, "frameRate", x) || _.frameRate;
        for (
          var xe = m.getAttribute("sar") || _.pixelAspectRatio,
            Be = Hr.Y(m, "InbandEventStream"),
            bt = _.emsgSchemeIdUris.slice(),
            dt = (Be = b(Be)).next();
          !dt.done;
          dt = Be.next()
        )
          (dt = dt.value.getAttribute("schemeIdUri")),
            bt.includes(dt) || bt.push(dt);
        return (
          (Be =
            (function (mt) {
              for (var xt = 0; xt < mt.length; ++xt) {
                var Nt = mt[xt],
                  en = Nt.getAttribute("schemeIdUri");
                if (en && (Nt = Nt.getAttribute("value")))
                  switch (en) {
                    case "urn:mpeg:dash:outputChannelPositionList:2012":
                      return Nt.trim().split(/ +/).length;
                    case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":
                    case "urn:dts:dash:audio_channel_configuration:2012":
                      var Tn = parseInt(Nt, 10);
                      if (!Tn) {
                        B.v(
                          "Channel parsing failure! Ignoring scheme and value",
                          en,
                          Nt
                        );
                        continue;
                      }
                      return Tn;
                    case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":
                    case "urn:dolby:dash:audio_channel_configuration:2011":
                      if (!(Tn = parseInt(Nt, 16))) {
                        B.v(
                          "Channel parsing failure! Ignoring scheme and value",
                          en,
                          Nt
                        );
                        continue;
                      }
                      for (mt = 0; Tn; ) 1 & Tn && ++mt, (Tn >>= 1);
                      return mt;
                    default:
                      B.v("Unrecognized audio channel scheme:", en, Nt);
                  }
              }
              return null;
            })((Be = Hr.Y(m, "AudioChannelConfiguration"))) || _.wd),
          (dt = Hr.R(m, "audioSamplingRate", M) || _.audioSamplingRate),
          J || (J = d2(te, pe)),
          {
            xa: It(R, z),
            ec: Hr.sc(m, "SegmentBase") || _.ec,
            Ua: Hr.sc(m, "SegmentList") || _.Ua,
            gc: Hr.sc(m, "SegmentTemplate") || _.gc,
            width: Hr.R(m, "width", M) || _.width,
            height: Hr.R(m, "height", M) || _.height,
            contentType: J,
            mimeType: te,
            codecs: pe,
            frameRate: x,
            pixelAspectRatio: xe,
            emsgSchemeIdUris: bt,
            id: m.getAttribute("id"),
            wd: Be,
            audioSamplingRate: dt,
          }
        );
      }
      function l_(m, _, R, M) {
        return (
          ((_ = ut((_ = It(_, [R])), m.g.retryParameters)).method = M),
          (_ = m.h.networkingEngine.request(4, _)),
          Vn(m.l, _),
          _.promise.then(function (x) {
            if (M == "HEAD") {
              if (!x.headers || !x.headers.date)
                return (
                  B.v("UTC timing response is missing", "expected date header"),
                  0
                );
              x = x.headers.date;
            } else x = un(x.data);
            return (
              (x = Date.parse(x)),
              isNaN(x)
                ? (B.v("Unable to parse date from UTC timing response"), 0)
                : x - Date.now()
            );
          })
        );
      }
      function d2(m, _) {
        return hg(Aa(m, _)) ? "text" : m.split("/")[0];
      }
      function u_(m, _, R, M) {
        (this.h = m),
          (this.type = _),
          (this.g = R),
          (this.segments = M || null);
      }
      function c_(m, _, R, M) {
        (this.id = m),
          (this.name = _),
          (this.g = R),
          (this.value = M === void 0 ? null : M);
      }
      function d_(m, _) {
        (this.name = m), (this.value = _);
      }
      function ys(m, _, R) {
        return (m = m.getAttribute(_)) ? m.value : R || null;
      }
      function iy(m, _) {
        (this.h = _), (this.g = m);
      }
      Z("shaka.media.ManifestParser.registerParserByExtension", ia.Fd),
        (ia.Qb = function (m, _) {
          ia.Nb[m] = _;
        }),
        Z("shaka.media.ManifestParser.registerParserByMime", ia.Qb),
        (ia.ng = function () {
          var m = {};
          if (Xo()) {
            for (var _ in ia.Nb) m[_] = !0;
            for (var R in ia.cc) m[R] = !0;
          }
          _ = {
            mpd: "application/dash+xml",
            m3u8: "application/x-mpegurl",
            ism: "application/vnd.ms-sstr+xml",
          };
          for (
            var M = (R = b([
              "application/dash+xml",
              "application/x-mpegurl",
              "application/vnd.apple.mpegurl",
              "application/vnd.ms-sstr+xml",
            ])).next();
            !M.done;
            M = R.next()
          )
            m[(M = M.value)] = Xo() ? !!ia.Nb[M] : Ns(M);
          for (var x in _) m[x] = Xo() ? !!ia.cc[x] : Ns(_[x]);
          return m;
        }),
        (ia.create = function (m, _, R, M) {
          return k(function x() {
            var z, J;
            return $t(x, function (te) {
              switch (te.s) {
                case 1:
                  return L(te, 2), E(te, ia.rf(m, _, R, M), 4);
                case 4:
                  return (z = te.B), te.return(new z());
                case 2:
                  throw (((J = oe(te)).severity = 2), J);
              }
            });
          });
        }),
        (ia.rf = function (m, _, R, M) {
          return k(function x() {
            var z, J, te, pe, xe;
            return $t(x, function (Be) {
              switch (Be.s) {
                case 1:
                  if (((z = ia), M)) {
                    if ((J = z.Nb[M.toLowerCase()])) return Be.return(J);
                    B.v(
                      "Could not determine manifest type using MIME type ",
                      M
                    );
                  }
                  if ((te = z.getExtension(m))) {
                    if ((pe = z.cc[te])) return Be.return(pe);
                    B.v("Could not determine manifest type for extension ", te);
                  } else B.v("Could not find extension for ", m);
                  if (M) {
                    Be.I(2);
                    break;
                  }
                  return E(Be, z.zf(m, _, R), 3);
                case 3:
                  if ((M = Be.B)) {
                    if ((xe = ia.Nb[M])) return Be.return(xe);
                    B.v("Could not determine manifest type using MIME type", M);
                  }
                case 2:
                  throw new re(2, 4, 4e3, m);
              }
            });
          });
        }),
        (ia.zf = function (m, _, R) {
          return k(function M() {
            var x, z, J;
            return $t(M, function (te) {
              switch (te.s) {
                case 1:
                  return (
                    ((x = ut([m], R)).method = "HEAD"),
                    E(te, _.request(0, x).promise, 2)
                  );
                case 2:
                  return (
                    (z = te.B),
                    (J = z.headers["content-type"]),
                    te.return(J ? J.toLowerCase().split(";").shift() : "")
                  );
              }
            });
          });
        }),
        (ia.getExtension = function (m) {
          return (m = new lt(m).pa.split("/").pop().split(".")).length == 1
            ? ""
            : m.pop().toLowerCase();
        }),
        (ia.isSupported = function (m, _) {
          return !!Xo() && (_ in ia.Nb || ia.getExtension(m) in ia.cc);
        }),
        Z("shaka.media.PresentationTimeline", Vr),
        (Vr.prototype.ha = function () {
          return this.l;
        }),
        (Vr.prototype.getDuration = Vr.prototype.ha),
        (Vr.prototype.xf = function () {
          return this.g;
        }),
        (Vr.prototype.getMaxSegmentDuration = Vr.prototype.xf),
        (Vr.prototype.Fa = function (m) {
          this.l = m;
        }),
        (Vr.prototype.setDuration = Vr.prototype.Fa),
        (Vr.prototype.Ff = function () {
          return this.j;
        }),
        (Vr.prototype.getPresentationStartTime = Vr.prototype.Ff),
        (Vr.prototype.Ke = function (m) {
          this.u = m;
        }),
        (Vr.prototype.setClockOffset = Vr.prototype.Ke),
        (Vr.prototype.hc = function (m) {
          this.A = m;
        }),
        (Vr.prototype.setStatic = Vr.prototype.hc),
        (Vr.prototype.Pd = function (m) {
          this.m = m;
        }),
        (Vr.prototype.setSegmentAvailabilityDuration = Vr.prototype.Pd),
        (Vr.prototype.Ag = function (m) {
          this.Ic = m;
        }),
        (Vr.prototype.setDelay = Vr.prototype.Ag),
        (Vr.prototype.pf = function () {
          return this.Ic;
        }),
        (Vr.prototype.getDelay = Vr.prototype.pf),
        (Vr.prototype.Jb = function (m, _) {
          if (m.length != 0) {
            var R = m[m.length - 1].endTime + _;
            this.vd(m[0].startTime + _),
              (this.g = m.reduce(function (M, x) {
                return Math.max(M, x.endTime - x.startTime);
              }, this.g)),
              (this.h = Math.max(this.h, R)),
              this.j != null &&
                this.C &&
                (this.j = (Date.now() + this.u) / 1e3 - this.h - this.g),
              B.K("notifySegments:", "maxSegmentDuration=" + this.g);
          }
        }),
        (Vr.prototype.notifySegments = Vr.prototype.Jb),
        (Vr.prototype.vd = function (m) {
          this.i = this.i == null ? m : Math.min(this.i, m);
        }),
        (Vr.prototype.notifyMinSegmentStartTime = Vr.prototype.vd),
        (Vr.prototype.ud = function (m) {
          (this.g = Math.max(this.g, m)),
            B.K("notifyNewSegmentDuration:", "maxSegmentDuration=" + this.g);
        }),
        (Vr.prototype.notifyMaxSegmentDuration = Vr.prototype.ud),
        (Vr.prototype.offset = function (m) {
          this.i != null && (this.i += m), this.h != null && (this.h += m);
        }),
        (Vr.prototype.offset = Vr.prototype.offset),
        (Vr.prototype.aa = function () {
          return 1 / 0 == this.l && !this.A;
        }),
        (Vr.prototype.isLive = Vr.prototype.aa),
        (Vr.prototype.ib = function () {
          return 1 / 0 != this.l && !this.A;
        }),
        (Vr.prototype.isInProgress = Vr.prototype.ib),
        (Vr.prototype.$b = function () {
          if (1 / 0 == this.m) return this.o;
          var m = this.Db() - this.m;
          return Math.max(this.o, m);
        }),
        (Vr.prototype.getSegmentAvailabilityStart = Vr.prototype.$b),
        (Vr.prototype.Le = function (m) {
          this.o = m;
        }),
        (Vr.prototype.setUserSeekStart = Vr.prototype.Le),
        (Vr.prototype.Db = function () {
          return this.aa() || this.ib()
            ? Math.min(
                Math.max(0, (Date.now() + this.u) / 1e3 - this.g - this.j),
                this.l
              )
            : this.l;
        }),
        (Vr.prototype.getSegmentAvailabilityEnd = Vr.prototype.Db),
        (Vr.prototype.Zb = function (m) {
          var _ = Math.max(this.i, this.o);
          if (1 / 0 == this.m) return Math.ceil(1e3 * _) / 1e3;
          var R = this.Db() - this.m;
          return (m = Math.min(R + m, this.Ka())), Math.max(_, m);
        }),
        (Vr.prototype.getSafeSeekRangeStart = Vr.prototype.Zb),
        (Vr.prototype.Cb = function () {
          return this.Zb(0);
        }),
        (Vr.prototype.getSeekRangeStart = Vr.prototype.Cb),
        (Vr.prototype.Ka = function () {
          var m = this.aa() || this.ib() ? this.Ic : 0;
          return Math.max(0, this.Db() - m);
        }),
        (Vr.prototype.getSeekRangeEnd = Vr.prototype.Ka),
        (Vr.prototype.Pe = function () {
          return !(this.j == null || (this.h != null && this.C));
        }),
        (Vr.prototype.usingPresentationStartTime = Vr.prototype.Pe),
        Z("shaka.dash.DashParser", Bu),
        ((u = Bu.prototype).configure = function (m) {
          this.g = m;
        }),
        (u.start = function (m, _) {
          var R = this;
          return k(function M() {
            var x;
            return $t(M, function (z) {
              switch (z.s) {
                case 1:
                  return (R.j = [m]), (R.h = _), E(z, ql(R), 2);
                case 2:
                  if (((x = z.B), R.h && Bi(R, x), !R.h))
                    throw new re(2, 7, 7001);
                  return z.return(R.i);
              }
            });
          });
        }),
        (u.stop = function () {
          return (
            (this.g = this.h = null),
            (this.j = []),
            (this.i = null),
            (this.u = []),
            (this.A = {}),
            this.o != null && (this.o.stop(), (this.o = null)),
            this.l.destroy()
          );
        }),
        (u.update = function () {
          ql(this).catch(
            function (m) {
              this.h && this.h.onError(m);
            }.bind(this)
          );
        }),
        (u.onExpirationUpdated = function () {}),
        (u.ig = function (m, _) {
          if (((m.fa = s_(_, m.qa, null)), m.fa.contentType == "image"))
            return B.v("Skipping Image AdaptationSet", m.fa), null;
          var R = !1,
            M = Hr.Y(_, "Role"),
            x = M.map(function (xt) {
              return xt.getAttribute("value");
            }).filter(rn.Ra),
            z = void 0,
            J = m.fa.contentType == "text";
          J && (z = "subtitle");
          for (var te = 0; te < M.length; te++) {
            var pe = M[te].getAttribute("schemeIdUri");
            if (pe == null || pe == "urn:mpeg:dash:role:2011")
              switch (((pe = M[te].getAttribute("value")), pe)) {
                case "main":
                  R = !0;
                  break;
                case "caption":
                case "subtitle":
                  z = pe;
              }
          }
          var xe = null,
            Be = !1;
          Hr.Y(_, "EssentialProperty").forEach(function (xt) {
            xt.getAttribute("schemeIdUri") ==
            "http://dashif.org/guidelines/trickmode"
              ? (xe = xt.getAttribute("value"))
              : (Be = !0);
          }),
            (te = Hr.Y(_, "Accessibility"));
          var bt = new Map();
          for (
            M = {}, pe = (te = b(te)).next();
            !pe.done;
            M = { Vb: M.Vb }, pe = te.next()
          ) {
            var dt = pe.value;
            (pe = dt.getAttribute("schemeIdUri")),
              (dt = dt.getAttribute("value")),
              pe == "urn:scte:dash:cc:cea-608:2015" ||
              pe == "urn:scte:dash:cc:cea-708:2015"
                ? ((M.Vb = 1),
                  dt != null
                    ? dt.split(";").forEach(
                        (function (xt) {
                          return function (Nt) {
                            if (Nt.includes("=")) {
                              var en = (Nt = Nt.split("="))[0].startsWith("CC")
                                ? Nt[0]
                                : "CC" + Nt[0];
                              Nt = Nt[1].split(",")[0].split(":").pop();
                            } else (en = "CC" + xt.Vb), (xt.Vb += 2);
                            bt.set(en, Ia(Nt));
                          };
                        })(M)
                      )
                    : bt.set("CC1", "und"))
                : pe == "urn:mpeg:dash:role:2011" &&
                  dt != null &&
                  (x.push(dt), dt == "captions" && (z = "caption"));
          }
          if (Be) return null;
          var mt = n_(
            (M = Hr.Y(_, "ContentProtection")),
            this.g.dash.customScheme,
            this.g.dash.ignoreDrmInfo
          );
          if (
            ((M = Ia(_.getAttribute("lang") || "und")),
            (te = _.getAttribute("label")),
            (pe = Hr.Y(_, "Label")) &&
              pe.length &&
              (pe = pe[0]).textContent &&
              (te = pe.textContent),
            (x = (pe = Hr.Y(_, "Representation"))
              .map(this.lg.bind(this, m, mt, z, M, te, R, x, bt))
              .filter(function (xt) {
                return !!xt;
              })).length == 0)
          ) {
            if (this.g.dash.ignoreEmptyAdaptationSet || J) return null;
            throw new re(2, 4, 4003);
          }
          return (
            (m.fa.contentType && m.fa.contentType != "application") ||
              ((m.fa.contentType = d2(x[0].mimeType, x[0].codecs)),
              x.forEach(function (xt) {
                xt.type = m.fa.contentType;
              })),
            x.forEach(function (xt) {
              mt.drmInfos.forEach(function (Nt) {
                xt.keyId && Nt.keyIds.push(xt.keyId);
              });
            }),
            (J = pe
              .map(function (xt) {
                return xt.getAttribute("id");
              })
              .filter(rn.Ra)),
            {
              id: m.fa.id || "__fake__" + this.m++,
              contentType: m.fa.contentType,
              language: M,
              pd: R,
              streams: x,
              drmInfos: mt.drmInfos,
              Td: xe,
              tg: J,
            }
          );
        }),
        (u.lg = function (m, _, R, M, x, z, J, te, pe) {
          if (
            ((m.G = s_(pe, m.fa, null)),
            !(function (xt) {
              var Nt = xt.ec ? 1 : 0;
              return (
                (Nt += xt.Ua ? 1 : 0),
                (Nt += xt.gc ? 1 : 0),
                Nt == 0
                  ? xt.contentType == "text" ||
                    xt.contentType == "application" ||
                    (B.v(
                      "Representation does not contain a segment information source:",
                      "the Representation must contain one of SegmentBase, SegmentList,",
                      'SegmentTemplate, or explicitly indicate that it is "text".',
                      xt
                    ),
                    !1)
                  : (Nt != 1 &&
                      (B.v(
                        "Representation contains multiple segment information sources:",
                        "the Representation should only contain one of SegmentBase,",
                        "SegmentList, or SegmentTemplate.",
                        xt
                      ),
                      xt.ec
                        ? (B.info("Using SegmentBase by default."),
                          (xt.Ua = null))
                        : B.info("Using SegmentList by default."),
                      (xt.gc = null)),
                    !0)
              );
            })(m.G))
          )
            return B.v("Skipping Representation", m.G), null;
          m.bandwidth = Hr.R(pe, "bandwidth", Hr.Gc) || 0;
          var xe = m.G.contentType;
          xe = xe == "text" || xe == "application";
          try {
            var Be = this.ug.bind(this);
            if (m.G.ec)
              var bt = (function (xt, Nt) {
                var en = Number(Gd(xt, Xm, "presentationTimeOffset")) || 0,
                  Tn = Gd(xt, Xm, "timescale"),
                  In = 1;
                Tn && (In = Hr.Gc(Tn) || 1),
                  (en = en / In || 0),
                  (Tn = a_(xt, Xm));
                var Qn = xt.G.contentType;
                if (
                  ((In = xt.G.mimeType.split("/")[1]),
                  Qn != "text" && In != "mp4" && In != "webm")
                )
                  throw (
                    (B.error(
                      "SegmentBase specifies an unsupported container type.",
                      xt.G
                    ),
                    new re(2, 4, 4006))
                  );
                if (In == "webm" && !Tn)
                  throw (
                    (B.error(
                      "SegmentBase does not contain sufficient segment information:",
                      "the SegmentBase uses a WebM container,",
                      "but does not contain an Initialization element.",
                      xt.G
                    ),
                    new re(2, 4, 4005))
                  );
                Qn = i_(xt, Xm, "RepresentationIndex");
                var vr = Gd(xt, Xm, "indexRange"),
                  mr = xt.G.xa;
                if (((vr = Hr.Hc(vr || "")), Qn)) {
                  var bi = Qn.getAttribute("sourceURL");
                  bi && (mr = It(xt.G.xa, [bi])),
                    (vr = Hr.R(Qn, "range", Hr.Hc, vr));
                }
                if (!vr)
                  throw (
                    (B.error(
                      "SegmentBase does not contain sufficient segment information:",
                      "the SegmentBase does not contain @indexRange",
                      "or a RepresentationIndex element.",
                      xt.G
                    ),
                    new re(2, 4, 4002))
                  );
                return {
                  createSegmentIndex: (In = Yh(
                    xt,
                    Nt,
                    Tn,
                    mr,
                    vr.start,
                    vr.end,
                    In,
                    en
                  )).createSegmentIndex,
                  findSegmentPosition: In.findSegmentPosition,
                  getSegmentReference: In.getSegmentReference,
                  initSegmentReference: Tn,
                  sa: en,
                };
              })(m, Be);
            else if (m.G.Ua) bt = Yv(m, this.A);
            else if (m.G.gc) bt = qa(m, Be, this.A, !!this.i);
            else {
              var dt = m.G.xa,
                mt = m.$.duration || 0;
              bt = {
                createSegmentIndex: Promise.resolve.bind(Promise),
                findSegmentPosition: function (xt) {
                  return 0 <= xt && xt < mt ? 1 : null;
                },
                getSegmentReference: function (xt) {
                  return xt != 1
                    ? null
                    : new Io(
                        1,
                        0,
                        mt,
                        function () {
                          return dt;
                        },
                        0,
                        null
                      );
                },
                initSegmentReference: null,
                sa: 0,
              };
            }
          } catch (xt) {
            if (xe && xt.code == 4002) return null;
            throw xt;
          }
          return (
            (pe = (function (xt, Nt, en, Tn) {
              var In = n_(xt, Nt, Tn);
              if (en.ge)
                (xt = en.drmInfos.length == 1 && !en.drmInfos[0].keySystem),
                  (Nt = In.drmInfos.length == 0),
                  (en.drmInfos.length == 0 || (xt && !Nt)) &&
                    (en.drmInfos = In.drmInfos),
                  (en.ge = !1);
              else if (
                0 < In.drmInfos.length &&
                ((en.drmInfos = en.drmInfos.filter(function (Qn) {
                  return In.drmInfos.some(function (vr) {
                    return vr.keySystem == Qn.keySystem;
                  });
                })),
                en.drmInfos.length == 0)
              )
                throw new re(2, 4, 4008);
              return In.be || en.be;
            })(
              (pe = Hr.Y(pe, "ContentProtection")),
              this.g.dash.customScheme,
              _,
              this.g.dash.ignoreDrmInfo
            )),
            {
              id: this.m++,
              originalId: m.G.id,
              createSegmentIndex: bt.createSegmentIndex,
              findSegmentPosition: bt.findSegmentPosition,
              getSegmentReference: bt.getSegmentReference,
              initSegmentReference: bt.initSegmentReference,
              presentationTimeOffset: bt.sa,
              mimeType: m.G.mimeType,
              codecs: m.G.codecs,
              frameRate: m.G.frameRate,
              pixelAspectRatio: m.G.pixelAspectRatio,
              bandwidth: m.bandwidth,
              width: m.G.width,
              height: m.G.height,
              kind: R,
              encrypted: 0 < _.drmInfos.length,
              keyId: pe,
              language: M,
              label: x,
              type: m.fa.contentType,
              primary: z,
              trickModeVideo: null,
              emsgSchemeIdUris: m.G.emsgSchemeIdUris,
              roles: J,
              channelsCount: m.G.wd,
              audioSamplingRate: m.G.audioSamplingRate,
              closedCaptions: te,
            }
          );
        }),
        (u.kg = function (m, _, R) {
          var M = Hr.Mb,
            x = R.getAttribute("schemeIdUri") || "",
            z = R.getAttribute("value") || "",
            J = Hr.R(R, "timescale", M) || 1;
          Hr.Y(R, "Event").forEach(
            function (te) {
              var pe = Hr.R(te, "presentationTime", M) || 0,
                xe = Hr.R(te, "duration", M) || 0;
              (xe = (pe = pe / J + m) + xe / J),
                _ != null &&
                  ((pe = Math.min(pe, m + _)), (xe = Math.min(xe, m + _))),
                (te = {
                  schemeIdUri: x,
                  value: z,
                  startTime: pe,
                  endTime: xe,
                  id: te.getAttribute("id") || "",
                  eventElement: te,
                }),
                this.h.onTimelineRegionAdded(te);
            }.bind(this)
          );
        }),
        (u.ug = function (m, _, R) {
          return (
            (m = Qh(m, _, R, this.g.retryParameters)),
            (m = this.h.networkingEngine.request(1, m)),
            Vn(this.l, m),
            m.promise.then(function (M) {
              return M.data;
            })
          );
        }),
        ia.Fd("mpd", Bu),
        ia.Qb("application/dash+xml", Bu),
        ia.Qb("video/vnd.mpeg.dash.mpd", Bu),
        (c_.prototype.toString = function () {
          var m = "#" + this.name,
            _ = this.g
              ? this.g.map(function (R) {
                  return (
                    R.name +
                    "=" +
                    (isNaN(Number(R.value)) ? '"' + R.value + '"' : R.value)
                  );
                })
              : [];
          return (
            this.value && _.unshift(this.value),
            0 < _.length && (m += ":" + _.join(",")),
            m
          );
        }),
        (c_.prototype.getAttribute = function (m) {
          var _ = this.g.filter(function (R) {
            return R.name == m;
          });
          return _.length ? _[0] : null;
        });
      var eu = {
        Ab: function (m, _) {
          return m.filter(function (R) {
            return R.name == _;
          });
        },
        cb: function (m, _) {
          var R = eu.Ab(m, _);
          return R.length ? R[0] : null;
        },
        Zc: function (m, _, R) {
          return m.filter(function (M) {
            var x = M.getAttribute("TYPE");
            return (
              (M = M.getAttribute("GROUP-ID")), x.value == _ && M.value == R
            );
          });
        },
        Sc: function (m, _) {
          return It([m], [_])[0];
        },
        kd: function (m) {
          return /^#(?!EXT)/m.test(m);
        },
      };
      function Bc(m) {
        (this.h = m), (this.g = 0);
      }
      function lp(m) {
        zm(m, /[ \t]+/gm);
      }
      function zm(m, _) {
        _.lastIndex = m.g;
        var R = _.exec(m.h);
        return (
          (R =
            R == null
              ? null
              : { position: R.index, length: R[0].length, wg: R }),
          m.g == m.h.length || R == null || R.position != m.g
            ? null
            : ((m.g += R.length), R.wg)
        );
      }
      function Jh(m) {
        return m.g == m.h.length
          ? null
          : (m = zm(m, /[^ \t\n]*/gm))
          ? m[0]
          : null;
      }
      function h_() {
        this.g = 0;
      }
      function Qv(m, _, R) {
        var M = (_ = (_ = un(_))
          .replace(
            /\r\n|\r(?=[^\n]|$)/gm,
            `
`
          )
          .trim()).split(/\n+/m);
        if (!/^#EXTM3U($|[ \t\n])/m.test(M[0])) throw new re(2, 4, 4015);
        _ = 0;
        for (var x = 1; x < M.length; x++)
          if (!eu.kd(M[x])) {
            var z = vg(m, M[x]);
            if ((--m.g, tu.includes(z.name))) {
              _ = 1;
              break;
            }
            z.name == "EXT-X-STREAM-INF" && (x += 1);
          }
        for (x = [], z = 1; z < M.length; )
          if (eu.kd(M[z])) z += 1;
          else {
            var J = vg(m, M[z]);
            if (ws.includes(J.name)) {
              if (_ != 1) throw new re(2, 4, 4017);
              return new u_(
                R,
                _,
                x,
                (m = nA(m, R, (M = M.splice(z, M.length - z)), x))
              );
            }
            x.push(J),
              (z += 1),
              J.name == "EXT-X-STREAM-INF" &&
                (J.g.push(new d_("URI", M[z])), (z += 1));
          }
        return new u_(R, _, x);
      }
      function nA(m, _, R, M) {
        var x = [],
          z = [];
        return (
          R.forEach(function (J) {
            if (/^(#EXT)/.test(J))
              (J = vg(m, J)), tu.includes(J.name) ? M.push(J) : z.push(J);
            else {
              if (eu.kd(J)) return [];
              (J = eu.Sc(_, J.trim())), x.push(new iy(J, z)), (z = []);
            }
          }),
          x
        );
      }
      function vg(m, _) {
        var R = m.g++,
          M = _.match(/^#(EXT[^:]*)(?::(.*))?$/);
        if (!M) throw new re(2, 4, 4016, _);
        var x,
          z = M[1],
          J = M[2];
        if (((M = []), J)) {
          var te;
          (te = zm((J = new Bc(J)), /^([^,=]+)(?:,|$)/g)) && (x = te[1]);
          for (
            var pe = /([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;
            (te = zm(J, pe));

          )
            M.push(new d_(te[1], te[2] || te[3]));
        }
        return new c_(R, z, M, x);
      }
      var tu =
          "EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(
            " "
          ),
        ws =
          "EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(
            " "
          );
      function eo(m) {
        try {
          var _ = eo.parse(m);
          return qn({
            uri: m,
            Bd: m,
            data: _.data,
            headers: { "content-type": _.contentType },
          });
        } catch (R) {
          return st(R);
        }
      }
      function jm() {
        var m = this;
        (this.g = this.j = null),
          (this.ea = 1),
          (this.L = new Map()),
          (this.Z = new Set()),
          (this.h = new Map()),
          (this.i = null),
          (this.F = ""),
          (this.C = new h_()),
          (this.X = 0),
          (this.m = new Ut(function () {
            (function (_) {
              k(function R() {
                var M, x;
                return $t(R, function (z) {
                  switch (z.s) {
                    case 1:
                      return (
                        B.info("Updating manifest..."),
                        _.j ? (L(z, 2), E(z, _.update(), 4)) : z.return()
                      );
                    case 4:
                      (M = _.X), _.m.V(M), F(z, 0);
                      break;
                    case 2:
                      if (((x = oe(z)), !_.j)) return z.return();
                      (x.severity = 1), _.j.onError(x), _.m.V(0.1), S(z);
                  }
                });
              });
            })(m);
          })),
          (this.l = Le),
          (this.A = null),
          (this.J = 0),
          (this.M = 1 / 0),
          (this.o = new wn()),
          (this.P = []),
          (this.u = new Map()),
          (this.da = !1);
      }
      function f_(m, _) {
        return k(function R() {
          var M, x, z, J, te, pe, xe, Be, bt, dt;
          return $t(R, function (mt) {
            switch (mt.s) {
              case 1:
                return (
                  (M = eu),
                  (x = et),
                  (z = _.We),
                  E(mt, ge(m, ut([z], m.g.retryParameters), 0), 2)
                );
              case 2:
                if (((J = mt.B), (te = Qv(m.C, J.data, J.uri)).type != 1))
                  throw new re(2, 4, 4017);
                return (
                  (xe = (pe = M.cb(te.g, "EXT-X-MEDIA-SEQUENCE"))
                    ? Number(pe.value)
                    : 0),
                  (Be = _.stream),
                  E(mt, __(m, _.Pc, te, xe, Be.mimeType, Be.codecs), 3)
                );
              case 3:
                (bt = mt.B),
                  (_.fc.g = bt),
                  (dt = bt[bt.length - 1]),
                  M.cb(te.g, "EXT-X-ENDLIST") &&
                    (ae(m, x.$a), m.i.Fa(dt.endTime)),
                  S(mt);
            }
          });
        });
      }
      function p_(m) {
        m.forEach(function (_) {
          if (_) {
            var R = _.stream.codecs.split(",");
            (R = R.filter(function (M) {
              return M != "mp4a.40.34";
            })),
              (_.stream.codecs = R.join(","));
          }
        });
      }
      function g_(m, _, R, M, x) {
        return {
          id: m.ea++,
          language: _ ? _.language : "und",
          primary: (!!_ && _.primary) || (!!R && R.primary),
          audio: _,
          video: R,
          bandwidth: M,
          drmInfos: x,
          allowedByApplication: !0,
          allowedByKeySystem: !0,
        };
      }
      function m_(m, _, R) {
        return k(function M() {
          var x, z, J, te, pe, xe, Be, bt, dt, mt, xt;
          return $t(M, function (Nt) {
            switch (Nt.s) {
              case 1:
                if (((x = Ao(_, "URI")), m.h.has(x)))
                  return Nt.return(m.h.get(x));
                if (
                  ((z = Ao(_, "TYPE").toLowerCase()),
                  (J = Mt),
                  z == "subtitles" && (z = J.za),
                  (te = Ia(ys(_, "LANGUAGE", "und"))),
                  (pe = ys(_, "NAME")),
                  (xe = _.getAttribute("DEFAULT")),
                  (Be = xe == "YES"),
                  (bt = ys(_, "CHANNELS")),
                  z == "audio")
                )
                  if (bt) {
                    var en = bt.split("/")[0];
                    en = parseInt(en, 10);
                  } else en = null;
                else en = null;
                return (
                  (dt = en),
                  (mt = ys(_, "CHARACTERISTICS")),
                  E(Nt, y_(m, x, R, z, te, Be, pe, dt, null, mt), 2)
                );
              case 2:
                return (
                  (xt = Nt.B),
                  m.h.has(x)
                    ? Nt.return(m.h.get(x))
                    : xt == null
                    ? Nt.return(null)
                    : (m.L.set(_.id, xt), m.h.set(x, xt), Nt.return(xt))
                );
            }
          });
        });
      }
      function y_(m, _, R, M, x, z, J, te, pe, xe) {
        return k(function Be() {
          var bt,
            dt,
            mt,
            xt,
            Nt,
            en,
            Tn,
            In,
            Qn,
            vr,
            mr,
            bi,
            Ur,
            Jr,
            dr,
            Br,
            oi,
            ki,
            Or,
            ri,
            Yi,
            Ba,
            wa,
            Po,
            go,
            Pa,
            Ha,
            zi;
          return $t(Be, function (ha) {
            switch (ha.s) {
              case 1:
                return (
                  (dt = (bt = eu).Sc(m.F, _)),
                  E(ha, ge(m, ut([dt], m.g.retryParameters), 0), 2)
                );
              case 2:
                if (
                  ((mt = ha.B),
                  (dt = mt.uri),
                  (xt = Qv(m.C, mt.data, dt)).type != 1)
                )
                  throw new re(2, 4, 4017);
                (Nt = []),
                  xt.segments.forEach(function (Ma) {
                    (Ma = bt.Ab(Ma.h, "EXT-X-KEY")), Nt.push.apply(Nt, Ma);
                  }),
                  (en = !1),
                  (Tn = []),
                  (In = null);
                for (var Xa = b(Nt), Li = Xa.next(); !Li.done; Li = Xa.next())
                  if (((Qn = Li.value), (vr = Ao(Qn, "METHOD")) != "NONE")) {
                    if (((en = !0), vr == "AES-128"))
                      return (
                        B.v("Unsupported HLS Encryption", vr),
                        (m.da = !0),
                        ha.return(null)
                      );
                    (mr = Ao(Qn, "KEYFORMAT")),
                      (Ur = (bi = Ee[mr]) ? bi(Qn) : null)
                        ? (Ur.keyIds.length && (In = Ur.keyIds[0]), Tn.push(Ur))
                        : B.v("Unsupported HLS KEYFORMAT", mr);
                  }
                if (en && !Tn.length) throw new re(2, 4, 4026);
                return (
                  (function (Ma, ra) {
                    var mo = et,
                      Fo = eu.cb(ra.g, "EXT-X-PLAYLIST-TYPE"),
                      vs = eu.cb(ra.g, "EXT-X-ENDLIST");
                    (vs = (Fo && Fo.value == "VOD") || vs),
                      (Fo = Fo && Fo.value == "EVENT" && !vs),
                      (Fo = !vs && !Fo),
                      vs
                        ? ae(Ma, mo.$a)
                        : (ae(Ma, Fo ? mo.Wd : mo.Se),
                          (mo = A(ra.g, "EXT-X-TARGETDURATION")),
                          (mo = Number(mo.value)),
                          (Ma.J = Math.max(mo, Ma.J)),
                          (Ma.M = Math.min(mo, Ma.M)));
                  })(m, xt),
                  (Jr = (function (Ma, ra) {
                    if (ra.length == 1) return ra[0];
                    var mo = up(Ma, ra);
                    if (mo != null) return mo;
                    throw new re(2, 4, 4025, ra);
                  })(M, R)),
                  E(
                    ha,
                    (function (Ma, ra, mo, Fo) {
                      return k(function vs() {
                        var gd, rf, bh, ac, hp, oc, af, Sg, Bd, sc;
                        return $t(vs, function (Ol) {
                          switch (Ol.s) {
                            case 1:
                              return (
                                (gd = Mt),
                                (rf = Fo.segments[0].g),
                                (bh = new lt(rf)),
                                (ac = bh.pa.split(".").pop()),
                                (hp = j[ra]),
                                (oc = hp[ac])
                                  ? Ol.return(oc)
                                  : ra == gd.za
                                  ? mo && mo != "vtt" && mo != "wvtt"
                                    ? Ol.return("application/mp4")
                                    : Ol.return("text/vtt")
                                  : (((af = ut(
                                      [rf],
                                      Ma.g.retryParameters
                                    )).method = "HEAD"),
                                    E(Ol, ge(Ma, af, 1), 2))
                              );
                            case 2:
                              return (
                                (Sg = Ol.B),
                                (Bd = Sg.headers["content-type"])
                                  ? Ol.return(Bd.split(";")[0])
                                  : ((sc = hp.mp4), Ol.return(sc))
                              );
                          }
                        });
                      });
                    })(m, M, Jr, xt),
                    3
                  )
                );
              case 3:
                return (
                  (dr = ha.B),
                  V.includes(dr) && (Jr = ""),
                  (oi = (Br = bt.cb(xt.g, "EXT-X-MEDIA-SEQUENCE"))
                    ? Number(Br.value)
                    : 0),
                  L(ha, 4),
                  E(ha, __(m, _, xt, oi, dr, Jr), 6)
                );
              case 6:
                (ki = ha.B), F(ha, 5);
                break;
              case 4:
                if ((Or = oe(ha)).code == 4035)
                  return (
                    B.ba("Skipping unsupported HLS stream", dr, _),
                    ha.return(null)
                  );
                throw Or;
              case 5:
                if (
                  ((ri = ki[0].startTime),
                  (Yi = ki[ki.length - 1].endTime),
                  (Ba = Yi - ri),
                  (wa = new ms(ki)),
                  (Po = v_(xt)),
                  (go = void 0),
                  M == "text" && (go = "subtitle"),
                  (Pa = []),
                  xe)
                )
                  for (
                    Li = (Xa = b(xe.split(","))).next();
                    !Li.done;
                    Li = Xa.next()
                  )
                    (Ha = Li.value), Pa.push(Ha);
                return (
                  (zi = {
                    id: m.ea++,
                    originalId: J,
                    createSegmentIndex: Promise.resolve.bind(Promise),
                    findSegmentPosition: wa.find.bind(wa),
                    getSegmentReference: wa.get.bind(wa),
                    initSegmentReference: Po,
                    presentationTimeOffset: 0,
                    mimeType: dr,
                    codecs: Jr,
                    kind: go,
                    encrypted: en,
                    keyId: In,
                    language: x,
                    label: J,
                    type: M,
                    primary: z,
                    trickModeVideo: null,
                    emsgSchemeIdUris: null,
                    frameRate: void 0,
                    pixelAspectRatio: void 0,
                    width: void 0,
                    height: void 0,
                    bandwidth: void 0,
                    roles: Pa,
                    channelsCount: te,
                    audioSamplingRate: null,
                    closedCaptions: pe,
                  }),
                  ha.return({
                    stream: zi,
                    fc: wa,
                    drmInfos: Tn,
                    Pc: _,
                    We: dt,
                    td: ri,
                    Yg: Yi,
                    duration: Ba,
                  })
                );
            }
          });
        });
      }
      function v_(m) {
        var _ = eu.Ab(m.g, "EXT-X-MAP");
        if (!_.length) return null;
        if (1 < _.length) throw new re(2, 4, 4020);
        var R = Ao((_ = _[0]), "URI"),
          M = eu.Sc(m.h, R);
        return (
          (m = 0),
          (R = null),
          (_ = ys(_, "BYTERANGE")) &&
            ((m = _.split("@")),
            (_ = Number(m[0])),
            (R = (m = Number(m[1])) + _ - 1)),
          new Ka(
            function () {
              return [M];
            },
            m,
            R
          )
        );
      }
      function h2(m, _, R, M) {
        var x = _.h,
          z = _.g;
        (_ = A(x, "EXTINF").value.split(",")), (_ = M + Number(_[0]));
        var J = 0,
          te = null;
        return (
          (x = eu.cb(x, "EXT-X-BYTERANGE")) &&
            ((J = x.value.split("@")),
            (x = Number(J[0])),
            (te = (J = J[1] ? Number(J[1]) : m.g + 1) + x - 1)),
          new Io(
            R,
            M,
            _,
            function () {
              return [z];
            },
            J,
            te
          )
        );
      }
      function b_(m) {
        m.i &&
          (m.P.forEach(function (_) {
            m.i.Jb(_, 0);
          }),
          (m.P = []));
      }
      function __(m, _, R, M, x, z) {
        return k(function J() {
          var te, pe, xe, Be, bt, dt, mt, xt, Nt, en;
          return $t(J, function (Tn) {
            switch (Tn.s) {
              case 1:
                return (
                  (te = R.segments),
                  (pe = []),
                  (xe = te[0].g),
                  (Be = h2(null, te[0], M, 0)),
                  (bt = v_(R)),
                  E(
                    Tn,
                    (function (Qn, vr, mr, bi, Ur, Jr) {
                      return k(function dr() {
                        var Br, oi, ki, Or, ri, Yi, Ba, wa, Po;
                        return $t(dr, function (go) {
                          switch (go.s) {
                            case 1:
                              if (Qn.A) {
                                if (
                                  ((Br = Qn.h.get(vr)),
                                  (oi = Br.fc),
                                  (ki = oi.get(bi.position)))
                                )
                                  return (
                                    B.K(
                                      "Found segment start time in previous manifest"
                                    ),
                                    go.return(ki.startTime)
                                  );
                                B.debug(
                                  "Unable to find segment start time in previous manifest!"
                                );
                              }
                              if (
                                (B.K("Fetching segment to find start time"),
                                (Ur = Ur.toLowerCase()),
                                V.includes(Ur))
                              )
                                throw (
                                  (B.ba(
                                    "Raw formats are not yet supported.  Skipping " +
                                      Ur
                                  ),
                                  new re(1, 4, 4035))
                                );
                              if (Ur == "video/webm")
                                throw (
                                  (B.ba(
                                    "WebM in HLS is not yet supported.  Skipping."
                                  ),
                                  new re(1, 4, 4035))
                                );
                              if (Ur != "video/mp4" && Ur != "audio/mp4") {
                                go.I(2);
                                break;
                              }
                              return (
                                (Or = [Nd(Qn, bi)]),
                                mr && Or.push(Nd(Qn, mr)),
                                E(go, Promise.all(Or), 3)
                              );
                            case 3:
                              return (
                                (ri = go.B),
                                (Yi = ri[0]),
                                (Ba = ri[1] || ri[0]),
                                go.return(
                                  (function (Pa, Ha, zi, ha) {
                                    var Xa = 0;
                                    if (
                                      (new Ja()
                                        .box("moov", Rl)
                                        .box("trak", Rl)
                                        .box("mdia", Rl)
                                        .ma("mdhd", function (ra) {
                                          ra.reader.U(ra.version == 0 ? 8 : 16),
                                            (Xa = ra.reader.N()),
                                            ra.parser.stop();
                                        })
                                        .parse(ha, !0),
                                      !Xa)
                                    )
                                      throw (
                                        (B.error(
                                          "Unable to find timescale in init segment!"
                                        ),
                                        new re(2, 4, 4030, Pa, Ha))
                                      );
                                    var Li = 0,
                                      Ma = !1;
                                    if (
                                      (new Ja()
                                        .box("moof", Rl)
                                        .box("traf", Rl)
                                        .ma("tfdt", function (ra) {
                                          (Li =
                                            (ra.version == 0
                                              ? ra.reader.N()
                                              : ra.reader.Pb()) / Xa),
                                            (Ma = !0),
                                            ra.parser.stop();
                                        })
                                        .parse(zi, !0),
                                      !Ma)
                                    )
                                      throw new re(2, 4, 4030, Pa, Ha);
                                    return Li;
                                  })(vr, Yi.uri, Yi.data, Ba.data)
                                )
                              );
                            case 2:
                              if (Ur != "video/mp2t") {
                                go.I(4);
                                break;
                              }
                              return E(go, Nd(Qn, bi), 5);
                            case 5:
                              return (
                                (wa = go.B),
                                go.return(
                                  (function (Pa, Ha, zi) {
                                    function ha() {
                                      Li.seek(Ma + 188),
                                        (ra = Li.ra()) != 71 &&
                                          (Li.seek(Ma + 192), (ra = Li.ra())),
                                        ra != 71 &&
                                          (Li.seek(Ma + 204), (ra = Li.ra())),
                                        ra != 71 && Xa(),
                                        Li.Fe(1);
                                    }
                                    function Xa() {
                                      throw new re(2, 4, 4030, Pa, Ha);
                                    }
                                    for (
                                      var Li = new Zi(new DataView(zi), 0),
                                        Ma = 0,
                                        ra = 0;
                                      ;

                                    )
                                      if (
                                        ((Ma = Li.ka()),
                                        (ra = Li.ra()) != 71 && Xa(),
                                        (8191 & (zi = Li.dc())) == 8191)
                                      )
                                        ha();
                                      else if (16384 & zi) {
                                        if (
                                          (((zi = (48 & Li.ra()) >> 4) != 0 &&
                                            zi != 2) ||
                                            Xa(),
                                          zi == 3 && ((zi = Li.ra()), Li.U(zi)),
                                          Li.N() >> 8 == 1)
                                        )
                                          return (
                                            Li.U(3),
                                            ((zi = Li.ra() >> 6) != 0 &&
                                              zi != 1) ||
                                              Xa(),
                                            Li.ra() == 0 && Xa(),
                                            (1073741824 *
                                              ((14 & (zi = Li.ra())) >> 1) +
                                              (((65534 & Li.dc()) << 14) |
                                                ((65534 & Li.dc()) >> 1))) /
                                              9e4
                                          );
                                        ha();
                                      } else ha();
                                  })(vr, wa.uri, wa.data)
                                )
                              );
                            case 4:
                              if (
                                Ur != "application/mp4" &&
                                !Ur.startsWith("text/")
                              ) {
                                go.I(6);
                                break;
                              }
                              return E(go, Nd(Qn, bi), 7);
                            case 7:
                              return (
                                (Po = go.B),
                                go.return(
                                  (function (Pa, Ha, zi) {
                                    return (
                                      (Pa = Aa(Pa, Ha)),
                                      hg(Pa)
                                        ? ((Ha = new dg(null)),
                                          Xb(Ha, Pa),
                                          Ha.xc(zi))
                                        : 0
                                    );
                                  })(Ur, Jr, Po.data)
                                )
                              );
                            case 6:
                              throw new re(2, 4, 4030, vr);
                          }
                        });
                      });
                    })(m, _, bt, Be, x, z),
                    2
                  )
                );
              case 2:
                (dt = Tn.B),
                  B.debug(
                    "First segment",
                    xe.split("/").pop(),
                    "starts at",
                    dt
                  );
                for (var In = 0; In < te.length; ++In)
                  (mt = te[In]),
                    (xt = pe[pe.length - 1]),
                    (Nt = In == 0 ? dt : xt.endTime),
                    (en = h2(xt, mt, M + In, Nt)),
                    pe.push(en);
                return m.P.push(pe), b_(m), Tn.return(pe);
            }
          });
        });
      }
      function Nd(m, _) {
        return k(function R() {
          var M, x, z, J, te, pe;
          return $t(R, function (xe) {
            switch (xe.s) {
              case 1:
                return (
                  (M = 1),
                  (x = Qh(_.i(), _.h, _.h + 2048 - 1, m.g.retryParameters)),
                  (z = Qh(_.i(), _.h, _.g, m.g.retryParameters)),
                  m.g.hls.useFullSegmentsForStartTime
                    ? xe.return(ge(m, z, M))
                    : (L(xe, 2), E(xe, ge(m, x, M), 4))
                );
              case 4:
                return (J = xe.B), xe.return(J);
              case 2:
                if ((te = oe(xe)).code == 7001) throw te;
                return (
                  B.ba(
                    "Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive!  Your server should support Range requests and CORS preflights.",
                    x.uris[0]
                  ),
                  E(xe, ge(m, z, M), 5)
                );
              case 5:
                return (pe = xe.B), xe.return(pe);
            }
          });
        });
      }
      function up(m, _) {
        for (var R = C[m], M = 0; M < R.length; M++)
          for (var x = 0; x < _.length; x++)
            if (R[M].test(_[x].trim())) return _[x].trim();
        return m == "text" ? "" : null;
      }
      function Ao(m, _) {
        var R = m.getAttribute(_);
        if (!R) throw new re(2, 4, 4023, _);
        return R.value;
      }
      function A(m, _) {
        var R = eu.cb(m, _);
        if (!R) throw new re(2, 4, 4024, _);
        return R;
      }
      Z("shaka.net.DataUriPlugin", eo),
        (eo.parse = function (m) {
          var _ = m.split(":");
          if (2 > _.length || _[0] != "data")
            throw (
              (B.error("Bad data URI, failed to parse scheme"),
              new re(2, 1, 1004, m))
            );
          if (2 > (_ = _.slice(1).join(":").split(",")).length)
            throw (
              (B.error(
                "Bad data URI, failed to extract encoding and MIME type"
              ),
              new re(2, 1, 1004, m))
            );
          var R = _[0];
          (m = i.decodeURIComponent(_.slice(1).join(","))),
            (_ = R.split(";")),
            (R = _[0]);
          var M = !1;
          return (
            1 < _.length && _[_.length - 1] == "base64" && ((M = !0), _.pop()),
            { data: M ? Ht.Ja(m).buffer : Sn(m), contentType: R }
          );
        }),
        gr("data", eo),
        Z("shaka.hls.HlsParser", jm),
        ((u = jm.prototype).configure = function (m) {
          this.g = m;
        }),
        (u.start = function (m, _) {
          var R = this;
          return k(function M() {
            var x, z;
            return $t(M, function (J) {
              switch (J.s) {
                case 1:
                  return (
                    (R.j = _), E(J, ge(R, ut([m], R.g.retryParameters), 0), 2)
                  );
                case 2:
                  return (
                    (x = J.B),
                    (R.F = x.uri),
                    E(
                      J,
                      (function (te, pe) {
                        return k(function xe() {
                          var Be, bt, dt, mt, xt, Nt, en, Tn, In, Qn, vr;
                          return $t(xe, function (mr) {
                            switch (mr.s) {
                              case 1:
                                if ((Be = Qv(te.C, pe, te.F)).type != 0)
                                  throw new re(2, 4, 4022);
                                return E(
                                  mr,
                                  (function (Jr, dr) {
                                    return k(function Br() {
                                      var oi,
                                        ki,
                                        Or,
                                        ri,
                                        Yi,
                                        Ba,
                                        wa,
                                        Po,
                                        go,
                                        Pa,
                                        Ha,
                                        zi;
                                      return $t(Br, function (ha) {
                                        switch (ha.s) {
                                          case 1:
                                            return (
                                              (oi = eu),
                                              (ki = rn),
                                              (Or = dr.g),
                                              (ri = oi.Ab(dr.g, "EXT-X-MEDIA")),
                                              (Yi = ri.filter(
                                                function (Xa) {
                                                  return (
                                                    Ao(Xa, "TYPE") ==
                                                    "SUBTITLES"
                                                  );
                                                }.bind(Jr)
                                              )),
                                              (Ba = Yi.map(
                                                function (Xa) {
                                                  var Li = this;
                                                  return k(function Ma() {
                                                    var ra;
                                                    return $t(
                                                      Ma,
                                                      function (mo) {
                                                        switch (mo.s) {
                                                          case 1:
                                                            return Li.g
                                                              .disableText
                                                              ? mo.return(null)
                                                              : (L(mo, 2),
                                                                E(
                                                                  mo,
                                                                  (function (
                                                                    Fo,
                                                                    vs
                                                                  ) {
                                                                    return k(
                                                                      function gd() {
                                                                        var rf;
                                                                        return $t(
                                                                          gd,
                                                                          function (
                                                                            bh
                                                                          ) {
                                                                            switch (
                                                                              bh.s
                                                                            ) {
                                                                              case 1:
                                                                                return (
                                                                                  Ao(
                                                                                    vs,
                                                                                    "TYPE"
                                                                                  ),
                                                                                  E(
                                                                                    bh,
                                                                                    m_(
                                                                                      Fo,
                                                                                      vs,
                                                                                      []
                                                                                    ),
                                                                                    2
                                                                                  )
                                                                                );
                                                                              case 2:
                                                                                return (
                                                                                  (rf =
                                                                                    bh.B),
                                                                                  bh.return(
                                                                                    rf.stream
                                                                                  )
                                                                                );
                                                                            }
                                                                          }
                                                                        );
                                                                      }
                                                                    );
                                                                  })(Li, Xa),
                                                                  4
                                                                ));
                                                          case 4:
                                                            return mo.return(
                                                              mo.B
                                                            );
                                                          case 2:
                                                            if (
                                                              ((ra = oe(mo)),
                                                              Li.g.hls
                                                                .ignoreTextStreamFailures)
                                                            )
                                                              return mo.return(
                                                                null
                                                              );
                                                            throw ra;
                                                        }
                                                      }
                                                    );
                                                  });
                                                }.bind(Jr)
                                              )),
                                              (wa = ri.filter(function (Xa) {
                                                return (
                                                  Ao(Xa, "TYPE") ==
                                                  "CLOSED-CAPTIONS"
                                                );
                                              })),
                                              (function (Xa, Li) {
                                                for (
                                                  var Ma = b(Li),
                                                    ra = Ma.next();
                                                  !ra.done;
                                                  ra = Ma.next()
                                                ) {
                                                  Ao((ra = ra.value), "TYPE");
                                                  var mo =
                                                    ys(ra, "LANGUAGE") || "und";
                                                  mo = Ia(mo);
                                                  var Fo = Ao(ra, "GROUP-ID");
                                                  (ra = Ao(ra, "INSTREAM-ID")),
                                                    Xa.u.get(Fo) ||
                                                      Xa.u.set(Fo, new Map()),
                                                    Xa.u.get(Fo).set(ra, mo);
                                                }
                                              })(Jr, wa),
                                              E(ha, Promise.all(Ba), 2)
                                            );
                                          case 2:
                                            return (
                                              (Po = ha.B),
                                              (go = oi.Ab(
                                                Or,
                                                "EXT-X-STREAM-INF"
                                              )),
                                              (Pa = go.map(
                                                function (Xa) {
                                                  return (function (
                                                    Li,
                                                    Ma,
                                                    ra
                                                  ) {
                                                    return k(function mo() {
                                                      var Fo,
                                                        vs,
                                                        gd,
                                                        rf,
                                                        bh,
                                                        ac,
                                                        hp,
                                                        oc,
                                                        af,
                                                        Sg,
                                                        Bd,
                                                        sc,
                                                        Ol,
                                                        gA,
                                                        md,
                                                        $_,
                                                        fp,
                                                        mA,
                                                        kpe,
                                                        Ipe,
                                                        t1,
                                                        _2,
                                                        yA,
                                                        SG,
                                                        T2,
                                                        P7,
                                                        Dpe,
                                                        Ppe,
                                                        Mpe;
                                                      return $t(
                                                        mo,
                                                        function (x_) {
                                                          switch (x_.s) {
                                                            case 1:
                                                              return (
                                                                (Fo = Mt),
                                                                (vs = eu),
                                                                (gd = []),
                                                                Li.g
                                                                  .disableVideo ||
                                                                  gd.push(
                                                                    "avc1.42E01E"
                                                                  ),
                                                                Li.g
                                                                  .disableAudio ||
                                                                  gd.push(
                                                                    "mp4a.40.2"
                                                                  ),
                                                                (rf =
                                                                  gd.join(",")),
                                                                (bh = ys(
                                                                  Ma,
                                                                  "CODECS",
                                                                  rf
                                                                )),
                                                                (ac =
                                                                  (function (
                                                                    Ms
                                                                  ) {
                                                                    for (
                                                                      var pp =
                                                                          new Set(),
                                                                        n1 = [],
                                                                        hy =
                                                                          (Ms =
                                                                            b(
                                                                              Ms
                                                                            )).next();
                                                                      !hy.done;
                                                                      hy =
                                                                        Ms.next()
                                                                    ) {
                                                                      var vA =
                                                                        Ki(
                                                                          (hy =
                                                                            hy.value)
                                                                        )[0];
                                                                      pp.has(vA)
                                                                        ? B.debug(
                                                                            "Ignoring duplicate codec"
                                                                          )
                                                                        : (n1.push(
                                                                            hy
                                                                          ),
                                                                          pp.add(
                                                                            vA
                                                                          ));
                                                                    }
                                                                    return n1;
                                                                  })(
                                                                    bh.split(
                                                                      /\s*,\s*/
                                                                    )
                                                                  )),
                                                                (hp =
                                                                  Ma.getAttribute(
                                                                    "RESOLUTION"
                                                                  )),
                                                                (af = oc =
                                                                  null),
                                                                (Sg = ys(
                                                                  Ma,
                                                                  "FRAME-RATE"
                                                                )),
                                                                (Bd =
                                                                  Number(
                                                                    ys(
                                                                      Ma,
                                                                      "AVERAGE-BANDWIDTH"
                                                                    )
                                                                  ) ||
                                                                  Number(
                                                                    Ao(
                                                                      Ma,
                                                                      "BANDWIDTH"
                                                                    )
                                                                  )),
                                                                hp &&
                                                                  ((sc =
                                                                    hp.value.split(
                                                                      "x"
                                                                    )),
                                                                  (oc = sc[0]),
                                                                  (af = sc[1])),
                                                                (Ol = (Ol =
                                                                  vs.Ab(
                                                                    ra.g,
                                                                    "EXT-X-MEDIA"
                                                                  )).filter(
                                                                  function (
                                                                    Ms
                                                                  ) {
                                                                    return (
                                                                      Ao(
                                                                        Ms,
                                                                        "TYPE"
                                                                      ) !=
                                                                      "CLOSED-CAPTIONS"
                                                                    );
                                                                  }
                                                                )),
                                                                (Ol = Ol.filter(
                                                                  function (
                                                                    Ms
                                                                  ) {
                                                                    var pp =
                                                                      ys(
                                                                        Ms,
                                                                        "URI"
                                                                      ) || "";
                                                                    return (
                                                                      (ys(
                                                                        Ms,
                                                                        "TYPE"
                                                                      ) ||
                                                                        "") ==
                                                                        "SUBTITLES" ||
                                                                      pp != ""
                                                                    );
                                                                  }
                                                                )),
                                                                (gA = ys(
                                                                  Ma,
                                                                  "AUDIO"
                                                                )),
                                                                (md = ys(
                                                                  Ma,
                                                                  "VIDEO"
                                                                )),
                                                                gA
                                                                  ? (Ol = vs.Zc(
                                                                      Ol,
                                                                      "AUDIO",
                                                                      gA
                                                                    ))
                                                                  : md &&
                                                                    (Ol = vs.Zc(
                                                                      Ol,
                                                                      "VIDEO",
                                                                      md
                                                                    )),
                                                                ($_ = up(
                                                                  Fo.za,
                                                                  ac
                                                                )) &&
                                                                  ((fp = ys(
                                                                    Ma,
                                                                    "SUBTITLES"
                                                                  )) &&
                                                                    (mA = vs.Zc(
                                                                      Ol,
                                                                      "SUBTITLES",
                                                                      fp
                                                                    )).length &&
                                                                    (kpe =
                                                                      Li.L.get(
                                                                        mA[0].id
                                                                      )) &&
                                                                    (kpe.stream.codecs =
                                                                      $_),
                                                                  Pn(ac, $_)),
                                                                (Ipe = Ol.map(
                                                                  function (
                                                                    Ms
                                                                  ) {
                                                                    return m_(
                                                                      this,
                                                                      Ms,
                                                                      ac
                                                                    );
                                                                  }.bind(Li)
                                                                )),
                                                                (t1 = []),
                                                                (_2 = []),
                                                                E(
                                                                  x_,
                                                                  Promise.all(
                                                                    Ipe
                                                                  ),
                                                                  2
                                                                )
                                                              );
                                                            case 2:
                                                              if (
                                                                ((SG = (SG =
                                                                  x_.B).filter(
                                                                  function (
                                                                    Ms
                                                                  ) {
                                                                    return (
                                                                      Ms != null
                                                                    );
                                                                  }
                                                                )),
                                                                gA
                                                                  ? (t1 = SG)
                                                                  : md &&
                                                                    (_2 = SG),
                                                                B.debug(
                                                                  "Guessing stream type for",
                                                                  Ma.toString()
                                                                ),
                                                                (P7 = !1),
                                                                t1.length ||
                                                                _2.length
                                                                  ? t1.length
                                                                    ? ((Ppe =
                                                                        Ao(
                                                                          Ma,
                                                                          "URI"
                                                                        )),
                                                                      (Mpe =
                                                                        t1[0]
                                                                          .Pc),
                                                                      Ppe == Mpe
                                                                        ? (B.debug(
                                                                            "Guessing audio-only."
                                                                          ),
                                                                          (T2 =
                                                                            Fo.Sb),
                                                                          (P7 =
                                                                            !0))
                                                                        : (B.debug(
                                                                            "Guessing video."
                                                                          ),
                                                                          (T2 =
                                                                            Fo.Za)))
                                                                    : (B.debug(
                                                                        "Guessing audio."
                                                                      ),
                                                                      (T2 =
                                                                        Fo.Sb))
                                                                  : ac.length ==
                                                                    1
                                                                  ? ((Dpe = up(
                                                                      Fo.Za,
                                                                      ac
                                                                    )),
                                                                    hp ||
                                                                    Sg ||
                                                                    Dpe
                                                                      ? (B.debug(
                                                                          "Guessing video-only."
                                                                        ),
                                                                        (T2 =
                                                                          Fo.Za))
                                                                      : (B.debug(
                                                                          "Guessing audio-only."
                                                                        ),
                                                                        (T2 =
                                                                          Fo.Sb)))
                                                                  : (B.debug(
                                                                      "Guessing multiplexed audio+video."
                                                                    ),
                                                                    (T2 =
                                                                      Fo.Za),
                                                                    (ac = [
                                                                      ac.join(
                                                                        ","
                                                                      ),
                                                                    ])),
                                                                P7)
                                                              ) {
                                                                x_.I(3);
                                                                break;
                                                              }
                                                              return E(
                                                                x_,
                                                                (function (
                                                                  Ms,
                                                                  pp,
                                                                  n1,
                                                                  hy
                                                                ) {
                                                                  return k(
                                                                    function vA() {
                                                                      var RG,
                                                                        r1,
                                                                        Ym,
                                                                        of,
                                                                        bA;
                                                                      return $t(
                                                                        vA,
                                                                        function (
                                                                          yd
                                                                        ) {
                                                                          switch (
                                                                            yd.s
                                                                          ) {
                                                                            case 1:
                                                                              return (
                                                                                (RG =
                                                                                  Mt),
                                                                                (r1 =
                                                                                  Ao(
                                                                                    pp,
                                                                                    "URI"
                                                                                  )),
                                                                                Ms.h.has(
                                                                                  r1
                                                                                )
                                                                                  ? yd.return(
                                                                                      Ms.h.get(
                                                                                        r1
                                                                                      )
                                                                                    )
                                                                                  : ((Ym =
                                                                                      ys(
                                                                                        pp,
                                                                                        "CLOSED-CAPTIONS"
                                                                                      )),
                                                                                    (of =
                                                                                      null),
                                                                                    hy ==
                                                                                      RG.Za &&
                                                                                      Ym &&
                                                                                      Ym !=
                                                                                        "NONE" &&
                                                                                      (of =
                                                                                        Ms.u.get(
                                                                                          Ym
                                                                                        )),
                                                                                    E(
                                                                                      yd,
                                                                                      y_(
                                                                                        Ms,
                                                                                        r1,
                                                                                        n1,
                                                                                        hy,
                                                                                        "und",
                                                                                        !1,
                                                                                        null,
                                                                                        null,
                                                                                        of,
                                                                                        null
                                                                                      ),
                                                                                      2
                                                                                    ))
                                                                              );
                                                                            case 2:
                                                                              return (bA =
                                                                                yd.B) ==
                                                                                null
                                                                                ? yd.return(
                                                                                    null
                                                                                  )
                                                                                : Ms.h.has(
                                                                                    r1
                                                                                  )
                                                                                ? yd.return(
                                                                                    Ms.h.get(
                                                                                      r1
                                                                                    )
                                                                                  )
                                                                                : (Ms.h.set(
                                                                                    r1,
                                                                                    bA
                                                                                  ),
                                                                                  yd.return(
                                                                                    bA
                                                                                  ));
                                                                          }
                                                                        }
                                                                      );
                                                                    }
                                                                  );
                                                                })(
                                                                  Li,
                                                                  Ma,
                                                                  ac,
                                                                  T2
                                                                ),
                                                                4
                                                              );
                                                            case 4:
                                                              yA = x_.B;
                                                            case 3:
                                                              if (yA)
                                                                yA.stream
                                                                  .type == Fo.Sb
                                                                  ? (t1 = [yA])
                                                                  : (_2 = [yA]);
                                                              else if (
                                                                yA === null
                                                              )
                                                                return (
                                                                  B.debug(
                                                                    "streamInfo is null"
                                                                  ),
                                                                  x_.return([])
                                                                );
                                                              return (
                                                                _2 && p_(_2),
                                                                t1 && p_(t1),
                                                                x_.return(
                                                                  (function (
                                                                    Ms,
                                                                    pp,
                                                                    n1,
                                                                    hy,
                                                                    vA,
                                                                    RG,
                                                                    r1
                                                                  ) {
                                                                    n1.forEach(
                                                                      function (
                                                                        zP
                                                                      ) {
                                                                        (zP =
                                                                          zP.stream) &&
                                                                          ((zP.width =
                                                                            Number(
                                                                              vA
                                                                            ) ||
                                                                            void 0),
                                                                          (zP.height =
                                                                            Number(
                                                                              RG
                                                                            ) ||
                                                                            void 0),
                                                                          (zP.frameRate =
                                                                            Number(
                                                                              r1
                                                                            ) ||
                                                                            void 0));
                                                                      }.bind(Ms)
                                                                    );
                                                                    var Ym =
                                                                      !!Ms.g &&
                                                                      Ms.g
                                                                        .disableAudio;
                                                                    (pp.length &&
                                                                      !Ym) ||
                                                                      (pp = [
                                                                        null,
                                                                      ]),
                                                                      (Ym =
                                                                        !!Ms.g &&
                                                                        Ms.g
                                                                          .disableVideo),
                                                                      (!n1.length ||
                                                                        Ym) &&
                                                                        (n1 = [
                                                                          null,
                                                                        ]),
                                                                      (Ym = []);
                                                                    for (
                                                                      var of =
                                                                        (pp =
                                                                          b(
                                                                            pp
                                                                          )).next();
                                                                      !of.done;
                                                                      of =
                                                                        pp.next()
                                                                    ) {
                                                                      of =
                                                                        of.value;
                                                                      for (
                                                                        var bA =
                                                                            b(
                                                                              n1
                                                                            ),
                                                                          yd =
                                                                            bA.next();
                                                                        !yd.done;
                                                                        yd =
                                                                          bA.next()
                                                                      ) {
                                                                        var i1 =
                                                                          yd.value;
                                                                        yd = of
                                                                          ? of.stream
                                                                          : null;
                                                                        var M7 =
                                                                            i1
                                                                              ? i1.stream
                                                                              : null,
                                                                          AG =
                                                                            of
                                                                              ? of.drmInfos
                                                                              : null,
                                                                          wG =
                                                                            i1
                                                                              ? i1.drmInfos
                                                                              : null;
                                                                        i1 =
                                                                          (i1
                                                                            ? i1.Pc
                                                                            : "") +
                                                                          " - " +
                                                                          (of
                                                                            ? of.Pc
                                                                            : "");
                                                                        var kG =
                                                                          void 0;
                                                                        if (
                                                                          yd &&
                                                                          M7
                                                                        ) {
                                                                          if (
                                                                            AG.length &&
                                                                            wG.length &&
                                                                            !(
                                                                              0 <
                                                                              Lv(
                                                                                AG,
                                                                                wG
                                                                              )
                                                                                .length
                                                                            )
                                                                          ) {
                                                                            B.v(
                                                                              "Incompatible DRM info in HLS variant.  Skipping."
                                                                            );
                                                                            continue;
                                                                          }
                                                                          kG =
                                                                            Lv(
                                                                              AG,
                                                                              wG
                                                                            );
                                                                        } else
                                                                          yd
                                                                            ? (kG =
                                                                                AG)
                                                                            : M7 &&
                                                                              (kG =
                                                                                wG);
                                                                        Ms.Z.has(
                                                                          i1
                                                                        )
                                                                          ? B.debug(
                                                                              "Skipping variant which only differs in text streams."
                                                                            )
                                                                          : ((yd =
                                                                              g_(
                                                                                Ms,
                                                                                yd,
                                                                                M7,
                                                                                hy,
                                                                                kG
                                                                              )),
                                                                            Ym.push(
                                                                              yd
                                                                            ),
                                                                            Ms.Z.add(
                                                                              i1
                                                                            ));
                                                                      }
                                                                    }
                                                                    return Ym;
                                                                  })(
                                                                    Li,
                                                                    t1,
                                                                    _2,
                                                                    Bd,
                                                                    oc,
                                                                    af,
                                                                    Sg
                                                                  )
                                                                )
                                                              );
                                                          }
                                                        }
                                                      );
                                                    });
                                                  })(this, Xa, dr);
                                                }.bind(Jr)
                                              )),
                                              E(ha, Promise.all(Pa), 3)
                                            );
                                          case 3:
                                            return (
                                              (Ha = ha.B),
                                              (zi = (zi = Ha.reduce(
                                                ki.Rc,
                                                []
                                              )).filter(function (Xa) {
                                                return Xa != null;
                                              })),
                                              ha.return({
                                                startTime: 0,
                                                variants: zi,
                                                textStreams: Po.filter(
                                                  function (Xa) {
                                                    return Xa != null;
                                                  }
                                                ),
                                              })
                                            );
                                        }
                                      });
                                    });
                                  })(te, Be),
                                  2
                                );
                              case 2:
                                if (((bt = mr.B), !te.j))
                                  throw new re(2, 7, 7001);
                                if (te.da && bt.variants.length == 0)
                                  throw (
                                    (B.info(
                                      "No stream is created, because we don't support AES-128",
                                      "encryption yet"
                                    ),
                                    new re(2, 4, 4034))
                                  );
                                te.j.filterAllPeriods([bt]),
                                  (dt = 1 / 0),
                                  (mt = 0),
                                  (xt = 1 / 0);
                                for (
                                  var bi = b(te.h.values()), Ur = bi.next();
                                  !Ur.done;
                                  Ur = bi.next()
                                )
                                  (Nt = Ur.value),
                                    (dt = Math.min(dt, Nt.td)),
                                    (mt = Math.max(mt, Nt.td)),
                                    Nt.stream.type != "text" &&
                                      (xt = Math.min(xt, Nt.duration));
                                if (
                                  (te.l != et.$a
                                    ? ((te.i = new Vr(0, 3 * te.J)),
                                      te.i.hc(!1))
                                    : ((te.i = new Vr(null, 0)), te.i.hc(!0)),
                                  b_(te),
                                  te.l != et.$a)
                                ) {
                                  for (
                                    te.X = te.M,
                                      en = et,
                                      te.l == en.Wd &&
                                        ((Tn = te.i.Ic),
                                        isNaN(
                                          te.g.availabilityWindowOverride
                                        ) ||
                                          (Tn =
                                            te.g.availabilityWindowOverride),
                                        te.i.Pd(Tn)),
                                      In = 0;
                                    95443.7176888889 <= mt;

                                  )
                                    (In += 95443.7176888889),
                                      (mt -= 95443.7176888889);
                                  if (In)
                                    for (
                                      B.debug(
                                        "Offsetting live streams by",
                                        In,
                                        "to compensate for rollover"
                                      ),
                                        Ur = (bi = b(te.h.values())).next();
                                      !Ur.done;
                                      Ur = bi.next()
                                    )
                                      95443.7176888889 > (Qn = Ur.value).td
                                        ? (B.K(
                                            "Offset applied to",
                                            Qn.stream.type
                                          ),
                                          (Qn.stream.presentationTimeOffset =
                                            -In),
                                          Qn.fc.offset(In))
                                        : B.K(
                                            "Offset NOT applied to",
                                            Qn.stream.type
                                          );
                                } else for (te.i.Fa(xt), te.i.offset(-dt), Ur = (bi = b(te.h.values())).next(); !Ur.done; Ur = bi.next()) ((vr = Ur.value).stream.presentationTimeOffset = dt), vr.fc.offset(-dt), sp(vr.fc, xt);
                                (te.A = {
                                  presentationTimeline: te.i,
                                  periods: [bt],
                                  offlineSessionIds: [],
                                  minBufferTime: 0,
                                }),
                                  S(mr);
                            }
                          });
                        });
                      })(R, x.data),
                      3
                    )
                  );
                case 3:
                  return 0 < (z = R.X) && R.m.V(z), J.return(R.A);
              }
            });
          });
        }),
        (u.stop = function () {
          this.m && (this.m.stop(), (this.m = null));
          var m = [];
          return (
            this.o && (m.push(this.o.destroy()), (this.o = null)),
            (this.g = this.j = null),
            this.L.clear(),
            this.Z.clear(),
            this.h.clear(),
            (this.A = null),
            Promise.all(m)
          );
        }),
        (u.update = function () {
          if (this.l != et.$a) {
            for (
              var m = [], _ = b(this.h.values()), R = _.next();
              !R.done;
              R = _.next()
            )
              m.push(f_(this, R.value));
            return Promise.all(m);
          }
        }),
        (u.onExpirationUpdated = function () {});
      var C = {
          audio: [/^vorbis$/, /^opus$/, /^flac$/, /^mp4a/, /^[ae]c-3$/],
          video: [/^avc/, /^hev/, /^hvc/, /^vp0?[89]/, /^av1$/],
          text: [/^vtt$/, /^wvtt/, /^stpp/],
        },
        V = ["audio/aac", "audio/ac3", "audio/ec3", "audio/mpeg"],
        j = {
          audio: {
            mp4: "audio/mp4",
            mp4a: "audio/mp4",
            m4s: "audio/mp4",
            m4i: "audio/mp4",
            m4a: "audio/mp4",
            m4f: "audio/mp4",
            cmfa: "audio/mp4",
            ts: "video/mp2t",
            aac: "audio/aac",
            ac3: "audio/ac3",
            ec3: "audio/ec3",
            mp3: "audio/mpeg",
          },
          video: {
            mp4: "video/mp4",
            mp4v: "video/mp4",
            m4s: "video/mp4",
            m4i: "video/mp4",
            m4v: "video/mp4",
            m4f: "video/mp4",
            cmfv: "video/mp4",
            ts: "video/mp2t",
          },
          text: {
            mp4: "application/mp4",
            m4s: "application/mp4",
            m4i: "application/mp4",
            m4f: "application/mp4",
            cmft: "application/mp4",
            vtt: "text/vtt",
            ttml: "application/ttml+xml",
          },
        };
      function ae(m, _) {
        (m.l = _), m.i && m.i.hc(m.l == et.$a), m.l != et.$a || m.m.stop();
      }
      function ge(m, _, R) {
        if (!m.o) throw new re(2, 7, 7001);
        return (_ = m.j.networkingEngine.request(R, _)), Vn(m.o, _), _.promise;
      }
      var Ee = {
          "urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed": function (m) {
            var _ = Ao(m, "METHOD");
            ph(
              "HLS SAMPLE-AES-CENC",
              "SAMPLE-AES-CENC will no longer be supported, see Issue #1227"
            );
            var R = ["SAMPLE-AES", "SAMPLE-AES-CTR", "SAMPLE-AES-CENC"];
            return R.includes(_)
              ? ((_ = Ao(m, "URI")),
                (_ = eo.parse(_)),
                (_ = wt("com.widevine.alpha", [
                  {
                    initDataType: "cenc",
                    initData: (_ = new Uint8Array(_.data)),
                  },
                ])),
                (m = ys(m, "KEYID")) &&
                  (_.keyIds = [m.toLowerCase().substr(2)]),
                _)
              : (B.error(
                  "Widevine in HLS is only supported with [",
                  R.join(", "),
                  "], not",
                  _
                ),
                null);
          },
        },
        Le = "VOD",
        et = { $a: Le, Se: "EVENT", Wd: "LIVE" };
      function yt() {
        this.g = new Map();
      }
      function Bt(m, _, R) {
        mn(m, _).text = R;
      }
      function mn(m, _) {
        return m.g.has(_) || m.g.set(_, new Yn()), m.g.get(_);
      }
      function Yn() {
        this.text = this.variant = null;
      }
      function zr(m, _) {
        (this.g = m), (this.h = new Set([m]));
        for (var R = b((_ = _ || [])), M = R.next(); !M.done; M = R.next())
          this.add(M.value);
      }
      function Zr(m, _) {
        var R;
        if (
          !(R =
            !!m.audio != !!_.audio ||
            !!m.video != !!_.video ||
            m.language != _.language) &&
          (R = m.audio && _.audio)
        ) {
          R = m.audio;
          var M = _.audio;
          R = !(
            R.channelsCount == M.channelsCount &&
            fi(R, M) &&
            Pi(R.roles, M.roles)
          );
        }
        return (
          !R &&
            (R = m.video && _.video) &&
            (R = !(fi((R = m.video), (M = _.video)) && Pi(R.roles, M.roles))),
          !R
        );
      }
      function fi(m, _) {
        if (m.mimeType != _.mimeType) return !1;
        var R = m.codecs.split(",").map(function (z) {
            return Ki(z)[0];
          }),
          M = _.codecs.split(",").map(function (z) {
            return Ki(z)[0];
          });
        if (R.length != M.length) return !1;
        R.sort(), M.sort();
        for (var x = 0; x < R.length; x++) if (R[x] != M[x]) return !1;
        return !0;
      }
      function Pi(m, _) {
        var R = new Set(m),
          M = new Set(_);
        if ((R.delete("main"), M.delete("main"), R.size != M.size)) return !1;
        for (var x = (R = b(R)).next(); !x.done; x = R.next())
          if (!M.has(x.value)) return !1;
        return !0;
      }
      function ta(m) {
        (this.g = m),
          (this.h = new Ji(
            m.language,
            "",
            m.audio && m.audio.channelsCount ? m.audio.channelsCount : 0,
            ""
          ));
      }
      function Ji(m, _, R, M) {
        (this.i = m),
          (this.j = _),
          (this.g = R),
          (this.h = M === void 0 ? "" : M);
      }
      function bo() {
        (this.g = sl), (this.h = new Map().set(sl, 2).set(Do, 1));
      }
      function Oo(m, _, R) {
        m.h.set(sl, R).set(Do, _);
      }
      ia.Fd("m3u8", jm),
        ia.Qb("application/x-mpegurl", jm),
        ia.Qb("application/vnd.apple.mpegurl", jm),
        (zr.prototype.add = function (m) {
          return Zr(this.g, m)
            ? (this.h.add(m), !0)
            : (B.v("Rejecting variant - not compatible with root."), !1);
        }),
        (zr.prototype.values = function () {
          return this.h.values();
        }),
        (ta.prototype.create = function (m) {
          var _ = this,
            R = m.filter(function (M) {
              return Zr(_.g, M);
            });
          return R.length ? new zr(R[0], R) : this.h.create(m);
        }),
        (Ji.prototype.create = function (m) {
          var _ = [];
          _ = (function (M, x) {
            var z = Ia(x),
              J = Bv(
                z,
                M.map(function (te) {
                  return jb(te);
                })
              );
            return J
              ? M.filter(function (te) {
                  return J == jb(te);
                })
              : [];
          })(m, this.i);
          var R = m.filter(function (M) {
            return M.primary;
          });
          for (
            (m = (function (M, x) {
              return M.filter(function (z) {
                return (
                  !!z.audio &&
                  (x ? z.audio.roles.includes(x) : z.audio.roles.length == 0)
                );
              });
            })((_ = _.length ? _ : R.length ? R : m), this.j)).length
              ? (_ = m)
              : B.v("No exact match for variant role could be found."),
              this.g &&
                ((m = wi.ee(_, this.g)).length
                  ? (_ = m)
                  : B.v(
                      "No exact match for the channel count could be found."
                    )),
              this.h &&
                ((m = (function (M, x) {
                  return M.filter(function (z) {
                    return (
                      !!z.audio &&
                      z.audio.label.toLowerCase() == x.toLowerCase()
                    );
                  });
                })(_, this.h)),
                m.length
                  ? (_ = m)
                  : B.v("No exact match for variant label could be found.")),
              m = new zr(_[0]),
              R = (_ = b(_)).next();
            !R.done;
            R = _.next()
          )
            (R = R.value), Zr(m.g, R) && m.add(R);
          return m;
        });
      var Do = 0,
        sl = 1;
      function vc(m, _) {
        (this.l = m),
          (this.m = bg(m)),
          (this.g = m.g.currentTime),
          (this.j = Date.now() / 1e3),
          (this.h = !1),
          (this.o = _),
          (this.i = function () {});
      }
      function yh(m) {
        this.g = m;
      }
      function bg(m) {
        if (m.g.paused || m.g.playbackRate == 0 || m.g.buffered.length == 0)
          var _ = !1;
        else
          e: {
            (_ = m.g.buffered), (m = m.g.currentTime);
            for (var R = 0; R < _.length; R++) {
              var M = _.start(R),
                x = _.end(R);
              if (!(m < M - 0.1 || m > x - 0.5)) {
                _ = !0;
                break e;
              }
            }
            _ = !1;
          }
        return _;
      }
      function _g(m, _, R, M, x) {
        var z = this;
        (this.g = m),
          (this.F = _),
          (this.C = R),
          (this.u = x),
          (this.j = new Yr()),
          (this.o = !1),
          (this.A = m.readyState),
          (this.i = !1),
          (this.h = M),
          (this.m = !1),
          this.j.H(m, "waiting", function () {
            return rA(z);
          }),
          (this.l = new Ut(function () {
            rA(z);
          }).Oa(0.25));
      }
      function rA(m) {
        if (m.g.readyState != 0) {
          if (m.g.seeking) {
            if (!m.o) return;
          } else m.o = !1;
          if (!m.g.paused || m.g.currentTime == 0) {
            var _;
            if (
              (m.g.readyState != m.A && ((m.i = !1), (m.A = m.g.readyState)),
              !(_ = !m.h))
            ) {
              var R = (_ = m.h).l,
                M = bg(R),
                x = R.g.currentTime,
                z = Date.now() / 1e3;
              (_.g == x && _.m == M) ||
                ((_.j = z), (_.g = x), (_.m = M), (_.h = !1)),
                (M = (x = z - _.j) >= _.o && M && !_.h) &&
                  (_.i(_.g, x), (_.h = !0), (_.g = R.g.currentTime)),
                (_ = !M);
            }
            if (_) {
              (z = m.C.smallGapLimit), (_ = m.g.currentTime);
              e: {
                if (
                  (R = m.g.buffered) &&
                  R.length &&
                  !(R.length == 1 && 1e-6 > R.end(0) - R.start(0))
                ) {
                  for (
                    M =
                      navigator.userAgent.match(/Edge\//) ||
                      Ws("Trident/") ||
                      Gu() ||
                      Ws("CrKey")
                        ? 0.5
                        : 0.1,
                      x = 0;
                    x < R.length;
                    x++
                  )
                    if (R.start(x) > _ && (x == 0 || R.end(x - 1) - _ <= M)) {
                      M = x;
                      break e;
                    }
                }
                M = null;
              }
              if (M != null && (M != 0 || m.m)) {
                x = R.start(M);
                var J = m.F.Ka();
                if (!(x >= J)) {
                  z = (J = x - _) <= z;
                  var te = !1;
                  if (!(0.001 > J)) {
                    if (!z && !m.i) {
                      m.i = !0;
                      var pe = new Je("largegap", {
                        currentTime: _,
                        gapSize: J,
                      });
                      (pe.cancelable = !0),
                        m.u(pe),
                        m.C.jumpLargeGaps && !pe.defaultPrevented
                          ? (te = !0)
                          : B.info("Ignoring large gap at", _, "size", J);
                    }
                    (z || te) &&
                      (M == 0
                        ? B.info(
                            "Jumping forward",
                            J,
                            "seconds because of gap before start time of",
                            x
                          )
                        : B.info(
                            "Jumping forward",
                            J,
                            "seconds because of gap starting at",
                            R.end(M - 1),
                            "and ending at",
                            x
                          ),
                      (m.g.currentTime = x));
                  }
                }
              }
            }
          }
        }
      }
      function EP(m) {
        var _ = this;
        (this.i = m),
          (this.g = new Set()),
          (this.h = new Ut(function () {
            KO(_, !1);
          }).Oa(0.25));
      }
      function KO(m, _) {
        for (var R = b(m.g), M = R.next(); !M.done; M = R.next())
          M.value.l(m.i.currentTime, _);
      }
      function SP(m) {
        for (var _ = [], R = (m = b(m)).next(); !R.done; R = m.next())
          for (var M = (R = b(R.value.variants)).next(); !M.done; M = R.next())
            _.push(M.value);
        return _;
      }
      function ZO(m, _) {
        for (var R = null, M = b(m), x = M.next(); !x.done; x = M.next())
          _ >= (x = x.value).startTime && (R = x);
        return R;
      }
      function RP(m) {
        (this.i = m), (this.g = null), (this.h = function () {});
      }
      function T_(m) {
        var _ = this;
        (this.g = m),
          (this.j = !1),
          (this.i = this.g.wc()),
          (this.h = new Ut(function () {
            _.g.pe(0.25 * _.i);
          }));
      }
      function AP(m) {
        m.h.stop();
        var _ = m.j ? 0 : m.i;
        if (0 <= _)
          try {
            return void (m.g.wc() != _ && m.g.Od(_));
          } catch {}
        m.h.Oa(0.25), m.g.wc() != 0 && m.g.Od(0);
      }
      function qh(m, _, R, M) {
        _ == HTMLMediaElement.HAVE_NOTHING || m.readyState >= _
          ? M()
          : ((_ = YO.get(_)), R.ya(m, _, M));
      }
      (vc.prototype.release = function () {
        (this.l = null), (this.i = function () {});
      }),
        (_g.prototype.release = function () {
          this.j && (this.j.release(), (this.j = null)),
            this.l != null && (this.l.stop(), (this.l = null)),
            this.h && (this.h.release(), (this.h = null)),
            (this.g = this.F = this.u = null);
        }),
        (_g.prototype.zd = function () {
          (this.m = !0), rA(this);
        }),
        (EP.prototype.release = function () {
          this.h.stop();
          for (var m = b(this.g), _ = m.next(); !_.done; _ = m.next())
            _.value.release();
          this.g.clear();
        }),
        (RP.prototype.release = function () {
          (this.g = this.i = null), (this.h = function () {});
        }),
        (RP.prototype.l = function (m) {
          var _ = this.g,
            R = this.i.periods;
          _ != (m = ZO(R, m) || R[0]) && this.h(m), (this.g = m);
        }),
        (T_.prototype.release = function () {
          this.h && (this.h.stop(), (this.h = null)), (this.g = null);
        }),
        (T_.prototype.set = function (m) {
          (this.i = m), AP(this);
        }),
        (T_.prototype.vc = function () {
          return this.g.vc();
        });
      var YO = new Map([
        [HTMLMediaElement.HAVE_METADATA, "loadedmetadata"],
        [HTMLMediaElement.HAVE_CURRENT_DATA, "loadeddata"],
        [HTMLMediaElement.HAVE_FUTURE_DATA, "canplay"],
        [HTMLMediaElement.HAVE_ENOUGH_DATA, "canplaythrough"],
      ]);
      function wP(m, _, R) {
        var M = this;
        (this.g = m),
          (this.l = _),
          (this.j = R),
          (this.m = !1),
          (this.h = new Yr()),
          (this.i = new qO(m)),
          qh(this.g, HTMLMediaElement.HAVE_METADATA, this.h, function () {
            JO(M, M.j);
          });
      }
      function iA(m) {
        return m.m ? m.g.currentTime : m.j;
      }
      function QO(m, _) {
        0 < m.g.readyState
          ? IP(m.i, _)
          : qh(m.g, HTMLMediaElement.HAVE_METADATA, m.h, function () {
              JO(m, m.j);
            });
      }
      function JO(m, _) {
        0.001 > Math.abs(m.g.currentTime - _)
          ? kP(m)
          : (m.h.ya(m.g, "seeking", function () {
              kP(m);
            }),
            IP(m.i, m.g.currentTime == 0 ? _ : m.g.currentTime));
      }
      function kP(m) {
        (m.m = !0),
          m.h.H(m.g, "seeking", function () {
            return m.l();
          });
      }
      function qO(m) {
        var _ = this;
        (this.h = m),
          (this.m = 10),
          (this.l = this.i = this.j = 0),
          (this.g = new Ut(function () {
            0 >= _.j
              ? (B.v(
                  ["Failed to move playhead from", _.i, "to", _.l].join(" ")
                ),
                _.g.stop())
              : _.h.currentTime != _.i
              ? _.g.stop()
              : ((_.h.currentTime = _.l), _.j--);
          }));
      }
      function IP(m, _) {
        (m.i = m.h.currentTime),
          (m.l = _),
          (m.j = m.m),
          (m.h.currentTime = _),
          m.g.Oa(0.1);
      }
      function E_(m) {
        var _ = this;
        (this.g = m),
          (this.j = !1),
          (this.i = null),
          (this.h = new Yr()),
          qh(this.g, HTMLMediaElement.HAVE_CURRENT_DATA, this.h, function () {
            _.i == null
              ? (_.j = !0)
              : (_.h.ya(_.g, "seeking", function () {
                  _.j = !0;
                }),
                (_.g.currentTime = Math.max(0, _.g.currentTime + _.i)));
          });
      }
      function S_(m, _, R, M, x, z) {
        var J = this;
        (this.i = m),
          (this.g = _.presentationTimeline),
          (this.J = _.minBufferTime || 0),
          (this.m = R),
          (this.F = x),
          (this.u = null),
          (this.j = new _g(
            m,
            _.presentationTimeline,
            R,
            (function (te, pe) {
              if (!pe.stallEnabled) return null;
              var xe = pe.stallSkip,
                Be = new vc(new yh(te), pe.stallThreshold);
              return (
                (function (bt, dt) {
                  bt.i = dt;
                })(Be, function (bt, dt) {
                  B.debug(
                    "Stall detected at " + bt + " for " + dt + " seconds."
                  ),
                    xe
                      ? (B.debug(
                          "Seeking forward " + xe + " seconds to break stall."
                        ),
                        (te.currentTime += xe))
                      : (B.debug("Pausing and unpausing to break stall."),
                        te.pause(),
                        te.play());
                }),
                Be
              );
            })(m, R),
            z
          )),
          (this.h = new wP(
            m,
            function () {
              e: {
                var te = J.j;
                (te.o = !0), (te.m = !1), (te.i = !1), (te = iA(J.h));
                var pe = DP(J, te);
                if (0.001 < Math.abs(pe - te)) {
                  var xe = Date.now() / 1e3;
                  if (!J.u || J.u < xe - 1) {
                    (J.u = xe), QO(J.h, pe), (te = void 0);
                    break e;
                  }
                }
                B.K("Seek to " + te), J.F(), (te = void 0);
              }
              return te;
            },
            (function (te, pe) {
              return (
                pe == null
                  ? (pe = 1 / 0 > te.g.ha() ? te.g.Cb() : te.g.Ka())
                  : 0 > pe && (pe = te.g.Ka() + pe),
                eG(te, tG(te, pe))
              );
            })(this, M)
          )),
          (this.o = new Ut(function () {
            if (J.i.readyState != 0 && !J.i.paused) {
              var te = iA(J.h),
                pe = J.g.Cb(),
                xe = J.g.Ka();
              3 > xe - pe && (pe = xe - 3),
                te < pe &&
                  ((pe = DP(J, te)),
                  B.info(
                    "Jumping forward " +
                      (pe - te) +
                      " seconds to catch up with the seek range."
                  ),
                  (J.i.currentTime = pe));
            }
          }).Oa(0.25));
      }
      function eG(m, _) {
        var R = m.g.ha();
        return _ >= R ? R - m.m.durationBackoff : _;
      }
      function DP(m, _) {
        var R = qf.bind(null, m.i.buffered),
          M = Math.max(m.J, m.m.rebufferingGoal),
          x = m.m.safeSeekOffset,
          z = m.g.Cb(),
          J = m.g.Ka(),
          te = m.g.ha();
        3 > J - z && (z = J - 3);
        var pe = m.g.Zb(M),
          xe = m.g.Zb(x);
        return (
          (M = m.g.Zb(M + x)),
          _ >= te
            ? (B.K("Playhead past duration."), eG(m, _))
            : _ > J
            ? (B.K("Playhead past end."), J)
            : _ < z
            ? R(xe)
              ? (B.K("Playhead before start & start is buffered"), xe)
              : (B.K("Playhead before start & start is unbuffered"), M)
            : _ >= pe || R(_)
            ? (B.K("Playhead in safe region or in buffered region."), _)
            : (B.K("Playhead outside safe region & in unbuffered region."), M)
        );
      }
      function tG(m, _) {
        var R = m.g.Cb();
        return _ < R || _ > (R = m.g.Ka()) ? R : _;
      }
      function aA(m) {
        var _ = this;
        (this.h = function () {}),
          (this.g = new Set()),
          (this.j = m),
          (this.i = new Ut(function () {
            for (var R = _.j(), M = b(_.g), x = M.next(); !x.done; x = M.next())
              (x = x.value).endTime < R.start && _.g.delete(x);
          }).Oa(2));
      }
      function oA(m) {
        var _ = this;
        (this.m = m),
          (this.j = new Map()),
          (this.g = function () {}),
          (this.h = function () {}),
          (this.i = function () {}),
          (this.o = [
            {
              rb: null,
              qb: A_,
              hb: function (R, M) {
                return _.g(R, M);
              },
            },
            {
              rb: R_,
              qb: A_,
              hb: function (R, M) {
                return _.g(R, M);
              },
            },
            {
              rb: Fd,
              qb: A_,
              hb: function (R, M) {
                return _.g(R, M);
              },
            },
            {
              rb: A_,
              qb: R_,
              hb: function (R, M) {
                return _.h(R, M);
              },
            },
            {
              rb: A_,
              qb: Fd,
              hb: function (R, M) {
                return _.h(R, M);
              },
            },
            {
              rb: R_,
              qb: Fd,
              hb: function (R, M) {
                return _.i(R, M);
              },
            },
            {
              rb: Fd,
              qb: R_,
              hb: function (R, M) {
                return _.i(R, M);
              },
            },
          ]);
      }
      (wP.prototype.release = function () {
        this.h && (this.h.release(), (this.h = null)),
          this.i != null && (this.i.release(), (this.i = null)),
          (this.l = function () {}),
          (this.g = null);
      }),
        (qO.prototype.release = function () {
          this.g && (this.g.stop(), (this.g = null)), (this.h = null);
        }),
        (E_.prototype.release = function () {
          this.h && (this.h.release(), (this.h = null)), (this.g = null);
        }),
        (E_.prototype.A = function (m) {
          this.i = this.j ? this.i : m;
        }),
        (E_.prototype.l = function () {
          return (this.j ? this.g.currentTime : this.i) || 0;
        }),
        (E_.prototype.C = function () {}),
        (S_.prototype.release = function () {
          this.h && (this.h.release(), (this.h = null)),
            this.j && (this.j.release(), (this.j = null)),
            this.o && (this.o.stop(), (this.o = null)),
            (this.i = this.h = this.g = this.m = null),
            (this.F = function () {});
        }),
        (S_.prototype.A = function (m) {
          QO(this.h, m);
        }),
        (S_.prototype.l = function () {
          var m = iA(this.h);
          return 0 < this.i.readyState && !this.i.paused ? tG(this, m) : m;
        }),
        (S_.prototype.C = function () {
          this.j.zd();
        }),
        (aA.prototype.release = function () {
          (this.h = function () {}), this.g.clear(), this.i.stop();
        }),
        (oA.prototype.release = function () {
          (this.m = null),
            this.j.clear(),
            (this.g = function () {}),
            (this.h = function () {}),
            (this.i = function () {});
        }),
        (oA.prototype.l = function (m, _) {
          for (var R = b(this.m.g), M = R.next(); !M.done; M = R.next()) {
            M = M.value;
            var x = this.j.get(M),
              z = m < M.startTime ? R_ : m > M.endTime ? Fd : A_;
            this.j.set(M, z);
            for (var J = b(this.o), te = J.next(); !te.done; te = J.next())
              (te = te.value).rb == x && te.qb == z && te.hb(M, _);
          }
        });
      var R_ = 1,
        A_ = 2,
        Fd = 3;
      function Jv(m, _) {
        (this.g = _),
          (this.i = m),
          (this.l = null),
          (this.u = 1),
          (this.F = Promise.resolve()),
          (this.m = []),
          (this.o = new Map()),
          (this.h = new Map()),
          (this.C = !1),
          (this.M = null),
          (this.L = this.j = this.A = !1),
          (this.J = 0);
      }
      function f2(m) {
        return sA(m, "audio");
      }
      function w_(m) {
        return sA(m, "video");
      }
      function sA(m, _) {
        var R = m.h.get(_);
        return R ? R.Ta || R.stream : null;
      }
      function PP(m, _) {
        return k(function R() {
          var M, x, z, J, te, pe, xe, Be, bt;
          return $t(R, function (dt) {
            switch (dt.s) {
              case 1:
                return (M = Mt), E(dt, r2(m.g.T, M.za), 2);
              case 2:
                return (
                  m.J++,
                  (m.L = !1),
                  (x = m.J),
                  (z = m.g.T),
                  (J = new Map()),
                  (te = new Set()),
                  J.set(M.za, _),
                  te.add(_),
                  E(dt, z.init(J, !1), 3)
                );
              case 3:
                return m.j ? dt.return() : E(dt, uA(m, te), 4);
              case 4:
                if (m.j) return dt.return();
                (pe = m.g.T.l.isTextVisible() || m.l.alwaysStreamText),
                  m.J != x ||
                    m.h.has(M.za) ||
                    m.L ||
                    !pe ||
                    ((xe = m.g.eb()),
                    (Be = sy(m, xe)),
                    (bt = iG(_, Be, 0)),
                    m.h.set(M.za, bt),
                    tf(m, bt, 0)),
                  S(dt);
            }
          });
        });
      }
      function nG(m, _) {
        var R = m.h.get("video");
        if (R) {
          var M = R.stream;
          if (M)
            if ((B.debug("setTrickPlay", _), _)) {
              var x = M.trickModeVideo;
              x &&
                !R.Ta &&
                (B.debug("Engaging trick mode stream", x),
                ay(m, x, !1, 0, !1),
                (R.Ta = M));
            } else
              (M = R.Ta) &&
                (B.debug("Restoring non-trick-mode stream", M),
                (R.Ta = null),
                ay(m, M, !0, 0, !1));
        }
      }
      function lA(m, _, R, M) {
        var x = !1;
        if (_.video) {
          var z = ay(m, _.video, R, M, !1);
          x = x || z;
        }
        return _.audio && ((m = ay(m, _.audio, R, M, !1)), (x = x || m)), x;
      }
      function ay(m, _, R, M, x) {
        var z = m.h.get(_.type);
        if (!z && _.type == "text" && m.l.ignoreTextStreamFailures)
          return PP(m, _), !0;
        if (!z) return !1;
        var J = Wm(m, _),
          te = Array.from(m.h.values()).every(function (pe) {
            return pe.oa == z.oa;
          });
        return R && J != z.oa && te
          ? (B.debug(
              "switch: switching to stream in another Period; clearing buffer and changing Periods"
            ),
            m.h.forEach(function (pe) {
              MP(m, pe);
            }),
            !0)
          : (z.Ta &&
              (B.debug("switch during trick play mode", _),
              _.trickModeVideo
                ? ((z.Ta = _),
                  (_ = _.trickModeVideo),
                  B.debug("switch found trick play stream", _))
                : ((z.Ta = null),
                  B.debug("switch found no special trick play stream"))),
            !(!(te = m.m[J]) || !te.Rb) &&
              !(!(te = m.o.get(_.id)) || !te.Rb) &&
              (z.stream != _ || x
                ? (_.type == "text" && Wh(m.g.T, Aa(_.mimeType, _.codecs)),
                  (z.stream = _),
                  (z.Ac = !0),
                  B.debug("switch: switching to Stream " + rc(z)),
                  (function (pe, xe, Be) {
                    if (!xe.lb) return !1;
                    var bt = pe.g.eb(),
                      dt = zb(pe.g.T, xe.type),
                      mt = aG(pe, xe, bt, dt, Be);
                    return (
                      (Be = mt && mt.g ? mt.g - mt.h : null),
                      mt &&
                        !Be &&
                        (Be =
                          ((mt.endTime - mt.xc()) * xe.stream.bandwidth) / 8),
                      !isNaN(Be) &&
                        ((mt = xe.stream.initSegmentReference) &&
                          (Be += (mt.g ? mt.g - mt.h : null) || 0),
                        (mt = pe.g.getBandwidthEstimate()),
                        (8 * Be) / mt <
                          dt -
                            bt -
                            Math.max(
                              pe.i.minBufferTime || 0,
                              pe.l.rebufferingGoal
                            ) || xe.lb.h.g > Be)
                    );
                  })(m, z, J) &&
                    (B.info("Aborting current segment request to switch."),
                    z.lb.abort()),
                  R &&
                    (z.ab
                      ? (z.Qc = !0)
                      : z.Sa
                      ? ((z.Wa = !0), (z.oc = M), (z.Qc = !0))
                      : (cA(z),
                        ef(m, z, !0, M).catch(function (pe) {
                          m.g && m.g.onError(pe);
                        }))),
                  !0)
                : (B.debug("switch: Stream " + rc(z) + " already active"),
                  !1)));
      }
      function MP(m, _) {
        var R = rc(_);
        _.ab
          ? B.debug(R, "clear: already clearing the buffer")
          : _.Wa
          ? B.debug(R, "clear: already waiting")
          : _.Sa
          ? (B.debug(R, "clear: currently updating"), (_.Wa = !0), (_.oc = 0))
          : Fc(m.g.T, _.type) == null
          ? (B.debug(R, "clear: nothing buffered"), _.Pa == null && tf(m, _, 0))
          : (B.debug(R, "clear: handling right now"),
            cA(_),
            ef(m, _, !1, 0).catch(function (M) {
              m.g && m.g.onError(M);
            }));
      }
      function rG(m, _, R, M, x) {
        return k(function z() {
          var J, te, pe, xe, Be, bt, dt;
          return $t(z, function (mt) {
            switch (mt.s) {
              case 1:
                return (
                  (J = m.g.eb()),
                  (te = sy(m, J)),
                  (pe = Mt),
                  (xe = new Map()),
                  (Be = new Set()),
                  _ && (xe.set(pe.Sb, _), Be.add(_)),
                  R && (xe.set(pe.Za, R), Be.add(R)),
                  M && (xe.set(pe.za, M), Be.add(M)),
                  (bt = m.g.T),
                  (dt = m.l.forceTransmuxTS),
                  E(mt, bt.init(xe, dt), 2)
                );
              case 2:
                return m.j
                  ? mt.return()
                  : ((function (xt) {
                      var Nt = xt.i.presentationTimeline.ha();
                      1 / 0 > Nt ? xt.g.T.Fa(Nt) : xt.g.T.Fa(Math.pow(2, 32));
                    })(m),
                    E(mt, uA(m, Be), 3));
              case 3:
                if (m.j) return mt.return();
                xe.forEach(function (xt, Nt) {
                  if (!m.h.has(Nt)) {
                    var en = iG(xt, te, x);
                    m.h.set(Nt, en), tf(m, en, 0);
                  }
                }),
                  S(mt);
            }
          });
        });
      }
      function iG(m, _, R) {
        return {
          stream: m,
          type: m.type,
          Hb: null,
          La: null,
          Ta: null,
          Ac: !0,
          oa: _,
          endOfStream: !1,
          Sa: !1,
          Pa: null,
          Wa: !1,
          oc: 0,
          Qc: !1,
          ab: !1,
          Ed: !1,
          ac: !1,
          Hd: R || 0,
          lb: null,
        };
      }
      function CP(m, _) {
        var R = m.m[_];
        if (R)
          return (
            B.debug("(all) Period " + _ + " is being or has been set up"),
            R.promise
          );
        B.debug("(all) setting up Period " + _),
          (R = { promise: new Ft(), Rb: !1 }),
          (m.m[_] = R);
        for (
          var M = new Set(), x = b(m.i.periods[_].variants), z = x.next();
          !z.done;
          z = x.next()
        )
          (z = z.value).video && M.add(z.video),
            z.video && z.video.trickModeVideo && M.add(z.video.trickModeVideo),
            z.audio && M.add(z.audio);
        for (
          z = (x = b(m.i.periods[_].textStreams)).next();
          !z.done;
          z = x.next()
        )
          M.add(z.value);
        return (
          (m.F = m.F.then(
            function () {
              if (!this.j) return uA(this, M);
            }.bind(m)
          )
            .then(
              function () {
                this.j ||
                  (this.m[_].promise.resolve(),
                  (this.m[_].Rb = !0),
                  B.K("(all) setup Period " + _));
              }.bind(m)
            )
            .catch(
              function (J) {
                this.j ||
                  (this.m[_].promise.catch(function () {}),
                  this.m[_].promise.reject(),
                  delete this.m[_],
                  B.v("(all) failed to setup Period " + _),
                  this.g.onError(J));
              }.bind(m)
            )),
          R.promise
        );
      }
      function uA(m, _) {
        return k(function R() {
          var M, x, z, J, te, pe, xe;
          return $t(R, function (Be) {
            switch (Be.s) {
              case 1:
                M = [];
                for (var bt = b(_), dt = bt.next(); !dt.done; dt = bt.next())
                  (x = dt.value),
                    (z = m.o.get(x.id))
                      ? (B.debug(
                          "(all) Stream " +
                            x.id +
                            " is being or has been set up"
                        ),
                        M.push(z.promise))
                      : (B.K("(all) setting up Stream " + x.id),
                        m.o.set(x.id, { promise: new Ft(), Rb: !1 }),
                        M.push(x.createSegmentIndex()));
                return L(Be, 2), E(Be, Promise.all(M), 4);
              case 4:
                if (m.j) return Be.return();
                F(Be, 3);
                break;
              case 2:
                if (((J = oe(Be)), m.j)) return Be.return();
                for (dt = (Be = b(_)).next(); !dt.done; dt = Be.next())
                  (te = dt.value),
                    m.o.get(te.id).promise.catch(function () {}),
                    m.o.get(te.id).promise.reject(),
                    m.o.delete(te.id);
                throw J;
              case 3:
                for (dt = (bt = b(_)).next(); !dt.done; dt = bt.next())
                  (pe = dt.value),
                    (xe = m.o.get(pe.id)).Rb ||
                      (xe.promise.resolve(),
                      (xe.Rb = !0),
                      B.K("(all) setup Stream " + pe.id));
                S(Be);
            }
          });
        });
      }
      function c7(m, _) {
        if (!m.j) {
          var R = rc(_);
          if (!_.Sa && _.Pa != null && !_.ab)
            if (((_.Pa = null), _.Wa))
              B.debug(R, "skipping update and clearing the buffer"),
                ef(m, _, _.Qc, _.oc);
            else {
              try {
                var M = (function (x, z) {
                  if (oy(z)) return Fv(x.g.T, z.stream.originalId || ""), null;
                  var J = rc(z),
                    te = x.g.eb(),
                    pe = $P(x, z, te);
                  B.O(J, "timeNeeded=" + pe);
                  var xe = Wm(x, z.stream),
                    Be = sy(x, pe),
                    bt = (function (xt, Nt, en) {
                      return Nt == "text"
                        ? (xt = xt.g).h == null || xt.h < en
                          ? 0
                          : xt.h - Math.max(en, xt.g)
                        : Nb((xt = fg(xt, Nt)), en);
                    })(x.g.T, z.type, te);
                  B.O(
                    J,
                    "update_:",
                    "presentationTime=" + te,
                    "bufferedAhead=" + bt
                  );
                  var dt =
                    Math.max(
                      x.i.minBufferTime || 0,
                      x.l.rebufferingGoal,
                      x.l.bufferingGoal
                    ) * x.u;
                  if (pe >= x.i.presentationTimeline.ha())
                    return (
                      B.debug(J, "buffered to end of presentation"),
                      (z.endOfStream = !0),
                      z.type == "video" &&
                        (pe = x.h.get("text")) &&
                        pe.stream.mimeType == "application/cea-608" &&
                        (pe.endOfStream = !0),
                      null
                    );
                  if (((z.endOfStream = !1), (z.oa = Be), Be != xe))
                    return (
                      B.debug(
                        J,
                        "need Period " + Be,
                        "presentationTime=" + te,
                        "timeNeeded=" + pe,
                        "currentPeriodIndex=" + xe
                      ),
                      null
                    );
                  if (bt >= dt) return B.O(J, "buffering goal met"), 0.5;
                  if (((J = zb(x.g.T, z.type)), (J = aG(x, z, te, J, xe)), !J))
                    return 1;
                  var mt = 1 / 0;
                  return (
                    Array.from(x.h.values()).forEach(function (xt) {
                      oy(xt) || ((xt = $P(x, xt, te)), (mt = Math.min(mt, xt)));
                    }),
                    pe >= mt + x.i.presentationTimeline.g
                      ? 1
                      : ((z.Hd = 0),
                        (function (xt, Nt, en, Tn, In) {
                          var Qn = rc(Nt),
                            vr = xt.i.periods[Tn];
                          B.K(
                            Qn,
                            "fetchAndAppend_:",
                            "presentationTime=" + en,
                            "currentPeriod.startTime=" + vr.startTime,
                            "reference.position=" + In.position,
                            "reference.startTime=" + In.startTime,
                            "reference.endTime=" + In.endTime
                          );
                          var mr = Nt.stream,
                            bi = xt.i.presentationTimeline.ha(),
                            Ur = xt.i.periods[Tn + 1];
                          (Tn = (function (Jr, dr, Br, oi, ki) {
                            if (!dr.Ac) return Promise.resolve();
                            var Or = rc(dr);
                            return (
                              (Br =
                                Jr.i.periods[Br].startTime -
                                dr.stream.presentationTimeOffset),
                              B.K(Or, "setting timestamp offset to " + Br),
                              B.K(Or, "setting append window start to " + oi),
                              B.K(Or, "setting append window end to " + ki),
                              (oi = (function (ri, Yi, Ba, wa, Po) {
                                return Yi == "text"
                                  ? ((ri.g.A = Ba),
                                    ((ri = ri.g).j = wa),
                                    (ri.m = Po),
                                    Promise.resolve())
                                  : Promise.all([
                                      Kh(ri, Yi, ri.Ve.bind(ri, Yi)),
                                      Kh(ri, Yi, ri.Cg.bind(ri, Yi, Ba)),
                                      Kh(ri, Yi, ri.zg.bind(ri, Yi, wa, Po)),
                                    ]);
                              })(Jr.g.T, dr.type, Br, oi, ki)),
                              dr.stream.initSegmentReference
                                ? (B.K(Or, "fetching init segment"),
                                  (Jr = oG(
                                    Jr,
                                    dr,
                                    dr.stream.initSegmentReference
                                  )
                                    .then(
                                      function (ri) {
                                        if (!this.j)
                                          return (
                                            B.K(Or, "appending init segment"),
                                            n2(
                                              this.g.T,
                                              dr.type,
                                              ri,
                                              null,
                                              null,
                                              dr.stream.closedCaptions &&
                                                0 <
                                                  dr.stream.closedCaptions.size
                                            )
                                          );
                                      }.bind(Jr)
                                    )
                                    .catch(function (ri) {
                                      return (dr.Ac = !0), Promise.reject(ri);
                                    })),
                                  Promise.all([oi, Jr]))
                                : oi
                            );
                          })(
                            xt,
                            Nt,
                            Tn,
                            Math.max(0, vr.startTime - 0.1),
                            Ur ? Ur.startTime + 0.01 : bi
                          )),
                            (Nt.Sa = !0),
                            (Nt.Ac = !1),
                            B.O(Qn, "fetching segment"),
                            (bi = oG(xt, Nt, In)),
                            Promise.all([Tn, bi])
                              .then(
                                function (Jr) {
                                  if (!this.j && !this.A)
                                    return (function (
                                      dr,
                                      Br,
                                      oi,
                                      ki,
                                      Or,
                                      ri,
                                      Yi
                                    ) {
                                      var Ba = rc(Br),
                                        wa =
                                          Or.closedCaptions &&
                                          0 < Or.closedCaptions.size;
                                      return (
                                        Or.emsgSchemeIdUris != null &&
                                          0 < Or.emsgSchemeIdUris.length &&
                                          new Ja()
                                            .ma(
                                              "emsg",
                                              dr.P.bind(
                                                dr,
                                                ki,
                                                ri,
                                                Or.emsgSchemeIdUris
                                              )
                                            )
                                            .parse(Yi),
                                        (function (Po, go, Pa) {
                                          var Ha = rc(go);
                                          B.O(Ha, "checking buffer length");
                                          var zi = Math.max(
                                              Po.l.bufferBehind,
                                              Po.i.presentationTimeline.g
                                            ),
                                            ha = Fc(Po.g.T, go.type);
                                          if (ha == null)
                                            return (
                                              B.O(
                                                Ha,
                                                "buffer behind okay because nothing buffered:",
                                                "presentationTime=" + Pa,
                                                "bufferBehind=" + zi
                                              ),
                                              Promise.resolve()
                                            );
                                          var Xa = Pa - ha,
                                            Li = Xa - zi;
                                          return 0.01 >= Li
                                            ? (B.O(
                                                Ha,
                                                "buffer behind okay:",
                                                "presentationTime=" + Pa,
                                                "bufferedBehind=" + Xa,
                                                "bufferBehind=" + zi,
                                                "underflow=" + Math.abs(Li)
                                              ),
                                              Promise.resolve())
                                            : (B.K(
                                                Ha,
                                                "buffer behind too large:",
                                                "presentationTime=" + Pa,
                                                "bufferedBehind=" + Xa,
                                                "bufferBehind=" + zi,
                                                "overflow=" + Li
                                              ),
                                              Po.g.T.remove(
                                                go.type,
                                                ha,
                                                ha + Li
                                              ).then(
                                                function () {
                                                  this.j ||
                                                    B.K(
                                                      Ha,
                                                      "evicted " +
                                                        Li +
                                                        " seconds"
                                                    );
                                                }.bind(Po)
                                              ));
                                        })(dr, Br, oi)
                                          .then(
                                            function () {
                                              if (!this.j)
                                                return (
                                                  B.K(
                                                    Ba,
                                                    "appending media segment"
                                                  ),
                                                  n2(
                                                    this.g.T,
                                                    Br.type,
                                                    Yi,
                                                    ri.startTime + ki.startTime,
                                                    ri.endTime + ki.startTime,
                                                    wa
                                                  )
                                                );
                                            }.bind(dr)
                                          )
                                          .then(
                                            function () {
                                              if (!this.j)
                                                return (
                                                  B.O(
                                                    Ba,
                                                    "appended media segment"
                                                  ),
                                                  (Br.Hb = Or),
                                                  (Br.La = ri),
                                                  Promise.resolve()
                                                );
                                            }.bind(dr)
                                          )
                                      );
                                    })(this, Nt, en, vr, mr, In, Jr[1]);
                                }.bind(xt)
                              )
                              .then(
                                function () {
                                  this.j ||
                                    this.A ||
                                    ((Nt.Sa = !1),
                                    (Nt.Ed = !1),
                                    Nt.Wa || this.g.zd(),
                                    tf(this, Nt, 0),
                                    (function (Jr, dr, Br) {
                                      if (!Jr.C) {
                                        var oi = rc(dr);
                                        if (
                                          (((dr = Array.from(Jr.h.values()))
                                            .length == 1 &&
                                            dr[0].type == "text") ||
                                            (Jr.C = dr.every(function (ki) {
                                              return (
                                                ki.type == "text" ||
                                                (!ki.Wa && !ki.ab && ki.La)
                                              );
                                            })),
                                          Jr.C)
                                        ) {
                                          for (
                                            B.debug(oi, "startup complete"),
                                              Br = Wm(Jr, Br),
                                              Jr.m[Br] ||
                                                CP(Jr, Br)
                                                  .then(
                                                    function () {
                                                      this.j ||
                                                        (B.K(
                                                          oi,
                                                          "calling onCanSwitch()..."
                                                        ),
                                                        this.g.te());
                                                    }.bind(Jr)
                                                  )
                                                  .catch(rn.Bc),
                                              Br = 0;
                                            Br < Jr.i.periods.length;
                                            ++Br
                                          )
                                            CP(Jr, Br).catch(rn.Bc);
                                          Jr.g.gg &&
                                            (B.K(
                                              oi,
                                              "calling onStartupComplete()..."
                                            ),
                                            Jr.g.gg());
                                        }
                                      }
                                    })(this, Nt, mr),
                                    B.K(Qn, "finished fetch and append"));
                                }.bind(xt)
                              )
                              .catch(
                                function (Jr) {
                                  this.j ||
                                    this.A ||
                                    ((Nt.Sa = !1),
                                    Nt.type == "text" &&
                                    this.l.ignoreTextStreamFailures
                                      ? (Jr.code == 1001
                                          ? B.v(
                                              Qn,
                                              "Text stream failed to download. Proceeding without it."
                                            )
                                          : B.v(
                                              Qn,
                                              "Text stream failed to parse. Proceeding without it."
                                            ),
                                        this.h.delete("text"))
                                      : Jr.code == 7001
                                      ? ((Nt.Sa = !1),
                                        (Nt.Pa = null),
                                        tf(this, Nt, 0))
                                      : Jr.code == 3017
                                      ? (function (dr, Br, oi) {
                                          var ki = rc(Br);
                                          if (
                                            Array.from(dr.h.values()).some(
                                              function (ri) {
                                                return ri != Br && ri.Ed;
                                              }
                                            )
                                          )
                                            B.debug(
                                              ki,
                                              "MediaSource threw QuotaExceededError:",
                                              "waiting for another stream to recover..."
                                            );
                                          else {
                                            var Or = Math.round(100 * dr.u);
                                            if (20 < Or) dr.u -= 0.2;
                                            else {
                                              if (!(4 < Or))
                                                return (
                                                  B.error(
                                                    ki,
                                                    "MediaSource threw QuotaExceededError too many times"
                                                  ),
                                                  (Br.ac = !0),
                                                  (dr.A = !0),
                                                  void dr.g.onError(oi)
                                                );
                                              dr.u -= 0.04;
                                            }
                                            B.v(
                                              ki,
                                              "MediaSource threw QuotaExceededError:",
                                              "reducing buffering goals by " +
                                                (100 - Math.round(100 * dr.u)) +
                                                "%"
                                            ),
                                              (Br.Ed = !0);
                                          }
                                          tf(dr, Br, 4);
                                        })(this, Nt, Jr)
                                      : (B.error(
                                          Qn,
                                          "failed fetch and append: code=" +
                                            Jr.code
                                        ),
                                        (Nt.ac = !0),
                                        (Jr.severity = 2),
                                        LP(this, Jr)));
                                }.bind(xt)
                              );
                        })(x, z, te, xe, J),
                        null)
                  );
                })(m, _);
                M != null && (tf(m, _, M), (_.ac = !1));
              } catch (x) {
                return void LP(m, x);
              }
              (M = Array.from(m.h.values())),
                (function (x, z) {
                  var J = rc(z),
                    te = Wm(x, z.stream);
                  if (z.oa != te) {
                    var pe = z.oa,
                      xe = Array.from(x.h.values());
                    xe.every(function (Be) {
                      return Be.oa == pe || oy(Be);
                    })
                      ? xe.every(k_)
                        ? (B.debug(J, "all need Period " + pe),
                          CP(x, pe)
                            .then(
                              function () {
                                if (!this.j)
                                  if (
                                    xe.every(
                                      function (Tn) {
                                        var In = k_(Tn),
                                          Qn = Wm(this, Tn.stream);
                                        return (
                                          !!oy(Tn) ||
                                          (In && Tn.oa == pe && Qn != pe)
                                        );
                                      }.bind(this)
                                    )
                                  ) {
                                    var Be = this.i.periods[pe];
                                    B.K(J, "calling onChooseStreams()...");
                                    var bt = this.g.ue(Be),
                                      dt = new Map();
                                    bt.variant &&
                                      bt.variant.video &&
                                      dt.set("video", bt.variant.video),
                                      bt.variant &&
                                        bt.variant.audio &&
                                        dt.set("audio", bt.variant.audio),
                                      bt.text && dt.set("text", bt.text);
                                    for (
                                      var mt = (bt = b(this.h.keys())).next();
                                      !mt.done;
                                      mt = bt.next()
                                    )
                                      if (
                                        ((mt = mt.value),
                                        !dt.has(mt) && mt != "text")
                                      )
                                        return (
                                          B.error(
                                            J,
                                            "invalid Streams chosen: missing " +
                                              mt +
                                              " Stream"
                                          ),
                                          void this.g.onError(
                                            new re(2, 5, 5005)
                                          )
                                        );
                                    for (
                                      mt = (bt = b(
                                        Array.from(dt.keys())
                                      )).next();
                                      !mt.done;
                                      mt = bt.next()
                                    )
                                      if (((mt = mt.value), !this.h.has(mt))) {
                                        if (mt != "text")
                                          return (
                                            B.error(
                                              J,
                                              "invalid Streams chosen: unusable " +
                                                mt +
                                                " Stream"
                                            ),
                                            void this.g.onError(
                                              new re(2, 5, 5005)
                                            )
                                          );
                                        rG(
                                          this,
                                          null,
                                          null,
                                          dt.get("text"),
                                          Be.startTime
                                        ),
                                          dt.delete(mt);
                                      }
                                    for (
                                      mt = (bt = b(
                                        Array.from(this.h.keys())
                                      )).next();
                                      !mt.done;
                                      mt = bt.next()
                                    ) {
                                      mt = mt.value;
                                      var xt = this.h.get(mt),
                                        Nt = dt.get(mt);
                                      if (Nt) {
                                        var en = oy(xt);
                                        en &&
                                          ((xt.oa = pe),
                                          (xt.Hd = Be.startTime)),
                                          ay(this, Nt, !1, 0, !1),
                                          (en && oy(xt)) ||
                                            tf(this, this.h.get(mt), 0);
                                      } else this.h.delete(mt);
                                    }
                                    B.K(J, "calling onCanSwitch()..."),
                                      this.g.te();
                                  } else
                                    B.debug(
                                      J,
                                      "ignoring transition to Period",
                                      pe,
                                      "since another is happening"
                                    );
                              }.bind(x)
                            )
                            .catch(rn.Bc))
                        : B.debug(
                            J,
                            "all MediaStates need Period " +
                              pe +
                              ", but not all MediaStates are idle"
                          )
                      : B.debug(J, "not all MediaStates need Period " + pe);
                  }
                })(m, _),
                m.C &&
                  M.every(function (x) {
                    return x.endOfStream;
                  }) &&
                  (B.K(R, "calling endOfStream()..."),
                  m.g.T.endOfStream().then(
                    function () {
                      if (!this.j) {
                        var x = this.g.T.ha();
                        x != 0 &&
                          x < this.i.presentationTimeline.ha() &&
                          this.i.presentationTimeline.Fa(x);
                      }
                    }.bind(m)
                  ));
            }
        }
      }
      function $P(m, _, R) {
        return _.Hb && _.La
          ? ((R = Wm(m, _.Hb)), m.i.periods[R].startTime + _.La.endTime)
          : Math.max(R, _.Hd);
      }
      function aG(m, _, R, M, x) {
        var z = rc(_);
        return _.La && _.stream == _.Hb
          ? ((M = _.La.position + 1),
            B.O(z, "next position known:", "position=" + M),
            vh(m, _, x, M))
          : (_.La
              ? (B.K(z, "next position unknown: another Stream buffered"),
                (z = Wm(m, _.Hb)),
                (z = xP(m, _, m.i.periods[z].startTime + _.La.endTime, x)))
              : (B.K(z, "next position unknown: nothing buffered"),
                (z = xP(m, _, M || R, x))),
            z == null
              ? null
              : ((R = null),
                M == null && (R = vh(m, _, x, Math.max(0, z - 1))),
                R || vh(m, _, x, z)));
      }
      function xP(m, _, R, M) {
        var x = rc(_);
        return (
          (m = m.i.periods[M]),
          B.debug(
            x,
            "looking up segment:",
            "presentationTime=" + R,
            "currentPeriod.startTime=" + m.startTime
          ),
          (R = Math.max(0, R - m.startTime)),
          (_ = _.stream.findSegmentPosition(R)) == null &&
            B.v(
              x,
              "cannot find segment:",
              "currentPeriod.startTime=" + m.startTime,
              "lookupTime=" + R
            ),
          _
        );
      }
      function vh(m, _, R, M) {
        var x = rc(_);
        return (
          (R = m.i.periods[R]),
          (_ = _.stream.getSegmentReference(M))
            ? ((m = (M = m.i.presentationTimeline).$b()),
              (M = M.Db()),
              R.startTime + _.endTime < m || R.startTime + _.startTime > M
                ? (B.O(
                    x,
                    "segment is not available:",
                    "currentPeriod.startTime=" + R.startTime,
                    "reference.startTime=" + _.startTime,
                    "reference.endTime=" + _.endTime,
                    "availabilityStart=" + m,
                    "availabilityEnd=" + M
                  ),
                  null)
                : _)
            : (B.K(
                x,
                "segment does not exist:",
                "currentPeriod.startTime=" + R.startTime,
                "position=" + M
              ),
              null)
        );
      }
      function oy(m) {
        return (
          m && m.type == "text" && m.stream.mimeType == "application/cea-608"
        );
      }
      function k_(m) {
        return !m.Sa && m.Pa == null && !m.Wa && !m.ab;
      }
      function sy(m, _) {
        var R = ZO(m.i.periods, _ + Wt);
        return R ? m.i.periods.indexOf(R) : 0;
      }
      function Wm(m, _) {
        for (var R = m.i.periods, M = 0; M < R.length; M++) {
          for (
            var x = R[M], z = new Set(), J = b(x.variants), te = J.next();
            !te.done;
            te = J.next()
          )
            (te = te.value).audio && z.add(te.audio),
              te.video && z.add(te.video),
              te.video &&
                te.video.trickModeVideo &&
                z.add(te.video.trickModeVideo);
          for (J = (x = b(x.textStreams)).next(); !J.done; J = x.next())
            z.add(J.value);
          if (z.has(_)) return M;
        }
        return -1;
      }
      function oG(m, _, R) {
        var M = Qh(R.i(), R.h, R.g, m.l.retryParameters);
        return (
          B.O("fetching: reference=", R),
          (m = m.g.Ib.request(1, M)),
          (_.lb = m),
          m.promise.then(function (x) {
            return (_.lb = null), x.data;
          })
        );
      }
      function ef(m, _, R, M) {
        return k(function x() {
          var z, J, te, pe;
          return $t(x, function (xe) {
            switch (xe.s) {
              case 1:
                return (
                  (z = rc(_)),
                  (_.Wa = !1),
                  (_.Qc = !1),
                  (_.oc = 0),
                  (_.ab = !0),
                  (_.Hb = null),
                  (_.La = null),
                  B.debug(z, "clearing buffer"),
                  M
                    ? ((te = m.g.eb()),
                      (pe = m.g.T.ha()),
                      (J = m.g.T.remove(_.type, te + M, pe)))
                    : (J = r2(m.g.T, _.type).then(
                        function () {
                          if (!this.j && R) return this.g.T.flush(_.type);
                        }.bind(m)
                      )),
                  E(xe, J, 2)
                );
              case 2:
                if (m.j) return xe.return();
                B.debug(z, "cleared buffer"),
                  (_.ab = !1),
                  (_.endOfStream = !1),
                  tf(m, _, 0),
                  S(xe);
            }
          });
        });
      }
      function tf(m, _, R) {
        var M = rc(_),
          x = _.type;
        x != "text" || m.h.has(x)
          ? (B.O(M, "updating in " + R + " seconds"),
            (_.Pa = new pr(function () {
              return k(function z() {
                var J;
                return $t(z, function (te) {
                  switch (te.s) {
                    case 1:
                      return L(te, 2), E(te, c7(m, _), 4);
                    case 4:
                      F(te, 0);
                      break;
                    case 2:
                      (J = oe(te)), m.g && m.g.onError(J), S(te);
                  }
                });
              });
            }).V(R)))
          : B.K(M, "Text stream is unloaded. No update is needed.");
      }
      function cA(m) {
        m.Pa != null && (m.Pa.stop(), (m.Pa = null));
      }
      function sG(m) {
        return k(function _() {
          return $t(_, function (R) {
            if (R.s === 1) {
              if (m.lb) return E(R, m.lb.abort(), 0);
              R.I(0);
            }
          });
        });
      }
      function LP(m, _) {
        Kt(m.M).then(
          function () {
            this.j ||
              (this.g.onError(_), _.handled || this.l.failureCallback(_));
          }.bind(m)
        );
      }
      function rc(m) {
        return "(" + m.type + ":" + m.stream.id + ")";
      }
      function lG(m, _, R, M, x, z) {
        if (200 <= R && 299 >= R && R != 202)
          return {
            uri: x || M,
            Bd: M,
            data: _,
            headers: m,
            fromCache: !!m["x-shaka-from-cache"],
          };
        x = null;
        try {
          x = Qt(_);
        } catch {}
        throw (
          (B.debug("HTTP error text:", x),
          new re(R == 401 || R == 403 ? 2 : 1, 1, 1001, M, R, x, m, z))
        );
      }
      function bc(m, _, R, M) {
        var x = new bc.h();
        si(_.headers).forEach(function (pe, xe) {
          x.append(xe, pe);
        });
        var z = new bc.g(),
          J = { Zd: !1, Oe: !1 };
        if (
          ((m = new vn(
            (m = bc.u(
              m,
              R,
              {
                body: _.body || void 0,
                headers: x,
                method: _.method,
                signal: z.signal,
                credentials: _.allowCrossSiteCredentials ? "include" : void 0,
              },
              J,
              M
            )),
            function () {
              return (J.Zd = !0), z.abort(), Promise.resolve();
            }
          )),
          (_ = _.retryParameters.timeout))
        ) {
          var te = new Ut(function () {
            (J.Oe = !0), z.abort();
          });
          te.V(_ / 1e3),
            m.finally(function () {
              te.stop();
            });
        }
        return m;
      }
      function p2(m, _, R, M) {
        var x = new p2.j(),
          z = Date.now(),
          J = 0;
        return new vn(
          new Promise(function (te, pe) {
            for (var xe in (x.open(_.method, m, !0),
            (x.responseType = "arraybuffer"),
            (x.timeout = _.retryParameters.timeout),
            (x.withCredentials = _.allowCrossSiteCredentials),
            (x.onabort = function () {
              pe(new re(1, 1, 7001, m, R));
            }),
            (x.onload = function (Be) {
              for (
                var bt = (Be = Be.target).getAllResponseHeaders().trim()
                    .split(`\r
`),
                  dt = {},
                  mt = (bt = b(bt)).next();
                !mt.done;
                mt = bt.next()
              )
                dt[(mt = mt.value.split(": "))[0].toLowerCase()] = mt
                  .slice(1)
                  .join(": ");
              try {
                var xt = lG(dt, Be.response, Be.status, m, Be.responseURL, R);
                te(xt);
              } catch (Nt) {
                pe(Nt);
              }
            }),
            (x.onerror = function (Be) {
              pe(new re(1, 1, 1002, m, Be, R));
            }),
            (x.ontimeout = function () {
              pe(new re(1, 1, 1003, m, R));
            }),
            (x.onprogress = function (Be) {
              var bt = Date.now();
              (100 < bt - z ||
                (Be.lengthComputable && Be.loaded == Be.total)) &&
                (M(bt - z, Be.loaded - J, Be.total - Be.loaded),
                (J = Be.loaded),
                (z = bt));
            }),
            _.headers))
              x.setRequestHeader(xe.toLowerCase(), _.headers[xe]);
            x.send(_.body);
          }),
          function () {
            return x.abort(), Promise.resolve();
          }
        );
      }
      function uG() {
        (this.g = this.j = this.h = 0), (this.i = new Map()), (this.l = 0);
      }
      function cG(m, _, R) {
        (this.m = m),
          (this.h = new Map()),
          (this.i = !1),
          (this.l = _),
          (this.j = R),
          (this.g = new uG());
      }
      function OP(m, _, R, M, x, z) {
        var J = (function (te, pe) {
          te.h += pe;
          var xe = te.l;
          return te.l++, te.i.set(xe, pe), xe;
        })(m.g, M);
        (M = m.h.get(_) || Promise.resolve()),
          m.h.set(
            _,
            M.then(function () {
              return k(function te() {
                var pe, xe, Be, bt, dt, mt;
                return $t(te, function (xt) {
                  switch (xt.s) {
                    case 1:
                      return E(
                        xt,
                        (function (en, Tn) {
                          return k(function In() {
                            var Qn;
                            return $t(In, function (vr) {
                              switch (vr.s) {
                                case 1:
                                  return E(vr, en.m.request(1, Tn).promise, 2);
                                case 2:
                                  return (Qn = vr.B), vr.return(Qn.data);
                              }
                            });
                          });
                        })(m, R),
                        2
                      );
                    case 2:
                      if (((pe = xt.B), m.i)) throw new re(2, 9, 7001);
                      if (x)
                        for (var Nt in ((xe = new Uint8Array(pe)),
                        (Be = new yg(xe)).data))
                          (bt = Number(Nt)),
                            (dt = Be.data[bt]),
                            (mt = Be.g[bt]),
                            m.j(dt, mt);
                      return (
                        m.g.close(J, pe.byteLength),
                        (Nt = m.g),
                        m.l(Nt.h == 0 ? 0 : Nt.j / Nt.h, m.g.g),
                        xt.return(z(pe))
                      );
                  }
                });
              });
            })
          );
      }
      function dA(m, _) {
        var R = this;
        (this.i = m),
          (this.h = m.objectStore(_)),
          (this.g = new Ft()),
          (m.onabort = function (M) {
            M.preventDefault(), R.g.reject();
          }),
          (m.onerror = function (M) {
            M.preventDefault(), R.g.reject();
          }),
          (m.oncomplete = function () {
            R.g.resolve();
          });
      }
      function g2(m, _) {
        return new Promise(function (R, M) {
          var x = m.h.openCursor();
          (x.onerror = M),
            (x.onsuccess = function (z) {
              if (!(z = z.target.result)) return R();
              _(z.key, z.value, z), z.continue();
            });
        });
      }
      function GP(m) {
        (this.h = m), (this.g = []);
      }
      function qv(m, _) {
        return hA(m, _, "readwrite");
      }
      function hA(m, _, R) {
        var M = new dA((R = m.h.transaction([_], R)), _);
        return (
          m.g.push(M),
          M.promise().then(
            function () {
              Pn(m.g, M);
            },
            function () {
              Pn(m.g, M);
            }
          ),
          M
        );
      }
      function I_(m, _, R) {
        (this.h = new GP(m)), (this.i = _), (this.g = R);
      }
      function fA(m) {
        return Promise.reject(
          new re(2, 9, 9011, "Cannot add new value to " + m)
        );
      }
      function NP(m, _, R, M) {
        _ = (m = qv(m.h, _)).store();
        for (
          var x = {}, z = (R = b(R)).next();
          !z.done;
          x = { key: x.key }, z = R.next()
        )
          (x.key = z.value),
            (_.delete(x.key).onsuccess = (function (J) {
              return function () {
                return M(J.key);
              };
            })(x));
        return m.promise();
      }
      function dG(m, _, R) {
        return k(function M() {
          var x, z, J, te, pe, xe, Be;
          return $t(M, function (bt) {
            switch (bt.s) {
              case 1:
                for (
                  x = hA(m.h, _, "readonly"),
                    z = x.store(),
                    J = {},
                    te = [],
                    pe = {},
                    xe = b(R),
                    Be = xe.next();
                  !Be.done;
                  pe = { request: pe.request, key: pe.key }, Be = xe.next()
                )
                  (pe.key = Be.value),
                    (pe.request = z.get(pe.key)),
                    (pe.request.onsuccess = (function (dt) {
                      return function () {
                        dt.request.result == null && te.push(dt.key),
                          (J[dt.key] = dt.request.result);
                      };
                    })(pe));
                return E(bt, x.promise(), 2);
              case 2:
                if (te.length)
                  throw new re(2, 9, 9012, "Could not find values for " + te);
                return bt.return(
                  R.map(function (dt) {
                    return J[dt];
                  })
                );
            }
          });
        });
      }
      function D_(m) {
        this.g = new GP(m);
      }
      function cp() {
        this.g = new Map();
      }
      function m2(m, _, R) {
        if (!(m = m.g.get(_)))
          throw new re(2, 9, 9013, "Could not find mechanism with name " + _);
        if (!(_ = m.getCells().get(R)))
          throw new re(2, 9, 9013, "Could not find cell with name " + R);
        return _;
      }
      function hG(m, _) {
        P_.set(m, _);
      }
      (Jv.prototype.destroy = function () {
        var m = this;
        return k(function _() {
          var R, M;
          return $t(_, function (x) {
            switch (x.s) {
              case 1:
                R = [];
                for (
                  var z = b(m.h.values()), J = z.next();
                  !J.done;
                  J = z.next()
                )
                  cA((M = J.value)), R.push(sG(M));
                return E(x, Promise.all(R), 2);
              case 2:
                m.h.clear(),
                  m.o.clear(),
                  (m.g = null),
                  (m.i = null),
                  (m.F = null),
                  (m.m = null),
                  (m.l = null),
                  (m.j = !0),
                  S(x);
            }
          });
        });
      }),
        (Jv.prototype.configure = function (m) {
          (this.l = m),
            (this.M = new Dt(
              {
                maxAttempts: Math.max(m.retryParameters.maxAttempts, 2),
                baseDelay: m.retryParameters.baseDelay,
                backoffFactor: m.retryParameters.backoffFactor,
                fuzzFactor: m.retryParameters.fuzzFactor,
                timeout: 0,
              },
              !0
            ));
        }),
        (Jv.prototype.start = function () {
          var m = this;
          return k(function _() {
            var R, M, x;
            return $t(_, function (z) {
              switch (z.s) {
                case 1:
                  return (
                    (R = m.g.eb()),
                    (M = sy(m, R)),
                    (x = m.g.ue(m.i.periods[M])).variant || x.text
                      ? E(
                          z,
                          rG(
                            m,
                            x.variant ? x.variant.audio : null,
                            x.variant ? x.variant.video : null,
                            x.text,
                            R
                          ),
                          2
                        )
                      : (B.error("init: no Streams chosen"),
                        z.return(new re(2, 5, 5005)))
                  );
                case 2:
                  if (m.j) return z.return();
                  B.debug("init: completed initial Stream setup"),
                    m.g &&
                      m.g.Yf &&
                      (B.K("init: calling onInitialStreamsSetup()..."),
                      m.g.Yf()),
                    S(z);
              }
            });
          });
        }),
        (Jv.prototype.P = function (m, _, R, M) {
          var x = M.reader.Cd(),
            z = M.reader.Cd(),
            J = M.reader.N(),
            te = M.reader.N(),
            pe = M.reader.N(),
            xe = M.reader.N();
          (M = M.reader.mb(M.reader.S.byteLength - M.reader.ka())),
            (m = m.startTime + _.startTime + te / J),
            R.includes(x) &&
              (x == "urn:mpeg:dash:event:2012"
                ? this.g.Zf()
                : this.g.onEvent(
                    new Je("emsg", {
                      detail: {
                        startTime: m,
                        endTime: m + pe / J,
                        schemeIdUri: x,
                        value: z,
                        timescale: J,
                        presentationTimeDelta: te,
                        eventDuration: pe,
                        id: xe,
                        messageData: M,
                      },
                    })
                  ));
        }),
        Z("shaka.net.HttpFetchPlugin", bc),
        (bc.u = function (m, _, R, M, x) {
          return k(function z() {
            var J, te, pe, xe, Be, bt, dt, mt, xt, Nt, en, Tn;
            return $t(z, function (In) {
              switch (In.s) {
                case 1:
                  return (
                    (J = bc.l),
                    (te = bc.i),
                    (bt = Be = 0),
                    (dt = Date.now()),
                    L(In, 2),
                    E(In, J(m, R), 4)
                  );
                case 4:
                  return (
                    (pe = In.B),
                    (mt = pe.clone().body.getReader()),
                    (Nt = (xt = pe.headers.get("Content-Length"))
                      ? parseInt(xt, 10)
                      : 0),
                    new te({
                      start: function (Qn) {
                        (function vr() {
                          return k(function mr() {
                            var bi, Ur, Jr;
                            return $t(mr, function (dr) {
                              switch (dr.s) {
                                case 1:
                                  return L(dr, 2), E(dr, mt.read(), 4);
                                case 4:
                                  (bi = dr.B), F(dr, 3);
                                  break;
                                case 2:
                                  return (
                                    (Ur = oe(dr)),
                                    B.K(
                                      "error reading from stream",
                                      Ur.message
                                    ),
                                    dr.return()
                                  );
                                case 3:
                                  bi.done || (Be += bi.value.byteLength),
                                    (100 < (Jr = Date.now()) - dt || bi.done) &&
                                      (x(Jr - dt, Be - bt, Nt - Be),
                                      (bt = Be),
                                      (dt = Jr)),
                                    bi.done
                                      ? Qn.close()
                                      : (Qn.enqueue(bi.value), vr()),
                                    S(dr);
                              }
                            });
                          });
                        })();
                      },
                    }),
                    E(In, pe.arrayBuffer(), 5)
                  );
                case 5:
                  (xe = In.B), F(In, 3);
                  break;
                case 2:
                  throw (
                    ((en = oe(In)),
                    M.Zd
                      ? new re(1, 1, 7001, m, _)
                      : M.Oe
                      ? new re(1, 1, 1003, m, _)
                      : new re(1, 1, 1002, m, en, _))
                  );
                case 3:
                  return (
                    (Tn = {}),
                    pe.headers.forEach(function (Qn, vr) {
                      Tn[vr.trim()] = Qn;
                    }),
                    In.return(lG(Tn, xe, pe.status, m, pe.url, _))
                  );
              }
            });
          });
        }),
        (bc.isSupported = function () {
          if (!i.ReadableStream) return !1;
          try {
            new ReadableStream({});
          } catch {
            return !1;
          }
          return !(!i.fetch || !i.AbortController);
        }),
        (bc.isSupported = bc.isSupported),
        (bc.l = i.fetch),
        (bc.g = i.AbortController),
        (bc.i = i.ReadableStream),
        (bc.h = i.Headers),
        bc.isSupported() && (gr("http", bc, 2), gr("https", bc, 2)),
        Z("shaka.net.HttpXHRPlugin", p2),
        (p2.j = i.XMLHttpRequest),
        gr("http", p2, 1),
        gr("https", p2, 1),
        (uG.prototype.close = function (m, _) {
          if (this.i.has(m)) {
            var R = this.i.get(m);
            this.i.delete(m), (this.j += R), (this.g += _);
          }
        }),
        (cG.prototype.destroy = function () {
          return (
            (this.i = !0),
            Promise.all(this.h.values()).then(
              function () {},
              function () {}
            )
          );
        }),
        (dA.prototype.abort = function () {
          try {
            this.i.abort();
          } catch {}
          return this.g.catch(function () {});
        }),
        (dA.prototype.store = function () {
          return this.h;
        }),
        (dA.prototype.promise = function () {
          return this.g;
        }),
        (GP.prototype.destroy = function () {
          return Promise.all(
            this.g.map(function (m) {
              return m.abort();
            })
          );
        }),
        ((u = I_.prototype).destroy = function () {
          return this.h.destroy();
        }),
        (u.hasFixedKeySpace = function () {
          return !0;
        }),
        (u.addSegments = function () {
          return fA(this.i);
        }),
        (u.removeSegments = function (m, _) {
          return NP(this, this.i, m, _);
        }),
        (u.getSegments = function (m) {
          var _ = this;
          return k(function R() {
            var M;
            return $t(R, function (x) {
              switch (x.s) {
                case 1:
                  return E(x, dG(_, _.i, m), 2);
                case 2:
                  return (
                    (M = x.B),
                    x.return(
                      M.map(function (z) {
                        return _.ae(z);
                      })
                    )
                  );
              }
            });
          });
        }),
        (u.addManifests = function () {
          return fA(this.g);
        }),
        (u.updateManifestExpiration = function (m, _) {
          var R = qv(this.h, this.g),
            M = R.store();
          return (
            (M.get(m).onsuccess = function (x) {
              (x = x.target.result) && ((x.expiration = _), M.put(x, m));
            }),
            R.promise()
          );
        }),
        (u.removeManifests = function (m, _) {
          return NP(this, this.g, m, _);
        }),
        (u.getManifests = function (m) {
          var _ = this;
          return k(function R() {
            var M;
            return $t(R, function (x) {
              switch (x.s) {
                case 1:
                  return E(x, dG(_, _.g, m), 2);
                case 2:
                  return (
                    (M = x.B),
                    x.return(
                      M.map(function (z) {
                        return _.pc(z);
                      })
                    )
                  );
              }
            });
          });
        }),
        (u.getAllManifests = function () {
          var m = this;
          return k(function _() {
            var R, M;
            return $t(_, function (x) {
              switch (x.s) {
                case 1:
                  return (
                    (R = hA(m.h, m.g, "readonly")),
                    (M = new Map()),
                    E(
                      x,
                      g2(R, function (z, J) {
                        M.set(z, m.pc(J));
                      }),
                      2
                    )
                  );
                case 2:
                  return E(x, R.promise(), 3);
                case 3:
                  return x.return(M);
              }
            });
          });
        }),
        (u.ae = function (m) {
          return m;
        }),
        (u.pc = function (m) {
          return m;
        }),
        (u.add = function (m, _) {
          var R = this;
          return k(function M() {
            var x, z, J, te;
            return $t(M, function (pe) {
              switch (pe.s) {
                case 1:
                  (x = qv(R.h, m)), (z = x.store()), (J = []);
                  for (var xe = b(_), Be = xe.next(); !Be.done; Be = xe.next())
                    (te = Be.value),
                      (z.add(te).onsuccess = function (bt) {
                        J.push(bt.target.result);
                      });
                  return E(pe, x.promise(), 2);
                case 2:
                  return pe.return(J);
              }
            });
          });
        }),
        (D_.prototype.destroy = function () {
          return this.g.destroy();
        }),
        (D_.prototype.getAll = function () {
          var m = this;
          return k(function _() {
            var R, M;
            return $t(_, function (x) {
              switch (x.s) {
                case 1:
                  return (
                    (R = hA(m.g, "session-ids", "readonly")),
                    (M = []),
                    E(
                      x,
                      g2(R, function (z, J) {
                        M.push(J);
                      }),
                      2
                    )
                  );
                case 2:
                  return E(x, R.promise(), 3);
                case 3:
                  return x.return(M);
              }
            });
          });
        }),
        (D_.prototype.add = function (m) {
          for (
            var _ = qv(this.g, "session-ids"),
              R = _.store(),
              M = (m = b(m)).next();
            !M.done;
            M = m.next()
          )
            R.add(M.value);
          return _.promise();
        }),
        (D_.prototype.remove = function (m) {
          var _ = this;
          return k(function R() {
            var M;
            return $t(R, function (x) {
              switch (x.s) {
                case 1:
                  return E(
                    x,
                    g2((M = qv(_.g, "session-ids")), function (z, J, te) {
                      0 <= m.indexOf(J.sessionId) && te.delete();
                    }),
                    2
                  );
                case 2:
                  return E(x, M.promise(), 0);
              }
            });
          });
        }),
        (cp.prototype.destroy = function () {
          for (
            var m = [], _ = b(this.g.values()), R = _.next();
            !R.done;
            R = _.next()
          )
            m.push(R.value.destroy());
          return this.g.clear(), Promise.all(m);
        }),
        (cp.prototype.init = function () {
          var m = this;
          P_.forEach(function (x, z) {
            var J = x();
            J
              ? m.g.set(z, J)
              : B.info(
                  "Skipping " + z + " as it is not supported on this platform"
                );
          });
          for (
            var _ = [], R = b(this.g.values()), M = R.next();
            !M.done;
            M = R.next()
          )
            _.push(M.value.init());
          return Promise.all(_);
        }),
        (cp.prototype.erase = function () {
          var m = this;
          return k(function _() {
            var R, M;
            return $t(_, function (x) {
              switch (x.s) {
                case 1:
                  return (
                    (R = Array.from(m.g.values())),
                    (M = 0 < R.length) ||
                      P_.forEach(function (z) {
                        (z = z()) && R.push(z);
                      }),
                    E(
                      x,
                      Promise.all(
                        R.map(function (z) {
                          return z.erase();
                        })
                      ),
                      2
                    )
                  );
                case 2:
                  if (!M)
                    return E(
                      x,
                      Promise.all(
                        R.map(function (z) {
                          return z.destroy();
                        })
                      ),
                      0
                    );
                  x.I(0);
              }
            });
          });
        }),
        Z("shaka.offline.StorageMuxer.register", hG),
        Z("shaka.offline.StorageMuxer.unregister", function (m) {
          P_.delete(m);
        });
      var P_ = new Map();
      function y2(m) {
        I_.apply(this, arguments);
      }
      function fG(m) {
        return (
          (function (_) {
            var R = _.streams.filter(function (te) {
                return te.contentType == "audio";
              }),
              M = _.streams.filter(function (te) {
                return te.contentType == "video";
              });
            if (
              !R.every(function (te) {
                return te.variantIds;
              }) ||
              !M.every(function (te) {
                return te.variantIds;
              })
            ) {
              R.forEach(function (te) {
                te.variantIds = [];
              }),
                M.forEach(function (te) {
                  te.variantIds = [];
                });
              var x = 0;
              if (M.length && !R.length) {
                B.debug(
                  "Found video-only content. Creating variants for video."
                );
                var z = x++;
                M.forEach(function (te) {
                  te.variantIds.push(z);
                });
              }
              if (!M.length && R.length) {
                B.debug(
                  "Found audio-only content. Creating variants for audio."
                );
                var J = x++;
                R.forEach(function (te) {
                  te.variantIds.push(J);
                });
              }
              M.length &&
                R.length &&
                (B.debug("Found audio-video content. Creating variants."),
                R.forEach(function (te) {
                  M.forEach(function (pe) {
                    var xe = x++;
                    te.variantIds.push(xe), pe.variantIds.push(xe);
                  });
                }));
            }
          })(m),
          m.streams.forEach(function () {}),
          { startTime: m.startTime, streams: m.streams.map(d7) }
        );
      }
      function d7(m) {
        var _ = m.initSegmentUri ? gG(m.initSegmentUri) : null;
        return {
          id: m.id,
          originalId: null,
          primary: m.primary,
          presentationTimeOffset: m.presentationTimeOffset,
          contentType: m.contentType,
          mimeType: m.mimeType,
          codecs: m.codecs,
          frameRate: m.frameRate,
          pixelAspectRatio: void 0,
          kind: m.kind,
          language: m.language,
          label: m.label,
          width: m.width,
          height: m.height,
          initSegmentKey: _,
          encrypted: m.encrypted,
          keyId: m.keyId,
          segments: m.segments.map(pG),
          variantIds: m.variantIds,
        };
      }
      function pG(m) {
        var _ = gG(m.uri);
        return { startTime: m.startTime, endTime: m.endTime, dataKey: _ };
      }
      function gG(m) {
        var _;
        if (
          (_ = /^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(m)) ||
          (_ = /^offline:segment\/([0-9]+)$/.exec(m))
        )
          return Number(_[1]);
        throw new re(2, 9, 9004, "Could not parse uri " + m);
      }
      function Km(m, _, R, M) {
        I_.call(this, m, _, R), (this.j = M);
      }
      function v2() {
        this.l = this.i = this.h = this.g = this.j = null;
      }
      function Zm(m, _, R, M) {
        (this.g = m),
          (this.l = _),
          (this.j = R),
          (this.i = M),
          (this.h = ["offline:", m, "/", _, "/", R, "/", M].join(""));
      }
      function Y(m) {
        if (
          (m = /^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(m)) == null
        )
          return null;
        var _ = m[1];
        if (_ != "manifest" && _ != "segment") return null;
        var R = m[2];
        if (!R) return null;
        var M = m[3];
        return M && _ != null ? new Zm(_, R, M, Number(m[4])) : null;
      }
      function U(m, _) {
        (this.h = m), (this.g = _);
      }
      function K(m, _, R) {
        var M = _.streams.filter(function (z) {
            return z.contentType == "audio";
          }),
          x = _.streams.filter(function (z) {
            return z.contentType == "video";
          });
        return (
          (M = (function (z, J, te) {
            for (
              var pe = new Set(), xe = b(J), Be = xe.next();
              !Be.done;
              Be = xe.next()
            ) {
              var bt = b(Be.value.variantIds);
              for (Be = bt.next(); !Be.done; Be = bt.next()) pe.add(Be.value);
            }
            for (xe = b(te), Be = xe.next(); !Be.done; Be = xe.next())
              for (
                bt = b(Be.value.variantIds), Be = bt.next();
                !Be.done;
                Be = bt.next()
              )
                pe.add(Be.value);
            for (
              xe = new Map(), pe = b(pe), Be = pe.next();
              !Be.done;
              Be = pe.next()
            )
              (Be = Be.value),
                xe.set(Be, {
                  id: Be,
                  language: "",
                  primary: !1,
                  audio: null,
                  video: null,
                  bandwidth: 0,
                  drmInfos: [],
                  allowedByApplication: !0,
                  allowedByKeySystem: !0,
                });
            for (J = b(J), pe = J.next(); !pe.done; pe = J.next())
              for (
                pe = pe.value,
                  Be = Q(z, pe),
                  bt = b(pe.variantIds),
                  pe = bt.next();
                !pe.done;
                pe = bt.next()
              )
                ((pe = xe.get(pe.value)).language = Be.language),
                  (pe.primary = pe.primary || Be.primary),
                  (pe.audio = Be);
            for (te = b(te), J = te.next(); !J.done; J = te.next())
              for (
                pe = J.value,
                  J = Q(z, pe),
                  Be = b(pe.variantIds),
                  pe = Be.next();
                !pe.done;
                pe = Be.next()
              )
                ((pe = xe.get(pe.value)).primary = pe.primary || J.primary),
                  (pe.video = J);
            return xe;
          })(m, M, x)),
          (x = _.streams
            .filter(function (z) {
              return z.contentType == "text";
            })
            .map(function (z) {
              return Q(m, z);
            })),
          _.streams.forEach(function (z) {
            (z = z.segments.map(function (J, te) {
              return q(m, te, J);
            })),
              R.Jb(z, _.startTime);
          }),
          {
            startTime: _.startTime,
            variants: Array.from(M.values()),
            textStreams: x,
          }
        );
      }
      function Q(m, _) {
        var R = _.segments.map(function (x, z) {
            return q(m, z, x);
          }),
          M = new ms(R);
        return (
          (R = {
            id: _.id,
            originalId: _.originalId,
            createSegmentIndex: function () {
              return Promise.resolve();
            },
            findSegmentPosition: function (x) {
              return M.find(x);
            },
            getSegmentReference: function (x) {
              return M.get(x);
            },
            initSegmentReference: null,
            presentationTimeOffset: _.presentationTimeOffset,
            mimeType: _.mimeType,
            codecs: _.codecs,
            width: _.width || void 0,
            height: _.height || void 0,
            frameRate: _.frameRate || void 0,
            pixelAspectRatio: _.pixelAspectRatio || void 0,
            kind: _.kind,
            encrypted: _.encrypted,
            keyId: _.keyId,
            language: _.language,
            label: _.label || null,
            type: _.contentType,
            primary: _.primary,
            trickModeVideo: null,
            emsgSchemeIdUris: null,
            roles: [],
            channelsCount: null,
            audioSamplingRate: null,
            closedCaptions: null,
          }),
          _.initSegmentKey != null &&
            (R.initSegmentReference = (function (x, z) {
              var J = new Zm("segment", x.h, x.g, z);
              return new Ka(
                function () {
                  return [J.toString()];
                },
                0,
                null
              );
            })(m, _.initSegmentKey)),
          R
        );
      }
      function q(m, _, R) {
        var M = new Zm("segment", m.h, m.g, R.dataKey);
        return new Io(
          _,
          R.startTime,
          R.endTime,
          function () {
            return [M.toString()];
          },
          0,
          null
        );
      }
      function ee() {
        this.g = null;
      }
      function fe(m) {
        var _ = Y(m);
        return _ && _.g == "manifest"
          ? fe.m(m)
          : _ && _.g == "segment"
          ? fe.o(_.key(), _)
          : st(new re(2, 1, 9004, m));
      }
      function ve(m, _, R) {
        return k(function M() {
          var x, z, J, te, pe, xe;
          return $t(M, function (Be) {
            switch (Be.s) {
              case 1:
                x = [];
                for (
                  var bt = [], dt = b(R), mt = dt.next();
                  !mt.done;
                  mt = dt.next()
                ) {
                  mt = mt.value;
                  for (
                    var xt = !1, Nt = b(bt), en = Nt.next();
                    !en.done;
                    en = Nt.next()
                  )
                    if (ne((en = en.value).info, mt)) {
                      en.sessionIds.push(mt.sessionId), (xt = !0);
                      break;
                    }
                  xt || bt.push({ info: mt, sessionIds: [mt.sessionId] });
                }
                (z = b(bt)), (J = z.next());
              case 2:
                if (J.done) {
                  Be.I(4);
                  break;
                }
                return (
                  (te = J.value),
                  (pe = (function (Tn, In, Qn) {
                    return k(function vr() {
                      var mr, bi, Ur, Jr;
                      return $t(vr, function (dr) {
                        switch (dr.s) {
                          case 1:
                            return (
                              (mr = new rs({
                                Ib: In,
                                onError: function () {},
                                Dc: function () {},
                                onExpirationUpdated: function () {},
                                onEvent: function () {},
                              })),
                              L(dr, 2),
                              mr.configure(Tn),
                              E(
                                dr,
                                (function (Br, oi, ki, Or, ri, Yi) {
                                  var Ba = new Map();
                                  return (
                                    Ba.set(oi, {
                                      audioCapabilities: ri,
                                      videoCapabilities: Yi,
                                      distinctiveIdentifier: "optional",
                                      persistentState: "required",
                                      sessionTypes: ["persistent-license"],
                                      label: oi,
                                      drmInfos: [
                                        {
                                          keySystem: oi,
                                          licenseServerUri: ki,
                                          distinctiveIdentifierRequired: !1,
                                          persistentStateRequired: !0,
                                          audioRobustness: "",
                                          videoRobustness: "",
                                          serverCertificate: Or,
                                          initData: null,
                                          keyIds: null,
                                        },
                                      ],
                                    }),
                                    jh(Br, Ba)
                                  );
                                })(
                                  mr,
                                  Qn.info.keySystem,
                                  Qn.info.licenseUri,
                                  Qn.info.serverCertificate,
                                  Qn.info.audioCapabilities,
                                  Qn.info.videoCapabilities
                                ),
                                4
                              )
                            );
                          case 4:
                            F(dr, 3);
                            break;
                          case 2:
                            return (
                              (bi = oe(dr)),
                              B.v("Error initializing EME", bi),
                              E(dr, mr.destroy(), 5)
                            );
                          case 5:
                          case 9:
                            return dr.return([]);
                          case 3:
                            return L(dr, 6), E(dr, $m(mr), 8);
                          case 8:
                            F(dr, 7);
                            break;
                          case 6:
                            return (
                              (Ur = oe(dr)),
                              B.v("Error setting server certificate", Ur),
                              E(dr, mr.destroy(), 9)
                            );
                          case 7:
                            return (
                              (Jr = []),
                              E(
                                dr,
                                Promise.all(
                                  Qn.sessionIds.map(function (Br) {
                                    return k(function oi() {
                                      var ki;
                                      return $t(oi, function (Or) {
                                        switch (Or.s) {
                                          case 1:
                                            return (
                                              L(Or, 2),
                                              E(
                                                Or,
                                                (function (ri, Yi) {
                                                  return k(function Ba() {
                                                    var wa, Po, go;
                                                    return $t(
                                                      Ba,
                                                      function (Pa) {
                                                        switch (Pa.s) {
                                                          case 1:
                                                            return E(
                                                              Pa,
                                                              Nu(ri, Yi),
                                                              2
                                                            );
                                                          case 2:
                                                            return (wa = Pa.B)
                                                              ? ((Po = []),
                                                                (go =
                                                                  ri.h.get(
                                                                    wa
                                                                  )) &&
                                                                  ((go.Ga =
                                                                    new Ft()),
                                                                  Po.push(
                                                                    go.Ga
                                                                  )),
                                                                B.O(
                                                                  "Attempting to remove session",
                                                                  Yi
                                                                ),
                                                                Po.push(
                                                                  wa.remove()
                                                                ),
                                                                E(
                                                                  Pa,
                                                                  Promise.all(
                                                                    Po
                                                                  ),
                                                                  0
                                                                ))
                                                              : (B.O(
                                                                  "Ignoring attempt to remove missing session",
                                                                  Yi
                                                                ),
                                                                Pa.return());
                                                        }
                                                      }
                                                    );
                                                  });
                                                })(mr, Br),
                                                4
                                              )
                                            );
                                          case 4:
                                            Jr.push(Br), F(Or, 0);
                                            break;
                                          case 2:
                                            (ki = oe(Or)),
                                              B.v(
                                                "Error deleting offline session",
                                                ki
                                              ),
                                              S(Or);
                                        }
                                      });
                                    });
                                  })
                                ),
                                10
                              )
                            );
                          case 10:
                            return E(dr, mr.destroy(), 11);
                          case 11:
                            return dr.return(Jr);
                        }
                      });
                    });
                  })(m, _, te)),
                  E(Be, pe, 5)
                );
              case 5:
                (xe = Be.B), (x = x.concat(xe)), (J = z.next()), Be.I(2);
                break;
              case 4:
                return Be.return(x);
            }
          });
        });
      }
      function ne(m, _) {
        function R(M, x) {
          return M.robustness == x.robustness && M.contentType == x.contentType;
        }
        return (
          m.keySystem == _.keySystem &&
          m.licenseUri == _.licenseUri &&
          Xn(m.audioCapabilities, _.audioCapabilities, R) &&
          Xn(m.videoCapabilities, _.videoCapabilities, R)
        );
      }
      function Te(m, _) {
        var R = {
            Ia: null,
            D: null,
            mimeType: null,
            startTime: null,
            Rd: null,
            uri: null,
          },
          M = this;
        (this.m = _),
          (this.i = m),
          (this.j = R),
          (this.o = null),
          (this.l = []),
          (this.h = this.g = null),
          (this.u = !0),
          (this.A = Promise.resolve().then(function () {
            return (function (x) {
              return k(function z() {
                return $t(z, function (J) {
                  if (J.s === 1) {
                    if (x.u) {
                      if (x.l.length == 0 || (x.g && !x.g.gb)) var te = !1;
                      else {
                        x.g && (x.g.Da.kb(), (x.g = null));
                        var pe = (te = x.l.shift()).create(x.j);
                        pe
                          ? (te.Da.Kb(),
                            (x.g = {
                              node: pe.node,
                              payload: pe.payload,
                              gb: pe.gb,
                              Da: te.Da,
                            }))
                          : te.Da.Ec(),
                          (te = !0);
                      }
                      return (
                        te
                          ? (te = Promise.resolve())
                          : x.g
                          ? (te = (function (xe) {
                              return k(function Be() {
                                var bt, dt;
                                return $t(Be, function (mt) {
                                  switch (mt.s) {
                                    case 1:
                                      return (
                                        (xe.i = xe.m.Af(
                                          xe.i,
                                          xe.j,
                                          xe.g.node,
                                          xe.g.payload
                                        )),
                                        L(mt, 2),
                                        (xe.h = xe.m.ef(
                                          xe.i,
                                          xe.j,
                                          xe.g.payload
                                        )),
                                        E(mt, xe.h.promise, 4)
                                      );
                                    case 4:
                                      (xe.h = null),
                                        xe.i == xe.g.node &&
                                          (xe.g.Da.Cc(), (xe.g = null)),
                                        F(mt, 0);
                                      break;
                                    case 2:
                                      return (
                                        (bt = oe(mt)).code == 7001
                                          ? xe.g.Da.kb()
                                          : xe.g.Da.onError(bt),
                                        (xe.g = null),
                                        (xe.h = null),
                                        (dt = xe),
                                        E(mt, xe.m.handleError(xe.j, bt), 5)
                                      );
                                    case 5:
                                      (dt.i = mt.B), S(mt);
                                  }
                                });
                              });
                            })(x))
                          : (x.m.Xf(x.i), (x.o = new Ft()), (te = x.o)),
                        E(J, te, 1)
                      );
                    }
                    J.I(0);
                  }
                });
              });
            })(M);
          }));
      }
      function _e(m, _) {
        var R = {
          Kb: function () {},
          Cc: function () {},
          kb: function () {},
          onError: function () {},
          Ec: function () {},
          $g: function () {},
        };
        return m.l.push({ create: _, Da: R }), m.h && m.h.abort(), se(m), R;
      }
      function se(m) {
        m.o && (m.o.resolve(), (m.o = null));
      }
      function le(m) {
        this.g = null;
        for (var _ = 0; _ < m.textTracks.length; ++_) {
          var R = m.textTracks[_];
          (R.mode = "disabled"),
            R.label == "Shaka Player TextTrack" && (this.g = R);
        }
        this.g ||
          (this.g = m.addTextTrack("subtitles", "Shaka Player TextTrack")),
          (this.g.mode = "hidden");
      }
      function me(m) {
        if (m.startTime >= m.endTime)
          return (
            B.v("Invalid cue times: " + m.startTime + " - " + m.endTime), null
          );
        var _ = new VTTCue(m.startTime, m.endTime, m.payload);
        (_.lineAlign = m.lineAlign),
          (_.positionAlign = m.positionAlign),
          m.size && (_.size = m.size);
        try {
          _.align = m.textAlign;
        } catch {}
        return (
          m.textAlign == "center" &&
            _.align != "center" &&
            (_.align = "middle"),
          m.writingMode == "vertical-lr"
            ? (_.vertical = "lr")
            : m.writingMode == "vertical-rl" && (_.vertical = "rl"),
          m.lineInterpretation == 1 && (_.snapToLines = !1),
          m.line != null && (_.line = m.line),
          m.position != null && (_.position = m.position),
          _
        );
      }
      function we(m, _) {
        var R = m.mode;
        m.mode = R == "showing" ? "showing" : "hidden";
        for (var M = m.cues, x = M.length - 1; 0 <= x; x--) {
          var z = M[x];
          z && _(z) && m.removeCue(z);
        }
        m.mode = R;
      }
      function Me(m, _, R, M, x) {
        var z,
          J = x in M,
          te = !0;
        for (z in _) {
          var pe = x + "." + z,
            xe = J ? M[x] : R[z];
          J || z in R
            ? _[z] === void 0
              ? xe === void 0 || J
                ? delete m[z]
                : (m[z] = Ct(xe))
              : xe.constructor == Object && _[z] && _[z].constructor == Object
              ? (m[z] || (m[z] = Ct(xe)),
                (pe = Me(m[z], _[z], xe, M, pe)),
                (te = te && pe))
              : typeof _[z] != typeof xe ||
                _[z] == null ||
                (typeof _[z] != "function" &&
                  _[z].constructor != xe.constructor)
              ? (B.kc("Invalid config, wrong type for " + pe), (te = !1))
              : (typeof R[z] == "function" &&
                  R[z].length != _[z].length &&
                  B.ba("Unexpected number of arguments for " + pe),
                (m[z] = _[z]))
            : (B.kc("Invalid config, unrecognized key " + pe), (te = !1));
        }
        return te;
      }
      function Oe(m, _) {
        for (var R = {}, M = R, x = 0, z = 0; !(0 > (x = m.indexOf(".", x))); )
          (x != 0 && m[x - 1] == "\\") ||
            ((M[(z = m.substring(z, x).replace(/\\\./g, "."))] = {}),
            (M = M[z]),
            (z = x + 1)),
            (x += 1);
        return (M[m.substring(z).replace(/\\\./g, ".")] = _), R;
      }
      function Ge() {}
      function $e() {
        var m = 5e5,
          _ = 1 / 0;
        navigator.connection &&
          (navigator.connection.downlink &&
            (m = 1e6 * navigator.connection.downlink),
          navigator.connection.saveData && (_ = 360));
        var R = {
            retryParameters: {
              maxAttempts: 2,
              baseDelay: 1e3,
              backoffFactor: 2,
              fuzzFactor: 0.5,
              timeout: 0,
            },
            servers: {},
            clearKeys: {},
            advanced: {},
            delayLicenseRequestUntilPlayed: !1,
            initDataTransform: JR,
            fairPlayTransform: !0,
            updateExpirationTime: 1,
          },
          M = {
            retryParameters: {
              maxAttempts: 2,
              baseDelay: 1e3,
              backoffFactor: 2,
              fuzzFactor: 0.5,
              timeout: 0,
            },
            availabilityWindowOverride: NaN,
            disableAudio: !1,
            disableVideo: !1,
            disableText: !1,
            dash: {
              customScheme: function (te) {
                if (te) return null;
              },
              clockSyncUri: "",
              ignoreDrmInfo: !1,
              xlinkFailGracefully: !1,
              defaultPresentationDelay: 10,
              ignoreMinBufferTime: !1,
              autoCorrectDrift: !0,
              ignoreSuggestedPresentationDelay: !1,
              ignoreEmptyAdaptationSet: !1,
            },
            hls: {
              ignoreTextStreamFailures: !1,
              useFullSegmentsForStartTime: !1,
            },
          },
          x = {
            retryParameters: {
              maxAttempts: 2,
              baseDelay: 1e3,
              backoffFactor: 2,
              fuzzFactor: 0.5,
              timeout: 0,
            },
            failureCallback: function (te) {
              return B.error("Unhandled streaming error", te), [te];
            },
            rebufferingGoal: 2,
            bufferingGoal: 10,
            bufferBehind: 30,
            ignoreTextStreamFailures: !1,
            alwaysStreamText: !1,
            startAtSegmentBoundary: !1,
            smallGapLimit: 0.5,
            jumpLargeGaps: !1,
            durationBackoff: 1,
            forceTransmuxTS: !1,
            safeSeekOffset: 5,
            stallEnabled: !0,
            stallThreshold: 1,
            stallSkip: 0.1,
            useNativeHlsOnSafari: !0,
          };
        (Ws("Web0S") || Gu() || Ws("CrKey")) && (x.stallSkip = 0);
        var z = {
            trackSelectionCallback: function (te) {
              return k(function pe() {
                return $t(pe, function (xe) {
                  if (xe.s === 1) return xe.return(te);
                });
              });
            },
            progressCallback: function (te, pe) {
              return [te, pe];
            },
            usePersistentLicense: !0,
          },
          J = {
            drm: R,
            manifest: M,
            streaming: x,
            offline: z,
            abrFactory: zo,
            abr: {
              enabled: !0,
              defaultBandwidthEstimate: m,
              switchInterval: 8,
              bandwidthUpgradeTarget: 0.85,
              bandwidthDowngradeTarget: 0.95,
              restrictions: {
                minWidth: 0,
                maxWidth: 1 / 0,
                minHeight: 0,
                maxHeight: _,
                minPixels: 0,
                maxPixels: 1 / 0,
                minFrameRate: 0,
                maxFrameRate: 1 / 0,
                minBandwidth: 0,
                maxBandwidth: 1 / 0,
              },
            },
            preferredAudioLanguage: "",
            preferredTextLanguage: "",
            preferredVariantRole: "",
            preferredTextRole: "",
            preferredAudioChannelCount: 2,
            restrictions: {
              minWidth: 0,
              maxWidth: 1 / 0,
              minHeight: 0,
              maxHeight: 1 / 0,
              minPixels: 0,
              maxPixels: 1 / 0,
              minFrameRate: 0,
              maxFrameRate: 1 / 0,
              minBandwidth: 0,
              maxBandwidth: 1 / 0,
            },
            playRangeStart: 0,
            playRangeEnd: 1 / 0,
            textDisplayFactory: function () {
              return null;
            },
          };
        return (
          (z.trackSelectionCallback = function (te) {
            return k(function pe() {
              return $t(pe, function (xe) {
                if (xe.s === 1)
                  return xe.return(
                    (function (Be, bt) {
                      var dt = Be.filter(function (Tn) {
                          return Tn.type == "variant";
                        }),
                        mt = [],
                        xt = Bv(
                          bt,
                          dt.map(function (Tn) {
                            return Tn.language;
                          })
                        );
                      xt &&
                        (mt = dt.filter(function (Tn) {
                          return Ia(Tn.language) == xt;
                        })),
                        mt.length == 0 &&
                          (mt = dt.filter(function (Tn) {
                            return Tn.primary;
                          })),
                        mt.length == 0 &&
                          (1 <
                            new Set(
                              dt.map(function (Tn) {
                                return Tn.language;
                              })
                            ).size &&
                            B.v(
                              "Could not choose a good audio track based on language preferences or primary tracks.  An arbitrary language will be stored!"
                            ),
                          (mt = dt));
                      var Nt = mt.filter(function (Tn) {
                        return Tn.height && 480 >= Tn.height;
                      });
                      if (
                        (Nt.length &&
                          (Nt.sort(function (Tn, In) {
                            return In.height - Tn.height;
                          }),
                          (mt = Nt.filter(function (Tn) {
                            return Tn.height == Nt[0].height;
                          }))),
                        (dt = []),
                        mt.length)
                      ) {
                        var en = Math.floor(mt.length / 2);
                        mt.sort(function (Tn, In) {
                          return Tn.bandwidth - In.bandwidth;
                        }),
                          dt.push(mt[en]);
                      }
                      for (mt = b(Be), en = mt.next(); !en.done; en = mt.next())
                        (en = en.value).type == "text" && dt.push(en);
                      return dt;
                    })(te, J.preferredAudioLanguage)
                  );
              });
            });
          }),
          J
        );
      }
      function Fe(m, _, R) {
        var M = {
          ".drm.servers": "",
          ".drm.clearKeys": "",
          ".drm.advanced": {
            distinctiveIdentifierRequired: !1,
            persistentStateRequired: !1,
            videoRobustness: "",
            audioRobustness: "",
            serverCertificate: new Uint8Array(0),
            individualizationServer: "",
          },
        };
        return Me(m, _, R || $e(), M, "");
      }
      function qe() {
        (this.g = null), (this.h = []);
      }
      function Re(m, _) {
        if (m.g == null)
          m.g = { timestamp: Date.now() / 1e3, state: _, duration: 0 };
        else {
          var R = Date.now() / 1e3;
          (m.g.duration = R - m.g.timestamp),
            m.g.state != _ &&
              (m.h.push(m.g), (m.g = { timestamp: R, state: _, duration: 0 }));
        }
      }
      function be(m, _) {
        var R = 0;
        m.g && m.g.state == _ && (R += m.g.duration);
        for (var M = b(m.h), x = M.next(); !x.done; x = M.next())
          R += (x = x.value).state == _ ? x.duration : 0;
        return R;
      }
      function Se() {
        (this.h = this.i = null), (this.g = []);
      }
      function ke() {
        (this.j =
          this.C =
          this.m =
          this.h =
          this.o =
          this.u =
          this.A =
          this.l =
          this.F =
            NaN),
          (this.g = new qe()),
          (this.i = new Se());
      }
      function he(m, _) {
        var R = this;
        Ye.call(this),
          (this.o = rr),
          (this.g = null),
          (this.ub = !1),
          (this.l = new Yr()),
          (this.Uc =
            this.u =
            this.Tb =
            this.i =
            this.C =
            this.j =
            this.rc =
            this.L =
            this.ic =
            this.J =
            this.wb =
            this.A =
            this.M =
            this.m =
            this.X =
              null),
          (this.re = 1e9),
          (this.lc = new Set()),
          (this.yb = !0),
          (this.wa = null),
          (this.qe = !1),
          (this.oe = 0),
          (this.va = null),
          (this.Z = new yt()),
          (this.h = Ie(this)),
          (this.mc = { width: 1 / 0, height: 1 / 0 }),
          (this.F = null),
          (this.tb = new Ji(
            this.h.preferredAudioLanguage,
            this.h.preferredVariantRole,
            this.h.preferredAudioChannelCount
          )),
          (this.ua = this.h.preferredTextLanguage),
          (this.Xa = this.h.preferredTextRole),
          (this.Wc = []),
          _ && _(this),
          (this.X = (function (x) {
            return new Ot(function (z, J) {
              x.u && x.u.segmentDownloaded(z, J);
            });
          })(this)),
          this.l.H(i, "online", function () {
            R.Id();
          }),
          (this.P = { name: "detach" }),
          (this.da = { name: "attach" }),
          (this.Qa = { name: "unload" }),
          (this.nd = { name: "manifest-parser" }),
          (this.md = { name: "manifest" }),
          (this.vb = { name: "media-source" }),
          (this.ad = { name: "drm-engine" }),
          (this.ea = { name: "load" }),
          (this.od = { name: "src-equals-drm-engine" }),
          (this.xb = { name: "src-equals" });
        var M = new Map();
        M.set(this.da, function (x, z) {
          return cr(
            (function (J, te, pe) {
              return (
                te.D == null &&
                  ((te.D = pe.D),
                  J.l.H(te.D, "error", function () {
                    var xe = Xi(J);
                    xe && J.Va(xe);
                  })),
                (J.g = te.D),
                Promise.resolve()
              );
            })(R, x, z)
          );
        }),
          M.set(this.P, function (x) {
            return (
              x.D && (R.l.ta(x.D, "error"), (x.D = null)),
              (R.g = null),
              cr((x = Promise.resolve()))
            );
          }),
          M.set(this.Qa, function (x) {
            return cr(vt(R, x));
          }),
          M.set(this.vb, function (x) {
            return (
              (x = (function (z, J) {
                return k(function te() {
                  var pe, xe, Be, bt;
                  return $t(te, function (dt) {
                    switch (dt.s) {
                      case 1:
                        return (
                          (pe = i.muxjs ? new Vo() : new cd()),
                          (xe = z.h.textDisplayFactory),
                          (Be = new xe()),
                          (z.fd = xe),
                          E(dt, (bt = new Vb(J.D, pe, Be)).C, 2)
                        );
                      case 2:
                        (z.M = bt), S(dt);
                    }
                  });
                });
              })(R, x)),
              cr(x)
            );
          }),
          M.set(this.nd, function (x, z) {
            var J = (function (te, pe, xe) {
              return k(function Be() {
                var bt, dt, mt, xt;
                return $t(Be, function (Nt) {
                  switch (Nt.s) {
                    case 1:
                      if (
                        ((pe.Ia = xe.Ia),
                        (pe.mimeType = xe.mimeType),
                        (pe.uri = xe.uri),
                        (bt = pe.uri),
                        (dt = te.X),
                        (te.Tb = bt),
                        pe.Ia)
                      ) {
                        (te.C = pe.Ia()), Nt.I(2);
                        break;
                      }
                      return (
                        (mt = te),
                        E(
                          Nt,
                          ia.create(
                            bt,
                            dt,
                            te.h.manifest.retryParameters,
                            pe.mimeType
                          ),
                          3
                        )
                      );
                    case 3:
                      mt.C = Nt.B;
                    case 2:
                      (xt = Ct(te.h.manifest)),
                        xe.D &&
                          xe.D.nodeName === "AUDIO" &&
                          (xt.disableVideo = !0),
                        te.C.configure(xt),
                        S(Nt);
                  }
                });
              });
            })(R, x, z);
            return cr(J);
          }),
          M.set(this.md, function (x) {
            return (function (z, J) {
              var te = J.uri,
                pe = z.X;
              (z.rc = new aA(function () {
                return z.He();
              })),
                (function (Be, bt) {
                  Be.h = bt;
                })(z.rc, function (Be) {
                  Fi(z, "timelineregionadded", Be);
                });
              var xe = {
                networkingEngine: pe,
                filterNewPeriod: function (Be) {
                  return z.Xc(Be);
                },
                filterAllPeriods: function (Be) {
                  return Ue(z, Be);
                },
                onTimelineRegionAdded: function (Be) {
                  var bt = z.rc;
                  e: {
                    for (
                      var dt = b(bt.g), mt = dt.next();
                      !mt.done;
                      mt = dt.next()
                    )
                      if (
                        (mt = mt.value).schemeIdUri == Be.schemeIdUri &&
                        mt.id == Be.id &&
                        mt.startTime == Be.startTime &&
                        mt.endTime == Be.endTime
                      ) {
                        dt = mt;
                        break e;
                      }
                    dt = null;
                  }
                  dt == null && (bt.g.add(Be), bt.h(Be));
                },
                onEvent: function (Be) {
                  return z.dispatchEvent(Be);
                },
                onError: function (Be) {
                  return z.Va(Be);
                },
              };
              return new vn(
                Promise.resolve().then(function () {
                  return k(function Be() {
                    var bt;
                    return $t(Be, function (dt) {
                      switch (dt.s) {
                        case 1:
                          return (bt = z), E(dt, z.C.start(te, xe), 2);
                        case 2:
                          if (
                            ((bt.i = dt.B),
                            z.dispatchEvent(new Je("manifestparsed")),
                            z.i.periods.length == 0)
                          )
                            throw new re(2, 4, 4014);
                          (function (mt) {
                            function xt(Nt) {
                              return (
                                (Nt.video && Nt.audio) ||
                                (Nt.video && Nt.video.codecs.includes(","))
                              );
                            }
                            mt.some(function (Nt) {
                              return Nt.variants.some(xt);
                            }) &&
                              (B.debug(
                                "Found variant with audio and video content, so filtering out audio-only content in all periods."
                              ),
                              mt.forEach(function (Nt) {
                                Nt.variants = Nt.variants.filter(xt);
                              }));
                          })(z.i.periods),
                            S(dt);
                      }
                    });
                  });
                }),
                function () {
                  return B.info("Aborting parser step..."), z.C.stop();
                }
              );
            })(R, x);
          }),
          M.set(this.ad, function (x) {
            return (
              (x = (function (z, J) {
                return k(function te() {
                  return $t(te, function (pe) {
                    switch (pe.s) {
                      case 1:
                        return (
                          (z.m = ce(z, {
                            Ib: z.X,
                            onError: function (xe) {
                              z.Va(xe);
                            },
                            Dc: function (xe) {
                              Hi(z, xe);
                            },
                            onExpirationUpdated: function (xe, Be) {
                              jt(z, xe, Be);
                            },
                            onEvent: function (xe) {
                              z.dispatchEvent(xe);
                            },
                          })),
                          z.m.configure(z.h.drm),
                          E(
                            pe,
                            ug(z.m, SP(z.i.periods), z.i.offlineSessionIds),
                            2
                          )
                        );
                      case 2:
                        return E(pe, z.m.Ub(J.D), 3);
                      case 3:
                        Ue(z, z.i.periods), S(pe);
                    }
                  });
                });
              })(R, x)),
              cr(x)
            );
          }),
          M.set(this.ea, function (x, z) {
            return cr(
              (function (J, te, pe) {
                return k(function xe() {
                  var Be, bt, dt, mt, xt, Nt, en, Tn, In, Qn;
                  return $t(xe, function (vr) {
                    switch (vr.s) {
                      case 1:
                        return (
                          (te.startTime = pe.startTime),
                          (Be = te.D),
                          (bt = te.uri),
                          (J.Tb = bt),
                          (J.J = new T_({
                            wc: function () {
                              return te.D.playbackRate;
                            },
                            vc: function () {
                              return te.D.defaultPlaybackRate;
                            },
                            Od: function (mr) {
                              te.D.playbackRate = mr;
                            },
                            pe: function (mr) {
                              te.D.currentTime += mr;
                            },
                          })),
                          (J.F = new ke()),
                          (dt = function () {
                            return tn(J);
                          }),
                          (mt = function () {
                            return an(J);
                          }),
                          J.l.H(Be, "playing", dt),
                          J.l.H(Be, "pause", dt),
                          J.l.H(Be, "ended", dt),
                          J.l.H(Be, "ratechange", mt),
                          (xt = J.h.abrFactory),
                          (J.u && J.Uc == xt) ||
                            ((J.Uc = xt),
                            (J.u = new xt()),
                            J.u.configure(J.h.abr)),
                          (function (mr, bi) {
                            for (var Ur = 0; Ur < bi.length; Ur++) {
                              for (
                                var Jr = bi[Ur],
                                  dr = new Map(),
                                  Br = b(Jr.variants),
                                  oi = Br.next();
                                !oi.done;
                                oi = Br.next()
                              )
                                if (
                                  (oi = oi.value).video &&
                                  oi.video.closedCaptions
                                ) {
                                  for (
                                    var ki = b(
                                        (oi = oi.video).closedCaptions.keys()
                                      ),
                                      Or = ki.next();
                                    !Or.done;
                                    Or = ki.next()
                                  )
                                    if (((Or = Or.value), !dr.has(Or))) {
                                      var ri = {
                                        id: mr.re++,
                                        originalId: Or,
                                        createSegmentIndex:
                                          Promise.resolve.bind(Promise),
                                        findSegmentPosition: function () {
                                          return null;
                                        },
                                        getSegmentReference: function () {
                                          return null;
                                        },
                                        initSegmentReference: null,
                                        presentationTimeOffset: 0,
                                        mimeType: "application/cea-608",
                                        codecs: "",
                                        kind: "caption",
                                        encrypted: !1,
                                        keyId: null,
                                        language: oi.closedCaptions.get(Or),
                                        label: null,
                                        type: "text",
                                        primary: !1,
                                        frameRate: void 0,
                                        pixelAspectRatio: void 0,
                                        trickModeVideo: null,
                                        emsgSchemeIdUris: null,
                                        roles: oi.roles,
                                        channelsCount: null,
                                        audioSamplingRate: null,
                                        closedCaptions: null,
                                      };
                                      dr.set(Or, ri);
                                    }
                                }
                              for (
                                Br = (dr = b(dr.values())).next();
                                !Br.done;
                                Br = dr.next()
                              )
                                Jr.textStreams.push(Br.value);
                            }
                          })(J, J.i.periods),
                          (J.tb = new Ji(
                            J.h.preferredAudioLanguage,
                            J.h.preferredVariantRole,
                            J.h.preferredAudioChannelCount
                          )),
                          (J.ua = J.h.preferredTextLanguage),
                          (J.Xa = J.h.preferredTextRole),
                          (function (mr, bi, Ur) {
                            0 < bi &&
                              (mr.aa()
                                ? B.v(
                                    "|playRangeStart| has been configured for live content. Ignoring the setting."
                                  )
                                : mr.Le(bi)),
                              Ur < mr.ha() &&
                                (mr.aa()
                                  ? B.v(
                                      "|playRangeEnd| has been configured for live content. Ignoring the setting."
                                    )
                                  : mr.Fa(Ur));
                          })(
                            J.i.presentationTimeline,
                            J.h.playRangeStart,
                            J.h.playRangeEnd
                          ),
                          J.u.init(function (mr, bi, Ur) {
                            (bi = bi !== void 0 && bi),
                              (Ur = Ur === void 0 ? 0 : Ur),
                              B.debug("switch_");
                            e: {
                              for (
                                var Jr = b(J.i.periods), dr = Jr.next();
                                !dr.done;
                                dr = Jr.next()
                              )
                                if ((dr = dr.value).variants.includes(mr)) {
                                  Jr = dr;
                                  break e;
                                }
                              Jr = null;
                            }
                            We(J, Jr, mr, !0),
                              J.j && lA(J.j, mr, bi, Ur) && wr(J);
                          }),
                          (J.A = (function (mr, bi) {
                            return new S_(
                              mr.g,
                              mr.i,
                              mr.h.streaming,
                              bi,
                              function () {
                                mr.wb && KO(mr.wb, !0),
                                  mr.j &&
                                    (function (Ur) {
                                      function Jr(Yi) {
                                        var Ba = Ur.g.T;
                                        return (Yi =
                                          Yi == "text"
                                            ? (Yi = Ba.g).g != null &&
                                              Yi.h != null &&
                                              dr >= Yi.g &&
                                              dr < Yi.h
                                            : qf((Yi = fg(Ba, Yi)), dr, Br));
                                      }
                                      var dr = Ur.g.eb(),
                                        Br = Ur.l.smallGapLimit,
                                        oi = !1,
                                        ki = sy(Ur, dr);
                                      if (
                                        Wr(Ur.h.values(), function (Yi) {
                                          return Yi.oa == ki;
                                        })
                                      )
                                        for (
                                          var Or = b(Ur.h.keys()),
                                            ri = Or.next();
                                          !ri.done;
                                          ri = Or.next()
                                        )
                                          Jr((ri = ri.value)) ||
                                            (MP(Ur, Ur.h.get(ri)), (oi = !0));
                                      else
                                        Wr(Ur.h.keys(), Jr) ||
                                          (B.debug(
                                            "(all): seeked: unbuffered seek: clearing all buffers"
                                          ),
                                          Ur.h.forEach(function (Yi) {
                                            MP(Ur, Yi);
                                          }),
                                          (oi = !0));
                                      oi ||
                                        B.debug(
                                          "(all): seeked: buffered seek: presentationTime=" +
                                            dr
                                        );
                                    })(mr.j),
                                  mr.L && je(mr);
                              },
                              function (Ur) {
                                return mr.dispatchEvent(Ur);
                              }
                            );
                          })(J, te.startTime)),
                          (J.wb = (function (mr) {
                            var bi = new RP(mr.i);
                            (function (dr, Br) {
                              dr.h = Br;
                            })(bi, function () {
                              hr(mr);
                            });
                            var Ur = new oA(mr.rc);
                            (function (dr, Br, oi, ki) {
                              (dr.g = Br), (dr.h = oi), (dr.i = ki);
                            })(
                              Ur,
                              function (dr) {
                                Fi(mr, "timelineregionenter", dr);
                              },
                              function (dr) {
                                Fi(mr, "timelineregionexit", dr);
                              },
                              function (dr, Br) {
                                Br ||
                                  (Fi(mr, "timelineregionenter", dr),
                                  Fi(mr, "timelineregionexit", dr));
                              }
                            );
                            var Jr = new EP(mr.g);
                            return Jr.g.add(bi), Jr.g.add(Ur), Jr;
                          })(J)),
                          (Nt = Math.max(
                            J.i.minBufferTime,
                            J.h.streaming.rebufferingGoal
                          )),
                          Ve(J, Nt),
                          (J.j = (function (mr) {
                            return new Jv(mr.i, {
                              eb: function () {
                                return mr.A.l();
                              },
                              getBandwidthEstimate: function () {
                                return mr.u.getBandwidthEstimate();
                              },
                              T: mr.M,
                              Ib: mr.X,
                              ue: mr.Vf.bind(mr),
                              te: mr.Ze.bind(mr),
                              onError: mr.Va.bind(mr),
                              onEvent: function (bi) {
                                return mr.dispatchEvent(bi);
                              },
                              Zf: mr.$f.bind(mr),
                              zd: mr.eg.bind(mr),
                            });
                          })(J)),
                          J.j.configure(J.h.streaming),
                          wi.$d(J.i, J.h.preferredAudioChannelCount),
                          (J.o = Er),
                          J.dispatchEvent(new Je("streaming")),
                          E(vr, J.j.start(), 2)
                        );
                      case 2:
                        J.h.streaming.startAtSegmentBoundary &&
                          ((en = J.A.l()),
                          (Tn = (function (mr, bi) {
                            function Ur(oi, ki) {
                              if (!oi) return null;
                              var Or = oi.findSegmentPosition(
                                ki - Br.startTime
                              );
                              return Or == null
                                ? null
                                : (Or = oi.getSegmentReference(Or))
                                ? Or.startTime + Br.startTime
                                : null;
                            }
                            var Jr = f2(mr.j),
                              dr = w_(mr.j),
                              Br = Hn(mr);
                            return (
                              (Jr = Ur(Jr, bi)),
                              (dr = Ur(dr, bi)),
                              dr != null && Jr != null
                                ? Math.max(dr, Jr)
                                : dr ?? Jr ?? bi
                            );
                          })(J, en)),
                          J.A.A(Tn)),
                          J.i.periods.forEach(J.Xc.bind(J)),
                          hr(J),
                          wr(J),
                          (In = Hn(J) || J.i.periods[0]),
                          (Qn = In.variants.some(function (mr) {
                            return mr.primary;
                          })),
                          J.h.preferredAudioLanguage ||
                            Qn ||
                            B.v(
                              "No preferred audio language set.  We will choose an arbitrary language initially"
                            ),
                          fn(J, In.variants),
                          J.l.ya(Be, "loadedmetadata", function () {
                            J.F.h = Date.now() / 1e3 - pe.Rd;
                          }),
                          S(vr);
                    }
                  });
                });
              })(R, x, z)
            );
          }),
          M.set(this.od, function (x, z) {
            var J = (function (te, pe, xe) {
              return k(function Be() {
                var bt, dt;
                return $t(Be, function (mt) {
                  switch (mt.s) {
                    case 1:
                      return (
                        (bt = Mt),
                        (te.m = ce(te, {
                          Ib: te.X,
                          onError: function (xt) {
                            te.Va(xt);
                          },
                          Dc: function (xt) {
                            Hi(te, xt);
                          },
                          onExpirationUpdated: function (xt, Nt) {
                            jt(te, xt, Nt);
                          },
                          onEvent: function (xt) {
                            te.dispatchEvent(xt);
                          },
                        })),
                        te.m.configure(te.h.drm),
                        (dt = {
                          id: 0,
                          language: "und",
                          primary: !1,
                          audio: null,
                          video: {
                            id: 0,
                            originalId: null,
                            createSegmentIndex: Promise.resolve.bind(Promise),
                            findSegmentPosition: function () {
                              return null;
                            },
                            getSegmentReference: function () {
                              return null;
                            },
                            initSegmentReference: null,
                            presentationTimeOffset: 0,
                            mimeType: xe.mimeType
                              ? xe.mimeType.split(";")[0]
                              : "video/mp4",
                            codecs: xe.mimeType ? Sl(xe.mimeType) : "",
                            encrypted: !0,
                            keyId: null,
                            language: "und",
                            label: null,
                            type: bt.Za,
                            primary: !1,
                            frameRate: void 0,
                            pixelAspectRatio: void 0,
                            trickModeVideo: null,
                            emsgSchemeIdUris: null,
                            roles: [],
                            channelsCount: null,
                            audioSamplingRate: null,
                            closedCaptions: null,
                          },
                          bandwidth: 100,
                          drmInfos: [],
                          allowedByApplication: !0,
                          allowedByKeySystem: !0,
                        }),
                        E(mt, ug(te.m, [dt], []), 2)
                      );
                    case 2:
                      return E(mt, te.m.Ub(pe.D), 0);
                  }
                });
              });
            })(R, x, z);
            return cr(J);
          }),
          M.set(this.xb, function (x, z) {
            return (function (J, te, pe) {
              function xe() {
                return tn(J);
              }
              if (
                ((te.uri = pe.uri),
                (te.startTime = pe.startTime),
                (J.Tb = te.uri),
                (J.F = new ke()),
                (J.A = new E_(te.D)),
                te.startTime != null && J.A.A(te.startTime),
                (J.J = new T_({
                  wc: function () {
                    return te.D.playbackRate;
                  },
                  vc: function () {
                    return te.D.defaultPlaybackRate;
                  },
                  Od: function (mt) {
                    te.D.playbackRate = mt;
                  },
                  pe: function (mt) {
                    te.D.currentTime += mt;
                  },
                })),
                Ve(J, J.h.streaming.rebufferingGoal),
                J.l.H(te.D, "playing", xe),
                J.l.H(te.D, "pause", xe),
                J.l.H(te.D, "ended", xe),
                J.l.H(te.D, "ratechange", function () {
                  return an(J);
                }),
                J.g.preload != "none" &&
                  J.l.ya(te.D, "loadedmetadata", function () {
                    J.F.h = Date.now() / 1e3 - pe.Rd;
                  }),
                J.g.audioTracks &&
                  (J.l.H(J.g.audioTracks, "addtrack", function () {
                    return hr(J);
                  }),
                  J.l.H(J.g.audioTracks, "removetrack", function () {
                    return hr(J);
                  }),
                  J.l.H(J.g.audioTracks, "change", function () {
                    return hr(J);
                  })),
                J.g.textTracks)
              ) {
                var Be = J.g.textTracks;
                J.l.H(Be, "addtrack", function () {
                  return hr(J);
                }),
                  J.l.H(Be, "removetrack", function () {
                    return hr(J);
                  }),
                  J.l.H(Be, "change", function () {
                    return hr(J);
                  });
              }
              (te.D.src = te.uri),
                (Gu() || Ws("Web0S")) && te.D.load(),
                (J.o = gn),
                J.dispatchEvent(new Je("streaming"));
              var bt = new Ft();
              qh(J.g, HTMLMediaElement.HAVE_METADATA, J.l, function () {
                bt.resolve();
              });
              var dt = !1;
              return (
                J.Wc.push(function () {
                  dt = !0;
                }),
                qh(J.g, HTMLMediaElement.HAVE_CURRENT_DATA, J.l, function () {
                  return k(function mt() {
                    return $t(mt, function (xt) {
                      switch (xt.s) {
                        case 1:
                          if (dt) return xt.return();
                          if (
                            ((function (Nt) {
                              var en = Nt.h.preferredAudioLanguage;
                              if (en != "") {
                                Nt.Jd(en);
                                var Tn = Nt.h.preferredVariantRole;
                                Tn != "" && Nt.Jd(en, Tn);
                              }
                            })(J),
                            Qe(J).find(function (Nt) {
                              return Nt.mode != "disabled";
                            }))
                          ) {
                            xt.I(2);
                            break;
                          }
                          return E(
                            xt,
                            new Promise(function (Nt) {
                              J.l.ya(J.g.textTracks, "change", Nt),
                                new Ut(Nt).V(1);
                            }),
                            2
                          );
                        case 2:
                          if (dt) return xt.return();
                          (function (Nt) {
                            var en = Nt.h.preferredTextLanguage;
                            if (en != "") {
                              Nt.Kd(en);
                              var Tn = Nt.h.preferredTextRole;
                              Tn != "" && Nt.Kd(en, Tn);
                            }
                          })(J),
                            S(xt);
                      }
                    });
                  });
                }),
                J.g.error
                  ? bt.reject(Xi(J))
                  : J.g.preload == "none" &&
                    (B.ba(
                      'With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'
                    ),
                    bt.resolve()),
                J.l.ya(J.g, "error", function () {
                  bt.reject(Xi(J));
                }),
                new vn(bt, function () {
                  return bt.reject(new re(2, 7, 7001)), Promise.resolve();
                })
              );
            })(R, x, z);
          }),
          (this.Ya = new Te(this.P, {
            Af: function (x, z, J, te) {
              var pe = null;
              return (
                x == R.P && (pe = J == R.P ? R.P : R.da),
                x == R.da &&
                  (pe =
                    J == R.P || z.D != te.D
                      ? R.P
                      : J == R.da
                      ? R.da
                      : J == R.vb || J == R.ea
                      ? R.vb
                      : J == R.xb
                      ? R.od
                      : null),
                x == R.vb && (pe = J == R.ea && z.D == te.D ? R.nd : R.Qa),
                x == R.nd && (pe = Lr(R.ea, R.md, R.Qa, J, z, te)),
                x == R.md && (pe = Lr(R.ea, R.ad, R.Qa, J, z, te)),
                x == R.ad && (pe = Lr(R.ea, R.ea, R.Qa, J, z, te)),
                x == R.od && (pe = J == R.xb && z.D == te.D ? R.xb : R.Qa),
                (x != R.ea && x != R.xb) || (pe = R.Qa),
                x == R.Qa && (pe = te.D && z.D == te.D ? R.da : R.P),
                pe
              );
            },
            ef: function (x, z, J) {
              return (
                R.dispatchEvent(new Je("onstatechange", { state: x.name })),
                M.get(x)(z, J)
              );
            },
            handleError: function (x, z) {
              return k(function J() {
                return $t(J, function (te) {
                  switch (te.s) {
                    case 1:
                      return (
                        B.v("The walker saw an error:"),
                        z instanceof re
                          ? B.v("Error Code:", z.code)
                          : (B.v("Error Message:", z.message),
                            B.v("Error Stack:", z.stack)),
                        E(te, vt(R, x), 2)
                      );
                    case 2:
                      return te.return(x.D ? R.da : R.P);
                  }
                });
              });
            },
            Xf: function (x) {
              R.dispatchEvent(new Je("onstateidle", { state: x.name }));
            },
          })),
          m && this.Ub(m, !0);
      }
      O(y2, I_),
        (y2.prototype.updateManifestExpiration = function (m, _) {
          var R = qv(this.h, this.g),
            M = R.store(),
            x = new Ft();
          return (
            (M.get(m).onsuccess = function (z) {
              (z = z.target.result)
                ? ((z.expiration = _), M.put(z), x.resolve())
                : x.reject(
                    new re(2, 9, 9012, "Could not find values for " + m)
                  );
            }),
            R.promise().then(function () {
              return x;
            })
          );
        }),
        (y2.prototype.pc = function (m) {
          return {
            originalManifestUri: m.originalManifestUri,
            duration: m.duration,
            size: m.size,
            expiration: m.expiration == null ? 1 / 0 : m.expiration,
            periods: m.periods.map(fG),
            sessionIds: m.sessionIds,
            drmInfo: m.drmInfo,
            appMetadata: m.appMetadata,
          };
        }),
        (y2.prototype.ae = function (m) {
          return { data: m.data };
        }),
        O(Km, I_),
        (Km.prototype.hasFixedKeySpace = function () {
          return this.j;
        }),
        (Km.prototype.addSegments = function (m) {
          return this.j ? fA(this.i) : this.add(this.i, m);
        }),
        (Km.prototype.addManifests = function (m) {
          return this.j ? fA(this.g) : this.add(this.g, m);
        }),
        (Km.prototype.pc = function (m) {
          return m.expiration == null && (m.expiration = 1 / 0), m;
        }),
        ((u = v2.prototype).init = function () {
          var m = this,
            _ = new Ft(),
            R = i.indexedDB.open("shaka_offline_db", 4);
          return (
            (R.onsuccess = function (M) {
              (M = M.target.result), (m.j = M);
              var x = M.objectStoreNames;
              x.contains("manifest") && x.contains("segment")
                ? (B.debug("Mounting v1 idb storage cell"),
                  (x = new y2(M, "segment", "manifest")))
                : (x = null),
                (m.g = x),
                (x = M.objectStoreNames).contains("manifest-v2") &&
                x.contains("segment-v2")
                  ? (B.debug("Mounting v2 idb storage cell"),
                    (x = new Km(M, "segment-v2", "manifest-v2", !0)))
                  : (x = null),
                (m.h = x),
                (x = M.objectStoreNames).contains("manifest-v3") &&
                x.contains("segment-v3")
                  ? (B.debug("Mounting v3 idb storage cell"),
                    (x = new Km(M, "segment-v3", "manifest-v3", !1)))
                  : (x = null),
                (m.i = x),
                M.objectStoreNames.contains("session-ids")
                  ? (B.debug("Mounting session ID idb storage cell"),
                    (M = new D_(M)))
                  : (M = null),
                (m.l = M),
                _.resolve();
            }),
            (R.onupgradeneeded = function (M) {
              M = M.target.result;
              for (
                var x = b(["segment-v3", "manifest-v3", "session-ids"]),
                  z = x.next();
                !z.done;
                z = x.next()
              )
                (z = z.value),
                  M.objectStoreNames.contains(z) ||
                    M.createObjectStore(z, { autoIncrement: !0 });
            }),
            (R.onerror = function (M) {
              _.reject(new re(2, 9, 9001, R.error)), M.preventDefault();
            }),
            _
          );
        }),
        (u.destroy = function () {
          var m = this;
          return k(function _() {
            return $t(_, function (R) {
              switch (R.s) {
                case 1:
                  if (!m.g) {
                    R.I(2);
                    break;
                  }
                  return E(R, m.g.destroy(), 2);
                case 2:
                  if (!m.h) {
                    R.I(4);
                    break;
                  }
                  return E(R, m.h.destroy(), 4);
                case 4:
                  if (!m.i) {
                    R.I(6);
                    break;
                  }
                  return E(R, m.i.destroy(), 6);
                case 6:
                  if (!m.l) {
                    R.I(8);
                    break;
                  }
                  return E(R, m.l.destroy(), 8);
                case 8:
                  m.j && m.j.close(), S(R);
              }
            });
          });
        }),
        (u.getCells = function () {
          var m = new Map();
          return (
            this.g && m.set("v1", this.g),
            this.h && m.set("v2", this.h),
            this.i && m.set("v3", this.i),
            m
          );
        }),
        (u.getEmeSessionCell = function () {
          return this.l;
        }),
        (u.erase = function () {
          var m = this;
          return k(function _() {
            return $t(_, function (R) {
              switch (R.s) {
                case 1:
                  if (!m.g) {
                    R.I(2);
                    break;
                  }
                  return E(R, m.g.destroy(), 2);
                case 2:
                  if (!m.h) {
                    R.I(4);
                    break;
                  }
                  return E(R, m.h.destroy(), 4);
                case 4:
                  if (!m.i) {
                    R.I(6);
                    break;
                  }
                  return E(R, m.i.destroy(), 6);
                case 6:
                  return (
                    m.j && m.j.close(),
                    E(
                      R,
                      (function () {
                        var M = new Ft(),
                          x = i.indexedDB.deleteDatabase("shaka_offline_db");
                        return (
                          (x.onblocked = function () {
                            B.v(
                              "Deleting",
                              "shaka_offline_db",
                              "is being blocked"
                            );
                          }),
                          (x.onsuccess = function () {
                            M.resolve();
                          }),
                          (x.onerror = function (z) {
                            M.reject(new re(2, 9, 9001, x.error)),
                              z.preventDefault();
                          }),
                          M
                        );
                      })(),
                      8
                    )
                  );
                case 8:
                  return (
                    (m.j = null),
                    (m.g = null),
                    (m.h = null),
                    (m.i = null),
                    E(R, m.init(), 0)
                  );
              }
            });
          });
        }),
        hG("idb", function () {
          return Ws("CrKey") || !i.indexedDB ? null : new v2();
        }),
        (Zm.prototype.Ea = function () {
          return this.l;
        }),
        (Zm.prototype.ja = function () {
          return this.j;
        }),
        (Zm.prototype.key = function () {
          return this.i;
        }),
        (Zm.prototype.toString = function () {
          return this.h;
        }),
        ((u = ee.prototype).configure = function () {}),
        (u.start = function (m) {
          var _ = this;
          return k(function R() {
            var M, x, z, J, te;
            return $t(R, function (pe) {
              switch (pe.s) {
                case 1:
                  return (
                    (M = Y(m)),
                    (_.g = M),
                    M == null || M.g != "manifest"
                      ? pe.return(Promise.reject(new re(2, 1, 9004, M)))
                      : ((x = new cp()), W(pe, 2), E(pe, x.init(), 4))
                  );
                case 4:
                  return E(pe, m2(x, M.Ea(), M.ja()), 5);
                case 5:
                  return E(pe, pe.B.getManifests([M.key()]), 6);
                case 6:
                  return (
                    (z = pe.B),
                    (J = z[0]),
                    (te = new U(M.Ea(), M.ja())),
                    pe.return(
                      (function (xe, Be) {
                        var bt = new Vr(null, 0);
                        bt.Fa(Be.duration);
                        var dt = Be.periods.map(function (xt) {
                            return K(xe, xt, bt);
                          }),
                          mt = Be.drmInfo ? [Be.drmInfo] : [];
                        return (
                          Be.drmInfo &&
                            dt.forEach(function (xt) {
                              xt.variants.forEach(function (Nt) {
                                Nt.drmInfos = mt;
                              });
                            }),
                          {
                            presentationTimeline: bt,
                            minBufferTime: 2,
                            offlineSessionIds: Be.sessionIds,
                            periods: dt,
                          }
                        );
                      })(te, J)
                    )
                  );
                case 2:
                  return De(pe), E(pe, x.destroy(), 7);
                case 7:
                  Xe(pe, 0);
              }
            });
          });
        }),
        (u.stop = function () {
          return Promise.resolve();
        }),
        (u.update = function () {}),
        (u.onExpirationUpdated = function (m, _) {
          var R = this;
          return k(function M() {
            var x, z, J, te, pe, xe, Be, bt;
            return $t(M, function (dt) {
              switch (dt.s) {
                case 1:
                  return (
                    (x = R.g), (z = new cp()), L(dt, 2, 3), E(dt, z.init(), 5)
                  );
                case 5:
                  return E(dt, m2(z, x.Ea(), x.ja()), 6);
                case 6:
                  return E(dt, (J = dt.B).getManifests([x.key()]), 7);
                case 7:
                  if (
                    ((te = dt.B),
                    (pe = te[0]),
                    (xe = pe.sessionIds.includes(m)),
                    (Be = pe.expiration == null || pe.expiration > _),
                    !xe || !Be)
                  ) {
                    dt.I(3);
                    break;
                  }
                  return (
                    B.debug("Updating expiration for stored content"),
                    E(dt, J.updateManifestExpiration(x.key(), _), 3)
                  );
                case 3:
                  return De(dt), E(dt, z.destroy(), 10);
                case 10:
                  Xe(dt, 0);
                  break;
                case 2:
                  (bt = oe(dt)),
                    B.error("There was an error updating", x, bt),
                    dt.I(3);
              }
            });
          });
        }),
        ia.Qb("application/x-offline-manifest", ee),
        Z("shaka.offline.OfflineScheme", fe),
        (fe.m = function (m) {
          return qn(
            (m = {
              uri: m,
              Bd: m,
              data: new ArrayBuffer(0),
              headers: { "content-type": "application/x-offline-manifest" },
            })
          );
        }),
        (fe.o = function (m, _) {
          var R = new cp();
          return qn(void 0)
            .ca(function () {
              return R.init();
            })
            .ca(function () {
              return m2(R, _.Ea(), _.ja());
            })
            .ca(function (M) {
              return M.getSegments([_.key()]);
            })
            .ca(function (M) {
              return { uri: _, Bd: _, data: M[0].data, headers: {} };
            })
            .finally(function () {
              return R.destroy();
            });
        }),
        gr("offline", fe),
        (Te.prototype.destroy = function () {
          var m = this;
          return k(function _() {
            return $t(_, function (R) {
              switch (R.s) {
                case 1:
                  return (m.u = !1), m.h && m.h.abort(), se(m), E(R, m.A, 2);
                case 2:
                  m.g && m.g.Da.kb();
                  for (var M = b(m.l), x = M.next(); !x.done; x = M.next())
                    x.value.Da.kb();
                  (m.g = null), (m.l = []), (m.m = null), S(R);
              }
            });
          });
        }),
        Z("shaka.text.SimpleTextDisplayer", le),
        (le.prototype.remove = function (m, _) {
          return (
            !!this.g &&
            (we(this.g, function (R) {
              return R.startTime < _ && R.endTime > m;
            }),
            !0)
          );
        }),
        (le.prototype.remove = le.prototype.remove),
        (le.prototype.append = function (m) {
          var _ = me,
            R = m.map(function (J) {
              if (J.nestedCues.length) {
                var te = J.nestedCues
                  .map(function (pe) {
                    return pe.spacer
                      ? `
`
                      : pe.payload + " ";
                  })
                  .join("")
                  .replace(/ $/m, "");
                ((J = J.clone()).nestedCues = []), (J.payload = te);
              }
              return J;
            }),
            M = [];
          m = this.g.cues ? Array.from(this.g.cues) : [];
          for (
            var x = {}, z = (R = b(R)).next();
            !z.done;
            x = { Fb: x.Fb }, z = R.next()
          )
            (x.Fb = z.value),
              m.some(
                (function (J) {
                  return function (te) {
                    return (
                      te.startTime == J.Fb.startTime &&
                      te.endTime == J.Fb.endTime &&
                      te.text == J.Fb.payload
                    );
                  };
                })(x)
              ) ||
                ((z = _(x.Fb)) && M.push(z));
          M.slice()
            .sort(function (J, te) {
              return J.startTime != te.startTime
                ? J.startTime - te.startTime
                : J.endTime != te.endTime
                ? J.endTime - te.startTime
                : "line" in VTTCue.prototype
                ? M.indexOf(te) - M.indexOf(J)
                : M.indexOf(J) - M.indexOf(te);
            })
            .forEach(
              function (J) {
                this.g.addCue(J);
              }.bind(this)
            );
        }),
        (le.prototype.append = le.prototype.append),
        (le.prototype.destroy = function () {
          return (
            this.g &&
              we(this.g, function () {
                return !0;
              }),
            (this.g = null),
            Promise.resolve()
          );
        }),
        (le.prototype.destroy = le.prototype.destroy),
        (le.prototype.isTextVisible = function () {
          return this.g.mode == "showing";
        }),
        (le.prototype.isTextVisible = le.prototype.isTextVisible),
        (le.prototype.setTextVisibility = function (m) {
          this.g.mode = m ? "showing" : "hidden";
        }),
        (le.prototype.setTextVisibility = le.prototype.setTextVisibility),
        Z("shaka.util.ConfigUtils.mergeConfigObjects", Me),
        Z("shaka.util.ConfigUtils.convertToConfigObject", Oe),
        Z("shaka.util.PlayerConfiguration", Ge),
        (Ge.mergeConfigObjects = Fe),
        ie(he, Ye),
        Z("shaka.Player", he),
        (he.prototype.destroy = function () {
          var m = this;
          return k(function _() {
            var R;
            return $t(_, function (M) {
              switch (M.s) {
                case 1:
                  return m.o == Cn
                    ? M.return()
                    : ((m.o = Cn),
                      (R = _e(m.Ya, function () {
                        return {
                          node: m.P,
                          payload: {
                            Ia: null,
                            D: null,
                            mimeType: null,
                            startTime: null,
                            Rd: null,
                            uri: null,
                          },
                          gb: !1,
                        };
                      })),
                      E(
                        M,
                        new Promise(function (x) {
                          (R.Kb = function () {
                            B.info("Preparing to destroy walker...");
                          }),
                            (R.Cc = function () {
                              x(), m.dispatchEvent(new Je("loaded"));
                            }),
                            (R.kb = function () {
                              x();
                            }),
                            (R.onError = function () {
                              x();
                            }),
                            (R.Ec = function () {
                              x();
                            });
                        }),
                        2
                      ));
                case 2:
                  return E(M, m.Ya.destroy(), 3);
                case 3:
                  if (
                    (m.l && (m.l.release(), (m.l = null)),
                    (m.Uc = null),
                    (m.u = null),
                    (m.h = null),
                    !m.X)
                  ) {
                    M.I(0);
                    break;
                  }
                  return E(M, m.X.destroy(), 5);
                case 5:
                  (m.X = null), S(M);
              }
            });
          });
        }),
        (he.prototype.destroy = he.prototype.destroy),
        (he.version = "v2.5.23");
      var rt = ["2", "5"];
      Vv = new (function (m) {
        (this.g = m), (this.i = qR), (this.h = Xv);
      })(new Kb(Number(rt[0]), Number(rt[1])));
      var Ze = ["output-restricted", "internal-error"],
        nt = {};
      function vt(m, _) {
        return k(function R() {
          var M;
          return $t(R, function (x) {
            switch (x.s) {
              case 1:
                return (
                  m.o != Cn && (m.o = rr),
                  (M = m.Wc.map(function (z) {
                    return z();
                  })),
                  (m.Wc = []),
                  E(x, Promise.all(M), 2)
                );
              case 2:
                if (
                  (m.dispatchEvent(new Je("unloading")),
                  (_.Ia = null),
                  (_.mimeType = null),
                  (_.startTime = null),
                  (_.uri = null),
                  _.D &&
                    (m.l.ta(_.D, "loadedmetadata"),
                    m.l.ta(_.D, "playing"),
                    m.l.ta(_.D, "pause"),
                    m.l.ta(_.D, "ended"),
                    m.l.ta(_.D, "ratechange")),
                  m.wb && (m.wb.release(), (m.wb = null)),
                  m.ic && (m.ic.stop(), (m.ic = null)),
                  !m.C)
                ) {
                  x.I(3);
                  break;
                }
                return E(x, m.C.stop(), 4);
              case 4:
                m.C = null;
              case 3:
                if (!m.u) {
                  x.I(5);
                  break;
                }
                return E(x, m.u.stop(), 5);
              case 5:
                if (!m.j) {
                  x.I(7);
                  break;
                }
                return E(x, m.j.destroy(), 8);
              case 8:
                m.j = null;
              case 7:
                if (
                  (m.J && (m.J.release(), (m.J = null)),
                  m.A && (m.A.release(), (m.A = null)),
                  !m.M)
                ) {
                  x.I(9);
                  break;
                }
                return E(x, m.M.destroy(), 10);
              case 10:
                m.M = null;
              case 9:
                if (!_.D || !_.D.src) {
                  x.I(11);
                  break;
                }
                return E(
                  x,
                  new Promise(function (z) {
                    return new Ut(z).V(0.1);
                  }),
                  12
                );
              case 12:
                _.D.removeAttribute("src"), _.D.load();
              case 11:
                if (!m.m) {
                  x.I(13);
                  break;
                }
                return E(x, m.m.destroy(), 14);
              case 14:
                m.m = null;
              case 13:
                m.Z.g.clear(),
                  (m.Tb = null),
                  (m.L = null),
                  m.lc.clear(),
                  (m.i = null),
                  (m.F = null),
                  (m.fd = null),
                  (m.yb = !0),
                  Rt(m),
                  S(x);
            }
          });
        });
      }
      function ce(m, _) {
        return new rs(_, m.h.drm.updateExpirationTime);
      }
      function Ve(m, _) {
        (m.L = new bo()),
          (m.L.g = Do),
          Oo(m.L, _, Math.min(0.5, _ / 2)),
          Rt(m),
          (m.ic = new Ut(function () {
            je(m);
          }).Oa(0.25));
      }
      function je(m) {
        switch (m.o) {
          case gn:
            var _ = !!m.g.ended || Ql(m.g.buffered) >= m.g.duration - 1;
            break;
          case Er:
            e: if (m.g.ended || t2(m.M)) _ = !0;
            else {
              if (m.i.presentationTimeline.aa()) {
                var R = m.i.presentationTimeline.Db();
                if (Ql(m.g.buffered) >= R) {
                  _ = !0;
                  break e;
                }
              }
              _ = !1;
            }
            break;
          default:
            _ = !1;
        }
        var M = Nb(m.g.buffered, m.g.currentTime),
          x = _,
          z = (R = m.L).h.get(R.g);
        (_ = R.g), (M = x || M >= z ? sl : Do), (R.g = M), _ != M && Rt(m);
      }
      function it(m) {
        if (m.C) {
          var _ = Ct(m.h.manifest);
          m.g && m.g.nodeName === "AUDIO" && (_.disableVideo = !0),
            m.C.configure(_);
        }
        if ((m.m && m.m.configure(m.h.drm), m.j)) {
          m.j.configure(m.h.streaming);
          try {
            m.i.periods.forEach(m.Xc.bind(m));
          } catch (z) {
            m.Va(z);
          }
          var R = f2(m.j),
            M = w_(m.j);
          (_ = Hn(m)),
            (R = wi.ie(R, M, _.variants)),
            m.u && R && R.allowedByApplication && R.allowedByKeySystem
              ? fn(m, _.variants)
              : (B.debug("Choosing new streams after changing configuration"),
                nr(m, _));
        }
        if (m.M && ((_ = m.h.textDisplayFactory), m.fd != _)) {
          R = new _();
          var x = (M = m.M).l;
          (M.l = R),
            x && (R.setTextVisibility(x.isTextVisible()), x.destroy()),
            M.g && (M.g.i = R),
            (m.fd = _),
            m.j && (R = (_ = m.j).h.get("text")) && ay(_, R.stream, !0, 0, !0);
        }
        m.u &&
          (m.u.configure(m.h.abr),
          m.h.abr.enabled && !m.yb ? m.u.enable() : m.u.disable(),
          ni(m)),
          m.L &&
            ((_ = m.h.streaming.rebufferingGoal),
            m.i && (_ = Math.max(_, m.i.minBufferTime)),
            Oo(m.L, _, Math.min(0.5, _ / 2)));
      }
      function Qe(m) {
        return Array.from(m.g.textTracks).filter(function (_) {
          return (
            _.kind != "metadata" &&
            _.kind != "chapters" &&
            _.label != "Shaka Player TextTrack"
          );
        });
      }
      function We(m, _, R, M) {
        (mn(m.Z, _).variant = R),
          (m = m.F.i).i != R &&
            ((m.i = R),
            m.g.push({
              timestamp: Date.now() / 1e3,
              id: R.id,
              type: "variant",
              fromAdaptation: M,
              bandwidth: R.bandwidth,
            }));
      }
      function Ke(m, _, R, M) {
        Bt(m.Z, _, R),
          (m = m.F.i).h != R &&
            ((m.h = R),
            m.g.push({
              timestamp: Date.now() / 1e3,
              id: R.id,
              type: "text",
              fromAdaptation: M,
              bandwidth: null,
            }));
      }
      function Ie(m) {
        var _ = $e();
        return (
          (_.streaming.failureCallback = function (R) {
            m.aa() &&
              [1001, 1002, 1003].includes(R.code) &&
              ((R.severity = 1),
              B.v("Live streaming error.  Retrying automatically..."),
              m.Id());
          }),
          (_.textDisplayFactory = function () {
            return new le(m.g);
          }),
          _
        );
      }
      function Ue(m, _) {
        var R = m.j ? f2(m.j) : null,
          M = m.j ? w_(m.j) : null;
        if (
          (_.forEach(wi.filterNewPeriod.bind(null, m.m, R, M)),
          (R = (function (x, z) {
            var J = 0;
            return (
              x.forEach(function (te) {
                J += z(te) ? 1 : 0;
              }),
              J
            );
          })(_, function (x) {
            return x.variants.some(wi.Gb);
          })),
          R == 0)
        )
          throw new re(2, 4, 4032);
        if (R < _.length) throw new re(2, 4, 4011);
        _.forEach(
          function (x) {
            wi.Xd(x.variants, this.h.restrictions, this.mc) &&
              this.j &&
              Hn(this) == x &&
              hr(this),
              An(this, x.variants);
          }.bind(m)
        );
      }
      function at(m, _, R, M) {
        return (
          (R = R !== void 0 && R),
          (M = M === void 0 ? 0 : M),
          m.yb
            ? ((m.wa = _), (m.qe = R), (m.oe = M), !0)
            : ((_ = lA(m.j, _, R, M)) && pi(m), _)
        );
      }
      function ft(m, _) {
        if (m.yb) return (m.va = _), !0;
        var R = ay(m.j, _, !0, 0, !1);
        return R && Rn(m), R;
      }
      function Rt(m) {
        var _ = m.jd();
        if (m.F && m.L && m.A) {
          var R = m.J;
          (R.j = _), AP(R), tn(m);
        }
        m.dispatchEvent(new Je("buffering", { buffering: _ }));
      }
      function an(m) {
        var _ = m.g.playbackRate;
        _ != 0 && m.J.set(_);
      }
      function tn(m) {
        if (m.F && m.L) {
          var _ = m.F.g;
          m.L.g == Do
            ? Re(_, "buffering")
            : m.g.paused
            ? Re(_, "paused")
            : m.g.ended
            ? Re(_, "ended")
            : Re(_, "playing");
        }
      }
      function fn(m, _) {
        try {
          An(m, _);
        } catch (M) {
          return m.Va(M), null;
        }
        var R = _.filter(function (M) {
          return wi.Gb(M);
        });
        return (
          (R = m.tb.create(R)),
          m.u.setVariants(Array.from(R.values())),
          m.u.chooseVariant()
        );
      }
      function nr(m, _) {
        var R = Bn(m, _, !1),
          M = wi.Wb(_.textStreams, m.ua, m.Xa)[0] || null,
          x = !1;
        M &&
          (m.h.streaming.alwaysStreamText || m.zc()) &&
          (Ke(m, _, M, !0), (x = ft(m, M))),
          (R || x) && wr(m);
      }
      function Bn(m, _, R) {
        R = R === void 0 || R;
        var M = fn(m, _.variants),
          x = !1;
        return M && (We(m, _, M, !0), (x = at(m, M, !0))), R && x && wr(m), x;
      }
      function wr(m) {
        pn(m, new Je("adaptation"));
      }
      function hr(m) {
        pn(m, new Je("trackschanged"));
      }
      function pi(m) {
        pn(m, new Je("variantchanged"));
      }
      function Rn(m) {
        pn(m, new Je("textchanged"));
      }
      function $r(m) {
        pn(m, new Je("texttrackvisibility"));
      }
      function ni(m) {
        pn(m, new Je("abrstatuschanged", { Zg: m.h.abr.enabled }));
      }
      function Fi(m, _, R) {
        m.dispatchEvent(
          new Je(_, {
            detail: {
              schemeIdUri: R.schemeIdUri,
              value: R.value,
              startTime: R.startTime,
              endTime: R.endTime,
              id: R.id,
              eventElement: R.eventElement,
            },
          })
        );
      }
      function Xi(m) {
        if (!m.g.error) return null;
        var _ = m.g.error.code;
        if (_ == 1) return null;
        var R = m.g.error.msExtendedCode;
        return (
          R && (0 > R && (R += Math.pow(2, 32)), (R = R.toString(16))),
          new re(2, 3, 3016, _, R, m.g.error.message)
        );
      }
      function Hi(m, _) {
        if (m.j) {
          var R = Hn(m),
            M = !1,
            x = Object.keys(_);
          x.length == 0 &&
            B.v(
              "Got a key status event without any key statuses, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks."
            );
          var z = x.length == 1 && x[0] == "00";
          z &&
            B.v(
              "Got a synthetic key status event, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks."
            ),
            x.length &&
              m.i.periods.forEach(function (te) {
                te.variants.forEach(function (pe) {
                  wi.Kf(pe).forEach(function (xe) {
                    var Be = pe.allowedByKeySystem;
                    xe.keyId &&
                      ((xe = _[z ? "00" : xe.keyId]),
                      (pe.allowedByKeySystem = !!xe && !Ze.includes(xe))),
                      Be != pe.allowedByKeySystem && (M = !0);
                  });
                });
              }),
            (x = f2(m.j));
          var J = w_(m.j);
          (x = wi.ie(x, J, R.variants)) &&
            !x.allowedByKeySystem &&
            (B.debug("Choosing new variants after key status changed"),
            Bn(m, R)),
            M && (hr(m), fn(m, R.variants));
        }
      }
      function jt(m, _, R) {
        m.C && m.C.onExpirationUpdated && m.C.onExpirationUpdated(_, R),
          m.dispatchEvent(new Je("expirationupdated"));
      }
      function An(m, _) {
        var R = m.m ? ma(m.m.da) : {},
          M = Object.keys(R);
        M = M.length && M[0] == "00";
        for (
          var x = !1, z = !1, J = [], te = [], pe = b(_), xe = pe.next();
          !xe.done;
          xe = pe.next()
        ) {
          var Be = [];
          (xe = xe.value).audio && Be.push(xe.audio),
            xe.video && Be.push(xe.video);
          for (var bt = (Be = b(Be)).next(); !bt.done; bt = Be.next())
            if ((bt = bt.value).keyId) {
              var dt = R[M ? "00" : bt.keyId];
              dt
                ? Ze.includes(dt) && (te.includes(dt) || te.push(dt))
                : J.includes(bt.keyId) || J.push(bt.keyId);
            }
          xe.allowedByApplication
            ? xe.allowedByKeySystem && (x = !0)
            : (z = !0);
        }
        if (!x)
          throw new re(2, 4, 4012, {
            hasAppRestrictions: z,
            missingKeys: J,
            restrictedKeyStatuses: te,
          });
      }
      function pn(m, _) {
        k(function R() {
          return $t(R, function (M) {
            switch (M.s) {
              case 1:
                return E(M, Promise.resolve(), 2);
              case 2:
                m.o != Cn && m.dispatchEvent(_), S(M);
            }
          });
        });
      }
      function Mn(m) {
        for (var _ = new Set(), R = (m = b(m)).next(); !R.done; R = m.next())
          (R = R.value).language ? _.add(Ia(R.language)) : _.add("und");
        return _;
      }
      function Zt(m) {
        for (var _ = new Map(), R = (m = b(m)).next(); !R.done; R = m.next()) {
          var M = R.value;
          R = "und";
          var x = [];
          for (
            M.language && (R = Ia(M.language)),
              ((x = M.type == "variant" ? M.audioRoles : M.roles) &&
                x.length) ||
                (x = [""]),
              _.has(R) || _.set(R, new Set()),
              x = (M = b(x)).next();
            !x.done;
            x = M.next()
          )
            (x = x.value), _.get(R).add(x);
        }
        var z = [];
        return (
          _.forEach(function (J, te) {
            for (var pe = b(J), xe = pe.next(); !xe.done; xe = pe.next())
              z.push({ language: te, role: xe.value });
          }),
          z
        );
      }
      function Fn(m) {
        return (m = Hn(m)) == null
          ? []
          : m.variants.filter(function (_) {
              return wi.Gb(_);
            });
      }
      function Hn(m) {
        for (
          var _ = m.A.l(), R = null, M = (m = b(m.i.periods)).next();
          !M.done;
          M = m.next()
        )
          (M = M.value).startTime <= _ && (R = M);
        return R;
      }
      function Sr(m) {
        var _ = Hn(m);
        return mn(m.Z, _).variant;
      }
      function fr() {
        return new re(2, 7, 7e3);
      }
      function Lr(m, _, R, M, x, z) {
        return M == m &&
          x.D == z.D &&
          x.uri == z.uri &&
          x.mimeType == z.mimeType &&
          x.Ia == z.Ia
          ? _
          : R;
      }
      function Jt(m) {
        return new Promise(function (_, R) {
          (m.kb = function () {
            return R(fr());
          }),
            (m.Cc = function () {
              return _();
            }),
            (m.onError = function (M) {
              return R(M);
            }),
            (m.Ec = function () {
              return R(fr());
            });
        });
      }
      (he.registerSupportPlugin = function (m, _) {
        nt[m] = _;
      }),
        (he.isBrowserSupported = function () {
          if (!(i.Promise && i.Uint8Array && Array.prototype.forEach))
            return !1;
          var m = j0();
          return (
            !(
              (m && 12 > m) ||
              !(
                i.MediaKeys &&
                i.navigator &&
                i.navigator.requestMediaKeySystemAccess &&
                i.MediaKeySystemAccess &&
                i.MediaKeySystemAccess.prototype.getConfiguration
              )
            ) &&
            (!!Xo() || Ns("application/x-mpegurl"))
          );
        }),
        (he.probeSupport = function () {
          return $d().then(function (m) {
            for (
              var _ = ia.ng(),
                R = {},
                M = b(
                  'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(
                    ","
                  )
                ),
                x = M.next();
              !x.done;
              x = M.next()
            ) {
              R[(x = x.value)] = Xo()
                ? !!hg(x) || MediaSource.isTypeSupported(x) || T(x)
                : Ns(x);
              var z = x.split(";")[0];
              R[z] = R[z] || R[x];
            }
            for (var J in ((m = { manifest: _, media: R, drm: m }), nt))
              m[J] = nt[J]();
            return m;
          });
        }),
        (he.prototype.Ub = function (m, _) {
          if (((_ = _ === void 0 || _), this.o == Cn))
            return Promise.reject(fr());
          var R = {
            Ia: null,
            D: null,
            mimeType: null,
            startTime: null,
            Rd: null,
            uri: null,
          };
          (R.D = m), Xo() || (_ = !1);
          var M = _ ? this.vb : this.da,
            x = _e(this.Ya, function () {
              return { node: M, payload: R, gb: !1 };
            });
          return (
            (x.Kb = function () {
              return B.info("Starting attach...");
            }),
            Jt(x)
          );
        }),
        (he.prototype.attach = he.prototype.Ub),
        (he.prototype.detach = function () {
          var m = this;
          if (this.o == Cn) return Promise.reject(fr());
          var _ = _e(this.Ya, function () {
            return {
              node: m.P,
              payload: {
                Ia: null,
                D: null,
                mimeType: null,
                startTime: null,
                Rd: null,
                uri: null,
              },
              gb: !1,
            };
          });
          return (
            (_.Kb = function () {
              return B.info("Starting detach...");
            }),
            Jt(_)
          );
        }),
        (he.prototype.detach = he.prototype.detach),
        (he.prototype.Ud = function (m) {
          var _ = this;
          if (((m = m === void 0 || m), this.o == Cn))
            return Promise.reject(fr());
          Xo() || (m = !1);
          var R = {
              Ia: null,
              D: null,
              mimeType: null,
              startTime: null,
              Rd: null,
              uri: null,
            },
            M = _e(this.Ya, function (x) {
              var z = x.D && m ? _.vb : x.D ? _.da : _.P;
              return (R.D = x.D), { node: z, payload: R, gb: !1 };
            });
          return (
            (M.Kb = function () {
              return B.info("Starting unload...");
            }),
            Jt(M)
          );
        }),
        (he.prototype.unload = he.prototype.Ud),
        (he.prototype.load = function (m, _, R) {
          if (this.o == Cn) return Promise.reject(fr());
          this.dispatchEvent(new Je("loading"));
          var M = {
            Ia: null,
            D: null,
            mimeType: null,
            startTime: null,
            Rd: null,
            uri: null,
          };
          (M.uri = m),
            (M.Rd = Date.now() / 1e3),
            R &&
              typeof R != "string" &&
              (ph(
                "Loading with a manifest parser factory",
                "Please register a manifest parser and for the mime-type."
              ),
              (M.Ia = function () {
                return new R();
              })),
            R && typeof R == "string" && (M.mimeType = R),
            _ !== void 0 && (M.startTime = _);
          var x = (function (J, te) {
              if (te.Ia) return !1;
              if (!Xo()) return !0;
              var pe = te.mimeType,
                xe = te.uri || "";
              return (
                pe ||
                  (pe = {
                    mp4: "video/mp4",
                    m4v: "video/mp4",
                    m4a: "audio/mp4",
                    webm: "video/webm",
                    weba: "audio/webm",
                    mkv: "video/webm",
                    ts: "video/mp2t",
                    ogv: "video/ogg",
                    ogg: "audio/ogg",
                    mpg: "video/mpeg",
                    mpeg: "video/mpeg",
                    m3u8: "application/x-mpegurl",
                    mp3: "audio/mpeg",
                    aac: "audio/aac",
                    flac: "audio/flac",
                    wav: "audio/wav",
                  }[ia.getExtension(xe)]),
                !!pe &&
                  (te.D || W0()).canPlayType(pe) != "" &&
                  (!ia.isSupported(xe, pe) ||
                    (zh() && J.h.streaming.useNativeHlsOnSafari))
              );
            })(this, M)
              ? this.xb
              : this.ea,
            z = _e(this.Ya, function (J) {
              return J.D == null
                ? null
                : ((M.D = J.D), { node: x, payload: M, gb: !0 });
            });
          return (
            (z.Kb = function () {
              return B.info("Starting load of " + m + "...");
            }),
            new Promise(function (J, te) {
              (z.Ec = function () {
                return te(new re(2, 7, 7002));
              }),
                (z.Cc = function () {
                  return J();
                }),
                (z.kb = function () {
                  return te(fr());
                }),
                (z.onError = function (pe) {
                  return te(pe);
                });
            })
          );
        }),
        (he.prototype.load = he.prototype.load),
        (he.prototype.configure = function (m, _) {
          arguments.length == 2 && typeof m == "string" && (m = Oe(m, _));
          var R = Fe(this.h, m, Ie(this));
          return it(this), R;
        }),
        (he.prototype.configure = he.prototype.configure),
        (he.prototype.getConfiguration = function () {
          var m = Ie(this);
          return Fe(m, this.h, Ie(this)), m;
        }),
        (he.prototype.getConfiguration = he.prototype.getConfiguration),
        (he.prototype.vg = function () {
          for (var m in this.h) delete this.h[m];
          Fe(this.h, Ie(this), Ie(this)), it(this);
        }),
        (he.prototype.resetConfiguration = he.prototype.vg),
        (he.prototype.tf = function () {
          return this.o;
        }),
        (he.prototype.getLoadMode = he.prototype.tf),
        (he.prototype.yf = function () {
          return this.g;
        }),
        (he.prototype.getMediaElement = he.prototype.yf),
        (he.prototype.Yb = function () {
          return this.X;
        }),
        (he.prototype.getNetworkingEngine = he.prototype.Yb),
        (he.prototype.tc = function () {
          return this.Tb;
        }),
        (he.prototype.getAssetUri = he.prototype.tc),
        (he.prototype.wf = function () {
          return (
            ph("getManifestUri", 'Please use "getAssetUri" instead.'), this.tc()
          );
        }),
        (he.prototype.getManifestUri = he.prototype.wf),
        (he.prototype.aa = function () {
          return this.i
            ? this.i.presentationTimeline.aa()
            : !(!this.g || !this.g.src) && 1 / 0 == this.g.duration;
        }),
        (he.prototype.isLive = he.prototype.aa),
        (he.prototype.ib = function () {
          return !!this.i && this.i.presentationTimeline.ib();
        }),
        (he.prototype.isInProgress = he.prototype.ib),
        (he.prototype.Qf = function () {
          if (this.i) {
            if (!this.i.periods.length) return !1;
            var m = this.i.periods[0].variants;
            return !!m.length && !m[0].video;
          }
          return (
            !(!this.g || !this.g.src) &&
            (this.g.videoTracks
              ? this.g.videoTracks.length == 0
              : this.g.videoHeight == 0)
          );
        }),
        (he.prototype.isAudioOnly = he.prototype.Qf),
        (he.prototype.He = function () {
          if (this.i) {
            var m = this.i.presentationTimeline;
            return { start: m.Cb(), end: m.Ka() };
          }
          return this.g && this.g.src && (m = this.g.seekable).length
            ? { start: m.start(0), end: m.end(m.length - 1) }
            : { start: 0, end: 0 };
        }),
        (he.prototype.seekRange = he.prototype.He),
        (he.prototype.keySystem = function () {
          return ud(this.drmInfo());
        }),
        (he.prototype.keySystem = he.prototype.keySystem),
        (he.prototype.drmInfo = function () {
          return this.m ? this.m.g : null;
        }),
        (he.prototype.drmInfo = he.prototype.drmInfo),
        (he.prototype.Xb = function () {
          return this.m ? this.m.Xb() : 1 / 0;
        }),
        (he.prototype.getExpiration = he.prototype.Xb),
        (he.prototype.jd = function () {
          return !!this.L && this.L.g == Do;
        }),
        (he.prototype.isBuffering = he.prototype.jd),
        (he.prototype.Cf = function () {
          if (this.J) {
            var m = this.J;
            m = m.j ? 0 : m.i;
          } else m = 0;
          return m;
        }),
        (he.prototype.getPlaybackRate = he.prototype.Cf),
        (he.prototype.Mg = function (m) {
          m == 0
            ? B.ba("A trick play rate of 0 is unsupported!")
            : (this.g.paused && this.g.play(),
              this.J && this.J.set(m),
              this.o == Er && nG(this.j, 1 < Math.abs(m)));
        }),
        (he.prototype.trickPlay = he.prototype.Mg),
        (he.prototype.$e = function () {
          var m = this.J.vc();
          this.o == gn && this.J.set(m),
            this.o == Er && (this.J.set(m), nG(this.j, !1));
        }),
        (he.prototype.cancelTrickPlay = he.prototype.$e),
        (he.prototype.ed = function () {
          if (this.i && this.A) {
            for (
              var m = Sr(this), _ = [], R = b(Fn(this)), M = R.next();
              !M.done;
              M = R.next()
            ) {
              M = M.value;
              var x = wi.Oc(M);
              (x.active = M == m), _.push(x);
            }
            return _;
          }
          return this.g && this.g.audioTracks
            ? Array.from(this.g.audioTracks).map(function (z) {
                return wi.je(z);
              })
            : [];
        }),
        (he.prototype.getVariantTracks = he.prototype.ed),
        (he.prototype.Eb = function () {
          if (this.i && this.A) {
            for (
              var m = (function (z) {
                  var J = Hn(z);
                  if (J == null) return null;
                  if (!mn(z.Z, J).text) {
                    var te = wi.Wb(J.textStreams, z.ua, z.Xa);
                    te.length && Bt(z.Z, J, te[0]);
                  }
                  return mn(z.Z, J).text;
                })(this),
                _ = [],
                R = b(
                  (function (z) {
                    var J = Hn(z);
                    return J == null
                      ? []
                      : J.textStreams.filter(function (te) {
                          return !z.lc.has(te);
                        });
                  })(this)
                ),
                M = R.next();
              !M.done;
              M = R.next()
            ) {
              M = M.value;
              var x = wi.Kc(M);
              (x.active = M == m), _.push(x);
            }
            return _;
          }
          return this.g && this.g.src && this.g.textTracks
            ? Qe(this).map(function (z) {
                return wi.Of(z);
              })
            : [];
        }),
        (he.prototype.getTextTracks = he.prototype.Eb),
        (he.prototype.Ld = function (m) {
          if (this.i && this.j) {
            var _ = Hn(this),
              R = _.textStreams.find(function (M) {
                return M.id == m.id;
              });
            R
              ? (Ke(this, _, R, !1), ft(this, R), (this.ua = R.language))
              : B.error("No stream with id", m.id);
          } else if (this.g && this.g.src && this.g.textTracks) {
            for (R = (_ = b((_ = Qe(this)))).next(); !R.done; R = _.next())
              (R = R.value),
                wi.gd(R) == m.id
                  ? (R.mode = this.ub ? "showing" : "hidden")
                  : (R.mode = "disabled");
            Rn(this);
          }
        }),
        (he.prototype.selectTextTrack = he.prototype.Ld),
        (he.prototype.xg = function () {
          ph(
            "selectEmbeddedTextTrack",
            "If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack."
          );
          var m = this.Eb().filter(function (_) {
            return _.mimeType == "application/cea-608";
          });
          0 < m.length
            ? this.Ld(m[0])
            : B.v("Unable to find the text track embedded in the video.");
        }),
        (he.prototype.selectEmbeddedTextTrack = he.prototype.xg),
        (he.prototype.Rg = function () {
          ph(
            "usingEmbeddedTextTrack",
            "If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text."
          );
          var m = this.Eb().filter(function (_) {
            return _.active;
          })[0];
          return !!m && m.mimeType == "application/cea-608";
        }),
        (he.prototype.usingEmbeddedTextTrack = he.prototype.Rg),
        (he.prototype.Ie = function (m, _, R) {
          if (((R = R === void 0 ? 0 : R), this.i && this.j)) {
            var M = Hn(this);
            this.h.abr.enabled &&
              B.ba(
                "Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack()."
              );
            var x = M.variants.find(function (z) {
              return z.id == m.id;
            });
            x
              ? wi.Gb(x)
                ? (We(this, M, x, !1),
                  at(this, x, _, R),
                  (this.tb = new ta(x)),
                  fn(this, M.variants))
                : B.error("Unable to switch to restricted track", m.id)
              : B.error("No variant with id", m.id);
          } else if (this.g && this.g.audioTracks) {
            for (
              R = (_ = b((_ = Array.from(this.g.audioTracks)))).next();
              !R.done;
              R = _.next()
            )
              (R = R.value), wi.gd(R) == m.id && (R.enabled = !0);
            pi(this);
          }
        }),
        (he.prototype.selectVariantTrack = he.prototype.Ie),
        (he.prototype.nf = function () {
          return Zt(this.ed());
        }),
        (he.prototype.getAudioLanguagesAndRoles = he.prototype.nf),
        (he.prototype.Jf = function () {
          return Zt(this.Eb());
        }),
        (he.prototype.getTextLanguagesAndRoles = he.prototype.Jf),
        (he.prototype.mf = function () {
          return Array.from(Mn(this.ed()));
        }),
        (he.prototype.getAudioLanguages = he.prototype.mf),
        (he.prototype.If = function () {
          return Array.from(Mn(this.Eb()));
        }),
        (he.prototype.getTextLanguages = he.prototype.If),
        (he.prototype.Jd = function (m, _) {
          if (this.i && this.A) {
            var R = Hn(this);
            if (((this.tb = new Ji(m, _ || "", 0, "")), !this.h.abr.enabled)) {
              var M = function (pe, xe) {
                  return pe.video || xe.video
                    ? pe.video && xe.video
                      ? Math.abs(
                          (pe.video.height || 0) - (xe.video.height || 0)
                        ) +
                        Math.abs((pe.video.width || 0) - (xe.video.width || 0))
                      : 1 / 0
                    : 0;
                },
                x = Hn(this) || this.i.periods[0],
                z = mn(this.Z, x).variant,
                J = this.tb.create(x.variants);
              x = null;
              for (var te = (J = b(J.values())).next(); !te.done; te = J.next())
                (te = te.value), (!x || M(x, z) > M(te, z)) && (x = te);
              if (x) return (R = wi.Oc(x)), void this.Ie(R, !0);
            }
            Bn(this, R);
          } else if (this.g && this.g.audioTracks) {
            for (
              x = Array.from(this.g.audioTracks),
                R = Ia(m),
                z = M = null,
                J = (x = b(x)).next();
              !J.done;
              J = x.next()
            )
              (J = J.value),
                Ia((te = wi.je(J)).language) == R &&
                  ((M = J),
                  _
                    ? te.roles.includes(_) && (z = J)
                    : te.roles.length == 0 && (z = J));
            z
              ? ((z.enabled = !0), pi(this))
              : M && ((M.enabled = !0), pi(this));
          }
        }),
        (he.prototype.selectAudioLanguage = he.prototype.Jd),
        (he.prototype.Kd = function (m, _) {
          if (this.i && this.A) {
            var R = Hn(this);
            (this.ua = m), (this.Xa = _ || "");
            var M = wi.Wb(R.textStreams, this.ua, this.Xa)[0] || null;
            M &&
              (Ke(this, R, M, !1),
              (this.h.streaming.alwaysStreamText || this.zc()) && ft(this, M));
          } else {
            var x = Ia(m);
            (R = this.Eb().filter(function (z) {
              return Ia(z.language) == x && (!_ || z.roles.includes(_));
            })[0]) && this.Ld(R);
          }
        }),
        (he.prototype.selectTextLanguage = he.prototype.Kd),
        (he.prototype.yg = function (m) {
          if (this.i && this.A) {
            for (
              var _ = Hn(this), R = null, M = b(Fn(this)), x = M.next();
              !x.done;
              x = M.next()
            )
              if ((x = x.value).audio.label == m) {
                R = x;
                break;
              }
            R == null
              ? B.v(
                  "No variants were found with label: " +
                    m +
                    ". Ignoring the request to switch."
                )
              : ((this.tb = new Ji(R.language, "", 0, m)), Bn(this, _));
          }
        }),
        (he.prototype.selectVariantsByLabel = he.prototype.yg),
        (he.prototype.zc = function () {
          var m = this.ub;
          return this.M
            ? this.M.l.isTextVisible()
            : this.g && this.g.src && this.g.textTracks
            ? Qe(this).some(function (_) {
                return _.mode == "showing";
              })
            : m;
        }),
        (he.prototype.isTextTrackVisible = he.prototype.zc),
        (he.prototype.Bg = function (m) {
          var _ = this;
          return k(function R() {
            var M, x, z, J;
            return $t(R, function (te) {
              switch (te.s) {
                case 1:
                  if (_.ub == (M = !!m)) return te.return();
                  if (((_.ub = M), _.o != Er)) {
                    if (_.g && _.g.src && _.g.textTracks)
                      for (
                        var pe = b(Qe(_)), xe = pe.next();
                        !xe.done;
                        xe = pe.next()
                      )
                        (x = xe.value).mode != "disabled" &&
                          (x.mode = M ? "showing" : "hidden");
                    te.I(2);
                    break;
                  }
                  if (
                    (_.M.l.setTextVisibility(M), _.h.streaming.alwaysStreamText)
                  ) {
                    te.I(2);
                    break;
                  }
                  if (!M) {
                    (function (Be) {
                      Be.L = !0;
                      var bt = Be.h.get("text");
                      bt &&
                        (cA(bt),
                        sG(bt).catch(function () {}),
                        Be.h.delete("text"));
                    })(_.j),
                      te.I(2);
                    break;
                  }
                  if (sA(_.j, "text")) {
                    te.I(2);
                    break;
                  }
                  if (
                    ((z = Hn(_)),
                    !(0 < (J = wi.Wb(z.textStreams, _.ua, _.Xa)).length))
                  ) {
                    te.I(2);
                    break;
                  }
                  return E(te, PP(_.j, J[0]), 2);
                case 2:
                  $r(_), S(te);
              }
            });
          });
        }),
        (he.prototype.setTextTrackVisibility = he.prototype.Bg),
        (he.prototype.Ef = function () {
          if (!this.aa())
            return B.v("getPlayheadTimeAsDate is for live streams!"), null;
          var m = this.Ya.j,
            _ = 0;
          if (this.A) _ = this.A.l();
          else if (m) {
            if (m.startTime == null) return new Date();
            _ = m.startTime;
          }
          return this.i
            ? new Date(
                1e3 * (this.i.presentationTimeline.j + this.g.currentTime)
              )
            : this.g && this.g.getStartDate
            ? ((m = this.g.getStartDate()),
              isNaN(m.getTime())
                ? (B.v(
                    "EXT-X-PROGRAM-DATETIME required to get playhead time as Date!"
                  ),
                  null)
                : new Date(m.getTime() + 1e3 * _))
            : (B.v("No way to get playhead time as Date!"), null);
        }),
        (he.prototype.getPlayheadTimeAsDate = he.prototype.Ef),
        (he.prototype.Gf = function () {
          if (!this.aa())
            return (
              B.v("getPresentationStartTimeAsDate is for live streams!"), null
            );
          if (this.i) return new Date(1e3 * this.i.presentationTimeline.j);
          if (this.g && this.g.getStartDate) {
            var m = this.g.getStartDate();
            return isNaN(m.getTime())
              ? (B.v(
                  "EXT-X-PROGRAM-DATETIME required to get presentation start time as Date!"
                ),
                null)
              : m;
          }
          return B.v("No way to get presentation start time as Date!"), null;
        }),
        (he.prototype.getPresentationStartTimeAsDate = he.prototype.Gf),
        (he.prototype.bd = function () {
          var m = { total: [], audio: [], video: [], text: [] };
          return (
            this.o == gn && (m.total = xm(this.g.buffered)),
            this.o == Er && this.M.bd(m),
            m
          );
        }),
        (he.prototype.getBufferedInfo = he.prototype.bd),
        (he.prototype.getStats = function () {
          if (this.o != Er && this.o != gn)
            return {
              width: NaN,
              height: NaN,
              streamBandwidth: NaN,
              decodedFrames: NaN,
              droppedFrames: NaN,
              corruptedFrames: NaN,
              estimatedBandwidth: NaN,
              loadLatency: NaN,
              playTime: NaN,
              pauseTime: NaN,
              bufferingTime: NaN,
              licenseTime: NaN,
              switchHistory: [],
              stateHistory: [],
            };
          tn(this);
          var m = this.g;
          if (m.getVideoPlaybackQuality) {
            m = m.getVideoPlaybackQuality();
            var _ = this.F,
              R = Number(m.totalVideoFrames);
            (_.A = Number(m.droppedVideoFrames)),
              (_.u = R),
              (this.F.o = Number(m.corruptedVideoFrames));
          }
          this.m ? (m = (m = this.m).P ? m.P : NaN) : (m = NaN),
            (this.F.m = m),
            this.o == Er &&
              ((m = Sr(this)) && (this.F.C = m.bandwidth),
              m &&
                m.video &&
                ((_ = this.F),
                (R = m.video.height || NaN),
                (_.F = m.video.width || NaN),
                (_.l = R)),
              (m = this.u.getBandwidthEstimate()),
              (this.F.j = m));
          var M = this.F;
          (m = M.F), (_ = M.l), (R = M.C);
          for (
            var x = M.u,
              z = M.A,
              J = M.o,
              te = M.j,
              pe = M.h,
              xe = be(M.g, "playing"),
              Be = be(M.g, "paused"),
              bt = be(M.g, "buffering"),
              dt = M.m,
              mt = (function (en) {
                function Tn(mr) {
                  return {
                    timestamp: mr.timestamp,
                    state: mr.state,
                    duration: mr.duration,
                  };
                }
                for (
                  var In = [], Qn = b(en.h), vr = Qn.next();
                  !vr.done;
                  vr = Qn.next()
                )
                  In.push(Tn(vr.value));
                return en.g && In.push(Tn(en.g)), In;
              })(M.g),
              xt = [],
              Nt = (M = b(M.i.g)).next();
            !Nt.done;
            Nt = M.next()
          )
            (Nt = Nt.value),
              xt.push({
                timestamp: Nt.timestamp,
                id: Nt.id,
                type: Nt.type,
                fromAdaptation: Nt.fromAdaptation,
                bandwidth: Nt.bandwidth,
              });
          return {
            width: m,
            height: _,
            streamBandwidth: R,
            decodedFrames: x,
            droppedFrames: z,
            corruptedFrames: J,
            estimatedBandwidth: te,
            loadLatency: pe,
            playTime: xe,
            pauseTime: Be,
            bufferingTime: bt,
            licenseTime: dt,
            stateHistory: mt,
            switchHistory: xt,
          };
        }),
        (he.prototype.getStats = he.prototype.getStats),
        (he.prototype.addTextTrack = function (m, _, R, M, x, z) {
          var J = this;
          return k(function te() {
            var pe, xe, Be, bt, dt, mt, xt, Nt, en;
            return $t(te, function (Tn) {
              switch (Tn.s) {
                case 1:
                  if (J.o == gn)
                    throw (
                      (B.error("Cannot add text when loaded with src="),
                      Error("State error!"))
                    );
                  if (J.o != Er)
                    throw (
                      (B.error(
                        "Must call load() and wait for it to resolve before adding text tracks."
                      ),
                      Error("State error!"))
                    );
                  if (
                    ((pe = Hn(J)),
                    (xe = Mt),
                    (Be = J.i.periods.indexOf(pe)),
                    (dt =
                      (bt = Be + 1) >= J.i.periods.length
                        ? J.i.presentationTimeline.ha()
                        : J.i.periods[bt].startTime),
                    1 / 0 == (mt = dt - pe.startTime))
                  )
                    throw new re(1, 4, 4033);
                  return (
                    (xt = new Io(
                      1,
                      0,
                      mt,
                      function () {
                        return [m];
                      },
                      0,
                      null
                    )),
                    (Nt = {
                      id: J.re++,
                      originalId: null,
                      createSegmentIndex: Promise.resolve.bind(Promise),
                      findSegmentPosition: function () {
                        return 1;
                      },
                      getSegmentReference: function (In) {
                        return In == 1 ? xt : null;
                      },
                      initSegmentReference: null,
                      presentationTimeOffset: 0,
                      mimeType: M,
                      codecs: x || "",
                      kind: R,
                      encrypted: !1,
                      keyId: null,
                      language: _,
                      label: z || null,
                      type: xe.za,
                      primary: !1,
                      frameRate: void 0,
                      pixelAspectRatio: void 0,
                      trickModeVideo: null,
                      emsgSchemeIdUris: null,
                      roles: [],
                      channelsCount: null,
                      audioSamplingRate: null,
                      closedCaptions: null,
                    }),
                    J.lc.add(Nt),
                    pe.textStreams.push(Nt),
                    E(Tn, PP(J.j, Nt), 2)
                  );
                case 2:
                  return (
                    (en = sA(J.j, "text")) && Bt(J.Z, pe, en),
                    J.lc.delete(Nt),
                    B.debug("Choosing new streams after adding a text stream"),
                    nr(J, pe),
                    hr(J),
                    Tn.return(wi.Kc(Nt))
                  );
              }
            });
          });
        }),
        (he.prototype.addTextTrack = he.prototype.addTextTrack),
        (he.prototype.Nd = function (m, _) {
          (this.mc.width = m), (this.mc.height = _);
        }),
        (he.prototype.setMaxHardwareResolution = he.prototype.Nd),
        (he.prototype.Id = function () {
          if (this.o == Er) {
            var m = this.j;
            if (m.j)
              B.error("Unable to retry after StreamingEngine is destroyed!"),
                (m = !1);
            else if (m.A)
              B.error(
                "Unable to retry after StreamingEngine encountered a fatal error!"
              ),
                (m = !1);
            else {
              for (
                var _ = b(m.h.values()), R = _.next();
                !R.done;
                R = _.next()
              ) {
                var M = rc((R = R.value));
                R.ac &&
                  (B.info(M, "Retrying after failure..."),
                  (R.ac = !1),
                  tf(m, R, 0.1));
              }
              m = !0;
            }
          } else m = !1;
          return m;
        }),
        (he.prototype.retryStreaming = he.prototype.Id),
        (he.prototype.uf = function () {
          return this.i;
        }),
        (he.prototype.getManifest = he.prototype.uf),
        (he.prototype.vf = function () {
          return this.C ? this.C.constructor : null;
        }),
        (he.prototype.getManifestParserFactory = he.prototype.vf),
        ((u = he.prototype).Xc = function (m) {
          var _ = this.j ? f2(this.j) : null,
            R = this.j ? w_(this.j) : null;
          if (
            (wi.filterNewPeriod(this.m, _, R, m), !(_ = m.variants).some(wi.Gb))
          )
            throw new re(2, 4, 4011);
          if (
            (An(this, m.variants),
            wi.Xd(_, this.h.restrictions, this.mc) &&
              this.j &&
              Hn(this) == m &&
              hr(this),
            (m = this.m ? this.m.g : null) && this.m.o)
          ) {
            for (R = (_ = b(_)).next(); !R.done; R = _.next())
              for (
                var M = (R = b(R.value.drmInfos)).next();
                !M.done;
                M = R.next()
              )
                if ((M = M.value).keySystem == m.keySystem)
                  for (
                    var x = (M = b(M.initData || [])).next();
                    !x.done;
                    x = M.next()
                  )
                    (x = x.value), Ks(this.m, x.initDataType, x.initData);
          }
        }),
        (u.Vf = function (m) {
          B.debug("onChooseStreams_", m);
          try {
            B.O("onChooseStreams_, choosing variant from ", m.variants),
              B.O("onChooseStreams_, choosing text from ", m.textStreams),
              (this.yb = !0),
              this.u.disable(),
              ni(this),
              B.debug("Choosing new streams after period changed");
            var _ = fn(this, m.variants),
              R = wi.Wb(m.textStreams, this.ua, this.Xa)[0] || null;
            this.wa &&
              (m.variants.includes(this.wa) && (_ = this.wa), (this.wa = null)),
              this.va &&
                (m.textStreams.includes(this.va) && (R = this.va),
                (this.va = null)),
              _ && We(this, m, _, !0),
              R && Ke(this, m, R, !0);
            var M = this.j,
              x = M.h.get("video");
            if (x) var z = M.i.periods[x.oa];
            else {
              var J = M.h.get("audio");
              z = J ? M.i.periods[J.oa] : null;
            }
            var te = _ ? _.audio : null;
            if (!z && R) {
              var pe;
              if ((pe = te)) {
                m = R;
                var xe = Ia(this.h.preferredTextLanguage),
                  Be = Ia(te.language),
                  bt = Ia(m.language);
                pe = Uv(bt, xe) && !Uv(Be, bt);
              }
              pe && (this.ub = !0),
                this.ub && this.M.l.setTextVisibility(!0),
                $r(this);
            }
            var dt =
              this.h.streaming.alwaysStreamText || this.zc()
                ? { variant: _, text: R }
                : { variant: _, text: null };
            return (
              B.O("onChooseStreams_, chose variant ", dt.variant),
              B.O("onChooseStreams_, chose text ", dt.text),
              dt
            );
          } catch (mt) {
            return this.Va(mt), { variant: null, text: null };
          }
        }),
        (u.Ze = function () {
          B.debug("canSwitch_"),
            (this.yb = !1),
            this.h.abr.enabled && (this.u.enable(), ni(this)),
            this.wa &&
              (lA(this.j, this.wa, this.qe, this.oe),
              pi(this),
              (this.wa = null)),
            this.va &&
              (ay(this.j, this.va, !0, 0, !1), Rn(this), (this.va = null));
        }),
        (u.$f = function () {
          this.C && this.C.update && this.C.update();
        }),
        (u.eg = function () {
          this.A && this.A.C();
        }),
        (u.Va = function (m) {
          if (this.o != Cn) {
            var _ = new Je("error", { detail: m });
            this.dispatchEvent(_), _.defaultPrevented && (m.handled = !0);
          }
        });
      var Cn = 0,
        rr = 1,
        Er = 2,
        gn = 3;
      function ct(m, _) {
        var R = K(new U(m.Ea(), m.ja()), _.periods[0], new Vr(null, 0)),
          M = _.appMetadata || {};
        return (
          (R = Vt(R)),
          {
            offlineUri: m.toString(),
            originalManifestUri: _.originalManifestUri,
            duration: _.duration,
            size: _.size,
            expiration: _.expiration,
            tracks: R,
            appMetadata: M,
          }
        );
      }
      function Vt(m) {
        for (
          var _ = [], R = wi.Bf(m.variants), M = (R = b(R)).next();
          !M.done;
          M = R.next()
        )
          _.push(wi.Oc(M.value));
        for (R = (m = b(m.textStreams)).next(); !R.done; R = m.next())
          _.push(wi.Kc(R.value));
        return _;
      }
      function kn() {
        this.g = {};
      }
      function zt(m, _) {
        var R = _.audio,
          M = _.video;
        if (
          (R && !M && (m.g[R.id] = R.bandwidth || _.bandwidth),
          !R && M && (m.g[M.id] = M.bandwidth || _.bandwidth),
          R && M)
        ) {
          var x = R.bandwidth || 393216,
            z = M.bandwidth || _.bandwidth - x;
          0 >= z &&
            (B.v(
              "Audio bit rate consumes variants bandwidth. Setting video bandwidth to match variant's bandwidth."
            ),
            (z = _.bandwidth)),
            (m.g[R.id] = x),
            (m.g[M.id] = z);
        }
      }
      function zn(m, _) {
        var R = m.g[_];
        return (
          R == null &&
            ((R = 0),
            B.error("Asking for bitrate of stream not given to the estimator")),
          R == 0 &&
            B.v("Using bitrate of 0, this stream won't affect progress"),
          R
        );
      }
      function Rr(m) {
        (this.g = !1), (this.h = new Ft()), (this.i = m);
      }
      function vi(m) {
        var _ = new Ri();
        m.periods.forEach(function (M, x) {
          var z = Fs(M.variants);
          if (x == 0)
            for (var J = (z = b(z.g)).next(); !J.done; J = z.next())
              _.add(J.value);
          else
            (function (te, pe) {
              te.g = te.g.filter(function (xe) {
                return Da(pe, xe);
              });
            })(_, z);
        });
        for (var R = (m = b(m.periods)).next(); !R.done; R = m.next())
          (R = R.value).variants = R.variants.filter(function (M) {
            return Da(_, new na(M));
          });
      }
      function na(m) {
        var _ = m.audio;
        (m = m.video),
          (this.h = _ ? _.mimeType : null),
          (this.g = _ ? _.codecs.split(".")[0] : null),
          (this.j = m ? m.mimeType : null),
          (this.i = m ? m.codecs.split(".")[0] : null);
      }
      function Ri() {
        this.g = [];
      }
      function Da(m, _) {
        return m.g.some(function (R) {
          return _.h == R.h && _.g == R.g && _.j == R.j && _.i == R.i;
        });
      }
      function Fs(m) {
        for (var _ = new Ri(), R = (m = b(m)).next(); !R.done; R = m.next())
          _.add(new na(R.value));
        return _;
      }
      function ya(m) {
        var _ = this;
        if (m && m.constructor != he) throw new re(2, 9, 9008);
        (this.h = this.g = null),
          m
            ? ((this.g = m.h), (this.h = m.Yb()))
            : ((this.g = $e()), (this.h = new Ot())),
          (this.j = !1),
          (this.i = []),
          (this.l = []);
        var R = !m;
        this.m = new Rr(function () {
          return k(function M() {
            var x;
            return $t(M, function (z) {
              switch (z.s) {
                case 1:
                  return (
                    (x = function () {}),
                    E(
                      z,
                      Promise.all(
                        _.l.map(function (J) {
                          return J.then(x, x);
                        })
                      ),
                      2
                    )
                  );
                case 2:
                  if (!R) {
                    z.I(3);
                    break;
                  }
                  return E(z, _.h.destroy(), 3);
                case 3:
                  (_.g = null), (_.h = null), S(z);
              }
            });
          });
        });
      }
      function Hc() {
        if (Xo())
          e: {
            for (var m = b(P_.values()), _ = m.next(); !_.done; _ = m.next())
              if ((_ = (_ = _.value)())) {
                _.destroy(), (m = !0);
                break e;
              }
            m = !1;
          }
        else m = !1;
        return m;
      }
      function fd(m, _) {
        for (var R = [], M = b(m.periods), x = M.next(); !x.done; x = M.next())
          for (var z = (x = b(x.value.streams)).next(); !z.done; z = x.next())
            (z = z.value),
              _ && z.contentType == "video"
                ? R.push({
                    contentType: Aa(z.mimeType, z.codecs),
                    robustness: m.drmInfo.videoRobustness,
                  })
                : _ ||
                  z.contentType != "audio" ||
                  R.push({
                    contentType: Aa(z.mimeType, z.codecs),
                    robustness: m.drmInfo.audioRobustness,
                  });
        return R;
      }
      function pd(m, _, R) {
        return k(function M() {
          return $t(M, function (x) {
            if (x.s === 1)
              return E(
                x,
                (function (z, J, te, pe) {
                  return k(function xe() {
                    var Be, bt, dt;
                    return $t(xe, function (mt) {
                      switch (mt.s) {
                        case 1:
                          return pe.drmInfo
                            ? ((Be = (function (xt) {
                                var Nt = Array.from(xt.g.keys());
                                if (!Nt.length)
                                  throw new re(
                                    2,
                                    9,
                                    9e3,
                                    "No supported storage mechanisms found"
                                  );
                                return xt.g.get(Nt[0]).getEmeSessionCell();
                              })(te)),
                              (bt = pe.sessionIds.map(function (xt) {
                                return {
                                  sessionId: xt,
                                  keySystem: pe.drmInfo.keySystem,
                                  licenseUri: pe.drmInfo.licenseServerUri,
                                  serverCertificate:
                                    pe.drmInfo.serverCertificate,
                                  audioCapabilities: fd(pe, !1),
                                  videoCapabilities: fd(pe, !0),
                                };
                              })),
                              E(mt, ve(J, z, bt), 2))
                            : mt.return();
                        case 2:
                          return (dt = mt.B), E(mt, Be.remove(dt), 3);
                        case 3:
                          return E(
                            mt,
                            Be.add(
                              bt.filter(function (xt) {
                                return dt.indexOf(xt.sessionId) == -1;
                              })
                            ),
                            0
                          );
                      }
                    });
                  });
                })(m.h, m.g.drm, R, _),
                0
              );
          });
        });
      }
      function M_(m, _, R, M) {
        function x() {
          (te += 1), m.g.offline.progressCallback(pe, te / J);
        }
        var z = (function (xe) {
            var Be = [];
            return (
              xe.periods.forEach(function (bt) {
                bt.streams.forEach(function (dt) {
                  dt.initSegmentKey != null && Be.push(dt.initSegmentKey),
                    dt.segments.forEach(function (mt) {
                      Be.push(mt.dataKey);
                    });
                });
              }),
              Be
            );
          })(M),
          J = z.length + 1,
          te = 0,
          pe = ct(R, M);
        return Promise.all([
          _.removeSegments(z, x),
          _.removeManifests([R.key()], x),
        ]);
      }
      function dp(m, _, R, M, x, z) {
        var J = {
          id: z.id,
          originalId: z.originalId,
          primary: z.primary,
          presentationTimeOffset: z.presentationTimeOffset || 0,
          contentType: z.type,
          mimeType: z.mimeType,
          codecs: z.codecs,
          frameRate: z.frameRate,
          pixelAspectRatio: z.pixelAspectRatio,
          kind: z.kind,
          language: z.language,
          label: z.label,
          width: z.width || null,
          height: z.height || null,
          initSegmentKey: null,
          encrypted: z.encrypted,
          keyId: z.keyId,
          segments: [],
          variantIds: [],
        };
        x = x.presentationTimeline.$b();
        var te = z.id,
          pe = z.initSegmentReference;
        return (
          pe &&
            ((pe = Qh(pe.i(), pe.h, pe.g, m.g.streaming.retryParameters)),
            OP(_, te, pe, 0.5 * zn(M, z.id), !0, function (xe) {
              return k(function Be() {
                var bt;
                return $t(Be, function (dt) {
                  switch (dt.s) {
                    case 1:
                      return E(dt, R.addSegments([{ data: xe }]), 2);
                    case 2:
                      (bt = dt.B),
                        m.i.push(bt[0]),
                        (J.initSegmentKey = bt[0]),
                        S(dt);
                  }
                });
              });
            })),
          (function (xe, Be, bt) {
            for (
              var dt =
                (Be = xe.findSegmentPosition(Be)) == null
                  ? null
                  : xe.getSegmentReference(Be);
              dt;

            )
              bt(dt), (dt = xe.getSegmentReference(++Be));
          })(z, x, function (xe) {
            var Be = Qh(xe.i(), xe.h, xe.g, m.g.streaming.retryParameters);
            OP(
              _,
              te,
              Be,
              (function (bt, dt, mt) {
                return (mt = mt.endTime - mt.startTime), zn(bt, dt) * mt;
              })(M, z.id, xe),
              !1,
              function (bt) {
                return k(function dt() {
                  var mt;
                  return $t(dt, function (xt) {
                    switch (xt.s) {
                      case 1:
                        return E(xt, R.addSegments([{ data: bt }]), 2);
                      case 2:
                        (mt = xt.B),
                          m.i.push(mt[0]),
                          J.segments.push({
                            startTime: xe.startTime,
                            endTime: xe.endTime,
                            dataKey: mt[0],
                          }),
                          S(xt);
                    }
                  });
                });
              }
            );
          }),
          J
        );
      }
      function ic(m) {
        if (m.m.g) throw new re(2, 9, 7001);
      }
      function Xc() {
        if (!Hc()) throw new re(2, 9, 9e3);
      }
      function Ud(m, _) {
        return k(function R() {
          return $t(R, function (M) {
            switch (M.s) {
              case 1:
                return m.l.push(_), W(M, 2), E(M, _, 4);
              case 4:
                return M.return(M.B);
              case 2:
                De(M), Pn(m.l, _), Xe(M, 0);
            }
          });
        });
      }
      function ly(m) {
        var _ = new Set(
            m.variants.map(function (J) {
              return J.video;
            })
          ),
          R = new Set(
            m.variants.map(function (J) {
              return J.audio;
            })
          );
        (m = m.textStreams),
          1 < _.size && B.v("Multiple video tracks selected to be stored");
        for (var M = (_ = b(R)).next(); !M.done; M = _.next()) {
          M = M.value;
          for (var x = b(R), z = x.next(); !z.done; z = x.next())
            M != (z = z.value) &&
              M.language == z.language &&
              B.v(
                "Similar audio tracks were selected to be stored",
                M.id,
                z.id
              );
        }
        for (_ = (R = b(m)).next(); !_.done; _ = R.next())
          for (_ = _.value, x = (M = b(m)).next(); !x.done; x = M.next())
            _ != (x = x.value) &&
              _.language == x.language &&
              B.v("Similar text tracks were selected to be stored", _.id, x.id);
      }
      (he.LoadMode = {
        DESTROYED: Cn,
        NOT_LOADED: rr,
        MEDIA_SOURCE: Er,
        SRC_EQUALS: gn,
      }),
        (Rr.prototype.destroy = function () {
          var m = this;
          return this.g
            ? this.h
            : ((this.g = !0),
              this.i().then(
                function () {
                  m.h.resolve();
                },
                function () {
                  m.h.resolve();
                }
              ));
        }),
        (Ri.prototype.add = function (m) {
          Da(this, m) || this.g.push(m);
        }),
        Z("shaka.offline.Storage", ya),
        (ya.support = Hc),
        (ya.prototype.destroy = function () {
          return this.m.destroy();
        }),
        (ya.prototype.destroy = ya.prototype.destroy),
        (ya.prototype.configure = function (m, _) {
          arguments.length == 2 && typeof m == "string" && (m = Oe(m, _));
          var R = m,
            M = !1;
          return (
            R.trackSelectionCallback != null &&
              ((M = !0),
              (R.offline = R.offline || {}),
              (R.offline.trackSelectionCallback = R.trackSelectionCallback),
              delete R.trackSelectionCallback),
            R.progressCallback != null &&
              ((M = !0),
              (R.offline = R.offline || {}),
              (R.offline.progressCallback = R.progressCallback),
              delete R.progressCallback),
            R.usePersistentLicense != null &&
              ((M = !0),
              (R.offline = R.offline || {}),
              (R.offline.usePersistentLicense = R.usePersistentLicense),
              delete R.usePersistentLicense),
            M &&
              ph(
                "Storage.configure with OfflineConfig",
                "Please configure storage with a player configuration."
              ),
            Fe(this.g, m)
          );
        }),
        (ya.prototype.configure = ya.prototype.configure),
        (ya.prototype.getConfiguration = function () {
          var m = $e();
          return Fe(m, this.g, $e()), m;
        }),
        (ya.prototype.getConfiguration = ya.prototype.getConfiguration),
        (ya.prototype.Yb = function () {
          return this.h;
        }),
        (ya.prototype.getNetworkingEngine = ya.prototype.Yb),
        (ya.prototype.store = function (m, _, R) {
          var M = this;
          return Ud(
            this,
            (function (x, z, J, te) {
              return k(function pe() {
                var xe, Be, bt, dt, mt, xt, Nt, en, Tn;
                return $t(pe, function (In) {
                  switch (In.s) {
                    case 1:
                      return (
                        Xc(),
                        x.j
                          ? In.return(Promise.reject(new re(2, 9, 9006)))
                          : ((x.j = !0),
                            E(
                              In,
                              (function (Qn, vr, mr) {
                                return k(function bi() {
                                  var Ur, Jr, dr, Br, oi, ki;
                                  return $t(bi, function (Or) {
                                    switch (Or.s) {
                                      case 1:
                                        return (
                                          (Ur = null),
                                          (Jr = Qn.h),
                                          (dr = {
                                            networkingEngine: Jr,
                                            filterAllPeriods: function () {},
                                            filterNewPeriod: function () {},
                                            onTimelineRegionAdded:
                                              function () {},
                                            onEvent: function () {},
                                            onError: function (ri) {
                                              Ur = ri;
                                            },
                                          }),
                                          E(Or, mr(), 2)
                                        );
                                      case 2:
                                        return (
                                          (Br = Or.B).configure(Qn.g.manifest),
                                          ic(Qn),
                                          W(Or, 3),
                                          E(Or, Br.start(vr, dr), 5)
                                        );
                                      case 5:
                                        return (
                                          (oi = Or.B),
                                          ic(Qn),
                                          (ki = (function (ri) {
                                            for (
                                              var Yi = new Set(),
                                                Ba = (ri = b(
                                                  ri.periods
                                                )).next();
                                              !Ba.done;
                                              Ba = ri.next()
                                            ) {
                                              for (
                                                var wa = b(
                                                    (Ba = Ba.value).textStreams
                                                  ),
                                                  Po = wa.next();
                                                !Po.done;
                                                Po = wa.next()
                                              )
                                                Yi.add(Po.value);
                                              for (
                                                wa = (Ba = b(
                                                  Ba.variants
                                                )).next();
                                                !wa.done;
                                                wa = Ba.next()
                                              )
                                                (wa = wa.value).audio &&
                                                  Yi.add(wa.audio),
                                                  wa.video && Yi.add(wa.video);
                                            }
                                            return Yi;
                                          })(oi)),
                                          E(
                                            Or,
                                            Promise.all(
                                              Fr(ki, function (ri) {
                                                return ri.createSegmentIndex();
                                              })
                                            ),
                                            6
                                          )
                                        );
                                      case 6:
                                        if ((ic(Qn), Ur)) throw Ur;
                                        return Or.return(oi);
                                      case 3:
                                        return De(Or), E(Or, Br.stop(), 7);
                                      case 7:
                                        Xe(Or, 0);
                                    }
                                  });
                                });
                              })(x, z, te),
                              2
                            ))
                      );
                    case 2:
                      if (
                        ((xe = In.B),
                        ic(x),
                        !(
                          !xe.presentationTimeline.aa() &&
                          !xe.presentationTimeline.ib()
                        ))
                      )
                        throw new re(2, 9, 9005, z);
                      return (
                        (Be = null),
                        (bt = new cp()),
                        (mt = dt = null),
                        L(In, 3, 4),
                        E(
                          In,
                          (function (Qn, vr, mr) {
                            return k(function bi() {
                              var Ur, Jr, dr;
                              return $t(bi, function (Br) {
                                switch (Br.s) {
                                  case 1:
                                    return (
                                      (Ur = new rs({
                                        Ib: Qn.h,
                                        onError: mr,
                                        Dc: function () {},
                                        onExpirationUpdated: function () {},
                                        onEvent: function () {},
                                      })),
                                      (Jr = SP(vr.periods)),
                                      (dr = Qn.g),
                                      Ur.configure(dr.drm),
                                      E(
                                        Br,
                                        (function (oi, ki, Or) {
                                          return (
                                            (oi.F = []), (oi.L = Or), Cm(oi, ki)
                                          );
                                        })(
                                          Ur,
                                          Jr,
                                          dr.offline.usePersistentLicense
                                        ),
                                        2
                                      )
                                    );
                                  case 2:
                                    return E(Br, $m(Ur), 3);
                                  case 3:
                                    return E(Br, No(Ur), 4);
                                  case 4:
                                    return Br.return(Ur);
                                }
                              });
                            });
                          })(x, xe, function (Qn) {
                            mt = mt || Qn;
                          }),
                          6
                        )
                      );
                    case 6:
                      if (((Be = In.B), ic(x), mt)) throw mt;
                      return E(
                        In,
                        (function (Qn, vr, mr) {
                          return k(function bi() {
                            var Ur, Jr;
                            return $t(bi, function (dr) {
                              switch (dr.s) {
                                case 1:
                                  return (
                                    (Ur = { width: 1 / 0, height: 1 / 0 }),
                                    (function (Br, oi, ki) {
                                      for (
                                        var Or = (Br = b(Br.periods)).next();
                                        !Or.done;
                                        Or = Br.next()
                                      )
                                        (Or = Or.value).variants =
                                          Or.variants.filter(function (ri) {
                                            return wi.rd(ri, oi, ki);
                                          });
                                    })(vr, Qn.g.restrictions, Ur),
                                    (function (Br) {
                                      for (
                                        var oi = (Br = b(Br.periods)).next();
                                        !oi.done;
                                        oi = Br.next()
                                      )
                                        (oi = oi.value).variants =
                                          oi.variants.filter(function (ki) {
                                            var Or = !0;
                                            return (
                                              ki.audio &&
                                                (Or = Or && q0(ki.audio)),
                                              ki.video &&
                                                (Or = Or && q0(ki.video)),
                                              Or
                                            );
                                          });
                                    })(vr),
                                    (function (Br, oi) {
                                      for (
                                        var ki = b(Br.periods), Or = ki.next();
                                        !Or.done;
                                        Or = ki.next()
                                      )
                                        (Or = Or.value).variants =
                                          Or.variants.filter(function (ri) {
                                            return Z0(oi, ri);
                                          });
                                    })(vr, mr),
                                    vi(vr),
                                    (Jr = Qn.g.preferredAudioChannelCount),
                                    wi.$d(vr, Jr),
                                    E(
                                      dr,
                                      (function (Br, oi) {
                                        return k(function ki() {
                                          var Or, ri, Yi, Ba;
                                          return $t(ki, function (wa) {
                                            switch (wa.s) {
                                              case 1:
                                                (Or = null),
                                                  (ri = b(Br.periods)),
                                                  (Yi = ri.next());
                                              case 2:
                                                if (Yi.done) {
                                                  wa.I(0);
                                                  break;
                                                }
                                                return (
                                                  (Ba = Yi.value),
                                                  Or &&
                                                    (Ba.variants =
                                                      Ba.variants.filter(
                                                        function (Po) {
                                                          return Da(
                                                            Or,
                                                            new na(Po)
                                                          );
                                                        }
                                                      )),
                                                  E(wa, oi(Ba), 5)
                                                );
                                              case 5:
                                                (Or = Fs(Ba.variants)),
                                                  (Yi = ri.next()),
                                                  wa.I(2);
                                            }
                                          });
                                        });
                                      })(vr, function (Br) {
                                        return k(function oi() {
                                          var ki, Or, ri, Yi, Ba, wa, Po, go;
                                          return $t(oi, function (Pa) {
                                            switch (Pa.s) {
                                              case 1:
                                                (ki = wi), (Or = []);
                                                for (
                                                  var Ha = b(Br.variants),
                                                    zi = Ha.next();
                                                  !zi.done;
                                                  zi = Ha.next()
                                                )
                                                  (ri = zi.value),
                                                    Or.push(ki.Oc(ri));
                                                for (
                                                  zi = (Ha = b(
                                                    Br.textStreams
                                                  )).next();
                                                  !zi.done;
                                                  zi = Ha.next()
                                                )
                                                  (Yi = zi.value),
                                                    Or.push(ki.Kc(Yi));
                                                return E(
                                                  Pa,
                                                  Qn.g.offline.trackSelectionCallback(
                                                    Or
                                                  ),
                                                  2
                                                );
                                              case 2:
                                                for (
                                                  Ba = Pa.B,
                                                    wa = new Set(),
                                                    Po = new Set(),
                                                    zi = (Ha = b(Ba)).next();
                                                  !zi.done;
                                                  zi = Ha.next()
                                                )
                                                  (go = zi.value).type ==
                                                    "variant" && wa.add(go.id),
                                                    go.type == "text" &&
                                                      Po.add(go.id);
                                                (Br.variants =
                                                  Br.variants.filter(function (
                                                    ha
                                                  ) {
                                                    return wa.has(ha.id);
                                                  })),
                                                  (Br.textStreams =
                                                    Br.textStreams.filter(
                                                      function (ha) {
                                                        return Po.has(ha.id);
                                                      }
                                                    )),
                                                  S(Pa);
                                            }
                                          });
                                        });
                                      }),
                                      2
                                    )
                                  );
                                case 2:
                                  (function (Br) {
                                    if (Br.periods.length == 0)
                                      throw new re(2, 4, 4014);
                                    for (
                                      var oi = (Br = b(Br.periods)).next();
                                      !oi.done;
                                      oi = Br.next()
                                    )
                                      ly(oi.value);
                                  })(vr),
                                    S(dr);
                              }
                            });
                          });
                        })(x, xe, Be),
                        7
                      );
                    case 7:
                      return E(In, bt.init(), 8);
                    case 8:
                      return (
                        ic(x),
                        E(
                          In,
                          (function (Qn) {
                            var vr = null;
                            if (
                              (Qn.g.forEach(function (mr, bi) {
                                mr.getCells().forEach(function (Ur, Jr) {
                                  Ur.hasFixedKeySpace() ||
                                    vr ||
                                    (vr = { path: { Ea: bi, ja: Jr }, ja: Ur });
                                });
                              }),
                              vr)
                            )
                              return vr;
                            throw new re(
                              2,
                              9,
                              9013,
                              "Could not find a cell that supports add-operations"
                            );
                          })(bt),
                          9
                        )
                      );
                    case 9:
                      return (
                        (dt = In.B),
                        ic(x),
                        E(
                          In,
                          (function (Qn, vr, mr, bi, Ur, Jr) {
                            return k(function dr() {
                              var Br, oi, ki, Or, ri, Yi, Ba, wa, Po, go;
                              return $t(dr, function (Pa) {
                                switch (Pa.s) {
                                  case 1:
                                    return (
                                      (Br = (function (Ha, zi, ha) {
                                        var Xa =
                                          zi.expiration == null
                                            ? 1 / 0
                                            : zi.expiration;
                                        return {
                                          offlineUri: null,
                                          originalManifestUri: Ha,
                                          duration:
                                            zi.presentationTimeline.ha(),
                                          size: 0,
                                          expiration: Xa,
                                          tracks: (zi = Vt(zi.periods[0])),
                                          appMetadata: ha,
                                        };
                                      })(Ur, bi, Jr)),
                                      (oi = bi.periods.some(function (Ha) {
                                        return Ha.variants.some(function (zi) {
                                          return (
                                            zi.drmInfos && zi.drmInfos.length
                                          );
                                        });
                                      })),
                                      (ki = bi.periods.some(function (Ha) {
                                        return Ha.variants.some(function (zi) {
                                          return zi.drmInfos.some(function (
                                            ha
                                          ) {
                                            return (
                                              ha.initData && ha.initData.length
                                            );
                                          });
                                        });
                                      })),
                                      (ri = null),
                                      (Or = oi && !ki) &&
                                        ((Yi = mr.g),
                                        (ri = pA.get(Yi.keySystem))),
                                      (Ba = new cG(
                                        Qn.h,
                                        function (Ha, zi) {
                                          (Br.size = zi),
                                            Qn.g.offline.progressCallback(
                                              Br,
                                              Ha
                                            );
                                        },
                                        function (Ha, zi) {
                                          Or &&
                                            Qn.g.offline.usePersistentLicense &&
                                            ri == zi &&
                                            Ks(mr, "cenc", Ha);
                                        }
                                      )),
                                      W(Pa, 2),
                                      (Po = wa =
                                        (function (Ha, zi, ha, Xa, Li, Ma, ra) {
                                          var mo = new kn(),
                                            Fo = Li.periods.map(function (rf) {
                                              return (function (
                                                bh,
                                                ac,
                                                hp,
                                                oc,
                                                af,
                                                Sg
                                              ) {
                                                for (
                                                  var Bd = b(Sg.variants),
                                                    sc = Bd.next();
                                                  !sc.done;
                                                  sc = Bd.next()
                                                )
                                                  zt(oc, sc.value);
                                                for (
                                                  Bd = b(Sg.textStreams),
                                                    sc = Bd.next();
                                                  !sc.done;
                                                  sc = Bd.next()
                                                )
                                                  oc.g[sc.value.id] = 52;
                                                Bd = (function (md) {
                                                  for (
                                                    var $_ = new Set(),
                                                      fp = b(md.textStreams),
                                                      mA = fp.next();
                                                    !mA.done;
                                                    mA = fp.next()
                                                  )
                                                    $_.add(mA.value);
                                                  for (
                                                    md = b(md.variants),
                                                      fp = md.next();
                                                    !fp.done;
                                                    fp = md.next()
                                                  )
                                                    (fp = fp.value).audio &&
                                                      $_.add(fp.audio),
                                                      fp.video &&
                                                        $_.add(fp.video);
                                                  return $_;
                                                })(Sg);
                                                var Ol = new Map();
                                                for (
                                                  Bd = b(Bd), sc = Bd.next();
                                                  !sc.done;
                                                  sc = Bd.next()
                                                ) {
                                                  var gA = dp(
                                                    bh,
                                                    ac,
                                                    hp,
                                                    oc,
                                                    af,
                                                    (sc = sc.value)
                                                  );
                                                  Ol.set(sc.id, gA);
                                                }
                                                return (
                                                  Sg.variants.forEach(function (
                                                    md
                                                  ) {
                                                    md.audio &&
                                                      Ol.get(
                                                        md.audio.id
                                                      ).variantIds.push(md.id),
                                                      md.video &&
                                                        Ol.get(
                                                          md.video.id
                                                        ).variantIds.push(
                                                          md.id
                                                        );
                                                  }),
                                                  {
                                                    startTime: Sg.startTime,
                                                    streams: Array.from(
                                                      Ol.values()
                                                    ),
                                                  }
                                                );
                                              })(Ha, zi, ha, mo, Li, rf);
                                            }),
                                            vs = Xa.g,
                                            gd =
                                              Ha.g.offline.usePersistentLicense;
                                          return (
                                            vs && gd && (vs.initData = []),
                                            {
                                              originalManifestUri: Ma,
                                              duration:
                                                Li.presentationTimeline.ha(),
                                              size: 0,
                                              expiration: Xa.Xb(),
                                              periods: Fo,
                                              sessionIds: gd ? Yl(Xa) : [],
                                              drmInfo: vs,
                                              appMetadata: ra,
                                            }
                                          );
                                        })(Qn, Ba, vr, mr, bi, Ur, Jr)),
                                      E(
                                        Pa,
                                        (function (Ha) {
                                          return k(function zi() {
                                            return $t(zi, function (ha) {
                                              switch (ha.s) {
                                                case 1:
                                                  return E(
                                                    ha,
                                                    Promise.all(Ha.h.values()),
                                                    2
                                                  );
                                                case 2:
                                                  return ha.return(Ha.g.g);
                                              }
                                            });
                                          });
                                        })(Ba),
                                        4
                                      )
                                    );
                                  case 4:
                                    if (
                                      ((Po.size = Pa.B),
                                      (wa.expiration = mr.Xb()),
                                      (go = Yl(mr)),
                                      (wa.sessionIds = Qn.g.offline
                                        .usePersistentLicense
                                        ? go
                                        : []),
                                      oi &&
                                        Qn.g.offline.usePersistentLicense &&
                                        !go.length)
                                    )
                                      throw new re(2, 9, 9007);
                                    return Pa.return(wa);
                                  case 2:
                                    return De(Pa), E(Pa, Ba.destroy(), 5);
                                  case 5:
                                    Xe(Pa, 0);
                                }
                              });
                            });
                          })(x, dt.ja, Be, xe, z, J),
                          10
                        )
                      );
                    case 10:
                      if (((xt = In.B), ic(x), mt)) throw mt;
                      return E(In, dt.ja.addManifests([xt]), 11);
                    case 11:
                      return (
                        (Nt = In.B),
                        ic(x),
                        (en = new Zm(
                          "manifest",
                          dt.path.Ea,
                          dt.path.ja,
                          Nt[0]
                        )),
                        In.return(ct(en, xt))
                      );
                    case 4:
                      return (
                        De(In), (x.j = !1), (x.i = []), E(In, bt.destroy(), 12)
                      );
                    case 12:
                      if (!Be) {
                        In.I(13);
                        break;
                      }
                      return E(In, Be.destroy(), 13);
                    case 13:
                      Xe(In, 0);
                      break;
                    case 3:
                      if (((Tn = oe(In)), !dt)) {
                        In.I(15);
                        break;
                      }
                      return E(
                        In,
                        dt.ja.removeSegments(x.i, function () {}),
                        15
                      );
                    case 15:
                      throw mt || Tn;
                  }
                });
              });
            })(this, m, _ || {}, function () {
              return k(function x() {
                var z, J;
                return $t(x, function (te) {
                  switch (te.s) {
                    case 1:
                      return R && typeof R != "string"
                        ? (ph(
                            "Storing with a manifest parser factory",
                            "Please register a manifest parser and for the mime-type."
                          ),
                          (z = R),
                          te.return(new z()))
                        : E(
                            te,
                            ia.create(m, M.h, M.g.manifest.retryParameters, R),
                            2
                          );
                    case 2:
                      return (J = te.B), te.return(J);
                  }
                });
              });
            })
          );
        }),
        (ya.prototype.store = ya.prototype.store),
        (ya.prototype.Hf = function () {
          return this.j;
        }),
        (ya.prototype.getStoreInProgress = ya.prototype.Hf),
        (ya.prototype.remove = function (m) {
          return Ud(
            this,
            (function (_, R) {
              return k(function M() {
                var x, z, J, te, pe, xe;
                return $t(M, function (Be) {
                  switch (Be.s) {
                    case 1:
                      return (
                        Xc(),
                        (x = Y(R)) == null || x.g != "manifest"
                          ? Be.return(Promise.reject(new re(2, 9, 9004, R)))
                          : ((z = x),
                            (J = new cp()),
                            W(Be, 2),
                            E(Be, J.init(), 4))
                      );
                    case 4:
                      return E(Be, m2(J, z.Ea(), z.ja()), 5);
                    case 5:
                      return E(Be, (te = Be.B).getManifests([z.key()]), 6);
                    case 6:
                      return (
                        (pe = Be.B),
                        (xe = pe[0]),
                        E(Be, Promise.all([pd(_, xe, J), M_(_, te, z, xe)]), 2)
                      );
                    case 2:
                      return De(Be), E(Be, J.destroy(), 8);
                    case 8:
                      Xe(Be, 0);
                  }
                });
              });
            })(this, m)
          );
        }),
        (ya.prototype.remove = ya.prototype.remove),
        (ya.prototype.sg = function () {
          return Ud(
            this,
            (function (m) {
              return k(function _() {
                var R, M, x, z, J, te, pe, xe, Be;
                return $t(_, function (bt) {
                  switch (bt.s) {
                    case 1:
                      return (
                        Xc(),
                        (R = m.h),
                        (M = m.g.drm),
                        (x = new cp()),
                        (z = !1),
                        W(bt, 2),
                        E(bt, x.init(), 4)
                      );
                    case 4:
                      for (
                        J = [],
                          (function (dt, mt) {
                            dt.g.forEach(function (xt) {
                              mt(xt.getEmeSessionCell());
                            });
                          })(x, function (dt) {
                            return J.push(dt);
                          }),
                          te = Promise.resolve(),
                          pe = {},
                          xe = b(J),
                          Be = xe.next();
                        !Be.done;
                        pe = { Jc: pe.Jc }, Be = xe.next()
                      )
                        (pe.Jc = Be.value),
                          (te = te.then(
                            (function (dt) {
                              return function () {
                                return k(function mt() {
                                  var xt, Nt;
                                  return $t(mt, function (en) {
                                    switch (en.s) {
                                      case 1:
                                        return E(en, dt.Jc.getAll(), 2);
                                      case 2:
                                        return (
                                          (xt = en.B), E(en, ve(M, R, xt), 3)
                                        );
                                      case 3:
                                        return (
                                          (Nt = en.B),
                                          E(en, dt.Jc.remove(Nt), 4)
                                        );
                                      case 4:
                                        Nt.length != xt.length && (z = !0),
                                          S(en);
                                    }
                                  });
                                });
                              };
                            })(pe)
                          ));
                      return E(bt, te, 2);
                    case 2:
                      return De(bt), E(bt, x.destroy(), 6);
                    case 6:
                      Xe(bt, 3);
                      break;
                    case 3:
                      return bt.return(!z);
                  }
                });
              });
            })(this)
          );
        }),
        (ya.prototype.removeEmeSessions = ya.prototype.sg),
        (ya.prototype.list = function () {
          return Ud(
            this,
            k(function m() {
              var _, R, M;
              return $t(m, function (x) {
                switch (x.s) {
                  case 1:
                    return (
                      Xc(), (_ = []), (R = new cp()), W(x, 2), E(x, R.init(), 4)
                    );
                  case 4:
                    return (
                      (M = Promise.resolve()),
                      (function (z, J) {
                        z.g.forEach(function (te, pe) {
                          te.getCells().forEach(function (xe, Be) {
                            J({ Ea: pe, ja: Be }, xe);
                          });
                        });
                      })(R, function (z, J) {
                        M = M.then(function () {
                          return k(function te() {
                            return $t(te, function (pe) {
                              switch (pe.s) {
                                case 1:
                                  return E(pe, J.getAllManifests(), 2);
                                case 2:
                                  pe.B.forEach(function (xe, Be) {
                                    var bt = ct(
                                      new Zm("manifest", z.Ea, z.ja, Be),
                                      xe
                                    );
                                    _.push(bt);
                                  }),
                                    S(pe);
                              }
                            });
                          });
                        });
                      }),
                      E(x, M, 2)
                    );
                  case 2:
                    return De(x), E(x, R.destroy(), 6);
                  case 6:
                    Xe(x, 3);
                    break;
                  case 3:
                    return x.return(_);
                }
              });
            })
          );
        }),
        (ya.prototype.list = ya.prototype.list),
        (ya.deleteAll = function () {
          return k(function m() {
            var _;
            return $t(m, function (R) {
              switch (R.s) {
                case 1:
                  return (_ = new cp()), W(R, 2), E(R, _.erase(), 2);
                case 2:
                  return De(R), E(R, _.destroy(), 5);
                case 5:
                  Xe(R, 0);
              }
            });
          });
        });
      var pA = new Map()
        .set("org.w3.clearkey", "1077efecc0b24d02ace33c1e52e2fb4b")
        .set("com.widevine.alpha", "edef8ba979d64acea3c827dcd51d21ed")
        .set("com.microsoft.playready", "9a04f07998404286ab92e65be0885f95")
        .set("com.adobe.primetime", "f239e769efa348509c16a903c6932efb");
      (nt.offline = Hc),
        Z("shaka.polyfill.installAll", function () {
          for (var m = 0; m < _c.length; ++m)
            try {
              _c[m].Xe();
            } catch (_) {
              B.ba("Error installing polyfill!", _);
            }
        });
      var Tg,
        uy,
        _c = [];
      function bu(m, _) {
        for (
          var R = { priority: (_ = _ || 0), Xe: m }, M = 0;
          M < _c.length;
          M++
        )
          if (_c[M].priority < _) return void _c.splice(M, 0, R);
        _c.push(R);
      }
      function nf(m) {
        var _ = m.type.replace(/^(webkit|moz|MS)/, "").toLowerCase();
        if (typeof Event == "function") var R = new Event(_, m);
        else
          (R = document.createEvent("Event")).initEvent(
            _,
            m.bubbles,
            m.cancelable
          );
        m.target.dispatchEvent(R);
      }
      function mG(m, _, R) {
        m == "input" && this.type === "range" && (m = "change"),
          HTMLInputElement.prototype.originalAddEventListener.call(
            this,
            m,
            _,
            R
          );
      }
      function b2() {
        var m = MediaSource.prototype.addSourceBuffer;
        MediaSource.prototype.addSourceBuffer = function (_) {
          for (var R = [], M = 0; M < arguments.length; ++M)
            R[M] = arguments[M];
          return ((R = m.apply(this, R)).abort = function () {}), R;
        };
      }
      function nn(m, _) {
        B.debug("PatchedMediaKeysApple.requestMediaKeySystemAccess");
        try {
          var R = new er(m, _);
          return Promise.resolve(R);
        } catch (M) {
          return Promise.reject(M);
        }
      }
      function er(m, _) {
        if (
          (B.debug("PatchedMediaKeysApple.MediaKeySystemAccess"),
          (this.keySystem = m),
          m.startsWith("com.apple.fps"))
        )
          for (var R = b(_), M = R.next(); !M.done; M = R.next()) {
            var x = M.value;
            if (x.persistentState == "required") M = null;
            else {
              M = {
                audioCapabilities: [],
                videoCapabilities: [],
                persistentState: "optional",
                distinctiveIdentifier: "optional",
                initDataTypes: x.initDataTypes,
                sessionTypes: ["temporary"],
                label: x.label,
              };
              var z = !1,
                J = !1;
              if (x.audioCapabilities) {
                for (
                  var te = b(x.audioCapabilities), pe = te.next();
                  !pe.done;
                  pe = te.next()
                )
                  if ((pe = pe.value).contentType) {
                    z = !0;
                    var xe = pe.contentType.split(";")[0];
                    WebKitMediaKeys.isTypeSupported(this.keySystem, xe) &&
                      (M.audioCapabilities.push(pe), (J = !0));
                  }
              }
              if (x.videoCapabilities)
                for (
                  pe = (x = b(x.videoCapabilities)).next();
                  !pe.done;
                  pe = x.next()
                )
                  (te = pe.value).contentType &&
                    ((z = !0),
                    (pe = te.contentType.split(";")[0]),
                    WebKitMediaKeys.isTypeSupported(this.keySystem, pe) &&
                      (M.videoCapabilities.push(te), (J = !0)));
              z ||
                (J = WebKitMediaKeys.isTypeSupported(
                  this.keySystem,
                  "video/mp4"
                )),
                (M = J ? M : null);
            }
            if (M) return void (this.g = M);
          }
        throw (
          (((R = Error("Unsupported keySystem")).name = "NotSupportedError"),
          (R.code = DOMException.NOT_SUPPORTED_ERR),
          R)
        );
      }
      function gi(m) {
        B.debug("PatchedMediaKeysApple.setMediaKeys");
        var _ = this.mediaKeys;
        return (
          _ && _ != m && qi(_, null),
          delete this.mediaKeys,
          (this.mediaKeys = m) ? qi(m, this) : Promise.resolve()
        );
      }
      function Qr(m) {
        B.debug("PatchedMediaKeysApple.MediaKeys"),
          (this.h = new WebKitMediaKeys(m)),
          (this.g = new Yr());
      }
      function qi(m, _) {
        if ((m.g.nb(), !_)) return Promise.resolve();
        m.g.H(_, "webkitneedkey", nu);
        try {
          return (
            qh(_, HTMLMediaElement.HAVE_METADATA, m.g, function () {
              _.webkitSetMediaKeys(m.h);
            }),
            Promise.resolve()
          );
        } catch (R) {
          return Promise.reject(R);
        }
      }
      function Ua(m) {
        B.debug("PatchedMediaKeysApple.MediaKeySession"),
          Ye.call(this),
          (this.h = null),
          (this.l = m),
          (this.i = this.g = null),
          (this.j = new Yr()),
          (this.sessionId = ""),
          (this.expiration = NaN),
          (this.closed = new Ft()),
          (this.keyStatuses = new FP());
      }
      function nu(m) {
        if (
          (B.debug("PatchedMediaKeysApple.onWebkitNeedKey_", m),
          (m = new Uint8Array(m.initData)),
          new DataView(m.buffer, m.byteOffset, m.byteLength).getUint32(0, !0) +
            4 !=
            m.byteLength)
        )
          throw new RangeError("Malformed FairPlay init data");
        m = Sn((m = Yt(m.subarray(4), !0)));
        var _ = new Event("encrypted");
        (_.initDataType = "skd"), (_.initData = m), this.dispatchEvent(_);
      }
      function ru(m, _) {
        var R = m.keyStatuses;
        (R.size = _ == null ? 0 : 1),
          (R.g = _),
          m.dispatchEvent(new Je("keystatuseschange"));
      }
      function FP() {
        (this.size = 0), (this.g = void 0);
      }
      function UP(m, _) {
        B.debug("PatchedMediaKeysMs.requestMediaKeySystemAccess");
        try {
          var R = new yG(m, _);
          return Promise.resolve(R);
        } catch (M) {
          return Promise.reject(M);
        }
      }
      function yG(m, _) {
        B.debug("PatchedMediaKeysMs.MediaKeySystemAccess"),
          (this.keySystem = m);
        for (var R = !1, M = 0; M < _.length; ++M) {
          var x = _[M],
            z = {
              audioCapabilities: [],
              videoCapabilities: [],
              persistentState: "optional",
              distinctiveIdentifier: "optional",
              initDataTypes: x.initDataTypes,
              sessionTypes: ["temporary"],
              label: x.label,
            },
            J = !1;
          if (x.audioCapabilities)
            for (var te = 0; te < x.audioCapabilities.length; ++te) {
              var pe = x.audioCapabilities[te];
              if (pe.contentType) {
                J = !0;
                var xe = pe.contentType.split(";")[0];
                MSMediaKeys.isTypeSupported(this.keySystem, xe) &&
                  (z.audioCapabilities.push(pe), (R = !0));
              }
            }
          if (x.videoCapabilities)
            for (te = 0; te < x.videoCapabilities.length; ++te)
              (pe = x.videoCapabilities[te]).contentType &&
                ((J = !0),
                (xe = pe.contentType.split(";")[0]),
                MSMediaKeys.isTypeSupported(this.keySystem, xe) &&
                  (z.videoCapabilities.push(pe), (R = !0)));
          if (
            (J ||
              (R = MSMediaKeys.isTypeSupported(this.keySystem, "video/mp4")),
            x.persistentState == "required" && (R = !1),
            R)
          )
            return void (this.g = z);
        }
        throw (
          (((R = Error("Unsupported keySystem")).name = "NotSupportedError"),
          (R.code = DOMException.NOT_SUPPORTED_ERR),
          R)
        );
      }
      function est(m) {
        B.debug("PatchedMediaKeysMs.setMediaKeys");
        var _ = this.mediaKeys;
        return (
          _ && _ != m && qfe(_, null),
          delete this.mediaKeys,
          (this.mediaKeys = m) ? qfe(m, this) : Promise.resolve()
        );
      }
      function vG(m) {
        B.debug("PatchedMediaKeysMs.MediaKeys"),
          (this.h = new MSMediaKeys(m)),
          (this.g = new Yr());
      }
      function qfe(m, _) {
        if ((m.g.nb(), !_)) return Promise.resolve();
        m.g.H(_, "msneedkey", tst);
        try {
          return (
            qh(_, HTMLMediaElement.HAVE_METADATA, m.g, function () {
              _.msSetMediaKeys(m.h);
            }),
            Promise.resolve()
          );
        } catch (R) {
          return Promise.reject(R);
        }
      }
      function h7(m) {
        B.debug("PatchedMediaKeysMs.MediaKeySession"),
          Ye.call(this),
          (this.i = null),
          (this.l = m),
          (this.h = this.g = null),
          (this.j = new Yr()),
          (this.sessionId = ""),
          (this.expiration = NaN),
          (this.closed = new Ft()),
          (this.keyStatuses = new epe());
      }
      function tst(m) {
        if ((B.debug("PatchedMediaKeysMs.onMsNeedKey_", m), m.initData)) {
          var _ = document.createEvent("CustomEvent");
          _.initCustomEvent("encrypted", !1, !1, null),
            (_.initDataType = "cenc"),
            (_.initData = (function (R) {
              if (!R) return R;
              var M = new yg(R);
              if (1 >= M.data.length) return R;
              R = [];
              for (
                var x = {}, z = (M = b(M.data)).next();
                !z.done;
                x = { yc: x.yc }, z = M.next()
              )
                (x.yc = z.value),
                  R.some(
                    (function (J) {
                      return function (te) {
                        return Ht.Ha(te, J.yc);
                      };
                    })(x)
                  ) || R.push(x.yc);
              return Ht.concat.apply(
                Ht,
                R instanceof Array
                  ? R
                  : (function (J) {
                      for (var te, pe = []; !(te = J.next()).done; )
                        pe.push(te.value);
                      return pe;
                    })(b(R))
              );
            })(m.initData).buffer),
            this.dispatchEvent(_);
        }
      }
      function BP(m, _) {
        var R = m.keyStatuses;
        (R.size = _ == null ? 0 : 1),
          (R.g = _),
          m.dispatchEvent(new Je("keystatuseschange"));
      }
      function epe() {
        (this.size = 0), (this.g = void 0);
      }
      function nst() {
        return (
          B.debug("PatchedMediaKeysNop.requestMediaKeySystemAccess"),
          Promise.reject(Error("The key system specified is not supported."))
        );
      }
      function rst(m) {
        return (
          B.debug("PatchedMediaKeysNop.setMediaKeys"),
          m == null
            ? Promise.resolve()
            : Promise.reject(Error("MediaKeys not supported."))
        );
      }
      function f7() {
        throw new TypeError("Illegal constructor.");
      }
      function p7() {
        throw new TypeError("Illegal constructor.");
      }
      Z("shaka.polyfill.register", bu),
        bu(function () {
          wpe();
        }, -1),
        bu(function () {
          if (i.Document) {
            var m = Element.prototype;
            (m.requestFullscreen =
              m.requestFullscreen ||
              m.mozRequestFullScreen ||
              m.msRequestFullscreen ||
              m.webkitRequestFullscreen),
              ((m = Document.prototype).exitFullscreen =
                m.exitFullscreen ||
                m.mozCancelFullScreen ||
                m.msExitFullscreen ||
                m.webkitCancelFullScreen),
              "fullscreenElement" in document ||
                (Object.defineProperty(document, "fullscreenElement", {
                  get: function () {
                    return (
                      document.mozFullScreenElement ||
                      document.msFullscreenElement ||
                      document.webkitCurrentFullScreenElement ||
                      document.webkitFullscreenElement
                    );
                  },
                }),
                Object.defineProperty(document, "fullscreenEnabled", {
                  get: function () {
                    return (
                      document.mozFullScreenEnabled ||
                      document.msFullscreenEnabled ||
                      document.webkitFullscreenEnabled
                    );
                  },
                })),
              document.addEventListener("webkitfullscreenchange", nf),
              document.addEventListener("webkitfullscreenerror", nf),
              document.addEventListener("mozfullscreenchange", nf),
              document.addEventListener("mozfullscreenerror", nf),
              document.addEventListener("MSFullscreenChange", nf),
              document.addEventListener("MSFullscreenError", nf);
          }
        }),
        bu(function () {
          B.debug("InputEvent.install"),
            Ws("Trident/") &&
              !HTMLInputElement.prototype.originalAddEventListener &&
              (B.info("Patching input event support on IE."),
              (HTMLInputElement.prototype.originalAddEventListener =
                HTMLInputElement.prototype.addEventListener),
              (HTMLInputElement.prototype.addEventListener = mG));
        }),
        bu(function () {
          navigator.languages ||
            Object.defineProperty(navigator, "languages", {
              get: function () {
                return navigator.language ? [navigator.language] : ["en"];
              },
            });
        }),
        bu(function () {
          B.debug("mathRound.install");
        }),
        bu(function () {
          B.debug("MediaSource.install");
          var m = j0();
          i.MediaSource
            ? i.cast && cast.__platform__ && cast.__platform__.canDisplayType
              ? (B.info("Patching Chromecast MSE bugs."),
                (function () {
                  var _ = MediaSource.isTypeSupported;
                  MediaSource.isTypeSupported = function (R) {
                    var M = R.split(/ *; */);
                    return (
                      M.shift(),
                      M.some(function (x) {
                        return x.startsWith("codecs=");
                      })
                        ? cast.__platform__.canDisplayType(R)
                        : _(R)
                    );
                  };
                })())
              : m
              ? ((function () {
                  var _ = MediaSource.isTypeSupported;
                  MediaSource.isTypeSupported = function (R) {
                    return (
                      R.split(/ *; */)[0].split("/")[1].toLowerCase() !=
                        "mp2t" && _(R)
                    );
                  };
                })(),
                12 >= m
                  ? (B.info("Patching Safari 11 & 12 MSE bugs."),
                    b2(),
                    (function () {
                      var _ = SourceBuffer.prototype.remove;
                      SourceBuffer.prototype.remove = function (R, M) {
                        return _.call(this, R, M - 0.001);
                      };
                    })())
                  : (B.info("Patching Safari 13 MSE bugs."), b2()))
              : Ws("Tizen 2") || Ws("Tizen 3") || Ws("Tizen 4")
              ? (function () {
                  var _ = MediaSource.isTypeSupported;
                  MediaSource.isTypeSupported = function (R) {
                    return Ki(R)[0] != "opus" && _(R);
                  };
                })()
              : B.info("Using native MSE as-is.")
            : B.info("No MSE implementation available.");
        }),
        (er.prototype.createMediaKeys = function () {
          B.debug("PatchedMediaKeysApple.MediaKeySystemAccess.createMediaKeys");
          var m = new Qr(this.keySystem);
          return Promise.resolve(m);
        }),
        (er.prototype.getConfiguration = function () {
          return (
            B.debug(
              "PatchedMediaKeysApple.MediaKeySystemAccess.getConfiguration"
            ),
            this.g
          );
        }),
        (Qr.prototype.createSession = function (m) {
          if (
            (B.debug("PatchedMediaKeysApple.MediaKeys.createSession"),
            (m = m || "temporary") != "temporary")
          )
            throw new TypeError(
              "Session type " + m + " is unsupported on this platform."
            );
          return new Ua(this.h);
        }),
        (Qr.prototype.setServerCertificate = function (m) {
          return (
            B.debug("PatchedMediaKeysApple.MediaKeys.setServerCertificate"),
            Promise.resolve(!0)
          );
        }),
        ie(Ua, Ye),
        ((u = Ua.prototype).generateRequest = function (m, _) {
          B.debug("PatchedMediaKeysApple.MediaKeySession.generateRequest"),
            (this.g = new Ft());
          try {
            (this.h = this.l.createSession("video/mp4", new Uint8Array(_))),
              (this.sessionId = this.h.sessionId || ""),
              this.j.H(this.h, "webkitkeymessage", this.Gg.bind(this)),
              this.j.H(this.h, "webkitkeyadded", this.Eg.bind(this)),
              this.j.H(this.h, "webkitkeyerror", this.Fg.bind(this)),
              ru(this, "status-pending");
          } catch (R) {
            this.g.reject(R);
          }
          return this.g;
        }),
        (u.load = function () {
          return (
            B.debug("PatchedMediaKeysApple.MediaKeySession.load"),
            Promise.reject(Error("MediaKeySession.load not yet supported"))
          );
        }),
        (u.update = function (m) {
          B.debug("PatchedMediaKeysApple.MediaKeySession.update"),
            (this.i = new Ft());
          try {
            this.h.update(new Uint8Array(m));
          } catch (_) {
            this.i.reject(_);
          }
          return this.i;
        }),
        (u.close = function () {
          B.debug("PatchedMediaKeysApple.MediaKeySession.close");
          try {
            this.h.close(), this.closed.resolve(), this.j.nb();
          } catch (m) {
            this.closed.reject(m);
          }
          return this.closed;
        }),
        (u.remove = function () {
          return (
            B.debug("PatchedMediaKeysApple.MediaKeySession.remove"),
            Promise.reject(
              Error(
                "MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"
              )
            )
          );
        }),
        (u.Gg = function (m) {
          B.debug("PatchedMediaKeysApple.onWebkitKeyMessage_", m),
            this.g && (this.g.resolve(), (this.g = null)),
            this.dispatchEvent(
              new Je("message", {
                messageType:
                  this.keyStatuses.g == null
                    ? "license-request"
                    : "license-renewal",
                message: m.message.buffer,
              })
            );
        }),
        (u.Eg = function (m) {
          B.debug("PatchedMediaKeysApple.onWebkitKeyAdded_", m),
            this.i && (ru(this, "usable"), this.i.resolve(), (this.i = null));
        }),
        (u.Fg = function (m) {
          if (
            (B.debug("PatchedMediaKeysApple.onWebkitKeyError_", m),
            ((m = Error("EME PatchedMediaKeysApple key error")).errorCode =
              this.h.error),
            this.g != null)
          )
            this.g.reject(m), (this.g = null);
          else if (this.i != null) this.i.reject(m), (this.i = null);
          else
            switch (this.h.error.code) {
              case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:
              case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:
                ru(this, "output-not-allowed");
                break;
              default:
                ru(this, "internal-error");
            }
        }),
        ((u = FP.prototype).forEach = function (m) {
          this.g && m(this.g, Tg);
        }),
        (u.get = function (m) {
          if (this.has(m)) return this.g;
        }),
        (u.has = function (m) {
          var _ = Tg;
          return !(!this.g || !Ht.Ha(new Uint8Array(m), new Uint8Array(_)));
        }),
        (u.entries = function () {}),
        (u.keys = function () {}),
        (u.values = function () {}),
        bu(function () {
          i.HTMLVideoElement &&
            i.WebKitMediaKeys &&
            (B.info("Using Apple-prefixed EME"),
            (Tg = new Uint8Array([0]).buffer),
            delete HTMLMediaElement.prototype.mediaKeys,
            (HTMLMediaElement.prototype.mediaKeys = null),
            (HTMLMediaElement.prototype.setMediaKeys = gi),
            (i.MediaKeys = Qr),
            (i.MediaKeySystemAccess = er),
            (navigator.requestMediaKeySystemAccess = nn));
        }),
        (yG.prototype.createMediaKeys = function () {
          B.debug("PatchedMediaKeysMs.MediaKeySystemAccess.createMediaKeys");
          var m = new vG(this.keySystem);
          return Promise.resolve(m);
        }),
        (yG.prototype.getConfiguration = function () {
          return (
            B.debug("PatchedMediaKeysMs.MediaKeySystemAccess.getConfiguration"),
            this.g
          );
        }),
        (vG.prototype.createSession = function (m) {
          if (
            (B.debug("PatchedMediaKeysMs.MediaKeys.createSession"),
            (m = m || "temporary") != "temporary")
          )
            throw new TypeError(
              "Session type " + m + " is unsupported on this platform."
            );
          return new h7(this.h);
        }),
        (vG.prototype.setServerCertificate = function () {
          return (
            B.debug("PatchedMediaKeysMs.MediaKeys.setServerCertificate"),
            Promise.resolve(!1)
          );
        }),
        ie(h7, Ye),
        ((u = h7.prototype).generateRequest = function (m, _) {
          B.debug("PatchedMediaKeysMs.MediaKeySession.generateRequest"),
            (this.g = new Ft());
          try {
            (this.i = this.l.createSession(
              "video/mp4",
              new Uint8Array(_),
              null
            )),
              this.j.H(this.i, "mskeymessage", this.dg.bind(this)),
              this.j.H(this.i, "mskeyadded", this.bg.bind(this)),
              this.j.H(this.i, "mskeyerror", this.cg.bind(this)),
              BP(this, "status-pending");
          } catch (R) {
            this.g.reject(R);
          }
          return this.g;
        }),
        (u.load = function () {
          return (
            B.debug("PatchedMediaKeysMs.MediaKeySession.load"),
            Promise.reject(Error("MediaKeySession.load not yet supported"))
          );
        }),
        (u.update = function (m) {
          B.debug("PatchedMediaKeysMs.MediaKeySession.update"),
            (this.h = new Ft());
          try {
            this.i.update(new Uint8Array(m));
          } catch (_) {
            this.h.reject(_);
          }
          return this.h;
        }),
        (u.close = function () {
          B.debug("PatchedMediaKeysMs.MediaKeySession.close");
          try {
            this.i.close(), this.closed.resolve(), this.j.nb();
          } catch (m) {
            this.closed.reject(m);
          }
          return this.closed;
        }),
        (u.remove = function () {
          return (
            B.debug("PatchedMediaKeysMs.MediaKeySession.remove"),
            Promise.reject(
              Error(
                "MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"
              )
            )
          );
        }),
        (u.dg = function (m) {
          B.debug("PatchedMediaKeysMs.onMsKeyMessage_", m),
            this.g && (this.g.resolve(), (this.g = null)),
            this.dispatchEvent(
              new Je("message", {
                messageType:
                  this.keyStatuses.g == null
                    ? "license-request"
                    : "license-renewal",
                message: m.message.buffer,
              })
            );
        }),
        (u.bg = function (m) {
          B.debug("PatchedMediaKeysMs.onMsKeyAdded_", m),
            this.g
              ? (B.debug("Simulating completion for a PR persistent license."),
                BP(this, "usable"),
                this.g.resolve(),
                (this.g = null))
              : this.h &&
                (BP(this, "usable"), this.h.resolve(), (this.h = null));
        }),
        (u.cg = function (m) {
          if (
            (B.debug("PatchedMediaKeysMs.onMsKeyError_", m),
            ((m = Error("EME PatchedMediaKeysMs key error")).errorCode =
              this.i.error),
            this.g != null)
          )
            this.g.reject(m), (this.g = null);
          else if (this.h != null) this.h.reject(m), (this.h = null);
          else
            switch (this.i.error.code) {
              case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:
              case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:
                BP(this, "output-not-allowed");
                break;
              default:
                BP(this, "internal-error");
            }
        }),
        ((u = epe.prototype).forEach = function (m) {
          this.g && m(this.g, uy);
        }),
        (u.get = function (m) {
          if (this.has(m)) return this.g;
        }),
        (u.has = function (m) {
          var _ = uy;
          return !(!this.g || !Ht.Ha(new Uint8Array(m), new Uint8Array(_)));
        }),
        (u.entries = function () {}),
        (u.keys = function () {}),
        (u.values = function () {}),
        bu(function () {
          !i.HTMLVideoElement ||
            !i.MSMediaKeys ||
            (navigator.requestMediaKeySystemAccess &&
              MediaKeySystemAccess.prototype.getConfiguration) ||
            (B.info("Using ms-prefixed EME v20140218"),
            (uy = new Uint8Array([0]).buffer),
            delete HTMLMediaElement.prototype.mediaKeys,
            (HTMLMediaElement.prototype.mediaKeys = null),
            (HTMLMediaElement.prototype.setMediaKeys = est),
            (i.MediaKeys = vG),
            (i.MediaKeySystemAccess = yG),
            (navigator.requestMediaKeySystemAccess = UP));
        }),
        (f7.prototype.createSession = function () {}),
        (f7.prototype.setServerCertificate = function () {}),
        (p7.prototype.getConfiguration = function () {}),
        (p7.prototype.createMediaKeys = function () {}),
        bu(function () {
          !i.HTMLVideoElement ||
            (navigator.requestMediaKeySystemAccess &&
              MediaKeySystemAccess.prototype.getConfiguration) ||
            (B.info("EME not available."),
            (navigator.requestMediaKeySystemAccess = nst),
            delete HTMLMediaElement.prototype.mediaKeys,
            (HTMLMediaElement.prototype.mediaKeys = null),
            (HTMLMediaElement.prototype.setMediaKeys = rst),
            (i.MediaKeys = f7),
            (i.MediaKeySystemAccess = p7));
        }, -10);
      var g7,
        bG = "";
      function m7(m) {
        return bG ? bG + m.charAt(0).toUpperCase() + m.slice(1) : m;
      }
      function ist(m, _) {
        B.debug("PatchedMediaKeysWebkit.requestMediaKeySystemAccess");
        try {
          var R = new _G(m, _);
          return Promise.resolve(R);
        } catch (M) {
          return Promise.reject(M);
        }
      }
      function ast(m) {
        B.debug("PatchedMediaKeysWebkit.setMediaKeys");
        var _ = this.mediaKeys;
        return (
          _ && _ != m && tpe(_, null),
          delete this.mediaKeys,
          (this.mediaKeys = m) && tpe(m, this),
          Promise.resolve()
        );
      }
      function _G(m, _) {
        B.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess"),
          (this.g = this.keySystem = m);
        var R = !1;
        m == "org.w3.clearkey" &&
          ((this.g = "webkit-org.w3.clearkey"), (R = !1));
        var M = !1,
          x = document.getElementsByTagName("video");
        x = x.length ? x[0] : document.createElement("video");
        for (var z = 0; z < _.length; ++z) {
          var J = _[z],
            te = {
              audioCapabilities: [],
              videoCapabilities: [],
              persistentState: "optional",
              distinctiveIdentifier: "optional",
              initDataTypes: J.initDataTypes,
              sessionTypes: ["temporary"],
              label: J.label,
            },
            pe = !1;
          if (J.audioCapabilities)
            for (var xe = 0; xe < J.audioCapabilities.length; ++xe) {
              var Be = J.audioCapabilities[xe];
              if (Be.contentType) {
                pe = !0;
                var bt = Be.contentType.split(";")[0];
                x.canPlayType(bt, this.g) &&
                  (te.audioCapabilities.push(Be), (M = !0));
              }
            }
          if (J.videoCapabilities)
            for (xe = 0; xe < J.videoCapabilities.length; ++xe)
              (Be = J.videoCapabilities[xe]).contentType &&
                ((pe = !0),
                x.canPlayType(Be.contentType, this.g) &&
                  (te.videoCapabilities.push(Be), (M = !0)));
          if (
            (pe ||
              (M =
                x.canPlayType("video/mp4", this.g) ||
                x.canPlayType("video/webm", this.g)),
            J.persistentState == "required" &&
              (R
                ? ((te.persistentState = "required"),
                  (te.sessionTypes = ["persistent-license"]))
                : (M = !1)),
            M)
          )
            return void (this.h = te);
        }
        throw (
          ((R = "Unsupported keySystem"),
          (m != "org.w3.clearkey" && m != "com.widevine.alpha") ||
            (R = "None of the requested configurations were supported."),
          ((R = Error(R)).name = "NotSupportedError"),
          (R.code = DOMException.NOT_SUPPORTED_ERR),
          R)
        );
      }
      function y7(m) {
        B.debug("PatchedMediaKeysWebkit.MediaKeys"),
          (this.l = m),
          (this.h = null),
          (this.g = new Yr()),
          (this.i = []),
          (this.j = {});
      }
      function tpe(m, _) {
        (m.h = _), m.g.nb();
        var R = bG;
        _ &&
          (m.g.H(_, R + "needkey", m.hg.bind(m)),
          m.g.H(_, R + "keymessage", m.Jg.bind(m)),
          m.g.H(_, R + "keyadded", m.Hg.bind(m)),
          m.g.H(_, R + "keyerror", m.Ig.bind(m)));
      }
      function v7(m, _) {
        var R = m.j[_];
        return R
          ? (B.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_", R), R)
          : (R = m.i.shift())
          ? ((R.sessionId = _),
            (m.j[_] = R),
            B.debug("PatchedMediaKeysWebkit.MediaKeys.findSession_", R),
            R)
          : null;
      }
      function b7(m, _, R) {
        B.debug("PatchedMediaKeysWebkit.MediaKeySession"),
          Ye.call(this),
          (this.j = m),
          (this.m = !1),
          (this.g = this.h = null),
          (this.i = _),
          (this.l = R),
          (this.sessionId = ""),
          (this.expiration = NaN),
          (this.closed = new Ft()),
          (this.keyStatuses = new rpe());
      }
      function npe(m, _, R) {
        if (m.m)
          return Promise.reject(Error("The session is already initialized."));
        m.m = !0;
        try {
          if (m.l == "persistent-license")
            if (R) var M = new Uint8Array(Sn("LOAD_SESSION|" + R));
            else {
              var x = Sn("PERSISTENT|"),
                z = new Uint8Array(x.byteLength + _.byteLength);
              z.set(new Uint8Array(x), 0),
                z.set(new Uint8Array(_), x.byteLength),
                (M = z);
            }
          else M = new Uint8Array(_);
        } catch (te) {
          return Promise.reject(te);
        }
        m.h = new Ft();
        var J = m7("generateKeyRequest");
        try {
          m.j[J](m.i, M);
        } catch (te) {
          if (te.name != "InvalidStateError")
            return (m.h = null), Promise.reject(te);
          new Ut(function () {
            try {
              m.j[J](m.i, M);
            } catch (pe) {
              m.h.reject(pe), (m.h = null);
            }
          }).V(0.01);
        }
        return m.h;
      }
      function _7(m, _) {
        var R = m.keyStatuses;
        (R.size = _ == null ? 0 : 1),
          (R.g = _),
          m.dispatchEvent(new Je("keystatuseschange"));
      }
      function rpe() {
        (this.size = 0), (this.g = void 0);
      }
      function ost(m) {
        if ((m = m.target).webkitPresentationMode == "picture-in-picture") {
          document.pictureInPictureElement = m;
          var _ = new Event("enterpictureinpicture");
          m.dispatchEvent(_);
        } else
          document.pictureInPictureElement == m &&
            (document.pictureInPictureElement = null),
            (_ = new Event("leavepictureinpicture")),
            m.dispatchEvent(_);
      }
      function sst() {
        return this.webkitSupportsPresentationMode("picture-in-picture")
          ? (this.webkitSetPresentationMode("picture-in-picture"),
            (document.pictureInPictureElement = this),
            Promise.resolve())
          : Promise.reject(Error("PiP not allowed by video element"));
      }
      function lst() {
        var m = document.pictureInPictureElement;
        return m
          ? (m.webkitSetPresentationMode("inline"),
            (document.pictureInPictureElement = null),
            Promise.resolve())
          : Promise.reject(Error("No picture in picture element found"));
      }
      function ust() {
        return (
          !!this.hasAttribute("disablePictureInPicture") ||
          !this.webkitSupportsPresentationMode("picture-in-picture")
        );
      }
      function cst(m) {
        m
          ? this.setAttribute("disablePictureInPicture", "")
          : this.removeAttribute("disablePictureInPicture");
      }
      function dst() {
        return {
          droppedVideoFrames: this.webkitDroppedFrameCount,
          totalVideoFrames: this.webkitDecodedFrameCount,
          corruptedVideoFrames: 0,
          creationTime: NaN,
          totalFrameDelay: 0,
        };
      }
      function T7(m, _, R) {
        return new i.TextTrackCue(m, _, R);
      }
      function hst(m, _, R) {
        return new i.TextTrackCue(m + "-" + _ + "-" + R, m, _, R);
      }
      function e1() {}
      (_G.prototype.createMediaKeys = function () {
        B.debug("PatchedMediaKeysWebkit.MediaKeySystemAccess.createMediaKeys");
        var m = new y7(this.g);
        return Promise.resolve(m);
      }),
        (_G.prototype.getConfiguration = function () {
          return (
            B.debug(
              "PatchedMediaKeysWebkit.MediaKeySystemAccess.getConfiguration"
            ),
            this.h
          );
        }),
        ((u = y7.prototype).createSession = function (m) {
          if (
            (B.debug("PatchedMediaKeysWebkit.MediaKeys.createSession"),
            (m = m || "temporary") != "temporary" && m != "persistent-license")
          )
            throw new TypeError(
              "Session type " + m + " is unsupported on this platform."
            );
          var _ = this.h || document.createElement("video");
          return (
            _.src || (_.src = "about:blank"),
            (m = new b7(_, this.l, m)),
            this.i.push(m),
            m
          );
        }),
        (u.setServerCertificate = function () {
          return (
            B.debug("PatchedMediaKeysWebkit.MediaKeys.setServerCertificate"),
            Promise.resolve(!1)
          );
        }),
        (u.hg = function (m) {
          B.debug("PatchedMediaKeysWebkit.onWebkitNeedKey_", m);
          var _ = document.createEvent("CustomEvent");
          _.initCustomEvent("encrypted", !1, !1, null),
            (_.initDataType = "cenc"),
            m.initData instanceof ArrayBuffer
              ? (_.initData = m.initData)
              : (_.initData = m.initData.buffer),
            this.h.dispatchEvent(_);
        }),
        (u.Jg = function (m) {
          B.debug("PatchedMediaKeysWebkit.onWebkitKeyMessage_", m);
          var _ = v7(this, m.sessionId);
          _
            ? ((m = new Je("message", {
                messageType:
                  _.keyStatuses.g == null ? "licenserequest" : "licenserenewal",
                message: m.message,
              })),
              B.debug("PatchedMediaKeysWebkit.MediaKeySession.generated"),
              _.h && (_.h.resolve(), (_.h = null)),
              _.dispatchEvent(m))
            : B.error("Session not found", m.sessionId);
        }),
        (u.Hg = function (m) {
          B.debug("PatchedMediaKeysWebkit.onWebkitKeyAdded_", m),
            (m = v7(this, m.sessionId)) &&
              (B.debug("PatchedMediaKeysWebkit.MediaKeySession.ready"),
              _7(m, "usable"),
              m.g && m.g.resolve(),
              (m.g = null));
        }),
        (u.Ig = function (m) {
          B.debug("PatchedMediaKeysWebkit.onWebkitKeyError_", m);
          var _ = v7(this, m.sessionId);
          _ && _.handleError(m);
        }),
        ie(b7, Ye),
        ((u = b7.prototype).handleError = function (m) {
          B.debug("PatchedMediaKeysWebkit.MediaKeySession.handleError", m);
          var _ = Error("EME v0.1b key error"),
            R = m.errorCode;
          (R.systemCode = m.systemCode),
            (_.errorCode = R),
            !m.sessionId && this.h
              ? (m.systemCode == 45 &&
                  (_.message = "Unsupported session type."),
                this.h.reject(_),
                (this.h = null))
              : m.sessionId && this.g
              ? (this.g.reject(_), (this.g = null))
              : ((_ = m.systemCode),
                m.errorCode.code == MediaKeyError.MEDIA_KEYERR_OUTPUT
                  ? _7(this, "output-restricted")
                  : _7(this, _ == 1 ? "expired" : "internal-error"));
        }),
        (u.Qd = function (m, _) {
          if (this.g)
            this.g
              .then(this.Qd.bind(this, m, _))
              .catch(this.Qd.bind(this, m, _));
          else {
            if (((this.g = m), this.i == "webkit-org.w3.clearkey")) {
              var R = un(_),
                M = JSON.parse(R);
              M.keys[0].kty != "oct" &&
                (this.g.reject(
                  Error("Response is not a valid JSON Web Key Set.")
                ),
                (this.g = null)),
                (R = Ht.Ja(M.keys[0].k)),
                (M = Ht.Ja(M.keys[0].kid));
            } else (R = new Uint8Array(_)), (M = null);
            var x = m7("addKey");
            try {
              this.j[x](this.i, R, M, this.sessionId);
            } catch (z) {
              this.g.reject(z), (this.g = null);
            }
          }
        }),
        (u.generateRequest = function (m, _) {
          return (
            B.debug("PatchedMediaKeysWebkit.MediaKeySession.generateRequest"),
            npe(this, _, null)
          );
        }),
        (u.load = function (m) {
          return (
            B.debug("PatchedMediaKeysWebkit.MediaKeySession.load"),
            this.l == "persistent-license"
              ? npe(this, null, m)
              : Promise.reject(Error("Not a persistent session."))
          );
        }),
        (u.update = function (m) {
          B.debug("PatchedMediaKeysWebkit.MediaKeySession.update", m);
          var _ = new Ft();
          return this.Qd(_, m), _;
        }),
        (u.close = function () {
          if (
            (B.debug("PatchedMediaKeysWebkit.MediaKeySession.close"),
            this.l != "persistent-license")
          ) {
            if (!this.sessionId)
              return (
                this.closed.reject(Error("The session is not callable.")),
                this.closed
              );
            var m = m7("cancelKeyRequest");
            try {
              this.j[m](this.i, this.sessionId);
            } catch {}
          }
          return this.closed.resolve(), this.closed;
        }),
        (u.remove = function () {
          return (
            B.debug("PatchedMediaKeysWebkit.MediaKeySession.remove"),
            this.l != "persistent-license"
              ? Promise.reject(Error("Not a persistent session."))
              : this.close()
          );
        }),
        ((u = rpe.prototype).forEach = function (m) {
          this.g && m(this.g, g7);
        }),
        (u.get = function (m) {
          if (this.has(m)) return this.g;
        }),
        (u.has = function (m) {
          var _ = g7;
          return !(!this.g || !Ht.Ha(new Uint8Array(m), new Uint8Array(_)));
        }),
        (u.entries = function () {}),
        (u.keys = function () {}),
        (u.values = function () {}),
        bu(function () {
          if (
            !(
              !i.HTMLVideoElement ||
              (navigator.requestMediaKeySystemAccess &&
                MediaKeySystemAccess.prototype.getConfiguration)
            )
          ) {
            if (HTMLMediaElement.prototype.webkitGenerateKeyRequest)
              B.info("Using webkit-prefixed EME v0.1b"), (bG = "webkit");
            else {
              if (!HTMLMediaElement.prototype.generateKeyRequest) return;
              B.info("Using nonprefixed EME v0.1b");
            }
            (g7 = new Uint8Array([0]).buffer),
              (navigator.requestMediaKeySystemAccess = ist),
              delete HTMLMediaElement.prototype.mediaKeys,
              (HTMLMediaElement.prototype.mediaKeys = null),
              (HTMLMediaElement.prototype.setMediaKeys = ast),
              (i.MediaKeys = y7),
              (i.MediaKeySystemAccess = _G);
          }
        }),
        bu(function () {
          if (i.HTMLVideoElement) {
            var m = HTMLVideoElement.prototype;
            (m.requestPictureInPicture && document.exitPictureInPicture) ||
              !m.webkitSupportsPresentationMode ||
              (B.debug("PiPWebkit.install"),
              (document.pictureInPictureEnabled = !0),
              (document.pictureInPictureElement = null),
              (m.requestPictureInPicture = sst),
              Object.defineProperty(m, "disablePictureInPicture", {
                get: ust,
                set: cst,
                enumerable: !0,
                configurable: !0,
              }),
              (document.exitPictureInPicture = lst),
              document.addEventListener(
                "webkitpresentationmodechanged",
                ost,
                !0
              ));
          }
        }),
        bu(function () {
          if ((B.debug("VideoPlayPromise.install"), i.HTMLMediaElement)) {
            var m = HTMLMediaElement.prototype.play;
            HTMLMediaElement.prototype.play = function () {
              var _ = m.apply(this);
              return _ && _.catch(function () {}), _;
            };
          }
        }),
        bu(function () {
          if (i.HTMLVideoElement) {
            var m = HTMLVideoElement.prototype;
            !m.getVideoPlaybackQuality &&
              "webkitDroppedFrameCount" in m &&
              (m.getVideoPlaybackQuality = dst);
          }
        }),
        bu(function () {
          if (i.VTTCue) B.info("Using native VTTCue.");
          else if (i.TextTrackCue) {
            var m = TextTrackCue.length;
            if (m == 3)
              B.info("Using VTTCue polyfill from 3 argument TextTrackCue."),
                (i.VTTCue = T7);
            else if (m == 6)
              B.info("Using VTTCue polyfill from 6 argument TextTrackCue."),
                (i.VTTCue = hst);
            else {
              try {
                var _ = !!T7(1, 2, "");
              } catch {
                _ = !1;
              }
              _ &&
                (B.info("Using VTTCue polyfill from 3 argument TextTrackCue."),
                (i.VTTCue = T7));
            }
          } else B.error("VTTCue not available.");
        }),
        Z("shaka.text.TtmlTextParser", e1),
        (e1.prototype.parseInit = function () {}),
        (e1.prototype.parseInit = e1.prototype.parseInit),
        (e1.prototype.parseMedia = function (m, _) {
          var R = un(m),
            M = [],
            x = new DOMParser(),
            z = null;
          if (R == "") return M;
          try {
            z = x.parseFromString(R, "text/xml");
          } catch {
            throw new re(2, 2, 2005, "Failed to parse TTML.");
          }
          if (z) {
            if ((R = z.getElementsByTagName("parsererror")[0]))
              throw new re(2, 2, 2005, R.textContent);
            if (!(x = z.getElementsByTagName("tt")[0]))
              throw new re(2, 2, 2005, "TTML does not contain <tt> tag.");
            var J = Hr.getAttributeNS(
                x,
                "http://www.w3.org/ns/ttml#parameter",
                "frameRate"
              ),
              te = Hr.getAttributeNS(
                x,
                "http://www.w3.org/ns/ttml#parameter",
                "subFrameRate"
              ),
              pe = Hr.getAttributeNS(
                x,
                "http://www.w3.org/ns/ttml#parameter",
                "frameRateMultiplier"
              ),
              xe = Hr.getAttributeNS(
                x,
                "http://www.w3.org/ns/ttml#parameter",
                "tickRate"
              );
            if (
              ((z = x.getAttribute("xml:space") || "default"),
              (R = Hr.getAttributeNS(
                x,
                "http://www.w3.org/ns/ttml#styling",
                "extent"
              )),
              z != "default" && z != "preserve")
            )
              throw new re(2, 2, 2005, "Invalid xml:space value: " + z);
            (z = z == "default"),
              (J = new gst(J, te, pe, xe)),
              (te = VP(x.getElementsByTagName("metadata")[0])),
              (pe = VP(x.getElementsByTagName("styling")[0])),
              (xe = VP(x.getElementsByTagName("layout")[0]));
            for (var Be = [], bt = 0; bt < xe.length; bt++) {
              var dt,
                mt,
                xt = xe[bt],
                Nt = pe,
                en = R,
                Tn = new cg(),
                In = xt.getAttribute("xml:id");
              In
                ? ((Tn.id = In),
                  (In = null),
                  en && (In = E7.exec(en) || S7.exec(en)),
                  (en = In ? Number(In[1]) : null),
                  (In = In ? Number(In[2]) : null),
                  (dt = TG(xt, Nt, "extent")) &&
                    (dt = (mt = E7.exec(dt)) || S7.exec(dt)) != null &&
                    ((Tn.width =
                      en != null ? (100 * Number(dt[1])) / en : Number(dt[1])),
                    (Tn.height =
                      In != null ? (100 * Number(dt[2])) / In : Number(dt[2])),
                    (Tn.widthUnits = mt || en != null ? J0 : 0),
                    (Tn.heightUnits = mt || In != null ? J0 : 0)),
                  (xt = TG(xt, Nt, "origin")) &&
                    (dt = (mt = E7.exec(xt)) || S7.exec(xt)) != null &&
                    ((Tn.viewportAnchorX =
                      en != null ? (100 * Number(dt[1])) / en : Number(dt[1])),
                    (Tn.viewportAnchorY =
                      In != null ? (100 * Number(dt[2])) / In : Number(dt[2])),
                    (Tn.viewportAnchorUnits = mt || en != null ? J0 : 0)))
                : (B.v(
                    "TtmlTextParser parser encountered a region with no id. Region will be ignored."
                  ),
                  (Tn = null)),
                Tn && Be.push(Tn);
            }
            for (
              R = dpe(x.getElementsByTagName("body")[0]), x = (R = b(R)).next();
              !x.done;
              x = R.next()
            )
              (x = fpe(x.value, _.periodStart, J, te, pe, xe, Be, z, !1)) &&
                M.push(x);
          }
          return M;
        }),
        (e1.prototype.parseMedia = e1.prototype.parseMedia);
      var HP,
        XP,
        E7 =
          /^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,
        ipe = /^(\d+px|\d+em)$/,
        S7 = /^(\d+)px (\d+)px$/,
        ape = /^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,
        ope = /^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,
        spe = /^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,
        lpe = /^(\d*(?:\.\d*)?)f$/,
        upe = /^(\d*(?:\.\d*)?)t$/,
        cpe =
          /^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,
        fst = {
          left: Lm,
          center: "center",
          right: "end",
          start: Lm,
          end: "end",
        },
        pst = { left: "line-left", center: "center", right: "line-right" };
      function VP(m) {
        var _ = [];
        if (!m) return _;
        for (var R = b(m.childNodes), M = R.next(); !M.done; M = R.next())
          (M = M.value).nodeType == Node.ELEMENT_NODE &&
            M.nodeName !== "br" &&
            ((M = VP(M)), (_ = _.concat(M)));
        return _.length || _.push(m), _;
      }
      function dpe(m) {
        if (!m) return [];
        for (
          var _ = [], R = (m = b(m.childNodes)).next();
          !R.done;
          R = m.next()
        )
          (R = R.value) instanceof Element &&
            (R.hasAttribute("begin") ? _.push(R) : (_ = _.concat(dpe(R))));
        return _;
      }
      function hpe(m, _) {
        for (
          var R = "", M = b(m.childNodes), x = M.next();
          !x.done;
          x = M.next()
        )
          (x = x.value).nodeName == "br" && m.childNodes[0] !== x
            ? (R += `
`)
            : x.childNodes && 0 < x.childNodes.length
            ? (R += hpe(x, _))
            : _
            ? (R += x = (x = x.textContent.trim()).replace(/\s+/g, " "))
            : (R += x.textContent);
        return R;
      }
      function fpe(m, _, R, M, x, z, J, te, pe) {
        if (pe && m.nodeName == "br")
          return ((m = new Cl(0, 0, "")).spacer = !0), m;
        var xe = /^[\s\n]*$/.test(m.textContent),
          Be =
            m.nodeType == Node.ELEMENT_NODE &&
            !m.hasAttribute("begin") &&
            !m.hasAttribute("end");
        if (m.nodeType != Node.ELEMENT_NODE || (Be && xe) || (Be && !pe))
          return null;
        (te =
          (m.getAttribute("xml:space") || (te ? "default" : "preserve")) ==
          "default"),
          (xe = w7(m.getAttribute("begin"), R)),
          (Be = w7(m.getAttribute("end"), R));
        var bt = w7(m.getAttribute("dur"), R);
        if (
          (Be == null && bt != null && (Be = xe + bt),
          !pe && (xe == null || Be == null))
        )
          throw new re(2, 2, 2001);
        if (
          ((xe = pe && xe == null ? 0 : xe + _),
          (Be = pe && Be == null ? 0 : Be + _),
          (bt = ""),
          (pe = []),
          Array.from(m.childNodes).find(function (Nt) {
            return Nt.nodeType === Node.TEXT_NODE && /\S+/.test(Nt.textContent);
          }))
        )
          bt = hpe(m, te);
        else
          for (
            var dt = b(m.childNodes), mt = dt.next();
            !mt.done;
            mt = dt.next()
          )
            (mt = fpe(mt.value, _, R, M, x, z, J, te, !0)) &&
              ((mt.startTime = mt.startTime || xe),
              (mt.endTime = mt.endTime || Be),
              pe.push(mt));
        if (
          (((_ = new Cl(xe, Be, bt)).nestedCues = pe),
          (z = A7(m, "region", z, "")[0]) && z.getAttribute("xml:id"))
        ) {
          var xt = z.getAttribute("xml:id");
          _.region = J.filter(function (Nt) {
            return Nt.id == xt;
          })[0];
        }
        return (
          (function (Nt, en, Tn, In, Qn) {
            Eg(en, Tn, Qn, "direction") == "rtl" && (Nt.direction = "rtl");
            var vr = Eg(en, Tn, Qn, "writingMode");
            if (
              (vr == "tb" || vr == "tblr"
                ? (Nt.writingMode = "vertical-lr")
                : vr == "tbrl"
                ? (Nt.writingMode = "vertical-rl")
                : vr == "rltb" || vr == "rl"
                ? (Nt.direction = "rtl")
                : vr && (Nt.direction = Q0),
              (vr = Eg(en, Tn, Qn, "textAlign"))
                ? ((Nt.positionAlign = pst[vr]),
                  (Nt.lineAlign = fst[vr]),
                  (Nt.textAlign = hh[vr.toUpperCase()]))
                : (Nt.textAlign = "start"),
              (vr = Eg(en, Tn, Qn, "displayAlign")) &&
                (Nt.displayAlign = Fb[vr.toUpperCase()]),
              (vr = Eg(en, Tn, Qn, "color")) && (Nt.color = vr),
              (vr = Eg(en, Tn, Qn, "backgroundColor")) &&
                (Nt.backgroundColor = vr),
              (vr = Eg(en, Tn, Qn, "fontFamily")) && (Nt.fontFamily = vr),
              (vr = Eg(en, Tn, Qn, "fontWeight")) &&
                vr == "bold" &&
                (Nt.fontWeight = 700),
              (vr = Eg(en, Tn, Qn, "wrapOption")) &&
                vr == "noWrap" &&
                (Nt.wrapLine = !1),
              (vr = Eg(en, Tn, Qn, "lineHeight")) &&
                vr.match(ipe) &&
                (Nt.lineHeight = vr),
              (vr = Eg(en, Tn, Qn, "fontSize")) &&
                vr.match(ipe) &&
                (Nt.fontSize = vr),
              (vr = Eg(en, Tn, Qn, "fontStyle")) &&
                (Nt.fontStyle = Hb[vr.toUpperCase()]),
              In)
            ) {
              vr = In.getAttribute("imageType") || In.getAttribute("imagetype");
              var mr = In.getAttribute("encoding");
              (In = In.textContent.trim()),
                vr == "PNG" &&
                  mr == "Base64" &&
                  In &&
                  (Nt.backgroundImage = "data:image/png;base64," + In);
            }
            (Tn = TG(Tn, Qn, "textDecoration")) && ppe(Nt, Tn),
              (en = R7(en, Qn, "textDecoration")) && ppe(Nt, en);
          })(
            _,
            m,
            z,
            (M = A7(
              m,
              "backgroundImage",
              M,
              "#",
              "http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt"
            )[0]),
            x
          ),
          _
        );
      }
      function ppe(m, _) {
        for (var R = _.split(" "), M = 0; M < R.length; M++)
          switch (R[M]) {
            case "underline":
              m.textDecoration.includes("underline") ||
                m.textDecoration.push("underline");
              break;
            case "noUnderline":
              m.textDecoration.includes("underline") &&
                Pn(m.textDecoration, "underline");
              break;
            case "lineThrough":
              m.textDecoration.includes("lineThrough") ||
                m.textDecoration.push("lineThrough");
              break;
            case "noLineThrough":
              m.textDecoration.includes("lineThrough") &&
                Pn(m.textDecoration, "lineThrough");
              break;
            case "overline":
              m.textDecoration.includes("overline") ||
                m.textDecoration.push("overline");
              break;
            case "noOverline":
              m.textDecoration.includes("overline") &&
                Pn(m.textDecoration, "overline");
          }
      }
      function Eg(m, _, R, M) {
        return (m = R7(m, R, M)) ? m : TG(_, R, M);
      }
      function TG(m, _, R) {
        if (!m) return null;
        for (var M = VP(m), x = 0; x < M.length; x++) {
          var z = Hr.getAttributeNS(
            M[x],
            "http://www.w3.org/ns/ttml#styling",
            R
          );
          if (z) return z;
        }
        return gpe(m, _, R);
      }
      function R7(m, _, R) {
        var M = Hr.getAttributeNS(m, "http://www.w3.org/ns/ttml#styling", R);
        return M || gpe(m, _, R);
      }
      function gpe(m, _, R) {
        m = A7(m, "style", _, "");
        for (var M = null, x = 0; x < m.length; x++) {
          var z = Hr.getAttributeNS(
            m[x],
            "http://www.w3.org/ns/ttml#styling",
            R
          );
          z || (z = R7(m[x], _, R)), z && (M = z);
        }
        return M;
      }
      function A7(m, _, R, M, x) {
        var z = [];
        if (!m || 1 > R.length) return z;
        var J = m;
        for (
          m = null;
          J &&
          !(m = x ? Hr.getAttributeNS(J, x, _) : J.getAttribute(_)) &&
          (J = J.parentNode) instanceof Element;

        );
        if ((_ = m)) {
          for (x = (_ = b((_ = _.split(" ")))).next(); !x.done; x = _.next())
            for (x = x.value, J = (m = b(R)).next(); !J.done; J = m.next())
              if (M + (J = J.value).getAttribute("xml:id") == x) {
                z.push(J);
                break;
              }
        }
        return z;
      }
      function w7(m, _) {
        var R = null;
        if (ape.test(m)) {
          R = ape.exec(m);
          var M = Number(R[1]),
            x = Number(R[2]),
            z = Number(R[3]),
            J = Number(R[4]);
          R =
            (z += (J += (Number(R[5]) || 0) / _.h) / _.frameRate) +
            60 * x +
            3600 * M;
        } else
          ope.test(m)
            ? (R = k7(ope, m))
            : spe.test(m)
            ? (R = k7(spe, m))
            : lpe.test(m)
            ? ((R = lpe.exec(m)), (R = Number(R[1]) / _.frameRate))
            : upe.test(m)
            ? ((R = upe.exec(m)), (R = Number(R[1]) / _.g))
            : cpe.test(m) && (R = k7(cpe, m));
        return R;
      }
      function k7(m, _) {
        var R = m.exec(_);
        return R == null || R[0] == ""
          ? null
          : (Number(R[4]) || 0) / 1e3 +
              (Number(R[3]) || 0) +
              60 * (Number(R[2]) || 0) +
              3600 * (Number(R[1]) || 0);
      }
      function gst(m, _, R, M) {
        (this.frameRate = Number(m) || 30),
          (this.h = Number(_) || 1),
          (this.g = Number(M)),
          this.g == 0 && (this.g = m ? this.frameRate * this.h : 1),
          R &&
            (m = /^(\d+) (\d+)$/g.exec(R)) &&
            (this.frameRate *= Number(m[1]) / Number(m[2]));
      }
      function cy() {
        this.g = new e1();
      }
      function dy() {}
      function mpe(m, _, R) {
        var M;
        if ((M = /^align:(start|middle|center|end|left|right)$/.exec(_)))
          (_ = M[1]), (m.textAlign = _ == "middle" ? Gv : hh[_.toUpperCase()]);
        else if ((M = /^vertical:(lr|rl)$/.exec(_)))
          m.writingMode = M[1] == "lr" ? "vertical-lr" : "vertical-rl";
        else if ((M = /^size:([\d.]+)%$/.exec(_))) m.size = Number(M[1]);
        else if (
          (M =
            /^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(
              _
            ))
        )
          (m.position = Number(M[1])),
            M[2] &&
              ((_ = M[2]),
              (m.positionAlign =
                _ == "line-left" || _ == "start"
                  ? "line-left"
                  : _ == "line-right" || _ == "end"
                  ? "line-right"
                  : "center"));
        else {
          if (!(M = /^region:(.*)$/.exec(_))) {
            e: {
              if ((R = /^line:([\d.]+)%(?:,(start|end|center))?$/.exec(_)))
                (m.lineInterpretation = 1),
                  (m.line = Number(R[1])),
                  R[2] && (m.lineAlign = Ub[R[2].toUpperCase()]);
              else {
                if (!(R = /^line:(-?\d+)(?:,(start|end|center))?$/.exec(_))) {
                  m = !1;
                  break e;
                }
                (m.lineInterpretation = ep),
                  (m.line = Number(R[1])),
                  R[2] && (m.lineAlign = Ub[R[2].toUpperCase()]);
              }
              m = !0;
            }
            return m;
          }
          (_ = (function (x, z) {
            var J = x.filter(function (te) {
              return te.id == z;
            });
            return J.length
              ? J[0]
              : (B.v(
                  "VTT parser could not find a region with id: ",
                  z,
                  " The region will be ignored."
                ),
                null);
          })(R, M[1])) && (m.region = _);
        }
        return !0;
      }
      function I7(m) {
        if ((m = zm(m, /(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g)) == null)
          return null;
        var _ = Number(m[2]),
          R = Number(m[3]);
        return 59 < _ || 59 < R
          ? null
          : Number(m[4]) / 1e3 + R + 60 * _ + 3600 * (Number(m[1]) || 0);
      }
      function C_() {
        this.g = null;
      }
      function mst(m, _, R) {
        var M, x, z;
        return (
          new Ja()
            .box(
              "payl",
              Ps(function (J) {
                M = un(J);
              })
            )
            .box(
              "iden",
              Ps(function (J) {
                x = un(J);
              })
            )
            .box(
              "sttg",
              Ps(function (J) {
                z = un(J);
              })
            )
            .parse(m),
          M
            ? (function (J, te, pe, xe, Be) {
                if (((J = new Cl(xe, Be, J)), te && (J.id = te), pe))
                  for (te = new Bc(pe), pe = Jh(te); pe; )
                    mpe(J, pe, []) ||
                      B.v(
                        "VTT parser encountered an invalid VTT setting: ",
                        pe,
                        " The setting will be ignored."
                      ),
                      lp(te),
                      (pe = Jh(te));
                return J;
              })(M, x, z, _, R)
            : null
        );
      }
      /*
       @license
       EME Encryption Scheme Polyfill
       Copyright 2019 Google LLC
       SPDX-License-Identifier: Apache-2.0
      */ function ype() {}
      function vpe() {
        HP
          ? console.debug("EmeEncryptionSchemePolyfill: Already installed.")
          : navigator.requestMediaKeySystemAccess &&
            MediaKeySystemAccess.prototype.getConfiguration
          ? ((HP = navigator.requestMediaKeySystemAccess),
            console.debug(
              "EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."
            ),
            (navigator.requestMediaKeySystemAccess = yst))
          : console.debug("EmeEncryptionSchemePolyfill: EME not found");
      }
      function yst(m, _) {
        var R = this;
        return k(function M() {
          var x;
          return $t(M, function (z) {
            switch (z.s) {
              case 1:
                return (
                  console.assert(
                    R == navigator,
                    'bad "this" for requestMediaKeySystemAccess'
                  ),
                  E(z, HP.call(R, m, _), 2)
                );
              case 2:
                return Ape((x = z.B))
                  ? (console.debug(
                      "EmeEncryptionSchemePolyfill: Native encryptionScheme support found."
                    ),
                    (navigator.requestMediaKeySystemAccess = HP),
                    z.return(x))
                  : (console.debug(
                      "EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."
                    ),
                    (navigator.requestMediaKeySystemAccess = bpe),
                    z.return(bpe.call(R, m, _)));
            }
          });
        });
      }
      function bpe(m, _) {
        var R = this;
        return k(function M() {
          var x, z, J, te, pe, xe, Be, bt;
          return $t(M, function (dt) {
            switch (dt.s) {
              case 1:
                console.assert(
                  R == navigator,
                  'bad "this" for requestMediaKeySystemAccess'
                ),
                  (x = Rpe(m)),
                  (z = []);
                for (var mt = b(_), xt = mt.next(); !xt.done; xt = mt.next())
                  (J = xt.value),
                    (te = _pe(J.videoCapabilities, x)),
                    (pe = _pe(J.audioCapabilities, x)),
                    (J.videoCapabilities &&
                      J.videoCapabilities.length &&
                      !te.length) ||
                      (J.audioCapabilities &&
                        J.audioCapabilities.length &&
                        !pe.length) ||
                      (((xe = Object.assign({}, J)).videoCapabilities = te),
                      (xe.audioCapabilities = pe),
                      z.push(xe));
                if (!z.length)
                  throw (
                    (((Be = Error(
                      "Unsupported keySystem or supportedConfigurations."
                    )).name = "NotSupportedError"),
                    (Be.code = DOMException.NOT_SUPPORTED_ERR),
                    Be)
                  );
                return E(dt, HP.call(R, m, z), 2);
              case 2:
                return (bt = dt.B), dt.return(new EG(bt, x));
            }
          });
        });
      }
      function _pe(m, _) {
        return (
          m &&
          m.filter(function (R) {
            return !R.encryptionScheme || R.encryptionScheme == _;
          })
        );
      }
      function Tpe() {}
      function Epe() {
        XP
          ? console.debug("McEncryptionSchemePolyfill: Already installed.")
          : navigator.mediaCapabilities
          ? ((XP = navigator.mediaCapabilities.decodingInfo),
            console.debug(
              "McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."
            ),
            (navigator.mediaCapabilities.decodingInfo = vst))
          : console.debug(
              "McEncryptionSchemePolyfill: MediaCapabilities not found"
            );
      }
      function vst(m) {
        var _ = this;
        return k(function R() {
          var M, x;
          return $t(R, function (z) {
            switch (z.s) {
              case 1:
                return (
                  console.assert(
                    _ == navigator.mediaCapabilities,
                    'bad "this" for decodingInfo'
                  ),
                  E(z, XP.call(_, m), 2)
                );
              case 2:
                return (
                  (M = z.B),
                  m.keySystemConfiguration
                    ? (x = M.keySystemAccess) && Ape(x)
                      ? (console.debug(
                          "McEncryptionSchemePolyfill: Native encryptionScheme support found."
                        ),
                        (navigator.mediaCapabilities.decodingInfo = XP),
                        z.return(M))
                      : (console.debug(
                          "McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."
                        ),
                        (navigator.mediaCapabilities.decodingInfo = Spe),
                        z.return(Spe.call(_, m)))
                    : z.return(M)
                );
            }
          });
        });
      }
      function Spe(m) {
        var _ = this;
        return k(function R() {
          var M, x, z, J, te, pe, xe, Be, bt;
          return $t(R, function (dt) {
            switch (dt.s) {
              case 1:
                return (
                  console.assert(
                    _ == navigator.mediaCapabilities,
                    'bad "this" for decodingInfo'
                  ),
                  (M = null),
                  m.keySystemConfiguration &&
                  ((x = m.keySystemConfiguration),
                  (z = x.keySystem),
                  (J = x.audio && x.audio.encryptionScheme),
                  (te = x.video && x.video.encryptionScheme),
                  (M = Rpe(z)),
                  (pe = {
                    powerEfficient: !1,
                    smooth: !1,
                    supported: !1,
                    keySystemAccess: null,
                    configuration: m,
                  }),
                  (J && J != M) || (te && te != M))
                    ? dt.return(pe)
                    : E(dt, XP.call(_, m), 2)
                );
              case 2:
                if ((xe = dt.B).keySystemAccess) {
                  (xe.keySystemAccess = new EG(xe.keySystemAccess, M)), dt.I(3);
                  break;
                }
                if (!m.keySystemConfiguration) {
                  dt.I(3);
                  break;
                }
                var mt = m.keySystemConfiguration,
                  xt = [],
                  Nt = [];
                return (
                  mt.audio &&
                    xt.push({
                      robustness: mt.audio.robustness || "",
                      contentType: m.audio.contentType,
                    }),
                  mt.video &&
                    Nt.push({
                      robustness: mt.video.robustness || "",
                      contentType: m.video.contentType,
                    }),
                  (mt = {
                    initDataTypes: mt.initDataType ? [mt.initDataType] : [],
                    distinctiveIdentifier: mt.distinctiveIdentifier,
                    persistentState: mt.persistentState,
                    sessionTypes: mt.sessionTypes,
                  }),
                  xt.length && (mt.audioCapabilities = xt),
                  Nt.length && (mt.videoCapabilities = Nt),
                  (Be = mt),
                  (bt = xe),
                  E(
                    dt,
                    navigator.requestMediaKeySystemAccess(
                      m.keySystemConfiguration.keySystem,
                      [Be]
                    ),
                    5
                  )
                );
              case 5:
                bt.keySystemAccess = dt.B;
              case 3:
                return dt.return(xe);
            }
          });
        });
      }
      function EG(m, _) {
        (this.h = m), (this.g = _), (this.keySystem = m.keySystem);
      }
      function Rpe(m) {
        return m.startsWith("com.widevine") ||
          m.startsWith("com.microsoft") ||
          m.startsWith("com.adobe") ||
          m.startsWith("org.w3")
          ? "cenc"
          : m.startsWith("com.apple")
          ? "cbcs-1-9"
          : (console.warn(
              "EmeEncryptionSchemePolyfill: Unknown key system:",
              m,
              "Please contribute!"
            ),
            null);
      }
      function Ape(m) {
        var _ =
          (m = m.getConfiguration()).audioCapabilities &&
          m.audioCapabilities[0];
        return !(
          !(m = (m.videoCapabilities && m.videoCapabilities[0]) || _) ||
          m.encryptionScheme === void 0
        );
      }
      function D7() {}
      function wpe() {
        vpe(), Epe();
      }
      (Nc["application/ttml+xml"] = e1),
        Z("shaka.text.Mp4TtmlParser", cy),
        (cy.prototype.parseInit = function (m) {
          var _ = !1;
          if (
            (new Ja()
              .box("moov", Rl)
              .box("trak", Rl)
              .box("mdia", Rl)
              .box("minf", Rl)
              .box("stbl", Rl)
              .ma("stsd", Lo)
              .box("stpp", function (R) {
                (_ = !0), R.parser.stop();
              })
              .parse(m),
            !_)
          )
            throw new re(2, 2, 2007);
        }),
        (cy.prototype.parseInit = cy.prototype.parseInit),
        (cy.prototype.parseMedia = function (m, _) {
          var R = !1,
            M = [];
          if (
            (new Ja()
              .box(
                "mdat",
                Ps(
                  function (x) {
                    (R = !0), (M = M.concat(this.g.parseMedia(x, _)));
                  }.bind(this)
                )
              )
              .parse(m),
            !R)
          )
            throw new re(2, 2, 2007);
          return M;
        }),
        (cy.prototype.parseMedia = cy.prototype.parseMedia),
        (Nc['application/mp4; codecs="stpp"'] = cy),
        (Nc['application/mp4; codecs="stpp.ttml.im1t"'] = cy),
        (Nc['application/mp4; codecs="stpp.TTML.im1t"'] = cy),
        Z("shaka.text.VttTextParser", dy),
        (dy.prototype.parseInit = function () {}),
        (dy.prototype.parseInit = dy.prototype.parseInit),
        (dy.prototype.parseMedia = function (m, _) {
          var R = un(m);
          if (
            ((R = (R = R.replace(
              /\r\n|\r(?=[^\n]|$)/gm,
              `
`
            )).split(/\n{2,}/m)),
            !/^WEBVTT($|[ \t\n])/m.test(R[0]))
          )
            throw new re(2, 2, 2e3);
          var M = _.segmentStart;
          if (M == null && ((M = 0), R[0].includes("X-TIMESTAMP-MAP"))) {
            var x = R[0].match(
                /LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m
              ),
              z = R[0].match(/MPEGTS:(\d+)/m);
            if (x && z) {
              if ((M = I7(new Bc(x[1]))) == null) throw new re(2, 2, 2e3);
              M = _.periodStart + (Number(z[1]) / 9e4 - M);
            }
          }
          z = [];
          var J = R[0].split(`
`);
          for (x = 1; x < J.length; x++)
            if (/^Region:/.test(J[x])) {
              var te = new Bc(J[x]),
                pe = new cg();
              Jh(te), lp(te);
              for (var xe = Jh(te); xe; ) {
                var Be;
                e: {
                  var bt = pe,
                    dt = xe;
                  if ((Be = /^id=(.*)$/.exec(dt))) bt.id = Be[1];
                  else if ((Be = /^width=(\d{1,2}|100)%$/.exec(dt)))
                    bt.width = Number(Be[1]);
                  else if ((Be = /^lines=(\d+)$/.exec(dt)))
                    (bt.height = Number(Be[1])), (bt.heightUnits = 2);
                  else if (
                    (Be = /^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(
                      dt
                    ))
                  )
                    (bt.regionAnchorX = Number(Be[1])),
                      (bt.regionAnchorY = Number(Be[2]));
                  else if (
                    (Be = /^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(
                      dt
                    ))
                  )
                    (bt.viewportAnchorX = Number(Be[1])),
                      (bt.viewportAnchorY = Number(Be[2]));
                  else {
                    if (!/^scroll=up$/.exec(dt)) {
                      Be = !1;
                      break e;
                    }
                    bt.scroll = "up";
                  }
                  Be = !0;
                }
                Be ||
                  B.v(
                    "VTT parser encountered an invalid VTTRegion setting: ",
                    xe,
                    " The setting will be ignored."
                  ),
                  lp(te),
                  (xe = Jh(te));
              }
              z.push(pe);
            }
          for (x = [], te = 1; te < R.length; te++) {
            if (
              ((Be = J =
                R[te].split(`
`)),
              (bt = M),
              (J = z),
              (Be.length == 1 && !Be[0]) ||
                /^NOTE($|[ \t])/.test(Be[0]) ||
                Be[0] == "STYLE")
            )
              J = null;
            else {
              (pe = null),
                Be[0].includes("-->") || ((pe = Be[0]), Be.splice(0, 1)),
                (dt = I7((xe = new Bc(Be[0]))));
              var mt = zm(xe, /[ \t]+--\x3e[ \t]+/g),
                xt = I7(xe);
              if (dt == null || mt == null || xt == null)
                throw new re(2, 2, 2001);
              for (
                Be = new Cl(
                  dt + bt,
                  xt + bt,
                  Be.slice(1)
                    .join(
                      `
`
                    )
                    .trim()
                ),
                  lp(xe),
                  bt = Jh(xe);
                bt;

              )
                mpe(Be, bt, J) ||
                  B.v(
                    "VTT parser encountered an invalid VTT setting: ",
                    bt,
                    " The setting will be ignored."
                  ),
                  lp(xe),
                  (bt = Jh(xe));
              pe != null && (Be.id = pe), (J = Be);
            }
            J && x.push(J);
          }
          return x;
        }),
        (dy.prototype.parseMedia = dy.prototype.parseMedia),
        (Nc["text/vtt"] = dy),
        (Nc['text/vtt; codecs="vtt"'] = dy),
        (Nc['text/vtt; codecs="wvtt"'] = dy),
        Z("shaka.text.Mp4VttParser", C_),
        (C_.prototype.parseInit = function (m) {
          var _ = !1;
          if (
            (new Ja()
              .box("moov", Rl)
              .box("trak", Rl)
              .box("mdia", Rl)
              .ma(
                "mdhd",
                function (R) {
                  R.version == 0
                    ? (R.reader.U(4),
                      R.reader.U(4),
                      (this.g = R.reader.N()),
                      R.reader.U(4))
                    : (R.reader.U(8),
                      R.reader.U(8),
                      (this.g = R.reader.N()),
                      R.reader.U(8)),
                    R.reader.U(4);
                }.bind(this)
              )
              .box("minf", Rl)
              .box("stbl", Rl)
              .ma("stsd", Lo)
              .box("wvtt", function () {
                _ = !0;
              })
              .parse(m),
            !this.g)
          )
            throw new re(2, 2, 2008);
          if (!_) throw new re(2, 2, 2008);
        }),
        (C_.prototype.parseInit = C_.prototype.parseInit),
        (C_.prototype.parseMedia = function (m, _) {
          var R = this;
          if (!this.g)
            throw (B.error("No init segment for MP4+VTT!"), new re(2, 2, 2008));
          var M,
            x = 0,
            z = [],
            J = [],
            te = !1,
            pe = !1,
            xe = !1,
            Be = null;
          if (
            (new Ja()
              .box("moof", Rl)
              .box("traf", Rl)
              .ma("tfdt", function (mt) {
                (te = !0),
                  (x = mt.version == 0 ? mt.reader.N() : mt.reader.Pb());
              })
              .ma("tfhd", function (mt) {
                var xt = mt.flags;
                (mt = mt.reader).U(4),
                  1 & xt && mt.U(8),
                  2 & xt && mt.U(4),
                  (Be = 8 & xt ? mt.N() : null);
              })
              .ma("trun", function (mt) {
                pe = !0;
                var xt = mt.version,
                  Nt = mt.flags,
                  en = (mt = mt.reader).N();
                1 & Nt && mt.U(4), 4 & Nt && mt.U(4);
                for (var Tn = [], In = 0; In < en; In++) {
                  var Qn = { duration: null, sampleSize: null, Sd: null };
                  256 & Nt && (Qn.duration = mt.N()),
                    512 & Nt && (Qn.sampleSize = mt.N()),
                    1024 & Nt && mt.U(4),
                    2048 & Nt && (Qn.Sd = xt == 0 ? mt.N() : mt.De()),
                    Tn.push(Qn);
                }
                z = Tn;
              })
              .box(
                "mdat",
                Ps(function (mt) {
                  (xe = !0), (M = mt);
                })
              )
              .parse(m),
            !xe && !te && !pe)
          )
            throw new re(2, 2, 2008);
          var bt = x,
            dt = new Zi(new DataView(M.buffer, M.byteOffset, M.byteLength), 0);
          return (
            z.forEach(function (mt) {
              var xt = mt.duration || Be,
                Nt = mt.Sd ? x + mt.Sd : bt;
              bt = Nt + (xt || 0);
              var en = 0;
              do {
                var Tn = dt.N();
                en += Tn;
                var In = dt.N(),
                  Qn = null;
                (In = ny(In)) == "vttc"
                  ? 8 < Tn && (Qn = dt.mb(Tn - 8))
                  : (In != "vtte" &&
                      B.error("Unknown box " + In + "! Skipping!"),
                    dt.U(Tn - 8)),
                  xt
                    ? Qn &&
                      J.push(
                        mst(
                          Qn,
                          _.periodStart + Nt / R.g,
                          _.periodStart + bt / R.g
                        )
                      )
                    : B.error(
                        "WVTT sample duration unknown, and no default found!"
                      );
              } while (mt.sampleSize && en < mt.sampleSize);
            }),
            J.filter(rn.Ra)
          );
        }),
        (C_.prototype.parseMedia = C_.prototype.parseMedia),
        (Nc['application/mp4; codecs="wvtt"'] = C_),
        Z("shaka.util.Dom.createHTMLElement", function (m) {
          return document.createElement(m);
        }),
        Z("shaka.util.Dom.createVideoElement", function () {
          var m = document.createElement("video");
          return (m.muted = !0), (m.width = 600), (m.height = 400), m;
        }),
        Z("shaka.util.Dom.asHTMLElement", function (m) {
          return m;
        }),
        Z("shaka.util.Dom.asHTMLMediaElement", function (m) {
          return m;
        }),
        Z("shaka.util.Dom.removeAllChildren", function (m) {
          for (; m.firstChild; ) m.removeChild(m.firstChild);
        }),
        Z("EmeEncryptionSchemePolyfill", ype),
        (ype.install = vpe),
        Z("McEncryptionSchemePolyfill", Tpe),
        (Tpe.install = Epe),
        (EG.prototype.getConfiguration = function () {
          var m = this.h.getConfiguration();
          if (m.videoCapabilities)
            for (
              var _ = b(m.videoCapabilities), R = _.next();
              !R.done;
              R = _.next()
            )
              R.value.encryptionScheme = this.g;
          if (m.audioCapabilities)
            for (R = (_ = b(m.audioCapabilities)).next(); !R.done; R = _.next())
              R.value.encryptionScheme = this.g;
          return m;
        }),
        (EG.prototype.createMediaKeys = function () {
          return this.h.createMediaKeys();
        }),
        Z("EncryptionSchemePolyfills", D7),
        (D7.install = wpe),
        l !== void 0 && l.gf && (l.gf = D7);
    }.call(n, e, e, void 0),
    n.shaka))
      t[r] = n.shaka[r];
  })();
})(qot);
xD(qot);
export { Sei as a, Aei as b, sBe as c, Tei as d, Rei as i, Eei as l, _ei as r };
